@activepieces/piece-google-calendar 0.10.2 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +90 -52
package/src/index.js
CHANGED
|
@@ -1,72 +1,110 @@
|
|
|
1
|
-
"use strict";var BI=Object.create;var Li=Object.defineProperty;var VI=Object.getOwnPropertyDescriptor;var GI=Object.getOwnPropertyNames;var HI=Object.getPrototypeOf,WI=Object.prototype.hasOwnProperty;var o=(t,e)=>Li(t,"name",{value:e,configurable:!0});var Tt=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var D=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},Is=(t,e)=>{for(var r in e)Li(t,r,{get:e[r],enumerable:!0})},dg=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of GI(e))!WI.call(t,i)&&i!==r&&Li(t,i,{get:()=>e[i],enumerable:!(n=VI(e,i))||n.enumerable});return t};var qe=(t,e,r)=>(r=t!=null?BI(HI(t)):{},dg(e||!t||!t.__esModule?Li(r,"default",{value:t,enumerable:!0}):r,t)),ZI=t=>dg(Li({},"__esModule",{value:!0}),t);var Dy=D(($y,Ks)=>{(function(t){"use strict";let e="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${e}\\.${e}\\.${e}\\.${e}$`,"i"),threeOctet:new RegExp(`^${e}\\.${e}\\.${e}$`,"i"),twoOctet:new RegExp(`^${e}\\.${e}$`,"i"),longValue:new RegExp(`^${e}$`,"i")},n=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),s="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",d={zoneIndex:new RegExp(s,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${s})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${e}\\.${e}\\.${e}\\.${e}(${s})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${e}\\.${e}\\.${e}\\.${e}(${s})?$`,"i")};function p(l,g){if(l.indexOf("::")!==l.lastIndexOf("::"))return null;let v=0,E=-1,b=(l.match(d.zoneIndex)||[])[0],C,U;for(b&&(b=b.substring(1),l=l.replace(/%.+$/,""));(E=l.indexOf(":",E+1))>=0;)v++;if(l.substr(0,2)==="::"&&v--,l.substr(-2,2)==="::"&&v--,v>g)return null;for(U=g-v,C=":";U--;)C+="0:";return l=l.replace("::",C),l[0]===":"&&(l=l.slice(1)),l[l.length-1]===":"&&(l=l.slice(0,-1)),g=(function(){let J=l.split(":"),Z=[];for(let H=0;H<J.length;H++)Z.push(parseInt(J[H],16));return Z})(),{parts:g,zoneId:b}}o(p,"expandIPv6");function m(l,g,v,E){if(l.length!==g.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let b=0,C;for(;E>0;){if(C=v-E,C<0&&(C=0),l[b]>>C!==g[b]>>C)return!1;E-=v,b+=1}return!0}o(m,"matchCIDR");function y(l){if(i.test(l))return parseInt(l,16);if(l[0]==="0"&&!isNaN(parseInt(l[1],10))){if(n.test(l))return parseInt(l,8);throw new Error(`ipaddr: cannot parse ${l} as octal`)}return parseInt(l,10)}o(y,"parseIntAuto");function h(l,g){for(;l.length<g;)l=`0${l}`;return l}o(h,"padPart");let f={};f.IPv4=(function(){function l(g){if(g.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let v,E;for(v=0;v<g.length;v++)if(E=g[v],!(0<=E&&E<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=g}return o(l,"IPv4"),l.prototype.SpecialRanges={unspecified:[[new l([0,0,0,0]),8]],broadcast:[[new l([255,255,255,255]),32]],multicast:[[new l([224,0,0,0]),4]],linkLocal:[[new l([169,254,0,0]),16]],loopback:[[new l([127,0,0,0]),8]],carrierGradeNat:[[new l([100,64,0,0]),10]],private:[[new l([10,0,0,0]),8],[new l([172,16,0,0]),12],[new l([192,168,0,0]),16]],reserved:[[new l([192,0,0,0]),24],[new l([192,0,2,0]),24],[new l([192,88,99,0]),24],[new l([198,18,0,0]),15],[new l([198,51,100,0]),24],[new l([203,0,113,0]),24],[new l([240,0,0,0]),4]],as112:[[new l([192,175,48,0]),24],[new l([192,31,196,0]),24]],amt:[[new l([192,52,193,0]),24]]},l.prototype.kind=function(){return"ipv4"},l.prototype.match=function(g,v){let E;if(v===void 0&&(E=g,g=E[0],v=E[1]),g.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return m(this.octets,g.octets,8,v)},l.prototype.prefixLengthFromSubnetMask=function(){let g=0,v=!1,E={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},b,C,U;for(b=3;b>=0;b-=1)if(C=this.octets[b],C in E){if(U=E[C],v&&U!==0)return null;U!==8&&(v=!0),g+=U}else return null;return 32-g},l.prototype.range=function(){return f.subnetMatch(this,this.SpecialRanges)},l.prototype.toByteArray=function(){return this.octets.slice(0)},l.prototype.toIPv4MappedAddress=function(){return f.IPv6.parse(`::ffff:${this.toString()}`)},l.prototype.toNormalizedString=function(){return this.toString()},l.prototype.toString=function(){return this.octets.join(".")},l})(),f.IPv4.broadcastAddressFromCIDR=function(l){try{let g=this.parseCIDR(l),v=g[0].toByteArray(),E=this.subnetMaskFromPrefixLength(g[1]).toByteArray(),b=[],C=0;for(;C<4;)b.push(parseInt(v[C],10)|parseInt(E[C],10)^255),C++;return new this(b)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},f.IPv4.isIPv4=function(l){return this.parser(l)!==null},f.IPv4.isValid=function(l){try{return new this(this.parser(l)),!0}catch{return!1}},f.IPv4.isValidCIDR=function(l){try{return this.parseCIDR(l),!0}catch{return!1}},f.IPv4.isValidFourPartDecimal=function(l){return!!(f.IPv4.isValid(l)&&l.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},f.IPv4.isValidCIDRFourPartDecimal=function(l){let g=l.match(/^(.+)\/(\d+)$/);return!f.IPv4.isValidCIDR(l)||!g?!1:f.IPv4.isValidFourPartDecimal(g[1])},f.IPv4.networkAddressFromCIDR=function(l){let g,v,E,b,C;try{for(g=this.parseCIDR(l),E=g[0].toByteArray(),C=this.subnetMaskFromPrefixLength(g[1]).toByteArray(),b=[],v=0;v<4;)b.push(parseInt(E[v],10)&parseInt(C[v],10)),v++;return new this(b)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},f.IPv4.parse=function(l){let g=this.parser(l);if(g===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(g)},f.IPv4.parseCIDR=function(l){let g;if(g=l.match(/^(.+)\/(\d+)$/)){let v=parseInt(g[2]);if(v>=0&&v<=32){let E=[this.parse(g[1]),v];return Object.defineProperty(E,"toString",{value:o(function(){return this.join("/")},"value")}),E}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},f.IPv4.parser=function(l){let g,v,E;if(g=l.match(r.fourOctet))return(function(){let b=g.slice(1,6),C=[];for(let U=0;U<b.length;U++)v=b[U],C.push(y(v));return C})();if(g=l.match(r.longValue)){if(E=y(g[1]),E>4294967295||E<0)throw new Error("ipaddr: address outside defined range");return(function(){let b=[],C;for(C=0;C<=24;C+=8)b.push(E>>C&255);return b})().reverse()}else return(g=l.match(r.twoOctet))?(function(){let b=g.slice(1,4),C=[];if(E=y(b[1]),E>16777215||E<0)throw new Error("ipaddr: address outside defined range");return C.push(y(b[0])),C.push(E>>16&255),C.push(E>>8&255),C.push(E&255),C})():(g=l.match(r.threeOctet))?(function(){let b=g.slice(1,5),C=[];if(E=y(b[2]),E>65535||E<0)throw new Error("ipaddr: address outside defined range");return C.push(y(b[0])),C.push(y(b[1])),C.push(E>>8&255),C.push(E&255),C})():null},f.IPv4.subnetMaskFromPrefixLength=function(l){if(l=parseInt(l),l<0||l>32)throw new Error("ipaddr: invalid IPv4 prefix length");let g=[0,0,0,0],v=0,E=Math.floor(l/8);for(;v<E;)g[v]=255,v++;return E<4&&(g[E]=Math.pow(2,l%8)-1<<8-l%8),new this(g)},f.IPv6=(function(){function l(g,v){let E,b;if(g.length===16)for(this.parts=[],E=0;E<=14;E+=2)this.parts.push(g[E]<<8|g[E+1]);else if(g.length===8)this.parts=g;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(E=0;E<this.parts.length;E++)if(b=this.parts[E],!(0<=b&&b<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");v&&(this.zoneId=v)}return o(l,"IPv6"),l.prototype.SpecialRanges={unspecified:[new l([0,0,0,0,0,0,0,0]),128],linkLocal:[new l([65152,0,0,0,0,0,0,0]),10],multicast:[new l([65280,0,0,0,0,0,0,0]),8],loopback:[new l([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new l([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new l([0,0,0,0,0,65535,0,0]),96],discard:[new l([256,0,0,0,0,0,0,0]),64],rfc6145:[new l([0,0,0,0,65535,0,0,0]),96],rfc6052:[new l([100,65435,0,0,0,0,0,0]),96],"6to4":[new l([8194,0,0,0,0,0,0,0]),16],teredo:[new l([8193,0,0,0,0,0,0,0]),32],benchmarking:[new l([8193,2,0,0,0,0,0,0]),48],amt:[new l([8193,3,0,0,0,0,0,0]),32],as112v6:[[new l([8193,4,274,0,0,0,0,0]),48],[new l([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new l([8193,16,0,0,0,0,0,0]),28],orchid2:[new l([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new l([8193,48,0,0,0,0,0,0]),28],reserved:[[new l([8193,0,0,0,0,0,0,0]),23],[new l([8193,3512,0,0,0,0,0,0]),32]]},l.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},l.prototype.kind=function(){return"ipv6"},l.prototype.match=function(g,v){let E;if(v===void 0&&(E=g,g=E[0],v=E[1]),g.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return m(this.parts,g.parts,16,v)},l.prototype.prefixLengthFromSubnetMask=function(){let g=0,v=!1,E={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},b,C;for(let U=7;U>=0;U-=1)if(b=this.parts[U],b in E){if(C=E[b],v&&C!==0)return null;C!==16&&(v=!0),g+=C}else return null;return 128-g},l.prototype.range=function(){return f.subnetMatch(this,this.SpecialRanges)},l.prototype.toByteArray=function(){let g,v=[],E=this.parts;for(let b=0;b<E.length;b++)g=E[b],v.push(g>>8),v.push(g&255);return v},l.prototype.toFixedLengthString=function(){let g=(function(){let E=[];for(let b=0;b<this.parts.length;b++)E.push(h(this.parts[b].toString(16),4));return E}).call(this).join(":"),v="";return this.zoneId&&(v=`%${this.zoneId}`),g+v},l.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let g=this.parts.slice(-2),v=g[0],E=g[1];return new f.IPv4([v>>8,v&255,E>>8,E&255])},l.prototype.toNormalizedString=function(){let g=(function(){let E=[];for(let b=0;b<this.parts.length;b++)E.push(this.parts[b].toString(16));return E}).call(this).join(":"),v="";return this.zoneId&&(v=`%${this.zoneId}`),g+v},l.prototype.toRFC5952String=function(){let g=/((^|:)(0(:|$)){2,})/g,v=this.toNormalizedString(),E=0,b=-1,C;for(;C=g.exec(v);)C[0].length>b&&(E=C.index,b=C[0].length);return b<0?v:`${v.substring(0,E)}::${v.substring(E+b)}`},l.prototype.toString=function(){return this.toRFC5952String()},l})(),f.IPv6.broadcastAddressFromCIDR=function(l){try{let g=this.parseCIDR(l),v=g[0].toByteArray(),E=this.subnetMaskFromPrefixLength(g[1]).toByteArray(),b=[],C=0;for(;C<16;)b.push(parseInt(v[C],10)|parseInt(E[C],10)^255),C++;return new this(b)}catch(g){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${g})`)}},f.IPv6.isIPv6=function(l){return this.parser(l)!==null},f.IPv6.isValid=function(l){if(typeof l=="string"&&l.indexOf(":")===-1)return!1;try{let g=this.parser(l);return new this(g.parts,g.zoneId),!0}catch{return!1}},f.IPv6.isValidCIDR=function(l){if(typeof l=="string"&&l.indexOf(":")===-1)return!1;try{return this.parseCIDR(l),!0}catch{return!1}},f.IPv6.networkAddressFromCIDR=function(l){let g,v,E,b,C;try{for(g=this.parseCIDR(l),E=g[0].toByteArray(),C=this.subnetMaskFromPrefixLength(g[1]).toByteArray(),b=[],v=0;v<16;)b.push(parseInt(E[v],10)&parseInt(C[v],10)),v++;return new this(b)}catch(U){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${U})`)}},f.IPv6.parse=function(l){let g=this.parser(l);if(g.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(g.parts,g.zoneId)},f.IPv6.parseCIDR=function(l){let g,v,E;if((v=l.match(/^(.+)\/(\d+)$/))&&(g=parseInt(v[2]),g>=0&&g<=128))return E=[this.parse(v[1]),g],Object.defineProperty(E,"toString",{value:o(function(){return this.join("/")},"value")}),E;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},f.IPv6.parser=function(l){let g,v,E,b,C,U;if(E=l.match(d.deprecatedTransitional))return this.parser(`::ffff:${E[1]}`);if(d.native.test(l))return p(l,8);if((E=l.match(d.transitional))&&(U=E[6]||"",g=E[1],E[1].endsWith("::")||(g=g.slice(0,-1)),g=p(g+U,6),g.parts)){for(C=[parseInt(E[2]),parseInt(E[3]),parseInt(E[4]),parseInt(E[5])],v=0;v<C.length;v++)if(b=C[v],!(0<=b&&b<=255))return null;return g.parts.push(C[0]<<8|C[1]),g.parts.push(C[2]<<8|C[3]),{parts:g.parts,zoneId:g.zoneId}}return null},f.IPv6.subnetMaskFromPrefixLength=function(l){if(l=parseInt(l),l<0||l>128)throw new Error("ipaddr: invalid IPv6 prefix length");let g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],v=0,E=Math.floor(l/8);for(;v<E;)g[v]=255,v++;return E<16&&(g[E]=Math.pow(2,l%8)-1<<8-l%8),new this(g)},f.fromByteArray=function(l){let g=l.length;if(g===4)return new f.IPv4(l);if(g===16)return new f.IPv6(l);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},f.isValid=function(l){return f.IPv6.isValid(l)||f.IPv4.isValid(l)},f.isValidCIDR=function(l){return f.IPv6.isValidCIDR(l)||f.IPv4.isValidCIDR(l)},f.parse=function(l){if(f.IPv6.isValid(l))return f.IPv6.parse(l);if(f.IPv4.isValid(l))return f.IPv4.parse(l);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},f.parseCIDR=function(l){try{return f.IPv6.parseCIDR(l)}catch{try{return f.IPv4.parseCIDR(l)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},f.process=function(l){let g=this.parse(l);return g.kind()==="ipv6"&&g.isIPv4MappedAddress()?g.toIPv4Address():g},f.subnetMatch=function(l,g,v){let E,b,C,U;v==null&&(v="unicast");for(b in g)if(Object.prototype.hasOwnProperty.call(g,b)){for(C=g[b],C[0]&&!(C[0]instanceof Array)&&(C=[C]),E=0;E<C.length;E++)if(U=C[E],l.kind()===U[0].kind()&&l.match.apply(l,U))return b}return v},typeof Ks<"u"&&Ks.exports?Ks.exports=f:t.ipaddr=f})($y)});var Nv=D((aJ,Dv)=>{var $v=require("stream").Stream,O0=require("util");Dv.exports=Ar;function Ar(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(Ar,"DelayedStream");O0.inherits(Ar,$v);Ar.create=function(t,e){var r=new this;e=e||{};for(var n in e)r[n]=e[n];r.source=t;var i=t.emit;return t.emit=function(){return r._handleEmit(arguments),i.apply(t,arguments)},t.on("error",function(){}),r.pauseStream&&t.pause(),r};Object.defineProperty(Ar.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});Ar.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Ar.prototype.resume=function(){this._released||this.release(),this.source.resume()};Ar.prototype.pause=function(){this.source.pause()};Ar.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(t){this.emit.apply(this,t)}.bind(this)),this._bufferedEvents=[]};Ar.prototype.pipe=function(){var t=$v.prototype.pipe.apply(this,arguments);return this.resume(),t};Ar.prototype._handleEmit=function(t){if(this._released){this.emit.apply(this,t);return}t[0]==="data"&&(this.dataSize+=t[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(t)};Ar.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(t))}}});var Lv=D((uJ,Mv)=>{var k0=require("util"),Uv=require("stream").Stream,zv=Nv();Mv.exports=ft;function ft(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}o(ft,"CombinedStream");k0.inherits(ft,Uv);ft.create=function(t){var e=new this;t=t||{};for(var r in t)e[r]=t[r];return e};ft.isStreamLike=function(t){return typeof t!="function"&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"&&!Buffer.isBuffer(t)};ft.prototype.append=function(t){var e=ft.isStreamLike(t);if(e){if(!(t instanceof zv)){var r=zv.create(t,{maxDataSize:1/0,pauseStream:this.pauseStreams});t.on("data",this._checkDataSize.bind(this)),t=r}this._handleErrors(t),this.pauseStreams&&t.pause()}return this._streams.push(t),this};ft.prototype.pipe=function(t,e){return Uv.prototype.pipe.call(this,t,e),this.resume(),t};ft.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};ft.prototype._realGetNext=function(){var t=this._streams.shift();if(typeof t>"u"){this.end();return}if(typeof t!="function"){this._pipeNext(t);return}var e=t;e(function(r){var n=ft.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};ft.prototype._pipeNext=function(t){this._currentStream=t;var e=ft.isStreamLike(t);if(e){t.on("end",this._getNext.bind(this)),t.pipe(this,{end:!1});return}var r=t;this.write(r),this._getNext()};ft.prototype._handleErrors=function(t){var e=this;t.on("error",function(r){e._emitError(r)})};ft.prototype.write=function(t){this.emit("data",t)};ft.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};ft.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};ft.prototype.end=function(){this._reset(),this.emit("end")};ft.prototype.destroy=function(){this._reset(),this.emit("close")};ft.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};ft.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(t))}};ft.prototype._updateDataSize=function(){this.dataSize=0;var t=this;this._streams.forEach(function(e){e.dataSize&&(t.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};ft.prototype._emitError=function(t){this._reset(),this.emit("error",t)}});var Fv=D((lJ,jv)=>{"use strict";jv.exports={"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dat"]},"application/msword":{source:"iana",extensions:["doc"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",extensions:["docx"]},"application/vnd.ms-excel":{source:"iana",extensions:["xls"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",extensions:["xlsx"]},"application/vnd.ms-powerpoint":{source:"iana",extensions:["ppt"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",extensions:["pptx"]},"application/csv":{compressible:!0,extensions:["csv"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"text/plain":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["txt","text","log"]},"text/html":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["html","htm"]},"text/css":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["css"]},"text/csv":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["csv"]},"text/markdown":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["md","markdown"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/webp":{source:"apache",compressible:!1,extensions:["webp"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/heic":{source:"iana",compressible:!1,extensions:["heic"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mp3","mpga"]},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/ogg":{source:"iana",compressible:!1,extensions:["ogg","oga"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","m4v"]},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg"]},"video/webm":{source:"iana",compressible:!1,extensions:["webm"]},"video/quicktime":{source:"iana",compressible:!1,extensions:["mov","qt"]},"video/x-msvideo":{source:"iana",compressible:!1,extensions:["avi"]},"font/woff":{source:"iana",compressible:!1,extensions:["woff"]},"font/woff2":{source:"iana",compressible:!1,extensions:["woff2"]},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"multipart/form-data":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/ics":{compressible:!0,extensions:["ics"]},"text/calendar":{source:"iana",compressible:!0,extensions:["ics","ifb"]},"application/x-ndjson":{compressible:!0,extensions:["ndjson"]}}});var Vv=D(Ft=>{"use strict";var tu=Fv(),$0=require("path").extname,qv=/^\s*([^;\s]*)(?:;|\s|$)/,D0=/^text\//i;Ft.charset=Bv;Ft.charsets={lookup:Bv};Ft.contentType=N0;Ft.extension=z0;Ft.extensions=Object.create(null);Ft.lookup=U0;Ft.types=Object.create(null);M0(Ft.extensions,Ft.types);function Bv(t){if(!t||typeof t!="string")return!1;var e=qv.exec(t),r=e&&tu[e[1].toLowerCase()];return r&&r.charset?r.charset:e&&D0.test(e[1])?"UTF-8":!1}o(Bv,"charset");function N0(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?Ft.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var r=Ft.charset(e);r&&(e+="; charset="+r.toLowerCase())}return e}o(N0,"contentType");function z0(t){if(!t||typeof t!="string")return!1;var e=qv.exec(t),r=e&&Ft.extensions[e[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(z0,"extension");function U0(t){if(!t||typeof t!="string")return!1;var e=$0("x."+t).toLowerCase().substr(1);return e&&Ft.types[e]||!1}o(U0,"lookup");function M0(t,e){var r=["nginx","apache",void 0,"iana"];Object.keys(tu).forEach(o(function(i){var s=tu[i],c=s.extensions;if(!(!c||!c.length)){t[i]=c;for(var d=0;d<c.length;d++){var p=c[d];if(e[p]){var m=r.indexOf(tu[e[p]].source),y=r.indexOf(s.source);if(e[p]!=="application/octet-stream"&&(m>y||m===y&&e[p].substr(0,12)==="application/"))continue}e[p]=i}}},"forEachMimeType"))}o(M0,"populateMaps")});var Hv=D((fJ,Gv)=>{Gv.exports=L0;function L0(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}o(L0,"defer")});var md=D((hJ,Zv)=>{var Wv=Hv();Zv.exports=j0;function j0(t){var e=!1;return Wv(function(){e=!0}),o(function(n,i){e?t(n,i):Wv(o(function(){t(n,i)},"nextTick_callback"))},"async_callback")}o(j0,"async")});var hd=D((yJ,Kv)=>{Kv.exports=F0;function F0(t){Object.keys(t.jobs).forEach(q0.bind(t)),t.jobs={}}o(F0,"abort");function q0(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}o(q0,"clean")});var gd=D((_J,Yv)=>{var Jv=md(),B0=hd();Yv.exports=V0;function V0(t,e,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=G0(e,i,t[i],function(s,c){i in r.jobs&&(delete r.jobs[i],s?B0(r):r.results[i]=c,n(s,r.results))})}o(V0,"iterate");function G0(t,e,r,n){var i;return t.length==2?i=t(r,Jv(n)):i=t(r,e,Jv(n)),i}o(G0,"runJob")});var yd=D((EJ,Xv)=>{Xv.exports=H0;function H0(t,e){var r=!Array.isArray(t),n={index:0,keyedList:r||e?Object.keys(t):null,jobs:{},results:r?{}:[],size:r?Object.keys(t).length:t.length};return e&&n.keyedList.sort(r?e:function(i,s){return e(t[i],t[s])}),n}o(H0,"state")});var vd=D((wJ,Qv)=>{var W0=hd(),Z0=md();Qv.exports=K0;function K0(t){Object.keys(this.jobs).length&&(this.index=this.size,W0(this),Z0(t)(null,this.results))}o(K0,"terminator")});var t_=D((PJ,e_)=>{var J0=gd(),Y0=yd(),X0=vd();e_.exports=Q0;function Q0(t,e,r){for(var n=Y0(t);n.index<(n.keyedList||t).length;)J0(t,e,n,function(i,s){if(i){r(i,s);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return X0.bind(n,r)}o(Q0,"parallel")});var _d=D((AJ,ru)=>{var r_=gd(),eO=yd(),tO=vd();ru.exports=rO;ru.exports.ascending=n_;ru.exports.descending=nO;function rO(t,e,r,n){var i=eO(t,r);return r_(t,e,i,o(function s(c,d){if(c){n(c,d);return}if(i.index++,i.index<(i.keyedList||t).length){r_(t,e,i,s);return}n(null,i.results)},"iteratorHandler")),tO.bind(i,n)}o(rO,"serialOrdered");function n_(t,e){return t<e?-1:t>e?1:0}o(n_,"ascending");function nO(t,e){return-1*n_(t,e)}o(nO,"descending")});var i_=D((RJ,o_)=>{var oO=_d();o_.exports=iO;function iO(t,e,r){return oO(t,e,null,r)}o(iO,"serial")});var s_=D((OJ,a_)=>{a_.exports={parallel:t_(),serial:i_(),serialOrdered:_d()}});var bd=D((kJ,u_)=>{"use strict";u_.exports=Object});var l_=D(($J,c_)=>{"use strict";c_.exports=Error});var p_=D((DJ,d_)=>{"use strict";d_.exports=EvalError});var m_=D((NJ,f_)=>{"use strict";f_.exports=RangeError});var g_=D((zJ,h_)=>{"use strict";h_.exports=ReferenceError});var v_=D((UJ,y_)=>{"use strict";y_.exports=SyntaxError});var Bn=D((MJ,__)=>{"use strict";__.exports=TypeError});var E_=D((LJ,b_)=>{"use strict";b_.exports=URIError});var w_=D((jJ,S_)=>{"use strict";S_.exports=Math.abs});var P_=D((FJ,T_)=>{"use strict";T_.exports=Math.floor});var A_=D((qJ,x_)=>{"use strict";x_.exports=Math.max});var R_=D((BJ,I_)=>{"use strict";I_.exports=Math.min});var O_=D((VJ,C_)=>{"use strict";C_.exports=Math.pow});var $_=D((GJ,k_)=>{"use strict";k_.exports=Math.round});var N_=D((HJ,D_)=>{"use strict";D_.exports=Number.isNaN||o(function(e){return e!==e},"isNaN")});var U_=D((ZJ,z_)=>{"use strict";var aO=N_();z_.exports=o(function(e){return aO(e)||e===0?e:e<0?-1:1},"sign")});var L_=D((JJ,M_)=>{"use strict";M_.exports=Object.getOwnPropertyDescriptor});var Ed=D((YJ,j_)=>{"use strict";var nu=L_();if(nu)try{nu([],"length")}catch{nu=null}j_.exports=nu});var q_=D((XJ,F_)=>{"use strict";var ou=Object.defineProperty||!1;if(ou)try{ou({},"a",{value:1})}catch{ou=!1}F_.exports=ou});var Sd=D((QJ,B_)=>{"use strict";B_.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(var s in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var c=Object.getOwnPropertySymbols(e);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var d=Object.getOwnPropertyDescriptor(e,r);if(d.value!==i||d.enumerable!==!0)return!1}return!0},"hasSymbols")});var H_=D((t5,G_)=>{"use strict";var V_=typeof Symbol<"u"&&Symbol,sO=Sd();G_.exports=o(function(){return typeof V_!="function"||typeof Symbol!="function"||typeof V_("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:sO()},"hasNativeSymbols")});var wd=D((n5,W_)=>{"use strict";W_.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Td=D((o5,Z_)=>{"use strict";var uO=bd();Z_.exports=uO.getPrototypeOf||null});var Y_=D((i5,J_)=>{"use strict";var cO="Function.prototype.bind called on incompatible ",lO=Object.prototype.toString,dO=Math.max,pO="[object Function]",K_=o(function(e,r){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var s=0;s<r.length;s+=1)n[s+e.length]=r[s];return n},"concatty"),fO=o(function(e,r){for(var n=[],i=r||0,s=0;i<e.length;i+=1,s+=1)n[s]=e[i];return n},"slicy"),mO=o(function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r},"joiny");J_.exports=o(function(e){var r=this;if(typeof r!="function"||lO.apply(r)!==pO)throw new TypeError(cO+r);for(var n=fO(arguments,1),i,s=o(function(){if(this instanceof i){var y=r.apply(this,K_(n,arguments));return Object(y)===y?y:this}return r.apply(e,K_(n,arguments))},"binder"),c=dO(0,r.length-n.length),d=[],p=0;p<c;p++)d[p]="$"+p;if(i=Function("binder","return function ("+mO(d,",")+"){ return binder.apply(this,arguments); }")(s),r.prototype){var m=o(function(){},"Empty");m.prototype=r.prototype,i.prototype=new m,m.prototype=null}return i},"bind")});var Jo=D((s5,X_)=>{"use strict";var hO=Y_();X_.exports=Function.prototype.bind||hO});var iu=D((u5,Q_)=>{"use strict";Q_.exports=Function.prototype.call});var Pd=D((c5,eb)=>{"use strict";eb.exports=Function.prototype.apply});var rb=D((l5,tb)=>{"use strict";tb.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var ob=D((d5,nb)=>{"use strict";var gO=Jo(),yO=Pd(),vO=iu(),_O=rb();nb.exports=_O||gO.call(vO,yO)});var xd=D((p5,ib)=>{"use strict";var bO=Jo(),EO=Bn(),SO=iu(),wO=ob();ib.exports=o(function(e){if(e.length<1||typeof e[0]!="function")throw new EO("a function is required");return wO(bO,SO,e)},"callBindBasic")});var db=D((m5,lb)=>{"use strict";var TO=xd(),ab=Ed(),ub;try{ub=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var Ad=!!ub&&ab&&ab(Object.prototype,"__proto__"),cb=Object,sb=cb.getPrototypeOf;lb.exports=Ad&&typeof Ad.get=="function"?TO([Ad.get]):typeof sb=="function"?o(function(e){return sb(e==null?e:cb(e))},"getDunder"):!1});var gb=D((g5,hb)=>{"use strict";var pb=wd(),fb=Td(),mb=db();hb.exports=pb?o(function(e){return pb(e)},"getProto"):fb?o(function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return fb(e)},"getProto"):mb?o(function(e){return mb(e)},"getProto"):null});var Id=D((v5,yb)=>{"use strict";var PO=Function.prototype.call,xO=Object.prototype.hasOwnProperty,AO=Jo();yb.exports=AO.call(PO,xO)});var la=D((_5,wb)=>{"use strict";var Me,IO=bd(),RO=l_(),CO=p_(),OO=m_(),kO=g_(),ei=v_(),Qo=Bn(),$O=E_(),DO=w_(),NO=P_(),zO=A_(),UO=R_(),MO=O_(),LO=$_(),jO=U_(),Eb=Function,Rd=o(function(t){try{return Eb('"use strict"; return ('+t+").constructor;")()}catch{}},"getEvalledConstructor"),sa=Ed(),FO=q_(),Cd=o(function(){throw new Qo},"throwTypeError"),qO=sa?(function(){try{return arguments.callee,Cd}catch{try{return sa(arguments,"callee").get}catch{return Cd}}})():Cd,Yo=H_()(),Pt=gb(),BO=Td(),VO=wd(),Sb=Pd(),ua=iu(),Xo={},GO=typeof Uint8Array>"u"||!Pt?Me:Pt(Uint8Array),fo={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Me:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Me:ArrayBuffer,"%ArrayIteratorPrototype%":Yo&&Pt?Pt([][Symbol.iterator]()):Me,"%AsyncFromSyncIteratorPrototype%":Me,"%AsyncFunction%":Xo,"%AsyncGenerator%":Xo,"%AsyncGeneratorFunction%":Xo,"%AsyncIteratorPrototype%":Xo,"%Atomics%":typeof Atomics>"u"?Me:Atomics,"%BigInt%":typeof BigInt>"u"?Me:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Me:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Me:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Me:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":RO,"%eval%":eval,"%EvalError%":CO,"%Float16Array%":typeof Float16Array>"u"?Me:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Me:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Me:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Me:FinalizationRegistry,"%Function%":Eb,"%GeneratorFunction%":Xo,"%Int8Array%":typeof Int8Array>"u"?Me:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Me:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Me:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Yo&&Pt?Pt(Pt([][Symbol.iterator]())):Me,"%JSON%":typeof JSON=="object"?JSON:Me,"%Map%":typeof Map>"u"?Me:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Yo||!Pt?Me:Pt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":IO,"%Object.getOwnPropertyDescriptor%":sa,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Me:Promise,"%Proxy%":typeof Proxy>"u"?Me:Proxy,"%RangeError%":OO,"%ReferenceError%":kO,"%Reflect%":typeof Reflect>"u"?Me:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Me:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Yo||!Pt?Me:Pt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Me:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Yo&&Pt?Pt(""[Symbol.iterator]()):Me,"%Symbol%":Yo?Symbol:Me,"%SyntaxError%":ei,"%ThrowTypeError%":qO,"%TypedArray%":GO,"%TypeError%":Qo,"%Uint8Array%":typeof Uint8Array>"u"?Me:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Me:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Me:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Me:Uint32Array,"%URIError%":$O,"%WeakMap%":typeof WeakMap>"u"?Me:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Me:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Me:WeakSet,"%Function.prototype.call%":ua,"%Function.prototype.apply%":Sb,"%Object.defineProperty%":FO,"%Object.getPrototypeOf%":BO,"%Math.abs%":DO,"%Math.floor%":NO,"%Math.max%":zO,"%Math.min%":UO,"%Math.pow%":MO,"%Math.round%":LO,"%Math.sign%":jO,"%Reflect.getPrototypeOf%":VO};if(Pt)try{null.error}catch(t){vb=Pt(Pt(t)),fo["%Error.prototype%"]=vb}var vb,HO=o(function t(e){var r;if(e==="%AsyncFunction%")r=Rd("async function () {}");else if(e==="%GeneratorFunction%")r=Rd("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Rd("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Pt&&(r=Pt(i.prototype))}return fo[e]=r,r},"doEval"),_b={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ca=Jo(),au=Id(),WO=ca.call(ua,Array.prototype.concat),ZO=ca.call(Sb,Array.prototype.splice),bb=ca.call(ua,String.prototype.replace),su=ca.call(ua,String.prototype.slice),KO=ca.call(ua,RegExp.prototype.exec),JO=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,YO=/\\(\\)?/g,XO=o(function(e){var r=su(e,0,1),n=su(e,-1);if(r==="%"&&n!=="%")throw new ei("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ei("invalid intrinsic syntax, expected opening `%`");var i=[];return bb(e,JO,function(s,c,d,p){i[i.length]=d?bb(p,YO,"$1"):c||s}),i},"stringToPath"),QO=o(function(e,r){var n=e,i;if(au(_b,n)&&(i=_b[n],n="%"+i[0]+"%"),au(fo,n)){var s=fo[n];if(s===Xo&&(s=HO(n)),typeof s>"u"&&!r)throw new Qo("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new ei("intrinsic "+e+" does not exist!")},"getBaseIntrinsic");wb.exports=o(function(e,r){if(typeof e!="string"||e.length===0)throw new Qo("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Qo('"allowMissing" argument must be a boolean');if(KO(/^%?[^%]*%?$/,e)===null)throw new ei("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=XO(e),i=n.length>0?n[0]:"",s=QO("%"+i+"%",r),c=s.name,d=s.value,p=!1,m=s.alias;m&&(i=m[0],ZO(n,WO([0,1],m)));for(var y=1,h=!0;y<n.length;y+=1){var f=n[y],l=su(f,0,1),g=su(f,-1);if((l==='"'||l==="'"||l==="`"||g==='"'||g==="'"||g==="`")&&l!==g)throw new ei("property names with quotes must have matching quotes");if((f==="constructor"||!h)&&(p=!0),i+="."+f,c="%"+i+"%",au(fo,c))d=fo[c];else if(d!=null){if(!(f in d)){if(!r)throw new Qo("base intrinsic for "+e+" exists, but the property is not available.");return}if(sa&&y+1>=n.length){var v=sa(d,f);h=!!v,h&&"get"in v&&!("originalValue"in v.get)?d=v.get:d=d[f]}else h=au(d,f),d=d[f];h&&!p&&(fo[c]=d)}}return d},"GetIntrinsic")});var Pb=D((E5,Tb)=>{"use strict";var ek=Sd();Tb.exports=o(function(){return ek()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Ib=D((w5,Ab)=>{"use strict";var tk=la(),xb=tk("%Object.defineProperty%",!0),rk=Pb()(),nk=Id(),ok=Bn(),uu=rk?Symbol.toStringTag:null;Ab.exports=o(function(e,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof i<"u"&&typeof i!="boolean")throw new ok("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");uu&&(n||!nk(e,uu))&&(xb?xb(e,uu,{configurable:!i,enumerable:!1,value:r,writable:!1}):e[uu]=r)},"setToStringTag")});var Cb=D((P5,Rb)=>{"use strict";var ik=Function.prototype.call,ak=Object.prototype.hasOwnProperty,sk=Jo();Rb.exports=sk.call(ik,ak)});var kb=D((x5,Ob)=>{"use strict";Ob.exports=function(t,e){return Object.keys(e).forEach(function(r){t[r]=t[r]||e[r]}),t}});var Nb=D((A5,Db)=>{"use strict";var Dd=Lv(),uk=require("util"),Od=require("path"),ck=require("http"),lk=require("https"),dk=require("url").parse,pk=require("fs"),fk=require("stream").Stream,mk=require("crypto"),kd=Vv(),hk=s_(),gk=Ib(),Vn=Cb(),$d=kb();function $b(t){return String(t).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o($b,"escapeHeaderParam");function Be(t){if(!(this instanceof Be))return new Be(t);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Dd.call(this),t=t||{};for(var e in t)this[e]=t[e]}o(Be,"FormData");uk.inherits(Be,Dd);Be.LINE_BREAK=`\r
|
|
2
|
-
`;Be.DEFAULT_CONTENT_TYPE="application/octet-stream";Be.prototype.append=function(t,e,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=Dd.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(t,e,r),s=this._multiPartFooter();n(i),n(e),n(s),this._trackLength(i,e,r)};Be.prototype._trackLength=function(t,e,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(e)?n=e.length:typeof e=="string"&&(n=Buffer.byteLength(e)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(t)+Be.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&Vn(e,"httpVersion"))&&!(e instanceof fk))&&(r.knownLength||this._valuesToMeasure.push(e))};Be.prototype._lengthRetriever=function(t,e){Vn(t,"fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):pk.stat(t.path,function(r,n){if(r){e(r);return}var i=n.size-(t.start?t.start:0);e(null,i)}):Vn(t,"httpVersion")?e(null,Number(t.headers["content-length"])):Vn(t,"httpModule")?(t.on("response",function(r){t.pause(),e(null,Number(r.headers["content-length"]))}),t.resume()):e("Unknown stream")};Be.prototype._multiPartHeader=function(t,e,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(e,r),i=this._getContentType(e,r),s="",c={"Content-Disposition":["form-data",'name="'+$b(t)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&$d(c,r.header);var d;for(var p in c)if(Vn(c,p)){if(d=c[p],d==null)continue;Array.isArray(d)||(d=[d]),d.length&&(s+=p+": "+d.join("; ")+Be.LINE_BREAK)}return"--"+this.getBoundary()+Be.LINE_BREAK+s+Be.LINE_BREAK};Be.prototype._getContentDisposition=function(t,e){var r;if(typeof e.filepath=="string"?r=Od.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?r=Od.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&Vn(t,"httpVersion")&&(r=Od.basename(t.client._httpMessage.path||"")),r)return'filename="'+$b(r)+'"'};Be.prototype._getContentType=function(t,e){var r=e.contentType;return!r&&t&&t.name&&(r=kd.lookup(t.name)),!r&&t&&t.path&&(r=kd.lookup(t.path)),!r&&t&&t.readable&&Vn(t,"httpVersion")&&(r=t.headers["content-type"]),!r&&(e.filepath||e.filename)&&(r=kd.lookup(e.filepath||e.filename)),!r&&t&&typeof t=="object"&&(r=Be.DEFAULT_CONTENT_TYPE),r};Be.prototype._multiPartFooter=function(){return function(t){var e=Be.LINE_BREAK,r=this._streams.length===0;r&&(e+=this._lastBoundary()),t(e)}.bind(this)};Be.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Be.LINE_BREAK};Be.prototype.getHeaders=function(t){var e,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)Vn(t,e)&&(r[e.toLowerCase()]=t[e]);return r};Be.prototype.setBoundary=function(t){if(typeof t!="string")throw new TypeError("FormData boundary must be a string");this._boundary=t};Be.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Be.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?t=Buffer.concat([t,this._streams[r]]):t=Buffer.concat([t,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(Be.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};Be.prototype._generateBoundary=function(){this._boundary="--------------------------"+mk.randomBytes(12).toString("hex")};Be.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};Be.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};Be.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}hk.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){t(r);return}n.forEach(function(i){e+=i}),t(null,e)})};Be.prototype.submit=function(t,e){var r,n,i={method:"post"};return typeof t=="string"?(t=dk(t),n=$d({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},i)):(n=$d(t,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(t.headers),n.protocol==="https:"?r=lk.request(n):r=ck.request(n),this.getLength(function(s,c){if(s&&s!=="Unknown stream"){this._error(s);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),e){var d,p=o(function(m,y){return r.removeListener("error",p),r.removeListener("response",d),e.call(this,m,y)},"callback");d=p.bind(this,null),r.on("error",p),r.on("response",d)}}.bind(this)),r};Be.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error",t))};Be.prototype.toString=function(){return"[object FormData]"};gk(Be.prototype,"FormData");Db.exports=Be});var pa=D((l9,Kb)=>{"use strict";var du=Object.prototype.hasOwnProperty,Zb=Object.prototype.toString,qb=Object.defineProperty,Bb=Object.getOwnPropertyDescriptor,Vb=o(function(e){return typeof Array.isArray=="function"?Array.isArray(e):Zb.call(e)==="[object Array]"},"isArray"),Gb=o(function(e){if(!e||Zb.call(e)!=="[object Object]")return!1;var r=du.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&du.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;var i;for(i in e);return typeof i>"u"||du.call(e,i)},"isPlainObject"),Hb=o(function(e,r){qb&&r.name==="__proto__"?qb(e,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):e[r.name]=r.newValue},"setProperty"),Wb=o(function(e,r){if(r==="__proto__")if(du.call(e,r)){if(Bb)return Bb(e,r).value}else return;return e[r]},"getProperty");Kb.exports=o(function t(){var e,r,n,i,s,c,d=arguments[0],p=1,m=arguments.length,y=!1;for(typeof d=="boolean"&&(y=d,d=arguments[1]||{},p=2),(d==null||typeof d!="object"&&typeof d!="function")&&(d={});p<m;++p)if(e=arguments[p],e!=null)for(r in e)n=Wb(d,r),i=Wb(e,r),d!==i&&(y&&i&&(Gb(i)||(s=Vb(i)))?(s?(s=!1,c=n&&Vb(n)?n:[]):c=n&&Gb(n)?n:{},Hb(d,{name:r,newValue:t(y,c,i)})):typeof i<"u"&&Hb(d,{name:r,newValue:i}));return d},"extend")});var Jb=D((p9,Pk)=>{Pk.exports={name:"gaxios",version:"7.1.3",description:"A simple common HTTP client specifically for Google APIs and services.",main:"build/cjs/src/index.js",types:"build/cjs/src/index.d.ts",files:["build/"],exports:{".":{import:{types:"./build/esm/src/index.d.ts",default:"./build/esm/src/index.js"},require:{types:"./build/cjs/src/index.d.ts",default:"./build/cjs/src/index.js"}}},scripts:{lint:"gts check --no-inline-config",test:"c8 mocha build/esm/test","presystem-test":"npm run compile","system-test":"mocha build/esm/system-test --timeout 80000",compile:"tsc -b ./tsconfig.json ./tsconfig.cjs.json && node utils/enable-esm.mjs",fix:"gts fix",prepare:"npm run compile",pretest:"npm run compile",webpack:"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js",docs:"jsdoc -c .jsdoc.js","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../",prelint:"cd samples; npm link ../; npm install",clean:"gts clean"},repository:{type:"git",directory:"packages/gaxios",url:"https://github.com/googleapis/google-cloud-node-core.git"},keywords:["google"],engines:{node:">=18"},author:"Google, LLC",license:"Apache-2.0",devDependencies:{"@babel/plugin-proposal-private-methods":"^7.18.6","@types/cors":"^2.8.6","@types/express":"^5.0.0","@types/extend":"^3.0.1","@types/mocha":"^10.0.10","@types/multiparty":"4.2.1","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^22.0.0","@types/sinon":"^17.0.0","@types/tmp":"0.2.6",assert:"^2.0.0",browserify:"^17.0.0",c8:"^10.0.0",cors:"^2.8.5",express:"^5.0.0",gts:"^6.0.0","is-docker":"^3.0.0",jsdoc:"^4.0.0","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1",linkinator:"^6.1.2",mocha:"^11.1.0",multiparty:"^4.2.1",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.0-beta.13","null-loader":"^4.0.0","pack-n-play":"^4.0.0",puppeteer:"^24.0.0",sinon:"^21.0.0","stream-browserify":"^3.0.0",tmp:"0.2.5","ts-loader":"^9.5.2",typescript:"^5.8.3",webpack:"^5.35.0","webpack-cli":"^6.0.1"},dependencies:{extend:"^3.0.2","https-proxy-agent":"^7.0.1","node-fetch":"^3.3.2",rimraf:"^5.0.1"},homepage:"https://github.com/googleapis/google-cloud-node-core/tree/main/packages/gaxios"}});var Xb=D((f9,Yb)=>{"use strict";var xk=Jb();Yb.exports={pkg:xk}});var Ld=D(fr=>{"use strict";var eE=fr&&fr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fr,"__esModule",{value:!0});fr.GaxiosError=fr.GAXIOS_ERROR_SYMBOL=void 0;fr.defaultErrorRedactor=tE;var Qb=eE(pa()),Ak=eE(Xb()),Ud=Ak.default.pkg;fr.GAXIOS_ERROR_SYMBOL=Symbol.for(`${Ud.name}-gaxios-error`);var Md=class t extends Error{static{o(this,"GaxiosError")}config;response;code;status;error;[fr.GAXIOS_ERROR_SYMBOL]=Ud.version;static[Symbol.hasInstance](e){return e&&typeof e=="object"&&fr.GAXIOS_ERROR_SYMBOL in e&&e[fr.GAXIOS_ERROR_SYMBOL]===Ud.version?!0:Function.prototype[Symbol.hasInstance].call(t,e)}constructor(e,r,n,i){if(super(e,{cause:i}),this.config=r,this.response=n,this.error=i instanceof Error?i:void 0,this.config=(0,Qb.default)(!0,{},r),this.response&&(this.response.config=(0,Qb.default)(!0,{},this.response.config)),this.response){try{this.response.data=Ik(this.config.responseType,this.response?.bodyUsed?this.response?.data:void 0)}catch{}this.status=this.response.status}i instanceof DOMException?this.code=i.name:i&&typeof i=="object"&&"code"in i&&(typeof i.code=="string"||typeof i.code=="number")&&(this.code=i.code)}static extractAPIErrorFromResponse(e,r="The request failed"){let n=r;if(typeof e.data=="string"&&(n=e.data),e.data&&typeof e.data=="object"&&"error"in e.data&&e.data.error&&!e.ok){if(typeof e.data.error=="string")return{message:e.data.error,code:e.status,status:e.statusText};if(typeof e.data.error=="object"){n="message"in e.data.error&&typeof e.data.error.message=="string"?e.data.error.message:n;let i="status"in e.data.error&&typeof e.data.error.status=="string"?e.data.error.status:e.statusText,s="code"in e.data.error&&typeof e.data.error.code=="number"?e.data.error.code:e.status;if("errors"in e.data.error&&Array.isArray(e.data.error.errors)){let c=[];for(let d of e.data.error.errors)typeof d=="object"&&"message"in d&&typeof d.message=="string"&&c.push(d.message);return Object.assign({message:c.join(`
|
|
3
|
-
`)||n,code:s,status:i},e.data.error)}return Object.assign({message:n,code:s,status:i},e.data.error)}}return{message:n,code:e.status,status:e.statusText}}};fr.GaxiosError=Md;function Ik(t,e){switch(t){case"stream":return e;case"json":return JSON.parse(JSON.stringify(e));case"arraybuffer":return JSON.parse(Buffer.from(e).toString("utf8"));case"blob":return JSON.parse(e.text());default:return e}}o(Ik,"translateData");function tE(t){let e="<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.";function r(s){s&&s.forEach((c,d)=>{(/^authentication$/i.test(d)||/^authorization$/i.test(d)||/secret/i.test(d))&&s.set(d,e)})}o(r,"redactHeaders");function n(s,c){if(typeof s=="object"&&s!==null&&typeof s[c]=="string"){let d=s[c];(/grant_type=/i.test(d)||/assertion=/i.test(d)||/secret/i.test(d))&&(s[c]=e)}}o(n,"redactString");function i(s){!s||typeof s!="object"||(s instanceof FormData||s instanceof URLSearchParams||"forEach"in s&&"set"in s?s.forEach((c,d)=>{(["grant_type","assertion"].includes(d)||/secret/.test(d))&&s.set(d,e)}):("grant_type"in s&&(s.grant_type=e),"assertion"in s&&(s.assertion=e),"client_secret"in s&&(s.client_secret=e)))}return o(i,"redactObject"),t.config&&(r(t.config.headers),n(t.config,"data"),i(t.config.data),n(t.config,"body"),i(t.config.body),t.config.url.searchParams.has("token")&&t.config.url.searchParams.set("token",e),t.config.url.searchParams.has("client_secret")&&t.config.url.searchParams.set("client_secret",e)),t.response&&(tE({config:t.response.config}),r(t.response.headers),t.response.bodyUsed&&(n(t.response,"data"),i(t.response.data))),t}o(tE,"defaultErrorRedactor")});var nE=D(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});jd.getRetryConfig=Rk;async function Rk(t){let e=rE(t);if(!t||!t.config||!e&&!t.config.retry)return{shouldRetry:!1};e=e||{},e.currentRetryAttempt=e.currentRetryAttempt||0,e.retry=e.retry===void 0||e.retry===null?3:e.retry,e.httpMethodsToRetry=e.httpMethodsToRetry||["GET","HEAD","PUT","OPTIONS","DELETE"],e.noResponseRetries=e.noResponseRetries===void 0||e.noResponseRetries===null?2:e.noResponseRetries,e.retryDelayMultiplier=e.retryDelayMultiplier?e.retryDelayMultiplier:2,e.timeOfFirstRequest=e.timeOfFirstRequest?e.timeOfFirstRequest:Date.now(),e.totalTimeout=e.totalTimeout?e.totalTimeout:Number.MAX_SAFE_INTEGER,e.maxRetryDelay=e.maxRetryDelay?e.maxRetryDelay:Number.MAX_SAFE_INTEGER;let r=[[100,199],[408,408],[429,429],[500,599]];if(e.statusCodesToRetry=e.statusCodesToRetry||r,t.config.retryConfig=e,!await(e.shouldRetry||Ck)(t))return{shouldRetry:!1,config:t.config};let i=Ok(e);t.config.retryConfig.currentRetryAttempt+=1;let s=e.retryBackoff?e.retryBackoff(t,i):new Promise(c=>{setTimeout(c,i)});return e.onRetryAttempt&&await e.onRetryAttempt(t),await s,{shouldRetry:!0,config:t.config}}o(Rk,"getRetryConfig");function Ck(t){let e=rE(t);if(t.config.signal?.aborted&&t.code!=="TimeoutError"||t.code==="AbortError"||!e||e.retry===0||!t.response&&(e.currentRetryAttempt||0)>=e.noResponseRetries||!e.httpMethodsToRetry||!e.httpMethodsToRetry.includes(t.config.method?.toUpperCase()||"GET"))return!1;if(t.response&&t.response.status){let r=!1;for(let[n,i]of e.statusCodesToRetry){let s=t.response.status;if(s>=n&&s<=i){r=!0;break}}if(!r)return!1}return e.currentRetryAttempt=e.currentRetryAttempt||0,!(e.currentRetryAttempt>=e.retry)}o(Ck,"shouldRetryRequest");function rE(t){if(t&&t.config&&t.config.retryConfig)return t.config.retryConfig}o(rE,"getConfig");function Ok(t){let r=(t.currentRetryAttempt?0:t.retryDelay??100)+(Math.pow(t.retryDelayMultiplier,t.currentRetryAttempt)-1)/2*1e3,n=t.totalTimeout-(Date.now()-t.timeOfFirstRequest);return Math.min(r,n,t.maxRetryDelay)}o(Ok,"getNextRetryDelay")});var qd=D(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.GaxiosInterceptorManager=void 0;var Fd=class extends Set{static{o(this,"GaxiosInterceptorManager")}};pu.GaxiosInterceptorManager=Fd});var iE=D((b9,oE)=>{var ti=1e3,ri=ti*60,ni=ri*60,mo=ni*24,kk=mo*7,$k=mo*365.25;oE.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Dk(t);if(r==="number"&&isFinite(t))return e.long?zk(t):Nk(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Dk(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*$k;case"weeks":case"week":case"w":return r*kk;case"days":case"day":case"d":return r*mo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ni;case"minutes":case"minute":case"mins":case"min":case"m":return r*ri;case"seconds":case"second":case"secs":case"sec":case"s":return r*ti;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}o(Dk,"parse");function Nk(t){var e=Math.abs(t);return e>=mo?Math.round(t/mo)+"d":e>=ni?Math.round(t/ni)+"h":e>=ri?Math.round(t/ri)+"m":e>=ti?Math.round(t/ti)+"s":t+"ms"}o(Nk,"fmtShort");function zk(t){var e=Math.abs(t);return e>=mo?fu(t,e,mo,"day"):e>=ni?fu(t,e,ni,"hour"):e>=ri?fu(t,e,ri,"minute"):e>=ti?fu(t,e,ti,"second"):t+" ms"}o(zk,"fmtLong");function fu(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}o(fu,"plural")});var Bd=D((S9,aE)=>{function Uk(t){r.debug=r,r.default=r,r.coerce=p,r.disable=c,r.enable=i,r.enabled=d,r.humanize=iE(),r.destroy=m,Object.keys(t).forEach(y=>{r[y]=t[y]}),r.names=[],r.skips=[],r.formatters={};function e(y){let h=0;for(let f=0;f<y.length;f++)h=(h<<5)-h+y.charCodeAt(f),h|=0;return r.colors[Math.abs(h)%r.colors.length]}o(e,"selectColor"),r.selectColor=e;function r(y){let h,f=null,l,g;function v(...E){if(!v.enabled)return;let b=v,C=Number(new Date),U=C-(h||C);b.diff=U,b.prev=h,b.curr=C,h=C,E[0]=r.coerce(E[0]),typeof E[0]!="string"&&E.unshift("%O");let J=0;E[0]=E[0].replace(/%([a-zA-Z%])/g,(H,K)=>{if(H==="%%")return"%";J++;let te=r.formatters[K];if(typeof te=="function"){let Q=E[J];H=te.call(b,Q),E.splice(J,1),J--}return H}),r.formatArgs.call(b,E),(b.log||r.log).apply(b,E)}return o(v,"debug"),v.namespace=y,v.useColors=r.useColors(),v.color=r.selectColor(y),v.extend=n,v.destroy=r.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:o(()=>f!==null?f:(l!==r.namespaces&&(l=r.namespaces,g=r.enabled(y)),g),"get"),set:o(E=>{f=E},"set")}),typeof r.init=="function"&&r.init(v),v}o(r,"createDebug");function n(y,h){let f=r(this.namespace+(typeof h>"u"?":":h)+y);return f.log=this.log,f}o(n,"extend");function i(y){r.save(y),r.namespaces=y,r.names=[],r.skips=[];let h=(typeof y=="string"?y:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let f of h)f[0]==="-"?r.skips.push(f.slice(1)):r.names.push(f)}o(i,"enable");function s(y,h){let f=0,l=0,g=-1,v=0;for(;f<y.length;)if(l<h.length&&(h[l]===y[f]||h[l]==="*"))h[l]==="*"?(g=l,v=f,l++):(f++,l++);else if(g!==-1)l=g+1,v++,f=v;else return!1;for(;l<h.length&&h[l]==="*";)l++;return l===h.length}o(s,"matchesTemplate");function c(){let y=[...r.names,...r.skips.map(h=>"-"+h)].join(",");return r.enable(""),y}o(c,"disable");function d(y){for(let h of r.skips)if(s(y,h))return!1;for(let h of r.names)if(s(y,h))return!0;return!1}o(d,"enabled");function p(y){return y instanceof Error?y.stack||y.message:y}o(p,"coerce");function m(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return o(m,"destroy"),r.enable(r.load()),r}o(Uk,"setup");aE.exports=Uk});var sE=D((qt,mu)=>{qt.formatArgs=Lk;qt.save=jk;qt.load=Fk;qt.useColors=Mk;qt.storage=qk();qt.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();qt.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 Mk(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}o(Mk,"useColors");function Lk(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+mu.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}o(Lk,"formatArgs");qt.log=console.debug||console.log||(()=>{});function jk(t){try{t?qt.storage.setItem("debug",t):qt.storage.removeItem("debug")}catch{}}o(jk,"save");function Fk(){let t;try{t=qt.storage.getItem("debug")||qt.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}o(Fk,"load");function qk(){try{return localStorage}catch{}}o(qk,"localstorage");mu.exports=Bd()(qt);var{formatters:Bk}=mu.exports;Bk.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var cE=D((P9,uE)=>{"use strict";uE.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}});var pE=D((x9,dE)=>{"use strict";var Vk=require("os"),lE=require("tty"),mr=cE(),{env:xt}=process,Gn;mr("no-color")||mr("no-colors")||mr("color=false")||mr("color=never")?Gn=0:(mr("color")||mr("colors")||mr("color=true")||mr("color=always"))&&(Gn=1);"FORCE_COLOR"in xt&&(xt.FORCE_COLOR==="true"?Gn=1:xt.FORCE_COLOR==="false"?Gn=0:Gn=xt.FORCE_COLOR.length===0?1:Math.min(parseInt(xt.FORCE_COLOR,10),3));function Vd(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}o(Vd,"translateLevel");function Gd(t,e){if(Gn===0)return 0;if(mr("color=16m")||mr("color=full")||mr("color=truecolor"))return 3;if(mr("color=256"))return 2;if(t&&!e&&Gn===void 0)return 0;let r=Gn||0;if(xt.TERM==="dumb")return r;if(process.platform==="win32"){let n=Vk.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in xt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in xt)||xt.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in xt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(xt.TEAMCITY_VERSION)?1:0;if(xt.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in xt){let n=parseInt((xt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(xt.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(xt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(xt.TERM)||"COLORTERM"in xt?1:r}o(Gd,"supportsColor");function Gk(t){let e=Gd(t,t&&t.isTTY);return Vd(e)}o(Gk,"getSupportLevel");dE.exports={supportsColor:Gk,stdout:Vd(Gd(!0,lE.isatty(1))),stderr:Vd(Gd(!0,lE.isatty(2)))}});var mE=D((At,gu)=>{var Hk=require("tty"),hu=require("util");At.init=Qk;At.log=Jk;At.formatArgs=Zk;At.save=Yk;At.load=Xk;At.useColors=Wk;At.destroy=hu.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");At.colors=[6,2,3,4,5,1];try{let t=pE();t&&(t.stderr||t).level>=2&&(At.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{}At.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,s)=>s.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function Wk(){return"colors"in At.inspectOpts?!!At.inspectOpts.colors:Hk.isatty(process.stderr.fd)}o(Wk,"useColors");function Zk(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${i};1m${e} \x1B[0m`;t[0]=s+t[0].split(`
|
|
1
|
+
"use strict";var eM=Object.create;var gs=Object.defineProperty;var tM=Object.getOwnPropertyDescriptor;var rM=Object.getOwnPropertyNames;var nM=Object.getPrototypeOf,oM=Object.prototype.hasOwnProperty;var a=(e,t)=>gs(e,"name",{value:t,configurable:!0});var $t=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(o){throw n=[o],o}};var z=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},hr=(e,t)=>{for(var n in t)gs(e,n,{get:t[n],enumerable:!0})},dw=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of rM(t))!oM.call(e,r)&&r!==n&&gs(e,r,{get:()=>t[r],enumerable:!(o=tM(t,r))||o.enumerable});return e};var Ke=(e,t,n)=>(n=e!=null?eM(nM(e)):{},dw(t||!e||!e.__esModule?gs(n,"default",{value:e,enumerable:!0}):n,e)),iM=e=>dw(gs({},"__esModule",{value:!0}),e);var Px=z((Tx,Op)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",n={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},o=new RegExp("^0[0-7]+$","i"),r=new RegExp("^0x[a-f0-9]+$","i"),i="%[0-9a-z]{1,}",s="(?:[0-9a-f]+::?)+",u={zoneIndex:new RegExp(i,"i"),native:new RegExp(`^(::)?(${s})?([0-9a-f]+)?(::)?(${i})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${i})?)$`,"i"),transitional:new RegExp(`^((?:${s})|(?:::)(?:${s})?)${t}\\.${t}\\.${t}\\.${t}(${i})?$`,"i")};function d(p,y){if(p.indexOf("::")!==p.lastIndexOf("::"))return null;let v=0,E=-1,b=(p.match(u.zoneIndex)||[])[0],k,N;for(b&&(b=b.substring(1),p=p.replace(/%.+$/,""));(E=p.indexOf(":",E+1))>=0;)v++;if(p.substr(0,2)==="::"&&v--,p.substr(-2,2)==="::"&&v--,v>y)return null;for(N=y-v,k=":";N--;)k+="0:";return p=p.replace("::",k),p[0]===":"&&(p=p.slice(1)),p[p.length-1]===":"&&(p=p.slice(0,-1)),y=(function(){let Z=p.split(":"),H=[];for(let K=0;K<Z.length;K++)H.push(parseInt(Z[K],16));return H})(),{parts:y,zoneId:b}}a(d,"expandIPv6");function f(p,y,v,E){if(p.length!==y.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let b=0,k;for(;E>0;){if(k=v-E,k<0&&(k=0),p[b]>>k!==y[b]>>k)return!1;E-=v,b+=1}return!0}a(f,"matchCIDR");function h(p){if(r.test(p))return parseInt(p,16);if(p[0]==="0"&&!isNaN(parseInt(p[1],10))){if(o.test(p))return parseInt(p,8);throw new Error(`ipaddr: cannot parse ${p} as octal`)}return parseInt(p,10)}a(h,"parseIntAuto");function g(p,y){for(;p.length<y;)p=`0${p}`;return p}a(g,"padPart");let m={};m.IPv4=(function(){function p(y){if(y.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let v,E;for(v=0;v<y.length;v++)if(E=y[v],!(0<=E&&E<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=y}return a(p,"IPv4"),p.prototype.SpecialRanges={unspecified:[[new p([0,0,0,0]),8]],broadcast:[[new p([255,255,255,255]),32]],multicast:[[new p([224,0,0,0]),4]],linkLocal:[[new p([169,254,0,0]),16]],loopback:[[new p([127,0,0,0]),8]],carrierGradeNat:[[new p([100,64,0,0]),10]],private:[[new p([10,0,0,0]),8],[new p([172,16,0,0]),12],[new p([192,168,0,0]),16]],reserved:[[new p([192,0,0,0]),24],[new p([192,0,2,0]),24],[new p([192,88,99,0]),24],[new p([198,18,0,0]),15],[new p([198,51,100,0]),24],[new p([203,0,113,0]),24],[new p([240,0,0,0]),4]],as112:[[new p([192,175,48,0]),24],[new p([192,31,196,0]),24]],amt:[[new p([192,52,193,0]),24]]},p.prototype.kind=function(){return"ipv4"},p.prototype.match=function(y,v){let E;if(v===void 0&&(E=y,y=E[0],v=E[1]),y.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return f(this.octets,y.octets,8,v)},p.prototype.prefixLengthFromSubnetMask=function(){let y=0,v=!1,E={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},b,k,N;for(b=3;b>=0;b-=1)if(k=this.octets[b],k in E){if(N=E[k],v&&N!==0)return null;N!==8&&(v=!0),y+=N}else return null;return 32-y},p.prototype.range=function(){return m.subnetMatch(this,this.SpecialRanges)},p.prototype.toByteArray=function(){return this.octets.slice(0)},p.prototype.toIPv4MappedAddress=function(){return m.IPv6.parse(`::ffff:${this.toString()}`)},p.prototype.toNormalizedString=function(){return this.toString()},p.prototype.toString=function(){return this.octets.join(".")},p})(),m.IPv4.broadcastAddressFromCIDR=function(p){try{let y=this.parseCIDR(p),v=y[0].toByteArray(),E=this.subnetMaskFromPrefixLength(y[1]).toByteArray(),b=[],k=0;for(;k<4;)b.push(parseInt(v[k],10)|parseInt(E[k],10)^255),k++;return new this(b)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},m.IPv4.isIPv4=function(p){return this.parser(p)!==null},m.IPv4.isValid=function(p){try{return new this(this.parser(p)),!0}catch{return!1}},m.IPv4.isValidCIDR=function(p){try{return this.parseCIDR(p),!0}catch{return!1}},m.IPv4.isValidFourPartDecimal=function(p){return!!(m.IPv4.isValid(p)&&p.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},m.IPv4.isValidCIDRFourPartDecimal=function(p){let y=p.match(/^(.+)\/(\d+)$/);return!m.IPv4.isValidCIDR(p)||!y?!1:m.IPv4.isValidFourPartDecimal(y[1])},m.IPv4.networkAddressFromCIDR=function(p){let y,v,E,b,k;try{for(y=this.parseCIDR(p),E=y[0].toByteArray(),k=this.subnetMaskFromPrefixLength(y[1]).toByteArray(),b=[],v=0;v<4;)b.push(parseInt(E[v],10)&parseInt(k[v],10)),v++;return new this(b)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},m.IPv4.parse=function(p){let y=this.parser(p);if(y===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(y)},m.IPv4.parseCIDR=function(p){let y;if(y=p.match(/^(.+)\/(\d+)$/)){let v=parseInt(y[2]);if(v>=0&&v<=32){let E=[this.parse(y[1]),v];return Object.defineProperty(E,"toString",{value:a(function(){return this.join("/")},"value")}),E}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},m.IPv4.parser=function(p){let y,v,E;if(y=p.match(n.fourOctet))return(function(){let b=y.slice(1,6),k=[];for(let N=0;N<b.length;N++)v=b[N],k.push(h(v));return k})();if(y=p.match(n.longValue)){if(E=h(y[1]),E>4294967295||E<0)throw new Error("ipaddr: address outside defined range");return(function(){let b=[],k;for(k=0;k<=24;k+=8)b.push(E>>k&255);return b})().reverse()}else return(y=p.match(n.twoOctet))?(function(){let b=y.slice(1,4),k=[];if(E=h(b[1]),E>16777215||E<0)throw new Error("ipaddr: address outside defined range");return k.push(h(b[0])),k.push(E>>16&255),k.push(E>>8&255),k.push(E&255),k})():(y=p.match(n.threeOctet))?(function(){let b=y.slice(1,5),k=[];if(E=h(b[2]),E>65535||E<0)throw new Error("ipaddr: address outside defined range");return k.push(h(b[0])),k.push(h(b[1])),k.push(E>>8&255),k.push(E&255),k})():null},m.IPv4.subnetMaskFromPrefixLength=function(p){if(p=parseInt(p),p<0||p>32)throw new Error("ipaddr: invalid IPv4 prefix length");let y=[0,0,0,0],v=0,E=Math.floor(p/8);for(;v<E;)y[v]=255,v++;return E<4&&(y[E]=Math.pow(2,p%8)-1<<8-p%8),new this(y)},m.IPv6=(function(){function p(y,v){let E,b;if(y.length===16)for(this.parts=[],E=0;E<=14;E+=2)this.parts.push(y[E]<<8|y[E+1]);else if(y.length===8)this.parts=y;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(E=0;E<this.parts.length;E++)if(b=this.parts[E],!(0<=b&&b<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");v&&(this.zoneId=v)}return a(p,"IPv6"),p.prototype.SpecialRanges={unspecified:[new p([0,0,0,0,0,0,0,0]),128],linkLocal:[new p([65152,0,0,0,0,0,0,0]),10],multicast:[new p([65280,0,0,0,0,0,0,0]),8],loopback:[new p([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new p([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new p([0,0,0,0,0,65535,0,0]),96],discard:[new p([256,0,0,0,0,0,0,0]),64],rfc6145:[new p([0,0,0,0,65535,0,0,0]),96],rfc6052:[new p([100,65435,0,0,0,0,0,0]),96],"6to4":[new p([8194,0,0,0,0,0,0,0]),16],teredo:[new p([8193,0,0,0,0,0,0,0]),32],benchmarking:[new p([8193,2,0,0,0,0,0,0]),48],amt:[new p([8193,3,0,0,0,0,0,0]),32],as112v6:[[new p([8193,4,274,0,0,0,0,0]),48],[new p([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new p([8193,16,0,0,0,0,0,0]),28],orchid2:[new p([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new p([8193,48,0,0,0,0,0,0]),28],reserved:[[new p([8193,0,0,0,0,0,0,0]),23],[new p([8193,3512,0,0,0,0,0,0]),32]]},p.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},p.prototype.kind=function(){return"ipv6"},p.prototype.match=function(y,v){let E;if(v===void 0&&(E=y,y=E[0],v=E[1]),y.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return f(this.parts,y.parts,16,v)},p.prototype.prefixLengthFromSubnetMask=function(){let y=0,v=!1,E={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},b,k;for(let N=7;N>=0;N-=1)if(b=this.parts[N],b in E){if(k=E[b],v&&k!==0)return null;k!==16&&(v=!0),y+=k}else return null;return 128-y},p.prototype.range=function(){return m.subnetMatch(this,this.SpecialRanges)},p.prototype.toByteArray=function(){let y,v=[],E=this.parts;for(let b=0;b<E.length;b++)y=E[b],v.push(y>>8),v.push(y&255);return v},p.prototype.toFixedLengthString=function(){let y=(function(){let E=[];for(let b=0;b<this.parts.length;b++)E.push(g(this.parts[b].toString(16),4));return E}).call(this).join(":"),v="";return this.zoneId&&(v=`%${this.zoneId}`),y+v},p.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let y=this.parts.slice(-2),v=y[0],E=y[1];return new m.IPv4([v>>8,v&255,E>>8,E&255])},p.prototype.toNormalizedString=function(){let y=(function(){let E=[];for(let b=0;b<this.parts.length;b++)E.push(this.parts[b].toString(16));return E}).call(this).join(":"),v="";return this.zoneId&&(v=`%${this.zoneId}`),y+v},p.prototype.toRFC5952String=function(){let y=/((^|:)(0(:|$)){2,})/g,v=this.toNormalizedString(),E=0,b=-1,k;for(;k=y.exec(v);)k[0].length>b&&(E=k.index,b=k[0].length);return b<0?v:`${v.substring(0,E)}::${v.substring(E+b)}`},p.prototype.toString=function(){return this.toRFC5952String()},p})(),m.IPv6.broadcastAddressFromCIDR=function(p){try{let y=this.parseCIDR(p),v=y[0].toByteArray(),E=this.subnetMaskFromPrefixLength(y[1]).toByteArray(),b=[],k=0;for(;k<16;)b.push(parseInt(v[k],10)|parseInt(E[k],10)^255),k++;return new this(b)}catch(y){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${y})`)}},m.IPv6.isIPv6=function(p){return this.parser(p)!==null},m.IPv6.isValid=function(p){if(typeof p=="string"&&p.indexOf(":")===-1)return!1;try{let y=this.parser(p);return new this(y.parts,y.zoneId),!0}catch{return!1}},m.IPv6.isValidCIDR=function(p){if(typeof p=="string"&&p.indexOf(":")===-1)return!1;try{return this.parseCIDR(p),!0}catch{return!1}},m.IPv6.networkAddressFromCIDR=function(p){let y,v,E,b,k;try{for(y=this.parseCIDR(p),E=y[0].toByteArray(),k=this.subnetMaskFromPrefixLength(y[1]).toByteArray(),b=[],v=0;v<16;)b.push(parseInt(E[v],10)&parseInt(k[v],10)),v++;return new this(b)}catch(N){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${N})`)}},m.IPv6.parse=function(p){let y=this.parser(p);if(y.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(y.parts,y.zoneId)},m.IPv6.parseCIDR=function(p){let y,v,E;if((v=p.match(/^(.+)\/(\d+)$/))&&(y=parseInt(v[2]),y>=0&&y<=128))return E=[this.parse(v[1]),y],Object.defineProperty(E,"toString",{value:a(function(){return this.join("/")},"value")}),E;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},m.IPv6.parser=function(p){let y,v,E,b,k,N;if(E=p.match(u.deprecatedTransitional))return this.parser(`::ffff:${E[1]}`);if(u.native.test(p))return d(p,8);if((E=p.match(u.transitional))&&(N=E[6]||"",y=E[1],E[1].endsWith("::")||(y=y.slice(0,-1)),y=d(y+N,6),y.parts)){for(k=[parseInt(E[2]),parseInt(E[3]),parseInt(E[4]),parseInt(E[5])],v=0;v<k.length;v++)if(b=k[v],!(0<=b&&b<=255))return null;return y.parts.push(k[0]<<8|k[1]),y.parts.push(k[2]<<8|k[3]),{parts:y.parts,zoneId:y.zoneId}}return null},m.IPv6.subnetMaskFromPrefixLength=function(p){if(p=parseInt(p),p<0||p>128)throw new Error("ipaddr: invalid IPv6 prefix length");let y=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],v=0,E=Math.floor(p/8);for(;v<E;)y[v]=255,v++;return E<16&&(y[E]=Math.pow(2,p%8)-1<<8-p%8),new this(y)},m.fromByteArray=function(p){let y=p.length;if(y===4)return new m.IPv4(p);if(y===16)return new m.IPv6(p);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},m.isValid=function(p){return m.IPv6.isValid(p)||m.IPv4.isValid(p)},m.isValidCIDR=function(p){return m.IPv6.isValidCIDR(p)||m.IPv4.isValidCIDR(p)},m.parse=function(p){if(m.IPv6.isValid(p))return m.IPv6.parse(p);if(m.IPv4.isValid(p))return m.IPv4.parse(p);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},m.parseCIDR=function(p){try{return m.IPv6.parseCIDR(p)}catch{try{return m.IPv4.parseCIDR(p)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},m.process=function(p){let y=this.parse(p);return y.kind()==="ipv6"&&y.isIPv4MappedAddress()?y.toIPv4Address():y},m.subnetMatch=function(p,y,v){let E,b,k,N;v==null&&(v="unicast");for(b in y)if(Object.prototype.hasOwnProperty.call(y,b)){for(k=y[b],k[0]&&!(k[0]instanceof Array)&&(k=[k]),E=0;E<k.length;E++)if(N=k[E],p.kind()===N[0].kind()&&p.match.apply(p,N))return b}return v},typeof Op<"u"&&Op.exports?Op.exports=m:e.ipaddr=m})(Tx)});var HI=z((ore,GI)=>{var VI=require("stream").Stream,JF=require("util");GI.exports=tn;function tn(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}a(tn,"DelayedStream");JF.inherits(tn,VI);tn.create=function(e,t){var n=new this;t=t||{};for(var o in t)n[o]=t[o];n.source=e;var r=e.emit;return e.emit=function(){return n._handleEmit(arguments),r.apply(e,arguments)},e.on("error",function(){}),n.pauseStream&&e.pause(),n};Object.defineProperty(tn.prototype,"readable",{configurable:!0,enumerable:!0,get:a(function(){return this.source.readable},"get")});tn.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};tn.prototype.resume=function(){this._released||this.release(),this.source.resume()};tn.prototype.pause=function(){this.source.pause()};tn.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};tn.prototype.pipe=function(){var e=VI.prototype.pipe.apply(this,arguments);return this.resume(),e};tn.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};tn.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var JI=z((are,KI)=>{var YF=require("util"),WI=require("stream").Stream,ZI=HI();KI.exports=Et;function Et(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}a(Et,"CombinedStream");YF.inherits(Et,WI);Et.create=function(e){var t=new this;e=e||{};for(var n in e)t[n]=e[n];return t};Et.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};Et.prototype.append=function(e){var t=Et.isStreamLike(e);if(t){if(!(e instanceof ZI)){var n=ZI.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=n}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};Et.prototype.pipe=function(e,t){return WI.prototype.pipe.call(this,e,t),this.resume(),e};Et.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};Et.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(n){var o=Et.isStreamLike(n);o&&(n.on("data",this._checkDataSize.bind(this)),this._handleErrors(n)),this._pipeNext(n)}.bind(this))};Et.prototype._pipeNext=function(e){this._currentStream=e;var t=Et.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var n=e;this.write(n),this._getNext()};Et.prototype._handleErrors=function(e){var t=this;e.on("error",function(n){t._emitError(n)})};Et.prototype.write=function(e){this.emit("data",e)};Et.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};Et.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};Et.prototype.end=function(){this._reset(),this.emit("end")};Et.prototype.destroy=function(){this._reset(),this.emit("close")};Et.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};Et.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};Et.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};Et.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var XI=z((cre,YI)=>{"use strict";YI.exports={"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dat"]},"application/msword":{source:"iana",extensions:["doc"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",extensions:["docx"]},"application/vnd.ms-excel":{source:"iana",extensions:["xls"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",extensions:["xlsx"]},"application/vnd.ms-powerpoint":{source:"iana",extensions:["ppt"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",extensions:["pptx"]},"application/csv":{compressible:!0,extensions:["csv"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"text/plain":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["txt","text","log"]},"text/html":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["html","htm"]},"text/css":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["css"]},"text/csv":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["csv"]},"text/markdown":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["md","markdown"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/webp":{source:"apache",compressible:!1,extensions:["webp"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/heic":{source:"iana",compressible:!1,extensions:["heic"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mp3","mpga"]},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/ogg":{source:"iana",compressible:!1,extensions:["ogg","oga"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","m4v"]},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg"]},"video/webm":{source:"iana",compressible:!1,extensions:["webm"]},"video/quicktime":{source:"iana",compressible:!1,extensions:["mov","qt"]},"video/x-msvideo":{source:"iana",compressible:!1,extensions:["avi"]},"font/woff":{source:"iana",compressible:!1,extensions:["woff"]},"font/woff2":{source:"iana",compressible:!1,extensions:["woff2"]},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"multipart/form-data":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/ics":{compressible:!0,extensions:["ics"]},"text/calendar":{source:"iana",compressible:!0,extensions:["ics","ifb"]},"application/x-ndjson":{compressible:!0,extensions:["ndjson"]}}});var tR=z(sr=>{"use strict";var _f=XI(),XF=require("path").extname,QI=/^\s*([^;\s]*)(?:;|\s|$)/,QF=/^text\//i;sr.charset=eR;sr.charsets={lookup:eR};sr.contentType=eB;sr.extension=tB;sr.extensions=Object.create(null);sr.lookup=rB;sr.types=Object.create(null);nB(sr.extensions,sr.types);function eR(e){if(!e||typeof e!="string")return!1;var t=QI.exec(e),n=t&&_f[t[1].toLowerCase()];return n&&n.charset?n.charset:t&&QF.test(t[1])?"UTF-8":!1}a(eR,"charset");function eB(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?sr.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var n=sr.charset(t);n&&(t+="; charset="+n.toLowerCase())}return t}a(eB,"contentType");function tB(e){if(!e||typeof e!="string")return!1;var t=QI.exec(e),n=t&&sr.extensions[t[1].toLowerCase()];return!n||!n.length?!1:n[0]}a(tB,"extension");function rB(e){if(!e||typeof e!="string")return!1;var t=XF("x."+e).toLowerCase().substr(1);return t&&sr.types[t]||!1}a(rB,"lookup");function nB(e,t){var n=["nginx","apache",void 0,"iana"];Object.keys(_f).forEach(a(function(r){var i=_f[r],s=i.extensions;if(!(!s||!s.length)){e[r]=s;for(var u=0;u<s.length;u++){var d=s[u];if(t[d]){var f=n.indexOf(_f[t[d]].source),h=n.indexOf(i.source);if(t[d]!=="application/octet-stream"&&(f>h||f===h&&t[d].substr(0,12)==="application/"))continue}t[d]=r}}},"forEachMimeType"))}a(nB,"populateMaps")});var nR=z((dre,rR)=>{rR.exports=oB;function oB(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}a(oB,"defer")});var hb=z((fre,iR)=>{var oR=nR();iR.exports=iB;function iB(e){var t=!1;return oR(function(){t=!0}),a(function(o,r){t?e(o,r):oR(a(function(){e(o,r)},"nextTick_callback"))},"async_callback")}a(iB,"async")});var gb=z((hre,aR)=>{aR.exports=aB;function aB(e){Object.keys(e.jobs).forEach(sB.bind(e)),e.jobs={}}a(aB,"abort");function sB(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}a(sB,"clean")});var yb=z((yre,cR)=>{var sR=hb(),cB=gb();cR.exports=uB;function uB(e,t,n,o){var r=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[r]=lB(t,r,e[r],function(i,s){r in n.jobs&&(delete n.jobs[r],i?cB(n):n.results[r]=s,o(i,n.results))})}a(uB,"iterate");function lB(e,t,n,o){var r;return e.length==2?r=e(n,sR(o)):r=e(n,t,sR(o)),r}a(lB,"runJob")});var vb=z((_re,uR)=>{uR.exports=dB;function dB(e,t){var n=!Array.isArray(e),o={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};return t&&o.keyedList.sort(n?t:function(r,i){return t(e[r],e[i])}),o}a(dB,"state")});var _b=z((Ere,lR)=>{var pB=gb(),fB=hb();lR.exports=mB;function mB(e){Object.keys(this.jobs).length&&(this.index=this.size,pB(this),fB(e)(null,this.results))}a(mB,"terminator")});var pR=z((Tre,dR)=>{var hB=yb(),gB=vb(),yB=_b();dR.exports=vB;function vB(e,t,n){for(var o=gB(e);o.index<(o.keyedList||e).length;)hB(e,t,o,function(r,i){if(r){n(r,i);return}if(Object.keys(o.jobs).length===0){n(null,o.results);return}}),o.index++;return yB.bind(o,n)}a(vB,"parallel")});var bb=z((wre,bf)=>{var fR=yb(),_B=vb(),bB=_b();bf.exports=EB;bf.exports.ascending=mR;bf.exports.descending=SB;function EB(e,t,n,o){var r=_B(e,n);return fR(e,t,r,a(function i(s,u){if(s){o(s,u);return}if(r.index++,r.index<(r.keyedList||e).length){fR(e,t,r,i);return}o(null,r.results)},"iteratorHandler")),bB.bind(r,o)}a(EB,"serialOrdered");function mR(e,t){return e<t?-1:e>t?1:0}a(mR,"ascending");function SB(e,t){return-1*mR(e,t)}a(SB,"descending")});var gR=z((Are,hR)=>{var TB=bb();hR.exports=PB;function PB(e,t,n){return TB(e,t,null,n)}a(PB,"serial")});var vR=z((Rre,yR)=>{yR.exports={parallel:pR(),serial:gR(),serialOrdered:bb()}});var Eb=z((Cre,_R)=>{"use strict";_R.exports=Object});var ER=z((Ore,bR)=>{"use strict";bR.exports=Error});var TR=z((kre,SR)=>{"use strict";SR.exports=EvalError});var wR=z(($re,PR)=>{"use strict";PR.exports=RangeError});var AR=z((Dre,xR)=>{"use strict";xR.exports=ReferenceError});var RR=z((Nre,IR)=>{"use strict";IR.exports=SyntaxError});var Io=z((zre,CR)=>{"use strict";CR.exports=TypeError});var kR=z((Ure,OR)=>{"use strict";OR.exports=URIError});var DR=z((Mre,$R)=>{"use strict";$R.exports=Math.abs});var zR=z((Lre,NR)=>{"use strict";NR.exports=Math.floor});var MR=z((jre,UR)=>{"use strict";UR.exports=Math.max});var jR=z((Fre,LR)=>{"use strict";LR.exports=Math.min});var BR=z((Bre,FR)=>{"use strict";FR.exports=Math.pow});var VR=z((qre,qR)=>{"use strict";qR.exports=Math.round});var HR=z((Vre,GR)=>{"use strict";GR.exports=Number.isNaN||a(function(t){return t!==t},"isNaN")});var WR=z((Hre,ZR)=>{"use strict";var wB=HR();ZR.exports=a(function(t){return wB(t)||t===0?t:t<0?-1:1},"sign")});var JR=z((Wre,KR)=>{"use strict";KR.exports=Object.getOwnPropertyDescriptor});var Sb=z((Kre,YR)=>{"use strict";var Ef=JR();if(Ef)try{Ef([],"length")}catch{Ef=null}YR.exports=Ef});var QR=z((Jre,XR)=>{"use strict";var Sf=Object.defineProperty||!1;if(Sf)try{Sf({},"a",{value:1})}catch{Sf=!1}XR.exports=Sf});var Tb=z((Yre,eC)=>{"use strict";eC.exports=a(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),o=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var r=42;t[n]=r;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,n);if(u.value!==r||u.enumerable!==!0)return!1}return!0},"hasSymbols")});var nC=z((Qre,rC)=>{"use strict";var tC=typeof Symbol<"u"&&Symbol,xB=Tb();rC.exports=a(function(){return typeof tC!="function"||typeof Symbol!="function"||typeof tC("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:xB()},"hasNativeSymbols")});var Pb=z((tne,oC)=>{"use strict";oC.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var wb=z((rne,iC)=>{"use strict";var AB=Eb();iC.exports=AB.getPrototypeOf||null});var cC=z((nne,sC)=>{"use strict";var IB="Function.prototype.bind called on incompatible ",RB=Object.prototype.toString,CB=Math.max,OB="[object Function]",aC=a(function(t,n){for(var o=[],r=0;r<t.length;r+=1)o[r]=t[r];for(var i=0;i<n.length;i+=1)o[i+t.length]=n[i];return o},"concatty"),kB=a(function(t,n){for(var o=[],r=n||0,i=0;r<t.length;r+=1,i+=1)o[i]=t[r];return o},"slicy"),$B=a(function(e,t){for(var n="",o=0;o<e.length;o+=1)n+=e[o],o+1<e.length&&(n+=t);return n},"joiny");sC.exports=a(function(t){var n=this;if(typeof n!="function"||RB.apply(n)!==OB)throw new TypeError(IB+n);for(var o=kB(arguments,1),r,i=a(function(){if(this instanceof r){var h=n.apply(this,aC(o,arguments));return Object(h)===h?h:this}return n.apply(t,aC(o,arguments))},"binder"),s=CB(0,n.length-o.length),u=[],d=0;d<s;d++)u[d]="$"+d;if(r=Function("binder","return function ("+$B(u,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var f=a(function(){},"Empty");f.prototype=n.prototype,r.prototype=new f,f.prototype=null}return r},"bind")});var Aa=z((ine,uC)=>{"use strict";var DB=cC();uC.exports=Function.prototype.bind||DB});var Tf=z((ane,lC)=>{"use strict";lC.exports=Function.prototype.call});var xb=z((sne,dC)=>{"use strict";dC.exports=Function.prototype.apply});var fC=z((cne,pC)=>{"use strict";pC.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var hC=z((une,mC)=>{"use strict";var NB=Aa(),zB=xb(),UB=Tf(),MB=fC();mC.exports=MB||NB.call(UB,zB)});var Ab=z((lne,gC)=>{"use strict";var LB=Aa(),jB=Io(),FB=Tf(),BB=hC();gC.exports=a(function(t){if(t.length<1||typeof t[0]!="function")throw new jB("a function is required");return BB(LB,FB,t)},"callBindBasic")});var SC=z((pne,EC)=>{"use strict";var qB=Ab(),yC=Sb(),_C;try{_C=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Ib=!!_C&&yC&&yC(Object.prototype,"__proto__"),bC=Object,vC=bC.getPrototypeOf;EC.exports=Ib&&typeof Ib.get=="function"?qB([Ib.get]):typeof vC=="function"?a(function(t){return vC(t==null?t:bC(t))},"getDunder"):!1});var AC=z((mne,xC)=>{"use strict";var TC=Pb(),PC=wb(),wC=SC();xC.exports=TC?a(function(t){return TC(t)},"getProto"):PC?a(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return PC(t)},"getProto"):wC?a(function(t){return wC(t)},"getProto"):null});var Rb=z((gne,IC)=>{"use strict";var VB=Function.prototype.call,GB=Object.prototype.hasOwnProperty,HB=Aa();IC.exports=HB.call(VB,GB)});var du=z((yne,DC)=>{"use strict";var qe,ZB=Eb(),WB=ER(),KB=TR(),JB=wR(),YB=AR(),Oa=RR(),Ca=Io(),XB=kR(),QB=DR(),eq=zR(),tq=MR(),rq=jR(),nq=BR(),oq=VR(),iq=WR(),kC=Function,Cb=a(function(e){try{return kC('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),cu=Sb(),aq=QR(),Ob=a(function(){throw new Ca},"throwTypeError"),sq=cu?(function(){try{return arguments.callee,Ob}catch{try{return cu(arguments,"callee").get}catch{return Ob}}})():Ob,Ia=nC()(),Ut=AC(),cq=wb(),uq=Pb(),$C=xb(),uu=Tf(),Ra={},lq=typeof Uint8Array>"u"||!Ut?qe:Ut(Uint8Array),gi={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?qe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?qe:ArrayBuffer,"%ArrayIteratorPrototype%":Ia&&Ut?Ut([][Symbol.iterator]()):qe,"%AsyncFromSyncIteratorPrototype%":qe,"%AsyncFunction%":Ra,"%AsyncGenerator%":Ra,"%AsyncGeneratorFunction%":Ra,"%AsyncIteratorPrototype%":Ra,"%Atomics%":typeof Atomics>"u"?qe:Atomics,"%BigInt%":typeof BigInt>"u"?qe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?qe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?qe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?qe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":WB,"%eval%":eval,"%EvalError%":KB,"%Float16Array%":typeof Float16Array>"u"?qe:Float16Array,"%Float32Array%":typeof Float32Array>"u"?qe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?qe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?qe:FinalizationRegistry,"%Function%":kC,"%GeneratorFunction%":Ra,"%Int8Array%":typeof Int8Array>"u"?qe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?qe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?qe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ia&&Ut?Ut(Ut([][Symbol.iterator]())):qe,"%JSON%":typeof JSON=="object"?JSON:qe,"%Map%":typeof Map>"u"?qe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ia||!Ut?qe:Ut(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":ZB,"%Object.getOwnPropertyDescriptor%":cu,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?qe:Promise,"%Proxy%":typeof Proxy>"u"?qe:Proxy,"%RangeError%":JB,"%ReferenceError%":YB,"%Reflect%":typeof Reflect>"u"?qe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?qe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ia||!Ut?qe:Ut(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?qe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ia&&Ut?Ut(""[Symbol.iterator]()):qe,"%Symbol%":Ia?Symbol:qe,"%SyntaxError%":Oa,"%ThrowTypeError%":sq,"%TypedArray%":lq,"%TypeError%":Ca,"%Uint8Array%":typeof Uint8Array>"u"?qe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?qe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?qe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?qe:Uint32Array,"%URIError%":XB,"%WeakMap%":typeof WeakMap>"u"?qe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?qe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?qe:WeakSet,"%Function.prototype.call%":uu,"%Function.prototype.apply%":$C,"%Object.defineProperty%":aq,"%Object.getPrototypeOf%":cq,"%Math.abs%":QB,"%Math.floor%":eq,"%Math.max%":tq,"%Math.min%":rq,"%Math.pow%":nq,"%Math.round%":oq,"%Math.sign%":iq,"%Reflect.getPrototypeOf%":uq};if(Ut)try{null.error}catch(e){RC=Ut(Ut(e)),gi["%Error.prototype%"]=RC}var RC,dq=a(function e(t){var n;if(t==="%AsyncFunction%")n=Cb("async function () {}");else if(t==="%GeneratorFunction%")n=Cb("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Cb("async function* () {}");else if(t==="%AsyncGenerator%"){var o=e("%AsyncGeneratorFunction%");o&&(n=o.prototype)}else if(t==="%AsyncIteratorPrototype%"){var r=e("%AsyncGenerator%");r&&Ut&&(n=Ut(r.prototype))}return gi[t]=n,n},"doEval"),CC={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},lu=Aa(),Pf=Rb(),pq=lu.call(uu,Array.prototype.concat),fq=lu.call($C,Array.prototype.splice),OC=lu.call(uu,String.prototype.replace),wf=lu.call(uu,String.prototype.slice),mq=lu.call(uu,RegExp.prototype.exec),hq=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,gq=/\\(\\)?/g,yq=a(function(t){var n=wf(t,0,1),o=wf(t,-1);if(n==="%"&&o!=="%")throw new Oa("invalid intrinsic syntax, expected closing `%`");if(o==="%"&&n!=="%")throw new Oa("invalid intrinsic syntax, expected opening `%`");var r=[];return OC(t,hq,function(i,s,u,d){r[r.length]=u?OC(d,gq,"$1"):s||i}),r},"stringToPath"),vq=a(function(t,n){var o=t,r;if(Pf(CC,o)&&(r=CC[o],o="%"+r[0]+"%"),Pf(gi,o)){var i=gi[o];if(i===Ra&&(i=dq(o)),typeof i>"u"&&!n)throw new Ca("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:o,value:i}}throw new Oa("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");DC.exports=a(function(t,n){if(typeof t!="string"||t.length===0)throw new Ca("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Ca('"allowMissing" argument must be a boolean');if(mq(/^%?[^%]*%?$/,t)===null)throw new Oa("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var o=yq(t),r=o.length>0?o[0]:"",i=vq("%"+r+"%",n),s=i.name,u=i.value,d=!1,f=i.alias;f&&(r=f[0],fq(o,pq([0,1],f)));for(var h=1,g=!0;h<o.length;h+=1){var m=o[h],p=wf(m,0,1),y=wf(m,-1);if((p==='"'||p==="'"||p==="`"||y==='"'||y==="'"||y==="`")&&p!==y)throw new Oa("property names with quotes must have matching quotes");if((m==="constructor"||!g)&&(d=!0),r+="."+m,s="%"+r+"%",Pf(gi,s))u=gi[s];else if(u!=null){if(!(m in u)){if(!n)throw new Ca("base intrinsic for "+t+" exists, but the property is not available.");return}if(cu&&h+1>=o.length){var v=cu(u,m);g=!!v,g&&"get"in v&&!("originalValue"in v.get)?u=v.get:u=u[m]}else g=Pf(u,m),u=u[m];g&&!d&&(gi[s]=u)}}return u},"GetIntrinsic")});var zC=z((_ne,NC)=>{"use strict";var _q=Tb();NC.exports=a(function(){return _q()&&!!Symbol.toStringTag},"hasToStringTagShams")});var LC=z((Ene,MC)=>{"use strict";var bq=du(),UC=bq("%Object.defineProperty%",!0),Eq=zC()(),Sq=Rb(),Tq=Io(),xf=Eq?Symbol.toStringTag:null;MC.exports=a(function(t,n){var o=arguments.length>2&&!!arguments[2]&&arguments[2].force,r=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof o<"u"&&typeof o!="boolean"||typeof r<"u"&&typeof r!="boolean")throw new Tq("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");xf&&(o||!Sq(t,xf))&&(UC?UC(t,xf,{configurable:!r,enumerable:!1,value:n,writable:!1}):t[xf]=n)},"setToStringTag")});var FC=z((Tne,jC)=>{"use strict";var Pq=Function.prototype.call,wq=Object.prototype.hasOwnProperty,xq=Aa();jC.exports=xq.call(Pq,wq)});var qC=z((Pne,BC)=>{"use strict";BC.exports=function(e,t){return Object.keys(t).forEach(function(n){e[n]=e[n]||t[n]}),e}});var HC=z((wne,GC)=>{"use strict";var Nb=JI(),Aq=require("util"),kb=require("path"),Iq=require("http"),Rq=require("https"),Cq=require("url").parse,Oq=require("fs"),kq=require("stream").Stream,$q=require("crypto"),$b=tR(),Dq=vR(),Nq=LC(),Ro=FC(),Db=qC();function VC(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}a(VC,"escapeHeaderParam");function Je(e){if(!(this instanceof Je))return new Je(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Nb.call(this),e=e||{};for(var t in e)this[t]=e[t]}a(Je,"FormData");Aq.inherits(Je,Nb);Je.LINE_BREAK=`\r
|
|
2
|
+
`;Je.DEFAULT_CONTENT_TYPE="application/octet-stream";Je.prototype.append=function(e,t,n){n=n||{},typeof n=="string"&&(n={filename:n});var o=Nb.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(e,t,n),i=this._multiPartFooter();o(r),o(t),o(i),this._trackLength(r,t,n)};Je.prototype._trackLength=function(e,t,n){var o=0;n.knownLength!=null?o+=Number(n.knownLength):Buffer.isBuffer(t)?o=t.length:typeof t=="string"&&(o=Buffer.byteLength(t)),this._valueLength+=o,this._overheadLength+=Buffer.byteLength(e)+Je.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Ro(t,"httpVersion"))&&!(t instanceof kq))&&(n.knownLength||this._valuesToMeasure.push(t))};Je.prototype._lengthRetriever=function(e,t){Ro(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):Oq.stat(e.path,function(n,o){if(n){t(n);return}var r=o.size-(e.start?e.start:0);t(null,r)}):Ro(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Ro(e,"httpModule")?(e.on("response",function(n){e.pause(),t(null,Number(n.headers["content-length"]))}),e.resume()):t("Unknown stream")};Je.prototype._multiPartHeader=function(e,t,n){if(typeof n.header=="string")return n.header;var o=this._getContentDisposition(t,n),r=this._getContentType(t,n),i="",s={"Content-Disposition":["form-data",'name="'+VC(e)+'"'].concat(o||[]),"Content-Type":[].concat(r||[])};typeof n.header=="object"&&Db(s,n.header);var u;for(var d in s)if(Ro(s,d)){if(u=s[d],u==null)continue;Array.isArray(u)||(u=[u]),u.length&&(i+=d+": "+u.join("; ")+Je.LINE_BREAK)}return"--"+this.getBoundary()+Je.LINE_BREAK+i+Je.LINE_BREAK};Je.prototype._getContentDisposition=function(e,t){var n;if(typeof t.filepath=="string"?n=kb.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?n=kb.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Ro(e,"httpVersion")&&(n=kb.basename(e.client._httpMessage.path||"")),n)return'filename="'+VC(n)+'"'};Je.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e&&e.name&&(n=$b.lookup(e.name)),!n&&e&&e.path&&(n=$b.lookup(e.path)),!n&&e&&e.readable&&Ro(e,"httpVersion")&&(n=e.headers["content-type"]),!n&&(t.filepath||t.filename)&&(n=$b.lookup(t.filepath||t.filename)),!n&&e&&typeof e=="object"&&(n=Je.DEFAULT_CONTENT_TYPE),n};Je.prototype._multiPartFooter=function(){return function(e){var t=Je.LINE_BREAK,n=this._streams.length===0;n&&(t+=this._lastBoundary()),e(t)}.bind(this)};Je.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Je.LINE_BREAK};Je.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Ro(e,t)&&(n[t.toLowerCase()]=e[t]);return n};Je.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};Je.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Je.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,o=this._streams.length;n<o;n++)typeof this._streams[n]!="function"&&(Buffer.isBuffer(this._streams[n])?e=Buffer.concat([e,this._streams[n]]):e=Buffer.concat([e,Buffer.from(this._streams[n])]),(typeof this._streams[n]!="string"||this._streams[n].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(Je.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};Je.prototype._generateBoundary=function(){this._boundary="--------------------------"+$q.randomBytes(12).toString("hex")};Je.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};Je.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};Je.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}Dq.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,o){if(n){e(n);return}o.forEach(function(r){t+=r}),e(null,t)})};Je.prototype.submit=function(e,t){var n,o,r={method:"post"};return typeof e=="string"?(e=Cq(e),o=Db({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},r)):(o=Db(e,r),o.port||(o.port=o.protocol==="https:"?443:80)),o.headers=this.getHeaders(e.headers),o.protocol==="https:"?n=Rq.request(o):n=Iq.request(o),this.getLength(function(i,s){if(i&&i!=="Unknown stream"){this._error(i);return}if(s&&n.setHeader("Content-Length",s),this.pipe(n),t){var u,d=a(function(f,h){return n.removeListener("error",d),n.removeListener("response",u),t.call(this,f,h)},"callback");u=d.bind(this,null),n.on("error",d),n.on("response",u)}}.bind(this)),n};Je.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};Je.prototype.toString=function(){return"[object FormData]"};Nq(Je.prototype,"FormData");GC.exports=Je});var fu=z((uoe,a0)=>{"use strict";var Rf=Object.prototype.hasOwnProperty,i0=Object.prototype.toString,QC=Object.defineProperty,e0=Object.getOwnPropertyDescriptor,t0=a(function(t){return typeof Array.isArray=="function"?Array.isArray(t):i0.call(t)==="[object Array]"},"isArray"),r0=a(function(t){if(!t||i0.call(t)!=="[object Object]")return!1;var n=Rf.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&Rf.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!o)return!1;var r;for(r in t);return typeof r>"u"||Rf.call(t,r)},"isPlainObject"),n0=a(function(t,n){QC&&n.name==="__proto__"?QC(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},"setProperty"),o0=a(function(t,n){if(n==="__proto__")if(Rf.call(t,n)){if(e0)return e0(t,n).value}else return;return t[n]},"getProperty");a0.exports=a(function e(){var t,n,o,r,i,s,u=arguments[0],d=1,f=arguments.length,h=!1;for(typeof u=="boolean"&&(h=u,u=arguments[1]||{},d=2),(u==null||typeof u!="object"&&typeof u!="function")&&(u={});d<f;++d)if(t=arguments[d],t!=null)for(n in t)o=o0(u,n),r=o0(t,n),u!==r&&(h&&r&&(r0(r)||(i=t0(r)))?(i?(i=!1,s=o&&t0(o)?o:[]):s=o&&r0(o)?o:{},n0(u,{name:n,newValue:e(h,s,r)})):typeof r<"u"&&n0(u,{name:n,newValue:r}));return u},"extend")});var s0=z((doe,Vq)=>{Vq.exports={name:"gaxios",version:"7.1.3",description:"A simple common HTTP client specifically for Google APIs and services.",main:"build/cjs/src/index.js",types:"build/cjs/src/index.d.ts",files:["build/"],exports:{".":{import:{types:"./build/esm/src/index.d.ts",default:"./build/esm/src/index.js"},require:{types:"./build/cjs/src/index.d.ts",default:"./build/cjs/src/index.js"}}},scripts:{lint:"gts check --no-inline-config",test:"c8 mocha build/esm/test","presystem-test":"npm run compile","system-test":"mocha build/esm/system-test --timeout 80000",compile:"tsc -b ./tsconfig.json ./tsconfig.cjs.json && node utils/enable-esm.mjs",fix:"gts fix",prepare:"npm run compile",pretest:"npm run compile",webpack:"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js",docs:"jsdoc -c .jsdoc.js","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../",prelint:"cd samples; npm link ../; npm install",clean:"gts clean"},repository:{type:"git",directory:"packages/gaxios",url:"https://github.com/googleapis/google-cloud-node-core.git"},keywords:["google"],engines:{node:">=18"},author:"Google, LLC",license:"Apache-2.0",devDependencies:{"@babel/plugin-proposal-private-methods":"^7.18.6","@types/cors":"^2.8.6","@types/express":"^5.0.0","@types/extend":"^3.0.1","@types/mocha":"^10.0.10","@types/multiparty":"4.2.1","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^22.0.0","@types/sinon":"^17.0.0","@types/tmp":"0.2.6",assert:"^2.0.0",browserify:"^17.0.0",c8:"^10.0.0",cors:"^2.8.5",express:"^5.0.0",gts:"^6.0.0","is-docker":"^3.0.0",jsdoc:"^4.0.0","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1",linkinator:"^6.1.2",mocha:"^11.1.0",multiparty:"^4.2.1",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.0-beta.13","null-loader":"^4.0.0","pack-n-play":"^4.0.0",puppeteer:"^24.0.0",sinon:"^21.0.0","stream-browserify":"^3.0.0",tmp:"0.2.5","ts-loader":"^9.5.2",typescript:"^5.8.3",webpack:"^5.35.0","webpack-cli":"^6.0.1"},dependencies:{extend:"^3.0.2","https-proxy-agent":"^7.0.1","node-fetch":"^3.3.2",rimraf:"^5.0.1"},homepage:"https://github.com/googleapis/google-cloud-node-core/tree/main/packages/gaxios"}});var u0=z((poe,c0)=>{"use strict";var Gq=s0();c0.exports={pkg:Gq}});var jb=z(Mr=>{"use strict";var d0=Mr&&Mr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.GaxiosError=Mr.GAXIOS_ERROR_SYMBOL=void 0;Mr.defaultErrorRedactor=p0;var l0=d0(fu()),Hq=d0(u0()),Mb=Hq.default.pkg;Mr.GAXIOS_ERROR_SYMBOL=Symbol.for(`${Mb.name}-gaxios-error`);var Lb=class e extends Error{static{a(this,"GaxiosError")}config;response;code;status;error;[Mr.GAXIOS_ERROR_SYMBOL]=Mb.version;static[Symbol.hasInstance](t){return t&&typeof t=="object"&&Mr.GAXIOS_ERROR_SYMBOL in t&&t[Mr.GAXIOS_ERROR_SYMBOL]===Mb.version?!0:Function.prototype[Symbol.hasInstance].call(e,t)}constructor(t,n,o,r){if(super(t,{cause:r}),this.config=n,this.response=o,this.error=r instanceof Error?r:void 0,this.config=(0,l0.default)(!0,{},n),this.response&&(this.response.config=(0,l0.default)(!0,{},this.response.config)),this.response){try{this.response.data=Zq(this.config.responseType,this.response?.bodyUsed?this.response?.data:void 0)}catch{}this.status=this.response.status}r instanceof DOMException?this.code=r.name:r&&typeof r=="object"&&"code"in r&&(typeof r.code=="string"||typeof r.code=="number")&&(this.code=r.code)}static extractAPIErrorFromResponse(t,n="The request failed"){let o=n;if(typeof t.data=="string"&&(o=t.data),t.data&&typeof t.data=="object"&&"error"in t.data&&t.data.error&&!t.ok){if(typeof t.data.error=="string")return{message:t.data.error,code:t.status,status:t.statusText};if(typeof t.data.error=="object"){o="message"in t.data.error&&typeof t.data.error.message=="string"?t.data.error.message:o;let r="status"in t.data.error&&typeof t.data.error.status=="string"?t.data.error.status:t.statusText,i="code"in t.data.error&&typeof t.data.error.code=="number"?t.data.error.code:t.status;if("errors"in t.data.error&&Array.isArray(t.data.error.errors)){let s=[];for(let u of t.data.error.errors)typeof u=="object"&&"message"in u&&typeof u.message=="string"&&s.push(u.message);return Object.assign({message:s.join(`
|
|
3
|
+
`)||o,code:i,status:r},t.data.error)}return Object.assign({message:o,code:i,status:r},t.data.error)}}return{message:o,code:t.status,status:t.statusText}}};Mr.GaxiosError=Lb;function Zq(e,t){switch(e){case"stream":return t;case"json":return JSON.parse(JSON.stringify(t));case"arraybuffer":return JSON.parse(Buffer.from(t).toString("utf8"));case"blob":return JSON.parse(t.text());default:return t}}a(Zq,"translateData");function p0(e){let t="<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.";function n(i){i&&i.forEach((s,u)=>{(/^authentication$/i.test(u)||/^authorization$/i.test(u)||/secret/i.test(u))&&i.set(u,t)})}a(n,"redactHeaders");function o(i,s){if(typeof i=="object"&&i!==null&&typeof i[s]=="string"){let u=i[s];(/grant_type=/i.test(u)||/assertion=/i.test(u)||/secret/i.test(u))&&(i[s]=t)}}a(o,"redactString");function r(i){!i||typeof i!="object"||(i instanceof FormData||i instanceof URLSearchParams||"forEach"in i&&"set"in i?i.forEach((s,u)=>{(["grant_type","assertion"].includes(u)||/secret/.test(u))&&i.set(u,t)}):("grant_type"in i&&(i.grant_type=t),"assertion"in i&&(i.assertion=t),"client_secret"in i&&(i.client_secret=t)))}return a(r,"redactObject"),e.config&&(n(e.config.headers),o(e.config,"data"),r(e.config.data),o(e.config,"body"),r(e.config.body),e.config.url.searchParams.has("token")&&e.config.url.searchParams.set("token",t),e.config.url.searchParams.has("client_secret")&&e.config.url.searchParams.set("client_secret",t)),e.response&&(p0({config:e.response.config}),n(e.response.headers),e.response.bodyUsed&&(o(e.response,"data"),r(e.response.data))),e}a(p0,"defaultErrorRedactor")});var m0=z(Fb=>{"use strict";Object.defineProperty(Fb,"__esModule",{value:!0});Fb.getRetryConfig=Wq;async function Wq(e){let t=f0(e);if(!e||!e.config||!t&&!e.config.retry)return{shouldRetry:!1};t=t||{},t.currentRetryAttempt=t.currentRetryAttempt||0,t.retry=t.retry===void 0||t.retry===null?3:t.retry,t.httpMethodsToRetry=t.httpMethodsToRetry||["GET","HEAD","PUT","OPTIONS","DELETE"],t.noResponseRetries=t.noResponseRetries===void 0||t.noResponseRetries===null?2:t.noResponseRetries,t.retryDelayMultiplier=t.retryDelayMultiplier?t.retryDelayMultiplier:2,t.timeOfFirstRequest=t.timeOfFirstRequest?t.timeOfFirstRequest:Date.now(),t.totalTimeout=t.totalTimeout?t.totalTimeout:Number.MAX_SAFE_INTEGER,t.maxRetryDelay=t.maxRetryDelay?t.maxRetryDelay:Number.MAX_SAFE_INTEGER;let n=[[100,199],[408,408],[429,429],[500,599]];if(t.statusCodesToRetry=t.statusCodesToRetry||n,e.config.retryConfig=t,!await(t.shouldRetry||Kq)(e))return{shouldRetry:!1,config:e.config};let r=Jq(t);e.config.retryConfig.currentRetryAttempt+=1;let i=t.retryBackoff?t.retryBackoff(e,r):new Promise(s=>{setTimeout(s,r)});return t.onRetryAttempt&&await t.onRetryAttempt(e),await i,{shouldRetry:!0,config:e.config}}a(Wq,"getRetryConfig");function Kq(e){let t=f0(e);if(e.config.signal?.aborted&&e.code!=="TimeoutError"||e.code==="AbortError"||!t||t.retry===0||!e.response&&(t.currentRetryAttempt||0)>=t.noResponseRetries||!t.httpMethodsToRetry||!t.httpMethodsToRetry.includes(e.config.method?.toUpperCase()||"GET"))return!1;if(e.response&&e.response.status){let n=!1;for(let[o,r]of t.statusCodesToRetry){let i=e.response.status;if(i>=o&&i<=r){n=!0;break}}if(!n)return!1}return t.currentRetryAttempt=t.currentRetryAttempt||0,!(t.currentRetryAttempt>=t.retry)}a(Kq,"shouldRetryRequest");function f0(e){if(e&&e.config&&e.config.retryConfig)return e.config.retryConfig}a(f0,"getConfig");function Jq(e){let n=(e.currentRetryAttempt?0:e.retryDelay??100)+(Math.pow(e.retryDelayMultiplier,e.currentRetryAttempt)-1)/2*1e3,o=e.totalTimeout-(Date.now()-e.timeOfFirstRequest);return Math.min(n,o,e.maxRetryDelay)}a(Jq,"getNextRetryDelay")});var qb=z(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.GaxiosInterceptorManager=void 0;var Bb=class extends Set{static{a(this,"GaxiosInterceptorManager")}};Cf.GaxiosInterceptorManager=Bb});var g0=z((_oe,h0)=>{var ka=1e3,$a=ka*60,Da=$a*60,yi=Da*24,Yq=yi*7,Xq=yi*365.25;h0.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Qq(e);if(n==="number"&&isFinite(e))return t.long?t4(e):e4(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Qq(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),o=(t[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return n*Xq;case"weeks":case"week":case"w":return n*Yq;case"days":case"day":case"d":return n*yi;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Da;case"minutes":case"minute":case"mins":case"min":case"m":return n*$a;case"seconds":case"second":case"secs":case"sec":case"s":return n*ka;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}a(Qq,"parse");function e4(e){var t=Math.abs(e);return t>=yi?Math.round(e/yi)+"d":t>=Da?Math.round(e/Da)+"h":t>=$a?Math.round(e/$a)+"m":t>=ka?Math.round(e/ka)+"s":e+"ms"}a(e4,"fmtShort");function t4(e){var t=Math.abs(e);return t>=yi?Of(e,t,yi,"day"):t>=Da?Of(e,t,Da,"hour"):t>=$a?Of(e,t,$a,"minute"):t>=ka?Of(e,t,ka,"second"):e+" ms"}a(t4,"fmtLong");function Of(e,t,n,o){var r=t>=n*1.5;return Math.round(e/n)+" "+o+(r?"s":"")}a(Of,"plural")});var Vb=z((Eoe,y0)=>{function r4(e){n.debug=n,n.default=n,n.coerce=d,n.disable=s,n.enable=r,n.enabled=u,n.humanize=g0(),n.destroy=f,Object.keys(e).forEach(h=>{n[h]=e[h]}),n.names=[],n.skips=[],n.formatters={};function t(h){let g=0;for(let m=0;m<h.length;m++)g=(g<<5)-g+h.charCodeAt(m),g|=0;return n.colors[Math.abs(g)%n.colors.length]}a(t,"selectColor"),n.selectColor=t;function n(h){let g,m=null,p,y;function v(...E){if(!v.enabled)return;let b=v,k=Number(new Date),N=k-(g||k);b.diff=N,b.prev=g,b.curr=k,g=k,E[0]=n.coerce(E[0]),typeof E[0]!="string"&&E.unshift("%O");let Z=0;E[0]=E[0].replace(/%([a-zA-Z%])/g,(K,ee)=>{if(K==="%%")return"%";Z++;let se=n.formatters[ee];if(typeof se=="function"){let Q=E[Z];K=se.call(b,Q),E.splice(Z,1),Z--}return K}),n.formatArgs.call(b,E),(b.log||n.log).apply(b,E)}return a(v,"debug"),v.namespace=h,v.useColors=n.useColors(),v.color=n.selectColor(h),v.extend=o,v.destroy=n.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:a(()=>m!==null?m:(p!==n.namespaces&&(p=n.namespaces,y=n.enabled(h)),y),"get"),set:a(E=>{m=E},"set")}),typeof n.init=="function"&&n.init(v),v}a(n,"createDebug");function o(h,g){let m=n(this.namespace+(typeof g>"u"?":":g)+h);return m.log=this.log,m}a(o,"extend");function r(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let g=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let m of g)m[0]==="-"?n.skips.push(m.slice(1)):n.names.push(m)}a(r,"enable");function i(h,g){let m=0,p=0,y=-1,v=0;for(;m<h.length;)if(p<g.length&&(g[p]===h[m]||g[p]==="*"))g[p]==="*"?(y=p,v=m,p++):(m++,p++);else if(y!==-1)p=y+1,v++,m=v;else return!1;for(;p<g.length&&g[p]==="*";)p++;return p===g.length}a(i,"matchesTemplate");function s(){let h=[...n.names,...n.skips.map(g=>"-"+g)].join(",");return n.enable(""),h}a(s,"disable");function u(h){for(let g of n.skips)if(i(h,g))return!1;for(let g of n.names)if(i(h,g))return!0;return!1}a(u,"enabled");function d(h){return h instanceof Error?h.stack||h.message:h}a(d,"coerce");function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return a(f,"destroy"),n.enable(n.load()),n}a(r4,"setup");y0.exports=r4});var v0=z((cr,kf)=>{cr.formatArgs=o4;cr.save=i4;cr.load=a4;cr.useColors=n4;cr.storage=s4();cr.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();cr.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 n4(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}a(n4,"useColors");function o4(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+kf.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let n=0,o=0;e[0].replace(/%[a-zA-Z%]/g,r=>{r!=="%%"&&(n++,r==="%c"&&(o=n))}),e.splice(o,0,t)}a(o4,"formatArgs");cr.log=console.debug||console.log||(()=>{});function i4(e){try{e?cr.storage.setItem("debug",e):cr.storage.removeItem("debug")}catch{}}a(i4,"save");function a4(){let e;try{e=cr.storage.getItem("debug")||cr.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}a(a4,"load");function s4(){try{return localStorage}catch{}}a(s4,"localstorage");kf.exports=Vb()(cr);var{formatters:c4}=kf.exports;c4.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var b0=z((Poe,_0)=>{"use strict";_0.exports=(e,t=process.argv)=>{let n=e.startsWith("-")?"":e.length===1?"-":"--",o=t.indexOf(n+e),r=t.indexOf("--");return o!==-1&&(r===-1||o<r)}});var T0=z((woe,S0)=>{"use strict";var u4=require("os"),E0=require("tty"),Lr=b0(),{env:Mt}=process,Co;Lr("no-color")||Lr("no-colors")||Lr("color=false")||Lr("color=never")?Co=0:(Lr("color")||Lr("colors")||Lr("color=true")||Lr("color=always"))&&(Co=1);"FORCE_COLOR"in Mt&&(Mt.FORCE_COLOR==="true"?Co=1:Mt.FORCE_COLOR==="false"?Co=0:Co=Mt.FORCE_COLOR.length===0?1:Math.min(parseInt(Mt.FORCE_COLOR,10),3));function Gb(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}a(Gb,"translateLevel");function Hb(e,t){if(Co===0)return 0;if(Lr("color=16m")||Lr("color=full")||Lr("color=truecolor"))return 3;if(Lr("color=256"))return 2;if(e&&!t&&Co===void 0)return 0;let n=Co||0;if(Mt.TERM==="dumb")return n;if(process.platform==="win32"){let o=u4.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Mt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(o=>o in Mt)||Mt.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Mt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Mt.TEAMCITY_VERSION)?1:0;if(Mt.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Mt){let o=parseInt((Mt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Mt.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Mt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Mt.TERM)||"COLORTERM"in Mt?1:n}a(Hb,"supportsColor");function l4(e){let t=Hb(e,e&&e.isTTY);return Gb(t)}a(l4,"getSupportLevel");S0.exports={supportsColor:l4,stdout:Gb(Hb(!0,E0.isatty(1))),stderr:Gb(Hb(!0,E0.isatty(2)))}});var w0=z((Lt,Df)=>{var d4=require("tty"),$f=require("util");Lt.init=v4;Lt.log=h4;Lt.formatArgs=f4;Lt.save=g4;Lt.load=y4;Lt.useColors=p4;Lt.destroy=$f.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Lt.colors=[6,2,3,4,5,1];try{let e=T0();e&&(e.stderr||e).level>=2&&(Lt.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{}Lt.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(r,i)=>i.toUpperCase()),o=process.env[t];return/^(yes|on|true|enabled)$/i.test(o)?o=!0:/^(no|off|false|disabled)$/i.test(o)?o=!1:o==="null"?o=null:o=Number(o),e[n]=o,e},{});function p4(){return"colors"in Lt.inspectOpts?!!Lt.inspectOpts.colors:d4.isatty(process.stderr.fd)}a(p4,"useColors");function f4(e){let{namespace:t,useColors:n}=this;if(n){let o=this.color,r="\x1B[3"+(o<8?o:"8;5;"+o),i=` ${r};1m${t} \x1B[0m`;e[0]=i+e[0].split(`
|
|
4
4
|
`).join(`
|
|
5
|
-
`+
|
|
6
|
-
`)}
|
|
7
|
-
`).map(
|
|
8
|
-
`).some(
|
|
5
|
+
`+i),e.push(r+"m+"+Df.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=m4()+t+" "+e[0]}a(f4,"formatArgs");function m4(){return Lt.inspectOpts.hideDate?"":new Date().toISOString()+" "}a(m4,"getDate");function h4(...e){return process.stderr.write($f.formatWithOptions(Lt.inspectOpts,...e)+`
|
|
6
|
+
`)}a(h4,"log");function g4(e){e?process.env.DEBUG=e:delete process.env.DEBUG}a(g4,"save");function y4(){return process.env.DEBUG}a(y4,"load");function v4(e){e.inspectOpts={};let t=Object.keys(Lt.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=Lt.inspectOpts[t[n]]}a(v4,"init");Df.exports=Vb()(Lt);var{formatters:P0}=Df.exports;P0.o=function(e){return this.inspectOpts.colors=this.useColors,$f.inspect(e,this.inspectOpts).split(`
|
|
7
|
+
`).map(t=>t.trim()).join(" ")};P0.O=function(e){return this.inspectOpts.colors=this.useColors,$f.inspect(e,this.inspectOpts)}});var Wb=z((Ioe,Zb)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Zb.exports=v0():Zb.exports=w0()});var I0=z(ur=>{"use strict";var _4=ur&&ur.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),b4=ur&&ur.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),x0=ur&&ur.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&_4(t,e,n);return b4(t,e),t};Object.defineProperty(ur,"__esModule",{value:!0});ur.req=ur.json=ur.toBuffer=void 0;var E4=x0(require("http")),S4=x0(require("https"));async function A0(e){let t=0,n=[];for await(let o of e)t+=o.length,n.push(o);return Buffer.concat(n,t)}a(A0,"toBuffer");ur.toBuffer=A0;async function T4(e){let n=(await A0(e)).toString("utf8");try{return JSON.parse(n)}catch(o){let r=o;throw r.message+=` (input: ${n})`,r}}a(T4,"json");ur.json=T4;function P4(e,t={}){let o=((typeof e=="string"?e:e.href).startsWith("https:")?S4:E4).request(e,t),r=new Promise((i,s)=>{o.once("response",i).once("error",s).end()});return o.then=r.then.bind(r),o}a(P4,"req");ur.req=P4});var k0=z(br=>{"use strict";var C0=br&&br.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),w4=br&&br.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),O0=br&&br.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&C0(t,e,n);return w4(t,e),t},x4=br&&br.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&C0(t,e,n)};Object.defineProperty(br,"__esModule",{value:!0});br.Agent=void 0;var A4=O0(require("net")),R0=O0(require("http")),I4=require("https");x4(I0(),br);var hn=Symbol("AgentBaseInternalState"),Kb=class extends R0.Agent{static{a(this,"Agent")}constructor(t){super(t),this[hn]={}}isSecureEndpoint(t){if(t){if(typeof t.secureEndpoint=="boolean")return t.secureEndpoint;if(typeof t.protocol=="string")return t.protocol==="https:"}let{stack:n}=new Error;return typeof n!="string"?!1:n.split(`
|
|
8
|
+
`).some(o=>o.indexOf("(https.js:")!==-1||o.indexOf("node:https:")!==-1)}incrementSockets(t){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[t]||(this.sockets[t]=[]);let n=new A4.Socket({writable:!1});return this.sockets[t].push(n),this.totalSocketCount++,n}decrementSockets(t,n){if(!this.sockets[t]||n===null)return;let o=this.sockets[t],r=o.indexOf(n);r!==-1&&(o.splice(r,1),this.totalSocketCount--,o.length===0&&delete this.sockets[t])}getName(t){return this.isSecureEndpoint(t)?I4.Agent.prototype.getName.call(this,t):super.getName(t)}createSocket(t,n,o){let r={...n,secureEndpoint:this.isSecureEndpoint(n)},i=this.getName(r),s=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(t,r)).then(u=>{if(this.decrementSockets(i,s),u instanceof R0.Agent)try{return u.addRequest(t,r)}catch(d){return o(d)}this[hn].currentSocket=u,super.createSocket(t,n,o)},u=>{this.decrementSockets(i,s),o(u)})}createConnection(){let t=this[hn].currentSocket;if(this[hn].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[hn].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(t){this[hn]&&(this[hn].defaultPort=t)}get protocol(){return this[hn].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[hn]&&(this[hn].protocol=t)}};br.Agent=Kb});var $0=z(Na=>{"use strict";var R4=Na&&Na.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Na,"__esModule",{value:!0});Na.parseProxyResponse=void 0;var C4=R4(Wb()),Nf=(0,C4.default)("https-proxy-agent:parse-proxy-response");function O4(e){return new Promise((t,n)=>{let o=0,r=[];function i(){let h=e.read();h?f(h):e.once("readable",i)}a(i,"read");function s(){e.removeListener("end",u),e.removeListener("error",d),e.removeListener("readable",i)}a(s,"cleanup");function u(){s(),Nf("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}a(u,"onend");function d(h){s(),Nf("onerror %o",h),n(h)}a(d,"onerror");function f(h){r.push(h),o+=h.length;let g=Buffer.concat(r,o),m=g.indexOf(`\r
|
|
9
9
|
\r
|
|
10
|
-
`);if(
|
|
11
|
-
`),
|
|
12
|
-
`;if(
|
|
13
|
-
`;let
|
|
14
|
-
`);let{connect:m,buffered:y}=await p;if(e.emit("proxyConnect",m),this.emit("proxyConnect",m,e),m.statusCode===200)return e.once("socket",b$),r.secureEndpoint?(fa("Upgrading socket connection to TLS"),wE.connect({...PE(TE(r),"host","path","port"),socket:i})):i;i.destroy();let h=new vu.Socket({writable:!1});return h.readable=!0,e.once("socket",f=>{fa("Replaying proxy buffer for failed request"),(0,h$.default)(f.listenerCount("data")>0),f.push(y),f.push(null)}),h}};_u.protocols=["http","https"];hr.HttpsProxyAgent=_u;function b$(t){t.resume()}o(b$,"resume");function PE(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}o(PE,"omit")});function E$(t){if(!/^data:/i.test(t))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');t=t.replace(/\r?\n/g,"");let e=t.indexOf(",");if(e===-1||e<=4)throw new TypeError("malformed data: URI");let r=t.substring(5,e).split(";"),n="",i=!1,s=r[0]||"text/plain",c=s;for(let y=1;y<r.length;y++)r[y]==="base64"?i=!0:r[y]&&(c+=`;${r[y]}`,r[y].indexOf("charset=")===0&&(n=r[y].substring(8)));!r[0]&&!n.length&&(c+=";charset=US-ASCII",n="US-ASCII");let d=i?"base64":"ascii",p=unescape(t.substring(e+1)),m=Buffer.from(p,d);return m.type=s,m.typeFull=c,m.charset=n,m}var RE,CE=Tt(()=>{o(E$,"dataUriToBuffer");RE=E$});var kE=D((bu,OE)=>{(function(t,e){typeof bu=="object"&&typeof OE<"u"?e(bu):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.WebStreamsPolyfill={}))})(bu,(function(t){"use strict";function e(){}o(e,"noop");function r(a){return typeof a=="object"&&a!==null||typeof a=="function"}o(r,"typeIsObject");let n=e;function i(a,u){try{Object.defineProperty(a,"name",{value:u,configurable:!0})}catch{}}o(i,"setFunctionName");let s=Promise,c=Promise.prototype.then,d=Promise.reject.bind(s);function p(a){return new s(a)}o(p,"newPromise");function m(a){return p(u=>u(a))}o(m,"promiseResolvedWith");function y(a){return d(a)}o(y,"promiseRejectedWith");function h(a,u,_){return c.call(a,u,_)}o(h,"PerformPromiseThen");function f(a,u,_){h(h(a,u,_),void 0,n)}o(f,"uponPromise");function l(a,u){f(a,u)}o(l,"uponFulfillment");function g(a,u){f(a,void 0,u)}o(g,"uponRejection");function v(a,u,_){return h(a,u,_)}o(v,"transformPromiseWith");function E(a){h(a,void 0,n)}o(E,"setPromiseIsHandledToTrue");let b=o(a=>{if(typeof queueMicrotask=="function")b=queueMicrotask;else{let u=m(void 0);b=o(_=>h(u,_),"_queueMicrotask")}return b(a)},"_queueMicrotask");function C(a,u,_){if(typeof a!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(a,u,_)}o(C,"reflectCall");function U(a,u,_){try{return m(C(a,u,_))}catch(T){return y(T)}}o(U,"promiseCall");let J=16384;class Z{static{o(this,"SimpleQueue")}constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(u){let _=this._back,T=_;_._elements.length===J-1&&(T={_elements:[],_next:void 0}),_._elements.push(u),T!==_&&(this._back=T,_._next=T),++this._size}shift(){let u=this._front,_=u,T=this._cursor,A=T+1,L=u._elements,q=L[T];return A===J&&(_=u._next,A=0),--this._size,this._cursor=A,u!==_&&(this._front=_),L[T]=void 0,q}forEach(u){let _=this._cursor,T=this._front,A=T._elements;for(;(_!==A.length||T._next!==void 0)&&!(_===A.length&&(T=T._next,A=T._elements,_=0,A.length===0));)u(A[_]),++_}peek(){let u=this._front,_=this._cursor;return u._elements[_]}}let H=Symbol("[[AbortSteps]]"),K=Symbol("[[ErrorSteps]]"),te=Symbol("[[CancelSteps]]"),Q=Symbol("[[PullSteps]]"),xe=Symbol("[[ReleaseSteps]]");function re(a,u){a._ownerReadableStream=u,u._reader=a,u._state==="readable"?Y(a):u._state==="closed"?ue(a):ie(a,u._storedError)}o(re,"ReadableStreamReaderGenericInitialize");function V(a,u){let _=a._ownerReadableStream;return Tr(_,u)}o(V,"ReadableStreamReaderGenericCancel");function B(a){let u=a._ownerReadableStream;u._state==="readable"?Ce(a,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):De(a,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),u._readableStreamController[xe](),u._reader=void 0,a._ownerReadableStream=void 0}o(B,"ReadableStreamReaderGenericRelease");function X(a){return new TypeError("Cannot "+a+" a stream using a released reader")}o(X,"readerLockException");function Y(a){a._closedPromise=p((u,_)=>{a._closedPromise_resolve=u,a._closedPromise_reject=_})}o(Y,"defaultReaderClosedPromiseInitialize");function ie(a,u){Y(a),Ce(a,u)}o(ie,"defaultReaderClosedPromiseInitializeAsRejected");function ue(a){Y(a),Ke(a)}o(ue,"defaultReaderClosedPromiseInitializeAsResolved");function Ce(a,u){a._closedPromise_reject!==void 0&&(E(a._closedPromise),a._closedPromise_reject(u),a._closedPromise_resolve=void 0,a._closedPromise_reject=void 0)}o(Ce,"defaultReaderClosedPromiseReject");function De(a,u){ie(a,u)}o(De,"defaultReaderClosedPromiseResetToRejected");function Ke(a){a._closedPromise_resolve!==void 0&&(a._closedPromise_resolve(void 0),a._closedPromise_resolve=void 0,a._closedPromise_reject=void 0)}o(Ke,"defaultReaderClosedPromiseResolve");let et=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},wt=Math.trunc||function(a){return a<0?Math.ceil(a):Math.floor(a)};function ee(a){return typeof a=="object"||typeof a=="function"}o(ee,"isDictionary");function lt(a,u){if(a!==void 0&&!ee(a))throw new TypeError(`${u} is not an object.`)}o(lt,"assertDictionary");function mt(a,u){if(typeof a!="function")throw new TypeError(`${u} is not a function.`)}o(mt,"assertFunction");function Ht(a){return typeof a=="object"&&a!==null||typeof a=="function"}o(Ht,"isObject");function We(a,u){if(!Ht(a))throw new TypeError(`${u} is not an object.`)}o(We,"assertObject");function Ye(a,u,_){if(a===void 0)throw new TypeError(`Parameter ${u} is required in '${_}'.`)}o(Ye,"assertRequiredArgument");function S(a,u,_){if(a===void 0)throw new TypeError(`${u} is required in '${_}'.`)}o(S,"assertRequiredField");function P(a){return Number(a)}o(P,"convertUnrestrictedDouble");function x(a){return a===0?0:a}o(x,"censorNegativeZero");function z(a){return x(wt(a))}o(z,"integerPart");function R(a,u){let T=Number.MAX_SAFE_INTEGER,A=Number(a);if(A=x(A),!et(A))throw new TypeError(`${u} is not a finite number`);if(A=z(A),A<0||A>T)throw new TypeError(`${u} is outside the accepted range of 0 to ${T}, inclusive`);return!et(A)||A===0?0:A}o(R,"convertUnsignedLongLongWithEnforceRange");function $(a,u){if(!On(a))throw new TypeError(`${u} is not a ReadableStream.`)}o($,"assertReadableStream");function j(a){return new G(a)}o(j,"AcquireReadableStreamDefaultReader");function I(a,u){a._reader._readRequests.push(u)}o(I,"ReadableStreamAddReadRequest");function O(a,u,_){let A=a._reader._readRequests.shift();_?A._closeSteps():A._chunkSteps(u)}o(O,"ReadableStreamFulfillReadRequest");function M(a){return a._reader._readRequests.length}o(M,"ReadableStreamGetNumReadRequests");function N(a){let u=a._reader;return!(u===void 0||!ce(u))}o(N,"ReadableStreamHasDefaultReader");class G{static{o(this,"ReadableStreamDefaultReader")}constructor(u){if(Ye(u,1,"ReadableStreamDefaultReader"),$(u,"First parameter"),kn(u))throw new TypeError("This stream has already been locked for exclusive reading by another reader");re(this,u),this._readRequests=new Z}get closed(){return ce(this)?this._closedPromise:y(at("closed"))}cancel(u=void 0){return ce(this)?this._ownerReadableStream===void 0?y(X("cancel")):V(this,u):y(at("cancel"))}read(){if(!ce(this))return y(at("read"));if(this._ownerReadableStream===void 0)return y(X("read from"));let u,_,T=p((L,q)=>{u=L,_=q});return pe(this,{_chunkSteps:o(L=>u({value:L,done:!1}),"_chunkSteps"),_closeSteps:o(()=>u({value:void 0,done:!0}),"_closeSteps"),_errorSteps:o(L=>_(L),"_errorSteps")}),T}releaseLock(){if(!ce(this))throw at("releaseLock");this._ownerReadableStream!==void 0&&Fe(this)}}Object.defineProperties(G.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),i(G.prototype.cancel,"cancel"),i(G.prototype.read,"read"),i(G.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(G.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function ce(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_readRequests")?!1:a instanceof G}o(ce,"IsReadableStreamDefaultReader");function pe(a,u){let _=a._ownerReadableStream;_._disturbed=!0,_._state==="closed"?u._closeSteps():_._state==="errored"?u._errorSteps(_._storedError):_._readableStreamController[Q](u)}o(pe,"ReadableStreamDefaultReaderRead");function Fe(a){B(a);let u=new TypeError("Reader was released");it(a,u)}o(Fe,"ReadableStreamDefaultReaderRelease");function it(a,u){let _=a._readRequests;a._readRequests=new Z,_.forEach(T=>{T._errorSteps(u)})}o(it,"ReadableStreamDefaultReaderErrorReadRequests");function at(a){return new TypeError(`ReadableStreamDefaultReader.prototype.${a} can only be used on a ReadableStreamDefaultReader`)}o(at,"defaultReaderBrandCheckException");let je=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class He{static{o(this,"ReadableStreamAsyncIteratorImpl")}constructor(u,_){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=u,this._preventCancel=_}next(){let u=o(()=>this._nextSteps(),"nextSteps");return this._ongoingPromise=this._ongoingPromise?v(this._ongoingPromise,u,u):u(),this._ongoingPromise}return(u){let _=o(()=>this._returnSteps(u),"returnSteps");return this._ongoingPromise?v(this._ongoingPromise,_,_):_()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let u=this._reader,_,T,A=p((q,se)=>{_=q,T=se});return pe(u,{_chunkSteps:o(q=>{this._ongoingPromise=void 0,b(()=>_({value:q,done:!1}))},"_chunkSteps"),_closeSteps:o(()=>{this._ongoingPromise=void 0,this._isFinished=!0,B(u),_({value:void 0,done:!0})},"_closeSteps"),_errorSteps:o(q=>{this._ongoingPromise=void 0,this._isFinished=!0,B(u),T(q)},"_errorSteps")}),A}_returnSteps(u){if(this._isFinished)return Promise.resolve({value:u,done:!0});this._isFinished=!0;let _=this._reader;if(!this._preventCancel){let T=V(_,u);return B(_),v(T,()=>({value:u,done:!0}))}return B(_),m({value:u,done:!0})}}let bt={next(){return Ro(this)?this._asyncIteratorImpl.next():y(Co("next"))},return(a){return Ro(this)?this._asyncIteratorImpl.return(a):y(Co("return"))}};Object.setPrototypeOf(bt,je);function Io(a,u){let _=j(a),T=new He(_,u),A=Object.create(bt);return A._asyncIteratorImpl=T,A}o(Io,"AcquireReadableStreamAsyncIterator");function Ro(a){if(!r(a)||!Object.prototype.hasOwnProperty.call(a,"_asyncIteratorImpl"))return!1;try{return a._asyncIteratorImpl instanceof He}catch{return!1}}o(Ro,"IsReadableStreamAsyncIterator");function Co(a){return new TypeError(`ReadableStreamAsyncIterator.${a} can only be used on a ReadableSteamAsyncIterator`)}o(Co,"streamAsyncIteratorBrandCheckException");let Wt=Number.isNaN||function(a){return a!==a};var rn,Rt,Et;function Xe(a){return a.slice()}o(Xe,"CreateArrayFromList");function ch(a,u,_,T,A){new Uint8Array(a).set(new Uint8Array(_,T,A),u)}o(ch,"CopyDataBlockBytes");let nn=o(a=>(typeof a.transfer=="function"?nn=o(u=>u.transfer(),"TransferArrayBuffer"):typeof structuredClone=="function"?nn=o(u=>structuredClone(u,{transfer:[u]}),"TransferArrayBuffer"):nn=o(u=>u,"TransferArrayBuffer"),nn(a)),"TransferArrayBuffer"),An=o(a=>(typeof a.detached=="boolean"?An=o(u=>u.detached,"IsDetachedBuffer"):An=o(u=>u.byteLength===0,"IsDetachedBuffer"),An(a)),"IsDetachedBuffer");function lh(a,u,_){if(a.slice)return a.slice(u,_);let T=_-u,A=new ArrayBuffer(T);return ch(A,0,a,u,T),A}o(lh,"ArrayBufferSlice");function ts(a,u){let _=a[u];if(_!=null){if(typeof _!="function")throw new TypeError(`${String(u)} is not a function`);return _}}o(ts,"GetMethod");function uA(a){let u={[Symbol.iterator]:()=>a.iterator},_=(async function*(){return yield*u})(),T=_.next;return{iterator:_,nextMethod:T,done:!1}}o(uA,"CreateAsyncFromSyncIterator");let rl=(Et=(rn=Symbol.asyncIterator)!==null&&rn!==void 0?rn:(Rt=Symbol.for)===null||Rt===void 0?void 0:Rt.call(Symbol,"Symbol.asyncIterator"))!==null&&Et!==void 0?Et:"@@asyncIterator";function dh(a,u="sync",_){if(_===void 0)if(u==="async"){if(_=ts(a,rl),_===void 0){let L=ts(a,Symbol.iterator),q=dh(a,"sync",L);return uA(q)}}else _=ts(a,Symbol.iterator);if(_===void 0)throw new TypeError("The object is not iterable");let T=C(_,a,[]);if(!r(T))throw new TypeError("The iterator method must return an object");let A=T.next;return{iterator:T,nextMethod:A,done:!1}}o(dh,"GetIterator");function cA(a){let u=C(a.nextMethod,a.iterator,[]);if(!r(u))throw new TypeError("The iterator.next() method must return an object");return u}o(cA,"IteratorNext");function lA(a){return!!a.done}o(lA,"IteratorComplete");function dA(a){return a.value}o(dA,"IteratorValue");function pA(a){return!(typeof a!="number"||Wt(a)||a<0)}o(pA,"IsNonNegativeNumber");function ph(a){let u=lh(a.buffer,a.byteOffset,a.byteOffset+a.byteLength);return new Uint8Array(u)}o(ph,"CloneAsUint8Array");function nl(a){let u=a._queue.shift();return a._queueTotalSize-=u.size,a._queueTotalSize<0&&(a._queueTotalSize=0),u.value}o(nl,"DequeueValue");function ol(a,u,_){if(!pA(_)||_===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");a._queue.push({value:u,size:_}),a._queueTotalSize+=_}o(ol,"EnqueueValueWithSize");function fA(a){return a._queue.peek().value}o(fA,"PeekQueueValue");function In(a){a._queue=new Z,a._queueTotalSize=0}o(In,"ResetQueue");function fh(a){return a===DataView}o(fh,"isDataViewConstructor");function mA(a){return fh(a.constructor)}o(mA,"isDataView");function hA(a){return fh(a)?1:a.BYTES_PER_ELEMENT}o(hA,"arrayBufferViewElementSize");class to{static{o(this,"ReadableStreamBYOBRequest")}constructor(){throw new TypeError("Illegal constructor")}get view(){if(!il(this))throw ll("view");return this._view}respond(u){if(!il(this))throw ll("respond");if(Ye(u,1,"respond"),u=R(u,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(An(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");is(this._associatedReadableByteStreamController,u)}respondWithNewView(u){if(!il(this))throw ll("respondWithNewView");if(Ye(u,1,"respondWithNewView"),!ArrayBuffer.isView(u))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(An(u.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");as(this._associatedReadableByteStreamController,u)}}Object.defineProperties(to.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),i(to.prototype.respond,"respond"),i(to.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(to.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class on{static{o(this,"ReadableByteStreamController")}constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!ro(this))throw ki("byobRequest");return cl(this)}get desiredSize(){if(!ro(this))throw ki("desiredSize");return wh(this)}close(){if(!ro(this))throw ki("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let u=this._controlledReadableByteStream._state;if(u!=="readable")throw new TypeError(`The stream (in ${u} state) is not in the readable state and cannot be closed`);Oi(this)}enqueue(u){if(!ro(this))throw ki("enqueue");if(Ye(u,1,"enqueue"),!ArrayBuffer.isView(u))throw new TypeError("chunk must be an array buffer view");if(u.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(u.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");let _=this._controlledReadableByteStream._state;if(_!=="readable")throw new TypeError(`The stream (in ${_} state) is not in the readable state and cannot be enqueued to`);os(this,u)}error(u=void 0){if(!ro(this))throw ki("error");cr(this,u)}[te](u){mh(this),In(this);let _=this._cancelAlgorithm(u);return ns(this),_}[Q](u){let _=this._controlledReadableByteStream;if(this._queueTotalSize>0){Sh(this,u);return}let T=this._autoAllocateChunkSize;if(T!==void 0){let A;try{A=new ArrayBuffer(T)}catch(q){u._errorSteps(q);return}let L={buffer:A,bufferByteLength:T,byteOffset:0,byteLength:T,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(L)}I(_,u),no(this)}[xe](){if(this._pendingPullIntos.length>0){let u=this._pendingPullIntos.peek();u.readerType="none",this._pendingPullIntos=new Z,this._pendingPullIntos.push(u)}}}Object.defineProperties(on.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),i(on.prototype.close,"close"),i(on.prototype.enqueue,"enqueue"),i(on.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(on.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function ro(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_controlledReadableByteStream")?!1:a instanceof on}o(ro,"IsReadableByteStreamController");function il(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_associatedReadableByteStreamController")?!1:a instanceof to}o(il,"IsReadableStreamBYOBRequest");function no(a){if(!bA(a))return;if(a._pulling){a._pullAgain=!0;return}a._pulling=!0;let _=a._pullAlgorithm();f(_,()=>(a._pulling=!1,a._pullAgain&&(a._pullAgain=!1,no(a)),null),T=>(cr(a,T),null))}o(no,"ReadableByteStreamControllerCallPullIfNeeded");function mh(a){sl(a),a._pendingPullIntos=new Z}o(mh,"ReadableByteStreamControllerClearPendingPullIntos");function al(a,u){let _=!1;a._state==="closed"&&(_=!0);let T=hh(u);u.readerType==="default"?O(a,T,_):xA(a,T,_)}o(al,"ReadableByteStreamControllerCommitPullIntoDescriptor");function hh(a){let u=a.bytesFilled,_=a.elementSize;return new a.viewConstructor(a.buffer,a.byteOffset,u/_)}o(hh,"ReadableByteStreamControllerConvertPullIntoDescriptor");function rs(a,u,_,T){a._queue.push({buffer:u,byteOffset:_,byteLength:T}),a._queueTotalSize+=T}o(rs,"ReadableByteStreamControllerEnqueueChunkToQueue");function gh(a,u,_,T){let A;try{A=lh(u,_,_+T)}catch(L){throw cr(a,L),L}rs(a,A,0,T)}o(gh,"ReadableByteStreamControllerEnqueueClonedChunkToQueue");function yh(a,u){u.bytesFilled>0&&gh(a,u.buffer,u.byteOffset,u.bytesFilled),Oo(a)}o(yh,"ReadableByteStreamControllerEnqueueDetachedPullIntoToQueue");function vh(a,u){let _=Math.min(a._queueTotalSize,u.byteLength-u.bytesFilled),T=u.bytesFilled+_,A=_,L=!1,q=T%u.elementSize,se=T-q;se>=u.minimumFill&&(A=se-u.bytesFilled,L=!0);let _e=a._queue;for(;A>0;){let me=_e.peek(),Ae=Math.min(A,me.byteLength),Ne=u.byteOffset+u.bytesFilled;ch(u.buffer,Ne,me.buffer,me.byteOffset,Ae),me.byteLength===Ae?_e.shift():(me.byteOffset+=Ae,me.byteLength-=Ae),a._queueTotalSize-=Ae,_h(a,Ae,u),A-=Ae}return L}o(vh,"ReadableByteStreamControllerFillPullIntoDescriptorFromQueue");function _h(a,u,_){_.bytesFilled+=u}o(_h,"ReadableByteStreamControllerFillHeadPullIntoDescriptor");function bh(a){a._queueTotalSize===0&&a._closeRequested?(ns(a),Mi(a._controlledReadableByteStream)):no(a)}o(bh,"ReadableByteStreamControllerHandleQueueDrain");function sl(a){a._byobRequest!==null&&(a._byobRequest._associatedReadableByteStreamController=void 0,a._byobRequest._view=null,a._byobRequest=null)}o(sl,"ReadableByteStreamControllerInvalidateBYOBRequest");function ul(a){for(;a._pendingPullIntos.length>0;){if(a._queueTotalSize===0)return;let u=a._pendingPullIntos.peek();vh(a,u)&&(Oo(a),al(a._controlledReadableByteStream,u))}}o(ul,"ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue");function gA(a){let u=a._controlledReadableByteStream._reader;for(;u._readRequests.length>0;){if(a._queueTotalSize===0)return;let _=u._readRequests.shift();Sh(a,_)}}o(gA,"ReadableByteStreamControllerProcessReadRequestsUsingQueue");function yA(a,u,_,T){let A=a._controlledReadableByteStream,L=u.constructor,q=hA(L),{byteOffset:se,byteLength:_e}=u,me=_*q,Ae;try{Ae=nn(u.buffer)}catch(tt){T._errorSteps(tt);return}let Ne={buffer:Ae,bufferByteLength:Ae.byteLength,byteOffset:se,byteLength:_e,bytesFilled:0,minimumFill:me,elementSize:q,viewConstructor:L,readerType:"byob"};if(a._pendingPullIntos.length>0){a._pendingPullIntos.push(Ne),xh(A,T);return}if(A._state==="closed"){let tt=new L(Ne.buffer,Ne.byteOffset,0);T._closeSteps(tt);return}if(a._queueTotalSize>0){if(vh(a,Ne)){let tt=hh(Ne);bh(a),T._chunkSteps(tt);return}if(a._closeRequested){let tt=new TypeError("Insufficient bytes to fill elements in the given buffer");cr(a,tt),T._errorSteps(tt);return}}a._pendingPullIntos.push(Ne),xh(A,T),no(a)}o(yA,"ReadableByteStreamControllerPullInto");function vA(a,u){u.readerType==="none"&&Oo(a);let _=a._controlledReadableByteStream;if(dl(_))for(;Ah(_)>0;){let T=Oo(a);al(_,T)}}o(vA,"ReadableByteStreamControllerRespondInClosedState");function _A(a,u,_){if(_h(a,u,_),_.readerType==="none"){yh(a,_),ul(a);return}if(_.bytesFilled<_.minimumFill)return;Oo(a);let T=_.bytesFilled%_.elementSize;if(T>0){let A=_.byteOffset+_.bytesFilled;gh(a,_.buffer,A-T,T)}_.bytesFilled-=T,al(a._controlledReadableByteStream,_),ul(a)}o(_A,"ReadableByteStreamControllerRespondInReadableState");function Eh(a,u){let _=a._pendingPullIntos.peek();sl(a),a._controlledReadableByteStream._state==="closed"?vA(a,_):_A(a,u,_),no(a)}o(Eh,"ReadableByteStreamControllerRespondInternal");function Oo(a){return a._pendingPullIntos.shift()}o(Oo,"ReadableByteStreamControllerShiftPendingPullInto");function bA(a){let u=a._controlledReadableByteStream;return u._state!=="readable"||a._closeRequested||!a._started?!1:!!(N(u)&&M(u)>0||dl(u)&&Ah(u)>0||wh(a)>0)}o(bA,"ReadableByteStreamControllerShouldCallPull");function ns(a){a._pullAlgorithm=void 0,a._cancelAlgorithm=void 0}o(ns,"ReadableByteStreamControllerClearAlgorithms");function Oi(a){let u=a._controlledReadableByteStream;if(!(a._closeRequested||u._state!=="readable")){if(a._queueTotalSize>0){a._closeRequested=!0;return}if(a._pendingPullIntos.length>0){let _=a._pendingPullIntos.peek();if(_.bytesFilled%_.elementSize!==0){let T=new TypeError("Insufficient bytes to fill elements in the given buffer");throw cr(a,T),T}}ns(a),Mi(u)}}o(Oi,"ReadableByteStreamControllerClose");function os(a,u){let _=a._controlledReadableByteStream;if(a._closeRequested||_._state!=="readable")return;let{buffer:T,byteOffset:A,byteLength:L}=u;if(An(T))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");let q=nn(T);if(a._pendingPullIntos.length>0){let se=a._pendingPullIntos.peek();if(An(se.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");sl(a),se.buffer=nn(se.buffer),se.readerType==="none"&&yh(a,se)}if(N(_))if(gA(a),M(_)===0)rs(a,q,A,L);else{a._pendingPullIntos.length>0&&Oo(a);let se=new Uint8Array(q,A,L);O(_,se,!1)}else dl(_)?(rs(a,q,A,L),ul(a)):rs(a,q,A,L);no(a)}o(os,"ReadableByteStreamControllerEnqueue");function cr(a,u){let _=a._controlledReadableByteStream;_._state==="readable"&&(mh(a),In(a),ns(a),Yh(_,u))}o(cr,"ReadableByteStreamControllerError");function Sh(a,u){let _=a._queue.shift();a._queueTotalSize-=_.byteLength,bh(a);let T=new Uint8Array(_.buffer,_.byteOffset,_.byteLength);u._chunkSteps(T)}o(Sh,"ReadableByteStreamControllerFillReadRequestFromQueue");function cl(a){if(a._byobRequest===null&&a._pendingPullIntos.length>0){let u=a._pendingPullIntos.peek(),_=new Uint8Array(u.buffer,u.byteOffset+u.bytesFilled,u.byteLength-u.bytesFilled),T=Object.create(to.prototype);SA(T,a,_),a._byobRequest=T}return a._byobRequest}o(cl,"ReadableByteStreamControllerGetBYOBRequest");function wh(a){let u=a._controlledReadableByteStream._state;return u==="errored"?null:u==="closed"?0:a._strategyHWM-a._queueTotalSize}o(wh,"ReadableByteStreamControllerGetDesiredSize");function is(a,u){let _=a._pendingPullIntos.peek();if(a._controlledReadableByteStream._state==="closed"){if(u!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(u===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(_.bytesFilled+u>_.byteLength)throw new RangeError("bytesWritten out of range")}_.buffer=nn(_.buffer),Eh(a,u)}o(is,"ReadableByteStreamControllerRespond");function as(a,u){let _=a._pendingPullIntos.peek();if(a._controlledReadableByteStream._state==="closed"){if(u.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(u.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(_.byteOffset+_.bytesFilled!==u.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(_.bufferByteLength!==u.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(_.bytesFilled+u.byteLength>_.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let A=u.byteLength;_.buffer=nn(u.buffer),Eh(a,A)}o(as,"ReadableByteStreamControllerRespondWithNewView");function Th(a,u,_,T,A,L,q){u._controlledReadableByteStream=a,u._pullAgain=!1,u._pulling=!1,u._byobRequest=null,u._queue=u._queueTotalSize=void 0,In(u),u._closeRequested=!1,u._started=!1,u._strategyHWM=L,u._pullAlgorithm=T,u._cancelAlgorithm=A,u._autoAllocateChunkSize=q,u._pendingPullIntos=new Z,a._readableStreamController=u;let se=_();f(m(se),()=>(u._started=!0,no(u),null),_e=>(cr(u,_e),null))}o(Th,"SetUpReadableByteStreamController");function EA(a,u,_){let T=Object.create(on.prototype),A,L,q;u.start!==void 0?A=o(()=>u.start(T),"startAlgorithm"):A=o(()=>{},"startAlgorithm"),u.pull!==void 0?L=o(()=>u.pull(T),"pullAlgorithm"):L=o(()=>m(void 0),"pullAlgorithm"),u.cancel!==void 0?q=o(_e=>u.cancel(_e),"cancelAlgorithm"):q=o(()=>m(void 0),"cancelAlgorithm");let se=u.autoAllocateChunkSize;if(se===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Th(a,T,A,L,q,_,se)}o(EA,"SetUpReadableByteStreamControllerFromUnderlyingSource");function SA(a,u,_){a._associatedReadableByteStreamController=u,a._view=_}o(SA,"SetUpReadableStreamBYOBRequest");function ll(a){return new TypeError(`ReadableStreamBYOBRequest.prototype.${a} can only be used on a ReadableStreamBYOBRequest`)}o(ll,"byobRequestBrandCheckException");function ki(a){return new TypeError(`ReadableByteStreamController.prototype.${a} can only be used on a ReadableByteStreamController`)}o(ki,"byteStreamControllerBrandCheckException");function wA(a,u){lt(a,u);let _=a?.mode;return{mode:_===void 0?void 0:TA(_,`${u} has member 'mode' that`)}}o(wA,"convertReaderOptions");function TA(a,u){if(a=`${a}`,a!=="byob")throw new TypeError(`${u} '${a}' is not a valid enumeration value for ReadableStreamReaderMode`);return a}o(TA,"convertReadableStreamReaderMode");function PA(a,u){var _;lt(a,u);let T=(_=a?.min)!==null&&_!==void 0?_:1;return{min:R(T,`${u} has member 'min' that`)}}o(PA,"convertByobReadOptions");function Ph(a){return new Rn(a)}o(Ph,"AcquireReadableStreamBYOBReader");function xh(a,u){a._reader._readIntoRequests.push(u)}o(xh,"ReadableStreamAddReadIntoRequest");function xA(a,u,_){let A=a._reader._readIntoRequests.shift();_?A._closeSteps(u):A._chunkSteps(u)}o(xA,"ReadableStreamFulfillReadIntoRequest");function Ah(a){return a._reader._readIntoRequests.length}o(Ah,"ReadableStreamGetNumReadIntoRequests");function dl(a){let u=a._reader;return!(u===void 0||!oo(u))}o(dl,"ReadableStreamHasBYOBReader");class Rn{static{o(this,"ReadableStreamBYOBReader")}constructor(u){if(Ye(u,1,"ReadableStreamBYOBReader"),$(u,"First parameter"),kn(u))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!ro(u._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");re(this,u),this._readIntoRequests=new Z}get closed(){return oo(this)?this._closedPromise:y(ss("closed"))}cancel(u=void 0){return oo(this)?this._ownerReadableStream===void 0?y(X("cancel")):V(this,u):y(ss("cancel"))}read(u,_={}){if(!oo(this))return y(ss("read"));if(!ArrayBuffer.isView(u))return y(new TypeError("view must be an array buffer view"));if(u.byteLength===0)return y(new TypeError("view must have non-zero byteLength"));if(u.buffer.byteLength===0)return y(new TypeError("view's buffer must have non-zero byteLength"));if(An(u.buffer))return y(new TypeError("view's buffer has been detached"));let T;try{T=PA(_,"options")}catch(me){return y(me)}let A=T.min;if(A===0)return y(new TypeError("options.min must be greater than 0"));if(mA(u)){if(A>u.byteLength)return y(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(A>u.length)return y(new RangeError("options.min must be less than or equal to view's length"));if(this._ownerReadableStream===void 0)return y(X("read from"));let L,q,se=p((me,Ae)=>{L=me,q=Ae});return Ih(this,u,A,{_chunkSteps:o(me=>L({value:me,done:!1}),"_chunkSteps"),_closeSteps:o(me=>L({value:me,done:!0}),"_closeSteps"),_errorSteps:o(me=>q(me),"_errorSteps")}),se}releaseLock(){if(!oo(this))throw ss("releaseLock");this._ownerReadableStream!==void 0&&AA(this)}}Object.defineProperties(Rn.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),i(Rn.prototype.cancel,"cancel"),i(Rn.prototype.read,"read"),i(Rn.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Rn.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function oo(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_readIntoRequests")?!1:a instanceof Rn}o(oo,"IsReadableStreamBYOBReader");function Ih(a,u,_,T){let A=a._ownerReadableStream;A._disturbed=!0,A._state==="errored"?T._errorSteps(A._storedError):yA(A._readableStreamController,u,_,T)}o(Ih,"ReadableStreamBYOBReaderRead");function AA(a){B(a);let u=new TypeError("Reader was released");Rh(a,u)}o(AA,"ReadableStreamBYOBReaderRelease");function Rh(a,u){let _=a._readIntoRequests;a._readIntoRequests=new Z,_.forEach(T=>{T._errorSteps(u)})}o(Rh,"ReadableStreamBYOBReaderErrorReadIntoRequests");function ss(a){return new TypeError(`ReadableStreamBYOBReader.prototype.${a} can only be used on a ReadableStreamBYOBReader`)}o(ss,"byobReaderBrandCheckException");function $i(a,u){let{highWaterMark:_}=a;if(_===void 0)return u;if(Wt(_)||_<0)throw new RangeError("Invalid highWaterMark");return _}o($i,"ExtractHighWaterMark");function us(a){let{size:u}=a;return u||(()=>1)}o(us,"ExtractSizeAlgorithm");function cs(a,u){lt(a,u);let _=a?.highWaterMark,T=a?.size;return{highWaterMark:_===void 0?void 0:P(_),size:T===void 0?void 0:IA(T,`${u} has member 'size' that`)}}o(cs,"convertQueuingStrategy");function IA(a,u){return mt(a,u),_=>P(a(_))}o(IA,"convertQueuingStrategySize");function RA(a,u){lt(a,u);let _=a?.abort,T=a?.close,A=a?.start,L=a?.type,q=a?.write;return{abort:_===void 0?void 0:CA(_,a,`${u} has member 'abort' that`),close:T===void 0?void 0:OA(T,a,`${u} has member 'close' that`),start:A===void 0?void 0:kA(A,a,`${u} has member 'start' that`),write:q===void 0?void 0:$A(q,a,`${u} has member 'write' that`),type:L}}o(RA,"convertUnderlyingSink");function CA(a,u,_){return mt(a,_),T=>U(a,u,[T])}o(CA,"convertUnderlyingSinkAbortCallback");function OA(a,u,_){return mt(a,_),()=>U(a,u,[])}o(OA,"convertUnderlyingSinkCloseCallback");function kA(a,u,_){return mt(a,_),T=>C(a,u,[T])}o(kA,"convertUnderlyingSinkStartCallback");function $A(a,u,_){return mt(a,_),(T,A)=>U(a,u,[T,A])}o($A,"convertUnderlyingSinkWriteCallback");function Ch(a,u){if(!ko(a))throw new TypeError(`${u} is not a WritableStream.`)}o(Ch,"assertWritableStream");function DA(a){if(typeof a!="object"||a===null)return!1;try{return typeof a.aborted=="boolean"}catch{return!1}}o(DA,"isAbortSignal");let NA=typeof AbortController=="function";function zA(){if(NA)return new AbortController}o(zA,"createAbortController");class Cn{static{o(this,"WritableStream")}constructor(u={},_={}){u===void 0?u=null:We(u,"First parameter");let T=cs(_,"Second parameter"),A=RA(u,"First parameter");if(kh(this),A.type!==void 0)throw new RangeError("Invalid type is specified");let q=us(T),se=$i(T,1);JA(this,A,se,q)}get locked(){if(!ko(this))throw ms("locked");return $o(this)}abort(u=void 0){return ko(this)?$o(this)?y(new TypeError("Cannot abort a stream that already has a writer")):ls(this,u):y(ms("abort"))}close(){return ko(this)?$o(this)?y(new TypeError("Cannot close a stream that already has a writer")):Ur(this)?y(new TypeError("Cannot close an already-closing stream")):$h(this):y(ms("close"))}getWriter(){if(!ko(this))throw ms("getWriter");return Oh(this)}}Object.defineProperties(Cn.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),i(Cn.prototype.abort,"abort"),i(Cn.prototype.close,"close"),i(Cn.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Cn.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function Oh(a){return new an(a)}o(Oh,"AcquireWritableStreamDefaultWriter");function UA(a,u,_,T,A=1,L=()=>1){let q=Object.create(Cn.prototype);kh(q);let se=Object.create(Do.prototype);return Lh(q,se,a,u,_,T,A,L),q}o(UA,"CreateWritableStream");function kh(a){a._state="writable",a._storedError=void 0,a._writer=void 0,a._writableStreamController=void 0,a._writeRequests=new Z,a._inFlightWriteRequest=void 0,a._closeRequest=void 0,a._inFlightCloseRequest=void 0,a._pendingAbortRequest=void 0,a._backpressure=!1}o(kh,"InitializeWritableStream");function ko(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_writableStreamController")?!1:a instanceof Cn}o(ko,"IsWritableStream");function $o(a){return a._writer!==void 0}o($o,"IsWritableStreamLocked");function ls(a,u){var _;if(a._state==="closed"||a._state==="errored")return m(void 0);a._writableStreamController._abortReason=u,(_=a._writableStreamController._abortController)===null||_===void 0||_.abort(u);let T=a._state;if(T==="closed"||T==="errored")return m(void 0);if(a._pendingAbortRequest!==void 0)return a._pendingAbortRequest._promise;let A=!1;T==="erroring"&&(A=!0,u=void 0);let L=p((q,se)=>{a._pendingAbortRequest={_promise:void 0,_resolve:q,_reject:se,_reason:u,_wasAlreadyErroring:A}});return a._pendingAbortRequest._promise=L,A||fl(a,u),L}o(ls,"WritableStreamAbort");function $h(a){let u=a._state;if(u==="closed"||u==="errored")return y(new TypeError(`The stream (in ${u} state) is not in the writable state and cannot be closed`));let _=p((A,L)=>{let q={_resolve:A,_reject:L};a._closeRequest=q}),T=a._writer;return T!==void 0&&a._backpressure&&u==="writable"&&El(T),YA(a._writableStreamController),_}o($h,"WritableStreamClose");function MA(a){return p((_,T)=>{let A={_resolve:_,_reject:T};a._writeRequests.push(A)})}o(MA,"WritableStreamAddWriteRequest");function pl(a,u){if(a._state==="writable"){fl(a,u);return}ml(a)}o(pl,"WritableStreamDealWithRejection");function fl(a,u){let _=a._writableStreamController;a._state="erroring",a._storedError=u;let T=a._writer;T!==void 0&&Nh(T,u),!BA(a)&&_._started&&ml(a)}o(fl,"WritableStreamStartErroring");function ml(a){a._state="errored",a._writableStreamController[K]();let u=a._storedError;if(a._writeRequests.forEach(A=>{A._reject(u)}),a._writeRequests=new Z,a._pendingAbortRequest===void 0){ds(a);return}let _=a._pendingAbortRequest;if(a._pendingAbortRequest=void 0,_._wasAlreadyErroring){_._reject(u),ds(a);return}let T=a._writableStreamController[H](_._reason);f(T,()=>(_._resolve(),ds(a),null),A=>(_._reject(A),ds(a),null))}o(ml,"WritableStreamFinishErroring");function LA(a){a._inFlightWriteRequest._resolve(void 0),a._inFlightWriteRequest=void 0}o(LA,"WritableStreamFinishInFlightWrite");function jA(a,u){a._inFlightWriteRequest._reject(u),a._inFlightWriteRequest=void 0,pl(a,u)}o(jA,"WritableStreamFinishInFlightWriteWithError");function FA(a){a._inFlightCloseRequest._resolve(void 0),a._inFlightCloseRequest=void 0,a._state==="erroring"&&(a._storedError=void 0,a._pendingAbortRequest!==void 0&&(a._pendingAbortRequest._resolve(),a._pendingAbortRequest=void 0)),a._state="closed";let _=a._writer;_!==void 0&&Bh(_)}o(FA,"WritableStreamFinishInFlightClose");function qA(a,u){a._inFlightCloseRequest._reject(u),a._inFlightCloseRequest=void 0,a._pendingAbortRequest!==void 0&&(a._pendingAbortRequest._reject(u),a._pendingAbortRequest=void 0),pl(a,u)}o(qA,"WritableStreamFinishInFlightCloseWithError");function Ur(a){return!(a._closeRequest===void 0&&a._inFlightCloseRequest===void 0)}o(Ur,"WritableStreamCloseQueuedOrInFlight");function BA(a){return!(a._inFlightWriteRequest===void 0&&a._inFlightCloseRequest===void 0)}o(BA,"WritableStreamHasOperationMarkedInFlight");function VA(a){a._inFlightCloseRequest=a._closeRequest,a._closeRequest=void 0}o(VA,"WritableStreamMarkCloseRequestInFlight");function GA(a){a._inFlightWriteRequest=a._writeRequests.shift()}o(GA,"WritableStreamMarkFirstWriteRequestInFlight");function ds(a){a._closeRequest!==void 0&&(a._closeRequest._reject(a._storedError),a._closeRequest=void 0);let u=a._writer;u!==void 0&&_l(u,a._storedError)}o(ds,"WritableStreamRejectCloseAndClosedPromiseIfNeeded");function hl(a,u){let _=a._writer;_!==void 0&&u!==a._backpressure&&(u?oI(_):El(_)),a._backpressure=u}o(hl,"WritableStreamUpdateBackpressure");class an{static{o(this,"WritableStreamDefaultWriter")}constructor(u){if(Ye(u,1,"WritableStreamDefaultWriter"),Ch(u,"First parameter"),$o(u))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=u,u._writer=this;let _=u._state;if(_==="writable")!Ur(u)&&u._backpressure?gs(this):Vh(this),hs(this);else if(_==="erroring")bl(this,u._storedError),hs(this);else if(_==="closed")Vh(this),rI(this);else{let T=u._storedError;bl(this,T),qh(this,T)}}get closed(){return io(this)?this._closedPromise:y(ao("closed"))}get desiredSize(){if(!io(this))throw ao("desiredSize");if(this._ownerWritableStream===void 0)throw Ni("desiredSize");return KA(this)}get ready(){return io(this)?this._readyPromise:y(ao("ready"))}abort(u=void 0){return io(this)?this._ownerWritableStream===void 0?y(Ni("abort")):HA(this,u):y(ao("abort"))}close(){if(!io(this))return y(ao("close"));let u=this._ownerWritableStream;return u===void 0?y(Ni("close")):Ur(u)?y(new TypeError("Cannot close an already-closing stream")):Dh(this)}releaseLock(){if(!io(this))throw ao("releaseLock");this._ownerWritableStream!==void 0&&zh(this)}write(u=void 0){return io(this)?this._ownerWritableStream===void 0?y(Ni("write to")):Uh(this,u):y(ao("write"))}}Object.defineProperties(an.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),i(an.prototype.abort,"abort"),i(an.prototype.close,"close"),i(an.prototype.releaseLock,"releaseLock"),i(an.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(an.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function io(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_ownerWritableStream")?!1:a instanceof an}o(io,"IsWritableStreamDefaultWriter");function HA(a,u){let _=a._ownerWritableStream;return ls(_,u)}o(HA,"WritableStreamDefaultWriterAbort");function Dh(a){let u=a._ownerWritableStream;return $h(u)}o(Dh,"WritableStreamDefaultWriterClose");function WA(a){let u=a._ownerWritableStream,_=u._state;return Ur(u)||_==="closed"?m(void 0):_==="errored"?y(u._storedError):Dh(a)}o(WA,"WritableStreamDefaultWriterCloseWithErrorPropagation");function ZA(a,u){a._closedPromiseState==="pending"?_l(a,u):nI(a,u)}o(ZA,"WritableStreamDefaultWriterEnsureClosedPromiseRejected");function Nh(a,u){a._readyPromiseState==="pending"?Gh(a,u):iI(a,u)}o(Nh,"WritableStreamDefaultWriterEnsureReadyPromiseRejected");function KA(a){let u=a._ownerWritableStream,_=u._state;return _==="errored"||_==="erroring"?null:_==="closed"?0:jh(u._writableStreamController)}o(KA,"WritableStreamDefaultWriterGetDesiredSize");function zh(a){let u=a._ownerWritableStream,_=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Nh(a,_),ZA(a,_),u._writer=void 0,a._ownerWritableStream=void 0}o(zh,"WritableStreamDefaultWriterRelease");function Uh(a,u){let _=a._ownerWritableStream,T=_._writableStreamController,A=XA(T,u);if(_!==a._ownerWritableStream)return y(Ni("write to"));let L=_._state;if(L==="errored")return y(_._storedError);if(Ur(_)||L==="closed")return y(new TypeError("The stream is closing or closed and cannot be written to"));if(L==="erroring")return y(_._storedError);let q=MA(_);return QA(T,u,A),q}o(Uh,"WritableStreamDefaultWriterWrite");let Mh={};class Do{static{o(this,"WritableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!gl(this))throw vl("abortReason");return this._abortReason}get signal(){if(!gl(this))throw vl("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(u=void 0){if(!gl(this))throw vl("error");this._controlledWritableStream._state==="writable"&&Fh(this,u)}[H](u){let _=this._abortAlgorithm(u);return ps(this),_}[K](){In(this)}}Object.defineProperties(Do.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Do.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function gl(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_controlledWritableStream")?!1:a instanceof Do}o(gl,"IsWritableStreamDefaultController");function Lh(a,u,_,T,A,L,q,se){u._controlledWritableStream=a,a._writableStreamController=u,u._queue=void 0,u._queueTotalSize=void 0,In(u),u._abortReason=void 0,u._abortController=zA(),u._started=!1,u._strategySizeAlgorithm=se,u._strategyHWM=q,u._writeAlgorithm=T,u._closeAlgorithm=A,u._abortAlgorithm=L;let _e=yl(u);hl(a,_e);let me=_(),Ae=m(me);f(Ae,()=>(u._started=!0,fs(u),null),Ne=>(u._started=!0,pl(a,Ne),null))}o(Lh,"SetUpWritableStreamDefaultController");function JA(a,u,_,T){let A=Object.create(Do.prototype),L,q,se,_e;u.start!==void 0?L=o(()=>u.start(A),"startAlgorithm"):L=o(()=>{},"startAlgorithm"),u.write!==void 0?q=o(me=>u.write(me,A),"writeAlgorithm"):q=o(()=>m(void 0),"writeAlgorithm"),u.close!==void 0?se=o(()=>u.close(),"closeAlgorithm"):se=o(()=>m(void 0),"closeAlgorithm"),u.abort!==void 0?_e=o(me=>u.abort(me),"abortAlgorithm"):_e=o(()=>m(void 0),"abortAlgorithm"),Lh(a,A,L,q,se,_e,_,T)}o(JA,"SetUpWritableStreamDefaultControllerFromUnderlyingSink");function ps(a){a._writeAlgorithm=void 0,a._closeAlgorithm=void 0,a._abortAlgorithm=void 0,a._strategySizeAlgorithm=void 0}o(ps,"WritableStreamDefaultControllerClearAlgorithms");function YA(a){ol(a,Mh,0),fs(a)}o(YA,"WritableStreamDefaultControllerClose");function XA(a,u){try{return a._strategySizeAlgorithm(u)}catch(_){return Di(a,_),1}}o(XA,"WritableStreamDefaultControllerGetChunkSize");function jh(a){return a._strategyHWM-a._queueTotalSize}o(jh,"WritableStreamDefaultControllerGetDesiredSize");function QA(a,u,_){try{ol(a,u,_)}catch(A){Di(a,A);return}let T=a._controlledWritableStream;if(!Ur(T)&&T._state==="writable"){let A=yl(a);hl(T,A)}fs(a)}o(QA,"WritableStreamDefaultControllerWrite");function fs(a){let u=a._controlledWritableStream;if(!a._started||u._inFlightWriteRequest!==void 0)return;if(u._state==="erroring"){ml(u);return}if(a._queue.length===0)return;let T=fA(a);T===Mh?eI(a):tI(a,T)}o(fs,"WritableStreamDefaultControllerAdvanceQueueIfNeeded");function Di(a,u){a._controlledWritableStream._state==="writable"&&Fh(a,u)}o(Di,"WritableStreamDefaultControllerErrorIfNeeded");function eI(a){let u=a._controlledWritableStream;VA(u),nl(a);let _=a._closeAlgorithm();ps(a),f(_,()=>(FA(u),null),T=>(qA(u,T),null))}o(eI,"WritableStreamDefaultControllerProcessClose");function tI(a,u){let _=a._controlledWritableStream;GA(_);let T=a._writeAlgorithm(u);f(T,()=>{LA(_);let A=_._state;if(nl(a),!Ur(_)&&A==="writable"){let L=yl(a);hl(_,L)}return fs(a),null},A=>(_._state==="writable"&&ps(a),jA(_,A),null))}o(tI,"WritableStreamDefaultControllerProcessWrite");function yl(a){return jh(a)<=0}o(yl,"WritableStreamDefaultControllerGetBackpressure");function Fh(a,u){let _=a._controlledWritableStream;ps(a),fl(_,u)}o(Fh,"WritableStreamDefaultControllerError");function ms(a){return new TypeError(`WritableStream.prototype.${a} can only be used on a WritableStream`)}o(ms,"streamBrandCheckException$2");function vl(a){return new TypeError(`WritableStreamDefaultController.prototype.${a} can only be used on a WritableStreamDefaultController`)}o(vl,"defaultControllerBrandCheckException$2");function ao(a){return new TypeError(`WritableStreamDefaultWriter.prototype.${a} can only be used on a WritableStreamDefaultWriter`)}o(ao,"defaultWriterBrandCheckException");function Ni(a){return new TypeError("Cannot "+a+" a stream using a released writer")}o(Ni,"defaultWriterLockException");function hs(a){a._closedPromise=p((u,_)=>{a._closedPromise_resolve=u,a._closedPromise_reject=_,a._closedPromiseState="pending"})}o(hs,"defaultWriterClosedPromiseInitialize");function qh(a,u){hs(a),_l(a,u)}o(qh,"defaultWriterClosedPromiseInitializeAsRejected");function rI(a){hs(a),Bh(a)}o(rI,"defaultWriterClosedPromiseInitializeAsResolved");function _l(a,u){a._closedPromise_reject!==void 0&&(E(a._closedPromise),a._closedPromise_reject(u),a._closedPromise_resolve=void 0,a._closedPromise_reject=void 0,a._closedPromiseState="rejected")}o(_l,"defaultWriterClosedPromiseReject");function nI(a,u){qh(a,u)}o(nI,"defaultWriterClosedPromiseResetToRejected");function Bh(a){a._closedPromise_resolve!==void 0&&(a._closedPromise_resolve(void 0),a._closedPromise_resolve=void 0,a._closedPromise_reject=void 0,a._closedPromiseState="resolved")}o(Bh,"defaultWriterClosedPromiseResolve");function gs(a){a._readyPromise=p((u,_)=>{a._readyPromise_resolve=u,a._readyPromise_reject=_}),a._readyPromiseState="pending"}o(gs,"defaultWriterReadyPromiseInitialize");function bl(a,u){gs(a),Gh(a,u)}o(bl,"defaultWriterReadyPromiseInitializeAsRejected");function Vh(a){gs(a),El(a)}o(Vh,"defaultWriterReadyPromiseInitializeAsResolved");function Gh(a,u){a._readyPromise_reject!==void 0&&(E(a._readyPromise),a._readyPromise_reject(u),a._readyPromise_resolve=void 0,a._readyPromise_reject=void 0,a._readyPromiseState="rejected")}o(Gh,"defaultWriterReadyPromiseReject");function oI(a){gs(a)}o(oI,"defaultWriterReadyPromiseReset");function iI(a,u){bl(a,u)}o(iI,"defaultWriterReadyPromiseResetToRejected");function El(a){a._readyPromise_resolve!==void 0&&(a._readyPromise_resolve(void 0),a._readyPromise_resolve=void 0,a._readyPromise_reject=void 0,a._readyPromiseState="fulfilled")}o(El,"defaultWriterReadyPromiseResolve");function aI(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof global<"u")return global}o(aI,"getGlobals");let Sl=aI();function sI(a){if(!(typeof a=="function"||typeof a=="object")||a.name!=="DOMException")return!1;try{return new a,!0}catch{return!1}}o(sI,"isDOMExceptionConstructor");function uI(){let a=Sl?.DOMException;return sI(a)?a:void 0}o(uI,"getFromGlobal");function cI(){let a=o(function(_,T){this.message=_||"",this.name=T||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)},"DOMException");return i(a,"DOMException"),a.prototype=Object.create(Error.prototype),Object.defineProperty(a.prototype,"constructor",{value:a,writable:!0,configurable:!0}),a}o(cI,"createPolyfill");let lI=uI()||cI();function Hh(a,u,_,T,A,L){let q=j(a),se=Oh(u);a._disturbed=!0;let _e=!1,me=m(void 0);return p((Ae,Ne)=>{let tt;if(L!==void 0){if(tt=o(()=>{let he=L.reason!==void 0?L.reason:new lI("Aborted","AbortError"),Le=[];T||Le.push(()=>u._state==="writable"?ls(u,he):m(void 0)),A||Le.push(()=>a._state==="readable"?Tr(a,he):m(void 0)),Mt(()=>Promise.all(Le.map(nt=>nt())),!0,he)},"abortAlgorithm"),L.aborted){tt();return}L.addEventListener("abort",tt)}function Pr(){return p((he,Le)=>{function nt(Zt){Zt?he():h(Mo(),nt,Le)}o(nt,"next"),nt(!1)})}o(Pr,"pipeLoop");function Mo(){return _e?m(!0):h(se._readyPromise,()=>p((he,Le)=>{pe(q,{_chunkSteps:o(nt=>{me=h(Uh(se,nt),void 0,e),he(!1)},"_chunkSteps"),_closeSteps:o(()=>he(!0),"_closeSteps"),_errorSteps:Le})}))}if(o(Mo,"pipeStep"),un(a,q._closedPromise,he=>(T?lr(!0,he):Mt(()=>ls(u,he),!0,he),null)),un(u,se._closedPromise,he=>(A?lr(!0,he):Mt(()=>Tr(a,he),!0,he),null)),Dt(a,q._closedPromise,()=>(_?lr():Mt(()=>WA(se)),null)),Ur(u)||u._state==="closed"){let he=new TypeError("the destination writable stream closed before all data could be piped to it");A?lr(!0,he):Mt(()=>Tr(a,he),!0,he)}E(Pr());function Dn(){let he=me;return h(me,()=>he!==me?Dn():void 0)}o(Dn,"waitForWritesToFinish");function un(he,Le,nt){he._state==="errored"?nt(he._storedError):g(Le,nt)}o(un,"isOrBecomesErrored");function Dt(he,Le,nt){he._state==="closed"?nt():l(Le,nt)}o(Dt,"isOrBecomesClosed");function Mt(he,Le,nt){if(_e)return;_e=!0,u._state==="writable"&&!Ur(u)?l(Dn(),Zt):Zt();function Zt(){return f(he(),()=>cn(Le,nt),Lo=>cn(!0,Lo)),null}o(Zt,"doTheRest")}o(Mt,"shutdownWithAction");function lr(he,Le){_e||(_e=!0,u._state==="writable"&&!Ur(u)?l(Dn(),()=>cn(he,Le)):cn(he,Le))}o(lr,"shutdown");function cn(he,Le){return zh(se),B(q),L!==void 0&&L.removeEventListener("abort",tt),he?Ne(Le):Ae(void 0),null}o(cn,"finalize")})}o(Hh,"ReadableStreamPipeTo");class sn{static{o(this,"ReadableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!ys(this))throw _s("desiredSize");return wl(this)}close(){if(!ys(this))throw _s("close");if(!zo(this))throw new TypeError("The stream is not in a state that permits close");so(this)}enqueue(u=void 0){if(!ys(this))throw _s("enqueue");if(!zo(this))throw new TypeError("The stream is not in a state that permits enqueue");return No(this,u)}error(u=void 0){if(!ys(this))throw _s("error");wr(this,u)}[te](u){In(this);let _=this._cancelAlgorithm(u);return vs(this),_}[Q](u){let _=this._controlledReadableStream;if(this._queue.length>0){let T=nl(this);this._closeRequested&&this._queue.length===0?(vs(this),Mi(_)):zi(this),u._chunkSteps(T)}else I(_,u),zi(this)}[xe](){}}Object.defineProperties(sn.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),i(sn.prototype.close,"close"),i(sn.prototype.enqueue,"enqueue"),i(sn.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(sn.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function ys(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_controlledReadableStream")?!1:a instanceof sn}o(ys,"IsReadableStreamDefaultController");function zi(a){if(!Wh(a))return;if(a._pulling){a._pullAgain=!0;return}a._pulling=!0;let _=a._pullAlgorithm();f(_,()=>(a._pulling=!1,a._pullAgain&&(a._pullAgain=!1,zi(a)),null),T=>(wr(a,T),null))}o(zi,"ReadableStreamDefaultControllerCallPullIfNeeded");function Wh(a){let u=a._controlledReadableStream;return!zo(a)||!a._started?!1:!!(kn(u)&&M(u)>0||wl(a)>0)}o(Wh,"ReadableStreamDefaultControllerShouldCallPull");function vs(a){a._pullAlgorithm=void 0,a._cancelAlgorithm=void 0,a._strategySizeAlgorithm=void 0}o(vs,"ReadableStreamDefaultControllerClearAlgorithms");function so(a){if(!zo(a))return;let u=a._controlledReadableStream;a._closeRequested=!0,a._queue.length===0&&(vs(a),Mi(u))}o(so,"ReadableStreamDefaultControllerClose");function No(a,u){if(!zo(a))return;let _=a._controlledReadableStream;if(kn(_)&&M(_)>0)O(_,u,!1);else{let T;try{T=a._strategySizeAlgorithm(u)}catch(A){throw wr(a,A),A}try{ol(a,u,T)}catch(A){throw wr(a,A),A}}zi(a)}o(No,"ReadableStreamDefaultControllerEnqueue");function wr(a,u){let _=a._controlledReadableStream;_._state==="readable"&&(In(a),vs(a),Yh(_,u))}o(wr,"ReadableStreamDefaultControllerError");function wl(a){let u=a._controlledReadableStream._state;return u==="errored"?null:u==="closed"?0:a._strategyHWM-a._queueTotalSize}o(wl,"ReadableStreamDefaultControllerGetDesiredSize");function dI(a){return!Wh(a)}o(dI,"ReadableStreamDefaultControllerHasBackpressure");function zo(a){let u=a._controlledReadableStream._state;return!a._closeRequested&&u==="readable"}o(zo,"ReadableStreamDefaultControllerCanCloseOrEnqueue");function Zh(a,u,_,T,A,L,q){u._controlledReadableStream=a,u._queue=void 0,u._queueTotalSize=void 0,In(u),u._started=!1,u._closeRequested=!1,u._pullAgain=!1,u._pulling=!1,u._strategySizeAlgorithm=q,u._strategyHWM=L,u._pullAlgorithm=T,u._cancelAlgorithm=A,a._readableStreamController=u;let se=_();f(m(se),()=>(u._started=!0,zi(u),null),_e=>(wr(u,_e),null))}o(Zh,"SetUpReadableStreamDefaultController");function pI(a,u,_,T){let A=Object.create(sn.prototype),L,q,se;u.start!==void 0?L=o(()=>u.start(A),"startAlgorithm"):L=o(()=>{},"startAlgorithm"),u.pull!==void 0?q=o(()=>u.pull(A),"pullAlgorithm"):q=o(()=>m(void 0),"pullAlgorithm"),u.cancel!==void 0?se=o(_e=>u.cancel(_e),"cancelAlgorithm"):se=o(()=>m(void 0),"cancelAlgorithm"),Zh(a,A,L,q,se,_,T)}o(pI,"SetUpReadableStreamDefaultControllerFromUnderlyingSource");function _s(a){return new TypeError(`ReadableStreamDefaultController.prototype.${a} can only be used on a ReadableStreamDefaultController`)}o(_s,"defaultControllerBrandCheckException$1");function fI(a,u){return ro(a._readableStreamController)?hI(a):mI(a)}o(fI,"ReadableStreamTee");function mI(a,u){let _=j(a),T=!1,A=!1,L=!1,q=!1,se,_e,me,Ae,Ne,tt=p(Dt=>{Ne=Dt});function Pr(){return T?(A=!0,m(void 0)):(T=!0,pe(_,{_chunkSteps:o(Mt=>{b(()=>{A=!1;let lr=Mt,cn=Mt;L||No(me._readableStreamController,lr),q||No(Ae._readableStreamController,cn),T=!1,A&&Pr()})},"_chunkSteps"),_closeSteps:o(()=>{T=!1,L||so(me._readableStreamController),q||so(Ae._readableStreamController),(!L||!q)&&Ne(void 0)},"_closeSteps"),_errorSteps:o(()=>{T=!1},"_errorSteps")}),m(void 0))}o(Pr,"pullAlgorithm");function Mo(Dt){if(L=!0,se=Dt,q){let Mt=Xe([se,_e]),lr=Tr(a,Mt);Ne(lr)}return tt}o(Mo,"cancel1Algorithm");function Dn(Dt){if(q=!0,_e=Dt,L){let Mt=Xe([se,_e]),lr=Tr(a,Mt);Ne(lr)}return tt}o(Dn,"cancel2Algorithm");function un(){}return o(un,"startAlgorithm"),me=Ui(un,Pr,Mo),Ae=Ui(un,Pr,Dn),g(_._closedPromise,Dt=>(wr(me._readableStreamController,Dt),wr(Ae._readableStreamController,Dt),(!L||!q)&&Ne(void 0),null)),[me,Ae]}o(mI,"ReadableStreamDefaultTee");function hI(a){let u=j(a),_=!1,T=!1,A=!1,L=!1,q=!1,se,_e,me,Ae,Ne,tt=p(he=>{Ne=he});function Pr(he){g(he._closedPromise,Le=>(he!==u||(cr(me._readableStreamController,Le),cr(Ae._readableStreamController,Le),(!L||!q)&&Ne(void 0)),null))}o(Pr,"forwardReaderError");function Mo(){oo(u)&&(B(u),u=j(a),Pr(u)),pe(u,{_chunkSteps:o(Le=>{b(()=>{T=!1,A=!1;let nt=Le,Zt=Le;if(!L&&!q)try{Zt=ph(Le)}catch(Lo){cr(me._readableStreamController,Lo),cr(Ae._readableStreamController,Lo),Ne(Tr(a,Lo));return}L||os(me._readableStreamController,nt),q||os(Ae._readableStreamController,Zt),_=!1,T?un():A&&Dt()})},"_chunkSteps"),_closeSteps:o(()=>{_=!1,L||Oi(me._readableStreamController),q||Oi(Ae._readableStreamController),me._readableStreamController._pendingPullIntos.length>0&&is(me._readableStreamController,0),Ae._readableStreamController._pendingPullIntos.length>0&&is(Ae._readableStreamController,0),(!L||!q)&&Ne(void 0)},"_closeSteps"),_errorSteps:o(()=>{_=!1},"_errorSteps")})}o(Mo,"pullWithDefaultReader");function Dn(he,Le){ce(u)&&(B(u),u=Ph(a),Pr(u));let nt=Le?Ae:me,Zt=Le?me:Ae;Ih(u,he,1,{_chunkSteps:o(jo=>{b(()=>{T=!1,A=!1;let Fo=Le?q:L;if(Le?L:q)Fo||as(nt._readableStreamController,jo);else{let lg;try{lg=ph(jo)}catch(Il){cr(nt._readableStreamController,Il),cr(Zt._readableStreamController,Il),Ne(Tr(a,Il));return}Fo||as(nt._readableStreamController,jo),os(Zt._readableStreamController,lg)}_=!1,T?un():A&&Dt()})},"_chunkSteps"),_closeSteps:o(jo=>{_=!1;let Fo=Le?q:L,As=Le?L:q;Fo||Oi(nt._readableStreamController),As||Oi(Zt._readableStreamController),jo!==void 0&&(Fo||as(nt._readableStreamController,jo),!As&&Zt._readableStreamController._pendingPullIntos.length>0&&is(Zt._readableStreamController,0)),(!Fo||!As)&&Ne(void 0)},"_closeSteps"),_errorSteps:o(()=>{_=!1},"_errorSteps")})}o(Dn,"pullWithBYOBReader");function un(){if(_)return T=!0,m(void 0);_=!0;let he=cl(me._readableStreamController);return he===null?Mo():Dn(he._view,!1),m(void 0)}o(un,"pull1Algorithm");function Dt(){if(_)return A=!0,m(void 0);_=!0;let he=cl(Ae._readableStreamController);return he===null?Mo():Dn(he._view,!0),m(void 0)}o(Dt,"pull2Algorithm");function Mt(he){if(L=!0,se=he,q){let Le=Xe([se,_e]),nt=Tr(a,Le);Ne(nt)}return tt}o(Mt,"cancel1Algorithm");function lr(he){if(q=!0,_e=he,L){let Le=Xe([se,_e]),nt=Tr(a,Le);Ne(nt)}return tt}o(lr,"cancel2Algorithm");function cn(){}return o(cn,"startAlgorithm"),me=Jh(cn,un,Mt),Ae=Jh(cn,Dt,lr),Pr(u),[me,Ae]}o(hI,"ReadableByteStreamTee");function gI(a){return r(a)&&typeof a.getReader<"u"}o(gI,"isReadableStreamLike");function yI(a){return gI(a)?_I(a.getReader()):vI(a)}o(yI,"ReadableStreamFrom");function vI(a){let u,_=dh(a,"async"),T=e;function A(){let q;try{q=cA(_)}catch(_e){return y(_e)}let se=m(q);return v(se,_e=>{if(!r(_e))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(lA(_e))so(u._readableStreamController);else{let Ae=dA(_e);No(u._readableStreamController,Ae)}})}o(A,"pullAlgorithm");function L(q){let se=_.iterator,_e;try{_e=ts(se,"return")}catch(Ne){return y(Ne)}if(_e===void 0)return m(void 0);let me;try{me=C(_e,se,[q])}catch(Ne){return y(Ne)}let Ae=m(me);return v(Ae,Ne=>{if(!r(Ne))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})}return o(L,"cancelAlgorithm"),u=Ui(T,A,L,0),u}o(vI,"ReadableStreamFromIterable");function _I(a){let u,_=e;function T(){let L;try{L=a.read()}catch(q){return y(q)}return v(L,q=>{if(!r(q))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(q.done)so(u._readableStreamController);else{let se=q.value;No(u._readableStreamController,se)}})}o(T,"pullAlgorithm");function A(L){try{return m(a.cancel(L))}catch(q){return y(q)}}return o(A,"cancelAlgorithm"),u=Ui(_,T,A,0),u}o(_I,"ReadableStreamFromDefaultReader");function bI(a,u){lt(a,u);let _=a,T=_?.autoAllocateChunkSize,A=_?.cancel,L=_?.pull,q=_?.start,se=_?.type;return{autoAllocateChunkSize:T===void 0?void 0:R(T,`${u} has member 'autoAllocateChunkSize' that`),cancel:A===void 0?void 0:EI(A,_,`${u} has member 'cancel' that`),pull:L===void 0?void 0:SI(L,_,`${u} has member 'pull' that`),start:q===void 0?void 0:wI(q,_,`${u} has member 'start' that`),type:se===void 0?void 0:TI(se,`${u} has member 'type' that`)}}o(bI,"convertUnderlyingDefaultOrByteSource");function EI(a,u,_){return mt(a,_),T=>U(a,u,[T])}o(EI,"convertUnderlyingSourceCancelCallback");function SI(a,u,_){return mt(a,_),T=>U(a,u,[T])}o(SI,"convertUnderlyingSourcePullCallback");function wI(a,u,_){return mt(a,_),T=>C(a,u,[T])}o(wI,"convertUnderlyingSourceStartCallback");function TI(a,u){if(a=`${a}`,a!=="bytes")throw new TypeError(`${u} '${a}' is not a valid enumeration value for ReadableStreamType`);return a}o(TI,"convertReadableStreamType");function PI(a,u){return lt(a,u),{preventCancel:!!a?.preventCancel}}o(PI,"convertIteratorOptions");function Kh(a,u){lt(a,u);let _=a?.preventAbort,T=a?.preventCancel,A=a?.preventClose,L=a?.signal;return L!==void 0&&xI(L,`${u} has member 'signal' that`),{preventAbort:!!_,preventCancel:!!T,preventClose:!!A,signal:L}}o(Kh,"convertPipeOptions");function xI(a,u){if(!DA(a))throw new TypeError(`${u} is not an AbortSignal.`)}o(xI,"assertAbortSignal");function AI(a,u){lt(a,u);let _=a?.readable;S(_,"readable","ReadableWritablePair"),$(_,`${u} has member 'readable' that`);let T=a?.writable;return S(T,"writable","ReadableWritablePair"),Ch(T,`${u} has member 'writable' that`),{readable:_,writable:T}}o(AI,"convertReadableWritablePair");class Ct{static{o(this,"ReadableStream")}constructor(u={},_={}){u===void 0?u=null:We(u,"First parameter");let T=cs(_,"Second parameter"),A=bI(u,"First parameter");if(Tl(this),A.type==="bytes"){if(T.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let L=$i(T,0);EA(this,A,L)}else{let L=us(T),q=$i(T,1);pI(this,A,q,L)}}get locked(){if(!On(this))throw uo("locked");return kn(this)}cancel(u=void 0){return On(this)?kn(this)?y(new TypeError("Cannot cancel a stream that already has a reader")):Tr(this,u):y(uo("cancel"))}getReader(u=void 0){if(!On(this))throw uo("getReader");return wA(u,"First parameter").mode===void 0?j(this):Ph(this)}pipeThrough(u,_={}){if(!On(this))throw uo("pipeThrough");Ye(u,1,"pipeThrough");let T=AI(u,"First parameter"),A=Kh(_,"Second parameter");if(kn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if($o(T.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let L=Hh(this,T.writable,A.preventClose,A.preventAbort,A.preventCancel,A.signal);return E(L),T.readable}pipeTo(u,_={}){if(!On(this))return y(uo("pipeTo"));if(u===void 0)return y("Parameter 1 is required in 'pipeTo'.");if(!ko(u))return y(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let T;try{T=Kh(_,"Second parameter")}catch(A){return y(A)}return kn(this)?y(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):$o(u)?y(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Hh(this,u,T.preventClose,T.preventAbort,T.preventCancel,T.signal)}tee(){if(!On(this))throw uo("tee");let u=fI(this);return Xe(u)}values(u=void 0){if(!On(this))throw uo("values");let _=PI(u,"First parameter");return Io(this,_.preventCancel)}[rl](u){return this.values(u)}static from(u){return yI(u)}}Object.defineProperties(Ct,{from:{enumerable:!0}}),Object.defineProperties(Ct.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),i(Ct.from,"from"),i(Ct.prototype.cancel,"cancel"),i(Ct.prototype.getReader,"getReader"),i(Ct.prototype.pipeThrough,"pipeThrough"),i(Ct.prototype.pipeTo,"pipeTo"),i(Ct.prototype.tee,"tee"),i(Ct.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ct.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(Ct.prototype,rl,{value:Ct.prototype.values,writable:!0,configurable:!0});function Ui(a,u,_,T=1,A=()=>1){let L=Object.create(Ct.prototype);Tl(L);let q=Object.create(sn.prototype);return Zh(L,q,a,u,_,T,A),L}o(Ui,"CreateReadableStream");function Jh(a,u,_){let T=Object.create(Ct.prototype);Tl(T);let A=Object.create(on.prototype);return Th(T,A,a,u,_,0,void 0),T}o(Jh,"CreateReadableByteStream");function Tl(a){a._state="readable",a._reader=void 0,a._storedError=void 0,a._disturbed=!1}o(Tl,"InitializeReadableStream");function On(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_readableStreamController")?!1:a instanceof Ct}o(On,"IsReadableStream");function kn(a){return a._reader!==void 0}o(kn,"IsReadableStreamLocked");function Tr(a,u){if(a._disturbed=!0,a._state==="closed")return m(void 0);if(a._state==="errored")return y(a._storedError);Mi(a);let _=a._reader;if(_!==void 0&&oo(_)){let A=_._readIntoRequests;_._readIntoRequests=new Z,A.forEach(L=>{L._closeSteps(void 0)})}let T=a._readableStreamController[te](u);return v(T,e)}o(Tr,"ReadableStreamCancel");function Mi(a){a._state="closed";let u=a._reader;if(u!==void 0&&(Ke(u),ce(u))){let _=u._readRequests;u._readRequests=new Z,_.forEach(T=>{T._closeSteps()})}}o(Mi,"ReadableStreamClose");function Yh(a,u){a._state="errored",a._storedError=u;let _=a._reader;_!==void 0&&(Ce(_,u),ce(_)?it(_,u):Rh(_,u))}o(Yh,"ReadableStreamError");function uo(a){return new TypeError(`ReadableStream.prototype.${a} can only be used on a ReadableStream`)}o(uo,"streamBrandCheckException$1");function Xh(a,u){lt(a,u);let _=a?.highWaterMark;return S(_,"highWaterMark","QueuingStrategyInit"),{highWaterMark:P(_)}}o(Xh,"convertQueuingStrategyInit");let Qh=o(a=>a.byteLength,"byteLengthSizeFunction");i(Qh,"size");class bs{static{o(this,"ByteLengthQueuingStrategy")}constructor(u){Ye(u,1,"ByteLengthQueuingStrategy"),u=Xh(u,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=u.highWaterMark}get highWaterMark(){if(!tg(this))throw eg("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!tg(this))throw eg("size");return Qh}}Object.defineProperties(bs.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(bs.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function eg(a){return new TypeError(`ByteLengthQueuingStrategy.prototype.${a} can only be used on a ByteLengthQueuingStrategy`)}o(eg,"byteLengthBrandCheckException");function tg(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_byteLengthQueuingStrategyHighWaterMark")?!1:a instanceof bs}o(tg,"IsByteLengthQueuingStrategy");let rg=o(()=>1,"countSizeFunction");i(rg,"size");class Es{static{o(this,"CountQueuingStrategy")}constructor(u){Ye(u,1,"CountQueuingStrategy"),u=Xh(u,"First parameter"),this._countQueuingStrategyHighWaterMark=u.highWaterMark}get highWaterMark(){if(!og(this))throw ng("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!og(this))throw ng("size");return rg}}Object.defineProperties(Es.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Es.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function ng(a){return new TypeError(`CountQueuingStrategy.prototype.${a} can only be used on a CountQueuingStrategy`)}o(ng,"countBrandCheckException");function og(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_countQueuingStrategyHighWaterMark")?!1:a instanceof Es}o(og,"IsCountQueuingStrategy");function II(a,u){lt(a,u);let _=a?.cancel,T=a?.flush,A=a?.readableType,L=a?.start,q=a?.transform,se=a?.writableType;return{cancel:_===void 0?void 0:kI(_,a,`${u} has member 'cancel' that`),flush:T===void 0?void 0:RI(T,a,`${u} has member 'flush' that`),readableType:A,start:L===void 0?void 0:CI(L,a,`${u} has member 'start' that`),transform:q===void 0?void 0:OI(q,a,`${u} has member 'transform' that`),writableType:se}}o(II,"convertTransformer");function RI(a,u,_){return mt(a,_),T=>U(a,u,[T])}o(RI,"convertTransformerFlushCallback");function CI(a,u,_){return mt(a,_),T=>C(a,u,[T])}o(CI,"convertTransformerStartCallback");function OI(a,u,_){return mt(a,_),(T,A)=>U(a,u,[T,A])}o(OI,"convertTransformerTransformCallback");function kI(a,u,_){return mt(a,_),T=>U(a,u,[T])}o(kI,"convertTransformerCancelCallback");class Ss{static{o(this,"TransformStream")}constructor(u={},_={},T={}){u===void 0&&(u=null);let A=cs(_,"Second parameter"),L=cs(T,"Third parameter"),q=II(u,"First parameter");if(q.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(q.writableType!==void 0)throw new RangeError("Invalid writableType specified");let se=$i(L,0),_e=us(L),me=$i(A,1),Ae=us(A),Ne,tt=p(Pr=>{Ne=Pr});$I(this,tt,me,Ae,se,_e),NI(this,q),q.start!==void 0?Ne(q.start(this._transformStreamController)):Ne(void 0)}get readable(){if(!ig(this))throw cg("readable");return this._readable}get writable(){if(!ig(this))throw cg("writable");return this._writable}}Object.defineProperties(Ss.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ss.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function $I(a,u,_,T,A,L){function q(){return u}o(q,"startAlgorithm");function se(tt){return MI(a,tt)}o(se,"writeAlgorithm");function _e(tt){return LI(a,tt)}o(_e,"abortAlgorithm");function me(){return jI(a)}o(me,"closeAlgorithm"),a._writable=UA(q,se,me,_e,_,T);function Ae(){return FI(a)}o(Ae,"pullAlgorithm");function Ne(tt){return qI(a,tt)}o(Ne,"cancelAlgorithm"),a._readable=Ui(q,Ae,Ne,A,L),a._backpressure=void 0,a._backpressureChangePromise=void 0,a._backpressureChangePromise_resolve=void 0,ws(a,!0),a._transformStreamController=void 0}o($I,"InitializeTransformStream");function ig(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_transformStreamController")?!1:a instanceof Ss}o(ig,"IsTransformStream");function ag(a,u){wr(a._readable._readableStreamController,u),Pl(a,u)}o(ag,"TransformStreamError");function Pl(a,u){Ps(a._transformStreamController),Di(a._writable._writableStreamController,u),xl(a)}o(Pl,"TransformStreamErrorWritableAndUnblockWrite");function xl(a){a._backpressure&&ws(a,!1)}o(xl,"TransformStreamUnblockWrite");function ws(a,u){a._backpressureChangePromise!==void 0&&a._backpressureChangePromise_resolve(),a._backpressureChangePromise=p(_=>{a._backpressureChangePromise_resolve=_}),a._backpressure=u}o(ws,"TransformStreamSetBackpressure");class $n{static{o(this,"TransformStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Ts(this))throw xs("desiredSize");let u=this._controlledTransformStream._readable._readableStreamController;return wl(u)}enqueue(u=void 0){if(!Ts(this))throw xs("enqueue");sg(this,u)}error(u=void 0){if(!Ts(this))throw xs("error");zI(this,u)}terminate(){if(!Ts(this))throw xs("terminate");UI(this)}}Object.defineProperties($n.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),i($n.prototype.enqueue,"enqueue"),i($n.prototype.error,"error"),i($n.prototype.terminate,"terminate"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty($n.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Ts(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_controlledTransformStream")?!1:a instanceof $n}o(Ts,"IsTransformStreamDefaultController");function DI(a,u,_,T,A){u._controlledTransformStream=a,a._transformStreamController=u,u._transformAlgorithm=_,u._flushAlgorithm=T,u._cancelAlgorithm=A,u._finishPromise=void 0,u._finishPromise_resolve=void 0,u._finishPromise_reject=void 0}o(DI,"SetUpTransformStreamDefaultController");function NI(a,u){let _=Object.create($n.prototype),T,A,L;u.transform!==void 0?T=o(q=>u.transform(q,_),"transformAlgorithm"):T=o(q=>{try{return sg(_,q),m(void 0)}catch(se){return y(se)}},"transformAlgorithm"),u.flush!==void 0?A=o(()=>u.flush(_),"flushAlgorithm"):A=o(()=>m(void 0),"flushAlgorithm"),u.cancel!==void 0?L=o(q=>u.cancel(q),"cancelAlgorithm"):L=o(()=>m(void 0),"cancelAlgorithm"),DI(a,_,T,A,L)}o(NI,"SetUpTransformStreamDefaultControllerFromTransformer");function Ps(a){a._transformAlgorithm=void 0,a._flushAlgorithm=void 0,a._cancelAlgorithm=void 0}o(Ps,"TransformStreamDefaultControllerClearAlgorithms");function sg(a,u){let _=a._controlledTransformStream,T=_._readable._readableStreamController;if(!zo(T))throw new TypeError("Readable side is not in a state that permits enqueue");try{No(T,u)}catch(L){throw Pl(_,L),_._readable._storedError}dI(T)!==_._backpressure&&ws(_,!0)}o(sg,"TransformStreamDefaultControllerEnqueue");function zI(a,u){ag(a._controlledTransformStream,u)}o(zI,"TransformStreamDefaultControllerError");function ug(a,u){let _=a._transformAlgorithm(u);return v(_,void 0,T=>{throw ag(a._controlledTransformStream,T),T})}o(ug,"TransformStreamDefaultControllerPerformTransform");function UI(a){let u=a._controlledTransformStream,_=u._readable._readableStreamController;so(_);let T=new TypeError("TransformStream terminated");Pl(u,T)}o(UI,"TransformStreamDefaultControllerTerminate");function MI(a,u){let _=a._transformStreamController;if(a._backpressure){let T=a._backpressureChangePromise;return v(T,()=>{let A=a._writable;if(A._state==="erroring")throw A._storedError;return ug(_,u)})}return ug(_,u)}o(MI,"TransformStreamDefaultSinkWriteAlgorithm");function LI(a,u){let _=a._transformStreamController;if(_._finishPromise!==void 0)return _._finishPromise;let T=a._readable;_._finishPromise=p((L,q)=>{_._finishPromise_resolve=L,_._finishPromise_reject=q});let A=_._cancelAlgorithm(u);return Ps(_),f(A,()=>(T._state==="errored"?Uo(_,T._storedError):(wr(T._readableStreamController,u),Al(_)),null),L=>(wr(T._readableStreamController,L),Uo(_,L),null)),_._finishPromise}o(LI,"TransformStreamDefaultSinkAbortAlgorithm");function jI(a){let u=a._transformStreamController;if(u._finishPromise!==void 0)return u._finishPromise;let _=a._readable;u._finishPromise=p((A,L)=>{u._finishPromise_resolve=A,u._finishPromise_reject=L});let T=u._flushAlgorithm();return Ps(u),f(T,()=>(_._state==="errored"?Uo(u,_._storedError):(so(_._readableStreamController),Al(u)),null),A=>(wr(_._readableStreamController,A),Uo(u,A),null)),u._finishPromise}o(jI,"TransformStreamDefaultSinkCloseAlgorithm");function FI(a){return ws(a,!1),a._backpressureChangePromise}o(FI,"TransformStreamDefaultSourcePullAlgorithm");function qI(a,u){let _=a._transformStreamController;if(_._finishPromise!==void 0)return _._finishPromise;let T=a._writable;_._finishPromise=p((L,q)=>{_._finishPromise_resolve=L,_._finishPromise_reject=q});let A=_._cancelAlgorithm(u);return Ps(_),f(A,()=>(T._state==="errored"?Uo(_,T._storedError):(Di(T._writableStreamController,u),xl(a),Al(_)),null),L=>(Di(T._writableStreamController,L),xl(a),Uo(_,L),null)),_._finishPromise}o(qI,"TransformStreamDefaultSourceCancelAlgorithm");function xs(a){return new TypeError(`TransformStreamDefaultController.prototype.${a} can only be used on a TransformStreamDefaultController`)}o(xs,"defaultControllerBrandCheckException");function Al(a){a._finishPromise_resolve!==void 0&&(a._finishPromise_resolve(),a._finishPromise_resolve=void 0,a._finishPromise_reject=void 0)}o(Al,"defaultControllerFinishPromiseResolve");function Uo(a,u){a._finishPromise_reject!==void 0&&(E(a._finishPromise),a._finishPromise_reject(u),a._finishPromise_resolve=void 0,a._finishPromise_reject=void 0)}o(Uo,"defaultControllerFinishPromiseReject");function cg(a){return new TypeError(`TransformStream.prototype.${a} can only be used on a TransformStream`)}o(cg,"streamBrandCheckException"),t.ByteLengthQueuingStrategy=bs,t.CountQueuingStrategy=Es,t.ReadableByteStreamController=on,t.ReadableStream=Ct,t.ReadableStreamBYOBReader=Rn,t.ReadableStreamBYOBRequest=to,t.ReadableStreamDefaultController=sn,t.ReadableStreamDefaultReader=G,t.TransformStream=Ss,t.TransformStreamDefaultController=$n,t.WritableStream=Cn,t.WritableStreamDefaultController=Do,t.WritableStreamDefaultWriter=an}))});var $E=D(()=>{if(!globalThis.ReadableStream)try{let t=require("node:process"),{emitWarning:e}=t;try{t.emitWarning=()=>{},Object.assign(globalThis,require("node:stream/web")),t.emitWarning=e}catch(r){throw t.emitWarning=e,r}}catch{Object.assign(globalThis,kE())}try{let{Blob:t}=require("buffer");t&&!t.prototype.stream&&(t.prototype.stream=o(function(r){let n=0,i=this;return new ReadableStream({type:"bytes",async pull(s){let d=await i.slice(n,Math.min(i.size,n+65536)).arrayBuffer();n+=d.byteLength,s.enqueue(new Uint8Array(d)),n===i.size&&s.close()}})},"name"))}catch{}});async function*Kd(t,e=!0){for(let r of t)if("stream"in r)yield*r.stream();else if(ArrayBuffer.isView(r))if(e){let n=r.byteOffset,i=r.byteOffset+r.byteLength;for(;n!==i;){let s=Math.min(i-n,DE),c=r.buffer.slice(n,n+s);n+=c.byteLength,yield new Uint8Array(c)}}else yield r;else{let n=0,i=r;for(;n!==i.size;){let c=await i.slice(n,Math.min(i.size,n+DE)).arrayBuffer();n+=c.byteLength,yield new Uint8Array(c)}}}var V9,DE,NE,S$,Ir,ma=Tt(()=>{V9=qe($E(),1);DE=65536;o(Kd,"toIterator");NE=class Jd{static{o(this,"Blob")}#e=[];#t="";#r=0;#n="transparent";constructor(e=[],r={}){if(typeof e!="object"||e===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof e[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof r!="object"&&typeof r!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");r===null&&(r={});let n=new TextEncoder;for(let s of e){let c;ArrayBuffer.isView(s)?c=new Uint8Array(s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength)):s instanceof ArrayBuffer?c=new Uint8Array(s.slice(0)):s instanceof Jd?c=s:c=n.encode(`${s}`),this.#r+=ArrayBuffer.isView(c)?c.byteLength:c.size,this.#e.push(c)}this.#n=`${r.endings===void 0?"transparent":r.endings}`;let i=r.type===void 0?"":String(r.type);this.#t=/^[\x20-\x7E]*$/.test(i)?i:""}get size(){return this.#r}get type(){return this.#t}async text(){let e=new TextDecoder,r="";for await(let n of Kd(this.#e,!1))r+=e.decode(n,{stream:!0});return r+=e.decode(),r}async arrayBuffer(){let e=new Uint8Array(this.size),r=0;for await(let n of Kd(this.#e,!1))e.set(n,r),r+=n.length;return e.buffer}stream(){let e=Kd(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(r){let n=await e.next();n.done?r.close():r.enqueue(n.value)},async cancel(){await e.return()}})}slice(e=0,r=this.size,n=""){let{size:i}=this,s=e<0?Math.max(i+e,0):Math.min(e,i),c=r<0?Math.max(i+r,0):Math.min(r,i),d=Math.max(c-s,0),p=this.#e,m=[],y=0;for(let f of p){if(y>=d)break;let l=ArrayBuffer.isView(f)?f.byteLength:f.size;if(s&&l<=s)s-=l,c-=l;else{let g;ArrayBuffer.isView(f)?(g=f.subarray(s,Math.min(l,c)),y+=g.byteLength):(g=f.slice(s,Math.min(l,c)),y+=g.size),c-=l,m.push(g),s=0}}let h=new Jd([],{type:String(n).toLowerCase()});return h.#r=d,h.#e=m,h}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](e){return e&&typeof e=="object"&&typeof e.constructor=="function"&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}};Object.defineProperties(NE.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});S$=NE,Ir=S$});var w$,T$,Hn,Yd=Tt(()=>{ma();w$=class extends Ir{static{o(this,"File")}#e=0;#t="";constructor(e,r,n={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(e,n),n===null&&(n={});let i=n.lastModified===void 0?Date.now():Number(n.lastModified);Number.isNaN(i)||(this.#e=i),this.#t=String(r)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](e){return!!e&&e instanceof Ir&&/^(File)$/.test(e[Symbol.toStringTag])}},T$=w$,Hn=T$});function ME(t,e=Ir){var r=`${zE()}${zE()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),n=[],i=`--${r}\r
|
|
15
|
-
Content-Disposition: form-data; name="`;return
|
|
10
|
+
`);if(m===-1){Nf("have not received end of HTTP headers yet..."),i();return}let p=g.slice(0,m).toString("ascii").split(`\r
|
|
11
|
+
`),y=p.shift();if(!y)return e.destroy(),n(new Error("No header received from proxy CONNECT response"));let v=y.split(" "),E=+v[1],b=v.slice(2).join(" "),k={};for(let N of p){if(!N)continue;let Z=N.indexOf(":");if(Z===-1)return e.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${N}"`));let H=N.slice(0,Z).toLowerCase(),K=N.slice(Z+1).trimStart(),ee=k[H];typeof ee=="string"?k[H]=[ee,K]:Array.isArray(ee)?ee.push(K):k[H]=K}Nf("got proxy server response: %o %o",y,k),s(),t({connect:{statusCode:E,statusText:b,headers:k},buffered:g})}a(f,"ondata"),e.on("error",d),e.on("end",u),i()})}a(O4,"parseProxyResponse");Na.parseProxyResponse=O4});var L0=z(jr=>{"use strict";var k4=jr&&jr.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),$4=jr&&jr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),U0=jr&&jr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&k4(t,e,n);return $4(t,e),t},M0=jr&&jr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jr,"__esModule",{value:!0});jr.HttpsProxyAgent=void 0;var zf=U0(require("net")),D0=U0(require("tls")),D4=M0(require("assert")),N4=M0(Wb()),z4=k0(),U4=require("url"),M4=$0(),mu=(0,N4.default)("https-proxy-agent"),N0=a(e=>e.servername===void 0&&e.host&&!zf.isIP(e.host)?{...e,servername:e.host}:e,"setServernameFromNonIpHost"),Uf=class extends z4.Agent{static{a(this,"HttpsProxyAgent")}constructor(t,n){super(n),this.options={path:void 0},this.proxy=typeof t=="string"?new U4.URL(t):t,this.proxyHeaders=n?.headers??{},mu("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let o=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),r=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...n?z0(n,"headers"):null,host:o,port:r}}async connect(t,n){let{proxy:o}=this;if(!n.host)throw new TypeError('No "host" provided');let r;o.protocol==="https:"?(mu("Creating `tls.Socket`: %o",this.connectOpts),r=D0.connect(N0(this.connectOpts))):(mu("Creating `net.Socket`: %o",this.connectOpts),r=zf.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},s=zf.isIPv6(n.host)?`[${n.host}]`:n.host,u=`CONNECT ${s}:${n.port} HTTP/1.1\r
|
|
12
|
+
`;if(o.username||o.password){let m=`${decodeURIComponent(o.username)}:${decodeURIComponent(o.password)}`;i["Proxy-Authorization"]=`Basic ${Buffer.from(m).toString("base64")}`}i.Host=`${s}:${n.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let m of Object.keys(i))u+=`${m}: ${i[m]}\r
|
|
13
|
+
`;let d=(0,M4.parseProxyResponse)(r);r.write(`${u}\r
|
|
14
|
+
`);let{connect:f,buffered:h}=await d;if(t.emit("proxyConnect",f),this.emit("proxyConnect",f,t),f.statusCode===200)return t.once("socket",L4),n.secureEndpoint?(mu("Upgrading socket connection to TLS"),D0.connect({...z0(N0(n),"host","path","port"),socket:r})):r;r.destroy();let g=new zf.Socket({writable:!1});return g.readable=!0,t.once("socket",m=>{mu("Replaying proxy buffer for failed request"),(0,D4.default)(m.listenerCount("data")>0),m.push(h),m.push(null)}),g}};Uf.protocols=["http","https"];jr.HttpsProxyAgent=Uf;function L4(e){e.resume()}a(L4,"resume");function z0(e,...t){let n={},o;for(o in e)t.includes(o)||(n[o]=e[o]);return n}a(z0,"omit")});function j4(e){if(!/^data:/i.test(e))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');e=e.replace(/\r?\n/g,"");let t=e.indexOf(",");if(t===-1||t<=4)throw new TypeError("malformed data: URI");let n=e.substring(5,t).split(";"),o="",r=!1,i=n[0]||"text/plain",s=i;for(let h=1;h<n.length;h++)n[h]==="base64"?r=!0:n[h]&&(s+=`;${n[h]}`,n[h].indexOf("charset=")===0&&(o=n[h].substring(8)));!n[0]&&!o.length&&(s+=";charset=US-ASCII",o="US-ASCII");let u=r?"base64":"ascii",d=unescape(e.substring(t+1)),f=Buffer.from(d,u);return f.type=i,f.typeFull=s,f.charset=o,f}var j0,F0=$t(()=>{a(j4,"dataUriToBuffer");j0=j4});var q0=z((Mf,B0)=>{(function(e,t){typeof Mf=="object"&&typeof B0<"u"?t(Mf):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.WebStreamsPolyfill={}))})(Mf,(function(e){"use strict";function t(){}a(t,"noop");function n(c){return typeof c=="object"&&c!==null||typeof c=="function"}a(n,"typeIsObject");let o=t;function r(c,l){try{Object.defineProperty(c,"name",{value:l,configurable:!0})}catch{}}a(r,"setFunctionName");let i=Promise,s=Promise.prototype.then,u=Promise.reject.bind(i);function d(c){return new i(c)}a(d,"newPromise");function f(c){return d(l=>l(c))}a(f,"promiseResolvedWith");function h(c){return u(c)}a(h,"promiseRejectedWith");function g(c,l,_){return s.call(c,l,_)}a(g,"PerformPromiseThen");function m(c,l,_){g(g(c,l,_),void 0,o)}a(m,"uponPromise");function p(c,l){m(c,l)}a(p,"uponFulfillment");function y(c,l){m(c,void 0,l)}a(y,"uponRejection");function v(c,l,_){return g(c,l,_)}a(v,"transformPromiseWith");function E(c){g(c,void 0,o)}a(E,"setPromiseIsHandledToTrue");let b=a(c=>{if(typeof queueMicrotask=="function")b=queueMicrotask;else{let l=f(void 0);b=a(_=>g(l,_),"_queueMicrotask")}return b(c)},"_queueMicrotask");function k(c,l,_){if(typeof c!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(c,l,_)}a(k,"reflectCall");function N(c,l,_){try{return f(k(c,l,_))}catch(P){return h(P)}}a(N,"promiseCall");let Z=16384;class H{static{a(this,"SimpleQueue")}constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(l){let _=this._back,P=_;_._elements.length===Z-1&&(P={_elements:[],_next:void 0}),_._elements.push(l),P!==_&&(this._back=P,_._next=P),++this._size}shift(){let l=this._front,_=l,P=this._cursor,I=P+1,j=l._elements,G=j[P];return I===Z&&(_=l._next,I=0),--this._size,this._cursor=I,l!==_&&(this._front=_),j[P]=void 0,G}forEach(l){let _=this._cursor,P=this._front,I=P._elements;for(;(_!==I.length||P._next!==void 0)&&!(_===I.length&&(P=P._next,I=P._elements,_=0,I.length===0));)l(I[_]),++_}peek(){let l=this._front,_=this._cursor;return l._elements[_]}}let K=Symbol("[[AbortSteps]]"),ee=Symbol("[[ErrorSteps]]"),se=Symbol("[[CancelSteps]]"),Q=Symbol("[[PullSteps]]"),Le=Symbol("[[ReleaseSteps]]");function ce(c,l){c._ownerReadableStream=l,l._reader=c,l._state==="readable"?X(c):l._state==="closed"?he(c):pe(c,l._storedError)}a(ce,"ReadableStreamReaderGenericInitialize");function J(c,l){let _=c._ownerReadableStream;return Kr(_,l)}a(J,"ReadableStreamReaderGenericCancel");function W(c){let l=c._ownerReadableStream;l._state==="readable"?Ne(c,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):je(c,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),l._readableStreamController[Le](),l._reader=void 0,c._ownerReadableStream=void 0}a(W,"ReadableStreamReaderGenericRelease");function ne(c){return new TypeError("Cannot "+c+" a stream using a released reader")}a(ne,"readerLockException");function X(c){c._closedPromise=d((l,_)=>{c._closedPromise_resolve=l,c._closedPromise_reject=_})}a(X,"defaultReaderClosedPromiseInitialize");function pe(c,l){X(c),Ne(c,l)}a(pe,"defaultReaderClosedPromiseInitializeAsRejected");function he(c){X(c),rt(c)}a(he,"defaultReaderClosedPromiseInitializeAsResolved");function Ne(c,l){c._closedPromise_reject!==void 0&&(E(c._closedPromise),c._closedPromise_reject(l),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}a(Ne,"defaultReaderClosedPromiseReject");function je(c,l){pe(c,l)}a(je,"defaultReaderClosedPromiseResetToRejected");function rt(c){c._closedPromise_resolve!==void 0&&(c._closedPromise_resolve(void 0),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}a(rt,"defaultReaderClosedPromiseResolve");let ut=Number.isFinite||function(c){return typeof c=="number"&&isFinite(c)},kt=Math.trunc||function(c){return c<0?Math.ceil(c):Math.floor(c)};function ae(c){return typeof c=="object"||typeof c=="function"}a(ae,"isDictionary");function bt(c,l){if(c!==void 0&&!ae(c))throw new TypeError(`${l} is not an object.`)}a(bt,"assertDictionary");function St(c,l){if(typeof c!="function")throw new TypeError(`${l} is not a function.`)}a(St,"assertFunction");function pr(c){return typeof c=="object"&&c!==null||typeof c=="function"}a(pr,"isObject");function Xe(c,l){if(!pr(c))throw new TypeError(`${l} is not an object.`)}a(Xe,"assertObject");function ot(c,l,_){if(c===void 0)throw new TypeError(`Parameter ${l} is required in '${_}'.`)}a(ot,"assertRequiredArgument");function T(c,l,_){if(c===void 0)throw new TypeError(`${l} is required in '${_}'.`)}a(T,"assertRequiredField");function w(c){return Number(c)}a(w,"convertUnrestrictedDouble");function x(c){return c===0?0:c}a(x,"censorNegativeZero");function M(c){return x(kt(c))}a(M,"integerPart");function C(c,l){let P=Number.MAX_SAFE_INTEGER,I=Number(c);if(I=x(I),!ut(I))throw new TypeError(`${l} is not a finite number`);if(I=M(I),I<0||I>P)throw new TypeError(`${l} is outside the accepted range of 0 to ${P}, inclusive`);return!ut(I)||I===0?0:I}a(C,"convertUnsignedLongLongWithEnforceRange");function D(c,l){if(!so(c))throw new TypeError(`${l} is not a ReadableStream.`)}a(D,"assertReadableStream");function F(c){return new Y(c)}a(F,"AcquireReadableStreamDefaultReader");function R(c,l){c._reader._readRequests.push(l)}a(R,"ReadableStreamAddReadRequest");function $(c,l,_){let I=c._reader._readRequests.shift();_?I._closeSteps():I._chunkSteps(l)}a($,"ReadableStreamFulfillReadRequest");function L(c){return c._reader._readRequests.length}a(L,"ReadableStreamGetNumReadRequests");function U(c){let l=c._reader;return!(l===void 0||!ge(l))}a(U,"ReadableStreamHasDefaultReader");class Y{static{a(this,"ReadableStreamDefaultReader")}constructor(l){if(ot(l,1,"ReadableStreamDefaultReader"),D(l,"First parameter"),co(l))throw new TypeError("This stream has already been locked for exclusive reading by another reader");ce(this,l),this._readRequests=new H}get closed(){return ge(this)?this._closedPromise:h(ht("closed"))}cancel(l=void 0){return ge(this)?this._ownerReadableStream===void 0?h(ne("cancel")):J(this,l):h(ht("cancel"))}read(){if(!ge(this))return h(ht("read"));if(this._ownerReadableStream===void 0)return h(ne("read from"));let l,_,P=d((j,G)=>{l=j,_=G});return ve(this,{_chunkSteps:a(j=>l({value:j,done:!1}),"_chunkSteps"),_closeSteps:a(()=>l({value:void 0,done:!0}),"_closeSteps"),_errorSteps:a(j=>_(j),"_errorSteps")}),P}releaseLock(){if(!ge(this))throw ht("releaseLock");this._ownerReadableStream!==void 0&&We(this)}}Object.defineProperties(Y.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),r(Y.prototype.cancel,"cancel"),r(Y.prototype.read,"read"),r(Y.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Y.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function ge(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readRequests")?!1:c instanceof Y}a(ge,"IsReadableStreamDefaultReader");function ve(c,l){let _=c._ownerReadableStream;_._disturbed=!0,_._state==="closed"?l._closeSteps():_._state==="errored"?l._errorSteps(_._storedError):_._readableStreamController[Q](l)}a(ve,"ReadableStreamDefaultReaderRead");function We(c){W(c);let l=new TypeError("Reader was released");mt(c,l)}a(We,"ReadableStreamDefaultReaderRelease");function mt(c,l){let _=c._readRequests;c._readRequests=new H,_.forEach(P=>{P._errorSteps(l)})}a(mt,"ReadableStreamDefaultReaderErrorReadRequests");function ht(c){return new TypeError(`ReadableStreamDefaultReader.prototype.${c} can only be used on a ReadableStreamDefaultReader`)}a(ht,"defaultReaderBrandCheckException");let He=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ye{static{a(this,"ReadableStreamAsyncIteratorImpl")}constructor(l,_){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=l,this._preventCancel=_}next(){let l=a(()=>this._nextSteps(),"nextSteps");return this._ongoingPromise=this._ongoingPromise?v(this._ongoingPromise,l,l):l(),this._ongoingPromise}return(l){let _=a(()=>this._returnSteps(l),"returnSteps");return this._ongoingPromise?v(this._ongoingPromise,_,_):_()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let l=this._reader,_,P,I=d((G,me)=>{_=G,P=me});return ve(l,{_chunkSteps:a(G=>{this._ongoingPromise=void 0,b(()=>_({value:G,done:!1}))},"_chunkSteps"),_closeSteps:a(()=>{this._ongoingPromise=void 0,this._isFinished=!0,W(l),_({value:void 0,done:!0})},"_closeSteps"),_errorSteps:a(G=>{this._ongoingPromise=void 0,this._isFinished=!0,W(l),P(G)},"_errorSteps")}),I}_returnSteps(l){if(this._isFinished)return Promise.resolve({value:l,done:!0});this._isFinished=!0;let _=this._reader;if(!this._preventCancel){let P=J(_,l);return W(_),v(P,()=>({value:l,done:!0}))}return W(_),f({value:l,done:!0})}}let It={next(){return ki(this)?this._asyncIteratorImpl.next():h($i("next"))},return(c){return ki(this)?this._asyncIteratorImpl.return(c):h($i("return"))}};Object.setPrototypeOf(It,He);function Oi(c,l){let _=F(c),P=new Ye(_,l),I=Object.create(It);return I._asyncIteratorImpl=P,I}a(Oi,"AcquireReadableStreamAsyncIterator");function ki(c){if(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_asyncIteratorImpl"))return!1;try{return c._asyncIteratorImpl instanceof Ye}catch{return!1}}a(ki,"IsReadableStreamAsyncIterator");function $i(c){return new TypeError(`ReadableStreamAsyncIterator.${c} can only be used on a ReadableSteamAsyncIterator`)}a($i,"streamAsyncIteratorBrandCheckException");let fr=Number.isNaN||function(c){return c!==c};var Cn,qt,Rt;function it(c){return c.slice()}a(it,"CreateArrayFromList");function uP(c,l,_,P,I){new Uint8Array(c).set(new Uint8Array(_,P,I),l)}a(uP,"CopyDataBlockBytes");let On=a(c=>(typeof c.transfer=="function"?On=a(l=>l.transfer(),"TransferArrayBuffer"):typeof structuredClone=="function"?On=a(l=>structuredClone(l,{transfer:[l]}),"TransferArrayBuffer"):On=a(l=>l,"TransferArrayBuffer"),On(c)),"TransferArrayBuffer"),no=a(c=>(typeof c.detached=="boolean"?no=a(l=>l.detached,"IsDetachedBuffer"):no=a(l=>l.byteLength===0,"IsDetachedBuffer"),no(c)),"IsDetachedBuffer");function lP(c,l,_){if(c.slice)return c.slice(l,_);let P=_-l,I=new ArrayBuffer(P);return uP(I,0,c,l,P),I}a(lP,"ArrayBufferSlice");function rl(c,l){let _=c[l];if(_!=null){if(typeof _!="function")throw new TypeError(`${String(l)} is not a function`);return _}}a(rl,"GetMethod");function _z(c){let l={[Symbol.iterator]:()=>c.iterator},_=(async function*(){return yield*l})(),P=_.next;return{iterator:_,nextMethod:P,done:!1}}a(_z,"CreateAsyncFromSyncIterator");let bh=(Rt=(Cn=Symbol.asyncIterator)!==null&&Cn!==void 0?Cn:(qt=Symbol.for)===null||qt===void 0?void 0:qt.call(Symbol,"Symbol.asyncIterator"))!==null&&Rt!==void 0?Rt:"@@asyncIterator";function dP(c,l="sync",_){if(_===void 0)if(l==="async"){if(_=rl(c,bh),_===void 0){let j=rl(c,Symbol.iterator),G=dP(c,"sync",j);return _z(G)}}else _=rl(c,Symbol.iterator);if(_===void 0)throw new TypeError("The object is not iterable");let P=k(_,c,[]);if(!n(P))throw new TypeError("The iterator method must return an object");let I=P.next;return{iterator:P,nextMethod:I,done:!1}}a(dP,"GetIterator");function bz(c){let l=k(c.nextMethod,c.iterator,[]);if(!n(l))throw new TypeError("The iterator.next() method must return an object");return l}a(bz,"IteratorNext");function Ez(c){return!!c.done}a(Ez,"IteratorComplete");function Sz(c){return c.value}a(Sz,"IteratorValue");function Tz(c){return!(typeof c!="number"||fr(c)||c<0)}a(Tz,"IsNonNegativeNumber");function pP(c){let l=lP(c.buffer,c.byteOffset,c.byteOffset+c.byteLength);return new Uint8Array(l)}a(pP,"CloneAsUint8Array");function Eh(c){let l=c._queue.shift();return c._queueTotalSize-=l.size,c._queueTotalSize<0&&(c._queueTotalSize=0),l.value}a(Eh,"DequeueValue");function Sh(c,l,_){if(!Tz(_)||_===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");c._queue.push({value:l,size:_}),c._queueTotalSize+=_}a(Sh,"EnqueueValueWithSize");function Pz(c){return c._queue.peek().value}a(Pz,"PeekQueueValue");function oo(c){c._queue=new H,c._queueTotalSize=0}a(oo,"ResetQueue");function fP(c){return c===DataView}a(fP,"isDataViewConstructor");function wz(c){return fP(c.constructor)}a(wz,"isDataView");function xz(c){return fP(c)?1:c.BYTES_PER_ELEMENT}a(xz,"arrayBufferViewElementSize");class jo{static{a(this,"ReadableStreamBYOBRequest")}constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Th(this))throw Ih("view");return this._view}respond(l){if(!Th(this))throw Ih("respond");if(ot(l,1,"respond"),l=C(l,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(no(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");al(this._associatedReadableByteStreamController,l)}respondWithNewView(l){if(!Th(this))throw Ih("respondWithNewView");if(ot(l,1,"respondWithNewView"),!ArrayBuffer.isView(l))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(no(l.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");sl(this._associatedReadableByteStreamController,l)}}Object.defineProperties(jo.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),r(jo.prototype.respond,"respond"),r(jo.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(jo.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class kn{static{a(this,"ReadableByteStreamController")}constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Fo(this))throw us("byobRequest");return Ah(this)}get desiredSize(){if(!Fo(this))throw us("desiredSize");return TP(this)}close(){if(!Fo(this))throw us("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let l=this._controlledReadableByteStream._state;if(l!=="readable")throw new TypeError(`The stream (in ${l} state) is not in the readable state and cannot be closed`);cs(this)}enqueue(l){if(!Fo(this))throw us("enqueue");if(ot(l,1,"enqueue"),!ArrayBuffer.isView(l))throw new TypeError("chunk must be an array buffer view");if(l.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(l.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");let _=this._controlledReadableByteStream._state;if(_!=="readable")throw new TypeError(`The stream (in ${_} state) is not in the readable state and cannot be enqueued to`);il(this,l)}error(l=void 0){if(!Fo(this))throw us("error");kr(this,l)}[se](l){mP(this),oo(this);let _=this._cancelAlgorithm(l);return ol(this),_}[Q](l){let _=this._controlledReadableByteStream;if(this._queueTotalSize>0){SP(this,l);return}let P=this._autoAllocateChunkSize;if(P!==void 0){let I;try{I=new ArrayBuffer(P)}catch(G){l._errorSteps(G);return}let j={buffer:I,bufferByteLength:P,byteOffset:0,byteLength:P,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(j)}R(_,l),Bo(this)}[Le](){if(this._pendingPullIntos.length>0){let l=this._pendingPullIntos.peek();l.readerType="none",this._pendingPullIntos=new H,this._pendingPullIntos.push(l)}}}Object.defineProperties(kn.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),r(kn.prototype.close,"close"),r(kn.prototype.enqueue,"enqueue"),r(kn.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(kn.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function Fo(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableByteStream")?!1:c instanceof kn}a(Fo,"IsReadableByteStreamController");function Th(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_associatedReadableByteStreamController")?!1:c instanceof jo}a(Th,"IsReadableStreamBYOBRequest");function Bo(c){if(!Oz(c))return;if(c._pulling){c._pullAgain=!0;return}c._pulling=!0;let _=c._pullAlgorithm();m(_,()=>(c._pulling=!1,c._pullAgain&&(c._pullAgain=!1,Bo(c)),null),P=>(kr(c,P),null))}a(Bo,"ReadableByteStreamControllerCallPullIfNeeded");function mP(c){wh(c),c._pendingPullIntos=new H}a(mP,"ReadableByteStreamControllerClearPendingPullIntos");function Ph(c,l){let _=!1;c._state==="closed"&&(_=!0);let P=hP(l);l.readerType==="default"?$(c,P,_):Uz(c,P,_)}a(Ph,"ReadableByteStreamControllerCommitPullIntoDescriptor");function hP(c){let l=c.bytesFilled,_=c.elementSize;return new c.viewConstructor(c.buffer,c.byteOffset,l/_)}a(hP,"ReadableByteStreamControllerConvertPullIntoDescriptor");function nl(c,l,_,P){c._queue.push({buffer:l,byteOffset:_,byteLength:P}),c._queueTotalSize+=P}a(nl,"ReadableByteStreamControllerEnqueueChunkToQueue");function gP(c,l,_,P){let I;try{I=lP(l,_,_+P)}catch(j){throw kr(c,j),j}nl(c,I,0,P)}a(gP,"ReadableByteStreamControllerEnqueueClonedChunkToQueue");function yP(c,l){l.bytesFilled>0&&gP(c,l.buffer,l.byteOffset,l.bytesFilled),Di(c)}a(yP,"ReadableByteStreamControllerEnqueueDetachedPullIntoToQueue");function vP(c,l){let _=Math.min(c._queueTotalSize,l.byteLength-l.bytesFilled),P=l.bytesFilled+_,I=_,j=!1,G=P%l.elementSize,me=P-G;me>=l.minimumFill&&(I=me-l.bytesFilled,j=!0);let Ie=c._queue;for(;I>0;){let _e=Ie.peek(),ke=Math.min(I,_e.byteLength),Fe=l.byteOffset+l.bytesFilled;uP(l.buffer,Fe,_e.buffer,_e.byteOffset,ke),_e.byteLength===ke?Ie.shift():(_e.byteOffset+=ke,_e.byteLength-=ke),c._queueTotalSize-=ke,_P(c,ke,l),I-=ke}return j}a(vP,"ReadableByteStreamControllerFillPullIntoDescriptorFromQueue");function _P(c,l,_){_.bytesFilled+=l}a(_P,"ReadableByteStreamControllerFillHeadPullIntoDescriptor");function bP(c){c._queueTotalSize===0&&c._closeRequested?(ol(c),hs(c._controlledReadableByteStream)):Bo(c)}a(bP,"ReadableByteStreamControllerHandleQueueDrain");function wh(c){c._byobRequest!==null&&(c._byobRequest._associatedReadableByteStreamController=void 0,c._byobRequest._view=null,c._byobRequest=null)}a(wh,"ReadableByteStreamControllerInvalidateBYOBRequest");function xh(c){for(;c._pendingPullIntos.length>0;){if(c._queueTotalSize===0)return;let l=c._pendingPullIntos.peek();vP(c,l)&&(Di(c),Ph(c._controlledReadableByteStream,l))}}a(xh,"ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue");function Az(c){let l=c._controlledReadableByteStream._reader;for(;l._readRequests.length>0;){if(c._queueTotalSize===0)return;let _=l._readRequests.shift();SP(c,_)}}a(Az,"ReadableByteStreamControllerProcessReadRequestsUsingQueue");function Iz(c,l,_,P){let I=c._controlledReadableByteStream,j=l.constructor,G=xz(j),{byteOffset:me,byteLength:Ie}=l,_e=_*G,ke;try{ke=On(l.buffer)}catch(lt){P._errorSteps(lt);return}let Fe={buffer:ke,bufferByteLength:ke.byteLength,byteOffset:me,byteLength:Ie,bytesFilled:0,minimumFill:_e,elementSize:G,viewConstructor:j,readerType:"byob"};if(c._pendingPullIntos.length>0){c._pendingPullIntos.push(Fe),xP(I,P);return}if(I._state==="closed"){let lt=new j(Fe.buffer,Fe.byteOffset,0);P._closeSteps(lt);return}if(c._queueTotalSize>0){if(vP(c,Fe)){let lt=hP(Fe);bP(c),P._chunkSteps(lt);return}if(c._closeRequested){let lt=new TypeError("Insufficient bytes to fill elements in the given buffer");kr(c,lt),P._errorSteps(lt);return}}c._pendingPullIntos.push(Fe),xP(I,P),Bo(c)}a(Iz,"ReadableByteStreamControllerPullInto");function Rz(c,l){l.readerType==="none"&&Di(c);let _=c._controlledReadableByteStream;if(Rh(_))for(;AP(_)>0;){let P=Di(c);Ph(_,P)}}a(Rz,"ReadableByteStreamControllerRespondInClosedState");function Cz(c,l,_){if(_P(c,l,_),_.readerType==="none"){yP(c,_),xh(c);return}if(_.bytesFilled<_.minimumFill)return;Di(c);let P=_.bytesFilled%_.elementSize;if(P>0){let I=_.byteOffset+_.bytesFilled;gP(c,_.buffer,I-P,P)}_.bytesFilled-=P,Ph(c._controlledReadableByteStream,_),xh(c)}a(Cz,"ReadableByteStreamControllerRespondInReadableState");function EP(c,l){let _=c._pendingPullIntos.peek();wh(c),c._controlledReadableByteStream._state==="closed"?Rz(c,_):Cz(c,l,_),Bo(c)}a(EP,"ReadableByteStreamControllerRespondInternal");function Di(c){return c._pendingPullIntos.shift()}a(Di,"ReadableByteStreamControllerShiftPendingPullInto");function Oz(c){let l=c._controlledReadableByteStream;return l._state!=="readable"||c._closeRequested||!c._started?!1:!!(U(l)&&L(l)>0||Rh(l)&&AP(l)>0||TP(c)>0)}a(Oz,"ReadableByteStreamControllerShouldCallPull");function ol(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0}a(ol,"ReadableByteStreamControllerClearAlgorithms");function cs(c){let l=c._controlledReadableByteStream;if(!(c._closeRequested||l._state!=="readable")){if(c._queueTotalSize>0){c._closeRequested=!0;return}if(c._pendingPullIntos.length>0){let _=c._pendingPullIntos.peek();if(_.bytesFilled%_.elementSize!==0){let P=new TypeError("Insufficient bytes to fill elements in the given buffer");throw kr(c,P),P}}ol(c),hs(l)}}a(cs,"ReadableByteStreamControllerClose");function il(c,l){let _=c._controlledReadableByteStream;if(c._closeRequested||_._state!=="readable")return;let{buffer:P,byteOffset:I,byteLength:j}=l;if(no(P))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");let G=On(P);if(c._pendingPullIntos.length>0){let me=c._pendingPullIntos.peek();if(no(me.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");wh(c),me.buffer=On(me.buffer),me.readerType==="none"&&yP(c,me)}if(U(_))if(Az(c),L(_)===0)nl(c,G,I,j);else{c._pendingPullIntos.length>0&&Di(c);let me=new Uint8Array(G,I,j);$(_,me,!1)}else Rh(_)?(nl(c,G,I,j),xh(c)):nl(c,G,I,j);Bo(c)}a(il,"ReadableByteStreamControllerEnqueue");function kr(c,l){let _=c._controlledReadableByteStream;_._state==="readable"&&(mP(c),oo(c),ol(c),YP(_,l))}a(kr,"ReadableByteStreamControllerError");function SP(c,l){let _=c._queue.shift();c._queueTotalSize-=_.byteLength,bP(c);let P=new Uint8Array(_.buffer,_.byteOffset,_.byteLength);l._chunkSteps(P)}a(SP,"ReadableByteStreamControllerFillReadRequestFromQueue");function Ah(c){if(c._byobRequest===null&&c._pendingPullIntos.length>0){let l=c._pendingPullIntos.peek(),_=new Uint8Array(l.buffer,l.byteOffset+l.bytesFilled,l.byteLength-l.bytesFilled),P=Object.create(jo.prototype);$z(P,c,_),c._byobRequest=P}return c._byobRequest}a(Ah,"ReadableByteStreamControllerGetBYOBRequest");function TP(c){let l=c._controlledReadableByteStream._state;return l==="errored"?null:l==="closed"?0:c._strategyHWM-c._queueTotalSize}a(TP,"ReadableByteStreamControllerGetDesiredSize");function al(c,l){let _=c._pendingPullIntos.peek();if(c._controlledReadableByteStream._state==="closed"){if(l!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(l===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(_.bytesFilled+l>_.byteLength)throw new RangeError("bytesWritten out of range")}_.buffer=On(_.buffer),EP(c,l)}a(al,"ReadableByteStreamControllerRespond");function sl(c,l){let _=c._pendingPullIntos.peek();if(c._controlledReadableByteStream._state==="closed"){if(l.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(l.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(_.byteOffset+_.bytesFilled!==l.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(_.bufferByteLength!==l.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(_.bytesFilled+l.byteLength>_.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let I=l.byteLength;_.buffer=On(l.buffer),EP(c,I)}a(sl,"ReadableByteStreamControllerRespondWithNewView");function PP(c,l,_,P,I,j,G){l._controlledReadableByteStream=c,l._pullAgain=!1,l._pulling=!1,l._byobRequest=null,l._queue=l._queueTotalSize=void 0,oo(l),l._closeRequested=!1,l._started=!1,l._strategyHWM=j,l._pullAlgorithm=P,l._cancelAlgorithm=I,l._autoAllocateChunkSize=G,l._pendingPullIntos=new H,c._readableStreamController=l;let me=_();m(f(me),()=>(l._started=!0,Bo(l),null),Ie=>(kr(l,Ie),null))}a(PP,"SetUpReadableByteStreamController");function kz(c,l,_){let P=Object.create(kn.prototype),I,j,G;l.start!==void 0?I=a(()=>l.start(P),"startAlgorithm"):I=a(()=>{},"startAlgorithm"),l.pull!==void 0?j=a(()=>l.pull(P),"pullAlgorithm"):j=a(()=>f(void 0),"pullAlgorithm"),l.cancel!==void 0?G=a(Ie=>l.cancel(Ie),"cancelAlgorithm"):G=a(()=>f(void 0),"cancelAlgorithm");let me=l.autoAllocateChunkSize;if(me===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");PP(c,P,I,j,G,_,me)}a(kz,"SetUpReadableByteStreamControllerFromUnderlyingSource");function $z(c,l,_){c._associatedReadableByteStreamController=l,c._view=_}a($z,"SetUpReadableStreamBYOBRequest");function Ih(c){return new TypeError(`ReadableStreamBYOBRequest.prototype.${c} can only be used on a ReadableStreamBYOBRequest`)}a(Ih,"byobRequestBrandCheckException");function us(c){return new TypeError(`ReadableByteStreamController.prototype.${c} can only be used on a ReadableByteStreamController`)}a(us,"byteStreamControllerBrandCheckException");function Dz(c,l){bt(c,l);let _=c?.mode;return{mode:_===void 0?void 0:Nz(_,`${l} has member 'mode' that`)}}a(Dz,"convertReaderOptions");function Nz(c,l){if(c=`${c}`,c!=="byob")throw new TypeError(`${l} '${c}' is not a valid enumeration value for ReadableStreamReaderMode`);return c}a(Nz,"convertReadableStreamReaderMode");function zz(c,l){var _;bt(c,l);let P=(_=c?.min)!==null&&_!==void 0?_:1;return{min:C(P,`${l} has member 'min' that`)}}a(zz,"convertByobReadOptions");function wP(c){return new io(c)}a(wP,"AcquireReadableStreamBYOBReader");function xP(c,l){c._reader._readIntoRequests.push(l)}a(xP,"ReadableStreamAddReadIntoRequest");function Uz(c,l,_){let I=c._reader._readIntoRequests.shift();_?I._closeSteps(l):I._chunkSteps(l)}a(Uz,"ReadableStreamFulfillReadIntoRequest");function AP(c){return c._reader._readIntoRequests.length}a(AP,"ReadableStreamGetNumReadIntoRequests");function Rh(c){let l=c._reader;return!(l===void 0||!qo(l))}a(Rh,"ReadableStreamHasBYOBReader");class io{static{a(this,"ReadableStreamBYOBReader")}constructor(l){if(ot(l,1,"ReadableStreamBYOBReader"),D(l,"First parameter"),co(l))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Fo(l._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");ce(this,l),this._readIntoRequests=new H}get closed(){return qo(this)?this._closedPromise:h(cl("closed"))}cancel(l=void 0){return qo(this)?this._ownerReadableStream===void 0?h(ne("cancel")):J(this,l):h(cl("cancel"))}read(l,_={}){if(!qo(this))return h(cl("read"));if(!ArrayBuffer.isView(l))return h(new TypeError("view must be an array buffer view"));if(l.byteLength===0)return h(new TypeError("view must have non-zero byteLength"));if(l.buffer.byteLength===0)return h(new TypeError("view's buffer must have non-zero byteLength"));if(no(l.buffer))return h(new TypeError("view's buffer has been detached"));let P;try{P=zz(_,"options")}catch(_e){return h(_e)}let I=P.min;if(I===0)return h(new TypeError("options.min must be greater than 0"));if(wz(l)){if(I>l.byteLength)return h(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(I>l.length)return h(new RangeError("options.min must be less than or equal to view's length"));if(this._ownerReadableStream===void 0)return h(ne("read from"));let j,G,me=d((_e,ke)=>{j=_e,G=ke});return IP(this,l,I,{_chunkSteps:a(_e=>j({value:_e,done:!1}),"_chunkSteps"),_closeSteps:a(_e=>j({value:_e,done:!0}),"_closeSteps"),_errorSteps:a(_e=>G(_e),"_errorSteps")}),me}releaseLock(){if(!qo(this))throw cl("releaseLock");this._ownerReadableStream!==void 0&&Mz(this)}}Object.defineProperties(io.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),r(io.prototype.cancel,"cancel"),r(io.prototype.read,"read"),r(io.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(io.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function qo(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readIntoRequests")?!1:c instanceof io}a(qo,"IsReadableStreamBYOBReader");function IP(c,l,_,P){let I=c._ownerReadableStream;I._disturbed=!0,I._state==="errored"?P._errorSteps(I._storedError):Iz(I._readableStreamController,l,_,P)}a(IP,"ReadableStreamBYOBReaderRead");function Mz(c){W(c);let l=new TypeError("Reader was released");RP(c,l)}a(Mz,"ReadableStreamBYOBReaderRelease");function RP(c,l){let _=c._readIntoRequests;c._readIntoRequests=new H,_.forEach(P=>{P._errorSteps(l)})}a(RP,"ReadableStreamBYOBReaderErrorReadIntoRequests");function cl(c){return new TypeError(`ReadableStreamBYOBReader.prototype.${c} can only be used on a ReadableStreamBYOBReader`)}a(cl,"byobReaderBrandCheckException");function ls(c,l){let{highWaterMark:_}=c;if(_===void 0)return l;if(fr(_)||_<0)throw new RangeError("Invalid highWaterMark");return _}a(ls,"ExtractHighWaterMark");function ul(c){let{size:l}=c;return l||(()=>1)}a(ul,"ExtractSizeAlgorithm");function ll(c,l){bt(c,l);let _=c?.highWaterMark,P=c?.size;return{highWaterMark:_===void 0?void 0:w(_),size:P===void 0?void 0:Lz(P,`${l} has member 'size' that`)}}a(ll,"convertQueuingStrategy");function Lz(c,l){return St(c,l),_=>w(c(_))}a(Lz,"convertQueuingStrategySize");function jz(c,l){bt(c,l);let _=c?.abort,P=c?.close,I=c?.start,j=c?.type,G=c?.write;return{abort:_===void 0?void 0:Fz(_,c,`${l} has member 'abort' that`),close:P===void 0?void 0:Bz(P,c,`${l} has member 'close' that`),start:I===void 0?void 0:qz(I,c,`${l} has member 'start' that`),write:G===void 0?void 0:Vz(G,c,`${l} has member 'write' that`),type:j}}a(jz,"convertUnderlyingSink");function Fz(c,l,_){return St(c,_),P=>N(c,l,[P])}a(Fz,"convertUnderlyingSinkAbortCallback");function Bz(c,l,_){return St(c,_),()=>N(c,l,[])}a(Bz,"convertUnderlyingSinkCloseCallback");function qz(c,l,_){return St(c,_),P=>k(c,l,[P])}a(qz,"convertUnderlyingSinkStartCallback");function Vz(c,l,_){return St(c,_),(P,I)=>N(c,l,[P,I])}a(Vz,"convertUnderlyingSinkWriteCallback");function CP(c,l){if(!Ni(c))throw new TypeError(`${l} is not a WritableStream.`)}a(CP,"assertWritableStream");function Gz(c){if(typeof c!="object"||c===null)return!1;try{return typeof c.aborted=="boolean"}catch{return!1}}a(Gz,"isAbortSignal");let Hz=typeof AbortController=="function";function Zz(){if(Hz)return new AbortController}a(Zz,"createAbortController");class ao{static{a(this,"WritableStream")}constructor(l={},_={}){l===void 0?l=null:Xe(l,"First parameter");let P=ll(_,"Second parameter"),I=jz(l,"First parameter");if(kP(this),I.type!==void 0)throw new RangeError("Invalid type is specified");let G=ul(P),me=ls(P,1);sU(this,I,me,G)}get locked(){if(!Ni(this))throw hl("locked");return zi(this)}abort(l=void 0){return Ni(this)?zi(this)?h(new TypeError("Cannot abort a stream that already has a writer")):dl(this,l):h(hl("abort"))}close(){return Ni(this)?zi(this)?h(new TypeError("Cannot close a stream that already has a writer")):pn(this)?h(new TypeError("Cannot close an already-closing stream")):$P(this):h(hl("close"))}getWriter(){if(!Ni(this))throw hl("getWriter");return OP(this)}}Object.defineProperties(ao.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),r(ao.prototype.abort,"abort"),r(ao.prototype.close,"close"),r(ao.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ao.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function OP(c){return new $n(c)}a(OP,"AcquireWritableStreamDefaultWriter");function Wz(c,l,_,P,I=1,j=()=>1){let G=Object.create(ao.prototype);kP(G);let me=Object.create(Ui.prototype);return LP(G,me,c,l,_,P,I,j),G}a(Wz,"CreateWritableStream");function kP(c){c._state="writable",c._storedError=void 0,c._writer=void 0,c._writableStreamController=void 0,c._writeRequests=new H,c._inFlightWriteRequest=void 0,c._closeRequest=void 0,c._inFlightCloseRequest=void 0,c._pendingAbortRequest=void 0,c._backpressure=!1}a(kP,"InitializeWritableStream");function Ni(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_writableStreamController")?!1:c instanceof ao}a(Ni,"IsWritableStream");function zi(c){return c._writer!==void 0}a(zi,"IsWritableStreamLocked");function dl(c,l){var _;if(c._state==="closed"||c._state==="errored")return f(void 0);c._writableStreamController._abortReason=l,(_=c._writableStreamController._abortController)===null||_===void 0||_.abort(l);let P=c._state;if(P==="closed"||P==="errored")return f(void 0);if(c._pendingAbortRequest!==void 0)return c._pendingAbortRequest._promise;let I=!1;P==="erroring"&&(I=!0,l=void 0);let j=d((G,me)=>{c._pendingAbortRequest={_promise:void 0,_resolve:G,_reject:me,_reason:l,_wasAlreadyErroring:I}});return c._pendingAbortRequest._promise=j,I||Oh(c,l),j}a(dl,"WritableStreamAbort");function $P(c){let l=c._state;if(l==="closed"||l==="errored")return h(new TypeError(`The stream (in ${l} state) is not in the writable state and cannot be closed`));let _=d((I,j)=>{let G={_resolve:I,_reject:j};c._closeRequest=G}),P=c._writer;return P!==void 0&&c._backpressure&&l==="writable"&&Lh(P),cU(c._writableStreamController),_}a($P,"WritableStreamClose");function Kz(c){return d((_,P)=>{let I={_resolve:_,_reject:P};c._writeRequests.push(I)})}a(Kz,"WritableStreamAddWriteRequest");function Ch(c,l){if(c._state==="writable"){Oh(c,l);return}kh(c)}a(Ch,"WritableStreamDealWithRejection");function Oh(c,l){let _=c._writableStreamController;c._state="erroring",c._storedError=l;let P=c._writer;P!==void 0&&NP(P,l),!eU(c)&&_._started&&kh(c)}a(Oh,"WritableStreamStartErroring");function kh(c){c._state="errored",c._writableStreamController[ee]();let l=c._storedError;if(c._writeRequests.forEach(I=>{I._reject(l)}),c._writeRequests=new H,c._pendingAbortRequest===void 0){pl(c);return}let _=c._pendingAbortRequest;if(c._pendingAbortRequest=void 0,_._wasAlreadyErroring){_._reject(l),pl(c);return}let P=c._writableStreamController[K](_._reason);m(P,()=>(_._resolve(),pl(c),null),I=>(_._reject(I),pl(c),null))}a(kh,"WritableStreamFinishErroring");function Jz(c){c._inFlightWriteRequest._resolve(void 0),c._inFlightWriteRequest=void 0}a(Jz,"WritableStreamFinishInFlightWrite");function Yz(c,l){c._inFlightWriteRequest._reject(l),c._inFlightWriteRequest=void 0,Ch(c,l)}a(Yz,"WritableStreamFinishInFlightWriteWithError");function Xz(c){c._inFlightCloseRequest._resolve(void 0),c._inFlightCloseRequest=void 0,c._state==="erroring"&&(c._storedError=void 0,c._pendingAbortRequest!==void 0&&(c._pendingAbortRequest._resolve(),c._pendingAbortRequest=void 0)),c._state="closed";let _=c._writer;_!==void 0&&qP(_)}a(Xz,"WritableStreamFinishInFlightClose");function Qz(c,l){c._inFlightCloseRequest._reject(l),c._inFlightCloseRequest=void 0,c._pendingAbortRequest!==void 0&&(c._pendingAbortRequest._reject(l),c._pendingAbortRequest=void 0),Ch(c,l)}a(Qz,"WritableStreamFinishInFlightCloseWithError");function pn(c){return!(c._closeRequest===void 0&&c._inFlightCloseRequest===void 0)}a(pn,"WritableStreamCloseQueuedOrInFlight");function eU(c){return!(c._inFlightWriteRequest===void 0&&c._inFlightCloseRequest===void 0)}a(eU,"WritableStreamHasOperationMarkedInFlight");function tU(c){c._inFlightCloseRequest=c._closeRequest,c._closeRequest=void 0}a(tU,"WritableStreamMarkCloseRequestInFlight");function rU(c){c._inFlightWriteRequest=c._writeRequests.shift()}a(rU,"WritableStreamMarkFirstWriteRequestInFlight");function pl(c){c._closeRequest!==void 0&&(c._closeRequest._reject(c._storedError),c._closeRequest=void 0);let l=c._writer;l!==void 0&&Uh(l,c._storedError)}a(pl,"WritableStreamRejectCloseAndClosedPromiseIfNeeded");function $h(c,l){let _=c._writer;_!==void 0&&l!==c._backpressure&&(l?hU(_):Lh(_)),c._backpressure=l}a($h,"WritableStreamUpdateBackpressure");class $n{static{a(this,"WritableStreamDefaultWriter")}constructor(l){if(ot(l,1,"WritableStreamDefaultWriter"),CP(l,"First parameter"),zi(l))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=l,l._writer=this;let _=l._state;if(_==="writable")!pn(l)&&l._backpressure?yl(this):VP(this),gl(this);else if(_==="erroring")Mh(this,l._storedError),gl(this);else if(_==="closed")VP(this),fU(this);else{let P=l._storedError;Mh(this,P),BP(this,P)}}get closed(){return Vo(this)?this._closedPromise:h(Go("closed"))}get desiredSize(){if(!Vo(this))throw Go("desiredSize");if(this._ownerWritableStream===void 0)throw ps("desiredSize");return aU(this)}get ready(){return Vo(this)?this._readyPromise:h(Go("ready"))}abort(l=void 0){return Vo(this)?this._ownerWritableStream===void 0?h(ps("abort")):nU(this,l):h(Go("abort"))}close(){if(!Vo(this))return h(Go("close"));let l=this._ownerWritableStream;return l===void 0?h(ps("close")):pn(l)?h(new TypeError("Cannot close an already-closing stream")):DP(this)}releaseLock(){if(!Vo(this))throw Go("releaseLock");this._ownerWritableStream!==void 0&&zP(this)}write(l=void 0){return Vo(this)?this._ownerWritableStream===void 0?h(ps("write to")):UP(this,l):h(Go("write"))}}Object.defineProperties($n.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),r($n.prototype.abort,"abort"),r($n.prototype.close,"close"),r($n.prototype.releaseLock,"releaseLock"),r($n.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty($n.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Vo(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_ownerWritableStream")?!1:c instanceof $n}a(Vo,"IsWritableStreamDefaultWriter");function nU(c,l){let _=c._ownerWritableStream;return dl(_,l)}a(nU,"WritableStreamDefaultWriterAbort");function DP(c){let l=c._ownerWritableStream;return $P(l)}a(DP,"WritableStreamDefaultWriterClose");function oU(c){let l=c._ownerWritableStream,_=l._state;return pn(l)||_==="closed"?f(void 0):_==="errored"?h(l._storedError):DP(c)}a(oU,"WritableStreamDefaultWriterCloseWithErrorPropagation");function iU(c,l){c._closedPromiseState==="pending"?Uh(c,l):mU(c,l)}a(iU,"WritableStreamDefaultWriterEnsureClosedPromiseRejected");function NP(c,l){c._readyPromiseState==="pending"?GP(c,l):gU(c,l)}a(NP,"WritableStreamDefaultWriterEnsureReadyPromiseRejected");function aU(c){let l=c._ownerWritableStream,_=l._state;return _==="errored"||_==="erroring"?null:_==="closed"?0:jP(l._writableStreamController)}a(aU,"WritableStreamDefaultWriterGetDesiredSize");function zP(c){let l=c._ownerWritableStream,_=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");NP(c,_),iU(c,_),l._writer=void 0,c._ownerWritableStream=void 0}a(zP,"WritableStreamDefaultWriterRelease");function UP(c,l){let _=c._ownerWritableStream,P=_._writableStreamController,I=uU(P,l);if(_!==c._ownerWritableStream)return h(ps("write to"));let j=_._state;if(j==="errored")return h(_._storedError);if(pn(_)||j==="closed")return h(new TypeError("The stream is closing or closed and cannot be written to"));if(j==="erroring")return h(_._storedError);let G=Kz(_);return lU(P,l,I),G}a(UP,"WritableStreamDefaultWriterWrite");let MP={};class Ui{static{a(this,"WritableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!Dh(this))throw zh("abortReason");return this._abortReason}get signal(){if(!Dh(this))throw zh("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(l=void 0){if(!Dh(this))throw zh("error");this._controlledWritableStream._state==="writable"&&FP(this,l)}[K](l){let _=this._abortAlgorithm(l);return fl(this),_}[ee](){oo(this)}}Object.defineProperties(Ui.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ui.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Dh(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledWritableStream")?!1:c instanceof Ui}a(Dh,"IsWritableStreamDefaultController");function LP(c,l,_,P,I,j,G,me){l._controlledWritableStream=c,c._writableStreamController=l,l._queue=void 0,l._queueTotalSize=void 0,oo(l),l._abortReason=void 0,l._abortController=Zz(),l._started=!1,l._strategySizeAlgorithm=me,l._strategyHWM=G,l._writeAlgorithm=P,l._closeAlgorithm=I,l._abortAlgorithm=j;let Ie=Nh(l);$h(c,Ie);let _e=_(),ke=f(_e);m(ke,()=>(l._started=!0,ml(l),null),Fe=>(l._started=!0,Ch(c,Fe),null))}a(LP,"SetUpWritableStreamDefaultController");function sU(c,l,_,P){let I=Object.create(Ui.prototype),j,G,me,Ie;l.start!==void 0?j=a(()=>l.start(I),"startAlgorithm"):j=a(()=>{},"startAlgorithm"),l.write!==void 0?G=a(_e=>l.write(_e,I),"writeAlgorithm"):G=a(()=>f(void 0),"writeAlgorithm"),l.close!==void 0?me=a(()=>l.close(),"closeAlgorithm"):me=a(()=>f(void 0),"closeAlgorithm"),l.abort!==void 0?Ie=a(_e=>l.abort(_e),"abortAlgorithm"):Ie=a(()=>f(void 0),"abortAlgorithm"),LP(c,I,j,G,me,Ie,_,P)}a(sU,"SetUpWritableStreamDefaultControllerFromUnderlyingSink");function fl(c){c._writeAlgorithm=void 0,c._closeAlgorithm=void 0,c._abortAlgorithm=void 0,c._strategySizeAlgorithm=void 0}a(fl,"WritableStreamDefaultControllerClearAlgorithms");function cU(c){Sh(c,MP,0),ml(c)}a(cU,"WritableStreamDefaultControllerClose");function uU(c,l){try{return c._strategySizeAlgorithm(l)}catch(_){return ds(c,_),1}}a(uU,"WritableStreamDefaultControllerGetChunkSize");function jP(c){return c._strategyHWM-c._queueTotalSize}a(jP,"WritableStreamDefaultControllerGetDesiredSize");function lU(c,l,_){try{Sh(c,l,_)}catch(I){ds(c,I);return}let P=c._controlledWritableStream;if(!pn(P)&&P._state==="writable"){let I=Nh(c);$h(P,I)}ml(c)}a(lU,"WritableStreamDefaultControllerWrite");function ml(c){let l=c._controlledWritableStream;if(!c._started||l._inFlightWriteRequest!==void 0)return;if(l._state==="erroring"){kh(l);return}if(c._queue.length===0)return;let P=Pz(c);P===MP?dU(c):pU(c,P)}a(ml,"WritableStreamDefaultControllerAdvanceQueueIfNeeded");function ds(c,l){c._controlledWritableStream._state==="writable"&&FP(c,l)}a(ds,"WritableStreamDefaultControllerErrorIfNeeded");function dU(c){let l=c._controlledWritableStream;tU(l),Eh(c);let _=c._closeAlgorithm();fl(c),m(_,()=>(Xz(l),null),P=>(Qz(l,P),null))}a(dU,"WritableStreamDefaultControllerProcessClose");function pU(c,l){let _=c._controlledWritableStream;rU(_);let P=c._writeAlgorithm(l);m(P,()=>{Jz(_);let I=_._state;if(Eh(c),!pn(_)&&I==="writable"){let j=Nh(c);$h(_,j)}return ml(c),null},I=>(_._state==="writable"&&fl(c),Yz(_,I),null))}a(pU,"WritableStreamDefaultControllerProcessWrite");function Nh(c){return jP(c)<=0}a(Nh,"WritableStreamDefaultControllerGetBackpressure");function FP(c,l){let _=c._controlledWritableStream;fl(c),Oh(_,l)}a(FP,"WritableStreamDefaultControllerError");function hl(c){return new TypeError(`WritableStream.prototype.${c} can only be used on a WritableStream`)}a(hl,"streamBrandCheckException$2");function zh(c){return new TypeError(`WritableStreamDefaultController.prototype.${c} can only be used on a WritableStreamDefaultController`)}a(zh,"defaultControllerBrandCheckException$2");function Go(c){return new TypeError(`WritableStreamDefaultWriter.prototype.${c} can only be used on a WritableStreamDefaultWriter`)}a(Go,"defaultWriterBrandCheckException");function ps(c){return new TypeError("Cannot "+c+" a stream using a released writer")}a(ps,"defaultWriterLockException");function gl(c){c._closedPromise=d((l,_)=>{c._closedPromise_resolve=l,c._closedPromise_reject=_,c._closedPromiseState="pending"})}a(gl,"defaultWriterClosedPromiseInitialize");function BP(c,l){gl(c),Uh(c,l)}a(BP,"defaultWriterClosedPromiseInitializeAsRejected");function fU(c){gl(c),qP(c)}a(fU,"defaultWriterClosedPromiseInitializeAsResolved");function Uh(c,l){c._closedPromise_reject!==void 0&&(E(c._closedPromise),c._closedPromise_reject(l),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0,c._closedPromiseState="rejected")}a(Uh,"defaultWriterClosedPromiseReject");function mU(c,l){BP(c,l)}a(mU,"defaultWriterClosedPromiseResetToRejected");function qP(c){c._closedPromise_resolve!==void 0&&(c._closedPromise_resolve(void 0),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0,c._closedPromiseState="resolved")}a(qP,"defaultWriterClosedPromiseResolve");function yl(c){c._readyPromise=d((l,_)=>{c._readyPromise_resolve=l,c._readyPromise_reject=_}),c._readyPromiseState="pending"}a(yl,"defaultWriterReadyPromiseInitialize");function Mh(c,l){yl(c),GP(c,l)}a(Mh,"defaultWriterReadyPromiseInitializeAsRejected");function VP(c){yl(c),Lh(c)}a(VP,"defaultWriterReadyPromiseInitializeAsResolved");function GP(c,l){c._readyPromise_reject!==void 0&&(E(c._readyPromise),c._readyPromise_reject(l),c._readyPromise_resolve=void 0,c._readyPromise_reject=void 0,c._readyPromiseState="rejected")}a(GP,"defaultWriterReadyPromiseReject");function hU(c){yl(c)}a(hU,"defaultWriterReadyPromiseReset");function gU(c,l){Mh(c,l)}a(gU,"defaultWriterReadyPromiseResetToRejected");function Lh(c){c._readyPromise_resolve!==void 0&&(c._readyPromise_resolve(void 0),c._readyPromise_resolve=void 0,c._readyPromise_reject=void 0,c._readyPromiseState="fulfilled")}a(Lh,"defaultWriterReadyPromiseResolve");function yU(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof global<"u")return global}a(yU,"getGlobals");let jh=yU();function vU(c){if(!(typeof c=="function"||typeof c=="object")||c.name!=="DOMException")return!1;try{return new c,!0}catch{return!1}}a(vU,"isDOMExceptionConstructor");function _U(){let c=jh?.DOMException;return vU(c)?c:void 0}a(_U,"getFromGlobal");function bU(){let c=a(function(_,P){this.message=_||"",this.name=P||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)},"DOMException");return r(c,"DOMException"),c.prototype=Object.create(Error.prototype),Object.defineProperty(c.prototype,"constructor",{value:c,writable:!0,configurable:!0}),c}a(bU,"createPolyfill");let EU=_U()||bU();function HP(c,l,_,P,I,j){let G=F(c),me=OP(l);c._disturbed=!0;let Ie=!1,_e=f(void 0);return d((ke,Fe)=>{let lt;if(j!==void 0){if(lt=a(()=>{let Ee=j.reason!==void 0?j.reason:new EU("Aborted","AbortError"),Ve=[];P||Ve.push(()=>l._state==="writable"?dl(l,Ee):f(void 0)),I||Ve.push(()=>c._state==="readable"?Kr(c,Ee):f(void 0)),er(()=>Promise.all(Ve.map(pt=>pt())),!0,Ee)},"abortAlgorithm"),j.aborted){lt();return}j.addEventListener("abort",lt)}function Jr(){return d((Ee,Ve)=>{function pt(mr){mr?Ee():g(Fi(),pt,Ve)}a(pt,"next"),pt(!1)})}a(Jr,"pipeLoop");function Fi(){return Ie?f(!0):g(me._readyPromise,()=>d((Ee,Ve)=>{ve(G,{_chunkSteps:a(pt=>{_e=g(UP(me,pt),void 0,t),Ee(!1)},"_chunkSteps"),_closeSteps:a(()=>Ee(!0),"_closeSteps"),_errorSteps:Ve})}))}if(a(Fi,"pipeStep"),Nn(c,G._closedPromise,Ee=>(P?$r(!0,Ee):er(()=>dl(l,Ee),!0,Ee),null)),Nn(l,me._closedPromise,Ee=>(I?$r(!0,Ee):er(()=>Kr(c,Ee),!0,Ee),null)),Kt(c,G._closedPromise,()=>(_?$r():er(()=>oU(me)),null)),pn(l)||l._state==="closed"){let Ee=new TypeError("the destination writable stream closed before all data could be piped to it");I?$r(!0,Ee):er(()=>Kr(c,Ee),!0,Ee)}E(Jr());function lo(){let Ee=_e;return g(_e,()=>Ee!==_e?lo():void 0)}a(lo,"waitForWritesToFinish");function Nn(Ee,Ve,pt){Ee._state==="errored"?pt(Ee._storedError):y(Ve,pt)}a(Nn,"isOrBecomesErrored");function Kt(Ee,Ve,pt){Ee._state==="closed"?pt():p(Ve,pt)}a(Kt,"isOrBecomesClosed");function er(Ee,Ve,pt){if(Ie)return;Ie=!0,l._state==="writable"&&!pn(l)?p(lo(),mr):mr();function mr(){return m(Ee(),()=>zn(Ve,pt),Bi=>zn(!0,Bi)),null}a(mr,"doTheRest")}a(er,"shutdownWithAction");function $r(Ee,Ve){Ie||(Ie=!0,l._state==="writable"&&!pn(l)?p(lo(),()=>zn(Ee,Ve)):zn(Ee,Ve))}a($r,"shutdown");function zn(Ee,Ve){return zP(me),W(G),j!==void 0&&j.removeEventListener("abort",lt),Ee?Fe(Ve):ke(void 0),null}a(zn,"finalize")})}a(HP,"ReadableStreamPipeTo");class Dn{static{a(this,"ReadableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!vl(this))throw bl("desiredSize");return Fh(this)}close(){if(!vl(this))throw bl("close");if(!Li(this))throw new TypeError("The stream is not in a state that permits close");Ho(this)}enqueue(l=void 0){if(!vl(this))throw bl("enqueue");if(!Li(this))throw new TypeError("The stream is not in a state that permits enqueue");return Mi(this,l)}error(l=void 0){if(!vl(this))throw bl("error");Wr(this,l)}[se](l){oo(this);let _=this._cancelAlgorithm(l);return _l(this),_}[Q](l){let _=this._controlledReadableStream;if(this._queue.length>0){let P=Eh(this);this._closeRequested&&this._queue.length===0?(_l(this),hs(_)):fs(this),l._chunkSteps(P)}else R(_,l),fs(this)}[Le](){}}Object.defineProperties(Dn.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),r(Dn.prototype.close,"close"),r(Dn.prototype.enqueue,"enqueue"),r(Dn.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Dn.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function vl(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableStream")?!1:c instanceof Dn}a(vl,"IsReadableStreamDefaultController");function fs(c){if(!ZP(c))return;if(c._pulling){c._pullAgain=!0;return}c._pulling=!0;let _=c._pullAlgorithm();m(_,()=>(c._pulling=!1,c._pullAgain&&(c._pullAgain=!1,fs(c)),null),P=>(Wr(c,P),null))}a(fs,"ReadableStreamDefaultControllerCallPullIfNeeded");function ZP(c){let l=c._controlledReadableStream;return!Li(c)||!c._started?!1:!!(co(l)&&L(l)>0||Fh(c)>0)}a(ZP,"ReadableStreamDefaultControllerShouldCallPull");function _l(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0,c._strategySizeAlgorithm=void 0}a(_l,"ReadableStreamDefaultControllerClearAlgorithms");function Ho(c){if(!Li(c))return;let l=c._controlledReadableStream;c._closeRequested=!0,c._queue.length===0&&(_l(c),hs(l))}a(Ho,"ReadableStreamDefaultControllerClose");function Mi(c,l){if(!Li(c))return;let _=c._controlledReadableStream;if(co(_)&&L(_)>0)$(_,l,!1);else{let P;try{P=c._strategySizeAlgorithm(l)}catch(I){throw Wr(c,I),I}try{Sh(c,l,P)}catch(I){throw Wr(c,I),I}}fs(c)}a(Mi,"ReadableStreamDefaultControllerEnqueue");function Wr(c,l){let _=c._controlledReadableStream;_._state==="readable"&&(oo(c),_l(c),YP(_,l))}a(Wr,"ReadableStreamDefaultControllerError");function Fh(c){let l=c._controlledReadableStream._state;return l==="errored"?null:l==="closed"?0:c._strategyHWM-c._queueTotalSize}a(Fh,"ReadableStreamDefaultControllerGetDesiredSize");function SU(c){return!ZP(c)}a(SU,"ReadableStreamDefaultControllerHasBackpressure");function Li(c){let l=c._controlledReadableStream._state;return!c._closeRequested&&l==="readable"}a(Li,"ReadableStreamDefaultControllerCanCloseOrEnqueue");function WP(c,l,_,P,I,j,G){l._controlledReadableStream=c,l._queue=void 0,l._queueTotalSize=void 0,oo(l),l._started=!1,l._closeRequested=!1,l._pullAgain=!1,l._pulling=!1,l._strategySizeAlgorithm=G,l._strategyHWM=j,l._pullAlgorithm=P,l._cancelAlgorithm=I,c._readableStreamController=l;let me=_();m(f(me),()=>(l._started=!0,fs(l),null),Ie=>(Wr(l,Ie),null))}a(WP,"SetUpReadableStreamDefaultController");function TU(c,l,_,P){let I=Object.create(Dn.prototype),j,G,me;l.start!==void 0?j=a(()=>l.start(I),"startAlgorithm"):j=a(()=>{},"startAlgorithm"),l.pull!==void 0?G=a(()=>l.pull(I),"pullAlgorithm"):G=a(()=>f(void 0),"pullAlgorithm"),l.cancel!==void 0?me=a(Ie=>l.cancel(Ie),"cancelAlgorithm"):me=a(()=>f(void 0),"cancelAlgorithm"),WP(c,I,j,G,me,_,P)}a(TU,"SetUpReadableStreamDefaultControllerFromUnderlyingSource");function bl(c){return new TypeError(`ReadableStreamDefaultController.prototype.${c} can only be used on a ReadableStreamDefaultController`)}a(bl,"defaultControllerBrandCheckException$1");function PU(c,l){return Fo(c._readableStreamController)?xU(c):wU(c)}a(PU,"ReadableStreamTee");function wU(c,l){let _=F(c),P=!1,I=!1,j=!1,G=!1,me,Ie,_e,ke,Fe,lt=d(Kt=>{Fe=Kt});function Jr(){return P?(I=!0,f(void 0)):(P=!0,ve(_,{_chunkSteps:a(er=>{b(()=>{I=!1;let $r=er,zn=er;j||Mi(_e._readableStreamController,$r),G||Mi(ke._readableStreamController,zn),P=!1,I&&Jr()})},"_chunkSteps"),_closeSteps:a(()=>{P=!1,j||Ho(_e._readableStreamController),G||Ho(ke._readableStreamController),(!j||!G)&&Fe(void 0)},"_closeSteps"),_errorSteps:a(()=>{P=!1},"_errorSteps")}),f(void 0))}a(Jr,"pullAlgorithm");function Fi(Kt){if(j=!0,me=Kt,G){let er=it([me,Ie]),$r=Kr(c,er);Fe($r)}return lt}a(Fi,"cancel1Algorithm");function lo(Kt){if(G=!0,Ie=Kt,j){let er=it([me,Ie]),$r=Kr(c,er);Fe($r)}return lt}a(lo,"cancel2Algorithm");function Nn(){}return a(Nn,"startAlgorithm"),_e=ms(Nn,Jr,Fi),ke=ms(Nn,Jr,lo),y(_._closedPromise,Kt=>(Wr(_e._readableStreamController,Kt),Wr(ke._readableStreamController,Kt),(!j||!G)&&Fe(void 0),null)),[_e,ke]}a(wU,"ReadableStreamDefaultTee");function xU(c){let l=F(c),_=!1,P=!1,I=!1,j=!1,G=!1,me,Ie,_e,ke,Fe,lt=d(Ee=>{Fe=Ee});function Jr(Ee){y(Ee._closedPromise,Ve=>(Ee!==l||(kr(_e._readableStreamController,Ve),kr(ke._readableStreamController,Ve),(!j||!G)&&Fe(void 0)),null))}a(Jr,"forwardReaderError");function Fi(){qo(l)&&(W(l),l=F(c),Jr(l)),ve(l,{_chunkSteps:a(Ve=>{b(()=>{P=!1,I=!1;let pt=Ve,mr=Ve;if(!j&&!G)try{mr=pP(Ve)}catch(Bi){kr(_e._readableStreamController,Bi),kr(ke._readableStreamController,Bi),Fe(Kr(c,Bi));return}j||il(_e._readableStreamController,pt),G||il(ke._readableStreamController,mr),_=!1,P?Nn():I&&Kt()})},"_chunkSteps"),_closeSteps:a(()=>{_=!1,j||cs(_e._readableStreamController),G||cs(ke._readableStreamController),_e._readableStreamController._pendingPullIntos.length>0&&al(_e._readableStreamController,0),ke._readableStreamController._pendingPullIntos.length>0&&al(ke._readableStreamController,0),(!j||!G)&&Fe(void 0)},"_closeSteps"),_errorSteps:a(()=>{_=!1},"_errorSteps")})}a(Fi,"pullWithDefaultReader");function lo(Ee,Ve){ge(l)&&(W(l),l=wP(c),Jr(l));let pt=Ve?ke:_e,mr=Ve?_e:ke;IP(l,Ee,1,{_chunkSteps:a(qi=>{b(()=>{P=!1,I=!1;let Vi=Ve?G:j;if(Ve?j:G)Vi||sl(pt._readableStreamController,qi);else{let lw;try{lw=pP(qi)}catch(Hh){kr(pt._readableStreamController,Hh),kr(mr._readableStreamController,Hh),Fe(Kr(c,Hh));return}Vi||sl(pt._readableStreamController,qi),il(mr._readableStreamController,lw)}_=!1,P?Nn():I&&Kt()})},"_chunkSteps"),_closeSteps:a(qi=>{_=!1;let Vi=Ve?G:j,Il=Ve?j:G;Vi||cs(pt._readableStreamController),Il||cs(mr._readableStreamController),qi!==void 0&&(Vi||sl(pt._readableStreamController,qi),!Il&&mr._readableStreamController._pendingPullIntos.length>0&&al(mr._readableStreamController,0)),(!Vi||!Il)&&Fe(void 0)},"_closeSteps"),_errorSteps:a(()=>{_=!1},"_errorSteps")})}a(lo,"pullWithBYOBReader");function Nn(){if(_)return P=!0,f(void 0);_=!0;let Ee=Ah(_e._readableStreamController);return Ee===null?Fi():lo(Ee._view,!1),f(void 0)}a(Nn,"pull1Algorithm");function Kt(){if(_)return I=!0,f(void 0);_=!0;let Ee=Ah(ke._readableStreamController);return Ee===null?Fi():lo(Ee._view,!0),f(void 0)}a(Kt,"pull2Algorithm");function er(Ee){if(j=!0,me=Ee,G){let Ve=it([me,Ie]),pt=Kr(c,Ve);Fe(pt)}return lt}a(er,"cancel1Algorithm");function $r(Ee){if(G=!0,Ie=Ee,j){let Ve=it([me,Ie]),pt=Kr(c,Ve);Fe(pt)}return lt}a($r,"cancel2Algorithm");function zn(){}return a(zn,"startAlgorithm"),_e=JP(zn,Nn,er),ke=JP(zn,Kt,$r),Jr(l),[_e,ke]}a(xU,"ReadableByteStreamTee");function AU(c){return n(c)&&typeof c.getReader<"u"}a(AU,"isReadableStreamLike");function IU(c){return AU(c)?CU(c.getReader()):RU(c)}a(IU,"ReadableStreamFrom");function RU(c){let l,_=dP(c,"async"),P=t;function I(){let G;try{G=bz(_)}catch(Ie){return h(Ie)}let me=f(G);return v(me,Ie=>{if(!n(Ie))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(Ez(Ie))Ho(l._readableStreamController);else{let ke=Sz(Ie);Mi(l._readableStreamController,ke)}})}a(I,"pullAlgorithm");function j(G){let me=_.iterator,Ie;try{Ie=rl(me,"return")}catch(Fe){return h(Fe)}if(Ie===void 0)return f(void 0);let _e;try{_e=k(Ie,me,[G])}catch(Fe){return h(Fe)}let ke=f(_e);return v(ke,Fe=>{if(!n(Fe))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})}return a(j,"cancelAlgorithm"),l=ms(P,I,j,0),l}a(RU,"ReadableStreamFromIterable");function CU(c){let l,_=t;function P(){let j;try{j=c.read()}catch(G){return h(G)}return v(j,G=>{if(!n(G))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(G.done)Ho(l._readableStreamController);else{let me=G.value;Mi(l._readableStreamController,me)}})}a(P,"pullAlgorithm");function I(j){try{return f(c.cancel(j))}catch(G){return h(G)}}return a(I,"cancelAlgorithm"),l=ms(_,P,I,0),l}a(CU,"ReadableStreamFromDefaultReader");function OU(c,l){bt(c,l);let _=c,P=_?.autoAllocateChunkSize,I=_?.cancel,j=_?.pull,G=_?.start,me=_?.type;return{autoAllocateChunkSize:P===void 0?void 0:C(P,`${l} has member 'autoAllocateChunkSize' that`),cancel:I===void 0?void 0:kU(I,_,`${l} has member 'cancel' that`),pull:j===void 0?void 0:$U(j,_,`${l} has member 'pull' that`),start:G===void 0?void 0:DU(G,_,`${l} has member 'start' that`),type:me===void 0?void 0:NU(me,`${l} has member 'type' that`)}}a(OU,"convertUnderlyingDefaultOrByteSource");function kU(c,l,_){return St(c,_),P=>N(c,l,[P])}a(kU,"convertUnderlyingSourceCancelCallback");function $U(c,l,_){return St(c,_),P=>N(c,l,[P])}a($U,"convertUnderlyingSourcePullCallback");function DU(c,l,_){return St(c,_),P=>k(c,l,[P])}a(DU,"convertUnderlyingSourceStartCallback");function NU(c,l){if(c=`${c}`,c!=="bytes")throw new TypeError(`${l} '${c}' is not a valid enumeration value for ReadableStreamType`);return c}a(NU,"convertReadableStreamType");function zU(c,l){return bt(c,l),{preventCancel:!!c?.preventCancel}}a(zU,"convertIteratorOptions");function KP(c,l){bt(c,l);let _=c?.preventAbort,P=c?.preventCancel,I=c?.preventClose,j=c?.signal;return j!==void 0&&UU(j,`${l} has member 'signal' that`),{preventAbort:!!_,preventCancel:!!P,preventClose:!!I,signal:j}}a(KP,"convertPipeOptions");function UU(c,l){if(!Gz(c))throw new TypeError(`${l} is not an AbortSignal.`)}a(UU,"assertAbortSignal");function MU(c,l){bt(c,l);let _=c?.readable;T(_,"readable","ReadableWritablePair"),D(_,`${l} has member 'readable' that`);let P=c?.writable;return T(P,"writable","ReadableWritablePair"),CP(P,`${l} has member 'writable' that`),{readable:_,writable:P}}a(MU,"convertReadableWritablePair");class Vt{static{a(this,"ReadableStream")}constructor(l={},_={}){l===void 0?l=null:Xe(l,"First parameter");let P=ll(_,"Second parameter"),I=OU(l,"First parameter");if(Bh(this),I.type==="bytes"){if(P.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let j=ls(P,0);kz(this,I,j)}else{let j=ul(P),G=ls(P,1);TU(this,I,G,j)}}get locked(){if(!so(this))throw Zo("locked");return co(this)}cancel(l=void 0){return so(this)?co(this)?h(new TypeError("Cannot cancel a stream that already has a reader")):Kr(this,l):h(Zo("cancel"))}getReader(l=void 0){if(!so(this))throw Zo("getReader");return Dz(l,"First parameter").mode===void 0?F(this):wP(this)}pipeThrough(l,_={}){if(!so(this))throw Zo("pipeThrough");ot(l,1,"pipeThrough");let P=MU(l,"First parameter"),I=KP(_,"Second parameter");if(co(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(zi(P.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let j=HP(this,P.writable,I.preventClose,I.preventAbort,I.preventCancel,I.signal);return E(j),P.readable}pipeTo(l,_={}){if(!so(this))return h(Zo("pipeTo"));if(l===void 0)return h("Parameter 1 is required in 'pipeTo'.");if(!Ni(l))return h(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let P;try{P=KP(_,"Second parameter")}catch(I){return h(I)}return co(this)?h(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):zi(l)?h(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):HP(this,l,P.preventClose,P.preventAbort,P.preventCancel,P.signal)}tee(){if(!so(this))throw Zo("tee");let l=PU(this);return it(l)}values(l=void 0){if(!so(this))throw Zo("values");let _=zU(l,"First parameter");return Oi(this,_.preventCancel)}[bh](l){return this.values(l)}static from(l){return IU(l)}}Object.defineProperties(Vt,{from:{enumerable:!0}}),Object.defineProperties(Vt.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),r(Vt.from,"from"),r(Vt.prototype.cancel,"cancel"),r(Vt.prototype.getReader,"getReader"),r(Vt.prototype.pipeThrough,"pipeThrough"),r(Vt.prototype.pipeTo,"pipeTo"),r(Vt.prototype.tee,"tee"),r(Vt.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Vt.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(Vt.prototype,bh,{value:Vt.prototype.values,writable:!0,configurable:!0});function ms(c,l,_,P=1,I=()=>1){let j=Object.create(Vt.prototype);Bh(j);let G=Object.create(Dn.prototype);return WP(j,G,c,l,_,P,I),j}a(ms,"CreateReadableStream");function JP(c,l,_){let P=Object.create(Vt.prototype);Bh(P);let I=Object.create(kn.prototype);return PP(P,I,c,l,_,0,void 0),P}a(JP,"CreateReadableByteStream");function Bh(c){c._state="readable",c._reader=void 0,c._storedError=void 0,c._disturbed=!1}a(Bh,"InitializeReadableStream");function so(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readableStreamController")?!1:c instanceof Vt}a(so,"IsReadableStream");function co(c){return c._reader!==void 0}a(co,"IsReadableStreamLocked");function Kr(c,l){if(c._disturbed=!0,c._state==="closed")return f(void 0);if(c._state==="errored")return h(c._storedError);hs(c);let _=c._reader;if(_!==void 0&&qo(_)){let I=_._readIntoRequests;_._readIntoRequests=new H,I.forEach(j=>{j._closeSteps(void 0)})}let P=c._readableStreamController[se](l);return v(P,t)}a(Kr,"ReadableStreamCancel");function hs(c){c._state="closed";let l=c._reader;if(l!==void 0&&(rt(l),ge(l))){let _=l._readRequests;l._readRequests=new H,_.forEach(P=>{P._closeSteps()})}}a(hs,"ReadableStreamClose");function YP(c,l){c._state="errored",c._storedError=l;let _=c._reader;_!==void 0&&(Ne(_,l),ge(_)?mt(_,l):RP(_,l))}a(YP,"ReadableStreamError");function Zo(c){return new TypeError(`ReadableStream.prototype.${c} can only be used on a ReadableStream`)}a(Zo,"streamBrandCheckException$1");function XP(c,l){bt(c,l);let _=c?.highWaterMark;return T(_,"highWaterMark","QueuingStrategyInit"),{highWaterMark:w(_)}}a(XP,"convertQueuingStrategyInit");let QP=a(c=>c.byteLength,"byteLengthSizeFunction");r(QP,"size");class El{static{a(this,"ByteLengthQueuingStrategy")}constructor(l){ot(l,1,"ByteLengthQueuingStrategy"),l=XP(l,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=l.highWaterMark}get highWaterMark(){if(!tw(this))throw ew("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!tw(this))throw ew("size");return QP}}Object.defineProperties(El.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(El.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function ew(c){return new TypeError(`ByteLengthQueuingStrategy.prototype.${c} can only be used on a ByteLengthQueuingStrategy`)}a(ew,"byteLengthBrandCheckException");function tw(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_byteLengthQueuingStrategyHighWaterMark")?!1:c instanceof El}a(tw,"IsByteLengthQueuingStrategy");let rw=a(()=>1,"countSizeFunction");r(rw,"size");class Sl{static{a(this,"CountQueuingStrategy")}constructor(l){ot(l,1,"CountQueuingStrategy"),l=XP(l,"First parameter"),this._countQueuingStrategyHighWaterMark=l.highWaterMark}get highWaterMark(){if(!ow(this))throw nw("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!ow(this))throw nw("size");return rw}}Object.defineProperties(Sl.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Sl.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function nw(c){return new TypeError(`CountQueuingStrategy.prototype.${c} can only be used on a CountQueuingStrategy`)}a(nw,"countBrandCheckException");function ow(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_countQueuingStrategyHighWaterMark")?!1:c instanceof Sl}a(ow,"IsCountQueuingStrategy");function LU(c,l){bt(c,l);let _=c?.cancel,P=c?.flush,I=c?.readableType,j=c?.start,G=c?.transform,me=c?.writableType;return{cancel:_===void 0?void 0:qU(_,c,`${l} has member 'cancel' that`),flush:P===void 0?void 0:jU(P,c,`${l} has member 'flush' that`),readableType:I,start:j===void 0?void 0:FU(j,c,`${l} has member 'start' that`),transform:G===void 0?void 0:BU(G,c,`${l} has member 'transform' that`),writableType:me}}a(LU,"convertTransformer");function jU(c,l,_){return St(c,_),P=>N(c,l,[P])}a(jU,"convertTransformerFlushCallback");function FU(c,l,_){return St(c,_),P=>k(c,l,[P])}a(FU,"convertTransformerStartCallback");function BU(c,l,_){return St(c,_),(P,I)=>N(c,l,[P,I])}a(BU,"convertTransformerTransformCallback");function qU(c,l,_){return St(c,_),P=>N(c,l,[P])}a(qU,"convertTransformerCancelCallback");class Tl{static{a(this,"TransformStream")}constructor(l={},_={},P={}){l===void 0&&(l=null);let I=ll(_,"Second parameter"),j=ll(P,"Third parameter"),G=LU(l,"First parameter");if(G.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(G.writableType!==void 0)throw new RangeError("Invalid writableType specified");let me=ls(j,0),Ie=ul(j),_e=ls(I,1),ke=ul(I),Fe,lt=d(Jr=>{Fe=Jr});VU(this,lt,_e,ke,me,Ie),HU(this,G),G.start!==void 0?Fe(G.start(this._transformStreamController)):Fe(void 0)}get readable(){if(!iw(this))throw uw("readable");return this._readable}get writable(){if(!iw(this))throw uw("writable");return this._writable}}Object.defineProperties(Tl.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Tl.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function VU(c,l,_,P,I,j){function G(){return l}a(G,"startAlgorithm");function me(lt){return KU(c,lt)}a(me,"writeAlgorithm");function Ie(lt){return JU(c,lt)}a(Ie,"abortAlgorithm");function _e(){return YU(c)}a(_e,"closeAlgorithm"),c._writable=Wz(G,me,_e,Ie,_,P);function ke(){return XU(c)}a(ke,"pullAlgorithm");function Fe(lt){return QU(c,lt)}a(Fe,"cancelAlgorithm"),c._readable=ms(G,ke,Fe,I,j),c._backpressure=void 0,c._backpressureChangePromise=void 0,c._backpressureChangePromise_resolve=void 0,Pl(c,!0),c._transformStreamController=void 0}a(VU,"InitializeTransformStream");function iw(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_transformStreamController")?!1:c instanceof Tl}a(iw,"IsTransformStream");function aw(c,l){Wr(c._readable._readableStreamController,l),qh(c,l)}a(aw,"TransformStreamError");function qh(c,l){xl(c._transformStreamController),ds(c._writable._writableStreamController,l),Vh(c)}a(qh,"TransformStreamErrorWritableAndUnblockWrite");function Vh(c){c._backpressure&&Pl(c,!1)}a(Vh,"TransformStreamUnblockWrite");function Pl(c,l){c._backpressureChangePromise!==void 0&&c._backpressureChangePromise_resolve(),c._backpressureChangePromise=d(_=>{c._backpressureChangePromise_resolve=_}),c._backpressure=l}a(Pl,"TransformStreamSetBackpressure");class uo{static{a(this,"TransformStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!wl(this))throw Al("desiredSize");let l=this._controlledTransformStream._readable._readableStreamController;return Fh(l)}enqueue(l=void 0){if(!wl(this))throw Al("enqueue");sw(this,l)}error(l=void 0){if(!wl(this))throw Al("error");ZU(this,l)}terminate(){if(!wl(this))throw Al("terminate");WU(this)}}Object.defineProperties(uo.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),r(uo.prototype.enqueue,"enqueue"),r(uo.prototype.error,"error"),r(uo.prototype.terminate,"terminate"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(uo.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function wl(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledTransformStream")?!1:c instanceof uo}a(wl,"IsTransformStreamDefaultController");function GU(c,l,_,P,I){l._controlledTransformStream=c,c._transformStreamController=l,l._transformAlgorithm=_,l._flushAlgorithm=P,l._cancelAlgorithm=I,l._finishPromise=void 0,l._finishPromise_resolve=void 0,l._finishPromise_reject=void 0}a(GU,"SetUpTransformStreamDefaultController");function HU(c,l){let _=Object.create(uo.prototype),P,I,j;l.transform!==void 0?P=a(G=>l.transform(G,_),"transformAlgorithm"):P=a(G=>{try{return sw(_,G),f(void 0)}catch(me){return h(me)}},"transformAlgorithm"),l.flush!==void 0?I=a(()=>l.flush(_),"flushAlgorithm"):I=a(()=>f(void 0),"flushAlgorithm"),l.cancel!==void 0?j=a(G=>l.cancel(G),"cancelAlgorithm"):j=a(()=>f(void 0),"cancelAlgorithm"),GU(c,_,P,I,j)}a(HU,"SetUpTransformStreamDefaultControllerFromTransformer");function xl(c){c._transformAlgorithm=void 0,c._flushAlgorithm=void 0,c._cancelAlgorithm=void 0}a(xl,"TransformStreamDefaultControllerClearAlgorithms");function sw(c,l){let _=c._controlledTransformStream,P=_._readable._readableStreamController;if(!Li(P))throw new TypeError("Readable side is not in a state that permits enqueue");try{Mi(P,l)}catch(j){throw qh(_,j),_._readable._storedError}SU(P)!==_._backpressure&&Pl(_,!0)}a(sw,"TransformStreamDefaultControllerEnqueue");function ZU(c,l){aw(c._controlledTransformStream,l)}a(ZU,"TransformStreamDefaultControllerError");function cw(c,l){let _=c._transformAlgorithm(l);return v(_,void 0,P=>{throw aw(c._controlledTransformStream,P),P})}a(cw,"TransformStreamDefaultControllerPerformTransform");function WU(c){let l=c._controlledTransformStream,_=l._readable._readableStreamController;Ho(_);let P=new TypeError("TransformStream terminated");qh(l,P)}a(WU,"TransformStreamDefaultControllerTerminate");function KU(c,l){let _=c._transformStreamController;if(c._backpressure){let P=c._backpressureChangePromise;return v(P,()=>{let I=c._writable;if(I._state==="erroring")throw I._storedError;return cw(_,l)})}return cw(_,l)}a(KU,"TransformStreamDefaultSinkWriteAlgorithm");function JU(c,l){let _=c._transformStreamController;if(_._finishPromise!==void 0)return _._finishPromise;let P=c._readable;_._finishPromise=d((j,G)=>{_._finishPromise_resolve=j,_._finishPromise_reject=G});let I=_._cancelAlgorithm(l);return xl(_),m(I,()=>(P._state==="errored"?ji(_,P._storedError):(Wr(P._readableStreamController,l),Gh(_)),null),j=>(Wr(P._readableStreamController,j),ji(_,j),null)),_._finishPromise}a(JU,"TransformStreamDefaultSinkAbortAlgorithm");function YU(c){let l=c._transformStreamController;if(l._finishPromise!==void 0)return l._finishPromise;let _=c._readable;l._finishPromise=d((I,j)=>{l._finishPromise_resolve=I,l._finishPromise_reject=j});let P=l._flushAlgorithm();return xl(l),m(P,()=>(_._state==="errored"?ji(l,_._storedError):(Ho(_._readableStreamController),Gh(l)),null),I=>(Wr(_._readableStreamController,I),ji(l,I),null)),l._finishPromise}a(YU,"TransformStreamDefaultSinkCloseAlgorithm");function XU(c){return Pl(c,!1),c._backpressureChangePromise}a(XU,"TransformStreamDefaultSourcePullAlgorithm");function QU(c,l){let _=c._transformStreamController;if(_._finishPromise!==void 0)return _._finishPromise;let P=c._writable;_._finishPromise=d((j,G)=>{_._finishPromise_resolve=j,_._finishPromise_reject=G});let I=_._cancelAlgorithm(l);return xl(_),m(I,()=>(P._state==="errored"?ji(_,P._storedError):(ds(P._writableStreamController,l),Vh(c),Gh(_)),null),j=>(ds(P._writableStreamController,j),Vh(c),ji(_,j),null)),_._finishPromise}a(QU,"TransformStreamDefaultSourceCancelAlgorithm");function Al(c){return new TypeError(`TransformStreamDefaultController.prototype.${c} can only be used on a TransformStreamDefaultController`)}a(Al,"defaultControllerBrandCheckException");function Gh(c){c._finishPromise_resolve!==void 0&&(c._finishPromise_resolve(),c._finishPromise_resolve=void 0,c._finishPromise_reject=void 0)}a(Gh,"defaultControllerFinishPromiseResolve");function ji(c,l){c._finishPromise_reject!==void 0&&(E(c._finishPromise),c._finishPromise_reject(l),c._finishPromise_resolve=void 0,c._finishPromise_reject=void 0)}a(ji,"defaultControllerFinishPromiseReject");function uw(c){return new TypeError(`TransformStream.prototype.${c} can only be used on a TransformStream`)}a(uw,"streamBrandCheckException"),e.ByteLengthQueuingStrategy=El,e.CountQueuingStrategy=Sl,e.ReadableByteStreamController=kn,e.ReadableStream=Vt,e.ReadableStreamBYOBReader=io,e.ReadableStreamBYOBRequest=jo,e.ReadableStreamDefaultController=Dn,e.ReadableStreamDefaultReader=Y,e.TransformStream=Tl,e.TransformStreamDefaultController=uo,e.WritableStream=ao,e.WritableStreamDefaultController=Ui,e.WritableStreamDefaultWriter=$n}))});var V0=z(()=>{if(!globalThis.ReadableStream)try{let e=require("node:process"),{emitWarning:t}=e;try{e.emitWarning=()=>{},Object.assign(globalThis,require("node:stream/web")),e.emitWarning=t}catch(n){throw e.emitWarning=t,n}}catch{Object.assign(globalThis,q0())}try{let{Blob:e}=require("buffer");e&&!e.prototype.stream&&(e.prototype.stream=a(function(n){let o=0,r=this;return new ReadableStream({type:"bytes",async pull(i){let u=await r.slice(o,Math.min(r.size,o+65536)).arrayBuffer();o+=u.byteLength,i.enqueue(new Uint8Array(u)),o===r.size&&i.close()}})},"name"))}catch{}});async function*Jb(e,t=!0){for(let n of e)if("stream"in n)yield*n.stream();else if(ArrayBuffer.isView(n))if(t){let o=n.byteOffset,r=n.byteOffset+n.byteLength;for(;o!==r;){let i=Math.min(r-o,G0),s=n.buffer.slice(o,o+i);o+=s.byteLength,yield new Uint8Array(s)}}else yield n;else{let o=0,r=n;for(;o!==r.size;){let s=await r.slice(o,Math.min(r.size,o+G0)).arrayBuffer();o+=s.byteLength,yield new Uint8Array(s)}}}var qoe,G0,H0,F4,rn,hu=$t(()=>{qoe=Ke(V0(),1);G0=65536;a(Jb,"toIterator");H0=class Yb{static{a(this,"Blob")}#e=[];#t="";#r=0;#n="transparent";constructor(t=[],n={}){if(typeof t!="object"||t===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof t[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof n!="object"&&typeof n!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");n===null&&(n={});let o=new TextEncoder;for(let i of t){let s;ArrayBuffer.isView(i)?s=new Uint8Array(i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength)):i instanceof ArrayBuffer?s=new Uint8Array(i.slice(0)):i instanceof Yb?s=i:s=o.encode(`${i}`),this.#r+=ArrayBuffer.isView(s)?s.byteLength:s.size,this.#e.push(s)}this.#n=`${n.endings===void 0?"transparent":n.endings}`;let r=n.type===void 0?"":String(n.type);this.#t=/^[\x20-\x7E]*$/.test(r)?r:""}get size(){return this.#r}get type(){return this.#t}async text(){let t=new TextDecoder,n="";for await(let o of Jb(this.#e,!1))n+=t.decode(o,{stream:!0});return n+=t.decode(),n}async arrayBuffer(){let t=new Uint8Array(this.size),n=0;for await(let o of Jb(this.#e,!1))t.set(o,n),n+=o.length;return t.buffer}stream(){let t=Jb(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(n){let o=await t.next();o.done?n.close():n.enqueue(o.value)},async cancel(){await t.return()}})}slice(t=0,n=this.size,o=""){let{size:r}=this,i=t<0?Math.max(r+t,0):Math.min(t,r),s=n<0?Math.max(r+n,0):Math.min(n,r),u=Math.max(s-i,0),d=this.#e,f=[],h=0;for(let m of d){if(h>=u)break;let p=ArrayBuffer.isView(m)?m.byteLength:m.size;if(i&&p<=i)i-=p,s-=p;else{let y;ArrayBuffer.isView(m)?(y=m.subarray(i,Math.min(p,s)),h+=y.byteLength):(y=m.slice(i,Math.min(p,s)),h+=y.size),s-=p,f.push(y),i=0}}let g=new Yb([],{type:String(o).toLowerCase()});return g.#r=u,g.#e=f,g}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](t){return t&&typeof t=="object"&&typeof t.constructor=="function"&&(typeof t.stream=="function"||typeof t.arrayBuffer=="function")&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}};Object.defineProperties(H0.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});F4=H0,rn=F4});var B4,q4,Oo,Xb=$t(()=>{hu();B4=class extends rn{static{a(this,"File")}#e=0;#t="";constructor(t,n,o={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(t,o),o===null&&(o={});let r=o.lastModified===void 0?Date.now():Number(o.lastModified);Number.isNaN(r)||(this.#e=r),this.#t=String(n)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](t){return!!t&&t instanceof rn&&/^(File)$/.test(t[Symbol.toStringTag])}},q4=B4,Oo=q4});function K0(e,t=rn){var n=`${Z0()}${Z0()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),o=[],r=`--${n}\r
|
|
15
|
+
Content-Disposition: form-data; name="`;return e.forEach((i,s)=>typeof i=="string"?o.push(r+Qb(s)+`"\r
|
|
16
16
|
\r
|
|
17
|
-
${
|
|
17
|
+
${i.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
|
|
18
18
|
`)}\r
|
|
19
|
-
`):
|
|
20
|
-
Content-Type: ${
|
|
19
|
+
`):o.push(r+Qb(s)+`"; filename="${Qb(i.name,1)}"\r
|
|
20
|
+
Content-Type: ${i.type||"application/octet-stream"}\r
|
|
21
21
|
\r
|
|
22
|
-
`,
|
|
23
|
-
`)),
|
|
24
|
-
`)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"e"),
|
|
25
|
-
--`+e;let r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n),this.boundaryChars[r[n]]=!0;this.boundary=r,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=ot.START_BOUNDARY}write(e){let r=0,n=e.length,i=this.index,{lookbehind:s,boundary:c,boundaryChars:d,index:p,state:m,flags:y}=this,h=this.boundary.length,f=h-1,l=e.length,g,v,E=o(J=>{this[J+"Mark"]=r},"mark"),b=o(J=>{delete this[J+"Mark"]},"clear"),C=o((J,Z,H,K)=>{(Z===void 0||Z!==H)&&this[J](K&&K.subarray(Z,H))},"callback"),U=o((J,Z)=>{let H=J+"Mark";H in this&&(Z?(C(J,this[H],r,e),delete this[H]):(C(J,this[H],e.length,e),this[H]=0))},"dataCallback");for(r=0;r<n;r++)switch(g=e[r],m){case ot.START_BOUNDARY:if(p===c.length-2){if(g===ya)y|=Zn.LAST_BOUNDARY;else if(g!==Au)return;p++;break}else if(p-1===c.length-2){if(y&Zn.LAST_BOUNDARY&&g===ya)m=ot.END,y=0;else if(!(y&Zn.LAST_BOUNDARY)&&g===xu)p=0,C("onPartBegin"),m=ot.HEADER_FIELD_START;else return;break}g!==c[p+2]&&(p=-2),g===c[p+2]&&p++;break;case ot.HEADER_FIELD_START:m=ot.HEADER_FIELD,E("onHeaderField"),p=0;case ot.HEADER_FIELD:if(g===Au){b("onHeaderField"),m=ot.HEADERS_ALMOST_DONE;break}if(p++,g===ya)break;if(g===R$){if(p===1)return;U("onHeaderField",!0),m=ot.HEADER_VALUE_START;break}if(v=k$(g),v<C$||v>O$)return;break;case ot.HEADER_VALUE_START:if(g===I$)break;E("onHeaderValue"),m=ot.HEADER_VALUE;case ot.HEADER_VALUE:g===Au&&(U("onHeaderValue",!0),C("onHeaderEnd"),m=ot.HEADER_VALUE_ALMOST_DONE);break;case ot.HEADER_VALUE_ALMOST_DONE:if(g!==xu)return;m=ot.HEADER_FIELD_START;break;case ot.HEADERS_ALMOST_DONE:if(g!==xu)return;C("onHeadersEnd"),m=ot.PART_DATA_START;break;case ot.PART_DATA_START:m=ot.PART_DATA,E("onPartData");case ot.PART_DATA:if(i=p,p===0){for(r+=f;r<l&&!(e[r]in d);)r+=h;r-=f,g=e[r]}if(p<c.length)c[p]===g?(p===0&&U("onPartData",!0),p++):p=0;else if(p===c.length)p++,g===Au?y|=Zn.PART_BOUNDARY:g===ya?y|=Zn.LAST_BOUNDARY:p=0;else if(p-1===c.length)if(y&Zn.PART_BOUNDARY){if(p=0,g===xu){y&=~Zn.PART_BOUNDARY,C("onPartEnd"),C("onPartBegin"),m=ot.HEADER_FIELD_START;break}}else y&Zn.LAST_BOUNDARY&&g===ya?(C("onPartEnd"),m=ot.END,y=0):p=0;if(p>0)s[p-1]=g;else if(i>0){let J=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);C("onPartData",0,i,J),i=0,E("onPartData"),r--}break;case ot.END:break;default:throw new Error(`Unexpected state entered: ${m}`)}U("onHeaderField"),U("onHeaderValue"),U("onPartData"),this.index=p,this.state=m,this.flags=y}end(){if(this.state===ot.HEADER_FIELD_START&&this.index===0||this.state===ot.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==ot.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}};o($$,"_fileName");o(D$,"toFormData")});async function op(t){if(t[Vt].disturbed)throw new TypeError(`body used already for: ${t.url}`);if(t[Vt].disturbed=!0,t[Vt].error)throw t[Vt].error;let{body:e}=t;if(e===null)return Xt.Buffer.alloc(0);if(!(e instanceof gr.default))return Xt.Buffer.alloc(0);let r=[],n=0;try{for await(let i of e){if(t.size>0&&n+i.length>t.size){let s=new zt(`content size at ${t.url} over limit: ${t.size}`,"max-size");throw e.destroy(s),s}n+=i.length,r.push(i)}}catch(i){throw i instanceof gn?i:new zt(`Invalid response body while trying to fetch ${t.url}: ${i.message}`,"system",i)}if(e.readableEnded===!0||e._readableState.ended===!0)try{return r.every(i=>typeof i=="string")?Xt.Buffer.from(r.join("")):Xt.Buffer.concat(r,n)}catch(i){throw new zt(`Could not create Buffer from response body for ${t.url}: ${i.message}`,"system",i)}else throw new zt(`Premature close of server response while trying to fetch ${t.url}`)}var gr,yn,Xt,N$,Vt,Br,ii,z$,Iu,tS,rS,Ru=Tt(()=>{gr=qe(require("node:stream"),1),yn=require("node:util"),Xt=require("node:buffer");ma();Eu();Qd();Su();Tu();N$=(0,yn.promisify)(gr.default.pipeline),Vt=Symbol("Body internals"),Br=class{static{o(this,"Body")}constructor(e,{size:r=0}={}){let n=null;e===null?e=null:ep(e)?e=Xt.Buffer.from(e.toString()):ga(e)||Xt.Buffer.isBuffer(e)||(yn.types.isAnyArrayBuffer(e)?e=Xt.Buffer.from(e):ArrayBuffer.isView(e)?e=Xt.Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof gr.default||(e instanceof Wn?(e=ME(e),n=e.type.split("=")[1]):e=Xt.Buffer.from(String(e))));let i=e;Xt.Buffer.isBuffer(e)?i=gr.default.Readable.from(e):ga(e)&&(i=gr.default.Readable.from(e.stream())),this[Vt]={body:e,stream:i,boundary:n,disturbed:!1,error:null},this.size=r,e instanceof gr.default&&e.on("error",s=>{let c=s instanceof gn?s:new zt(`Invalid response body while trying to fetch ${this.url}: ${s.message}`,"system",s);this[Vt].error=c})}get body(){return this[Vt].stream}get bodyUsed(){return this[Vt].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:r,byteLength:n}=await op(this);return e.slice(r,r+n)}async formData(){let e=this.headers.get("content-type");if(e.startsWith("application/x-www-form-urlencoded")){let n=new Wn,i=new URLSearchParams(await this.text());for(let[s,c]of i)n.append(s,c);return n}let{toFormData:r}=await Promise.resolve().then(()=>(eS(),QE));return r(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[Vt].body&&this[Vt].body.type||"",r=await this.arrayBuffer();return new Ir([r],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await op(this);return new TextDecoder().decode(e)}buffer(){return op(this)}};Br.prototype.buffer=(0,yn.deprecate)(Br.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(Br.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:(0,yn.deprecate)(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});o(op,"consumeBody");ii=o((t,e)=>{let r,n,{body:i}=t[Vt];if(t.bodyUsed)throw new Error("cannot clone body after it is used");return i instanceof gr.default&&typeof i.getBoundary!="function"&&(r=new gr.PassThrough({highWaterMark:e}),n=new gr.PassThrough({highWaterMark:e}),i.pipe(r),i.pipe(n),t[Vt].stream=r,i=n),i},"clone"),z$=(0,yn.deprecate)(t=>t.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),Iu=o((t,e)=>t===null?null:typeof t=="string"?"text/plain;charset=UTF-8":ep(t)?"application/x-www-form-urlencoded;charset=UTF-8":ga(t)?t.type||null:Xt.Buffer.isBuffer(t)||yn.types.isAnyArrayBuffer(t)||ArrayBuffer.isView(t)?null:t instanceof Wn?`multipart/form-data; boundary=${e[Vt].boundary}`:t&&typeof t.getBoundary=="function"?`multipart/form-data;boundary=${z$(t)}`:t instanceof gr.default?null:"text/plain;charset=UTF-8","extractContentType"),tS=o(t=>{let{body:e}=t[Vt];return e===null?0:ga(e)?e.size:Xt.Buffer.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},"getTotalBytes"),rS=o(async(t,{body:e})=>{e===null?t.end():await N$(e,t)},"writeToStream")});function nS(t=[]){return new Gt(t.reduce((e,r,n,i)=>(n%2===0&&e.push(i.slice(n,n+2)),e),[]).filter(([e,r])=>{try{return Cu(e),ap(e,String(r)),!0}catch{return!1}}))}var ip,va,Cu,ap,Gt,Ou=Tt(()=>{ip=require("node:util"),va=qe(require("node:http"),1),Cu=typeof va.default.validateHeaderName=="function"?va.default.validateHeaderName:t=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(t)){let e=new TypeError(`Header name must be a valid HTTP token [${t}]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),e}},ap=typeof va.default.validateHeaderValue=="function"?va.default.validateHeaderValue:(t,e)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(e)){let r=new TypeError(`Invalid character in header content ["${t}"]`);throw Object.defineProperty(r,"code",{value:"ERR_INVALID_CHAR"}),r}},Gt=class t extends URLSearchParams{static{o(this,"Headers")}constructor(e){let r=[];if(e instanceof t){let n=e.raw();for(let[i,s]of Object.entries(n))r.push(...s.map(c=>[i,c]))}else if(e!=null)if(typeof e=="object"&&!ip.types.isBoxedPrimitive(e)){let n=e[Symbol.iterator];if(n==null)r.push(...Object.entries(e));else{if(typeof n!="function")throw new TypeError("Header pairs must be iterable");r=[...e].map(i=>{if(typeof i!="object"||ip.types.isBoxedPrimitive(i))throw new TypeError("Each header pair must be an iterable object");return[...i]}).map(i=>{if(i.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...i]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return r=r.length>0?r.map(([n,i])=>(Cu(n),ap(n,String(i)),[String(n).toLowerCase(),String(i)])):void 0,super(r),new Proxy(this,{get(n,i,s){switch(i){case"append":case"set":return(c,d)=>(Cu(c),ap(c,String(d)),URLSearchParams.prototype[i].call(n,String(c).toLowerCase(),String(d)));case"delete":case"has":case"getAll":return c=>(Cu(c),URLSearchParams.prototype[i].call(n,String(c).toLowerCase()));case"keys":return()=>(n.sort(),new Set(URLSearchParams.prototype.keys.call(n)).keys());default:return Reflect.get(n,i,s)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){let r=this.getAll(e);if(r.length===0)return null;let n=r.join(", ");return/^content-encoding$/i.test(e)&&(n=n.toLowerCase()),n}forEach(e,r=void 0){for(let n of this.keys())Reflect.apply(e,r,[this.get(n),n,this])}*values(){for(let e of this.keys())yield this.get(e)}*entries(){for(let e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((e,r)=>(e[r]=this.getAll(r),e),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((e,r)=>{let n=this.getAll(r);return r==="host"?e[r]=n[0]:e[r]=n.length>1?n:n[0],e},{})}};Object.defineProperties(Gt.prototype,["get","entries","forEach","values"].reduce((t,e)=>(t[e]={enumerable:!0},t),{}));o(nS,"fromRawHeaders")});var U$,_a,sp=Tt(()=>{U$=new Set([301,302,303,307,308]),_a=o(t=>U$.has(t),"isRedirect")});var Rr,Qt,oS=Tt(()=>{Ou();Ru();sp();Rr=Symbol("Response internals"),Qt=class t extends Br{static{o(this,"Response")}constructor(e=null,r={}){super(e,r);let n=r.status!=null?r.status:200,i=new Gt(r.headers);if(e!==null&&!i.has("Content-Type")){let s=Iu(e,this);s&&i.append("Content-Type",s)}this[Rr]={type:"default",url:r.url,status:n,statusText:r.statusText||"",headers:i,counter:r.counter,highWaterMark:r.highWaterMark}}get type(){return this[Rr].type}get url(){return this[Rr].url||""}get status(){return this[Rr].status}get ok(){return this[Rr].status>=200&&this[Rr].status<300}get redirected(){return this[Rr].counter>0}get statusText(){return this[Rr].statusText}get headers(){return this[Rr].headers}get highWaterMark(){return this[Rr].highWaterMark}clone(){return new t(ii(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(e,r=302){if(!_a(r))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new t(null,{headers:{location:new URL(e).toString()},status:r})}static error(){let e=new t(null,{status:0,statusText:""});return e[Rr].type="error",e}static json(e=void 0,r={}){let n=JSON.stringify(e);if(n===void 0)throw new TypeError("data is not JSON serializable");let i=new Gt(r&&r.headers);return i.has("content-type")||i.set("content-type","application/json"),new t(n,{...r,headers:i})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(Qt.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}})});var iS,aS=Tt(()=>{iS=o(t=>{if(t.search)return t.search;let e=t.href.length-1,r=t.hash||(t.href[e]==="#"?"#":"");return t.href[e-r.length]==="?"?"?":""},"getSearch")});function sS(t,e=!1){return t==null||(t=new URL(t),/^(about|blob|data):$/.test(t.protocol))?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}function dS(t){if(!cS.has(t))throw new TypeError(`Invalid referrerPolicy: ${t}`);return t}function M$(t){if(/^(http|ws)s:$/.test(t.protocol))return!0;let e=t.host.replace(/(^\[)|(]$)/g,""),r=(0,uS.isIP)(e);return r===4&&/^127\./.test(e)||r===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(e)?!0:t.host==="localhost"||t.host.endsWith(".localhost")?!1:t.protocol==="file:"}function ai(t){return/^about:(blank|srcdoc)$/.test(t)||t.protocol==="data:"||/^(blob|filesystem):$/.test(t.protocol)?!0:M$(t)}function pS(t,{referrerURLCallback:e,referrerOriginCallback:r}={}){if(t.referrer==="no-referrer"||t.referrerPolicy==="")return null;let n=t.referrerPolicy;if(t.referrer==="about:client")return"no-referrer";let i=t.referrer,s=sS(i),c=sS(i,!0);s.toString().length>4096&&(s=c),e&&(s=e(s)),r&&(c=r(c));let d=new URL(t.url);switch(n){case"no-referrer":return"no-referrer";case"origin":return c;case"unsafe-url":return s;case"strict-origin":return ai(s)&&!ai(d)?"no-referrer":c.toString();case"strict-origin-when-cross-origin":return s.origin===d.origin?s:ai(s)&&!ai(d)?"no-referrer":c;case"same-origin":return s.origin===d.origin?s:"no-referrer";case"origin-when-cross-origin":return s.origin===d.origin?s:c;case"no-referrer-when-downgrade":return ai(s)&&!ai(d)?"no-referrer":s;default:throw new TypeError(`Invalid referrerPolicy: ${n}`)}}function fS(t){let e=(t.get("referrer-policy")||"").split(/[,\s]+/),r="";for(let n of e)n&&cS.has(n)&&(r=n);return r}var uS,cS,lS,up=Tt(()=>{uS=require("node:net");o(sS,"stripURLForUseAsAReferrer");cS=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),lS="strict-origin-when-cross-origin";o(dS,"validateReferrerPolicy");o(M$,"isOriginPotentiallyTrustworthy");o(ai,"isUrlPotentiallyTrustworthy");o(pS,"determineRequestsReferrer");o(fS,"parseReferrerPolicyFromHeader")});var mS,hS,It,ba,L$,Kn,gS,yS=Tt(()=>{mS=require("node:url"),hS=require("node:util");Ou();Ru();Tu();aS();up();It=Symbol("Request internals"),ba=o(t=>typeof t=="object"&&typeof t[It]=="object","isRequest"),L$=(0,hS.deprecate)(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),Kn=class t extends Br{static{o(this,"Request")}constructor(e,r={}){let n;if(ba(e)?n=new URL(e.url):(n=new URL(e),e={}),n.username!==""||n.password!=="")throw new TypeError(`${n} is an url with embedded credentials.`);let i=r.method||e.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(i)&&(i=i.toUpperCase()),!ba(r)&&"data"in r&&L$(),(r.body!=null||ba(e)&&e.body!==null)&&(i==="GET"||i==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let s=r.body?r.body:ba(e)&&e.body!==null?ii(e):null;super(s,{size:r.size||e.size||0});let c=new Gt(r.headers||e.headers||{});if(s!==null&&!c.has("Content-Type")){let m=Iu(s,this);m&&c.set("Content-Type",m)}let d=ba(e)?e.signal:null;if("signal"in r&&(d=r.signal),d!=null&&!LE(d))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let p=r.referrer==null?e.referrer:r.referrer;if(p==="")p="no-referrer";else if(p){let m=new URL(p);p=/^about:(\/\/)?client$/.test(m)?"client":m}else p=void 0;this[It]={method:i,redirect:r.redirect||e.redirect||"follow",headers:c,parsedURL:n,signal:d,referrer:p},this.follow=r.follow===void 0?e.follow===void 0?20:e.follow:r.follow,this.compress=r.compress===void 0?e.compress===void 0?!0:e.compress:r.compress,this.counter=r.counter||e.counter||0,this.agent=r.agent||e.agent,this.highWaterMark=r.highWaterMark||e.highWaterMark||16384,this.insecureHTTPParser=r.insecureHTTPParser||e.insecureHTTPParser||!1,this.referrerPolicy=r.referrerPolicy||e.referrerPolicy||""}get method(){return this[It].method}get url(){return(0,mS.format)(this[It].parsedURL)}get headers(){return this[It].headers}get redirect(){return this[It].redirect}get signal(){return this[It].signal}get referrer(){if(this[It].referrer==="no-referrer")return"";if(this[It].referrer==="client")return"about:client";if(this[It].referrer)return this[It].referrer.toString()}get referrerPolicy(){return this[It].referrerPolicy}set referrerPolicy(e){this[It].referrerPolicy=dS(e)}clone(){return new t(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(Kn.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}});gS=o(t=>{let{parsedURL:e}=t[It],r=new Gt(t[It].headers);r.has("Accept")||r.set("Accept","*/*");let n=null;if(t.body===null&&/^(post|put)$/i.test(t.method)&&(n="0"),t.body!==null){let d=tS(t);typeof d=="number"&&!Number.isNaN(d)&&(n=String(d))}n&&r.set("Content-Length",n),t.referrerPolicy===""&&(t.referrerPolicy=lS),t.referrer&&t.referrer!=="no-referrer"?t[It].referrer=pS(t):t[It].referrer="no-referrer",t[It].referrer instanceof URL&&r.set("Referer",t.referrer),r.has("User-Agent")||r.set("User-Agent","node-fetch"),t.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip, deflate, br");let{agent:i}=t;typeof i=="function"&&(i=i(e));let s=iS(e),c={path:e.pathname+s,method:t.method,headers:r[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:t.insecureHTTPParser,agent:i};return{parsedURL:e,options:c}},"getNodeRequestOptions")});var Ea,vS=Tt(()=>{Su();Ea=class extends gn{static{o(this,"AbortError")}constructor(e,r="aborted"){super(e,r)}}});var ES={};Is(ES,{AbortError:()=>Ea,Blob:()=>Ir,FetchError:()=>zt,File:()=>Hn,FormData:()=>Wn,Headers:()=>Gt,Request:()=>Kn,Response:()=>Qt,blobFrom:()=>WE,blobFromSync:()=>HE,default:()=>cp,fileFrom:()=>ZE,fileFromSync:()=>KE,isRedirect:()=>_a});async function cp(t,e){return new Promise((r,n)=>{let i=new Kn(t,e),{parsedURL:s,options:c}=gS(i);if(!j$.has(s.protocol))throw new TypeError(`node-fetch cannot load ${t}. URL scheme "${s.protocol.replace(/:$/,"")}" is not supported.`);if(s.protocol==="data:"){let g=RE(i.url),v=new Qt(g,{headers:{"Content-Type":g.typeFull}});r(v);return}let d=(s.protocol==="https:"?bS.default:_S.default).request,{signal:p}=i,m=null,y=o(()=>{let g=new Ea("The operation was aborted.");n(g),i.body&&i.body instanceof er.default.Readable&&i.body.destroy(g),!(!m||!m.body)&&m.body.emit("error",g)},"abort");if(p&&p.aborted){y();return}let h=o(()=>{y(),l()},"abortAndFinalize"),f=d(s.toString(),c);p&&p.addEventListener("abort",h);let l=o(()=>{f.abort(),p&&p.removeEventListener("abort",h)},"finalize");f.on("error",g=>{n(new zt(`request to ${i.url} failed, reason: ${g.message}`,"system",g)),l()}),F$(f,g=>{m&&m.body&&m.body.destroy(g)}),process.version<"v14"&&f.on("socket",g=>{let v;g.prependListener("end",()=>{v=g._eventsCount}),g.prependListener("close",E=>{if(m&&v<g._eventsCount&&!E){let b=new Error("Premature close");b.code="ERR_STREAM_PREMATURE_CLOSE",m.body.emit("error",b)}})}),f.on("response",g=>{f.setTimeout(0);let v=nS(g.rawHeaders);if(_a(g.statusCode)){let J=v.get("Location"),Z=null;try{Z=J===null?null:new URL(J,i.url)}catch{if(i.redirect!=="manual"){n(new zt(`uri requested responds with an invalid redirect URL: ${J}`,"invalid-redirect")),l();return}}switch(i.redirect){case"error":n(new zt(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),l();return;case"manual":break;case"follow":{if(Z===null)break;if(i.counter>=i.follow){n(new zt(`maximum redirect reached at: ${i.url}`,"max-redirect")),l();return}let H={headers:new Gt(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:ii(i),signal:i.signal,size:i.size,referrer:i.referrer,referrerPolicy:i.referrerPolicy};if(!jE(i.url,Z)||!FE(i.url,Z))for(let te of["authorization","www-authenticate","cookie","cookie2"])H.headers.delete(te);if(g.statusCode!==303&&i.body&&e.body instanceof er.default.Readable){n(new zt("Cannot follow redirect with body being a readable stream","unsupported-redirect")),l();return}(g.statusCode===303||(g.statusCode===301||g.statusCode===302)&&i.method==="POST")&&(H.method="GET",H.body=void 0,H.headers.delete("content-length"));let K=fS(v);K&&(H.referrerPolicy=K),r(cp(new Kn(Z,H))),l();return}default:return n(new TypeError(`Redirect option '${i.redirect}' is not a valid value of RequestRedirect`))}}p&&g.once("end",()=>{p.removeEventListener("abort",h)});let E=(0,er.pipeline)(g,new er.PassThrough,J=>{J&&n(J)});process.version<"v12.10"&&g.on("aborted",h);let b={url:i.url,status:g.statusCode,statusText:g.statusMessage,headers:v,size:i.size,counter:i.counter,highWaterMark:i.highWaterMark},C=v.get("Content-Encoding");if(!i.compress||i.method==="HEAD"||C===null||g.statusCode===204||g.statusCode===304){m=new Qt(E,b),r(m);return}let U={flush:vo.default.Z_SYNC_FLUSH,finishFlush:vo.default.Z_SYNC_FLUSH};if(C==="gzip"||C==="x-gzip"){E=(0,er.pipeline)(E,vo.default.createGunzip(U),J=>{J&&n(J)}),m=new Qt(E,b),r(m);return}if(C==="deflate"||C==="x-deflate"){let J=(0,er.pipeline)(g,new er.PassThrough,Z=>{Z&&n(Z)});J.once("data",Z=>{(Z[0]&15)===8?E=(0,er.pipeline)(E,vo.default.createInflate(),H=>{H&&n(H)}):E=(0,er.pipeline)(E,vo.default.createInflateRaw(),H=>{H&&n(H)}),m=new Qt(E,b),r(m)}),J.once("end",()=>{m||(m=new Qt(E,b),r(m))});return}if(C==="br"){E=(0,er.pipeline)(E,vo.default.createBrotliDecompress(),J=>{J&&n(J)}),m=new Qt(E,b),r(m);return}m=new Qt(E,b),r(m)}),rS(f,i).catch(n)})}function F$(t,e){let r=Sa.Buffer.from(`0\r
|
|
22
|
+
`,i,`\r
|
|
23
|
+
`)),o.push(`--${n}--`),new t(o,{type:"multipart/form-data; boundary="+n})}var gu,V4,G4,Z0,H4,W0,Qb,vi,ko,Lf=$t(()=>{hu();Xb();({toStringTag:gu,iterator:V4,hasInstance:G4}=Symbol),Z0=Math.random,H4="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),W0=a((e,t,n)=>(e+="",/^(Blob|File)$/.test(t&&t[gu])?[(n=n!==void 0?n+"":t[gu]=="File"?t.name:"blob",e),t.name!==n||t[gu]=="blob"?new Oo([t],n,t):t]:[e,t+""]),"f"),Qb=a((e,t)=>(t?e:e.replace(/\r?\n|\r/g,`\r
|
|
24
|
+
`)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"e"),vi=a((e,t,n)=>{if(t.length<n)throw new TypeError(`Failed to execute '${e}' on 'FormData': ${n} arguments required, but only ${t.length} present.`)},"x"),ko=class{static{a(this,"FormData")}#e=[];constructor(...t){if(t.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[gu](){return"FormData"}[V4](){return this.entries()}static[G4](t){return t&&typeof t=="object"&&t[gu]==="FormData"&&!H4.some(n=>typeof t[n]!="function")}append(...t){vi("append",arguments,2),this.#e.push(W0(...t))}delete(t){vi("delete",arguments,1),t+="",this.#e=this.#e.filter(([n])=>n!==t)}get(t){vi("get",arguments,1),t+="";for(var n=this.#e,o=n.length,r=0;r<o;r++)if(n[r][0]===t)return n[r][1];return null}getAll(t,n){return vi("getAll",arguments,1),n=[],t+="",this.#e.forEach(o=>o[0]===t&&n.push(o[1])),n}has(t){return vi("has",arguments,1),t+="",this.#e.some(n=>n[0]===t)}forEach(t,n){vi("forEach",arguments,1);for(var[o,r]of this)t.call(n,r,o,this)}set(...t){vi("set",arguments,2);var n=[],o=!0;t=W0(...t),this.#e.forEach(r=>{r[0]===t[0]?o&&(o=!n.push(t)):n.push(r)}),o&&n.push(t),this.#e=n}*entries(){yield*this.#e}*keys(){for(var[t]of this)yield t}*values(){for(var[,t]of this)yield t}};a(K0,"formDataToBlob")});var Hn,jf=$t(()=>{Hn=class extends Error{static{a(this,"FetchBaseError")}constructor(t,n){super(t),Error.captureStackTrace(this,this.constructor),this.type=n}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}});var Xt,eE=$t(()=>{jf();Xt=class extends Hn{static{a(this,"FetchError")}constructor(t,n,o){super(t,n),o&&(this.code=this.errno=o.code,this.erroredSysCall=o.syscall)}}});var Ff,tE,yu,J0,Y0,X0,Bf=$t(()=>{Ff=Symbol.toStringTag,tE=a(e=>typeof e=="object"&&typeof e.append=="function"&&typeof e.delete=="function"&&typeof e.get=="function"&&typeof e.getAll=="function"&&typeof e.has=="function"&&typeof e.set=="function"&&typeof e.sort=="function"&&e[Ff]==="URLSearchParams","isURLSearchParameters"),yu=a(e=>e&&typeof e=="object"&&typeof e.arrayBuffer=="function"&&typeof e.type=="string"&&typeof e.stream=="function"&&typeof e.constructor=="function"&&/^(Blob|File)$/.test(e[Ff]),"isBlob"),J0=a(e=>typeof e=="object"&&(e[Ff]==="AbortSignal"||e[Ff]==="EventTarget"),"isAbortSignal"),Y0=a((e,t)=>{let n=new URL(t).hostname,o=new URL(e).hostname;return n===o||n.endsWith(`.${o}`)},"isDomainOrSubdomain"),X0=a((e,t)=>{let n=new URL(t).protocol,o=new URL(e).protocol;return n===o},"isSameProtocol")});var eO=z((cie,Q0)=>{if(!globalThis.DOMException)try{let{MessageChannel:e}=require("worker_threads"),t=new e().port1,n=new ArrayBuffer;t.postMessage(n,[n,n])}catch(e){e.constructor.name==="DOMException"&&(globalThis.DOMException=e.constructor)}Q0.exports=globalThis.DOMException});var _i,tO,rO,rE,nO,oO,iO,aO,sO,cO,qf,nE=$t(()=>{_i=require("node:fs"),tO=require("node:path"),rO=Ke(eO(),1);Xb();hu();({stat:rE}=_i.promises),nO=a((e,t)=>sO((0,_i.statSync)(e),e,t),"blobFromSync"),oO=a((e,t)=>rE(e).then(n=>sO(n,e,t)),"blobFrom"),iO=a((e,t)=>rE(e).then(n=>cO(n,e,t)),"fileFrom"),aO=a((e,t)=>cO((0,_i.statSync)(e),e,t),"fileFromSync"),sO=a((e,t,n="")=>new rn([new qf({path:t,size:e.size,lastModified:e.mtimeMs,start:0})],{type:n}),"fromBlob"),cO=a((e,t,n="")=>new Oo([new qf({path:t,size:e.size,lastModified:e.mtimeMs,start:0})],(0,tO.basename)(t),{type:n,lastModified:e.mtimeMs}),"fromFile"),qf=class e{static{a(this,"BlobDataItem")}#e;#t;constructor(t){this.#e=t.path,this.#t=t.start,this.size=t.size,this.lastModified=t.lastModified}slice(t,n){return new e({path:this.#e,lastModified:this.lastModified,size:n-t,start:this.#t+t})}async*stream(){let{mtimeMs:t}=await rE(this.#e);if(t>this.lastModified)throw new rO.default("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError");yield*(0,_i.createReadStream)(this.#e,{start:this.#t,end:this.#t+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}});var lO={};hr(lO,{toFormData:()=>Q4});function X4(e){let t=e.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!t)return;let n=t[2]||t[3]||"",o=n.slice(n.lastIndexOf("\\")+1);return o=o.replace(/%22/g,'"'),o=o.replace(/&#(\d{4});/g,(r,i)=>String.fromCharCode(i)),o}async function Q4(e,t){if(!/multipart/i.test(t))throw new TypeError("Failed to fetch");let n=t.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!n)throw new TypeError("no or bad content-type header, no multipart boundary");let o=new oE(n[1]||n[2]),r,i,s,u,d,f,h=[],g=new ko,m=a(b=>{s+=E.decode(b,{stream:!0})},"onPartData"),p=a(b=>{h.push(b)},"appendToFile"),y=a(()=>{let b=new Oo(h,f,{type:d});g.append(u,b)},"appendFileToFormData"),v=a(()=>{g.append(u,s)},"appendEntryToFormData"),E=new TextDecoder("utf-8");E.decode(),o.onPartBegin=function(){o.onPartData=m,o.onPartEnd=v,r="",i="",s="",u="",d="",f=null,h.length=0},o.onHeaderField=function(b){r+=E.decode(b,{stream:!0})},o.onHeaderValue=function(b){i+=E.decode(b,{stream:!0})},o.onHeaderEnd=function(){if(i+=E.decode(),r=r.toLowerCase(),r==="content-disposition"){let b=i.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);b&&(u=b[2]||b[3]||""),f=X4(i),f&&(o.onPartData=p,o.onPartEnd=y)}else r==="content-type"&&(d=i);i="",r=""};for await(let b of e)o.write(b);return o.end(),g}var gn,ft,uO,$o,Vf,Gf,Z4,vu,W4,K4,J4,Y4,bi,oE,dO=$t(()=>{nE();Lf();gn=0,ft={START_BOUNDARY:gn++,HEADER_FIELD_START:gn++,HEADER_FIELD:gn++,HEADER_VALUE_START:gn++,HEADER_VALUE:gn++,HEADER_VALUE_ALMOST_DONE:gn++,HEADERS_ALMOST_DONE:gn++,PART_DATA_START:gn++,PART_DATA:gn++,END:gn++},uO=1,$o={PART_BOUNDARY:uO,LAST_BOUNDARY:uO*=2},Vf=10,Gf=13,Z4=32,vu=45,W4=58,K4=97,J4=122,Y4=a(e=>e|32,"lower"),bi=a(()=>{},"noop"),oE=class{static{a(this,"MultipartParser")}constructor(t){this.index=0,this.flags=0,this.onHeaderEnd=bi,this.onHeaderField=bi,this.onHeadersEnd=bi,this.onHeaderValue=bi,this.onPartBegin=bi,this.onPartData=bi,this.onPartEnd=bi,this.boundaryChars={},t=`\r
|
|
25
|
+
--`+t;let n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o),this.boundaryChars[n[o]]=!0;this.boundary=n,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=ft.START_BOUNDARY}write(t){let n=0,o=t.length,r=this.index,{lookbehind:i,boundary:s,boundaryChars:u,index:d,state:f,flags:h}=this,g=this.boundary.length,m=g-1,p=t.length,y,v,E=a(Z=>{this[Z+"Mark"]=n},"mark"),b=a(Z=>{delete this[Z+"Mark"]},"clear"),k=a((Z,H,K,ee)=>{(H===void 0||H!==K)&&this[Z](ee&&ee.subarray(H,K))},"callback"),N=a((Z,H)=>{let K=Z+"Mark";K in this&&(H?(k(Z,this[K],n,t),delete this[K]):(k(Z,this[K],t.length,t),this[K]=0))},"dataCallback");for(n=0;n<o;n++)switch(y=t[n],f){case ft.START_BOUNDARY:if(d===s.length-2){if(y===vu)h|=$o.LAST_BOUNDARY;else if(y!==Gf)return;d++;break}else if(d-1===s.length-2){if(h&$o.LAST_BOUNDARY&&y===vu)f=ft.END,h=0;else if(!(h&$o.LAST_BOUNDARY)&&y===Vf)d=0,k("onPartBegin"),f=ft.HEADER_FIELD_START;else return;break}y!==s[d+2]&&(d=-2),y===s[d+2]&&d++;break;case ft.HEADER_FIELD_START:f=ft.HEADER_FIELD,E("onHeaderField"),d=0;case ft.HEADER_FIELD:if(y===Gf){b("onHeaderField"),f=ft.HEADERS_ALMOST_DONE;break}if(d++,y===vu)break;if(y===W4){if(d===1)return;N("onHeaderField",!0),f=ft.HEADER_VALUE_START;break}if(v=Y4(y),v<K4||v>J4)return;break;case ft.HEADER_VALUE_START:if(y===Z4)break;E("onHeaderValue"),f=ft.HEADER_VALUE;case ft.HEADER_VALUE:y===Gf&&(N("onHeaderValue",!0),k("onHeaderEnd"),f=ft.HEADER_VALUE_ALMOST_DONE);break;case ft.HEADER_VALUE_ALMOST_DONE:if(y!==Vf)return;f=ft.HEADER_FIELD_START;break;case ft.HEADERS_ALMOST_DONE:if(y!==Vf)return;k("onHeadersEnd"),f=ft.PART_DATA_START;break;case ft.PART_DATA_START:f=ft.PART_DATA,E("onPartData");case ft.PART_DATA:if(r=d,d===0){for(n+=m;n<p&&!(t[n]in u);)n+=g;n-=m,y=t[n]}if(d<s.length)s[d]===y?(d===0&&N("onPartData",!0),d++):d=0;else if(d===s.length)d++,y===Gf?h|=$o.PART_BOUNDARY:y===vu?h|=$o.LAST_BOUNDARY:d=0;else if(d-1===s.length)if(h&$o.PART_BOUNDARY){if(d=0,y===Vf){h&=~$o.PART_BOUNDARY,k("onPartEnd"),k("onPartBegin"),f=ft.HEADER_FIELD_START;break}}else h&$o.LAST_BOUNDARY&&y===vu?(k("onPartEnd"),f=ft.END,h=0):d=0;if(d>0)i[d-1]=y;else if(r>0){let Z=new Uint8Array(i.buffer,i.byteOffset,i.byteLength);k("onPartData",0,r,Z),r=0,E("onPartData"),n--}break;case ft.END:break;default:throw new Error(`Unexpected state entered: ${f}`)}N("onHeaderField"),N("onHeaderValue"),N("onPartData"),this.index=d,this.state=f,this.flags=h}end(){if(this.state===ft.HEADER_FIELD_START&&this.index===0||this.state===ft.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==ft.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}};a(X4,"_fileName");a(Q4,"toFormData")});async function iE(e){if(e[lr].disturbed)throw new TypeError(`body used already for: ${e.url}`);if(e[lr].disturbed=!0,e[lr].error)throw e[lr].error;let{body:t}=e;if(t===null)return Er.Buffer.alloc(0);if(!(t instanceof Fr.default))return Er.Buffer.alloc(0);let n=[],o=0;try{for await(let r of t){if(e.size>0&&o+r.length>e.size){let i=new Xt(`content size at ${e.url} over limit: ${e.size}`,"max-size");throw t.destroy(i),i}o+=r.length,n.push(r)}}catch(r){throw r instanceof Hn?r:new Xt(`Invalid response body while trying to fetch ${e.url}: ${r.message}`,"system",r)}if(t.readableEnded===!0||t._readableState.ended===!0)try{return n.every(r=>typeof r=="string")?Er.Buffer.from(n.join("")):Er.Buffer.concat(n,o)}catch(r){throw new Xt(`Could not create Buffer from response body for ${e.url}: ${r.message}`,"system",r)}else throw new Xt(`Premature close of server response while trying to fetch ${e.url}`)}var Fr,Zn,Er,e6,lr,yn,za,t6,Hf,pO,fO,Zf=$t(()=>{Fr=Ke(require("node:stream"),1),Zn=require("node:util"),Er=require("node:buffer");hu();Lf();eE();jf();Bf();e6=(0,Zn.promisify)(Fr.default.pipeline),lr=Symbol("Body internals"),yn=class{static{a(this,"Body")}constructor(t,{size:n=0}={}){let o=null;t===null?t=null:tE(t)?t=Er.Buffer.from(t.toString()):yu(t)||Er.Buffer.isBuffer(t)||(Zn.types.isAnyArrayBuffer(t)?t=Er.Buffer.from(t):ArrayBuffer.isView(t)?t=Er.Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof Fr.default||(t instanceof ko?(t=K0(t),o=t.type.split("=")[1]):t=Er.Buffer.from(String(t))));let r=t;Er.Buffer.isBuffer(t)?r=Fr.default.Readable.from(t):yu(t)&&(r=Fr.default.Readable.from(t.stream())),this[lr]={body:t,stream:r,boundary:o,disturbed:!1,error:null},this.size=n,t instanceof Fr.default&&t.on("error",i=>{let s=i instanceof Hn?i:new Xt(`Invalid response body while trying to fetch ${this.url}: ${i.message}`,"system",i);this[lr].error=s})}get body(){return this[lr].stream}get bodyUsed(){return this[lr].disturbed}async arrayBuffer(){let{buffer:t,byteOffset:n,byteLength:o}=await iE(this);return t.slice(n,n+o)}async formData(){let t=this.headers.get("content-type");if(t.startsWith("application/x-www-form-urlencoded")){let o=new ko,r=new URLSearchParams(await this.text());for(let[i,s]of r)o.append(i,s);return o}let{toFormData:n}=await Promise.resolve().then(()=>(dO(),lO));return n(this.body,t)}async blob(){let t=this.headers&&this.headers.get("content-type")||this[lr].body&&this[lr].body.type||"",n=await this.arrayBuffer();return new rn([n],{type:t})}async json(){let t=await this.text();return JSON.parse(t)}async text(){let t=await iE(this);return new TextDecoder().decode(t)}buffer(){return iE(this)}};yn.prototype.buffer=(0,Zn.deprecate)(yn.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(yn.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:(0,Zn.deprecate)(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});a(iE,"consumeBody");za=a((e,t)=>{let n,o,{body:r}=e[lr];if(e.bodyUsed)throw new Error("cannot clone body after it is used");return r instanceof Fr.default&&typeof r.getBoundary!="function"&&(n=new Fr.PassThrough({highWaterMark:t}),o=new Fr.PassThrough({highWaterMark:t}),r.pipe(n),r.pipe(o),e[lr].stream=n,r=o),r},"clone"),t6=(0,Zn.deprecate)(e=>e.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),Hf=a((e,t)=>e===null?null:typeof e=="string"?"text/plain;charset=UTF-8":tE(e)?"application/x-www-form-urlencoded;charset=UTF-8":yu(e)?e.type||null:Er.Buffer.isBuffer(e)||Zn.types.isAnyArrayBuffer(e)||ArrayBuffer.isView(e)?null:e instanceof ko?`multipart/form-data; boundary=${t[lr].boundary}`:e&&typeof e.getBoundary=="function"?`multipart/form-data;boundary=${t6(e)}`:e instanceof Fr.default?null:"text/plain;charset=UTF-8","extractContentType"),pO=a(e=>{let{body:t}=e[lr];return t===null?0:yu(t)?t.size:Er.Buffer.isBuffer(t)?t.length:t&&typeof t.getLengthSync=="function"&&t.hasKnownLength&&t.hasKnownLength()?t.getLengthSync():null},"getTotalBytes"),fO=a(async(e,{body:t})=>{t===null?e.end():await e6(t,e)},"writeToStream")});function mO(e=[]){return new dr(e.reduce((t,n,o,r)=>(o%2===0&&t.push(r.slice(o,o+2)),t),[]).filter(([t,n])=>{try{return Wf(t),sE(t,String(n)),!0}catch{return!1}}))}var aE,_u,Wf,sE,dr,Kf=$t(()=>{aE=require("node:util"),_u=Ke(require("node:http"),1),Wf=typeof _u.default.validateHeaderName=="function"?_u.default.validateHeaderName:e=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(e)){let t=new TypeError(`Header name must be a valid HTTP token [${e}]`);throw Object.defineProperty(t,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),t}},sE=typeof _u.default.validateHeaderValue=="function"?_u.default.validateHeaderValue:(e,t)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(t)){let n=new TypeError(`Invalid character in header content ["${e}"]`);throw Object.defineProperty(n,"code",{value:"ERR_INVALID_CHAR"}),n}},dr=class e extends URLSearchParams{static{a(this,"Headers")}constructor(t){let n=[];if(t instanceof e){let o=t.raw();for(let[r,i]of Object.entries(o))n.push(...i.map(s=>[r,s]))}else if(t!=null)if(typeof t=="object"&&!aE.types.isBoxedPrimitive(t)){let o=t[Symbol.iterator];if(o==null)n.push(...Object.entries(t));else{if(typeof o!="function")throw new TypeError("Header pairs must be iterable");n=[...t].map(r=>{if(typeof r!="object"||aE.types.isBoxedPrimitive(r))throw new TypeError("Each header pair must be an iterable object");return[...r]}).map(r=>{if(r.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...r]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return n=n.length>0?n.map(([o,r])=>(Wf(o),sE(o,String(r)),[String(o).toLowerCase(),String(r)])):void 0,super(n),new Proxy(this,{get(o,r,i){switch(r){case"append":case"set":return(s,u)=>(Wf(s),sE(s,String(u)),URLSearchParams.prototype[r].call(o,String(s).toLowerCase(),String(u)));case"delete":case"has":case"getAll":return s=>(Wf(s),URLSearchParams.prototype[r].call(o,String(s).toLowerCase()));case"keys":return()=>(o.sort(),new Set(URLSearchParams.prototype.keys.call(o)).keys());default:return Reflect.get(o,r,i)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(t){let n=this.getAll(t);if(n.length===0)return null;let o=n.join(", ");return/^content-encoding$/i.test(t)&&(o=o.toLowerCase()),o}forEach(t,n=void 0){for(let o of this.keys())Reflect.apply(t,n,[this.get(o),o,this])}*values(){for(let t of this.keys())yield this.get(t)}*entries(){for(let t of this.keys())yield[t,this.get(t)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((t,n)=>(t[n]=this.getAll(n),t),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((t,n)=>{let o=this.getAll(n);return n==="host"?t[n]=o[0]:t[n]=o.length>1?o:o[0],t},{})}};Object.defineProperties(dr.prototype,["get","entries","forEach","values"].reduce((e,t)=>(e[t]={enumerable:!0},e),{}));a(mO,"fromRawHeaders")});var r6,bu,cE=$t(()=>{r6=new Set([301,302,303,307,308]),bu=a(e=>r6.has(e),"isRedirect")});var nn,Sr,hO=$t(()=>{Kf();Zf();cE();nn=Symbol("Response internals"),Sr=class e extends yn{static{a(this,"Response")}constructor(t=null,n={}){super(t,n);let o=n.status!=null?n.status:200,r=new dr(n.headers);if(t!==null&&!r.has("Content-Type")){let i=Hf(t,this);i&&r.append("Content-Type",i)}this[nn]={type:"default",url:n.url,status:o,statusText:n.statusText||"",headers:r,counter:n.counter,highWaterMark:n.highWaterMark}}get type(){return this[nn].type}get url(){return this[nn].url||""}get status(){return this[nn].status}get ok(){return this[nn].status>=200&&this[nn].status<300}get redirected(){return this[nn].counter>0}get statusText(){return this[nn].statusText}get headers(){return this[nn].headers}get highWaterMark(){return this[nn].highWaterMark}clone(){return new e(za(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(t,n=302){if(!bu(n))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new e(null,{headers:{location:new URL(t).toString()},status:n})}static error(){let t=new e(null,{status:0,statusText:""});return t[nn].type="error",t}static json(t=void 0,n={}){let o=JSON.stringify(t);if(o===void 0)throw new TypeError("data is not JSON serializable");let r=new dr(n&&n.headers);return r.has("content-type")||r.set("content-type","application/json"),new e(o,{...n,headers:r})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(Sr.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}})});var gO,yO=$t(()=>{gO=a(e=>{if(e.search)return e.search;let t=e.href.length-1,n=e.hash||(e.href[t]==="#"?"#":"");return e.href[t-n.length]==="?"?"?":""},"getSearch")});function vO(e,t=!1){return e==null||(e=new URL(e),/^(about|blob|data):$/.test(e.protocol))?"no-referrer":(e.username="",e.password="",e.hash="",t&&(e.pathname="",e.search=""),e)}function SO(e){if(!bO.has(e))throw new TypeError(`Invalid referrerPolicy: ${e}`);return e}function n6(e){if(/^(http|ws)s:$/.test(e.protocol))return!0;let t=e.host.replace(/(^\[)|(]$)/g,""),n=(0,_O.isIP)(t);return n===4&&/^127\./.test(t)||n===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(t)?!0:e.host==="localhost"||e.host.endsWith(".localhost")?!1:e.protocol==="file:"}function Ua(e){return/^about:(blank|srcdoc)$/.test(e)||e.protocol==="data:"||/^(blob|filesystem):$/.test(e.protocol)?!0:n6(e)}function TO(e,{referrerURLCallback:t,referrerOriginCallback:n}={}){if(e.referrer==="no-referrer"||e.referrerPolicy==="")return null;let o=e.referrerPolicy;if(e.referrer==="about:client")return"no-referrer";let r=e.referrer,i=vO(r),s=vO(r,!0);i.toString().length>4096&&(i=s),t&&(i=t(i)),n&&(s=n(s));let u=new URL(e.url);switch(o){case"no-referrer":return"no-referrer";case"origin":return s;case"unsafe-url":return i;case"strict-origin":return Ua(i)&&!Ua(u)?"no-referrer":s.toString();case"strict-origin-when-cross-origin":return i.origin===u.origin?i:Ua(i)&&!Ua(u)?"no-referrer":s;case"same-origin":return i.origin===u.origin?i:"no-referrer";case"origin-when-cross-origin":return i.origin===u.origin?i:s;case"no-referrer-when-downgrade":return Ua(i)&&!Ua(u)?"no-referrer":i;default:throw new TypeError(`Invalid referrerPolicy: ${o}`)}}function PO(e){let t=(e.get("referrer-policy")||"").split(/[,\s]+/),n="";for(let o of t)o&&bO.has(o)&&(n=o);return n}var _O,bO,EO,uE=$t(()=>{_O=require("node:net");a(vO,"stripURLForUseAsAReferrer");bO=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),EO="strict-origin-when-cross-origin";a(SO,"validateReferrerPolicy");a(n6,"isOriginPotentiallyTrustworthy");a(Ua,"isUrlPotentiallyTrustworthy");a(TO,"determineRequestsReferrer");a(PO,"parseReferrerPolicyFromHeader")});var wO,xO,jt,Eu,o6,Do,AO,IO=$t(()=>{wO=require("node:url"),xO=require("node:util");Kf();Zf();Bf();yO();uE();jt=Symbol("Request internals"),Eu=a(e=>typeof e=="object"&&typeof e[jt]=="object","isRequest"),o6=(0,xO.deprecate)(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),Do=class e extends yn{static{a(this,"Request")}constructor(t,n={}){let o;if(Eu(t)?o=new URL(t.url):(o=new URL(t),t={}),o.username!==""||o.password!=="")throw new TypeError(`${o} is an url with embedded credentials.`);let r=n.method||t.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(r)&&(r=r.toUpperCase()),!Eu(n)&&"data"in n&&o6(),(n.body!=null||Eu(t)&&t.body!==null)&&(r==="GET"||r==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let i=n.body?n.body:Eu(t)&&t.body!==null?za(t):null;super(i,{size:n.size||t.size||0});let s=new dr(n.headers||t.headers||{});if(i!==null&&!s.has("Content-Type")){let f=Hf(i,this);f&&s.set("Content-Type",f)}let u=Eu(t)?t.signal:null;if("signal"in n&&(u=n.signal),u!=null&&!J0(u))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let d=n.referrer==null?t.referrer:n.referrer;if(d==="")d="no-referrer";else if(d){let f=new URL(d);d=/^about:(\/\/)?client$/.test(f)?"client":f}else d=void 0;this[jt]={method:r,redirect:n.redirect||t.redirect||"follow",headers:s,parsedURL:o,signal:u,referrer:d},this.follow=n.follow===void 0?t.follow===void 0?20:t.follow:n.follow,this.compress=n.compress===void 0?t.compress===void 0?!0:t.compress:n.compress,this.counter=n.counter||t.counter||0,this.agent=n.agent||t.agent,this.highWaterMark=n.highWaterMark||t.highWaterMark||16384,this.insecureHTTPParser=n.insecureHTTPParser||t.insecureHTTPParser||!1,this.referrerPolicy=n.referrerPolicy||t.referrerPolicy||""}get method(){return this[jt].method}get url(){return(0,wO.format)(this[jt].parsedURL)}get headers(){return this[jt].headers}get redirect(){return this[jt].redirect}get signal(){return this[jt].signal}get referrer(){if(this[jt].referrer==="no-referrer")return"";if(this[jt].referrer==="client")return"about:client";if(this[jt].referrer)return this[jt].referrer.toString()}get referrerPolicy(){return this[jt].referrerPolicy}set referrerPolicy(t){this[jt].referrerPolicy=SO(t)}clone(){return new e(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(Do.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}});AO=a(e=>{let{parsedURL:t}=e[jt],n=new dr(e[jt].headers);n.has("Accept")||n.set("Accept","*/*");let o=null;if(e.body===null&&/^(post|put)$/i.test(e.method)&&(o="0"),e.body!==null){let u=pO(e);typeof u=="number"&&!Number.isNaN(u)&&(o=String(u))}o&&n.set("Content-Length",o),e.referrerPolicy===""&&(e.referrerPolicy=EO),e.referrer&&e.referrer!=="no-referrer"?e[jt].referrer=TO(e):e[jt].referrer="no-referrer",e[jt].referrer instanceof URL&&n.set("Referer",e.referrer),n.has("User-Agent")||n.set("User-Agent","node-fetch"),e.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip, deflate, br");let{agent:r}=e;typeof r=="function"&&(r=r(t));let i=gO(t),s={path:t.pathname+i,method:e.method,headers:n[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:e.insecureHTTPParser,agent:r};return{parsedURL:t,options:s}},"getNodeRequestOptions")});var Su,RO=$t(()=>{jf();Su=class extends Hn{static{a(this,"AbortError")}constructor(t,n="aborted"){super(t,n)}}});var kO={};hr(kO,{AbortError:()=>Su,Blob:()=>rn,FetchError:()=>Xt,File:()=>Oo,FormData:()=>ko,Headers:()=>dr,Request:()=>Do,Response:()=>Sr,blobFrom:()=>oO,blobFromSync:()=>nO,default:()=>lE,fileFrom:()=>iO,fileFromSync:()=>aO,isRedirect:()=>bu});async function lE(e,t){return new Promise((n,o)=>{let r=new Do(e,t),{parsedURL:i,options:s}=AO(r);if(!i6.has(i.protocol))throw new TypeError(`node-fetch cannot load ${e}. URL scheme "${i.protocol.replace(/:$/,"")}" is not supported.`);if(i.protocol==="data:"){let y=j0(r.url),v=new Sr(y,{headers:{"Content-Type":y.typeFull}});n(v);return}let u=(i.protocol==="https:"?OO.default:CO.default).request,{signal:d}=r,f=null,h=a(()=>{let y=new Su("The operation was aborted.");o(y),r.body&&r.body instanceof Tr.default.Readable&&r.body.destroy(y),!(!f||!f.body)&&f.body.emit("error",y)},"abort");if(d&&d.aborted){h();return}let g=a(()=>{h(),p()},"abortAndFinalize"),m=u(i.toString(),s);d&&d.addEventListener("abort",g);let p=a(()=>{m.abort(),d&&d.removeEventListener("abort",g)},"finalize");m.on("error",y=>{o(new Xt(`request to ${r.url} failed, reason: ${y.message}`,"system",y)),p()}),a6(m,y=>{f&&f.body&&f.body.destroy(y)}),process.version<"v14"&&m.on("socket",y=>{let v;y.prependListener("end",()=>{v=y._eventsCount}),y.prependListener("close",E=>{if(f&&v<y._eventsCount&&!E){let b=new Error("Premature close");b.code="ERR_STREAM_PREMATURE_CLOSE",f.body.emit("error",b)}})}),m.on("response",y=>{m.setTimeout(0);let v=mO(y.rawHeaders);if(bu(y.statusCode)){let Z=v.get("Location"),H=null;try{H=Z===null?null:new URL(Z,r.url)}catch{if(r.redirect!=="manual"){o(new Xt(`uri requested responds with an invalid redirect URL: ${Z}`,"invalid-redirect")),p();return}}switch(r.redirect){case"error":o(new Xt(`uri requested responds with a redirect, redirect mode is set to error: ${r.url}`,"no-redirect")),p();return;case"manual":break;case"follow":{if(H===null)break;if(r.counter>=r.follow){o(new Xt(`maximum redirect reached at: ${r.url}`,"max-redirect")),p();return}let K={headers:new dr(r.headers),follow:r.follow,counter:r.counter+1,agent:r.agent,compress:r.compress,method:r.method,body:za(r),signal:r.signal,size:r.size,referrer:r.referrer,referrerPolicy:r.referrerPolicy};if(!Y0(r.url,H)||!X0(r.url,H))for(let se of["authorization","www-authenticate","cookie","cookie2"])K.headers.delete(se);if(y.statusCode!==303&&r.body&&t.body instanceof Tr.default.Readable){o(new Xt("Cannot follow redirect with body being a readable stream","unsupported-redirect")),p();return}(y.statusCode===303||(y.statusCode===301||y.statusCode===302)&&r.method==="POST")&&(K.method="GET",K.body=void 0,K.headers.delete("content-length"));let ee=PO(v);ee&&(K.referrerPolicy=ee),n(lE(new Do(H,K))),p();return}default:return o(new TypeError(`Redirect option '${r.redirect}' is not a valid value of RequestRedirect`))}}d&&y.once("end",()=>{d.removeEventListener("abort",g)});let E=(0,Tr.pipeline)(y,new Tr.PassThrough,Z=>{Z&&o(Z)});process.version<"v12.10"&&y.on("aborted",g);let b={url:r.url,status:y.statusCode,statusText:y.statusMessage,headers:v,size:r.size,counter:r.counter,highWaterMark:r.highWaterMark},k=v.get("Content-Encoding");if(!r.compress||r.method==="HEAD"||k===null||y.statusCode===204||y.statusCode===304){f=new Sr(E,b),n(f);return}let N={flush:Ei.default.Z_SYNC_FLUSH,finishFlush:Ei.default.Z_SYNC_FLUSH};if(k==="gzip"||k==="x-gzip"){E=(0,Tr.pipeline)(E,Ei.default.createGunzip(N),Z=>{Z&&o(Z)}),f=new Sr(E,b),n(f);return}if(k==="deflate"||k==="x-deflate"){let Z=(0,Tr.pipeline)(y,new Tr.PassThrough,H=>{H&&o(H)});Z.once("data",H=>{(H[0]&15)===8?E=(0,Tr.pipeline)(E,Ei.default.createInflate(),K=>{K&&o(K)}):E=(0,Tr.pipeline)(E,Ei.default.createInflateRaw(),K=>{K&&o(K)}),f=new Sr(E,b),n(f)}),Z.once("end",()=>{f||(f=new Sr(E,b),n(f))});return}if(k==="br"){E=(0,Tr.pipeline)(E,Ei.default.createBrotliDecompress(),Z=>{Z&&o(Z)}),f=new Sr(E,b),n(f);return}f=new Sr(E,b),n(f)}),fO(m,r).catch(o)})}function a6(e,t){let n=Tu.Buffer.from(`0\r
|
|
26
26
|
\r
|
|
27
|
-
`),
|
|
28
|
-
Content-Type: ${
|
|
27
|
+
`),o=!1,r=!1,i;e.on("response",s=>{let{headers:u}=s;o=u["transfer-encoding"]==="chunked"&&!u["content-length"]}),e.on("socket",s=>{let u=a(()=>{if(o&&!r){let f=new Error("Premature close");f.code="ERR_STREAM_PREMATURE_CLOSE",t(f)}},"onSocketClose"),d=a(f=>{r=Tu.Buffer.compare(f.slice(-5),n)===0,!r&&i&&(r=Tu.Buffer.compare(i.slice(-3),n.slice(0,3))===0&&Tu.Buffer.compare(f.slice(-2),n.slice(3))===0),i=f},"onData");s.prependListener("close",u),s.on("data",d),e.on("close",()=>{s.removeListener("close",u),s.removeListener("data",d)})})}var CO,OO,Ei,Tr,Tu,i6,$O=$t(()=>{CO=Ke(require("node:http"),1),OO=Ke(require("node:https"),1),Ei=Ke(require("node:zlib"),1),Tr=Ke(require("node:stream"),1),Tu=require("node:buffer");F0();Zf();hO();Kf();IO();eE();RO();cE();Lf();Bf();uE();nE();i6=new Set(["data:","http:","https:"]);a(lE,"fetch");a(a6,"fixResponseChunkedTransferBadEnding")});var zO=z(La=>{"use strict";var s6=La&&La.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ma;Object.defineProperty(La,"__esModule",{value:!0});La.Gaxios=void 0;var c6=s6(fu()),u6=require("https"),Si=jb(),l6=m0(),DO=require("stream"),NO=qb(),d6=a(async()=>globalThis.crypto?.randomUUID()||(await import("crypto")).randomUUID(),"randomUUID"),p6=204,Jf=class{static{a(this,"Gaxios")}agentCache=new Map;defaults;interceptors;constructor(t){this.defaults=t||{},this.interceptors={request:new NO.GaxiosInterceptorManager,response:new NO.GaxiosInterceptorManager}}fetch(...t){let n=t[0],o=t[1],r,i=new Headers;return typeof n=="string"?r=new URL(n):n instanceof URL?r=n:n&&n.url&&(r=new URL(n.url)),n&&typeof n=="object"&&"headers"in n&&Ma.mergeHeaders(i,n.headers),o&&Ma.mergeHeaders(i,new Headers(o.headers)),typeof n=="object"&&!(n instanceof URL)?this.request({...o,...n,headers:i,url:r}):this.request({...o,headers:i,url:r})}async request(t={}){let n=await this.#n(t);return n=await this.#t(n),this.#r(this._request(n))}async _defaultAdapter(t){let n=t.fetchImplementation||this.defaults.fetchImplementation||await Ma.#c(),o={...t};delete o.data;let r=await n(t.url,o),i=await this.getResponseData(t,r);return Object.getOwnPropertyDescriptor(r,"data")?.configurable||Object.defineProperties(r,{data:{configurable:!0,writable:!0,enumerable:!0,value:i}}),Object.assign(r,{config:t,data:i})}async _request(t){try{let n;if(t.adapter?n=await t.adapter(t,this._defaultAdapter.bind(this)):n=await this._defaultAdapter(t),!t.validateStatus(n.status)){if(t.responseType==="stream"){let r=[];for await(let i of n.data)r.push(i);n.data=r.toString()}let o=Si.GaxiosError.extractAPIErrorFromResponse(n,`Request failed with status code ${n.status}`);throw new Si.GaxiosError(o?.message,t,n,o)}return n}catch(n){let o;n instanceof Si.GaxiosError?o=n:n instanceof Error?o=new Si.GaxiosError(n.message,t,void 0,n):o=new Si.GaxiosError("Unexpected Gaxios Error",t,void 0,n);let{shouldRetry:r,config:i}=await(0,l6.getRetryConfig)(o);if(r&&i)return o.config.retryConfig.currentRetryAttempt=i.retryConfig.currentRetryAttempt,t.retryConfig=o.config?.retryConfig,this.#o(t),this._request(t);throw t.errorRedactor&&t.errorRedactor(o),o}}async getResponseData(t,n){if(n.status===p6)return"";if(t.maxContentLength&&n.headers.has("content-length")&&t.maxContentLength<Number.parseInt(n.headers?.get("content-length")||""))throw new Si.GaxiosError("Response's `Content-Length` is over the limit.",t,Object.assign(n,{config:t}));switch(t.responseType){case"stream":return n.body;case"json":{let o=await n.text();try{return JSON.parse(o)}catch{return o}}case"arraybuffer":return n.arrayBuffer();case"blob":return n.blob();case"text":return n.text();default:return this.getResponseDataFromContentType(n)}}#e(t,n=[]){let o=new URL(t),r=[...n],i=(process.env.NO_PROXY??process.env.no_proxy)?.split(",")||[];for(let s of i)r.push(s.trim());for(let s of r)if(s instanceof RegExp){if(s.test(o.toString()))return!1}else if(s instanceof URL){if(s.origin===o.origin)return!1}else if(s.startsWith("*.")||s.startsWith(".")){let u=s.replace(/^\*\./,".");if(o.hostname.endsWith(u))return!1}else if(s===o.origin||s===o.hostname||s===o.href)return!1;return!0}async#t(t){let n=Promise.resolve(t);for(let o of this.interceptors.request.values())o&&(n=n.then(o.resolved,o.rejected));return n}async#r(t){let n=Promise.resolve(t);for(let o of this.interceptors.response.values())o&&(n=n.then(o.resolved,o.rejected));return n}async#n(t){let n=new Headers(this.defaults.headers);Ma.mergeHeaders(n,t.headers);let o=(0,c6.default)(!0,{},this.defaults,t);if(!o.url)throw new Error("URL is required.");if(o.baseURL&&(o.url=new URL(o.url,o.baseURL)),o.url=new URL(o.url),o.params)if(o.paramsSerializer){let s=o.paramsSerializer(o.params);s.startsWith("?")&&(s=s.slice(1));let u=o.url.toString().includes("?")?"&":"?";o.url=o.url+u+s}else{let s=o.url instanceof URL?o.url:new URL(o.url);for(let[u,d]of new URLSearchParams(o.params))s.searchParams.append(u,d);o.url=s}typeof t.maxContentLength=="number"&&(o.size=t.maxContentLength),typeof t.maxRedirects=="number"&&(o.follow=t.maxRedirects);let r=typeof o.data=="string"||o.data instanceof ArrayBuffer||o.data instanceof Blob||globalThis.File&&o.data instanceof File||o.data instanceof FormData||o.data instanceof DO.Readable||o.data instanceof ReadableStream||o.data instanceof String||o.data instanceof URLSearchParams||ArrayBuffer.isView(o.data)||["Blob","File","FormData"].includes(o.data?.constructor?.name||"");if(o.multipart?.length){let s=await d6();n.set("content-type",`multipart/related; boundary=${s}`),o.body=DO.Readable.from(this.getMultipartRequest(o.multipart,s))}else r?o.body=o.data:typeof o.data=="object"?n.get("Content-Type")==="application/x-www-form-urlencoded"?o.body=o.paramsSerializer?o.paramsSerializer(o.data):new URLSearchParams(o.data):(n.has("content-type")||n.set("content-type","application/json"),o.body=JSON.stringify(o.data)):o.data&&(o.body=o.data);o.validateStatus=o.validateStatus||this.validateStatus,o.responseType=o.responseType||"unknown",!n.has("accept")&&o.responseType==="json"&&n.set("accept","application/json");let i=o.proxy||process?.env?.HTTPS_PROXY||process?.env?.https_proxy||process?.env?.HTTP_PROXY||process?.env?.http_proxy;if(!o.agent)if(i&&this.#e(o.url,o.noProxy)){let s=await Ma.#s();this.agentCache.has(i)?o.agent=this.agentCache.get(i):(o.agent=new s(i,{cert:o.cert,key:o.key}),this.agentCache.set(i,o.agent))}else o.cert&&o.key&&(this.agentCache.has(o.key)?o.agent=this.agentCache.get(o.key):(o.agent=new u6.Agent({cert:o.cert,key:o.key}),this.agentCache.set(o.key,o.agent)));return typeof o.errorRedactor!="function"&&o.errorRedactor!==!1&&(o.errorRedactor=Si.defaultErrorRedactor),o.body&&!("duplex"in o)&&(o.duplex="half"),this.#o(o),Object.assign(o,{headers:n,url:o.url instanceof URL?o.url:new URL(o.url)})}#o(t){if(t.timeout){let n=AbortSignal.timeout(t.timeout);t.signal&&!t.signal.aborted?t.signal=AbortSignal.any([t.signal,n]):t.signal=n}}validateStatus(t){return t>=200&&t<300}async getResponseDataFromContentType(t){let n=t.headers.get("Content-Type");if(n===null)return t.text();if(n=n.toLowerCase(),n.includes("application/json")){let o=await t.text();try{o=JSON.parse(o)}catch{}return o}else return n.match(/^text\//)?t.text():t.blob()}async*getMultipartRequest(t,n){let o=`--${n}--`;for(let r of t){let i=r.headers.get("Content-Type")||"application/octet-stream";yield`--${n}\r
|
|
28
|
+
Content-Type: ${i}\r
|
|
29
29
|
\r
|
|
30
|
-
`,typeof
|
|
31
|
-
`}yield n}static#i;static#a;static async#s(){return this.#i||=(await Promise.resolve().then(()=>qe(IE()))).HttpsProxyAgent,this.#i}static async#u(){let e=typeof window<"u"&&!!window;return this.#a||=e?window.fetch:(await Promise.resolve().then(()=>(SS(),ES))).default,this.#a}static mergeHeaders(e,...r){e=e instanceof Headers?e:new Headers(e);for(let n of r)(n instanceof Headers?n:new Headers(n)).forEach((s,c)=>{c==="set-cookie"?e.append(c,s):e.set(c,s)});return e}};ui.Gaxios=ku;si=ku});var ht=D(Ut=>{"use strict";var Z$=Ut&&Ut.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),K$=Ut&&Ut.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Z$(e,t,r)};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.instance=Ut.Gaxios=Ut.GaxiosError=void 0;Ut.request=Y$;var xS=PS();Object.defineProperty(Ut,"Gaxios",{enumerable:!0,get:o(function(){return xS.Gaxios},"get")});var J$=Ld();Object.defineProperty(Ut,"GaxiosError",{enumerable:!0,get:o(function(){return J$.GaxiosError},"get")});K$(qd(),Ut);Ut.instance=new xS.Gaxios;async function Y$(t){return Ut.instance.request(t)}o(Y$,"request")});var lp=D((AS,$u)=>{(function(t){"use strict";var e,r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,n=Math.ceil,i=Math.floor,s="[BigNumber Error] ",c=s+"Number primitive has more than 15 significant digits: ",d=1e14,p=14,m=9007199254740991,y=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],h=1e7,f=1e9;function l(Z){var H,K,te,Q=ee.prototype={constructor:ee,toString:null,valueOf:null},xe=new ee(1),re=20,V=4,B=-7,X=21,Y=-1e7,ie=1e7,ue=!1,Ce=1,De=0,Ke={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},et="0123456789abcdefghijklmnopqrstuvwxyz",wt=!0;function ee(S,P){var x,z,R,$,j,I,O,M,N=this;if(!(N instanceof ee))return new ee(S,P);if(P==null){if(S&&S._isBigNumber===!0){N.s=S.s,!S.c||S.e>ie?N.c=N.e=null:S.e<Y?N.c=[N.e=0]:(N.e=S.e,N.c=S.c.slice());return}if((I=typeof S=="number")&&S*0==0){if(N.s=1/S<0?(S=-S,-1):1,S===~~S){for($=0,j=S;j>=10;j/=10,$++);$>ie?N.c=N.e=null:(N.e=$,N.c=[S]);return}M=String(S)}else{if(!r.test(M=String(S)))return te(N,M,I);N.s=M.charCodeAt(0)==45?(M=M.slice(1),-1):1}($=M.indexOf("."))>-1&&(M=M.replace(".","")),(j=M.search(/e/i))>0?($<0&&($=j),$+=+M.slice(j+1),M=M.substring(0,j)):$<0&&($=M.length)}else{if(b(P,2,et.length,"Base"),P==10&&wt)return N=new ee(S),We(N,re+N.e+1,V);if(M=String(S),I=typeof S=="number"){if(S*0!=0)return te(N,M,I,P);if(N.s=1/S<0?(M=M.slice(1),-1):1,ee.DEBUG&&M.replace(/^0\.0*|\./,"").length>15)throw Error(c+S)}else N.s=M.charCodeAt(0)===45?(M=M.slice(1),-1):1;for(x=et.slice(0,P),$=j=0,O=M.length;j<O;j++)if(x.indexOf(z=M.charAt(j))<0){if(z=="."){if(j>$){$=O;continue}}else if(!R&&(M==M.toUpperCase()&&(M=M.toLowerCase())||M==M.toLowerCase()&&(M=M.toUpperCase()))){R=!0,j=-1,$=0;continue}return te(N,String(S),I,P)}I=!1,M=K(M,P,10,N.s),($=M.indexOf("."))>-1?M=M.replace(".",""):$=M.length}for(j=0;M.charCodeAt(j)===48;j++);for(O=M.length;M.charCodeAt(--O)===48;);if(M=M.slice(j,++O)){if(O-=j,I&&ee.DEBUG&&O>15&&(S>m||S!==i(S)))throw Error(c+N.s*S);if(($=$-j-1)>ie)N.c=N.e=null;else if($<Y)N.c=[N.e=0];else{if(N.e=$,N.c=[],j=($+1)%p,$<0&&(j+=p),j<O){for(j&&N.c.push(+M.slice(0,j)),O-=p;j<O;)N.c.push(+M.slice(j,j+=p));j=p-(M=M.slice(j)).length}else j-=O;for(;j--;M+="0");N.c.push(+M)}}else N.c=[N.e=0]}o(ee,"BigNumber"),ee.clone=l,ee.ROUND_UP=0,ee.ROUND_DOWN=1,ee.ROUND_CEIL=2,ee.ROUND_FLOOR=3,ee.ROUND_HALF_UP=4,ee.ROUND_HALF_DOWN=5,ee.ROUND_HALF_EVEN=6,ee.ROUND_HALF_CEIL=7,ee.ROUND_HALF_FLOOR=8,ee.EUCLID=9,ee.config=ee.set=function(S){var P,x;if(S!=null)if(typeof S=="object"){if(S.hasOwnProperty(P="DECIMAL_PLACES")&&(x=S[P],b(x,0,f,P),re=x),S.hasOwnProperty(P="ROUNDING_MODE")&&(x=S[P],b(x,0,8,P),V=x),S.hasOwnProperty(P="EXPONENTIAL_AT")&&(x=S[P],x&&x.pop?(b(x[0],-f,0,P),b(x[1],0,f,P),B=x[0],X=x[1]):(b(x,-f,f,P),B=-(X=x<0?-x:x))),S.hasOwnProperty(P="RANGE"))if(x=S[P],x&&x.pop)b(x[0],-f,-1,P),b(x[1],1,f,P),Y=x[0],ie=x[1];else if(b(x,-f,f,P),x)Y=-(ie=x<0?-x:x);else throw Error(s+P+" cannot be zero: "+x);if(S.hasOwnProperty(P="CRYPTO"))if(x=S[P],x===!!x)if(x)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))ue=x;else throw ue=!x,Error(s+"crypto unavailable");else ue=x;else throw Error(s+P+" not true or false: "+x);if(S.hasOwnProperty(P="MODULO_MODE")&&(x=S[P],b(x,0,9,P),Ce=x),S.hasOwnProperty(P="POW_PRECISION")&&(x=S[P],b(x,0,f,P),De=x),S.hasOwnProperty(P="FORMAT"))if(x=S[P],typeof x=="object")Ke=x;else throw Error(s+P+" not an object: "+x);if(S.hasOwnProperty(P="ALPHABET"))if(x=S[P],typeof x=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(x))wt=x.slice(0,10)=="0123456789",et=x;else throw Error(s+P+" invalid: "+x)}else throw Error(s+"Object expected: "+S);return{DECIMAL_PLACES:re,ROUNDING_MODE:V,EXPONENTIAL_AT:[B,X],RANGE:[Y,ie],CRYPTO:ue,MODULO_MODE:Ce,POW_PRECISION:De,FORMAT:Ke,ALPHABET:et}},ee.isBigNumber=function(S){if(!S||S._isBigNumber!==!0)return!1;if(!ee.DEBUG)return!0;var P,x,z=S.c,R=S.e,$=S.s;e:if({}.toString.call(z)=="[object Array]"){if(($===1||$===-1)&&R>=-f&&R<=f&&R===i(R)){if(z[0]===0){if(R===0&&z.length===1)return!0;break e}if(P=(R+1)%p,P<1&&(P+=p),String(z[0]).length==P){for(P=0;P<z.length;P++)if(x=z[P],x<0||x>=d||x!==i(x))break e;if(x!==0)return!0}}}else if(z===null&&R===null&&($===null||$===1||$===-1))return!0;throw Error(s+"Invalid BigNumber: "+S)},ee.maximum=ee.max=function(){return mt(arguments,-1)},ee.minimum=ee.min=function(){return mt(arguments,1)},ee.random=(function(){var S=9007199254740992,P=Math.random()*S&2097151?function(){return i(Math.random()*S)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(x){var z,R,$,j,I,O=0,M=[],N=new ee(xe);if(x==null?x=re:b(x,0,f),j=n(x/p),ue)if(crypto.getRandomValues){for(z=crypto.getRandomValues(new Uint32Array(j*=2));O<j;)I=z[O]*131072+(z[O+1]>>>11),I>=9e15?(R=crypto.getRandomValues(new Uint32Array(2)),z[O]=R[0],z[O+1]=R[1]):(M.push(I%1e14),O+=2);O=j/2}else if(crypto.randomBytes){for(z=crypto.randomBytes(j*=7);O<j;)I=(z[O]&31)*281474976710656+z[O+1]*1099511627776+z[O+2]*4294967296+z[O+3]*16777216+(z[O+4]<<16)+(z[O+5]<<8)+z[O+6],I>=9e15?crypto.randomBytes(7).copy(z,O):(M.push(I%1e14),O+=7);O=j/7}else throw ue=!1,Error(s+"crypto unavailable");if(!ue)for(;O<j;)I=P(),I<9e15&&(M[O++]=I%1e14);for(j=M[--O],x%=p,j&&x&&(I=y[p-x],M[O]=i(j/I)*I);M[O]===0;M.pop(),O--);if(O<0)M=[$=0];else{for($=-1;M[0]===0;M.splice(0,1),$-=p);for(O=1,I=M[0];I>=10;I/=10,O++);O<p&&($-=p-O)}return N.e=$,N.c=M,N}})(),ee.sum=function(){for(var S=1,P=arguments,x=new ee(P[0]);S<P.length;)x=x.plus(P[S++]);return x},K=(function(){var S="0123456789";function P(x,z,R,$){for(var j,I=[0],O,M=0,N=x.length;M<N;){for(O=I.length;O--;I[O]*=z);for(I[0]+=$.indexOf(x.charAt(M++)),j=0;j<I.length;j++)I[j]>R-1&&(I[j+1]==null&&(I[j+1]=0),I[j+1]+=I[j]/R|0,I[j]%=R)}return I.reverse()}return o(P,"toBaseOut"),function(x,z,R,$,j){var I,O,M,N,G,ce,pe,Fe,it=x.indexOf("."),at=re,je=V;for(it>=0&&(N=De,De=0,x=x.replace(".",""),Fe=new ee(z),ce=Fe.pow(x.length-it),De=N,Fe.c=P(J(v(ce.c),ce.e,"0"),10,R,S),Fe.e=Fe.c.length),pe=P(x,z,R,j?(I=et,S):(I=S,et)),M=N=pe.length;pe[--N]==0;pe.pop());if(!pe[0])return I.charAt(0);if(it<0?--M:(ce.c=pe,ce.e=M,ce.s=$,ce=H(ce,Fe,at,je,R),pe=ce.c,G=ce.r,M=ce.e),O=M+at+1,it=pe[O],N=R/2,G=G||O<0||pe[O+1]!=null,G=je<4?(it!=null||G)&&(je==0||je==(ce.s<0?3:2)):it>N||it==N&&(je==4||G||je==6&&pe[O-1]&1||je==(ce.s<0?8:7)),O<1||!pe[0])x=G?J(I.charAt(1),-at,I.charAt(0)):I.charAt(0);else{if(pe.length=O,G)for(--R;++pe[--O]>R;)pe[O]=0,O||(++M,pe=[1].concat(pe));for(N=pe.length;!pe[--N];);for(it=0,x="";it<=N;x+=I.charAt(pe[it++]));x=J(x,M,I.charAt(0))}return x}})(),H=(function(){function S(z,R,$){var j,I,O,M,N=0,G=z.length,ce=R%h,pe=R/h|0;for(z=z.slice();G--;)O=z[G]%h,M=z[G]/h|0,j=pe*O+M*ce,I=ce*O+j%h*h+N,N=(I/$|0)+(j/h|0)+pe*M,z[G]=I%$;return N&&(z=[N].concat(z)),z}o(S,"multiply");function P(z,R,$,j){var I,O;if($!=j)O=$>j?1:-1;else for(I=O=0;I<$;I++)if(z[I]!=R[I]){O=z[I]>R[I]?1:-1;break}return O}o(P,"compare");function x(z,R,$,j){for(var I=0;$--;)z[$]-=I,I=z[$]<R[$]?1:0,z[$]=I*j+z[$]-R[$];for(;!z[0]&&z.length>1;z.splice(0,1));}return o(x,"subtract"),function(z,R,$,j,I){var O,M,N,G,ce,pe,Fe,it,at,je,He,bt,Io,Ro,Co,Wt,rn,Rt=z.s==R.s?1:-1,Et=z.c,Xe=R.c;if(!Et||!Et[0]||!Xe||!Xe[0])return new ee(!z.s||!R.s||(Et?Xe&&Et[0]==Xe[0]:!Xe)?NaN:Et&&Et[0]==0||!Xe?Rt*0:Rt/0);for(it=new ee(Rt),at=it.c=[],M=z.e-R.e,Rt=$+M+1,I||(I=d,M=g(z.e/p)-g(R.e/p),Rt=Rt/p|0),N=0;Xe[N]==(Et[N]||0);N++);if(Xe[N]>(Et[N]||0)&&M--,Rt<0)at.push(1),G=!0;else{for(Ro=Et.length,Wt=Xe.length,N=0,Rt+=2,ce=i(I/(Xe[0]+1)),ce>1&&(Xe=S(Xe,ce,I),Et=S(Et,ce,I),Wt=Xe.length,Ro=Et.length),Io=Wt,je=Et.slice(0,Wt),He=je.length;He<Wt;je[He++]=0);rn=Xe.slice(),rn=[0].concat(rn),Co=Xe[0],Xe[1]>=I/2&&Co++;do{if(ce=0,O=P(Xe,je,Wt,He),O<0){if(bt=je[0],Wt!=He&&(bt=bt*I+(je[1]||0)),ce=i(bt/Co),ce>1)for(ce>=I&&(ce=I-1),pe=S(Xe,ce,I),Fe=pe.length,He=je.length;P(pe,je,Fe,He)==1;)ce--,x(pe,Wt<Fe?rn:Xe,Fe,I),Fe=pe.length,O=1;else ce==0&&(O=ce=1),pe=Xe.slice(),Fe=pe.length;if(Fe<He&&(pe=[0].concat(pe)),x(je,pe,He,I),He=je.length,O==-1)for(;P(Xe,je,Wt,He)<1;)ce++,x(je,Wt<He?rn:Xe,He,I),He=je.length}else O===0&&(ce++,je=[0]);at[N++]=ce,je[0]?je[He++]=Et[Io]||0:(je=[Et[Io]],He=1)}while((Io++<Ro||je[0]!=null)&&Rt--);G=je[0]!=null,at[0]||at.splice(0,1)}if(I==d){for(N=1,Rt=at[0];Rt>=10;Rt/=10,N++);We(it,$+(it.e=N+M*p-1)+1,j,G)}else it.e=M,it.r=+G;return it}})();function lt(S,P,x,z){var R,$,j,I,O;if(x==null?x=V:b(x,0,8),!S.c)return S.toString();if(R=S.c[0],j=S.e,P==null)O=v(S.c),O=z==1||z==2&&(j<=B||j>=X)?U(O,j):J(O,j,"0");else if(S=We(new ee(S),P,x),$=S.e,O=v(S.c),I=O.length,z==1||z==2&&(P<=$||$<=B)){for(;I<P;O+="0",I++);O=U(O,$)}else if(P-=j+(z===2&&$>j),O=J(O,$,"0"),$+1>I){if(--P>0)for(O+=".";P--;O+="0");}else if(P+=$-I,P>0)for($+1==I&&(O+=".");P--;O+="0");return S.s<0&&R?"-"+O:O}o(lt,"format");function mt(S,P){for(var x,z,R=1,$=new ee(S[0]);R<S.length;R++)z=new ee(S[R]),(!z.s||(x=E($,z))===P||x===0&&$.s===P)&&($=z);return $}o(mt,"maxOrMin");function Ht(S,P,x){for(var z=1,R=P.length;!P[--R];P.pop());for(R=P[0];R>=10;R/=10,z++);return(x=z+x*p-1)>ie?S.c=S.e=null:x<Y?S.c=[S.e=0]:(S.e=x,S.c=P),S}o(Ht,"normalise"),te=(function(){var S=/^(-?)0([xbo])(?=\w[\w.]*$)/i,P=/^([^.]+)\.$/,x=/^\.([^.]+)$/,z=/^-?(Infinity|NaN)$/,R=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function($,j,I,O){var M,N=I?j:j.replace(R,"");if(z.test(N))$.s=isNaN(N)?null:N<0?-1:1;else{if(!I&&(N=N.replace(S,function(G,ce,pe){return M=(pe=pe.toLowerCase())=="x"?16:pe=="b"?2:8,!O||O==M?ce:G}),O&&(M=O,N=N.replace(P,"$1").replace(x,"0.$1")),j!=N))return new ee(N,M);if(ee.DEBUG)throw Error(s+"Not a"+(O?" base "+O:"")+" number: "+j);$.s=null}$.c=$.e=null}})();function We(S,P,x,z){var R,$,j,I,O,M,N,G=S.c,ce=y;if(G){e:{for(R=1,I=G[0];I>=10;I/=10,R++);if($=P-R,$<0)$+=p,j=P,O=G[M=0],N=i(O/ce[R-j-1]%10);else if(M=n(($+1)/p),M>=G.length)if(z){for(;G.length<=M;G.push(0));O=N=0,R=1,$%=p,j=$-p+1}else break e;else{for(O=I=G[M],R=1;I>=10;I/=10,R++);$%=p,j=$-p+R,N=j<0?0:i(O/ce[R-j-1]%10)}if(z=z||P<0||G[M+1]!=null||(j<0?O:O%ce[R-j-1]),z=x<4?(N||z)&&(x==0||x==(S.s<0?3:2)):N>5||N==5&&(x==4||z||x==6&&($>0?j>0?O/ce[R-j]:0:G[M-1])%10&1||x==(S.s<0?8:7)),P<1||!G[0])return G.length=0,z?(P-=S.e+1,G[0]=ce[(p-P%p)%p],S.e=-P||0):G[0]=S.e=0,S;if($==0?(G.length=M,I=1,M--):(G.length=M+1,I=ce[p-$],G[M]=j>0?i(O/ce[R-j]%ce[j])*I:0),z)for(;;)if(M==0){for($=1,j=G[0];j>=10;j/=10,$++);for(j=G[0]+=I,I=1;j>=10;j/=10,I++);$!=I&&(S.e++,G[0]==d&&(G[0]=1));break}else{if(G[M]+=I,G[M]!=d)break;G[M--]=0,I=1}for($=G.length;G[--$]===0;G.pop());}S.e>ie?S.c=S.e=null:S.e<Y&&(S.c=[S.e=0])}return S}o(We,"round");function Ye(S){var P,x=S.e;return x===null?S.toString():(P=v(S.c),P=x<=B||x>=X?U(P,x):J(P,x,"0"),S.s<0?"-"+P:P)}return o(Ye,"valueOf"),Q.absoluteValue=Q.abs=function(){var S=new ee(this);return S.s<0&&(S.s=1),S},Q.comparedTo=function(S,P){return E(this,new ee(S,P))},Q.decimalPlaces=Q.dp=function(S,P){var x,z,R,$=this;if(S!=null)return b(S,0,f),P==null?P=V:b(P,0,8),We(new ee($),S+$.e+1,P);if(!(x=$.c))return null;if(z=((R=x.length-1)-g(this.e/p))*p,R=x[R])for(;R%10==0;R/=10,z--);return z<0&&(z=0),z},Q.dividedBy=Q.div=function(S,P){return H(this,new ee(S,P),re,V)},Q.dividedToIntegerBy=Q.idiv=function(S,P){return H(this,new ee(S,P),0,1)},Q.exponentiatedBy=Q.pow=function(S,P){var x,z,R,$,j,I,O,M,N,G=this;if(S=new ee(S),S.c&&!S.isInteger())throw Error(s+"Exponent not an integer: "+Ye(S));if(P!=null&&(P=new ee(P)),I=S.e>14,!G.c||!G.c[0]||G.c[0]==1&&!G.e&&G.c.length==1||!S.c||!S.c[0])return N=new ee(Math.pow(+Ye(G),I?S.s*(2-C(S)):+Ye(S))),P?N.mod(P):N;if(O=S.s<0,P){if(P.c?!P.c[0]:!P.s)return new ee(NaN);z=!O&&G.isInteger()&&P.isInteger(),z&&(G=G.mod(P))}else{if(S.e>9&&(G.e>0||G.e<-1||(G.e==0?G.c[0]>1||I&&G.c[1]>=24e7:G.c[0]<8e13||I&&G.c[0]<=9999975e7)))return $=G.s<0&&C(S)?-0:0,G.e>-1&&($=1/$),new ee(O?1/$:$);De&&($=n(De/p+2))}for(I?(x=new ee(.5),O&&(S.s=1),M=C(S)):(R=Math.abs(+Ye(S)),M=R%2),N=new ee(xe);;){if(M){if(N=N.times(G),!N.c)break;$?N.c.length>$&&(N.c.length=$):z&&(N=N.mod(P))}if(R){if(R=i(R/2),R===0)break;M=R%2}else if(S=S.times(x),We(S,S.e+1,1),S.e>14)M=C(S);else{if(R=+Ye(S),R===0)break;M=R%2}G=G.times(G),$?G.c&&G.c.length>$&&(G.c.length=$):z&&(G=G.mod(P))}return z?N:(O&&(N=xe.div(N)),P?N.mod(P):$?We(N,De,V,j):N)},Q.integerValue=function(S){var P=new ee(this);return S==null?S=V:b(S,0,8),We(P,P.e+1,S)},Q.isEqualTo=Q.eq=function(S,P){return E(this,new ee(S,P))===0},Q.isFinite=function(){return!!this.c},Q.isGreaterThan=Q.gt=function(S,P){return E(this,new ee(S,P))>0},Q.isGreaterThanOrEqualTo=Q.gte=function(S,P){return(P=E(this,new ee(S,P)))===1||P===0},Q.isInteger=function(){return!!this.c&&g(this.e/p)>this.c.length-2},Q.isLessThan=Q.lt=function(S,P){return E(this,new ee(S,P))<0},Q.isLessThanOrEqualTo=Q.lte=function(S,P){return(P=E(this,new ee(S,P)))===-1||P===0},Q.isNaN=function(){return!this.s},Q.isNegative=function(){return this.s<0},Q.isPositive=function(){return this.s>0},Q.isZero=function(){return!!this.c&&this.c[0]==0},Q.minus=function(S,P){var x,z,R,$,j=this,I=j.s;if(S=new ee(S,P),P=S.s,!I||!P)return new ee(NaN);if(I!=P)return S.s=-P,j.plus(S);var O=j.e/p,M=S.e/p,N=j.c,G=S.c;if(!O||!M){if(!N||!G)return N?(S.s=-P,S):new ee(G?j:NaN);if(!N[0]||!G[0])return G[0]?(S.s=-P,S):new ee(N[0]?j:V==3?-0:0)}if(O=g(O),M=g(M),N=N.slice(),I=O-M){for(($=I<0)?(I=-I,R=N):(M=O,R=G),R.reverse(),P=I;P--;R.push(0));R.reverse()}else for(z=($=(I=N.length)<(P=G.length))?I:P,I=P=0;P<z;P++)if(N[P]!=G[P]){$=N[P]<G[P];break}if($&&(R=N,N=G,G=R,S.s=-S.s),P=(z=G.length)-(x=N.length),P>0)for(;P--;N[x++]=0);for(P=d-1;z>I;){if(N[--z]<G[z]){for(x=z;x&&!N[--x];N[x]=P);--N[x],N[z]+=d}N[z]-=G[z]}for(;N[0]==0;N.splice(0,1),--M);return N[0]?Ht(S,N,M):(S.s=V==3?-1:1,S.c=[S.e=0],S)},Q.modulo=Q.mod=function(S,P){var x,z,R=this;return S=new ee(S,P),!R.c||!S.s||S.c&&!S.c[0]?new ee(NaN):!S.c||R.c&&!R.c[0]?new ee(R):(Ce==9?(z=S.s,S.s=1,x=H(R,S,0,3),S.s=z,x.s*=z):x=H(R,S,0,Ce),S=R.minus(x.times(S)),!S.c[0]&&Ce==1&&(S.s=R.s),S)},Q.multipliedBy=Q.times=function(S,P){var x,z,R,$,j,I,O,M,N,G,ce,pe,Fe,it,at,je=this,He=je.c,bt=(S=new ee(S,P)).c;if(!He||!bt||!He[0]||!bt[0])return!je.s||!S.s||He&&!He[0]&&!bt||bt&&!bt[0]&&!He?S.c=S.e=S.s=null:(S.s*=je.s,!He||!bt?S.c=S.e=null:(S.c=[0],S.e=0)),S;for(z=g(je.e/p)+g(S.e/p),S.s*=je.s,O=He.length,G=bt.length,O<G&&(Fe=He,He=bt,bt=Fe,R=O,O=G,G=R),R=O+G,Fe=[];R--;Fe.push(0));for(it=d,at=h,R=G;--R>=0;){for(x=0,ce=bt[R]%at,pe=bt[R]/at|0,j=O,$=R+j;$>R;)M=He[--j]%at,N=He[j]/at|0,I=pe*M+N*ce,M=ce*M+I%at*at+Fe[$]+x,x=(M/it|0)+(I/at|0)+pe*N,Fe[$--]=M%it;Fe[$]=x}return x?++z:Fe.splice(0,1),Ht(S,Fe,z)},Q.negated=function(){var S=new ee(this);return S.s=-S.s||null,S},Q.plus=function(S,P){var x,z=this,R=z.s;if(S=new ee(S,P),P=S.s,!R||!P)return new ee(NaN);if(R!=P)return S.s=-P,z.minus(S);var $=z.e/p,j=S.e/p,I=z.c,O=S.c;if(!$||!j){if(!I||!O)return new ee(R/0);if(!I[0]||!O[0])return O[0]?S:new ee(I[0]?z:R*0)}if($=g($),j=g(j),I=I.slice(),R=$-j){for(R>0?(j=$,x=O):(R=-R,x=I),x.reverse();R--;x.push(0));x.reverse()}for(R=I.length,P=O.length,R-P<0&&(x=O,O=I,I=x,P=R),R=0;P;)R=(I[--P]=I[P]+O[P]+R)/d|0,I[P]=d===I[P]?0:I[P]%d;return R&&(I=[R].concat(I),++j),Ht(S,I,j)},Q.precision=Q.sd=function(S,P){var x,z,R,$=this;if(S!=null&&S!==!!S)return b(S,1,f),P==null?P=V:b(P,0,8),We(new ee($),S,P);if(!(x=$.c))return null;if(R=x.length-1,z=R*p+1,R=x[R]){for(;R%10==0;R/=10,z--);for(R=x[0];R>=10;R/=10,z++);}return S&&$.e+1>z&&(z=$.e+1),z},Q.shiftedBy=function(S){return b(S,-m,m),this.times("1e"+S)},Q.squareRoot=Q.sqrt=function(){var S,P,x,z,R,$=this,j=$.c,I=$.s,O=$.e,M=re+4,N=new ee("0.5");if(I!==1||!j||!j[0])return new ee(!I||I<0&&(!j||j[0])?NaN:j?$:1/0);if(I=Math.sqrt(+Ye($)),I==0||I==1/0?(P=v(j),(P.length+O)%2==0&&(P+="0"),I=Math.sqrt(+P),O=g((O+1)/2)-(O<0||O%2),I==1/0?P="5e"+O:(P=I.toExponential(),P=P.slice(0,P.indexOf("e")+1)+O),x=new ee(P)):x=new ee(I+""),x.c[0]){for(O=x.e,I=O+M,I<3&&(I=0);;)if(R=x,x=N.times(R.plus(H($,R,M,1))),v(R.c).slice(0,I)===(P=v(x.c)).slice(0,I))if(x.e<O&&--I,P=P.slice(I-3,I+1),P=="9999"||!z&&P=="4999"){if(!z&&(We(R,R.e+re+2,0),R.times(R).eq($))){x=R;break}M+=4,I+=4,z=1}else{(!+P||!+P.slice(1)&&P.charAt(0)=="5")&&(We(x,x.e+re+2,1),S=!x.times(x).eq($));break}}return We(x,x.e+re+1,V,S)},Q.toExponential=function(S,P){return S!=null&&(b(S,0,f),S++),lt(this,S,P,1)},Q.toFixed=function(S,P){return S!=null&&(b(S,0,f),S=S+this.e+1),lt(this,S,P)},Q.toFormat=function(S,P,x){var z,R=this;if(x==null)S!=null&&P&&typeof P=="object"?(x=P,P=null):S&&typeof S=="object"?(x=S,S=P=null):x=Ke;else if(typeof x!="object")throw Error(s+"Argument not an object: "+x);if(z=R.toFixed(S,P),R.c){var $,j=z.split("."),I=+x.groupSize,O=+x.secondaryGroupSize,M=x.groupSeparator||"",N=j[0],G=j[1],ce=R.s<0,pe=ce?N.slice(1):N,Fe=pe.length;if(O&&($=I,I=O,O=$,Fe-=$),I>0&&Fe>0){for($=Fe%I||I,N=pe.substr(0,$);$<Fe;$+=I)N+=M+pe.substr($,I);O>0&&(N+=M+pe.slice($)),ce&&(N="-"+N)}z=G?N+(x.decimalSeparator||"")+((O=+x.fractionGroupSize)?G.replace(new RegExp("\\d{"+O+"}\\B","g"),"$&"+(x.fractionGroupSeparator||"")):G):N}return(x.prefix||"")+z+(x.suffix||"")},Q.toFraction=function(S){var P,x,z,R,$,j,I,O,M,N,G,ce,pe=this,Fe=pe.c;if(S!=null&&(I=new ee(S),!I.isInteger()&&(I.c||I.s!==1)||I.lt(xe)))throw Error(s+"Argument "+(I.isInteger()?"out of range: ":"not an integer: ")+Ye(I));if(!Fe)return new ee(pe);for(P=new ee(xe),M=x=new ee(xe),z=O=new ee(xe),ce=v(Fe),$=P.e=ce.length-pe.e-1,P.c[0]=y[(j=$%p)<0?p+j:j],S=!S||I.comparedTo(P)>0?$>0?P:M:I,j=ie,ie=1/0,I=new ee(ce),O.c[0]=0;N=H(I,P,0,1),R=x.plus(N.times(z)),R.comparedTo(S)!=1;)x=z,z=R,M=O.plus(N.times(R=M)),O=R,P=I.minus(N.times(R=P)),I=R;return R=H(S.minus(x),z,0,1),O=O.plus(R.times(M)),x=x.plus(R.times(z)),O.s=M.s=pe.s,$=$*2,G=H(M,z,$,V).minus(pe).abs().comparedTo(H(O,x,$,V).minus(pe).abs())<1?[M,z]:[O,x],ie=j,G},Q.toNumber=function(){return+Ye(this)},Q.toPrecision=function(S,P){return S!=null&&b(S,1,f),lt(this,S,P,2)},Q.toString=function(S){var P,x=this,z=x.s,R=x.e;return R===null?z?(P="Infinity",z<0&&(P="-"+P)):P="NaN":(S==null?P=R<=B||R>=X?U(v(x.c),R):J(v(x.c),R,"0"):S===10&&wt?(x=We(new ee(x),re+R+1,V),P=J(v(x.c),x.e,"0")):(b(S,2,et.length,"Base"),P=K(J(v(x.c),R,"0"),10,S,z,!0)),z<0&&x.c[0]&&(P="-"+P)),P},Q.valueOf=Q.toJSON=function(){return Ye(this)},Q._isBigNumber=!0,Z!=null&&ee.set(Z),ee}o(l,"clone");function g(Z){var H=Z|0;return Z>0||Z===H?H:H-1}o(g,"bitFloor");function v(Z){for(var H,K,te=1,Q=Z.length,xe=Z[0]+"";te<Q;){for(H=Z[te++]+"",K=p-H.length;K--;H="0"+H);xe+=H}for(Q=xe.length;xe.charCodeAt(--Q)===48;);return xe.slice(0,Q+1||1)}o(v,"coeffToString");function E(Z,H){var K,te,Q=Z.c,xe=H.c,re=Z.s,V=H.s,B=Z.e,X=H.e;if(!re||!V)return null;if(K=Q&&!Q[0],te=xe&&!xe[0],K||te)return K?te?0:-V:re;if(re!=V)return re;if(K=re<0,te=B==X,!Q||!xe)return te?0:!Q^K?1:-1;if(!te)return B>X^K?1:-1;for(V=(B=Q.length)<(X=xe.length)?B:X,re=0;re<V;re++)if(Q[re]!=xe[re])return Q[re]>xe[re]^K?1:-1;return B==X?0:B>X^K?1:-1}o(E,"compare");function b(Z,H,K,te){if(Z<H||Z>K||Z!==i(Z))throw Error(s+(te||"Argument")+(typeof Z=="number"?Z<H||Z>K?" out of range: ":" not an integer: ":" not a primitive number: ")+String(Z))}o(b,"intCheck");function C(Z){var H=Z.c.length-1;return g(Z.e/p)==H&&Z.c[H]%2!=0}o(C,"isOdd");function U(Z,H){return(Z.length>1?Z.charAt(0)+"."+Z.slice(1):Z)+(H<0?"e":"e+")+H}o(U,"toExponential");function J(Z,H,K){var te,Q;if(H<0){for(Q=K+".";++H;Q+=K);Z=Q+Z}else if(te=Z.length,++H>te){for(Q=K,H-=te;--H;Q+=K);Z+=Q}else H<te&&(Z=Z.slice(0,H)+"."+Z.slice(H));return Z}o(J,"toFixedPoint"),e=l(),e.default=e.BigNumber=e,typeof define=="function"&&define.amd?define(function(){return e}):typeof $u<"u"&&$u.exports?$u.exports=e:(t||(t=typeof self<"u"&&self?self:window),t.BigNumber=e)})(AS)});var OS=D((dX,CS)=>{var IS=lp(),RS=CS.exports;(function(){"use strict";function t(m){return m<10?"0"+m:m}o(t,"f");var e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,r=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n,i,s={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},c;function d(m){return r.lastIndex=0,r.test(m)?'"'+m.replace(r,function(y){var h=s[y];return typeof h=="string"?h:"\\u"+("0000"+y.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+m+'"'}o(d,"quote");function p(m,y){var h,f,l,g,v=n,E,b=y[m],C=b!=null&&(b instanceof IS||IS.isBigNumber(b));switch(b&&typeof b=="object"&&typeof b.toJSON=="function"&&(b=b.toJSON(m)),typeof c=="function"&&(b=c.call(y,m,b)),typeof b){case"string":return C?b:d(b);case"number":return isFinite(b)?String(b):"null";case"boolean":case"null":case"bigint":return String(b);case"object":if(!b)return"null";if(n+=i,E=[],Object.prototype.toString.apply(b)==="[object Array]"){for(g=b.length,h=0;h<g;h+=1)E[h]=p(h,b)||"null";return l=E.length===0?"[]":n?`[
|
|
32
|
-
`+
|
|
33
|
-
`+
|
|
34
|
-
`+v+"]":"["+E.join(",")+"]",
|
|
35
|
-
`+
|
|
36
|
-
`+
|
|
37
|
-
`+v+"}":"{"+E.join(",")+"}",
|
|
38
|
-
`,r:"\r",t:" "},s,c=o(function(v){throw{name:"SyntaxError",message:v,at:r,text:s}},"error"),d=o(function(v){return v&&v!==n&&c("Expected '"+v+"' instead of '"+n+"'"),n=s.charAt(r),r+=1,n},"next"),p=o(function(){var v,E="";for(n==="-"&&(E="-",d("-"));n>="0"&&n<="9";)E+=n,d();if(n===".")for(E+=".";d()&&n>="0"&&n<="9";)E+=n;if(n==="e"||n==="E")for(E+=n,d(),(n==="-"||n==="+")&&(E+=n,d());n>="0"&&n<="9";)E+=n,d();if(v=+E,!isFinite(v))c("Bad number");else return Du==null&&(Du=lp()),E.length>15?e.storeAsString?E:e.useNativeBigInt?BigInt(E):new Du(E):e.alwaysParseAsBig?e.useNativeBigInt?BigInt(v):new Du(v):v},"number"),m=o(function(){var v,E,b="",C;if(n==='"')for(var U=r;d();){if(n==='"')return r-1>U&&(b+=s.substring(U,r-1)),d(),b;if(n==="\\"){if(r-1>U&&(b+=s.substring(U,r-1)),d(),n==="u"){for(C=0,E=0;E<4&&(v=parseInt(d(),16),!!isFinite(v));E+=1)C=C*16+v;b+=String.fromCharCode(C)}else if(typeof i[n]=="string")b+=i[n];else break;U=r}}c("Bad string")},"string"),y=o(function(){for(;n&&n<=" ";)d()},"white"),h=o(function(){switch(n){case"t":return d("t"),d("r"),d("u"),d("e"),!0;case"f":return d("f"),d("a"),d("l"),d("s"),d("e"),!1;case"n":return d("n"),d("u"),d("l"),d("l"),null}c("Unexpected '"+n+"'")},"word"),f,l=o(function(){var v=[];if(n==="["){if(d("["),y(),n==="]")return d("]"),v;for(;n;){if(v.push(f()),y(),n==="]")return d("]"),v;d(","),y()}}c("Bad array")},"array"),g=o(function(){var v,E=Object.create(null);if(n==="{"){if(d("{"),y(),n==="}")return d("}"),E;for(;n;){if(v=m(),y(),d(":"),e.strict===!0&&Object.hasOwnProperty.call(E,v)&&c('Duplicate key "'+v+'"'),X$.test(v)===!0?e.protoAction==="error"?c("Object contains forbidden prototype property"):e.protoAction==="ignore"?f():E[v]=f():Q$.test(v)===!0?e.constructorAction==="error"?c("Object contains forbidden constructor property"):e.constructorAction==="ignore"?f():E[v]=f():E[v]=f(),y(),n==="}")return d("}"),E;d(","),y()}}c("Bad object")},"object");return f=o(function(){switch(y(),n){case"{":return g();case"[":return l();case'"':return m();case"-":return p();default:return n>="0"&&n<="9"?p():h()}},"value"),function(v,E){var b;return s=v+"",r=0,n=" ",b=f(),y(),n&&c("Syntax error"),typeof E=="function"?o((function C(U,J){var Z,H,K=U[J];return K&&typeof K=="object"&&Object.keys(K).forEach(function(te){H=C(K,te),H!==void 0?K[te]=H:delete K[te]}),E.call(U,J,K)}),"walk")({"":b},""):b}},"json_parse");kS.exports=eD});var zS=D((hX,Nu)=>{var DS=OS().stringify,NS=$S();Nu.exports=function(t){return{parse:NS(t),stringify:DS}};Nu.exports.parse=NS();Nu.exports.stringify=DS});var dp=D(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.GCE_LINUX_BIOS_PATHS=void 0;Cr.isGoogleCloudServerless=LS;Cr.isGoogleComputeEngineLinux=jS;Cr.isGoogleComputeEngineMACAddress=FS;Cr.isGoogleComputeEngine=qS;Cr.detectGCPResidency=rD;var US=require("fs"),MS=require("os");Cr.GCE_LINUX_BIOS_PATHS={BIOS_DATE:"/sys/class/dmi/id/bios_date",BIOS_VENDOR:"/sys/class/dmi/id/bios_vendor"};var tD=/^42:01/;function LS(){return!!(process.env.CLOUD_RUN_JOB||process.env.FUNCTION_NAME||process.env.K_SERVICE)}o(LS,"isGoogleCloudServerless");function jS(){if((0,MS.platform)()!=="linux")return!1;try{(0,US.statSync)(Cr.GCE_LINUX_BIOS_PATHS.BIOS_DATE);let t=(0,US.readFileSync)(Cr.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR,"utf8");return/Google/.test(t)}catch{return!1}}o(jS,"isGoogleComputeEngineLinux");function FS(){let t=(0,MS.networkInterfaces)();for(let e of Object.values(t))if(e){for(let{mac:r}of e)if(tD.test(r))return!0}return!1}o(FS,"isGoogleComputeEngineMACAddress");function qS(){return jS()||FS()}o(qS,"isGoogleComputeEngine");function rD(){return LS()||qS()}o(rD,"detectGCPResidency")});var BS=D(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});zu.Colours=void 0;var $t=class t{static{o(this,"Colours")}static isEnabled(e){return e&&e.isTTY&&(typeof e.getColorDepth=="function"?e.getColorDepth()>2:!0)}static refresh(){t.enabled=t.isEnabled(process==null?void 0:process.stderr),this.enabled?(t.reset="\x1B[0m",t.bright="\x1B[1m",t.dim="\x1B[2m",t.red="\x1B[31m",t.green="\x1B[32m",t.yellow="\x1B[33m",t.blue="\x1B[34m",t.magenta="\x1B[35m",t.cyan="\x1B[36m",t.white="\x1B[37m",t.grey="\x1B[90m"):(t.reset="",t.bright="",t.dim="",t.red="",t.green="",t.yellow="",t.blue="",t.magenta="",t.cyan="",t.white="",t.grey="")}};zu.Colours=$t;$t.enabled=!1;$t.reset="";$t.bright="";$t.dim="";$t.red="";$t.green="";$t.yellow="";$t.blue="";$t.magenta="";$t.cyan="";$t.white="";$t.grey="";$t.refresh()});var WS=D(Qe=>{"use strict";var nD=Qe&&Qe.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),oD=Qe&&Qe.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),VS=Qe&&Qe.__importStar||(function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&nD(r,e,n[i]);return oD(r,e),r}})();Object.defineProperty(Qe,"__esModule",{value:!0});Qe.env=Qe.DebugLogBackendBase=Qe.placeholder=Qe.AdhocDebugLogger=Qe.LogSeverity=void 0;Qe.getNodeBackend=fp;Qe.getDebugBackend=aD;Qe.getStructuredBackend=sD;Qe.setBackend=uD;Qe.log=HS;var iD=require("events"),wa=VS(require("process")),GS=VS(require("util")),tr=BS(),Or;(function(t){t.DEFAULT="DEFAULT",t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR"})(Or||(Qe.LogSeverity=Or={}));var Ta=class extends iD.EventEmitter{static{o(this,"AdhocDebugLogger")}constructor(e,r){super(),this.namespace=e,this.upstream=r,this.func=Object.assign(this.invoke.bind(this),{instance:this,on:o((n,i)=>this.on(n,i),"on")}),this.func.debug=(...n)=>this.invokeSeverity(Or.DEBUG,...n),this.func.info=(...n)=>this.invokeSeverity(Or.INFO,...n),this.func.warn=(...n)=>this.invokeSeverity(Or.WARNING,...n),this.func.error=(...n)=>this.invokeSeverity(Or.ERROR,...n),this.func.sublog=n=>HS(n,this.func)}invoke(e,...r){if(this.upstream)try{this.upstream(e,...r)}catch{}try{this.emit("log",e,r)}catch{}}invokeSeverity(e,...r){this.invoke({severity:e},...r)}};Qe.AdhocDebugLogger=Ta;Qe.placeholder=new Ta("",()=>{}).func;var ci=class{static{o(this,"DebugLogBackendBase")}constructor(){var e;this.cached=new Map,this.filters=[],this.filtersSet=!1;let r=(e=wa.env[Qe.env.nodeEnables])!==null&&e!==void 0?e:"*";r==="all"&&(r="*"),this.filters=r.split(",")}log(e,r,...n){try{this.filtersSet||(this.setFilters(),this.filtersSet=!0);let i=this.cached.get(e);i||(i=this.makeLogger(e),this.cached.set(e,i)),i(r,...n)}catch(i){console.error(i)}}};Qe.DebugLogBackendBase=ci;var pp=class extends ci{static{o(this,"NodeBackend")}constructor(){super(...arguments),this.enabledRegexp=/.*/g}isEnabled(e){return this.enabledRegexp.test(e)}makeLogger(e){return this.enabledRegexp.test(e)?(r,...n)=>{var i;let s=`${tr.Colours.green}${e}${tr.Colours.reset}`,c=`${tr.Colours.yellow}${wa.pid}${tr.Colours.reset}`,d;switch(r.severity){case Or.ERROR:d=`${tr.Colours.red}${r.severity}${tr.Colours.reset}`;break;case Or.INFO:d=`${tr.Colours.magenta}${r.severity}${tr.Colours.reset}`;break;case Or.WARNING:d=`${tr.Colours.yellow}${r.severity}${tr.Colours.reset}`;break;default:d=(i=r.severity)!==null&&i!==void 0?i:Or.DEFAULT;break}let p=GS.formatWithOptions({colors:tr.Colours.enabled},...n),m=Object.assign({},r);delete m.severity;let y=Object.getOwnPropertyNames(m).length?JSON.stringify(m):"",h=y?`${tr.Colours.grey}${y}${tr.Colours.reset}`:"";console.error("%s [%s|%s] %s%s",c,s,d,p,y?` ${h}`:"")}:()=>{}}setFilters(){let r=this.filters.join(",").replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^");this.enabledRegexp=new RegExp(`^${r}$`,"i")}};function fp(){return new pp}o(fp,"getNodeBackend");var mp=class extends ci{static{o(this,"DebugBackend")}constructor(e){super(),this.debugPkg=e}makeLogger(e){let r=this.debugPkg(e);return(n,...i)=>{r(i[0],...i.slice(1))}}setFilters(){var e;let r=(e=wa.env.NODE_DEBUG)!==null&&e!==void 0?e:"";wa.env.NODE_DEBUG=`${r}${r?",":""}${this.filters.join(",")}`}};function aD(t){return new mp(t)}o(aD,"getDebugBackend");var hp=class extends ci{static{o(this,"StructuredBackend")}constructor(e){var r;super(),this.upstream=(r=e)!==null&&r!==void 0?r:void 0}makeLogger(e){var r;let n=(r=this.upstream)===null||r===void 0?void 0:r.makeLogger(e);return(i,...s)=>{var c;let d=(c=i.severity)!==null&&c!==void 0?c:Or.INFO,p=Object.assign({severity:d,message:GS.format(...s)},i),m=JSON.stringify(p);n?n(i,m):console.log("%s",m)}}setFilters(){var e;(e=this.upstream)===null||e===void 0||e.setFilters()}};function sD(t){return new hp(t)}o(sD,"getStructuredBackend");Qe.env={nodeEnables:"GOOGLE_SDK_NODE_LOGGING"};var gp=new Map,rr;function uD(t){rr=t,gp.clear()}o(uD,"setBackend");function HS(t,e){if(!rr&&!wa.env[Qe.env.nodeEnables]||!t)return Qe.placeholder;e&&(t=`${e.instance.namespace}:${t}`);let r=gp.get(t);if(r)return r.func;if(rr===null)return Qe.placeholder;rr===void 0&&(rr=fp());let n=(()=>{let i;return new Ta(t,(c,...d)=>{if(i!==rr){if(rr===null)return;rr===void 0&&(rr=fp()),i=rr}rr?.log(t,c,...d)})})();return gp.set(t,n),n.func}o(HS,"log")});var yp=D(bo=>{"use strict";var cD=bo&&bo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),lD=bo&&bo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&cD(e,t,r)};Object.defineProperty(bo,"__esModule",{value:!0});lD(WS(),bo)});var xa=D(ye=>{"use strict";var KS=ye&&ye.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),dD=ye&&ye.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),pD=ye&&ye.__importStar||(function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&KS(r,e,n[i]);return dD(r,e),r}})(),fD=ye&&ye.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&KS(e,t,r)};Object.defineProperty(ye,"__esModule",{value:!0});ye.gcpResidencyCache=ye.METADATA_SERVER_DETECTION=ye.HEADERS=ye.HEADER_VALUE=ye.HEADER_NAME=ye.SECONDARY_HOST_ADDRESS=ye.HOST_ADDRESS=ye.BASE_PATH=void 0;ye.instance=_D;ye.project=bD;ye.universe=ED;ye.bulk=SD;ye.isAvailable=TD;ye.resetIsAvailableCache=PD;ye.getGCPResidency=bp;ye.setGCPResidency=JS;ye.requestTimeout=YS;var vp=ht(),mD=zS(),hD=dp(),gD=pD(yp());ye.BASE_PATH="/computeMetadata/v1";ye.HOST_ADDRESS="http://169.254.169.254";ye.SECONDARY_HOST_ADDRESS="http://metadata.google.internal.";ye.HEADER_NAME="Metadata-Flavor";ye.HEADER_VALUE="Google";ye.HEADERS=Object.freeze({[ye.HEADER_NAME]:ye.HEADER_VALUE});var ZS=gD.log("gcp-metadata");ye.METADATA_SERVER_DETECTION=Object.freeze({"assume-present":"don't try to ping the metadata server, but assume it's present",none:"don't try to ping the metadata server, but don't try to use it either","bios-only":"treat the result of a BIOS probe as canonical (don't fall back to pinging)","ping-only":"skip the BIOS probe, and go straight to pinging"});function _p(t){return t||(t=process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST||ye.HOST_ADDRESS),/^https?:\/\//.test(t)||(t=`http://${t}`),new URL(ye.BASE_PATH,t).href}o(_p,"getBaseUrl");function yD(t){Object.keys(t).forEach(e=>{switch(e){case"params":case"property":case"headers":break;case"qs":throw new Error("'qs' is not a valid configuration option. Please use 'params' instead.");default:throw new Error(`'${e}' is not a valid configuration option.`)}})}o(yD,"validate");async function Pa(t,e={},r=3,n=!1){let i=new Headers(ye.HEADERS),s="",c={};if(typeof t=="object"){let h=t;new Headers(h.headers).forEach((f,l)=>i.set(l,f)),s=h.metadataKey,c=h.params||c,r=h.noResponseRetries||r,n=h.fastFail||n}else s=t;typeof e=="string"?s+=`/${e}`:(yD(e),e.property&&(s+=`/${e.property}`),new Headers(e.headers).forEach((h,f)=>i.set(f,h)),c=e.params||c);let d=n?vD:vp.request,p={url:`${_p()}/${s}`,headers:i,retryConfig:{noResponseRetries:r},params:c,responseType:"text",timeout:YS()};ZS.info("instance request %j",p);let m=await d(p);ZS.info("instance metadata is %s",m.data);let y=m.headers.get(ye.HEADER_NAME);if(y!==ye.HEADER_VALUE)throw new RangeError(`Invalid response from metadata service: incorrect ${ye.HEADER_NAME} header. Expected '${ye.HEADER_VALUE}', got ${y?`'${y}'`:"no header"}`);if(typeof m.data=="string")try{return mD.parse(m.data)}catch{}return m.data}o(Pa,"metadataAccessor");async function vD(t){let e={...t,url:t.url?.toString().replace(_p(),_p(ye.SECONDARY_HOST_ADDRESS))},r=(0,vp.request)(t),n=(0,vp.request)(e);return Promise.any([r,n])}o(vD,"fastFailMetadataRequest");function _D(t){return Pa("instance",t)}o(_D,"instance");function bD(t){return Pa("project",t)}o(bD,"project");function ED(t){return Pa("universe",t)}o(ED,"universe");async function SD(t){let e={};return await Promise.all(t.map(r=>(async()=>{let n=await Pa(r),i=r.metadataKey;e[i]=n})())),e}o(SD,"bulk");function wD(){return process.env.DETECT_GCP_RETRIES?Number(process.env.DETECT_GCP_RETRIES):0}o(wD,"detectGCPAvailableRetries");var Uu;async function TD(){if(process.env.METADATA_SERVER_DETECTION){let t=process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase();if(!(t in ye.METADATA_SERVER_DETECTION))throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${t}\`, but it should be \`${Object.keys(ye.METADATA_SERVER_DETECTION).join("`, `")}\`, or unset`);switch(t){case"assume-present":return!0;case"none":return!1;case"bios-only":return bp();case"ping-only":}}try{return Uu===void 0&&(Uu=Pa("instance",void 0,wD(),!(process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST))),await Uu,!0}catch(t){let e=t;if(process.env.DEBUG_AUTH&&console.info(e),e.type==="request-timeout"||e.response&&e.response.status===404)return!1;if(!(e.response&&e.response.status===404)&&(!e.code||!["EHOSTDOWN","EHOSTUNREACH","ENETUNREACH","ENOENT","ENOTFOUND","ECONNREFUSED"].includes(e.code.toString()))){let r="UNKNOWN";e.code&&(r=e.code.toString()),process.emitWarning(`received unexpected error = ${e.message} code = ${r}`,"MetadataLookupWarning")}return!1}}o(TD,"isAvailable");function PD(){Uu=void 0}o(PD,"resetIsAvailableCache");ye.gcpResidencyCache=null;function bp(){return ye.gcpResidencyCache===null&&JS(),ye.gcpResidencyCache}o(bp,"getGCPResidency");function JS(t=null){ye.gcpResidencyCache=t!==null?t:(0,hD.detectGCPResidency)()}o(JS,"setGCPResidency");function YS(){return bp()?0:3e3}o(YS,"requestTimeout");fD(dp(),ye)});var ew=D(Mu=>{"use strict";Mu.byteLength=AD;Mu.toByteArray=RD;Mu.fromByteArray=kD;var Vr=[],yr=[],xD=typeof Uint8Array<"u"?Uint8Array:Array,Ep="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Eo=0,XS=Ep.length;Eo<XS;++Eo)Vr[Eo]=Ep[Eo],yr[Ep.charCodeAt(Eo)]=Eo;var Eo,XS;yr[45]=62;yr[95]=63;function QS(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}o(QS,"getLens");function AD(t){var e=QS(t),r=e[0],n=e[1];return(r+n)*3/4-n}o(AD,"byteLength");function ID(t,e,r){return(e+r)*3/4-r}o(ID,"_byteLength");function RD(t){var e,r=QS(t),n=r[0],i=r[1],s=new xD(ID(t,n,i)),c=0,d=i>0?n-4:n,p;for(p=0;p<d;p+=4)e=yr[t.charCodeAt(p)]<<18|yr[t.charCodeAt(p+1)]<<12|yr[t.charCodeAt(p+2)]<<6|yr[t.charCodeAt(p+3)],s[c++]=e>>16&255,s[c++]=e>>8&255,s[c++]=e&255;return i===2&&(e=yr[t.charCodeAt(p)]<<2|yr[t.charCodeAt(p+1)]>>4,s[c++]=e&255),i===1&&(e=yr[t.charCodeAt(p)]<<10|yr[t.charCodeAt(p+1)]<<4|yr[t.charCodeAt(p+2)]>>2,s[c++]=e>>8&255,s[c++]=e&255),s}o(RD,"toByteArray");function CD(t){return Vr[t>>18&63]+Vr[t>>12&63]+Vr[t>>6&63]+Vr[t&63]}o(CD,"tripletToBase64");function OD(t,e,r){for(var n,i=[],s=e;s<r;s+=3)n=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),i.push(CD(n));return i.join("")}o(OD,"encodeChunk");function kD(t){for(var e,r=t.length,n=r%3,i=[],s=16383,c=0,d=r-n;c<d;c+=s)i.push(OD(t,c,c+s>d?d:c+s));return n===1?(e=t[r-1],i.push(Vr[e>>2]+Vr[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(Vr[e>>10]+Vr[e>>4&63]+Vr[e<<2&63]+"=")),i.join("")}o(kD,"fromByteArray")});var wp=D(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});Sp.fromArrayBufferToHex=$D;function $D(t){return Array.from(new Uint8Array(t)).map(r=>r.toString(16).padStart(2,"0")).join("")}o($D,"fromArrayBufferToHex")});var tw=D(Lu=>{"use strict";Object.defineProperty(Lu,"__esModule",{value:!0});Lu.BrowserCrypto=void 0;var li=ew(),DD=wp(),Tp=class t{static{o(this,"BrowserCrypto")}constructor(){if(typeof window>"u"||window.crypto===void 0||window.crypto.subtle===void 0)throw new Error("SubtleCrypto not found. Make sure it's an https:// website.")}async sha256DigestBase64(e){let r=new TextEncoder().encode(e),n=await window.crypto.subtle.digest("SHA-256",r);return li.fromByteArray(new Uint8Array(n))}randomBytesBase64(e){let r=new Uint8Array(e);return window.crypto.getRandomValues(r),li.fromByteArray(r)}static padBase64(e){for(;e.length%4!==0;)e+="=";return e}async verify(e,r,n){let i={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},s=new TextEncoder().encode(r),c=li.toByteArray(t.padBase64(n)),d=await window.crypto.subtle.importKey("jwk",e,i,!0,["verify"]);return await window.crypto.subtle.verify(i,d,c,s)}async sign(e,r){let n={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},i=new TextEncoder().encode(r),s=await window.crypto.subtle.importKey("jwk",e,n,!0,["sign"]),c=await window.crypto.subtle.sign(n,s,i);return li.fromByteArray(new Uint8Array(c))}decodeBase64StringUtf8(e){let r=li.toByteArray(t.padBase64(e));return new TextDecoder().decode(r)}encodeBase64StringUtf8(e){let r=new TextEncoder().encode(e);return li.fromByteArray(r)}async sha256DigestHex(e){let r=new TextEncoder().encode(e),n=await window.crypto.subtle.digest("SHA-256",r);return(0,DD.fromArrayBufferToHex)(n)}async signWithHmacSha256(e,r){let n=typeof e=="string"?e:String.fromCharCode(...new Uint16Array(e)),i=new TextEncoder,s=await window.crypto.subtle.importKey("raw",i.encode(n),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]);return window.crypto.subtle.sign("HMAC",s,i.encode(r))}};Lu.BrowserCrypto=Tp});var rw=D(ju=>{"use strict";Object.defineProperty(ju,"__esModule",{value:!0});ju.NodeCrypto=void 0;var di=require("crypto"),Pp=class{static{o(this,"NodeCrypto")}async sha256DigestBase64(e){return di.createHash("sha256").update(e).digest("base64")}randomBytesBase64(e){return di.randomBytes(e).toString("base64")}async verify(e,r,n){let i=di.createVerify("RSA-SHA256");return i.update(r),i.end(),i.verify(e,n,"base64")}async sign(e,r){let n=di.createSign("RSA-SHA256");return n.update(r),n.end(),n.sign(e,"base64")}decodeBase64StringUtf8(e){return Buffer.from(e,"base64").toString("utf-8")}encodeBase64StringUtf8(e){return Buffer.from(e,"utf-8").toString("base64")}async sha256DigestHex(e){return di.createHash("sha256").update(e).digest("hex")}async signWithHmacSha256(e,r){let n=typeof e=="string"?e:zD(e);return ND(di.createHmac("sha256",n).update(r).digest())}};ju.NodeCrypto=Pp;function ND(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}o(ND,"toArrayBuffer");function zD(t){return Buffer.from(t)}o(zD,"toBuffer")});var Aa=D(vn=>{"use strict";var UD=vn&&vn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),MD=vn&&vn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&UD(e,t,r)};Object.defineProperty(vn,"__esModule",{value:!0});vn.createCrypto=FD;vn.hasBrowserCrypto=nw;var LD=tw(),jD=rw();MD(wp(),vn);function FD(){return nw()?new LD.BrowserCrypto:new jD.NodeCrypto}o(FD,"createCrypto");function nw(){return typeof window<"u"&&typeof window.crypto<"u"&&typeof window.crypto.subtle<"u"}o(nw,"hasBrowserCrypto")});var pi=D((xp,iw)=>{var Fu=require("buffer"),Gr=Fu.Buffer;function ow(t,e){for(var r in t)e[r]=t[r]}o(ow,"copyProps");Gr.from&&Gr.alloc&&Gr.allocUnsafe&&Gr.allocUnsafeSlow?iw.exports=Fu:(ow(Fu,xp),xp.Buffer=So);function So(t,e,r){return Gr(t,e,r)}o(So,"SafeBuffer");So.prototype=Object.create(Gr.prototype);ow(Gr,So);So.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Gr(t,e,r)};So.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=Gr(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};So.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Gr(t)};So.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Fu.SlowBuffer(t)}});var sw=D((UX,aw)=>{"use strict";function Ap(t){var e=(t/8|0)+(t%8===0?0:1);return e}o(Ap,"getParamSize");var qD={ES256:Ap(256),ES384:Ap(384),ES512:Ap(521)};function BD(t){var e=qD[t];if(e)return e;throw new Error('Unknown algorithm "'+t+'"')}o(BD,"getParamBytesForAlg");aw.exports=BD});var Ip=D((LX,fw)=>{"use strict";var qu=pi().Buffer,cw=sw(),Bu=128,lw=0,VD=32,GD=16,HD=2,dw=GD|VD|lw<<6,Vu=HD|lw<<6;function WD(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}o(WD,"base64Url");function pw(t){if(qu.isBuffer(t))return t;if(typeof t=="string")return qu.from(t,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}o(pw,"signatureAsBuffer");function ZD(t,e){t=pw(t);var r=cw(e),n=r+1,i=t.length,s=0;if(t[s++]!==dw)throw new Error('Could not find expected "seq"');var c=t[s++];if(c===(Bu|1)&&(c=t[s++]),i-s<c)throw new Error('"seq" specified length of "'+c+'", only "'+(i-s)+'" remaining');if(t[s++]!==Vu)throw new Error('Could not find expected "int" for "r"');var d=t[s++];if(i-s-2<d)throw new Error('"r" specified length of "'+d+'", only "'+(i-s-2)+'" available');if(n<d)throw new Error('"r" specified length of "'+d+'", max of "'+n+'" is acceptable');var p=s;if(s+=d,t[s++]!==Vu)throw new Error('Could not find expected "int" for "s"');var m=t[s++];if(i-s!==m)throw new Error('"s" specified length of "'+m+'", expected "'+(i-s)+'"');if(n<m)throw new Error('"s" specified length of "'+m+'", max of "'+n+'" is acceptable');var y=s;if(s+=m,s!==i)throw new Error('Expected to consume entire buffer, but "'+(i-s)+'" bytes remain');var h=r-d,f=r-m,l=qu.allocUnsafe(h+d+f+m);for(s=0;s<h;++s)l[s]=0;t.copy(l,s,p+Math.max(-h,0),p+d),s=r;for(var g=s;s<g+f;++s)l[s]=0;return t.copy(l,s,y+Math.max(-f,0),y+m),l=l.toString("base64"),l=WD(l),l}o(ZD,"derToJose");function uw(t,e,r){for(var n=0;e+n<r&&t[e+n]===0;)++n;var i=t[e+n]>=Bu;return i&&--n,n}o(uw,"countPadding");function KD(t,e){t=pw(t);var r=cw(e),n=t.length;if(n!==r*2)throw new TypeError('"'+e+'" signatures must be "'+r*2+'" bytes, saw "'+n+'"');var i=uw(t,0,r),s=uw(t,r,t.length),c=r-i,d=r-s,p=2+c+1+1+d,m=p<Bu,y=qu.allocUnsafe((m?2:3)+p),h=0;return y[h++]=dw,m?y[h++]=p:(y[h++]=Bu|1,y[h++]=p&255),y[h++]=Vu,y[h++]=c,i<0?(y[h++]=0,h+=t.copy(y,h,0,r)):h+=t.copy(y,h,i,r),y[h++]=Vu,y[h++]=d,s<0?(y[h++]=0,t.copy(y,h,r)):t.copy(y,h,r+s),y}o(KD,"joseToDer");fw.exports={derToJose:ZD,joseToDer:KD}});var kr=D(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.LRUCache=void 0;_n.snakeToCamel=hw;_n.originalOrCamelOptions=QD;_n.removeUndefinedValuesInObject=eN;_n.isValidFile=tN;_n.getWellKnownCertificateConfigFileLocation=rN;var JD=require("fs"),YD=require("os"),Rp=require("path"),XD="certificate_config.json",mw="gcloud";function hw(t){return t.replace(/([_][^_])/g,e=>e.slice(1).toUpperCase())}o(hw,"snakeToCamel");function QD(t){function e(r){let n=t||{};return n[r]??n[hw(r)]}return o(e,"get"),{get:e}}o(QD,"originalOrCamelOptions");var Cp=class{static{o(this,"LRUCache")}capacity;#e=new Map;maxAge;constructor(e){this.capacity=e.capacity,this.maxAge=e.maxAge}#t(e,r){this.#e.delete(e),this.#e.set(e,{value:r,lastAccessed:Date.now()})}set(e,r){this.#t(e,r),this.#r()}get(e){let r=this.#e.get(e);if(r)return this.#t(e,r.value),this.#r(),r.value}#r(){let e=this.maxAge?Date.now()-this.maxAge:0,r=this.#e.entries().next();for(;!r.done&&(this.#e.size>this.capacity||r.value[1].lastAccessed<e);)this.#e.delete(r.value[0]),r=this.#e.entries().next()}};_n.LRUCache=Cp;function eN(t){return Object.entries(t).forEach(([e,r])=>{(r===void 0||r==="undefined")&&delete t[e]}),t}o(eN,"removeUndefinedValuesInObject");async function tN(t){try{return(await JD.promises.lstat(t)).isFile()}catch{return!1}}o(tN,"isValidFile");function rN(){let t=process.env.CLOUDSDK_CONFIG||(nN()?Rp.join(process.env.APPDATA||"",mw):Rp.join(process.env.HOME||"",".config",mw));return Rp.join(t,XD)}o(rN,"getWellKnownCertificateConfigFileLocation");function nN(){return YD.platform().startsWith("win")}o(nN,"_isWindows")});var gw=D((BX,oN)=>{oN.exports={name:"google-auth-library",version:"10.5.0",author:"Google Inc.",description:"Google APIs Authentication Client Library for Node.js",engines:{node:">=18"},main:"./build/src/index.js",types:"./build/src/index.d.ts",repository:"googleapis/google-auth-library-nodejs.git",keywords:["google","api","google apis","client","client library"],dependencies:{"base64-js":"^1.3.0","ecdsa-sig-formatter":"^1.0.11",gaxios:"^7.0.0","gcp-metadata":"^8.0.0","google-logging-utils":"^1.0.0",gtoken:"^8.0.0",jws:"^4.0.0"},devDependencies:{"@types/base64-js":"^1.2.5","@types/jws":"^3.1.0","@types/mocha":"^10.0.10","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^22.0.0","@types/sinon":"^17.0.0","assert-rejects":"^1.0.0",c8:"^10.0.0",codecov:"^3.0.2",gts:"^6.0.0","is-docker":"^3.0.0",jsdoc:"^4.0.0","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1",keypair:"^1.0.4",mocha:"^11.1.0",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.5","null-loader":"^4.0.0",puppeteer:"^24.0.0",sinon:"^21.0.0","ts-loader":"^8.0.0",typescript:"5.8.2",webpack:"^5.21.2","webpack-cli":"^4.0.0"},files:["build/src","!build/src/**/*.map"],scripts:{test:"c8 mocha build/test",clean:"gts clean",prepare:"npm run compile",lint:"gts check --no-inline-config",compile:"tsc -p .",fix:"gts fix",pretest:"npm run compile -- --sourceMap",docs:"jsdoc -c .jsdoc.js","samples-setup":"cd samples/ && npm link ../ && npm run setup && cd ../","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","system-test":"mocha build/system-test --timeout 60000","presystem-test":"npm run compile -- --sourceMap",webpack:"webpack","browser-test":"karma start","docs-test":"echo 'disabled until linkinator is fixed'","predocs-test":"npm run docs",prelint:"cd samples; npm link ../; npm install"},license:"Apache-2.0"}});var Op=D(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.USER_AGENT=Jn.PRODUCT_NAME=Jn.pkg=void 0;var yw=gw();Jn.pkg=yw;var vw="google-api-nodejs-client";Jn.PRODUCT_NAME=vw;var iN=`${vw}/${yw.version}`;Jn.USER_AGENT=iN});var nr=D($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.AuthClient=$r.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=$r.DEFAULT_UNIVERSE=void 0;var aN=require("events"),kp=ht(),sN=kr(),uN=yp(),$p=Op();$r.DEFAULT_UNIVERSE="googleapis.com";$r.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=300*1e3;var Dp=class t extends aN.EventEmitter{static{o(this,"AuthClient")}apiKey;projectId;quotaProjectId;transporter;credentials={};eagerRefreshThresholdMillis=$r.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS;forceRefreshOnFailure=!1;universeDomain=$r.DEFAULT_UNIVERSE;static RequestMethodNameSymbol=Symbol("request method name");static RequestLogIdSymbol=Symbol("request log id");constructor(e={}){super();let r=(0,sN.originalOrCamelOptions)(e);this.apiKey=e.apiKey,this.projectId=r.get("project_id")??null,this.quotaProjectId=r.get("quota_project_id"),this.credentials=r.get("credentials")??{},this.universeDomain=r.get("universe_domain")??$r.DEFAULT_UNIVERSE,this.transporter=e.transporter??new kp.Gaxios(e.transporterOptions),r.get("useAuthRequestParameters")!==!1&&(this.transporter.interceptors.request.add(t.DEFAULT_REQUEST_INTERCEPTOR),this.transporter.interceptors.response.add(t.DEFAULT_RESPONSE_INTERCEPTOR)),e.eagerRefreshThresholdMillis&&(this.eagerRefreshThresholdMillis=e.eagerRefreshThresholdMillis),this.forceRefreshOnFailure=e.forceRefreshOnFailure??!1}fetch(...e){let r=e[0],n=e[1],i,s=new Headers;return typeof r=="string"?i=new URL(r):r instanceof URL?i=r:r&&r.url&&(i=new URL(r.url)),r&&typeof r=="object"&&"headers"in r&&kp.Gaxios.mergeHeaders(s,r.headers),n&&kp.Gaxios.mergeHeaders(s,new Headers(n.headers)),typeof r=="object"&&!(r instanceof URL)?this.request({...n,...r,headers:s,url:i}):this.request({...n,headers:s,url:i})}setCredentials(e){this.credentials=e}addSharedMetadataHeaders(e){return!e.has("x-goog-user-project")&&this.quotaProjectId&&e.set("x-goog-user-project",this.quotaProjectId),e}addUserProjectAndAuthHeaders(e,r){let n=r.get("x-goog-user-project"),i=r.get("authorization");return n&&e.set("x-goog-user-project",n),i&&e.set("authorization",i),e}static log=(0,uN.log)("auth");static DEFAULT_REQUEST_INTERCEPTOR={resolved:o(async e=>{if(!e.headers.has("x-goog-api-client")){let n=process.version.replace(/^v/,"");e.headers.set("x-goog-api-client",`gl-node/${n}`)}let r=e.headers.get("User-Agent");r?r.includes(`${$p.PRODUCT_NAME}/`)||e.headers.set("User-Agent",`${r} ${$p.USER_AGENT}`):e.headers.set("User-Agent",$p.USER_AGENT);try{let n=e,i=n[t.RequestMethodNameSymbol],s=`${Math.floor(Math.random()*1e3)}`;n[t.RequestLogIdSymbol]=s;let c={url:e.url,headers:e.headers};i?t.log.info("%s [%s] request %j",i,s,c):t.log.info("[%s] request %j",s,c)}catch{}return e},"resolved")};static DEFAULT_RESPONSE_INTERCEPTOR={resolved:o(async e=>{try{let r=e.config,n=r[t.RequestMethodNameSymbol],i=r[t.RequestLogIdSymbol];n?t.log.info("%s [%s] response %j",n,i,e.data):t.log.info("[%s] response %j",i,e.data)}catch{}return e},"resolved"),rejected:o(async e=>{try{let r=e.config,n=r[t.RequestMethodNameSymbol],i=r[t.RequestLogIdSymbol];n?t.log.info("%s [%s] error %j",n,i,e.response?.data):t.log.error("[%s] error %j",i,e.response?.data)}catch{}throw e},"rejected")};static setMethodName(e,r){try{let n=e;n[t.RequestMethodNameSymbol]=r}catch{}}static get RETRY_CONFIG(){return{retry:!0,retryConfig:{httpMethodsToRetry:["GET","PUT","POST","HEAD","OPTIONS","DELETE"]}}}};$r.AuthClient=Dp});var zp=D(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});Gu.LoginTicket=void 0;var Np=class{static{o(this,"LoginTicket")}envelope;payload;constructor(e,r){this.envelope=e,this.payload=r}getEnvelope(){return this.envelope}getPayload(){return this.payload}getUserId(){let e=this.getPayload();return e&&e.sub?e.sub:null}getAttributes(){return{envelope:this.getEnvelope(),payload:this.getPayload()}}};Gu.LoginTicket=Np});var wo=D(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.OAuth2Client=Hr.ClientAuthentication=Hr.CertificateFormat=Hr.CodeChallengeMethod=void 0;var _w=ht(),cN=require("querystring"),lN=require("stream"),dN=Ip(),bw=kr(),Up=Aa(),fi=nr(),pN=zp(),Ew;(function(t){t.Plain="plain",t.S256="S256"})(Ew||(Hr.CodeChallengeMethod=Ew={}));var bn;(function(t){t.PEM="PEM",t.JWK="JWK"})(bn||(Hr.CertificateFormat=bn={}));var Ia;(function(t){t.ClientSecretPost="ClientSecretPost",t.ClientSecretBasic="ClientSecretBasic",t.None="None"})(Ia||(Hr.ClientAuthentication=Ia={}));var Mp=class t extends fi.AuthClient{static{o(this,"OAuth2Client")}redirectUri;certificateCache={};certificateExpiry=null;certificateCacheFormat=bn.PEM;refreshTokenPromises=new Map;endpoints;issuers;clientAuthentication;_clientId;_clientSecret;refreshHandler;constructor(e={},r,n){super(typeof e=="object"?e:{}),typeof e!="object"&&(e={clientId:e,clientSecret:r,redirectUri:n}),this._clientId=e.clientId||e.client_id,this._clientSecret=e.clientSecret||e.client_secret,this.redirectUri=e.redirectUri||e.redirect_uris?.[0],this.endpoints={tokenInfoUrl:"https://oauth2.googleapis.com/tokeninfo",oauth2AuthBaseUrl:"https://accounts.google.com/o/oauth2/v2/auth",oauth2TokenUrl:"https://oauth2.googleapis.com/token",oauth2RevokeUrl:"https://oauth2.googleapis.com/revoke",oauth2FederatedSignonPemCertsUrl:"https://www.googleapis.com/oauth2/v1/certs",oauth2FederatedSignonJwkCertsUrl:"https://www.googleapis.com/oauth2/v3/certs",oauth2IapPublicKeyUrl:"https://www.gstatic.com/iap/verify/public_key",...e.endpoints},this.clientAuthentication=e.clientAuthentication||Ia.ClientSecretPost,this.issuers=e.issuers||["accounts.google.com","https://accounts.google.com",this.universeDomain]}static GOOGLE_TOKEN_INFO_URL="https://oauth2.googleapis.com/tokeninfo";static CLOCK_SKEW_SECS_=300;static DEFAULT_MAX_TOKEN_LIFETIME_SECS_=86400;generateAuthUrl(e={}){if(e.code_challenge_method&&!e.code_challenge)throw new Error("If a code_challenge_method is provided, code_challenge must be included.");return e.response_type=e.response_type||"code",e.client_id=e.client_id||this._clientId,e.redirect_uri=e.redirect_uri||this.redirectUri,Array.isArray(e.scope)&&(e.scope=e.scope.join(" ")),this.endpoints.oauth2AuthBaseUrl.toString()+"?"+cN.stringify(e)}generateCodeVerifier(){throw new Error("generateCodeVerifier is removed, please use generateCodeVerifierAsync instead.")}async generateCodeVerifierAsync(){let e=(0,Up.createCrypto)(),n=e.randomBytesBase64(96).replace(/\+/g,"~").replace(/=/g,"_").replace(/\//g,"-"),s=(await e.sha256DigestBase64(n)).split("=")[0].replace(/\+/g,"-").replace(/\//g,"_");return{codeVerifier:n,codeChallenge:s}}getToken(e,r){let n=typeof e=="string"?{code:e}:e;if(r)this.getTokenAsync(n).then(i=>r(null,i.tokens,i.res),i=>r(i,null,i.response));else return this.getTokenAsync(n)}async getTokenAsync(e){let r=this.endpoints.oauth2TokenUrl.toString(),n=new Headers,i={client_id:e.client_id||this._clientId,code_verifier:e.codeVerifier,code:e.code,grant_type:"authorization_code",redirect_uri:e.redirect_uri||this.redirectUri};if(this.clientAuthentication===Ia.ClientSecretBasic){let p=Buffer.from(`${this._clientId}:${this._clientSecret}`);n.set("authorization",`Basic ${p.toString("base64")}`)}this.clientAuthentication===Ia.ClientSecretPost&&(i.client_secret=this._clientSecret);let s={...t.RETRY_CONFIG,method:"POST",url:r,data:new URLSearchParams((0,bw.removeUndefinedValuesInObject)(i)),headers:n};fi.AuthClient.setMethodName(s,"getTokenAsync");let c=await this.transporter.request(s),d=c.data;return c.data&&c.data.expires_in&&(d.expiry_date=new Date().getTime()+c.data.expires_in*1e3,delete d.expires_in),this.emit("tokens",d),{tokens:d,res:c}}async refreshToken(e){if(!e)return this.refreshTokenNoCache(e);if(this.refreshTokenPromises.has(e))return this.refreshTokenPromises.get(e);let r=this.refreshTokenNoCache(e).then(n=>(this.refreshTokenPromises.delete(e),n),n=>{throw this.refreshTokenPromises.delete(e),n});return this.refreshTokenPromises.set(e,r),r}async refreshTokenNoCache(e){if(!e)throw new Error("No refresh token is set.");let r=this.endpoints.oauth2TokenUrl.toString(),n={refresh_token:e,client_id:this._clientId,client_secret:this._clientSecret,grant_type:"refresh_token"},i;try{let c={...t.RETRY_CONFIG,method:"POST",url:r,data:new URLSearchParams((0,bw.removeUndefinedValuesInObject)(n))};fi.AuthClient.setMethodName(c,"refreshTokenNoCache"),i=await this.transporter.request(c)}catch(c){throw c instanceof _w.GaxiosError&&c.message==="invalid_grant"&&c.response?.data&&/ReAuth/i.test(c.response.data.error_description)&&(c.message=JSON.stringify(c.response.data)),c}let s=i.data;return i.data&&i.data.expires_in&&(s.expiry_date=new Date().getTime()+i.data.expires_in*1e3,delete s.expires_in),this.emit("tokens",s),{tokens:s,res:i}}refreshAccessToken(e){if(e)this.refreshAccessTokenAsync().then(r=>e(null,r.credentials,r.res),e);else return this.refreshAccessTokenAsync()}async refreshAccessTokenAsync(){let e=await this.refreshToken(this.credentials.refresh_token),r=e.tokens;return r.refresh_token=this.credentials.refresh_token,this.credentials=r,{credentials:this.credentials,res:e.res}}getAccessToken(e){if(e)this.getAccessTokenAsync().then(r=>e(null,r.token,r.res),e);else return this.getAccessTokenAsync()}async getAccessTokenAsync(){if(!this.credentials.access_token||this.isTokenExpiring()){if(!this.credentials.refresh_token)if(this.refreshHandler){let n=await this.processAndValidateRefreshHandler();if(n?.access_token)return this.setCredentials(n),{token:this.credentials.access_token}}else throw new Error("No refresh token or refresh handler callback is set.");let r=await this.refreshAccessTokenAsync();if(!r.credentials||r.credentials&&!r.credentials.access_token)throw new Error("Could not refresh access token.");return{token:r.credentials.access_token,res:r.res}}else return{token:this.credentials.access_token}}async getRequestHeaders(e){return(await this.getRequestMetadataAsync(e)).headers}async getRequestMetadataAsync(e){let r=this.credentials;if(!r.access_token&&!r.refresh_token&&!this.apiKey&&!this.refreshHandler)throw new Error("No access, refresh token, API key or refresh handler callback is set.");if(r.access_token&&!this.isTokenExpiring()){r.token_type=r.token_type||"Bearer";let d=new Headers({authorization:r.token_type+" "+r.access_token});return{headers:this.addSharedMetadataHeaders(d)}}if(this.refreshHandler){let d=await this.processAndValidateRefreshHandler();if(d?.access_token){this.setCredentials(d);let p=new Headers({authorization:"Bearer "+this.credentials.access_token});return{headers:this.addSharedMetadataHeaders(p)}}}if(this.apiKey)return{headers:new Headers({"X-Goog-Api-Key":this.apiKey})};let n=null,i=null;try{n=await this.refreshToken(r.refresh_token),i=n.tokens}catch(d){let p=d;throw p.response&&(p.response.status===403||p.response.status===404)&&(p.message=`Could not refresh access token: ${p.message}`),p}let s=this.credentials;s.token_type=s.token_type||"Bearer",i.refresh_token=s.refresh_token,this.credentials=i;let c=new Headers({authorization:s.token_type+" "+i.access_token});return{headers:this.addSharedMetadataHeaders(c),res:n.res}}static getRevokeTokenUrl(e){return new t().getRevokeTokenURL(e).toString()}getRevokeTokenURL(e){let r=new URL(this.endpoints.oauth2RevokeUrl);return r.searchParams.append("token",e),r}revokeToken(e,r){let n={...t.RETRY_CONFIG,url:this.getRevokeTokenURL(e).toString(),method:"POST"};if(fi.AuthClient.setMethodName(n,"revokeToken"),r)this.transporter.request(n).then(i=>r(null,i),r);else return this.transporter.request(n)}revokeCredentials(e){if(e)this.revokeCredentialsAsync().then(r=>e(null,r),e);else return this.revokeCredentialsAsync()}async revokeCredentialsAsync(){let e=this.credentials.access_token;if(this.credentials={},e)return this.revokeToken(e);throw new Error("No access token to revoke.")}request(e,r){if(r)this.requestAsync(e).then(n=>r(null,n),n=>r(n,n.response));else return this.requestAsync(e)}async requestAsync(e,r=!1){try{let n=await this.getRequestMetadataAsync();return e.headers=_w.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,n.headers),this.apiKey&&e.headers.set("X-Goog-Api-Key",this.apiKey),await this.transporter.request(e)}catch(n){let i=n.response;if(i){let s=i.status,c=this.credentials&&this.credentials.access_token&&this.credentials.refresh_token&&(!this.credentials.expiry_date||this.forceRefreshOnFailure),d=this.credentials&&this.credentials.access_token&&!this.credentials.refresh_token&&(!this.credentials.expiry_date||this.forceRefreshOnFailure)&&this.refreshHandler,p=i.config.data instanceof lN.Readable,m=s===401||s===403;if(!r&&m&&!p&&c)return await this.refreshAccessTokenAsync(),this.requestAsync(e,!0);if(!r&&m&&!p&&d){let y=await this.processAndValidateRefreshHandler();return y?.access_token&&this.setCredentials(y),this.requestAsync(e,!0)}}throw n}}verifyIdToken(e,r){if(r&&typeof r!="function")throw new Error("This method accepts an options object as the first parameter, which includes the idToken, audience, and maxExpiry.");if(r)this.verifyIdTokenAsync(e).then(n=>r(null,n),r);else return this.verifyIdTokenAsync(e)}async verifyIdTokenAsync(e){if(!e.idToken)throw new Error("The verifyIdToken method requires an ID Token");let r=await this.getFederatedSignonCertsAsync();return await this.verifySignedJwtWithCertsAsync(e.idToken,r.certs,e.audience,this.issuers,e.maxExpiry)}async getTokenInfo(e){let{data:r}=await this.transporter.request({...t.RETRY_CONFIG,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded;charset=UTF-8",authorization:`Bearer ${e}`},url:this.endpoints.tokenInfoUrl.toString()}),n=Object.assign({expiry_date:new Date().getTime()+r.expires_in*1e3,scopes:r.scope.split(" ")},r);return delete n.expires_in,delete n.scope,n}getFederatedSignonCerts(e){if(e)this.getFederatedSignonCertsAsync().then(r=>e(null,r.certs,r.res),e);else return this.getFederatedSignonCertsAsync()}async getFederatedSignonCertsAsync(){let e=new Date().getTime(),r=(0,Up.hasBrowserCrypto)()?bn.JWK:bn.PEM;if(this.certificateExpiry&&e<this.certificateExpiry.getTime()&&this.certificateCacheFormat===r)return{certs:this.certificateCache,format:r};let n,i;switch(r){case bn.PEM:i=this.endpoints.oauth2FederatedSignonPemCertsUrl.toString();break;case bn.JWK:i=this.endpoints.oauth2FederatedSignonJwkCertsUrl.toString();break;default:throw new Error(`Unsupported certificate format ${r}`)}try{let m={...t.RETRY_CONFIG,url:i};fi.AuthClient.setMethodName(m,"getFederatedSignonCertsAsync"),n=await this.transporter.request(m)}catch(m){throw m instanceof Error&&(m.message=`Failed to retrieve verification certificates: ${m.message}`),m}let s=n?.headers.get("cache-control"),c=-1;if(s){let m=/max-age=(?<maxAge>[0-9]+)/.exec(s)?.groups?.maxAge;m&&(c=Number(m)*1e3)}let d={};switch(r){case bn.PEM:d=n.data;break;case bn.JWK:for(let m of n.data.keys)d[m.kid]=m;break;default:throw new Error(`Unsupported certificate format ${r}`)}let p=new Date;return this.certificateExpiry=c===-1?null:new Date(p.getTime()+c),this.certificateCache=d,this.certificateCacheFormat=r,{certs:d,format:r,res:n}}getIapPublicKeys(e){if(e)this.getIapPublicKeysAsync().then(r=>e(null,r.pubkeys,r.res),e);else return this.getIapPublicKeysAsync()}async getIapPublicKeysAsync(){let e,r=this.endpoints.oauth2IapPublicKeyUrl.toString();try{let n={...t.RETRY_CONFIG,url:r};fi.AuthClient.setMethodName(n,"getIapPublicKeysAsync"),e=await this.transporter.request(n)}catch(n){throw n instanceof Error&&(n.message=`Failed to retrieve verification certificates: ${n.message}`),n}return{pubkeys:e.data,res:e}}verifySignedJwtWithCerts(){throw new Error("verifySignedJwtWithCerts is removed, please use verifySignedJwtWithCertsAsync instead.")}async verifySignedJwtWithCertsAsync(e,r,n,i,s){let c=(0,Up.createCrypto)();s||(s=t.DEFAULT_MAX_TOKEN_LIFETIME_SECS_);let d=e.split(".");if(d.length!==3)throw new Error("Wrong number of segments in token: "+e);let p=d[0]+"."+d[1],m=d[2],y,h;try{y=JSON.parse(c.decodeBase64StringUtf8(d[0]))}catch(U){throw U instanceof Error&&(U.message=`Can't parse token envelope: ${d[0]}': ${U.message}`),U}if(!y)throw new Error("Can't parse token envelope: "+d[0]);try{h=JSON.parse(c.decodeBase64StringUtf8(d[1]))}catch(U){throw U instanceof Error&&(U.message=`Can't parse token payload '${d[0]}`),U}if(!h)throw new Error("Can't parse token payload: "+d[1]);if(!Object.prototype.hasOwnProperty.call(r,y.kid))throw new Error("No pem found for envelope: "+JSON.stringify(y));let f=r[y.kid];if(y.alg==="ES256"&&(m=dN.joseToDer(m,"ES256").toString("base64")),!await c.verify(f,p,m))throw new Error("Invalid token signature: "+e);if(!h.iat)throw new Error("No issue time in token: "+JSON.stringify(h));if(!h.exp)throw new Error("No expiration time in token: "+JSON.stringify(h));let g=Number(h.iat);if(isNaN(g))throw new Error("iat field using invalid format");let v=Number(h.exp);if(isNaN(v))throw new Error("exp field using invalid format");let E=new Date().getTime()/1e3;if(v>=E+s)throw new Error("Expiration time too far in future: "+JSON.stringify(h));let b=g-t.CLOCK_SKEW_SECS_,C=v+t.CLOCK_SKEW_SECS_;if(E<b)throw new Error("Token used too early, "+E+" < "+b+": "+JSON.stringify(h));if(E>C)throw new Error("Token used too late, "+E+" > "+C+": "+JSON.stringify(h));if(i&&i.indexOf(h.iss)<0)throw new Error("Invalid issuer, expected one of ["+i+"], but got "+h.iss);if(typeof n<"u"&&n!==null){let U=h.aud,J=!1;if(n.constructor===Array?J=n.indexOf(U)>-1:J=U===n,!J)throw new Error("Wrong recipient, payload audience != requiredAudience")}return new pN.LoginTicket(y,h)}async processAndValidateRefreshHandler(){if(this.refreshHandler){let e=await this.refreshHandler();if(!e.access_token)throw new Error("No access token is returned by the refreshHandler callback.");return e}}isTokenExpiring(){let e=this.credentials.expiry_date;return e?e<=new Date().getTime()+this.eagerRefreshThresholdMillis:!1}};Hr.OAuth2Client=Mp});var jp=D(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});Hu.Compute=void 0;var fN=ht(),Sw=xa(),mN=wo(),Lp=class extends mN.OAuth2Client{static{o(this,"Compute")}serviceAccountEmail;scopes;constructor(e={}){super(e),this.credentials={expiry_date:1,refresh_token:"compute-placeholder"},this.serviceAccountEmail=e.serviceAccountEmail||"default",this.scopes=Array.isArray(e.scopes)?e.scopes:e.scopes?[e.scopes]:[]}async refreshTokenNoCache(){let e=`service-accounts/${this.serviceAccountEmail}/token`,r;try{let i={property:e};this.scopes.length>0&&(i.params={scopes:this.scopes.join(",")}),r=await Sw.instance(i)}catch(i){throw i instanceof fN.GaxiosError&&(i.message=`Could not refresh access token: ${i.message}`,this.wrapError(i)),i}let n=r;return r&&r.expires_in&&(n.expiry_date=new Date().getTime()+r.expires_in*1e3,delete n.expires_in),this.emit("tokens",n),{tokens:n,res:null}}async fetchIdToken(e){let r=`service-accounts/${this.serviceAccountEmail}/identity?format=full&audience=${e}`,n;try{let i={property:r};n=await Sw.instance(i)}catch(i){throw i instanceof Error&&(i.message=`Could not fetch ID token: ${i.message}`),i}return n}wrapError(e){let r=e.response;r&&r.status&&(e.status=r.status,r.status===403?e.message="A Forbidden error was returned while attempting to retrieve an access token for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have the correct permission scopes specified: "+e.message:r.status===404&&(e.message="A Not Found error was returned while attempting to retrieve an accesstoken for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have any permission scopes specified: "+e.message))}};Hu.Compute=Lp});var qp=D(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});Wu.IdTokenClient=void 0;var hN=wo(),Fp=class extends hN.OAuth2Client{static{o(this,"IdTokenClient")}targetAudience;idTokenProvider;constructor(e){super(e),this.targetAudience=e.targetAudience,this.idTokenProvider=e.idTokenProvider}async getRequestMetadataAsync(){if(!this.credentials.id_token||!this.credentials.expiry_date||this.isTokenExpiring()){let r=await this.idTokenProvider.fetchIdToken(this.targetAudience);this.credentials={id_token:r,expiry_date:this.getIdTokenExpiryDate(r)}}return{headers:new Headers({authorization:"Bearer "+this.credentials.id_token})}}getIdTokenExpiryDate(e){let r=e.split(".")[1];if(r)return JSON.parse(Buffer.from(r,"base64").toString("ascii")).exp*1e3}};Wu.IdTokenClient=Fp});var Bp=D(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.GCPEnv=void 0;mi.clear=gN;mi.getEnv=yN;var ww=xa(),Wr;(function(t){t.APP_ENGINE="APP_ENGINE",t.KUBERNETES_ENGINE="KUBERNETES_ENGINE",t.CLOUD_FUNCTIONS="CLOUD_FUNCTIONS",t.COMPUTE_ENGINE="COMPUTE_ENGINE",t.CLOUD_RUN="CLOUD_RUN",t.CLOUD_RUN_JOBS="CLOUD_RUN_JOBS",t.NONE="NONE"})(Wr||(mi.GCPEnv=Wr={}));var Ra;function gN(){Ra=void 0}o(gN,"clear");async function yN(){return Ra||(Ra=vN(),Ra)}o(yN,"getEnv");async function vN(){let t=Wr.NONE;return _N()?t=Wr.APP_ENGINE:bN()?t=Wr.CLOUD_FUNCTIONS:await TN()?await wN()?t=Wr.KUBERNETES_ENGINE:EN()?t=Wr.CLOUD_RUN:SN()?t=Wr.CLOUD_RUN_JOBS:t=Wr.COMPUTE_ENGINE:t=Wr.NONE,t}o(vN,"getEnvMemoized");function _N(){return!!(process.env.GAE_SERVICE||process.env.GAE_MODULE_NAME)}o(_N,"isAppEngine");function bN(){return!!(process.env.FUNCTION_NAME||process.env.FUNCTION_TARGET)}o(bN,"isCloudFunction");function EN(){return!!process.env.K_CONFIGURATION}o(EN,"isCloudRun");function SN(){return!!process.env.CLOUD_RUN_JOB}o(SN,"isCloudRunJob");async function wN(){try{return await ww.instance("attributes/cluster-name"),!0}catch{return!1}}o(wN,"isKubernetesEngine");async function TN(){return ww.isAvailable()}o(TN,"isComputeEngine")});var Vp=D((n7,Tw)=>{var Zu=pi().Buffer,PN=require("stream"),xN=require("util");function Ku(t){if(this.buffer=null,this.writable=!0,this.readable=!0,!t)return this.buffer=Zu.alloc(0),this;if(typeof t.pipe=="function")return this.buffer=Zu.alloc(0),t.pipe(this),this;if(t.length||typeof t=="object")return this.buffer=t,this.writable=!1,process.nextTick(function(){this.emit("end",t),this.readable=!1,this.emit("close")}.bind(this)),this;throw new TypeError("Unexpected data type ("+typeof t+")")}o(Ku,"DataStream");xN.inherits(Ku,PN);Ku.prototype.write=o(function(e){this.buffer=Zu.concat([this.buffer,Zu.from(e)]),this.emit("data",e)},"write");Ku.prototype.end=o(function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1},"end");Tw.exports=Ku});var xw=D((i7,Pw)=>{"use strict";var Ca=require("buffer").Buffer,Gp=require("buffer").SlowBuffer;Pw.exports=Ju;function Ju(t,e){if(!Ca.isBuffer(t)||!Ca.isBuffer(e)||t.length!==e.length)return!1;for(var r=0,n=0;n<t.length;n++)r|=t[n]^e[n];return r===0}o(Ju,"bufferEq");Ju.install=function(){Ca.prototype.equal=Gp.prototype.equal=o(function(e){return Ju(this,e)},"equal")};var AN=Ca.prototype.equal,IN=Gp.prototype.equal;Ju.restore=function(){Ca.prototype.equal=AN,Gp.prototype.equal=IN}});var Kp=D((s7,Nw)=>{var gi=pi().Buffer,vr=require("crypto"),Iw=Ip(),Aw=require("util"),RN=`"%s" is not a valid algorithm.
|
|
30
|
+
`,typeof r.content=="string"?yield r.content:yield*r.content,yield`\r
|
|
31
|
+
`}yield o}static#i;static#a;static async#s(){return this.#i||=(await Promise.resolve().then(()=>Ke(L0()))).HttpsProxyAgent,this.#i}static async#c(){let t=typeof window<"u"&&!!window;return this.#a||=t?window.fetch:(await Promise.resolve().then(()=>($O(),kO))).default,this.#a}static mergeHeaders(t,...n){t=t instanceof Headers?t:new Headers(t);for(let o of n)(o instanceof Headers?o:new Headers(o)).forEach((i,s)=>{s==="set-cookie"?t.append(s,i):t.set(s,i)});return t}};La.Gaxios=Jf;Ma=Jf});var Pt=z(Qt=>{"use strict";var f6=Qt&&Qt.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),m6=Qt&&Qt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&f6(t,e,n)};Object.defineProperty(Qt,"__esModule",{value:!0});Qt.instance=Qt.Gaxios=Qt.GaxiosError=void 0;Qt.request=g6;var UO=zO();Object.defineProperty(Qt,"Gaxios",{enumerable:!0,get:a(function(){return UO.Gaxios},"get")});var h6=jb();Object.defineProperty(Qt,"GaxiosError",{enumerable:!0,get:a(function(){return h6.GaxiosError},"get")});m6(qb(),Qt);Qt.instance=new UO.Gaxios;async function g6(e){return Qt.instance.request(e)}a(g6,"request")});var dE=z((MO,Yf)=>{(function(e){"use strict";var t,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,r=Math.floor,i="[BigNumber Error] ",s=i+"Number primitive has more than 15 significant digits: ",u=1e14,d=14,f=9007199254740991,h=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,m=1e9;function p(H){var K,ee,se,Q=ae.prototype={constructor:ae,toString:null,valueOf:null},Le=new ae(1),ce=20,J=4,W=-7,ne=21,X=-1e7,pe=1e7,he=!1,Ne=1,je=0,rt={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},ut="0123456789abcdefghijklmnopqrstuvwxyz",kt=!0;function ae(T,w){var x,M,C,D,F,R,$,L,U=this;if(!(U instanceof ae))return new ae(T,w);if(w==null){if(T&&T._isBigNumber===!0){U.s=T.s,!T.c||T.e>pe?U.c=U.e=null:T.e<X?U.c=[U.e=0]:(U.e=T.e,U.c=T.c.slice());return}if((R=typeof T=="number")&&T*0==0){if(U.s=1/T<0?(T=-T,-1):1,T===~~T){for(D=0,F=T;F>=10;F/=10,D++);D>pe?U.c=U.e=null:(U.e=D,U.c=[T]);return}L=String(T)}else{if(!n.test(L=String(T)))return se(U,L,R);U.s=L.charCodeAt(0)==45?(L=L.slice(1),-1):1}(D=L.indexOf("."))>-1&&(L=L.replace(".","")),(F=L.search(/e/i))>0?(D<0&&(D=F),D+=+L.slice(F+1),L=L.substring(0,F)):D<0&&(D=L.length)}else{if(b(w,2,ut.length,"Base"),w==10&&kt)return U=new ae(T),Xe(U,ce+U.e+1,J);if(L=String(T),R=typeof T=="number"){if(T*0!=0)return se(U,L,R,w);if(U.s=1/T<0?(L=L.slice(1),-1):1,ae.DEBUG&&L.replace(/^0\.0*|\./,"").length>15)throw Error(s+T)}else U.s=L.charCodeAt(0)===45?(L=L.slice(1),-1):1;for(x=ut.slice(0,w),D=F=0,$=L.length;F<$;F++)if(x.indexOf(M=L.charAt(F))<0){if(M=="."){if(F>D){D=$;continue}}else if(!C&&(L==L.toUpperCase()&&(L=L.toLowerCase())||L==L.toLowerCase()&&(L=L.toUpperCase()))){C=!0,F=-1,D=0;continue}return se(U,String(T),R,w)}R=!1,L=ee(L,w,10,U.s),(D=L.indexOf("."))>-1?L=L.replace(".",""):D=L.length}for(F=0;L.charCodeAt(F)===48;F++);for($=L.length;L.charCodeAt(--$)===48;);if(L=L.slice(F,++$)){if($-=F,R&&ae.DEBUG&&$>15&&(T>f||T!==r(T)))throw Error(s+U.s*T);if((D=D-F-1)>pe)U.c=U.e=null;else if(D<X)U.c=[U.e=0];else{if(U.e=D,U.c=[],F=(D+1)%d,D<0&&(F+=d),F<$){for(F&&U.c.push(+L.slice(0,F)),$-=d;F<$;)U.c.push(+L.slice(F,F+=d));F=d-(L=L.slice(F)).length}else F-=$;for(;F--;L+="0");U.c.push(+L)}}else U.c=[U.e=0]}a(ae,"BigNumber"),ae.clone=p,ae.ROUND_UP=0,ae.ROUND_DOWN=1,ae.ROUND_CEIL=2,ae.ROUND_FLOOR=3,ae.ROUND_HALF_UP=4,ae.ROUND_HALF_DOWN=5,ae.ROUND_HALF_EVEN=6,ae.ROUND_HALF_CEIL=7,ae.ROUND_HALF_FLOOR=8,ae.EUCLID=9,ae.config=ae.set=function(T){var w,x;if(T!=null)if(typeof T=="object"){if(T.hasOwnProperty(w="DECIMAL_PLACES")&&(x=T[w],b(x,0,m,w),ce=x),T.hasOwnProperty(w="ROUNDING_MODE")&&(x=T[w],b(x,0,8,w),J=x),T.hasOwnProperty(w="EXPONENTIAL_AT")&&(x=T[w],x&&x.pop?(b(x[0],-m,0,w),b(x[1],0,m,w),W=x[0],ne=x[1]):(b(x,-m,m,w),W=-(ne=x<0?-x:x))),T.hasOwnProperty(w="RANGE"))if(x=T[w],x&&x.pop)b(x[0],-m,-1,w),b(x[1],1,m,w),X=x[0],pe=x[1];else if(b(x,-m,m,w),x)X=-(pe=x<0?-x:x);else throw Error(i+w+" cannot be zero: "+x);if(T.hasOwnProperty(w="CRYPTO"))if(x=T[w],x===!!x)if(x)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))he=x;else throw he=!x,Error(i+"crypto unavailable");else he=x;else throw Error(i+w+" not true or false: "+x);if(T.hasOwnProperty(w="MODULO_MODE")&&(x=T[w],b(x,0,9,w),Ne=x),T.hasOwnProperty(w="POW_PRECISION")&&(x=T[w],b(x,0,m,w),je=x),T.hasOwnProperty(w="FORMAT"))if(x=T[w],typeof x=="object")rt=x;else throw Error(i+w+" not an object: "+x);if(T.hasOwnProperty(w="ALPHABET"))if(x=T[w],typeof x=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(x))kt=x.slice(0,10)=="0123456789",ut=x;else throw Error(i+w+" invalid: "+x)}else throw Error(i+"Object expected: "+T);return{DECIMAL_PLACES:ce,ROUNDING_MODE:J,EXPONENTIAL_AT:[W,ne],RANGE:[X,pe],CRYPTO:he,MODULO_MODE:Ne,POW_PRECISION:je,FORMAT:rt,ALPHABET:ut}},ae.isBigNumber=function(T){if(!T||T._isBigNumber!==!0)return!1;if(!ae.DEBUG)return!0;var w,x,M=T.c,C=T.e,D=T.s;e:if({}.toString.call(M)=="[object Array]"){if((D===1||D===-1)&&C>=-m&&C<=m&&C===r(C)){if(M[0]===0){if(C===0&&M.length===1)return!0;break e}if(w=(C+1)%d,w<1&&(w+=d),String(M[0]).length==w){for(w=0;w<M.length;w++)if(x=M[w],x<0||x>=u||x!==r(x))break e;if(x!==0)return!0}}}else if(M===null&&C===null&&(D===null||D===1||D===-1))return!0;throw Error(i+"Invalid BigNumber: "+T)},ae.maximum=ae.max=function(){return St(arguments,-1)},ae.minimum=ae.min=function(){return St(arguments,1)},ae.random=(function(){var T=9007199254740992,w=Math.random()*T&2097151?function(){return r(Math.random()*T)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(x){var M,C,D,F,R,$=0,L=[],U=new ae(Le);if(x==null?x=ce:b(x,0,m),F=o(x/d),he)if(crypto.getRandomValues){for(M=crypto.getRandomValues(new Uint32Array(F*=2));$<F;)R=M[$]*131072+(M[$+1]>>>11),R>=9e15?(C=crypto.getRandomValues(new Uint32Array(2)),M[$]=C[0],M[$+1]=C[1]):(L.push(R%1e14),$+=2);$=F/2}else if(crypto.randomBytes){for(M=crypto.randomBytes(F*=7);$<F;)R=(M[$]&31)*281474976710656+M[$+1]*1099511627776+M[$+2]*4294967296+M[$+3]*16777216+(M[$+4]<<16)+(M[$+5]<<8)+M[$+6],R>=9e15?crypto.randomBytes(7).copy(M,$):(L.push(R%1e14),$+=7);$=F/7}else throw he=!1,Error(i+"crypto unavailable");if(!he)for(;$<F;)R=w(),R<9e15&&(L[$++]=R%1e14);for(F=L[--$],x%=d,F&&x&&(R=h[d-x],L[$]=r(F/R)*R);L[$]===0;L.pop(),$--);if($<0)L=[D=0];else{for(D=-1;L[0]===0;L.splice(0,1),D-=d);for($=1,R=L[0];R>=10;R/=10,$++);$<d&&(D-=d-$)}return U.e=D,U.c=L,U}})(),ae.sum=function(){for(var T=1,w=arguments,x=new ae(w[0]);T<w.length;)x=x.plus(w[T++]);return x},ee=(function(){var T="0123456789";function w(x,M,C,D){for(var F,R=[0],$,L=0,U=x.length;L<U;){for($=R.length;$--;R[$]*=M);for(R[0]+=D.indexOf(x.charAt(L++)),F=0;F<R.length;F++)R[F]>C-1&&(R[F+1]==null&&(R[F+1]=0),R[F+1]+=R[F]/C|0,R[F]%=C)}return R.reverse()}return a(w,"toBaseOut"),function(x,M,C,D,F){var R,$,L,U,Y,ge,ve,We,mt=x.indexOf("."),ht=ce,He=J;for(mt>=0&&(U=je,je=0,x=x.replace(".",""),We=new ae(M),ge=We.pow(x.length-mt),je=U,We.c=w(Z(v(ge.c),ge.e,"0"),10,C,T),We.e=We.c.length),ve=w(x,M,C,F?(R=ut,T):(R=T,ut)),L=U=ve.length;ve[--U]==0;ve.pop());if(!ve[0])return R.charAt(0);if(mt<0?--L:(ge.c=ve,ge.e=L,ge.s=D,ge=K(ge,We,ht,He,C),ve=ge.c,Y=ge.r,L=ge.e),$=L+ht+1,mt=ve[$],U=C/2,Y=Y||$<0||ve[$+1]!=null,Y=He<4?(mt!=null||Y)&&(He==0||He==(ge.s<0?3:2)):mt>U||mt==U&&(He==4||Y||He==6&&ve[$-1]&1||He==(ge.s<0?8:7)),$<1||!ve[0])x=Y?Z(R.charAt(1),-ht,R.charAt(0)):R.charAt(0);else{if(ve.length=$,Y)for(--C;++ve[--$]>C;)ve[$]=0,$||(++L,ve=[1].concat(ve));for(U=ve.length;!ve[--U];);for(mt=0,x="";mt<=U;x+=R.charAt(ve[mt++]));x=Z(x,L,R.charAt(0))}return x}})(),K=(function(){function T(M,C,D){var F,R,$,L,U=0,Y=M.length,ge=C%g,ve=C/g|0;for(M=M.slice();Y--;)$=M[Y]%g,L=M[Y]/g|0,F=ve*$+L*ge,R=ge*$+F%g*g+U,U=(R/D|0)+(F/g|0)+ve*L,M[Y]=R%D;return U&&(M=[U].concat(M)),M}a(T,"multiply");function w(M,C,D,F){var R,$;if(D!=F)$=D>F?1:-1;else for(R=$=0;R<D;R++)if(M[R]!=C[R]){$=M[R]>C[R]?1:-1;break}return $}a(w,"compare");function x(M,C,D,F){for(var R=0;D--;)M[D]-=R,R=M[D]<C[D]?1:0,M[D]=R*F+M[D]-C[D];for(;!M[0]&&M.length>1;M.splice(0,1));}return a(x,"subtract"),function(M,C,D,F,R){var $,L,U,Y,ge,ve,We,mt,ht,He,Ye,It,Oi,ki,$i,fr,Cn,qt=M.s==C.s?1:-1,Rt=M.c,it=C.c;if(!Rt||!Rt[0]||!it||!it[0])return new ae(!M.s||!C.s||(Rt?it&&Rt[0]==it[0]:!it)?NaN:Rt&&Rt[0]==0||!it?qt*0:qt/0);for(mt=new ae(qt),ht=mt.c=[],L=M.e-C.e,qt=D+L+1,R||(R=u,L=y(M.e/d)-y(C.e/d),qt=qt/d|0),U=0;it[U]==(Rt[U]||0);U++);if(it[U]>(Rt[U]||0)&&L--,qt<0)ht.push(1),Y=!0;else{for(ki=Rt.length,fr=it.length,U=0,qt+=2,ge=r(R/(it[0]+1)),ge>1&&(it=T(it,ge,R),Rt=T(Rt,ge,R),fr=it.length,ki=Rt.length),Oi=fr,He=Rt.slice(0,fr),Ye=He.length;Ye<fr;He[Ye++]=0);Cn=it.slice(),Cn=[0].concat(Cn),$i=it[0],it[1]>=R/2&&$i++;do{if(ge=0,$=w(it,He,fr,Ye),$<0){if(It=He[0],fr!=Ye&&(It=It*R+(He[1]||0)),ge=r(It/$i),ge>1)for(ge>=R&&(ge=R-1),ve=T(it,ge,R),We=ve.length,Ye=He.length;w(ve,He,We,Ye)==1;)ge--,x(ve,fr<We?Cn:it,We,R),We=ve.length,$=1;else ge==0&&($=ge=1),ve=it.slice(),We=ve.length;if(We<Ye&&(ve=[0].concat(ve)),x(He,ve,Ye,R),Ye=He.length,$==-1)for(;w(it,He,fr,Ye)<1;)ge++,x(He,fr<Ye?Cn:it,Ye,R),Ye=He.length}else $===0&&(ge++,He=[0]);ht[U++]=ge,He[0]?He[Ye++]=Rt[Oi]||0:(He=[Rt[Oi]],Ye=1)}while((Oi++<ki||He[0]!=null)&&qt--);Y=He[0]!=null,ht[0]||ht.splice(0,1)}if(R==u){for(U=1,qt=ht[0];qt>=10;qt/=10,U++);Xe(mt,D+(mt.e=U+L*d-1)+1,F,Y)}else mt.e=L,mt.r=+Y;return mt}})();function bt(T,w,x,M){var C,D,F,R,$;if(x==null?x=J:b(x,0,8),!T.c)return T.toString();if(C=T.c[0],F=T.e,w==null)$=v(T.c),$=M==1||M==2&&(F<=W||F>=ne)?N($,F):Z($,F,"0");else if(T=Xe(new ae(T),w,x),D=T.e,$=v(T.c),R=$.length,M==1||M==2&&(w<=D||D<=W)){for(;R<w;$+="0",R++);$=N($,D)}else if(w-=F+(M===2&&D>F),$=Z($,D,"0"),D+1>R){if(--w>0)for($+=".";w--;$+="0");}else if(w+=D-R,w>0)for(D+1==R&&($+=".");w--;$+="0");return T.s<0&&C?"-"+$:$}a(bt,"format");function St(T,w){for(var x,M,C=1,D=new ae(T[0]);C<T.length;C++)M=new ae(T[C]),(!M.s||(x=E(D,M))===w||x===0&&D.s===w)&&(D=M);return D}a(St,"maxOrMin");function pr(T,w,x){for(var M=1,C=w.length;!w[--C];w.pop());for(C=w[0];C>=10;C/=10,M++);return(x=M+x*d-1)>pe?T.c=T.e=null:x<X?T.c=[T.e=0]:(T.e=x,T.c=w),T}a(pr,"normalise"),se=(function(){var T=/^(-?)0([xbo])(?=\w[\w.]*$)/i,w=/^([^.]+)\.$/,x=/^\.([^.]+)$/,M=/^-?(Infinity|NaN)$/,C=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(D,F,R,$){var L,U=R?F:F.replace(C,"");if(M.test(U))D.s=isNaN(U)?null:U<0?-1:1;else{if(!R&&(U=U.replace(T,function(Y,ge,ve){return L=(ve=ve.toLowerCase())=="x"?16:ve=="b"?2:8,!$||$==L?ge:Y}),$&&(L=$,U=U.replace(w,"$1").replace(x,"0.$1")),F!=U))return new ae(U,L);if(ae.DEBUG)throw Error(i+"Not a"+($?" base "+$:"")+" number: "+F);D.s=null}D.c=D.e=null}})();function Xe(T,w,x,M){var C,D,F,R,$,L,U,Y=T.c,ge=h;if(Y){e:{for(C=1,R=Y[0];R>=10;R/=10,C++);if(D=w-C,D<0)D+=d,F=w,$=Y[L=0],U=r($/ge[C-F-1]%10);else if(L=o((D+1)/d),L>=Y.length)if(M){for(;Y.length<=L;Y.push(0));$=U=0,C=1,D%=d,F=D-d+1}else break e;else{for($=R=Y[L],C=1;R>=10;R/=10,C++);D%=d,F=D-d+C,U=F<0?0:r($/ge[C-F-1]%10)}if(M=M||w<0||Y[L+1]!=null||(F<0?$:$%ge[C-F-1]),M=x<4?(U||M)&&(x==0||x==(T.s<0?3:2)):U>5||U==5&&(x==4||M||x==6&&(D>0?F>0?$/ge[C-F]:0:Y[L-1])%10&1||x==(T.s<0?8:7)),w<1||!Y[0])return Y.length=0,M?(w-=T.e+1,Y[0]=ge[(d-w%d)%d],T.e=-w||0):Y[0]=T.e=0,T;if(D==0?(Y.length=L,R=1,L--):(Y.length=L+1,R=ge[d-D],Y[L]=F>0?r($/ge[C-F]%ge[F])*R:0),M)for(;;)if(L==0){for(D=1,F=Y[0];F>=10;F/=10,D++);for(F=Y[0]+=R,R=1;F>=10;F/=10,R++);D!=R&&(T.e++,Y[0]==u&&(Y[0]=1));break}else{if(Y[L]+=R,Y[L]!=u)break;Y[L--]=0,R=1}for(D=Y.length;Y[--D]===0;Y.pop());}T.e>pe?T.c=T.e=null:T.e<X&&(T.c=[T.e=0])}return T}a(Xe,"round");function ot(T){var w,x=T.e;return x===null?T.toString():(w=v(T.c),w=x<=W||x>=ne?N(w,x):Z(w,x,"0"),T.s<0?"-"+w:w)}return a(ot,"valueOf"),Q.absoluteValue=Q.abs=function(){var T=new ae(this);return T.s<0&&(T.s=1),T},Q.comparedTo=function(T,w){return E(this,new ae(T,w))},Q.decimalPlaces=Q.dp=function(T,w){var x,M,C,D=this;if(T!=null)return b(T,0,m),w==null?w=J:b(w,0,8),Xe(new ae(D),T+D.e+1,w);if(!(x=D.c))return null;if(M=((C=x.length-1)-y(this.e/d))*d,C=x[C])for(;C%10==0;C/=10,M--);return M<0&&(M=0),M},Q.dividedBy=Q.div=function(T,w){return K(this,new ae(T,w),ce,J)},Q.dividedToIntegerBy=Q.idiv=function(T,w){return K(this,new ae(T,w),0,1)},Q.exponentiatedBy=Q.pow=function(T,w){var x,M,C,D,F,R,$,L,U,Y=this;if(T=new ae(T),T.c&&!T.isInteger())throw Error(i+"Exponent not an integer: "+ot(T));if(w!=null&&(w=new ae(w)),R=T.e>14,!Y.c||!Y.c[0]||Y.c[0]==1&&!Y.e&&Y.c.length==1||!T.c||!T.c[0])return U=new ae(Math.pow(+ot(Y),R?T.s*(2-k(T)):+ot(T))),w?U.mod(w):U;if($=T.s<0,w){if(w.c?!w.c[0]:!w.s)return new ae(NaN);M=!$&&Y.isInteger()&&w.isInteger(),M&&(Y=Y.mod(w))}else{if(T.e>9&&(Y.e>0||Y.e<-1||(Y.e==0?Y.c[0]>1||R&&Y.c[1]>=24e7:Y.c[0]<8e13||R&&Y.c[0]<=9999975e7)))return D=Y.s<0&&k(T)?-0:0,Y.e>-1&&(D=1/D),new ae($?1/D:D);je&&(D=o(je/d+2))}for(R?(x=new ae(.5),$&&(T.s=1),L=k(T)):(C=Math.abs(+ot(T)),L=C%2),U=new ae(Le);;){if(L){if(U=U.times(Y),!U.c)break;D?U.c.length>D&&(U.c.length=D):M&&(U=U.mod(w))}if(C){if(C=r(C/2),C===0)break;L=C%2}else if(T=T.times(x),Xe(T,T.e+1,1),T.e>14)L=k(T);else{if(C=+ot(T),C===0)break;L=C%2}Y=Y.times(Y),D?Y.c&&Y.c.length>D&&(Y.c.length=D):M&&(Y=Y.mod(w))}return M?U:($&&(U=Le.div(U)),w?U.mod(w):D?Xe(U,je,J,F):U)},Q.integerValue=function(T){var w=new ae(this);return T==null?T=J:b(T,0,8),Xe(w,w.e+1,T)},Q.isEqualTo=Q.eq=function(T,w){return E(this,new ae(T,w))===0},Q.isFinite=function(){return!!this.c},Q.isGreaterThan=Q.gt=function(T,w){return E(this,new ae(T,w))>0},Q.isGreaterThanOrEqualTo=Q.gte=function(T,w){return(w=E(this,new ae(T,w)))===1||w===0},Q.isInteger=function(){return!!this.c&&y(this.e/d)>this.c.length-2},Q.isLessThan=Q.lt=function(T,w){return E(this,new ae(T,w))<0},Q.isLessThanOrEqualTo=Q.lte=function(T,w){return(w=E(this,new ae(T,w)))===-1||w===0},Q.isNaN=function(){return!this.s},Q.isNegative=function(){return this.s<0},Q.isPositive=function(){return this.s>0},Q.isZero=function(){return!!this.c&&this.c[0]==0},Q.minus=function(T,w){var x,M,C,D,F=this,R=F.s;if(T=new ae(T,w),w=T.s,!R||!w)return new ae(NaN);if(R!=w)return T.s=-w,F.plus(T);var $=F.e/d,L=T.e/d,U=F.c,Y=T.c;if(!$||!L){if(!U||!Y)return U?(T.s=-w,T):new ae(Y?F:NaN);if(!U[0]||!Y[0])return Y[0]?(T.s=-w,T):new ae(U[0]?F:J==3?-0:0)}if($=y($),L=y(L),U=U.slice(),R=$-L){for((D=R<0)?(R=-R,C=U):(L=$,C=Y),C.reverse(),w=R;w--;C.push(0));C.reverse()}else for(M=(D=(R=U.length)<(w=Y.length))?R:w,R=w=0;w<M;w++)if(U[w]!=Y[w]){D=U[w]<Y[w];break}if(D&&(C=U,U=Y,Y=C,T.s=-T.s),w=(M=Y.length)-(x=U.length),w>0)for(;w--;U[x++]=0);for(w=u-1;M>R;){if(U[--M]<Y[M]){for(x=M;x&&!U[--x];U[x]=w);--U[x],U[M]+=u}U[M]-=Y[M]}for(;U[0]==0;U.splice(0,1),--L);return U[0]?pr(T,U,L):(T.s=J==3?-1:1,T.c=[T.e=0],T)},Q.modulo=Q.mod=function(T,w){var x,M,C=this;return T=new ae(T,w),!C.c||!T.s||T.c&&!T.c[0]?new ae(NaN):!T.c||C.c&&!C.c[0]?new ae(C):(Ne==9?(M=T.s,T.s=1,x=K(C,T,0,3),T.s=M,x.s*=M):x=K(C,T,0,Ne),T=C.minus(x.times(T)),!T.c[0]&&Ne==1&&(T.s=C.s),T)},Q.multipliedBy=Q.times=function(T,w){var x,M,C,D,F,R,$,L,U,Y,ge,ve,We,mt,ht,He=this,Ye=He.c,It=(T=new ae(T,w)).c;if(!Ye||!It||!Ye[0]||!It[0])return!He.s||!T.s||Ye&&!Ye[0]&&!It||It&&!It[0]&&!Ye?T.c=T.e=T.s=null:(T.s*=He.s,!Ye||!It?T.c=T.e=null:(T.c=[0],T.e=0)),T;for(M=y(He.e/d)+y(T.e/d),T.s*=He.s,$=Ye.length,Y=It.length,$<Y&&(We=Ye,Ye=It,It=We,C=$,$=Y,Y=C),C=$+Y,We=[];C--;We.push(0));for(mt=u,ht=g,C=Y;--C>=0;){for(x=0,ge=It[C]%ht,ve=It[C]/ht|0,F=$,D=C+F;D>C;)L=Ye[--F]%ht,U=Ye[F]/ht|0,R=ve*L+U*ge,L=ge*L+R%ht*ht+We[D]+x,x=(L/mt|0)+(R/ht|0)+ve*U,We[D--]=L%mt;We[D]=x}return x?++M:We.splice(0,1),pr(T,We,M)},Q.negated=function(){var T=new ae(this);return T.s=-T.s||null,T},Q.plus=function(T,w){var x,M=this,C=M.s;if(T=new ae(T,w),w=T.s,!C||!w)return new ae(NaN);if(C!=w)return T.s=-w,M.minus(T);var D=M.e/d,F=T.e/d,R=M.c,$=T.c;if(!D||!F){if(!R||!$)return new ae(C/0);if(!R[0]||!$[0])return $[0]?T:new ae(R[0]?M:C*0)}if(D=y(D),F=y(F),R=R.slice(),C=D-F){for(C>0?(F=D,x=$):(C=-C,x=R),x.reverse();C--;x.push(0));x.reverse()}for(C=R.length,w=$.length,C-w<0&&(x=$,$=R,R=x,w=C),C=0;w;)C=(R[--w]=R[w]+$[w]+C)/u|0,R[w]=u===R[w]?0:R[w]%u;return C&&(R=[C].concat(R),++F),pr(T,R,F)},Q.precision=Q.sd=function(T,w){var x,M,C,D=this;if(T!=null&&T!==!!T)return b(T,1,m),w==null?w=J:b(w,0,8),Xe(new ae(D),T,w);if(!(x=D.c))return null;if(C=x.length-1,M=C*d+1,C=x[C]){for(;C%10==0;C/=10,M--);for(C=x[0];C>=10;C/=10,M++);}return T&&D.e+1>M&&(M=D.e+1),M},Q.shiftedBy=function(T){return b(T,-f,f),this.times("1e"+T)},Q.squareRoot=Q.sqrt=function(){var T,w,x,M,C,D=this,F=D.c,R=D.s,$=D.e,L=ce+4,U=new ae("0.5");if(R!==1||!F||!F[0])return new ae(!R||R<0&&(!F||F[0])?NaN:F?D:1/0);if(R=Math.sqrt(+ot(D)),R==0||R==1/0?(w=v(F),(w.length+$)%2==0&&(w+="0"),R=Math.sqrt(+w),$=y(($+1)/2)-($<0||$%2),R==1/0?w="5e"+$:(w=R.toExponential(),w=w.slice(0,w.indexOf("e")+1)+$),x=new ae(w)):x=new ae(R+""),x.c[0]){for($=x.e,R=$+L,R<3&&(R=0);;)if(C=x,x=U.times(C.plus(K(D,C,L,1))),v(C.c).slice(0,R)===(w=v(x.c)).slice(0,R))if(x.e<$&&--R,w=w.slice(R-3,R+1),w=="9999"||!M&&w=="4999"){if(!M&&(Xe(C,C.e+ce+2,0),C.times(C).eq(D))){x=C;break}L+=4,R+=4,M=1}else{(!+w||!+w.slice(1)&&w.charAt(0)=="5")&&(Xe(x,x.e+ce+2,1),T=!x.times(x).eq(D));break}}return Xe(x,x.e+ce+1,J,T)},Q.toExponential=function(T,w){return T!=null&&(b(T,0,m),T++),bt(this,T,w,1)},Q.toFixed=function(T,w){return T!=null&&(b(T,0,m),T=T+this.e+1),bt(this,T,w)},Q.toFormat=function(T,w,x){var M,C=this;if(x==null)T!=null&&w&&typeof w=="object"?(x=w,w=null):T&&typeof T=="object"?(x=T,T=w=null):x=rt;else if(typeof x!="object")throw Error(i+"Argument not an object: "+x);if(M=C.toFixed(T,w),C.c){var D,F=M.split("."),R=+x.groupSize,$=+x.secondaryGroupSize,L=x.groupSeparator||"",U=F[0],Y=F[1],ge=C.s<0,ve=ge?U.slice(1):U,We=ve.length;if($&&(D=R,R=$,$=D,We-=D),R>0&&We>0){for(D=We%R||R,U=ve.substr(0,D);D<We;D+=R)U+=L+ve.substr(D,R);$>0&&(U+=L+ve.slice(D)),ge&&(U="-"+U)}M=Y?U+(x.decimalSeparator||"")+(($=+x.fractionGroupSize)?Y.replace(new RegExp("\\d{"+$+"}\\B","g"),"$&"+(x.fractionGroupSeparator||"")):Y):U}return(x.prefix||"")+M+(x.suffix||"")},Q.toFraction=function(T){var w,x,M,C,D,F,R,$,L,U,Y,ge,ve=this,We=ve.c;if(T!=null&&(R=new ae(T),!R.isInteger()&&(R.c||R.s!==1)||R.lt(Le)))throw Error(i+"Argument "+(R.isInteger()?"out of range: ":"not an integer: ")+ot(R));if(!We)return new ae(ve);for(w=new ae(Le),L=x=new ae(Le),M=$=new ae(Le),ge=v(We),D=w.e=ge.length-ve.e-1,w.c[0]=h[(F=D%d)<0?d+F:F],T=!T||R.comparedTo(w)>0?D>0?w:L:R,F=pe,pe=1/0,R=new ae(ge),$.c[0]=0;U=K(R,w,0,1),C=x.plus(U.times(M)),C.comparedTo(T)!=1;)x=M,M=C,L=$.plus(U.times(C=L)),$=C,w=R.minus(U.times(C=w)),R=C;return C=K(T.minus(x),M,0,1),$=$.plus(C.times(L)),x=x.plus(C.times(M)),$.s=L.s=ve.s,D=D*2,Y=K(L,M,D,J).minus(ve).abs().comparedTo(K($,x,D,J).minus(ve).abs())<1?[L,M]:[$,x],pe=F,Y},Q.toNumber=function(){return+ot(this)},Q.toPrecision=function(T,w){return T!=null&&b(T,1,m),bt(this,T,w,2)},Q.toString=function(T){var w,x=this,M=x.s,C=x.e;return C===null?M?(w="Infinity",M<0&&(w="-"+w)):w="NaN":(T==null?w=C<=W||C>=ne?N(v(x.c),C):Z(v(x.c),C,"0"):T===10&&kt?(x=Xe(new ae(x),ce+C+1,J),w=Z(v(x.c),x.e,"0")):(b(T,2,ut.length,"Base"),w=ee(Z(v(x.c),C,"0"),10,T,M,!0)),M<0&&x.c[0]&&(w="-"+w)),w},Q.valueOf=Q.toJSON=function(){return ot(this)},Q._isBigNumber=!0,H!=null&&ae.set(H),ae}a(p,"clone");function y(H){var K=H|0;return H>0||H===K?K:K-1}a(y,"bitFloor");function v(H){for(var K,ee,se=1,Q=H.length,Le=H[0]+"";se<Q;){for(K=H[se++]+"",ee=d-K.length;ee--;K="0"+K);Le+=K}for(Q=Le.length;Le.charCodeAt(--Q)===48;);return Le.slice(0,Q+1||1)}a(v,"coeffToString");function E(H,K){var ee,se,Q=H.c,Le=K.c,ce=H.s,J=K.s,W=H.e,ne=K.e;if(!ce||!J)return null;if(ee=Q&&!Q[0],se=Le&&!Le[0],ee||se)return ee?se?0:-J:ce;if(ce!=J)return ce;if(ee=ce<0,se=W==ne,!Q||!Le)return se?0:!Q^ee?1:-1;if(!se)return W>ne^ee?1:-1;for(J=(W=Q.length)<(ne=Le.length)?W:ne,ce=0;ce<J;ce++)if(Q[ce]!=Le[ce])return Q[ce]>Le[ce]^ee?1:-1;return W==ne?0:W>ne^ee?1:-1}a(E,"compare");function b(H,K,ee,se){if(H<K||H>ee||H!==r(H))throw Error(i+(se||"Argument")+(typeof H=="number"?H<K||H>ee?" out of range: ":" not an integer: ":" not a primitive number: ")+String(H))}a(b,"intCheck");function k(H){var K=H.c.length-1;return y(H.e/d)==K&&H.c[K]%2!=0}a(k,"isOdd");function N(H,K){return(H.length>1?H.charAt(0)+"."+H.slice(1):H)+(K<0?"e":"e+")+K}a(N,"toExponential");function Z(H,K,ee){var se,Q;if(K<0){for(Q=ee+".";++K;Q+=ee);H=Q+H}else if(se=H.length,++K>se){for(Q=ee,K-=se;--K;Q+=ee);H+=Q}else K<se&&(H=H.slice(0,K)+"."+H.slice(K));return H}a(Z,"toFixedPoint"),t=p(),t.default=t.BigNumber=t,typeof define=="function"&&define.amd?define(function(){return t}):typeof Yf<"u"&&Yf.exports?Yf.exports=t:(e||(e=typeof self<"u"&&self?self:window),e.BigNumber=t)})(MO)});var BO=z((lae,FO)=>{var LO=dE(),jO=FO.exports;(function(){"use strict";function e(f){return f<10?"0"+f:f}a(e,"f");var t=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o,r,i={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},s;function u(f){return n.lastIndex=0,n.test(f)?'"'+f.replace(n,function(h){var g=i[h];return typeof g=="string"?g:"\\u"+("0000"+h.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+f+'"'}a(u,"quote");function d(f,h){var g,m,p,y,v=o,E,b=h[f],k=b!=null&&(b instanceof LO||LO.isBigNumber(b));switch(b&&typeof b=="object"&&typeof b.toJSON=="function"&&(b=b.toJSON(f)),typeof s=="function"&&(b=s.call(h,f,b)),typeof b){case"string":return k?b:u(b);case"number":return isFinite(b)?String(b):"null";case"boolean":case"null":case"bigint":return String(b);case"object":if(!b)return"null";if(o+=r,E=[],Object.prototype.toString.apply(b)==="[object Array]"){for(y=b.length,g=0;g<y;g+=1)E[g]=d(g,b)||"null";return p=E.length===0?"[]":o?`[
|
|
32
|
+
`+o+E.join(`,
|
|
33
|
+
`+o)+`
|
|
34
|
+
`+v+"]":"["+E.join(",")+"]",o=v,p}if(s&&typeof s=="object")for(y=s.length,g=0;g<y;g+=1)typeof s[g]=="string"&&(m=s[g],p=d(m,b),p&&E.push(u(m)+(o?": ":":")+p));else Object.keys(b).forEach(function(N){var Z=d(N,b);Z&&E.push(u(N)+(o?": ":":")+Z)});return p=E.length===0?"{}":o?`{
|
|
35
|
+
`+o+E.join(`,
|
|
36
|
+
`+o)+`
|
|
37
|
+
`+v+"}":"{"+E.join(",")+"}",o=v,p}}a(d,"str"),typeof jO.stringify!="function"&&(jO.stringify=function(f,h,g){var m;if(o="",r="",typeof g=="number")for(m=0;m<g;m+=1)r+=" ";else typeof g=="string"&&(r=g);if(s=h,h&&typeof h!="function"&&(typeof h!="object"||typeof h.length!="number"))throw new Error("JSON.stringify");return d("",{"":f})})})()});var VO=z((pae,qO)=>{var Xf=null,y6=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,v6=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/,_6=a(function(e){"use strict";var t={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(e!=null){if(e.strict===!0&&(t.strict=!0),e.storeAsString===!0&&(t.storeAsString=!0),t.alwaysParseAsBig=e.alwaysParseAsBig===!0?e.alwaysParseAsBig:!1,t.useNativeBigInt=e.useNativeBigInt===!0?e.useNativeBigInt:!1,typeof e.constructorAction<"u")if(e.constructorAction==="error"||e.constructorAction==="ignore"||e.constructorAction==="preserve")t.constructorAction=e.constructorAction;else throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${e.constructorAction}`);if(typeof e.protoAction<"u")if(e.protoAction==="error"||e.protoAction==="ignore"||e.protoAction==="preserve")t.protoAction=e.protoAction;else throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${e.protoAction}`)}var n,o,r={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
38
|
+
`,r:"\r",t:" "},i,s=a(function(v){throw{name:"SyntaxError",message:v,at:n,text:i}},"error"),u=a(function(v){return v&&v!==o&&s("Expected '"+v+"' instead of '"+o+"'"),o=i.charAt(n),n+=1,o},"next"),d=a(function(){var v,E="";for(o==="-"&&(E="-",u("-"));o>="0"&&o<="9";)E+=o,u();if(o===".")for(E+=".";u()&&o>="0"&&o<="9";)E+=o;if(o==="e"||o==="E")for(E+=o,u(),(o==="-"||o==="+")&&(E+=o,u());o>="0"&&o<="9";)E+=o,u();if(v=+E,!isFinite(v))s("Bad number");else return Xf==null&&(Xf=dE()),E.length>15?t.storeAsString?E:t.useNativeBigInt?BigInt(E):new Xf(E):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(v):new Xf(v):v},"number"),f=a(function(){var v,E,b="",k;if(o==='"')for(var N=n;u();){if(o==='"')return n-1>N&&(b+=i.substring(N,n-1)),u(),b;if(o==="\\"){if(n-1>N&&(b+=i.substring(N,n-1)),u(),o==="u"){for(k=0,E=0;E<4&&(v=parseInt(u(),16),!!isFinite(v));E+=1)k=k*16+v;b+=String.fromCharCode(k)}else if(typeof r[o]=="string")b+=r[o];else break;N=n}}s("Bad string")},"string"),h=a(function(){for(;o&&o<=" ";)u()},"white"),g=a(function(){switch(o){case"t":return u("t"),u("r"),u("u"),u("e"),!0;case"f":return u("f"),u("a"),u("l"),u("s"),u("e"),!1;case"n":return u("n"),u("u"),u("l"),u("l"),null}s("Unexpected '"+o+"'")},"word"),m,p=a(function(){var v=[];if(o==="["){if(u("["),h(),o==="]")return u("]"),v;for(;o;){if(v.push(m()),h(),o==="]")return u("]"),v;u(","),h()}}s("Bad array")},"array"),y=a(function(){var v,E=Object.create(null);if(o==="{"){if(u("{"),h(),o==="}")return u("}"),E;for(;o;){if(v=f(),h(),u(":"),t.strict===!0&&Object.hasOwnProperty.call(E,v)&&s('Duplicate key "'+v+'"'),y6.test(v)===!0?t.protoAction==="error"?s("Object contains forbidden prototype property"):t.protoAction==="ignore"?m():E[v]=m():v6.test(v)===!0?t.constructorAction==="error"?s("Object contains forbidden constructor property"):t.constructorAction==="ignore"?m():E[v]=m():E[v]=m(),h(),o==="}")return u("}"),E;u(","),h()}}s("Bad object")},"object");return m=a(function(){switch(h(),o){case"{":return y();case"[":return p();case'"':return f();case"-":return d();default:return o>="0"&&o<="9"?d():g()}},"value"),function(v,E){var b;return i=v+"",n=0,o=" ",b=m(),h(),o&&s("Syntax error"),typeof E=="function"?a((function k(N,Z){var H,K,ee=N[Z];return ee&&typeof ee=="object"&&Object.keys(ee).forEach(function(se){K=k(ee,se),K!==void 0?ee[se]=K:delete ee[se]}),E.call(N,Z,ee)}),"walk")({"":b},""):b}},"json_parse");qO.exports=_6});var ZO=z((mae,Qf)=>{var GO=BO().stringify,HO=VO();Qf.exports=function(e){return{parse:HO(e),stringify:GO}};Qf.exports.parse=HO();Qf.exports.stringify=GO});var pE=z(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.GCE_LINUX_BIOS_PATHS=void 0;on.isGoogleCloudServerless=JO;on.isGoogleComputeEngineLinux=YO;on.isGoogleComputeEngineMACAddress=XO;on.isGoogleComputeEngine=QO;on.detectGCPResidency=E6;var WO=require("fs"),KO=require("os");on.GCE_LINUX_BIOS_PATHS={BIOS_DATE:"/sys/class/dmi/id/bios_date",BIOS_VENDOR:"/sys/class/dmi/id/bios_vendor"};var b6=/^42:01/;function JO(){return!!(process.env.CLOUD_RUN_JOB||process.env.FUNCTION_NAME||process.env.K_SERVICE)}a(JO,"isGoogleCloudServerless");function YO(){if((0,KO.platform)()!=="linux")return!1;try{(0,WO.statSync)(on.GCE_LINUX_BIOS_PATHS.BIOS_DATE);let e=(0,WO.readFileSync)(on.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR,"utf8");return/Google/.test(e)}catch{return!1}}a(YO,"isGoogleComputeEngineLinux");function XO(){let e=(0,KO.networkInterfaces)();for(let t of Object.values(e))if(t){for(let{mac:n}of t)if(b6.test(n))return!0}return!1}a(XO,"isGoogleComputeEngineMACAddress");function QO(){return YO()||XO()}a(QO,"isGoogleComputeEngine");function E6(){return JO()||QO()}a(E6,"detectGCPResidency")});var ek=z(em=>{"use strict";Object.defineProperty(em,"__esModule",{value:!0});em.Colours=void 0;var Wt=class e{static{a(this,"Colours")}static isEnabled(t){return t&&t.isTTY&&(typeof t.getColorDepth=="function"?t.getColorDepth()>2:!0)}static refresh(){e.enabled=e.isEnabled(process==null?void 0:process.stderr),this.enabled?(e.reset="\x1B[0m",e.bright="\x1B[1m",e.dim="\x1B[2m",e.red="\x1B[31m",e.green="\x1B[32m",e.yellow="\x1B[33m",e.blue="\x1B[34m",e.magenta="\x1B[35m",e.cyan="\x1B[36m",e.white="\x1B[37m",e.grey="\x1B[90m"):(e.reset="",e.bright="",e.dim="",e.red="",e.green="",e.yellow="",e.blue="",e.magenta="",e.cyan="",e.white="",e.grey="")}};em.Colours=Wt;Wt.enabled=!1;Wt.reset="";Wt.bright="";Wt.dim="";Wt.red="";Wt.green="";Wt.yellow="";Wt.blue="";Wt.magenta="";Wt.cyan="";Wt.white="";Wt.grey="";Wt.refresh()});var ok=z(ct=>{"use strict";var S6=ct&&ct.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),T6=ct&&ct.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),tk=ct&&ct.__importStar||(function(){var e=a(function(t){return e=Object.getOwnPropertyNames||function(n){var o=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(o[o.length]=r);return o},e(t)},"ownKeys");return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var o=e(t),r=0;r<o.length;r++)o[r]!=="default"&&S6(n,t,o[r]);return T6(n,t),n}})();Object.defineProperty(ct,"__esModule",{value:!0});ct.env=ct.DebugLogBackendBase=ct.placeholder=ct.AdhocDebugLogger=ct.LogSeverity=void 0;ct.getNodeBackend=mE;ct.getDebugBackend=w6;ct.getStructuredBackend=x6;ct.setBackend=A6;ct.log=nk;var P6=require("events"),Pu=tk(require("process")),rk=tk(require("util")),Pr=ek(),an;(function(e){e.DEFAULT="DEFAULT",e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR"})(an||(ct.LogSeverity=an={}));var wu=class extends P6.EventEmitter{static{a(this,"AdhocDebugLogger")}constructor(t,n){super(),this.namespace=t,this.upstream=n,this.func=Object.assign(this.invoke.bind(this),{instance:this,on:a((o,r)=>this.on(o,r),"on")}),this.func.debug=(...o)=>this.invokeSeverity(an.DEBUG,...o),this.func.info=(...o)=>this.invokeSeverity(an.INFO,...o),this.func.warn=(...o)=>this.invokeSeverity(an.WARNING,...o),this.func.error=(...o)=>this.invokeSeverity(an.ERROR,...o),this.func.sublog=o=>nk(o,this.func)}invoke(t,...n){if(this.upstream)try{this.upstream(t,...n)}catch{}try{this.emit("log",t,n)}catch{}}invokeSeverity(t,...n){this.invoke({severity:t},...n)}};ct.AdhocDebugLogger=wu;ct.placeholder=new wu("",()=>{}).func;var ja=class{static{a(this,"DebugLogBackendBase")}constructor(){var t;this.cached=new Map,this.filters=[],this.filtersSet=!1;let n=(t=Pu.env[ct.env.nodeEnables])!==null&&t!==void 0?t:"*";n==="all"&&(n="*"),this.filters=n.split(",")}log(t,n,...o){try{this.filtersSet||(this.setFilters(),this.filtersSet=!0);let r=this.cached.get(t);r||(r=this.makeLogger(t),this.cached.set(t,r)),r(n,...o)}catch(r){console.error(r)}}};ct.DebugLogBackendBase=ja;var fE=class extends ja{static{a(this,"NodeBackend")}constructor(){super(...arguments),this.enabledRegexp=/.*/g}isEnabled(t){return this.enabledRegexp.test(t)}makeLogger(t){return this.enabledRegexp.test(t)?(n,...o)=>{var r;let i=`${Pr.Colours.green}${t}${Pr.Colours.reset}`,s=`${Pr.Colours.yellow}${Pu.pid}${Pr.Colours.reset}`,u;switch(n.severity){case an.ERROR:u=`${Pr.Colours.red}${n.severity}${Pr.Colours.reset}`;break;case an.INFO:u=`${Pr.Colours.magenta}${n.severity}${Pr.Colours.reset}`;break;case an.WARNING:u=`${Pr.Colours.yellow}${n.severity}${Pr.Colours.reset}`;break;default:u=(r=n.severity)!==null&&r!==void 0?r:an.DEFAULT;break}let d=rk.formatWithOptions({colors:Pr.Colours.enabled},...o),f=Object.assign({},n);delete f.severity;let h=Object.getOwnPropertyNames(f).length?JSON.stringify(f):"",g=h?`${Pr.Colours.grey}${h}${Pr.Colours.reset}`:"";console.error("%s [%s|%s] %s%s",s,i,u,d,h?` ${g}`:"")}:()=>{}}setFilters(){let n=this.filters.join(",").replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^");this.enabledRegexp=new RegExp(`^${n}$`,"i")}};function mE(){return new fE}a(mE,"getNodeBackend");var hE=class extends ja{static{a(this,"DebugBackend")}constructor(t){super(),this.debugPkg=t}makeLogger(t){let n=this.debugPkg(t);return(o,...r)=>{n(r[0],...r.slice(1))}}setFilters(){var t;let n=(t=Pu.env.NODE_DEBUG)!==null&&t!==void 0?t:"";Pu.env.NODE_DEBUG=`${n}${n?",":""}${this.filters.join(",")}`}};function w6(e){return new hE(e)}a(w6,"getDebugBackend");var gE=class extends ja{static{a(this,"StructuredBackend")}constructor(t){var n;super(),this.upstream=(n=t)!==null&&n!==void 0?n:void 0}makeLogger(t){var n;let o=(n=this.upstream)===null||n===void 0?void 0:n.makeLogger(t);return(r,...i)=>{var s;let u=(s=r.severity)!==null&&s!==void 0?s:an.INFO,d=Object.assign({severity:u,message:rk.format(...i)},r),f=JSON.stringify(d);o?o(r,f):console.log("%s",f)}}setFilters(){var t;(t=this.upstream)===null||t===void 0||t.setFilters()}};function x6(e){return new gE(e)}a(x6,"getStructuredBackend");ct.env={nodeEnables:"GOOGLE_SDK_NODE_LOGGING"};var yE=new Map,wr;function A6(e){wr=e,yE.clear()}a(A6,"setBackend");function nk(e,t){if(!wr&&!Pu.env[ct.env.nodeEnables]||!e)return ct.placeholder;t&&(e=`${t.instance.namespace}:${e}`);let n=yE.get(e);if(n)return n.func;if(wr===null)return ct.placeholder;wr===void 0&&(wr=mE());let o=(()=>{let r;return new wu(e,(s,...u)=>{if(r!==wr){if(wr===null)return;wr===void 0&&(wr=mE()),r=wr}wr?.log(e,s,...u)})})();return yE.set(e,o),o.func}a(nk,"log")});var vE=z(Ti=>{"use strict";var I6=Ti&&Ti.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),R6=Ti&&Ti.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&I6(t,e,n)};Object.defineProperty(Ti,"__esModule",{value:!0});R6(ok(),Ti)});var Au=z(Te=>{"use strict";var ak=Te&&Te.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),C6=Te&&Te.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),O6=Te&&Te.__importStar||(function(){var e=a(function(t){return e=Object.getOwnPropertyNames||function(n){var o=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(o[o.length]=r);return o},e(t)},"ownKeys");return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var o=e(t),r=0;r<o.length;r++)o[r]!=="default"&&ak(n,t,o[r]);return C6(n,t),n}})(),k6=Te&&Te.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&ak(t,e,n)};Object.defineProperty(Te,"__esModule",{value:!0});Te.gcpResidencyCache=Te.METADATA_SERVER_DETECTION=Te.HEADERS=Te.HEADER_VALUE=Te.HEADER_NAME=Te.SECONDARY_HOST_ADDRESS=Te.HOST_ADDRESS=Te.BASE_PATH=void 0;Te.instance=M6;Te.project=L6;Te.universe=j6;Te.bulk=F6;Te.isAvailable=q6;Te.resetIsAvailableCache=V6;Te.getGCPResidency=EE;Te.setGCPResidency=sk;Te.requestTimeout=ck;var _E=Pt(),$6=ZO(),D6=pE(),N6=O6(vE());Te.BASE_PATH="/computeMetadata/v1";Te.HOST_ADDRESS="http://169.254.169.254";Te.SECONDARY_HOST_ADDRESS="http://metadata.google.internal.";Te.HEADER_NAME="Metadata-Flavor";Te.HEADER_VALUE="Google";Te.HEADERS=Object.freeze({[Te.HEADER_NAME]:Te.HEADER_VALUE});var ik=N6.log("gcp-metadata");Te.METADATA_SERVER_DETECTION=Object.freeze({"assume-present":"don't try to ping the metadata server, but assume it's present",none:"don't try to ping the metadata server, but don't try to use it either","bios-only":"treat the result of a BIOS probe as canonical (don't fall back to pinging)","ping-only":"skip the BIOS probe, and go straight to pinging"});function bE(e){return e||(e=process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST||Te.HOST_ADDRESS),/^https?:\/\//.test(e)||(e=`http://${e}`),new URL(Te.BASE_PATH,e).href}a(bE,"getBaseUrl");function z6(e){Object.keys(e).forEach(t=>{switch(t){case"params":case"property":case"headers":break;case"qs":throw new Error("'qs' is not a valid configuration option. Please use 'params' instead.");default:throw new Error(`'${t}' is not a valid configuration option.`)}})}a(z6,"validate");async function xu(e,t={},n=3,o=!1){let r=new Headers(Te.HEADERS),i="",s={};if(typeof e=="object"){let g=e;new Headers(g.headers).forEach((m,p)=>r.set(p,m)),i=g.metadataKey,s=g.params||s,n=g.noResponseRetries||n,o=g.fastFail||o}else i=e;typeof t=="string"?i+=`/${t}`:(z6(t),t.property&&(i+=`/${t.property}`),new Headers(t.headers).forEach((g,m)=>r.set(m,g)),s=t.params||s);let u=o?U6:_E.request,d={url:`${bE()}/${i}`,headers:r,retryConfig:{noResponseRetries:n},params:s,responseType:"text",timeout:ck()};ik.info("instance request %j",d);let f=await u(d);ik.info("instance metadata is %s",f.data);let h=f.headers.get(Te.HEADER_NAME);if(h!==Te.HEADER_VALUE)throw new RangeError(`Invalid response from metadata service: incorrect ${Te.HEADER_NAME} header. Expected '${Te.HEADER_VALUE}', got ${h?`'${h}'`:"no header"}`);if(typeof f.data=="string")try{return $6.parse(f.data)}catch{}return f.data}a(xu,"metadataAccessor");async function U6(e){let t={...e,url:e.url?.toString().replace(bE(),bE(Te.SECONDARY_HOST_ADDRESS))},n=(0,_E.request)(e),o=(0,_E.request)(t);return Promise.any([n,o])}a(U6,"fastFailMetadataRequest");function M6(e){return xu("instance",e)}a(M6,"instance");function L6(e){return xu("project",e)}a(L6,"project");function j6(e){return xu("universe",e)}a(j6,"universe");async function F6(e){let t={};return await Promise.all(e.map(n=>(async()=>{let o=await xu(n),r=n.metadataKey;t[r]=o})())),t}a(F6,"bulk");function B6(){return process.env.DETECT_GCP_RETRIES?Number(process.env.DETECT_GCP_RETRIES):0}a(B6,"detectGCPAvailableRetries");var tm;async function q6(){if(process.env.METADATA_SERVER_DETECTION){let e=process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase();if(!(e in Te.METADATA_SERVER_DETECTION))throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${e}\`, but it should be \`${Object.keys(Te.METADATA_SERVER_DETECTION).join("`, `")}\`, or unset`);switch(e){case"assume-present":return!0;case"none":return!1;case"bios-only":return EE();case"ping-only":}}try{return tm===void 0&&(tm=xu("instance",void 0,B6(),!(process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST))),await tm,!0}catch(e){let t=e;if(process.env.DEBUG_AUTH&&console.info(t),t.type==="request-timeout"||t.response&&t.response.status===404)return!1;if(!(t.response&&t.response.status===404)&&(!t.code||!["EHOSTDOWN","EHOSTUNREACH","ENETUNREACH","ENOENT","ENOTFOUND","ECONNREFUSED"].includes(t.code.toString()))){let n="UNKNOWN";t.code&&(n=t.code.toString()),process.emitWarning(`received unexpected error = ${t.message} code = ${n}`,"MetadataLookupWarning")}return!1}}a(q6,"isAvailable");function V6(){tm=void 0}a(V6,"resetIsAvailableCache");Te.gcpResidencyCache=null;function EE(){return Te.gcpResidencyCache===null&&sk(),Te.gcpResidencyCache}a(EE,"getGCPResidency");function sk(e=null){Te.gcpResidencyCache=e!==null?e:(0,D6.detectGCPResidency)()}a(sk,"setGCPResidency");function ck(){return EE()?0:3e3}a(ck,"requestTimeout");k6(pE(),Te)});var dk=z(rm=>{"use strict";rm.byteLength=H6;rm.toByteArray=W6;rm.fromByteArray=Y6;var vn=[],Br=[],G6=typeof Uint8Array<"u"?Uint8Array:Array,SE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Pi=0,uk=SE.length;Pi<uk;++Pi)vn[Pi]=SE[Pi],Br[SE.charCodeAt(Pi)]=Pi;var Pi,uk;Br[45]=62;Br[95]=63;function lk(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var o=n===t?0:4-n%4;return[n,o]}a(lk,"getLens");function H6(e){var t=lk(e),n=t[0],o=t[1];return(n+o)*3/4-o}a(H6,"byteLength");function Z6(e,t,n){return(t+n)*3/4-n}a(Z6,"_byteLength");function W6(e){var t,n=lk(e),o=n[0],r=n[1],i=new G6(Z6(e,o,r)),s=0,u=r>0?o-4:o,d;for(d=0;d<u;d+=4)t=Br[e.charCodeAt(d)]<<18|Br[e.charCodeAt(d+1)]<<12|Br[e.charCodeAt(d+2)]<<6|Br[e.charCodeAt(d+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=t&255;return r===2&&(t=Br[e.charCodeAt(d)]<<2|Br[e.charCodeAt(d+1)]>>4,i[s++]=t&255),r===1&&(t=Br[e.charCodeAt(d)]<<10|Br[e.charCodeAt(d+1)]<<4|Br[e.charCodeAt(d+2)]>>2,i[s++]=t>>8&255,i[s++]=t&255),i}a(W6,"toByteArray");function K6(e){return vn[e>>18&63]+vn[e>>12&63]+vn[e>>6&63]+vn[e&63]}a(K6,"tripletToBase64");function J6(e,t,n){for(var o,r=[],i=t;i<n;i+=3)o=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),r.push(K6(o));return r.join("")}a(J6,"encodeChunk");function Y6(e){for(var t,n=e.length,o=n%3,r=[],i=16383,s=0,u=n-o;s<u;s+=i)r.push(J6(e,s,s+i>u?u:s+i));return o===1?(t=e[n-1],r.push(vn[t>>2]+vn[t<<4&63]+"==")):o===2&&(t=(e[n-2]<<8)+e[n-1],r.push(vn[t>>10]+vn[t>>4&63]+vn[t<<2&63]+"=")),r.join("")}a(Y6,"fromByteArray")});var PE=z(TE=>{"use strict";Object.defineProperty(TE,"__esModule",{value:!0});TE.fromArrayBufferToHex=X6;function X6(e){return Array.from(new Uint8Array(e)).map(n=>n.toString(16).padStart(2,"0")).join("")}a(X6,"fromArrayBufferToHex")});var pk=z(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});nm.BrowserCrypto=void 0;var Fa=dk(),Q6=PE(),wE=class e{static{a(this,"BrowserCrypto")}constructor(){if(typeof window>"u"||window.crypto===void 0||window.crypto.subtle===void 0)throw new Error("SubtleCrypto not found. Make sure it's an https:// website.")}async sha256DigestBase64(t){let n=new TextEncoder().encode(t),o=await window.crypto.subtle.digest("SHA-256",n);return Fa.fromByteArray(new Uint8Array(o))}randomBytesBase64(t){let n=new Uint8Array(t);return window.crypto.getRandomValues(n),Fa.fromByteArray(n)}static padBase64(t){for(;t.length%4!==0;)t+="=";return t}async verify(t,n,o){let r={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},i=new TextEncoder().encode(n),s=Fa.toByteArray(e.padBase64(o)),u=await window.crypto.subtle.importKey("jwk",t,r,!0,["verify"]);return await window.crypto.subtle.verify(r,u,s,i)}async sign(t,n){let o={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},r=new TextEncoder().encode(n),i=await window.crypto.subtle.importKey("jwk",t,o,!0,["sign"]),s=await window.crypto.subtle.sign(o,i,r);return Fa.fromByteArray(new Uint8Array(s))}decodeBase64StringUtf8(t){let n=Fa.toByteArray(e.padBase64(t));return new TextDecoder().decode(n)}encodeBase64StringUtf8(t){let n=new TextEncoder().encode(t);return Fa.fromByteArray(n)}async sha256DigestHex(t){let n=new TextEncoder().encode(t),o=await window.crypto.subtle.digest("SHA-256",n);return(0,Q6.fromArrayBufferToHex)(o)}async signWithHmacSha256(t,n){let o=typeof t=="string"?t:String.fromCharCode(...new Uint16Array(t)),r=new TextEncoder,i=await window.crypto.subtle.importKey("raw",r.encode(o),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]);return window.crypto.subtle.sign("HMAC",i,r.encode(n))}};nm.BrowserCrypto=wE});var fk=z(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});om.NodeCrypto=void 0;var Ba=require("crypto"),xE=class{static{a(this,"NodeCrypto")}async sha256DigestBase64(t){return Ba.createHash("sha256").update(t).digest("base64")}randomBytesBase64(t){return Ba.randomBytes(t).toString("base64")}async verify(t,n,o){let r=Ba.createVerify("RSA-SHA256");return r.update(n),r.end(),r.verify(t,o,"base64")}async sign(t,n){let o=Ba.createSign("RSA-SHA256");return o.update(n),o.end(),o.sign(t,"base64")}decodeBase64StringUtf8(t){return Buffer.from(t,"base64").toString("utf-8")}encodeBase64StringUtf8(t){return Buffer.from(t,"utf-8").toString("base64")}async sha256DigestHex(t){return Ba.createHash("sha256").update(t).digest("hex")}async signWithHmacSha256(t,n){let o=typeof t=="string"?t:t2(t);return e2(Ba.createHmac("sha256",o).update(n).digest())}};om.NodeCrypto=xE;function e2(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}a(e2,"toArrayBuffer");function t2(e){return Buffer.from(e)}a(t2,"toBuffer")});var Iu=z(Wn=>{"use strict";var r2=Wn&&Wn.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),n2=Wn&&Wn.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&r2(t,e,n)};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.createCrypto=a2;Wn.hasBrowserCrypto=mk;var o2=pk(),i2=fk();n2(PE(),Wn);function a2(){return mk()?new o2.BrowserCrypto:new i2.NodeCrypto}a(a2,"createCrypto");function mk(){return typeof window<"u"&&typeof window.crypto<"u"&&typeof window.crypto.subtle<"u"}a(mk,"hasBrowserCrypto")});var qa=z((AE,gk)=>{var im=require("buffer"),_n=im.Buffer;function hk(e,t){for(var n in e)t[n]=e[n]}a(hk,"copyProps");_n.from&&_n.alloc&&_n.allocUnsafe&&_n.allocUnsafeSlow?gk.exports=im:(hk(im,AE),AE.Buffer=wi);function wi(e,t,n){return _n(e,t,n)}a(wi,"SafeBuffer");wi.prototype=Object.create(_n.prototype);hk(_n,wi);wi.from=function(e,t,n){if(typeof e=="number")throw new TypeError("Argument must not be a number");return _n(e,t,n)};wi.alloc=function(e,t,n){if(typeof e!="number")throw new TypeError("Argument must be a number");var o=_n(e);return t!==void 0?typeof n=="string"?o.fill(t,n):o.fill(t):o.fill(0),o};wi.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return _n(e)};wi.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return im.SlowBuffer(e)}});var vk=z((zae,yk)=>{"use strict";function IE(e){var t=(e/8|0)+(e%8===0?0:1);return t}a(IE,"getParamSize");var s2={ES256:IE(256),ES384:IE(384),ES512:IE(521)};function c2(e){var t=s2[e];if(t)return t;throw new Error('Unknown algorithm "'+e+'"')}a(c2,"getParamBytesForAlg");yk.exports=c2});var RE=z((Mae,Pk)=>{"use strict";var am=qa().Buffer,bk=vk(),sm=128,Ek=0,u2=32,l2=16,d2=2,Sk=l2|u2|Ek<<6,cm=d2|Ek<<6;function p2(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(p2,"base64Url");function Tk(e){if(am.isBuffer(e))return e;if(typeof e=="string")return am.from(e,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}a(Tk,"signatureAsBuffer");function f2(e,t){e=Tk(e);var n=bk(t),o=n+1,r=e.length,i=0;if(e[i++]!==Sk)throw new Error('Could not find expected "seq"');var s=e[i++];if(s===(sm|1)&&(s=e[i++]),r-i<s)throw new Error('"seq" specified length of "'+s+'", only "'+(r-i)+'" remaining');if(e[i++]!==cm)throw new Error('Could not find expected "int" for "r"');var u=e[i++];if(r-i-2<u)throw new Error('"r" specified length of "'+u+'", only "'+(r-i-2)+'" available');if(o<u)throw new Error('"r" specified length of "'+u+'", max of "'+o+'" is acceptable');var d=i;if(i+=u,e[i++]!==cm)throw new Error('Could not find expected "int" for "s"');var f=e[i++];if(r-i!==f)throw new Error('"s" specified length of "'+f+'", expected "'+(r-i)+'"');if(o<f)throw new Error('"s" specified length of "'+f+'", max of "'+o+'" is acceptable');var h=i;if(i+=f,i!==r)throw new Error('Expected to consume entire buffer, but "'+(r-i)+'" bytes remain');var g=n-u,m=n-f,p=am.allocUnsafe(g+u+m+f);for(i=0;i<g;++i)p[i]=0;e.copy(p,i,d+Math.max(-g,0),d+u),i=n;for(var y=i;i<y+m;++i)p[i]=0;return e.copy(p,i,h+Math.max(-m,0),h+f),p=p.toString("base64"),p=p2(p),p}a(f2,"derToJose");function _k(e,t,n){for(var o=0;t+o<n&&e[t+o]===0;)++o;var r=e[t+o]>=sm;return r&&--o,o}a(_k,"countPadding");function m2(e,t){e=Tk(e);var n=bk(t),o=e.length;if(o!==n*2)throw new TypeError('"'+t+'" signatures must be "'+n*2+'" bytes, saw "'+o+'"');var r=_k(e,0,n),i=_k(e,n,e.length),s=n-r,u=n-i,d=2+s+1+1+u,f=d<sm,h=am.allocUnsafe((f?2:3)+d),g=0;return h[g++]=Sk,f?h[g++]=d:(h[g++]=sm|1,h[g++]=d&255),h[g++]=cm,h[g++]=s,r<0?(h[g++]=0,g+=e.copy(h,g,0,n)):g+=e.copy(h,g,r,n),h[g++]=cm,h[g++]=u,i<0?(h[g++]=0,e.copy(h,g,n)):e.copy(h,g,n+i),h}a(m2,"joseToDer");Pk.exports={derToJose:f2,joseToDer:m2}});var sn=z(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.LRUCache=void 0;Kn.snakeToCamel=xk;Kn.originalOrCamelOptions=v2;Kn.removeUndefinedValuesInObject=_2;Kn.isValidFile=b2;Kn.getWellKnownCertificateConfigFileLocation=E2;var h2=require("fs"),g2=require("os"),CE=require("path"),y2="certificate_config.json",wk="gcloud";function xk(e){return e.replace(/([_][^_])/g,t=>t.slice(1).toUpperCase())}a(xk,"snakeToCamel");function v2(e){function t(n){let o=e||{};return o[n]??o[xk(n)]}return a(t,"get"),{get:t}}a(v2,"originalOrCamelOptions");var OE=class{static{a(this,"LRUCache")}capacity;#e=new Map;maxAge;constructor(t){this.capacity=t.capacity,this.maxAge=t.maxAge}#t(t,n){this.#e.delete(t),this.#e.set(t,{value:n,lastAccessed:Date.now()})}set(t,n){this.#t(t,n),this.#r()}get(t){let n=this.#e.get(t);if(n)return this.#t(t,n.value),this.#r(),n.value}#r(){let t=this.maxAge?Date.now()-this.maxAge:0,n=this.#e.entries().next();for(;!n.done&&(this.#e.size>this.capacity||n.value[1].lastAccessed<t);)this.#e.delete(n.value[0]),n=this.#e.entries().next()}};Kn.LRUCache=OE;function _2(e){return Object.entries(e).forEach(([t,n])=>{(n===void 0||n==="undefined")&&delete e[t]}),e}a(_2,"removeUndefinedValuesInObject");async function b2(e){try{return(await h2.promises.lstat(e)).isFile()}catch{return!1}}a(b2,"isValidFile");function E2(){let e=process.env.CLOUDSDK_CONFIG||(S2()?CE.join(process.env.APPDATA||"",wk):CE.join(process.env.HOME||"",".config",wk));return CE.join(e,y2)}a(E2,"getWellKnownCertificateConfigFileLocation");function S2(){return g2.platform().startsWith("win")}a(S2,"_isWindows")});var Ak=z((Bae,T2)=>{T2.exports={name:"google-auth-library",version:"10.5.0",author:"Google Inc.",description:"Google APIs Authentication Client Library for Node.js",engines:{node:">=18"},main:"./build/src/index.js",types:"./build/src/index.d.ts",repository:"googleapis/google-auth-library-nodejs.git",keywords:["google","api","google apis","client","client library"],dependencies:{"base64-js":"^1.3.0","ecdsa-sig-formatter":"^1.0.11",gaxios:"^7.0.0","gcp-metadata":"^8.0.0","google-logging-utils":"^1.0.0",gtoken:"^8.0.0",jws:"^4.0.0"},devDependencies:{"@types/base64-js":"^1.2.5","@types/jws":"^3.1.0","@types/mocha":"^10.0.10","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^22.0.0","@types/sinon":"^17.0.0","assert-rejects":"^1.0.0",c8:"^10.0.0",codecov:"^3.0.2",gts:"^6.0.0","is-docker":"^3.0.0",jsdoc:"^4.0.0","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1",keypair:"^1.0.4",mocha:"^11.1.0",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.5","null-loader":"^4.0.0",puppeteer:"^24.0.0",sinon:"^21.0.0","ts-loader":"^8.0.0",typescript:"5.8.2",webpack:"^5.21.2","webpack-cli":"^4.0.0"},files:["build/src","!build/src/**/*.map"],scripts:{test:"c8 mocha build/test",clean:"gts clean",prepare:"npm run compile",lint:"gts check --no-inline-config",compile:"tsc -p .",fix:"gts fix",pretest:"npm run compile -- --sourceMap",docs:"jsdoc -c .jsdoc.js","samples-setup":"cd samples/ && npm link ../ && npm run setup && cd ../","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","system-test":"mocha build/system-test --timeout 60000","presystem-test":"npm run compile -- --sourceMap",webpack:"webpack","browser-test":"karma start","docs-test":"echo 'disabled until linkinator is fixed'","predocs-test":"npm run docs",prelint:"cd samples; npm link ../; npm install"},license:"Apache-2.0"}});var kE=z(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.USER_AGENT=No.PRODUCT_NAME=No.pkg=void 0;var Ik=Ak();No.pkg=Ik;var Rk="google-api-nodejs-client";No.PRODUCT_NAME=Rk;var P2=`${Rk}/${Ik.version}`;No.USER_AGENT=P2});var xr=z(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.AuthClient=cn.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=cn.DEFAULT_UNIVERSE=void 0;var w2=require("events"),$E=Pt(),x2=sn(),A2=vE(),DE=kE();cn.DEFAULT_UNIVERSE="googleapis.com";cn.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=300*1e3;var NE=class e extends w2.EventEmitter{static{a(this,"AuthClient")}apiKey;projectId;quotaProjectId;transporter;credentials={};eagerRefreshThresholdMillis=cn.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS;forceRefreshOnFailure=!1;universeDomain=cn.DEFAULT_UNIVERSE;static RequestMethodNameSymbol=Symbol("request method name");static RequestLogIdSymbol=Symbol("request log id");constructor(t={}){super();let n=(0,x2.originalOrCamelOptions)(t);this.apiKey=t.apiKey,this.projectId=n.get("project_id")??null,this.quotaProjectId=n.get("quota_project_id"),this.credentials=n.get("credentials")??{},this.universeDomain=n.get("universe_domain")??cn.DEFAULT_UNIVERSE,this.transporter=t.transporter??new $E.Gaxios(t.transporterOptions),n.get("useAuthRequestParameters")!==!1&&(this.transporter.interceptors.request.add(e.DEFAULT_REQUEST_INTERCEPTOR),this.transporter.interceptors.response.add(e.DEFAULT_RESPONSE_INTERCEPTOR)),t.eagerRefreshThresholdMillis&&(this.eagerRefreshThresholdMillis=t.eagerRefreshThresholdMillis),this.forceRefreshOnFailure=t.forceRefreshOnFailure??!1}fetch(...t){let n=t[0],o=t[1],r,i=new Headers;return typeof n=="string"?r=new URL(n):n instanceof URL?r=n:n&&n.url&&(r=new URL(n.url)),n&&typeof n=="object"&&"headers"in n&&$E.Gaxios.mergeHeaders(i,n.headers),o&&$E.Gaxios.mergeHeaders(i,new Headers(o.headers)),typeof n=="object"&&!(n instanceof URL)?this.request({...o,...n,headers:i,url:r}):this.request({...o,headers:i,url:r})}setCredentials(t){this.credentials=t}addSharedMetadataHeaders(t){return!t.has("x-goog-user-project")&&this.quotaProjectId&&t.set("x-goog-user-project",this.quotaProjectId),t}addUserProjectAndAuthHeaders(t,n){let o=n.get("x-goog-user-project"),r=n.get("authorization");return o&&t.set("x-goog-user-project",o),r&&t.set("authorization",r),t}static log=(0,A2.log)("auth");static DEFAULT_REQUEST_INTERCEPTOR={resolved:a(async t=>{if(!t.headers.has("x-goog-api-client")){let o=process.version.replace(/^v/,"");t.headers.set("x-goog-api-client",`gl-node/${o}`)}let n=t.headers.get("User-Agent");n?n.includes(`${DE.PRODUCT_NAME}/`)||t.headers.set("User-Agent",`${n} ${DE.USER_AGENT}`):t.headers.set("User-Agent",DE.USER_AGENT);try{let o=t,r=o[e.RequestMethodNameSymbol],i=`${Math.floor(Math.random()*1e3)}`;o[e.RequestLogIdSymbol]=i;let s={url:t.url,headers:t.headers};r?e.log.info("%s [%s] request %j",r,i,s):e.log.info("[%s] request %j",i,s)}catch{}return t},"resolved")};static DEFAULT_RESPONSE_INTERCEPTOR={resolved:a(async t=>{try{let n=t.config,o=n[e.RequestMethodNameSymbol],r=n[e.RequestLogIdSymbol];o?e.log.info("%s [%s] response %j",o,r,t.data):e.log.info("[%s] response %j",r,t.data)}catch{}return t},"resolved"),rejected:a(async t=>{try{let n=t.config,o=n[e.RequestMethodNameSymbol],r=n[e.RequestLogIdSymbol];o?e.log.info("%s [%s] error %j",o,r,t.response?.data):e.log.error("[%s] error %j",r,t.response?.data)}catch{}throw t},"rejected")};static setMethodName(t,n){try{let o=t;o[e.RequestMethodNameSymbol]=n}catch{}}static get RETRY_CONFIG(){return{retry:!0,retryConfig:{httpMethodsToRetry:["GET","PUT","POST","HEAD","OPTIONS","DELETE"]}}}};cn.AuthClient=NE});var UE=z(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});um.LoginTicket=void 0;var zE=class{static{a(this,"LoginTicket")}envelope;payload;constructor(t,n){this.envelope=t,this.payload=n}getEnvelope(){return this.envelope}getPayload(){return this.payload}getUserId(){let t=this.getPayload();return t&&t.sub?t.sub:null}getAttributes(){return{envelope:this.getEnvelope(),payload:this.getPayload()}}};um.LoginTicket=zE});var xi=z(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.OAuth2Client=bn.ClientAuthentication=bn.CertificateFormat=bn.CodeChallengeMethod=void 0;var Ck=Pt(),I2=require("querystring"),R2=require("stream"),C2=RE(),Ok=sn(),ME=Iu(),Va=xr(),O2=UE(),kk;(function(e){e.Plain="plain",e.S256="S256"})(kk||(bn.CodeChallengeMethod=kk={}));var Jn;(function(e){e.PEM="PEM",e.JWK="JWK"})(Jn||(bn.CertificateFormat=Jn={}));var Ru;(function(e){e.ClientSecretPost="ClientSecretPost",e.ClientSecretBasic="ClientSecretBasic",e.None="None"})(Ru||(bn.ClientAuthentication=Ru={}));var LE=class e extends Va.AuthClient{static{a(this,"OAuth2Client")}redirectUri;certificateCache={};certificateExpiry=null;certificateCacheFormat=Jn.PEM;refreshTokenPromises=new Map;endpoints;issuers;clientAuthentication;_clientId;_clientSecret;refreshHandler;constructor(t={},n,o){super(typeof t=="object"?t:{}),typeof t!="object"&&(t={clientId:t,clientSecret:n,redirectUri:o}),this._clientId=t.clientId||t.client_id,this._clientSecret=t.clientSecret||t.client_secret,this.redirectUri=t.redirectUri||t.redirect_uris?.[0],this.endpoints={tokenInfoUrl:"https://oauth2.googleapis.com/tokeninfo",oauth2AuthBaseUrl:"https://accounts.google.com/o/oauth2/v2/auth",oauth2TokenUrl:"https://oauth2.googleapis.com/token",oauth2RevokeUrl:"https://oauth2.googleapis.com/revoke",oauth2FederatedSignonPemCertsUrl:"https://www.googleapis.com/oauth2/v1/certs",oauth2FederatedSignonJwkCertsUrl:"https://www.googleapis.com/oauth2/v3/certs",oauth2IapPublicKeyUrl:"https://www.gstatic.com/iap/verify/public_key",...t.endpoints},this.clientAuthentication=t.clientAuthentication||Ru.ClientSecretPost,this.issuers=t.issuers||["accounts.google.com","https://accounts.google.com",this.universeDomain]}static GOOGLE_TOKEN_INFO_URL="https://oauth2.googleapis.com/tokeninfo";static CLOCK_SKEW_SECS_=300;static DEFAULT_MAX_TOKEN_LIFETIME_SECS_=86400;generateAuthUrl(t={}){if(t.code_challenge_method&&!t.code_challenge)throw new Error("If a code_challenge_method is provided, code_challenge must be included.");return t.response_type=t.response_type||"code",t.client_id=t.client_id||this._clientId,t.redirect_uri=t.redirect_uri||this.redirectUri,Array.isArray(t.scope)&&(t.scope=t.scope.join(" ")),this.endpoints.oauth2AuthBaseUrl.toString()+"?"+I2.stringify(t)}generateCodeVerifier(){throw new Error("generateCodeVerifier is removed, please use generateCodeVerifierAsync instead.")}async generateCodeVerifierAsync(){let t=(0,ME.createCrypto)(),o=t.randomBytesBase64(96).replace(/\+/g,"~").replace(/=/g,"_").replace(/\//g,"-"),i=(await t.sha256DigestBase64(o)).split("=")[0].replace(/\+/g,"-").replace(/\//g,"_");return{codeVerifier:o,codeChallenge:i}}getToken(t,n){let o=typeof t=="string"?{code:t}:t;if(n)this.getTokenAsync(o).then(r=>n(null,r.tokens,r.res),r=>n(r,null,r.response));else return this.getTokenAsync(o)}async getTokenAsync(t){let n=this.endpoints.oauth2TokenUrl.toString(),o=new Headers,r={client_id:t.client_id||this._clientId,code_verifier:t.codeVerifier,code:t.code,grant_type:"authorization_code",redirect_uri:t.redirect_uri||this.redirectUri};if(this.clientAuthentication===Ru.ClientSecretBasic){let d=Buffer.from(`${this._clientId}:${this._clientSecret}`);o.set("authorization",`Basic ${d.toString("base64")}`)}this.clientAuthentication===Ru.ClientSecretPost&&(r.client_secret=this._clientSecret);let i={...e.RETRY_CONFIG,method:"POST",url:n,data:new URLSearchParams((0,Ok.removeUndefinedValuesInObject)(r)),headers:o};Va.AuthClient.setMethodName(i,"getTokenAsync");let s=await this.transporter.request(i),u=s.data;return s.data&&s.data.expires_in&&(u.expiry_date=new Date().getTime()+s.data.expires_in*1e3,delete u.expires_in),this.emit("tokens",u),{tokens:u,res:s}}async refreshToken(t){if(!t)return this.refreshTokenNoCache(t);if(this.refreshTokenPromises.has(t))return this.refreshTokenPromises.get(t);let n=this.refreshTokenNoCache(t).then(o=>(this.refreshTokenPromises.delete(t),o),o=>{throw this.refreshTokenPromises.delete(t),o});return this.refreshTokenPromises.set(t,n),n}async refreshTokenNoCache(t){if(!t)throw new Error("No refresh token is set.");let n=this.endpoints.oauth2TokenUrl.toString(),o={refresh_token:t,client_id:this._clientId,client_secret:this._clientSecret,grant_type:"refresh_token"},r;try{let s={...e.RETRY_CONFIG,method:"POST",url:n,data:new URLSearchParams((0,Ok.removeUndefinedValuesInObject)(o))};Va.AuthClient.setMethodName(s,"refreshTokenNoCache"),r=await this.transporter.request(s)}catch(s){throw s instanceof Ck.GaxiosError&&s.message==="invalid_grant"&&s.response?.data&&/ReAuth/i.test(s.response.data.error_description)&&(s.message=JSON.stringify(s.response.data)),s}let i=r.data;return r.data&&r.data.expires_in&&(i.expiry_date=new Date().getTime()+r.data.expires_in*1e3,delete i.expires_in),this.emit("tokens",i),{tokens:i,res:r}}refreshAccessToken(t){if(t)this.refreshAccessTokenAsync().then(n=>t(null,n.credentials,n.res),t);else return this.refreshAccessTokenAsync()}async refreshAccessTokenAsync(){let t=await this.refreshToken(this.credentials.refresh_token),n=t.tokens;return n.refresh_token=this.credentials.refresh_token,this.credentials=n,{credentials:this.credentials,res:t.res}}getAccessToken(t){if(t)this.getAccessTokenAsync().then(n=>t(null,n.token,n.res),t);else return this.getAccessTokenAsync()}async getAccessTokenAsync(){if(!this.credentials.access_token||this.isTokenExpiring()){if(!this.credentials.refresh_token)if(this.refreshHandler){let o=await this.processAndValidateRefreshHandler();if(o?.access_token)return this.setCredentials(o),{token:this.credentials.access_token}}else throw new Error("No refresh token or refresh handler callback is set.");let n=await this.refreshAccessTokenAsync();if(!n.credentials||n.credentials&&!n.credentials.access_token)throw new Error("Could not refresh access token.");return{token:n.credentials.access_token,res:n.res}}else return{token:this.credentials.access_token}}async getRequestHeaders(t){return(await this.getRequestMetadataAsync(t)).headers}async getRequestMetadataAsync(t){let n=this.credentials;if(!n.access_token&&!n.refresh_token&&!this.apiKey&&!this.refreshHandler)throw new Error("No access, refresh token, API key or refresh handler callback is set.");if(n.access_token&&!this.isTokenExpiring()){n.token_type=n.token_type||"Bearer";let u=new Headers({authorization:n.token_type+" "+n.access_token});return{headers:this.addSharedMetadataHeaders(u)}}if(this.refreshHandler){let u=await this.processAndValidateRefreshHandler();if(u?.access_token){this.setCredentials(u);let d=new Headers({authorization:"Bearer "+this.credentials.access_token});return{headers:this.addSharedMetadataHeaders(d)}}}if(this.apiKey)return{headers:new Headers({"X-Goog-Api-Key":this.apiKey})};let o=null,r=null;try{o=await this.refreshToken(n.refresh_token),r=o.tokens}catch(u){let d=u;throw d.response&&(d.response.status===403||d.response.status===404)&&(d.message=`Could not refresh access token: ${d.message}`),d}let i=this.credentials;i.token_type=i.token_type||"Bearer",r.refresh_token=i.refresh_token,this.credentials=r;let s=new Headers({authorization:i.token_type+" "+r.access_token});return{headers:this.addSharedMetadataHeaders(s),res:o.res}}static getRevokeTokenUrl(t){return new e().getRevokeTokenURL(t).toString()}getRevokeTokenURL(t){let n=new URL(this.endpoints.oauth2RevokeUrl);return n.searchParams.append("token",t),n}revokeToken(t,n){let o={...e.RETRY_CONFIG,url:this.getRevokeTokenURL(t).toString(),method:"POST"};if(Va.AuthClient.setMethodName(o,"revokeToken"),n)this.transporter.request(o).then(r=>n(null,r),n);else return this.transporter.request(o)}revokeCredentials(t){if(t)this.revokeCredentialsAsync().then(n=>t(null,n),t);else return this.revokeCredentialsAsync()}async revokeCredentialsAsync(){let t=this.credentials.access_token;if(this.credentials={},t)return this.revokeToken(t);throw new Error("No access token to revoke.")}request(t,n){if(n)this.requestAsync(t).then(o=>n(null,o),o=>n(o,o.response));else return this.requestAsync(t)}async requestAsync(t,n=!1){try{let o=await this.getRequestMetadataAsync();return t.headers=Ck.Gaxios.mergeHeaders(t.headers),this.addUserProjectAndAuthHeaders(t.headers,o.headers),this.apiKey&&t.headers.set("X-Goog-Api-Key",this.apiKey),await this.transporter.request(t)}catch(o){let r=o.response;if(r){let i=r.status,s=this.credentials&&this.credentials.access_token&&this.credentials.refresh_token&&(!this.credentials.expiry_date||this.forceRefreshOnFailure),u=this.credentials&&this.credentials.access_token&&!this.credentials.refresh_token&&(!this.credentials.expiry_date||this.forceRefreshOnFailure)&&this.refreshHandler,d=r.config.data instanceof R2.Readable,f=i===401||i===403;if(!n&&f&&!d&&s)return await this.refreshAccessTokenAsync(),this.requestAsync(t,!0);if(!n&&f&&!d&&u){let h=await this.processAndValidateRefreshHandler();return h?.access_token&&this.setCredentials(h),this.requestAsync(t,!0)}}throw o}}verifyIdToken(t,n){if(n&&typeof n!="function")throw new Error("This method accepts an options object as the first parameter, which includes the idToken, audience, and maxExpiry.");if(n)this.verifyIdTokenAsync(t).then(o=>n(null,o),n);else return this.verifyIdTokenAsync(t)}async verifyIdTokenAsync(t){if(!t.idToken)throw new Error("The verifyIdToken method requires an ID Token");let n=await this.getFederatedSignonCertsAsync();return await this.verifySignedJwtWithCertsAsync(t.idToken,n.certs,t.audience,this.issuers,t.maxExpiry)}async getTokenInfo(t){let{data:n}=await this.transporter.request({...e.RETRY_CONFIG,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded;charset=UTF-8",authorization:`Bearer ${t}`},url:this.endpoints.tokenInfoUrl.toString()}),o=Object.assign({expiry_date:new Date().getTime()+n.expires_in*1e3,scopes:n.scope.split(" ")},n);return delete o.expires_in,delete o.scope,o}getFederatedSignonCerts(t){if(t)this.getFederatedSignonCertsAsync().then(n=>t(null,n.certs,n.res),t);else return this.getFederatedSignonCertsAsync()}async getFederatedSignonCertsAsync(){let t=new Date().getTime(),n=(0,ME.hasBrowserCrypto)()?Jn.JWK:Jn.PEM;if(this.certificateExpiry&&t<this.certificateExpiry.getTime()&&this.certificateCacheFormat===n)return{certs:this.certificateCache,format:n};let o,r;switch(n){case Jn.PEM:r=this.endpoints.oauth2FederatedSignonPemCertsUrl.toString();break;case Jn.JWK:r=this.endpoints.oauth2FederatedSignonJwkCertsUrl.toString();break;default:throw new Error(`Unsupported certificate format ${n}`)}try{let f={...e.RETRY_CONFIG,url:r};Va.AuthClient.setMethodName(f,"getFederatedSignonCertsAsync"),o=await this.transporter.request(f)}catch(f){throw f instanceof Error&&(f.message=`Failed to retrieve verification certificates: ${f.message}`),f}let i=o?.headers.get("cache-control"),s=-1;if(i){let f=/max-age=(?<maxAge>[0-9]+)/.exec(i)?.groups?.maxAge;f&&(s=Number(f)*1e3)}let u={};switch(n){case Jn.PEM:u=o.data;break;case Jn.JWK:for(let f of o.data.keys)u[f.kid]=f;break;default:throw new Error(`Unsupported certificate format ${n}`)}let d=new Date;return this.certificateExpiry=s===-1?null:new Date(d.getTime()+s),this.certificateCache=u,this.certificateCacheFormat=n,{certs:u,format:n,res:o}}getIapPublicKeys(t){if(t)this.getIapPublicKeysAsync().then(n=>t(null,n.pubkeys,n.res),t);else return this.getIapPublicKeysAsync()}async getIapPublicKeysAsync(){let t,n=this.endpoints.oauth2IapPublicKeyUrl.toString();try{let o={...e.RETRY_CONFIG,url:n};Va.AuthClient.setMethodName(o,"getIapPublicKeysAsync"),t=await this.transporter.request(o)}catch(o){throw o instanceof Error&&(o.message=`Failed to retrieve verification certificates: ${o.message}`),o}return{pubkeys:t.data,res:t}}verifySignedJwtWithCerts(){throw new Error("verifySignedJwtWithCerts is removed, please use verifySignedJwtWithCertsAsync instead.")}async verifySignedJwtWithCertsAsync(t,n,o,r,i){let s=(0,ME.createCrypto)();i||(i=e.DEFAULT_MAX_TOKEN_LIFETIME_SECS_);let u=t.split(".");if(u.length!==3)throw new Error("Wrong number of segments in token: "+t);let d=u[0]+"."+u[1],f=u[2],h,g;try{h=JSON.parse(s.decodeBase64StringUtf8(u[0]))}catch(N){throw N instanceof Error&&(N.message=`Can't parse token envelope: ${u[0]}': ${N.message}`),N}if(!h)throw new Error("Can't parse token envelope: "+u[0]);try{g=JSON.parse(s.decodeBase64StringUtf8(u[1]))}catch(N){throw N instanceof Error&&(N.message=`Can't parse token payload '${u[0]}`),N}if(!g)throw new Error("Can't parse token payload: "+u[1]);if(!Object.prototype.hasOwnProperty.call(n,h.kid))throw new Error("No pem found for envelope: "+JSON.stringify(h));let m=n[h.kid];if(h.alg==="ES256"&&(f=C2.joseToDer(f,"ES256").toString("base64")),!await s.verify(m,d,f))throw new Error("Invalid token signature: "+t);if(!g.iat)throw new Error("No issue time in token: "+JSON.stringify(g));if(!g.exp)throw new Error("No expiration time in token: "+JSON.stringify(g));let y=Number(g.iat);if(isNaN(y))throw new Error("iat field using invalid format");let v=Number(g.exp);if(isNaN(v))throw new Error("exp field using invalid format");let E=new Date().getTime()/1e3;if(v>=E+i)throw new Error("Expiration time too far in future: "+JSON.stringify(g));let b=y-e.CLOCK_SKEW_SECS_,k=v+e.CLOCK_SKEW_SECS_;if(E<b)throw new Error("Token used too early, "+E+" < "+b+": "+JSON.stringify(g));if(E>k)throw new Error("Token used too late, "+E+" > "+k+": "+JSON.stringify(g));if(r&&r.indexOf(g.iss)<0)throw new Error("Invalid issuer, expected one of ["+r+"], but got "+g.iss);if(typeof o<"u"&&o!==null){let N=g.aud,Z=!1;if(o.constructor===Array?Z=o.indexOf(N)>-1:Z=N===o,!Z)throw new Error("Wrong recipient, payload audience != requiredAudience")}return new O2.LoginTicket(h,g)}async processAndValidateRefreshHandler(){if(this.refreshHandler){let t=await this.refreshHandler();if(!t.access_token)throw new Error("No access token is returned by the refreshHandler callback.");return t}}isTokenExpiring(){let t=this.credentials.expiry_date;return t?t<=new Date().getTime()+this.eagerRefreshThresholdMillis:!1}};bn.OAuth2Client=LE});var FE=z(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});lm.Compute=void 0;var k2=Pt(),$k=Au(),$2=xi(),jE=class extends $2.OAuth2Client{static{a(this,"Compute")}serviceAccountEmail;scopes;constructor(t={}){super(t),this.credentials={expiry_date:1,refresh_token:"compute-placeholder"},this.serviceAccountEmail=t.serviceAccountEmail||"default",this.scopes=Array.isArray(t.scopes)?t.scopes:t.scopes?[t.scopes]:[]}async refreshTokenNoCache(){let t=`service-accounts/${this.serviceAccountEmail}/token`,n;try{let r={property:t};this.scopes.length>0&&(r.params={scopes:this.scopes.join(",")}),n=await $k.instance(r)}catch(r){throw r instanceof k2.GaxiosError&&(r.message=`Could not refresh access token: ${r.message}`,this.wrapError(r)),r}let o=n;return n&&n.expires_in&&(o.expiry_date=new Date().getTime()+n.expires_in*1e3,delete o.expires_in),this.emit("tokens",o),{tokens:o,res:null}}async fetchIdToken(t){let n=`service-accounts/${this.serviceAccountEmail}/identity?format=full&audience=${t}`,o;try{let r={property:n};o=await $k.instance(r)}catch(r){throw r instanceof Error&&(r.message=`Could not fetch ID token: ${r.message}`),r}return o}wrapError(t){let n=t.response;n&&n.status&&(t.status=n.status,n.status===403?t.message="A Forbidden error was returned while attempting to retrieve an access token for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have the correct permission scopes specified: "+t.message:n.status===404&&(t.message="A Not Found error was returned while attempting to retrieve an accesstoken for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have any permission scopes specified: "+t.message))}};lm.Compute=jE});var qE=z(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});dm.IdTokenClient=void 0;var D2=xi(),BE=class extends D2.OAuth2Client{static{a(this,"IdTokenClient")}targetAudience;idTokenProvider;constructor(t){super(t),this.targetAudience=t.targetAudience,this.idTokenProvider=t.idTokenProvider}async getRequestMetadataAsync(){if(!this.credentials.id_token||!this.credentials.expiry_date||this.isTokenExpiring()){let n=await this.idTokenProvider.fetchIdToken(this.targetAudience);this.credentials={id_token:n,expiry_date:this.getIdTokenExpiryDate(n)}}return{headers:new Headers({authorization:"Bearer "+this.credentials.id_token})}}getIdTokenExpiryDate(t){let n=t.split(".")[1];if(n)return JSON.parse(Buffer.from(n,"base64").toString("ascii")).exp*1e3}};dm.IdTokenClient=BE});var VE=z(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});Ga.GCPEnv=void 0;Ga.clear=N2;Ga.getEnv=z2;var Dk=Au(),En;(function(e){e.APP_ENGINE="APP_ENGINE",e.KUBERNETES_ENGINE="KUBERNETES_ENGINE",e.CLOUD_FUNCTIONS="CLOUD_FUNCTIONS",e.COMPUTE_ENGINE="COMPUTE_ENGINE",e.CLOUD_RUN="CLOUD_RUN",e.CLOUD_RUN_JOBS="CLOUD_RUN_JOBS",e.NONE="NONE"})(En||(Ga.GCPEnv=En={}));var Cu;function N2(){Cu=void 0}a(N2,"clear");async function z2(){return Cu||(Cu=U2(),Cu)}a(z2,"getEnv");async function U2(){let e=En.NONE;return M2()?e=En.APP_ENGINE:L2()?e=En.CLOUD_FUNCTIONS:await q2()?await B2()?e=En.KUBERNETES_ENGINE:j2()?e=En.CLOUD_RUN:F2()?e=En.CLOUD_RUN_JOBS:e=En.COMPUTE_ENGINE:e=En.NONE,e}a(U2,"getEnvMemoized");function M2(){return!!(process.env.GAE_SERVICE||process.env.GAE_MODULE_NAME)}a(M2,"isAppEngine");function L2(){return!!(process.env.FUNCTION_NAME||process.env.FUNCTION_TARGET)}a(L2,"isCloudFunction");function j2(){return!!process.env.K_CONFIGURATION}a(j2,"isCloudRun");function F2(){return!!process.env.CLOUD_RUN_JOB}a(F2,"isCloudRunJob");async function B2(){try{return await Dk.instance("attributes/cluster-name"),!0}catch{return!1}}a(B2,"isKubernetesEngine");async function q2(){return Dk.isAvailable()}a(q2,"isComputeEngine")});var GE=z((rse,Nk)=>{var pm=qa().Buffer,V2=require("stream"),G2=require("util");function fm(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=pm.alloc(0),this;if(typeof e.pipe=="function")return this.buffer=pm.alloc(0),e.pipe(this),this;if(e.length||typeof e=="object")return this.buffer=e,this.writable=!1,process.nextTick(function(){this.emit("end",e),this.readable=!1,this.emit("close")}.bind(this)),this;throw new TypeError("Unexpected data type ("+typeof e+")")}a(fm,"DataStream");G2.inherits(fm,V2);fm.prototype.write=a(function(t){this.buffer=pm.concat([this.buffer,pm.from(t)]),this.emit("data",t)},"write");fm.prototype.end=a(function(t){t&&this.write(t),this.emit("end",t),this.emit("close"),this.writable=!1,this.readable=!1},"end");Nk.exports=fm});var Uk=z((ose,zk)=>{"use strict";var Ou=require("buffer").Buffer,HE=require("buffer").SlowBuffer;zk.exports=mm;function mm(e,t){if(!Ou.isBuffer(e)||!Ou.isBuffer(t)||e.length!==t.length)return!1;for(var n=0,o=0;o<e.length;o++)n|=e[o]^t[o];return n===0}a(mm,"bufferEq");mm.install=function(){Ou.prototype.equal=HE.prototype.equal=a(function(t){return mm(this,t)},"equal")};var H2=Ou.prototype.equal,Z2=HE.prototype.equal;mm.restore=function(){Ou.prototype.equal=H2,HE.prototype.equal=Z2}});var JE=z((ase,Hk)=>{var Za=qa().Buffer,qr=require("crypto"),Lk=RE(),Mk=require("util"),W2=`"%s" is not a valid algorithm.
|
|
39
39
|
Supported algorithms are:
|
|
40
|
-
"HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`,Oa="secret must be a string or buffer",hi="key must be a string or a buffer",CN="key must be a string, a buffer or an object",Wp=typeof vr.createPublicKey=="function";Wp&&(hi+=" or a KeyObject",Oa+="or a KeyObject");function Rw(t){if(!gi.isBuffer(t)&&typeof t!="string"&&(!Wp||typeof t!="object"||typeof t.type!="string"||typeof t.asymmetricKeyType!="string"||typeof t.export!="function"))throw Dr(hi)}o(Rw,"checkIsPublicKey");function Cw(t){if(!gi.isBuffer(t)&&typeof t!="string"&&typeof t!="object")throw Dr(CN)}o(Cw,"checkIsPrivateKey");function ON(t){if(!gi.isBuffer(t)){if(typeof t=="string")return t;if(!Wp||typeof t!="object"||t.type!=="secret"||typeof t.export!="function")throw Dr(Oa)}}o(ON,"checkIsSecretKey");function Zp(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}o(Zp,"fromBase64");function Ow(t){t=t.toString();var e=4-t.length%4;if(e!==4)for(var r=0;r<e;++r)t+="=";return t.replace(/\-/g,"+").replace(/_/g,"/")}o(Ow,"toBase64");function Dr(t){var e=[].slice.call(arguments,1),r=Aw.format.bind(Aw,t).apply(null,e);return new TypeError(r)}o(Dr,"typeError");function kN(t){return gi.isBuffer(t)||typeof t=="string"}o(kN,"bufferOrString");function ka(t){return kN(t)||(t=JSON.stringify(t)),t}o(ka,"normalizeInput");function kw(t){return o(function(r,n){ON(n),r=ka(r);var i=vr.createHmac("sha"+t,n),s=(i.update(r),i.digest("base64"));return Zp(s)},"sign")}o(kw,"createHmacSigner");var Hp,$N="timingSafeEqual"in vr?o(function(e,r){return e.byteLength!==r.byteLength?!1:vr.timingSafeEqual(e,r)},"timingSafeEqual"):o(function(e,r){return Hp||(Hp=xw()),Hp(e,r)},"timingSafeEqual");function DN(t){return o(function(r,n,i){var s=kw(t)(r,i);return $N(gi.from(n),gi.from(s))},"verify")}o(DN,"createHmacVerifier");function $w(t){return o(function(r,n){Cw(n),r=ka(r);var i=vr.createSign("RSA-SHA"+t),s=(i.update(r),i.sign(n,"base64"));return Zp(s)},"sign")}o($w,"createKeySigner");function Dw(t){return o(function(r,n,i){Rw(i),r=ka(r),n=Ow(n);var s=vr.createVerify("RSA-SHA"+t);return s.update(r),s.verify(i,n,"base64")},"verify")}o(Dw,"createKeyVerifier");function NN(t){return o(function(r,n){Cw(n),r=ka(r);var i=vr.createSign("RSA-SHA"+t),s=(i.update(r),i.sign({key:n,padding:vr.constants.RSA_PKCS1_PSS_PADDING,saltLength:vr.constants.RSA_PSS_SALTLEN_DIGEST},"base64"));return Zp(s)},"sign")}o(NN,"createPSSKeySigner");function zN(t){return o(function(r,n,i){Rw(i),r=ka(r),n=Ow(n);var s=vr.createVerify("RSA-SHA"+t);return s.update(r),s.verify({key:i,padding:vr.constants.RSA_PKCS1_PSS_PADDING,saltLength:vr.constants.RSA_PSS_SALTLEN_DIGEST},n,"base64")},"verify")}o(zN,"createPSSKeyVerifier");function UN(t){var e=$w(t);return o(function(){var n=e.apply(null,arguments);return n=Iw.derToJose(n,"ES"+t),n},"sign")}o(UN,"createECDSASigner");function MN(t){var e=Dw(t);return o(function(n,i,s){i=Iw.joseToDer(i,"ES"+t).toString("base64");var c=e(n,i,s);return c},"verify")}o(MN,"createECDSAVerifer");function LN(){return o(function(){return""},"sign")}o(LN,"createNoneSigner");function jN(){return o(function(e,r){return r===""},"verify")}o(jN,"createNoneVerifier");Nw.exports=o(function(e){var r={hs:kw,rs:$w,ps:NN,es:UN,none:LN},n={hs:DN,rs:Dw,ps:zN,es:MN,none:jN},i=e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!i)throw Dr(RN,e);var s=(i[1]||i[3]).toLowerCase(),c=i[2];return{sign:r[s](c),verify:n[s](c)}},"jwa")});var Jp=D((c7,zw)=>{var FN=require("buffer").Buffer;zw.exports=o(function(e){return typeof e=="string"?e:typeof e=="number"||FN.isBuffer(e)?e.toString():JSON.stringify(e)},"toString")});var qw=D((d7,Fw)=>{var qN=pi().Buffer,Uw=Vp(),BN=Kp(),VN=require("stream"),Mw=Jp(),Yp=require("util");function Lw(t,e){return qN.from(t,e).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}o(Lw,"base64url");function GN(t,e,r){r=r||"utf8";var n=Lw(Mw(t),"binary"),i=Lw(Mw(e),r);return Yp.format("%s.%s",n,i)}o(GN,"jwsSecuredInput");function jw(t){var e=t.header,r=t.payload,n=t.secret||t.privateKey,i=t.encoding,s=BN(e.alg),c=GN(e,r,i),d=s.sign(c,n);return Yp.format("%s.%s",c,d)}o(jw,"jwsSign");function Yu(t){var e=t.secret;if(e=e??t.privateKey,e=e??t.key,/^hs/i.test(t.header.alg)===!0&&e==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var r=new Uw(e);this.readable=!0,this.header=t.header,this.encoding=t.encoding,this.secret=this.privateKey=this.key=r,this.payload=new Uw(t.payload),this.secret.once("close",function(){!this.payload.writable&&this.readable&&this.sign()}.bind(this)),this.payload.once("close",function(){!this.secret.writable&&this.readable&&this.sign()}.bind(this))}o(Yu,"SignStream");Yp.inherits(Yu,VN);Yu.prototype.sign=o(function(){try{var e=jw({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",e),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(r){this.readable=!1,this.emit("error",r),this.emit("close")}},"sign");Yu.sign=jw;Fw.exports=Yu});var Xw=D((f7,Yw)=>{var Vw=pi().Buffer,Bw=Vp(),HN=Kp(),WN=require("stream"),Gw=Jp(),ZN=require("util"),KN=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function JN(t){return Object.prototype.toString.call(t)==="[object Object]"}o(JN,"isObject");function YN(t){if(JN(t))return t;try{return JSON.parse(t)}catch{return}}o(YN,"safeJsonParse");function Hw(t){var e=t.split(".",1)[0];return YN(Vw.from(e,"base64").toString("binary"))}o(Hw,"headerFromJWS");function XN(t){return t.split(".",2).join(".")}o(XN,"securedInputFromJWS");function Ww(t){return t.split(".")[2]}o(Ww,"signatureFromJWS");function QN(t,e){e=e||"utf8";var r=t.split(".")[1];return Vw.from(r,"base64").toString(e)}o(QN,"payloadFromJWS");function Zw(t){return KN.test(t)&&!!Hw(t)}o(Zw,"isValidJws");function Kw(t,e,r){if(!e){var n=new Error("Missing algorithm parameter for jws.verify");throw n.code="MISSING_ALGORITHM",n}t=Gw(t);var i=Ww(t),s=XN(t),c=HN(e);return c.verify(s,i,r)}o(Kw,"jwsVerify");function Jw(t,e){if(e=e||{},t=Gw(t),!Zw(t))return null;var r=Hw(t);if(!r)return null;var n=QN(t);return(r.typ==="JWT"||e.json)&&(n=JSON.parse(n,e.encoding)),{header:r,payload:n,signature:Ww(t)}}o(Jw,"jwsDecode");function yi(t){t=t||{};var e=t.secret;if(e=e??t.publicKey,e=e??t.key,/^hs/i.test(t.algorithm)===!0&&e==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var r=new Bw(e);this.readable=!0,this.algorithm=t.algorithm,this.encoding=t.encoding,this.secret=this.publicKey=this.key=r,this.signature=new Bw(t.signature),this.secret.once("close",function(){!this.signature.writable&&this.readable&&this.verify()}.bind(this)),this.signature.once("close",function(){!this.secret.writable&&this.readable&&this.verify()}.bind(this))}o(yi,"VerifyStream");ZN.inherits(yi,WN);yi.prototype.verify=o(function(){try{var e=Kw(this.signature.buffer,this.algorithm,this.key.buffer),r=Jw(this.signature.buffer,this.encoding);return this.emit("done",e,r),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(n){this.readable=!1,this.emit("error",n),this.emit("close")}},"verify");yi.decode=Jw;yi.isValid=Zw;yi.verify=Kw;Yw.exports=yi});var Xp=D(Yn=>{var Qw=qw(),Xu=Xw(),ez=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];Yn.ALGORITHMS=ez;Yn.sign=Qw.sign;Yn.verify=Xu.verify;Yn.decode=Xu.decode;Yn.isValid=Xu.isValid;Yn.createSign=o(function(e){return new Qw(e)},"createSign");Yn.createVerify=o(function(e){return new Xu(e)},"createVerify")});var mT=D(ec=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});ec.GoogleToken=void 0;var eT=Qu(require("fs")),tz=ht(),rz=Qu(Xp()),nz=Qu(require("path")),oz=require("util");function Qu(t,e){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(Qu=o(function(s,c){if(!c&&s&&s.__esModule)return s;var d,p,m={__proto__:null,default:s};if(s===null||En(s)!="object"&&typeof s!="function")return m;if(d=c?n:r){if(d.has(s))return d.get(s);d.set(s,m)}for(var y in s)y!=="default"&&{}.hasOwnProperty.call(s,y)&&((p=(d=Object.defineProperty)&&Object.getOwnPropertyDescriptor(s,y))&&(p.get||p.set)?d(m,y,p):m[y]=s[y]);return m},"_interopRequireWildcard"))(t,e)}o(Qu,"_interopRequireWildcard");function En(t){"@babel/helpers - typeof";return En=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},En(t)}o(En,"_typeof");function iz(t,e){cT(t,e),e.add(t)}o(iz,"_classPrivateMethodInitSpec");function az(t,e,r){cT(t,e),e.set(t,r)}o(az,"_classPrivateFieldInitSpec");function cT(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}o(cT,"_checkPrivateRedeclaration");function tT(t,e,r){return t.set(Nr(t,e),r),r}o(tT,"_classPrivateFieldSet");function rT(t,e){return t.get(Nr(t,e))}o(rT,"_classPrivateFieldGet");function Nr(t,e,r){if(typeof t=="function"?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}o(Nr,"_assertClassBrand");function nT(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,pT(n.key),n)}}o(nT,"_defineProperties");function lT(t,e,r){return e&&nT(t.prototype,e),r&&nT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}o(lT,"_createClass");function dT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}o(dT,"_classCallCheck");function sz(t,e,r){return e=za(e),uz(t,of()?Reflect.construct(e,r||[],za(t).constructor):e.apply(t,r))}o(sz,"_callSuper");function uz(t,e){if(e&&(En(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cz(t)}o(uz,"_possibleConstructorReturn");function cz(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}o(cz,"_assertThisInitialized");function lz(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Na(t,e)}o(lz,"_inherits");function Qp(t){var e=typeof Map=="function"?new Map:void 0;return Qp=o(function(n){if(n===null||!pz(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return dz(n,arguments,za(this).constructor)}return o(i,"Wrapper"),i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Na(i,n)},"_wrapNativeSuper"),Qp(t)}o(Qp,"_wrapNativeSuper");function dz(t,e,r){if(of())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var i=new(t.bind.apply(t,n));return r&&Na(i,r.prototype),i}o(dz,"_construct");function of(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(of=o(function(){return!!t},"_isNativeReflectConstruct"))()}o(of,"_isNativeReflectConstruct");function pz(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}o(pz,"_isNativeFunction");function Na(t,e){return Na=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Na(t,e)}o(Na,"_setPrototypeOf");function za(t){return za=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},za(t)}o(za,"_getPrototypeOf");function or(t,e,r){return(e=pT(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}o(or,"_defineProperty");function pT(t){var e=fz(t,"string");return En(e)=="symbol"?e:e+""}o(pT,"_toPropertyKey");function fz(t,e){if(En(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(En(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}o(fz,"_toPrimitive");function ar(){var t,e,r=typeof Symbol=="function"?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function s(l,g,v,E){var b=g&&g.prototype instanceof d?g:d,C=Object.create(b.prototype);return ir(C,"_invoke",(function(U,J,Z){var H,K,te,Q=0,xe=Z||[],re=!1,V={p:0,n:0,v:t,a:B,f:B.bind(t,4),d:o(function(Y,ie){return H=Y,K=0,te=t,V.n=ie,c},"d")};function B(X,Y){for(K=X,te=Y,e=0;!re&&Q&&!ie&&e<xe.length;e++){var ie,ue=xe[e],Ce=V.p,De=ue[2];X>3?(ie=De===Y)&&(te=ue[(K=ue[4])?5:(K=3,3)],ue[4]=ue[5]=t):ue[0]<=Ce&&((ie=X<2&&Ce<ue[1])?(K=0,V.v=Y,V.n=ue[1]):Ce<De&&(ie=X<3||ue[0]>Y||Y>De)&&(ue[4]=X,ue[5]=Y,V.n=De,K=0))}if(ie||X>1)return c;throw re=!0,Y}return o(B,"d"),function(X,Y,ie){if(Q>1)throw TypeError("Generator is already running");for(re&&Y===1&&B(Y,ie),K=Y,te=ie;(e=K<2?t:te)||!re;){H||(K?K<3?(K>1&&(V.n=-1),B(K,te)):V.n=te:V.v=te);try{if(Q=2,H){if(K||(X="next"),e=H[X]){if(!(e=e.call(H,te)))throw TypeError("iterator result is not an object");if(!e.done)return e;te=e.value,K<2&&(K=0)}else K===1&&(e=H.return)&&e.call(H),K<2&&(te=TypeError("The iterator does not provide a '"+X+"' method"),K=1);H=t}else if((e=(re=V.n<0)?te:U.call(J,V))!==c)break}catch(ue){H=t,K=1,te=ue}finally{Q=1}}return{value:e,done:re}}})(l,v,E),!0),C}o(s,"i");var c={};function d(){}o(d,"Generator");function p(){}o(p,"GeneratorFunction");function m(){}o(m,"GeneratorFunctionPrototype"),e=Object.getPrototypeOf;var y=[][n]?e(e([][n]())):(ir(e={},n,function(){return this}),e),h=m.prototype=d.prototype=Object.create(y);function f(l){return Object.setPrototypeOf?Object.setPrototypeOf(l,m):(l.__proto__=m,ir(l,i,"GeneratorFunction")),l.prototype=Object.create(h),l}return o(f,"f"),p.prototype=m,ir(h,"constructor",m),ir(m,"constructor",p),p.displayName="GeneratorFunction",ir(m,i,"GeneratorFunction"),ir(h),ir(h,i,"Generator"),ir(h,n,function(){return this}),ir(h,"toString",function(){return"[object Generator]"}),(ar=o(function(){return{w:s,m:f}},"_regenerator"))()}o(ar,"_regenerator");function ir(t,e,r,n){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}ir=o(function(c,d,p,m){if(d)i?i(c,d,{value:p,enumerable:!m,configurable:!m,writable:!m}):c[d]=p;else{var y=o(function(f,l){ir(c,f,function(g){return this._invoke(f,l,g)})},"o");y("next",0),y("throw",1),y("return",2)}},"_regeneratorDefine"),ir(t,e,r,n)}o(ir,"_regeneratorDefine2");function oT(t,e,r,n,i,s,c){try{var d=t[s](c),p=d.value}catch(m){return void r(m)}d.done?e(p):Promise.resolve(p).then(n,i)}o(oT,"asyncGeneratorStep");function vi(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function c(p){oT(s,n,i,c,d,"next",p)}o(c,"_next");function d(p){oT(s,n,i,c,d,"throw",p)}o(d,"_throw"),c(void 0)})}}o(vi,"_asyncToGenerator");var iT=eT.readFile?(0,oz.promisify)(eT.readFile):vi(ar().m(o(function t(){return ar().w(function(e){for(;;)switch(e.n){case 0:throw new Da("use key rather than keyFile.","MISSING_CREDENTIALS");case 1:return e.a(2)}},t)},"_callee"))),aT="https://oauth2.googleapis.com/token",mz="https://oauth2.googleapis.com/revoke?token=",Da=(function(t){function e(r,n){var i;return dT(this,e),i=sz(this,e,[r]),or(i,"code",void 0),i.code=n,i}return o(e,"ErrorWithCode"),lz(e,t),lT(e)})(Qp(Error)),$a=new WeakMap,Zr=new WeakSet,y7=ec.GoogleToken=(function(){function t(e){dT(this,t),iz(this,Zr),or(this,"expiresAt",void 0),or(this,"key",void 0),or(this,"keyFile",void 0),or(this,"iss",void 0),or(this,"sub",void 0),or(this,"scope",void 0),or(this,"rawToken",void 0),or(this,"tokenExpires",void 0),or(this,"email",void 0),or(this,"additionalClaims",void 0),or(this,"eagerRefreshThresholdMillis",void 0),or(this,"transporter",{request:o(function(n){return(0,tz.request)(n)},"request")}),az(this,$a,void 0),Nr(Zr,this,fT).call(this,e)}return o(t,"GoogleToken"),lT(t,[{key:"accessToken",get:o(function(){return this.rawToken?this.rawToken.access_token:void 0},"get")},{key:"idToken",get:o(function(){return this.rawToken?this.rawToken.id_token:void 0},"get")},{key:"tokenType",get:o(function(){return this.rawToken?this.rawToken.token_type:void 0},"get")},{key:"refreshToken",get:o(function(){return this.rawToken?this.rawToken.refresh_token:void 0},"get")},{key:"hasExpired",value:o(function(){var r=new Date().getTime();return this.rawToken&&this.expiresAt?r>=this.expiresAt:!0},"hasExpired")},{key:"isTokenExpiring",value:o(function(){var r,n=new Date().getTime(),i=(r=this.eagerRefreshThresholdMillis)!==null&&r!==void 0?r:0;return this.rawToken&&this.expiresAt?this.expiresAt<=n+i:!0},"isTokenExpiring")},{key:"getToken",value:o(function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(En(r)==="object"&&(n=r,r=void 0),n=Object.assign({forceRefresh:!1},n),r){var i=r;Nr(Zr,this,sT).call(this,n).then(function(s){return i(null,s)},r);return}return Nr(Zr,this,sT).call(this,n)},"getToken")},{key:"getCredentials",value:(function(){var e=vi(ar().m(o(function n(i){var s,c,d,p,m,y,h;return ar().w(function(f){for(;;)switch(f.n){case 0:s=nz.extname(i),h=s,f.n=h===".json"?1:h===".der"||h===".crt"||h===".pem"?4:h===".p12"||h===".pfx"?6:7;break;case 1:return f.n=2,iT(i,"utf8");case 2:if(c=f.v,d=JSON.parse(c),p=d.private_key,m=d.client_email,!(!p||!m)){f.n=3;break}throw new Da("private_key and client_email are required.","MISSING_CREDENTIALS");case 3:return f.a(2,{privateKey:p,clientEmail:m});case 4:return f.n=5,iT(i,"utf8");case 5:return y=f.v,f.a(2,{privateKey:y});case 6:throw new Da("*.p12 certificates are not supported after v6.1.2. Consider utilizing *.json format or converting *.p12 to *.pem using the OpenSSL CLI.","UNKNOWN_CERTIFICATE_TYPE");case 7:throw new Da("Unknown certificate type. Type is determined based on file extension. Current supported extensions are *.json, and *.pem.","UNKNOWN_CERTIFICATE_TYPE");case 8:return f.a(2)}},n)},"_callee2")));function r(n){return e.apply(this,arguments)}return o(r,"getCredentials"),r})()},{key:"revokeToken",value:o(function(r){if(r){Nr(Zr,this,uT).call(this).then(function(){return r()},r);return}return Nr(Zr,this,uT).call(this)},"revokeToken")}])})();function sT(t){return ef.apply(this,arguments)}o(sT,"_getTokenAsync");function ef(){return ef=vi(ar().m(o(function t(e){return ar().w(function(r){for(;;)switch(r.n){case 0:if(!(rT($a,this)&&!e.forceRefresh)){r.n=1;break}return r.a(2,rT($a,this));case 1:return r.p=1,r.n=2,tT($a,this,Nr(Zr,this,hz).call(this,e));case 2:return r.a(2,r.v);case 3:return r.p=3,tT($a,this,void 0),r.f(3);case 4:return r.a(2)}},t,this,[[1,,3,4]])},"_callee3"))),ef.apply(this,arguments)}o(ef,"_getTokenAsync2");function hz(t){return tf.apply(this,arguments)}o(hz,"_getTokenAsyncInner");function tf(){return tf=vi(ar().m(o(function t(e){var r;return ar().w(function(n){for(;;)switch(n.n){case 0:if(!(this.isTokenExpiring()===!1&&e.forceRefresh===!1)){n.n=1;break}return n.a(2,Promise.resolve(this.rawToken));case 1:if(!(!this.key&&!this.keyFile)){n.n=2;break}throw new Error("No key or keyFile set.");case 2:if(!(!this.key&&this.keyFile)){n.n=4;break}return n.n=3,this.getCredentials(this.keyFile);case 3:r=n.v,this.key=r.privateKey,this.iss=r.clientEmail||this.iss,r.clientEmail||Nr(Zr,this,gz).call(this);case 4:return n.a(2,Nr(Zr,this,yz).call(this))}},t,this)},"_callee4"))),tf.apply(this,arguments)}o(tf,"_getTokenAsyncInner2");function gz(){if(!this.iss)throw new Da("email is required.","MISSING_CREDENTIALS")}o(gz,"_ensureEmail");function uT(){return rf.apply(this,arguments)}o(uT,"_revokeTokenAsync");function rf(){return rf=vi(ar().m(o(function t(){var e;return ar().w(function(r){for(;;)switch(r.n){case 0:if(this.accessToken){r.n=1;break}throw new Error("No token to revoke.");case 1:return e=mz+this.accessToken,r.n=2,this.transporter.request({url:e,retry:!0});case 2:Nr(Zr,this,fT).call(this,{email:this.iss,sub:this.sub,key:this.key,keyFile:this.keyFile,scope:this.scope,additionalClaims:this.additionalClaims});case 3:return r.a(2)}},t,this)},"_callee5"))),rf.apply(this,arguments)}o(rf,"_revokeTokenAsync2");function fT(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.keyFile=t.keyFile,this.key=t.key,this.rawToken=void 0,this.iss=t.email||t.iss,this.sub=t.sub,this.additionalClaims=t.additionalClaims,En(t.scope)==="object"?this.scope=t.scope.join(" "):this.scope=t.scope,this.eagerRefreshThresholdMillis=t.eagerRefreshThresholdMillis,t.transporter&&(this.transporter=t.transporter)}o(fT,"_configure");function yz(){return nf.apply(this,arguments)}o(yz,"_requestToken");function nf(){return nf=vi(ar().m(o(function t(){var e,r,n,i,s,c,d,p,m,y;return ar().w(function(h){for(;;)switch(h.n){case 0:return e=Math.floor(new Date().getTime()/1e3),r=this.additionalClaims||{},n=Object.assign({iss:this.iss,scope:this.scope,aud:aT,exp:e+3600,iat:e,sub:this.sub},r),i=rz.sign({header:{alg:"RS256"},payload:n,secret:this.key}),h.p=1,h.n=2,this.transporter.request({method:"POST",url:aT,data:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:i}),responseType:"json",retryConfig:{httpMethodsToRetry:["POST"]}});case 2:return s=h.v,this.rawToken=s.data,this.expiresAt=s.data.expires_in===null||s.data.expires_in===void 0?void 0:(e+s.data.expires_in)*1e3,h.a(2,this.rawToken);case 3:throw h.p=3,y=h.v,this.rawToken=void 0,this.tokenExpires=void 0,p=y.response&&(c=y.response)!==null&&c!==void 0&&c.data?(d=y.response)===null||d===void 0?void 0:d.data:{},p.error&&(m=p.error_description?": ".concat(p.error_description):"",y.message="".concat(p.error).concat(m)),y;case 4:return h.a(2)}},t,this,[[1,3]])},"_callee6"))),nf.apply(this,arguments)}o(nf,"_requestToken2")});var sf=D(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});tc.JWTAccess=void 0;var vz=Xp(),_z=kr(),hT={alg:"RS256",typ:"JWT"},af=class t{static{o(this,"JWTAccess")}email;key;keyId;projectId;eagerRefreshThresholdMillis;cache=new _z.LRUCache({capacity:500,maxAge:3600*1e3});constructor(e,r,n,i){this.email=e,this.key=r,this.keyId=n,this.eagerRefreshThresholdMillis=i??300*1e3}getCachedKey(e,r){let n=e;if(r&&Array.isArray(r)&&r.length?n=e?`${e}_${r.join("_")}`:`${r.join("_")}`:typeof r=="string"&&(n=e?`${e}_${r}`:r),!n)throw Error("Scopes or url must be provided");return n}getRequestHeaders(e,r,n){let i=this.getCachedKey(e,n),s=this.cache.get(i),c=Date.now();if(s&&s.expiration-c>this.eagerRefreshThresholdMillis)return new Headers(s.headers);let d=Math.floor(Date.now()/1e3),p=t.getExpirationTime(d),m;if(Array.isArray(n)&&(n=n.join(" ")),n?m={iss:this.email,sub:this.email,scope:n,exp:p,iat:d}:m={iss:this.email,sub:this.email,aud:e,exp:p,iat:d},r){for(let g in m)if(r[g])throw new Error(`The '${g}' property is not allowed when passing additionalClaims. This claim is included in the JWT by default.`)}let y=this.keyId?{...hT,kid:this.keyId}:hT,h=Object.assign(m,r),f=vz.sign({header:y,payload:h,secret:this.key}),l=new Headers({authorization:`Bearer ${f}`});return this.cache.set(i,{expiration:p*1e3,headers:l}),l}static getExpirationTime(e){return e+3600}fromJSON(e){if(!e)throw new Error("Must pass in a JSON object containing the service account auth settings.");if(!e.client_email)throw new Error("The incoming JSON object does not contain a client_email field");if(!e.private_key)throw new Error("The incoming JSON object does not contain a private_key field");this.email=e.client_email,this.key=e.private_key,this.keyId=e.private_key_id,this.projectId=e.project_id}fromStream(e,r){if(r)this.fromStreamAsync(e).then(()=>r(),r);else return this.fromStreamAsync(e)}fromStreamAsync(e){return new Promise((r,n)=>{e||n(new Error("Must pass in a stream containing the service account auth settings."));let i="";e.setEncoding("utf8").on("data",s=>i+=s).on("error",n).on("end",()=>{try{let s=JSON.parse(i);this.fromJSON(s),r()}catch(s){n(s)}})})}};tc.JWTAccess=af});var cf=D(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});nc.JWT=void 0;var gT=mT(),bz=sf(),Ez=wo(),rc=nr(),uf=class t extends Ez.OAuth2Client{static{o(this,"JWT")}email;keyFile;key;keyId;defaultScopes;scopes;scope;subject;gtoken;additionalClaims;useJWTAccessWithScope;defaultServicePath;access;constructor(e={}){super(e),this.email=e.email,this.keyFile=e.keyFile,this.key=e.key,this.keyId=e.keyId,this.scopes=e.scopes,this.subject=e.subject,this.additionalClaims=e.additionalClaims,this.credentials={refresh_token:"jwt-placeholder",expiry_date:1}}createScoped(e){let r=new t(this);return r.scopes=e,r}async getRequestMetadataAsync(e){e=this.defaultServicePath?`https://${this.defaultServicePath}/`:e;let r=!this.hasUserScopes()&&e||this.useJWTAccessWithScope&&this.hasAnyScopes()||this.universeDomain!==rc.DEFAULT_UNIVERSE;if(this.subject&&this.universeDomain!==rc.DEFAULT_UNIVERSE)throw new RangeError(`Service Account user is configured for the credential. Domain-wide delegation is not supported in universes other than ${rc.DEFAULT_UNIVERSE}`);if(!this.apiKey&&r)if(this.additionalClaims&&this.additionalClaims.target_audience){let{tokens:n}=await this.refreshToken();return{headers:this.addSharedMetadataHeaders(new Headers({authorization:`Bearer ${n.id_token}`}))}}else{this.access||(this.access=new bz.JWTAccess(this.email,this.key,this.keyId,this.eagerRefreshThresholdMillis));let n;this.hasUserScopes()?n=this.scopes:e||(n=this.defaultScopes);let i=this.useJWTAccessWithScope||this.universeDomain!==rc.DEFAULT_UNIVERSE,s=await this.access.getRequestHeaders(e??void 0,this.additionalClaims,i?n:void 0);return{headers:this.addSharedMetadataHeaders(s)}}else return this.hasAnyScopes()||this.apiKey?super.getRequestMetadataAsync(e):{headers:new Headers}}async fetchIdToken(e){let r=new gT.GoogleToken({iss:this.email,sub:this.subject,scope:this.scopes||this.defaultScopes,keyFile:this.keyFile,key:this.key,additionalClaims:{target_audience:e},transporter:this.transporter});if(await r.getToken({forceRefresh:!0}),!r.idToken)throw new Error("Unknown error: Failed to fetch ID token");return r.idToken}hasUserScopes(){return this.scopes?this.scopes.length>0:!1}hasAnyScopes(){return!!(this.scopes&&this.scopes.length>0||this.defaultScopes&&this.defaultScopes.length>0)}authorize(e){if(e)this.authorizeAsync().then(r=>e(null,r),e);else return this.authorizeAsync()}async authorizeAsync(){let e=await this.refreshToken();if(!e)throw new Error("No result returned");return this.credentials=e.tokens,this.credentials.refresh_token="jwt-placeholder",this.key=this.gtoken.key,this.email=this.gtoken.iss,e.tokens}async refreshTokenNoCache(){let e=this.createGToken(),n={access_token:(await e.getToken({forceRefresh:this.isTokenExpiring()})).access_token,token_type:"Bearer",expiry_date:e.expiresAt,id_token:e.idToken};return this.emit("tokens",n),{res:null,tokens:n}}createGToken(){return this.gtoken||(this.gtoken=new gT.GoogleToken({iss:this.email,sub:this.subject,scope:this.scopes||this.defaultScopes,keyFile:this.keyFile,key:this.key,additionalClaims:this.additionalClaims,transporter:this.transporter})),this.gtoken}fromJSON(e){if(!e)throw new Error("Must pass in a JSON object containing the service account auth settings.");if(!e.client_email)throw new Error("The incoming JSON object does not contain a client_email field");if(!e.private_key)throw new Error("The incoming JSON object does not contain a private_key field");this.email=e.client_email,this.key=e.private_key,this.keyId=e.private_key_id,this.projectId=e.project_id,this.quotaProjectId=e.quota_project_id,this.universeDomain=e.universe_domain||this.universeDomain}fromStream(e,r){if(r)this.fromStreamAsync(e).then(()=>r(),r);else return this.fromStreamAsync(e)}fromStreamAsync(e){return new Promise((r,n)=>{if(!e)throw new Error("Must pass in a stream containing the service account auth settings.");let i="";e.setEncoding("utf8").on("error",n).on("data",s=>i+=s).on("end",()=>{try{let s=JSON.parse(i);this.fromJSON(s),r()}catch(s){n(s)}})})}fromAPIKey(e){if(typeof e!="string")throw new Error("Must provide an API Key string.");this.apiKey=e}async getCredentials(){if(this.key)return{private_key:this.key,client_email:this.email};if(this.keyFile){let r=await this.createGToken().getCredentials(this.keyFile);return{private_key:r.privateKey,client_email:r.clientEmail}}throw new Error("A key or a keyFile must be provided to getCredentials.")}};nc.JWT=uf});var df=D(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.UserRefreshClient=_i.USER_REFRESH_ACCOUNT_TYPE=void 0;var Sz=wo(),wz=nr();_i.USER_REFRESH_ACCOUNT_TYPE="authorized_user";var lf=class t extends Sz.OAuth2Client{static{o(this,"UserRefreshClient")}_refreshToken;constructor(e,r,n,i,s){let c=e&&typeof e=="object"?e:{clientId:e,clientSecret:r,refreshToken:n,eagerRefreshThresholdMillis:i,forceRefreshOnFailure:s};super(c),this._refreshToken=c.refreshToken,this.credentials.refresh_token=c.refreshToken}async refreshTokenNoCache(){return super.refreshTokenNoCache(this._refreshToken)}async fetchIdToken(e){let r={...t.RETRY_CONFIG,url:this.endpoints.oauth2TokenUrl,method:"POST",data:new URLSearchParams({client_id:this._clientId,client_secret:this._clientSecret,grant_type:"refresh_token",refresh_token:this._refreshToken,target_audience:e})};return wz.AuthClient.setMethodName(r,"fetchIdToken"),(await this.transporter.request(r)).data.id_token}fromJSON(e){if(!e)throw new Error("Must pass in a JSON object containing the user refresh token");if(e.type!=="authorized_user")throw new Error('The incoming JSON object does not have the "authorized_user" type');if(!e.client_id)throw new Error("The incoming JSON object does not contain a client_id field");if(!e.client_secret)throw new Error("The incoming JSON object does not contain a client_secret field");if(!e.refresh_token)throw new Error("The incoming JSON object does not contain a refresh_token field");this._clientId=e.client_id,this._clientSecret=e.client_secret,this._refreshToken=e.refresh_token,this.credentials.refresh_token=e.refresh_token,this.quotaProjectId=e.quota_project_id,this.universeDomain=e.universe_domain||this.universeDomain}fromStream(e,r){if(r)this.fromStreamAsync(e).then(()=>r(),r);else return this.fromStreamAsync(e)}async fromStreamAsync(e){return new Promise((r,n)=>{if(!e)return n(new Error("Must pass in a stream containing the user refresh token."));let i="";e.setEncoding("utf8").on("error",n).on("data",s=>i+=s).on("end",()=>{try{let s=JSON.parse(i);return this.fromJSON(s),r()}catch(s){return n(s)}})})}static fromJSON(e){let r=new t;return r.fromJSON(e),r}};_i.UserRefreshClient=lf});var ff=D(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.Impersonated=bi.IMPERSONATED_ACCOUNT_TYPE=void 0;var yT=wo(),Tz=ht(),Pz=kr();bi.IMPERSONATED_ACCOUNT_TYPE="impersonated_service_account";var pf=class t extends yT.OAuth2Client{static{o(this,"Impersonated")}sourceClient;targetPrincipal;targetScopes;delegates;lifetime;endpoint;constructor(e={}){if(super(e),this.credentials={expiry_date:1,refresh_token:"impersonated-placeholder"},this.sourceClient=e.sourceClient??new yT.OAuth2Client,this.targetPrincipal=e.targetPrincipal??"",this.delegates=e.delegates??[],this.targetScopes=e.targetScopes??[],this.lifetime=e.lifetime??3600,!!!(0,Pz.originalOrCamelOptions)(e).get("universe_domain"))this.universeDomain=this.sourceClient.universeDomain;else if(this.sourceClient.universeDomain!==this.universeDomain)throw new RangeError(`Universe domain ${this.sourceClient.universeDomain} in source credentials does not match ${this.universeDomain} universe domain set for impersonated credentials.`);this.endpoint=e.endpoint??`https://iamcredentials.${this.universeDomain}`}async sign(e){await this.sourceClient.getAccessToken();let r=`projects/-/serviceAccounts/${this.targetPrincipal}`,n=`${this.endpoint}/v1/${r}:signBlob`,i={delegates:this.delegates,payload:Buffer.from(e).toString("base64")};return(await this.sourceClient.request({...t.RETRY_CONFIG,url:n,data:i,method:"POST"})).data}getTargetPrincipal(){return this.targetPrincipal}async refreshToken(){try{await this.sourceClient.getAccessToken();let e="projects/-/serviceAccounts/"+this.targetPrincipal,r=`${this.endpoint}/v1/${e}:generateAccessToken`,n={delegates:this.delegates,scope:this.targetScopes,lifetime:this.lifetime+"s"},i=await this.sourceClient.request({...t.RETRY_CONFIG,url:r,data:n,method:"POST"}),s=i.data;return this.credentials.access_token=s.accessToken,this.credentials.expiry_date=Date.parse(s.expireTime),{tokens:this.credentials,res:i}}catch(e){if(!(e instanceof Error))throw e;let r=0,n="";throw e instanceof Tz.GaxiosError&&(r=e?.response?.data?.error?.status,n=e?.response?.data?.error?.message),r&&n?(e.message=`${r}: unable to impersonate: ${n}`,e):(e.message=`unable to impersonate: ${e}`,e)}}async fetchIdToken(e,r){await this.sourceClient.getAccessToken();let n=`projects/-/serviceAccounts/${this.targetPrincipal}`,i=`${this.endpoint}/v1/${n}:generateIdToken`,s={delegates:this.delegates,audience:e,includeEmail:r?.includeEmail??!0,useEmailAzp:r?.includeEmail??!0};return(await this.sourceClient.request({...t.RETRY_CONFIG,url:i,data:s,method:"POST"})).data.token}};bi.Impersonated=pf});var hf=D(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});Ua.OAuthClientAuthHandler=void 0;Ua.getErrorFromOAuthErrorResponse=Iz;var Ei=ht(),xz=Aa(),Az=["PUT","POST","PATCH"],mf=class{static{o(this,"OAuthClientAuthHandler")}#e=(0,xz.createCrypto)();#t;transporter;constructor(e){e&&"clientId"in e?(this.#t=e,this.transporter=new Ei.Gaxios):(this.#t=e?.clientAuthentication,this.transporter=e?.transporter||new Ei.Gaxios)}applyClientAuthenticationOptions(e,r){e.headers=Ei.Gaxios.mergeHeaders(e.headers),this.injectAuthenticatedHeaders(e,r),r||this.injectAuthenticatedRequestBody(e)}injectAuthenticatedHeaders(e,r){if(r)e.headers=Ei.Gaxios.mergeHeaders(e.headers,{authorization:`Bearer ${r}`});else if(this.#t?.confidentialClientType==="basic"){e.headers=Ei.Gaxios.mergeHeaders(e.headers);let n=this.#t.clientId,i=this.#t.clientSecret||"",s=this.#e.encodeBase64StringUtf8(`${n}:${i}`);Ei.Gaxios.mergeHeaders(e.headers,{authorization:`Basic ${s}`})}}injectAuthenticatedRequestBody(e){if(this.#t?.confidentialClientType==="request-body"){let r=(e.method||"GET").toUpperCase();if(!Az.includes(r))throw new Error(`${r} HTTP method does not support ${this.#t.confidentialClientType} client authentication`);let i=new Headers(e.headers).get("content-type");if(i?.startsWith("application/x-www-form-urlencoded")||e.data instanceof URLSearchParams){let s=new URLSearchParams(e.data??"");s.append("client_id",this.#t.clientId),s.append("client_secret",this.#t.clientSecret||""),e.data=s}else if(i?.startsWith("application/json"))e.data=e.data||{},Object.assign(e.data,{client_id:this.#t.clientId,client_secret:this.#t.clientSecret||""});else throw new Error(`${i} content-types are not supported with ${this.#t.confidentialClientType} client authentication`)}}static get RETRY_CONFIG(){return{retry:!0,retryConfig:{httpMethodsToRetry:["GET","PUT","POST","HEAD","OPTIONS","DELETE"]}}}};Ua.OAuthClientAuthHandler=mf;function Iz(t,e){let r=t.error,n=t.error_description,i=t.error_uri,s=`Error code ${r}`;typeof n<"u"&&(s+=`: ${n}`),typeof i<"u"&&(s+=` - ${i}`);let c=new Error(s);if(e){let d=Object.keys(e);e.stack&&d.push("stack"),d.forEach(p=>{p!=="message"&&Object.defineProperty(c,p,{value:e[p],writable:!1,enumerable:!0})})}return c}o(Iz,"getErrorFromOAuthErrorResponse")});var ic=D(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});oc.StsCredentials=void 0;var Rz=ht(),Cz=nr(),vT=hf(),Oz=kr(),gf=class t extends vT.OAuthClientAuthHandler{static{o(this,"StsCredentials")}#e;constructor(e={tokenExchangeEndpoint:""},r){(typeof e!="object"||e instanceof URL)&&(e={tokenExchangeEndpoint:e,clientAuthentication:r}),super(e),this.#e=e.tokenExchangeEndpoint}async exchangeToken(e,r,n){let i={grant_type:e.grantType,resource:e.resource,audience:e.audience,scope:e.scope?.join(" "),requested_token_type:e.requestedTokenType,subject_token:e.subjectToken,subject_token_type:e.subjectTokenType,actor_token:e.actingParty?.actorToken,actor_token_type:e.actingParty?.actorTokenType,options:n&&JSON.stringify(n)},s={...t.RETRY_CONFIG,url:this.#e.toString(),method:"POST",headers:r,data:new URLSearchParams((0,Oz.removeUndefinedValuesInObject)(i))};Cz.AuthClient.setMethodName(s,"exchangeToken"),this.applyClientAuthenticationOptions(s);try{let c=await this.transporter.request(s),d=c.data;return d.res=c,d}catch(c){throw c instanceof Rz.GaxiosError&&c.response?(0,vT.getErrorFromOAuthErrorResponse)(c.response.data,c):c}}};oc.StsCredentials=gf});var Xn=D(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.BaseExternalAccountClient=_r.CLOUD_RESOURCE_MANAGER=_r.EXTERNAL_ACCOUNT_TYPE=_r.EXPIRATION_TIME_OFFSET=void 0;var kz=ht(),$z=require("stream"),yf=nr(),Dz=ic(),_T=kr(),Nz=Op(),zz="urn:ietf:params:oauth:grant-type:token-exchange",Uz="urn:ietf:params:oauth:token-type:access_token",vf="https://www.googleapis.com/auth/cloud-platform",Mz=3600;_r.EXPIRATION_TIME_OFFSET=300*1e3;_r.EXTERNAL_ACCOUNT_TYPE="external_account";_r.CLOUD_RESOURCE_MANAGER="https://cloudresourcemanager.googleapis.com/v1/projects/";var Lz="//iam\\.googleapis\\.com/locations/[^/]+/workforcePools/[^/]+/providers/.+",jz="https://sts.{universeDomain}/v1/token",_f=class t extends yf.AuthClient{static{o(this,"BaseExternalAccountClient")}scopes;projectNumber;audience;subjectTokenType;stsCredential;clientAuth;credentialSourceType;cachedAccessToken;serviceAccountImpersonationUrl;serviceAccountImpersonationLifetime;workforcePoolUserProject;configLifetimeRequested;tokenUrl;cloudResourceManagerURL;supplierContext;#e=null;constructor(e){super(e);let r=(0,_T.originalOrCamelOptions)(e),n=r.get("type");if(n&&n!==_r.EXTERNAL_ACCOUNT_TYPE)throw new Error(`Expected "${_r.EXTERNAL_ACCOUNT_TYPE}" type but received "${e.type}"`);let i=r.get("client_id"),s=r.get("client_secret");this.tokenUrl=r.get("token_url")??jz.replace("{universeDomain}",this.universeDomain);let c=r.get("subject_token_type"),d=r.get("workforce_pool_user_project"),p=r.get("service_account_impersonation_url"),m=r.get("service_account_impersonation"),y=(0,_T.originalOrCamelOptions)(m).get("token_lifetime_seconds");this.cloudResourceManagerURL=new URL(r.get("cloud_resource_manager_url")||`https://cloudresourcemanager.${this.universeDomain}/v1/projects/`),i&&(this.clientAuth={confidentialClientType:"basic",clientId:i,clientSecret:s}),this.stsCredential=new Dz.StsCredentials({tokenExchangeEndpoint:this.tokenUrl,clientAuthentication:this.clientAuth}),this.scopes=r.get("scopes")||[vf],this.cachedAccessToken=null,this.audience=r.get("audience"),this.subjectTokenType=c,this.workforcePoolUserProject=d;let h=new RegExp(Lz);if(this.workforcePoolUserProject&&!this.audience.match(h))throw new Error("workforcePoolUserProject should not be set for non-workforce pool credentials.");this.serviceAccountImpersonationUrl=p,this.serviceAccountImpersonationLifetime=y,this.serviceAccountImpersonationLifetime?this.configLifetimeRequested=!0:(this.configLifetimeRequested=!1,this.serviceAccountImpersonationLifetime=Mz),this.projectNumber=this.getProjectNumber(this.audience),this.supplierContext={audience:this.audience,subjectTokenType:this.subjectTokenType,transporter:this.transporter}}getServiceAccountEmail(){if(this.serviceAccountImpersonationUrl){if(this.serviceAccountImpersonationUrl.length>256)throw new RangeError(`URL is too long: ${this.serviceAccountImpersonationUrl}`);return/serviceAccounts\/(?<email>[^:]+):generateAccessToken$/.exec(this.serviceAccountImpersonationUrl)?.groups?.email||null}return null}setCredentials(e){super.setCredentials(e),this.cachedAccessToken=e}async getAccessToken(){return(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){let e=await this.getAccessToken(),r=new Headers({authorization:`Bearer ${e.token}`});return this.addSharedMetadataHeaders(r)}request(e,r){if(r)this.requestAsync(e).then(n=>r(null,n),n=>r(n,n.response));else return this.requestAsync(e)}async getProjectId(){let e=this.projectNumber||this.workforcePoolUserProject;if(this.projectId)return this.projectId;if(e){let r=await this.getRequestHeaders(),n={...t.RETRY_CONFIG,headers:r,url:`${this.cloudResourceManagerURL.toString()}${e}`};yf.AuthClient.setMethodName(n,"getProjectId");let i=await this.transporter.request(n);return this.projectId=i.data.projectId,this.projectId}return null}async requestAsync(e,r=!1){let n;try{let i=await this.getRequestHeaders();e.headers=kz.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,i),n=await this.transporter.request(e)}catch(i){let s=i.response;if(s){let c=s.status,d=s.config.data instanceof $z.Readable;if(!r&&(c===401||c===403)&&!d&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(e,!0)}throw i}return n}async refreshAccessTokenAsync(){this.#e=this.#e||this.#t();try{return await this.#e}finally{this.#e=null}}async#t(){let e=await this.retrieveSubjectToken(),r={grantType:zz,audience:this.audience,requestedTokenType:Uz,subjectToken:e,subjectTokenType:this.subjectTokenType,scope:this.serviceAccountImpersonationUrl?[vf]:this.getScopesArray()},n=!this.clientAuth&&this.workforcePoolUserProject?{userProject:this.workforcePoolUserProject}:void 0,i=new Headers({"x-goog-api-client":this.getMetricsHeaderValue()}),s=await this.stsCredential.exchangeToken(r,i,n);return this.serviceAccountImpersonationUrl?this.cachedAccessToken=await this.getImpersonatedAccessToken(s.access_token):s.expires_in?this.cachedAccessToken={access_token:s.access_token,expiry_date:new Date().getTime()+s.expires_in*1e3,res:s.res}:this.cachedAccessToken={access_token:s.access_token,res:s.res},this.credentials={},Object.assign(this.credentials,this.cachedAccessToken),delete this.credentials.res,this.emit("tokens",{refresh_token:null,expiry_date:this.cachedAccessToken.expiry_date,access_token:this.cachedAccessToken.access_token,token_type:"Bearer",id_token:null}),this.cachedAccessToken}getProjectNumber(e){let r=e.match(/\/projects\/([^/]+)/);return r?r[1]:null}async getImpersonatedAccessToken(e){let r={...t.RETRY_CONFIG,url:this.serviceAccountImpersonationUrl,method:"POST",headers:{"content-type":"application/json",authorization:`Bearer ${e}`},data:{scope:this.getScopesArray(),lifetime:this.serviceAccountImpersonationLifetime+"s"}};yf.AuthClient.setMethodName(r,"getImpersonatedAccessToken");let n=await this.transporter.request(r),i=n.data;return{access_token:i.accessToken,expiry_date:new Date(i.expireTime).getTime(),res:n}}isExpired(e){let r=new Date().getTime();return e.expiry_date?r>=e.expiry_date-this.eagerRefreshThresholdMillis:!1}getScopesArray(){return typeof this.scopes=="string"?[this.scopes]:this.scopes||[vf]}getMetricsHeaderValue(){let e=process.version.replace(/^v/,""),r=this.serviceAccountImpersonationUrl!==void 0,n=this.credentialSourceType?this.credentialSourceType:"unknown";return`gl-node/${e} auth/${Nz.pkg.version} google-byoid-sdk source/${n} sa-impersonation/${r} config-lifetime/${this.configLifetimeRequested}`}getTokenUrl(){return this.tokenUrl}};_r.BaseExternalAccountClient=_f});var bT=D(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});ac.FileSubjectTokenSupplier=void 0;var Ef=require("util"),Sf=require("fs"),Fz=(0,Ef.promisify)(Sf.readFile??(()=>{})),qz=(0,Ef.promisify)(Sf.realpath??(()=>{})),Bz=(0,Ef.promisify)(Sf.lstat??(()=>{})),bf=class{static{o(this,"FileSubjectTokenSupplier")}filePath;formatType;subjectTokenFieldName;constructor(e){this.filePath=e.filePath,this.formatType=e.formatType,this.subjectTokenFieldName=e.subjectTokenFieldName}async getSubjectToken(){let e=this.filePath;try{if(e=await qz(e),!(await Bz(e)).isFile())throw new Error}catch(i){throw i instanceof Error&&(i.message=`The file at ${e} does not exist, or it is not a file. ${i.message}`),i}let r,n=await Fz(e,{encoding:"utf8"});if(this.formatType==="text"?r=n:this.formatType==="json"&&this.subjectTokenFieldName&&(r=JSON.parse(n)[this.subjectTokenFieldName]),!r)throw new Error("Unable to parse the subject_token from the credential_source file");return r}};ac.FileSubjectTokenSupplier=bf});var ET=D(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});sc.UrlSubjectTokenSupplier=void 0;var Vz=nr(),wf=class{static{o(this,"UrlSubjectTokenSupplier")}url;headers;formatType;subjectTokenFieldName;additionalGaxiosOptions;constructor(e){this.url=e.url,this.formatType=e.formatType,this.subjectTokenFieldName=e.subjectTokenFieldName,this.headers=e.headers,this.additionalGaxiosOptions=e.additionalGaxiosOptions}async getSubjectToken(e){let r={...this.additionalGaxiosOptions,url:this.url,method:"GET",headers:this.headers};Vz.AuthClient.setMethodName(r,"getSubjectToken");let n;if(this.formatType==="text"?n=(await e.transporter.request(r)).data:this.formatType==="json"&&this.subjectTokenFieldName&&(n=(await e.transporter.request(r)).data[this.subjectTokenFieldName]),!n)throw new Error("Unable to parse the subject_token from the credential_source URL");return n}};sc.UrlSubjectTokenSupplier=wf});var ST=D(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.CertificateSubjectTokenSupplier=sr.InvalidConfigurationError=sr.CertificateSourceUnavailableError=sr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE=void 0;var uc=kr(),cc=require("fs"),lc=require("crypto"),Gz=require("https");sr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE="GOOGLE_API_CERTIFICATE_CONFIG";var Kr=class extends Error{static{o(this,"CertificateSourceUnavailableError")}constructor(e){super(e),this.name="CertificateSourceUnavailableError"}};sr.CertificateSourceUnavailableError=Kr;var br=class extends Error{static{o(this,"InvalidConfigurationError")}constructor(e){super(e),this.name="InvalidConfigurationError"}};sr.InvalidConfigurationError=br;var Tf=class{static{o(this,"CertificateSubjectTokenSupplier")}certificateConfigPath;trustChainPath;cert;key;constructor(e){if(!e.useDefaultCertificateConfig&&!e.certificateConfigLocation)throw new br("Either `useDefaultCertificateConfig` must be true or a `certificateConfigLocation` must be provided.");if(e.useDefaultCertificateConfig&&e.certificateConfigLocation)throw new br("Both `useDefaultCertificateConfig` and `certificateConfigLocation` cannot be provided.");this.trustChainPath=e.trustChainPath,this.certificateConfigPath=e.certificateConfigLocation??""}async createMtlsHttpsAgent(){if(!this.key||!this.cert)throw new br("Cannot create mTLS Agent with missing certificate or key");return new Gz.Agent({key:this.key,cert:this.cert})}async getSubjectToken(){this.certificateConfigPath=await this.#e();let{certPath:e,keyPath:r}=await this.#t();return{cert:this.cert,key:this.key}=await this.#r(e,r),await this.#n(this.cert)}async#e(){let e=this.certificateConfigPath;if(e){if(await(0,uc.isValidFile)(e))return e;throw new Kr(`Provided certificate config path is invalid: ${e}`)}let r=process.env[sr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE];if(r){if(await(0,uc.isValidFile)(r))return r;throw new Kr(`Path from environment variable "${sr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" is invalid: ${r}`)}let n=(0,uc.getWellKnownCertificateConfigFileLocation)();if(await(0,uc.isValidFile)(n))return n;throw new Kr(`Could not find certificate configuration file. Searched override path, the "${sr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" env var, and the gcloud path (${n}).`)}async#t(){let e=this.certificateConfigPath,r;try{r=await cc.promises.readFile(e,"utf8")}catch{throw new Kr(`Failed to read certificate config file at: ${e}`)}try{let n=JSON.parse(r),i=n?.cert_configs?.workload?.cert_path,s=n?.cert_configs?.workload?.key_path;if(!i||!s)throw new br(`Certificate config file (${e}) is missing required "cert_path" or "key_path" in the workload config.`);return{certPath:i,keyPath:s}}catch(n){throw n instanceof br?n:new br(`Failed to parse certificate config from ${e}: ${n.message}`)}}async#r(e,r){let n,i;try{n=await cc.promises.readFile(e),new lc.X509Certificate(n)}catch(s){let c=s instanceof Error?s.message:String(s);throw new Kr(`Failed to read certificate file at ${e}: ${c}`)}try{i=await cc.promises.readFile(r),(0,lc.createPrivateKey)(i)}catch(s){let c=s instanceof Error?s.message:String(s);throw new Kr(`Failed to read private key file at ${r}: ${c}`)}return{cert:n,key:i}}async#n(e){let r=new lc.X509Certificate(e);if(!this.trustChainPath)return JSON.stringify([r.raw.toString("base64")]);try{let s=((await cc.promises.readFile(this.trustChainPath,"utf8")).match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g)??[]).map((p,m)=>{try{return new lc.X509Certificate(p)}catch(y){let h=y instanceof Error?y.message:String(y);throw new br(`Failed to parse certificate at index ${m} in trust chain file ${this.trustChainPath}: ${h}`)}}),c=s.findIndex(p=>r.raw.equals(p.raw)),d;if(c===-1)d=[r,...s];else if(c===0)d=s;else throw new br(`Leaf certificate exists in the trust chain but is not the first entry (found at index ${c}).`);return JSON.stringify(d.map(p=>p.raw.toString("base64")))}catch(n){if(n instanceof br)throw n;let i=n instanceof Error?n.message:String(n);throw new Kr(`Failed to process certificate chain from ${this.trustChainPath}: ${i}`)}}};sr.CertificateSubjectTokenSupplier=Tf});var Af=D(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});dc.IdentityPoolClient=void 0;var Hz=Xn(),Pf=kr(),Wz=bT(),Zz=ET(),wT=ST(),Kz=ic(),TT=ht(),xf=class t extends Hz.BaseExternalAccountClient{static{o(this,"IdentityPoolClient")}subjectTokenSupplier;constructor(e){super(e);let r=(0,Pf.originalOrCamelOptions)(e),n=r.get("credential_source"),i=r.get("subject_token_supplier");if(!n&&!i)throw new Error("A credential source or subject token supplier must be specified.");if(n&&i)throw new Error("Only one of credential source or subject token supplier can be specified.");if(i)this.subjectTokenSupplier=i,this.credentialSourceType="programmatic";else{let s=(0,Pf.originalOrCamelOptions)(n),c=(0,Pf.originalOrCamelOptions)(s.get("format")),d=c.get("type")||"text",p=c.get("subject_token_field_name");if(d!=="json"&&d!=="text")throw new Error(`Invalid credential_source format "${d}"`);if(d==="json"&&!p)throw new Error("Missing subject_token_field_name for JSON credential_source format");let m=s.get("file"),y=s.get("url"),h=s.get("certificate"),f=s.get("headers");if(m&&y||y&&h||m&&h)throw new Error('No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.');if(m)this.credentialSourceType="file",this.subjectTokenSupplier=new Wz.FileSubjectTokenSupplier({filePath:m,formatType:d,subjectTokenFieldName:p});else if(y)this.credentialSourceType="url",this.subjectTokenSupplier=new Zz.UrlSubjectTokenSupplier({url:y,formatType:d,subjectTokenFieldName:p,headers:f,additionalGaxiosOptions:t.RETRY_CONFIG});else if(h){this.credentialSourceType="certificate";let l=new wT.CertificateSubjectTokenSupplier({useDefaultCertificateConfig:h.use_default_certificate_config,certificateConfigLocation:h.certificate_config_location,trustChainPath:h.trust_chain_path});this.subjectTokenSupplier=l}else throw new Error('No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.')}}async retrieveSubjectToken(){let e=await this.subjectTokenSupplier.getSubjectToken(this.supplierContext);if(this.subjectTokenSupplier instanceof wT.CertificateSubjectTokenSupplier){let r=await this.subjectTokenSupplier.createMtlsHttpsAgent();this.stsCredential=new Kz.StsCredentials({tokenExchangeEndpoint:this.getTokenUrl(),clientAuthentication:this.clientAuth,transporter:new TT.Gaxios({agent:r})}),this.transporter=new TT.Gaxios({...this.transporter.defaults||{},agent:r})}return e}};dc.IdentityPoolClient=xf});var Rf=D(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});fc.AwsRequestSigner=void 0;var pc=ht(),xT=Aa(),PT="AWS4-HMAC-SHA256",Jz="aws4_request",If=class{static{o(this,"AwsRequestSigner")}getCredentials;region;crypto;constructor(e,r){this.getCredentials=e,this.region=r,this.crypto=(0,xT.createCrypto)()}async getRequestOptions(e){if(!e.url)throw new RangeError('"url" is required in "amzOptions"');let r=typeof e.data=="object"?JSON.stringify(e.data):e.data,n=e.url,i=e.method||"GET",s=e.body||r,c=e.headers,d=await this.getCredentials(),p=new URL(n);if(typeof s!="string"&&s!==void 0)throw new TypeError(`'requestPayload' is expected to be a string if provided. Got: ${s}`);let m=await Xz({crypto:this.crypto,host:p.host,canonicalUri:p.pathname,canonicalQuerystring:p.search.slice(1),method:i,region:this.region,securityCredentials:d,requestPayload:s,additionalAmzHeaders:c}),y=pc.Gaxios.mergeHeaders(m.amzDate?{"x-amz-date":m.amzDate}:{},{authorization:m.authorizationHeader,host:p.host},c||{});d.token&&pc.Gaxios.mergeHeaders(y,{"x-amz-security-token":d.token});let h={url:n,method:i,headers:y};return s!==void 0&&(h.body=s),h}};fc.AwsRequestSigner=If;async function Ma(t,e,r){return await t.signWithHmacSha256(e,r)}o(Ma,"sign");async function Yz(t,e,r,n,i){let s=await Ma(t,`AWS4${e}`,r),c=await Ma(t,s,n),d=await Ma(t,c,i);return await Ma(t,d,"aws4_request")}o(Yz,"getSigningKey");async function Xz(t){let e=pc.Gaxios.mergeHeaders(t.additionalAmzHeaders),r=t.requestPayload||"",n=t.host.split(".")[0],i=new Date,s=i.toISOString().replace(/[-:]/g,"").replace(/\.[0-9]+/,""),c=i.toISOString().replace(/[-]/g,"").replace(/T.*/,"");t.securityCredentials.token&&e.set("x-amz-security-token",t.securityCredentials.token);let d=pc.Gaxios.mergeHeaders({host:t.host},e.has("date")?{}:{"x-amz-date":s},e),p="",m=[...d.keys()].sort();m.forEach(C=>{p+=`${C}:${d.get(C)}
|
|
41
|
-
`});let
|
|
42
|
-
${
|
|
43
|
-
${
|
|
40
|
+
"HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`,ku="secret must be a string or buffer",Ha="key must be a string or a buffer",K2="key must be a string, a buffer or an object",WE=typeof qr.createPublicKey=="function";WE&&(Ha+=" or a KeyObject",ku+="or a KeyObject");function jk(e){if(!Za.isBuffer(e)&&typeof e!="string"&&(!WE||typeof e!="object"||typeof e.type!="string"||typeof e.asymmetricKeyType!="string"||typeof e.export!="function"))throw un(Ha)}a(jk,"checkIsPublicKey");function Fk(e){if(!Za.isBuffer(e)&&typeof e!="string"&&typeof e!="object")throw un(K2)}a(Fk,"checkIsPrivateKey");function J2(e){if(!Za.isBuffer(e)){if(typeof e=="string")return e;if(!WE||typeof e!="object"||e.type!=="secret"||typeof e.export!="function")throw un(ku)}}a(J2,"checkIsSecretKey");function KE(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(KE,"fromBase64");function Bk(e){e=e.toString();var t=4-e.length%4;if(t!==4)for(var n=0;n<t;++n)e+="=";return e.replace(/\-/g,"+").replace(/_/g,"/")}a(Bk,"toBase64");function un(e){var t=[].slice.call(arguments,1),n=Mk.format.bind(Mk,e).apply(null,t);return new TypeError(n)}a(un,"typeError");function Y2(e){return Za.isBuffer(e)||typeof e=="string"}a(Y2,"bufferOrString");function $u(e){return Y2(e)||(e=JSON.stringify(e)),e}a($u,"normalizeInput");function qk(e){return a(function(n,o){J2(o),n=$u(n);var r=qr.createHmac("sha"+e,o),i=(r.update(n),r.digest("base64"));return KE(i)},"sign")}a(qk,"createHmacSigner");var ZE,X2="timingSafeEqual"in qr?a(function(t,n){return t.byteLength!==n.byteLength?!1:qr.timingSafeEqual(t,n)},"timingSafeEqual"):a(function(t,n){return ZE||(ZE=Uk()),ZE(t,n)},"timingSafeEqual");function Q2(e){return a(function(n,o,r){var i=qk(e)(n,r);return X2(Za.from(o),Za.from(i))},"verify")}a(Q2,"createHmacVerifier");function Vk(e){return a(function(n,o){Fk(o),n=$u(n);var r=qr.createSign("RSA-SHA"+e),i=(r.update(n),r.sign(o,"base64"));return KE(i)},"sign")}a(Vk,"createKeySigner");function Gk(e){return a(function(n,o,r){jk(r),n=$u(n),o=Bk(o);var i=qr.createVerify("RSA-SHA"+e);return i.update(n),i.verify(r,o,"base64")},"verify")}a(Gk,"createKeyVerifier");function eV(e){return a(function(n,o){Fk(o),n=$u(n);var r=qr.createSign("RSA-SHA"+e),i=(r.update(n),r.sign({key:o,padding:qr.constants.RSA_PKCS1_PSS_PADDING,saltLength:qr.constants.RSA_PSS_SALTLEN_DIGEST},"base64"));return KE(i)},"sign")}a(eV,"createPSSKeySigner");function tV(e){return a(function(n,o,r){jk(r),n=$u(n),o=Bk(o);var i=qr.createVerify("RSA-SHA"+e);return i.update(n),i.verify({key:r,padding:qr.constants.RSA_PKCS1_PSS_PADDING,saltLength:qr.constants.RSA_PSS_SALTLEN_DIGEST},o,"base64")},"verify")}a(tV,"createPSSKeyVerifier");function rV(e){var t=Vk(e);return a(function(){var o=t.apply(null,arguments);return o=Lk.derToJose(o,"ES"+e),o},"sign")}a(rV,"createECDSASigner");function nV(e){var t=Gk(e);return a(function(o,r,i){r=Lk.joseToDer(r,"ES"+e).toString("base64");var s=t(o,r,i);return s},"verify")}a(nV,"createECDSAVerifer");function oV(){return a(function(){return""},"sign")}a(oV,"createNoneSigner");function iV(){return a(function(t,n){return n===""},"verify")}a(iV,"createNoneVerifier");Hk.exports=a(function(t){var n={hs:qk,rs:Vk,ps:eV,es:rV,none:oV},o={hs:Q2,rs:Gk,ps:tV,es:nV,none:iV},r=t.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!r)throw un(W2,t);var i=(r[1]||r[3]).toLowerCase(),s=r[2];return{sign:n[i](s),verify:o[i](s)}},"jwa")});var YE=z((cse,Zk)=>{var aV=require("buffer").Buffer;Zk.exports=a(function(t){return typeof t=="string"?t:typeof t=="number"||aV.isBuffer(t)?t.toString():JSON.stringify(t)},"toString")});var Qk=z((lse,Xk)=>{var sV=qa().Buffer,Wk=GE(),cV=JE(),uV=require("stream"),Kk=YE(),XE=require("util");function Jk(e,t){return sV.from(e,t).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(Jk,"base64url");function lV(e,t,n){n=n||"utf8";var o=Jk(Kk(e),"binary"),r=Jk(Kk(t),n);return XE.format("%s.%s",o,r)}a(lV,"jwsSecuredInput");function Yk(e){var t=e.header,n=e.payload,o=e.secret||e.privateKey,r=e.encoding,i=cV(t.alg),s=lV(t,n,r),u=i.sign(s,o);return XE.format("%s.%s",s,u)}a(Yk,"jwsSign");function hm(e){var t=e.secret;if(t=t??e.privateKey,t=t??e.key,/^hs/i.test(e.header.alg)===!0&&t==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var n=new Wk(t);this.readable=!0,this.header=e.header,this.encoding=e.encoding,this.secret=this.privateKey=this.key=n,this.payload=new Wk(e.payload),this.secret.once("close",function(){!this.payload.writable&&this.readable&&this.sign()}.bind(this)),this.payload.once("close",function(){!this.secret.writable&&this.readable&&this.sign()}.bind(this))}a(hm,"SignStream");XE.inherits(hm,uV);hm.prototype.sign=a(function(){try{var t=Yk({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",t),this.emit("data",t),this.emit("end"),this.readable=!1,t}catch(n){this.readable=!1,this.emit("error",n),this.emit("close")}},"sign");hm.sign=Yk;Xk.exports=hm});var u$=z((pse,c$)=>{var t$=qa().Buffer,e$=GE(),dV=JE(),pV=require("stream"),r$=YE(),fV=require("util"),mV=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function hV(e){return Object.prototype.toString.call(e)==="[object Object]"}a(hV,"isObject");function gV(e){if(hV(e))return e;try{return JSON.parse(e)}catch{return}}a(gV,"safeJsonParse");function n$(e){var t=e.split(".",1)[0];return gV(t$.from(t,"base64").toString("binary"))}a(n$,"headerFromJWS");function yV(e){return e.split(".",2).join(".")}a(yV,"securedInputFromJWS");function o$(e){return e.split(".")[2]}a(o$,"signatureFromJWS");function vV(e,t){t=t||"utf8";var n=e.split(".")[1];return t$.from(n,"base64").toString(t)}a(vV,"payloadFromJWS");function i$(e){return mV.test(e)&&!!n$(e)}a(i$,"isValidJws");function a$(e,t,n){if(!t){var o=new Error("Missing algorithm parameter for jws.verify");throw o.code="MISSING_ALGORITHM",o}e=r$(e);var r=o$(e),i=yV(e),s=dV(t);return s.verify(i,r,n)}a(a$,"jwsVerify");function s$(e,t){if(t=t||{},e=r$(e),!i$(e))return null;var n=n$(e);if(!n)return null;var o=vV(e);return(n.typ==="JWT"||t.json)&&(o=JSON.parse(o,t.encoding)),{header:n,payload:o,signature:o$(e)}}a(s$,"jwsDecode");function Wa(e){e=e||{};var t=e.secret;if(t=t??e.publicKey,t=t??e.key,/^hs/i.test(e.algorithm)===!0&&t==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var n=new e$(t);this.readable=!0,this.algorithm=e.algorithm,this.encoding=e.encoding,this.secret=this.publicKey=this.key=n,this.signature=new e$(e.signature),this.secret.once("close",function(){!this.signature.writable&&this.readable&&this.verify()}.bind(this)),this.signature.once("close",function(){!this.secret.writable&&this.readable&&this.verify()}.bind(this))}a(Wa,"VerifyStream");fV.inherits(Wa,pV);Wa.prototype.verify=a(function(){try{var t=a$(this.signature.buffer,this.algorithm,this.key.buffer),n=s$(this.signature.buffer,this.encoding);return this.emit("done",t,n),this.emit("data",t),this.emit("end"),this.readable=!1,t}catch(o){this.readable=!1,this.emit("error",o),this.emit("close")}},"verify");Wa.decode=s$;Wa.isValid=i$;Wa.verify=a$;c$.exports=Wa});var QE=z(zo=>{var l$=Qk(),gm=u$(),_V=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];zo.ALGORITHMS=_V;zo.sign=l$.sign;zo.verify=gm.verify;zo.decode=gm.decode;zo.isValid=gm.isValid;zo.createSign=a(function(t){return new l$(t)},"createSign");zo.createVerify=a(function(t){return new gm(t)},"createVerify")});var w$=z(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});vm.GoogleToken=void 0;var d$=ym(require("fs")),bV=Pt(),EV=ym(QE()),SV=ym(require("path")),TV=require("util");function ym(e,t){if(typeof WeakMap=="function")var n=new WeakMap,o=new WeakMap;return(ym=a(function(i,s){if(!s&&i&&i.__esModule)return i;var u,d,f={__proto__:null,default:i};if(i===null||Yn(i)!="object"&&typeof i!="function")return f;if(u=s?o:n){if(u.has(i))return u.get(i);u.set(i,f)}for(var h in i)h!=="default"&&{}.hasOwnProperty.call(i,h)&&((d=(u=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,h))&&(d.get||d.set)?u(f,h,d):f[h]=i[h]);return f},"_interopRequireWildcard"))(e,t)}a(ym,"_interopRequireWildcard");function Yn(e){"@babel/helpers - typeof";return Yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yn(e)}a(Yn,"_typeof");function PV(e,t){b$(e,t),t.add(e)}a(PV,"_classPrivateMethodInitSpec");function wV(e,t,n){b$(e,t),t.set(e,n)}a(wV,"_classPrivateFieldInitSpec");function b$(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}a(b$,"_checkPrivateRedeclaration");function p$(e,t,n){return e.set(ln(e,t),n),n}a(p$,"_classPrivateFieldSet");function f$(e,t){return e.get(ln(e,t))}a(f$,"_classPrivateFieldGet");function ln(e,t,n){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}a(ln,"_assertClassBrand");function m$(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,T$(o.key),o)}}a(m$,"_defineProperties");function E$(e,t,n){return t&&m$(e.prototype,t),n&&m$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}a(E$,"_createClass");function S$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}a(S$,"_classCallCheck");function xV(e,t,n){return t=Uu(t),AV(e,iS()?Reflect.construct(t,n||[],Uu(e).constructor):t.apply(e,n))}a(xV,"_callSuper");function AV(e,t){if(t&&(Yn(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return IV(e)}a(AV,"_possibleConstructorReturn");function IV(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}a(IV,"_assertThisInitialized");function RV(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zu(e,t)}a(RV,"_inherits");function eS(e){var t=typeof Map=="function"?new Map:void 0;return eS=a(function(o){if(o===null||!OV(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(o))return t.get(o);t.set(o,r)}function r(){return CV(o,arguments,Uu(this).constructor)}return a(r,"Wrapper"),r.prototype=Object.create(o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),zu(r,o)},"_wrapNativeSuper"),eS(e)}a(eS,"_wrapNativeSuper");function CV(e,t,n){if(iS())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var r=new(e.bind.apply(e,o));return n&&zu(r,n.prototype),r}a(CV,"_construct");function iS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iS=a(function(){return!!e},"_isNativeReflectConstruct"))()}a(iS,"_isNativeReflectConstruct");function OV(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}a(OV,"_isNativeFunction");function zu(e,t){return zu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},zu(e,t)}a(zu,"_setPrototypeOf");function Uu(e){return Uu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Uu(e)}a(Uu,"_getPrototypeOf");function Ar(e,t,n){return(t=T$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}a(Ar,"_defineProperty");function T$(e){var t=kV(e,"string");return Yn(t)=="symbol"?t:t+""}a(T$,"_toPropertyKey");function kV(e,t){if(Yn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Yn(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}a(kV,"_toPrimitive");function Rr(){var e,t,n=typeof Symbol=="function"?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(p,y,v,E){var b=y&&y.prototype instanceof u?y:u,k=Object.create(b.prototype);return Ir(k,"_invoke",(function(N,Z,H){var K,ee,se,Q=0,Le=H||[],ce=!1,J={p:0,n:0,v:e,a:W,f:W.bind(e,4),d:a(function(X,pe){return K=X,ee=0,se=e,J.n=pe,s},"d")};function W(ne,X){for(ee=ne,se=X,t=0;!ce&&Q&&!pe&&t<Le.length;t++){var pe,he=Le[t],Ne=J.p,je=he[2];ne>3?(pe=je===X)&&(se=he[(ee=he[4])?5:(ee=3,3)],he[4]=he[5]=e):he[0]<=Ne&&((pe=ne<2&&Ne<he[1])?(ee=0,J.v=X,J.n=he[1]):Ne<je&&(pe=ne<3||he[0]>X||X>je)&&(he[4]=ne,he[5]=X,J.n=je,ee=0))}if(pe||ne>1)return s;throw ce=!0,X}return a(W,"d"),function(ne,X,pe){if(Q>1)throw TypeError("Generator is already running");for(ce&&X===1&&W(X,pe),ee=X,se=pe;(t=ee<2?e:se)||!ce;){K||(ee?ee<3?(ee>1&&(J.n=-1),W(ee,se)):J.n=se:J.v=se);try{if(Q=2,K){if(ee||(ne="next"),t=K[ne]){if(!(t=t.call(K,se)))throw TypeError("iterator result is not an object");if(!t.done)return t;se=t.value,ee<2&&(ee=0)}else ee===1&&(t=K.return)&&t.call(K),ee<2&&(se=TypeError("The iterator does not provide a '"+ne+"' method"),ee=1);K=e}else if((t=(ce=J.n<0)?se:N.call(Z,J))!==s)break}catch(he){K=e,ee=1,se=he}finally{Q=1}}return{value:t,done:ce}}})(p,v,E),!0),k}a(i,"i");var s={};function u(){}a(u,"Generator");function d(){}a(d,"GeneratorFunction");function f(){}a(f,"GeneratorFunctionPrototype"),t=Object.getPrototypeOf;var h=[][o]?t(t([][o]())):(Ir(t={},o,function(){return this}),t),g=f.prototype=u.prototype=Object.create(h);function m(p){return Object.setPrototypeOf?Object.setPrototypeOf(p,f):(p.__proto__=f,Ir(p,r,"GeneratorFunction")),p.prototype=Object.create(g),p}return a(m,"f"),d.prototype=f,Ir(g,"constructor",f),Ir(f,"constructor",d),d.displayName="GeneratorFunction",Ir(f,r,"GeneratorFunction"),Ir(g),Ir(g,r,"Generator"),Ir(g,o,function(){return this}),Ir(g,"toString",function(){return"[object Generator]"}),(Rr=a(function(){return{w:i,m}},"_regenerator"))()}a(Rr,"_regenerator");function Ir(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch{r=0}Ir=a(function(s,u,d,f){if(u)r?r(s,u,{value:d,enumerable:!f,configurable:!f,writable:!f}):s[u]=d;else{var h=a(function(m,p){Ir(s,m,function(y){return this._invoke(m,p,y)})},"o");h("next",0),h("throw",1),h("return",2)}},"_regeneratorDefine"),Ir(e,t,n,o)}a(Ir,"_regeneratorDefine2");function h$(e,t,n,o,r,i,s){try{var u=e[i](s),d=u.value}catch(f){return void n(f)}u.done?t(d):Promise.resolve(d).then(o,r)}a(h$,"asyncGeneratorStep");function Ka(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function s(d){h$(i,o,r,s,u,"next",d)}a(s,"_next");function u(d){h$(i,o,r,s,u,"throw",d)}a(u,"_throw"),s(void 0)})}}a(Ka,"_asyncToGenerator");var g$=d$.readFile?(0,TV.promisify)(d$.readFile):Ka(Rr().m(a(function e(){return Rr().w(function(t){for(;;)switch(t.n){case 0:throw new Nu("use key rather than keyFile.","MISSING_CREDENTIALS");case 1:return t.a(2)}},e)},"_callee"))),y$="https://oauth2.googleapis.com/token",$V="https://oauth2.googleapis.com/revoke?token=",Nu=(function(e){function t(n,o){var r;return S$(this,t),r=xV(this,t,[n]),Ar(r,"code",void 0),r.code=o,r}return a(t,"ErrorWithCode"),RV(t,e),E$(t)})(eS(Error)),Du=new WeakMap,Sn=new WeakSet,gse=vm.GoogleToken=(function(){function e(t){S$(this,e),PV(this,Sn),Ar(this,"expiresAt",void 0),Ar(this,"key",void 0),Ar(this,"keyFile",void 0),Ar(this,"iss",void 0),Ar(this,"sub",void 0),Ar(this,"scope",void 0),Ar(this,"rawToken",void 0),Ar(this,"tokenExpires",void 0),Ar(this,"email",void 0),Ar(this,"additionalClaims",void 0),Ar(this,"eagerRefreshThresholdMillis",void 0),Ar(this,"transporter",{request:a(function(o){return(0,bV.request)(o)},"request")}),wV(this,Du,void 0),ln(Sn,this,P$).call(this,t)}return a(e,"GoogleToken"),E$(e,[{key:"accessToken",get:a(function(){return this.rawToken?this.rawToken.access_token:void 0},"get")},{key:"idToken",get:a(function(){return this.rawToken?this.rawToken.id_token:void 0},"get")},{key:"tokenType",get:a(function(){return this.rawToken?this.rawToken.token_type:void 0},"get")},{key:"refreshToken",get:a(function(){return this.rawToken?this.rawToken.refresh_token:void 0},"get")},{key:"hasExpired",value:a(function(){var n=new Date().getTime();return this.rawToken&&this.expiresAt?n>=this.expiresAt:!0},"hasExpired")},{key:"isTokenExpiring",value:a(function(){var n,o=new Date().getTime(),r=(n=this.eagerRefreshThresholdMillis)!==null&&n!==void 0?n:0;return this.rawToken&&this.expiresAt?this.expiresAt<=o+r:!0},"isTokenExpiring")},{key:"getToken",value:a(function(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Yn(n)==="object"&&(o=n,n=void 0),o=Object.assign({forceRefresh:!1},o),n){var r=n;ln(Sn,this,v$).call(this,o).then(function(i){return r(null,i)},n);return}return ln(Sn,this,v$).call(this,o)},"getToken")},{key:"getCredentials",value:(function(){var t=Ka(Rr().m(a(function o(r){var i,s,u,d,f,h,g;return Rr().w(function(m){for(;;)switch(m.n){case 0:i=SV.extname(r),g=i,m.n=g===".json"?1:g===".der"||g===".crt"||g===".pem"?4:g===".p12"||g===".pfx"?6:7;break;case 1:return m.n=2,g$(r,"utf8");case 2:if(s=m.v,u=JSON.parse(s),d=u.private_key,f=u.client_email,!(!d||!f)){m.n=3;break}throw new Nu("private_key and client_email are required.","MISSING_CREDENTIALS");case 3:return m.a(2,{privateKey:d,clientEmail:f});case 4:return m.n=5,g$(r,"utf8");case 5:return h=m.v,m.a(2,{privateKey:h});case 6:throw new Nu("*.p12 certificates are not supported after v6.1.2. Consider utilizing *.json format or converting *.p12 to *.pem using the OpenSSL CLI.","UNKNOWN_CERTIFICATE_TYPE");case 7:throw new Nu("Unknown certificate type. Type is determined based on file extension. Current supported extensions are *.json, and *.pem.","UNKNOWN_CERTIFICATE_TYPE");case 8:return m.a(2)}},o)},"_callee2")));function n(o){return t.apply(this,arguments)}return a(n,"getCredentials"),n})()},{key:"revokeToken",value:a(function(n){if(n){ln(Sn,this,_$).call(this).then(function(){return n()},n);return}return ln(Sn,this,_$).call(this)},"revokeToken")}])})();function v$(e){return tS.apply(this,arguments)}a(v$,"_getTokenAsync");function tS(){return tS=Ka(Rr().m(a(function e(t){return Rr().w(function(n){for(;;)switch(n.n){case 0:if(!(f$(Du,this)&&!t.forceRefresh)){n.n=1;break}return n.a(2,f$(Du,this));case 1:return n.p=1,n.n=2,p$(Du,this,ln(Sn,this,DV).call(this,t));case 2:return n.a(2,n.v);case 3:return n.p=3,p$(Du,this,void 0),n.f(3);case 4:return n.a(2)}},e,this,[[1,,3,4]])},"_callee3"))),tS.apply(this,arguments)}a(tS,"_getTokenAsync2");function DV(e){return rS.apply(this,arguments)}a(DV,"_getTokenAsyncInner");function rS(){return rS=Ka(Rr().m(a(function e(t){var n;return Rr().w(function(o){for(;;)switch(o.n){case 0:if(!(this.isTokenExpiring()===!1&&t.forceRefresh===!1)){o.n=1;break}return o.a(2,Promise.resolve(this.rawToken));case 1:if(!(!this.key&&!this.keyFile)){o.n=2;break}throw new Error("No key or keyFile set.");case 2:if(!(!this.key&&this.keyFile)){o.n=4;break}return o.n=3,this.getCredentials(this.keyFile);case 3:n=o.v,this.key=n.privateKey,this.iss=n.clientEmail||this.iss,n.clientEmail||ln(Sn,this,NV).call(this);case 4:return o.a(2,ln(Sn,this,zV).call(this))}},e,this)},"_callee4"))),rS.apply(this,arguments)}a(rS,"_getTokenAsyncInner2");function NV(){if(!this.iss)throw new Nu("email is required.","MISSING_CREDENTIALS")}a(NV,"_ensureEmail");function _$(){return nS.apply(this,arguments)}a(_$,"_revokeTokenAsync");function nS(){return nS=Ka(Rr().m(a(function e(){var t;return Rr().w(function(n){for(;;)switch(n.n){case 0:if(this.accessToken){n.n=1;break}throw new Error("No token to revoke.");case 1:return t=$V+this.accessToken,n.n=2,this.transporter.request({url:t,retry:!0});case 2:ln(Sn,this,P$).call(this,{email:this.iss,sub:this.sub,key:this.key,keyFile:this.keyFile,scope:this.scope,additionalClaims:this.additionalClaims});case 3:return n.a(2)}},e,this)},"_callee5"))),nS.apply(this,arguments)}a(nS,"_revokeTokenAsync2");function P$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.keyFile=e.keyFile,this.key=e.key,this.rawToken=void 0,this.iss=e.email||e.iss,this.sub=e.sub,this.additionalClaims=e.additionalClaims,Yn(e.scope)==="object"?this.scope=e.scope.join(" "):this.scope=e.scope,this.eagerRefreshThresholdMillis=e.eagerRefreshThresholdMillis,e.transporter&&(this.transporter=e.transporter)}a(P$,"_configure");function zV(){return oS.apply(this,arguments)}a(zV,"_requestToken");function oS(){return oS=Ka(Rr().m(a(function e(){var t,n,o,r,i,s,u,d,f,h;return Rr().w(function(g){for(;;)switch(g.n){case 0:return t=Math.floor(new Date().getTime()/1e3),n=this.additionalClaims||{},o=Object.assign({iss:this.iss,scope:this.scope,aud:y$,exp:t+3600,iat:t,sub:this.sub},n),r=EV.sign({header:{alg:"RS256"},payload:o,secret:this.key}),g.p=1,g.n=2,this.transporter.request({method:"POST",url:y$,data:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:r}),responseType:"json",retryConfig:{httpMethodsToRetry:["POST"]}});case 2:return i=g.v,this.rawToken=i.data,this.expiresAt=i.data.expires_in===null||i.data.expires_in===void 0?void 0:(t+i.data.expires_in)*1e3,g.a(2,this.rawToken);case 3:throw g.p=3,h=g.v,this.rawToken=void 0,this.tokenExpires=void 0,d=h.response&&(s=h.response)!==null&&s!==void 0&&s.data?(u=h.response)===null||u===void 0?void 0:u.data:{},d.error&&(f=d.error_description?": ".concat(d.error_description):"",h.message="".concat(d.error).concat(f)),h;case 4:return g.a(2)}},e,this,[[1,3]])},"_callee6"))),oS.apply(this,arguments)}a(oS,"_requestToken2")});var sS=z(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});_m.JWTAccess=void 0;var UV=QE(),MV=sn(),x$={alg:"RS256",typ:"JWT"},aS=class e{static{a(this,"JWTAccess")}email;key;keyId;projectId;eagerRefreshThresholdMillis;cache=new MV.LRUCache({capacity:500,maxAge:3600*1e3});constructor(t,n,o,r){this.email=t,this.key=n,this.keyId=o,this.eagerRefreshThresholdMillis=r??300*1e3}getCachedKey(t,n){let o=t;if(n&&Array.isArray(n)&&n.length?o=t?`${t}_${n.join("_")}`:`${n.join("_")}`:typeof n=="string"&&(o=t?`${t}_${n}`:n),!o)throw Error("Scopes or url must be provided");return o}getRequestHeaders(t,n,o){let r=this.getCachedKey(t,o),i=this.cache.get(r),s=Date.now();if(i&&i.expiration-s>this.eagerRefreshThresholdMillis)return new Headers(i.headers);let u=Math.floor(Date.now()/1e3),d=e.getExpirationTime(u),f;if(Array.isArray(o)&&(o=o.join(" ")),o?f={iss:this.email,sub:this.email,scope:o,exp:d,iat:u}:f={iss:this.email,sub:this.email,aud:t,exp:d,iat:u},n){for(let y in f)if(n[y])throw new Error(`The '${y}' property is not allowed when passing additionalClaims. This claim is included in the JWT by default.`)}let h=this.keyId?{...x$,kid:this.keyId}:x$,g=Object.assign(f,n),m=UV.sign({header:h,payload:g,secret:this.key}),p=new Headers({authorization:`Bearer ${m}`});return this.cache.set(r,{expiration:d*1e3,headers:p}),p}static getExpirationTime(t){return t+3600}fromJSON(t){if(!t)throw new Error("Must pass in a JSON object containing the service account auth settings.");if(!t.client_email)throw new Error("The incoming JSON object does not contain a client_email field");if(!t.private_key)throw new Error("The incoming JSON object does not contain a private_key field");this.email=t.client_email,this.key=t.private_key,this.keyId=t.private_key_id,this.projectId=t.project_id}fromStream(t,n){if(n)this.fromStreamAsync(t).then(()=>n(),n);else return this.fromStreamAsync(t)}fromStreamAsync(t){return new Promise((n,o)=>{t||o(new Error("Must pass in a stream containing the service account auth settings."));let r="";t.setEncoding("utf8").on("data",i=>r+=i).on("error",o).on("end",()=>{try{let i=JSON.parse(r);this.fromJSON(i),n()}catch(i){o(i)}})})}};_m.JWTAccess=aS});var uS=z(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});Em.JWT=void 0;var A$=w$(),LV=sS(),jV=xi(),bm=xr(),cS=class e extends jV.OAuth2Client{static{a(this,"JWT")}email;keyFile;key;keyId;defaultScopes;scopes;scope;subject;gtoken;additionalClaims;useJWTAccessWithScope;defaultServicePath;access;constructor(t={}){super(t),this.email=t.email,this.keyFile=t.keyFile,this.key=t.key,this.keyId=t.keyId,this.scopes=t.scopes,this.subject=t.subject,this.additionalClaims=t.additionalClaims,this.credentials={refresh_token:"jwt-placeholder",expiry_date:1}}createScoped(t){let n=new e(this);return n.scopes=t,n}async getRequestMetadataAsync(t){t=this.defaultServicePath?`https://${this.defaultServicePath}/`:t;let n=!this.hasUserScopes()&&t||this.useJWTAccessWithScope&&this.hasAnyScopes()||this.universeDomain!==bm.DEFAULT_UNIVERSE;if(this.subject&&this.universeDomain!==bm.DEFAULT_UNIVERSE)throw new RangeError(`Service Account user is configured for the credential. Domain-wide delegation is not supported in universes other than ${bm.DEFAULT_UNIVERSE}`);if(!this.apiKey&&n)if(this.additionalClaims&&this.additionalClaims.target_audience){let{tokens:o}=await this.refreshToken();return{headers:this.addSharedMetadataHeaders(new Headers({authorization:`Bearer ${o.id_token}`}))}}else{this.access||(this.access=new LV.JWTAccess(this.email,this.key,this.keyId,this.eagerRefreshThresholdMillis));let o;this.hasUserScopes()?o=this.scopes:t||(o=this.defaultScopes);let r=this.useJWTAccessWithScope||this.universeDomain!==bm.DEFAULT_UNIVERSE,i=await this.access.getRequestHeaders(t??void 0,this.additionalClaims,r?o:void 0);return{headers:this.addSharedMetadataHeaders(i)}}else return this.hasAnyScopes()||this.apiKey?super.getRequestMetadataAsync(t):{headers:new Headers}}async fetchIdToken(t){let n=new A$.GoogleToken({iss:this.email,sub:this.subject,scope:this.scopes||this.defaultScopes,keyFile:this.keyFile,key:this.key,additionalClaims:{target_audience:t},transporter:this.transporter});if(await n.getToken({forceRefresh:!0}),!n.idToken)throw new Error("Unknown error: Failed to fetch ID token");return n.idToken}hasUserScopes(){return this.scopes?this.scopes.length>0:!1}hasAnyScopes(){return!!(this.scopes&&this.scopes.length>0||this.defaultScopes&&this.defaultScopes.length>0)}authorize(t){if(t)this.authorizeAsync().then(n=>t(null,n),t);else return this.authorizeAsync()}async authorizeAsync(){let t=await this.refreshToken();if(!t)throw new Error("No result returned");return this.credentials=t.tokens,this.credentials.refresh_token="jwt-placeholder",this.key=this.gtoken.key,this.email=this.gtoken.iss,t.tokens}async refreshTokenNoCache(){let t=this.createGToken(),o={access_token:(await t.getToken({forceRefresh:this.isTokenExpiring()})).access_token,token_type:"Bearer",expiry_date:t.expiresAt,id_token:t.idToken};return this.emit("tokens",o),{res:null,tokens:o}}createGToken(){return this.gtoken||(this.gtoken=new A$.GoogleToken({iss:this.email,sub:this.subject,scope:this.scopes||this.defaultScopes,keyFile:this.keyFile,key:this.key,additionalClaims:this.additionalClaims,transporter:this.transporter})),this.gtoken}fromJSON(t){if(!t)throw new Error("Must pass in a JSON object containing the service account auth settings.");if(!t.client_email)throw new Error("The incoming JSON object does not contain a client_email field");if(!t.private_key)throw new Error("The incoming JSON object does not contain a private_key field");this.email=t.client_email,this.key=t.private_key,this.keyId=t.private_key_id,this.projectId=t.project_id,this.quotaProjectId=t.quota_project_id,this.universeDomain=t.universe_domain||this.universeDomain}fromStream(t,n){if(n)this.fromStreamAsync(t).then(()=>n(),n);else return this.fromStreamAsync(t)}fromStreamAsync(t){return new Promise((n,o)=>{if(!t)throw new Error("Must pass in a stream containing the service account auth settings.");let r="";t.setEncoding("utf8").on("error",o).on("data",i=>r+=i).on("end",()=>{try{let i=JSON.parse(r);this.fromJSON(i),n()}catch(i){o(i)}})})}fromAPIKey(t){if(typeof t!="string")throw new Error("Must provide an API Key string.");this.apiKey=t}async getCredentials(){if(this.key)return{private_key:this.key,client_email:this.email};if(this.keyFile){let n=await this.createGToken().getCredentials(this.keyFile);return{private_key:n.privateKey,client_email:n.clientEmail}}throw new Error("A key or a keyFile must be provided to getCredentials.")}};Em.JWT=cS});var dS=z(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.UserRefreshClient=Ja.USER_REFRESH_ACCOUNT_TYPE=void 0;var FV=xi(),BV=xr();Ja.USER_REFRESH_ACCOUNT_TYPE="authorized_user";var lS=class e extends FV.OAuth2Client{static{a(this,"UserRefreshClient")}_refreshToken;constructor(t,n,o,r,i){let s=t&&typeof t=="object"?t:{clientId:t,clientSecret:n,refreshToken:o,eagerRefreshThresholdMillis:r,forceRefreshOnFailure:i};super(s),this._refreshToken=s.refreshToken,this.credentials.refresh_token=s.refreshToken}async refreshTokenNoCache(){return super.refreshTokenNoCache(this._refreshToken)}async fetchIdToken(t){let n={...e.RETRY_CONFIG,url:this.endpoints.oauth2TokenUrl,method:"POST",data:new URLSearchParams({client_id:this._clientId,client_secret:this._clientSecret,grant_type:"refresh_token",refresh_token:this._refreshToken,target_audience:t})};return BV.AuthClient.setMethodName(n,"fetchIdToken"),(await this.transporter.request(n)).data.id_token}fromJSON(t){if(!t)throw new Error("Must pass in a JSON object containing the user refresh token");if(t.type!=="authorized_user")throw new Error('The incoming JSON object does not have the "authorized_user" type');if(!t.client_id)throw new Error("The incoming JSON object does not contain a client_id field");if(!t.client_secret)throw new Error("The incoming JSON object does not contain a client_secret field");if(!t.refresh_token)throw new Error("The incoming JSON object does not contain a refresh_token field");this._clientId=t.client_id,this._clientSecret=t.client_secret,this._refreshToken=t.refresh_token,this.credentials.refresh_token=t.refresh_token,this.quotaProjectId=t.quota_project_id,this.universeDomain=t.universe_domain||this.universeDomain}fromStream(t,n){if(n)this.fromStreamAsync(t).then(()=>n(),n);else return this.fromStreamAsync(t)}async fromStreamAsync(t){return new Promise((n,o)=>{if(!t)return o(new Error("Must pass in a stream containing the user refresh token."));let r="";t.setEncoding("utf8").on("error",o).on("data",i=>r+=i).on("end",()=>{try{let i=JSON.parse(r);return this.fromJSON(i),n()}catch(i){return o(i)}})})}static fromJSON(t){let n=new e;return n.fromJSON(t),n}};Ja.UserRefreshClient=lS});var fS=z(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.Impersonated=Ya.IMPERSONATED_ACCOUNT_TYPE=void 0;var I$=xi(),qV=Pt(),VV=sn();Ya.IMPERSONATED_ACCOUNT_TYPE="impersonated_service_account";var pS=class e extends I$.OAuth2Client{static{a(this,"Impersonated")}sourceClient;targetPrincipal;targetScopes;delegates;lifetime;endpoint;constructor(t={}){if(super(t),this.credentials={expiry_date:1,refresh_token:"impersonated-placeholder"},this.sourceClient=t.sourceClient??new I$.OAuth2Client,this.targetPrincipal=t.targetPrincipal??"",this.delegates=t.delegates??[],this.targetScopes=t.targetScopes??[],this.lifetime=t.lifetime??3600,!!!(0,VV.originalOrCamelOptions)(t).get("universe_domain"))this.universeDomain=this.sourceClient.universeDomain;else if(this.sourceClient.universeDomain!==this.universeDomain)throw new RangeError(`Universe domain ${this.sourceClient.universeDomain} in source credentials does not match ${this.universeDomain} universe domain set for impersonated credentials.`);this.endpoint=t.endpoint??`https://iamcredentials.${this.universeDomain}`}async sign(t){await this.sourceClient.getAccessToken();let n=`projects/-/serviceAccounts/${this.targetPrincipal}`,o=`${this.endpoint}/v1/${n}:signBlob`,r={delegates:this.delegates,payload:Buffer.from(t).toString("base64")};return(await this.sourceClient.request({...e.RETRY_CONFIG,url:o,data:r,method:"POST"})).data}getTargetPrincipal(){return this.targetPrincipal}async refreshToken(){try{await this.sourceClient.getAccessToken();let t="projects/-/serviceAccounts/"+this.targetPrincipal,n=`${this.endpoint}/v1/${t}:generateAccessToken`,o={delegates:this.delegates,scope:this.targetScopes,lifetime:this.lifetime+"s"},r=await this.sourceClient.request({...e.RETRY_CONFIG,url:n,data:o,method:"POST"}),i=r.data;return this.credentials.access_token=i.accessToken,this.credentials.expiry_date=Date.parse(i.expireTime),{tokens:this.credentials,res:r}}catch(t){if(!(t instanceof Error))throw t;let n=0,o="";throw t instanceof qV.GaxiosError&&(n=t?.response?.data?.error?.status,o=t?.response?.data?.error?.message),n&&o?(t.message=`${n}: unable to impersonate: ${o}`,t):(t.message=`unable to impersonate: ${t}`,t)}}async fetchIdToken(t,n){await this.sourceClient.getAccessToken();let o=`projects/-/serviceAccounts/${this.targetPrincipal}`,r=`${this.endpoint}/v1/${o}:generateIdToken`,i={delegates:this.delegates,audience:t,includeEmail:n?.includeEmail??!0,useEmailAzp:n?.includeEmail??!0};return(await this.sourceClient.request({...e.RETRY_CONFIG,url:r,data:i,method:"POST"})).data.token}};Ya.Impersonated=pS});var hS=z(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.OAuthClientAuthHandler=void 0;Mu.getErrorFromOAuthErrorResponse=ZV;var Xa=Pt(),GV=Iu(),HV=["PUT","POST","PATCH"],mS=class{static{a(this,"OAuthClientAuthHandler")}#e=(0,GV.createCrypto)();#t;transporter;constructor(t){t&&"clientId"in t?(this.#t=t,this.transporter=new Xa.Gaxios):(this.#t=t?.clientAuthentication,this.transporter=t?.transporter||new Xa.Gaxios)}applyClientAuthenticationOptions(t,n){t.headers=Xa.Gaxios.mergeHeaders(t.headers),this.injectAuthenticatedHeaders(t,n),n||this.injectAuthenticatedRequestBody(t)}injectAuthenticatedHeaders(t,n){if(n)t.headers=Xa.Gaxios.mergeHeaders(t.headers,{authorization:`Bearer ${n}`});else if(this.#t?.confidentialClientType==="basic"){t.headers=Xa.Gaxios.mergeHeaders(t.headers);let o=this.#t.clientId,r=this.#t.clientSecret||"",i=this.#e.encodeBase64StringUtf8(`${o}:${r}`);Xa.Gaxios.mergeHeaders(t.headers,{authorization:`Basic ${i}`})}}injectAuthenticatedRequestBody(t){if(this.#t?.confidentialClientType==="request-body"){let n=(t.method||"GET").toUpperCase();if(!HV.includes(n))throw new Error(`${n} HTTP method does not support ${this.#t.confidentialClientType} client authentication`);let r=new Headers(t.headers).get("content-type");if(r?.startsWith("application/x-www-form-urlencoded")||t.data instanceof URLSearchParams){let i=new URLSearchParams(t.data??"");i.append("client_id",this.#t.clientId),i.append("client_secret",this.#t.clientSecret||""),t.data=i}else if(r?.startsWith("application/json"))t.data=t.data||{},Object.assign(t.data,{client_id:this.#t.clientId,client_secret:this.#t.clientSecret||""});else throw new Error(`${r} content-types are not supported with ${this.#t.confidentialClientType} client authentication`)}}static get RETRY_CONFIG(){return{retry:!0,retryConfig:{httpMethodsToRetry:["GET","PUT","POST","HEAD","OPTIONS","DELETE"]}}}};Mu.OAuthClientAuthHandler=mS;function ZV(e,t){let n=e.error,o=e.error_description,r=e.error_uri,i=`Error code ${n}`;typeof o<"u"&&(i+=`: ${o}`),typeof r<"u"&&(i+=` - ${r}`);let s=new Error(i);if(t){let u=Object.keys(t);t.stack&&u.push("stack"),u.forEach(d=>{d!=="message"&&Object.defineProperty(s,d,{value:t[d],writable:!1,enumerable:!0})})}return s}a(ZV,"getErrorFromOAuthErrorResponse")});var Tm=z(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});Sm.StsCredentials=void 0;var WV=Pt(),KV=xr(),R$=hS(),JV=sn(),gS=class e extends R$.OAuthClientAuthHandler{static{a(this,"StsCredentials")}#e;constructor(t={tokenExchangeEndpoint:""},n){(typeof t!="object"||t instanceof URL)&&(t={tokenExchangeEndpoint:t,clientAuthentication:n}),super(t),this.#e=t.tokenExchangeEndpoint}async exchangeToken(t,n,o){let r={grant_type:t.grantType,resource:t.resource,audience:t.audience,scope:t.scope?.join(" "),requested_token_type:t.requestedTokenType,subject_token:t.subjectToken,subject_token_type:t.subjectTokenType,actor_token:t.actingParty?.actorToken,actor_token_type:t.actingParty?.actorTokenType,options:o&&JSON.stringify(o)},i={...e.RETRY_CONFIG,url:this.#e.toString(),method:"POST",headers:n,data:new URLSearchParams((0,JV.removeUndefinedValuesInObject)(r))};KV.AuthClient.setMethodName(i,"exchangeToken"),this.applyClientAuthenticationOptions(i);try{let s=await this.transporter.request(i),u=s.data;return u.res=s,u}catch(s){throw s instanceof WV.GaxiosError&&s.response?(0,R$.getErrorFromOAuthErrorResponse)(s.response.data,s):s}}};Sm.StsCredentials=gS});var Uo=z(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.BaseExternalAccountClient=Vr.CLOUD_RESOURCE_MANAGER=Vr.EXTERNAL_ACCOUNT_TYPE=Vr.EXPIRATION_TIME_OFFSET=void 0;var YV=Pt(),XV=require("stream"),yS=xr(),QV=Tm(),C$=sn(),eG=kE(),tG="urn:ietf:params:oauth:grant-type:token-exchange",rG="urn:ietf:params:oauth:token-type:access_token",vS="https://www.googleapis.com/auth/cloud-platform",nG=3600;Vr.EXPIRATION_TIME_OFFSET=300*1e3;Vr.EXTERNAL_ACCOUNT_TYPE="external_account";Vr.CLOUD_RESOURCE_MANAGER="https://cloudresourcemanager.googleapis.com/v1/projects/";var oG="//iam\\.googleapis\\.com/locations/[^/]+/workforcePools/[^/]+/providers/.+",iG="https://sts.{universeDomain}/v1/token",_S=class e extends yS.AuthClient{static{a(this,"BaseExternalAccountClient")}scopes;projectNumber;audience;subjectTokenType;stsCredential;clientAuth;credentialSourceType;cachedAccessToken;serviceAccountImpersonationUrl;serviceAccountImpersonationLifetime;workforcePoolUserProject;configLifetimeRequested;tokenUrl;cloudResourceManagerURL;supplierContext;#e=null;constructor(t){super(t);let n=(0,C$.originalOrCamelOptions)(t),o=n.get("type");if(o&&o!==Vr.EXTERNAL_ACCOUNT_TYPE)throw new Error(`Expected "${Vr.EXTERNAL_ACCOUNT_TYPE}" type but received "${t.type}"`);let r=n.get("client_id"),i=n.get("client_secret");this.tokenUrl=n.get("token_url")??iG.replace("{universeDomain}",this.universeDomain);let s=n.get("subject_token_type"),u=n.get("workforce_pool_user_project"),d=n.get("service_account_impersonation_url"),f=n.get("service_account_impersonation"),h=(0,C$.originalOrCamelOptions)(f).get("token_lifetime_seconds");this.cloudResourceManagerURL=new URL(n.get("cloud_resource_manager_url")||`https://cloudresourcemanager.${this.universeDomain}/v1/projects/`),r&&(this.clientAuth={confidentialClientType:"basic",clientId:r,clientSecret:i}),this.stsCredential=new QV.StsCredentials({tokenExchangeEndpoint:this.tokenUrl,clientAuthentication:this.clientAuth}),this.scopes=n.get("scopes")||[vS],this.cachedAccessToken=null,this.audience=n.get("audience"),this.subjectTokenType=s,this.workforcePoolUserProject=u;let g=new RegExp(oG);if(this.workforcePoolUserProject&&!this.audience.match(g))throw new Error("workforcePoolUserProject should not be set for non-workforce pool credentials.");this.serviceAccountImpersonationUrl=d,this.serviceAccountImpersonationLifetime=h,this.serviceAccountImpersonationLifetime?this.configLifetimeRequested=!0:(this.configLifetimeRequested=!1,this.serviceAccountImpersonationLifetime=nG),this.projectNumber=this.getProjectNumber(this.audience),this.supplierContext={audience:this.audience,subjectTokenType:this.subjectTokenType,transporter:this.transporter}}getServiceAccountEmail(){if(this.serviceAccountImpersonationUrl){if(this.serviceAccountImpersonationUrl.length>256)throw new RangeError(`URL is too long: ${this.serviceAccountImpersonationUrl}`);return/serviceAccounts\/(?<email>[^:]+):generateAccessToken$/.exec(this.serviceAccountImpersonationUrl)?.groups?.email||null}return null}setCredentials(t){super.setCredentials(t),this.cachedAccessToken=t}async getAccessToken(){return(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){let t=await this.getAccessToken(),n=new Headers({authorization:`Bearer ${t.token}`});return this.addSharedMetadataHeaders(n)}request(t,n){if(n)this.requestAsync(t).then(o=>n(null,o),o=>n(o,o.response));else return this.requestAsync(t)}async getProjectId(){let t=this.projectNumber||this.workforcePoolUserProject;if(this.projectId)return this.projectId;if(t){let n=await this.getRequestHeaders(),o={...e.RETRY_CONFIG,headers:n,url:`${this.cloudResourceManagerURL.toString()}${t}`};yS.AuthClient.setMethodName(o,"getProjectId");let r=await this.transporter.request(o);return this.projectId=r.data.projectId,this.projectId}return null}async requestAsync(t,n=!1){let o;try{let r=await this.getRequestHeaders();t.headers=YV.Gaxios.mergeHeaders(t.headers),this.addUserProjectAndAuthHeaders(t.headers,r),o=await this.transporter.request(t)}catch(r){let i=r.response;if(i){let s=i.status,u=i.config.data instanceof XV.Readable;if(!n&&(s===401||s===403)&&!u&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(t,!0)}throw r}return o}async refreshAccessTokenAsync(){this.#e=this.#e||this.#t();try{return await this.#e}finally{this.#e=null}}async#t(){let t=await this.retrieveSubjectToken(),n={grantType:tG,audience:this.audience,requestedTokenType:rG,subjectToken:t,subjectTokenType:this.subjectTokenType,scope:this.serviceAccountImpersonationUrl?[vS]:this.getScopesArray()},o=!this.clientAuth&&this.workforcePoolUserProject?{userProject:this.workforcePoolUserProject}:void 0,r=new Headers({"x-goog-api-client":this.getMetricsHeaderValue()}),i=await this.stsCredential.exchangeToken(n,r,o);return this.serviceAccountImpersonationUrl?this.cachedAccessToken=await this.getImpersonatedAccessToken(i.access_token):i.expires_in?this.cachedAccessToken={access_token:i.access_token,expiry_date:new Date().getTime()+i.expires_in*1e3,res:i.res}:this.cachedAccessToken={access_token:i.access_token,res:i.res},this.credentials={},Object.assign(this.credentials,this.cachedAccessToken),delete this.credentials.res,this.emit("tokens",{refresh_token:null,expiry_date:this.cachedAccessToken.expiry_date,access_token:this.cachedAccessToken.access_token,token_type:"Bearer",id_token:null}),this.cachedAccessToken}getProjectNumber(t){let n=t.match(/\/projects\/([^/]+)/);return n?n[1]:null}async getImpersonatedAccessToken(t){let n={...e.RETRY_CONFIG,url:this.serviceAccountImpersonationUrl,method:"POST",headers:{"content-type":"application/json",authorization:`Bearer ${t}`},data:{scope:this.getScopesArray(),lifetime:this.serviceAccountImpersonationLifetime+"s"}};yS.AuthClient.setMethodName(n,"getImpersonatedAccessToken");let o=await this.transporter.request(n),r=o.data;return{access_token:r.accessToken,expiry_date:new Date(r.expireTime).getTime(),res:o}}isExpired(t){let n=new Date().getTime();return t.expiry_date?n>=t.expiry_date-this.eagerRefreshThresholdMillis:!1}getScopesArray(){return typeof this.scopes=="string"?[this.scopes]:this.scopes||[vS]}getMetricsHeaderValue(){let t=process.version.replace(/^v/,""),n=this.serviceAccountImpersonationUrl!==void 0,o=this.credentialSourceType?this.credentialSourceType:"unknown";return`gl-node/${t} auth/${eG.pkg.version} google-byoid-sdk source/${o} sa-impersonation/${n} config-lifetime/${this.configLifetimeRequested}`}getTokenUrl(){return this.tokenUrl}};Vr.BaseExternalAccountClient=_S});var O$=z(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});Pm.FileSubjectTokenSupplier=void 0;var ES=require("util"),SS=require("fs"),aG=(0,ES.promisify)(SS.readFile??(()=>{})),sG=(0,ES.promisify)(SS.realpath??(()=>{})),cG=(0,ES.promisify)(SS.lstat??(()=>{})),bS=class{static{a(this,"FileSubjectTokenSupplier")}filePath;formatType;subjectTokenFieldName;constructor(t){this.filePath=t.filePath,this.formatType=t.formatType,this.subjectTokenFieldName=t.subjectTokenFieldName}async getSubjectToken(){let t=this.filePath;try{if(t=await sG(t),!(await cG(t)).isFile())throw new Error}catch(r){throw r instanceof Error&&(r.message=`The file at ${t} does not exist, or it is not a file. ${r.message}`),r}let n,o=await aG(t,{encoding:"utf8"});if(this.formatType==="text"?n=o:this.formatType==="json"&&this.subjectTokenFieldName&&(n=JSON.parse(o)[this.subjectTokenFieldName]),!n)throw new Error("Unable to parse the subject_token from the credential_source file");return n}};Pm.FileSubjectTokenSupplier=bS});var k$=z(wm=>{"use strict";Object.defineProperty(wm,"__esModule",{value:!0});wm.UrlSubjectTokenSupplier=void 0;var uG=xr(),TS=class{static{a(this,"UrlSubjectTokenSupplier")}url;headers;formatType;subjectTokenFieldName;additionalGaxiosOptions;constructor(t){this.url=t.url,this.formatType=t.formatType,this.subjectTokenFieldName=t.subjectTokenFieldName,this.headers=t.headers,this.additionalGaxiosOptions=t.additionalGaxiosOptions}async getSubjectToken(t){let n={...this.additionalGaxiosOptions,url:this.url,method:"GET",headers:this.headers};uG.AuthClient.setMethodName(n,"getSubjectToken");let o;if(this.formatType==="text"?o=(await t.transporter.request(n)).data:this.formatType==="json"&&this.subjectTokenFieldName&&(o=(await t.transporter.request(n)).data[this.subjectTokenFieldName]),!o)throw new Error("Unable to parse the subject_token from the credential_source URL");return o}};wm.UrlSubjectTokenSupplier=TS});var $$=z(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.CertificateSubjectTokenSupplier=Cr.InvalidConfigurationError=Cr.CertificateSourceUnavailableError=Cr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE=void 0;var xm=sn(),Am=require("fs"),Im=require("crypto"),lG=require("https");Cr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE="GOOGLE_API_CERTIFICATE_CONFIG";var Tn=class extends Error{static{a(this,"CertificateSourceUnavailableError")}constructor(t){super(t),this.name="CertificateSourceUnavailableError"}};Cr.CertificateSourceUnavailableError=Tn;var Gr=class extends Error{static{a(this,"InvalidConfigurationError")}constructor(t){super(t),this.name="InvalidConfigurationError"}};Cr.InvalidConfigurationError=Gr;var PS=class{static{a(this,"CertificateSubjectTokenSupplier")}certificateConfigPath;trustChainPath;cert;key;constructor(t){if(!t.useDefaultCertificateConfig&&!t.certificateConfigLocation)throw new Gr("Either `useDefaultCertificateConfig` must be true or a `certificateConfigLocation` must be provided.");if(t.useDefaultCertificateConfig&&t.certificateConfigLocation)throw new Gr("Both `useDefaultCertificateConfig` and `certificateConfigLocation` cannot be provided.");this.trustChainPath=t.trustChainPath,this.certificateConfigPath=t.certificateConfigLocation??""}async createMtlsHttpsAgent(){if(!this.key||!this.cert)throw new Gr("Cannot create mTLS Agent with missing certificate or key");return new lG.Agent({key:this.key,cert:this.cert})}async getSubjectToken(){this.certificateConfigPath=await this.#e();let{certPath:t,keyPath:n}=await this.#t();return{cert:this.cert,key:this.key}=await this.#r(t,n),await this.#n(this.cert)}async#e(){let t=this.certificateConfigPath;if(t){if(await(0,xm.isValidFile)(t))return t;throw new Tn(`Provided certificate config path is invalid: ${t}`)}let n=process.env[Cr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE];if(n){if(await(0,xm.isValidFile)(n))return n;throw new Tn(`Path from environment variable "${Cr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" is invalid: ${n}`)}let o=(0,xm.getWellKnownCertificateConfigFileLocation)();if(await(0,xm.isValidFile)(o))return o;throw new Tn(`Could not find certificate configuration file. Searched override path, the "${Cr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" env var, and the gcloud path (${o}).`)}async#t(){let t=this.certificateConfigPath,n;try{n=await Am.promises.readFile(t,"utf8")}catch{throw new Tn(`Failed to read certificate config file at: ${t}`)}try{let o=JSON.parse(n),r=o?.cert_configs?.workload?.cert_path,i=o?.cert_configs?.workload?.key_path;if(!r||!i)throw new Gr(`Certificate config file (${t}) is missing required "cert_path" or "key_path" in the workload config.`);return{certPath:r,keyPath:i}}catch(o){throw o instanceof Gr?o:new Gr(`Failed to parse certificate config from ${t}: ${o.message}`)}}async#r(t,n){let o,r;try{o=await Am.promises.readFile(t),new Im.X509Certificate(o)}catch(i){let s=i instanceof Error?i.message:String(i);throw new Tn(`Failed to read certificate file at ${t}: ${s}`)}try{r=await Am.promises.readFile(n),(0,Im.createPrivateKey)(r)}catch(i){let s=i instanceof Error?i.message:String(i);throw new Tn(`Failed to read private key file at ${n}: ${s}`)}return{cert:o,key:r}}async#n(t){let n=new Im.X509Certificate(t);if(!this.trustChainPath)return JSON.stringify([n.raw.toString("base64")]);try{let i=((await Am.promises.readFile(this.trustChainPath,"utf8")).match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g)??[]).map((d,f)=>{try{return new Im.X509Certificate(d)}catch(h){let g=h instanceof Error?h.message:String(h);throw new Gr(`Failed to parse certificate at index ${f} in trust chain file ${this.trustChainPath}: ${g}`)}}),s=i.findIndex(d=>n.raw.equals(d.raw)),u;if(s===-1)u=[n,...i];else if(s===0)u=i;else throw new Gr(`Leaf certificate exists in the trust chain but is not the first entry (found at index ${s}).`);return JSON.stringify(u.map(d=>d.raw.toString("base64")))}catch(o){if(o instanceof Gr)throw o;let r=o instanceof Error?o.message:String(o);throw new Tn(`Failed to process certificate chain from ${this.trustChainPath}: ${r}`)}}};Cr.CertificateSubjectTokenSupplier=PS});var AS=z(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});Rm.IdentityPoolClient=void 0;var dG=Uo(),wS=sn(),pG=O$(),fG=k$(),D$=$$(),mG=Tm(),N$=Pt(),xS=class e extends dG.BaseExternalAccountClient{static{a(this,"IdentityPoolClient")}subjectTokenSupplier;constructor(t){super(t);let n=(0,wS.originalOrCamelOptions)(t),o=n.get("credential_source"),r=n.get("subject_token_supplier");if(!o&&!r)throw new Error("A credential source or subject token supplier must be specified.");if(o&&r)throw new Error("Only one of credential source or subject token supplier can be specified.");if(r)this.subjectTokenSupplier=r,this.credentialSourceType="programmatic";else{let i=(0,wS.originalOrCamelOptions)(o),s=(0,wS.originalOrCamelOptions)(i.get("format")),u=s.get("type")||"text",d=s.get("subject_token_field_name");if(u!=="json"&&u!=="text")throw new Error(`Invalid credential_source format "${u}"`);if(u==="json"&&!d)throw new Error("Missing subject_token_field_name for JSON credential_source format");let f=i.get("file"),h=i.get("url"),g=i.get("certificate"),m=i.get("headers");if(f&&h||h&&g||f&&g)throw new Error('No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.');if(f)this.credentialSourceType="file",this.subjectTokenSupplier=new pG.FileSubjectTokenSupplier({filePath:f,formatType:u,subjectTokenFieldName:d});else if(h)this.credentialSourceType="url",this.subjectTokenSupplier=new fG.UrlSubjectTokenSupplier({url:h,formatType:u,subjectTokenFieldName:d,headers:m,additionalGaxiosOptions:e.RETRY_CONFIG});else if(g){this.credentialSourceType="certificate";let p=new D$.CertificateSubjectTokenSupplier({useDefaultCertificateConfig:g.use_default_certificate_config,certificateConfigLocation:g.certificate_config_location,trustChainPath:g.trust_chain_path});this.subjectTokenSupplier=p}else throw new Error('No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.')}}async retrieveSubjectToken(){let t=await this.subjectTokenSupplier.getSubjectToken(this.supplierContext);if(this.subjectTokenSupplier instanceof D$.CertificateSubjectTokenSupplier){let n=await this.subjectTokenSupplier.createMtlsHttpsAgent();this.stsCredential=new mG.StsCredentials({tokenExchangeEndpoint:this.getTokenUrl(),clientAuthentication:this.clientAuth,transporter:new N$.Gaxios({agent:n})}),this.transporter=new N$.Gaxios({...this.transporter.defaults||{},agent:n})}return t}};Rm.IdentityPoolClient=xS});var RS=z(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});Om.AwsRequestSigner=void 0;var Cm=Pt(),U$=Iu(),z$="AWS4-HMAC-SHA256",hG="aws4_request",IS=class{static{a(this,"AwsRequestSigner")}getCredentials;region;crypto;constructor(t,n){this.getCredentials=t,this.region=n,this.crypto=(0,U$.createCrypto)()}async getRequestOptions(t){if(!t.url)throw new RangeError('"url" is required in "amzOptions"');let n=typeof t.data=="object"?JSON.stringify(t.data):t.data,o=t.url,r=t.method||"GET",i=t.body||n,s=t.headers,u=await this.getCredentials(),d=new URL(o);if(typeof i!="string"&&i!==void 0)throw new TypeError(`'requestPayload' is expected to be a string if provided. Got: ${i}`);let f=await yG({crypto:this.crypto,host:d.host,canonicalUri:d.pathname,canonicalQuerystring:d.search.slice(1),method:r,region:this.region,securityCredentials:u,requestPayload:i,additionalAmzHeaders:s}),h=Cm.Gaxios.mergeHeaders(f.amzDate?{"x-amz-date":f.amzDate}:{},{authorization:f.authorizationHeader,host:d.host},s||{});u.token&&Cm.Gaxios.mergeHeaders(h,{"x-amz-security-token":u.token});let g={url:o,method:r,headers:h};return i!==void 0&&(g.body=i),g}};Om.AwsRequestSigner=IS;async function Lu(e,t,n){return await e.signWithHmacSha256(t,n)}a(Lu,"sign");async function gG(e,t,n,o,r){let i=await Lu(e,`AWS4${t}`,n),s=await Lu(e,i,o),u=await Lu(e,s,r);return await Lu(e,u,"aws4_request")}a(gG,"getSigningKey");async function yG(e){let t=Cm.Gaxios.mergeHeaders(e.additionalAmzHeaders),n=e.requestPayload||"",o=e.host.split(".")[0],r=new Date,i=r.toISOString().replace(/[-:]/g,"").replace(/\.[0-9]+/,""),s=r.toISOString().replace(/[-]/g,"").replace(/T.*/,"");e.securityCredentials.token&&t.set("x-amz-security-token",e.securityCredentials.token);let u=Cm.Gaxios.mergeHeaders({host:e.host},t.has("date")?{}:{"x-amz-date":i},t),d="",f=[...u.keys()].sort();f.forEach(k=>{d+=`${k}:${u.get(k)}
|
|
41
|
+
`});let h=f.join(";"),g=await e.crypto.sha256DigestHex(n),m=`${e.method.toUpperCase()}
|
|
42
|
+
${e.canonicalUri}
|
|
43
|
+
${e.canonicalQuerystring}
|
|
44
|
+
${d}
|
|
45
|
+
${h}
|
|
46
|
+
${g}`,p=`${s}/${e.region}/${o}/${hG}`,y=`${z$}
|
|
47
|
+
${i}
|
|
44
48
|
${p}
|
|
45
|
-
${y}
|
|
46
|
-
${h}`,l=`${c}/${t.region}/${n}/${Jz}`,g=`${PT}
|
|
47
|
-
${s}
|
|
48
|
-
${l}
|
|
49
|
-
`+await t.crypto.sha256DigestHex(f),v=await Yz(t.crypto,t.securityCredentials.secretAccessKey,c,t.region,n),E=await Ma(t.crypto,v,g),b=`${PT} Credential=${t.securityCredentials.accessKeyId}/${l}, SignedHeaders=${y}, Signature=${(0,xT.fromArrayBufferToHex)(E)}`;return{amzDate:e.has("date")?void 0:s,authorizationHeader:b,canonicalQuerystring:t.canonicalQuerystring}}o(Xz,"generateAuthenticationHeaderMap")});var AT=D(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});hc.DefaultAwsSecurityCredentialsSupplier=void 0;var mc=nr(),Cf=class{static{o(this,"DefaultAwsSecurityCredentialsSupplier")}regionUrl;securityCredentialsUrl;imdsV2SessionTokenUrl;additionalGaxiosOptions;constructor(e){this.regionUrl=e.regionUrl,this.securityCredentialsUrl=e.securityCredentialsUrl,this.imdsV2SessionTokenUrl=e.imdsV2SessionTokenUrl,this.additionalGaxiosOptions=e.additionalGaxiosOptions}async getAwsRegion(e){if(this.#n)return this.#n;let r=new Headers;if(!this.#n&&this.imdsV2SessionTokenUrl&&r.set("x-aws-ec2-metadata-token",await this.#e(e.transporter)),!this.regionUrl)throw new RangeError('Unable to determine AWS region due to missing "options.credential_source.region_url"');let n={...this.additionalGaxiosOptions,url:this.regionUrl,method:"GET",headers:r};mc.AuthClient.setMethodName(n,"getAwsRegion");let i=await e.transporter.request(n);return i.data.substr(0,i.data.length-1)}async getAwsSecurityCredentials(e){if(this.#o)return this.#o;let r=new Headers;this.imdsV2SessionTokenUrl&&r.set("x-aws-ec2-metadata-token",await this.#e(e.transporter));let n=await this.#t(r,e.transporter),i=await this.#r(n,r,e.transporter);return{accessKeyId:i.AccessKeyId,secretAccessKey:i.SecretAccessKey,token:i.Token}}async#e(e){let r={...this.additionalGaxiosOptions,url:this.imdsV2SessionTokenUrl,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"300"}};return mc.AuthClient.setMethodName(r,"#getImdsV2SessionToken"),(await e.request(r)).data}async#t(e,r){if(!this.securityCredentialsUrl)throw new Error('Unable to determine AWS role name due to missing "options.credential_source.url"');let n={...this.additionalGaxiosOptions,url:this.securityCredentialsUrl,method:"GET",headers:e};return mc.AuthClient.setMethodName(n,"#getAwsRoleName"),(await r.request(n)).data}async#r(e,r,n){let i={...this.additionalGaxiosOptions,url:`${this.securityCredentialsUrl}/${e}`,headers:r};return mc.AuthClient.setMethodName(i,"#retrieveAwsSecurityCredentials"),(await n.request(i)).data}get#n(){return process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||null}get#o(){return process.env.AWS_ACCESS_KEY_ID&&process.env.AWS_SECRET_ACCESS_KEY?{accessKeyId:process.env.AWS_ACCESS_KEY_ID,secretAccessKey:process.env.AWS_SECRET_ACCESS_KEY,token:process.env.AWS_SESSION_TOKEN}:null}};hc.DefaultAwsSecurityCredentialsSupplier=Cf});var kf=D(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});gc.AwsClient=void 0;var Qz=Rf(),eU=Xn(),tU=AT(),IT=kr(),rU=ht(),Of=class t extends eU.BaseExternalAccountClient{static{o(this,"AwsClient")}environmentId;awsSecurityCredentialsSupplier;regionalCredVerificationUrl;awsRequestSigner;region;static#e="https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15";static AWS_EC2_METADATA_IPV4_ADDRESS="169.254.169.254";static AWS_EC2_METADATA_IPV6_ADDRESS="fd00:ec2::254";constructor(e){super(e);let r=(0,IT.originalOrCamelOptions)(e),n=r.get("credential_source"),i=r.get("aws_security_credentials_supplier");if(!n&&!i)throw new Error("A credential source or AWS security credentials supplier must be specified.");if(n&&i)throw new Error("Only one of credential source or AWS security credentials supplier can be specified.");if(i)this.awsSecurityCredentialsSupplier=i,this.regionalCredVerificationUrl=t.#e,this.credentialSourceType="programmatic";else{let s=(0,IT.originalOrCamelOptions)(n);this.environmentId=s.get("environment_id");let c=s.get("region_url"),d=s.get("url"),p=s.get("imdsv2_session_token_url");this.awsSecurityCredentialsSupplier=new tU.DefaultAwsSecurityCredentialsSupplier({regionUrl:c,securityCredentialsUrl:d,imdsV2SessionTokenUrl:p}),this.regionalCredVerificationUrl=s.get("regional_cred_verification_url"),this.credentialSourceType="aws",this.validateEnvironmentId()}this.awsRequestSigner=null,this.region=""}validateEnvironmentId(){let e=this.environmentId?.match(/^(aws)(\d+)$/);if(!e||!this.regionalCredVerificationUrl)throw new Error('No valid AWS "credential_source" provided');if(parseInt(e[2],10)!==1)throw new Error(`aws version "${e[2]}" is not supported in the current build.`)}async retrieveSubjectToken(){this.awsRequestSigner||(this.region=await this.awsSecurityCredentialsSupplier.getAwsRegion(this.supplierContext),this.awsRequestSigner=new Qz.AwsRequestSigner(async()=>this.awsSecurityCredentialsSupplier.getAwsSecurityCredentials(this.supplierContext),this.region));let e=await this.awsRequestSigner.getRequestOptions({...t.RETRY_CONFIG,url:this.regionalCredVerificationUrl.replace("{region}",this.region),method:"POST"}),r=[];return rU.Gaxios.mergeHeaders({"x-goog-cloud-target-resource":this.audience},e.headers).forEach((i,s)=>r.push({key:s,value:i})),encodeURIComponent(JSON.stringify({url:e.url,method:e.method,headers:r}))}};gc.AwsClient=Of});var Uf=D(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.InvalidSubjectTokenError=vt.InvalidMessageFieldError=vt.InvalidCodeFieldError=vt.InvalidTokenTypeFieldError=vt.InvalidExpirationTimeFieldError=vt.InvalidSuccessFieldError=vt.InvalidVersionFieldError=vt.ExecutableResponseError=vt.ExecutableResponse=void 0;var yc="urn:ietf:params:oauth:token-type:saml2",$f="urn:ietf:params:oauth:token-type:id_token",Df="urn:ietf:params:oauth:token-type:jwt",Nf=class{static{o(this,"ExecutableResponse")}version;success;expirationTime;tokenType;errorCode;errorMessage;subjectToken;constructor(e){if(!e.version)throw new vc("Executable response must contain a 'version' field.");if(e.success===void 0)throw new _c("Executable response must contain a 'success' field.");if(this.version=e.version,this.success=e.success,this.success){if(this.expirationTime=e.expiration_time,this.tokenType=e.token_type,this.tokenType!==yc&&this.tokenType!==$f&&this.tokenType!==Df)throw new bc(`Executable response must contain a 'token_type' field when successful and it must be one of ${$f}, ${Df}, or ${yc}.`);if(this.tokenType===yc){if(!e.saml_response)throw new La(`Executable response must contain a 'saml_response' field when token_type=${yc}.`);this.subjectToken=e.saml_response}else{if(!e.id_token)throw new La(`Executable response must contain a 'id_token' field when token_type=${$f} or ${Df}.`);this.subjectToken=e.id_token}}else{if(!e.code)throw new Ec("Executable response must contain a 'code' field when unsuccessful.");if(!e.message)throw new Sc("Executable response must contain a 'message' field when unsuccessful.");this.errorCode=e.code,this.errorMessage=e.message}}isValid(){return!this.isExpired()&&this.success}isExpired(){return this.expirationTime!==void 0&&this.expirationTime<Math.round(Date.now()/1e3)}};vt.ExecutableResponse=Nf;var Jr=class extends Error{static{o(this,"ExecutableResponseError")}constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}};vt.ExecutableResponseError=Jr;var vc=class extends Jr{static{o(this,"InvalidVersionFieldError")}};vt.InvalidVersionFieldError=vc;var _c=class extends Jr{static{o(this,"InvalidSuccessFieldError")}};vt.InvalidSuccessFieldError=_c;var zf=class extends Jr{static{o(this,"InvalidExpirationTimeFieldError")}};vt.InvalidExpirationTimeFieldError=zf;var bc=class extends Jr{static{o(this,"InvalidTokenTypeFieldError")}};vt.InvalidTokenTypeFieldError=bc;var Ec=class extends Jr{static{o(this,"InvalidCodeFieldError")}};vt.InvalidCodeFieldError=Ec;var Sc=class extends Jr{static{o(this,"InvalidMessageFieldError")}};vt.InvalidMessageFieldError=Sc;var La=class extends Jr{static{o(this,"InvalidSubjectTokenError")}};vt.InvalidSubjectTokenError=La});var jf=D(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.PluggableAuthHandler=Si.ExecutableError=void 0;var To=Uf(),nU=require("child_process"),Mf=require("fs"),wc=class extends Error{static{o(this,"ExecutableError")}code;constructor(e,r){super(`The executable failed with exit code: ${r} and error message: ${e}.`),this.code=r,Object.setPrototypeOf(this,new.target.prototype)}};Si.ExecutableError=wc;var Lf=class t{static{o(this,"PluggableAuthHandler")}commandComponents;timeoutMillis;outputFile;constructor(e){if(!e.command)throw new Error("No command provided.");if(this.commandComponents=t.parseCommand(e.command),this.timeoutMillis=e.timeoutMillis,!this.timeoutMillis)throw new Error("No timeoutMillis provided.");this.outputFile=e.outputFile}retrieveResponseFromExecutable(e){return new Promise((r,n)=>{let i=nU.spawn(this.commandComponents[0],this.commandComponents.slice(1),{env:{...process.env,...Object.fromEntries(e)}}),s="";i.stdout.on("data",d=>{s+=d}),i.stderr.on("data",d=>{s+=d});let c=setTimeout(()=>(i.removeAllListeners(),i.kill(),n(new Error("The executable failed to finish within the timeout specified."))),this.timeoutMillis);i.on("close",d=>{if(clearTimeout(c),d===0)try{let p=JSON.parse(s),m=new To.ExecutableResponse(p);return r(m)}catch(p){return p instanceof To.ExecutableResponseError?n(p):n(new To.ExecutableResponseError(`The executable returned an invalid response: ${s}`))}else return n(new wc(s,d.toString()))})})}async retrieveCachedResponse(){if(!this.outputFile||this.outputFile.length===0)return;let e;try{e=await Mf.promises.realpath(this.outputFile)}catch{return}if(!(await Mf.promises.lstat(e)).isFile())return;let r=await Mf.promises.readFile(e,{encoding:"utf8"});if(r!=="")try{let n=JSON.parse(r);return new To.ExecutableResponse(n).isValid()?new To.ExecutableResponse(n):void 0}catch(n){throw n instanceof To.ExecutableResponseError?n:new To.ExecutableResponseError(`The output file contained an invalid response: ${r}`)}}static parseCommand(e){let r=e.match(/(?:[^\s"]+|"[^"]*")+/g);if(!r)throw new Error(`Provided command: "${e}" could not be parsed.`);for(let n=0;n<r.length;n++)r[n][0]==='"'&&r[n].slice(-1)==='"'&&(r[n]=r[n].slice(1,-1));return r}};Si.PluggableAuthHandler=Lf});var qf=D(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.PluggableAuthClient=wi.ExecutableError=void 0;var oU=Xn(),iU=Uf(),RT=jf(),aU=jf();Object.defineProperty(wi,"ExecutableError",{enumerable:!0,get:o(function(){return aU.ExecutableError},"get")});var sU=30*1e3,CT=5*1e3,OT=120*1e3,uU="GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES",kT=1,Ff=class extends oU.BaseExternalAccountClient{static{o(this,"PluggableAuthClient")}command;timeoutMillis;outputFile;handler;constructor(e){if(super(e),!e.credential_source.executable)throw new Error('No valid Pluggable Auth "credential_source" provided.');if(this.command=e.credential_source.executable.command,!this.command)throw new Error('No valid Pluggable Auth "credential_source" provided.');if(e.credential_source.executable.timeout_millis===void 0)this.timeoutMillis=sU;else if(this.timeoutMillis=e.credential_source.executable.timeout_millis,this.timeoutMillis<CT||this.timeoutMillis>OT)throw new Error(`Timeout must be between ${CT} and ${OT} milliseconds.`);this.outputFile=e.credential_source.executable.output_file,this.handler=new RT.PluggableAuthHandler({command:this.command,timeoutMillis:this.timeoutMillis,outputFile:this.outputFile}),this.credentialSourceType="executable"}async retrieveSubjectToken(){if(process.env[uU]!=="1")throw new Error("Pluggable Auth executables need to be explicitly allowed to run by setting the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment Variable to 1.");let e;if(this.outputFile&&(e=await this.handler.retrieveCachedResponse()),!e){let r=new Map;r.set("GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE",this.audience),r.set("GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE",this.subjectTokenType),r.set("GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE","0"),this.outputFile&&r.set("GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE",this.outputFile);let n=this.getServiceAccountEmail();n&&r.set("GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL",n),e=await this.handler.retrieveResponseFromExecutable(r)}if(e.version>kT)throw new Error(`Version of executable is not currently supported, maximum supported version is ${kT}.`);if(!e.success)throw new RT.ExecutableError(e.errorMessage,e.errorCode);if(this.outputFile&&!e.expirationTime)throw new iU.InvalidExpirationTimeFieldError("The executable response must contain the `expiration_time` field for successful responses when an output_file has been specified in the configuration.");if(e.isExpired())throw new Error("Executable response is expired.");return e.subjectToken}};wi.PluggableAuthClient=Ff});var Vf=D(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});Tc.ExternalAccountClient=void 0;var cU=Xn(),lU=Af(),dU=kf(),pU=qf(),Bf=class{static{o(this,"ExternalAccountClient")}constructor(){throw new Error("ExternalAccountClients should be initialized via: ExternalAccountClient.fromJSON(), directly via explicit constructors, eg. new AwsClient(options), new IdentityPoolClient(options), newPluggableAuthClientOptions, or via new GoogleAuth(options).getClient()")}static fromJSON(e){return e&&e.type===cU.EXTERNAL_ACCOUNT_TYPE?e.credential_source?.environment_id?new dU.AwsClient(e):e.credential_source?.executable?new pU.PluggableAuthClient(e):new lU.IdentityPoolClient(e):null}};Tc.ExternalAccountClient=Bf});var Wf=D(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.ExternalAccountAuthorizedUserClient=Ti.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=void 0;var DT=nr(),$T=hf(),NT=ht(),fU=require("stream"),mU=Xn();Ti.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE="external_account_authorized_user";var hU="https://sts.{universeDomain}/v1/oauthtoken",Gf=class t extends $T.OAuthClientAuthHandler{static{o(this,"ExternalAccountAuthorizedUserHandler")}#e;constructor(e){super(e),this.#e=e.tokenRefreshEndpoint}async refreshToken(e,r){let n={...t.RETRY_CONFIG,url:this.#e,method:"POST",headers:r,data:new URLSearchParams({grant_type:"refresh_token",refresh_token:e})};DT.AuthClient.setMethodName(n,"refreshToken"),this.applyClientAuthenticationOptions(n);try{let i=await this.transporter.request(n),s=i.data;return s.res=i,s}catch(i){throw i instanceof NT.GaxiosError&&i.response?(0,$T.getErrorFromOAuthErrorResponse)(i.response.data,i):i}}},Hf=class extends DT.AuthClient{static{o(this,"ExternalAccountAuthorizedUserClient")}cachedAccessToken;externalAccountAuthorizedUserHandler;refreshToken;constructor(e){super(e),e.universe_domain&&(this.universeDomain=e.universe_domain),this.refreshToken=e.refresh_token;let r={confidentialClientType:"basic",clientId:e.client_id,clientSecret:e.client_secret};this.externalAccountAuthorizedUserHandler=new Gf({tokenRefreshEndpoint:e.token_url??hU.replace("{universeDomain}",this.universeDomain),transporter:this.transporter,clientAuthentication:r}),this.cachedAccessToken=null,this.quotaProjectId=e.quota_project_id,typeof e?.eagerRefreshThresholdMillis!="number"?this.eagerRefreshThresholdMillis=mU.EXPIRATION_TIME_OFFSET:this.eagerRefreshThresholdMillis=e.eagerRefreshThresholdMillis,this.forceRefreshOnFailure=!!e?.forceRefreshOnFailure}async getAccessToken(){return(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){let e=await this.getAccessToken(),r=new Headers({authorization:`Bearer ${e.token}`});return this.addSharedMetadataHeaders(r)}request(e,r){if(r)this.requestAsync(e).then(n=>r(null,n),n=>r(n,n.response));else return this.requestAsync(e)}async requestAsync(e,r=!1){let n;try{let i=await this.getRequestHeaders();e.headers=NT.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,i),n=await this.transporter.request(e)}catch(i){let s=i.response;if(s){let c=s.status,d=s.config.data instanceof fU.Readable;if(!r&&(c===401||c===403)&&!d&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(e,!0)}throw i}return n}async refreshAccessTokenAsync(){let e=await this.externalAccountAuthorizedUserHandler.refreshToken(this.refreshToken);return this.cachedAccessToken={access_token:e.access_token,expiry_date:new Date().getTime()+e.expires_in*1e3,res:e.res},e.refresh_token!==void 0&&(this.refreshToken=e.refresh_token),this.cachedAccessToken}isExpired(e){let r=new Date().getTime();return e.expiry_date?r>=e.expiry_date-this.eagerRefreshThresholdMillis:!1}};Ti.ExternalAccountAuthorizedUserClient=Hf});var LT=D(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.GoogleAuth=zr.GoogleAuthExceptionMessages=void 0;var gU=require("child_process"),ja=require("fs"),yU=ht(),Fa=xa(),vU=require("os"),Zf=require("path"),_U=Aa(),bU=jp(),EU=qp(),SU=Bp(),Pi=cf(),zT=df(),xi=ff(),wU=Vf(),qa=Xn(),Kf=nr(),UT=Wf(),MT=kr();zr.GoogleAuthExceptionMessages={API_KEY_WITH_CREDENTIALS:"API Keys and Credentials are mutually exclusive authentication methods and cannot be used together.",NO_PROJECT_ID_FOUND:`Unable to detect a Project Id in the current environment.
|
|
49
|
+
`+await e.crypto.sha256DigestHex(m),v=await gG(e.crypto,e.securityCredentials.secretAccessKey,s,e.region,o),E=await Lu(e.crypto,v,y),b=`${z$} Credential=${e.securityCredentials.accessKeyId}/${p}, SignedHeaders=${h}, Signature=${(0,U$.fromArrayBufferToHex)(E)}`;return{amzDate:t.has("date")?void 0:i,authorizationHeader:b,canonicalQuerystring:e.canonicalQuerystring}}a(yG,"generateAuthenticationHeaderMap")});var M$=z($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});$m.DefaultAwsSecurityCredentialsSupplier=void 0;var km=xr(),CS=class{static{a(this,"DefaultAwsSecurityCredentialsSupplier")}regionUrl;securityCredentialsUrl;imdsV2SessionTokenUrl;additionalGaxiosOptions;constructor(t){this.regionUrl=t.regionUrl,this.securityCredentialsUrl=t.securityCredentialsUrl,this.imdsV2SessionTokenUrl=t.imdsV2SessionTokenUrl,this.additionalGaxiosOptions=t.additionalGaxiosOptions}async getAwsRegion(t){if(this.#n)return this.#n;let n=new Headers;if(!this.#n&&this.imdsV2SessionTokenUrl&&n.set("x-aws-ec2-metadata-token",await this.#e(t.transporter)),!this.regionUrl)throw new RangeError('Unable to determine AWS region due to missing "options.credential_source.region_url"');let o={...this.additionalGaxiosOptions,url:this.regionUrl,method:"GET",headers:n};km.AuthClient.setMethodName(o,"getAwsRegion");let r=await t.transporter.request(o);return r.data.substr(0,r.data.length-1)}async getAwsSecurityCredentials(t){if(this.#o)return this.#o;let n=new Headers;this.imdsV2SessionTokenUrl&&n.set("x-aws-ec2-metadata-token",await this.#e(t.transporter));let o=await this.#t(n,t.transporter),r=await this.#r(o,n,t.transporter);return{accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,token:r.Token}}async#e(t){let n={...this.additionalGaxiosOptions,url:this.imdsV2SessionTokenUrl,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"300"}};return km.AuthClient.setMethodName(n,"#getImdsV2SessionToken"),(await t.request(n)).data}async#t(t,n){if(!this.securityCredentialsUrl)throw new Error('Unable to determine AWS role name due to missing "options.credential_source.url"');let o={...this.additionalGaxiosOptions,url:this.securityCredentialsUrl,method:"GET",headers:t};return km.AuthClient.setMethodName(o,"#getAwsRoleName"),(await n.request(o)).data}async#r(t,n,o){let r={...this.additionalGaxiosOptions,url:`${this.securityCredentialsUrl}/${t}`,headers:n};return km.AuthClient.setMethodName(r,"#retrieveAwsSecurityCredentials"),(await o.request(r)).data}get#n(){return process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||null}get#o(){return process.env.AWS_ACCESS_KEY_ID&&process.env.AWS_SECRET_ACCESS_KEY?{accessKeyId:process.env.AWS_ACCESS_KEY_ID,secretAccessKey:process.env.AWS_SECRET_ACCESS_KEY,token:process.env.AWS_SESSION_TOKEN}:null}};$m.DefaultAwsSecurityCredentialsSupplier=CS});var kS=z(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});Dm.AwsClient=void 0;var vG=RS(),_G=Uo(),bG=M$(),L$=sn(),EG=Pt(),OS=class e extends _G.BaseExternalAccountClient{static{a(this,"AwsClient")}environmentId;awsSecurityCredentialsSupplier;regionalCredVerificationUrl;awsRequestSigner;region;static#e="https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15";static AWS_EC2_METADATA_IPV4_ADDRESS="169.254.169.254";static AWS_EC2_METADATA_IPV6_ADDRESS="fd00:ec2::254";constructor(t){super(t);let n=(0,L$.originalOrCamelOptions)(t),o=n.get("credential_source"),r=n.get("aws_security_credentials_supplier");if(!o&&!r)throw new Error("A credential source or AWS security credentials supplier must be specified.");if(o&&r)throw new Error("Only one of credential source or AWS security credentials supplier can be specified.");if(r)this.awsSecurityCredentialsSupplier=r,this.regionalCredVerificationUrl=e.#e,this.credentialSourceType="programmatic";else{let i=(0,L$.originalOrCamelOptions)(o);this.environmentId=i.get("environment_id");let s=i.get("region_url"),u=i.get("url"),d=i.get("imdsv2_session_token_url");this.awsSecurityCredentialsSupplier=new bG.DefaultAwsSecurityCredentialsSupplier({regionUrl:s,securityCredentialsUrl:u,imdsV2SessionTokenUrl:d}),this.regionalCredVerificationUrl=i.get("regional_cred_verification_url"),this.credentialSourceType="aws",this.validateEnvironmentId()}this.awsRequestSigner=null,this.region=""}validateEnvironmentId(){let t=this.environmentId?.match(/^(aws)(\d+)$/);if(!t||!this.regionalCredVerificationUrl)throw new Error('No valid AWS "credential_source" provided');if(parseInt(t[2],10)!==1)throw new Error(`aws version "${t[2]}" is not supported in the current build.`)}async retrieveSubjectToken(){this.awsRequestSigner||(this.region=await this.awsSecurityCredentialsSupplier.getAwsRegion(this.supplierContext),this.awsRequestSigner=new vG.AwsRequestSigner(async()=>this.awsSecurityCredentialsSupplier.getAwsSecurityCredentials(this.supplierContext),this.region));let t=await this.awsRequestSigner.getRequestOptions({...e.RETRY_CONFIG,url:this.regionalCredVerificationUrl.replace("{region}",this.region),method:"POST"}),n=[];return EG.Gaxios.mergeHeaders({"x-goog-cloud-target-resource":this.audience},t.headers).forEach((r,i)=>n.push({key:i,value:r})),encodeURIComponent(JSON.stringify({url:t.url,method:t.method,headers:n}))}};Dm.AwsClient=OS});var US=z(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.InvalidSubjectTokenError=xt.InvalidMessageFieldError=xt.InvalidCodeFieldError=xt.InvalidTokenTypeFieldError=xt.InvalidExpirationTimeFieldError=xt.InvalidSuccessFieldError=xt.InvalidVersionFieldError=xt.ExecutableResponseError=xt.ExecutableResponse=void 0;var Nm="urn:ietf:params:oauth:token-type:saml2",$S="urn:ietf:params:oauth:token-type:id_token",DS="urn:ietf:params:oauth:token-type:jwt",NS=class{static{a(this,"ExecutableResponse")}version;success;expirationTime;tokenType;errorCode;errorMessage;subjectToken;constructor(t){if(!t.version)throw new zm("Executable response must contain a 'version' field.");if(t.success===void 0)throw new Um("Executable response must contain a 'success' field.");if(this.version=t.version,this.success=t.success,this.success){if(this.expirationTime=t.expiration_time,this.tokenType=t.token_type,this.tokenType!==Nm&&this.tokenType!==$S&&this.tokenType!==DS)throw new Mm(`Executable response must contain a 'token_type' field when successful and it must be one of ${$S}, ${DS}, or ${Nm}.`);if(this.tokenType===Nm){if(!t.saml_response)throw new ju(`Executable response must contain a 'saml_response' field when token_type=${Nm}.`);this.subjectToken=t.saml_response}else{if(!t.id_token)throw new ju(`Executable response must contain a 'id_token' field when token_type=${$S} or ${DS}.`);this.subjectToken=t.id_token}}else{if(!t.code)throw new Lm("Executable response must contain a 'code' field when unsuccessful.");if(!t.message)throw new jm("Executable response must contain a 'message' field when unsuccessful.");this.errorCode=t.code,this.errorMessage=t.message}}isValid(){return!this.isExpired()&&this.success}isExpired(){return this.expirationTime!==void 0&&this.expirationTime<Math.round(Date.now()/1e3)}};xt.ExecutableResponse=NS;var Pn=class extends Error{static{a(this,"ExecutableResponseError")}constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}};xt.ExecutableResponseError=Pn;var zm=class extends Pn{static{a(this,"InvalidVersionFieldError")}};xt.InvalidVersionFieldError=zm;var Um=class extends Pn{static{a(this,"InvalidSuccessFieldError")}};xt.InvalidSuccessFieldError=Um;var zS=class extends Pn{static{a(this,"InvalidExpirationTimeFieldError")}};xt.InvalidExpirationTimeFieldError=zS;var Mm=class extends Pn{static{a(this,"InvalidTokenTypeFieldError")}};xt.InvalidTokenTypeFieldError=Mm;var Lm=class extends Pn{static{a(this,"InvalidCodeFieldError")}};xt.InvalidCodeFieldError=Lm;var jm=class extends Pn{static{a(this,"InvalidMessageFieldError")}};xt.InvalidMessageFieldError=jm;var ju=class extends Pn{static{a(this,"InvalidSubjectTokenError")}};xt.InvalidSubjectTokenError=ju});var jS=z(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});Qa.PluggableAuthHandler=Qa.ExecutableError=void 0;var Ai=US(),SG=require("child_process"),MS=require("fs"),Fm=class extends Error{static{a(this,"ExecutableError")}code;constructor(t,n){super(`The executable failed with exit code: ${n} and error message: ${t}.`),this.code=n,Object.setPrototypeOf(this,new.target.prototype)}};Qa.ExecutableError=Fm;var LS=class e{static{a(this,"PluggableAuthHandler")}commandComponents;timeoutMillis;outputFile;constructor(t){if(!t.command)throw new Error("No command provided.");if(this.commandComponents=e.parseCommand(t.command),this.timeoutMillis=t.timeoutMillis,!this.timeoutMillis)throw new Error("No timeoutMillis provided.");this.outputFile=t.outputFile}retrieveResponseFromExecutable(t){return new Promise((n,o)=>{let r=SG.spawn(this.commandComponents[0],this.commandComponents.slice(1),{env:{...process.env,...Object.fromEntries(t)}}),i="";r.stdout.on("data",u=>{i+=u}),r.stderr.on("data",u=>{i+=u});let s=setTimeout(()=>(r.removeAllListeners(),r.kill(),o(new Error("The executable failed to finish within the timeout specified."))),this.timeoutMillis);r.on("close",u=>{if(clearTimeout(s),u===0)try{let d=JSON.parse(i),f=new Ai.ExecutableResponse(d);return n(f)}catch(d){return d instanceof Ai.ExecutableResponseError?o(d):o(new Ai.ExecutableResponseError(`The executable returned an invalid response: ${i}`))}else return o(new Fm(i,u.toString()))})})}async retrieveCachedResponse(){if(!this.outputFile||this.outputFile.length===0)return;let t;try{t=await MS.promises.realpath(this.outputFile)}catch{return}if(!(await MS.promises.lstat(t)).isFile())return;let n=await MS.promises.readFile(t,{encoding:"utf8"});if(n!=="")try{let o=JSON.parse(n);return new Ai.ExecutableResponse(o).isValid()?new Ai.ExecutableResponse(o):void 0}catch(o){throw o instanceof Ai.ExecutableResponseError?o:new Ai.ExecutableResponseError(`The output file contained an invalid response: ${n}`)}}static parseCommand(t){let n=t.match(/(?:[^\s"]+|"[^"]*")+/g);if(!n)throw new Error(`Provided command: "${t}" could not be parsed.`);for(let o=0;o<n.length;o++)n[o][0]==='"'&&n[o].slice(-1)==='"'&&(n[o]=n[o].slice(1,-1));return n}};Qa.PluggableAuthHandler=LS});var BS=z(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.PluggableAuthClient=es.ExecutableError=void 0;var TG=Uo(),PG=US(),j$=jS(),wG=jS();Object.defineProperty(es,"ExecutableError",{enumerable:!0,get:a(function(){return wG.ExecutableError},"get")});var xG=30*1e3,F$=5*1e3,B$=120*1e3,AG="GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES",q$=1,FS=class extends TG.BaseExternalAccountClient{static{a(this,"PluggableAuthClient")}command;timeoutMillis;outputFile;handler;constructor(t){if(super(t),!t.credential_source.executable)throw new Error('No valid Pluggable Auth "credential_source" provided.');if(this.command=t.credential_source.executable.command,!this.command)throw new Error('No valid Pluggable Auth "credential_source" provided.');if(t.credential_source.executable.timeout_millis===void 0)this.timeoutMillis=xG;else if(this.timeoutMillis=t.credential_source.executable.timeout_millis,this.timeoutMillis<F$||this.timeoutMillis>B$)throw new Error(`Timeout must be between ${F$} and ${B$} milliseconds.`);this.outputFile=t.credential_source.executable.output_file,this.handler=new j$.PluggableAuthHandler({command:this.command,timeoutMillis:this.timeoutMillis,outputFile:this.outputFile}),this.credentialSourceType="executable"}async retrieveSubjectToken(){if(process.env[AG]!=="1")throw new Error("Pluggable Auth executables need to be explicitly allowed to run by setting the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment Variable to 1.");let t;if(this.outputFile&&(t=await this.handler.retrieveCachedResponse()),!t){let n=new Map;n.set("GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE",this.audience),n.set("GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE",this.subjectTokenType),n.set("GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE","0"),this.outputFile&&n.set("GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE",this.outputFile);let o=this.getServiceAccountEmail();o&&n.set("GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL",o),t=await this.handler.retrieveResponseFromExecutable(n)}if(t.version>q$)throw new Error(`Version of executable is not currently supported, maximum supported version is ${q$}.`);if(!t.success)throw new j$.ExecutableError(t.errorMessage,t.errorCode);if(this.outputFile&&!t.expirationTime)throw new PG.InvalidExpirationTimeFieldError("The executable response must contain the `expiration_time` field for successful responses when an output_file has been specified in the configuration.");if(t.isExpired())throw new Error("Executable response is expired.");return t.subjectToken}};es.PluggableAuthClient=FS});var VS=z(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});Bm.ExternalAccountClient=void 0;var IG=Uo(),RG=AS(),CG=kS(),OG=BS(),qS=class{static{a(this,"ExternalAccountClient")}constructor(){throw new Error("ExternalAccountClients should be initialized via: ExternalAccountClient.fromJSON(), directly via explicit constructors, eg. new AwsClient(options), new IdentityPoolClient(options), newPluggableAuthClientOptions, or via new GoogleAuth(options).getClient()")}static fromJSON(t){return t&&t.type===IG.EXTERNAL_ACCOUNT_TYPE?t.credential_source?.environment_id?new CG.AwsClient(t):t.credential_source?.executable?new OG.PluggableAuthClient(t):new RG.IdentityPoolClient(t):null}};Bm.ExternalAccountClient=qS});var ZS=z(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.ExternalAccountAuthorizedUserClient=ts.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=void 0;var G$=xr(),V$=hS(),H$=Pt(),kG=require("stream"),$G=Uo();ts.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE="external_account_authorized_user";var DG="https://sts.{universeDomain}/v1/oauthtoken",GS=class e extends V$.OAuthClientAuthHandler{static{a(this,"ExternalAccountAuthorizedUserHandler")}#e;constructor(t){super(t),this.#e=t.tokenRefreshEndpoint}async refreshToken(t,n){let o={...e.RETRY_CONFIG,url:this.#e,method:"POST",headers:n,data:new URLSearchParams({grant_type:"refresh_token",refresh_token:t})};G$.AuthClient.setMethodName(o,"refreshToken"),this.applyClientAuthenticationOptions(o);try{let r=await this.transporter.request(o),i=r.data;return i.res=r,i}catch(r){throw r instanceof H$.GaxiosError&&r.response?(0,V$.getErrorFromOAuthErrorResponse)(r.response.data,r):r}}},HS=class extends G$.AuthClient{static{a(this,"ExternalAccountAuthorizedUserClient")}cachedAccessToken;externalAccountAuthorizedUserHandler;refreshToken;constructor(t){super(t),t.universe_domain&&(this.universeDomain=t.universe_domain),this.refreshToken=t.refresh_token;let n={confidentialClientType:"basic",clientId:t.client_id,clientSecret:t.client_secret};this.externalAccountAuthorizedUserHandler=new GS({tokenRefreshEndpoint:t.token_url??DG.replace("{universeDomain}",this.universeDomain),transporter:this.transporter,clientAuthentication:n}),this.cachedAccessToken=null,this.quotaProjectId=t.quota_project_id,typeof t?.eagerRefreshThresholdMillis!="number"?this.eagerRefreshThresholdMillis=$G.EXPIRATION_TIME_OFFSET:this.eagerRefreshThresholdMillis=t.eagerRefreshThresholdMillis,this.forceRefreshOnFailure=!!t?.forceRefreshOnFailure}async getAccessToken(){return(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){let t=await this.getAccessToken(),n=new Headers({authorization:`Bearer ${t.token}`});return this.addSharedMetadataHeaders(n)}request(t,n){if(n)this.requestAsync(t).then(o=>n(null,o),o=>n(o,o.response));else return this.requestAsync(t)}async requestAsync(t,n=!1){let o;try{let r=await this.getRequestHeaders();t.headers=H$.Gaxios.mergeHeaders(t.headers),this.addUserProjectAndAuthHeaders(t.headers,r),o=await this.transporter.request(t)}catch(r){let i=r.response;if(i){let s=i.status,u=i.config.data instanceof kG.Readable;if(!n&&(s===401||s===403)&&!u&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(t,!0)}throw r}return o}async refreshAccessTokenAsync(){let t=await this.externalAccountAuthorizedUserHandler.refreshToken(this.refreshToken);return this.cachedAccessToken={access_token:t.access_token,expiry_date:new Date().getTime()+t.expires_in*1e3,res:t.res},t.refresh_token!==void 0&&(this.refreshToken=t.refresh_token),this.cachedAccessToken}isExpired(t){let n=new Date().getTime();return t.expiry_date?n>=t.expiry_date-this.eagerRefreshThresholdMillis:!1}};ts.ExternalAccountAuthorizedUserClient=HS});var J$=z(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.GoogleAuth=dn.GoogleAuthExceptionMessages=void 0;var NG=require("child_process"),Fu=require("fs"),zG=Pt(),Bu=Au(),UG=require("os"),WS=require("path"),MG=Iu(),LG=FE(),jG=qE(),FG=VE(),rs=uS(),Z$=dS(),ns=fS(),BG=VS(),qu=Uo(),KS=xr(),W$=ZS(),K$=sn();dn.GoogleAuthExceptionMessages={API_KEY_WITH_CREDENTIALS:"API Keys and Credentials are mutually exclusive authentication methods and cannot be used together.",NO_PROJECT_ID_FOUND:`Unable to detect a Project Id in the current environment.
|
|
50
50
|
To learn more about authentication and Google APIs, visit:
|
|
51
51
|
https://cloud.google.com/docs/authentication/getting-started`,NO_CREDENTIALS_FOUND:`Unable to find credentials in current environment.
|
|
52
52
|
To learn more about authentication and Google APIs, visit:
|
|
53
53
|
https://cloud.google.com/docs/authentication/getting-started`,NO_ADC_FOUND:"Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.",NO_UNIVERSE_DOMAIN_FOUND:`Unable to detect a Universe Domain in the current environment.
|
|
54
54
|
To learn more about Universe Domain retrieval, visit:
|
|
55
|
-
https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys`};var Jf=class{static{o(this,"GoogleAuth")}checkIsGCE=void 0;useJWTAccessWithScope;defaultServicePath;get isGCE(){return this.checkIsGCE}_findProjectIdPromise;_cachedProjectId;jsonContent=null;apiKey;cachedCredential=null;#e=null;defaultScopes;keyFilename;scopes;clientOptions={};constructor(e={}){if(this._cachedProjectId=e.projectId||null,this.cachedCredential=e.authClient||null,this.keyFilename=e.keyFilename||e.keyFile,this.scopes=e.scopes,this.clientOptions=e.clientOptions||{},this.jsonContent=e.credentials||null,this.apiKey=e.apiKey||this.clientOptions.apiKey||null,this.apiKey&&(this.jsonContent||this.clientOptions.credentials))throw new RangeError(zr.GoogleAuthExceptionMessages.API_KEY_WITH_CREDENTIALS);e.universeDomain&&(this.clientOptions.universeDomain=e.universeDomain)}setGapicJWTValues(e){e.defaultServicePath=this.defaultServicePath,e.useJWTAccessWithScope=this.useJWTAccessWithScope,e.defaultScopes=this.defaultScopes}getProjectId(e){if(e)this.getProjectIdAsync().then(r=>e(null,r),e);else return this.getProjectIdAsync()}async getProjectIdOptional(){try{return await this.getProjectId()}catch(e){if(e instanceof Error&&e.message===zr.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND)return null;throw e}}async findAndCacheProjectId(){let e=null;if(e||=await this.getProductionProjectId(),e||=await this.getFileProjectId(),e||=await this.getDefaultServiceProjectId(),e||=await this.getGCEProjectId(),e||=await this.getExternalAccountClientProjectId(),e)return this._cachedProjectId=e,e;throw new Error(zr.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND)}async getProjectIdAsync(){return this._cachedProjectId?this._cachedProjectId:(this._findProjectIdPromise||(this._findProjectIdPromise=this.findAndCacheProjectId()),this._findProjectIdPromise)}async getUniverseDomainFromMetadataServer(){let e;try{e=await Fa.universe("universe-domain"),e||=Kf.DEFAULT_UNIVERSE}catch(r){if(r&&r?.response?.status===404)e=Kf.DEFAULT_UNIVERSE;else throw r}return e}async getUniverseDomain(){let e=(0,MT.originalOrCamelOptions)(this.clientOptions).get("universe_domain");try{e??=(await this.getClient()).universeDomain}catch{e??=Kf.DEFAULT_UNIVERSE}return e}getAnyScopes(){return this.scopes||this.defaultScopes}getApplicationDefault(e={},r){let n;if(typeof e=="function"?r=e:n=e,r)this.getApplicationDefaultAsync(n).then(i=>r(null,i.credential,i.projectId),r);else return this.getApplicationDefaultAsync(n)}async getApplicationDefaultAsync(e={}){if(this.cachedCredential)return await this.#t(this.cachedCredential,null);let r;if(r=await this._tryGetApplicationCredentialsFromEnvironmentVariable(e),r)return r instanceof Pi.JWT?r.scopes=this.scopes:r instanceof qa.BaseExternalAccountClient&&(r.scopes=this.getAnyScopes()),await this.#t(r);if(r=await this._tryGetApplicationCredentialsFromWellKnownFile(e),r)return r instanceof Pi.JWT?r.scopes=this.scopes:r instanceof qa.BaseExternalAccountClient&&(r.scopes=this.getAnyScopes()),await this.#t(r);if(await this._checkIsGCE())return e.scopes=this.getAnyScopes(),await this.#t(new bU.Compute(e));throw new Error(zr.GoogleAuthExceptionMessages.NO_ADC_FOUND)}async#t(e,r=process.env.GOOGLE_CLOUD_QUOTA_PROJECT||null){let n=await this.getProjectIdOptional();return r&&(e.quotaProjectId=r),this.cachedCredential=e,{credential:e,projectId:n}}async _checkIsGCE(){return this.checkIsGCE===void 0&&(this.checkIsGCE=Fa.getGCPResidency()||await Fa.isAvailable()),this.checkIsGCE}async _tryGetApplicationCredentialsFromEnvironmentVariable(e){let r=process.env.GOOGLE_APPLICATION_CREDENTIALS||process.env.google_application_credentials;if(!r||r.length===0)return null;try{return this._getApplicationCredentialsFromFilePath(r,e)}catch(n){throw n instanceof Error&&(n.message=`Unable to read the credential file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable: ${n.message}`),n}}async _tryGetApplicationCredentialsFromWellKnownFile(e){let r=null;if(this._isWindows())r=process.env.APPDATA;else{let i=process.env.HOME;i&&(r=Zf.join(i,".config"))}return r&&(r=Zf.join(r,"gcloud","application_default_credentials.json"),ja.existsSync(r)||(r=null)),r?await this._getApplicationCredentialsFromFilePath(r,e):null}async _getApplicationCredentialsFromFilePath(e,r={}){if(!e||e.length===0)throw new Error("The file path is invalid.");try{if(e=ja.realpathSync(e),!ja.lstatSync(e).isFile())throw new Error}catch(i){throw i instanceof Error&&(i.message=`The file at ${e} does not exist, or it is not a file. ${i.message}`),i}let n=ja.createReadStream(e);return this.fromStream(n,r)}fromImpersonatedJSON(e){if(!e)throw new Error("Must pass in a JSON object containing an impersonated refresh token");if(e.type!==xi.IMPERSONATED_ACCOUNT_TYPE)throw new Error(`The incoming JSON object does not have the "${xi.IMPERSONATED_ACCOUNT_TYPE}" type`);if(!e.source_credentials)throw new Error("The incoming JSON object does not contain a source_credentials field");if(!e.service_account_impersonation_url)throw new Error("The incoming JSON object does not contain a service_account_impersonation_url field");let r=this.fromJSON(e.source_credentials);if(e.service_account_impersonation_url?.length>256)throw new RangeError(`Target principal is too long: ${e.service_account_impersonation_url}`);let n=/(?<target>[^/]+):(generateAccessToken|generateIdToken)$/.exec(e.service_account_impersonation_url)?.groups?.target;if(!n)throw new RangeError(`Cannot extract target principal from ${e.service_account_impersonation_url}`);let i=(this.scopes||e.scopes||this.defaultScopes)??[];return new xi.Impersonated({...e,sourceClient:r,targetPrincipal:n,targetScopes:Array.isArray(i)?i:[i]})}fromJSON(e,r={}){let n,i=(0,MT.originalOrCamelOptions)(r).get("universe_domain");return e.type===zT.USER_REFRESH_ACCOUNT_TYPE?(n=new zT.UserRefreshClient(r),n.fromJSON(e)):e.type===xi.IMPERSONATED_ACCOUNT_TYPE?n=this.fromImpersonatedJSON(e):e.type===qa.EXTERNAL_ACCOUNT_TYPE?(n=wU.ExternalAccountClient.fromJSON({...e,...r}),n.scopes=this.getAnyScopes()):e.type===UT.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE?n=new UT.ExternalAccountAuthorizedUserClient({...e,...r}):(r.scopes=this.scopes,n=new Pi.JWT(r),this.setGapicJWTValues(n),n.fromJSON(e)),i&&(n.universeDomain=i),n}_cacheClientFromJSON(e,r){let n=this.fromJSON(e,r);return this.jsonContent=e,this.cachedCredential=n,n}fromStream(e,r={},n){let i={};if(typeof r=="function"?n=r:i=r,n)this.fromStreamAsync(e,i).then(s=>n(null,s),n);else return this.fromStreamAsync(e,i)}fromStreamAsync(e,r){return new Promise((n,i)=>{if(!e)throw new Error("Must pass in a stream containing the Google auth settings.");let s=[];e.setEncoding("utf8").on("error",i).on("data",c=>s.push(c)).on("end",()=>{try{try{let c=JSON.parse(s.join("")),d=this._cacheClientFromJSON(c,r);return n(d)}catch(c){if(!this.keyFilename)throw c;let d=new Pi.JWT({...this.clientOptions,keyFile:this.keyFilename});return this.cachedCredential=d,this.setGapicJWTValues(d),n(d)}}catch(c){return i(c)}})})}fromAPIKey(e,r={}){return new Pi.JWT({...r,apiKey:e})}_isWindows(){let e=vU.platform();return!!(e&&e.length>=3&&e.substring(0,3).toLowerCase()==="win")}async getDefaultServiceProjectId(){return new Promise(e=>{(0,gU.exec)("gcloud config config-helper --format json",(r,n)=>{if(!r&&n)try{let i=JSON.parse(n).configuration.properties.core.project;e(i);return}catch{}e(null)})})}getProductionProjectId(){return process.env.GCLOUD_PROJECT||process.env.GOOGLE_CLOUD_PROJECT||process.env.gcloud_project||process.env.google_cloud_project}async getFileProjectId(){if(this.cachedCredential)return this.cachedCredential.projectId;if(this.keyFilename){let r=await this.getClient();if(r&&r.projectId)return r.projectId}let e=await this._tryGetApplicationCredentialsFromEnvironmentVariable();return e?e.projectId:null}async getExternalAccountClientProjectId(){return!this.jsonContent||this.jsonContent.type!==qa.EXTERNAL_ACCOUNT_TYPE?null:await(await this.getClient()).getProjectId()}async getGCEProjectId(){try{return await Fa.project("project-id")}catch{return null}}getCredentials(e){if(e)this.getCredentialsAsync().then(r=>e(null,r),e);else return this.getCredentialsAsync()}async getCredentialsAsync(){let e=await this.getClient();if(e instanceof xi.Impersonated)return{client_email:e.getTargetPrincipal()};if(e instanceof qa.BaseExternalAccountClient){let r=e.getServiceAccountEmail();if(r)return{client_email:r,universe_domain:e.universeDomain}}if(this.jsonContent)return{client_email:this.jsonContent.client_email,private_key:this.jsonContent.private_key,universe_domain:this.jsonContent.universe_domain};if(await this._checkIsGCE()){let[r,n]=await Promise.all([Fa.instance("service-accounts/default/email"),this.getUniverseDomain()]);return{client_email:r,universe_domain:n}}throw new Error(zr.GoogleAuthExceptionMessages.NO_CREDENTIALS_FOUND)}async getClient(){if(this.cachedCredential)return this.cachedCredential;this.#e=this.#e||this.#r();try{return await this.#e}finally{this.#e=null}}async#r(){if(this.jsonContent)return this._cacheClientFromJSON(this.jsonContent,this.clientOptions);if(this.keyFilename){let e=Zf.resolve(this.keyFilename),r=ja.createReadStream(e);return await this.fromStreamAsync(r,this.clientOptions)}else if(this.apiKey){let e=await this.fromAPIKey(this.apiKey,this.clientOptions);e.scopes=this.scopes;let{credential:r}=await this.#t(e);return r}else{let{credential:e}=await this.getApplicationDefaultAsync(this.clientOptions);return e}}async getIdTokenClient(e){let r=await this.getClient();if(!("fetchIdToken"in r))throw new Error("Cannot fetch ID token in this environment, use GCE or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account credentials JSON file.");return new EU.IdTokenClient({targetAudience:e,idTokenProvider:r})}async getAccessToken(){return(await(await this.getClient()).getAccessToken()).token}async getRequestHeaders(e){return(await this.getClient()).getRequestHeaders(e)}async authorizeRequest(e={}){let r=e.url,i=await(await this.getClient()).getRequestHeaders(r);return e.headers=yU.Gaxios.mergeHeaders(e.headers,i),e}async fetch(...e){return(await this.getClient()).fetch(...e)}async request(e){return(await this.getClient()).request(e)}getEnv(){return(0,SU.getEnv)()}async sign(e,r){let n=await this.getClient(),i=await this.getUniverseDomain();if(r=r||`https://iamcredentials.${i}/v1/projects/-/serviceAccounts/`,n instanceof xi.Impersonated)return(await n.sign(e)).signedBlob;let s=(0,_U.createCrypto)();if(n instanceof Pi.JWT&&n.key)return await s.sign(n.key,e);let c=await this.getCredentials();if(!c.client_email)throw new Error("Cannot sign data without `client_email`.");return this.signBlob(s,c.client_email,e,r)}async signBlob(e,r,n,i){let s=new URL(i+`${r}:signBlob`);return(await this.request({method:"POST",url:s.href,data:{payload:e.encodeBase64StringUtf8(n)},retry:!0,retryConfig:{httpMethodsToRetry:["POST"]}})).data.signedBlob}};zr.GoogleAuth=Jf});var jT=D(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});Pc.IAMAuth=void 0;var Yf=class{static{o(this,"IAMAuth")}selector;token;constructor(e,r){this.selector=e,this.token=r,this.selector=e,this.token=r}getRequestHeaders(){return{"x-goog-iam-authority-selector":this.selector,"x-goog-iam-authorization-token":this.token}}};Pc.IAMAuth=Yf});var FT=D(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.DownscopedClient=Yr.EXPIRATION_TIME_OFFSET=Yr.MAX_ACCESS_BOUNDARY_RULES_COUNT=void 0;var TU=ht(),PU=require("stream"),Xf=nr(),xU=ic(),AU="urn:ietf:params:oauth:grant-type:token-exchange",IU="urn:ietf:params:oauth:token-type:access_token",RU="urn:ietf:params:oauth:token-type:access_token";Yr.MAX_ACCESS_BOUNDARY_RULES_COUNT=10;Yr.EXPIRATION_TIME_OFFSET=300*1e3;var Qf=class extends Xf.AuthClient{static{o(this,"DownscopedClient")}authClient;credentialAccessBoundary;cachedDownscopedAccessToken;stsCredential;constructor(e,r={accessBoundary:{accessBoundaryRules:[]}}){if(super(e instanceof Xf.AuthClient?{}:e),e instanceof Xf.AuthClient?(this.authClient=e,this.credentialAccessBoundary=r):(this.authClient=e.authClient,this.credentialAccessBoundary=e.credentialAccessBoundary),this.credentialAccessBoundary.accessBoundary.accessBoundaryRules.length===0)throw new Error("At least one access boundary rule needs to be defined.");if(this.credentialAccessBoundary.accessBoundary.accessBoundaryRules.length>Yr.MAX_ACCESS_BOUNDARY_RULES_COUNT)throw new Error(`The provided access boundary has more than ${Yr.MAX_ACCESS_BOUNDARY_RULES_COUNT} access boundary rules.`);for(let n of this.credentialAccessBoundary.accessBoundary.accessBoundaryRules)if(n.availablePermissions.length===0)throw new Error("At least one permission should be defined in access boundary rules.");this.stsCredential=new xU.StsCredentials({tokenExchangeEndpoint:`https://sts.${this.universeDomain}/v1/token`}),this.cachedDownscopedAccessToken=null}setCredentials(e){if(!e.expiry_date)throw new Error("The access token expiry_date field is missing in the provided credentials.");super.setCredentials(e),this.cachedDownscopedAccessToken=e}async getAccessToken(){return(!this.cachedDownscopedAccessToken||this.isExpired(this.cachedDownscopedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedDownscopedAccessToken.access_token,expirationTime:this.cachedDownscopedAccessToken.expiry_date,res:this.cachedDownscopedAccessToken.res}}async getRequestHeaders(){let e=await this.getAccessToken(),r=new Headers({authorization:`Bearer ${e.token}`});return this.addSharedMetadataHeaders(r)}request(e,r){if(r)this.requestAsync(e).then(n=>r(null,n),n=>r(n,n.response));else return this.requestAsync(e)}async requestAsync(e,r=!1){let n;try{let i=await this.getRequestHeaders();e.headers=TU.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,i),n=await this.transporter.request(e)}catch(i){let s=i.response;if(s){let c=s.status,d=s.config.data instanceof PU.Readable;if(!r&&(c===401||c===403)&&!d&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(e,!0)}throw i}return n}async refreshAccessTokenAsync(){let e=(await this.authClient.getAccessToken()).token,r={grantType:AU,requestedTokenType:IU,subjectToken:e,subjectTokenType:RU},n=await this.stsCredential.exchangeToken(r,void 0,this.credentialAccessBoundary),i=this.authClient.credentials?.expiry_date||null,s=n.expires_in?new Date().getTime()+n.expires_in*1e3:i;return this.cachedDownscopedAccessToken={access_token:n.access_token,expiry_date:s,res:n.res},this.credentials={},Object.assign(this.credentials,this.cachedDownscopedAccessToken),delete this.credentials.res,this.emit("tokens",{refresh_token:null,expiry_date:this.cachedDownscopedAccessToken.expiry_date,access_token:this.cachedDownscopedAccessToken.access_token,token_type:"Bearer",id_token:null}),this.cachedDownscopedAccessToken}isExpired(e){let r=new Date().getTime();return e.expiry_date?r>=e.expiry_date-this.eagerRefreshThresholdMillis:!1}};Yr.DownscopedClient=Qf});var qT=D(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.PassThroughClient=void 0;var CU=nr(),em=class extends CU.AuthClient{static{o(this,"PassThroughClient")}async request(e){return this.transporter.request(e)}async getAccessToken(){return{}}async getRequestHeaders(){return new Headers}};xc.PassThroughClient=em});var Ba=D(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.GoogleAuth=de.auth=de.PassThroughClient=de.ExternalAccountAuthorizedUserClient=de.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=de.ExecutableError=de.PluggableAuthClient=de.DownscopedClient=de.BaseExternalAccountClient=de.ExternalAccountClient=de.IdentityPoolClient=de.AwsRequestSigner=de.AwsClient=de.UserRefreshClient=de.LoginTicket=de.ClientAuthentication=de.OAuth2Client=de.CodeChallengeMethod=de.Impersonated=de.JWT=de.JWTAccess=de.IdTokenClient=de.IAMAuth=de.GCPEnv=de.Compute=de.DEFAULT_UNIVERSE=de.AuthClient=de.gaxios=de.gcpMetadata=void 0;var BT=LT();Object.defineProperty(de,"GoogleAuth",{enumerable:!0,get:o(function(){return BT.GoogleAuth},"get")});de.gcpMetadata=xa();de.gaxios=ht();var VT=nr();Object.defineProperty(de,"AuthClient",{enumerable:!0,get:o(function(){return VT.AuthClient},"get")});Object.defineProperty(de,"DEFAULT_UNIVERSE",{enumerable:!0,get:o(function(){return VT.DEFAULT_UNIVERSE},"get")});var OU=jp();Object.defineProperty(de,"Compute",{enumerable:!0,get:o(function(){return OU.Compute},"get")});var kU=Bp();Object.defineProperty(de,"GCPEnv",{enumerable:!0,get:o(function(){return kU.GCPEnv},"get")});var $U=jT();Object.defineProperty(de,"IAMAuth",{enumerable:!0,get:o(function(){return $U.IAMAuth},"get")});var DU=qp();Object.defineProperty(de,"IdTokenClient",{enumerable:!0,get:o(function(){return DU.IdTokenClient},"get")});var NU=sf();Object.defineProperty(de,"JWTAccess",{enumerable:!0,get:o(function(){return NU.JWTAccess},"get")});var zU=cf();Object.defineProperty(de,"JWT",{enumerable:!0,get:o(function(){return zU.JWT},"get")});var UU=ff();Object.defineProperty(de,"Impersonated",{enumerable:!0,get:o(function(){return UU.Impersonated},"get")});var tm=wo();Object.defineProperty(de,"CodeChallengeMethod",{enumerable:!0,get:o(function(){return tm.CodeChallengeMethod},"get")});Object.defineProperty(de,"OAuth2Client",{enumerable:!0,get:o(function(){return tm.OAuth2Client},"get")});Object.defineProperty(de,"ClientAuthentication",{enumerable:!0,get:o(function(){return tm.ClientAuthentication},"get")});var MU=zp();Object.defineProperty(de,"LoginTicket",{enumerable:!0,get:o(function(){return MU.LoginTicket},"get")});var LU=df();Object.defineProperty(de,"UserRefreshClient",{enumerable:!0,get:o(function(){return LU.UserRefreshClient},"get")});var jU=kf();Object.defineProperty(de,"AwsClient",{enumerable:!0,get:o(function(){return jU.AwsClient},"get")});var FU=Rf();Object.defineProperty(de,"AwsRequestSigner",{enumerable:!0,get:o(function(){return FU.AwsRequestSigner},"get")});var qU=Af();Object.defineProperty(de,"IdentityPoolClient",{enumerable:!0,get:o(function(){return qU.IdentityPoolClient},"get")});var BU=Vf();Object.defineProperty(de,"ExternalAccountClient",{enumerable:!0,get:o(function(){return BU.ExternalAccountClient},"get")});var VU=Xn();Object.defineProperty(de,"BaseExternalAccountClient",{enumerable:!0,get:o(function(){return VU.BaseExternalAccountClient},"get")});var GU=FT();Object.defineProperty(de,"DownscopedClient",{enumerable:!0,get:o(function(){return GU.DownscopedClient},"get")});var GT=qf();Object.defineProperty(de,"PluggableAuthClient",{enumerable:!0,get:o(function(){return GT.PluggableAuthClient},"get")});Object.defineProperty(de,"ExecutableError",{enumerable:!0,get:o(function(){return GT.ExecutableError},"get")});var HT=Wf();Object.defineProperty(de,"EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE",{enumerable:!0,get:o(function(){return HT.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE},"get")});Object.defineProperty(de,"ExternalAccountAuthorizedUserClient",{enumerable:!0,get:o(function(){return HT.ExternalAccountAuthorizedUserClient},"get")});var HU=qT();Object.defineProperty(de,"PassThroughClient",{enumerable:!0,get:o(function(){return HU.PassThroughClient},"get")});var WU=new BT.GoogleAuth;de.auth=WU});var Sn=D((nm,om)=>{(function(t,e){typeof nm=="object"&&typeof om<"u"?om.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(nm,(function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",i="second",s="minute",c="hour",d="day",p="week",m="month",y="quarter",h="year",f="date",l="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,E={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:o(function(re){var V=["th","st","nd","rd"],B=re%100;return"["+re+(V[(B-20)%10]||V[B]||V[0])+"]"},"ordinal")},b=o(function(re,V,B){var X=String(re);return!X||X.length>=V?re:""+Array(V+1-X.length).join(B)+re},"m"),C={s:b,z:o(function(re){var V=-re.utcOffset(),B=Math.abs(V),X=Math.floor(B/60),Y=B%60;return(V<=0?"+":"-")+b(X,2,"0")+":"+b(Y,2,"0")},"z"),m:o(function re(V,B){if(V.date()<B.date())return-re(B,V);var X=12*(B.year()-V.year())+(B.month()-V.month()),Y=V.clone().add(X,m),ie=B-Y<0,ue=V.clone().add(X+(ie?-1:1),m);return+(-(X+(B-Y)/(ie?Y-ue:ue-Y))||0)},"t"),a:o(function(re){return re<0?Math.ceil(re)||0:Math.floor(re)},"a"),p:o(function(re){return{M:m,y:h,w:p,d,D:f,h:c,m:s,s:i,ms:n,Q:y}[re]||String(re||"").toLowerCase().replace(/s$/,"")},"p"),u:o(function(re){return re===void 0},"u")},U="en",J={};J[U]=E;var Z=o(function(re){return re instanceof Q},"p"),H=o(function re(V,B,X){var Y;if(!V)return U;if(typeof V=="string"){var ie=V.toLowerCase();J[ie]&&(Y=ie),B&&(J[ie]=B,Y=ie);var ue=V.split("-");if(!Y&&ue.length>1)return re(ue[0])}else{var Ce=V.name;J[Ce]=V,Y=Ce}return!X&&Y&&(U=Y),Y||!X&&U},"t"),K=o(function(re,V){if(Z(re))return re.clone();var B=typeof V=="object"?V:{};return B.date=re,B.args=arguments,new Q(B)},"w"),te=C;te.l=H,te.i=Z,te.w=function(re,V){return K(re,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var Q=(function(){function re(B){this.$L=H(B.locale,null,!0),this.parse(B)}o(re,"M");var V=re.prototype;return V.parse=function(B){this.$d=(function(X){var Y=X.date,ie=X.utc;if(Y===null)return new Date(NaN);if(te.u(Y))return new Date;if(Y instanceof Date)return new Date(Y);if(typeof Y=="string"&&!/Z$/i.test(Y)){var ue=Y.match(g);if(ue){var Ce=ue[2]-1||0,De=(ue[7]||"0").substring(0,3);return ie?new Date(Date.UTC(ue[1],Ce,ue[3]||1,ue[4]||0,ue[5]||0,ue[6]||0,De)):new Date(ue[1],Ce,ue[3]||1,ue[4]||0,ue[5]||0,ue[6]||0,De)}}return new Date(Y)})(B),this.$x=B.x||{},this.init()},V.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},V.$utils=function(){return te},V.isValid=function(){return this.$d.toString()!==l},V.isSame=function(B,X){var Y=K(B);return this.startOf(X)<=Y&&Y<=this.endOf(X)},V.isAfter=function(B,X){return K(B)<this.startOf(X)},V.isBefore=function(B,X){return this.endOf(X)<K(B)},V.$g=function(B,X,Y){return te.u(B)?this[X]:this.set(Y,B)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(B,X){var Y=this,ie=!!te.u(X)||X,ue=te.p(B),Ce=o(function(Ht,We){var Ye=te.w(Y.$u?Date.UTC(Y.$y,We,Ht):new Date(Y.$y,We,Ht),Y);return ie?Ye:Ye.endOf(d)},"l"),De=o(function(Ht,We){return te.w(Y.toDate()[Ht].apply(Y.toDate("s"),(ie?[0,0,0,0]:[23,59,59,999]).slice(We)),Y)},"$"),Ke=this.$W,et=this.$M,wt=this.$D,ee="set"+(this.$u?"UTC":"");switch(ue){case h:return ie?Ce(1,0):Ce(31,11);case m:return ie?Ce(1,et):Ce(0,et+1);case p:var lt=this.$locale().weekStart||0,mt=(Ke<lt?Ke+7:Ke)-lt;return Ce(ie?wt-mt:wt+(6-mt),et);case d:case f:return De(ee+"Hours",0);case c:return De(ee+"Minutes",1);case s:return De(ee+"Seconds",2);case i:return De(ee+"Milliseconds",3);default:return this.clone()}},V.endOf=function(B){return this.startOf(B,!1)},V.$set=function(B,X){var Y,ie=te.p(B),ue="set"+(this.$u?"UTC":""),Ce=(Y={},Y[d]=ue+"Date",Y[f]=ue+"Date",Y[m]=ue+"Month",Y[h]=ue+"FullYear",Y[c]=ue+"Hours",Y[s]=ue+"Minutes",Y[i]=ue+"Seconds",Y[n]=ue+"Milliseconds",Y)[ie],De=ie===d?this.$D+(X-this.$W):X;if(ie===m||ie===h){var Ke=this.clone().set(f,1);Ke.$d[Ce](De),Ke.init(),this.$d=Ke.set(f,Math.min(this.$D,Ke.daysInMonth())).$d}else Ce&&this.$d[Ce](De);return this.init(),this},V.set=function(B,X){return this.clone().$set(B,X)},V.get=function(B){return this[te.p(B)]()},V.add=function(B,X){var Y,ie=this;B=Number(B);var ue=te.p(X),Ce=o(function(et){var wt=K(ie);return te.w(wt.date(wt.date()+Math.round(et*B)),ie)},"y");if(ue===m)return this.set(m,this.$M+B);if(ue===h)return this.set(h,this.$y+B);if(ue===d)return Ce(1);if(ue===p)return Ce(7);var De=(Y={},Y[s]=e,Y[c]=r,Y[i]=t,Y)[ue]||1,Ke=this.$d.getTime()+B*De;return te.w(Ke,this)},V.subtract=function(B,X){return this.add(-1*B,X)},V.format=function(B){var X=this,Y=this.$locale();if(!this.isValid())return Y.invalidDate||l;var ie=B||"YYYY-MM-DDTHH:mm:ssZ",ue=te.z(this),Ce=this.$H,De=this.$m,Ke=this.$M,et=Y.weekdays,wt=Y.months,ee=Y.meridiem,lt=o(function(We,Ye,S,P){return We&&(We[Ye]||We(X,ie))||S[Ye].slice(0,P)},"h"),mt=o(function(We){return te.s(Ce%12||12,We,"0")},"d"),Ht=ee||function(We,Ye,S){var P=We<12?"AM":"PM";return S?P.toLowerCase():P};return ie.replace(v,(function(We,Ye){return Ye||(function(S){switch(S){case"YY":return String(X.$y).slice(-2);case"YYYY":return te.s(X.$y,4,"0");case"M":return Ke+1;case"MM":return te.s(Ke+1,2,"0");case"MMM":return lt(Y.monthsShort,Ke,wt,3);case"MMMM":return lt(wt,Ke);case"D":return X.$D;case"DD":return te.s(X.$D,2,"0");case"d":return String(X.$W);case"dd":return lt(Y.weekdaysMin,X.$W,et,2);case"ddd":return lt(Y.weekdaysShort,X.$W,et,3);case"dddd":return et[X.$W];case"H":return String(Ce);case"HH":return te.s(Ce,2,"0");case"h":return mt(1);case"hh":return mt(2);case"a":return Ht(Ce,De,!0);case"A":return Ht(Ce,De,!1);case"m":return String(De);case"mm":return te.s(De,2,"0");case"s":return String(X.$s);case"ss":return te.s(X.$s,2,"0");case"SSS":return te.s(X.$ms,3,"0");case"Z":return ue}return null})(We)||ue.replace(":","")}))},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(B,X,Y){var ie,ue=this,Ce=te.p(X),De=K(B),Ke=(De.utcOffset()-this.utcOffset())*e,et=this-De,wt=o(function(){return te.m(ue,De)},"D");switch(Ce){case h:ie=wt()/12;break;case m:ie=wt();break;case y:ie=wt()/3;break;case p:ie=(et-Ke)/6048e5;break;case d:ie=(et-Ke)/864e5;break;case c:ie=et/r;break;case s:ie=et/e;break;case i:ie=et/t;break;default:ie=et}return Y?ie:te.a(ie)},V.daysInMonth=function(){return this.endOf(m).$D},V.$locale=function(){return J[this.$L]},V.locale=function(B,X){if(!B)return this.$L;var Y=this.clone(),ie=H(B,X,!0);return ie&&(Y.$L=ie),Y},V.clone=function(){return te.w(this.$d,this)},V.toDate=function(){return new Date(this.valueOf())},V.toJSON=function(){return this.isValid()?this.toISOString():null},V.toISOString=function(){return this.$d.toISOString()},V.toString=function(){return this.$d.toUTCString()},re})(),xe=Q.prototype;return K.prototype=xe,[["$ms",n],["$s",i],["$m",s],["$H",c],["$W",d],["$M",m],["$y",h],["$D",f]].forEach((function(re){xe[re[1]]=function(V){return this.$g(V,re[0],re[1])}})),K.extend=function(re,V){return re.$i||(re(V,Q,K),re.$i=!0),K},K.locale=H,K.isDayjs=Z,K.unix=function(re){return K(1e3*re)},K.en=J[U],K.Ls=J,K.p={},K}))});var WT=D(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});im.getAPI=ZU;function ZU(t,e,r,n){let i;if(typeof e=="string")i=e,e={};else if(typeof e=="object")i=e.version,delete e.version;else throw new Error("Argument error: Accepts only string or object");try{let s=r[i],c=new s(e,n);return Object.freeze(c)}catch(s){throw new Error(`Unable to load endpoint ${t}("${i}"): ${s.message}`)}}o(ZU,"getAPI")});var KT=D((OQ,ZT)=>{ZT.exports=require("util").inspect});var Za=D((kQ,hP)=>{var hm=typeof Map=="function"&&Map.prototype,am=Object.getOwnPropertyDescriptor&&hm?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Rc=hm&&am&&typeof am.get=="function"?am.get:null,JT=hm&&Map.prototype.forEach,gm=typeof Set=="function"&&Set.prototype,sm=Object.getOwnPropertyDescriptor&&gm?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Cc=gm&&sm&&typeof sm.get=="function"?sm.get:null,YT=gm&&Set.prototype.forEach,KU=typeof WeakMap=="function"&&WeakMap.prototype,Ga=KU?WeakMap.prototype.has:null,JU=typeof WeakSet=="function"&&WeakSet.prototype,Ha=JU?WeakSet.prototype.has:null,YU=typeof WeakRef=="function"&&WeakRef.prototype,XT=YU?WeakRef.prototype.deref:null,XU=Boolean.prototype.valueOf,QU=Object.prototype.toString,eM=Function.prototype.toString,tM=String.prototype.match,ym=String.prototype.slice,Qn=String.prototype.replace,rM=String.prototype.toUpperCase,QT=String.prototype.toLowerCase,uP=RegExp.prototype.test,eP=Array.prototype.concat,Xr=Array.prototype.join,nM=Array.prototype.slice,tP=Math.floor,lm=typeof BigInt=="function"?BigInt.prototype.valueOf:null,um=Object.getOwnPropertySymbols,dm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ai=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Wa=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ai||!0)?Symbol.toStringTag:null,cP=Object.prototype.propertyIsEnumerable,rP=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function nP(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||uP.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-tP(-t):tP(t);if(n!==t){var i=String(n),s=ym.call(e,i.length+1);return Qn.call(i,r,"$&_")+"."+Qn.call(Qn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Qn.call(e,r,"$&_")}o(nP,"addNumericSeparator");var pm=KT(),oP=pm.custom,iP=pP(oP)?oP:null,lP={__proto__:null,double:'"',single:"'"},oM={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};hP.exports=o(function t(e,r,n,i){var s=r||{};if(wn(s,"quoteStyle")&&!wn(lP,s.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(wn(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=wn(s,"customInspect")?s.customInspect:!0;if(typeof c!="boolean"&&c!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(wn(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(wn(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return mP(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var p=String(e);return d?nP(e,p):p}if(typeof e=="bigint"){var m=String(e)+"n";return d?nP(e,m):m}var y=typeof s.depth>"u"?5:s.depth;if(typeof n>"u"&&(n=0),n>=y&&y>0&&typeof e=="object")return fm(e)?"[Array]":"[Object]";var h=SM(s,n);if(typeof i>"u")i=[];else if(fP(i,e)>=0)return"[Circular]";function f(B,X,Y){if(X&&(i=nM.call(i),i.push(X)),Y){var ie={depth:s.depth};return wn(s,"quoteStyle")&&(ie.quoteStyle=s.quoteStyle),t(B,ie,n+1,i)}return t(B,s,n+1,i)}if(o(f,"inspect"),typeof e=="function"&&!aP(e)){var l=fM(e),g=Ic(e,f);return"[Function"+(l?": "+l:" (anonymous)")+"]"+(g.length>0?" { "+Xr.call(g,", ")+" }":"")}if(pP(e)){var v=Ai?Qn.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):dm.call(e);return typeof e=="object"&&!Ai?Va(v):v}if(_M(e)){for(var E="<"+QT.call(String(e.nodeName)),b=e.attributes||[],C=0;C<b.length;C++)E+=" "+b[C].name+"="+dP(iM(b[C].value),"double",s);return E+=">",e.childNodes&&e.childNodes.length&&(E+="..."),E+="</"+QT.call(String(e.nodeName))+">",E}if(fm(e)){if(e.length===0)return"[]";var U=Ic(e,f);return h&&!EM(U)?"["+mm(U,h)+"]":"[ "+Xr.call(U,", ")+" ]"}if(sM(e)){var J=Ic(e,f);return!("cause"in Error.prototype)&&"cause"in e&&!cP.call(e,"cause")?"{ ["+String(e)+"] "+Xr.call(eP.call("[cause]: "+f(e.cause),J),", ")+" }":J.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Xr.call(J,", ")+" }"}if(typeof e=="object"&&c){if(iP&&typeof e[iP]=="function"&&pm)return pm(e,{depth:y-n});if(c!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(mM(e)){var Z=[];return JT&&JT.call(e,function(B,X){Z.push(f(X,e,!0)+" => "+f(B,e))}),sP("Map",Rc.call(e),Z,h)}if(yM(e)){var H=[];return YT&&YT.call(e,function(B){H.push(f(B,e))}),sP("Set",Cc.call(e),H,h)}if(hM(e))return cm("WeakMap");if(vM(e))return cm("WeakSet");if(gM(e))return cm("WeakRef");if(cM(e))return Va(f(Number(e)));if(dM(e))return Va(f(lm.call(e)));if(lM(e))return Va(XU.call(e));if(uM(e))return Va(f(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof global<"u"&&e===global)return"{ [object globalThis] }";if(!aM(e)&&!aP(e)){var K=Ic(e,f),te=rP?rP(e)===Object.prototype:e instanceof Object||e.constructor===Object,Q=e instanceof Object?"":"null prototype",xe=!te&&Wa&&Object(e)===e&&Wa in e?ym.call(eo(e),8,-1):Q?"Object":"",re=te||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",V=re+(xe||Q?"["+Xr.call(eP.call([],xe||[],Q||[]),": ")+"] ":"");return K.length===0?V+"{}":h?V+"{"+mm(K,h)+"}":V+"{ "+Xr.call(K,", ")+" }"}return String(e)},"inspect_");function dP(t,e,r){var n=r.quoteStyle||e,i=lP[n];return i+t+i}o(dP,"wrapQuotes");function iM(t){return Qn.call(String(t),/"/g,""")}o(iM,"quote");function Po(t){return!Wa||!(typeof t=="object"&&(Wa in t||typeof t[Wa]<"u"))}o(Po,"canTrustToString");function fm(t){return eo(t)==="[object Array]"&&Po(t)}o(fm,"isArray");function aM(t){return eo(t)==="[object Date]"&&Po(t)}o(aM,"isDate");function aP(t){return eo(t)==="[object RegExp]"&&Po(t)}o(aP,"isRegExp");function sM(t){return eo(t)==="[object Error]"&&Po(t)}o(sM,"isError");function uM(t){return eo(t)==="[object String]"&&Po(t)}o(uM,"isString");function cM(t){return eo(t)==="[object Number]"&&Po(t)}o(cM,"isNumber");function lM(t){return eo(t)==="[object Boolean]"&&Po(t)}o(lM,"isBoolean");function pP(t){if(Ai)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!dm)return!1;try{return dm.call(t),!0}catch{}return!1}o(pP,"isSymbol");function dM(t){if(!t||typeof t!="object"||!lm)return!1;try{return lm.call(t),!0}catch{}return!1}o(dM,"isBigInt");var pM=Object.prototype.hasOwnProperty||function(t){return t in this};function wn(t,e){return pM.call(t,e)}o(wn,"has");function eo(t){return QU.call(t)}o(eo,"toStr");function fM(t){if(t.name)return t.name;var e=tM.call(eM.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}o(fM,"nameOf");function fP(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}o(fP,"indexOf");function mM(t){if(!Rc||!t||typeof t!="object")return!1;try{Rc.call(t);try{Cc.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}o(mM,"isMap");function hM(t){if(!Ga||!t||typeof t!="object")return!1;try{Ga.call(t,Ga);try{Ha.call(t,Ha)}catch{return!0}return t instanceof WeakMap}catch{}return!1}o(hM,"isWeakMap");function gM(t){if(!XT||!t||typeof t!="object")return!1;try{return XT.call(t),!0}catch{}return!1}o(gM,"isWeakRef");function yM(t){if(!Cc||!t||typeof t!="object")return!1;try{Cc.call(t);try{Rc.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}o(yM,"isSet");function vM(t){if(!Ha||!t||typeof t!="object")return!1;try{Ha.call(t,Ha);try{Ga.call(t,Ga)}catch{return!0}return t instanceof WeakSet}catch{}return!1}o(vM,"isWeakSet");function _M(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}o(_M,"isElement");function mP(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return mP(ym.call(t,0,e.maxStringLength),e)+n}var i=oM[e.quoteStyle||"single"];i.lastIndex=0;var s=Qn.call(Qn.call(t,i,"\\$1"),/[\x00-\x1f]/g,bM);return dP(s,"single",e)}o(mP,"inspectString");function bM(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+rM.call(e.toString(16))}o(bM,"lowbyte");function Va(t){return"Object("+t+")"}o(Va,"markBoxed");function cm(t){return t+" { ? }"}o(cm,"weakCollectionOf");function sP(t,e,r,n){var i=n?mm(r,n):Xr.call(r,", ");return t+" ("+e+") {"+i+"}"}o(sP,"collectionOf");function EM(t){for(var e=0;e<t.length;e++)if(fP(t[e],`
|
|
56
|
-
`)>=0)return!1;return!0}
|
|
57
|
-
`+
|
|
58
|
-
`+e.prev}o(mm,"indentedJoin");function Ic(t,e){var r=fm(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=wn(t,i)?e(t[i],t):""}var s=typeof um=="function"?um(t):[],c;if(Ai){c={};for(var d=0;d<s.length;d++)c["$"+s[d]]=s[d]}for(var p in t)wn(t,p)&&(r&&String(Number(p))===p&&p<t.length||Ai&&c["$"+p]instanceof Symbol||(uP.call(/[^\w$]/,p)?n.push(e(p,t)+": "+e(t[p],t)):n.push(p+": "+e(t[p],t))));if(typeof um=="function")for(var m=0;m<s.length;m++)cP.call(t,s[m])&&n.push("["+e(s[m])+"]: "+e(t[s[m]],t));return n}o(Ic,"arrObjKeys")});var yP=D((DQ,gP)=>{"use strict";var wM=Za(),TM=Bn(),Oc=o(function(t,e,r){for(var n=t,i;(i=n.next)!=null;n=i)if(i.key===e)return n.next=i.next,r||(i.next=t.next,t.next=i),i},"listGetNode"),PM=o(function(t,e){if(t){var r=Oc(t,e);return r&&r.value}},"listGet"),xM=o(function(t,e,r){var n=Oc(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},"listSet"),AM=o(function(t,e){return t?!!Oc(t,e):!1},"listHas"),IM=o(function(t,e){if(t)return Oc(t,e,!0)},"listDelete");gP.exports=o(function(){var e,r={assert:o(function(n){if(!r.has(n))throw new TM("Side channel does not contain "+wM(n))},"assert"),delete:o(function(n){var i=IM(e,n);return i&&e&&!e.next&&(e=void 0),!!i},"delete"),get:o(function(n){return PM(e,n)},"get"),has:o(function(n){return AM(e,n)},"has"),set:o(function(n,i){e||(e={next:void 0}),xM(e,n,i)},"set")};return r},"getSideChannelList")});var vm=D((zQ,bP)=>{"use strict";var vP=la(),_P=xd(),RM=_P([vP("%String.prototype.indexOf%")]);bP.exports=o(function(e,r){var n=vP(e,!!r);return typeof n=="function"&&RM(e,".prototype.")>-1?_P([n]):n},"callBoundIntrinsic")});var _m=D((MQ,SP)=>{"use strict";var CM=la(),Ka=vm(),OM=Za(),kM=Bn(),EP=CM("%Map%",!0),$M=Ka("Map.prototype.get",!0),DM=Ka("Map.prototype.set",!0),NM=Ka("Map.prototype.has",!0),zM=Ka("Map.prototype.delete",!0),UM=Ka("Map.prototype.size",!0);SP.exports=!!EP&&o(function(){var e,r={assert:o(function(n){if(!r.has(n))throw new kM("Side channel does not contain "+OM(n))},"assert"),delete:o(function(n){if(e){var i=zM(e,n);return UM(e)===0&&(e=void 0),i}return!1},"delete"),get:o(function(n){if(e)return $M(e,n)},"get"),has:o(function(n){return e?NM(e,n):!1},"has"),set:o(function(n,i){e||(e=new EP),DM(e,n,i)},"set")};return r},"getSideChannelMap")});var TP=D((jQ,wP)=>{"use strict";var MM=la(),$c=vm(),LM=Za(),kc=_m(),jM=Bn(),Ii=MM("%WeakMap%",!0),FM=$c("WeakMap.prototype.get",!0),qM=$c("WeakMap.prototype.set",!0),BM=$c("WeakMap.prototype.has",!0),VM=$c("WeakMap.prototype.delete",!0);wP.exports=Ii?o(function(){var e,r,n={assert:o(function(i){if(!n.has(i))throw new jM("Side channel does not contain "+LM(i))},"assert"),delete:o(function(i){if(Ii&&i&&(typeof i=="object"||typeof i=="function")){if(e)return VM(e,i)}else if(kc&&r)return r.delete(i);return!1},"delete"),get:o(function(i){return Ii&&i&&(typeof i=="object"||typeof i=="function")&&e?FM(e,i):r&&r.get(i)},"get"),has:o(function(i){return Ii&&i&&(typeof i=="object"||typeof i=="function")&&e?BM(e,i):!!r&&r.has(i)},"has"),set:o(function(i,s){Ii&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new Ii),qM(e,i,s)):kc&&(r||(r=kc()),r.set(i,s))},"set")};return n},"getSideChannelWeakMap"):kc});var bm=D((qQ,PP)=>{"use strict";var GM=Bn(),HM=Za(),WM=yP(),ZM=_m(),KM=TP(),JM=KM||ZM||WM;PP.exports=o(function(){var e,r={assert:o(function(n){if(!r.has(n))throw new GM("Side channel does not contain "+HM(n))},"assert"),delete:o(function(n){return!!e&&e.delete(n)},"delete"),get:o(function(n){return e&&e.get(n)},"get"),has:o(function(n){return!!e&&e.has(n)},"has"),set:o(function(n,i){e||(e=JM()),e.set(n,i)},"set")};return r},"getSideChannel")});var Dc=D((VQ,xP)=>{"use strict";var YM=String.prototype.replace,XM=/%20/g,Em={RFC1738:"RFC1738",RFC3986:"RFC3986"};xP.exports={default:Em.RFC3986,formatters:{RFC1738:o(function(t){return YM.call(t,XM,"+")},"RFC1738"),RFC3986:o(function(t){return String(t)},"RFC3986")},RFC1738:Em.RFC1738,RFC3986:Em.RFC3986}});var Pm=D((HQ,AP)=>{"use strict";var QM=Dc(),e1=bm(),Sm=Object.prototype.hasOwnProperty,xo=Array.isArray,Nc=e1(),Ri=o(function(e,r){return Nc.set(e,r),e},"markOverflow"),Ao=o(function(e){return Nc.has(e)},"isOverflow"),Ja=o(function(e){return Nc.get(e)},"getMaxIndex"),Tm=o(function(e,r){Nc.set(e,r)},"setMaxIndex"),Qr=(function(){for(var t=[],e=0;e<256;++e)t[t.length]="%"+((e<16?"0":"")+e.toString(16)).toUpperCase();return t})(),t1=o(function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if(xo(n)){for(var i=[],s=0;s<n.length;++s)typeof n[s]<"u"&&(i[i.length]=n[s]);r.obj[r.prop]=i}}},"compactQueue"),Ya=o(function(e,r){for(var n=r&&r.plainObjects?{__proto__:null}:{},i=0;i<e.length;++i)typeof e[i]<"u"&&(n[i]=e[i]);return n},"arrayToObject"),r1=o(function t(e,r,n){if(!r)return e;if(typeof r!="object"&&typeof r!="function"){if(xo(e)){var i=e.length;if(n&&typeof n.arrayLimit=="number"&&i>n.arrayLimit)return Ri(Ya(e.concat(r),n),i);e[i]=r}else if(e&&typeof e=="object")if(Ao(e)){var s=Ja(e)+1;e[s]=r,Tm(e,s)}else{if(n&&n.strictMerge)return[e,r];(n&&(n.plainObjects||n.allowPrototypes)||!Sm.call(Object.prototype,r))&&(e[r]=!0)}else return[e,r];return e}if(!e||typeof e!="object"){if(Ao(r)){for(var c=Object.keys(r),d=n&&n.plainObjects?{__proto__:null,0:e}:{0:e},p=0;p<c.length;p++){var m=parseInt(c[p],10);d[m+1]=r[c[p]]}return Ri(d,Ja(r)+1)}var y=[e].concat(r);return n&&typeof n.arrayLimit=="number"&&y.length>n.arrayLimit?Ri(Ya(y,n),y.length-1):y}var h=e;return xo(e)&&!xo(r)&&(h=Ya(e,n)),xo(e)&&xo(r)?(r.forEach(function(f,l){if(Sm.call(e,l)){var g=e[l];g&&typeof g=="object"&&f&&typeof f=="object"?e[l]=t(g,f,n):e[e.length]=f}else e[l]=f}),e):Object.keys(r).reduce(function(f,l){var g=r[l];if(Sm.call(f,l)?f[l]=t(f[l],g,n):f[l]=g,Ao(r)&&!Ao(f)&&Ri(f,Ja(r)),Ao(f)){var v=parseInt(l,10);String(v)===l&&v>=0&&v>Ja(f)&&Tm(f,v)}return f},h)},"merge"),n1=o(function(e,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},e)},"assignSingleSource"),o1=o(function(t,e,r){var n=t.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},"decode"),wm=1024,i1=o(function(e,r,n,i,s){if(e.length===0)return e;var c=e;if(typeof e=="symbol"?c=Symbol.prototype.toString.call(e):typeof e!="string"&&(c=String(e)),n==="iso-8859-1")return escape(c).replace(/%u[0-9a-f]{4}/gi,function(l){return"%26%23"+parseInt(l.slice(2),16)+"%3B"});for(var d="",p=0;p<c.length;p+=wm){for(var m=c.length>=wm?c.slice(p,p+wm):c,y=[],h=0;h<m.length;++h){var f=m.charCodeAt(h);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||s===QM.RFC1738&&(f===40||f===41)){y[y.length]=m.charAt(h);continue}if(f<128){y[y.length]=Qr[f];continue}if(f<2048){y[y.length]=Qr[192|f>>6]+Qr[128|f&63];continue}if(f<55296||f>=57344){y[y.length]=Qr[224|f>>12]+Qr[128|f>>6&63]+Qr[128|f&63];continue}h+=1,f=65536+((f&1023)<<10|m.charCodeAt(h)&1023),y[y.length]=Qr[240|f>>18]+Qr[128|f>>12&63]+Qr[128|f>>6&63]+Qr[128|f&63]}d+=y.join("")}return d},"encode"),a1=o(function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],i=0;i<r.length;++i)for(var s=r[i],c=s.obj[s.prop],d=Object.keys(c),p=0;p<d.length;++p){var m=d[p],y=c[m];typeof y=="object"&&y!==null&&n.indexOf(y)===-1&&(r[r.length]={obj:c,prop:m},n[n.length]=y)}return t1(r),e},"compact"),s1=o(function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},"isRegExp"),u1=o(function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},"isBuffer"),c1=o(function(e,r,n,i){if(Ao(e)){var s=Ja(e)+1;return e[s]=r,Tm(e,s),e}var c=[].concat(e,r);return c.length>n?Ri(Ya(c,{plainObjects:i}),c.length-1):c},"combine"),l1=o(function(e,r){if(xo(e)){for(var n=[],i=0;i<e.length;i+=1)n[n.length]=r(e[i]);return n}return r(e)},"maybeMap");AP.exports={arrayToObject:Ya,assign:n1,combine:c1,compact:a1,decode:o1,encode:i1,isBuffer:u1,isOverflow:Ao,isRegExp:s1,markOverflow:Ri,maybeMap:l1,merge:r1}});var $P=D((ZQ,kP)=>{"use strict";var RP=bm(),zc=Pm(),Xa=Dc(),d1=Object.prototype.hasOwnProperty,CP={brackets:o(function(e){return e+"[]"},"brackets"),comma:"comma",indices:o(function(e,r){return e+"["+r+"]"},"indices"),repeat:o(function(e){return e},"repeat")},en=Array.isArray,p1=Array.prototype.push,OP=o(function(t,e){p1.apply(t,en(e)?e:[e])},"pushToArray"),f1=Date.prototype.toISOString,IP=Xa.default,St={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:zc.encode,encodeValuesOnly:!1,filter:void 0,format:IP,formatter:Xa.formatters[IP],indices:!1,serializeDate:o(function(e){return f1.call(e)},"serializeDate"),skipNulls:!1,strictNullHandling:!1},m1=o(function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},"isNonNullishPrimitive"),xm={},h1=o(function t(e,r,n,i,s,c,d,p,m,y,h,f,l,g,v,E,b,C){for(var U=e,J=C,Z=0,H=!1;(J=J.get(xm))!==void 0&&!H;){var K=J.get(e);if(Z+=1,typeof K<"u"){if(K===Z)throw new RangeError("Cyclic object value");H=!0}typeof J.get(xm)>"u"&&(Z=0)}if(typeof y=="function"?U=y(r,U):U instanceof Date?U=l(U):n==="comma"&&en(U)&&(U=zc.maybeMap(U,function(Ke){return Ke instanceof Date?l(Ke):Ke})),U===null){if(c)return m&&!E?m(r,St.encoder,b,"key",g):r;U=""}if(m1(U)||zc.isBuffer(U)){if(m){var te=E?r:m(r,St.encoder,b,"key",g);return[v(te)+"="+v(m(U,St.encoder,b,"value",g))]}return[v(r)+"="+v(String(U))]}var Q=[];if(typeof U>"u")return Q;var xe;if(n==="comma"&&en(U))E&&m&&(U=zc.maybeMap(U,m)),xe=[{value:U.length>0?U.join(",")||null:void 0}];else if(en(y))xe=y;else{var re=Object.keys(U);xe=h?re.sort(h):re}var V=p?String(r).replace(/\./g,"%2E"):String(r),B=i&&en(U)&&U.length===1?V+"[]":V;if(s&&en(U)&&U.length===0)return B+"[]";for(var X=0;X<xe.length;++X){var Y=xe[X],ie=typeof Y=="object"&&Y&&typeof Y.value<"u"?Y.value:U[Y];if(!(d&&ie===null)){var ue=f&&p?String(Y).replace(/\./g,"%2E"):String(Y),Ce=en(U)?typeof n=="function"?n(B,ue):B:B+(f?"."+ue:"["+ue+"]");C.set(e,Z);var De=RP();De.set(xm,C),OP(Q,t(ie,Ce,n,i,s,c,d,p,n==="comma"&&E&&en(U)?null:m,y,h,f,l,g,v,E,b,De))}}return Q},"stringify"),g1=o(function(e){if(!e)return St;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=e.charset||St.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Xa.default;if(typeof e.format<"u"){if(!d1.call(Xa.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=Xa.formatters[n],s=St.filter;(typeof e.filter=="function"||en(e.filter))&&(s=e.filter);var c;if(e.arrayFormat in CP?c=e.arrayFormat:"indices"in e?c=e.indices?"indices":"repeat":c=St.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:St.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:St.addQueryPrefix,allowDots:d,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:St.allowEmptyArrays,arrayFormat:c,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:St.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?St.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:St.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:St.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:St.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:St.encodeValuesOnly,filter:s,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:St.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:St.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:St.strictNullHandling}},"normalizeStringifyOptions");kP.exports=function(t,e){var r=t,n=g1(e),i,s;typeof n.filter=="function"?(s=n.filter,r=s("",r)):en(n.filter)&&(s=n.filter,i=s);var c=[];if(typeof r!="object"||r===null)return"";var d=CP[n.arrayFormat],p=d==="comma"&&n.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var m=RP(),y=0;y<i.length;++y){var h=i[y],f=r[h];n.skipNulls&&f===null||OP(c,h1(f,h,d,p,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,m))}var l=c.join(n.delimiter),g=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?g+="utf8=%26%2310003%3B&":g+="utf8=%E2%9C%93&"),l.length>0?g+l:""}});var zP=D((JQ,NP)=>{"use strict";var tn=Pm(),Uc=Object.prototype.hasOwnProperty,Am=Array.isArray,ct={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:tn.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},y1=o(function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},"interpretNumericEntities"),DP=o(function(t,e,r){if(t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1)return t.split(",");if(e.throwOnLimitExceeded&&r>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(e.arrayLimit===1?"":"s")+" allowed in an array.");return t},"parseArrayValue"),v1="utf8=%26%2310003%3B",_1="utf8=%E2%9C%93",b1=o(function(e,r){var n={__proto__:null},i=r.ignoreQueryPrefix?e.replace(/^\?/,""):e;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=r.parameterLimit===1/0?void 0:r.parameterLimit,c=i.split(r.delimiter,r.throwOnLimitExceeded&&typeof s<"u"?s+1:s);if(r.throwOnLimitExceeded&&typeof s<"u"&&c.length>s)throw new RangeError("Parameter limit exceeded. Only "+s+" parameter"+(s===1?"":"s")+" allowed.");var d=-1,p,m=r.charset;if(r.charsetSentinel)for(p=0;p<c.length;++p)c[p].indexOf("utf8=")===0&&(c[p]===_1?m="utf-8":c[p]===v1&&(m="iso-8859-1"),d=p,p=c.length);for(p=0;p<c.length;++p)if(p!==d){var y=c[p],h=y.indexOf("]="),f=h===-1?y.indexOf("="):h+1,l,g;if(f===-1?(l=r.decoder(y,ct.decoder,m,"key"),g=r.strictNullHandling?null:""):(l=r.decoder(y.slice(0,f),ct.decoder,m,"key"),l!==null&&(g=tn.maybeMap(DP(y.slice(f+1),r,Am(n[l])?n[l].length:0),function(E){return r.decoder(E,ct.decoder,m,"value")}))),g&&r.interpretNumericEntities&&m==="iso-8859-1"&&(g=y1(String(g))),y.indexOf("[]=")>-1&&(g=Am(g)?[g]:g),r.comma&&Am(g)&&g.length>r.arrayLimit){if(r.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(r.arrayLimit===1?"":"s")+" allowed in an array.");g=tn.combine([],g,r.arrayLimit,r.plainObjects)}if(l!==null){var v=Uc.call(n,l);v&&(r.duplicates==="combine"||y.indexOf("[]=")>-1)?n[l]=tn.combine(n[l],g,r.arrayLimit,r.plainObjects):(!v||r.duplicates==="last")&&(n[l]=g)}}return n},"parseQueryStringValues"),E1=o(function(t,e,r,n){var i=0;if(t.length>0&&t[t.length-1]==="[]"){var s=t.slice(0,-1).join("");i=Array.isArray(e)&&e[s]?e[s].length:0}for(var c=n?e:DP(e,r,i),d=t.length-1;d>=0;--d){var p,m=t[d];if(m==="[]"&&r.parseArrays)tn.isOverflow(c)?p=c:p=r.allowEmptyArrays&&(c===""||r.strictNullHandling&&c===null)?[]:tn.combine([],c,r.arrayLimit,r.plainObjects);else{p=r.plainObjects?{__proto__:null}:{};var y=m.charAt(0)==="["&&m.charAt(m.length-1)==="]"?m.slice(1,-1):m,h=r.decodeDotInKeys?y.replace(/%2E/g,"."):y,f=parseInt(h,10),l=!isNaN(f)&&m!==h&&String(f)===h&&f>=0&&r.parseArrays;if(!r.parseArrays&&h==="")p={0:c};else if(l&&f<r.arrayLimit)p=[],p[f]=c;else{if(l&&r.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(r.arrayLimit===1?"":"s")+" allowed in an array.");l?(p[f]=c,tn.markOverflow(p,f)):h!=="__proto__"&&(p[h]=c)}}c=p}return c},"parseObject"),S1=o(function(e,r){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(r.depth<=0)return!r.plainObjects&&Uc.call(Object.prototype,n)&&!r.allowPrototypes?void 0:[n];var i=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=i.exec(n),d=c?n.slice(0,c.index):n,p=[];if(d){if(!r.plainObjects&&Uc.call(Object.prototype,d)&&!r.allowPrototypes)return;p[p.length]=d}for(var m=0;(c=s.exec(n))!==null&&m<r.depth;){m+=1;var y=c[1].slice(1,-1);if(!r.plainObjects&&Uc.call(Object.prototype,y)&&!r.allowPrototypes)return;p[p.length]=c[1]}if(c){if(r.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");p[p.length]="["+n.slice(c.index)+"]"}return p},"splitKeyIntoSegments"),w1=o(function(e,r,n,i){if(e){var s=S1(e,n);if(s)return E1(s,r,n,i)}},"parseQueryStringKeys"),T1=o(function(e){if(!e)return ct;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof e.throwOnLimitExceeded<"u"&&typeof e.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=typeof e.charset>"u"?ct.charset:e.charset,n=typeof e.duplicates>"u"?ct.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:ct.allowDots:!!e.allowDots;return{allowDots:i,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:ct.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:ct.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:ct.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:ct.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:ct.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:ct.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:ct.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:ct.decoder,delimiter:typeof e.delimiter=="string"||tn.isRegExp(e.delimiter)?e.delimiter:ct.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:ct.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:ct.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:ct.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:ct.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:ct.strictDepth,strictMerge:typeof e.strictMerge=="boolean"?!!e.strictMerge:ct.strictMerge,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:ct.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded=="boolean"?e.throwOnLimitExceeded:!1}},"normalizeParseOptions");NP.exports=function(t,e){var r=T1(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?{__proto__:null}:{};for(var n=typeof t=="string"?b1(t,r):t,i=r.plainObjects?{__proto__:null}:{},s=Object.keys(n),c=0;c<s.length;++c){var d=s[c],p=w1(d,n[d],r,typeof t=="string");i=tn.merge(i,p,r)}return r.allowSparse===!0?i:tn.compact(i)}});var Im=D((XQ,UP)=>{"use strict";var P1=$P(),x1=zP(),A1=Dc();UP.exports={formats:A1,parse:x1,stringify:P1}});var LP=D((Rm,MP)=>{(function(t,e){typeof Rm=="object"?MP.exports=e():typeof define=="function"&&define.amd?define([],e):t.urltemplate=e()})(Rm,function(){function t(){}return o(t,"UrlTemplate"),t.prototype.encodeReserved=function(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map(function(r){return/%[0-9A-Fa-f]/.test(r)||(r=encodeURI(r).replace(/%5B/g,"[").replace(/%5D/g,"]")),r}).join("")},t.prototype.encodeUnreserved=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(r){return"%"+r.charCodeAt(0).toString(16).toUpperCase()})},t.prototype.encodeValue=function(e,r,n){return r=e==="+"||e==="#"?this.encodeReserved(r):this.encodeUnreserved(r),n?this.encodeUnreserved(n)+"="+r:r},t.prototype.isDefined=function(e){return e!=null},t.prototype.isKeyOperator=function(e){return e===";"||e==="&"||e==="?"},t.prototype.getValues=function(e,r,n,i){var s=e[n],c=[];if(this.isDefined(s)&&s!=="")if(typeof s=="string"||typeof s=="number"||typeof s=="boolean")s=s.toString(),i&&i!=="*"&&(s=s.substring(0,parseInt(i,10))),c.push(this.encodeValue(r,s,this.isKeyOperator(r)?n:null));else if(i==="*")Array.isArray(s)?s.filter(this.isDefined).forEach(function(p){c.push(this.encodeValue(r,p,this.isKeyOperator(r)?n:null))},this):Object.keys(s).forEach(function(p){this.isDefined(s[p])&&c.push(this.encodeValue(r,s[p],p))},this);else{var d=[];Array.isArray(s)?s.filter(this.isDefined).forEach(function(p){d.push(this.encodeValue(r,p))},this):Object.keys(s).forEach(function(p){this.isDefined(s[p])&&(d.push(this.encodeUnreserved(p)),d.push(this.encodeValue(r,s[p].toString())))},this),this.isKeyOperator(r)?c.push(this.encodeUnreserved(n)+"="+d.join(",")):d.length!==0&&c.push(d.join(","))}else r===";"?this.isDefined(s)&&c.push(this.encodeUnreserved(n)):s===""&&(r==="&"||r==="?")?c.push(this.encodeUnreserved(n)+"="):s===""&&c.push("");return c},t.prototype.parse=function(e){var r=this,n=["+","#",".","/",";","?","&"];return{expand:o(function(i){return e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(s,c,d){if(c){var p=null,m=[];if(n.indexOf(c.charAt(0))!==-1&&(p=c.charAt(0),c=c.substr(1)),c.split(/,/g).forEach(function(h){var f=/([^:\*]*)(?::(\d+)|(\*))?/.exec(h);m.push.apply(m,r.getValues(i,p,f[1],f[2]||f[3]))}),p&&p!=="+"){var y=",";return p==="?"?y="&":p!=="#"&&(y=p),(m.length!==0?p:"")+m.join(y)}else return m.join(",")}else return r.encodeReserved(d)})},"expand")}},new t})});var jP=D(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});Cm.isBrowser=I1;function I1(){return typeof window<"u"}o(I1,"isBrowser")});var Lc=D(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});Mc.headersToClassicHeaders=FP;Mc.marshallGaxiosResponse=R1;function FP(t){let e={};if(t instanceof Headers)t.forEach((r,n)=>{e[n]=r});else if(Array.isArray(t))for(let[r,n]of t)e[r]=n;else e=t||{};return e}o(FP,"headersToClassicHeaders");function R1(t){return Object.defineProperties(t||{},{headers:{configurable:!0,writable:!0,enumerable:!0,value:FP(t?.headers)}})}o(R1,"marshallGaxiosResponse")});var VP=D(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.sessions=void 0;ur.request=q1;ur.closeSession=Om;var BP=require("http2"),C1=require("zlib"),O1=require("url"),k1=Im(),$1=pa(),D1=require("stream"),N1=require("util"),z1=require("process"),U1=Lc(),{HTTP2_HEADER_CONTENT_ENCODING:M1,HTTP2_HEADER_CONTENT_TYPE:qP,HTTP2_HEADER_METHOD:L1,HTTP2_HEADER_PATH:j1,HTTP2_HEADER_STATUS:F1}=BP.constants,Qa=!!z1.env.HTTP2_DEBUG;ur.sessions={};async function q1(t){let e=$1(!0,{},t);e.validateStatus=e.validateStatus||B1,e.responseType=e.responseType||"json";let r=new O1.URL(e.url),n=V1(r.host);n.timeoutHandle!==void 0&&clearTimeout(n.timeoutHandle);let i=r.pathname;if(t.params&&Object.keys(t.params).length>0){let h=(t.paramsSerializer||k1.stringify)(e.params);i+=`?${h}`}let s=(0,U1.headersToClassicHeaders)(e.headers);s[j1]=i,s[L1]=t.method||"GET",e.headers=s,s[qP]||e.responseType!=="text"&&(s[qP]="application/json");let c={config:t,headers:{},status:0,data:{},statusText:""},d=[],p=n.session,m;return new Promise((y,h)=>{try{m=p.request(s).on("response",f=>{Object.assign(c,{headers:f,status:f[F1]});let l=m;if(f[M1]==="gzip"&&(l=m.pipe(C1.createGunzip())),e.responseType==="stream"){c.data=l,y(c);return}l.on("data",g=>{d.push(g)}).on("error",g=>{h(g)}).on("end",()=>{let g=Buffer.concat(d),v=g;if(g){if(e.responseType==="json")try{v=JSON.parse(g.toString("utf8"))}catch{v=g.toString("utf8")}else e.responseType==="text"?v=g.toString("utf8"):e.responseType==="arraybuffer"&&(v=g.buffer);c.data=v}if(!e.validateStatus(c.status)){let E=`Request failed with status code ${c.status}. `;if(c.data&&typeof c.data=="object"){let b=N1.inspect(c.data,{depth:5});E=`${E}
|
|
59
|
-
'${b}`}
|
|
60
|
-
`),this.push(v),
|
|
61
|
-
content-type: ${
|
|
55
|
+
https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys`};var JS=class{static{a(this,"GoogleAuth")}checkIsGCE=void 0;useJWTAccessWithScope;defaultServicePath;get isGCE(){return this.checkIsGCE}_findProjectIdPromise;_cachedProjectId;jsonContent=null;apiKey;cachedCredential=null;#e=null;defaultScopes;keyFilename;scopes;clientOptions={};constructor(t={}){if(this._cachedProjectId=t.projectId||null,this.cachedCredential=t.authClient||null,this.keyFilename=t.keyFilename||t.keyFile,this.scopes=t.scopes,this.clientOptions=t.clientOptions||{},this.jsonContent=t.credentials||null,this.apiKey=t.apiKey||this.clientOptions.apiKey||null,this.apiKey&&(this.jsonContent||this.clientOptions.credentials))throw new RangeError(dn.GoogleAuthExceptionMessages.API_KEY_WITH_CREDENTIALS);t.universeDomain&&(this.clientOptions.universeDomain=t.universeDomain)}setGapicJWTValues(t){t.defaultServicePath=this.defaultServicePath,t.useJWTAccessWithScope=this.useJWTAccessWithScope,t.defaultScopes=this.defaultScopes}getProjectId(t){if(t)this.getProjectIdAsync().then(n=>t(null,n),t);else return this.getProjectIdAsync()}async getProjectIdOptional(){try{return await this.getProjectId()}catch(t){if(t instanceof Error&&t.message===dn.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND)return null;throw t}}async findAndCacheProjectId(){let t=null;if(t||=await this.getProductionProjectId(),t||=await this.getFileProjectId(),t||=await this.getDefaultServiceProjectId(),t||=await this.getGCEProjectId(),t||=await this.getExternalAccountClientProjectId(),t)return this._cachedProjectId=t,t;throw new Error(dn.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND)}async getProjectIdAsync(){return this._cachedProjectId?this._cachedProjectId:(this._findProjectIdPromise||(this._findProjectIdPromise=this.findAndCacheProjectId()),this._findProjectIdPromise)}async getUniverseDomainFromMetadataServer(){let t;try{t=await Bu.universe("universe-domain"),t||=KS.DEFAULT_UNIVERSE}catch(n){if(n&&n?.response?.status===404)t=KS.DEFAULT_UNIVERSE;else throw n}return t}async getUniverseDomain(){let t=(0,K$.originalOrCamelOptions)(this.clientOptions).get("universe_domain");try{t??=(await this.getClient()).universeDomain}catch{t??=KS.DEFAULT_UNIVERSE}return t}getAnyScopes(){return this.scopes||this.defaultScopes}getApplicationDefault(t={},n){let o;if(typeof t=="function"?n=t:o=t,n)this.getApplicationDefaultAsync(o).then(r=>n(null,r.credential,r.projectId),n);else return this.getApplicationDefaultAsync(o)}async getApplicationDefaultAsync(t={}){if(this.cachedCredential)return await this.#t(this.cachedCredential,null);let n;if(n=await this._tryGetApplicationCredentialsFromEnvironmentVariable(t),n)return n instanceof rs.JWT?n.scopes=this.scopes:n instanceof qu.BaseExternalAccountClient&&(n.scopes=this.getAnyScopes()),await this.#t(n);if(n=await this._tryGetApplicationCredentialsFromWellKnownFile(t),n)return n instanceof rs.JWT?n.scopes=this.scopes:n instanceof qu.BaseExternalAccountClient&&(n.scopes=this.getAnyScopes()),await this.#t(n);if(await this._checkIsGCE())return t.scopes=this.getAnyScopes(),await this.#t(new LG.Compute(t));throw new Error(dn.GoogleAuthExceptionMessages.NO_ADC_FOUND)}async#t(t,n=process.env.GOOGLE_CLOUD_QUOTA_PROJECT||null){let o=await this.getProjectIdOptional();return n&&(t.quotaProjectId=n),this.cachedCredential=t,{credential:t,projectId:o}}async _checkIsGCE(){return this.checkIsGCE===void 0&&(this.checkIsGCE=Bu.getGCPResidency()||await Bu.isAvailable()),this.checkIsGCE}async _tryGetApplicationCredentialsFromEnvironmentVariable(t){let n=process.env.GOOGLE_APPLICATION_CREDENTIALS||process.env.google_application_credentials;if(!n||n.length===0)return null;try{return this._getApplicationCredentialsFromFilePath(n,t)}catch(o){throw o instanceof Error&&(o.message=`Unable to read the credential file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable: ${o.message}`),o}}async _tryGetApplicationCredentialsFromWellKnownFile(t){let n=null;if(this._isWindows())n=process.env.APPDATA;else{let r=process.env.HOME;r&&(n=WS.join(r,".config"))}return n&&(n=WS.join(n,"gcloud","application_default_credentials.json"),Fu.existsSync(n)||(n=null)),n?await this._getApplicationCredentialsFromFilePath(n,t):null}async _getApplicationCredentialsFromFilePath(t,n={}){if(!t||t.length===0)throw new Error("The file path is invalid.");try{if(t=Fu.realpathSync(t),!Fu.lstatSync(t).isFile())throw new Error}catch(r){throw r instanceof Error&&(r.message=`The file at ${t} does not exist, or it is not a file. ${r.message}`),r}let o=Fu.createReadStream(t);return this.fromStream(o,n)}fromImpersonatedJSON(t){if(!t)throw new Error("Must pass in a JSON object containing an impersonated refresh token");if(t.type!==ns.IMPERSONATED_ACCOUNT_TYPE)throw new Error(`The incoming JSON object does not have the "${ns.IMPERSONATED_ACCOUNT_TYPE}" type`);if(!t.source_credentials)throw new Error("The incoming JSON object does not contain a source_credentials field");if(!t.service_account_impersonation_url)throw new Error("The incoming JSON object does not contain a service_account_impersonation_url field");let n=this.fromJSON(t.source_credentials);if(t.service_account_impersonation_url?.length>256)throw new RangeError(`Target principal is too long: ${t.service_account_impersonation_url}`);let o=/(?<target>[^/]+):(generateAccessToken|generateIdToken)$/.exec(t.service_account_impersonation_url)?.groups?.target;if(!o)throw new RangeError(`Cannot extract target principal from ${t.service_account_impersonation_url}`);let r=(this.scopes||t.scopes||this.defaultScopes)??[];return new ns.Impersonated({...t,sourceClient:n,targetPrincipal:o,targetScopes:Array.isArray(r)?r:[r]})}fromJSON(t,n={}){let o,r=(0,K$.originalOrCamelOptions)(n).get("universe_domain");return t.type===Z$.USER_REFRESH_ACCOUNT_TYPE?(o=new Z$.UserRefreshClient(n),o.fromJSON(t)):t.type===ns.IMPERSONATED_ACCOUNT_TYPE?o=this.fromImpersonatedJSON(t):t.type===qu.EXTERNAL_ACCOUNT_TYPE?(o=BG.ExternalAccountClient.fromJSON({...t,...n}),o.scopes=this.getAnyScopes()):t.type===W$.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE?o=new W$.ExternalAccountAuthorizedUserClient({...t,...n}):(n.scopes=this.scopes,o=new rs.JWT(n),this.setGapicJWTValues(o),o.fromJSON(t)),r&&(o.universeDomain=r),o}_cacheClientFromJSON(t,n){let o=this.fromJSON(t,n);return this.jsonContent=t,this.cachedCredential=o,o}fromStream(t,n={},o){let r={};if(typeof n=="function"?o=n:r=n,o)this.fromStreamAsync(t,r).then(i=>o(null,i),o);else return this.fromStreamAsync(t,r)}fromStreamAsync(t,n){return new Promise((o,r)=>{if(!t)throw new Error("Must pass in a stream containing the Google auth settings.");let i=[];t.setEncoding("utf8").on("error",r).on("data",s=>i.push(s)).on("end",()=>{try{try{let s=JSON.parse(i.join("")),u=this._cacheClientFromJSON(s,n);return o(u)}catch(s){if(!this.keyFilename)throw s;let u=new rs.JWT({...this.clientOptions,keyFile:this.keyFilename});return this.cachedCredential=u,this.setGapicJWTValues(u),o(u)}}catch(s){return r(s)}})})}fromAPIKey(t,n={}){return new rs.JWT({...n,apiKey:t})}_isWindows(){let t=UG.platform();return!!(t&&t.length>=3&&t.substring(0,3).toLowerCase()==="win")}async getDefaultServiceProjectId(){return new Promise(t=>{(0,NG.exec)("gcloud config config-helper --format json",(n,o)=>{if(!n&&o)try{let r=JSON.parse(o).configuration.properties.core.project;t(r);return}catch{}t(null)})})}getProductionProjectId(){return process.env.GCLOUD_PROJECT||process.env.GOOGLE_CLOUD_PROJECT||process.env.gcloud_project||process.env.google_cloud_project}async getFileProjectId(){if(this.cachedCredential)return this.cachedCredential.projectId;if(this.keyFilename){let n=await this.getClient();if(n&&n.projectId)return n.projectId}let t=await this._tryGetApplicationCredentialsFromEnvironmentVariable();return t?t.projectId:null}async getExternalAccountClientProjectId(){return!this.jsonContent||this.jsonContent.type!==qu.EXTERNAL_ACCOUNT_TYPE?null:await(await this.getClient()).getProjectId()}async getGCEProjectId(){try{return await Bu.project("project-id")}catch{return null}}getCredentials(t){if(t)this.getCredentialsAsync().then(n=>t(null,n),t);else return this.getCredentialsAsync()}async getCredentialsAsync(){let t=await this.getClient();if(t instanceof ns.Impersonated)return{client_email:t.getTargetPrincipal()};if(t instanceof qu.BaseExternalAccountClient){let n=t.getServiceAccountEmail();if(n)return{client_email:n,universe_domain:t.universeDomain}}if(this.jsonContent)return{client_email:this.jsonContent.client_email,private_key:this.jsonContent.private_key,universe_domain:this.jsonContent.universe_domain};if(await this._checkIsGCE()){let[n,o]=await Promise.all([Bu.instance("service-accounts/default/email"),this.getUniverseDomain()]);return{client_email:n,universe_domain:o}}throw new Error(dn.GoogleAuthExceptionMessages.NO_CREDENTIALS_FOUND)}async getClient(){if(this.cachedCredential)return this.cachedCredential;this.#e=this.#e||this.#r();try{return await this.#e}finally{this.#e=null}}async#r(){if(this.jsonContent)return this._cacheClientFromJSON(this.jsonContent,this.clientOptions);if(this.keyFilename){let t=WS.resolve(this.keyFilename),n=Fu.createReadStream(t);return await this.fromStreamAsync(n,this.clientOptions)}else if(this.apiKey){let t=await this.fromAPIKey(this.apiKey,this.clientOptions);t.scopes=this.scopes;let{credential:n}=await this.#t(t);return n}else{let{credential:t}=await this.getApplicationDefaultAsync(this.clientOptions);return t}}async getIdTokenClient(t){let n=await this.getClient();if(!("fetchIdToken"in n))throw new Error("Cannot fetch ID token in this environment, use GCE or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account credentials JSON file.");return new jG.IdTokenClient({targetAudience:t,idTokenProvider:n})}async getAccessToken(){return(await(await this.getClient()).getAccessToken()).token}async getRequestHeaders(t){return(await this.getClient()).getRequestHeaders(t)}async authorizeRequest(t={}){let n=t.url,r=await(await this.getClient()).getRequestHeaders(n);return t.headers=zG.Gaxios.mergeHeaders(t.headers,r),t}async fetch(...t){return(await this.getClient()).fetch(...t)}async request(t){return(await this.getClient()).request(t)}getEnv(){return(0,FG.getEnv)()}async sign(t,n){let o=await this.getClient(),r=await this.getUniverseDomain();if(n=n||`https://iamcredentials.${r}/v1/projects/-/serviceAccounts/`,o instanceof ns.Impersonated)return(await o.sign(t)).signedBlob;let i=(0,MG.createCrypto)();if(o instanceof rs.JWT&&o.key)return await i.sign(o.key,t);let s=await this.getCredentials();if(!s.client_email)throw new Error("Cannot sign data without `client_email`.");return this.signBlob(i,s.client_email,t,n)}async signBlob(t,n,o,r){let i=new URL(r+`${n}:signBlob`);return(await this.request({method:"POST",url:i.href,data:{payload:t.encodeBase64StringUtf8(o)},retry:!0,retryConfig:{httpMethodsToRetry:["POST"]}})).data.signedBlob}};dn.GoogleAuth=JS});var Y$=z(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0});qm.IAMAuth=void 0;var YS=class{static{a(this,"IAMAuth")}selector;token;constructor(t,n){this.selector=t,this.token=n,this.selector=t,this.token=n}getRequestHeaders(){return{"x-goog-iam-authority-selector":this.selector,"x-goog-iam-authorization-token":this.token}}};qm.IAMAuth=YS});var X$=z(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.DownscopedClient=wn.EXPIRATION_TIME_OFFSET=wn.MAX_ACCESS_BOUNDARY_RULES_COUNT=void 0;var qG=Pt(),VG=require("stream"),XS=xr(),GG=Tm(),HG="urn:ietf:params:oauth:grant-type:token-exchange",ZG="urn:ietf:params:oauth:token-type:access_token",WG="urn:ietf:params:oauth:token-type:access_token";wn.MAX_ACCESS_BOUNDARY_RULES_COUNT=10;wn.EXPIRATION_TIME_OFFSET=300*1e3;var QS=class extends XS.AuthClient{static{a(this,"DownscopedClient")}authClient;credentialAccessBoundary;cachedDownscopedAccessToken;stsCredential;constructor(t,n={accessBoundary:{accessBoundaryRules:[]}}){if(super(t instanceof XS.AuthClient?{}:t),t instanceof XS.AuthClient?(this.authClient=t,this.credentialAccessBoundary=n):(this.authClient=t.authClient,this.credentialAccessBoundary=t.credentialAccessBoundary),this.credentialAccessBoundary.accessBoundary.accessBoundaryRules.length===0)throw new Error("At least one access boundary rule needs to be defined.");if(this.credentialAccessBoundary.accessBoundary.accessBoundaryRules.length>wn.MAX_ACCESS_BOUNDARY_RULES_COUNT)throw new Error(`The provided access boundary has more than ${wn.MAX_ACCESS_BOUNDARY_RULES_COUNT} access boundary rules.`);for(let o of this.credentialAccessBoundary.accessBoundary.accessBoundaryRules)if(o.availablePermissions.length===0)throw new Error("At least one permission should be defined in access boundary rules.");this.stsCredential=new GG.StsCredentials({tokenExchangeEndpoint:`https://sts.${this.universeDomain}/v1/token`}),this.cachedDownscopedAccessToken=null}setCredentials(t){if(!t.expiry_date)throw new Error("The access token expiry_date field is missing in the provided credentials.");super.setCredentials(t),this.cachedDownscopedAccessToken=t}async getAccessToken(){return(!this.cachedDownscopedAccessToken||this.isExpired(this.cachedDownscopedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedDownscopedAccessToken.access_token,expirationTime:this.cachedDownscopedAccessToken.expiry_date,res:this.cachedDownscopedAccessToken.res}}async getRequestHeaders(){let t=await this.getAccessToken(),n=new Headers({authorization:`Bearer ${t.token}`});return this.addSharedMetadataHeaders(n)}request(t,n){if(n)this.requestAsync(t).then(o=>n(null,o),o=>n(o,o.response));else return this.requestAsync(t)}async requestAsync(t,n=!1){let o;try{let r=await this.getRequestHeaders();t.headers=qG.Gaxios.mergeHeaders(t.headers),this.addUserProjectAndAuthHeaders(t.headers,r),o=await this.transporter.request(t)}catch(r){let i=r.response;if(i){let s=i.status,u=i.config.data instanceof VG.Readable;if(!n&&(s===401||s===403)&&!u&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(t,!0)}throw r}return o}async refreshAccessTokenAsync(){let t=(await this.authClient.getAccessToken()).token,n={grantType:HG,requestedTokenType:ZG,subjectToken:t,subjectTokenType:WG},o=await this.stsCredential.exchangeToken(n,void 0,this.credentialAccessBoundary),r=this.authClient.credentials?.expiry_date||null,i=o.expires_in?new Date().getTime()+o.expires_in*1e3:r;return this.cachedDownscopedAccessToken={access_token:o.access_token,expiry_date:i,res:o.res},this.credentials={},Object.assign(this.credentials,this.cachedDownscopedAccessToken),delete this.credentials.res,this.emit("tokens",{refresh_token:null,expiry_date:this.cachedDownscopedAccessToken.expiry_date,access_token:this.cachedDownscopedAccessToken.access_token,token_type:"Bearer",id_token:null}),this.cachedDownscopedAccessToken}isExpired(t){let n=new Date().getTime();return t.expiry_date?n>=t.expiry_date-this.eagerRefreshThresholdMillis:!1}};wn.DownscopedClient=QS});var Q$=z(Vm=>{"use strict";Object.defineProperty(Vm,"__esModule",{value:!0});Vm.PassThroughClient=void 0;var KG=xr(),eT=class extends KG.AuthClient{static{a(this,"PassThroughClient")}async request(t){return this.transporter.request(t)}async getAccessToken(){return{}}async getRequestHeaders(){return new Headers}};Vm.PassThroughClient=eT});var Vu=z(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.GoogleAuth=ye.auth=ye.PassThroughClient=ye.ExternalAccountAuthorizedUserClient=ye.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=ye.ExecutableError=ye.PluggableAuthClient=ye.DownscopedClient=ye.BaseExternalAccountClient=ye.ExternalAccountClient=ye.IdentityPoolClient=ye.AwsRequestSigner=ye.AwsClient=ye.UserRefreshClient=ye.LoginTicket=ye.ClientAuthentication=ye.OAuth2Client=ye.CodeChallengeMethod=ye.Impersonated=ye.JWT=ye.JWTAccess=ye.IdTokenClient=ye.IAMAuth=ye.GCPEnv=ye.Compute=ye.DEFAULT_UNIVERSE=ye.AuthClient=ye.gaxios=ye.gcpMetadata=void 0;var eD=J$();Object.defineProperty(ye,"GoogleAuth",{enumerable:!0,get:a(function(){return eD.GoogleAuth},"get")});ye.gcpMetadata=Au();ye.gaxios=Pt();var tD=xr();Object.defineProperty(ye,"AuthClient",{enumerable:!0,get:a(function(){return tD.AuthClient},"get")});Object.defineProperty(ye,"DEFAULT_UNIVERSE",{enumerable:!0,get:a(function(){return tD.DEFAULT_UNIVERSE},"get")});var JG=FE();Object.defineProperty(ye,"Compute",{enumerable:!0,get:a(function(){return JG.Compute},"get")});var YG=VE();Object.defineProperty(ye,"GCPEnv",{enumerable:!0,get:a(function(){return YG.GCPEnv},"get")});var XG=Y$();Object.defineProperty(ye,"IAMAuth",{enumerable:!0,get:a(function(){return XG.IAMAuth},"get")});var QG=qE();Object.defineProperty(ye,"IdTokenClient",{enumerable:!0,get:a(function(){return QG.IdTokenClient},"get")});var eH=sS();Object.defineProperty(ye,"JWTAccess",{enumerable:!0,get:a(function(){return eH.JWTAccess},"get")});var tH=uS();Object.defineProperty(ye,"JWT",{enumerable:!0,get:a(function(){return tH.JWT},"get")});var rH=fS();Object.defineProperty(ye,"Impersonated",{enumerable:!0,get:a(function(){return rH.Impersonated},"get")});var tT=xi();Object.defineProperty(ye,"CodeChallengeMethod",{enumerable:!0,get:a(function(){return tT.CodeChallengeMethod},"get")});Object.defineProperty(ye,"OAuth2Client",{enumerable:!0,get:a(function(){return tT.OAuth2Client},"get")});Object.defineProperty(ye,"ClientAuthentication",{enumerable:!0,get:a(function(){return tT.ClientAuthentication},"get")});var nH=UE();Object.defineProperty(ye,"LoginTicket",{enumerable:!0,get:a(function(){return nH.LoginTicket},"get")});var oH=dS();Object.defineProperty(ye,"UserRefreshClient",{enumerable:!0,get:a(function(){return oH.UserRefreshClient},"get")});var iH=kS();Object.defineProperty(ye,"AwsClient",{enumerable:!0,get:a(function(){return iH.AwsClient},"get")});var aH=RS();Object.defineProperty(ye,"AwsRequestSigner",{enumerable:!0,get:a(function(){return aH.AwsRequestSigner},"get")});var sH=AS();Object.defineProperty(ye,"IdentityPoolClient",{enumerable:!0,get:a(function(){return sH.IdentityPoolClient},"get")});var cH=VS();Object.defineProperty(ye,"ExternalAccountClient",{enumerable:!0,get:a(function(){return cH.ExternalAccountClient},"get")});var uH=Uo();Object.defineProperty(ye,"BaseExternalAccountClient",{enumerable:!0,get:a(function(){return uH.BaseExternalAccountClient},"get")});var lH=X$();Object.defineProperty(ye,"DownscopedClient",{enumerable:!0,get:a(function(){return lH.DownscopedClient},"get")});var rD=BS();Object.defineProperty(ye,"PluggableAuthClient",{enumerable:!0,get:a(function(){return rD.PluggableAuthClient},"get")});Object.defineProperty(ye,"ExecutableError",{enumerable:!0,get:a(function(){return rD.ExecutableError},"get")});var nD=ZS();Object.defineProperty(ye,"EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE",{enumerable:!0,get:a(function(){return nD.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE},"get")});Object.defineProperty(ye,"ExternalAccountAuthorizedUserClient",{enumerable:!0,get:a(function(){return nD.ExternalAccountAuthorizedUserClient},"get")});var dH=Q$();Object.defineProperty(ye,"PassThroughClient",{enumerable:!0,get:a(function(){return dH.PassThroughClient},"get")});var pH=new eD.GoogleAuth;ye.auth=pH});var Xn=z((nT,oT)=>{(function(e,t){typeof nT=="object"&&typeof oT<"u"?oT.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(nT,(function(){"use strict";var e=1e3,t=6e4,n=36e5,o="millisecond",r="second",i="minute",s="hour",u="day",d="week",f="month",h="quarter",g="year",m="date",p="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,E={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:a(function(ce){var J=["th","st","nd","rd"],W=ce%100;return"["+ce+(J[(W-20)%10]||J[W]||J[0])+"]"},"ordinal")},b=a(function(ce,J,W){var ne=String(ce);return!ne||ne.length>=J?ce:""+Array(J+1-ne.length).join(W)+ce},"m"),k={s:b,z:a(function(ce){var J=-ce.utcOffset(),W=Math.abs(J),ne=Math.floor(W/60),X=W%60;return(J<=0?"+":"-")+b(ne,2,"0")+":"+b(X,2,"0")},"z"),m:a(function ce(J,W){if(J.date()<W.date())return-ce(W,J);var ne=12*(W.year()-J.year())+(W.month()-J.month()),X=J.clone().add(ne,f),pe=W-X<0,he=J.clone().add(ne+(pe?-1:1),f);return+(-(ne+(W-X)/(pe?X-he:he-X))||0)},"t"),a:a(function(ce){return ce<0?Math.ceil(ce)||0:Math.floor(ce)},"a"),p:a(function(ce){return{M:f,y:g,w:d,d:u,D:m,h:s,m:i,s:r,ms:o,Q:h}[ce]||String(ce||"").toLowerCase().replace(/s$/,"")},"p"),u:a(function(ce){return ce===void 0},"u")},N="en",Z={};Z[N]=E;var H=a(function(ce){return ce instanceof Q},"p"),K=a(function ce(J,W,ne){var X;if(!J)return N;if(typeof J=="string"){var pe=J.toLowerCase();Z[pe]&&(X=pe),W&&(Z[pe]=W,X=pe);var he=J.split("-");if(!X&&he.length>1)return ce(he[0])}else{var Ne=J.name;Z[Ne]=J,X=Ne}return!ne&&X&&(N=X),X||!ne&&N},"t"),ee=a(function(ce,J){if(H(ce))return ce.clone();var W=typeof J=="object"?J:{};return W.date=ce,W.args=arguments,new Q(W)},"w"),se=k;se.l=K,se.i=H,se.w=function(ce,J){return ee(ce,{locale:J.$L,utc:J.$u,x:J.$x,$offset:J.$offset})};var Q=(function(){function ce(W){this.$L=K(W.locale,null,!0),this.parse(W)}a(ce,"M");var J=ce.prototype;return J.parse=function(W){this.$d=(function(ne){var X=ne.date,pe=ne.utc;if(X===null)return new Date(NaN);if(se.u(X))return new Date;if(X instanceof Date)return new Date(X);if(typeof X=="string"&&!/Z$/i.test(X)){var he=X.match(y);if(he){var Ne=he[2]-1||0,je=(he[7]||"0").substring(0,3);return pe?new Date(Date.UTC(he[1],Ne,he[3]||1,he[4]||0,he[5]||0,he[6]||0,je)):new Date(he[1],Ne,he[3]||1,he[4]||0,he[5]||0,he[6]||0,je)}}return new Date(X)})(W),this.$x=W.x||{},this.init()},J.init=function(){var W=this.$d;this.$y=W.getFullYear(),this.$M=W.getMonth(),this.$D=W.getDate(),this.$W=W.getDay(),this.$H=W.getHours(),this.$m=W.getMinutes(),this.$s=W.getSeconds(),this.$ms=W.getMilliseconds()},J.$utils=function(){return se},J.isValid=function(){return this.$d.toString()!==p},J.isSame=function(W,ne){var X=ee(W);return this.startOf(ne)<=X&&X<=this.endOf(ne)},J.isAfter=function(W,ne){return ee(W)<this.startOf(ne)},J.isBefore=function(W,ne){return this.endOf(ne)<ee(W)},J.$g=function(W,ne,X){return se.u(W)?this[ne]:this.set(X,W)},J.unix=function(){return Math.floor(this.valueOf()/1e3)},J.valueOf=function(){return this.$d.getTime()},J.startOf=function(W,ne){var X=this,pe=!!se.u(ne)||ne,he=se.p(W),Ne=a(function(pr,Xe){var ot=se.w(X.$u?Date.UTC(X.$y,Xe,pr):new Date(X.$y,Xe,pr),X);return pe?ot:ot.endOf(u)},"l"),je=a(function(pr,Xe){return se.w(X.toDate()[pr].apply(X.toDate("s"),(pe?[0,0,0,0]:[23,59,59,999]).slice(Xe)),X)},"$"),rt=this.$W,ut=this.$M,kt=this.$D,ae="set"+(this.$u?"UTC":"");switch(he){case g:return pe?Ne(1,0):Ne(31,11);case f:return pe?Ne(1,ut):Ne(0,ut+1);case d:var bt=this.$locale().weekStart||0,St=(rt<bt?rt+7:rt)-bt;return Ne(pe?kt-St:kt+(6-St),ut);case u:case m:return je(ae+"Hours",0);case s:return je(ae+"Minutes",1);case i:return je(ae+"Seconds",2);case r:return je(ae+"Milliseconds",3);default:return this.clone()}},J.endOf=function(W){return this.startOf(W,!1)},J.$set=function(W,ne){var X,pe=se.p(W),he="set"+(this.$u?"UTC":""),Ne=(X={},X[u]=he+"Date",X[m]=he+"Date",X[f]=he+"Month",X[g]=he+"FullYear",X[s]=he+"Hours",X[i]=he+"Minutes",X[r]=he+"Seconds",X[o]=he+"Milliseconds",X)[pe],je=pe===u?this.$D+(ne-this.$W):ne;if(pe===f||pe===g){var rt=this.clone().set(m,1);rt.$d[Ne](je),rt.init(),this.$d=rt.set(m,Math.min(this.$D,rt.daysInMonth())).$d}else Ne&&this.$d[Ne](je);return this.init(),this},J.set=function(W,ne){return this.clone().$set(W,ne)},J.get=function(W){return this[se.p(W)]()},J.add=function(W,ne){var X,pe=this;W=Number(W);var he=se.p(ne),Ne=a(function(ut){var kt=ee(pe);return se.w(kt.date(kt.date()+Math.round(ut*W)),pe)},"y");if(he===f)return this.set(f,this.$M+W);if(he===g)return this.set(g,this.$y+W);if(he===u)return Ne(1);if(he===d)return Ne(7);var je=(X={},X[i]=t,X[s]=n,X[r]=e,X)[he]||1,rt=this.$d.getTime()+W*je;return se.w(rt,this)},J.subtract=function(W,ne){return this.add(-1*W,ne)},J.format=function(W){var ne=this,X=this.$locale();if(!this.isValid())return X.invalidDate||p;var pe=W||"YYYY-MM-DDTHH:mm:ssZ",he=se.z(this),Ne=this.$H,je=this.$m,rt=this.$M,ut=X.weekdays,kt=X.months,ae=X.meridiem,bt=a(function(Xe,ot,T,w){return Xe&&(Xe[ot]||Xe(ne,pe))||T[ot].slice(0,w)},"h"),St=a(function(Xe){return se.s(Ne%12||12,Xe,"0")},"d"),pr=ae||function(Xe,ot,T){var w=Xe<12?"AM":"PM";return T?w.toLowerCase():w};return pe.replace(v,(function(Xe,ot){return ot||(function(T){switch(T){case"YY":return String(ne.$y).slice(-2);case"YYYY":return se.s(ne.$y,4,"0");case"M":return rt+1;case"MM":return se.s(rt+1,2,"0");case"MMM":return bt(X.monthsShort,rt,kt,3);case"MMMM":return bt(kt,rt);case"D":return ne.$D;case"DD":return se.s(ne.$D,2,"0");case"d":return String(ne.$W);case"dd":return bt(X.weekdaysMin,ne.$W,ut,2);case"ddd":return bt(X.weekdaysShort,ne.$W,ut,3);case"dddd":return ut[ne.$W];case"H":return String(Ne);case"HH":return se.s(Ne,2,"0");case"h":return St(1);case"hh":return St(2);case"a":return pr(Ne,je,!0);case"A":return pr(Ne,je,!1);case"m":return String(je);case"mm":return se.s(je,2,"0");case"s":return String(ne.$s);case"ss":return se.s(ne.$s,2,"0");case"SSS":return se.s(ne.$ms,3,"0");case"Z":return he}return null})(Xe)||he.replace(":","")}))},J.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},J.diff=function(W,ne,X){var pe,he=this,Ne=se.p(ne),je=ee(W),rt=(je.utcOffset()-this.utcOffset())*t,ut=this-je,kt=a(function(){return se.m(he,je)},"D");switch(Ne){case g:pe=kt()/12;break;case f:pe=kt();break;case h:pe=kt()/3;break;case d:pe=(ut-rt)/6048e5;break;case u:pe=(ut-rt)/864e5;break;case s:pe=ut/n;break;case i:pe=ut/t;break;case r:pe=ut/e;break;default:pe=ut}return X?pe:se.a(pe)},J.daysInMonth=function(){return this.endOf(f).$D},J.$locale=function(){return Z[this.$L]},J.locale=function(W,ne){if(!W)return this.$L;var X=this.clone(),pe=K(W,ne,!0);return pe&&(X.$L=pe),X},J.clone=function(){return se.w(this.$d,this)},J.toDate=function(){return new Date(this.valueOf())},J.toJSON=function(){return this.isValid()?this.toISOString():null},J.toISOString=function(){return this.$d.toISOString()},J.toString=function(){return this.$d.toUTCString()},ce})(),Le=Q.prototype;return ee.prototype=Le,[["$ms",o],["$s",r],["$m",i],["$H",s],["$W",u],["$M",f],["$y",g],["$D",m]].forEach((function(ce){Le[ce[1]]=function(J){return this.$g(J,ce[0],ce[1])}})),ee.extend=function(ce,J){return ce.$i||(ce(J,Q,ee),ce.$i=!0),ee},ee.locale=K,ee.isDayjs=H,ee.unix=function(ce){return ee(1e3*ce)},ee.en=Z[N],ee.Ls=Z,ee.p={},ee}))});var oD=z(iT=>{"use strict";Object.defineProperty(iT,"__esModule",{value:!0});iT.getAPI=fH;function fH(e,t,n,o){let r;if(typeof t=="string")r=t,t={};else if(typeof t=="object")r=t.version,delete t.version;else throw new Error("Argument error: Accepts only string or object");try{let i=n[r],s=new i(t,o);return Object.freeze(s)}catch(i){throw new Error(`Unable to load endpoint ${e}("${r}"): ${i.message}`)}}a(fH,"getAPI")});var aD=z((Cce,iD)=>{iD.exports=require("util").inspect});var Ku=z((Oce,xD)=>{var hT=typeof Map=="function"&&Map.prototype,aT=Object.getOwnPropertyDescriptor&&hT?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Zm=hT&&aT&&typeof aT.get=="function"?aT.get:null,sD=hT&&Map.prototype.forEach,gT=typeof Set=="function"&&Set.prototype,sT=Object.getOwnPropertyDescriptor&&gT?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Wm=gT&&sT&&typeof sT.get=="function"?sT.get:null,cD=gT&&Set.prototype.forEach,mH=typeof WeakMap=="function"&&WeakMap.prototype,Hu=mH?WeakMap.prototype.has:null,hH=typeof WeakSet=="function"&&WeakSet.prototype,Zu=hH?WeakSet.prototype.has:null,gH=typeof WeakRef=="function"&&WeakRef.prototype,uD=gH?WeakRef.prototype.deref:null,yH=Boolean.prototype.valueOf,vH=Object.prototype.toString,_H=Function.prototype.toString,bH=String.prototype.match,yT=String.prototype.slice,Mo=String.prototype.replace,EH=String.prototype.toUpperCase,lD=String.prototype.toLowerCase,_D=RegExp.prototype.test,dD=Array.prototype.concat,xn=Array.prototype.join,SH=Array.prototype.slice,pD=Math.floor,lT=typeof BigInt=="function"?BigInt.prototype.valueOf:null,cT=Object.getOwnPropertySymbols,dT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,os=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Wu=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===os||!0)?Symbol.toStringTag:null,bD=Object.prototype.propertyIsEnumerable,fD=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function mD(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||_D.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var o=e<0?-pD(-e):pD(e);if(o!==e){var r=String(o),i=yT.call(t,r.length+1);return Mo.call(r,n,"$&_")+"."+Mo.call(Mo.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Mo.call(t,n,"$&_")}a(mD,"addNumericSeparator");var pT=aD(),hD=pT.custom,gD=TD(hD)?hD:null,ED={__proto__:null,double:'"',single:"'"},TH={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};xD.exports=a(function e(t,n,o,r){var i=n||{};if(Qn(i,"quoteStyle")&&!Qn(ED,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Qn(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Qn(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Qn(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Qn(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=i.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return wD(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var d=String(t);return u?mD(t,d):d}if(typeof t=="bigint"){var f=String(t)+"n";return u?mD(t,f):f}var h=typeof i.depth>"u"?5:i.depth;if(typeof o>"u"&&(o=0),o>=h&&h>0&&typeof t=="object")return fT(t)?"[Array]":"[Object]";var g=FH(i,o);if(typeof r>"u")r=[];else if(PD(r,t)>=0)return"[Circular]";function m(W,ne,X){if(ne&&(r=SH.call(r),r.push(ne)),X){var pe={depth:i.depth};return Qn(i,"quoteStyle")&&(pe.quoteStyle=i.quoteStyle),e(W,pe,o+1,r)}return e(W,i,o+1,r)}if(a(m,"inspect"),typeof t=="function"&&!yD(t)){var p=kH(t),y=Hm(t,m);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(y.length>0?" { "+xn.call(y,", ")+" }":"")}if(TD(t)){var v=os?Mo.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):dT.call(t);return typeof t=="object"&&!os?Gu(v):v}if(MH(t)){for(var E="<"+lD.call(String(t.nodeName)),b=t.attributes||[],k=0;k<b.length;k++)E+=" "+b[k].name+"="+SD(PH(b[k].value),"double",i);return E+=">",t.childNodes&&t.childNodes.length&&(E+="..."),E+="</"+lD.call(String(t.nodeName))+">",E}if(fT(t)){if(t.length===0)return"[]";var N=Hm(t,m);return g&&!jH(N)?"["+mT(N,g)+"]":"[ "+xn.call(N,", ")+" ]"}if(xH(t)){var Z=Hm(t,m);return!("cause"in Error.prototype)&&"cause"in t&&!bD.call(t,"cause")?"{ ["+String(t)+"] "+xn.call(dD.call("[cause]: "+m(t.cause),Z),", ")+" }":Z.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+xn.call(Z,", ")+" }"}if(typeof t=="object"&&s){if(gD&&typeof t[gD]=="function"&&pT)return pT(t,{depth:h-o});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if($H(t)){var H=[];return sD&&sD.call(t,function(W,ne){H.push(m(ne,t,!0)+" => "+m(W,t))}),vD("Map",Zm.call(t),H,g)}if(zH(t)){var K=[];return cD&&cD.call(t,function(W){K.push(m(W,t))}),vD("Set",Wm.call(t),K,g)}if(DH(t))return uT("WeakMap");if(UH(t))return uT("WeakSet");if(NH(t))return uT("WeakRef");if(IH(t))return Gu(m(Number(t)));if(CH(t))return Gu(m(lT.call(t)));if(RH(t))return Gu(yH.call(t));if(AH(t))return Gu(m(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof global<"u"&&t===global)return"{ [object globalThis] }";if(!wH(t)&&!yD(t)){var ee=Hm(t,m),se=fD?fD(t)===Object.prototype:t instanceof Object||t.constructor===Object,Q=t instanceof Object?"":"null prototype",Le=!se&&Wu&&Object(t)===t&&Wu in t?yT.call(Lo(t),8,-1):Q?"Object":"",ce=se||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",J=ce+(Le||Q?"["+xn.call(dD.call([],Le||[],Q||[]),": ")+"] ":"");return ee.length===0?J+"{}":g?J+"{"+mT(ee,g)+"}":J+"{ "+xn.call(ee,", ")+" }"}return String(t)},"inspect_");function SD(e,t,n){var o=n.quoteStyle||t,r=ED[o];return r+e+r}a(SD,"wrapQuotes");function PH(e){return Mo.call(String(e),/"/g,""")}a(PH,"quote");function Ii(e){return!Wu||!(typeof e=="object"&&(Wu in e||typeof e[Wu]<"u"))}a(Ii,"canTrustToString");function fT(e){return Lo(e)==="[object Array]"&&Ii(e)}a(fT,"isArray");function wH(e){return Lo(e)==="[object Date]"&&Ii(e)}a(wH,"isDate");function yD(e){return Lo(e)==="[object RegExp]"&&Ii(e)}a(yD,"isRegExp");function xH(e){return Lo(e)==="[object Error]"&&Ii(e)}a(xH,"isError");function AH(e){return Lo(e)==="[object String]"&&Ii(e)}a(AH,"isString");function IH(e){return Lo(e)==="[object Number]"&&Ii(e)}a(IH,"isNumber");function RH(e){return Lo(e)==="[object Boolean]"&&Ii(e)}a(RH,"isBoolean");function TD(e){if(os)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!dT)return!1;try{return dT.call(e),!0}catch{}return!1}a(TD,"isSymbol");function CH(e){if(!e||typeof e!="object"||!lT)return!1;try{return lT.call(e),!0}catch{}return!1}a(CH,"isBigInt");var OH=Object.prototype.hasOwnProperty||function(e){return e in this};function Qn(e,t){return OH.call(e,t)}a(Qn,"has");function Lo(e){return vH.call(e)}a(Lo,"toStr");function kH(e){if(e.name)return e.name;var t=bH.call(_H.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}a(kH,"nameOf");function PD(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1}a(PD,"indexOf");function $H(e){if(!Zm||!e||typeof e!="object")return!1;try{Zm.call(e);try{Wm.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}a($H,"isMap");function DH(e){if(!Hu||!e||typeof e!="object")return!1;try{Hu.call(e,Hu);try{Zu.call(e,Zu)}catch{return!0}return e instanceof WeakMap}catch{}return!1}a(DH,"isWeakMap");function NH(e){if(!uD||!e||typeof e!="object")return!1;try{return uD.call(e),!0}catch{}return!1}a(NH,"isWeakRef");function zH(e){if(!Wm||!e||typeof e!="object")return!1;try{Wm.call(e);try{Zm.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}a(zH,"isSet");function UH(e){if(!Zu||!e||typeof e!="object")return!1;try{Zu.call(e,Zu);try{Hu.call(e,Hu)}catch{return!0}return e instanceof WeakSet}catch{}return!1}a(UH,"isWeakSet");function MH(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}a(MH,"isElement");function wD(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,o="... "+n+" more character"+(n>1?"s":"");return wD(yT.call(e,0,t.maxStringLength),t)+o}var r=TH[t.quoteStyle||"single"];r.lastIndex=0;var i=Mo.call(Mo.call(e,r,"\\$1"),/[\x00-\x1f]/g,LH);return SD(i,"single",t)}a(wD,"inspectString");function LH(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+EH.call(t.toString(16))}a(LH,"lowbyte");function Gu(e){return"Object("+e+")"}a(Gu,"markBoxed");function uT(e){return e+" { ? }"}a(uT,"weakCollectionOf");function vD(e,t,n,o){var r=o?mT(n,o):xn.call(n,", ");return e+" ("+t+") {"+r+"}"}a(vD,"collectionOf");function jH(e){for(var t=0;t<e.length;t++)if(PD(e[t],`
|
|
56
|
+
`)>=0)return!1;return!0}a(jH,"singleLineValues");function FH(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=xn.call(Array(e.indent+1)," ");else return null;return{base:n,prev:xn.call(Array(t+1),n)}}a(FH,"getIndent");function mT(e,t){if(e.length===0)return"";var n=`
|
|
57
|
+
`+t.prev+t.base;return n+xn.call(e,","+n)+`
|
|
58
|
+
`+t.prev}a(mT,"indentedJoin");function Hm(e,t){var n=fT(e),o=[];if(n){o.length=e.length;for(var r=0;r<e.length;r++)o[r]=Qn(e,r)?t(e[r],e):""}var i=typeof cT=="function"?cT(e):[],s;if(os){s={};for(var u=0;u<i.length;u++)s["$"+i[u]]=i[u]}for(var d in e)Qn(e,d)&&(n&&String(Number(d))===d&&d<e.length||os&&s["$"+d]instanceof Symbol||(_D.call(/[^\w$]/,d)?o.push(t(d,e)+": "+t(e[d],e)):o.push(d+": "+t(e[d],e))));if(typeof cT=="function")for(var f=0;f<i.length;f++)bD.call(e,i[f])&&o.push("["+t(i[f])+"]: "+t(e[i[f]],e));return o}a(Hm,"arrObjKeys")});var ID=z(($ce,AD)=>{"use strict";var BH=Ku(),qH=Io(),Km=a(function(e,t,n){for(var o=e,r;(r=o.next)!=null;o=r)if(r.key===t)return o.next=r.next,n||(r.next=e.next,e.next=r),r},"listGetNode"),VH=a(function(e,t){if(e){var n=Km(e,t);return n&&n.value}},"listGet"),GH=a(function(e,t,n){var o=Km(e,t);o?o.value=n:e.next={key:t,next:e.next,value:n}},"listSet"),HH=a(function(e,t){return e?!!Km(e,t):!1},"listHas"),ZH=a(function(e,t){if(e)return Km(e,t,!0)},"listDelete");AD.exports=a(function(){var t,n={assert:a(function(o){if(!n.has(o))throw new qH("Side channel does not contain "+BH(o))},"assert"),delete:a(function(o){var r=ZH(t,o);return r&&t&&!t.next&&(t=void 0),!!r},"delete"),get:a(function(o){return VH(t,o)},"get"),has:a(function(o){return HH(t,o)},"has"),set:a(function(o,r){t||(t={next:void 0}),GH(t,o,r)},"set")};return n},"getSideChannelList")});var vT=z((Nce,OD)=>{"use strict";var RD=du(),CD=Ab(),WH=CD([RD("%String.prototype.indexOf%")]);OD.exports=a(function(t,n){var o=RD(t,!!n);return typeof o=="function"&&WH(t,".prototype.")>-1?CD([o]):o},"callBoundIntrinsic")});var _T=z((Uce,$D)=>{"use strict";var KH=du(),Ju=vT(),JH=Ku(),YH=Io(),kD=KH("%Map%",!0),XH=Ju("Map.prototype.get",!0),QH=Ju("Map.prototype.set",!0),eZ=Ju("Map.prototype.has",!0),tZ=Ju("Map.prototype.delete",!0),rZ=Ju("Map.prototype.size",!0);$D.exports=!!kD&&a(function(){var t,n={assert:a(function(o){if(!n.has(o))throw new YH("Side channel does not contain "+JH(o))},"assert"),delete:a(function(o){if(t){var r=tZ(t,o);return rZ(t)===0&&(t=void 0),r}return!1},"delete"),get:a(function(o){if(t)return XH(t,o)},"get"),has:a(function(o){return t?eZ(t,o):!1},"has"),set:a(function(o,r){t||(t=new kD),QH(t,o,r)},"set")};return n},"getSideChannelMap")});var ND=z((Lce,DD)=>{"use strict";var nZ=du(),Ym=vT(),oZ=Ku(),Jm=_T(),iZ=Io(),is=nZ("%WeakMap%",!0),aZ=Ym("WeakMap.prototype.get",!0),sZ=Ym("WeakMap.prototype.set",!0),cZ=Ym("WeakMap.prototype.has",!0),uZ=Ym("WeakMap.prototype.delete",!0);DD.exports=is?a(function(){var t,n,o={assert:a(function(r){if(!o.has(r))throw new iZ("Side channel does not contain "+oZ(r))},"assert"),delete:a(function(r){if(is&&r&&(typeof r=="object"||typeof r=="function")){if(t)return uZ(t,r)}else if(Jm&&n)return n.delete(r);return!1},"delete"),get:a(function(r){return is&&r&&(typeof r=="object"||typeof r=="function")&&t?aZ(t,r):n&&n.get(r)},"get"),has:a(function(r){return is&&r&&(typeof r=="object"||typeof r=="function")&&t?cZ(t,r):!!n&&n.has(r)},"has"),set:a(function(r,i){is&&r&&(typeof r=="object"||typeof r=="function")?(t||(t=new is),sZ(t,r,i)):Jm&&(n||(n=Jm()),n.set(r,i))},"set")};return o},"getSideChannelWeakMap"):Jm});var bT=z((Fce,zD)=>{"use strict";var lZ=Io(),dZ=Ku(),pZ=ID(),fZ=_T(),mZ=ND(),hZ=mZ||fZ||pZ;zD.exports=a(function(){var t,n={assert:a(function(o){if(!n.has(o))throw new lZ("Side channel does not contain "+dZ(o))},"assert"),delete:a(function(o){return!!t&&t.delete(o)},"delete"),get:a(function(o){return t&&t.get(o)},"get"),has:a(function(o){return!!t&&t.has(o)},"has"),set:a(function(o,r){t||(t=hZ()),t.set(o,r)},"set")};return n},"getSideChannel")});var Xm=z((qce,UD)=>{"use strict";var gZ=String.prototype.replace,yZ=/%20/g,ET={RFC1738:"RFC1738",RFC3986:"RFC3986"};UD.exports={default:ET.RFC3986,formatters:{RFC1738:a(function(e){return gZ.call(e,yZ,"+")},"RFC1738"),RFC3986:a(function(e){return String(e)},"RFC3986")},RFC1738:ET.RFC1738,RFC3986:ET.RFC3986}});var wT=z((Gce,MD)=>{"use strict";var vZ=Xm(),_Z=bT(),ST=Object.prototype.hasOwnProperty,Ri=Array.isArray,Qm=_Z(),as=a(function(t,n){return Qm.set(t,n),t},"markOverflow"),Ci=a(function(t){return Qm.has(t)},"isOverflow"),Yu=a(function(t){return Qm.get(t)},"getMaxIndex"),PT=a(function(t,n){Qm.set(t,n)},"setMaxIndex"),An=(function(){for(var e=[],t=0;t<256;++t)e[e.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return e})(),bZ=a(function(t){for(;t.length>1;){var n=t.pop(),o=n.obj[n.prop];if(Ri(o)){for(var r=[],i=0;i<o.length;++i)typeof o[i]<"u"&&(r[r.length]=o[i]);n.obj[n.prop]=r}}},"compactQueue"),Xu=a(function(t,n){for(var o=n&&n.plainObjects?{__proto__:null}:{},r=0;r<t.length;++r)typeof t[r]<"u"&&(o[r]=t[r]);return o},"arrayToObject"),EZ=a(function e(t,n,o){if(!n)return t;if(typeof n!="object"&&typeof n!="function"){if(Ri(t)){var r=t.length;if(o&&typeof o.arrayLimit=="number"&&r>o.arrayLimit)return as(Xu(t.concat(n),o),r);t[r]=n}else if(t&&typeof t=="object")if(Ci(t)){var i=Yu(t)+1;t[i]=n,PT(t,i)}else{if(o&&o.strictMerge)return[t,n];(o&&(o.plainObjects||o.allowPrototypes)||!ST.call(Object.prototype,n))&&(t[n]=!0)}else return[t,n];return t}if(!t||typeof t!="object"){if(Ci(n)){for(var s=Object.keys(n),u=o&&o.plainObjects?{__proto__:null,0:t}:{0:t},d=0;d<s.length;d++){var f=parseInt(s[d],10);u[f+1]=n[s[d]]}return as(u,Yu(n)+1)}var h=[t].concat(n);return o&&typeof o.arrayLimit=="number"&&h.length>o.arrayLimit?as(Xu(h,o),h.length-1):h}var g=t;return Ri(t)&&!Ri(n)&&(g=Xu(t,o)),Ri(t)&&Ri(n)?(n.forEach(function(m,p){if(ST.call(t,p)){var y=t[p];y&&typeof y=="object"&&m&&typeof m=="object"?t[p]=e(y,m,o):t[t.length]=m}else t[p]=m}),t):Object.keys(n).reduce(function(m,p){var y=n[p];if(ST.call(m,p)?m[p]=e(m[p],y,o):m[p]=y,Ci(n)&&!Ci(m)&&as(m,Yu(n)),Ci(m)){var v=parseInt(p,10);String(v)===p&&v>=0&&v>Yu(m)&&PT(m,v)}return m},g)},"merge"),SZ=a(function(t,n){return Object.keys(n).reduce(function(o,r){return o[r]=n[r],o},t)},"assignSingleSource"),TZ=a(function(e,t,n){var o=e.replace(/\+/g," ");if(n==="iso-8859-1")return o.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(o)}catch{return o}},"decode"),TT=1024,PZ=a(function(t,n,o,r,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),o==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(p){return"%26%23"+parseInt(p.slice(2),16)+"%3B"});for(var u="",d=0;d<s.length;d+=TT){for(var f=s.length>=TT?s.slice(d,d+TT):s,h=[],g=0;g<f.length;++g){var m=f.charCodeAt(g);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||i===vZ.RFC1738&&(m===40||m===41)){h[h.length]=f.charAt(g);continue}if(m<128){h[h.length]=An[m];continue}if(m<2048){h[h.length]=An[192|m>>6]+An[128|m&63];continue}if(m<55296||m>=57344){h[h.length]=An[224|m>>12]+An[128|m>>6&63]+An[128|m&63];continue}g+=1,m=65536+((m&1023)<<10|f.charCodeAt(g)&1023),h[h.length]=An[240|m>>18]+An[128|m>>12&63]+An[128|m>>6&63]+An[128|m&63]}u+=h.join("")}return u},"encode"),wZ=a(function(t){for(var n=[{obj:{o:t},prop:"o"}],o=[],r=0;r<n.length;++r)for(var i=n[r],s=i.obj[i.prop],u=Object.keys(s),d=0;d<u.length;++d){var f=u[d],h=s[f];typeof h=="object"&&h!==null&&o.indexOf(h)===-1&&(n[n.length]={obj:s,prop:f},o[o.length]=h)}return bZ(n),t},"compact"),xZ=a(function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},"isRegExp"),AZ=a(function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},"isBuffer"),IZ=a(function(t,n,o,r){if(Ci(t)){var i=Yu(t)+1;return t[i]=n,PT(t,i),t}var s=[].concat(t,n);return s.length>o?as(Xu(s,{plainObjects:r}),s.length-1):s},"combine"),RZ=a(function(t,n){if(Ri(t)){for(var o=[],r=0;r<t.length;r+=1)o[o.length]=n(t[r]);return o}return n(t)},"maybeMap");MD.exports={arrayToObject:Xu,assign:SZ,combine:IZ,compact:wZ,decode:TZ,encode:PZ,isBuffer:AZ,isOverflow:Ci,isRegExp:xZ,markOverflow:as,maybeMap:RZ,merge:EZ}});var VD=z((Zce,qD)=>{"use strict";var jD=bT(),eh=wT(),Qu=Xm(),CZ=Object.prototype.hasOwnProperty,FD={brackets:a(function(t){return t+"[]"},"brackets"),comma:"comma",indices:a(function(t,n){return t+"["+n+"]"},"indices"),repeat:a(function(t){return t},"repeat")},In=Array.isArray,OZ=Array.prototype.push,BD=a(function(e,t){OZ.apply(e,In(t)?t:[t])},"pushToArray"),kZ=Date.prototype.toISOString,LD=Qu.default,Ot={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:eh.encode,encodeValuesOnly:!1,filter:void 0,format:LD,formatter:Qu.formatters[LD],indices:!1,serializeDate:a(function(t){return kZ.call(t)},"serializeDate"),skipNulls:!1,strictNullHandling:!1},$Z=a(function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},"isNonNullishPrimitive"),xT={},DZ=a(function e(t,n,o,r,i,s,u,d,f,h,g,m,p,y,v,E,b,k){for(var N=t,Z=k,H=0,K=!1;(Z=Z.get(xT))!==void 0&&!K;){var ee=Z.get(t);if(H+=1,typeof ee<"u"){if(ee===H)throw new RangeError("Cyclic object value");K=!0}typeof Z.get(xT)>"u"&&(H=0)}if(typeof h=="function"?N=h(n,N):N instanceof Date?N=p(N):o==="comma"&&In(N)&&(N=eh.maybeMap(N,function(rt){return rt instanceof Date?p(rt):rt})),N===null){if(s)return f&&!E?f(n,Ot.encoder,b,"key",y):n;N=""}if($Z(N)||eh.isBuffer(N)){if(f){var se=E?n:f(n,Ot.encoder,b,"key",y);return[v(se)+"="+v(f(N,Ot.encoder,b,"value",y))]}return[v(n)+"="+v(String(N))]}var Q=[];if(typeof N>"u")return Q;var Le;if(o==="comma"&&In(N))E&&f&&(N=eh.maybeMap(N,f)),Le=[{value:N.length>0?N.join(",")||null:void 0}];else if(In(h))Le=h;else{var ce=Object.keys(N);Le=g?ce.sort(g):ce}var J=d?String(n).replace(/\./g,"%2E"):String(n),W=r&&In(N)&&N.length===1?J+"[]":J;if(i&&In(N)&&N.length===0)return W+"[]";for(var ne=0;ne<Le.length;++ne){var X=Le[ne],pe=typeof X=="object"&&X&&typeof X.value<"u"?X.value:N[X];if(!(u&&pe===null)){var he=m&&d?String(X).replace(/\./g,"%2E"):String(X),Ne=In(N)?typeof o=="function"?o(W,he):W:W+(m?"."+he:"["+he+"]");k.set(t,H);var je=jD();je.set(xT,k),BD(Q,e(pe,Ne,o,r,i,s,u,d,o==="comma"&&E&&In(N)?null:f,h,g,m,p,y,v,E,b,je))}}return Q},"stringify"),NZ=a(function(t){if(!t)return Ot;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||Ot.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var o=Qu.default;if(typeof t.format<"u"){if(!CZ.call(Qu.formatters,t.format))throw new TypeError("Unknown format option provided.");o=t.format}var r=Qu.formatters[o],i=Ot.filter;(typeof t.filter=="function"||In(t.filter))&&(i=t.filter);var s;if(t.arrayFormat in FD?s=t.arrayFormat:"indices"in t?s=t.indices?"indices":"repeat":s=Ot.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:Ot.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Ot.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Ot.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ot.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Ot.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Ot.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Ot.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Ot.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Ot.encodeValuesOnly,filter:i,format:o,formatter:r,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Ot.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Ot.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ot.strictNullHandling}},"normalizeStringifyOptions");qD.exports=function(e,t){var n=e,o=NZ(t),r,i;typeof o.filter=="function"?(i=o.filter,n=i("",n)):In(o.filter)&&(i=o.filter,r=i);var s=[];if(typeof n!="object"||n===null)return"";var u=FD[o.arrayFormat],d=u==="comma"&&o.commaRoundTrip;r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var f=jD(),h=0;h<r.length;++h){var g=r[h],m=n[g];o.skipNulls&&m===null||BD(s,DZ(m,g,u,d,o.allowEmptyArrays,o.strictNullHandling,o.skipNulls,o.encodeDotInKeys,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,f))}var p=s.join(o.delimiter),y=o.addQueryPrefix===!0?"?":"";return o.charsetSentinel&&(o.charset==="iso-8859-1"?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),p.length>0?y+p:""}});var ZD=z((Kce,HD)=>{"use strict";var Rn=wT(),th=Object.prototype.hasOwnProperty,AT=Array.isArray,_t={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Rn.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},zZ=a(function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},"interpretNumericEntities"),GD=a(function(e,t,n){if(e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(t.arrayLimit===1?"":"s")+" allowed in an array.");return e},"parseArrayValue"),UZ="utf8=%26%2310003%3B",MZ="utf8=%E2%9C%93",LZ=a(function(t,n){var o={__proto__:null},r=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;r=r.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=r.split(n.delimiter,n.throwOnLimitExceeded&&typeof i<"u"?i+1:i);if(n.throwOnLimitExceeded&&typeof i<"u"&&s.length>i)throw new RangeError("Parameter limit exceeded. Only "+i+" parameter"+(i===1?"":"s")+" allowed.");var u=-1,d,f=n.charset;if(n.charsetSentinel)for(d=0;d<s.length;++d)s[d].indexOf("utf8=")===0&&(s[d]===MZ?f="utf-8":s[d]===UZ&&(f="iso-8859-1"),u=d,d=s.length);for(d=0;d<s.length;++d)if(d!==u){var h=s[d],g=h.indexOf("]="),m=g===-1?h.indexOf("="):g+1,p,y;if(m===-1?(p=n.decoder(h,_t.decoder,f,"key"),y=n.strictNullHandling?null:""):(p=n.decoder(h.slice(0,m),_t.decoder,f,"key"),p!==null&&(y=Rn.maybeMap(GD(h.slice(m+1),n,AT(o[p])?o[p].length:0),function(E){return n.decoder(E,_t.decoder,f,"value")}))),y&&n.interpretNumericEntities&&f==="iso-8859-1"&&(y=zZ(String(y))),h.indexOf("[]=")>-1&&(y=AT(y)?[y]:y),n.comma&&AT(y)&&y.length>n.arrayLimit){if(n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(n.arrayLimit===1?"":"s")+" allowed in an array.");y=Rn.combine([],y,n.arrayLimit,n.plainObjects)}if(p!==null){var v=th.call(o,p);v&&(n.duplicates==="combine"||h.indexOf("[]=")>-1)?o[p]=Rn.combine(o[p],y,n.arrayLimit,n.plainObjects):(!v||n.duplicates==="last")&&(o[p]=y)}}return o},"parseQueryStringValues"),jZ=a(function(e,t,n,o){var r=0;if(e.length>0&&e[e.length-1]==="[]"){var i=e.slice(0,-1).join("");r=Array.isArray(t)&&t[i]?t[i].length:0}for(var s=o?t:GD(t,n,r),u=e.length-1;u>=0;--u){var d,f=e[u];if(f==="[]"&&n.parseArrays)Rn.isOverflow(s)?d=s:d=n.allowEmptyArrays&&(s===""||n.strictNullHandling&&s===null)?[]:Rn.combine([],s,n.arrayLimit,n.plainObjects);else{d=n.plainObjects?{__proto__:null}:{};var h=f.charAt(0)==="["&&f.charAt(f.length-1)==="]"?f.slice(1,-1):f,g=n.decodeDotInKeys?h.replace(/%2E/g,"."):h,m=parseInt(g,10),p=!isNaN(m)&&f!==g&&String(m)===g&&m>=0&&n.parseArrays;if(!n.parseArrays&&g==="")d={0:s};else if(p&&m<n.arrayLimit)d=[],d[m]=s;else{if(p&&n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(n.arrayLimit===1?"":"s")+" allowed in an array.");p?(d[m]=s,Rn.markOverflow(d,m)):g!=="__proto__"&&(d[g]=s)}}s=d}return s},"parseObject"),FZ=a(function(t,n){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t;if(n.depth<=0)return!n.plainObjects&&th.call(Object.prototype,o)&&!n.allowPrototypes?void 0:[o];var r=/(\[[^[\]]*])/,i=/(\[[^[\]]*])/g,s=r.exec(o),u=s?o.slice(0,s.index):o,d=[];if(u){if(!n.plainObjects&&th.call(Object.prototype,u)&&!n.allowPrototypes)return;d[d.length]=u}for(var f=0;(s=i.exec(o))!==null&&f<n.depth;){f+=1;var h=s[1].slice(1,-1);if(!n.plainObjects&&th.call(Object.prototype,h)&&!n.allowPrototypes)return;d[d.length]=s[1]}if(s){if(n.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");d[d.length]="["+o.slice(s.index)+"]"}return d},"splitKeyIntoSegments"),BZ=a(function(t,n,o,r){if(t){var i=FZ(t,o);if(i)return jZ(i,n,o,r)}},"parseQueryStringKeys"),qZ=a(function(t){if(!t)return _t;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof t.throwOnLimitExceeded<"u"&&typeof t.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var n=typeof t.charset>"u"?_t.charset:t.charset,o=typeof t.duplicates>"u"?_t.duplicates:t.duplicates;if(o!=="combine"&&o!=="first"&&o!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var r=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:_t.allowDots:!!t.allowDots;return{allowDots:r,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:_t.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:_t.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:_t.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:_t.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:_t.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:_t.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:_t.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:_t.decoder,delimiter:typeof t.delimiter=="string"||Rn.isRegExp(t.delimiter)?t.delimiter:_t.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:_t.depth,duplicates:o,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:_t.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:_t.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:_t.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:_t.strictDepth,strictMerge:typeof t.strictMerge=="boolean"?!!t.strictMerge:_t.strictMerge,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:_t.strictNullHandling,throwOnLimitExceeded:typeof t.throwOnLimitExceeded=="boolean"?t.throwOnLimitExceeded:!1}},"normalizeParseOptions");HD.exports=function(e,t){var n=qZ(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?{__proto__:null}:{};for(var o=typeof e=="string"?LZ(e,n):e,r=n.plainObjects?{__proto__:null}:{},i=Object.keys(o),s=0;s<i.length;++s){var u=i[s],d=BZ(u,o[u],n,typeof e=="string");r=Rn.merge(r,d,n)}return n.allowSparse===!0?r:Rn.compact(r)}});var IT=z((Yce,WD)=>{"use strict";var VZ=VD(),GZ=ZD(),HZ=Xm();WD.exports={formats:HZ,parse:GZ,stringify:VZ}});var JD=z((RT,KD)=>{(function(e,t){typeof RT=="object"?KD.exports=t():typeof define=="function"&&define.amd?define([],t):e.urltemplate=t()})(RT,function(){function e(){}return a(e,"UrlTemplate"),e.prototype.encodeReserved=function(t){return t.split(/(%[0-9A-Fa-f]{2})/g).map(function(n){return/%[0-9A-Fa-f]/.test(n)||(n=encodeURI(n).replace(/%5B/g,"[").replace(/%5D/g,"]")),n}).join("")},e.prototype.encodeUnreserved=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16).toUpperCase()})},e.prototype.encodeValue=function(t,n,o){return n=t==="+"||t==="#"?this.encodeReserved(n):this.encodeUnreserved(n),o?this.encodeUnreserved(o)+"="+n:n},e.prototype.isDefined=function(t){return t!=null},e.prototype.isKeyOperator=function(t){return t===";"||t==="&"||t==="?"},e.prototype.getValues=function(t,n,o,r){var i=t[o],s=[];if(this.isDefined(i)&&i!=="")if(typeof i=="string"||typeof i=="number"||typeof i=="boolean")i=i.toString(),r&&r!=="*"&&(i=i.substring(0,parseInt(r,10))),s.push(this.encodeValue(n,i,this.isKeyOperator(n)?o:null));else if(r==="*")Array.isArray(i)?i.filter(this.isDefined).forEach(function(d){s.push(this.encodeValue(n,d,this.isKeyOperator(n)?o:null))},this):Object.keys(i).forEach(function(d){this.isDefined(i[d])&&s.push(this.encodeValue(n,i[d],d))},this);else{var u=[];Array.isArray(i)?i.filter(this.isDefined).forEach(function(d){u.push(this.encodeValue(n,d))},this):Object.keys(i).forEach(function(d){this.isDefined(i[d])&&(u.push(this.encodeUnreserved(d)),u.push(this.encodeValue(n,i[d].toString())))},this),this.isKeyOperator(n)?s.push(this.encodeUnreserved(o)+"="+u.join(",")):u.length!==0&&s.push(u.join(","))}else n===";"?this.isDefined(i)&&s.push(this.encodeUnreserved(o)):i===""&&(n==="&"||n==="?")?s.push(this.encodeUnreserved(o)+"="):i===""&&s.push("");return s},e.prototype.parse=function(t){var n=this,o=["+","#",".","/",";","?","&"];return{expand:a(function(r){return t.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(i,s,u){if(s){var d=null,f=[];if(o.indexOf(s.charAt(0))!==-1&&(d=s.charAt(0),s=s.substr(1)),s.split(/,/g).forEach(function(g){var m=/([^:\*]*)(?::(\d+)|(\*))?/.exec(g);f.push.apply(f,n.getValues(r,d,m[1],m[2]||m[3]))}),d&&d!=="+"){var h=",";return d==="?"?h="&":d!=="#"&&(h=d),(f.length!==0?d:"")+f.join(h)}else return f.join(",")}else return n.encodeReserved(u)})},"expand")}},new e})});var YD=z(CT=>{"use strict";Object.defineProperty(CT,"__esModule",{value:!0});CT.isBrowser=ZZ;function ZZ(){return typeof window<"u"}a(ZZ,"isBrowser")});var nh=z(rh=>{"use strict";Object.defineProperty(rh,"__esModule",{value:!0});rh.headersToClassicHeaders=XD;rh.marshallGaxiosResponse=WZ;function XD(e){let t={};if(e instanceof Headers)e.forEach((n,o)=>{t[o]=n});else if(Array.isArray(e))for(let[n,o]of e)t[n]=o;else t=e||{};return t}a(XD,"headersToClassicHeaders");function WZ(e){return Object.defineProperties(e||{},{headers:{configurable:!0,writable:!0,enumerable:!0,value:XD(e?.headers)}})}a(WZ,"marshallGaxiosResponse")});var tN=z(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.sessions=void 0;Or.request=sW;Or.closeSession=OT;var eN=require("http2"),KZ=require("zlib"),JZ=require("url"),YZ=IT(),XZ=fu(),QZ=require("stream"),eW=require("util"),tW=require("process"),rW=nh(),{HTTP2_HEADER_CONTENT_ENCODING:nW,HTTP2_HEADER_CONTENT_TYPE:QD,HTTP2_HEADER_METHOD:oW,HTTP2_HEADER_PATH:iW,HTTP2_HEADER_STATUS:aW}=eN.constants,el=!!tW.env.HTTP2_DEBUG;Or.sessions={};async function sW(e){let t=XZ(!0,{},e);t.validateStatus=t.validateStatus||cW,t.responseType=t.responseType||"json";let n=new JZ.URL(t.url),o=uW(n.host);o.timeoutHandle!==void 0&&clearTimeout(o.timeoutHandle);let r=n.pathname;if(e.params&&Object.keys(e.params).length>0){let g=(e.paramsSerializer||YZ.stringify)(t.params);r+=`?${g}`}let i=(0,rW.headersToClassicHeaders)(t.headers);i[iW]=r,i[oW]=e.method||"GET",t.headers=i,i[QD]||t.responseType!=="text"&&(i[QD]="application/json");let s={config:e,headers:{},status:0,data:{},statusText:""},u=[],d=o.session,f;return new Promise((h,g)=>{try{f=d.request(i).on("response",m=>{Object.assign(s,{headers:m,status:m[aW]});let p=f;if(m[nW]==="gzip"&&(p=f.pipe(KZ.createGunzip())),t.responseType==="stream"){s.data=p,h(s);return}p.on("data",y=>{u.push(y)}).on("error",y=>{g(y)}).on("end",()=>{let y=Buffer.concat(u),v=y;if(y){if(t.responseType==="json")try{v=JSON.parse(y.toString("utf8"))}catch{v=y.toString("utf8")}else t.responseType==="text"?v=y.toString("utf8"):t.responseType==="arraybuffer"&&(v=y.buffer);s.data=v}if(!t.validateStatus(s.status)){let E=`Request failed with status code ${s.status}. `;if(s.data&&typeof s.data=="object"){let b=eW.inspect(s.data,{depth:5});E=`${E}
|
|
59
|
+
'${b}`}g(new Error(E,{cause:s}))}h(s)})}).on("error",m=>{g(m)})}catch(m){OT(n).then(()=>g(m)).catch(g);return}if(s.request=f,e.data){if(e.data instanceof QZ.Stream)e.data.pipe(f);else if(typeof e.data=="string"){let m=Buffer.from(e.data);f.end(m)}else if(typeof e.data=="object"){let m=JSON.stringify(e.data);f.end(m)}}o.timeoutHandle=setTimeout(()=>OT(n),500)})}a(sW,"request");function cW(e){return e>=200&&e<300}a(cW,"validateStatus");function uW(e){if(Or.sessions[e])el&&console.log(`Used cached client for ${e}`);else{el&&console.log(`Creating client for ${e}`);let t=eN.connect(`https://${e}`);t.on("error",n=>{console.error(`*ERROR*: ${n}`),delete Or.sessions[e]}).on("goaway",(n,o)=>{console.error(`*GOAWAY*: ${n} : ${o}`),delete Or.sessions[e]}),Or.sessions[e]={session:t}}return Or.sessions[e]}a(uW,"_getClient");async function OT(e){let t=Or.sessions[e.host];if(!t)return;let{session:n}=t;delete Or.sessions[e.host],el&&console.error(`Closing ${e.host}`),n.close(()=>{el&&console.error(`Closed ${e.host}`)}),setTimeout(()=>{n&&!n.destroyed&&(el&&console.log(`Forcing close ${e.host}`),n&&n.destroy())},1e3)}a(OT,"closeSession")});var rN=z((iue,lW)=>{lW.exports={name:"googleapis-common",version:"8.0.2",description:"A common tooling library used by the googleapis npm module. You probably don't want to use this directly.",repository:{type:"git",directory:"packages/nodejs-googleapis-common",url:"https://github.com/googleapis/google-cloud-node-core.git"},main:"build/src/index.js",types:"build/src/index.d.ts",files:["build/src","!build/src/**/*.map"],scripts:{prebenchmark:"npm run compile",benchmark:"node build/benchmark/bench.js",compile:"tsc -p .",test:"c8 mocha build/test","system-test":"c8 mocha build/system-test --timeout 600000","presystem-test":"npm run compile",fix:"gts fix",prepare:"npm run compile",pretest:"npm run compile",lint:"gts check","samples-test":"mocha build/samples-test",docs:"jsdoc -c .jsdoc.js",webpack:"webpack","browser-test":"karma start",prelint:"cd samples; npm link ../; npm install",clean:"gts clean",precompile:"gts clean"},keywords:[],author:"Google LLC",license:"Apache-2.0",dependencies:{extend:"^3.0.2",gaxios:"7.1.3","google-auth-library":"10.5.0","google-logging-utils":"1.1.3",qs:"^6.7.0","url-template":"^2.0.8"},devDependencies:{"@babel/plugin-proposal-private-methods":"^7.18.6","@types/extend":"^3.0.1","@types/mocha":"^10.0.10","@types/mv":"^2.1.0","@types/ncp":"^2.0.8","@types/nock":"^11.0.0","@types/proxyquire":"^1.3.31","@types/qs":"^6.5.3","@types/sinon":"^21.0.0","@types/tmp":"^0.2.6","@types/url-template":"^2.0.28",c8:"^10.1.3",codecov:"^3.8.3",gts:"^6.0.2",http2spy:"^2.0.0","is-docker":"^3.0.0",jsdoc:"^4.0.4","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1",mocha:"^11.1.0",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.5","null-loader":"^4.0.1","path-to-regexp":"^6.0.0",proxyquire:"^2.1.3",puppeteer:"^24.0.0",sinon:"21.0.3",tmp:"0.2.5","ts-loader":"^9.5.2",typescript:"5.8.3",webpack:"^5.97.1","webpack-cli":"^6.0.1"},engines:{node:">=18.0.0"},homepage:"https://github.com/googleapis/google-cloud-node-core/tree/main/packages/nodejs-googleapis-common"}});var oh=z(zT=>{"use strict";Object.defineProperty(zT,"__esModule",{value:!0});zT.createAPIRequest=hW;var kT=Pt(),dW=IT(),sN=require("stream"),nN=JD(),oN=fu(),DT=YD(),pW=tN(),$T=nh(),cN=rN(),iN=a(()=>globalThis.crypto?.randomUUID()||require("crypto").randomUUID(),"randomUUID");function fW(e){return e!==null&&typeof e=="object"&&typeof e.pipe=="function"&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object"}a(fW,"isReadableStream");function mW(e,t){let n=new Array;return t.forEach(o=>{e[o]===void 0&&n.push(o)}),n.length>0?n:null}a(mW,"getMissingParams");function hW(e,t){if(t)aN(e).then(n=>t(null,n),t);else return aN(e)}a(hW,"createAPIRequest");async function aN(e){let t=oN(!0,{},e.context.google?._options||{},e.context._options||{},e.options),n=oN(!0,{},t.params,e.params);t.userAgentDirectives=t.userAgentDirectives||[];let o=n.media||{},r=n.requestBody;!n.requestBody&&n.resource&&(!e.requiredParams.includes("resource")||typeof n.resource!="string")&&(r=n.resource,delete n.resource),delete n.requestBody;let i=n.auth||t.auth,s=typeof o.body=="string"?"text/plain":"application/octet-stream";delete n.media,delete n.auth;let u=(0,$T.headersToClassicHeaders)(n.headers||{});gW(u,t.apiVersion),delete n.headers,Object.keys(n).forEach(p=>{if(p.slice(-1)==="_"){let y=p.slice(0,-1);n[y]=n[p],delete n[p]}});let d=mW(n,e.requiredParams);if(d)throw new Error("Missing required parameters: "+d.join(", "));if(t.url){let p=t.url;typeof p=="object"&&(p=p.toString()),t.url=nN.parse(p).expand(n)}if(e.mediaUrl&&(e.mediaUrl=nN.parse(e.mediaUrl).expand(n)),e.context._options.rootUrl!==void 0&&t.url!==void 0){let p=new URL(t.url),y=p.href.substr(p.origin.length);t.url=new URL(y,e.context._options.rootUrl).href}t.paramsSerializer=p=>dW.stringify(p,{arrayFormat:"repeat"}),e.pathParams.forEach(p=>delete n[p]),typeof i=="string"&&(n.key=n.key||i,i=void 0);function f(p){let y=iN(),v=`--${y}--`,E=new sN.PassThrough({flush(N){this.push(`\r
|
|
60
|
+
`),this.push(v),N()}}),b=new NT,k=fW(p[1].body);u["content-type"]=`multipart/related; boundary=${y}`;for(let N of p){let Z=`--${y}\r
|
|
61
|
+
content-type: ${N["content-type"]}\r
|
|
62
62
|
\r
|
|
63
|
-
`;E.push(
|
|
64
|
-
`)):(b.on("progress",
|
|
63
|
+
`;E.push(Z),typeof N.body=="string"?(E.push(N.body),E.push(`\r
|
|
64
|
+
`)):(b.on("progress",H=>{t.onUploadProgress&&t.onUploadProgress({bytesRead:H})}),N.body.pipe(b).pipe(E))}k||(E.push(v),E.push(null)),t.data=E}a(f,"multipartUpload");function h(p){let y=iN(),v=`--${y}--`;u["content-type"]=`multipart/related; boundary=${y}`;let E="";for(let b of p){let k=`--${y}\r
|
|
65
65
|
content-type: ${b["content-type"]}\r
|
|
66
66
|
\r
|
|
67
|
-
`;E+=
|
|
68
|
-
`)}E+=v,e.data=E}if(o(y,"browserMultipartUpload"),t.mediaUrl&&n.body)if(e.url=t.mediaUrl,i){r.uploadType="multipart";let l=[{"content-type":"application/json",body:JSON.stringify(i)},{"content-type":n.mimeType||i&&i.mimeType||c,body:n.body}];(0,Dm.isBrowser)()?y(l):m(l)}else r.uploadType="media",Object.assign(d,{"content-type":n.mimeType||c}),e.data=n.body;else e.data=i||void 0;if(e.headers=km.Gaxios.mergeHeaders(e.headers||{},d),e.params=r,!(0,Dm.isBrowser)()){e.headers.set("Accept-Encoding","gzip"),e.userAgentDirectives.push({product:"google-api-nodejs-client",version:YP.version,comment:"gzip"});let l=e.userAgentDirectives.map(g=>{let v=`${g.product}/${g.version}`;return g.comment&&(v+=` (${g.comment})`),v}).join(" ");e.headers.set("User-Agent",l)}if(e.validateStatus||(e.validateStatus=l=>l>=200&&l<300||l===304),e.retry=e.retry===void 0?!0:e.retry,delete e.auth,e.universeDomain&&e.universe_domain&&e.universeDomain!==e.universe_domain)throw new Error("Please set either universe_domain or universeDomain, but not both.");let h=typeof process=="object"&&typeof process.env=="object"?process.env.GOOGLE_CLOUD_UNIVERSE_DOMAIN:void 0,f=e.universeDomain??e.universe_domain??h??"googleapis.com";if(f!=="googleapis.com"&&e.url){let l=new URL(e.url);l.hostname.endsWith(".googleapis.com")&&(l.hostname=l.hostname.replace(/googleapis\.com$/,f),e.url=l.toString())}if(Object.keys(e.params).length||(delete e.params,delete e.paramsSerializer),s&&typeof s=="object"){let l=typeof s.getUniverseDomain=="function"?await s.getUniverseDomain():void 0;if(l&&f!==l)throw new Error(`The configured universe domain (${f}) does not match the universe domain found in the credentials (${l}). If you haven't configured the universe domain explicitly, googleapis.com is the default.`);if(e.http2){let g=await s.getRequestHeaders(e.url),v=Object.assign({},e);return v.headers=km.Gaxios.mergeHeaders(v.headers,g),W1.request(v)}else{let g=await s.request(e);return(0,$m.marshallGaxiosResponse)(g)}}else return new km.Gaxios().request(e).then(l=>(0,$m.marshallGaxiosResponse)(l))}o(KP,"createAPIRequestAsync");var Nm=class extends JP.Transform{static{o(this,"ProgressStream")}bytesRead=0;_transform(e,r,n){this.bytesRead+=e.length,this.emit("progress",this.bytesRead),this.push(e),n()}};function Y1(t,e){(0,Dm.isBrowser)()||(t["x-goog-api-client"]=`gdcl/${YP.version} gl-node/${process.versions.node}`),e&&(t["x-goog-api-version"]=e)}o(Y1,"populateAPIHeader")});var XP=D(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});Fc.AuthPlus=void 0;var Tn=Ba(),Um=class extends Tn.GoogleAuth{static{o(this,"AuthPlus")}JWT=Tn.JWT;Compute=Tn.Compute;OAuth2=Tn.OAuth2Client;GoogleAuth=Tn.GoogleAuth;AwsClient=Tn.AwsClient;IdentityPoolClient=Tn.IdentityPoolClient;ExternalAccountClient=Tn.ExternalAccountClient;_cachedAuth;async getClient(e){return this._cachedAuth=new Tn.GoogleAuth(e),this._cachedAuth.getClient()}getProjectId(e){return e?this._cachedAuth?this._cachedAuth.getProjectId(e):super.getProjectId(e):this._cachedAuth?this._cachedAuth.getProjectId():super.getProjectId()}};Fc.AuthPlus=Um});var Lm=D(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});qc.Endpoint=void 0;var QP=jc(),Mm=class{static{o(this,"Endpoint")}_options;google;constructor(e){this._options=e||{}}applySchema(e,r,n,i){if(this.applyMethodsFromSchema(e,r,n,i),n.resources){for(let s in n.resources)if(Object.prototype.hasOwnProperty.call(n.resources,s)){let c=n.resources[s];e[s]||(e[s]={}),this.applySchema(e[s],r,c,i)}}}applyMethodsFromSchema(e,r,n,i){if(n.methods){for(let s in n.methods)if(Object.prototype.hasOwnProperty.call(n.methods,s)){let c=n.methods[s];e[s]=this.makeMethod(r,c,i)}}}makeMethod(e,r,n){return(i,s)=>{let c=typeof i=="function"?{}:i;s=typeof i=="function"?i:s;let d=ex(e.rootUrl+e.servicePath+r.path),p={options:{url:d.substring(1,d.length-1),method:r.httpMethod,apiVersion:r.apiVersion},params:c,requiredParams:r.parameterOrder||[],pathParams:this.getPathParams(r.parameters),context:n};if(r.mediaUpload&&r.mediaUpload.protocols&&r.mediaUpload.protocols.simple&&r.mediaUpload.protocols.simple.path){let m=ex(e.rootUrl+r.mediaUpload.protocols.simple.path);p.mediaUrl=m.substring(1,m.length-1)}if(!s)return(0,QP.createAPIRequest)(p);(0,QP.createAPIRequest)(p,s)}}getPathParams(e){let r=new Array;return typeof e!="object"&&(e={}),Object.keys(e).forEach(n=>{e[n].location==="path"&&r.push(n)}),r}};qc.Endpoint=Mm;function ex(t){return t?`'${t}'`.replace(/([^:]\/)\/+/g,"$1"):""}o(ex,"buildurl")});var rx=D(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});Bc.Discovery=void 0;var X1=require("fs"),Q1=ht(),eL=require("url"),tx=require("util"),tL=jc(),rL=Lm(),nL=tx.promisify(X1.readFile),jm=class{static{o(this,"Discovery")}transporter=new Q1.Gaxios;options;constructor(e){this.options=e||{}}makeEndpoint(e){return r=>{let n=new rL.Endpoint(r);return n.applySchema(n,e,e,n),n}}log(...e){this.options&&this.options.debug&&console.log(...e)}async discoverAllAPIs(e){let r=new Headers(this.options.includePrivate?{}:{"X-User-Ip":"0.0.0.0"}),i=(await this.transporter.request({url:e,headers:r})).data.items,s=await Promise.all(i.map(async p=>{let m=await this.discoverAPI(p.discoveryRestUrl);return{api:p,endpointCreator:m}})),c={},d={};for(let p of s)d[p.api.name]||(c[p.api.name]={},d[p.api.name]=m=>{let y=typeof m,h;if(y==="string")h=m,m={};else if(y==="object")h=m.version,delete m.version;else throw new Error("Argument error: Accepts only string or object");try{let f=p.endpointCreator(m,this);return Object.freeze(f)}catch(f){throw new Error(tx.format('Unable to load endpoint %s("%s"): %s',p.api.name,h,f.message))}}),c[p.api.name][p.api.version]=p.endpointCreator;return d}async discoverAPI(e){if(typeof e=="string"){let r=eL.parse(e);if(e&&!r.protocol){this.log("Reading from file "+e);let n=await nL(e,{encoding:"utf8"});return this.makeEndpoint(JSON.parse(n))}else{this.log("Requesting "+e);let n=await this.transporter.request({url:e});return this.makeEndpoint(n.data)}}else{let r=e;this.log("Requesting "+r.url);let n=r.url;delete r.url;let i={options:{url:n,method:"GET"},requiredParams:[],pathParams:[],params:r,context:{google:{_options:{}},_options:{}}},s=await(0,tL.createAPIRequest)(i);return this.makeEndpoint(s.data)}}};Bc.Discovery=jm});var Vc=D(Re=>{"use strict";var oL=Re&&Re.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),iL=Re&&Re.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&oL(e,t,r)};Object.defineProperty(Re,"__esModule",{value:!0});Re.Endpoint=Re.Discovery=Re.AuthPlus=Re.createAPIRequest=Re.getAPI=Re.GaxiosError=Re.Gaxios=Re.AwsClient=Re.IdentityPoolClient=Re.BaseExternalAccountClient=Re.ExternalAccountClient=Re.GoogleAuth=Re.UserRefreshClient=Re.Compute=Re.JWT=Re.OAuth2Client=Re.gaxios=Re.googleAuthLibrary=void 0;Re.googleAuthLibrary=Ba();Re.gaxios=ht();var Pn=Ba();Object.defineProperty(Re,"OAuth2Client",{enumerable:!0,get:o(function(){return Pn.OAuth2Client},"get")});Object.defineProperty(Re,"JWT",{enumerable:!0,get:o(function(){return Pn.JWT},"get")});Object.defineProperty(Re,"Compute",{enumerable:!0,get:o(function(){return Pn.Compute},"get")});Object.defineProperty(Re,"UserRefreshClient",{enumerable:!0,get:o(function(){return Pn.UserRefreshClient},"get")});Object.defineProperty(Re,"GoogleAuth",{enumerable:!0,get:o(function(){return Pn.GoogleAuth},"get")});Object.defineProperty(Re,"ExternalAccountClient",{enumerable:!0,get:o(function(){return Pn.ExternalAccountClient},"get")});Object.defineProperty(Re,"BaseExternalAccountClient",{enumerable:!0,get:o(function(){return Pn.BaseExternalAccountClient},"get")});Object.defineProperty(Re,"IdentityPoolClient",{enumerable:!0,get:o(function(){return Pn.IdentityPoolClient},"get")});Object.defineProperty(Re,"AwsClient",{enumerable:!0,get:o(function(){return Pn.AwsClient},"get")});var nx=ht();Object.defineProperty(Re,"Gaxios",{enumerable:!0,get:o(function(){return nx.Gaxios},"get")});Object.defineProperty(Re,"GaxiosError",{enumerable:!0,get:o(function(){return nx.GaxiosError},"get")});var aL=WT();Object.defineProperty(Re,"getAPI",{enumerable:!0,get:o(function(){return aL.getAPI},"get")});var sL=jc();Object.defineProperty(Re,"createAPIRequest",{enumerable:!0,get:o(function(){return sL.createAPIRequest},"get")});var uL=XP();Object.defineProperty(Re,"AuthPlus",{enumerable:!0,get:o(function(){return uL.AuthPlus},"get")});var cL=rx();Object.defineProperty(Re,"Discovery",{enumerable:!0,get:o(function(){return cL.Discovery},"get")});var lL=Lm();Object.defineProperty(Re,"Endpoint",{enumerable:!0,get:o(function(){return lL.Endpoint},"get")});iL(Lc(),Re)});var ix=D(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.calendar_v3=void 0;var oe=Vc(),ox;(function(t){class e{static{o(this,"Calendar")}context;acl;calendarList;calendars;channels;colors;events;freebusy;settings;constructor(h,f){this.context={_options:h||{},google:f},this.acl=new r(this.context),this.calendarList=new n(this.context),this.calendars=new i(this.context),this.channels=new s(this.context),this.colors=new c(this.context),this.events=new d(this.context),this.freebusy=new p(this.context),this.settings=new m(this.context)}}t.Calendar=e;class r{static{o(this,"Resource$Acl")}context;constructor(h){this.context=h}delete(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl/{ruleId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},v),params:g,requiredParams:["calendarId","ruleId"],pathParams:["calendarId","ruleId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}get(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl/{ruleId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:["calendarId","ruleId"],pathParams:["calendarId","ruleId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}insert(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}list(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}patch(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl/{ruleId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},v),params:g,requiredParams:["calendarId","ruleId"],pathParams:["calendarId","ruleId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}update(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl/{ruleId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},v),params:g,requiredParams:["calendarId","ruleId"],pathParams:["calendarId","ruleId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}watch(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}}t.Resource$Acl=r;class n{static{o(this,"Resource$Calendarlist")}context;constructor(h){this.context=h}delete(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}get(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}insert(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:[],pathParams:[],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}list(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:[],pathParams:[],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}patch(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}update(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}watch(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:[],pathParams:[],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}}t.Resource$Calendarlist=n;class i{static{o(this,"Resource$Calendars")}context;constructor(h){this.context=h}clear(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/clear").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}delete(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}get(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}insert(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:[],pathParams:[],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}patch(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}update(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}}t.Resource$Calendars=i;class s{static{o(this,"Resource$Channels")}context;constructor(h){this.context=h}stop(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/channels/stop").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:[],pathParams:[],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}}t.Resource$Channels=s;class c{static{o(this,"Resource$Colors")}context;constructor(h){this.context=h}get(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/colors").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:[],pathParams:[],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}}t.Resource$Colors=c;class d{static{o(this,"Resource$Events")}context;constructor(h){this.context=h}delete(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},v),params:g,requiredParams:["calendarId","eventId"],pathParams:["calendarId","eventId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}get(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:["calendarId","eventId"],pathParams:["calendarId","eventId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}import(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/import").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}insert(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}instances(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}/instances").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:["calendarId","eventId"],pathParams:["calendarId","eventId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}list(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}move(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}/move").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:["calendarId","eventId","destination"],pathParams:["calendarId","eventId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}patch(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},v),params:g,requiredParams:["calendarId","eventId"],pathParams:["calendarId","eventId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}quickAdd(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/quickAdd").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:["calendarId","text"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}update(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},v),params:g,requiredParams:["calendarId","eventId"],pathParams:["calendarId","eventId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}watch(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}}t.Resource$Events=d;class p{static{o(this,"Resource$Freebusy")}context;constructor(h){this.context=h}query(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/freeBusy").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:[],pathParams:[],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}}t.Resource$Freebusy=p;class m{static{o(this,"Resource$Settings")}context;constructor(h){this.context=h}get(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/settings/{setting}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:["setting"],pathParams:["setting"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}list(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/settings").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:[],pathParams:[],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}watch(h,f,l){let g=h||{},v=f||{};typeof h=="function"&&(l=h,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/settings/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:[],pathParams:[],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}}t.Resource$Settings=m})(ox||(Gc.calendar_v3=ox={}))});var xn=D(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.AuthPlus=Er.calendar_v3=Er.auth=Er.VERSIONS=void 0;Er.calendar=dL;var ax=Vc(),sx=ix();Object.defineProperty(Er,"calendar_v3",{enumerable:!0,get:o(function(){return sx.calendar_v3},"get")});Er.VERSIONS={v3:sx.calendar_v3.Calendar};function dL(t){return(0,ax.getAPI)("calendar",t,Er.VERSIONS,this)}o(dL,"calendar");var pL=new ax.AuthPlus;Er.auth=pL;var fL=Vc();Object.defineProperty(Er,"AuthPlus",{enumerable:!0,get:o(function(){return fL.AuthPlus},"get")})});var Dx=D((th,rh)=>{(function(t,e){typeof th=="object"&&typeof rh<"u"?rh.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_utc=e()})(th,(function(){"use strict";var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,i,s){var c=i.prototype;s.utc=function(l){var g={date:l,utc:!0,args:arguments};return new i(g)},c.utc=function(l){var g=s(this.toDate(),{locale:this.$L,utc:!0});return l?g.add(this.utcOffset(),t):g},c.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var d=c.parse;c.parse=function(l){l.utc&&(this.$u=!0),this.$utils().u(l.$offset)||(this.$offset=l.$offset),d.call(this,l)};var p=c.init;c.init=function(){if(this.$u){var l=this.$d;this.$y=l.getUTCFullYear(),this.$M=l.getUTCMonth(),this.$D=l.getUTCDate(),this.$W=l.getUTCDay(),this.$H=l.getUTCHours(),this.$m=l.getUTCMinutes(),this.$s=l.getUTCSeconds(),this.$ms=l.getUTCMilliseconds()}else p.call(this)};var m=c.utcOffset;c.utcOffset=function(l,g){var v=this.$utils().u;if(v(l))return this.$u?0:v(this.$offset)?m.call(this):this.$offset;if(typeof l=="string"&&(l=(function(U){U===void 0&&(U="");var J=U.match(e);if(!J)return null;var Z=(""+J[0]).match(r)||["-",0,0],H=Z[0],K=60*+Z[1]+ +Z[2];return K===0?0:H==="+"?K:-K})(l),l===null))return this;var E=Math.abs(l)<=16?60*l:l,b=this;if(g)return b.$offset=E,b.$u=l===0,b;if(l!==0){var C=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(b=this.local().add(E+C,t)).$offset=E,b.$x.$localOffset=C}else b=this.utc();return b};var y=c.format;c.format=function(l){var g=l||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return y.call(this,g)},c.valueOf=function(){var l=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*l},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var h=c.toDate;c.toDate=function(l){return l==="s"&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var f=c.diff;c.diff=function(l,g,v){if(l&&this.$u===l.$u)return f.call(this,l,g,v);var E=this.local(),b=s(l).local();return f.call(E,b,g,v)}}}))});var TL={};Is(TL,{createGoogleClient:()=>_t,getAccessToken:()=>Ie,googleCalendar:()=>wL,googleCalendarAuth:()=>ne});module.exports=ZI(TL);var KI=Object.freeze({status:"aborted"});function le(t,e,r){function n(d,p){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:p,constr:c,traits:new Set},enumerable:!1}),d._zod.traits.has(t))return;d._zod.traits.add(t),e(d,p);let m=c.prototype,y=Object.keys(m);for(let h=0;h<y.length;h++){let f=y[h];f in d||(d[f]=m[f].bind(d))}}o(n,"init");let i=r?.Parent??Object;class s extends i{static{o(this,"Definition")}}Object.defineProperty(s,"name",{value:t});function c(d){var p;let m=r?.Parent?new s:this;n(m,d),(p=m._zod).deferred??(p.deferred=[]);for(let y of m._zod.deferred)y();return m}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(d=>r?.Parent&&d instanceof r.Parent?!0:d?._zod?.traits?.has(t),"value")}),Object.defineProperty(c,"name",{value:t}),c}o(le,"$constructor");var Mr=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Rs=class extends Error{static{o(this,"$ZodEncodeError")}constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}},Rl={};function ln(t){return t&&Object.assign(Rl,t),Rl}o(ln,"config");function Ol(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,i])=>e.indexOf(+n)===-1).map(([n,i])=>i)}o(Ol,"getEnumValues");function fg(t,e){return typeof e=="bigint"?e.toString():e}o(fg,"jsonStringifyReplacer");function Os(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(Os,"cached");function mg(t){return t==null}o(mg,"nullish");function ks(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}o(ks,"cleanRegex");var pg=Symbol("evaluating");function gt(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==pg)return n===void 0&&(n=pg,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}o(gt,"defineLazy");var kl="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function ji(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}o(ji,"isObject");var JI=Os(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function hg(t){if(ji(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(ji(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(hg,"isPlainObject");var gg=new Set(["string","number","symbol"]);function qo(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(qo,"escapeRegex");function $s(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}o($s,"clone");function st(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:o(()=>e,"error")};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:o(()=>e.error,"error")}:e}o(st,"normalizeParams");function yg(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}o(yg,"optionalKeys");var vg={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Bo(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}o(Bo,"aborted");function Nn(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}o(Nn,"prefixIssues");function Cs(t){return typeof t=="string"?t:t?.message}o(Cs,"unwrapMessage");function zn(t,e,r){let n={...t,path:t.path??[]};if(!t.message){let i=Cs(t.inst?._zod.def?.error?.(t))??Cs(e?.error?.(t))??Cs(r.customError?.(t))??Cs(r.localeError?.(t))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,e?.reportInput||delete n.input,n}o(zn,"finalizeIssue");function _g(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}o(_g,"getLengthableOrigin");function $l(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}o($l,"issue");var bg=o((t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,fg,2),Object.defineProperty(t,"toString",{value:o(()=>t.message,"value"),enumerable:!1})},"initializer"),Eg=le("$ZodError",bg),Fi=le("$ZodError",bg,{Parent:Error});var XI=o(t=>(e,r,n,i)=>{let s=n?Object.assign(n,{async:!1}):{async:!1},c=e._zod.run({value:r,issues:[]},s);if(c instanceof Promise)throw new Mr;if(c.issues.length){let d=new(i?.Err??t)(c.issues.map(p=>zn(p,s,ln())));throw kl(d,i?.callee),d}return c.value},"_parse"),Ds=XI(Fi),QI=o(t=>async(e,r,n,i)=>{let s=n?Object.assign(n,{async:!0}):{async:!0},c=e._zod.run({value:r,issues:[]},s);if(c instanceof Promise&&(c=await c),c.issues.length){let d=new(i?.Err??t)(c.issues.map(p=>zn(p,s,ln())));throw kl(d,i?.callee),d}return c.value},"_parseAsync"),Ns=QI(Fi),eR=o(t=>(e,r,n)=>{let i=n?{...n,async:!1}:{async:!1},s=e._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Mr;return s.issues.length?{success:!1,error:new(t??Eg)(s.issues.map(c=>zn(c,i,ln())))}:{success:!0,data:s.value}},"_safeParse"),qi=eR(Fi),tR=o(t=>async(e,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},s=e._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new t(s.issues.map(c=>zn(c,i,ln())))}:{success:!0,data:s.value}},"_safeParseAsync"),Bi=tR(Fi);var rR="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",nR=new RegExp(`^${rR}$`);var Sg=o(t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},"string"),wg=/^-?\d+n?$/,Tg=/^-?\d+$/,Dl=/^-?\d+(?:\.\d+)?$/,Pg=/^(?:true|false)$/i;var Un=le("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),oR={number:"number",bigint:"bigint",object:"date"};var xg=le("$ZodCheckGreaterThan",(t,e)=>{Un.init(t,e);let r=oR[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,s=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>s&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}});var Ag=le("$ZodCheckNumberFormat",(t,e)=>{Un.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[i,s]=vg[e.format];t._zod.onattach.push(c=>{let d=c._zod.bag;d.format=e.format,d.minimum=i,d.maximum=s,r&&(d.pattern=Tg)}),t._zod.check=c=>{let d=c.value;if(r){if(!Number.isInteger(d)){c.issues.push({expected:n,format:e.format,code:"invalid_type",continue:!1,input:d,inst:t});return}if(!Number.isSafeInteger(d)){d>0?c.issues.push({input:d,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort}):c.issues.push({input:d,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort});return}}d<i&&c.issues.push({origin:"number",input:d,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),d>s&&c.issues.push({origin:"number",input:d,code:"too_big",maximum:s,inclusive:!0,inst:t,continue:!e.abort})}});var Ig=le("$ZodCheckMinLength",(t,e)=>{var r;Un.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!mg(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let i=n.value;if(i.length>=e.minimum)return;let c=_g(i);n.issues.push({origin:c,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}});var Nl=le("$ZodCheckStringFormat",(t,e)=>{var r,n;Un.init(t,e),t._zod.onattach.push(i=>{let s=i._zod.bag;s.format=e.format,e.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),Rg=le("$ZodCheckRegex",(t,e)=>{Nl.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}});var Og={major:4,minor:3,patch:6};var dt=le("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Og;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let i of n)for(let s of i._zod.onattach)s(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let i=o((c,d,p)=>{let m=Bo(c),y;for(let h of d){if(h._zod.def.when){if(!h._zod.def.when(c))continue}else if(m)continue;let f=c.issues.length,l=h._zod.check(c);if(l instanceof Promise&&p?.async===!1)throw new Mr;if(y||l instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await l,c.issues.length!==f&&(m||(m=Bo(c,f)))});else{if(c.issues.length===f)continue;m||(m=Bo(c,f))}}return y?y.then(()=>c):c},"runChecks"),s=o((c,d,p)=>{if(Bo(c))return c.aborted=!0,c;let m=i(d,n,p);if(m instanceof Promise){if(p.async===!1)throw new Mr;return m.then(y=>t._zod.parse(y,p))}return t._zod.parse(m,p)},"handleCanaryResult");t._zod.run=(c,d)=>{if(d.skipChecks)return t._zod.parse(c,d);if(d.direction==="backward"){let m=t._zod.parse({value:c.value,issues:[]},{...d,skipChecks:!0});return m instanceof Promise?m.then(y=>s(y,c,d)):s(m,c,d)}let p=t._zod.parse(c,d);if(p instanceof Promise){if(d.async===!1)throw new Mr;return p.then(m=>i(m,n,d))}return i(p,n,d)}}gt(t,"~standard",()=>({validate:o(i=>{try{let s=qi(t,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return Bi(t,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Ms=le("$ZodString",(t,e)=>{dt.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Sg(t._zod.bag),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),zl=le("$ZodStringFormat",(t,e)=>{Nl.init(t,e),Ms.init(t,e)});var zg=le("$ZodURL",(t,e)=>{zl.init(t,e),t._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}});var Ul=le("$ZodNumber",(t,e)=>{dt.init(t,e),t._zod.pattern=t._zod.bag.pattern??Dl,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:t,...s?{received:s}:{}}),r}}),Ug=le("$ZodNumberFormat",(t,e)=>{Ag.init(t,e),Ul.init(t,e)}),Ml=le("$ZodBoolean",(t,e)=>{dt.init(t,e),t._zod.pattern=Pg,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:t}),r}}),Mg=le("$ZodBigInt",(t,e)=>{dt.init(t,e),t._zod.pattern=wg,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}});var Lg=le("$ZodAny",(t,e)=>{dt.init(t,e),t._zod.parse=r=>r}),jg=le("$ZodUnknown",(t,e)=>{dt.init(t,e),t._zod.parse=r=>r});var Fg=le("$ZodVoid",(t,e)=>{dt.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:t}),r}}),qg=le("$ZodDate",(t,e)=>{dt.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,s=i instanceof Date;return s&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...s?{received:"Invalid Date"}:{},inst:t}),r}});function kg(t,e,r){t.issues.length&&e.issues.push(...Nn(r,t.issues)),e.value[r]=t.value}o(kg,"handleArrayResult");var Bg=le("$ZodArray",(t,e)=>{dt.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),r;r.value=Array(i.length);let s=[];for(let c=0;c<i.length;c++){let d=i[c],p=e.element._zod.run({value:d,issues:[]},n);p instanceof Promise?s.push(p.then(m=>kg(m,r,c))):kg(p,r,c)}return s.length?Promise.all(s).then(()=>r):r}});function Us(t,e,r,n,i){if(t.issues.length){if(i&&!(r in n))return;e.issues.push(...Nn(r,t.issues))}t.value===void 0?r in n&&(e.value[r]=void 0):e.value[r]=t.value}o(Us,"handlePropertyResult");function iR(t){let e=Object.keys(t.shape);for(let n of e)if(!t.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=yg(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}o(iR,"normalizeDef");function aR(t,e,r,n,i,s){let c=[],d=i.keySet,p=i.catchall._zod,m=p.def.type,y=p.optout==="optional";for(let h in e){if(d.has(h))continue;if(m==="never"){c.push(h);continue}let f=p.run({value:e[h],issues:[]},n);f instanceof Promise?t.push(f.then(l=>Us(l,r,h,e,y))):Us(f,r,h,e,y)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:e,inst:s}),t.length?Promise.all(t).then(()=>r):r}o(aR,"handleCatchall");var Vg=le("$ZodObject",(t,e)=>{if(dt.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let d=e.shape;Object.defineProperty(e,"shape",{get:o(()=>{let p={...d};return Object.defineProperty(e,"shape",{value:p}),p},"get")})}let n=Os(()=>iR(e));gt(t._zod,"propValues",()=>{let d=e.shape,p={};for(let m in d){let y=d[m]._zod;if(y.values){p[m]??(p[m]=new Set);for(let h of y.values)p[m].add(h)}}return p});let i=ji,s=e.catchall,c;t._zod.parse=(d,p)=>{c??(c=n.value);let m=d.value;if(!i(m))return d.issues.push({expected:"object",code:"invalid_type",input:m,inst:t}),d;d.value={};let y=[],h=c.shape;for(let f of c.keys){let l=h[f],g=l._zod.optout==="optional",v=l._zod.run({value:m[f],issues:[]},p);v instanceof Promise?y.push(v.then(E=>Us(E,d,f,m,g))):Us(v,d,f,m,g)}return s?aR(y,m,d,p,n.value,t):y.length?Promise.all(y).then(()=>d):d}});function $g(t,e,r,n){for(let s of t)if(s.issues.length===0)return e.value=s.value,e;let i=t.filter(s=>!Bo(s));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(s=>s.issues.map(c=>zn(c,n,ln())))}),e)}o($g,"handleUnionResults");var Ll=le("$ZodUnion",(t,e)=>{dt.init(t,e),gt(t._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),gt(t._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),gt(t._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),gt(t._zod,"pattern",()=>{if(e.options.every(i=>i._zod.pattern)){let i=e.options.map(s=>s._zod.pattern);return new RegExp(`^(${i.map(s=>ks(s.source)).join("|")})$`)}});let r=e.options.length===1,n=e.options[0]._zod.run;t._zod.parse=(i,s)=>{if(r)return n(i,s);let c=!1,d=[];for(let p of e.options){let m=p._zod.run({value:i.value,issues:[]},s);if(m instanceof Promise)d.push(m),c=!0;else{if(m.issues.length===0)return m;d.push(m)}}return c?Promise.all(d).then(p=>$g(p,i,t,s)):$g(d,i,t,s)}});var Gg=le("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,Ll.init(t,e);let r=t._zod.parse;gt(t._zod,"propValues",()=>{let i={};for(let s of e.options){let c=s._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let[d,p]of Object.entries(c)){i[d]||(i[d]=new Set);for(let m of p)i[d].add(m)}}return i});let n=Os(()=>{let i=e.options,s=new Map;for(let c of i){let d=c._zod.propValues?.[e.discriminator];if(!d||d.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(c)}"`);for(let p of d){if(s.has(p))throw new Error(`Duplicate discriminator value "${String(p)}"`);s.set(p,c)}}return s});t._zod.parse=(i,s)=>{let c=i.value;if(!ji(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:t}),i;let d=n.value.get(c?.[e.discriminator]);return d?d._zod.run(i,s):e.unionFallback?r(i,s):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:c,path:[e.discriminator],inst:t}),i)}});var Hg=le("$ZodRecord",(t,e)=>{dt.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!hg(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),r;let s=[],c=e.keyType._zod.values;if(c){r.value={};let d=new Set;for(let m of c)if(typeof m=="string"||typeof m=="number"||typeof m=="symbol"){d.add(typeof m=="number"?m.toString():m);let y=e.valueType._zod.run({value:i[m],issues:[]},n);y instanceof Promise?s.push(y.then(h=>{h.issues.length&&r.issues.push(...Nn(m,h.issues)),r.value[m]=h.value})):(y.issues.length&&r.issues.push(...Nn(m,y.issues)),r.value[m]=y.value)}let p;for(let m in i)d.has(m)||(p=p??[],p.push(m));p&&p.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:t,keys:p})}else{r.value={};for(let d of Reflect.ownKeys(i)){if(d==="__proto__")continue;let p=e.keyType._zod.run({value:d,issues:[]},n);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&Dl.test(d)&&p.issues.length){let h=e.keyType._zod.run({value:Number(d),issues:[]},n);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");h.issues.length===0&&(p=h)}if(p.issues.length){e.mode==="loose"?r.value[d]=i[d]:r.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(h=>zn(h,n,ln())),input:d,path:[d],inst:t});continue}let y=e.valueType._zod.run({value:i[d],issues:[]},n);y instanceof Promise?s.push(y.then(h=>{h.issues.length&&r.issues.push(...Nn(d,h.issues)),r.value[p.value]=h.value})):(y.issues.length&&r.issues.push(...Nn(d,y.issues)),r.value[p.value]=y.value)}}return s.length?Promise.all(s).then(()=>r):r}});var Wg=le("$ZodEnum",(t,e)=>{dt.init(t,e);let r=Ol(e.entries),n=new Set(r);t._zod.values=n,t._zod.pattern=new RegExp(`^(${r.filter(i=>gg.has(typeof i)).map(i=>typeof i=="string"?qo(i):i.toString()).join("|")})$`),t._zod.parse=(i,s)=>{let c=i.value;return n.has(c)||i.issues.push({code:"invalid_value",values:r,input:c,inst:t}),i}}),Zg=le("$ZodLiteral",(t,e)=>{if(dt.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(e.values);t._zod.values=r,t._zod.pattern=new RegExp(`^(${e.values.map(n=>typeof n=="string"?qo(n):n?qo(n.toString()):String(n)).join("|")})$`),t._zod.parse=(n,i)=>{let s=n.value;return r.has(s)||n.issues.push({code:"invalid_value",values:e.values,input:s,inst:t}),n}});var Kg=le("$ZodTransform",(t,e)=>{dt.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Rs(t.constructor.name);let i=e.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(c=>(r.value=c,r));if(i instanceof Promise)throw new Mr;return r.value=i,r}});function Dg(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}o(Dg,"handleOptionalResult");var Jg=le("$ZodOptional",(t,e)=>{dt.init(t,e),t._zod.optin="optional",t._zod.optout="optional",gt(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),gt(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${ks(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>{if(e.innerType._zod.optin==="optional"){let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>Dg(s,r.value)):Dg(i,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,n)}});var Yg=le("$ZodNullable",(t,e)=>{dt.init(t,e),gt(t._zod,"optin",()=>e.innerType._zod.optin),gt(t._zod,"optout",()=>e.innerType._zod.optout),gt(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${ks(r.source)}|null)$`):void 0}),gt(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)});var Xg=le("$ZodPipe",(t,e)=>{dt.init(t,e),gt(t._zod,"values",()=>e.in._zod.values),gt(t._zod,"optin",()=>e.in._zod.optin),gt(t._zod,"optout",()=>e.out._zod.optout),gt(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if(n.direction==="backward"){let s=e.out._zod.run(r,n);return s instanceof Promise?s.then(c=>zs(c,e.in,n)):zs(s,e.in,n)}let i=e.in._zod.run(r,n);return i instanceof Promise?i.then(s=>zs(s,e.out,n)):zs(i,e.out,n)}});function zs(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}o(zs,"handlePipeResult");var Qg=le("$ZodCustom",(t,e)=>{Un.init(t,e),dt.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{let n=r.value,i=e.fn(n);if(i instanceof Promise)return i.then(s=>Ng(s,r,n,t));Ng(i,r,n,t)}});function Ng(t,e,r,n){if(!t){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),e.issues.push($l(i))}}o(Ng,"handleRefineResult");var ty;var jl=class{static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let n=r[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function ry(){return new jl}o(ry,"registry");(ty=globalThis).__zod_globalRegistry??(ty.__zod_globalRegistry=ry());var Fl=globalThis.__zod_globalRegistry;function ny(t,e){return new t({type:"string",...st(e)})}o(ny,"_string");function oy(t,e){return new t({type:"string",coerce:!0,...st(e)})}o(oy,"_coercedString");function iy(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...st(e)})}o(iy,"_url");function ay(t,e){return new t({type:"number",checks:[],...st(e)})}o(ay,"_number");function sy(t,e){return new t({type:"number",coerce:!0,checks:[],...st(e)})}o(sy,"_coercedNumber");function uy(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...st(e)})}o(uy,"_int");function cy(t,e){return new t({type:"boolean",...st(e)})}o(cy,"_boolean");function ly(t,e){return new t({type:"boolean",coerce:!0,...st(e)})}o(ly,"_coercedBoolean");function dy(t,e){return new t({type:"bigint",coerce:!0,...st(e)})}o(dy,"_coercedBigint");function py(t){return new t({type:"any"})}o(py,"_any");function fy(t){return new t({type:"unknown"})}o(fy,"_unknown");function my(t,e){return new t({type:"void",...st(e)})}o(my,"_void");function hy(t,e){return new t({type:"date",coerce:!0,...st(e)})}o(hy,"_coercedDate");function Ls(t,e){return new xg({check:"greater_than",...st(e),value:t,inclusive:!0})}o(Ls,"_gte");function xr(t,e){return new Ig({check:"min_length",...st(e),minimum:t})}o(xr,"_minLength");function Mn(t,e){return new Rg({check:"string_format",format:"regex",...st(e),pattern:t})}o(Mn,"_regex");function gy(t,e,r){let n=st(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}o(gy,"_custom");var yt=le("ZodMiniType",(t,e)=>{if(!t._zod)throw new Error("Uninitialized schema in ZodMiniType.");dt.init(t,e),t.def=e,t.type=e.type,t.parse=(r,n)=>Ds(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>qi(t,r,n),t.parseAsync=async(r,n)=>Ns(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>Bi(t,r,n),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),t.with=t.check,t.clone=(r,n)=>$s(t,r,n),t.brand=()=>t,t.register=((r,n)=>(r.add(t,n),t)),t.apply=r=>r(t)}),Fs=le("ZodMiniString",(t,e)=>{Ms.init(t,e),yt.init(t,e)});function w(t){return ny(Fs,t)}o(w,"string");var yy=le("ZodMiniStringFormat",(t,e)=>{zl.init(t,e),Fs.init(t,e)});var _R=le("ZodMiniURL",(t,e)=>{zg.init(t,e),yy.init(t,e)});function vy(t){return iy(_R,t)}o(vy,"url");var qs=le("ZodMiniNumber",(t,e)=>{Ul.init(t,e),yt.init(t,e)});function Nt(t){return ay(qs,t)}o(Nt,"number");var bR=le("ZodMiniNumberFormat",(t,e)=>{Ug.init(t,e),qs.init(t,e)});function _y(t){return uy(bR,t)}o(_y,"int");var ql=le("ZodMiniBoolean",(t,e)=>{Ml.init(t,e),yt.init(t,e)});function Ve(t){return cy(ql,t)}o(Ve,"boolean");var by=le("ZodMiniBigInt",(t,e)=>{Mg.init(t,e),yt.init(t,e)});var ER=le("ZodMiniAny",(t,e)=>{Lg.init(t,e),yt.init(t,e)});function Gi(){return py(ER)}o(Gi,"any");var SR=le("ZodMiniUnknown",(t,e)=>{jg.init(t,e),yt.init(t,e)});function we(){return fy(SR)}o(we,"unknown");var wR=le("ZodMiniVoid",(t,e)=>{Fg.init(t,e),yt.init(t,e)});function Ey(t){return my(wR,t)}o(Ey,"_void");var Sy=le("ZodMiniDate",(t,e)=>{qg.init(t,e),yt.init(t,e)});var TR=le("ZodMiniArray",(t,e)=>{Bg.init(t,e),yt.init(t,e)});function Oe(t,e){return new TR({type:"array",element:t,...st(e)})}o(Oe,"array");var PR=le("ZodMiniObject",(t,e)=>{Vg.init(t,e),yt.init(t,e),gt(t,"shape",()=>e.shape)});function k(t,e){let r={type:"object",shape:t??{},...st(e)};return new PR(r)}o(k,"object");var xR=le("ZodMiniUnion",(t,e)=>{Ll.init(t,e),yt.init(t,e)});function ke(t,e){return new xR({type:"union",options:t,...st(e)})}o(ke,"union");var AR=le("ZodMiniDiscriminatedUnion",(t,e)=>{Gg.init(t,e),yt.init(t,e)});function Ln(t,e,r){return new AR({type:"union",options:e,discriminator:t,...st(r)})}o(Ln,"discriminatedUnion");var IR=le("ZodMiniRecord",(t,e)=>{Hg.init(t,e),yt.init(t,e)});function Te(t,e,r){return new IR({type:"record",keyType:t,valueType:e,...st(r)})}o(Te,"record");var RR=le("ZodMiniEnum",(t,e)=>{Wg.init(t,e),yt.init(t,e),t.options=Object.values(e.entries)});function ze(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new RR({type:"enum",entries:r,...st(e)})}o(ze,"_enum");var CR=le("ZodMiniLiteral",(t,e)=>{Zg.init(t,e),yt.init(t,e)});function ge(t,e){return new CR({type:"literal",values:Array.isArray(t)?t:[t],...st(e)})}o(ge,"literal");var OR=le("ZodMiniTransform",(t,e)=>{Kg.init(t,e),yt.init(t,e)});function jn(t){return new OR({type:"transform",transform:t})}o(jn,"transform");var kR=le("ZodMiniOptional",(t,e)=>{Jg.init(t,e),yt.init(t,e)});function W(t){return new kR({type:"optional",innerType:t})}o(W,"optional");var $R=le("ZodMiniNullable",(t,e)=>{Yg.init(t,e),yt.init(t,e)});function Hi(t){return new $R({type:"nullable",innerType:t})}o(Hi,"nullable");var DR=le("ZodMiniPipe",(t,e)=>{Xg.init(t,e),yt.init(t,e)});function Fn(t,e){return new DR({type:"pipe",in:t,out:e})}o(Fn,"pipe");var NR=le("ZodMiniCustom",(t,e)=>{Qg.init(t,e),yt.init(t,e)});function Bs(t,e){return gy(NR,t??(()=>!0),e)}o(Bs,"custom");var Wi={};Is(Wi,{bigint:()=>FR,boolean:()=>jR,date:()=>qR,number:()=>LR,string:()=>MR});function MR(t){return oy(Fs,t)}o(MR,"string");function LR(t){return sy(qs,t)}o(LR,"number");function jR(t){return ly(ql,t)}o(jR,"boolean");function FR(t){return dy(by,t)}o(FR,"bigint");function qR(t){return hy(Sy,t)}o(qR,"date");var Vl=k({retryOnFailure:k({defaultValue:W(Ve()),hide:W(Ve())}),continueOnFailure:k({defaultValue:W(Ve()),hide:W(Ve())})}),Bl=class{constructor(e,r,n,i,s,c,d,p,m,y,h){this.name=e;this.displayName=r;this.description=n;this.props=i;this.run=s;this.test=c;this.requireAuth=d;this.errorHandlingOptions=p;this.outputSchema=m;this.audience=y;this.aiMetadata=h}static{o(this,"IAction")}},ve=o(t=>new Bl(t.name,t.displayName,t.description,t.props,t.run,t.test??t.run,t.requireAuth??!0,t.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},t.outputSchema,t.audience,t.aiMetadata),"createAction");var Ge=k({displayName:w(),description:W(w())}),$e=o((t,e)=>k({type:ge(e),required:Ve(),defaultValue:W(Gi())}),"TPropertyValue");var Kt=k({...Ge.shape,...$e(w(),"SHORT_TEXT").shape}),dn=k({...Ge.shape,...$e(w(),"LONG_TEXT").shape});var Ty=k({label:w(),value:we()}),Vs=k({disabled:W(Ve()),placeholder:W(w()),options:Oe(Ty)});var Jt=k({...Ge.shape,options:Vs,...$e(we(),"STATIC_DROPDOWN").shape}),pn=k({...Ge.shape,options:Vs,...$e(Oe(we()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Gl=k({...Ge.shape,...$e(we(),"DROPDOWN").shape,refreshers:Oe(w())}),Zi=k({...Ge.shape,...$e(Oe(we()),"MULTI_SELECT_DROPDOWN").shape,refreshers:Oe(w())});var fn=k({...Ge.shape,...$e(Ve(),"CHECKBOX").shape});var mn=k({...Ge.shape,...$e(Nt(),"NUMBER").shape});var Ki=k({...Ge.shape,streaming:W(Ve()),...$e(we(),"FILE").shape});var Ji=k({...Ge.shape,...$e(w(),"DATE_TIME").shape});var Py=Te(w(),ke([Kt,dn,Jt,Zi,pn,fn,mn,Ki,Ji])),Yi=k({...Ge.shape,properties:Py,...$e(Oe(we()),"ARRAY").shape});var Xi=k({...Ge.shape,...$e(ke([Te(w(),we())]),"JSON").shape});var xy=ke([Kt,Jt,Xi,Yi,pn]),VR=Te(w(),xy),Hl=k({refreshers:Oe(w()),...Ge.shape,...$e(we(),"DYNAMIC").shape});var Gs=k({...Ge.shape,...$e(Ey(),"MARKDOWN").shape});var Qi=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(Qi||{}),Vo=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Vo||{}),Go=(b=>(b.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",b.COMMUNICATION="COMMUNICATION",b.COMMERCE="COMMERCE",b.CORE="CORE",b.UNIVERSAL_AI="UNIVERSAL_AI",b.FLOW_CONTROL="FLOW_CONTROL",b.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",b.ACCOUNTING="ACCOUNTING",b.PRODUCTIVITY="PRODUCTIVITY",b.CONTENT_AND_FILES="CONTENT_AND_FILES",b.DEVELOPER_TOOLS="DEVELOPER_TOOLS",b.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",b.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",b.HUMAN_RESOURCES="HUMAN_RESOURCES",b.PAYMENT_PROCESSING="PAYMENT_PROCESSING",b.MARKETING="MARKETING",b.SALES_AND_CRM="SALES_AND_CRM",b))(Go||{});var ea=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(ea||{}),Wl="both_client_credentials_and_authorization_code";var Lt=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(Lt||{}),ta=(s=>(s.NONE="NONE",s.HEADER_PRESENT="HEADER_PRESENT",s.QUERY_PRESENT="QUERY_PRESENT",s.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",s.HEAD_REQUEST="HEAD_REQUEST",s))(ta||{}),GR=k({strategy:ze(ta),paramName:W(w())}),ra=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(ra||{});var Hs=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Hs||{}),Ay=k({status:W(Nt()),body:W(we()),headers:W(Te(w(),w()))}),Iy=k({type:ge("DELAY"),resumeDateTime:w(),requestIdToReply:W(w()),handlerId:W(w()),streamStepProgress:W(ze(Hs))}),Ry=k({type:ge("WEBHOOK"),requestId:w(),requestIdToReply:W(w()),response:Ay,handlerId:W(w()),streamStepProgress:W(ze(Hs))}),HR=ke([Iy,Ry]);var WR=k({body:we(),rawBody:W(we()),headers:Te(w(),w()),queryParams:Te(w(),w())});function rt(t){return t==null}o(rt,"isNil");function na(t){return t==null?!0:typeof t=="string"||Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:!1}o(na,"isEmpty");function Ws(t,e){if(t==null)throw new Error(`${e} is null or undefined`)}o(Ws,"assertNotNullOrUndefined");var Zl=qe(require("crypto"),1);var ZR=128,co,Ho,KR=o(t=>{!co||co.length<t?(co=Buffer.allocUnsafe(t*ZR),Zl.default.randomFillSync(co),Ho=0):Ho+t>co.length&&(Zl.default.randomFillSync(co),Ho=0),Ho+=t},"fillPool"),JR=o(t=>(KR(t|=0),co.subarray(Ho-t,Ho)),"random"),YR=o((t,e,r)=>{let n=(2<<31-Math.clz32(t.length-1|1))-1,i=Math.ceil(1.6*n*e/t.length);return(s=e)=>{let c="";for(;;){let d=r(i),p=i;for(;p--;)if(c+=t[d[p]&n]||"",c.length===s)return c}}},"customRandom"),Oy=o((t,e=21)=>YR(t,e,JR),"customAlphabet");var XR="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ky=21,oH=w().check(Mn(new RegExp(`^[0-9a-zA-Z]{${ky}}$`))),QR=Oy(XR,ky);var qn=Fn(jn(t=>t instanceof Date?t.toISOString():t),w()),dr={id:w(),created:qn,updated:qn},ut=o(t=>W(Hi(t)),"Nullable");function Kl(t){return W(Hi(ze(t)))}o(Kl,"NullableEnum");var sH=Fn(jn(t=>t==="true"||t===!0?!0:t==="false"||t===!1?!1:void 0),W(Ve())),Zs=o(t=>Fn(jn(e=>Array.isArray(e)?e:e!==void 0?[e]:void 0),W(Oe(t))),"OptionalArrayFromQuery");var lH=Te(w(),we());var oa=(y=>(y.OPENAI="openai",y.OPENROUTER="openrouter",y.ANTHROPIC="anthropic",y.AZURE="azure",y.GOOGLE="google",y.ACTIVEPIECES="activepieces",y.CLOUDFLARE_GATEWAY="cloudflare-gateway",y.CUSTOM="custom",y.BEDROCK="bedrock",y.MISTRAL="mistral",y))(oa||{});var SH=w().check(Mn(/^#[0-9A-Fa-f]{6}$/));var TH=k({filename:w(),data:we(),type:ge("file"),mimetype:W(w())});var eC=qe(Dy());var OH=k({...dr,name:w(),permissions:Oe(w()),platformId:ut(w()),type:w(),userCount:W(Nt())});var Ny=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Ny||{}),Jl=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Jl||{}),Yl=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Yl||{});var Xl=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Xl||{});var Ql=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Ql||{});var tC=k({mode:ze(Ny),value:we()}),rC=k({auth:W(w()),fields:Te(w(),tC)}),nC=k({pieceName:w(),pieceVersion:w(),actionName:w(),predefinedInput:W(rC)}),oC=k({type:ge("PIECE"),toolName:w().check(xr(1)),pieceMetadata:nC}),iC=k({type:ge("none")}),aC=k({type:ge("access_token"),accessToken:w()}),sC=k({type:ge("api_key"),apiKey:w(),apiKeyHeader:w()}),uC=k({type:ge("headers"),headers:Te(w(),w())}),cC=Ln("type",[iC,aC,sC,uC]),zy=k({type:ge("FLOW"),toolName:w().check(xr(1)),externalFlowId:w(),flowDisplayName:W(w())}),Uy=k({type:ge("MCP"),toolName:w().check(xr(1)),serverUrl:vy(),protocol:ze(Yl),auth:cC}),My=k({type:ge("KNOWLEDGE_BASE"),toolName:w().check(xr(1)),sourceType:ze(Jl),sourceId:w(),sourceName:w()}),lC=Ln("type",[oC,zy,Uy,My]),dC=k({displayName:w(),description:W(w()),type:ze(Xl)}),Ly=k({type:ge("MARKDOWN"),markdown:w()}),Wo={type:ge("TOOL_CALL"),input:ut(Te(w(),we())),output:W(we()),toolName:w(),status:ze(Ql),toolCallId:w(),startTime:w(),endTime:W(w())},uW=k(Wo),jy=Ln("toolCallType",[k({...Wo,toolCallType:ge("PIECE"),pieceName:w(),pieceVersion:w(),actionName:w()}),k({...Wo,toolCallType:ge("FLOW"),displayName:w(),externalFlowId:w()}),k({...Wo,toolCallType:ge("MCP"),displayName:w(),serverUrl:w()}),k({...Wo,toolCallType:ge("KNOWLEDGE_BASE"),displayName:w(),sourceType:w()}),k({...Wo,toolCallType:ge("UNKNOWN"),displayName:w()})]),pC=ke([Ly,jy]);var ed=(r=>(r.IMAGE="image",r.TEXT="text",r))(ed||{}),hn=k({apiKey:w()}),fC=hn,mC=k({apiKey:w(),apiKeyHash:w()}),hC=hn,gC=hn,yC=hn,vC=hn,_C=hn,bC=hn,EC=hn,Gy=k({accessKeyId:w().check(xr(1)),secretAccessKey:w().check(xr(1))}),SC=k({}),wC=k({}),TC=k({}),PC=k({}),xC=k({}),AC=k({}),Hy=k({modelId:w(),modelName:w(),modelType:ze(ed)}),Wy=k({apiKeyHeader:w(),baseUrl:w(),models:Oe(Hy),defaultHeaders:W(Te(w(),w()))}),Zy=k({accountId:w(),gatewayId:w(),models:Oe(Hy),vertexProject:W(w()),vertexRegion:W(w())}),Ky=k({resourceName:w(),apiVersion:Fn(jn(t=>typeof t=="string"&&t.trim().length===0?void 0:t),W(w()))}),Jy=k({region:w().check(xr(1))}),IC=ke([fC,yC,vC,_C,bC,gC,hC,mC,Gy,EC]),Yy=ke([Wy,Zy,Ky,Jy,SC,TC,PC,xC,wC,AC]),RC=k({id:w(),name:w(),type:ze(ed)}),CC=k({id:w(),name:w(),provider:ze(oa),config:Yy,enabledForChat:Ve()}),OC=k({provider:ze(oa),config:Yy,auth:IC,platformId:w()});var pW={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},Fy=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],kC=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],$C=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],qy=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],DC=["grok-4.20","grok-4.1-fast"],NC={openai:Fy,anthropic:kC,google:qy,activepieces:[...$C.map(t=>`anthropic/${t}`),...Fy.map(t=>`openai/${t}`),...qy.map(t=>`google/${t}`),...DC.map(t=>`x-ai/${t}`)]};var By=128e3,zC={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function UC({provider:t}){return t?zC[t]??By:By}o(UC,"getMaxContextTokens");var Vy={openai:"text-embedding-3-small",google:"text-embedding-004",azure:"text-embedding-3-small",activepieces:"text-embedding-3-small",openrouter:"openai/text-embedding-3-small"},MC={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},LC=new Set(["anthropic","mistral"]);function Lr(t){return{chatModels:NC[t],maxContextTokens:UC({provider:t}),defaultEmbeddingModel:Vy[t],supportsEmbedding:Vy[t]!==void 0,supportsImageGeneration:!LC.has(t),webSearch:MC[t]}}o(Lr,"buildProviderCapabilities");var jC={openai:Lr("openai"),anthropic:Lr("anthropic"),openrouter:Lr("openrouter"),azure:Lr("azure"),google:Lr("google"),"cloudflare-gateway":Lr("cloudflare-gateway"),custom:Lr("custom"),bedrock:Lr("bedrock"),mistral:Lr("mistral"),activepieces:Lr("activepieces")};var FC=k({base64Url:w(),fileName:w(),extension:W(w())}),qC=k({mimeType:w(),url:w(),fileName:W(w())}),td=ke([FC,qC]);var BC=ke([k({type:ge("file"),value:td}),k({type:ge("markdown"),value:w(),files:W(Oe(td))})]),VC=k({sessionId:w(),message:w(),files:W(Oe(w()))});var Qy=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Qy||{}),ev=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(ev||{}),rd=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(rd||{});var GC=ke([k({...dr,name:w(),externalId:w(),type:ge("STATIC_DROPDOWN"),tableId:w(),projectId:w(),data:k({options:Oe(k({value:w()}))})}),k({...dr,name:w(),externalId:w(),type:ke([ge("TEXT"),ge("NUMBER"),ge("DATE")]),tableId:w(),projectId:w()})]),HC=k({...dr,name:w(),folderId:ut(w()),projectId:w(),externalId:w(),status:Kl(ev),trigger:Kl(Qy)}),WC=k({...dr,tableId:w(),projectId:w(),cells:Te(w(),k({updated:w(),created:w(),value:we(),fieldName:w()}))}),ZC=k({events:Oe(ze(rd)),webhookUrl:w(),flowId:w()}),KC=k({fields:Oe(k({id:w(),name:w()})),rows:Oe(Te(w(),w())),name:w()}),JC=k({projectId:w(),limit:W(Wi.number()),cursor:W(w()),name:W(w()),externalIds:Zs(w()),folderId:W(w()),folderIds:Zs(w())}),YC=k({records:Oe(Oe(k({fieldId:w(),value:rv()}))),tableId:w()}),XC=k({cells:W(Oe(k({fieldId:w(),value:rv()}))),tableId:w(),agentUpdate:W(Ve())}),tv=Ln("operator",[lo("eq"),lo("neq"),lo("gt"),lo("gte"),lo("lt"),lo("lte"),lo("co"),Xy("exists"),Xy("not_exists")]),QC=k({tableId:w(),limit:W(Wi.number()),cursor:W(w()),filters:Zs(tv)});function rv(){return Fn(jn(t=>t==null?t:String(t)),Hi(w()))}o(rv,"coerceToString");function lo(t){return k({fieldId:w(),operator:ge(t),value:w()})}o(lo,"valueFilter");function Xy(t){return k({fieldId:w(),operator:ge(t)})}o(Xy,"existenceFilter");var e0=k({status:W(Nt()),body:W(we()),headers:W(Te(w(),w()))}),t0=k({...dr,deleted:ut(qn),ownerId:w(),displayName:w(),platformId:w(),externalId:ut(w())});var nv=k({name:w(),description:W(w()),type:w(),required:Ve()}),r0=k({pieceName:w(),triggerName:w(),input:k({toolName:w(),toolDescription:w(),inputSchema:Oe(nv),returnsResponse:Ve()})});var ov="^[0-9]+\\.[0-9]+\\.[0-9]+$",OW=new RegExp(ov),o0="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",kW=w().check(Mn(new RegExp(ov))),$W=w().check(Mn(new RegExp(o0))),i0=k({packageType:ge("ARCHIVE"),pieceType:ze(Vo),pieceName:w(),pieceVersion:w(),archiveId:w(),platformId:w()}),iv=k({packageType:ge("REGISTRY"),pieceType:ge("OFFICIAL"),pieceName:w(),pieceVersion:w()}),av=k({packageType:ge("REGISTRY"),pieceType:ge("CUSTOM"),pieceName:w(),pieceVersion:w(),platformId:w()}),DW=ke([iv,av]),NW=ke([i0,iv,av]);var a0=Ln("type",[k({type:ge("CRON_EXPRESSION"),cronExpression:w(),timezone:w()}),k({type:ge("INTERVAL"),intervalMs:_y().check(Ls(6e4))})]),zW=k({...dr,type:ze(Lt),projectId:w(),flowId:w(),triggerName:w(),schedule:ut(a0),flowVersionId:w(),pieceName:w(),pieceVersion:w(),deleted:ut(w()),simulate:Ve()}),sv=(E=>(E.UNKNOWN="UNKNOWN",E.FLOW_RUN_LOG="FLOW_RUN_LOG",E.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",E.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",E.FLOW_STEP_FILE="FLOW_STEP_FILE",E.SAMPLE_DATA="SAMPLE_DATA",E.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",E.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",E.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",E.PROJECT_RELEASE="PROJECT_RELEASE",E.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",E.PLATFORM_ASSET="PLATFORM_ASSET",E.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",E.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",E.KNOWLEDGE_BASE="KNOWLEDGE_BASE",E.FLOW_BUNDLE="FLOW_BUNDLE",E))(sv||{}),uv=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(uv||{}),cv=(r=>(r.S3="S3",r.DB="DB",r))(cv||{}),UW=k({...dr,projectId:ut(w()),platformId:ut(w()),type:ze(sv),compression:ze(uv),data:W(we()),location:ze(cv),size:ut(Nt()),fileName:ut(w()),s3Key:ut(w()),metadata:ut(Te(w(),w()))}),lv=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(lv||{}),dv=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(dv||{}),MW=k({id:w(),email:w(),firstName:w(),status:ze(dv),externalId:ut(w()),platformId:ut(w()),platformRole:ze(lv),lastName:w(),created:qn,updated:qn,lastActiveDate:ut(qn),imageUrl:ut(w())});var od=k({...Ge.shape,...$e(Te(w(),we()),"OBJECT").shape});var mv=k({...Ge.shape,...$e(w(),"COLOR").shape});var id=ke([Kt,dn,Gs,fn,Jt,pn,Gl,Zi,Hl,mn,Yi,od,Xi,Ji,Ki,mv]),F={ShortText(t){return{...t,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(t){return{...t,valueSchema:void 0,type:"CHECKBOX"}},LongText(t){return{...t,valueSchema:void 0,type:"LONG_TEXT"}},MarkDown(t){return{displayName:"Markdown",required:!1,description:t.value,type:"MARKDOWN",valueSchema:void 0,variant:t.variant??"INFO"}},Number(t){return{...t,valueSchema:void 0,type:"NUMBER"}},Json(t){return{...t,valueSchema:void 0,type:"JSON"}},Array(t){return{...t,valueSchema:void 0,type:"ARRAY"}},Object(t){return{...t,valueSchema:void 0,type:"OBJECT"}},Dropdown(t){return{...t,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(t){return{...t,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(t){return{...t,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(t){return{...t,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(t){return{...t,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(t){return{...t,valueSchema:void 0,type:"DATE_TIME"}},File(t){return{...t,valueSchema:void 0,type:"FILE"}},Custom(t){let e=t.code.toString();return{...t,code:e,valueSchema:void 0,type:"CUSTOM"}},Color(t){return{...t,valueSchema:void 0,type:"COLOR"}}};var jr=k({displayName:w(),description:W(w()),hasConnectionIdentifier:W(Ve())});var hv=k({username:w(),password:w()}),ad=k({...jr.shape,username:k({displayName:w(),description:W(w())}),password:k({displayName:w(),description:W(w())}),...$e(hv,"BASIC_AUTH").shape});var l0=Te(w(),ke([Kt,dn,mn,fn,Jt])),sd=k({...jr.shape,props:l0,...$e(we(),"CUSTOM_AUTH").shape});var po=k({...jr.shape,...$e(k({auth:w()}),"SECRET_TEXT").shape});var d0=Te(w(),ke([Kt,dn,po,mn,fn,Jt,pn,Gs])),gv=k({...jr.shape,props:d0,...$e(we(),"OIDC").shape});var ud=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(ud||{}),yv=ke([Kt,po,Jt]),vv=Te(w(),yv),p0=k({props:W(Te(w(),yv)),authUrl:w(),tokenUrl:w(),scope:Oe(w()),prompt:W(ke([ge("none"),ge("consent"),ge("login"),ge("omit")])),pkce:W(Ve()),pkceMethod:W(ke([ge("plain"),ge("S256")])),authorizationMethod:W(ze(ud)),grantType:W(ke([ze(ea),ge(Wl)])),extra:W(Te(w(),w()))}),_v=k({access_token:w(),props:W(vv),data:Te(w(),Gi())}),cd=k({...jr.shape,...p0.shape,...$e(_v,"OAUTH2").shape});var Zo=ke([ad,sd,gv,cd,po]),ia="Connection",Js={SecretText(t){return{...t,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(t){return{...t,valueSchema:void 0,type:"OAUTH2",displayName:t.displayName||ia}},BasicAuth(t){return{...t,valueSchema:void 0,type:"BASIC_AUTH",displayName:t.displayName||ia,required:!0}},CustomAuth(t){return{...t,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:t.displayName||ia}},OIDC(t){return{...t,valueSchema:void 0,type:"OIDC",displayName:t.displayName||ia}},None(){}};var g3={OAUTH2:"OAUTH2",CLOUD_OAUTH2:"OAUTH2",PLATFORM_OAUTH2:"OAUTH2",BASIC_AUTH:"BASIC_AUTH",CUSTOM_AUTH:"CUSTOM_AUTH",OIDC:"OIDC",SECRET_TEXT:"SECRET_TEXT",NO_AUTH:void 0};var f0=k({...Ge.shape,...$e(we(),"CUSTOM").shape,code:w()});var m0=ke([id,Zo]),ld=Te(w(),m0),z3=Te(w(),id);var bv=ke([k({strategy:ge("CRON"),cronExpression:w()}),k({strategy:ge("NONE")})]),Ko=class{constructor(e,r,n,i,s,c,d,p,m,y,h,f,l,g,v,E,b,C,U){this.name=e;this.displayName=r;this.description=n;this.requireAuth=i;this.props=s;this.type=c;this.handshakeConfiguration=d;this.onHandshake=p;this.renewConfiguration=m;this.onRenew=y;this.onEnable=h;this.onDisable=f;this.onStart=l;this.run=g;this.test=v;this.sampleData=E;this.testStrategy=b;this.outputSchema=C;this.aiMetadata=U}static{o(this,"ITrigger")}},jt=o(t=>{switch(t.type){case"WEBHOOK":return new Ko(t.name,t.displayName,t.description,t.requireAuth??!0,t.props,t.type,t.handshakeConfiguration??{strategy:"NONE"},t.onHandshake??(async()=>({status:200})),t.renewConfiguration??{strategy:"NONE"},t.onRenew??(async()=>Promise.resolve()),t.onEnable,t.onDisable,t.onStart??(async()=>Promise.resolve()),t.run,t.test??(()=>Promise.resolve([t.sampleData])),t.sampleData,t.test?"TEST_FUNCTION":"SIMULATION",t.outputSchema,t.aiMetadata);case"POLLING":return new Ko(t.name,t.displayName,t.description,t.requireAuth??!0,t.props,t.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),t.onEnable,t.onDisable,t.onStart??(async()=>Promise.resolve()),t.run,t.test??(()=>Promise.resolve([t.sampleData])),t.sampleData,"TEST_FUNCTION",t.outputSchema,t.aiMetadata);case"MANUAL":return new Ko(t.name,t.displayName,t.description,t.requireAuth??!0,t.props,t.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),t.onEnable,t.onDisable,t.onStart??(async()=>Promise.resolve()),t.run,t.test??(()=>Promise.resolve([t.sampleData])),t.sampleData,"TEST_FUNCTION",t.outputSchema,t.aiMetadata);case"APP_WEBHOOK":return new Ko(t.name,t.displayName,t.description,t.requireAuth??!0,t.props,t.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),t.onEnable,t.onDisable,t.onStart??(async()=>Promise.resolve()),t.run,t.test??(()=>Promise.resolve([t.sampleData])),t.sampleData,rt(t.sampleData)&&rt(t.test)?"SIMULATION":"TEST_FUNCTION",t.outputSchema,t.aiMetadata)}},"createTrigger");var Ev="2",Ys="0.82.0";var dd=class{constructor(e,r,n,i,s,c,d,p,m=Ys,y,h="",f){this.displayName=e;this.logoUrl=r;this.authors=n;this.events=i;this.categories=d;this.auth=p;this.minimumSupportedRelease=m;this.maximumSupportedRelease=y;this.description=h;this.deprecated=f;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:Ev}),"getContextInfo");(!g0(m)||y0(m,Ys))&&(this.minimumSupportedRelease=Ys),s.forEach(l=>this._actions[l.name]=l),c.forEach(l=>this._triggers[l.name]=l)}static{o(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:h0(this.auth),minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(e){return this._actions[e]}getTrigger(e){return this._triggers[e]}actions(){return this._actions}triggers(){return this._triggers}},wv=o(t=>{if(t.auth&&Array.isArray(t.auth)&&!t.auth.every((r,n,i)=>n===i.findIndex(s=>s.type===r.type)))throw new Error("Auth properties must be unique by type");return new dd(t.displayName,t.logoUrl,t.authors??[],t.events,t.actions,t.triggers,t.categories??[],t.auth,t.minimumSupportedRelease,t.maximumSupportedRelease,t.description,t.deprecated)},"createPiece");function h0(t){if(t!==void 0)return Array.isArray(t)?t.map(Sv):Sv(t)}o(h0,"withConnectionIdentifierFlag");function Sv(t){return{...t,hasConnectionIdentifier:t.getConnectionIdentifier!==void 0}}o(Sv,"flagConnectionIdentifier");function g0(t){return/^\d+\.\d+\.\d+$/.test(t)}o(g0,"isValidSimpleSemver");function y0(t,e){let[r,n,i]=t.split(".").map(Number),[s,c,d]=e.split(".").map(Number);return r!==s?r<s:n!==c?n<c:i<d}o(y0,"isSemverLessThan");var v0=W(Te(w(),Te(w(),w()))),Tv=k({id:W(w()),name:w(),displayName:w(),logoUrl:w(),description:w(),authors:Oe(w()),platformId:W(w()),directoryPath:W(w()),auth:W(ke([Zo,Oe(Zo)])),version:w(),categories:W(Oe(ze(Go))),minimumSupportedRelease:W(w()),maximumSupportedRelease:W(w()),deprecated:W(Ve()),i18n:v0}),_0=ze(["human","ai","both"]),Pv=k({description:W(w()),idempotent:W(Ve())}),xv=k({name:w(),displayName:w(),description:w(),props:ld,requireAuth:Ve(),errorHandlingOptions:W(Vl),outputSchema:W(Bs()),audience:W(_0),aiMetadata:W(Pv)}),Av=k({name:w(),displayName:w(),description:w(),props:ld,errorHandlingOptions:W(Vl),type:ze(Lt),sampleData:we(),handshakeConfiguration:W(Bs()),renewConfiguration:W(bv),testStrategy:ze(ra),outputSchema:W(Bs()),aiMetadata:W(Pv)}),b0=k({...Tv.shape,actions:Te(w(),xv),triggers:Te(w(),Av)}),E0=k({...Tv.shape,actions:Nt(),triggers:Nt(),suggestedActions:W(Oe(xv)),suggestedTriggers:W(Oe(Av))}),Iv=k({projectUsage:Nt(),pieceType:ze(Vo),packageType:ze(Qi),platformId:W(w()),archiveId:W(w())}),zK=k({...b0.shape,...Iv.shape}),UK=k({...E0.shape,...Iv.shape}),MK=k({name:w(),version:w()});var S0=qe(require("path")),w0=qe(require("fs/promises"));var kv=require("node:stream");var Xs=class{constructor(e,r){this.baseUrl=e;this.authenticationConverter=r}static{o(this,"BaseHttpClient")}getUrl(e){let r=new URL(`${this.baseUrl}${e.url}`),n=`${r.origin}${r.pathname}`,i=new URLSearchParams;return r.searchParams.forEach((s,c)=>{i.append(c,s)}),{urlWithoutQueryParams:n,queryParams:i}}getHeaders(e){let r={Accept:"application/json"};return e.authentication&&this.populateAuthentication(e.authentication,r),e.body&&(e.headers?.["Content-Type"]==="text/csv"?r["Content-Type"]="text/csv":r["Content-Type"]="application/json"),e.headers&&(r={...r,...e.headers}),r}populateAuthentication(e,r){this.authenticationConverter.convert(e,r)}};var Qs=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(e=new pd,r=new fd){this.converters={BEARER_TOKEN:e,BASIC:r}}convert(e,r){return this.converters[e.type].convert(e,r)}},pd=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(e,r){return r.Authorization=`Bearer ${e.token}`,r}},fd=class{static{o(this,"BasicTokenAuthenticationConverter")}convert(e,r){let n=`${e.username}:${e.password}`,i=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${i}`,r}};var aa=class extends Error{constructor(r,n){let i=n.status||500,s=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:i,body:s},request:{body:r}}));this.requestBody=r;this.status=i,this.responseBody=s}static{o(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};function Rv({error:t,requestBody:e}){return t instanceof aa?t.errorMessage():{response:{status:0,body:t instanceof Error?t.message:String(t)},request:{body:e}}}o(Rv,"toFailsafeOutput");var Ot=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(Ot||{});var eu=class extends Xs{static{o(this,"FetchHttpClient")}constructor(e="",r=new Qs){super(e,r)}async sendRequest(e,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(e),s=this.getHeaders(e),c=e.queryParams??{};for(let[U,J]of Object.entries(c))i.append(U,J);let d=i.toString(),p=d?`${n}?${d}`:n,m=e.responseType??"json",y=e.followRedirects??!0,h=e.retries??0,{body:f,extraHeaders:l,isStream:g}=T0(e.method)?P0(e.body,s):{body:void 0,extraHeaders:{},isStream:!1},v=A0({...s,...l}),E=await x0(async()=>{let U=new AbortController,J=e.timeout&&e.timeout>0?setTimeout(()=>U.abort(),e.timeout):void 0;try{let Z={method:e.method.toString(),headers:v,body:f,redirect:y?"follow":"manual",signal:U.signal};return g&&(Z.duplex="half"),r?.dispatcher!==void 0&&(Z.dispatcher=r.dispatcher),await fetch(p,Z)}finally{J!==void 0&&clearTimeout(J)}},h),b=y?300:400;if(E.status<200||E.status>=b){let U=await Cv(E,m),J=new aa(e.body,{status:E.status,responseBody:U});throw console.error("[HttpClient#(sanitized error message)] Request failed:",J),J}let C=await Cv(E,m);return{status:E.status,headers:I0(E.headers),body:C}}};function T0(t){return t!=="GET"&&t!=="HEAD"}o(T0,"acceptsRequestBody");function P0(t,e){if(C0(t))return{body:void 0,extraHeaders:{},isStream:!1};if(R0(t)){let n=new kv.PassThrough;return t.on("error",i=>n.destroy(i)),t.pipe(n),{body:n,extraHeaders:t.getHeaders(),isStream:!0}}return typeof t=="string"||Buffer.isBuffer(t)||t instanceof URLSearchParams||t instanceof ArrayBuffer||typeof FormData<"u"&&t instanceof FormData||typeof Blob<"u"&&t instanceof Blob?{body:t,extraHeaders:{},isStream:!1}:(e["Content-Type"]??e["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(t).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(t),extraHeaders:{},isStream:!1}}o(P0,"serializeBody");async function Cv(t,e){switch(e){case"arraybuffer":return Buffer.from(await t.arrayBuffer());case"blob":return await t.blob();case"text":return await t.text();default:{let r=await t.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}o(Cv,"parseResponseBody");async function x0(t,e){let r;for(let n=0;n<=e;n++)try{let i=await t();if(i.status>=500&&n<e){await Ov(n);continue}return i}catch(i){if(r=i,n<e){await Ov(n);continue}throw i}throw r}o(x0,"sendWithRetries");function Ov(t){let e=Math.min(1e3*2**t,3e4);return new Promise(r=>setTimeout(r,e))}o(Ov,"backoff");function A0(t){let e={};for(let[r,n]of Object.entries(t))n!==void 0&&(e[r.toLowerCase()]=Array.isArray(n)?n.join(", "):n);return e}o(A0,"normalizeHeaders");function I0(t){let e={};return t.forEach((r,n)=>{e[n]=r}),e}o(I0,"toHttpHeaders");function R0(t){return typeof t=="object"&&t!==null&&typeof t.getHeaders=="function"&&typeof t.pipe=="function"&&typeof t.on=="function"}o(R0,"isNodeFormData");function C0(t){return t==null}o(C0,"isNil");var Ue=new eu;var yk=qe(require("fs")),zb=qe(Nb());var vk={"application/json":"json","application/pdf":"pdf","application/xml":"xml","text/xml":"xml","application/zip":"zip","application/gzip":"gz","application/x-tar":"tar","application/octet-stream":"bin","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/rtf":"rtf","application/javascript":"js","application/x-www-form-urlencoded":"bin","text/plain":"txt","text/html":"html","text/css":"css","text/csv":"csv","text/calendar":"ics","text/markdown":"md","image/png":"png","image/jpeg":"jpeg","image/jpg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/tiff":"tiff","image/x-icon":"ico","image/vnd.microsoft.icon":"ico","image/heic":"heic","audio/mpeg":"mp3","audio/mp4":"m4a","audio/wav":"wav","audio/x-wav":"wav","audio/ogg":"ogg","audio/webm":"weba","video/mp4":"mp4","video/mpeg":"mpeg","video/webm":"webm","video/quicktime":"mov","video/x-msvideo":"avi","font/woff":"woff","font/woff2":"woff2","font/ttf":"ttf","font/otf":"otf"};function _k(t){let e=t.split(";")[0].trim().toLowerCase();return vk[e]??""}o(_k,"contentTypeToExtension");var bk=o(({baseUrl:t,relativePath:e})=>{let r=t.endsWith("/")?t:`${t}/`,n=e.startsWith("/")?e.slice(1):e;return`${r}${n}`},"joinBaseUrlWithRelativePath"),Ek=o((t,e)=>{let r="https://api.example.com";try{let n=e?t(e):void 0;return(n?.endsWith("/")?n.slice(0,-1):n)??r}catch{return r}},"getBaseUrlForDescription");function Ub({auth:t,baseUrl:e,authMapping:r,description:n,displayName:i,name:s,props:c,extraProps:d,authLocation:p="headers"}){return ve({audience:"human",name:s||"custom_api_call",displayName:i||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:t,requireAuth:!!t,props:{url:F.DynamicProperties({auth:t,displayName:"",required:!0,refreshers:[],props:o(async({auth:m})=>({url:F.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
|
|
69
|
-
i.e ${Ek(e,m)}/resource or /resource`,required:!0,defaultValue:m?e(m):"",...c?.url??{}})}),"props")}),method:F.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(Ot).map(m=>({label:m,value:m}))},...c?.method??{}}),headers:F.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:F.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:F.StaticDropdown({displayName:"Body Type",required:!1,defaultValue:"none",options:{disabled:!1,options:[{label:"None",value:"none"},{label:"JSON",value:"json"},{label:"Form Data",value:"form_data"},{label:"Raw",value:"raw"}]}}),body:F.DynamicProperties({auth:t,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:m})=>{if(!m)return{};let y=m,h={};switch(y){case"none":break;case"json":h.data=F.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":h.data=F.LongText({displayName:"Raw Body",required:!0});break;case"form_data":h.data=F.Array({displayName:"Form Data",required:!0,properties:{fieldName:F.ShortText({displayName:"Field Name",required:!0}),fieldType:F.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:F.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:F.File({displayName:"File Field Value",required:!1})}});break}return h},"props")}),response_is_binary:F.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:F.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:F.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:F.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...d},run:o(async m=>{let{method:y,url:h,headers:f,queryParams:l,body:g,body_type:v,failsafe:E,timeout:b,response_is_binary:C,followRedirects:U}=m.propsValue;Ws(y,"Method"),Ws(h,"URL");let J=rt(r)?{}:await r(m.auth,m.propsValue),Z=h.url,H=Z.startsWith("http://")||Z.startsWith("https://")?Z:bk({baseUrl:e(m.auth),relativePath:Z}),K={method:y,url:H,headers:{...f??{},...p==="headers"||!rt(p)?J:{}},queryParams:{...p==="queryParams"?J:{},...l??{}},timeout:b?b*1e3:0,followRedirects:U};if(C&&(K.responseType="arraybuffer"),g)if(v&&v!=="none"){let te=g.data;if(v==="form_data"){let Q=te,xe=new zb.default;for(let{fieldName:re,fieldType:V,textFieldValue:B,fileFieldValue:X}of Q)V==="text"&&!na(B)?xe.append(re,B):V==="file"&&!na(X)&&xe.append(re,X.data,{filename:X?.filename});K.body=xe,K.headers={...K.headers,...xe.getHeaders()}}else K.body=te}else v||(K.body=g);try{let te=await Ue.sendRequest(K);return await Sk(m.files,te.body,te.status,te.headers,C)}catch(te){if(E)return Rv({error:te,requestBody:K.body});throw te}},"run")})}o(Ub,"createCustomApiCallAction");var Sk=o(async(t,e,r,n,i)=>{let s;if(i&&wk(e)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],d=_k(c??"")||"txt",p;e instanceof ArrayBuffer?p=Buffer.from(new Uint8Array(e)):Buffer.isBuffer(e)?p=e:p=Buffer.from(e),s=await t.write({fileName:`output.${d}`,data:p})}else s=e;return{status:r,headers:n,body:s}},"handleBinaryResponse"),wk=o(t=>t instanceof ArrayBuffer||Buffer.isBuffer(t),"isBinaryBody");var Je={async poll(t,{store:e,auth:r,propsValue:n,maxItemsToPoll:i,files:s,server:c}){switch(t.strategy){case 0:{let d=await e.get("lastPoll");if(rt(d))throw new Error("lastPoll doesn't exist in the store.");let p=await t.items({store:e,auth:r,propsValue:n,lastFetchEpochMS:d,server:c}),m=p.reduce((y,h)=>Math.max(y,h.epochMilliSeconds),d);return await e.put("lastPoll",m),p.filter(y=>y.epochMilliSeconds>d).map(y=>y.data)}case 1:{let d=await e.get("lastItem"),p=await t.items({store:e,auth:r,propsValue:n,lastItemId:d,files:s,server:c}),m=p.findIndex(f=>f.id===d),y=[];rt(d)||m==-1?y=p??[]:y=p?.slice(0,m)??[],rt(i)||(y=y.slice(-i));let h=y?.[0]?.id;return rt(h)||await e.put("lastItem",h),y.map(f=>f.data)}}},async onEnable(t,{store:e,auth:r,propsValue:n,server:i,isRepublish:s}){switch(t.strategy){case 0:{if(s&&!rt(await e.get("lastPoll")))break;await e.put("lastPoll",Date.now());break}case 1:{if(s&&!rt(await e.get("lastItem")))break;let d=(await t.items({store:e,auth:r,propsValue:n,lastItemId:null,server:i}))?.[0]?.id;rt(d)?await e.delete("lastItem"):await e.put("lastItem",d);break}}},async onDisable(t,e){switch(t.strategy){case 0:case 1:return}},async test(t,{auth:e,propsValue:r,store:n,files:i,server:s}){let c=[];switch(t.strategy){case 0:{c=await t.items({store:n,auth:e,propsValue:r,lastFetchEpochMS:0,server:s});break}case 1:{c=await t.items({store:n,auth:e,propsValue:r,lastItemId:null,files:i,server:s});break}}return Tk(c.map(d=>d.data))}};function Tk(t){return t.length<=5?t:t.slice(0,5)}o(Tk,"getFirstFiveOrAll");var Mb=require("crypto");async function Nd(t,e){let r={method:"POST",url:`${ae.baseUrl}/channels/stop`,body:{id:t?.id,resourceId:t?.resourceId},authentication:{type:"BEARER_TOKEN",token:await Ie(e)}};await Ue.sendRequest(r)}o(Nd,"stopWatchEvent");async function zd(t,e,r){let n=Date.now()+5184e5,i={method:"POST",url:`${ae.baseUrl}/calendars/${t}/events/watch`,body:{id:(0,Mb.randomUUID)(),type:"web_hook",address:e,expiration:n.toString()},authentication:{type:"BEARER_TOKEN",token:await Ie(r)}},{body:s}=await Ue.sendRequest(i);return s}o(zd,"watchEvent");async function cu({calendarId:t,authProp:e}){let r=await Ie(e),n={singleEvents:"true",showDeleted:"true",maxResults:"2500"},i="",s;do{i&&(n.pageToken=i);let c={method:"GET",url:`${ae.baseUrl}/calendars/${t}/events`,queryParams:n,authentication:{type:"BEARER_TOKEN",token:r}},{body:d}=await Ue.sendRequest(c);i=d.nextPageToken,s=d.nextSyncToken}while(i);return s}o(cu,"getInitialSyncToken");async function Lb({calendarId:t,syncToken:e,authProp:r}){let n=await Ie(r),i={syncToken:e,maxResults:"2500"},s="",c,d=[];do{s&&(i.pageToken=s);let p={method:"GET",url:`${ae.baseUrl}/calendars/${t}/events`,queryParams:i,authentication:{type:"BEARER_TOKEN",token:n}};try{let{body:m}=await Ue.sendRequest(p);m.items?.length>0&&(d=[...d,...m.items]),s=m.nextPageToken,c=m.nextSyncToken}catch(m){if(m?.response?.status===410)return{items:[],nextSyncToken:void 0,syncTokenInvalid:!0};throw m}}while(s);return{items:d,nextSyncToken:c,syncTokenInvalid:!1}}o(Lb,"listEventsWithSyncToken");async function kt(t,e){let r={showDeleted:"false"};e&&(r.minAccessRole=e);let n={method:"GET",url:`${ae.baseUrl}/users/me/calendarList`,queryParams:r,authentication:{type:"BEARER_TOKEN",token:await Ie(t)}};return(await Ue.sendRequest(n)).body.items}o(kt,"getCalendars");async function lu(t){let e={method:"GET",url:`${ae.baseUrl}/colors`,authentication:{type:"BEARER_TOKEN",token:await Ie(t)}};return(await Ue.sendRequest(e)).body}o(lu,"getColors");async function da(t,e,r,n){let i=new Date,s=new Date;s.setDate(i.getDate()-1);let c={updatedMin:n?.toISOString()??s.toISOString(),maxResults:"2500",orderBy:"updated",singleEvents:e?"true":"false",showDeleted:"true"},d=await Ie(r),p={method:"GET",url:`${ae.baseUrl}/calendars/${t}/events`,queryParams:c,authentication:{type:"BEARER_TOKEN",token:d}},m=[],y="";do{c.pageToken=y;let{body:h}=await Ue.sendRequest(p);h.items.length>0&&(m=[...m,...h.items]),y=h.nextPageToken}while(y);return m}o(da,"getEvents");async function jb(t,e){return(await da(t,!1,e)).pop()}o(jb,"getLatestEvent");async function Fb(t,e,r=50){if(!e)return[];try{let n=new Date,i=new Date;i.setDate(n.getDate()+30);let s={singleEvents:"true",orderBy:"startTime",timeMin:n.toISOString(),timeMax:i.toISOString(),maxResults:r.toString(),showDeleted:"false"},c={method:"GET",url:`${ae.baseUrl}/calendars/${encodeURIComponent(e)}/events`,queryParams:s,authentication:{type:"BEARER_TOKEN",token:await Ie(t)}},d=await Ue.sendRequest(c);return!d.body.items||d.body.items.length===0?[]:d.body.items.map(p=>{let m=p.start?.dateTime||p.start?.date||"",y=m?new Date(m).toLocaleDateString():"",h=m?new Date(m).toLocaleTimeString():"",f=p.summary||"Untitled Event";return y&&(f+=` (${y}`,p.start?.dateTime&&(f+=` at ${h}`),f+=")"),{label:f,value:p.id||""}}).filter(p=>p.value!=="")}catch(n){return console.error("Error fetching events for dropdown:",n),[]}}o(Fb,"getEventsForDropdown");var Ac=qe(Ba());var rm=["https://www.googleapis.com/auth/calendar.events","https://www.googleapis.com/auth/calendar.readonly","email"],ne=[Js.OAuth2({description:"",authUrl:"https://accounts.google.com/o/oauth2/auth",tokenUrl:"https://oauth2.googleapis.com/token",required:!0,pkce:!0,scope:rm}),Js.CustomAuth({displayName:"Service Account (Advanced)",description:"Authenticate via service account from https://console.cloud.google.com/ > IAM & Admin > Service Accounts > Create Service Account > Keys > Add key. <br> <br> You can optionally use domain-wide delegation (https://support.google.com/a/answer/162106?hl=en#zippy=%2Cset-up-domain-wide-delegation-for-a-client) to access calendars without adding the service account to each one. <br> <br> **Note:** Without a user email, the service account only has access to calendars you explicitly share with it.",required:!0,props:{serviceAccount:F.ShortText({displayName:"Service Account JSON Key",required:!0}),userEmail:F.ShortText({displayName:"User Email",required:!1,description:"Email address of the user to impersonate for domain-wide delegation."})},validate:o(async({auth:t})=>{try{await Ie({type:"CUSTOM_AUTH",props:{...t}})}catch(e){return{valid:!1,error:e.message}}return{valid:!0}},"validate")})];async function _t(t){if(t.type==="CUSTOM_AUTH"){let r=JSON.parse(t.props.serviceAccount);return new Ac.JWT({email:r.client_email,key:r.private_key,scopes:rm,subject:t.props.userEmail})}let e=new Ac.OAuth2Client;return e.setCredentials(t),e}o(_t,"createGoogleClient");var Ie=o(async t=>{if(t.type==="CUSTOM_AUTH"){let r=await(await _t(t)).getAccessToken();if(r.token)return r.token;throw new Error("Could not retrieve access token from service account json")}return t.access_token},"getAccessToken");var ae={baseUrl:"https://www.googleapis.com/calendar/v3",calendarDropdown:o(t=>F.Dropdown({auth:ne,displayName:"Calendar",refreshers:[],required:!0,options:o(async({auth:e})=>e?{disabled:!1,options:(await kt(e,t)).map(i=>({label:i.summary,value:i.id}))}:{disabled:!0,placeholder:"Please connect your account first",options:[]},"options")}),"calendarDropdown"),eventDropdown:o((t=!1)=>F.Dropdown({displayName:"Event",refreshers:["calendar_id"],required:t,auth:ne,options:o(async({auth:e,calendar_id:r})=>e?r?{disabled:!1,options:await Fb(e,r)}:{disabled:!0,placeholder:"Please select a calendar first",options:[]}:{disabled:!0,placeholder:"Please connect your account first",options:[]},"options")}),"eventDropdown"),colorId:F.Dropdown({auth:ne,displayName:"Color",refreshers:[],required:!1,options:o(async({auth:t})=>{if(!t)return{disabled:!0,placeholder:"Please connect your account first",options:[]};let e=await lu(t);return{disabled:!1,options:Object.entries(e.event).map(([r,n])=>({label:n.background,value:r}))}},"options")})};var Zc=qe(Sn()),_x=qe(xn()),bx=require("crypto");var Ze={fields:[{key:"summary",label:"Title"},{key:"status",label:"Status"},{key:"htmlLink",label:"Event Link",format:"url"},{key:"id",label:"Event ID"},{key:"eventType",label:"Event Type"},{key:"start",label:"Start",children:[{key:"dateTime",label:"Start Time",format:"datetime"},{key:"timeZone",label:"Time Zone"}]},{key:"end",label:"End",children:[{key:"dateTime",label:"End Time",format:"datetime"},{key:"timeZone",label:"Time Zone"}]},{key:"creator",label:"Creator",children:[{key:"email",label:"Email",format:"email"}]},{key:"organizer",label:"Organizer",children:[{key:"email",label:"Email",format:"email"}]},{key:"created",label:"Created",format:"datetime"},{key:"updated",label:"Updated",format:"datetime"},{key:"iCalUID",label:"iCal UID"}]},ux={fields:[{key:"summary",label:"Name"},{key:"description",label:"Description"},{key:"id",label:"Calendar ID"},{key:"timeZone",label:"Time Zone"},{key:"accessRole",label:"Access Role"},{key:"primary",label:"Primary",format:"boolean"},{key:"isOwned",label:"Is Owned",format:"boolean"},{key:"selected",label:"Selected",format:"boolean"},{key:"isShared",label:"Is Shared",format:"boolean"},{key:"calendarType",label:"Calendar Type"},{key:"backgroundColor",label:"Background Color"},{key:"foregroundColor",label:"Foreground Color"},{key:"colorId",label:"Color ID"}]},Hc={fields:[{key:"status",label:"Status Code"},{key:"summary",label:"Calendar Summary",value:"body.summary"},{key:"timeZone",label:"Time Zone",value:"body.timeZone"},{key:"accessRole",label:"Access Role",value:"body.accessRole"},{key:"updated",label:"Updated",value:"body.updated",format:"datetime"},{key:"items",label:"Events",value:"body.items",labelKey:"summary",listItems:[{key:"summary",label:"Title"},{key:"status",label:"Status"},{key:"id",label:"Event ID"},{key:"eventType",label:"Event Type"},{key:"htmlLink",label:"Event Link",format:"url"},{key:"startDateTime",label:"Start",value:"start.dateTime",format:"datetime"},{key:"endDateTime",label:"End",value:"end.dateTime",format:"datetime"},{key:"creatorEmail",label:"Creator Email",value:"creator.email",format:"email"},{key:"organizerEmail",label:"Organizer Email",value:"organizer.email",format:"email"},{key:"created",label:"Created",format:"datetime"},{key:"updated",label:"Updated",format:"datetime"},{key:"iCalUID",label:"iCal UID"}]}]},cx={fields:[{key:"summary",label:"Summary",value:"body.summary"},{key:"status",label:"Status",value:"body.status"},{key:"id",label:"Event ID",value:"body.id"},{key:"htmlLink",label:"Event Link",value:"body.htmlLink",format:"url"},{key:"created",label:"Created",value:"body.created",format:"datetime"},{key:"updated",label:"Updated",value:"body.updated",format:"datetime"},{key:"start",label:"Start",value:"body.start",children:[{key:"dateTime",label:"Start Date/Time",format:"datetime"},{key:"timeZone",label:"Time Zone"}]},{key:"end",label:"End",value:"body.end",children:[{key:"dateTime",label:"End Date/Time",format:"datetime"},{key:"timeZone",label:"Time Zone"}]},{key:"creator",label:"Creator",value:"body.creator",children:[{key:"email",label:"Email",format:"email"}]},{key:"organizer",label:"Organizer",value:"body.organizer",children:[{key:"email",label:"Email",format:"email"}]},{key:"eventType",label:"Event Type",value:"body.eventType"},{key:"iCalUID",label:"iCal UID",value:"body.iCalUID"}]},lx={fields:[{key:"summary",label:"Name"},{key:"id",label:"Calendar ID"},{key:"description",label:"Description"},{key:"location",label:"Location"},{key:"timeZone",label:"Time Zone"}]};var dx={fields:[{key:"calendar",label:"Calendar Colors",dynamicKey:!0,children:[{key:"background",label:"Background Color"},{key:"foreground",label:"Foreground Color"}]},{key:"event",label:"Event Colors",dynamicKey:!0,children:[{key:"background",label:"Background Color"},{key:"foreground",label:"Foreground Color"}]}]},px={fields:[{key:"calendars",label:"Calendars",labelKey:"summary",listItems:[{key:"id",label:"Calendar ID"},{key:"summary",label:"Name"},{key:"description",label:"Description"},{key:"location",label:"Location"},{key:"timeZone",label:"Time Zone"},{key:"accessRole",label:"Access Role"},{key:"primary",label:"Primary",format:"boolean"},{key:"selected",label:"Selected",format:"boolean"},{key:"backgroundColor",label:"Background Color"},{key:"foregroundColor",label:"Foreground Color"}]},{key:"count",label:"Count",format:"number"}]},fx={fields:[{key:"items",label:"Settings",labelKey:"id",listItems:[{key:"id",label:"Setting ID"},{key:"value",label:"Value"}]},{key:"count",label:"Count",format:"number"}]},mx={fields:[{key:"removed",label:"Removed",format:"boolean"},{key:"attendee_email",label:"Attendee Email",format:"email"},{key:"message",label:"Message"},{key:"event",label:"Event",children:Ze.fields}]},hx={fields:[{key:"free_slots",label:"Free Slots",labelKey:"start",listItems:[{key:"start",label:"Start",format:"datetime"},{key:"end",label:"End",format:"datetime"},{key:"duration_minutes",label:"Duration (Minutes)",format:"number"}]},{key:"count",label:"Count",format:"number"}]},mL=[{key:"summary",label:"Title"},{key:"status",label:"Status"},{key:"id",label:"Instance Event ID"},{key:"htmlLink",label:"Event Link",format:"url"},{key:"startDateTime",label:"Start",value:"start.dateTime",format:"datetime"},{key:"endDateTime",label:"End",value:"end.dateTime",format:"datetime"},{key:"originalStartDateTime",label:"Original Start",value:"originalStartTime.dateTime",format:"datetime"}],gx={fields:[{key:"instances",label:"Instances",labelKey:"summary",listItems:mL},{key:"count",label:"Count",format:"number"},{key:"nextPageToken",label:"Next Page Token"}]},yx={fields:[{key:"moved",label:"Moved",format:"boolean"},{key:"already_in_destination",label:"Already in Destination",format:"boolean"},{key:"event",label:"Event",children:Ze.fields}]},vx={fields:[{key:"events",label:"Events",labelKey:"summary",listItems:[{key:"calendarId",label:"Calendar ID"},{key:"summary",label:"Title"},{key:"status",label:"Status"},{key:"id",label:"Event ID"},{key:"htmlLink",label:"Event Link",format:"url"},{key:"startDateTime",label:"Start",value:"start.dateTime",format:"datetime"},{key:"endDateTime",label:"End",value:"end.dateTime",format:"datetime"}]},{key:"count",label:"Count",format:"number"},{key:"calendars_searched",label:"Calendars Searched",format:"number"},{key:"warning",label:"Warning"}]},Wc={fields:[{key:"timeMin",label:"Time Min",format:"datetime"},{key:"timeMax",label:"Time Max",format:"datetime"},{key:"calendars",label:"Calendars",dynamicKey:!0,children:[{key:"busy",label:"Busy Periods",labelKey:"start",listItems:[{key:"start",label:"Start",format:"datetime"},{key:"end",label:"End",format:"datetime"}]}]}]};var Fm={calendar_id:ae.calendarDropdown("writer"),title:F.ShortText({displayName:"Title of the event",required:!0}),start_date_time:F.DateTime({displayName:"Start date time of the event",required:!0}),end_date_time:F.DateTime({displayName:"End date time of the event",description:"By default it'll be 30 min post start time",required:!1}),location:F.ShortText({displayName:"Location",required:!1}),description:F.LongText({displayName:"Description",description:"Description of the event. You can use HTML tags here.",required:!1}),colorId:ae.colorId,attendees:F.Array({displayName:"Attendees",description:"Emails of the attendees (guests)",required:!1}),guests_can_modify:F.Checkbox({displayName:"Guests can modify",defaultValue:!1,required:!1}),guests_can_invite_others:F.Checkbox({displayName:"Guests can invite others",defaultValue:!1,required:!1}),guests_can_see_other_guests:F.Checkbox({displayName:"Guests can see other guests",defaultValue:!1,required:!1}),send_notifications:F.StaticDropdown({displayName:"Send Notifications",defaultValue:"all",options:{options:[{label:"Yes, to everyone",value:"all"},{label:"To non-Google Calendar guests only",value:"externalOnly"},{label:"To no one",value:"none"}]},required:!0}),create_meet_link:F.Checkbox({displayName:"Create Google Meet Link",description:"Automatically create a Google Meet video conference link for this event",defaultValue:!1,required:!1})};async function qm(t){let{calendar_id:e,title:r,start_date_time:n,end_date_time:i,location:s,description:c,colorId:d,guests_can_modify:p,guests_can_invite_others:m,guests_can_see_other_guests:y,create_meet_link:h}=t.propsValue,f={dateTime:(0,Zc.default)(n).format("YYYY-MM-DDTHH:mm:ss.sssZ")},l=i||(0,Zc.default)(n).add(30,"m"),g={dateTime:(0,Zc.default)(l).format("YYYY-MM-DDTHH:mm:ss.sssZ")},v=t.propsValue.attendees,E=t.propsValue.send_notifications,b=[];if(v)for(let H of v)b.push({email:H});let C=await _t(t.auth),U=(0,_x.calendar)({version:"v3",auth:C}),J={summary:r,start:f,end:g,colorId:d,location:s??"",description:c??"",attendees:b,guestsCanInviteOthers:m,guestsCanModify:p,guestsCanSeeOtherGuests:y};return h&&(J.conferenceData={createRequest:{conferenceSolutionKey:{type:"hangoutsMeet"},requestId:(0,bx.randomUUID)()}}),(await U.events.insert({calendarId:e,sendUpdates:E,conferenceDataVersion:h?1:0,requestBody:J})).data}o(qm,"runCreateEvent");var Ex=ve({auth:ne,name:"create_google_calendar_event",description:"Add Event",audience:"human",aiMetadata:{description:"Creates a Google Calendar event with structured fields (title, start/end times, location, description, attendees, color, guest permissions) and can optionally attach a Google Meet link. Use this when you have explicit event details; choose Create Quick Event instead when working from a single natural-language phrase. Requires a title and start time (end defaults to 30 minutes after start). Not idempotent: each call creates a new event.",idempotent:!1},displayName:"Create Event",props:Fm,outputSchema:Ze,run:qm});var Sx=ve({auth:ne,name:"create_quick_event",description:"Add Quick Calendar Event",audience:"both",aiMetadata:{description:`Creates a calendar event from a single natural-language phrase (e.g. "Lunch with Sam tomorrow at 1pm") via Google's quickAdd parsing, letting Google infer the time, title, and date. Use when you have free-form text rather than structured fields; prefer Create Event when you have explicit start/end times or attendees. Not idempotent: each call creates a new event.`,idempotent:!1},displayName:"Create Quick Event",props:{calendar_id:ae.calendarDropdown("writer"),text:F.LongText({displayName:"Summary",description:"The text describing the event to be created",required:!0}),send_updates:F.StaticDropdown({displayName:"Send Updates",description:"Guests who should receive notifications about the creation of the new event.",required:!1,options:{disabled:!1,options:[{label:"All",value:"all"},{label:"External Only",value:"externalOnly"},{label:"none",value:"none"}]}})},outputSchema:cx,async run(t){let e=t.propsValue.calendar_id,r=`${ae.baseUrl}/calendars/${e}/events/quickAdd`,n={text:t.propsValue.text,sendUpdates:t.propsValue.send_updates||"none"},i={method:"POST",url:r,body:{},authentication:{type:"BEARER_TOKEN",token:await Ie(t.auth)},queryParams:n};return await Ue.sendRequest(i)}});var wx=qe(xn());var hL={calendar_id:ae.calendarDropdown("writer"),eventId:F.ShortText({displayName:"Event ID",required:!0})};async function Bm(t){let e=await _t(t.auth),r=t.propsValue.calendar_id,n=t.propsValue.eventId;return(await(0,wx.calendar)({version:"v3",auth:e}).events.delete({calendarId:r,eventId:n})).data}o(Bm,"runDeleteEvent");var Tx=ve({displayName:"Delete Event",auth:ne,name:"delete_event",description:"Deletes an event from Google Calendar.",audience:"human",aiMetadata:{description:"Permanently removes an event from a Google Calendar, identified by calendar and event ID. Use to cancel or delete an existing event. Requires the event ID and cannot be undone. Idempotent: once the event is deleted, repeating the call leaves it absent (a second call may report it as already gone).",idempotent:!0},props:hL,run:Bm});var Vm=qe(Sn());var Gm={calendar_id:ae.calendarDropdown("writer"),event_types:F.StaticMultiSelectDropdown({displayName:"Event types",description:"Select event types",required:!0,defaultValue:["default","focusTime","outOfOffice"],options:{options:[{label:"Default",value:"default"},{label:"Out Of Office",value:"outOfOffice"},{label:"Focus Time",value:"focusTime"},{label:"Working Location",value:"workingLocation"}]}}),search:F.ShortText({displayName:"Search Term",required:!1}),start_date:F.DateTime({displayName:"Date from",required:!1}),end_date:F.DateTime({displayName:"Date to",required:!1}),singleEvents:F.Checkbox({displayName:"Expand Recurring Event?",description:"Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves.",required:!0,defaultValue:!1})};async function Hm(t){let{calendar_id:e,start_date:r,end_date:n,search:i,event_types:s,singleEvents:c}=t.propsValue,d=await Ie(t.auth),p={showDeleted:"false"},m=`${ae.baseUrl}/calendars/${e}/events`;c!==null&&(p.singleEvents=c?"true":"false"),i&&(p.q=`"${i}"`),r&&(p.timeMin=(0,Vm.default)(r).format("YYYY-MM-DDTHH:mm:ss.sssZ")),r&&n&&(p.timeMax=(0,Vm.default)(n).format("YYYY-MM-DDTHH:mm:ss.sssZ")),s.length>0&&(m+=`?${s.map(h=>`eventTypes=${h}`).join("&")}`);let y={method:"GET",url:m,queryParams:p,authentication:{type:"BEARER_TOKEN",token:d}};return await Ue.sendRequest(y)}o(Hm,"runGetEvents");var Px=ve({auth:ne,name:"google_calendar_get_events",description:"Get Events",audience:"human",aiMetadata:{description:"Lists events from a Google Calendar, optionally filtered by a date range, search term, and event types, and can expand recurring events into individual instances. Use to look up or browse multiple events when you do not already have a specific event ID; use Get Event by ID for a single known event. Read-only and idempotent.",idempotent:!0},displayName:"Get all Events",props:Gm,outputSchema:Hc,run:Hm});var xx=qe(xn());var Wm=qe(Sn());var Kc={calendar_id:ae.calendarDropdown("writer"),eventId:F.ShortText({displayName:"Event ID",required:!0}),title:F.ShortText({displayName:"Title of the event",required:!1}),start_date_time:F.DateTime({displayName:"Start date time of the event",required:!1}),end_date_time:F.DateTime({displayName:"End date time of the event",required:!1}),location:F.ShortText({displayName:"Location",required:!1}),description:F.LongText({displayName:"Description",description:"Description of the event. You can use HTML tags here.",required:!1}),colorId:ae.colorId,attendees:F.Array({displayName:"Attendees",description:"Emails of the attendees (guests)",required:!1}),guests_can_modify:F.Checkbox({displayName:"Guests can modify",defaultValue:!1,required:!1}),guests_can_invite_others:F.Checkbox({displayName:"Guests can invite others",defaultValue:!1,required:!1}),guests_can_see_other_guests:F.Checkbox({displayName:"Guests can see other guests",defaultValue:!1,required:!1})};async function Zm(t){let{calendar_id:e,eventId:r,title:n,start_date_time:i,end_date_time:s,location:c,description:d,colorId:p,guests_can_invite_others:m,guests_can_modify:y,guests_can_see_other_guests:h}=t.propsValue,f=t.propsValue.attendees,l=await _t(t.auth),g=(0,xx.calendar)({version:"v3",auth:l}),v=await g.events.get({calendarId:e,eventId:r}),E=[];return Array.isArray(f)&&f.length>0?E=f.map(C=>({email:C})):v.data.attendees&&Array.isArray(v.data.attendees)&&(E=v.data.attendees),(await g.events.update({calendarId:e,eventId:r,requestBody:{summary:n??v.data.summary,attendees:E,description:d??v.data.description,colorId:p,location:c??v.data.location,start:i?{dateTime:(0,Wm.default)(i).format("YYYY-MM-DDTHH:mm:ss.sssZ")}:v.data.start,end:s?{dateTime:(0,Wm.default)(s).format("YYYY-MM-DDTHH:mm:ss.sssZ")}:v.data.end,guestsCanInviteOthers:m??v.data.guestsCanInviteOthers,guestsCanModify:y??v.data.guestsCanModify,guestsCanSeeOtherGuests:h??v.data.guestsCanSeeOtherGuests}})).data}o(Zm,"runUpdateEvent");var Ax=ve({displayName:"Update Event",auth:ne,name:"update_event",description:"Updates an event in Google Calendar.",audience:"human",aiMetadata:{description:"Updates the fields of an existing Google Calendar event identified by calendar and event ID (title, times, location, description, color, attendees, guest permissions); unset fields retain their current values. Use to modify or reschedule an event that already exists rather than creating a new one. Requires the event ID. Idempotent: applying the same field values repeatedly leaves the event in the same state.",idempotent:!0},props:Kc,outputSchema:Ze,run:Zm});var Jc={strategy:0,items:o(async({auth:t,propsValue:{calendarId:e,expandRecurringEvent:r},lastFetchEpochMS:n})=>{let i=new Date(n);if(n===0){let d=new Date,p=new Date;p.setDate(d.getDate()-7),i=p}return(await da(e,r,t,i)??[]).map(d=>({epochMilliSeconds:new Date(d.updated).getTime(),data:d}))},"items")},Ix=jt({auth:ne,name:"new_or_updated_event",displayName:"New or Updated Event",description:"Triggers when an event is added or updated",aiMetadata:{description:"Fires when any event in the selected calendar is created or modified, polling by last-updated time. Each fired item is the affected event; can optionally expand recurring events so every occurrence fires separately."},props:{calendar_id:ae.calendarDropdown(),expandRecurringEvent:F.Checkbox({displayName:"Expand Recurring Event?",description:"If true, the trigger will activate for every occurrence of a recurring event.",required:!0,defaultValue:!1})},sampleData:{kind:"calendar#event",etag:"3350849506974000",id:"0nsfi5ttd2b17ac76ma2f37oi9",htmlLink:"https://www.google.com/calendar/event?eid=kgjb90uioj4klrgfmdsnjsjvlgkm",summary:"ap-event-test",created:"2023-02-03T11:36:36.000Z",updated:"2023-02-03T11:45:53.487Z",description:"Sample description",status:"canceled",creator:{email:"test@test.com",self:!0},organizer:{email:"test@test.com",self:!0},start:{dateTime:"2023-02-02T22:30:00+03:00",timeZone:"Asia/Amman"},end:{dateTime:"2023-02-02T23:30:00+03:00",timeZone:"Asia/Amman"},transparency:"transparent",iCalUID:"0nsfi5ttd2b17ac76ma2f37oi9@google.com",sequence:1,attendees:[{email:"attende@test.com",responseStatus:"needsAction"},{email:"test@test.com",organizer:!0,self:!0,responseStatus:"accepted"}],reminders:{useDefault:!0},eventType:"default"},outputSchema:Ze,type:"POLLING",async test({store:t,auth:e,propsValue:r,files:n}){return await Je.test(Jc,{store:t,auth:e,propsValue:{calendarId:r.calendar_id,expandRecurringEvent:r.expandRecurringEvent},files:n})},async onEnable({store:t,auth:e,propsValue:r}){await Je.onEnable(Jc,{store:t,auth:e,propsValue:{calendarId:r.calendar_id,expandRecurringEvent:r.expandRecurringEvent}})},async onDisable({store:t,auth:e,propsValue:r}){await Je.onDisable(Jc,{store:t,auth:e,propsValue:{calendarId:r.calendar_id,expandRecurringEvent:r.expandRecurringEvent}})},async run({store:t,auth:e,propsValue:r,files:n}){return await Je.poll(Jc,{store:t,auth:e,propsValue:{calendarId:r.calendar_id,expandRecurringEvent:r.expandRecurringEvent},files:n})}});var Rx=qe(xn());var Cx=ve({auth:ne,name:"google-calendar-add-attendees",displayName:"Add Attendees to Event",description:"Add one or more person to existing event.",audience:"both",aiMetadata:{description:"Adds one or more guests (by email) to an existing Google Calendar event, identified by calendar and event ID, preserving the current attendee list. Use to invite people to an event that already exists rather than recreating it. Not idempotent: re-running appends the same emails again, producing duplicate attendee entries.",idempotent:!1},props:{calendar_id:ae.calendarDropdown("writer"),eventId:F.ShortText({displayName:"Event ID",required:!0}),attendees:F.Array({displayName:"Attendees",description:"Emails of the attendees (guests)",required:!0})},outputSchema:Ze,async run(t){let{calendar_id:e,eventId:r}=t.propsValue,n=t.propsValue.attendees,i=await _t(t.auth),s=(0,Rx.calendar)({version:"v3",auth:i}),c=await s.events.get({calendarId:e,eventId:r}),d=c.data.attendees??[],p=[];return p.push(...d),p.push(...n.map(y=>({email:y}))),(await s.events.update({calendarId:e,eventId:r,requestBody:{...c.data,attendees:p}})).data}});var Km=qe(Sn());var Jm={calendar_ids:F.MultiSelectDropdown({auth:ne,displayName:"Calendars",description:"Select the calendars to check for busy periods.",required:!0,refreshers:[],options:o(async({auth:t})=>t?{disabled:!1,options:(await kt(t)).map(n=>({label:n.summary,value:n.id}))}:{disabled:!0,placeholder:"Connect your account first",options:[]},"options")}),start_date:F.DateTime({displayName:"Start Time",description:"The start of the time range to check.",required:!0}),end_date:F.DateTime({displayName:"End Time",description:"The end of the time range to check.",required:!0})};async function Ym(t){let{calendar_ids:e,start_date:r,end_date:n}=t.propsValue,i=await Ie(t.auth),s={timeMin:(0,Km.default)(r).toISOString(),timeMax:(0,Km.default)(n).toISOString(),items:e.map(p=>({id:p}))},c={method:"POST",url:`${ae.baseUrl}/freeBusy`,body:s,authentication:{type:"BEARER_TOKEN",token:i}};return(await Ue.sendRequest(c)).body}o(Ym,"runFindFreeBusy");var Ox=ve({auth:ne,name:"google_calendar_find_busy_free_periods",displayName:"Find Busy/Free Periods in Calendar",description:"Finds free/busy calendar details from Google Calendar.",audience:"human",aiMetadata:{description:"Queries one or more calendars for their busy time blocks within a given start/end window, without exposing event details. Use to check availability or find open slots before scheduling a meeting. Requires the calendars to check and a time range. Read-only and idempotent.",idempotent:!0},props:Jm,outputSchema:Wc,run:Ym});var Xm={calendar_id:ae.calendarDropdown(),event_id:F.ShortText({displayName:"Event ID",description:'The unique ID of the event (e.g., "abc123def456"). You can find this in the event URL or from other calendar actions.',required:!0}),max_attendees:F.Number({displayName:"Max Attendees",description:"Maximum number of attendees to include in the response. If there are more attendees, only the participant is returned.",required:!1}),time_zone:F.ShortText({displayName:"Time Zone",description:`Time zone for the response (e.g., "America/New_York", "Europe/London"). Defaults to the calendar's time zone if not specified.`,required:!1})};async function Qm(t){let{calendar_id:e,event_id:r,max_attendees:n,time_zone:i}=t.propsValue,s=await Ie(t.auth);if(!e||typeof e!="string"||e.trim().length===0)throw new Error("Calendar ID is required");if(!r||typeof r!="string"||r.trim().length===0)throw new Error("Event ID cannot be empty");if(r.length<5||r.length>1024)throw new Error("Event ID must be between 5 and 1024 characters");let c={};n!==void 0&&n>0&&(c.maxAttendees=n.toString()),i&&typeof i=="string"&&i.trim().length>0&&(c.timeZone=i.trim());let d=`${ae.baseUrl}/calendars/${encodeURIComponent(e.trim())}/events/${encodeURIComponent(r.trim())}`,p={method:"GET",url:d,queryParams:c,authentication:{type:"BEARER_TOKEN",token:s}};try{return(await Ue.sendRequest(p)).body}catch(m){throw m.response?.status===404?new Error(`Event with ID "${r}" not found in calendar "${e}". Please verify the event ID and calendar selection.`):m.response?.status===403?new Error(`Access denied to event "${r}" in calendar "${e}". Please check your permissions.`):m.response?.status===400?new Error("Invalid request parameters. Please check the event ID format and other parameters."):m.response?.status===401?new Error("Authentication failed. Please reconnect your Google Calendar account."):new Error(`Failed to fetch event: ${m.message||"Unknown error occurred"}`)}}o(Qm,"runGetEventById");var kx=ve({auth:ne,name:"google_calendar_get_event_by_id",displayName:"Get Event by ID",description:"Fetch event details by its unique ID from Google Calendar.",audience:"human",aiMetadata:{description:"Fetches the full details of a single Google Calendar event by its unique event ID within a given calendar. Use when you already have an event ID (e.g. from a trigger or a list action) and need its details; use Get all Events to search when you do not. Requires a valid event ID. Read-only and idempotent.",idempotent:!0},props:Xm,outputSchema:Ze,run:Qm});var eh=qe(Sn()),$x=ve({auth:ne,name:"google_calendar_search_events_all_calendars",displayName:"Search Events Across Calendars",description:"Searches every calendar the account can access for events matching a keyword within a required time window.",audience:"ai",aiMetadata:{description:"Search all of the user's calendars at once for events matching a text query within a required time window, returning each match tagged with its owning calendarId so you can then get/update/delete it. Use this instead of Get all Events when you know a keyword and time range but do NOT know which calendar the event lives in (Get all Events searches a single calendar). A start and end time are mandatory to bound the cross-calendar scan; matching uses Google's native q= filter, not semantic search. Read-only and idempotent.",idempotent:!0},props:{query:F.ShortText({displayName:"Search Term",description:`Free-text query matched against event fields (summary, description, location, attendee names/emails) using Google's native search. Example: "budget review".`,required:!0}),start_date:F.DateTime({displayName:"Start Time",description:`Lower bound (inclusive) for an event's end time, as an ISO 8601 timestamp (e.g. "2026-06-01T00:00:00Z"). Required to bound the cross-calendar scan.`,required:!0}),end_date:F.DateTime({displayName:"End Time",description:`Upper bound (exclusive) for an event's start time, as an ISO 8601 timestamp (e.g. "2026-06-30T23:59:59Z"). Required to bound the cross-calendar scan.`,required:!0}),single_events:F.Checkbox({displayName:"Expand Recurring Events?",description:"When enabled, recurring events are expanded into their individual instances instead of returning the underlying recurring event.",required:!1,defaultValue:!0})},outputSchema:vx,async run(t){let{query:e,start_date:r,end_date:n,single_events:i}=t.propsValue,s=await Ie(t.auth),c=(0,eh.default)(r).toISOString(),d=(0,eh.default)(n).toISOString(),p=await kt(t.auth),m=[],y=[];for(let h of p){let f="";do{let l={q:e,timeMin:c,timeMax:d,singleEvents:i?"true":"false",showDeleted:"false",maxResults:"250"};f&&(l.pageToken=f);let g={method:"GET",url:`${ae.baseUrl}/calendars/${encodeURIComponent(h.id)}/events`,queryParams:l,authentication:{type:"BEARER_TOKEN",token:s}};try{let v=await Ue.sendRequest(g),E=v.body.items??[];for(let b of E)m.push({...b,calendarId:h.id});f=v.body.nextPageToken}catch(v){let E=v.response?.status;if(E===403||E===404){y.push({calendarId:h.id,status:E}),f="";continue}throw E===429?new Error("Google Calendar rate limit reached while searching calendars. Please retry shortly."):v}}while(f)}return{events:m,count:m.length,calendars_searched:p.length-y.length,...y.length>0?{skipped_calendars:y,warning:"Some calendars could not be searched (access denied or not found); a missing match may live in a skipped calendar. See skipped_calendars."}:{}}}});var Sr=qe(Sn()),Nx=qe(Dx());Sr.default.extend(Nx.default);function gL(t){if(t.length===0)return[];let e=[...t].sort((n,i)=>n.start-i.start),r=[{...e[0]}];for(let n=1;n<e.length;n++){let i=r[r.length-1],s=e[n];s.start<=i.end?i.end=Math.max(i.end,s.end):r.push({...s})}return r}o(gL,"mergeIntervals");function yL(t,e,r){let n=[],i=e;for(let s of t)if(s.start>i&&n.push({start:i,end:Math.min(s.start,r)}),i=Math.max(i,s.end),i>=r)break;return i<r&&n.push({start:i,end:r}),n.filter(s=>s.end>s.start)}o(yL,"complement");function vL(t,e,r){let n=[];for(let i of t){let s=Sr.default.utc(i.start).startOf("day"),c=Sr.default.utc(i.end);for(;s.valueOf()<i.end;){let d=s.add(e,"hour"),p=s.add(r,"hour"),m=Math.max(i.start,d.valueOf()),y=Math.min(i.end,p.valueOf());if(y>m&&n.push({start:m,end:y}),s=s.add(1,"day"),s.valueOf()>c.valueOf())break}}return n}o(vL,"clipToWorkingHours");var zx=ve({auth:ne,name:"google_calendar_find_free_slots",displayName:"Find Free Time Slots",description:"Computes open time slots shared across one or more calendars within a window, by inverting their busy blocks.",audience:"ai",aiMetadata:{description:'Return the OPEN time slots common to the selected calendars within a window \u2014 the inverse of their combined busy blocks, optionally filtered to a minimum duration and to working hours. Use this instead of Find Busy/Free Periods (which returns only busy blocks and forces you to invert and reconcile them yourself) when you need the actual free intervals to answer "when can everyone meet". Idempotent because it performs no writes, but the result depends entirely on the window: pass absolute start/end times, since a window relative to "now" yields a shifting set of slots.',idempotent:!0},props:{calendar_ids:F.MultiSelectDropdown({auth:ne,displayName:"Calendars",description:"The calendars whose schedules must all be free. A slot is returned only when it is open on every selected calendar.",required:!0,refreshers:[],options:o(async({auth:t})=>t?{disabled:!1,options:(await kt(t)).map(n=>({label:n.summary,value:n.id}))}:{disabled:!0,placeholder:"Connect your account first",options:[]},"options")}),start_date:F.DateTime({displayName:"Window Start",description:'Start of the search window, as an absolute ISO 8601 timestamp (e.g. "2026-06-01T09:00:00Z"). Prefer absolute times over relative ones.',required:!0}),end_date:F.DateTime({displayName:"Window End",description:'End of the search window, as an absolute ISO 8601 timestamp (e.g. "2026-06-05T18:00:00Z").',required:!0}),min_duration_minutes:F.Number({displayName:"Minimum Slot Duration (minutes)",description:"Discard any open slot shorter than this many minutes. Leave empty to return every open slot regardless of length.",required:!1}),working_hours_start:F.Number({displayName:"Working Hours Start (hour 0-23)",description:"If set together with Working Hours End, each day's open slots are clipped to this hour range, interpreted in UTC (not the calendar's local time zone). Example: 9 for 09:00 UTC. Leave both unset to return slots across the full window.",required:!1}),working_hours_end:F.Number({displayName:"Working Hours End (hour 0-23)",description:"Upper bound of the daily working-hours window. Example: 17 for 5 PM. Ignored unless Working Hours Start is also set.",required:!1})},outputSchema:hx,async run(t){let{calendar_ids:e,start_date:r,end_date:n,min_duration_minutes:i,working_hours_start:s,working_hours_end:c}=t.propsValue,d=await Ie(t.auth),p=(0,Sr.default)(r).valueOf(),m=(0,Sr.default)(n).valueOf();if(m<=p)throw new Error("Window End must be after Window Start.");let y={method:"POST",url:`${ae.baseUrl}/freeBusy`,body:{timeMin:(0,Sr.default)(r).toISOString(),timeMax:(0,Sr.default)(n).toISOString(),items:e.map(b=>({id:b}))},authentication:{type:"BEARER_TOKEN",token:d}},h=await Ue.sendRequest(y),f=[],l=[];for(let b of Object.keys(h.body.calendars)){let C=h.body.calendars[b];if(C.errors?.length){l.push({calendarId:b,errors:C.errors});continue}let U=C.busy??[];for(let J of U)f.push({start:(0,Sr.default)(J.start).valueOf(),end:(0,Sr.default)(J.end).valueOf()})}if(l.length>0)throw new Error(`Could not read availability for calendar(s): ${l.map(b=>`${b.calendarId} (${b.errors.map(C=>C.reason).join(", ")})`).join("; ")}. A slot can only be marked free if every selected calendar is free, so free slots cannot be computed while any of them are unreadable. Verify the calendar IDs with List Calendars.`);let g=gL(f),v=yL(g,p,m);if(s!==void 0&&c!==void 0&&c>s&&(v=vL(v,s,c)),i!==void 0&&i>0){let b=i*60*1e3;v=v.filter(C=>C.end-C.start>=b)}let E=v.map(b=>({start:(0,Sr.default)(b.start).toISOString(),end:(0,Sr.default)(b.end).toISOString(),duration_minutes:Math.round((b.end-b.start)/6e4)}));return{free_slots:E,count:E.length}}});var Ux=qe(xn());var nh=qe(Sn()),Mx=ve({auth:ne,name:"google_calendar_list_recurring_event_instances",displayName:"List Recurring Event Instances",description:"Lists the individual occurrences of one recurring event series, each with its own instance event ID.",audience:"ai",aiMetadata:{description:"List the individual occurrences of a single recurring event series, identified by its recurring-event ID, each returned with its own distinct instance event ID. Use this when you need to inspect, reschedule, or cancel ONE occurrence of a series rather than the whole series; Get all Events expands recurring events only across a whole-calendar window and cannot target one series by ID. Requires the recurring series' event ID; optionally bound by a time range. Read-only and idempotent.",idempotent:!0},props:{calendar_id:ae.calendarDropdown(),event_id:F.ShortText({displayName:"Recurring Event ID",description:'The event ID of the recurring SERIES (the parent), e.g. "abc123def456". Obtain it from Search Events Across Calendars or Get all Events. Individual instance IDs will not work here.',required:!0}),time_min:F.DateTime({displayName:"Start Time",description:`Optional lower bound (inclusive) for an instance's end time, as an ISO 8601 timestamp with offset (e.g. "2026-06-01T00:00:00Z").`,required:!1}),time_max:F.DateTime({displayName:"End Time",description:`Optional upper bound (exclusive) for an instance's start time, as an ISO 8601 timestamp with offset (e.g. "2026-06-30T23:59:59Z").`,required:!1}),show_deleted:F.Checkbox({displayName:"Include Cancelled Instances",description:"Whether to include cancelled (deleted) instances of the series in the result. Defaults to false.",required:!1,defaultValue:!1}),max_results:F.Number({displayName:"Max Results",description:"Maximum number of instances to return per page (1-2500). Defaults to the API default of 250.",required:!1})},outputSchema:gx,async run(t){let{calendar_id:e,event_id:r,time_min:n,time_max:i,show_deleted:s,max_results:c}=t.propsValue,d=await _t(t.auth),p=(0,Ux.calendar)({version:"v3",auth:d});try{let m=await p.events.instances({calendarId:e,eventId:r,timeMin:n?(0,nh.default)(n).toISOString():void 0,timeMax:i?(0,nh.default)(i).toISOString():void 0,showDeleted:s??!1,maxResults:c}),y=m.data.items??[];return{instances:y,count:y.length,nextPageToken:m.data.nextPageToken??null}}catch(m){let y=m.response?.status??m.code;throw y===404?new Error(`Recurring event "${r}" not found in calendar "${e}". Verify the ID belongs to a recurring series.`):y===400?new Error(`Invalid request: "${r}" may not be a recurring event. The instances endpoint only works on recurring series.`):y===403?new Error(`Access denied to event "${r}" in calendar "${e}". Check your permissions.`):m}}});var Lx=qe(xn());var jx=ve({auth:ne,name:"google_calendar_move_event",displayName:"Move Event to Another Calendar",description:"Moves an existing event from one calendar to another, preserving its event ID and metadata.",audience:"ai",aiMetadata:{description:"Move an existing event from a source calendar to a destination calendar in place, preserving the event ID, conferencing, and attendee state. Use this instead of deleting and recreating the event (which loses the ID and metadata) when you need to transfer an event between calendars. Idempotent: moving an event to the calendar it already lives on is treated as a no-op. The source and destination must be writable calendars.",idempotent:!0},props:{calendar_id:ae.calendarDropdown("writer"),event_id:F.ShortText({displayName:"Event ID",description:'The ID of the event to move, e.g. "abc123def456". Obtain it from Search Events Across Calendars or Get all Events.',required:!0}),destination_calendar_id:F.Dropdown({auth:ne,displayName:"Destination Calendar",description:"The calendar to move the event to.",refreshers:[],required:!0,options:o(async({auth:t})=>t?{disabled:!1,options:(await kt(t,"writer")).map(r=>({label:r.summary,value:r.id}))}:{disabled:!0,placeholder:"Please connect your account first",options:[]},"options")}),send_updates:F.StaticDropdown({displayName:"Send Notifications",description:"Who should receive notifications about the change of the event's organizer.",required:!1,defaultValue:"none",options:{options:[{label:"To everyone",value:"all"},{label:"To external guests only",value:"externalOnly"},{label:"To no one",value:"none"}]}})},outputSchema:yx,async run(t){let{calendar_id:e,event_id:r,destination_calendar_id:n,send_updates:i}=t.propsValue,s=await _t(t.auth),c=(0,Lx.calendar)({version:"v3",auth:s});if(e===n)return{moved:!1,already_in_destination:!0,event:(await c.events.get({calendarId:n,eventId:r})).data};try{return await c.events.move({calendarId:e,eventId:r,destination:n,sendUpdates:i??"none"}),{moved:!0,already_in_destination:!1,event:(await c.events.get({calendarId:n,eventId:r})).data}}catch(d){let p=d.response?.status??d.code;throw p===404?new Error(`Event "${r}" not found in source calendar "${e}". Verify the event ID and source calendar.`):p===403?new Error(`Access denied while moving event "${r}". Both the source and destination calendars must be writable.`):p===400?new Error(`Invalid move request for event "${r}". The destination must differ from the source and both must be valid calendars.`):d}}});var Fx=ve({auth:ne,name:"google_calendar_create_event",displayName:"Create Event",description:"Create a new event on a Google Calendar with structured fields (title, start/end, location, description, attendees, color) and an optional Google Meet link.",audience:"ai",aiMetadata:{description:'Create a new event on a calendar from explicit structured fields (title, start/end times, location, description, attendees, color, guest permissions) with an optional Google Meet link. Use this when you already have the event details; for a single natural-language phrase use the quick-add path instead. Resolve calendarId via google_calendar_list_calendars (default "primary"). Requires a title and start time; end defaults to 30 minutes after start. Not idempotent: each call creates a new event.',idempotent:!1},props:Fm,outputSchema:Ze,run:qm});var{eventId:yre,calendar_id:vre,guests_can_modify:_re,guests_can_invite_others:bre,guests_can_see_other_guests:Ere,..._L}=Kc;function oh(t){return F.StaticDropdown({displayName:t,description:"Leave unset to keep the event's current value.",required:!1,options:{options:[{label:"True",value:"true"},{label:"False",value:"false"}]}})}o(oh,"guestPermissionProp");function ih(t){return t===void 0?void 0:t==="true"}o(ih,"toOptionalBoolean");var bL={calendar_id:Kc.calendar_id,event_id:F.ShortText({displayName:"Event ID",description:"The ID of the event to update. Resolve it via List Events or Search Events Across Calendars.",required:!0}),..._L,guests_can_modify:oh("Guests can modify"),guests_can_invite_others:oh("Guests can invite others"),guests_can_see_other_guests:oh("Guests can see other guests")},qx=ve({auth:ne,name:"google_calendar_update_event",displayName:"Update Event",description:"Update fields of an existing Google Calendar event by ID using a safe get-then-merge; fields you leave unset keep their current values.",audience:"ai",aiMetadata:{description:"Update fields of an existing event (title, times, location, description, color, attendees, guest permissions) identified by calendar and event ID. It fetches the event first and merges, so unset fields keep their current values (it never blanks out attendees/recurrence/conferencing). Use this to edit or reschedule an existing event rather than recreating it. Resolve calendarId via google_calendar_list_calendars and eventId via google_calendar_list_events / google_calendar_search_events_all_calendars. Idempotent: applying the same field values repeatedly leaves the event in the same state.",idempotent:!0},props:bL,outputSchema:Ze,run:o(t=>Zm({...t,propsValue:{...t.propsValue,eventId:t.propsValue.event_id,guests_can_modify:ih(t.propsValue.guests_can_modify),guests_can_invite_others:ih(t.propsValue.guests_can_invite_others),guests_can_see_other_guests:ih(t.propsValue.guests_can_see_other_guests)}}),"run")});var EL={calendar_id:ae.calendarDropdown("writer"),event_id:F.ShortText({displayName:"Event ID",description:"The ID of the event to delete. Resolve it via List Events or Search Events Across Calendars.",required:!0})},Bx=ve({auth:ne,name:"google_calendar_delete_event",displayName:"Delete Event",description:"Permanently delete an event from a Google Calendar by its event ID.",audience:"ai",aiMetadata:{description:"Permanently delete an event from a calendar, identified by calendar and event ID. Use to cancel or remove an existing event; this cannot be undone, so confirm the event ID first. Resolve calendarId via google_calendar_list_calendars and eventId via google_calendar_list_events / google_calendar_search_events_all_calendars. Idempotent: once deleted, re-running leaves the event absent (a repeat call may report it as already gone).",idempotent:!0},props:EL,run:o(t=>Bm({...t,propsValue:{calendar_id:t.propsValue.calendar_id,eventId:t.propsValue.event_id}}),"run")});var Vx=ve({auth:ne,name:"google_calendar_get_event",displayName:"Get Event",description:"Fetch the full details of a single Google Calendar event by its event ID.",audience:"ai",aiMetadata:{description:"Fetch the full details of one event by its unique event ID within a calendar. Use this when you already have an event ID (from a trigger or a list action) and need its current details; to find an event when you do not have its ID, use google_calendar_list_events or google_calendar_search_events_all_calendars instead. Resolve calendarId via google_calendar_list_calendars and eventId via google_calendar_list_events / google_calendar_search_events_all_calendars. Read-only and idempotent.",idempotent:!0},props:Xm,outputSchema:Ze,run:Qm});var Gx=ve({auth:ne,name:"google_calendar_list_events",displayName:"List Events",description:"List events from one Google Calendar, optionally filtered by date range, free-text search, and event types.",audience:"ai",aiMetadata:{description:`List events from one calendar, optionally narrowed by a date range, a free-text search term (matched with Google's native q= filter), and event types, optionally expanding recurring events into individual instances. Use this to browse or find events in a known calendar, including text search within that calendar; to search across every calendar when you do not know which one holds the event, use google_calendar_search_events_all_calendars instead. Resolve calendarId via google_calendar_list_calendars (default "primary"). Read-only and idempotent.`,idempotent:!0},props:Gm,outputSchema:Hc,run:Hm});var Hx=ve({auth:ne,name:"google_calendar_find_busy_periods",displayName:"Find Busy Periods",description:"Return the raw busy time blocks of one or more calendars within a window, via the freebusy query.",audience:"ai",aiMetadata:{description:"Query one or more calendars for their raw busy time blocks within a start/end window, without exposing event details (the low-level freebusy primitive). Use this when you need the busy intervals themselves (e.g. across several shared calendars); to get the inverse open slots directly, use google_calendar_find_free_slots instead. Resolve calendarId values via google_calendar_list_calendars. Requires the calendars to check and a time range. Read-only and idempotent.",idempotent:!0},props:Jm,outputSchema:Wc,run:Ym});var Wx=qe(xn());var Zx=ve({auth:ne,name:"google_calendar_remove_attendee",displayName:"Remove Attendee",description:"Remove one attendee (by email) from an existing Google Calendar event, preserving the rest of the guest list.",audience:"ai",aiMetadata:{description:"Remove a single attendee, matched by email, from an existing event by fetching the current attendee list, dropping that one guest, and patching the event. Use this to uninvite one person without disturbing the other guests; to add guests use the add-attendees action instead. Resolve calendarId via google_calendar_list_calendars and eventId via google_calendar_list_events / google_calendar_search_events_all_calendars. Not idempotent (notifications may fire), though re-removing an already-absent attendee is a no-op on state. It uses optimistic concurrency (If-Match on the event revision), so a simultaneous edit by someone else fails with a retry-able conflict instead of silently clobbering their change.",idempotent:!1},props:{calendar_id:ae.calendarDropdown("writer"),event_id:F.ShortText({displayName:"Event ID",description:"The ID of the event to remove the attendee from. Resolve it via List Events or Search Events Across Calendars.",required:!0}),attendee_email:F.ShortText({displayName:"Attendee Email",description:"Email address of the attendee to remove from the event.",required:!0}),send_updates:F.StaticDropdown({displayName:"Send Notifications",description:"Who should be notified about the attendee change.",required:!1,defaultValue:"none",options:{options:[{label:"To everyone",value:"all"},{label:"To external guests only",value:"externalOnly"},{label:"To no one",value:"none"}]}})},outputSchema:mx,async run(t){let{calendar_id:e,event_id:r,attendee_email:n,send_updates:i}=t.propsValue,s=await _t(t.auth),c=(0,Wx.calendar)({version:"v3",auth:s}),d=n.trim().toLowerCase();try{let p=await c.events.get({calendarId:e,eventId:r}),m=p.data.attendees??[],y=m.filter(l=>(l.email??"").trim().toLowerCase()!==d);if(y.length===m.length)return{removed:!1,attendee_email:n,message:`Attendee "${n}" was not on event "${r}"; nothing to remove.`,event:p.data};let h=p.data.etag??void 0,f=await c.events.patch({calendarId:e,eventId:r,sendUpdates:i??"none",requestBody:{attendees:y}},h?{headers:{"If-Match":h}}:{});return{removed:!0,attendee_email:n,event:f.data}}catch(p){let m=p.response?.status??p.code;throw m===412?new Error(`Event "${r}" changed since it was read (a concurrent edit). Re-run Remove Attendee to retry against the latest version.`):m===404?new Error(`Event "${r}" not found in calendar "${e}". Verify the event ID and calendar.`):m===403?new Error(`Access denied while editing event "${r}". The calendar must be writable.`):p}}});var Kx=qe(xn());var ah=qe(Sn()),Jx=ve({auth:ne,name:"google_calendar_import_event",displayName:"Import Event",description:"Import an existing event (by iCalUID) into a Google Calendar as a private copy, using events.import.",audience:"ai",aiMetadata:{description:'Import an existing event into a calendar as a private copy, keyed by its iCalUID with a start and end time (the events.import primitive, distinct from creating a brand-new event or moving one). Use this to copy or de-duplicate an event across calendars; re-importing the same iCalUID updates the existing copy rather than duplicating it. Resolve calendarId via google_calendar_list_calendars (default "primary"). Only default (non-special) events can be imported. Not idempotent: each import can create or mutate the destination copy.',idempotent:!1},props:{calendar_id:ae.calendarDropdown("writer"),ical_uid:F.ShortText({displayName:"iCal UID",description:`The event's iCalUID (its globally unique identifier, e.g. "abc123@google.com"). This is the dedup key: re-importing the same UID updates the existing copy.`,required:!0}),summary:F.ShortText({displayName:"Title",description:"Title (summary) of the imported event.",required:!0}),start_date_time:F.DateTime({displayName:"Start Time",description:'Event start as an ISO 8601 timestamp (e.g. "2026-06-01T09:00:00Z").',required:!0}),end_date_time:F.DateTime({displayName:"End Time",description:'Event end as an ISO 8601 timestamp (e.g. "2026-06-01T10:00:00Z").',required:!0}),location:F.ShortText({displayName:"Location",required:!1}),description:F.LongText({displayName:"Description",description:"Description of the event. You can use HTML tags here.",required:!1})},outputSchema:Ze,async run(t){let{calendar_id:e,ical_uid:r,summary:n,start_date_time:i,end_date_time:s,location:c,description:d}=t.propsValue,p=await _t(t.auth),m=(0,Kx.calendar)({version:"v3",auth:p});try{return(await m.events.import({calendarId:e,requestBody:{iCalUID:r,summary:n,location:c??void 0,description:d??void 0,start:{dateTime:(0,ah.default)(i).toISOString()},end:{dateTime:(0,ah.default)(s).toISOString()}}})).data}catch(y){let h=y.response?.status??y.code;throw h===403?new Error(`Access denied while importing into calendar "${e}". The calendar must be writable.`):h===400?new Error(`Invalid import request. Ensure iCalUID, start, and end are provided and that the event is a default (non-special) event. (${y.message})`):y}}});var Yx=ve({auth:ne,name:"google_calendar_list_calendars",displayName:"List Calendars",description:"List every calendar in the user's calendar list, returning each calendar's id, summary, access role, time zone, and whether it is primary.",audience:"ai",aiMetadata:{description:`List all calendars on the user's calendar list, returning each one's calendarId, summary, accessRole, timeZone, and whether it is the primary calendar. This is the calendarId resolver: call it first to discover which calendars exist and obtain the calendarId that every event/freebusy atomic needs (default "primary"). Read-only and idempotent.`,idempotent:!0},props:{},outputSchema:px,async run(t){await Ie(t.auth);let e=await kt(t.auth);return{calendars:e.map(r=>({id:r.id,summary:r.summary,description:r.description,location:r.location,timeZone:r.timeZone,accessRole:r.accessRole,primary:r.primary??!1,selected:r.selected??!1,backgroundColor:r.backgroundColor,foregroundColor:r.foregroundColor})),count:e.length}}});var Xx=ve({auth:ne,name:"google_calendar_get_calendar",displayName:"Get Calendar",description:"Fetch one calendar's metadata (summary, time zone, description, location) by its calendar ID.",audience:"ai",aiMetadata:{description:`Fetch one calendar's metadata \u2014 summary, timeZone, description, and location \u2014 by its calendar ID. Use this to read a calendar's time zone, which is load-bearing when constructing correct event start/end windows. Resolve calendarId via google_calendar_list_calendars (default "primary"). Read-only and idempotent.`,idempotent:!0},props:{calendar_id:ae.calendarDropdown()},outputSchema:lx,async run(t){let{calendar_id:e}=t.propsValue,r=await Ie(t.auth),n={method:"GET",url:`${ae.baseUrl}/calendars/${encodeURIComponent(e)}`,authentication:{type:"BEARER_TOKEN",token:r}};try{return(await Ue.sendRequest(n)).body}catch(i){let s=i.response?.status;throw s===404?new Error(`Calendar "${e}" not found. Verify the calendar ID via List Calendars.`):s===403?new Error(`Access denied to calendar "${e}". Check your permissions.`):i}}});var Qx=ve({auth:ne,name:"google_calendar_get_colors",displayName:"Get Colors",description:"Fetch the Google Calendar color palette mapping colorId values to their hex background/foreground colors.",audience:"ai",aiMetadata:{description:"Fetch the global color palette: the mapping from each colorId to its background/foreground hex color, for both events and calendars. Use this to resolve a colorId before setting the color on google_calendar_create_event or google_calendar_update_event. Read-only and idempotent.",idempotent:!0},props:{},outputSchema:dx,async run(t){return await lu(t.auth)}});var eA=ve({auth:ne,name:"google_calendar_list_settings",displayName:"List Settings",description:"List the user's Google Calendar account settings (time zone, week start, date/time format, and more).",audience:"ai",aiMetadata:{description:`List all of the user's Google Calendar account settings as id/value pairs \u2014 including the account "timezone", "weekStart", and "format24HourTime". Use this to read the account time zone to anchor relative-date reasoning before building event windows, or to read a single setting (just pick its id from the returned list). Read-only and idempotent.`,idempotent:!0},props:{},outputSchema:fx,async run(t){let e=await Ie(t.auth),r={method:"GET",url:`${ae.baseUrl}/users/me/settings`,authentication:{type:"BEARER_TOKEN",token:e}},i=(await Ue.sendRequest(r)).body.items??[],s={};for(let c of i)s[c.id]=c.value;return{settings:s,items:i,count:i.length}}});var Yc="google_calendar_watch",Ci="google_calendar_sync_token",sh="google_calendar_seen_event_ids",SL=500;function tA(t,{event_types:e,search_filter:r,exclude_all_day:n}){if(e&&e.length>0){let i=t.eventType||"default";if(!e.includes(i))return!1}if(r&&r.trim()){let i=r.toLowerCase().trim(),s=(t.summary||"").toLowerCase(),c=(t.description||"").toLowerCase(),d=(t.location||"").toLowerCase();if(!(s.includes(i)||c.includes(i)||d.includes(i)))return!1}return!(n&&t.start?.date&&!t.start?.dateTime)}o(tA,"matchesFilters");var rA=jt({auth:ne,name:"new_event",displayName:"New Event",description:"Fires when a new event is created in a calendar.",aiMetadata:{description:"Fires when a brand-new event is created in the selected calendar (not on edits or cancellations), via Google push notifications. Each fired item is the new event; can be narrowed by event type, a text search across title/description/location, and an option to skip all-day events."},props:{calendar_id:ae.calendarDropdown("writer"),event_types:F.StaticMultiSelectDropdown({displayName:"Event Types to Monitor",description:"Filter by specific event types (leave empty to monitor all event types)",required:!1,options:{options:[{label:"Default Events",value:"default"},{label:"Birthday Events",value:"birthday"},{label:"Focus Time",value:"focusTime"},{label:"Out of Office",value:"outOfOffice"},{label:"Working Location",value:"workingLocation"},{label:"From Gmail",value:"fromGmail"}]}}),search_filter:F.ShortText({displayName:"Search Filter",description:"Only trigger for events containing this text in title, description, or location (optional)",required:!1}),exclude_all_day:F.Checkbox({displayName:"Exclude All-Day Events",description:"Skip triggering for all-day events",required:!1,defaultValue:!1})},outputSchema:Ze,type:"WEBHOOK",renewConfiguration:{strategy:"CRON",cronExpression:"0 */12 * * *"},sampleData:{kind:"calendar#event",etag:'"3419997894982000"',id:"sample_event_id_12345",status:"confirmed",htmlLink:"https://www.google.com/calendar/event?eid=c2FtcGxlX2V2ZW50X2lkXzEyMzQ1",created:"2025-08-15T11:02:27.000Z",updated:"2025-08-15T11:02:27.491Z",summary:"Team Sync",creator:{email:"creator@example.com"},organizer:{email:"creator@example.com",self:!0},start:{dateTime:"2025-08-18T10:00:00-07:00",timeZone:"America/Los_Angeles"},end:{dateTime:"2025-08-18T11:00:00-07:00",timeZone:"America/Los_Angeles"},iCalUID:"sample_event_id_12345@google.com",sequence:0,reminders:{useDefault:!0},eventType:"default"},async onEnable(t){let e=t.propsValue.calendar_id,r=t.auth,n=await zd(e,t.webhookUrl,r);await t.store.put(Yc,n);let i=await cu({calendarId:e,authProp:r});rt(i)||await t.store.put(Ci,i)},async onDisable(t){let e=t.auth,r=await t.store.get(Yc);r&&await Nd(r,e),await t.store.delete(Ci),await t.store.delete(sh)},async onRenew(t){let e=t.propsValue.calendar_id,r=t.auth,n=await t.store.get(Yc);n&&await Nd(n,r);let i=await zd(e,t.webhookUrl,r);await t.store.put(Yc,i)},async run(t){let n=t.payload.headers["x-goog-resource-state"],i={event_types:t.propsValue.event_types,search_filter:t.propsValue.search_filter,exclude_all_day:t.propsValue.exclude_all_day};if(n==="sync")return[];if(n!=="exists")return[];let s=t.propsValue.calendar_id,c=t.auth,d=await t.store.get(Ci);if(rt(d)){let g=await cu({calendarId:s,authProp:c});return rt(g)||await t.store.put(Ci,g),[]}let{items:p,nextSyncToken:m,syncTokenInvalid:y}=await Lb({calendarId:s,syncToken:d,authProp:c});if(y){let g=await cu({calendarId:s,authProp:c});return rt(g)||await t.store.put(Ci,g),[]}rt(m)||await t.store.put(Ci,m);let h=await t.store.get(sh),f=new Set(h??[]),l=[];for(let g of p)!g.id||g.status==="cancelled"||f.has(g.id)||(f.add(g.id),tA(g,i)&&l.push(g));if(f.size!==(h?.length??0)){let g=Array.from(f).slice(-SL);await t.store.put(sh,g)}return l},async test(t){let e=t.auth,r={event_types:t.propsValue.event_types,search_filter:t.propsValue.search_filter,exclude_all_day:t.propsValue.exclude_all_day},n=await jb(t.propsValue.calendar_id,e);return tA(n,r)?[n]:[]}});var Xc={strategy:0,items:o(async({auth:t,propsValue:e,lastFetchEpochMS:r})=>{if(r===0)return[];let{calendar_id:n,specific_event:i,event_id:s}=e;if(!n)return[];if(i&&!s)return[];let c=[];if(i&&s){let m={method:"GET",url:`${ae.baseUrl}/calendars/${n}/events/${s}`,authentication:{type:"BEARER_TOKEN",token:await Ie(t)}};try{let h=(await Ue.sendRequest(m)).body,f=h.end?.dateTime??h.end?.date;f&&new Date(f).getTime()>r&&(c=[h])}catch(y){return console.error("Error fetching specific event:",y),[]}}else{let m={method:"GET",url:`${ae.baseUrl}/calendars/${n}/events`,authentication:{type:"BEARER_TOKEN",token:await Ie(t)},queryParams:{singleEvents:"true",orderBy:"startTime",timeMin:new Date(r).toISOString()}};c=(await Ue.sendRequest(m)).body.items}let d=[],p=Date.now();for(let m of c){let y=m.end?.dateTime??m.end?.date;if(!y)continue;let h=new Date(y).getTime();h>r&&h<=p&&d.push({epochMilliSeconds:h,data:m})}return d},"items")},nA=jt({auth:ne,name:"event_ends",displayName:"Event Ends",description:"Fires when an event ends.",aiMetadata:{description:"Fires once an event in the selected calendar reaches its end time, detected by polling. Each fired item is the event that just ended. Can watch all events in the calendar or be scoped to a single specific event."},props:{calendar_id:ae.calendarDropdown("writer"),specific_event:F.Checkbox({displayName:"Target Specific Event",description:"Enable to monitor a specific event instead of all events in the calendar.",required:!1,defaultValue:!1}),event_id:ae.eventDropdown(!1)},outputSchema:Ze,type:"POLLING",sampleData:{kind:"calendar#event",etag:'"3419997894982000"',id:"sample_event_id_67890",status:"confirmed",htmlLink:"https://www.google.com/calendar/event?eid=c2FtcGxlX2V2ZW50X2lkXzY3ODkw",created:"2025-08-14T09:00:00.000Z",updated:"2025-08-14T09:00:00.000Z",summary:"Project Deadline",creator:{email:"manager@example.com"},organizer:{email:"manager@example.com",self:!0},start:{dateTime:"2025-08-14T14:30:00+05:30",timeZone:"Asia/Kolkata"},end:{dateTime:"2025-08-14T15:30:00+05:30",timeZone:"Asia/Kolkata"},iCalUID:"sample_event_id_67890@google.com",sequence:0,reminders:{useDefault:!0},eventType:"default"},async onEnable(t){await Je.onEnable(Xc,{auth:t.auth,store:t.store,propsValue:t.propsValue})},async onDisable(t){await Je.onDisable(Xc,{auth:t.auth,store:t.store,propsValue:t.propsValue})},async run(t){return await Je.poll(Xc,{auth:t.auth,store:t.store,propsValue:t.propsValue,files:t.files})},async test(t){return await Je.test(Xc,{auth:t.auth,store:t.store,propsValue:t.propsValue,files:t.files})}});var Qc={strategy:0,items:o(async({auth:t,propsValue:e})=>{let{calendar_id:r,specific_event:n,event_id:i,time_value:s,time_unit:c}=e;if(!r||!s||!c)return[];if(n&&!i)return[];let d=s*60*1e3;c==="hours"?d=s*60*60*1e3:c==="days"&&(d=s*24*60*60*1e3);let p=Date.now(),m=300*1e3,y=new Date(p+d).toISOString(),h=new Date(p+d+m).toISOString(),f=[];if(n&&i){let l={method:"GET",url:`${ae.baseUrl}/calendars/${r}/events/${i}`,authentication:{type:"BEARER_TOKEN",token:await Ie(t)}};try{let v=(await Ue.sendRequest(l)).body,b=new Date(v.start?.dateTime??v.start?.date??0).getTime()-d;b>=p&&b<=p+m&&(f=[v])}catch(g){return console.error("Error fetching specific event:",g),[]}}else{let l={method:"GET",url:`${ae.baseUrl}/calendars/${r}/events`,authentication:{type:"BEARER_TOKEN",token:await Ie(t)},queryParams:{singleEvents:"true",orderBy:"startTime",timeMin:y,timeMax:h}};f=(await Ue.sendRequest(l)).body.items}return f.map(l=>({epochMilliSeconds:new Date(l.start?.dateTime??l.start?.date??0).getTime()-d,data:l}))},"items")},oA=jt({auth:ne,name:"event_starts_in",displayName:"Event Start (Time Before)",description:"Fires at a specified amount of time before an event starts (e.g., a reminder).",aiMetadata:{description:"Fires a configurable lead time (in minutes, hours, or days) before an event in the selected calendar begins, acting as a pre-event reminder. Each fired item is the upcoming event. Can watch all events or a single specific event."},props:{calendar_id:ae.calendarDropdown("writer"),specific_event:F.Checkbox({displayName:"Target Specific Event",description:"Enable to monitor a specific event instead of all events in the calendar.",required:!1,defaultValue:!1}),event_id:ae.eventDropdown(!1),time_value:F.Number({displayName:"Time Before",description:"The amount of time before the event starts.",required:!0,defaultValue:15}),time_unit:F.StaticDropdown({displayName:"Time Unit",required:!0,options:{options:[{label:"Minutes",value:"minutes"},{label:"Hours",value:"hours"},{label:"Days",value:"days"}]},defaultValue:"minutes"})},outputSchema:Ze,type:"POLLING",sampleData:{},async onEnable(t){await Je.onEnable(Qc,{auth:t.auth,store:t.store,propsValue:t.propsValue})},async onDisable(t){await Je.onDisable(Qc,{auth:t.auth,store:t.store,propsValue:t.propsValue})},async run(t){return await Je.poll(Qc,{auth:t.auth,store:t.store,propsValue:t.propsValue,files:t.files})},async test(t){return await Je.test(Qc,{auth:t.auth,store:t.store,propsValue:t.propsValue,files:t.files})}});var el={strategy:0,items:o(async({auth:t,propsValue:e,lastFetchEpochMS:r})=>{let{calendar_id:n,search_term:i,event_types:s,search_fields:c}=e;if(!n||!i)return[];let d;r===0?(d=new Date,d.setDate(d.getDate()-1)):d=new Date(r);let p={singleEvents:"true",orderBy:"updated",updatedMin:d.toISOString(),q:i};s&&s.length>0&&s.forEach(l=>{p.eventTypes?p.eventTypes+="&eventTypes="+l:p.eventTypes=l});let m={method:"GET",url:`${ae.baseUrl}/calendars/${n}/events`,authentication:{type:"BEARER_TOKEN",token:await Ie(t)},queryParams:p};return(await Ue.sendRequest(m)).body.items.filter(l=>{let g=new Date(l.created??0).getTime();if(!(new Date(l.updated??0).getTime()-g<5e3))return!1;if(c&&c.length>0){let b=i.toLowerCase();return c.some(C=>{switch(C){case"summary":return l.summary?.toLowerCase().includes(b)||!1;case"description":return l.description?.toLowerCase().includes(b)||!1;case"location":return l.location?.toLowerCase().includes(b)||!1;case"attendees":return l.attendees?.some(U=>U.email?.toLowerCase().includes(b)||U.displayName?.toLowerCase().includes(b))||!1;default:return!1}})}return!0}).map(l=>({epochMilliSeconds:new Date(l.updated).getTime(),data:l}))},"items")},iA=jt({auth:ne,name:"new_event_matching_search",displayName:"New Event Matching Search",description:"Fires when a new event is created that matches a specified search term.",aiMetadata:{description:"Fires when a newly created event in the selected calendar matches a required search term (matched across title, description, location, and attendees by default, or restricted to chosen fields). Each fired item is the matching new event; can also be filtered by event type."},props:{calendar_id:ae.calendarDropdown("writer"),search_term:F.ShortText({displayName:"Search Term",description:"The keyword(s) to search for in new events (searches across title, description, location, and attendees by default).",required:!0}),event_types:F.StaticMultiSelectDropdown({displayName:"Event Types",description:"Filter by specific event types (optional)",required:!1,options:{options:[{label:"Default Events",value:"default"},{label:"Birthday Events",value:"birthday"},{label:"Focus Time",value:"focusTime"},{label:"Out of Office",value:"outOfOffice"},{label:"Working Location",value:"workingLocation"},{label:"From Gmail",value:"fromGmail"}]}}),search_fields:F.StaticMultiSelectDropdown({displayName:"Search In Fields",description:"Specify which fields to search in (leave empty to use Google's default search across all fields)",required:!1,options:{options:[{label:"Event Title/Summary",value:"summary"},{label:"Event Description",value:"description"},{label:"Event Location",value:"location"},{label:"Attendee Names/Emails",value:"attendees"}]}})},outputSchema:Ze,type:"POLLING",sampleData:{id:"abc123def456",summary:"Final Project Review",description:"Review of the Q3 final project deliverables.",status:"confirmed",created:"2025-08-14T09:05:00.000Z",updated:"2025-08-14T09:05:01.000Z",start:{dateTime:"2025-09-01T10:00:00-07:00"},end:{dateTime:"2025-09-01T11:30:00-07:00"},organizer:{email:"project.manager@example.com"}},async onEnable(t){await Je.onEnable(el,{auth:t.auth,store:t.store,propsValue:t.propsValue})},async onDisable(t){await Je.onDisable(el,{auth:t.auth,store:t.store,propsValue:t.propsValue})},async run(t){return await Je.poll(el,{auth:t.auth,store:t.store,propsValue:t.propsValue,files:t.files})},async test(t){return await Je.test(el,{auth:t.auth,store:t.store,propsValue:t.propsValue,files:t.files})}});var tl={strategy:0,items:o(async({auth:t,propsValue:e,lastFetchEpochMS:r})=>{let{calendar_id:n,specific_event:i,event_id:s,cancellation_reason:c}=e;if(!n)return[];if(i&&!s)return[];let d;r===0?(d=new Date,d.setDate(d.getDate()-1)):d=new Date(r);let p=[];if(i&&s){let m={method:"GET",url:`${ae.baseUrl}/calendars/${n}/events/${s}`,authentication:{type:"BEARER_TOKEN",token:await Ie(t)}};try{let h=(await Ue.sendRequest(m)).body;new Date(h.updated??0).getTime()>r&&h.status==="cancelled"&&(p=[h])}catch(y){return console.error("Error fetching specific event:",y),[]}}else p=(await da(n,!0,t,d)).filter(y=>y.status==="cancelled");return c&&c.length>0&&(p=p.filter(m=>c.some(y=>{switch(y){case"deleted":return!m.summary||m.summary.includes("Deleted");case"declined":return m.attendees?.some(h=>h.responseStatus==="declined")||!1;case"rescheduled":return m.summary?.toLowerCase().includes("rescheduled")||m.description?.toLowerCase().includes("rescheduled")||!1;case"other":return!0;default:return!0}}))),p.map(m=>({epochMilliSeconds:new Date(m.updated).getTime(),data:m}))},"items")},aA=jt({auth:ne,name:"event_cancelled",displayName:"Event Cancelled",description:"Fires when an event is canceled or deleted.",aiMetadata:{description:"Fires when an event in the selected calendar transitions to a cancelled (or deleted) state, detected by polling. Each fired item is the cancelled event; can optionally be filtered by cancellation reason (deleted, attendee declined, rescheduled, other) and scoped to a single specific event."},props:{calendar_id:ae.calendarDropdown("writer"),specific_event:F.Checkbox({displayName:"Target Specific Event",description:"Enable to monitor a specific event instead of all events in the calendar.",required:!1,defaultValue:!1}),event_id:ae.eventDropdown(!1),cancellation_reason:F.StaticMultiSelectDropdown({displayName:"Cancellation Reasons",description:"Filter by specific types of cancellations (optional)",required:!1,options:{options:[{label:"Event Deleted",value:"deleted"},{label:"Attendee Declined",value:"declined"},{label:"Event Rescheduled",value:"rescheduled"},{label:"Other Cancellations",value:"other"}]}})},outputSchema:Ze,type:"POLLING",sampleData:{id:"abc123def456_cancelled",summary:"Cancelled: Q3 Planning Session",status:"cancelled",created:"2025-07-20T10:00:00.000Z",updated:"2025-08-14T09:30:00.000Z",organizer:{email:"project.manager@example.com"},start:{dateTime:"2025-08-25T10:00:00-07:00"},end:{dateTime:"2025-08-25T11:30:00-07:00"}},async onEnable(t){await Je.onEnable(tl,{auth:t.auth,store:t.store,propsValue:t.propsValue})},async onDisable(t){await Je.onDisable(tl,{auth:t.auth,store:t.store,propsValue:t.propsValue})},async run(t){return await Je.poll(tl,{auth:t.auth,store:t.store,propsValue:t.propsValue,files:t.files})},async test(t){return await Je.test(tl,{auth:t.auth,store:t.store,propsValue:t.propsValue,files:t.files})}});var uh={strategy:1,items:o(async({auth:t,store:e,propsValue:r})=>{let{access_role_filter:n,calendar_name_filter:i,exclude_shared:s}=r,d=await kt(t);if(n&&n.length>0&&(d=d.filter(f=>n.includes(f.accessRole))),i&&i.trim()){let f=i.toLowerCase().trim();d=d.filter(l=>l.summary?.toLowerCase().includes(f)||l.description?.toLowerCase().includes(f))}s&&(d=d.filter(f=>f.accessRole==="owner"||f.primary));let p=d.map(f=>f.id),m=await e.get("calendars")||[],y=new Set(m),h=d.filter(f=>!y.has(f.id));return await e.put("calendars",p),h.map(f=>({id:f.id,data:{...f,isOwned:f.accessRole==="owner"||f.primary,isShared:f.accessRole!=="owner"&&!f.primary,calendarType:f.primary?"primary":f.accessRole==="owner"?"owned":"shared"}}))},"items")},sA=jt({auth:ne,name:"new_calendar",displayName:"New Calendar",description:"Fires when a new calendar is created or becomes accessible.",aiMetadata:{description:"Fires when a calendar newly appears in the connected account's calendar list, whether created or shared in, detected by polling. Each fired item is the new calendar. Can be filtered by access role, a name/description text match, and an option to exclude shared calendars."},props:{access_role_filter:F.StaticMultiSelectDropdown({displayName:"Access Role Filter",description:"Only trigger for calendars with specific access roles (optional)",required:!1,options:{options:[{label:"Owner",value:"owner"},{label:"Writer",value:"writer"},{label:"Reader",value:"reader"},{label:"Free/Busy Reader",value:"freeBusyReader"}]}}),calendar_name_filter:F.ShortText({displayName:"Calendar Name Filter",description:"Only trigger for calendars containing this text in name or description (optional)",required:!1}),exclude_shared:F.Checkbox({displayName:"Exclude Shared Calendars",description:"Only trigger for calendars you own, not shared calendars",required:!1,defaultValue:!1})},outputSchema:ux,type:"POLLING",sampleData:{id:"sample_calendar_id@group.calendar.google.com",summary:"New Project Team Calendar",description:"A shared calendar for the new project team.",timeZone:"Asia/Kolkata",backgroundColor:"#9fe1e7",foregroundColor:"#000000",accessRole:"owner",isOwned:!0,isShared:!1,calendarType:"owned",primary:!1},async onEnable(t){let e=await kt(t.auth),{access_role_filter:r,calendar_name_filter:n,exclude_shared:i}=t.propsValue,s=e;if(r&&r.length>0&&(s=s.filter(c=>r.includes(c.accessRole))),n&&n.trim()){let c=n.toLowerCase().trim();s=s.filter(d=>d.summary?.toLowerCase().includes(c)||d.description?.toLowerCase().includes(c))}i&&(s=s.filter(c=>c.accessRole==="owner"||c.primary)),await t.store.put("calendars",s.map(c=>c.id)),await Je.onEnable(uh,{auth:t.auth,store:t.store,propsValue:t.propsValue})},async onDisable(t){await Je.onDisable(uh,{auth:t.auth,store:t.store,propsValue:t.propsValue})},async run(t){return await Je.poll(uh,{auth:t.auth,store:t.store,propsValue:t.propsValue,files:t.files})},async test(t){return(await kt(t.auth)).slice(-1).map(n=>({id:n.id,data:{...n,isOwned:n.accessRole==="owner"||n.primary,isShared:n.accessRole!=="owner"&&!n.primary,calendarType:n.primary?"primary":n.accessRole==="owner"?"owned":"shared"}}))}});var wL=wv({minimumSupportedRelease:"0.86.4",logoUrl:"https://cdn.activepieces.com/pieces/google-calendar.png",categories:["PRODUCTIVITY"],displayName:"Google Calendar",description:"Get organized and stay on schedule",authors:["OsamaHaikal","bibhuty-did-this","Vitalini","pfernandez98","kishanprmr","MoShizzle","khaledmashaly","abuaboud","ikus060","Cloudieunnie","sanket-a11y","geekyme"],auth:ne,actions:[Cx,Sx,Ex,Px,Ax,Tx,Ox,kx,$x,zx,Mx,jx,Fx,qx,Bx,Vx,Gx,Hx,Zx,Jx,Yx,Xx,Qx,eA,Ub({auth:ne,baseUrl(){return ae.baseUrl},authMapping:o(async t=>({Authorization:`Bearer ${await Ie(t)}`}),"authMapping")})],triggers:[Ix,rA,nA,oA,iA,aA,sA]});0&&(module.exports={createGoogleClient,getAccessToken,googleCalendar,googleCalendarAuth});
|
|
67
|
+
`;E+=k,typeof b.body=="string"&&(E+=b.body,E+=`\r
|
|
68
|
+
`)}E+=v,t.data=E}if(a(h,"browserMultipartUpload"),e.mediaUrl&&o.body)if(t.url=e.mediaUrl,r){n.uploadType="multipart";let p=[{"content-type":"application/json",body:JSON.stringify(r)},{"content-type":o.mimeType||r&&r.mimeType||s,body:o.body}];(0,DT.isBrowser)()?h(p):f(p)}else n.uploadType="media",Object.assign(u,{"content-type":o.mimeType||s}),t.data=o.body;else t.data=r||void 0;if(t.headers=kT.Gaxios.mergeHeaders(t.headers||{},u),t.params=n,!(0,DT.isBrowser)()){t.headers.set("Accept-Encoding","gzip"),t.userAgentDirectives.push({product:"google-api-nodejs-client",version:cN.version,comment:"gzip"});let p=t.userAgentDirectives.map(y=>{let v=`${y.product}/${y.version}`;return y.comment&&(v+=` (${y.comment})`),v}).join(" ");t.headers.set("User-Agent",p)}if(t.validateStatus||(t.validateStatus=p=>p>=200&&p<300||p===304),t.retry=t.retry===void 0?!0:t.retry,delete t.auth,t.universeDomain&&t.universe_domain&&t.universeDomain!==t.universe_domain)throw new Error("Please set either universe_domain or universeDomain, but not both.");let g=typeof process=="object"&&typeof process.env=="object"?process.env.GOOGLE_CLOUD_UNIVERSE_DOMAIN:void 0,m=t.universeDomain??t.universe_domain??g??"googleapis.com";if(m!=="googleapis.com"&&t.url){let p=new URL(t.url);p.hostname.endsWith(".googleapis.com")&&(p.hostname=p.hostname.replace(/googleapis\.com$/,m),t.url=p.toString())}if(Object.keys(t.params).length||(delete t.params,delete t.paramsSerializer),i&&typeof i=="object"){let p=typeof i.getUniverseDomain=="function"?await i.getUniverseDomain():void 0;if(p&&m!==p)throw new Error(`The configured universe domain (${m}) does not match the universe domain found in the credentials (${p}). If you haven't configured the universe domain explicitly, googleapis.com is the default.`);if(t.http2){let y=await i.getRequestHeaders(t.url),v=Object.assign({},t);return v.headers=kT.Gaxios.mergeHeaders(v.headers,y),pW.request(v)}else{let y=await i.request(t);return(0,$T.marshallGaxiosResponse)(y)}}else return new kT.Gaxios().request(t).then(p=>(0,$T.marshallGaxiosResponse)(p))}a(aN,"createAPIRequestAsync");var NT=class extends sN.Transform{static{a(this,"ProgressStream")}bytesRead=0;_transform(t,n,o){this.bytesRead+=t.length,this.emit("progress",this.bytesRead),this.push(t),o()}};function gW(e,t){(0,DT.isBrowser)()||(e["x-goog-api-client"]=`gdcl/${cN.version} gl-node/${process.versions.node}`),t&&(e["x-goog-api-version"]=t)}a(gW,"populateAPIHeader")});var uN=z(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0});ih.AuthPlus=void 0;var eo=Vu(),UT=class extends eo.GoogleAuth{static{a(this,"AuthPlus")}JWT=eo.JWT;Compute=eo.Compute;OAuth2=eo.OAuth2Client;GoogleAuth=eo.GoogleAuth;AwsClient=eo.AwsClient;IdentityPoolClient=eo.IdentityPoolClient;ExternalAccountClient=eo.ExternalAccountClient;_cachedAuth;async getClient(t){return this._cachedAuth=new eo.GoogleAuth(t),this._cachedAuth.getClient()}getProjectId(t){return t?this._cachedAuth?this._cachedAuth.getProjectId(t):super.getProjectId(t):this._cachedAuth?this._cachedAuth.getProjectId():super.getProjectId()}};ih.AuthPlus=UT});var LT=z(ah=>{"use strict";Object.defineProperty(ah,"__esModule",{value:!0});ah.Endpoint=void 0;var lN=oh(),MT=class{static{a(this,"Endpoint")}_options;google;constructor(t){this._options=t||{}}applySchema(t,n,o,r){if(this.applyMethodsFromSchema(t,n,o,r),o.resources){for(let i in o.resources)if(Object.prototype.hasOwnProperty.call(o.resources,i)){let s=o.resources[i];t[i]||(t[i]={}),this.applySchema(t[i],n,s,r)}}}applyMethodsFromSchema(t,n,o,r){if(o.methods){for(let i in o.methods)if(Object.prototype.hasOwnProperty.call(o.methods,i)){let s=o.methods[i];t[i]=this.makeMethod(n,s,r)}}}makeMethod(t,n,o){return(r,i)=>{let s=typeof r=="function"?{}:r;i=typeof r=="function"?r:i;let u=dN(t.rootUrl+t.servicePath+n.path),d={options:{url:u.substring(1,u.length-1),method:n.httpMethod,apiVersion:n.apiVersion},params:s,requiredParams:n.parameterOrder||[],pathParams:this.getPathParams(n.parameters),context:o};if(n.mediaUpload&&n.mediaUpload.protocols&&n.mediaUpload.protocols.simple&&n.mediaUpload.protocols.simple.path){let f=dN(t.rootUrl+n.mediaUpload.protocols.simple.path);d.mediaUrl=f.substring(1,f.length-1)}if(!i)return(0,lN.createAPIRequest)(d);(0,lN.createAPIRequest)(d,i)}}getPathParams(t){let n=new Array;return typeof t!="object"&&(t={}),Object.keys(t).forEach(o=>{t[o].location==="path"&&n.push(o)}),n}};ah.Endpoint=MT;function dN(e){return e?`'${e}'`.replace(/([^:]\/)\/+/g,"$1"):""}a(dN,"buildurl")});var fN=z(sh=>{"use strict";Object.defineProperty(sh,"__esModule",{value:!0});sh.Discovery=void 0;var yW=require("fs"),vW=Pt(),_W=require("url"),pN=require("util"),bW=oh(),EW=LT(),SW=pN.promisify(yW.readFile),jT=class{static{a(this,"Discovery")}transporter=new vW.Gaxios;options;constructor(t){this.options=t||{}}makeEndpoint(t){return n=>{let o=new EW.Endpoint(n);return o.applySchema(o,t,t,o),o}}log(...t){this.options&&this.options.debug&&console.log(...t)}async discoverAllAPIs(t){let n=new Headers(this.options.includePrivate?{}:{"X-User-Ip":"0.0.0.0"}),r=(await this.transporter.request({url:t,headers:n})).data.items,i=await Promise.all(r.map(async d=>{let f=await this.discoverAPI(d.discoveryRestUrl);return{api:d,endpointCreator:f}})),s={},u={};for(let d of i)u[d.api.name]||(s[d.api.name]={},u[d.api.name]=f=>{let h=typeof f,g;if(h==="string")g=f,f={};else if(h==="object")g=f.version,delete f.version;else throw new Error("Argument error: Accepts only string or object");try{let m=d.endpointCreator(f,this);return Object.freeze(m)}catch(m){throw new Error(pN.format('Unable to load endpoint %s("%s"): %s',d.api.name,g,m.message))}}),s[d.api.name][d.api.version]=d.endpointCreator;return u}async discoverAPI(t){if(typeof t=="string"){let n=_W.parse(t);if(t&&!n.protocol){this.log("Reading from file "+t);let o=await SW(t,{encoding:"utf8"});return this.makeEndpoint(JSON.parse(o))}else{this.log("Requesting "+t);let o=await this.transporter.request({url:t});return this.makeEndpoint(o.data)}}else{let n=t;this.log("Requesting "+n.url);let o=n.url;delete n.url;let r={options:{url:o,method:"GET"},requiredParams:[],pathParams:[],params:n,context:{google:{_options:{}},_options:{}}},i=await(0,bW.createAPIRequest)(r);return this.makeEndpoint(i.data)}}};sh.Discovery=jT});var ch=z(De=>{"use strict";var TW=De&&De.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),PW=De&&De.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&TW(t,e,n)};Object.defineProperty(De,"__esModule",{value:!0});De.Endpoint=De.Discovery=De.AuthPlus=De.createAPIRequest=De.getAPI=De.GaxiosError=De.Gaxios=De.AwsClient=De.IdentityPoolClient=De.BaseExternalAccountClient=De.ExternalAccountClient=De.GoogleAuth=De.UserRefreshClient=De.Compute=De.JWT=De.OAuth2Client=De.gaxios=De.googleAuthLibrary=void 0;De.googleAuthLibrary=Vu();De.gaxios=Pt();var to=Vu();Object.defineProperty(De,"OAuth2Client",{enumerable:!0,get:a(function(){return to.OAuth2Client},"get")});Object.defineProperty(De,"JWT",{enumerable:!0,get:a(function(){return to.JWT},"get")});Object.defineProperty(De,"Compute",{enumerable:!0,get:a(function(){return to.Compute},"get")});Object.defineProperty(De,"UserRefreshClient",{enumerable:!0,get:a(function(){return to.UserRefreshClient},"get")});Object.defineProperty(De,"GoogleAuth",{enumerable:!0,get:a(function(){return to.GoogleAuth},"get")});Object.defineProperty(De,"ExternalAccountClient",{enumerable:!0,get:a(function(){return to.ExternalAccountClient},"get")});Object.defineProperty(De,"BaseExternalAccountClient",{enumerable:!0,get:a(function(){return to.BaseExternalAccountClient},"get")});Object.defineProperty(De,"IdentityPoolClient",{enumerable:!0,get:a(function(){return to.IdentityPoolClient},"get")});Object.defineProperty(De,"AwsClient",{enumerable:!0,get:a(function(){return to.AwsClient},"get")});var mN=Pt();Object.defineProperty(De,"Gaxios",{enumerable:!0,get:a(function(){return mN.Gaxios},"get")});Object.defineProperty(De,"GaxiosError",{enumerable:!0,get:a(function(){return mN.GaxiosError},"get")});var wW=oD();Object.defineProperty(De,"getAPI",{enumerable:!0,get:a(function(){return wW.getAPI},"get")});var xW=oh();Object.defineProperty(De,"createAPIRequest",{enumerable:!0,get:a(function(){return xW.createAPIRequest},"get")});var AW=uN();Object.defineProperty(De,"AuthPlus",{enumerable:!0,get:a(function(){return AW.AuthPlus},"get")});var IW=fN();Object.defineProperty(De,"Discovery",{enumerable:!0,get:a(function(){return IW.Discovery},"get")});var RW=LT();Object.defineProperty(De,"Endpoint",{enumerable:!0,get:a(function(){return RW.Endpoint},"get")});PW(nh(),De)});var gN=z(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0});uh.calendar_v3=void 0;var de=ch(),hN;(function(e){class t{static{a(this,"Calendar")}context;acl;calendarList;calendars;channels;colors;events;freebusy;settings;constructor(g,m){this.context={_options:g||{},google:m},this.acl=new n(this.context),this.calendarList=new o(this.context),this.calendars=new r(this.context),this.channels=new i(this.context),this.colors=new s(this.context),this.events=new u(this.context),this.freebusy=new d(this.context),this.settings=new f(this.context)}}e.Calendar=t;class n{static{a(this,"Resource$Acl")}context;constructor(g){this.context=g}delete(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl/{ruleId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},v),params:y,requiredParams:["calendarId","ruleId"],pathParams:["calendarId","ruleId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}get(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl/{ruleId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:["calendarId","ruleId"],pathParams:["calendarId","ruleId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}insert(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}list(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}patch(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl/{ruleId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},v),params:y,requiredParams:["calendarId","ruleId"],pathParams:["calendarId","ruleId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}update(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl/{ruleId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},v),params:y,requiredParams:["calendarId","ruleId"],pathParams:["calendarId","ruleId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}watch(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}}e.Resource$Acl=n;class o{static{a(this,"Resource$Calendarlist")}context;constructor(g){this.context=g}delete(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}get(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}insert(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:[],pathParams:[],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}list(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:[],pathParams:[],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}patch(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}update(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}watch(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:[],pathParams:[],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}}e.Resource$Calendarlist=o;class r{static{a(this,"Resource$Calendars")}context;constructor(g){this.context=g}clear(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/clear").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}delete(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}get(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}insert(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:[],pathParams:[],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}patch(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}update(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}}e.Resource$Calendars=r;class i{static{a(this,"Resource$Channels")}context;constructor(g){this.context=g}stop(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/channels/stop").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:[],pathParams:[],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}}e.Resource$Channels=i;class s{static{a(this,"Resource$Colors")}context;constructor(g){this.context=g}get(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/colors").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:[],pathParams:[],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}}e.Resource$Colors=s;class u{static{a(this,"Resource$Events")}context;constructor(g){this.context=g}delete(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},v),params:y,requiredParams:["calendarId","eventId"],pathParams:["calendarId","eventId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}get(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:["calendarId","eventId"],pathParams:["calendarId","eventId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}import(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/import").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}insert(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}instances(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}/instances").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:["calendarId","eventId"],pathParams:["calendarId","eventId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}list(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}move(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}/move").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:["calendarId","eventId","destination"],pathParams:["calendarId","eventId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}patch(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},v),params:y,requiredParams:["calendarId","eventId"],pathParams:["calendarId","eventId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}quickAdd(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/quickAdd").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:["calendarId","text"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}update(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},v),params:y,requiredParams:["calendarId","eventId"],pathParams:["calendarId","eventId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}watch(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}}e.Resource$Events=u;class d{static{a(this,"Resource$Freebusy")}context;constructor(g){this.context=g}query(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/freeBusy").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:[],pathParams:[],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}}e.Resource$Freebusy=d;class f{static{a(this,"Resource$Settings")}context;constructor(g){this.context=g}get(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/settings/{setting}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:["setting"],pathParams:["setting"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}list(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/settings").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:[],pathParams:[],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}watch(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/settings/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:[],pathParams:[],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}}e.Resource$Settings=f})(hN||(uh.calendar_v3=hN={}))});var ro=z(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.AuthPlus=Hr.calendar_v3=Hr.auth=Hr.VERSIONS=void 0;Hr.calendar=CW;var yN=ch(),vN=gN();Object.defineProperty(Hr,"calendar_v3",{enumerable:!0,get:a(function(){return vN.calendar_v3},"get")});Hr.VERSIONS={v3:vN.calendar_v3.Calendar};function CW(e){return(0,yN.getAPI)("calendar",e,Hr.VERSIONS,this)}a(CW,"calendar");var OW=new yN.AuthPlus;Hr.auth=OW;var kW=ch();Object.defineProperty(Hr,"AuthPlus",{enumerable:!0,get:a(function(){return kW.AuthPlus},"get")})});var GN=z((tP,rP)=>{(function(e,t){typeof tP=="object"&&typeof rP<"u"?rP.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(tP,(function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(o,r,i){var s=r.prototype;i.utc=function(p){var y={date:p,utc:!0,args:arguments};return new r(y)},s.utc=function(p){var y=i(this.toDate(),{locale:this.$L,utc:!0});return p?y.add(this.utcOffset(),e):y},s.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var u=s.parse;s.parse=function(p){p.utc&&(this.$u=!0),this.$utils().u(p.$offset)||(this.$offset=p.$offset),u.call(this,p)};var d=s.init;s.init=function(){if(this.$u){var p=this.$d;this.$y=p.getUTCFullYear(),this.$M=p.getUTCMonth(),this.$D=p.getUTCDate(),this.$W=p.getUTCDay(),this.$H=p.getUTCHours(),this.$m=p.getUTCMinutes(),this.$s=p.getUTCSeconds(),this.$ms=p.getUTCMilliseconds()}else d.call(this)};var f=s.utcOffset;s.utcOffset=function(p,y){var v=this.$utils().u;if(v(p))return this.$u?0:v(this.$offset)?f.call(this):this.$offset;if(typeof p=="string"&&(p=(function(N){N===void 0&&(N="");var Z=N.match(t);if(!Z)return null;var H=(""+Z[0]).match(n)||["-",0,0],K=H[0],ee=60*+H[1]+ +H[2];return ee===0?0:K==="+"?ee:-ee})(p),p===null))return this;var E=Math.abs(p)<=16?60*p:p,b=this;if(y)return b.$offset=E,b.$u=p===0,b;if(p!==0){var k=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(b=this.local().add(E+k,e)).$offset=E,b.$x.$localOffset=k}else b=this.utc();return b};var h=s.format;s.format=function(p){var y=p||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,y)},s.valueOf=function(){var p=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*p},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var g=s.toDate;s.toDate=function(p){return p==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():g.call(this)};var m=s.diff;s.diff=function(p,y,v){if(p&&this.$u===p.$u)return m.call(this,p,y,v);var E=this.local(),b=i(p).local();return m.call(E,b,y,v)}}}))});var qW={};hr(qW,{createGoogleClient:()=>At,getAccessToken:()=>$e,googleCalendar:()=>BW,googleCalendarAuth:()=>le});module.exports=iM(qW);var yr={};hr(yr,{$ZodAny:()=>Os,$ZodArray:()=>Ns,$ZodAsyncError:()=>Yr,$ZodBase64:()=>yd,$ZodBase64URL:()=>vd,$ZodBigInt:()=>oa,$ZodBigIntFormat:()=>Sd,$ZodBoolean:()=>Xo,$ZodCIDRv4:()=>hd,$ZodCIDRv6:()=>gd,$ZodCUID:()=>nd,$ZodCUID2:()=>od,$ZodCatch:()=>Md,$ZodCheck:()=>at,$ZodCheckBigIntFormat:()=>kg,$ZodCheckEndsWith:()=>Vg,$ZodCheckGreaterThan:()=>Hl,$ZodCheckIncludes:()=>Bg,$ZodCheckLengthEquals:()=>Mg,$ZodCheckLessThan:()=>Gl,$ZodCheckLowerCase:()=>jg,$ZodCheckMaxLength:()=>zg,$ZodCheckMaxSize:()=>$g,$ZodCheckMimeType:()=>Hg,$ZodCheckMinLength:()=>Ug,$ZodCheckMinSize:()=>Dg,$ZodCheckMultipleOf:()=>Cg,$ZodCheckNumberFormat:()=>Og,$ZodCheckOverwrite:()=>Zg,$ZodCheckProperty:()=>Gg,$ZodCheckRegex:()=>Lg,$ZodCheckSizeEquals:()=>Ng,$ZodCheckStartsWith:()=>qg,$ZodCheckStringFormat:()=>ra,$ZodCheckUpperCase:()=>Fg,$ZodCodec:()=>aa,$ZodCustom:()=>Vs,$ZodCustomStringFormat:()=>Ed,$ZodDate:()=>Ds,$ZodDefault:()=>Dd,$ZodDiscriminatedUnion:()=>zs,$ZodE164:()=>_d,$ZodEmail:()=>ed,$ZodEmoji:()=>td,$ZodEncodeError:()=>po,$ZodEnum:()=>Ls,$ZodError:()=>ws,$ZodExactOptional:()=>$d,$ZodFile:()=>kd,$ZodFunction:()=>Bd,$ZodGUID:()=>Xl,$ZodIPv4:()=>pd,$ZodIPv6:()=>fd,$ZodISODate:()=>ud,$ZodISODateTime:()=>cd,$ZodISODuration:()=>dd,$ZodISOTime:()=>ld,$ZodIntersection:()=>Rd,$ZodJWT:()=>bd,$ZodKSUID:()=>sd,$ZodLazy:()=>Vd,$ZodLiteral:()=>js,$ZodMAC:()=>md,$ZodMap:()=>Cd,$ZodNaN:()=>Ld,$ZodNanoID:()=>rd,$ZodNever:()=>xd,$ZodNonOptional:()=>zd,$ZodNull:()=>wd,$ZodNullable:()=>Bs,$ZodNumber:()=>na,$ZodNumberFormat:()=>Cs,$ZodObject:()=>Ad,$ZodObjectJIT:()=>Yg,$ZodOptional:()=>ia,$ZodPipe:()=>qs,$ZodPrefault:()=>Nd,$ZodPromise:()=>qd,$ZodReadonly:()=>jd,$ZodRealError:()=>rr,$ZodRecord:()=>Ms,$ZodRegistry:()=>Gd,$ZodSet:()=>Od,$ZodString:()=>Mn,$ZodStringFormat:()=>Qe,$ZodSuccess:()=>Ud,$ZodSymbol:()=>Td,$ZodTemplateLiteral:()=>Fd,$ZodTransform:()=>Fs,$ZodTuple:()=>Us,$ZodType:()=>xe,$ZodULID:()=>id,$ZodURL:()=>Rs,$ZodUUID:()=>Ql,$ZodUndefined:()=>Pd,$ZodUnion:()=>Qo,$ZodUnknown:()=>ks,$ZodVoid:()=>$s,$ZodXID:()=>ad,$ZodXor:()=>Id,$brand:()=>vs,$constructor:()=>A,$input:()=>Zd,$output:()=>Hd,Doc:()=>Is,JSONSchema:()=>ox,JSONSchemaGenerator:()=>Sp,NEVER:()=>Rl,TimePrecision:()=>Kd,_any:()=>Pc,_array:()=>Vy,_base64:()=>mc,_base64url:()=>hc,_bigint:()=>op,_boolean:()=>Ec,_catch:()=>dL,_check:()=>nx,_cidrv4:()=>pc,_cidrv6:()=>fc,_coercedBigint:()=>Tc,_coercedBoolean:()=>Sc,_coercedDate:()=>Ac,_coercedNumber:()=>_c,_coercedString:()=>Ys,_cuid:()=>ic,_cuid2:()=>ac,_custom:()=>$c,_date:()=>dp,_decode:()=>zl,_decodeAsync:()=>Ml,_default:()=>cL,_discriminatedUnion:()=>J1,_e164:()=>gc,_email:()=>Xs,_emoji:()=>nc,_encode:()=>Nl,_encodeAsync:()=>Ul,_endsWith:()=>ii,_enum:()=>rL,_file:()=>fp,_float32:()=>ep,_float64:()=>tp,_gt:()=>Qr,_gte:()=>Ct,_guid:()=>ua,_includes:()=>ni,_int:()=>bc,_int32:()=>rp,_int64:()=>ip,_intersection:()=>Y1,_ipv4:()=>lc,_ipv6:()=>dc,_isoDate:()=>Yd,_isoDateTime:()=>Jd,_isoDuration:()=>Qd,_isoTime:()=>Xd,_jwt:()=>yc,_ksuid:()=>uc,_lazy:()=>hL,_length:()=>_o,_literal:()=>oL,_lowercase:()=>ti,_lt:()=>Xr,_lte:()=>Jt,_mac:()=>Wd,_map:()=>eL,_max:()=>Jt,_maxLength:()=>vo,_maxSize:()=>jn,_mime:()=>ai,_min:()=>Ct,_minLength:()=>Tt,_minSize:()=>en,_multipleOf:()=>Ln,_nan:()=>pp,_nanoid:()=>oc,_nativeEnum:()=>nL,_negative:()=>Rc,_never:()=>lp,_nonnegative:()=>Oc,_nonoptional:()=>uL,_nonpositive:()=>Cc,_normalize:()=>si,_null:()=>up,_nullable:()=>sL,_number:()=>vc,_optional:()=>aL,_overwrite:()=>Nr,_parse:()=>Ji,_parseAsync:()=>Yi,_pipe:()=>pL,_positive:()=>Ic,_promise:()=>gL,_property:()=>kc,_readonly:()=>fL,_record:()=>Q1,_refine:()=>mp,_regex:()=>Ft,_safeDecode:()=>jl,_safeDecodeAsync:()=>Bl,_safeEncode:()=>Ll,_safeEncodeAsync:()=>Fl,_safeParse:()=>Xi,_safeParseAsync:()=>ea,_set:()=>tL,_size:()=>yo,_slugify:()=>la,_startsWith:()=>oi,_string:()=>Js,_stringFormat:()=>di,_stringbool:()=>vp,_success:()=>lL,_superRefine:()=>hp,_symbol:()=>sp,_templateLiteral:()=>mL,_toLowerCase:()=>ui,_toUpperCase:()=>li,_transform:()=>iL,_trim:()=>ci,_tuple:()=>X1,_uint32:()=>np,_uint64:()=>ap,_ulid:()=>sc,_undefined:()=>cp,_union:()=>W1,_unknown:()=>wc,_uppercase:()=>ri,_url:()=>ei,_uuid:()=>Qs,_uuidv4:()=>ec,_uuidv6:()=>tc,_uuidv7:()=>rc,_void:()=>xc,_xid:()=>cc,_xor:()=>K1,clone:()=>Dt,config:()=>yt,createStandardJSONSchemaMethod:()=>da,createToJSONSchemaMethod:()=>Gy,decode:()=>Pw,decodeAsync:()=>xw,describe:()=>gp,encode:()=>Tw,encodeAsync:()=>ww,extractDefs:()=>Eo,finalize:()=>So,flattenError:()=>Wi,formatError:()=>Ki,globalConfig:()=>ys,globalRegistry:()=>Nt,initializeContext:()=>bo,isValidBase64:()=>Jg,isValidBase64URL:()=>Ww,isValidJWT:()=>Kw,locales:()=>ca,meta:()=>yp,parse:()=>Ko,parseAsync:()=>Jo,prettifyError:()=>Dl,process:()=>et,regexes:()=>nr,registry:()=>Ks,safeDecode:()=>Iw,safeDecodeAsync:()=>Cw,safeEncode:()=>Aw,safeEncodeAsync:()=>Rw,safeParse:()=>Qi,safeParseAsync:()=>ta,toDotPath:()=>Sw,toJSONSchema:()=>Dc,treeifyError:()=>$l,util:()=>oe,version:()=>Wg});var Rl=Object.freeze({status:"aborted"});function A(e,t,n){function o(u,d){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:d,constr:s,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,d);let f=s.prototype,h=Object.keys(f);for(let g=0;g<h.length;g++){let m=h[g];m in u||(u[m]=f[m].bind(u))}}a(o,"init");let r=n?.Parent??Object;class i extends r{static{a(this,"Definition")}}Object.defineProperty(i,"name",{value:e});function s(u){var d;let f=n?.Parent?new i:this;o(f,u),(d=f._zod).deferred??(d.deferred=[]);for(let h of f._zod.deferred)h();return f}return a(s,"_"),Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:a(u=>n?.Parent&&u instanceof n.Parent?!0:u?._zod?.traits?.has(e),"value")}),Object.defineProperty(s,"name",{value:e}),s}a(A,"$constructor");var vs=Symbol("zod_brand"),Yr=class extends Error{static{a(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},po=class extends Error{static{a(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},ys={};function yt(e){return e&&Object.assign(ys,e),ys}a(yt,"config");var oe={};hr(oe,{BIGINT_FORMAT_RANGES:()=>tg,Class:()=>Wh,NUMBER_FORMAT_RANGES:()=>eg,aborted:()=>go,allowsEval:()=>Yh,assert:()=>lM,assertEqual:()=>aM,assertIs:()=>cM,assertNever:()=>uM,assertNotEqual:()=>sM,assignProp:()=>mo,base64ToUint8Array:()=>_w,base64urlToUint8Array:()=>EM,cached:()=>Hi,captureStackTrace:()=>Ol,cleanEnum:()=>bM,cleanRegex:()=>Es,clone:()=>Dt,cloneDef:()=>pM,createTransparentProxy:()=>vM,defineLazy:()=>ze,esc:()=>Cl,escapeRegex:()=>Dr,extend:()=>hw,finalizeIssue:()=>tr,floatSafeRemainder:()=>Kh,getElementAtPath:()=>fM,getEnumValues:()=>bs,getLengthableOrigin:()=>Ps,getParsedType:()=>yM,getSizableOrigin:()=>Ts,hexToUint8Array:()=>TM,isObject:()=>Wo,isPlainObject:()=>ho,issue:()=>Zi,joinValues:()=>B,jsonStringifyReplacer:()=>Gi,merge:()=>_M,mergeDefs:()=>Un,normalizeParams:()=>te,nullish:()=>fo,numKeys:()=>gM,objectClone:()=>dM,omit:()=>mw,optionalKeys:()=>Qh,parsedType:()=>ie,partial:()=>yw,pick:()=>fw,prefixIssues:()=>gr,primitiveTypes:()=>Xh,promiseAllObject:()=>mM,propertyKeyTypes:()=>Ss,randomString:()=>hM,required:()=>vw,safeExtend:()=>gw,shallowClone:()=>kl,slugify:()=>Jh,stringifyPrimitive:()=>re,uint8ArrayToBase64:()=>bw,uint8ArrayToBase64url:()=>SM,uint8ArrayToHex:()=>PM,unwrapMessage:()=>_s});function aM(e){return e}a(aM,"assertEqual");function sM(e){return e}a(sM,"assertNotEqual");function cM(e){}a(cM,"assertIs");function uM(e){throw new Error("Unexpected value in exhaustive check")}a(uM,"assertNever");function lM(e){}a(lM,"assert");function bs(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}a(bs,"getEnumValues");function B(e,t="|"){return e.map(n=>re(n)).join(t)}a(B,"joinValues");function Gi(e,t){return typeof t=="bigint"?t.toString():t}a(Gi,"jsonStringifyReplacer");function Hi(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}a(Hi,"cached");function fo(e){return e==null}a(fo,"nullish");function Es(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}a(Es,"cleanRegex");function Kh(e,t){let n=(e.toString().split(".")[1]||"").length,o=t.toString(),r=(o.split(".")[1]||"").length;if(r===0&&/\d?e-\d?/.test(o)){let d=o.match(/\d?e-(\d?)/);d?.[1]&&(r=Number.parseInt(d[1]))}let i=n>r?n:r,s=Number.parseInt(e.toFixed(i).replace(".","")),u=Number.parseInt(t.toFixed(i).replace(".",""));return s%u/10**i}a(Kh,"floatSafeRemainder");var pw=Symbol("evaluating");function ze(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==pw)return o===void 0&&(o=pw,o=n()),o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}a(ze,"defineLazy");function dM(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}a(dM,"objectClone");function mo(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}a(mo,"assignProp");function Un(...e){let t={};for(let n of e){let o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}a(Un,"mergeDefs");function pM(e){return Un(e._zod.def)}a(pM,"cloneDef");function fM(e,t){return t?t.reduce((n,o)=>n?.[o],e):e}a(fM,"getElementAtPath");function mM(e){let t=Object.keys(e),n=t.map(o=>e[o]);return Promise.all(n).then(o=>{let r={};for(let i=0;i<t.length;i++)r[t[i]]=o[i];return r})}a(mM,"promiseAllObject");function hM(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let o=0;o<e;o++)n+=t[Math.floor(Math.random()*t.length)];return n}a(hM,"randomString");function Cl(e){return JSON.stringify(e)}a(Cl,"esc");function Jh(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}a(Jh,"slugify");var Ol="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Wo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}a(Wo,"isObject");var Yh=Hi(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function ho(e){if(Wo(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Wo(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}a(ho,"isPlainObject");function kl(e){return ho(e)?{...e}:Array.isArray(e)?[...e]:e}a(kl,"shallowClone");function gM(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}a(gM,"numKeys");var yM=a(e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},"getParsedType"),Ss=new Set(["string","number","symbol"]),Xh=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Dr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(Dr,"escapeRegex");function Dt(e,t,n){let o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}a(Dt,"clone");function te(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:a(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:a(()=>t.error,"error")}:t}a(te,"normalizeParams");function vM(e){let t;return new Proxy({},{get(n,o,r){return t??(t=e()),Reflect.get(t,o,r)},set(n,o,r,i){return t??(t=e()),Reflect.set(t,o,r,i)},has(n,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(n,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(n,o,r){return t??(t=e()),Reflect.defineProperty(t,o,r)}})}a(vM,"createTransparentProxy");function re(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}a(re,"stringifyPrimitive");function Qh(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}a(Qh,"optionalKeys");var eg={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},tg={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function fw(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=Un(e._zod.def,{get shape(){let s={};for(let u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(s[u]=n.shape[u])}return mo(this,"shape",s),s},checks:[]});return Dt(e,i)}a(fw,"pick");function mw(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=Un(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete s[u]}return mo(this,"shape",s),s},checks:[]});return Dt(e,i)}a(mw,"omit");function hw(e,t){if(!ho(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=Un(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return mo(this,"shape",i),i}});return Dt(e,r)}a(hw,"extend");function gw(e,t){if(!ho(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Un(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return mo(this,"shape",o),o}});return Dt(e,n)}a(gw,"safeExtend");function _M(e,t){let n=Un(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return mo(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return Dt(e,n)}a(_M,"merge");function yw(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=Un(t._zod.def,{get shape(){let u=t._zod.def.shape,d={...u};if(n)for(let f in n){if(!(f in u))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(d[f]=e?new e({type:"optional",innerType:u[f]}):u[f])}else for(let f in u)d[f]=e?new e({type:"optional",innerType:u[f]}):u[f];return mo(this,"shape",d),d},checks:[]});return Dt(t,s)}a(yw,"partial");function vw(e,t,n){let o=Un(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:r[s]}))}else for(let s in r)i[s]=new e({type:"nonoptional",innerType:r[s]});return mo(this,"shape",i),i}});return Dt(t,o)}a(vw,"required");function go(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}a(go,"aborted");function gr(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}a(gr,"prefixIssues");function _s(e){return typeof e=="string"?e:e?.message}a(_s,"unwrapMessage");function tr(e,t,n){let o={...e,path:e.path??[]};if(!e.message){let r=_s(e.inst?._zod.def?.error?.(e))??_s(t?.error?.(e))??_s(n.customError?.(e))??_s(n.localeError?.(e))??"Invalid input";o.message=r}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}a(tr,"finalizeIssue");function Ts(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}a(Ts,"getSizableOrigin");function Ps(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}a(Ps,"getLengthableOrigin");function ie(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}a(ie,"parsedType");function Zi(...e){let[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}a(Zi,"issue");function bM(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}a(bM,"cleanEnum");function _w(e){let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}a(_w,"base64ToUint8Array");function bw(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}a(bw,"uint8ArrayToBase64");function EM(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return _w(t+n)}a(EM,"base64urlToUint8Array");function SM(e){return bw(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}a(SM,"uint8ArrayToBase64url");function TM(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)n[o/2]=Number.parseInt(t.slice(o,o+2),16);return n}a(TM,"hexToUint8Array");function PM(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}a(PM,"uint8ArrayToHex");var Wh=class{static{a(this,"Class")}constructor(...t){}};var Ew=a((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Gi,2),Object.defineProperty(e,"toString",{value:a(()=>e.message,"value"),enumerable:!1})},"initializer"),ws=A("$ZodError",Ew),rr=A("$ZodError",Ew,{Parent:Error});function Wi(e,t=n=>n.message){let n={},o=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):o.push(t(r));return{formErrors:o,fieldErrors:n}}a(Wi,"flattenError");function Ki(e,t=n=>n.message){let n={_errors:[]},o=a(r=>{for(let i of r.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>o({issues:s}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let s=n,u=0;for(;u<i.path.length;){let d=i.path[u];u===i.path.length-1?(s[d]=s[d]||{_errors:[]},s[d]._errors.push(t(i))):s[d]=s[d]||{_errors:[]},s=s[d],u++}}},"processError");return o(e),n}a(Ki,"formatError");function $l(e,t=n=>n.message){let n={errors:[]},o=a((r,i=[])=>{var s,u;for(let d of r.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(f=>o({issues:f},d.path));else if(d.code==="invalid_key")o({issues:d.issues},d.path);else if(d.code==="invalid_element")o({issues:d.issues},d.path);else{let f=[...i,...d.path];if(f.length===0){n.errors.push(t(d));continue}let h=n,g=0;for(;g<f.length;){let m=f[g],p=g===f.length-1;typeof m=="string"?(h.properties??(h.properties={}),(s=h.properties)[m]??(s[m]={errors:[]}),h=h.properties[m]):(h.items??(h.items=[]),(u=h.items)[m]??(u[m]={errors:[]}),h=h.items[m]),p&&h.errors.push(t(d)),g++}}},"processError");return o(e),n}a($l,"treeifyError");function Sw(e){let t=[],n=e.map(o=>typeof o=="object"?o.key:o);for(let o of n)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}a(Sw,"toDotPath");function Dl(e){let t=[],n=[...e.issues].sort((o,r)=>(o.path??[]).length-(r.path??[]).length);for(let o of n)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${Sw(o.path)}`);return t.join(`
|
|
69
|
+
`)}a(Dl,"prettifyError");var Ji=a(e=>(t,n,o,r)=>{let i=o?Object.assign(o,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new Yr;if(s.issues.length){let u=new(r?.Err??e)(s.issues.map(d=>tr(d,i,yt())));throw Ol(u,r?.callee),u}return s.value},"_parse"),Ko=Ji(rr),Yi=a(e=>async(t,n,o,r)=>{let i=o?Object.assign(o,{async:!0}):{async:!0},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let u=new(r?.Err??e)(s.issues.map(d=>tr(d,i,yt())));throw Ol(u,r?.callee),u}return s.value},"_parseAsync"),Jo=Yi(rr),Xi=a(e=>(t,n,o)=>{let r=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new Yr;return i.issues.length?{success:!1,error:new(e??ws)(i.issues.map(s=>tr(s,r,yt())))}:{success:!0,data:i.value}},"_safeParse"),Qi=Xi(rr),ea=a(e=>async(t,n,o)=>{let r=o?Object.assign(o,{async:!0}):{async:!0},i=t._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>tr(s,r,yt())))}:{success:!0,data:i.value}},"_safeParseAsync"),ta=ea(rr),Nl=a(e=>(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Ji(e)(t,n,r)},"_encode"),Tw=Nl(rr),zl=a(e=>(t,n,o)=>Ji(e)(t,n,o),"_decode"),Pw=zl(rr),Ul=a(e=>async(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Yi(e)(t,n,r)},"_encodeAsync"),ww=Ul(rr),Ml=a(e=>async(t,n,o)=>Yi(e)(t,n,o),"_decodeAsync"),xw=Ml(rr),Ll=a(e=>(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Xi(e)(t,n,r)},"_safeEncode"),Aw=Ll(rr),jl=a(e=>(t,n,o)=>Xi(e)(t,n,o),"_safeDecode"),Iw=jl(rr),Fl=a(e=>async(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return ea(e)(t,n,r)},"_safeEncodeAsync"),Rw=Fl(rr),Bl=a(e=>async(t,n,o)=>ea(e)(t,n,o),"_safeDecodeAsync"),Cw=Bl(rr);var nr={};hr(nr,{base64:()=>yg,base64url:()=>ql,bigint:()=>Tg,boolean:()=>wg,browserEmail:()=>$M,cidrv4:()=>hg,cidrv6:()=>gg,cuid:()=>rg,cuid2:()=>ng,date:()=>_g,datetime:()=>Eg,domain:()=>zM,duration:()=>cg,e164:()=>vg,email:()=>lg,emoji:()=>dg,extendedDuration:()=>xM,guid:()=>ug,hex:()=>UM,hostname:()=>NM,html5Email:()=>CM,idnEmail:()=>kM,integer:()=>Pg,ipv4:()=>pg,ipv6:()=>fg,ksuid:()=>ag,lowercase:()=>Ig,mac:()=>mg,md5_base64:()=>LM,md5_base64url:()=>jM,md5_hex:()=>MM,nanoid:()=>sg,null:()=>xg,number:()=>Vl,rfc5322Email:()=>OM,sha1_base64:()=>BM,sha1_base64url:()=>qM,sha1_hex:()=>FM,sha256_base64:()=>GM,sha256_base64url:()=>HM,sha256_hex:()=>VM,sha384_base64:()=>WM,sha384_base64url:()=>KM,sha384_hex:()=>ZM,sha512_base64:()=>YM,sha512_base64url:()=>XM,sha512_hex:()=>JM,string:()=>Sg,time:()=>bg,ulid:()=>og,undefined:()=>Ag,unicodeEmail:()=>Ow,uppercase:()=>Rg,uuid:()=>Yo,uuid4:()=>AM,uuid6:()=>IM,uuid7:()=>RM,xid:()=>ig});var rg=/^[cC][^\s-]{8,}$/,ng=/^[0-9a-z]+$/,og=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ig=/^[0-9a-vA-V]{20}$/,ag=/^[A-Za-z0-9]{27}$/,sg=/^[a-zA-Z0-9_-]{21}$/,cg=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,xM=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,ug=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Yo=a(e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,"uuid"),AM=Yo(4),IM=Yo(6),RM=Yo(7),lg=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,CM=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,OM=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Ow=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,kM=Ow,$M=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,DM="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function dg(){return new RegExp(DM,"u")}a(dg,"emoji");var pg=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,fg=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,mg=a(e=>{let t=Dr(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},"mac"),hg=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,gg=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,yg=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ql=/^[A-Za-z0-9_-]*$/,NM=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,zM=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,vg=/^\+[1-9]\d{6,14}$/,kw="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",_g=new RegExp(`^${kw}$`);function $w(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}a($w,"timeSource");function bg(e){return new RegExp(`^${$w(e)}$`)}a(bg,"time");function Eg(e){let t=$w({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${n.join("|")})`;return new RegExp(`^${kw}T(?:${o})$`)}a(Eg,"datetime");var Sg=a(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Tg=/^-?\d+n?$/,Pg=/^-?\d+$/,Vl=/^-?\d+(?:\.\d+)?$/,wg=/^(?:true|false)$/i,xg=/^null$/i;var Ag=/^undefined$/i;var Ig=/^[^A-Z]*$/,Rg=/^[^a-z]*$/,UM=/^[0-9a-fA-F]*$/;function xs(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}a(xs,"fixedBase64");function As(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}a(As,"fixedBase64url");var MM=/^[0-9a-fA-F]{32}$/,LM=xs(22,"=="),jM=As(22),FM=/^[0-9a-fA-F]{40}$/,BM=xs(27,"="),qM=As(27),VM=/^[0-9a-fA-F]{64}$/,GM=xs(43,"="),HM=As(43),ZM=/^[0-9a-fA-F]{96}$/,WM=xs(64,""),KM=As(64),JM=/^[0-9a-fA-F]{128}$/,YM=xs(86,"=="),XM=As(86);var at=A("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Nw={number:"number",bigint:"bigint",object:"date"},Gl=A("$ZodCheckLessThan",(e,t)=>{at.init(e,t);let n=Nw[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Hl=A("$ZodCheckGreaterThan",(e,t)=>{at.init(e,t);let n=Nw[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Cg=A("$ZodCheckMultipleOf",(e,t)=>{at.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Kh(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Og=A("$ZodCheckNumberFormat",(e,t)=>{at.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),o=n?"int":"number",[r,i]=eg[t.format];e._zod.onattach.push(s=>{let u=s._zod.bag;u.format=t.format,u.minimum=r,u.maximum=i,n&&(u.pattern=Pg)}),e._zod.check=s=>{let u=s.value;if(n){if(!Number.isInteger(u)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?s.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):s.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}u<r&&s.issues.push({origin:"number",input:u,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),u>i&&s.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),kg=A("$ZodCheckBigIntFormat",(e,t)=>{at.init(e,t);let[n,o]=tg[t.format];e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,i.minimum=n,i.maximum=o}),e._zod.check=r=>{let i=r.value;i<n&&r.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),i>o&&r.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),$g=A("$ZodCheckMaxSize",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!fo(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let r=o.value;r.size<=t.maximum||o.issues.push({origin:Ts(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Dg=A("$ZodCheckMinSize",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!fo(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let r=o.value;r.size>=t.minimum||o.issues.push({origin:Ts(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ng=A("$ZodCheckSizeEquals",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!fo(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=o=>{let r=o.value,i=r.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:Ts(r),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),zg=A("$ZodCheckMaxLength",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!fo(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let r=o.value;if(r.length<=t.maximum)return;let s=Ps(r);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ug=A("$ZodCheckMinLength",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!fo(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let r=o.value;if(r.length>=t.minimum)return;let s=Ps(r);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Mg=A("$ZodCheckLengthEquals",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!fo(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=o=>{let r=o.value,i=r.length;if(i===t.length)return;let s=Ps(r),u=i>t.length;o.issues.push({origin:s,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),ra=A("$ZodCheckStringFormat",(e,t)=>{var n,o;at.init(e,t),e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),Lg=A("$ZodCheckRegex",(e,t)=>{ra.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),jg=A("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Ig),ra.init(e,t)}),Fg=A("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Rg),ra.init(e,t)}),Bg=A("$ZodCheckIncludes",(e,t)=>{at.init(e,t);let n=Dr(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(r=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),qg=A("$ZodCheckStartsWith",(e,t)=>{at.init(e,t);let n=new RegExp(`^${Dr(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Vg=A("$ZodCheckEndsWith",(e,t)=>{at.init(e,t);let n=new RegExp(`.*${Dr(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function Dw(e,t,n){e.issues.length&&t.issues.push(...gr(n,e.issues))}a(Dw,"handleCheckPropertyResult");var Gg=A("$ZodCheckProperty",(e,t)=>{at.init(e,t),e._zod.check=n=>{let o=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(r=>Dw(r,n,t.property));Dw(o,n,t.property)}}),Hg=A("$ZodCheckMimeType",(e,t)=>{at.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{n.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),Zg=A("$ZodCheckOverwrite",(e,t)=>{at.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var Is=class{static{a(this,"Doc")}constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
|
|
70
|
+
`).filter(s=>s),r=Math.min(...o.map(s=>s.length-s.trimStart().length)),i=o.map(s=>s.slice(r)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let t=Function,n=this?.args,r=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,r.join(`
|
|
71
|
+
`))}};var Wg={major:4,minor:3,patch:6};var xe=A("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Wg;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let r of o)for(let i of r._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=a((s,u,d)=>{let f=go(s),h;for(let g of u){if(g._zod.def.when){if(!g._zod.def.when(s))continue}else if(f)continue;let m=s.issues.length,p=g._zod.check(s);if(p instanceof Promise&&d?.async===!1)throw new Yr;if(h||p instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await p,s.issues.length!==m&&(f||(f=go(s,m)))});else{if(s.issues.length===m)continue;f||(f=go(s,m))}}return h?h.then(()=>s):s},"runChecks"),i=a((s,u,d)=>{if(go(s))return s.aborted=!0,s;let f=r(u,o,d);if(f instanceof Promise){if(d.async===!1)throw new Yr;return f.then(h=>e._zod.parse(h,d))}return e._zod.parse(f,d)},"handleCanaryResult");e._zod.run=(s,u)=>{if(u.skipChecks)return e._zod.parse(s,u);if(u.direction==="backward"){let f=e._zod.parse({value:s.value,issues:[]},{...u,skipChecks:!0});return f instanceof Promise?f.then(h=>i(h,s,u)):i(f,s,u)}let d=e._zod.parse(s,u);if(d instanceof Promise){if(u.async===!1)throw new Yr;return d.then(f=>r(f,o,u))}return r(d,o,u)}}ze(e,"~standard",()=>({validate:a(r=>{try{let i=Qi(e,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return ta(e,r).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Mn=A("$ZodString",(e,t)=>{xe.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Sg(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Qe=A("$ZodStringFormat",(e,t)=>{ra.init(e,t),Mn.init(e,t)}),Xl=A("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ug),Qe.init(e,t)}),Ql=A("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Yo(o))}else t.pattern??(t.pattern=Yo());Qe.init(e,t)}),ed=A("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=lg),Qe.init(e,t)}),Rs=A("$ZodURL",(e,t)=>{Qe.init(e,t),e._zod.check=n=>{try{let o=n.value.trim(),r=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),td=A("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=dg()),Qe.init(e,t)}),rd=A("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=sg),Qe.init(e,t)}),nd=A("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=rg),Qe.init(e,t)}),od=A("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ng),Qe.init(e,t)}),id=A("$ZodULID",(e,t)=>{t.pattern??(t.pattern=og),Qe.init(e,t)}),ad=A("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ig),Qe.init(e,t)}),sd=A("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=ag),Qe.init(e,t)}),cd=A("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Eg(t)),Qe.init(e,t)}),ud=A("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=_g),Qe.init(e,t)}),ld=A("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=bg(t)),Qe.init(e,t)}),dd=A("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=cg),Qe.init(e,t)}),pd=A("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=pg),Qe.init(e,t),e._zod.bag.format="ipv4"}),fd=A("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=fg),Qe.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),md=A("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=mg(t.delimiter)),Qe.init(e,t),e._zod.bag.format="mac"}),hd=A("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=hg),Qe.init(e,t)}),gd=A("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=gg),Qe.init(e,t),e._zod.check=n=>{let o=n.value.split("/");try{if(o.length!==2)throw new Error;let[r,i]=o;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Jg(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}a(Jg,"isValidBase64");var yd=A("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=yg),Qe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Jg(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Ww(e){if(!ql.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Jg(n)}a(Ww,"isValidBase64URL");var vd=A("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ql),Qe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Ww(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),_d=A("$ZodE164",(e,t)=>{t.pattern??(t.pattern=vg),Qe.init(e,t)});function Kw(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[o]=n;if(!o)return!1;let r=JSON.parse(atob(o));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}a(Kw,"isValidJWT");var bd=A("$ZodJWT",(e,t)=>{Qe.init(e,t),e._zod.check=n=>{Kw(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Ed=A("$ZodCustomStringFormat",(e,t)=>{Qe.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),na=A("$ZodNumber",(e,t)=>{xe.init(e,t),e._zod.pattern=e._zod.bag.pattern??Vl,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let i=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),n}}),Cs=A("$ZodNumberFormat",(e,t)=>{Og.init(e,t),na.init(e,t)}),Xo=A("$ZodBoolean",(e,t)=>{xe.init(e,t),e._zod.pattern=wg,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),oa=A("$ZodBigInt",(e,t)=>{xe.init(e,t),e._zod.pattern=Tg,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Sd=A("$ZodBigIntFormat",(e,t)=>{kg.init(e,t),oa.init(e,t)}),Td=A("$ZodSymbol",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),Pd=A("$ZodUndefined",(e,t)=>{xe.init(e,t),e._zod.pattern=Ag,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),wd=A("$ZodNull",(e,t)=>{xe.init(e,t),e._zod.pattern=xg,e._zod.values=new Set([null]),e._zod.parse=(n,o)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),Os=A("$ZodAny",(e,t)=>{xe.init(e,t),e._zod.parse=n=>n}),ks=A("$ZodUnknown",(e,t)=>{xe.init(e,t),e._zod.parse=n=>n}),xd=A("$ZodNever",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),$s=A("$ZodVoid",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),Ds=A("$ZodDate",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,i=r instanceof Date;return i&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...i?{received:"Invalid Date"}:{},inst:e}),n}});function Uw(e,t,n){e.issues.length&&t.issues.push(...gr(n,e.issues)),t.value[n]=e.value}a(Uw,"handleArrayResult");var Ns=A("$ZodArray",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let i=[];for(let s=0;s<r.length;s++){let u=r[s],d=t.element._zod.run({value:u,issues:[]},o);d instanceof Promise?i.push(d.then(f=>Uw(f,n,s))):Uw(d,n,s)}return i.length?Promise.all(i).then(()=>n):n}});function Yl(e,t,n,o,r){if(e.issues.length){if(r&&!(n in o))return;t.issues.push(...gr(n,e.issues))}e.value===void 0?n in o&&(t.value[n]=void 0):t.value[n]=e.value}a(Yl,"handlePropertyResult");function Jw(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let n=Qh(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}a(Jw,"normalizeDef");function Yw(e,t,n,o,r,i){let s=[],u=r.keySet,d=r.catchall._zod,f=d.def.type,h=d.optout==="optional";for(let g in t){if(u.has(g))continue;if(f==="never"){s.push(g);continue}let m=d.run({value:t[g],issues:[]},o);m instanceof Promise?e.push(m.then(p=>Yl(p,n,g,t,h))):Yl(m,n,g,t,h)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}a(Yw,"handleCatchall");var Ad=A("$ZodObject",(e,t)=>{if(xe.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let u=t.shape;Object.defineProperty(t,"shape",{get:a(()=>{let d={...u};return Object.defineProperty(t,"shape",{value:d}),d},"get")})}let o=Hi(()=>Jw(t));ze(e._zod,"propValues",()=>{let u=t.shape,d={};for(let f in u){let h=u[f]._zod;if(h.values){d[f]??(d[f]=new Set);for(let g of h.values)d[f].add(g)}}return d});let r=Wo,i=t.catchall,s;e._zod.parse=(u,d)=>{s??(s=o.value);let f=u.value;if(!r(f))return u.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),u;u.value={};let h=[],g=s.shape;for(let m of s.keys){let p=g[m],y=p._zod.optout==="optional",v=p._zod.run({value:f[m],issues:[]},d);v instanceof Promise?h.push(v.then(E=>Yl(E,u,m,f,y))):Yl(v,u,m,f,y)}return i?Yw(h,f,u,d,o.value,e):h.length?Promise.all(h).then(()=>u):u}}),Yg=A("$ZodObjectJIT",(e,t)=>{Ad.init(e,t);let n=e._zod.parse,o=Hi(()=>Jw(t)),r=a(m=>{let p=new Is(["shape","payload","ctx"]),y=o.value,v=a(N=>{let Z=Cl(N);return`shape[${Z}]._zod.run({ value: input[${Z}], issues: [] }, ctx)`},"parseStr");p.write("const input = payload.value;");let E=Object.create(null),b=0;for(let N of y.keys)E[N]=`key_${b++}`;p.write("const newResult = {};");for(let N of y.keys){let Z=E[N],H=Cl(N),ee=m[N]?._zod?.optout==="optional";p.write(`const ${Z} = ${v(N)};`),ee?p.write(`
|
|
72
|
+
if (${Z}.issues.length) {
|
|
73
|
+
if (${H} in input) {
|
|
74
|
+
payload.issues = payload.issues.concat(${Z}.issues.map(iss => ({
|
|
75
|
+
...iss,
|
|
76
|
+
path: iss.path ? [${H}, ...iss.path] : [${H}]
|
|
77
|
+
})));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (${Z}.value === undefined) {
|
|
82
|
+
if (${H} in input) {
|
|
83
|
+
newResult[${H}] = undefined;
|
|
84
|
+
}
|
|
85
|
+
} else {
|
|
86
|
+
newResult[${H}] = ${Z}.value;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
`):p.write(`
|
|
90
|
+
if (${Z}.issues.length) {
|
|
91
|
+
payload.issues = payload.issues.concat(${Z}.issues.map(iss => ({
|
|
92
|
+
...iss,
|
|
93
|
+
path: iss.path ? [${H}, ...iss.path] : [${H}]
|
|
94
|
+
})));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (${Z}.value === undefined) {
|
|
98
|
+
if (${H} in input) {
|
|
99
|
+
newResult[${H}] = undefined;
|
|
100
|
+
}
|
|
101
|
+
} else {
|
|
102
|
+
newResult[${H}] = ${Z}.value;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
`)}p.write("payload.value = newResult;"),p.write("return payload;");let k=p.compile();return(N,Z)=>k(m,N,Z)},"generateFastpass"),i,s=Wo,u=!ys.jitless,f=u&&Yh.value,h=t.catchall,g;e._zod.parse=(m,p)=>{g??(g=o.value);let y=m.value;return s(y)?u&&f&&p?.async===!1&&p.jitless!==!0?(i||(i=r(t.shape)),m=i(m,p),h?Yw([],y,m,p,g,e):m):n(m,p):(m.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),m)}});function Mw(e,t,n,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let r=e.filter(i=>!go(i));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>tr(s,o,yt())))}),t)}a(Mw,"handleUnionResults");var Qo=A("$ZodUnion",(e,t)=>{xe.init(e,t),ze(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),ze(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),ze(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),ze(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>Es(i.source)).join("|")})$`)}});let n=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let s=!1,u=[];for(let d of t.options){let f=d._zod.run({value:r.value,issues:[]},i);if(f instanceof Promise)u.push(f),s=!0;else{if(f.issues.length===0)return f;u.push(f)}}return s?Promise.all(u).then(d=>Mw(d,r,e,i)):Mw(u,r,e,i)}});function Lw(e,t,n,o){let r=e.filter(i=>i.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>tr(s,o,yt())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}a(Lw,"handleExclusiveUnionResults");var Id=A("$ZodXor",(e,t)=>{Qo.init(e,t),t.inclusive=!1;let n=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let s=!1,u=[];for(let d of t.options){let f=d._zod.run({value:r.value,issues:[]},i);f instanceof Promise?(u.push(f),s=!0):u.push(f)}return s?Promise.all(u).then(d=>Lw(d,r,e,i)):Lw(u,r,e,i)}}),zs=A("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Qo.init(e,t);let n=e._zod.parse;ze(e._zod,"propValues",()=>{let r={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[u,d]of Object.entries(s)){r[u]||(r[u]=new Set);for(let f of d)r[u].add(f)}}return r});let o=Hi(()=>{let r=t.options,i=new Map;for(let s of r){let u=s._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let d of u){if(i.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);i.set(d,s)}}return i});e._zod.parse=(r,i)=>{let s=r.value;if(!Wo(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),r;let u=o.value.get(s?.[t.discriminator]);return u?u._zod.run(r,i):t.unionFallback?n(r,i):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),r)}}),Rd=A("$ZodIntersection",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{let r=n.value,i=t.left._zod.run({value:r,issues:[]},o),s=t.right._zod.run({value:r,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([d,f])=>jw(n,d,f)):jw(n,i,s)}});function Kg(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ho(e)&&ho(t)){let n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),r={...e,...t};for(let i of o){let s=Kg(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r[i]=s.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let o=0;o<e.length;o++){let r=e[o],i=t[o],s=Kg(r,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}a(Kg,"mergeValues");function jw(e,t,n){let o=new Map,r;for(let u of t.issues)if(u.code==="unrecognized_keys"){r??(r=u);for(let d of u.keys)o.has(d)||o.set(d,{}),o.get(d).l=!0}else e.issues.push(u);for(let u of n.issues)if(u.code==="unrecognized_keys")for(let d of u.keys)o.has(d)||o.set(d,{}),o.get(d).r=!0;else e.issues.push(u);let i=[...o].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(i.length&&r&&e.issues.push({...r,keys:i}),go(e))return e;let s=Kg(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}a(jw,"handleIntersectionResults");var Us=A("$ZodTuple",(e,t)=>{xe.init(e,t);let n=t.items;e._zod.parse=(o,r)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let s=[],u=[...n].reverse().findIndex(h=>h._zod.optin!=="optional"),d=u===-1?0:n.length-u;if(!t.rest){let h=i.length>n.length,g=i.length<d-1;if(h||g)return o.issues.push({...h?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:i,inst:e,origin:"array"}),o}let f=-1;for(let h of n){if(f++,f>=i.length&&f>=d)continue;let g=h._zod.run({value:i[f],issues:[]},r);g instanceof Promise?s.push(g.then(m=>Zl(m,o,f))):Zl(g,o,f)}if(t.rest){let h=i.slice(n.length);for(let g of h){f++;let m=t.rest._zod.run({value:g,issues:[]},r);m instanceof Promise?s.push(m.then(p=>Zl(p,o,f))):Zl(m,o,f)}}return s.length?Promise.all(s).then(()=>o):o}});function Zl(e,t,n){e.issues.length&&t.issues.push(...gr(n,e.issues)),t.value[n]=e.value}a(Zl,"handleTupleResult");var Ms=A("$ZodRecord",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!ho(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let i=[],s=t.keyType._zod.values;if(s){n.value={};let u=new Set;for(let f of s)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){u.add(typeof f=="number"?f.toString():f);let h=t.valueType._zod.run({value:r[f],issues:[]},o);h instanceof Promise?i.push(h.then(g=>{g.issues.length&&n.issues.push(...gr(f,g.issues)),n.value[f]=g.value})):(h.issues.length&&n.issues.push(...gr(f,h.issues)),n.value[f]=h.value)}let d;for(let f in r)u.has(f)||(d=d??[],d.push(f));d&&d.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:d})}else{n.value={};for(let u of Reflect.ownKeys(r)){if(u==="__proto__")continue;let d=t.keyType._zod.run({value:u,issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&Vl.test(u)&&d.issues.length){let g=t.keyType._zod.run({value:Number(u),issues:[]},o);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");g.issues.length===0&&(d=g)}if(d.issues.length){t.mode==="loose"?n.value[u]=r[u]:n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(g=>tr(g,o,yt())),input:u,path:[u],inst:e});continue}let h=t.valueType._zod.run({value:r[u],issues:[]},o);h instanceof Promise?i.push(h.then(g=>{g.issues.length&&n.issues.push(...gr(u,g.issues)),n.value[d.value]=g.value})):(h.issues.length&&n.issues.push(...gr(u,h.issues)),n.value[d.value]=h.value)}}return i.length?Promise.all(i).then(()=>n):n}}),Cd=A("$ZodMap",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let i=[];n.value=new Map;for(let[s,u]of r){let d=t.keyType._zod.run({value:s,issues:[]},o),f=t.valueType._zod.run({value:u,issues:[]},o);d instanceof Promise||f instanceof Promise?i.push(Promise.all([d,f]).then(([h,g])=>{Fw(h,g,n,s,r,e,o)})):Fw(d,f,n,s,r,e,o)}return i.length?Promise.all(i).then(()=>n):n}});function Fw(e,t,n,o,r,i,s){e.issues.length&&(Ss.has(typeof o)?n.issues.push(...gr(o,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:i,issues:e.issues.map(u=>tr(u,s,yt()))})),t.issues.length&&(Ss.has(typeof o)?n.issues.push(...gr(o,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:i,key:o,issues:t.issues.map(u=>tr(u,s,yt()))})),n.value.set(e.value,t.value)}a(Fw,"handleMapResult");var Od=A("$ZodSet",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let s of r){let u=t.valueType._zod.run({value:s,issues:[]},o);u instanceof Promise?i.push(u.then(d=>Bw(d,n))):Bw(u,n)}return i.length?Promise.all(i).then(()=>n):n}});function Bw(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}a(Bw,"handleSetResult");var Ls=A("$ZodEnum",(e,t)=>{xe.init(e,t);let n=bs(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(r=>Ss.has(typeof r)).map(r=>typeof r=="string"?Dr(r):r.toString()).join("|")})$`),e._zod.parse=(r,i)=>{let s=r.value;return o.has(s)||r.issues.push({code:"invalid_value",values:n,input:s,inst:e}),r}}),js=A("$ZodLiteral",(e,t)=>{if(xe.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?Dr(o):o?Dr(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,r)=>{let i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),kd=A("$ZodFile",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),Fs=A("$ZodTransform",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new po(e.constructor.name);let r=t.transform(n.value,n);if(o.async)return(r instanceof Promise?r:Promise.resolve(r)).then(s=>(n.value=s,n));if(r instanceof Promise)throw new Yr;return n.value=r,n}});function qw(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}a(qw,"handleOptionalResult");var ia=A("$ZodOptional",(e,t)=>{xe.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ze(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ze(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Es(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>qw(i,n.value)):qw(r,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),$d=A("$ZodExactOptional",(e,t)=>{ia.init(e,t),ze(e._zod,"values",()=>t.innerType._zod.values),ze(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),Bs=A("$ZodNullable",(e,t)=>{xe.init(e,t),ze(e._zod,"optin",()=>t.innerType._zod.optin),ze(e._zod,"optout",()=>t.innerType._zod.optout),ze(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Es(n.source)}|null)$`):void 0}),ze(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),Dd=A("$ZodDefault",(e,t)=>{xe.init(e,t),e._zod.optin="optional",ze(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>Vw(i,t)):Vw(r,t)}});function Vw(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}a(Vw,"handleDefaultResult");var Nd=A("$ZodPrefault",(e,t)=>{xe.init(e,t),e._zod.optin="optional",ze(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),zd=A("$ZodNonOptional",(e,t)=>{xe.init(e,t),ze(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>Gw(i,e)):Gw(r,e)}});function Gw(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}a(Gw,"handleNonOptionalResult");var Ud=A("$ZodSuccess",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new po("ZodSuccess");let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),Md=A("$ZodCatch",(e,t)=>{xe.init(e,t),ze(e._zod,"optin",()=>t.innerType._zod.optin),ze(e._zod,"optout",()=>t.innerType._zod.optout),ze(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>tr(s,o,yt()))},input:n.value}),n.issues=[]),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(i=>tr(i,o,yt()))},input:n.value}),n.issues=[]),n)}}),Ld=A("$ZodNaN",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),qs=A("$ZodPipe",(e,t)=>{xe.init(e,t),ze(e._zod,"values",()=>t.in._zod.values),ze(e._zod,"optin",()=>t.in._zod.optin),ze(e._zod,"optout",()=>t.out._zod.optout),ze(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(s=>Wl(s,t.in,o)):Wl(i,t.in,o)}let r=t.in._zod.run(n,o);return r instanceof Promise?r.then(i=>Wl(i,t.out,o)):Wl(r,t.out,o)}});function Wl(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}a(Wl,"handlePipeResult");var aa=A("$ZodCodec",(e,t)=>{xe.init(e,t),ze(e._zod,"values",()=>t.in._zod.values),ze(e._zod,"optin",()=>t.in._zod.optin),ze(e._zod,"optout",()=>t.out._zod.optout),ze(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(n,o);return i instanceof Promise?i.then(s=>Kl(s,t,o)):Kl(i,t,o)}else{let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(s=>Kl(s,t,o)):Kl(i,t,o)}}});function Kl(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(i=>Jl(e,i,t.out,n)):Jl(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(i=>Jl(e,i,t.in,n)):Jl(e,r,t.in,n)}}a(Kl,"handleCodecAResult");function Jl(e,t,n,o){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},o)}a(Jl,"handleCodecTxResult");var jd=A("$ZodReadonly",(e,t)=>{xe.init(e,t),ze(e._zod,"propValues",()=>t.innerType._zod.propValues),ze(e._zod,"values",()=>t.innerType._zod.values),ze(e._zod,"optin",()=>t.innerType?._zod?.optin),ze(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(Hw):Hw(r)}});function Hw(e){return e.value=Object.freeze(e.value),e}a(Hw,"handleReadonlyResult");var Fd=A("$ZodTemplateLiteral",(e,t)=>{xe.init(e,t);let n=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let r=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=r.startsWith("^")?1:0,s=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(i,s))}else if(o===null||Xh.has(typeof o))n.push(Dr(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(o,r)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),Bd=A("$ZodFunction",(e,t)=>(xe.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...o){let r=e._def.input?Ko(e._def.input,o):o,i=Reflect.apply(n,this,r);return e._def.output?Ko(e._def.output,i):i}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let r=e._def.input?await Jo(e._def.input,o):o,i=await Reflect.apply(n,this,r);return e._def.output?await Jo(e._def.output,i):i}},e._zod.parse=(n,o)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let o=e.constructor;return Array.isArray(n[0])?new o({type:"function",input:new Us({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new o({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:n})},e)),qd=A("$ZodPromise",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},o))}),Vd=A("$ZodLazy",(e,t)=>{xe.init(e,t),ze(e._zod,"innerType",()=>t.getter()),ze(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),ze(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),ze(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),ze(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),Vs=A("$ZodCustom",(e,t)=>{at.init(e,t),xe.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{let o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then(i=>Zw(i,n,o,e));Zw(r,n,o,e)}});function Zw(e,t,n,o){if(!e){let r={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(r.params=o._zod.def.params),t.issues.push(Zi(r))}}a(Zw,"handleRefineResult");var ca={};hr(ca,{ar:()=>Xg,az:()=>Qg,be:()=>ey,bg:()=>ty,ca:()=>ry,cs:()=>ny,da:()=>oy,de:()=>iy,en:()=>Gs,eo:()=>ay,es:()=>sy,fa:()=>cy,fi:()=>uy,fr:()=>ly,frCA:()=>dy,he:()=>py,hu:()=>fy,hy:()=>my,id:()=>hy,is:()=>gy,it:()=>yy,ja:()=>vy,ka:()=>_y,kh:()=>by,km:()=>Hs,ko:()=>Ey,lt:()=>Sy,mk:()=>Ty,ms:()=>Py,nl:()=>wy,no:()=>xy,ota:()=>Ay,pl:()=>Ry,ps:()=>Iy,pt:()=>Cy,ru:()=>Oy,sl:()=>ky,sv:()=>$y,ta:()=>Dy,th:()=>Ny,tr:()=>zy,ua:()=>Uy,uk:()=>Ws,ur:()=>My,uz:()=>Ly,vi:()=>jy,yo:()=>qy,zhCN:()=>Fy,zhTW:()=>By});var e1=a(()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${u}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${u}`}case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${re(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${n[i.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${B(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}},"error");function Xg(){return{localeError:e1()}}a(Xg,"default");var t1=a(()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${u}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${u}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${re(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[i.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${B(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}},"error");function Qg(){return{localeError:t1()}}a(Qg,"default");function Xw(e,t,n,o){let r=Math.abs(e),i=r%10,s=r%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?n:o}a(Xw,"getBelarusianPlural");var r1=a(()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${u}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${u}`}case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${re(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let u=Number(r.maximum),d=Xw(u,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${r.maximum.toString()} ${d}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);if(s){let u=Number(r.minimum),d=Xw(u,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${r.minimum.toString()} ${d}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${B(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}},"error");function ey(){return{localeError:r1()}}a(ey,"default");var n1=a(()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${u}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${u}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${re(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${r.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${n[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${B(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}},"error");function ty(){return{localeError:n1()}}a(ty,"default");var o1=a(()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${u}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${u}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${re(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${B(r.values," o ")}`;case"too_big":{let i=r.inclusive?"com a m\xE0xim":"menys de",s=t(r.origin);return s?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${i} ${r.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(r.origin);return s?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${i} ${r.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${n[i.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${B(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}},"error");function ry(){return{localeError:o1()}}a(ry,"default");var i1=a(()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${u}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${u}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${re(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${n[i.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${B(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}},"error");function ny(){return{localeError:i1()}}a(ny,"default");var a1=a(()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${u}`:`Ugyldigt input: forventede ${i}, fik ${u}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${re(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin),u=o[r.origin]??r.origin;return s?`For stor: forventede ${u??"value"} ${s.verb} ${i} ${r.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${u??"value"} havde ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin),u=o[r.origin]??r.origin;return s?`For lille: forventede ${u} ${s.verb} ${i} ${r.minimum.toString()} ${s.unit}`:`For lille: forventede ${u} havde ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${B(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}},"error");function oy(){return{localeError:a1()}}a(oy,"default");var s1=a(()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${u}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${u}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${re(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ist`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ist`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${n[i.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${B(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}},"error");function iy(){return{localeError:s1()}}a(iy,"default");var c1=a(()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return`Invalid input: expected ${i}, received ${u}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${re(r.values[0])}`:`Invalid option: expected one of ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Too big: expected ${r.origin??"value"} to have ${i}${r.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Too small: expected ${r.origin} to have ${i}${r.minimum.toString()} ${s.unit}`:`Too small: expected ${r.origin} to be ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${n[i.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${B(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}},"error");function Gs(){return{localeError:c1()}}a(Gs,"default");var u1=a(()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${u}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${u}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${re(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${i}${r.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${n[i.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${B(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}},"error");function ay(){return{localeError:u1()}}a(ay,"default");var l1=a(()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${u}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${u}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${re(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin),u=o[r.origin]??r.origin;return s?`Demasiado grande: se esperaba que ${u??"valor"} tuviera ${i}${r.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${u??"valor"} fuera ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin),u=o[r.origin]??r.origin;return s?`Demasiado peque\xF1o: se esperaba que ${u} tuviera ${i}${r.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${u} fuera ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${n[i.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${B(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}},"error");function sy(){return{localeError:l1()}}a(sy,"default");var d1=a(()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${u} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${u} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${re(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${B(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[i.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${B(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}},"error");function cy(){return{localeError:d1()}}a(cy,"default");var p1=a(()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${u}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${u}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${re(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${r.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${r.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${n[i.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${B(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}},"error");function uy(){return{localeError:p1()}}a(uy,"default");var f1=a(()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN",number:"nombre",array:"tableau"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${u} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${u} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${re(r.values[0])} attendu`:`Option invalide : une valeur parmi ${B(r.values,"|")} attendue`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Trop grand : ${r.origin??"valeur"} doit ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${r.origin??"valeur"} doit \xEAtre ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Trop petit : ${r.origin} doit ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`Trop petit : ${r.origin} doit \xEAtre ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${n[i.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${B(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}},"error");function ly(){return{localeError:f1()}}a(ly,"default");var m1=a(()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${u}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${u}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${re(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"\u2264":"<",s=t(r.origin);return s?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${i}${r.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"\u2265":">",s=t(r.origin);return s?`Trop petit : attendu que ${r.origin} ait ${i}${r.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${r.origin} soit ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${n[i.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${B(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}},"error");function dy(){return{localeError:m1()}}a(dy,"default");var h1=a(()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=a(f=>f?e[f]:void 0,"typeEntry"),o=a(f=>{let h=n(f);return h?h.label:f??e.unknown.label},"typeLabel"),r=a(f=>`\u05D4${o(f)}`,"withDefinite"),i=a(f=>(n(f)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA","verbFor"),s=a(f=>f?t[f]??null:null,"getSizing"),u={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},d={nan:"NaN"};return f=>{switch(f.code){case"invalid_type":{let h=f.expected,g=d[h??""]??o(h),m=ie(f.input),p=d[m]??e[m]?.label??m;return/^[A-Z]/.test(f.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${f.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${g}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`}case"invalid_value":{if(f.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${re(f.values[0])}`;let h=f.values.map(p=>re(p));if(f.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${h[0]} \u05D0\u05D5 ${h[1]}`;let g=h[h.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${h.slice(0,-1).join(", ")} \u05D0\u05D5 ${g}`}case"too_big":{let h=s(f.origin),g=r(f.origin??"value");if(f.origin==="string")return`${h?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${g} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${f.maximum.toString()} ${h?.unit??""} ${f.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(f.origin==="number"){let y=f.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${f.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${f.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${g} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${y}`}if(f.origin==="array"||f.origin==="set"){let y=f.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",v=f.inclusive?`${f.maximum} ${h?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${f.maximum} ${h?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${g} ${y} \u05DC\u05D4\u05DB\u05D9\u05DC ${v}`.trim()}let m=f.inclusive?"<=":"<",p=i(f.origin??"value");return h?.unit?`${h.longLabel} \u05DE\u05D3\u05D9: ${g} ${p} ${m}${f.maximum.toString()} ${h.unit}`:`${h?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${g} ${p} ${m}${f.maximum.toString()}`}case"too_small":{let h=s(f.origin),g=r(f.origin??"value");if(f.origin==="string")return`${h?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${g} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${f.minimum.toString()} ${h?.unit??""} ${f.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(f.origin==="number"){let y=f.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${f.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${f.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${g} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${y}`}if(f.origin==="array"||f.origin==="set"){let y=f.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(f.minimum===1&&f.inclusive){let E=(f.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${g} ${y} \u05DC\u05D4\u05DB\u05D9\u05DC ${E}`}let v=f.inclusive?`${f.minimum} ${h?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${f.minimum} ${h?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${g} ${y} \u05DC\u05D4\u05DB\u05D9\u05DC ${v}`.trim()}let m=f.inclusive?">=":">",p=i(f.origin??"value");return h?.unit?`${h.shortLabel} \u05DE\u05D3\u05D9: ${g} ${p} ${m}${f.minimum.toString()} ${h.unit}`:`${h?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${g} ${p} ${m}${f.minimum.toString()}`}case"invalid_format":{let h=f;if(h.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${h.prefix}"`;if(h.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${h.suffix}"`;if(h.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${h.includes}"`;if(h.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${h.pattern}`;let g=u[h.format],m=g?.label??h.format,y=(g?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${m} \u05DC\u05D0 ${y}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${f.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${f.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${f.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${B(f.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r(f.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}},"error");function py(){return{localeError:h1()}}a(py,"default");var g1=a(()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${u}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${u}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${re(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${r.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${i}${r.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[i.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${B(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}},"error");function fy(){return{localeError:g1()}}a(fy,"default");function Qw(e,t,n){return Math.abs(e)===1?t:n}a(Qw,"getArmenianPlural");function sa(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}a(sa,"withDefiniteArticle");var y1=a(()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${u}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${u}`}case"invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${re(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let u=Number(r.maximum),d=Qw(u,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${sa(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.maximum.toString()} ${d}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${sa(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);if(s){let u=Number(r.minimum),d=Qw(u,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${sa(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.minimum.toString()} ${d}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${sa(r.origin)} \u056C\u056B\u0576\u056B ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[i.format]??r.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${B(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${sa(r.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${sa(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}},"error");function my(){return{localeError:y1()}}a(my,"default");var v1=a(()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${u}`:`Input tidak valid: diharapkan ${i}, diterima ${u}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${re(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${i}${r.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Terlalu kecil: diharapkan ${r.origin} memiliki ${i}${r.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${n[i.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${B(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}},"error");function hy(){return{localeError:v1()}}a(hy,"default");var _1=a(()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${u} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${u} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${re(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${i}${r.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${i}${r.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${n[i.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${B(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}},"error");function gy(){return{localeError:_1()}}a(gy,"default");var b1=a(()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${u}`:`Input non valido: atteso ${i}, ricevuto ${u}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${re(r.values[0])}`:`Opzione non valida: atteso uno tra ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Troppo grande: ${r.origin??"valore"} deve avere ${i}${r.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Troppo piccolo: ${r.origin} deve avere ${i}${r.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${r.origin} deve essere ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${n[i.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${B(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}},"error");function yy(){return{localeError:b1()}}a(yy,"default");var E1=a(()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${u}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${u}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${re(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${B(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(r.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(r.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[i.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${B(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}},"error");function vy(){return{localeError:E1()}}a(vy,"default");var S1=a(()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${u}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${u}`}case"invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${re(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${B(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${B(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}},"error");function _y(){return{localeError:S1()}}a(_y,"default");var T1=a(()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},o={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${u}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${u}`}case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${re(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${B(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}},"error");function Hs(){return{localeError:T1()}}a(Hs,"default");function by(){return Hs()}a(by,"default");var P1=a(()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${u}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${u}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${re(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${B(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",u=t(r.origin),d=u?.unit??"\uC694\uC18C";return u?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${d} ${i}${s}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${i}${s}`}case"too_small":{let i=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",u=t(r.origin),d=u?.unit??"\uC694\uC18C";return u?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${d} ${i}${s}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${i}${s}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[i.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${B(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}},"error");function Ey(){return{localeError:P1()}}a(Ey,"default");var Zs=a(e=>e.charAt(0).toUpperCase()+e.slice(1),"capitalizeFirstCharacter");function ex(e){let t=Math.abs(e),n=t%10,o=t%100;return o>=11&&o<=19||n===0?"many":n===1?"one":"few"}a(ex,"getUnitTypeFromNumber");var w1=a(()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(r,i,s,u){let d=e[r]??null;return d===null?d:{unit:d.unit[i],verb:d.verb[u][s?"inclusive":"notInclusive"]}}a(t,"getSizing");let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},o={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${u}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${u}, o tik\u0117tasi - ${i}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${re(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${B(r.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[r.origin]??r.origin,s=t(r.origin,ex(Number(r.maximum)),r.inclusive??!1,"smaller");if(s?.verb)return`${Zs(i??r.origin??"reik\u0161m\u0117")} ${s.verb} ${r.maximum.toString()} ${s.unit??"element\u0173"}`;let u=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Zs(i??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${u} ${r.maximum.toString()} ${s?.unit}`}case"too_small":{let i=o[r.origin]??r.origin,s=t(r.origin,ex(Number(r.minimum)),r.inclusive??!1,"bigger");if(s?.verb)return`${Zs(i??r.origin??"reik\u0161m\u0117")} ${s.verb} ${r.minimum.toString()} ${s.unit??"element\u0173"}`;let u=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Zs(i??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${u} ${r.minimum.toString()} ${s?.unit}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${n[i.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${B(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=o[r.origin]??r.origin;return`${Zs(i??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}},"error");function Sy(){return{localeError:w1()}}a(Sy,"default");var x1=a(()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${u}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${u}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${re(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${n[i.format]??r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${B(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}},"error");function Ty(){return{localeError:x1()}}a(Ty,"default");var A1=a(()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${u}`:`Input tidak sah: dijangka ${i}, diterima ${u}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${re(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Terlalu besar: dijangka ${r.origin??"nilai"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Terlalu kecil: dijangka ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${n[i.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${B(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}},"error");function Py(){return{localeError:A1()}}a(Py,"default");var I1=a(()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${u}`:`Ongeldige invoer: verwacht ${i}, ontving ${u}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${re(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin),u=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return s?`Te ${u}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${u}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} is`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin),u=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return s?`Te ${u}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${u}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} is`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${n[i.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${B(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}},"error");function wy(){return{localeError:I1()}}a(wy,"default");var R1=a(()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${u}`:`Ugyldig input: forventet ${i}, fikk ${u}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${re(r.values[0])}`:`Ugyldig valg: forventet en av ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${B(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}},"error");function xy(){return{localeError:R1()}}a(xy,"default");var C1=a(()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${u}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${u}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${re(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=r;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[i.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${B(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}},"error");function Ay(){return{localeError:C1()}}a(Ay,"default");var O1=a(()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${u} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${u} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${re(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${B(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[i.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${B(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}},"error");function Iy(){return{localeError:O1()}}a(Iy,"default");var k1=a(()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},o={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${u}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${u}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${re(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[i.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${B(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}},"error");function Ry(){return{localeError:k1()}}a(Ry,"default");var $1=a(()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${u}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${u}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${re(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${i}${r.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Muito pequeno: esperado que ${r.origin} tivesse ${i}${r.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${n[i.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${B(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}},"error");function Cy(){return{localeError:$1()}}a(Cy,"default");function tx(e,t,n,o){let r=Math.abs(e),i=r%10,s=r%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?n:o}a(tx,"getRussianPlural");var D1=a(()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${u}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${u}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${re(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let u=Number(r.maximum),d=tx(u,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.maximum.toString()} ${d}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);if(s){let u=Number(r.minimum),d=tx(u,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.minimum.toString()} ${d}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${B(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}},"error");function Oy(){return{localeError:D1()}}a(Oy,"default");var N1=a(()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${u}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${u}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${re(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${i}${r.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${i}${r.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${n[i.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${B(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}},"error");function ky(){return{localeError:N1()}}a(ky,"default");var z1=a(()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${u}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${u}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${re(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${n[i.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${B(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}},"error");function $y(){return{localeError:z1()}}a($y,"default");var U1=a(()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u}`}case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${re(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${B(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${i}${r.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${i}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${B(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}},"error");function Dy(){return{localeError:U1()}}a(Dy,"default");var M1=a(()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},o={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${u}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${u}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${re(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(r.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(r.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[i.format]??r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${B(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}},"error");function Ny(){return{localeError:M1()}}a(Ny,"default");var L1=a(()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${u}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${u}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${re(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${i}${r.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[i.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${B(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}},"error");function zy(){return{localeError:L1()}}a(zy,"default");var j1=a(()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${u}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${u}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${re(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${B(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}},"error");function Ws(){return{localeError:j1()}}a(Ws,"default");function Uy(){return Ws()}a(Uy,"default");var F1=a(()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${u} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${u} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${re(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${B(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${i}${r.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${i}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${B(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}},"error");function My(){return{localeError:F1()}}a(My,"default");var B1=a(()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${u}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${u}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${re(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[i.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${B(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}},"error");function Ly(){return{localeError:B1()}}a(Ly,"default");var q1=a(()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${u}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${u}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${re(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${n[i.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${B(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}},"error");function jy(){return{localeError:q1()}}a(jy,"default");var V1=a(()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${u}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${u}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${re(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${n[i.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${B(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}},"error");function Fy(){return{localeError:V1()}}a(Fy,"default");var G1=a(()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${u}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${u}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${re(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${B(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}},"error");function By(){return{localeError:G1()}}a(By,"default");var H1=a(()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}a(t,"getSizing");let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=ie(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${u}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${u}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${re(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${s.verb} ${i}${r.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.maximum}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${s.verb} ${i}${r.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.minimum}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${n[i.format]??r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${B(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}},"error");function qy(){return{localeError:H1()}}a(qy,"default");var rx,Hd=Symbol("ZodOutput"),Zd=Symbol("ZodInput"),Gd=class{static{a(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let o={...this.get(n)??{}};delete o.id;let r={...o,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Ks(){return new Gd}a(Ks,"registry");(rx=globalThis).__zod_globalRegistry??(rx.__zod_globalRegistry=Ks());var Nt=globalThis.__zod_globalRegistry;function Js(e,t){return new e({type:"string",...te(t)})}a(Js,"_string");function Ys(e,t){return new e({type:"string",coerce:!0,...te(t)})}a(Ys,"_coercedString");function Xs(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...te(t)})}a(Xs,"_email");function ua(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...te(t)})}a(ua,"_guid");function Qs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...te(t)})}a(Qs,"_uuid");function ec(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...te(t)})}a(ec,"_uuidv4");function tc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...te(t)})}a(tc,"_uuidv6");function rc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...te(t)})}a(rc,"_uuidv7");function ei(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...te(t)})}a(ei,"_url");function nc(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...te(t)})}a(nc,"_emoji");function oc(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...te(t)})}a(oc,"_nanoid");function ic(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...te(t)})}a(ic,"_cuid");function ac(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...te(t)})}a(ac,"_cuid2");function sc(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...te(t)})}a(sc,"_ulid");function cc(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...te(t)})}a(cc,"_xid");function uc(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...te(t)})}a(uc,"_ksuid");function lc(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...te(t)})}a(lc,"_ipv4");function dc(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...te(t)})}a(dc,"_ipv6");function Wd(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...te(t)})}a(Wd,"_mac");function pc(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...te(t)})}a(pc,"_cidrv4");function fc(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...te(t)})}a(fc,"_cidrv6");function mc(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...te(t)})}a(mc,"_base64");function hc(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...te(t)})}a(hc,"_base64url");function gc(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...te(t)})}a(gc,"_e164");function yc(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...te(t)})}a(yc,"_jwt");var Kd={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Jd(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...te(t)})}a(Jd,"_isoDateTime");function Yd(e,t){return new e({type:"string",format:"date",check:"string_format",...te(t)})}a(Yd,"_isoDate");function Xd(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...te(t)})}a(Xd,"_isoTime");function Qd(e,t){return new e({type:"string",format:"duration",check:"string_format",...te(t)})}a(Qd,"_isoDuration");function vc(e,t){return new e({type:"number",checks:[],...te(t)})}a(vc,"_number");function _c(e,t){return new e({type:"number",coerce:!0,checks:[],...te(t)})}a(_c,"_coercedNumber");function bc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...te(t)})}a(bc,"_int");function ep(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...te(t)})}a(ep,"_float32");function tp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...te(t)})}a(tp,"_float64");function rp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...te(t)})}a(rp,"_int32");function np(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...te(t)})}a(np,"_uint32");function Ec(e,t){return new e({type:"boolean",...te(t)})}a(Ec,"_boolean");function Sc(e,t){return new e({type:"boolean",coerce:!0,...te(t)})}a(Sc,"_coercedBoolean");function op(e,t){return new e({type:"bigint",...te(t)})}a(op,"_bigint");function Tc(e,t){return new e({type:"bigint",coerce:!0,...te(t)})}a(Tc,"_coercedBigint");function ip(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...te(t)})}a(ip,"_int64");function ap(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...te(t)})}a(ap,"_uint64");function sp(e,t){return new e({type:"symbol",...te(t)})}a(sp,"_symbol");function cp(e,t){return new e({type:"undefined",...te(t)})}a(cp,"_undefined");function up(e,t){return new e({type:"null",...te(t)})}a(up,"_null");function Pc(e){return new e({type:"any"})}a(Pc,"_any");function wc(e){return new e({type:"unknown"})}a(wc,"_unknown");function lp(e,t){return new e({type:"never",...te(t)})}a(lp,"_never");function xc(e,t){return new e({type:"void",...te(t)})}a(xc,"_void");function dp(e,t){return new e({type:"date",...te(t)})}a(dp,"_date");function Ac(e,t){return new e({type:"date",coerce:!0,...te(t)})}a(Ac,"_coercedDate");function pp(e,t){return new e({type:"nan",...te(t)})}a(pp,"_nan");function Xr(e,t){return new Gl({check:"less_than",...te(t),value:e,inclusive:!1})}a(Xr,"_lt");function Jt(e,t){return new Gl({check:"less_than",...te(t),value:e,inclusive:!0})}a(Jt,"_lte");function Qr(e,t){return new Hl({check:"greater_than",...te(t),value:e,inclusive:!1})}a(Qr,"_gt");function Ct(e,t){return new Hl({check:"greater_than",...te(t),value:e,inclusive:!0})}a(Ct,"_gte");function Ic(e){return Qr(0,e)}a(Ic,"_positive");function Rc(e){return Xr(0,e)}a(Rc,"_negative");function Cc(e){return Jt(0,e)}a(Cc,"_nonpositive");function Oc(e){return Ct(0,e)}a(Oc,"_nonnegative");function Ln(e,t){return new Cg({check:"multiple_of",...te(t),value:e})}a(Ln,"_multipleOf");function jn(e,t){return new $g({check:"max_size",...te(t),maximum:e})}a(jn,"_maxSize");function en(e,t){return new Dg({check:"min_size",...te(t),minimum:e})}a(en,"_minSize");function yo(e,t){return new Ng({check:"size_equals",...te(t),size:e})}a(yo,"_size");function vo(e,t){return new zg({check:"max_length",...te(t),maximum:e})}a(vo,"_maxLength");function Tt(e,t){return new Ug({check:"min_length",...te(t),minimum:e})}a(Tt,"_minLength");function _o(e,t){return new Mg({check:"length_equals",...te(t),length:e})}a(_o,"_length");function Ft(e,t){return new Lg({check:"string_format",format:"regex",...te(t),pattern:e})}a(Ft,"_regex");function ti(e){return new jg({check:"string_format",format:"lowercase",...te(e)})}a(ti,"_lowercase");function ri(e){return new Fg({check:"string_format",format:"uppercase",...te(e)})}a(ri,"_uppercase");function ni(e,t){return new Bg({check:"string_format",format:"includes",...te(t),includes:e})}a(ni,"_includes");function oi(e,t){return new qg({check:"string_format",format:"starts_with",...te(t),prefix:e})}a(oi,"_startsWith");function ii(e,t){return new Vg({check:"string_format",format:"ends_with",...te(t),suffix:e})}a(ii,"_endsWith");function kc(e,t,n){return new Gg({check:"property",property:e,schema:t,...te(n)})}a(kc,"_property");function ai(e,t){return new Hg({check:"mime_type",mime:e,...te(t)})}a(ai,"_mime");function Nr(e){return new Zg({check:"overwrite",tx:e})}a(Nr,"_overwrite");function si(e){return Nr(t=>t.normalize(e))}a(si,"_normalize");function ci(){return Nr(e=>e.trim())}a(ci,"_trim");function ui(){return Nr(e=>e.toLowerCase())}a(ui,"_toLowerCase");function li(){return Nr(e=>e.toUpperCase())}a(li,"_toUpperCase");function la(){return Nr(e=>Jh(e))}a(la,"_slugify");function Vy(e,t,n){return new e({type:"array",element:t,...te(n)})}a(Vy,"_array");function W1(e,t,n){return new e({type:"union",options:t,...te(n)})}a(W1,"_union");function K1(e,t,n){return new e({type:"union",options:t,inclusive:!1,...te(n)})}a(K1,"_xor");function J1(e,t,n,o){return new e({type:"union",options:n,discriminator:t,...te(o)})}a(J1,"_discriminatedUnion");function Y1(e,t,n){return new e({type:"intersection",left:t,right:n})}a(Y1,"_intersection");function X1(e,t,n,o){let r=n instanceof xe,i=r?o:n,s=r?n:null;return new e({type:"tuple",items:t,rest:s,...te(i)})}a(X1,"_tuple");function Q1(e,t,n,o){return new e({type:"record",keyType:t,valueType:n,...te(o)})}a(Q1,"_record");function eL(e,t,n,o){return new e({type:"map",keyType:t,valueType:n,...te(o)})}a(eL,"_map");function tL(e,t,n){return new e({type:"set",valueType:t,...te(n)})}a(tL,"_set");function rL(e,t,n){let o=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:o,...te(n)})}a(rL,"_enum");function nL(e,t,n){return new e({type:"enum",entries:t,...te(n)})}a(nL,"_nativeEnum");function oL(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...te(n)})}a(oL,"_literal");function fp(e,t){return new e({type:"file",...te(t)})}a(fp,"_file");function iL(e,t){return new e({type:"transform",transform:t})}a(iL,"_transform");function aL(e,t){return new e({type:"optional",innerType:t})}a(aL,"_optional");function sL(e,t){return new e({type:"nullable",innerType:t})}a(sL,"_nullable");function cL(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():kl(n)}})}a(cL,"_default");function uL(e,t,n){return new e({type:"nonoptional",innerType:t,...te(n)})}a(uL,"_nonoptional");function lL(e,t){return new e({type:"success",innerType:t})}a(lL,"_success");function dL(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}a(dL,"_catch");function pL(e,t,n){return new e({type:"pipe",in:t,out:n})}a(pL,"_pipe");function fL(e,t){return new e({type:"readonly",innerType:t})}a(fL,"_readonly");function mL(e,t,n){return new e({type:"template_literal",parts:t,...te(n)})}a(mL,"_templateLiteral");function hL(e,t){return new e({type:"lazy",getter:t})}a(hL,"_lazy");function gL(e,t){return new e({type:"promise",innerType:t})}a(gL,"_promise");function $c(e,t,n){let o=te(n);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}a($c,"_custom");function mp(e,t,n){return new e({type:"custom",check:"custom",fn:t,...te(n)})}a(mp,"_refine");function hp(e){let t=nx(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(Zi(o,n.value,t._zod.def));else{let r=o;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(Zi(r))}},e(n.value,n)));return t}a(hp,"_superRefine");function nx(e,t){let n=new at({check:"custom",...te(t)});return n._zod.check=e,n}a(nx,"_check");function gp(e){let t=new at({check:"describe"});return t._zod.onattach=[n=>{let o=Nt.get(n)??{};Nt.add(n,{...o,description:e})}],t._zod.check=()=>{},t}a(gp,"describe");function yp(e){let t=new at({check:"meta"});return t._zod.onattach=[n=>{let o=Nt.get(n)??{};Nt.add(n,{...o,...e})}],t._zod.check=()=>{},t}a(yp,"meta");function vp(e,t){let n=te(t),o=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(o=o.map(p=>typeof p=="string"?p.toLowerCase():p),r=r.map(p=>typeof p=="string"?p.toLowerCase():p));let i=new Set(o),s=new Set(r),u=e.Codec??aa,d=e.Boolean??Xo,f=e.String??Mn,h=new f({type:"string",error:n.error}),g=new d({type:"boolean",error:n.error}),m=new u({type:"pipe",in:h,out:g,transform:a(((p,y)=>{let v=p;return n.case!=="sensitive"&&(v=v.toLowerCase()),i.has(v)?!0:s.has(v)?!1:(y.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:y.value,inst:m,continue:!1}),{})}),"transform"),reverseTransform:a(((p,y)=>p===!0?o[0]||"true":r[0]||"false"),"reverseTransform"),error:n.error});return m}a(vp,"_stringbool");function di(e,t,n,o={}){let r=te(o),i={...te(o),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:u=>n.test(u),...r};return n instanceof RegExp&&(i.pattern=n),new e(i)}a(di,"_stringFormat");function bo(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Nt,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}a(bo,"initializeContext");function et(e,t,n={path:[],schemaPath:[]}){var o;let r=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);let u=e._zod.toJSONSchema?.();if(u)s.schema=u;else{let h={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,h);else{let m=s.schema,p=t.processors[r.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);p(e,t,m,h)}let g=e._zod.parent;g&&(s.ref||(s.ref=g),et(g,t,h),t.seen.get(g).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&Object.assign(s.schema,d),t.io==="input"&&Yt(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}a(et,"process");function Eo(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let s of e.seen.entries()){let u=e.metadataRegistry.get(s[0])?.id;if(u){let d=o.get(u);if(d&&d!==s[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(u,s[0])}}let r=a(s=>{let u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let g=e.external.registry.get(s[0])?.id,m=e.external.uri??(y=>y);if(g)return{ref:m(g)};let p=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=p,{defId:p,ref:`${m("__shared")}#/${u}/${p}`}}if(s[1]===n)return{ref:"#"};let f=`#/${u}/`,h=s[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:f+h}},"makeURI"),i=a(s=>{if(s[1].schema.$ref)return;let u=s[1],{ref:d,defId:f}=r(s);u.def={...u.schema},f&&(u.defId=f);let h=u.schema;for(let g in h)delete h[g];h.$ref=d},"extractToDef");if(e.cycles==="throw")for(let s of e.seen.entries()){let u=s[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
|
|
106
|
+
|
|
107
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let u=s[1];if(t===s[0]){i(s);continue}if(e.external){let f=e.external.registry.get(s[0])?.id;if(t!==s[0]&&f){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(u.cycle){i(s);continue}if(u.count>1&&e.reused==="ref"){i(s);continue}}}a(Eo,"extractDefs");function So(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=a(s=>{let u=e.seen.get(s);if(u.ref===null)return;let d=u.def??u.schema,f={...d},h=u.ref;if(u.ref=null,h){o(h);let m=e.seen.get(h),p=m.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(p)):Object.assign(d,p),Object.assign(d,f),s._zod.parent===h)for(let v in d)v==="$ref"||v==="allOf"||v in f||delete d[v];if(p.$ref&&m.def)for(let v in d)v==="$ref"||v==="allOf"||v in m.def&&JSON.stringify(d[v])===JSON.stringify(m.def[v])&&delete d[v]}let g=s._zod.parent;if(g&&g!==h){o(g);let m=e.seen.get(g);if(m?.schema.$ref&&(d.$ref=m.schema.$ref,m.def))for(let p in d)p==="$ref"||p==="allOf"||p in m.def&&JSON.stringify(d[p])===JSON.stringify(m.def[p])&&delete d[p]}e.override({zodSchema:s,jsonSchema:d,path:u.path??[]})},"flattenRef");for(let s of[...e.seen.entries()].reverse())o(s[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}Object.assign(r,n.def??n.schema);let i=e.external?.defs??{};for(let s of e.seen.entries()){let u=s[1];u.def&&u.defId&&(i[u.defId]=u.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?r.$defs=i:r.definitions=i);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:da(t,"input",e.processors),output:da(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}a(So,"finalize");function Yt(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return Yt(o.element,n);if(o.type==="set")return Yt(o.valueType,n);if(o.type==="lazy")return Yt(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return Yt(o.innerType,n);if(o.type==="intersection")return Yt(o.left,n)||Yt(o.right,n);if(o.type==="record"||o.type==="map")return Yt(o.keyType,n)||Yt(o.valueType,n);if(o.type==="pipe")return Yt(o.in,n)||Yt(o.out,n);if(o.type==="object"){for(let r in o.shape)if(Yt(o.shape[r],n))return!0;return!1}if(o.type==="union"){for(let r of o.options)if(Yt(r,n))return!0;return!1}if(o.type==="tuple"){for(let r of o.items)if(Yt(r,n))return!0;return!!(o.rest&&Yt(o.rest,n))}return!1}a(Yt,"isTransforming");var Gy=a((e,t={})=>n=>{let o=bo({...n,processors:t});return et(e,o),Eo(o,e),So(o,e)},"createToJSONSchemaMethod"),da=a((e,t,n={})=>o=>{let{libraryOptions:r,target:i}=o??{},s=bo({...r??{},target:i,io:t,processors:n});return et(e,s),Eo(s,e),So(s,e)},"createStandardJSONSchemaMethod");var yL={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Hy=a((e,t,n,o)=>{let r=n;r.type="string";let{minimum:i,maximum:s,format:u,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof i=="number"&&(r.minLength=i),typeof s=="number"&&(r.maxLength=s),u&&(r.format=yL[u]??u,r.format===""&&delete r.format,u==="time"&&delete r.format),f&&(r.contentEncoding=f),d&&d.size>0){let h=[...d];h.length===1?r.pattern=h[0].source:h.length>1&&(r.allOf=[...h.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},"stringProcessor"),Zy=a((e,t,n,o)=>{let r=n,{minimum:i,maximum:s,format:u,multipleOf:d,exclusiveMaximum:f,exclusiveMinimum:h}=e._zod.bag;typeof u=="string"&&u.includes("int")?r.type="integer":r.type="number",typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.minimum=h,r.exclusiveMinimum=!0):r.exclusiveMinimum=h),typeof i=="number"&&(r.minimum=i,typeof h=="number"&&t.target!=="draft-04"&&(h>=i?delete r.minimum:delete r.exclusiveMinimum)),typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.maximum=f,r.exclusiveMaximum=!0):r.exclusiveMaximum=f),typeof s=="number"&&(r.maximum=s,typeof f=="number"&&t.target!=="draft-04"&&(f<=s?delete r.maximum:delete r.exclusiveMaximum)),typeof d=="number"&&(r.multipleOf=d)},"numberProcessor"),Wy=a((e,t,n,o)=>{n.type="boolean"},"booleanProcessor"),Ky=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},"bigintProcessor"),Jy=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},"symbolProcessor"),Yy=a((e,t,n,o)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},"nullProcessor"),Xy=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},"undefinedProcessor"),Qy=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},"voidProcessor"),ev=a((e,t,n,o)=>{n.not={}},"neverProcessor"),tv=a((e,t,n,o)=>{},"anyProcessor"),rv=a((e,t,n,o)=>{},"unknownProcessor"),nv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},"dateProcessor"),ov=a((e,t,n,o)=>{let r=e._zod.def,i=bs(r.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},"enumProcessor"),iv=a((e,t,n,o)=>{let r=e._zod.def,i=[];for(let s of r.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s}else i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),i.every(s=>typeof s=="boolean")&&(n.type="boolean"),i.every(s=>s===null)&&(n.type="null"),n.enum=i},"literalProcessor"),av=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},"nanProcessor"),sv=a((e,t,n,o)=>{let r=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=i.source},"templateLiteralProcessor"),cv=a((e,t,n,o)=>{let r=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:u,mime:d}=e._zod.bag;s!==void 0&&(i.minLength=s),u!==void 0&&(i.maxLength=u),d?d.length===1?(i.contentMediaType=d[0],Object.assign(r,i)):(Object.assign(r,i),r.anyOf=d.map(f=>({contentMediaType:f}))):Object.assign(r,i)},"fileProcessor"),uv=a((e,t,n,o)=>{n.type="boolean"},"successProcessor"),lv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},"customProcessor"),dv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},"functionProcessor"),pv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},"transformProcessor"),fv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},"mapProcessor"),mv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},"setProcessor"),hv=a((e,t,n,o)=>{let r=n,i=e._zod.def,{minimum:s,maximum:u}=e._zod.bag;typeof s=="number"&&(r.minItems=s),typeof u=="number"&&(r.maxItems=u),r.type="array",r.items=et(i.element,t,{...o,path:[...o.path,"items"]})},"arrayProcessor"),gv=a((e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object",r.properties={};let s=i.shape;for(let f in s)r.properties[f]=et(s[f],t,{...o,path:[...o.path,"properties",f]});let u=new Set(Object.keys(s)),d=new Set([...u].filter(f=>{let h=i.shape[f]._zod;return t.io==="input"?h.optin===void 0:h.optout===void 0}));d.size>0&&(r.required=Array.from(d)),i.catchall?._zod.def.type==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=et(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},"objectProcessor"),bp=a((e,t,n,o)=>{let r=e._zod.def,i=r.inclusive===!1,s=r.options.map((u,d)=>et(u,t,{...o,path:[...o.path,i?"oneOf":"anyOf",d]}));i?n.oneOf=s:n.anyOf=s},"unionProcessor"),yv=a((e,t,n,o)=>{let r=e._zod.def,i=et(r.left,t,{...o,path:[...o.path,"allOf",0]}),s=et(r.right,t,{...o,path:[...o.path,"allOf",1]}),u=a(f=>"allOf"in f&&Object.keys(f).length===1,"isSimpleIntersection"),d=[...u(i)?i.allOf:[i],...u(s)?s.allOf:[s]];n.allOf=d},"intersectionProcessor"),vv=a((e,t,n,o)=>{let r=n,i=e._zod.def;r.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=i.items.map((m,p)=>et(m,t,{...o,path:[...o.path,s,p]})),f=i.rest?et(i.rest,t,{...o,path:[...o.path,u,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=d,f&&(r.items=f)):t.target==="openapi-3.0"?(r.items={anyOf:d},f&&r.items.anyOf.push(f),r.minItems=d.length,f||(r.maxItems=d.length)):(r.items=d,f&&(r.additionalItems=f));let{minimum:h,maximum:g}=e._zod.bag;typeof h=="number"&&(r.minItems=h),typeof g=="number"&&(r.maxItems=g)},"tupleProcessor"),_v=a((e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object";let s=i.keyType,d=s._zod.bag?.patterns;if(i.mode==="loose"&&d&&d.size>0){let h=et(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(let g of d)r.patternProperties[g.source]=h}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=et(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=et(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let f=s._zod.values;if(f){let h=[...f].filter(g=>typeof g=="string"||typeof g=="number");h.length>0&&(r.required=h)}},"recordProcessor"),bv=a((e,t,n,o)=>{let r=e._zod.def,i=et(r.innerType,t,o),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=r.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},"nullableProcessor"),Ev=a((e,t,n,o)=>{let r=e._zod.def;et(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},"nonoptionalProcessor"),Sv=a((e,t,n,o)=>{let r=e._zod.def;et(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},"defaultProcessor"),Tv=a((e,t,n,o)=>{let r=e._zod.def;et(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},"prefaultProcessor"),Pv=a((e,t,n,o)=>{let r=e._zod.def;et(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;let s;try{s=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},"catchProcessor"),wv=a((e,t,n,o)=>{let r=e._zod.def,i=t.io==="input"?r.in._zod.def.type==="transform"?r.out:r.in:r.out;et(i,t,o);let s=t.seen.get(e);s.ref=i},"pipeProcessor"),xv=a((e,t,n,o)=>{let r=e._zod.def;et(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.readOnly=!0},"readonlyProcessor"),Av=a((e,t,n,o)=>{let r=e._zod.def;et(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},"promiseProcessor"),Ep=a((e,t,n,o)=>{let r=e._zod.def;et(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},"optionalProcessor"),Iv=a((e,t,n,o)=>{let r=e._zod.innerType;et(r,t,o);let i=t.seen.get(e);i.ref=r},"lazyProcessor"),_p={string:Hy,number:Zy,boolean:Wy,bigint:Ky,symbol:Jy,null:Yy,undefined:Xy,void:Qy,never:ev,any:tv,unknown:rv,date:nv,enum:ov,literal:iv,nan:av,template_literal:sv,file:cv,success:uv,custom:lv,function:dv,transform:pv,map:fv,set:mv,array:hv,object:gv,union:bp,intersection:yv,tuple:vv,record:_v,nullable:bv,nonoptional:Ev,default:Sv,prefault:Tv,catch:Pv,pipe:wv,readonly:xv,promise:Av,optional:Ep,lazy:Iv};function Dc(e,t){if("_idmap"in e){let o=e,r=bo({...t,processors:_p}),i={};for(let d of o._idmap.entries()){let[f,h]=d;et(h,r)}let s={},u={registry:o,uri:t?.uri,defs:i};r.external=u;for(let d of o._idmap.entries()){let[f,h]=d;Eo(r,h),s[f]=So(r,h)}if(Object.keys(i).length>0){let d=r.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[d]:i}}return{schemas:s}}let n=bo({...t,processors:_p});return et(e,n),Eo(n,e),So(n,e)}a(Dc,"toJSONSchema");var Sp=class{static{a(this,"JSONSchemaGenerator")}get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=bo({processors:_p,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return et(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),Eo(this.ctx,t);let o=So(this.ctx,t),{"~standard":r,...i}=o;return i}};var ox={};var wt=A("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");xe.init(e,t),e.def=t,e.type=t.type,e.parse=(n,o)=>Ko(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Qi(e,n,o),e.parseAsync=async(n,o)=>Jo(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>ta(e,n,o),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]},{parent:!0}),e.with=e.check,e.clone=(n,o)=>Dt(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.apply=n=>n(e)}),Tp=A("ZodMiniString",(e,t)=>{Mn.init(e,t),wt.init(e,t)});function S(e){return Js(Tp,e)}a(S,"string");var ix=A("ZodMiniStringFormat",(e,t)=>{Qe.init(e,t),Tp.init(e,t)});var bL=A("ZodMiniURL",(e,t)=>{Rs.init(e,t),ix.init(e,t)});function ax(e){return ei(bL,e)}a(ax,"url");var Pp=A("ZodMiniNumber",(e,t)=>{na.init(e,t),wt.init(e,t)});function zt(e){return vc(Pp,e)}a(zt,"number");var EL=A("ZodMiniNumberFormat",(e,t)=>{Cs.init(e,t),Pp.init(e,t)});function sx(e){return bc(EL,e)}a(sx,"int");var Rv=A("ZodMiniBoolean",(e,t)=>{Xo.init(e,t),wt.init(e,t)});function Ze(e){return Ec(Rv,e)}a(Ze,"boolean");var cx=A("ZodMiniBigInt",(e,t)=>{oa.init(e,t),wt.init(e,t)});var SL=A("ZodMiniAny",(e,t)=>{Os.init(e,t),wt.init(e,t)});function Nc(){return Pc(SL)}a(Nc,"any");var TL=A("ZodMiniUnknown",(e,t)=>{ks.init(e,t),wt.init(e,t)});function Re(){return wc(TL)}a(Re,"unknown");var PL=A("ZodMiniVoid",(e,t)=>{$s.init(e,t),wt.init(e,t)});function ux(e){return xc(PL,e)}a(ux,"_void");var lx=A("ZodMiniDate",(e,t)=>{Ds.init(e,t),wt.init(e,t)});var wL=A("ZodMiniArray",(e,t)=>{Ns.init(e,t),wt.init(e,t)});function we(e,t){return new wL({type:"array",element:e,...te(t)})}a(we,"array");var xL=A("ZodMiniObject",(e,t)=>{Ad.init(e,t),wt.init(e,t),ze(e,"shape",()=>t.shape)});function O(e,t){let n={type:"object",shape:e??{},...te(t)};return new xL(n)}a(O,"object");var AL=A("ZodMiniUnion",(e,t)=>{Qo.init(e,t),wt.init(e,t)});function Ue(e,t){return new AL({type:"union",options:e,...te(t)})}a(Ue,"union");var IL=A("ZodMiniDiscriminatedUnion",(e,t)=>{zs.init(e,t),wt.init(e,t)});function To(e,t,n){return new IL({type:"union",options:t,discriminator:e,...te(n)})}a(To,"discriminatedUnion");var RL=A("ZodMiniRecord",(e,t)=>{Ms.init(e,t),wt.init(e,t)});function Ce(e,t,n){return new RL({type:"record",keyType:e,valueType:t,...te(n)})}a(Ce,"record");var CL=A("ZodMiniEnum",(e,t)=>{Ls.init(e,t),wt.init(e,t),e.options=Object.values(t.entries)});function Se(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new CL({type:"enum",entries:n,...te(t)})}a(Se,"_enum");var OL=A("ZodMiniLiteral",(e,t)=>{js.init(e,t),wt.init(e,t)});function be(e,t){return new OL({type:"literal",values:Array.isArray(e)?e:[e],...te(t)})}a(be,"literal");var kL=A("ZodMiniTransform",(e,t)=>{Fs.init(e,t),wt.init(e,t)});function Po(e){return new kL({type:"transform",transform:e})}a(Po,"transform");var $L=A("ZodMiniOptional",(e,t)=>{ia.init(e,t),wt.init(e,t)});function q(e){return new $L({type:"optional",innerType:e})}a(q,"optional");var DL=A("ZodMiniNullable",(e,t)=>{Bs.init(e,t),wt.init(e,t)});function zc(e){return new DL({type:"nullable",innerType:e})}a(zc,"nullable");var NL=A("ZodMiniPipe",(e,t)=>{qs.init(e,t),wt.init(e,t)});function wo(e,t){return new NL({type:"pipe",in:e,out:t})}a(wo,"pipe");var zL=A("ZodMiniCustom",(e,t)=>{Vs.init(e,t),wt.init(e,t)});function wp(e,t){return $c(zL,e??(()=>!0),t)}a(wp,"custom");var Uc={};hr(Uc,{bigint:()=>FL,boolean:()=>jL,date:()=>BL,number:()=>LL,string:()=>ML});function ML(e){return Ys(Tp,e)}a(ML,"string");function LL(e){return _c(Pp,e)}a(LL,"number");function jL(e){return Sc(Rv,e)}a(jL,"boolean");function FL(e){return Tc(cx,e)}a(FL,"bigint");function BL(e){return Ac(lx,e)}a(BL,"date");var Ov=O({retryOnFailure:O({defaultValue:q(Ze()),hide:q(Ze())}),continueOnFailure:O({defaultValue:q(Ze()),hide:q(Ze())})}),Cv=class{constructor(t,n,o,r,i,s,u,d,f,h,g,m,p){this.name=t;this.displayName=n;this.description=o;this.props=r;this.propertyGroups=i;this.run=s;this.test=u;this.requireAuth=d;this.errorHandlingOptions=f;this.outputSchema=h;this.audience=g;this.aiMetadata=m;this.classification=p}static{a(this,"IAction")}},Pe=a(e=>new Cv(e.name,e.displayName,e.description,e.props,e.propertyGroups,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata,e.classification),"createAction");var Ge=O({displayName:S(),description:q(S()),advanced:q(Ze()),width:q(Se(["half","full"])),icon:q(S()),placeholder:q(S())}),Oe=a((e,t)=>O({type:be(t),required:Ze(),defaultValue:q(Nc())}),"TPropertyValue");var vr=O({...Ge.shape,...Oe(S(),"SHORT_TEXT").shape}),Fn=O({...Ge.shape,...Oe(S(),"LONG_TEXT").shape});var px=O({label:S(),value:Re(),description:q(S()),icon:q(S())}),xp=O({disabled:q(Ze()),placeholder:q(S()),options:we(px)});var VL=Se(["cards"]),_r=O({...Ge.shape,options:xp,display:q(VL),...Oe(Re(),"STATIC_DROPDOWN").shape}),Bn=O({...Ge.shape,options:xp,...Oe(we(Re()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var kv=O({...Ge.shape,...Oe(Re(),"DROPDOWN").shape,refreshers:we(S())}),Mc=O({...Ge.shape,...Oe(we(Re()),"MULTI_SELECT_DROPDOWN").shape,refreshers:we(S())});var qn=O({...Ge.shape,reveals:q(we(S())),...Oe(Ze(),"CHECKBOX").shape});var Vn=O({...Ge.shape,display:q(Se(["stepper"])),min:q(zt()),max:q(zt()),step:q(zt()),...Oe(zt(),"NUMBER").shape});var Lc=O({...Ge.shape,streaming:q(Ze()),...Oe(Re(),"FILE").shape});var jc=O({...Ge.shape,...Oe(S(),"DATE_TIME").shape});var fx=Ce(S(),Ue([vr,Fn,_r,Mc,Bn,qn,Vn,Lc,jc])),Fc=O({...Ge.shape,properties:fx,...Oe(we(Re()),"ARRAY").shape});var mx=Se(["any_time","last_24_hours","last_7_days","last_30_days","last_90_days","this_month","custom"]),hx=O({preset:q(mx),after:q(S()),before:q(S())}),$v=O({...Ge.shape,display:q(Se(["dropdown"])),...Oe(hx,"DATE_RANGE").shape});var Bc=O({...Ge.shape,...Oe(Ue([Ce(S(),Re())]),"JSON").shape});var gx=Ue([vr,_r,Bc,Fc,Bn]),GL=Ce(S(),gx),Dv=O({refreshers:we(S()),...Ge.shape,...Oe(Re(),"DYNAMIC").shape});var Ap=O({...Ge.shape,...Oe(ux(),"MARKDOWN").shape});var qc=(n=>(n.ARCHIVE="ARCHIVE",n.REGISTRY="REGISTRY",n))(qc||{}),pa=(n=>(n.CUSTOM="CUSTOM",n.OFFICIAL="OFFICIAL",n))(pa||{}),fa=(b=>(b.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",b.COMMUNICATION="COMMUNICATION",b.COMMERCE="COMMERCE",b.CORE="CORE",b.UNIVERSAL_AI="UNIVERSAL_AI",b.FLOW_CONTROL="FLOW_CONTROL",b.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",b.ACCOUNTING="ACCOUNTING",b.PRODUCTIVITY="PRODUCTIVITY",b.CONTENT_AND_FILES="CONTENT_AND_FILES",b.DEVELOPER_TOOLS="DEVELOPER_TOOLS",b.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",b.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",b.HUMAN_RESOURCES="HUMAN_RESOURCES",b.PAYMENT_PROCESSING="PAYMENT_PROCESSING",b.MARKETING="MARKETING",b.SALES_AND_CRM="SALES_AND_CRM",b))(fa||{});var Vc=(n=>(n.AUTHORIZATION_CODE="authorization_code",n.CLIENT_CREDENTIALS="client_credentials",n))(Vc||{}),Nv="both_client_credentials_and_authorization_code";var or=(r=>(r.POLLING="POLLING",r.WEBHOOK="WEBHOOK",r.APP_WEBHOOK="APP_WEBHOOK",r.MANUAL="MANUAL",r))(or||{}),Gc=(i=>(i.NONE="NONE",i.HEADER_PRESENT="HEADER_PRESENT",i.QUERY_PRESENT="QUERY_PRESENT",i.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",i.HEAD_REQUEST="HEAD_REQUEST",i))(Gc||{}),HL=O({strategy:Se(Gc),paramName:q(S())}),Hc=(n=>(n.SIMULATION="SIMULATION",n.TEST_FUNCTION="TEST_FUNCTION",n))(Hc||{});var Ip=(n=>(n.WEBSOCKET="WEBSOCKET",n.NONE="NONE",n))(Ip||{}),yx=O({status:q(zt()),body:q(Re()),headers:q(Ce(S(),S()))}),vx=O({type:be("DELAY"),resumeDateTime:S(),requestIdToReply:q(S()),handlerId:q(S()),streamStepProgress:q(Se(Ip))}),_x=O({type:be("WEBHOOK"),requestId:S(),requestIdToReply:q(S()),response:yx,handlerId:q(S()),streamStepProgress:q(Se(Ip))}),ZL=Ue([vx,_x]);var WL=O({body:Re(),rawBody:q(Re()),headers:Ce(S(),S()),queryParams:Ce(S(),S())});function dt(e){return e==null}a(dt,"isNil");function Zc(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}a(Zc,"isEmpty");function Rp(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}a(Rp,"assertNotNullOrUndefined");function zv(e){try{return{data:e(),error:null}}catch(t){return{data:null,error:t}}}a(zv,"tryCatchSync");var Uv=Ke(require("crypto"),1);var KL=128,xo,ma,JL=a(e=>{if(e<0)throw new RangeError("Wrong ID size");try{!xo||xo.length<e?(xo=Buffer.allocUnsafe(e*KL),Uv.default.randomFillSync(xo),ma=0):ma+e>xo.length&&(Uv.default.randomFillSync(xo),ma=0)}catch(t){throw xo=void 0,t}ma+=e},"fillPool"),YL=a(e=>(JL(e|=0),xo.subarray(ma-e,ma)),"random"),XL=a((e,t,n)=>{let o=(2<<31-Math.clz32(e.length-1|1))-1,r=Math.ceil(1.6*o*t/e.length);return(i=t)=>{if(i<=0)return"";let s="";for(;;){let u=n(r),d=r;for(;d--;)if(s+=e[u[d]&o]||"",s.length===i)return s}}},"customRandom"),Ex=a((e,t=21)=>XL(e,t,YL),"customAlphabet");var QL="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Sx=21,s9=S().check(Ft(new RegExp(`^[0-9a-zA-Z]{${Sx}}$`))),ej=Ex(QL,Sx);var Ao=wo(Po(e=>e instanceof Date?e.toISOString():e),S()),zr={id:S(),created:Ao,updated:Ao},vt=a(e=>q(zc(e)),"Nullable");function Mv(e){return q(zc(Se(e)))}a(Mv,"NullableEnum");var l9=wo(Po(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),q(Ze())),Cp=a(e=>wo(Po(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),q(we(e))),"OptionalArrayFromQuery");var f9=Ce(S(),Re());var ha=(b=>(b.OPENAI="openai",b.OPENROUTER="openrouter",b.ANTHROPIC="anthropic",b.AZURE="azure",b.GOOGLE="google",b.ACTIVEPIECES="activepieces",b.CLOUDFLARE_GATEWAY="cloudflare-gateway",b.CUSTOM="custom",b.BEDROCK="bedrock",b.VERTEX="vertex",b.MISTRAL="mistral",b.XAI="xai",b.DEEPSEEK="deepseek",b.ZAI="zai",b.QWEN="qwen",b.MINIMAX="minimax",b.MOONSHOT="moonshot",b))(ha||{});var x9=S().check(Ft(/^#[0-9A-Fa-f]{6}$/));var I9=O({filename:S(),data:Re(),type:be("file"),mimetype:q(S())});var tj=Ke(Px());var N9=O({...zr,name:S(),permissions:we(S()),platformId:vt(S()),type:S(),userCount:q(zt())});var pf={};hr(pf,{$brand:()=>vs,$input:()=>Zd,$output:()=>Hd,NEVER:()=>Rl,TimePrecision:()=>Kd,ZodAny:()=>c_,ZodArray:()=>p_,ZodBase64:()=>Xp,ZodBase64URL:()=>Qp,ZodBigInt:()=>Sa,ZodBigIntFormat:()=>rf,ZodBoolean:()=>Ea,ZodCIDRv4:()=>Jp,ZodCIDRv6:()=>Yp,ZodCUID:()=>qp,ZodCUID2:()=>Vp,ZodCatch:()=>D_,ZodCodec:()=>df,ZodCustom:()=>iu,ZodCustomStringFormat:()=>_a,ZodDate:()=>eu,ZodDefault:()=>I_,ZodDiscriminatedUnion:()=>m_,ZodE164:()=>ef,ZodEmail:()=>jp,ZodEmoji:()=>Fp,ZodEnum:()=>ya,ZodError:()=>rj,ZodExactOptional:()=>w_,ZodFile:()=>T_,ZodFirstPartyTypeKind:()=>H_,ZodFunction:()=>q_,ZodGUID:()=>Kc,ZodIPv4:()=>Wp,ZodIPv6:()=>Kp,ZodISODate:()=>Dp,ZodISODateTime:()=>$p,ZodISODuration:()=>zp,ZodISOTime:()=>Np,ZodIntersection:()=>h_,ZodIssueCode:()=>oj,ZodJWT:()=>tf,ZodKSUID:()=>Zp,ZodLazy:()=>j_,ZodLiteral:()=>S_,ZodMAC:()=>t_,ZodMap:()=>b_,ZodNaN:()=>z_,ZodNanoID:()=>Bp,ZodNever:()=>l_,ZodNonOptional:()=>uf,ZodNull:()=>a_,ZodNullable:()=>A_,ZodNumber:()=>ba,ZodNumberFormat:()=>fi,ZodObject:()=>ru,ZodOptional:()=>cf,ZodPipe:()=>lf,ZodPrefault:()=>C_,ZodPromise:()=>B_,ZodReadonly:()=>U_,ZodRealError:()=>ir,ZodRecord:()=>ou,ZodSet:()=>E_,ZodString:()=>va,ZodStringFormat:()=>st,ZodSuccess:()=>$_,ZodSymbol:()=>o_,ZodTemplateLiteral:()=>L_,ZodTransform:()=>P_,ZodTuple:()=>y_,ZodType:()=>Me,ZodULID:()=>Gp,ZodURL:()=>Qc,ZodUUID:()=>fn,ZodUndefined:()=>i_,ZodUnion:()=>nu,ZodUnknown:()=>u_,ZodVoid:()=>d_,ZodXID:()=>Hp,ZodXor:()=>f_,_ZodString:()=>Lp,_default:()=>R_,_function:()=>OA,any:()=>uA,array:()=>tu,base64:()=>Hx,base64url:()=>Zx,bigint:()=>oA,boolean:()=>n_,catch:()=>N_,check:()=>kA,cidrv4:()=>Vx,cidrv6:()=>Gx,clone:()=>Dt,codec:()=>IA,coerce:()=>Z_,config:()=>yt,core:()=>yr,cuid:()=>zx,cuid2:()=>Ux,custom:()=>$A,date:()=>dA,decode:()=>Wv,decodeAsync:()=>Jv,describe:()=>DA,discriminatedUnion:()=>yA,e164:()=>Wx,email:()=>xx,emoji:()=>Dx,encode:()=>Zv,encodeAsync:()=>Kv,endsWith:()=>ii,enum:()=>af,exactOptional:()=>x_,file:()=>PA,flattenError:()=>Wi,float32:()=>eA,float64:()=>tA,formatError:()=>Ki,fromJSONSchema:()=>FA,function:()=>OA,getErrorMap:()=>aj,globalRegistry:()=>Nt,gt:()=>Qr,gte:()=>Ct,guid:()=>Ax,hash:()=>Qx,hex:()=>Xx,hostname:()=>Yx,httpUrl:()=>$x,includes:()=>ni,instanceof:()=>zA,int:()=>Mp,int32:()=>rA,int64:()=>iA,intersection:()=>g_,ipv4:()=>Fx,ipv6:()=>qx,iso:()=>ga,json:()=>MA,jwt:()=>Kx,keyof:()=>pA,ksuid:()=>jx,lazy:()=>F_,length:()=>_o,literal:()=>TA,locales:()=>ca,looseObject:()=>hA,looseRecord:()=>_A,lowercase:()=>ti,lt:()=>Xr,lte:()=>Jt,mac:()=>Bx,map:()=>bA,maxLength:()=>vo,maxSize:()=>jn,meta:()=>NA,mime:()=>ai,minLength:()=>Tt,minSize:()=>en,multipleOf:()=>Ln,nan:()=>AA,nanoid:()=>Nx,nativeEnum:()=>SA,negative:()=>Rc,never:()=>nf,nonnegative:()=>Oc,nonoptional:()=>k_,nonpositive:()=>Cc,normalize:()=>si,null:()=>s_,nullable:()=>Yc,nullish:()=>wA,number:()=>r_,object:()=>fA,optional:()=>Jc,overwrite:()=>Nr,parse:()=>qv,parseAsync:()=>Vv,partialRecord:()=>vA,pipe:()=>Xc,positive:()=>Ic,prefault:()=>O_,preprocess:()=>LA,prettifyError:()=>Dl,promise:()=>CA,property:()=>kc,readonly:()=>M_,record:()=>__,refine:()=>V_,regex:()=>Ft,regexes:()=>nr,registry:()=>Ks,safeDecode:()=>Xv,safeDecodeAsync:()=>e_,safeEncode:()=>Yv,safeEncodeAsync:()=>Qv,safeParse:()=>Gv,safeParseAsync:()=>Hv,set:()=>EA,setErrorMap:()=>ij,size:()=>yo,slugify:()=>la,startsWith:()=>oi,strictObject:()=>mA,string:()=>Up,stringFormat:()=>Jx,stringbool:()=>UA,success:()=>xA,superRefine:()=>G_,symbol:()=>sA,templateLiteral:()=>RA,toJSONSchema:()=>Dc,toLowerCase:()=>ui,toUpperCase:()=>li,transform:()=>sf,treeifyError:()=>$l,trim:()=>ci,tuple:()=>v_,uint32:()=>nA,uint64:()=>aA,ulid:()=>Mx,undefined:()=>cA,union:()=>of,unknown:()=>pi,uppercase:()=>ri,url:()=>kx,util:()=>oe,uuid:()=>Ix,uuidv4:()=>Rx,uuidv6:()=>Cx,uuidv7:()=>Ox,void:()=>lA,xid:()=>Lx,xor:()=>gA});var Wc={};hr(Wc,{ZodAny:()=>c_,ZodArray:()=>p_,ZodBase64:()=>Xp,ZodBase64URL:()=>Qp,ZodBigInt:()=>Sa,ZodBigIntFormat:()=>rf,ZodBoolean:()=>Ea,ZodCIDRv4:()=>Jp,ZodCIDRv6:()=>Yp,ZodCUID:()=>qp,ZodCUID2:()=>Vp,ZodCatch:()=>D_,ZodCodec:()=>df,ZodCustom:()=>iu,ZodCustomStringFormat:()=>_a,ZodDate:()=>eu,ZodDefault:()=>I_,ZodDiscriminatedUnion:()=>m_,ZodE164:()=>ef,ZodEmail:()=>jp,ZodEmoji:()=>Fp,ZodEnum:()=>ya,ZodExactOptional:()=>w_,ZodFile:()=>T_,ZodFunction:()=>q_,ZodGUID:()=>Kc,ZodIPv4:()=>Wp,ZodIPv6:()=>Kp,ZodIntersection:()=>h_,ZodJWT:()=>tf,ZodKSUID:()=>Zp,ZodLazy:()=>j_,ZodLiteral:()=>S_,ZodMAC:()=>t_,ZodMap:()=>b_,ZodNaN:()=>z_,ZodNanoID:()=>Bp,ZodNever:()=>l_,ZodNonOptional:()=>uf,ZodNull:()=>a_,ZodNullable:()=>A_,ZodNumber:()=>ba,ZodNumberFormat:()=>fi,ZodObject:()=>ru,ZodOptional:()=>cf,ZodPipe:()=>lf,ZodPrefault:()=>C_,ZodPromise:()=>B_,ZodReadonly:()=>U_,ZodRecord:()=>ou,ZodSet:()=>E_,ZodString:()=>va,ZodStringFormat:()=>st,ZodSuccess:()=>$_,ZodSymbol:()=>o_,ZodTemplateLiteral:()=>L_,ZodTransform:()=>P_,ZodTuple:()=>y_,ZodType:()=>Me,ZodULID:()=>Gp,ZodURL:()=>Qc,ZodUUID:()=>fn,ZodUndefined:()=>i_,ZodUnion:()=>nu,ZodUnknown:()=>u_,ZodVoid:()=>d_,ZodXID:()=>Hp,ZodXor:()=>f_,_ZodString:()=>Lp,_default:()=>R_,_function:()=>OA,any:()=>uA,array:()=>tu,base64:()=>Hx,base64url:()=>Zx,bigint:()=>oA,boolean:()=>n_,catch:()=>N_,check:()=>kA,cidrv4:()=>Vx,cidrv6:()=>Gx,codec:()=>IA,cuid:()=>zx,cuid2:()=>Ux,custom:()=>$A,date:()=>dA,describe:()=>DA,discriminatedUnion:()=>yA,e164:()=>Wx,email:()=>xx,emoji:()=>Dx,enum:()=>af,exactOptional:()=>x_,file:()=>PA,float32:()=>eA,float64:()=>tA,function:()=>OA,guid:()=>Ax,hash:()=>Qx,hex:()=>Xx,hostname:()=>Yx,httpUrl:()=>$x,instanceof:()=>zA,int:()=>Mp,int32:()=>rA,int64:()=>iA,intersection:()=>g_,ipv4:()=>Fx,ipv6:()=>qx,json:()=>MA,jwt:()=>Kx,keyof:()=>pA,ksuid:()=>jx,lazy:()=>F_,literal:()=>TA,looseObject:()=>hA,looseRecord:()=>_A,mac:()=>Bx,map:()=>bA,meta:()=>NA,nan:()=>AA,nanoid:()=>Nx,nativeEnum:()=>SA,never:()=>nf,nonoptional:()=>k_,null:()=>s_,nullable:()=>Yc,nullish:()=>wA,number:()=>r_,object:()=>fA,optional:()=>Jc,partialRecord:()=>vA,pipe:()=>Xc,prefault:()=>O_,preprocess:()=>LA,promise:()=>CA,readonly:()=>M_,record:()=>__,refine:()=>V_,set:()=>EA,strictObject:()=>mA,string:()=>Up,stringFormat:()=>Jx,stringbool:()=>UA,success:()=>xA,superRefine:()=>G_,symbol:()=>sA,templateLiteral:()=>RA,transform:()=>sf,tuple:()=>v_,uint32:()=>nA,uint64:()=>aA,ulid:()=>Mx,undefined:()=>cA,union:()=>of,unknown:()=>pi,url:()=>kx,uuid:()=>Ix,uuidv4:()=>Rx,uuidv6:()=>Cx,uuidv7:()=>Ox,void:()=>lA,xid:()=>Lx,xor:()=>gA});var kp={};hr(kp,{endsWith:()=>ii,gt:()=>Qr,gte:()=>Ct,includes:()=>ni,length:()=>_o,lowercase:()=>ti,lt:()=>Xr,lte:()=>Jt,maxLength:()=>vo,maxSize:()=>jn,mime:()=>ai,minLength:()=>Tt,minSize:()=>en,multipleOf:()=>Ln,negative:()=>Rc,nonnegative:()=>Oc,nonpositive:()=>Cc,normalize:()=>si,overwrite:()=>Nr,positive:()=>Ic,property:()=>kc,regex:()=>Ft,size:()=>yo,slugify:()=>la,startsWith:()=>oi,toLowerCase:()=>ui,toUpperCase:()=>li,trim:()=>ci,uppercase:()=>ri});var ga={};hr(ga,{ZodISODate:()=>Dp,ZodISODateTime:()=>$p,ZodISODuration:()=>zp,ZodISOTime:()=>Np,date:()=>jv,datetime:()=>Lv,duration:()=>Bv,time:()=>Fv});var $p=A("ZodISODateTime",(e,t)=>{cd.init(e,t),st.init(e,t)});function Lv(e){return Jd($p,e)}a(Lv,"datetime");var Dp=A("ZodISODate",(e,t)=>{ud.init(e,t),st.init(e,t)});function jv(e){return Yd(Dp,e)}a(jv,"date");var Np=A("ZodISOTime",(e,t)=>{ld.init(e,t),st.init(e,t)});function Fv(e){return Xd(Np,e)}a(Fv,"time");var zp=A("ZodISODuration",(e,t)=>{dd.init(e,t),st.init(e,t)});function Bv(e){return Qd(zp,e)}a(Bv,"duration");var wx=a((e,t)=>{ws.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:a(n=>Ki(e,n),"value")},flatten:{value:a(n=>Wi(e,n),"value")},addIssue:{value:a(n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Gi,2)},"value")},addIssues:{value:a(n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Gi,2)},"value")},isEmpty:{get(){return e.issues.length===0}}})},"initializer"),rj=A("ZodError",wx),ir=A("ZodError",wx,{Parent:Error});var qv=Ji(ir),Vv=Yi(ir),Gv=Xi(ir),Hv=ea(ir),Zv=Nl(ir),Wv=zl(ir),Kv=Ul(ir),Jv=Ml(ir),Yv=Ll(ir),Xv=jl(ir),Qv=Fl(ir),e_=Bl(ir);var Me=A("ZodType",(e,t)=>(xe.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:da(e,"input"),output:da(e,"output")}}),e.toJSONSchema=Gy(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(oe.mergeDefs(t,{checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(n,o)=>Dt(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.parse=(n,o)=>qv(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Gv(e,n,o),e.parseAsync=async(n,o)=>Vv(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>Hv(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>Zv(e,n,o),e.decode=(n,o)=>Wv(e,n,o),e.encodeAsync=async(n,o)=>Kv(e,n,o),e.decodeAsync=async(n,o)=>Jv(e,n,o),e.safeEncode=(n,o)=>Yv(e,n,o),e.safeDecode=(n,o)=>Xv(e,n,o),e.safeEncodeAsync=async(n,o)=>Qv(e,n,o),e.safeDecodeAsync=async(n,o)=>e_(e,n,o),e.refine=(n,o)=>e.check(V_(n,o)),e.superRefine=n=>e.check(G_(n)),e.overwrite=n=>e.check(Nr(n)),e.optional=()=>Jc(e),e.exactOptional=()=>x_(e),e.nullable=()=>Yc(e),e.nullish=()=>Jc(Yc(e)),e.nonoptional=n=>k_(e,n),e.array=()=>tu(e),e.or=n=>of([e,n]),e.and=n=>g_(e,n),e.transform=n=>Xc(e,sf(n)),e.default=n=>R_(e,n),e.prefault=n=>O_(e,n),e.catch=n=>N_(e,n),e.pipe=n=>Xc(e,n),e.readonly=()=>M_(e),e.describe=n=>{let o=e.clone();return Nt.add(o,{description:n}),o},Object.defineProperty(e,"description",{get(){return Nt.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Nt.get(e);let o=e.clone();return Nt.add(o,n[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Lp=A("_ZodString",(e,t)=>{Mn.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Hy(e,o,r,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...o)=>e.check(Ft(...o)),e.includes=(...o)=>e.check(ni(...o)),e.startsWith=(...o)=>e.check(oi(...o)),e.endsWith=(...o)=>e.check(ii(...o)),e.min=(...o)=>e.check(Tt(...o)),e.max=(...o)=>e.check(vo(...o)),e.length=(...o)=>e.check(_o(...o)),e.nonempty=(...o)=>e.check(Tt(1,...o)),e.lowercase=o=>e.check(ti(o)),e.uppercase=o=>e.check(ri(o)),e.trim=()=>e.check(ci()),e.normalize=(...o)=>e.check(si(...o)),e.toLowerCase=()=>e.check(ui()),e.toUpperCase=()=>e.check(li()),e.slugify=()=>e.check(la())}),va=A("ZodString",(e,t)=>{Mn.init(e,t),Lp.init(e,t),e.email=n=>e.check(Xs(jp,n)),e.url=n=>e.check(ei(Qc,n)),e.jwt=n=>e.check(yc(tf,n)),e.emoji=n=>e.check(nc(Fp,n)),e.guid=n=>e.check(ua(Kc,n)),e.uuid=n=>e.check(Qs(fn,n)),e.uuidv4=n=>e.check(ec(fn,n)),e.uuidv6=n=>e.check(tc(fn,n)),e.uuidv7=n=>e.check(rc(fn,n)),e.nanoid=n=>e.check(oc(Bp,n)),e.guid=n=>e.check(ua(Kc,n)),e.cuid=n=>e.check(ic(qp,n)),e.cuid2=n=>e.check(ac(Vp,n)),e.ulid=n=>e.check(sc(Gp,n)),e.base64=n=>e.check(mc(Xp,n)),e.base64url=n=>e.check(hc(Qp,n)),e.xid=n=>e.check(cc(Hp,n)),e.ksuid=n=>e.check(uc(Zp,n)),e.ipv4=n=>e.check(lc(Wp,n)),e.ipv6=n=>e.check(dc(Kp,n)),e.cidrv4=n=>e.check(pc(Jp,n)),e.cidrv6=n=>e.check(fc(Yp,n)),e.e164=n=>e.check(gc(ef,n)),e.datetime=n=>e.check(Lv(n)),e.date=n=>e.check(jv(n)),e.time=n=>e.check(Fv(n)),e.duration=n=>e.check(Bv(n))});function Up(e){return Js(va,e)}a(Up,"string");var st=A("ZodStringFormat",(e,t)=>{Qe.init(e,t),Lp.init(e,t)}),jp=A("ZodEmail",(e,t)=>{ed.init(e,t),st.init(e,t)});function xx(e){return Xs(jp,e)}a(xx,"email");var Kc=A("ZodGUID",(e,t)=>{Xl.init(e,t),st.init(e,t)});function Ax(e){return ua(Kc,e)}a(Ax,"guid");var fn=A("ZodUUID",(e,t)=>{Ql.init(e,t),st.init(e,t)});function Ix(e){return Qs(fn,e)}a(Ix,"uuid");function Rx(e){return ec(fn,e)}a(Rx,"uuidv4");function Cx(e){return tc(fn,e)}a(Cx,"uuidv6");function Ox(e){return rc(fn,e)}a(Ox,"uuidv7");var Qc=A("ZodURL",(e,t)=>{Rs.init(e,t),st.init(e,t)});function kx(e){return ei(Qc,e)}a(kx,"url");function $x(e){return ei(Qc,{protocol:/^https?$/,hostname:nr.domain,...oe.normalizeParams(e)})}a($x,"httpUrl");var Fp=A("ZodEmoji",(e,t)=>{td.init(e,t),st.init(e,t)});function Dx(e){return nc(Fp,e)}a(Dx,"emoji");var Bp=A("ZodNanoID",(e,t)=>{rd.init(e,t),st.init(e,t)});function Nx(e){return oc(Bp,e)}a(Nx,"nanoid");var qp=A("ZodCUID",(e,t)=>{nd.init(e,t),st.init(e,t)});function zx(e){return ic(qp,e)}a(zx,"cuid");var Vp=A("ZodCUID2",(e,t)=>{od.init(e,t),st.init(e,t)});function Ux(e){return ac(Vp,e)}a(Ux,"cuid2");var Gp=A("ZodULID",(e,t)=>{id.init(e,t),st.init(e,t)});function Mx(e){return sc(Gp,e)}a(Mx,"ulid");var Hp=A("ZodXID",(e,t)=>{ad.init(e,t),st.init(e,t)});function Lx(e){return cc(Hp,e)}a(Lx,"xid");var Zp=A("ZodKSUID",(e,t)=>{sd.init(e,t),st.init(e,t)});function jx(e){return uc(Zp,e)}a(jx,"ksuid");var Wp=A("ZodIPv4",(e,t)=>{pd.init(e,t),st.init(e,t)});function Fx(e){return lc(Wp,e)}a(Fx,"ipv4");var t_=A("ZodMAC",(e,t)=>{md.init(e,t),st.init(e,t)});function Bx(e){return Wd(t_,e)}a(Bx,"mac");var Kp=A("ZodIPv6",(e,t)=>{fd.init(e,t),st.init(e,t)});function qx(e){return dc(Kp,e)}a(qx,"ipv6");var Jp=A("ZodCIDRv4",(e,t)=>{hd.init(e,t),st.init(e,t)});function Vx(e){return pc(Jp,e)}a(Vx,"cidrv4");var Yp=A("ZodCIDRv6",(e,t)=>{gd.init(e,t),st.init(e,t)});function Gx(e){return fc(Yp,e)}a(Gx,"cidrv6");var Xp=A("ZodBase64",(e,t)=>{yd.init(e,t),st.init(e,t)});function Hx(e){return mc(Xp,e)}a(Hx,"base64");var Qp=A("ZodBase64URL",(e,t)=>{vd.init(e,t),st.init(e,t)});function Zx(e){return hc(Qp,e)}a(Zx,"base64url");var ef=A("ZodE164",(e,t)=>{_d.init(e,t),st.init(e,t)});function Wx(e){return gc(ef,e)}a(Wx,"e164");var tf=A("ZodJWT",(e,t)=>{bd.init(e,t),st.init(e,t)});function Kx(e){return yc(tf,e)}a(Kx,"jwt");var _a=A("ZodCustomStringFormat",(e,t)=>{Ed.init(e,t),st.init(e,t)});function Jx(e,t,n={}){return di(_a,e,t,n)}a(Jx,"stringFormat");function Yx(e){return di(_a,"hostname",nr.hostname,e)}a(Yx,"hostname");function Xx(e){return di(_a,"hex",nr.hex,e)}a(Xx,"hex");function Qx(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,r=nr[o];if(!r)throw new Error(`Unrecognized hash format: ${o}`);return di(_a,o,r,t)}a(Qx,"hash");var ba=A("ZodNumber",(e,t)=>{na.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Zy(e,o,r,i),e.gt=(o,r)=>e.check(Qr(o,r)),e.gte=(o,r)=>e.check(Ct(o,r)),e.min=(o,r)=>e.check(Ct(o,r)),e.lt=(o,r)=>e.check(Xr(o,r)),e.lte=(o,r)=>e.check(Jt(o,r)),e.max=(o,r)=>e.check(Jt(o,r)),e.int=o=>e.check(Mp(o)),e.safe=o=>e.check(Mp(o)),e.positive=o=>e.check(Qr(0,o)),e.nonnegative=o=>e.check(Ct(0,o)),e.negative=o=>e.check(Xr(0,o)),e.nonpositive=o=>e.check(Jt(0,o)),e.multipleOf=(o,r)=>e.check(Ln(o,r)),e.step=(o,r)=>e.check(Ln(o,r)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function r_(e){return vc(ba,e)}a(r_,"number");var fi=A("ZodNumberFormat",(e,t)=>{Cs.init(e,t),ba.init(e,t)});function Mp(e){return bc(fi,e)}a(Mp,"int");function eA(e){return ep(fi,e)}a(eA,"float32");function tA(e){return tp(fi,e)}a(tA,"float64");function rA(e){return rp(fi,e)}a(rA,"int32");function nA(e){return np(fi,e)}a(nA,"uint32");var Ea=A("ZodBoolean",(e,t)=>{Xo.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Wy(e,n,o,r)});function n_(e){return Ec(Ea,e)}a(n_,"boolean");var Sa=A("ZodBigInt",(e,t)=>{oa.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Ky(e,o,r,i),e.gte=(o,r)=>e.check(Ct(o,r)),e.min=(o,r)=>e.check(Ct(o,r)),e.gt=(o,r)=>e.check(Qr(o,r)),e.gte=(o,r)=>e.check(Ct(o,r)),e.min=(o,r)=>e.check(Ct(o,r)),e.lt=(o,r)=>e.check(Xr(o,r)),e.lte=(o,r)=>e.check(Jt(o,r)),e.max=(o,r)=>e.check(Jt(o,r)),e.positive=o=>e.check(Qr(BigInt(0),o)),e.negative=o=>e.check(Xr(BigInt(0),o)),e.nonpositive=o=>e.check(Jt(BigInt(0),o)),e.nonnegative=o=>e.check(Ct(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(Ln(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function oA(e){return op(Sa,e)}a(oA,"bigint");var rf=A("ZodBigIntFormat",(e,t)=>{Sd.init(e,t),Sa.init(e,t)});function iA(e){return ip(rf,e)}a(iA,"int64");function aA(e){return ap(rf,e)}a(aA,"uint64");var o_=A("ZodSymbol",(e,t)=>{Td.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Jy(e,n,o,r)});function sA(e){return sp(o_,e)}a(sA,"symbol");var i_=A("ZodUndefined",(e,t)=>{Pd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Xy(e,n,o,r)});function cA(e){return cp(i_,e)}a(cA,"_undefined");var a_=A("ZodNull",(e,t)=>{wd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Yy(e,n,o,r)});function s_(e){return up(a_,e)}a(s_,"_null");var c_=A("ZodAny",(e,t)=>{Os.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>tv(e,n,o,r)});function uA(){return Pc(c_)}a(uA,"any");var u_=A("ZodUnknown",(e,t)=>{ks.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>rv(e,n,o,r)});function pi(){return wc(u_)}a(pi,"unknown");var l_=A("ZodNever",(e,t)=>{xd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ev(e,n,o,r)});function nf(e){return lp(l_,e)}a(nf,"never");var d_=A("ZodVoid",(e,t)=>{$s.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Qy(e,n,o,r)});function lA(e){return xc(d_,e)}a(lA,"_void");var eu=A("ZodDate",(e,t)=>{Ds.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(o,r,i)=>nv(e,o,r,i),e.min=(o,r)=>e.check(Ct(o,r)),e.max=(o,r)=>e.check(Jt(o,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function dA(e){return dp(eu,e)}a(dA,"date");var p_=A("ZodArray",(e,t)=>{Ns.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hv(e,n,o,r),e.element=t.element,e.min=(n,o)=>e.check(Tt(n,o)),e.nonempty=n=>e.check(Tt(1,n)),e.max=(n,o)=>e.check(vo(n,o)),e.length=(n,o)=>e.check(_o(n,o)),e.unwrap=()=>e.element});function tu(e,t){return Vy(p_,e,t)}a(tu,"array");function pA(e){let t=e._zod.def.shape;return af(Object.keys(t))}a(pA,"keyof");var ru=A("ZodObject",(e,t)=>{Yg.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>gv(e,n,o,r),oe.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>af(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:pi()}),e.loose=()=>e.clone({...e._zod.def,catchall:pi()}),e.strict=()=>e.clone({...e._zod.def,catchall:nf()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>oe.extend(e,n),e.safeExtend=n=>oe.safeExtend(e,n),e.merge=n=>oe.merge(e,n),e.pick=n=>oe.pick(e,n),e.omit=n=>oe.omit(e,n),e.partial=(...n)=>oe.partial(cf,e,n[0]),e.required=(...n)=>oe.required(uf,e,n[0])});function fA(e,t){let n={type:"object",shape:e??{},...oe.normalizeParams(t)};return new ru(n)}a(fA,"object");function mA(e,t){return new ru({type:"object",shape:e,catchall:nf(),...oe.normalizeParams(t)})}a(mA,"strictObject");function hA(e,t){return new ru({type:"object",shape:e,catchall:pi(),...oe.normalizeParams(t)})}a(hA,"looseObject");var nu=A("ZodUnion",(e,t)=>{Qo.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>bp(e,n,o,r),e.options=t.options});function of(e,t){return new nu({type:"union",options:e,...oe.normalizeParams(t)})}a(of,"union");var f_=A("ZodXor",(e,t)=>{nu.init(e,t),Id.init(e,t),e._zod.processJSONSchema=(n,o,r)=>bp(e,n,o,r),e.options=t.options});function gA(e,t){return new f_({type:"union",options:e,inclusive:!1,...oe.normalizeParams(t)})}a(gA,"xor");var m_=A("ZodDiscriminatedUnion",(e,t)=>{nu.init(e,t),zs.init(e,t)});function yA(e,t,n){return new m_({type:"union",options:t,discriminator:e,...oe.normalizeParams(n)})}a(yA,"discriminatedUnion");var h_=A("ZodIntersection",(e,t)=>{Rd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>yv(e,n,o,r)});function g_(e,t){return new h_({type:"intersection",left:e,right:t})}a(g_,"intersection");var y_=A("ZodTuple",(e,t)=>{Us.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>vv(e,n,o,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function v_(e,t,n){let o=t instanceof xe,r=o?n:t,i=o?t:null;return new y_({type:"tuple",items:e,rest:i,...oe.normalizeParams(r)})}a(v_,"tuple");var ou=A("ZodRecord",(e,t)=>{Ms.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_v(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType});function __(e,t,n){return new ou({type:"record",keyType:e,valueType:t,...oe.normalizeParams(n)})}a(__,"record");function vA(e,t,n){let o=Dt(e);return o._zod.values=void 0,new ou({type:"record",keyType:o,valueType:t,...oe.normalizeParams(n)})}a(vA,"partialRecord");function _A(e,t,n){return new ou({type:"record",keyType:e,valueType:t,mode:"loose",...oe.normalizeParams(n)})}a(_A,"looseRecord");var b_=A("ZodMap",(e,t)=>{Cd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>fv(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(en(...n)),e.nonempty=n=>e.check(en(1,n)),e.max=(...n)=>e.check(jn(...n)),e.size=(...n)=>e.check(yo(...n))});function bA(e,t,n){return new b_({type:"map",keyType:e,valueType:t,...oe.normalizeParams(n)})}a(bA,"map");var E_=A("ZodSet",(e,t)=>{Od.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>mv(e,n,o,r),e.min=(...n)=>e.check(en(...n)),e.nonempty=n=>e.check(en(1,n)),e.max=(...n)=>e.check(jn(...n)),e.size=(...n)=>e.check(yo(...n))});function EA(e,t){return new E_({type:"set",valueType:e,...oe.normalizeParams(t)})}a(EA,"set");var ya=A("ZodEnum",(e,t)=>{Ls.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(o,r,i)=>ov(e,o,r,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{let i={};for(let s of o)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new ya({...t,checks:[],...oe.normalizeParams(r),entries:i})},e.exclude=(o,r)=>{let i={...t.entries};for(let s of o)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new ya({...t,checks:[],...oe.normalizeParams(r),entries:i})}});function af(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new ya({type:"enum",entries:n,...oe.normalizeParams(t)})}a(af,"_enum");function SA(e,t){return new ya({type:"enum",entries:e,...oe.normalizeParams(t)})}a(SA,"nativeEnum");var S_=A("ZodLiteral",(e,t)=>{js.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>iv(e,n,o,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function TA(e,t){return new S_({type:"literal",values:Array.isArray(e)?e:[e],...oe.normalizeParams(t)})}a(TA,"literal");var T_=A("ZodFile",(e,t)=>{kd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>cv(e,n,o,r),e.min=(n,o)=>e.check(en(n,o)),e.max=(n,o)=>e.check(jn(n,o)),e.mime=(n,o)=>e.check(ai(Array.isArray(n)?n:[n],o))});function PA(e){return fp(T_,e)}a(PA,"file");var P_=A("ZodTransform",(e,t)=>{Fs.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>pv(e,n,o,r),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new po(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(oe.issue(i,n.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(oe.issue(s))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(i=>(n.value=i,n)):(n.value=r,n)}});function sf(e){return new P_({type:"transform",transform:e})}a(sf,"transform");var cf=A("ZodOptional",(e,t)=>{ia.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ep(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Jc(e){return new cf({type:"optional",innerType:e})}a(Jc,"optional");var w_=A("ZodExactOptional",(e,t)=>{$d.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ep(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function x_(e){return new w_({type:"optional",innerType:e})}a(x_,"exactOptional");var A_=A("ZodNullable",(e,t)=>{Bs.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>bv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Yc(e){return new A_({type:"nullable",innerType:e})}a(Yc,"nullable");function wA(e){return Jc(Yc(e))}a(wA,"nullish");var I_=A("ZodDefault",(e,t)=>{Dd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Sv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function R_(e,t){return new I_({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():oe.shallowClone(t)}})}a(R_,"_default");var C_=A("ZodPrefault",(e,t)=>{Nd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Tv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function O_(e,t){return new C_({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():oe.shallowClone(t)}})}a(O_,"prefault");var uf=A("ZodNonOptional",(e,t)=>{zd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ev(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function k_(e,t){return new uf({type:"nonoptional",innerType:e,...oe.normalizeParams(t)})}a(k_,"nonoptional");var $_=A("ZodSuccess",(e,t)=>{Ud.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>uv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function xA(e){return new $_({type:"success",innerType:e})}a(xA,"success");var D_=A("ZodCatch",(e,t)=>{Md.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Pv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function N_(e,t){return new D_({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}a(N_,"_catch");var z_=A("ZodNaN",(e,t)=>{Ld.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>av(e,n,o,r)});function AA(e){return pp(z_,e)}a(AA,"nan");var lf=A("ZodPipe",(e,t)=>{qs.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>wv(e,n,o,r),e.in=t.in,e.out=t.out});function Xc(e,t){return new lf({type:"pipe",in:e,out:t})}a(Xc,"pipe");var df=A("ZodCodec",(e,t)=>{lf.init(e,t),aa.init(e,t)});function IA(e,t,n){return new df({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}a(IA,"codec");var U_=A("ZodReadonly",(e,t)=>{jd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function M_(e){return new U_({type:"readonly",innerType:e})}a(M_,"readonly");var L_=A("ZodTemplateLiteral",(e,t)=>{Fd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>sv(e,n,o,r)});function RA(e,t){return new L_({type:"template_literal",parts:e,...oe.normalizeParams(t)})}a(RA,"templateLiteral");var j_=A("ZodLazy",(e,t)=>{Vd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Iv(e,n,o,r),e.unwrap=()=>e._zod.def.getter()});function F_(e){return new j_({type:"lazy",getter:e})}a(F_,"lazy");var B_=A("ZodPromise",(e,t)=>{qd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Av(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function CA(e){return new B_({type:"promise",innerType:e})}a(CA,"promise");var q_=A("ZodFunction",(e,t)=>{Bd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>dv(e,n,o,r)});function OA(e){return new q_({type:"function",input:Array.isArray(e?.input)?v_(e?.input):e?.input??tu(pi()),output:e?.output??pi()})}a(OA,"_function");var iu=A("ZodCustom",(e,t)=>{Vs.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>lv(e,n,o,r)});function kA(e){let t=new at({check:"custom"});return t._zod.check=e,t}a(kA,"check");function $A(e,t){return $c(iu,e??(()=>!0),t)}a($A,"custom");function V_(e,t={}){return mp(iu,e,t)}a(V_,"refine");function G_(e){return hp(e)}a(G_,"superRefine");var DA=gp,NA=yp;function zA(e,t={}){let n=new iu({type:"custom",check:"custom",fn:a(o=>o instanceof e,"fn"),abort:!0,...oe.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}a(zA,"_instanceof");var UA=a((...e)=>vp({Codec:df,Boolean:Ea,String:va},...e),"stringbool");function MA(e){let t=F_(()=>of([Up(e),r_(),n_(),s_(),tu(t),__(Up(),t)]));return t}a(MA,"json");function LA(e,t){return Xc(sf(e),t)}a(LA,"preprocess");var oj={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function ij(e){yt({customError:e})}a(ij,"setErrorMap");function aj(){return yt().customError}a(aj,"getErrorMap");var H_;H_||(H_={});var ue={...Wc,...kp,iso:ga},sj=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function cj(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}a(cj,"detectVersion");function uj(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===o){let r=n[1];if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}a(uj,"resolveRef");function jA(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return ue.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return ue.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let i=uj(r,t),s=Gt(i,t);return t.refs.set(r,s),t.processing.delete(r),s}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return ue.null();if(r.length===0)return ue.never();if(r.length===1)return ue.literal(r[0]);if(r.every(s=>typeof s=="string"))return ue.enum(r);let i=r.map(s=>ue.literal(s));return i.length<2?i[0]:ue.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return ue.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(i=>{let s={...e,type:i};return jA(s,t)});return r.length===0?ue.never():r.length===1?r[0]:ue.union(r)}if(!n)return ue.any();let o;switch(n){case"string":{let r=ue.string();if(e.format){let i=e.format;i==="email"?r=r.check(ue.email()):i==="uri"||i==="uri-reference"?r=r.check(ue.url()):i==="uuid"||i==="guid"?r=r.check(ue.uuid()):i==="date-time"?r=r.check(ue.iso.datetime()):i==="date"?r=r.check(ue.iso.date()):i==="time"?r=r.check(ue.iso.time()):i==="duration"?r=r.check(ue.iso.duration()):i==="ipv4"?r=r.check(ue.ipv4()):i==="ipv6"?r=r.check(ue.ipv6()):i==="mac"?r=r.check(ue.mac()):i==="cidr"?r=r.check(ue.cidrv4()):i==="cidr-v6"?r=r.check(ue.cidrv6()):i==="base64"?r=r.check(ue.base64()):i==="base64url"?r=r.check(ue.base64url()):i==="e164"?r=r.check(ue.e164()):i==="jwt"?r=r.check(ue.jwt()):i==="emoji"?r=r.check(ue.emoji()):i==="nanoid"?r=r.check(ue.nanoid()):i==="cuid"?r=r.check(ue.cuid()):i==="cuid2"?r=r.check(ue.cuid2()):i==="ulid"?r=r.check(ue.ulid()):i==="xid"?r=r.check(ue.xid()):i==="ksuid"&&(r=r.check(ue.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),o=r;break}case"number":case"integer":{let r=n==="integer"?ue.number().int():ue.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),o=r;break}case"boolean":{o=ue.boolean();break}case"null":{o=ue.null();break}case"object":{let r={},i=e.properties||{},s=new Set(e.required||[]);for(let[d,f]of Object.entries(i)){let h=Gt(f,t);r[d]=s.has(d)?h:h.optional()}if(e.propertyNames){let d=Gt(e.propertyNames,t),f=e.additionalProperties&&typeof e.additionalProperties=="object"?Gt(e.additionalProperties,t):ue.any();if(Object.keys(r).length===0){o=ue.record(d,f);break}let h=ue.object(r).passthrough(),g=ue.looseRecord(d,f);o=ue.intersection(h,g);break}if(e.patternProperties){let d=e.patternProperties,f=Object.keys(d),h=[];for(let m of f){let p=Gt(d[m],t),y=ue.string().regex(new RegExp(m));h.push(ue.looseRecord(y,p))}let g=[];if(Object.keys(r).length>0&&g.push(ue.object(r).passthrough()),g.push(...h),g.length===0)o=ue.object({}).passthrough();else if(g.length===1)o=g[0];else{let m=ue.intersection(g[0],g[1]);for(let p=2;p<g.length;p++)m=ue.intersection(m,g[p]);o=m}break}let u=ue.object(r);e.additionalProperties===!1?o=u.strict():typeof e.additionalProperties=="object"?o=u.catchall(Gt(e.additionalProperties,t)):o=u.passthrough();break}case"array":{let r=e.prefixItems,i=e.items;if(r&&Array.isArray(r)){let s=r.map(d=>Gt(d,t)),u=i&&typeof i=="object"&&!Array.isArray(i)?Gt(i,t):void 0;u?o=ue.tuple(s).rest(u):o=ue.tuple(s),typeof e.minItems=="number"&&(o=o.check(ue.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(ue.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(d=>Gt(d,t)),u=e.additionalItems&&typeof e.additionalItems=="object"?Gt(e.additionalItems,t):void 0;u?o=ue.tuple(s).rest(u):o=ue.tuple(s),typeof e.minItems=="number"&&(o=o.check(ue.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(ue.maxLength(e.maxItems)))}else if(i!==void 0){let s=Gt(i,t),u=ue.array(s);typeof e.minItems=="number"&&(u=u.min(e.minItems)),typeof e.maxItems=="number"&&(u=u.max(e.maxItems)),o=u}else o=ue.array(ue.any());break}default:throw new Error(`Unsupported type: ${n}`)}return e.description&&(o=o.describe(e.description)),e.default!==void 0&&(o=o.default(e.default)),o}a(jA,"convertBaseSchema");function Gt(e,t){if(typeof e=="boolean")return e?ue.any():ue.never();let n=jA(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let u=e.anyOf.map(f=>Gt(f,t)),d=ue.union(u);n=o?ue.intersection(n,d):d}if(e.oneOf&&Array.isArray(e.oneOf)){let u=e.oneOf.map(f=>Gt(f,t)),d=ue.xor(u);n=o?ue.intersection(n,d):d}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:ue.any();else{let u=o?n:Gt(e.allOf[0],t),d=o?0:1;for(let f=d;f<e.allOf.length;f++)u=ue.intersection(u,Gt(e.allOf[f],t));n=u}e.nullable===!0&&t.version==="openapi-3.0"&&(n=ue.nullable(n)),e.readOnly===!0&&(n=ue.readonly(n));let r={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let u of i)u in e&&(r[u]=e[u]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let u of s)u in e&&(r[u]=e[u]);for(let u of Object.keys(e))sj.has(u)||(r[u]=e[u]);return Object.keys(r).length>0&&t.registry.add(n,r),n}a(Gt,"convertSchema");function FA(e,t){if(typeof e=="boolean")return e?ue.any():ue.never();let n=cj(e,t?.defaultTarget),o=e.$defs||e.definitions||{},r={version:n,defs:o,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??Nt};return Gt(e,r)}a(FA,"fromJSONSchema");var Z_={};hr(Z_,{bigint:()=>fj,boolean:()=>pj,date:()=>mj,number:()=>dj,string:()=>lj});function lj(e){return Ys(va,e)}a(lj,"string");function dj(e){return _c(ba,e)}a(dj,"number");function pj(e){return Sc(Ea,e)}a(pj,"boolean");function fj(e){return Tc(Sa,e)}a(fj,"bigint");function mj(e){return Ac(eu,e)}a(mj,"date");yt(Gs());var EY=pf.enum(["active","out_of_credits","rejected","unreachable"]);var BA=(o=>(o.AGENT_DECIDE="agent-decide",o.CHOOSE_YOURSELF="choose-yourself",o.LEAVE_EMPTY="leave-empty",o))(BA||{}),W_=(n=>(n.FILE="FILE",n.TABLE="TABLE",n))(W_||{}),K_=(o=>(o.SSE="sse",o.STREAMABLE_HTTP="streamable-http",o.SIMPLE_HTTP="http",o))(K_||{});var J_=(o=>(o.TEXT="text",o.NUMBER="number",o.BOOLEAN="boolean",o))(J_||{});var Y_=(n=>(n.IN_PROGRESS="in-progress",n.COMPLETED="completed",n))(Y_||{});var hj=O({mode:Se(BA),value:Re()}),gj=O({auth:q(S()),fields:Ce(S(),hj)}),yj=O({pieceName:S(),pieceVersion:S(),actionName:S(),predefinedInput:q(gj)}),vj=O({type:be("PIECE"),toolName:S().check(Tt(1)),pieceMetadata:yj}),_j=O({type:be("none")}),bj=O({type:be("access_token"),accessToken:S()}),Ej=O({type:be("api_key"),apiKey:S(),apiKeyHeader:S()}),Sj=O({type:be("headers"),headers:Ce(S(),S())}),Tj=To("type",[_j,bj,Ej,Sj]),qA=O({type:be("FLOW"),toolName:S().check(Tt(1)),externalFlowId:S(),flowDisplayName:q(S())}),VA=O({type:be("MCP"),toolName:S().check(Tt(1)),serverUrl:ax(),protocol:Se(K_),auth:Tj}),GA=O({type:be("KNOWLEDGE_BASE"),toolName:S().check(Tt(1)),sourceType:Se(W_),sourceId:S(),sourceName:S()}),Pj=To("type",[vj,qA,VA,GA]),wj=O({displayName:S(),description:q(S()),type:Se(J_)}),HA=O({type:be("MARKDOWN"),markdown:S()}),Ta={type:be("TOOL_CALL"),input:vt(Ce(S(),Re())),output:q(Re()),toolName:S(),status:Se(Y_),toolCallId:S(),startTime:S(),endTime:q(S())},KY=O(Ta),ZA=To("toolCallType",[O({...Ta,toolCallType:be("PIECE"),pieceName:S(),pieceVersion:S(),actionName:S()}),O({...Ta,toolCallType:be("FLOW"),displayName:S(),externalFlowId:S()}),O({...Ta,toolCallType:be("MCP"),displayName:S(),serverUrl:S()}),O({...Ta,toolCallType:be("KNOWLEDGE_BASE"),displayName:S(),sourceType:S()}),O({...Ta,toolCallType:be("UNKNOWN"),displayName:S()})]),xj=Ue([HA,ZA]);var Aj=10800*1e3,Ij=900*1e3;var Q_=(n=>(n.IMAGE="image",n.TEXT="text",n))(Q_||{}),Gn=O({apiKey:S()}),Cj=Gn,Oj=O({apiKey:S(),apiKeyHash:S()}),kj=Gn,$j=Gn,Dj=Gn,Nj=Gn,zj=Gn,Uj=Gn,Mj=Gn,YA=O({serviceAccountJson:S().check(Tt(1))}),XA=O({accessKeyId:S().check(Tt(1)),secretAccessKey:S().check(Tt(1))}),Lj=O({}),jj=O({}),Fj=O({}),Bj=O({}),qj=O({}),Vj=O({}),eb=O({modelId:S(),modelName:S(),modelType:Se(Q_)}),QA=O({apiKeyHeader:S(),baseUrl:S(),models:we(eb),defaultHeaders:q(Ce(S(),S())),apiStyle:q(Se(["chat","responses"]))}),eI=O({accountId:S(),gatewayId:S(),models:we(eb),vertexProject:q(S()),vertexRegion:q(S())}),tI=O({resourceName:S(),apiVersion:wo(Po(e=>typeof e=="string"&&e.trim().length===0?void 0:e),q(S()))}),rI=O({region:S().check(Tt(1))}),nI=O({project:S().check(Ft(/^[a-z0-9][a-z0-9-]{0,62}$/)),region:S().check(Ft(/^[a-z0-9][a-z0-9-]{0,62}$/)),models:we(eb)}),oI=O({}),Gj=Ue([Cj,Dj,Nj,zj,Uj,$j,kj,Oj,XA,YA,Mj]),iI=Ue([QA,eI,tI,nI,rI,Lj,Fj,Bj,qj,jj,Vj,oI]),Hj=O({id:S(),name:S(),type:Se(Q_)}),Zj=O({id:S(),name:S(),provider:Se(ha),config:iI,enabledForChat:Ze()}),Wj=O({provider:Se(ha),name:S(),enabledForChat:Ze(),keys:we(O({id:S(),name:S()}))}),Kj=O({provider:Se(ha),configId:S(),config:iI,auth:Gj,platformId:S()});var QY={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},WA=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],Jj=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],aI=["claude-sonnet-4.6","claude-opus-4.7","claude-opus-4.8","claude-haiku-4.5"],X_=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.7-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],Yj=["grok-4.20"],eX=aI.map(e=>`anthropic/${e}`),Xj={openai:WA,anthropic:Jj,google:X_,vertex:X_,activepieces:[...aI.map(e=>`anthropic/${e}`),...WA.map(e=>`openai/${e}`),...X_.map(e=>`google/${e}`),...Yj.map(e=>`x-ai/${e}`)]};var KA=128e3,Qj={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,vertex:1048576,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function eF({provider:e}){return e?Qj[e]??KA:KA}a(eF,"getMaxContextTokens");var JA={openai:"text-embedding-3-small",google:"text-embedding-004",azure:"text-embedding-3-small",activepieces:"text-embedding-3-small",openrouter:"openai/text-embedding-3-small"},tF={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},rF=new Set(["anthropic","mistral","xai","deepseek","zai","qwen","minimax","moonshot"]),nF={xai:"https://api.x.ai/v1",deepseek:"https://api.deepseek.com/v1",zai:"https://api.z.ai/api/paas/v4",qwen:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",minimax:"https://api.minimax.io/v1",moonshot:"https://api.moonshot.ai/v1"};function Bt(e){return{chatModels:Xj[e],maxContextTokens:eF({provider:e}),defaultEmbeddingModel:JA[e],supportsEmbedding:JA[e]!==void 0,supportsImageGeneration:!rF.has(e),webSearch:tF[e]}}a(Bt,"buildProviderCapabilities");var oF={openai:Bt("openai"),anthropic:Bt("anthropic"),openrouter:Bt("openrouter"),azure:Bt("azure"),google:Bt("google"),"cloudflare-gateway":Bt("cloudflare-gateway"),custom:Bt("custom"),bedrock:Bt("bedrock"),vertex:Bt("vertex"),mistral:Bt("mistral"),activepieces:Bt("activepieces"),xai:Bt("xai"),deepseek:Bt("deepseek"),zai:Bt("zai"),qwen:Bt("qwen"),minimax:Bt("minimax"),moonshot:Bt("moonshot")};var iF=O({base64Url:S(),fileName:S(),extension:q(S())}),aF=O({mimeType:S(),url:S(),fileName:q(S())}),tb=Ue([iF,aF]);var sF=Ue([O({type:be("file"),value:tb}),O({type:be("markdown"),value:S(),files:q(we(tb))})]),cF=O({sessionId:S(),message:S(),files:q(we(S()))});var cI=(n=>(n.ON_NEW_RECORD="ON_NEW_RECORD",n.ON_UPDATE_RECORD="ON_UPDATE_RECORD",n))(cI||{}),uI=(n=>(n.ENABLED="ENABLED",n.DISABLED="DISABLED",n))(uI||{}),rb=(o=>(o.RECORD_CREATED="RECORD_CREATED",o.RECORD_UPDATED="RECORD_UPDATED",o.RECORD_DELETED="RECORD_DELETED",o))(rb||{});var uF=Ue([O({...zr,name:S(),externalId:S(),type:be("STATIC_DROPDOWN"),tableId:S(),projectId:S(),data:O({options:we(O({value:S()}))})}),O({...zr,name:S(),externalId:S(),type:Ue([be("TEXT"),be("NUMBER"),be("DATE"),be("DATETIME")]),tableId:S(),projectId:S()})]),lF=O({...zr,name:S(),folderId:vt(S()),projectId:S(),externalId:S(),status:Mv(uI),trigger:Mv(cI)}),dF=O({...zr,tableId:S(),projectId:S(),cells:Ce(S(),O({updated:S(),created:S(),value:Re(),fieldName:S()}))}),pF=O({events:we(Se(rb)),webhookUrl:S(),flowId:S()}),fF=O({fields:we(O({id:S(),name:S()})),rows:we(Ce(S(),S())),name:S()}),mF=O({projectId:S(),limit:q(Uc.number()),cursor:q(S()),name:q(S()),externalIds:Cp(S()),folderId:q(S()),folderIds:Cp(S())}),hF=O({records:we(we(O({fieldId:S(),value:dI()}))),tableId:S()}),gF=O({cells:q(we(O({fieldId:S(),value:dI()}))),tableId:S(),agentUpdate:q(Ze())}),lI=To("operator",[mi("eq"),mi("neq"),mi("gt"),mi("gte"),mi("lt"),mi("lte"),mi("co"),sI("exists"),sI("not_exists")]),yF=O({tableId:S(),limit:q(Uc.number()),cursor:q(S()),filters:Cp(lI)});function dI(){return wo(Po(e=>e==null?e:String(e)),zc(S()))}a(dI,"coerceToString");function mi(e){return O({fieldId:S(),operator:be(e),value:S()})}a(mi,"valueFilter");function sI(e){return O({fieldId:S(),operator:be(e)})}a(sI,"existenceFilter");var vF=O({status:q(zt()),body:q(Re()),headers:q(Ce(S(),S()))}),_F=O({...zr,deleted:vt(Ao),ownerId:S(),displayName:S(),platformId:S(),externalId:vt(S())});var pI=O({name:S(),description:q(S()),type:S(),required:Ze()}),bF=O({pieceName:S(),triggerName:S(),input:O({toolName:S(),toolDescription:S(),inputSchema:we(pI),returnsResponse:Ze()})});var fI="^[0-9]+\\.[0-9]+\\.[0-9]+$",_X=new RegExp(fI),SF="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",bX=S().check(Ft(new RegExp(fI))),EX=S().check(Ft(new RegExp(SF))),TF=O({packageType:be("ARCHIVE"),pieceType:Se(pa),pieceName:S(),pieceVersion:S(),archiveId:S(),platformId:S()}),mI=O({packageType:be("REGISTRY"),pieceType:be("OFFICIAL"),pieceName:S(),pieceVersion:S()}),hI=O({packageType:be("REGISTRY"),pieceType:be("CUSTOM"),pieceName:S(),pieceVersion:S(),platformId:S()}),SX=Ue([mI,hI]),TX=Ue([TF,mI,hI]);var PF=To("type",[O({type:be("CRON_EXPRESSION"),cronExpression:S(),timezone:S()}),O({type:be("INTERVAL"),intervalMs:sx().check(Ct(6e4))})]),PX=O({...zr,type:Se(or),projectId:S(),flowId:S(),triggerName:S(),schedule:vt(PF),flowVersionId:S(),pieceName:S(),pieceVersion:S(),deleted:vt(S()),simulate:Ze()}),gI=(b=>(b.UNKNOWN="UNKNOWN",b.FLOW_RUN_LOG="FLOW_RUN_LOG",b.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",b.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",b.FLOW_STEP_FILE="FLOW_STEP_FILE",b.SAMPLE_DATA="SAMPLE_DATA",b.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",b.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",b.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",b.PROJECT_RELEASE="PROJECT_RELEASE",b.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",b.PLATFORM_ASSET="PLATFORM_ASSET",b.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",b.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",b.KNOWLEDGE_BASE="KNOWLEDGE_BASE",b.FLOW_BUNDLE="FLOW_BUNDLE",b.PREWARM_SCOPE="PREWARM_SCOPE",b))(gI||{}),yI=(n=>(n.NONE="NONE",n.ZSTD="ZSTD",n))(yI||{}),vI=(n=>(n.S3="S3",n.DB="DB",n))(vI||{}),wX=O({...zr,projectId:vt(S()),platformId:vt(S()),type:Se(gI),compression:Se(yI),data:q(Re()),location:Se(vI),size:vt(zt()),fileName:vt(S()),s3Key:vt(S()),metadata:vt(Ce(S(),S()))}),_I=(o=>(o.ADMIN="ADMIN",o.MEMBER="MEMBER",o.OPERATOR="OPERATOR",o))(_I||{}),bI=(n=>(n.ACTIVE="ACTIVE",n.INACTIVE="INACTIVE",n))(bI||{}),xX=O({id:S(),email:S(),firstName:S(),status:Se(bI),externalId:vt(S()),platformId:vt(S()),platformRole:Se(_I),lastName:S(),created:Ao,updated:Ao,lastActiveDate:vt(Ao),imageUrl:vt(S())});var ob=O({...Ge.shape,...Oe(Ce(S(),Re()),"OBJECT").shape});var ib=O({...Ge.shape,formatProperty:q(S()),...Oe(S(),"RICH_TEXT").shape});var TI=O({...Ge.shape,...Oe(S(),"COLOR").shape});var ab=Ue([vr,Fn,ib,Ap,qn,_r,Bn,kv,Mc,Dv,Vn,Fc,ob,Bc,jc,$v,Lc,TI]),V={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},RichText(e){return{...e,valueSchema:void 0,type:"RICH_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},DateRange(e){return{...e,valueSchema:void 0,type:"DATE_RANGE"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var mn=O({displayName:S(),description:q(S()),hasConnectionIdentifier:q(Ze())});var PI=O({username:S(),password:S()}),sb=O({...mn.shape,username:O({displayName:S(),description:q(S())}),password:O({displayName:S(),description:q(S())}),...Oe(PI,"BASIC_AUTH").shape});var IF=Ce(S(),Ue([vr,Fn,Vn,qn,_r])),cb=O({...mn.shape,props:IF,...Oe(Re(),"CUSTOM_AUTH").shape});var hi=O({...mn.shape,...Oe(O({auth:S()}),"SECRET_TEXT").shape});var RF=Ce(S(),Ue([vr,Fn,hi,Vn,qn,_r,Bn,Ap])),wI=O({...mn.shape,props:RF,...Oe(Re(),"OIDC").shape});var ub=(n=>(n.HEADER="HEADER",n.BODY="BODY",n))(ub||{}),xI=Ue([vr,hi,_r]),AI=Ce(S(),xI),CF=O({props:q(Ce(S(),xI)),authUrl:S(),tokenUrl:S(),scope:we(S()),prompt:q(Ue([be("none"),be("consent"),be("login"),be("omit")])),pkce:q(Ze()),pkceMethod:q(Ue([be("plain"),be("S256")])),authorizationMethod:q(Se(ub)),grantType:q(Ue([Se(Vc),be(Nv)])),extra:q(Ce(S(),S()))}),II=O({access_token:S(),props:q(AI),data:Ce(S(),Nc())}),lb=O({...mn.shape,...CF.shape,...Oe(II,"OAUTH2").shape});var Pa=Ue([sb,cb,wI,lb,hi]),au="Connection",ff={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||au}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||au,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||au}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||au}},None(){}};var uQ={OAUTH2:"OAUTH2",CLOUD_OAUTH2:"OAUTH2",PLATFORM_OAUTH2:"OAUTH2",BASIC_AUTH:"BASIC_AUTH",CUSTOM_AUTH:"CUSTOM_AUTH",OIDC:"OIDC",SECRET_TEXT:"SECRET_TEXT",NO_AUTH:void 0};var OF=O({...Ge.shape,...Oe(Re(),"CUSTOM").shape,code:S()});var kF=Ue([ab,Pa]),db=Ce(S(),kF),CQ=Ce(S(),ab);var RI=Ue([O({strategy:be("CRON"),cronExpression:S()}),O({strategy:be("NONE")})]),wa=class{constructor(t,n,o,r,i,s,u,d,f,h,g,m,p,y,v,E,b,k,N,Z,H){this.name=t;this.displayName=n;this.description=o;this.requireAuth=r;this.props=i;this.type=s;this.handshakeConfiguration=u;this.onHandshake=d;this.renewConfiguration=f;this.onRenew=h;this.onEnable=g;this.onDisable=m;this.onStart=p;this.run=y;this.test=v;this.sampleData=E;this.testStrategy=b;this.outputSchema=k;this.aiMetadata=N;this.classification=Z;this.propertyGroups=H}static{a(this,"ITrigger")}},ar=a(e=>{switch(e.type){case"WEBHOOK":return new wa(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,e.handshakeConfiguration??{strategy:"NONE"},e.onHandshake??(async()=>({status:200})),e.renewConfiguration??{strategy:"NONE"},e.onRenew??(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,e.test?"TEST_FUNCTION":"SIMULATION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"POLLING":return new wa(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"MANUAL":return new wa(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"APP_WEBHOOK":return new wa(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,dt(e.sampleData)&&dt(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups)}},"createTrigger");var CI="2",mf="0.82.0";var pb=class{constructor(t,n,o,r,i,s,u,d,f=mf,h,g="",m){this.displayName=t;this.logoUrl=n;this.authors=o;this.events=r;this.categories=u;this.auth=d;this.minimumSupportedRelease=f;this.maximumSupportedRelease=h;this.description=g;this.deprecated=m;this._actions={};this._triggers={};this.getContextInfo=a(()=>({version:CI}),"getContextInfo");(!DF(f)||NF(f,mf))&&(this.minimumSupportedRelease=mf),i.forEach(p=>this._actions[p.name]=p),s.forEach(p=>this._triggers[p.name]=p)}static{a(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:$F(this.auth),minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},kI=a(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((n,o,r)=>o===r.findIndex(i=>i.type===n.type)))throw new Error("Auth properties must be unique by type");return new pb(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description,e.deprecated)},"createPiece");function $F(e){if(e!==void 0)return Array.isArray(e)?e.map(OI):OI(e)}a($F,"withConnectionIdentifierFlag");function OI(e){return{...e,hasConnectionIdentifier:e.getConnectionIdentifier!==void 0}}a(OI,"flagConnectionIdentifier");function DF(e){return/^\d+\.\d+\.\d+$/.test(e)}a(DF,"isValidSimpleSemver");function NF(e,t){let[n,o,r]=e.split(".").map(Number),[i,s,u]=t.split(".").map(Number);return n!==i?n<i:o!==s?o<s:r<u}a(NF,"isSemverLessThan");var zF=q(Ce(S(),Ce(S(),S()))),$I=O({id:q(S()),name:S(),displayName:S(),logoUrl:S(),description:S(),authors:we(S()),platformId:q(S()),directoryPath:q(S()),auth:q(Ue([Pa,we(Pa)])),version:S(),categories:q(we(Se(fa))),minimumSupportedRelease:q(S()),maximumSupportedRelease:q(S()),deprecated:q(Ze()),i18n:zF}),UF=Se(["human","ai","both"]),DI=O({description:q(S()),idempotent:q(Ze())}),NI=Se(["READ","SEARCH","WRITE","DESTRUCTIVE"]);var MF=Se(["tabs","section","summary","builder","footer"]),zI=O({key:S(),display:MF,label:q(S()),description:q(S()),icon:q(S()),props:we(S())}),UI=O({name:S(),displayName:S(),description:S(),props:db,propertyGroups:q(we(zI)),requireAuth:Ze(),errorHandlingOptions:q(Ov),outputSchema:q(wp()),audience:q(UF),aiMetadata:q(DI),classification:q(NI)}),MI=O({name:S(),displayName:S(),description:S(),props:db,propertyGroups:q(we(zI)),errorHandlingOptions:q(Ov),type:Se(or),sampleData:Re(),handshakeConfiguration:q(wp()),renewConfiguration:q(RI),testStrategy:Se(Hc),outputSchema:q(wp()),aiMetadata:q(DI),classification:q(NI)}),LF=O({...$I.shape,actions:Ce(S(),UI),triggers:Ce(S(),MI)}),jF=O({...$I.shape,actions:zt(),triggers:zt(),suggestedActions:q(we(UI)),suggestedTriggers:q(we(MI))}),LI=O({projectUsage:zt(),pieceType:Se(pa),packageType:Se(qc),platformId:q(S()),archiveId:q(S())}),$ee=O({...LF.shape,...LI.shape}),Dee=O({...jF.shape,...LI.shape}),Nee=O({name:S(),version:S()});var FF=Ke(require("path")),BF=Ke(require("fs/promises"));var xa=require("node:stream");var hf=class{constructor(t,n){this.baseUrl=t;this.authenticationConverter=n}static{a(this,"BaseHttpClient")}getUrl(t){let n=new URL(`${this.baseUrl}${t.url}`),o=`${n.origin}${n.pathname}`,r=new URLSearchParams;return n.searchParams.forEach((i,s)=>{r.append(s,i)}),{urlWithoutQueryParams:o,queryParams:r}}getHeaders(t){let n={Accept:"application/json"};return t.authentication&&this.populateAuthentication(t.authentication,n),t.body&&(t.headers?.["Content-Type"]==="text/csv"?n["Content-Type"]="text/csv":n["Content-Type"]="application/json"),t.headers&&(n={...n,...t.headers}),n}populateAuthentication(t,n){this.authenticationConverter.convert(t,n)}};var gf=class{static{a(this,"DelegatingAuthenticationConverter")}constructor(t=new fb,n=new mb){this.converters={BEARER_TOKEN:t,BASIC:n}}convert(t,n){return this.converters[t.type].convert(t,n)}},fb=class{static{a(this,"BearerTokenAuthenticationConverter")}convert(t,n){return n.Authorization=`Bearer ${t.token}`,n}},mb=class{static{a(this,"BasicTokenAuthenticationConverter")}convert(t,n){let o=`${t.username}:${t.password}`,r=Buffer.from(o).toString("base64");return n.Authorization=`Basic ${r}`,n}};var su=class extends Error{constructor(n,o){let r=o.status||500,i=Buffer.isBuffer(o.responseBody)?o.responseBody.toString():o.responseBody;super(JSON.stringify({response:{status:r,body:i},request:{body:n}}));this.requestBody=n;this.status=r,this.responseBody=i}static{a(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};function jI({error:e,requestBody:t}){return e instanceof su?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}a(jI,"toFailsafeOutput");var Ht=(s=>(s.GET="GET",s.POST="POST",s.PATCH="PATCH",s.PUT="PUT",s.DELETE="DELETE",s.HEAD="HEAD",s))(Ht||{});var yf=class extends hf{static{a(this,"FetchHttpClient")}constructor(t="",n=new gf){super(t,n)}async sendRequest(t,n){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:o,queryParams:r}=this.getUrl(t),i=this.getHeaders(t),s=t.queryParams??{};for(let[N,Z]of Object.entries(s))r.append(N,Z);let u=r.toString(),d=u?`${o}?${u}`:o,f=t.responseType??"json",h=t.followRedirects??!0,g=t.retries??0,{body:m,extraHeaders:p,isStream:y}=vf(t.method)?qF(t.body,i):{body:void 0,extraHeaders:{},isStream:!1},v=GF({...i,...p}),E=await VF(async()=>{let N=new AbortController,Z=t.timeout&&t.timeout>0?setTimeout(()=>N.abort(),t.timeout):void 0;try{let H={method:t.method.toString(),headers:v,body:m,redirect:h?"follow":"manual",signal:N.signal};return y&&(H.duplex="half"),n?.dispatcher!==void 0&&(H.dispatcher=n.dispatcher),await fetch(d,H)}finally{Z!==void 0&&clearTimeout(Z)}},y?0:g),b=h?300:400;if(E.status<200||E.status>=b){let N=await FI(E,f==="stream"?"text":f),Z=new su(t.body,{status:E.status,responseBody:N});throw console.error("[HttpClient#(sanitized error message)] Request failed:",Z),Z}let k=await FI(E,f);return{status:E.status,headers:HF(E.headers),body:k}}};function vf(e){return e!=="GET"&&e!=="HEAD"}a(vf,"acceptsRequestBody");function qF(e,t){if(qI(e))return{body:void 0,extraHeaders:{},isStream:!1};if(WF(e)){let o=ZF(e);if(o!==null)return{body:o,extraHeaders:e.getHeaders(),isStream:!1};let r=new xa.PassThrough;return e.on("error",i=>r.destroy(i)),e.pipe(r),{body:r,extraHeaders:e.getHeaders(),isStream:!0}}return e instanceof xa.Readable?{body:e,extraHeaders:{},isStream:!0}:typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}a(qF,"serializeBody");async function FI(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"stream":return qI(e.body)?xa.Readable.from([]):xa.Readable.fromWeb(e.body);case"blob":return await e.blob();case"text":return await e.text();default:{let n=await e.text();if(n.length===0)return;try{return JSON.parse(n)}catch{return n}}}}a(FI,"parseResponseBody");async function VF(e,t){let n;for(let o=0;o<=t;o++)try{let r=await e();if(r.status>=500&&o<t){await BI(o);continue}return r}catch(r){if(n=r,o<t){await BI(o);continue}throw r}throw n}a(VF,"sendWithRetries");function BI(e){let t=Math.min(1e3*2**e,3e4);return new Promise(n=>setTimeout(n,t))}a(BI,"backoff");function GF(e){let t=new Map;for(let[n,o]of Object.entries(e))o!==void 0&&t.set(n.toLowerCase(),[n,Array.isArray(o)?o.join(", "):o]);return Object.fromEntries(t.values())}a(GF,"normalizeHeaders");function HF(e){let t={};return e.forEach((n,o)=>{t[o]=n}),t}a(HF,"toHttpHeaders");function ZF(e){if(!e.hasKnownLength()||e.getLengthSync()>KF)return null;let{data:t}=zv(()=>e.getBuffer());return t}a(ZF,"bufferFormDataIfSafe");function WF(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}a(WF,"isNodeFormData");function qI(e){return e==null}a(qI,"isNil");var KF=100*1024*1024;var Be=new yf;var zq=Ke(require("fs")),ZC=Ke(HC());var Uq={"application/json":"json","application/pdf":"pdf","application/xml":"xml","text/xml":"xml","application/zip":"zip","application/gzip":"gz","application/x-tar":"tar","application/octet-stream":"bin","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/rtf":"rtf","application/javascript":"js","application/x-www-form-urlencoded":"bin","text/plain":"txt","text/html":"html","text/css":"css","text/csv":"csv","text/calendar":"ics","text/markdown":"md","image/png":"png","image/jpeg":"jpeg","image/jpg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/tiff":"tiff","image/x-icon":"ico","image/vnd.microsoft.icon":"ico","image/heic":"heic","audio/mpeg":"mp3","audio/mp4":"m4a","audio/wav":"wav","audio/x-wav":"wav","audio/ogg":"ogg","audio/webm":"weba","video/mp4":"mp4","video/mpeg":"mpeg","video/webm":"webm","video/quicktime":"mov","video/x-msvideo":"avi","font/woff":"woff","font/woff2":"woff2","font/ttf":"ttf","font/otf":"otf"};function Mq(e){let t=e.split(";")[0].trim().toLowerCase();return Uq[t]??""}a(Mq,"contentTypeToExtension");var Lq=a(({baseUrl:e,relativePath:t})=>{let n=e.endsWith("/")?e:`${e}/`,o=t.startsWith("/")?t.slice(1):t;return`${n}${o}`},"joinBaseUrlWithRelativePath"),jq=a((e,t)=>{let n="https://api.example.com";try{let o=t?e(t):void 0;return(o?.endsWith("/")?o.slice(0,-1):o)??n}catch{return n}},"getBaseUrlForDescription");function WC({auth:e,baseUrl:t,authMapping:n,description:o,displayName:r,name:i,props:s,extraProps:u,authLocation:d="headers",classification:f="WRITE"}){return Pe({audience:"human",name:i||"custom_api_call",classification:f,displayName:r||"Custom API Call",description:o||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:V.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:a(async({auth:h})=>({url:V.ShortText({displayName:"URL",description:`Full URL, or a path relative to ${jq(t,h)}`,required:!0,placeholder:"/resource",defaultValue:h?t(h):"",...s?.url??{}})}),"props")}),method:V.StaticDropdown({displayName:"Method",required:!0,defaultValue:"GET",options:{options:Object.values(Ht).map(h=>({label:h,value:h}))},...s?.method??{}}),headers:V.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!1,...s?.headers??{}}),queryParams:V.Object({displayName:"Query Parameters",description:"Appended to the URL as ?key=value.",required:!1,...s?.queryParams??{}}),body_type:V.Dropdown({auth:e,displayName:"Body Type",required:!1,defaultValue:"none",refreshers:["method"],options:a(async({method:h})=>vf(h)?{disabled:!1,options:[{label:"None",value:"none"},{label:"JSON",value:"json"},{label:"Form Data",value:"form_data"},{label:"Raw",value:"raw"}]}:{disabled:!0,placeholder:"Not available for GET or HEAD requests",options:[]},"options")}),body:V.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type","method"],required:!1,props:a(async({body_type:h,method:g})=>{if(!h||!vf(g))return{};let m=h,p={};switch(m){case"none":break;case"json":p.data=V.Json({displayName:"JSON Body",required:!0,...s?.body??{}});break;case"raw":p.data=V.LongText({displayName:"Raw Body",required:!0});break;case"form_data":p.data=V.Array({displayName:"Form Data",required:!0,properties:{fieldName:V.ShortText({displayName:"Field Name",required:!0}),fieldType:V.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:V.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:V.File({displayName:"File Field Value",required:!1})}});break}return p},"props")}),response_is_binary:V.Checkbox({displayName:"Response is Binary",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1,advanced:!0,...s?.response_is_binary??{}}),failsafe:V.Checkbox({displayName:"Return Error as Output",description:"On a failed request, output the error instead of failing the step.",required:!1,advanced:!0,...s?.failsafe??{}}),timeout:V.Number({displayName:"Timeout",description:"Seconds to wait for a response. Empty: up to the flow limit (10 min).",required:!1,advanced:!0,...s?.timeout??{}}),followRedirects:V.Checkbox({displayName:"Follow redirects",description:"Follow 3xx redirects instead of returning them as the response.",required:!1,defaultValue:!1,advanced:!0,...s?.followRedirects??{}}),...u},run:a(async h=>{let{method:g,url:m,headers:p,queryParams:y,body:v,body_type:E,failsafe:b,timeout:k,response_is_binary:N,followRedirects:Z}=h.propsValue;Rp(g,"Method"),Rp(m,"URL");let H=dt(n)?{}:await n(h.auth,h.propsValue),K=m.url,ee=K.startsWith("http://")||K.startsWith("https://")?K:Lq({baseUrl:t(h.auth),relativePath:K}),se={method:g,url:ee,headers:{...p??{},...d==="headers"||!dt(d)?H:{}},queryParams:{...d==="queryParams"?H:{},...y??{}},timeout:k?k*1e3:0,followRedirects:Z};if(N&&(se.responseType="arraybuffer"),v)if(E&&E!=="none"){let Q=v.data;if(E==="form_data"){let Le=Q,ce=new ZC.default;for(let{fieldName:J,fieldType:W,textFieldValue:ne,fileFieldValue:X}of Le)W==="text"&&!Zc(ne)?ce.append(J,ne):W==="file"&&!Zc(X)&&ce.append(J,X.data,{filename:X?.filename});se.body=ce,se.headers={...se.headers,...ce.getHeaders()}}else se.body=Q}else E||(se.body=v);try{let Q=await Be.sendRequest(se);return await Fq(h.files,Q.body,Q.status,Q.headers,N)}catch(Q){if(b)return jI({error:Q,requestBody:se.body});throw Q}},"run")})}a(WC,"createCustomApiCallAction");var Fq=a(async(e,t,n,o,r)=>{let i;if(r&&Bq(t)){let s=Array.isArray(o?.["content-type"])?o["content-type"][0]:o?.["content-type"],u=Mq(s??"")||"txt",d;t instanceof ArrayBuffer?d=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?d=t:d=Buffer.from(t),i=await e.write({fileName:`output.${u}`,data:d})}else i=t;return{status:n,headers:o,body:i}},"handleBinaryResponse"),Bq=a(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var nt={async poll(e,{store:t,auth:n,propsValue:o,maxItemsToPoll:r,files:i,server:s}){switch(e.strategy){case 0:{let u=await t.get("lastPoll");if(dt(u))throw new Error("lastPoll doesn't exist in the store.");let d=await e.items({store:t,auth:n,propsValue:o,lastFetchEpochMS:u,server:s}),f=d.reduce((h,g)=>Math.max(h,g.epochMilliSeconds),u);return await t.put("lastPoll",f),d.filter(h=>h.epochMilliSeconds>u).map(h=>h.data)}case 1:{let u=await t.get("lastItem"),d=await e.items({store:t,auth:n,propsValue:o,lastItemId:u,files:i,server:s}),f=d.findIndex(m=>m.id===u),h=[];dt(u)||f==-1?h=d??[]:h=d?.slice(0,f)??[],dt(r)||(h=h.slice(-r));let g=h?.[0]?.id;return dt(g)||await t.put("lastItem",g),h.map(m=>m.data)}}},async onEnable(e,{store:t,auth:n,propsValue:o,server:r,isRepublish:i}){switch(e.strategy){case 0:{if(i&&!dt(await t.get("lastPoll")))break;await t.put("lastPoll",Date.now());break}case 1:{if(i&&!dt(await t.get("lastItem")))break;let u=(await e.items({store:t,auth:n,propsValue:o,lastItemId:null,server:r}))?.[0]?.id;dt(u)?await t.delete("lastItem"):await t.put("lastItem",u);break}}},async onDisable(e,t){switch(e.strategy){case 0:case 1:return}},async test(e,{auth:t,propsValue:n,store:o,files:r,server:i}){let s=[];switch(e.strategy){case 0:{s=await e.items({store:o,auth:t,propsValue:n,lastFetchEpochMS:0,server:i});break}case 1:{s=await e.items({store:o,auth:t,propsValue:n,lastItemId:null,files:r,server:i});break}}return qq(s.map(u=>u.data))}};function qq(e){return e.length<=5?e:e.slice(0,5)}a(qq,"getFirstFiveOrAll");var KC=require("crypto");async function zb(e,t){let n={method:"POST",url:`${fe.baseUrl}/channels/stop`,body:{id:e?.id,resourceId:e?.resourceId},authentication:{type:"BEARER_TOKEN",token:await $e(t)}};await Be.sendRequest(n)}a(zb,"stopWatchEvent");async function Ub(e,t,n){let o=Date.now()+5184e5,r={method:"POST",url:`${fe.baseUrl}/calendars/${e}/events/watch`,body:{id:(0,KC.randomUUID)(),type:"web_hook",address:t,expiration:o.toString()},authentication:{type:"BEARER_TOKEN",token:await $e(n)}},{body:i}=await Be.sendRequest(r);return i}a(Ub,"watchEvent");async function Af({calendarId:e,authProp:t}){let n=await $e(t),o={singleEvents:"true",showDeleted:"true",maxResults:"2500"},r="",i;do{r&&(o.pageToken=r);let s={method:"GET",url:`${fe.baseUrl}/calendars/${e}/events`,queryParams:o,authentication:{type:"BEARER_TOKEN",token:n}},{body:u}=await Be.sendRequest(s);r=u.nextPageToken,i=u.nextSyncToken}while(r);return i}a(Af,"getInitialSyncToken");async function JC({calendarId:e,syncToken:t,authProp:n}){let o=await $e(n),r={syncToken:t,maxResults:"2500"},i="",s,u=[];do{i&&(r.pageToken=i);let d={method:"GET",url:`${fe.baseUrl}/calendars/${e}/events`,queryParams:r,authentication:{type:"BEARER_TOKEN",token:o}};try{let{body:f}=await Be.sendRequest(d);f.items?.length>0&&(u=[...u,...f.items]),i=f.nextPageToken,s=f.nextSyncToken}catch(f){if(f?.response?.status===410)return{items:[],nextSyncToken:void 0,syncTokenInvalid:!0};throw f}}while(i);return{items:u,nextSyncToken:s,syncTokenInvalid:!1}}a(JC,"listEventsWithSyncToken");async function Zt(e,t){let n={showDeleted:"false"};t&&(n.minAccessRole=t);let o={method:"GET",url:`${fe.baseUrl}/users/me/calendarList`,queryParams:n,authentication:{type:"BEARER_TOKEN",token:await $e(e)}};return(await Be.sendRequest(o)).body.items}a(Zt,"getCalendars");async function If(e){let t={method:"GET",url:`${fe.baseUrl}/colors`,authentication:{type:"BEARER_TOKEN",token:await $e(e)}};return(await Be.sendRequest(t)).body}a(If,"getColors");async function pu(e,t,n,o){let r=new Date,i=new Date;i.setDate(r.getDate()-1);let s={updatedMin:o?.toISOString()??i.toISOString(),maxResults:"2500",orderBy:"updated",singleEvents:t?"true":"false",showDeleted:"true"},u=await $e(n),d={method:"GET",url:`${fe.baseUrl}/calendars/${e}/events`,queryParams:s,authentication:{type:"BEARER_TOKEN",token:u}},f=[],h="";do{s.pageToken=h;let{body:g}=await Be.sendRequest(d);g.items.length>0&&(f=[...f,...g.items]),h=g.nextPageToken}while(h);return f}a(pu,"getEvents");async function YC(e,t){return(await pu(e,!1,t)).pop()}a(YC,"getLatestEvent");async function XC(e,t,n=50){if(!t)return[];try{let o=new Date,r=new Date;r.setDate(o.getDate()+30);let i={singleEvents:"true",orderBy:"startTime",timeMin:o.toISOString(),timeMax:r.toISOString(),maxResults:n.toString(),showDeleted:"false"},s={method:"GET",url:`${fe.baseUrl}/calendars/${encodeURIComponent(t)}/events`,queryParams:i,authentication:{type:"BEARER_TOKEN",token:await $e(e)}},u=await Be.sendRequest(s);return!u.body.items||u.body.items.length===0?[]:u.body.items.map(d=>{let f=d.start?.dateTime||d.start?.date||"",h=f?new Date(f).toLocaleDateString():"",g=f?new Date(f).toLocaleTimeString():"",m=d.summary||"Untitled Event";return h&&(m+=` (${h}`,d.start?.dateTime&&(m+=` at ${g}`),m+=")"),{label:m,value:d.id||""}}).filter(d=>d.value!=="")}catch(o){return console.error("Error fetching events for dropdown:",o),[]}}a(XC,"getEventsForDropdown");var Gm=Ke(Vu());var rT=["https://www.googleapis.com/auth/calendar.events","https://www.googleapis.com/auth/calendar.readonly","email"],le=[ff.OAuth2({description:"",authUrl:"https://accounts.google.com/o/oauth2/auth",tokenUrl:"https://oauth2.googleapis.com/token",required:!0,pkce:!0,scope:rT}),ff.CustomAuth({displayName:"Service Account (Advanced)",description:"Authenticate via service account from https://console.cloud.google.com/ > IAM & Admin > Service Accounts > Create Service Account > Keys > Add key. <br> <br> You can optionally use domain-wide delegation (https://support.google.com/a/answer/162106?hl=en#zippy=%2Cset-up-domain-wide-delegation-for-a-client) to access calendars without adding the service account to each one. <br> <br> **Note:** Without a user email, the service account only has access to calendars you explicitly share with it.",required:!0,props:{serviceAccount:V.ShortText({displayName:"Service Account JSON Key",required:!0}),userEmail:V.ShortText({displayName:"User Email",required:!1,description:"Email address of the user to impersonate for domain-wide delegation."})},validate:a(async({auth:e})=>{try{await $e({type:"CUSTOM_AUTH",props:{...e}})}catch(t){return{valid:!1,error:t.message}}return{valid:!0}},"validate")})];async function At(e){if(e.type==="CUSTOM_AUTH"){let n=JSON.parse(e.props.serviceAccount);return new Gm.JWT({email:n.client_email,key:n.private_key,scopes:rT,subject:e.props.userEmail})}let t=new Gm.OAuth2Client;return t.setCredentials(e),t}a(At,"createGoogleClient");var $e=a(async e=>{if(e.type==="CUSTOM_AUTH"){let n=await(await At(e)).getAccessToken();if(n.token)return n.token;throw new Error("Could not retrieve access token from service account json")}return e.access_token},"getAccessToken");var fe={baseUrl:"https://www.googleapis.com/calendar/v3",calendarDropdown:a(e=>V.Dropdown({auth:le,displayName:"Calendar",refreshers:[],required:!0,options:a(async({auth:t})=>t?{disabled:!1,options:(await Zt(t,e)).map(r=>({label:r.summary,value:r.id}))}:{disabled:!0,placeholder:"Please connect your account first",options:[]},"options")}),"calendarDropdown"),eventDropdown:a((e=!1)=>V.Dropdown({displayName:"Event",refreshers:["calendar_id"],required:e,auth:le,options:a(async({auth:t,calendar_id:n})=>t?n?{disabled:!1,options:await XC(t,n)}:{disabled:!0,placeholder:"Please select a calendar first",options:[]}:{disabled:!0,placeholder:"Please connect your account first",options:[]},"options")}),"eventDropdown"),colorId:V.Dropdown({auth:le,displayName:"Color",refreshers:[],required:!1,options:a(async({auth:e})=>{if(!e)return{disabled:!0,placeholder:"Please connect your account first",options:[]};let t=await If(e);return{disabled:!1,options:Object.entries(t.event).map(([n,o])=>({label:o.background,value:n}))}},"options")})};var ph=Ke(Xn()),CN=Ke(ro()),ON=require("crypto");var tt={fields:[{key:"summary",label:"Title"},{key:"status",label:"Status"},{key:"htmlLink",label:"Event Link",format:"url"},{key:"id",label:"Event ID"},{key:"eventType",label:"Event Type"},{key:"start",label:"Start",children:[{key:"dateTime",label:"Start Time",format:"datetime"},{key:"timeZone",label:"Time Zone"}]},{key:"end",label:"End",children:[{key:"dateTime",label:"End Time",format:"datetime"},{key:"timeZone",label:"Time Zone"}]},{key:"creator",label:"Creator",children:[{key:"email",label:"Email",format:"email"}]},{key:"organizer",label:"Organizer",children:[{key:"email",label:"Email",format:"email"}]},{key:"created",label:"Created",format:"datetime"},{key:"updated",label:"Updated",format:"datetime"},{key:"iCalUID",label:"iCal UID"}]},_N={fields:[{key:"summary",label:"Name"},{key:"description",label:"Description"},{key:"id",label:"Calendar ID"},{key:"timeZone",label:"Time Zone"},{key:"accessRole",label:"Access Role"},{key:"primary",label:"Primary",format:"boolean"},{key:"isOwned",label:"Is Owned",format:"boolean"},{key:"selected",label:"Selected",format:"boolean"},{key:"isShared",label:"Is Shared",format:"boolean"},{key:"calendarType",label:"Calendar Type"},{key:"backgroundColor",label:"Background Color"},{key:"foregroundColor",label:"Foreground Color"},{key:"colorId",label:"Color ID"}]},lh={fields:[{key:"status",label:"Status Code"},{key:"summary",label:"Calendar Summary",value:"body.summary"},{key:"timeZone",label:"Time Zone",value:"body.timeZone"},{key:"accessRole",label:"Access Role",value:"body.accessRole"},{key:"updated",label:"Updated",value:"body.updated",format:"datetime"},{key:"items",label:"Events",value:"body.items",labelKey:"summary",listItems:[{key:"summary",label:"Title"},{key:"status",label:"Status"},{key:"id",label:"Event ID"},{key:"eventType",label:"Event Type"},{key:"htmlLink",label:"Event Link",format:"url"},{key:"startDateTime",label:"Start",value:"start.dateTime",format:"datetime"},{key:"endDateTime",label:"End",value:"end.dateTime",format:"datetime"},{key:"creatorEmail",label:"Creator Email",value:"creator.email",format:"email"},{key:"organizerEmail",label:"Organizer Email",value:"organizer.email",format:"email"},{key:"created",label:"Created",format:"datetime"},{key:"updated",label:"Updated",format:"datetime"},{key:"iCalUID",label:"iCal UID"}]}]},bN={fields:[{key:"summary",label:"Summary",value:"body.summary"},{key:"status",label:"Status",value:"body.status"},{key:"id",label:"Event ID",value:"body.id"},{key:"htmlLink",label:"Event Link",value:"body.htmlLink",format:"url"},{key:"created",label:"Created",value:"body.created",format:"datetime"},{key:"updated",label:"Updated",value:"body.updated",format:"datetime"},{key:"start",label:"Start",value:"body.start",children:[{key:"dateTime",label:"Start Date/Time",format:"datetime"},{key:"timeZone",label:"Time Zone"}]},{key:"end",label:"End",value:"body.end",children:[{key:"dateTime",label:"End Date/Time",format:"datetime"},{key:"timeZone",label:"Time Zone"}]},{key:"creator",label:"Creator",value:"body.creator",children:[{key:"email",label:"Email",format:"email"}]},{key:"organizer",label:"Organizer",value:"body.organizer",children:[{key:"email",label:"Email",format:"email"}]},{key:"eventType",label:"Event Type",value:"body.eventType"},{key:"iCalUID",label:"iCal UID",value:"body.iCalUID"}]},EN={fields:[{key:"summary",label:"Name"},{key:"id",label:"Calendar ID"},{key:"description",label:"Description"},{key:"location",label:"Location"},{key:"timeZone",label:"Time Zone"}]};var SN={fields:[{key:"calendar",label:"Calendar Colors",dynamicKey:!0,children:[{key:"background",label:"Background Color"},{key:"foreground",label:"Foreground Color"}]},{key:"event",label:"Event Colors",dynamicKey:!0,children:[{key:"background",label:"Background Color"},{key:"foreground",label:"Foreground Color"}]}]},TN={fields:[{key:"calendars",label:"Calendars",labelKey:"summary",listItems:[{key:"id",label:"Calendar ID"},{key:"summary",label:"Name"},{key:"description",label:"Description"},{key:"location",label:"Location"},{key:"timeZone",label:"Time Zone"},{key:"accessRole",label:"Access Role"},{key:"primary",label:"Primary",format:"boolean"},{key:"selected",label:"Selected",format:"boolean"},{key:"backgroundColor",label:"Background Color"},{key:"foregroundColor",label:"Foreground Color"}]},{key:"count",label:"Count",format:"number"}]},PN={fields:[{key:"items",label:"Settings",labelKey:"id",listItems:[{key:"id",label:"Setting ID"},{key:"value",label:"Value"}]},{key:"count",label:"Count",format:"number"}]},wN={fields:[{key:"removed",label:"Removed",format:"boolean"},{key:"attendee_email",label:"Attendee Email",format:"email"},{key:"message",label:"Message"},{key:"event",label:"Event",children:tt.fields}]},xN={fields:[{key:"free_slots",label:"Free Slots",labelKey:"start",listItems:[{key:"start",label:"Start",format:"datetime"},{key:"end",label:"End",format:"datetime"},{key:"duration_minutes",label:"Duration (Minutes)",format:"number"}]},{key:"count",label:"Count",format:"number"}]},$W=[{key:"summary",label:"Title"},{key:"status",label:"Status"},{key:"id",label:"Instance Event ID"},{key:"htmlLink",label:"Event Link",format:"url"},{key:"startDateTime",label:"Start",value:"start.dateTime",format:"datetime"},{key:"endDateTime",label:"End",value:"end.dateTime",format:"datetime"},{key:"originalStartDateTime",label:"Original Start",value:"originalStartTime.dateTime",format:"datetime"}],AN={fields:[{key:"instances",label:"Instances",labelKey:"summary",listItems:$W},{key:"count",label:"Count",format:"number"},{key:"nextPageToken",label:"Next Page Token"}]},IN={fields:[{key:"moved",label:"Moved",format:"boolean"},{key:"already_in_destination",label:"Already in Destination",format:"boolean"},{key:"event",label:"Event",children:tt.fields}]},RN={fields:[{key:"events",label:"Events",labelKey:"summary",listItems:[{key:"calendarId",label:"Calendar ID"},{key:"summary",label:"Title"},{key:"status",label:"Status"},{key:"id",label:"Event ID"},{key:"htmlLink",label:"Event Link",format:"url"},{key:"startDateTime",label:"Start",value:"start.dateTime",format:"datetime"},{key:"endDateTime",label:"End",value:"end.dateTime",format:"datetime"}]},{key:"count",label:"Count",format:"number"},{key:"calendars_searched",label:"Calendars Searched",format:"number"},{key:"warning",label:"Warning"}]},dh={fields:[{key:"timeMin",label:"Time Min",format:"datetime"},{key:"timeMax",label:"Time Max",format:"datetime"},{key:"calendars",label:"Calendars",dynamicKey:!0,children:[{key:"busy",label:"Busy Periods",labelKey:"start",listItems:[{key:"start",label:"Start",format:"datetime"},{key:"end",label:"End",format:"datetime"}]}]}]};var FT={calendar_id:fe.calendarDropdown("writer"),title:V.ShortText({displayName:"Title of the event",required:!0}),start_date_time:V.DateTime({displayName:"Start date time of the event",required:!0}),end_date_time:V.DateTime({displayName:"End date time of the event",description:"By default it'll be 30 min post start time",required:!1}),location:V.ShortText({displayName:"Location",required:!1}),description:V.LongText({displayName:"Description",description:"Description of the event. You can use HTML tags here.",required:!1}),colorId:fe.colorId,attendees:V.Array({displayName:"Attendees",description:"Emails of the attendees (guests)",required:!1}),guests_can_modify:V.Checkbox({displayName:"Guests can modify",defaultValue:!1,required:!1}),guests_can_invite_others:V.Checkbox({displayName:"Guests can invite others",defaultValue:!1,required:!1}),guests_can_see_other_guests:V.Checkbox({displayName:"Guests can see other guests",defaultValue:!1,required:!1}),send_notifications:V.StaticDropdown({displayName:"Send Notifications",defaultValue:"all",options:{options:[{label:"Yes, to everyone",value:"all"},{label:"To non-Google Calendar guests only",value:"externalOnly"},{label:"To no one",value:"none"}]},required:!0}),create_meet_link:V.Checkbox({displayName:"Create Google Meet Link",description:"Automatically create a Google Meet video conference link for this event",defaultValue:!1,required:!1})};async function BT(e){let{calendar_id:t,title:n,start_date_time:o,end_date_time:r,location:i,description:s,colorId:u,guests_can_modify:d,guests_can_invite_others:f,guests_can_see_other_guests:h,create_meet_link:g}=e.propsValue,m={dateTime:(0,ph.default)(o).format("YYYY-MM-DDTHH:mm:ss.sssZ")},p=r||(0,ph.default)(o).add(30,"m"),y={dateTime:(0,ph.default)(p).format("YYYY-MM-DDTHH:mm:ss.sssZ")},v=e.propsValue.attendees,E=e.propsValue.send_notifications,b=[];if(v)for(let K of v)b.push({email:K});let k=await At(e.auth),N=(0,CN.calendar)({version:"v3",auth:k}),Z={summary:n,start:m,end:y,colorId:u,location:i??"",description:s??"",attendees:b,guestsCanInviteOthers:f,guestsCanModify:d,guestsCanSeeOtherGuests:h};return g&&(Z.conferenceData={createRequest:{conferenceSolutionKey:{type:"hangoutsMeet"},requestId:(0,ON.randomUUID)()}}),(await N.events.insert({calendarId:t,sendUpdates:E,conferenceDataVersion:g?1:0,requestBody:Z})).data}a(BT,"runCreateEvent");var kN=Pe({auth:le,name:"create_google_calendar_event",classification:"WRITE",description:"Add Event",audience:"human",aiMetadata:{description:"Creates a Google Calendar event with structured fields (title, start/end times, location, description, attendees, color, guest permissions) and can optionally attach a Google Meet link. Use this when you have explicit event details; choose Create Quick Event instead when working from a single natural-language phrase. Requires a title and start time (end defaults to 30 minutes after start). Not idempotent: each call creates a new event.",idempotent:!1},displayName:"Create Event",props:FT,outputSchema:tt,run:BT});var $N=Pe({auth:le,name:"create_quick_event",classification:"WRITE",description:"Add Quick Calendar Event",audience:"both",aiMetadata:{description:`Creates a calendar event from a single natural-language phrase (e.g. "Lunch with Sam tomorrow at 1pm") via Google's quickAdd parsing, letting Google infer the time, title, and date. Use when you have free-form text rather than structured fields; prefer Create Event when you have explicit start/end times or attendees. Not idempotent: each call creates a new event.`,idempotent:!1},displayName:"Create Quick Event",props:{calendar_id:fe.calendarDropdown("writer"),text:V.LongText({displayName:"Summary",description:"The text describing the event to be created",required:!0}),send_updates:V.StaticDropdown({displayName:"Send Updates",description:"Guests who should receive notifications about the creation of the new event.",required:!1,options:{disabled:!1,options:[{label:"All",value:"all"},{label:"External Only",value:"externalOnly"},{label:"none",value:"none"}]}})},outputSchema:bN,async run(e){let t=e.propsValue.calendar_id,n=`${fe.baseUrl}/calendars/${t}/events/quickAdd`,o={text:e.propsValue.text,sendUpdates:e.propsValue.send_updates||"none"},r={method:"POST",url:n,body:{},authentication:{type:"BEARER_TOKEN",token:await $e(e.auth)},queryParams:o};return await Be.sendRequest(r)}});var DN=Ke(ro());var DW={calendar_id:fe.calendarDropdown("writer"),eventId:V.ShortText({displayName:"Event ID",required:!0})};async function qT(e){let t=await At(e.auth),n=e.propsValue.calendar_id,o=e.propsValue.eventId;return(await(0,DN.calendar)({version:"v3",auth:t}).events.delete({calendarId:n,eventId:o})).data}a(qT,"runDeleteEvent");var NN=Pe({displayName:"Delete Event",auth:le,name:"delete_event",classification:"DESTRUCTIVE",description:"Deletes an event from Google Calendar.",audience:"human",aiMetadata:{description:"Permanently removes an event from a Google Calendar, identified by calendar and event ID. Use to cancel or delete an existing event. Requires the event ID and cannot be undone. Idempotent: once the event is deleted, repeating the call leaves it absent (a second call may report it as already gone).",idempotent:!0},props:DW,run:qT});var VT=Ke(Xn());var GT={calendar_id:fe.calendarDropdown("writer"),event_types:V.StaticMultiSelectDropdown({displayName:"Event types",description:"Select event types",required:!0,defaultValue:["default","focusTime","outOfOffice"],options:{options:[{label:"Default",value:"default"},{label:"Out Of Office",value:"outOfOffice"},{label:"Focus Time",value:"focusTime"},{label:"Working Location",value:"workingLocation"}]}}),search:V.ShortText({displayName:"Search Term",required:!1}),start_date:V.DateTime({displayName:"Date from",required:!1}),end_date:V.DateTime({displayName:"Date to",required:!1}),singleEvents:V.Checkbox({displayName:"Expand Recurring Event?",description:"Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves.",required:!0,defaultValue:!1})};async function HT(e){let{calendar_id:t,start_date:n,end_date:o,search:r,event_types:i,singleEvents:s}=e.propsValue,u=await $e(e.auth),d={showDeleted:"false"},f=`${fe.baseUrl}/calendars/${t}/events`;s!==null&&(d.singleEvents=s?"true":"false"),r&&(d.q=`"${r}"`),n&&(d.timeMin=(0,VT.default)(n).format("YYYY-MM-DDTHH:mm:ss.sssZ")),n&&o&&(d.timeMax=(0,VT.default)(o).format("YYYY-MM-DDTHH:mm:ss.sssZ")),i.length>0&&(f+=`?${i.map(g=>`eventTypes=${g}`).join("&")}`);let h={method:"GET",url:f,queryParams:d,authentication:{type:"BEARER_TOKEN",token:u}};return await Be.sendRequest(h)}a(HT,"runGetEvents");var zN=Pe({auth:le,name:"google_calendar_get_events",classification:"SEARCH",description:"Get Events",audience:"human",aiMetadata:{description:"Lists events from a Google Calendar, optionally filtered by a date range, search term, and event types, and can expand recurring events into individual instances. Use to look up or browse multiple events when you do not already have a specific event ID; use Get Event by ID for a single known event. Read-only and idempotent.",idempotent:!0},displayName:"Get all Events",props:GT,outputSchema:lh,run:HT});var UN=Ke(ro());var ZT=Ke(Xn());var fh={calendar_id:fe.calendarDropdown("writer"),eventId:V.ShortText({displayName:"Event ID",required:!0}),title:V.ShortText({displayName:"Title of the event",required:!1}),start_date_time:V.DateTime({displayName:"Start date time of the event",required:!1}),end_date_time:V.DateTime({displayName:"End date time of the event",required:!1}),location:V.ShortText({displayName:"Location",required:!1}),description:V.LongText({displayName:"Description",description:"Description of the event. You can use HTML tags here.",required:!1}),colorId:fe.colorId,attendees:V.Array({displayName:"Attendees",description:"Emails of the attendees (guests)",required:!1}),guests_can_modify:V.Checkbox({displayName:"Guests can modify",defaultValue:!1,required:!1}),guests_can_invite_others:V.Checkbox({displayName:"Guests can invite others",defaultValue:!1,required:!1}),guests_can_see_other_guests:V.Checkbox({displayName:"Guests can see other guests",defaultValue:!1,required:!1})};async function WT(e){let{calendar_id:t,eventId:n,title:o,start_date_time:r,end_date_time:i,location:s,description:u,colorId:d,guests_can_invite_others:f,guests_can_modify:h,guests_can_see_other_guests:g}=e.propsValue,m=e.propsValue.attendees,p=await At(e.auth),y=(0,UN.calendar)({version:"v3",auth:p}),v=await y.events.get({calendarId:t,eventId:n}),E=[];return Array.isArray(m)&&m.length>0?E=m.map(k=>({email:k})):v.data.attendees&&Array.isArray(v.data.attendees)&&(E=v.data.attendees),(await y.events.update({calendarId:t,eventId:n,requestBody:{summary:o??v.data.summary,attendees:E,description:u??v.data.description,colorId:d,location:s??v.data.location,start:r?{dateTime:(0,ZT.default)(r).format("YYYY-MM-DDTHH:mm:ss.sssZ")}:v.data.start,end:i?{dateTime:(0,ZT.default)(i).format("YYYY-MM-DDTHH:mm:ss.sssZ")}:v.data.end,guestsCanInviteOthers:f??v.data.guestsCanInviteOthers,guestsCanModify:h??v.data.guestsCanModify,guestsCanSeeOtherGuests:g??v.data.guestsCanSeeOtherGuests}})).data}a(WT,"runUpdateEvent");var MN=Pe({displayName:"Update Event",auth:le,name:"update_event",classification:"WRITE",description:"Updates an event in Google Calendar.",audience:"human",aiMetadata:{description:"Updates the fields of an existing Google Calendar event identified by calendar and event ID (title, times, location, description, color, attendees, guest permissions); unset fields retain their current values. Use to modify or reschedule an event that already exists rather than creating a new one. Requires the event ID. Idempotent: applying the same field values repeatedly leaves the event in the same state.",idempotent:!0},props:fh,outputSchema:tt,run:WT});var mh={strategy:0,items:a(async({auth:e,propsValue:{calendarId:t,expandRecurringEvent:n},lastFetchEpochMS:o})=>{let r=new Date(o);if(o===0){let u=new Date,d=new Date;d.setDate(u.getDate()-7),r=d}return(await pu(t,n,e,r)??[]).map(u=>({epochMilliSeconds:new Date(u.updated).getTime(),data:u}))},"items")},LN=ar({auth:le,name:"new_or_updated_event",classification:"READ",displayName:"New or Updated Event",description:"Triggers when an event is added or updated",aiMetadata:{description:"Fires when any event in the selected calendar is created or modified, polling by last-updated time. Each fired item is the affected event; can optionally expand recurring events so every occurrence fires separately."},props:{calendar_id:fe.calendarDropdown(),expandRecurringEvent:V.Checkbox({displayName:"Expand Recurring Event?",description:"If true, the trigger will activate for every occurrence of a recurring event.",required:!0,defaultValue:!1})},sampleData:{kind:"calendar#event",etag:"3350849506974000",id:"0nsfi5ttd2b17ac76ma2f37oi9",htmlLink:"https://www.google.com/calendar/event?eid=kgjb90uioj4klrgfmdsnjsjvlgkm",summary:"ap-event-test",created:"2023-02-03T11:36:36.000Z",updated:"2023-02-03T11:45:53.487Z",description:"Sample description",status:"canceled",creator:{email:"test@test.com",self:!0},organizer:{email:"test@test.com",self:!0},start:{dateTime:"2023-02-02T22:30:00+03:00",timeZone:"Asia/Amman"},end:{dateTime:"2023-02-02T23:30:00+03:00",timeZone:"Asia/Amman"},transparency:"transparent",iCalUID:"0nsfi5ttd2b17ac76ma2f37oi9@google.com",sequence:1,attendees:[{email:"attende@test.com",responseStatus:"needsAction"},{email:"test@test.com",organizer:!0,self:!0,responseStatus:"accepted"}],reminders:{useDefault:!0},eventType:"default"},outputSchema:tt,type:"POLLING",async test({store:e,auth:t,propsValue:n,files:o}){return await nt.test(mh,{store:e,auth:t,propsValue:{calendarId:n.calendar_id,expandRecurringEvent:n.expandRecurringEvent},files:o})},async onEnable({store:e,auth:t,propsValue:n}){await nt.onEnable(mh,{store:e,auth:t,propsValue:{calendarId:n.calendar_id,expandRecurringEvent:n.expandRecurringEvent}})},async onDisable({store:e,auth:t,propsValue:n}){await nt.onDisable(mh,{store:e,auth:t,propsValue:{calendarId:n.calendar_id,expandRecurringEvent:n.expandRecurringEvent}})},async run({store:e,auth:t,propsValue:n,files:o}){return await nt.poll(mh,{store:e,auth:t,propsValue:{calendarId:n.calendar_id,expandRecurringEvent:n.expandRecurringEvent},files:o})}});var jN=Ke(ro());var FN=Pe({auth:le,name:"google-calendar-add-attendees",classification:"WRITE",displayName:"Add Attendees to Event",description:"Add one or more person to existing event.",audience:"both",aiMetadata:{description:"Adds one or more guests (by email) to an existing Google Calendar event, identified by calendar and event ID, preserving the current attendee list. Use to invite people to an event that already exists rather than recreating it. Not idempotent: re-running appends the same emails again, producing duplicate attendee entries.",idempotent:!1},props:{calendar_id:fe.calendarDropdown("writer"),eventId:V.ShortText({displayName:"Event ID",required:!0}),attendees:V.Array({displayName:"Attendees",description:"Emails of the attendees (guests)",required:!0})},outputSchema:tt,async run(e){let{calendar_id:t,eventId:n}=e.propsValue,o=e.propsValue.attendees,r=await At(e.auth),i=(0,jN.calendar)({version:"v3",auth:r}),s=await i.events.get({calendarId:t,eventId:n}),u=s.data.attendees??[],d=[];return d.push(...u),d.push(...o.map(h=>({email:h}))),(await i.events.update({calendarId:t,eventId:n,requestBody:{...s.data,attendees:d}})).data}});var KT=Ke(Xn());var JT={calendar_ids:V.MultiSelectDropdown({auth:le,displayName:"Calendars",description:"Select the calendars to check for busy periods.",required:!0,refreshers:[],options:a(async({auth:e})=>e?{disabled:!1,options:(await Zt(e)).map(o=>({label:o.summary,value:o.id}))}:{disabled:!0,placeholder:"Connect your account first",options:[]},"options")}),start_date:V.DateTime({displayName:"Start Time",description:"The start of the time range to check.",required:!0}),end_date:V.DateTime({displayName:"End Time",description:"The end of the time range to check.",required:!0})};async function YT(e){let{calendar_ids:t,start_date:n,end_date:o}=e.propsValue,r=await $e(e.auth),i={timeMin:(0,KT.default)(n).toISOString(),timeMax:(0,KT.default)(o).toISOString(),items:t.map(d=>({id:d}))},s={method:"POST",url:`${fe.baseUrl}/freeBusy`,body:i,authentication:{type:"BEARER_TOKEN",token:r}};return(await Be.sendRequest(s)).body}a(YT,"runFindFreeBusy");var BN=Pe({auth:le,name:"google_calendar_find_busy_free_periods",classification:"SEARCH",displayName:"Find Busy/Free Periods in Calendar",description:"Finds free/busy calendar details from Google Calendar.",audience:"human",aiMetadata:{description:"Queries one or more calendars for their busy time blocks within a given start/end window, without exposing event details. Use to check availability or find open slots before scheduling a meeting. Requires the calendars to check and a time range. Read-only and idempotent.",idempotent:!0},props:JT,outputSchema:dh,run:YT});var XT={calendar_id:fe.calendarDropdown(),event_id:V.ShortText({displayName:"Event ID",description:'The unique ID of the event (e.g., "abc123def456"). You can find this in the event URL or from other calendar actions.',required:!0}),max_attendees:V.Number({displayName:"Max Attendees",description:"Maximum number of attendees to include in the response. If there are more attendees, only the participant is returned.",required:!1}),time_zone:V.ShortText({displayName:"Time Zone",description:`Time zone for the response (e.g., "America/New_York", "Europe/London"). Defaults to the calendar's time zone if not specified.`,required:!1})};async function QT(e){let{calendar_id:t,event_id:n,max_attendees:o,time_zone:r}=e.propsValue,i=await $e(e.auth);if(!t||typeof t!="string"||t.trim().length===0)throw new Error("Calendar ID is required");if(!n||typeof n!="string"||n.trim().length===0)throw new Error("Event ID cannot be empty");if(n.length<5||n.length>1024)throw new Error("Event ID must be between 5 and 1024 characters");let s={};o!==void 0&&o>0&&(s.maxAttendees=o.toString()),r&&typeof r=="string"&&r.trim().length>0&&(s.timeZone=r.trim());let u=`${fe.baseUrl}/calendars/${encodeURIComponent(t.trim())}/events/${encodeURIComponent(n.trim())}`,d={method:"GET",url:u,queryParams:s,authentication:{type:"BEARER_TOKEN",token:i}};try{return(await Be.sendRequest(d)).body}catch(f){throw f.response?.status===404?new Error(`Event with ID "${n}" not found in calendar "${t}". Please verify the event ID and calendar selection.`):f.response?.status===403?new Error(`Access denied to event "${n}" in calendar "${t}". Please check your permissions.`):f.response?.status===400?new Error("Invalid request parameters. Please check the event ID format and other parameters."):f.response?.status===401?new Error("Authentication failed. Please reconnect your Google Calendar account."):new Error(`Failed to fetch event: ${f.message||"Unknown error occurred"}`)}}a(QT,"runGetEventById");var qN=Pe({auth:le,name:"google_calendar_get_event_by_id",classification:"READ",displayName:"Get Event by ID",description:"Fetch event details by its unique ID from Google Calendar.",audience:"human",aiMetadata:{description:"Fetches the full details of a single Google Calendar event by its unique event ID within a given calendar. Use when you already have an event ID (e.g. from a trigger or a list action) and need its details; use Get all Events to search when you do not. Requires a valid event ID. Read-only and idempotent.",idempotent:!0},props:XT,outputSchema:tt,run:QT});var eP=Ke(Xn()),VN=Pe({auth:le,name:"google_calendar_search_events_all_calendars",classification:"SEARCH",displayName:"Search Events Across Calendars",description:"Searches every calendar the account can access for events matching a keyword within a required time window.",audience:"ai",aiMetadata:{description:"Search all of the user's calendars at once for events matching a text query within a required time window, returning each match tagged with its owning calendarId so you can then get/update/delete it. Use this instead of Get all Events when you know a keyword and time range but do NOT know which calendar the event lives in (Get all Events searches a single calendar). A start and end time are mandatory to bound the cross-calendar scan; matching uses Google's native q= filter, not semantic search. Read-only and idempotent.",idempotent:!0},props:{query:V.ShortText({displayName:"Search Term",description:`Free-text query matched against event fields (summary, description, location, attendee names/emails) using Google's native search. Example: "budget review".`,required:!0}),start_date:V.DateTime({displayName:"Start Time",description:`Lower bound (inclusive) for an event's end time, as an ISO 8601 timestamp (e.g. "2026-06-01T00:00:00Z"). Required to bound the cross-calendar scan.`,required:!0}),end_date:V.DateTime({displayName:"End Time",description:`Upper bound (exclusive) for an event's start time, as an ISO 8601 timestamp (e.g. "2026-06-30T23:59:59Z"). Required to bound the cross-calendar scan.`,required:!0}),single_events:V.Checkbox({displayName:"Expand Recurring Events?",description:"When enabled, recurring events are expanded into their individual instances instead of returning the underlying recurring event.",required:!1,defaultValue:!0})},outputSchema:RN,async run(e){let{query:t,start_date:n,end_date:o,single_events:r}=e.propsValue,i=await $e(e.auth),s=(0,eP.default)(n).toISOString(),u=(0,eP.default)(o).toISOString(),d=await Zt(e.auth),f=[],h=[];for(let g of d){let m="";do{let p={q:t,timeMin:s,timeMax:u,singleEvents:r?"true":"false",showDeleted:"false",maxResults:"250"};m&&(p.pageToken=m);let y={method:"GET",url:`${fe.baseUrl}/calendars/${encodeURIComponent(g.id)}/events`,queryParams:p,authentication:{type:"BEARER_TOKEN",token:i}};try{let v=await Be.sendRequest(y),E=v.body.items??[];for(let b of E)f.push({...b,calendarId:g.id});m=v.body.nextPageToken}catch(v){let E=v.response?.status;if(E===403||E===404){h.push({calendarId:g.id,status:E}),m="";continue}throw E===429?new Error("Google Calendar rate limit reached while searching calendars. Please retry shortly."):v}}while(m)}return{events:f,count:f.length,calendars_searched:d.length-h.length,...h.length>0?{skipped_calendars:h,warning:"Some calendars could not be searched (access denied or not found); a missing match may live in a skipped calendar. See skipped_calendars."}:{}}}});var Zr=Ke(Xn()),HN=Ke(GN());Zr.default.extend(HN.default);function NW(e){if(e.length===0)return[];let t=[...e].sort((o,r)=>o.start-r.start),n=[{...t[0]}];for(let o=1;o<t.length;o++){let r=n[n.length-1],i=t[o];i.start<=r.end?r.end=Math.max(r.end,i.end):n.push({...i})}return n}a(NW,"mergeIntervals");function zW(e,t,n){let o=[],r=t;for(let i of e)if(i.start>r&&o.push({start:r,end:Math.min(i.start,n)}),r=Math.max(r,i.end),r>=n)break;return r<n&&o.push({start:r,end:n}),o.filter(i=>i.end>i.start)}a(zW,"complement");function UW(e,t,n){let o=[];for(let r of e){let i=Zr.default.utc(r.start).startOf("day"),s=Zr.default.utc(r.end);for(;i.valueOf()<r.end;){let u=i.add(t,"hour"),d=i.add(n,"hour"),f=Math.max(r.start,u.valueOf()),h=Math.min(r.end,d.valueOf());if(h>f&&o.push({start:f,end:h}),i=i.add(1,"day"),i.valueOf()>s.valueOf())break}}return o}a(UW,"clipToWorkingHours");var ZN=Pe({auth:le,name:"google_calendar_find_free_slots",classification:"SEARCH",displayName:"Find Free Time Slots",description:"Computes open time slots shared across one or more calendars within a window, by inverting their busy blocks.",audience:"ai",aiMetadata:{description:'Return the OPEN time slots common to the selected calendars within a window \u2014 the inverse of their combined busy blocks, optionally filtered to a minimum duration and to working hours. Use this instead of Find Busy/Free Periods (which returns only busy blocks and forces you to invert and reconcile them yourself) when you need the actual free intervals to answer "when can everyone meet". Idempotent because it performs no writes, but the result depends entirely on the window: pass absolute start/end times, since a window relative to "now" yields a shifting set of slots.',idempotent:!0},props:{calendar_ids:V.MultiSelectDropdown({auth:le,displayName:"Calendars",description:"The calendars whose schedules must all be free. A slot is returned only when it is open on every selected calendar.",required:!0,refreshers:[],options:a(async({auth:e})=>e?{disabled:!1,options:(await Zt(e)).map(o=>({label:o.summary,value:o.id}))}:{disabled:!0,placeholder:"Connect your account first",options:[]},"options")}),start_date:V.DateTime({displayName:"Window Start",description:'Start of the search window, as an absolute ISO 8601 timestamp (e.g. "2026-06-01T09:00:00Z"). Prefer absolute times over relative ones.',required:!0}),end_date:V.DateTime({displayName:"Window End",description:'End of the search window, as an absolute ISO 8601 timestamp (e.g. "2026-06-05T18:00:00Z").',required:!0}),min_duration_minutes:V.Number({displayName:"Minimum Slot Duration (minutes)",description:"Discard any open slot shorter than this many minutes. Leave empty to return every open slot regardless of length.",required:!1}),working_hours_start:V.Number({displayName:"Working Hours Start (hour 0-23)",description:"If set together with Working Hours End, each day's open slots are clipped to this hour range, interpreted in UTC (not the calendar's local time zone). Example: 9 for 09:00 UTC. Leave both unset to return slots across the full window.",required:!1}),working_hours_end:V.Number({displayName:"Working Hours End (hour 0-23)",description:"Upper bound of the daily working-hours window. Example: 17 for 5 PM. Ignored unless Working Hours Start is also set.",required:!1})},outputSchema:xN,async run(e){let{calendar_ids:t,start_date:n,end_date:o,min_duration_minutes:r,working_hours_start:i,working_hours_end:s}=e.propsValue,u=await $e(e.auth),d=(0,Zr.default)(n).valueOf(),f=(0,Zr.default)(o).valueOf();if(f<=d)throw new Error("Window End must be after Window Start.");let h={method:"POST",url:`${fe.baseUrl}/freeBusy`,body:{timeMin:(0,Zr.default)(n).toISOString(),timeMax:(0,Zr.default)(o).toISOString(),items:t.map(b=>({id:b}))},authentication:{type:"BEARER_TOKEN",token:u}},g=await Be.sendRequest(h),m=[],p=[];for(let b of Object.keys(g.body.calendars)){let k=g.body.calendars[b];if(k.errors?.length){p.push({calendarId:b,errors:k.errors});continue}let N=k.busy??[];for(let Z of N)m.push({start:(0,Zr.default)(Z.start).valueOf(),end:(0,Zr.default)(Z.end).valueOf()})}if(p.length>0)throw new Error(`Could not read availability for calendar(s): ${p.map(b=>`${b.calendarId} (${b.errors.map(k=>k.reason).join(", ")})`).join("; ")}. A slot can only be marked free if every selected calendar is free, so free slots cannot be computed while any of them are unreadable. Verify the calendar IDs with List Calendars.`);let y=NW(m),v=zW(y,d,f);if(i!==void 0&&s!==void 0&&s>i&&(v=UW(v,i,s)),r!==void 0&&r>0){let b=r*60*1e3;v=v.filter(k=>k.end-k.start>=b)}let E=v.map(b=>({start:(0,Zr.default)(b.start).toISOString(),end:(0,Zr.default)(b.end).toISOString(),duration_minutes:Math.round((b.end-b.start)/6e4)}));return{free_slots:E,count:E.length}}});var WN=Ke(ro());var nP=Ke(Xn()),KN=Pe({auth:le,name:"google_calendar_list_recurring_event_instances",classification:"SEARCH",displayName:"List Recurring Event Instances",description:"Lists the individual occurrences of one recurring event series, each with its own instance event ID.",audience:"ai",aiMetadata:{description:"List the individual occurrences of a single recurring event series, identified by its recurring-event ID, each returned with its own distinct instance event ID. Use this when you need to inspect, reschedule, or cancel ONE occurrence of a series rather than the whole series; Get all Events expands recurring events only across a whole-calendar window and cannot target one series by ID. Requires the recurring series' event ID; optionally bound by a time range. Read-only and idempotent.",idempotent:!0},props:{calendar_id:fe.calendarDropdown(),event_id:V.ShortText({displayName:"Recurring Event ID",description:'The event ID of the recurring SERIES (the parent), e.g. "abc123def456". Obtain it from Search Events Across Calendars or Get all Events. Individual instance IDs will not work here.',required:!0}),time_min:V.DateTime({displayName:"Start Time",description:`Optional lower bound (inclusive) for an instance's end time, as an ISO 8601 timestamp with offset (e.g. "2026-06-01T00:00:00Z").`,required:!1}),time_max:V.DateTime({displayName:"End Time",description:`Optional upper bound (exclusive) for an instance's start time, as an ISO 8601 timestamp with offset (e.g. "2026-06-30T23:59:59Z").`,required:!1}),show_deleted:V.Checkbox({displayName:"Include Cancelled Instances",description:"Whether to include cancelled (deleted) instances of the series in the result. Defaults to false.",required:!1,defaultValue:!1}),max_results:V.Number({displayName:"Max Results",description:"Maximum number of instances to return per page (1-2500). Defaults to the API default of 250.",required:!1})},outputSchema:AN,async run(e){let{calendar_id:t,event_id:n,time_min:o,time_max:r,show_deleted:i,max_results:s}=e.propsValue,u=await At(e.auth),d=(0,WN.calendar)({version:"v3",auth:u});try{let f=await d.events.instances({calendarId:t,eventId:n,timeMin:o?(0,nP.default)(o).toISOString():void 0,timeMax:r?(0,nP.default)(r).toISOString():void 0,showDeleted:i??!1,maxResults:s}),h=f.data.items??[];return{instances:h,count:h.length,nextPageToken:f.data.nextPageToken??null}}catch(f){let h=f.response?.status??f.code;throw h===404?new Error(`Recurring event "${n}" not found in calendar "${t}". Verify the ID belongs to a recurring series.`):h===400?new Error(`Invalid request: "${n}" may not be a recurring event. The instances endpoint only works on recurring series.`):h===403?new Error(`Access denied to event "${n}" in calendar "${t}". Check your permissions.`):f}}});var JN=Ke(ro());var YN=Pe({auth:le,name:"google_calendar_move_event",classification:"WRITE",displayName:"Move Event to Another Calendar",description:"Moves an existing event from one calendar to another, preserving its event ID and metadata.",audience:"ai",aiMetadata:{description:"Move an existing event from a source calendar to a destination calendar in place, preserving the event ID, conferencing, and attendee state. Use this instead of deleting and recreating the event (which loses the ID and metadata) when you need to transfer an event between calendars. Idempotent: moving an event to the calendar it already lives on is treated as a no-op. The source and destination must be writable calendars.",idempotent:!0},props:{calendar_id:fe.calendarDropdown("writer"),event_id:V.ShortText({displayName:"Event ID",description:'The ID of the event to move, e.g. "abc123def456". Obtain it from Search Events Across Calendars or Get all Events.',required:!0}),destination_calendar_id:V.Dropdown({auth:le,displayName:"Destination Calendar",description:"The calendar to move the event to.",refreshers:[],required:!0,options:a(async({auth:e})=>e?{disabled:!1,options:(await Zt(e,"writer")).map(n=>({label:n.summary,value:n.id}))}:{disabled:!0,placeholder:"Please connect your account first",options:[]},"options")}),send_updates:V.StaticDropdown({displayName:"Send Notifications",description:"Who should receive notifications about the change of the event's organizer.",required:!1,defaultValue:"none",options:{options:[{label:"To everyone",value:"all"},{label:"To external guests only",value:"externalOnly"},{label:"To no one",value:"none"}]}})},outputSchema:IN,async run(e){let{calendar_id:t,event_id:n,destination_calendar_id:o,send_updates:r}=e.propsValue,i=await At(e.auth),s=(0,JN.calendar)({version:"v3",auth:i});if(t===o)return{moved:!1,already_in_destination:!0,event:(await s.events.get({calendarId:o,eventId:n})).data};try{return await s.events.move({calendarId:t,eventId:n,destination:o,sendUpdates:r??"none"}),{moved:!0,already_in_destination:!1,event:(await s.events.get({calendarId:o,eventId:n})).data}}catch(u){let d=u.response?.status??u.code;throw d===404?new Error(`Event "${n}" not found in source calendar "${t}". Verify the event ID and source calendar.`):d===403?new Error(`Access denied while moving event "${n}". Both the source and destination calendars must be writable.`):d===400?new Error(`Invalid move request for event "${n}". The destination must differ from the source and both must be valid calendars.`):u}}});var XN=Pe({auth:le,name:"google_calendar_create_event",classification:"WRITE",displayName:"Create Event",description:"Create a new event on a Google Calendar with structured fields (title, start/end, location, description, attendees, color) and an optional Google Meet link.",audience:"ai",aiMetadata:{description:'Create a new event on a calendar from explicit structured fields (title, start/end times, location, description, attendees, color, guest permissions) with an optional Google Meet link. Use this when you already have the event details; for a single natural-language phrase use the quick-add path instead. Resolve calendarId via google_calendar_list_calendars (default "primary"). Requires a title and start time; end defaults to 30 minutes after start. Not idempotent: each call creates a new event.',idempotent:!1},props:FT,outputSchema:tt,run:BT});var{eventId:gde,calendar_id:yde,guests_can_modify:vde,guests_can_invite_others:_de,guests_can_see_other_guests:bde,...MW}=fh;function oP(e){return V.StaticDropdown({displayName:e,description:"Leave unset to keep the event's current value.",required:!1,options:{options:[{label:"True",value:"true"},{label:"False",value:"false"}]}})}a(oP,"guestPermissionProp");function iP(e){return e===void 0?void 0:e==="true"}a(iP,"toOptionalBoolean");var LW={calendar_id:fh.calendar_id,event_id:V.ShortText({displayName:"Event ID",description:"The ID of the event to update. Resolve it via List Events or Search Events Across Calendars.",required:!0}),...MW,guests_can_modify:oP("Guests can modify"),guests_can_invite_others:oP("Guests can invite others"),guests_can_see_other_guests:oP("Guests can see other guests")},QN=Pe({auth:le,name:"google_calendar_update_event",classification:"WRITE",displayName:"Update Event",description:"Update fields of an existing Google Calendar event by ID using a safe get-then-merge; fields you leave unset keep their current values.",audience:"ai",aiMetadata:{description:"Update fields of an existing event (title, times, location, description, color, attendees, guest permissions) identified by calendar and event ID. It fetches the event first and merges, so unset fields keep their current values (it never blanks out attendees/recurrence/conferencing). Use this to edit or reschedule an existing event rather than recreating it. Resolve calendarId via google_calendar_list_calendars and eventId via google_calendar_list_events / google_calendar_search_events_all_calendars. Idempotent: applying the same field values repeatedly leaves the event in the same state.",idempotent:!0},props:LW,outputSchema:tt,run:a(e=>WT({...e,propsValue:{...e.propsValue,eventId:e.propsValue.event_id,guests_can_modify:iP(e.propsValue.guests_can_modify),guests_can_invite_others:iP(e.propsValue.guests_can_invite_others),guests_can_see_other_guests:iP(e.propsValue.guests_can_see_other_guests)}}),"run")});var jW={calendar_id:fe.calendarDropdown("writer"),event_id:V.ShortText({displayName:"Event ID",description:"The ID of the event to delete. Resolve it via List Events or Search Events Across Calendars.",required:!0})},ez=Pe({auth:le,name:"google_calendar_delete_event",classification:"DESTRUCTIVE",displayName:"Delete Event",description:"Permanently delete an event from a Google Calendar by its event ID.",audience:"ai",aiMetadata:{description:"Permanently delete an event from a calendar, identified by calendar and event ID. Use to cancel or remove an existing event; this cannot be undone, so confirm the event ID first. Resolve calendarId via google_calendar_list_calendars and eventId via google_calendar_list_events / google_calendar_search_events_all_calendars. Idempotent: once deleted, re-running leaves the event absent (a repeat call may report it as already gone).",idempotent:!0},props:jW,run:a(e=>qT({...e,propsValue:{calendar_id:e.propsValue.calendar_id,eventId:e.propsValue.event_id}}),"run")});var tz=Pe({auth:le,name:"google_calendar_get_event",classification:"READ",displayName:"Get Event",description:"Fetch the full details of a single Google Calendar event by its event ID.",audience:"ai",aiMetadata:{description:"Fetch the full details of one event by its unique event ID within a calendar. Use this when you already have an event ID (from a trigger or a list action) and need its current details; to find an event when you do not have its ID, use google_calendar_list_events or google_calendar_search_events_all_calendars instead. Resolve calendarId via google_calendar_list_calendars and eventId via google_calendar_list_events / google_calendar_search_events_all_calendars. Read-only and idempotent.",idempotent:!0},props:XT,outputSchema:tt,run:QT});var rz=Pe({auth:le,name:"google_calendar_list_events",classification:"SEARCH",displayName:"List Events",description:"List events from one Google Calendar, optionally filtered by date range, free-text search, and event types.",audience:"ai",aiMetadata:{description:`List events from one calendar, optionally narrowed by a date range, a free-text search term (matched with Google's native q= filter), and event types, optionally expanding recurring events into individual instances. Use this to browse or find events in a known calendar, including text search within that calendar; to search across every calendar when you do not know which one holds the event, use google_calendar_search_events_all_calendars instead. Resolve calendarId via google_calendar_list_calendars (default "primary"). Read-only and idempotent.`,idempotent:!0},props:GT,outputSchema:lh,run:HT});var nz=Pe({auth:le,name:"google_calendar_find_busy_periods",classification:"SEARCH",displayName:"Find Busy Periods",description:"Return the raw busy time blocks of one or more calendars within a window, via the freebusy query.",audience:"ai",aiMetadata:{description:"Query one or more calendars for their raw busy time blocks within a start/end window, without exposing event details (the low-level freebusy primitive). Use this when you need the busy intervals themselves (e.g. across several shared calendars); to get the inverse open slots directly, use google_calendar_find_free_slots instead. Resolve calendarId values via google_calendar_list_calendars. Requires the calendars to check and a time range. Read-only and idempotent.",idempotent:!0},props:JT,outputSchema:dh,run:YT});var oz=Ke(ro());var iz=Pe({auth:le,name:"google_calendar_remove_attendee",classification:"WRITE",displayName:"Remove Attendee",description:"Remove one attendee (by email) from an existing Google Calendar event, preserving the rest of the guest list.",audience:"ai",aiMetadata:{description:"Remove a single attendee, matched by email, from an existing event by fetching the current attendee list, dropping that one guest, and patching the event. Use this to uninvite one person without disturbing the other guests; to add guests use the add-attendees action instead. Resolve calendarId via google_calendar_list_calendars and eventId via google_calendar_list_events / google_calendar_search_events_all_calendars. Not idempotent (notifications may fire), though re-removing an already-absent attendee is a no-op on state. It uses optimistic concurrency (If-Match on the event revision), so a simultaneous edit by someone else fails with a retry-able conflict instead of silently clobbering their change.",idempotent:!1},props:{calendar_id:fe.calendarDropdown("writer"),event_id:V.ShortText({displayName:"Event ID",description:"The ID of the event to remove the attendee from. Resolve it via List Events or Search Events Across Calendars.",required:!0}),attendee_email:V.ShortText({displayName:"Attendee Email",description:"Email address of the attendee to remove from the event.",required:!0}),send_updates:V.StaticDropdown({displayName:"Send Notifications",description:"Who should be notified about the attendee change.",required:!1,defaultValue:"none",options:{options:[{label:"To everyone",value:"all"},{label:"To external guests only",value:"externalOnly"},{label:"To no one",value:"none"}]}})},outputSchema:wN,async run(e){let{calendar_id:t,event_id:n,attendee_email:o,send_updates:r}=e.propsValue,i=await At(e.auth),s=(0,oz.calendar)({version:"v3",auth:i}),u=o.trim().toLowerCase();try{let d=await s.events.get({calendarId:t,eventId:n}),f=d.data.attendees??[],h=f.filter(p=>(p.email??"").trim().toLowerCase()!==u);if(h.length===f.length)return{removed:!1,attendee_email:o,message:`Attendee "${o}" was not on event "${n}"; nothing to remove.`,event:d.data};let g=d.data.etag??void 0,m=await s.events.patch({calendarId:t,eventId:n,sendUpdates:r??"none",requestBody:{attendees:h}},g?{headers:{"If-Match":g}}:{});return{removed:!0,attendee_email:o,event:m.data}}catch(d){let f=d.response?.status??d.code;throw f===412?new Error(`Event "${n}" changed since it was read (a concurrent edit). Re-run Remove Attendee to retry against the latest version.`):f===404?new Error(`Event "${n}" not found in calendar "${t}". Verify the event ID and calendar.`):f===403?new Error(`Access denied while editing event "${n}". The calendar must be writable.`):d}}});var az=Ke(ro());var aP=Ke(Xn()),sz=Pe({auth:le,name:"google_calendar_import_event",classification:"WRITE",displayName:"Import Event",description:"Import an existing event (by iCalUID) into a Google Calendar as a private copy, using events.import.",audience:"ai",aiMetadata:{description:'Import an existing event into a calendar as a private copy, keyed by its iCalUID with a start and end time (the events.import primitive, distinct from creating a brand-new event or moving one). Use this to copy or de-duplicate an event across calendars; re-importing the same iCalUID updates the existing copy rather than duplicating it. Resolve calendarId via google_calendar_list_calendars (default "primary"). Only default (non-special) events can be imported. Not idempotent: each import can create or mutate the destination copy.',idempotent:!1},props:{calendar_id:fe.calendarDropdown("writer"),ical_uid:V.ShortText({displayName:"iCal UID",description:`The event's iCalUID (its globally unique identifier, e.g. "abc123@google.com"). This is the dedup key: re-importing the same UID updates the existing copy.`,required:!0}),summary:V.ShortText({displayName:"Title",description:"Title (summary) of the imported event.",required:!0}),start_date_time:V.DateTime({displayName:"Start Time",description:'Event start as an ISO 8601 timestamp (e.g. "2026-06-01T09:00:00Z").',required:!0}),end_date_time:V.DateTime({displayName:"End Time",description:'Event end as an ISO 8601 timestamp (e.g. "2026-06-01T10:00:00Z").',required:!0}),location:V.ShortText({displayName:"Location",required:!1}),description:V.LongText({displayName:"Description",description:"Description of the event. You can use HTML tags here.",required:!1})},outputSchema:tt,async run(e){let{calendar_id:t,ical_uid:n,summary:o,start_date_time:r,end_date_time:i,location:s,description:u}=e.propsValue,d=await At(e.auth),f=(0,az.calendar)({version:"v3",auth:d});try{return(await f.events.import({calendarId:t,requestBody:{iCalUID:n,summary:o,location:s??void 0,description:u??void 0,start:{dateTime:(0,aP.default)(r).toISOString()},end:{dateTime:(0,aP.default)(i).toISOString()}}})).data}catch(h){let g=h.response?.status??h.code;throw g===403?new Error(`Access denied while importing into calendar "${t}". The calendar must be writable.`):g===400?new Error(`Invalid import request. Ensure iCalUID, start, and end are provided and that the event is a default (non-special) event. (${h.message})`):h}}});var cz=Pe({auth:le,name:"google_calendar_list_calendars",classification:"SEARCH",displayName:"List Calendars",description:"List every calendar in the user's calendar list, returning each calendar's id, summary, access role, time zone, and whether it is primary.",audience:"ai",aiMetadata:{description:`List all calendars on the user's calendar list, returning each one's calendarId, summary, accessRole, timeZone, and whether it is the primary calendar. This is the calendarId resolver: call it first to discover which calendars exist and obtain the calendarId that every event/freebusy atomic needs (default "primary"). Read-only and idempotent.`,idempotent:!0},props:{},outputSchema:TN,async run(e){await $e(e.auth);let t=await Zt(e.auth);return{calendars:t.map(n=>({id:n.id,summary:n.summary,description:n.description,location:n.location,timeZone:n.timeZone,accessRole:n.accessRole,primary:n.primary??!1,selected:n.selected??!1,backgroundColor:n.backgroundColor,foregroundColor:n.foregroundColor})),count:t.length}}});var uz=Pe({auth:le,name:"google_calendar_get_calendar",classification:"READ",displayName:"Get Calendar",description:"Fetch one calendar's metadata (summary, time zone, description, location) by its calendar ID.",audience:"ai",aiMetadata:{description:`Fetch one calendar's metadata \u2014 summary, timeZone, description, and location \u2014 by its calendar ID. Use this to read a calendar's time zone, which is load-bearing when constructing correct event start/end windows. Resolve calendarId via google_calendar_list_calendars (default "primary"). Read-only and idempotent.`,idempotent:!0},props:{calendar_id:fe.calendarDropdown()},outputSchema:EN,async run(e){let{calendar_id:t}=e.propsValue,n=await $e(e.auth),o={method:"GET",url:`${fe.baseUrl}/calendars/${encodeURIComponent(t)}`,authentication:{type:"BEARER_TOKEN",token:n}};try{return(await Be.sendRequest(o)).body}catch(r){let i=r.response?.status;throw i===404?new Error(`Calendar "${t}" not found. Verify the calendar ID via List Calendars.`):i===403?new Error(`Access denied to calendar "${t}". Check your permissions.`):r}}});var lz=Pe({auth:le,name:"google_calendar_get_colors",classification:"READ",displayName:"Get Colors",description:"Fetch the Google Calendar color palette mapping colorId values to their hex background/foreground colors.",audience:"ai",aiMetadata:{description:"Fetch the global color palette: the mapping from each colorId to its background/foreground hex color, for both events and calendars. Use this to resolve a colorId before setting the color on google_calendar_create_event or google_calendar_update_event. Read-only and idempotent.",idempotent:!0},props:{},outputSchema:SN,async run(e){return await If(e.auth)}});var dz=Pe({auth:le,name:"google_calendar_list_settings",classification:"SEARCH",displayName:"List Settings",description:"List the user's Google Calendar account settings (time zone, week start, date/time format, and more).",audience:"ai",aiMetadata:{description:`List all of the user's Google Calendar account settings as id/value pairs \u2014 including the account "timezone", "weekStart", and "format24HourTime". Use this to read the account time zone to anchor relative-date reasoning before building event windows, or to read a single setting (just pick its id from the returned list). Read-only and idempotent.`,idempotent:!0},props:{},outputSchema:PN,async run(e){let t=await $e(e.auth),n={method:"GET",url:`${fe.baseUrl}/users/me/settings`,authentication:{type:"BEARER_TOKEN",token:t}},r=(await Be.sendRequest(n)).body.items??[],i={};for(let s of r)i[s.id]=s.value;return{settings:i,items:r,count:r.length}}});var hh="google_calendar_watch",ss="google_calendar_sync_token",sP="google_calendar_seen_event_ids",FW=500;function pz(e,{event_types:t,search_filter:n,exclude_all_day:o}){if(t&&t.length>0){let r=e.eventType||"default";if(!t.includes(r))return!1}if(n&&n.trim()){let r=n.toLowerCase().trim(),i=(e.summary||"").toLowerCase(),s=(e.description||"").toLowerCase(),u=(e.location||"").toLowerCase();if(!(i.includes(r)||s.includes(r)||u.includes(r)))return!1}return!(o&&e.start?.date&&!e.start?.dateTime)}a(pz,"matchesFilters");var fz=ar({auth:le,name:"new_event",classification:"READ",displayName:"New Event",description:"Fires when a new event is created in a calendar.",aiMetadata:{description:"Fires when a brand-new event is created in the selected calendar (not on edits or cancellations), via Google push notifications. Each fired item is the new event; can be narrowed by event type, a text search across title/description/location, and an option to skip all-day events."},props:{calendar_id:fe.calendarDropdown("writer"),event_types:V.StaticMultiSelectDropdown({displayName:"Event Types to Monitor",description:"Filter by specific event types (leave empty to monitor all event types)",required:!1,options:{options:[{label:"Default Events",value:"default"},{label:"Birthday Events",value:"birthday"},{label:"Focus Time",value:"focusTime"},{label:"Out of Office",value:"outOfOffice"},{label:"Working Location",value:"workingLocation"},{label:"From Gmail",value:"fromGmail"}]}}),search_filter:V.ShortText({displayName:"Search Filter",description:"Only trigger for events containing this text in title, description, or location (optional)",required:!1}),exclude_all_day:V.Checkbox({displayName:"Exclude All-Day Events",description:"Skip triggering for all-day events",required:!1,defaultValue:!1})},outputSchema:tt,type:"WEBHOOK",renewConfiguration:{strategy:"CRON",cronExpression:"0 */12 * * *"},sampleData:{kind:"calendar#event",etag:'"3419997894982000"',id:"sample_event_id_12345",status:"confirmed",htmlLink:"https://www.google.com/calendar/event?eid=c2FtcGxlX2V2ZW50X2lkXzEyMzQ1",created:"2025-08-15T11:02:27.000Z",updated:"2025-08-15T11:02:27.491Z",summary:"Team Sync",creator:{email:"creator@example.com"},organizer:{email:"creator@example.com",self:!0},start:{dateTime:"2025-08-18T10:00:00-07:00",timeZone:"America/Los_Angeles"},end:{dateTime:"2025-08-18T11:00:00-07:00",timeZone:"America/Los_Angeles"},iCalUID:"sample_event_id_12345@google.com",sequence:0,reminders:{useDefault:!0},eventType:"default"},async onEnable(e){let t=e.propsValue.calendar_id,n=e.auth,o=await Ub(t,e.webhookUrl,n);await e.store.put(hh,o);let r=await Af({calendarId:t,authProp:n});dt(r)||await e.store.put(ss,r)},async onDisable(e){let t=e.auth,n=await e.store.get(hh);n&&await zb(n,t),await e.store.delete(ss),await e.store.delete(sP)},async onRenew(e){let t=e.propsValue.calendar_id,n=e.auth,o=await e.store.get(hh);o&&await zb(o,n);let r=await Ub(t,e.webhookUrl,n);await e.store.put(hh,r)},async run(e){let o=e.payload.headers["x-goog-resource-state"],r={event_types:e.propsValue.event_types,search_filter:e.propsValue.search_filter,exclude_all_day:e.propsValue.exclude_all_day};if(o==="sync")return[];if(o!=="exists")return[];let i=e.propsValue.calendar_id,s=e.auth,u=await e.store.get(ss);if(dt(u)){let y=await Af({calendarId:i,authProp:s});return dt(y)||await e.store.put(ss,y),[]}let{items:d,nextSyncToken:f,syncTokenInvalid:h}=await JC({calendarId:i,syncToken:u,authProp:s});if(h){let y=await Af({calendarId:i,authProp:s});return dt(y)||await e.store.put(ss,y),[]}dt(f)||await e.store.put(ss,f);let g=await e.store.get(sP),m=new Set(g??[]),p=[];for(let y of d)!y.id||y.status==="cancelled"||m.has(y.id)||(m.add(y.id),pz(y,r)&&p.push(y));if(m.size!==(g?.length??0)){let y=Array.from(m).slice(-FW);await e.store.put(sP,y)}return p},async test(e){let t=e.auth,n={event_types:e.propsValue.event_types,search_filter:e.propsValue.search_filter,exclude_all_day:e.propsValue.exclude_all_day},o=await YC(e.propsValue.calendar_id,t);return pz(o,n)?[o]:[]}});var gh={strategy:0,items:a(async({auth:e,propsValue:t,lastFetchEpochMS:n})=>{if(n===0)return[];let{calendar_id:o,specific_event:r,event_id:i}=t;if(!o)return[];if(r&&!i)return[];let s=[];if(r&&i){let f={method:"GET",url:`${fe.baseUrl}/calendars/${o}/events/${i}`,authentication:{type:"BEARER_TOKEN",token:await $e(e)}};try{let g=(await Be.sendRequest(f)).body,m=g.end?.dateTime??g.end?.date;m&&new Date(m).getTime()>n&&(s=[g])}catch(h){return console.error("Error fetching specific event:",h),[]}}else{let f={method:"GET",url:`${fe.baseUrl}/calendars/${o}/events`,authentication:{type:"BEARER_TOKEN",token:await $e(e)},queryParams:{singleEvents:"true",orderBy:"startTime",timeMin:new Date(n).toISOString()}};s=(await Be.sendRequest(f)).body.items}let u=[],d=Date.now();for(let f of s){let h=f.end?.dateTime??f.end?.date;if(!h)continue;let g=new Date(h).getTime();g>n&&g<=d&&u.push({epochMilliSeconds:g,data:f})}return u},"items")},mz=ar({auth:le,name:"event_ends",classification:"READ",displayName:"Event Ends",description:"Fires when an event ends.",aiMetadata:{description:"Fires once an event in the selected calendar reaches its end time, detected by polling. Each fired item is the event that just ended. Can watch all events in the calendar or be scoped to a single specific event."},props:{calendar_id:fe.calendarDropdown("writer"),specific_event:V.Checkbox({displayName:"Target Specific Event",description:"Enable to monitor a specific event instead of all events in the calendar.",required:!1,defaultValue:!1}),event_id:fe.eventDropdown(!1)},outputSchema:tt,type:"POLLING",sampleData:{kind:"calendar#event",etag:'"3419997894982000"',id:"sample_event_id_67890",status:"confirmed",htmlLink:"https://www.google.com/calendar/event?eid=c2FtcGxlX2V2ZW50X2lkXzY3ODkw",created:"2025-08-14T09:00:00.000Z",updated:"2025-08-14T09:00:00.000Z",summary:"Project Deadline",creator:{email:"manager@example.com"},organizer:{email:"manager@example.com",self:!0},start:{dateTime:"2025-08-14T14:30:00+05:30",timeZone:"Asia/Kolkata"},end:{dateTime:"2025-08-14T15:30:00+05:30",timeZone:"Asia/Kolkata"},iCalUID:"sample_event_id_67890@google.com",sequence:0,reminders:{useDefault:!0},eventType:"default"},async onEnable(e){await nt.onEnable(gh,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async onDisable(e){await nt.onDisable(gh,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async run(e){return await nt.poll(gh,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files})},async test(e){return await nt.test(gh,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files})}});var yh={strategy:0,items:a(async({auth:e,propsValue:t})=>{let{calendar_id:n,specific_event:o,event_id:r,time_value:i,time_unit:s}=t;if(!n||!i||!s)return[];if(o&&!r)return[];let u=i*60*1e3;s==="hours"?u=i*60*60*1e3:s==="days"&&(u=i*24*60*60*1e3);let d=Date.now(),f=300*1e3,h=new Date(d+u).toISOString(),g=new Date(d+u+f).toISOString(),m=[];if(o&&r){let p={method:"GET",url:`${fe.baseUrl}/calendars/${n}/events/${r}`,authentication:{type:"BEARER_TOKEN",token:await $e(e)}};try{let v=(await Be.sendRequest(p)).body,b=new Date(v.start?.dateTime??v.start?.date??0).getTime()-u;b>=d&&b<=d+f&&(m=[v])}catch(y){return console.error("Error fetching specific event:",y),[]}}else{let p={method:"GET",url:`${fe.baseUrl}/calendars/${n}/events`,authentication:{type:"BEARER_TOKEN",token:await $e(e)},queryParams:{singleEvents:"true",orderBy:"startTime",timeMin:h,timeMax:g}};m=(await Be.sendRequest(p)).body.items}return m.map(p=>({epochMilliSeconds:new Date(p.start?.dateTime??p.start?.date??0).getTime()-u,data:p}))},"items")},hz=ar({auth:le,name:"event_starts_in",classification:"READ",displayName:"Event Start (Time Before)",description:"Fires at a specified amount of time before an event starts (e.g., a reminder).",aiMetadata:{description:"Fires a configurable lead time (in minutes, hours, or days) before an event in the selected calendar begins, acting as a pre-event reminder. Each fired item is the upcoming event. Can watch all events or a single specific event."},props:{calendar_id:fe.calendarDropdown("writer"),specific_event:V.Checkbox({displayName:"Target Specific Event",description:"Enable to monitor a specific event instead of all events in the calendar.",required:!1,defaultValue:!1}),event_id:fe.eventDropdown(!1),time_value:V.Number({displayName:"Time Before",description:"The amount of time before the event starts.",required:!0,defaultValue:15}),time_unit:V.StaticDropdown({displayName:"Time Unit",required:!0,options:{options:[{label:"Minutes",value:"minutes"},{label:"Hours",value:"hours"},{label:"Days",value:"days"}]},defaultValue:"minutes"})},outputSchema:tt,type:"POLLING",sampleData:{},async onEnable(e){await nt.onEnable(yh,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async onDisable(e){await nt.onDisable(yh,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async run(e){return await nt.poll(yh,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files})},async test(e){return await nt.test(yh,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files})}});var vh={strategy:0,items:a(async({auth:e,propsValue:t,lastFetchEpochMS:n})=>{let{calendar_id:o,search_term:r,event_types:i,search_fields:s}=t;if(!o||!r)return[];let u;n===0?(u=new Date,u.setDate(u.getDate()-1)):u=new Date(n);let d={singleEvents:"true",orderBy:"updated",updatedMin:u.toISOString(),q:r};i&&i.length>0&&i.forEach(p=>{d.eventTypes?d.eventTypes+="&eventTypes="+p:d.eventTypes=p});let f={method:"GET",url:`${fe.baseUrl}/calendars/${o}/events`,authentication:{type:"BEARER_TOKEN",token:await $e(e)},queryParams:d};return(await Be.sendRequest(f)).body.items.filter(p=>{let y=new Date(p.created??0).getTime();if(!(new Date(p.updated??0).getTime()-y<5e3))return!1;if(s&&s.length>0){let b=r.toLowerCase();return s.some(k=>{switch(k){case"summary":return p.summary?.toLowerCase().includes(b)||!1;case"description":return p.description?.toLowerCase().includes(b)||!1;case"location":return p.location?.toLowerCase().includes(b)||!1;case"attendees":return p.attendees?.some(N=>N.email?.toLowerCase().includes(b)||N.displayName?.toLowerCase().includes(b))||!1;default:return!1}})}return!0}).map(p=>({epochMilliSeconds:new Date(p.updated).getTime(),data:p}))},"items")},gz=ar({auth:le,name:"new_event_matching_search",classification:"READ",displayName:"New Event Matching Search",description:"Fires when a new event is created that matches a specified search term.",aiMetadata:{description:"Fires when a newly created event in the selected calendar matches a required search term (matched across title, description, location, and attendees by default, or restricted to chosen fields). Each fired item is the matching new event; can also be filtered by event type."},props:{calendar_id:fe.calendarDropdown("writer"),search_term:V.ShortText({displayName:"Search Term",description:"The keyword(s) to search for in new events (searches across title, description, location, and attendees by default).",required:!0}),event_types:V.StaticMultiSelectDropdown({displayName:"Event Types",description:"Filter by specific event types (optional)",required:!1,options:{options:[{label:"Default Events",value:"default"},{label:"Birthday Events",value:"birthday"},{label:"Focus Time",value:"focusTime"},{label:"Out of Office",value:"outOfOffice"},{label:"Working Location",value:"workingLocation"},{label:"From Gmail",value:"fromGmail"}]}}),search_fields:V.StaticMultiSelectDropdown({displayName:"Search In Fields",description:"Specify which fields to search in (leave empty to use Google's default search across all fields)",required:!1,options:{options:[{label:"Event Title/Summary",value:"summary"},{label:"Event Description",value:"description"},{label:"Event Location",value:"location"},{label:"Attendee Names/Emails",value:"attendees"}]}})},outputSchema:tt,type:"POLLING",sampleData:{id:"abc123def456",summary:"Final Project Review",description:"Review of the Q3 final project deliverables.",status:"confirmed",created:"2025-08-14T09:05:00.000Z",updated:"2025-08-14T09:05:01.000Z",start:{dateTime:"2025-09-01T10:00:00-07:00"},end:{dateTime:"2025-09-01T11:30:00-07:00"},organizer:{email:"project.manager@example.com"}},async onEnable(e){await nt.onEnable(vh,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async onDisable(e){await nt.onDisable(vh,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async run(e){return await nt.poll(vh,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files})},async test(e){return await nt.test(vh,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files})}});var _h={strategy:0,items:a(async({auth:e,propsValue:t,lastFetchEpochMS:n})=>{let{calendar_id:o,specific_event:r,event_id:i,cancellation_reason:s}=t;if(!o)return[];if(r&&!i)return[];let u;n===0?(u=new Date,u.setDate(u.getDate()-1)):u=new Date(n);let d=[];if(r&&i){let f={method:"GET",url:`${fe.baseUrl}/calendars/${o}/events/${i}`,authentication:{type:"BEARER_TOKEN",token:await $e(e)}};try{let g=(await Be.sendRequest(f)).body;new Date(g.updated??0).getTime()>n&&g.status==="cancelled"&&(d=[g])}catch(h){return console.error("Error fetching specific event:",h),[]}}else d=(await pu(o,!0,e,u)).filter(h=>h.status==="cancelled");return s&&s.length>0&&(d=d.filter(f=>s.some(h=>{switch(h){case"deleted":return!f.summary||f.summary.includes("Deleted");case"declined":return f.attendees?.some(g=>g.responseStatus==="declined")||!1;case"rescheduled":return f.summary?.toLowerCase().includes("rescheduled")||f.description?.toLowerCase().includes("rescheduled")||!1;case"other":return!0;default:return!0}}))),d.map(f=>({epochMilliSeconds:new Date(f.updated).getTime(),data:f}))},"items")},yz=ar({auth:le,name:"event_cancelled",classification:"READ",displayName:"Event Cancelled",description:"Fires when an event is canceled or deleted.",aiMetadata:{description:"Fires when an event in the selected calendar transitions to a cancelled (or deleted) state, detected by polling. Each fired item is the cancelled event; can optionally be filtered by cancellation reason (deleted, attendee declined, rescheduled, other) and scoped to a single specific event."},props:{calendar_id:fe.calendarDropdown("writer"),specific_event:V.Checkbox({displayName:"Target Specific Event",description:"Enable to monitor a specific event instead of all events in the calendar.",required:!1,defaultValue:!1}),event_id:fe.eventDropdown(!1),cancellation_reason:V.StaticMultiSelectDropdown({displayName:"Cancellation Reasons",description:"Filter by specific types of cancellations (optional)",required:!1,options:{options:[{label:"Event Deleted",value:"deleted"},{label:"Attendee Declined",value:"declined"},{label:"Event Rescheduled",value:"rescheduled"},{label:"Other Cancellations",value:"other"}]}})},outputSchema:tt,type:"POLLING",sampleData:{id:"abc123def456_cancelled",summary:"Cancelled: Q3 Planning Session",status:"cancelled",created:"2025-07-20T10:00:00.000Z",updated:"2025-08-14T09:30:00.000Z",organizer:{email:"project.manager@example.com"},start:{dateTime:"2025-08-25T10:00:00-07:00"},end:{dateTime:"2025-08-25T11:30:00-07:00"}},async onEnable(e){await nt.onEnable(_h,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async onDisable(e){await nt.onDisable(_h,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async run(e){return await nt.poll(_h,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files})},async test(e){return await nt.test(_h,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files})}});var cP={strategy:1,items:a(async({auth:e,store:t,propsValue:n})=>{let{access_role_filter:o,calendar_name_filter:r,exclude_shared:i}=n,u=await Zt(e);if(o&&o.length>0&&(u=u.filter(m=>o.includes(m.accessRole))),r&&r.trim()){let m=r.toLowerCase().trim();u=u.filter(p=>p.summary?.toLowerCase().includes(m)||p.description?.toLowerCase().includes(m))}i&&(u=u.filter(m=>m.accessRole==="owner"||m.primary));let d=u.map(m=>m.id),f=await t.get("calendars")||[],h=new Set(f),g=u.filter(m=>!h.has(m.id));return await t.put("calendars",d),g.map(m=>({id:m.id,data:{...m,isOwned:m.accessRole==="owner"||m.primary,isShared:m.accessRole!=="owner"&&!m.primary,calendarType:m.primary?"primary":m.accessRole==="owner"?"owned":"shared"}}))},"items")},vz=ar({auth:le,name:"new_calendar",classification:"READ",displayName:"New Calendar",description:"Fires when a new calendar is created or becomes accessible.",aiMetadata:{description:"Fires when a calendar newly appears in the connected account's calendar list, whether created or shared in, detected by polling. Each fired item is the new calendar. Can be filtered by access role, a name/description text match, and an option to exclude shared calendars."},props:{access_role_filter:V.StaticMultiSelectDropdown({displayName:"Access Role Filter",description:"Only trigger for calendars with specific access roles (optional)",required:!1,options:{options:[{label:"Owner",value:"owner"},{label:"Writer",value:"writer"},{label:"Reader",value:"reader"},{label:"Free/Busy Reader",value:"freeBusyReader"}]}}),calendar_name_filter:V.ShortText({displayName:"Calendar Name Filter",description:"Only trigger for calendars containing this text in name or description (optional)",required:!1}),exclude_shared:V.Checkbox({displayName:"Exclude Shared Calendars",description:"Only trigger for calendars you own, not shared calendars",required:!1,defaultValue:!1})},outputSchema:_N,type:"POLLING",sampleData:{id:"sample_calendar_id@group.calendar.google.com",summary:"New Project Team Calendar",description:"A shared calendar for the new project team.",timeZone:"Asia/Kolkata",backgroundColor:"#9fe1e7",foregroundColor:"#000000",accessRole:"owner",isOwned:!0,isShared:!1,calendarType:"owned",primary:!1},async onEnable(e){let t=await Zt(e.auth),{access_role_filter:n,calendar_name_filter:o,exclude_shared:r}=e.propsValue,i=t;if(n&&n.length>0&&(i=i.filter(s=>n.includes(s.accessRole))),o&&o.trim()){let s=o.toLowerCase().trim();i=i.filter(u=>u.summary?.toLowerCase().includes(s)||u.description?.toLowerCase().includes(s))}r&&(i=i.filter(s=>s.accessRole==="owner"||s.primary)),await e.store.put("calendars",i.map(s=>s.id)),await nt.onEnable(cP,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async onDisable(e){await nt.onDisable(cP,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async run(e){return await nt.poll(cP,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files})},async test(e){return(await Zt(e.auth)).slice(-1).map(o=>({id:o.id,data:{...o,isOwned:o.accessRole==="owner"||o.primary,isShared:o.accessRole!=="owner"&&!o.primary,calendarType:o.primary?"primary":o.accessRole==="owner"?"owned":"shared"}}))}});var BW=kI({minimumSupportedRelease:"0.86.4",logoUrl:"https://cdn.activepieces.com/pieces/google-calendar.png",categories:["PRODUCTIVITY"],displayName:"Google Calendar",description:"Get organized and stay on schedule",authors:["OsamaHaikal","bibhuty-did-this","Vitalini","pfernandez98","kishanprmr","MoShizzle","khaledmashaly","abuaboud","ikus060","Cloudieunnie","sanket-a11y","geekyme"],auth:le,actions:[FN,$N,kN,zN,MN,NN,BN,qN,VN,ZN,KN,YN,XN,QN,ez,tz,rz,nz,iz,sz,cz,uz,lz,dz,WC({auth:le,baseUrl(){return fe.baseUrl},authMapping:a(async e=>({Authorization:`Bearer ${await $e(e)}`}),"authMapping")})],triggers:[LN,fz,mz,hz,gz,yz,vz]});0&&(module.exports={createGoogleClient,getAccessToken,googleCalendar,googleCalendarAuth});
|
|
70
108
|
/*! Bundled license information:
|
|
71
109
|
|
|
72
110
|
mime-types/index.js:
|