@activepieces/piece-cryptolens 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,27 +1,12 @@
1
1
  {
2
2
  "name": "@activepieces/piece-cryptolens",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
- "types": "./src/index.d.ts",
7
- "dependencies": {
8
- "@sinclair/typebox": "0.34.11",
9
- "ai": "^6.0.0",
10
- "axios": "1.13.5",
11
- "axios-retry": "4.4.1",
12
- "deepmerge-ts": "7.1.0",
13
- "form-data": "4.0.4",
14
- "mime-types": "2.1.35",
15
- "nanoid": "3.3.8",
16
- "semver": "7.6.0",
17
- "socket.io-client": "4.8.1",
18
- "tslib": "^2.3.0",
19
- "zod": "4.1.13",
20
- "@activepieces/pieces-common": "0.11.6",
21
- "@activepieces/pieces-framework": "0.25.4",
22
- "@activepieces/shared": "0.37.0"
23
- },
24
- "resolutions": {
25
- "rollup": "npm:@rollup/wasm-node"
26
- }
6
+ "dependencies": {},
7
+ "files": [
8
+ "src/index.js",
9
+ "package.json",
10
+ "src/i18n"
11
+ ]
27
12
  }
package/src/index.js CHANGED
@@ -1,38 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cryptolens = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const auth_1 = require("./lib/common/auth");
7
- const add_customer_1 = require("./lib/actions/add-customer");
8
- const block_key_1 = require("./lib/actions/block-key");
9
- const create_key_1 = require("./lib/actions/create-key");
10
- const new_api_event_1 = require("./lib/triggers/new-api-event");
11
- const pieces_common_1 = require("@activepieces/pieces-common");
12
- const shared_1 = require("@activepieces/shared");
13
- exports.cryptolens = (0, pieces_framework_1.createPiece)({
14
- displayName: 'Cryptolens',
15
- auth: auth_1.cryptolensAuth,
16
- minimumSupportedRelease: '0.36.1',
17
- logoUrl: 'https://cdn.activepieces.com/pieces/cryptolens.png',
18
- authors: ['sanket-a11y'],
19
- categories: [shared_1.PieceCategory.DEVELOPER_TOOLS],
20
- description: 'Cryptolens is a Software Licensing as a Service (SLaaS) platform that provides developers with tools to manage software licenses, protect against piracy, and analyze usage data.',
21
- actions: [
22
- add_customer_1.addCustomer,
23
- block_key_1.blockKey,
24
- create_key_1.createKey,
25
- (0, pieces_common_1.createCustomApiCallAction)({
26
- auth: auth_1.cryptolensAuth,
27
- baseUrl: () => 'https://api.cryptolens.io/api',
28
- authLocation: 'queryParams',
29
- authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
30
- return {
31
- token: `${auth.secret_text}`,
32
- };
33
- }),
34
- }),
35
- ],
36
- triggers: [new_api_event_1.newApiEvent],
37
- });
38
- //# sourceMappingURL=index.js.map
1
+ "use strict";var js=Object.create;var Je=Object.defineProperty;var Ls=Object.getOwnPropertyDescriptor;var Fs=Object.getOwnPropertyNames;var Bs=Object.getPrototypeOf,Vs=Object.prototype.hasOwnProperty;var o=(e,t)=>Je(e,"name",{value:t,configurable:!0});var $=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mn=(e,t)=>{for(var r in t)Je(e,r,{get:t[r],enumerable:!0})},fn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Fs(t))!Vs.call(e,i)&&i!==r&&Je(e,i,{get:()=>t[i],enumerable:!(n=Ls(t,i))||n.enumerable});return e};var we=(e,t,r)=>(r=e!=null?js(Bs(e)):{},fn(t||!e||!e.__esModule?Je(r,"default",{value:e,enumerable:!0}):r,e)),Zs=e=>fn(Je({},"__esModule",{value:!0}),e);var wo=$((Oo,Lt)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},n=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),u="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",l={zoneIndex:new RegExp(u,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${u})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${u})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${t}\\.${t}\\.${t}\\.${t}(${u})?$`,"i")};function f(s,d){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let g=0,m=-1,v=(s.match(l.zoneIndex)||[])[0],_,j;for(v&&(v=v.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)g++;if(s.substr(0,2)==="::"&&g--,s.substr(-2,2)==="::"&&g--,g>d)return null;for(j=d-g,_=":";j--;)_+="0:";return s=s.replace("::",_),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),d=function(){let ee=s.split(":"),oe=[];for(let Ke=0;Ke<ee.length;Ke++)oe.push(parseInt(ee[Ke],16));return oe}(),{parts:d,zoneId:v}}o(f,"expandIPv6");function y(s,d,g,m){if(s.length!==d.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let v=0,_;for(;m>0;){if(_=g-m,_<0&&(_=0),s[v]>>_!==d[v]>>_)return!1;m-=g,v+=1}return!0}o(y,"matchCIDR");function x(s){if(i.test(s))return parseInt(s,16);if(s[0]==="0"&&!isNaN(parseInt(s[1],10))){if(n.test(s))return parseInt(s,8);throw new Error(`ipaddr: cannot parse ${s} as octal`)}return parseInt(s,10)}o(x,"parseIntAuto");function b(s,d){for(;s.length<d;)s=`0${s}`;return s}o(b,"padPart");let P={};P.IPv4=function(){function s(d){if(d.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let g,m;for(g=0;g<d.length;g++)if(m=d[g],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=d}return o(s,"IPv4"),s.prototype.SpecialRanges={unspecified:[[new s([0,0,0,0]),8]],broadcast:[[new s([255,255,255,255]),32]],multicast:[[new s([224,0,0,0]),4]],linkLocal:[[new s([169,254,0,0]),16]],loopback:[[new s([127,0,0,0]),8]],carrierGradeNat:[[new s([100,64,0,0]),10]],private:[[new s([10,0,0,0]),8],[new s([172,16,0,0]),12],[new s([192,168,0,0]),16]],reserved:[[new s([192,0,0,0]),24],[new s([192,0,2,0]),24],[new s([192,88,99,0]),24],[new s([198,18,0,0]),15],[new s([198,51,100,0]),24],[new s([203,0,113,0]),24],[new s([240,0,0,0]),4]],as112:[[new s([192,175,48,0]),24],[new s([192,31,196,0]),24]],amt:[[new s([192,52,193,0]),24]]},s.prototype.kind=function(){return"ipv4"},s.prototype.match=function(d,g){let m;if(g===void 0&&(m=d,d=m[0],g=m[1]),d.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return y(this.octets,d.octets,8,g)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,g=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,_,j;for(v=3;v>=0;v-=1)if(_=this.octets[v],_ in m){if(j=m[_],g&&j!==0)return null;j!==8&&(g=!0),d+=j}else return null;return 32-d},s.prototype.range=function(){return P.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){return this.octets.slice(0)},s.prototype.toIPv4MappedAddress=function(){return P.IPv6.parse(`::ffff:${this.toString()}`)},s.prototype.toNormalizedString=function(){return this.toString()},s.prototype.toString=function(){return this.octets.join(".")},s}(),P.IPv4.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),g=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],_=0;for(;_<4;)v.push(parseInt(g[_],10)|parseInt(m[_],10)^255),_++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},P.IPv4.isIPv4=function(s){return this.parser(s)!==null},P.IPv4.isValid=function(s){try{return new this(this.parser(s)),!0}catch{return!1}},P.IPv4.isValidCIDR=function(s){try{return this.parseCIDR(s),!0}catch{return!1}},P.IPv4.isValidFourPartDecimal=function(s){return!!(P.IPv4.isValid(s)&&s.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},P.IPv4.isValidCIDRFourPartDecimal=function(s){let d=s.match(/^(.+)\/(\d+)$/);return!P.IPv4.isValidCIDR(s)||!d?!1:P.IPv4.isValidFourPartDecimal(d[1])},P.IPv4.networkAddressFromCIDR=function(s){let d,g,m,v,_;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),_=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],g=0;g<4;)v.push(parseInt(m[g],10)&parseInt(_[g],10)),g++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},P.IPv4.parse=function(s){let d=this.parser(s);if(d===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(d)},P.IPv4.parseCIDR=function(s){let d;if(d=s.match(/^(.+)\/(\d+)$/)){let g=parseInt(d[2]);if(g>=0&&g<=32){let m=[this.parse(d[1]),g];return Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},P.IPv4.parser=function(s){let d,g,m;if(d=s.match(r.fourOctet))return function(){let v=d.slice(1,6),_=[];for(let j=0;j<v.length;j++)g=v[j],_.push(x(g));return _}();if(d=s.match(r.longValue)){if(m=x(d[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return function(){let v=[],_;for(_=0;_<=24;_+=8)v.push(m>>_&255);return v}().reverse()}else return(d=s.match(r.twoOctet))?function(){let v=d.slice(1,4),_=[];if(m=x(v[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return _.push(x(v[0])),_.push(m>>16&255),_.push(m>>8&255),_.push(m&255),_}():(d=s.match(r.threeOctet))?function(){let v=d.slice(1,5),_=[];if(m=x(v[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return _.push(x(v[0])),_.push(x(v[1])),_.push(m>>8&255),_.push(m&255),_}():null},P.IPv4.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>32)throw new Error("ipaddr: invalid IPv4 prefix length");let d=[0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)d[g]=255,g++;return m<4&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},P.IPv6=function(){function s(d,g){let m,v;if(d.length===16)for(this.parts=[],m=0;m<=14;m+=2)this.parts.push(d[m]<<8|d[m+1]);else if(d.length===8)this.parts=d;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(m=0;m<this.parts.length;m++)if(v=this.parts[m],!(0<=v&&v<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");g&&(this.zoneId=g)}return o(s,"IPv6"),s.prototype.SpecialRanges={unspecified:[new s([0,0,0,0,0,0,0,0]),128],linkLocal:[new s([65152,0,0,0,0,0,0,0]),10],multicast:[new s([65280,0,0,0,0,0,0,0]),8],loopback:[new s([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new s([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new s([0,0,0,0,0,65535,0,0]),96],discard:[new s([256,0,0,0,0,0,0,0]),64],rfc6145:[new s([0,0,0,0,65535,0,0,0]),96],rfc6052:[new s([100,65435,0,0,0,0,0,0]),96],"6to4":[new s([8194,0,0,0,0,0,0,0]),16],teredo:[new s([8193,0,0,0,0,0,0,0]),32],benchmarking:[new s([8193,2,0,0,0,0,0,0]),48],amt:[new s([8193,3,0,0,0,0,0,0]),32],as112v6:[[new s([8193,4,274,0,0,0,0,0]),48],[new s([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new s([8193,16,0,0,0,0,0,0]),28],orchid2:[new s([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new s([8193,48,0,0,0,0,0,0]),28],reserved:[[new s([8193,0,0,0,0,0,0,0]),23],[new s([8193,3512,0,0,0,0,0,0]),32]]},s.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},s.prototype.kind=function(){return"ipv6"},s.prototype.match=function(d,g){let m;if(g===void 0&&(m=d,d=m[0],g=m[1]),d.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return y(this.parts,d.parts,16,g)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,g=!1,m={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},v,_;for(let j=7;j>=0;j-=1)if(v=this.parts[j],v in m){if(_=m[v],g&&_!==0)return null;_!==16&&(g=!0),d+=_}else return null;return 128-d},s.prototype.range=function(){return P.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let d,g=[],m=this.parts;for(let v=0;v<m.length;v++)d=m[v],g.push(d>>8),g.push(d&255);return g},s.prototype.toFixedLengthString=function(){let d=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(b(this.parts[v].toString(16),4));return m}.call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),d+g},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let d=this.parts.slice(-2),g=d[0],m=d[1];return new P.IPv4([g>>8,g&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let d=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(this.parts[v].toString(16));return m}.call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),d+g},s.prototype.toRFC5952String=function(){let d=/((^|:)(0(:|$)){2,})/g,g=this.toNormalizedString(),m=0,v=-1,_;for(;_=d.exec(g);)_[0].length>v&&(m=_.index,v=_[0].length);return v<0?g:`${g.substring(0,m)}::${g.substring(m+v)}`},s.prototype.toString=function(){return this.toRFC5952String()},s}(),P.IPv6.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),g=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],_=0;for(;_<16;)v.push(parseInt(g[_],10)|parseInt(m[_],10)^255),_++;return new this(v)}catch(d){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${d})`)}},P.IPv6.isIPv6=function(s){return this.parser(s)!==null},P.IPv6.isValid=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{let d=this.parser(s);return new this(d.parts,d.zoneId),!0}catch{return!1}},P.IPv6.isValidCIDR=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{return this.parseCIDR(s),!0}catch{return!1}},P.IPv6.networkAddressFromCIDR=function(s){let d,g,m,v,_;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),_=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],g=0;g<16;)v.push(parseInt(m[g],10)&parseInt(_[g],10)),g++;return new this(v)}catch(j){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${j})`)}},P.IPv6.parse=function(s){let d=this.parser(s);if(d.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(d.parts,d.zoneId)},P.IPv6.parseCIDR=function(s){let d,g,m;if((g=s.match(/^(.+)\/(\d+)$/))&&(d=parseInt(g[2]),d>=0&&d<=128))return m=[this.parse(g[1]),d],Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},P.IPv6.parser=function(s){let d,g,m,v,_,j;if(m=s.match(l.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(l.native.test(s))return f(s,8);if((m=s.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(_=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],g=0;g<_.length;g++)if(v=_[g],!(0<=v&&v<=255))return null;return d.parts.push(_[0]<<8|_[1]),d.parts.push(_[2]<<8|_[3]),{parts:d.parts,zoneId:d.zoneId}}return null},P.IPv6.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>128)throw new Error("ipaddr: invalid IPv6 prefix length");let d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)d[g]=255,g++;return m<16&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},P.fromByteArray=function(s){let d=s.length;if(d===4)return new P.IPv4(s);if(d===16)return new P.IPv6(s);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},P.isValid=function(s){return P.IPv6.isValid(s)||P.IPv4.isValid(s)},P.isValidCIDR=function(s){return P.IPv6.isValidCIDR(s)||P.IPv4.isValidCIDR(s)},P.parse=function(s){if(P.IPv6.isValid(s))return P.IPv6.parse(s);if(P.IPv4.isValid(s))return P.IPv4.parse(s);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},P.parseCIDR=function(s){try{return P.IPv6.parseCIDR(s)}catch{try{return P.IPv4.parseCIDR(s)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},P.process=function(s){let d=this.parse(s);return d.kind()==="ipv6"&&d.isIPv4MappedAddress()?d.toIPv4Address():d},P.subnetMatch=function(s,d,g){let m,v,_,j;g==null&&(g="unicast");for(v in d)if(Object.prototype.hasOwnProperty.call(d,v)){for(_=d[v],_[0]&&!(_[0]instanceof Array)&&(_=[_]),m=0;m<_.length;m++)if(j=_[m],s.kind()===j[0].kind()&&s.match.apply(s,j))return v}return g},typeof Lt<"u"&&Lt.exports?Lt.exports=P:e.ipaddr=P})(Oo)});var zi=$((KS,Ai)=>{var Si=require("stream").Stream,xp=require("util");Ai.exports=ae;function ae(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(ae,"DelayedStream");xp.inherits(ae,Si);ae.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(ae.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});ae.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};ae.prototype.resume=function(){this._released||this.release(),this.source.resume()};ae.prototype.pause=function(){this.source.pause()};ae.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};ae.prototype.pipe=function(){var e=Si.prototype.pipe.apply(this,arguments);return this.resume(),e};ae.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)};ae.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 Ri=$((XS,wi)=>{var Pp=require("util"),Oi=require("stream").Stream,ki=zi();wi.exports=q;function q(){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(q,"CombinedStream");Pp.inherits(q,Oi);q.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};q.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};q.prototype.append=function(e){var t=q.isStreamLike(e);if(t){if(!(e instanceof ki)){var r=ki.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};q.prototype.pipe=function(e,t){return Oi.prototype.pipe.call(this,e,t),this.resume(),e};q.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}};q.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=q.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};q.prototype._pipeNext=function(e){this._currentStream=e;var t=q.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()};q.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};q.prototype.write=function(e){this.emit("data",e)};q.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};q.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")};q.prototype.end=function(){this._reset(),this.emit("end")};q.prototype.destroy=function(){this._reset(),this.emit("close")};q.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};q.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};q.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)};q.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Di=$((QS,Ni)=>{"use strict";Ni.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 Mi=$(Q=>{"use strict";var qt=Di(),_p=require("path").extname,Ci=/^\s*([^;\s]*)(?:;|\s|$)/,bp=/^text\//i;Q.charset=Ui;Q.charsets={lookup:Ui};Q.contentType=Ip;Q.extension=Tp;Q.extensions=Object.create(null);Q.lookup=Ep;Q.types=Object.create(null);$p(Q.extensions,Q.types);function Ui(e){if(!e||typeof e!="string")return!1;var t=Ci.exec(e),r=t&&qt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&bp.test(t[1])?"UTF-8":!1}o(Ui,"charset");function Ip(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?Q.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=Q.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(Ip,"contentType");function Tp(e){if(!e||typeof e!="string")return!1;var t=Ci.exec(e),r=t&&Q.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(Tp,"extension");function Ep(e){if(!e||typeof e!="string")return!1;var t=_p("x."+e).toLowerCase().substr(1);return t&&Q.types[t]||!1}o(Ep,"lookup");function $p(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(qt).forEach(o(function(i){var u=qt[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var l=0;l<c.length;l++){var f=c[l];if(t[f]){var y=r.indexOf(qt[t[f]].source),x=r.indexOf(u.source);if(t[f]!=="application/octet-stream"&&(y>x||y===x&&t[f].substr(0,12)==="application/"))continue}t[f]=i}}},"forEachMimeType"))}o($p,"populateMaps")});var Li=$((rA,ji)=>{ji.exports=Sp;function Sp(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(Sp,"defer")});var Vr=$((oA,Bi)=>{var Fi=Li();Bi.exports=Ap;function Ap(e){var t=!1;return Fi(function(){t=!0}),o(function(n,i){t?e(n,i):Fi(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(Ap,"async")});var Zr=$((aA,Vi)=>{Vi.exports=zp;function zp(e){Object.keys(e.jobs).forEach(kp.bind(e)),e.jobs={}}o(zp,"abort");function kp(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(kp,"clean")});var Hr=$((uA,Hi)=>{var Zi=Vr(),Op=Zr();Hi.exports=wp;function wp(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=Rp(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?Op(r):r.results[i]=c,n(u,r.results))})}o(wp,"iterate");function Rp(e,t,r,n){var i;return e.length==2?i=e(r,Zi(n)):i=e(r,t,Zi(n)),i}o(Rp,"runJob")});var Wr=$((pA,Wi)=>{Wi.exports=Np;function Np(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&n.keyedList.sort(r?t:function(i,u){return t(e[i],e[u])}),n}o(Np,"state")});var qr=$((dA,qi)=>{var Dp=Zr(),Cp=Vr();qi.exports=Up;function Up(e){Object.keys(this.jobs).length&&(this.index=this.size,Dp(this),Cp(e)(null,this.results))}o(Up,"terminator")});var Ki=$((fA,Gi)=>{var Mp=Hr(),jp=Wr(),Lp=qr();Gi.exports=Fp;function Fp(e,t,r){for(var n=jp(e);n.index<(n.keyedList||e).length;)Mp(e,t,n,function(i,u){if(i){r(i,u);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return Lp.bind(n,r)}o(Fp,"parallel")});var Gr=$((yA,Gt)=>{var Ji=Hr(),Bp=Wr(),Vp=qr();Gt.exports=Zp;Gt.exports.ascending=Xi;Gt.exports.descending=Hp;function Zp(e,t,r,n){var i=Bp(e,r);return Ji(e,t,i,o(function u(c,l){if(c){n(c,l);return}if(i.index++,i.index<(i.keyedList||e).length){Ji(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),Vp.bind(i,n)}o(Zp,"serialOrdered");function Xi(e,t){return e<t?-1:e>t?1:0}o(Xi,"ascending");function Hp(e,t){return-1*Xi(e,t)}o(Hp,"descending")});var Qi=$((vA,Yi)=>{var Wp=Gr();Yi.exports=qp;function qp(e,t,r){return Wp(e,t,null,r)}o(qp,"serial")});var ta=$((PA,ea)=>{ea.exports={parallel:Ki(),serial:Qi(),serialOrdered:Gr()}});var Kr=$((_A,ra)=>{"use strict";ra.exports=Object});var oa=$((bA,na)=>{"use strict";na.exports=Error});var aa=$((IA,ia)=>{"use strict";ia.exports=EvalError});var ua=$((TA,sa)=>{"use strict";sa.exports=RangeError});var pa=$((EA,ca)=>{"use strict";ca.exports=ReferenceError});var da=$(($A,la)=>{"use strict";la.exports=SyntaxError});var Kt=$((SA,ma)=>{"use strict";ma.exports=TypeError});var ga=$((AA,fa)=>{"use strict";fa.exports=URIError});var ha=$((zA,ya)=>{"use strict";ya.exports=Math.abs});var xa=$((kA,va)=>{"use strict";va.exports=Math.floor});var _a=$((OA,Pa)=>{"use strict";Pa.exports=Math.max});var Ia=$((wA,ba)=>{"use strict";ba.exports=Math.min});var Ea=$((RA,Ta)=>{"use strict";Ta.exports=Math.pow});var Sa=$((NA,$a)=>{"use strict";$a.exports=Math.round});var za=$((DA,Aa)=>{"use strict";Aa.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var Oa=$((UA,ka)=>{"use strict";var Gp=za();ka.exports=o(function(t){return Gp(t)||t===0?t:t<0?-1:1},"sign")});var Ra=$((jA,wa)=>{"use strict";wa.exports=Object.getOwnPropertyDescriptor});var Jr=$((LA,Na)=>{"use strict";var Jt=Ra();if(Jt)try{Jt([],"length")}catch{Jt=null}Na.exports=Jt});var Ca=$((FA,Da)=>{"use strict";var Xt=Object.defineProperty||!1;if(Xt)try{Xt({},"a",{value:1})}catch{Xt=!1}Da.exports=Xt});var Xr=$((BA,Ua)=>{"use strict";Ua.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var u in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var c=Object.getOwnPropertySymbols(t);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,r);if(l.value!==i||l.enumerable!==!0)return!1}return!0},"hasSymbols")});var La=$((ZA,ja)=>{"use strict";var Ma=typeof Symbol<"u"&&Symbol,Kp=Xr();ja.exports=o(function(){return typeof Ma!="function"||typeof Symbol!="function"||typeof Ma("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Kp()},"hasNativeSymbols")});var Yr=$((WA,Fa)=>{"use strict";Fa.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Qr=$((qA,Ba)=>{"use strict";var Jp=Kr();Ba.exports=Jp.getPrototypeOf||null});var Ha=$((GA,Za)=>{"use strict";var Xp="Function.prototype.bind called on incompatible ",Yp=Object.prototype.toString,Qp=Math.max,el="[object Function]",Va=o(function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var u=0;u<r.length;u+=1)n[u+t.length]=r[u];return n},"concatty"),tl=o(function(t,r){for(var n=[],i=r||0,u=0;i<t.length;i+=1,u+=1)n[u]=t[i];return n},"slicy"),rl=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");Za.exports=o(function(t){var r=this;if(typeof r!="function"||Yp.apply(r)!==el)throw new TypeError(Xp+r);for(var n=tl(arguments,1),i,u=o(function(){if(this instanceof i){var x=r.apply(this,Va(n,arguments));return Object(x)===x?x:this}return r.apply(t,Va(n,arguments))},"binder"),c=Qp(0,r.length-n.length),l=[],f=0;f<c;f++)l[f]="$"+f;if(i=Function("binder","return function ("+rl(l,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var y=o(function(){},"Empty");y.prototype=r.prototype,i.prototype=new y,y.prototype=null}return i},"bind")});var Ze=$((JA,Wa)=>{"use strict";var nl=Ha();Wa.exports=Function.prototype.bind||nl});var Yt=$((XA,qa)=>{"use strict";qa.exports=Function.prototype.call});var en=$((YA,Ga)=>{"use strict";Ga.exports=Function.prototype.apply});var Ja=$((QA,Ka)=>{"use strict";Ka.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Ya=$((ez,Xa)=>{"use strict";var ol=Ze(),il=en(),al=Yt(),sl=Ja();Xa.exports=sl||ol.call(al,il)});var es=$((tz,Qa)=>{"use strict";var ul=Ze(),cl=Kt(),pl=Yt(),ll=Ya();Qa.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new cl("a function is required");return ll(ul,pl,t)},"callBindBasic")});var as=$((nz,is)=>{"use strict";var dl=es(),ts=Jr(),ns;try{ns=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var tn=!!ns&&ts&&ts(Object.prototype,"__proto__"),os=Object,rs=os.getPrototypeOf;is.exports=tn&&typeof tn.get=="function"?dl([tn.get]):typeof rs=="function"?o(function(t){return rs(t==null?t:os(t))},"getDunder"):!1});var ls=$((iz,ps)=>{"use strict";var ss=Yr(),us=Qr(),cs=as();ps.exports=ss?o(function(t){return ss(t)},"getProto"):us?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return us(t)},"getProto"):cs?o(function(t){return cs(t)},"getProto"):null});var rn=$((sz,ds)=>{"use strict";var ml=Function.prototype.call,fl=Object.prototype.hasOwnProperty,gl=Ze();ds.exports=gl.call(ml,fl)});var xs=$((uz,vs)=>{"use strict";var M,yl=Kr(),hl=oa(),vl=aa(),xl=ua(),Pl=pa(),Ge=da(),qe=Kt(),_l=ga(),bl=ha(),Il=xa(),Tl=_a(),El=Ia(),$l=Ea(),Sl=Sa(),Al=Oa(),ys=Function,nn=o(function(e){try{return ys('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),ht=Jr(),zl=Ca(),on=o(function(){throw new qe},"throwTypeError"),kl=ht?function(){try{return arguments.callee,on}catch{try{return ht(arguments,"callee").get}catch{return on}}}():on,He=La()(),J=ls(),Ol=Qr(),wl=Yr(),hs=en(),vt=Yt(),We={},Rl=typeof Uint8Array>"u"||!J?M:J(Uint8Array),Oe={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?M:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?M:ArrayBuffer,"%ArrayIteratorPrototype%":He&&J?J([][Symbol.iterator]()):M,"%AsyncFromSyncIteratorPrototype%":M,"%AsyncFunction%":We,"%AsyncGenerator%":We,"%AsyncGeneratorFunction%":We,"%AsyncIteratorPrototype%":We,"%Atomics%":typeof Atomics>"u"?M:Atomics,"%BigInt%":typeof BigInt>"u"?M:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?M:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?M:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?M:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":hl,"%eval%":eval,"%EvalError%":vl,"%Float16Array%":typeof Float16Array>"u"?M:Float16Array,"%Float32Array%":typeof Float32Array>"u"?M:Float32Array,"%Float64Array%":typeof Float64Array>"u"?M:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?M:FinalizationRegistry,"%Function%":ys,"%GeneratorFunction%":We,"%Int8Array%":typeof Int8Array>"u"?M:Int8Array,"%Int16Array%":typeof Int16Array>"u"?M:Int16Array,"%Int32Array%":typeof Int32Array>"u"?M:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":He&&J?J(J([][Symbol.iterator]())):M,"%JSON%":typeof JSON=="object"?JSON:M,"%Map%":typeof Map>"u"?M:Map,"%MapIteratorPrototype%":typeof Map>"u"||!He||!J?M:J(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":yl,"%Object.getOwnPropertyDescriptor%":ht,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?M:Promise,"%Proxy%":typeof Proxy>"u"?M:Proxy,"%RangeError%":xl,"%ReferenceError%":Pl,"%Reflect%":typeof Reflect>"u"?M:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?M:Set,"%SetIteratorPrototype%":typeof Set>"u"||!He||!J?M:J(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?M:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":He&&J?J(""[Symbol.iterator]()):M,"%Symbol%":He?Symbol:M,"%SyntaxError%":Ge,"%ThrowTypeError%":kl,"%TypedArray%":Rl,"%TypeError%":qe,"%Uint8Array%":typeof Uint8Array>"u"?M:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?M:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?M:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?M:Uint32Array,"%URIError%":_l,"%WeakMap%":typeof WeakMap>"u"?M:WeakMap,"%WeakRef%":typeof WeakRef>"u"?M:WeakRef,"%WeakSet%":typeof WeakSet>"u"?M:WeakSet,"%Function.prototype.call%":vt,"%Function.prototype.apply%":hs,"%Object.defineProperty%":zl,"%Object.getPrototypeOf%":Ol,"%Math.abs%":bl,"%Math.floor%":Il,"%Math.max%":Tl,"%Math.min%":El,"%Math.pow%":$l,"%Math.round%":Sl,"%Math.sign%":Al,"%Reflect.getPrototypeOf%":wl};if(J)try{null.error}catch(e){ms=J(J(e)),Oe["%Error.prototype%"]=ms}var ms,Nl=o(function e(t){var r;if(t==="%AsyncFunction%")r=nn("async function () {}");else if(t==="%GeneratorFunction%")r=nn("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=nn("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&J&&(r=J(i.prototype))}return Oe[t]=r,r},"doEval"),fs={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},xt=Ze(),Qt=rn(),Dl=xt.call(vt,Array.prototype.concat),Cl=xt.call(hs,Array.prototype.splice),gs=xt.call(vt,String.prototype.replace),er=xt.call(vt,String.prototype.slice),Ul=xt.call(vt,RegExp.prototype.exec),Ml=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,jl=/\\(\\)?/g,Ll=o(function(t){var r=er(t,0,1),n=er(t,-1);if(r==="%"&&n!=="%")throw new Ge("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ge("invalid intrinsic syntax, expected opening `%`");var i=[];return gs(t,Ml,function(u,c,l,f){i[i.length]=l?gs(f,jl,"$1"):c||u}),i},"stringToPath"),Fl=o(function(t,r){var n=t,i;if(Qt(fs,n)&&(i=fs[n],n="%"+i[0]+"%"),Qt(Oe,n)){var u=Oe[n];if(u===We&&(u=Nl(n)),typeof u>"u"&&!r)throw new qe("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new Ge("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(Ul(/^%?[^%]*%?$/,t)===null)throw new Ge("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Ll(t),i=n.length>0?n[0]:"",u=Fl("%"+i+"%",r),c=u.name,l=u.value,f=!1,y=u.alias;y&&(i=y[0],Cl(n,Dl([0,1],y)));for(var x=1,b=!0;x<n.length;x+=1){var P=n[x],s=er(P,0,1),d=er(P,-1);if((s==='"'||s==="'"||s==="`"||d==='"'||d==="'"||d==="`")&&s!==d)throw new Ge("property names with quotes must have matching quotes");if((P==="constructor"||!b)&&(f=!0),i+="."+P,c="%"+i+"%",Qt(Oe,c))l=Oe[c];else if(l!=null){if(!(P in l)){if(!r)throw new qe("base intrinsic for "+t+" exists, but the property is not available.");return}if(ht&&x+1>=n.length){var g=ht(l,P);b=!!g,b&&"get"in g&&!("originalValue"in g.get)?l=g.get:l=l[P]}else b=Qt(l,P),l=l[P];b&&!f&&(Oe[c]=l)}}return l},"GetIntrinsic")});var _s=$((pz,Ps)=>{"use strict";var Bl=Xr();Ps.exports=o(function(){return Bl()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Ts=$((dz,Is)=>{"use strict";var Vl=xs(),bs=Vl("%Object.defineProperty%",!0),Zl=_s()(),Hl=rn(),Wl=Kt(),tr=Zl?Symbol.toStringTag:null;Is.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 Wl("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");tr&&(n||!Hl(t,tr))&&(bs?bs(t,tr,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[tr]=r)},"setToStringTag")});var $s=$((fz,Es)=>{"use strict";var ql=Function.prototype.call,Gl=Object.prototype.hasOwnProperty,Kl=Ze();Es.exports=Kl.call(ql,Gl)});var As=$((gz,Ss)=>{"use strict";Ss.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var Os=$((yz,ks)=>{"use strict";var cn=Ri(),Jl=require("util"),an=require("path"),Xl=require("http"),Yl=require("https"),Ql=require("url").parse,ed=require("fs"),td=require("stream").Stream,rd=require("crypto"),sn=Mi(),nd=ta(),od=Ts(),Ee=$s(),un=As();function zs(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(zs,"escapeHeaderParam");function L(e){if(!(this instanceof L))return new L(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],cn.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(L,"FormData");Jl.inherits(L,cn);L.LINE_BREAK=`\r
2
+ `;L.DEFAULT_CONTENT_TYPE="application/octet-stream";L.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=cn.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(e,t,r),u=this._multiPartFooter();n(i),n(t),n(u),this._trackLength(i,t,r)};L.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+L.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Ee(t,"httpVersion"))&&!(t instanceof td))&&(r.knownLength||this._valuesToMeasure.push(t))};L.prototype._lengthRetriever=function(e,t){Ee(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):ed.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):Ee(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Ee(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};L.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),i=this._getContentType(t,r),u="",c={"Content-Disposition":["form-data",'name="'+zs(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&un(c,r.header);var l;for(var f in c)if(Ee(c,f)){if(l=c[f],l==null)continue;Array.isArray(l)||(l=[l]),l.length&&(u+=f+": "+l.join("; ")+L.LINE_BREAK)}return"--"+this.getBoundary()+L.LINE_BREAK+u+L.LINE_BREAK};L.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=an.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=an.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Ee(e,"httpVersion")&&(r=an.basename(e.client._httpMessage.path||"")),r)return'filename="'+zs(r)+'"'};L.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=sn.lookup(e.name)),!r&&e&&e.path&&(r=sn.lookup(e.path)),!r&&e&&e.readable&&Ee(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=sn.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=L.DEFAULT_CONTENT_TYPE),r};L.prototype._multiPartFooter=function(){return function(e){var t=L.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};L.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+L.LINE_BREAK};L.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Ee(e,t)&&(r[t.toLowerCase()]=e[t]);return r};L.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};L.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};L.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(L.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};L.prototype._generateBoundary=function(){this._boundary="--------------------------"+rd.randomBytes(12).toString("hex")};L.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};L.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};L.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}nd.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};L.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=Ql(e),n=un({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=un(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=Yl.request(n):r=Xl.request(n),this.getLength(function(u,c){if(u&&u!=="Unknown stream"){this._error(u);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),t){var l,f=o(function(y,x){return r.removeListener("error",f),r.removeListener("response",l),t.call(this,y,x)},"callback");l=f.bind(this,null),r.on("error",f),r.on("response",l)}}.bind(this)),r};L.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};L.prototype.toString=function(){return"[object FormData]"};od(L.prototype,"FormData");ks.exports=L});var vd={};mn(vd,{cryptolens:()=>hd});module.exports=Zs(vd);var Hs=Object.freeze({status:"aborted"});function I(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 y=c.prototype,x=Object.keys(y);for(let b=0;b<x.length;b++){let P=x[b];P in l||(l[P]=y[P].bind(l))}}o(n,"init");let i=r?.Parent??Object;class u extends i{static{o(this,"Definition")}}Object.defineProperty(u,"name",{value:e});function c(l){var f;let y=r?.Parent?new u:this;n(y,l),(f=y._zod).deferred??(f.deferred=[]);for(let x of y._zod.deferred)x();return y}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(I,"$constructor");var Ws=Symbol("zod_brand"),ue=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},bt=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},or={};function le(e){return e&&Object.assign(or,e),or}o(le,"config");function ar(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}o(ar,"getEnumValues");function yn(e,t){return typeof t=="bigint"?t.toString():t}o(yn,"jsonStringifyReplacer");function Tt(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(Tt,"cached");function hn(e){return e==null}o(hn,"nullish");function Et(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(Et,"cleanRegex");var gn=Symbol("evaluating");function G(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==gn)return n===void 0&&(n=gn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(G,"defineLazy");var sr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Xe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(Xe,"isObject");var qs=Tt(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function vn(e){if(Xe(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Xe(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(vn,"isPlainObject");var xn=new Set(["string","number","symbol"]);function Re(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(Re,"escapeRegex");function $t(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o($t,"clone");function Z(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:o(()=>t.error,"error")}:t}o(Z,"normalizeParams");function Pn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(Pn,"optionalKeys");var Gs={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Ne(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(Ne,"aborted");function he(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(he,"prefixIssues");function It(e){return typeof e=="string"?e:e?.message}o(It,"unwrapMessage");function ve(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=It(e.inst?._zod.def?.error?.(e))??It(t?.error?.(e))??It(r.customError?.(e))??It(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(ve,"finalizeIssue");function _n(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(_n,"getLengthableOrigin");function ur(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(ur,"issue");var bn=o((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,yn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),In=I("$ZodError",bn),Ye=I("$ZodError",bn,{Parent:Error});var Js=o(e=>(t,r,n,i)=>{let u=n?Object.assign(n,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise)throw new ue;if(c.issues.length){let l=new(i?.Err??e)(c.issues.map(f=>ve(f,u,le())));throw sr(l,i?.callee),l}return c.value},"_parse"),St=Js(Ye),Xs=o(e=>async(t,r,n,i)=>{let u=n?Object.assign(n,{async:!0}):{async:!0},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){let l=new(i?.Err??e)(c.issues.map(f=>ve(f,u,le())));throw sr(l,i?.callee),l}return c.value},"_parseAsync"),At=Xs(Ye),Ys=o(e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},u=t._zod.run({value:r,issues:[]},i);if(u instanceof Promise)throw new ue;return u.issues.length?{success:!1,error:new(e??In)(u.issues.map(c=>ve(c,i,le())))}:{success:!0,data:u.value}},"_safeParse"),Qe=Ys(Ye),Qs=o(e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},u=t._zod.run({value:r,issues:[]},i);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>ve(c,i,le())))}:{success:!0,data:u.value}},"_safeParseAsync"),et=Qs(Ye);var eu="(?:(?:\\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])))",tu=new RegExp(`^${eu}$`);var Tn=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),En=/^-?\d+n?$/;var cr=/^-?\d+(?:\.\d+)?$/,$n=/^(?:true|false)$/i;var De=I("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var Sn=I("$ZodCheckMinLength",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!hn(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 pr=I("$ZodCheckStringFormat",(e,t)=>{var r,n;De.init(e,t),e._zod.onattach.push(i=>{let u=i._zod.bag;u.format=t.format,t.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),An=I("$ZodCheckRegex",(e,t)=>{pr.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 kn={major:4,minor:3,patch:6};var H=I("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=kn;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let u of i._zod.onattach)u(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=o((c,l,f)=>{let y=Ne(c),x;for(let b of l){if(b._zod.def.when){if(!b._zod.def.when(c))continue}else if(y)continue;let P=c.issues.length,s=b._zod.check(c);if(s instanceof Promise&&f?.async===!1)throw new ue;if(x||s instanceof Promise)x=(x??Promise.resolve()).then(async()=>{await s,c.issues.length!==P&&(y||(y=Ne(c,P)))});else{if(c.issues.length===P)continue;y||(y=Ne(c,P))}}return x?x.then(()=>c):c},"runChecks"),u=o((c,l,f)=>{if(Ne(c))return c.aborted=!0,c;let y=i(l,n,f);if(y instanceof Promise){if(f.async===!1)throw new ue;return y.then(x=>e._zod.parse(x,f))}return e._zod.parse(y,f)},"handleCanaryResult");e._zod.run=(c,l)=>{if(l.skipChecks)return e._zod.parse(c,l);if(l.direction==="backward"){let y=e._zod.parse({value:c.value,issues:[]},{...l,skipChecks:!0});return y instanceof Promise?y.then(x=>u(x,c,l)):u(y,c,l)}let f=e._zod.parse(c,l);if(f instanceof Promise){if(l.async===!1)throw new ue;return f.then(y=>i(y,n,l))}return i(f,n,l)}}G(e,"~standard",()=>({validate:o(i=>{try{let u=Qe(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return et(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Ot=I("$ZodString",(e,t)=>{H.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Tn(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),lr=I("$ZodStringFormat",(e,t)=>{pr.init(e,t),Ot.init(e,t)});var Dn=I("$ZodURL",(e,t)=>{lr.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 Cn=I("$ZodNumber",(e,t)=>{H.init(e,t),e._zod.pattern=e._zod.bag.pattern??cr,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let u=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...u?{received:u}:{}}),r}});var dr=I("$ZodBoolean",(e,t)=>{H.init(e,t),e._zod.pattern=$n,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}}),Un=I("$ZodBigInt",(e,t)=>{H.init(e,t),e._zod.pattern=En,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}});var Mn=I("$ZodAny",(e,t)=>{H.init(e,t),e._zod.parse=r=>r}),jn=I("$ZodUnknown",(e,t)=>{H.init(e,t),e._zod.parse=r=>r});var Ln=I("$ZodVoid",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),Fn=I("$ZodDate",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,u=i instanceof Date;return u&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...u?{received:"Invalid Date"}:{},inst:e}),r}});function On(e,t,r){e.issues.length&&t.issues.push(...he(r,e.issues)),t.value[r]=e.value}o(On,"handleArrayResult");var Bn=I("$ZodArray",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let u=[];for(let c=0;c<i.length;c++){let l=i[c],f=t.element._zod.run({value:l,issues:[]},n);f instanceof Promise?u.push(f.then(y=>On(y,r,c))):On(f,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function kt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...he(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(kt,"handlePropertyResult");function ru(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=Pn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(ru,"normalizeDef");function nu(e,t,r,n,i,u){let c=[],l=i.keySet,f=i.catchall._zod,y=f.def.type,x=f.optout==="optional";for(let b in t){if(l.has(b))continue;if(y==="never"){c.push(b);continue}let P=f.run({value:t[b],issues:[]},n);P instanceof Promise?e.push(P.then(s=>kt(s,r,b,t,x))):kt(P,r,b,t,x)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:u}),e.length?Promise.all(e).then(()=>r):r}o(nu,"handleCatchall");var Vn=I("$ZodObject",(e,t)=>{if(H.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=Tt(()=>ru(t));G(e._zod,"propValues",()=>{let l=t.shape,f={};for(let y in l){let x=l[y]._zod;if(x.values){f[y]??(f[y]=new Set);for(let b of x.values)f[y].add(b)}}return f});let i=Xe,u=t.catchall,c;e._zod.parse=(l,f)=>{c??(c=n.value);let y=l.value;if(!i(y))return l.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),l;l.value={};let x=[],b=c.shape;for(let P of c.keys){let s=b[P],d=s._zod.optout==="optional",g=s._zod.run({value:y[P],issues:[]},f);g instanceof Promise?x.push(g.then(m=>kt(m,l,P,y,d))):kt(g,l,P,y,d)}return u?nu(x,y,l,f,n.value,e):x.length?Promise.all(x).then(()=>l):l}});function wn(e,t,r,n){for(let u of e)if(u.issues.length===0)return t.value=u.value,t;let i=e.filter(u=>!Ne(u));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(u=>u.issues.map(c=>ve(c,n,le())))}),t)}o(wn,"handleUnionResults");var mr=I("$ZodUnion",(e,t)=>{H.init(e,t),G(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),G(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),G(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),G(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${i.map(u=>Et(u.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,u)=>{if(r)return n(i,u);let c=!1,l=[];for(let f of t.options){let y=f._zod.run({value:i.value,issues:[]},u);if(y instanceof Promise)l.push(y),c=!0;else{if(y.issues.length===0)return y;l.push(y)}}return c?Promise.all(l).then(f=>wn(f,i,e,u)):wn(l,i,e,u)}});var Zn=I("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,mr.init(e,t);let r=e._zod.parse;G(e._zod,"propValues",()=>{let i={};for(let u of t.options){let c=u._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(let[l,f]of Object.entries(c)){i[l]||(i[l]=new Set);for(let y of f)i[l].add(y)}}return i});let n=Tt(()=>{let i=t.options,u=new Map;for(let c of i){let l=c._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let f of l){if(u.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);u.set(f,c)}}return u});e._zod.parse=(i,u)=>{let c=i.value;if(!Xe(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;let l=n.value.get(c?.[t.discriminator]);return l?l._zod.run(i,u):t.unionFallback?r(i,u):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}});var Hn=I("$ZodRecord",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!vn(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let u=[],c=t.keyType._zod.values;if(c){r.value={};let l=new Set;for(let y of c)if(typeof y=="string"||typeof y=="number"||typeof y=="symbol"){l.add(typeof y=="number"?y.toString():y);let x=t.valueType._zod.run({value:i[y],issues:[]},n);x instanceof Promise?u.push(x.then(b=>{b.issues.length&&r.issues.push(...he(y,b.issues)),r.value[y]=b.value})):(x.issues.length&&r.issues.push(...he(y,x.issues)),r.value[y]=x.value)}let f;for(let y in i)l.has(y)||(f=f??[],f.push(y));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"&&cr.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=>ve(b,n,le())),input:l,path:[l],inst:e});continue}let x=t.valueType._zod.run({value:i[l],issues:[]},n);x instanceof Promise?u.push(x.then(b=>{b.issues.length&&r.issues.push(...he(l,b.issues)),r.value[f.value]=b.value})):(x.issues.length&&r.issues.push(...he(l,x.issues)),r.value[f.value]=x.value)}}return u.length?Promise.all(u).then(()=>r):r}});var Wn=I("$ZodEnum",(e,t)=>{H.init(e,t);let r=ar(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>xn.has(typeof i)).map(i=>typeof i=="string"?Re(i):i.toString()).join("|")})$`),e._zod.parse=(i,u)=>{let c=i.value;return n.has(c)||i.issues.push({code:"invalid_value",values:r,input:c,inst:e}),i}}),qn=I("$ZodLiteral",(e,t)=>{if(H.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Re(n):n?Re(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let u=n.value;return r.has(u)||n.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),n}});var Gn=I("$ZodTransform",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new bt(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(c=>(r.value=c,r));if(i instanceof Promise)throw new ue;return r.value=i,r}});function Rn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(Rn,"handleOptionalResult");var Kn=I("$ZodOptional",(e,t)=>{H.init(e,t),e._zod.optin="optional",e._zod.optout="optional",G(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),G(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Et(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(u=>Rn(u,r.value)):Rn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var Jn=I("$ZodNullable",(e,t)=>{H.init(e,t),G(e._zod,"optin",()=>t.innerType._zod.optin),G(e._zod,"optout",()=>t.innerType._zod.optout),G(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Et(r.source)}|null)$`):void 0}),G(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 Xn=I("$ZodPipe",(e,t)=>{H.init(e,t),G(e._zod,"values",()=>t.in._zod.values),G(e._zod,"optin",()=>t.in._zod.optin),G(e._zod,"optout",()=>t.out._zod.optout),G(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let u=t.out._zod.run(r,n);return u instanceof Promise?u.then(c=>zt(c,t.in,n)):zt(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>zt(u,t.out,n)):zt(i,t.out,n)}});function zt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(zt,"handlePipeResult");var Yn=I("$ZodCustom",(e,t)=>{De.init(e,t),H.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(u=>Nn(u,r,n,e));Nn(i,r,n,e)}});function Nn(e,t,r,n){if(!e){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(ur(i))}}o(Nn,"handleRefineResult");var eo,su=Symbol("ZodOutput"),uu=Symbol("ZodInput"),fr=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 to(){return new fr}o(to,"registry");(eo=globalThis).__zod_globalRegistry??(eo.__zod_globalRegistry=to());var gr=globalThis.__zod_globalRegistry;function ro(e,t){return new e({type:"string",...Z(t)})}o(ro,"_string");function no(e,t){return new e({type:"string",coerce:!0,...Z(t)})}o(no,"_coercedString");function oo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Z(t)})}o(oo,"_url");function io(e,t){return new e({type:"number",checks:[],...Z(t)})}o(io,"_number");function ao(e,t){return new e({type:"number",coerce:!0,checks:[],...Z(t)})}o(ao,"_coercedNumber");function so(e,t){return new e({type:"boolean",...Z(t)})}o(so,"_boolean");function uo(e,t){return new e({type:"boolean",coerce:!0,...Z(t)})}o(uo,"_coercedBoolean");function co(e,t){return new e({type:"bigint",coerce:!0,...Z(t)})}o(co,"_coercedBigint");function po(e){return new e({type:"any"})}o(po,"_any");function lo(e){return new e({type:"unknown"})}o(lo,"_unknown");function mo(e,t){return new e({type:"void",...Z(t)})}o(mo,"_void");function fo(e,t){return new e({type:"date",coerce:!0,...Z(t)})}o(fo,"_coercedDate");function ie(e,t){return new Sn({check:"min_length",...Z(t),minimum:e})}o(ie,"_minLength");function xe(e,t){return new An({check:"string_format",format:"regex",...Z(t),pattern:e})}o(xe,"_regex");function go(e,t,r){let n=Z(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(go,"_custom");var K=I("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");H.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>St(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Qe(e,r,n),e.parseAsync=async(r,n)=>At(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>et(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>$t(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.apply=r=>r(e)}),Rt=I("ZodMiniString",(e,t)=>{Ot.init(e,t),K.init(e,t)});function a(e){return ro(Rt,e)}o(a,"string");var yo=I("ZodMiniStringFormat",(e,t)=>{lr.init(e,t),Rt.init(e,t)});var vu=I("ZodMiniURL",(e,t)=>{Dn.init(e,t),yo.init(e,t)});function ho(e){return oo(vu,e)}o(ho,"url");var yr=I("ZodMiniNumber",(e,t)=>{Cn.init(e,t),K.init(e,t)});function Y(e){return io(yr,e)}o(Y,"number");var hr=I("ZodMiniBoolean",(e,t)=>{dr.init(e,t),K.init(e,t)});function B(e){return so(hr,e)}o(B,"boolean");var vo=I("ZodMiniBigInt",(e,t)=>{Un.init(e,t),K.init(e,t)});var xu=I("ZodMiniAny",(e,t)=>{Mn.init(e,t),K.init(e,t)});function rt(){return po(xu)}o(rt,"any");var Pu=I("ZodMiniUnknown",(e,t)=>{jn.init(e,t),K.init(e,t)});function O(){return lo(Pu)}o(O,"unknown");var _u=I("ZodMiniVoid",(e,t)=>{Ln.init(e,t),K.init(e,t)});function xo(e){return mo(_u,e)}o(xo,"_void");var Po=I("ZodMiniDate",(e,t)=>{Fn.init(e,t),K.init(e,t)});var bu=I("ZodMiniArray",(e,t)=>{Bn.init(e,t),K.init(e,t)});function N(e,t){return new bu({type:"array",element:e,...Z(t)})}o(N,"array");var Iu=I("ZodMiniObject",(e,t)=>{Vn.init(e,t),K.init(e,t),G(e,"shape",()=>t.shape)});function p(e,t){let r={type:"object",shape:e??{},...Z(t)};return new Iu(r)}o(p,"object");var Tu=I("ZodMiniUnion",(e,t)=>{mr.init(e,t),K.init(e,t)});function D(e,t){return new Tu({type:"union",options:e,...Z(t)})}o(D,"union");var Eu=I("ZodMiniDiscriminatedUnion",(e,t)=>{Zn.init(e,t),K.init(e,t)});function Ce(e,t,r){return new Eu({type:"union",options:t,discriminator:e,...Z(r)})}o(Ce,"discriminatedUnion");var $u=I("ZodMiniRecord",(e,t)=>{Hn.init(e,t),K.init(e,t)});function w(e,t,r){return new $u({type:"record",keyType:e,valueType:t,...Z(r)})}o(w,"record");var Su=I("ZodMiniEnum",(e,t)=>{Wn.init(e,t),K.init(e,t),e.options=Object.values(t.entries)});function U(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Su({type:"enum",entries:r,...Z(t)})}o(U,"_enum");var Au=I("ZodMiniLiteral",(e,t)=>{qn.init(e,t),K.init(e,t)});function S(e,t){return new Au({type:"literal",values:Array.isArray(e)?e:[e],...Z(t)})}o(S,"literal");var zu=I("ZodMiniTransform",(e,t)=>{Gn.init(e,t),K.init(e,t)});function Pe(e){return new zu({type:"transform",transform:e})}o(Pe,"transform");var ku=I("ZodMiniOptional",(e,t)=>{Kn.init(e,t),K.init(e,t)});function h(e){return new ku({type:"optional",innerType:e})}o(h,"optional");var Ou=I("ZodMiniNullable",(e,t)=>{Jn.init(e,t),K.init(e,t)});function nt(e){return new Ou({type:"nullable",innerType:e})}o(nt,"nullable");var wu=I("ZodMiniPipe",(e,t)=>{Xn.init(e,t),K.init(e,t)});function _e(e,t){return new wu({type:"pipe",in:e,out:t})}o(_e,"pipe");var Ru=I("ZodMiniCustom",(e,t)=>{Yn.init(e,t),K.init(e,t)});function Nt(e,t){return go(Ru,e??(()=>!0),t)}o(Nt,"custom");var ot={};mn(ot,{bigint:()=>Lu,boolean:()=>ju,date:()=>Fu,number:()=>Mu,string:()=>Uu});function Uu(e){return no(Rt,e)}o(Uu,"string");function Mu(e){return ao(yr,e)}o(Mu,"number");function ju(e){return uo(hr,e)}o(ju,"boolean");function Lu(e){return co(vo,e)}o(Lu,"bigint");function Fu(e){return fo(Po,e)}o(Fu,"date");var xr=p({retryOnFailure:p({defaultValue:h(B()),hide:h(B())}),continueOnFailure:p({defaultValue:h(B()),hide:h(B())})}),vr=class{constructor(t,r,n,i,u,c,l,f,y,x,b){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=l;this.errorHandlingOptions=f;this.outputSchema=y;this.audience=x;this.aiMetadata=b}static{o(this,"IAction")}},be=o(e=>new vr(e.name,e.displayName,e.description,e.props,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata),"createAction");var F=p({displayName:a(),description:h(a())}),C=o((e,t)=>p({type:S(t),required:B(),defaultValue:h(rt())}),"TPropertyValue");var te=p({...F.shape,...C(a(),"SHORT_TEXT").shape}),de=p({...F.shape,...C(a(),"LONG_TEXT").shape});var bo=p({label:a(),value:O()}),Dt=p({disabled:h(B()),placeholder:h(a()),options:N(bo)});var re=p({...F.shape,options:Dt,...C(O(),"STATIC_DROPDOWN").shape}),me=p({...F.shape,options:Dt,...C(N(O()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Pr=p({...F.shape,...C(O(),"DROPDOWN").shape,refreshers:N(a())}),it=p({...F.shape,...C(N(O()),"MULTI_SELECT_DROPDOWN").shape,refreshers:N(a())});var fe=p({...F.shape,...C(B(),"CHECKBOX").shape});var ge=p({...F.shape,...C(Y(),"NUMBER").shape});var at=p({...F.shape,...C(O(),"FILE").shape});var st=p({...F.shape,...C(a(),"DATE_TIME").shape});var Io=w(a(),D([te,de,re,it,me,fe,ge,at,st])),ut=p({...F.shape,properties:Io,...C(N(O()),"ARRAY").shape});var ct=p({...F.shape,...C(D([w(a(),O())]),"JSON").shape});var To=D([te,re,ct,ut,me]),Vu=w(a(),To),_r=p({refreshers:N(a()),...F.shape,...C(O(),"DYNAMIC").shape});var Ct=p({...F.shape,...C(xo(),"MARKDOWN").shape});var pt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(pt||{}),Ue=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Ue||{}),Me=(v=>(v.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",v.COMMUNICATION="COMMUNICATION",v.COMMERCE="COMMERCE",v.CORE="CORE",v.UNIVERSAL_AI="UNIVERSAL_AI",v.FLOW_CONTROL="FLOW_CONTROL",v.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",v.ACCOUNTING="ACCOUNTING",v.PRODUCTIVITY="PRODUCTIVITY",v.CONTENT_AND_FILES="CONTENT_AND_FILES",v.DEVELOPER_TOOLS="DEVELOPER_TOOLS",v.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",v.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",v.HUMAN_RESOURCES="HUMAN_RESOURCES",v.PAYMENT_PROCESSING="PAYMENT_PROCESSING",v.MARKETING="MARKETING",v.SALES_AND_CRM="SALES_AND_CRM",v))(Me||{});var lt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(lt||{}),br="both_client_credentials_and_authorization_code";var Ie=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(Ie||{}),dt=(u=>(u.NONE="NONE",u.HEADER_PRESENT="HEADER_PRESENT",u.QUERY_PRESENT="QUERY_PRESENT",u.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",u.HEAD_REQUEST="HEAD_REQUEST",u))(dt||{}),Zu=p({strategy:U(dt),paramName:h(a())}),mt=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(mt||{});var Ut=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Ut||{}),Eo=p({status:h(Y()),body:h(O()),headers:h(w(a(),a()))}),$o=p({type:S("DELAY"),resumeDateTime:a(),requestIdToReply:h(a()),handlerId:h(a()),streamStepProgress:h(U(Ut))}),So=p({type:S("WEBHOOK"),requestId:a(),requestIdToReply:h(a()),response:Eo,handlerId:h(a()),streamStepProgress:h(U(Ut))}),Hu=D([$o,So]);var Wu=p({body:O(),rawBody:h(O()),headers:w(a(),a()),queryParams:w(a(),a())});function X(e){return e==null}o(X,"isNil");function ft(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(ft,"isEmpty");function Mt(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(Mt,"assertNotNullOrUndefined");var Ir=we(require("crypto"),1);var qu=128,Ae,je,Gu=o(e=>{!Ae||Ae.length<e?(Ae=Buffer.allocUnsafe(e*qu),Ir.default.randomFillSync(Ae),je=0):je+e>Ae.length&&(Ir.default.randomFillSync(Ae),je=0),je+=e},"fillPool"),Ku=o(e=>(Gu(e|=0),Ae.subarray(je-e,je)),"random"),Ju=o((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,i=Math.ceil(1.6*n*t/e.length);return(u=t)=>{let c="";for(;;){let l=r(i),f=i;for(;f--;)if(c+=e[l[f]&n]||"",c.length===u)return c}}},"customRandom"),zo=o((e,t=21)=>Ju(e,t,Ku),"customAlphabet");var Xu="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ko=21,tb=a().check(xe(new RegExp(`^[0-9a-zA-Z]{${ko}}$`))),Yu=zo(Xu,ko);var Te=_e(Pe(e=>e instanceof Date?e.toISOString():e),a()),ne={id:a(),created:Te,updated:Te},V=o(e=>h(nt(e)),"Nullable");function Tr(e){return h(nt(U(e)))}o(Tr,"NullableEnum");var ob=_e(Pe(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),h(B())),jt=o(e=>_e(Pe(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),h(N(e))),"OptionalArrayFromQuery");var sb=w(a(),O());var gt=(x=>(x.OPENAI="openai",x.OPENROUTER="openrouter",x.ANTHROPIC="anthropic",x.AZURE="azure",x.GOOGLE="google",x.ACTIVEPIECES="activepieces",x.CLOUDFLARE_GATEWAY="cloudflare-gateway",x.CUSTOM="custom",x.BEDROCK="bedrock",x.MISTRAL="mistral",x))(gt||{});var xb=a().check(xe(/^#[0-9A-Fa-f]{6}$/));var _b=p({filename:a(),data:O(),type:S("file"),mimetype:h(a())});var Qu=we(wo());var Ab=p({...ne,name:a(),permissions:N(a()),platformId:V(a()),type:a(),userCount:h(Y())});var Ro=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Ro||{}),Er=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Er||{}),$r=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))($r||{});var Sr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Sr||{});var Ar=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Ar||{});var ec=p({mode:U(Ro),value:O()}),tc=p({auth:h(a()),fields:w(a(),ec)}),rc=p({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:h(tc)}),nc=p({type:S("PIECE"),toolName:a().check(ie(1)),pieceMetadata:rc}),oc=p({type:S("none")}),ic=p({type:S("access_token"),accessToken:a()}),ac=p({type:S("api_key"),apiKey:a(),apiKeyHeader:a()}),sc=p({type:S("headers"),headers:w(a(),a())}),uc=Ce("type",[oc,ic,ac,sc]),No=p({type:S("FLOW"),toolName:a().check(ie(1)),externalFlowId:a(),flowDisplayName:h(a())}),Do=p({type:S("MCP"),toolName:a().check(ie(1)),serverUrl:ho(),protocol:U($r),auth:uc}),Co=p({type:S("KNOWLEDGE_BASE"),toolName:a().check(ie(1)),sourceType:U(Er),sourceId:a(),sourceName:a()}),cc=Ce("type",[nc,No,Do,Co]),pc=p({displayName:a(),description:h(a()),type:U(Sr)}),Uo=p({type:S("MARKDOWN"),markdown:a()}),Le={type:S("TOOL_CALL"),input:V(w(a(),O())),output:h(O()),toolName:a(),status:U(Ar),toolCallId:a(),startTime:a(),endTime:h(a())},tI=p(Le),Mo=Ce("toolCallType",[p({...Le,toolCallType:S("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),p({...Le,toolCallType:S("FLOW"),displayName:a(),externalFlowId:a()}),p({...Le,toolCallType:S("MCP"),displayName:a(),serverUrl:a()}),p({...Le,toolCallType:S("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),p({...Le,toolCallType:S("UNKNOWN"),displayName:a()})]),lc=D([Uo,Mo]);var zr=(r=>(r.IMAGE="image",r.TEXT="text",r))(zr||{}),ye=p({apiKey:a()}),dc=ye,mc=p({apiKey:a(),apiKeyHash:a()}),fc=ye,gc=ye,yc=ye,hc=ye,vc=ye,xc=ye,Pc=ye,jo=p({accessKeyId:a().check(ie(1)),secretAccessKey:a().check(ie(1))}),_c=p({}),bc=p({}),Ic=p({}),Tc=p({}),Ec=p({}),$c=p({}),Lo=p({modelId:a(),modelName:a(),modelType:U(zr)}),Fo=p({apiKeyHeader:a(),baseUrl:a(),models:N(Lo),defaultHeaders:h(w(a(),a()))}),Bo=p({accountId:a(),gatewayId:a(),models:N(Lo),vertexProject:h(a()),vertexRegion:h(a())}),Vo=p({resourceName:a(),apiVersion:_e(Pe(e=>typeof e=="string"&&e.trim().length===0?void 0:e),h(a()))}),Zo=p({region:a().check(ie(1))}),Sc=D([dc,yc,hc,vc,xc,gc,fc,mc,jo,Pc]),Ho=D([Fo,Bo,Vo,Zo,_c,Ic,Tc,Ec,bc,$c]),Ac=p({id:a(),name:a(),type:U(zr)}),zc=p({id:a(),name:a(),provider:U(gt),config:Ho,enabledForChat:B()}),kc=p({provider:U(gt),config:Ho,auth:Sc,platformId:a()});var iI={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var Oc=p({base64Url:a(),fileName:a(),extension:h(a())}),wc=p({mimeType:a(),url:a(),fileName:h(a())}),kr=D([Oc,wc]);var Rc=D([p({type:S("file"),value:kr}),p({type:S("markdown"),value:a(),files:h(N(kr))})]),Nc=p({sessionId:a(),message:a(),files:h(N(a()))});var qo=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(qo||{}),Go=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(Go||{}),Or=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Or||{});var Dc=D([p({...ne,name:a(),externalId:a(),type:S("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:p({options:N(p({value:a()}))})}),p({...ne,name:a(),externalId:a(),type:D([S("TEXT"),S("NUMBER"),S("DATE")]),tableId:a(),projectId:a()})]),Cc=p({...ne,name:a(),folderId:V(a()),projectId:a(),externalId:a(),status:Tr(Go),trigger:Tr(qo)}),Uc=p({...ne,tableId:a(),projectId:a(),cells:w(a(),p({updated:a(),created:a(),value:O(),fieldName:a()}))}),Mc=p({events:N(U(Or)),webhookUrl:a(),flowId:a()}),jc=p({fields:N(p({id:a(),name:a()})),rows:N(w(a(),a())),name:a()}),Lc=p({projectId:a(),limit:h(ot.number()),cursor:h(a()),name:h(a()),externalIds:jt(a()),folderId:h(a()),folderIds:jt(a())}),Fc=p({records:N(N(p({fieldId:a(),value:Jo()}))),tableId:a()}),Bc=p({cells:h(N(p({fieldId:a(),value:Jo()}))),tableId:a(),agentUpdate:h(B())}),Ko=Ce("operator",[ze("eq"),ze("neq"),ze("gt"),ze("gte"),ze("lt"),ze("lte"),ze("co"),Wo("exists"),Wo("not_exists")]),Vc=p({tableId:a(),limit:h(ot.number()),cursor:h(a()),filters:jt(Ko)});function Jo(){return _e(Pe(e=>e==null?e:String(e)),nt(a()))}o(Jo,"coerceToString");function ze(e){return p({fieldId:a(),operator:S(e),value:a()})}o(ze,"valueFilter");function Wo(e){return p({fieldId:a(),operator:S(e)})}o(Wo,"existenceFilter");var Zc=p({status:h(Y()),body:h(O()),headers:h(w(a(),a()))}),Hc=p({...ne,deleted:V(Te),ownerId:a(),displayName:a(),platformId:a(),externalId:V(a())});var Xo=p({name:a(),description:h(a()),type:a(),required:B()}),Wc=p({pieceName:a(),triggerName:a(),input:p({toolName:a(),toolDescription:a(),inputSchema:N(Xo),returnsResponse:B()})});var Yo="^[0-9]+\\.[0-9]+\\.[0-9]+$",TI=new RegExp(Yo),Gc="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",EI=a().check(xe(new RegExp(Yo))),$I=a().check(xe(new RegExp(Gc))),Kc=p({packageType:S("ARCHIVE"),pieceType:U(Ue),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),Qo=p({packageType:S("REGISTRY"),pieceType:S("OFFICIAL"),pieceName:a(),pieceVersion:a()}),ei=p({packageType:S("REGISTRY"),pieceType:S("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),SI=D([Qo,ei]),AI=D([Kc,Qo,ei]),ti=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(ti||{}),Jc=p({type:U(ti),cronExpression:a(),timezone:a()}),zI=p({...ne,type:U(Ie),projectId:a(),flowId:a(),triggerName:a(),schedule:V(Jc),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:V(a()),simulate:B()}),ri=(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))(ri||{}),ni=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(ni||{}),oi=(r=>(r.S3="S3",r.DB="DB",r))(oi||{}),kI=p({...ne,projectId:V(a()),platformId:V(a()),type:U(ri),compression:U(ni),data:h(O()),location:U(oi),size:V(Y()),fileName:V(a()),s3Key:V(a()),metadata:V(w(a(),a()))}),ii=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(ii||{}),ai=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(ai||{}),OI=p({id:a(),email:a(),firstName:a(),status:U(ai),externalId:V(a()),platformId:V(a()),platformRole:U(ii),lastName:a(),created:Te,updated:Te,lastActiveDate:V(Te),imageUrl:V(a())});var wr=p({...F.shape,...C(w(a(),O()),"OBJECT").shape});var pi=p({...F.shape,...C(a(),"COLOR").shape});var Rr=D([te,de,Ct,fe,re,me,Pr,it,_r,ge,ut,wr,ct,st,at,pi]),E={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 ce=p({displayName:a(),description:h(a())});var li=p({username:a(),password:a()}),Nr=p({...ce.shape,username:p({displayName:a(),description:h(a())}),password:p({displayName:a(),description:h(a())}),...C(li,"BASIC_AUTH").shape});var ep=w(a(),D([te,de,ge,fe,re])),Dr=p({...ce.shape,props:ep,...C(O(),"CUSTOM_AUTH").shape});var ke=p({...ce.shape,...C(p({auth:a()}),"SECRET_TEXT").shape});var tp=w(a(),D([te,de,ke,ge,fe,re,me,Ct])),di=p({...ce.shape,props:tp,...C(O(),"OIDC").shape});var Cr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Cr||{}),mi=D([te,ke,re]),fi=w(a(),mi),rp=p({props:h(w(a(),mi)),authUrl:a(),tokenUrl:a(),scope:N(a()),prompt:h(D([S("none"),S("consent"),S("login"),S("omit")])),pkce:h(B()),pkceMethod:h(D([S("plain"),S("S256")])),authorizationMethod:h(U(Cr)),grantType:h(D([U(lt),S(br)])),extra:h(w(a(),a()))}),gi=p({access_token:a(),props:h(fi),data:w(a(),rt())}),Ur=p({...ce.shape,...rp.shape,...C(gi,"OAUTH2").shape});var Fe=D([Nr,Dr,di,Ur,ke]),yt="Connection",Mr={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||yt}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||yt,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||yt}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||yt}},None(){}};var cE={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 np=p({...F.shape,...C(O(),"CUSTOM").shape,code:a()});var op=D([Rr,Fe]),jr=w(a(),op),zE=w(a(),Rr);var yi=D([p({strategy:S("CRON"),cronExpression:a()}),p({strategy:S("NONE")})]),Be=class{constructor(t,r,n,i,u,c,l,f,y,x,b,P,s,d,g,m,v,_,j){this.name=t;this.displayName=r;this.description=n;this.requireAuth=i;this.props=u;this.type=c;this.handshakeConfiguration=l;this.onHandshake=f;this.renewConfiguration=y;this.onRenew=x;this.onEnable=b;this.onDisable=P;this.onStart=s;this.run=d;this.test=g;this.sampleData=m;this.testStrategy=v;this.outputSchema=_;this.aiMetadata=j}static{o(this,"ITrigger")}},hi=o(e=>{switch(e.type){case"WEBHOOK":return new Be(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 Be(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 Be(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 Be(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,X(e.sampleData)&&X(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var vi="2",Ft="0.82.0";var Lr=class{constructor(t,r,n,i,u,c,l,f,y=Ft,x,b=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=l;this.auth=f;this.minimumSupportedRelease=y;this.maximumSupportedRelease=x;this.description=b;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:vi}),"getContextInfo");(!ip(y)||ap(y,Ft))&&(this.minimumSupportedRelease=Ft),u.forEach(P=>this._actions[P.name]=P),c.forEach(P=>this._triggers[P.name]=P)}static{o(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:this.auth,minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},xi=o(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,i)=>n===i.findIndex(u=>u.type===r.type)))throw new Error("Auth properties must be unique by type");return new Lr(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function ip(e){return/^\d+\.\d+\.\d+$/.test(e)}o(ip,"isValidSimpleSemver");function ap(e,t){let[r,n,i]=e.split(".").map(Number),[u,c,l]=t.split(".").map(Number);return r!==u?r<u:n!==c?n<c:i<l}o(ap,"isSemverLessThan");var sp=h(w(a(),w(a(),a()))),Pi=p({id:h(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:N(a()),platformId:h(a()),directoryPath:h(a()),auth:h(D([Fe,N(Fe)])),version:a(),categories:h(N(U(Me))),minimumSupportedRelease:h(a()),maximumSupportedRelease:h(a()),i18n:sp}),up=U(["human","ai","both"]),_i=p({description:h(a()),idempotent:h(B())}),bi=p({name:a(),displayName:a(),description:a(),props:jr,requireAuth:B(),errorHandlingOptions:h(xr),outputSchema:h(Nt()),audience:h(up),aiMetadata:h(_i)}),Ii=p({name:a(),displayName:a(),description:a(),props:jr,errorHandlingOptions:h(xr),type:U(Ie),sampleData:O(),handshakeConfiguration:h(Nt()),renewConfiguration:h(yi),testStrategy:U(mt),outputSchema:h(Nt()),aiMetadata:h(_i)}),cp=p({...Pi.shape,actions:w(a(),bi),triggers:w(a(),Ii)}),pp=p({...Pi.shape,actions:Y(),triggers:Y(),suggestedActions:h(N(Ii)),suggestedTriggers:h(N(bi))}),Ti=p({projectUsage:Y(),tags:h(N(a())),pieceType:U(Ue),packageType:U(pt),platformId:h(a()),archiveId:h(a())}),z$=p({...cp.shape,...Ti.shape}),k$=p({...pp.shape,...Ti.shape}),O$=p({name:a(),version:a()});var lp=we(require("path")),dp=we(require("fs/promises"));var Bt=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{o(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,i=new URLSearchParams;return r.searchParams.forEach((u,c)=>{i.append(c,u)}),{urlWithoutQueryParams:n,queryParams:i}}getHeaders(t){let r={Accept:"application/json"};if(t.authentication&&this.populateAuthentication(t.authentication,r),t.body)switch(t.headers?.["Content-Type"]){case"text/csv":r["Content-Type"]="text/csv";break;default:r["Content-Type"]="application/json";break}return t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var Vt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new Fr,r=new Br){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Fr=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Br=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 Zt=class extends Error{constructor(r,n){let i=n.status||500,u=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:i,body:u},request:{body:r}}));this.requestBody=r;this.status=i,this.responseBody=u}static{o(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};var Ht=class extends Bt{static{o(this,"FetchHttpClient")}constructor(t="",r=new Vt){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(t),u=this.getHeaders(t),c=t.queryParams??{};for(let[j,ee]of Object.entries(c))i.append(j,ee);let l=i.toString(),f=l?`${n}?${l}`:n,y=t.responseType??"json",x=t.followRedirects??!0,b=t.retries??0,{body:P,extraHeaders:s,isStream:d}=mp(t.body,u),g=gp({...u,...s}),m=await fp(async()=>{let j=new AbortController,ee=t.timeout&&t.timeout>0?setTimeout(()=>j.abort(),t.timeout):void 0;try{let oe={method:t.method.toString(),headers:g,body:P,redirect:x?"follow":"manual",signal:j.signal};return d&&(oe.duplex="half"),r?.dispatcher!==void 0&&(oe.dispatcher=r.dispatcher),await fetch(f,oe)}finally{ee!==void 0&&clearTimeout(ee)}},b),v=x?300:400;if(m.status<200||m.status>=v){let j=await Ei(m,y),ee=new Zt(t.body,{status:m.status,responseBody:j});throw console.error("[HttpClient#(sanitized error message)] Request failed:",ee),ee}let _=await Ei(m,y);return{status:m.status,headers:yp(m.headers),body:_}}};function mp(e,t){return vp(e)?{body:void 0,extraHeaders:{},isStream:!1}:hp(e)?{body:e,extraHeaders:e.getHeaders(),isStream:!0}:typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}o(mp,"serializeBody");async function Ei(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();case"json":default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}o(Ei,"parseResponseBody");async function fp(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await $i(n);continue}return i}catch(i){if(r=i,n<t){await $i(n);continue}throw i}throw r}o(fp,"sendWithRetries");function $i(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o($i,"backoff");function gp(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r]=Array.isArray(n)?n.join(", "):n);return t}o(gp,"normalizeHeaders");function yp(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(yp,"toHttpHeaders");function hp(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}o(hp,"isNodeFormData");function vp(e){return e==null}o(vp,"isNil");var Ve=new Ht;var Wt=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(Wt||{});var id=we(require("fs")),ws=we(Os());var ad={"application/json":"json","application/pdf":"pdf","application/xml":"xml","text/xml":"xml","application/zip":"zip","application/gzip":"gz","application/x-tar":"tar","application/octet-stream":"bin","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/rtf":"rtf","application/javascript":"js","application/x-www-form-urlencoded":"bin","text/plain":"txt","text/html":"html","text/css":"css","text/csv":"csv","text/calendar":"ics","text/markdown":"md","image/png":"png","image/jpeg":"jpeg","image/jpg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/tiff":"tiff","image/x-icon":"ico","image/vnd.microsoft.icon":"ico","image/heic":"heic","audio/mpeg":"mp3","audio/mp4":"m4a","audio/wav":"wav","audio/x-wav":"wav","audio/ogg":"ogg","audio/webm":"weba","video/mp4":"mp4","video/mpeg":"mpeg","video/webm":"webm","video/quicktime":"mov","video/x-msvideo":"avi","font/woff":"woff","font/woff2":"woff2","font/ttf":"ttf","font/otf":"otf"};function sd(e){let t=e.split(";")[0].trim().toLowerCase();return ad[t]??""}o(sd,"contentTypeToExtension");var ud=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),cd=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 Rs({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:l,authLocation:f="headers"}){return be({audience:"human",name:u||"custom_api_call",displayName:i||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:E.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:y})=>({url:E.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
3
+ i.e ${cd(t,y)}/resource or /resource`,required:!0,defaultValue:y?t(y):"",...c?.url??{}})}),"props")}),method:E.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(Wt).map(y=>({label:y,value:y}))},...c?.method??{}}),headers:E.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:E.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:E.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:E.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:y})=>{if(!y)return{};let x=y,b={};switch(x){case"none":break;case"json":b.data=E.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":b.data=E.LongText({displayName:"Raw Body",required:!0});break;case"form_data":b.data=E.Array({displayName:"Form Data",required:!0,properties:{fieldName:E.ShortText({displayName:"Field Name",required:!0}),fieldType:E.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:E.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:E.File({displayName:"File Field Value",required:!1})}});break}return b},"props")}),response_is_binary:E.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:E.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:E.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:E.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...l},run:o(async y=>{let{method:x,url:b,headers:P,queryParams:s,body:d,body_type:g,failsafe:m,timeout:v,response_is_binary:_,followRedirects:j}=y.propsValue;Mt(x,"Method"),Mt(b,"URL");let ee=X(r)?{}:await r(y.auth,y.propsValue),oe=b.url,Ke=oe.startsWith("http://")||oe.startsWith("https://")?oe:ud({baseUrl:t(y.auth),relativePath:oe}),Se={method:x,url:Ke,headers:{...P??{},...f==="headers"||!X(f)?ee:{}},queryParams:{...f==="queryParams"?ee:{},...s??{}},timeout:v?v*1e3:0,followRedirects:j};if(_&&(Se.responseType="arraybuffer"),d)if(g&&g!=="none"){let pe=d.data;if(g==="form_data"){let Ms=pe,_t=new ws.default;for(let{fieldName:pn,fieldType:ln,textFieldValue:dn,fileFieldValue:nr}of Ms)ln==="text"&&!ft(dn)?_t.append(pn,dn):ln==="file"&&!ft(nr)&&_t.append(pn,nr.data,{filename:nr?.filename});Se.body=_t,Se.headers={...Se.headers,..._t.getHeaders()}}else Se.body=pe}else g||(Se.body=d);try{let pe=await Ve.sendRequest(Se);return await pd(y.files,pe.body,pe.status,pe.headers,_)}catch(pe){if(m)return pe.errorMessage();throw pe}},"run")})}o(Rs,"createCustomApiCallAction");var pd=o(async(e,t,r,n,i)=>{let u;if(i&&ld(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],l=sd(c??"")||"txt",f;t instanceof ArrayBuffer?f=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?f=t:f=Buffer.from(t),u=await e.write({fileName:`output.${l}`,data:f})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),ld=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var Pt={async poll(e,{store:t,auth:r,propsValue:n,maxItemsToPoll:i,files:u,server:c}){switch(e.strategy){case 0:{let l=await t.get("lastPoll");if(X(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}),y=f.reduce((x,b)=>Math.max(x,b.epochMilliSeconds),l);return await t.put("lastPoll",y),f.filter(x=>x.epochMilliSeconds>l).map(x=>x.data)}case 1:{let l=await t.get("lastItem"),f=await e.items({store:t,auth:r,propsValue:n,lastItemId:l,files:u,server:c}),y=f.findIndex(P=>P.id===l),x=[];X(l)||y==-1?x=f??[]:x=f?.slice(0,y)??[],X(i)||(x=x.slice(-i));let b=x?.[0]?.id;return X(b)||await t.put("lastItem",b),x.map(P=>P.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;X(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:u}){let c=[];switch(e.strategy){case 0:{c=await e.items({store:n,auth:t,propsValue:r,lastFetchEpochMS:0,server:u});break}case 1:{c=await e.items({store:n,auth:t,propsValue:r,lastItemId:null,files:i,server:u});break}}return dd(c.map(l=>l.data))}};function dd(e){return e.length<=5?e:e.slice(0,5)}o(dd,"getFirstFiveOrAll");var md="https://api.cryptolens.io/api";async function fd(e){try{return await Ve.sendRequest({method:"GET",url:`${md}/auth/GetToken?token=${encodeURIComponent(e)}`}),!0}catch{return!1}}o(fd,"validateAccessToken");var se=Mr.SecretText({displayName:"Access Token",description:"Your Cryptolens access token. Get it from https://app.cryptolens.io/User/AccessToken",required:!0,validate:o(async({auth:e})=>await fd(e)?{valid:!0}:{valid:!1,error:"Invalid access token"},"validate")});var gd="https://api.cryptolens.io/api";async function $e(e,t,r,n){try{let i=`${gd}${r}?token=${encodeURIComponent(e)}`;return(await Ve.sendRequest({method:t,url:i,headers:{"Content-Type":"application/json"},body:n})).body}catch(i){throw new Error(`Unexpected error: ${i.message||String(i)}`)}}o($e,"makeRequest");var Ns=be({auth:se,name:"addCustomer",displayName:"Add Customer",description:"Add a new customer to your Cryptolens account",audience:"both",aiMetadata:{description:"Creates a new customer record in a Cryptolens account, optionally enabling a customer portal so the customer can self-manage their licenses and device activations. Use to onboard a license holder before associating keys with them. Requires name, email, and company name; not idempotent \u2014 each call creates a separate customer.",idempotent:!1},props:{name:E.ShortText({displayName:"Name",description:"The name of the customer (max 100 characters)",required:!0}),email:E.ShortText({displayName:"Email",description:"The email of the customer (max 100 characters)",required:!0}),companyName:E.ShortText({displayName:"Company Name",description:"The company name the customer belongs to (max 100 characters)",required:!0}),notes:E.LongText({displayName:"Notes",description:"Optional notes field (max 1000 characters)",required:!1}),enableCustomerAssociation:E.Checkbox({displayName:"Enable Customer Portal",description:"If enabled, a portal link will be returned where the customer can view their licenses",required:!1}),allowActivationManagement:E.Checkbox({displayName:"Allow Activation Management",description:"If enabled, the customer can activate and deactivate devices through the customer portal",required:!1}),allowMultipleUserAssociation:E.Checkbox({displayName:"Allow Multiple User Association",description:"If enabled, multiple user accounts can be associated with this customer",required:!1})},async run(e){let t=new URLSearchParams({Name:e.propsValue.name,Email:e.propsValue.email,CompanyName:e.propsValue.companyName});return e.propsValue.notes&&t.append("Notes",e.propsValue.notes),e.propsValue.enableCustomerAssociation&&t.append("EnableCustomerAssociation","true"),e.propsValue.allowActivationManagement&&t.append("AllowActivationManagement","true"),e.propsValue.allowMultipleUserAssociation&&t.append("AllowMultipleUserAssociation","true"),await $e(e.auth.secret_text,"POST",`/customer/AddCustomer?${t.toString()}`)}});var Ds=be({auth:se,name:"blockKey",displayName:"Block Key",description:"Block a license key to prevent it from being accessible by most Web API methods",audience:"both",aiMetadata:{description:"Blocks a specific license key for a product so it is rejected by most Cryptolens Web API methods (e.g. activation/validation). Use to revoke or suspend a license. Requires the product ID and the serial key string. Blocking is a state change, but re-blocking an already-blocked key has no additional effect.",idempotent:!0},props:{productId:E.Number({displayName:"Product ID",description:"The product ID",required:!0}),key:E.ShortText({displayName:"License Key",description:"The serial key string to block",required:!0})},async run(e){let t=new URLSearchParams({ProductId:String(e.propsValue.productId),Key:e.propsValue.key});return await $e(e.auth.secret_text,"POST",`/key/BlockKey?${t.toString()}`)}});var Cs=be({auth:se,name:"createKey",displayName:"Create Key",description:"Create a new license key for a product",audience:"both",aiMetadata:{description:"Generates one or more new license keys for a Cryptolens product, with configurable validity period, feature flags (F1-F8), machine activation limits, trial activation, and optional association to a customer or reseller. Use to issue licenses for a product. Requires the product ID; not idempotent \u2014 each call mints new key(s), and Number of Keys can generate up to 1000 at once.",idempotent:!1},props:{productId:E.Number({displayName:"Product ID",description:"The product ID",required:!0}),period:E.Number({displayName:"Validity Period (days)",description:"The number of days from today the license key should be valid. Default is 0 (no expiration).",required:!1}),f1:E.Checkbox({displayName:"Feature 1",description:"Enable Feature 1",required:!1}),f2:E.Checkbox({displayName:"Feature 2",description:"Enable Feature 2",required:!1}),f3:E.Checkbox({displayName:"Feature 3",description:"Enable Feature 3",required:!1}),f4:E.Checkbox({displayName:"Feature 4",description:"Enable Feature 4",required:!1}),f5:E.Checkbox({displayName:"Feature 5",description:"Enable Feature 5",required:!1}),f6:E.Checkbox({displayName:"Feature 6",description:"Enable Feature 6",required:!1}),f7:E.Checkbox({displayName:"Feature 7",description:"Enable Feature 7",required:!1}),f8:E.Checkbox({displayName:"Feature 8",description:"Enable Feature 8",required:!1}),notes:E.LongText({displayName:"Notes",description:"Additional notes about the license key (max 500 characters)",required:!1}),block:E.Checkbox({displayName:"Block Key",description:"Block the key from being accessed by the Activation method",required:!1}),customerId:E.Number({displayName:"Customer ID",description:"The ID of the customer to associate with this license key",required:!1}),trialActivation:E.Checkbox({displayName:"Enable Trial Activation",description:"Enable or disable trial activation",required:!1}),maxNoOfMachines:E.Number({displayName:"Max Number of Machines",description:"The maximum number of computers that can activate the key. Default is 0 (unlimited).",required:!1}),allowedMachines:E.LongText({displayName:"Allowed Machines",description:"A list of machine codes (separated by new lines) that will be prioritized during activation",required:!1}),resellerId:E.Number({displayName:"Reseller ID",description:"The ID of the reseller to associate with this license key",required:!1}),noOfKeys:E.Number({displayName:"Number of Keys",description:"The number of keys to generate. Default is 1. Maximum 1000 per request.",required:!1})},async run(e){let t=new URLSearchParams({ProductId:String(e.propsValue.productId)});return e.propsValue.period!==void 0&&e.propsValue.period!==null&&t.append("Period",String(e.propsValue.period)),e.propsValue.f1&&t.append("F1","true"),e.propsValue.f2&&t.append("F2","true"),e.propsValue.f3&&t.append("F3","true"),e.propsValue.f4&&t.append("F4","true"),e.propsValue.f5&&t.append("F5","true"),e.propsValue.f6&&t.append("F6","true"),e.propsValue.f7&&t.append("F7","true"),e.propsValue.f8&&t.append("F8","true"),e.propsValue.notes&&t.append("Notes",e.propsValue.notes),e.propsValue.block&&t.append("Block","true"),e.propsValue.customerId!==void 0&&e.propsValue.customerId!==null&&t.append("CustomerId",String(e.propsValue.customerId)),e.propsValue.trialActivation&&t.append("TrialActivation","true"),e.propsValue.maxNoOfMachines!==void 0&&e.propsValue.maxNoOfMachines!==null&&t.append("MaxNoOfMachines",String(e.propsValue.maxNoOfMachines)),e.propsValue.allowedMachines&&t.append("AllowedMachines",e.propsValue.allowedMachines),e.propsValue.resellerId!==void 0&&e.propsValue.resellerId!==null&&t.append("ResellerId",String(e.propsValue.resellerId)),e.propsValue.noOfKeys!==void 0&&e.propsValue.noOfKeys!==null&&t.append("NoOfKeys",String(e.propsValue.noOfKeys)),await $e(e.auth.secret_text,"POST",`/key/CreateKey?${t.toString()}`)}});var yd={productId:E.Number({displayName:"Product ID",description:"Filter events for a specific product (optional)",required:!1}),key:E.ShortText({displayName:"License Key",description:"Filter events for a specific license key (requires Product ID)",required:!1}),states:E.LongText({displayName:"Event States",description:"Filter by event states (comma-separated numbers). E.g., 1010 for validation, 2010 for activation, 3010 for key creation, 6010 for deactivation",required:!1}),limit:E.Number({displayName:"Limit",description:"Maximum number of events to fetch per poll (default 100, max 1000)",required:!1})},rr={strategy:0,items:o(async({propsValue:e,auth:t,lastFetchEpochMS:r})=>{let n=new URLSearchParams;e.productId&&n.append("ProductId",String(e.productId)),e.key&&e.productId&&n.append("Key",e.key),e.states&&n.append("States",e.states);let i=e.limit||100;if(n.append("Limit",String(i)),r){let l=JSON.stringify({gte:Math.floor(r/1e3)});n.append("Time",l)}else{let l=Math.floor((Date.now()-36e5)/1e3),f=JSON.stringify({gte:l});n.append("Time",f)}let c=await $e(t.secret_text,"GET",`/ai/GetWebAPILog?${n.toString()}`);return c.result!==0||!c.Events?[]:c.Events.map(l=>({epochMilliSeconds:l.Created*1e3,data:l}))},"items")},Us=hi({auth:se,name:"newApiEvent",displayName:"New API Event",description:"Trigger when a new API event is logged (activation, deactivation, key creation, etc.)",aiMetadata:{description:"Fires when a new Web API event is logged in Cryptolens, such as a license activation, deactivation, validation, or key creation. Polls the audit log on an interval and can optionally be scoped to a specific product, a specific key, or particular event-state codes."},props:yd,sampleData:{Id:1,Created:1426545812,ResourceType:3,ResourceAction:1,AffectedObjectId:12345,ObjectOwnerUserId:999,PerformedByUserId:"user123",Data:'{"key": "value"}'},type:"POLLING",async test(e){return await Pt.test(rr,e)},async onEnable(e){let{store:t,auth:r,propsValue:n}=e;await Pt.onEnable(rr,{store:t,auth:r,propsValue:n})},async onDisable(e){let{store:t,auth:r,propsValue:n}=e;await Pt.onDisable(rr,{store:t,auth:r,propsValue:n})},async run(e){return await Pt.poll(rr,e)}});var hd=xi({displayName:"Cryptolens",auth:se,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/cryptolens.png",authors:["sanket-a11y"],categories:["DEVELOPER_TOOLS"],description:"Cryptolens is a Software Licensing as a Service (SLaaS) platform that provides developers with tools to manage software licenses, protect against piracy, and analyze usage data.",actions:[Ns,Ds,Cs,Rs({auth:se,baseUrl:o(()=>"https://api.cryptolens.io/api","baseUrl"),authLocation:"queryParams",authMapping:o(async e=>({token:`${e.secret_text}`}),"authMapping")})],triggers:[Us]});0&&(module.exports={cryptolens});
4
+ /*! Bundled license information:
5
+
6
+ mime-types/index.js:
7
+ (*!
8
+ * mime-types
9
+ * Copyright(c) 2014 Jonathan Ong
10
+ * Copyright(c) 2015 Douglas Christopher Wilson
11
+ * MIT Licensed
12
+ *)
13
+ */
package/README.md DELETED
@@ -1,7 +0,0 @@
1
- # pieces-cryptolens
2
-
3
- This library was generated with [Nx](https://nx.dev).
4
-
5
- ## Building
6
-
7
- Run `nx build pieces-cryptolens` to build the library.
package/src/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare const cryptolens: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").SecretTextProperty<true>>;
package/src/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/cryptolens/src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA6D;AAC7D,4CAAmD;AACnD,6DAAyD;AACzD,uDAAmD;AACnD,yDAAqD;AACrD,gEAA2D;AAC3D,+DAAwE;AACxE,iDAAqD;AAExC,QAAA,UAAU,GAAG,IAAA,8BAAW,EAAC;IACpC,WAAW,EAAE,YAAY;IACzB,IAAI,EAAE,qBAAc;IACpB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,oDAAoD;IAC7D,OAAO,EAAE,CAAC,aAAa,CAAC;IACxB,UAAU,EAAE,CAAC,sBAAa,CAAC,eAAe,CAAC;IAC3C,WAAW,EACT,mLAAmL;IACrL,OAAO,EAAE;QACP,0BAAW;QACX,oBAAQ;QACR,sBAAS;QACT,IAAA,yCAAyB,EAAC;YACxB,IAAI,EAAE,qBAAc;YACpB,OAAO,EAAE,GAAG,EAAE,CAAC,+BAA+B;YAC9C,YAAY,EAAE,aAAa;YAC3B,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAC1B,OAAO;oBACL,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE;iBAC7B,CAAC;YACJ,CAAC,CAAA;SACF,CAAC;KACH;IACD,QAAQ,EAAE,CAAC,2BAAW,CAAC;CACxB,CAAC,CAAC"}
@@ -1,9 +0,0 @@
1
- export declare const addCustomer: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- companyName: import("@activepieces/pieces-framework").ShortTextProperty<true>;
5
- notes: import("@activepieces/pieces-framework").LongTextProperty<false>;
6
- enableCustomerAssociation: import("@activepieces/pieces-framework").CheckboxProperty<false>;
7
- allowActivationManagement: import("@activepieces/pieces-framework").CheckboxProperty<false>;
8
- allowMultipleUserAssociation: import("@activepieces/pieces-framework").CheckboxProperty<false>;
9
- }>;
@@ -1,75 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addCustomer = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const client_1 = require("../common/client");
7
- const auth_1 = require("../common/auth");
8
- const pieces_common_1 = require("@activepieces/pieces-common");
9
- exports.addCustomer = (0, pieces_framework_1.createAction)({
10
- auth: auth_1.cryptolensAuth,
11
- name: 'addCustomer',
12
- displayName: 'Add Customer',
13
- description: 'Add a new customer to your Cryptolens account',
14
- props: {
15
- name: pieces_framework_1.Property.ShortText({
16
- displayName: 'Name',
17
- description: 'The name of the customer (max 100 characters)',
18
- required: true,
19
- }),
20
- email: pieces_framework_1.Property.ShortText({
21
- displayName: 'Email',
22
- description: 'The email of the customer (max 100 characters)',
23
- required: true,
24
- }),
25
- companyName: pieces_framework_1.Property.ShortText({
26
- displayName: 'Company Name',
27
- description: 'The company name the customer belongs to (max 100 characters)',
28
- required: true,
29
- }),
30
- notes: pieces_framework_1.Property.LongText({
31
- displayName: 'Notes',
32
- description: 'Optional notes field (max 1000 characters)',
33
- required: false,
34
- }),
35
- enableCustomerAssociation: pieces_framework_1.Property.Checkbox({
36
- displayName: 'Enable Customer Portal',
37
- description: 'If enabled, a portal link will be returned where the customer can view their licenses',
38
- required: false,
39
- }),
40
- allowActivationManagement: pieces_framework_1.Property.Checkbox({
41
- displayName: 'Allow Activation Management',
42
- description: 'If enabled, the customer can activate and deactivate devices through the customer portal',
43
- required: false,
44
- }),
45
- allowMultipleUserAssociation: pieces_framework_1.Property.Checkbox({
46
- displayName: 'Allow Multiple User Association',
47
- description: 'If enabled, multiple user accounts can be associated with this customer',
48
- required: false,
49
- }),
50
- },
51
- run(context) {
52
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
53
- const params = new URLSearchParams({
54
- Name: context.propsValue.name,
55
- Email: context.propsValue.email,
56
- CompanyName: context.propsValue.companyName,
57
- });
58
- if (context.propsValue.notes) {
59
- params.append('Notes', context.propsValue.notes);
60
- }
61
- if (context.propsValue.enableCustomerAssociation) {
62
- params.append('EnableCustomerAssociation', 'true');
63
- }
64
- if (context.propsValue.allowActivationManagement) {
65
- params.append('AllowActivationManagement', 'true');
66
- }
67
- if (context.propsValue.allowMultipleUserAssociation) {
68
- params.append('AllowMultipleUserAssociation', 'true');
69
- }
70
- const response = yield (0, client_1.makeRequest)(context.auth.secret_text, pieces_common_1.HttpMethod.POST, `/customer/AddCustomer?${params.toString()}`);
71
- return response;
72
- });
73
- },
74
- });
75
- //# sourceMappingURL=add-customer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-customer.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/cryptolens/src/lib/actions/add-customer.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,6CAA+C;AAC/C,yCAAgD;AAChD,+DAAyD;AAE5C,QAAA,WAAW,GAAG,IAAA,+BAAY,EAAC;IACtC,IAAI,EAAE,qBAAc;IACpB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,+CAA+C;IAC5D,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,+CAA+C;YAC5D,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,gDAAgD;YAC7D,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,+DAA+D;YAC5E,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACvB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,4CAA4C;YACzD,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,yBAAyB,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC3C,WAAW,EAAE,wBAAwB;YACrC,WAAW,EAAE,uFAAuF;YACpG,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,yBAAyB,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC3C,WAAW,EAAE,6BAA6B;YAC1C,WAAW,EAAE,0FAA0F;YACvG,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,4BAA4B,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC9C,WAAW,EAAE,iCAAiC;YAC9C,WAAW,EAAE,yEAAyE;YACtF,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC;gBACjC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;gBAC7B,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;gBAC/B,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,WAAW;aAC5C,CAAC,CAAC;YAEH,IAAI,OAAO,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;gBAC7B,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YACnD,CAAC;YAED,IAAI,OAAO,CAAC,UAAU,CAAC,yBAAyB,EAAE,CAAC;gBACjD,MAAM,CAAC,MAAM,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC;YACrD,CAAC;YAED,IAAI,OAAO,CAAC,UAAU,CAAC,yBAAyB,EAAE,CAAC;gBACjD,MAAM,CAAC,MAAM,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC;YACrD,CAAC;YAED,IAAI,OAAO,CAAC,UAAU,CAAC,4BAA4B,EAAE,CAAC;gBACpD,MAAM,CAAC,MAAM,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAC;YACxD,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAChC,OAAO,CAAC,IAAI,CAAC,WAAW,EACxB,0BAAU,CAAC,IAAI,EACf,yBAAyB,MAAM,CAAC,QAAQ,EAAE,EAAE,CAC7C,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare const blockKey: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- productId: import("@activepieces/pieces-framework").NumberProperty<true>;
3
- key: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- }>;
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.blockKey = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const client_1 = require("../common/client");
7
- const auth_1 = require("../common/auth");
8
- const pieces_common_1 = require("@activepieces/pieces-common");
9
- exports.blockKey = (0, pieces_framework_1.createAction)({
10
- auth: auth_1.cryptolensAuth,
11
- name: 'blockKey',
12
- displayName: 'Block Key',
13
- description: 'Block a license key to prevent it from being accessible by most Web API methods',
14
- props: {
15
- productId: pieces_framework_1.Property.Number({
16
- displayName: 'Product ID',
17
- description: 'The product ID',
18
- required: true,
19
- }),
20
- key: pieces_framework_1.Property.ShortText({
21
- displayName: 'License Key',
22
- description: 'The serial key string to block',
23
- required: true,
24
- }),
25
- },
26
- run(context) {
27
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
28
- const params = new URLSearchParams({
29
- ProductId: String(context.propsValue.productId),
30
- Key: context.propsValue.key,
31
- });
32
- const response = yield (0, client_1.makeRequest)(context.auth.secret_text, pieces_common_1.HttpMethod.POST, `/key/BlockKey?${params.toString()}`);
33
- return response;
34
- });
35
- },
36
- });
37
- //# sourceMappingURL=block-key.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"block-key.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/cryptolens/src/lib/actions/block-key.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,6CAA+C;AAC/C,yCAAgD;AAChD,+DAAyD;AAE5C,QAAA,QAAQ,GAAG,IAAA,+BAAY,EAAC;IACnC,IAAI,EAAE,qBAAc;IACpB,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,iFAAiF;IAC9F,KAAK,EAAE;QACL,SAAS,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACzB,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,gBAAgB;YAC7B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,GAAG,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACtB,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC;gBACjC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;gBAC/C,GAAG,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG;aAC5B,CAAC,CAAC;YAEH,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAChC,OAAO,CAAC,IAAI,CAAC,WAAW,EACxB,0BAAU,CAAC,IAAI,EACf,iBAAiB,MAAM,CAAC,QAAQ,EAAE,EAAE,CACrC,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,20 +0,0 @@
1
- export declare const createKey: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- productId: import("@activepieces/pieces-framework").NumberProperty<true>;
3
- period: import("@activepieces/pieces-framework").NumberProperty<false>;
4
- f1: import("@activepieces/pieces-framework").CheckboxProperty<false>;
5
- f2: import("@activepieces/pieces-framework").CheckboxProperty<false>;
6
- f3: import("@activepieces/pieces-framework").CheckboxProperty<false>;
7
- f4: import("@activepieces/pieces-framework").CheckboxProperty<false>;
8
- f5: import("@activepieces/pieces-framework").CheckboxProperty<false>;
9
- f6: import("@activepieces/pieces-framework").CheckboxProperty<false>;
10
- f7: import("@activepieces/pieces-framework").CheckboxProperty<false>;
11
- f8: import("@activepieces/pieces-framework").CheckboxProperty<false>;
12
- notes: import("@activepieces/pieces-framework").LongTextProperty<false>;
13
- block: import("@activepieces/pieces-framework").CheckboxProperty<false>;
14
- customerId: import("@activepieces/pieces-framework").NumberProperty<false>;
15
- trialActivation: import("@activepieces/pieces-framework").CheckboxProperty<false>;
16
- maxNoOfMachines: import("@activepieces/pieces-framework").NumberProperty<false>;
17
- allowedMachines: import("@activepieces/pieces-framework").LongTextProperty<false>;
18
- resellerId: import("@activepieces/pieces-framework").NumberProperty<false>;
19
- noOfKeys: import("@activepieces/pieces-framework").NumberProperty<false>;
20
- }>;
@@ -1,164 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createKey = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const client_1 = require("../common/client");
7
- const auth_1 = require("../common/auth");
8
- const pieces_common_1 = require("@activepieces/pieces-common");
9
- exports.createKey = (0, pieces_framework_1.createAction)({
10
- auth: auth_1.cryptolensAuth,
11
- name: 'createKey',
12
- displayName: 'Create Key',
13
- description: 'Create a new license key for a product',
14
- props: {
15
- productId: pieces_framework_1.Property.Number({
16
- displayName: 'Product ID',
17
- description: 'The product ID',
18
- required: true,
19
- }),
20
- period: pieces_framework_1.Property.Number({
21
- displayName: 'Validity Period (days)',
22
- description: 'The number of days from today the license key should be valid. Default is 0 (no expiration).',
23
- required: false,
24
- }),
25
- f1: pieces_framework_1.Property.Checkbox({
26
- displayName: 'Feature 1',
27
- description: 'Enable Feature 1',
28
- required: false,
29
- }),
30
- f2: pieces_framework_1.Property.Checkbox({
31
- displayName: 'Feature 2',
32
- description: 'Enable Feature 2',
33
- required: false,
34
- }),
35
- f3: pieces_framework_1.Property.Checkbox({
36
- displayName: 'Feature 3',
37
- description: 'Enable Feature 3',
38
- required: false,
39
- }),
40
- f4: pieces_framework_1.Property.Checkbox({
41
- displayName: 'Feature 4',
42
- description: 'Enable Feature 4',
43
- required: false,
44
- }),
45
- f5: pieces_framework_1.Property.Checkbox({
46
- displayName: 'Feature 5',
47
- description: 'Enable Feature 5',
48
- required: false,
49
- }),
50
- f6: pieces_framework_1.Property.Checkbox({
51
- displayName: 'Feature 6',
52
- description: 'Enable Feature 6',
53
- required: false,
54
- }),
55
- f7: pieces_framework_1.Property.Checkbox({
56
- displayName: 'Feature 7',
57
- description: 'Enable Feature 7',
58
- required: false,
59
- }),
60
- f8: pieces_framework_1.Property.Checkbox({
61
- displayName: 'Feature 8',
62
- description: 'Enable Feature 8',
63
- required: false,
64
- }),
65
- notes: pieces_framework_1.Property.LongText({
66
- displayName: 'Notes',
67
- description: 'Additional notes about the license key (max 500 characters)',
68
- required: false,
69
- }),
70
- block: pieces_framework_1.Property.Checkbox({
71
- displayName: 'Block Key',
72
- description: 'Block the key from being accessed by the Activation method',
73
- required: false,
74
- }),
75
- customerId: pieces_framework_1.Property.Number({
76
- displayName: 'Customer ID',
77
- description: 'The ID of the customer to associate with this license key',
78
- required: false,
79
- }),
80
- trialActivation: pieces_framework_1.Property.Checkbox({
81
- displayName: 'Enable Trial Activation',
82
- description: 'Enable or disable trial activation',
83
- required: false,
84
- }),
85
- maxNoOfMachines: pieces_framework_1.Property.Number({
86
- displayName: 'Max Number of Machines',
87
- description: 'The maximum number of computers that can activate the key. Default is 0 (unlimited).',
88
- required: false,
89
- }),
90
- allowedMachines: pieces_framework_1.Property.LongText({
91
- displayName: 'Allowed Machines',
92
- description: 'A list of machine codes (separated by new lines) that will be prioritized during activation',
93
- required: false,
94
- }),
95
- resellerId: pieces_framework_1.Property.Number({
96
- displayName: 'Reseller ID',
97
- description: 'The ID of the reseller to associate with this license key',
98
- required: false,
99
- }),
100
- noOfKeys: pieces_framework_1.Property.Number({
101
- displayName: 'Number of Keys',
102
- description: 'The number of keys to generate. Default is 1. Maximum 1000 per request.',
103
- required: false,
104
- }),
105
- },
106
- run(context) {
107
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
108
- const params = new URLSearchParams({
109
- ProductId: String(context.propsValue.productId),
110
- });
111
- if (context.propsValue.period !== undefined &&
112
- context.propsValue.period !== null) {
113
- params.append('Period', String(context.propsValue.period));
114
- }
115
- if (context.propsValue.f1)
116
- params.append('F1', 'true');
117
- if (context.propsValue.f2)
118
- params.append('F2', 'true');
119
- if (context.propsValue.f3)
120
- params.append('F3', 'true');
121
- if (context.propsValue.f4)
122
- params.append('F4', 'true');
123
- if (context.propsValue.f5)
124
- params.append('F5', 'true');
125
- if (context.propsValue.f6)
126
- params.append('F6', 'true');
127
- if (context.propsValue.f7)
128
- params.append('F7', 'true');
129
- if (context.propsValue.f8)
130
- params.append('F8', 'true');
131
- if (context.propsValue.notes) {
132
- params.append('Notes', context.propsValue.notes);
133
- }
134
- if (context.propsValue.block) {
135
- params.append('Block', 'true');
136
- }
137
- if (context.propsValue.customerId !== undefined &&
138
- context.propsValue.customerId !== null) {
139
- params.append('CustomerId', String(context.propsValue.customerId));
140
- }
141
- if (context.propsValue.trialActivation) {
142
- params.append('TrialActivation', 'true');
143
- }
144
- if (context.propsValue.maxNoOfMachines !== undefined &&
145
- context.propsValue.maxNoOfMachines !== null) {
146
- params.append('MaxNoOfMachines', String(context.propsValue.maxNoOfMachines));
147
- }
148
- if (context.propsValue.allowedMachines) {
149
- params.append('AllowedMachines', context.propsValue.allowedMachines);
150
- }
151
- if (context.propsValue.resellerId !== undefined &&
152
- context.propsValue.resellerId !== null) {
153
- params.append('ResellerId', String(context.propsValue.resellerId));
154
- }
155
- if (context.propsValue.noOfKeys !== undefined &&
156
- context.propsValue.noOfKeys !== null) {
157
- params.append('NoOfKeys', String(context.propsValue.noOfKeys));
158
- }
159
- const response = yield (0, client_1.makeRequest)(context.auth.secret_text, pieces_common_1.HttpMethod.POST, `/key/CreateKey?${params.toString()}`);
160
- return response;
161
- });
162
- },
163
- });
164
- //# sourceMappingURL=create-key.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-key.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/cryptolens/src/lib/actions/create-key.ts"],"names":[],"mappings":"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"}
@@ -1,5 +0,0 @@
1
- export declare const extendLicense: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- productId: import("@activepieces/pieces-framework").NumberProperty<true>;
3
- key: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- noOfDays: import("@activepieces/pieces-framework").NumberProperty<false>;
5
- }>;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.extendLicense = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const client_1 = require("../common/client");
7
- const auth_1 = require("../common/auth");
8
- const pieces_common_1 = require("@activepieces/pieces-common");
9
- exports.extendLicense = (0, pieces_framework_1.createAction)({
10
- auth: auth_1.cryptolensAuth,
11
- name: 'extendLicense',
12
- displayName: 'Extend License',
13
- description: 'Extend a license key by a specified number of days',
14
- props: {
15
- productId: pieces_framework_1.Property.Number({
16
- displayName: 'Product ID',
17
- description: 'The product ID',
18
- required: true,
19
- }),
20
- key: pieces_framework_1.Property.ShortText({
21
- displayName: 'License Key',
22
- description: 'The serial key string to extend',
23
- required: true,
24
- }),
25
- noOfDays: pieces_framework_1.Property.Number({
26
- displayName: 'Number of Days',
27
- description: 'The number of days to extend the license. Use negative numbers to decrease the expiration date.',
28
- required: false,
29
- }),
30
- },
31
- run(context) {
32
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
33
- const params = new URLSearchParams({
34
- ProductId: String(context.propsValue.productId),
35
- Key: context.propsValue.key,
36
- });
37
- if (context.propsValue.noOfDays !== undefined && context.propsValue.noOfDays !== null) {
38
- params.append('NoOfDays', String(context.propsValue.noOfDays));
39
- }
40
- const response = yield (0, client_1.makeRequest)(context.auth.secret_text, pieces_common_1.HttpMethod.POST, `/key/ExtendLicense?${params.toString()}`);
41
- return response;
42
- });
43
- },
44
- });
45
- //# sourceMappingURL=extend-license.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extend-license.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/cryptolens/src/lib/actions/extend-license.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,6CAA+C;AAC/C,yCAAgD;AAChD,+DAAyD;AAE5C,QAAA,aAAa,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,qBAAc;IACpB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,oDAAoD;IACjE,KAAK,EAAE;QACL,SAAS,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACzB,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,gBAAgB;YAC7B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,GAAG,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACtB,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACxB,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EAAE,iGAAiG;YAC9G,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC;gBACjC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;gBAC/C,GAAG,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG;aAC5B,CAAC,CAAC;YAEH,IAAI,OAAO,CAAC,UAAU,CAAC,QAAQ,KAAK,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;gBACtF,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;YACjE,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAChC,OAAO,CAAC,IAAI,CAAC,WAAW,EACxB,0BAAU,CAAC,IAAI,EACf,sBAAsB,MAAM,CAAC,QAAQ,EAAE,EAAE,CAC1C,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export declare const cryptolensAuth: import("@activepieces/pieces-framework").SecretTextProperty<true>;
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cryptolensAuth = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_common_1 = require("@activepieces/pieces-common");
6
- const pieces_framework_1 = require("@activepieces/pieces-framework");
7
- const CRYPTOLENS_API_BASE_URL = 'https://api.cryptolens.io/api';
8
- function validateAccessToken(token) {
9
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
10
- try {
11
- yield pieces_common_1.httpClient.sendRequest({
12
- method: pieces_common_1.HttpMethod.GET,
13
- url: `${CRYPTOLENS_API_BASE_URL}/auth/GetToken?token=${encodeURIComponent(token)}`,
14
- });
15
- return true;
16
- }
17
- catch (_a) {
18
- return false;
19
- }
20
- });
21
- }
22
- exports.cryptolensAuth = pieces_framework_1.PieceAuth.SecretText({
23
- displayName: 'Access Token',
24
- description: 'Your Cryptolens access token. Get it from https://app.cryptolens.io/User/AccessToken',
25
- required: true,
26
- validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
27
- const isValid = yield validateAccessToken(auth);
28
- if (isValid) {
29
- return { valid: true };
30
- }
31
- return {
32
- valid: false,
33
- error: 'Invalid access token',
34
- };
35
- }),
36
- });
37
- //# sourceMappingURL=auth.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/cryptolens/src/lib/common/auth.ts"],"names":[],"mappings":";;;;AAAA,+DAAqE;AACrE,qEAA2D;AAE3D,MAAM,uBAAuB,GAAG,+BAA+B,CAAC;AAEhE,SAAe,mBAAmB,CAAC,KAAa;;QAC9C,IAAI,CAAC;YACH,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC3B,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,GAAG,uBAAuB,wBAAwB,kBAAkB,CACvE,KAAK,CACN,EAAE;aACJ,CAAC,CAAC;YACH,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,WAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CAAA;AAEY,QAAA,cAAc,GAAG,4BAAS,CAAC,UAAU,CAAC;IACjD,WAAW,EAAE,cAAc;IAC3B,WAAW,EACT,sFAAsF;IACxF,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACvB,MAAM,OAAO,GAAG,MAAM,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QACzB,CAAC;QACD,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,sBAAsB;SAC9B,CAAC;IACJ,CAAC,CAAA;CACF,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- import { HttpMethod } from '@activepieces/pieces-common';
2
- export declare const BASE_URL = "https://api.cryptolens.io/api";
3
- export declare function makeRequest(access_token: string, method: HttpMethod, path: string, body?: unknown): Promise<any>;
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BASE_URL = void 0;
4
- exports.makeRequest = makeRequest;
5
- const tslib_1 = require("tslib");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- exports.BASE_URL = `https://api.cryptolens.io/api`;
8
- function makeRequest(access_token, method, path, body) {
9
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
10
- try {
11
- const url = `${exports.BASE_URL}${path}?token=${encodeURIComponent(access_token)}`;
12
- const response = yield pieces_common_1.httpClient.sendRequest({
13
- method,
14
- url,
15
- headers: {
16
- 'Content-Type': 'application/json',
17
- },
18
- body,
19
- });
20
- return response.body;
21
- }
22
- catch (error) {
23
- throw new Error(`Unexpected error: ${error.message || String(error)}`);
24
- }
25
- });
26
- }
27
- //# sourceMappingURL=client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/cryptolens/src/lib/common/client.ts"],"names":[],"mappings":";;;AAIA,kCAqBC;;AAzBD,+DAAqE;AAExD,QAAA,QAAQ,GAAG,+BAA+B,CAAC;AAExD,SAAsB,WAAW,CAC/B,YAAoB,EACpB,MAAkB,EAClB,IAAY,EACZ,IAAc;;QAEd,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,GAAG,gBAAQ,GAAG,IAAI,UAAU,kBAAkB,CAAC,YAAY,CAAC,EAAE,CAAC;YAE3E,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM;gBACN,GAAG;gBACH,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI;aACL,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,qBAAqB,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;CAAA"}
@@ -1,22 +0,0 @@
1
- import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- export declare const newApiEvent: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
3
- productId: import("@activepieces/pieces-framework").NumberProperty<false>;
4
- key: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
- states: import("@activepieces/pieces-framework").LongTextProperty<false>;
6
- limit: import("@activepieces/pieces-framework").NumberProperty<false>;
7
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
8
- productId: import("@activepieces/pieces-framework").NumberProperty<false>;
9
- key: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
- states: import("@activepieces/pieces-framework").LongTextProperty<false>;
11
- limit: import("@activepieces/pieces-framework").NumberProperty<false>;
12
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
13
- productId: import("@activepieces/pieces-framework").NumberProperty<false>;
14
- key: import("@activepieces/pieces-framework").ShortTextProperty<false>;
15
- states: import("@activepieces/pieces-framework").LongTextProperty<false>;
16
- limit: import("@activepieces/pieces-framework").NumberProperty<false>;
17
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
18
- productId: import("@activepieces/pieces-framework").NumberProperty<false>;
19
- key: import("@activepieces/pieces-framework").ShortTextProperty<false>;
20
- states: import("@activepieces/pieces-framework").LongTextProperty<false>;
21
- limit: import("@activepieces/pieces-framework").NumberProperty<false>;
22
- }>;
@@ -1,111 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newApiEvent = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const client_1 = require("../common/client");
8
- const auth_1 = require("../common/auth");
9
- const pieces_common_2 = require("@activepieces/pieces-common");
10
- const props = {
11
- productId: pieces_framework_1.Property.Number({
12
- displayName: 'Product ID',
13
- description: 'Filter events for a specific product (optional)',
14
- required: false,
15
- }),
16
- key: pieces_framework_1.Property.ShortText({
17
- displayName: 'License Key',
18
- description: 'Filter events for a specific license key (requires Product ID)',
19
- required: false,
20
- }),
21
- states: pieces_framework_1.Property.LongText({
22
- displayName: 'Event States',
23
- description: 'Filter by event states (comma-separated numbers). E.g., 1010 for validation, 2010 for activation, 3010 for key creation, 6010 for deactivation',
24
- required: false,
25
- }),
26
- limit: pieces_framework_1.Property.Number({
27
- displayName: 'Limit',
28
- description: 'Maximum number of events to fetch per poll (default 100, max 1000)',
29
- required: false,
30
- }),
31
- };
32
- const polling = {
33
- strategy: pieces_common_1.DedupeStrategy.TIMEBASED,
34
- items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ propsValue, auth, lastFetchEpochMS }) {
35
- const params = new URLSearchParams();
36
- if (propsValue.productId) {
37
- params.append('ProductId', String(propsValue.productId));
38
- }
39
- if (propsValue.key && propsValue.productId) {
40
- params.append('Key', propsValue.key);
41
- }
42
- if (propsValue.states) {
43
- params.append('States', propsValue.states);
44
- }
45
- const limit = propsValue.limit || 100;
46
- params.append('Limit', String(limit));
47
- // Add time filter to get events since last fetch
48
- if (lastFetchEpochMS) {
49
- const timeFilter = JSON.stringify({
50
- gte: Math.floor(lastFetchEpochMS / 1000),
51
- });
52
- params.append('Time', timeFilter);
53
- }
54
- else {
55
- // On first run, fetch events from the last hour to avoid missing recent events
56
- const oneHourAgo = Math.floor((Date.now() - 3600 * 1000) / 1000);
57
- const timeFilter = JSON.stringify({ gte: oneHourAgo });
58
- params.append('Time', timeFilter);
59
- }
60
- const response = yield (0, client_1.makeRequest)(auth.secret_text, pieces_common_2.HttpMethod.GET, `/ai/GetWebAPILog?${params.toString()}`);
61
- const responseBody = response;
62
- if (responseBody.result !== 0 || !responseBody.Events) {
63
- return [];
64
- }
65
- return responseBody.Events.map((log) => ({
66
- epochMilliSeconds: log.Created * 1000,
67
- data: log,
68
- }));
69
- }),
70
- };
71
- exports.newApiEvent = (0, pieces_framework_1.createTrigger)({
72
- auth: auth_1.cryptolensAuth,
73
- name: 'newApiEvent',
74
- displayName: 'New API Event',
75
- description: 'Trigger when a new API event is logged (activation, deactivation, key creation, etc.)',
76
- props,
77
- sampleData: {
78
- Id: 1,
79
- Created: 1426545812,
80
- ResourceType: 3,
81
- ResourceAction: 1,
82
- AffectedObjectId: 12345,
83
- ObjectOwnerUserId: 999,
84
- PerformedByUserId: 'user123',
85
- Data: '{"key": "value"}',
86
- },
87
- type: pieces_framework_1.TriggerStrategy.POLLING,
88
- test(context) {
89
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
90
- return yield pieces_common_1.pollingHelper.test(polling, context);
91
- });
92
- },
93
- onEnable(context) {
94
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
95
- const { store, auth, propsValue } = context;
96
- yield pieces_common_1.pollingHelper.onEnable(polling, { store, auth, propsValue });
97
- });
98
- },
99
- onDisable(context) {
100
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
101
- const { store, auth, propsValue } = context;
102
- yield pieces_common_1.pollingHelper.onDisable(polling, { store, auth, propsValue });
103
- });
104
- },
105
- run(context) {
106
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
107
- return yield pieces_common_1.pollingHelper.poll(polling, context);
108
- });
109
- },
110
- });
111
- //# sourceMappingURL=new-api-event.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-api-event.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/cryptolens/src/lib/triggers/new-api-event.ts"],"names":[],"mappings":"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"}