@activepieces/piece-alai 0.1.5 → 0.1.6
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 +4 -4
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";var Ys=Object.create;var Xe=Object.defineProperty;var Qs=Object.getOwnPropertyDescriptor;var eu=Object.getOwnPropertyNames;var tu=Object.getPrototypeOf,ru=Object.prototype.hasOwnProperty;var o=(e,t)=>Xe(e,"name",{value:t,configurable:!0});var E=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},dn=(e,t)=>{for(var r in t)Xe(e,r,{get:t[r],enumerable:!0})},mn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of eu(t))!ru.call(e,i)&&i!==r&&Xe(e,i,{get:()=>t[i],enumerable:!(n=Qs(t,i))||n.enumerable});return e};var Me=(e,t,r)=>(r=e!=null?Ys(tu(e)):{},mn(t||!e||!e.__esModule?Xe(r,"default",{value:e,enumerable:!0}):r,e)),nu=e=>mn(Xe({},"__esModule",{value:!0}),e);var Uo=E((Co,Bt)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={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")},n=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),u="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",l={zoneIndex:new RegExp(u,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${u})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${u})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${t}\\.${t}\\.${t}\\.${t}(${u})?$`,"i")};function g(s,d){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let f=0,m=-1,v=(s.match(l.zoneIndex)||[])[0],_,M;for(v&&(v=v.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)f++;if(s.substr(0,2)==="::"&&f--,s.substr(-2,2)==="::"&&f--,f>d)return null;for(M=d-f,_=":";M--;)_+="0:";return s=s.replace("::",_),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),d=(function(){let Y=s.split(":"),re=[];for(let ke=0;ke<Y.length;ke++)re.push(parseInt(Y[ke],16));return re})(),{parts:d,zoneId:v}}o(g,"expandIPv6");function h(s,d,f,m){if(s.length!==d.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let v=0,_;for(;m>0;){if(_=f-m,_<0&&(_=0),s[v]>>_!==d[v]>>_)return!1;m-=f,v+=1}return!0}o(h,"matchCIDR");function x(s){if(i.test(s))return parseInt(s,16);if(s[0]==="0"&&!isNaN(parseInt(s[1],10))){if(n.test(s))return parseInt(s,8);throw new Error(`ipaddr: cannot parse ${s} as octal`)}return parseInt(s,10)}o(x,"parseIntAuto");function I(s,d){for(;s.length<d;)s=`0${s}`;return s}o(I,"padPart");let P={};P.IPv4=(function(){function s(d){if(d.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let f,m;for(f=0;f<d.length;f++)if(m=d[f],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=d}return o(s,"IPv4"),s.prototype.SpecialRanges={unspecified:[[new s([0,0,0,0]),8]],broadcast:[[new s([255,255,255,255]),32]],multicast:[[new s([224,0,0,0]),4]],linkLocal:[[new s([169,254,0,0]),16]],loopback:[[new s([127,0,0,0]),8]],carrierGradeNat:[[new s([100,64,0,0]),10]],private:[[new s([10,0,0,0]),8],[new s([172,16,0,0]),12],[new s([192,168,0,0]),16]],reserved:[[new s([192,0,0,0]),24],[new s([192,0,2,0]),24],[new s([192,88,99,0]),24],[new s([198,18,0,0]),15],[new s([198,51,100,0]),24],[new s([203,0,113,0]),24],[new s([240,0,0,0]),4]],as112:[[new s([192,175,48,0]),24],[new s([192,31,196,0]),24]],amt:[[new s([192,52,193,0]),24]]},s.prototype.kind=function(){return"ipv4"},s.prototype.match=function(d,f){let m;if(f===void 0&&(m=d,d=m[0],f=m[1]),d.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return h(this.octets,d.octets,8,f)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,f=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,_,M;for(v=3;v>=0;v-=1)if(_=this.octets[v],_ in m){if(M=m[_],f&&M!==0)return null;M!==8&&(f=!0),d+=M}else return null;return 32-d},s.prototype.range=function(){return P.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){return this.octets.slice(0)},s.prototype.toIPv4MappedAddress=function(){return P.IPv6.parse(`::ffff:${this.toString()}`)},s.prototype.toNormalizedString=function(){return this.toString()},s.prototype.toString=function(){return this.octets.join(".")},s})(),P.IPv4.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),f=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],_=0;for(;_<4;)v.push(parseInt(f[_],10)|parseInt(m[_],10)^255),_++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},P.IPv4.isIPv4=function(s){return this.parser(s)!==null},P.IPv4.isValid=function(s){try{return new this(this.parser(s)),!0}catch{return!1}},P.IPv4.isValidCIDR=function(s){try{return this.parseCIDR(s),!0}catch{return!1}},P.IPv4.isValidFourPartDecimal=function(s){return!!(P.IPv4.isValid(s)&&s.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},P.IPv4.isValidCIDRFourPartDecimal=function(s){let d=s.match(/^(.+)\/(\d+)$/);return!P.IPv4.isValidCIDR(s)||!d?!1:P.IPv4.isValidFourPartDecimal(d[1])},P.IPv4.networkAddressFromCIDR=function(s){let d,f,m,v,_;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),_=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],f=0;f<4;)v.push(parseInt(m[f],10)&parseInt(_[f],10)),f++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},P.IPv4.parse=function(s){let d=this.parser(s);if(d===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(d)},P.IPv4.parseCIDR=function(s){let d;if(d=s.match(/^(.+)\/(\d+)$/)){let f=parseInt(d[2]);if(f>=0&&f<=32){let m=[this.parse(d[1]),f];return Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},P.IPv4.parser=function(s){let d,f,m;if(d=s.match(r.fourOctet))return(function(){let v=d.slice(1,6),_=[];for(let M=0;M<v.length;M++)f=v[M],_.push(x(f));return _})();if(d=s.match(r.longValue)){if(m=x(d[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return(function(){let v=[],_;for(_=0;_<=24;_+=8)v.push(m>>_&255);return v})().reverse()}else return(d=s.match(r.twoOctet))?(function(){let v=d.slice(1,4),_=[];if(m=x(v[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return _.push(x(v[0])),_.push(m>>16&255),_.push(m>>8&255),_.push(m&255),_})():(d=s.match(r.threeOctet))?(function(){let v=d.slice(1,5),_=[];if(m=x(v[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return _.push(x(v[0])),_.push(x(v[1])),_.push(m>>8&255),_.push(m&255),_})():null},P.IPv4.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>32)throw new Error("ipaddr: invalid IPv4 prefix length");let d=[0,0,0,0],f=0,m=Math.floor(s/8);for(;f<m;)d[f]=255,f++;return m<4&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},P.IPv6=(function(){function s(d,f){let m,v;if(d.length===16)for(this.parts=[],m=0;m<=14;m+=2)this.parts.push(d[m]<<8|d[m+1]);else if(d.length===8)this.parts=d;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(m=0;m<this.parts.length;m++)if(v=this.parts[m],!(0<=v&&v<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");f&&(this.zoneId=f)}return o(s,"IPv6"),s.prototype.SpecialRanges={unspecified:[new s([0,0,0,0,0,0,0,0]),128],linkLocal:[new s([65152,0,0,0,0,0,0,0]),10],multicast:[new s([65280,0,0,0,0,0,0,0]),8],loopback:[new s([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new s([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new s([0,0,0,0,0,65535,0,0]),96],discard:[new s([256,0,0,0,0,0,0,0]),64],rfc6145:[new s([0,0,0,0,65535,0,0,0]),96],rfc6052:[new s([100,65435,0,0,0,0,0,0]),96],"6to4":[new s([8194,0,0,0,0,0,0,0]),16],teredo:[new s([8193,0,0,0,0,0,0,0]),32],benchmarking:[new s([8193,2,0,0,0,0,0,0]),48],amt:[new s([8193,3,0,0,0,0,0,0]),32],as112v6:[[new s([8193,4,274,0,0,0,0,0]),48],[new s([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new s([8193,16,0,0,0,0,0,0]),28],orchid2:[new s([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new s([8193,48,0,0,0,0,0,0]),28],reserved:[[new s([8193,0,0,0,0,0,0,0]),23],[new s([8193,3512,0,0,0,0,0,0]),32]]},s.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},s.prototype.kind=function(){return"ipv6"},s.prototype.match=function(d,f){let m;if(f===void 0&&(m=d,d=m[0],f=m[1]),d.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return h(this.parts,d.parts,16,f)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,f=!1,m={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},v,_;for(let M=7;M>=0;M-=1)if(v=this.parts[M],v in m){if(_=m[v],f&&_!==0)return null;_!==16&&(f=!0),d+=_}else return null;return 128-d},s.prototype.range=function(){return P.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let d,f=[],m=this.parts;for(let v=0;v<m.length;v++)d=m[v],f.push(d>>8),f.push(d&255);return f},s.prototype.toFixedLengthString=function(){let d=(function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(I(this.parts[v].toString(16),4));return m}).call(this).join(":"),f="";return this.zoneId&&(f=`%${this.zoneId}`),d+f},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let d=this.parts.slice(-2),f=d[0],m=d[1];return new P.IPv4([f>>8,f&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let d=(function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(this.parts[v].toString(16));return m}).call(this).join(":"),f="";return this.zoneId&&(f=`%${this.zoneId}`),d+f},s.prototype.toRFC5952String=function(){let d=/((^|:)(0(:|$)){2,})/g,f=this.toNormalizedString(),m=0,v=-1,_;for(;_=d.exec(f);)_[0].length>v&&(m=_.index,v=_[0].length);return v<0?f:`${f.substring(0,m)}::${f.substring(m+v)}`},s.prototype.toString=function(){return this.toRFC5952String()},s})(),P.IPv6.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),f=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],_=0;for(;_<16;)v.push(parseInt(f[_],10)|parseInt(m[_],10)^255),_++;return new this(v)}catch(d){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${d})`)}},P.IPv6.isIPv6=function(s){return this.parser(s)!==null},P.IPv6.isValid=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{let d=this.parser(s);return new this(d.parts,d.zoneId),!0}catch{return!1}},P.IPv6.isValidCIDR=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{return this.parseCIDR(s),!0}catch{return!1}},P.IPv6.networkAddressFromCIDR=function(s){let d,f,m,v,_;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),_=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],f=0;f<16;)v.push(parseInt(m[f],10)&parseInt(_[f],10)),f++;return new this(v)}catch(M){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${M})`)}},P.IPv6.parse=function(s){let d=this.parser(s);if(d.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(d.parts,d.zoneId)},P.IPv6.parseCIDR=function(s){let d,f,m;if((f=s.match(/^(.+)\/(\d+)$/))&&(d=parseInt(f[2]),d>=0&&d<=128))return m=[this.parse(f[1]),d],Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},P.IPv6.parser=function(s){let d,f,m,v,_,M;if(m=s.match(l.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(l.native.test(s))return g(s,8);if((m=s.match(l.transitional))&&(M=m[6]||"",d=m[1],m[1].endsWith("::")||(d=d.slice(0,-1)),d=g(d+M,6),d.parts)){for(_=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],f=0;f<_.length;f++)if(v=_[f],!(0<=v&&v<=255))return null;return d.parts.push(_[0]<<8|_[1]),d.parts.push(_[2]<<8|_[3]),{parts:d.parts,zoneId:d.zoneId}}return null},P.IPv6.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>128)throw new Error("ipaddr: invalid IPv6 prefix length");let d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f=0,m=Math.floor(s/8);for(;f<m;)d[f]=255,f++;return m<16&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},P.fromByteArray=function(s){let d=s.length;if(d===4)return new P.IPv4(s);if(d===16)return new P.IPv6(s);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},P.isValid=function(s){return P.IPv6.isValid(s)||P.IPv4.isValid(s)},P.isValidCIDR=function(s){return P.IPv6.isValidCIDR(s)||P.IPv4.isValidCIDR(s)},P.parse=function(s){if(P.IPv6.isValid(s))return P.IPv6.parse(s);if(P.IPv4.isValid(s))return P.IPv4.parse(s);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},P.parseCIDR=function(s){try{return P.IPv6.parseCIDR(s)}catch{try{return P.IPv4.parseCIDR(s)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},P.process=function(s){let d=this.parse(s);return d.kind()==="ipv6"&&d.isIPv4MappedAddress()?d.toIPv4Address():d},P.subnetMatch=function(s,d,f){let m,v,_,M;f==null&&(f="unicast");for(v in d)if(Object.prototype.hasOwnProperty.call(d,v)){for(_=d[v],_[0]&&!(_[0]instanceof Array)&&(_=[_]),m=0;m<_.length;m++)if(M=_[m],s.kind()===M[0].kind()&&s.match.apply(s,M))return v}return f},typeof Bt<"u"&&Bt.exports?Bt.exports=P:e.ipaddr=P})(Co)});var Mi=E((gA,Ui)=>{var Ci=require("stream").Stream,Ll=require("util");Ui.exports=pe;function pe(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(pe,"DelayedStream");Ll.inherits(pe,Ci);pe.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var i=e.emit;return e.emit=function(){return r._handleEmit(arguments),i.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(pe.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});pe.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};pe.prototype.resume=function(){this._released||this.release(),this.source.resume()};pe.prototype.pause=function(){this.source.pause()};pe.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};pe.prototype.pipe=function(){var e=Ci.prototype.pipe.apply(this,arguments);return this.resume(),e};pe.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)};pe.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 Bi=E((hA,Fi)=>{var jl=require("util"),ji=require("stream").Stream,Li=Mi();Fi.exports=W;function W(){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(W,"CombinedStream");jl.inherits(W,ji);W.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};W.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};W.prototype.append=function(e){var t=W.isStreamLike(e);if(t){if(!(e instanceof Li)){var r=Li.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};W.prototype.pipe=function(e,t){return ji.prototype.pipe.call(this,e,t),this.resume(),e};W.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}};W.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(r){var n=W.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};W.prototype._pipeNext=function(e){this._currentStream=e;var t=W.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};W.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};W.prototype.write=function(e){this.emit("data",e)};W.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};W.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")};W.prototype.end=function(){this._reset(),this.emit("end")};W.prototype.destroy=function(){this._reset(),this.emit("close")};W.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};W.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};W.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)};W.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Vi=E((xA,Zi)=>{"use strict";Zi.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 Wi=E(te=>{"use strict";var qt=Vi(),Fl=require("path").extname,Hi=/^\s*([^;\s]*)(?:;|\s|$)/,Bl=/^text\//i;te.charset=Gi;te.charsets={lookup:Gi};te.contentType=Zl;te.extension=Vl;te.extensions=Object.create(null);te.lookup=Hl;te.types=Object.create(null);Gl(te.extensions,te.types);function Gi(e){if(!e||typeof e!="string")return!1;var t=Hi.exec(e),r=t&&qt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Bl.test(t[1])?"UTF-8":!1}o(Gi,"charset");function Zl(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?te.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=te.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(Zl,"contentType");function Vl(e){if(!e||typeof e!="string")return!1;var t=Hi.exec(e),r=t&&te.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(Vl,"extension");function Hl(e){if(!e||typeof e!="string")return!1;var t=Fl("x."+e).toLowerCase().substr(1);return t&&te.types[t]||!1}o(Hl,"lookup");function Gl(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(qt).forEach(o(function(i){var u=qt[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var l=0;l<c.length;l++){var g=c[l];if(t[g]){var h=r.indexOf(qt[t[g]].source),x=r.indexOf(u.source);if(t[g]!=="application/octet-stream"&&(h>x||h===x&&t[g].substr(0,12)==="application/"))continue}t[g]=i}}},"forEachMimeType"))}o(Gl,"populateMaps")});var Ki=E((bA,qi)=>{qi.exports=Wl;function Wl(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(Wl,"defer")});var Br=E((TA,Xi)=>{var Ji=Ki();Xi.exports=ql;function ql(e){var t=!1;return Ji(function(){t=!0}),o(function(n,i){t?e(n,i):Ji(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(ql,"async")});var Zr=E(($A,Yi)=>{Yi.exports=Kl;function Kl(e){Object.keys(e.jobs).forEach(Jl.bind(e)),e.jobs={}}o(Kl,"abort");function Jl(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(Jl,"clean")});var Vr=E((AA,ea)=>{var Qi=Br(),Xl=Zr();ea.exports=Yl;function Yl(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=Ql(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?Xl(r):r.results[i]=c,n(u,r.results))})}o(Yl,"iterate");function Ql(e,t,r,n){var i;return e.length==2?i=e(r,Qi(n)):i=e(r,t,Qi(n)),i}o(Ql,"runJob")});var Hr=E((OA,ta)=>{ta.exports=ep;function ep(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&n.keyedList.sort(r?t:function(i,u){return t(e[i],e[u])}),n}o(ep,"state")});var Gr=E((wA,ra)=>{var tp=Zr(),rp=Br();ra.exports=np;function np(e){Object.keys(this.jobs).length&&(this.index=this.size,tp(this),rp(e)(null,this.results))}o(np,"terminator")});var oa=E((NA,na)=>{var op=Vr(),ip=Hr(),ap=Gr();na.exports=sp;function sp(e,t,r){for(var n=ip(e);n.index<(n.keyedList||e).length;)op(e,t,n,function(i,u){if(i){r(i,u);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return ap.bind(n,r)}o(sp,"parallel")});var Wr=E((CA,Kt)=>{var ia=Vr(),up=Hr(),cp=Gr();Kt.exports=lp;Kt.exports.ascending=aa;Kt.exports.descending=pp;function lp(e,t,r,n){var i=up(e,r);return ia(e,t,i,o(function u(c,l){if(c){n(c,l);return}if(i.index++,i.index<(i.keyedList||e).length){ia(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),cp.bind(i,n)}o(lp,"serialOrdered");function aa(e,t){return e<t?-1:e>t?1:0}o(aa,"ascending");function pp(e,t){return-1*aa(e,t)}o(pp,"descending")});var ua=E((MA,sa)=>{var dp=Wr();sa.exports=mp;function mp(e,t,r){return dp(e,t,null,r)}o(mp,"serial")});var la=E((jA,ca)=>{ca.exports={parallel:oa(),serial:ua(),serialOrdered:Wr()}});var qr=E((FA,pa)=>{"use strict";pa.exports=Object});var ma=E((BA,da)=>{"use strict";da.exports=Error});var ga=E((ZA,fa)=>{"use strict";fa.exports=EvalError});var ha=E((VA,ya)=>{"use strict";ya.exports=RangeError});var xa=E((HA,va)=>{"use strict";va.exports=ReferenceError});var _a=E((GA,Pa)=>{"use strict";Pa.exports=SyntaxError});var Jt=E((WA,ba)=>{"use strict";ba.exports=TypeError});var Ta=E((qA,Ia)=>{"use strict";Ia.exports=URIError});var $a=E((KA,Ea)=>{"use strict";Ea.exports=Math.abs});var Aa=E((JA,Sa)=>{"use strict";Sa.exports=Math.floor});var Oa=E((XA,za)=>{"use strict";za.exports=Math.max});var wa=E((YA,ka)=>{"use strict";ka.exports=Math.min});var Na=E((QA,Ra)=>{"use strict";Ra.exports=Math.pow});var Ca=E((ez,Da)=>{"use strict";Da.exports=Math.round});var Ma=E((tz,Ua)=>{"use strict";Ua.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var ja=E((nz,La)=>{"use strict";var fp=Ma();La.exports=o(function(t){return fp(t)||t===0?t:t<0?-1:1},"sign")});var Ba=E((iz,Fa)=>{"use strict";Fa.exports=Object.getOwnPropertyDescriptor});var Kr=E((az,Za)=>{"use strict";var Xt=Ba();if(Xt)try{Xt([],"length")}catch{Xt=null}Za.exports=Xt});var Ha=E((sz,Va)=>{"use strict";var Yt=Object.defineProperty||!1;if(Yt)try{Yt({},"a",{value:1})}catch{Yt=!1}Va.exports=Yt});var Jr=E((uz,Ga)=>{"use strict";Ga.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},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;t[r]=i;for(var u 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 c=Object.getOwnPropertySymbols(t);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,r);if(l.value!==i||l.enumerable!==!0)return!1}return!0},"hasSymbols")});var Ka=E((lz,qa)=>{"use strict";var Wa=typeof Symbol<"u"&&Symbol,gp=Jr();qa.exports=o(function(){return typeof Wa!="function"||typeof Symbol!="function"||typeof Wa("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:gp()},"hasNativeSymbols")});var Xr=E((dz,Ja)=>{"use strict";Ja.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Yr=E((mz,Xa)=>{"use strict";var yp=qr();Xa.exports=yp.getPrototypeOf||null});var es=E((fz,Qa)=>{"use strict";var hp="Function.prototype.bind called on incompatible ",vp=Object.prototype.toString,xp=Math.max,Pp="[object Function]",Ya=o(function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var u=0;u<r.length;u+=1)n[u+t.length]=r[u];return n},"concatty"),_p=o(function(t,r){for(var n=[],i=r||0,u=0;i<t.length;i+=1,u+=1)n[u]=t[i];return n},"slicy"),bp=o(function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},"joiny");Qa.exports=o(function(t){var r=this;if(typeof r!="function"||vp.apply(r)!==Pp)throw new TypeError(hp+r);for(var n=_p(arguments,1),i,u=o(function(){if(this instanceof i){var x=r.apply(this,Ya(n,arguments));return Object(x)===x?x:this}return r.apply(t,Ya(n,arguments))},"binder"),c=xp(0,r.length-n.length),l=[],g=0;g<c;g++)l[g]="$"+g;if(i=Function("binder","return function ("+bp(l,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var h=o(function(){},"Empty");h.prototype=r.prototype,i.prototype=new h,h.prototype=null}return i},"bind")});var Ge=E((yz,ts)=>{"use strict";var Ip=es();ts.exports=Function.prototype.bind||Ip});var Qt=E((hz,rs)=>{"use strict";rs.exports=Function.prototype.call});var Qr=E((vz,ns)=>{"use strict";ns.exports=Function.prototype.apply});var is=E((xz,os)=>{"use strict";os.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var ss=E((Pz,as)=>{"use strict";var Tp=Ge(),Ep=Qr(),$p=Qt(),Sp=is();as.exports=Sp||Tp.call($p,Ep)});var cs=E((_z,us)=>{"use strict";var Ap=Ge(),zp=Jt(),Op=Qt(),kp=ss();us.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new zp("a function is required");return kp(Ap,Op,t)},"callBindBasic")});var gs=E((Iz,fs)=>{"use strict";var wp=cs(),ls=Kr(),ds;try{ds=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var en=!!ds&&ls&&ls(Object.prototype,"__proto__"),ms=Object,ps=ms.getPrototypeOf;fs.exports=en&&typeof en.get=="function"?wp([en.get]):typeof ps=="function"?o(function(t){return ps(t==null?t:ms(t))},"getDunder"):!1});var Ps=E((Ez,xs)=>{"use strict";var ys=Xr(),hs=Yr(),vs=gs();xs.exports=ys?o(function(t){return ys(t)},"getProto"):hs?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return hs(t)},"getProto"):vs?o(function(t){return vs(t)},"getProto"):null});var tn=E((Sz,_s)=>{"use strict";var Rp=Function.prototype.call,Np=Object.prototype.hasOwnProperty,Dp=Ge();_s.exports=Dp.call(Rp,Np)});var As=E((Az,Ss)=>{"use strict";var L,Cp=qr(),Up=ma(),Mp=ga(),Lp=ha(),jp=xa(),Je=_a(),Ke=Jt(),Fp=Ta(),Bp=$a(),Zp=Aa(),Vp=Oa(),Hp=wa(),Gp=Na(),Wp=Ca(),qp=ja(),Es=Function,rn=o(function(e){try{return Es('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),vt=Kr(),Kp=Ha(),nn=o(function(){throw new Ke},"throwTypeError"),Jp=vt?(function(){try{return arguments.callee,nn}catch{try{return vt(arguments,"callee").get}catch{return nn}}})():nn,We=Ka()(),X=Ps(),Xp=Yr(),Yp=Xr(),$s=Qr(),xt=Qt(),qe={},Qp=typeof Uint8Array>"u"||!X?L:X(Uint8Array),Ue={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?L:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?L:ArrayBuffer,"%ArrayIteratorPrototype%":We&&X?X([][Symbol.iterator]()):L,"%AsyncFromSyncIteratorPrototype%":L,"%AsyncFunction%":qe,"%AsyncGenerator%":qe,"%AsyncGeneratorFunction%":qe,"%AsyncIteratorPrototype%":qe,"%Atomics%":typeof Atomics>"u"?L:Atomics,"%BigInt%":typeof BigInt>"u"?L:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?L:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?L:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?L:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Up,"%eval%":eval,"%EvalError%":Mp,"%Float16Array%":typeof Float16Array>"u"?L:Float16Array,"%Float32Array%":typeof Float32Array>"u"?L:Float32Array,"%Float64Array%":typeof Float64Array>"u"?L:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?L:FinalizationRegistry,"%Function%":Es,"%GeneratorFunction%":qe,"%Int8Array%":typeof Int8Array>"u"?L:Int8Array,"%Int16Array%":typeof Int16Array>"u"?L:Int16Array,"%Int32Array%":typeof Int32Array>"u"?L:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":We&&X?X(X([][Symbol.iterator]())):L,"%JSON%":typeof JSON=="object"?JSON:L,"%Map%":typeof Map>"u"?L:Map,"%MapIteratorPrototype%":typeof Map>"u"||!We||!X?L:X(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Cp,"%Object.getOwnPropertyDescriptor%":vt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?L:Promise,"%Proxy%":typeof Proxy>"u"?L:Proxy,"%RangeError%":Lp,"%ReferenceError%":jp,"%Reflect%":typeof Reflect>"u"?L:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?L:Set,"%SetIteratorPrototype%":typeof Set>"u"||!We||!X?L:X(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?L:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":We&&X?X(""[Symbol.iterator]()):L,"%Symbol%":We?Symbol:L,"%SyntaxError%":Je,"%ThrowTypeError%":Jp,"%TypedArray%":Qp,"%TypeError%":Ke,"%Uint8Array%":typeof Uint8Array>"u"?L:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?L:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?L:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?L:Uint32Array,"%URIError%":Fp,"%WeakMap%":typeof WeakMap>"u"?L:WeakMap,"%WeakRef%":typeof WeakRef>"u"?L:WeakRef,"%WeakSet%":typeof WeakSet>"u"?L:WeakSet,"%Function.prototype.call%":xt,"%Function.prototype.apply%":$s,"%Object.defineProperty%":Kp,"%Object.getPrototypeOf%":Xp,"%Math.abs%":Bp,"%Math.floor%":Zp,"%Math.max%":Vp,"%Math.min%":Hp,"%Math.pow%":Gp,"%Math.round%":Wp,"%Math.sign%":qp,"%Reflect.getPrototypeOf%":Yp};if(X)try{null.error}catch(e){bs=X(X(e)),Ue["%Error.prototype%"]=bs}var bs,ed=o(function e(t){var r;if(t==="%AsyncFunction%")r=rn("async function () {}");else if(t==="%GeneratorFunction%")r=rn("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=rn("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&X&&(r=X(i.prototype))}return Ue[t]=r,r},"doEval"),Is={__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"]},Pt=Ge(),er=tn(),td=Pt.call(xt,Array.prototype.concat),rd=Pt.call($s,Array.prototype.splice),Ts=Pt.call(xt,String.prototype.replace),tr=Pt.call(xt,String.prototype.slice),nd=Pt.call(xt,RegExp.prototype.exec),od=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,id=/\\(\\)?/g,ad=o(function(t){var r=tr(t,0,1),n=tr(t,-1);if(r==="%"&&n!=="%")throw new Je("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Je("invalid intrinsic syntax, expected opening `%`");var i=[];return Ts(t,od,function(u,c,l,g){i[i.length]=l?Ts(g,id,"$1"):c||u}),i},"stringToPath"),sd=o(function(t,r){var n=t,i;if(er(Is,n)&&(i=Is[n],n="%"+i[0]+"%"),er(Ue,n)){var u=Ue[n];if(u===qe&&(u=ed(n)),typeof u>"u"&&!r)throw new Ke("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new Je("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");Ss.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new Ke("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ke('"allowMissing" argument must be a boolean');if(nd(/^%?[^%]*%?$/,t)===null)throw new Je("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ad(t),i=n.length>0?n[0]:"",u=sd("%"+i+"%",r),c=u.name,l=u.value,g=!1,h=u.alias;h&&(i=h[0],rd(n,td([0,1],h)));for(var x=1,I=!0;x<n.length;x+=1){var P=n[x],s=tr(P,0,1),d=tr(P,-1);if((s==='"'||s==="'"||s==="`"||d==='"'||d==="'"||d==="`")&&s!==d)throw new Je("property names with quotes must have matching quotes");if((P==="constructor"||!I)&&(g=!0),i+="."+P,c="%"+i+"%",er(Ue,c))l=Ue[c];else if(l!=null){if(!(P in l)){if(!r)throw new Ke("base intrinsic for "+t+" exists, but the property is not available.");return}if(vt&&x+1>=n.length){var f=vt(l,P);I=!!f,I&&"get"in f&&!("originalValue"in f.get)?l=f.get:l=l[P]}else I=er(l,P),l=l[P];I&&!g&&(Ue[c]=l)}}return l},"GetIntrinsic")});var Os=E((Oz,zs)=>{"use strict";var ud=Jr();zs.exports=o(function(){return ud()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Rs=E((wz,ws)=>{"use strict";var cd=As(),ks=cd("%Object.defineProperty%",!0),ld=Os()(),pd=tn(),dd=Jt(),rr=ld?Symbol.toStringTag:null;ws.exports=o(function(t,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 dd("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");rr&&(n||!pd(t,rr))&&(ks?ks(t,rr,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[rr]=r)},"setToStringTag")});var Ds=E((Nz,Ns)=>{"use strict";var md=Function.prototype.call,fd=Object.prototype.hasOwnProperty,gd=Ge();Ns.exports=gd.call(md,fd)});var Us=E((Dz,Cs)=>{"use strict";Cs.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var js=E((Cz,Ls)=>{"use strict";var un=Bi(),yd=require("util"),on=require("path"),hd=require("http"),vd=require("https"),xd=require("url").parse,Pd=require("fs"),_d=require("stream").Stream,bd=require("crypto"),an=Wi(),Id=la(),Td=Rs(),Oe=Ds(),sn=Us();function Ms(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(Ms,"escapeHeaderParam");function j(e){if(!(this instanceof j))return new j(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],un.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(j,"FormData");yd.inherits(j,un);j.LINE_BREAK=`\r
|
|
2
|
-
`;j.DEFAULT_CONTENT_TYPE="application/octet-stream";j.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=un.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 i=this._multiPartHeader(e,t,r),u=this._multiPartFooter();n(i),n(t),n(u),this._trackLength(i,t,r)};j.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+j.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Oe(t,"httpVersion"))&&!(t instanceof _d))&&(r.knownLength||this._valuesToMeasure.push(t))};j.prototype._lengthRetriever=function(e,t){Oe(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):Pd.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):Oe(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Oe(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};j.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),i=this._getContentType(t,r),u="",c={"Content-Disposition":["form-data",'name="'+Ms(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&sn(c,r.header);var l;for(var g in c)if(Oe(c,g)){if(l=c[g],l==null)continue;Array.isArray(l)||(l=[l]),l.length&&(u+=g+": "+l.join("; ")+j.LINE_BREAK)}return"--"+this.getBoundary()+j.LINE_BREAK+u+j.LINE_BREAK};j.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=on.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=on.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Oe(e,"httpVersion")&&(r=on.basename(e.client._httpMessage.path||"")),r)return'filename="'+Ms(r)+'"'};j.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=an.lookup(e.name)),!r&&e&&e.path&&(r=an.lookup(e.path)),!r&&e&&e.readable&&Oe(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=an.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=j.DEFAULT_CONTENT_TYPE),r};j.prototype._multiPartFooter=function(){return function(e){var t=j.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};j.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+j.LINE_BREAK};j.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Oe(e,t)&&(r[t.toLowerCase()]=e[t]);return r};j.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};j.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};j.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(j.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};j.prototype._generateBoundary=function(){this._boundary="--------------------------"+bd.randomBytes(12).toString("hex")};j.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};j.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};j.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}Id.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};j.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=xd(e),n=sn({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=sn(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=vd.request(n):r=hd.request(n),this.getLength(function(u,c){if(u&&u!=="Unknown stream"){this._error(u);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),t){var l,g=o(function(h,x){return r.removeListener("error",g),r.removeListener("response",l),t.call(this,h,x)},"callback");l=g.bind(this,null),r.on("error",g),r.on("response",l)}}.bind(this)),r};j.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};j.prototype.toString=function(){return"[object FormData]"};Td(j.prototype,"FormData");Ls.exports=j});var Nd={};dn(Nd,{alai:()=>Rd});module.exports=nu(Nd);var ou=Object.freeze({status:"aborted"});function b(e,t,r){function n(l,g){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:g,constr:c,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,g);let h=c.prototype,x=Object.keys(h);for(let I=0;I<x.length;I++){let P=x[I];P in l||(l[P]=h[P].bind(l))}}o(n,"init");let i=r?.Parent??Object;class u extends i{static{o(this,"Definition")}}Object.defineProperty(u,"name",{value:e});function c(l){var g;let h=r?.Parent?new u:this;n(h,l),(g=h._zod).deferred??(g.deferred=[]);for(let x of h._zod.deferred)x();return h}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}o(b,"$constructor");var de=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},bt=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},or={};function ye(e){return e&&Object.assign(or,e),or}o(ye,"config");function ar(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}o(ar,"getEnumValues");function gn(e,t){return typeof t=="bigint"?t.toString():t}o(gn,"jsonStringifyReplacer");function Tt(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(Tt,"cached");function yn(e){return e==null}o(yn,"nullish");function Et(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(Et,"cleanRegex");var fn=Symbol("evaluating");function q(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==fn)return n===void 0&&(n=fn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(q,"defineLazy");var sr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ye(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(Ye,"isObject");var iu=Tt(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function hn(e){if(Ye(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Ye(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(hn,"isPlainObject");var vn=new Set(["string","number","symbol"]);function Le(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(Le,"escapeRegex");function $t(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o($t,"clone");function Z(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>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:o(()=>t.error,"error")}:t}o(Z,"normalizeParams");function xn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(xn,"optionalKeys");var Pn={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 je(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}o(je,"aborted");function be(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(be,"prefixIssues");function It(e){return typeof e=="string"?e:e?.message}o(It,"unwrapMessage");function Ie(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=It(e.inst?._zod.def?.error?.(e))??It(t?.error?.(e))??It(r.customError?.(e))??It(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(Ie,"finalizeIssue");function _n(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(_n,"getLengthableOrigin");function ur(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(ur,"issue");var bn=o((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,gn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),In=b("$ZodError",bn),Qe=b("$ZodError",bn,{Parent:Error});var su=o(e=>(t,r,n,i)=>{let u=n?Object.assign(n,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise)throw new de;if(c.issues.length){let l=new(i?.Err??e)(c.issues.map(g=>Ie(g,u,ye())));throw sr(l,i?.callee),l}return c.value},"_parse"),St=su(Qe),uu=o(e=>async(t,r,n,i)=>{let u=n?Object.assign(n,{async:!0}):{async:!0},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){let l=new(i?.Err??e)(c.issues.map(g=>Ie(g,u,ye())));throw sr(l,i?.callee),l}return c.value},"_parseAsync"),At=uu(Qe),cu=o(e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},u=t._zod.run({value:r,issues:[]},i);if(u instanceof Promise)throw new de;return u.issues.length?{success:!1,error:new(e??In)(u.issues.map(c=>Ie(c,i,ye())))}:{success:!0,data:u.value}},"_safeParse"),et=cu(Qe),lu=o(e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},u=t._zod.run({value:r,issues:[]},i);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>Ie(c,i,ye())))}:{success:!0,data:u.value}},"_safeParseAsync"),tt=lu(Qe);var pu="(?:(?:\\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])))",du=new RegExp(`^${pu}$`);var Tn=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),En=/^-?\d+n?$/,$n=/^-?\d+$/,cr=/^-?\d+(?:\.\d+)?$/,Sn=/^(?:true|false)$/i;var Te=b("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),mu={number:"number",bigint:"bigint",object:"date"};var An=b("$ZodCheckGreaterThan",(e,t)=>{Te.init(e,t);let r=mu[typeof t.value];e._zod.onattach.push(n=>{let i=n._zod.bag,u=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>u&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}});var zn=b("$ZodCheckNumberFormat",(e,t)=>{Te.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,u]=Pn[t.format];e._zod.onattach.push(c=>{let l=c._zod.bag;l.format=t.format,l.minimum=i,l.maximum=u,r&&(l.pattern=$n)}),e._zod.check=c=>{let l=c.value;if(r){if(!Number.isInteger(l)){c.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?c.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):c.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}l<i&&c.issues.push({origin:"number",input:l,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),l>u&&c.issues.push({origin:"number",input:l,code:"too_big",maximum:u,inclusive:!0,inst:e,continue:!t.abort})}});var On=b("$ZodCheckMinLength",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!yn(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;if(i.length>=t.minimum)return;let c=_n(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var lr=b("$ZodCheckStringFormat",(e,t)=>{var r,n;Te.init(e,t),e._zod.onattach.push(i=>{let u=i._zod.bag;u.format=t.format,t.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),kn=b("$ZodCheckRegex",(e,t)=>{lr.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}});var Rn={major:4,minor:3,patch:6};var H=b("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Rn;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let u of i._zod.onattach)u(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=o((c,l,g)=>{let h=je(c),x;for(let I of l){if(I._zod.def.when){if(!I._zod.def.when(c))continue}else if(h)continue;let P=c.issues.length,s=I._zod.check(c);if(s instanceof Promise&&g?.async===!1)throw new de;if(x||s instanceof Promise)x=(x??Promise.resolve()).then(async()=>{await s,c.issues.length!==P&&(h||(h=je(c,P)))});else{if(c.issues.length===P)continue;h||(h=je(c,P))}}return x?x.then(()=>c):c},"runChecks"),u=o((c,l,g)=>{if(je(c))return c.aborted=!0,c;let h=i(l,n,g);if(h instanceof Promise){if(g.async===!1)throw new de;return h.then(x=>e._zod.parse(x,g))}return e._zod.parse(h,g)},"handleCanaryResult");e._zod.run=(c,l)=>{if(l.skipChecks)return e._zod.parse(c,l);if(l.direction==="backward"){let h=e._zod.parse({value:c.value,issues:[]},{...l,skipChecks:!0});return h instanceof Promise?h.then(x=>u(x,c,l)):u(h,c,l)}let g=e._zod.parse(c,l);if(g instanceof Promise){if(l.async===!1)throw new de;return g.then(h=>i(h,n,l))}return i(g,n,l)}}q(e,"~standard",()=>({validate:o(i=>{try{let u=et(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return tt(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),kt=b("$ZodString",(e,t)=>{H.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Tn(e._zod.bag),e._zod.parse=(r,n)=>{if(t.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:e}),r}}),pr=b("$ZodStringFormat",(e,t)=>{lr.init(e,t),kt.init(e,t)});var Mn=b("$ZodURL",(e,t)=>{pr.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var dr=b("$ZodNumber",(e,t)=>{H.init(e,t),e._zod.pattern=e._zod.bag.pattern??cr,e._zod.parse=(r,n)=>{if(t.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 u=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:e,...u?{received:u}:{}}),r}}),Ln=b("$ZodNumberFormat",(e,t)=>{zn.init(e,t),dr.init(e,t)}),mr=b("$ZodBoolean",(e,t)=>{H.init(e,t),e._zod.pattern=Sn,e._zod.parse=(r,n)=>{if(t.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:e}),r}}),jn=b("$ZodBigInt",(e,t)=>{H.init(e,t),e._zod.pattern=En,e._zod.parse=(r,n)=>{if(t.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:e}),r}});var Fn=b("$ZodAny",(e,t)=>{H.init(e,t),e._zod.parse=r=>r}),Bn=b("$ZodUnknown",(e,t)=>{H.init(e,t),e._zod.parse=r=>r});var Zn=b("$ZodVoid",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),Vn=b("$ZodDate",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,u=i instanceof Date;return u&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...u?{received:"Invalid Date"}:{},inst:e}),r}});function Nn(e,t,r){e.issues.length&&t.issues.push(...be(r,e.issues)),t.value[r]=e.value}o(Nn,"handleArrayResult");var Hn=b("$ZodArray",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let u=[];for(let c=0;c<i.length;c++){let l=i[c],g=t.element._zod.run({value:l,issues:[]},n);g instanceof Promise?u.push(g.then(h=>Nn(h,r,c))):Nn(g,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function Ot(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...be(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(Ot,"handlePropertyResult");function fu(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=xn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(fu,"normalizeDef");function gu(e,t,r,n,i,u){let c=[],l=i.keySet,g=i.catchall._zod,h=g.def.type,x=g.optout==="optional";for(let I in t){if(l.has(I))continue;if(h==="never"){c.push(I);continue}let P=g.run({value:t[I],issues:[]},n);P instanceof Promise?e.push(P.then(s=>Ot(s,r,I,t,x))):Ot(P,r,I,t,x)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:u}),e.length?Promise.all(e).then(()=>r):r}o(gu,"handleCatchall");var Gn=b("$ZodObject",(e,t)=>{if(H.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let l=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let g={...l};return Object.defineProperty(t,"shape",{value:g}),g},"get")})}let n=Tt(()=>fu(t));q(e._zod,"propValues",()=>{let l=t.shape,g={};for(let h in l){let x=l[h]._zod;if(x.values){g[h]??(g[h]=new Set);for(let I of x.values)g[h].add(I)}}return g});let i=Ye,u=t.catchall,c;e._zod.parse=(l,g)=>{c??(c=n.value);let h=l.value;if(!i(h))return l.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),l;l.value={};let x=[],I=c.shape;for(let P of c.keys){let s=I[P],d=s._zod.optout==="optional",f=s._zod.run({value:h[P],issues:[]},g);f instanceof Promise?x.push(f.then(m=>Ot(m,l,P,h,d))):Ot(f,l,P,h,d)}return u?gu(x,h,l,g,n.value,e):x.length?Promise.all(x).then(()=>l):l}});function Dn(e,t,r,n){for(let u of e)if(u.issues.length===0)return t.value=u.value,t;let i=e.filter(u=>!je(u));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(u=>u.issues.map(c=>Ie(c,n,ye())))}),t)}o(Dn,"handleUnionResults");var fr=b("$ZodUnion",(e,t)=>{H.init(e,t),q(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),q(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),q(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),q(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${i.map(u=>Et(u.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,u)=>{if(r)return n(i,u);let c=!1,l=[];for(let g of t.options){let h=g._zod.run({value:i.value,issues:[]},u);if(h instanceof Promise)l.push(h),c=!0;else{if(h.issues.length===0)return h;l.push(h)}}return c?Promise.all(l).then(g=>Dn(g,i,e,u)):Dn(l,i,e,u)}});var Wn=b("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,fr.init(e,t);let r=e._zod.parse;q(e._zod,"propValues",()=>{let i={};for(let u of t.options){let c=u._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(let[l,g]of Object.entries(c)){i[l]||(i[l]=new Set);for(let h of g)i[l].add(h)}}return i});let n=Tt(()=>{let i=t.options,u=new Map;for(let c of i){let l=c._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let g of l){if(u.has(g))throw new Error(`Duplicate discriminator value "${String(g)}"`);u.set(g,c)}}return u});e._zod.parse=(i,u)=>{let c=i.value;if(!Ye(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;let l=n.value.get(c?.[t.discriminator]);return l?l._zod.run(i,u):t.unionFallback?r(i,u):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}});var qn=b("$ZodRecord",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!hn(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let u=[],c=t.keyType._zod.values;if(c){r.value={};let l=new Set;for(let h of c)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){l.add(typeof h=="number"?h.toString():h);let x=t.valueType._zod.run({value:i[h],issues:[]},n);x instanceof Promise?u.push(x.then(I=>{I.issues.length&&r.issues.push(...be(h,I.issues)),r.value[h]=I.value})):(x.issues.length&&r.issues.push(...be(h,x.issues)),r.value[h]=x.value)}let g;for(let h in i)l.has(h)||(g=g??[],g.push(h));g&&g.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:g})}else{r.value={};for(let l of Reflect.ownKeys(i)){if(l==="__proto__")continue;let g=t.keyType._zod.run({value:l,issues:[]},n);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&cr.test(l)&&g.issues.length){let I=t.keyType._zod.run({value:Number(l),issues:[]},n);if(I instanceof Promise)throw new Error("Async schemas not supported in object keys currently");I.issues.length===0&&(g=I)}if(g.issues.length){t.mode==="loose"?r.value[l]=i[l]:r.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map(I=>Ie(I,n,ye())),input:l,path:[l],inst:e});continue}let x=t.valueType._zod.run({value:i[l],issues:[]},n);x instanceof Promise?u.push(x.then(I=>{I.issues.length&&r.issues.push(...be(l,I.issues)),r.value[g.value]=I.value})):(x.issues.length&&r.issues.push(...be(l,x.issues)),r.value[g.value]=x.value)}}return u.length?Promise.all(u).then(()=>r):r}});var Kn=b("$ZodEnum",(e,t)=>{H.init(e,t);let r=ar(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>vn.has(typeof i)).map(i=>typeof i=="string"?Le(i):i.toString()).join("|")})$`),e._zod.parse=(i,u)=>{let c=i.value;return n.has(c)||i.issues.push({code:"invalid_value",values:r,input:c,inst:e}),i}}),Jn=b("$ZodLiteral",(e,t)=>{if(H.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Le(n):n?Le(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let u=n.value;return r.has(u)||n.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),n}});var Xn=b("$ZodTransform",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new bt(e.constructor.name);let i=t.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 de;return r.value=i,r}});function Cn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(Cn,"handleOptionalResult");var Yn=b("$ZodOptional",(e,t)=>{H.init(e,t),e._zod.optin="optional",e._zod.optout="optional",q(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),q(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Et(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(u=>Cn(u,r.value)):Cn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var Qn=b("$ZodNullable",(e,t)=>{H.init(e,t),q(e._zod,"optin",()=>t.innerType._zod.optin),q(e._zod,"optout",()=>t.innerType._zod.optout),q(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Et(r.source)}|null)$`):void 0}),q(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)});var eo=b("$ZodPipe",(e,t)=>{H.init(e,t),q(e._zod,"values",()=>t.in._zod.values),q(e._zod,"optin",()=>t.in._zod.optin),q(e._zod,"optout",()=>t.out._zod.optout),q(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let u=t.out._zod.run(r,n);return u instanceof Promise?u.then(c=>zt(c,t.in,n)):zt(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>zt(u,t.out,n)):zt(i,t.out,n)}});function zt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(zt,"handlePipeResult");var to=b("$ZodCustom",(e,t)=>{Te.init(e,t),H.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(u=>Un(u,r,n,e));Un(i,r,n,e)}});function Un(e,t,r,n){if(!e){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),t.issues.push(ur(i))}}o(Un,"handleRefineResult");var no;var gr=class{static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function oo(){return new gr}o(oo,"registry");(no=globalThis).__zod_globalRegistry??(no.__zod_globalRegistry=oo());var yr=globalThis.__zod_globalRegistry;function io(e,t){return new e({type:"string",...Z(t)})}o(io,"_string");function ao(e,t){return new e({type:"string",coerce:!0,...Z(t)})}o(ao,"_coercedString");function so(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Z(t)})}o(so,"_url");function uo(e,t){return new e({type:"number",checks:[],...Z(t)})}o(uo,"_number");function co(e,t){return new e({type:"number",coerce:!0,checks:[],...Z(t)})}o(co,"_coercedNumber");function lo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Z(t)})}o(lo,"_int");function po(e,t){return new e({type:"boolean",...Z(t)})}o(po,"_boolean");function mo(e,t){return new e({type:"boolean",coerce:!0,...Z(t)})}o(mo,"_coercedBoolean");function fo(e,t){return new e({type:"bigint",coerce:!0,...Z(t)})}o(fo,"_coercedBigint");function go(e){return new e({type:"any"})}o(go,"_any");function yo(e){return new e({type:"unknown"})}o(yo,"_unknown");function ho(e,t){return new e({type:"void",...Z(t)})}o(ho,"_void");function vo(e,t){return new e({type:"date",coerce:!0,...Z(t)})}o(vo,"_coercedDate");function wt(e,t){return new An({check:"greater_than",...Z(t),value:e,inclusive:!0})}o(wt,"_gte");function ce(e,t){return new On({check:"min_length",...Z(t),minimum:e})}o(ce,"_minLength");function Ee(e,t){return new kn({check:"string_format",format:"regex",...Z(t),pattern:e})}o(Ee,"_regex");function xo(e,t,r){let n=Z(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(xo,"_custom");var K=b("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");H.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>St(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>et(e,r,n),e.parseAsync=async(r,n)=>At(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>tt(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>$t(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.apply=r=>r(e)}),Nt=b("ZodMiniString",(e,t)=>{kt.init(e,t),K.init(e,t)});function a(e){return io(Nt,e)}o(a,"string");var Po=b("ZodMiniStringFormat",(e,t)=>{pr.init(e,t),Nt.init(e,t)});var Au=b("ZodMiniURL",(e,t)=>{Mn.init(e,t),Po.init(e,t)});function _o(e){return so(Au,e)}o(_o,"url");var Dt=b("ZodMiniNumber",(e,t)=>{dr.init(e,t),K.init(e,t)});function Q(e){return uo(Dt,e)}o(Q,"number");var zu=b("ZodMiniNumberFormat",(e,t)=>{Ln.init(e,t),Dt.init(e,t)});function bo(e){return lo(zu,e)}o(bo,"int");var hr=b("ZodMiniBoolean",(e,t)=>{mr.init(e,t),K.init(e,t)});function B(e){return po(hr,e)}o(B,"boolean");var Io=b("ZodMiniBigInt",(e,t)=>{jn.init(e,t),K.init(e,t)});var Ou=b("ZodMiniAny",(e,t)=>{Fn.init(e,t),K.init(e,t)});function nt(){return go(Ou)}o(nt,"any");var ku=b("ZodMiniUnknown",(e,t)=>{Bn.init(e,t),K.init(e,t)});function k(){return yo(ku)}o(k,"unknown");var wu=b("ZodMiniVoid",(e,t)=>{Zn.init(e,t),K.init(e,t)});function To(e){return ho(wu,e)}o(To,"_void");var Eo=b("ZodMiniDate",(e,t)=>{Vn.init(e,t),K.init(e,t)});var Ru=b("ZodMiniArray",(e,t)=>{Hn.init(e,t),K.init(e,t)});function N(e,t){return new Ru({type:"array",element:e,...Z(t)})}o(N,"array");var Nu=b("ZodMiniObject",(e,t)=>{Gn.init(e,t),K.init(e,t),q(e,"shape",()=>t.shape)});function p(e,t){let r={type:"object",shape:e??{},...Z(t)};return new Nu(r)}o(p,"object");var Du=b("ZodMiniUnion",(e,t)=>{fr.init(e,t),K.init(e,t)});function D(e,t){return new Du({type:"union",options:e,...Z(t)})}o(D,"union");var Cu=b("ZodMiniDiscriminatedUnion",(e,t)=>{Wn.init(e,t),K.init(e,t)});function $e(e,t,r){return new Cu({type:"union",options:t,discriminator:e,...Z(r)})}o($e,"discriminatedUnion");var Uu=b("ZodMiniRecord",(e,t)=>{qn.init(e,t),K.init(e,t)});function w(e,t,r){return new Uu({type:"record",keyType:e,valueType:t,...Z(r)})}o(w,"record");var Mu=b("ZodMiniEnum",(e,t)=>{Kn.init(e,t),K.init(e,t),e.options=Object.values(t.entries)});function U(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Mu({type:"enum",entries:r,...Z(t)})}o(U,"_enum");var Lu=b("ZodMiniLiteral",(e,t)=>{Jn.init(e,t),K.init(e,t)});function $(e,t){return new Lu({type:"literal",values:Array.isArray(e)?e:[e],...Z(t)})}o($,"literal");var ju=b("ZodMiniTransform",(e,t)=>{Xn.init(e,t),K.init(e,t)});function Se(e){return new ju({type:"transform",transform:e})}o(Se,"transform");var Fu=b("ZodMiniOptional",(e,t)=>{Yn.init(e,t),K.init(e,t)});function y(e){return new Fu({type:"optional",innerType:e})}o(y,"optional");var Bu=b("ZodMiniNullable",(e,t)=>{Qn.init(e,t),K.init(e,t)});function ot(e){return new Bu({type:"nullable",innerType:e})}o(ot,"nullable");var Zu=b("ZodMiniPipe",(e,t)=>{eo.init(e,t),K.init(e,t)});function Ae(e,t){return new Zu({type:"pipe",in:e,out:t})}o(Ae,"pipe");var Vu=b("ZodMiniCustom",(e,t)=>{to.init(e,t),K.init(e,t)});function Ct(e,t){return xo(Vu,e??(()=>!0),t)}o(Ct,"custom");var it={};dn(it,{bigint:()=>Ju,boolean:()=>Ku,date:()=>Xu,number:()=>qu,string:()=>Wu});function Wu(e){return ao(Nt,e)}o(Wu,"string");function qu(e){return co(Dt,e)}o(qu,"number");function Ku(e){return mo(hr,e)}o(Ku,"boolean");function Ju(e){return fo(Io,e)}o(Ju,"bigint");function Xu(e){return vo(Eo,e)}o(Xu,"date");var xr=p({retryOnFailure:p({defaultValue:y(B()),hide:y(B())}),continueOnFailure:p({defaultValue:y(B()),hide:y(B())})}),vr=class{constructor(t,r,n,i,u,c,l,g,h,x,I){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=l;this.errorHandlingOptions=g;this.outputSchema=h;this.audience=x;this.aiMetadata=I}static{o(this,"IAction")}},se=o(e=>new vr(e.name,e.displayName,e.description,e.props,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata),"createAction");var F=p({displayName:a(),description:y(a())}),C=o((e,t)=>p({type:$(t),required:B(),defaultValue:y(nt())}),"TPropertyValue");var ne=p({...F.shape,...C(a(),"SHORT_TEXT").shape}),he=p({...F.shape,...C(a(),"LONG_TEXT").shape});var So=p({label:a(),value:k()}),Ut=p({disabled:y(B()),placeholder:y(a()),options:N(So)});var oe=p({...F.shape,options:Ut,...C(k(),"STATIC_DROPDOWN").shape}),ve=p({...F.shape,options:Ut,...C(N(k()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Pr=p({...F.shape,...C(k(),"DROPDOWN").shape,refreshers:N(a())}),at=p({...F.shape,...C(N(k()),"MULTI_SELECT_DROPDOWN").shape,refreshers:N(a())});var xe=p({...F.shape,...C(B(),"CHECKBOX").shape});var Pe=p({...F.shape,...C(Q(),"NUMBER").shape});var st=p({...F.shape,streaming:y(B()),...C(k(),"FILE").shape});var ut=p({...F.shape,...C(a(),"DATE_TIME").shape});var Ao=w(a(),D([ne,he,oe,at,ve,xe,Pe,st,ut])),ct=p({...F.shape,properties:Ao,...C(N(k()),"ARRAY").shape});var lt=p({...F.shape,...C(D([w(a(),k())]),"JSON").shape});var zo=D([ne,oe,lt,ct,ve]),Qu=w(a(),zo),_r=p({refreshers:N(a()),...F.shape,...C(k(),"DYNAMIC").shape});var Mt=p({...F.shape,...C(To(),"MARKDOWN").shape});var pt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(pt||{}),Fe=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Fe||{}),Be=(v=>(v.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",v.COMMUNICATION="COMMUNICATION",v.COMMERCE="COMMERCE",v.CORE="CORE",v.UNIVERSAL_AI="UNIVERSAL_AI",v.FLOW_CONTROL="FLOW_CONTROL",v.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",v.ACCOUNTING="ACCOUNTING",v.PRODUCTIVITY="PRODUCTIVITY",v.CONTENT_AND_FILES="CONTENT_AND_FILES",v.DEVELOPER_TOOLS="DEVELOPER_TOOLS",v.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",v.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",v.HUMAN_RESOURCES="HUMAN_RESOURCES",v.PAYMENT_PROCESSING="PAYMENT_PROCESSING",v.MARKETING="MARKETING",v.SALES_AND_CRM="SALES_AND_CRM",v))(Be||{});var dt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(dt||{}),br="both_client_credentials_and_authorization_code";var we=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(we||{}),mt=(u=>(u.NONE="NONE",u.HEADER_PRESENT="HEADER_PRESENT",u.QUERY_PRESENT="QUERY_PRESENT",u.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",u.HEAD_REQUEST="HEAD_REQUEST",u))(mt||{}),ec=p({strategy:U(mt),paramName:y(a())}),ft=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(ft||{});var Lt=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Lt||{}),Oo=p({status:y(Q()),body:y(k()),headers:y(w(a(),a()))}),ko=p({type:$("DELAY"),resumeDateTime:a(),requestIdToReply:y(a()),handlerId:y(a()),streamStepProgress:y(U(Lt))}),wo=p({type:$("WEBHOOK"),requestId:a(),requestIdToReply:y(a()),response:Oo,handlerId:y(a()),streamStepProgress:y(U(Lt))}),tc=D([ko,wo]);var rc=p({body:k(),rawBody:y(k()),headers:w(a(),a()),queryParams:w(a(),a())});function le(e){return e==null}o(le,"isNil");function gt(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(gt,"isEmpty");function jt(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(jt,"assertNotNullOrUndefined");var Ir=Me(require("crypto"),1);var nc=128,Re,Ze,oc=o(e=>{!Re||Re.length<e?(Re=Buffer.allocUnsafe(e*nc),Ir.default.randomFillSync(Re),Ze=0):Ze+e>Re.length&&(Ir.default.randomFillSync(Re),Ze=0),Ze+=e},"fillPool"),ic=o(e=>(oc(e|=0),Re.subarray(Ze-e,Ze)),"random"),ac=o((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,i=Math.ceil(1.6*n*t/e.length);return(u=t)=>{let c="";for(;;){let l=r(i),g=i;for(;g--;)if(c+=e[l[g]&n]||"",c.length===u)return c}}},"customRandom"),No=o((e,t=21)=>ac(e,t,ic),"customAlphabet");var sc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Do=21,gb=a().check(Ee(new RegExp(`^[0-9a-zA-Z]{${Do}}$`))),uc=No(sc,Do);var ze=Ae(Se(e=>e instanceof Date?e.toISOString():e),a()),ue={id:a(),created:ze,updated:ze},V=o(e=>y(ot(e)),"Nullable");function Tr(e){return y(ot(U(e)))}o(Tr,"NullableEnum");var vb=Ae(Se(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),y(B())),Ft=o(e=>Ae(Se(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),y(N(e))),"OptionalArrayFromQuery");var _b=w(a(),k());var yt=(x=>(x.OPENAI="openai",x.OPENROUTER="openrouter",x.ANTHROPIC="anthropic",x.AZURE="azure",x.GOOGLE="google",x.ACTIVEPIECES="activepieces",x.CLOUDFLARE_GATEWAY="cloudflare-gateway",x.CUSTOM="custom",x.BEDROCK="bedrock",x.MISTRAL="mistral",x))(yt||{});var Rb=a().check(Ee(/^#[0-9A-Fa-f]{6}$/));var Db=p({filename:a(),data:k(),type:$("file"),mimetype:y(a())});var cc=Me(Uo());var Bb=p({...ue,name:a(),permissions:N(a()),platformId:V(a()),type:a(),userCount:y(Q())});var Mo=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Mo||{}),Er=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Er||{}),$r=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))($r||{});var Sr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Sr||{});var Ar=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Ar||{});var lc=p({mode:U(Mo),value:k()}),pc=p({auth:y(a()),fields:w(a(),lc)}),dc=p({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:y(pc)}),mc=p({type:$("PIECE"),toolName:a().check(ce(1)),pieceMetadata:dc}),fc=p({type:$("none")}),gc=p({type:$("access_token"),accessToken:a()}),yc=p({type:$("api_key"),apiKey:a(),apiKeyHeader:a()}),hc=p({type:$("headers"),headers:w(a(),a())}),vc=$e("type",[fc,gc,yc,hc]),Lo=p({type:$("FLOW"),toolName:a().check(ce(1)),externalFlowId:a(),flowDisplayName:y(a())}),jo=p({type:$("MCP"),toolName:a().check(ce(1)),serverUrl:_o(),protocol:U($r),auth:vc}),Fo=p({type:$("KNOWLEDGE_BASE"),toolName:a().check(ce(1)),sourceType:U(Er),sourceId:a(),sourceName:a()}),xc=$e("type",[mc,Lo,jo,Fo]),Pc=p({displayName:a(),description:y(a()),type:U(Sr)}),Bo=p({type:$("MARKDOWN"),markdown:a()}),Ve={type:$("TOOL_CALL"),input:V(w(a(),k())),output:y(k()),toolName:a(),status:U(Ar),toolCallId:a(),startTime:a(),endTime:y(a())},xI=p(Ve),Zo=$e("toolCallType",[p({...Ve,toolCallType:$("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),p({...Ve,toolCallType:$("FLOW"),displayName:a(),externalFlowId:a()}),p({...Ve,toolCallType:$("MCP"),displayName:a(),serverUrl:a()}),p({...Ve,toolCallType:$("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),p({...Ve,toolCallType:$("UNKNOWN"),displayName:a()})]),_c=D([Bo,Zo]);var zr=(r=>(r.IMAGE="image",r.TEXT="text",r))(zr||{}),_e=p({apiKey:a()}),bc=_e,Ic=p({apiKey:a(),apiKeyHash:a()}),Tc=_e,Ec=_e,$c=_e,Sc=_e,Ac=_e,zc=_e,Oc=_e,qo=p({accessKeyId:a().check(ce(1)),secretAccessKey:a().check(ce(1))}),kc=p({}),wc=p({}),Rc=p({}),Nc=p({}),Dc=p({}),Cc=p({}),Ko=p({modelId:a(),modelName:a(),modelType:U(zr)}),Jo=p({apiKeyHeader:a(),baseUrl:a(),models:N(Ko),defaultHeaders:y(w(a(),a()))}),Xo=p({accountId:a(),gatewayId:a(),models:N(Ko),vertexProject:y(a()),vertexRegion:y(a())}),Yo=p({resourceName:a(),apiVersion:Ae(Se(e=>typeof e=="string"&&e.trim().length===0?void 0:e),y(a()))}),Qo=p({region:a().check(ce(1))}),Uc=D([bc,$c,Sc,Ac,zc,Ec,Tc,Ic,qo,Oc]),ei=D([Jo,Xo,Yo,Qo,kc,Rc,Nc,Dc,wc,Cc]),Mc=p({id:a(),name:a(),type:U(zr)}),Lc=p({id:a(),name:a(),provider:U(yt),config:ei,enabledForChat:B()}),jc=p({provider:U(yt),config:ei,auth:Uc,platformId:a()});var II={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},Vo=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],Fc=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],Bc=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],Ho=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],Zc=["grok-4.20","grok-4.1-fast"],Vc={openai:Vo,anthropic:Fc,google:Ho,activepieces:[...Bc.map(e=>`anthropic/${e}`),...Vo.map(e=>`openai/${e}`),...Ho.map(e=>`google/${e}`),...Zc.map(e=>`x-ai/${e}`)]};var Go=128e3,Hc={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function Gc({provider:e}){return e?Hc[e]??Go:Go}o(Gc,"getMaxContextTokens");var Wo={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"},Wc={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},qc=new Set(["anthropic","mistral"]);function me(e){return{chatModels:Vc[e],maxContextTokens:Gc({provider:e}),defaultEmbeddingModel:Wo[e],supportsEmbedding:Wo[e]!==void 0,supportsImageGeneration:!qc.has(e),webSearch:Wc[e]}}o(me,"buildProviderCapabilities");var Kc={openai:me("openai"),anthropic:me("anthropic"),openrouter:me("openrouter"),azure:me("azure"),google:me("google"),"cloudflare-gateway":me("cloudflare-gateway"),custom:me("custom"),bedrock:me("bedrock"),mistral:me("mistral"),activepieces:me("activepieces")};var Jc=p({base64Url:a(),fileName:a(),extension:y(a())}),Xc=p({mimeType:a(),url:a(),fileName:y(a())}),Or=D([Jc,Xc]);var Yc=D([p({type:$("file"),value:Or}),p({type:$("markdown"),value:a(),files:y(N(Or))})]),Qc=p({sessionId:a(),message:a(),files:y(N(a()))});var ri=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(ri||{}),ni=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(ni||{}),kr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(kr||{});var el=D([p({...ue,name:a(),externalId:a(),type:$("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:p({options:N(p({value:a()}))})}),p({...ue,name:a(),externalId:a(),type:D([$("TEXT"),$("NUMBER"),$("DATE")]),tableId:a(),projectId:a()})]),tl=p({...ue,name:a(),folderId:V(a()),projectId:a(),externalId:a(),status:Tr(ni),trigger:Tr(ri)}),rl=p({...ue,tableId:a(),projectId:a(),cells:w(a(),p({updated:a(),created:a(),value:k(),fieldName:a()}))}),nl=p({events:N(U(kr)),webhookUrl:a(),flowId:a()}),ol=p({fields:N(p({id:a(),name:a()})),rows:N(w(a(),a())),name:a()}),il=p({projectId:a(),limit:y(it.number()),cursor:y(a()),name:y(a()),externalIds:Ft(a()),folderId:y(a()),folderIds:Ft(a())}),al=p({records:N(N(p({fieldId:a(),value:ii()}))),tableId:a()}),sl=p({cells:y(N(p({fieldId:a(),value:ii()}))),tableId:a(),agentUpdate:y(B())}),oi=$e("operator",[Ne("eq"),Ne("neq"),Ne("gt"),Ne("gte"),Ne("lt"),Ne("lte"),Ne("co"),ti("exists"),ti("not_exists")]),ul=p({tableId:a(),limit:y(it.number()),cursor:y(a()),filters:Ft(oi)});function ii(){return Ae(Se(e=>e==null?e:String(e)),ot(a()))}o(ii,"coerceToString");function Ne(e){return p({fieldId:a(),operator:$(e),value:a()})}o(Ne,"valueFilter");function ti(e){return p({fieldId:a(),operator:$(e)})}o(ti,"existenceFilter");var cl=p({status:y(Q()),body:y(k()),headers:y(w(a(),a()))}),ll=p({...ue,deleted:V(ze),ownerId:a(),displayName:a(),platformId:a(),externalId:V(a())});var ai=p({name:a(),description:y(a()),type:a(),required:B()}),pl=p({pieceName:a(),triggerName:a(),input:p({toolName:a(),toolDescription:a(),inputSchema:N(ai),returnsResponse:B()})});var si="^[0-9]+\\.[0-9]+\\.[0-9]+$",BI=new RegExp(si),ml="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",ZI=a().check(Ee(new RegExp(si))),VI=a().check(Ee(new RegExp(ml))),fl=p({packageType:$("ARCHIVE"),pieceType:U(Fe),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),ui=p({packageType:$("REGISTRY"),pieceType:$("OFFICIAL"),pieceName:a(),pieceVersion:a()}),ci=p({packageType:$("REGISTRY"),pieceType:$("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),HI=D([ui,ci]),GI=D([fl,ui,ci]);var gl=$e("type",[p({type:$("CRON_EXPRESSION"),cronExpression:a(),timezone:a()}),p({type:$("INTERVAL"),intervalMs:bo().check(wt(6e4))})]),WI=p({...ue,type:U(we),projectId:a(),flowId:a(),triggerName:a(),schedule:V(gl),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:V(a()),simulate:B()}),li=(m=>(m.UNKNOWN="UNKNOWN",m.FLOW_RUN_LOG="FLOW_RUN_LOG",m.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",m.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",m.FLOW_STEP_FILE="FLOW_STEP_FILE",m.SAMPLE_DATA="SAMPLE_DATA",m.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",m.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",m.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",m.PROJECT_RELEASE="PROJECT_RELEASE",m.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",m.PLATFORM_ASSET="PLATFORM_ASSET",m.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",m.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",m.KNOWLEDGE_BASE="KNOWLEDGE_BASE",m.FLOW_BUNDLE="FLOW_BUNDLE",m))(li||{}),pi=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(pi||{}),di=(r=>(r.S3="S3",r.DB="DB",r))(di||{}),qI=p({...ue,projectId:V(a()),platformId:V(a()),type:U(li),compression:U(pi),data:y(k()),location:U(di),size:V(Q()),fileName:V(a()),s3Key:V(a()),metadata:V(w(a(),a()))}),mi=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(mi||{}),fi=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(fi||{}),KI=p({id:a(),email:a(),firstName:a(),status:U(fi),externalId:V(a()),platformId:V(a()),platformRole:U(mi),lastName:a(),created:ze,updated:ze,lastActiveDate:V(ze),imageUrl:V(a())});var wr=p({...F.shape,...C(w(a(),k()),"OBJECT").shape});var vi=p({...F.shape,...C(a(),"COLOR").shape});var Rr=D([ne,he,Mt,xe,oe,ve,Pr,at,_r,Pe,ct,wr,lt,ut,st,vi]),S={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"}},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"}},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 fe=p({displayName:a(),description:y(a())});var xi=p({username:a(),password:a()}),Nr=p({...fe.shape,username:p({displayName:a(),description:y(a())}),password:p({displayName:a(),description:y(a())}),...C(xi,"BASIC_AUTH").shape});var xl=w(a(),D([ne,he,Pe,xe,oe])),Dr=p({...fe.shape,props:xl,...C(k(),"CUSTOM_AUTH").shape});var De=p({...fe.shape,...C(p({auth:a()}),"SECRET_TEXT").shape});var Pl=w(a(),D([ne,he,De,Pe,xe,oe,ve,Mt])),Pi=p({...fe.shape,props:Pl,...C(k(),"OIDC").shape});var Cr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Cr||{}),_i=D([ne,De,oe]),bi=w(a(),_i),_l=p({props:y(w(a(),_i)),authUrl:a(),tokenUrl:a(),scope:N(a()),prompt:y(D([$("none"),$("consent"),$("login"),$("omit")])),pkce:y(B()),pkceMethod:y(D([$("plain"),$("S256")])),authorizationMethod:y(U(Cr)),grantType:y(D([U(dt),$(br)])),extra:y(w(a(),a()))}),Ii=p({access_token:a(),props:y(bi),data:w(a(),nt())}),Ur=p({...fe.shape,..._l.shape,...C(Ii,"OAUTH2").shape});var He=D([Nr,Dr,Pi,Ur,De]),ht="Connection",Zt={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||ht}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||ht,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||ht}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||ht}},None(){}};var SE={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 bl=p({...F.shape,...C(k(),"CUSTOM").shape,code:a()});var Il=D([Rr,He]),Mr=w(a(),Il),WE=w(a(),Rr);var Ti=D([p({strategy:$("CRON"),cronExpression:a()}),p({strategy:$("NONE")})]);var Ei="2",Vt="0.82.0";var Lr=class{constructor(t,r,n,i,u,c,l,g,h=Vt,x,I="",P){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=l;this.auth=g;this.minimumSupportedRelease=h;this.maximumSupportedRelease=x;this.description=I;this.deprecated=P;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:Ei}),"getContextInfo");(!Tl(h)||El(h,Vt))&&(this.minimumSupportedRelease=Vt),u.forEach(s=>this._actions[s.name]=s),c.forEach(s=>this._triggers[s.name]=s)}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: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}},$i=o(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,i)=>n===i.findIndex(u=>u.type===r.type)))throw new Error("Auth properties must be unique by type");return new Lr(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 Tl(e){return/^\d+\.\d+\.\d+$/.test(e)}o(Tl,"isValidSimpleSemver");function El(e,t){let[r,n,i]=e.split(".").map(Number),[u,c,l]=t.split(".").map(Number);return r!==u?r<u:n!==c?n<c:i<l}o(El,"isSemverLessThan");var $l=y(w(a(),w(a(),a()))),Si=p({id:y(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:N(a()),platformId:y(a()),directoryPath:y(a()),auth:y(D([He,N(He)])),version:a(),categories:y(N(U(Be))),minimumSupportedRelease:y(a()),maximumSupportedRelease:y(a()),deprecated:y(B()),i18n:$l}),Sl=U(["human","ai","both"]),Ai=p({description:y(a()),idempotent:y(B())}),zi=p({name:a(),displayName:a(),description:a(),props:Mr,requireAuth:B(),errorHandlingOptions:y(xr),outputSchema:y(Ct()),audience:y(Sl),aiMetadata:y(Ai)}),Oi=p({name:a(),displayName:a(),description:a(),props:Mr,errorHandlingOptions:y(xr),type:U(we),sampleData:k(),handshakeConfiguration:y(Ct()),renewConfiguration:y(Ti),testStrategy:U(ft),outputSchema:y(Ct()),aiMetadata:y(Ai)}),Al=p({...Si.shape,actions:w(a(),zi),triggers:w(a(),Oi)}),zl=p({...Si.shape,actions:Q(),triggers:Q(),suggestedActions:y(N(zi)),suggestedTriggers:y(N(Oi))}),ki=p({projectUsage:Q(),pieceType:U(Fe),packageType:U(pt),platformId:y(a()),archiveId:y(a())}),W$=p({...Al.shape,...ki.shape}),q$=p({...zl.shape,...ki.shape}),K$=p({name:a(),version:a()});var Ol=Me(require("path")),kl=Me(require("fs/promises"));var Di=require("node:stream");var Ht=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{o(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,i=new URLSearchParams;return r.searchParams.forEach((u,c)=>{i.append(c,u)}),{urlWithoutQueryParams:n,queryParams:i}}getHeaders(t){let r={Accept:"application/json"};return t.authentication&&this.populateAuthentication(t.authentication,r),t.body&&(t.headers?.["Content-Type"]==="text/csv"?r["Content-Type"]="text/csv":r["Content-Type"]="application/json"),t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var Gt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new jr,r=new Fr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},jr=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Fr=class{static{o(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,i=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${i}`,r}};var Ce=class extends Error{constructor(r,n){let i=n.status||500,u=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:i,body:u},request:{body:r}}));this.requestBody=r;this.status=i,this.responseBody=u}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 wi({error:e,requestBody:t}){return e instanceof Ce?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}o(wi,"toFailsafeOutput");var ge=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(ge||{});var Wt=class extends Ht{static{o(this,"FetchHttpClient")}constructor(t="",r=new Gt){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(t),u=this.getHeaders(t),c=t.queryParams??{};for(let[M,Y]of Object.entries(c))i.append(M,Y);let l=i.toString(),g=l?`${n}?${l}`:n,h=t.responseType??"json",x=t.followRedirects??!0,I=t.retries??0,{body:P,extraHeaders:s,isStream:d}=wl(t.method)?Rl(t.body,u):{body:void 0,extraHeaders:{},isStream:!1},f=Dl({...u,...s}),m=await Nl(async()=>{let M=new AbortController,Y=t.timeout&&t.timeout>0?setTimeout(()=>M.abort(),t.timeout):void 0;try{let re={method:t.method.toString(),headers:f,body:P,redirect:x?"follow":"manual",signal:M.signal};return d&&(re.duplex="half"),r?.dispatcher!==void 0&&(re.dispatcher=r.dispatcher),await fetch(g,re)}finally{Y!==void 0&&clearTimeout(Y)}},I),v=x?300:400;if(m.status<200||m.status>=v){let M=await Ri(m,h),Y=new Ce(t.body,{status:m.status,responseBody:M});throw console.error("[HttpClient#(sanitized error message)] Request failed:",Y),Y}let _=await Ri(m,h);return{status:m.status,headers:Cl(m.headers),body:_}}};function wl(e){return e!=="GET"&&e!=="HEAD"}o(wl,"acceptsRequestBody");function Rl(e,t){if(Ml(e))return{body:void 0,extraHeaders:{},isStream:!1};if(Ul(e)){let n=new Di.PassThrough;return e.on("error",i=>n.destroy(i)),e.pipe(n),{body:n,extraHeaders:e.getHeaders(),isStream:!0}}return 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}}o(Rl,"serializeBody");async function Ri(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}o(Ri,"parseResponseBody");async function Nl(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await Ni(n);continue}return i}catch(i){if(r=i,n<t){await Ni(n);continue}throw i}throw r}o(Nl,"sendWithRetries");function Ni(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(Ni,"backoff");function Dl(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r.toLowerCase()]=Array.isArray(n)?n.join(", "):n);return t}o(Dl,"normalizeHeaders");function Cl(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(Cl,"toHttpHeaders");function Ul(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}o(Ul,"isNodeFormData");function Ml(e){return e==null}o(Ml,"isNil");var J=new Wt;var Ed=Me(require("fs")),Fs=Me(js());var $d={"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 Sd(e){let t=e.split(";")[0].trim().toLowerCase();return $d[t]??""}o(Sd,"contentTypeToExtension");var Ad=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),zd=o((e,t)=>{let r="https://api.example.com";try{let n=t?e(t):void 0;return(n?.endsWith("/")?n.slice(0,-1):n)??r}catch{return r}},"getBaseUrlForDescription");function Bs({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:l,authLocation:g="headers"}){return se({audience:"human",name:u||"custom_api_call",displayName:i||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:S.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:h})=>({url:S.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
|
|
3
|
-
i.e ${
|
|
1
|
+
"use strict";var su=Object.create;var Qe=Object.defineProperty;var uu=Object.getOwnPropertyDescriptor;var cu=Object.getOwnPropertyNames;var pu=Object.getPrototypeOf,lu=Object.prototype.hasOwnProperty;var o=(e,t)=>Qe(e,"name",{value:t,configurable:!0});var E=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},yn=(e,t)=>{for(var r in t)Qe(e,r,{get:t[r],enumerable:!0})},hn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of cu(t))!lu.call(e,i)&&i!==r&&Qe(e,i,{get:()=>t[i],enumerable:!(n=uu(t,i))||n.enumerable});return e};var Me=(e,t,r)=>(r=e!=null?su(pu(e)):{},hn(t||!e||!e.__esModule?Qe(r,"default",{value:e,enumerable:!0}):r,e)),du=e=>hn(Qe({},"__esModule",{value:!0}),e);var Vo=E((Bo,Zt)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={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")},n=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),u="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",l={zoneIndex:new RegExp(u,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${u})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${u})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${t}\\.${t}\\.${t}\\.${t}(${u})?$`,"i")};function y(s,d){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let g=0,m=-1,h=(s.match(l.zoneIndex)||[])[0],_,M;for(h&&(h=h.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)g++;if(s.substr(0,2)==="::"&&g--,s.substr(-2,2)==="::"&&g--,g>d)return null;for(M=d-g,_=":";M--;)_+="0:";return s=s.replace("::",_),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),d=(function(){let ee=s.split(":"),ae=[];for(let le=0;le<ee.length;le++)ae.push(parseInt(ee[le],16));return ae})(),{parts:d,zoneId:h}}o(y,"expandIPv6");function x(s,d,g,m){if(s.length!==d.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let h=0,_;for(;m>0;){if(_=g-m,_<0&&(_=0),s[h]>>_!==d[h]>>_)return!1;m-=g,h+=1}return!0}o(x,"matchCIDR");function v(s){if(i.test(s))return parseInt(s,16);if(s[0]==="0"&&!isNaN(parseInt(s[1],10))){if(n.test(s))return parseInt(s,8);throw new Error(`ipaddr: cannot parse ${s} as octal`)}return parseInt(s,10)}o(v,"parseIntAuto");function T(s,d){for(;s.length<d;)s=`0${s}`;return s}o(T,"padPart");let P={};P.IPv4=(function(){function s(d){if(d.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let g,m;for(g=0;g<d.length;g++)if(m=d[g],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=d}return o(s,"IPv4"),s.prototype.SpecialRanges={unspecified:[[new s([0,0,0,0]),8]],broadcast:[[new s([255,255,255,255]),32]],multicast:[[new s([224,0,0,0]),4]],linkLocal:[[new s([169,254,0,0]),16]],loopback:[[new s([127,0,0,0]),8]],carrierGradeNat:[[new s([100,64,0,0]),10]],private:[[new s([10,0,0,0]),8],[new s([172,16,0,0]),12],[new s([192,168,0,0]),16]],reserved:[[new s([192,0,0,0]),24],[new s([192,0,2,0]),24],[new s([192,88,99,0]),24],[new s([198,18,0,0]),15],[new s([198,51,100,0]),24],[new s([203,0,113,0]),24],[new s([240,0,0,0]),4]],as112:[[new s([192,175,48,0]),24],[new s([192,31,196,0]),24]],amt:[[new s([192,52,193,0]),24]]},s.prototype.kind=function(){return"ipv4"},s.prototype.match=function(d,g){let m;if(g===void 0&&(m=d,d=m[0],g=m[1]),d.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return x(this.octets,d.octets,8,g)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,g=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},h,_,M;for(h=3;h>=0;h-=1)if(_=this.octets[h],_ in m){if(M=m[_],g&&M!==0)return null;M!==8&&(g=!0),d+=M}else return null;return 32-d},s.prototype.range=function(){return P.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){return this.octets.slice(0)},s.prototype.toIPv4MappedAddress=function(){return P.IPv6.parse(`::ffff:${this.toString()}`)},s.prototype.toNormalizedString=function(){return this.toString()},s.prototype.toString=function(){return this.octets.join(".")},s})(),P.IPv4.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),g=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),h=[],_=0;for(;_<4;)h.push(parseInt(g[_],10)|parseInt(m[_],10)^255),_++;return new this(h)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},P.IPv4.isIPv4=function(s){return this.parser(s)!==null},P.IPv4.isValid=function(s){try{return new this(this.parser(s)),!0}catch{return!1}},P.IPv4.isValidCIDR=function(s){try{return this.parseCIDR(s),!0}catch{return!1}},P.IPv4.isValidFourPartDecimal=function(s){return!!(P.IPv4.isValid(s)&&s.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},P.IPv4.isValidCIDRFourPartDecimal=function(s){let d=s.match(/^(.+)\/(\d+)$/);return!P.IPv4.isValidCIDR(s)||!d?!1:P.IPv4.isValidFourPartDecimal(d[1])},P.IPv4.networkAddressFromCIDR=function(s){let d,g,m,h,_;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),_=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),h=[],g=0;g<4;)h.push(parseInt(m[g],10)&parseInt(_[g],10)),g++;return new this(h)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},P.IPv4.parse=function(s){let d=this.parser(s);if(d===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(d)},P.IPv4.parseCIDR=function(s){let d;if(d=s.match(/^(.+)\/(\d+)$/)){let g=parseInt(d[2]);if(g>=0&&g<=32){let m=[this.parse(d[1]),g];return Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},P.IPv4.parser=function(s){let d,g,m;if(d=s.match(r.fourOctet))return(function(){let h=d.slice(1,6),_=[];for(let M=0;M<h.length;M++)g=h[M],_.push(v(g));return _})();if(d=s.match(r.longValue)){if(m=v(d[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return(function(){let h=[],_;for(_=0;_<=24;_+=8)h.push(m>>_&255);return h})().reverse()}else return(d=s.match(r.twoOctet))?(function(){let h=d.slice(1,4),_=[];if(m=v(h[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return _.push(v(h[0])),_.push(m>>16&255),_.push(m>>8&255),_.push(m&255),_})():(d=s.match(r.threeOctet))?(function(){let h=d.slice(1,5),_=[];if(m=v(h[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return _.push(v(h[0])),_.push(v(h[1])),_.push(m>>8&255),_.push(m&255),_})():null},P.IPv4.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>32)throw new Error("ipaddr: invalid IPv4 prefix length");let d=[0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)d[g]=255,g++;return m<4&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},P.IPv6=(function(){function s(d,g){let m,h;if(d.length===16)for(this.parts=[],m=0;m<=14;m+=2)this.parts.push(d[m]<<8|d[m+1]);else if(d.length===8)this.parts=d;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(m=0;m<this.parts.length;m++)if(h=this.parts[m],!(0<=h&&h<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");g&&(this.zoneId=g)}return o(s,"IPv6"),s.prototype.SpecialRanges={unspecified:[new s([0,0,0,0,0,0,0,0]),128],linkLocal:[new s([65152,0,0,0,0,0,0,0]),10],multicast:[new s([65280,0,0,0,0,0,0,0]),8],loopback:[new s([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new s([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new s([0,0,0,0,0,65535,0,0]),96],discard:[new s([256,0,0,0,0,0,0,0]),64],rfc6145:[new s([0,0,0,0,65535,0,0,0]),96],rfc6052:[new s([100,65435,0,0,0,0,0,0]),96],"6to4":[new s([8194,0,0,0,0,0,0,0]),16],teredo:[new s([8193,0,0,0,0,0,0,0]),32],benchmarking:[new s([8193,2,0,0,0,0,0,0]),48],amt:[new s([8193,3,0,0,0,0,0,0]),32],as112v6:[[new s([8193,4,274,0,0,0,0,0]),48],[new s([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new s([8193,16,0,0,0,0,0,0]),28],orchid2:[new s([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new s([8193,48,0,0,0,0,0,0]),28],reserved:[[new s([8193,0,0,0,0,0,0,0]),23],[new s([8193,3512,0,0,0,0,0,0]),32]]},s.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},s.prototype.kind=function(){return"ipv6"},s.prototype.match=function(d,g){let m;if(g===void 0&&(m=d,d=m[0],g=m[1]),d.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return x(this.parts,d.parts,16,g)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,g=!1,m={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},h,_;for(let M=7;M>=0;M-=1)if(h=this.parts[M],h in m){if(_=m[h],g&&_!==0)return null;_!==16&&(g=!0),d+=_}else return null;return 128-d},s.prototype.range=function(){return P.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let d,g=[],m=this.parts;for(let h=0;h<m.length;h++)d=m[h],g.push(d>>8),g.push(d&255);return g},s.prototype.toFixedLengthString=function(){let d=(function(){let m=[];for(let h=0;h<this.parts.length;h++)m.push(T(this.parts[h].toString(16),4));return m}).call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),d+g},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let d=this.parts.slice(-2),g=d[0],m=d[1];return new P.IPv4([g>>8,g&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let d=(function(){let m=[];for(let h=0;h<this.parts.length;h++)m.push(this.parts[h].toString(16));return m}).call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),d+g},s.prototype.toRFC5952String=function(){let d=/((^|:)(0(:|$)){2,})/g,g=this.toNormalizedString(),m=0,h=-1,_;for(;_=d.exec(g);)_[0].length>h&&(m=_.index,h=_[0].length);return h<0?g:`${g.substring(0,m)}::${g.substring(m+h)}`},s.prototype.toString=function(){return this.toRFC5952String()},s})(),P.IPv6.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),g=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),h=[],_=0;for(;_<16;)h.push(parseInt(g[_],10)|parseInt(m[_],10)^255),_++;return new this(h)}catch(d){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${d})`)}},P.IPv6.isIPv6=function(s){return this.parser(s)!==null},P.IPv6.isValid=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{let d=this.parser(s);return new this(d.parts,d.zoneId),!0}catch{return!1}},P.IPv6.isValidCIDR=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{return this.parseCIDR(s),!0}catch{return!1}},P.IPv6.networkAddressFromCIDR=function(s){let d,g,m,h,_;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),_=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),h=[],g=0;g<16;)h.push(parseInt(m[g],10)&parseInt(_[g],10)),g++;return new this(h)}catch(M){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${M})`)}},P.IPv6.parse=function(s){let d=this.parser(s);if(d.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(d.parts,d.zoneId)},P.IPv6.parseCIDR=function(s){let d,g,m;if((g=s.match(/^(.+)\/(\d+)$/))&&(d=parseInt(g[2]),d>=0&&d<=128))return m=[this.parse(g[1]),d],Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},P.IPv6.parser=function(s){let d,g,m,h,_,M;if(m=s.match(l.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(l.native.test(s))return y(s,8);if((m=s.match(l.transitional))&&(M=m[6]||"",d=m[1],m[1].endsWith("::")||(d=d.slice(0,-1)),d=y(d+M,6),d.parts)){for(_=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],g=0;g<_.length;g++)if(h=_[g],!(0<=h&&h<=255))return null;return d.parts.push(_[0]<<8|_[1]),d.parts.push(_[2]<<8|_[3]),{parts:d.parts,zoneId:d.zoneId}}return null},P.IPv6.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>128)throw new Error("ipaddr: invalid IPv6 prefix length");let d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)d[g]=255,g++;return m<16&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},P.fromByteArray=function(s){let d=s.length;if(d===4)return new P.IPv4(s);if(d===16)return new P.IPv6(s);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},P.isValid=function(s){return P.IPv6.isValid(s)||P.IPv4.isValid(s)},P.isValidCIDR=function(s){return P.IPv6.isValidCIDR(s)||P.IPv4.isValidCIDR(s)},P.parse=function(s){if(P.IPv6.isValid(s))return P.IPv6.parse(s);if(P.IPv4.isValid(s))return P.IPv4.parse(s);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},P.parseCIDR=function(s){try{return P.IPv6.parseCIDR(s)}catch{try{return P.IPv4.parseCIDR(s)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},P.process=function(s){let d=this.parse(s);return d.kind()==="ipv6"&&d.isIPv4MappedAddress()?d.toIPv4Address():d},P.subnetMatch=function(s,d,g){let m,h,_,M;g==null&&(g="unicast");for(h in d)if(Object.prototype.hasOwnProperty.call(d,h)){for(_=d[h],_[0]&&!(_[0]instanceof Array)&&(_=[_]),m=0;m<_.length;m++)if(M=_[m],s.kind()===M[0].kind()&&s.match.apply(s,M))return h}return g},typeof Zt<"u"&&Zt.exports?Zt.exports=P:e.ipaddr=P})(Bo)});var Wi=E((F$,Gi)=>{var Hi=require("stream").Stream,Jp=require("util");Gi.exports=pe;function pe(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(pe,"DelayedStream");Jp.inherits(pe,Hi);pe.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var i=e.emit;return e.emit=function(){return r._handleEmit(arguments),i.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(pe.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});pe.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};pe.prototype.resume=function(){this._released||this.release(),this.source.resume()};pe.prototype.pause=function(){this.source.pause()};pe.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};pe.prototype.pipe=function(){var e=Hi.prototype.pipe.apply(this,arguments);return this.resume(),e};pe.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)};pe.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 Xi=E((V$,Ji)=>{var Xp=require("util"),Ki=require("stream").Stream,qi=Wi();Ji.exports=W;function W(){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(W,"CombinedStream");Xp.inherits(W,Ki);W.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};W.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};W.prototype.append=function(e){var t=W.isStreamLike(e);if(t){if(!(e instanceof qi)){var r=qi.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};W.prototype.pipe=function(e,t){return Ki.prototype.pipe.call(this,e,t),this.resume(),e};W.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}};W.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(r){var n=W.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};W.prototype._pipeNext=function(e){this._currentStream=e;var t=W.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};W.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};W.prototype.write=function(e){this.emit("data",e)};W.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};W.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")};W.prototype.end=function(){this._reset(),this.emit("end")};W.prototype.destroy=function(){this._reset(),this.emit("close")};W.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};W.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};W.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)};W.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Qi=E((H$,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 ra=E(te=>{"use strict";var Jt=Qi(),Yp=require("path").extname,ea=/^\s*([^;\s]*)(?:;|\s|$)/,Qp=/^text\//i;te.charset=ta;te.charsets={lookup:ta};te.contentType=el;te.extension=tl;te.extensions=Object.create(null);te.lookup=rl;te.types=Object.create(null);nl(te.extensions,te.types);function ta(e){if(!e||typeof e!="string")return!1;var t=ea.exec(e),r=t&&Jt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Qp.test(t[1])?"UTF-8":!1}o(ta,"charset");function el(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?te.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=te.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(el,"contentType");function tl(e){if(!e||typeof e!="string")return!1;var t=ea.exec(e),r=t&&te.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(tl,"extension");function rl(e){if(!e||typeof e!="string")return!1;var t=Yp("x."+e).toLowerCase().substr(1);return t&&te.types[t]||!1}o(rl,"lookup");function nl(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Jt).forEach(o(function(i){var u=Jt[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var l=0;l<c.length;l++){var y=c[l];if(t[y]){var x=r.indexOf(Jt[t[y]].source),v=r.indexOf(u.source);if(t[y]!=="application/octet-stream"&&(x>v||x===v&&t[y].substr(0,12)==="application/"))continue}t[y]=i}}},"forEachMimeType"))}o(nl,"populateMaps")});var oa=E((q$,na)=>{na.exports=ol;function ol(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(ol,"defer")});var Gr=E((J$,aa)=>{var ia=oa();aa.exports=il;function il(e){var t=!1;return ia(function(){t=!0}),o(function(n,i){t?e(n,i):ia(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(il,"async")});var Wr=E((Y$,sa)=>{sa.exports=al;function al(e){Object.keys(e.jobs).forEach(sl.bind(e)),e.jobs={}}o(al,"abort");function sl(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(sl,"clean")});var qr=E((ez,ca)=>{var ua=Gr(),ul=Wr();ca.exports=cl;function cl(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=pl(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?ul(r):r.results[i]=c,n(u,r.results))})}o(cl,"iterate");function pl(e,t,r,n){var i;return e.length==2?i=e(r,ua(n)):i=e(r,t,ua(n)),i}o(pl,"runJob")});var Kr=E((rz,pa)=>{pa.exports=ll;function ll(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&n.keyedList.sort(r?t:function(i,u){return t(e[i],e[u])}),n}o(ll,"state")});var Jr=E((oz,la)=>{var dl=Wr(),ml=Gr();la.exports=fl;function fl(e){Object.keys(this.jobs).length&&(this.index=this.size,dl(this),ml(e)(null,this.results))}o(fl,"terminator")});var ma=E((az,da)=>{var gl=qr(),yl=Kr(),hl=Jr();da.exports=vl;function vl(e,t,r){for(var n=yl(e);n.index<(n.keyedList||e).length;)gl(e,t,n,function(i,u){if(i){r(i,u);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return hl.bind(n,r)}o(vl,"parallel")});var Xr=E((uz,Xt)=>{var fa=qr(),xl=Kr(),Pl=Jr();Xt.exports=_l;Xt.exports.ascending=ga;Xt.exports.descending=bl;function _l(e,t,r,n){var i=xl(e,r);return fa(e,t,i,o(function u(c,l){if(c){n(c,l);return}if(i.index++,i.index<(i.keyedList||e).length){fa(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),Pl.bind(i,n)}o(_l,"serialOrdered");function ga(e,t){return e<t?-1:e>t?1:0}o(ga,"ascending");function bl(e,t){return-1*ga(e,t)}o(bl,"descending")});var ha=E((pz,ya)=>{var Il=Xr();ya.exports=Tl;function Tl(e,t,r){return Il(e,t,null,r)}o(Tl,"serial")});var xa=E((dz,va)=>{va.exports={parallel:ma(),serial:ha(),serialOrdered:Xr()}});var Yr=E((mz,Pa)=>{"use strict";Pa.exports=Object});var ba=E((fz,_a)=>{"use strict";_a.exports=Error});var Ta=E((gz,Ia)=>{"use strict";Ia.exports=EvalError});var Aa=E((yz,Ea)=>{"use strict";Ea.exports=RangeError});var $a=E((hz,Sa)=>{"use strict";Sa.exports=ReferenceError});var Oa=E((vz,za)=>{"use strict";za.exports=SyntaxError});var Yt=E((xz,ka)=>{"use strict";ka.exports=TypeError});var wa=E((Pz,Ra)=>{"use strict";Ra.exports=URIError});var Da=E((_z,Na)=>{"use strict";Na.exports=Math.abs});var Ua=E((bz,Ca)=>{"use strict";Ca.exports=Math.floor});var La=E((Iz,Ma)=>{"use strict";Ma.exports=Math.max});var Fa=E((Tz,ja)=>{"use strict";ja.exports=Math.min});var Va=E((Ez,Ba)=>{"use strict";Ba.exports=Math.pow});var Ha=E((Az,Za)=>{"use strict";Za.exports=Math.round});var Wa=E((Sz,Ga)=>{"use strict";Ga.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var Ka=E((zz,qa)=>{"use strict";var El=Wa();qa.exports=o(function(t){return El(t)||t===0?t:t<0?-1:1},"sign")});var Xa=E((kz,Ja)=>{"use strict";Ja.exports=Object.getOwnPropertyDescriptor});var Qr=E((Rz,Ya)=>{"use strict";var Qt=Xa();if(Qt)try{Qt([],"length")}catch{Qt=null}Ya.exports=Qt});var es=E((wz,Qa)=>{"use strict";var er=Object.defineProperty||!1;if(er)try{er({},"a",{value:1})}catch{er=!1}Qa.exports=er});var en=E((Nz,ts)=>{"use strict";ts.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},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;t[r]=i;for(var u 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 c=Object.getOwnPropertySymbols(t);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,r);if(l.value!==i||l.enumerable!==!0)return!1}return!0},"hasSymbols")});var os=E((Cz,ns)=>{"use strict";var rs=typeof Symbol<"u"&&Symbol,Al=en();ns.exports=o(function(){return typeof rs!="function"||typeof Symbol!="function"||typeof rs("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Al()},"hasNativeSymbols")});var tn=E((Mz,is)=>{"use strict";is.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var rn=E((Lz,as)=>{"use strict";var Sl=Yr();as.exports=Sl.getPrototypeOf||null});var cs=E((jz,us)=>{"use strict";var $l="Function.prototype.bind called on incompatible ",zl=Object.prototype.toString,Ol=Math.max,kl="[object Function]",ss=o(function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var u=0;u<r.length;u+=1)n[u+t.length]=r[u];return n},"concatty"),Rl=o(function(t,r){for(var n=[],i=r||0,u=0;i<t.length;i+=1,u+=1)n[u]=t[i];return n},"slicy"),wl=o(function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},"joiny");us.exports=o(function(t){var r=this;if(typeof r!="function"||zl.apply(r)!==kl)throw new TypeError($l+r);for(var n=Rl(arguments,1),i,u=o(function(){if(this instanceof i){var v=r.apply(this,ss(n,arguments));return Object(v)===v?v:this}return r.apply(t,ss(n,arguments))},"binder"),c=Ol(0,r.length-n.length),l=[],y=0;y<c;y++)l[y]="$"+y;if(i=Function("binder","return function ("+wl(l,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var x=o(function(){},"Empty");x.prototype=r.prototype,i.prototype=new x,x.prototype=null}return i},"bind")});var We=E((Bz,ps)=>{"use strict";var Nl=cs();ps.exports=Function.prototype.bind||Nl});var tr=E((Vz,ls)=>{"use strict";ls.exports=Function.prototype.call});var nn=E((Zz,ds)=>{"use strict";ds.exports=Function.prototype.apply});var fs=E((Hz,ms)=>{"use strict";ms.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var ys=E((Gz,gs)=>{"use strict";var Dl=We(),Cl=nn(),Ul=tr(),Ml=fs();gs.exports=Ml||Dl.call(Ul,Cl)});var vs=E((Wz,hs)=>{"use strict";var Ll=We(),jl=Yt(),Fl=tr(),Bl=ys();hs.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new jl("a function is required");return Bl(Ll,Fl,t)},"callBindBasic")});var Ts=E((Kz,Is)=>{"use strict";var Vl=vs(),xs=Qr(),_s;try{_s=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var on=!!_s&&xs&&xs(Object.prototype,"__proto__"),bs=Object,Ps=bs.getPrototypeOf;Is.exports=on&&typeof on.get=="function"?Vl([on.get]):typeof Ps=="function"?o(function(t){return Ps(t==null?t:bs(t))},"getDunder"):!1});var zs=E((Xz,$s)=>{"use strict";var Es=tn(),As=rn(),Ss=Ts();$s.exports=Es?o(function(t){return Es(t)},"getProto"):As?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return As(t)},"getProto"):Ss?o(function(t){return Ss(t)},"getProto"):null});var an=E((Qz,Os)=>{"use strict";var Zl=Function.prototype.call,Hl=Object.prototype.hasOwnProperty,Gl=We();Os.exports=Gl.call(Zl,Hl)});var Us=E((eO,Cs)=>{"use strict";var L,Wl=Yr(),ql=ba(),Kl=Ta(),Jl=Aa(),Xl=$a(),Xe=Oa(),Je=Yt(),Yl=wa(),Ql=Da(),ed=Ua(),td=La(),rd=Fa(),nd=Va(),od=Ha(),id=Ka(),Ns=Function,sn=o(function(e){try{return Ns('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),Pt=Qr(),ad=es(),un=o(function(){throw new Je},"throwTypeError"),sd=Pt?(function(){try{return arguments.callee,un}catch{try{return Pt(arguments,"callee").get}catch{return un}}})():un,qe=os()(),Y=zs(),ud=rn(),cd=tn(),Ds=nn(),_t=tr(),Ke={},pd=typeof Uint8Array>"u"||!Y?L:Y(Uint8Array),Ue={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?L:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?L:ArrayBuffer,"%ArrayIteratorPrototype%":qe&&Y?Y([][Symbol.iterator]()):L,"%AsyncFromSyncIteratorPrototype%":L,"%AsyncFunction%":Ke,"%AsyncGenerator%":Ke,"%AsyncGeneratorFunction%":Ke,"%AsyncIteratorPrototype%":Ke,"%Atomics%":typeof Atomics>"u"?L:Atomics,"%BigInt%":typeof BigInt>"u"?L:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?L:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?L:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?L:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":ql,"%eval%":eval,"%EvalError%":Kl,"%Float16Array%":typeof Float16Array>"u"?L:Float16Array,"%Float32Array%":typeof Float32Array>"u"?L:Float32Array,"%Float64Array%":typeof Float64Array>"u"?L:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?L:FinalizationRegistry,"%Function%":Ns,"%GeneratorFunction%":Ke,"%Int8Array%":typeof Int8Array>"u"?L:Int8Array,"%Int16Array%":typeof Int16Array>"u"?L:Int16Array,"%Int32Array%":typeof Int32Array>"u"?L:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":qe&&Y?Y(Y([][Symbol.iterator]())):L,"%JSON%":typeof JSON=="object"?JSON:L,"%Map%":typeof Map>"u"?L:Map,"%MapIteratorPrototype%":typeof Map>"u"||!qe||!Y?L:Y(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Wl,"%Object.getOwnPropertyDescriptor%":Pt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?L:Promise,"%Proxy%":typeof Proxy>"u"?L:Proxy,"%RangeError%":Jl,"%ReferenceError%":Xl,"%Reflect%":typeof Reflect>"u"?L:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?L:Set,"%SetIteratorPrototype%":typeof Set>"u"||!qe||!Y?L:Y(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?L:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":qe&&Y?Y(""[Symbol.iterator]()):L,"%Symbol%":qe?Symbol:L,"%SyntaxError%":Xe,"%ThrowTypeError%":sd,"%TypedArray%":pd,"%TypeError%":Je,"%Uint8Array%":typeof Uint8Array>"u"?L:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?L:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?L:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?L:Uint32Array,"%URIError%":Yl,"%WeakMap%":typeof WeakMap>"u"?L:WeakMap,"%WeakRef%":typeof WeakRef>"u"?L:WeakRef,"%WeakSet%":typeof WeakSet>"u"?L:WeakSet,"%Function.prototype.call%":_t,"%Function.prototype.apply%":Ds,"%Object.defineProperty%":ad,"%Object.getPrototypeOf%":ud,"%Math.abs%":Ql,"%Math.floor%":ed,"%Math.max%":td,"%Math.min%":rd,"%Math.pow%":nd,"%Math.round%":od,"%Math.sign%":id,"%Reflect.getPrototypeOf%":cd};if(Y)try{null.error}catch(e){ks=Y(Y(e)),Ue["%Error.prototype%"]=ks}var ks,ld=o(function e(t){var r;if(t==="%AsyncFunction%")r=sn("async function () {}");else if(t==="%GeneratorFunction%")r=sn("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=sn("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Y&&(r=Y(i.prototype))}return Ue[t]=r,r},"doEval"),Rs={__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"]},bt=We(),rr=an(),dd=bt.call(_t,Array.prototype.concat),md=bt.call(Ds,Array.prototype.splice),ws=bt.call(_t,String.prototype.replace),nr=bt.call(_t,String.prototype.slice),fd=bt.call(_t,RegExp.prototype.exec),gd=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,yd=/\\(\\)?/g,hd=o(function(t){var r=nr(t,0,1),n=nr(t,-1);if(r==="%"&&n!=="%")throw new Xe("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Xe("invalid intrinsic syntax, expected opening `%`");var i=[];return ws(t,gd,function(u,c,l,y){i[i.length]=l?ws(y,yd,"$1"):c||u}),i},"stringToPath"),vd=o(function(t,r){var n=t,i;if(rr(Rs,n)&&(i=Rs[n],n="%"+i[0]+"%"),rr(Ue,n)){var u=Ue[n];if(u===Ke&&(u=ld(n)),typeof u>"u"&&!r)throw new Je("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new Xe("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");Cs.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new Je("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Je('"allowMissing" argument must be a boolean');if(fd(/^%?[^%]*%?$/,t)===null)throw new Xe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=hd(t),i=n.length>0?n[0]:"",u=vd("%"+i+"%",r),c=u.name,l=u.value,y=!1,x=u.alias;x&&(i=x[0],md(n,dd([0,1],x)));for(var v=1,T=!0;v<n.length;v+=1){var P=n[v],s=nr(P,0,1),d=nr(P,-1);if((s==='"'||s==="'"||s==="`"||d==='"'||d==="'"||d==="`")&&s!==d)throw new Xe("property names with quotes must have matching quotes");if((P==="constructor"||!T)&&(y=!0),i+="."+P,c="%"+i+"%",rr(Ue,c))l=Ue[c];else if(l!=null){if(!(P in l)){if(!r)throw new Je("base intrinsic for "+t+" exists, but the property is not available.");return}if(Pt&&v+1>=n.length){var g=Pt(l,P);T=!!g,T&&"get"in g&&!("originalValue"in g.get)?l=g.get:l=l[P]}else T=rr(l,P),l=l[P];T&&!y&&(Ue[c]=l)}}return l},"GetIntrinsic")});var Ls=E((rO,Ms)=>{"use strict";var xd=en();Ms.exports=o(function(){return xd()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Bs=E((oO,Fs)=>{"use strict";var Pd=Us(),js=Pd("%Object.defineProperty%",!0),_d=Ls()(),bd=an(),Id=Yt(),or=_d?Symbol.toStringTag:null;Fs.exports=o(function(t,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 Id("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");or&&(n||!bd(t,or))&&(js?js(t,or,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[or]=r)},"setToStringTag")});var Zs=E((aO,Vs)=>{"use strict";var Td=Function.prototype.call,Ed=Object.prototype.hasOwnProperty,Ad=We();Vs.exports=Ad.call(Td,Ed)});var Gs=E((sO,Hs)=>{"use strict";Hs.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var Ks=E((uO,qs)=>{"use strict";var dn=Xi(),Sd=require("util"),cn=require("path"),$d=require("http"),zd=require("https"),Od=require("url").parse,kd=require("fs"),Rd=require("stream").Stream,wd=require("crypto"),pn=ra(),Nd=xa(),Dd=Bs(),Re=Zs(),ln=Gs();function Ws(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(Ws,"escapeHeaderParam");function B(e){if(!(this instanceof B))return new B(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],dn.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(B,"FormData");Sd.inherits(B,dn);B.LINE_BREAK=`\r
|
|
2
|
+
`;B.DEFAULT_CONTENT_TYPE="application/octet-stream";B.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=dn.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 i=this._multiPartHeader(e,t,r),u=this._multiPartFooter();n(i),n(t),n(u),this._trackLength(i,t,r)};B.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+B.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Re(t,"httpVersion"))&&!(t instanceof Rd))&&(r.knownLength||this._valuesToMeasure.push(t))};B.prototype._lengthRetriever=function(e,t){Re(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):kd.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):Re(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Re(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};B.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),i=this._getContentType(t,r),u="",c={"Content-Disposition":["form-data",'name="'+Ws(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&ln(c,r.header);var l;for(var y in c)if(Re(c,y)){if(l=c[y],l==null)continue;Array.isArray(l)||(l=[l]),l.length&&(u+=y+": "+l.join("; ")+B.LINE_BREAK)}return"--"+this.getBoundary()+B.LINE_BREAK+u+B.LINE_BREAK};B.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=cn.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=cn.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Re(e,"httpVersion")&&(r=cn.basename(e.client._httpMessage.path||"")),r)return'filename="'+Ws(r)+'"'};B.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=pn.lookup(e.name)),!r&&e&&e.path&&(r=pn.lookup(e.path)),!r&&e&&e.readable&&Re(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=pn.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=B.DEFAULT_CONTENT_TYPE),r};B.prototype._multiPartFooter=function(){return function(e){var t=B.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};B.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+B.LINE_BREAK};B.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Re(e,t)&&(r[t.toLowerCase()]=e[t]);return r};B.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};B.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};B.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(B.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};B.prototype._generateBoundary=function(){this._boundary="--------------------------"+wd.randomBytes(12).toString("hex")};B.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};B.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};B.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}Nd.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};B.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=Od(e),n=ln({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=ln(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=zd.request(n):r=$d.request(n),this.getLength(function(u,c){if(u&&u!=="Unknown stream"){this._error(u);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),t){var l,y=o(function(x,v){return r.removeListener("error",y),r.removeListener("response",l),t.call(this,x,v)},"callback");l=y.bind(this,null),r.on("error",y),r.on("response",l)}}.bind(this)),r};B.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};B.prototype.toString=function(){return"[object FormData]"};Dd(B.prototype,"FormData");qs.exports=B});var Hd={};yn(Hd,{alai:()=>Zd});module.exports=du(Hd);var mu=Object.freeze({status:"aborted"});function b(e,t,r){function n(l,y){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:y,constr:c,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,y);let x=c.prototype,v=Object.keys(x);for(let T=0;T<v.length;T++){let P=v[T];P in l||(l[P]=x[P].bind(l))}}o(n,"init");let i=r?.Parent??Object;class u extends i{static{o(this,"Definition")}}Object.defineProperty(u,"name",{value:e});function c(l){var y;let x=r?.Parent?new u:this;n(x,l),(y=x._zod).deferred??(y.deferred=[]);for(let v of x._zod.deferred)v();return x}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}o(b,"$constructor");var de=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Tt=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},ar={};function he(e){return e&&Object.assign(ar,e),ar}o(he,"config");function ur(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}o(ur,"getEnumValues");function xn(e,t){return typeof t=="bigint"?t.toString():t}o(xn,"jsonStringifyReplacer");function At(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(At,"cached");function Pn(e){return e==null}o(Pn,"nullish");function St(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(St,"cleanRegex");var vn=Symbol("evaluating");function q(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==vn)return n===void 0&&(n=vn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(q,"defineLazy");var cr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function et(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(et,"isObject");var fu=At(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function _n(e){if(et(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(et(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(_n,"isPlainObject");var bn=new Set(["string","number","symbol"]);function Le(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(Le,"escapeRegex");function $t(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o($t,"clone");function V(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>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:o(()=>t.error,"error")}:t}o(V,"normalizeParams");function In(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(In,"optionalKeys");var Tn={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 je(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}o(je,"aborted");function Ie(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(Ie,"prefixIssues");function Et(e){return typeof e=="string"?e:e?.message}o(Et,"unwrapMessage");function Te(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=Et(e.inst?._zod.def?.error?.(e))??Et(t?.error?.(e))??Et(r.customError?.(e))??Et(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(Te,"finalizeIssue");function En(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(En,"getLengthableOrigin");function pr(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(pr,"issue");var An=o((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,xn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),Sn=b("$ZodError",An),tt=b("$ZodError",An,{Parent:Error});var yu=o(e=>(t,r,n,i)=>{let u=n?Object.assign(n,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise)throw new de;if(c.issues.length){let l=new(i?.Err??e)(c.issues.map(y=>Te(y,u,he())));throw cr(l,i?.callee),l}return c.value},"_parse"),zt=yu(tt),hu=o(e=>async(t,r,n,i)=>{let u=n?Object.assign(n,{async:!0}):{async:!0},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){let l=new(i?.Err??e)(c.issues.map(y=>Te(y,u,he())));throw cr(l,i?.callee),l}return c.value},"_parseAsync"),Ot=hu(tt),vu=o(e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},u=t._zod.run({value:r,issues:[]},i);if(u instanceof Promise)throw new de;return u.issues.length?{success:!1,error:new(e??Sn)(u.issues.map(c=>Te(c,i,he())))}:{success:!0,data:u.value}},"_safeParse"),rt=vu(tt),xu=o(e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},u=t._zod.run({value:r,issues:[]},i);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>Te(c,i,he())))}:{success:!0,data:u.value}},"_safeParseAsync"),nt=xu(tt);var Pu="(?:(?:\\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])))",_u=new RegExp(`^${Pu}$`);var $n=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),zn=/^-?\d+n?$/,On=/^-?\d+$/,lr=/^-?\d+(?:\.\d+)?$/,kn=/^(?:true|false)$/i;var Ee=b("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),bu={number:"number",bigint:"bigint",object:"date"};var Rn=b("$ZodCheckGreaterThan",(e,t)=>{Ee.init(e,t);let r=bu[typeof t.value];e._zod.onattach.push(n=>{let i=n._zod.bag,u=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>u&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}});var wn=b("$ZodCheckNumberFormat",(e,t)=>{Ee.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,u]=Tn[t.format];e._zod.onattach.push(c=>{let l=c._zod.bag;l.format=t.format,l.minimum=i,l.maximum=u,r&&(l.pattern=On)}),e._zod.check=c=>{let l=c.value;if(r){if(!Number.isInteger(l)){c.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?c.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):c.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}l<i&&c.issues.push({origin:"number",input:l,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),l>u&&c.issues.push({origin:"number",input:l,code:"too_big",maximum:u,inclusive:!0,inst:e,continue:!t.abort})}});var Nn=b("$ZodCheckMinLength",(e,t)=>{var r;Ee.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Pn(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;if(i.length>=t.minimum)return;let c=En(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var dr=b("$ZodCheckStringFormat",(e,t)=>{var r,n;Ee.init(e,t),e._zod.onattach.push(i=>{let u=i._zod.bag;u.format=t.format,t.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),Dn=b("$ZodCheckRegex",(e,t)=>{dr.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}});var Un={major:4,minor:3,patch:6};var G=b("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Un;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let u of i._zod.onattach)u(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=o((c,l,y)=>{let x=je(c),v;for(let T of l){if(T._zod.def.when){if(!T._zod.def.when(c))continue}else if(x)continue;let P=c.issues.length,s=T._zod.check(c);if(s instanceof Promise&&y?.async===!1)throw new de;if(v||s instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await s,c.issues.length!==P&&(x||(x=je(c,P)))});else{if(c.issues.length===P)continue;x||(x=je(c,P))}}return v?v.then(()=>c):c},"runChecks"),u=o((c,l,y)=>{if(je(c))return c.aborted=!0,c;let x=i(l,n,y);if(x instanceof Promise){if(y.async===!1)throw new de;return x.then(v=>e._zod.parse(v,y))}return e._zod.parse(x,y)},"handleCanaryResult");e._zod.run=(c,l)=>{if(l.skipChecks)return e._zod.parse(c,l);if(l.direction==="backward"){let x=e._zod.parse({value:c.value,issues:[]},{...l,skipChecks:!0});return x instanceof Promise?x.then(v=>u(v,c,l)):u(x,c,l)}let y=e._zod.parse(c,l);if(y instanceof Promise){if(l.async===!1)throw new de;return y.then(x=>i(x,n,l))}return i(y,n,l)}}q(e,"~standard",()=>({validate:o(i=>{try{let u=rt(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return nt(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),wt=b("$ZodString",(e,t)=>{G.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??$n(e._zod.bag),e._zod.parse=(r,n)=>{if(t.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:e}),r}}),mr=b("$ZodStringFormat",(e,t)=>{dr.init(e,t),wt.init(e,t)});var Bn=b("$ZodURL",(e,t)=>{mr.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var fr=b("$ZodNumber",(e,t)=>{G.init(e,t),e._zod.pattern=e._zod.bag.pattern??lr,e._zod.parse=(r,n)=>{if(t.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 u=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:e,...u?{received:u}:{}}),r}}),Vn=b("$ZodNumberFormat",(e,t)=>{wn.init(e,t),fr.init(e,t)}),gr=b("$ZodBoolean",(e,t)=>{G.init(e,t),e._zod.pattern=kn,e._zod.parse=(r,n)=>{if(t.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:e}),r}}),Zn=b("$ZodBigInt",(e,t)=>{G.init(e,t),e._zod.pattern=zn,e._zod.parse=(r,n)=>{if(t.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:e}),r}});var Hn=b("$ZodAny",(e,t)=>{G.init(e,t),e._zod.parse=r=>r}),Gn=b("$ZodUnknown",(e,t)=>{G.init(e,t),e._zod.parse=r=>r});var Wn=b("$ZodVoid",(e,t)=>{G.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),qn=b("$ZodDate",(e,t)=>{G.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,u=i instanceof Date;return u&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...u?{received:"Invalid Date"}:{},inst:e}),r}});function Mn(e,t,r){e.issues.length&&t.issues.push(...Ie(r,e.issues)),t.value[r]=e.value}o(Mn,"handleArrayResult");var Kn=b("$ZodArray",(e,t)=>{G.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let u=[];for(let c=0;c<i.length;c++){let l=i[c],y=t.element._zod.run({value:l,issues:[]},n);y instanceof Promise?u.push(y.then(x=>Mn(x,r,c))):Mn(y,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function Rt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...Ie(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(Rt,"handlePropertyResult");function Iu(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=In(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(Iu,"normalizeDef");function Tu(e,t,r,n,i,u){let c=[],l=i.keySet,y=i.catchall._zod,x=y.def.type,v=y.optout==="optional";for(let T in t){if(l.has(T))continue;if(x==="never"){c.push(T);continue}let P=y.run({value:t[T],issues:[]},n);P instanceof Promise?e.push(P.then(s=>Rt(s,r,T,t,v))):Rt(P,r,T,t,v)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:u}),e.length?Promise.all(e).then(()=>r):r}o(Tu,"handleCatchall");var Jn=b("$ZodObject",(e,t)=>{if(G.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let l=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let y={...l};return Object.defineProperty(t,"shape",{value:y}),y},"get")})}let n=At(()=>Iu(t));q(e._zod,"propValues",()=>{let l=t.shape,y={};for(let x in l){let v=l[x]._zod;if(v.values){y[x]??(y[x]=new Set);for(let T of v.values)y[x].add(T)}}return y});let i=et,u=t.catchall,c;e._zod.parse=(l,y)=>{c??(c=n.value);let x=l.value;if(!i(x))return l.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),l;l.value={};let v=[],T=c.shape;for(let P of c.keys){let s=T[P],d=s._zod.optout==="optional",g=s._zod.run({value:x[P],issues:[]},y);g instanceof Promise?v.push(g.then(m=>Rt(m,l,P,x,d))):Rt(g,l,P,x,d)}return u?Tu(v,x,l,y,n.value,e):v.length?Promise.all(v).then(()=>l):l}});function Ln(e,t,r,n){for(let u of e)if(u.issues.length===0)return t.value=u.value,t;let i=e.filter(u=>!je(u));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(u=>u.issues.map(c=>Te(c,n,he())))}),t)}o(Ln,"handleUnionResults");var yr=b("$ZodUnion",(e,t)=>{G.init(e,t),q(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),q(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),q(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),q(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${i.map(u=>St(u.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,u)=>{if(r)return n(i,u);let c=!1,l=[];for(let y of t.options){let x=y._zod.run({value:i.value,issues:[]},u);if(x instanceof Promise)l.push(x),c=!0;else{if(x.issues.length===0)return x;l.push(x)}}return c?Promise.all(l).then(y=>Ln(y,i,e,u)):Ln(l,i,e,u)}});var Xn=b("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,yr.init(e,t);let r=e._zod.parse;q(e._zod,"propValues",()=>{let i={};for(let u of t.options){let c=u._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(let[l,y]of Object.entries(c)){i[l]||(i[l]=new Set);for(let x of y)i[l].add(x)}}return i});let n=At(()=>{let i=t.options,u=new Map;for(let c of i){let l=c._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let y of l){if(u.has(y))throw new Error(`Duplicate discriminator value "${String(y)}"`);u.set(y,c)}}return u});e._zod.parse=(i,u)=>{let c=i.value;if(!et(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;let l=n.value.get(c?.[t.discriminator]);return l?l._zod.run(i,u):t.unionFallback?r(i,u):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}});var Yn=b("$ZodRecord",(e,t)=>{G.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!_n(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let u=[],c=t.keyType._zod.values;if(c){r.value={};let l=new Set;for(let x of c)if(typeof x=="string"||typeof x=="number"||typeof x=="symbol"){l.add(typeof x=="number"?x.toString():x);let v=t.valueType._zod.run({value:i[x],issues:[]},n);v instanceof Promise?u.push(v.then(T=>{T.issues.length&&r.issues.push(...Ie(x,T.issues)),r.value[x]=T.value})):(v.issues.length&&r.issues.push(...Ie(x,v.issues)),r.value[x]=v.value)}let y;for(let x in i)l.has(x)||(y=y??[],y.push(x));y&&y.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:y})}else{r.value={};for(let l of Reflect.ownKeys(i)){if(l==="__proto__")continue;let y=t.keyType._zod.run({value:l,issues:[]},n);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&lr.test(l)&&y.issues.length){let T=t.keyType._zod.run({value:Number(l),issues:[]},n);if(T instanceof Promise)throw new Error("Async schemas not supported in object keys currently");T.issues.length===0&&(y=T)}if(y.issues.length){t.mode==="loose"?r.value[l]=i[l]:r.issues.push({code:"invalid_key",origin:"record",issues:y.issues.map(T=>Te(T,n,he())),input:l,path:[l],inst:e});continue}let v=t.valueType._zod.run({value:i[l],issues:[]},n);v instanceof Promise?u.push(v.then(T=>{T.issues.length&&r.issues.push(...Ie(l,T.issues)),r.value[y.value]=T.value})):(v.issues.length&&r.issues.push(...Ie(l,v.issues)),r.value[y.value]=v.value)}}return u.length?Promise.all(u).then(()=>r):r}});var Qn=b("$ZodEnum",(e,t)=>{G.init(e,t);let r=ur(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>bn.has(typeof i)).map(i=>typeof i=="string"?Le(i):i.toString()).join("|")})$`),e._zod.parse=(i,u)=>{let c=i.value;return n.has(c)||i.issues.push({code:"invalid_value",values:r,input:c,inst:e}),i}}),eo=b("$ZodLiteral",(e,t)=>{if(G.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Le(n):n?Le(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let u=n.value;return r.has(u)||n.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),n}});var to=b("$ZodTransform",(e,t)=>{G.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Tt(e.constructor.name);let i=t.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 de;return r.value=i,r}});function jn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(jn,"handleOptionalResult");var ro=b("$ZodOptional",(e,t)=>{G.init(e,t),e._zod.optin="optional",e._zod.optout="optional",q(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),q(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${St(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(u=>jn(u,r.value)):jn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var no=b("$ZodNullable",(e,t)=>{G.init(e,t),q(e._zod,"optin",()=>t.innerType._zod.optin),q(e._zod,"optout",()=>t.innerType._zod.optout),q(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${St(r.source)}|null)$`):void 0}),q(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)});var oo=b("$ZodPipe",(e,t)=>{G.init(e,t),q(e._zod,"values",()=>t.in._zod.values),q(e._zod,"optin",()=>t.in._zod.optin),q(e._zod,"optout",()=>t.out._zod.optout),q(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let u=t.out._zod.run(r,n);return u instanceof Promise?u.then(c=>kt(c,t.in,n)):kt(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>kt(u,t.out,n)):kt(i,t.out,n)}});function kt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(kt,"handlePipeResult");var io=b("$ZodCustom",(e,t)=>{Ee.init(e,t),G.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(u=>Fn(u,r,n,e));Fn(i,r,n,e)}});function Fn(e,t,r,n){if(!e){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),t.issues.push(pr(i))}}o(Fn,"handleRefineResult");var so;var hr=class{static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function uo(){return new hr}o(uo,"registry");(so=globalThis).__zod_globalRegistry??(so.__zod_globalRegistry=uo());var vr=globalThis.__zod_globalRegistry;function co(e,t){return new e({type:"string",...V(t)})}o(co,"_string");function po(e,t){return new e({type:"string",coerce:!0,...V(t)})}o(po,"_coercedString");function lo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...V(t)})}o(lo,"_url");function mo(e,t){return new e({type:"number",checks:[],...V(t)})}o(mo,"_number");function fo(e,t){return new e({type:"number",coerce:!0,checks:[],...V(t)})}o(fo,"_coercedNumber");function go(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...V(t)})}o(go,"_int");function yo(e,t){return new e({type:"boolean",...V(t)})}o(yo,"_boolean");function ho(e,t){return new e({type:"boolean",coerce:!0,...V(t)})}o(ho,"_coercedBoolean");function vo(e,t){return new e({type:"bigint",coerce:!0,...V(t)})}o(vo,"_coercedBigint");function xo(e){return new e({type:"any"})}o(xo,"_any");function Po(e){return new e({type:"unknown"})}o(Po,"_unknown");function _o(e,t){return new e({type:"void",...V(t)})}o(_o,"_void");function bo(e,t){return new e({type:"date",coerce:!0,...V(t)})}o(bo,"_coercedDate");function Nt(e,t){return new Rn({check:"greater_than",...V(t),value:e,inclusive:!0})}o(Nt,"_gte");function ue(e,t){return new Nn({check:"min_length",...V(t),minimum:e})}o(ue,"_minLength");function Ae(e,t){return new Dn({check:"string_format",format:"regex",...V(t),pattern:e})}o(Ae,"_regex");function Io(e,t,r){let n=V(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(Io,"_custom");var K=b("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");G.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>zt(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>rt(e,r,n),e.parseAsync=async(r,n)=>Ot(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>nt(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>$t(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.apply=r=>r(e)}),Ct=b("ZodMiniString",(e,t)=>{wt.init(e,t),K.init(e,t)});function a(e){return co(Ct,e)}o(a,"string");var To=b("ZodMiniStringFormat",(e,t)=>{mr.init(e,t),Ct.init(e,t)});var Uu=b("ZodMiniURL",(e,t)=>{Bn.init(e,t),To.init(e,t)});function Eo(e){return lo(Uu,e)}o(Eo,"url");var Ut=b("ZodMiniNumber",(e,t)=>{fr.init(e,t),K.init(e,t)});function J(e){return mo(Ut,e)}o(J,"number");var Mu=b("ZodMiniNumberFormat",(e,t)=>{Vn.init(e,t),Ut.init(e,t)});function Ao(e){return go(Mu,e)}o(Ao,"int");var xr=b("ZodMiniBoolean",(e,t)=>{gr.init(e,t),K.init(e,t)});function F(e){return yo(xr,e)}o(F,"boolean");var So=b("ZodMiniBigInt",(e,t)=>{Zn.init(e,t),K.init(e,t)});var Lu=b("ZodMiniAny",(e,t)=>{Hn.init(e,t),K.init(e,t)});function it(){return xo(Lu)}o(it,"any");var ju=b("ZodMiniUnknown",(e,t)=>{Gn.init(e,t),K.init(e,t)});function N(){return Po(ju)}o(N,"unknown");var Fu=b("ZodMiniVoid",(e,t)=>{Wn.init(e,t),K.init(e,t)});function $o(e){return _o(Fu,e)}o($o,"_void");var zo=b("ZodMiniDate",(e,t)=>{qn.init(e,t),K.init(e,t)});var Bu=b("ZodMiniArray",(e,t)=>{Kn.init(e,t),K.init(e,t)});function O(e,t){return new Bu({type:"array",element:e,...V(t)})}o(O,"array");var Vu=b("ZodMiniObject",(e,t)=>{Jn.init(e,t),K.init(e,t),q(e,"shape",()=>t.shape)});function p(e,t){let r={type:"object",shape:e??{},...V(t)};return new Vu(r)}o(p,"object");var Zu=b("ZodMiniUnion",(e,t)=>{yr.init(e,t),K.init(e,t)});function U(e,t){return new Zu({type:"union",options:e,...V(t)})}o(U,"union");var Hu=b("ZodMiniDiscriminatedUnion",(e,t)=>{Xn.init(e,t),K.init(e,t)});function Se(e,t,r){return new Hu({type:"union",options:t,discriminator:e,...V(r)})}o(Se,"discriminatedUnion");var Gu=b("ZodMiniRecord",(e,t)=>{Yn.init(e,t),K.init(e,t)});function D(e,t,r){return new Gu({type:"record",keyType:e,valueType:t,...V(r)})}o(D,"record");var Wu=b("ZodMiniEnum",(e,t)=>{Qn.init(e,t),K.init(e,t),e.options=Object.values(t.entries)});function $(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Wu({type:"enum",entries:r,...V(t)})}o($,"_enum");var qu=b("ZodMiniLiteral",(e,t)=>{eo.init(e,t),K.init(e,t)});function A(e,t){return new qu({type:"literal",values:Array.isArray(e)?e:[e],...V(t)})}o(A,"literal");var Ku=b("ZodMiniTransform",(e,t)=>{to.init(e,t),K.init(e,t)});function $e(e){return new Ku({type:"transform",transform:e})}o($e,"transform");var Ju=b("ZodMiniOptional",(e,t)=>{ro.init(e,t),K.init(e,t)});function f(e){return new Ju({type:"optional",innerType:e})}o(f,"optional");var Xu=b("ZodMiniNullable",(e,t)=>{no.init(e,t),K.init(e,t)});function at(e){return new Xu({type:"nullable",innerType:e})}o(at,"nullable");var Yu=b("ZodMiniPipe",(e,t)=>{oo.init(e,t),K.init(e,t)});function ze(e,t){return new Yu({type:"pipe",in:e,out:t})}o(ze,"pipe");var Qu=b("ZodMiniCustom",(e,t)=>{io.init(e,t),K.init(e,t)});function Mt(e,t){return Io(Qu,e??(()=>!0),t)}o(Mt,"custom");var st={};yn(st,{bigint:()=>ic,boolean:()=>oc,date:()=>ac,number:()=>nc,string:()=>rc});function rc(e){return po(Ct,e)}o(rc,"string");function nc(e){return fo(Ut,e)}o(nc,"number");function oc(e){return ho(xr,e)}o(oc,"boolean");function ic(e){return vo(So,e)}o(ic,"bigint");function ac(e){return bo(zo,e)}o(ac,"date");var _r=p({retryOnFailure:p({defaultValue:f(F()),hide:f(F())}),continueOnFailure:p({defaultValue:f(F()),hide:f(F())})}),Pr=class{constructor(t,r,n,i,u,c,l,y,x,v,T,P,s){this.name=t;this.displayName=r;this.description=n;this.props=i;this.propertyGroups=u;this.run=c;this.test=l;this.requireAuth=y;this.errorHandlingOptions=x;this.outputSchema=v;this.audience=T;this.aiMetadata=P;this.classification=s}static{o(this,"IAction")}},oe=o(e=>new Pr(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 j=p({displayName:a(),description:f(a()),advanced:f(F()),width:f($(["half","full"])),icon:f(a()),placeholder:f(a())}),C=o((e,t)=>p({type:A(t),required:F(),defaultValue:f(it())}),"TPropertyValue");var re=p({...j.shape,...C(a(),"SHORT_TEXT").shape}),ve=p({...j.shape,...C(a(),"LONG_TEXT").shape});var ko=p({label:a(),value:N(),description:f(a()),icon:f(a())}),Lt=p({disabled:f(F()),placeholder:f(a()),options:O(ko)});var uc=$(["cards"]),ne=p({...j.shape,options:Lt,display:f(uc),...C(N(),"STATIC_DROPDOWN").shape}),xe=p({...j.shape,options:Lt,...C(O(N()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var br=p({...j.shape,...C(N(),"DROPDOWN").shape,refreshers:O(a())}),ut=p({...j.shape,...C(O(N()),"MULTI_SELECT_DROPDOWN").shape,refreshers:O(a())});var Pe=p({...j.shape,reveals:f(O(a())),...C(F(),"CHECKBOX").shape});var _e=p({...j.shape,display:f($(["stepper"])),min:f(J()),max:f(J()),step:f(J()),...C(J(),"NUMBER").shape});var ct=p({...j.shape,streaming:f(F()),...C(N(),"FILE").shape});var pt=p({...j.shape,...C(a(),"DATE_TIME").shape});var Ro=D(a(),U([re,ve,ne,ut,xe,Pe,_e,ct,pt])),lt=p({...j.shape,properties:Ro,...C(O(N()),"ARRAY").shape});var wo=$(["any_time","last_24_hours","last_7_days","last_30_days","last_90_days","this_month","custom"]),No=p({preset:f(wo),after:f(a()),before:f(a())}),Ir=p({...j.shape,display:f($(["dropdown"])),...C(No,"DATE_RANGE").shape});var dt=p({...j.shape,...C(U([D(a(),N())]),"JSON").shape});var Do=U([re,ne,dt,lt,xe]),cc=D(a(),Do),Tr=p({refreshers:O(a()),...j.shape,...C(N(),"DYNAMIC").shape});var jt=p({...j.shape,...C($o(),"MARKDOWN").shape});var mt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(mt||{}),Fe=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Fe||{}),Be=(h=>(h.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",h.COMMUNICATION="COMMUNICATION",h.COMMERCE="COMMERCE",h.CORE="CORE",h.UNIVERSAL_AI="UNIVERSAL_AI",h.FLOW_CONTROL="FLOW_CONTROL",h.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",h.ACCOUNTING="ACCOUNTING",h.PRODUCTIVITY="PRODUCTIVITY",h.CONTENT_AND_FILES="CONTENT_AND_FILES",h.DEVELOPER_TOOLS="DEVELOPER_TOOLS",h.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",h.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",h.HUMAN_RESOURCES="HUMAN_RESOURCES",h.PAYMENT_PROCESSING="PAYMENT_PROCESSING",h.MARKETING="MARKETING",h.SALES_AND_CRM="SALES_AND_CRM",h))(Be||{});var ft=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(ft||{}),Er="both_client_credentials_and_authorization_code";var we=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(we||{}),gt=(u=>(u.NONE="NONE",u.HEADER_PRESENT="HEADER_PRESENT",u.QUERY_PRESENT="QUERY_PRESENT",u.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",u.HEAD_REQUEST="HEAD_REQUEST",u))(gt||{}),pc=p({strategy:$(gt),paramName:f(a())}),yt=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(yt||{});var Ft=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Ft||{}),Co=p({status:f(J()),body:f(N()),headers:f(D(a(),a()))}),Uo=p({type:A("DELAY"),resumeDateTime:a(),requestIdToReply:f(a()),handlerId:f(a()),streamStepProgress:f($(Ft))}),Mo=p({type:A("WEBHOOK"),requestId:a(),requestIdToReply:f(a()),response:Co,handlerId:f(a()),streamStepProgress:f($(Ft))}),lc=U([Uo,Mo]);var dc=p({body:N(),rawBody:f(N()),headers:D(a(),a()),queryParams:D(a(),a())});function ce(e){return e==null}o(ce,"isNil");function ht(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(ht,"isEmpty");function Bt(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(Bt,"assertNotNullOrUndefined");var Ar=Me(require("crypto"),1);var mc=128,Oe,Ve,fc=o(e=>{if(e<0)throw new RangeError("Wrong ID size");try{!Oe||Oe.length<e?(Oe=Buffer.allocUnsafe(e*mc),Ar.default.randomFillSync(Oe),Ve=0):Ve+e>Oe.length&&(Ar.default.randomFillSync(Oe),Ve=0)}catch(t){throw Oe=void 0,t}Ve+=e},"fillPool"),gc=o(e=>(fc(e|=0),Oe.subarray(Ve-e,Ve)),"random"),yc=o((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,i=Math.ceil(1.6*n*t/e.length);return(u=t)=>{if(u<=0)return"";let c="";for(;;){let l=r(i),y=i;for(;y--;)if(c+=e[l[y]&n]||"",c.length===u)return c}}},"customRandom"),jo=o((e,t=21)=>yc(e,t,gc),"customAlphabet");var hc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Fo=21,Ob=a().check(Ae(new RegExp(`^[0-9a-zA-Z]{${Fo}}$`))),vc=jo(hc,Fo);var ke=ze($e(e=>e instanceof Date?e.toISOString():e),a()),ie={id:a(),created:ke,updated:ke},H=o(e=>f(at(e)),"Nullable");function Sr(e){return f(at($(e)))}o(Sr,"NullableEnum");var wb=ze($e(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),f(F())),Vt=o(e=>ze($e(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),f(O(e))),"OptionalArrayFromQuery");var Cb=D(a(),N());var vt=(v=>(v.OPENAI="openai",v.OPENROUTER="openrouter",v.ANTHROPIC="anthropic",v.AZURE="azure",v.GOOGLE="google",v.ACTIVEPIECES="activepieces",v.CLOUDFLARE_GATEWAY="cloudflare-gateway",v.CUSTOM="custom",v.BEDROCK="bedrock",v.MISTRAL="mistral",v))(vt||{});var qb=a().check(Ae(/^#[0-9A-Fa-f]{6}$/));var Jb=p({filename:a(),data:N(),type:A("file"),mimetype:f(a())});var xc=Me(Vo());var nI=p({...ie,name:a(),permissions:O(a()),platformId:H(a()),type:a(),userCount:f(J())});var Zo=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Zo||{}),$r=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))($r||{}),zr=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(zr||{});var Or=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Or||{});var kr=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(kr||{});var Pc=p({mode:$(Zo),value:N()}),_c=p({auth:f(a()),fields:D(a(),Pc)}),bc=p({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:f(_c)}),Ic=p({type:A("PIECE"),toolName:a().check(ue(1)),pieceMetadata:bc}),Tc=p({type:A("none")}),Ec=p({type:A("access_token"),accessToken:a()}),Ac=p({type:A("api_key"),apiKey:a(),apiKeyHeader:a()}),Sc=p({type:A("headers"),headers:D(a(),a())}),$c=Se("type",[Tc,Ec,Ac,Sc]),Ho=p({type:A("FLOW"),toolName:a().check(ue(1)),externalFlowId:a(),flowDisplayName:f(a())}),Go=p({type:A("MCP"),toolName:a().check(ue(1)),serverUrl:Eo(),protocol:$(zr),auth:$c}),Wo=p({type:A("KNOWLEDGE_BASE"),toolName:a().check(ue(1)),sourceType:$($r),sourceId:a(),sourceName:a()}),zc=Se("type",[Ic,Ho,Go,Wo]),Oc=p({displayName:a(),description:f(a()),type:$(Or)}),qo=p({type:A("MARKDOWN"),markdown:a()}),Ze={type:A("TOOL_CALL"),input:H(D(a(),N())),output:f(N()),toolName:a(),status:$(kr),toolCallId:a(),startTime:a(),endTime:f(a())},NI=p(Ze),Ko=Se("toolCallType",[p({...Ze,toolCallType:A("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),p({...Ze,toolCallType:A("FLOW"),displayName:a(),externalFlowId:a()}),p({...Ze,toolCallType:A("MCP"),displayName:a(),serverUrl:a()}),p({...Ze,toolCallType:A("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),p({...Ze,toolCallType:A("UNKNOWN"),displayName:a()})]),kc=U([qo,Ko]);var Rr=(r=>(r.IMAGE="image",r.TEXT="text",r))(Rr||{}),be=p({apiKey:a()}),Rc=be,wc=p({apiKey:a(),apiKeyHash:a()}),Nc=be,Dc=be,Cc=be,Uc=be,Mc=be,Lc=be,jc=be,ei=p({accessKeyId:a().check(ue(1)),secretAccessKey:a().check(ue(1))}),Fc=p({}),Bc=p({}),Vc=p({}),Zc=p({}),Hc=p({}),Gc=p({}),ti=p({modelId:a(),modelName:a(),modelType:$(Rr)}),ri=p({apiKeyHeader:a(),baseUrl:a(),models:O(ti),defaultHeaders:f(D(a(),a()))}),ni=p({accountId:a(),gatewayId:a(),models:O(ti),vertexProject:f(a()),vertexRegion:f(a())}),oi=p({resourceName:a(),apiVersion:ze($e(e=>typeof e=="string"&&e.trim().length===0?void 0:e),f(a()))}),ii=p({region:a().check(ue(1))}),Wc=U([Rc,Cc,Uc,Mc,Lc,Dc,Nc,wc,ei,jc]),ai=U([ri,ni,oi,ii,Fc,Vc,Zc,Hc,Bc,Gc]),qc=p({id:a(),name:a(),type:$(Rr)}),Kc=p({id:a(),name:a(),provider:$(vt),config:ai,enabledForChat:F()}),Jc=p({provider:$(vt),config:ai,auth:Wc,platformId:a()});var MI={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},Jo=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],Xc=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],Yc=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],Xo=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],Qc=["grok-4.20","grok-4.1-fast"],ep={openai:Jo,anthropic:Xc,google:Xo,activepieces:[...Yc.map(e=>`anthropic/${e}`),...Jo.map(e=>`openai/${e}`),...Xo.map(e=>`google/${e}`),...Qc.map(e=>`x-ai/${e}`)]};var Yo=128e3,tp={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function rp({provider:e}){return e?tp[e]??Yo:Yo}o(rp,"getMaxContextTokens");var Qo={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"},np={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},op=new Set(["anthropic","mistral"]);function me(e){return{chatModels:ep[e],maxContextTokens:rp({provider:e}),defaultEmbeddingModel:Qo[e],supportsEmbedding:Qo[e]!==void 0,supportsImageGeneration:!op.has(e),webSearch:np[e]}}o(me,"buildProviderCapabilities");var ip={openai:me("openai"),anthropic:me("anthropic"),openrouter:me("openrouter"),azure:me("azure"),google:me("google"),"cloudflare-gateway":me("cloudflare-gateway"),custom:me("custom"),bedrock:me("bedrock"),mistral:me("mistral"),activepieces:me("activepieces")};var ap=p({base64Url:a(),fileName:a(),extension:f(a())}),sp=p({mimeType:a(),url:a(),fileName:f(a())}),wr=U([ap,sp]);var up=U([p({type:A("file"),value:wr}),p({type:A("markdown"),value:a(),files:f(O(wr))})]),cp=p({sessionId:a(),message:a(),files:f(O(a()))});var ui=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(ui||{}),ci=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(ci||{}),Nr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Nr||{});var pp=U([p({...ie,name:a(),externalId:a(),type:A("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:p({options:O(p({value:a()}))})}),p({...ie,name:a(),externalId:a(),type:U([A("TEXT"),A("NUMBER"),A("DATE"),A("DATETIME")]),tableId:a(),projectId:a()})]),lp=p({...ie,name:a(),folderId:H(a()),projectId:a(),externalId:a(),status:Sr(ci),trigger:Sr(ui)}),dp=p({...ie,tableId:a(),projectId:a(),cells:D(a(),p({updated:a(),created:a(),value:N(),fieldName:a()}))}),mp=p({events:O($(Nr)),webhookUrl:a(),flowId:a()}),fp=p({fields:O(p({id:a(),name:a()})),rows:O(D(a(),a())),name:a()}),gp=p({projectId:a(),limit:f(st.number()),cursor:f(a()),name:f(a()),externalIds:Vt(a()),folderId:f(a()),folderIds:Vt(a())}),yp=p({records:O(O(p({fieldId:a(),value:li()}))),tableId:a()}),hp=p({cells:f(O(p({fieldId:a(),value:li()}))),tableId:a(),agentUpdate:f(F())}),pi=Se("operator",[Ne("eq"),Ne("neq"),Ne("gt"),Ne("gte"),Ne("lt"),Ne("lte"),Ne("co"),si("exists"),si("not_exists")]),vp=p({tableId:a(),limit:f(st.number()),cursor:f(a()),filters:Vt(pi)});function li(){return ze($e(e=>e==null?e:String(e)),at(a()))}o(li,"coerceToString");function Ne(e){return p({fieldId:a(),operator:A(e),value:a()})}o(Ne,"valueFilter");function si(e){return p({fieldId:a(),operator:A(e)})}o(si,"existenceFilter");var xp=p({status:f(J()),body:f(N()),headers:f(D(a(),a()))}),Pp=p({...ie,deleted:H(ke),ownerId:a(),displayName:a(),platformId:a(),externalId:H(a())});var di=p({name:a(),description:f(a()),type:a(),required:F()}),_p=p({pieceName:a(),triggerName:a(),input:p({toolName:a(),toolDescription:a(),inputSchema:O(di),returnsResponse:F()})});var mi="^[0-9]+\\.[0-9]+\\.[0-9]+$",nT=new RegExp(mi),Ip="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",oT=a().check(Ae(new RegExp(mi))),iT=a().check(Ae(new RegExp(Ip))),Tp=p({packageType:A("ARCHIVE"),pieceType:$(Fe),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),fi=p({packageType:A("REGISTRY"),pieceType:A("OFFICIAL"),pieceName:a(),pieceVersion:a()}),gi=p({packageType:A("REGISTRY"),pieceType:A("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),aT=U([fi,gi]),sT=U([Tp,fi,gi]);var Ep=Se("type",[p({type:A("CRON_EXPRESSION"),cronExpression:a(),timezone:a()}),p({type:A("INTERVAL"),intervalMs:Ao().check(Nt(6e4))})]),uT=p({...ie,type:$(we),projectId:a(),flowId:a(),triggerName:a(),schedule:H(Ep),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:H(a()),simulate:F()}),yi=(m=>(m.UNKNOWN="UNKNOWN",m.FLOW_RUN_LOG="FLOW_RUN_LOG",m.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",m.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",m.FLOW_STEP_FILE="FLOW_STEP_FILE",m.SAMPLE_DATA="SAMPLE_DATA",m.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",m.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",m.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",m.PROJECT_RELEASE="PROJECT_RELEASE",m.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",m.PLATFORM_ASSET="PLATFORM_ASSET",m.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",m.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",m.KNOWLEDGE_BASE="KNOWLEDGE_BASE",m.FLOW_BUNDLE="FLOW_BUNDLE",m))(yi||{}),hi=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(hi||{}),vi=(r=>(r.S3="S3",r.DB="DB",r))(vi||{}),cT=p({...ie,projectId:H(a()),platformId:H(a()),type:$(yi),compression:$(hi),data:f(N()),location:$(vi),size:H(J()),fileName:H(a()),s3Key:H(a()),metadata:H(D(a(),a()))}),xi=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(xi||{}),Pi=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(Pi||{}),pT=p({id:a(),email:a(),firstName:a(),status:$(Pi),externalId:H(a()),platformId:H(a()),platformRole:$(xi),lastName:a(),created:ke,updated:ke,lastActiveDate:H(ke),imageUrl:H(a())});var Dr=p({...j.shape,...C(D(a(),N()),"OBJECT").shape});var Cr=p({...j.shape,formatProperty:f(a()),...C(a(),"RICH_TEXT").shape});var Ti=p({...j.shape,...C(a(),"COLOR").shape});var Ur=U([re,ve,Cr,jt,Pe,ne,xe,br,ut,Tr,_e,lt,Dr,dt,pt,Ir,ct,Ti]),S={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 fe=p({displayName:a(),description:f(a()),hasConnectionIdentifier:f(F())});var Ei=p({username:a(),password:a()}),Mr=p({...fe.shape,username:p({displayName:a(),description:f(a())}),password:p({displayName:a(),description:f(a())}),...C(Ei,"BASIC_AUTH").shape});var zp=D(a(),U([re,ve,_e,Pe,ne])),Lr=p({...fe.shape,props:zp,...C(N(),"CUSTOM_AUTH").shape});var De=p({...fe.shape,...C(p({auth:a()}),"SECRET_TEXT").shape});var Op=D(a(),U([re,ve,De,_e,Pe,ne,xe,jt])),Ai=p({...fe.shape,props:Op,...C(N(),"OIDC").shape});var jr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(jr||{}),Si=U([re,De,ne]),$i=D(a(),Si),kp=p({props:f(D(a(),Si)),authUrl:a(),tokenUrl:a(),scope:O(a()),prompt:f(U([A("none"),A("consent"),A("login"),A("omit")])),pkce:f(F()),pkceMethod:f(U([A("plain"),A("S256")])),authorizationMethod:f($(jr)),grantType:f(U([$(ft),A(Er)])),extra:f(D(a(),a()))}),zi=p({access_token:a(),props:f($i),data:D(a(),it())}),Fr=p({...fe.shape,...kp.shape,...C(zi,"OAUTH2").shape});var He=U([Mr,Lr,Ai,Fr,De]),xt="Connection",Ht={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||xt}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||xt,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||xt}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||xt}},None(){}};var WE={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 Rp=p({...j.shape,...C(N(),"CUSTOM").shape,code:a()});var wp=U([Ur,He]),Br=D(a(),wp),fA=D(a(),Ur);var Oi=U([p({strategy:A("CRON"),cronExpression:a()}),p({strategy:A("NONE")})]);var ki="2",Gt="0.82.0";var Vr=class{constructor(t,r,n,i,u,c,l,y,x=Gt,v,T="",P){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=l;this.auth=y;this.minimumSupportedRelease=x;this.maximumSupportedRelease=v;this.description=T;this.deprecated=P;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:ki}),"getContextInfo");(!Dp(x)||Cp(x,Gt))&&(this.minimumSupportedRelease=Gt),u.forEach(s=>this._actions[s.name]=s),c.forEach(s=>this._triggers[s.name]=s)}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:Np(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}},wi=o(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,i)=>n===i.findIndex(u=>u.type===r.type)))throw new Error("Auth properties must be unique by type");return new Vr(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 Np(e){if(e!==void 0)return Array.isArray(e)?e.map(Ri):Ri(e)}o(Np,"withConnectionIdentifierFlag");function Ri(e){return{...e,hasConnectionIdentifier:e.getConnectionIdentifier!==void 0}}o(Ri,"flagConnectionIdentifier");function Dp(e){return/^\d+\.\d+\.\d+$/.test(e)}o(Dp,"isValidSimpleSemver");function Cp(e,t){let[r,n,i]=e.split(".").map(Number),[u,c,l]=t.split(".").map(Number);return r!==u?r<u:n!==c?n<c:i<l}o(Cp,"isSemverLessThan");var Up=f(D(a(),D(a(),a()))),Ni=p({id:f(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:O(a()),platformId:f(a()),directoryPath:f(a()),auth:f(U([He,O(He)])),version:a(),categories:f(O($(Be))),minimumSupportedRelease:f(a()),maximumSupportedRelease:f(a()),deprecated:f(F()),i18n:Up}),Mp=$(["human","ai","both"]),Di=p({description:f(a()),idempotent:f(F())}),Ci=$(["READ","SEARCH","WRITE","DESTRUCTIVE"]);var Lp=$(["tabs","section","summary","builder","footer"]),Ui=p({key:a(),display:Lp,label:f(a()),description:f(a()),icon:f(a()),props:O(a())}),Mi=p({name:a(),displayName:a(),description:a(),props:Br,propertyGroups:f(O(Ui)),requireAuth:F(),errorHandlingOptions:f(_r),outputSchema:f(Mt()),audience:f(Mp),aiMetadata:f(Di),classification:f(Ci)}),Li=p({name:a(),displayName:a(),description:a(),props:Br,propertyGroups:f(O(Ui)),errorHandlingOptions:f(_r),type:$(we),sampleData:N(),handshakeConfiguration:f(Mt()),renewConfiguration:f(Oi),testStrategy:$(yt),outputSchema:f(Mt()),aiMetadata:f(Di),classification:f(Ci)}),jp=p({...Ni.shape,actions:D(a(),Mi),triggers:D(a(),Li)}),Fp=p({...Ni.shape,actions:J(),triggers:J(),suggestedActions:f(O(Mi)),suggestedTriggers:f(O(Li))}),ji=p({projectUsage:J(),pieceType:$(Fe),packageType:$(mt),platformId:f(a()),archiveId:f(a())}),yS=p({...jp.shape,...ji.shape}),hS=p({...Fp.shape,...ji.shape}),vS=p({name:a(),version:a()});var Bp=Me(require("path")),Vp=Me(require("fs/promises"));var Ge=require("node:stream");var Wt=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{o(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,i=new URLSearchParams;return r.searchParams.forEach((u,c)=>{i.append(c,u)}),{urlWithoutQueryParams:n,queryParams:i}}getHeaders(t){let r={Accept:"application/json"};return t.authentication&&this.populateAuthentication(t.authentication,r),t.body&&(t.headers?.["Content-Type"]==="text/csv"?r["Content-Type"]="text/csv":r["Content-Type"]="application/json"),t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var qt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new Zr,r=new Hr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Zr=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Hr=class{static{o(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,i=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${i}`,r}};var Ce=class extends Error{constructor(r,n){let i=n.status||500,u=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:i,body:u},request:{body:r}}));this.requestBody=r;this.status=i,this.responseBody=u}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 Fi({error:e,requestBody:t}){return e instanceof Ce?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}o(Fi,"toFailsafeOutput");var ge=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(ge||{});var Kt=class extends Wt{static{o(this,"FetchHttpClient")}constructor(t="",r=new qt){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(t),u=this.getHeaders(t),c=t.queryParams??{};for(let[M,ee]of Object.entries(c))i.append(M,ee);let l=i.toString(),y=l?`${n}?${l}`:n,x=t.responseType??"json",v=t.followRedirects??!0,T=t.retries??0,{body:P,extraHeaders:s,isStream:d}=Zp(t.method)?Hp(t.body,u):{body:void 0,extraHeaders:{},isStream:!1},g=Wp({...u,...s}),m=await Gp(async()=>{let M=new AbortController,ee=t.timeout&&t.timeout>0?setTimeout(()=>M.abort(),t.timeout):void 0;try{let ae={method:t.method.toString(),headers:g,body:P,redirect:v?"follow":"manual",signal:M.signal};return d&&(ae.duplex="half"),r?.dispatcher!==void 0&&(ae.dispatcher=r.dispatcher),await fetch(y,ae)}finally{ee!==void 0&&clearTimeout(ee)}},d?0:T),h=v?300:400;if(m.status<200||m.status>=h){let M=await Bi(m,x==="stream"?"text":x),ee=new Ce(t.body,{status:m.status,responseBody:M});throw console.error("[HttpClient#(sanitized error message)] Request failed:",ee),ee}let _=await Bi(m,x);return{status:m.status,headers:qp(m.headers),body:_}}};function Zp(e){return e!=="GET"&&e!=="HEAD"}o(Zp,"acceptsRequestBody");function Hp(e,t){if(Zi(e))return{body:void 0,extraHeaders:{},isStream:!1};if(Kp(e)){let n=new Ge.PassThrough;return e.on("error",i=>n.destroy(i)),e.pipe(n),{body:n,extraHeaders:e.getHeaders(),isStream:!0}}return e instanceof Ge.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}}o(Hp,"serializeBody");async function Bi(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"stream":return Zi(e.body)?Ge.Readable.from([]):Ge.Readable.fromWeb(e.body);case"blob":return await e.blob();case"text":return await e.text();default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}o(Bi,"parseResponseBody");async function Gp(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await Vi(n);continue}return i}catch(i){if(r=i,n<t){await Vi(n);continue}throw i}throw r}o(Gp,"sendWithRetries");function Vi(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(Vi,"backoff");function Wp(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r.toLowerCase()]=Array.isArray(n)?n.join(", "):n);return t}o(Wp,"normalizeHeaders");function qp(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(qp,"toHttpHeaders");function Kp(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}o(Kp,"isNodeFormData");function Zi(e){return e==null}o(Zi,"isNil");var X=new Kt;var Cd=Me(require("fs")),Js=Me(Ks());var Ud={"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 Md(e){let t=e.split(";")[0].trim().toLowerCase();return Ud[t]??""}o(Md,"contentTypeToExtension");var Ld=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),jd=o((e,t)=>{let r="https://api.example.com";try{let n=t?e(t):void 0;return(n?.endsWith("/")?n.slice(0,-1):n)??r}catch{return r}},"getBaseUrlForDescription");function Xs({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:l,authLocation:y="headers",classification:x="WRITE"}){return oe({audience:"human",name:u||"custom_api_call",classification:x,displayName:i||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:S.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:v})=>({url:S.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
|
|
3
|
+
i.e ${jd(t,v)}/resource or /resource`,required:!0,defaultValue:v?t(v):"",...c?.url??{}})}),"props")}),method:S.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(ge).map(v=>({label:v,value:v}))},...c?.method??{}}),headers:S.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:S.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:S.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:S.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:v})=>{if(!v)return{};let T=v,P={};switch(T){case"none":break;case"json":P.data=S.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":P.data=S.LongText({displayName:"Raw Body",required:!0});break;case"form_data":P.data=S.Array({displayName:"Form Data",required:!0,properties:{fieldName:S.ShortText({displayName:"Field Name",required:!0}),fieldType:S.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:S.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:S.File({displayName:"File Field Value",required:!1})}});break}return P},"props")}),response_is_binary:S.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:S.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:S.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:S.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...l},run:o(async v=>{let{method:T,url:P,headers:s,queryParams:d,body:g,body_type:m,failsafe:h,timeout:_,response_is_binary:M,followRedirects:ee}=v.propsValue;Bt(T,"Method"),Bt(P,"URL");let ae=ce(r)?{}:await r(v.auth,v.propsValue),le=P.url,Ye=le.startsWith("http://")||le.startsWith("https://")?le:Ld({baseUrl:t(v.auth),relativePath:le}),se={method:T,url:Ye,headers:{...s??{},...y==="headers"||!ce(y)?ae:{}},queryParams:{...y==="queryParams"?ae:{},...d??{}},timeout:_?_*1e3:0,followRedirects:ee};if(M&&(se.responseType="arraybuffer"),g)if(m&&m!=="none"){let ye=g.data;if(m==="form_data"){let au=ye,It=new Js.default;for(let{fieldName:mn,fieldType:fn,textFieldValue:gn,fileFieldValue:ir}of au)fn==="text"&&!ht(gn)?It.append(mn,gn):fn==="file"&&!ht(ir)&&It.append(mn,ir.data,{filename:ir?.filename});se.body=It,se.headers={...se.headers,...It.getHeaders()}}else se.body=ye}else m||(se.body=g);try{let ye=await X.sendRequest(se);return await Fd(v.files,ye.body,ye.status,ye.headers,M)}catch(ye){if(h)return Fi({error:ye,requestBody:se.body});throw ye}},"run")})}o(Xs,"createCustomApiCallAction");var Fd=o(async(e,t,r,n,i)=>{let u;if(i&&Bd(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],l=Md(c??"")||"txt",y;t instanceof ArrayBuffer?y=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?y=t:y=Buffer.from(t),u=await e.write({fileName:`output.${l}`,data:y})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),Bd=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var Vd=`
|
|
4
4
|
Follow these steps to get your Alai API Key:
|
|
5
5
|
|
|
6
6
|
1. Go to [**https://getalai.com/api**](https://getalai.com/api) and sign up or log in.
|
|
7
7
|
2. Navigate to the **API Keys** section.
|
|
8
8
|
3. Click **Create API Key** and give it a name (e.g., "Activepieces").
|
|
9
9
|
4. Copy the key and paste it below.
|
|
10
|
-
`,ee=Zt.CustomAuth({description:wd,required:!0,props:{apiKey:Zt.SecretText({displayName:"API Key",description:"Paste your API key here.",required:!0})},async validate(e){let t=e.auth.apiKey;try{return await J.sendRequest({method:"GET",url:"https://slides-api.getalai.com/api/v1/ping",headers:{Authorization:`Bearer ${t}`}}),{valid:!0}}catch(r){return r instanceof Ce&&r.response.status===401?{valid:!1,error:"Invalid API Key"}:{valid:!1,error:"Failed to connect to Alai API"}}}});var Zs=o(e=>new Promise(t=>setTimeout(t,e)),"sleep"),Vs=se({auth:ee,name:"generatePresentation",displayName:"Generate Presentation",description:"Create a new AI-generated presentation from text.",audience:"both",aiMetadata:{description:"Generate a brand-new presentation from input text via the Alai AI API, with optional controls for tone, slide count, text density, theme, and AI images. Use this to turn raw text into slides. By default it returns immediately with a generation_id (poll Get Generation for status); set Wait for Completion to block until the deck finishes (up to Max Wait Time). Not idempotent: each call starts a new generation.",idempotent:!1},props:{inputText:S.LongText({displayName:"Input Text",description:"The text content to generate a presentation from.",required:!0}),additionalInstructions:S.LongText({displayName:"Additional Instructions",description:"Extra instructions for how the presentation should be generated.",required:!1}),exportFormats:S.StaticMultiSelectDropdown({displayName:"Export Formats",description:"Formats to export the presentation in after generation.",required:!1,options:{options:[{label:"Link",value:"link"},{label:"PDF",value:"pdf"},{label:"PowerPoint (PPTX)",value:"ppt"}]}}),title:S.ShortText({displayName:"Title",description:"A title for the presentation. If not provided, one will be generated.",required:!1}),themeId:S.ShortText({displayName:"Theme ID",description:"The ID of the presentation theme to use. If not provided, a default theme will be applied.",required:!1}),slideRange:S.ShortText({displayName:"Slide Range",description:"Target slide count: auto, 1, 2-5, 6-10, 11-15, 16-20, 21-25, 26-50.",required:!1}),tone:S.StaticDropdown({displayName:"Tone",description:"The tone of voice for the presentation content.",required:!1,options:{options:[{label:"Default",value:"DEFAULT"},{label:"Professional",value:"PROFESSIONAL"},{label:"Casual",value:"CASUAL"},{label:"Technical",value:"TECHNICAL"},{label:"Educational",value:"EDUCATIONAL"},{label:"Inspirational",value:"INSPIRATIONAL"},{label:"Narrative",value:"NARRATIVE"},{label:"Persuasive",value:"PERSUASIVE"},{label:"Authoritative",value:"AUTHORITATIVE"},{label:"Empathetic",value:"EMPATHETIC"}]}}),contentMode:S.StaticDropdown({displayName:"Content Mode",description:"How the input text should be handled.",required:!1,options:{options:[{label:"Preserve",value:"PRESERVE"},{label:"Condense",value:"CONDENSE"},{label:"Enhance",value:"ENHANCE"},{label:"Custom",value:"CUSTOM"}]}}),amountMode:S.StaticDropdown({displayName:"Text Density",description:"The amount of text to include per slide.",required:!1,options:{options:[{label:"Minimal",value:"MINIMAL"},{label:"Essential",value:"ESSENTIAL"},{label:"Balanced",value:"BALANCED"},{label:"Detailed",value:"DETAILED"}]}}),includeAiImages:S.Checkbox({displayName:"Include AI Images",description:"Whether to include AI-generated images in the presentation.",required:!1,defaultValue:!0}),imageStyle:S.StaticDropdown({displayName:"Image Style",description:"The style for AI-generated images.",required:!1,options:{options:[{label:"Auto",value:"auto"},{label:"Realistic",value:"realistic"},{label:"Artistic",value:"artistic"},{label:"Cartoon",value:"cartoon"},{label:"3D",value:"three_d"}]}}),waitForCompletion:S.Checkbox({displayName:"Wait for Completion",description:"Wait for the presentation generation to complete before returning.",required:!1,defaultValue:!1}),maxWaitTime:S.Number({displayName:"Max Wait Time (seconds)",description:"Maximum time to wait for completion (default 300 seconds / 5 minutes).",required:!1,defaultValue:300})},async run(e){let{inputText:t,additionalInstructions:r,exportFormats:n,title:i,themeId:u,slideRange:c,tone:l,contentMode:g,amountMode:h,includeAiImages:x,imageStyle:I,waitForCompletion:P,maxWaitTime:s}=e.propsValue,d={input_text:t};r&&(d.additional_instructions=r),n&&n.length>0?d.export_formats=n:d.export_formats=["link"];let f={};i&&(f.title=i),u&&(f.theme_id=u),c&&(f.slide_range=c),Object.keys(f).length>0&&(d.presentation_options=f);let m={};l&&(m.tone=l),g&&(m.content_mode=g),h&&(m.amount_mode=h),Object.keys(m).length>0&&(d.text_options=m);let v={};x!=null&&(v.include_ai_images=x),I&&(v.style=I),Object.keys(v).length>0&&(d.image_options=v);let _=await J.sendRequest({method:"POST",url:"https://slides-api.getalai.com/api/v1/generations",headers:{Authorization:`Bearer ${e.auth.props.apiKey}`,"Content-Type":"application/json"},body:d}),M=_.body?.generation_id;if(!M)throw new Error(`Failed to get generation_id from response: ${JSON.stringify(_.body)}`);if(!P)return _.body;await Zs(1e3);let Y=(s||300)*1e3,re=Date.now(),ke=5e3;for(;Date.now()-re<Y;){let ie=await J.sendRequest({method:"GET",url:`https://slides-api.getalai.com/api/v1/generations/${M}`,headers:{Authorization:`Bearer ${e.auth.props.apiKey}`}}),ae=ie.body?.status;if(ae==="completed")return ie.body;if(ae==="failed")throw new Error(`Generation failed: ${ie.body?.error||"Unknown error"}`);await Zs(ke)}throw new Error(`Generation timed out after ${s||300} seconds`)}});var Hs=se({auth:ee,name:"getGeneration",displayName:"Get Generation",description:"Fetch the status and result of a generation job.",audience:"both",aiMetadata:{description:"Look up the current status and result of an Alai generation job by its generation_id (returned by Generate Presentation or Export Presentation). Use this to poll for completion or retrieve the finished output and export links. Read-only and idempotent. Requires a valid generation_id.",idempotent:!0},props:{generationId:S.ShortText({displayName:"Generation ID",description:'The ID of the generation job (from the "Generate Presentation" action).',required:!0})},async run(e){let{generationId:t}=e.propsValue;return(await J.sendRequest({method:"GET",url:`https://slides-api.getalai.com/api/v1/generations/${t}`,headers:{Authorization:`Bearer ${e.auth.props.apiKey}`,Accept:"application/json"}})).body}});var Gs=o(e=>new Promise(t=>setTimeout(t,e)),"sleep"),Ws=se({auth:ee,name:"exportPresentation",displayName:"Export Presentation",description:"Export a presentation in the specified formats.",audience:"both",aiMetadata:{description:"Export an existing Alai presentation into one or more formats (link, PDF, and/or PPTX) by its presentation ID. Use this to render a deck for download or sharing. By default it returns immediately with a generation_id (poll Get Generation for status); set Wait for Completion to block until the export finishes (up to Max Wait Time). Not idempotent: each call kicks off a new export job. Requires the presentation ID and at least one export format.",idempotent:!1},props:{presentationId:S.ShortText({displayName:"Presentation ID",description:"The ID of the presentation to export.",required:!0}),exportFormats:S.StaticMultiSelectDropdown({displayName:"Export Formats",description:"Formats to export the presentation in.",required:!0,options:{options:[{label:"Link",value:"link"},{label:"PDF",value:"pdf"},{label:"PowerPoint (PPTX)",value:"ppt"}]}}),waitForCompletion:S.Checkbox({displayName:"Wait for Completion",description:"Wait for the presentation generation to complete before returning.",required:!1,defaultValue:!1}),maxWaitTime:S.Number({displayName:"Max Wait Time (seconds)",description:"Maximum time to wait for completion (default 300 seconds / 5 minutes).",required:!1,defaultValue:300})},async run(e){let{presentationId:t,exportFormats:r,waitForCompletion:n,maxWaitTime:i}=e.propsValue,u=await J.sendRequest({method:"POST",url:`https://slides-api.getalai.com/api/v1/presentations/${t}/exports`,headers:{Authorization:`Bearer ${e.auth.props.apiKey}`,"Content-Type":"application/json"},body:{export_formats:r}}),c=u.body?.generation_id;if(!c)throw new Error(`Failed to get generation_id from response: ${JSON.stringify(u.body)}`);if(!n)return u.body;await Gs(1e3);let l=(i||300)*1e3,g=Date.now(),h=5e3;for(;Date.now()-g<l;){let x=await J.sendRequest({method:"GET",url:`https://slides-api.getalai.com/api/v1/generations/${c}`,headers:{Authorization:`Bearer ${e.auth.props.apiKey}`}}),I=x.body?.status;if(I==="completed")return x.body;if(I==="failed")throw new Error(`Generation failed: ${x.body?.error||"Unknown error"}`);await Gs(h)}throw new Error(`Generation timed out after ${i||300} seconds`)}});var qs=S.Dropdown({auth:ee,displayName:"Presentation",description:"Select a presentation",required:!0,refreshers:[],options:o(async({auth:e})=>{if(!e)return{options:[]};let r=(await J.sendRequest({method:"GET",url:"https://slides-api.getalai.com/api/v1/presentations",headers:{Authorization:`Bearer ${e.props.apiKey}`,Accept:"application/json"}})).body?.presentations||[];return{disabled:r.length===0,options:r.map(n=>({label:n.title,value:n.presentation_id}))}},"options")});var Ks=se({auth:ee,name:"addSlide",displayName:"Add Slide",description:"Add a new slide to an existing presentation.",audience:"both",aiMetadata:{description:'Generate and insert a new AI-authored slide into an existing Alai presentation, given the presentation ID and the slide content/topic; optional slide order controls where it lands (a numeric index, or "end" to append). Use this to extend a deck after it has been generated. Not idempotent: each call appends another slide.',idempotent:!1},props:{presentationId:qs,slide_context:S.LongText({displayName:"Slide Context",description:"The content or topic for the slide to be generated.",required:!0}),additionalInstructions:S.LongText({displayName:"Additional Instructions",description:"Extra instructions for how the slide should be generated.",required:!1}),slide_order:S.ShortText({displayName:"Slide Order",description:'The position to insert the new slide (e.g., "0" for the first slide, "end" to add at the end).',required:!1}),includeAiImages:S.Checkbox({displayName:"Include AI Images",description:"Whether to include AI-generated images in the slide.",required:!1,defaultValue:!0}),imageStyle:S.ShortText({displayName:"Image Style",description:"The style for AI-generated images.",required:!1})},async run(e){let{presentationId:t,slide_context:r,additionalInstructions:n,slide_order:i,includeAiImages:u,imageStyle:c}=e.propsValue,l={};n&&(l.additional_instructions=n),i&&(l.slide_order=isNaN(Number(i))?i:Number(i)),u?l.num_image_variants=c?2:1:l.num_image_variants=0;let g={slide_context:r,options:l,export_formats:["link"]};return(await J.sendRequest({method:"POST",url:`https://slides-api.getalai.com/api/v1/presentations/${t}/slides`,headers:{Authorization:`Bearer ${e.auth.props.apiKey}`,"Content-Type":"application/json"},body:g})).body}});var Js=se({auth:ee,name:"deletePresentation",displayName:"Delete Presentation",description:"Delete a presentation by its ID.",audience:"both",aiMetadata:{description:"Permanently delete an Alai presentation by its ID. Use this to remove a deck the user no longer needs. Destructive but idempotent: once deleted, repeating the call with the same ID leaves the same end state. Requires the presentation ID.",idempotent:!0},props:{presentationId:S.ShortText({displayName:"Presentation ID",description:"The ID of the presentation to delete.",required:!0})},async run(e){let{presentationId:t}=e.propsValue;return(await J.sendRequest({method:"DELETE",url:`https://slides-api.getalai.com/api/v1/presentations/${t}`,headers:{Authorization:`Bearer ${e.auth.props.apiKey}`}})).body}});var Rd=$i({displayName:"Alai",auth:ee,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/alai.png",authors:["getalai","sanket-a11y"],description:"AI-powered presentation generation API. Create, export, and manage professional presentations from text.",categories:["CONTENT_AND_FILES","ARTIFICIAL_INTELLIGENCE"],actions:[Vs,Hs,Ws,Ks,Js,Bs({auth:ee,baseUrl:o(()=>"https://slides-api.getalai.com/api/v1","baseUrl"),authMapping:o(async e=>({Authorization:`Bearer ${e.props.apiKey}`}),"authMapping")})],triggers:[]});0&&(module.exports={alai});
|
|
10
|
+
`,Q=Ht.CustomAuth({description:Vd,required:!0,props:{apiKey:Ht.SecretText({displayName:"API Key",description:"Paste your API key here.",required:!0})},async validate(e){let t=e.auth.apiKey;try{return await X.sendRequest({method:"GET",url:"https://slides-api.getalai.com/api/v1/ping",headers:{Authorization:`Bearer ${t}`}}),{valid:!0}}catch(r){return r instanceof Ce&&r.response.status===401?{valid:!1,error:"Invalid API Key"}:{valid:!1,error:"Failed to connect to Alai API"}}}});var Ys=o(e=>new Promise(t=>setTimeout(t,e)),"sleep"),Qs=oe({auth:Q,name:"generatePresentation",classification:"WRITE",displayName:"Generate Presentation",description:"Create a new AI-generated presentation from text.",audience:"both",aiMetadata:{description:"Generate a brand-new presentation from input text via the Alai AI API, with optional controls for tone, slide count, text density, theme, and AI images. Use this to turn raw text into slides. By default it returns immediately with a generation_id (poll Get Generation for status); set Wait for Completion to block until the deck finishes (up to Max Wait Time). Not idempotent: each call starts a new generation.",idempotent:!1},props:{inputText:S.LongText({displayName:"Input Text",description:"The text content to generate a presentation from.",required:!0}),additionalInstructions:S.LongText({displayName:"Additional Instructions",description:"Extra instructions for how the presentation should be generated.",required:!1}),exportFormats:S.StaticMultiSelectDropdown({displayName:"Export Formats",description:"Formats to export the presentation in after generation.",required:!1,options:{options:[{label:"Link",value:"link"},{label:"PDF",value:"pdf"},{label:"PowerPoint (PPTX)",value:"ppt"}]}}),title:S.ShortText({displayName:"Title",description:"A title for the presentation. If not provided, one will be generated.",required:!1}),themeId:S.ShortText({displayName:"Theme ID",description:"The ID of the presentation theme to use. If not provided, a default theme will be applied.",required:!1}),slideRange:S.ShortText({displayName:"Slide Range",description:"Target slide count: auto, 1, 2-5, 6-10, 11-15, 16-20, 21-25, 26-50.",required:!1}),tone:S.StaticDropdown({displayName:"Tone",description:"The tone of voice for the presentation content.",required:!1,options:{options:[{label:"Default",value:"DEFAULT"},{label:"Professional",value:"PROFESSIONAL"},{label:"Casual",value:"CASUAL"},{label:"Technical",value:"TECHNICAL"},{label:"Educational",value:"EDUCATIONAL"},{label:"Inspirational",value:"INSPIRATIONAL"},{label:"Narrative",value:"NARRATIVE"},{label:"Persuasive",value:"PERSUASIVE"},{label:"Authoritative",value:"AUTHORITATIVE"},{label:"Empathetic",value:"EMPATHETIC"}]}}),contentMode:S.StaticDropdown({displayName:"Content Mode",description:"How the input text should be handled.",required:!1,options:{options:[{label:"Preserve",value:"PRESERVE"},{label:"Condense",value:"CONDENSE"},{label:"Enhance",value:"ENHANCE"},{label:"Custom",value:"CUSTOM"}]}}),amountMode:S.StaticDropdown({displayName:"Text Density",description:"The amount of text to include per slide.",required:!1,options:{options:[{label:"Minimal",value:"MINIMAL"},{label:"Essential",value:"ESSENTIAL"},{label:"Balanced",value:"BALANCED"},{label:"Detailed",value:"DETAILED"}]}}),includeAiImages:S.Checkbox({displayName:"Include AI Images",description:"Whether to include AI-generated images in the presentation.",required:!1,defaultValue:!0}),imageStyle:S.StaticDropdown({displayName:"Image Style",description:"The style for AI-generated images.",required:!1,options:{options:[{label:"Auto",value:"auto"},{label:"Realistic",value:"realistic"},{label:"Artistic",value:"artistic"},{label:"Cartoon",value:"cartoon"},{label:"3D",value:"three_d"}]}}),waitForCompletion:S.Checkbox({displayName:"Wait for Completion",description:"Wait for the presentation generation to complete before returning.",required:!1,defaultValue:!1}),maxWaitTime:S.Number({displayName:"Max Wait Time (seconds)",description:"Maximum time to wait for completion (default 300 seconds / 5 minutes).",required:!1,defaultValue:300})},async run(e){let{inputText:t,additionalInstructions:r,exportFormats:n,title:i,themeId:u,slideRange:c,tone:l,contentMode:y,amountMode:x,includeAiImages:v,imageStyle:T,waitForCompletion:P,maxWaitTime:s}=e.propsValue,d={input_text:t};r&&(d.additional_instructions=r),n&&n.length>0?d.export_formats=n:d.export_formats=["link"];let g={};i&&(g.title=i),u&&(g.theme_id=u),c&&(g.slide_range=c),Object.keys(g).length>0&&(d.presentation_options=g);let m={};l&&(m.tone=l),y&&(m.content_mode=y),x&&(m.amount_mode=x),Object.keys(m).length>0&&(d.text_options=m);let h={};v!=null&&(h.include_ai_images=v),T&&(h.style=T),Object.keys(h).length>0&&(d.image_options=h);let _=await X.sendRequest({method:"POST",url:"https://slides-api.getalai.com/api/v1/generations",headers:{Authorization:`Bearer ${e.auth.props.apiKey}`,"Content-Type":"application/json"},body:d}),M=_.body?.generation_id;if(!M)throw new Error(`Failed to get generation_id from response: ${JSON.stringify(_.body)}`);if(!P)return _.body;await Ys(1e3);let ee=(s||300)*1e3,ae=Date.now(),le=5e3;for(;Date.now()-ae<ee;){let Ye=await X.sendRequest({method:"GET",url:`https://slides-api.getalai.com/api/v1/generations/${M}`,headers:{Authorization:`Bearer ${e.auth.props.apiKey}`}}),se=Ye.body?.status;if(se==="completed")return Ye.body;if(se==="failed")throw new Error(`Generation failed: ${Ye.body?.error||"Unknown error"}`);await Ys(le)}throw new Error(`Generation timed out after ${s||300} seconds`)}});var eu=oe({auth:Q,name:"getGeneration",classification:"READ",displayName:"Get Generation",description:"Fetch the status and result of a generation job.",audience:"both",aiMetadata:{description:"Look up the current status and result of an Alai generation job by its generation_id (returned by Generate Presentation or Export Presentation). Use this to poll for completion or retrieve the finished output and export links. Read-only and idempotent. Requires a valid generation_id.",idempotent:!0},props:{generationId:S.ShortText({displayName:"Generation ID",description:'The ID of the generation job (from the "Generate Presentation" action).',required:!0})},async run(e){let{generationId:t}=e.propsValue;return(await X.sendRequest({method:"GET",url:`https://slides-api.getalai.com/api/v1/generations/${t}`,headers:{Authorization:`Bearer ${e.auth.props.apiKey}`,Accept:"application/json"}})).body}});var tu=o(e=>new Promise(t=>setTimeout(t,e)),"sleep"),ru=oe({auth:Q,name:"exportPresentation",classification:"WRITE",displayName:"Export Presentation",description:"Export a presentation in the specified formats.",audience:"both",aiMetadata:{description:"Export an existing Alai presentation into one or more formats (link, PDF, and/or PPTX) by its presentation ID. Use this to render a deck for download or sharing. By default it returns immediately with a generation_id (poll Get Generation for status); set Wait for Completion to block until the export finishes (up to Max Wait Time). Not idempotent: each call kicks off a new export job. Requires the presentation ID and at least one export format.",idempotent:!1},props:{presentationId:S.ShortText({displayName:"Presentation ID",description:"The ID of the presentation to export.",required:!0}),exportFormats:S.StaticMultiSelectDropdown({displayName:"Export Formats",description:"Formats to export the presentation in.",required:!0,options:{options:[{label:"Link",value:"link"},{label:"PDF",value:"pdf"},{label:"PowerPoint (PPTX)",value:"ppt"}]}}),waitForCompletion:S.Checkbox({displayName:"Wait for Completion",description:"Wait for the presentation generation to complete before returning.",required:!1,defaultValue:!1}),maxWaitTime:S.Number({displayName:"Max Wait Time (seconds)",description:"Maximum time to wait for completion (default 300 seconds / 5 minutes).",required:!1,defaultValue:300})},async run(e){let{presentationId:t,exportFormats:r,waitForCompletion:n,maxWaitTime:i}=e.propsValue,u=await X.sendRequest({method:"POST",url:`https://slides-api.getalai.com/api/v1/presentations/${t}/exports`,headers:{Authorization:`Bearer ${e.auth.props.apiKey}`,"Content-Type":"application/json"},body:{export_formats:r}}),c=u.body?.generation_id;if(!c)throw new Error(`Failed to get generation_id from response: ${JSON.stringify(u.body)}`);if(!n)return u.body;await tu(1e3);let l=(i||300)*1e3,y=Date.now(),x=5e3;for(;Date.now()-y<l;){let v=await X.sendRequest({method:"GET",url:`https://slides-api.getalai.com/api/v1/generations/${c}`,headers:{Authorization:`Bearer ${e.auth.props.apiKey}`}}),T=v.body?.status;if(T==="completed")return v.body;if(T==="failed")throw new Error(`Generation failed: ${v.body?.error||"Unknown error"}`);await tu(x)}throw new Error(`Generation timed out after ${i||300} seconds`)}});var nu=S.Dropdown({auth:Q,displayName:"Presentation",description:"Select a presentation",required:!0,refreshers:[],options:o(async({auth:e})=>{if(!e)return{options:[]};let r=(await X.sendRequest({method:"GET",url:"https://slides-api.getalai.com/api/v1/presentations",headers:{Authorization:`Bearer ${e.props.apiKey}`,Accept:"application/json"}})).body?.presentations||[];return{disabled:r.length===0,options:r.map(n=>({label:n.title,value:n.presentation_id}))}},"options")});var ou=oe({auth:Q,name:"addSlide",classification:"WRITE",displayName:"Add Slide",description:"Add a new slide to an existing presentation.",audience:"both",aiMetadata:{description:'Generate and insert a new AI-authored slide into an existing Alai presentation, given the presentation ID and the slide content/topic; optional slide order controls where it lands (a numeric index, or "end" to append). Use this to extend a deck after it has been generated. Not idempotent: each call appends another slide.',idempotent:!1},props:{presentationId:nu,slide_context:S.LongText({displayName:"Slide Context",description:"The content or topic for the slide to be generated.",required:!0}),additionalInstructions:S.LongText({displayName:"Additional Instructions",description:"Extra instructions for how the slide should be generated.",required:!1}),slide_order:S.ShortText({displayName:"Slide Order",description:'The position to insert the new slide (e.g., "0" for the first slide, "end" to add at the end).',required:!1}),includeAiImages:S.Checkbox({displayName:"Include AI Images",description:"Whether to include AI-generated images in the slide.",required:!1,defaultValue:!0}),imageStyle:S.ShortText({displayName:"Image Style",description:"The style for AI-generated images.",required:!1})},async run(e){let{presentationId:t,slide_context:r,additionalInstructions:n,slide_order:i,includeAiImages:u,imageStyle:c}=e.propsValue,l={};n&&(l.additional_instructions=n),i&&(l.slide_order=isNaN(Number(i))?i:Number(i)),u?l.num_image_variants=c?2:1:l.num_image_variants=0;let y={slide_context:r,options:l,export_formats:["link"]};return(await X.sendRequest({method:"POST",url:`https://slides-api.getalai.com/api/v1/presentations/${t}/slides`,headers:{Authorization:`Bearer ${e.auth.props.apiKey}`,"Content-Type":"application/json"},body:y})).body}});var iu=oe({auth:Q,name:"deletePresentation",classification:"DESTRUCTIVE",displayName:"Delete Presentation",description:"Delete a presentation by its ID.",audience:"both",aiMetadata:{description:"Permanently delete an Alai presentation by its ID. Use this to remove a deck the user no longer needs. Destructive but idempotent: once deleted, repeating the call with the same ID leaves the same end state. Requires the presentation ID.",idempotent:!0},props:{presentationId:S.ShortText({displayName:"Presentation ID",description:"The ID of the presentation to delete.",required:!0})},async run(e){let{presentationId:t}=e.propsValue;return(await X.sendRequest({method:"DELETE",url:`https://slides-api.getalai.com/api/v1/presentations/${t}`,headers:{Authorization:`Bearer ${e.auth.props.apiKey}`}})).body}});var Zd=wi({displayName:"Alai",auth:Q,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/alai.png",authors:["getalai","sanket-a11y"],description:"AI-powered presentation generation API. Create, export, and manage professional presentations from text.",categories:["CONTENT_AND_FILES","ARTIFICIAL_INTELLIGENCE"],actions:[Qs,eu,ru,ou,iu,Xs({auth:Q,baseUrl:o(()=>"https://slides-api.getalai.com/api/v1","baseUrl"),authMapping:o(async e=>({Authorization:`Bearer ${e.props.apiKey}`}),"authMapping")})],triggers:[]});0&&(module.exports={alai});
|
|
11
11
|
/*! Bundled license information:
|
|
12
12
|
|
|
13
13
|
mime-types/index.js:
|