@activepieces/piece-alai 0.1.4 → 0.1.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@activepieces/piece-alai",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
6
  "dependencies": {},
package/src/index.js CHANGED
@@ -1,13 +1,13 @@
1
- "use strict";var Ms=Object.create;var Je=Object.defineProperty;var js=Object.getOwnPropertyDescriptor;var Ls=Object.getOwnPropertyNames;var Fs=Object.getPrototypeOf,Bs=Object.prototype.hasOwnProperty;var o=(e,t)=>Je(e,"name",{value:t,configurable:!0});var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),cn=(e,t)=>{for(var r in t)Je(e,r,{get:t[r],enumerable:!0})},pn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ls(t))!Bs.call(e,i)&&i!==r&&Je(e,i,{get:()=>t[i],enumerable:!(n=js(t,i))||n.enumerable});return e};var Ne=(e,t,r)=>(r=e!=null?Ms(Fs(e)):{},pn(t||!e||!e.__esModule?Je(r,"default",{value:e,enumerable:!0}):r,e)),Zs=e=>pn(Je({},"__esModule",{value:!0}),e);var Ao=E((So,jt)=>{(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]+::?)+",d={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,l){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let f=0,m=-1,v=(s.match(d.zoneIndex)||[])[0],P,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>l)return null;for(M=l-f,P=":";M--;)P+="0:";return s=s.replace("::",P),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),l=function(){let Y=s.split(":"),re=[];for(let Ae=0;Ae<Y.length;Ae++)re.push(parseInt(Y[Ae],16));return re}(),{parts:l,zoneId:v}}o(g,"expandIPv6");function y(s,l,f,m){if(s.length!==l.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let v=0,P;for(;m>0;){if(P=f-m,P<0&&(P=0),s[v]>>P!==l[v]>>P)return!1;m-=f,v+=1}return!0}o(y,"matchCIDR");function _(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(_,"parseIntAuto");function b(s,l){for(;s.length<l;)s=`0${s}`;return s}o(b,"padPart");let x={};x.IPv4=function(){function s(l){if(l.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let f,m;for(f=0;f<l.length;f++)if(m=l[f],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=l}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(l,f){let m;if(f===void 0&&(m=l,l=m[0],f=m[1]),l.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return y(this.octets,l.octets,8,f)},s.prototype.prefixLengthFromSubnetMask=function(){let l=0,f=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,P,M;for(v=3;v>=0;v-=1)if(P=this.octets[v],P in m){if(M=m[P],f&&M!==0)return null;M!==8&&(f=!0),l+=M}else return null;return 32-l},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){return this.octets.slice(0)},s.prototype.toIPv4MappedAddress=function(){return x.IPv6.parse(`::ffff:${this.toString()}`)},s.prototype.toNormalizedString=function(){return this.toString()},s.prototype.toString=function(){return this.octets.join(".")},s}(),x.IPv4.broadcastAddressFromCIDR=function(s){try{let l=this.parseCIDR(s),f=l[0].toByteArray(),m=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],P=0;for(;P<4;)v.push(parseInt(f[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.isIPv4=function(s){return this.parser(s)!==null},x.IPv4.isValid=function(s){try{return new this(this.parser(s)),!0}catch{return!1}},x.IPv4.isValidCIDR=function(s){try{return this.parseCIDR(s),!0}catch{return!1}},x.IPv4.isValidFourPartDecimal=function(s){return!!(x.IPv4.isValid(s)&&s.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},x.IPv4.isValidCIDRFourPartDecimal=function(s){let l=s.match(/^(.+)\/(\d+)$/);return!x.IPv4.isValidCIDR(s)||!l?!1:x.IPv4.isValidFourPartDecimal(l[1])},x.IPv4.networkAddressFromCIDR=function(s){let l,f,m,v,P;try{for(l=this.parseCIDR(s),m=l[0].toByteArray(),P=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],f=0;f<4;)v.push(parseInt(m[f],10)&parseInt(P[f],10)),f++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.parse=function(s){let l=this.parser(s);if(l===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(l)},x.IPv4.parseCIDR=function(s){let l;if(l=s.match(/^(.+)\/(\d+)$/)){let f=parseInt(l[2]);if(f>=0&&f<=32){let m=[this.parse(l[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")},x.IPv4.parser=function(s){let l,f,m;if(l=s.match(r.fourOctet))return function(){let v=l.slice(1,6),P=[];for(let M=0;M<v.length;M++)f=v[M],P.push(_(f));return P}();if(l=s.match(r.longValue)){if(m=_(l[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return function(){let v=[],P;for(P=0;P<=24;P+=8)v.push(m>>P&255);return v}().reverse()}else return(l=s.match(r.twoOctet))?function(){let v=l.slice(1,4),P=[];if(m=_(v[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return P.push(_(v[0])),P.push(m>>16&255),P.push(m>>8&255),P.push(m&255),P}():(l=s.match(r.threeOctet))?function(){let v=l.slice(1,5),P=[];if(m=_(v[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return P.push(_(v[0])),P.push(_(v[1])),P.push(m>>8&255),P.push(m&255),P}():null},x.IPv4.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>32)throw new Error("ipaddr: invalid IPv4 prefix length");let l=[0,0,0,0],f=0,m=Math.floor(s/8);for(;f<m;)l[f]=255,f++;return m<4&&(l[m]=Math.pow(2,s%8)-1<<8-s%8),new this(l)},x.IPv6=function(){function s(l,f){let m,v;if(l.length===16)for(this.parts=[],m=0;m<=14;m+=2)this.parts.push(l[m]<<8|l[m+1]);else if(l.length===8)this.parts=l;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(l,f){let m;if(f===void 0&&(m=l,l=m[0],f=m[1]),l.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return y(this.parts,l.parts,16,f)},s.prototype.prefixLengthFromSubnetMask=function(){let l=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,P;for(let M=7;M>=0;M-=1)if(v=this.parts[M],v in m){if(P=m[v],f&&P!==0)return null;P!==16&&(f=!0),l+=P}else return null;return 128-l},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let l,f=[],m=this.parts;for(let v=0;v<m.length;v++)l=m[v],f.push(l>>8),f.push(l&255);return f},s.prototype.toFixedLengthString=function(){let l=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(b(this.parts[v].toString(16),4));return m}.call(this).join(":"),f="";return this.zoneId&&(f=`%${this.zoneId}`),l+f},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let l=this.parts.slice(-2),f=l[0],m=l[1];return new x.IPv4([f>>8,f&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let l=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}`),l+f},s.prototype.toRFC5952String=function(){let l=/((^|:)(0(:|$)){2,})/g,f=this.toNormalizedString(),m=0,v=-1,P;for(;P=l.exec(f);)P[0].length>v&&(m=P.index,v=P[0].length);return v<0?f:`${f.substring(0,m)}::${f.substring(m+v)}`},s.prototype.toString=function(){return this.toRFC5952String()},s}(),x.IPv6.broadcastAddressFromCIDR=function(s){try{let l=this.parseCIDR(s),f=l[0].toByteArray(),m=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],P=0;for(;P<16;)v.push(parseInt(f[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch(l){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${l})`)}},x.IPv6.isIPv6=function(s){return this.parser(s)!==null},x.IPv6.isValid=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{let l=this.parser(s);return new this(l.parts,l.zoneId),!0}catch{return!1}},x.IPv6.isValidCIDR=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{return this.parseCIDR(s),!0}catch{return!1}},x.IPv6.networkAddressFromCIDR=function(s){let l,f,m,v,P;try{for(l=this.parseCIDR(s),m=l[0].toByteArray(),P=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],f=0;f<16;)v.push(parseInt(m[f],10)&parseInt(P[f],10)),f++;return new this(v)}catch(M){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${M})`)}},x.IPv6.parse=function(s){let l=this.parser(s);if(l.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(l.parts,l.zoneId)},x.IPv6.parseCIDR=function(s){let l,f,m;if((f=s.match(/^(.+)\/(\d+)$/))&&(l=parseInt(f[2]),l>=0&&l<=128))return m=[this.parse(f[1]),l],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")},x.IPv6.parser=function(s){let l,f,m,v,P,M;if(m=s.match(d.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(d.native.test(s))return g(s,8);if((m=s.match(d.transitional))&&(M=m[6]||"",l=m[1],m[1].endsWith("::")||(l=l.slice(0,-1)),l=g(l+M,6),l.parts)){for(P=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],f=0;f<P.length;f++)if(v=P[f],!(0<=v&&v<=255))return null;return l.parts.push(P[0]<<8|P[1]),l.parts.push(P[2]<<8|P[3]),{parts:l.parts,zoneId:l.zoneId}}return null},x.IPv6.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>128)throw new Error("ipaddr: invalid IPv6 prefix length");let l=[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;)l[f]=255,f++;return m<16&&(l[m]=Math.pow(2,s%8)-1<<8-s%8),new this(l)},x.fromByteArray=function(s){let l=s.length;if(l===4)return new x.IPv4(s);if(l===16)return new x.IPv6(s);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},x.isValid=function(s){return x.IPv6.isValid(s)||x.IPv4.isValid(s)},x.isValidCIDR=function(s){return x.IPv6.isValidCIDR(s)||x.IPv4.isValidCIDR(s)},x.parse=function(s){if(x.IPv6.isValid(s))return x.IPv6.parse(s);if(x.IPv4.isValid(s))return x.IPv4.parse(s);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},x.parseCIDR=function(s){try{return x.IPv6.parseCIDR(s)}catch{try{return x.IPv4.parseCIDR(s)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},x.process=function(s){let l=this.parse(s);return l.kind()==="ipv6"&&l.isIPv4MappedAddress()?l.toIPv4Address():l},x.subnetMatch=function(s,l,f){let m,v,P,M;f==null&&(f="unicast");for(v in l)if(Object.prototype.hasOwnProperty.call(l,v)){for(P=l[v],P[0]&&!(P[0]instanceof Array)&&(P=[P]),m=0;m<P.length;m++)if(M=P[m],s.kind()===M[0].kind()&&s.match.apply(s,M))return v}return f},typeof jt<"u"&&jt.exports?jt.exports=x:e.ipaddr=x})(So)});var Ti=E((VS,Ii)=>{var bi=require("stream").Stream,vp=require("util");Ii.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");vp.inherits(pe,bi);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=bi.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 Ai=E((WS,Si)=>{var xp=require("util"),$i=require("stream").Stream,Ei=Ti();Si.exports=G;function G(){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(G,"CombinedStream");xp.inherits(G,$i);G.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};G.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};G.prototype.append=function(e){var t=G.isStreamLike(e);if(t){if(!(e instanceof Ei)){var r=Ei.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};G.prototype.pipe=function(e,t){return $i.prototype.pipe.call(this,e,t),this.resume(),e};G.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}};G.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=G.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};G.prototype._pipeNext=function(e){this._currentStream=e;var t=G.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()};G.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};G.prototype.write=function(e){this.emit("data",e)};G.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};G.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")};G.prototype.end=function(){this._reset(),this.emit("end")};G.prototype.destroy=function(){this._reset(),this.emit("close")};G.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};G.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};G.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)};G.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var ki=E((qS,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 Ri=E(te=>{"use strict";var Ht=ki(),_p=require("path").extname,Oi=/^\s*([^;\s]*)(?:;|\s|$)/,Pp=/^text\//i;te.charset=wi;te.charsets={lookup:wi};te.contentType=bp;te.extension=Ip;te.extensions=Object.create(null);te.lookup=Tp;te.types=Object.create(null);Ep(te.extensions,te.types);function wi(e){if(!e||typeof e!="string")return!1;var t=Oi.exec(e),r=t&&Ht[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Pp.test(t[1])?"UTF-8":!1}o(wi,"charset");function bp(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(bp,"contentType");function Ip(e){if(!e||typeof e!="string")return!1;var t=Oi.exec(e),r=t&&te.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(Ip,"extension");function Tp(e){if(!e||typeof e!="string")return!1;var t=_p("x."+e).toLowerCase().substr(1);return t&&te.types[t]||!1}o(Tp,"lookup");function Ep(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Ht).forEach(o(function(i){var u=Ht[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var d=0;d<c.length;d++){var g=c[d];if(t[g]){var y=r.indexOf(Ht[t[g]].source),_=r.indexOf(u.source);if(t[g]!=="application/octet-stream"&&(y>_||y===_&&t[g].substr(0,12)==="application/"))continue}t[g]=i}}},"forEachMimeType"))}o(Ep,"populateMaps")});var Di=E((XS,Ni)=>{Ni.exports=$p;function $p(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o($p,"defer")});var jr=E((QS,Ui)=>{var Ci=Di();Ui.exports=Sp;function Sp(e){var t=!1;return Ci(function(){t=!0}),o(function(n,i){t?e(n,i):Ci(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(Sp,"async")});var Lr=E((tA,Mi)=>{Mi.exports=Ap;function Ap(e){Object.keys(e.jobs).forEach(zp.bind(e)),e.jobs={}}o(Ap,"abort");function zp(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(zp,"clean")});var Fr=E((nA,Li)=>{var ji=jr(),kp=Lr();Li.exports=Op;function Op(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=wp(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?kp(r):r.results[i]=c,n(u,r.results))})}o(Op,"iterate");function wp(e,t,r,n){var i;return e.length==2?i=e(r,ji(n)):i=e(r,t,ji(n)),i}o(wp,"runJob")});var Br=E((iA,Fi)=>{Fi.exports=Rp;function Rp(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(Rp,"state")});var Zr=E((sA,Bi)=>{var Np=Lr(),Dp=jr();Bi.exports=Cp;function Cp(e){Object.keys(this.jobs).length&&(this.index=this.size,Np(this),Dp(e)(null,this.results))}o(Cp,"terminator")});var Vi=E((cA,Zi)=>{var Up=Fr(),Mp=Br(),jp=Zr();Zi.exports=Lp;function Lp(e,t,r){for(var n=Mp(e);n.index<(n.keyedList||e).length;)Up(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 jp.bind(n,r)}o(Lp,"parallel")});var Vr=E((lA,Wt)=>{var Hi=Fr(),Fp=Br(),Bp=Zr();Wt.exports=Zp;Wt.exports.ascending=Wi;Wt.exports.descending=Vp;function Zp(e,t,r,n){var i=Fp(e,r);return Hi(e,t,i,o(function u(c,d){if(c){n(c,d);return}if(i.index++,i.index<(i.keyedList||e).length){Hi(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),Bp.bind(i,n)}o(Zp,"serialOrdered");function Wi(e,t){return e<t?-1:e>t?1:0}o(Wi,"ascending");function Vp(e,t){return-1*Wi(e,t)}o(Vp,"descending")});var qi=E((mA,Gi)=>{var Hp=Vr();Gi.exports=Wp;function Wp(e,t,r){return Hp(e,t,null,r)}o(Wp,"serial")});var Ji=E((gA,Ki)=>{Ki.exports={parallel:Vi(),serial:qi(),serialOrdered:Vr()}});var Hr=E((yA,Xi)=>{"use strict";Xi.exports=Object});var Qi=E((hA,Yi)=>{"use strict";Yi.exports=Error});var ta=E((vA,ea)=>{"use strict";ea.exports=EvalError});var na=E((xA,ra)=>{"use strict";ra.exports=RangeError});var ia=E((_A,oa)=>{"use strict";oa.exports=ReferenceError});var sa=E((PA,aa)=>{"use strict";aa.exports=SyntaxError});var Gt=E((bA,ua)=>{"use strict";ua.exports=TypeError});var pa=E((IA,ca)=>{"use strict";ca.exports=URIError});var da=E((TA,la)=>{"use strict";la.exports=Math.abs});var fa=E((EA,ma)=>{"use strict";ma.exports=Math.floor});var ya=E(($A,ga)=>{"use strict";ga.exports=Math.max});var va=E((SA,ha)=>{"use strict";ha.exports=Math.min});var _a=E((AA,xa)=>{"use strict";xa.exports=Math.pow});var ba=E((zA,Pa)=>{"use strict";Pa.exports=Math.round});var Ta=E((kA,Ia)=>{"use strict";Ia.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var $a=E((wA,Ea)=>{"use strict";var Gp=Ta();Ea.exports=o(function(t){return Gp(t)||t===0?t:t<0?-1:1},"sign")});var Aa=E((NA,Sa)=>{"use strict";Sa.exports=Object.getOwnPropertyDescriptor});var Wr=E((DA,za)=>{"use strict";var qt=Aa();if(qt)try{qt([],"length")}catch{qt=null}za.exports=qt});var Oa=E((CA,ka)=>{"use strict";var Kt=Object.defineProperty||!1;if(Kt)try{Kt({},"a",{value:1})}catch{Kt=!1}ka.exports=Kt});var Gr=E((UA,wa)=>{"use strict";wa.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 d=Object.getOwnPropertyDescriptor(t,r);if(d.value!==i||d.enumerable!==!0)return!1}return!0},"hasSymbols")});var Da=E((jA,Na)=>{"use strict";var Ra=typeof Symbol<"u"&&Symbol,qp=Gr();Na.exports=o(function(){return typeof Ra!="function"||typeof Symbol!="function"||typeof Ra("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:qp()},"hasNativeSymbols")});var qr=E((FA,Ca)=>{"use strict";Ca.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Kr=E((BA,Ua)=>{"use strict";var Kp=Hr();Ua.exports=Kp.getPrototypeOf||null});var La=E((ZA,ja)=>{"use strict";var Jp="Function.prototype.bind called on incompatible ",Xp=Object.prototype.toString,Yp=Math.max,Qp="[object Function]",Ma=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"),el=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"),tl=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");ja.exports=o(function(t){var r=this;if(typeof r!="function"||Xp.apply(r)!==Qp)throw new TypeError(Jp+r);for(var n=el(arguments,1),i,u=o(function(){if(this instanceof i){var _=r.apply(this,Ma(n,arguments));return Object(_)===_?_:this}return r.apply(t,Ma(n,arguments))},"binder"),c=Yp(0,r.length-n.length),d=[],g=0;g<c;g++)d[g]="$"+g;if(i=Function("binder","return function ("+tl(d,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var y=o(function(){},"Empty");y.prototype=r.prototype,i.prototype=new y,y.prototype=null}return i},"bind")});var He=E((HA,Fa)=>{"use strict";var rl=La();Fa.exports=Function.prototype.bind||rl});var Jt=E((WA,Ba)=>{"use strict";Ba.exports=Function.prototype.call});var Jr=E((GA,Za)=>{"use strict";Za.exports=Function.prototype.apply});var Ha=E((qA,Va)=>{"use strict";Va.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Ga=E((KA,Wa)=>{"use strict";var nl=He(),ol=Jr(),il=Jt(),al=Ha();Wa.exports=al||nl.call(il,ol)});var Ka=E((JA,qa)=>{"use strict";var sl=He(),ul=Gt(),cl=Jt(),pl=Ga();qa.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new ul("a function is required");return pl(sl,cl,t)},"callBindBasic")});var ts=E((YA,es)=>{"use strict";var ll=Ka(),Ja=Wr(),Ya;try{Ya=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Xr=!!Ya&&Ja&&Ja(Object.prototype,"__proto__"),Qa=Object,Xa=Qa.getPrototypeOf;es.exports=Xr&&typeof Xr.get=="function"?ll([Xr.get]):typeof Xa=="function"?o(function(t){return Xa(t==null?t:Qa(t))},"getDunder"):!1});var as=E((ez,is)=>{"use strict";var rs=qr(),ns=Kr(),os=ts();is.exports=rs?o(function(t){return rs(t)},"getProto"):ns?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return ns(t)},"getProto"):os?o(function(t){return os(t)},"getProto"):null});var Yr=E((rz,ss)=>{"use strict";var dl=Function.prototype.call,ml=Object.prototype.hasOwnProperty,fl=He();ss.exports=fl.call(dl,ml)});var fs=E((nz,ms)=>{"use strict";var j,gl=Hr(),yl=Qi(),hl=ta(),vl=na(),xl=ia(),Ke=sa(),qe=Gt(),_l=pa(),Pl=da(),bl=fa(),Il=ya(),Tl=va(),El=_a(),$l=ba(),Sl=$a(),ls=Function,Qr=o(function(e){try{return ls('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),ht=Wr(),Al=Oa(),en=o(function(){throw new qe},"throwTypeError"),zl=ht?function(){try{return arguments.callee,en}catch{try{return ht(arguments,"callee").get}catch{return en}}}():en,We=Da()(),X=as(),kl=Kr(),Ol=qr(),ds=Jr(),vt=Jt(),Ge={},wl=typeof Uint8Array>"u"||!X?j:X(Uint8Array),Re={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?j:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?j:ArrayBuffer,"%ArrayIteratorPrototype%":We&&X?X([][Symbol.iterator]()):j,"%AsyncFromSyncIteratorPrototype%":j,"%AsyncFunction%":Ge,"%AsyncGenerator%":Ge,"%AsyncGeneratorFunction%":Ge,"%AsyncIteratorPrototype%":Ge,"%Atomics%":typeof Atomics>"u"?j:Atomics,"%BigInt%":typeof BigInt>"u"?j:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?j:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?j:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?j:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":yl,"%eval%":eval,"%EvalError%":hl,"%Float16Array%":typeof Float16Array>"u"?j:Float16Array,"%Float32Array%":typeof Float32Array>"u"?j:Float32Array,"%Float64Array%":typeof Float64Array>"u"?j:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?j:FinalizationRegistry,"%Function%":ls,"%GeneratorFunction%":Ge,"%Int8Array%":typeof Int8Array>"u"?j:Int8Array,"%Int16Array%":typeof Int16Array>"u"?j:Int16Array,"%Int32Array%":typeof Int32Array>"u"?j:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":We&&X?X(X([][Symbol.iterator]())):j,"%JSON%":typeof JSON=="object"?JSON:j,"%Map%":typeof Map>"u"?j:Map,"%MapIteratorPrototype%":typeof Map>"u"||!We||!X?j:X(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":gl,"%Object.getOwnPropertyDescriptor%":ht,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?j:Promise,"%Proxy%":typeof Proxy>"u"?j:Proxy,"%RangeError%":vl,"%ReferenceError%":xl,"%Reflect%":typeof Reflect>"u"?j:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?j:Set,"%SetIteratorPrototype%":typeof Set>"u"||!We||!X?j:X(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?j:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":We&&X?X(""[Symbol.iterator]()):j,"%Symbol%":We?Symbol:j,"%SyntaxError%":Ke,"%ThrowTypeError%":zl,"%TypedArray%":wl,"%TypeError%":qe,"%Uint8Array%":typeof Uint8Array>"u"?j:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?j:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?j:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?j:Uint32Array,"%URIError%":_l,"%WeakMap%":typeof WeakMap>"u"?j:WeakMap,"%WeakRef%":typeof WeakRef>"u"?j:WeakRef,"%WeakSet%":typeof WeakSet>"u"?j:WeakSet,"%Function.prototype.call%":vt,"%Function.prototype.apply%":ds,"%Object.defineProperty%":Al,"%Object.getPrototypeOf%":kl,"%Math.abs%":Pl,"%Math.floor%":bl,"%Math.max%":Il,"%Math.min%":Tl,"%Math.pow%":El,"%Math.round%":$l,"%Math.sign%":Sl,"%Reflect.getPrototypeOf%":Ol};if(X)try{null.error}catch(e){us=X(X(e)),Re["%Error.prototype%"]=us}var us,Rl=o(function e(t){var r;if(t==="%AsyncFunction%")r=Qr("async function () {}");else if(t==="%GeneratorFunction%")r=Qr("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Qr("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 Re[t]=r,r},"doEval"),cs={__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"]},xt=He(),Xt=Yr(),Nl=xt.call(vt,Array.prototype.concat),Dl=xt.call(ds,Array.prototype.splice),ps=xt.call(vt,String.prototype.replace),Yt=xt.call(vt,String.prototype.slice),Cl=xt.call(vt,RegExp.prototype.exec),Ul=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ml=/\\(\\)?/g,jl=o(function(t){var r=Yt(t,0,1),n=Yt(t,-1);if(r==="%"&&n!=="%")throw new Ke("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ke("invalid intrinsic syntax, expected opening `%`");var i=[];return ps(t,Ul,function(u,c,d,g){i[i.length]=d?ps(g,Ml,"$1"):c||u}),i},"stringToPath"),Ll=o(function(t,r){var n=t,i;if(Xt(cs,n)&&(i=cs[n],n="%"+i[0]+"%"),Xt(Re,n)){var u=Re[n];if(u===Ge&&(u=Rl(n)),typeof u>"u"&&!r)throw new qe("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new Ke("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");ms.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new qe("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new qe('"allowMissing" argument must be a boolean');if(Cl(/^%?[^%]*%?$/,t)===null)throw new Ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=jl(t),i=n.length>0?n[0]:"",u=Ll("%"+i+"%",r),c=u.name,d=u.value,g=!1,y=u.alias;y&&(i=y[0],Dl(n,Nl([0,1],y)));for(var _=1,b=!0;_<n.length;_+=1){var x=n[_],s=Yt(x,0,1),l=Yt(x,-1);if((s==='"'||s==="'"||s==="`"||l==='"'||l==="'"||l==="`")&&s!==l)throw new Ke("property names with quotes must have matching quotes");if((x==="constructor"||!b)&&(g=!0),i+="."+x,c="%"+i+"%",Xt(Re,c))d=Re[c];else if(d!=null){if(!(x in d)){if(!r)throw new qe("base intrinsic for "+t+" exists, but the property is not available.");return}if(ht&&_+1>=n.length){var f=ht(d,x);b=!!f,b&&"get"in f&&!("originalValue"in f.get)?d=f.get:d=d[x]}else b=Xt(d,x),d=d[x];b&&!g&&(Re[c]=d)}}return d},"GetIntrinsic")});var ys=E((iz,gs)=>{"use strict";var Fl=Gr();gs.exports=o(function(){return Fl()&&!!Symbol.toStringTag},"hasToStringTagShams")});var xs=E((sz,vs)=>{"use strict";var Bl=fs(),hs=Bl("%Object.defineProperty%",!0),Zl=ys()(),Vl=Yr(),Hl=Gt(),Qt=Zl?Symbol.toStringTag:null;vs.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 Hl("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Qt&&(n||!Vl(t,Qt))&&(hs?hs(t,Qt,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[Qt]=r)},"setToStringTag")});var Ps=E((cz,_s)=>{"use strict";var Wl=Function.prototype.call,Gl=Object.prototype.hasOwnProperty,ql=He();_s.exports=ql.call(Wl,Gl)});var Is=E((pz,bs)=>{"use strict";bs.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var $s=E((lz,Es)=>{"use strict";var on=Ai(),Kl=require("util"),tn=require("path"),Jl=require("http"),Xl=require("https"),Yl=require("url").parse,Ql=require("fs"),ed=require("stream").Stream,td=require("crypto"),rn=Ri(),rd=Ji(),nd=xs(),Se=Ps(),nn=Is();function Ts(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(Ts,"escapeHeaderParam");function L(e){if(!(this instanceof L))return new L(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],on.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(L,"FormData");Kl.inherits(L,on);L.LINE_BREAK=`\r
2
- `;L.DEFAULT_CONTENT_TYPE="application/octet-stream";L.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=on.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)};L.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)+L.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Se(t,"httpVersion"))&&!(t instanceof ed))&&(r.knownLength||this._valuesToMeasure.push(t))};L.prototype._lengthRetriever=function(e,t){Se(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):Ql.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):Se(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Se(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};L.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="'+Ts(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&nn(c,r.header);var d;for(var g in c)if(Se(c,g)){if(d=c[g],d==null)continue;Array.isArray(d)||(d=[d]),d.length&&(u+=g+": "+d.join("; ")+L.LINE_BREAK)}return"--"+this.getBoundary()+L.LINE_BREAK+u+L.LINE_BREAK};L.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=tn.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=tn.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Se(e,"httpVersion")&&(r=tn.basename(e.client._httpMessage.path||"")),r)return'filename="'+Ts(r)+'"'};L.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=rn.lookup(e.name)),!r&&e&&e.path&&(r=rn.lookup(e.path)),!r&&e&&e.readable&&Se(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=rn.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=L.DEFAULT_CONTENT_TYPE),r};L.prototype._multiPartFooter=function(){return function(e){var t=L.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};L.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+L.LINE_BREAK};L.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Se(e,t)&&(r[t.toLowerCase()]=e[t]);return r};L.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};L.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};L.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(L.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};L.prototype._generateBoundary=function(){this._boundary="--------------------------"+td.randomBytes(12).toString("hex")};L.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};L.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};L.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}rd.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};L.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=Yl(e),n=nn({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=nn(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=Xl.request(n):r=Jl.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 d,g=o(function(y,_){return r.removeListener("error",g),r.removeListener("response",d),t.call(this,y,_)},"callback");d=g.bind(this,null),r.on("error",g),r.on("response",d)}}.bind(this)),r};L.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};L.prototype.toString=function(){return"[object FormData]"};nd(L.prototype,"FormData");Es.exports=L});var md={};cn(md,{alai:()=>dd});module.exports=Zs(md);var Vs=Object.freeze({status:"aborted"});function I(e,t,r){function n(d,g){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:g,constr:c,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),t(d,g);let y=c.prototype,_=Object.keys(y);for(let b=0;b<_.length;b++){let x=_[b];x in d||(d[x]=y[x].bind(d))}}o(n,"init");let i=r?.Parent??Object;class u extends i{static{o(this,"Definition")}}Object.defineProperty(u,"name",{value:e});function c(d){var g;let y=r?.Parent?new u:this;n(y,d),(g=y._zod).deferred??(g.deferred=[]);for(let _ of y._zod.deferred)_();return y}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(d=>r?.Parent&&d instanceof r.Parent?!0:d?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}o(I,"$constructor");var Hs=Symbol("zod_brand"),le=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Pt=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},tr={};function fe(e){return e&&Object.assign(tr,e),tr}o(fe,"config");function nr(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(nr,"getEnumValues");function dn(e,t){return typeof t=="bigint"?t.toString():t}o(dn,"jsonStringifyReplacer");function It(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(It,"cached");function mn(e){return e==null}o(mn,"nullish");function Tt(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(Tt,"cleanRegex");var ln=Symbol("evaluating");function q(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==ln)return n===void 0&&(n=ln,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(q,"defineLazy");var or="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Xe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(Xe,"isObject");var Ws=It(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function fn(e){if(Xe(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Xe(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(fn,"isPlainObject");var gn=new Set(["string","number","symbol"]);function De(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(De,"escapeRegex");function Et(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o(Et,"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 yn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(yn,"optionalKeys");var Gs={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 Ce(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(Ce,"aborted");function Pe(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(Pe,"prefixIssues");function bt(e){return typeof e=="string"?e:e?.message}o(bt,"unwrapMessage");function be(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=bt(e.inst?._zod.def?.error?.(e))??bt(t?.error?.(e))??bt(r.customError?.(e))??bt(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(be,"finalizeIssue");function hn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(hn,"getLengthableOrigin");function ir(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(ir,"issue");var vn=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,dn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),xn=I("$ZodError",vn),Ye=I("$ZodError",vn,{Parent:Error});var Ks=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 le;if(c.issues.length){let d=new(i?.Err??e)(c.issues.map(g=>be(g,u,fe())));throw or(d,i?.callee),d}return c.value},"_parse"),$t=Ks(Ye),Js=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 d=new(i?.Err??e)(c.issues.map(g=>be(g,u,fe())));throw or(d,i?.callee),d}return c.value},"_parseAsync"),St=Js(Ye),Xs=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 le;return u.issues.length?{success:!1,error:new(e??xn)(u.issues.map(c=>be(c,i,fe())))}:{success:!0,data:u.value}},"_safeParse"),Qe=Xs(Ye),Ys=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=>be(c,i,fe())))}:{success:!0,data:u.value}},"_safeParseAsync"),et=Ys(Ye);var Qs="(?:(?:\\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])))",eu=new RegExp(`^${Qs}$`);var _n=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Pn=/^-?\d+n?$/;var ar=/^-?\d+(?:\.\d+)?$/,bn=/^(?:true|false)$/i;var Ue=I("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var In=I("$ZodCheckMinLength",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!mn(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=hn(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var sr=I("$ZodCheckStringFormat",(e,t)=>{var r,n;Ue.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=()=>{})}),Tn=I("$ZodCheckRegex",(e,t)=>{sr.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 $n={major:4,minor:3,patch:6};var H=I("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=$n;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,d,g)=>{let y=Ce(c),_;for(let b of d){if(b._zod.def.when){if(!b._zod.def.when(c))continue}else if(y)continue;let x=c.issues.length,s=b._zod.check(c);if(s instanceof Promise&&g?.async===!1)throw new le;if(_||s instanceof Promise)_=(_??Promise.resolve()).then(async()=>{await s,c.issues.length!==x&&(y||(y=Ce(c,x)))});else{if(c.issues.length===x)continue;y||(y=Ce(c,x))}}return _?_.then(()=>c):c},"runChecks"),u=o((c,d,g)=>{if(Ce(c))return c.aborted=!0,c;let y=i(d,n,g);if(y instanceof Promise){if(g.async===!1)throw new le;return y.then(_=>e._zod.parse(_,g))}return e._zod.parse(y,g)},"handleCanaryResult");e._zod.run=(c,d)=>{if(d.skipChecks)return e._zod.parse(c,d);if(d.direction==="backward"){let y=e._zod.parse({value:c.value,issues:[]},{...d,skipChecks:!0});return y instanceof Promise?y.then(_=>u(_,c,d)):u(y,c,d)}let g=e._zod.parse(c,d);if(g instanceof Promise){if(d.async===!1)throw new le;return g.then(y=>i(y,n,d))}return i(g,n,d)}}q(e,"~standard",()=>({validate:o(i=>{try{let u=Qe(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return et(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),kt=I("$ZodString",(e,t)=>{H.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}}),ur=I("$ZodStringFormat",(e,t)=>{sr.init(e,t),kt.init(e,t)});var On=I("$ZodURL",(e,t)=>{ur.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 wn=I("$ZodNumber",(e,t)=>{H.init(e,t),e._zod.pattern=e._zod.bag.pattern??ar,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}});var cr=I("$ZodBoolean",(e,t)=>{H.init(e,t),e._zod.pattern=bn,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}}),Rn=I("$ZodBigInt",(e,t)=>{H.init(e,t),e._zod.pattern=Pn,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 Nn=I("$ZodAny",(e,t)=>{H.init(e,t),e._zod.parse=r=>r}),Dn=I("$ZodUnknown",(e,t)=>{H.init(e,t),e._zod.parse=r=>r});var Cn=I("$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}}),Un=I("$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 Sn(e,t,r){e.issues.length&&t.issues.push(...Pe(r,e.issues)),t.value[r]=e.value}o(Sn,"handleArrayResult");var Mn=I("$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 d=i[c],g=t.element._zod.run({value:d,issues:[]},n);g instanceof Promise?u.push(g.then(y=>Sn(y,r,c))):Sn(g,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function zt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...Pe(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(zt,"handlePropertyResult");function tu(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=yn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(tu,"normalizeDef");function ru(e,t,r,n,i,u){let c=[],d=i.keySet,g=i.catchall._zod,y=g.def.type,_=g.optout==="optional";for(let b in t){if(d.has(b))continue;if(y==="never"){c.push(b);continue}let x=g.run({value:t[b],issues:[]},n);x instanceof Promise?e.push(x.then(s=>zt(s,r,b,t,_))):zt(x,r,b,t,_)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:u}),e.length?Promise.all(e).then(()=>r):r}o(ru,"handleCatchall");var jn=I("$ZodObject",(e,t)=>{if(H.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let d=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let g={...d};return Object.defineProperty(t,"shape",{value:g}),g},"get")})}let n=It(()=>tu(t));q(e._zod,"propValues",()=>{let d=t.shape,g={};for(let y in d){let _=d[y]._zod;if(_.values){g[y]??(g[y]=new Set);for(let b of _.values)g[y].add(b)}}return g});let i=Xe,u=t.catchall,c;e._zod.parse=(d,g)=>{c??(c=n.value);let y=d.value;if(!i(y))return d.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),d;d.value={};let _=[],b=c.shape;for(let x of c.keys){let s=b[x],l=s._zod.optout==="optional",f=s._zod.run({value:y[x],issues:[]},g);f instanceof Promise?_.push(f.then(m=>zt(m,d,x,y,l))):zt(f,d,x,y,l)}return u?ru(_,y,d,g,n.value,e):_.length?Promise.all(_).then(()=>d):d}});function An(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=>!Ce(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=>be(c,n,fe())))}),t)}o(An,"handleUnionResults");var pr=I("$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=>Tt(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,d=[];for(let g of t.options){let y=g._zod.run({value:i.value,issues:[]},u);if(y instanceof Promise)d.push(y),c=!0;else{if(y.issues.length===0)return y;d.push(y)}}return c?Promise.all(d).then(g=>An(g,i,e,u)):An(d,i,e,u)}});var Ln=I("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,pr.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[d,g]of Object.entries(c)){i[d]||(i[d]=new Set);for(let y of g)i[d].add(y)}}return i});let n=It(()=>{let i=t.options,u=new Map;for(let c of i){let d=c._zod.propValues?.[t.discriminator];if(!d||d.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let g of d){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(!Xe(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;let d=n.value.get(c?.[t.discriminator]);return d?d._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 Fn=I("$ZodRecord",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!fn(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 d=new Set;for(let y of c)if(typeof y=="string"||typeof y=="number"||typeof y=="symbol"){d.add(typeof y=="number"?y.toString():y);let _=t.valueType._zod.run({value:i[y],issues:[]},n);_ instanceof Promise?u.push(_.then(b=>{b.issues.length&&r.issues.push(...Pe(y,b.issues)),r.value[y]=b.value})):(_.issues.length&&r.issues.push(...Pe(y,_.issues)),r.value[y]=_.value)}let g;for(let y in i)d.has(y)||(g=g??[],g.push(y));g&&g.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:g})}else{r.value={};for(let d of Reflect.ownKeys(i)){if(d==="__proto__")continue;let g=t.keyType._zod.run({value:d,issues:[]},n);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&ar.test(d)&&g.issues.length){let b=t.keyType._zod.run({value:Number(d),issues:[]},n);if(b instanceof Promise)throw new Error("Async schemas not supported in object keys currently");b.issues.length===0&&(g=b)}if(g.issues.length){t.mode==="loose"?r.value[d]=i[d]:r.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map(b=>be(b,n,fe())),input:d,path:[d],inst:e});continue}let _=t.valueType._zod.run({value:i[d],issues:[]},n);_ instanceof Promise?u.push(_.then(b=>{b.issues.length&&r.issues.push(...Pe(d,b.issues)),r.value[g.value]=b.value})):(_.issues.length&&r.issues.push(...Pe(d,_.issues)),r.value[g.value]=_.value)}}return u.length?Promise.all(u).then(()=>r):r}});var Bn=I("$ZodEnum",(e,t)=>{H.init(e,t);let r=nr(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>gn.has(typeof i)).map(i=>typeof i=="string"?De(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}}),Zn=I("$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"?De(n):n?De(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 Vn=I("$ZodTransform",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Pt(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 le;return r.value=i,r}});function zn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(zn,"handleOptionalResult");var Hn=I("$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(`^(${Tt(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=>zn(u,r.value)):zn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var Wn=I("$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(`^(${Tt(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 Gn=I("$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=>At(c,t.in,n)):At(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>At(u,t.out,n)):At(i,t.out,n)}});function At(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(At,"handlePipeResult");var qn=I("$ZodCustom",(e,t)=>{Ue.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=>kn(u,r,n,e));kn(i,r,n,e)}});function kn(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(ir(i))}}o(kn,"handleRefineResult");var Jn,au=Symbol("ZodOutput"),su=Symbol("ZodInput"),lr=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 Xn(){return new lr}o(Xn,"registry");(Jn=globalThis).__zod_globalRegistry??(Jn.__zod_globalRegistry=Xn());var dr=globalThis.__zod_globalRegistry;function Yn(e,t){return new e({type:"string",...V(t)})}o(Yn,"_string");function Qn(e,t){return new e({type:"string",coerce:!0,...V(t)})}o(Qn,"_coercedString");function eo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...V(t)})}o(eo,"_url");function to(e,t){return new e({type:"number",checks:[],...V(t)})}o(to,"_number");function ro(e,t){return new e({type:"number",coerce:!0,checks:[],...V(t)})}o(ro,"_coercedNumber");function no(e,t){return new e({type:"boolean",...V(t)})}o(no,"_boolean");function oo(e,t){return new e({type:"boolean",coerce:!0,...V(t)})}o(oo,"_coercedBoolean");function io(e,t){return new e({type:"bigint",coerce:!0,...V(t)})}o(io,"_coercedBigint");function ao(e){return new e({type:"any"})}o(ao,"_any");function so(e){return new e({type:"unknown"})}o(so,"_unknown");function uo(e,t){return new e({type:"void",...V(t)})}o(uo,"_void");function co(e,t){return new e({type:"date",coerce:!0,...V(t)})}o(co,"_coercedDate");function ce(e,t){return new In({check:"min_length",...V(t),minimum:e})}o(ce,"_minLength");function Ie(e,t){return new Tn({check:"string_format",format:"regex",...V(t),pattern:e})}o(Ie,"_regex");function po(e,t,r){let n=V(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(po,"_custom");var K=I("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)=>$t(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Qe(e,r,n),e.parseAsync=async(r,n)=>St(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>et(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)=>Et(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.apply=r=>r(e)}),wt=I("ZodMiniString",(e,t)=>{kt.init(e,t),K.init(e,t)});function a(e){return Yn(wt,e)}o(a,"string");var lo=I("ZodMiniStringFormat",(e,t)=>{ur.init(e,t),wt.init(e,t)});var hu=I("ZodMiniURL",(e,t)=>{On.init(e,t),lo.init(e,t)});function mo(e){return eo(hu,e)}o(mo,"url");var mr=I("ZodMiniNumber",(e,t)=>{wn.init(e,t),K.init(e,t)});function Q(e){return to(mr,e)}o(Q,"number");var fr=I("ZodMiniBoolean",(e,t)=>{cr.init(e,t),K.init(e,t)});function B(e){return no(fr,e)}o(B,"boolean");var fo=I("ZodMiniBigInt",(e,t)=>{Rn.init(e,t),K.init(e,t)});var vu=I("ZodMiniAny",(e,t)=>{Nn.init(e,t),K.init(e,t)});function rt(){return ao(vu)}o(rt,"any");var xu=I("ZodMiniUnknown",(e,t)=>{Dn.init(e,t),K.init(e,t)});function O(){return so(xu)}o(O,"unknown");var _u=I("ZodMiniVoid",(e,t)=>{Cn.init(e,t),K.init(e,t)});function go(e){return uo(_u,e)}o(go,"_void");var yo=I("ZodMiniDate",(e,t)=>{Un.init(e,t),K.init(e,t)});var Pu=I("ZodMiniArray",(e,t)=>{Mn.init(e,t),K.init(e,t)});function N(e,t){return new Pu({type:"array",element:e,...V(t)})}o(N,"array");var bu=I("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 bu(r)}o(p,"object");var Iu=I("ZodMiniUnion",(e,t)=>{pr.init(e,t),K.init(e,t)});function D(e,t){return new Iu({type:"union",options:e,...V(t)})}o(D,"union");var Tu=I("ZodMiniDiscriminatedUnion",(e,t)=>{Ln.init(e,t),K.init(e,t)});function Me(e,t,r){return new Tu({type:"union",options:t,discriminator:e,...V(r)})}o(Me,"discriminatedUnion");var Eu=I("ZodMiniRecord",(e,t)=>{Fn.init(e,t),K.init(e,t)});function w(e,t,r){return new Eu({type:"record",keyType:e,valueType:t,...V(r)})}o(w,"record");var $u=I("ZodMiniEnum",(e,t)=>{Bn.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 $u({type:"enum",entries:r,...V(t)})}o(U,"_enum");var Su=I("ZodMiniLiteral",(e,t)=>{Zn.init(e,t),K.init(e,t)});function S(e,t){return new Su({type:"literal",values:Array.isArray(e)?e:[e],...V(t)})}o(S,"literal");var Au=I("ZodMiniTransform",(e,t)=>{Vn.init(e,t),K.init(e,t)});function Te(e){return new Au({type:"transform",transform:e})}o(Te,"transform");var zu=I("ZodMiniOptional",(e,t)=>{Hn.init(e,t),K.init(e,t)});function h(e){return new zu({type:"optional",innerType:e})}o(h,"optional");var ku=I("ZodMiniNullable",(e,t)=>{Wn.init(e,t),K.init(e,t)});function nt(e){return new ku({type:"nullable",innerType:e})}o(nt,"nullable");var Ou=I("ZodMiniPipe",(e,t)=>{Gn.init(e,t),K.init(e,t)});function Ee(e,t){return new Ou({type:"pipe",in:e,out:t})}o(Ee,"pipe");var wu=I("ZodMiniCustom",(e,t)=>{qn.init(e,t),K.init(e,t)});function Rt(e,t){return po(wu,e??(()=>!0),t)}o(Rt,"custom");var ot={};cn(ot,{bigint:()=>ju,boolean:()=>Mu,date:()=>Lu,number:()=>Uu,string:()=>Cu});function Cu(e){return Qn(wt,e)}o(Cu,"string");function Uu(e){return ro(mr,e)}o(Uu,"number");function Mu(e){return oo(fr,e)}o(Mu,"boolean");function ju(e){return io(fo,e)}o(ju,"bigint");function Lu(e){return co(yo,e)}o(Lu,"date");var yr=p({retryOnFailure:p({defaultValue:h(B()),hide:h(B())}),continueOnFailure:p({defaultValue:h(B()),hide:h(B())})}),gr=class{constructor(t,r,n,i,u,c,d,g,y,_,b){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=d;this.errorHandlingOptions=g;this.outputSchema=y;this.audience=_;this.aiMetadata=b}static{o(this,"IAction")}},ae=o(e=>new gr(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:h(a())}),C=o((e,t)=>p({type:S(t),required:B(),defaultValue:h(rt())}),"TPropertyValue");var ne=p({...F.shape,...C(a(),"SHORT_TEXT").shape}),ge=p({...F.shape,...C(a(),"LONG_TEXT").shape});var vo=p({label:a(),value:O()}),Nt=p({disabled:h(B()),placeholder:h(a()),options:N(vo)});var oe=p({...F.shape,options:Nt,...C(O(),"STATIC_DROPDOWN").shape}),ye=p({...F.shape,options:Nt,...C(N(O()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var hr=p({...F.shape,...C(O(),"DROPDOWN").shape,refreshers:N(a())}),it=p({...F.shape,...C(N(O()),"MULTI_SELECT_DROPDOWN").shape,refreshers:N(a())});var he=p({...F.shape,...C(B(),"CHECKBOX").shape});var ve=p({...F.shape,...C(Q(),"NUMBER").shape});var at=p({...F.shape,...C(O(),"FILE").shape});var st=p({...F.shape,...C(a(),"DATE_TIME").shape});var xo=w(a(),D([ne,ge,oe,it,ye,he,ve,at,st])),ut=p({...F.shape,properties:xo,...C(N(O()),"ARRAY").shape});var ct=p({...F.shape,...C(D([w(a(),O())]),"JSON").shape});var _o=D([ne,oe,ct,ut,ye]),Bu=w(a(),_o),vr=p({refreshers:N(a()),...F.shape,...C(O(),"DYNAMIC").shape});var Dt=p({...F.shape,...C(go(),"MARKDOWN").shape});var pt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(pt||{}),je=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(je||{}),Le=(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))(Le||{});var lt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(lt||{}),xr="both_client_credentials_and_authorization_code";var ze=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(ze||{}),dt=(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))(dt||{}),Zu=p({strategy:U(dt),paramName:h(a())}),mt=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(mt||{});var Ct=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Ct||{}),Po=p({status:h(Q()),body:h(O()),headers:h(w(a(),a()))}),bo=p({type:S("DELAY"),resumeDateTime:a(),requestIdToReply:h(a()),handlerId:h(a()),streamStepProgress:h(U(Ct))}),Io=p({type:S("WEBHOOK"),requestId:a(),requestIdToReply:h(a()),response:Po,handlerId:h(a()),streamStepProgress:h(U(Ct))}),Vu=D([bo,Io]);var Hu=p({body:O(),rawBody:h(O()),headers:w(a(),a()),queryParams:w(a(),a())});function xe(e){return e==null}o(xe,"isNil");function ft(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(ft,"isEmpty");function Ut(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(Ut,"assertNotNullOrUndefined");var _r=Ne(require("crypto"),1);var Wu=128,ke,Fe,Gu=o(e=>{!ke||ke.length<e?(ke=Buffer.allocUnsafe(e*Wu),_r.default.randomFillSync(ke),Fe=0):Fe+e>ke.length&&(_r.default.randomFillSync(ke),Fe=0),Fe+=e},"fillPool"),qu=o(e=>(Gu(e|=0),ke.subarray(Fe-e,Fe)),"random"),Ku=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 d=r(i),g=i;for(;g--;)if(c+=e[d[g]&n]||"",c.length===u)return c}}},"customRandom"),Eo=o((e,t=21)=>Ku(e,t,qu),"customAlphabet");var Ju="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",$o=21,JP=a().check(Ie(new RegExp(`^[0-9a-zA-Z]{${$o}}$`))),Xu=Eo(Ju,$o);var $e=Ee(Te(e=>e instanceof Date?e.toISOString():e),a()),se={id:a(),created:$e,updated:$e},Z=o(e=>h(nt(e)),"Nullable");function Pr(e){return h(nt(U(e)))}o(Pr,"NullableEnum");var QP=Ee(Te(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),h(B())),Mt=o(e=>Ee(Te(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),h(N(e))),"OptionalArrayFromQuery");var rb=w(a(),O());var gt=(_=>(_.OPENAI="openai",_.OPENROUTER="openrouter",_.ANTHROPIC="anthropic",_.AZURE="azure",_.GOOGLE="google",_.ACTIVEPIECES="activepieces",_.CLOUDFLARE_GATEWAY="cloudflare-gateway",_.CUSTOM="custom",_.BEDROCK="bedrock",_.MISTRAL="mistral",_))(gt||{});var fb=a().check(Ie(/^#[0-9A-Fa-f]{6}$/));var yb=p({filename:a(),data:O(),type:S("file"),mimetype:h(a())});var Yu=Ne(Ao());var Ib=p({...se,name:a(),permissions:N(a()),platformId:Z(a()),type:a(),userCount:h(Q())});var zo=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(zo||{}),br=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(br||{}),Ir=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Ir||{});var Tr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Tr||{});var Er=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Er||{});var Qu=p({mode:U(zo),value:O()}),ec=p({auth:h(a()),fields:w(a(),Qu)}),tc=p({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:h(ec)}),rc=p({type:S("PIECE"),toolName:a().check(ce(1)),pieceMetadata:tc}),nc=p({type:S("none")}),oc=p({type:S("access_token"),accessToken:a()}),ic=p({type:S("api_key"),apiKey:a(),apiKeyHeader:a()}),ac=p({type:S("headers"),headers:w(a(),a())}),sc=Me("type",[nc,oc,ic,ac]),ko=p({type:S("FLOW"),toolName:a().check(ce(1)),externalFlowId:a(),flowDisplayName:h(a())}),Oo=p({type:S("MCP"),toolName:a().check(ce(1)),serverUrl:mo(),protocol:U(Ir),auth:sc}),wo=p({type:S("KNOWLEDGE_BASE"),toolName:a().check(ce(1)),sourceType:U(br),sourceId:a(),sourceName:a()}),uc=Me("type",[rc,ko,Oo,wo]),cc=p({displayName:a(),description:h(a()),type:U(Tr)}),Ro=p({type:S("MARKDOWN"),markdown:a()}),Be={type:S("TOOL_CALL"),input:Z(w(a(),O())),output:h(O()),toolName:a(),status:U(Er),toolCallId:a(),startTime:a(),endTime:h(a())},Jb=p(Be),No=Me("toolCallType",[p({...Be,toolCallType:S("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),p({...Be,toolCallType:S("FLOW"),displayName:a(),externalFlowId:a()}),p({...Be,toolCallType:S("MCP"),displayName:a(),serverUrl:a()}),p({...Be,toolCallType:S("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),p({...Be,toolCallType:S("UNKNOWN"),displayName:a()})]),pc=D([Ro,No]);var $r=(r=>(r.IMAGE="image",r.TEXT="text",r))($r||{}),_e=p({apiKey:a()}),lc=_e,dc=p({apiKey:a(),apiKeyHash:a()}),mc=_e,fc=_e,gc=_e,yc=_e,hc=_e,vc=_e,xc=_e,Do=p({accessKeyId:a().check(ce(1)),secretAccessKey:a().check(ce(1))}),_c=p({}),Pc=p({}),bc=p({}),Ic=p({}),Tc=p({}),Ec=p({}),Co=p({modelId:a(),modelName:a(),modelType:U($r)}),Uo=p({apiKeyHeader:a(),baseUrl:a(),models:N(Co),defaultHeaders:h(w(a(),a()))}),Mo=p({accountId:a(),gatewayId:a(),models:N(Co),vertexProject:h(a()),vertexRegion:h(a())}),jo=p({resourceName:a(),apiVersion:Ee(Te(e=>typeof e=="string"&&e.trim().length===0?void 0:e),h(a()))}),Lo=p({region:a().check(ce(1))}),$c=D([lc,gc,yc,hc,vc,fc,mc,dc,Do,xc]),Fo=D([Uo,Mo,jo,Lo,_c,bc,Ic,Tc,Pc,Ec]),Sc=p({id:a(),name:a(),type:U($r)}),Ac=p({id:a(),name:a(),provider:U(gt),config:Fo,enabledForChat:B()}),zc=p({provider:U(gt),config:Fo,auth:$c,platformId:a()});var eI={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var kc=p({base64Url:a(),fileName:a(),extension:h(a())}),Oc=p({mimeType:a(),url:a(),fileName:h(a())}),Sr=D([kc,Oc]);var wc=D([p({type:S("file"),value:Sr}),p({type:S("markdown"),value:a(),files:h(N(Sr))})]),Rc=p({sessionId:a(),message:a(),files:h(N(a()))});var Zo=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Zo||{}),Vo=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(Vo||{}),Ar=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Ar||{});var Nc=D([p({...se,name:a(),externalId:a(),type:S("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:p({options:N(p({value:a()}))})}),p({...se,name:a(),externalId:a(),type:D([S("TEXT"),S("NUMBER"),S("DATE")]),tableId:a(),projectId:a()})]),Dc=p({...se,name:a(),folderId:Z(a()),projectId:a(),externalId:a(),status:Pr(Vo),trigger:Pr(Zo)}),Cc=p({...se,tableId:a(),projectId:a(),cells:w(a(),p({updated:a(),created:a(),value:O(),fieldName:a()}))}),Uc=p({events:N(U(Ar)),webhookUrl:a(),flowId:a()}),Mc=p({fields:N(p({id:a(),name:a()})),rows:N(w(a(),a())),name:a()}),jc=p({projectId:a(),limit:h(ot.number()),cursor:h(a()),name:h(a()),externalIds:Mt(a()),folderId:h(a()),folderIds:Mt(a())}),Lc=p({records:N(N(p({fieldId:a(),value:Wo()}))),tableId:a()}),Fc=p({cells:h(N(p({fieldId:a(),value:Wo()}))),tableId:a(),agentUpdate:h(B())}),Ho=Me("operator",[Oe("eq"),Oe("neq"),Oe("gt"),Oe("gte"),Oe("lt"),Oe("lte"),Oe("co"),Bo("exists"),Bo("not_exists")]),Bc=p({tableId:a(),limit:h(ot.number()),cursor:h(a()),filters:Mt(Ho)});function Wo(){return Ee(Te(e=>e==null?e:String(e)),nt(a()))}o(Wo,"coerceToString");function Oe(e){return p({fieldId:a(),operator:S(e),value:a()})}o(Oe,"valueFilter");function Bo(e){return p({fieldId:a(),operator:S(e)})}o(Bo,"existenceFilter");var Zc=p({status:h(Q()),body:h(O()),headers:h(w(a(),a()))}),Vc=p({...se,deleted:Z($e),ownerId:a(),displayName:a(),platformId:a(),externalId:Z(a())});var Go=p({name:a(),description:h(a()),type:a(),required:B()}),Hc=p({pieceName:a(),triggerName:a(),input:p({toolName:a(),toolDescription:a(),inputSchema:N(Go),returnsResponse:B()})});var qo="^[0-9]+\\.[0-9]+\\.[0-9]+$",xI=new RegExp(qo),Gc="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",_I=a().check(Ie(new RegExp(qo))),PI=a().check(Ie(new RegExp(Gc))),qc=p({packageType:S("ARCHIVE"),pieceType:U(je),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),Ko=p({packageType:S("REGISTRY"),pieceType:S("OFFICIAL"),pieceName:a(),pieceVersion:a()}),Jo=p({packageType:S("REGISTRY"),pieceType:S("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),bI=D([Ko,Jo]),II=D([qc,Ko,Jo]),Xo=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(Xo||{}),Kc=p({type:U(Xo),cronExpression:a(),timezone:a()}),TI=p({...se,type:U(ze),projectId:a(),flowId:a(),triggerName:a(),schedule:Z(Kc),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:Z(a()),simulate:B()}),Yo=(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))(Yo||{}),Qo=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(Qo||{}),ei=(r=>(r.S3="S3",r.DB="DB",r))(ei||{}),EI=p({...se,projectId:Z(a()),platformId:Z(a()),type:U(Yo),compression:U(Qo),data:h(O()),location:U(ei),size:Z(Q()),fileName:Z(a()),s3Key:Z(a()),metadata:Z(w(a(),a()))}),ti=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(ti||{}),ri=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(ri||{}),$I=p({id:a(),email:a(),firstName:a(),status:U(ri),externalId:Z(a()),platformId:Z(a()),platformRole:U(ti),lastName:a(),created:$e,updated:$e,lastActiveDate:Z($e),imageUrl:Z(a())});var zr=p({...F.shape,...C(w(a(),O()),"OBJECT").shape});var ai=p({...F.shape,...C(a(),"COLOR").shape});var kr=D([ne,ge,Dt,he,oe,ye,hr,it,vr,ve,ut,zr,ct,st,at,ai]),$={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 de=p({displayName:a(),description:h(a())});var si=p({username:a(),password:a()}),Or=p({...de.shape,username:p({displayName:a(),description:h(a())}),password:p({displayName:a(),description:h(a())}),...C(si,"BASIC_AUTH").shape});var Qc=w(a(),D([ne,ge,ve,he,oe])),wr=p({...de.shape,props:Qc,...C(O(),"CUSTOM_AUTH").shape});var we=p({...de.shape,...C(p({auth:a()}),"SECRET_TEXT").shape});var ep=w(a(),D([ne,ge,we,ve,he,oe,ye,Dt])),ui=p({...de.shape,props:ep,...C(O(),"OIDC").shape});var Rr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Rr||{}),ci=D([ne,we,oe]),pi=w(a(),ci),tp=p({props:h(w(a(),ci)),authUrl:a(),tokenUrl:a(),scope:N(a()),prompt:h(D([S("none"),S("consent"),S("login"),S("omit")])),pkce:h(B()),pkceMethod:h(D([S("plain"),S("S256")])),authorizationMethod:h(U(Rr)),grantType:h(D([U(lt),S(xr)])),extra:h(w(a(),a()))}),li=p({access_token:a(),props:h(pi),data:w(a(),rt())}),Nr=p({...de.shape,...tp.shape,...C(li,"OAUTH2").shape});var Ze=D([Or,wr,ui,Nr,we]),yt="Connection",Lt={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||yt}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||yt,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||yt}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||yt}},None(){}};var oE={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({...F.shape,...C(O(),"CUSTOM").shape,code:a()});var np=D([kr,Ze]),Dr=w(a(),np),TE=w(a(),kr);var di=D([p({strategy:S("CRON"),cronExpression:a()}),p({strategy:S("NONE")})]);var mi="2",Ft="0.82.0";var Cr=class{constructor(t,r,n,i,u,c,d,g,y=Ft,_,b=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=d;this.auth=g;this.minimumSupportedRelease=y;this.maximumSupportedRelease=_;this.description=b;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:mi}),"getContextInfo");(!op(y)||ip(y,Ft))&&(this.minimumSupportedRelease=Ft),u.forEach(x=>this._actions[x.name]=x),c.forEach(x=>this._triggers[x.name]=x)}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,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},fi=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 Cr(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function op(e){return/^\d+\.\d+\.\d+$/.test(e)}o(op,"isValidSimpleSemver");function ip(e,t){let[r,n,i]=e.split(".").map(Number),[u,c,d]=t.split(".").map(Number);return r!==u?r<u:n!==c?n<c:i<d}o(ip,"isSemverLessThan");var ap=h(w(a(),w(a(),a()))),gi=p({id:h(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:N(a()),platformId:h(a()),directoryPath:h(a()),auth:h(D([Ze,N(Ze)])),version:a(),categories:h(N(U(Le))),minimumSupportedRelease:h(a()),maximumSupportedRelease:h(a()),i18n:ap}),sp=U(["human","ai","both"]),yi=p({description:h(a()),idempotent:h(B())}),hi=p({name:a(),displayName:a(),description:a(),props:Dr,requireAuth:B(),errorHandlingOptions:h(yr),outputSchema:h(Rt()),audience:h(sp),aiMetadata:h(yi)}),vi=p({name:a(),displayName:a(),description:a(),props:Dr,errorHandlingOptions:h(yr),type:U(ze),sampleData:O(),handshakeConfiguration:h(Rt()),renewConfiguration:h(di),testStrategy:U(mt),outputSchema:h(Rt()),aiMetadata:h(yi)}),up=p({...gi.shape,actions:w(a(),hi),triggers:w(a(),vi)}),cp=p({...gi.shape,actions:Q(),triggers:Q(),suggestedActions:h(N(vi)),suggestedTriggers:h(N(hi))}),xi=p({projectUsage:Q(),tags:h(N(a())),pieceType:U(je),packageType:U(pt),platformId:h(a()),archiveId:h(a())}),T$=p({...up.shape,...xi.shape}),E$=p({...cp.shape,...xi.shape}),$$=p({name:a(),version:a()});var pp=Ne(require("path")),lp=Ne(require("fs/promises"));var Bt=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"};if(t.authentication&&this.populateAuthentication(t.authentication,r),t.body)switch(t.headers?.["Content-Type"]){case"text/csv":r["Content-Type"]="text/csv";break;default:r["Content-Type"]="application/json";break}return t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var Zt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new Ur,r=new Mr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Ur=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Mr=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 Ve=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}}};var Vt=class extends Bt{static{o(this,"FetchHttpClient")}constructor(t="",r=new Zt){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 d=i.toString(),g=d?`${n}?${d}`:n,y=t.responseType??"json",_=t.followRedirects??!0,b=t.retries??0,{body:x,extraHeaders:s,isStream:l}=dp(t.body,u),f=fp({...u,...s}),m=await mp(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:x,redirect:_?"follow":"manual",signal:M.signal};return l&&(re.duplex="half"),r?.dispatcher!==void 0&&(re.dispatcher=r.dispatcher),await fetch(g,re)}finally{Y!==void 0&&clearTimeout(Y)}},b),v=_?300:400;if(m.status<200||m.status>=v){let M=await _i(m,y),Y=new Ve(t.body,{status:m.status,responseBody:M});throw console.error("[HttpClient#(sanitized error message)] Request failed:",Y),Y}let P=await _i(m,y);return{status:m.status,headers:gp(m.headers),body:P}}};function dp(e,t){return hp(e)?{body:void 0,extraHeaders:{},isStream:!1}:yp(e)?{body:e,extraHeaders:e.getHeaders(),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(dp,"serializeBody");async function _i(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();case"json":default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}o(_i,"parseResponseBody");async function mp(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await Pi(n);continue}return i}catch(i){if(r=i,n<t){await Pi(n);continue}throw i}throw r}o(mp,"sendWithRetries");function Pi(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(Pi,"backoff");function fp(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r]=Array.isArray(n)?n.join(", "):n);return t}o(fp,"normalizeHeaders");function gp(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(gp,"toHttpHeaders");function yp(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}o(yp,"isNodeFormData");function hp(e){return e==null}o(hp,"isNil");var J=new Vt;var me=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(me||{});var od=Ne(require("fs")),Ss=Ne($s());var id={"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 ad(e){let t=e.split(";")[0].trim().toLowerCase();return id[t]??""}o(ad,"contentTypeToExtension");var sd=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),ud=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 As({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:d,authLocation:g="headers"}){return ae({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:$.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:y})=>({url:$.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
3
- i.e ${ud(t,y)}/resource or /resource`,required:!0,defaultValue:y?t(y):"",...c?.url??{}})}),"props")}),method:$.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(me).map(y=>({label:y,value:y}))},...c?.method??{}}),headers:$.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:$.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:$.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:$.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:y})=>{if(!y)return{};let _=y,b={};switch(_){case"none":break;case"json":b.data=$.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":b.data=$.LongText({displayName:"Raw Body",required:!0});break;case"form_data":b.data=$.Array({displayName:"Form Data",required:!0,properties:{fieldName:$.ShortText({displayName:"Field Name",required:!0}),fieldType:$.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:$.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:$.File({displayName:"File Field Value",required:!1})}});break}return b},"props")}),response_is_binary:$.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:$.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:$.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:$.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...d},run:o(async y=>{let{method:_,url:b,headers:x,queryParams:s,body:l,body_type:f,failsafe:m,timeout:v,response_is_binary:P,followRedirects:M}=y.propsValue;Ut(_,"Method"),Ut(b,"URL");let Y=xe(r)?{}:await r(y.auth,y.propsValue),re=b.url,Ae=re.startsWith("http://")||re.startsWith("https://")?re:sd({baseUrl:t(y.auth),relativePath:re}),ue={method:_,url:Ae,headers:{...x??{},...g==="headers"||!xe(g)?Y:{}},queryParams:{...g==="queryParams"?Y:{},...s??{}},timeout:v?v*1e3:0,followRedirects:M};if(P&&(ue.responseType="arraybuffer"),l)if(f&&f!=="none"){let ie=l.data;if(f==="form_data"){let Us=ie,_t=new Ss.default;for(let{fieldName:an,fieldType:sn,textFieldValue:un,fileFieldValue:er}of Us)sn==="text"&&!ft(un)?_t.append(an,un):sn==="file"&&!ft(er)&&_t.append(an,er.data,{filename:er?.filename});ue.body=_t,ue.headers={...ue.headers,..._t.getHeaders()}}else ue.body=ie}else f||(ue.body=l);try{let ie=await J.sendRequest(ue);return await cd(y.files,ie.body,ie.status,ie.headers,P)}catch(ie){if(m)return ie.errorMessage();throw ie}},"run")})}o(As,"createCustomApiCallAction");var cd=o(async(e,t,r,n,i)=>{let u;if(i&&pd(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],d=ad(c??"")||"txt",g;t instanceof ArrayBuffer?g=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?g=t:g=Buffer.from(t),u=await e.write({fileName:`output.${d}`,data:g})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),pd=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var ld=`
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 ${zd(t,h)}/resource or /resource`,required:!0,defaultValue:h?t(h):"",...c?.url??{}})}),"props")}),method:S.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(ge).map(h=>({label:h,value:h}))},...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:h})=>{if(!h)return{};let x=h,I={};switch(x){case"none":break;case"json":I.data=S.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":I.data=S.LongText({displayName:"Raw Body",required:!0});break;case"form_data":I.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 I},"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 h=>{let{method:x,url:I,headers:P,queryParams:s,body:d,body_type:f,failsafe:m,timeout:v,response_is_binary:_,followRedirects:M}=h.propsValue;jt(x,"Method"),jt(I,"URL");let Y=le(r)?{}:await r(h.auth,h.propsValue),re=I.url,ke=re.startsWith("http://")||re.startsWith("https://")?re:Ad({baseUrl:t(h.auth),relativePath:re}),ie={method:x,url:ke,headers:{...P??{},...g==="headers"||!le(g)?Y:{}},queryParams:{...g==="queryParams"?Y:{},...s??{}},timeout:v?v*1e3:0,followRedirects:M};if(_&&(ie.responseType="arraybuffer"),d)if(f&&f!=="none"){let ae=d.data;if(f==="form_data"){let Xs=ae,_t=new Fs.default;for(let{fieldName:cn,fieldType:ln,textFieldValue:pn,fileFieldValue:nr}of Xs)ln==="text"&&!gt(pn)?_t.append(cn,pn):ln==="file"&&!gt(nr)&&_t.append(cn,nr.data,{filename:nr?.filename});ie.body=_t,ie.headers={...ie.headers,..._t.getHeaders()}}else ie.body=ae}else f||(ie.body=d);try{let ae=await J.sendRequest(ie);return await Od(h.files,ae.body,ae.status,ae.headers,_)}catch(ae){if(m)return wi({error:ae,requestBody:ie.body});throw ae}},"run")})}o(Bs,"createCustomApiCallAction");var Od=o(async(e,t,r,n,i)=>{let u;if(i&&kd(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],l=Sd(c??"")||"txt",g;t instanceof ArrayBuffer?g=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?g=t:g=Buffer.from(t),u=await e.write({fileName:`output.${l}`,data:g})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),kd=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var wd=`
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=Lt.CustomAuth({description:ld,required:!0,props:{apiKey:Lt.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 Ve&&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"),ks=ae({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:$.LongText({displayName:"Input Text",description:"The text content to generate a presentation from.",required:!0}),additionalInstructions:$.LongText({displayName:"Additional Instructions",description:"Extra instructions for how the presentation should be generated.",required:!1}),exportFormats:$.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:$.ShortText({displayName:"Title",description:"A title for the presentation. If not provided, one will be generated.",required:!1}),themeId:$.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:$.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:$.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:$.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:$.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:$.Checkbox({displayName:"Include AI Images",description:"Whether to include AI-generated images in the presentation.",required:!1,defaultValue:!0}),imageStyle:$.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:$.Checkbox({displayName:"Wait for Completion",description:"Wait for the presentation generation to complete before returning.",required:!1,defaultValue:!1}),maxWaitTime:$.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:d,contentMode:g,amountMode:y,includeAiImages:_,imageStyle:b,waitForCompletion:x,maxWaitTime:s}=e.propsValue,l={input_text:t};r&&(l.additional_instructions=r),n&&n.length>0?l.export_formats=n:l.export_formats=["link"];let f={};i&&(f.title=i),u&&(f.theme_id=u),c&&(f.slide_range=c),Object.keys(f).length>0&&(l.presentation_options=f);let m={};d&&(m.tone=d),g&&(m.content_mode=g),y&&(m.amount_mode=y),Object.keys(m).length>0&&(l.text_options=m);let v={};_!=null&&(v.include_ai_images=_),b&&(v.style=b),Object.keys(v).length>0&&(l.image_options=v);let P=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:l}),M=P.body?.generation_id;if(!M)throw new Error(`Failed to get generation_id from response: ${JSON.stringify(P.body)}`);if(!x)return P.body;await zs(1e3);let Y=(s||300)*1e3,re=Date.now(),Ae=5e3;for(;Date.now()-re<Y;){let ue=await J.sendRequest({method:"GET",url:`https://slides-api.getalai.com/api/v1/generations/${M}`,headers:{Authorization:`Bearer ${e.auth.props.apiKey}`}}),ie=ue.body?.status;if(ie==="completed")return ue.body;if(ie==="failed")throw new Error(`Generation failed: ${ue.body?.error||"Unknown error"}`);await zs(Ae)}throw new Error(`Generation timed out after ${s||300} seconds`)}});var Os=ae({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:$.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 ws=o(e=>new Promise(t=>setTimeout(t,e)),"sleep"),Rs=ae({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:$.ShortText({displayName:"Presentation ID",description:"The ID of the presentation to export.",required:!0}),exportFormats:$.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:$.Checkbox({displayName:"Wait for Completion",description:"Wait for the presentation generation to complete before returning.",required:!1,defaultValue:!1}),maxWaitTime:$.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 ws(1e3);let d=(i||300)*1e3,g=Date.now(),y=5e3;for(;Date.now()-g<d;){let _=await J.sendRequest({method:"GET",url:`https://slides-api.getalai.com/api/v1/generations/${c}`,headers:{Authorization:`Bearer ${e.auth.props.apiKey}`}}),b=_.body?.status;if(b==="completed")return _.body;if(b==="failed")throw new Error(`Generation failed: ${_.body?.error||"Unknown error"}`);await ws(y)}throw new Error(`Generation timed out after ${i||300} seconds`)}});var Ns=$.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 Ds=ae({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:Ns,slide_context:$.LongText({displayName:"Slide Context",description:"The content or topic for the slide to be generated.",required:!0}),additionalInstructions:$.LongText({displayName:"Additional Instructions",description:"Extra instructions for how the slide should be generated.",required:!1}),slide_order:$.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:$.Checkbox({displayName:"Include AI Images",description:"Whether to include AI-generated images in the slide.",required:!1,defaultValue:!0}),imageStyle:$.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,d={};n&&(d.additional_instructions=n),i&&(d.slide_order=isNaN(Number(i))?i:Number(i)),u?d.num_image_variants=c?2:1:d.num_image_variants=0;let g={slide_context:r,options:d,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 Cs=ae({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:$.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 dd=fi({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:[ks,Os,Rs,Ds,Cs,As({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
+ `,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});
11
11
  /*! Bundled license information:
12
12
 
13
13
  mime-types/index.js: