0){t=this.iconv.decode(i.from(this.base64Accum,"base64"),"utf16-be")}this.inBase64=false;this.base64Accum="";return t}},74250:(t,r)=>{var o="\ufeff";r.PrependBOM=PrependBOMWrapper;function PrependBOMWrapper(t,r){this.encoder=t;this.addBOM=true}PrependBOMWrapper.prototype.write=function(t){if(this.addBOM){t=o+t;this.addBOM=false}return this.encoder.write(t)};PrependBOMWrapper.prototype.end=function(){return this.encoder.end()};r.StripBOM=StripBOMWrapper;function StripBOMWrapper(t,r){this.decoder=t;this.pass=false;this.options=r||{}}StripBOMWrapper.prototype.write=function(t){var r=this.decoder.write(t);if(this.pass||!r){return r}if(r[0]===o){r=r.slice(1);if(typeof this.options.stripBOM==="function"){this.options.stripBOM()}}this.pass=true;return r};StripBOMWrapper.prototype.end=function(){return this.decoder.end()}},25336:t=>{var r=typeof Object.hasOwn==="undefined"?Function.call.bind(Object.prototype.hasOwnProperty):Object.hasOwn;function mergeModules(t,o){for(var i in o){if(r(o,i)){t[i]=o[i]}}}t.exports=mergeModules},31748:(t,r,o)=>{var i=o(12803).Buffer;var a=o(74250);var c=o(25336);t.exports.encodings=null;t.exports.defaultCharUnicode="�";t.exports.defaultCharSingleByte="?";t.exports.encode=function encode(r,o,a){r=""+(r||"");var c=t.exports.getEncoder(o,a);var p=c.write(r);var u=c.end();return u&&u.length>0?i.concat([p,u]):p};t.exports.decode=function decode(r,o,a){if(typeof r==="string"){if(!t.exports.skipDecodeWarning){console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding");t.exports.skipDecodeWarning=true}r=i.from(""+(r||""),"binary")}var c=t.exports.getDecoder(o,a);var p=c.write(r);var u=c.end();return u?p+u:p};t.exports.encodingExists=function encodingExists(r){try{t.exports.getCodec(r);return true}catch(t){return false}};t.exports.toEncoding=t.exports.encode;t.exports.fromEncoding=t.exports.decode;t.exports._codecDataCache={__proto__:null};t.exports.getCodec=function getCodec(r){if(!t.exports.encodings){var i=o(27585);t.exports.encodings={__proto__:null};c(t.exports.encodings,i)}var a=t.exports._canonicalizeEncoding(r);var p={};while(true){var u=t.exports._codecDataCache[a];if(u){return u}var l=t.exports.encodings[a];switch(typeof l){case"string":a=l;break;case"object":for(var d in l){p[d]=l[d]}if(!p.encodingName){p.encodingName=a}a=l.type;break;case"function":if(!p.encodingName){p.encodingName=a}u=new l(p,t.exports);t.exports._codecDataCache[p.encodingName]=u;return u;default:throw new Error("Encoding not recognized: '"+r+"' (searched as: '"+a+"')")}}};t.exports._canonicalizeEncoding=function(t){return(""+t).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g,"")};t.exports.getEncoder=function getEncoder(r,o){var i=t.exports.getCodec(r);var c=new i.encoder(o,i);if(i.bomAware&&o&&o.addBOM){c=new a.PrependBOM(c,o)}return c};t.exports.getDecoder=function getDecoder(r,o){var i=t.exports.getCodec(r);var c=new i.decoder(o,i);if(i.bomAware&&!(o&&o.stripBOM===false)){c=new a.StripBOM(c,o)}return c};t.exports.enableStreamingAPI=function enableStreamingAPI(r){if(t.exports.supportsStreams){return}var i=o(42281)(r);t.exports.IconvLiteEncoderStream=i.IconvLiteEncoderStream;t.exports.IconvLiteDecoderStream=i.IconvLiteDecoderStream;t.exports.encodeStream=function encodeStream(r,o){return new t.exports.IconvLiteEncoderStream(t.exports.getEncoder(r,o),o)};t.exports.decodeStream=function decodeStream(r,o){return new t.exports.IconvLiteDecoderStream(t.exports.getDecoder(r,o),o)};t.exports.supportsStreams=true};var p;try{p=o(2203)}catch(t){}if(p&&p.Transform){t.exports.enableStreamingAPI(p)}else{t.exports.encodeStream=t.exports.decodeStream=function(){throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.")}}if(false){}},42281:(t,r,o)=>{var i=o(12803).Buffer;t.exports=function(t){var r=t.Transform;function IconvLiteEncoderStream(t,o){this.conv=t;o=o||{};o.decodeStrings=false;r.call(this,o)}IconvLiteEncoderStream.prototype=Object.create(r.prototype,{constructor:{value:IconvLiteEncoderStream}});IconvLiteEncoderStream.prototype._transform=function(t,r,o){if(typeof t!=="string"){return o(new Error("Iconv encoding stream needs strings as its input."))}try{var i=this.conv.write(t);if(i&&i.length)this.push(i);o()}catch(t){o(t)}};IconvLiteEncoderStream.prototype._flush=function(t){try{var r=this.conv.end();if(r&&r.length)this.push(r);t()}catch(r){t(r)}};IconvLiteEncoderStream.prototype.collect=function(t){var r=[];this.on("error",t);this.on("data",(function(t){r.push(t)}));this.on("end",(function(){t(null,i.concat(r))}));return this};function IconvLiteDecoderStream(t,o){this.conv=t;o=o||{};o.encoding=this.encoding="utf8";r.call(this,o)}IconvLiteDecoderStream.prototype=Object.create(r.prototype,{constructor:{value:IconvLiteDecoderStream}});IconvLiteDecoderStream.prototype._transform=function(t,r,o){if(!i.isBuffer(t)&&!(t instanceof Uint8Array)){return o(new Error("Iconv decoding stream needs buffers as its input."))}try{var a=this.conv.write(t);if(a&&a.length)this.push(a,this.encoding);o()}catch(t){o(t)}};IconvLiteDecoderStream.prototype._flush=function(t){try{var r=this.conv.end();if(r&&r.length)this.push(r,this.encoding);t()}catch(r){t(r)}};IconvLiteDecoderStream.prototype.collect=function(t){var r="";this.on("error",t);this.on("data",(function(t){r+=t}));this.on("end",(function(){t(null,r)}));return this};return{IconvLiteEncoderStream:IconvLiteEncoderStream,IconvLiteDecoderStream:IconvLiteDecoderStream}}},72024:t=>{
+import './sourcemap-register.cjs';import{createRequire as t}from"module";var r={23311:function(t,r){var o=this&&this.__awaiter||function(t,r,o,i){function adopt(t){return t instanceof o?t:new o((function(r){r(t)}))}return new(o||(o=Promise))((function(o,a){function fulfilled(t){try{step(i.next(t))}catch(t){a(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){a(t)}}function step(t){t.done?o(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,r||[])).next())}))};Object.defineProperty(r,"__esModule",{value:true});r.ClientStreamingCall=void 0;class ClientStreamingCall{constructor(t,r,o,i,a,c,p){this.method=t;this.requestHeaders=r;this.requests=o;this.headers=i;this.response=a;this.status=c;this.trailers=p}then(t,r){return this.promiseFinished().then((r=>t?Promise.resolve(t(r)):r),(t=>r?Promise.resolve(r(t)):Promise.reject(t)))}promiseFinished(){return o(this,void 0,void 0,(function*(){let[t,r,o,i]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,headers:t,response:r,status:o,trailers:i}}))}}r.ClientStreamingCall=ClientStreamingCall},69499:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.Deferred=r.DeferredState=void 0;var o;(function(t){t[t["PENDING"]=0]="PENDING";t[t["REJECTED"]=1]="REJECTED";t[t["RESOLVED"]=2]="RESOLVED"})(o=r.DeferredState||(r.DeferredState={}));class Deferred{constructor(t=true){this._state=o.PENDING;this._promise=new Promise(((t,r)=>{this._resolve=t;this._reject=r}));if(t){this._promise.catch((t=>{}))}}get state(){return this._state}get promise(){return this._promise}resolve(t){if(this.state!==o.PENDING)throw new Error(`cannot resolve ${o[this.state].toLowerCase()}`);this._resolve(t);this._state=o.RESOLVED}reject(t){if(this.state!==o.PENDING)throw new Error(`cannot reject ${o[this.state].toLowerCase()}`);this._reject(t);this._state=o.REJECTED}resolvePending(t){if(this._state===o.PENDING)this.resolve(t)}rejectPending(t){if(this._state===o.PENDING)this.reject(t)}}r.Deferred=Deferred},40800:function(t,r){var o=this&&this.__awaiter||function(t,r,o,i){function adopt(t){return t instanceof o?t:new o((function(r){r(t)}))}return new(o||(o=Promise))((function(o,a){function fulfilled(t){try{step(i.next(t))}catch(t){a(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){a(t)}}function step(t){t.done?o(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,r||[])).next())}))};Object.defineProperty(r,"__esModule",{value:true});r.DuplexStreamingCall=void 0;class DuplexStreamingCall{constructor(t,r,o,i,a,c,p){this.method=t;this.requestHeaders=r;this.requests=o;this.headers=i;this.responses=a;this.status=c;this.trailers=p}then(t,r){return this.promiseFinished().then((r=>t?Promise.resolve(t(r)):r),(t=>r?Promise.resolve(r(t)):Promise.reject(t)))}promiseFinished(){return o(this,void 0,void 0,(function*(){let[t,r,o]=yield Promise.all([this.headers,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,headers:t,status:r,trailers:o}}))}}r.DuplexStreamingCall=DuplexStreamingCall},76762:(t,r,o)=>{var i;i={value:true};var a=o(42554);Object.defineProperty(r,"C0",{enumerable:true,get:function(){return a.ServiceType}});var c=o(83402);i={enumerable:true,get:function(){return c.readMethodOptions}};i={enumerable:true,get:function(){return c.readMethodOption}};i={enumerable:true,get:function(){return c.readServiceOption}};var p=o(50422);i={enumerable:true,get:function(){return p.RpcError}};var u=o(63474);i={enumerable:true,get:function(){return u.mergeRpcOptions}};var l=o(58788);i={enumerable:true,get:function(){return l.RpcOutputStreamController}};var d=o(37816);i={enumerable:true,get:function(){return d.TestTransport}};var A=o(69499);i={enumerable:true,get:function(){return A.Deferred}};i={enumerable:true,get:function(){return A.DeferredState}};var b=o(40800);i={enumerable:true,get:function(){return b.DuplexStreamingCall}};var h=o(23311);i={enumerable:true,get:function(){return h.ClientStreamingCall}};var M=o(22715);i={enumerable:true,get:function(){return M.ServerStreamingCall}};var g=o(80738);i={enumerable:true,get:function(){return g.UnaryCall}};var z=o(84359);i={enumerable:true,get:function(){return z.stackIntercept}};i={enumerable:true,get:function(){return z.stackDuplexStreamingInterceptors}};i={enumerable:true,get:function(){return z.stackClientStreamingInterceptors}};i={enumerable:true,get:function(){return z.stackServerStreamingInterceptors}};i={enumerable:true,get:function(){return z.stackUnaryInterceptors}};var O=o(44626);i={enumerable:true,get:function(){return O.ServerCallContextController}}},83402:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.readServiceOption=r.readMethodOption=r.readMethodOptions=r.normalizeMethodInfo=void 0;const i=o(88372);function normalizeMethodInfo(t,r){var o,a,c;let p=t;p.service=r;p.localName=(o=p.localName)!==null&&o!==void 0?o:i.lowerCamelCase(p.name);p.serverStreaming=!!p.serverStreaming;p.clientStreaming=!!p.clientStreaming;p.options=(a=p.options)!==null&&a!==void 0?a:{};p.idempotency=(c=p.idempotency)!==null&&c!==void 0?c:undefined;return p}r.normalizeMethodInfo=normalizeMethodInfo;function readMethodOptions(t,r,o,i){var a;const c=(a=t.methods.find(((t,o)=>t.localName===r||o===r)))===null||a===void 0?void 0:a.options;return c&&c[o]?i.fromJson(c[o]):undefined}r.readMethodOptions=readMethodOptions;function readMethodOption(t,r,o,i){var a;const c=(a=t.methods.find(((t,o)=>t.localName===r||o===r)))===null||a===void 0?void 0:a.options;if(!c){return undefined}const p=c[o];if(p===undefined){return p}return i?i.fromJson(p):p}r.readMethodOption=readMethodOption;function readServiceOption(t,r,o){const i=t.options;if(!i){return undefined}const a=i[r];if(a===undefined){return a}return o?o.fromJson(a):a}r.readServiceOption=readServiceOption},50422:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.RpcError=void 0;class RpcError extends Error{constructor(t,r="UNKNOWN",o){super(t);this.name="RpcError";Object.setPrototypeOf(this,new.target.prototype);this.code=r;this.meta=o!==null&&o!==void 0?o:{}}toString(){const t=[this.name+": "+this.message];if(this.code){t.push("");t.push("Code: "+this.code)}if(this.serviceName&&this.methodName){t.push("Method: "+this.serviceName+"/"+this.methodName)}let r=Object.entries(this.meta);if(r.length){t.push("");t.push("Meta:");for(let[o,i]of r){t.push(` ${o}: ${i}`)}}return t.join("\n")}}r.RpcError=RpcError},84359:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.stackDuplexStreamingInterceptors=r.stackClientStreamingInterceptors=r.stackServerStreamingInterceptors=r.stackUnaryInterceptors=r.stackIntercept=void 0;const i=o(88372);function stackIntercept(t,r,o,a,c){var p,u,l,d;if(t=="unary"){let tail=(t,o,i)=>r.unary(t,o,i);for(const t of((p=a.interceptors)!==null&&p!==void 0?p:[]).filter((t=>t.interceptUnary)).reverse()){const r=tail;tail=(o,i,a)=>t.interceptUnary(r,o,i,a)}return tail(o,c,a)}if(t=="serverStreaming"){let tail=(t,o,i)=>r.serverStreaming(t,o,i);for(const t of((u=a.interceptors)!==null&&u!==void 0?u:[]).filter((t=>t.interceptServerStreaming)).reverse()){const r=tail;tail=(o,i,a)=>t.interceptServerStreaming(r,o,i,a)}return tail(o,c,a)}if(t=="clientStreaming"){let tail=(t,o)=>r.clientStreaming(t,o);for(const t of((l=a.interceptors)!==null&&l!==void 0?l:[]).filter((t=>t.interceptClientStreaming)).reverse()){const r=tail;tail=(o,i)=>t.interceptClientStreaming(r,o,i)}return tail(o,a)}if(t=="duplex"){let tail=(t,o)=>r.duplex(t,o);for(const t of((d=a.interceptors)!==null&&d!==void 0?d:[]).filter((t=>t.interceptDuplex)).reverse()){const r=tail;tail=(o,i)=>t.interceptDuplex(r,o,i)}return tail(o,a)}i.assertNever(t)}r.stackIntercept=stackIntercept;function stackUnaryInterceptors(t,r,o,i){return stackIntercept("unary",t,r,i,o)}r.stackUnaryInterceptors=stackUnaryInterceptors;function stackServerStreamingInterceptors(t,r,o,i){return stackIntercept("serverStreaming",t,r,i,o)}r.stackServerStreamingInterceptors=stackServerStreamingInterceptors;function stackClientStreamingInterceptors(t,r,o){return stackIntercept("clientStreaming",t,r,o)}r.stackClientStreamingInterceptors=stackClientStreamingInterceptors;function stackDuplexStreamingInterceptors(t,r,o){return stackIntercept("duplex",t,r,o)}r.stackDuplexStreamingInterceptors=stackDuplexStreamingInterceptors},63474:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.mergeRpcOptions=void 0;const i=o(88372);function mergeRpcOptions(t,r){if(!r)return t;let o={};copy(t,o);copy(r,o);for(let a of Object.keys(r)){let c=r[a];switch(a){case"jsonOptions":o.jsonOptions=i.mergeJsonOptions(t.jsonOptions,o.jsonOptions);break;case"binaryOptions":o.binaryOptions=i.mergeBinaryOptions(t.binaryOptions,o.binaryOptions);break;case"meta":o.meta={};copy(t.meta,o.meta);copy(r.meta,o.meta);break;case"interceptors":o.interceptors=t.interceptors?t.interceptors.concat(c):c.concat();break}}return o}r.mergeRpcOptions=mergeRpcOptions;function copy(t,r){if(!t)return;let o=r;for(let[r,i]of Object.entries(t)){if(i instanceof Date)o[r]=new Date(i.getTime());else if(Array.isArray(i))o[r]=i.concat();else o[r]=i}}},58788:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.RpcOutputStreamController=void 0;const i=o(69499);const a=o(88372);class RpcOutputStreamController{constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]};this._closed=false;this._itState={q:[]}}onNext(t){return this.addLis(t,this._lis.nxt)}onMessage(t){return this.addLis(t,this._lis.msg)}onError(t){return this.addLis(t,this._lis.err)}onComplete(t){return this.addLis(t,this._lis.cmp)}addLis(t,r){r.push(t);return()=>{let o=r.indexOf(t);if(o>=0)r.splice(o,1)}}clearLis(){for(let t of Object.values(this._lis))t.splice(0,t.length)}get closed(){return this._closed!==false}notifyNext(t,r,o){a.assert((t?1:0)+(r?1:0)+(o?1:0)<=1,"only one emission at a time");if(t)this.notifyMessage(t);if(r)this.notifyError(r);if(o)this.notifyComplete()}notifyMessage(t){a.assert(!this.closed,"stream is closed");this.pushIt({value:t,done:false});this._lis.msg.forEach((r=>r(t)));this._lis.nxt.forEach((r=>r(t,undefined,false)))}notifyError(t){a.assert(!this.closed,"stream is closed");this._closed=t;this.pushIt(t);this._lis.err.forEach((r=>r(t)));this._lis.nxt.forEach((r=>r(undefined,t,false)));this.clearLis()}notifyComplete(){a.assert(!this.closed,"stream is closed");this._closed=true;this.pushIt({value:null,done:true});this._lis.cmp.forEach((t=>t()));this._lis.nxt.forEach((t=>t(undefined,undefined,true)));this.clearLis()}[Symbol.asyncIterator](){if(this._closed===true)this.pushIt({value:null,done:true});else if(this._closed!==false)this.pushIt(this._closed);return{next:()=>{let t=this._itState;a.assert(t,"bad state");a.assert(!t.p,"iterator contract broken");let r=t.q.shift();if(r)return"value"in r?Promise.resolve(r):Promise.reject(r);t.p=new i.Deferred;return t.p.promise}}}pushIt(t){let r=this._itState;if(r.p){const o=r.p;a.assert(o.state==i.DeferredState.PENDING,"iterator contract broken");"value"in t?o.resolve(t):o.reject(t);delete r.p}else{r.q.push(t)}}}r.RpcOutputStreamController=RpcOutputStreamController},44626:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.ServerCallContextController=void 0;class ServerCallContextController{constructor(t,r,o,i,a={code:"OK",detail:""}){this._cancelled=false;this._listeners=[];this.method=t;this.headers=r;this.deadline=o;this.trailers={};this._sendRH=i;this.status=a}notifyCancelled(){if(!this._cancelled){this._cancelled=true;for(let t of this._listeners){t()}}}sendResponseHeaders(t){this._sendRH(t)}get cancelled(){return this._cancelled}onCancel(t){const r=this._listeners;r.push(t);return()=>{let o=r.indexOf(t);if(o>=0)r.splice(o,1)}}}r.ServerCallContextController=ServerCallContextController},22715:function(t,r){var o=this&&this.__awaiter||function(t,r,o,i){function adopt(t){return t instanceof o?t:new o((function(r){r(t)}))}return new(o||(o=Promise))((function(o,a){function fulfilled(t){try{step(i.next(t))}catch(t){a(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){a(t)}}function step(t){t.done?o(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,r||[])).next())}))};Object.defineProperty(r,"__esModule",{value:true});r.ServerStreamingCall=void 0;class ServerStreamingCall{constructor(t,r,o,i,a,c,p){this.method=t;this.requestHeaders=r;this.request=o;this.headers=i;this.responses=a;this.status=c;this.trailers=p}then(t,r){return this.promiseFinished().then((r=>t?Promise.resolve(t(r)):r),(t=>r?Promise.resolve(r(t)):Promise.reject(t)))}promiseFinished(){return o(this,void 0,void 0,(function*(){let[t,r,o]=yield Promise.all([this.headers,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:t,status:r,trailers:o}}))}}r.ServerStreamingCall=ServerStreamingCall},42554:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.ServiceType=void 0;const i=o(83402);class ServiceType{constructor(t,r,o){this.typeName=t;this.methods=r.map((t=>i.normalizeMethodInfo(t,this)));this.options=o!==null&&o!==void 0?o:{}}}r.ServiceType=ServiceType},37816:function(t,r,o){var i=this&&this.__awaiter||function(t,r,o,i){function adopt(t){return t instanceof o?t:new o((function(r){r(t)}))}return new(o||(o=Promise))((function(o,a){function fulfilled(t){try{step(i.next(t))}catch(t){a(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){a(t)}}function step(t){t.done?o(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,r||[])).next())}))};Object.defineProperty(r,"__esModule",{value:true});r.TestTransport=void 0;const a=o(50422);const c=o(88372);const p=o(58788);const u=o(63474);const l=o(80738);const d=o(22715);const A=o(23311);const b=o(40800);class TestTransport{constructor(t){this.suppressUncaughtRejections=true;this.headerDelay=10;this.responseDelay=50;this.betweenResponseDelay=10;this.afterResponseDelay=10;this.data=t!==null&&t!==void 0?t:{}}get sentMessages(){if(this.lastInput instanceof TestInputStream){return this.lastInput.sent}else if(typeof this.lastInput=="object"){return[this.lastInput.single]}return[]}get sendComplete(){if(this.lastInput instanceof TestInputStream){return this.lastInput.completed}else if(typeof this.lastInput=="object"){return true}return false}promiseHeaders(){var t;const r=(t=this.data.headers)!==null&&t!==void 0?t:TestTransport.defaultHeaders;return r instanceof a.RpcError?Promise.reject(r):Promise.resolve(r)}promiseSingleResponse(t){if(this.data.response instanceof a.RpcError){return Promise.reject(this.data.response)}let r;if(Array.isArray(this.data.response)){c.assert(this.data.response.length>0);r=this.data.response[0]}else if(this.data.response!==undefined){r=this.data.response}else{r=t.O.create()}c.assert(t.O.is(r));return Promise.resolve(r)}streamResponses(t,r,o){return i(this,void 0,void 0,(function*(){const i=[];if(this.data.response===undefined){i.push(t.O.create())}else if(Array.isArray(this.data.response)){for(let r of this.data.response){c.assert(t.O.is(r));i.push(r)}}else if(!(this.data.response instanceof a.RpcError)){c.assert(t.O.is(this.data.response));i.push(this.data.response)}try{yield delay(this.responseDelay,o)(undefined)}catch(t){r.notifyError(t);return}if(this.data.response instanceof a.RpcError){r.notifyError(this.data.response);return}for(let t of i){r.notifyMessage(t);try{yield delay(this.betweenResponseDelay,o)(undefined)}catch(t){r.notifyError(t);return}}if(this.data.status instanceof a.RpcError){r.notifyError(this.data.status);return}if(this.data.trailers instanceof a.RpcError){r.notifyError(this.data.trailers);return}r.notifyComplete()}))}promiseStatus(){var t;const r=(t=this.data.status)!==null&&t!==void 0?t:TestTransport.defaultStatus;return r instanceof a.RpcError?Promise.reject(r):Promise.resolve(r)}promiseTrailers(){var t;const r=(t=this.data.trailers)!==null&&t!==void 0?t:TestTransport.defaultTrailers;return r instanceof a.RpcError?Promise.reject(r):Promise.resolve(r)}maybeSuppressUncaught(...t){if(this.suppressUncaughtRejections){for(let r of t){r.catch((()=>{}))}}}mergeOptions(t){return u.mergeRpcOptions({},t)}unary(t,r,o){var i;const a=(i=o.meta)!==null&&i!==void 0?i:{},c=this.promiseHeaders().then(delay(this.headerDelay,o.abort)),p=c.catch((t=>{})).then(delay(this.responseDelay,o.abort)).then((r=>this.promiseSingleResponse(t))),u=p.catch((t=>{})).then(delay(this.afterResponseDelay,o.abort)).then((t=>this.promiseStatus())),d=p.catch((t=>{})).then(delay(this.afterResponseDelay,o.abort)).then((t=>this.promiseTrailers()));this.maybeSuppressUncaught(u,d);this.lastInput={single:r};return new l.UnaryCall(t,a,r,c,p,u,d)}serverStreaming(t,r,o){var i;const a=(i=o.meta)!==null&&i!==void 0?i:{},c=this.promiseHeaders().then(delay(this.headerDelay,o.abort)),u=new p.RpcOutputStreamController,l=c.then(delay(this.responseDelay,o.abort)).catch((()=>{})).then((()=>this.streamResponses(t,u,o.abort))).then(delay(this.afterResponseDelay,o.abort)),A=l.then((()=>this.promiseStatus())),b=l.then((()=>this.promiseTrailers()));this.maybeSuppressUncaught(A,b);this.lastInput={single:r};return new d.ServerStreamingCall(t,a,r,c,u,A,b)}clientStreaming(t,r){var o;const i=(o=r.meta)!==null&&o!==void 0?o:{},a=this.promiseHeaders().then(delay(this.headerDelay,r.abort)),c=a.catch((t=>{})).then(delay(this.responseDelay,r.abort)).then((r=>this.promiseSingleResponse(t))),p=c.catch((t=>{})).then(delay(this.afterResponseDelay,r.abort)).then((t=>this.promiseStatus())),u=c.catch((t=>{})).then(delay(this.afterResponseDelay,r.abort)).then((t=>this.promiseTrailers()));this.maybeSuppressUncaught(p,u);this.lastInput=new TestInputStream(this.data,r.abort);return new A.ClientStreamingCall(t,i,this.lastInput,a,c,p,u)}duplex(t,r){var o;const i=(o=r.meta)!==null&&o!==void 0?o:{},a=this.promiseHeaders().then(delay(this.headerDelay,r.abort)),c=new p.RpcOutputStreamController,u=a.then(delay(this.responseDelay,r.abort)).catch((()=>{})).then((()=>this.streamResponses(t,c,r.abort))).then(delay(this.afterResponseDelay,r.abort)),l=u.then((()=>this.promiseStatus())),d=u.then((()=>this.promiseTrailers()));this.maybeSuppressUncaught(l,d);this.lastInput=new TestInputStream(this.data,r.abort);return new b.DuplexStreamingCall(t,i,this.lastInput,a,c,l,d)}}r.TestTransport=TestTransport;TestTransport.defaultHeaders={responseHeader:"test"};TestTransport.defaultStatus={code:"OK",detail:"all good"};TestTransport.defaultTrailers={responseTrailer:"test"};function delay(t,r){return o=>new Promise(((i,c)=>{if(r===null||r===void 0?void 0:r.aborted){c(new a.RpcError("user cancel","CANCELLED"))}else{const p=setTimeout((()=>i(o)),t);if(r){r.addEventListener("abort",(t=>{clearTimeout(p);c(new a.RpcError("user cancel","CANCELLED"))}))}}}))}class TestInputStream{constructor(t,r){this._completed=false;this._sent=[];this.data=t;this.abort=r}get sent(){return this._sent}get completed(){return this._completed}send(t){if(this.data.inputMessage instanceof a.RpcError){return Promise.reject(this.data.inputMessage)}const r=this.data.inputMessage===undefined?10:this.data.inputMessage;return Promise.resolve(undefined).then((()=>{this._sent.push(t)})).then(delay(r,this.abort))}complete(){if(this.data.inputComplete instanceof a.RpcError){return Promise.reject(this.data.inputComplete)}const t=this.data.inputComplete===undefined?10:this.data.inputComplete;return Promise.resolve(undefined).then((()=>{this._completed=true})).then(delay(t,this.abort))}}},80738:function(t,r){var o=this&&this.__awaiter||function(t,r,o,i){function adopt(t){return t instanceof o?t:new o((function(r){r(t)}))}return new(o||(o=Promise))((function(o,a){function fulfilled(t){try{step(i.next(t))}catch(t){a(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){a(t)}}function step(t){t.done?o(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,r||[])).next())}))};Object.defineProperty(r,"__esModule",{value:true});r.UnaryCall=void 0;class UnaryCall{constructor(t,r,o,i,a,c,p){this.method=t;this.requestHeaders=r;this.request=o;this.headers=i;this.response=a;this.status=c;this.trailers=p}then(t,r){return this.promiseFinished().then((r=>t?Promise.resolve(t(r)):r),(t=>r?Promise.resolve(r(t)):Promise.reject(t)))}promiseFinished(){return o(this,void 0,void 0,(function*(){let[t,r,o,i]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:t,response:r,status:o,trailers:i}}))}}r.UnaryCall=UnaryCall},46468:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.assertFloat32=r.assertUInt32=r.assertInt32=r.assertNever=r.assert=void 0;function assert(t,r){if(!t){throw new Error(r)}}r.assert=assert;function assertNever(t,r){throw new Error(r!==null&&r!==void 0?r:"Unexpected object: "+t)}r.assertNever=assertNever;const o=34028234663852886e22,i=-34028234663852886e22,a=4294967295,c=2147483647,p=-2147483648;function assertInt32(t){if(typeof t!=="number")throw new Error("invalid int 32: "+typeof t);if(!Number.isInteger(t)||t>c||ta||t<0)throw new Error("invalid uint 32: "+t)}r.assertUInt32=assertUInt32;function assertFloat32(t){if(typeof t!=="number")throw new Error("invalid float 32: "+typeof t);if(!Number.isFinite(t))return;if(t>o||t{Object.defineProperty(r,"__esModule",{value:true});r.base64encode=r.base64decode=void 0;let o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");let i=[];for(let t=0;t>4;u=p;c=2;break;case 2:o[a++]=(u&15)<<4|(p&60)>>2;u=p;c=3;break;case 3:o[a++]=(u&3)<<6|p;c=0;break}}if(c==1)throw Error(`invalid base64 string.`);return o.subarray(0,a)}r.base64decode=base64decode;function base64encode(t){let r="",i=0,a,c=0;for(let p=0;p>2];c=(a&3)<<4;i=1;break;case 1:r+=o[c|a>>4];c=(a&15)<<2;i=2;break;case 2:r+=o[c|a>>6];r+=o[a&63];i=0;break}}if(i){r+=o[c];r+="=";if(i==1)r+="="}return r}r.base64encode=base64encode},66690:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.WireType=r.mergeBinaryOptions=r.UnknownFieldHandler=void 0;var o;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown");t.onRead=(r,o,i,a,c)=>{let p=is(o)?o[t.symbol]:o[t.symbol]=[];p.push({no:i,wireType:a,data:c})};t.onWrite=(r,o,i)=>{for(let{no:r,wireType:a,data:c}of t.list(o))i.tag(r,a).raw(c)};t.list=(r,o)=>{if(is(r)){let i=r[t.symbol];return o?i.filter((t=>t.no==o)):i}return[]};t.last=(r,o)=>t.list(r,o).slice(-1)[0];const is=r=>r&&Array.isArray(r[t.symbol])})(o=r.UnknownFieldHandler||(r.UnknownFieldHandler={}));function mergeBinaryOptions(t,r){return Object.assign(Object.assign({},t),r)}r.mergeBinaryOptions=mergeBinaryOptions;var i;(function(t){t[t["Varint"]=0]="Varint";t[t["Bit64"]=1]="Bit64";t[t["LengthDelimited"]=2]="LengthDelimited";t[t["StartGroup"]=3]="StartGroup";t[t["EndGroup"]=4]="EndGroup";t[t["Bit32"]=5]="Bit32"})(i=r.WireType||(r.WireType={}))},8887:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.BinaryReader=r.binaryReadOptions=void 0;const i=o(66690);const a=o(55579);const c=o(20365);const p={readUnknownField:true,readerFactory:t=>new BinaryReader(t)};function binaryReadOptions(t){return t?Object.assign(Object.assign({},p),t):p}r.binaryReadOptions=binaryReadOptions;class BinaryReader{constructor(t,r){this.varint64=c.varint64read;this.uint32=c.varint32read;this.buf=t;this.len=t.length;this.pos=0;this.view=new DataView(t.buffer,t.byteOffset,t.byteLength);this.textDecoder=r!==null&&r!==void 0?r:new TextDecoder("utf-8",{fatal:true,ignoreBOM:true})}tag(){let t=this.uint32(),r=t>>>3,o=t&7;if(r<=0||o<0||o>5)throw new Error("illegal tag: field no "+r+" wire type "+o);return[r,o]}skip(t){let r=this.pos;switch(t){case i.WireType.Varint:while(this.buf[this.pos++]&128){}break;case i.WireType.Bit64:this.pos+=4;case i.WireType.Bit32:this.pos+=4;break;case i.WireType.LengthDelimited:let r=this.uint32();this.pos+=r;break;case i.WireType.StartGroup:let o;while((o=this.tag()[1])!==i.WireType.EndGroup){this.skip(o)}break;default:throw new Error("cant skip wire type "+t)}this.assertBounds();return this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return new a.PbLong(...this.varint64())}uint64(){return new a.PbULong(...this.varint64())}sint64(){let[t,r]=this.varint64();let o=-(t&1);t=(t>>>1|(r&1)<<31)^o;r=r>>>1^o;return new a.PbLong(t,r)}bool(){let[t,r]=this.varint64();return t!==0||r!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,true)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,true)}fixed64(){return new a.PbULong(this.sfixed32(),this.sfixed32())}sfixed64(){return new a.PbLong(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,true)}double(){return this.view.getFloat64((this.pos+=8)-8,true)}bytes(){let t=this.uint32();let r=this.pos;this.pos+=t;this.assertBounds();return this.buf.subarray(r,r+t)}string(){return this.textDecoder.decode(this.bytes())}}r.BinaryReader=BinaryReader},4839:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.BinaryWriter=r.binaryWriteOptions=void 0;const i=o(55579);const a=o(20365);const c=o(46468);const p={writeUnknownFields:true,writerFactory:()=>new BinaryWriter};function binaryWriteOptions(t){return t?Object.assign(Object.assign({},p),t):p}r.binaryWriteOptions=binaryWriteOptions;class BinaryWriter{constructor(t){this.stack=[];this.textEncoder=t!==null&&t!==void 0?t:new TextEncoder;this.chunks=[];this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let t=0;for(let r=0;r>>0)}raw(t){if(this.buf.length){this.chunks.push(new Uint8Array(this.buf));this.buf=[]}this.chunks.push(t);return this}uint32(t){c.assertUInt32(t);while(t>127){this.buf.push(t&127|128);t=t>>>7}this.buf.push(t);return this}int32(t){c.assertInt32(t);a.varint32write(t,this.buf);return this}bool(t){this.buf.push(t?1:0);return this}bytes(t){this.uint32(t.byteLength);return this.raw(t)}string(t){let r=this.textEncoder.encode(t);this.uint32(r.byteLength);return this.raw(r)}float(t){c.assertFloat32(t);let r=new Uint8Array(4);new DataView(r.buffer).setFloat32(0,t,true);return this.raw(r)}double(t){let r=new Uint8Array(8);new DataView(r.buffer).setFloat64(0,t,true);return this.raw(r)}fixed32(t){c.assertUInt32(t);let r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,t,true);return this.raw(r)}sfixed32(t){c.assertInt32(t);let r=new Uint8Array(4);new DataView(r.buffer).setInt32(0,t,true);return this.raw(r)}sint32(t){c.assertInt32(t);t=(t<<1^t>>31)>>>0;a.varint32write(t,this.buf);return this}sfixed64(t){let r=new Uint8Array(8);let o=new DataView(r.buffer);let a=i.PbLong.from(t);o.setInt32(0,a.lo,true);o.setInt32(4,a.hi,true);return this.raw(r)}fixed64(t){let r=new Uint8Array(8);let o=new DataView(r.buffer);let a=i.PbULong.from(t);o.setInt32(0,a.lo,true);o.setInt32(4,a.hi,true);return this.raw(r)}int64(t){let r=i.PbLong.from(t);a.varint64write(r.lo,r.hi,this.buf);return this}sint64(t){let r=i.PbLong.from(t),o=r.hi>>31,c=r.lo<<1^o,p=(r.hi<<1|r.lo>>>31)^o;a.varint64write(c,p,this.buf);return this}uint64(t){let r=i.PbULong.from(t);a.varint64write(r.lo,r.hi,this.buf);return this}}r.BinaryWriter=BinaryWriter},46959:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.listEnumNumbers=r.listEnumNames=r.listEnumValues=r.isEnumObject=void 0;function isEnumObject(t){if(typeof t!="object"||t===null){return false}if(!t.hasOwnProperty(0)){return false}for(let r of Object.keys(t)){let o=parseInt(r);if(!Number.isNaN(o)){let r=t[o];if(r===undefined)return false;if(t[r]!==o)return false}else{let o=t[r];if(o===undefined)return false;if(typeof o!=="number")return false;if(t[o]===undefined)return false}}return true}r.isEnumObject=isEnumObject;function listEnumValues(t){if(!isEnumObject(t))throw new Error("not a typescript enum object");let r=[];for(let[o,i]of Object.entries(t))if(typeof i=="number")r.push({name:o,number:i});return r}r.listEnumValues=listEnumValues;function listEnumNames(t){return listEnumValues(t).map((t=>t.name))}r.listEnumNames=listEnumNames;function listEnumNumbers(t){return listEnumValues(t).map((t=>t.number)).filter(((t,r,o)=>o.indexOf(t)==r))}r.listEnumNumbers=listEnumNumbers},20365:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.varint32read=r.varint32write=r.int64toString=r.int64fromString=r.varint64write=r.varint64read=void 0;function varint64read(){let t=0;let r=0;for(let o=0;o<28;o+=7){let i=this.buf[this.pos++];t|=(i&127)<>4;if((o&128)==0){this.assertBounds();return[t,r]}for(let o=3;o<=31;o+=7){let i=this.buf[this.pos++];r|=(i&127)<>>i;const c=!(a>>>7==0&&r==0);const p=(c?a|128:a)&255;o.push(p);if(!c){return}}const i=t>>>28&15|(r&7)<<4;const a=!(r>>3==0);o.push((a?i|128:i)&255);if(!a){return}for(let t=3;t<31;t=t+7){const i=r>>>t;const a=!(i>>>7==0);const c=(a?i|128:i)&255;o.push(c);if(!a){return}}o.push(r>>>31&1)}r.varint64write=varint64write;const o=(1<<16)*(1<<16);function int64fromString(t){let r=t[0]=="-";if(r)t=t.slice(1);const i=1e6;let a=0;let c=0;function add1e6digit(r,p){const u=Number(t.slice(r,p));c*=i;a=a*i+u;if(a>=o){c=c+(a/o|0);a=a%o}}add1e6digit(-24,-18);add1e6digit(-18,-12);add1e6digit(-12,-6);add1e6digit(-6);return[r,a,c]}r.int64fromString=int64fromString;function int64toString(t,r){if(r>>>0<=2097151){return""+(o*r+(t>>>0))}let i=t&16777215;let a=(t>>>24|r<<8)>>>0&16777215;let c=r>>16&65535;let p=i+a*6777216+c*6710656;let u=a+c*8147497;let l=c*2;let d=1e7;if(p>=d){u+=Math.floor(p/d);p%=d}if(u>=d){l+=Math.floor(u/d);u%=d}function decimalFrom1e7(t,r){let o=t?String(t):"";if(r){return"0000000".slice(o.length)+o}return o}return decimalFrom1e7(l,0)+decimalFrom1e7(u,l)+decimalFrom1e7(p,1)}r.int64toString=int64toString;function varint32write(t,r){if(t>=0){while(t>127){r.push(t&127|128);t=t>>>7}r.push(t)}else{for(let o=0;o<9;o++){r.push(t&127|128);t=t>>7}r.push(1)}}r.varint32write=varint32write;function varint32read(){let t=this.buf[this.pos++];let r=t&127;if((t&128)==0){this.assertBounds();return r}t=this.buf[this.pos++];r|=(t&127)<<7;if((t&128)==0){this.assertBounds();return r}t=this.buf[this.pos++];r|=(t&127)<<14;if((t&128)==0){this.assertBounds();return r}t=this.buf[this.pos++];r|=(t&127)<<21;if((t&128)==0){this.assertBounds();return r}t=this.buf[this.pos++];r|=(t&15)<<28;for(let r=5;(t&128)!==0&&r<10;r++)t=this.buf[this.pos++];if((t&128)!=0)throw new Error("invalid varint");this.assertBounds();return r>>>0}r.varint32read=varint32read},88372:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});var i=o(58369);Object.defineProperty(r,"typeofJsonValue",{enumerable:true,get:function(){return i.typeofJsonValue}});Object.defineProperty(r,"isJsonObject",{enumerable:true,get:function(){return i.isJsonObject}});var a=o(36689);Object.defineProperty(r,"base64decode",{enumerable:true,get:function(){return a.base64decode}});Object.defineProperty(r,"base64encode",{enumerable:true,get:function(){return a.base64encode}});var c=o(55424);Object.defineProperty(r,"utf8read",{enumerable:true,get:function(){return c.utf8read}});var p=o(66690);Object.defineProperty(r,"WireType",{enumerable:true,get:function(){return p.WireType}});Object.defineProperty(r,"mergeBinaryOptions",{enumerable:true,get:function(){return p.mergeBinaryOptions}});Object.defineProperty(r,"UnknownFieldHandler",{enumerable:true,get:function(){return p.UnknownFieldHandler}});var u=o(8887);Object.defineProperty(r,"BinaryReader",{enumerable:true,get:function(){return u.BinaryReader}});Object.defineProperty(r,"binaryReadOptions",{enumerable:true,get:function(){return u.binaryReadOptions}});var l=o(4839);Object.defineProperty(r,"BinaryWriter",{enumerable:true,get:function(){return l.BinaryWriter}});Object.defineProperty(r,"binaryWriteOptions",{enumerable:true,get:function(){return l.binaryWriteOptions}});var d=o(55579);Object.defineProperty(r,"PbLong",{enumerable:true,get:function(){return d.PbLong}});Object.defineProperty(r,"PbULong",{enumerable:true,get:function(){return d.PbULong}});var A=o(33389);Object.defineProperty(r,"jsonReadOptions",{enumerable:true,get:function(){return A.jsonReadOptions}});Object.defineProperty(r,"jsonWriteOptions",{enumerable:true,get:function(){return A.jsonWriteOptions}});Object.defineProperty(r,"mergeJsonOptions",{enumerable:true,get:function(){return A.mergeJsonOptions}});var b=o(41371);Object.defineProperty(r,"MESSAGE_TYPE",{enumerable:true,get:function(){return b.MESSAGE_TYPE}});var h=o(4172);Object.defineProperty(r,"MessageType",{enumerable:true,get:function(){return h.MessageType}});var M=o(40528);Object.defineProperty(r,"ScalarType",{enumerable:true,get:function(){return M.ScalarType}});Object.defineProperty(r,"LongType",{enumerable:true,get:function(){return M.LongType}});Object.defineProperty(r,"RepeatType",{enumerable:true,get:function(){return M.RepeatType}});Object.defineProperty(r,"normalizeFieldInfo",{enumerable:true,get:function(){return M.normalizeFieldInfo}});Object.defineProperty(r,"readFieldOptions",{enumerable:true,get:function(){return M.readFieldOptions}});Object.defineProperty(r,"readFieldOption",{enumerable:true,get:function(){return M.readFieldOption}});Object.defineProperty(r,"readMessageOption",{enumerable:true,get:function(){return M.readMessageOption}});var g=o(55649);Object.defineProperty(r,"ReflectionTypeCheck",{enumerable:true,get:function(){return g.ReflectionTypeCheck}});var z=o(40868);Object.defineProperty(r,"reflectionCreate",{enumerable:true,get:function(){return z.reflectionCreate}});var O=o(412);Object.defineProperty(r,"reflectionScalarDefault",{enumerable:true,get:function(){return O.reflectionScalarDefault}});var y=o(48674);Object.defineProperty(r,"reflectionMergePartial",{enumerable:true,get:function(){return y.reflectionMergePartial}});var C=o(78197);Object.defineProperty(r,"reflectionEquals",{enumerable:true,get:function(){return C.reflectionEquals}});var B=o(72161);Object.defineProperty(r,"ReflectionBinaryReader",{enumerable:true,get:function(){return B.ReflectionBinaryReader}});var I=o(45325);Object.defineProperty(r,"ReflectionBinaryWriter",{enumerable:true,get:function(){return I.ReflectionBinaryWriter}});var R=o(85240);Object.defineProperty(r,"ReflectionJsonReader",{enumerable:true,get:function(){return R.ReflectionJsonReader}});var S=o(55572);Object.defineProperty(r,"ReflectionJsonWriter",{enumerable:true,get:function(){return S.ReflectionJsonWriter}});var q=o(75556);Object.defineProperty(r,"containsMessageType",{enumerable:true,get:function(){return q.containsMessageType}});var w=o(74857);Object.defineProperty(r,"isOneofGroup",{enumerable:true,get:function(){return w.isOneofGroup}});Object.defineProperty(r,"setOneofValue",{enumerable:true,get:function(){return w.setOneofValue}});Object.defineProperty(r,"getOneofValue",{enumerable:true,get:function(){return w.getOneofValue}});Object.defineProperty(r,"clearOneofValue",{enumerable:true,get:function(){return w.clearOneofValue}});Object.defineProperty(r,"getSelectedOneofValue",{enumerable:true,get:function(){return w.getSelectedOneofValue}});var N=o(46959);Object.defineProperty(r,"listEnumValues",{enumerable:true,get:function(){return N.listEnumValues}});Object.defineProperty(r,"listEnumNames",{enumerable:true,get:function(){return N.listEnumNames}});Object.defineProperty(r,"listEnumNumbers",{enumerable:true,get:function(){return N.listEnumNumbers}});Object.defineProperty(r,"isEnumObject",{enumerable:true,get:function(){return N.isEnumObject}});var v=o(54959);Object.defineProperty(r,"lowerCamelCase",{enumerable:true,get:function(){return v.lowerCamelCase}});var T=o(46468);Object.defineProperty(r,"assert",{enumerable:true,get:function(){return T.assert}});Object.defineProperty(r,"assertNever",{enumerable:true,get:function(){return T.assertNever}});Object.defineProperty(r,"assertInt32",{enumerable:true,get:function(){return T.assertInt32}});Object.defineProperty(r,"assertUInt32",{enumerable:true,get:function(){return T.assertUInt32}});Object.defineProperty(r,"assertFloat32",{enumerable:true,get:function(){return T.assertFloat32}})},33389:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.mergeJsonOptions=r.jsonWriteOptions=r.jsonReadOptions=void 0;const o={emitDefaultValues:false,enumAsInteger:false,useProtoFieldName:false,prettySpaces:0},i={ignoreUnknownFields:false};function jsonReadOptions(t){return t?Object.assign(Object.assign({},i),t):i}r.jsonReadOptions=jsonReadOptions;function jsonWriteOptions(t){return t?Object.assign(Object.assign({},o),t):o}r.jsonWriteOptions=jsonWriteOptions;function mergeJsonOptions(t,r){var o,i;let a=Object.assign(Object.assign({},t),r);a.typeRegistry=[...(o=t===null||t===void 0?void 0:t.typeRegistry)!==null&&o!==void 0?o:[],...(i=r===null||r===void 0?void 0:r.typeRegistry)!==null&&i!==void 0?i:[]];return a}r.mergeJsonOptions=mergeJsonOptions},58369:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.isJsonObject=r.typeofJsonValue=void 0;function typeofJsonValue(t){let r=typeof t;if(r=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return r}r.typeofJsonValue=typeofJsonValue;function isJsonObject(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}r.isJsonObject=isJsonObject},54959:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.lowerCamelCase=void 0;function lowerCamelCase(t){let r=false;const o=[];for(let i=0;i{Object.defineProperty(r,"__esModule",{value:true});r.MESSAGE_TYPE=void 0;r.MESSAGE_TYPE=Symbol.for("protobuf-ts/message-type")},4172:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.MessageType=void 0;const i=o(41371);const a=o(40528);const c=o(55649);const p=o(85240);const u=o(55572);const l=o(72161);const d=o(45325);const A=o(40868);const b=o(48674);const h=o(58369);const M=o(33389);const g=o(78197);const z=o(4839);const O=o(8887);const y=Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));const C=y[i.MESSAGE_TYPE]={};class MessageType{constructor(t,r,o){this.defaultCheckDepth=16;this.typeName=t;this.fields=r.map(a.normalizeFieldInfo);this.options=o!==null&&o!==void 0?o:{};C.value=this;this.messagePrototype=Object.create(null,y);this.refTypeCheck=new c.ReflectionTypeCheck(this);this.refJsonReader=new p.ReflectionJsonReader(this);this.refJsonWriter=new u.ReflectionJsonWriter(this);this.refBinReader=new l.ReflectionBinaryReader(this);this.refBinWriter=new d.ReflectionBinaryWriter(this)}create(t){let r=A.reflectionCreate(this);if(t!==undefined){b.reflectionMergePartial(this,r,t)}return r}clone(t){let r=this.create();b.reflectionMergePartial(this,r,t);return r}equals(t,r){return g.reflectionEquals(this,t,r)}is(t,r=this.defaultCheckDepth){return this.refTypeCheck.is(t,r,false)}isAssignable(t,r=this.defaultCheckDepth){return this.refTypeCheck.is(t,r,true)}mergePartial(t,r){b.reflectionMergePartial(this,t,r)}fromBinary(t,r){let o=O.binaryReadOptions(r);return this.internalBinaryRead(o.readerFactory(t),t.byteLength,o)}fromJson(t,r){return this.internalJsonRead(t,M.jsonReadOptions(r))}fromJsonString(t,r){let o=JSON.parse(t);return this.fromJson(o,r)}toJson(t,r){return this.internalJsonWrite(t,M.jsonWriteOptions(r))}toJsonString(t,r){var o;let i=this.toJson(t,r);return JSON.stringify(i,null,(o=r===null||r===void 0?void 0:r.prettySpaces)!==null&&o!==void 0?o:0)}toBinary(t,r){let o=z.binaryWriteOptions(r);return this.internalBinaryWrite(t,o.writerFactory(),o).finish()}internalJsonRead(t,r,o){if(t!==null&&typeof t=="object"&&!Array.isArray(t)){let i=o!==null&&o!==void 0?o:this.create();this.refJsonReader.read(t,i,r);return i}throw new Error(`Unable to parse message ${this.typeName} from JSON ${h.typeofJsonValue(t)}.`)}internalJsonWrite(t,r){return this.refJsonWriter.write(t,r)}internalBinaryWrite(t,r,o){this.refBinWriter.write(t,r,o);return r}internalBinaryRead(t,r,o,i){let a=i!==null&&i!==void 0?i:this.create();this.refBinReader.read(t,a,o,r);return a}}r.MessageType=MessageType},74857:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.getSelectedOneofValue=r.clearOneofValue=r.setUnknownOneofValue=r.setOneofValue=r.getOneofValue=r.isOneofGroup=void 0;function isOneofGroup(t){if(typeof t!="object"||t===null||!t.hasOwnProperty("oneofKind")){return false}switch(typeof t.oneofKind){case"string":if(t[t.oneofKind]===undefined)return false;return Object.keys(t).length==2;case"undefined":return Object.keys(t).length==1;default:return false}}r.isOneofGroup=isOneofGroup;function getOneofValue(t,r){return t[r]}r.getOneofValue=getOneofValue;function setOneofValue(t,r,o){if(t.oneofKind!==undefined){delete t[t.oneofKind]}t.oneofKind=r;if(o!==undefined){t[r]=o}}r.setOneofValue=setOneofValue;function setUnknownOneofValue(t,r,o){if(t.oneofKind!==undefined){delete t[t.oneofKind]}t.oneofKind=r;if(o!==undefined&&r!==undefined){t[r]=o}}r.setUnknownOneofValue=setUnknownOneofValue;function clearOneofValue(t){if(t.oneofKind!==undefined){delete t[t.oneofKind]}t.oneofKind=undefined}r.clearOneofValue=clearOneofValue;function getSelectedOneofValue(t){if(t.oneofKind===undefined){return undefined}return t[t.oneofKind]}r.getSelectedOneofValue=getSelectedOneofValue},55579:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.PbLong=r.PbULong=r.detectBi=void 0;const i=o(20365);let a;function detectBi(){const t=new DataView(new ArrayBuffer(8));const r=globalThis.BigInt!==undefined&&typeof t.getBigInt64==="function"&&typeof t.getBigUint64==="function"&&typeof t.setBigInt64==="function"&&typeof t.setBigUint64==="function";a=r?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:t}:undefined}r.detectBi=detectBi;detectBi();function assertBi(t){if(!t)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}const c=/^-?[0-9]+$/;const p=4294967296;const u=2147483648;class SharedPbLong{constructor(t,r){this.lo=t|0;this.hi=r|0}isZero(){return this.lo==0&&this.hi==0}toNumber(){let t=this.hi*p+(this.lo>>>0);if(!Number.isSafeInteger(t))throw new Error("cannot convert to safe number");return t}}class PbULong extends SharedPbLong{static from(t){if(a)switch(typeof t){case"string":if(t=="0")return this.ZERO;if(t=="")throw new Error("string is no integer");t=a.C(t);case"number":if(t===0)return this.ZERO;t=a.C(t);case"bigint":if(!t)return this.ZERO;if(ta.UMAX)throw new Error("ulong too large");a.V.setBigUint64(0,t,true);return new PbULong(a.V.getInt32(0,true),a.V.getInt32(4,true))}else switch(typeof t){case"string":if(t=="0")return this.ZERO;t=t.trim();if(!c.test(t))throw new Error("string is no integer");let[r,o,a]=i.int64fromString(t);if(r)throw new Error("signed value for ulong");return new PbULong(o,a);case"number":if(t==0)return this.ZERO;if(!Number.isSafeInteger(t))throw new Error("number is no integer");if(t<0)throw new Error("signed value for ulong");return new PbULong(t,t/p)}throw new Error("unknown value "+typeof t)}toString(){return a?this.toBigInt().toString():i.int64toString(this.lo,this.hi)}toBigInt(){assertBi(a);a.V.setInt32(0,this.lo,true);a.V.setInt32(4,this.hi,true);return a.V.getBigUint64(0,true)}}r.PbULong=PbULong;PbULong.ZERO=new PbULong(0,0);class PbLong extends SharedPbLong{static from(t){if(a)switch(typeof t){case"string":if(t=="0")return this.ZERO;if(t=="")throw new Error("string is no integer");t=a.C(t);case"number":if(t===0)return this.ZERO;t=a.C(t);case"bigint":if(!t)return this.ZERO;if(ta.MAX)throw new Error("signed long too large");a.V.setBigInt64(0,t,true);return new PbLong(a.V.getInt32(0,true),a.V.getInt32(4,true))}else switch(typeof t){case"string":if(t=="0")return this.ZERO;t=t.trim();if(!c.test(t))throw new Error("string is no integer");let[r,o,a]=i.int64fromString(t);if(r){if(a>u||a==u&&o!=0)throw new Error("signed long too small")}else if(a>=u)throw new Error("signed long too large");let l=new PbLong(o,a);return r?l.negate():l;case"number":if(t==0)return this.ZERO;if(!Number.isSafeInteger(t))throw new Error("number is no integer");return t>0?new PbLong(t,t/p):new PbLong(-t,-t/p).negate()}throw new Error("unknown value "+typeof t)}isNegative(){return(this.hi&u)!==0}negate(){let t=~this.hi,r=this.lo;if(r)r=~r+1;else t+=1;return new PbLong(r,t)}toString(){if(a)return this.toBigInt().toString();if(this.isNegative()){let t=this.negate();return"-"+i.int64toString(t.lo,t.hi)}return i.int64toString(this.lo,this.hi)}toBigInt(){assertBi(a);a.V.setInt32(0,this.lo,true);a.V.setInt32(4,this.hi,true);return a.V.getBigInt64(0,true)}}r.PbLong=PbLong;PbLong.ZERO=new PbLong(0,0)},55424:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.utf8read=void 0;const fromCharCodes=t=>String.fromCharCode.apply(String,t);function utf8read(t){if(t.length<1)return"";let r=0,o=[],i=[],a=0,c;let p=t.length;while(r191&&c<224)i[a++]=(c&31)<<6|t[r++]&63;else if(c>239&&c<365){c=((c&7)<<18|(t[r++]&63)<<12|(t[r++]&63)<<6|t[r++]&63)-65536;i[a++]=55296+(c>>10);i[a++]=56320+(c&1023)}else i[a++]=(c&15)<<12|(t[r++]&63)<<6|t[r++]&63;if(a>8191){o.push(fromCharCodes(i));a=0}}if(o.length){if(a)o.push(fromCharCodes(i.slice(0,a)));return o.join("")}return fromCharCodes(i.slice(0,a))}r.utf8read=utf8read},72161:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.ReflectionBinaryReader=void 0;const i=o(66690);const a=o(40528);const c=o(32344);const p=o(412);class ReflectionBinaryReader{constructor(t){this.info=t}prepare(){var t;if(!this.fieldNoToField){const r=(t=this.info.fields)!==null&&t!==void 0?t:[];this.fieldNoToField=new Map(r.map((t=>[t.no,t])))}}read(t,r,o,c){this.prepare();const p=c===undefined?t.len:t.pos+c;while(t.pos
{Object.defineProperty(r,"__esModule",{value:true});r.ReflectionBinaryWriter=void 0;const i=o(66690);const a=o(40528);const c=o(46468);const p=o(55579);class ReflectionBinaryWriter{constructor(t){this.info=t}prepare(){if(!this.fields){const t=this.info.fields?this.info.fields.concat():[];this.fields=t.sort(((t,r)=>t.no-r.no))}}write(t,r,o){this.prepare();for(const i of this.fields){let p,u,l=i.repeat,d=i.localName;if(i.oneof){const r=t[i.oneof];if(r.oneofKind!==d)continue;p=r[d];u=true}else{p=t[d];u=false}switch(i.kind){case"scalar":case"enum":let t=i.kind=="enum"?a.ScalarType.INT32:i.T;if(l){c.assert(Array.isArray(p));if(l==a.RepeatType.PACKED)this.packed(r,t,i.no,p);else for(const o of p)this.scalar(r,t,i.no,o,true)}else if(p===undefined)c.assert(i.opt);else this.scalar(r,t,i.no,p,u||i.opt);break;case"message":if(l){c.assert(Array.isArray(p));for(const t of p)this.message(r,o,i.T(),i.no,t)}else{this.message(r,o,i.T(),i.no,p)}break;case"map":c.assert(typeof p=="object"&&p!==null);for(const[t,a]of Object.entries(p))this.mapEntry(r,o,i,t,a);break}}let p=o.writeUnknownFields;if(p!==false)(p===true?i.UnknownFieldHandler.onWrite:p)(this.info.typeName,t,r)}mapEntry(t,r,o,p,u){t.tag(o.no,i.WireType.LengthDelimited);t.fork();let l=p;switch(o.K){case a.ScalarType.INT32:case a.ScalarType.FIXED32:case a.ScalarType.UINT32:case a.ScalarType.SFIXED32:case a.ScalarType.SINT32:l=Number.parseInt(p);break;case a.ScalarType.BOOL:c.assert(p=="true"||p=="false");l=p=="true";break}this.scalar(t,o.K,1,l,true);switch(o.V.kind){case"scalar":this.scalar(t,o.V.T,2,u,true);break;case"enum":this.scalar(t,a.ScalarType.INT32,2,u,true);break;case"message":this.message(t,r,o.V.T(),2,u);break}t.join()}message(t,r,o,a,c){if(c===undefined)return;o.internalBinaryWrite(c,t.tag(a,i.WireType.LengthDelimited).fork(),r);t.join()}scalar(t,r,o,i,a){let[c,p,u]=this.scalarInfo(r,i);if(!u||a){t.tag(o,c);t[p](i)}}packed(t,r,o,p){if(!p.length)return;c.assert(r!==a.ScalarType.BYTES&&r!==a.ScalarType.STRING);t.tag(o,i.WireType.LengthDelimited);t.fork();let[,u]=this.scalarInfo(r);for(let r=0;r
{Object.defineProperty(r,"__esModule",{value:true});r.containsMessageType=void 0;const i=o(41371);function containsMessageType(t){return t[i.MESSAGE_TYPE]!=null}r.containsMessageType=containsMessageType},40868:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.reflectionCreate=void 0;const i=o(412);const a=o(41371);function reflectionCreate(t){const r=t.messagePrototype?Object.create(t.messagePrototype):Object.defineProperty({},a.MESSAGE_TYPE,{value:t});for(let o of t.fields){let t=o.localName;if(o.opt)continue;if(o.oneof)r[o.oneof]={oneofKind:undefined};else if(o.repeat)r[t]=[];else switch(o.kind){case"scalar":r[t]=i.reflectionScalarDefault(o.T,o.L);break;case"enum":r[t]=0;break;case"map":r[t]={};break}}return r}r.reflectionCreate=reflectionCreate},78197:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.reflectionEquals=void 0;const i=o(40528);function reflectionEquals(t,r,o){if(r===o)return true;if(!r||!o)return false;for(let c of t.fields){let t=c.localName;let p=c.oneof?r[c.oneof][t]:r[t];let u=c.oneof?o[c.oneof][t]:o[t];switch(c.kind){case"enum":case"scalar":let t=c.kind=="enum"?i.ScalarType.INT32:c.T;if(!(c.repeat?repeatedPrimitiveEq(t,p,u):primitiveEq(t,p,u)))return false;break;case"map":if(!(c.V.kind=="message"?repeatedMsgEq(c.V.T(),a(p),a(u)):repeatedPrimitiveEq(c.V.kind=="enum"?i.ScalarType.INT32:c.V.T,a(p),a(u))))return false;break;case"message":let r=c.T();if(!(c.repeat?repeatedMsgEq(r,p,u):r.equals(p,u)))return false;break}}return true}r.reflectionEquals=reflectionEquals;const a=Object.values;function primitiveEq(t,r,o){if(r===o)return true;if(t!==i.ScalarType.BYTES)return false;let a=r;let c=o;if(a.length!==c.length)return false;for(let t=0;t{Object.defineProperty(r,"__esModule",{value:true});r.readMessageOption=r.readFieldOption=r.readFieldOptions=r.normalizeFieldInfo=r.RepeatType=r.LongType=r.ScalarType=void 0;const i=o(54959);var a;(function(t){t[t["DOUBLE"]=1]="DOUBLE";t[t["FLOAT"]=2]="FLOAT";t[t["INT64"]=3]="INT64";t[t["UINT64"]=4]="UINT64";t[t["INT32"]=5]="INT32";t[t["FIXED64"]=6]="FIXED64";t[t["FIXED32"]=7]="FIXED32";t[t["BOOL"]=8]="BOOL";t[t["STRING"]=9]="STRING";t[t["BYTES"]=12]="BYTES";t[t["UINT32"]=13]="UINT32";t[t["SFIXED32"]=15]="SFIXED32";t[t["SFIXED64"]=16]="SFIXED64";t[t["SINT32"]=17]="SINT32";t[t["SINT64"]=18]="SINT64"})(a=r.ScalarType||(r.ScalarType={}));var c;(function(t){t[t["BIGINT"]=0]="BIGINT";t[t["STRING"]=1]="STRING";t[t["NUMBER"]=2]="NUMBER"})(c=r.LongType||(r.LongType={}));var p;(function(t){t[t["NO"]=0]="NO";t[t["PACKED"]=1]="PACKED";t[t["UNPACKED"]=2]="UNPACKED"})(p=r.RepeatType||(r.RepeatType={}));function normalizeFieldInfo(t){var r,o,a,c;t.localName=(r=t.localName)!==null&&r!==void 0?r:i.lowerCamelCase(t.name);t.jsonName=(o=t.jsonName)!==null&&o!==void 0?o:i.lowerCamelCase(t.name);t.repeat=(a=t.repeat)!==null&&a!==void 0?a:p.NO;t.opt=(c=t.opt)!==null&&c!==void 0?c:t.repeat?false:t.oneof?false:t.kind=="message";return t}r.normalizeFieldInfo=normalizeFieldInfo;function readFieldOptions(t,r,o,i){var a;const c=(a=t.fields.find(((t,o)=>t.localName==r||o==r)))===null||a===void 0?void 0:a.options;return c&&c[o]?i.fromJson(c[o]):undefined}r.readFieldOptions=readFieldOptions;function readFieldOption(t,r,o,i){var a;const c=(a=t.fields.find(((t,o)=>t.localName==r||o==r)))===null||a===void 0?void 0:a.options;if(!c){return undefined}const p=c[o];if(p===undefined){return p}return i?i.fromJson(p):p}r.readFieldOption=readFieldOption;function readMessageOption(t,r,o){const i=t.options;const a=i[r];if(a===undefined){return a}return o?o.fromJson(a):a}r.readMessageOption=readMessageOption},85240:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.ReflectionJsonReader=void 0;const i=o(58369);const a=o(36689);const c=o(40528);const p=o(55579);const u=o(46468);const l=o(32344);class ReflectionJsonReader{constructor(t){this.info=t}prepare(){var t;if(this.fMap===undefined){this.fMap={};const r=(t=this.info.fields)!==null&&t!==void 0?t:[];for(const t of r){this.fMap[t.name]=t;this.fMap[t.jsonName]=t;this.fMap[t.localName]=t}}}assert(t,r,o){if(!t){let t=i.typeofJsonValue(o);if(t=="number"||t=="boolean")t=o.toString();throw new Error(`Cannot parse JSON ${t} for ${this.info.typeName}#${r}`)}}read(t,r,o){this.prepare();const a=[];for(const[p,u]of Object.entries(t)){const t=this.fMap[p];if(!t){if(!o.ignoreUnknownFields)throw new Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${p}`);continue}const l=t.localName;let d;if(t.oneof){if(u===null&&(t.kind!=="enum"||t.T()[0]!=="google.protobuf.NullValue")){continue}if(a.includes(t.oneof))throw new Error(`Multiple members of the oneof group "${t.oneof}" of ${this.info.typeName} are present in JSON.`);a.push(t.oneof);d=r[t.oneof]={oneofKind:l}}else{d=r}if(t.kind=="map"){if(u===null){continue}this.assert(i.isJsonObject(u),t.name,u);const r=d[l];for(const[i,a]of Object.entries(u)){this.assert(a!==null,t.name+" map value",null);let p;switch(t.V.kind){case"message":p=t.V.T().internalJsonRead(a,o);break;case"enum":p=this.enum(t.V.T(),a,t.name,o.ignoreUnknownFields);if(p===false)continue;break;case"scalar":p=this.scalar(a,t.V.T,t.V.L,t.name);break}this.assert(p!==undefined,t.name+" map value",a);let u=i;if(t.K==c.ScalarType.BOOL)u=u=="true"?true:u=="false"?false:u;u=this.scalar(u,t.K,c.LongType.STRING,t.name).toString();r[u]=p}}else if(t.repeat){if(u===null)continue;this.assert(Array.isArray(u),t.name,u);const r=d[l];for(const i of u){this.assert(i!==null,t.name,null);let a;switch(t.kind){case"message":a=t.T().internalJsonRead(i,o);break;case"enum":a=this.enum(t.T(),i,t.name,o.ignoreUnknownFields);if(a===false)continue;break;case"scalar":a=this.scalar(i,t.T,t.L,t.name);break}this.assert(a!==undefined,t.name,u);r.push(a)}}else{switch(t.kind){case"message":if(u===null&&t.T().typeName!="google.protobuf.Value"){this.assert(t.oneof===undefined,t.name+" (oneof member)",null);continue}d[l]=t.T().internalJsonRead(u,o,d[l]);break;case"enum":if(u===null)continue;let r=this.enum(t.T(),u,t.name,o.ignoreUnknownFields);if(r===false)continue;d[l]=r;break;case"scalar":if(u===null)continue;d[l]=this.scalar(u,t.T,t.L,t.name);break}}}}enum(t,r,o,i){if(t[0]=="google.protobuf.NullValue")u.assert(r===null||r==="NULL_VALUE",`Unable to parse field ${this.info.typeName}#${o}, enum ${t[0]} only accepts null.`);if(r===null)return 0;switch(typeof r){case"number":u.assert(Number.isInteger(r),`Unable to parse field ${this.info.typeName}#${o}, enum can only be integral number, got ${r}.`);return r;case"string":let a=r;if(t[2]&&r.substring(0,t[2].length)===t[2])a=r.substring(t[2].length);let c=t[1][a];if(typeof c==="undefined"&&i){return false}u.assert(typeof c=="number",`Unable to parse field ${this.info.typeName}#${o}, enum ${t[0]} has no value for "${r}".`);return c}u.assert(false,`Unable to parse field ${this.info.typeName}#${o}, cannot parse enum value from ${typeof r}".`)}scalar(t,r,o,i){let d;try{switch(r){case c.ScalarType.DOUBLE:case c.ScalarType.FLOAT:if(t===null)return 0;if(t==="NaN")return Number.NaN;if(t==="Infinity")return Number.POSITIVE_INFINITY;if(t==="-Infinity")return Number.NEGATIVE_INFINITY;if(t===""){d="empty string";break}if(typeof t=="string"&&t.trim().length!==t.length){d="extra whitespace";break}if(typeof t!="string"&&typeof t!="number"){break}let i=Number(t);if(Number.isNaN(i)){d="not a number";break}if(!Number.isFinite(i)){d="too large or small";break}if(r==c.ScalarType.FLOAT)u.assertFloat32(i);return i;case c.ScalarType.INT32:case c.ScalarType.FIXED32:case c.ScalarType.SFIXED32:case c.ScalarType.SINT32:case c.ScalarType.UINT32:if(t===null)return 0;let A;if(typeof t=="number")A=t;else if(t==="")d="empty string";else if(typeof t=="string"){if(t.trim().length!==t.length)d="extra whitespace";else A=Number(t)}if(A===undefined)break;if(r==c.ScalarType.UINT32)u.assertUInt32(A);else u.assertInt32(A);return A;case c.ScalarType.INT64:case c.ScalarType.SFIXED64:case c.ScalarType.SINT64:if(t===null)return l.reflectionLongConvert(p.PbLong.ZERO,o);if(typeof t!="number"&&typeof t!="string")break;return l.reflectionLongConvert(p.PbLong.from(t),o);case c.ScalarType.FIXED64:case c.ScalarType.UINT64:if(t===null)return l.reflectionLongConvert(p.PbULong.ZERO,o);if(typeof t!="number"&&typeof t!="string")break;return l.reflectionLongConvert(p.PbULong.from(t),o);case c.ScalarType.BOOL:if(t===null)return false;if(typeof t!=="boolean")break;return t;case c.ScalarType.STRING:if(t===null)return"";if(typeof t!=="string"){d="extra whitespace";break}try{encodeURIComponent(t)}catch(d){d="invalid UTF8";break}return t;case c.ScalarType.BYTES:if(t===null||t==="")return new Uint8Array(0);if(typeof t!=="string")break;return a.base64decode(t)}}catch(t){d=t.message}this.assert(false,i+(d?" - "+d:""),t)}}r.ReflectionJsonReader=ReflectionJsonReader},55572:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.ReflectionJsonWriter=void 0;const i=o(36689);const a=o(55579);const c=o(40528);const p=o(46468);class ReflectionJsonWriter{constructor(t){var r;this.fields=(r=t.fields)!==null&&r!==void 0?r:[]}write(t,r){const o={},i=t;for(const t of this.fields){if(!t.oneof){let a=this.field(t,i[t.localName],r);if(a!==undefined)o[r.useProtoFieldName?t.name:t.jsonName]=a;continue}const a=i[t.oneof];if(a.oneofKind!==t.localName)continue;const c=t.kind=="scalar"||t.kind=="enum"?Object.assign(Object.assign({},r),{emitDefaultValues:true}):r;let u=this.field(t,a[t.localName],c);p.assert(u!==undefined);o[r.useProtoFieldName?t.name:t.jsonName]=u}return o}field(t,r,o){let i=undefined;if(t.kind=="map"){p.assert(typeof r=="object"&&r!==null);const a={};switch(t.V.kind){case"scalar":for(const[o,i]of Object.entries(r)){const r=this.scalar(t.V.T,i,t.name,false,true);p.assert(r!==undefined);a[o.toString()]=r}break;case"message":const i=t.V.T();for(const[c,u]of Object.entries(r)){const r=this.message(i,u,t.name,o);p.assert(r!==undefined);a[c.toString()]=r}break;case"enum":const c=t.V.T();for(const[i,u]of Object.entries(r)){p.assert(u===undefined||typeof u=="number");const r=this.enum(c,u,t.name,false,true,o.enumAsInteger);p.assert(r!==undefined);a[i.toString()]=r}break}if(o.emitDefaultValues||Object.keys(a).length>0)i=a}else if(t.repeat){p.assert(Array.isArray(r));const a=[];switch(t.kind){case"scalar":for(let o=0;o0||o.emitDefaultValues)i=a}else{switch(t.kind){case"scalar":i=this.scalar(t.T,r,t.name,t.opt,o.emitDefaultValues);break;case"enum":i=this.enum(t.T(),r,t.name,t.opt,o.emitDefaultValues,o.enumAsInteger);break;case"message":i=this.message(t.T(),r,t.name,o);break}}return i}enum(t,r,o,i,a,c){if(t[0]=="google.protobuf.NullValue")return!a&&!i?undefined:null;if(r===undefined){p.assert(i);return undefined}if(r===0&&!a&&!i)return undefined;p.assert(typeof r=="number");p.assert(Number.isInteger(r));if(c||!t[1].hasOwnProperty(r))return r;if(t[2])return t[2]+t[1][r];return t[1][r]}message(t,r,o,i){if(r===undefined)return i.emitDefaultValues?null:undefined;return t.internalJsonWrite(r,i)}scalar(t,r,o,u,l){if(r===undefined){p.assert(u);return undefined}const d=l||u;switch(t){case c.ScalarType.INT32:case c.ScalarType.SFIXED32:case c.ScalarType.SINT32:if(r===0)return d?0:undefined;p.assertInt32(r);return r;case c.ScalarType.FIXED32:case c.ScalarType.UINT32:if(r===0)return d?0:undefined;p.assertUInt32(r);return r;case c.ScalarType.FLOAT:p.assertFloat32(r);case c.ScalarType.DOUBLE:if(r===0)return d?0:undefined;p.assert(typeof r=="number");if(Number.isNaN(r))return"NaN";if(r===Number.POSITIVE_INFINITY)return"Infinity";if(r===Number.NEGATIVE_INFINITY)return"-Infinity";return r;case c.ScalarType.STRING:if(r==="")return d?"":undefined;p.assert(typeof r=="string");return r;case c.ScalarType.BOOL:if(r===false)return d?false:undefined;p.assert(typeof r=="boolean");return r;case c.ScalarType.UINT64:case c.ScalarType.FIXED64:p.assert(typeof r=="number"||typeof r=="string"||typeof r=="bigint");let t=a.PbULong.from(r);if(t.isZero()&&!d)return undefined;return t.toString();case c.ScalarType.INT64:case c.ScalarType.SFIXED64:case c.ScalarType.SINT64:p.assert(typeof r=="number"||typeof r=="string"||typeof r=="bigint");let o=a.PbLong.from(r);if(o.isZero()&&!d)return undefined;return o.toString();case c.ScalarType.BYTES:p.assert(r instanceof Uint8Array);if(!r.byteLength)return d?"":undefined;return i.base64encode(r)}}}r.ReflectionJsonWriter=ReflectionJsonWriter},32344:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.reflectionLongConvert=void 0;const i=o(40528);function reflectionLongConvert(t,r){switch(r){case i.LongType.BIGINT:return t.toBigInt();case i.LongType.NUMBER:return t.toNumber();default:return t.toString()}}r.reflectionLongConvert=reflectionLongConvert},48674:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.reflectionMergePartial=void 0;function reflectionMergePartial(t,r,o){let i,a=o,c;for(let o of t.fields){let t=o.localName;if(o.oneof){const p=a[o.oneof];if((p===null||p===void 0?void 0:p.oneofKind)==undefined){continue}i=p[t];c=r[o.oneof];c.oneofKind=p.oneofKind;if(i==undefined){delete c[t];continue}}else{i=a[t];c=r;if(i==undefined){continue}}if(o.repeat)c[t].length=i.length;switch(o.kind){case"scalar":case"enum":if(o.repeat)for(let r=0;r{Object.defineProperty(r,"__esModule",{value:true});r.reflectionScalarDefault=void 0;const i=o(40528);const a=o(32344);const c=o(55579);function reflectionScalarDefault(t,r=i.LongType.STRING){switch(t){case i.ScalarType.BOOL:return false;case i.ScalarType.UINT64:case i.ScalarType.FIXED64:return a.reflectionLongConvert(c.PbULong.ZERO,r);case i.ScalarType.INT64:case i.ScalarType.SFIXED64:case i.ScalarType.SINT64:return a.reflectionLongConvert(c.PbLong.ZERO,r);case i.ScalarType.DOUBLE:case i.ScalarType.FLOAT:return 0;case i.ScalarType.BYTES:return new Uint8Array(0);case i.ScalarType.STRING:return"";default:return 0}}r.reflectionScalarDefault=reflectionScalarDefault},55649:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.ReflectionTypeCheck=void 0;const i=o(40528);const a=o(74857);class ReflectionTypeCheck{constructor(t){var r;this.fields=(r=t.fields)!==null&&r!==void 0?r:[]}prepare(){if(this.data)return;const t=[],r=[],o=[];for(let i of this.fields){if(i.oneof){if(!o.includes(i.oneof)){o.push(i.oneof);t.push(i.oneof);r.push(i.oneof)}}else{r.push(i.localName);switch(i.kind){case"scalar":case"enum":if(!i.opt||i.repeat)t.push(i.localName);break;case"message":if(i.repeat)t.push(i.localName);break;case"map":t.push(i.localName);break}}}this.data={req:t,known:r,oneofs:Object.values(o)}}is(t,r,o=false){if(r<0)return true;if(t===null||t===undefined||typeof t!="object")return false;this.prepare();let i=Object.keys(t),c=this.data;if(i.length!i.includes(t))))return false;if(!o){if(i.some((t=>!c.known.includes(t))))return false}if(r<1){return true}for(const i of c.oneofs){const c=t[i];if(!a.isOneofGroup(c))return false;if(c.oneofKind===undefined)continue;const p=this.fields.find((t=>t.localName===c.oneofKind));if(!p)return false;if(!this.field(c[c.oneofKind],p,o,r))return false}for(const i of this.fields){if(i.oneof!==undefined)continue;if(!this.field(t[i.localName],i,o,r))return false}return true}field(t,r,o,a){let c=r.repeat;switch(r.kind){case"scalar":if(t===undefined)return r.opt;if(c)return this.scalars(t,r.T,a,r.L);return this.scalar(t,r.T,r.L);case"enum":if(t===undefined)return r.opt;if(c)return this.scalars(t,i.ScalarType.INT32,a);return this.scalar(t,i.ScalarType.INT32);case"message":if(t===undefined)return true;if(c)return this.messages(t,r.T(),o,a);return this.message(t,r.T(),o,a);case"map":if(typeof t!="object"||t===null)return false;if(a<2)return true;if(!this.mapKeys(t,r.K,a))return false;switch(r.V.kind){case"scalar":return this.scalars(Object.values(t),r.V.T,a,r.V.L);case"enum":return this.scalars(Object.values(t),i.ScalarType.INT32,a);case"message":return this.messages(Object.values(t),r.V.T(),o,a)}break}return true}message(t,r,o,i){if(o){return r.isAssignable(t,i)}return r.is(t,i)}messages(t,r,o,i){if(!Array.isArray(t))return false;if(i<2)return true;if(o){for(let o=0;oparseInt(t))),r,o);case i.ScalarType.BOOL:return this.scalars(a.slice(0,o).map((t=>t=="true"?true:t=="false"?false:t)),r,o);default:return this.scalars(a,r,o,i.LongType.STRING)}}}r.ReflectionTypeCheck=ReflectionTypeCheck},9497:(t,r,o)=>{const i=Symbol("SemVer ANY");class Comparator{static get ANY(){return i}constructor(t,r){r=a(r);if(t instanceof Comparator){if(t.loose===!!r.loose){return t}else{t=t.value}}t=t.trim().split(/\s+/).join(" ");l("comparator",t,r);this.options=r;this.loose=!!r.loose;this.parse(t);if(this.semver===i){this.value=""}else{this.value=this.operator+this.semver.version}l("comp",this)}parse(t){const r=this.options.loose?c[p.COMPARATORLOOSE]:c[p.COMPARATOR];const o=t.match(r);if(!o){throw new TypeError(`Invalid comparator: ${t}`)}this.operator=o[1]!==undefined?o[1]:"";if(this.operator==="="){this.operator=""}if(!o[2]){this.semver=i}else{this.semver=new d(o[2],this.options.loose)}}toString(){return this.value}test(t){l("Comparator.test",t,this.options.loose);if(this.semver===i||t===i){return true}if(typeof t==="string"){try{t=new d(t,this.options)}catch(t){return false}}return u(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof Comparator)){throw new TypeError("a Comparator is required")}if(this.operator===""){if(this.value===""){return true}return new A(t.value,r).test(this.value)}else if(t.operator===""){if(t.value===""){return true}return new A(this.value,r).test(t.semver)}r=a(r);if(r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")){return false}if(!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))){return false}if(this.operator.startsWith(">")&&t.operator.startsWith(">")){return true}if(this.operator.startsWith("<")&&t.operator.startsWith("<")){return true}if(this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")){return true}if(u(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")){return true}if(u(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")){return true}return false}}t.exports=Comparator;const a=o(55226);const{safeRe:c,t:p}=o(65357);const u=o(70048);const l=o(8277);const d=o(91153);const A=o(96816)},96816:(t,r,o)=>{const i=/\s+/g;class Range{constructor(t,r){r=p(r);if(t instanceof Range){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease){return t}else{return new Range(t.raw,r)}}if(t instanceof u){this.raw=t.value;this.set=[[t]];this.formatted=undefined;return this}this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;this.raw=t.trim().replace(i," ");this.set=this.raw.split("||").map((t=>this.parseRange(t.trim()))).filter((t=>t.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${this.raw}`)}if(this.set.length>1){const t=this.set[0];this.set=this.set.filter((t=>!isNullSet(t[0])));if(this.set.length===0){this.set=[t]}else if(this.set.length>1){for(const t of this.set){if(t.length===1&&isAny(t[0])){this.set=[t];break}}}}this.formatted=undefined}get range(){if(this.formatted===undefined){this.formatted="";for(let t=0;t0){this.formatted+="||"}const r=this.set[t];for(let t=0;t0){this.formatted+=" "}this.formatted+=r[t].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){const r=(this.options.includePrerelease&&z)|(this.options.loose&&O);const o=r+":"+t;const i=c.get(o);if(i){return i}const a=this.options.loose;const p=a?A[b.HYPHENRANGELOOSE]:A[b.HYPHENRANGE];t=t.replace(p,hyphenReplace(this.options.includePrerelease));l("hyphen replace",t);t=t.replace(A[b.COMPARATORTRIM],h);l("comparator trim",t);t=t.replace(A[b.TILDETRIM],M);l("tilde trim",t);t=t.replace(A[b.CARETTRIM],g);l("caret trim",t);let d=t.split(" ").map((t=>parseComparator(t,this.options))).join(" ").split(/\s+/).map((t=>replaceGTE0(t,this.options)));if(a){d=d.filter((t=>{l("loose invalid filter",t,this.options);return!!t.match(A[b.COMPARATORLOOSE])}))}l("range list",d);const y=new Map;const C=d.map((t=>new u(t,this.options)));for(const t of C){if(isNullSet(t)){return[t]}y.set(t.value,t)}if(y.size>1&&y.has("")){y.delete("")}const B=[...y.values()];c.set(o,B);return B}intersects(t,r){if(!(t instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((o=>isSatisfiable(o,r)&&t.set.some((t=>isSatisfiable(t,r)&&o.every((o=>t.every((t=>o.intersects(t,r)))))))))}test(t){if(!t){return false}if(typeof t==="string"){try{t=new d(t,this.options)}catch(t){return false}}for(let r=0;rt.value==="<0.0.0-0";const isAny=t=>t.value==="";const isSatisfiable=(t,r)=>{let o=true;const i=t.slice();let a=i.pop();while(o&&i.length){o=i.every((t=>a.intersects(t,r)));a=i.pop()}return o};const parseComparator=(t,r)=>{t=t.replace(A[b.BUILD],"");l("comp",t,r);t=replaceCarets(t,r);l("caret",t);t=replaceTildes(t,r);l("tildes",t);t=replaceXRanges(t,r);l("xrange",t);t=replaceStars(t,r);l("stars",t);return t};const isX=t=>!t||t.toLowerCase()==="x"||t==="*";const replaceTildes=(t,r)=>t.trim().split(/\s+/).map((t=>replaceTilde(t,r))).join(" ");const replaceTilde=(t,r)=>{const o=r.loose?A[b.TILDELOOSE]:A[b.TILDE];return t.replace(o,((r,o,i,a,c)=>{l("tilde",t,r,o,i,a,c);let p;if(isX(o)){p=""}else if(isX(i)){p=`>=${o}.0.0 <${+o+1}.0.0-0`}else if(isX(a)){p=`>=${o}.${i}.0 <${o}.${+i+1}.0-0`}else if(c){l("replaceTilde pr",c);p=`>=${o}.${i}.${a}-${c} <${o}.${+i+1}.0-0`}else{p=`>=${o}.${i}.${a} <${o}.${+i+1}.0-0`}l("tilde return",p);return p}))};const replaceCarets=(t,r)=>t.trim().split(/\s+/).map((t=>replaceCaret(t,r))).join(" ");const replaceCaret=(t,r)=>{l("caret",t,r);const o=r.loose?A[b.CARETLOOSE]:A[b.CARET];const i=r.includePrerelease?"-0":"";return t.replace(o,((r,o,a,c,p)=>{l("caret",t,r,o,a,c,p);let u;if(isX(o)){u=""}else if(isX(a)){u=`>=${o}.0.0${i} <${+o+1}.0.0-0`}else if(isX(c)){if(o==="0"){u=`>=${o}.${a}.0${i} <${o}.${+a+1}.0-0`}else{u=`>=${o}.${a}.0${i} <${+o+1}.0.0-0`}}else if(p){l("replaceCaret pr",p);if(o==="0"){if(a==="0"){u=`>=${o}.${a}.${c}-${p} <${o}.${a}.${+c+1}-0`}else{u=`>=${o}.${a}.${c}-${p} <${o}.${+a+1}.0-0`}}else{u=`>=${o}.${a}.${c}-${p} <${+o+1}.0.0-0`}}else{l("no pr");if(o==="0"){if(a==="0"){u=`>=${o}.${a}.${c}${i} <${o}.${a}.${+c+1}-0`}else{u=`>=${o}.${a}.${c}${i} <${o}.${+a+1}.0-0`}}else{u=`>=${o}.${a}.${c} <${+o+1}.0.0-0`}}l("caret return",u);return u}))};const replaceXRanges=(t,r)=>{l("replaceXRanges",t,r);return t.split(/\s+/).map((t=>replaceXRange(t,r))).join(" ")};const replaceXRange=(t,r)=>{t=t.trim();const o=r.loose?A[b.XRANGELOOSE]:A[b.XRANGE];return t.replace(o,((o,i,a,c,p,u)=>{l("xRange",t,o,i,a,c,p,u);const d=isX(a);const A=d||isX(c);const b=A||isX(p);const h=b;if(i==="="&&h){i=""}u=r.includePrerelease?"-0":"";if(d){if(i===">"||i==="<"){o="<0.0.0-0"}else{o="*"}}else if(i&&h){if(A){c=0}p=0;if(i===">"){i=">=";if(A){a=+a+1;c=0;p=0}else{c=+c+1;p=0}}else if(i==="<="){i="<";if(A){a=+a+1}else{c=+c+1}}if(i==="<"){u="-0"}o=`${i+a}.${c}.${p}${u}`}else if(A){o=`>=${a}.0.0${u} <${+a+1}.0.0-0`}else if(b){o=`>=${a}.${c}.0${u} <${a}.${+c+1}.0-0`}l("xRange return",o);return o}))};const replaceStars=(t,r)=>{l("replaceStars",t,r);return t.trim().replace(A[b.STAR],"")};const replaceGTE0=(t,r)=>{l("replaceGTE0",t,r);return t.trim().replace(A[r.includePrerelease?b.GTE0PRE:b.GTE0],"")};const hyphenReplace=t=>(r,o,i,a,c,p,u,l,d,A,b,h)=>{if(isX(i)){o=""}else if(isX(a)){o=`>=${i}.0.0${t?"-0":""}`}else if(isX(c)){o=`>=${i}.${a}.0${t?"-0":""}`}else if(p){o=`>=${o}`}else{o=`>=${o}${t?"-0":""}`}if(isX(d)){l=""}else if(isX(A)){l=`<${+d+1}.0.0-0`}else if(isX(b)){l=`<${d}.${+A+1}.0-0`}else if(h){l=`<=${d}.${A}.${b}-${h}`}else if(t){l=`<${d}.${A}.${+b+1}-0`}else{l=`<=${l}`}return`${o} ${l}`.trim()};const testSet=(t,r,o)=>{for(let o=0;o0){const i=t[o].semver;if(i.major===r.major&&i.minor===r.minor&&i.patch===r.patch){return true}}}return false}return true}},91153:(t,r,o)=>{const i=o(8277);const{MAX_LENGTH:a,MAX_SAFE_INTEGER:c}=o(50947);const{safeRe:p,t:u}=o(65357);const l=o(55226);const{compareIdentifiers:d}=o(91362);class SemVer{constructor(t,r){r=l(r);if(t instanceof SemVer){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease){return t}else{t=t.version}}else if(typeof t!=="string"){throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`)}if(t.length>a){throw new TypeError(`version is longer than ${a} characters`)}i("SemVer",t,r);this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;const o=t.trim().match(r.loose?p[u.LOOSE]:p[u.FULL]);if(!o){throw new TypeError(`Invalid Version: ${t}`)}this.raw=t;this.major=+o[1];this.minor=+o[2];this.patch=+o[3];if(this.major>c||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>c||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>c||this.patch<0){throw new TypeError("Invalid patch version")}if(!o[4]){this.prerelease=[]}else{this.prerelease=o[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){const r=+t;if(r>=0&&rt.major){return 1}if(this.minort.minor){return 1}if(this.patcht.patch){return 1}return 0}comparePre(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}if(this.prerelease.length&&!t.prerelease.length){return-1}else if(!this.prerelease.length&&t.prerelease.length){return 1}else if(!this.prerelease.length&&!t.prerelease.length){return 0}let r=0;do{const o=this.prerelease[r];const a=t.prerelease[r];i("prerelease compare",r,o,a);if(o===undefined&&a===undefined){return 0}else if(a===undefined){return 1}else if(o===undefined){return-1}else if(o===a){continue}else{return d(o,a)}}while(++r)}compareBuild(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}let r=0;do{const o=this.build[r];const a=t.build[r];i("build compare",r,o,a);if(o===undefined&&a===undefined){return 0}else if(a===undefined){return 1}else if(o===undefined){return-1}else if(o===a){continue}else{return d(o,a)}}while(++r)}inc(t,r,o){if(t.startsWith("pre")){if(!r&&o===false){throw new Error("invalid increment argument: identifier is empty")}if(r){const t=`-${r}`.match(this.options.loose?p[u.PRERELEASELOOSE]:p[u.PRERELEASE]);if(!t||t[1]!==r){throw new Error(`invalid identifier: ${r}`)}}}switch(t){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",r,o);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",r,o);break;case"prepatch":this.prerelease.length=0;this.inc("patch",r,o);this.inc("pre",r,o);break;case"prerelease":if(this.prerelease.length===0){this.inc("patch",r,o)}this.inc("pre",r,o);break;case"release":if(this.prerelease.length===0){throw new Error(`version ${this.raw} is not a prerelease`)}this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0){this.major++}this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0){this.minor++}this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0){this.patch++}this.prerelease=[];break;case"pre":{const t=Number(o)?1:0;if(this.prerelease.length===0){this.prerelease=[t]}else{let i=this.prerelease.length;while(--i>=0){if(typeof this.prerelease[i]==="number"){this.prerelease[i]++;i=-2}}if(i===-1){if(r===this.prerelease.join(".")&&o===false){throw new Error("invalid increment argument: identifier already exists")}this.prerelease.push(t)}}if(r){let i=[r,t];if(o===false){i=[r]}if(d(this.prerelease[0],r)===0){if(isNaN(this.prerelease[1])){this.prerelease=i}}else{this.prerelease=i}}break}default:throw new Error(`invalid increment argument: ${t}`)}this.raw=this.format();if(this.build.length){this.raw+=`+${this.build.join(".")}`}return this}}t.exports=SemVer},51653:(t,r,o)=>{const i=o(23055);const clean=(t,r)=>{const o=i(t.trim().replace(/^[=v]+/,""),r);return o?o.version:null};t.exports=clean},70048:(t,r,o)=>{const i=o(77876);const a=o(46160);const c=o(64349);const p=o(89822);const u=o(98602);const l=o(89667);const cmp=(t,r,o,d)=>{switch(r){case"===":if(typeof t==="object"){t=t.version}if(typeof o==="object"){o=o.version}return t===o;case"!==":if(typeof t==="object"){t=t.version}if(typeof o==="object"){o=o.version}return t!==o;case"":case"=":case"==":return i(t,o,d);case"!=":return a(t,o,d);case">":return c(t,o,d);case">=":return p(t,o,d);case"<":return u(t,o,d);case"<=":return l(t,o,d);default:throw new TypeError(`Invalid operator: ${r}`)}};t.exports=cmp},34915:(t,r,o)=>{const i=o(91153);const a=o(23055);const{safeRe:c,t:p}=o(65357);const coerce=(t,r)=>{if(t instanceof i){return t}if(typeof t==="number"){t=String(t)}if(typeof t!=="string"){return null}r=r||{};let o=null;if(!r.rtl){o=t.match(r.includePrerelease?c[p.COERCEFULL]:c[p.COERCE])}else{const i=r.includePrerelease?c[p.COERCERTLFULL]:c[p.COERCERTL];let a;while((a=i.exec(t))&&(!o||o.index+o[0].length!==t.length)){if(!o||a.index+a[0].length!==o.index+o[0].length){o=a}i.lastIndex=a.index+a[1].length+a[2].length}i.lastIndex=-1}if(o===null){return null}const u=o[2];const l=o[3]||"0";const d=o[4]||"0";const A=r.includePrerelease&&o[5]?`-${o[5]}`:"";const b=r.includePrerelease&&o[6]?`+${o[6]}`:"";return a(`${u}.${l}.${d}${A}${b}`,r)};t.exports=coerce},67238:(t,r,o)=>{const i=o(91153);const compareBuild=(t,r,o)=>{const a=new i(t,o);const c=new i(r,o);return a.compare(c)||a.compareBuild(c)};t.exports=compareBuild},1112:(t,r,o)=>{const i=o(76375);const compareLoose=(t,r)=>i(t,r,true);t.exports=compareLoose},76375:(t,r,o)=>{const i=o(91153);const compare=(t,r,o)=>new i(t,o).compare(new i(r,o));t.exports=compare},50745:(t,r,o)=>{const i=o(23055);const diff=(t,r)=>{const o=i(t,null,true);const a=i(r,null,true);const c=o.compare(a);if(c===0){return null}const p=c>0;const u=p?o:a;const l=p?a:o;const d=!!u.prerelease.length;const A=!!l.prerelease.length;if(A&&!d){if(!l.patch&&!l.minor){return"major"}if(l.compareMain(u)===0){if(l.minor&&!l.patch){return"minor"}return"patch"}}const b=d?"pre":"";if(o.major!==a.major){return b+"major"}if(o.minor!==a.minor){return b+"minor"}if(o.patch!==a.patch){return b+"patch"}return"prerelease"};t.exports=diff},77876:(t,r,o)=>{const i=o(76375);const eq=(t,r,o)=>i(t,r,o)===0;t.exports=eq},64349:(t,r,o)=>{const i=o(76375);const gt=(t,r,o)=>i(t,r,o)>0;t.exports=gt},89822:(t,r,o)=>{const i=o(76375);const gte=(t,r,o)=>i(t,r,o)>=0;t.exports=gte},12384:(t,r,o)=>{const i=o(91153);const inc=(t,r,o,a,c)=>{if(typeof o==="string"){c=a;a=o;o=undefined}try{return new i(t instanceof i?t.version:t,o).inc(r,a,c).version}catch(t){return null}};t.exports=inc},98602:(t,r,o)=>{const i=o(76375);const lt=(t,r,o)=>i(t,r,o)<0;t.exports=lt},89667:(t,r,o)=>{const i=o(76375);const lte=(t,r,o)=>i(t,r,o)<=0;t.exports=lte},38433:(t,r,o)=>{const i=o(91153);const major=(t,r)=>new i(t,r).major;t.exports=major},45173:(t,r,o)=>{const i=o(91153);const minor=(t,r)=>new i(t,r).minor;t.exports=minor},46160:(t,r,o)=>{const i=o(76375);const neq=(t,r,o)=>i(t,r,o)!==0;t.exports=neq},23055:(t,r,o)=>{const i=o(91153);const parse=(t,r,o=false)=>{if(t instanceof i){return t}try{return new i(t,r)}catch(t){if(!o){return null}throw t}};t.exports=parse},15902:(t,r,o)=>{const i=o(91153);const patch=(t,r)=>new i(t,r).patch;t.exports=patch},98408:(t,r,o)=>{const i=o(23055);const prerelease=(t,r)=>{const o=i(t,r);return o&&o.prerelease.length?o.prerelease:null};t.exports=prerelease},42375:(t,r,o)=>{const i=o(76375);const rcompare=(t,r,o)=>i(r,t,o);t.exports=rcompare},88758:(t,r,o)=>{const i=o(67238);const rsort=(t,r)=>t.sort(((t,o)=>i(o,t,r)));t.exports=rsort},60505:(t,r,o)=>{const i=o(96816);const satisfies=(t,r,o)=>{try{r=new i(r,o)}catch(t){return false}return r.test(t)};t.exports=satisfies},9414:(t,r,o)=>{const i=o(67238);const sort=(t,r)=>t.sort(((t,o)=>i(t,o,r)));t.exports=sort},71750:(t,r,o)=>{const i=o(23055);const valid=(t,r)=>{const o=i(t,r);return o?o.version:null};t.exports=valid},42710:(t,r,o)=>{const i=o(65357);const a=o(50947);const c=o(91153);const p=o(91362);const u=o(23055);const l=o(71750);const d=o(51653);const A=o(12384);const b=o(50745);const h=o(38433);const M=o(45173);const g=o(15902);const z=o(98408);const O=o(76375);const y=o(42375);const C=o(1112);const B=o(67238);const I=o(9414);const R=o(88758);const S=o(64349);const q=o(98602);const w=o(77876);const N=o(46160);const v=o(89822);const T=o(89667);const W=o(70048);const _=o(34915);const L=o(9497);const x=o(96816);const k=o(60505);const Q=o(65056);const D=o(26027);const P=o(91745);const U=o(34156);const H=o(43319);const G=o(69442);const V=o(59294);const j=o(81107);const X=o(37427);const $=o(67178);const J=o(35499);t.exports={parse:u,valid:l,clean:d,inc:A,diff:b,major:h,minor:M,patch:g,prerelease:z,compare:O,rcompare:y,compareLoose:C,compareBuild:B,sort:I,rsort:R,gt:S,lt:q,eq:w,neq:N,gte:v,lte:T,cmp:W,coerce:_,Comparator:L,Range:x,satisfies:k,toComparators:Q,maxSatisfying:D,minSatisfying:P,minVersion:U,validRange:H,outside:G,gtr:V,ltr:j,intersects:X,simplifyRange:$,subset:J,SemVer:c,re:i.re,src:i.src,tokens:i.t,SEMVER_SPEC_VERSION:a.SEMVER_SPEC_VERSION,RELEASE_TYPES:a.RELEASE_TYPES,compareIdentifiers:p.compareIdentifiers,rcompareIdentifiers:p.rcompareIdentifiers}},50947:t=>{const r="2.0.0";const o=256;const i=Number.MAX_SAFE_INTEGER||9007199254740991;const a=16;const c=o-6;const p=["major","premajor","minor","preminor","patch","prepatch","prerelease"];t.exports={MAX_LENGTH:o,MAX_SAFE_COMPONENT_LENGTH:a,MAX_SAFE_BUILD_LENGTH:c,MAX_SAFE_INTEGER:i,RELEASE_TYPES:p,SEMVER_SPEC_VERSION:r,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},8277:t=>{const r=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};t.exports=r},91362:t=>{const r=/^[0-9]+$/;const compareIdentifiers=(t,o)=>{if(typeof t==="number"&&typeof o==="number"){return t===o?0:tcompareIdentifiers(r,t);t.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},6829:t=>{class LRUCache{constructor(){this.max=1e3;this.map=new Map}get(t){const r=this.map.get(t);if(r===undefined){return undefined}else{this.map.delete(t);this.map.set(t,r);return r}}delete(t){return this.map.delete(t)}set(t,r){const o=this.delete(t);if(!o&&r!==undefined){if(this.map.size>=this.max){const t=this.map.keys().next().value;this.delete(t)}this.map.set(t,r)}return this}}t.exports=LRUCache},55226:t=>{const r=Object.freeze({loose:true});const o=Object.freeze({});const parseOptions=t=>{if(!t){return o}if(typeof t!=="object"){return r}return t};t.exports=parseOptions},65357:(t,r,o)=>{const{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:c}=o(50947);const p=o(8277);r=t.exports={};const u=r.re=[];const l=r.safeRe=[];const d=r.src=[];const A=r.safeSrc=[];const b=r.t={};let h=0;const M="[a-zA-Z0-9-]";const g=[["\\s",1],["\\d",c],[M,a]];const makeSafeRegex=t=>{for(const[r,o]of g){t=t.split(`${r}*`).join(`${r}{0,${o}}`).split(`${r}+`).join(`${r}{1,${o}}`)}return t};const createToken=(t,r,o)=>{const i=makeSafeRegex(r);const a=h++;p(t,a,r);b[t]=a;d[a]=r;A[a]=i;u[a]=new RegExp(r,o?"g":undefined);l[a]=new RegExp(i,o?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","\\d+");createToken("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${M}*`);createToken("MAINVERSION",`(${d[b.NUMERICIDENTIFIER]})\\.`+`(${d[b.NUMERICIDENTIFIER]})\\.`+`(${d[b.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${d[b.NUMERICIDENTIFIERLOOSE]})\\.`+`(${d[b.NUMERICIDENTIFIERLOOSE]})\\.`+`(${d[b.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${d[b.NONNUMERICIDENTIFIER]}|${d[b.NUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${d[b.NONNUMERICIDENTIFIER]}|${d[b.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASE",`(?:-(${d[b.PRERELEASEIDENTIFIER]}(?:\\.${d[b.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${d[b.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${d[b.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER",`${M}+`);createToken("BUILD",`(?:\\+(${d[b.BUILDIDENTIFIER]}(?:\\.${d[b.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${d[b.MAINVERSION]}${d[b.PRERELEASE]}?${d[b.BUILD]}?`);createToken("FULL",`^${d[b.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${d[b.MAINVERSIONLOOSE]}${d[b.PRERELEASELOOSE]}?${d[b.BUILD]}?`);createToken("LOOSE",`^${d[b.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${d[b.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${d[b.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${d[b.XRANGEIDENTIFIER]})`+`(?:\\.(${d[b.XRANGEIDENTIFIER]})`+`(?:\\.(${d[b.XRANGEIDENTIFIER]})`+`(?:${d[b.PRERELEASE]})?${d[b.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${d[b.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${d[b.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${d[b.XRANGEIDENTIFIERLOOSE]})`+`(?:${d[b.PRERELEASELOOSE]})?${d[b.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${d[b.GTLT]}\\s*${d[b.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${d[b.GTLT]}\\s*${d[b.XRANGEPLAINLOOSE]}$`);createToken("COERCEPLAIN",`${"(^|[^\\d])"+"(\\d{1,"}${i}})`+`(?:\\.(\\d{1,${i}}))?`+`(?:\\.(\\d{1,${i}}))?`);createToken("COERCE",`${d[b.COERCEPLAIN]}(?:$|[^\\d])`);createToken("COERCEFULL",d[b.COERCEPLAIN]+`(?:${d[b.PRERELEASE]})?`+`(?:${d[b.BUILD]})?`+`(?:$|[^\\d])`);createToken("COERCERTL",d[b.COERCE],true);createToken("COERCERTLFULL",d[b.COERCEFULL],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${d[b.LONETILDE]}\\s+`,true);r.tildeTrimReplace="$1~";createToken("TILDE",`^${d[b.LONETILDE]}${d[b.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${d[b.LONETILDE]}${d[b.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${d[b.LONECARET]}\\s+`,true);r.caretTrimReplace="$1^";createToken("CARET",`^${d[b.LONECARET]}${d[b.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${d[b.LONECARET]}${d[b.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${d[b.GTLT]}\\s*(${d[b.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${d[b.GTLT]}\\s*(${d[b.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${d[b.GTLT]}\\s*(${d[b.LOOSEPLAIN]}|${d[b.XRANGEPLAIN]})`,true);r.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${d[b.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${d[b.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${d[b.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${d[b.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},59294:(t,r,o)=>{const i=o(69442);const gtr=(t,r,o)=>i(t,r,">",o);t.exports=gtr},37427:(t,r,o)=>{const i=o(96816);const intersects=(t,r,o)=>{t=new i(t,o);r=new i(r,o);return t.intersects(r,o)};t.exports=intersects},81107:(t,r,o)=>{const i=o(69442);const ltr=(t,r,o)=>i(t,r,"<",o);t.exports=ltr},26027:(t,r,o)=>{const i=o(91153);const a=o(96816);const maxSatisfying=(t,r,o)=>{let c=null;let p=null;let u=null;try{u=new a(r,o)}catch(t){return null}t.forEach((t=>{if(u.test(t)){if(!c||p.compare(t)===-1){c=t;p=new i(c,o)}}}));return c};t.exports=maxSatisfying},91745:(t,r,o)=>{const i=o(91153);const a=o(96816);const minSatisfying=(t,r,o)=>{let c=null;let p=null;let u=null;try{u=new a(r,o)}catch(t){return null}t.forEach((t=>{if(u.test(t)){if(!c||p.compare(t)===1){c=t;p=new i(c,o)}}}));return c};t.exports=minSatisfying},34156:(t,r,o)=>{const i=o(91153);const a=o(96816);const c=o(64349);const minVersion=(t,r)=>{t=new a(t,r);let o=new i("0.0.0");if(t.test(o)){return o}o=new i("0.0.0-0");if(t.test(o)){return o}o=null;for(let r=0;r{const r=new i(t.semver.version);switch(t.operator){case">":if(r.prerelease.length===0){r.patch++}else{r.prerelease.push(0)}r.raw=r.format();case"":case">=":if(!p||c(r,p)){p=r}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}}));if(p&&(!o||c(o,p))){o=p}}if(o&&t.test(o)){return o}return null};t.exports=minVersion},69442:(t,r,o)=>{const i=o(91153);const a=o(9497);const{ANY:c}=a;const p=o(96816);const u=o(60505);const l=o(64349);const d=o(98602);const A=o(89667);const b=o(89822);const outside=(t,r,o,h)=>{t=new i(t,h);r=new p(r,h);let M,g,z,O,y;switch(o){case">":M=l;g=A;z=d;O=">";y=">=";break;case"<":M=d;g=b;z=l;O="<";y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(u(t,r,h)){return false}for(let o=0;o{if(t.semver===c){t=new a(">=0.0.0")}p=p||t;u=u||t;if(M(t.semver,p.semver,h)){p=t}else if(z(t.semver,u.semver,h)){u=t}}));if(p.operator===O||p.operator===y){return false}if((!u.operator||u.operator===O)&&g(t,u.semver)){return false}else if(u.operator===y&&z(t,u.semver)){return false}}return true};t.exports=outside},67178:(t,r,o)=>{const i=o(60505);const a=o(76375);t.exports=(t,r,o)=>{const c=[];let p=null;let u=null;const l=t.sort(((t,r)=>a(t,r,o)));for(const t of l){const a=i(t,r,o);if(a){u=t;if(!p){p=t}}else{if(u){c.push([p,u])}u=null;p=null}}if(p){c.push([p,null])}const d=[];for(const[t,r]of c){if(t===r){d.push(t)}else if(!r&&t===l[0]){d.push("*")}else if(!r){d.push(`>=${t}`)}else if(t===l[0]){d.push(`<=${r}`)}else{d.push(`${t} - ${r}`)}}const A=d.join(" || ");const b=typeof r.raw==="string"?r.raw:String(r);return A.length{const i=o(96816);const a=o(9497);const{ANY:c}=a;const p=o(60505);const u=o(76375);const subset=(t,r,o={})=>{if(t===r){return true}t=new i(t,o);r=new i(r,o);let a=false;e:for(const i of t.set){for(const t of r.set){const r=simpleSubset(i,t,o);a=a||r!==null;if(r){continue e}}if(a){return false}}return true};const l=[new a(">=0.0.0-0")];const d=[new a(">=0.0.0")];const simpleSubset=(t,r,o)=>{if(t===r){return true}if(t.length===1&&t[0].semver===c){if(r.length===1&&r[0].semver===c){return true}else if(o.includePrerelease){t=l}else{t=d}}if(r.length===1&&r[0].semver===c){if(o.includePrerelease){return true}else{r=d}}const i=new Set;let a,A;for(const r of t){if(r.operator===">"||r.operator===">="){a=higherGT(a,r,o)}else if(r.operator==="<"||r.operator==="<="){A=lowerLT(A,r,o)}else{i.add(r.semver)}}if(i.size>1){return null}let b;if(a&&A){b=u(a.semver,A.semver,o);if(b>0){return null}else if(b===0&&(a.operator!==">="||A.operator!=="<=")){return null}}for(const t of i){if(a&&!p(t,String(a),o)){return null}if(A&&!p(t,String(A),o)){return null}for(const i of r){if(!p(t,String(i),o)){return false}}return true}let h,M;let g,z;let O=A&&!o.includePrerelease&&A.semver.prerelease.length?A.semver:false;let y=a&&!o.includePrerelease&&a.semver.prerelease.length?a.semver:false;if(O&&O.prerelease.length===1&&A.operator==="<"&&O.prerelease[0]===0){O=false}for(const t of r){z=z||t.operator===">"||t.operator===">=";g=g||t.operator==="<"||t.operator==="<=";if(a){if(y){if(t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===y.major&&t.semver.minor===y.minor&&t.semver.patch===y.patch){y=false}}if(t.operator===">"||t.operator===">="){h=higherGT(a,t,o);if(h===t&&h!==a){return false}}else if(a.operator===">="&&!p(a.semver,String(t),o)){return false}}if(A){if(O){if(t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===O.major&&t.semver.minor===O.minor&&t.semver.patch===O.patch){O=false}}if(t.operator==="<"||t.operator==="<="){M=lowerLT(A,t,o);if(M===t&&M!==A){return false}}else if(A.operator==="<="&&!p(A.semver,String(t),o)){return false}}if(!t.operator&&(A||a)&&b!==0){return false}}if(a&&g&&!A&&b!==0){return false}if(A&&z&&!a&&b!==0){return false}if(y||O){return false}return true};const higherGT=(t,r,o)=>{if(!t){return r}const i=u(t.semver,r.semver,o);return i>0?t:i<0?r:r.operator===">"&&t.operator===">="?r:t};const lowerLT=(t,r,o)=>{if(!t){return r}const i=u(t.semver,r.semver,o);return i<0?t:i>0?r:r.operator==="<"&&t.operator==="<="?r:t};t.exports=subset},65056:(t,r,o)=>{const i=o(96816);const toComparators=(t,r)=>new i(t,r).set.map((t=>t.map((t=>t.value)).join(" ").trim().split(" ")));t.exports=toComparators},43319:(t,r,o)=>{const i=o(96816);const validRange=(t,r)=>{try{return new i(t,r).range||"*"}catch(t){return null}};t.exports=validRange},89659:function(t,r,o){var i=this&&this.__createBinding||(Object.create?function(t,r,o,i){if(i===undefined)i=o;var a=Object.getOwnPropertyDescriptor(r,o);if(!a||("get"in a?!r.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return r[o]}}}Object.defineProperty(t,i,a)}:function(t,r,o,i){if(i===undefined)i=o;t[i]=r[o]});var a=this&&this.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:true,value:r})}:function(t,r){t["default"]=r});var c=this&&this.__importStar||function(){var ownKeys=function(t){ownKeys=Object.getOwnPropertyNames||function(t){var r=[];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))r[r.length]=o;return r};return ownKeys(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var o=ownKeys(t),c=0;cp(this,void 0,void 0,(function*(){let r=Buffer.alloc(0);this.message.on("data",(t=>{r=Buffer.concat([r,t])}));this.message.on("end",(()=>{t(r.toString())}))}))))}))}readBodyBuffer(){return p(this,void 0,void 0,(function*(){return new Promise((t=>p(this,void 0,void 0,(function*(){const r=[];this.message.on("data",(t=>{r.push(t)}));this.message.on("end",(()=>{t(Buffer.concat(r))}))}))))}))}}r.HttpClientResponse=HttpClientResponse;function isHttps(t){const r=new URL(t);return r.protocol==="https:"}class HttpClient{constructor(t,r,o){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=this._getUserAgentWithOrchestrationId(t);this.handlers=r||[];this.requestOptions=o;if(o){if(o.ignoreSslError!=null){this._ignoreSslError=o.ignoreSslError}this._socketTimeout=o.socketTimeout;if(o.allowRedirects!=null){this._allowRedirects=o.allowRedirects}if(o.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=o.allowRedirectDowngrade}if(o.maxRedirects!=null){this._maxRedirects=Math.max(o.maxRedirects,0)}if(o.keepAlive!=null){this._keepAlive=o.keepAlive}if(o.allowRetries!=null){this._allowRetries=o.allowRetries}if(o.maxRetries!=null){this._maxRetries=o.maxRetries}}}options(t,r){return p(this,void 0,void 0,(function*(){return this.request("OPTIONS",t,null,r||{})}))}get(t,r){return p(this,void 0,void 0,(function*(){return this.request("GET",t,null,r||{})}))}del(t,r){return p(this,void 0,void 0,(function*(){return this.request("DELETE",t,null,r||{})}))}post(t,r,o){return p(this,void 0,void 0,(function*(){return this.request("POST",t,r,o||{})}))}patch(t,r,o){return p(this,void 0,void 0,(function*(){return this.request("PATCH",t,r,o||{})}))}put(t,r,o){return p(this,void 0,void 0,(function*(){return this.request("PUT",t,r,o||{})}))}head(t,r){return p(this,void 0,void 0,(function*(){return this.request("HEAD",t,null,r||{})}))}sendStream(t,r,o,i){return p(this,void 0,void 0,(function*(){return this.request(t,r,o,i)}))}getJson(t){return p(this,arguments,void 0,(function*(t,r={}){r[M.Accept]=this._getExistingOrDefaultHeader(r,M.Accept,g.ApplicationJson);const o=yield this.get(t,r);return this._processResponse(o,this.requestOptions)}))}postJson(t,r){return p(this,arguments,void 0,(function*(t,r,o={}){const i=JSON.stringify(r,null,2);o[M.Accept]=this._getExistingOrDefaultHeader(o,M.Accept,g.ApplicationJson);o[M.ContentType]=this._getExistingOrDefaultContentTypeHeader(o,g.ApplicationJson);const a=yield this.post(t,i,o);return this._processResponse(a,this.requestOptions)}))}putJson(t,r){return p(this,arguments,void 0,(function*(t,r,o={}){const i=JSON.stringify(r,null,2);o[M.Accept]=this._getExistingOrDefaultHeader(o,M.Accept,g.ApplicationJson);o[M.ContentType]=this._getExistingOrDefaultContentTypeHeader(o,g.ApplicationJson);const a=yield this.put(t,i,o);return this._processResponse(a,this.requestOptions)}))}patchJson(t,r){return p(this,arguments,void 0,(function*(t,r,o={}){const i=JSON.stringify(r,null,2);o[M.Accept]=this._getExistingOrDefaultHeader(o,M.Accept,g.ApplicationJson);o[M.ContentType]=this._getExistingOrDefaultContentTypeHeader(o,g.ApplicationJson);const a=yield this.patch(t,i,o);return this._processResponse(a,this.requestOptions)}))}request(t,r,o,i){return p(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const a=new URL(r);let c=this._prepareRequest(t,a,i);const p=this._allowRetries&&y.includes(t)?this._maxRetries+1:1;let u=0;let l;do{l=yield this.requestRaw(c,o);if(l&&l.message&&l.message.statusCode===h.Unauthorized){let t;for(const r of this.handlers){if(r.canHandleAuthentication(l)){t=r;break}}if(t){return t.handleAuthentication(this,c,o)}else{return l}}let r=this._maxRedirects;while(l.message.statusCode&&z.includes(l.message.statusCode)&&this._allowRedirects&&r>0){const p=l.message.headers["location"];if(!p){break}const u=new URL(p);if(a.protocol==="https:"&&a.protocol!==u.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield l.readBody();if(u.hostname!==a.hostname){for(const t in i){if(t.toLowerCase()==="authorization"){delete i[t]}}}c=this._prepareRequest(t,u,i);l=yield this.requestRaw(c,o);r--}if(!l.message.statusCode||!O.includes(l.message.statusCode)){return l}u+=1;if(u{function callbackForResult(t,r){if(t){i(t)}else if(!r){i(new Error("Unknown error"))}else{o(r)}}this.requestRawWithCallback(t,r,callbackForResult)}))}))}requestRawWithCallback(t,r,o){if(typeof r==="string"){if(!t.options.headers){t.options.headers={}}t.options.headers["Content-Length"]=Buffer.byteLength(r,"utf8")}let i=false;function handleResult(t,r){if(!i){i=true;o(t,r)}}const a=t.httpModule.request(t.options,(t=>{const r=new HttpClientResponse(t);handleResult(undefined,r)}));let c;a.on("socket",(t=>{c=t}));a.setTimeout(this._socketTimeout||3*6e4,(()=>{if(c){c.end()}handleResult(new Error(`Request timeout: ${t.options.path}`))}));a.on("error",(function(t){handleResult(t)}));if(r&&typeof r==="string"){a.write(r,"utf8")}if(r&&typeof r!=="string"){r.on("close",(function(){a.end()}));r.pipe(a)}else{a.end()}}getAgent(t){const r=new URL(t);return this._getAgent(r)}getAgentDispatcher(t){const r=new URL(t);const o=d.getProxyUrl(r);const i=o&&o.hostname;if(!i){return}return this._getProxyAgentDispatcher(r,o)}_prepareRequest(t,r,o){const i={};i.parsedUrl=r;const a=i.parsedUrl.protocol==="https:";i.httpModule=a?l:u;const c=a?443:80;i.options={};i.options.host=i.parsedUrl.hostname;i.options.port=i.parsedUrl.port?parseInt(i.parsedUrl.port):c;i.options.path=(i.parsedUrl.pathname||"")+(i.parsedUrl.search||"");i.options.method=t;i.options.headers=this._mergeHeaders(o);if(this.userAgent!=null){i.options.headers["user-agent"]=this.userAgent}i.options.agent=this._getAgent(i.parsedUrl);if(this.handlers){for(const t of this.handlers){t.prepareRequest(i.options)}}return i}_mergeHeaders(t){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(t||{}))}return lowercaseKeys(t||{})}_getExistingOrDefaultHeader(t,r,o){let i;if(this.requestOptions&&this.requestOptions.headers){const t=lowercaseKeys(this.requestOptions.headers)[r];if(t){i=typeof t==="number"?t.toString():t}}const a=t[r];if(a!==undefined){return typeof a==="number"?a.toString():a}if(i!==undefined){return i}return o}_getExistingOrDefaultContentTypeHeader(t,r){let o;if(this.requestOptions&&this.requestOptions.headers){const t=lowercaseKeys(this.requestOptions.headers)[M.ContentType];if(t){if(typeof t==="number"){o=String(t)}else if(Array.isArray(t)){o=t.join(", ")}else{o=t}}}const i=t[M.ContentType];if(i!==undefined){if(typeof i==="number"){return String(i)}else if(Array.isArray(i)){return i.join(", ")}else{return i}}if(o!==undefined){return o}return r}_getAgent(t){let r;const o=d.getProxyUrl(t);const i=o&&o.hostname;if(this._keepAlive&&i){r=this._proxyAgent}if(!i){r=this._agent}if(r){return r}const a=t.protocol==="https:";let c=100;if(this.requestOptions){c=this.requestOptions.maxSockets||u.globalAgent.maxSockets}if(o&&o.hostname){const t={maxSockets:c,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(o.username||o.password)&&{proxyAuth:`${o.username}:${o.password}`}),{host:o.hostname,port:o.port})};let i;const p=o.protocol==="https:";if(a){i=p?A.httpsOverHttps:A.httpsOverHttp}else{i=p?A.httpOverHttps:A.httpOverHttp}r=i(t);this._proxyAgent=r}if(!r){const t={keepAlive:this._keepAlive,maxSockets:c};r=a?new l.Agent(t):new u.Agent(t);this._agent=r}if(a&&this._ignoreSslError){r.options=Object.assign(r.options||{},{rejectUnauthorized:false})}return r}_getProxyAgentDispatcher(t,r){let o;if(this._keepAlive){o=this._proxyAgentDispatcher}if(o){return o}const i=t.protocol==="https:";o=new b.ProxyAgent(Object.assign({uri:r.href,pipelining:!this._keepAlive?0:1},(r.username||r.password)&&{token:`Basic ${Buffer.from(`${r.username}:${r.password}`).toString("base64")}`}));this._proxyAgentDispatcher=o;if(i&&this._ignoreSslError){o.options=Object.assign(o.options.requestTls||{},{rejectUnauthorized:false})}return o}_getUserAgentWithOrchestrationId(t){const r=t||"actions/http-client";const o=process.env["ACTIONS_ORCHESTRATION_ID"];if(o){const t=o.replace(/[^a-z0-9_.-]/gi,"_");return`${r} actions_orchestration_id/${t}`}return r}_performExponentialBackoff(t){return p(this,void 0,void 0,(function*(){t=Math.min(C,t);const r=B*Math.pow(2,t);return new Promise((t=>setTimeout((()=>t()),r)))}))}_processResponse(t,r){return p(this,void 0,void 0,(function*(){return new Promise(((o,i)=>p(this,void 0,void 0,(function*(){const a=t.message.statusCode||0;const c={statusCode:a,result:null,headers:{}};if(a===h.NotFound){o(c)}function dateTimeDeserializer(t,r){if(typeof r==="string"){const t=new Date(r);if(!isNaN(t.valueOf())){return t}}return r}let p;let u;try{u=yield t.readBody();if(u&&u.length>0){if(r&&r.deserializeDates){p=JSON.parse(u,dateTimeDeserializer)}else{p=JSON.parse(u)}c.result=p}c.headers=t.message.headers}catch(t){}if(a>299){let t;if(p&&p.message){t=p.message}else if(u&&u.length>0){t=u}else{t=`Failed request: (${a})`}const r=new HttpClientError(t,a);r.result=c.result;i(r)}else{o(c)}}))))}))}}r.HttpClient=HttpClient;const lowercaseKeys=t=>Object.keys(t).reduce(((r,o)=>(r[o.toLowerCase()]=t[o],r)),{})},83335:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.getProxyUrl=getProxyUrl;r.checkBypass=checkBypass;function getProxyUrl(t){const r=t.protocol==="https:";if(checkBypass(t)){return undefined}const o=(()=>{if(r){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(o){try{return new DecodedURL(o)}catch(t){if(!o.startsWith("http://")&&!o.startsWith("https://"))return new DecodedURL(`http://${o}`)}}else{return undefined}}function checkBypass(t){if(!t.hostname){return false}const r=t.hostname;if(isLoopbackAddress(r)){return true}const o=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!o){return false}let i;if(t.port){i=Number(t.port)}else if(t.protocol==="http:"){i=80}else if(t.protocol==="https:"){i=443}const a=[t.hostname.toUpperCase()];if(typeof i==="number"){a.push(`${a[0]}:${i}`)}for(const t of o.split(",").map((t=>t.trim().toUpperCase())).filter((t=>t))){if(t==="*"||a.some((r=>r===t||r.endsWith(`.${t}`)||t.startsWith(".")&&r.endsWith(`${t}`)))){return true}}return false}function isLoopbackAddress(t){const r=t.toLowerCase();return r==="localhost"||r.startsWith("127.")||r.startsWith("[::1]")||r.startsWith("[0:0:0:0:0:0:0:1]")}class DecodedURL extends URL{constructor(t,r){super(t,r);this._decodedUsername=decodeURIComponent(super.username);this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}}},37712:(t,r,o)=>{const i=Symbol("SemVer ANY");class Comparator{static get ANY(){return i}constructor(t,r){r=a(r);if(t instanceof Comparator){if(t.loose===!!r.loose){return t}else{t=t.value}}t=t.trim().split(/\s+/).join(" ");l("comparator",t,r);this.options=r;this.loose=!!r.loose;this.parse(t);if(this.semver===i){this.value=""}else{this.value=this.operator+this.semver.version}l("comp",this)}parse(t){const r=this.options.loose?c[p.COMPARATORLOOSE]:c[p.COMPARATOR];const o=t.match(r);if(!o){throw new TypeError(`Invalid comparator: ${t}`)}this.operator=o[1]!==undefined?o[1]:"";if(this.operator==="="){this.operator=""}if(!o[2]){this.semver=i}else{this.semver=new d(o[2],this.options.loose)}}toString(){return this.value}test(t){l("Comparator.test",t,this.options.loose);if(this.semver===i||t===i){return true}if(typeof t==="string"){try{t=new d(t,this.options)}catch(t){return false}}return u(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof Comparator)){throw new TypeError("a Comparator is required")}if(this.operator===""){if(this.value===""){return true}return new A(t.value,r).test(this.value)}else if(t.operator===""){if(t.value===""){return true}return new A(this.value,r).test(t.semver)}r=a(r);if(r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")){return false}if(!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))){return false}if(this.operator.startsWith(">")&&t.operator.startsWith(">")){return true}if(this.operator.startsWith("<")&&t.operator.startsWith("<")){return true}if(this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")){return true}if(u(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")){return true}if(u(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")){return true}return false}}t.exports=Comparator;const a=o(35131);const{safeRe:c,t:p}=o(76102);const u=o(89647);const l=o(11736);const d=o(86644);const A=o(54535)},54535:(t,r,o)=>{const i=/\s+/g;class Range{constructor(t,r){r=p(r);if(t instanceof Range){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease){return t}else{return new Range(t.raw,r)}}if(t instanceof u){this.raw=t.value;this.set=[[t]];this.formatted=undefined;return this}this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;this.raw=t.trim().replace(i," ");this.set=this.raw.split("||").map((t=>this.parseRange(t.trim()))).filter((t=>t.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${this.raw}`)}if(this.set.length>1){const t=this.set[0];this.set=this.set.filter((t=>!isNullSet(t[0])));if(this.set.length===0){this.set=[t]}else if(this.set.length>1){for(const t of this.set){if(t.length===1&&isAny(t[0])){this.set=[t];break}}}}this.formatted=undefined}get range(){if(this.formatted===undefined){this.formatted="";for(let t=0;t0){this.formatted+="||"}const r=this.set[t];for(let t=0;t0){this.formatted+=" "}this.formatted+=r[t].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){const r=(this.options.includePrerelease&&z)|(this.options.loose&&O);const o=r+":"+t;const i=c.get(o);if(i){return i}const a=this.options.loose;const p=a?A[b.HYPHENRANGELOOSE]:A[b.HYPHENRANGE];t=t.replace(p,hyphenReplace(this.options.includePrerelease));l("hyphen replace",t);t=t.replace(A[b.COMPARATORTRIM],h);l("comparator trim",t);t=t.replace(A[b.TILDETRIM],M);l("tilde trim",t);t=t.replace(A[b.CARETTRIM],g);l("caret trim",t);let d=t.split(" ").map((t=>parseComparator(t,this.options))).join(" ").split(/\s+/).map((t=>replaceGTE0(t,this.options)));if(a){d=d.filter((t=>{l("loose invalid filter",t,this.options);return!!t.match(A[b.COMPARATORLOOSE])}))}l("range list",d);const y=new Map;const C=d.map((t=>new u(t,this.options)));for(const t of C){if(isNullSet(t)){return[t]}y.set(t.value,t)}if(y.size>1&&y.has("")){y.delete("")}const B=[...y.values()];c.set(o,B);return B}intersects(t,r){if(!(t instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((o=>isSatisfiable(o,r)&&t.set.some((t=>isSatisfiable(t,r)&&o.every((o=>t.every((t=>o.intersects(t,r)))))))))}test(t){if(!t){return false}if(typeof t==="string"){try{t=new d(t,this.options)}catch(t){return false}}for(let r=0;rt.value==="<0.0.0-0";const isAny=t=>t.value==="";const isSatisfiable=(t,r)=>{let o=true;const i=t.slice();let a=i.pop();while(o&&i.length){o=i.every((t=>a.intersects(t,r)));a=i.pop()}return o};const parseComparator=(t,r)=>{t=t.replace(A[b.BUILD],"");l("comp",t,r);t=replaceCarets(t,r);l("caret",t);t=replaceTildes(t,r);l("tildes",t);t=replaceXRanges(t,r);l("xrange",t);t=replaceStars(t,r);l("stars",t);return t};const isX=t=>!t||t.toLowerCase()==="x"||t==="*";const replaceTildes=(t,r)=>t.trim().split(/\s+/).map((t=>replaceTilde(t,r))).join(" ");const replaceTilde=(t,r)=>{const o=r.loose?A[b.TILDELOOSE]:A[b.TILDE];return t.replace(o,((r,o,i,a,c)=>{l("tilde",t,r,o,i,a,c);let p;if(isX(o)){p=""}else if(isX(i)){p=`>=${o}.0.0 <${+o+1}.0.0-0`}else if(isX(a)){p=`>=${o}.${i}.0 <${o}.${+i+1}.0-0`}else if(c){l("replaceTilde pr",c);p=`>=${o}.${i}.${a}-${c} <${o}.${+i+1}.0-0`}else{p=`>=${o}.${i}.${a} <${o}.${+i+1}.0-0`}l("tilde return",p);return p}))};const replaceCarets=(t,r)=>t.trim().split(/\s+/).map((t=>replaceCaret(t,r))).join(" ");const replaceCaret=(t,r)=>{l("caret",t,r);const o=r.loose?A[b.CARETLOOSE]:A[b.CARET];const i=r.includePrerelease?"-0":"";return t.replace(o,((r,o,a,c,p)=>{l("caret",t,r,o,a,c,p);let u;if(isX(o)){u=""}else if(isX(a)){u=`>=${o}.0.0${i} <${+o+1}.0.0-0`}else if(isX(c)){if(o==="0"){u=`>=${o}.${a}.0${i} <${o}.${+a+1}.0-0`}else{u=`>=${o}.${a}.0${i} <${+o+1}.0.0-0`}}else if(p){l("replaceCaret pr",p);if(o==="0"){if(a==="0"){u=`>=${o}.${a}.${c}-${p} <${o}.${a}.${+c+1}-0`}else{u=`>=${o}.${a}.${c}-${p} <${o}.${+a+1}.0-0`}}else{u=`>=${o}.${a}.${c}-${p} <${+o+1}.0.0-0`}}else{l("no pr");if(o==="0"){if(a==="0"){u=`>=${o}.${a}.${c}${i} <${o}.${a}.${+c+1}-0`}else{u=`>=${o}.${a}.${c}${i} <${o}.${+a+1}.0-0`}}else{u=`>=${o}.${a}.${c} <${+o+1}.0.0-0`}}l("caret return",u);return u}))};const replaceXRanges=(t,r)=>{l("replaceXRanges",t,r);return t.split(/\s+/).map((t=>replaceXRange(t,r))).join(" ")};const replaceXRange=(t,r)=>{t=t.trim();const o=r.loose?A[b.XRANGELOOSE]:A[b.XRANGE];return t.replace(o,((o,i,a,c,p,u)=>{l("xRange",t,o,i,a,c,p,u);const d=isX(a);const A=d||isX(c);const b=A||isX(p);const h=b;if(i==="="&&h){i=""}u=r.includePrerelease?"-0":"";if(d){if(i===">"||i==="<"){o="<0.0.0-0"}else{o="*"}}else if(i&&h){if(A){c=0}p=0;if(i===">"){i=">=";if(A){a=+a+1;c=0;p=0}else{c=+c+1;p=0}}else if(i==="<="){i="<";if(A){a=+a+1}else{c=+c+1}}if(i==="<"){u="-0"}o=`${i+a}.${c}.${p}${u}`}else if(A){o=`>=${a}.0.0${u} <${+a+1}.0.0-0`}else if(b){o=`>=${a}.${c}.0${u} <${a}.${+c+1}.0-0`}l("xRange return",o);return o}))};const replaceStars=(t,r)=>{l("replaceStars",t,r);return t.trim().replace(A[b.STAR],"")};const replaceGTE0=(t,r)=>{l("replaceGTE0",t,r);return t.trim().replace(A[r.includePrerelease?b.GTE0PRE:b.GTE0],"")};const hyphenReplace=t=>(r,o,i,a,c,p,u,l,d,A,b,h)=>{if(isX(i)){o=""}else if(isX(a)){o=`>=${i}.0.0${t?"-0":""}`}else if(isX(c)){o=`>=${i}.${a}.0${t?"-0":""}`}else if(p){o=`>=${o}`}else{o=`>=${o}${t?"-0":""}`}if(isX(d)){l=""}else if(isX(A)){l=`<${+d+1}.0.0-0`}else if(isX(b)){l=`<${d}.${+A+1}.0-0`}else if(h){l=`<=${d}.${A}.${b}-${h}`}else if(t){l=`<${d}.${A}.${+b+1}-0`}else{l=`<=${l}`}return`${o} ${l}`.trim()};const testSet=(t,r,o)=>{for(let o=0;o0){const i=t[o].semver;if(i.major===r.major&&i.minor===r.minor&&i.patch===r.patch){return true}}}return false}return true}},86644:(t,r,o)=>{const i=o(11736);const{MAX_LENGTH:a,MAX_SAFE_INTEGER:c}=o(89962);const{safeRe:p,t:u}=o(76102);const l=o(35131);const{compareIdentifiers:d}=o(73411);class SemVer{constructor(t,r){r=l(r);if(t instanceof SemVer){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease){return t}else{t=t.version}}else if(typeof t!=="string"){throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`)}if(t.length>a){throw new TypeError(`version is longer than ${a} characters`)}i("SemVer",t,r);this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;const o=t.trim().match(r.loose?p[u.LOOSE]:p[u.FULL]);if(!o){throw new TypeError(`Invalid Version: ${t}`)}this.raw=t;this.major=+o[1];this.minor=+o[2];this.patch=+o[3];if(this.major>c||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>c||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>c||this.patch<0){throw new TypeError("Invalid patch version")}if(!o[4]){this.prerelease=[]}else{this.prerelease=o[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){const r=+t;if(r>=0&&rt.major){return 1}if(this.minort.minor){return 1}if(this.patcht.patch){return 1}return 0}comparePre(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}if(this.prerelease.length&&!t.prerelease.length){return-1}else if(!this.prerelease.length&&t.prerelease.length){return 1}else if(!this.prerelease.length&&!t.prerelease.length){return 0}let r=0;do{const o=this.prerelease[r];const a=t.prerelease[r];i("prerelease compare",r,o,a);if(o===undefined&&a===undefined){return 0}else if(a===undefined){return 1}else if(o===undefined){return-1}else if(o===a){continue}else{return d(o,a)}}while(++r)}compareBuild(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}let r=0;do{const o=this.build[r];const a=t.build[r];i("build compare",r,o,a);if(o===undefined&&a===undefined){return 0}else if(a===undefined){return 1}else if(o===undefined){return-1}else if(o===a){continue}else{return d(o,a)}}while(++r)}inc(t,r,o){if(t.startsWith("pre")){if(!r&&o===false){throw new Error("invalid increment argument: identifier is empty")}if(r){const t=`-${r}`.match(this.options.loose?p[u.PRERELEASELOOSE]:p[u.PRERELEASE]);if(!t||t[1]!==r){throw new Error(`invalid identifier: ${r}`)}}}switch(t){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",r,o);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",r,o);break;case"prepatch":this.prerelease.length=0;this.inc("patch",r,o);this.inc("pre",r,o);break;case"prerelease":if(this.prerelease.length===0){this.inc("patch",r,o)}this.inc("pre",r,o);break;case"release":if(this.prerelease.length===0){throw new Error(`version ${this.raw} is not a prerelease`)}this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0){this.major++}this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0){this.minor++}this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0){this.patch++}this.prerelease=[];break;case"pre":{const t=Number(o)?1:0;if(this.prerelease.length===0){this.prerelease=[t]}else{let i=this.prerelease.length;while(--i>=0){if(typeof this.prerelease[i]==="number"){this.prerelease[i]++;i=-2}}if(i===-1){if(r===this.prerelease.join(".")&&o===false){throw new Error("invalid increment argument: identifier already exists")}this.prerelease.push(t)}}if(r){let i=[r,t];if(o===false){i=[r]}if(d(this.prerelease[0],r)===0){if(isNaN(this.prerelease[1])){this.prerelease=i}}else{this.prerelease=i}}break}default:throw new Error(`invalid increment argument: ${t}`)}this.raw=this.format();if(this.build.length){this.raw+=`+${this.build.join(".")}`}return this}}t.exports=SemVer},63590:(t,r,o)=>{const i=o(22080);const clean=(t,r)=>{const o=i(t.trim().replace(/^[=v]+/,""),r);return o?o.version:null};t.exports=clean},89647:(t,r,o)=>{const i=o(273);const a=o(62991);const c=o(83740);const p=o(96297);const u=o(72115);const l=o(79824);const cmp=(t,r,o,d)=>{switch(r){case"===":if(typeof t==="object"){t=t.version}if(typeof o==="object"){o=o.version}return t===o;case"!==":if(typeof t==="object"){t=t.version}if(typeof o==="object"){o=o.version}return t!==o;case"":case"=":case"==":return i(t,o,d);case"!=":return a(t,o,d);case">":return c(t,o,d);case">=":return p(t,o,d);case"<":return u(t,o,d);case"<=":return l(t,o,d);default:throw new TypeError(`Invalid operator: ${r}`)}};t.exports=cmp},78522:(t,r,o)=>{const i=o(86644);const a=o(22080);const{safeRe:c,t:p}=o(76102);const coerce=(t,r)=>{if(t instanceof i){return t}if(typeof t==="number"){t=String(t)}if(typeof t!=="string"){return null}r=r||{};let o=null;if(!r.rtl){o=t.match(r.includePrerelease?c[p.COERCEFULL]:c[p.COERCE])}else{const i=r.includePrerelease?c[p.COERCERTLFULL]:c[p.COERCERTL];let a;while((a=i.exec(t))&&(!o||o.index+o[0].length!==t.length)){if(!o||a.index+a[0].length!==o.index+o[0].length){o=a}i.lastIndex=a.index+a[1].length+a[2].length}i.lastIndex=-1}if(o===null){return null}const u=o[2];const l=o[3]||"0";const d=o[4]||"0";const A=r.includePrerelease&&o[5]?`-${o[5]}`:"";const b=r.includePrerelease&&o[6]?`+${o[6]}`:"";return a(`${u}.${l}.${d}${A}${b}`,r)};t.exports=coerce},12237:(t,r,o)=>{const i=o(86644);const compareBuild=(t,r,o)=>{const a=new i(t,o);const c=new i(r,o);return a.compare(c)||a.compareBuild(c)};t.exports=compareBuild},99539:(t,r,o)=>{const i=o(11136);const compareLoose=(t,r)=>i(t,r,true);t.exports=compareLoose},11136:(t,r,o)=>{const i=o(86644);const compare=(t,r,o)=>new i(t,o).compare(new i(r,o));t.exports=compare},53496:(t,r,o)=>{const i=o(22080);const diff=(t,r)=>{const o=i(t,null,true);const a=i(r,null,true);const c=o.compare(a);if(c===0){return null}const p=c>0;const u=p?o:a;const l=p?a:o;const d=!!u.prerelease.length;const A=!!l.prerelease.length;if(A&&!d){if(!l.patch&&!l.minor){return"major"}if(l.compareMain(u)===0){if(l.minor&&!l.patch){return"minor"}return"patch"}}const b=d?"pre":"";if(o.major!==a.major){return b+"major"}if(o.minor!==a.minor){return b+"minor"}if(o.patch!==a.patch){return b+"patch"}return"prerelease"};t.exports=diff},273:(t,r,o)=>{const i=o(11136);const eq=(t,r,o)=>i(t,r,o)===0;t.exports=eq},83740:(t,r,o)=>{const i=o(11136);const gt=(t,r,o)=>i(t,r,o)>0;t.exports=gt},96297:(t,r,o)=>{const i=o(11136);const gte=(t,r,o)=>i(t,r,o)>=0;t.exports=gte},41999:(t,r,o)=>{const i=o(86644);const inc=(t,r,o,a,c)=>{if(typeof o==="string"){c=a;a=o;o=undefined}try{return new i(t instanceof i?t.version:t,o).inc(r,a,c).version}catch(t){return null}};t.exports=inc},72115:(t,r,o)=>{const i=o(11136);const lt=(t,r,o)=>i(t,r,o)<0;t.exports=lt},79824:(t,r,o)=>{const i=o(11136);const lte=(t,r,o)=>i(t,r,o)<=0;t.exports=lte},10474:(t,r,o)=>{const i=o(86644);const major=(t,r)=>new i(t,r).major;t.exports=major},52430:(t,r,o)=>{const i=o(86644);const minor=(t,r)=>new i(t,r).minor;t.exports=minor},62991:(t,r,o)=>{const i=o(11136);const neq=(t,r,o)=>i(t,r,o)!==0;t.exports=neq},22080:(t,r,o)=>{const i=o(86644);const parse=(t,r,o=false)=>{if(t instanceof i){return t}try{return new i(t,r)}catch(t){if(!o){return null}throw t}};t.exports=parse},99629:(t,r,o)=>{const i=o(86644);const patch=(t,r)=>new i(t,r).patch;t.exports=patch},16593:(t,r,o)=>{const i=o(22080);const prerelease=(t,r)=>{const o=i(t,r);return o&&o.prerelease.length?o.prerelease:null};t.exports=prerelease},4018:(t,r,o)=>{const i=o(11136);const rcompare=(t,r,o)=>i(r,t,o);t.exports=rcompare},11749:(t,r,o)=>{const i=o(12237);const rsort=(t,r)=>t.sort(((t,o)=>i(o,t,r)));t.exports=rsort},96326:(t,r,o)=>{const i=o(54535);const satisfies=(t,r,o)=>{try{r=new i(r,o)}catch(t){return false}return r.test(t)};t.exports=satisfies},5783:(t,r,o)=>{const i=o(12237);const sort=(t,r)=>t.sort(((t,o)=>i(t,o,r)));t.exports=sort},43769:(t,r,o)=>{const i=o(22080);const valid=(t,r)=>{const o=i(t,r);return o?o.version:null};t.exports=valid},50885:(t,r,o)=>{const i=o(76102);const a=o(89962);const c=o(86644);const p=o(73411);const u=o(22080);const l=o(43769);const d=o(63590);const A=o(41999);const b=o(53496);const h=o(10474);const M=o(52430);const g=o(99629);const z=o(16593);const O=o(11136);const y=o(4018);const C=o(99539);const B=o(12237);const I=o(5783);const R=o(11749);const S=o(83740);const q=o(72115);const w=o(273);const N=o(62991);const v=o(96297);const T=o(79824);const W=o(89647);const _=o(78522);const L=o(37712);const x=o(54535);const k=o(96326);const Q=o(67583);const D=o(13036);const P=o(27534);const U=o(19725);const H=o(19282);const G=o(39955);const V=o(52915);const j=o(31102);const X=o(27116);const $=o(36077);const J=o(21880);t.exports={parse:u,valid:l,clean:d,inc:A,diff:b,major:h,minor:M,patch:g,prerelease:z,compare:O,rcompare:y,compareLoose:C,compareBuild:B,sort:I,rsort:R,gt:S,lt:q,eq:w,neq:N,gte:v,lte:T,cmp:W,coerce:_,Comparator:L,Range:x,satisfies:k,toComparators:Q,maxSatisfying:D,minSatisfying:P,minVersion:U,validRange:H,outside:G,gtr:V,ltr:j,intersects:X,simplifyRange:$,subset:J,SemVer:c,re:i.re,src:i.src,tokens:i.t,SEMVER_SPEC_VERSION:a.SEMVER_SPEC_VERSION,RELEASE_TYPES:a.RELEASE_TYPES,compareIdentifiers:p.compareIdentifiers,rcompareIdentifiers:p.rcompareIdentifiers}},89962:t=>{const r="2.0.0";const o=256;const i=Number.MAX_SAFE_INTEGER||9007199254740991;const a=16;const c=o-6;const p=["major","premajor","minor","preminor","patch","prepatch","prerelease"];t.exports={MAX_LENGTH:o,MAX_SAFE_COMPONENT_LENGTH:a,MAX_SAFE_BUILD_LENGTH:c,MAX_SAFE_INTEGER:i,RELEASE_TYPES:p,SEMVER_SPEC_VERSION:r,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},11736:t=>{const r=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};t.exports=r},73411:t=>{const r=/^[0-9]+$/;const compareIdentifiers=(t,o)=>{if(typeof t==="number"&&typeof o==="number"){return t===o?0:tcompareIdentifiers(r,t);t.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},61018:t=>{class LRUCache{constructor(){this.max=1e3;this.map=new Map}get(t){const r=this.map.get(t);if(r===undefined){return undefined}else{this.map.delete(t);this.map.set(t,r);return r}}delete(t){return this.map.delete(t)}set(t,r){const o=this.delete(t);if(!o&&r!==undefined){if(this.map.size>=this.max){const t=this.map.keys().next().value;this.delete(t)}this.map.set(t,r)}return this}}t.exports=LRUCache},35131:t=>{const r=Object.freeze({loose:true});const o=Object.freeze({});const parseOptions=t=>{if(!t){return o}if(typeof t!=="object"){return r}return t};t.exports=parseOptions},76102:(t,r,o)=>{const{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:c}=o(89962);const p=o(11736);r=t.exports={};const u=r.re=[];const l=r.safeRe=[];const d=r.src=[];const A=r.safeSrc=[];const b=r.t={};let h=0;const M="[a-zA-Z0-9-]";const g=[["\\s",1],["\\d",c],[M,a]];const makeSafeRegex=t=>{for(const[r,o]of g){t=t.split(`${r}*`).join(`${r}{0,${o}}`).split(`${r}+`).join(`${r}{1,${o}}`)}return t};const createToken=(t,r,o)=>{const i=makeSafeRegex(r);const a=h++;p(t,a,r);b[t]=a;d[a]=r;A[a]=i;u[a]=new RegExp(r,o?"g":undefined);l[a]=new RegExp(i,o?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","\\d+");createToken("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${M}*`);createToken("MAINVERSION",`(${d[b.NUMERICIDENTIFIER]})\\.`+`(${d[b.NUMERICIDENTIFIER]})\\.`+`(${d[b.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${d[b.NUMERICIDENTIFIERLOOSE]})\\.`+`(${d[b.NUMERICIDENTIFIERLOOSE]})\\.`+`(${d[b.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${d[b.NONNUMERICIDENTIFIER]}|${d[b.NUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${d[b.NONNUMERICIDENTIFIER]}|${d[b.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASE",`(?:-(${d[b.PRERELEASEIDENTIFIER]}(?:\\.${d[b.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${d[b.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${d[b.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER",`${M}+`);createToken("BUILD",`(?:\\+(${d[b.BUILDIDENTIFIER]}(?:\\.${d[b.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${d[b.MAINVERSION]}${d[b.PRERELEASE]}?${d[b.BUILD]}?`);createToken("FULL",`^${d[b.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${d[b.MAINVERSIONLOOSE]}${d[b.PRERELEASELOOSE]}?${d[b.BUILD]}?`);createToken("LOOSE",`^${d[b.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${d[b.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${d[b.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${d[b.XRANGEIDENTIFIER]})`+`(?:\\.(${d[b.XRANGEIDENTIFIER]})`+`(?:\\.(${d[b.XRANGEIDENTIFIER]})`+`(?:${d[b.PRERELEASE]})?${d[b.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${d[b.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${d[b.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${d[b.XRANGEIDENTIFIERLOOSE]})`+`(?:${d[b.PRERELEASELOOSE]})?${d[b.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${d[b.GTLT]}\\s*${d[b.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${d[b.GTLT]}\\s*${d[b.XRANGEPLAINLOOSE]}$`);createToken("COERCEPLAIN",`${"(^|[^\\d])"+"(\\d{1,"}${i}})`+`(?:\\.(\\d{1,${i}}))?`+`(?:\\.(\\d{1,${i}}))?`);createToken("COERCE",`${d[b.COERCEPLAIN]}(?:$|[^\\d])`);createToken("COERCEFULL",d[b.COERCEPLAIN]+`(?:${d[b.PRERELEASE]})?`+`(?:${d[b.BUILD]})?`+`(?:$|[^\\d])`);createToken("COERCERTL",d[b.COERCE],true);createToken("COERCERTLFULL",d[b.COERCEFULL],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${d[b.LONETILDE]}\\s+`,true);r.tildeTrimReplace="$1~";createToken("TILDE",`^${d[b.LONETILDE]}${d[b.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${d[b.LONETILDE]}${d[b.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${d[b.LONECARET]}\\s+`,true);r.caretTrimReplace="$1^";createToken("CARET",`^${d[b.LONECARET]}${d[b.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${d[b.LONECARET]}${d[b.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${d[b.GTLT]}\\s*(${d[b.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${d[b.GTLT]}\\s*(${d[b.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${d[b.GTLT]}\\s*(${d[b.LOOSEPLAIN]}|${d[b.XRANGEPLAIN]})`,true);r.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${d[b.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${d[b.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${d[b.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${d[b.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},52915:(t,r,o)=>{const i=o(39955);const gtr=(t,r,o)=>i(t,r,">",o);t.exports=gtr},27116:(t,r,o)=>{const i=o(54535);const intersects=(t,r,o)=>{t=new i(t,o);r=new i(r,o);return t.intersects(r,o)};t.exports=intersects},31102:(t,r,o)=>{const i=o(39955);const ltr=(t,r,o)=>i(t,r,"<",o);t.exports=ltr},13036:(t,r,o)=>{const i=o(86644);const a=o(54535);const maxSatisfying=(t,r,o)=>{let c=null;let p=null;let u=null;try{u=new a(r,o)}catch(t){return null}t.forEach((t=>{if(u.test(t)){if(!c||p.compare(t)===-1){c=t;p=new i(c,o)}}}));return c};t.exports=maxSatisfying},27534:(t,r,o)=>{const i=o(86644);const a=o(54535);const minSatisfying=(t,r,o)=>{let c=null;let p=null;let u=null;try{u=new a(r,o)}catch(t){return null}t.forEach((t=>{if(u.test(t)){if(!c||p.compare(t)===1){c=t;p=new i(c,o)}}}));return c};t.exports=minSatisfying},19725:(t,r,o)=>{const i=o(86644);const a=o(54535);const c=o(83740);const minVersion=(t,r)=>{t=new a(t,r);let o=new i("0.0.0");if(t.test(o)){return o}o=new i("0.0.0-0");if(t.test(o)){return o}o=null;for(let r=0;r{const r=new i(t.semver.version);switch(t.operator){case">":if(r.prerelease.length===0){r.patch++}else{r.prerelease.push(0)}r.raw=r.format();case"":case">=":if(!p||c(r,p)){p=r}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}}));if(p&&(!o||c(o,p))){o=p}}if(o&&t.test(o)){return o}return null};t.exports=minVersion},39955:(t,r,o)=>{const i=o(86644);const a=o(37712);const{ANY:c}=a;const p=o(54535);const u=o(96326);const l=o(83740);const d=o(72115);const A=o(79824);const b=o(96297);const outside=(t,r,o,h)=>{t=new i(t,h);r=new p(r,h);let M,g,z,O,y;switch(o){case">":M=l;g=A;z=d;O=">";y=">=";break;case"<":M=d;g=b;z=l;O="<";y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(u(t,r,h)){return false}for(let o=0;o{if(t.semver===c){t=new a(">=0.0.0")}p=p||t;u=u||t;if(M(t.semver,p.semver,h)){p=t}else if(z(t.semver,u.semver,h)){u=t}}));if(p.operator===O||p.operator===y){return false}if((!u.operator||u.operator===O)&&g(t,u.semver)){return false}else if(u.operator===y&&z(t,u.semver)){return false}}return true};t.exports=outside},36077:(t,r,o)=>{const i=o(96326);const a=o(11136);t.exports=(t,r,o)=>{const c=[];let p=null;let u=null;const l=t.sort(((t,r)=>a(t,r,o)));for(const t of l){const a=i(t,r,o);if(a){u=t;if(!p){p=t}}else{if(u){c.push([p,u])}u=null;p=null}}if(p){c.push([p,null])}const d=[];for(const[t,r]of c){if(t===r){d.push(t)}else if(!r&&t===l[0]){d.push("*")}else if(!r){d.push(`>=${t}`)}else if(t===l[0]){d.push(`<=${r}`)}else{d.push(`${t} - ${r}`)}}const A=d.join(" || ");const b=typeof r.raw==="string"?r.raw:String(r);return A.length{const i=o(54535);const a=o(37712);const{ANY:c}=a;const p=o(96326);const u=o(11136);const subset=(t,r,o={})=>{if(t===r){return true}t=new i(t,o);r=new i(r,o);let a=false;e:for(const i of t.set){for(const t of r.set){const r=simpleSubset(i,t,o);a=a||r!==null;if(r){continue e}}if(a){return false}}return true};const l=[new a(">=0.0.0-0")];const d=[new a(">=0.0.0")];const simpleSubset=(t,r,o)=>{if(t===r){return true}if(t.length===1&&t[0].semver===c){if(r.length===1&&r[0].semver===c){return true}else if(o.includePrerelease){t=l}else{t=d}}if(r.length===1&&r[0].semver===c){if(o.includePrerelease){return true}else{r=d}}const i=new Set;let a,A;for(const r of t){if(r.operator===">"||r.operator===">="){a=higherGT(a,r,o)}else if(r.operator==="<"||r.operator==="<="){A=lowerLT(A,r,o)}else{i.add(r.semver)}}if(i.size>1){return null}let b;if(a&&A){b=u(a.semver,A.semver,o);if(b>0){return null}else if(b===0&&(a.operator!==">="||A.operator!=="<=")){return null}}for(const t of i){if(a&&!p(t,String(a),o)){return null}if(A&&!p(t,String(A),o)){return null}for(const i of r){if(!p(t,String(i),o)){return false}}return true}let h,M;let g,z;let O=A&&!o.includePrerelease&&A.semver.prerelease.length?A.semver:false;let y=a&&!o.includePrerelease&&a.semver.prerelease.length?a.semver:false;if(O&&O.prerelease.length===1&&A.operator==="<"&&O.prerelease[0]===0){O=false}for(const t of r){z=z||t.operator===">"||t.operator===">=";g=g||t.operator==="<"||t.operator==="<=";if(a){if(y){if(t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===y.major&&t.semver.minor===y.minor&&t.semver.patch===y.patch){y=false}}if(t.operator===">"||t.operator===">="){h=higherGT(a,t,o);if(h===t&&h!==a){return false}}else if(a.operator===">="&&!p(a.semver,String(t),o)){return false}}if(A){if(O){if(t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===O.major&&t.semver.minor===O.minor&&t.semver.patch===O.patch){O=false}}if(t.operator==="<"||t.operator==="<="){M=lowerLT(A,t,o);if(M===t&&M!==A){return false}}else if(A.operator==="<="&&!p(A.semver,String(t),o)){return false}}if(!t.operator&&(A||a)&&b!==0){return false}}if(a&&g&&!A&&b!==0){return false}if(A&&z&&!a&&b!==0){return false}if(y||O){return false}return true};const higherGT=(t,r,o)=>{if(!t){return r}const i=u(t.semver,r.semver,o);return i>0?t:i<0?r:r.operator===">"&&t.operator===">="?r:t};const lowerLT=(t,r,o)=>{if(!t){return r}const i=u(t.semver,r.semver,o);return i<0?t:i>0?r:r.operator==="<"&&t.operator==="<="?r:t};t.exports=subset},67583:(t,r,o)=>{const i=o(54535);const toComparators=(t,r)=>new i(t,r).set.map((t=>t.map((t=>t.value)).join(" ").trim().split(" ")));t.exports=toComparators},19282:(t,r,o)=>{const i=o(54535);const validRange=(t,r)=>{try{return new i(t,r).range||"*"}catch(t){return null}};t.exports=validRange},15862:(t,r,o)=>{var i;i={value:true};var a=o(45004);var c=o(81391);var p=o(7132);const u=a.createClientLogger("core-lro");const l=2e3;const d=["succeeded","canceled","failed"];function deserializeState(t){try{return JSON.parse(t).state}catch(r){throw new Error(`Unable to deserialize input state: ${t}`)}}function setStateError(t){const{state:r,stateProxy:o,isOperationError:i}=t;return t=>{if(i(t)){o.setError(r,t);o.setFailed(r)}throw t}}function appendReadableErrorMessage(t,r){let o=t;if(o.slice(-1)!=="."){o=o+"."}return o+" "+r}function simplifyError(t){let r=t.message;let o=t.code;let i=t;while(i.innererror){i=i.innererror;o=i.code;r=appendReadableErrorMessage(r,i.message)}return{code:o,message:r}}function processOperationStatus(t){const{state:r,stateProxy:o,status:i,isDone:a,processResult:c,getError:p,response:l,setErrorAsResult:d}=t;switch(i){case"succeeded":{o.setSucceeded(r);break}case"failed":{const t=p===null||p===void 0?void 0:p(l);let i="";if(t){const{code:r,message:o}=simplifyError(t);i=`. ${r}. ${o}`}const a=`The long-running operation has failed${i}`;o.setError(r,new Error(a));o.setFailed(r);u.warning(a);break}case"canceled":{o.setCanceled(r);break}}if((a===null||a===void 0?void 0:a(l,r))||a===undefined&&["succeeded","canceled"].concat(d?[]:["failed"]).includes(i)){o.setResult(r,buildResult({response:l,state:r,processResult:c}))}}function buildResult(t){const{processResult:r,response:o,state:i}=t;return r?r(o,i):o}async function initOperation(t){const{init:r,stateProxy:o,processResult:i,getOperationStatus:a,withOperationLocation:c,setErrorAsResult:p}=t;const{operationLocation:l,resourceLocation:d,metadata:A,response:b}=await r();if(l)c===null||c===void 0?void 0:c(l,false);const h={metadata:A,operationLocation:l,resourceLocation:d};u.verbose(`LRO: Operation description:`,h);const M=o.initState(h);const g=a({response:b,state:M,operationLocation:l});processOperationStatus({state:M,status:g,stateProxy:o,response:b,setErrorAsResult:p,processResult:i});return M}async function pollOperationHelper(t){const{poll:r,state:o,stateProxy:i,operationLocation:a,getOperationStatus:c,getResourceLocation:p,isOperationError:l,options:A}=t;const b=await r(a,A).catch(setStateError({state:o,stateProxy:i,isOperationError:l}));const h=c(b,o);u.verbose(`LRO: Status:\n\tPolling from: ${o.config.operationLocation}\n\tOperation status: ${h}\n\tPolling status: ${d.includes(h)?"Stopped":"Running"}`);if(h==="succeeded"){const t=p(b,o);if(t!==undefined){return{response:await r(t).catch(setStateError({state:o,stateProxy:i,isOperationError:l})),status:h}}}return{response:b,status:h}}async function pollOperation(t){const{poll:r,state:o,stateProxy:i,options:a,getOperationStatus:c,getResourceLocation:p,getOperationLocation:u,isOperationError:l,withOperationLocation:A,getPollingInterval:b,processResult:h,getError:M,updateState:g,setDelay:z,isDone:O,setErrorAsResult:y}=t;const{operationLocation:C}=o.config;if(C!==undefined){const{response:t,status:B}=await pollOperationHelper({poll:r,getOperationStatus:c,state:o,stateProxy:i,operationLocation:C,getResourceLocation:p,isOperationError:l,options:a});processOperationStatus({status:B,response:t,state:o,stateProxy:i,isDone:O,processResult:h,getError:M,setErrorAsResult:y});if(!d.includes(B)){const r=b===null||b===void 0?void 0:b(t);if(r)z(r);const i=u===null||u===void 0?void 0:u(t,o);if(i!==undefined){const t=C!==i;o.config.operationLocation=i;A===null||A===void 0?void 0:A(i,t)}else A===null||A===void 0?void 0:A(C,false)}g===null||g===void 0?void 0:g(o,t)}}function getOperationLocationPollingUrl(t){const{azureAsyncOperation:r,operationLocation:o}=t;return o!==null&&o!==void 0?o:r}function getLocationHeader(t){return t.headers["location"]}function getOperationLocationHeader(t){return t.headers["operation-location"]}function getAzureAsyncOperationHeader(t){return t.headers["azure-asyncoperation"]}function findResourceLocation(t){var r;const{location:o,requestMethod:i,requestPath:a,resourceLocationConfig:c}=t;switch(i){case"PUT":{return a}case"DELETE":{return undefined}case"PATCH":{return(r=getDefault())!==null&&r!==void 0?r:a}default:{return getDefault()}}function getDefault(){switch(c){case"azure-async-operation":{return undefined}case"original-uri":{return a}case"location":default:{return o}}}}function inferLroMode(t){const{rawResponse:r,requestMethod:o,requestPath:i,resourceLocationConfig:a}=t;const c=getOperationLocationHeader(r);const p=getAzureAsyncOperationHeader(r);const u=getOperationLocationPollingUrl({operationLocation:c,azureAsyncOperation:p});const l=getLocationHeader(r);const d=o===null||o===void 0?void 0:o.toLocaleUpperCase();if(u!==undefined){return{mode:"OperationLocation",operationLocation:u,resourceLocation:findResourceLocation({requestMethod:d,location:l,requestPath:i,resourceLocationConfig:a})}}else if(l!==undefined){return{mode:"ResourceLocation",operationLocation:l}}else if(d==="PUT"&&i){return{mode:"Body",operationLocation:i}}else{return undefined}}function transformStatus(t){const{status:r,statusCode:o}=t;if(typeof r!=="string"&&r!==undefined){throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${r}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`)}switch(r===null||r===void 0?void 0:r.toLocaleLowerCase()){case undefined:return toOperationStatus(o);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:{u.verbose(`LRO: unrecognized operation status: ${r}`);return r}}}function getStatus(t){var r;const{status:o}=(r=t.body)!==null&&r!==void 0?r:{};return transformStatus({status:o,statusCode:t.statusCode})}function getProvisioningState(t){var r,o;const{properties:i,provisioningState:a}=(r=t.body)!==null&&r!==void 0?r:{};const c=(o=i===null||i===void 0?void 0:i.provisioningState)!==null&&o!==void 0?o:a;return transformStatus({status:c,statusCode:t.statusCode})}function toOperationStatus(t){if(t===202){return"running"}else if(t<300){return"succeeded"}else{return"failed"}}function parseRetryAfter({rawResponse:t}){const r=t.headers["retry-after"];if(r!==undefined){const t=parseInt(r);return isNaN(t)?calculatePollingIntervalFromDate(new Date(r)):t*1e3}return undefined}function getErrorFromResponse(t){const r=t.flatResponse.error;if(!r){u.warning(`The long-running operation failed but there is no error property in the response's body`);return}if(!r.code||!r.message){u.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`);return}return r}function calculatePollingIntervalFromDate(t){const r=Math.floor((new Date).getTime());const o=t.getTime();if(r{const t=await a.sendInitialRequest();const r=inferLroMode({rawResponse:t.rawResponse,requestPath:a.requestPath,requestMethod:a.requestMethod,resourceLocationConfig:o});return Object.assign({response:t,operationLocation:r===null||r===void 0?void 0:r.operationLocation,resourceLocation:r===null||r===void 0?void 0:r.resourceLocation},(r===null||r===void 0?void 0:r.mode)?{metadata:{mode:r.mode}}:{})},stateProxy:r,processResult:i?({flatResponse:t},r)=>i(t,r):({flatResponse:t})=>t,getOperationStatus:getStatusFromInitialResponse,setErrorAsResult:c})}function getOperationLocation({rawResponse:t},r){var o;const i=(o=r.config.metadata)===null||o===void 0?void 0:o["mode"];switch(i){case"OperationLocation":{return getOperationLocationPollingUrl({operationLocation:getOperationLocationHeader(t),azureAsyncOperation:getAzureAsyncOperationHeader(t)})}case"ResourceLocation":{return getLocationHeader(t)}case"Body":default:{return undefined}}}function getOperationStatus({rawResponse:t},r){var o;const i=(o=r.config.metadata)===null||o===void 0?void 0:o["mode"];switch(i){case"OperationLocation":{return getStatus(t)}case"ResourceLocation":{return toOperationStatus(t.statusCode)}case"Body":{return getProvisioningState(t)}default:throw new Error(`Internal error: Unexpected operation mode: ${i}`)}}function getResourceLocation({flatResponse:t},r){if(typeof t==="object"){const o=t.resourceLocation;if(o!==undefined){r.config.resourceLocation=o}}return r.config.resourceLocation}function isOperationError(t){return t.name==="RestError"}async function pollHttpOperation(t){const{lro:r,stateProxy:o,options:i,processResult:a,updateState:c,setDelay:p,state:u,setErrorAsResult:l}=t;return pollOperation({state:u,stateProxy:o,setDelay:p,processResult:a?({flatResponse:t},r)=>a(t,r):({flatResponse:t})=>t,getError:getErrorFromResponse,updateState:c,getPollingInterval:parseRetryAfter,getOperationLocation:getOperationLocation,getOperationStatus:getOperationStatus,isOperationError:isOperationError,getResourceLocation:getResourceLocation,options:i,poll:async(t,o)=>r.sendPollRequest(t,o),setErrorAsResult:l})}const createStateProxy$1=()=>({initState:t=>({status:"running",config:t}),setCanceled:t=>t.status="canceled",setError:(t,r)=>t.error=r,setResult:(t,r)=>t.result=r,setRunning:t=>t.status="running",setSucceeded:t=>t.status="succeeded",setFailed:t=>t.status="failed",getError:t=>t.error,getResult:t=>t.result,isCanceled:t=>t.status==="canceled",isFailed:t=>t.status==="failed",isRunning:t=>t.status==="running",isSucceeded:t=>t.status==="succeeded"});function buildCreatePoller(t){const{getOperationLocation:r,getStatusFromInitialResponse:o,getStatusFromPollResponse:i,isOperationError:a,getResourceLocation:u,getPollingInterval:d,getError:A,resolveOnUnsuccessful:b}=t;return async({init:t,poll:h},M)=>{const{processResult:g,updateState:z,withOperationLocation:O,intervalInMs:y=l,restoreFrom:C}=M||{};const B=createStateProxy$1();const I=O?(()=>{let t=false;return(r,o)=>{if(o)O(r);else if(!t)O(r);t=true}})():undefined;const R=C?deserializeState(C):await initOperation({init:t,stateProxy:B,processResult:g,getOperationStatus:o,withOperationLocation:I,setErrorAsResult:!b});let S;const q=new c.AbortController;const w=new Map;const handleProgressEvents=async()=>w.forEach((t=>t(R)));const N="Operation was canceled";let v=y;const T={getOperationState:()=>R,getResult:()=>R.result,isDone:()=>["succeeded","failed","canceled"].includes(R.status),isStopped:()=>S===undefined,stopPolling:()=>{q.abort()},toString:()=>JSON.stringify({state:R}),onProgress:t=>{const r=Symbol();w.set(r,t);return()=>w.delete(r)},pollUntilDone:t=>S!==null&&S!==void 0?S:S=(async()=>{const{abortSignal:r}=t||{};const{signal:o}=r?new c.AbortController([r,q.signal]):q;if(!T.isDone()){await T.poll({abortSignal:o});while(!T.isDone()){await p.delay(v,{abortSignal:o});await T.poll({abortSignal:o})}}if(b){return T.getResult()}else{switch(R.status){case"succeeded":return T.getResult();case"canceled":throw new Error(N);case"failed":throw R.error;case"notStarted":case"running":throw new Error(`Polling completed without succeeding or failing`)}}})().finally((()=>{S=undefined})),async poll(t){if(b){if(T.isDone())return}else{switch(R.status){case"succeeded":return;case"canceled":throw new Error(N);case"failed":throw R.error}}await pollOperation({poll:h,state:R,stateProxy:B,getOperationLocation:r,isOperationError:a,withOperationLocation:I,getPollingInterval:d,getOperationStatus:i,getResourceLocation:u,processResult:g,getError:A,updateState:z,options:t,setDelay:t=>{v=t},setErrorAsResult:!b});await handleProgressEvents();if(!b){switch(R.status){case"canceled":throw new Error(N);case"failed":throw R.error}}}};return T}}async function createHttpPoller(t,r){const{resourceLocationConfig:o,intervalInMs:i,processResult:a,restoreFrom:c,updateState:p,withOperationLocation:u,resolveOnUnsuccessful:l=false}=r||{};return buildCreatePoller({getStatusFromInitialResponse:getStatusFromInitialResponse,getStatusFromPollResponse:getOperationStatus,isOperationError:isOperationError,getOperationLocation:getOperationLocation,getResourceLocation:getResourceLocation,getPollingInterval:parseRetryAfter,getError:getErrorFromResponse,resolveOnUnsuccessful:l})({init:async()=>{const r=await t.sendInitialRequest();const i=inferLroMode({rawResponse:r.rawResponse,requestPath:t.requestPath,requestMethod:t.requestMethod,resourceLocationConfig:o});return Object.assign({response:r,operationLocation:i===null||i===void 0?void 0:i.operationLocation,resourceLocation:i===null||i===void 0?void 0:i.resourceLocation},(i===null||i===void 0?void 0:i.mode)?{metadata:{mode:i.mode}}:{})},poll:t.sendPollRequest},{intervalInMs:i,withOperationLocation:u,restoreFrom:c,updateState:p,processResult:a?({flatResponse:t},r)=>a(t,r):({flatResponse:t})=>t})}const createStateProxy=()=>({initState:t=>({config:t,isStarted:true}),setCanceled:t=>t.isCancelled=true,setError:(t,r)=>t.error=r,setResult:(t,r)=>t.result=r,setRunning:t=>t.isStarted=true,setSucceeded:t=>t.isCompleted=true,setFailed:()=>{},getError:t=>t.error,getResult:t=>t.result,isCanceled:t=>!!t.isCancelled,isFailed:t=>!!t.error,isRunning:t=>!!t.isStarted,isSucceeded:t=>Boolean(t.isCompleted&&!t.isCancelled&&!t.error)});class GenericPollOperation{constructor(t,r,o,i,a,c,p){this.state=t;this.lro=r;this.setErrorAsResult=o;this.lroResourceLocationConfig=i;this.processResult=a;this.updateState=c;this.isDone=p}setPollerConfig(t){this.pollerConfig=t}async update(t){var r;const o=createStateProxy();if(!this.state.isStarted){this.state=Object.assign(Object.assign({},this.state),await initHttpOperation({lro:this.lro,stateProxy:o,resourceLocationConfig:this.lroResourceLocationConfig,processResult:this.processResult,setErrorAsResult:this.setErrorAsResult}))}const i=this.updateState;const a=this.isDone;if(!this.state.isCompleted&&this.state.error===undefined){await pollHttpOperation({lro:this.lro,state:this.state,stateProxy:o,processResult:this.processResult,updateState:i?(t,{rawResponse:r})=>i(t,r):undefined,isDone:a?({flatResponse:t},r)=>a(t,r):undefined,options:t,setDelay:t=>{this.pollerConfig.intervalInMs=t},setErrorAsResult:this.setErrorAsResult})}(r=t===null||t===void 0?void 0:t.fireProgress)===null||r===void 0?void 0:r.call(t,this.state);return this}async cancel(){u.error("`cancelOperation` is deprecated because it wasn't implemented");return this}toString(){return JSON.stringify({state:this.state})}}class PollerStoppedError extends Error{constructor(t){super(t);this.name="PollerStoppedError";Object.setPrototypeOf(this,PollerStoppedError.prototype)}}class PollerCancelledError extends Error{constructor(t){super(t);this.name="PollerCancelledError";Object.setPrototypeOf(this,PollerCancelledError.prototype)}}class Poller{constructor(t){this.resolveOnUnsuccessful=false;this.stopped=true;this.pollProgressCallbacks=[];this.operation=t;this.promise=new Promise(((t,r)=>{this.resolve=t;this.reject=r}));this.promise.catch((()=>{}))}async startPolling(t={}){if(this.stopped){this.stopped=false}while(!this.isStopped()&&!this.isDone()){await this.poll(t);await this.delay()}}async pollOnce(t={}){if(!this.isDone()){this.operation=await this.operation.update({abortSignal:t.abortSignal,fireProgress:this.fireProgress.bind(this)})}this.processUpdatedState()}fireProgress(t){for(const r of this.pollProgressCallbacks){r(t)}}async cancelOnce(t={}){this.operation=await this.operation.cancel(t)}poll(t={}){if(!this.pollOncePromise){this.pollOncePromise=this.pollOnce(t);const clearPollOncePromise=()=>{this.pollOncePromise=undefined};this.pollOncePromise.then(clearPollOncePromise,clearPollOncePromise).catch(this.reject)}return this.pollOncePromise}processUpdatedState(){if(this.operation.state.error){this.stopped=true;if(!this.resolveOnUnsuccessful){this.reject(this.operation.state.error);throw this.operation.state.error}}if(this.operation.state.isCancelled){this.stopped=true;if(!this.resolveOnUnsuccessful){const t=new PollerCancelledError("Operation was canceled");this.reject(t);throw t}}if(this.isDone()&&this.resolve){this.resolve(this.getResult())}}async pollUntilDone(t={}){if(this.stopped){this.startPolling(t).catch(this.reject)}this.processUpdatedState();return this.promise}onProgress(t){this.pollProgressCallbacks.push(t);return()=>{this.pollProgressCallbacks=this.pollProgressCallbacks.filter((r=>r!==t))}}isDone(){const t=this.operation.state;return Boolean(t.isCompleted||t.isCancelled||t.error)}stopPolling(){if(!this.stopped){this.stopped=true;if(this.reject){this.reject(new PollerStoppedError("This poller is already stopped"))}}}isStopped(){return this.stopped}cancelOperation(t={}){if(!this.cancelPromise){this.cancelPromise=this.cancelOnce(t)}else if(t.abortSignal){throw new Error("A cancel request is currently pending")}return this.cancelPromise}getOperationState(){return this.operation.state}getResult(){const t=this.operation.state;return t.result}toString(){return this.operation.toString()}}class LroEngine extends Poller{constructor(t,r){const{intervalInMs:o=l,resumeFrom:i,resolveOnUnsuccessful:a=false,isDone:c,lroResourceLocationConfig:p,processResult:u,updateState:d}=r||{};const A=i?deserializeState(i):{};const b=new GenericPollOperation(A,t,!a,p,u,d,c);super(b);this.resolveOnUnsuccessful=a;this.config={intervalInMs:o};b.setPollerConfig(this.config)}delay(){return new Promise((t=>setTimeout((()=>t()),this.config.intervalInMs)))}}i=LroEngine;r.vu=Poller;i=PollerCancelledError;i=PollerStoppedError;i=createHttpPoller},81391:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});const o=new WeakMap;const i=new WeakMap;class AbortSignal{constructor(){this.onabort=null;o.set(this,[]);i.set(this,false)}get aborted(){if(!i.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}return i.get(this)}static get none(){return new AbortSignal}addEventListener(t,r){if(!o.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const i=o.get(this);i.push(r)}removeEventListener(t,r){if(!o.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const i=o.get(this);const a=i.indexOf(r);if(a>-1){i.splice(a,1)}}dispatchEvent(t){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}}function abortSignal(t){if(t.aborted){return}if(t.onabort){t.onabort.call(t)}const r=o.get(t);if(r){r.slice().forEach((r=>{r.call(t,{type:"abort"})}))}i.set(t,true)}class AbortError extends Error{constructor(t){super(t);this.name="AbortError"}}class AbortController{constructor(t){this._signal=new AbortSignal;if(!t){return}if(!Array.isArray(t)){t=arguments}for(const r of t){if(r.aborted){this.abort()}else{r.addEventListener("abort",(()=>{this.abort()}))}}}get signal(){return this._signal}abort(){abortSignal(this._signal)}static timeout(t){const r=new AbortSignal;const o=setTimeout(abortSignal,t,r);if(typeof o.unref==="function"){o.unref()}return r}}r.AbortController=AbortController;r.AbortError=AbortError;r.AbortSignal=AbortSignal},7132:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});var i=o(81391);var a=o(76982);function createAbortablePromise(t,r){const{cleanupBeforeAbort:o,abortSignal:a,abortErrorMsg:c}=r!==null&&r!==void 0?r:{};return new Promise(((r,p)=>{function rejectOnAbort(){p(new i.AbortError(c!==null&&c!==void 0?c:"The operation was aborted."))}function removeListeners(){a===null||a===void 0?void 0:a.removeEventListener("abort",onAbort)}function onAbort(){o===null||o===void 0?void 0:o();removeListeners();rejectOnAbort()}if(a===null||a===void 0?void 0:a.aborted){return rejectOnAbort()}try{t((t=>{removeListeners();r(t)}),(t=>{removeListeners();p(t)}))}catch(t){p(t)}a===null||a===void 0?void 0:a.addEventListener("abort",onAbort)}))}const c="The delay was aborted.";function delay(t,r){let o;const{abortSignal:i,abortErrorMsg:a}=r!==null&&r!==void 0?r:{};return createAbortablePromise((r=>{o=setTimeout(r,t)}),{cleanupBeforeAbort:()=>clearTimeout(o),abortSignal:i,abortErrorMsg:a!==null&&a!==void 0?a:c})}function getRandomIntegerInclusive(t,r){t=Math.ceil(t);r=Math.floor(r);const o=Math.floor(Math.random()*(r-t+1));return o+t}function isObject(t){return typeof t==="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}function isError(t){if(isObject(t)){const r=typeof t.name==="string";const o=typeof t.message==="string";return r&&o}return false}function getErrorMessage(t){if(isError(t)){return t.message}else{let r;try{if(typeof t==="object"&&t){r=JSON.stringify(t)}else{r=String(t)}}catch(t){r="[unable to stringify input]"}return`Unknown error ${r}`}}async function computeSha256Hmac(t,r,o){const i=Buffer.from(t,"base64");return a.createHmac("sha256",i).update(r).digest(o)}async function computeSha256Hash(t,r){return a.createHash("sha256").update(t).digest(r)}function isDefined(t){return typeof t!=="undefined"&&t!==null}function isObjectWithProperties(t,r){if(!isDefined(t)||typeof t!=="object"){return false}for(const o of r){if(!objectHasProperty(t,o)){return false}}return true}function objectHasProperty(t,r){return isDefined(t)&&typeof t==="object"&&r in t}function generateUUID(){let t="";for(let r=0;r<32;r++){const o=Math.floor(Math.random()*16);if(r===12){t+="4"}else if(r===16){t+=o&3|8}else{t+=o.toString(16)}if(r===7||r===11||r===15||r===19){t+="-"}}return t}var p;let u=typeof((p=globalThis===null||globalThis===void 0?void 0:globalThis.crypto)===null||p===void 0?void 0:p.randomUUID)==="function"?globalThis.crypto.randomUUID.bind(globalThis.crypto):a.randomUUID;if(!u){u=generateUUID}function randomUUID(){return u()}var l,d,A,b;const h=typeof window!=="undefined"&&typeof window.document!=="undefined";const M=typeof self==="object"&&typeof(self===null||self===void 0?void 0:self.importScripts)==="function"&&(((l=self.constructor)===null||l===void 0?void 0:l.name)==="DedicatedWorkerGlobalScope"||((d=self.constructor)===null||d===void 0?void 0:d.name)==="ServiceWorkerGlobalScope"||((A=self.constructor)===null||A===void 0?void 0:A.name)==="SharedWorkerGlobalScope");const g=typeof process!=="undefined"&&Boolean(process.version)&&Boolean((b=process.versions)===null||b===void 0?void 0:b.node);const z=typeof Deno!=="undefined"&&typeof Deno.version!=="undefined"&&typeof Deno.version.deno!=="undefined";const O=typeof Bun!=="undefined"&&typeof Bun.version!=="undefined";const y=typeof navigator!=="undefined"&&(navigator===null||navigator===void 0?void 0:navigator.product)==="ReactNative";function uint8ArrayToString(t,r){switch(r){case"utf-8":return uint8ArrayToUtf8String(t);case"base64":return uint8ArrayToBase64(t);case"base64url":return uint8ArrayToBase64Url(t)}}function stringToUint8Array(t,r){switch(r){case"utf-8":return utf8StringToUint8Array(t);case"base64":return base64ToUint8Array(t);case"base64url":return base64UrlToUint8Array(t)}}function uint8ArrayToBase64(t){return Buffer.from(t).toString("base64")}function uint8ArrayToBase64Url(t){return Buffer.from(t).toString("base64url")}function uint8ArrayToUtf8String(t){return Buffer.from(t).toString("utf-8")}function utf8StringToUint8Array(t){return Buffer.from(t)}function base64ToUint8Array(t){return Buffer.from(t,"base64")}function base64UrlToUint8Array(t){return Buffer.from(t,"base64url")}r.computeSha256Hash=computeSha256Hash;r.computeSha256Hmac=computeSha256Hmac;r.createAbortablePromise=createAbortablePromise;r.delay=delay;r.getErrorMessage=getErrorMessage;r.getRandomIntegerInclusive=getRandomIntegerInclusive;r.isBrowser=h;r.isBun=O;r.isDefined=isDefined;r.isDeno=z;r.isError=isError;r.isNode=g;r.isObject=isObject;r.isObjectWithProperties=isObjectWithProperties;r.isReactNative=y;r.isWebWorker=M;r.objectHasProperty=objectHasProperty;r.randomUUID=randomUUID;r.stringToUint8Array=stringToUint8Array;r.uint8ArrayToString=uint8ArrayToString},45004:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});var i=o(70857);var a=o(39023);function _interopDefaultLegacy(t){return t&&typeof t==="object"&&"default"in t?t:{default:t}}var c=_interopDefaultLegacy(a);function log(t,...r){process.stderr.write(`${c["default"].format(t,...r)}${i.EOL}`)}const p=typeof process!=="undefined"&&process.env&&process.env.DEBUG||undefined;let u;let l=[];let d=[];const A=[];if(p){enable(p)}const b=Object.assign((t=>createDebugger(t)),{enable:enable,enabled:enabled,disable:disable,log:log});function enable(t){u=t;l=[];d=[];const r=/\*/g;const o=t.split(",").map((t=>t.trim().replace(r,".*?")));for(const t of o){if(t.startsWith("-")){d.push(new RegExp(`^${t.substr(1)}$`))}else{l.push(new RegExp(`^${t}$`))}}for(const t of A){t.enabled=enabled(t.namespace)}}function enabled(t){if(t.endsWith("*")){return true}for(const r of d){if(r.test(t)){return false}}for(const r of l){if(r.test(t)){return true}}return false}function disable(){const t=u||"";enable("");return t}function createDebugger(t){const r=Object.assign(debug,{enabled:enabled(t),destroy:destroy,log:b.log,namespace:t,extend:extend});function debug(...o){if(!r.enabled){return}if(o.length>0){o[0]=`${t} ${o[0]}`}r.log(...o)}A.push(r);return r}function destroy(){const t=A.indexOf(this);if(t>=0){A.splice(t,1);return true}return false}function extend(t){const r=createDebugger(`${this.namespace}:${t}`);r.log=this.log;return r}var h=b;const M=new Set;const g=typeof process!=="undefined"&&process.env&&process.env.AZURE_LOG_LEVEL||undefined;let z;const O=h("azure");O.log=(...t)=>{h.log(...t)};const y=["verbose","info","warning","error"];if(g){if(isAzureLogLevel(g)){setLogLevel(g)}else{console.error(`AZURE_LOG_LEVEL set to unknown log level '${g}'; logging is not enabled. Acceptable values: ${y.join(", ")}.`)}}function setLogLevel(t){if(t&&!isAzureLogLevel(t)){throw new Error(`Unknown log level '${t}'. Acceptable values: ${y.join(",")}`)}z=t;const r=[];for(const t of M){if(shouldEnable(t)){r.push(t.namespace)}}h.enable(r.join(","))}function getLogLevel(){return z}const C={verbose:400,info:300,warning:200,error:100};function createClientLogger(t){const r=O.extend(t);patchLogMethod(O,r);return{error:createLogger(r,"error"),warning:createLogger(r,"warning"),info:createLogger(r,"info"),verbose:createLogger(r,"verbose")}}function patchLogMethod(t,r){r.log=(...r)=>{t.log(...r)}}function createLogger(t,r){const o=Object.assign(t.extend(r),{level:r});patchLogMethod(t,o);if(shouldEnable(o)){const t=h.disable();h.enable(t+","+o.namespace)}M.add(o);return o}function shouldEnable(t){return Boolean(z&&C[t.level]<=C[z])}function isAzureLogLevel(t){return y.includes(t)}r.AzureLogger=O;r.createClientLogger=createClientLogger;r.getLogLevel=getLogLevel;r.setLogLevel=setLogLevel},87721:(t,r,o)=>{const i=o(69278);const a=o(64756);const{once:c}=o(24434);const p=o(16460);const{normalizeOptions:u,cacheOptions:l}=o(46329);const{getProxy:d,getProxyAgent:A,proxyCache:b}=o(3799);const h=o(60260);const{Agent:M}=o(98894);t.exports=class Agent extends M{#e;#t;#r;#n;#s;constructor(t={}){const{timeouts:r,proxy:o,noProxy:i,...a}=u(t);super(a);this.#e=a;this.#t=r;if(o){this.#r=new URL(o);this.#n=i;this.#s=A(o)}}get proxy(){return this.#r?{url:this.#r}:{}}#o(t){if(!this.#r){return}const r=d(`${t.protocol}//${t.host}:${t.port}`,{proxy:this.#r,noProxy:this.#n});if(!r){return}const o=l({...t,...this.#e,timeouts:this.#t,proxy:r});if(b.has(o)){return b.get(o)}let i=this.#s;if(Array.isArray(i)){i=this.isSecureEndpoint(t)?i[1]:i[0]}const a=new i(r,{...this.#e,socketOptions:{family:this.#e.family}});b.set(o,a);return a}async#i({promises:t,options:r,timeout:o},i=new AbortController){if(o){const a=p.setTimeout(o,null,{signal:i.signal}).then((()=>{throw new h.ConnectionTimeoutError(`${r.host}:${r.port}`)})).catch((t=>{if(t.name==="AbortError"){return}throw t}));t.push(a)}let a;try{a=await Promise.race(t);i.abort()}catch(t){i.abort();throw t}return a}async connect(t,r){r.lookup??=this.#e.lookup;let o;let p=this.#t.connection;const u=this.isSecureEndpoint(r);const l=this.#o(r);if(l){const i=Date.now();o=await this.#i({options:r,timeout:p,promises:[l.connect(t,r)]});if(p){p=p-(Date.now()-i)}}else{o=(u?a:i).connect(r)}o.setKeepAlive(this.keepAlive,this.keepAliveMsecs);o.setNoDelay(this.keepAlive);const d=new AbortController;const{signal:A}=d;const b=o[u?"secureConnecting":"connecting"]?c(o,u?"secureConnect":"connect",{signal:A}):Promise.resolve();await this.#i({options:r,timeout:p,promises:[b,c(o,"error",{signal:A}).then((t=>{throw t[0]}))]},d);if(this.#t.idle){o.setTimeout(this.#t.idle,(()=>{o.destroy(new h.IdleTimeoutError(`${r.host}:${r.port}`))}))}return o}addRequest(t,r){const o=this.#o(r);if(o?.setRequestProps){o.setRequestProps(t,r)}t.setHeader("connection",this.keepAlive?"keep-alive":"close");if(this.#t.response){let r;t.once("finish",(()=>{setTimeout((()=>{t.destroy(new h.ResponseTimeoutError(t,this.#r))}),this.#t.response)}));t.once("response",(()=>{clearTimeout(r)}))}if(this.#t.transfer){let r;t.once("response",(o=>{setTimeout((()=>{o.destroy(new h.TransferTimeoutError(t,this.#r))}),this.#t.transfer);o.once("close",(()=>{clearTimeout(r)}))}))}return super.addRequest(t,r)}}},42604:(t,r,o)=>{const{LRUCache:i}=o(32638);const a=o(72250);const c=new i({max:50});const getOptions=({family:t=0,hints:r=a.ADDRCONFIG,all:o=false,verbatim:i=undefined,ttl:p=5*60*1e3,lookup:u=a.lookup})=>({hints:r,lookup:(a,...l)=>{const d=l.pop();const A=l[0]??{};const b={family:t,hints:r,all:o,verbatim:i,...typeof A==="number"?{family:A}:A};const h=JSON.stringify({hostname:a,...b});if(c.has(h)){const t=c.get(h);return process.nextTick(d,null,...t)}u(a,b,((t,...r)=>{if(t){return d(t)}c.set(h,r,{ttl:p});return d(null,...r)}))}});t.exports={cache:c,getOptions:getOptions}},60260:t=>{class InvalidProxyProtocolError extends Error{constructor(t){super(`Invalid protocol \`${t.protocol}\` connecting to proxy \`${t.host}\``);this.code="EINVALIDPROXY";this.proxy=t}}class ConnectionTimeoutError extends Error{constructor(t){super(`Timeout connecting to host \`${t}\``);this.code="ECONNECTIONTIMEOUT";this.host=t}}class IdleTimeoutError extends Error{constructor(t){super(`Idle timeout reached for host \`${t}\``);this.code="EIDLETIMEOUT";this.host=t}}class ResponseTimeoutError extends Error{constructor(t,r){let o="Response timeout ";if(r){o+=`from proxy \`${r.host}\` `}o+=`connecting to host \`${t.host}\``;super(o);this.code="ERESPONSETIMEOUT";this.proxy=r;this.request=t}}class TransferTimeoutError extends Error{constructor(t,r){let o="Transfer timeout ";if(r){o+=`from proxy \`${r.host}\` `}o+=`for \`${t.host}\``;super(o);this.code="ETRANSFERTIMEOUT";this.proxy=r;this.request=t}}t.exports={InvalidProxyProtocolError:InvalidProxyProtocolError,ConnectionTimeoutError:ConnectionTimeoutError,IdleTimeoutError:IdleTimeoutError,ResponseTimeoutError:ResponseTimeoutError,TransferTimeoutError:TransferTimeoutError}},57995:(t,r,o)=>{const{LRUCache:i}=o(32638);const{normalizeOptions:a,cacheOptions:c}=o(46329);const{getProxy:p,proxyCache:u}=o(3799);const l=o(42604);const d=o(87721);const A=new i({max:20});const getAgent=(t,{agent:r,proxy:o,noProxy:i,...u}={})=>{if(r!=null){return r}t=new URL(t);const l=p(t,{proxy:o,noProxy:i});const b={...a(u),proxy:l};const h=c({...b,secureEndpoint:t.protocol==="https:"});if(A.has(h)){return A.get(h)}const M=new d(b);A.set(h,M);return M};t.exports={getAgent:getAgent,Agent:d,HttpAgent:d,HttpsAgent:d,cache:{proxy:u,agent:A,dns:l.cache,clear:()=>{u.clear();A.clear();l.cache.clear()}}}},46329:(t,r,o)=>{const i=o(42604);const normalizeOptions=t=>{const r=parseInt(t.family??"0",10);const o=t.keepAlive??true;const a={keepAliveMsecs:o?1e3:undefined,maxSockets:t.maxSockets??15,maxTotalSockets:Infinity,maxFreeSockets:o?256:undefined,scheduling:"fifo",...t,family:r,keepAlive:o,timeouts:{idle:t.timeout??0,connection:0,response:0,transfer:0,...t.timeouts},...i.getOptions({family:r,...t.dns})};delete a.timeout;return a};const createKey=t=>{let r="";const o=Object.entries(t).sort(((t,r)=>t[0]-r[0]));for(let[t,i]of o){if(i==null){i="null"}else if(i instanceof URL){i=i.toString()}else if(typeof i==="object"){i=createKey(i)}r+=`${t}:${i}:`}return r};const cacheOptions=({secureEndpoint:t,...r})=>createKey({secureEndpoint:!!t,family:r.family,hints:r.hints,localAddress:r.localAddress,strictSsl:t?!!r.rejectUnauthorized:false,ca:t?r.ca:null,cert:t?r.cert:null,key:t?r.key:null,keepAlive:r.keepAlive,keepAliveMsecs:r.keepAliveMsecs,maxSockets:r.maxSockets,maxTotalSockets:r.maxTotalSockets,maxFreeSockets:r.maxFreeSockets,scheduling:r.scheduling,timeouts:r.timeouts,proxy:r.proxy});t.exports={normalizeOptions:normalizeOptions,cacheOptions:cacheOptions}},3799:(t,r,o)=>{const{HttpProxyAgent:i}=o(81970);const{HttpsProxyAgent:a}=o(3669);const{SocksProxyAgent:c}=o(53357);const{LRUCache:p}=o(32638);const{InvalidProxyProtocolError:u}=o(60260);const l=new p({max:20});const d=new Set(c.protocols);const A=new Set(["https_proxy","http_proxy","proxy","no_proxy"]);const b=Object.entries(process.env).reduce(((t,[r,o])=>{r=r.toLowerCase();if(A.has(r)){t[r]=o}return t}),{});const getProxyAgent=t=>{t=new URL(t);const r=t.protocol.slice(0,-1);if(d.has(r)){return c}if(r==="https"||r==="http"){return[i,a]}throw new u(t)};const isNoProxy=(t,r)=>{if(typeof r==="string"){r=r.split(",").map((t=>t.trim())).filter(Boolean)}if(!r||!r.length){return false}const o=t.hostname.split(".").reverse();return r.some((t=>{const r=t.split(".").filter(Boolean).reverse();if(!r.length){return false}for(let t=0;t{t=new URL(t);if(!r){r=t.protocol==="https:"?b.https_proxy:b.https_proxy||b.http_proxy||b.proxy}if(!o){o=b.no_proxy}if(!r||isNoProxy(t,o)){return null}return new URL(r)};t.exports={getProxyAgent:getProxyAgent,getProxy:getProxy,proxyCache:l}},84212:t=>{const getOptions=(t,{copy:r,wrap:o})=>{const i={};if(t&&typeof t==="object"){for(const o of r){if(t[o]!==undefined){i[o]=t[o]}}}else{i[o]=t}return i};t.exports=getOptions},6187:(t,r,o)=>{const i=o(41437);const satisfies=t=>i.satisfies(process.version,t,{includePrerelease:true});t.exports={satisfies:satisfies}},88314:(t,r,o)=>{const{inspect:i}=o(39023);class SystemError{constructor(t,r,o){let i=`${r}: ${o.syscall} returned `+`${o.code} (${o.message})`;if(o.path!==undefined){i+=` ${o.path}`}if(o.dest!==undefined){i+=` => ${o.dest}`}this.code=t;Object.defineProperties(this,{name:{value:"SystemError",enumerable:false,writable:true,configurable:true},message:{value:i,enumerable:false,writable:true,configurable:true},info:{value:o,enumerable:true,configurable:true,writable:false},errno:{get(){return o.errno},set(t){o.errno=t},enumerable:true,configurable:true},syscall:{get(){return o.syscall},set(t){o.syscall=t},enumerable:true,configurable:true}});if(o.path!==undefined){Object.defineProperty(this,"path",{get(){return o.path},set(t){o.path=t},enumerable:true,configurable:true})}if(o.dest!==undefined){Object.defineProperty(this,"dest",{get(){return o.dest},set(t){o.dest=t},enumerable:true,configurable:true})}}toString(){return`${this.name} [${this.code}]: ${this.message}`}[Symbol.for("nodejs.util.inspect.custom")](t,r){return i(this,{...r,getters:true,customInspect:false})}}function E(r,o){t.exports[r]=class NodeError extends SystemError{constructor(t){super(r,o,t)}}}E("ERR_FS_CP_DIR_TO_NON_DIR","Cannot overwrite directory with non-directory");E("ERR_FS_CP_EEXIST","Target already exists");E("ERR_FS_CP_EINVAL","Invalid src or dest");E("ERR_FS_CP_FIFO_PIPE","Cannot copy a FIFO pipe");E("ERR_FS_CP_NON_DIR_TO_DIR","Cannot overwrite non-directory with directory");E("ERR_FS_CP_SOCKET","Cannot copy a socket file");E("ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY","Cannot overwrite symlink in subdirectory of self");E("ERR_FS_CP_UNKNOWN","Cannot copy an unknown file type");E("ERR_FS_EISDIR","Path is a directory");t.exports.ERR_INVALID_ARG_TYPE=class ERR_INVALID_ARG_TYPE extends Error{constructor(t,r,o){super();this.code="ERR_INVALID_ARG_TYPE";this.message=`The ${t} argument must be ${r}. Received ${typeof o}`}}},35189:(t,r,o)=>{const i=o(91943);const a=o(84212);const c=o(6187);const p=o(76562);const u=c.satisfies(">=16.7.0");const cp=async(t,r,o)=>{const c=a(o,{copy:["dereference","errorOnExist","filter","force","preserveTimestamps","recursive"]});return u?i.cp(t,r,c):p(t,r,c)};t.exports=cp},76562:(t,r,o)=>{const{ERR_FS_CP_DIR_TO_NON_DIR:i,ERR_FS_CP_EEXIST:a,ERR_FS_CP_EINVAL:c,ERR_FS_CP_FIFO_PIPE:p,ERR_FS_CP_NON_DIR_TO_DIR:u,ERR_FS_CP_SOCKET:l,ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY:d,ERR_FS_CP_UNKNOWN:A,ERR_FS_EISDIR:b,ERR_INVALID_ARG_TYPE:h}=o(88314);const{constants:{errno:{EEXIST:M,EISDIR:g,EINVAL:z,ENOTDIR:O}}}=o(70857);const{chmod:y,copyFile:C,lstat:B,mkdir:I,readdir:R,readlink:S,stat:q,symlink:w,unlink:N,utimes:v}=o(91943);const{dirname:T,isAbsolute:W,join:_,parse:L,resolve:x,sep:k,toNamespacedPath:Q}=o(16928);const{fileURLToPath:D}=o(87016);const P={dereference:false,errorOnExist:false,filter:undefined,force:true,preserveTimestamps:false,recursive:false};async function cp(t,r,o){if(o!=null&&typeof o!=="object"){throw new h("options",["Object"],o)}return cpFn(Q(getValidatedPath(t)),Q(getValidatedPath(r)),{...P,...o})}function getValidatedPath(t){const r=t!=null&&t.href&&t.origin?D(t):t;return r}async function cpFn(t,r,o){if(o.preserveTimestamps&&process.arch==="ia32"){const t="Using the preserveTimestamps option in 32-bit "+"node is not recommended";process.emitWarning(t,"TimestampPrecisionWarning")}const i=await checkPaths(t,r,o);const{srcStat:a,destStat:c}=i;await checkParentPaths(t,a,r);if(o.filter){return handleFilter(checkParentDir,c,t,r,o)}return checkParentDir(c,t,r,o)}async function checkPaths(t,r,o){const{0:a,1:p}=await getStats(t,r,o);if(p){if(areIdentical(a,p)){throw new c({message:"src and dest cannot be the same",path:r,syscall:"cp",errno:z})}if(a.isDirectory()&&!p.isDirectory()){throw new i({message:`cannot overwrite directory ${t} `+`with non-directory ${r}`,path:r,syscall:"cp",errno:g})}if(!a.isDirectory()&&p.isDirectory()){throw new u({message:`cannot overwrite non-directory ${t} `+`with directory ${r}`,path:r,syscall:"cp",errno:O})}}if(a.isDirectory()&&isSrcSubdir(t,r)){throw new c({message:`cannot copy ${t} to a subdirectory of self ${r}`,path:r,syscall:"cp",errno:z})}return{srcStat:a,destStat:p}}function areIdentical(t,r){return r.ino&&r.dev&&r.ino===t.ino&&r.dev===t.dev}function getStats(t,r,o){const i=o.dereference?t=>q(t,{bigint:true}):t=>B(t,{bigint:true});return Promise.all([i(t),i(r).catch((t=>{if(t.code==="ENOENT"){return null}throw t}))])}async function checkParentDir(t,r,o,i){const a=T(o);const c=await pathExists(a);if(c){return getStatsForCopy(t,r,o,i)}await I(a,{recursive:true});return getStatsForCopy(t,r,o,i)}function pathExists(t){return q(t).then((()=>true),(t=>t.code==="ENOENT"?false:Promise.reject(t)))}async function checkParentPaths(t,r,o){const i=x(T(t));const a=x(T(o));if(a===i||a===L(a).root){return}let p;try{p=await q(a,{bigint:true})}catch(t){if(t.code==="ENOENT"){return}throw t}if(areIdentical(r,p)){throw new c({message:`cannot copy ${t} to a subdirectory of self ${o}`,path:o,syscall:"cp",errno:z})}return checkParentPaths(t,r,a)}const normalizePathToArray=t=>x(t).split(k).filter(Boolean);function isSrcSubdir(t,r){const o=normalizePathToArray(t);const i=normalizePathToArray(r);return o.every(((t,r)=>i[r]===t))}async function handleFilter(t,r,o,i,a,c){const p=await a.filter(o,i);if(p){return t(r,o,i,a,c)}}function startCopy(t,r,o,i){if(i.filter){return handleFilter(getStatsForCopy,t,r,o,i)}return getStatsForCopy(t,r,o,i)}async function getStatsForCopy(t,r,o,i){const a=i.dereference?q:B;const c=await a(r);if(c.isDirectory()&&i.recursive){return onDir(c,t,r,o,i)}else if(c.isDirectory()){throw new b({message:`${r} is a directory (not copied)`,path:r,syscall:"cp",errno:z})}else if(c.isFile()||c.isCharacterDevice()||c.isBlockDevice()){return onFile(c,t,r,o,i)}else if(c.isSymbolicLink()){return onLink(t,r,o)}else if(c.isSocket()){throw new l({message:`cannot copy a socket file: ${o}`,path:o,syscall:"cp",errno:z})}else if(c.isFIFO()){throw new p({message:`cannot copy a FIFO pipe: ${o}`,path:o,syscall:"cp",errno:z})}throw new A({message:`cannot copy an unknown file type: ${o}`,path:o,syscall:"cp",errno:z})}function onFile(t,r,o,i,a){if(!r){return _copyFile(t,o,i,a)}return mayCopyFile(t,o,i,a)}async function mayCopyFile(t,r,o,i){if(i.force){await N(o);return _copyFile(t,r,o,i)}else if(i.errorOnExist){throw new a({message:`${o} already exists`,path:o,syscall:"cp",errno:M})}}async function _copyFile(t,r,o,i){await C(r,o);if(i.preserveTimestamps){return handleTimestampsAndMode(t.mode,r,o)}return setDestMode(o,t.mode)}async function handleTimestampsAndMode(t,r,o){if(fileIsNotWritable(t)){await makeFileWritable(o,t);return setDestTimestampsAndMode(t,r,o)}return setDestTimestampsAndMode(t,r,o)}function fileIsNotWritable(t){return(t&128)===0}function makeFileWritable(t,r){return setDestMode(t,r|128)}async function setDestTimestampsAndMode(t,r,o){await setDestTimestamps(r,o);return setDestMode(o,t)}function setDestMode(t,r){return y(t,r)}async function setDestTimestamps(t,r){const o=await q(t);return v(r,o.atime,o.mtime)}function onDir(t,r,o,i,a){if(!r){return mkDirAndCopy(t.mode,o,i,a)}return copyDir(o,i,a)}async function mkDirAndCopy(t,r,o,i){await I(o);await copyDir(r,o,i);return setDestMode(o,t)}async function copyDir(t,r,o){const i=await R(t);for(let a=0;a{const i=o(35189);const a=o(16974);const c=o(99367);const p=o(64851);t.exports={cp:i,withTempDir:a,readdirScoped:c,moveFile:p}},64851:(t,r,o)=>{const{dirname:i,join:a,resolve:c,relative:p,isAbsolute:u}=o(16928);const l=o(91943);const pathExists=async t=>{try{await l.access(t);return true}catch(t){return t.code!=="ENOENT"}};const moveFile=async(t,r,o={},d=true,A=[])=>{if(!t||!r){throw new TypeError("`source` and `destination` file required")}o={overwrite:true,...o};if(!o.overwrite&&await pathExists(r)){throw new Error(`The destination file exists: ${r}`)}await l.mkdir(i(r),{recursive:true});try{await l.rename(t,r)}catch(i){if(i.code==="EXDEV"||i.code==="EPERM"){const i=await l.lstat(t);if(i.isDirectory()){const i=await l.readdir(t);await Promise.all(i.map((i=>moveFile(a(t,i),a(r,i),o,false,A))))}else if(i.isSymbolicLink()){A.push({source:t,destination:r})}else{await l.copyFile(t,r)}}else{throw i}}if(d){await Promise.all(A.map((async({source:t,destination:r})=>{let o=await l.readlink(t);if(u(o)){o=c(r,p(t,o))}let a="file";try{a=await l.stat(c(i(t),o));if(a.isDirectory()){a="junction"}}catch{}await l.symlink(o,r,a)})));await l.rm(t,{recursive:true,force:true})}};t.exports=moveFile},99367:(t,r,o)=>{const{readdir:i}=o(91943);const{join:a}=o(16928);const readdirScoped=async t=>{const r=[];for(const o of await i(t)){if(o.startsWith("@")){for(const c of await i(a(t,o))){r.push(a(o,c))}}else{r.push(o)}}return r};t.exports=readdirScoped},16974:(t,r,o)=>{const{join:i,sep:a}=o(16928);const c=o(84212);const{mkdir:p,mkdtemp:u,rm:l}=o(91943);const withTempDir=async(t,r,o)=>{const d=c(o,{copy:["tmpPrefix"]});await p(t,{recursive:true});const A=await u(i(`${t}${a}`,d.tmpPrefix||""));let b;let h;try{h=await r(A)}catch(t){b=t}try{await l(A,{force:true,recursive:true})}catch{}if(b){throw b}return h};t.exports=withTempDir},42813:(t,r,o)=>{const i=o(17864);const a=Symbol("max");const c=Symbol("length");const p=Symbol("lengthCalculator");const u=Symbol("allowStale");const l=Symbol("maxAge");const d=Symbol("dispose");const A=Symbol("noDisposeOnSet");const b=Symbol("lruList");const h=Symbol("cache");const M=Symbol("updateAgeOnGet");const naiveLength=()=>1;class LRUCache{constructor(t){if(typeof t==="number")t={max:t};if(!t)t={};if(t.max&&(typeof t.max!=="number"||t.max<0))throw new TypeError("max must be a non-negative number");const r=this[a]=t.max||Infinity;const o=t.length||naiveLength;this[p]=typeof o!=="function"?naiveLength:o;this[u]=t.stale||false;if(t.maxAge&&typeof t.maxAge!=="number")throw new TypeError("maxAge must be a number");this[l]=t.maxAge||0;this[d]=t.dispose;this[A]=t.noDisposeOnSet||false;this[M]=t.updateAgeOnGet||false;this.reset()}set max(t){if(typeof t!=="number"||t<0)throw new TypeError("max must be a non-negative number");this[a]=t||Infinity;trim(this)}get max(){return this[a]}set allowStale(t){this[u]=!!t}get allowStale(){return this[u]}set maxAge(t){if(typeof t!=="number")throw new TypeError("maxAge must be a non-negative number");this[l]=t;trim(this)}get maxAge(){return this[l]}set lengthCalculator(t){if(typeof t!=="function")t=naiveLength;if(t!==this[p]){this[p]=t;this[c]=0;this[b].forEach((t=>{t.length=this[p](t.value,t.key);this[c]+=t.length}))}trim(this)}get lengthCalculator(){return this[p]}get length(){return this[c]}get itemCount(){return this[b].length}rforEach(t,r){r=r||this;for(let o=this[b].tail;o!==null;){const i=o.prev;forEachStep(this,t,o,r);o=i}}forEach(t,r){r=r||this;for(let o=this[b].head;o!==null;){const i=o.next;forEachStep(this,t,o,r);o=i}}keys(){return this[b].toArray().map((t=>t.key))}values(){return this[b].toArray().map((t=>t.value))}reset(){if(this[d]&&this[b]&&this[b].length){this[b].forEach((t=>this[d](t.key,t.value)))}this[h]=new Map;this[b]=new i;this[c]=0}dump(){return this[b].map((t=>isStale(this,t)?false:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)})).toArray().filter((t=>t))}dumpLru(){return this[b]}set(t,r,o){o=o||this[l];if(o&&typeof o!=="number")throw new TypeError("maxAge must be a number");const i=o?Date.now():0;const u=this[p](r,t);if(this[h].has(t)){if(u>this[a]){del(this,this[h].get(t));return false}const p=this[h].get(t);const l=p.value;if(this[d]){if(!this[A])this[d](t,l.value)}l.now=i;l.maxAge=o;l.value=r;this[c]+=u-l.length;l.length=u;this.get(t);trim(this);return true}const M=new Entry(t,r,u,i,o);if(M.length>this[a]){if(this[d])this[d](t,r);return false}this[c]+=M.length;this[b].unshift(M);this[h].set(t,this[b].head);trim(this);return true}has(t){if(!this[h].has(t))return false;const r=this[h].get(t).value;return!isStale(this,r)}get(t){return get(this,t,true)}peek(t){return get(this,t,false)}pop(){const t=this[b].tail;if(!t)return null;del(this,t);return t.value}del(t){del(this,this[h].get(t))}load(t){this.reset();const r=Date.now();for(let o=t.length-1;o>=0;o--){const i=t[o];const a=i.e||0;if(a===0)this.set(i.k,i.v);else{const t=a-r;if(t>0){this.set(i.k,i.v,t)}}}}prune(){this[h].forEach(((t,r)=>get(this,r,false)))}}const get=(t,r,o)=>{const i=t[h].get(r);if(i){const r=i.value;if(isStale(t,r)){del(t,i);if(!t[u])return undefined}else{if(o){if(t[M])i.value.now=Date.now();t[b].unshiftNode(i)}}return r.value}};const isStale=(t,r)=>{if(!r||!r.maxAge&&!t[l])return false;const o=Date.now()-r.now;return r.maxAge?o>r.maxAge:t[l]&&o>t[l]};const trim=t=>{if(t[c]>t[a]){for(let r=t[b].tail;t[c]>t[a]&&r!==null;){const o=r.prev;del(t,r);r=o}}};const del=(t,r)=>{if(r){const o=r.value;if(t[d])t[d](o.key,o.value);t[c]-=o.length;t[h].delete(o.key);t[b].removeNode(r)}};class Entry{constructor(t,r,o,i,a){this.key=t;this.value=r;this.length=o;this.now=i;this.maxAge=a||0}}const forEachStep=(t,r,o,i)=>{let a=o.value;if(isStale(t,a)){del(t,o);if(!t[u])a=undefined}if(a)r.call(i,a.value,a.key,t)};t.exports=LRUCache},39768:(t,r,o)=>{const i=Symbol("SemVer ANY");class Comparator{static get ANY(){return i}constructor(t,r){r=a(r);if(t instanceof Comparator){if(t.loose===!!r.loose){return t}else{t=t.value}}t=t.trim().split(/\s+/).join(" ");l("comparator",t,r);this.options=r;this.loose=!!r.loose;this.parse(t);if(this.semver===i){this.value=""}else{this.value=this.operator+this.semver.version}l("comp",this)}parse(t){const r=this.options.loose?c[p.COMPARATORLOOSE]:c[p.COMPARATOR];const o=t.match(r);if(!o){throw new TypeError(`Invalid comparator: ${t}`)}this.operator=o[1]!==undefined?o[1]:"";if(this.operator==="="){this.operator=""}if(!o[2]){this.semver=i}else{this.semver=new d(o[2],this.options.loose)}}toString(){return this.value}test(t){l("Comparator.test",t,this.options.loose);if(this.semver===i||t===i){return true}if(typeof t==="string"){try{t=new d(t,this.options)}catch(t){return false}}return u(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof Comparator)){throw new TypeError("a Comparator is required")}if(this.operator===""){if(this.value===""){return true}return new A(t.value,r).test(this.value)}else if(t.operator===""){if(t.value===""){return true}return new A(this.value,r).test(t.semver)}r=a(r);if(r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")){return false}if(!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))){return false}if(this.operator.startsWith(">")&&t.operator.startsWith(">")){return true}if(this.operator.startsWith("<")&&t.operator.startsWith("<")){return true}if(this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")){return true}if(u(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")){return true}if(u(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")){return true}return false}}t.exports=Comparator;const a=o(65939);const{safeRe:c,t:p}=o(84894);const u=o(23991);const l=o(86912);const d=o(95548);const A=o(60031)},60031:(t,r,o)=>{class Range{constructor(t,r){r=c(r);if(t instanceof Range){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease){return t}else{return new Range(t.raw,r)}}if(t instanceof p){this.raw=t.value;this.set=[[t]];this.format();return this}this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;this.raw=t.trim().split(/\s+/).join(" ");this.set=this.raw.split("||").map((t=>this.parseRange(t.trim()))).filter((t=>t.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${this.raw}`)}if(this.set.length>1){const t=this.set[0];this.set=this.set.filter((t=>!isNullSet(t[0])));if(this.set.length===0){this.set=[t]}else if(this.set.length>1){for(const t of this.set){if(t.length===1&&isAny(t[0])){this.set=[t];break}}}}this.format()}format(){this.range=this.set.map((t=>t.join(" ").trim())).join("||").trim();return this.range}toString(){return this.range}parseRange(t){const r=(this.options.includePrerelease&&g)|(this.options.loose&&z);const o=r+":"+t;const i=a.get(o);if(i){return i}const c=this.options.loose;const l=c?d[A.HYPHENRANGELOOSE]:d[A.HYPHENRANGE];t=t.replace(l,hyphenReplace(this.options.includePrerelease));u("hyphen replace",t);t=t.replace(d[A.COMPARATORTRIM],b);u("comparator trim",t);t=t.replace(d[A.TILDETRIM],h);u("tilde trim",t);t=t.replace(d[A.CARETTRIM],M);u("caret trim",t);let O=t.split(" ").map((t=>parseComparator(t,this.options))).join(" ").split(/\s+/).map((t=>replaceGTE0(t,this.options)));if(c){O=O.filter((t=>{u("loose invalid filter",t,this.options);return!!t.match(d[A.COMPARATORLOOSE])}))}u("range list",O);const y=new Map;const C=O.map((t=>new p(t,this.options)));for(const t of C){if(isNullSet(t)){return[t]}y.set(t.value,t)}if(y.size>1&&y.has("")){y.delete("")}const B=[...y.values()];a.set(o,B);return B}intersects(t,r){if(!(t instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((o=>isSatisfiable(o,r)&&t.set.some((t=>isSatisfiable(t,r)&&o.every((o=>t.every((t=>o.intersects(t,r)))))))))}test(t){if(!t){return false}if(typeof t==="string"){try{t=new l(t,this.options)}catch(t){return false}}for(let r=0;rt.value==="<0.0.0-0";const isAny=t=>t.value==="";const isSatisfiable=(t,r)=>{let o=true;const i=t.slice();let a=i.pop();while(o&&i.length){o=i.every((t=>a.intersects(t,r)));a=i.pop()}return o};const parseComparator=(t,r)=>{u("comp",t,r);t=replaceCarets(t,r);u("caret",t);t=replaceTildes(t,r);u("tildes",t);t=replaceXRanges(t,r);u("xrange",t);t=replaceStars(t,r);u("stars",t);return t};const isX=t=>!t||t.toLowerCase()==="x"||t==="*";const replaceTildes=(t,r)=>t.trim().split(/\s+/).map((t=>replaceTilde(t,r))).join(" ");const replaceTilde=(t,r)=>{const o=r.loose?d[A.TILDELOOSE]:d[A.TILDE];return t.replace(o,((r,o,i,a,c)=>{u("tilde",t,r,o,i,a,c);let p;if(isX(o)){p=""}else if(isX(i)){p=`>=${o}.0.0 <${+o+1}.0.0-0`}else if(isX(a)){p=`>=${o}.${i}.0 <${o}.${+i+1}.0-0`}else if(c){u("replaceTilde pr",c);p=`>=${o}.${i}.${a}-${c} <${o}.${+i+1}.0-0`}else{p=`>=${o}.${i}.${a} <${o}.${+i+1}.0-0`}u("tilde return",p);return p}))};const replaceCarets=(t,r)=>t.trim().split(/\s+/).map((t=>replaceCaret(t,r))).join(" ");const replaceCaret=(t,r)=>{u("caret",t,r);const o=r.loose?d[A.CARETLOOSE]:d[A.CARET];const i=r.includePrerelease?"-0":"";return t.replace(o,((r,o,a,c,p)=>{u("caret",t,r,o,a,c,p);let l;if(isX(o)){l=""}else if(isX(a)){l=`>=${o}.0.0${i} <${+o+1}.0.0-0`}else if(isX(c)){if(o==="0"){l=`>=${o}.${a}.0${i} <${o}.${+a+1}.0-0`}else{l=`>=${o}.${a}.0${i} <${+o+1}.0.0-0`}}else if(p){u("replaceCaret pr",p);if(o==="0"){if(a==="0"){l=`>=${o}.${a}.${c}-${p} <${o}.${a}.${+c+1}-0`}else{l=`>=${o}.${a}.${c}-${p} <${o}.${+a+1}.0-0`}}else{l=`>=${o}.${a}.${c}-${p} <${+o+1}.0.0-0`}}else{u("no pr");if(o==="0"){if(a==="0"){l=`>=${o}.${a}.${c}${i} <${o}.${a}.${+c+1}-0`}else{l=`>=${o}.${a}.${c}${i} <${o}.${+a+1}.0-0`}}else{l=`>=${o}.${a}.${c} <${+o+1}.0.0-0`}}u("caret return",l);return l}))};const replaceXRanges=(t,r)=>{u("replaceXRanges",t,r);return t.split(/\s+/).map((t=>replaceXRange(t,r))).join(" ")};const replaceXRange=(t,r)=>{t=t.trim();const o=r.loose?d[A.XRANGELOOSE]:d[A.XRANGE];return t.replace(o,((o,i,a,c,p,l)=>{u("xRange",t,o,i,a,c,p,l);const d=isX(a);const A=d||isX(c);const b=A||isX(p);const h=b;if(i==="="&&h){i=""}l=r.includePrerelease?"-0":"";if(d){if(i===">"||i==="<"){o="<0.0.0-0"}else{o="*"}}else if(i&&h){if(A){c=0}p=0;if(i===">"){i=">=";if(A){a=+a+1;c=0;p=0}else{c=+c+1;p=0}}else if(i==="<="){i="<";if(A){a=+a+1}else{c=+c+1}}if(i==="<"){l="-0"}o=`${i+a}.${c}.${p}${l}`}else if(A){o=`>=${a}.0.0${l} <${+a+1}.0.0-0`}else if(b){o=`>=${a}.${c}.0${l} <${a}.${+c+1}.0-0`}u("xRange return",o);return o}))};const replaceStars=(t,r)=>{u("replaceStars",t,r);return t.trim().replace(d[A.STAR],"")};const replaceGTE0=(t,r)=>{u("replaceGTE0",t,r);return t.trim().replace(d[r.includePrerelease?A.GTE0PRE:A.GTE0],"")};const hyphenReplace=t=>(r,o,i,a,c,p,u,l,d,A,b,h,M)=>{if(isX(i)){o=""}else if(isX(a)){o=`>=${i}.0.0${t?"-0":""}`}else if(isX(c)){o=`>=${i}.${a}.0${t?"-0":""}`}else if(p){o=`>=${o}`}else{o=`>=${o}${t?"-0":""}`}if(isX(d)){l=""}else if(isX(A)){l=`<${+d+1}.0.0-0`}else if(isX(b)){l=`<${d}.${+A+1}.0-0`}else if(h){l=`<=${d}.${A}.${b}-${h}`}else if(t){l=`<${d}.${A}.${+b+1}-0`}else{l=`<=${l}`}return`${o} ${l}`.trim()};const testSet=(t,r,o)=>{for(let o=0;o0){const i=t[o].semver;if(i.major===r.major&&i.minor===r.minor&&i.patch===r.patch){return true}}}return false}return true}},95548:(t,r,o)=>{const i=o(86912);const{MAX_LENGTH:a,MAX_SAFE_INTEGER:c}=o(83074);const{safeRe:p,t:u}=o(84894);const l=o(65939);const{compareIdentifiers:d}=o(98219);class SemVer{constructor(t,r){r=l(r);if(t instanceof SemVer){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease){return t}else{t=t.version}}else if(typeof t!=="string"){throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`)}if(t.length>a){throw new TypeError(`version is longer than ${a} characters`)}i("SemVer",t,r);this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;const o=t.trim().match(r.loose?p[u.LOOSE]:p[u.FULL]);if(!o){throw new TypeError(`Invalid Version: ${t}`)}this.raw=t;this.major=+o[1];this.minor=+o[2];this.patch=+o[3];if(this.major>c||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>c||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>c||this.patch<0){throw new TypeError("Invalid patch version")}if(!o[4]){this.prerelease=[]}else{this.prerelease=o[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){const r=+t;if(r>=0&&r=0){if(typeof this.prerelease[i]==="number"){this.prerelease[i]++;i=-2}}if(i===-1){if(r===this.prerelease.join(".")&&o===false){throw new Error("invalid increment argument: identifier already exists")}this.prerelease.push(t)}}if(r){let i=[r,t];if(o===false){i=[r]}if(d(this.prerelease[0],r)===0){if(isNaN(this.prerelease[1])){this.prerelease=i}}else{this.prerelease=i}}break}default:throw new Error(`invalid increment argument: ${t}`)}this.raw=this.format();if(this.build.length){this.raw+=`+${this.build.join(".")}`}return this}}t.exports=SemVer},64510:(t,r,o)=>{const i=o(45240);const clean=(t,r)=>{const o=i(t.trim().replace(/^[=v]+/,""),r);return o?o.version:null};t.exports=clean},23991:(t,r,o)=>{const i=o(5113);const a=o(26487);const c=o(35012);const p=o(67745);const u=o(63691);const l=o(27672);const cmp=(t,r,o,d)=>{switch(r){case"===":if(typeof t==="object"){t=t.version}if(typeof o==="object"){o=o.version}return t===o;case"!==":if(typeof t==="object"){t=t.version}if(typeof o==="object"){o=o.version}return t!==o;case"":case"=":case"==":return i(t,o,d);case"!=":return a(t,o,d);case">":return c(t,o,d);case">=":return p(t,o,d);case"<":return u(t,o,d);case"<=":return l(t,o,d);default:throw new TypeError(`Invalid operator: ${r}`)}};t.exports=cmp},3346:(t,r,o)=>{const i=o(95548);const a=o(45240);const{safeRe:c,t:p}=o(84894);const coerce=(t,r)=>{if(t instanceof i){return t}if(typeof t==="number"){t=String(t)}if(typeof t!=="string"){return null}r=r||{};let o=null;if(!r.rtl){o=t.match(r.includePrerelease?c[p.COERCEFULL]:c[p.COERCE])}else{const i=r.includePrerelease?c[p.COERCERTLFULL]:c[p.COERCERTL];let a;while((a=i.exec(t))&&(!o||o.index+o[0].length!==t.length)){if(!o||a.index+a[0].length!==o.index+o[0].length){o=a}i.lastIndex=a.index+a[1].length+a[2].length}i.lastIndex=-1}if(o===null){return null}const u=o[2];const l=o[3]||"0";const d=o[4]||"0";const A=r.includePrerelease&&o[5]?`-${o[5]}`:"";const b=r.includePrerelease&&o[6]?`+${o[6]}`:"";return a(`${u}.${l}.${d}${A}${b}`,r)};t.exports=coerce},69685:(t,r,o)=>{const i=o(95548);const compareBuild=(t,r,o)=>{const a=new i(t,o);const c=new i(r,o);return a.compare(c)||a.compareBuild(c)};t.exports=compareBuild},90731:(t,r,o)=>{const i=o(77304);const compareLoose=(t,r)=>i(t,r,true);t.exports=compareLoose},77304:(t,r,o)=>{const i=o(95548);const compare=(t,r,o)=>new i(t,o).compare(new i(r,o));t.exports=compare},84048:(t,r,o)=>{const i=o(45240);const diff=(t,r)=>{const o=i(t,null,true);const a=i(r,null,true);const c=o.compare(a);if(c===0){return null}const p=c>0;const u=p?o:a;const l=p?a:o;const d=!!u.prerelease.length;const A=!!l.prerelease.length;if(A&&!d){if(!l.patch&&!l.minor){return"major"}if(u.patch){return"patch"}if(u.minor){return"minor"}return"major"}const b=d?"pre":"";if(o.major!==a.major){return b+"major"}if(o.minor!==a.minor){return b+"minor"}if(o.patch!==a.patch){return b+"patch"}return"prerelease"};t.exports=diff},5113:(t,r,o)=>{const i=o(77304);const eq=(t,r,o)=>i(t,r,o)===0;t.exports=eq},35012:(t,r,o)=>{const i=o(77304);const gt=(t,r,o)=>i(t,r,o)>0;t.exports=gt},67745:(t,r,o)=>{const i=o(77304);const gte=(t,r,o)=>i(t,r,o)>=0;t.exports=gte},55303:(t,r,o)=>{const i=o(95548);const inc=(t,r,o,a,c)=>{if(typeof o==="string"){c=a;a=o;o=undefined}try{return new i(t instanceof i?t.version:t,o).inc(r,a,c).version}catch(t){return null}};t.exports=inc},63691:(t,r,o)=>{const i=o(77304);const lt=(t,r,o)=>i(t,r,o)<0;t.exports=lt},27672:(t,r,o)=>{const i=o(77304);const lte=(t,r,o)=>i(t,r,o)<=0;t.exports=lte},18610:(t,r,o)=>{const i=o(95548);const major=(t,r)=>new i(t,r).major;t.exports=major},8550:(t,r,o)=>{const i=o(95548);const minor=(t,r)=>new i(t,r).minor;t.exports=minor},26487:(t,r,o)=>{const i=o(77304);const neq=(t,r,o)=>i(t,r,o)!==0;t.exports=neq},45240:(t,r,o)=>{const i=o(95548);const parse=(t,r,o=false)=>{if(t instanceof i){return t}try{return new i(t,r)}catch(t){if(!o){return null}throw t}};t.exports=parse},43413:(t,r,o)=>{const i=o(95548);const patch=(t,r)=>new i(t,r).patch;t.exports=patch},94729:(t,r,o)=>{const i=o(45240);const prerelease=(t,r)=>{const o=i(t,r);return o&&o.prerelease.length?o.prerelease:null};t.exports=prerelease},42810:(t,r,o)=>{const i=o(77304);const rcompare=(t,r,o)=>i(r,t,o);t.exports=rcompare},91981:(t,r,o)=>{const i=o(69685);const rsort=(t,r)=>t.sort(((t,o)=>i(o,t,r)));t.exports=rsort},10174:(t,r,o)=>{const i=o(60031);const satisfies=(t,r,o)=>{try{r=new i(r,o)}catch(t){return false}return r.test(t)};t.exports=satisfies},43151:(t,r,o)=>{const i=o(69685);const sort=(t,r)=>t.sort(((t,o)=>i(t,o,r)));t.exports=sort},37105:(t,r,o)=>{const i=o(45240);const valid=(t,r)=>{const o=i(t,r);return o?o.version:null};t.exports=valid},41437:(t,r,o)=>{const i=o(84894);const a=o(83074);const c=o(95548);const p=o(98219);const u=o(45240);const l=o(37105);const d=o(64510);const A=o(55303);const b=o(84048);const h=o(18610);const M=o(8550);const g=o(43413);const z=o(94729);const O=o(77304);const y=o(42810);const C=o(90731);const B=o(69685);const I=o(43151);const R=o(91981);const S=o(35012);const q=o(63691);const w=o(5113);const N=o(26487);const v=o(67745);const T=o(27672);const W=o(23991);const _=o(3346);const L=o(39768);const x=o(60031);const k=o(10174);const Q=o(9495);const D=o(9412);const P=o(51670);const U=o(52981);const H=o(61610);const G=o(23915);const V=o(19691);const j=o(38598);const X=o(75956);const $=o(82757);const J=o(64);t.exports={parse:u,valid:l,clean:d,inc:A,diff:b,major:h,minor:M,patch:g,prerelease:z,compare:O,rcompare:y,compareLoose:C,compareBuild:B,sort:I,rsort:R,gt:S,lt:q,eq:w,neq:N,gte:v,lte:T,cmp:W,coerce:_,Comparator:L,Range:x,satisfies:k,toComparators:Q,maxSatisfying:D,minSatisfying:P,minVersion:U,validRange:H,outside:G,gtr:V,ltr:j,intersects:X,simplifyRange:$,subset:J,SemVer:c,re:i.re,src:i.src,tokens:i.t,SEMVER_SPEC_VERSION:a.SEMVER_SPEC_VERSION,RELEASE_TYPES:a.RELEASE_TYPES,compareIdentifiers:p.compareIdentifiers,rcompareIdentifiers:p.rcompareIdentifiers}},83074:t=>{const r="2.0.0";const o=256;const i=Number.MAX_SAFE_INTEGER||9007199254740991;const a=16;const c=o-6;const p=["major","premajor","minor","preminor","patch","prepatch","prerelease"];t.exports={MAX_LENGTH:o,MAX_SAFE_COMPONENT_LENGTH:a,MAX_SAFE_BUILD_LENGTH:c,MAX_SAFE_INTEGER:i,RELEASE_TYPES:p,SEMVER_SPEC_VERSION:r,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},86912:t=>{const r=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};t.exports=r},98219:t=>{const r=/^[0-9]+$/;const compareIdentifiers=(t,o)=>{const i=r.test(t);const a=r.test(o);if(i&&a){t=+t;o=+o}return t===o?0:i&&!a?-1:a&&!i?1:tcompareIdentifiers(r,t);t.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},65939:t=>{const r=Object.freeze({loose:true});const o=Object.freeze({});const parseOptions=t=>{if(!t){return o}if(typeof t!=="object"){return r}return t};t.exports=parseOptions},84894:(t,r,o)=>{const{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:c}=o(83074);const p=o(86912);r=t.exports={};const u=r.re=[];const l=r.safeRe=[];const d=r.src=[];const A=r.t={};let b=0;const h="[a-zA-Z0-9-]";const M=[["\\s",1],["\\d",c],[h,a]];const makeSafeRegex=t=>{for(const[r,o]of M){t=t.split(`${r}*`).join(`${r}{0,${o}}`).split(`${r}+`).join(`${r}{1,${o}}`)}return t};const createToken=(t,r,o)=>{const i=makeSafeRegex(r);const a=b++;p(t,a,r);A[t]=a;d[a]=r;u[a]=new RegExp(r,o?"g":undefined);l[a]=new RegExp(i,o?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","\\d+");createToken("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`);createToken("MAINVERSION",`(${d[A.NUMERICIDENTIFIER]})\\.`+`(${d[A.NUMERICIDENTIFIER]})\\.`+`(${d[A.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${d[A.NUMERICIDENTIFIERLOOSE]})\\.`+`(${d[A.NUMERICIDENTIFIERLOOSE]})\\.`+`(${d[A.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${d[A.NUMERICIDENTIFIER]}|${d[A.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${d[A.NUMERICIDENTIFIERLOOSE]}|${d[A.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASE",`(?:-(${d[A.PRERELEASEIDENTIFIER]}(?:\\.${d[A.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${d[A.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${d[A.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER",`${h}+`);createToken("BUILD",`(?:\\+(${d[A.BUILDIDENTIFIER]}(?:\\.${d[A.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${d[A.MAINVERSION]}${d[A.PRERELEASE]}?${d[A.BUILD]}?`);createToken("FULL",`^${d[A.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${d[A.MAINVERSIONLOOSE]}${d[A.PRERELEASELOOSE]}?${d[A.BUILD]}?`);createToken("LOOSE",`^${d[A.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${d[A.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${d[A.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${d[A.XRANGEIDENTIFIER]})`+`(?:\\.(${d[A.XRANGEIDENTIFIER]})`+`(?:\\.(${d[A.XRANGEIDENTIFIER]})`+`(?:${d[A.PRERELEASE]})?${d[A.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${d[A.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${d[A.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${d[A.XRANGEIDENTIFIERLOOSE]})`+`(?:${d[A.PRERELEASELOOSE]})?${d[A.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${d[A.GTLT]}\\s*${d[A.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${d[A.GTLT]}\\s*${d[A.XRANGEPLAINLOOSE]}$`);createToken("COERCEPLAIN",`${"(^|[^\\d])"+"(\\d{1,"}${i}})`+`(?:\\.(\\d{1,${i}}))?`+`(?:\\.(\\d{1,${i}}))?`);createToken("COERCE",`${d[A.COERCEPLAIN]}(?:$|[^\\d])`);createToken("COERCEFULL",d[A.COERCEPLAIN]+`(?:${d[A.PRERELEASE]})?`+`(?:${d[A.BUILD]})?`+`(?:$|[^\\d])`);createToken("COERCERTL",d[A.COERCE],true);createToken("COERCERTLFULL",d[A.COERCEFULL],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${d[A.LONETILDE]}\\s+`,true);r.tildeTrimReplace="$1~";createToken("TILDE",`^${d[A.LONETILDE]}${d[A.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${d[A.LONETILDE]}${d[A.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${d[A.LONECARET]}\\s+`,true);r.caretTrimReplace="$1^";createToken("CARET",`^${d[A.LONECARET]}${d[A.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${d[A.LONECARET]}${d[A.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${d[A.GTLT]}\\s*(${d[A.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${d[A.GTLT]}\\s*(${d[A.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${d[A.GTLT]}\\s*(${d[A.LOOSEPLAIN]}|${d[A.XRANGEPLAIN]})`,true);r.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${d[A.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${d[A.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${d[A.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${d[A.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},19691:(t,r,o)=>{const i=o(23915);const gtr=(t,r,o)=>i(t,r,">",o);t.exports=gtr},75956:(t,r,o)=>{const i=o(60031);const intersects=(t,r,o)=>{t=new i(t,o);r=new i(r,o);return t.intersects(r,o)};t.exports=intersects},38598:(t,r,o)=>{const i=o(23915);const ltr=(t,r,o)=>i(t,r,"<",o);t.exports=ltr},9412:(t,r,o)=>{const i=o(95548);const a=o(60031);const maxSatisfying=(t,r,o)=>{let c=null;let p=null;let u=null;try{u=new a(r,o)}catch(t){return null}t.forEach((t=>{if(u.test(t)){if(!c||p.compare(t)===-1){c=t;p=new i(c,o)}}}));return c};t.exports=maxSatisfying},51670:(t,r,o)=>{const i=o(95548);const a=o(60031);const minSatisfying=(t,r,o)=>{let c=null;let p=null;let u=null;try{u=new a(r,o)}catch(t){return null}t.forEach((t=>{if(u.test(t)){if(!c||p.compare(t)===1){c=t;p=new i(c,o)}}}));return c};t.exports=minSatisfying},52981:(t,r,o)=>{const i=o(95548);const a=o(60031);const c=o(35012);const minVersion=(t,r)=>{t=new a(t,r);let o=new i("0.0.0");if(t.test(o)){return o}o=new i("0.0.0-0");if(t.test(o)){return o}o=null;for(let r=0;r{const r=new i(t.semver.version);switch(t.operator){case">":if(r.prerelease.length===0){r.patch++}else{r.prerelease.push(0)}r.raw=r.format();case"":case">=":if(!p||c(r,p)){p=r}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}}));if(p&&(!o||c(o,p))){o=p}}if(o&&t.test(o)){return o}return null};t.exports=minVersion},23915:(t,r,o)=>{const i=o(95548);const a=o(39768);const{ANY:c}=a;const p=o(60031);const u=o(10174);const l=o(35012);const d=o(63691);const A=o(27672);const b=o(67745);const outside=(t,r,o,h)=>{t=new i(t,h);r=new p(r,h);let M,g,z,O,y;switch(o){case">":M=l;g=A;z=d;O=">";y=">=";break;case"<":M=d;g=b;z=l;O="<";y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(u(t,r,h)){return false}for(let o=0;o{if(t.semver===c){t=new a(">=0.0.0")}p=p||t;u=u||t;if(M(t.semver,p.semver,h)){p=t}else if(z(t.semver,u.semver,h)){u=t}}));if(p.operator===O||p.operator===y){return false}if((!u.operator||u.operator===O)&&g(t,u.semver)){return false}else if(u.operator===y&&z(t,u.semver)){return false}}return true};t.exports=outside},82757:(t,r,o)=>{const i=o(10174);const a=o(77304);t.exports=(t,r,o)=>{const c=[];let p=null;let u=null;const l=t.sort(((t,r)=>a(t,r,o)));for(const t of l){const a=i(t,r,o);if(a){u=t;if(!p){p=t}}else{if(u){c.push([p,u])}u=null;p=null}}if(p){c.push([p,null])}const d=[];for(const[t,r]of c){if(t===r){d.push(t)}else if(!r&&t===l[0]){d.push("*")}else if(!r){d.push(`>=${t}`)}else if(t===l[0]){d.push(`<=${r}`)}else{d.push(`${t} - ${r}`)}}const A=d.join(" || ");const b=typeof r.raw==="string"?r.raw:String(r);return A.length{const i=o(60031);const a=o(39768);const{ANY:c}=a;const p=o(10174);const u=o(77304);const subset=(t,r,o={})=>{if(t===r){return true}t=new i(t,o);r=new i(r,o);let a=false;e:for(const i of t.set){for(const t of r.set){const r=simpleSubset(i,t,o);a=a||r!==null;if(r){continue e}}if(a){return false}}return true};const l=[new a(">=0.0.0-0")];const d=[new a(">=0.0.0")];const simpleSubset=(t,r,o)=>{if(t===r){return true}if(t.length===1&&t[0].semver===c){if(r.length===1&&r[0].semver===c){return true}else if(o.includePrerelease){t=l}else{t=d}}if(r.length===1&&r[0].semver===c){if(o.includePrerelease){return true}else{r=d}}const i=new Set;let a,A;for(const r of t){if(r.operator===">"||r.operator===">="){a=higherGT(a,r,o)}else if(r.operator==="<"||r.operator==="<="){A=lowerLT(A,r,o)}else{i.add(r.semver)}}if(i.size>1){return null}let b;if(a&&A){b=u(a.semver,A.semver,o);if(b>0){return null}else if(b===0&&(a.operator!==">="||A.operator!=="<=")){return null}}for(const t of i){if(a&&!p(t,String(a),o)){return null}if(A&&!p(t,String(A),o)){return null}for(const i of r){if(!p(t,String(i),o)){return false}}return true}let h,M;let g,z;let O=A&&!o.includePrerelease&&A.semver.prerelease.length?A.semver:false;let y=a&&!o.includePrerelease&&a.semver.prerelease.length?a.semver:false;if(O&&O.prerelease.length===1&&A.operator==="<"&&O.prerelease[0]===0){O=false}for(const t of r){z=z||t.operator===">"||t.operator===">=";g=g||t.operator==="<"||t.operator==="<=";if(a){if(y){if(t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===y.major&&t.semver.minor===y.minor&&t.semver.patch===y.patch){y=false}}if(t.operator===">"||t.operator===">="){h=higherGT(a,t,o);if(h===t&&h!==a){return false}}else if(a.operator===">="&&!p(a.semver,String(t),o)){return false}}if(A){if(O){if(t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===O.major&&t.semver.minor===O.minor&&t.semver.patch===O.patch){O=false}}if(t.operator==="<"||t.operator==="<="){M=lowerLT(A,t,o);if(M===t&&M!==A){return false}}else if(A.operator==="<="&&!p(A.semver,String(t),o)){return false}}if(!t.operator&&(A||a)&&b!==0){return false}}if(a&&g&&!A&&b!==0){return false}if(A&&z&&!a&&b!==0){return false}if(y||O){return false}return true};const higherGT=(t,r,o)=>{if(!t){return r}const i=u(t.semver,r.semver,o);return i>0?t:i<0?r:r.operator===">"&&t.operator===">="?r:t};const lowerLT=(t,r,o)=>{if(!t){return r}const i=u(t.semver,r.semver,o);return i<0?t:i>0?r:r.operator==="<"&&t.operator==="<="?r:t};t.exports=subset},9495:(t,r,o)=>{const i=o(60031);const toComparators=(t,r)=>new i(t,r).set.map((t=>t.map((t=>t.value)).join(" ").trim().split(" ")));t.exports=toComparators},61610:(t,r,o)=>{const i=o(60031);const validRange=(t,r)=>{try{return new i(t,r).range||"*"}catch(t){return null}};t.exports=validRange},25518:(t,r,o)=>{const{valid:i,clean:a,explain:c}=o(7750);const{lt:p,le:u,eq:l,ne:d,ge:A,gt:b,compare:h,rcompare:M}=o(72936);const{satisfies:g,validRange:z,maxSatisfying:O,minSatisfying:y}=o(84658);const{major:C,minor:B,patch:I,inc:R}=o(4040);t.exports={valid:i,clean:a,explain:c,lt:p,le:u,lte:u,eq:l,ne:d,neq:d,ge:A,gte:A,gt:b,compare:h,rcompare:M,satisfies:g,maxSatisfying:O,minSatisfying:y,validRange:z,major:C,minor:B,patch:I,inc:R}},72936:(t,r,o)=>{const{parse:i}=o(7750);t.exports={compare:compare,rcompare:rcompare,lt:lt,le:le,eq:eq,ne:ne,ge:ge,gt:gt,"<":lt,"<=":le,"==":eq,"!=":ne,">=":ge,">":gt,"===":arbitrary};function lt(t,r){return compare(t,r)<0}function le(t,r){return compare(t,r)<=0}function eq(t,r){return compare(t,r)===0}function ne(t,r){return compare(t,r)!==0}function ge(t,r){return compare(t,r)>=0}function gt(t,r){return compare(t,r)>0}function arbitrary(t,r){return t.toLowerCase()===r.toLowerCase()}function compare(t,r){const o=i(t);const a=i(r);const c=calculateKey(o);const p=calculateKey(a);return pyCompare(c,p)}function rcompare(t,r){return-compare(t,r)}function pyCompare(t,r){if(t===r){return 0}if(Array.isArray(t)!==Array.isArray(r)){t=Array.isArray(t)?t:[t];r=Array.isArray(r)?r:[r]}if(Array.isArray(t)){const o=Math.min(t.length,r.length);for(let i=0;iNumber.isNaN(Number(t))?[-Infinity,t]:[Number(t),""]))}return[t,r,o,i,a,c]}},4040:(t,r,o)=>{const{explain:i,parse:a,stringify:c}=o(7750);t.exports={major:major,minor:minor,patch:patch,inc:inc};function major(t){const r=i(t);if(!r){throw new TypeError("Invalid Version: "+t)}return r.release[0]}function minor(t){const r=i(t);if(!r){throw new TypeError("Invalid Version: "+t)}if(r.release.length<2){return 0}return r.release[1]}function patch(t){const r=i(t);if(!r){throw new TypeError("Invalid Version: "+t)}if(r.release.length<3){return 0}return r.release[2]}function inc(t,r,o){let i=o||`a`;const p=a(t);if(!p){return null}if(!["a","b","c","rc","alpha","beta","pre","preview"].includes(i)){return null}switch(r){case"premajor":{const[t]=p.release;p.release.fill(0);p.release[0]=t+1}p.pre=[i,0];delete p.post;delete p.dev;delete p.local;break;case"preminor":{const[t,r=0]=p.release;p.release.fill(0);p.release[0]=t;p.release[1]=r+1}p.pre=[i,0];delete p.post;delete p.dev;delete p.local;break;case"prepatch":{const[t,r=0,o=0]=p.release;p.release.fill(0);p.release[0]=t;p.release[1]=r;p.release[2]=o+1}p.pre=[i,0];delete p.post;delete p.dev;delete p.local;break;case"prerelease":if(p.pre===null){const[t,r=0,o=0]=p.release;p.release.fill(0);p.release[0]=t;p.release[1]=r;p.release[2]=o+1;p.pre=[i,0]}else{if(o===undefined&&p.pre!==null){[i]=p.pre}const[t,r]=p.pre;if(t===i){p.pre=[t,r+1]}else{p.pre=[i,0]}}delete p.post;delete p.dev;delete p.local;break;case"major":if(p.release.slice(1).some((t=>t!==0))||p.pre===null){const[t]=p.release;p.release.fill(0);p.release[0]=t+1}delete p.pre;delete p.post;delete p.dev;delete p.local;break;case"minor":if(p.release.slice(2).some((t=>t!==0))||p.pre===null){const[t,r=0]=p.release;p.release.fill(0);p.release[0]=t;p.release[1]=r+1}delete p.pre;delete p.post;delete p.dev;delete p.local;break;case"patch":if(p.release.slice(3).some((t=>t!==0))||p.pre===null){const[t,r=0,o=0]=p.release;p.release.fill(0);p.release[0]=t;p.release[1]=r;p.release[2]=o+1}delete p.pre;delete p.post;delete p.dev;delete p.local;break;default:return null}return c(p)}},84658:(t,r,o)=>{const i=o(63897);const{VERSION_PATTERN:a,explain:c}=o(7750);const p=o(72936);const u=["(?(===|~=|==|!=|<=|>=|<|>))","\\s*","(","(?("+a.replace(/\?<\w+>/g,"?:")+"))","(?\\.\\*)?","|","(?[^,;\\s)]+)",")"].join("");t.exports={RANGE_PATTERN:u,parse:parse,satisfies:satisfies,filter:filter,validRange:validRange,maxSatisfying:maxSatisfying,minSatisfying:minSatisfying};const isEqualityOperator=t=>["==","!=","==="].includes(t);const l=new i("^"+u+"$","i");function parse(t){if(!t.trim()){return[]}const r=t.split(",").map((t=>i.exec(t.trim(),l))).map((t=>{if(!t){return null}let{...r}=t;const{operator:o,version:i,prefix:a,legacy:p}=t;if(i){r={...r,...c(i)};if(o==="~="){if(r.release.length<2){return null}}if(!isEqualityOperator(o)&&r.local){return null}if(a){if(!isEqualityOperator(o)||r.dev||r.local){return null}}}if(p&&o!=="==="){return null}return r}));if(r.filter(Boolean).length!==r.length){return null}return r}function filter(t,r,o){o=o||{};const i=pick(t,r,o);if(i.length===0&&o.prereleases===undefined){return pick(t,r,{prereleases:true})}return i}function maxSatisfying(t,r,o){const i=filter(t,r,o).sort(p.compare);return i.length===0?null:i[i.length-1]}function minSatisfying(t,r,o){const i=filter(t,r,o).sort(p.compare);return i.length===0?null:i[0]}function pick(t,r,o){const i=parse(r);if(!i){return[]}return t.filter((t=>{const r=c(t);if(!i.length){return r&&!(r.is_prerelease&&!o.prereleases)}return i.reduce(((i,a)=>{if(!i){return false}return contains({...a,...o},{version:t,explained:r})}),true)}))}function satisfies(t,r,o){o=o||{};const i=pick([t],r,o);return i.length===1}function contains(t,{version:r,explained:o}){const{...i}=t;if(i.prereleases===undefined){i.prereleases=i.is_prerelease}if(o&&o.is_prerelease&&!i.prereleases){return false}if(i.operator==="~="){let t=i.release.slice(0,-1).concat("*").join(".");if(i.epoch){t=i.epoch+"!"+t}return satisfies(r,`>=${i.version}, ==${t}`)}if(i.prefix){return r.startsWith(i.version)===(i.operator==="==")}if(o)if(o.local&&i.version){r=o.public;i.version=c(i.version).public}if(i.operator==="<"||i.operator===">"){if(p.eq(i.release.join("."),o.release.join("."))){return false}}const a=p[i.operator];return a(r,i.version||i.legacy)}function validRange(t){return Boolean(parse(t))}},7750:(t,r,o)=>{const i=o(63897);const a=["v?","(?:","(?:(?[0-9]+)!)?","(?[0-9]+(?:\\.[0-9]+)*)","(?","[-_\\.]?","(?(a|b|c|rc|alpha|beta|pre|preview))","[-_\\.]?","(?[0-9]+)?",")?","(?","(?:-(?[0-9]+))","|","(?:","[-_\\.]?","(?post|rev|r)","[-_\\.]?","(?[0-9]+)?",")",")?","(?","[-_\\.]?","(?dev)","[-_\\.]?","(?[0-9]+)?",")?",")","(?:\\+(?[a-z0-9]+(?:[-_\\.][a-z0-9]+)*))?"].join("");t.exports={VERSION_PATTERN:a,valid:valid,clean:clean,explain:explain,parse:parse,stringify:stringify};const c=new i("^"+a+"$","i");function valid(t){return c.test(t)?t:null}const p=new i("^\\s*"+a+"\\s*$","i");function clean(t){return stringify(parse(t,p))}function parse(t,r){const o=i.exec(t,r||c);if(!o){return null}const a={epoch:Number(o.epoch?o.epoch:0),release:o.release.split(".").map(Number),pre:normalize_letter_version(o.pre_l,o.pre_n),post:normalize_letter_version(o.post_l,o.post_n1||o.post_n2),dev:normalize_letter_version(o.dev_l,o.dev_n),local:parse_local_version(o.local)};return a}function stringify(t){if(!t){return null}const{epoch:r,release:o,pre:i,post:a,dev:c,local:p}=t;const u=[];if(r!==0){u.push(`${r}!`)}u.push(o.join("."));if(i){u.push(i.join(""))}if(a){u.push("."+a.join(""))}if(c){u.push("."+c.join(""))}if(p){u.push(`+${p}`)}return u.join("")}function normalize_letter_version(t,r){if(t){if(!r){r=0}t=t.toLowerCase();if(t==="alpha"){t="a"}else if(t==="beta"){t="b"}else if(["c","pre","preview"].includes(t)){t="rc"}else if(["rev","r"].includes(t)){t="post"}return[t,Number(r)]}if(!t&&r){t="post";return[t,Number(r)]}return null}function parse_local_version(t){if(t){return t.split(/[._-]/).map((t=>Number.isNaN(Number(t))?t.toLowerCase():Number(t)))}return null}function explain(t){const r=parse(t);if(!r){return r}const{epoch:o,release:i,pre:a,post:c,dev:p,local:u}=r;let l="";if(o!==0){l+=o+"!"}l+=i.join(".");const d=Boolean(p||a);const A=Boolean(p);const b=Boolean(c);return{epoch:o,release:i,pre:a,post:c?c[1]:c,dev:p?p[1]:p,local:u?u.join("."):u,public:stringify(r).split("+",1)[0],base_version:l,is_prerelease:d,is_devrelease:A,is_postrelease:b}}},18456:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.toMessageSignatureBundle=toMessageSignatureBundle;r.toDSSEBundle=toDSSEBundle;const i=o(19654);const a=o(37742);function toMessageSignatureBundle(t){return{mediaType:t.certificateChain?a.BUNDLE_V02_MEDIA_TYPE:a.BUNDLE_V03_MEDIA_TYPE,content:{$case:"messageSignature",messageSignature:{messageDigest:{algorithm:i.HashAlgorithm.SHA2_256,digest:t.digest},signature:t.signature}},verificationMaterial:toVerificationMaterial(t)}}function toDSSEBundle(t){return{mediaType:t.certificateChain?a.BUNDLE_V02_MEDIA_TYPE:a.BUNDLE_V03_MEDIA_TYPE,content:{$case:"dsseEnvelope",dsseEnvelope:toEnvelope(t)},verificationMaterial:toVerificationMaterial(t)}}function toEnvelope(t){return{payloadType:t.artifactType,payload:t.artifact,signatures:[toSignature(t)]}}function toSignature(t){return{keyid:t.keyHint||"",sig:t.signature}}function toVerificationMaterial(t){return{content:toKeyContent(t),tlogEntries:[],timestampVerificationData:{rfc3161Timestamps:[]}}}function toKeyContent(t){if(t.certificate){if(t.certificateChain){return{$case:"x509CertificateChain",x509CertificateChain:{certificates:[{rawBytes:t.certificate}]}}}else{return{$case:"certificate",certificate:{rawBytes:t.certificate}}}}else{return{$case:"publicKey",publicKey:{hint:t.keyHint||""}}}}},37742:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.BUNDLE_V03_MEDIA_TYPE=r.BUNDLE_V03_LEGACY_MEDIA_TYPE=r.BUNDLE_V02_MEDIA_TYPE=r.BUNDLE_V01_MEDIA_TYPE=void 0;r.isBundleWithCertificateChain=isBundleWithCertificateChain;r.isBundleWithPublicKey=isBundleWithPublicKey;r.isBundleWithMessageSignature=isBundleWithMessageSignature;r.isBundleWithDsseEnvelope=isBundleWithDsseEnvelope;r.BUNDLE_V01_MEDIA_TYPE="application/vnd.dev.sigstore.bundle+json;version=0.1";r.BUNDLE_V02_MEDIA_TYPE="application/vnd.dev.sigstore.bundle+json;version=0.2";r.BUNDLE_V03_LEGACY_MEDIA_TYPE="application/vnd.dev.sigstore.bundle+json;version=0.3";r.BUNDLE_V03_MEDIA_TYPE="application/vnd.dev.sigstore.bundle.v0.3+json";function isBundleWithCertificateChain(t){return t.verificationMaterial.content.$case==="x509CertificateChain"}function isBundleWithPublicKey(t){return t.verificationMaterial.content.$case==="publicKey"}function isBundleWithMessageSignature(t){return t.content.$case==="messageSignature"}function isBundleWithDsseEnvelope(t){return t.content.$case==="dsseEnvelope"}},47714:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.ValidationError=void 0;class ValidationError extends Error{constructor(t,r){super(t);this.fields=r}}r.ValidationError=ValidationError},61040:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.isBundleV01=r.assertBundleV02=r.assertBundleV01=r.assertBundleLatest=r.assertBundle=r.envelopeToJSON=r.envelopeFromJSON=r.bundleToJSON=r.bundleFromJSON=r.ValidationError=r.isBundleWithPublicKey=r.isBundleWithMessageSignature=r.isBundleWithDsseEnvelope=r.isBundleWithCertificateChain=r.BUNDLE_V03_MEDIA_TYPE=r.BUNDLE_V03_LEGACY_MEDIA_TYPE=r.BUNDLE_V02_MEDIA_TYPE=r.BUNDLE_V01_MEDIA_TYPE=r.toMessageSignatureBundle=r.toDSSEBundle=void 0;var i=o(18456);Object.defineProperty(r,"toDSSEBundle",{enumerable:true,get:function(){return i.toDSSEBundle}});Object.defineProperty(r,"toMessageSignatureBundle",{enumerable:true,get:function(){return i.toMessageSignatureBundle}});var a=o(37742);Object.defineProperty(r,"BUNDLE_V01_MEDIA_TYPE",{enumerable:true,get:function(){return a.BUNDLE_V01_MEDIA_TYPE}});Object.defineProperty(r,"BUNDLE_V02_MEDIA_TYPE",{enumerable:true,get:function(){return a.BUNDLE_V02_MEDIA_TYPE}});Object.defineProperty(r,"BUNDLE_V03_LEGACY_MEDIA_TYPE",{enumerable:true,get:function(){return a.BUNDLE_V03_LEGACY_MEDIA_TYPE}});Object.defineProperty(r,"BUNDLE_V03_MEDIA_TYPE",{enumerable:true,get:function(){return a.BUNDLE_V03_MEDIA_TYPE}});Object.defineProperty(r,"isBundleWithCertificateChain",{enumerable:true,get:function(){return a.isBundleWithCertificateChain}});Object.defineProperty(r,"isBundleWithDsseEnvelope",{enumerable:true,get:function(){return a.isBundleWithDsseEnvelope}});Object.defineProperty(r,"isBundleWithMessageSignature",{enumerable:true,get:function(){return a.isBundleWithMessageSignature}});Object.defineProperty(r,"isBundleWithPublicKey",{enumerable:true,get:function(){return a.isBundleWithPublicKey}});var c=o(47714);Object.defineProperty(r,"ValidationError",{enumerable:true,get:function(){return c.ValidationError}});var p=o(23404);Object.defineProperty(r,"bundleFromJSON",{enumerable:true,get:function(){return p.bundleFromJSON}});Object.defineProperty(r,"bundleToJSON",{enumerable:true,get:function(){return p.bundleToJSON}});Object.defineProperty(r,"envelopeFromJSON",{enumerable:true,get:function(){return p.envelopeFromJSON}});Object.defineProperty(r,"envelopeToJSON",{enumerable:true,get:function(){return p.envelopeToJSON}});var u=o(9352);Object.defineProperty(r,"assertBundle",{enumerable:true,get:function(){return u.assertBundle}});Object.defineProperty(r,"assertBundleLatest",{enumerable:true,get:function(){return u.assertBundleLatest}});Object.defineProperty(r,"assertBundleV01",{enumerable:true,get:function(){return u.assertBundleV01}});Object.defineProperty(r,"assertBundleV02",{enumerable:true,get:function(){return u.assertBundleV02}});Object.defineProperty(r,"isBundleV01",{enumerable:true,get:function(){return u.isBundleV01}})},23404:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.envelopeToJSON=r.envelopeFromJSON=r.bundleToJSON=r.bundleFromJSON=void 0;const i=o(19654);const a=o(37742);const c=o(9352);const bundleFromJSON=t=>{const r=i.Bundle.fromJSON(t);switch(r.mediaType){case a.BUNDLE_V01_MEDIA_TYPE:(0,c.assertBundleV01)(r);break;case a.BUNDLE_V02_MEDIA_TYPE:(0,c.assertBundleV02)(r);break;default:(0,c.assertBundleLatest)(r);break}return r};r.bundleFromJSON=bundleFromJSON;const bundleToJSON=t=>i.Bundle.toJSON(t);r.bundleToJSON=bundleToJSON;const envelopeFromJSON=t=>i.Envelope.fromJSON(t);r.envelopeFromJSON=envelopeFromJSON;const envelopeToJSON=t=>i.Envelope.toJSON(t);r.envelopeToJSON=envelopeToJSON},9352:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.assertBundle=assertBundle;r.assertBundleV01=assertBundleV01;r.isBundleV01=isBundleV01;r.assertBundleV02=assertBundleV02;r.assertBundleLatest=assertBundleLatest;const i=o(47714);function assertBundle(t){const r=validateBundleBase(t);if(r.length>0){throw new i.ValidationError("invalid bundle",r)}}function assertBundleV01(t){const r=[];r.push(...validateBundleBase(t));r.push(...validateInclusionPromise(t));if(r.length>0){throw new i.ValidationError("invalid v0.1 bundle",r)}}function isBundleV01(t){try{assertBundleV01(t);return true}catch(t){return false}}function assertBundleV02(t){const r=[];r.push(...validateBundleBase(t));r.push(...validateInclusionProof(t));if(r.length>0){throw new i.ValidationError("invalid v0.2 bundle",r)}}function assertBundleLatest(t){const r=[];r.push(...validateBundleBase(t));r.push(...validateInclusionProof(t));r.push(...validateNoCertificateChain(t));if(r.length>0){throw new i.ValidationError("invalid bundle",r)}}function validateBundleBase(t){const r=[];if(t.mediaType===undefined||!t.mediaType.match(/^application\/vnd\.dev\.sigstore\.bundle\+json;version=\d\.\d/)&&!t.mediaType.match(/^application\/vnd\.dev\.sigstore\.bundle\.v\d\.\d\+json/)){r.push("mediaType")}if(t.content===undefined){r.push("content")}else{switch(t.content.$case){case"messageSignature":if(t.content.messageSignature.messageDigest===undefined){r.push("content.messageSignature.messageDigest")}else{if(t.content.messageSignature.messageDigest.digest.length===0){r.push("content.messageSignature.messageDigest.digest")}}if(t.content.messageSignature.signature.length===0){r.push("content.messageSignature.signature")}break;case"dsseEnvelope":if(t.content.dsseEnvelope.payload.length===0){r.push("content.dsseEnvelope.payload")}if(t.content.dsseEnvelope.signatures.length!==1){r.push("content.dsseEnvelope.signatures")}else{if(t.content.dsseEnvelope.signatures[0].sig.length===0){r.push("content.dsseEnvelope.signatures[0].sig")}}break}}if(t.verificationMaterial===undefined){r.push("verificationMaterial")}else{if(t.verificationMaterial.content===undefined){r.push("verificationMaterial.content")}else{switch(t.verificationMaterial.content.$case){case"x509CertificateChain":if(t.verificationMaterial.content.x509CertificateChain.certificates.length===0){r.push("verificationMaterial.content.x509CertificateChain.certificates")}t.verificationMaterial.content.x509CertificateChain.certificates.forEach(((t,o)=>{if(t.rawBytes.length===0){r.push(`verificationMaterial.content.x509CertificateChain.certificates[${o}].rawBytes`)}}));break;case"certificate":if(t.verificationMaterial.content.certificate.rawBytes.length===0){r.push("verificationMaterial.content.certificate.rawBytes")}break}}if(t.verificationMaterial.tlogEntries===undefined){r.push("verificationMaterial.tlogEntries")}else{if(t.verificationMaterial.tlogEntries.length>0){t.verificationMaterial.tlogEntries.forEach(((t,o)=>{if(t.logId===undefined){r.push(`verificationMaterial.tlogEntries[${o}].logId`)}if(t.kindVersion===undefined){r.push(`verificationMaterial.tlogEntries[${o}].kindVersion`)}}))}}}return r}function validateInclusionPromise(t){const r=[];if(t.verificationMaterial&&t.verificationMaterial.tlogEntries?.length>0){t.verificationMaterial.tlogEntries.forEach(((t,o)=>{if(t.inclusionPromise===undefined){r.push(`verificationMaterial.tlogEntries[${o}].inclusionPromise`)}}))}return r}function validateInclusionProof(t){const r=[];if(t.verificationMaterial&&t.verificationMaterial.tlogEntries?.length>0){t.verificationMaterial.tlogEntries.forEach(((t,o)=>{if(t.inclusionProof===undefined){r.push(`verificationMaterial.tlogEntries[${o}].inclusionProof`)}else{if(t.inclusionProof.checkpoint===undefined){r.push(`verificationMaterial.tlogEntries[${o}].inclusionProof.checkpoint`)}}}))}return r}function validateNoCertificateChain(t){const r=[];if(t.verificationMaterial?.content?.$case==="x509CertificateChain"){r.push("verificationMaterial.content.$case")}return r}},11121:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.ASN1TypeError=r.ASN1ParseError=void 0;class ASN1ParseError extends Error{}r.ASN1ParseError=ASN1ParseError;class ASN1TypeError extends Error{}r.ASN1TypeError=ASN1TypeError},86027:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.ASN1Obj=void 0;var i=o(50990);Object.defineProperty(r,"ASN1Obj",{enumerable:true,get:function(){return i.ASN1Obj}})},84243:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.decodeLength=decodeLength;r.encodeLength=encodeLength;const i=o(11121);function decodeLength(t){const r=t.getUint8();if((r&128)===0){return r}const o=r&127;if(o>6){throw new i.ASN1ParseError("length exceeds 6 byte limit")}let a=0;for(let r=0;r0n){o.unshift(Number(r&255n));r=r>>8n}return Buffer.from([128|o.length,...o])}},50990:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.ASN1Obj=void 0;const i=o(1673);const a=o(11121);const c=o(84243);const p=o(81044);const u=o(59343);class ASN1Obj{tag;subs;value;constructor(t,r,o){this.tag=t;this.value=r;this.subs=o}static parseBuffer(t){return parseStream(new i.ByteStream(t))}toDER(){const t=new i.ByteStream;if(this.subs.length>0){for(const r of this.subs){t.appendView(r.toDER())}}else{t.appendView(this.value)}const r=t.buffer;const o=new i.ByteStream;o.appendChar(this.tag.toDER());o.appendView((0,c.encodeLength)(r.length));o.appendView(r);return o.buffer}toBoolean(){if(!this.tag.isBoolean()){throw new a.ASN1TypeError("not a boolean")}return(0,p.parseBoolean)(this.value)}toInteger(){if(!this.tag.isInteger()){throw new a.ASN1TypeError("not an integer")}return(0,p.parseInteger)(this.value)}toOID(){if(!this.tag.isOID()){throw new a.ASN1TypeError("not an OID")}return(0,p.parseOID)(this.value)}toDate(){switch(true){case this.tag.isUTCTime():return(0,p.parseTime)(this.value,true);case this.tag.isGeneralizedTime():return(0,p.parseTime)(this.value,false);default:throw new a.ASN1TypeError("not a date")}}toBitString(){if(!this.tag.isBitString()){throw new a.ASN1TypeError("not a bit string")}return(0,p.parseBitString)(this.value)}}r.ASN1Obj=ASN1Obj;function parseStream(t){const r=new u.ASN1Tag(t.getUint8());const o=(0,c.decodeLength)(t);const i=t.slice(t.position,o);const a=t.position;let p=[];if(r.constructed){p=collectSubs(t,o)}else if(r.isOctetString()){try{p=collectSubs(t,o)}catch(t){}}if(p.length===0){t.seek(a+o)}return new ASN1Obj(r,i,p)}function collectSubs(t,r){const o=t.position+r;if(o>t.length){throw new a.ASN1ParseError("invalid length")}const i=[];while(t.position{Object.defineProperty(r,"__esModule",{value:true});r.parseInteger=parseInteger;r.parseStringASCII=parseStringASCII;r.parseTime=parseTime;r.parseOID=parseOID;r.parseBoolean=parseBoolean;r.parseBitString=parseBitString;const o=/^(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\.\d{3})?Z$/;const i=/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\.\d{3})?Z$/;function parseInteger(t){let r=0;const o=t.length;let i=t[r];const a=i>127;const c=a?255:0;while(i==c&&++r=50?1900:2e3;c[1]=t.toString()}return new Date(`${c[1]}-${c[2]}-${c[3]}T${c[4]}:${c[5]}:${c[6]}Z`)}function parseOID(t){let r=0;const o=t.length;let i=t[r++];const a=Math.floor(i/40);const c=i%40;let p=`${a}.${c}`;let u=0;for(;r=p;--t){a.push(o>>t&1)}}return a}},59343:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.ASN1Tag=void 0;const i=o(11121);const a={BOOLEAN:1,INTEGER:2,BIT_STRING:3,OCTET_STRING:4,OBJECT_IDENTIFIER:6,SEQUENCE:16,SET:17,PRINTABLE_STRING:19,UTC_TIME:23,GENERALIZED_TIME:24};const c={UNIVERSAL:0,APPLICATION:1,CONTEXT_SPECIFIC:2,PRIVATE:3};class ASN1Tag{number;constructed;class;constructor(t){this.number=t&31;this.constructed=(t&32)===32;this.class=t>>6;if(this.number===31){throw new i.ASN1ParseError("long form tags not supported")}if(this.class===c.UNIVERSAL&&this.number===0){throw new i.ASN1ParseError("unsupported tag 0x00")}}isUniversal(){return this.class===c.UNIVERSAL}isContextSpecific(t){const r=this.class===c.CONTEXT_SPECIFIC;return t!==undefined?r&&this.number===t:r}isBoolean(){return this.isUniversal()&&this.number===a.BOOLEAN}isInteger(){return this.isUniversal()&&this.number===a.INTEGER}isBitString(){return this.isUniversal()&&this.number===a.BIT_STRING}isOctetString(){return this.isUniversal()&&this.number===a.OCTET_STRING}isOID(){return this.isUniversal()&&this.number===a.OBJECT_IDENTIFIER}isUTCTime(){return this.isUniversal()&&this.number===a.UTC_TIME}isGeneralizedTime(){return this.isUniversal()&&this.number===a.GENERALIZED_TIME}toDER(){return this.number|(this.constructed?32:0)|this.class<<6}}r.ASN1Tag=ASN1Tag},69368:function(t,r,o){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});r.createPublicKey=createPublicKey;r.digest=digest;r.verify=verify;r.bufferEqual=bufferEqual;const a=i(o(76982));function createPublicKey(t,r="spki"){if(typeof t==="string"){return a.default.createPublicKey(t)}else{return a.default.createPublicKey({key:t,format:"der",type:r})}}function digest(t,...r){const o=a.default.createHash(t);for(const t of r){o.update(t)}return o.digest()}function verify(t,r,o,i){try{return a.default.verify(i,t,r,o)}catch(t){return false}}function bufferEqual(t,r){try{return a.default.timingSafeEqual(t,r)}catch{return false}}},49032:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.preAuthEncoding=preAuthEncoding;const o="DSSEv1";function preAuthEncoding(t,r){const i=[o,t.length,t,r.length,""].join(" ");return Buffer.concat([Buffer.from(i,"ascii"),r])}},52788:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.base64Encode=base64Encode;r.base64Decode=base64Decode;const o="base64";const i="utf-8";function base64Encode(t){return Buffer.from(t,i).toString(o)}function base64Decode(t){return Buffer.from(t,o).toString(i)}},83917:function(t,r,o){var i=this&&this.__createBinding||(Object.create?function(t,r,o,i){if(i===undefined)i=o;var a=Object.getOwnPropertyDescriptor(r,o);if(!a||("get"in a?!r.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return r[o]}}}Object.defineProperty(t,i,a)}:function(t,r,o,i){if(i===undefined)i=o;t[i]=r[o]});var a=this&&this.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:true,value:r})}:function(t,r){t["default"]=r});var c=this&&this.__importStar||function(){var ownKeys=function(t){ownKeys=Object.getOwnPropertyNames||function(t){var r=[];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))r[r.length]=o;return r};return ownKeys(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var o=ownKeys(t),c=0;c{Object.defineProperty(r,"__esModule",{value:true});r.canonicalize=canonicalize;function canonicalize(t){let r="";if(t===null||typeof t!=="object"||t.toJSON!=null){r+=JSON.stringify(t)}else if(Array.isArray(t)){r+="[";let o=true;t.forEach((t=>{if(!o){r+=","}o=false;r+=canonicalize(t)}));r+="]"}else{r+="{";let o=true;Object.keys(t).sort().forEach((i=>{if(!o){r+=","}o=false;r+=JSON.stringify(i);r+=":";r+=canonicalize(t[i])}));r+="}"}return r}},91817:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.SHA2_HASH_ALGOS=r.RSA_SIGNATURE_ALGOS=r.ECDSA_SIGNATURE_ALGOS=void 0;r.ECDSA_SIGNATURE_ALGOS={"1.2.840.10045.4.3.1":"sha224","1.2.840.10045.4.3.2":"sha256","1.2.840.10045.4.3.3":"sha384","1.2.840.10045.4.3.4":"sha512"};r.RSA_SIGNATURE_ALGOS={"1.2.840.113549.1.1.14":"sha224","1.2.840.113549.1.1.11":"sha256","1.2.840.113549.1.1.12":"sha384","1.2.840.113549.1.1.13":"sha512"};r.SHA2_HASH_ALGOS={"2.16.840.1.101.3.4.2.1":"sha256","2.16.840.1.101.3.4.2.2":"sha384","2.16.840.1.101.3.4.2.3":"sha512"}},1055:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.toDER=toDER;r.fromDER=fromDER;const o=/-----BEGIN (.*)-----/;const i=/-----END (.*)-----/;function toDER(t){let r="";t.split("\n").forEach((t=>{if(t.match(o)||t.match(i)){return}r+=t}));return Buffer.from(r,"base64")}function fromDER(t,r="CERTIFICATE"){const o=t.toString("base64");const i=o.match(/.{1,64}/g)||"";return[`-----BEGIN ${r}-----`,...i,`-----END ${r}-----`].join("\n").concat("\n")}},97512:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.RFC3161TimestampVerificationError=void 0;class RFC3161TimestampVerificationError extends Error{}r.RFC3161TimestampVerificationError=RFC3161TimestampVerificationError},20994:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.RFC3161Timestamp=void 0;var i=o(92714);Object.defineProperty(r,"RFC3161Timestamp",{enumerable:true,get:function(){return i.RFC3161Timestamp}})},92714:function(t,r,o){var i=this&&this.__createBinding||(Object.create?function(t,r,o,i){if(i===undefined)i=o;var a=Object.getOwnPropertyDescriptor(r,o);if(!a||("get"in a?!r.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return r[o]}}}Object.defineProperty(t,i,a)}:function(t,r,o,i){if(i===undefined)i=o;t[i]=r[o]});var a=this&&this.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:true,value:r})}:function(t,r){t["default"]=r});var c=this&&this.__importStar||function(){var ownKeys=function(t){ownKeys=Object.getOwnPropertyNames||function(t){var r=[];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))r[r.length]=o;return r};return ownKeys(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var o=ownKeys(t),c=0;ct.tag.isContextSpecific(0)));return t.subs[0]}get encapContentInfoObj(){return this.signedDataObj.subs[2]}get signerInfosObj(){const t=this.signedDataObj;return t.subs[t.subs.length-1]}get signerInfoObj(){return this.signerInfosObj.subs[0]}get eContentTypeObj(){return this.encapContentInfoObj.subs[0]}get eContentObj(){return this.encapContentInfoObj.subs[1]}get signedAttrsObj(){const t=this.signerInfoObj.subs.find((t=>t.tag.isContextSpecific(0)));return t}get messageDigestAttributeObj(){const t=this.signedAttrsObj.subs.find((t=>t.subs[0].tag.isOID()&&t.subs[0].toOID()===M));return t}get signerSidObj(){return this.signerInfoObj.subs[1]}get signerDigestAlgorithmObj(){return this.signerInfoObj.subs[2]}get signatureAlgorithmObj(){return this.signerInfoObj.subs[4]}get signatureValueObj(){return this.signerInfoObj.subs[5]}}r.RFC3161Timestamp=RFC3161Timestamp},62925:function(t,r,o){var i=this&&this.__createBinding||(Object.create?function(t,r,o,i){if(i===undefined)i=o;var a=Object.getOwnPropertyDescriptor(r,o);if(!a||("get"in a?!r.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return r[o]}}}Object.defineProperty(t,i,a)}:function(t,r,o,i){if(i===undefined)i=o;t[i]=r[o]});var a=this&&this.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:true,value:r})}:function(t,r){t["default"]=r});var c=this&&this.__importStar||function(){var ownKeys=function(t){ownKeys=Object.getOwnPropertyNames||function(t){var r=[];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))r[r.length]=o;return r};return ownKeys(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var o=ownKeys(t),c=0;c{Object.defineProperty(r,"__esModule",{value:true});r.ByteStream=void 0;class StreamError extends Error{}class ByteStream{static BLOCK_SIZE=1024;buf;view;start=0;constructor(t){if(t){this.buf=t;this.view=Buffer.from(t)}else{this.buf=Buffer.alloc(0);this.view=Buffer.from(this.buf)}}get buffer(){return this.view.subarray(0,this.start)}get length(){return this.view.byteLength}get position(){return this.start}seek(t){this.start=t}slice(t,r){const o=t+r;if(o>this.length){throw new StreamError("request past end of buffer")}return this.view.subarray(t,o)}appendChar(t){this.ensureCapacity(1);this.view[this.start]=t;this.start+=1}appendUint16(t){this.ensureCapacity(2);const r=new Uint16Array([t]);const o=new Uint8Array(r.buffer);this.view[this.start]=o[1];this.view[this.start+1]=o[0];this.start+=2}appendUint24(t){this.ensureCapacity(3);const r=new Uint32Array([t]);const o=new Uint8Array(r.buffer);this.view[this.start]=o[2];this.view[this.start+1]=o[1];this.view[this.start+2]=o[0];this.start+=3}appendView(t){this.ensureCapacity(t.length);this.view.set(t,this.start);this.start+=t.length}getBlock(t){if(t<=0){return Buffer.alloc(0)}if(this.start+t>this.view.length){throw new Error("request past end of buffer")}const r=this.view.subarray(this.start,this.start+t);this.start+=t;return r}getUint8(){return this.getBlock(1)[0]}getUint16(){const t=this.getBlock(2);return t[0]<<8|t[1]}ensureCapacity(t){if(this.start+t>this.view.byteLength){const r=ByteStream.BLOCK_SIZE+(t>ByteStream.BLOCK_SIZE?t:0);this.realloc(this.view.byteLength+r)}}realloc(t){const r=Buffer.alloc(t);const o=Buffer.from(r);o.set(this.view);this.buf=r;this.view=o}}r.ByteStream=ByteStream},83566:function(t,r,o){var i=this&&this.__createBinding||(Object.create?function(t,r,o,i){if(i===undefined)i=o;var a=Object.getOwnPropertyDescriptor(r,o);if(!a||("get"in a?!r.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return r[o]}}}Object.defineProperty(t,i,a)}:function(t,r,o,i){if(i===undefined)i=o;t[i]=r[o]});var a=this&&this.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:true,value:r})}:function(t,r){t["default"]=r});var c=this&&this.__importStar||function(){var ownKeys=function(t){ownKeys=Object.getOwnPropertyNames||function(t){var r=[];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))r[r.length]=o;return r};return ownKeys(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var o=ownKeys(t),c=0;cr.subs[0].toOID()===t))}get tbsCertificateObj(){return this.root.subs[0]}get signatureAlgorithmObj(){return this.root.subs[1]}get signatureValueObj(){return this.root.subs[2]}get versionObj(){return this.tbsCertificateObj.subs[0]}get serialNumberObj(){return this.tbsCertificateObj.subs[1]}get issuerObj(){return this.tbsCertificateObj.subs[3]}get validityObj(){return this.tbsCertificateObj.subs[4]}get subjectObj(){return this.tbsCertificateObj.subs[5]}get subjectPublicKeyInfoObj(){return this.tbsCertificateObj.subs[6]}get extensionsObj(){return this.tbsCertificateObj.subs.find((t=>t.tag.isContextSpecific(3)))}}r.X509Certificate=X509Certificate},96389:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.X509SCTExtension=r.X509SubjectKeyIDExtension=r.X509AuthorityKeyIDExtension=r.X509SubjectAlternativeNameExtension=r.X509KeyUsageExtension=r.X509BasicConstraintsExtension=r.X509Extension=void 0;const i=o(1673);const a=o(6144);class X509Extension{root;constructor(t){this.root=t}get oid(){return this.root.subs[0].toOID()}get critical(){return this.root.subs.length===3?this.root.subs[1].toBoolean():false}get value(){return this.extnValueObj.value}get valueObj(){return this.extnValueObj}get extnValueObj(){return this.root.subs[this.root.subs.length-1]}}r.X509Extension=X509Extension;class X509BasicConstraintsExtension extends X509Extension{get isCA(){return this.sequence.subs[0]?.toBoolean()??false}get pathLenConstraint(){return this.sequence.subs.length>1?this.sequence.subs[1].toInteger():undefined}get sequence(){return this.extnValueObj.subs[0]}}r.X509BasicConstraintsExtension=X509BasicConstraintsExtension;class X509KeyUsageExtension extends X509Extension{get digitalSignature(){return this.bitString[0]===1}get keyCertSign(){return this.bitString[5]===1}get crlSign(){return this.bitString[6]===1}get bitString(){return this.extnValueObj.subs[0].toBitString()}}r.X509KeyUsageExtension=X509KeyUsageExtension;class X509SubjectAlternativeNameExtension extends X509Extension{get rfc822Name(){return this.findGeneralName(1)?.value.toString("ascii")}get uri(){return this.findGeneralName(6)?.value.toString("ascii")}otherName(t){const r=this.findGeneralName(0);if(r===undefined){return undefined}const o=r.subs[0].toOID();if(o!==t){return undefined}const i=r.subs[1];return i.subs[0].value.toString("ascii")}findGeneralName(t){return this.generalNames.find((r=>r.tag.isContextSpecific(t)))}get generalNames(){return this.extnValueObj.subs[0].subs}}r.X509SubjectAlternativeNameExtension=X509SubjectAlternativeNameExtension;class X509AuthorityKeyIDExtension extends X509Extension{get keyIdentifier(){return this.findSequenceMember(0)?.value}findSequenceMember(t){return this.sequence.subs.find((r=>r.tag.isContextSpecific(t)))}get sequence(){return this.extnValueObj.subs[0]}}r.X509AuthorityKeyIDExtension=X509AuthorityKeyIDExtension;class X509SubjectKeyIDExtension extends X509Extension{get keyIdentifier(){return this.extnValueObj.subs[0].value}}r.X509SubjectKeyIDExtension=X509SubjectKeyIDExtension;class X509SCTExtension extends X509Extension{constructor(t){super(t)}get signedCertificateTimestamps(){const t=this.extnValueObj.subs[0].value;const r=new i.ByteStream(t);const o=r.getUint16()+2;const c=[];while(r.position{Object.defineProperty(r,"__esModule",{value:true});r.X509SCTExtension=r.X509Certificate=r.EXTENSION_OID_SCT=void 0;var i=o(83566);Object.defineProperty(r,"EXTENSION_OID_SCT",{enumerable:true,get:function(){return i.EXTENSION_OID_SCT}});Object.defineProperty(r,"X509Certificate",{enumerable:true,get:function(){return i.X509Certificate}});var a=o(96389);Object.defineProperty(r,"X509SCTExtension",{enumerable:true,get:function(){return a.X509SCTExtension}})},6144:function(t,r,o){var i=this&&this.__createBinding||(Object.create?function(t,r,o,i){if(i===undefined)i=o;var a=Object.getOwnPropertyDescriptor(r,o);if(!a||("get"in a?!r.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return r[o]}}}Object.defineProperty(t,i,a)}:function(t,r,o,i){if(i===undefined)i=o;t[i]=r[o]});var a=this&&this.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:true,value:r})}:function(t,r){t["default"]=r});var c=this&&this.__importStar||function(){var ownKeys=function(t){ownKeys=Object.getOwnPropertyNames||function(t){var r=[];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))r[r.length]=o;return r};return ownKeys(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var o=ownKeys(t),c=0;c0){o.appendView(this.extensions)}return p.verify(o.buffer,r,this.signature,this.algorithm)}static parse(t){const r=new u.ByteStream(t);const o=r.getUint8();const i=r.getBlock(32);const a=r.getBlock(8);const c=r.getUint16();const p=r.getBlock(c);const l=r.getUint8();const d=r.getUint8();const A=r.getUint16();const b=r.getBlock(A);if(r.position!==t.length){throw new Error("SCT buffer length mismatch")}return new SignedCertificateTimestamp({version:o,logID:i,timestamp:a,extensions:p,hashAlgorithm:l,signatureAlgorithm:d,signature:b})}}r.SignedCertificateTimestamp=SignedCertificateTimestamp},47030:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.Signature=r.Envelope=void 0;r.Envelope={fromJSON(t){return{payload:isSet(t.payload)?Buffer.from(bytesFromBase64(t.payload)):Buffer.alloc(0),payloadType:isSet(t.payloadType)?globalThis.String(t.payloadType):"",signatures:globalThis.Array.isArray(t?.signatures)?t.signatures.map((t=>r.Signature.fromJSON(t))):[]}},toJSON(t){const o={};if(t.payload.length!==0){o.payload=base64FromBytes(t.payload)}if(t.payloadType!==""){o.payloadType=t.payloadType}if(t.signatures?.length){o.signatures=t.signatures.map((t=>r.Signature.toJSON(t)))}return o}};r.Signature={fromJSON(t){return{sig:isSet(t.sig)?Buffer.from(bytesFromBase64(t.sig)):Buffer.alloc(0),keyid:isSet(t.keyid)?globalThis.String(t.keyid):""}},toJSON(t){const r={};if(t.sig.length!==0){r.sig=base64FromBytes(t.sig)}if(t.keyid!==""){r.keyid=t.keyid}return r}};function bytesFromBase64(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}function base64FromBytes(t){return globalThis.Buffer.from(t).toString("base64")}function isSet(t){return t!==null&&t!==undefined}},45e3:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.Timestamp=void 0;r.Timestamp={fromJSON(t){return{seconds:isSet(t.seconds)?globalThis.String(t.seconds):"0",nanos:isSet(t.nanos)?globalThis.Number(t.nanos):0}},toJSON(t){const r={};if(t.seconds!=="0"){r.seconds=t.seconds}if(t.nanos!==0){r.nanos=Math.round(t.nanos)}return r}};function isSet(t){return t!==null&&t!==undefined}},36764:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.DSSELogEntryV002=r.DSSERequestV002=void 0;const i=o(47030);const a=o(5334);const c=o(7543);r.DSSERequestV002={fromJSON(t){return{envelope:isSet(t.envelope)?i.Envelope.fromJSON(t.envelope):undefined,verifiers:globalThis.Array.isArray(t?.verifiers)?t.verifiers.map((t=>c.Verifier.fromJSON(t))):[]}},toJSON(t){const r={};if(t.envelope!==undefined){r.envelope=i.Envelope.toJSON(t.envelope)}if(t.verifiers?.length){r.verifiers=t.verifiers.map((t=>c.Verifier.toJSON(t)))}return r}};r.DSSELogEntryV002={fromJSON(t){return{payloadHash:isSet(t.payloadHash)?a.HashOutput.fromJSON(t.payloadHash):undefined,signatures:globalThis.Array.isArray(t?.signatures)?t.signatures.map((t=>c.Signature.fromJSON(t))):[]}},toJSON(t){const r={};if(t.payloadHash!==undefined){r.payloadHash=a.HashOutput.toJSON(t.payloadHash)}if(t.signatures?.length){r.signatures=t.signatures.map((t=>c.Signature.toJSON(t)))}return r}};function isSet(t){return t!==null&&t!==undefined}},381:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.CreateEntryRequest=r.Spec=r.Entry=void 0;const i=o(36764);const a=o(4969);r.Entry={fromJSON(t){return{kind:isSet(t.kind)?globalThis.String(t.kind):"",apiVersion:isSet(t.apiVersion)?globalThis.String(t.apiVersion):"",spec:isSet(t.spec)?r.Spec.fromJSON(t.spec):undefined}},toJSON(t){const o={};if(t.kind!==""){o.kind=t.kind}if(t.apiVersion!==""){o.apiVersion=t.apiVersion}if(t.spec!==undefined){o.spec=r.Spec.toJSON(t.spec)}return o}};r.Spec={fromJSON(t){return{spec:isSet(t.hashedRekordV002)?{$case:"hashedRekordV002",hashedRekordV002:a.HashedRekordLogEntryV002.fromJSON(t.hashedRekordV002)}:isSet(t.dsseV002)?{$case:"dsseV002",dsseV002:i.DSSELogEntryV002.fromJSON(t.dsseV002)}:undefined}},toJSON(t){const r={};if(t.spec?.$case==="hashedRekordV002"){r.hashedRekordV002=a.HashedRekordLogEntryV002.toJSON(t.spec.hashedRekordV002)}else if(t.spec?.$case==="dsseV002"){r.dsseV002=i.DSSELogEntryV002.toJSON(t.spec.dsseV002)}return r}};r.CreateEntryRequest={fromJSON(t){return{spec:isSet(t.hashedRekordRequestV002)?{$case:"hashedRekordRequestV002",hashedRekordRequestV002:a.HashedRekordRequestV002.fromJSON(t.hashedRekordRequestV002)}:isSet(t.dsseRequestV002)?{$case:"dsseRequestV002",dsseRequestV002:i.DSSERequestV002.fromJSON(t.dsseRequestV002)}:undefined}},toJSON(t){const r={};if(t.spec?.$case==="hashedRekordRequestV002"){r.hashedRekordRequestV002=a.HashedRekordRequestV002.toJSON(t.spec.hashedRekordRequestV002)}else if(t.spec?.$case==="dsseRequestV002"){r.dsseRequestV002=i.DSSERequestV002.toJSON(t.spec.dsseRequestV002)}return r}};function isSet(t){return t!==null&&t!==undefined}},4969:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.HashedRekordLogEntryV002=r.HashedRekordRequestV002=void 0;const i=o(5334);const a=o(7543);r.HashedRekordRequestV002={fromJSON(t){return{digest:isSet(t.digest)?Buffer.from(bytesFromBase64(t.digest)):Buffer.alloc(0),signature:isSet(t.signature)?a.Signature.fromJSON(t.signature):undefined}},toJSON(t){const r={};if(t.digest.length!==0){r.digest=base64FromBytes(t.digest)}if(t.signature!==undefined){r.signature=a.Signature.toJSON(t.signature)}return r}};r.HashedRekordLogEntryV002={fromJSON(t){return{data:isSet(t.data)?i.HashOutput.fromJSON(t.data):undefined,signature:isSet(t.signature)?a.Signature.fromJSON(t.signature):undefined}},toJSON(t){const r={};if(t.data!==undefined){r.data=i.HashOutput.toJSON(t.data)}if(t.signature!==undefined){r.signature=a.Signature.toJSON(t.signature)}return r}};function bytesFromBase64(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}function base64FromBytes(t){return globalThis.Buffer.from(t).toString("base64")}function isSet(t){return t!==null&&t!==undefined}},7543:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.Signature=r.Verifier=r.PublicKey=void 0;const i=o(5334);r.PublicKey={fromJSON(t){return{rawBytes:isSet(t.rawBytes)?Buffer.from(bytesFromBase64(t.rawBytes)):Buffer.alloc(0)}},toJSON(t){const r={};if(t.rawBytes.length!==0){r.rawBytes=base64FromBytes(t.rawBytes)}return r}};r.Verifier={fromJSON(t){return{verifier:isSet(t.publicKey)?{$case:"publicKey",publicKey:r.PublicKey.fromJSON(t.publicKey)}:isSet(t.x509Certificate)?{$case:"x509Certificate",x509Certificate:i.X509Certificate.fromJSON(t.x509Certificate)}:undefined,keyDetails:isSet(t.keyDetails)?(0,i.publicKeyDetailsFromJSON)(t.keyDetails):0}},toJSON(t){const o={};if(t.verifier?.$case==="publicKey"){o.publicKey=r.PublicKey.toJSON(t.verifier.publicKey)}else if(t.verifier?.$case==="x509Certificate"){o.x509Certificate=i.X509Certificate.toJSON(t.verifier.x509Certificate)}if(t.keyDetails!==0){o.keyDetails=(0,i.publicKeyDetailsToJSON)(t.keyDetails)}return o}};r.Signature={fromJSON(t){return{content:isSet(t.content)?Buffer.from(bytesFromBase64(t.content)):Buffer.alloc(0),verifier:isSet(t.verifier)?r.Verifier.fromJSON(t.verifier):undefined}},toJSON(t){const o={};if(t.content.length!==0){o.content=base64FromBytes(t.content)}if(t.verifier!==undefined){o.verifier=r.Verifier.toJSON(t.verifier)}return o}};function bytesFromBase64(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}function base64FromBytes(t){return globalThis.Buffer.from(t).toString("base64")}function isSet(t){return t!==null&&t!==undefined}},70715:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.Bundle=r.VerificationMaterial=r.TimestampVerificationData=void 0;const i=o(47030);const a=o(5334);const c=o(85204);r.TimestampVerificationData={fromJSON(t){return{rfc3161Timestamps:globalThis.Array.isArray(t?.rfc3161Timestamps)?t.rfc3161Timestamps.map((t=>a.RFC3161SignedTimestamp.fromJSON(t))):[]}},toJSON(t){const r={};if(t.rfc3161Timestamps?.length){r.rfc3161Timestamps=t.rfc3161Timestamps.map((t=>a.RFC3161SignedTimestamp.toJSON(t)))}return r}};r.VerificationMaterial={fromJSON(t){return{content:isSet(t.publicKey)?{$case:"publicKey",publicKey:a.PublicKeyIdentifier.fromJSON(t.publicKey)}:isSet(t.x509CertificateChain)?{$case:"x509CertificateChain",x509CertificateChain:a.X509CertificateChain.fromJSON(t.x509CertificateChain)}:isSet(t.certificate)?{$case:"certificate",certificate:a.X509Certificate.fromJSON(t.certificate)}:undefined,tlogEntries:globalThis.Array.isArray(t?.tlogEntries)?t.tlogEntries.map((t=>c.TransparencyLogEntry.fromJSON(t))):[],timestampVerificationData:isSet(t.timestampVerificationData)?r.TimestampVerificationData.fromJSON(t.timestampVerificationData):undefined}},toJSON(t){const o={};if(t.content?.$case==="publicKey"){o.publicKey=a.PublicKeyIdentifier.toJSON(t.content.publicKey)}else if(t.content?.$case==="x509CertificateChain"){o.x509CertificateChain=a.X509CertificateChain.toJSON(t.content.x509CertificateChain)}else if(t.content?.$case==="certificate"){o.certificate=a.X509Certificate.toJSON(t.content.certificate)}if(t.tlogEntries?.length){o.tlogEntries=t.tlogEntries.map((t=>c.TransparencyLogEntry.toJSON(t)))}if(t.timestampVerificationData!==undefined){o.timestampVerificationData=r.TimestampVerificationData.toJSON(t.timestampVerificationData)}return o}};r.Bundle={fromJSON(t){return{mediaType:isSet(t.mediaType)?globalThis.String(t.mediaType):"",verificationMaterial:isSet(t.verificationMaterial)?r.VerificationMaterial.fromJSON(t.verificationMaterial):undefined,content:isSet(t.messageSignature)?{$case:"messageSignature",messageSignature:a.MessageSignature.fromJSON(t.messageSignature)}:isSet(t.dsseEnvelope)?{$case:"dsseEnvelope",dsseEnvelope:i.Envelope.fromJSON(t.dsseEnvelope)}:undefined}},toJSON(t){const o={};if(t.mediaType!==""){o.mediaType=t.mediaType}if(t.verificationMaterial!==undefined){o.verificationMaterial=r.VerificationMaterial.toJSON(t.verificationMaterial)}if(t.content?.$case==="messageSignature"){o.messageSignature=a.MessageSignature.toJSON(t.content.messageSignature)}else if(t.content?.$case==="dsseEnvelope"){o.dsseEnvelope=i.Envelope.toJSON(t.content.dsseEnvelope)}return o}};function isSet(t){return t!==null&&t!==undefined}},5334:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.TimeRange=r.X509CertificateChain=r.SubjectAlternativeName=r.X509Certificate=r.DistinguishedName=r.ObjectIdentifierValuePair=r.ObjectIdentifier=r.PublicKeyIdentifier=r.PublicKey=r.RFC3161SignedTimestamp=r.LogId=r.MessageSignature=r.HashOutput=r.SubjectAlternativeNameType=r.PublicKeyDetails=r.HashAlgorithm=void 0;r.hashAlgorithmFromJSON=hashAlgorithmFromJSON;r.hashAlgorithmToJSON=hashAlgorithmToJSON;r.publicKeyDetailsFromJSON=publicKeyDetailsFromJSON;r.publicKeyDetailsToJSON=publicKeyDetailsToJSON;r.subjectAlternativeNameTypeFromJSON=subjectAlternativeNameTypeFromJSON;r.subjectAlternativeNameTypeToJSON=subjectAlternativeNameTypeToJSON;const i=o(45e3);var a;(function(t){t[t["HASH_ALGORITHM_UNSPECIFIED"]=0]="HASH_ALGORITHM_UNSPECIFIED";t[t["SHA2_256"]=1]="SHA2_256";t[t["SHA2_384"]=2]="SHA2_384";t[t["SHA2_512"]=3]="SHA2_512";t[t["SHA3_256"]=4]="SHA3_256";t[t["SHA3_384"]=5]="SHA3_384"})(a||(r.HashAlgorithm=a={}));function hashAlgorithmFromJSON(t){switch(t){case 0:case"HASH_ALGORITHM_UNSPECIFIED":return a.HASH_ALGORITHM_UNSPECIFIED;case 1:case"SHA2_256":return a.SHA2_256;case 2:case"SHA2_384":return a.SHA2_384;case 3:case"SHA2_512":return a.SHA2_512;case 4:case"SHA3_256":return a.SHA3_256;case 5:case"SHA3_384":return a.SHA3_384;default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum HashAlgorithm")}}function hashAlgorithmToJSON(t){switch(t){case a.HASH_ALGORITHM_UNSPECIFIED:return"HASH_ALGORITHM_UNSPECIFIED";case a.SHA2_256:return"SHA2_256";case a.SHA2_384:return"SHA2_384";case a.SHA2_512:return"SHA2_512";case a.SHA3_256:return"SHA3_256";case a.SHA3_384:return"SHA3_384";default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum HashAlgorithm")}}var c;(function(t){t[t["PUBLIC_KEY_DETAILS_UNSPECIFIED"]=0]="PUBLIC_KEY_DETAILS_UNSPECIFIED";t[t["PKCS1_RSA_PKCS1V5"]=1]="PKCS1_RSA_PKCS1V5";t[t["PKCS1_RSA_PSS"]=2]="PKCS1_RSA_PSS";t[t["PKIX_RSA_PKCS1V5"]=3]="PKIX_RSA_PKCS1V5";t[t["PKIX_RSA_PSS"]=4]="PKIX_RSA_PSS";t[t["PKIX_RSA_PKCS1V15_2048_SHA256"]=9]="PKIX_RSA_PKCS1V15_2048_SHA256";t[t["PKIX_RSA_PKCS1V15_3072_SHA256"]=10]="PKIX_RSA_PKCS1V15_3072_SHA256";t[t["PKIX_RSA_PKCS1V15_4096_SHA256"]=11]="PKIX_RSA_PKCS1V15_4096_SHA256";t[t["PKIX_RSA_PSS_2048_SHA256"]=16]="PKIX_RSA_PSS_2048_SHA256";t[t["PKIX_RSA_PSS_3072_SHA256"]=17]="PKIX_RSA_PSS_3072_SHA256";t[t["PKIX_RSA_PSS_4096_SHA256"]=18]="PKIX_RSA_PSS_4096_SHA256";t[t["PKIX_ECDSA_P256_HMAC_SHA_256"]=6]="PKIX_ECDSA_P256_HMAC_SHA_256";t[t["PKIX_ECDSA_P256_SHA_256"]=5]="PKIX_ECDSA_P256_SHA_256";t[t["PKIX_ECDSA_P384_SHA_384"]=12]="PKIX_ECDSA_P384_SHA_384";t[t["PKIX_ECDSA_P521_SHA_512"]=13]="PKIX_ECDSA_P521_SHA_512";t[t["PKIX_ED25519"]=7]="PKIX_ED25519";t[t["PKIX_ED25519_PH"]=8]="PKIX_ED25519_PH";t[t["PKIX_ECDSA_P384_SHA_256"]=19]="PKIX_ECDSA_P384_SHA_256";t[t["PKIX_ECDSA_P521_SHA_256"]=20]="PKIX_ECDSA_P521_SHA_256";t[t["LMS_SHA256"]=14]="LMS_SHA256";t[t["LMOTS_SHA256"]=15]="LMOTS_SHA256";t[t["ML_DSA_65"]=21]="ML_DSA_65";t[t["ML_DSA_87"]=22]="ML_DSA_87"})(c||(r.PublicKeyDetails=c={}));function publicKeyDetailsFromJSON(t){switch(t){case 0:case"PUBLIC_KEY_DETAILS_UNSPECIFIED":return c.PUBLIC_KEY_DETAILS_UNSPECIFIED;case 1:case"PKCS1_RSA_PKCS1V5":return c.PKCS1_RSA_PKCS1V5;case 2:case"PKCS1_RSA_PSS":return c.PKCS1_RSA_PSS;case 3:case"PKIX_RSA_PKCS1V5":return c.PKIX_RSA_PKCS1V5;case 4:case"PKIX_RSA_PSS":return c.PKIX_RSA_PSS;case 9:case"PKIX_RSA_PKCS1V15_2048_SHA256":return c.PKIX_RSA_PKCS1V15_2048_SHA256;case 10:case"PKIX_RSA_PKCS1V15_3072_SHA256":return c.PKIX_RSA_PKCS1V15_3072_SHA256;case 11:case"PKIX_RSA_PKCS1V15_4096_SHA256":return c.PKIX_RSA_PKCS1V15_4096_SHA256;case 16:case"PKIX_RSA_PSS_2048_SHA256":return c.PKIX_RSA_PSS_2048_SHA256;case 17:case"PKIX_RSA_PSS_3072_SHA256":return c.PKIX_RSA_PSS_3072_SHA256;case 18:case"PKIX_RSA_PSS_4096_SHA256":return c.PKIX_RSA_PSS_4096_SHA256;case 6:case"PKIX_ECDSA_P256_HMAC_SHA_256":return c.PKIX_ECDSA_P256_HMAC_SHA_256;case 5:case"PKIX_ECDSA_P256_SHA_256":return c.PKIX_ECDSA_P256_SHA_256;case 12:case"PKIX_ECDSA_P384_SHA_384":return c.PKIX_ECDSA_P384_SHA_384;case 13:case"PKIX_ECDSA_P521_SHA_512":return c.PKIX_ECDSA_P521_SHA_512;case 7:case"PKIX_ED25519":return c.PKIX_ED25519;case 8:case"PKIX_ED25519_PH":return c.PKIX_ED25519_PH;case 19:case"PKIX_ECDSA_P384_SHA_256":return c.PKIX_ECDSA_P384_SHA_256;case 20:case"PKIX_ECDSA_P521_SHA_256":return c.PKIX_ECDSA_P521_SHA_256;case 14:case"LMS_SHA256":return c.LMS_SHA256;case 15:case"LMOTS_SHA256":return c.LMOTS_SHA256;case 21:case"ML_DSA_65":return c.ML_DSA_65;case 22:case"ML_DSA_87":return c.ML_DSA_87;default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum PublicKeyDetails")}}function publicKeyDetailsToJSON(t){switch(t){case c.PUBLIC_KEY_DETAILS_UNSPECIFIED:return"PUBLIC_KEY_DETAILS_UNSPECIFIED";case c.PKCS1_RSA_PKCS1V5:return"PKCS1_RSA_PKCS1V5";case c.PKCS1_RSA_PSS:return"PKCS1_RSA_PSS";case c.PKIX_RSA_PKCS1V5:return"PKIX_RSA_PKCS1V5";case c.PKIX_RSA_PSS:return"PKIX_RSA_PSS";case c.PKIX_RSA_PKCS1V15_2048_SHA256:return"PKIX_RSA_PKCS1V15_2048_SHA256";case c.PKIX_RSA_PKCS1V15_3072_SHA256:return"PKIX_RSA_PKCS1V15_3072_SHA256";case c.PKIX_RSA_PKCS1V15_4096_SHA256:return"PKIX_RSA_PKCS1V15_4096_SHA256";case c.PKIX_RSA_PSS_2048_SHA256:return"PKIX_RSA_PSS_2048_SHA256";case c.PKIX_RSA_PSS_3072_SHA256:return"PKIX_RSA_PSS_3072_SHA256";case c.PKIX_RSA_PSS_4096_SHA256:return"PKIX_RSA_PSS_4096_SHA256";case c.PKIX_ECDSA_P256_HMAC_SHA_256:return"PKIX_ECDSA_P256_HMAC_SHA_256";case c.PKIX_ECDSA_P256_SHA_256:return"PKIX_ECDSA_P256_SHA_256";case c.PKIX_ECDSA_P384_SHA_384:return"PKIX_ECDSA_P384_SHA_384";case c.PKIX_ECDSA_P521_SHA_512:return"PKIX_ECDSA_P521_SHA_512";case c.PKIX_ED25519:return"PKIX_ED25519";case c.PKIX_ED25519_PH:return"PKIX_ED25519_PH";case c.PKIX_ECDSA_P384_SHA_256:return"PKIX_ECDSA_P384_SHA_256";case c.PKIX_ECDSA_P521_SHA_256:return"PKIX_ECDSA_P521_SHA_256";case c.LMS_SHA256:return"LMS_SHA256";case c.LMOTS_SHA256:return"LMOTS_SHA256";case c.ML_DSA_65:return"ML_DSA_65";case c.ML_DSA_87:return"ML_DSA_87";default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum PublicKeyDetails")}}var p;(function(t){t[t["SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED"]=0]="SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED";t[t["EMAIL"]=1]="EMAIL";t[t["URI"]=2]="URI";t[t["OTHER_NAME"]=3]="OTHER_NAME"})(p||(r.SubjectAlternativeNameType=p={}));function subjectAlternativeNameTypeFromJSON(t){switch(t){case 0:case"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED":return p.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED;case 1:case"EMAIL":return p.EMAIL;case 2:case"URI":return p.URI;case 3:case"OTHER_NAME":return p.OTHER_NAME;default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum SubjectAlternativeNameType")}}function subjectAlternativeNameTypeToJSON(t){switch(t){case p.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED:return"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED";case p.EMAIL:return"EMAIL";case p.URI:return"URI";case p.OTHER_NAME:return"OTHER_NAME";default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum SubjectAlternativeNameType")}}r.HashOutput={fromJSON(t){return{algorithm:isSet(t.algorithm)?hashAlgorithmFromJSON(t.algorithm):0,digest:isSet(t.digest)?Buffer.from(bytesFromBase64(t.digest)):Buffer.alloc(0)}},toJSON(t){const r={};if(t.algorithm!==0){r.algorithm=hashAlgorithmToJSON(t.algorithm)}if(t.digest.length!==0){r.digest=base64FromBytes(t.digest)}return r}};r.MessageSignature={fromJSON(t){return{messageDigest:isSet(t.messageDigest)?r.HashOutput.fromJSON(t.messageDigest):undefined,signature:isSet(t.signature)?Buffer.from(bytesFromBase64(t.signature)):Buffer.alloc(0)}},toJSON(t){const o={};if(t.messageDigest!==undefined){o.messageDigest=r.HashOutput.toJSON(t.messageDigest)}if(t.signature.length!==0){o.signature=base64FromBytes(t.signature)}return o}};r.LogId={fromJSON(t){return{keyId:isSet(t.keyId)?Buffer.from(bytesFromBase64(t.keyId)):Buffer.alloc(0)}},toJSON(t){const r={};if(t.keyId.length!==0){r.keyId=base64FromBytes(t.keyId)}return r}};r.RFC3161SignedTimestamp={fromJSON(t){return{signedTimestamp:isSet(t.signedTimestamp)?Buffer.from(bytesFromBase64(t.signedTimestamp)):Buffer.alloc(0)}},toJSON(t){const r={};if(t.signedTimestamp.length!==0){r.signedTimestamp=base64FromBytes(t.signedTimestamp)}return r}};r.PublicKey={fromJSON(t){return{rawBytes:isSet(t.rawBytes)?Buffer.from(bytesFromBase64(t.rawBytes)):undefined,keyDetails:isSet(t.keyDetails)?publicKeyDetailsFromJSON(t.keyDetails):0,validFor:isSet(t.validFor)?r.TimeRange.fromJSON(t.validFor):undefined}},toJSON(t){const o={};if(t.rawBytes!==undefined){o.rawBytes=base64FromBytes(t.rawBytes)}if(t.keyDetails!==0){o.keyDetails=publicKeyDetailsToJSON(t.keyDetails)}if(t.validFor!==undefined){o.validFor=r.TimeRange.toJSON(t.validFor)}return o}};r.PublicKeyIdentifier={fromJSON(t){return{hint:isSet(t.hint)?globalThis.String(t.hint):""}},toJSON(t){const r={};if(t.hint!==""){r.hint=t.hint}return r}};r.ObjectIdentifier={fromJSON(t){return{id:globalThis.Array.isArray(t?.id)?t.id.map((t=>globalThis.Number(t))):[]}},toJSON(t){const r={};if(t.id?.length){r.id=t.id.map((t=>Math.round(t)))}return r}};r.ObjectIdentifierValuePair={fromJSON(t){return{oid:isSet(t.oid)?r.ObjectIdentifier.fromJSON(t.oid):undefined,value:isSet(t.value)?Buffer.from(bytesFromBase64(t.value)):Buffer.alloc(0)}},toJSON(t){const o={};if(t.oid!==undefined){o.oid=r.ObjectIdentifier.toJSON(t.oid)}if(t.value.length!==0){o.value=base64FromBytes(t.value)}return o}};r.DistinguishedName={fromJSON(t){return{organization:isSet(t.organization)?globalThis.String(t.organization):"",commonName:isSet(t.commonName)?globalThis.String(t.commonName):""}},toJSON(t){const r={};if(t.organization!==""){r.organization=t.organization}if(t.commonName!==""){r.commonName=t.commonName}return r}};r.X509Certificate={fromJSON(t){return{rawBytes:isSet(t.rawBytes)?Buffer.from(bytesFromBase64(t.rawBytes)):Buffer.alloc(0)}},toJSON(t){const r={};if(t.rawBytes.length!==0){r.rawBytes=base64FromBytes(t.rawBytes)}return r}};r.SubjectAlternativeName={fromJSON(t){return{type:isSet(t.type)?subjectAlternativeNameTypeFromJSON(t.type):0,identity:isSet(t.regexp)?{$case:"regexp",regexp:globalThis.String(t.regexp)}:isSet(t.value)?{$case:"value",value:globalThis.String(t.value)}:undefined}},toJSON(t){const r={};if(t.type!==0){r.type=subjectAlternativeNameTypeToJSON(t.type)}if(t.identity?.$case==="regexp"){r.regexp=t.identity.regexp}else if(t.identity?.$case==="value"){r.value=t.identity.value}return r}};r.X509CertificateChain={fromJSON(t){return{certificates:globalThis.Array.isArray(t?.certificates)?t.certificates.map((t=>r.X509Certificate.fromJSON(t))):[]}},toJSON(t){const o={};if(t.certificates?.length){o.certificates=t.certificates.map((t=>r.X509Certificate.toJSON(t)))}return o}};r.TimeRange={fromJSON(t){return{start:isSet(t.start)?fromJsonTimestamp(t.start):undefined,end:isSet(t.end)?fromJsonTimestamp(t.end):undefined}},toJSON(t){const r={};if(t.start!==undefined){r.start=t.start.toISOString()}if(t.end!==undefined){r.end=t.end.toISOString()}return r}};function bytesFromBase64(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}function base64FromBytes(t){return globalThis.Buffer.from(t).toString("base64")}function fromTimestamp(t){let r=(globalThis.Number(t.seconds)||0)*1e3;r+=(t.nanos||0)/1e6;return new globalThis.Date(r)}function fromJsonTimestamp(t){if(t instanceof globalThis.Date){return t}else if(typeof t==="string"){return new globalThis.Date(t)}else{return fromTimestamp(i.Timestamp.fromJSON(t))}}function isSet(t){return t!==null&&t!==undefined}},85204:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.TransparencyLogEntry=r.InclusionPromise=r.InclusionProof=r.Checkpoint=r.KindVersion=void 0;const i=o(5334);r.KindVersion={fromJSON(t){return{kind:isSet(t.kind)?globalThis.String(t.kind):"",version:isSet(t.version)?globalThis.String(t.version):""}},toJSON(t){const r={};if(t.kind!==""){r.kind=t.kind}if(t.version!==""){r.version=t.version}return r}};r.Checkpoint={fromJSON(t){return{envelope:isSet(t.envelope)?globalThis.String(t.envelope):""}},toJSON(t){const r={};if(t.envelope!==""){r.envelope=t.envelope}return r}};r.InclusionProof={fromJSON(t){return{logIndex:isSet(t.logIndex)?globalThis.String(t.logIndex):"0",rootHash:isSet(t.rootHash)?Buffer.from(bytesFromBase64(t.rootHash)):Buffer.alloc(0),treeSize:isSet(t.treeSize)?globalThis.String(t.treeSize):"0",hashes:globalThis.Array.isArray(t?.hashes)?t.hashes.map((t=>Buffer.from(bytesFromBase64(t)))):[],checkpoint:isSet(t.checkpoint)?r.Checkpoint.fromJSON(t.checkpoint):undefined}},toJSON(t){const o={};if(t.logIndex!=="0"){o.logIndex=t.logIndex}if(t.rootHash.length!==0){o.rootHash=base64FromBytes(t.rootHash)}if(t.treeSize!=="0"){o.treeSize=t.treeSize}if(t.hashes?.length){o.hashes=t.hashes.map((t=>base64FromBytes(t)))}if(t.checkpoint!==undefined){o.checkpoint=r.Checkpoint.toJSON(t.checkpoint)}return o}};r.InclusionPromise={fromJSON(t){return{signedEntryTimestamp:isSet(t.signedEntryTimestamp)?Buffer.from(bytesFromBase64(t.signedEntryTimestamp)):Buffer.alloc(0)}},toJSON(t){const r={};if(t.signedEntryTimestamp.length!==0){r.signedEntryTimestamp=base64FromBytes(t.signedEntryTimestamp)}return r}};r.TransparencyLogEntry={fromJSON(t){return{logIndex:isSet(t.logIndex)?globalThis.String(t.logIndex):"0",logId:isSet(t.logId)?i.LogId.fromJSON(t.logId):undefined,kindVersion:isSet(t.kindVersion)?r.KindVersion.fromJSON(t.kindVersion):undefined,integratedTime:isSet(t.integratedTime)?globalThis.String(t.integratedTime):"0",inclusionPromise:isSet(t.inclusionPromise)?r.InclusionPromise.fromJSON(t.inclusionPromise):undefined,inclusionProof:isSet(t.inclusionProof)?r.InclusionProof.fromJSON(t.inclusionProof):undefined,canonicalizedBody:isSet(t.canonicalizedBody)?Buffer.from(bytesFromBase64(t.canonicalizedBody)):Buffer.alloc(0)}},toJSON(t){const o={};if(t.logIndex!=="0"){o.logIndex=t.logIndex}if(t.logId!==undefined){o.logId=i.LogId.toJSON(t.logId)}if(t.kindVersion!==undefined){o.kindVersion=r.KindVersion.toJSON(t.kindVersion)}if(t.integratedTime!=="0"){o.integratedTime=t.integratedTime}if(t.inclusionPromise!==undefined){o.inclusionPromise=r.InclusionPromise.toJSON(t.inclusionPromise)}if(t.inclusionProof!==undefined){o.inclusionProof=r.InclusionProof.toJSON(t.inclusionProof)}if(t.canonicalizedBody.length!==0){o.canonicalizedBody=base64FromBytes(t.canonicalizedBody)}return o}};function bytesFromBase64(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}function base64FromBytes(t){return globalThis.Buffer.from(t).toString("base64")}function isSet(t){return t!==null&&t!==undefined}},61997:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.ClientTrustConfig=r.ServiceConfiguration=r.Service=r.SigningConfig=r.TrustedRoot=r.CertificateAuthority=r.TransparencyLogInstance=r.ServiceSelector=void 0;r.serviceSelectorFromJSON=serviceSelectorFromJSON;r.serviceSelectorToJSON=serviceSelectorToJSON;const i=o(5334);var a;(function(t){t[t["SERVICE_SELECTOR_UNDEFINED"]=0]="SERVICE_SELECTOR_UNDEFINED";t[t["ALL"]=1]="ALL";t[t["ANY"]=2]="ANY";t[t["EXACT"]=3]="EXACT"})(a||(r.ServiceSelector=a={}));function serviceSelectorFromJSON(t){switch(t){case 0:case"SERVICE_SELECTOR_UNDEFINED":return a.SERVICE_SELECTOR_UNDEFINED;case 1:case"ALL":return a.ALL;case 2:case"ANY":return a.ANY;case 3:case"EXACT":return a.EXACT;default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum ServiceSelector")}}function serviceSelectorToJSON(t){switch(t){case a.SERVICE_SELECTOR_UNDEFINED:return"SERVICE_SELECTOR_UNDEFINED";case a.ALL:return"ALL";case a.ANY:return"ANY";case a.EXACT:return"EXACT";default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum ServiceSelector")}}r.TransparencyLogInstance={fromJSON(t){return{baseUrl:isSet(t.baseUrl)?globalThis.String(t.baseUrl):"",hashAlgorithm:isSet(t.hashAlgorithm)?(0,i.hashAlgorithmFromJSON)(t.hashAlgorithm):0,publicKey:isSet(t.publicKey)?i.PublicKey.fromJSON(t.publicKey):undefined,logId:isSet(t.logId)?i.LogId.fromJSON(t.logId):undefined,checkpointKeyId:isSet(t.checkpointKeyId)?i.LogId.fromJSON(t.checkpointKeyId):undefined,operator:isSet(t.operator)?globalThis.String(t.operator):""}},toJSON(t){const r={};if(t.baseUrl!==""){r.baseUrl=t.baseUrl}if(t.hashAlgorithm!==0){r.hashAlgorithm=(0,i.hashAlgorithmToJSON)(t.hashAlgorithm)}if(t.publicKey!==undefined){r.publicKey=i.PublicKey.toJSON(t.publicKey)}if(t.logId!==undefined){r.logId=i.LogId.toJSON(t.logId)}if(t.checkpointKeyId!==undefined){r.checkpointKeyId=i.LogId.toJSON(t.checkpointKeyId)}if(t.operator!==""){r.operator=t.operator}return r}};r.CertificateAuthority={fromJSON(t){return{subject:isSet(t.subject)?i.DistinguishedName.fromJSON(t.subject):undefined,uri:isSet(t.uri)?globalThis.String(t.uri):"",certChain:isSet(t.certChain)?i.X509CertificateChain.fromJSON(t.certChain):undefined,validFor:isSet(t.validFor)?i.TimeRange.fromJSON(t.validFor):undefined,operator:isSet(t.operator)?globalThis.String(t.operator):""}},toJSON(t){const r={};if(t.subject!==undefined){r.subject=i.DistinguishedName.toJSON(t.subject)}if(t.uri!==""){r.uri=t.uri}if(t.certChain!==undefined){r.certChain=i.X509CertificateChain.toJSON(t.certChain)}if(t.validFor!==undefined){r.validFor=i.TimeRange.toJSON(t.validFor)}if(t.operator!==""){r.operator=t.operator}return r}};r.TrustedRoot={fromJSON(t){return{mediaType:isSet(t.mediaType)?globalThis.String(t.mediaType):"",tlogs:globalThis.Array.isArray(t?.tlogs)?t.tlogs.map((t=>r.TransparencyLogInstance.fromJSON(t))):[],certificateAuthorities:globalThis.Array.isArray(t?.certificateAuthorities)?t.certificateAuthorities.map((t=>r.CertificateAuthority.fromJSON(t))):[],ctlogs:globalThis.Array.isArray(t?.ctlogs)?t.ctlogs.map((t=>r.TransparencyLogInstance.fromJSON(t))):[],timestampAuthorities:globalThis.Array.isArray(t?.timestampAuthorities)?t.timestampAuthorities.map((t=>r.CertificateAuthority.fromJSON(t))):[]}},toJSON(t){const o={};if(t.mediaType!==""){o.mediaType=t.mediaType}if(t.tlogs?.length){o.tlogs=t.tlogs.map((t=>r.TransparencyLogInstance.toJSON(t)))}if(t.certificateAuthorities?.length){o.certificateAuthorities=t.certificateAuthorities.map((t=>r.CertificateAuthority.toJSON(t)))}if(t.ctlogs?.length){o.ctlogs=t.ctlogs.map((t=>r.TransparencyLogInstance.toJSON(t)))}if(t.timestampAuthorities?.length){o.timestampAuthorities=t.timestampAuthorities.map((t=>r.CertificateAuthority.toJSON(t)))}return o}};r.SigningConfig={fromJSON(t){return{mediaType:isSet(t.mediaType)?globalThis.String(t.mediaType):"",caUrls:globalThis.Array.isArray(t?.caUrls)?t.caUrls.map((t=>r.Service.fromJSON(t))):[],oidcUrls:globalThis.Array.isArray(t?.oidcUrls)?t.oidcUrls.map((t=>r.Service.fromJSON(t))):[],rekorTlogUrls:globalThis.Array.isArray(t?.rekorTlogUrls)?t.rekorTlogUrls.map((t=>r.Service.fromJSON(t))):[],rekorTlogConfig:isSet(t.rekorTlogConfig)?r.ServiceConfiguration.fromJSON(t.rekorTlogConfig):undefined,tsaUrls:globalThis.Array.isArray(t?.tsaUrls)?t.tsaUrls.map((t=>r.Service.fromJSON(t))):[],tsaConfig:isSet(t.tsaConfig)?r.ServiceConfiguration.fromJSON(t.tsaConfig):undefined}},toJSON(t){const o={};if(t.mediaType!==""){o.mediaType=t.mediaType}if(t.caUrls?.length){o.caUrls=t.caUrls.map((t=>r.Service.toJSON(t)))}if(t.oidcUrls?.length){o.oidcUrls=t.oidcUrls.map((t=>r.Service.toJSON(t)))}if(t.rekorTlogUrls?.length){o.rekorTlogUrls=t.rekorTlogUrls.map((t=>r.Service.toJSON(t)))}if(t.rekorTlogConfig!==undefined){o.rekorTlogConfig=r.ServiceConfiguration.toJSON(t.rekorTlogConfig)}if(t.tsaUrls?.length){o.tsaUrls=t.tsaUrls.map((t=>r.Service.toJSON(t)))}if(t.tsaConfig!==undefined){o.tsaConfig=r.ServiceConfiguration.toJSON(t.tsaConfig)}return o}};r.Service={fromJSON(t){return{url:isSet(t.url)?globalThis.String(t.url):"",majorApiVersion:isSet(t.majorApiVersion)?globalThis.Number(t.majorApiVersion):0,validFor:isSet(t.validFor)?i.TimeRange.fromJSON(t.validFor):undefined,operator:isSet(t.operator)?globalThis.String(t.operator):""}},toJSON(t){const r={};if(t.url!==""){r.url=t.url}if(t.majorApiVersion!==0){r.majorApiVersion=Math.round(t.majorApiVersion)}if(t.validFor!==undefined){r.validFor=i.TimeRange.toJSON(t.validFor)}if(t.operator!==""){r.operator=t.operator}return r}};r.ServiceConfiguration={fromJSON(t){return{selector:isSet(t.selector)?serviceSelectorFromJSON(t.selector):0,count:isSet(t.count)?globalThis.Number(t.count):0}},toJSON(t){const r={};if(t.selector!==0){r.selector=serviceSelectorToJSON(t.selector)}if(t.count!==0){r.count=Math.round(t.count)}return r}};r.ClientTrustConfig={fromJSON(t){return{mediaType:isSet(t.mediaType)?globalThis.String(t.mediaType):"",trustedRoot:isSet(t.trustedRoot)?r.TrustedRoot.fromJSON(t.trustedRoot):undefined,signingConfig:isSet(t.signingConfig)?r.SigningConfig.fromJSON(t.signingConfig):undefined}},toJSON(t){const o={};if(t.mediaType!==""){o.mediaType=t.mediaType}if(t.trustedRoot!==undefined){o.trustedRoot=r.TrustedRoot.toJSON(t.trustedRoot)}if(t.signingConfig!==undefined){o.signingConfig=r.SigningConfig.toJSON(t.signingConfig)}return o}};function isSet(t){return t!==null&&t!==undefined}},99732:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.Input=r.Artifact=r.ArtifactVerificationOptions_ObserverTimestampOptions=r.ArtifactVerificationOptions_TlogIntegratedTimestampOptions=r.ArtifactVerificationOptions_TimestampAuthorityOptions=r.ArtifactVerificationOptions_CtlogOptions=r.ArtifactVerificationOptions_TlogOptions=r.ArtifactVerificationOptions=r.PublicKeyIdentities=r.CertificateIdentities=r.CertificateIdentity=void 0;const i=o(70715);const a=o(5334);const c=o(61997);r.CertificateIdentity={fromJSON(t){return{issuer:isSet(t.issuer)?globalThis.String(t.issuer):"",san:isSet(t.san)?a.SubjectAlternativeName.fromJSON(t.san):undefined,oids:globalThis.Array.isArray(t?.oids)?t.oids.map((t=>a.ObjectIdentifierValuePair.fromJSON(t))):[]}},toJSON(t){const r={};if(t.issuer!==""){r.issuer=t.issuer}if(t.san!==undefined){r.san=a.SubjectAlternativeName.toJSON(t.san)}if(t.oids?.length){r.oids=t.oids.map((t=>a.ObjectIdentifierValuePair.toJSON(t)))}return r}};r.CertificateIdentities={fromJSON(t){return{identities:globalThis.Array.isArray(t?.identities)?t.identities.map((t=>r.CertificateIdentity.fromJSON(t))):[]}},toJSON(t){const o={};if(t.identities?.length){o.identities=t.identities.map((t=>r.CertificateIdentity.toJSON(t)))}return o}};r.PublicKeyIdentities={fromJSON(t){return{publicKeys:globalThis.Array.isArray(t?.publicKeys)?t.publicKeys.map((t=>a.PublicKey.fromJSON(t))):[]}},toJSON(t){const r={};if(t.publicKeys?.length){r.publicKeys=t.publicKeys.map((t=>a.PublicKey.toJSON(t)))}return r}};r.ArtifactVerificationOptions={fromJSON(t){return{signers:isSet(t.certificateIdentities)?{$case:"certificateIdentities",certificateIdentities:r.CertificateIdentities.fromJSON(t.certificateIdentities)}:isSet(t.publicKeys)?{$case:"publicKeys",publicKeys:r.PublicKeyIdentities.fromJSON(t.publicKeys)}:undefined,tlogOptions:isSet(t.tlogOptions)?r.ArtifactVerificationOptions_TlogOptions.fromJSON(t.tlogOptions):undefined,ctlogOptions:isSet(t.ctlogOptions)?r.ArtifactVerificationOptions_CtlogOptions.fromJSON(t.ctlogOptions):undefined,tsaOptions:isSet(t.tsaOptions)?r.ArtifactVerificationOptions_TimestampAuthorityOptions.fromJSON(t.tsaOptions):undefined,integratedTsOptions:isSet(t.integratedTsOptions)?r.ArtifactVerificationOptions_TlogIntegratedTimestampOptions.fromJSON(t.integratedTsOptions):undefined,observerOptions:isSet(t.observerOptions)?r.ArtifactVerificationOptions_ObserverTimestampOptions.fromJSON(t.observerOptions):undefined}},toJSON(t){const o={};if(t.signers?.$case==="certificateIdentities"){o.certificateIdentities=r.CertificateIdentities.toJSON(t.signers.certificateIdentities)}else if(t.signers?.$case==="publicKeys"){o.publicKeys=r.PublicKeyIdentities.toJSON(t.signers.publicKeys)}if(t.tlogOptions!==undefined){o.tlogOptions=r.ArtifactVerificationOptions_TlogOptions.toJSON(t.tlogOptions)}if(t.ctlogOptions!==undefined){o.ctlogOptions=r.ArtifactVerificationOptions_CtlogOptions.toJSON(t.ctlogOptions)}if(t.tsaOptions!==undefined){o.tsaOptions=r.ArtifactVerificationOptions_TimestampAuthorityOptions.toJSON(t.tsaOptions)}if(t.integratedTsOptions!==undefined){o.integratedTsOptions=r.ArtifactVerificationOptions_TlogIntegratedTimestampOptions.toJSON(t.integratedTsOptions)}if(t.observerOptions!==undefined){o.observerOptions=r.ArtifactVerificationOptions_ObserverTimestampOptions.toJSON(t.observerOptions)}return o}};r.ArtifactVerificationOptions_TlogOptions={fromJSON(t){return{threshold:isSet(t.threshold)?globalThis.Number(t.threshold):0,performOnlineVerification:isSet(t.performOnlineVerification)?globalThis.Boolean(t.performOnlineVerification):false,disable:isSet(t.disable)?globalThis.Boolean(t.disable):false}},toJSON(t){const r={};if(t.threshold!==0){r.threshold=Math.round(t.threshold)}if(t.performOnlineVerification!==false){r.performOnlineVerification=t.performOnlineVerification}if(t.disable!==false){r.disable=t.disable}return r}};r.ArtifactVerificationOptions_CtlogOptions={fromJSON(t){return{threshold:isSet(t.threshold)?globalThis.Number(t.threshold):0,disable:isSet(t.disable)?globalThis.Boolean(t.disable):false}},toJSON(t){const r={};if(t.threshold!==0){r.threshold=Math.round(t.threshold)}if(t.disable!==false){r.disable=t.disable}return r}};r.ArtifactVerificationOptions_TimestampAuthorityOptions={fromJSON(t){return{threshold:isSet(t.threshold)?globalThis.Number(t.threshold):0,disable:isSet(t.disable)?globalThis.Boolean(t.disable):false}},toJSON(t){const r={};if(t.threshold!==0){r.threshold=Math.round(t.threshold)}if(t.disable!==false){r.disable=t.disable}return r}};r.ArtifactVerificationOptions_TlogIntegratedTimestampOptions={fromJSON(t){return{threshold:isSet(t.threshold)?globalThis.Number(t.threshold):0,disable:isSet(t.disable)?globalThis.Boolean(t.disable):false}},toJSON(t){const r={};if(t.threshold!==0){r.threshold=Math.round(t.threshold)}if(t.disable!==false){r.disable=t.disable}return r}};r.ArtifactVerificationOptions_ObserverTimestampOptions={fromJSON(t){return{threshold:isSet(t.threshold)?globalThis.Number(t.threshold):0,disable:isSet(t.disable)?globalThis.Boolean(t.disable):false}},toJSON(t){const r={};if(t.threshold!==0){r.threshold=Math.round(t.threshold)}if(t.disable!==false){r.disable=t.disable}return r}};r.Artifact={fromJSON(t){return{data:isSet(t.artifactUri)?{$case:"artifactUri",artifactUri:globalThis.String(t.artifactUri)}:isSet(t.artifact)?{$case:"artifact",artifact:Buffer.from(bytesFromBase64(t.artifact))}:isSet(t.artifactDigest)?{$case:"artifactDigest",artifactDigest:a.HashOutput.fromJSON(t.artifactDigest)}:undefined}},toJSON(t){const r={};if(t.data?.$case==="artifactUri"){r.artifactUri=t.data.artifactUri}else if(t.data?.$case==="artifact"){r.artifact=base64FromBytes(t.data.artifact)}else if(t.data?.$case==="artifactDigest"){r.artifactDigest=a.HashOutput.toJSON(t.data.artifactDigest)}return r}};r.Input={fromJSON(t){return{artifactTrustRoot:isSet(t.artifactTrustRoot)?c.TrustedRoot.fromJSON(t.artifactTrustRoot):undefined,artifactVerificationOptions:isSet(t.artifactVerificationOptions)?r.ArtifactVerificationOptions.fromJSON(t.artifactVerificationOptions):undefined,bundle:isSet(t.bundle)?i.Bundle.fromJSON(t.bundle):undefined,artifact:isSet(t.artifact)?r.Artifact.fromJSON(t.artifact):undefined}},toJSON(t){const o={};if(t.artifactTrustRoot!==undefined){o.artifactTrustRoot=c.TrustedRoot.toJSON(t.artifactTrustRoot)}if(t.artifactVerificationOptions!==undefined){o.artifactVerificationOptions=r.ArtifactVerificationOptions.toJSON(t.artifactVerificationOptions)}if(t.bundle!==undefined){o.bundle=i.Bundle.toJSON(t.bundle)}if(t.artifact!==undefined){o.artifact=r.Artifact.toJSON(t.artifact)}return o}};function bytesFromBase64(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}function base64FromBytes(t){return globalThis.Buffer.from(t).toString("base64")}function isSet(t){return t!==null&&t!==undefined}},19654:function(t,r,o){var i=this&&this.__createBinding||(Object.create?function(t,r,o,i){if(i===undefined)i=o;var a=Object.getOwnPropertyDescriptor(r,o);if(!a||("get"in a?!r.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return r[o]}}}Object.defineProperty(t,i,a)}:function(t,r,o,i){if(i===undefined)i=o;t[i]=r[o]});var a=this&&this.__exportStar||function(t,r){for(var o in t)if(o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o))i(r,t,o)};Object.defineProperty(r,"__esModule",{value:true});a(o(47030),r);a(o(70715),r);a(o(5334),r);a(o(85204),r);a(o(61997),r);a(o(99732),r)},13835:function(t,r,o){var i=this&&this.__createBinding||(Object.create?function(t,r,o,i){if(i===undefined)i=o;var a=Object.getOwnPropertyDescriptor(r,o);if(!a||("get"in a?!r.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return r[o]}}}Object.defineProperty(t,i,a)}:function(t,r,o,i){if(i===undefined)i=o;t[i]=r[o]});var a=this&&this.__exportStar||function(t,r){for(var o in t)if(o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o))i(r,t,o)};Object.defineProperty(r,"__esModule",{value:true});a(o(36764),r);a(o(381),r);a(o(4969),r);a(o(7543),r)},43049:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.BaseBundleBuilder=void 0;class BaseBundleBuilder{signer;witnesses;constructor(t){this.signer=t.signer;this.witnesses=t.witnesses}async create(t){const r=await this.prepare(t).then((t=>this.signer.sign(t)));const o=await this.package(t,r);const i=await Promise.all(this.witnesses.map((t=>t.testify(o.content,publicKey(r.key)))));const a=[];const c=[];i.forEach((({tlogEntries:t,rfc3161Timestamps:r})=>{a.push(...t??[]);c.push(...r??[])}));o.verificationMaterial.tlogEntries=a;o.verificationMaterial.timestampVerificationData={rfc3161Timestamps:c};return o}async prepare(t){return t.data}}r.BaseBundleBuilder=BaseBundleBuilder;function publicKey(t){switch(t.$case){case"publicKey":return t.publicKey;case"x509Certificate":return t.certificate}}},85192:function(t,r,o){var i=this&&this.__createBinding||(Object.create?function(t,r,o,i){if(i===undefined)i=o;var a=Object.getOwnPropertyDescriptor(r,o);if(!a||("get"in a?!r.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return r[o]}}}Object.defineProperty(t,i,a)}:function(t,r,o,i){if(i===undefined)i=o;t[i]=r[o]});var a=this&&this.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:true,value:r})}:function(t,r){t["default"]=r});var c=this&&this.__importStar||function(){var ownKeys=function(t){ownKeys=Object.getOwnPropertyNames||function(t){var r=[];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))r[r.length]=o;return r};return ownKeys(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var o=ownKeys(t),c=0;c{Object.defineProperty(r,"__esModule",{value:true});r.DSSEBundleBuilder=void 0;const i=o(19100);const a=o(43049);const c=o(85192);class DSSEBundleBuilder extends a.BaseBundleBuilder{certificateChain;constructor(t){super(t);this.certificateChain=t.certificateChain??false}async prepare(t){const r=artifactDefaults(t);return i.dsse.preAuthEncoding(r.type,r.data)}async package(t,r){return(0,c.toDSSEBundle)(artifactDefaults(t),r,this.certificateChain)}}r.DSSEBundleBuilder=DSSEBundleBuilder;function artifactDefaults(t){return{...t,type:t.type??""}}},35530:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.MessageSignatureBundleBuilder=r.DSSEBundleBuilder=void 0;var i=o(83997);Object.defineProperty(r,"DSSEBundleBuilder",{enumerable:true,get:function(){return i.DSSEBundleBuilder}});var a=o(8269);Object.defineProperty(r,"MessageSignatureBundleBuilder",{enumerable:true,get:function(){return a.MessageSignatureBundleBuilder}})},8269:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.MessageSignatureBundleBuilder=void 0;const i=o(43049);const a=o(85192);class MessageSignatureBundleBuilder extends i.BaseBundleBuilder{constructor(t){super(t)}async package(t,r){return(0,a.toMessageSignatureBundle)(t,r)}}r.MessageSignatureBundleBuilder=MessageSignatureBundleBuilder},45985:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.bundleBuilderFromSigningConfig=bundleBuilderFromSigningConfig;const i=o(19654);const a=o(83997);const c=o(8269);const p=o(34342);const u=o(55383);const l=1;const d=2;const A=1;const b=5e3;const h=2e4;const M={retries:2};function bundleBuilderFromSigningConfig(t){const{signingConfig:r,identityProvider:o,bundleType:i}=t;const p=t.fetchOptions||{timeout:b,retry:M};const u=fulcioSignerFromConfig(r,o,p);const l=witnessesFromConfig(r,p);switch(i){case"messageSignature":return new c.MessageSignatureBundleBuilder({signer:u,witnesses:l});case"dsseEnvelope":return new a.DSSEBundleBuilder({signer:u,witnesses:l})}}function fulcioSignerFromConfig(t,r,o){const i=certAuthorityService(t);return new p.FulcioSigner({fulcioBaseURL:i.url,identityProvider:r,timeout:o.timeout,retry:o.retry})}function witnessesFromConfig(t,r){const o=[];if(t.rekorTlogConfig){if(t.rekorTlogConfig.selector!==i.ServiceSelector.ANY){throw new Error("Unsupported Rekor TLog selector in signing configuration")}const a=tlogService(t);o.push(new u.RekorWitness({rekorBaseURL:a.url,majorApiVersion:a.majorApiVersion,retry:r.retry,timeout:a.majorApiVersion===1?r.timeout:Math.min(r.timeout||b,h)}))}if(t.tsaConfig){if(t.tsaConfig.selector!==i.ServiceSelector.ANY){throw new Error("Unsupported TSA selector in signing configuration")}const a=tsaService(t);o.push(new u.TSAWitness({tsaBaseURL:a.url,retry:r.retry,timeout:r.timeout}))}return o}function certAuthorityService(t){const r=filterServicesByMaxAPIVersion(t.caUrls,l);const o=sortServicesByStartDate(r);if(o.length===0){throw new Error("No valid CA services found in signing configuration")}return o[0]}function tlogService(t){const r=filterServicesByMaxAPIVersion(t.rekorTlogUrls,d);const o=sortServicesByStartDate(r);if(o.length===0){throw new Error("No valid TLogs found in signing configuration")}return o[0]}function tsaService(t){const r=filterServicesByMaxAPIVersion(t.tsaUrls,A);const o=sortServicesByStartDate(r);if(o.length===0){throw new Error("No valid TSAs found in signing configuration")}return o[0]}function sortServicesByStartDate(t){const r=new Date;const o=t.filter((t=>{if(!t.validFor?.end){return true}return t.validFor.end>=r}));return o.sort(((t,r)=>{const o=t.validFor?.start?.getTime()??0;const i=r.validFor?.start?.getTime()??0;return i-o}))}function filterServicesByMaxAPIVersion(t,r){return t.filter((t=>t.majorApiVersion<=r))}},97841:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.InternalError=void 0;r.internalError=internalError;const i=o(40369);class InternalError extends Error{code;cause;constructor({code:t,message:r,cause:o}){super(r);this.name=this.constructor.name;this.cause=o;this.code=t}}r.InternalError=InternalError;function internalError(t,r,o){if(t instanceof i.HTTPError){o+=` - ${t.message}`}throw new InternalError({code:r,message:o,cause:t})}},40369:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.HTTPError=void 0;class HTTPError extends Error{statusCode;location;constructor({status:t,message:r,location:o}){super(`(${t}) ${r}`);this.statusCode=t;this.location=o}}r.HTTPError=HTTPError},9823:function(t,r,o){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});r.fetchWithRetry=fetchWithRetry;const a=o(85675);const c=i(o(39310));const p=o(26687);const u=i(o(90390));const l=o(19100);const d=o(40369);const{HTTP2_HEADER_LOCATION:A,HTTP2_HEADER_CONTENT_TYPE:b,HTTP2_HEADER_USER_AGENT:h,HTTP_STATUS_INTERNAL_SERVER_ERROR:M,HTTP_STATUS_TOO_MANY_REQUESTS:g,HTTP_STATUS_REQUEST_TIMEOUT:z}=a.constants;async function fetchWithRetry(t,r){return(0,u.default)((async(o,i)=>{const a=r.method||"POST";const u={[h]:l.ua.getUserAgent(),...r.headers};const d=await(0,c.default)(t,{method:a,headers:u,body:r.body,timeout:r.timeout,retry:false}).catch((r=>{p.log.http("fetch",`${a} ${t} attempt ${i} failed with ${r}`);return o(r)}));if(d.ok){return d}else{const r=await errorFromResponse(d);p.log.http("fetch",`${a} ${t} attempt ${i} failed with ${d.status}`);if(retryable(d.status)){return o(r)}else{throw r}}}),retryOpts(r.retry))}const errorFromResponse=async t=>{let r=t.statusText;const o=t.headers.get(A)||undefined;const i=t.headers.get(b);if(i?.includes("application/json")){try{const o=await t.json();r=o.message||r}catch(t){}}return new d.HTTPError({status:t.status,message:r,location:o})};const retryable=t=>[z,g].includes(t)||t>=M;const retryOpts=t=>{if(typeof t==="boolean"){return{retries:t?1:0}}else if(typeof t==="number"){return{retries:t}}else{return{retries:0,...t}}}},26819:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.Fulcio=void 0;const i=o(9823);class Fulcio{options;constructor(t){this.options=t}async createSigningCertificate(t){const{baseURL:r,retry:o,timeout:a}=this.options;const c=`${r}/api/v2/signingCert`;const p=await(0,i.fetchWithRetry)(c,{headers:{"Content-Type":"application/json"},body:JSON.stringify(t),timeout:a,retry:o});return p.json()}}r.Fulcio=Fulcio},65973:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.RekorV2=void 0;const i=o(9823);const a=o(19654);const c=o(13835);class RekorV2{options;constructor(t){this.options=t}async createEntry(t){const{baseURL:r,timeout:o,retry:p}=this.options;const u=`${r}/api/v2/log/entries`;const l=await(0,i.fetchWithRetry)(u,{headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(c.CreateEntryRequest.toJSON(t)),timeout:o,retry:p});return l.json().then((t=>a.TransparencyLogEntry.fromJSON(t)))}}r.RekorV2=RekorV2},32688:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.Rekor=void 0;const i=o(9823);class Rekor{options;constructor(t){this.options=t}async createEntry(t){const{baseURL:r,timeout:o,retry:a}=this.options;const c=`${r}/api/v1/log/entries`;const p=await(0,i.fetchWithRetry)(c,{headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(t),timeout:o,retry:a});const u=await p.json();return entryFromResponse(u)}async getEntry(t){const{baseURL:r,timeout:o,retry:a}=this.options;const c=`${r}/api/v1/log/entries/${t}`;const p=await(0,i.fetchWithRetry)(c,{method:"GET",headers:{Accept:"application/json"},timeout:o,retry:a});const u=await p.json();return entryFromResponse(u)}}r.Rekor=Rekor;function entryFromResponse(t){const r=Object.entries(t);if(r.length!=1){throw new Error("Received multiple entries in Rekor response")}const[o,i]=r[0];return{...i,uuid:o}}},78963:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.TimestampAuthority=void 0;const i=o(9823);class TimestampAuthority{options;constructor(t){this.options=t}async createTimestamp(t){const{baseURL:r,timeout:o,retry:a}=this.options;const c=new URL(r).pathname==="/"?`${r}/api/v1/timestamp`:r;const p=await(0,i.fetchWithRetry)(c,{headers:{"Content-Type":"application/json"},body:JSON.stringify(t),timeout:o,retry:a});return p.buffer()}}r.TimestampAuthority=TimestampAuthority},92092:function(t,r,o){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});r.CIContextProvider=void 0;const a=i(o(39310));const c=[getGHAToken,getEnv];class CIContextProvider{audience;constructor(t="sigstore"){this.audience=t}async getToken(){return Promise.any(c.map((t=>t(this.audience)))).catch((()=>Promise.reject("CI: no tokens available")))}}r.CIContextProvider=CIContextProvider;async function getGHAToken(t){if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL||!process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN){return Promise.reject("no token available")}const r=new URL(process.env.ACTIONS_ID_TOKEN_REQUEST_URL);r.searchParams.append("audience",t);const o=await(0,a.default)(r.href,{retry:2,headers:{Accept:"application/json",Authorization:`Bearer ${process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN}`}});return o.json().then((t=>t.value))}async function getEnv(){if(!process.env.SIGSTORE_ID_TOKEN){return Promise.reject("no token available")}return process.env.SIGSTORE_ID_TOKEN}},55022:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.CIContextProvider=void 0;var i=o(92092);Object.defineProperty(r,"CIContextProvider",{enumerable:true,get:function(){return i.CIContextProvider}})},15179:(t,r,o)=>{var i;i={value:true};r.gs=r.fU=i=r.$o=i=r.Zk=i=i=i=r.VV=void 0;var a=o(35530);Object.defineProperty(r,"VV",{enumerable:true,get:function(){return a.DSSEBundleBuilder}});i={enumerable:true,get:function(){return a.MessageSignatureBundleBuilder}};var c=o(45985);i={enumerable:true,get:function(){return c.bundleBuilderFromSigningConfig}};var p=o(97841);i={enumerable:true,get:function(){return p.InternalError}};var u=o(55022);Object.defineProperty(r,"Zk",{enumerable:true,get:function(){return u.CIContextProvider}});var l=o(34342);i={enumerable:true,get:function(){return l.DEFAULT_FULCIO_URL}};Object.defineProperty(r,"$o",{enumerable:true,get:function(){return l.FulcioSigner}});var d=o(55383);i={enumerable:true,get:function(){return d.DEFAULT_REKOR_URL}};Object.defineProperty(r,"fU",{enumerable:true,get:function(){return d.RekorWitness}});Object.defineProperty(r,"gs",{enumerable:true,get:function(){return d.TSAWitness}})},5875:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.CAClient=void 0;const i=o(97841);const a=o(26819);class CAClient{fulcio;constructor(t){this.fulcio=new a.Fulcio({baseURL:t.fulcioBaseURL,retry:t.retry,timeout:t.timeout})}async createSigningCertificate(t,r,o){const a=toCertificateRequest(t,r,o);try{const t=await this.fulcio.createSigningCertificate(a);const r=t.signedCertificateEmbeddedSct?t.signedCertificateEmbeddedSct:t.signedCertificateDetachedSct;return r.chain.certificates}catch(t){(0,i.internalError)(t,"CA_CREATE_SIGNING_CERTIFICATE_ERROR","error creating signing certificate")}}}r.CAClient=CAClient;function toCertificateRequest(t,r,o){return{credentials:{oidcIdentityToken:t},publicKeyRequest:{publicKey:{algorithm:"ECDSA",content:r},proofOfPossession:o.toString("base64")}}}},97064:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.EphemeralSigner=void 0;const i=o(76982);const a="ec";const c="P-256";class EphemeralSigner{keypair;constructor(){this.keypair=(0,i.generateKeyPairSync)(a,{namedCurve:c})}async sign(t){const r=(0,i.sign)("sha256",t,this.keypair.privateKey);const o=this.keypair.publicKey.export({format:"pem",type:"spki"}).toString("ascii");return{signature:r,key:{$case:"publicKey",publicKey:o}}}}r.EphemeralSigner=EphemeralSigner},26303:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.FulcioSigner=r.DEFAULT_FULCIO_URL=void 0;const i=o(97841);const a=o(19100);const c=o(5875);const p=o(97064);r.DEFAULT_FULCIO_URL="https://fulcio.sigstore.dev";class FulcioSigner{ca;identityProvider;keyHolder;constructor(t){this.ca=new c.CAClient({...t,fulcioBaseURL:t.fulcioBaseURL||r.DEFAULT_FULCIO_URL});this.identityProvider=t.identityProvider;this.keyHolder=t.keyHolder||new p.EphemeralSigner}async sign(t){const r=await this.getIdentityToken();let o;try{o=a.oidc.extractJWTSubject(r)}catch(t){throw new i.InternalError({code:"IDENTITY_TOKEN_PARSE_ERROR",message:`invalid identity token: ${r}`,cause:t})}const c=await this.keyHolder.sign(Buffer.from(o));if(c.key.$case!=="publicKey"){throw new i.InternalError({code:"CA_CREATE_SIGNING_CERTIFICATE_ERROR",message:"unexpected format for signing key"})}const p=await this.ca.createSigningCertificate(r,c.key.publicKey,c.signature);const u=await this.keyHolder.sign(t);return{signature:u.signature,key:{$case:"x509Certificate",certificate:p[0]}}}async getIdentityToken(){try{return await this.identityProvider.getToken()}catch(t){throw new i.InternalError({code:"IDENTITY_TOKEN_READ_ERROR",message:"error retrieving identity token",cause:t})}}}r.FulcioSigner=FulcioSigner},34342:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.FulcioSigner=r.DEFAULT_FULCIO_URL=void 0;var i=o(26303);Object.defineProperty(r,"DEFAULT_FULCIO_URL",{enumerable:true,get:function(){return i.DEFAULT_FULCIO_URL}});Object.defineProperty(r,"FulcioSigner",{enumerable:true,get:function(){return i.FulcioSigner}})},19100:function(t,r,o){var i=this&&this.__createBinding||(Object.create?function(t,r,o,i){if(i===undefined)i=o;var a=Object.getOwnPropertyDescriptor(r,o);if(!a||("get"in a?!r.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return r[o]}}}Object.defineProperty(t,i,a)}:function(t,r,o,i){if(i===undefined)i=o;t[i]=r[o]});var a=this&&this.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:true,value:r})}:function(t,r){t["default"]=r});var c=this&&this.__importStar||function(){var ownKeys=function(t){ownKeys=Object.getOwnPropertyNames||function(t){var r=[];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))r[r.length]=o;return r};return ownKeys(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var o=ownKeys(t),c=0;c{Object.defineProperty(r,"__esModule",{value:true});r.extractJWTSubject=extractJWTSubject;const i=o(83917);function extractJWTSubject(t){const r=t.split(".",3);const o=JSON.parse(i.encoding.base64Decode(r[1]));if(o.email){if(!o.email_verified){throw new Error("JWT email not verified by issuer")}return o.email}if(o.sub){return o.sub}else{throw new Error("JWT subject not found")}}},81268:function(t,r,o){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});r.getUserAgent=void 0;const a=i(o(70857));const getUserAgent=()=>{const t=o(85896).rE;const r=process.version;const i=a.default.platform();const c=a.default.arch();return`sigstore-js/${t} (Node ${r}) (${i}/${c})`};r.getUserAgent=getUserAgent},55383:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.TSAWitness=r.RekorWitness=r.DEFAULT_REKOR_URL=void 0;var i=o(2566);Object.defineProperty(r,"DEFAULT_REKOR_URL",{enumerable:true,get:function(){return i.DEFAULT_REKOR_URL}});Object.defineProperty(r,"RekorWitness",{enumerable:true,get:function(){return i.RekorWitness}});var a=o(66936);Object.defineProperty(r,"TSAWitness",{enumerable:true,get:function(){return a.TSAWitness}})},42815:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.TLogV2Client=r.TLogClient=void 0;const i=o(97841);const a=o(40369);const c=o(32688);const p=o(65973);class TLogClient{rekor;fetchOnConflict;constructor(t){this.fetchOnConflict=t.fetchOnConflict??false;this.rekor=new c.Rekor({baseURL:t.rekorBaseURL,retry:t.retry,timeout:t.timeout})}async createEntry(t){let r;try{r=await this.rekor.createEntry(t)}catch(t){if(entryExistsError(t)&&this.fetchOnConflict){const o=t.location.split("/").pop()||"";try{r=await this.rekor.getEntry(o)}catch(t){(0,i.internalError)(t,"TLOG_FETCH_ENTRY_ERROR","error fetching tlog entry")}}else{(0,i.internalError)(t,"TLOG_CREATE_ENTRY_ERROR","error creating tlog entry")}}return r}}r.TLogClient=TLogClient;function entryExistsError(t){return t instanceof a.HTTPError&&t.statusCode===409&&t.location!==undefined}class TLogV2Client{rekor;constructor(t){this.rekor=new p.RekorV2({baseURL:t.rekorBaseURL,retry:t.retry,timeout:t.timeout})}async createEntry(t){let r;try{r=await this.rekor.createEntry(t)}catch(t){(0,i.internalError)(t,"TLOG_CREATE_ENTRY_ERROR","error creating tlog entry")}if(r.logId===undefined||r.kindVersion===undefined){(0,i.internalError)(new Error("invalid tlog entry"),"TLOG_CREATE_ENTRY_ERROR","error creating tlog entry")}return{...r,logId:r.logId,kindVersion:r.kindVersion}}}r.TLogV2Client=TLogV2Client},97890:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.toProposedEntry=toProposedEntry;r.toCreateEntryRequest=toCreateEntryRequest;const i=o(61040);const a=o(19654);const c=o(19100);const p="sha256";function toProposedEntry(t,r,o="dsse"){switch(t.$case){case"dsseEnvelope":if(o==="intoto"){return toProposedIntotoEntry(t.dsseEnvelope,r)}return toProposedDSSEEntry(t.dsseEnvelope,r);case"messageSignature":return toProposedHashedRekordEntry(t.messageSignature,r)}}function toProposedHashedRekordEntry(t,r){const o=t.messageDigest.digest.toString("hex");const i=t.signature.toString("base64");const a=c.encoding.base64Encode(r);return{apiVersion:"0.0.1",kind:"hashedrekord",spec:{data:{hash:{algorithm:p,value:o}},signature:{content:i,publicKey:{content:a}}}}}function toProposedDSSEEntry(t,r){const o=JSON.stringify((0,i.envelopeToJSON)(t));const a=c.encoding.base64Encode(r);return{apiVersion:"0.0.1",kind:"dsse",spec:{proposedContent:{envelope:o,verifiers:[a]}}}}function toProposedIntotoEntry(t,r){const o=c.crypto.digest(p,t.payload).toString("hex");const i=calculateDSSEHash(t,r);const a=c.encoding.base64Encode(t.payload.toString("base64"));const u=c.encoding.base64Encode(t.signatures[0].sig.toString("base64"));const l=t.signatures[0].keyid;const d=c.encoding.base64Encode(r);const A={payloadType:t.payloadType,payload:a,signatures:[{sig:u,publicKey:d}]};if(l.length>0){A.signatures[0].keyid=l}return{apiVersion:"0.0.2",kind:"intoto",spec:{content:{envelope:A,hash:{algorithm:p,value:i},payloadHash:{algorithm:p,value:o}}}}}function calculateDSSEHash(t,r){const o={payloadType:t.payloadType,payload:t.payload.toString("base64"),signatures:[{sig:t.signatures[0].sig.toString("base64"),publicKey:r}]};if(t.signatures[0].keyid.length>0){o.signatures[0].keyid=t.signatures[0].keyid}return c.crypto.digest(p,c.json.canonicalize(o)).toString("hex")}function toCreateEntryRequest(t,r){switch(t.$case){case"dsseEnvelope":return toCreateEntryRequestDSSE(t.dsseEnvelope,r);case"messageSignature":return toCreateEntryRequestMessageSignature(t.messageSignature,r)}}function toCreateEntryRequestDSSE(t,r){return{spec:{$case:"dsseRequestV002",dsseRequestV002:{envelope:t,verifiers:[{keyDetails:a.PublicKeyDetails.PKIX_ECDSA_P256_SHA_256,verifier:{$case:"x509Certificate",x509Certificate:{rawBytes:c.pem.toDER(r)}}}]}}}}function toCreateEntryRequestMessageSignature(t,r){return{spec:{$case:"hashedRekordRequestV002",hashedRekordRequestV002:{digest:t.messageDigest.digest,signature:{content:t.signature,verifier:{keyDetails:a.PublicKeyDetails.PKIX_ECDSA_P256_SHA_256,verifier:{$case:"x509Certificate",x509Certificate:{rawBytes:c.pem.toDER(r)}}}}}}}}},2566:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.RekorWitness=r.DEFAULT_REKOR_URL=void 0;const i=o(19100);const a=o(42815);const c=o(97890);r.DEFAULT_REKOR_URL="https://rekor.sigstore.dev";class RekorWitness{tlogV1;tlogV2;entryType;majorApiVersion;constructor(t){this.entryType=t.entryType;this.majorApiVersion=t.majorApiVersion||1;this.tlogV1=new a.TLogClient({...t,rekorBaseURL:t.rekorBaseURL||r.DEFAULT_REKOR_URL});this.tlogV2=new a.TLogV2Client({...t,rekorBaseURL:t.rekorBaseURL||r.DEFAULT_REKOR_URL})}async testify(t,r){let o;if(this.majorApiVersion===2){const i=(0,c.toCreateEntryRequest)(t,r);o=await this.tlogV2.createEntry(i)}else{const i=(0,c.toProposedEntry)(t,r,this.entryType);const a=await this.tlogV1.createEntry(i);o=toTransparencyLogEntry(a)}return{tlogEntries:[o]}}}r.RekorWitness=RekorWitness;function toTransparencyLogEntry(t){const r=Buffer.from(t.logID,"hex");const o=i.encoding.base64Decode(t.body);const a=JSON.parse(o);const c=t?.verification?.signedEntryTimestamp?inclusionPromise(t.verification.signedEntryTimestamp):undefined;const p=t?.verification?.inclusionProof?inclusionProof(t.verification.inclusionProof):undefined;const u={logIndex:t.logIndex.toString(),logId:{keyId:r},integratedTime:t.integratedTime.toString(),kindVersion:{kind:a.kind,version:a.apiVersion},inclusionPromise:c,inclusionProof:p,canonicalizedBody:Buffer.from(t.body,"base64")};return u}function inclusionPromise(t){return{signedEntryTimestamp:Buffer.from(t,"base64")}}function inclusionProof(t){return{logIndex:t.logIndex.toString(),treeSize:t.treeSize.toString(),rootHash:Buffer.from(t.rootHash,"hex"),hashes:t.hashes.map((t=>Buffer.from(t,"hex"))),checkpoint:{envelope:t.checkpoint}}}},97409:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.TSAClient=void 0;const i=o(97841);const a=o(78963);const c=o(19100);const p="sha256";class TSAClient{tsa;constructor(t){this.tsa=new a.TimestampAuthority({baseURL:t.tsaBaseURL,retry:t.retry,timeout:t.timeout})}async createTimestamp(t){const r={artifactHash:c.crypto.digest(p,t).toString("base64"),hashAlgorithm:p};try{return await this.tsa.createTimestamp(r)}catch(t){(0,i.internalError)(t,"TSA_CREATE_TIMESTAMP_ERROR","error creating timestamp")}}}r.TSAClient=TSAClient},66936:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.TSAWitness=void 0;const i=o(97409);class TSAWitness{tsa;constructor(t){this.tsa=new i.TSAClient({tsaBaseURL:t.tsaBaseURL,retry:t.retry,timeout:t.timeout})}async testify(t){const r=extractSignature(t);const o=await this.tsa.createTimestamp(r);return{rfc3161Timestamps:[{signedTimestamp:o}]}}}r.TSAWitness=TSAWitness;function extractSignature(t){switch(t.$case){case"dsseEnvelope":return t.dsseEnvelope.signatures[0].sig;case"messageSignature":return t.messageSignature.signature}}},48796:function(t,r,o){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});r.appDataPath=appDataPath;const a=i(o(70857));const c=i(o(16928));function appDataPath(t){const r=a.default.homedir();switch(process.platform){case"darwin":{const o=c.default.join(r,"Library","Application Support");return c.default.join(o,t)}case"win32":{const o=process.env.LOCALAPPDATA||c.default.join(r,"AppData","Local");return c.default.join(o,t,"Data")}default:{const o=process.env.XDG_DATA_HOME||c.default.join(r,".local","share");return c.default.join(o,t)}}}},83040:function(t,r,o){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});r.TUFClient=void 0;const a=i(o(79896));const c=i(o(16928));const p=o(84706);const u=o(84423);const l=o(69446);const d=o(47686);const A="targets";class TUFClient{updater;constructor(t){const r=new URL(t.mirrorURL);const o=encodeURIComponent(r.host+r.pathname.replace(/\/$/,""));const i=c.default.join(t.cachePath,o);initTufCache(i);seedCache({cachePath:i,mirrorURL:t.mirrorURL,tufRootPath:t.rootPath,forceInit:t.forceInit});this.updater=initClient({mirrorURL:t.mirrorURL,cachePath:i,forceCache:t.forceCache,retry:t.retry,timeout:t.timeout})}async refresh(){return this.updater.refresh()}getTarget(t){return(0,d.readTarget)(this.updater,t)}}r.TUFClient=TUFClient;function initTufCache(t){const r=c.default.join(t,A);if(!a.default.existsSync(t)){a.default.mkdirSync(t,{recursive:true})}if(!a.default.existsSync(r)){a.default.mkdirSync(r)}}function seedCache({cachePath:t,mirrorURL:r,tufRootPath:i,forceInit:p}){const l=c.default.join(t,"root.json");if(!a.default.existsSync(l)||p){if(i){a.default.copyFileSync(i,l)}else{const i=o(8032);const p=i[r];if(!p){throw new u.TUFError({code:"TUF_INIT_CACHE_ERROR",message:`No root.json found for mirror: ${r}`})}a.default.writeFileSync(l,Buffer.from(p["root.json"],"base64"));Object.entries(p.targets).forEach((([r,o])=>{a.default.writeFileSync(c.default.join(t,A,r),Buffer.from(o,"base64"))}))}}}function initClient(t){const r={fetchTimeout:t.timeout,fetchRetry:t.retry,userAgent:`${encodeURIComponent(l.name)}/${l.version}`};return new p.Updater({metadataBaseUrl:t.mirrorURL,targetBaseUrl:`${t.mirrorURL}/targets`,metadataDir:t.cachePath,targetDir:c.default.join(t.cachePath,A),forceCache:t.forceCache,config:r})}},16213:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.TUFError=void 0;class TUFError extends Error{code;cause;constructor({code:t,message:r,cause:o}){super(r);this.code=t;this.cause=o;this.name=this.constructor.name}}r.TUFError=TUFError},84423:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.TUFError=r.DEFAULT_MIRROR_URL=void 0;r.getTrustedRoot=getTrustedRoot;r.initTUF=initTUF;const i=o(19654);const a=o(48796);const c=o(83040);r.DEFAULT_MIRROR_URL="https://tuf-repo-cdn.sigstore.dev";const p="sigstore-js";const u={retries:2};const l=5e3;const d="trusted_root.json";async function getTrustedRoot(t={}){const r=createClient(t);const o=await r.getTarget(d);return i.TrustedRoot.fromJSON(JSON.parse(o))}async function initTUF(t={}){const r=createClient(t);return r.refresh().then((()=>r))}function createClient(t){return new c.TUFClient({cachePath:t.cachePath||(0,a.appDataPath)(p),rootPath:t.rootPath,mirrorURL:t.mirrorURL||r.DEFAULT_MIRROR_URL,retry:t.retry??u,timeout:t.timeout??l,forceCache:t.forceCache??false,forceInit:t.forceInit??t.force??false})}var A=o(16213);Object.defineProperty(r,"TUFError",{enumerable:true,get:function(){return A.TUFError}})},47686:function(t,r,o){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});r.readTarget=readTarget;const a=i(o(79896));const c=o(16213);async function readTarget(t,r){const o=await getTargetPath(t,r);return new Promise(((t,r)=>{a.default.readFile(o,"utf-8",((i,a)=>{if(i){r(new c.TUFError({code:"TUF_READ_TARGET_ERROR",message:`error reading target ${o}`,cause:i}))}else{t(a)}}))}))}async function getTargetPath(t,r){let o;try{o=await t.getTargetInfo(r)}catch(t){throw new c.TUFError({code:"TUF_REFRESH_METADATA_ERROR",message:"error refreshing TUF metadata",cause:t})}if(!o){throw new c.TUFError({code:"TUF_FIND_TARGET_ERROR",message:`target ${r} not found`})}let i=await t.findCachedTarget(o);if(!i){try{i=await t.downloadTarget(o)}catch(t){throw new c.TUFError({code:"TUF_DOWNLOAD_TARGET_ERROR",message:`error downloading target ${i}`,cause:t})}}return i}},52635:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.DSSESignatureContent=void 0;const i=o(83917);class DSSESignatureContent{env;constructor(t){this.env=t}compareDigest(t){return i.crypto.bufferEqual(t,i.crypto.digest("sha256",this.env.payload))}compareSignature(t){return i.crypto.bufferEqual(t,this.signature)}verifySignature(t){return i.crypto.verify(this.preAuthEncoding,t,this.signature)}get signature(){return this.env.signatures.length>0?this.env.signatures[0].sig:Buffer.from("")}get preAuthEncoding(){return i.dsse.preAuthEncoding(this.env.payloadType,this.env.payload)}}r.DSSESignatureContent=DSSESignatureContent},42544:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.toSignedEntity=toSignedEntity;r.signatureContent=signatureContent;const i=o(83917);const a=o(52635);const c=o(26531);function toSignedEntity(t,r){const{tlogEntries:o,timestampVerificationData:a}=t.verificationMaterial;const c=[];for(const t of o){if(t.integratedTime&&t.integratedTime!=="0"){c.push({$case:"transparency-log",tlogEntry:t})}}for(const t of a?.rfc3161Timestamps??[]){c.push({$case:"timestamp-authority",timestamp:i.RFC3161Timestamp.parse(Buffer.from(t.signedTimestamp))})}return{signature:signatureContent(t,r),key:key(t),tlogEntries:o,timestamps:c}}function signatureContent(t,r){switch(t.content.$case){case"dsseEnvelope":return new a.DSSESignatureContent(t.content.dsseEnvelope);case"messageSignature":return new c.MessageSignatureContent(t.content.messageSignature,r)}}function key(t){switch(t.verificationMaterial.content.$case){case"publicKey":return{$case:"public-key",hint:t.verificationMaterial.content.publicKey.hint};case"x509CertificateChain":return{$case:"certificate",certificate:i.X509Certificate.parse(Buffer.from(t.verificationMaterial.content.x509CertificateChain.certificates[0].rawBytes))};case"certificate":return{$case:"certificate",certificate:i.X509Certificate.parse(Buffer.from(t.verificationMaterial.content.certificate.rawBytes))}}}},26531:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.MessageSignatureContent=void 0;const i=o(83917);const a=o(19654);const c={[a.HashAlgorithm.HASH_ALGORITHM_UNSPECIFIED]:"sha256",[a.HashAlgorithm.SHA2_256]:"sha256",[a.HashAlgorithm.SHA2_384]:"sha384",[a.HashAlgorithm.SHA2_512]:"sha512",[a.HashAlgorithm.SHA3_256]:"sha3-256",[a.HashAlgorithm.SHA3_384]:"sha3-384"};class MessageSignatureContent{signature;messageDigest;artifact;hashAlgorithm;constructor(t,r){this.signature=t.signature;this.messageDigest=t.messageDigest.digest;this.artifact=r;this.hashAlgorithm=c[t.messageDigest.algorithm]??"sha256"}compareSignature(t){return i.crypto.bufferEqual(t,this.signature)}compareDigest(t){return i.crypto.bufferEqual(t,this.messageDigest)}verifySignature(t){return i.crypto.verify(this.artifact,t,this.signature,this.hashAlgorithm)}}r.MessageSignatureContent=MessageSignatureContent},36849:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.PolicyError=r.VerificationError=void 0;class BaseError extends Error{code;cause;constructor({code:t,message:r,cause:o}){super(r);this.code=t;this.cause=o;this.name=this.constructor.name}}class VerificationError extends BaseError{}r.VerificationError=VerificationError;class PolicyError extends BaseError{}r.PolicyError=PolicyError},54187:(t,r,o)=>{var i;i={value:true};r.BL=r.jO=i=i=r.DC=void 0;var a=o(42544);Object.defineProperty(r,"DC",{enumerable:true,get:function(){return a.toSignedEntity}});var c=o(36849);i={enumerable:true,get:function(){return c.PolicyError}};i={enumerable:true,get:function(){return c.VerificationError}};var p=o(97822);Object.defineProperty(r,"jO",{enumerable:true,get:function(){return p.toTrustMaterial}});var u=o(74433);Object.defineProperty(r,"BL",{enumerable:true,get:function(){return u.Verifier}})},38412:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.CertificateChainVerifier=void 0;r.verifyCertificateChain=verifyCertificateChain;const i=o(36849);const a=o(97822);function verifyCertificateChain(t,r,o){const c=(0,a.filterCertAuthorities)(o,t);let p;for(const o of c){try{const i=new CertificateChainVerifier({trustedCerts:o.certChain,untrustedCert:r,timestamp:t});return i.verify()}catch(t){p=t}}throw new i.VerificationError({code:"CERTIFICATE_ERROR",message:"Failed to verify certificate chain",cause:p})}class CertificateChainVerifier{untrustedCert;trustedCerts;localCerts;timestamp;constructor(t){this.untrustedCert=t.untrustedCert;this.trustedCerts=t.trustedCerts;this.localCerts=dedupeCertificates([...t.trustedCerts,t.untrustedCert]);this.timestamp=t.timestamp}verify(){const t=this.sort();this.checkPath(t);const r=t.every((t=>t.validForDate(this.timestamp)));if(!r){throw new i.VerificationError({code:"CERTIFICATE_ERROR",message:"certificate is not valid or expired at the specified date"})}return t}sort(){const t=this.untrustedCert;let r=this.buildPaths(t);r=r.filter((t=>t.some((t=>this.trustedCerts.includes(t)))));if(r.length===0){throw new i.VerificationError({code:"CERTIFICATE_ERROR",message:"no trusted certificate path found"})}const o=r.reduce(((t,r)=>t.length{if(o){if(i.extSubjectKeyID){if(i.extSubjectKeyID.keyIdentifier.equals(o)){r.push(i)}return}}if(i.subject.equals(t.issuer)){r.push(i)}}));r=r.filter((r=>{try{return t.verify(r)}catch(t){return false}}));return r}checkPath(t){if(t.length<1){throw new i.VerificationError({code:"CERTIFICATE_ERROR",message:"certificate chain must contain at least one certificate"})}const r=t.slice(1).every((t=>t.isCA));if(!r){throw new i.VerificationError({code:"CERTIFICATE_ERROR",message:"intermediate certificate is not a CA"})}for(let r=t.length-2;r>=0;r--){if(!t[r].issuer.equals(t[r+1].subject)){throw new i.VerificationError({code:"CERTIFICATE_ERROR",message:"incorrect certificate name chaining"})}}for(let r=0;r{Object.defineProperty(r,"__esModule",{value:true});r.verifyPublicKey=verifyPublicKey;r.verifyCertificate=verifyCertificate;const i=o(83917);const a=o(36849);const c=o(38412);const p=o(21633);const u="1.3.6.1.4.1.57264.1.1";const l="1.3.6.1.4.1.57264.1.8";function verifyPublicKey(t,r,o){const i=o.publicKey(t);r.forEach((t=>{if(!i.validFor(t)){throw new a.VerificationError({code:"PUBLIC_KEY_ERROR",message:`Public key is not valid for timestamp: ${t.toISOString()}`})}}));return{key:i.publicKey}}function verifyCertificate(t,r,o){let i=[];r.forEach((r=>{i=(0,c.verifyCertificateChain)(r,t,o.certificateAuthorities)}));return{scts:(0,p.verifySCTs)(i[0],i[1],o.ctlogs),signer:getSigner(i[0])}}function getSigner(t){let r;const o=t.extension(l);if(o){r=o.valueObj.subs?.[0]?.value.toString("ascii")}else{r=t.extension(u)?.value.toString("ascii")}const a={extensions:{issuer:r},subjectAlternativeName:t.subjectAltName};return{key:i.crypto.createPublicKey(t.publicKey),identity:a}}},21633:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.verifySCTs=verifySCTs;const i=o(83917);const a=o(36849);const c=o(97822);function verifySCTs(t,r,o){let p;const u=t.clone();for(let t=0;t{const r=(0,c.filterTLogAuthorities)(o,{logID:t.logID,targetDate:t.datetime});const i=r.some((r=>t.verify(l.buffer,r.publicKey)));if(!i){throw new a.VerificationError({code:"CERTIFICATE_ERROR",message:"SCT verification failed"})}return t.logID}))}},88037:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.verifySubjectAlternativeName=verifySubjectAlternativeName;r.verifyExtensions=verifyExtensions;const i=o(36849);function verifySubjectAlternativeName(t,r){if(r===undefined||!r.match(t)){throw new i.PolicyError({code:"UNTRUSTED_SIGNER_ERROR",message:`certificate identity error - expected ${t}, got ${r}`})}}function verifyExtensions(t,r={}){let o;for(o in t){if(r[o]!==t[o]){throw new i.PolicyError({code:"UNTRUSTED_SIGNER_ERROR",message:`invalid certificate extension - expected ${o}=${t[o]}, got ${o}=${r[o]}`})}}}},27968:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.getTSATimestamp=getTSATimestamp;r.getTLogTimestamp=getTLogTimestamp;const i=o(84472);function getTSATimestamp(t,r,o){(0,i.verifyRFC3161Timestamp)(t,r,o);return{type:"timestamp-authority",logID:t.signerSerialNumber,timestamp:t.signingTime}}function getTLogTimestamp(t){return{type:"transparency-log",logID:t.logId.keyId,timestamp:new Date(Number(t.integratedTime)*1e3)}}},84472:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.verifyRFC3161Timestamp=verifyRFC3161Timestamp;const i=o(83917);const a=o(36849);const c=o(38412);const p=o(97822);function verifyRFC3161Timestamp(t,r,o){const i=t.signingTime;o=(0,p.filterCertAuthorities)(o,i);o=filterCAsBySerialAndIssuer(o,{serialNumber:t.signerSerialNumber,issuer:t.signerIssuer});const c=o.some((o=>{try{verifyTimestampForCA(t,r,o);return true}catch(t){return false}}));if(!c){throw new a.VerificationError({code:"TIMESTAMP_ERROR",message:"timestamp could not be verified"})}}function verifyTimestampForCA(t,r,o){const[p,...u]=o.certChain;const l=i.crypto.createPublicKey(p.publicKey);const d=t.signingTime;try{new c.CertificateChainVerifier({untrustedCert:p,trustedCerts:u,timestamp:d}).verify()}catch(t){throw new a.VerificationError({code:"TIMESTAMP_ERROR",message:"invalid certificate chain"})}t.verify(r,l)}function filterCAsBySerialAndIssuer(t,r){return t.filter((t=>t.certChain.length>0&&i.crypto.bufferEqual(t.certChain[0].serialNumber,r.serialNumber)&&i.crypto.bufferEqual(t.certChain[0].issuer,r.issuer)))}},39266:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.LogCheckpoint=void 0;r.verifyCheckpoint=verifyCheckpoint;const i=o(83917);const a=o(36849);const c="\n\n";const p=/\u2014 (\S+) (\S+)\n/g;function verifyCheckpoint(t,r){const o=t.inclusionProof;const i=SignedNote.fromString(o.checkpoint.envelope);const c=LogCheckpoint.fromString(i.note);if(!verifySignedNote(i,r)){throw new a.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"})}return c}function verifySignedNote(t,r){const o=Buffer.from(t.note,"utf-8");return t.signatures.some((t=>{const a=r.find((r=>i.crypto.bufferEqual(r.logID.subarray(0,4),t.keyHint)&&r.baseURL.match(t.name)));if(!a){return false}return i.crypto.verify(o,a.publicKey,t.signature)}))}class SignedNote{note;signatures;constructor(t,r){this.note=t;this.signatures=r}static fromString(t){if(!t.includes(c)){throw new a.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"})}const r=t.indexOf(c);const o=t.slice(0,r+1);const i=t.slice(r+c.length);const u=i.matchAll(p);const l=Array.from(u,(t=>{const[,r,o]=t;const i=Buffer.from(o,"base64");if(i.length<5){throw new a.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"})}return{name:r,keyHint:i.subarray(0,4),signature:i.subarray(4)}}));if(l.length===0){throw new a.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"})}return new SignedNote(o,l)}}class LogCheckpoint{origin;logSize;logHash;rest;constructor(t,r,o,i){this.origin=t;this.logSize=r;this.logHash=o;this.rest=i}static fromString(t){const r=t.trimEnd().split("\n");if(r.length<3){throw new a.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"})}const o=r[0];const i=BigInt(r[1]);const c=Buffer.from(r[2],"base64");const p=r.slice(3);return new LogCheckpoint(o,i,c,p)}}r.LogCheckpoint=LogCheckpoint},27005:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.DSSE_API_VERSION_V1=void 0;r.verifyDSSETLogBody=verifyDSSETLogBody;r.verifyDSSETLogBodyV2=verifyDSSETLogBodyV2;const i=o(36849);r.DSSE_API_VERSION_V1="0.0.1";function verifyDSSETLogBody(t,o){switch(t.apiVersion){case r.DSSE_API_VERSION_V1:return verifyDSSE001TLogBody(t,o);default:throw new i.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported dsse version: ${t.apiVersion}`})}}function verifyDSSETLogBodyV2(t,r){const o=t.spec?.spec;if(!o){throw new i.VerificationError({code:"TLOG_BODY_ERROR",message:`missing dsse spec`})}switch(o.$case){case"dsseV002":return verifyDSSE002TLogBody(o.dsseV002,r);default:throw new i.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported version: ${o.$case}`})}}function verifyDSSE001TLogBody(t,r){if(t.spec.signatures?.length!==1){throw new i.VerificationError({code:"TLOG_BODY_ERROR",message:"signature count mismatch"})}const o=t.spec.signatures[0].signature;if(!r.compareSignature(Buffer.from(o,"base64")))throw new i.VerificationError({code:"TLOG_BODY_ERROR",message:"tlog entry signature mismatch"});const a=t.spec.payloadHash?.value||"";if(!r.compareDigest(Buffer.from(a,"hex"))){throw new i.VerificationError({code:"TLOG_BODY_ERROR",message:"DSSE payload hash mismatch"})}}function verifyDSSE002TLogBody(t,r){if(t.signatures?.length!==1){throw new i.VerificationError({code:"TLOG_BODY_ERROR",message:"signature count mismatch"})}const o=t.signatures[0].content;if(!r.compareSignature(o))throw new i.VerificationError({code:"TLOG_BODY_ERROR",message:"tlog entry signature mismatch"});const a=t.payloadHash?.digest||Buffer.from("");if(!r.compareDigest(a)){throw new i.VerificationError({code:"TLOG_BODY_ERROR",message:"DSSE payload hash mismatch"})}}},1484:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.HASHEDREKORD_API_VERSION_V1=void 0;r.verifyHashedRekordTLogBody=verifyHashedRekordTLogBody;r.verifyHashedRekordTLogBodyV2=verifyHashedRekordTLogBodyV2;const i=o(36849);r.HASHEDREKORD_API_VERSION_V1="0.0.1";function verifyHashedRekordTLogBody(t,o){switch(t.apiVersion){case r.HASHEDREKORD_API_VERSION_V1:return verifyHashedrekord001TLogBody(t,o);default:throw new i.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported hashedrekord version: ${t.apiVersion}`})}}function verifyHashedRekordTLogBodyV2(t,r){const o=t.spec?.spec;if(!o){throw new i.VerificationError({code:"TLOG_BODY_ERROR",message:`missing dsse spec`})}switch(o.$case){case"hashedRekordV002":return verifyHashedrekord002TLogBody(o.hashedRekordV002,r);default:throw new i.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported version: ${o.$case}`})}}function verifyHashedrekord001TLogBody(t,r){const o=t.spec.signature.content||"";if(!r.compareSignature(Buffer.from(o,"base64"))){throw new i.VerificationError({code:"TLOG_BODY_ERROR",message:"signature mismatch"})}const a=t.spec.data.hash?.value||"";if(!r.compareDigest(Buffer.from(a,"hex"))){throw new i.VerificationError({code:"TLOG_BODY_ERROR",message:"digest mismatch"})}}function verifyHashedrekord002TLogBody(t,r){const o=t.signature?.content||Buffer.from("");if(!r.compareSignature(o)){throw new i.VerificationError({code:"TLOG_BODY_ERROR",message:"signature mismatch"})}const a=t.data?.digest||Buffer.from("");if(!r.compareDigest(a)){throw new i.VerificationError({code:"TLOG_BODY_ERROR",message:"digest mismatch"})}}},38218:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.verifyTLogBody=verifyTLogBody;r.verifyTLogInclusion=verifyTLogInclusion;const i=o(13835);const a=o(36849);const c=o(27005);const p=o(1484);const u=o(17703);const l=o(39266);const d=o(17046);const A=o(2714);function verifyTLogBody(t,r){const{kind:o,version:l}=t.kindVersion;const d=JSON.parse(t.canonicalizedBody.toString("utf8"));if(o!==d.kind||l!==d.apiVersion){throw new a.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/version mismatch - expected: ${o}/${l}, received: ${d.kind}/${d.apiVersion}`})}switch(o){case"dsse":if(l==c.DSSE_API_VERSION_V1){return(0,c.verifyDSSETLogBody)(d,r)}else{const t=i.Entry.fromJSON(d);return(0,c.verifyDSSETLogBodyV2)(t,r)}case"intoto":return(0,u.verifyIntotoTLogBody)(d,r);case"hashedrekord":if(l==p.HASHEDREKORD_API_VERSION_V1){return(0,p.verifyHashedRekordTLogBody)(d,r)}else{const t=i.Entry.fromJSON(d);return(0,p.verifyHashedRekordTLogBodyV2)(t,r)}default:throw new a.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported kind: ${o}`})}}function verifyTLogInclusion(t,r){let o=false;if(isTLogEntryWithInclusionPromise(t)){(0,A.verifyTLogSET)(t,r);o=true}if(isTLogEntryWithInclusionProof(t)){const i=(0,l.verifyCheckpoint)(t,r);(0,d.verifyMerkleInclusion)(t,i);o=true}if(!o){throw new a.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}return}function isTLogEntryWithInclusionPromise(t){return t.inclusionPromise!==undefined}function isTLogEntryWithInclusionProof(t){return t.inclusionProof!==undefined}},17703:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.verifyIntotoTLogBody=verifyIntotoTLogBody;const i=o(36849);function verifyIntotoTLogBody(t,r){switch(t.apiVersion){case"0.0.2":return verifyIntoto002TLogBody(t,r);default:throw new i.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported intoto version: ${t.apiVersion}`})}}function verifyIntoto002TLogBody(t,r){if(t.spec.content.envelope.signatures?.length!==1){throw new i.VerificationError({code:"TLOG_BODY_ERROR",message:"signature count mismatch"})}const o=base64Decode(t.spec.content.envelope.signatures[0].sig);if(!r.compareSignature(Buffer.from(o,"base64"))){throw new i.VerificationError({code:"TLOG_BODY_ERROR",message:"tlog entry signature mismatch"})}const a=t.spec.content.payloadHash?.value||"";if(!r.compareDigest(Buffer.from(a,"hex"))){throw new i.VerificationError({code:"TLOG_BODY_ERROR",message:"DSSE payload hash mismatch"})}}function base64Decode(t){return Buffer.from(t,"base64").toString("utf-8")}},17046:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.verifyMerkleInclusion=verifyMerkleInclusion;const i=o(83917);const a=o(36849);const c=Buffer.from([0]);const p=Buffer.from([1]);function verifyMerkleInclusion(t,r){const o=t.inclusionProof;const c=BigInt(o.logIndex);const p=BigInt(r.logSize);if(c<0n||c>=p){throw new a.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalid index: ${c}`})}const{inner:u,border:l}=decompInclProof(c,p);if(o.hashes.length!==u+l){throw new a.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"})}const d=o.hashes.slice(0,u);const A=o.hashes.slice(u);const b=hashLeaf(t.canonicalizedBody);const h=chainBorderRight(chainInner(b,d,c),A);if(!i.crypto.bufferEqual(h,r.logHash)){throw new a.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}}function decompInclProof(t,r){const o=innerProofSize(t,r);const i=onesCount(t>>BigInt(o));return{inner:o,border:i}}function chainInner(t,r,o){return r.reduce(((t,r,i)=>{if(o>>BigInt(i)&BigInt(1)){return hashChildren(r,t)}else{return hashChildren(t,r)}}),t)}function chainBorderRight(t,r){return r.reduce(((t,r)=>hashChildren(r,t)),t)}function innerProofSize(t,r){return bitLength(t^r-BigInt(1))}function onesCount(t){return t.toString(2).split("1").length-1}function bitLength(t){if(t===0n){return 0}return t.toString(2).length}function hashChildren(t,r){return i.crypto.digest("sha256",p,t,r)}function hashLeaf(t){return i.crypto.digest("sha256",c,t)}},2714:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.verifyTLogSET=verifyTLogSET;const i=o(83917);const a=o(36849);const c=o(97822);function verifyTLogSET(t,r){const o=(0,c.filterTLogAuthorities)(r,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)});const p=o.some((r=>{const o=toVerificationPayload(t);const a=Buffer.from(i.json.canonicalize(o),"utf8");const c=t.inclusionPromise.signedEntryTimestamp;return i.crypto.verify(a,r.publicKey,c)}));if(!p){throw new a.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}}function toVerificationPayload(t){const{integratedTime:r,logIndex:o,logId:i,canonicalizedBody:a}=t;return{body:a.toString("base64"),integratedTime:Number(r),logIndex:Number(o),logID:i.keyId.toString("hex")}}},19738:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.filterCertAuthorities=filterCertAuthorities;r.filterTLogAuthorities=filterTLogAuthorities;function filterCertAuthorities(t,r){return t.filter((t=>t.validFor.start<=r&&t.validFor.end>=r))}function filterTLogAuthorities(t,r){return t.filter((t=>{if(r.logID&&!t.logID.equals(r.logID)){return false}return t.validFor.start<=r.targetDate&&r.targetDate<=t.validFor.end}))}},97822:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.filterTLogAuthorities=r.filterCertAuthorities=void 0;r.toTrustMaterial=toTrustMaterial;const i=o(83917);const a=o(19654);const c=o(36849);const p=new Date(0);const u=new Date(864e13);var l=o(19738);Object.defineProperty(r,"filterCertAuthorities",{enumerable:true,get:function(){return l.filterCertAuthorities}});Object.defineProperty(r,"filterTLogAuthorities",{enumerable:true,get:function(){return l.filterTLogAuthorities}});function toTrustMaterial(t,r){const o=typeof r==="function"?r:keyLocator(r);return{certificateAuthorities:t.certificateAuthorities.map(createCertAuthority),timestampAuthorities:t.timestampAuthorities.map(createCertAuthority),tlogs:t.tlogs.map(createTLogAuthority),ctlogs:t.ctlogs.map(createTLogAuthority),publicKey:o}}function createTLogAuthority(t){const r=t.publicKey.keyDetails;const o=r===a.PublicKeyDetails.PKCS1_RSA_PKCS1V5||r===a.PublicKeyDetails.PKIX_RSA_PKCS1V5||r===a.PublicKeyDetails.PKIX_RSA_PKCS1V15_2048_SHA256||r===a.PublicKeyDetails.PKIX_RSA_PKCS1V15_3072_SHA256||r===a.PublicKeyDetails.PKIX_RSA_PKCS1V15_4096_SHA256?"pkcs1":"spki";return{baseURL:t.baseUrl,logID:t.checkpointKeyId?t.checkpointKeyId.keyId:t.logId.keyId,publicKey:i.crypto.createPublicKey(t.publicKey.rawBytes,o),validFor:{start:t.publicKey.validFor?.start||p,end:t.publicKey.validFor?.end||u}}}function createCertAuthority(t){return{certChain:t.certChain.certificates.map((t=>i.X509Certificate.parse(Buffer.from(t.rawBytes)))),validFor:{start:t.validFor?.start||p,end:t.validFor?.end||u}}}function keyLocator(t){return r=>{const o=(t||{})[r];if(!o){throw new c.VerificationError({code:"PUBLIC_KEY_ERROR",message:`key not found: ${r}`})}return{publicKey:i.crypto.createPublicKey(o.rawBytes),validFor:t=>(o.validFor?.start||p)<=t&&(o.validFor?.end||u)>=t}}}},74433:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.Verifier=void 0;const i=o(39023);const a=o(36849);const c=o(53771);const p=o(88037);const u=o(27968);const l=o(38218);class Verifier{trustMaterial;options;constructor(t,r={}){this.trustMaterial=t;this.options={ctlogThreshold:r.ctlogThreshold??1,tlogThreshold:r.tlogThreshold??1,timestampThreshold:r.timestampThreshold??r.tsaThreshold??1,tsaThreshold:0}}verify(t,r){const o=this.verifyTimestamps(t);const i=this.verifySigningKey(t,o);this.verifyTLogs(t);this.verifySignature(t,i);if(r){this.verifyPolicy(r,i.identity||{})}return i}verifyTimestamps(t){let r=0;const o=t.timestamps.map((o=>{switch(o.$case){case"timestamp-authority":r++;return(0,u.getTSATimestamp)(o.timestamp,t.signature.signature,this.trustMaterial.timestampAuthorities);case"transparency-log":r++;return(0,u.getTLogTimestamp)(o.tlogEntry)}}));if(containsDupes(o)){throw new a.VerificationError({code:"TIMESTAMP_ERROR",message:"duplicate timestamp"})}if(rt.timestamp))}verifySigningKey({key:t},r){switch(t.$case){case"public-key":{return(0,c.verifyPublicKey)(t.hint,r,this.trustMaterial)}case"certificate":{const o=(0,c.verifyCertificate)(t.certificate,r,this.trustMaterial);if(containsDupes(o.scts)){throw new a.VerificationError({code:"CERTIFICATE_ERROR",message:"duplicate SCT"})}if(o.scts.length{o++;(0,l.verifyTLogInclusion)(r,this.trustMaterial.tlogs);(0,l.verifyTLogBody)(r,t)}));if(o{const r=",";const o=":";const i="[";const a="]";const c="{";const p="}";function canonicalize(t){const u=[];if(typeof t==="string"){u.push(canonicalizeString(t))}else if(typeof t==="boolean"){u.push(JSON.stringify(t))}else if(Number.isInteger(t)){u.push(JSON.stringify(t))}else if(t===null){u.push(JSON.stringify(t))}else if(Array.isArray(t)){u.push(i);let o=true;t.forEach((t=>{if(!o){u.push(r)}o=false;u.push(canonicalize(t))}));u.push(a)}else if(typeof t==="object"){u.push(c);let i=true;Object.keys(t).sort().forEach((a=>{if(!i){u.push(r)}i=false;u.push(canonicalizeString(a));u.push(o);u.push(canonicalize(t[a]))}));u.push(p)}else{throw new TypeError("cannot encode "+t.toString())}return u.join("")}function canonicalizeString(t){const r=t.replace(/\\/g,"\\\\").replace(/"/g,'\\"');return'"'+r+'"'}t.exports={canonicalize:canonicalize}},28883:function(t,r,o){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});r.Signed=r.MetadataKind=void 0;r.isMetadataKind=isMetadataKind;const a=i(o(39023));const c=o(5494);const p=o(20846);const u=["1","0","31"];var l;(function(t){t["Root"]="root";t["Timestamp"]="timestamp";t["Snapshot"]="snapshot";t["Targets"]="targets"})(l||(r.MetadataKind=l={}));function isMetadataKind(t){return typeof t==="string"&&Object.values(l).includes(t)}class Signed{specVersion;expires;version;unrecognizedFields;constructor(t){this.specVersion=t.specVersion||u.join(".");const r=this.specVersion.split(".");if(!(r.length===2||r.length===3)||!r.every((t=>isNumeric(t)))){throw new c.ValueError("Failed to parse specVersion")}if(r[0]!=u[0]){throw new c.ValueError("Unsupported specVersion")}this.expires=t.expires;this.version=t.version;this.unrecognizedFields=t.unrecognizedFields||{}}equals(t){if(!(t instanceof Signed)){return false}return this.specVersion===t.specVersion&&this.expires===t.expires&&this.version===t.version&&a.default.isDeepStrictEqual(this.unrecognizedFields,t.unrecognizedFields)}isExpired(t){if(!t){t=new Date}return t>=new Date(this.expires)}static commonFieldsFromJSON(t){const{spec_version:r,expires:o,version:i,...a}=t;if(!p.guard.isDefined(r)){throw new c.ValueError("spec_version is not defined")}else if(typeof r!=="string"){throw new TypeError("spec_version must be a string")}if(!p.guard.isDefined(o)){throw new c.ValueError("expires is not defined")}else if(!(typeof o==="string")){throw new TypeError("expires must be a string")}if(!p.guard.isDefined(i)){throw new c.ValueError("version is not defined")}else if(!(typeof i==="number")){throw new TypeError("version must be a number")}return{specVersion:r,expires:o,version:i,unrecognizedFields:a}}}r.Signed=Signed;function isNumeric(t){return!isNaN(Number(t))}},84727:function(t,r,o){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});r.Delegations=void 0;const a=i(o(39023));const c=o(5494);const p=o(53343);const u=o(55934);const l=o(20846);class Delegations{keys;roles;unrecognizedFields;succinctRoles;constructor(t){this.keys=t.keys;this.unrecognizedFields=t.unrecognizedFields||{};if(t.roles){if(Object.keys(t.roles).some((t=>u.TOP_LEVEL_ROLE_NAMES.includes(t)))){throw new c.ValueError("Delegated role name conflicts with top-level role name")}}this.succinctRoles=t.succinctRoles;this.roles=t.roles}equals(t){if(!(t instanceof Delegations)){return false}return a.default.isDeepStrictEqual(this.keys,t.keys)&&a.default.isDeepStrictEqual(this.roles,t.roles)&&a.default.isDeepStrictEqual(this.unrecognizedFields,t.unrecognizedFields)&&a.default.isDeepStrictEqual(this.succinctRoles,t.succinctRoles)}*rolesForTarget(t){if(this.roles){for(const r of Object.values(this.roles)){if(r.isDelegatedPath(t)){yield{role:r.name,terminating:r.terminating}}}}else if(this.succinctRoles){yield{role:this.succinctRoles.getRoleForTarget(t),terminating:true}}}toJSON(){const t={keys:keysToJSON(this.keys),...this.unrecognizedFields};if(this.roles){t.roles=rolesToJSON(this.roles)}else if(this.succinctRoles){t.succinct_roles=this.succinctRoles.toJSON()}return t}static fromJSON(t){const{keys:r,roles:o,succinct_roles:i,...a}=t;let c;if(l.guard.isObject(i)){c=u.SuccinctRoles.fromJSON(i)}return new Delegations({keys:keysFromJSON(r),roles:rolesFromJSON(o),unrecognizedFields:a,succinctRoles:c})}}r.Delegations=Delegations;function keysToJSON(t){return Object.entries(t).reduce(((t,[r,o])=>({...t,[r]:o.toJSON()})),{})}function rolesToJSON(t){return Object.values(t).map((t=>t.toJSON()))}function keysFromJSON(t){if(!l.guard.isObjectRecord(t)){throw new TypeError("keys is malformed")}return Object.entries(t).reduce(((t,[r,o])=>({...t,[r]:p.Key.fromJSON(r,o)})),{})}function rolesFromJSON(t){let r;if(l.guard.isDefined(t)){if(!l.guard.isObjectArray(t)){throw new TypeError("roles is malformed")}r=t.reduce(((t,r)=>{const o=u.DelegatedRole.fromJSON(r);return{...t,[o.name]:o}}),{})}return r}},5494:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.UnsupportedAlgorithmError=r.CryptoError=r.LengthOrHashMismatchError=r.UnsignedMetadataError=r.RepositoryError=r.ValueError=void 0;class ValueError extends Error{}r.ValueError=ValueError;class RepositoryError extends Error{}r.RepositoryError=RepositoryError;class UnsignedMetadataError extends RepositoryError{}r.UnsignedMetadataError=UnsignedMetadataError;class LengthOrHashMismatchError extends RepositoryError{}r.LengthOrHashMismatchError=LengthOrHashMismatchError;class CryptoError extends Error{}r.CryptoError=CryptoError;class UnsupportedAlgorithmError extends CryptoError{}r.UnsupportedAlgorithmError=UnsupportedAlgorithmError},76708:function(t,r,o){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});r.TargetFile=r.MetaFile=void 0;const a=i(o(76982));const c=i(o(39023));const p=o(5494);const u=o(20846);class MetaFile{version;length;hashes;unrecognizedFields;constructor(t){if(t.version<=0){throw new p.ValueError("Metafile version must be at least 1")}if(t.length!==undefined){validateLength(t.length)}this.version=t.version;this.length=t.length;this.hashes=t.hashes;this.unrecognizedFields=t.unrecognizedFields||{}}equals(t){if(!(t instanceof MetaFile)){return false}return this.version===t.version&&this.length===t.length&&c.default.isDeepStrictEqual(this.hashes,t.hashes)&&c.default.isDeepStrictEqual(this.unrecognizedFields,t.unrecognizedFields)}verify(t){if(this.length!==undefined){if(t.length!==this.length){throw new p.LengthOrHashMismatchError(`Expected length ${this.length} but got ${t.length}`)}}if(this.hashes){Object.entries(this.hashes).forEach((([r,o])=>{let i;try{i=a.default.createHash(r)}catch(t){throw new p.LengthOrHashMismatchError(`Hash algorithm ${r} not supported`)}const c=i.update(t).digest("hex");if(c!==o){throw new p.LengthOrHashMismatchError(`Expected hash ${o} but got ${c}`)}}))}}toJSON(){const t={version:this.version,...this.unrecognizedFields};if(this.length!==undefined){t.length=this.length}if(this.hashes){t.hashes=this.hashes}return t}static fromJSON(t){const{version:r,length:o,hashes:i,...a}=t;if(typeof r!=="number"){throw new TypeError("version must be a number")}if(u.guard.isDefined(o)&&typeof o!=="number"){throw new TypeError("length must be a number")}if(u.guard.isDefined(i)&&!u.guard.isStringRecord(i)){throw new TypeError("hashes must be string keys and values")}return new MetaFile({version:r,length:o,hashes:i,unrecognizedFields:a})}}r.MetaFile=MetaFile;class TargetFile{length;path;hashes;unrecognizedFields;constructor(t){validateLength(t.length);this.length=t.length;this.path=t.path;this.hashes=t.hashes;this.unrecognizedFields=t.unrecognizedFields||{}}get custom(){const t=this.unrecognizedFields["custom"];if(!t||Array.isArray(t)||!(typeof t==="object")){return{}}return t}equals(t){if(!(t instanceof TargetFile)){return false}return this.length===t.length&&this.path===t.path&&c.default.isDeepStrictEqual(this.hashes,t.hashes)&&c.default.isDeepStrictEqual(this.unrecognizedFields,t.unrecognizedFields)}async verify(t){let r=0;const o=Object.keys(this.hashes).reduce(((t,r)=>{try{t[r]=a.default.createHash(r)}catch(t){throw new p.LengthOrHashMismatchError(`Hash algorithm ${r} not supported`)}return t}),{});for await(const i of t){r+=i.length;Object.values(o).forEach((t=>{t.update(i)}))}if(r!==this.length){throw new p.LengthOrHashMismatchError(`Expected length ${this.length} but got ${r}`)}Object.entries(o).forEach((([t,r])=>{const o=this.hashes[t];const i=r.digest("hex");if(i!==o){throw new p.LengthOrHashMismatchError(`Expected hash ${o} but got ${i}`)}}))}toJSON(){return{length:this.length,hashes:this.hashes,...this.unrecognizedFields}}static fromJSON(t,r){const{length:o,hashes:i,...a}=r;if(typeof o!=="number"){throw new TypeError("length must be a number")}if(!u.guard.isStringRecord(i)){throw new TypeError("hashes must have string keys and values")}return new TargetFile({length:o,path:t,hashes:i,unrecognizedFields:a})}}r.TargetFile=TargetFile;function validateLength(t){if(t<0){throw new p.ValueError("Length must be at least 0")}}},68908:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.Timestamp=r.Targets=r.Snapshot=r.Signature=r.Root=r.Metadata=r.Key=r.TargetFile=r.MetaFile=r.ValueError=r.MetadataKind=void 0;var i=o(28883);Object.defineProperty(r,"MetadataKind",{enumerable:true,get:function(){return i.MetadataKind}});var a=o(5494);Object.defineProperty(r,"ValueError",{enumerable:true,get:function(){return a.ValueError}});var c=o(76708);Object.defineProperty(r,"MetaFile",{enumerable:true,get:function(){return c.MetaFile}});Object.defineProperty(r,"TargetFile",{enumerable:true,get:function(){return c.TargetFile}});var p=o(53343);Object.defineProperty(r,"Key",{enumerable:true,get:function(){return p.Key}});var u=o(86555);Object.defineProperty(r,"Metadata",{enumerable:true,get:function(){return u.Metadata}});var l=o(8946);Object.defineProperty(r,"Root",{enumerable:true,get:function(){return l.Root}});var d=o(50874);Object.defineProperty(r,"Signature",{enumerable:true,get:function(){return d.Signature}});var A=o(59386);Object.defineProperty(r,"Snapshot",{enumerable:true,get:function(){return A.Snapshot}});var b=o(46150);Object.defineProperty(r,"Targets",{enumerable:true,get:function(){return b.Targets}});var h=o(81796);Object.defineProperty(r,"Timestamp",{enumerable:true,get:function(){return h.Timestamp}})},53343:function(t,r,o){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});r.Key=void 0;const a=i(o(39023));const c=o(5494);const p=o(20846);const u=o(86361);class Key{keyID;keyType;scheme;keyVal;unrecognizedFields;constructor(t){const{keyID:r,keyType:o,scheme:i,keyVal:a,unrecognizedFields:c}=t;this.keyID=r;this.keyType=o;this.scheme=i;this.keyVal=a;this.unrecognizedFields=c||{}}verifySignature(t){const r=t.signatures[this.keyID];if(!r)throw new c.UnsignedMetadataError("no signature for key found in metadata");if(!this.keyVal.public)throw new c.UnsignedMetadataError("no public key found");const o=(0,u.getPublicKey)({keyType:this.keyType,scheme:this.scheme,keyVal:this.keyVal.public});const i=t.signed.toJSON();try{if(!p.crypto.verifySignature(i,o,r.sig)){throw new c.UnsignedMetadataError(`failed to verify ${this.keyID} signature`)}}catch(t){if(t instanceof c.UnsignedMetadataError){throw t}throw new c.UnsignedMetadataError(`failed to verify ${this.keyID} signature`)}}equals(t){if(!(t instanceof Key)){return false}return this.keyID===t.keyID&&this.keyType===t.keyType&&this.scheme===t.scheme&&a.default.isDeepStrictEqual(this.keyVal,t.keyVal)&&a.default.isDeepStrictEqual(this.unrecognizedFields,t.unrecognizedFields)}toJSON(){return{keytype:this.keyType,scheme:this.scheme,keyval:this.keyVal,...this.unrecognizedFields}}static fromJSON(t,r){const{keytype:o,scheme:i,keyval:a,...c}=r;if(typeof o!=="string"){throw new TypeError("keytype must be a string")}if(typeof i!=="string"){throw new TypeError("scheme must be a string")}if(!p.guard.isStringRecord(a)){throw new TypeError("keyval must be a string record")}return new Key({keyID:t,keyType:o,scheme:i,keyVal:a,unrecognizedFields:c})}}r.Key=Key},86555:function(t,r,o){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});r.Metadata=void 0;const a=o(65178);const c=i(o(39023));const p=o(28883);const u=o(5494);const l=o(8946);const d=o(50874);const A=o(59386);const b=o(46150);const h=o(81796);const M=o(20846);class Metadata{signed;signatures;unrecognizedFields;constructor(t,r,o){this.signed=t;this.signatures=r||{};this.unrecognizedFields=o||{}}sign(t,r=true){const o=Buffer.from((0,a.canonicalize)(this.signed.toJSON()));const i=t(o);if(!r){this.signatures={}}this.signatures[i.keyID]=i}verifyDelegate(t,r){let o;let i={};switch(this.signed.type){case p.MetadataKind.Root:i=this.signed.keys;o=this.signed.roles[t];break;case p.MetadataKind.Targets:if(!this.signed.delegations){throw new u.ValueError(`No delegations found for ${t}`)}i=this.signed.delegations.keys;if(this.signed.delegations.roles){o=this.signed.delegations.roles[t]}else if(this.signed.delegations.succinctRoles){if(this.signed.delegations.succinctRoles.isDelegatedRole(t)){o=this.signed.delegations.succinctRoles}}break;default:throw new TypeError("invalid metadata type")}if(!o){throw new u.ValueError(`no delegation found for ${t}`)}const a=new Set;o.keyIDs.forEach((t=>{const o=i[t];if(!o){return}try{o.verifySignature(r);a.add(o.keyID)}catch(t){}}));if(a.sizet.toJSON()));return{signatures:t,signed:this.signed.toJSON(),...this.unrecognizedFields}}static fromJSON(t,r){const{signed:o,signatures:i,...a}=r;if(!M.guard.isDefined(o)||!M.guard.isObject(o)){throw new TypeError("signed is not defined")}if(t!==o._type){throw new u.ValueError(`expected '${t}', got ${o["_type"]}`)}if(!M.guard.isObjectArray(i)){throw new TypeError("signatures is not an array")}let c;switch(t){case p.MetadataKind.Root:c=l.Root.fromJSON(o);break;case p.MetadataKind.Timestamp:c=h.Timestamp.fromJSON(o);break;case p.MetadataKind.Snapshot:c=A.Snapshot.fromJSON(o);break;case p.MetadataKind.Targets:c=b.Targets.fromJSON(o);break;default:throw new TypeError("invalid metadata type")}const g={};i.forEach((t=>{const r=d.Signature.fromJSON(t);if(g[r.keyID]){throw new u.ValueError(`multiple signatures found for keyid: ${r.keyID}`)}g[r.keyID]=r}));return new Metadata(c,g,a)}}r.Metadata=Metadata},55934:function(t,r,o){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});r.SuccinctRoles=r.DelegatedRole=r.Role=r.TOP_LEVEL_ROLE_NAMES=void 0;const a=i(o(76982));const c=o(61956);const p=i(o(39023));const u=o(5494);const l=o(20846);r.TOP_LEVEL_ROLE_NAMES=["root","targets","snapshot","timestamp"];class Role{keyIDs;threshold;unrecognizedFields;constructor(t){const{keyIDs:r,threshold:o,unrecognizedFields:i}=t;if(hasDuplicates(r)){throw new u.ValueError("duplicate key IDs found")}if(o<1){throw new u.ValueError("threshold must be at least 1")}this.keyIDs=r;this.threshold=o;this.unrecognizedFields=i||{}}equals(t){if(!(t instanceof Role)){return false}return this.threshold===t.threshold&&p.default.isDeepStrictEqual(this.keyIDs,t.keyIDs)&&p.default.isDeepStrictEqual(this.unrecognizedFields,t.unrecognizedFields)}toJSON(){return{keyids:this.keyIDs,threshold:this.threshold,...this.unrecognizedFields}}static fromJSON(t){const{keyids:r,threshold:o,...i}=t;if(!l.guard.isStringArray(r)){throw new TypeError("keyids must be an array")}if(typeof o!=="number"){throw new TypeError("threshold must be a number")}return new Role({keyIDs:r,threshold:o,unrecognizedFields:i})}}r.Role=Role;function hasDuplicates(t){return new Set(t).size!==t.length}class DelegatedRole extends Role{name;terminating;paths;pathHashPrefixes;constructor(t){super(t);const{name:r,terminating:o,paths:i,pathHashPrefixes:a}=t;this.name=r;this.terminating=o;if(t.paths&&t.pathHashPrefixes){throw new u.ValueError("paths and pathHashPrefixes are mutually exclusive")}this.paths=i;this.pathHashPrefixes=a}equals(t){if(!(t instanceof DelegatedRole)){return false}return super.equals(t)&&this.name===t.name&&this.terminating===t.terminating&&p.default.isDeepStrictEqual(this.paths,t.paths)&&p.default.isDeepStrictEqual(this.pathHashPrefixes,t.pathHashPrefixes)}isDelegatedPath(t){if(this.paths){return this.paths.some((r=>isTargetInPathPattern(t,r)))}if(this.pathHashPrefixes){const r=a.default.createHash("sha256");const o=r.update(t).digest("hex");return this.pathHashPrefixes.some((t=>o.startsWith(t)))}return false}toJSON(){const t={...super.toJSON(),name:this.name,terminating:this.terminating};if(this.paths){t.paths=this.paths}if(this.pathHashPrefixes){t.path_hash_prefixes=this.pathHashPrefixes}return t}static fromJSON(t){const{keyids:r,threshold:o,name:i,terminating:a,paths:c,path_hash_prefixes:p,...u}=t;if(!l.guard.isStringArray(r)){throw new TypeError("keyids must be an array of strings")}if(typeof o!=="number"){throw new TypeError("threshold must be a number")}if(typeof i!=="string"){throw new TypeError("name must be a string")}if(typeof a!=="boolean"){throw new TypeError("terminating must be a boolean")}if(l.guard.isDefined(c)&&!l.guard.isStringArray(c)){throw new TypeError("paths must be an array of strings")}if(l.guard.isDefined(p)&&!l.guard.isStringArray(p)){throw new TypeError("path_hash_prefixes must be an array of strings")}return new DelegatedRole({keyIDs:r,threshold:o,name:i,terminating:a,paths:c,pathHashPrefixes:p,unrecognizedFields:u})}}r.DelegatedRole=DelegatedRole;const zip=(t,r)=>t.map(((t,o)=>[t,r[o]]));function isTargetInPathPattern(t,r){const o=t.split("/");const i=r.split("/");if(i.length!=o.length){return false}return zip(o,i).every((([t,r])=>(0,c.minimatch)(t,r)))}class SuccinctRoles extends Role{bitLength;namePrefix;numberOfBins;suffixLen;constructor(t){super(t);const{bitLength:r,namePrefix:o}=t;if(r<=0||r>32){throw new u.ValueError("bitLength must be between 1 and 32")}this.bitLength=r;this.namePrefix=o;this.numberOfBins=Math.pow(2,r);this.suffixLen=(this.numberOfBins-1).toString(16).length}equals(t){if(!(t instanceof SuccinctRoles)){return false}return super.equals(t)&&this.bitLength===t.bitLength&&this.namePrefix===t.namePrefix}getRoleForTarget(t){const r=a.default.createHash("sha256");const o=r.update(t).digest();const i=o.subarray(0,4);const c=32-this.bitLength;const p=i.readUInt32BE()>>>c;const u=p.toString(16).padStart(this.suffixLen,"0");return`${this.namePrefix}-${u}`}*getRoles(){for(let t=0;t({...t,[r]:new l.Role({keyIDs:[],threshold:1})})),{})}else{const r=new Set(Object.keys(t.roles));if(!l.TOP_LEVEL_ROLE_NAMES.every((t=>r.has(t)))){throw new p.ValueError("missing top-level role")}this.roles=t.roles}}addKey(t,r){if(!this.roles[r]){throw new p.ValueError(`role ${r} does not exist`)}if(!this.roles[r].keyIDs.includes(t.keyID)){this.roles[r].keyIDs.push(t.keyID)}this.keys[t.keyID]=t}equals(t){if(!(t instanceof Root)){return false}return super.equals(t)&&this.consistentSnapshot===t.consistentSnapshot&&a.default.isDeepStrictEqual(this.keys,t.keys)&&a.default.isDeepStrictEqual(this.roles,t.roles)}toJSON(){return{_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,keys:keysToJSON(this.keys),roles:rolesToJSON(this.roles),consistent_snapshot:this.consistentSnapshot,...this.unrecognizedFields}}static fromJSON(t){const{unrecognizedFields:r,...o}=c.Signed.commonFieldsFromJSON(t);const{keys:i,roles:a,consistent_snapshot:p,...u}=r;if(typeof p!=="boolean"){throw new TypeError("consistent_snapshot must be a boolean")}return new Root({...o,keys:keysFromJSON(i),roles:rolesFromJSON(a),consistentSnapshot:p,unrecognizedFields:u})}}r.Root=Root;function keysToJSON(t){return Object.entries(t).reduce(((t,[r,o])=>({...t,[r]:o.toJSON()})),{})}function rolesToJSON(t){return Object.entries(t).reduce(((t,[r,o])=>({...t,[r]:o.toJSON()})),{})}function keysFromJSON(t){let r;if(d.guard.isDefined(t)){if(!d.guard.isObjectRecord(t)){throw new TypeError("keys must be an object")}r=Object.entries(t).reduce(((t,[r,o])=>({...t,[r]:u.Key.fromJSON(r,o)})),{})}return r}function rolesFromJSON(t){let r;if(d.guard.isDefined(t)){if(!d.guard.isObjectRecord(t)){throw new TypeError("roles must be an object")}r=Object.entries(t).reduce(((t,[r,o])=>({...t,[r]:l.Role.fromJSON(o)})),{})}return r}},50874:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.Signature=void 0;class Signature{keyID;sig;constructor(t){const{keyID:r,sig:o}=t;this.keyID=r;this.sig=o}toJSON(){return{keyid:this.keyID,sig:this.sig}}static fromJSON(t){const{keyid:r,sig:o}=t;if(typeof r!=="string"){throw new TypeError("keyid must be a string")}if(typeof o!=="string"){throw new TypeError("sig must be a string")}return new Signature({keyID:r,sig:o})}}r.Signature=Signature},59386:function(t,r,o){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});r.Snapshot=void 0;const a=i(o(39023));const c=o(28883);const p=o(76708);const u=o(20846);class Snapshot extends c.Signed{type=c.MetadataKind.Snapshot;meta;constructor(t){super(t);this.meta=t.meta||{"targets.json":new p.MetaFile({version:1})}}equals(t){if(!(t instanceof Snapshot)){return false}return super.equals(t)&&a.default.isDeepStrictEqual(this.meta,t.meta)}toJSON(){return{_type:this.type,meta:metaToJSON(this.meta),spec_version:this.specVersion,version:this.version,expires:this.expires,...this.unrecognizedFields}}static fromJSON(t){const{unrecognizedFields:r,...o}=c.Signed.commonFieldsFromJSON(t);const{meta:i,...a}=r;return new Snapshot({...o,meta:metaFromJSON(i),unrecognizedFields:a})}}r.Snapshot=Snapshot;function metaToJSON(t){return Object.entries(t).reduce(((t,[r,o])=>({...t,[r]:o.toJSON()})),{})}function metaFromJSON(t){let r;if(u.guard.isDefined(t)){if(!u.guard.isObjectRecord(t)){throw new TypeError("meta field is malformed")}else{r=Object.entries(t).reduce(((t,[r,o])=>({...t,[r]:p.MetaFile.fromJSON(o)})),{})}}return r}},46150:function(t,r,o){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});r.Targets=void 0;const a=i(o(39023));const c=o(28883);const p=o(84727);const u=o(76708);const l=o(20846);class Targets extends c.Signed{type=c.MetadataKind.Targets;targets;delegations;constructor(t){super(t);this.targets=t.targets||{};this.delegations=t.delegations}addTarget(t){this.targets[t.path]=t}equals(t){if(!(t instanceof Targets)){return false}return super.equals(t)&&a.default.isDeepStrictEqual(this.targets,t.targets)&&a.default.isDeepStrictEqual(this.delegations,t.delegations)}toJSON(){const t={_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,targets:targetsToJSON(this.targets),...this.unrecognizedFields};if(this.delegations){t.delegations=this.delegations.toJSON()}return t}static fromJSON(t){const{unrecognizedFields:r,...o}=c.Signed.commonFieldsFromJSON(t);const{targets:i,delegations:a,...p}=r;return new Targets({...o,targets:targetsFromJSON(i),delegations:delegationsFromJSON(a),unrecognizedFields:p})}}r.Targets=Targets;function targetsToJSON(t){return Object.entries(t).reduce(((t,[r,o])=>({...t,[r]:o.toJSON()})),{})}function targetsFromJSON(t){let r;if(l.guard.isDefined(t)){if(!l.guard.isObjectRecord(t)){throw new TypeError("targets must be an object")}else{r=Object.entries(t).reduce(((t,[r,o])=>({...t,[r]:u.TargetFile.fromJSON(r,o)})),{})}}return r}function delegationsFromJSON(t){let r;if(l.guard.isDefined(t)){if(!l.guard.isObject(t)){throw new TypeError("delegations must be an object")}else{r=p.Delegations.fromJSON(t)}}return r}},81796:(t,r,o)=>{Object.defineProperty(r,"__esModule",{value:true});r.Timestamp=void 0;const i=o(28883);const a=o(76708);const c=o(20846);class Timestamp extends i.Signed{type=i.MetadataKind.Timestamp;snapshotMeta;constructor(t){super(t);this.snapshotMeta=t.snapshotMeta||new a.MetaFile({version:1})}equals(t){if(!(t instanceof Timestamp)){return false}return super.equals(t)&&this.snapshotMeta.equals(t.snapshotMeta)}toJSON(){return{_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,meta:{"snapshot.json":this.snapshotMeta.toJSON()},...this.unrecognizedFields}}static fromJSON(t){const{unrecognizedFields:r,...o}=i.Signed.commonFieldsFromJSON(t);const{meta:a,...c}=r;return new Timestamp({...o,snapshotMeta:snapshotMetaFromJSON(a),unrecognizedFields:c})}}r.Timestamp=Timestamp;function snapshotMetaFromJSON(t){let r;if(c.guard.isDefined(t)){const o=t["snapshot.json"];if(!c.guard.isDefined(o)||!c.guard.isObject(o)){throw new TypeError("missing snapshot.json in meta")}else{r=a.MetaFile.fromJSON(o)}}return r}},37915:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.isDefined=isDefined;r.isObject=isObject;r.isStringArray=isStringArray;r.isObjectArray=isObjectArray;r.isStringRecord=isStringRecord;r.isObjectRecord=isObjectRecord;function isDefined(t){return t!==undefined}function isObject(t){return typeof t==="object"&&t!==null}function isStringArray(t){return Array.isArray(t)&&t.every((t=>typeof t==="string"))}function isObjectArray(t){return Array.isArray(t)&&t.every(isObject)}function isStringRecord(t){return typeof t==="object"&&t!==null&&Object.keys(t).every((t=>typeof t==="string"))&&Object.values(t).every((t=>typeof t==="string"))}function isObjectRecord(t){return typeof t==="object"&&t!==null&&Object.keys(t).every((t=>typeof t==="string"))&&Object.values(t).every((t=>typeof t==="object"&&t!==null))}},20846:function(t,r,o){var i=this&&this.__createBinding||(Object.create?function(t,r,o,i){if(i===undefined)i=o;var a=Object.getOwnPropertyDescriptor(r,o);if(!a||("get"in a?!r.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return r[o]}}}Object.defineProperty(t,i,a)}:function(t,r,o,i){if(i===undefined)i=o;t[i]=r[o]});var a=this&&this.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:true,value:r})}:function(t,r){t["default"]=r});var c=this&&this.__importStar||function(){var ownKeys=function(t){ownKeys=Object.getOwnPropertyNames||function(t){var r=[];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))r[r.length]=o;return r};return ownKeys(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var o=ownKeys(t),c=0;c{const r=Buffer.from(t,"hex");const o=(0,p.encodeOIDString)(A);const i=Buffer.concat([Buffer.concat([Buffer.from([u]),Buffer.from([o.length]),o]),Buffer.concat([Buffer.from([l]),Buffer.from([r.length+1]),Buffer.from([d]),r])]);const a=Buffer.concat([Buffer.from([u]),Buffer.from([i.length]),i]);return a}};const z={hexToDER:t=>{const r=Buffer.from(t,"hex");const o=Buffer.concat([Buffer.from([l]),Buffer.from([r.length+1]),Buffer.from([d]),r]);const i=Buffer.concat([(0,p.encodeOIDString)(b),(0,p.encodeOIDString)(h)]);const a=Buffer.concat([Buffer.from([u]),Buffer.from([i.length]),i]);const c=Buffer.concat([Buffer.from([u]),Buffer.from([a.length+o.length]),a,o]);return c}};const isHex=t=>/^[0-9a-fA-F]+$/.test(t)},10334:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.encodeOIDString=encodeOIDString;const o=6;function encodeOIDString(t){const r=t.split(".");const i=parseInt(r[0],10)*40+parseInt(r[1],10);const a=[];r.slice(2).forEach((t=>{const r=encodeVariableLengthInteger(parseInt(t,10));a.push(...r)}));const c=Buffer.from([i,...a]);return Buffer.from([o,c.length,...c])}function encodeVariableLengthInteger(t){const r=[];let o=0;while(t>0){r.unshift(t&127|o);t>>=7;o=128}return r}},64405:function(t,r,o){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});r.verifySignature=void 0;const a=o(65178);const c=i(o(76982));const verifySignature=(t,r,o)=>{const i=Buffer.from((0,a.canonicalize)(t));return c.default.verify(undefined,i,r,Buffer.from(o,"hex"))};r.verifySignature=verifySignature},90868:function(t,r,o){var i=this&&this.__createBinding||(Object.create?function(t,r,o,i){if(i===undefined)i=o;var a=Object.getOwnPropertyDescriptor(r,o);if(!a||("get"in a?!r.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return r[o]}}}Object.defineProperty(t,i,a)}:function(t,r,o,i){if(i===undefined)i=o;t[i]=r[o]});var a=this&&this.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:true,value:r})}:function(t,r){t["default"]=r});var c=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o))i(r,t,o);a(r,t);return r};Object.defineProperty(r,"__esModule",{value:true});r.req=r.json=r.toBuffer=void 0;const p=c(o(58611));const u=c(o(65692));async function toBuffer(t){let r=0;const o=[];for await(const i of t){r+=i.length;o.push(i)}return Buffer.concat(o,r)}r.toBuffer=toBuffer;async function json(t){const r=await toBuffer(t);const o=r.toString("utf8");try{return JSON.parse(o)}catch(t){const r=t;r.message+=` (input: ${o})`;throw r}}r.json=json;function req(t,r={}){const o=typeof t==="string"?t:t.href;const i=(o.startsWith("https:")?u:p).request(t,r);const a=new Promise(((t,r)=>{i.once("response",t).once("error",r).end()}));i.then=a.then.bind(a);return i}r.req=req},35209:function(t,r,o){var i=this&&this.__createBinding||(Object.create?function(t,r,o,i){if(i===undefined)i=o;var a=Object.getOwnPropertyDescriptor(r,o);if(!a||("get"in a?!r.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return r[o]}}}Object.defineProperty(t,i,a)}:function(t,r,o,i){if(i===undefined)i=o;t[i]=r[o]});var a=this&&this.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:true,value:r})}:function(t,r){t["default"]=r});var c=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o))i(r,t,o);a(r,t);return r};var p=this&&this.__exportStar||function(t,r){for(var o in t)if(o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o))i(r,t,o)};Object.defineProperty(r,"__esModule",{value:true});r.Agent=void 0;const u=c(o(69278));const l=c(o(58611));const d=o(65692);p(o(90868),r);const A=Symbol("AgentBaseInternalState");class Agent extends l.Agent{constructor(t){super(t);this[A]={}}isSecureEndpoint(t){if(t){if(typeof t.secureEndpoint==="boolean"){return t.secureEndpoint}if(typeof t.protocol==="string"){return t.protocol==="https:"}}const{stack:r}=new Error;if(typeof r!=="string")return false;return r.split("\n").some((t=>t.indexOf("(https.js:")!==-1||t.indexOf("node:https:")!==-1))}incrementSockets(t){if(this.maxSockets===Infinity&&this.maxTotalSockets===Infinity){return null}if(!this.sockets[t]){this.sockets[t]=[]}const r=new u.Socket({writable:false});this.sockets[t].push(r);this.totalSocketCount++;return r}decrementSockets(t,r){if(!this.sockets[t]||r===null){return}const o=this.sockets[t];const i=o.indexOf(r);if(i!==-1){o.splice(i,1);this.totalSocketCount--;if(o.length===0){delete this.sockets[t]}}}getName(t){const r=this.isSecureEndpoint(t);if(r){return d.Agent.prototype.getName.call(this,t)}return super.getName(t)}createSocket(t,r,o){const i={...r,secureEndpoint:this.isSecureEndpoint(r)};const a=this.getName(i);const c=this.incrementSockets(a);Promise.resolve().then((()=>this.connect(t,i))).then((p=>{this.decrementSockets(a,c);if(p instanceof l.Agent){try{return p.addRequest(t,i)}catch(t){return o(t)}}this[A].currentSocket=p;super.createSocket(t,r,o)}),(t=>{this.decrementSockets(a,c);o(t)}))}createConnection(){const t=this[A].currentSocket;this[A].currentSocket=undefined;if(!t){throw new Error("No socket was returned in the `connect()` function")}return t}get defaultPort(){return this[A].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(t){if(this[A]){this[A].defaultPort=t}}get protocol(){return this[A].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){if(this[A]){this[A].protocol=t}}}r.Agent=Agent},15588:function(t,r,o){var i=this&&this.__createBinding||(Object.create?function(t,r,o,i){if(i===undefined)i=o;var a=Object.getOwnPropertyDescriptor(r,o);if(!a||("get"in a?!r.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return r[o]}}}Object.defineProperty(t,i,a)}:function(t,r,o,i){if(i===undefined)i=o;t[i]=r[o]});var a=this&&this.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:true,value:r})}:function(t,r){t["default"]=r});var c=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o))i(r,t,o);a(r,t);return r};var p=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});r.HttpsProxyAgent=void 0;const u=c(o(69278));const l=c(o(64756));const d=p(o(42613));const A=p(o(2830));const b=o(35209);const h=o(87016);const M=o(51632);const g=(0,A.default)("https-proxy-agent");const setServernameFromNonIpHost=t=>{if(t.servername===undefined&&t.host&&!u.isIP(t.host)){return{...t,servername:t.host}}return t};class HttpsProxyAgent extends b.Agent{constructor(t,r){super(r);this.options={path:undefined};this.proxy=typeof t==="string"?new h.URL(t):t;this.proxyHeaders=r?.headers??{};g("Creating new HttpsProxyAgent instance: %o",this.proxy.href);const o=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,"");const i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?omit(r,"headers"):null,host:o,port:i}}async connect(t,r){const{proxy:o}=this;if(!r.host){throw new TypeError('No "host" provided')}let i;if(o.protocol==="https:"){g("Creating `tls.Socket`: %o",this.connectOpts);i=l.connect(setServernameFromNonIpHost(this.connectOpts))}else{g("Creating `net.Socket`: %o",this.connectOpts);i=u.connect(this.connectOpts)}const a=typeof this.proxyHeaders==="function"?this.proxyHeaders():{...this.proxyHeaders};const c=u.isIPv6(r.host)?`[${r.host}]`:r.host;let p=`CONNECT ${c}:${r.port} HTTP/1.1\r\n`;if(o.username||o.password){const t=`${decodeURIComponent(o.username)}:${decodeURIComponent(o.password)}`;a["Proxy-Authorization"]=`Basic ${Buffer.from(t).toString("base64")}`}a.Host=`${c}:${r.port}`;if(!a["Proxy-Connection"]){a["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close"}for(const t of Object.keys(a)){p+=`${t}: ${a[t]}\r\n`}const A=(0,M.parseProxyResponse)(i);i.write(`${p}\r\n`);const{connect:b,buffered:h}=await A;t.emit("proxyConnect",b);this.emit("proxyConnect",b,t);if(b.statusCode===200){t.once("socket",resume);if(r.secureEndpoint){g("Upgrading socket connection to TLS");return l.connect({...omit(setServernameFromNonIpHost(r),"host","path","port"),socket:i})}return i}i.destroy();const z=new u.Socket({writable:false});z.readable=true;t.once("socket",(t=>{g("Replaying proxy buffer for failed request");(0,d.default)(t.listenerCount("data")>0);t.push(h);t.push(null)}));return z}}HttpsProxyAgent.protocols=["http","https"];r.HttpsProxyAgent=HttpsProxyAgent;function resume(t){t.resume()}function omit(t,...r){const o={};let i;for(i in t){if(!r.includes(i)){o[i]=t[i]}}return o}},51632:function(t,r,o){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});r.parseProxyResponse=void 0;const a=i(o(2830));const c=(0,a.default)("https-proxy-agent:parse-proxy-response");function parseProxyResponse(t){return new Promise(((r,o)=>{let i=0;const a=[];function read(){const r=t.read();if(r)ondata(r);else t.once("readable",read)}function cleanup(){t.removeListener("end",onend);t.removeListener("error",onerror);t.removeListener("readable",read)}function onend(){cleanup();c("onend");o(new Error("Proxy connection ended before receiving CONNECT response"))}function onerror(t){cleanup();c("onerror %o",t);o(t)}function ondata(p){a.push(p);i+=p.length;const u=Buffer.concat(a,i);const l=u.indexOf("\r\n\r\n");if(l===-1){c("have not received end of HTTP headers yet...");read();return}const d=u.slice(0,l).toString("ascii").split("\r\n");const A=d.shift();if(!A){t.destroy();return o(new Error("No header received from proxy CONNECT response"))}const b=A.split(" ");const h=+b[1];const M=b.slice(2).join(" ");const g={};for(const r of d){if(!r)continue;const i=r.indexOf(":");if(i===-1){t.destroy();return o(new Error(`Invalid header from proxy CONNECT response: "${r}"`))}const a=r.slice(0,i).toLowerCase();const c=r.slice(i+1).trimStart();const p=g[a];if(typeof p==="string"){g[a]=[p,c]}else if(Array.isArray(p)){p.push(c)}else{g[a]=c}}c("got proxy server response: %o %o",A,g);cleanup();r({connect:{statusCode:h,statusText:M,headers:g},buffered:u})}t.on("error",onerror);t.on("end",onend);read()}))}r.parseProxyResponse=parseProxyResponse},15183:function(t,r,o){var i=this&&this.__createBinding||(Object.create?function(t,r,o,i){if(i===undefined)i=o;var a=Object.getOwnPropertyDescriptor(r,o);if(!a||("get"in a?!r.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return r[o]}}}Object.defineProperty(t,i,a)}:function(t,r,o,i){if(i===undefined)i=o;t[i]=r[o]});var a=this&&this.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:true,value:r})}:function(t,r){t["default"]=r});var c=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o))i(r,t,o);a(r,t);return r};Object.defineProperty(r,"__esModule",{value:true});r.req=r.json=r.toBuffer=void 0;const p=c(o(58611));const u=c(o(65692));async function toBuffer(t){let r=0;const o=[];for await(const i of t){r+=i.length;o.push(i)}return Buffer.concat(o,r)}r.toBuffer=toBuffer;async function json(t){const r=await toBuffer(t);const o=r.toString("utf8");try{return JSON.parse(o)}catch(t){const r=t;r.message+=` (input: ${o})`;throw r}}r.json=json;function req(t,r={}){const o=typeof t==="string"?t:t.href;const i=(o.startsWith("https:")?u:p).request(t,r);const a=new Promise(((t,r)=>{i.once("response",t).once("error",r).end()}));i.then=a.then.bind(a);return i}r.req=req},98894:function(t,r,o){var i=this&&this.__createBinding||(Object.create?function(t,r,o,i){if(i===undefined)i=o;var a=Object.getOwnPropertyDescriptor(r,o);if(!a||("get"in a?!r.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return r[o]}}}Object.defineProperty(t,i,a)}:function(t,r,o,i){if(i===undefined)i=o;t[i]=r[o]});var a=this&&this.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:true,value:r})}:function(t,r){t["default"]=r});var c=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o))i(r,t,o);a(r,t);return r};var p=this&&this.__exportStar||function(t,r){for(var o in t)if(o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o))i(r,t,o)};Object.defineProperty(r,"__esModule",{value:true});r.Agent=void 0;const u=c(o(69278));const l=c(o(58611));const d=o(65692);p(o(15183),r);const A=Symbol("AgentBaseInternalState");class Agent extends l.Agent{constructor(t){super(t);this[A]={}}isSecureEndpoint(t){if(t){if(typeof t.secureEndpoint==="boolean"){return t.secureEndpoint}if(typeof t.protocol==="string"){return t.protocol==="https:"}}const{stack:r}=new Error;if(typeof r!=="string")return false;return r.split("\n").some((t=>t.indexOf("(https.js:")!==-1||t.indexOf("node:https:")!==-1))}incrementSockets(t){if(this.maxSockets===Infinity&&this.maxTotalSockets===Infinity){return null}if(!this.sockets[t]){this.sockets[t]=[]}const r=new u.Socket({writable:false});this.sockets[t].push(r);this.totalSocketCount++;return r}decrementSockets(t,r){if(!this.sockets[t]||r===null){return}const o=this.sockets[t];const i=o.indexOf(r);if(i!==-1){o.splice(i,1);this.totalSocketCount--;if(o.length===0){delete this.sockets[t]}}}getName(t){const r=typeof t.secureEndpoint==="boolean"?t.secureEndpoint:this.isSecureEndpoint(t);if(r){return d.Agent.prototype.getName.call(this,t)}return super.getName(t)}createSocket(t,r,o){const i={...r,secureEndpoint:this.isSecureEndpoint(r)};const a=this.getName(i);const c=this.incrementSockets(a);Promise.resolve().then((()=>this.connect(t,i))).then((p=>{this.decrementSockets(a,c);if(p instanceof l.Agent){return p.addRequest(t,i)}this[A].currentSocket=p;super.createSocket(t,r,o)}),(t=>{this.decrementSockets(a,c);o(t)}))}createConnection(){const t=this[A].currentSocket;this[A].currentSocket=undefined;if(!t){throw new Error("No socket was returned in the `connect()` function")}return t}get defaultPort(){return this[A].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(t){if(this[A]){this[A].defaultPort=t}}get protocol(){return this[A].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){if(this[A]){this[A].protocol=t}}}r.Agent=Agent},59380:t=>{t.exports=balanced;function balanced(t,r,o){if(t instanceof RegExp)t=maybeMatch(t,o);if(r instanceof RegExp)r=maybeMatch(r,o);var i=range(t,r,o);return i&&{start:i[0],end:i[1],pre:o.slice(0,i[0]),body:o.slice(i[0]+t.length,i[1]),post:o.slice(i[1]+r.length)}}function maybeMatch(t,r){var o=r.match(t);return o?o[0]:null}balanced.range=range;function range(t,r,o){var i,a,c,p,u;var l=o.indexOf(t);var d=o.indexOf(r,l+1);var A=l;if(l>=0&&d>0){if(t===r){return[l,d]}i=[];c=o.length;while(A>=0&&!u){if(A==l){i.push(A);l=o.indexOf(t,A+1)}else if(i.length==1){u=[i.pop(),d]}else{a=i.pop();if(a=0?l:d}if(i.length){u=[c,p]}}return u}},40233:(t,r,o)=>{const i=o(4038).MH.Q;const a=o(99704);const c=o(16928);const p=o(54097);t.exports=contentPath;function contentPath(t,r){const o=p.parse(r,{single:true});return c.join(contentDir(t),o.algorithm,...a(o.hexDigest()))}t.exports.contentDir=contentDir;function contentDir(t){return c.join(t,`content-v${i}`)}},39398:(t,r,o)=>{const i=o(91943);const a=o(25032);const c=o(54097);const p=o(40233);const u=o(52899);t.exports=read;const l=64*1024*1024;async function read(t,r,o={}){const{size:a}=o;const{stat:p,cpath:d,sri:A}=await withContentSri(t,r,(async(t,r)=>{const o=a?{size:a}:await i.stat(t);return{stat:o,cpath:t,sri:r}}));if(p.size>l){return readPipeline(d,p.size,A,new u).concat()}const b=await i.readFile(d,{encoding:null});if(p.size!==b.length){throw sizeError(p.size,b.length)}if(!c.checkData(b,A)){throw integrityError(A,d)}return b}const readPipeline=(t,r,o,i)=>{i.push(new a.ReadStream(t,{size:r,readSize:l}),c.integrityStream({integrity:o,size:r}));return i};t.exports.stream=readStream;t.exports.readStream=readStream;function readStream(t,r,o={}){const{size:a}=o;const c=new u;Promise.resolve().then((async()=>{const{stat:o,cpath:p,sri:u}=await withContentSri(t,r,(async(t,r)=>{const o=a?{size:a}:await i.stat(t);return{stat:o,cpath:t,sri:r}}));return readPipeline(p,o.size,u,c)})).catch((t=>c.emit("error",t)));return c}t.exports.copy=copy;function copy(t,r,o){return withContentSri(t,r,(t=>i.copyFile(t,o)))}t.exports.hasContent=hasContent;async function hasContent(t,r){if(!r){return false}try{return await withContentSri(t,r,(async(t,r)=>{const o=await i.stat(t);return{size:o.size,sri:r,stat:o}}))}catch(t){if(t.code==="ENOENT"){return false}if(t.code==="EPERM"){if(process.platform!=="win32"){throw t}else{return false}}}}async function withContentSri(t,r,o){const i=c.parse(r);const a=i.pickAlgorithm();const u=i[a];if(u.length<=1){const r=p(t,u[0]);return o(r,u[0])}else{const r=await Promise.all(u.map((async r=>{try{return await withContentSri(t,r,o)}catch(t){if(t.code==="ENOENT"){return Object.assign(new Error("No matching content found for "+i.toString()),{code:"ENOENT"})}return t}})));const a=r.find((t=>!(t instanceof Error)));if(a){return a}const c=r.find((t=>t.code==="ENOENT"));if(c){throw c}throw r.find((t=>t instanceof Error))}}function sizeError(t,r){const o=new Error(`Bad data size: expected inserted data to be ${t} bytes, but got ${r} instead`);o.expected=t;o.found=r;o.code="EBADSIZE";return o}function integrityError(t,r){const o=new Error(`Integrity verification failed for ${t} (${r})`);o.code="EINTEGRITY";o.sri=t;o.path=r;return o}},92447:(t,r,o)=>{const i=o(91943);const a=o(40233);const{hasContent:c}=o(39398);t.exports=rm;async function rm(t,r){const o=await c(t,r);if(o&&o.sri){await i.rm(a(t,o.sri),{recursive:true,force:true});return true}else{return false}}},93699:(t,r,o)=>{const i=o(24434);const a=o(40233);const c=o(91943);const{moveFile:p}=o(88437);const{Minipass:u}=o(78275);const l=o(52899);const d=o(37633);const A=o(16928);const b=o(54097);const h=o(46019);const M=o(25032);t.exports=write;const g=new Map;async function write(t,r,o={}){const{algorithms:i,size:a,integrity:p}=o;if(typeof a==="number"&&r.length!==a){throw sizeError(a,r.length)}const u=b.fromData(r,i?{algorithms:i}:{});if(p&&!b.checkData(r,p,o)){throw checksumError(p,u)}for(const i in u){const a=await makeTmp(t,o);const p=u[i].toString();try{await c.writeFile(a.target,r,{flag:"wx"});await moveToDestination(a,t,p,o)}finally{if(!a.moved){await c.rm(a.target,{recursive:true,force:true})}}}return{integrity:u,size:r.length}}t.exports.stream=writeStream;class CacacheWriteStream extends d{constructor(t,r){super();this.opts=r;this.cache=t;this.inputStream=new u;this.inputStream.on("error",(t=>this.emit("error",t)));this.inputStream.on("drain",(()=>this.emit("drain")));this.handleContentP=null}write(t,r,o){if(!this.handleContentP){this.handleContentP=handleContent(this.inputStream,this.cache,this.opts);this.handleContentP.catch((t=>this.emit("error",t)))}return this.inputStream.write(t,r,o)}flush(t){this.inputStream.end((()=>{if(!this.handleContentP){const r=new Error("Cache input stream was empty");r.code="ENODATA";return Promise.reject(r).catch(t)}this.handleContentP.then((r=>{r.integrity&&this.emit("integrity",r.integrity);r.size!==null&&this.emit("size",r.size);t()}),(r=>t(r)))}))}}function writeStream(t,r={}){return new CacacheWriteStream(t,r)}async function handleContent(t,r,o){const i=await makeTmp(r,o);try{const a=await pipeToTmp(t,r,i.target,o);await moveToDestination(i,r,a.integrity,o);return a}finally{if(!i.moved){await c.rm(i.target,{recursive:true,force:true})}}}async function pipeToTmp(t,r,o,a){const c=new M.WriteStream(o,{flags:"wx"});if(a.integrityEmitter){const[r,o]=await Promise.all([i.once(a.integrityEmitter,"integrity").then((t=>t[0])),i.once(a.integrityEmitter,"size").then((t=>t[0])),new l(t,c).promise()]);return{integrity:r,size:o}}let p;let u;const d=b.integrityStream({integrity:a.integrity,algorithms:a.algorithms,size:a.size});d.on("integrity",(t=>{p=t}));d.on("size",(t=>{u=t}));const A=new l(t,d,c);await A.promise();return{integrity:p,size:u}}async function makeTmp(t,r){const o=h(A.join(t,"tmp"),r.tmpPrefix);await c.mkdir(A.dirname(o),{recursive:true});return{target:o,moved:false}}async function moveToDestination(t,r,o){const i=a(r,o);const u=A.dirname(i);if(g.has(i)){return g.get(i)}g.set(i,c.mkdir(u,{recursive:true}).then((async()=>{await p(t.target,i,{overwrite:false});t.moved=true;return t.moved})).catch((t=>{if(!t.message.startsWith("The destination file exists")){throw Object.assign(t,{code:"EEXIST"})}})).finally((()=>{g.delete(i)})));return g.get(i)}function sizeError(t,r){const o=new Error(`Bad data size: expected inserted data to be ${t} bytes, but got ${r} instead`);o.expected=t;o.found=r;o.code="EBADSIZE";return o}function checksumError(t,r){const o=new Error(`Integrity check failed:\n Wanted: ${t}\n Found: ${r}`);o.code="EINTEGRITY";o.expected=t;o.found=r;return o}},26575:(t,r,o)=>{const i=o(76982);const{appendFile:a,mkdir:c,readFile:p,readdir:u,rm:l,writeFile:d}=o(91943);const{Minipass:A}=o(78275);const b=o(16928);const h=o(54097);const M=o(46019);const g=o(40233);const z=o(99704);const O=o(4038).MH.P;const{moveFile:y}=o(88437);const C=5;t.exports.NotFoundError=class NotFoundError extends Error{constructor(t,r){super(`No cache entry for ${r} found in ${t}`);this.code="ENOENT";this.cache=t;this.key=r}};t.exports.compact=compact;async function compact(t,r,o,i={}){const a=bucketPath(t,r);const p=await bucketEntries(a);const u=[];for(let t=p.length-1;t>=0;--t){const r=p[t];if(r.integrity===null&&!i.validateEntry){break}if((!i.validateEntry||i.validateEntry(r)===true)&&(u.length===0||!u.find((t=>o(t,r))))){u.unshift(r)}}const A="\n"+u.map((t=>{const r=JSON.stringify(t);const o=hashEntry(r);return`${o}\t${r}`})).join("\n");const setup=async()=>{const r=M(b.join(t,"tmp"),i.tmpPrefix);await c(b.dirname(r),{recursive:true});return{target:r,moved:false}};const teardown=async t=>{if(!t.moved){return l(t.target,{recursive:true,force:true})}};const write=async t=>{await d(t.target,A,{flag:"wx"});await c(b.dirname(a),{recursive:true});await y(t.target,a);t.moved=true};const h=await setup();try{await write(h)}finally{await teardown(h)}return u.reverse().map((r=>formatEntry(t,r,true)))}t.exports.insert=insert;async function insert(t,r,o,i={}){const{metadata:p,size:u,time:l}=i;const d=bucketPath(t,r);const A={key:r,integrity:o&&h.stringify(o),time:l||Date.now(),size:u,metadata:p};try{await c(b.dirname(d),{recursive:true});const t=JSON.stringify(A);await a(d,`\n${hashEntry(t)}\t${t}`)}catch(t){if(t.code==="ENOENT"){return undefined}throw t}return formatEntry(t,A)}t.exports.find=find;async function find(t,r){const o=bucketPath(t,r);try{const i=await bucketEntries(o);return i.reduce(((o,i)=>{if(i&&i.key===r){return formatEntry(t,i)}else{return o}}),null)}catch(t){if(t.code==="ENOENT"){return null}else{throw t}}}t.exports["delete"]=del;function del(t,r,o={}){if(!o.removeFully){return insert(t,r,null,o)}const i=bucketPath(t,r);return l(i,{recursive:true,force:true})}t.exports.lsStream=lsStream;function lsStream(t){const r=bucketDir(t);const i=new A({objectMode:true});Promise.resolve().then((async()=>{const{default:a}=await o.e(606).then(o.bind(o,606));const c=await readdirOrEmpty(r);await a(c,(async o=>{const c=b.join(r,o);const p=await readdirOrEmpty(c);await a(p,(async r=>{const o=b.join(c,r);const p=await readdirOrEmpty(o);await a(p,(async r=>{const a=b.join(o,r);try{const r=await bucketEntries(a);const o=r.reduce(((t,r)=>{t.set(r.key,r);return t}),new Map);for(const r of o.values()){const o=formatEntry(t,r);if(o){i.write(o)}}}catch(t){if(t.code==="ENOENT"){return undefined}throw t}}),{concurrency:C})}),{concurrency:C})}),{concurrency:C});i.end();return i})).catch((t=>i.emit("error",t)));return i}t.exports.ls=ls;async function ls(t){const r=await lsStream(t).collect();return r.reduce(((t,r)=>{t[r.key]=r;return t}),{})}t.exports.bucketEntries=bucketEntries;async function bucketEntries(t,r){const o=await p(t,"utf8");return _bucketEntries(o,r)}function _bucketEntries(t){const r=[];t.split("\n").forEach((t=>{if(!t){return}const o=t.split("\t");if(!o[1]||hashEntry(o[1])!==o[0]){return}let i;try{i=JSON.parse(o[1])}catch(t){}if(i){r.push(i)}}));return r}t.exports.bucketDir=bucketDir;function bucketDir(t){return b.join(t,`index-v${O}`)}t.exports.bucketPath=bucketPath;function bucketPath(t,r){const o=hashKey(r);return b.join.apply(b,[bucketDir(t)].concat(z(o)))}t.exports.hashKey=hashKey;function hashKey(t){return hash(t,"sha256")}t.exports.hashEntry=hashEntry;function hashEntry(t){return hash(t,"sha1")}function hash(t,r){return i.createHash(r).update(t).digest("hex")}function formatEntry(t,r,o){if(!r.integrity&&!o){return null}return{key:r.key,integrity:r.integrity,path:r.integrity?g(t,r.integrity):undefined,size:r.size,time:r.time,metadata:r.metadata}}function readdirOrEmpty(t){return u(t).catch((t=>{if(t.code==="ENOENT"||t.code==="ENOTDIR"){return[]}throw t}))}},19690:(t,r,o)=>{const i=o(11757);const{Minipass:a}=o(78275);const c=o(52899);const p=o(26575);const u=o(56068);const l=o(39398);async function getData(t,r,o={}){const{integrity:i,memoize:a,size:c}=o;const d=u.get(t,r,o);if(d&&a!==false){return{metadata:d.entry.metadata,data:d.data,integrity:d.entry.integrity,size:d.entry.size}}const A=await p.find(t,r,o);if(!A){throw new p.NotFoundError(t,r)}const b=await l(t,A.integrity,{integrity:i,size:c});if(a){u.put(t,A,b,o)}return{data:b,metadata:A.metadata,size:A.size,integrity:A.integrity}}t.exports=getData;async function getDataByDigest(t,r,o={}){const{integrity:i,memoize:a,size:c}=o;const p=u.get.byDigest(t,r,o);if(p&&a!==false){return p}const d=await l(t,r,{integrity:i,size:c});if(a){u.put.byDigest(t,r,d,o)}return d}t.exports.byDigest=getDataByDigest;const getMemoizedStream=t=>{const r=new a;r.on("newListener",(function(r,o){r==="metadata"&&o(t.entry.metadata);r==="integrity"&&o(t.entry.integrity);r==="size"&&o(t.entry.size)}));r.end(t.data);return r};function getStream(t,r,o={}){const{memoize:a,size:d}=o;const A=u.get(t,r,o);if(A&&a!==false){return getMemoizedStream(A)}const b=new c;Promise.resolve().then((async()=>{const c=await p.find(t,r);if(!c){throw new p.NotFoundError(t,r)}b.emit("metadata",c.metadata);b.emit("integrity",c.integrity);b.emit("size",c.size);b.on("newListener",(function(t,r){t==="metadata"&&r(c.metadata);t==="integrity"&&r(c.integrity);t==="size"&&r(c.size)}));const A=l.readStream(t,c.integrity,{...o,size:typeof d!=="number"?c.size:d});if(a){const r=new i.PassThrough;r.on("collect",(r=>u.put(t,c,r,o)));b.unshift(r)}b.unshift(A);return b})).catch((t=>b.emit("error",t)));return b}t.exports.stream=getStream;function getStreamDigest(t,r,o={}){const{memoize:p}=o;const d=u.get.byDigest(t,r,o);if(d&&p!==false){const t=new a;t.end(d);return t}else{const a=l.readStream(t,r,o);if(!p){return a}const d=new i.PassThrough;d.on("collect",(i=>u.put.byDigest(t,r,i,o)));return new c(a,d)}}t.exports.stream.byDigest=getStreamDigest;function info(t,r,o={}){const{memoize:i}=o;const a=u.get(t,r,o);if(a&&i!==false){return Promise.resolve(a.entry)}else{return p.find(t,r)}}t.exports.info=info;async function copy(t,r,o,i={}){const a=await p.find(t,r,i);if(!a){throw new p.NotFoundError(t,r)}await l.copy(t,a.integrity,o,i);return{metadata:a.metadata,size:a.size,integrity:a.integrity}}t.exports.copy=copy;async function copyByDigest(t,r,o,i={}){await l.copy(t,r,o,i);return r}t.exports.copy.byDigest=copyByDigest;t.exports.hasContent=l.hasContent},85742:(t,r,o)=>{const i=o(19690);const a=o(94283);const c=o(30793);const p=o(37621);const{clearMemoized:u}=o(56068);const l=o(63990);const d=o(26575);t.exports.index={};t.exports.index.compact=d.compact;t.exports.index.insert=d.insert;t.exports.ls=d.ls;t.exports.ls.stream=d.lsStream;t.exports.get=i;t.exports.get.byDigest=i.byDigest;t.exports.get.stream=i.stream;t.exports.get.stream.byDigest=i.stream.byDigest;t.exports.get.copy=i.copy;t.exports.get.copy.byDigest=i.copy.byDigest;t.exports.get.info=i.info;t.exports.get.hasContent=i.hasContent;t.exports.put=a;t.exports.put.stream=a.stream;t.exports.rm=c.entry;t.exports.rm.all=c.all;t.exports.rm.entry=t.exports.rm;t.exports.rm.content=c.content;t.exports.clearMemoized=u;t.exports.tmp={};t.exports.tmp.mkdir=l.mkdir;t.exports.tmp.withTmp=l.withTmp;t.exports.verify=p;t.exports.verify.lastRun=p.lastRun},56068:(t,r,o)=>{const{LRUCache:i}=o(83193);const a=new i({max:500,maxSize:50*1024*1024,ttl:3*60*1e3,sizeCalculation:(t,r)=>r.startsWith("key:")?t.data.length:t.length});t.exports.clearMemoized=clearMemoized;function clearMemoized(){const t={};a.forEach(((r,o)=>{t[o]=r}));a.clear();return t}t.exports.put=put;function put(t,r,o,i){pickMem(i).set(`key:${t}:${r.key}`,{entry:r,data:o});putDigest(t,r.integrity,o,i)}t.exports.put.byDigest=putDigest;function putDigest(t,r,o,i){pickMem(i).set(`digest:${t}:${r}`,o)}t.exports.get=get;function get(t,r,o){return pickMem(o).get(`key:${t}:${r}`)}t.exports.get.byDigest=getDigest;function getDigest(t,r,o){return pickMem(o).get(`digest:${t}:${r}`)}class ObjProxy{constructor(t){this.obj=t}get(t){return this.obj[t]}set(t,r){this.obj[t]=r}}function pickMem(t){if(!t||!t.memoize){return a}else if(t.memoize.get&&t.memoize.set){return t.memoize}else if(typeof t.memoize==="object"){return new ObjProxy(t.memoize)}else{return a}}},94283:(t,r,o)=>{const i=o(26575);const a=o(56068);const c=o(93699);const p=o(37633);const{PassThrough:u}=o(11757);const l=o(52899);const putOpts=t=>({algorithms:["sha512"],...t});t.exports=putData;async function putData(t,r,o,p={}){const{memoize:u}=p;p=putOpts(p);const l=await c(t,o,p);const d=await i.insert(t,r,l.integrity,{...p,size:l.size});if(u){a.put(t,d,o,p)}return l.integrity}t.exports.stream=putStream;function putStream(t,r,o={}){const{memoize:d}=o;o=putOpts(o);let A;let b;let h;let M;const g=new l;if(d){const t=(new u).on("collect",(t=>{M=t}));g.push(t)}const z=c.stream(t,o).on("integrity",(t=>{A=t})).on("size",(t=>{b=t})).on("error",(t=>{h=t}));g.push(z);g.push(new p({async flush(){if(!h){const c=await i.insert(t,r,A,{...o,size:b});if(d&&M){a.put(t,c,M,o)}g.emit("integrity",A);g.emit("size",b)}}}));return g}},30793:(t,r,o)=>{const{rm:i}=o(91943);const a=o(6337);const c=o(26575);const p=o(56068);const u=o(16928);const l=o(92447);t.exports=entry;t.exports.entry=entry;function entry(t,r,o){p.clearMemoized();return c.delete(t,r,o)}t.exports.content=content;function content(t,r){p.clearMemoized();return l(t,r)}t.exports.all=all;async function all(t){p.clearMemoized();const r=await a(u.join(t,"*(content-*|index-*)"),{silent:true,nosort:true});return Promise.all(r.map((t=>i(t,{recursive:true,force:true}))))}},6337:(t,r,o)=>{const{glob:i}=o(67471);const a=o(16928);const globify=t=>t.split(a.win32.sep).join(a.posix.sep);t.exports=(t,r)=>i(globify(t),r)},99704:t=>{t.exports=hashToSegments;function hashToSegments(t){return[t.slice(0,2),t.slice(2,4),t.slice(4)]}},63990:(t,r,o)=>{const{withTempDir:i}=o(88437);const a=o(91943);const c=o(16928);t.exports.mkdir=mktmpdir;async function mktmpdir(t,r={}){const{tmpPrefix:o}=r;const i=c.join(t,"tmp");await a.mkdir(i,{recursive:true,owner:"inherit"});const p=`${i}${c.sep}${o||""}`;return a.mkdtemp(p,{owner:"inherit"})}t.exports.withTmp=withTmp;function withTmp(t,r,o){if(!o){o=r;r={}}return i(c.join(t,"tmp"),o,r)}},37621:(t,r,o)=>{const{mkdir:i,readFile:a,rm:c,stat:p,truncate:u,writeFile:l}=o(91943);const d=o(40233);const A=o(25032);const b=o(6337);const h=o(26575);const M=o(16928);const g=o(54097);const hasOwnProperty=(t,r)=>Object.prototype.hasOwnProperty.call(t,r);const verifyOpts=t=>({concurrency:20,log:{silly(){}},...t});t.exports=verify;async function verify(t,r){r=verifyOpts(r);r.log.silly("verify","verifying cache at",t);const o=[markStartTime,fixPerms,garbageCollect,rebuildIndex,cleanTmp,writeVerifile,markEndTime];const i={};for(const a of o){const o=a.name;const c=new Date;const p=await a(t,r);if(p){Object.keys(p).forEach((t=>{i[t]=p[t]}))}const u=new Date;if(!i.runTime){i.runTime={}}i.runTime[o]=u-c}i.runTime.total=i.endTime-i.startTime;r.log.silly("verify","verification finished for",t,"in",`${i.runTime.total}ms`);return i}async function markStartTime(){return{startTime:new Date}}async function markEndTime(){return{endTime:new Date}}async function fixPerms(t,r){r.log.silly("verify","fixing cache permissions");await i(t,{recursive:true});return null}async function garbageCollect(t,r){r.log.silly("verify","garbage collecting content");const{default:i}=await o.e(606).then(o.bind(o,606));const a=h.lsStream(t);const u=new Set;a.on("data",(t=>{if(r.filter&&!r.filter(t)){return}const o=g.parse(t.integrity);for(const t in o){u.add(o[t].toString())}}));await new Promise(((t,r)=>{a.on("end",t).on("error",r)}));const l=d.contentDir(t);const A=await b(M.join(l,"**"),{follow:false,nodir:true,nosort:true});const z={verifiedContent:0,reclaimedCount:0,reclaimedSize:0,badContentCount:0,keptSize:0};await i(A,(async t=>{const r=t.split(/[/\\]/);const o=r.slice(r.length-3).join("");const i=r[r.length-4];const a=g.fromHex(o,i);if(u.has(a.toString())){const r=await verifyContent(t,a);if(!r.valid){z.reclaimedCount++;z.badContentCount++;z.reclaimedSize+=r.size}else{z.verifiedContent++;z.keptSize+=r.size}}else{z.reclaimedCount++;const r=await p(t);await c(t,{recursive:true,force:true});z.reclaimedSize+=r.size}return z}),{concurrency:r.concurrency});return z}async function verifyContent(t,r){const o={};try{const{size:i}=await p(t);o.size=i;o.valid=true;await g.checkStream(new A.ReadStream(t),r)}catch(r){if(r.code==="ENOENT"){return{size:0,valid:false}}if(r.code!=="EINTEGRITY"){throw r}await c(t,{recursive:true,force:true});o.valid=false}return o}async function rebuildIndex(t,r){r.log.silly("verify","rebuilding index");const{default:i}=await o.e(606).then(o.bind(o,606));const a=await h.ls(t);const c={missingContent:0,rejectedEntries:0,totalEntries:0};const p={};for(const o in a){if(hasOwnProperty(a,o)){const i=h.hashKey(o);const u=a[o];const l=r.filter&&!r.filter(u);l&&c.rejectedEntries++;if(p[i]&&!l){p[i].push(u)}else if(p[i]&&l){}else if(l){p[i]=[];p[i]._path=h.bucketPath(t,o)}else{p[i]=[u];p[i]._path=h.bucketPath(t,o)}}}await i(Object.keys(p),(o=>rebuildBucket(t,p[o],c,r)),{concurrency:r.concurrency});return c}async function rebuildBucket(t,r,o){await u(r._path);for(const i of r){const r=d(t,i.integrity);try{await p(r);await h.insert(t,i.key,i.integrity,{metadata:i.metadata,size:i.size,time:i.time});o.totalEntries++}catch(t){if(t.code==="ENOENT"){o.rejectedEntries++;o.missingContent++}else{throw t}}}}function cleanTmp(t,r){r.log.silly("verify","cleaning tmp directory");return c(M.join(t,"tmp"),{recursive:true,force:true})}async function writeVerifile(t,r){const o=M.join(t,"_lastverified");r.log.silly("verify","writing verifile to "+o);return l(o,`${Date.now()}`)}t.exports.lastRun=lastRun;async function lastRun(t){const r=await a(M.join(t,"_lastverified"),{encoding:"utf8"});return new Date(+r)}},54097:(t,r,o)=>{const i=o(76982);const{Minipass:a}=o(78275);const c=["sha512","sha384","sha256"];const p=["sha512"];const u=/^[a-z0-9+/]+(?:=?=?)$/i;const l=/^([a-z0-9]+)-([^?]+)([?\S*]*)$/;const d=/^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)?$/;const A=/^[\x21-\x7E]+$/;const getOptString=t=>t?.length?`?${t.join("?")}`:"";class IntegrityStream extends a{#a;#c;#p;constructor(t){super();this.size=0;this.opts=t;this.#u();if(t?.algorithms){this.algorithms=[...t.algorithms]}else{this.algorithms=[...p]}if(this.algorithm!==null&&!this.algorithms.includes(this.algorithm)){this.algorithms.push(this.algorithm)}this.hashes=this.algorithms.map(i.createHash)}#u(){this.sri=this.opts?.integrity?parse(this.opts?.integrity,this.opts):null;this.expectedSize=this.opts?.size;if(!this.sri){this.algorithm=null}else if(this.sri.isHash){this.goodSri=true;this.algorithm=this.sri.algorithm}else{this.goodSri=!this.sri.isEmpty();this.algorithm=this.sri.pickAlgorithm(this.opts)}this.digests=this.goodSri?this.sri[this.algorithm]:null;this.optString=getOptString(this.opts?.options)}on(t,r){if(t==="size"&&this.#c){return r(this.#c)}if(t==="integrity"&&this.#a){return r(this.#a)}if(t==="verified"&&this.#p){return r(this.#p)}return super.on(t,r)}emit(t,r){if(t==="end"){this.#l()}return super.emit(t,r)}write(t){this.size+=t.length;this.hashes.forEach((r=>r.update(t)));return super.write(t)}#l(){if(!this.goodSri){this.#u()}const t=parse(this.hashes.map(((t,r)=>`${this.algorithms[r]}-${t.digest("base64")}${this.optString}`)).join(" "),this.opts);const r=this.goodSri&&t.match(this.sri,this.opts);if(typeof this.expectedSize==="number"&&this.size!==this.expectedSize){const t=new Error(`stream size mismatch when checking ${this.sri}.\n Wanted: ${this.expectedSize}\n Found: ${this.size}`);t.code="EBADSIZE";t.found=this.size;t.expected=this.expectedSize;t.sri=this.sri;this.emit("error",t)}else if(this.sri&&!r){const r=new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${t}. (${this.size} bytes)`);r.code="EINTEGRITY";r.found=t;r.expected=this.digests;r.algorithm=this.algorithm;r.sri=this.sri;this.emit("error",r)}else{this.#c=this.size;this.emit("size",this.size);this.#a=t;this.emit("integrity",t);if(r){this.#p=r;this.emit("verified",r)}}}}class Hash{get isHash(){return true}constructor(t,r){const o=r?.strict;this.source=t.trim();this.digest="";this.algorithm="";this.options=[];const i=this.source.match(o?d:l);if(!i){return}if(o&&!c.includes(i[1])){return}this.algorithm=i[1];this.digest=i[2];const a=i[3];if(a){this.options=a.slice(1).split("?")}}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}match(t,r){const o=parse(t,r);if(!o){return false}if(o.isIntegrity){const t=o.pickAlgorithm(r,[this.algorithm]);if(!t){return false}const i=o[t].find((t=>t.digest===this.digest));if(i){return i}return false}return o.digest===this.digest?o:false}toString(t){if(t?.strict){if(!(c.includes(this.algorithm)&&this.digest.match(u)&&this.options.every((t=>t.match(A))))){return""}}return`${this.algorithm}-${this.digest}${getOptString(this.options)}`}}function integrityHashToString(t,r,o,i){const a=t!=="";let c=false;let p="";const u=i.length-1;for(let t=0;to[t].find((t=>r.digest===t.digest))))){throw new Error("hashes do not match, cannot update integrity")}}else{this[t]=o[t]}}}match(t,r){const o=parse(t,r);if(!o){return false}const i=o.pickAlgorithm(r,Object.keys(this));return!!i&&this[i]&&o[i]&&this[i].find((t=>o[i].find((r=>t.digest===r.digest))))||false}pickAlgorithm(t,r){const o=t?.pickAlgorithm||getPrioritizedHash;const i=Object.keys(this).filter((t=>{if(r?.length){return r.includes(t)}return true}));if(i.length){return i.reduce(((t,r)=>o(t,r)||t))}return null}}t.exports.parse=parse;function parse(t,r){if(!t){return null}if(typeof t==="string"){return _parse(t,r)}else if(t.algorithm&&t.digest){const o=new Integrity;o[t.algorithm]=[t];return _parse(stringify(o,r),r)}else{return _parse(stringify(t,r),r)}}function _parse(t,r){if(r?.single){return new Hash(t,r)}const o=t.trim().split(/\s+/).reduce(((t,o)=>{const i=new Hash(o,r);if(i.algorithm&&i.digest){const r=i.algorithm;if(!t[r]){t[r]=[]}t[r].push(i)}return t}),new Integrity);return o.isEmpty()?null:o}t.exports.stringify=stringify;function stringify(t,r){if(t.algorithm&&t.digest){return Hash.prototype.toString.call(t,r)}else if(typeof t==="string"){return stringify(parse(t,r),r)}else{return Integrity.prototype.toString.call(t,r)}}t.exports.fromHex=fromHex;function fromHex(t,r,o){const i=getOptString(o?.options);return parse(`${r}-${Buffer.from(t,"hex").toString("base64")}${i}`,o)}t.exports.fromData=fromData;function fromData(t,r){const o=r?.algorithms||[...p];const a=getOptString(r?.options);return o.reduce(((o,c)=>{const p=i.createHash(c).update(t).digest("base64");const u=new Hash(`${c}-${p}${a}`,r);if(u.algorithm&&u.digest){const t=u.algorithm;if(!o[t]){o[t]=[]}o[t].push(u)}return o}),new Integrity)}t.exports.fromStream=fromStream;function fromStream(t,r){const o=integrityStream(r);return new Promise(((r,i)=>{t.pipe(o);t.on("error",i);o.on("error",i);let a;o.on("integrity",(t=>{a=t}));o.on("end",(()=>r(a)));o.resume()}))}t.exports.checkData=checkData;function checkData(t,r,o){r=parse(r,o);if(!r||!Object.keys(r).length){if(o?.error){throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"})}else{return false}}const a=r.pickAlgorithm(o);const c=i.createHash(a).update(t).digest("base64");const p=parse({algorithm:a,digest:c});const u=p.match(r,o);o=o||{};if(u||!o.error){return u}else if(typeof o.size==="number"&&t.length!==o.size){const i=new Error(`data size mismatch when checking ${r}.\n Wanted: ${o.size}\n Found: ${t.length}`);i.code="EBADSIZE";i.found=t.length;i.expected=o.size;i.sri=r;throw i}else{const o=new Error(`Integrity checksum failed when using ${a}: Wanted ${r}, but got ${p}. (${t.length} bytes)`);o.code="EINTEGRITY";o.found=p;o.expected=r;o.algorithm=a;o.sri=r;throw o}}t.exports.checkStream=checkStream;function checkStream(t,r,o){o=o||Object.create(null);o.integrity=r;r=parse(r,o);if(!r||!Object.keys(r).length){return Promise.reject(Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"}))}const i=integrityStream(o);return new Promise(((r,o)=>{t.pipe(i);t.on("error",o);i.on("error",o);let a;i.on("verified",(t=>{a=t}));i.on("end",(()=>r(a)));i.resume()}))}t.exports.integrityStream=integrityStream;function integrityStream(t=Object.create(null)){return new IntegrityStream(t)}t.exports.create=createIntegrity;function createIntegrity(t){const r=t?.algorithms||[...p];const o=getOptString(t?.options);const a=r.map(i.createHash);return{update:function(t,r){a.forEach((o=>o.update(t,r)));return this},digest:function(){const i=r.reduce(((r,i)=>{const c=a.shift().digest("base64");const p=new Hash(`${i}-${c}${o}`,t);if(p.algorithm&&p.digest){const t=p.algorithm;if(!r[t]){r[t]=[]}r[t].push(p)}return r}),new Integrity);return i}}}const b=i.getHashes();const h=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter((t=>b.includes(t)));function getPrioritizedHash(t,r){return h.indexOf(t.toLowerCase())>=h.indexOf(r.toLowerCase())?t:r}},97087:t=>{t.exports=function(t,o){var i=[];for(var a=0;a{r.formatArgs=formatArgs;r.save=save;r.load=load;r.useColors=useColors;r.storage=localstorage();r.destroy=(()=>{let t=false;return()=>{if(!t){t=true;console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}}})();r.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 useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(r){r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff);if(!this.useColors){return}const o="color: "+this.color;r.splice(1,0,o,"color: inherit");let i=0;let a=0;r[0].replace(/%[a-zA-Z%]/g,(t=>{if(t==="%%"){return}i++;if(t==="%c"){a=i}}));r.splice(a,0,o)}r.log=console.debug||console.log||(()=>{});function save(t){try{if(t){r.storage.setItem("debug",t)}else{r.storage.removeItem("debug")}}catch(t){}}function load(){let t;try{t=r.storage.getItem("debug")}catch(t){}if(!t&&typeof process!=="undefined"&&"env"in process){t=process.env.DEBUG}return t}function localstorage(){try{return localStorage}catch(t){}}t.exports=o(40897)(r);const{formatters:i}=t.exports;i.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},40897:(t,r,o)=>{function setup(t){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=o(70744);createDebug.destroy=destroy;Object.keys(t).forEach((r=>{createDebug[r]=t[r]}));createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(t){let r=0;for(let o=0;o{if(r==="%%"){return"%"}c++;const a=createDebug.formatters[i];if(typeof a==="function"){const i=t[c];r=a.call(o,i);t.splice(c,1);c--}return r}));createDebug.formatArgs.call(o,t);const p=o.log||createDebug.log;p.apply(o,t)}debug.namespace=t;debug.useColors=createDebug.useColors();debug.color=createDebug.selectColor(t);debug.extend=extend;debug.destroy=createDebug.destroy;Object.defineProperty(debug,"enabled",{enumerable:true,configurable:false,get:()=>{if(o!==null){return o}if(i!==createDebug.namespaces){i=createDebug.namespaces;a=createDebug.enabled(t)}return a},set:t=>{o=t}});if(typeof createDebug.init==="function"){createDebug.init(debug)}return debug}function extend(t,r){const o=createDebug(this.namespace+(typeof r==="undefined"?":":r)+t);o.log=this.log;return o}function enable(t){createDebug.save(t);createDebug.namespaces=t;createDebug.names=[];createDebug.skips=[];let r;const o=(typeof t==="string"?t:"").split(/[\s,]+/);const i=o.length;for(r=0;r"-"+t))].join(",");createDebug.enable("");return t}function enabled(t){if(t[t.length-1]==="*"){return true}let r;let o;for(r=0,o=createDebug.skips.length;r{if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){t.exports=o(6110)}else{t.exports=o(95108)}},95108:(t,r,o)=>{const i=o(52018);const a=o(39023);r.init=init;r.log=log;r.formatArgs=formatArgs;r.save=save;r.load=load;r.useColors=useColors;r.destroy=a.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");r.colors=[6,2,3,4,5,1];try{const t=o(21450);if(t&&(t.stderr||t).level>=2){r.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(t){}r.inspectOpts=Object.keys(process.env).filter((t=>/^debug_/i.test(t))).reduce(((t,r)=>{const o=r.substring(6).toLowerCase().replace(/_([a-z])/g,((t,r)=>r.toUpperCase()));let i=process.env[r];if(/^(yes|on|true|enabled)$/i.test(i)){i=true}else if(/^(no|off|false|disabled)$/i.test(i)){i=false}else if(i==="null"){i=null}else{i=Number(i)}t[o]=i;return t}),{});function useColors(){return"colors"in r.inspectOpts?Boolean(r.inspectOpts.colors):i.isatty(process.stderr.fd)}function formatArgs(r){const{namespace:o,useColors:i}=this;if(i){const i=this.color;const a="[3"+(i<8?i:"8;5;"+i);const c=` ${a};1m${o} [0m`;r[0]=c+r[0].split("\n").join("\n"+c);r.push(a+"m+"+t.exports.humanize(this.diff)+"[0m")}else{r[0]=getDate()+o+" "+r[0]}}function getDate(){if(r.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...t){return process.stderr.write(a.format(...t)+"\n")}function save(t){if(t){process.env.DEBUG=t}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(t){t.inspectOpts={};const o=Object.keys(r.inspectOpts);for(let i=0;it.trim())).join(" ")};c.O=function(t){this.inspectOpts.colors=this.useColors;return a.inspect(t,this.inspectOpts)}},14339:t=>{function assign(t,r){for(const o in r){Object.defineProperty(t,o,{value:r[o],enumerable:true,configurable:true})}return t}function createError(t,r,o){if(!t||typeof t==="string"){throw new TypeError("Please pass an Error to err-code")}if(!o){o={}}if(typeof r==="object"){o=r;r=undefined}if(r!=null){o.code=r}try{return assign(t,o)}catch(r){o.message=t.message;o.stack=t.stack;const ErrClass=function(){};ErrClass.prototype=Object.create(Object.getPrototypeOf(t));return assign(new ErrClass,o)}}t.exports=createError},25032:(t,r,o)=>{const{Minipass:i}=o(78275);const a=o(24434).EventEmitter;const c=o(79896);const p=c.writev;const u=Symbol("_autoClose");const l=Symbol("_close");const d=Symbol("_ended");const A=Symbol("_fd");const b=Symbol("_finished");const h=Symbol("_flags");const M=Symbol("_flush");const g=Symbol("_handleChunk");const z=Symbol("_makeBuf");const O=Symbol("_mode");const y=Symbol("_needDrain");const C=Symbol("_onerror");const B=Symbol("_onopen");const I=Symbol("_onread");const R=Symbol("_onwrite");const S=Symbol("_open");const q=Symbol("_path");const w=Symbol("_pos");const N=Symbol("_queue");const v=Symbol("_read");const T=Symbol("_readSize");const W=Symbol("_reading");const _=Symbol("_remain");const L=Symbol("_size");const x=Symbol("_write");const k=Symbol("_writing");const Q=Symbol("_defaultFlag");const D=Symbol("_errored");class ReadStream extends i{constructor(t,r){r=r||{};super(r);this.readable=true;this.writable=false;if(typeof t!=="string"){throw new TypeError("path must be a string")}this[D]=false;this[A]=typeof r.fd==="number"?r.fd:null;this[q]=t;this[T]=r.readSize||16*1024*1024;this[W]=false;this[L]=typeof r.size==="number"?r.size:Infinity;this[_]=this[L];this[u]=typeof r.autoClose==="boolean"?r.autoClose:true;if(typeof this[A]==="number"){this[v]()}else{this[S]()}}get fd(){return this[A]}get path(){return this[q]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[S](){c.open(this[q],"r",((t,r)=>this[B](t,r)))}[B](t,r){if(t){this[C](t)}else{this[A]=r;this.emit("open",r);this[v]()}}[z](){return Buffer.allocUnsafe(Math.min(this[T],this[_]))}[v](){if(!this[W]){this[W]=true;const t=this[z]();if(t.length===0){return process.nextTick((()=>this[I](null,0,t)))}c.read(this[A],t,0,t.length,null,((t,r,o)=>this[I](t,r,o)))}}[I](t,r,o){this[W]=false;if(t){this[C](t)}else if(this[g](r,o)){this[v]()}}[l](){if(this[u]&&typeof this[A]==="number"){const t=this[A];this[A]=null;c.close(t,(t=>t?this.emit("error",t):this.emit("close")))}}[C](t){this[W]=true;this[l]();this.emit("error",t)}[g](t,r){let o=false;this[_]-=t;if(t>0){o=super.write(tthis[B](t,r)))}[B](t,r){if(this[Q]&&this[h]==="r+"&&t&&t.code==="ENOENT"){this[h]="w";this[S]()}else if(t){this[C](t)}else{this[A]=r;this.emit("open",r);if(!this[k]){this[M]()}}}end(t,r){if(t){this.write(t,r)}this[d]=true;if(!this[k]&&!this[N].length&&typeof this[A]==="number"){this[R](null,0)}return this}write(t,r){if(typeof t==="string"){t=Buffer.from(t,r)}if(this[d]){this.emit("error",new Error("write() after end()"));return false}if(this[A]===null||this[k]||this[N].length){this[N].push(t);this[y]=true;return false}this[k]=true;this[x](t);return true}[x](t){c.write(this[A],t,0,t.length,this[w],((t,r)=>this[R](t,r)))}[R](t,r){if(t){this[C](t)}else{if(this[w]!==null){this[w]+=r}if(this[N].length){this[M]()}else{this[k]=false;if(this[d]&&!this[b]){this[b]=true;this[l]();this.emit("finish")}else if(this[y]){this[y]=false;this.emit("drain")}}}}[M](){if(this[N].length===0){if(this[d]){this[R](null,0)}}else if(this[N].length===1){this[x](this[N].pop())}else{const t=this[N];this[N]=[];p(this[A],t,this[w],((t,r)=>this[R](t,r)))}}[l](){if(this[u]&&typeof this[A]==="number"){const t=this[A];this[A]=null;c.close(t,(t=>t?this.emit("error",t):this.emit("close")))}}}class WriteStreamSync extends WriteStream{[S](){let t;if(this[Q]&&this[h]==="r+"){try{t=c.openSync(this[q],this[h],this[O])}catch(t){if(t.code==="ENOENT"){this[h]="w";return this[S]()}else{throw t}}}else{t=c.openSync(this[q],this[h],this[O])}this[B](null,t)}[l](){if(this[u]&&typeof this[A]==="number"){const t=this[A];this[A]=null;c.closeSync(t);this.emit("close")}}[x](t){let r=true;try{this[R](null,c.writeSync(this[A],t,0,t.length,this[w]));r=false}finally{if(r){try{this[l]()}catch{}}}}}r.ReadStream=ReadStream;r.ReadStreamSync=ReadStreamSync;r.WriteStream=WriteStream;r.WriteStreamSync=WriteStreamSync},2150:(t,r,o)=>{r.__esModule=true;function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var i=o(9476);var a=_interopRequireDefault(i);var c=o(52427);var p=_interopRequireDefault(c);var u=o(48406);var l=o(70174);var d=o(29424);var A=_interopRequireDefault(d);var b=o(37749);var h=_interopRequireDefault(b);var M=o(29309);var g=_interopRequireDefault(M);var z=a["default"].create;function create(){var t=z();t.compile=function(r,o){return l.compile(r,o,t)};t.precompile=function(r,o){return l.precompile(r,o,t)};t.AST=p["default"];t.Compiler=l.Compiler;t.JavaScriptCompiler=A["default"];t.Parser=u.parser;t.parse=u.parse;t.parseWithoutProcessing=u.parseWithoutProcessing;return t}var O=create();O.create=create;g["default"](O);O.Visitor=h["default"];O["default"]=O;r["default"]=O;t.exports=r["default"]},9476:(t,r,o)=>{r.__esModule=true;function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _interopRequireWildcard(t){if(t&&t.__esModule){return t}else{var r={};if(t!=null){for(var o in t){if(Object.prototype.hasOwnProperty.call(t,o))r[o]=t[o]}}r["default"]=t;return r}}var i=o(27280);var a=_interopRequireWildcard(i);var c=o(47544);var p=_interopRequireDefault(c);var u=o(89252);var l=_interopRequireDefault(u);var d=o(68272);var A=_interopRequireWildcard(d);var b=o(63569);var h=_interopRequireWildcard(b);var M=o(29309);var g=_interopRequireDefault(M);function create(){var t=new a.HandlebarsEnvironment;A.extend(t,a);t.SafeString=p["default"];t.Exception=l["default"];t.Utils=A;t.escapeExpression=A.escapeExpression;t.VM=h;t.template=function(r){return h.template(r,t)};return t}var z=create();z.create=create;g["default"](z);z["default"]=z;r["default"]=z;t.exports=r["default"]},27280:(t,r,o)=>{r.__esModule=true;r.HandlebarsEnvironment=HandlebarsEnvironment;function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var i=o(68272);var a=o(89252);var c=_interopRequireDefault(a);var p=o(5248);var u=o(21447);var l=o(28525);var d=_interopRequireDefault(l);var A=o(14784);var b="4.7.8";r.VERSION=b;var h=8;r.COMPILER_REVISION=h;var M=7;r.LAST_COMPATIBLE_COMPILER_REVISION=M;var g={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};r.REVISION_CHANGES=g;var z="[object Object]";function HandlebarsEnvironment(t,r,o){this.helpers=t||{};this.partials=r||{};this.decorators=o||{};p.registerDefaultHelpers(this);u.registerDefaultDecorators(this)}HandlebarsEnvironment.prototype={constructor:HandlebarsEnvironment,logger:d["default"],log:d["default"].log,registerHelper:function registerHelper(t,r){if(i.toString.call(t)===z){if(r){throw new c["default"]("Arg not supported with multiple helpers")}i.extend(this.helpers,t)}else{this.helpers[t]=r}},unregisterHelper:function unregisterHelper(t){delete this.helpers[t]},registerPartial:function registerPartial(t,r){if(i.toString.call(t)===z){i.extend(this.partials,t)}else{if(typeof r==="undefined"){throw new c["default"]('Attempting to register a partial called "'+t+'" as undefined')}this.partials[t]=r}},unregisterPartial:function unregisterPartial(t){delete this.partials[t]},registerDecorator:function registerDecorator(t,r){if(i.toString.call(t)===z){if(r){throw new c["default"]("Arg not supported with multiple decorators")}i.extend(this.decorators,t)}else{this.decorators[t]=r}},unregisterDecorator:function unregisterDecorator(t){delete this.decorators[t]},resetLoggedPropertyAccesses:function resetLoggedPropertyAccesses(){A.resetLoggedProperties()}};var O=d["default"].log;r.log=O;r.createFrame=i.createFrame;r.logger=d["default"]},52427:(t,r)=>{r.__esModule=true;var o={helpers:{helperExpression:function helperExpression(t){return t.type==="SubExpression"||(t.type==="MustacheStatement"||t.type==="BlockStatement")&&!!(t.params&&t.params.length||t.hash)},scopedId:function scopedId(t){return/^\.|this\b/.test(t.original)},simpleId:function simpleId(t){return t.parts.length===1&&!o.helpers.scopedId(t)&&!t.depth}}};r["default"]=o;t.exports=r["default"]},48406:(t,r,o)=>{r.__esModule=true;r.parseWithoutProcessing=parseWithoutProcessing;r.parse=parse;function _interopRequireWildcard(t){if(t&&t.__esModule){return t}else{var r={};if(t!=null){for(var o in t){if(Object.prototype.hasOwnProperty.call(t,o))r[o]=t[o]}}r["default"]=t;return r}}function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var i=o(61060);var a=_interopRequireDefault(i);var c=o(9422);var p=_interopRequireDefault(c);var u=o(47914);var l=_interopRequireWildcard(u);var d=o(68272);r.parser=a["default"];var A={};d.extend(A,l);function parseWithoutProcessing(t,r){if(t.type==="Program"){return t}a["default"].yy=A;A.locInfo=function(t){return new A.SourceLocation(r&&r.srcName,t)};var o=a["default"].parse(t);return o}function parse(t,r){var o=parseWithoutProcessing(t,r);var i=new p["default"](r);return i.accept(o)}},18037:(t,r,o)=>{r.__esModule=true;var i=o(68272);var a=undefined;try{if(typeof define!=="function"||!define.amd){var c=o(62618);a=c.SourceNode}}catch(t){}if(!a){a=function(t,r,o,i){this.src="";if(i){this.add(i)}};a.prototype={add:function add(t){if(i.isArray(t)){t=t.join("")}this.src+=t},prepend:function prepend(t){if(i.isArray(t)){t=t.join("")}this.src=t+this.src},toStringWithSourceMap:function toStringWithSourceMap(){return{code:this.toString()}},toString:function toString(){return this.src}}}function castChunk(t,r,o){if(i.isArray(t)){var a=[];for(var c=0,p=t.length;c{r.__esModule=true;r.Compiler=Compiler;r.precompile=precompile;r.compile=compile;function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var i=o(89252);var a=_interopRequireDefault(i);var c=o(68272);var p=o(52427);var u=_interopRequireDefault(p);var l=[].slice;function Compiler(){}Compiler.prototype={compiler:Compiler,equals:function equals(t){var r=this.opcodes.length;if(t.opcodes.length!==r){return false}for(var o=0;o1){throw new a["default"]("Unsupported number of partial arguments: "+o.length,t)}else if(!o.length){if(this.options.explicitPartialContext){this.opcode("pushLiteral","undefined")}else{o.push({type:"PathExpression",parts:[],depth:0})}}var i=t.name.original,c=t.name.type==="SubExpression";if(c){this.accept(t.name)}this.setupFullMustacheParams(t,r,undefined,true);var p=t.indent||"";if(this.options.preventIndent&&p){this.opcode("appendContent",p);p=""}this.opcode("invokePartial",c,i,p);this.opcode("append")},PartialBlockStatement:function PartialBlockStatement(t){this.PartialStatement(t)},MustacheStatement:function MustacheStatement(t){this.SubExpression(t);if(t.escaped&&!this.options.noEscape){this.opcode("appendEscaped")}else{this.opcode("append")}},Decorator:function Decorator(t){this.DecoratorBlock(t)},ContentStatement:function ContentStatement(t){if(t.value){this.opcode("appendContent",t.value)}},CommentStatement:function CommentStatement(){},SubExpression:function SubExpression(t){transformLiteralToPath(t);var r=this.classifySexpr(t);if(r==="simple"){this.simpleSexpr(t)}else if(r==="helper"){this.helperSexpr(t)}else{this.ambiguousSexpr(t)}},ambiguousSexpr:function ambiguousSexpr(t,r,o){var i=t.path,a=i.parts[0],c=r!=null||o!=null;this.opcode("getContext",i.depth);this.opcode("pushProgram",r);this.opcode("pushProgram",o);i.strict=true;this.accept(i);this.opcode("invokeAmbiguous",a,c)},simpleSexpr:function simpleSexpr(t){var r=t.path;r.strict=true;this.accept(r);this.opcode("resolvePossibleLambda")},helperSexpr:function helperSexpr(t,r,o){var i=this.setupFullMustacheParams(t,r,o),c=t.path,p=c.parts[0];if(this.options.knownHelpers[p]){this.opcode("invokeKnownHelper",i.length,p)}else if(this.options.knownHelpersOnly){throw new a["default"]("You specified knownHelpersOnly, but used the unknown helper "+p,t)}else{c.strict=true;c.falsy=true;this.accept(c);this.opcode("invokeHelper",i.length,c.original,u["default"].helpers.simpleId(c))}},PathExpression:function PathExpression(t){this.addDepth(t.depth);this.opcode("getContext",t.depth);var r=t.parts[0],o=u["default"].helpers.scopedId(t),i=!t.depth&&!o&&this.blockParamIndex(r);if(i){this.opcode("lookupBlockParam",i,t.parts)}else if(!r){this.opcode("pushContext")}else if(t.data){this.options.data=true;this.opcode("lookupData",t.depth,t.parts,t.strict)}else{this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,o)}},StringLiteral:function StringLiteral(t){this.opcode("pushString",t.value)},NumberLiteral:function NumberLiteral(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function BooleanLiteral(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function UndefinedLiteral(){this.opcode("pushLiteral","undefined")},NullLiteral:function NullLiteral(){this.opcode("pushLiteral","null")},Hash:function Hash(t){var r=t.pairs,o=0,i=r.length;this.opcode("pushHash");for(;o=0){return[r,a]}}}};function precompile(t,r,o){if(t==null||typeof t!=="string"&&t.type!=="Program"){throw new a["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t)}r=r||{};if(!("data"in r)){r.data=true}if(r.compat){r.useDepths=true}var i=o.parse(t,r),c=(new o.Compiler).compile(i,r);return(new o.JavaScriptCompiler).compile(c,r)}function compile(t,r,o){if(r===undefined)r={};if(t==null||typeof t!=="string"&&t.type!=="Program"){throw new a["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t)}r=c.extend({},r);if(!("data"in r)){r.data=true}if(r.compat){r.useDepths=true}var i=undefined;function compileInput(){var i=o.parse(t,r),a=(new o.Compiler).compile(i,r),c=(new o.JavaScriptCompiler).compile(a,r,undefined,true);return o.template(c)}function ret(t,r){if(!i){i=compileInput()}return i.call(this,t,r)}ret._setup=function(t){if(!i){i=compileInput()}return i._setup(t)};ret._child=function(t,r,o,a){if(!i){i=compileInput()}return i._child(t,r,o,a)};return ret}function argEquals(t,r){if(t===r){return true}if(c.isArray(t)&&c.isArray(r)&&t.length===r.length){for(var o=0;o{r.__esModule=true;r.SourceLocation=SourceLocation;r.id=id;r.stripFlags=stripFlags;r.stripComment=stripComment;r.preparePath=preparePath;r.prepareMustache=prepareMustache;r.prepareRawBlock=prepareRawBlock;r.prepareBlock=prepareBlock;r.prepareProgram=prepareProgram;r.preparePartialBlock=preparePartialBlock;function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var i=o(89252);var a=_interopRequireDefault(i);function validateClose(t,r){r=r.path?r.path.original:r;if(t.path.original!==r){var o={loc:t.path.loc};throw new a["default"](t.path.original+" doesn't match "+r,o)}}function SourceLocation(t,r){this.source=t;this.start={line:r.first_line,column:r.first_column};this.end={line:r.last_line,column:r.last_column}}function id(t){if(/^\[.*\]$/.test(t)){return t.substring(1,t.length-1)}else{return t}}function stripFlags(t,r){return{open:t.charAt(2)==="~",close:r.charAt(r.length-3)==="~"}}function stripComment(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function preparePath(t,r,o){o=this.locInfo(o);var i=t?"@":"",c=[],p=0;for(var u=0,l=r.length;u0){throw new a["default"]("Invalid path: "+i,{loc:o})}else if(d===".."){p++}}else{c.push(d)}}return{type:"PathExpression",data:t,depth:p,parts:c,original:i,loc:o}}function prepareMustache(t,r,o,i,a,c){var p=i.charAt(3)||i.charAt(2),u=p!=="{"&&p!=="&";var l=/\*/.test(i);return{type:l?"Decorator":"MustacheStatement",path:t,params:r,hash:o,escaped:u,strip:a,loc:this.locInfo(c)}}function prepareRawBlock(t,r,o,i){validateClose(t,o);i=this.locInfo(i);var a={type:"Program",body:r,strip:{},loc:i};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:a,openStrip:{},inverseStrip:{},closeStrip:{},loc:i}}function prepareBlock(t,r,o,i,c,p){if(i&&i.path){validateClose(t,i)}var u=/\*/.test(t.open);r.blockParams=t.blockParams;var l=undefined,d=undefined;if(o){if(u){throw new a["default"]("Unexpected inverse block on decorator",o)}if(o.chain){o.program.body[0].closeStrip=i.strip}d=o.strip;l=o.program}if(c){c=l;l=r;r=c}return{type:u?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:r,inverse:l,openStrip:t.strip,inverseStrip:d,closeStrip:i&&i.strip,loc:this.locInfo(p)}}function prepareProgram(t,r){if(!r&&t.length){var o=t[0].loc,i=t[t.length-1].loc;if(o&&i){r={source:o.source,start:{line:o.start.line,column:o.start.column},end:{line:i.end.line,column:i.end.column}}}}return{type:"Program",body:t,strip:{},loc:r}}function preparePartialBlock(t,r,o,i){validateClose(t,o);return{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:r,openStrip:t.strip,closeStrip:o&&o.strip,loc:this.locInfo(i)}}},29424:(t,r,o)=>{r.__esModule=true;function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var i=o(27280);var a=o(89252);var c=_interopRequireDefault(a);var p=o(68272);var u=o(18037);var l=_interopRequireDefault(u);function Literal(t){this.value=t}function JavaScriptCompiler(){}JavaScriptCompiler.prototype={nameLookup:function nameLookup(t,r){return this.internalNameLookup(t,r)},depthedLookup:function depthedLookup(t){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(t),")"]},compilerInfo:function compilerInfo(){var t=i.COMPILER_REVISION,r=i.REVISION_CHANGES[t];return[t,r]},appendToBuffer:function appendToBuffer(t,r,o){if(!p.isArray(t)){t=[t]}t=this.source.wrap(t,r);if(this.environment.isSimple){return["return ",t,";"]}else if(o){return["buffer += ",t,";"]}else{t.appendToBuffer=true;return t}},initializeBuffer:function initializeBuffer(){return this.quotedString("")},internalNameLookup:function internalNameLookup(t,r){this.lookupPropertyFunctionIsUsed=true;return["lookupProperty(",t,",",JSON.stringify(r),")"]},lookupPropertyFunctionIsUsed:false,compile:function compile(t,r,o,i){this.environment=t;this.options=r;this.stringParams=this.options.stringParams;this.trackIds=this.options.trackIds;this.precompile=!i;this.name=this.environment.name;this.isChild=!!o;this.context=o||{decorators:[],programs:[],environments:[]};this.preamble();this.stackSlot=0;this.stackVars=[];this.aliases={};this.registers={list:[]};this.hashes=[];this.compileStack=[];this.inlineStack=[];this.blockParams=[];this.compileChildren(t,r);this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat;this.useBlockParams=this.useBlockParams||t.useBlockParams;var a=t.opcodes,p=undefined,u=undefined,l=undefined,d=undefined;for(l=0,d=a.length;l0){o+=", "+i.join(", ")}var a=0;Object.keys(this.aliases).forEach((function(t){var i=r.aliases[t];if(i.children&&i.referenceCount>1){o+=", alias"+ ++a+"="+t;i.children[0]="alias"+a}}));if(this.lookupPropertyFunctionIsUsed){o+=", "+this.lookupPropertyFunctionVarDeclaration()}var c=["container","depth0","helpers","partials","data"];if(this.useBlockParams||this.useDepths){c.push("blockParams")}if(this.useDepths){c.push("depths")}var p=this.mergeSource(o);if(t){c.push(p);return Function.apply(this,c)}else{return this.source.wrap(["function(",c.join(","),") {\n ",p,"}"])}},mergeSource:function mergeSource(t){var r=this.environment.isSimple,o=!this.forceBuffer,i=undefined,a=undefined,c=undefined,p=undefined;this.source.each((function(t){if(t.appendToBuffer){if(c){t.prepend(" + ")}else{c=t}p=t}else{if(c){if(!a){i=true}else{c.prepend("buffer += ")}p.add(";");c=p=undefined}a=true;if(!r){o=false}}}));if(o){if(c){c.prepend("return ");p.add(";")}else if(!a){this.source.push('return "";')}}else{t+=", buffer = "+(i?"":this.initializeBuffer());if(c){c.prepend("return buffer + ");p.add(";")}else{this.source.push("return buffer;")}}if(t){this.source.prepend("var "+t.substring(2)+(i?"":";\n"))}return this.source.merge()},lookupPropertyFunctionVarDeclaration:function lookupPropertyFunctionVarDeclaration(){return"\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim()},blockValue:function blockValue(t){var r=this.aliasable("container.hooks.blockHelperMissing"),o=[this.contextName(0)];this.setupHelperArgs(t,0,o);var i=this.popStack();o.splice(1,0,i);this.push(this.source.functionCall(r,"call",o))},ambiguousBlockValue:function ambiguousBlockValue(){var t=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,true);this.flushInline();var o=this.topStack();r.splice(1,0,o);this.pushSource(["if (!",this.lastHelper,") { ",o," = ",this.source.functionCall(t,"call",r),"}"])},appendContent:function appendContent(t){if(this.pendingContent){t=this.pendingContent+t}else{this.pendingLocation=this.source.currentLocation}this.pendingContent=t},append:function append(){if(this.isInline()){this.replaceStack((function(t){return[" != null ? ",t,' : ""']}));this.pushSource(this.appendToBuffer(this.popStack()))}else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,undefined,true)," }"]);if(this.environment.isSimple){this.pushSource(["else { ",this.appendToBuffer("''",undefined,true)," }"])}}},appendEscaped:function appendEscaped(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function getContext(t){this.lastContext=t},pushContext:function pushContext(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function lookupOnContext(t,r,o,i){var a=0;if(!i&&this.options.compat&&!this.lastContext){this.push(this.depthedLookup(t[a++]))}else{this.pushContext()}this.resolvePath("context",t,a,r,o)},lookupBlockParam:function lookupBlockParam(t,r){this.useBlockParams=true;this.push(["blockParams[",t[0],"][",t[1],"]"]);this.resolvePath("context",r,1)},lookupData:function lookupData(t,r,o){if(!t){this.pushStackLiteral("data")}else{this.pushStackLiteral("container.data(data, "+t+")")}this.resolvePath("data",r,0,true,o)},resolvePath:function resolvePath(t,r,o,i,a){var c=this;if(this.options.strict||this.options.assumeObjects){this.push(strictLookup(this.options.strict&&a,this,r,o,t));return}var p=r.length;for(;othis.stackVars.length){this.stackVars.push("stack"+this.stackSlot)}return this.topStackName()},topStackName:function topStackName(){return"stack"+this.stackSlot},flushInline:function flushInline(){var t=this.inlineStack;this.inlineStack=[];for(var r=0,o=t.length;r{r.__esModule=true;var o=function(){var t={trace:function trace(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function anonymous(t,r,o,i,a,c,p){var u=c.length-1;switch(a){case 1:return c[u-1];break;case 2:this.$=i.prepareProgram(c[u]);break;case 3:this.$=c[u];break;case 4:this.$=c[u];break;case 5:this.$=c[u];break;case 6:this.$=c[u];break;case 7:this.$=c[u];break;case 8:this.$=c[u];break;case 9:this.$={type:"CommentStatement",value:i.stripComment(c[u]),strip:i.stripFlags(c[u],c[u]),loc:i.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:c[u],value:c[u],loc:i.locInfo(this._$)};break;case 11:this.$=i.prepareRawBlock(c[u-2],c[u-1],c[u],this._$);break;case 12:this.$={path:c[u-3],params:c[u-2],hash:c[u-1]};break;case 13:this.$=i.prepareBlock(c[u-3],c[u-2],c[u-1],c[u],false,this._$);break;case 14:this.$=i.prepareBlock(c[u-3],c[u-2],c[u-1],c[u],true,this._$);break;case 15:this.$={open:c[u-5],path:c[u-4],params:c[u-3],hash:c[u-2],blockParams:c[u-1],strip:i.stripFlags(c[u-5],c[u])};break;case 16:this.$={path:c[u-4],params:c[u-3],hash:c[u-2],blockParams:c[u-1],strip:i.stripFlags(c[u-5],c[u])};break;case 17:this.$={path:c[u-4],params:c[u-3],hash:c[u-2],blockParams:c[u-1],strip:i.stripFlags(c[u-5],c[u])};break;case 18:this.$={strip:i.stripFlags(c[u-1],c[u-1]),program:c[u]};break;case 19:var l=i.prepareBlock(c[u-2],c[u-1],c[u],c[u],false,this._$),d=i.prepareProgram([l],c[u-1].loc);d.chained=true;this.$={strip:c[u-2].strip,program:d,chain:true};break;case 20:this.$=c[u];break;case 21:this.$={path:c[u-1],strip:i.stripFlags(c[u-2],c[u])};break;case 22:this.$=i.prepareMustache(c[u-3],c[u-2],c[u-1],c[u-4],i.stripFlags(c[u-4],c[u]),this._$);break;case 23:this.$=i.prepareMustache(c[u-3],c[u-2],c[u-1],c[u-4],i.stripFlags(c[u-4],c[u]),this._$);break;case 24:this.$={type:"PartialStatement",name:c[u-3],params:c[u-2],hash:c[u-1],indent:"",strip:i.stripFlags(c[u-4],c[u]),loc:i.locInfo(this._$)};break;case 25:this.$=i.preparePartialBlock(c[u-2],c[u-1],c[u],this._$);break;case 26:this.$={path:c[u-3],params:c[u-2],hash:c[u-1],strip:i.stripFlags(c[u-4],c[u])};break;case 27:this.$=c[u];break;case 28:this.$=c[u];break;case 29:this.$={type:"SubExpression",path:c[u-3],params:c[u-2],hash:c[u-1],loc:i.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:c[u],loc:i.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:i.id(c[u-2]),value:c[u],loc:i.locInfo(this._$)};break;case 32:this.$=i.id(c[u-1]);break;case 33:this.$=c[u];break;case 34:this.$=c[u];break;case 35:this.$={type:"StringLiteral",value:c[u],original:c[u],loc:i.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(c[u]),original:Number(c[u]),loc:i.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:c[u]==="true",original:c[u]==="true",loc:i.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:undefined,value:undefined,loc:i.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:i.locInfo(this._$)};break;case 40:this.$=c[u];break;case 41:this.$=c[u];break;case 42:this.$=i.preparePath(true,c[u],this._$);break;case 43:this.$=i.preparePath(false,c[u],this._$);break;case 44:c[u-2].push({part:i.id(c[u]),original:c[u],separator:c[u-1]});this.$=c[u-2];break;case 45:this.$=[{part:i.id(c[u]),original:c[u]}];break;case 46:this.$=[];break;case 47:c[u-1].push(c[u]);break;case 48:this.$=[];break;case 49:c[u-1].push(c[u]);break;case 50:this.$=[];break;case 51:c[u-1].push(c[u]);break;case 58:this.$=[];break;case 59:c[u-1].push(c[u]);break;case 64:this.$=[];break;case 65:c[u-1].push(c[u]);break;case 70:this.$=[];break;case 71:c[u-1].push(c[u]);break;case 78:this.$=[];break;case 79:c[u-1].push(c[u]);break;case 82:this.$=[];break;case 83:c[u-1].push(c[u]);break;case 86:this.$=[];break;case 87:c[u-1].push(c[u]);break;case 90:this.$=[];break;case 91:c[u-1].push(c[u]);break;case 94:this.$=[];break;case 95:c[u-1].push(c[u]);break;case 98:this.$=[c[u]];break;case 99:c[u-1].push(c[u]);break;case 100:this.$=[c[u]];break;case 101:c[u-1].push(c[u]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function parseError(t,r){throw new Error(t)},parse:function parse(t){var r=this,o=[0],i=[null],a=[],c=this.table,p="",u=0,l=0,d=0,A=2,b=1;this.lexer.setInput(t);this.lexer.yy=this.yy;this.yy.lexer=this.lexer;this.yy.parser=this;if(typeof this.lexer.yylloc=="undefined")this.lexer.yylloc={};var h=this.lexer.yylloc;a.push(h);var M=this.lexer.options&&this.lexer.options.ranges;if(typeof this.yy.parseError==="function")this.parseError=this.yy.parseError;function popStack(t){o.length=o.length-2*t;i.length=i.length-t;a.length=a.length-t}function lex(){var t;t=r.lexer.lex()||1;if(typeof t!=="number"){t=r.symbols_[t]||t}return t}var g,z,O,y,C,B,I={},R,S,q,w;while(true){O=o[o.length-1];if(this.defaultActions[O]){y=this.defaultActions[O]}else{if(g===null||typeof g=="undefined"){g=lex()}y=c[O]&&c[O][g]}if(typeof y==="undefined"||!y.length||!y[0]){var N="";if(!d){w=[];for(R in c[O])if(this.terminals_[R]&&R>2){w.push("'"+this.terminals_[R]+"'")}if(this.lexer.showPosition){N="Parse error on line "+(u+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[g]||g)+"'"}else{N="Parse error on line "+(u+1)+": Unexpected "+(g==1?"end of input":"'"+(this.terminals_[g]||g)+"'")}this.parseError(N,{text:this.lexer.match,token:this.terminals_[g]||g,line:this.lexer.yylineno,loc:h,expected:w})}}if(y[0]instanceof Array&&y.length>1){throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+g)}switch(y[0]){case 1:o.push(g);i.push(this.lexer.yytext);a.push(this.lexer.yylloc);o.push(y[1]);g=null;if(!z){l=this.lexer.yyleng;p=this.lexer.yytext;u=this.lexer.yylineno;h=this.lexer.yylloc;if(d>0)d--}else{g=z;z=null}break;case 2:S=this.productions_[y[1]][1];I.$=i[i.length-S];I._$={first_line:a[a.length-(S||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(S||1)].first_column,last_column:a[a.length-1].last_column};if(M){I._$.range=[a[a.length-(S||1)].range[0],a[a.length-1].range[1]]}B=this.performAction.call(I,p,l,u,this.yy,y[1],i,a);if(typeof B!=="undefined"){return B}if(S){o=o.slice(0,-1*S*2);i=i.slice(0,-1*S);a=a.slice(0,-1*S)}o.push(this.productions_[y[1]][0]);i.push(I.$);a.push(I._$);q=c[o[o.length-2]][o[o.length-1]];o.push(q);break;case 3:return true}}return true}};var r=function(){var t={EOF:1,parseError:function parseError(t,r){if(this.yy.parser){this.yy.parser.parseError(t,r)}else{throw new Error(t)}},setInput:function setInput(t){this._input=t;this._more=this._less=this.done=false;this.yylineno=this.yyleng=0;this.yytext=this.matched=this.match="";this.conditionStack=["INITIAL"];this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0};if(this.options.ranges)this.yylloc.range=[0,0];this.offset=0;return this},input:function input(){var t=this._input[0];this.yytext+=t;this.yyleng++;this.offset++;this.match+=t;this.matched+=t;var r=t.match(/(?:\r\n?|\n).*/g);if(r){this.yylineno++;this.yylloc.last_line++}else{this.yylloc.last_column++}if(this.options.ranges)this.yylloc.range[1]++;this._input=this._input.slice(1);return t},unput:function unput(t){var r=t.length;var o=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input;this.yytext=this.yytext.substr(0,this.yytext.length-r-1);this.offset-=r;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1);this.matched=this.matched.substr(0,this.matched.length-1);if(o.length-1)this.yylineno-=o.length-1;var a=this.yylloc.range;this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===i.length?this.yylloc.first_column:0)+i[i.length-o.length].length-o[0].length:this.yylloc.first_column-r};if(this.options.ranges){this.yylloc.range=[a[0],a[0]+this.yyleng-r]}return this},more:function more(){this._more=true;return this},less:function less(t){this.unput(this.match.slice(t))},pastInput:function pastInput(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function upcomingInput(){var t=this.match;if(t.length<20){t+=this._input.substr(0,20-t.length)}return(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function showPosition(){var t=this.pastInput();var r=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+r+"^"},next:function next(){if(this.done){return this.EOF}if(!this._input)this.done=true;var t,r,o,i,a,c;if(!this._more){this.yytext="";this.match=""}var p=this._currentRules();for(var u=0;ur[0].length)){r=o;i=u;if(!this.options.flex)break}}if(r){c=r[0].match(/(?:\r\n?|\n).*/g);if(c)this.yylineno+=c.length;this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length};this.yytext+=r[0];this.match+=r[0];this.matches=r;this.yyleng=this.yytext.length;if(this.options.ranges){this.yylloc.range=[this.offset,this.offset+=this.yyleng]}this._more=false;this._input=this._input.slice(r[0].length);this.matched+=r[0];t=this.performAction.call(this,this.yy,this,p[i],this.conditionStack[this.conditionStack.length-1]);if(this.done&&this._input)this.done=false;if(t)return t;else return}if(this._input===""){return this.EOF}else{return this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}},lex:function lex(){var t=this.next();if(typeof t!=="undefined"){return t}else{return this.lex()}},begin:function begin(t){this.conditionStack.push(t)},popState:function popState(){return this.conditionStack.pop()},_currentRules:function _currentRules(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function topState(){return this.conditionStack[this.conditionStack.length-2]},pushState:function begin(t){this.begin(t)}};t.options={};t.performAction=function anonymous(t,r,o,i){function strip(t,o){return r.yytext=r.yytext.substring(t,r.yyleng-o+t)}var a=i;switch(o){case 0:if(r.yytext.slice(-2)==="\\\\"){strip(0,1);this.begin("mu")}else if(r.yytext.slice(-1)==="\\"){strip(0,1);this.begin("emu")}else{this.begin("mu")}if(r.yytext)return 15;break;case 1:return 15;break;case 2:this.popState();return 15;break;case 3:this.begin("raw");return 15;break;case 4:this.popState();if(this.conditionStack[this.conditionStack.length-1]==="raw"){return 15}else{strip(5,9);return"END_RAW_BLOCK"}break;case 5:return 15;break;case 6:this.popState();return 14;break;case 7:return 65;break;case 8:return 68;break;case 9:return 19;break;case 10:this.popState();this.begin("raw");return 23;break;case 11:return 55;break;case 12:return 60;break;case 13:return 29;break;case 14:return 47;break;case 15:this.popState();return 44;break;case 16:this.popState();return 44;break;case 17:return 34;break;case 18:return 39;break;case 19:return 51;break;case 20:return 48;break;case 21:this.unput(r.yytext);this.popState();this.begin("com");break;case 22:this.popState();return 14;break;case 23:return 48;break;case 24:return 73;break;case 25:return 72;break;case 26:return 72;break;case 27:return 87;break;case 28:break;case 29:this.popState();return 54;break;case 30:this.popState();return 33;break;case 31:r.yytext=strip(1,2).replace(/\\"/g,'"');return 80;break;case 32:r.yytext=strip(1,2).replace(/\\'/g,"'");return 80;break;case 33:return 85;break;case 34:return 82;break;case 35:return 82;break;case 36:return 83;break;case 37:return 84;break;case 38:return 81;break;case 39:return 75;break;case 40:return 77;break;case 41:return 72;break;case 42:r.yytext=r.yytext.replace(/\\([\\\]])/g,"$1");return 72;break;case 43:return"INVALID";break;case 44:return 5;break}};t.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/];t.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:false},emu:{rules:[2],inclusive:false},com:{rules:[6],inclusive:false},raw:{rules:[3,4,5],inclusive:false},INITIAL:{rules:[0,1,44],inclusive:true}};return t}();t.lexer=r;function Parser(){this.yy={}}Parser.prototype=t;t.Parser=Parser;return new Parser}();r["default"]=o;t.exports=r["default"]},28043:(t,r,o)=>{r.__esModule=true;r.print=print;r.PrintVisitor=PrintVisitor;function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var i=o(37749);var a=_interopRequireDefault(i);function print(t){return(new PrintVisitor).accept(t)}function PrintVisitor(){this.padding=0}PrintVisitor.prototype=new a["default"];PrintVisitor.prototype.pad=function(t){var r="";for(var o=0,i=this.padding;o "+r+" }}")};PrintVisitor.prototype.PartialBlockStatement=function(t){var r="PARTIAL BLOCK:"+t.name.original;if(t.params[0]){r+=" "+this.accept(t.params[0])}if(t.hash){r+=" "+this.accept(t.hash)}r+=" "+this.pad("PROGRAM:");this.padding++;r+=this.accept(t.program);this.padding--;return this.pad("{{> "+r+" }}")};PrintVisitor.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};PrintVisitor.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};PrintVisitor.prototype.SubExpression=function(t){var r=t.params,o=[],i=undefined;for(var a=0,c=r.length;a{r.__esModule=true;function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var i=o(89252);var a=_interopRequireDefault(i);function Visitor(){this.parents=[]}Visitor.prototype={constructor:Visitor,mutating:false,acceptKey:function acceptKey(t,r){var o=this.accept(t[r]);if(this.mutating){if(o&&!Visitor.prototype[o.type]){throw new a["default"]('Unexpected node type "'+o.type+'" found when accepting '+r+" on "+t.type)}t[r]=o}},acceptRequired:function acceptRequired(t,r){this.acceptKey(t,r);if(!t[r]){throw new a["default"](t.type+" requires "+r)}},acceptArray:function acceptArray(t){for(var r=0,o=t.length;r{r.__esModule=true;function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var i=o(37749);var a=_interopRequireDefault(i);function WhitespaceControl(){var t=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];this.options=t}WhitespaceControl.prototype=new a["default"];WhitespaceControl.prototype.Program=function(t){var r=!this.options.ignoreStandalone;var o=!this.isRootSeen;this.isRootSeen=true;var i=t.body;for(var a=0,c=i.length;a{r.__esModule=true;r.registerDefaultDecorators=registerDefaultDecorators;function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var i=o(10379);var a=_interopRequireDefault(i);function registerDefaultDecorators(t){a["default"](t)}},10379:(t,r,o)=>{r.__esModule=true;var i=o(68272);r["default"]=function(t){t.registerDecorator("inline",(function(t,r,o,a){var c=t;if(!r.partials){r.partials={};c=function(a,c){var p=o.partials;o.partials=i.extend({},p,r.partials);var u=t(a,c);o.partials=p;return u}}r.partials[a.args[0]]=a.fn;return c}))};t.exports=r["default"]},89252:(t,r)=>{r.__esModule=true;var o=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Exception(t,r){var i=r&&r.loc,a=undefined,c=undefined,p=undefined,u=undefined;if(i){a=i.start.line;c=i.end.line;p=i.start.column;u=i.end.column;t+=" - "+a+":"+p}var l=Error.prototype.constructor.call(this,t);for(var d=0;d{r.__esModule=true;r.registerDefaultHelpers=registerDefaultHelpers;r.moveHelperToHooks=moveHelperToHooks;function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var i=o(69102);var a=_interopRequireDefault(i);var c=o(73350);var p=_interopRequireDefault(c);var u=o(99786);var l=_interopRequireDefault(u);var d=o(6040);var A=_interopRequireDefault(d);var b=o(64969);var h=_interopRequireDefault(b);var M=o(63285);var g=_interopRequireDefault(M);var z=o(41691);var O=_interopRequireDefault(z);function registerDefaultHelpers(t){a["default"](t);p["default"](t);l["default"](t);A["default"](t);h["default"](t);g["default"](t);O["default"](t)}function moveHelperToHooks(t,r,o){if(t.helpers[r]){t.hooks[r]=t.helpers[r];if(!o){delete t.helpers[r]}}}},69102:(t,r,o)=>{r.__esModule=true;var i=o(68272);r["default"]=function(t){t.registerHelper("blockHelperMissing",(function(r,o){var a=o.inverse,c=o.fn;if(r===true){return c(this)}else if(r===false||r==null){return a(this)}else if(i.isArray(r)){if(r.length>0){if(o.ids){o.ids=[o.name]}return t.helpers.each(r,o)}else{return a(this)}}else{if(o.data&&o.ids){var p=i.createFrame(o.data);p.contextPath=i.appendContextPath(o.data.contextPath,o.name);o={data:p}}return c(r,o)}}))};t.exports=r["default"]},73350:(t,r,o)=>{r.__esModule=true;function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var i=o(68272);var a=o(89252);var c=_interopRequireDefault(a);r["default"]=function(t){t.registerHelper("each",(function(t,r){if(!r){throw new c["default"]("Must pass iterator to #each")}var o=r.fn,a=r.inverse,p=0,u="",l=undefined,d=undefined;if(r.data&&r.ids){d=i.appendContextPath(r.data.contextPath,r.ids[0])+"."}if(i.isFunction(t)){t=t.call(this)}if(r.data){l=i.createFrame(r.data)}function execIteration(r,a,c){if(l){l.key=r;l.index=a;l.first=a===0;l.last=!!c;if(d){l.contextPath=d+r}}u=u+o(t[r],{data:l,blockParams:i.blockParams([t[r],r],[d+r,null])})}if(t&&typeof t==="object"){if(i.isArray(t)){for(var A=t.length;p{r.__esModule=true;function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var i=o(89252);var a=_interopRequireDefault(i);r["default"]=function(t){t.registerHelper("helperMissing",(function(){if(arguments.length===1){return undefined}else{throw new a["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')}}))};t.exports=r["default"]},6040:(t,r,o)=>{r.__esModule=true;function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var i=o(68272);var a=o(89252);var c=_interopRequireDefault(a);r["default"]=function(t){t.registerHelper("if",(function(t,r){if(arguments.length!=2){throw new c["default"]("#if requires exactly one argument")}if(i.isFunction(t)){t=t.call(this)}if(!r.hash.includeZero&&!t||i.isEmpty(t)){return r.inverse(this)}else{return r.fn(this)}}));t.registerHelper("unless",(function(r,o){if(arguments.length!=2){throw new c["default"]("#unless requires exactly one argument")}return t.helpers["if"].call(this,r,{fn:o.inverse,inverse:o.fn,hash:o.hash})}))};t.exports=r["default"]},64969:(t,r)=>{r.__esModule=true;r["default"]=function(t){t.registerHelper("log",(function(){var r=[undefined],o=arguments[arguments.length-1];for(var i=0;i{r.__esModule=true;r["default"]=function(t){t.registerHelper("lookup",(function(t,r,o){if(!t){return t}return o.lookupProperty(t,r)}))};t.exports=r["default"]},41691:(t,r,o)=>{r.__esModule=true;function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var i=o(68272);var a=o(89252);var c=_interopRequireDefault(a);r["default"]=function(t){t.registerHelper("with",(function(t,r){if(arguments.length!=2){throw new c["default"]("#with requires exactly one argument")}if(i.isFunction(t)){t=t.call(this)}var o=r.fn;if(!i.isEmpty(t)){var a=r.data;if(r.data&&r.ids){a=i.createFrame(r.data);a.contextPath=i.appendContextPath(r.data.contextPath,r.ids[0])}return o(t,{data:a,blockParams:i.blockParams([t],[a&&a.contextPath])})}else{return r.inverse(this)}}))};t.exports=r["default"]},91939:(t,r,o)=>{r.__esModule=true;r.createNewLookupObject=createNewLookupObject;var i=o(68272);function createNewLookupObject(){for(var t=arguments.length,r=Array(t),o=0;o{r.__esModule=true;r.createProtoAccessControl=createProtoAccessControl;r.resultIsAllowed=resultIsAllowed;r.resetLoggedProperties=resetLoggedProperties;function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var i=o(91939);var a=o(28525);var c=_interopRequireDefault(a);var p=Object.create(null);function createProtoAccessControl(t){var r=Object.create(null);r["constructor"]=false;r["__defineGetter__"]=false;r["__defineSetter__"]=false;r["__lookupGetter__"]=false;var o=Object.create(null);o["__proto__"]=false;return{properties:{whitelist:i.createNewLookupObject(o,t.allowedProtoProperties),defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:i.createNewLookupObject(r,t.allowedProtoMethods),defaultValue:t.allowProtoMethodsByDefault}}}function resultIsAllowed(t,r,o){if(typeof t==="function"){return checkWhiteList(r.methods,o)}else{return checkWhiteList(r.properties,o)}}function checkWhiteList(t,r){if(t.whitelist[r]!==undefined){return t.whitelist[r]===true}if(t.defaultValue!==undefined){return t.defaultValue}logUnexpecedPropertyAccessOnce(r);return false}function logUnexpecedPropertyAccessOnce(t){if(p[t]!==true){p[t]=true;c["default"].log("error",'Handlebars: Access has been denied to resolve the property "'+t+'" because it is not an "own property" of its parent.\n'+"You can add a runtime option to disable the check or this warning:\n"+"See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details")}}function resetLoggedProperties(){Object.keys(p).forEach((function(t){delete p[t]}))}},71975:(t,r)=>{r.__esModule=true;r.wrapHelper=wrapHelper;function wrapHelper(t,r){if(typeof t!=="function"){return t}var o=function wrapper(){var o=arguments[arguments.length-1];arguments[arguments.length-1]=r(o);return t.apply(this,arguments)};return o}},28525:(t,r,o)=>{r.__esModule=true;var i=o(68272);var a={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function lookupLevel(t){if(typeof t==="string"){var r=i.indexOf(a.methodMap,t.toLowerCase());if(r>=0){t=r}else{t=parseInt(t,10)}}return t},log:function log(t){t=a.lookupLevel(t);if(typeof console!=="undefined"&&a.lookupLevel(a.level)<=t){var r=a.methodMap[t];if(!console[r]){r="log"}for(var o=arguments.length,i=Array(o>1?o-1:0),c=1;c