@activepieces/piece-google-tasks 0.5.1 → 0.5.3

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 +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@activepieces/piece-google-tasks",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "main": "./src/index.js",
5
5
  "dependencies": {},
6
6
  "files": [
package/src/index.js CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";var Pu=Object.create;var et=Object.defineProperty;var Tu=Object.getOwnPropertyDescriptor;var bu=Object.getOwnPropertyNames;var Iu=Object.getPrototypeOf,Eu=Object.prototype.hasOwnProperty;var o=(e,t)=>et(e,"name",{value:t,configurable:!0});var S=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},xn=(e,t)=>{for(var r in t)et(e,r,{get:t[r],enumerable:!0})},_n=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of bu(t))!Eu.call(e,i)&&i!==r&&et(e,i,{get:()=>t[i],enumerable:!(n=Tu(t,i))||n.enumerable});return e};var Le=(e,t,r)=>(r=e!=null?Pu(Iu(e)):{},_n(t||!e||!e.__esModule?et(r,"default",{value:e,enumerable:!0}):r,e)),Su=e=>_n(et({},"__esModule",{value:!0}),e);var Zo=S((Vo,qt)=>{(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"),s="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",l={zoneIndex:new RegExp(s,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${s})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${s})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${t}\\.${t}\\.${t}\\.${t}(${s})?$`,"i")};function f(u,d){if(u.indexOf("::")!==u.lastIndexOf("::"))return null;let y=0,m=-1,x=(u.match(l.zoneIndex)||[])[0],P,j;for(x&&(x=x.substring(1),u=u.replace(/%.+$/,""));(m=u.indexOf(":",m+1))>=0;)y++;if(u.substr(0,2)==="::"&&y--,u.substr(-2,2)==="::"&&y--,y>d)return null;for(j=d-y,P=":";j--;)P+="0:";return u=u.replace("::",P),u[0]===":"&&(u=u.slice(1)),u[u.length-1]===":"&&(u=u.slice(0,-1)),d=(function(){let oe=u.split(":"),ce=[];for(let Qe=0;Qe<oe.length;Qe++)ce.push(parseInt(oe[Qe],16));return ce})(),{parts:d,zoneId:x}}o(f,"expandIPv6");function g(u,d,y,m){if(u.length!==d.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let x=0,P;for(;m>0;){if(P=y-m,P<0&&(P=0),u[x]>>P!==d[x]>>P)return!1;m-=y,x+=1}return!0}o(g,"matchCIDR");function v(u){if(i.test(u))return parseInt(u,16);if(u[0]==="0"&&!isNaN(parseInt(u[1],10))){if(n.test(u))return parseInt(u,8);throw new Error(`ipaddr: cannot parse ${u} as octal`)}return parseInt(u,10)}o(v,"parseIntAuto");function b(u,d){for(;u.length<d;)u=`0${u}`;return u}o(b,"padPart");let _={};_.IPv4=(function(){function u(d){if(d.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let y,m;for(y=0;y<d.length;y++)if(m=d[y],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=d}return o(u,"IPv4"),u.prototype.SpecialRanges={unspecified:[[new u([0,0,0,0]),8]],broadcast:[[new u([255,255,255,255]),32]],multicast:[[new u([224,0,0,0]),4]],linkLocal:[[new u([169,254,0,0]),16]],loopback:[[new u([127,0,0,0]),8]],carrierGradeNat:[[new u([100,64,0,0]),10]],private:[[new u([10,0,0,0]),8],[new u([172,16,0,0]),12],[new u([192,168,0,0]),16]],reserved:[[new u([192,0,0,0]),24],[new u([192,0,2,0]),24],[new u([192,88,99,0]),24],[new u([198,18,0,0]),15],[new u([198,51,100,0]),24],[new u([203,0,113,0]),24],[new u([240,0,0,0]),4]],as112:[[new u([192,175,48,0]),24],[new u([192,31,196,0]),24]],amt:[[new u([192,52,193,0]),24]]},u.prototype.kind=function(){return"ipv4"},u.prototype.match=function(d,y){let m;if(y===void 0&&(m=d,d=m[0],y=m[1]),d.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return g(this.octets,d.octets,8,y)},u.prototype.prefixLengthFromSubnetMask=function(){let d=0,y=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},x,P,j;for(x=3;x>=0;x-=1)if(P=this.octets[x],P in m){if(j=m[P],y&&j!==0)return null;j!==8&&(y=!0),d+=j}else return null;return 32-d},u.prototype.range=function(){return _.subnetMatch(this,this.SpecialRanges)},u.prototype.toByteArray=function(){return this.octets.slice(0)},u.prototype.toIPv4MappedAddress=function(){return _.IPv6.parse(`::ffff:${this.toString()}`)},u.prototype.toNormalizedString=function(){return this.toString()},u.prototype.toString=function(){return this.octets.join(".")},u})(),_.IPv4.broadcastAddressFromCIDR=function(u){try{let d=this.parseCIDR(u),y=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),x=[],P=0;for(;P<4;)x.push(parseInt(y[P],10)|parseInt(m[P],10)^255),P++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},_.IPv4.isIPv4=function(u){return this.parser(u)!==null},_.IPv4.isValid=function(u){try{return new this(this.parser(u)),!0}catch{return!1}},_.IPv4.isValidCIDR=function(u){try{return this.parseCIDR(u),!0}catch{return!1}},_.IPv4.isValidFourPartDecimal=function(u){return!!(_.IPv4.isValid(u)&&u.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},_.IPv4.isValidCIDRFourPartDecimal=function(u){let d=u.match(/^(.+)\/(\d+)$/);return!_.IPv4.isValidCIDR(u)||!d?!1:_.IPv4.isValidFourPartDecimal(d[1])},_.IPv4.networkAddressFromCIDR=function(u){let d,y,m,x,P;try{for(d=this.parseCIDR(u),m=d[0].toByteArray(),P=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),x=[],y=0;y<4;)x.push(parseInt(m[y],10)&parseInt(P[y],10)),y++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},_.IPv4.parse=function(u){let d=this.parser(u);if(d===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(d)},_.IPv4.parseCIDR=function(u){let d;if(d=u.match(/^(.+)\/(\d+)$/)){let y=parseInt(d[2]);if(y>=0&&y<=32){let m=[this.parse(d[1]),y];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")},_.IPv4.parser=function(u){let d,y,m;if(d=u.match(r.fourOctet))return(function(){let x=d.slice(1,6),P=[];for(let j=0;j<x.length;j++)y=x[j],P.push(v(y));return P})();if(d=u.match(r.longValue)){if(m=v(d[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return(function(){let x=[],P;for(P=0;P<=24;P+=8)x.push(m>>P&255);return x})().reverse()}else return(d=u.match(r.twoOctet))?(function(){let x=d.slice(1,4),P=[];if(m=v(x[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return P.push(v(x[0])),P.push(m>>16&255),P.push(m>>8&255),P.push(m&255),P})():(d=u.match(r.threeOctet))?(function(){let x=d.slice(1,5),P=[];if(m=v(x[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return P.push(v(x[0])),P.push(v(x[1])),P.push(m>>8&255),P.push(m&255),P})():null},_.IPv4.subnetMaskFromPrefixLength=function(u){if(u=parseInt(u),u<0||u>32)throw new Error("ipaddr: invalid IPv4 prefix length");let d=[0,0,0,0],y=0,m=Math.floor(u/8);for(;y<m;)d[y]=255,y++;return m<4&&(d[m]=Math.pow(2,u%8)-1<<8-u%8),new this(d)},_.IPv6=(function(){function u(d,y){let m,x;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(x=this.parts[m],!(0<=x&&x<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");y&&(this.zoneId=y)}return o(u,"IPv6"),u.prototype.SpecialRanges={unspecified:[new u([0,0,0,0,0,0,0,0]),128],linkLocal:[new u([65152,0,0,0,0,0,0,0]),10],multicast:[new u([65280,0,0,0,0,0,0,0]),8],loopback:[new u([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new u([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new u([0,0,0,0,0,65535,0,0]),96],discard:[new u([256,0,0,0,0,0,0,0]),64],rfc6145:[new u([0,0,0,0,65535,0,0,0]),96],rfc6052:[new u([100,65435,0,0,0,0,0,0]),96],"6to4":[new u([8194,0,0,0,0,0,0,0]),16],teredo:[new u([8193,0,0,0,0,0,0,0]),32],benchmarking:[new u([8193,2,0,0,0,0,0,0]),48],amt:[new u([8193,3,0,0,0,0,0,0]),32],as112v6:[[new u([8193,4,274,0,0,0,0,0]),48],[new u([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new u([8193,16,0,0,0,0,0,0]),28],orchid2:[new u([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new u([8193,48,0,0,0,0,0,0]),28],reserved:[[new u([8193,0,0,0,0,0,0,0]),23],[new u([8193,3512,0,0,0,0,0,0]),32]]},u.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},u.prototype.kind=function(){return"ipv6"},u.prototype.match=function(d,y){let m;if(y===void 0&&(m=d,d=m[0],y=m[1]),d.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return g(this.parts,d.parts,16,y)},u.prototype.prefixLengthFromSubnetMask=function(){let d=0,y=!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},x,P;for(let j=7;j>=0;j-=1)if(x=this.parts[j],x in m){if(P=m[x],y&&P!==0)return null;P!==16&&(y=!0),d+=P}else return null;return 128-d},u.prototype.range=function(){return _.subnetMatch(this,this.SpecialRanges)},u.prototype.toByteArray=function(){let d,y=[],m=this.parts;for(let x=0;x<m.length;x++)d=m[x],y.push(d>>8),y.push(d&255);return y},u.prototype.toFixedLengthString=function(){let d=(function(){let m=[];for(let x=0;x<this.parts.length;x++)m.push(b(this.parts[x].toString(16),4));return m}).call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),d+y},u.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),y=d[0],m=d[1];return new _.IPv4([y>>8,y&255,m>>8,m&255])},u.prototype.toNormalizedString=function(){let d=(function(){let m=[];for(let x=0;x<this.parts.length;x++)m.push(this.parts[x].toString(16));return m}).call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),d+y},u.prototype.toRFC5952String=function(){let d=/((^|:)(0(:|$)){2,})/g,y=this.toNormalizedString(),m=0,x=-1,P;for(;P=d.exec(y);)P[0].length>x&&(m=P.index,x=P[0].length);return x<0?y:`${y.substring(0,m)}::${y.substring(m+x)}`},u.prototype.toString=function(){return this.toRFC5952String()},u})(),_.IPv6.broadcastAddressFromCIDR=function(u){try{let d=this.parseCIDR(u),y=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),x=[],P=0;for(;P<16;)x.push(parseInt(y[P],10)|parseInt(m[P],10)^255),P++;return new this(x)}catch(d){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${d})`)}},_.IPv6.isIPv6=function(u){return this.parser(u)!==null},_.IPv6.isValid=function(u){if(typeof u=="string"&&u.indexOf(":")===-1)return!1;try{let d=this.parser(u);return new this(d.parts,d.zoneId),!0}catch{return!1}},_.IPv6.isValidCIDR=function(u){if(typeof u=="string"&&u.indexOf(":")===-1)return!1;try{return this.parseCIDR(u),!0}catch{return!1}},_.IPv6.networkAddressFromCIDR=function(u){let d,y,m,x,P;try{for(d=this.parseCIDR(u),m=d[0].toByteArray(),P=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),x=[],y=0;y<16;)x.push(parseInt(m[y],10)&parseInt(P[y],10)),y++;return new this(x)}catch(j){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${j})`)}},_.IPv6.parse=function(u){let d=this.parser(u);if(d.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(d.parts,d.zoneId)},_.IPv6.parseCIDR=function(u){let d,y,m;if((y=u.match(/^(.+)\/(\d+)$/))&&(d=parseInt(y[2]),d>=0&&d<=128))return m=[this.parse(y[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")},_.IPv6.parser=function(u){let d,y,m,x,P,j;if(m=u.match(l.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(l.native.test(u))return f(u,8);if((m=u.match(l.transitional))&&(j=m[6]||"",d=m[1],m[1].endsWith("::")||(d=d.slice(0,-1)),d=f(d+j,6),d.parts)){for(P=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],y=0;y<P.length;y++)if(x=P[y],!(0<=x&&x<=255))return null;return d.parts.push(P[0]<<8|P[1]),d.parts.push(P[2]<<8|P[3]),{parts:d.parts,zoneId:d.zoneId}}return null},_.IPv6.subnetMaskFromPrefixLength=function(u){if(u=parseInt(u),u<0||u>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],y=0,m=Math.floor(u/8);for(;y<m;)d[y]=255,y++;return m<16&&(d[m]=Math.pow(2,u%8)-1<<8-u%8),new this(d)},_.fromByteArray=function(u){let d=u.length;if(d===4)return new _.IPv4(u);if(d===16)return new _.IPv6(u);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},_.isValid=function(u){return _.IPv6.isValid(u)||_.IPv4.isValid(u)},_.isValidCIDR=function(u){return _.IPv6.isValidCIDR(u)||_.IPv4.isValidCIDR(u)},_.parse=function(u){if(_.IPv6.isValid(u))return _.IPv6.parse(u);if(_.IPv4.isValid(u))return _.IPv4.parse(u);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},_.parseCIDR=function(u){try{return _.IPv6.parseCIDR(u)}catch{try{return _.IPv4.parseCIDR(u)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},_.process=function(u){let d=this.parse(u);return d.kind()==="ipv6"&&d.isIPv4MappedAddress()?d.toIPv4Address():d},_.subnetMatch=function(u,d,y){let m,x,P,j;y==null&&(y="unicast");for(x in d)if(Object.prototype.hasOwnProperty.call(d,x)){for(P=d[x],P[0]&&!(P[0]instanceof Array)&&(P=[P]),m=0;m<P.length;m++)if(j=P[m],u.kind()===j[0].kind()&&u.match.apply(u,j))return x}return y},typeof qt<"u"&&qt.exports?qt.exports=_:e.ipaddr=_})(Vo)});var Gi=S((B$,Hi)=>{var Zi=require("stream").Stream,up=require("util");Hi.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");up.inherits(pe,Zi);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=Zi.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 Ji=S((Z$,Ki)=>{var cp=require("util"),Wi=require("stream").Stream,qi=Gi();Ki.exports=X;function X(){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(X,"CombinedStream");cp.inherits(X,Wi);X.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};X.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};X.prototype.append=function(e){var t=X.isStreamLike(e);if(t){if(!(e instanceof qi)){var r=qi.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};X.prototype.pipe=function(e,t){return Wi.prototype.pipe.call(this,e,t),this.resume(),e};X.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}};X.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=X.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};X.prototype._pipeNext=function(e){this._currentStream=e;var t=X.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()};X.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};X.prototype.write=function(e){this.emit("data",e)};X.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};X.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")};X.prototype.end=function(){this._reset(),this.emit("end")};X.prototype.destroy=function(){this._reset(),this.emit("close")};X.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};X.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};X.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)};X.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Yi=S((G$,Xi)=>{"use strict";Xi.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 ta=S(ne=>{"use strict";var Yt=Yi(),lp=require("path").extname,Qi=/^\s*([^;\s]*)(?:;|\s|$)/,pp=/^text\//i;ne.charset=ea;ne.charsets={lookup:ea};ne.contentType=dp;ne.extension=mp;ne.extensions=Object.create(null);ne.lookup=fp;ne.types=Object.create(null);gp(ne.extensions,ne.types);function ea(e){if(!e||typeof e!="string")return!1;var t=Qi.exec(e),r=t&&Yt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&pp.test(t[1])?"UTF-8":!1}o(ea,"charset");function dp(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?ne.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=ne.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(dp,"contentType");function mp(e){if(!e||typeof e!="string")return!1;var t=Qi.exec(e),r=t&&ne.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(mp,"extension");function fp(e){if(!e||typeof e!="string")return!1;var t=lp("x."+e).toLowerCase().substr(1);return t&&ne.types[t]||!1}o(fp,"lookup");function gp(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Yt).forEach(o(function(i){var s=Yt[i],c=s.extensions;if(!(!c||!c.length)){e[i]=c;for(var l=0;l<c.length;l++){var f=c[l];if(t[f]){var g=r.indexOf(Yt[t[f]].source),v=r.indexOf(s.source);if(t[f]!=="application/octet-stream"&&(g>v||g===v&&t[f].substr(0,12)==="application/"))continue}t[f]=i}}},"forEachMimeType"))}o(gp,"populateMaps")});var na=S((K$,ra)=>{ra.exports=yp;function yp(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(yp,"defer")});var Kr=S((X$,ia)=>{var oa=na();ia.exports=hp;function hp(e){var t=!1;return oa(function(){t=!0}),o(function(n,i){t?e(n,i):oa(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(hp,"async")});var Jr=S((Q$,aa)=>{aa.exports=vp;function vp(e){Object.keys(e.jobs).forEach(xp.bind(e)),e.jobs={}}o(vp,"abort");function xp(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(xp,"clean")});var Xr=S((tk,ua)=>{var sa=Kr(),_p=Jr();ua.exports=Pp;function Pp(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=Tp(t,i,e[i],function(s,c){i in r.jobs&&(delete r.jobs[i],s?_p(r):r.results[i]=c,n(s,r.results))})}o(Pp,"iterate");function Tp(e,t,r,n){var i;return e.length==2?i=e(r,sa(n)):i=e(r,t,sa(n)),i}o(Tp,"runJob")});var Yr=S((nk,ca)=>{ca.exports=bp;function bp(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,s){return t(e[i],e[s])}),n}o(bp,"state")});var Qr=S((ik,la)=>{var Ip=Jr(),Ep=Kr();la.exports=Sp;function Sp(e){Object.keys(this.jobs).length&&(this.index=this.size,Ip(this),Ep(e)(null,this.results))}o(Sp,"terminator")});var da=S((sk,pa)=>{var Ap=Xr(),$p=Yr(),kp=Qr();pa.exports=zp;function zp(e,t,r){for(var n=$p(e);n.index<(n.keyedList||e).length;)Ap(e,t,n,function(i,s){if(i){r(i,s);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return kp.bind(n,r)}o(zp,"parallel")});var en=S((ck,Qt)=>{var ma=Xr(),Op=Yr(),wp=Qr();Qt.exports=Rp;Qt.exports.ascending=fa;Qt.exports.descending=Np;function Rp(e,t,r,n){var i=Op(e,r);return ma(e,t,i,o(function s(c,l){if(c){n(c,l);return}if(i.index++,i.index<(i.keyedList||e).length){ma(e,t,i,s);return}n(null,i.results)},"iteratorHandler")),wp.bind(i,n)}o(Rp,"serialOrdered");function fa(e,t){return e<t?-1:e>t?1:0}o(fa,"ascending");function Np(e,t){return-1*fa(e,t)}o(Np,"descending")});var ya=S((pk,ga)=>{var Dp=en();ga.exports=Cp;function Cp(e,t,r){return Dp(e,t,null,r)}o(Cp,"serial")});var va=S((mk,ha)=>{ha.exports={parallel:da(),serial:ya(),serialOrdered:en()}});var tn=S((fk,xa)=>{"use strict";xa.exports=Object});var Pa=S((gk,_a)=>{"use strict";_a.exports=Error});var ba=S((yk,Ta)=>{"use strict";Ta.exports=EvalError});var Ea=S((hk,Ia)=>{"use strict";Ia.exports=RangeError});var Aa=S((vk,Sa)=>{"use strict";Sa.exports=ReferenceError});var ka=S((xk,$a)=>{"use strict";$a.exports=SyntaxError});var er=S((_k,za)=>{"use strict";za.exports=TypeError});var wa=S((Pk,Oa)=>{"use strict";Oa.exports=URIError});var Na=S((Tk,Ra)=>{"use strict";Ra.exports=Math.abs});var Ca=S((bk,Da)=>{"use strict";Da.exports=Math.floor});var Ma=S((Ik,Ua)=>{"use strict";Ua.exports=Math.max});var ja=S((Ek,La)=>{"use strict";La.exports=Math.min});var Ba=S((Sk,Fa)=>{"use strict";Fa.exports=Math.pow});var Za=S((Ak,Va)=>{"use strict";Va.exports=Math.round});var Ga=S(($k,Ha)=>{"use strict";Ha.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var Wa=S((zk,qa)=>{"use strict";var Up=Ga();qa.exports=o(function(t){return Up(t)||t===0?t:t<0?-1:1},"sign")});var Ja=S((wk,Ka)=>{"use strict";Ka.exports=Object.getOwnPropertyDescriptor});var rn=S((Rk,Xa)=>{"use strict";var tr=Ja();if(tr)try{tr([],"length")}catch{tr=null}Xa.exports=tr});var Qa=S((Nk,Ya)=>{"use strict";var rr=Object.defineProperty||!1;if(rr)try{rr({},"a",{value:1})}catch{rr=!1}Ya.exports=rr});var nn=S((Dk,es)=>{"use strict";es.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 s 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 ns=S((Uk,rs)=>{"use strict";var ts=typeof Symbol<"u"&&Symbol,Mp=nn();rs.exports=o(function(){return typeof ts!="function"||typeof Symbol!="function"||typeof ts("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Mp()},"hasNativeSymbols")});var on=S((Lk,os)=>{"use strict";os.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var an=S((jk,is)=>{"use strict";var Lp=tn();is.exports=Lp.getPrototypeOf||null});var us=S((Fk,ss)=>{"use strict";var jp="Function.prototype.bind called on incompatible ",Fp=Object.prototype.toString,Bp=Math.max,Vp="[object Function]",as=o(function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var s=0;s<r.length;s+=1)n[s+t.length]=r[s];return n},"concatty"),Zp=o(function(t,r){for(var n=[],i=r||0,s=0;i<t.length;i+=1,s+=1)n[s]=t[i];return n},"slicy"),Hp=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");ss.exports=o(function(t){var r=this;if(typeof r!="function"||Fp.apply(r)!==Vp)throw new TypeError(jp+r);for(var n=Zp(arguments,1),i,s=o(function(){if(this instanceof i){var v=r.apply(this,as(n,arguments));return Object(v)===v?v:this}return r.apply(t,as(n,arguments))},"binder"),c=Bp(0,r.length-n.length),l=[],f=0;f<c;f++)l[f]="$"+f;if(i=Function("binder","return function ("+Hp(l,",")+"){ return binder.apply(this,arguments); }")(s),r.prototype){var g=o(function(){},"Empty");g.prototype=r.prototype,i.prototype=new g,g.prototype=null}return i},"bind")});var We=S((Vk,cs)=>{"use strict";var Gp=us();cs.exports=Function.prototype.bind||Gp});var nr=S((Zk,ls)=>{"use strict";ls.exports=Function.prototype.call});var sn=S((Hk,ps)=>{"use strict";ps.exports=Function.prototype.apply});var ms=S((Gk,ds)=>{"use strict";ds.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var gs=S((qk,fs)=>{"use strict";var qp=We(),Wp=sn(),Kp=nr(),Jp=ms();fs.exports=Jp||qp.call(Kp,Wp)});var hs=S((Wk,ys)=>{"use strict";var Xp=We(),Yp=er(),Qp=nr(),ed=gs();ys.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new Yp("a function is required");return ed(Xp,Qp,t)},"callBindBasic")});var bs=S((Jk,Ts)=>{"use strict";var td=hs(),vs=rn(),_s;try{_s=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var un=!!_s&&vs&&vs(Object.prototype,"__proto__"),Ps=Object,xs=Ps.getPrototypeOf;Ts.exports=un&&typeof un.get=="function"?td([un.get]):typeof xs=="function"?o(function(t){return xs(t==null?t:Ps(t))},"getDunder"):!1});var $s=S((Yk,As)=>{"use strict";var Is=on(),Es=an(),Ss=bs();As.exports=Is?o(function(t){return Is(t)},"getProto"):Es?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Es(t)},"getProto"):Ss?o(function(t){return Ss(t)},"getProto"):null});var cn=S((ez,ks)=>{"use strict";var rd=Function.prototype.call,nd=Object.prototype.hasOwnProperty,od=We();ks.exports=od.call(rd,nd)});var Cs=S((tz,Ds)=>{"use strict";var L,id=tn(),ad=Pa(),sd=ba(),ud=Ea(),cd=Aa(),Ye=ka(),Xe=er(),ld=wa(),pd=Na(),dd=Ca(),md=Ma(),fd=ja(),gd=Ba(),yd=Za(),hd=Wa(),Rs=Function,ln=o(function(e){try{return Rs('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),Tt=rn(),vd=Qa(),pn=o(function(){throw new Xe},"throwTypeError"),xd=Tt?(function(){try{return arguments.callee,pn}catch{try{return Tt(arguments,"callee").get}catch{return pn}}})():pn,Ke=ns()(),te=$s(),_d=an(),Pd=on(),Ns=sn(),bt=nr(),Je={},Td=typeof Uint8Array>"u"||!te?L:te(Uint8Array),Me={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?L:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?L:ArrayBuffer,"%ArrayIteratorPrototype%":Ke&&te?te([][Symbol.iterator]()):L,"%AsyncFromSyncIteratorPrototype%":L,"%AsyncFunction%":Je,"%AsyncGenerator%":Je,"%AsyncGeneratorFunction%":Je,"%AsyncIteratorPrototype%":Je,"%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%":ad,"%eval%":eval,"%EvalError%":sd,"%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%":Rs,"%GeneratorFunction%":Je,"%Int8Array%":typeof Int8Array>"u"?L:Int8Array,"%Int16Array%":typeof Int16Array>"u"?L:Int16Array,"%Int32Array%":typeof Int32Array>"u"?L:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ke&&te?te(te([][Symbol.iterator]())):L,"%JSON%":typeof JSON=="object"?JSON:L,"%Map%":typeof Map>"u"?L:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ke||!te?L:te(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":id,"%Object.getOwnPropertyDescriptor%":Tt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?L:Promise,"%Proxy%":typeof Proxy>"u"?L:Proxy,"%RangeError%":ud,"%ReferenceError%":cd,"%Reflect%":typeof Reflect>"u"?L:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?L:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ke||!te?L:te(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?L:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ke&&te?te(""[Symbol.iterator]()):L,"%Symbol%":Ke?Symbol:L,"%SyntaxError%":Ye,"%ThrowTypeError%":xd,"%TypedArray%":Td,"%TypeError%":Xe,"%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%":ld,"%WeakMap%":typeof WeakMap>"u"?L:WeakMap,"%WeakRef%":typeof WeakRef>"u"?L:WeakRef,"%WeakSet%":typeof WeakSet>"u"?L:WeakSet,"%Function.prototype.call%":bt,"%Function.prototype.apply%":Ns,"%Object.defineProperty%":vd,"%Object.getPrototypeOf%":_d,"%Math.abs%":pd,"%Math.floor%":dd,"%Math.max%":md,"%Math.min%":fd,"%Math.pow%":gd,"%Math.round%":yd,"%Math.sign%":hd,"%Reflect.getPrototypeOf%":Pd};if(te)try{null.error}catch(e){zs=te(te(e)),Me["%Error.prototype%"]=zs}var zs,bd=o(function e(t){var r;if(t==="%AsyncFunction%")r=ln("async function () {}");else if(t==="%GeneratorFunction%")r=ln("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=ln("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&te&&(r=te(i.prototype))}return Me[t]=r,r},"doEval"),Os={__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"]},It=We(),or=cn(),Id=It.call(bt,Array.prototype.concat),Ed=It.call(Ns,Array.prototype.splice),ws=It.call(bt,String.prototype.replace),ir=It.call(bt,String.prototype.slice),Sd=It.call(bt,RegExp.prototype.exec),Ad=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,$d=/\\(\\)?/g,kd=o(function(t){var r=ir(t,0,1),n=ir(t,-1);if(r==="%"&&n!=="%")throw new Ye("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ye("invalid intrinsic syntax, expected opening `%`");var i=[];return ws(t,Ad,function(s,c,l,f){i[i.length]=l?ws(f,$d,"$1"):c||s}),i},"stringToPath"),zd=o(function(t,r){var n=t,i;if(or(Os,n)&&(i=Os[n],n="%"+i[0]+"%"),or(Me,n)){var s=Me[n];if(s===Je&&(s=bd(n)),typeof s>"u"&&!r)throw new Xe("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new Ye("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");Ds.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new Xe("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Xe('"allowMissing" argument must be a boolean');if(Sd(/^%?[^%]*%?$/,t)===null)throw new Ye("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=kd(t),i=n.length>0?n[0]:"",s=zd("%"+i+"%",r),c=s.name,l=s.value,f=!1,g=s.alias;g&&(i=g[0],Ed(n,Id([0,1],g)));for(var v=1,b=!0;v<n.length;v+=1){var _=n[v],u=ir(_,0,1),d=ir(_,-1);if((u==='"'||u==="'"||u==="`"||d==='"'||d==="'"||d==="`")&&u!==d)throw new Ye("property names with quotes must have matching quotes");if((_==="constructor"||!b)&&(f=!0),i+="."+_,c="%"+i+"%",or(Me,c))l=Me[c];else if(l!=null){if(!(_ in l)){if(!r)throw new Xe("base intrinsic for "+t+" exists, but the property is not available.");return}if(Tt&&v+1>=n.length){var y=Tt(l,_);b=!!y,b&&"get"in y&&!("originalValue"in y.get)?l=y.get:l=l[_]}else b=or(l,_),l=l[_];b&&!f&&(Me[c]=l)}}return l},"GetIntrinsic")});var Ms=S((nz,Us)=>{"use strict";var Od=nn();Us.exports=o(function(){return Od()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Fs=S((iz,js)=>{"use strict";var wd=Cs(),Ls=wd("%Object.defineProperty%",!0),Rd=Ms()(),Nd=cn(),Dd=er(),ar=Rd?Symbol.toStringTag:null;js.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");ar&&(n||!Nd(t,ar))&&(Ls?Ls(t,ar,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[ar]=r)},"setToStringTag")});var Vs=S((sz,Bs)=>{"use strict";var Cd=Function.prototype.call,Ud=Object.prototype.hasOwnProperty,Md=We();Bs.exports=Md.call(Cd,Ud)});var Hs=S((uz,Zs)=>{"use strict";Zs.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var Ws=S((cz,qs)=>{"use strict";var gn=Ji(),Ld=require("util"),dn=require("path"),jd=require("http"),Fd=require("https"),Bd=require("url").parse,Vd=require("fs"),Zd=require("stream").Stream,Hd=require("crypto"),mn=ta(),Gd=va(),qd=Fs(),we=Vs(),fn=Hs();function Gs(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(Gs,"escapeHeaderParam");function F(e){if(!(this instanceof F))return new F(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],gn.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(F,"FormData");Ld.inherits(F,gn);F.LINE_BREAK=`\r
2
- `;F.DEFAULT_CONTENT_TYPE="application/octet-stream";F.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=gn.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),s=this._multiPartFooter();n(i),n(t),n(s),this._trackLength(i,t,r)};F.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)+F.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&we(t,"httpVersion"))&&!(t instanceof Zd))&&(r.knownLength||this._valuesToMeasure.push(t))};F.prototype._lengthRetriever=function(e,t){we(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):Vd.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):we(e,"httpVersion")?t(null,Number(e.headers["content-length"])):we(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};F.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),s="",c={"Content-Disposition":["form-data",'name="'+Gs(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&fn(c,r.header);var l;for(var f in c)if(we(c,f)){if(l=c[f],l==null)continue;Array.isArray(l)||(l=[l]),l.length&&(s+=f+": "+l.join("; ")+F.LINE_BREAK)}return"--"+this.getBoundary()+F.LINE_BREAK+s+F.LINE_BREAK};F.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=dn.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=dn.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&we(e,"httpVersion")&&(r=dn.basename(e.client._httpMessage.path||"")),r)return'filename="'+Gs(r)+'"'};F.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=mn.lookup(e.name)),!r&&e&&e.path&&(r=mn.lookup(e.path)),!r&&e&&e.readable&&we(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=mn.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=F.DEFAULT_CONTENT_TYPE),r};F.prototype._multiPartFooter=function(){return function(e){var t=F.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};F.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+F.LINE_BREAK};F.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)we(e,t)&&(r[t.toLowerCase()]=e[t]);return r};F.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};F.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};F.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(F.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};F.prototype._generateBoundary=function(){this._boundary="--------------------------"+Hd.randomBytes(12).toString("hex")};F.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};F.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};F.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}Gd.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};F.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=Bd(e),n=fn({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=fn(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=Fd.request(n):r=jd.request(n),this.getLength(function(s,c){if(s&&s!=="Unknown stream"){this._error(s);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),t){var l,f=o(function(g,v){return r.removeListener("error",f),r.removeListener("response",l),t.call(this,g,v)},"callback");l=f.bind(this,null),r.on("error",f),r.on("response",l)}}.bind(this)),r};F.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};F.prototype.toString=function(){return"[object FormData]"};qd(F.prototype,"FormData");qs.exports=F});var sm={};xn(sm,{googleTasks:()=>am});module.exports=Su(sm);var Au=Object.freeze({status:"aborted"});function T(e,t,r){function n(l,f){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:f,constr:c,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,f);let g=c.prototype,v=Object.keys(g);for(let b=0;b<v.length;b++){let _=v[b];_ in l||(l[_]=g[_].bind(l))}}o(n,"init");let i=r?.Parent??Object;class s extends i{static{o(this,"Definition")}}Object.defineProperty(s,"name",{value:e});function c(l){var f;let g=r?.Parent?new s:this;n(g,l),(f=g._zod).deferred??(f.deferred=[]);for(let v of g._zod.deferred)v();return g}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(T,"$constructor");var de=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},At=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},lr={};function ye(e){return e&&Object.assign(lr,e),lr}o(ye,"config");function dr(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(dr,"getEnumValues");function Tn(e,t){return typeof t=="bigint"?t.toString():t}o(Tn,"jsonStringifyReplacer");function kt(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(kt,"cached");function bn(e){return e==null}o(bn,"nullish");function zt(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(zt,"cleanRegex");var Pn=Symbol("evaluating");function Y(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Pn)return n===void 0&&(n=Pn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(Y,"defineLazy");var mr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function tt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(tt,"isObject");var $u=kt(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function In(e){if(tt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(tt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(In,"isPlainObject");var En=new Set(["string","number","symbol"]);function je(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(je,"escapeRegex");function Ot(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o(Ot,"clone");function H(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(H,"normalizeParams");function Sn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(Sn,"optionalKeys");var An={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 Fe(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(Fe,"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 $t(e){return typeof e=="string"?e:e?.message}o($t,"unwrapMessage");function Ie(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=$t(e.inst?._zod.def?.error?.(e))??$t(t?.error?.(e))??$t(r.customError?.(e))??$t(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 fr(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(fr,"issue");var kn=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,Tn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),zn=T("$ZodError",kn),rt=T("$ZodError",kn,{Parent:Error});var zu=o(e=>(t,r,n,i)=>{let s=n?Object.assign(n,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},s);if(c instanceof Promise)throw new de;if(c.issues.length){let l=new(i?.Err??e)(c.issues.map(f=>Ie(f,s,ye())));throw mr(l,i?.callee),l}return c.value},"_parse"),wt=zu(rt),Ou=o(e=>async(t,r,n,i)=>{let s=n?Object.assign(n,{async:!0}):{async:!0},c=t._zod.run({value:r,issues:[]},s);if(c instanceof Promise&&(c=await c),c.issues.length){let l=new(i?.Err??e)(c.issues.map(f=>Ie(f,s,ye())));throw mr(l,i?.callee),l}return c.value},"_parseAsync"),Rt=Ou(rt),wu=o(e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new de;return s.issues.length?{success:!1,error:new(e??zn)(s.issues.map(c=>Ie(c,i,ye())))}:{success:!0,data:s.value}},"_safeParse"),nt=wu(rt),Ru=o(e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(c=>Ie(c,i,ye())))}:{success:!0,data:s.value}},"_safeParseAsync"),ot=Ru(rt);var Nu="(?:(?:\\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(`^${Nu}$`);var On=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),wn=/^-?\d+n?$/,Rn=/^-?\d+$/,gr=/^-?\d+(?:\.\d+)?$/,Nn=/^(?:true|false)$/i;var Ee=T("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Cu={number:"number",bigint:"bigint",object:"date"};var Dn=T("$ZodCheckGreaterThan",(e,t)=>{Ee.init(e,t);let r=Cu[typeof t.value];e._zod.onattach.push(n=>{let i=n._zod.bag,s=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(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 Cn=T("$ZodCheckNumberFormat",(e,t)=>{Ee.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,s]=An[t.format];e._zod.onattach.push(c=>{let l=c._zod.bag;l.format=t.format,l.minimum=i,l.maximum=s,r&&(l.pattern=Rn)}),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>s&&c.issues.push({origin:"number",input:l,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}});var Un=T("$ZodCheckMinLength",(e,t)=>{var r;Ee.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!bn(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 yr=T("$ZodCheckStringFormat",(e,t)=>{var r,n;Ee.init(e,t),e._zod.onattach.push(i=>{let s=i._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.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=()=>{})}),Mn=T("$ZodCheckRegex",(e,t)=>{yr.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 jn={major:4,minor:3,patch:6};var q=T("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=jn;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let s of i._zod.onattach)s(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,f)=>{let g=Fe(c),v;for(let b of l){if(b._zod.def.when){if(!b._zod.def.when(c))continue}else if(g)continue;let _=c.issues.length,u=b._zod.check(c);if(u instanceof Promise&&f?.async===!1)throw new de;if(v||u instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await u,c.issues.length!==_&&(g||(g=Fe(c,_)))});else{if(c.issues.length===_)continue;g||(g=Fe(c,_))}}return v?v.then(()=>c):c},"runChecks"),s=o((c,l,f)=>{if(Fe(c))return c.aborted=!0,c;let g=i(l,n,f);if(g instanceof Promise){if(f.async===!1)throw new de;return g.then(v=>e._zod.parse(v,f))}return e._zod.parse(g,f)},"handleCanaryResult");e._zod.run=(c,l)=>{if(l.skipChecks)return e._zod.parse(c,l);if(l.direction==="backward"){let g=e._zod.parse({value:c.value,issues:[]},{...l,skipChecks:!0});return g instanceof Promise?g.then(v=>s(v,c,l)):s(g,c,l)}let f=e._zod.parse(c,l);if(f instanceof Promise){if(l.async===!1)throw new de;return f.then(g=>i(g,n,l))}return i(f,n,l)}}Y(e,"~standard",()=>({validate:o(i=>{try{let s=nt(e,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return ot(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Ct=T("$ZodString",(e,t)=>{q.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??On(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}}),hr=T("$ZodStringFormat",(e,t)=>{yr.init(e,t),Ct.init(e,t)});var Hn=T("$ZodURL",(e,t)=>{hr.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 vr=T("$ZodNumber",(e,t)=>{q.init(e,t),e._zod.pattern=e._zod.bag.pattern??gr,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 s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...s?{received:s}:{}}),r}}),Gn=T("$ZodNumberFormat",(e,t)=>{Cn.init(e,t),vr.init(e,t)}),xr=T("$ZodBoolean",(e,t)=>{q.init(e,t),e._zod.pattern=Nn,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}}),qn=T("$ZodBigInt",(e,t)=>{q.init(e,t),e._zod.pattern=wn,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 Wn=T("$ZodAny",(e,t)=>{q.init(e,t),e._zod.parse=r=>r}),Kn=T("$ZodUnknown",(e,t)=>{q.init(e,t),e._zod.parse=r=>r});var Jn=T("$ZodVoid",(e,t)=>{q.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}}),Xn=T("$ZodDate",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,s=i instanceof Date;return s&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...s?{received:"Invalid Date"}:{},inst:e}),r}});function Fn(e,t,r){e.issues.length&&t.issues.push(...be(r,e.issues)),t.value[r]=e.value}o(Fn,"handleArrayResult");var Yn=T("$ZodArray",(e,t)=>{q.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 s=[];for(let c=0;c<i.length;c++){let l=i[c],f=t.element._zod.run({value:l,issues:[]},n);f instanceof Promise?s.push(f.then(g=>Fn(g,r,c))):Fn(f,r,c)}return s.length?Promise.all(s).then(()=>r):r}});function Dt(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(Dt,"handlePropertyResult");function Uu(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=Sn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(Uu,"normalizeDef");function Mu(e,t,r,n,i,s){let c=[],l=i.keySet,f=i.catchall._zod,g=f.def.type,v=f.optout==="optional";for(let b in t){if(l.has(b))continue;if(g==="never"){c.push(b);continue}let _=f.run({value:t[b],issues:[]},n);_ instanceof Promise?e.push(_.then(u=>Dt(u,r,b,t,v))):Dt(_,r,b,t,v)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}o(Mu,"handleCatchall");var Qn=T("$ZodObject",(e,t)=>{if(q.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let l=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let f={...l};return Object.defineProperty(t,"shape",{value:f}),f},"get")})}let n=kt(()=>Uu(t));Y(e._zod,"propValues",()=>{let l=t.shape,f={};for(let g in l){let v=l[g]._zod;if(v.values){f[g]??(f[g]=new Set);for(let b of v.values)f[g].add(b)}}return f});let i=tt,s=t.catchall,c;e._zod.parse=(l,f)=>{c??(c=n.value);let g=l.value;if(!i(g))return l.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),l;l.value={};let v=[],b=c.shape;for(let _ of c.keys){let u=b[_],d=u._zod.optout==="optional",y=u._zod.run({value:g[_],issues:[]},f);y instanceof Promise?v.push(y.then(m=>Dt(m,l,_,g,d))):Dt(y,l,_,g,d)}return s?Mu(v,g,l,f,n.value,e):v.length?Promise.all(v).then(()=>l):l}});function Bn(e,t,r,n){for(let s of e)if(s.issues.length===0)return t.value=s.value,t;let i=e.filter(s=>!Fe(s));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(s=>s.issues.map(c=>Ie(c,n,ye())))}),t)}o(Bn,"handleUnionResults");var _r=T("$ZodUnion",(e,t)=>{q.init(e,t),Y(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Y(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Y(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Y(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${i.map(s=>zt(s.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,s)=>{if(r)return n(i,s);let c=!1,l=[];for(let f of t.options){let g=f._zod.run({value:i.value,issues:[]},s);if(g instanceof Promise)l.push(g),c=!0;else{if(g.issues.length===0)return g;l.push(g)}}return c?Promise.all(l).then(f=>Bn(f,i,e,s)):Bn(l,i,e,s)}});var eo=T("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,_r.init(e,t);let r=e._zod.parse;Y(e._zod,"propValues",()=>{let i={};for(let s of t.options){let c=s._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let[l,f]of Object.entries(c)){i[l]||(i[l]=new Set);for(let g of f)i[l].add(g)}}return i});let n=kt(()=>{let i=t.options,s=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 f of l){if(s.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);s.set(f,c)}}return s});e._zod.parse=(i,s)=>{let c=i.value;if(!tt(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,s):t.unionFallback?r(i,s):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}});var to=T("$ZodRecord",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!In(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let s=[],c=t.keyType._zod.values;if(c){r.value={};let l=new Set;for(let g of c)if(typeof g=="string"||typeof g=="number"||typeof g=="symbol"){l.add(typeof g=="number"?g.toString():g);let v=t.valueType._zod.run({value:i[g],issues:[]},n);v instanceof Promise?s.push(v.then(b=>{b.issues.length&&r.issues.push(...be(g,b.issues)),r.value[g]=b.value})):(v.issues.length&&r.issues.push(...be(g,v.issues)),r.value[g]=v.value)}let f;for(let g in i)l.has(g)||(f=f??[],f.push(g));f&&f.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:f})}else{r.value={};for(let l of Reflect.ownKeys(i)){if(l==="__proto__")continue;let f=t.keyType._zod.run({value:l,issues:[]},n);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&gr.test(l)&&f.issues.length){let b=t.keyType._zod.run({value:Number(l),issues:[]},n);if(b instanceof Promise)throw new Error("Async schemas not supported in object keys currently");b.issues.length===0&&(f=b)}if(f.issues.length){t.mode==="loose"?r.value[l]=i[l]:r.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(b=>Ie(b,n,ye())),input:l,path:[l],inst:e});continue}let v=t.valueType._zod.run({value:i[l],issues:[]},n);v instanceof Promise?s.push(v.then(b=>{b.issues.length&&r.issues.push(...be(l,b.issues)),r.value[f.value]=b.value})):(v.issues.length&&r.issues.push(...be(l,v.issues)),r.value[f.value]=v.value)}}return s.length?Promise.all(s).then(()=>r):r}});var ro=T("$ZodEnum",(e,t)=>{q.init(e,t);let r=dr(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>En.has(typeof i)).map(i=>typeof i=="string"?je(i):i.toString()).join("|")})$`),e._zod.parse=(i,s)=>{let c=i.value;return n.has(c)||i.issues.push({code:"invalid_value",values:r,input:c,inst:e}),i}}),no=T("$ZodLiteral",(e,t)=>{if(q.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"?je(n):n?je(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let s=n.value;return r.has(s)||n.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),n}});var oo=T("$ZodTransform",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new At(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 Vn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(Vn,"handleOptionalResult");var io=T("$ZodOptional",(e,t)=>{q.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Y(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Y(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${zt(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(s=>Vn(s,r.value)):Vn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var ao=T("$ZodNullable",(e,t)=>{q.init(e,t),Y(e._zod,"optin",()=>t.innerType._zod.optin),Y(e._zod,"optout",()=>t.innerType._zod.optout),Y(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${zt(r.source)}|null)$`):void 0}),Y(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 so=T("$ZodPipe",(e,t)=>{q.init(e,t),Y(e._zod,"values",()=>t.in._zod.values),Y(e._zod,"optin",()=>t.in._zod.optin),Y(e._zod,"optout",()=>t.out._zod.optout),Y(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let s=t.out._zod.run(r,n);return s instanceof Promise?s.then(c=>Nt(c,t.in,n)):Nt(s,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Nt(s,t.out,n)):Nt(i,t.out,n)}});function Nt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(Nt,"handlePipeResult");var uo=T("$ZodCustom",(e,t)=>{Ee.init(e,t),q.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(s=>Zn(s,r,n,e));Zn(i,r,n,e)}});function Zn(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(fr(i))}}o(Zn,"handleRefineResult");var lo;var Pr=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 po(){return new Pr}o(po,"registry");(lo=globalThis).__zod_globalRegistry??(lo.__zod_globalRegistry=po());var Tr=globalThis.__zod_globalRegistry;function mo(e,t){return new e({type:"string",...H(t)})}o(mo,"_string");function fo(e,t){return new e({type:"string",coerce:!0,...H(t)})}o(fo,"_coercedString");function go(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...H(t)})}o(go,"_url");function yo(e,t){return new e({type:"number",checks:[],...H(t)})}o(yo,"_number");function ho(e,t){return new e({type:"number",coerce:!0,checks:[],...H(t)})}o(ho,"_coercedNumber");function vo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...H(t)})}o(vo,"_int");function xo(e,t){return new e({type:"boolean",...H(t)})}o(xo,"_boolean");function _o(e,t){return new e({type:"boolean",coerce:!0,...H(t)})}o(_o,"_coercedBoolean");function Po(e,t){return new e({type:"bigint",coerce:!0,...H(t)})}o(Po,"_coercedBigint");function To(e){return new e({type:"any"})}o(To,"_any");function bo(e){return new e({type:"unknown"})}o(bo,"_unknown");function Io(e,t){return new e({type:"void",...H(t)})}o(Io,"_void");function Eo(e,t){return new e({type:"date",coerce:!0,...H(t)})}o(Eo,"_coercedDate");function Ut(e,t){return new Dn({check:"greater_than",...H(t),value:e,inclusive:!0})}o(Ut,"_gte");function le(e,t){return new Un({check:"min_length",...H(t),minimum:e})}o(le,"_minLength");function Se(e,t){return new Mn({check:"string_format",format:"regex",...H(t),pattern:e})}o(Se,"_regex");function So(e,t,r){let n=H(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(So,"_custom");var Q=T("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");q.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>wt(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>nt(e,r,n),e.parseAsync=async(r,n)=>Rt(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>ot(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)=>Ot(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.apply=r=>r(e)}),Lt=T("ZodMiniString",(e,t)=>{Ct.init(e,t),Q.init(e,t)});function a(e){return mo(Lt,e)}o(a,"string");var Ao=T("ZodMiniStringFormat",(e,t)=>{hr.init(e,t),Lt.init(e,t)});var Xu=T("ZodMiniURL",(e,t)=>{Hn.init(e,t),Ao.init(e,t)});function $o(e){return go(Xu,e)}o($o,"url");var jt=T("ZodMiniNumber",(e,t)=>{vr.init(e,t),Q.init(e,t)});function re(e){return yo(jt,e)}o(re,"number");var Yu=T("ZodMiniNumberFormat",(e,t)=>{Gn.init(e,t),jt.init(e,t)});function ko(e){return vo(Yu,e)}o(ko,"int");var br=T("ZodMiniBoolean",(e,t)=>{xr.init(e,t),Q.init(e,t)});function V(e){return xo(br,e)}o(V,"boolean");var zo=T("ZodMiniBigInt",(e,t)=>{qn.init(e,t),Q.init(e,t)});var Qu=T("ZodMiniAny",(e,t)=>{Wn.init(e,t),Q.init(e,t)});function at(){return To(Qu)}o(at,"any");var ec=T("ZodMiniUnknown",(e,t)=>{Kn.init(e,t),Q.init(e,t)});function O(){return bo(ec)}o(O,"unknown");var tc=T("ZodMiniVoid",(e,t)=>{Jn.init(e,t),Q.init(e,t)});function Oo(e){return Io(tc,e)}o(Oo,"_void");var wo=T("ZodMiniDate",(e,t)=>{Xn.init(e,t),Q.init(e,t)});var rc=T("ZodMiniArray",(e,t)=>{Yn.init(e,t),Q.init(e,t)});function N(e,t){return new rc({type:"array",element:e,...H(t)})}o(N,"array");var nc=T("ZodMiniObject",(e,t)=>{Qn.init(e,t),Q.init(e,t),Y(e,"shape",()=>t.shape)});function p(e,t){let r={type:"object",shape:e??{},...H(t)};return new nc(r)}o(p,"object");var oc=T("ZodMiniUnion",(e,t)=>{_r.init(e,t),Q.init(e,t)});function D(e,t){return new oc({type:"union",options:e,...H(t)})}o(D,"union");var ic=T("ZodMiniDiscriminatedUnion",(e,t)=>{eo.init(e,t),Q.init(e,t)});function Ae(e,t,r){return new ic({type:"union",options:t,discriminator:e,...H(r)})}o(Ae,"discriminatedUnion");var ac=T("ZodMiniRecord",(e,t)=>{to.init(e,t),Q.init(e,t)});function w(e,t,r){return new ac({type:"record",keyType:e,valueType:t,...H(r)})}o(w,"record");var sc=T("ZodMiniEnum",(e,t)=>{ro.init(e,t),Q.init(e,t),e.options=Object.values(t.entries)});function M(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new sc({type:"enum",entries:r,...H(t)})}o(M,"_enum");var uc=T("ZodMiniLiteral",(e,t)=>{no.init(e,t),Q.init(e,t)});function A(e,t){return new uc({type:"literal",values:Array.isArray(e)?e:[e],...H(t)})}o(A,"literal");var cc=T("ZodMiniTransform",(e,t)=>{oo.init(e,t),Q.init(e,t)});function $e(e){return new cc({type:"transform",transform:e})}o($e,"transform");var lc=T("ZodMiniOptional",(e,t)=>{io.init(e,t),Q.init(e,t)});function h(e){return new lc({type:"optional",innerType:e})}o(h,"optional");var pc=T("ZodMiniNullable",(e,t)=>{ao.init(e,t),Q.init(e,t)});function st(e){return new pc({type:"nullable",innerType:e})}o(st,"nullable");var dc=T("ZodMiniPipe",(e,t)=>{so.init(e,t),Q.init(e,t)});function ke(e,t){return new dc({type:"pipe",in:e,out:t})}o(ke,"pipe");var mc=T("ZodMiniCustom",(e,t)=>{uo.init(e,t),Q.init(e,t)});function Ft(e,t){return So(mc,e??(()=>!0),t)}o(Ft,"custom");var ut={};xn(ut,{bigint:()=>xc,boolean:()=>vc,date:()=>_c,number:()=>hc,string:()=>yc});function yc(e){return fo(Lt,e)}o(yc,"string");function hc(e){return ho(jt,e)}o(hc,"number");function vc(e){return _o(br,e)}o(vc,"boolean");function xc(e){return Po(zo,e)}o(xc,"bigint");function _c(e){return Eo(wo,e)}o(_c,"date");var Er=p({retryOnFailure:p({defaultValue:h(V()),hide:h(V())}),continueOnFailure:p({defaultValue:h(V()),hide:h(V())})}),Ir=class{constructor(t,r,n,i,s,c,l,f,g,v,b){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=s;this.test=c;this.requireAuth=l;this.errorHandlingOptions=f;this.outputSchema=g;this.audience=v;this.aiMetadata=b}static{o(this,"IAction")}},W=o(e=>new Ir(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 B=p({displayName:a(),description:h(a())}),C=o((e,t)=>p({type:A(t),required:V(),defaultValue:h(at())}),"TPropertyValue");var ie=p({...B.shape,...C(a(),"SHORT_TEXT").shape}),he=p({...B.shape,...C(a(),"LONG_TEXT").shape});var No=p({label:a(),value:O()}),Bt=p({disabled:h(V()),placeholder:h(a()),options:N(No)});var ae=p({...B.shape,options:Bt,...C(O(),"STATIC_DROPDOWN").shape}),ve=p({...B.shape,options:Bt,...C(N(O()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Sr=p({...B.shape,...C(O(),"DROPDOWN").shape,refreshers:N(a())}),ct=p({...B.shape,...C(N(O()),"MULTI_SELECT_DROPDOWN").shape,refreshers:N(a())});var xe=p({...B.shape,...C(V(),"CHECKBOX").shape});var _e=p({...B.shape,...C(re(),"NUMBER").shape});var lt=p({...B.shape,streaming:h(V()),...C(O(),"FILE").shape});var pt=p({...B.shape,...C(a(),"DATE_TIME").shape});var Do=w(a(),D([ie,he,ae,ct,ve,xe,_e,lt,pt])),dt=p({...B.shape,properties:Do,...C(N(O()),"ARRAY").shape});var mt=p({...B.shape,...C(D([w(a(),O())]),"JSON").shape});var Co=D([ie,ae,mt,dt,ve]),Tc=w(a(),Co),Ar=p({refreshers:N(a()),...B.shape,...C(O(),"DYNAMIC").shape});var Vt=p({...B.shape,...C(Oo(),"MARKDOWN").shape});var ft=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(ft||{}),Be=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Be||{}),Ve=(x=>(x.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",x.COMMUNICATION="COMMUNICATION",x.COMMERCE="COMMERCE",x.CORE="CORE",x.UNIVERSAL_AI="UNIVERSAL_AI",x.FLOW_CONTROL="FLOW_CONTROL",x.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",x.ACCOUNTING="ACCOUNTING",x.PRODUCTIVITY="PRODUCTIVITY",x.CONTENT_AND_FILES="CONTENT_AND_FILES",x.DEVELOPER_TOOLS="DEVELOPER_TOOLS",x.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",x.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",x.HUMAN_RESOURCES="HUMAN_RESOURCES",x.PAYMENT_PROCESSING="PAYMENT_PROCESSING",x.MARKETING="MARKETING",x.SALES_AND_CRM="SALES_AND_CRM",x))(Ve||{});var gt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(gt||{}),$r="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||{}),yt=(s=>(s.NONE="NONE",s.HEADER_PRESENT="HEADER_PRESENT",s.QUERY_PRESENT="QUERY_PRESENT",s.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",s.HEAD_REQUEST="HEAD_REQUEST",s))(yt||{}),bc=p({strategy:M(yt),paramName:h(a())}),ht=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(ht||{});var Zt=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Zt||{}),Uo=p({status:h(re()),body:h(O()),headers:h(w(a(),a()))}),Mo=p({type:A("DELAY"),resumeDateTime:a(),requestIdToReply:h(a()),handlerId:h(a()),streamStepProgress:h(M(Zt))}),Lo=p({type:A("WEBHOOK"),requestId:a(),requestIdToReply:h(a()),response:Uo,handlerId:h(a()),streamStepProgress:h(M(Zt))}),Ic=D([Mo,Lo]);var Ec=p({body:O(),rawBody:h(O()),headers:w(a(),a()),queryParams:w(a(),a())});function ee(e){return e==null}o(ee,"isNil");function vt(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(vt,"isEmpty");function Ht(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(Ht,"assertNotNullOrUndefined");var kr=Le(require("crypto"),1);var Sc=128,De,Ze,Ac=o(e=>{!De||De.length<e?(De=Buffer.allocUnsafe(e*Sc),kr.default.randomFillSync(De),Ze=0):Ze+e>De.length&&(kr.default.randomFillSync(De),Ze=0),Ze+=e},"fillPool"),$c=o(e=>(Ac(e|=0),De.subarray(Ze-e,Ze)),"random"),kc=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(s=t)=>{let c="";for(;;){let l=r(i),f=i;for(;f--;)if(c+=e[l[f]&n]||"",c.length===s)return c}}},"customRandom"),Fo=o((e,t=21)=>kc(e,t,$c),"customAlphabet");var zc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Bo=21,BT=a().check(Se(new RegExp(`^[0-9a-zA-Z]{${Bo}}$`))),Oc=Fo(zc,Bo);var Oe=ke($e(e=>e instanceof Date?e.toISOString():e),a()),se={id:a(),created:Oe,updated:Oe},G=o(e=>h(st(e)),"Nullable");function zr(e){return h(st(M(e)))}o(zr,"NullableEnum");var HT=ke($e(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),h(V())),Gt=o(e=>ke($e(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),h(N(e))),"OptionalArrayFromQuery");var WT=w(a(),O());var xt=(v=>(v.OPENAI="openai",v.OPENROUTER="openrouter",v.ANTHROPIC="anthropic",v.AZURE="azure",v.GOOGLE="google",v.ACTIVEPIECES="activepieces",v.CLOUDFLARE_GATEWAY="cloudflare-gateway",v.CUSTOM="custom",v.BEDROCK="bedrock",v.MISTRAL="mistral",v))(xt||{});var ab=a().check(Se(/^#[0-9A-Fa-f]{6}$/));var ub=p({filename:a(),data:O(),type:A("file"),mimetype:h(a())});var wc=Le(Zo());var gb=p({...se,name:a(),permissions:N(a()),platformId:G(a()),type:a(),userCount:h(re())});var Ho=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Ho||{}),Or=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Or||{}),wr=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(wr||{});var Rr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Rr||{});var Nr=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Nr||{});var Rc=p({mode:M(Ho),value:O()}),Nc=p({auth:h(a()),fields:w(a(),Rc)}),Dc=p({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:h(Nc)}),Cc=p({type:A("PIECE"),toolName:a().check(le(1)),pieceMetadata:Dc}),Uc=p({type:A("none")}),Mc=p({type:A("access_token"),accessToken:a()}),Lc=p({type:A("api_key"),apiKey:a(),apiKeyHeader:a()}),jc=p({type:A("headers"),headers:w(a(),a())}),Fc=Ae("type",[Uc,Mc,Lc,jc]),Go=p({type:A("FLOW"),toolName:a().check(le(1)),externalFlowId:a(),flowDisplayName:h(a())}),qo=p({type:A("MCP"),toolName:a().check(le(1)),serverUrl:$o(),protocol:M(wr),auth:Fc}),Wo=p({type:A("KNOWLEDGE_BASE"),toolName:a().check(le(1)),sourceType:M(Or),sourceId:a(),sourceName:a()}),Bc=Ae("type",[Cc,Go,qo,Wo]),Vc=p({displayName:a(),description:h(a()),type:M(Rr)}),Ko=p({type:A("MARKDOWN"),markdown:a()}),He={type:A("TOOL_CALL"),input:G(w(a(),O())),output:h(O()),toolName:a(),status:M(Nr),toolCallId:a(),startTime:a(),endTime:h(a())},Gb=p(He),Jo=Ae("toolCallType",[p({...He,toolCallType:A("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),p({...He,toolCallType:A("FLOW"),displayName:a(),externalFlowId:a()}),p({...He,toolCallType:A("MCP"),displayName:a(),serverUrl:a()}),p({...He,toolCallType:A("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),p({...He,toolCallType:A("UNKNOWN"),displayName:a()})]),Zc=D([Ko,Jo]);var Dr=(r=>(r.IMAGE="image",r.TEXT="text",r))(Dr||{}),Pe=p({apiKey:a()}),Hc=Pe,Gc=p({apiKey:a(),apiKeyHash:a()}),qc=Pe,Wc=Pe,Kc=Pe,Jc=Pe,Xc=Pe,Yc=Pe,Qc=Pe,ti=p({accessKeyId:a().check(le(1)),secretAccessKey:a().check(le(1))}),el=p({}),tl=p({}),rl=p({}),nl=p({}),ol=p({}),il=p({}),ri=p({modelId:a(),modelName:a(),modelType:M(Dr)}),ni=p({apiKeyHeader:a(),baseUrl:a(),models:N(ri),defaultHeaders:h(w(a(),a()))}),oi=p({accountId:a(),gatewayId:a(),models:N(ri),vertexProject:h(a()),vertexRegion:h(a())}),ii=p({resourceName:a(),apiVersion:ke($e(e=>typeof e=="string"&&e.trim().length===0?void 0:e),h(a()))}),ai=p({region:a().check(le(1))}),al=D([Hc,Kc,Jc,Xc,Yc,Wc,qc,Gc,ti,Qc]),si=D([ni,oi,ii,ai,el,rl,nl,ol,tl,il]),sl=p({id:a(),name:a(),type:M(Dr)}),ul=p({id:a(),name:a(),provider:M(xt),config:si,enabledForChat:V()}),cl=p({provider:M(xt),config:si,auth:al,platformId:a()});var Jb={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},Xo=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],ll=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],pl=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],Yo=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],dl=["grok-4.20","grok-4.1-fast"],ml={openai:Xo,anthropic:ll,google:Yo,activepieces:[...pl.map(e=>`anthropic/${e}`),...Xo.map(e=>`openai/${e}`),...Yo.map(e=>`google/${e}`),...dl.map(e=>`x-ai/${e}`)]};var Qo=128e3,fl={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function gl({provider:e}){return e?fl[e]??Qo:Qo}o(gl,"getMaxContextTokens");var ei={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"},yl={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},hl=new Set(["anthropic","mistral"]);function me(e){return{chatModels:ml[e],maxContextTokens:gl({provider:e}),defaultEmbeddingModel:ei[e],supportsEmbedding:ei[e]!==void 0,supportsImageGeneration:!hl.has(e),webSearch:yl[e]}}o(me,"buildProviderCapabilities");var vl={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 xl=p({base64Url:a(),fileName:a(),extension:h(a())}),_l=p({mimeType:a(),url:a(),fileName:h(a())}),Cr=D([xl,_l]);var Pl=D([p({type:A("file"),value:Cr}),p({type:A("markdown"),value:a(),files:h(N(Cr))})]),Tl=p({sessionId:a(),message:a(),files:h(N(a()))});var ci=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(ci||{}),li=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(li||{}),Ur=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Ur||{});var bl=D([p({...se,name:a(),externalId:a(),type:A("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:p({options:N(p({value:a()}))})}),p({...se,name:a(),externalId:a(),type:D([A("TEXT"),A("NUMBER"),A("DATE")]),tableId:a(),projectId:a()})]),Il=p({...se,name:a(),folderId:G(a()),projectId:a(),externalId:a(),status:zr(li),trigger:zr(ci)}),El=p({...se,tableId:a(),projectId:a(),cells:w(a(),p({updated:a(),created:a(),value:O(),fieldName:a()}))}),Sl=p({events:N(M(Ur)),webhookUrl:a(),flowId:a()}),Al=p({fields:N(p({id:a(),name:a()})),rows:N(w(a(),a())),name:a()}),$l=p({projectId:a(),limit:h(ut.number()),cursor:h(a()),name:h(a()),externalIds:Gt(a()),folderId:h(a()),folderIds:Gt(a())}),kl=p({records:N(N(p({fieldId:a(),value:di()}))),tableId:a()}),zl=p({cells:h(N(p({fieldId:a(),value:di()}))),tableId:a(),agentUpdate:h(V())}),pi=Ae("operator",[Ce("eq"),Ce("neq"),Ce("gt"),Ce("gte"),Ce("lt"),Ce("lte"),Ce("co"),ui("exists"),ui("not_exists")]),Ol=p({tableId:a(),limit:h(ut.number()),cursor:h(a()),filters:Gt(pi)});function di(){return ke($e(e=>e==null?e:String(e)),st(a()))}o(di,"coerceToString");function Ce(e){return p({fieldId:a(),operator:A(e),value:a()})}o(Ce,"valueFilter");function ui(e){return p({fieldId:a(),operator:A(e)})}o(ui,"existenceFilter");var wl=p({status:h(re()),body:h(O()),headers:h(w(a(),a()))}),Rl=p({...se,deleted:G(Oe),ownerId:a(),displayName:a(),platformId:a(),externalId:G(a())});var mi=p({name:a(),description:h(a()),type:a(),required:V()}),Nl=p({pieceName:a(),triggerName:a(),input:p({toolName:a(),toolDescription:a(),inputSchema:N(mi),returnsResponse:V()})});var fi="^[0-9]+\\.[0-9]+\\.[0-9]+$",gI=new RegExp(fi),Cl="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",yI=a().check(Se(new RegExp(fi))),hI=a().check(Se(new RegExp(Cl))),Ul=p({packageType:A("ARCHIVE"),pieceType:M(Be),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),gi=p({packageType:A("REGISTRY"),pieceType:A("OFFICIAL"),pieceName:a(),pieceVersion:a()}),yi=p({packageType:A("REGISTRY"),pieceType:A("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),vI=D([gi,yi]),xI=D([Ul,gi,yi]);var Ml=Ae("type",[p({type:A("CRON_EXPRESSION"),cronExpression:a(),timezone:a()}),p({type:A("INTERVAL"),intervalMs:ko().check(Ut(6e4))})]),_I=p({...se,type:M(ze),projectId:a(),flowId:a(),triggerName:a(),schedule:G(Ml),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:G(a()),simulate:V()}),hi=(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))(hi||{}),vi=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(vi||{}),xi=(r=>(r.S3="S3",r.DB="DB",r))(xi||{}),PI=p({...se,projectId:G(a()),platformId:G(a()),type:M(hi),compression:M(vi),data:h(O()),location:M(xi),size:G(re()),fileName:G(a()),s3Key:G(a()),metadata:G(w(a(),a()))}),_i=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(_i||{}),Pi=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(Pi||{}),TI=p({id:a(),email:a(),firstName:a(),status:M(Pi),externalId:G(a()),platformId:G(a()),platformRole:M(_i),lastName:a(),created:Oe,updated:Oe,lastActiveDate:G(Oe),imageUrl:G(a())});var Mr=p({...B.shape,...C(w(a(),O()),"OBJECT").shape});var Ei=p({...B.shape,...C(a(),"COLOR").shape});var Lr=D([ie,he,Vt,xe,ae,ve,Sr,ct,Ar,_e,dt,Mr,mt,pt,lt,Ei]),I={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:h(a())});var Si=p({username:a(),password:a()}),jr=p({...fe.shape,username:p({displayName:a(),description:h(a())}),password:p({displayName:a(),description:h(a())}),...C(Si,"BASIC_AUTH").shape});var Bl=w(a(),D([ie,he,_e,xe,ae])),Fr=p({...fe.shape,props:Bl,...C(O(),"CUSTOM_AUTH").shape});var Ue=p({...fe.shape,...C(p({auth:a()}),"SECRET_TEXT").shape});var Vl=w(a(),D([ie,he,Ue,_e,xe,ae,ve,Vt])),Ai=p({...fe.shape,props:Vl,...C(O(),"OIDC").shape});var Br=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Br||{}),$i=D([ie,Ue,ae]),ki=w(a(),$i),Zl=p({props:h(w(a(),$i)),authUrl:a(),tokenUrl:a(),scope:N(a()),prompt:h(D([A("none"),A("consent"),A("login"),A("omit")])),pkce:h(V()),pkceMethod:h(D([A("plain"),A("S256")])),authorizationMethod:h(M(Br)),grantType:h(D([M(gt),A($r)])),extra:h(w(a(),a()))}),zi=p({access_token:a(),props:h(ki),data:w(a(),at())}),Vr=p({...fe.shape,...Zl.shape,...C(zi,"OAUTH2").shape});var Ge=D([jr,Fr,Ai,Vr,Ue]),_t="Connection",Zr={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||_t}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||_t,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||_t}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||_t}},None(){}};var eS={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 Hl=p({...B.shape,...C(O(),"CUSTOM").shape,code:a()});var Gl=D([Lr,Ge]),Hr=w(a(),Gl),_S=w(a(),Lr);var Oi=D([p({strategy:A("CRON"),cronExpression:a()}),p({strategy:A("NONE")})]),qe=class{constructor(t,r,n,i,s,c,l,f,g,v,b,_,u,d,y,m,x,P,j){this.name=t;this.displayName=r;this.description=n;this.requireAuth=i;this.props=s;this.type=c;this.handshakeConfiguration=l;this.onHandshake=f;this.renewConfiguration=g;this.onRenew=v;this.onEnable=b;this.onDisable=_;this.onStart=u;this.run=d;this.test=y;this.sampleData=m;this.testStrategy=x;this.outputSchema=P;this.aiMetadata=j}static{o(this,"ITrigger")}},wi=o(e=>{switch(e.type){case"WEBHOOK":return new qe(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,e.handshakeConfiguration??{strategy:"NONE"},e.onHandshake??(async()=>({status:200})),e.renewConfiguration??{strategy:"NONE"},e.onRenew??(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,e.test?"TEST_FUNCTION":"SIMULATION",e.outputSchema,e.aiMetadata);case"POLLING":return new qe(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"MANUAL":return new qe(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"APP_WEBHOOK":return new qe(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,ee(e.sampleData)&&ee(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var Ri="2",Wt="0.82.0";var Gr=class{constructor(t,r,n,i,s,c,l,f,g=Wt,v,b="",_){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=l;this.auth=f;this.minimumSupportedRelease=g;this.maximumSupportedRelease=v;this.description=b;this.deprecated=_;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:Ri}),"getContextInfo");(!ql(g)||Wl(g,Wt))&&(this.minimumSupportedRelease=Wt),s.forEach(u=>this._actions[u.name]=u),c.forEach(u=>this._triggers[u.name]=u)}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}},Ni=o(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,i)=>n===i.findIndex(s=>s.type===r.type)))throw new Error("Auth properties must be unique by type");return new Gr(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 ql(e){return/^\d+\.\d+\.\d+$/.test(e)}o(ql,"isValidSimpleSemver");function Wl(e,t){let[r,n,i]=e.split(".").map(Number),[s,c,l]=t.split(".").map(Number);return r!==s?r<s:n!==c?n<c:i<l}o(Wl,"isSemverLessThan");var Kl=h(w(a(),w(a(),a()))),Di=p({id:h(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:N(a()),platformId:h(a()),directoryPath:h(a()),auth:h(D([Ge,N(Ge)])),version:a(),categories:h(N(M(Ve))),minimumSupportedRelease:h(a()),maximumSupportedRelease:h(a()),deprecated:h(V()),i18n:Kl}),Jl=M(["human","ai","both"]),Ci=p({description:h(a()),idempotent:h(V())}),Ui=p({name:a(),displayName:a(),description:a(),props:Hr,requireAuth:V(),errorHandlingOptions:h(Er),outputSchema:h(Ft()),audience:h(Jl),aiMetadata:h(Ci)}),Mi=p({name:a(),displayName:a(),description:a(),props:Hr,errorHandlingOptions:h(Er),type:M(ze),sampleData:O(),handshakeConfiguration:h(Ft()),renewConfiguration:h(Oi),testStrategy:M(ht),outputSchema:h(Ft()),aiMetadata:h(Ci)}),Xl=p({...Di.shape,actions:w(a(),Ui),triggers:w(a(),Mi)}),Yl=p({...Di.shape,actions:re(),triggers:re(),suggestedActions:h(N(Ui)),suggestedTriggers:h(N(Mi))}),Li=p({projectUsage:re(),pieceType:M(Be),packageType:M(ft),platformId:h(a()),archiveId:h(a())}),_A=p({...Xl.shape,...Li.shape}),PA=p({...Yl.shape,...Li.shape}),TA=p({name:a(),version:a()});var Ql=Le(require("path")),ep=Le(require("fs/promises"));var Vi=require("node:stream");var Kt=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((s,c)=>{i.append(c,s)}),{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 Jt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new qr,r=new Wr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},qr=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Wr=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 Pt=class extends Error{constructor(r,n){let i=n.status||500,s=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:i,body:s},request:{body:r}}));this.requestBody=r;this.status=i,this.responseBody=s}static{o(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};function ji({error:e,requestBody:t}){return e instanceof Pt?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}o(ji,"toFailsafeOutput");var ue=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(ue||{});var Xt=class extends Kt{static{o(this,"FetchHttpClient")}constructor(t="",r=new Jt){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(t),s=this.getHeaders(t),c=t.queryParams??{};for(let[j,oe]of Object.entries(c))i.append(j,oe);let l=i.toString(),f=l?`${n}?${l}`:n,g=t.responseType??"json",v=t.followRedirects??!0,b=t.retries??0,{body:_,extraHeaders:u,isStream:d}=tp(t.method)?rp(t.body,s):{body:void 0,extraHeaders:{},isStream:!1},y=op({...s,...u}),m=await np(async()=>{let j=new AbortController,oe=t.timeout&&t.timeout>0?setTimeout(()=>j.abort(),t.timeout):void 0;try{let ce={method:t.method.toString(),headers:y,body:_,redirect:v?"follow":"manual",signal:j.signal};return d&&(ce.duplex="half"),r?.dispatcher!==void 0&&(ce.dispatcher=r.dispatcher),await fetch(f,ce)}finally{oe!==void 0&&clearTimeout(oe)}},b),x=v?300:400;if(m.status<200||m.status>=x){let j=await Fi(m,g),oe=new Pt(t.body,{status:m.status,responseBody:j});throw console.error("[HttpClient#(sanitized error message)] Request failed:",oe),oe}let P=await Fi(m,g);return{status:m.status,headers:ip(m.headers),body:P}}};function tp(e){return e!=="GET"&&e!=="HEAD"}o(tp,"acceptsRequestBody");function rp(e,t){if(sp(e))return{body:void 0,extraHeaders:{},isStream:!1};if(ap(e)){let n=new Vi.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(rp,"serializeBody");async function Fi(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(Fi,"parseResponseBody");async function np(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await Bi(n);continue}return i}catch(i){if(r=i,n<t){await Bi(n);continue}throw i}throw r}o(np,"sendWithRetries");function Bi(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(Bi,"backoff");function op(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(op,"normalizeHeaders");function ip(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(ip,"toHttpHeaders");function ap(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}o(ap,"isNodeFormData");function sp(e){return e==null}o(sp,"isNil");var J=new Xt;var Wd=Le(require("fs")),Ks=Le(Ws());var Kd={"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 Jd(e){let t=e.split(";")[0].trim().toLowerCase();return Kd[t]??""}o(Jd,"contentTypeToExtension");var Xd=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),Yd=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 Js({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:s,props:c,extraProps:l,authLocation:f="headers"}){return W({audience:"human",name:s||"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:I.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:g})=>({url:I.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
3
- i.e ${Yd(t,g)}/resource or /resource`,required:!0,defaultValue:g?t(g):"",...c?.url??{}})}),"props")}),method:I.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(ue).map(g=>({label:g,value:g}))},...c?.method??{}}),headers:I.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:I.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:I.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:I.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:g})=>{if(!g)return{};let v=g,b={};switch(v){case"none":break;case"json":b.data=I.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":b.data=I.LongText({displayName:"Raw Body",required:!0});break;case"form_data":b.data=I.Array({displayName:"Form Data",required:!0,properties:{fieldName:I.ShortText({displayName:"Field Name",required:!0}),fieldType:I.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:I.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:I.File({displayName:"File Field Value",required:!1})}});break}return b},"props")}),response_is_binary:I.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:I.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:I.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:I.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...l},run:o(async g=>{let{method:v,url:b,headers:_,queryParams:u,body:d,body_type:y,failsafe:m,timeout:x,response_is_binary:P,followRedirects:j}=g.propsValue;Ht(v,"Method"),Ht(b,"URL");let oe=ee(r)?{}:await r(g.auth,g.propsValue),ce=b.url,Qe=ce.startsWith("http://")||ce.startsWith("https://")?ce:Xd({baseUrl:t(g.auth),relativePath:ce}),Te={method:v,url:Qe,headers:{..._??{},...f==="headers"||!ee(f)?oe:{}},queryParams:{...f==="queryParams"?oe:{},...u??{}},timeout:x?x*1e3:0,followRedirects:j};if(P&&(Te.responseType="arraybuffer"),d)if(y&&y!=="none"){let ge=d.data;if(y==="form_data"){let _u=ge,St=new Ks.default;for(let{fieldName:yn,fieldType:hn,textFieldValue:vn,fileFieldValue:cr}of _u)hn==="text"&&!vt(vn)?St.append(yn,vn):hn==="file"&&!vt(cr)&&St.append(yn,cr.data,{filename:cr?.filename});Te.body=St,Te.headers={...Te.headers,...St.getHeaders()}}else Te.body=ge}else y||(Te.body=d);try{let ge=await J.sendRequest(Te);return await Qd(g.files,ge.body,ge.status,ge.headers,P)}catch(ge){if(m)return ji({error:ge,requestBody:Te.body});throw ge}},"run")})}o(Js,"createCustomApiCallAction");var Qd=o(async(e,t,r,n,i)=>{let s;if(i&&em(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],l=Jd(c??"")||"txt",f;t instanceof ArrayBuffer?f=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?f=t:f=Buffer.from(t),s=await e.write({fileName:`output.${l}`,data:f})}else s=t;return{status:r,headers:n,body:s}},"handleBinaryResponse"),em=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var Et={async poll(e,{store:t,auth:r,propsValue:n,maxItemsToPoll:i,files:s,server:c}){switch(e.strategy){case 0:{let l=await t.get("lastPoll");if(ee(l))throw new Error("lastPoll doesn't exist in the store.");let f=await e.items({store:t,auth:r,propsValue:n,lastFetchEpochMS:l,server:c}),g=f.reduce((v,b)=>Math.max(v,b.epochMilliSeconds),l);return await t.put("lastPoll",g),f.filter(v=>v.epochMilliSeconds>l).map(v=>v.data)}case 1:{let l=await t.get("lastItem"),f=await e.items({store:t,auth:r,propsValue:n,lastItemId:l,files:s,server:c}),g=f.findIndex(_=>_.id===l),v=[];ee(l)||g==-1?v=f??[]:v=f?.slice(0,g)??[],ee(i)||(v=v.slice(-i));let b=v?.[0]?.id;return ee(b)||await t.put("lastItem",b),v.map(_=>_.data)}}},async onEnable(e,{store:t,auth:r,propsValue:n,server:i}){switch(e.strategy){case 0:{await t.put("lastPoll",Date.now());break}case 1:{let c=(await e.items({store:t,auth:r,propsValue:n,lastItemId:null,server:i}))?.[0]?.id;ee(c)?await t.delete("lastItem"):await t.put("lastItem",c);break}}},async onDisable(e,t){switch(e.strategy){case 0:case 1:return}},async test(e,{auth:t,propsValue:r,store:n,files:i,server:s}){let c=[];switch(e.strategy){case 0:{c=await e.items({store:n,auth:t,propsValue:r,lastFetchEpochMS:0,server:s});break}case 1:{c=await e.items({store:n,auth:t,propsValue:r,lastItemId:null,files:i,server:s});break}}return tm(c.map(l=>l.data))}};function tm(e){return e.length<=5?e:e.slice(0,5)}o(tm,"getFirstFiveOrAll");var Z=Zr.OAuth2({description:"",authUrl:"https://accounts.google.com/o/oauth2/auth",tokenUrl:"https://oauth2.googleapis.com/token",required:!0,scope:["https://www.googleapis.com/auth/tasks"]});var U={baseUrl:"https://tasks.googleapis.com",tasksList:I.Dropdown({displayName:"Tasks List",auth:Z,refreshers:[],required:!0,options:o(async({auth:e})=>e?{disabled:!1,options:(await rm(e)).map(n=>({label:n.title,value:n.id}))}:{disabled:!0,placeholder:"Please connect your account first",options:[]},"options")}),title:I.ShortText({displayName:"Title",required:!0}),notes:I.LongText({displayName:"Notes",required:!1}),due:I.DateTime({displayName:"Due Date",description:"Due date of the task (YYYY-MM-DD)",required:!1}),completed:I.Checkbox({displayName:"Completed",description:"Mark task as completed",required:!1})};async function rm(e){let t={method:"GET",url:`${U.baseUrl}/tasks/v1/users/@me/lists`,authentication:{type:"BEARER_TOKEN",token:e.access_token}};return(await J.sendRequest(t)).body.items}o(rm,"getLists");async function sr(e,t,r){let n={method:"GET",url:`${U.baseUrl}/tasks/v1/lists/${t}/tasks`,authentication:{type:"BEARER_TOKEN",token:e.access_token},queryParams:r};return(await J.sendRequest(n)).body.items??[]}o(sr,"getTasks");async function Xs(e,t,r){let n={method:"POST",url:`${U.baseUrl}/tasks/v1/lists/${t}/tasks`,authentication:{type:"BEARER_TOKEN",token:e.access_token},body:r};return J.sendRequest(n)}o(Xs,"createTask");var Ne=[{key:"title",label:"Title"},{key:"status",label:"Status"},{key:"id",label:"Task ID"},{key:"notes",label:"Notes"},{key:"due",label:"Due Date",format:"date"},{key:"completed",label:"Completed At",format:"datetime"},{key:"updated",label:"Updated At",format:"datetime"},{key:"parent",label:"Parent Task ID"},{key:"position",label:"Position"},{key:"webViewLink",label:"Task Link",format:"url"}],nm=[{key:"title",label:"Title"},{key:"id",label:"Task List ID"},{key:"updated",label:"Updated At",format:"datetime"}],Ys={fields:Ne},Qs={fields:Ne},eu={fields:Ne},tu={fields:Ne},ru={fields:Ne},nu={fields:[{key:"body",label:"Task",value:"body",children:Ne}]},ou={fields:[{key:"tasks",label:"Tasks",listItems:Ne,labelKey:"title"},{key:"count",label:"Count",format:"number"}]},iu={fields:[{key:"taskLists",label:"Task Lists",listItems:nm,labelKey:"title"},{key:"count",label:"Count",format:"number"}]},au={fields:[{key:"cleared",label:"Cleared",format:"boolean"}]},su={fields:[{key:"deleted",label:"Deleted",format:"boolean"},{key:"alreadyAbsent",label:"Already Absent",format:"boolean"}]},uu={fields:Ne};var cu=W({auth:Z,name:"add_task",description:"Add a new task to a specified task list",audience:"human",aiMetadata:{description:"Creates a new task in a specific Google Tasks list, with optional notes, due date, and a completed flag. Use to add a to-do item for the authenticated user; requires a valid task-list ID (resolve it first if you only have a list name). Not idempotent: each call appends a separate task even with identical input.",idempotent:!1},displayName:"Add Task",outputSchema:nu,props:{tasks_list:U.tasksList,title:U.title,notes:U.notes,due:U.due,completed:U.completed},async run({auth:e,propsValue:t}){let r={kind:"tasks#task",status:t.completed?"completed":"needsAction",title:t.title,completed:t.completed?new Date().toISOString():"",notes:t.notes,due:t.due?`${new Date(t.due).toISOString().split("T")[0]}T00:00:00Z`:void 0};return Xs(e,t.tasks_list,r)}});var lu=W({auth:Z,name:"find_tasks",displayName:"Find Tasks",description:"Search and list tasks in a task list with optional date-range and status filters.",audience:"ai",aiMetadata:{description:"List tasks in a task list, filtered by due/completed/updated date ranges and status. The piece is otherwise write-only \u2014 call this first to find a task's id before completing, updating, or deleting it. Read-only.",idempotent:!0},outputSchema:ou,props:{tasks_list:U.tasksList,show_completed:I.Checkbox({displayName:"Show Completed",description:"Include completed tasks in results. Defaults to true.",required:!1,defaultValue:!0}),show_hidden:I.Checkbox({displayName:"Show Hidden",description:"Include hidden tasks (tasks that have been completed and a day has passed). Defaults to false.",required:!1,defaultValue:!1}),due_min:I.DateTime({displayName:"Due Date From",description:"Return tasks due on or after this date. RFC 3339 timestamp, e.g. 2026-06-01T00:00:00Z.",required:!1}),due_max:I.DateTime({displayName:"Due Date To",description:"Return tasks due before this date (exclusive). RFC 3339 timestamp, e.g. 2026-07-01T00:00:00Z.",required:!1}),completed_min:I.DateTime({displayName:"Completed Date From",description:"Return tasks completed on or after this date. RFC 3339 timestamp.",required:!1}),completed_max:I.DateTime({displayName:"Completed Date To",description:"Return tasks completed before this date (exclusive). RFC 3339 timestamp.",required:!1}),updated_min:I.DateTime({displayName:"Updated Since",description:'Return tasks last modified on or after this date. Useful for "since last run" incremental reads. RFC 3339 timestamp.',required:!1}),max_results:I.Number({displayName:"Max Results",description:"Maximum number of tasks to return (1\u2013100). Defaults to 20 when omitted.",required:!1})},async run({auth:e,propsValue:t}){let r=e,n={};t.show_completed!==void 0&&t.show_completed!==null&&(n.showCompleted=t.show_completed),t.show_hidden!==void 0&&t.show_hidden!==null&&(n.showHidden=t.show_hidden),t.due_min&&(n.dueMin=new Date(t.due_min).toISOString()),t.due_max&&(n.dueMax=new Date(t.due_max).toISOString()),t.completed_min&&(n.completedMin=new Date(t.completed_min).toISOString()),t.completed_max&&(n.completedMax=new Date(t.completed_max).toISOString()),t.updated_min&&(n.updatedMin=new Date(t.updated_min).toISOString()),t.max_results&&(n.maxResults=t.max_results);let i=await sr(r,t.tasks_list,n);return{tasks:i,count:i.length}}});var pu=W({auth:Z,name:"complete_task",displayName:"Mark Task Complete",description:"Mark an existing task as completed.",audience:"ai",aiMetadata:{description:"Mark an existing task as completed (by task id). Idempotent \u2014 re-completing a done task is a no-op. Use Update Task to reopen or edit other fields.",idempotent:!0},outputSchema:Qs,props:{tasks_list:U.tasksList,task_id:I.ShortText({displayName:"Task ID",description:"The ID of the task to mark as completed. Obtain the id from Find Tasks.",required:!0})},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n,task_id:i}=t;return(await J.sendRequest({method:"PATCH",url:`${U.baseUrl}/tasks/v1/lists/${n}/tasks/${i}`,authentication:{type:"BEARER_TOKEN",token:r.access_token},body:{status:"completed"}})).body}});var du=W({auth:Z,name:"update_task",displayName:"Update Task",description:"Edit an existing task \u2014 title, notes, due date, or status.",audience:"ai",aiMetadata:{description:"Edit an existing task's title, notes, due date, or status (e.g. rename, change due date, reopen). Partial update \u2014 only provided fields change. Not idempotent (use Mark Task Complete for the common complete case).",idempotent:!1},outputSchema:ru,props:{tasks_list:U.tasksList,task_id:I.ShortText({displayName:"Task ID",description:"The ID of the task to update. Obtain the id from Find Tasks.",required:!0}),title:I.ShortText({displayName:"Title",description:"New title for the task.",required:!1}),notes:I.LongText({displayName:"Notes",description:"New notes / description for the task.",required:!1}),due:I.DateTime({displayName:"Due Date",description:"New due date for the task. RFC 3339 timestamp, e.g. 2026-07-15T00:00:00Z.",required:!1}),status:I.StaticDropdown({displayName:"Status",description:"Task status. To simply complete a task prefer Mark Task Complete; set needsAction here to reopen a completed task.",required:!1,options:{options:[{label:"Needs Action",value:"needsAction"},{label:"Completed",value:"completed"}]}})},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n,task_id:i,title:s,notes:c,due:l,status:f}=t,g={};return s!=null&&s!==""&&(g.title=s),c!=null&&(g.notes=c),l!=null&&(g.due=`${new Date(l).toISOString().split("T")[0]}T00:00:00Z`),f!=null&&(g.status=f),(await J.sendRequest({method:"PATCH",url:`${U.baseUrl}/tasks/v1/lists/${n}/tasks/${i}`,authentication:{type:"BEARER_TOKEN",token:r.access_token},body:g})).body}});var mu=W({auth:Z,name:"delete_task",displayName:"Delete Task",description:"Permanently delete a task by ID.",audience:"ai",aiMetadata:{description:"Delete a task by id. Idempotent \u2014 deleting an already-removed task succeeds (converges to absent).",idempotent:!0},outputSchema:su,props:{tasks_list:U.tasksList,task_id:I.ShortText({displayName:"Task ID",description:"The ID of the task to delete. Obtain the id from Find Tasks.",required:!0})},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n,task_id:i}=t;try{await J.sendRequest({method:"DELETE",url:`${U.baseUrl}/tasks/v1/lists/${n}/tasks/${i}`,authentication:{type:"BEARER_TOKEN",token:r.access_token}})}catch(s){if(s?.response?.status===404||s?.status===404)return{deleted:!0,alreadyAbsent:!0};throw s}return{deleted:!0,alreadyAbsent:!1}}});var fu=W({auth:Z,name:"create_task",displayName:"Create Task",description:"Create a new task in a task list, optionally as a subtask and/or positioned after a sibling.",audience:"ai",aiMetadata:{description:"Create a new task in a task list, optionally as a subtask of a parent task (parent_task_id) and/or positioned after a sibling (previous_task_id); resolve those ids via Find Tasks. Use to add a single to-do; for marking an existing task done use Mark Task Complete. Not idempotent \u2014 each call creates a separate task.",idempotent:!1},outputSchema:eu,props:{tasks_list:U.tasksList,title:U.title,notes:U.notes,due_date:U.due,parent_task_id:I.ShortText({displayName:"Parent Task ID",description:"Make this a subtask of the task with this id (must be in the same list). Obtain the id from Find Tasks. Omit to create a top-level task.",required:!1}),previous_task_id:I.ShortText({displayName:"Previous Task ID",description:"Place the new task immediately after the sibling with this id. Obtain the id from Find Tasks. Omit to place it first among its siblings.",required:!1})},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n,title:i,notes:s,due_date:c,parent_task_id:l,previous_task_id:f}=t,g={kind:"tasks#task",status:"needsAction",title:i,notes:s,due:c?`${new Date(c).toISOString().split("T")[0]}T00:00:00Z`:void 0},v={};l&&(v.parent=l),f&&(v.previous=f);let b={method:"POST",url:`${U.baseUrl}/tasks/v1/lists/${n}/tasks`,authentication:{type:"BEARER_TOKEN",token:r.access_token},body:g,queryParams:v};return(await J.sendRequest(b)).body}});var gu=W({auth:Z,name:"get_task",displayName:"Get Task",description:"Fetch a single task by its ID.",audience:"ai",aiMetadata:{description:"Fetch a single task's full details (title, notes, due, status, parent, position, links) by its id. Use when you already have a specific task id and want its current state; to find tasks by criteria use Find Tasks instead. Read-only.",idempotent:!0},outputSchema:Ys,props:{tasks_list:U.tasksList,task_id:I.ShortText({displayName:"Task ID",description:"The ID of the task to fetch. Obtain the id from Find Tasks.",required:!0})},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n,task_id:i}=t;return(await J.sendRequest({method:"GET",url:`${U.baseUrl}/tasks/v1/lists/${n}/tasks/${i}`,authentication:{type:"BEARER_TOKEN",token:r.access_token}})).body}});var yu=W({auth:Z,name:"move_task",displayName:"Move Task",description:"Reposition or reparent a task within its list, or move it to another list.",audience:"ai",aiMetadata:{description:"Move a task to a new position within its list \u2014 reparent it under another task (parent_task_id) and/or place it after a sibling (previous_task_id); omit both to move it to the top level. Optionally move it to a different list (destination_tasklist_id). All ids come from Find Tasks, and parent/previous must reference tasks in the destination list. Use this for reordering/nesting; use Update Task to change a task's fields. Not idempotent \u2014 position depends on current order.",idempotent:!1},outputSchema:tu,props:{tasks_list:U.tasksList,task_id:I.ShortText({displayName:"Task ID",description:"The ID of the task to move. Obtain the id from Find Tasks.",required:!0}),parent_task_id:I.ShortText({displayName:"Parent Task ID",description:"Reparent the task under the task with this id (must be in the destination list). Obtain the id from Find Tasks. Omit to move it to the top level.",required:!1}),previous_task_id:I.ShortText({displayName:"Previous Task ID",description:"Place the task immediately after the sibling with this id (must be in the destination list). Obtain the id from Find Tasks. Omit to place it first among its siblings; to move it to the end, pass the last sibling's id (read the current order with Find Tasks).",required:!1}),destination_tasklist_id:I.ShortText({displayName:"Destination Task List ID",description:"Move the task to this task list. Omit to keep it in the current list. Recurring tasks cannot be moved between lists.",required:!1})},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n,task_id:i,parent_task_id:s,previous_task_id:c,destination_tasklist_id:l}=t,f={};s&&(f.parent=s),c&&(f.previous=c),l&&(f.destinationTasklist=l);let g={method:"POST",url:`${U.baseUrl}/tasks/v1/lists/${n}/tasks/${i}/move`,authentication:{type:"BEARER_TOKEN",token:r.access_token},queryParams:f};return(await J.sendRequest(g)).body}});var hu=W({auth:Z,name:"clear_completed_tasks",displayName:"Clear Completed Tasks",description:"Hide all completed tasks in a task list.",audience:"ai",aiMetadata:{description:"Hide all completed tasks in a task list (they are marked hidden and drop out of the default view, not permanently deleted). Use to tidy a list after a batch of completions. Affects every completed task at once \u2014 there is no per-task selection; to remove a single task use Delete Task. Not idempotent \u2014 operates on whatever is completed at call time.",idempotent:!1},outputSchema:au,props:{tasks_list:U.tasksList},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n}=t;return await J.sendRequest({method:"POST",url:`${U.baseUrl}/tasks/v1/lists/${n}/clear`,authentication:{type:"BEARER_TOKEN",token:r.access_token}}),{cleared:!0}}});var vu=W({auth:Z,name:"list_task_lists",displayName:"List Task Lists",description:"List the authenticated user's task lists (id and title).",audience:"ai",aiMetadata:{description:"List the authenticated user's task lists, returning each list's id and title. Use to resolve a list name to its id before operating on tasks, or to discover available lists. Read-only.",idempotent:!0},outputSchema:iu,props:{max_results:I.Number({displayName:"Max Results",description:"Maximum number of task lists to return (1\u2013100). Defaults to 20 when omitted.",required:!1})},async run({auth:e,propsValue:t}){let r=e,{max_results:n}=t,i={};n&&(i.maxResults=String(n));let s={method:"GET",url:`${U.baseUrl}/tasks/v1/users/@me/lists`,authentication:{type:"BEARER_TOKEN",token:r.access_token},queryParams:i},l=(await J.sendRequest(s)).body.items??[];return{taskLists:l,count:l.length}}});var im={tasks_list:U.tasksList},ur={strategy:0,items:o(async({auth:e,propsValue:t,lastFetchEpochMS:r})=>(await sr(e,t.tasks_list)).filter(s=>Date.parse(s.updated??"0")>r).map(s=>({epochMilliSeconds:Date.parse(s.updated??"0"),data:s})),"items")},xu=wi({auth:Z,name:"new_task",displayName:"New Task",description:"Triggers when a task is created",aiMetadata:{description:"Fires when a task in the selected Google Tasks list is newly created or updated since the last poll, emitting the task that changed. Use to react to additions or edits in a specific task list."},type:"POLLING",props:im,outputSchema:uu,sampleData:{},async test(e){let t=e.store,r=e.auth,n=e.propsValue;return await Et.test(ur,{store:t,auth:r,propsValue:n,files:e.files})},async onEnable(e){let t=e.store,r=e.auth,n=e.propsValue;await Et.onEnable(ur,{store:t,auth:r,propsValue:n})},async onDisable(e){let t=e.store,r=e.auth,n=e.propsValue;await Et.onEnable(ur,{store:t,auth:r,propsValue:n})},async run(e){let t=e.store,r=e.auth,n=e.propsValue;return await Et.poll(ur,{store:t,auth:r,propsValue:n,files:e.files})}});var am=Ni({minimumSupportedRelease:"0.86.4",logoUrl:"https://cdn.activepieces.com/pieces/google-tasks.png",categories:["PRODUCTIVITY"],actions:[cu,lu,pu,du,mu,fu,gu,yu,hu,vu,Js({baseUrl:o(()=>U.baseUrl,"baseUrl"),auth:Z,authMapping:o(async e=>({Authorization:`Bearer ${e.access_token}`}),"authMapping")})],displayName:"Google Tasks",description:"Task list management application",authors:["Salem-Alaa","kishanprmr","MoShizzle","khaledmashaly","abuaboud"],triggers:[xu],auth:Z});0&&(module.exports={googleTasks});
1
+ "use strict";var zu=Object.create;var tt=Object.defineProperty;var Ou=Object.getOwnPropertyDescriptor;var Ru=Object.getOwnPropertyNames;var wu=Object.getPrototypeOf,Du=Object.prototype.hasOwnProperty;var o=(e,t)=>tt(e,"name",{value:t,configurable:!0});var S=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},Tn=(e,t)=>{for(var r in t)tt(e,r,{get:t[r],enumerable:!0})},bn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ru(t))!Du.call(e,i)&&i!==r&&tt(e,i,{get:()=>t[i],enumerable:!(n=Ou(t,i))||n.enumerable});return e};var je=(e,t,r)=>(r=e!=null?zu(wu(e)):{},bn(t||!e||!e.__esModule?tt(r,"default",{value:e,enumerable:!0}):r,e)),Nu=e=>bn(tt({},"__esModule",{value:!0}),e);var Ko=S((Wo,Wt)=>{(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"),s="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",l={zoneIndex:new RegExp(s,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${s})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${s})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${t}\\.${t}\\.${t}\\.${t}(${s})?$`,"i")};function g(u,d){if(u.indexOf("::")!==u.lastIndexOf("::"))return null;let h=0,m=-1,x=(u.match(l.zoneIndex)||[])[0],P,j;for(x&&(x=x.substring(1),u=u.replace(/%.+$/,""));(m=u.indexOf(":",m+1))>=0;)h++;if(u.substr(0,2)==="::"&&h--,u.substr(-2,2)==="::"&&h--,h>d)return null;for(j=d-h,P=":";j--;)P+="0:";return u=u.replace("::",P),u[0]===":"&&(u=u.slice(1)),u[u.length-1]===":"&&(u=u.slice(0,-1)),d=(function(){let oe=u.split(":"),pe=[];for(let Te=0;Te<oe.length;Te++)pe.push(parseInt(oe[Te],16));return pe})(),{parts:d,zoneId:x}}o(g,"expandIPv6");function v(u,d,h,m){if(u.length!==d.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let x=0,P;for(;m>0;){if(P=h-m,P<0&&(P=0),u[x]>>P!==d[x]>>P)return!1;m-=h,x+=1}return!0}o(v,"matchCIDR");function y(u){if(i.test(u))return parseInt(u,16);if(u[0]==="0"&&!isNaN(parseInt(u[1],10))){if(n.test(u))return parseInt(u,8);throw new Error(`ipaddr: cannot parse ${u} as octal`)}return parseInt(u,10)}o(y,"parseIntAuto");function I(u,d){for(;u.length<d;)u=`0${u}`;return u}o(I,"padPart");let _={};_.IPv4=(function(){function u(d){if(d.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let h,m;for(h=0;h<d.length;h++)if(m=d[h],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=d}return o(u,"IPv4"),u.prototype.SpecialRanges={unspecified:[[new u([0,0,0,0]),8]],broadcast:[[new u([255,255,255,255]),32]],multicast:[[new u([224,0,0,0]),4]],linkLocal:[[new u([169,254,0,0]),16]],loopback:[[new u([127,0,0,0]),8]],carrierGradeNat:[[new u([100,64,0,0]),10]],private:[[new u([10,0,0,0]),8],[new u([172,16,0,0]),12],[new u([192,168,0,0]),16]],reserved:[[new u([192,0,0,0]),24],[new u([192,0,2,0]),24],[new u([192,88,99,0]),24],[new u([198,18,0,0]),15],[new u([198,51,100,0]),24],[new u([203,0,113,0]),24],[new u([240,0,0,0]),4]],as112:[[new u([192,175,48,0]),24],[new u([192,31,196,0]),24]],amt:[[new u([192,52,193,0]),24]]},u.prototype.kind=function(){return"ipv4"},u.prototype.match=function(d,h){let m;if(h===void 0&&(m=d,d=m[0],h=m[1]),d.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return v(this.octets,d.octets,8,h)},u.prototype.prefixLengthFromSubnetMask=function(){let d=0,h=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},x,P,j;for(x=3;x>=0;x-=1)if(P=this.octets[x],P in m){if(j=m[P],h&&j!==0)return null;j!==8&&(h=!0),d+=j}else return null;return 32-d},u.prototype.range=function(){return _.subnetMatch(this,this.SpecialRanges)},u.prototype.toByteArray=function(){return this.octets.slice(0)},u.prototype.toIPv4MappedAddress=function(){return _.IPv6.parse(`::ffff:${this.toString()}`)},u.prototype.toNormalizedString=function(){return this.toString()},u.prototype.toString=function(){return this.octets.join(".")},u})(),_.IPv4.broadcastAddressFromCIDR=function(u){try{let d=this.parseCIDR(u),h=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),x=[],P=0;for(;P<4;)x.push(parseInt(h[P],10)|parseInt(m[P],10)^255),P++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},_.IPv4.isIPv4=function(u){return this.parser(u)!==null},_.IPv4.isValid=function(u){try{return new this(this.parser(u)),!0}catch{return!1}},_.IPv4.isValidCIDR=function(u){try{return this.parseCIDR(u),!0}catch{return!1}},_.IPv4.isValidFourPartDecimal=function(u){return!!(_.IPv4.isValid(u)&&u.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},_.IPv4.isValidCIDRFourPartDecimal=function(u){let d=u.match(/^(.+)\/(\d+)$/);return!_.IPv4.isValidCIDR(u)||!d?!1:_.IPv4.isValidFourPartDecimal(d[1])},_.IPv4.networkAddressFromCIDR=function(u){let d,h,m,x,P;try{for(d=this.parseCIDR(u),m=d[0].toByteArray(),P=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),x=[],h=0;h<4;)x.push(parseInt(m[h],10)&parseInt(P[h],10)),h++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},_.IPv4.parse=function(u){let d=this.parser(u);if(d===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(d)},_.IPv4.parseCIDR=function(u){let d;if(d=u.match(/^(.+)\/(\d+)$/)){let h=parseInt(d[2]);if(h>=0&&h<=32){let m=[this.parse(d[1]),h];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")},_.IPv4.parser=function(u){let d,h,m;if(d=u.match(r.fourOctet))return(function(){let x=d.slice(1,6),P=[];for(let j=0;j<x.length;j++)h=x[j],P.push(y(h));return P})();if(d=u.match(r.longValue)){if(m=y(d[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return(function(){let x=[],P;for(P=0;P<=24;P+=8)x.push(m>>P&255);return x})().reverse()}else return(d=u.match(r.twoOctet))?(function(){let x=d.slice(1,4),P=[];if(m=y(x[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return P.push(y(x[0])),P.push(m>>16&255),P.push(m>>8&255),P.push(m&255),P})():(d=u.match(r.threeOctet))?(function(){let x=d.slice(1,5),P=[];if(m=y(x[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return P.push(y(x[0])),P.push(y(x[1])),P.push(m>>8&255),P.push(m&255),P})():null},_.IPv4.subnetMaskFromPrefixLength=function(u){if(u=parseInt(u),u<0||u>32)throw new Error("ipaddr: invalid IPv4 prefix length");let d=[0,0,0,0],h=0,m=Math.floor(u/8);for(;h<m;)d[h]=255,h++;return m<4&&(d[m]=Math.pow(2,u%8)-1<<8-u%8),new this(d)},_.IPv6=(function(){function u(d,h){let m,x;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(x=this.parts[m],!(0<=x&&x<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");h&&(this.zoneId=h)}return o(u,"IPv6"),u.prototype.SpecialRanges={unspecified:[new u([0,0,0,0,0,0,0,0]),128],linkLocal:[new u([65152,0,0,0,0,0,0,0]),10],multicast:[new u([65280,0,0,0,0,0,0,0]),8],loopback:[new u([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new u([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new u([0,0,0,0,0,65535,0,0]),96],discard:[new u([256,0,0,0,0,0,0,0]),64],rfc6145:[new u([0,0,0,0,65535,0,0,0]),96],rfc6052:[new u([100,65435,0,0,0,0,0,0]),96],"6to4":[new u([8194,0,0,0,0,0,0,0]),16],teredo:[new u([8193,0,0,0,0,0,0,0]),32],benchmarking:[new u([8193,2,0,0,0,0,0,0]),48],amt:[new u([8193,3,0,0,0,0,0,0]),32],as112v6:[[new u([8193,4,274,0,0,0,0,0]),48],[new u([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new u([8193,16,0,0,0,0,0,0]),28],orchid2:[new u([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new u([8193,48,0,0,0,0,0,0]),28],reserved:[[new u([8193,0,0,0,0,0,0,0]),23],[new u([8193,3512,0,0,0,0,0,0]),32]]},u.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},u.prototype.kind=function(){return"ipv6"},u.prototype.match=function(d,h){let m;if(h===void 0&&(m=d,d=m[0],h=m[1]),d.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return v(this.parts,d.parts,16,h)},u.prototype.prefixLengthFromSubnetMask=function(){let d=0,h=!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},x,P;for(let j=7;j>=0;j-=1)if(x=this.parts[j],x in m){if(P=m[x],h&&P!==0)return null;P!==16&&(h=!0),d+=P}else return null;return 128-d},u.prototype.range=function(){return _.subnetMatch(this,this.SpecialRanges)},u.prototype.toByteArray=function(){let d,h=[],m=this.parts;for(let x=0;x<m.length;x++)d=m[x],h.push(d>>8),h.push(d&255);return h},u.prototype.toFixedLengthString=function(){let d=(function(){let m=[];for(let x=0;x<this.parts.length;x++)m.push(I(this.parts[x].toString(16),4));return m}).call(this).join(":"),h="";return this.zoneId&&(h=`%${this.zoneId}`),d+h},u.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),h=d[0],m=d[1];return new _.IPv4([h>>8,h&255,m>>8,m&255])},u.prototype.toNormalizedString=function(){let d=(function(){let m=[];for(let x=0;x<this.parts.length;x++)m.push(this.parts[x].toString(16));return m}).call(this).join(":"),h="";return this.zoneId&&(h=`%${this.zoneId}`),d+h},u.prototype.toRFC5952String=function(){let d=/((^|:)(0(:|$)){2,})/g,h=this.toNormalizedString(),m=0,x=-1,P;for(;P=d.exec(h);)P[0].length>x&&(m=P.index,x=P[0].length);return x<0?h:`${h.substring(0,m)}::${h.substring(m+x)}`},u.prototype.toString=function(){return this.toRFC5952String()},u})(),_.IPv6.broadcastAddressFromCIDR=function(u){try{let d=this.parseCIDR(u),h=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),x=[],P=0;for(;P<16;)x.push(parseInt(h[P],10)|parseInt(m[P],10)^255),P++;return new this(x)}catch(d){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${d})`)}},_.IPv6.isIPv6=function(u){return this.parser(u)!==null},_.IPv6.isValid=function(u){if(typeof u=="string"&&u.indexOf(":")===-1)return!1;try{let d=this.parser(u);return new this(d.parts,d.zoneId),!0}catch{return!1}},_.IPv6.isValidCIDR=function(u){if(typeof u=="string"&&u.indexOf(":")===-1)return!1;try{return this.parseCIDR(u),!0}catch{return!1}},_.IPv6.networkAddressFromCIDR=function(u){let d,h,m,x,P;try{for(d=this.parseCIDR(u),m=d[0].toByteArray(),P=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),x=[],h=0;h<16;)x.push(parseInt(m[h],10)&parseInt(P[h],10)),h++;return new this(x)}catch(j){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${j})`)}},_.IPv6.parse=function(u){let d=this.parser(u);if(d.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(d.parts,d.zoneId)},_.IPv6.parseCIDR=function(u){let d,h,m;if((h=u.match(/^(.+)\/(\d+)$/))&&(d=parseInt(h[2]),d>=0&&d<=128))return m=[this.parse(h[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")},_.IPv6.parser=function(u){let d,h,m,x,P,j;if(m=u.match(l.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(l.native.test(u))return g(u,8);if((m=u.match(l.transitional))&&(j=m[6]||"",d=m[1],m[1].endsWith("::")||(d=d.slice(0,-1)),d=g(d+j,6),d.parts)){for(P=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],h=0;h<P.length;h++)if(x=P[h],!(0<=x&&x<=255))return null;return d.parts.push(P[0]<<8|P[1]),d.parts.push(P[2]<<8|P[3]),{parts:d.parts,zoneId:d.zoneId}}return null},_.IPv6.subnetMaskFromPrefixLength=function(u){if(u=parseInt(u),u<0||u>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],h=0,m=Math.floor(u/8);for(;h<m;)d[h]=255,h++;return m<16&&(d[m]=Math.pow(2,u%8)-1<<8-u%8),new this(d)},_.fromByteArray=function(u){let d=u.length;if(d===4)return new _.IPv4(u);if(d===16)return new _.IPv6(u);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},_.isValid=function(u){return _.IPv6.isValid(u)||_.IPv4.isValid(u)},_.isValidCIDR=function(u){return _.IPv6.isValidCIDR(u)||_.IPv4.isValidCIDR(u)},_.parse=function(u){if(_.IPv6.isValid(u))return _.IPv6.parse(u);if(_.IPv4.isValid(u))return _.IPv4.parse(u);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},_.parseCIDR=function(u){try{return _.IPv6.parseCIDR(u)}catch{try{return _.IPv4.parseCIDR(u)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},_.process=function(u){let d=this.parse(u);return d.kind()==="ipv6"&&d.isIPv4MappedAddress()?d.toIPv4Address():d},_.subnetMatch=function(u,d,h){let m,x,P,j;h==null&&(h="unicast");for(x in d)if(Object.prototype.hasOwnProperty.call(d,x)){for(P=d[x],P[0]&&!(P[0]instanceof Array)&&(P=[P]),m=0;m<P.length;m++)if(j=P[m],u.kind()===j[0].kind()&&u.match.apply(u,j))return x}return h},typeof Wt<"u"&&Wt.exports?Wt.exports=_:e.ipaddr=_})(Wo)});var ea=S((fk,Qi)=>{var Yi=require("stream").Stream,xp=require("util");Qi.exports=le;function le(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(le,"DelayedStream");xp.inherits(le,Yi);le.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(le.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});le.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};le.prototype.resume=function(){this._released||this.release(),this.source.resume()};le.prototype.pause=function(){this.source.pause()};le.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};le.prototype.pipe=function(){var e=Yi.prototype.pipe.apply(this,arguments);return this.resume(),e};le.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)};le.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 oa=S((yk,na)=>{var _p=require("util"),ra=require("stream").Stream,ta=ea();na.exports=X;function X(){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(X,"CombinedStream");_p.inherits(X,ra);X.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};X.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};X.prototype.append=function(e){var t=X.isStreamLike(e);if(t){if(!(e instanceof ta)){var r=ta.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};X.prototype.pipe=function(e,t){return ra.prototype.pipe.call(this,e,t),this.resume(),e};X.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}};X.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=X.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};X.prototype._pipeNext=function(e){this._currentStream=e;var t=X.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()};X.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};X.prototype.write=function(e){this.emit("data",e)};X.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};X.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")};X.prototype.end=function(){this._reset(),this.emit("end")};X.prototype.destroy=function(){this._reset(),this.emit("close")};X.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};X.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};X.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)};X.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var aa=S((vk,ia)=>{"use strict";ia.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 ca=S(ne=>{"use strict";var Qt=aa(),Pp=require("path").extname,sa=/^\s*([^;\s]*)(?:;|\s|$)/,Tp=/^text\//i;ne.charset=ua;ne.charsets={lookup:ua};ne.contentType=bp;ne.extension=Ip;ne.extensions=Object.create(null);ne.lookup=Ep;ne.types=Object.create(null);Sp(ne.extensions,ne.types);function ua(e){if(!e||typeof e!="string")return!1;var t=sa.exec(e),r=t&&Qt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Tp.test(t[1])?"UTF-8":!1}o(ua,"charset");function bp(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?ne.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=ne.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(bp,"contentType");function Ip(e){if(!e||typeof e!="string")return!1;var t=sa.exec(e),r=t&&ne.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(Ip,"extension");function Ep(e){if(!e||typeof e!="string")return!1;var t=Pp("x."+e).toLowerCase().substr(1);return t&&ne.types[t]||!1}o(Ep,"lookup");function Sp(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Qt).forEach(o(function(i){var s=Qt[i],c=s.extensions;if(!(!c||!c.length)){e[i]=c;for(var l=0;l<c.length;l++){var g=c[l];if(t[g]){var v=r.indexOf(Qt[t[g]].source),y=r.indexOf(s.source);if(t[g]!=="application/octet-stream"&&(v>y||v===y&&t[g].substr(0,12)==="application/"))continue}t[g]=i}}},"forEachMimeType"))}o(Sp,"populateMaps")});var pa=S((Pk,la)=>{la.exports=Ap;function Ap(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(Ap,"defer")});var Yr=S((bk,ma)=>{var da=pa();ma.exports=$p;function $p(e){var t=!1;return da(function(){t=!0}),o(function(n,i){t?e(n,i):da(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o($p,"async")});var Qr=S((Ek,fa)=>{fa.exports=kp;function kp(e){Object.keys(e.jobs).forEach(zp.bind(e)),e.jobs={}}o(kp,"abort");function zp(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(zp,"clean")});var en=S((Ak,ya)=>{var ga=Yr(),Op=Qr();ya.exports=Rp;function Rp(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=wp(t,i,e[i],function(s,c){i in r.jobs&&(delete r.jobs[i],s?Op(r):r.results[i]=c,n(s,r.results))})}o(Rp,"iterate");function wp(e,t,r,n){var i;return e.length==2?i=e(r,ga(n)):i=e(r,t,ga(n)),i}o(wp,"runJob")});var tn=S((kk,ha)=>{ha.exports=Dp;function Dp(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,s){return t(e[i],e[s])}),n}o(Dp,"state")});var rn=S((Ok,va)=>{var Np=Qr(),Cp=Yr();va.exports=Up;function Up(e){Object.keys(this.jobs).length&&(this.index=this.size,Np(this),Cp(e)(null,this.results))}o(Up,"terminator")});var _a=S((wk,xa)=>{var Mp=en(),Lp=tn(),jp=rn();xa.exports=Fp;function Fp(e,t,r){for(var n=Lp(e);n.index<(n.keyedList||e).length;)Mp(e,t,n,function(i,s){if(i){r(i,s);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return jp.bind(n,r)}o(Fp,"parallel")});var nn=S((Nk,er)=>{var Pa=en(),Bp=tn(),Vp=rn();er.exports=Zp;er.exports.ascending=Ta;er.exports.descending=Hp;function Zp(e,t,r,n){var i=Bp(e,r);return Pa(e,t,i,o(function s(c,l){if(c){n(c,l);return}if(i.index++,i.index<(i.keyedList||e).length){Pa(e,t,i,s);return}n(null,i.results)},"iteratorHandler")),Vp.bind(i,n)}o(Zp,"serialOrdered");function Ta(e,t){return e<t?-1:e>t?1:0}o(Ta,"ascending");function Hp(e,t){return-1*Ta(e,t)}o(Hp,"descending")});var Ia=S((Uk,ba)=>{var Gp=nn();ba.exports=qp;function qp(e,t,r){return Gp(e,t,null,r)}o(qp,"serial")});var Sa=S((Lk,Ea)=>{Ea.exports={parallel:_a(),serial:Ia(),serialOrdered:nn()}});var on=S((jk,Aa)=>{"use strict";Aa.exports=Object});var ka=S((Fk,$a)=>{"use strict";$a.exports=Error});var Oa=S((Bk,za)=>{"use strict";za.exports=EvalError});var wa=S((Vk,Ra)=>{"use strict";Ra.exports=RangeError});var Na=S((Zk,Da)=>{"use strict";Da.exports=ReferenceError});var Ua=S((Hk,Ca)=>{"use strict";Ca.exports=SyntaxError});var tr=S((Gk,Ma)=>{"use strict";Ma.exports=TypeError});var ja=S((qk,La)=>{"use strict";La.exports=URIError});var Ba=S((Wk,Fa)=>{"use strict";Fa.exports=Math.abs});var Za=S((Kk,Va)=>{"use strict";Va.exports=Math.floor});var Ga=S((Jk,Ha)=>{"use strict";Ha.exports=Math.max});var Wa=S((Xk,qa)=>{"use strict";qa.exports=Math.min});var Ja=S((Yk,Ka)=>{"use strict";Ka.exports=Math.pow});var Ya=S((Qk,Xa)=>{"use strict";Xa.exports=Math.round});var es=S((ez,Qa)=>{"use strict";Qa.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var rs=S((rz,ts)=>{"use strict";var Wp=es();ts.exports=o(function(t){return Wp(t)||t===0?t:t<0?-1:1},"sign")});var os=S((oz,ns)=>{"use strict";ns.exports=Object.getOwnPropertyDescriptor});var an=S((iz,is)=>{"use strict";var rr=os();if(rr)try{rr([],"length")}catch{rr=null}is.exports=rr});var ss=S((az,as)=>{"use strict";var nr=Object.defineProperty||!1;if(nr)try{nr({},"a",{value:1})}catch{nr=!1}as.exports=nr});var sn=S((sz,us)=>{"use strict";us.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 s 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 ps=S((cz,ls)=>{"use strict";var cs=typeof Symbol<"u"&&Symbol,Kp=sn();ls.exports=o(function(){return typeof cs!="function"||typeof Symbol!="function"||typeof cs("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Kp()},"hasNativeSymbols")});var un=S((pz,ds)=>{"use strict";ds.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var cn=S((dz,ms)=>{"use strict";var Jp=on();ms.exports=Jp.getPrototypeOf||null});var ys=S((mz,gs)=>{"use strict";var Xp="Function.prototype.bind called on incompatible ",Yp=Object.prototype.toString,Qp=Math.max,ed="[object Function]",fs=o(function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var s=0;s<r.length;s+=1)n[s+t.length]=r[s];return n},"concatty"),td=o(function(t,r){for(var n=[],i=r||0,s=0;i<t.length;i+=1,s+=1)n[s]=t[i];return n},"slicy"),rd=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");gs.exports=o(function(t){var r=this;if(typeof r!="function"||Yp.apply(r)!==ed)throw new TypeError(Xp+r);for(var n=td(arguments,1),i,s=o(function(){if(this instanceof i){var y=r.apply(this,fs(n,arguments));return Object(y)===y?y:this}return r.apply(t,fs(n,arguments))},"binder"),c=Qp(0,r.length-n.length),l=[],g=0;g<c;g++)l[g]="$"+g;if(i=Function("binder","return function ("+rd(l,",")+"){ return binder.apply(this,arguments); }")(s),r.prototype){var v=o(function(){},"Empty");v.prototype=r.prototype,i.prototype=new v,v.prototype=null}return i},"bind")});var Je=S((gz,hs)=>{"use strict";var nd=ys();hs.exports=Function.prototype.bind||nd});var or=S((yz,vs)=>{"use strict";vs.exports=Function.prototype.call});var ln=S((hz,xs)=>{"use strict";xs.exports=Function.prototype.apply});var Ps=S((vz,_s)=>{"use strict";_s.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var bs=S((xz,Ts)=>{"use strict";var od=Je(),id=ln(),ad=or(),sd=Ps();Ts.exports=sd||od.call(ad,id)});var Es=S((_z,Is)=>{"use strict";var ud=Je(),cd=tr(),ld=or(),pd=bs();Is.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new cd("a function is required");return pd(ud,ld,t)},"callBindBasic")});var Os=S((Tz,zs)=>{"use strict";var dd=Es(),Ss=an(),$s;try{$s=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var pn=!!$s&&Ss&&Ss(Object.prototype,"__proto__"),ks=Object,As=ks.getPrototypeOf;zs.exports=pn&&typeof pn.get=="function"?dd([pn.get]):typeof As=="function"?o(function(t){return As(t==null?t:ks(t))},"getDunder"):!1});var Cs=S((Iz,Ns)=>{"use strict";var Rs=un(),ws=cn(),Ds=Os();Ns.exports=Rs?o(function(t){return Rs(t)},"getProto"):ws?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return ws(t)},"getProto"):Ds?o(function(t){return Ds(t)},"getProto"):null});var dn=S((Sz,Us)=>{"use strict";var md=Function.prototype.call,fd=Object.prototype.hasOwnProperty,gd=Je();Us.exports=gd.call(md,fd)});var Zs=S((Az,Vs)=>{"use strict";var L,yd=on(),hd=ka(),vd=Oa(),xd=wa(),_d=Na(),et=Ua(),Qe=tr(),Pd=ja(),Td=Ba(),bd=Za(),Id=Ga(),Ed=Wa(),Sd=Ja(),Ad=Ya(),$d=rs(),Fs=Function,mn=o(function(e){try{return Fs('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),bt=an(),kd=ss(),fn=o(function(){throw new Qe},"throwTypeError"),zd=bt?(function(){try{return arguments.callee,fn}catch{try{return bt(arguments,"callee").get}catch{return fn}}})():fn,Xe=ps()(),re=Cs(),Od=cn(),Rd=un(),Bs=ln(),It=or(),Ye={},wd=typeof Uint8Array>"u"||!re?L:re(Uint8Array),Le={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?L:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?L:ArrayBuffer,"%ArrayIteratorPrototype%":Xe&&re?re([][Symbol.iterator]()):L,"%AsyncFromSyncIteratorPrototype%":L,"%AsyncFunction%":Ye,"%AsyncGenerator%":Ye,"%AsyncGeneratorFunction%":Ye,"%AsyncIteratorPrototype%":Ye,"%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%":hd,"%eval%":eval,"%EvalError%":vd,"%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%":Fs,"%GeneratorFunction%":Ye,"%Int8Array%":typeof Int8Array>"u"?L:Int8Array,"%Int16Array%":typeof Int16Array>"u"?L:Int16Array,"%Int32Array%":typeof Int32Array>"u"?L:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Xe&&re?re(re([][Symbol.iterator]())):L,"%JSON%":typeof JSON=="object"?JSON:L,"%Map%":typeof Map>"u"?L:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Xe||!re?L:re(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":yd,"%Object.getOwnPropertyDescriptor%":bt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?L:Promise,"%Proxy%":typeof Proxy>"u"?L:Proxy,"%RangeError%":xd,"%ReferenceError%":_d,"%Reflect%":typeof Reflect>"u"?L:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?L:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Xe||!re?L:re(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?L:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Xe&&re?re(""[Symbol.iterator]()):L,"%Symbol%":Xe?Symbol:L,"%SyntaxError%":et,"%ThrowTypeError%":zd,"%TypedArray%":wd,"%TypeError%":Qe,"%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%":Pd,"%WeakMap%":typeof WeakMap>"u"?L:WeakMap,"%WeakRef%":typeof WeakRef>"u"?L:WeakRef,"%WeakSet%":typeof WeakSet>"u"?L:WeakSet,"%Function.prototype.call%":It,"%Function.prototype.apply%":Bs,"%Object.defineProperty%":kd,"%Object.getPrototypeOf%":Od,"%Math.abs%":Td,"%Math.floor%":bd,"%Math.max%":Id,"%Math.min%":Ed,"%Math.pow%":Sd,"%Math.round%":Ad,"%Math.sign%":$d,"%Reflect.getPrototypeOf%":Rd};if(re)try{null.error}catch(e){Ms=re(re(e)),Le["%Error.prototype%"]=Ms}var Ms,Dd=o(function e(t){var r;if(t==="%AsyncFunction%")r=mn("async function () {}");else if(t==="%GeneratorFunction%")r=mn("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=mn("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&re&&(r=re(i.prototype))}return Le[t]=r,r},"doEval"),Ls={__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"]},Et=Je(),ir=dn(),Nd=Et.call(It,Array.prototype.concat),Cd=Et.call(Bs,Array.prototype.splice),js=Et.call(It,String.prototype.replace),ar=Et.call(It,String.prototype.slice),Ud=Et.call(It,RegExp.prototype.exec),Md=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ld=/\\(\\)?/g,jd=o(function(t){var r=ar(t,0,1),n=ar(t,-1);if(r==="%"&&n!=="%")throw new et("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new et("invalid intrinsic syntax, expected opening `%`");var i=[];return js(t,Md,function(s,c,l,g){i[i.length]=l?js(g,Ld,"$1"):c||s}),i},"stringToPath"),Fd=o(function(t,r){var n=t,i;if(ir(Ls,n)&&(i=Ls[n],n="%"+i[0]+"%"),ir(Le,n)){var s=Le[n];if(s===Ye&&(s=Dd(n)),typeof s>"u"&&!r)throw new Qe("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new et("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");Vs.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(Ud(/^%?[^%]*%?$/,t)===null)throw new et("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=jd(t),i=n.length>0?n[0]:"",s=Fd("%"+i+"%",r),c=s.name,l=s.value,g=!1,v=s.alias;v&&(i=v[0],Cd(n,Nd([0,1],v)));for(var y=1,I=!0;y<n.length;y+=1){var _=n[y],u=ar(_,0,1),d=ar(_,-1);if((u==='"'||u==="'"||u==="`"||d==='"'||d==="'"||d==="`")&&u!==d)throw new et("property names with quotes must have matching quotes");if((_==="constructor"||!I)&&(g=!0),i+="."+_,c="%"+i+"%",ir(Le,c))l=Le[c];else if(l!=null){if(!(_ in l)){if(!r)throw new Qe("base intrinsic for "+t+" exists, but the property is not available.");return}if(bt&&y+1>=n.length){var h=bt(l,_);I=!!h,I&&"get"in h&&!("originalValue"in h.get)?l=h.get:l=l[_]}else I=ir(l,_),l=l[_];I&&!g&&(Le[c]=l)}}return l},"GetIntrinsic")});var Gs=S((kz,Hs)=>{"use strict";var Bd=sn();Hs.exports=o(function(){return Bd()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Ks=S((Oz,Ws)=>{"use strict";var Vd=Zs(),qs=Vd("%Object.defineProperty%",!0),Zd=Gs()(),Hd=dn(),Gd=tr(),sr=Zd?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 Gd("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");sr&&(n||!Hd(t,sr))&&(qs?qs(t,sr,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[sr]=r)},"setToStringTag")});var Xs=S((wz,Js)=>{"use strict";var qd=Function.prototype.call,Wd=Object.prototype.hasOwnProperty,Kd=Je();Js.exports=Kd.call(qd,Wd)});var Qs=S((Dz,Ys)=>{"use strict";Ys.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var ru=S((Nz,tu)=>{"use strict";var vn=oa(),Jd=require("util"),gn=require("path"),Xd=require("http"),Yd=require("https"),Qd=require("url").parse,em=require("fs"),tm=require("stream").Stream,rm=require("crypto"),yn=ca(),nm=Sa(),om=Ks(),De=Xs(),hn=Qs();function eu(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(eu,"escapeHeaderParam");function V(e){if(!(this instanceof V))return new V(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],vn.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(V,"FormData");Jd.inherits(V,vn);V.LINE_BREAK=`\r
2
+ `;V.DEFAULT_CONTENT_TYPE="application/octet-stream";V.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=vn.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),s=this._multiPartFooter();n(i),n(t),n(s),this._trackLength(i,t,r)};V.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)+V.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&De(t,"httpVersion"))&&!(t instanceof tm))&&(r.knownLength||this._valuesToMeasure.push(t))};V.prototype._lengthRetriever=function(e,t){De(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):em.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):De(e,"httpVersion")?t(null,Number(e.headers["content-length"])):De(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};V.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),s="",c={"Content-Disposition":["form-data",'name="'+eu(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&hn(c,r.header);var l;for(var g in c)if(De(c,g)){if(l=c[g],l==null)continue;Array.isArray(l)||(l=[l]),l.length&&(s+=g+": "+l.join("; ")+V.LINE_BREAK)}return"--"+this.getBoundary()+V.LINE_BREAK+s+V.LINE_BREAK};V.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=gn.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=gn.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&De(e,"httpVersion")&&(r=gn.basename(e.client._httpMessage.path||"")),r)return'filename="'+eu(r)+'"'};V.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=yn.lookup(e.name)),!r&&e&&e.path&&(r=yn.lookup(e.path)),!r&&e&&e.readable&&De(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=yn.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=V.DEFAULT_CONTENT_TYPE),r};V.prototype._multiPartFooter=function(){return function(e){var t=V.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};V.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+V.LINE_BREAK};V.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)De(e,t)&&(r[t.toLowerCase()]=e[t]);return r};V.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};V.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};V.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(V.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};V.prototype._generateBoundary=function(){this._boundary="--------------------------"+rm.randomBytes(12).toString("hex")};V.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};V.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};V.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}nm.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};V.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=Qd(e),n=hn({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=hn(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=Yd.request(n):r=Xd.request(n),this.getLength(function(s,c){if(s&&s!=="Unknown stream"){this._error(s);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),t){var l,g=o(function(v,y){return r.removeListener("error",g),r.removeListener("response",l),t.call(this,v,y)},"callback");l=g.bind(this,null),r.on("error",g),r.on("response",l)}}.bind(this)),r};V.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};V.prototype.toString=function(){return"[object FormData]"};om(V.prototype,"FormData");tu.exports=V});var vm={};Tn(vm,{googleTasks:()=>hm});module.exports=Nu(vm);var Cu=Object.freeze({status:"aborted"});function T(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 v=c.prototype,y=Object.keys(v);for(let I=0;I<y.length;I++){let _=y[I];_ in l||(l[_]=v[_].bind(l))}}o(n,"init");let i=r?.Parent??Object;class s extends i{static{o(this,"Definition")}}Object.defineProperty(s,"name",{value:e});function c(l){var g;let v=r?.Parent?new s:this;n(v,l),(g=v._zod).deferred??(g.deferred=[]);for(let y of v._zod.deferred)y();return v}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(T,"$constructor");var de=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},$t=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},pr={};function ye(e){return e&&Object.assign(pr,e),pr}o(ye,"config");function mr(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(mr,"getEnumValues");function En(e,t){return typeof t=="bigint"?t.toString():t}o(En,"jsonStringifyReplacer");function zt(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(zt,"cached");function Sn(e){return e==null}o(Sn,"nullish");function Ot(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(Ot,"cleanRegex");var In=Symbol("evaluating");function Q(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==In)return n===void 0&&(n=In,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(Q,"defineLazy");var fr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function rt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(rt,"isObject");var Uu=zt(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function An(e){if(rt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(rt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(An,"isPlainObject");var $n=new Set(["string","number","symbol"]);function Fe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(Fe,"escapeRegex");function Rt(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o(Rt,"clone");function H(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(H,"normalizeParams");function kn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(kn,"optionalKeys");var zn={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 Be(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(Be,"aborted");function Ie(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(Ie,"prefixIssues");function kt(e){return typeof e=="string"?e:e?.message}o(kt,"unwrapMessage");function Ee(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=kt(e.inst?._zod.def?.error?.(e))??kt(t?.error?.(e))??kt(r.customError?.(e))??kt(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(Ee,"finalizeIssue");function On(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(On,"getLengthableOrigin");function gr(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(gr,"issue");var Rn=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,En,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),wn=T("$ZodError",Rn),nt=T("$ZodError",Rn,{Parent:Error});var Lu=o(e=>(t,r,n,i)=>{let s=n?Object.assign(n,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},s);if(c instanceof Promise)throw new de;if(c.issues.length){let l=new(i?.Err??e)(c.issues.map(g=>Ee(g,s,ye())));throw fr(l,i?.callee),l}return c.value},"_parse"),wt=Lu(nt),ju=o(e=>async(t,r,n,i)=>{let s=n?Object.assign(n,{async:!0}):{async:!0},c=t._zod.run({value:r,issues:[]},s);if(c instanceof Promise&&(c=await c),c.issues.length){let l=new(i?.Err??e)(c.issues.map(g=>Ee(g,s,ye())));throw fr(l,i?.callee),l}return c.value},"_parseAsync"),Dt=ju(nt),Fu=o(e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new de;return s.issues.length?{success:!1,error:new(e??wn)(s.issues.map(c=>Ee(c,i,ye())))}:{success:!0,data:s.value}},"_safeParse"),ot=Fu(nt),Bu=o(e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(c=>Ee(c,i,ye())))}:{success:!0,data:s.value}},"_safeParseAsync"),it=Bu(nt);var Vu="(?:(?:\\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])))",Zu=new RegExp(`^${Vu}$`);var Dn=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Nn=/^-?\d+n?$/,Cn=/^-?\d+$/,yr=/^-?\d+(?:\.\d+)?$/,Un=/^(?:true|false)$/i;var Se=T("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Hu={number:"number",bigint:"bigint",object:"date"};var Mn=T("$ZodCheckGreaterThan",(e,t)=>{Se.init(e,t);let r=Hu[typeof t.value];e._zod.onattach.push(n=>{let i=n._zod.bag,s=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(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 Ln=T("$ZodCheckNumberFormat",(e,t)=>{Se.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,s]=zn[t.format];e._zod.onattach.push(c=>{let l=c._zod.bag;l.format=t.format,l.minimum=i,l.maximum=s,r&&(l.pattern=Cn)}),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>s&&c.issues.push({origin:"number",input:l,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}});var jn=T("$ZodCheckMinLength",(e,t)=>{var r;Se.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Sn(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=On(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var hr=T("$ZodCheckStringFormat",(e,t)=>{var r,n;Se.init(e,t),e._zod.onattach.push(i=>{let s=i._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.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=()=>{})}),Fn=T("$ZodCheckRegex",(e,t)=>{hr.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 Vn={major:4,minor:3,patch:6};var W=T("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Vn;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let s of i._zod.onattach)s(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 v=Be(c),y;for(let I of l){if(I._zod.def.when){if(!I._zod.def.when(c))continue}else if(v)continue;let _=c.issues.length,u=I._zod.check(c);if(u instanceof Promise&&g?.async===!1)throw new de;if(y||u instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await u,c.issues.length!==_&&(v||(v=Be(c,_)))});else{if(c.issues.length===_)continue;v||(v=Be(c,_))}}return y?y.then(()=>c):c},"runChecks"),s=o((c,l,g)=>{if(Be(c))return c.aborted=!0,c;let v=i(l,n,g);if(v instanceof Promise){if(g.async===!1)throw new de;return v.then(y=>e._zod.parse(y,g))}return e._zod.parse(v,g)},"handleCanaryResult");e._zod.run=(c,l)=>{if(l.skipChecks)return e._zod.parse(c,l);if(l.direction==="backward"){let v=e._zod.parse({value:c.value,issues:[]},{...l,skipChecks:!0});return v instanceof Promise?v.then(y=>s(y,c,l)):s(v,c,l)}let g=e._zod.parse(c,l);if(g instanceof Promise){if(l.async===!1)throw new de;return g.then(v=>i(v,n,l))}return i(g,n,l)}}Q(e,"~standard",()=>({validate:o(i=>{try{let s=ot(e,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return it(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Ut=T("$ZodString",(e,t)=>{W.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Dn(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}}),vr=T("$ZodStringFormat",(e,t)=>{hr.init(e,t),Ut.init(e,t)});var Wn=T("$ZodURL",(e,t)=>{vr.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 xr=T("$ZodNumber",(e,t)=>{W.init(e,t),e._zod.pattern=e._zod.bag.pattern??yr,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 s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...s?{received:s}:{}}),r}}),Kn=T("$ZodNumberFormat",(e,t)=>{Ln.init(e,t),xr.init(e,t)}),_r=T("$ZodBoolean",(e,t)=>{W.init(e,t),e._zod.pattern=Un,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=T("$ZodBigInt",(e,t)=>{W.init(e,t),e._zod.pattern=Nn,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 Xn=T("$ZodAny",(e,t)=>{W.init(e,t),e._zod.parse=r=>r}),Yn=T("$ZodUnknown",(e,t)=>{W.init(e,t),e._zod.parse=r=>r});var Qn=T("$ZodVoid",(e,t)=>{W.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}}),eo=T("$ZodDate",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,s=i instanceof Date;return s&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...s?{received:"Invalid Date"}:{},inst:e}),r}});function Zn(e,t,r){e.issues.length&&t.issues.push(...Ie(r,e.issues)),t.value[r]=e.value}o(Zn,"handleArrayResult");var to=T("$ZodArray",(e,t)=>{W.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 s=[];for(let c=0;c<i.length;c++){let l=i[c],g=t.element._zod.run({value:l,issues:[]},n);g instanceof Promise?s.push(g.then(v=>Zn(v,r,c))):Zn(g,r,c)}return s.length?Promise.all(s).then(()=>r):r}});function Ct(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...Ie(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(Ct,"handlePropertyResult");function Gu(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=kn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(Gu,"normalizeDef");function qu(e,t,r,n,i,s){let c=[],l=i.keySet,g=i.catchall._zod,v=g.def.type,y=g.optout==="optional";for(let I in t){if(l.has(I))continue;if(v==="never"){c.push(I);continue}let _=g.run({value:t[I],issues:[]},n);_ instanceof Promise?e.push(_.then(u=>Ct(u,r,I,t,y))):Ct(_,r,I,t,y)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}o(qu,"handleCatchall");var ro=T("$ZodObject",(e,t)=>{if(W.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=zt(()=>Gu(t));Q(e._zod,"propValues",()=>{let l=t.shape,g={};for(let v in l){let y=l[v]._zod;if(y.values){g[v]??(g[v]=new Set);for(let I of y.values)g[v].add(I)}}return g});let i=rt,s=t.catchall,c;e._zod.parse=(l,g)=>{c??(c=n.value);let v=l.value;if(!i(v))return l.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),l;l.value={};let y=[],I=c.shape;for(let _ of c.keys){let u=I[_],d=u._zod.optout==="optional",h=u._zod.run({value:v[_],issues:[]},g);h instanceof Promise?y.push(h.then(m=>Ct(m,l,_,v,d))):Ct(h,l,_,v,d)}return s?qu(y,v,l,g,n.value,e):y.length?Promise.all(y).then(()=>l):l}});function Hn(e,t,r,n){for(let s of e)if(s.issues.length===0)return t.value=s.value,t;let i=e.filter(s=>!Be(s));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(s=>s.issues.map(c=>Ee(c,n,ye())))}),t)}o(Hn,"handleUnionResults");var Pr=T("$ZodUnion",(e,t)=>{W.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(s=>s._zod.pattern);return new RegExp(`^(${i.map(s=>Ot(s.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,s)=>{if(r)return n(i,s);let c=!1,l=[];for(let g of t.options){let v=g._zod.run({value:i.value,issues:[]},s);if(v instanceof Promise)l.push(v),c=!0;else{if(v.issues.length===0)return v;l.push(v)}}return c?Promise.all(l).then(g=>Hn(g,i,e,s)):Hn(l,i,e,s)}});var no=T("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Pr.init(e,t);let r=e._zod.parse;Q(e._zod,"propValues",()=>{let i={};for(let s of t.options){let c=s._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let[l,g]of Object.entries(c)){i[l]||(i[l]=new Set);for(let v of g)i[l].add(v)}}return i});let n=zt(()=>{let i=t.options,s=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(s.has(g))throw new Error(`Duplicate discriminator value "${String(g)}"`);s.set(g,c)}}return s});e._zod.parse=(i,s)=>{let c=i.value;if(!rt(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,s):t.unionFallback?r(i,s):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}});var oo=T("$ZodRecord",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!An(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let s=[],c=t.keyType._zod.values;if(c){r.value={};let l=new Set;for(let v of c)if(typeof v=="string"||typeof v=="number"||typeof v=="symbol"){l.add(typeof v=="number"?v.toString():v);let y=t.valueType._zod.run({value:i[v],issues:[]},n);y instanceof Promise?s.push(y.then(I=>{I.issues.length&&r.issues.push(...Ie(v,I.issues)),r.value[v]=I.value})):(y.issues.length&&r.issues.push(...Ie(v,y.issues)),r.value[v]=y.value)}let g;for(let v in i)l.has(v)||(g=g??[],g.push(v));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"&&yr.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=>Ee(I,n,ye())),input:l,path:[l],inst:e});continue}let y=t.valueType._zod.run({value:i[l],issues:[]},n);y instanceof Promise?s.push(y.then(I=>{I.issues.length&&r.issues.push(...Ie(l,I.issues)),r.value[g.value]=I.value})):(y.issues.length&&r.issues.push(...Ie(l,y.issues)),r.value[g.value]=y.value)}}return s.length?Promise.all(s).then(()=>r):r}});var io=T("$ZodEnum",(e,t)=>{W.init(e,t);let r=mr(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>$n.has(typeof i)).map(i=>typeof i=="string"?Fe(i):i.toString()).join("|")})$`),e._zod.parse=(i,s)=>{let c=i.value;return n.has(c)||i.issues.push({code:"invalid_value",values:r,input:c,inst:e}),i}}),ao=T("$ZodLiteral",(e,t)=>{if(W.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"?Fe(n):n?Fe(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let s=n.value;return r.has(s)||n.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),n}});var so=T("$ZodTransform",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new $t(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 Gn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(Gn,"handleOptionalResult");var uo=T("$ZodOptional",(e,t)=>{W.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(`^(${Ot(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(s=>Gn(s,r.value)):Gn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var co=T("$ZodNullable",(e,t)=>{W.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(`^(${Ot(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 lo=T("$ZodPipe",(e,t)=>{W.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 s=t.out._zod.run(r,n);return s instanceof Promise?s.then(c=>Nt(c,t.in,n)):Nt(s,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Nt(s,t.out,n)):Nt(i,t.out,n)}});function Nt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(Nt,"handlePipeResult");var po=T("$ZodCustom",(e,t)=>{Se.init(e,t),W.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(s=>qn(s,r,n,e));qn(i,r,n,e)}});function qn(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(gr(i))}}o(qn,"handleRefineResult");var fo;var Tr=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 go(){return new Tr}o(go,"registry");(fo=globalThis).__zod_globalRegistry??(fo.__zod_globalRegistry=go());var br=globalThis.__zod_globalRegistry;function yo(e,t){return new e({type:"string",...H(t)})}o(yo,"_string");function ho(e,t){return new e({type:"string",coerce:!0,...H(t)})}o(ho,"_coercedString");function vo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...H(t)})}o(vo,"_url");function xo(e,t){return new e({type:"number",checks:[],...H(t)})}o(xo,"_number");function _o(e,t){return new e({type:"number",coerce:!0,checks:[],...H(t)})}o(_o,"_coercedNumber");function Po(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...H(t)})}o(Po,"_int");function To(e,t){return new e({type:"boolean",...H(t)})}o(To,"_boolean");function bo(e,t){return new e({type:"boolean",coerce:!0,...H(t)})}o(bo,"_coercedBoolean");function Io(e,t){return new e({type:"bigint",coerce:!0,...H(t)})}o(Io,"_coercedBigint");function Eo(e){return new e({type:"any"})}o(Eo,"_any");function So(e){return new e({type:"unknown"})}o(So,"_unknown");function Ao(e,t){return new e({type:"void",...H(t)})}o(Ao,"_void");function $o(e,t){return new e({type:"date",coerce:!0,...H(t)})}o($o,"_coercedDate");function Mt(e,t){return new Mn({check:"greater_than",...H(t),value:e,inclusive:!0})}o(Mt,"_gte");function ce(e,t){return new jn({check:"min_length",...H(t),minimum:e})}o(ce,"_minLength");function Ae(e,t){return new Fn({check:"string_format",format:"regex",...H(t),pattern:e})}o(Ae,"_regex");function ko(e,t,r){let n=H(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(ko,"_custom");var ee=T("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");W.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>wt(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>ot(e,r,n),e.parseAsync=async(r,n)=>Dt(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>it(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)=>Rt(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.apply=r=>r(e)}),jt=T("ZodMiniString",(e,t)=>{Ut.init(e,t),ee.init(e,t)});function a(e){return yo(jt,e)}o(a,"string");var zo=T("ZodMiniStringFormat",(e,t)=>{vr.init(e,t),jt.init(e,t)});var ac=T("ZodMiniURL",(e,t)=>{Wn.init(e,t),zo.init(e,t)});function Oo(e){return vo(ac,e)}o(Oo,"url");var Ft=T("ZodMiniNumber",(e,t)=>{xr.init(e,t),ee.init(e,t)});function te(e){return xo(Ft,e)}o(te,"number");var sc=T("ZodMiniNumberFormat",(e,t)=>{Kn.init(e,t),Ft.init(e,t)});function Ro(e){return Po(sc,e)}o(Ro,"int");var Ir=T("ZodMiniBoolean",(e,t)=>{_r.init(e,t),ee.init(e,t)});function B(e){return To(Ir,e)}o(B,"boolean");var wo=T("ZodMiniBigInt",(e,t)=>{Jn.init(e,t),ee.init(e,t)});var uc=T("ZodMiniAny",(e,t)=>{Xn.init(e,t),ee.init(e,t)});function st(){return Eo(uc)}o(st,"any");var cc=T("ZodMiniUnknown",(e,t)=>{Yn.init(e,t),ee.init(e,t)});function D(){return So(cc)}o(D,"unknown");var lc=T("ZodMiniVoid",(e,t)=>{Qn.init(e,t),ee.init(e,t)});function Do(e){return Ao(lc,e)}o(Do,"_void");var No=T("ZodMiniDate",(e,t)=>{eo.init(e,t),ee.init(e,t)});var pc=T("ZodMiniArray",(e,t)=>{to.init(e,t),ee.init(e,t)});function z(e,t){return new pc({type:"array",element:e,...H(t)})}o(z,"array");var dc=T("ZodMiniObject",(e,t)=>{ro.init(e,t),ee.init(e,t),Q(e,"shape",()=>t.shape)});function p(e,t){let r={type:"object",shape:e??{},...H(t)};return new dc(r)}o(p,"object");var mc=T("ZodMiniUnion",(e,t)=>{Pr.init(e,t),ee.init(e,t)});function U(e,t){return new mc({type:"union",options:e,...H(t)})}o(U,"union");var fc=T("ZodMiniDiscriminatedUnion",(e,t)=>{no.init(e,t),ee.init(e,t)});function $e(e,t,r){return new fc({type:"union",options:t,discriminator:e,...H(r)})}o($e,"discriminatedUnion");var gc=T("ZodMiniRecord",(e,t)=>{oo.init(e,t),ee.init(e,t)});function N(e,t,r){return new gc({type:"record",keyType:e,valueType:t,...H(r)})}o(N,"record");var yc=T("ZodMiniEnum",(e,t)=>{io.init(e,t),ee.init(e,t),e.options=Object.values(t.entries)});function $(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new yc({type:"enum",entries:r,...H(t)})}o($,"_enum");var hc=T("ZodMiniLiteral",(e,t)=>{ao.init(e,t),ee.init(e,t)});function A(e,t){return new hc({type:"literal",values:Array.isArray(e)?e:[e],...H(t)})}o(A,"literal");var vc=T("ZodMiniTransform",(e,t)=>{so.init(e,t),ee.init(e,t)});function ke(e){return new vc({type:"transform",transform:e})}o(ke,"transform");var xc=T("ZodMiniOptional",(e,t)=>{uo.init(e,t),ee.init(e,t)});function f(e){return new xc({type:"optional",innerType:e})}o(f,"optional");var _c=T("ZodMiniNullable",(e,t)=>{co.init(e,t),ee.init(e,t)});function ut(e){return new _c({type:"nullable",innerType:e})}o(ut,"nullable");var Pc=T("ZodMiniPipe",(e,t)=>{lo.init(e,t),ee.init(e,t)});function ze(e,t){return new Pc({type:"pipe",in:e,out:t})}o(ze,"pipe");var Tc=T("ZodMiniCustom",(e,t)=>{po.init(e,t),ee.init(e,t)});function Bt(e,t){return ko(Tc,e??(()=>!0),t)}o(Bt,"custom");var ct={};Tn(ct,{bigint:()=>$c,boolean:()=>Ac,date:()=>kc,number:()=>Sc,string:()=>Ec});function Ec(e){return ho(jt,e)}o(Ec,"string");function Sc(e){return _o(Ft,e)}o(Sc,"number");function Ac(e){return bo(Ir,e)}o(Ac,"boolean");function $c(e){return Io(wo,e)}o($c,"bigint");function kc(e){return $o(No,e)}o(kc,"date");var Sr=p({retryOnFailure:p({defaultValue:f(B()),hide:f(B())}),continueOnFailure:p({defaultValue:f(B()),hide:f(B())})}),Er=class{constructor(t,r,n,i,s,c,l,g,v,y,I,_,u){this.name=t;this.displayName=r;this.description=n;this.props=i;this.propertyGroups=s;this.run=c;this.test=l;this.requireAuth=g;this.errorHandlingOptions=v;this.outputSchema=y;this.audience=I;this.aiMetadata=_;this.classification=u}static{o(this,"IAction")}},K=o(e=>new Er(e.name,e.displayName,e.description,e.props,e.propertyGroups,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata,e.classification),"createAction");var F=p({displayName:a(),description:f(a()),advanced:f(B()),width:f($(["half","full"])),icon:f(a()),placeholder:f(a())}),C=o((e,t)=>p({type:A(t),required:B(),defaultValue:f(st())}),"TPropertyValue");var ie=p({...F.shape,...C(a(),"SHORT_TEXT").shape}),he=p({...F.shape,...C(a(),"LONG_TEXT").shape});var Uo=p({label:a(),value:D(),description:f(a()),icon:f(a())}),Vt=p({disabled:f(B()),placeholder:f(a()),options:z(Uo)});var Oc=$(["cards"]),ae=p({...F.shape,options:Vt,display:f(Oc),...C(D(),"STATIC_DROPDOWN").shape}),ve=p({...F.shape,options:Vt,...C(z(D()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Ar=p({...F.shape,...C(D(),"DROPDOWN").shape,refreshers:z(a())}),lt=p({...F.shape,...C(z(D()),"MULTI_SELECT_DROPDOWN").shape,refreshers:z(a())});var xe=p({...F.shape,reveals:f(z(a())),...C(B(),"CHECKBOX").shape});var _e=p({...F.shape,display:f($(["stepper"])),min:f(te()),max:f(te()),step:f(te()),...C(te(),"NUMBER").shape});var pt=p({...F.shape,streaming:f(B()),...C(D(),"FILE").shape});var dt=p({...F.shape,...C(a(),"DATE_TIME").shape});var Mo=N(a(),U([ie,he,ae,lt,ve,xe,_e,pt,dt])),mt=p({...F.shape,properties:Mo,...C(z(D()),"ARRAY").shape});var Lo=$(["any_time","last_24_hours","last_7_days","last_30_days","last_90_days","this_month","custom"]),jo=p({preset:f(Lo),after:f(a()),before:f(a())}),$r=p({...F.shape,display:f($(["dropdown"])),...C(jo,"DATE_RANGE").shape});var ft=p({...F.shape,...C(U([N(a(),D())]),"JSON").shape});var Fo=U([ie,ae,ft,mt,ve]),Rc=N(a(),Fo),kr=p({refreshers:z(a()),...F.shape,...C(D(),"DYNAMIC").shape});var Zt=p({...F.shape,...C(Do(),"MARKDOWN").shape});var gt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(gt||{}),Ve=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Ve||{}),Ze=(x=>(x.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",x.COMMUNICATION="COMMUNICATION",x.COMMERCE="COMMERCE",x.CORE="CORE",x.UNIVERSAL_AI="UNIVERSAL_AI",x.FLOW_CONTROL="FLOW_CONTROL",x.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",x.ACCOUNTING="ACCOUNTING",x.PRODUCTIVITY="PRODUCTIVITY",x.CONTENT_AND_FILES="CONTENT_AND_FILES",x.DEVELOPER_TOOLS="DEVELOPER_TOOLS",x.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",x.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",x.HUMAN_RESOURCES="HUMAN_RESOURCES",x.PAYMENT_PROCESSING="PAYMENT_PROCESSING",x.MARKETING="MARKETING",x.SALES_AND_CRM="SALES_AND_CRM",x))(Ze||{});var yt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(yt||{}),zr="both_client_credentials_and_authorization_code";var Oe=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(Oe||{}),ht=(s=>(s.NONE="NONE",s.HEADER_PRESENT="HEADER_PRESENT",s.QUERY_PRESENT="QUERY_PRESENT",s.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",s.HEAD_REQUEST="HEAD_REQUEST",s))(ht||{}),wc=p({strategy:$(ht),paramName:f(a())}),vt=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(vt||{});var Ht=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Ht||{}),Bo=p({status:f(te()),body:f(D()),headers:f(N(a(),a()))}),Vo=p({type:A("DELAY"),resumeDateTime:a(),requestIdToReply:f(a()),handlerId:f(a()),streamStepProgress:f($(Ht))}),Zo=p({type:A("WEBHOOK"),requestId:a(),requestIdToReply:f(a()),response:Bo,handlerId:f(a()),streamStepProgress:f($(Ht))}),Dc=U([Vo,Zo]);var Nc=p({body:D(),rawBody:f(D()),headers:N(a(),a()),queryParams:N(a(),a())});function Y(e){return e==null}o(Y,"isNil");function xt(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(xt,"isEmpty");function Gt(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(Gt,"assertNotNullOrUndefined");var Or=je(require("crypto"),1);var Cc=128,Re,He,Uc=o(e=>{if(e<0)throw new RangeError("Wrong ID size");try{!Re||Re.length<e?(Re=Buffer.allocUnsafe(e*Cc),Or.default.randomFillSync(Re),He=0):He+e>Re.length&&(Or.default.randomFillSync(Re),He=0)}catch(t){throw Re=void 0,t}He+=e},"fillPool"),Mc=o(e=>(Uc(e|=0),Re.subarray(He-e,He)),"random"),Lc=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(s=t)=>{if(s<=0)return"";let c="";for(;;){let l=r(i),g=i;for(;g--;)if(c+=e[l[g]&n]||"",c.length===s)return c}}},"customRandom"),Go=o((e,t=21)=>Lc(e,t,Mc),"customAlphabet");var jc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",qo=21,nb=a().check(Ae(new RegExp(`^[0-9a-zA-Z]{${qo}}$`))),Fc=Go(jc,qo);var we=ze(ke(e=>e instanceof Date?e.toISOString():e),a()),se={id:a(),created:we,updated:we},q=o(e=>f(ut(e)),"Nullable");function Rr(e){return f(ut($(e)))}o(Rr,"NullableEnum");var ab=ze(ke(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),f(B())),qt=o(e=>ze(ke(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),f(z(e))),"OptionalArrayFromQuery");var cb=N(a(),D());var _t=(y=>(y.OPENAI="openai",y.OPENROUTER="openrouter",y.ANTHROPIC="anthropic",y.AZURE="azure",y.GOOGLE="google",y.ACTIVEPIECES="activepieces",y.CLOUDFLARE_GATEWAY="cloudflare-gateway",y.CUSTOM="custom",y.BEDROCK="bedrock",y.MISTRAL="mistral",y))(_t||{});var Pb=a().check(Ae(/^#[0-9A-Fa-f]{6}$/));var bb=p({filename:a(),data:D(),type:A("file"),mimetype:f(a())});var Bc=je(Ko());var zb=p({...se,name:a(),permissions:z(a()),platformId:q(a()),type:a(),userCount:f(te())});var Jo=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Jo||{}),wr=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(wr||{}),Dr=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Dr||{});var Nr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Nr||{});var Cr=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Cr||{});var Vc=p({mode:$(Jo),value:D()}),Zc=p({auth:f(a()),fields:N(a(),Vc)}),Hc=p({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:f(Zc)}),Gc=p({type:A("PIECE"),toolName:a().check(ce(1)),pieceMetadata:Hc}),qc=p({type:A("none")}),Wc=p({type:A("access_token"),accessToken:a()}),Kc=p({type:A("api_key"),apiKey:a(),apiKeyHeader:a()}),Jc=p({type:A("headers"),headers:N(a(),a())}),Xc=$e("type",[qc,Wc,Kc,Jc]),Xo=p({type:A("FLOW"),toolName:a().check(ce(1)),externalFlowId:a(),flowDisplayName:f(a())}),Yo=p({type:A("MCP"),toolName:a().check(ce(1)),serverUrl:Oo(),protocol:$(Dr),auth:Xc}),Qo=p({type:A("KNOWLEDGE_BASE"),toolName:a().check(ce(1)),sourceType:$(wr),sourceId:a(),sourceName:a()}),Yc=$e("type",[Gc,Xo,Yo,Qo]),Qc=p({displayName:a(),description:f(a()),type:$(Nr)}),ei=p({type:A("MARKDOWN"),markdown:a()}),Ge={type:A("TOOL_CALL"),input:q(N(a(),D())),output:f(D()),toolName:a(),status:$(Cr),toolCallId:a(),startTime:a(),endTime:f(a())},sI=p(Ge),ti=$e("toolCallType",[p({...Ge,toolCallType:A("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),p({...Ge,toolCallType:A("FLOW"),displayName:a(),externalFlowId:a()}),p({...Ge,toolCallType:A("MCP"),displayName:a(),serverUrl:a()}),p({...Ge,toolCallType:A("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),p({...Ge,toolCallType:A("UNKNOWN"),displayName:a()})]),el=U([ei,ti]);var Ur=(r=>(r.IMAGE="image",r.TEXT="text",r))(Ur||{}),Pe=p({apiKey:a()}),tl=Pe,rl=p({apiKey:a(),apiKeyHash:a()}),nl=Pe,ol=Pe,il=Pe,al=Pe,sl=Pe,ul=Pe,cl=Pe,ai=p({accessKeyId:a().check(ce(1)),secretAccessKey:a().check(ce(1))}),ll=p({}),pl=p({}),dl=p({}),ml=p({}),fl=p({}),gl=p({}),si=p({modelId:a(),modelName:a(),modelType:$(Ur)}),ui=p({apiKeyHeader:a(),baseUrl:a(),models:z(si),defaultHeaders:f(N(a(),a()))}),ci=p({accountId:a(),gatewayId:a(),models:z(si),vertexProject:f(a()),vertexRegion:f(a())}),li=p({resourceName:a(),apiVersion:ze(ke(e=>typeof e=="string"&&e.trim().length===0?void 0:e),f(a()))}),pi=p({region:a().check(ce(1))}),yl=U([tl,il,al,sl,ul,ol,nl,rl,ai,cl]),di=U([ui,ci,li,pi,ll,dl,ml,fl,pl,gl]),hl=p({id:a(),name:a(),type:$(Ur)}),vl=p({id:a(),name:a(),provider:$(_t),config:di,enabledForChat:B()}),xl=p({provider:$(_t),config:di,auth:yl,platformId:a()});var pI={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},ri=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],_l=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],Pl=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],ni=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],Tl=["grok-4.20","grok-4.1-fast"],bl={openai:ri,anthropic:_l,google:ni,activepieces:[...Pl.map(e=>`anthropic/${e}`),...ri.map(e=>`openai/${e}`),...ni.map(e=>`google/${e}`),...Tl.map(e=>`x-ai/${e}`)]};var oi=128e3,Il={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function El({provider:e}){return e?Il[e]??oi:oi}o(El,"getMaxContextTokens");var ii={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"},Sl={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},Al=new Set(["anthropic","mistral"]);function me(e){return{chatModels:bl[e],maxContextTokens:El({provider:e}),defaultEmbeddingModel:ii[e],supportsEmbedding:ii[e]!==void 0,supportsImageGeneration:!Al.has(e),webSearch:Sl[e]}}o(me,"buildProviderCapabilities");var $l={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 kl=p({base64Url:a(),fileName:a(),extension:f(a())}),zl=p({mimeType:a(),url:a(),fileName:f(a())}),Mr=U([kl,zl]);var Ol=U([p({type:A("file"),value:Mr}),p({type:A("markdown"),value:a(),files:f(z(Mr))})]),Rl=p({sessionId:a(),message:a(),files:f(z(a()))});var fi=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(fi||{}),gi=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(gi||{}),Lr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Lr||{});var wl=U([p({...se,name:a(),externalId:a(),type:A("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:p({options:z(p({value:a()}))})}),p({...se,name:a(),externalId:a(),type:U([A("TEXT"),A("NUMBER"),A("DATE"),A("DATETIME")]),tableId:a(),projectId:a()})]),Dl=p({...se,name:a(),folderId:q(a()),projectId:a(),externalId:a(),status:Rr(gi),trigger:Rr(fi)}),Nl=p({...se,tableId:a(),projectId:a(),cells:N(a(),p({updated:a(),created:a(),value:D(),fieldName:a()}))}),Cl=p({events:z($(Lr)),webhookUrl:a(),flowId:a()}),Ul=p({fields:z(p({id:a(),name:a()})),rows:z(N(a(),a())),name:a()}),Ml=p({projectId:a(),limit:f(ct.number()),cursor:f(a()),name:f(a()),externalIds:qt(a()),folderId:f(a()),folderIds:qt(a())}),Ll=p({records:z(z(p({fieldId:a(),value:hi()}))),tableId:a()}),jl=p({cells:f(z(p({fieldId:a(),value:hi()}))),tableId:a(),agentUpdate:f(B())}),yi=$e("operator",[Ue("eq"),Ue("neq"),Ue("gt"),Ue("gte"),Ue("lt"),Ue("lte"),Ue("co"),mi("exists"),mi("not_exists")]),Fl=p({tableId:a(),limit:f(ct.number()),cursor:f(a()),filters:qt(yi)});function hi(){return ze(ke(e=>e==null?e:String(e)),ut(a()))}o(hi,"coerceToString");function Ue(e){return p({fieldId:a(),operator:A(e),value:a()})}o(Ue,"valueFilter");function mi(e){return p({fieldId:a(),operator:A(e)})}o(mi,"existenceFilter");var Bl=p({status:f(te()),body:f(D()),headers:f(N(a(),a()))}),Vl=p({...se,deleted:q(we),ownerId:a(),displayName:a(),platformId:a(),externalId:q(a())});var vi=p({name:a(),description:f(a()),type:a(),required:B()}),Zl=p({pieceName:a(),triggerName:a(),input:p({toolName:a(),toolDescription:a(),inputSchema:z(vi),returnsResponse:B()})});var xi="^[0-9]+\\.[0-9]+\\.[0-9]+$",zI=new RegExp(xi),Gl="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",OI=a().check(Ae(new RegExp(xi))),RI=a().check(Ae(new RegExp(Gl))),ql=p({packageType:A("ARCHIVE"),pieceType:$(Ve),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),_i=p({packageType:A("REGISTRY"),pieceType:A("OFFICIAL"),pieceName:a(),pieceVersion:a()}),Pi=p({packageType:A("REGISTRY"),pieceType:A("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),wI=U([_i,Pi]),DI=U([ql,_i,Pi]);var Wl=$e("type",[p({type:A("CRON_EXPRESSION"),cronExpression:a(),timezone:a()}),p({type:A("INTERVAL"),intervalMs:Ro().check(Mt(6e4))})]),NI=p({...se,type:$(Oe),projectId:a(),flowId:a(),triggerName:a(),schedule:q(Wl),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:q(a()),simulate:B()}),Ti=(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))(Ti||{}),bi=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(bi||{}),Ii=(r=>(r.S3="S3",r.DB="DB",r))(Ii||{}),CI=p({...se,projectId:q(a()),platformId:q(a()),type:$(Ti),compression:$(bi),data:f(D()),location:$(Ii),size:q(te()),fileName:q(a()),s3Key:q(a()),metadata:q(N(a(),a()))}),Ei=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(Ei||{}),Si=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(Si||{}),UI=p({id:a(),email:a(),firstName:a(),status:$(Si),externalId:q(a()),platformId:q(a()),platformRole:$(Ei),lastName:a(),created:we,updated:we,lastActiveDate:q(we),imageUrl:q(a())});var jr=p({...F.shape,...C(N(a(),D()),"OBJECT").shape});var Fr=p({...F.shape,formatProperty:f(a()),...C(a(),"RICH_TEXT").shape});var zi=p({...F.shape,...C(a(),"COLOR").shape});var Br=U([ie,he,Fr,Zt,xe,ae,ve,Ar,lt,kr,_e,mt,jr,ft,dt,$r,pt,zi]),b={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},RichText(e){return{...e,valueSchema:void 0,type:"RICH_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},DateRange(e){return{...e,valueSchema:void 0,type:"DATE_RANGE"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var fe=p({displayName:a(),description:f(a()),hasConnectionIdentifier:f(B())});var Oi=p({username:a(),password:a()}),Vr=p({...fe.shape,username:p({displayName:a(),description:f(a())}),password:p({displayName:a(),description:f(a())}),...C(Oi,"BASIC_AUTH").shape});var Yl=N(a(),U([ie,he,_e,xe,ae])),Zr=p({...fe.shape,props:Yl,...C(D(),"CUSTOM_AUTH").shape});var Me=p({...fe.shape,...C(p({auth:a()}),"SECRET_TEXT").shape});var Ql=N(a(),U([ie,he,Me,_e,xe,ae,ve,Zt])),Ri=p({...fe.shape,props:Ql,...C(D(),"OIDC").shape});var Hr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Hr||{}),wi=U([ie,Me,ae]),Di=N(a(),wi),ep=p({props:f(N(a(),wi)),authUrl:a(),tokenUrl:a(),scope:z(a()),prompt:f(U([A("none"),A("consent"),A("login"),A("omit")])),pkce:f(B()),pkceMethod:f(U([A("plain"),A("S256")])),authorizationMethod:f($(Hr)),grantType:f(U([$(yt),A(zr)])),extra:f(N(a(),a()))}),Ni=p({access_token:a(),props:f(Di),data:N(a(),st())}),Gr=p({...fe.shape,...ep.shape,...C(Ni,"OAUTH2").shape});var qe=U([Vr,Zr,Ri,Gr,Me]),Pt="Connection",qr={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||Pt}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||Pt,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||Pt}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||Pt}},None(){}};var _S={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 tp=p({...F.shape,...C(D(),"CUSTOM").shape,code:a()});var rp=U([Br,qe]),Wr=N(a(),rp),FS=N(a(),Br);var Ci=U([p({strategy:A("CRON"),cronExpression:a()}),p({strategy:A("NONE")})]),We=class{constructor(t,r,n,i,s,c,l,g,v,y,I,_,u,d,h,m,x,P,j,oe,pe){this.name=t;this.displayName=r;this.description=n;this.requireAuth=i;this.props=s;this.type=c;this.handshakeConfiguration=l;this.onHandshake=g;this.renewConfiguration=v;this.onRenew=y;this.onEnable=I;this.onDisable=_;this.onStart=u;this.run=d;this.test=h;this.sampleData=m;this.testStrategy=x;this.outputSchema=P;this.aiMetadata=j;this.classification=oe;this.propertyGroups=pe}static{o(this,"ITrigger")}},Ui=o(e=>{switch(e.type){case"WEBHOOK":return new We(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,e.handshakeConfiguration??{strategy:"NONE"},e.onHandshake??(async()=>({status:200})),e.renewConfiguration??{strategy:"NONE"},e.onRenew??(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,e.test?"TEST_FUNCTION":"SIMULATION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"POLLING":return new We(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"MANUAL":return new We(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"APP_WEBHOOK":return new We(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,Y(e.sampleData)&&Y(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups)}},"createTrigger");var Mi="2",Kt="0.82.0";var Kr=class{constructor(t,r,n,i,s,c,l,g,v=Kt,y,I="",_){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=l;this.auth=g;this.minimumSupportedRelease=v;this.maximumSupportedRelease=y;this.description=I;this.deprecated=_;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:Mi}),"getContextInfo");(!op(v)||ip(v,Kt))&&(this.minimumSupportedRelease=Kt),s.forEach(u=>this._actions[u.name]=u),c.forEach(u=>this._triggers[u.name]=u)}static{o(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:np(this.auth),minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},ji=o(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,i)=>n===i.findIndex(s=>s.type===r.type)))throw new Error("Auth properties must be unique by type");return new Kr(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description,e.deprecated)},"createPiece");function np(e){if(e!==void 0)return Array.isArray(e)?e.map(Li):Li(e)}o(np,"withConnectionIdentifierFlag");function Li(e){return{...e,hasConnectionIdentifier:e.getConnectionIdentifier!==void 0}}o(Li,"flagConnectionIdentifier");function op(e){return/^\d+\.\d+\.\d+$/.test(e)}o(op,"isValidSimpleSemver");function ip(e,t){let[r,n,i]=e.split(".").map(Number),[s,c,l]=t.split(".").map(Number);return r!==s?r<s:n!==c?n<c:i<l}o(ip,"isSemverLessThan");var ap=f(N(a(),N(a(),a()))),Fi=p({id:f(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:z(a()),platformId:f(a()),directoryPath:f(a()),auth:f(U([qe,z(qe)])),version:a(),categories:f(z($(Ze))),minimumSupportedRelease:f(a()),maximumSupportedRelease:f(a()),deprecated:f(B()),i18n:ap}),sp=$(["human","ai","both"]),Bi=p({description:f(a()),idempotent:f(B())}),Vi=$(["READ","SEARCH","WRITE","DESTRUCTIVE"]);var up=$(["tabs","section","summary","builder","footer"]),Zi=p({key:a(),display:up,label:f(a()),description:f(a()),icon:f(a()),props:z(a())}),Hi=p({name:a(),displayName:a(),description:a(),props:Wr,propertyGroups:f(z(Zi)),requireAuth:B(),errorHandlingOptions:f(Sr),outputSchema:f(Bt()),audience:f(sp),aiMetadata:f(Bi),classification:f(Vi)}),Gi=p({name:a(),displayName:a(),description:a(),props:Wr,propertyGroups:f(z(Zi)),errorHandlingOptions:f(Sr),type:$(Oe),sampleData:D(),handshakeConfiguration:f(Bt()),renewConfiguration:f(Ci),testStrategy:$(vt),outputSchema:f(Bt()),aiMetadata:f(Bi),classification:f(Vi)}),cp=p({...Fi.shape,actions:N(a(),Hi),triggers:N(a(),Gi)}),lp=p({...Fi.shape,actions:te(),triggers:te(),suggestedActions:f(z(Hi)),suggestedTriggers:f(z(Gi))}),qi=p({projectUsage:te(),pieceType:$(Ve),packageType:$(gt),platformId:f(a()),archiveId:f(a())}),VA=p({...cp.shape,...qi.shape}),ZA=p({...lp.shape,...qi.shape}),HA=p({name:a(),version:a()});var pp=je(require("path")),dp=je(require("fs/promises"));var Ke=require("node:stream");var Jt=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((s,c)=>{i.append(c,s)}),{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 Xt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new Jr,r=new Xr){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}},Xr=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 Tt=class extends Error{constructor(r,n){let i=n.status||500,s=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:i,body:s},request:{body:r}}));this.requestBody=r;this.status=i,this.responseBody=s}static{o(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};function Wi({error:e,requestBody:t}){return e instanceof Tt?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}o(Wi,"toFailsafeOutput");var ue=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(ue||{});var Yt=class extends Jt{static{o(this,"FetchHttpClient")}constructor(t="",r=new Xt){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(t),s=this.getHeaders(t),c=t.queryParams??{};for(let[j,oe]of Object.entries(c))i.append(j,oe);let l=i.toString(),g=l?`${n}?${l}`:n,v=t.responseType??"json",y=t.followRedirects??!0,I=t.retries??0,{body:_,extraHeaders:u,isStream:d}=mp(t.method)?fp(t.body,s):{body:void 0,extraHeaders:{},isStream:!1},h=yp({...s,...u}),m=await gp(async()=>{let j=new AbortController,oe=t.timeout&&t.timeout>0?setTimeout(()=>j.abort(),t.timeout):void 0;try{let pe={method:t.method.toString(),headers:h,body:_,redirect:y?"follow":"manual",signal:j.signal};return d&&(pe.duplex="half"),r?.dispatcher!==void 0&&(pe.dispatcher=r.dispatcher),await fetch(g,pe)}finally{oe!==void 0&&clearTimeout(oe)}},d?0:I),x=y?300:400;if(m.status<200||m.status>=x){let j=await Ki(m,v==="stream"?"text":v),oe=new Tt(t.body,{status:m.status,responseBody:j});throw console.error("[HttpClient#(sanitized error message)] Request failed:",oe),oe}let P=await Ki(m,v);return{status:m.status,headers:hp(m.headers),body:P}}};function mp(e){return e!=="GET"&&e!=="HEAD"}o(mp,"acceptsRequestBody");function fp(e,t){if(Xi(e))return{body:void 0,extraHeaders:{},isStream:!1};if(vp(e)){let n=new Ke.PassThrough;return e.on("error",i=>n.destroy(i)),e.pipe(n),{body:n,extraHeaders:e.getHeaders(),isStream:!0}}return e instanceof Ke.Readable?{body:e,extraHeaders:{},isStream:!0}:typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}o(fp,"serializeBody");async function Ki(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"stream":return Xi(e.body)?Ke.Readable.from([]):Ke.Readable.fromWeb(e.body);case"blob":return await e.blob();case"text":return await e.text();default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}o(Ki,"parseResponseBody");async function gp(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await Ji(n);continue}return i}catch(i){if(r=i,n<t){await Ji(n);continue}throw i}throw r}o(gp,"sendWithRetries");function Ji(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(Ji,"backoff");function yp(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(yp,"normalizeHeaders");function hp(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(hp,"toHttpHeaders");function vp(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}o(vp,"isNodeFormData");function Xi(e){return e==null}o(Xi,"isNil");var J=new Yt;var im=je(require("fs")),nu=je(ru());var am={"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 sm(e){let t=e.split(";")[0].trim().toLowerCase();return am[t]??""}o(sm,"contentTypeToExtension");var um=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),cm=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 ou({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:s,props:c,extraProps:l,authLocation:g="headers",classification:v="WRITE"}){return K({audience:"human",name:s||"custom_api_call",classification:v,displayName:i||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:b.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:y})=>({url:b.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
3
+ i.e ${cm(t,y)}/resource or /resource`,required:!0,defaultValue:y?t(y):"",...c?.url??{}})}),"props")}),method:b.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(ue).map(y=>({label:y,value:y}))},...c?.method??{}}),headers:b.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:b.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:b.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:b.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:y})=>{if(!y)return{};let I=y,_={};switch(I){case"none":break;case"json":_.data=b.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":_.data=b.LongText({displayName:"Raw Body",required:!0});break;case"form_data":_.data=b.Array({displayName:"Form Data",required:!0,properties:{fieldName:b.ShortText({displayName:"Field Name",required:!0}),fieldType:b.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:b.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:b.File({displayName:"File Field Value",required:!1})}});break}return _},"props")}),response_is_binary:b.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:b.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:b.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:b.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...l},run:o(async y=>{let{method:I,url:_,headers:u,queryParams:d,body:h,body_type:m,failsafe:x,timeout:P,response_is_binary:j,followRedirects:oe}=y.propsValue;Gt(I,"Method"),Gt(_,"URL");let pe=Y(r)?{}:await r(y.auth,y.propsValue),Te=_.url,$u=Te.startsWith("http://")||Te.startsWith("https://")?Te:um({baseUrl:t(y.auth),relativePath:Te}),be={method:I,url:$u,headers:{...u??{},...g==="headers"||!Y(g)?pe:{}},queryParams:{...g==="queryParams"?pe:{},...d??{}},timeout:P?P*1e3:0,followRedirects:oe};if(j&&(be.responseType="arraybuffer"),h)if(m&&m!=="none"){let ge=h.data;if(m==="form_data"){let ku=ge,At=new nu.default;for(let{fieldName:xn,fieldType:_n,textFieldValue:Pn,fileFieldValue:lr}of ku)_n==="text"&&!xt(Pn)?At.append(xn,Pn):_n==="file"&&!xt(lr)&&At.append(xn,lr.data,{filename:lr?.filename});be.body=At,be.headers={...be.headers,...At.getHeaders()}}else be.body=ge}else m||(be.body=h);try{let ge=await J.sendRequest(be);return await lm(y.files,ge.body,ge.status,ge.headers,j)}catch(ge){if(x)return Wi({error:ge,requestBody:be.body});throw ge}},"run")})}o(ou,"createCustomApiCallAction");var lm=o(async(e,t,r,n,i)=>{let s;if(i&&pm(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],l=sm(c??"")||"txt",g;t instanceof ArrayBuffer?g=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?g=t:g=Buffer.from(t),s=await e.write({fileName:`output.${l}`,data:g})}else s=t;return{status:r,headers:n,body:s}},"handleBinaryResponse"),pm=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var St={async poll(e,{store:t,auth:r,propsValue:n,maxItemsToPoll:i,files:s,server:c}){switch(e.strategy){case 0:{let l=await t.get("lastPoll");if(Y(l))throw new Error("lastPoll doesn't exist in the store.");let g=await e.items({store:t,auth:r,propsValue:n,lastFetchEpochMS:l,server:c}),v=g.reduce((y,I)=>Math.max(y,I.epochMilliSeconds),l);return await t.put("lastPoll",v),g.filter(y=>y.epochMilliSeconds>l).map(y=>y.data)}case 1:{let l=await t.get("lastItem"),g=await e.items({store:t,auth:r,propsValue:n,lastItemId:l,files:s,server:c}),v=g.findIndex(_=>_.id===l),y=[];Y(l)||v==-1?y=g??[]:y=g?.slice(0,v)??[],Y(i)||(y=y.slice(-i));let I=y?.[0]?.id;return Y(I)||await t.put("lastItem",I),y.map(_=>_.data)}}},async onEnable(e,{store:t,auth:r,propsValue:n,server:i,isRepublish:s}){switch(e.strategy){case 0:{if(s&&!Y(await t.get("lastPoll")))break;await t.put("lastPoll",Date.now());break}case 1:{if(s&&!Y(await t.get("lastItem")))break;let l=(await e.items({store:t,auth:r,propsValue:n,lastItemId:null,server:i}))?.[0]?.id;Y(l)?await t.delete("lastItem"):await t.put("lastItem",l);break}}},async onDisable(e,t){switch(e.strategy){case 0:case 1:return}},async test(e,{auth:t,propsValue:r,store:n,files:i,server:s}){let c=[];switch(e.strategy){case 0:{c=await e.items({store:n,auth:t,propsValue:r,lastFetchEpochMS:0,server:s});break}case 1:{c=await e.items({store:n,auth:t,propsValue:r,lastItemId:null,files:i,server:s});break}}return dm(c.map(l=>l.data))}};function dm(e){return e.length<=5?e:e.slice(0,5)}o(dm,"getFirstFiveOrAll");var Z=qr.OAuth2({description:"",authUrl:"https://accounts.google.com/o/oauth2/auth",tokenUrl:"https://oauth2.googleapis.com/token",required:!0,scope:["https://www.googleapis.com/auth/tasks","email"]});var M={baseUrl:"https://tasks.googleapis.com",tasksList:b.Dropdown({displayName:"Tasks List",auth:Z,refreshers:[],required:!0,options:o(async({auth:e})=>e?{disabled:!1,options:(await mm(e)).map(n=>({label:n.title,value:n.id}))}:{disabled:!0,placeholder:"Please connect your account first",options:[]},"options")}),title:b.ShortText({displayName:"Title",required:!0}),notes:b.LongText({displayName:"Notes",required:!1}),due:b.DateTime({displayName:"Due Date",description:"Due date of the task (YYYY-MM-DD)",required:!1}),completed:b.Checkbox({displayName:"Completed",description:"Mark task as completed",required:!1})};async function mm(e){let t={method:"GET",url:`${M.baseUrl}/tasks/v1/users/@me/lists`,authentication:{type:"BEARER_TOKEN",token:e.access_token}};return(await J.sendRequest(t)).body.items}o(mm,"getLists");async function ur(e,t,r){let n={method:"GET",url:`${M.baseUrl}/tasks/v1/lists/${t}/tasks`,authentication:{type:"BEARER_TOKEN",token:e.access_token},queryParams:r};return(await J.sendRequest(n)).body.items??[]}o(ur,"getTasks");async function iu(e,t,r){let n={method:"POST",url:`${M.baseUrl}/tasks/v1/lists/${t}/tasks`,authentication:{type:"BEARER_TOKEN",token:e.access_token},body:r};return J.sendRequest(n)}o(iu,"createTask");var Ce=[{key:"title",label:"Title"},{key:"status",label:"Status"},{key:"id",label:"Task ID"},{key:"notes",label:"Notes"},{key:"due",label:"Due Date",format:"date"},{key:"completed",label:"Completed At",format:"datetime"},{key:"updated",label:"Updated At",format:"datetime"},{key:"parent",label:"Parent Task ID"},{key:"position",label:"Position"},{key:"webViewLink",label:"Task Link",format:"url"}],fm=[{key:"title",label:"Title"},{key:"id",label:"Task List ID"},{key:"updated",label:"Updated At",format:"datetime"}],au={fields:Ce},su={fields:Ce},uu={fields:Ce},cu={fields:Ce},lu={fields:Ce},pu={fields:[{key:"body",label:"Task",value:"body",children:Ce}]},du={fields:[{key:"tasks",label:"Tasks",listItems:Ce,labelKey:"title"},{key:"count",label:"Count",format:"number"}]},mu={fields:[{key:"taskLists",label:"Task Lists",listItems:fm,labelKey:"title"},{key:"count",label:"Count",format:"number"}]},fu={fields:[{key:"cleared",label:"Cleared",format:"boolean"}]},gu={fields:[{key:"deleted",label:"Deleted",format:"boolean"},{key:"alreadyAbsent",label:"Already Absent",format:"boolean"}]},yu={fields:Ce};var hu=K({auth:Z,name:"add_task",classification:"WRITE",description:"Add a new task to a specified task list",audience:"human",aiMetadata:{description:"Creates a new task in a specific Google Tasks list, with optional notes, due date, and a completed flag. Use to add a to-do item for the authenticated user; requires a valid task-list ID (resolve it first if you only have a list name). Not idempotent: each call appends a separate task even with identical input.",idempotent:!1},displayName:"Add Task",outputSchema:pu,props:{tasks_list:M.tasksList,title:M.title,notes:M.notes,due:M.due,completed:M.completed},async run({auth:e,propsValue:t}){let r={kind:"tasks#task",status:t.completed?"completed":"needsAction",title:t.title,completed:t.completed?new Date().toISOString():"",notes:t.notes,due:t.due?`${new Date(t.due).toISOString().split("T")[0]}T00:00:00Z`:void 0};return iu(e,t.tasks_list,r)}});var vu=K({auth:Z,name:"find_tasks",classification:"SEARCH",displayName:"Find Tasks",description:"Search and list tasks in a task list with optional date-range and status filters.",audience:"ai",aiMetadata:{description:"List tasks in a task list, filtered by due/completed/updated date ranges and status. The piece is otherwise write-only \u2014 call this first to find a task's id before completing, updating, or deleting it. Read-only.",idempotent:!0},outputSchema:du,props:{tasks_list:M.tasksList,show_completed:b.Checkbox({displayName:"Show Completed",description:"Include completed tasks in results. Defaults to true.",required:!1,defaultValue:!0}),show_hidden:b.Checkbox({displayName:"Show Hidden",description:"Include hidden tasks (tasks that have been completed and a day has passed). Defaults to false.",required:!1,defaultValue:!1}),due_min:b.DateTime({displayName:"Due Date From",description:"Return tasks due on or after this date. RFC 3339 timestamp, e.g. 2026-06-01T00:00:00Z.",required:!1}),due_max:b.DateTime({displayName:"Due Date To",description:"Return tasks due before this date (exclusive). RFC 3339 timestamp, e.g. 2026-07-01T00:00:00Z.",required:!1}),completed_min:b.DateTime({displayName:"Completed Date From",description:"Return tasks completed on or after this date. RFC 3339 timestamp.",required:!1}),completed_max:b.DateTime({displayName:"Completed Date To",description:"Return tasks completed before this date (exclusive). RFC 3339 timestamp.",required:!1}),updated_min:b.DateTime({displayName:"Updated Since",description:'Return tasks last modified on or after this date. Useful for "since last run" incremental reads. RFC 3339 timestamp.',required:!1}),max_results:b.Number({displayName:"Max Results",description:"Maximum number of tasks to return (1\u2013100). Defaults to 20 when omitted.",required:!1})},async run({auth:e,propsValue:t}){let r=e,n={};t.show_completed!==void 0&&t.show_completed!==null&&(n.showCompleted=t.show_completed),t.show_hidden!==void 0&&t.show_hidden!==null&&(n.showHidden=t.show_hidden),t.due_min&&(n.dueMin=new Date(t.due_min).toISOString()),t.due_max&&(n.dueMax=new Date(t.due_max).toISOString()),t.completed_min&&(n.completedMin=new Date(t.completed_min).toISOString()),t.completed_max&&(n.completedMax=new Date(t.completed_max).toISOString()),t.updated_min&&(n.updatedMin=new Date(t.updated_min).toISOString()),t.max_results&&(n.maxResults=t.max_results);let i=await ur(r,t.tasks_list,n);return{tasks:i,count:i.length}}});var xu=K({auth:Z,name:"complete_task",classification:"WRITE",displayName:"Mark Task Complete",description:"Mark an existing task as completed.",audience:"ai",aiMetadata:{description:"Mark an existing task as completed (by task id). Idempotent \u2014 re-completing a done task is a no-op. Use Update Task to reopen or edit other fields.",idempotent:!0},outputSchema:su,props:{tasks_list:M.tasksList,task_id:b.ShortText({displayName:"Task ID",description:"The ID of the task to mark as completed. Obtain the id from Find Tasks.",required:!0})},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n,task_id:i}=t;return(await J.sendRequest({method:"PATCH",url:`${M.baseUrl}/tasks/v1/lists/${n}/tasks/${i}`,authentication:{type:"BEARER_TOKEN",token:r.access_token},body:{status:"completed"}})).body}});var _u=K({auth:Z,name:"update_task",classification:"WRITE",displayName:"Update Task",description:"Edit an existing task \u2014 title, notes, due date, or status.",audience:"ai",aiMetadata:{description:"Edit an existing task's title, notes, due date, or status (e.g. rename, change due date, reopen). Partial update \u2014 only provided fields change. Not idempotent (use Mark Task Complete for the common complete case).",idempotent:!1},outputSchema:lu,props:{tasks_list:M.tasksList,task_id:b.ShortText({displayName:"Task ID",description:"The ID of the task to update. Obtain the id from Find Tasks.",required:!0}),title:b.ShortText({displayName:"Title",description:"New title for the task.",required:!1}),notes:b.LongText({displayName:"Notes",description:"New notes / description for the task.",required:!1}),due:b.DateTime({displayName:"Due Date",description:"New due date for the task. RFC 3339 timestamp, e.g. 2026-07-15T00:00:00Z.",required:!1}),status:b.StaticDropdown({displayName:"Status",description:"Task status. To simply complete a task prefer Mark Task Complete; set needsAction here to reopen a completed task.",required:!1,options:{options:[{label:"Needs Action",value:"needsAction"},{label:"Completed",value:"completed"}]}})},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n,task_id:i,title:s,notes:c,due:l,status:g}=t,v={};return s!=null&&s!==""&&(v.title=s),c!=null&&(v.notes=c),l!=null&&(v.due=`${new Date(l).toISOString().split("T")[0]}T00:00:00Z`),g!=null&&(v.status=g),(await J.sendRequest({method:"PATCH",url:`${M.baseUrl}/tasks/v1/lists/${n}/tasks/${i}`,authentication:{type:"BEARER_TOKEN",token:r.access_token},body:v})).body}});var Pu=K({auth:Z,name:"delete_task",classification:"DESTRUCTIVE",displayName:"Delete Task",description:"Permanently delete a task by ID.",audience:"ai",aiMetadata:{description:"Delete a task by id. Idempotent \u2014 deleting an already-removed task succeeds (converges to absent).",idempotent:!0},outputSchema:gu,props:{tasks_list:M.tasksList,task_id:b.ShortText({displayName:"Task ID",description:"The ID of the task to delete. Obtain the id from Find Tasks.",required:!0})},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n,task_id:i}=t;try{await J.sendRequest({method:"DELETE",url:`${M.baseUrl}/tasks/v1/lists/${n}/tasks/${i}`,authentication:{type:"BEARER_TOKEN",token:r.access_token}})}catch(s){if(s?.response?.status===404||s?.status===404)return{deleted:!0,alreadyAbsent:!0};throw s}return{deleted:!0,alreadyAbsent:!1}}});var Tu=K({auth:Z,name:"create_task",classification:"WRITE",displayName:"Create Task",description:"Create a new task in a task list, optionally as a subtask and/or positioned after a sibling.",audience:"ai",aiMetadata:{description:"Create a new task in a task list, optionally as a subtask of a parent task (parent_task_id) and/or positioned after a sibling (previous_task_id); resolve those ids via Find Tasks. Use to add a single to-do; for marking an existing task done use Mark Task Complete. Not idempotent \u2014 each call creates a separate task.",idempotent:!1},outputSchema:uu,props:{tasks_list:M.tasksList,title:M.title,notes:M.notes,due_date:M.due,parent_task_id:b.ShortText({displayName:"Parent Task ID",description:"Make this a subtask of the task with this id (must be in the same list). Obtain the id from Find Tasks. Omit to create a top-level task.",required:!1}),previous_task_id:b.ShortText({displayName:"Previous Task ID",description:"Place the new task immediately after the sibling with this id. Obtain the id from Find Tasks. Omit to place it first among its siblings.",required:!1})},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n,title:i,notes:s,due_date:c,parent_task_id:l,previous_task_id:g}=t,v={kind:"tasks#task",status:"needsAction",title:i,notes:s,due:c?`${new Date(c).toISOString().split("T")[0]}T00:00:00Z`:void 0},y={};l&&(y.parent=l),g&&(y.previous=g);let I={method:"POST",url:`${M.baseUrl}/tasks/v1/lists/${n}/tasks`,authentication:{type:"BEARER_TOKEN",token:r.access_token},body:v,queryParams:y};return(await J.sendRequest(I)).body}});var bu=K({auth:Z,name:"get_task",classification:"READ",displayName:"Get Task",description:"Fetch a single task by its ID.",audience:"ai",aiMetadata:{description:"Fetch a single task's full details (title, notes, due, status, parent, position, links) by its id. Use when you already have a specific task id and want its current state; to find tasks by criteria use Find Tasks instead. Read-only.",idempotent:!0},outputSchema:au,props:{tasks_list:M.tasksList,task_id:b.ShortText({displayName:"Task ID",description:"The ID of the task to fetch. Obtain the id from Find Tasks.",required:!0})},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n,task_id:i}=t;return(await J.sendRequest({method:"GET",url:`${M.baseUrl}/tasks/v1/lists/${n}/tasks/${i}`,authentication:{type:"BEARER_TOKEN",token:r.access_token}})).body}});var Iu=K({auth:Z,name:"move_task",classification:"WRITE",displayName:"Move Task",description:"Reposition or reparent a task within its list, or move it to another list.",audience:"ai",aiMetadata:{description:"Move a task to a new position within its list \u2014 reparent it under another task (parent_task_id) and/or place it after a sibling (previous_task_id); omit both to move it to the top level. Optionally move it to a different list (destination_tasklist_id). All ids come from Find Tasks, and parent/previous must reference tasks in the destination list. Use this for reordering/nesting; use Update Task to change a task's fields. Not idempotent \u2014 position depends on current order.",idempotent:!1},outputSchema:cu,props:{tasks_list:M.tasksList,task_id:b.ShortText({displayName:"Task ID",description:"The ID of the task to move. Obtain the id from Find Tasks.",required:!0}),parent_task_id:b.ShortText({displayName:"Parent Task ID",description:"Reparent the task under the task with this id (must be in the destination list). Obtain the id from Find Tasks. Omit to move it to the top level.",required:!1}),previous_task_id:b.ShortText({displayName:"Previous Task ID",description:"Place the task immediately after the sibling with this id (must be in the destination list). Obtain the id from Find Tasks. Omit to place it first among its siblings; to move it to the end, pass the last sibling's id (read the current order with Find Tasks).",required:!1}),destination_tasklist_id:b.ShortText({displayName:"Destination Task List ID",description:"Move the task to this task list. Omit to keep it in the current list. Recurring tasks cannot be moved between lists.",required:!1})},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n,task_id:i,parent_task_id:s,previous_task_id:c,destination_tasklist_id:l}=t,g={};s&&(g.parent=s),c&&(g.previous=c),l&&(g.destinationTasklist=l);let v={method:"POST",url:`${M.baseUrl}/tasks/v1/lists/${n}/tasks/${i}/move`,authentication:{type:"BEARER_TOKEN",token:r.access_token},queryParams:g};return(await J.sendRequest(v)).body}});var Eu=K({auth:Z,name:"clear_completed_tasks",classification:"DESTRUCTIVE",displayName:"Clear Completed Tasks",description:"Hide all completed tasks in a task list.",audience:"ai",aiMetadata:{description:"Hide all completed tasks in a task list (they are marked hidden and drop out of the default view, not permanently deleted). Use to tidy a list after a batch of completions. Affects every completed task at once \u2014 there is no per-task selection; to remove a single task use Delete Task. Not idempotent \u2014 operates on whatever is completed at call time.",idempotent:!1},outputSchema:fu,props:{tasks_list:M.tasksList},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n}=t;return await J.sendRequest({method:"POST",url:`${M.baseUrl}/tasks/v1/lists/${n}/clear`,authentication:{type:"BEARER_TOKEN",token:r.access_token}}),{cleared:!0}}});var Su=K({auth:Z,name:"list_task_lists",classification:"SEARCH",displayName:"List Task Lists",description:"List the authenticated user's task lists (id and title).",audience:"ai",aiMetadata:{description:"List the authenticated user's task lists, returning each list's id and title. Use to resolve a list name to its id before operating on tasks, or to discover available lists. Read-only.",idempotent:!0},outputSchema:mu,props:{max_results:b.Number({displayName:"Max Results",description:"Maximum number of task lists to return (1\u2013100). Defaults to 20 when omitted.",required:!1})},async run({auth:e,propsValue:t}){let r=e,{max_results:n}=t,i={};n&&(i.maxResults=String(n));let s={method:"GET",url:`${M.baseUrl}/tasks/v1/users/@me/lists`,authentication:{type:"BEARER_TOKEN",token:r.access_token},queryParams:i},l=(await J.sendRequest(s)).body.items??[];return{taskLists:l,count:l.length}}});var ym={tasks_list:M.tasksList},cr={strategy:0,items:o(async({auth:e,propsValue:t,lastFetchEpochMS:r})=>(await ur(e,t.tasks_list)).filter(s=>Date.parse(s.updated??"0")>r).map(s=>({epochMilliSeconds:Date.parse(s.updated??"0"),data:s})),"items")},Au=Ui({auth:Z,name:"new_task",classification:"READ",displayName:"New Task",description:"Triggers when a task is created",aiMetadata:{description:"Fires when a task in the selected Google Tasks list is newly created or updated since the last poll, emitting the task that changed. Use to react to additions or edits in a specific task list."},type:"POLLING",props:ym,outputSchema:yu,sampleData:{},async test(e){let t=e.store,r=e.auth,n=e.propsValue;return await St.test(cr,{store:t,auth:r,propsValue:n,files:e.files})},async onEnable(e){let t=e.store,r=e.auth,n=e.propsValue;await St.onEnable(cr,{store:t,auth:r,propsValue:n})},async onDisable(e){let t=e.store,r=e.auth,n=e.propsValue;await St.onEnable(cr,{store:t,auth:r,propsValue:n})},async run(e){let t=e.store,r=e.auth,n=e.propsValue;return await St.poll(cr,{store:t,auth:r,propsValue:n,files:e.files})}});var hm=ji({minimumSupportedRelease:"0.86.4",logoUrl:"https://cdn.activepieces.com/pieces/google-tasks.png",categories:["PRODUCTIVITY"],actions:[hu,vu,xu,_u,Pu,Tu,bu,Iu,Eu,Su,ou({baseUrl:o(()=>M.baseUrl,"baseUrl"),auth:Z,authMapping:o(async e=>({Authorization:`Bearer ${e.access_token}`}),"authMapping")})],displayName:"Google Tasks",description:"Task list management application",authors:["Salem-Alaa","kishanprmr","MoShizzle","khaledmashaly","abuaboud"],triggers:[Au],auth:Z});0&&(module.exports={googleTasks});
4
4
  /*! Bundled license information:
5
5
 
6
6
  mime-types/index.js: