@activepieces/piece-deepgram 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/package.json +7 -16
  2. package/src/i18n/de.json +0 -92
  3. package/src/i18n/es.json +0 -92
  4. package/src/i18n/fr.json +0 -92
  5. package/src/i18n/ja.json +0 -92
  6. package/src/i18n/nl.json +0 -92
  7. package/src/i18n/pt.json +0 -92
  8. package/src/i18n/zh.json +0 -92
  9. package/src/index.js +13 -39
  10. package/src/actions/create-summary.d.ts +0 -7
  11. package/src/actions/create-summary.d.ts.map +0 -1
  12. package/src/actions/create-summary.js +0 -101
  13. package/src/actions/create-summary.js.map +0 -1
  14. package/src/actions/create-transcription.d.ts +0 -7
  15. package/src/actions/create-transcription.d.ts.map +0 -1
  16. package/src/actions/create-transcription.js +0 -96
  17. package/src/actions/create-transcription.js.map +0 -1
  18. package/src/actions/list-projects.d.ts +0 -2
  19. package/src/actions/list-projects.d.ts.map +0 -1
  20. package/src/actions/list-projects.js +0 -33
  21. package/src/actions/list-projects.js.map +0 -1
  22. package/src/actions/text-to-speech.d.ts +0 -6
  23. package/src/actions/text-to-speech.d.ts.map +0 -1
  24. package/src/actions/text-to-speech.js +0 -97
  25. package/src/actions/text-to-speech.js.map +0 -1
  26. package/src/common/auth.d.ts +0 -2
  27. package/src/common/auth.d.ts.map +0 -1
  28. package/src/common/auth.js +0 -28
  29. package/src/common/auth.js.map +0 -1
  30. package/src/common/constants.d.ts +0 -6
  31. package/src/common/constants.d.ts.map +0 -1
  32. package/src/common/constants.js +0 -63
  33. package/src/common/constants.js.map +0 -1
  34. package/src/common/models.d.ts +0 -16
  35. package/src/common/models.d.ts.map +0 -1
  36. package/src/common/models.js +0 -42
  37. package/src/common/models.js.map +0 -1
  38. package/src/index.d.ts +0 -2
  39. package/src/index.d.ts.map +0 -1
  40. package/src/index.js.map +0 -1
package/src/i18n/zh.json CHANGED
@@ -33,35 +33,6 @@
33
33
  "URL to receive the transcription when ready.": "URL to receive the transcription when ready.",
34
34
  "Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
35
35
  "Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
36
- "nova-3": "nova-3",
37
- "nova-3-general": "nova-3-general",
38
- "nova-3-medical": "nova-3-medical",
39
- "nova-2": "nova-2",
40
- "nova-2-general": "nova-2-general",
41
- "nova-2-meeting": "nova-2-meeting",
42
- "nova-2-finance": "nova-2-finance",
43
- "nova-2-conversationalai": "nova-2-conversationalai",
44
- "nova-2-voicemail": "nova-2-voicemail",
45
- "nova-2-video": "nova-2-video",
46
- "nova-2-medical": "nova-2-medical",
47
- "nova-2-drivethru": "nova-2-drivethru",
48
- "nova-2-automotive": "nova-2-automotive",
49
- "nova": "nova",
50
- "nova-general": "nova-general",
51
- "nova-phonecall": "nova-phonecall",
52
- "nova-medical": "nova-medical",
53
- "enhanced": "enhanced",
54
- "enhanced-general": "enhanced-general",
55
- "enhanced-meeting": "enhanced-meeting",
56
- "enhanced-phonecall": "enhanced-phonecall",
57
- "enhanced-finance": "enhanced-finance",
58
- "base": "base",
59
- "meeting": "meeting",
60
- "phonecall": "phonecall",
61
- "finance": "finance",
62
- "conversationalai": "conversationalai",
63
- "voicemail": "voicemail",
64
- "video": "video",
65
36
  "bg": "bg",
66
37
  "ca": "ca",
67
38
  "zh": "zh",
@@ -117,69 +88,6 @@
117
88
  "tr": "tr",
118
89
  "uk": "uk",
119
90
  "vi": "vi",
120
- "aura-asteria-en": "aura-asteria-en",
121
- "aura-luna-en": "aura-luna-en",
122
- "aura-stella-en": "aura-stella-en",
123
- "aura-athena-en": "aura-athena-en",
124
- "aura-hera-en": "aura-hera-en",
125
- "aura-orion-en": "aura-orion-en",
126
- "aura-arcas-en": "aura-arcas-en",
127
- "aura-perseus-en": "aura-perseus-en",
128
- "aura-angus-en": "aura-angus-en",
129
- "aura-orpheus-en": "aura-orpheus-en",
130
- "aura-helios-en": "aura-helios-en",
131
- "aura-zeus-en": "aura-zeus-en",
132
- "aura-2-amalthea-en": "aura-2-amalthea-en",
133
- "aura-2-andromeda-en": "aura-2-andromeda-en",
134
- "aura-2-apollo-en": "aura-2-apollo-en",
135
- "aura-2-arcas-en": "aura-2-arcas-en",
136
- "aura-2-aries-en": "aura-2-aries-en",
137
- "aura-2-asteria-en": "aura-2-asteria-en",
138
- "aura-2-athena-en": "aura-2-athena-en",
139
- "aura-2-atlas-en": "aura-2-atlas-en",
140
- "aura-2-aurora-en": "aura-2-aurora-en",
141
- "aura-2-callista-en": "aura-2-callista-en",
142
- "aura-2-cordelia-en": "aura-2-cordelia-en",
143
- "aura-2-cora-en": "aura-2-cora-en",
144
- "aura-2-delia-en": "aura-2-delia-en",
145
- "aura-2-draco-en": "aura-2-draco-en",
146
- "aura-2-electra-en": "aura-2-electra-en",
147
- "aura-2-harmonia-en": "aura-2-harmonia-en",
148
- "aura-2-helena-en": "aura-2-helena-en",
149
- "aura-2-hera-en": "aura-2-hera-en",
150
- "aura-2-hermes-en": "aura-2-hermes-en",
151
- "aura-2-hyperion-en": "aura-2-hyperion-en",
152
- "aura-2-iris-en": "aura-2-iris-en",
153
- "aura-2-janus-en": "aura-2-janus-en",
154
- "aura-2-juno-en": "aura-2-juno-en",
155
- "aura-2-jupiter-en": "aura-2-jupiter-en",
156
- "aura-2-luna-en": "aura-2-luna-en",
157
- "aura-2-mars-en": "aura-2-mars-en",
158
- "aura-2-minerva-en": "aura-2-minerva-en",
159
- "aura-2-neptune-en": "aura-2-neptune-en",
160
- "aura-2-odysseus-en": "aura-2-odysseus-en",
161
- "aura-2-ophelia-en": "aura-2-ophelia-en",
162
- "aura-2-orion-en": "aura-2-orion-en",
163
- "aura-2-orpheus-en": "aura-2-orpheus-en",
164
- "aura-2-pandora-en": "aura-2-pandora-en",
165
- "aura-2-phoebe-en": "aura-2-phoebe-en",
166
- "aura-2-pluto-en": "aura-2-pluto-en",
167
- "aura-2-saturn-en": "aura-2-saturn-en",
168
- "aura-2-selene-en": "aura-2-selene-en",
169
- "aura-2-thalia-en": "aura-2-thalia-en",
170
- "aura-2-theia-en": "aura-2-theia-en",
171
- "aura-2-vesta-en": "aura-2-vesta-en",
172
- "aura-2-zeus-en": "aura-2-zeus-en",
173
- "aura-2-sirio-es": "aura-2-sirio-es",
174
- "aura-2-nestor-es": "aura-2-nestor-es",
175
- "aura-2-carina-es": "aura-2-carina-es",
176
- "aura-2-celeste-es": "aura-2-celeste-es",
177
- "aura-2-alvaro-es": "aura-2-alvaro-es",
178
- "aura-2-diana-es": "aura-2-diana-es",
179
- "aura-2-aquila-es": "aura-2-aquila-es",
180
- "aura-2-selena-es": "aura-2-selena-es",
181
- "aura-2-estrella-es": "aura-2-estrella-es",
182
- "aura-2-javier-es": "aura-2-javier-es",
183
91
  "linear16": "linear16",
184
92
  "flac": "flac",
185
93
  "mulaw": "mulaw",
package/src/index.js CHANGED
@@ -1,39 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deepgramPiece = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const auth_1 = require("./common/auth");
7
- const create_summary_1 = require("./actions/create-summary");
8
- const create_transcription_1 = require("./actions/create-transcription");
9
- const list_projects_1 = require("./actions/list-projects");
10
- const text_to_speech_1 = require("./actions/text-to-speech");
11
- const shared_1 = require("@activepieces/shared");
12
- const pieces_common_1 = require("@activepieces/pieces-common");
13
- const constants_1 = require("./common/constants");
14
- exports.deepgramPiece = (0, pieces_framework_1.createPiece)({
15
- displayName: 'Deepgram',
16
- logoUrl: 'https://cdn.activepieces.com/pieces/deepgram.png',
17
- description: 'Deepgram is an AI-powered speech recognition platform that provides real-time transcription, text-to-speech, and audio analysis capabilities.',
18
- categories: [shared_1.PieceCategory.ARTIFICIAL_INTELLIGENCE],
19
- minimumSupportedRelease: '0.30.0',
20
- authors: ['Ani-4x', 'kishanprmr'],
21
- auth: auth_1.deepgramAuth,
22
- actions: [
23
- create_summary_1.createSummaryAction,
24
- create_transcription_1.createTranscriptionCallbackAction,
25
- list_projects_1.listProjectsAction,
26
- text_to_speech_1.textToSpeechAction,
27
- (0, pieces_common_1.createCustomApiCallAction)({
28
- auth: auth_1.deepgramAuth,
29
- baseUrl: () => constants_1.BASE_URL,
30
- authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
31
- return {
32
- Authorization: `Token ${auth.secret_text}`,
33
- };
34
- }),
35
- }),
36
- ],
37
- triggers: [],
38
- });
39
- //# sourceMappingURL=index.js.map
1
+ "use strict";var Fs=Object.create;var Xe=Object.defineProperty;var Bs=Object.getOwnPropertyDescriptor;var Zs=Object.getOwnPropertyNames;var Vs=Object.getPrototypeOf,Hs=Object.prototype.hasOwnProperty;var o=(e,t)=>Xe(e,"name",{value:t,configurable:!0});var T=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mn=(e,t)=>{for(var r in t)Xe(e,r,{get:t[r],enumerable:!0})},fn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Zs(t))!Hs.call(e,i)&&i!==r&&Xe(e,i,{get:()=>t[i],enumerable:!(n=Bs(t,i))||n.enumerable});return e};var Pe=(e,t,r)=>(r=e!=null?Fs(Vs(e)):{},fn(t||!e||!e.__esModule?Xe(r,"default",{value:e,enumerable:!0}):r,e)),Ws=e=>fn(Xe({},"__esModule",{value:!0}),e);var wo=T((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]+::?)+",d={zoneIndex:new RegExp(u,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${u})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${u})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${t}\\.${t}\\.${t}\\.${t}(${u})?$`,"i")};function y(s,p){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let f=0,m=-1,v=(s.match(d.zoneIndex)||[])[0],P,M;for(v&&(v=v.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)f++;if(s.substr(0,2)==="::"&&f--,s.substr(-2,2)==="::"&&f--,f>p)return null;for(M=p-f,P=":";M--;)P+="0:";return s=s.replace("::",P),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),p=function(){let re=s.split(":"),ae=[];for(let Je=0;Je<re.length;Je++)ae.push(parseInt(re[Je],16));return ae}(),{parts:p,zoneId:v}}o(y,"expandIPv6");function h(s,p,f,m){if(s.length!==p.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let v=0,P;for(;m>0;){if(P=f-m,P<0&&(P=0),s[v]>>P!==p[v]>>P)return!1;m-=f,v+=1}return!0}o(h,"matchCIDR");function _(s){if(i.test(s))return parseInt(s,16);if(s[0]==="0"&&!isNaN(parseInt(s[1],10))){if(n.test(s))return parseInt(s,8);throw new Error(`ipaddr: cannot parse ${s} as octal`)}return parseInt(s,10)}o(_,"parseIntAuto");function E(s,p){for(;s.length<p;)s=`0${s}`;return s}o(E,"padPart");let x={};x.IPv4=function(){function s(p){if(p.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let f,m;for(f=0;f<p.length;f++)if(m=p[f],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=p}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(p,f){let m;if(f===void 0&&(m=p,p=m[0],f=m[1]),p.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return h(this.octets,p.octets,8,f)},s.prototype.prefixLengthFromSubnetMask=function(){let p=0,f=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,P,M;for(v=3;v>=0;v-=1)if(P=this.octets[v],P in m){if(M=m[P],f&&M!==0)return null;M!==8&&(f=!0),p+=M}else return null;return 32-p},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){return this.octets.slice(0)},s.prototype.toIPv4MappedAddress=function(){return x.IPv6.parse(`::ffff:${this.toString()}`)},s.prototype.toNormalizedString=function(){return this.toString()},s.prototype.toString=function(){return this.octets.join(".")},s}(),x.IPv4.broadcastAddressFromCIDR=function(s){try{let p=this.parseCIDR(s),f=p[0].toByteArray(),m=this.subnetMaskFromPrefixLength(p[1]).toByteArray(),v=[],P=0;for(;P<4;)v.push(parseInt(f[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.isIPv4=function(s){return this.parser(s)!==null},x.IPv4.isValid=function(s){try{return new this(this.parser(s)),!0}catch{return!1}},x.IPv4.isValidCIDR=function(s){try{return this.parseCIDR(s),!0}catch{return!1}},x.IPv4.isValidFourPartDecimal=function(s){return!!(x.IPv4.isValid(s)&&s.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},x.IPv4.isValidCIDRFourPartDecimal=function(s){let p=s.match(/^(.+)\/(\d+)$/);return!x.IPv4.isValidCIDR(s)||!p?!1:x.IPv4.isValidFourPartDecimal(p[1])},x.IPv4.networkAddressFromCIDR=function(s){let p,f,m,v,P;try{for(p=this.parseCIDR(s),m=p[0].toByteArray(),P=this.subnetMaskFromPrefixLength(p[1]).toByteArray(),v=[],f=0;f<4;)v.push(parseInt(m[f],10)&parseInt(P[f],10)),f++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.parse=function(s){let p=this.parser(s);if(p===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(p)},x.IPv4.parseCIDR=function(s){let p;if(p=s.match(/^(.+)\/(\d+)$/)){let f=parseInt(p[2]);if(f>=0&&f<=32){let m=[this.parse(p[1]),f];return Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},x.IPv4.parser=function(s){let p,f,m;if(p=s.match(r.fourOctet))return function(){let v=p.slice(1,6),P=[];for(let M=0;M<v.length;M++)f=v[M],P.push(_(f));return P}();if(p=s.match(r.longValue)){if(m=_(p[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return function(){let v=[],P;for(P=0;P<=24;P+=8)v.push(m>>P&255);return v}().reverse()}else return(p=s.match(r.twoOctet))?function(){let v=p.slice(1,4),P=[];if(m=_(v[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return P.push(_(v[0])),P.push(m>>16&255),P.push(m>>8&255),P.push(m&255),P}():(p=s.match(r.threeOctet))?function(){let v=p.slice(1,5),P=[];if(m=_(v[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return P.push(_(v[0])),P.push(_(v[1])),P.push(m>>8&255),P.push(m&255),P}():null},x.IPv4.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>32)throw new Error("ipaddr: invalid IPv4 prefix length");let p=[0,0,0,0],f=0,m=Math.floor(s/8);for(;f<m;)p[f]=255,f++;return m<4&&(p[m]=Math.pow(2,s%8)-1<<8-s%8),new this(p)},x.IPv6=function(){function s(p,f){let m,v;if(p.length===16)for(this.parts=[],m=0;m<=14;m+=2)this.parts.push(p[m]<<8|p[m+1]);else if(p.length===8)this.parts=p;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(m=0;m<this.parts.length;m++)if(v=this.parts[m],!(0<=v&&v<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");f&&(this.zoneId=f)}return o(s,"IPv6"),s.prototype.SpecialRanges={unspecified:[new s([0,0,0,0,0,0,0,0]),128],linkLocal:[new s([65152,0,0,0,0,0,0,0]),10],multicast:[new s([65280,0,0,0,0,0,0,0]),8],loopback:[new s([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new s([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new s([0,0,0,0,0,65535,0,0]),96],discard:[new s([256,0,0,0,0,0,0,0]),64],rfc6145:[new s([0,0,0,0,65535,0,0,0]),96],rfc6052:[new s([100,65435,0,0,0,0,0,0]),96],"6to4":[new s([8194,0,0,0,0,0,0,0]),16],teredo:[new s([8193,0,0,0,0,0,0,0]),32],benchmarking:[new s([8193,2,0,0,0,0,0,0]),48],amt:[new s([8193,3,0,0,0,0,0,0]),32],as112v6:[[new s([8193,4,274,0,0,0,0,0]),48],[new s([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new s([8193,16,0,0,0,0,0,0]),28],orchid2:[new s([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new s([8193,48,0,0,0,0,0,0]),28],reserved:[[new s([8193,0,0,0,0,0,0,0]),23],[new s([8193,3512,0,0,0,0,0,0]),32]]},s.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},s.prototype.kind=function(){return"ipv6"},s.prototype.match=function(p,f){let m;if(f===void 0&&(m=p,p=m[0],f=m[1]),p.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return h(this.parts,p.parts,16,f)},s.prototype.prefixLengthFromSubnetMask=function(){let p=0,f=!1,m={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},v,P;for(let M=7;M>=0;M-=1)if(v=this.parts[M],v in m){if(P=m[v],f&&P!==0)return null;P!==16&&(f=!0),p+=P}else return null;return 128-p},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let p,f=[],m=this.parts;for(let v=0;v<m.length;v++)p=m[v],f.push(p>>8),f.push(p&255);return f},s.prototype.toFixedLengthString=function(){let p=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(E(this.parts[v].toString(16),4));return m}.call(this).join(":"),f="";return this.zoneId&&(f=`%${this.zoneId}`),p+f},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let p=this.parts.slice(-2),f=p[0],m=p[1];return new x.IPv4([f>>8,f&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let p=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(this.parts[v].toString(16));return m}.call(this).join(":"),f="";return this.zoneId&&(f=`%${this.zoneId}`),p+f},s.prototype.toRFC5952String=function(){let p=/((^|:)(0(:|$)){2,})/g,f=this.toNormalizedString(),m=0,v=-1,P;for(;P=p.exec(f);)P[0].length>v&&(m=P.index,v=P[0].length);return v<0?f:`${f.substring(0,m)}::${f.substring(m+v)}`},s.prototype.toString=function(){return this.toRFC5952String()},s}(),x.IPv6.broadcastAddressFromCIDR=function(s){try{let p=this.parseCIDR(s),f=p[0].toByteArray(),m=this.subnetMaskFromPrefixLength(p[1]).toByteArray(),v=[],P=0;for(;P<16;)v.push(parseInt(f[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch(p){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${p})`)}},x.IPv6.isIPv6=function(s){return this.parser(s)!==null},x.IPv6.isValid=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{let p=this.parser(s);return new this(p.parts,p.zoneId),!0}catch{return!1}},x.IPv6.isValidCIDR=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{return this.parseCIDR(s),!0}catch{return!1}},x.IPv6.networkAddressFromCIDR=function(s){let p,f,m,v,P;try{for(p=this.parseCIDR(s),m=p[0].toByteArray(),P=this.subnetMaskFromPrefixLength(p[1]).toByteArray(),v=[],f=0;f<16;)v.push(parseInt(m[f],10)&parseInt(P[f],10)),f++;return new this(v)}catch(M){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${M})`)}},x.IPv6.parse=function(s){let p=this.parser(s);if(p.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(p.parts,p.zoneId)},x.IPv6.parseCIDR=function(s){let p,f,m;if((f=s.match(/^(.+)\/(\d+)$/))&&(p=parseInt(f[2]),p>=0&&p<=128))return m=[this.parse(f[1]),p],Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},x.IPv6.parser=function(s){let p,f,m,v,P,M;if(m=s.match(d.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(d.native.test(s))return y(s,8);if((m=s.match(d.transitional))&&(M=m[6]||"",p=m[1],m[1].endsWith("::")||(p=p.slice(0,-1)),p=y(p+M,6),p.parts)){for(P=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],f=0;f<P.length;f++)if(v=P[f],!(0<=v&&v<=255))return null;return p.parts.push(P[0]<<8|P[1]),p.parts.push(P[2]<<8|P[3]),{parts:p.parts,zoneId:p.zoneId}}return null},x.IPv6.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>128)throw new Error("ipaddr: invalid IPv6 prefix length");let p=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f=0,m=Math.floor(s/8);for(;f<m;)p[f]=255,f++;return m<16&&(p[m]=Math.pow(2,s%8)-1<<8-s%8),new this(p)},x.fromByteArray=function(s){let p=s.length;if(p===4)return new x.IPv4(s);if(p===16)return new x.IPv6(s);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},x.isValid=function(s){return x.IPv6.isValid(s)||x.IPv4.isValid(s)},x.isValidCIDR=function(s){return x.IPv6.isValidCIDR(s)||x.IPv4.isValidCIDR(s)},x.parse=function(s){if(x.IPv6.isValid(s))return x.IPv6.parse(s);if(x.IPv4.isValid(s))return x.IPv4.parse(s);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},x.parseCIDR=function(s){try{return x.IPv6.parseCIDR(s)}catch{try{return x.IPv4.parseCIDR(s)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},x.process=function(s){let p=this.parse(s);return p.kind()==="ipv6"&&p.isIPv4MappedAddress()?p.toIPv4Address():p},x.subnetMatch=function(s,p,f){let m,v,P,M;f==null&&(f="unicast");for(v in p)if(Object.prototype.hasOwnProperty.call(p,v)){for(P=p[v],P[0]&&!(P[0]instanceof Array)&&(P=[P]),m=0;m<P.length;m++)if(M=P[m],s.kind()===M[0].kind()&&s.match.apply(s,M))return v}return f},typeof Lt<"u"&&Lt.exports?Lt.exports=x:e.ipaddr=x})(Oo)});var Ai=T((qS,Si)=>{var $i=require("stream").Stream,Pl=require("util");Si.exports=ue;function ue(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(ue,"DelayedStream");Pl.inherits(ue,$i);ue.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(ue.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});ue.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};ue.prototype.resume=function(){this._released||this.release(),this.source.resume()};ue.prototype.pause=function(){this.source.pause()};ue.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};ue.prototype.pipe=function(){var e=$i.prototype.pipe.apply(this,arguments);return this.resume(),e};ue.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)};ue.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 wi=T((JS,Oi)=>{var bl=require("util"),ki=require("stream").Stream,zi=Ai();Oi.exports=G;function G(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}o(G,"CombinedStream");bl.inherits(G,ki);G.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};G.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};G.prototype.append=function(e){var t=G.isStreamLike(e);if(t){if(!(e instanceof zi)){var r=zi.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};G.prototype.pipe=function(e,t){return ki.prototype.pipe.call(this,e,t),this.resume(),e};G.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};G.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=G.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};G.prototype._pipeNext=function(e){this._currentStream=e;var t=G.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};G.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};G.prototype.write=function(e){this.emit("data",e)};G.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};G.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};G.prototype.end=function(){this._reset(),this.emit("end")};G.prototype.destroy=function(){this._reset(),this.emit("close")};G.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};G.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};G.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};G.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Ni=T((YS,Ri)=>{"use strict";Ri.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 Gt=T(Q=>{"use strict";var Wt=Ni(),Il=require("path").extname,Di=/^\s*([^;\s]*)(?:;|\s|$)/,Tl=/^text\//i;Q.charset=Ci;Q.charsets={lookup:Ci};Q.contentType=El;Q.extension=$l;Q.extensions=Object.create(null);Q.lookup=Sl;Q.types=Object.create(null);Al(Q.extensions,Q.types);function Ci(e){if(!e||typeof e!="string")return!1;var t=Di.exec(e),r=t&&Wt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Tl.test(t[1])?"UTF-8":!1}o(Ci,"charset");function El(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(El,"contentType");function $l(e){if(!e||typeof e!="string")return!1;var t=Di.exec(e),r=t&&Q.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o($l,"extension");function Sl(e){if(!e||typeof e!="string")return!1;var t=Il("x."+e).toLowerCase().substr(1);return t&&Q.types[t]||!1}o(Sl,"lookup");function Al(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Wt).forEach(o(function(i){var u=Wt[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var d=0;d<c.length;d++){var y=c[d];if(t[y]){var h=r.indexOf(Wt[t[y]].source),_=r.indexOf(u.source);if(t[y]!=="application/octet-stream"&&(h>_||h===_&&t[y].substr(0,12)==="application/"))continue}t[y]=i}}},"forEachMimeType"))}o(Al,"populateMaps")});var Mi=T((tA,Ui)=>{Ui.exports=zl;function zl(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(zl,"defer")});var Zr=T((nA,Li)=>{var ji=Mi();Li.exports=kl;function kl(e){var t=!1;return ji(function(){t=!0}),o(function(n,i){t?e(n,i):ji(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(kl,"async")});var Vr=T((iA,Fi)=>{Fi.exports=Ol;function Ol(e){Object.keys(e.jobs).forEach(wl.bind(e)),e.jobs={}}o(Ol,"abort");function wl(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(wl,"clean")});var Hr=T((sA,Zi)=>{var Bi=Zr(),Rl=Vr();Zi.exports=Nl;function Nl(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=Dl(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?Rl(r):r.results[i]=c,n(u,r.results))})}o(Nl,"iterate");function Dl(e,t,r,n){var i;return e.length==2?i=e(r,Bi(n)):i=e(r,t,Bi(n)),i}o(Dl,"runJob")});var Wr=T((cA,Vi)=>{Vi.exports=Cl;function Cl(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(Cl,"state")});var Gr=T((pA,Hi)=>{var Ul=Vr(),Ml=Zr();Hi.exports=jl;function jl(e){Object.keys(this.jobs).length&&(this.index=this.size,Ul(this),Ml(e)(null,this.results))}o(jl,"terminator")});var Gi=T((mA,Wi)=>{var Ll=Hr(),Fl=Wr(),Bl=Gr();Wi.exports=Zl;function Zl(e,t,r){for(var n=Fl(e);n.index<(n.keyedList||e).length;)Ll(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 Bl.bind(n,r)}o(Zl,"parallel")});var qr=T((gA,qt)=>{var qi=Hr(),Vl=Wr(),Hl=Gr();qt.exports=Wl;qt.exports.ascending=Ki;qt.exports.descending=Gl;function Wl(e,t,r,n){var i=Vl(e,r);return qi(e,t,i,o(function u(c,d){if(c){n(c,d);return}if(i.index++,i.index<(i.keyedList||e).length){qi(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),Hl.bind(i,n)}o(Wl,"serialOrdered");function Ki(e,t){return e<t?-1:e>t?1:0}o(Ki,"ascending");function Gl(e,t){return-1*Ki(e,t)}o(Gl,"descending")});var Xi=T((hA,Ji)=>{var ql=qr();Ji.exports=Kl;function Kl(e,t,r){return ql(e,t,null,r)}o(Kl,"serial")});var Qi=T((xA,Yi)=>{Yi.exports={parallel:Gi(),serial:Xi(),serialOrdered:qr()}});var Kr=T((_A,ea)=>{"use strict";ea.exports=Object});var ra=T((PA,ta)=>{"use strict";ta.exports=Error});var oa=T((bA,na)=>{"use strict";na.exports=EvalError});var aa=T((IA,ia)=>{"use strict";ia.exports=RangeError});var ua=T((TA,sa)=>{"use strict";sa.exports=ReferenceError});var la=T((EA,ca)=>{"use strict";ca.exports=SyntaxError});var Kt=T(($A,pa)=>{"use strict";pa.exports=TypeError});var ma=T((SA,da)=>{"use strict";da.exports=URIError});var ga=T((AA,fa)=>{"use strict";fa.exports=Math.abs});var ha=T((zA,ya)=>{"use strict";ya.exports=Math.floor});var xa=T((kA,va)=>{"use strict";va.exports=Math.max});var Pa=T((OA,_a)=>{"use strict";_a.exports=Math.min});var Ia=T((wA,ba)=>{"use strict";ba.exports=Math.pow});var Ea=T((RA,Ta)=>{"use strict";Ta.exports=Math.round});var Sa=T((NA,$a)=>{"use strict";$a.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var za=T((CA,Aa)=>{"use strict";var Jl=Sa();Aa.exports=o(function(t){return Jl(t)||t===0?t:t<0?-1:1},"sign")});var Oa=T((MA,ka)=>{"use strict";ka.exports=Object.getOwnPropertyDescriptor});var Jr=T((jA,wa)=>{"use strict";var Jt=Oa();if(Jt)try{Jt([],"length")}catch{Jt=null}wa.exports=Jt});var Na=T((LA,Ra)=>{"use strict";var Xt=Object.defineProperty||!1;if(Xt)try{Xt({},"a",{value:1})}catch{Xt=!1}Ra.exports=Xt});var Xr=T((FA,Da)=>{"use strict";Da.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var u in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var c=Object.getOwnPropertySymbols(t);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var d=Object.getOwnPropertyDescriptor(t,r);if(d.value!==i||d.enumerable!==!0)return!1}return!0},"hasSymbols")});var Ma=T((ZA,Ua)=>{"use strict";var Ca=typeof Symbol<"u"&&Symbol,Xl=Xr();Ua.exports=o(function(){return typeof Ca!="function"||typeof Symbol!="function"||typeof Ca("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Xl()},"hasNativeSymbols")});var Yr=T((HA,ja)=>{"use strict";ja.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Qr=T((WA,La)=>{"use strict";var Yl=Kr();La.exports=Yl.getPrototypeOf||null});var Za=T((GA,Ba)=>{"use strict";var Ql="Function.prototype.bind called on incompatible ",ep=Object.prototype.toString,tp=Math.max,rp="[object Function]",Fa=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"),np=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"),op=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");Ba.exports=o(function(t){var r=this;if(typeof r!="function"||ep.apply(r)!==rp)throw new TypeError(Ql+r);for(var n=np(arguments,1),i,u=o(function(){if(this instanceof i){var _=r.apply(this,Fa(n,arguments));return Object(_)===_?_:this}return r.apply(t,Fa(n,arguments))},"binder"),c=tp(0,r.length-n.length),d=[],y=0;y<c;y++)d[y]="$"+y;if(i=Function("binder","return function ("+op(d,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var h=o(function(){},"Empty");h.prototype=r.prototype,i.prototype=new h,h.prototype=null}return i},"bind")});var Ve=T((KA,Va)=>{"use strict";var ip=Za();Va.exports=Function.prototype.bind||ip});var Yt=T((JA,Ha)=>{"use strict";Ha.exports=Function.prototype.call});var en=T((XA,Wa)=>{"use strict";Wa.exports=Function.prototype.apply});var qa=T((YA,Ga)=>{"use strict";Ga.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Ja=T((QA,Ka)=>{"use strict";var ap=Ve(),sp=en(),up=Yt(),cp=qa();Ka.exports=cp||ap.call(up,sp)});var Ya=T((ez,Xa)=>{"use strict";var lp=Ve(),pp=Kt(),dp=Yt(),mp=Ja();Xa.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new pp("a function is required");return mp(lp,dp,t)},"callBindBasic")});var os=T((rz,ns)=>{"use strict";var fp=Ya(),Qa=Jr(),ts;try{ts=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var tn=!!ts&&Qa&&Qa(Object.prototype,"__proto__"),rs=Object,es=rs.getPrototypeOf;ns.exports=tn&&typeof tn.get=="function"?fp([tn.get]):typeof es=="function"?o(function(t){return es(t==null?t:rs(t))},"getDunder"):!1});var cs=T((oz,us)=>{"use strict";var is=Yr(),as=Qr(),ss=os();us.exports=is?o(function(t){return is(t)},"getProto"):as?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return as(t)},"getProto"):ss?o(function(t){return ss(t)},"getProto"):null});var rn=T((az,ls)=>{"use strict";var gp=Function.prototype.call,yp=Object.prototype.hasOwnProperty,hp=Ve();ls.exports=hp.call(gp,yp)});var hs=T((sz,ys)=>{"use strict";var U,vp=Kr(),xp=ra(),_p=oa(),Pp=aa(),bp=ua(),qe=la(),Ge=Kt(),Ip=ma(),Tp=ga(),Ep=ha(),$p=xa(),Sp=Pa(),Ap=Ia(),zp=Ea(),kp=za(),fs=Function,nn=o(function(e){try{return fs('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),vt=Jr(),Op=Na(),on=o(function(){throw new Ge},"throwTypeError"),wp=vt?function(){try{return arguments.callee,on}catch{try{return vt(arguments,"callee").get}catch{return on}}}():on,He=Ma()(),J=cs(),Rp=Qr(),Np=Yr(),gs=en(),xt=Yt(),We={},Dp=typeof Uint8Array>"u"||!J?U:J(Uint8Array),Ne={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?U:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?U:ArrayBuffer,"%ArrayIteratorPrototype%":He&&J?J([][Symbol.iterator]()):U,"%AsyncFromSyncIteratorPrototype%":U,"%AsyncFunction%":We,"%AsyncGenerator%":We,"%AsyncGeneratorFunction%":We,"%AsyncIteratorPrototype%":We,"%Atomics%":typeof Atomics>"u"?U:Atomics,"%BigInt%":typeof BigInt>"u"?U:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?U:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?U:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?U:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":xp,"%eval%":eval,"%EvalError%":_p,"%Float16Array%":typeof Float16Array>"u"?U:Float16Array,"%Float32Array%":typeof Float32Array>"u"?U:Float32Array,"%Float64Array%":typeof Float64Array>"u"?U:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?U:FinalizationRegistry,"%Function%":fs,"%GeneratorFunction%":We,"%Int8Array%":typeof Int8Array>"u"?U:Int8Array,"%Int16Array%":typeof Int16Array>"u"?U:Int16Array,"%Int32Array%":typeof Int32Array>"u"?U:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":He&&J?J(J([][Symbol.iterator]())):U,"%JSON%":typeof JSON=="object"?JSON:U,"%Map%":typeof Map>"u"?U:Map,"%MapIteratorPrototype%":typeof Map>"u"||!He||!J?U:J(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":vp,"%Object.getOwnPropertyDescriptor%":vt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?U:Promise,"%Proxy%":typeof Proxy>"u"?U:Proxy,"%RangeError%":Pp,"%ReferenceError%":bp,"%Reflect%":typeof Reflect>"u"?U:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?U:Set,"%SetIteratorPrototype%":typeof Set>"u"||!He||!J?U:J(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?U:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":He&&J?J(""[Symbol.iterator]()):U,"%Symbol%":He?Symbol:U,"%SyntaxError%":qe,"%ThrowTypeError%":wp,"%TypedArray%":Dp,"%TypeError%":Ge,"%Uint8Array%":typeof Uint8Array>"u"?U:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?U:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?U:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?U:Uint32Array,"%URIError%":Ip,"%WeakMap%":typeof WeakMap>"u"?U:WeakMap,"%WeakRef%":typeof WeakRef>"u"?U:WeakRef,"%WeakSet%":typeof WeakSet>"u"?U:WeakSet,"%Function.prototype.call%":xt,"%Function.prototype.apply%":gs,"%Object.defineProperty%":Op,"%Object.getPrototypeOf%":Rp,"%Math.abs%":Tp,"%Math.floor%":Ep,"%Math.max%":$p,"%Math.min%":Sp,"%Math.pow%":Ap,"%Math.round%":zp,"%Math.sign%":kp,"%Reflect.getPrototypeOf%":Np};if(J)try{null.error}catch(e){ps=J(J(e)),Ne["%Error.prototype%"]=ps}var ps,Cp=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 Ne[t]=r,r},"doEval"),ds={__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"]},_t=Ve(),Qt=rn(),Up=_t.call(xt,Array.prototype.concat),Mp=_t.call(gs,Array.prototype.splice),ms=_t.call(xt,String.prototype.replace),er=_t.call(xt,String.prototype.slice),jp=_t.call(xt,RegExp.prototype.exec),Lp=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Fp=/\\(\\)?/g,Bp=o(function(t){var r=er(t,0,1),n=er(t,-1);if(r==="%"&&n!=="%")throw new qe("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new qe("invalid intrinsic syntax, expected opening `%`");var i=[];return ms(t,Lp,function(u,c,d,y){i[i.length]=d?ms(y,Fp,"$1"):c||u}),i},"stringToPath"),Zp=o(function(t,r){var n=t,i;if(Qt(ds,n)&&(i=ds[n],n="%"+i[0]+"%"),Qt(Ne,n)){var u=Ne[n];if(u===We&&(u=Cp(n)),typeof u>"u"&&!r)throw new Ge("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new qe("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");ys.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new Ge("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ge('"allowMissing" argument must be a boolean');if(jp(/^%?[^%]*%?$/,t)===null)throw new qe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Bp(t),i=n.length>0?n[0]:"",u=Zp("%"+i+"%",r),c=u.name,d=u.value,y=!1,h=u.alias;h&&(i=h[0],Mp(n,Up([0,1],h)));for(var _=1,E=!0;_<n.length;_+=1){var x=n[_],s=er(x,0,1),p=er(x,-1);if((s==='"'||s==="'"||s==="`"||p==='"'||p==="'"||p==="`")&&s!==p)throw new qe("property names with quotes must have matching quotes");if((x==="constructor"||!E)&&(y=!0),i+="."+x,c="%"+i+"%",Qt(Ne,c))d=Ne[c];else if(d!=null){if(!(x in d)){if(!r)throw new Ge("base intrinsic for "+t+" exists, but the property is not available.");return}if(vt&&_+1>=n.length){var f=vt(d,x);E=!!f,E&&"get"in f&&!("originalValue"in f.get)?d=f.get:d=d[x]}else E=Qt(d,x),d=d[x];E&&!y&&(Ne[c]=d)}}return d},"GetIntrinsic")});var xs=T((cz,vs)=>{"use strict";var Vp=Xr();vs.exports=o(function(){return Vp()&&!!Symbol.toStringTag},"hasToStringTagShams")});var bs=T((pz,Ps)=>{"use strict";var Hp=hs(),_s=Hp("%Object.defineProperty%",!0),Wp=xs()(),Gp=rn(),qp=Kt(),tr=Wp?Symbol.toStringTag:null;Ps.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 qp("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");tr&&(n||!Gp(t,tr))&&(_s?_s(t,tr,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[tr]=r)},"setToStringTag")});var Ts=T((mz,Is)=>{"use strict";var Kp=Function.prototype.call,Jp=Object.prototype.hasOwnProperty,Xp=Ve();Is.exports=Xp.call(Kp,Jp)});var $s=T((fz,Es)=>{"use strict";Es.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var zs=T((gz,As)=>{"use strict";var cn=wi(),Yp=require("util"),an=require("path"),Qp=require("http"),ed=require("https"),td=require("url").parse,rd=require("fs"),nd=require("stream").Stream,od=require("crypto"),sn=Gt(),id=Qi(),ad=bs(),Ae=Ts(),un=$s();function Ss(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(Ss,"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");Yp.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&&Ae(t,"httpVersion"))&&!(t instanceof nd))&&(r.knownLength||this._valuesToMeasure.push(t))};L.prototype._lengthRetriever=function(e,t){Ae(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):rd.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):Ae(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Ae(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="'+Ss(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&un(c,r.header);var d;for(var y in c)if(Ae(c,y)){if(d=c[y],d==null)continue;Array.isArray(d)||(d=[d]),d.length&&(u+=y+": "+d.join("; ")+L.LINE_BREAK)}return"--"+this.getBoundary()+L.LINE_BREAK+u+L.LINE_BREAK};L.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=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&&Ae(e,"httpVersion")&&(r=an.basename(e.client._httpMessage.path||"")),r)return'filename="'+Ss(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&&Ae(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)Ae(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="--------------------------"+od.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}id.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=td(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=ed.request(n):r=Qp.request(n),this.getLength(function(u,c){if(u&&u!=="Unknown stream"){this._error(u);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),t){var d,y=o(function(h,_){return r.removeListener("error",y),r.removeListener("response",d),t.call(this,h,_)},"callback");d=y.bind(this,null),r.on("error",y),r.on("response",d)}}.bind(this)),r};L.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};L.prototype.toString=function(){return"[object FormData]"};ad(L.prototype,"FormData");As.exports=L});var hd={};mn(hd,{deepgramPiece:()=>yd});module.exports=Ws(hd);var Gs=Object.freeze({status:"aborted"});function b(e,t,r){function n(d,y){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:y,constr:c,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),t(d,y);let h=c.prototype,_=Object.keys(h);for(let E=0;E<_.length;E++){let x=_[E];x in d||(d[x]=h[x].bind(d))}}o(n,"init");let i=r?.Parent??Object;class u extends i{static{o(this,"Definition")}}Object.defineProperty(u,"name",{value:e});function c(d){var y;let h=r?.Parent?new u:this;n(h,d),(y=h._zod).deferred??(y.deferred=[]);for(let _ of h._zod.deferred)_();return h}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(d=>r?.Parent&&d instanceof r.Parent?!0:d?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}o(b,"$constructor");var qs=Symbol("zod_brand"),ce=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 me(e){return e&&Object.assign(or,e),or}o(me,"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 q(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(q,"defineLazy");var sr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ye(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(Ye,"isObject");var Ks=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(Ye(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Ye(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(vn,"isPlainObject");var xn=new Set(["string","number","symbol"]);function De(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(De,"escapeRegex");function $t(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o($t,"clone");function V(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:o(()=>t.error,"error")}:t}o(V,"normalizeParams");function _n(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(_n,"optionalKeys");var Js={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Ce(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}o(Ce,"aborted");function be(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(be,"prefixIssues");function It(e){return typeof e=="string"?e:e?.message}o(It,"unwrapMessage");function Ie(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=It(e.inst?._zod.def?.error?.(e))??It(t?.error?.(e))??It(r.customError?.(e))??It(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(Ie,"finalizeIssue");function Pn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(Pn,"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=b("$ZodError",bn),Qe=b("$ZodError",bn,{Parent:Error});var Ys=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 ce;if(c.issues.length){let d=new(i?.Err??e)(c.issues.map(y=>Ie(y,u,me())));throw sr(d,i?.callee),d}return c.value},"_parse"),St=Ys(Qe),Qs=o(e=>async(t,r,n,i)=>{let u=n?Object.assign(n,{async:!0}):{async:!0},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){let d=new(i?.Err??e)(c.issues.map(y=>Ie(y,u,me())));throw sr(d,i?.callee),d}return c.value},"_parseAsync"),At=Qs(Qe),eu=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 ce;return u.issues.length?{success:!1,error:new(e??In)(u.issues.map(c=>Ie(c,i,me())))}:{success:!0,data:u.value}},"_safeParse"),et=eu(Qe),tu=o(e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},u=t._zod.run({value:r,issues:[]},i);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>Ie(c,i,me())))}:{success:!0,data:u.value}},"_safeParseAsync"),tt=tu(Qe);var ru="(?:(?:\\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])))",nu=new RegExp(`^${ru}$`);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 Ue=b("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var Sn=b("$ZodCheckMinLength",(e,t)=>{var r;Ue.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=Pn(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var lr=b("$ZodCheckStringFormat",(e,t)=>{var r,n;Ue.init(e,t),e._zod.onattach.push(i=>{let u=i._zod.bag;u.format=t.format,t.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),An=b("$ZodCheckRegex",(e,t)=>{lr.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}});var kn={major:4,minor:3,patch:6};var H=b("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=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,d,y)=>{let h=Ce(c),_;for(let E of d){if(E._zod.def.when){if(!E._zod.def.when(c))continue}else if(h)continue;let x=c.issues.length,s=E._zod.check(c);if(s instanceof Promise&&y?.async===!1)throw new ce;if(_||s instanceof Promise)_=(_??Promise.resolve()).then(async()=>{await s,c.issues.length!==x&&(h||(h=Ce(c,x)))});else{if(c.issues.length===x)continue;h||(h=Ce(c,x))}}return _?_.then(()=>c):c},"runChecks"),u=o((c,d,y)=>{if(Ce(c))return c.aborted=!0,c;let h=i(d,n,y);if(h instanceof Promise){if(y.async===!1)throw new ce;return h.then(_=>e._zod.parse(_,y))}return e._zod.parse(h,y)},"handleCanaryResult");e._zod.run=(c,d)=>{if(d.skipChecks)return e._zod.parse(c,d);if(d.direction==="backward"){let h=e._zod.parse({value:c.value,issues:[]},{...d,skipChecks:!0});return h instanceof Promise?h.then(_=>u(_,c,d)):u(h,c,d)}let y=e._zod.parse(c,d);if(y instanceof Promise){if(d.async===!1)throw new ce;return y.then(h=>i(h,n,d))}return i(y,n,d)}}q(e,"~standard",()=>({validate:o(i=>{try{let u=et(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return tt(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Ot=b("$ZodString",(e,t)=>{H.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Tn(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),pr=b("$ZodStringFormat",(e,t)=>{lr.init(e,t),Ot.init(e,t)});var Dn=b("$ZodURL",(e,t)=>{pr.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var Cn=b("$ZodNumber",(e,t)=>{H.init(e,t),e._zod.pattern=e._zod.bag.pattern??cr,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let u=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...u?{received:u}:{}}),r}});var dr=b("$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=b("$ZodBigInt",(e,t)=>{H.init(e,t),e._zod.pattern=En,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}});var Mn=b("$ZodAny",(e,t)=>{H.init(e,t),e._zod.parse=r=>r}),jn=b("$ZodUnknown",(e,t)=>{H.init(e,t),e._zod.parse=r=>r});var Ln=b("$ZodVoid",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),Fn=b("$ZodDate",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,u=i instanceof Date;return u&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...u?{received:"Invalid Date"}:{},inst:e}),r}});function On(e,t,r){e.issues.length&&t.issues.push(...be(r,e.issues)),t.value[r]=e.value}o(On,"handleArrayResult");var Bn=b("$ZodArray",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let u=[];for(let c=0;c<i.length;c++){let d=i[c],y=t.element._zod.run({value:d,issues:[]},n);y instanceof Promise?u.push(y.then(h=>On(h,r,c))):On(y,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(...be(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(kt,"handlePropertyResult");function ou(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=_n(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(ou,"normalizeDef");function iu(e,t,r,n,i,u){let c=[],d=i.keySet,y=i.catchall._zod,h=y.def.type,_=y.optout==="optional";for(let E in t){if(d.has(E))continue;if(h==="never"){c.push(E);continue}let x=y.run({value:t[E],issues:[]},n);x instanceof Promise?e.push(x.then(s=>kt(s,r,E,t,_))):kt(x,r,E,t,_)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:u}),e.length?Promise.all(e).then(()=>r):r}o(iu,"handleCatchall");var Zn=b("$ZodObject",(e,t)=>{if(H.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let d=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let y={...d};return Object.defineProperty(t,"shape",{value:y}),y},"get")})}let n=Tt(()=>ou(t));q(e._zod,"propValues",()=>{let d=t.shape,y={};for(let h in d){let _=d[h]._zod;if(_.values){y[h]??(y[h]=new Set);for(let E of _.values)y[h].add(E)}}return y});let i=Ye,u=t.catchall,c;e._zod.parse=(d,y)=>{c??(c=n.value);let h=d.value;if(!i(h))return d.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),d;d.value={};let _=[],E=c.shape;for(let x of c.keys){let s=E[x],p=s._zod.optout==="optional",f=s._zod.run({value:h[x],issues:[]},y);f instanceof Promise?_.push(f.then(m=>kt(m,d,x,h,p))):kt(f,d,x,h,p)}return u?iu(_,h,d,y,n.value,e):_.length?Promise.all(_).then(()=>d):d}});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=>!Ce(u));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(u=>u.issues.map(c=>Ie(c,n,me())))}),t)}o(wn,"handleUnionResults");var mr=b("$ZodUnion",(e,t)=>{H.init(e,t),q(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),q(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),q(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),q(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${i.map(u=>Et(u.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,u)=>{if(r)return n(i,u);let c=!1,d=[];for(let y of t.options){let h=y._zod.run({value:i.value,issues:[]},u);if(h instanceof Promise)d.push(h),c=!0;else{if(h.issues.length===0)return h;d.push(h)}}return c?Promise.all(d).then(y=>wn(y,i,e,u)):wn(d,i,e,u)}});var Vn=b("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,mr.init(e,t);let r=e._zod.parse;q(e._zod,"propValues",()=>{let i={};for(let u of t.options){let c=u._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(let[d,y]of Object.entries(c)){i[d]||(i[d]=new Set);for(let h of y)i[d].add(h)}}return i});let n=Tt(()=>{let i=t.options,u=new Map;for(let c of i){let d=c._zod.propValues?.[t.discriminator];if(!d||d.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let y of d){if(u.has(y))throw new Error(`Duplicate discriminator value "${String(y)}"`);u.set(y,c)}}return u});e._zod.parse=(i,u)=>{let c=i.value;if(!Ye(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;let d=n.value.get(c?.[t.discriminator]);return d?d._zod.run(i,u):t.unionFallback?r(i,u):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}});var Hn=b("$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 d=new Set;for(let h of c)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){d.add(typeof h=="number"?h.toString():h);let _=t.valueType._zod.run({value:i[h],issues:[]},n);_ instanceof Promise?u.push(_.then(E=>{E.issues.length&&r.issues.push(...be(h,E.issues)),r.value[h]=E.value})):(_.issues.length&&r.issues.push(...be(h,_.issues)),r.value[h]=_.value)}let y;for(let h in i)d.has(h)||(y=y??[],y.push(h));y&&y.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:y})}else{r.value={};for(let d of Reflect.ownKeys(i)){if(d==="__proto__")continue;let y=t.keyType._zod.run({value:d,issues:[]},n);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&cr.test(d)&&y.issues.length){let E=t.keyType._zod.run({value:Number(d),issues:[]},n);if(E instanceof Promise)throw new Error("Async schemas not supported in object keys currently");E.issues.length===0&&(y=E)}if(y.issues.length){t.mode==="loose"?r.value[d]=i[d]:r.issues.push({code:"invalid_key",origin:"record",issues:y.issues.map(E=>Ie(E,n,me())),input:d,path:[d],inst:e});continue}let _=t.valueType._zod.run({value:i[d],issues:[]},n);_ instanceof Promise?u.push(_.then(E=>{E.issues.length&&r.issues.push(...be(d,E.issues)),r.value[y.value]=E.value})):(_.issues.length&&r.issues.push(...be(d,_.issues)),r.value[y.value]=_.value)}}return u.length?Promise.all(u).then(()=>r):r}});var Wn=b("$ZodEnum",(e,t)=>{H.init(e,t);let r=ar(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>xn.has(typeof i)).map(i=>typeof i=="string"?De(i):i.toString()).join("|")})$`),e._zod.parse=(i,u)=>{let c=i.value;return n.has(c)||i.issues.push({code:"invalid_value",values:r,input:c,inst:e}),i}}),Gn=b("$ZodLiteral",(e,t)=>{if(H.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?De(n):n?De(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let u=n.value;return r.has(u)||n.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),n}});var qn=b("$ZodTransform",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new bt(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(c=>(r.value=c,r));if(i instanceof Promise)throw new ce;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=b("$ZodOptional",(e,t)=>{H.init(e,t),e._zod.optin="optional",e._zod.optout="optional",q(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),q(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Et(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(u=>Rn(u,r.value)):Rn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var Jn=b("$ZodNullable",(e,t)=>{H.init(e,t),q(e._zod,"optin",()=>t.innerType._zod.optin),q(e._zod,"optout",()=>t.innerType._zod.optout),q(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Et(r.source)}|null)$`):void 0}),q(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)});var Xn=b("$ZodPipe",(e,t)=>{H.init(e,t),q(e._zod,"values",()=>t.in._zod.values),q(e._zod,"optin",()=>t.in._zod.optin),q(e._zod,"optout",()=>t.out._zod.optout),q(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let u=t.out._zod.run(r,n);return u instanceof Promise?u.then(c=>zt(c,t.in,n)):zt(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>zt(u,t.out,n)):zt(i,t.out,n)}});function zt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(zt,"handlePipeResult");var Yn=b("$ZodCustom",(e,t)=>{Ue.init(e,t),H.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(u=>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,cu=Symbol("ZodOutput"),lu=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",...V(t)})}o(ro,"_string");function no(e,t){return new e({type:"string",coerce:!0,...V(t)})}o(no,"_coercedString");function oo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...V(t)})}o(oo,"_url");function io(e,t){return new e({type:"number",checks:[],...V(t)})}o(io,"_number");function ao(e,t){return new e({type:"number",coerce:!0,checks:[],...V(t)})}o(ao,"_coercedNumber");function so(e,t){return new e({type:"boolean",...V(t)})}o(so,"_boolean");function uo(e,t){return new e({type:"boolean",coerce:!0,...V(t)})}o(uo,"_coercedBoolean");function co(e,t){return new e({type:"bigint",coerce:!0,...V(t)})}o(co,"_coercedBigint");function lo(e){return new e({type:"any"})}o(lo,"_any");function po(e){return new e({type:"unknown"})}o(po,"_unknown");function mo(e,t){return new e({type:"void",...V(t)})}o(mo,"_void");function fo(e,t){return new e({type:"date",coerce:!0,...V(t)})}o(fo,"_coercedDate");function se(e,t){return new Sn({check:"min_length",...V(t),minimum:e})}o(se,"_minLength");function Te(e,t){return new An({check:"string_format",format:"regex",...V(t),pattern:e})}o(Te,"_regex");function go(e,t,r){let n=V(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(go,"_custom");var K=b("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");H.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>St(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>et(e,r,n),e.parseAsync=async(r,n)=>At(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>tt(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>$t(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.apply=r=>r(e)}),Rt=b("ZodMiniString",(e,t)=>{Ot.init(e,t),K.init(e,t)});function a(e){return ro(Rt,e)}o(a,"string");var yo=b("ZodMiniStringFormat",(e,t)=>{pr.init(e,t),Rt.init(e,t)});var _u=b("ZodMiniURL",(e,t)=>{Dn.init(e,t),yo.init(e,t)});function ho(e){return oo(_u,e)}o(ho,"url");var yr=b("ZodMiniNumber",(e,t)=>{Cn.init(e,t),K.init(e,t)});function X(e){return io(yr,e)}o(X,"number");var hr=b("ZodMiniBoolean",(e,t)=>{dr.init(e,t),K.init(e,t)});function B(e){return so(hr,e)}o(B,"boolean");var vo=b("ZodMiniBigInt",(e,t)=>{Un.init(e,t),K.init(e,t)});var Pu=b("ZodMiniAny",(e,t)=>{Mn.init(e,t),K.init(e,t)});function nt(){return lo(Pu)}o(nt,"any");var bu=b("ZodMiniUnknown",(e,t)=>{jn.init(e,t),K.init(e,t)});function k(){return po(bu)}o(k,"unknown");var Iu=b("ZodMiniVoid",(e,t)=>{Ln.init(e,t),K.init(e,t)});function xo(e){return mo(Iu,e)}o(xo,"_void");var _o=b("ZodMiniDate",(e,t)=>{Fn.init(e,t),K.init(e,t)});var Tu=b("ZodMiniArray",(e,t)=>{Bn.init(e,t),K.init(e,t)});function R(e,t){return new Tu({type:"array",element:e,...V(t)})}o(R,"array");var Eu=b("ZodMiniObject",(e,t)=>{Zn.init(e,t),K.init(e,t),q(e,"shape",()=>t.shape)});function l(e,t){let r={type:"object",shape:e??{},...V(t)};return new Eu(r)}o(l,"object");var $u=b("ZodMiniUnion",(e,t)=>{mr.init(e,t),K.init(e,t)});function N(e,t){return new $u({type:"union",options:e,...V(t)})}o(N,"union");var Su=b("ZodMiniDiscriminatedUnion",(e,t)=>{Vn.init(e,t),K.init(e,t)});function Me(e,t,r){return new Su({type:"union",options:t,discriminator:e,...V(r)})}o(Me,"discriminatedUnion");var Au=b("ZodMiniRecord",(e,t)=>{Hn.init(e,t),K.init(e,t)});function O(e,t,r){return new Au({type:"record",keyType:e,valueType:t,...V(r)})}o(O,"record");var zu=b("ZodMiniEnum",(e,t)=>{Wn.init(e,t),K.init(e,t),e.options=Object.values(t.entries)});function C(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new zu({type:"enum",entries:r,...V(t)})}o(C,"_enum");var ku=b("ZodMiniLiteral",(e,t)=>{Gn.init(e,t),K.init(e,t)});function $(e,t){return new ku({type:"literal",values:Array.isArray(e)?e:[e],...V(t)})}o($,"literal");var Ou=b("ZodMiniTransform",(e,t)=>{qn.init(e,t),K.init(e,t)});function Ee(e){return new Ou({type:"transform",transform:e})}o(Ee,"transform");var wu=b("ZodMiniOptional",(e,t)=>{Kn.init(e,t),K.init(e,t)});function g(e){return new wu({type:"optional",innerType:e})}o(g,"optional");var Ru=b("ZodMiniNullable",(e,t)=>{Jn.init(e,t),K.init(e,t)});function ot(e){return new Ru({type:"nullable",innerType:e})}o(ot,"nullable");var Nu=b("ZodMiniPipe",(e,t)=>{Xn.init(e,t),K.init(e,t)});function $e(e,t){return new Nu({type:"pipe",in:e,out:t})}o($e,"pipe");var Du=b("ZodMiniCustom",(e,t)=>{Yn.init(e,t),K.init(e,t)});function Nt(e,t){return go(Du,e??(()=>!0),t)}o(Nt,"custom");var it={};mn(it,{bigint:()=>Bu,boolean:()=>Fu,date:()=>Zu,number:()=>Lu,string:()=>ju});function ju(e){return no(Rt,e)}o(ju,"string");function Lu(e){return ao(yr,e)}o(Lu,"number");function Fu(e){return uo(hr,e)}o(Fu,"boolean");function Bu(e){return co(vo,e)}o(Bu,"bigint");function Zu(e){return fo(_o,e)}o(Zu,"date");var xr=l({retryOnFailure:l({defaultValue:g(B()),hide:g(B())}),continueOnFailure:l({defaultValue:g(B()),hide:g(B())})}),vr=class{constructor(t,r,n,i,u,c,d,y,h,_,E){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=d;this.errorHandlingOptions=y;this.outputSchema=h;this.audience=_;this.aiMetadata=E}static{o(this,"IAction")}},le=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=l({displayName:a(),description:g(a())}),D=o((e,t)=>l({type:$(t),required:B(),defaultValue:g(nt())}),"TPropertyValue");var ne=l({...F.shape,...D(a(),"SHORT_TEXT").shape}),fe=l({...F.shape,...D(a(),"LONG_TEXT").shape});var bo=l({label:a(),value:k()}),Dt=l({disabled:g(B()),placeholder:g(a()),options:R(bo)});var oe=l({...F.shape,options:Dt,...D(k(),"STATIC_DROPDOWN").shape}),ge=l({...F.shape,options:Dt,...D(R(k()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var _r=l({...F.shape,...D(k(),"DROPDOWN").shape,refreshers:R(a())}),at=l({...F.shape,...D(R(k()),"MULTI_SELECT_DROPDOWN").shape,refreshers:R(a())});var ye=l({...F.shape,...D(B(),"CHECKBOX").shape});var he=l({...F.shape,...D(X(),"NUMBER").shape});var st=l({...F.shape,...D(k(),"FILE").shape});var ut=l({...F.shape,...D(a(),"DATE_TIME").shape});var Io=O(a(),N([ne,fe,oe,at,ge,ye,he,st,ut])),ct=l({...F.shape,properties:Io,...D(R(k()),"ARRAY").shape});var lt=l({...F.shape,...D(N([O(a(),k())]),"JSON").shape});var To=N([ne,oe,lt,ct,ge]),Hu=O(a(),To),Pr=l({refreshers:R(a()),...F.shape,...D(k(),"DYNAMIC").shape});var Ct=l({...F.shape,...D(xo(),"MARKDOWN").shape});var pt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(pt||{}),je=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(je||{}),Le=(v=>(v.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",v.COMMUNICATION="COMMUNICATION",v.COMMERCE="COMMERCE",v.CORE="CORE",v.UNIVERSAL_AI="UNIVERSAL_AI",v.FLOW_CONTROL="FLOW_CONTROL",v.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",v.ACCOUNTING="ACCOUNTING",v.PRODUCTIVITY="PRODUCTIVITY",v.CONTENT_AND_FILES="CONTENT_AND_FILES",v.DEVELOPER_TOOLS="DEVELOPER_TOOLS",v.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",v.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",v.HUMAN_RESOURCES="HUMAN_RESOURCES",v.PAYMENT_PROCESSING="PAYMENT_PROCESSING",v.MARKETING="MARKETING",v.SALES_AND_CRM="SALES_AND_CRM",v))(Le||{});var dt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(dt||{}),br="both_client_credentials_and_authorization_code";var ke=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(ke||{}),mt=(u=>(u.NONE="NONE",u.HEADER_PRESENT="HEADER_PRESENT",u.QUERY_PRESENT="QUERY_PRESENT",u.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",u.HEAD_REQUEST="HEAD_REQUEST",u))(mt||{}),Wu=l({strategy:C(mt),paramName:g(a())}),ft=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(ft||{});var Ut=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Ut||{}),Eo=l({status:g(X()),body:g(k()),headers:g(O(a(),a()))}),$o=l({type:$("DELAY"),resumeDateTime:a(),requestIdToReply:g(a()),handlerId:g(a()),streamStepProgress:g(C(Ut))}),So=l({type:$("WEBHOOK"),requestId:a(),requestIdToReply:g(a()),response:Eo,handlerId:g(a()),streamStepProgress:g(C(Ut))}),Gu=N([$o,So]);var qu=l({body:k(),rawBody:g(k()),headers:O(a(),a()),queryParams:O(a(),a())});function ve(e){return e==null}o(ve,"isNil");function gt(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(gt,"isEmpty");function Mt(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(Mt,"assertNotNullOrUndefined");var Ir=Pe(require("crypto"),1);var Ku=128,Oe,Fe,Ju=o(e=>{!Oe||Oe.length<e?(Oe=Buffer.allocUnsafe(e*Ku),Ir.default.randomFillSync(Oe),Fe=0):Fe+e>Oe.length&&(Ir.default.randomFillSync(Oe),Fe=0),Fe+=e},"fillPool"),Xu=o(e=>(Ju(e|=0),Oe.subarray(Fe-e,Fe)),"random"),Yu=o((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,i=Math.ceil(1.6*n*t/e.length);return(u=t)=>{let c="";for(;;){let d=r(i),y=i;for(;y--;)if(c+=e[d[y]&n]||"",c.length===u)return c}}},"customRandom"),zo=o((e,t=21)=>Yu(e,t,Xu),"customAlphabet");var Qu="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ko=21,eb=a().check(Te(new RegExp(`^[0-9a-zA-Z]{${ko}}$`))),ec=zo(Qu,ko);var Se=$e(Ee(e=>e instanceof Date?e.toISOString():e),a()),ie={id:a(),created:Se,updated:Se},Z=o(e=>g(ot(e)),"Nullable");function Tr(e){return g(ot(C(e)))}o(Tr,"NullableEnum");var nb=$e(Ee(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),g(B())),jt=o(e=>$e(Ee(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),g(R(e))),"OptionalArrayFromQuery");var ab=O(a(),k());var yt=(_=>(_.OPENAI="openai",_.OPENROUTER="openrouter",_.ANTHROPIC="anthropic",_.AZURE="azure",_.GOOGLE="google",_.ACTIVEPIECES="activepieces",_.CLOUDFLARE_GATEWAY="cloudflare-gateway",_.CUSTOM="custom",_.BEDROCK="bedrock",_.MISTRAL="mistral",_))(yt||{});var vb=a().check(Te(/^#[0-9A-Fa-f]{6}$/));var _b=l({filename:a(),data:k(),type:$("file"),mimetype:g(a())});var tc=Pe(wo());var Sb=l({...ie,name:a(),permissions:R(a()),platformId:Z(a()),type:a(),userCount:g(X())});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 rc=l({mode:C(Ro),value:k()}),nc=l({auth:g(a()),fields:O(a(),rc)}),oc=l({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:g(nc)}),ic=l({type:$("PIECE"),toolName:a().check(se(1)),pieceMetadata:oc}),ac=l({type:$("none")}),sc=l({type:$("access_token"),accessToken:a()}),uc=l({type:$("api_key"),apiKey:a(),apiKeyHeader:a()}),cc=l({type:$("headers"),headers:O(a(),a())}),lc=Me("type",[ac,sc,uc,cc]),No=l({type:$("FLOW"),toolName:a().check(se(1)),externalFlowId:a(),flowDisplayName:g(a())}),Do=l({type:$("MCP"),toolName:a().check(se(1)),serverUrl:ho(),protocol:C($r),auth:lc}),Co=l({type:$("KNOWLEDGE_BASE"),toolName:a().check(se(1)),sourceType:C(Er),sourceId:a(),sourceName:a()}),pc=Me("type",[ic,No,Do,Co]),dc=l({displayName:a(),description:g(a()),type:C(Sr)}),Uo=l({type:$("MARKDOWN"),markdown:a()}),Be={type:$("TOOL_CALL"),input:Z(O(a(),k())),output:g(k()),toolName:a(),status:C(Ar),toolCallId:a(),startTime:a(),endTime:g(a())},eI=l(Be),Mo=Me("toolCallType",[l({...Be,toolCallType:$("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),l({...Be,toolCallType:$("FLOW"),displayName:a(),externalFlowId:a()}),l({...Be,toolCallType:$("MCP"),displayName:a(),serverUrl:a()}),l({...Be,toolCallType:$("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),l({...Be,toolCallType:$("UNKNOWN"),displayName:a()})]),mc=N([Uo,Mo]);var zr=(r=>(r.IMAGE="image",r.TEXT="text",r))(zr||{}),xe=l({apiKey:a()}),fc=xe,gc=l({apiKey:a(),apiKeyHash:a()}),yc=xe,hc=xe,vc=xe,xc=xe,_c=xe,Pc=xe,bc=xe,jo=l({accessKeyId:a().check(se(1)),secretAccessKey:a().check(se(1))}),Ic=l({}),Tc=l({}),Ec=l({}),$c=l({}),Sc=l({}),Ac=l({}),Lo=l({modelId:a(),modelName:a(),modelType:C(zr)}),Fo=l({apiKeyHeader:a(),baseUrl:a(),models:R(Lo),defaultHeaders:g(O(a(),a()))}),Bo=l({accountId:a(),gatewayId:a(),models:R(Lo),vertexProject:g(a()),vertexRegion:g(a())}),Zo=l({resourceName:a(),apiVersion:$e(Ee(e=>typeof e=="string"&&e.trim().length===0?void 0:e),g(a()))}),Vo=l({region:a().check(se(1))}),zc=N([fc,vc,xc,_c,Pc,hc,yc,gc,jo,bc]),Ho=N([Fo,Bo,Zo,Vo,Ic,Ec,$c,Sc,Tc,Ac]),kc=l({id:a(),name:a(),type:C(zr)}),Oc=l({id:a(),name:a(),provider:C(yt),config:Ho,enabledForChat:B()}),wc=l({provider:C(yt),config:Ho,auth:zc,platformId:a()});var oI={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var Rc=l({base64Url:a(),fileName:a(),extension:g(a())}),Nc=l({mimeType:a(),url:a(),fileName:g(a())}),kr=N([Rc,Nc]);var Dc=N([l({type:$("file"),value:kr}),l({type:$("markdown"),value:a(),files:g(R(kr))})]),Cc=l({sessionId:a(),message:a(),files:g(R(a()))});var Go=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Go||{}),qo=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(qo||{}),Or=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Or||{});var Uc=N([l({...ie,name:a(),externalId:a(),type:$("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:l({options:R(l({value:a()}))})}),l({...ie,name:a(),externalId:a(),type:N([$("TEXT"),$("NUMBER"),$("DATE")]),tableId:a(),projectId:a()})]),Mc=l({...ie,name:a(),folderId:Z(a()),projectId:a(),externalId:a(),status:Tr(qo),trigger:Tr(Go)}),jc=l({...ie,tableId:a(),projectId:a(),cells:O(a(),l({updated:a(),created:a(),value:k(),fieldName:a()}))}),Lc=l({events:R(C(Or)),webhookUrl:a(),flowId:a()}),Fc=l({fields:R(l({id:a(),name:a()})),rows:R(O(a(),a())),name:a()}),Bc=l({projectId:a(),limit:g(it.number()),cursor:g(a()),name:g(a()),externalIds:jt(a()),folderId:g(a()),folderIds:jt(a())}),Zc=l({records:R(R(l({fieldId:a(),value:Jo()}))),tableId:a()}),Vc=l({cells:g(R(l({fieldId:a(),value:Jo()}))),tableId:a(),agentUpdate:g(B())}),Ko=Me("operator",[we("eq"),we("neq"),we("gt"),we("gte"),we("lt"),we("lte"),we("co"),Wo("exists"),Wo("not_exists")]),Hc=l({tableId:a(),limit:g(it.number()),cursor:g(a()),filters:jt(Ko)});function Jo(){return $e(Ee(e=>e==null?e:String(e)),ot(a()))}o(Jo,"coerceToString");function we(e){return l({fieldId:a(),operator:$(e),value:a()})}o(we,"valueFilter");function Wo(e){return l({fieldId:a(),operator:$(e)})}o(Wo,"existenceFilter");var Wc=l({status:g(X()),body:g(k()),headers:g(O(a(),a()))}),Gc=l({...ie,deleted:Z(Se),ownerId:a(),displayName:a(),platformId:a(),externalId:Z(a())});var Xo=l({name:a(),description:g(a()),type:a(),required:B()}),qc=l({pieceName:a(),triggerName:a(),input:l({toolName:a(),toolDescription:a(),inputSchema:R(Xo),returnsResponse:B()})});var Yo="^[0-9]+\\.[0-9]+\\.[0-9]+$",II=new RegExp(Yo),Jc="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",TI=a().check(Te(new RegExp(Yo))),EI=a().check(Te(new RegExp(Jc))),Xc=l({packageType:$("ARCHIVE"),pieceType:C(je),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),Qo=l({packageType:$("REGISTRY"),pieceType:$("OFFICIAL"),pieceName:a(),pieceVersion:a()}),ei=l({packageType:$("REGISTRY"),pieceType:$("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),$I=N([Qo,ei]),SI=N([Xc,Qo,ei]),ti=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(ti||{}),Yc=l({type:C(ti),cronExpression:a(),timezone:a()}),AI=l({...ie,type:C(ke),projectId:a(),flowId:a(),triggerName:a(),schedule:Z(Yc),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:Z(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||{}),zI=l({...ie,projectId:Z(a()),platformId:Z(a()),type:C(ri),compression:C(ni),data:g(k()),location:C(oi),size:Z(X()),fileName:Z(a()),s3Key:Z(a()),metadata:Z(O(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||{}),kI=l({id:a(),email:a(),firstName:a(),status:C(ai),externalId:Z(a()),platformId:Z(a()),platformRole:C(ii),lastName:a(),created:Se,updated:Se,lastActiveDate:Z(Se),imageUrl:Z(a())});var wr=l({...F.shape,...D(O(a(),k()),"OBJECT").shape});var li=l({...F.shape,...D(a(),"COLOR").shape});var Rr=N([ne,fe,Ct,ye,oe,ge,_r,at,Pr,he,ct,wr,lt,ut,st,li]),j={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 pe=l({displayName:a(),description:g(a())});var pi=l({username:a(),password:a()}),Nr=l({...pe.shape,username:l({displayName:a(),description:g(a())}),password:l({displayName:a(),description:g(a())}),...D(pi,"BASIC_AUTH").shape});var rl=O(a(),N([ne,fe,he,ye,oe])),Dr=l({...pe.shape,props:rl,...D(k(),"CUSTOM_AUTH").shape});var Re=l({...pe.shape,...D(l({auth:a()}),"SECRET_TEXT").shape});var nl=O(a(),N([ne,fe,Re,he,ye,oe,ge,Ct])),di=l({...pe.shape,props:nl,...D(k(),"OIDC").shape});var Cr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Cr||{}),mi=N([ne,Re,oe]),fi=O(a(),mi),ol=l({props:g(O(a(),mi)),authUrl:a(),tokenUrl:a(),scope:R(a()),prompt:g(N([$("none"),$("consent"),$("login"),$("omit")])),pkce:g(B()),pkceMethod:g(N([$("plain"),$("S256")])),authorizationMethod:g(C(Cr)),grantType:g(N([C(dt),$(br)])),extra:g(O(a(),a()))}),gi=l({access_token:a(),props:g(fi),data:O(a(),nt())}),Ur=l({...pe.shape,...ol.shape,...D(gi,"OAUTH2").shape});var Ze=N([Nr,Dr,di,Ur,Re]),ht="Connection",Mr={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||ht}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||ht,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||ht}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||ht}},None(){}};var uE={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 il=l({...F.shape,...D(k(),"CUSTOM").shape,code:a()});var al=N([Rr,Ze]),jr=O(a(),al),AE=O(a(),Rr);var yi=N([l({strategy:$("CRON"),cronExpression:a()}),l({strategy:$("NONE")})]);var hi="2",Ft="0.82.0";var Lr=class{constructor(t,r,n,i,u,c,d,y,h=Ft,_,E=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=d;this.auth=y;this.minimumSupportedRelease=h;this.maximumSupportedRelease=_;this.description=E;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:hi}),"getContextInfo");(!sl(h)||ul(h,Ft))&&(this.minimumSupportedRelease=Ft),u.forEach(x=>this._actions[x.name]=x),c.forEach(x=>this._triggers[x.name]=x)}static{o(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:this.auth,minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},vi=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 sl(e){return/^\d+\.\d+\.\d+$/.test(e)}o(sl,"isValidSimpleSemver");function ul(e,t){let[r,n,i]=e.split(".").map(Number),[u,c,d]=t.split(".").map(Number);return r!==u?r<u:n!==c?n<c:i<d}o(ul,"isSemverLessThan");var cl=g(O(a(),O(a(),a()))),xi=l({id:g(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:R(a()),platformId:g(a()),directoryPath:g(a()),auth:g(N([Ze,R(Ze)])),version:a(),categories:g(R(C(Le))),minimumSupportedRelease:g(a()),maximumSupportedRelease:g(a()),i18n:cl}),ll=C(["human","ai","both"]),_i=l({description:g(a()),idempotent:g(B())}),Pi=l({name:a(),displayName:a(),description:a(),props:jr,requireAuth:B(),errorHandlingOptions:g(xr),outputSchema:g(Nt()),audience:g(ll),aiMetadata:g(_i)}),bi=l({name:a(),displayName:a(),description:a(),props:jr,errorHandlingOptions:g(xr),type:C(ke),sampleData:k(),handshakeConfiguration:g(Nt()),renewConfiguration:g(yi),testStrategy:C(ft),outputSchema:g(Nt()),aiMetadata:g(_i)}),pl=l({...xi.shape,actions:O(a(),Pi),triggers:O(a(),bi)}),dl=l({...xi.shape,actions:X(),triggers:X(),suggestedActions:g(R(bi)),suggestedTriggers:g(R(Pi))}),Ii=l({projectUsage:X(),tags:g(R(a())),pieceType:C(je),packageType:C(pt),platformId:g(a()),archiveId:g(a())}),A$=l({...pl.shape,...Ii.shape}),z$=l({...dl.shape,...Ii.shape}),k$=l({name:a(),version:a()});var ml=Pe(require("path")),fl=Pe(require("fs/promises"));var Bt=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{o(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,i=new URLSearchParams;return r.searchParams.forEach((u,c)=>{i.append(c,u)}),{urlWithoutQueryParams:n,queryParams:i}}getHeaders(t){let r={Accept:"application/json"};if(t.authentication&&this.populateAuthentication(t.authentication,r),t.body)switch(t.headers?.["Content-Type"]){case"text/csv":r["Content-Type"]="text/csv";break;default:r["Content-Type"]="application/json";break}return t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var Zt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new 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 Vt=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 Zt){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(t),u=this.getHeaders(t),c=t.queryParams??{};for(let[M,re]of Object.entries(c))i.append(M,re);let d=i.toString(),y=d?`${n}?${d}`:n,h=t.responseType??"json",_=t.followRedirects??!0,E=t.retries??0,{body:x,extraHeaders:s,isStream:p}=gl(t.body,u),f=hl({...u,...s}),m=await yl(async()=>{let M=new AbortController,re=t.timeout&&t.timeout>0?setTimeout(()=>M.abort(),t.timeout):void 0;try{let ae={method:t.method.toString(),headers:f,body:x,redirect:_?"follow":"manual",signal:M.signal};return p&&(ae.duplex="half"),r?.dispatcher!==void 0&&(ae.dispatcher=r.dispatcher),await fetch(y,ae)}finally{re!==void 0&&clearTimeout(re)}},E),v=_?300:400;if(m.status<200||m.status>=v){let M=await Ti(m,h),re=new Vt(t.body,{status:m.status,responseBody:M});throw console.error("[HttpClient#(sanitized error message)] Request failed:",re),re}let P=await Ti(m,h);return{status:m.status,headers:vl(m.headers),body:P}}};function gl(e,t){return _l(e)?{body:void 0,extraHeaders:{},isStream:!1}:xl(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(gl,"serializeBody");async function Ti(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(Ti,"parseResponseBody");async function yl(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await Ei(n);continue}return i}catch(i){if(r=i,n<t){await Ei(n);continue}throw i}throw r}o(yl,"sendWithRetries");function Ei(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(Ei,"backoff");function hl(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(hl,"normalizeHeaders");function vl(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(vl,"toHttpHeaders");function xl(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}o(xl,"isNodeFormData");function _l(e){return e==null}o(_l,"isNil");var Y=new Ht;var _e=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(_e||{});var sd=Pe(require("fs")),ks=Pe(zs());var ud={"application/json":"json","application/pdf":"pdf","application/xml":"xml","text/xml":"xml","application/zip":"zip","application/gzip":"gz","application/x-tar":"tar","application/octet-stream":"bin","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/rtf":"rtf","application/javascript":"js","application/x-www-form-urlencoded":"bin","text/plain":"txt","text/html":"html","text/css":"css","text/csv":"csv","text/calendar":"ics","text/markdown":"md","image/png":"png","image/jpeg":"jpeg","image/jpg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/tiff":"tiff","image/x-icon":"ico","image/vnd.microsoft.icon":"ico","image/heic":"heic","audio/mpeg":"mp3","audio/mp4":"m4a","audio/wav":"wav","audio/x-wav":"wav","audio/ogg":"ogg","audio/webm":"weba","video/mp4":"mp4","video/mpeg":"mpeg","video/webm":"webm","video/quicktime":"mov","video/x-msvideo":"avi","font/woff":"woff","font/woff2":"woff2","font/ttf":"ttf","font/otf":"otf"};function cd(e){let t=e.split(";")[0].trim().toLowerCase();return ud[t]??""}o(cd,"contentTypeToExtension");var ld=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),pd=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 Os({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:d,authLocation:y="headers"}){return le({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:j.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:h})=>({url:j.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
3
+ i.e ${pd(t,h)}/resource or /resource`,required:!0,defaultValue:h?t(h):"",...c?.url??{}})}),"props")}),method:j.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(_e).map(h=>({label:h,value:h}))},...c?.method??{}}),headers:j.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:j.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:j.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:j.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:h})=>{if(!h)return{};let _=h,E={};switch(_){case"none":break;case"json":E.data=j.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":E.data=j.LongText({displayName:"Raw Body",required:!0});break;case"form_data":E.data=j.Array({displayName:"Form Data",required:!0,properties:{fieldName:j.ShortText({displayName:"Field Name",required:!0}),fieldType:j.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:j.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:j.File({displayName:"File Field Value",required:!1})}});break}return E},"props")}),response_is_binary:j.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:j.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:j.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:j.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...d},run:o(async h=>{let{method:_,url:E,headers:x,queryParams:s,body:p,body_type:f,failsafe:m,timeout:v,response_is_binary:P,followRedirects:M}=h.propsValue;Mt(_,"Method"),Mt(E,"URL");let re=ve(r)?{}:await r(h.auth,h.propsValue),ae=E.url,Je=ae.startsWith("http://")||ae.startsWith("https://")?ae:ld({baseUrl:t(h.auth),relativePath:ae}),ze={method:_,url:Je,headers:{...x??{},...y==="headers"||!ve(y)?re:{}},queryParams:{...y==="queryParams"?re:{},...s??{}},timeout:v?v*1e3:0,followRedirects:M};if(P&&(ze.responseType="arraybuffer"),p)if(f&&f!=="none"){let de=p.data;if(f==="form_data"){let Ls=de,Pt=new ks.default;for(let{fieldName:ln,fieldType:pn,textFieldValue:dn,fileFieldValue:nr}of Ls)pn==="text"&&!gt(dn)?Pt.append(ln,dn):pn==="file"&&!gt(nr)&&Pt.append(ln,nr.data,{filename:nr?.filename});ze.body=Pt,ze.headers={...ze.headers,...Pt.getHeaders()}}else ze.body=de}else f||(ze.body=p);try{let de=await Y.sendRequest(ze);return await dd(h.files,de.body,de.status,de.headers,P)}catch(de){if(m)return de.errorMessage();throw de}},"run")})}o(Os,"createCustomApiCallAction");var dd=o(async(e,t,r,n,i)=>{let u;if(i&&md(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],d=cd(c??"")||"txt",y;t instanceof ArrayBuffer?y=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?y=t:y=Buffer.from(t),u=await e.write({fileName:`output.${d}`,data:y})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),md=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var ee="https://api.deepgram.com/v1",rr=[{label:"bg",value:"bg"},{label:"ca",value:"ca"},{label:"zh",value:"zh"},{label:"zh-CN",value:"zh-CN"},{label:"zh-TW",value:"zh-TW"},{label:"zh-HK",value:"zh-HK"},{label:"zh-Hans",value:"zh-Hans"},{label:"zh-Hant",value:"zh-Hant"},{label:"cs",value:"cs"},{label:"da",value:"da"},{label:"da-DK",value:"da-DK"},{label:"nl",value:"nl"},{label:"nl-BE",value:"nl-BE"},{label:"en",value:"en"},{label:"en-US",value:"en-US"},{label:"en-AU",value:"en-AU"},{label:"en-GB",value:"en-GB"},{label:"en-NZ",value:"en-NZ"},{label:"en-IN",value:"en-IN"},{label:"et",value:"et"},{label:"fi",value:"fi"},{label:"fr",value:"fr"},{label:"fr-CA",value:"fr-CA"},{label:"de",value:"de"},{label:"de-CH",value:"de-CH"},{label:"el",value:"el"},{label:"hi",value:"hi"},{label:"hi-Latn",value:"hi-Latn"},{label:"hu",value:"hu"},{label:"id",value:"id"},{label:"it",value:"it"},{label:"ja",value:"ja"},{label:"ko",value:"ko"},{label:"ko-KR",value:"ko-KR"},{label:"lv",value:"lv"},{label:"lt",value:"lt"},{label:"ms",value:"ms"},{label:"no",value:"no"},{label:"pl",value:"pl"},{label:"pt",value:"pt"},{label:"pt-BR",value:"pt-BR"},{label:"pt-PT",value:"pt-PT"},{label:"ro",value:"ro"},{label:"ru",value:"ru"},{label:"sk",value:"sk"},{label:"es",value:"es"},{label:"es-419",value:"es-419"},{label:"es-LATAM",value:"es-LATAM"},{label:"sv",value:"sv"},{label:"sv-SE",value:"sv-SE"},{label:"taq",value:"taq"},{label:"th",value:"th"},{label:"th-TH",value:"th-TH"},{label:"tr",value:"tr"},{label:"uk",value:"uk"},{label:"vi",value:"vi"}];var te=Mr.SecretText({displayName:"API Key",required:!0,description:"You can obtain your API key from [Deepgram Console](https://console.deepgram.com/).",validate:o(async({auth:e})=>{try{return await Y.sendRequest({method:"GET",url:ee+"/projects",headers:{Authorization:`Token ${e}`}}),{valid:!0}}catch{return{valid:!1,error:"Invalid API key."}}},"validate")});async function ws({apiKey:e}){return(await Y.sendRequest({method:"GET",url:ee+"/models",headers:{Authorization:`Token ${e}`}})).body}o(ws,"fetchModels");function Rs({models:e}){return e.map(t=>({label:t.canonical_name,value:t.canonical_name})).sort((t,r)=>t.label.localeCompare(r.label))}o(Rs,"toOptions");async function fd({apiKey:e}){let t=await ws({apiKey:e});return Rs({models:t.stt??[]})}o(fd,"fetchSttModelOptions");async function gd({apiKey:e}){let t=await ws({apiKey:e});return Rs({models:t.tts??[]})}o(gd,"fetchTtsModelOptions");var Ke={fetchSttModelOptions:fd,fetchTtsModelOptions:gd};var Ns=Pe(Gt());var Ds=le({auth:te,name:"create_summary",displayName:"Create Summary",description:"Produces a summary of the content from an audio file.",audience:"both",aiMetadata:{description:"Uploads an audio file to Deepgram and returns an AI-generated summary of its spoken content (summarize v2), synchronously. Pick this over Create Transcription when you need a condensed overview rather than the full text; by default it falls back to the full transcript if no summary is available. Re-running re-processes the audio and incurs another billed request, though it creates no persistent resource.",idempotent:!1},props:{audioFile:j.File({displayName:"Audio File",required:!0}),model:j.Dropdown({auth:te,displayName:"Model",required:!1,refreshers:[],options:o(async({auth:e})=>{if(!e)return{disabled:!0,placeholder:"Enter your API key first",options:[]};try{return{disabled:!1,options:await Ke.fetchSttModelOptions({apiKey:e.secret_text})}}catch{return{disabled:!0,options:[],placeholder:"Couldn't load models, check your API key or try again."}}},"options")}),language:j.StaticDropdown({displayName:"Language",required:!1,description:"en",options:{disabled:!1,options:rr}}),fallbackToTranscript:j.Checkbox({displayName:"Fallback to Full Transcript",description:"Return full transcript if summary is not available.",required:!1,defaultValue:!0})},async run(e){let{audioFile:t,model:r="nova",fallbackToTranscript:n,language:i}=e.propsValue,u=Ns.default.lookup(t.extension||"")||"audio/wav",c=await Y.sendRequest({url:ee+"/listen",method:"POST",headers:{Authorization:`Token ${e.auth.secret_text}`,"Content-Type":u},body:t.data,responseType:"json",queryParams:{model:r,summarize:"v2",language:i||"en"}});if(c.body.results.summary)return c.body.results.summary;if(n&&c.body.results.channels?.[0]?.alternatives?.[0]?.transcript)return c.body.results.channels[0].alternatives[0].transcript;throw new Error("No summary or transcript available")}});var Cs=Pe(Gt());var Us=le({auth:te,name:"create_transcription_callback",displayName:"Create Transcription (Callback)",description:"Creates a transcription using a callback URL.",audience:"both",aiMetadata:{description:"Submits an audio file to Deepgram for asynchronous speech-to-text: the action returns only a request ID immediately, and the finished transcript is delivered later to the callback URL you provide. Pick this for long audio or when a webhook endpoint will consume the result; it does not return the transcript itself. Each run submits a new billed transcription job, so it is not idempotent.",idempotent:!1},props:{audioFile:j.File({displayName:"Audio File",required:!0}),model:j.Dropdown({auth:te,displayName:"Model",required:!1,refreshers:[],options:o(async({auth:e})=>{if(!e)return{disabled:!0,placeholder:"Enter your API key first",options:[]};try{return{disabled:!1,options:await Ke.fetchSttModelOptions({apiKey:e.secret_text})}}catch{return{disabled:!0,options:[],placeholder:"Couldn't load models, check your API key or try again."}}},"options")}),language:j.StaticDropdown({displayName:"Language",required:!1,description:"en",options:{disabled:!1,options:rr}}),callbackUrl:j.ShortText({displayName:"Callback URL",description:"URL to receive the transcription when ready.",required:!0})},async run(e){let{audioFile:t,model:r="nova",callbackUrl:n,language:i}=e.propsValue,u=Cs.default.lookup(t.extension||"")||"audio/wav";return{requestId:(await Y.sendRequest({url:ee+"/listen",method:"POST",headers:{Authorization:`Token ${e.auth.secret_text}`,"Content-Type":u},body:t.data,responseType:"json",queryParams:{model:r,callback:n,language:i||"en"}})).body.request_id,callbackUrl:n,status:"submitted"}}});var Ms=le({auth:te,name:"list_projects",displayName:"List Projects",description:"Retrieves a list of all projects associated with the account.",audience:"both",aiMetadata:{description:"Fetches all Deepgram projects accessible to the authenticated API key, with no inputs or filters. Use it to discover project IDs before project-scoped operations or to verify account access. Read-only and safe to call repeatedly.",idempotent:!0},props:{},async run(e){return(await Y.sendRequest({method:"GET",url:ee+"/projects",headers:{Authorization:`Token ${e.auth.secret_text}`}})).body}});var js=le({auth:te,name:"text_to_speech",displayName:"Text to Speech",description:"Converts text to audio file.",audience:"both",aiMetadata:{description:"Synthesizes speech from text using a Deepgram Aura voice and saves the result as an audio file in a chosen encoding (mp3 by default). Pick this only for generating spoken audio from text, the inverse of the transcription actions. Each run produces a newly generated, billed audio file, so it is not idempotent.",idempotent:!1},props:{text:j.LongText({displayName:"Text",required:!0}),model:j.Dropdown({auth:te,displayName:"Voice",required:!1,refreshers:[],options:o(async({auth:e})=>{if(!e)return{disabled:!0,placeholder:"Enter your API key first",options:[]};try{return{disabled:!1,options:await Ke.fetchTtsModelOptions({apiKey:e.secret_text})}}catch{return{disabled:!0,options:[],placeholder:"Couldn't load models, check your API key or try again."}}},"options")}),encoding:j.StaticDropdown({displayName:"Output Format",required:!1,defaultValue:"mp3",options:{disabled:!1,options:[{label:"linear16",value:"linear16"},{label:"flac",value:"flac"},{label:"mulaw",value:"mulaw"},{label:"alaw",value:"alaw"},{label:"mp3",value:"mp3"},{label:"opus",value:"opus"},{label:"aac",value:"aac"}]}})},async run(e){let{text:t,model:r="aura-asteria-en",encoding:n}=e.propsValue,i=await Y.sendRequest({method:"POST",url:ee+"/speak",body:{text:t},headers:{Authorization:`Token ${e.auth.secret_text}`,"Content-Type":"application/json"},queryParams:{model:r,encoding:n||"mp3"},responseType:"arraybuffer"});return{file:await e.files.write({fileName:`audio.${n}`,data:Buffer.from(i.body)})}}});var yd=vi({displayName:"Deepgram",logoUrl:"https://cdn.activepieces.com/pieces/deepgram.png",description:"Deepgram is an AI-powered speech recognition platform that provides real-time transcription, text-to-speech, and audio analysis capabilities.",categories:["ARTIFICIAL_INTELLIGENCE"],minimumSupportedRelease:"0.30.0",authors:["Ani-4x","kishanprmr"],auth:te,actions:[Ds,Us,Ms,js,Os({auth:te,baseUrl:o(()=>ee,"baseUrl"),authMapping:o(async e=>({Authorization:`Token ${e.secret_text}`}),"authMapping")})],triggers:[]});0&&(module.exports={deepgramPiece});
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
+ */
@@ -1,7 +0,0 @@
1
- export declare const createSummaryAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- audioFile: import("@activepieces/pieces-framework").FileProperty<true>;
3
- model: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
4
- language: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
5
- fallbackToTranscript: import("@activepieces/pieces-framework").CheckboxProperty<false>;
6
- }>;
7
- //# sourceMappingURL=create-summary.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-summary.d.ts","sourceRoot":"","sources":["../../../src/actions/create-summary.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,mBAAmB;;;;;EAkG9B,CAAC"}
@@ -1,101 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createSummaryAction = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const auth_1 = require("../common/auth");
7
- const constants_1 = require("../common/constants");
8
- const models_1 = require("../common/models");
9
- const mime_types_1 = tslib_1.__importDefault(require("mime-types"));
10
- const pieces_common_1 = require("@activepieces/pieces-common");
11
- exports.createSummaryAction = (0, pieces_framework_1.createAction)({
12
- auth: auth_1.deepgramAuth,
13
- name: 'create_summary',
14
- displayName: 'Create Summary',
15
- description: 'Produces a summary of the content from an audio file.',
16
- audience: 'both',
17
- aiMetadata: {
18
- description: 'Uploads an audio file to Deepgram and returns an AI-generated summary of its spoken content (summarize v2), synchronously. Pick this over Create Transcription when you need a condensed overview rather than the full text; by default it falls back to the full transcript if no summary is available. Re-running re-processes the audio and incurs another billed request, though it creates no persistent resource.',
19
- idempotent: false,
20
- },
21
- props: {
22
- audioFile: pieces_framework_1.Property.File({
23
- displayName: 'Audio File',
24
- required: true,
25
- }),
26
- model: pieces_framework_1.Property.Dropdown({
27
- auth: auth_1.deepgramAuth,
28
- displayName: 'Model',
29
- required: false,
30
- refreshers: [],
31
- options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
32
- if (!auth) {
33
- return {
34
- disabled: true,
35
- placeholder: 'Enter your API key first',
36
- options: [],
37
- };
38
- }
39
- try {
40
- const options = yield models_1.deepgramModels.fetchSttModelOptions({
41
- apiKey: auth.secret_text,
42
- });
43
- return { disabled: false, options };
44
- }
45
- catch (error) {
46
- return {
47
- disabled: true,
48
- options: [],
49
- placeholder: "Couldn't load models, check your API key or try again.",
50
- };
51
- }
52
- }),
53
- }),
54
- language: pieces_framework_1.Property.StaticDropdown({
55
- displayName: 'Language',
56
- required: false,
57
- description: 'en',
58
- options: {
59
- disabled: false,
60
- options: constants_1.LANG_OPTIONS,
61
- },
62
- }),
63
- fallbackToTranscript: pieces_framework_1.Property.Checkbox({
64
- displayName: 'Fallback to Full Transcript',
65
- description: 'Return full transcript if summary is not available.',
66
- required: false,
67
- defaultValue: true,
68
- }),
69
- },
70
- run(context) {
71
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
72
- var _a, _b, _c, _d;
73
- const { audioFile, model = 'nova', fallbackToTranscript, language, } = context.propsValue;
74
- const mimeType = mime_types_1.default.lookup(audioFile.extension || '') || 'audio/wav';
75
- const response = yield pieces_common_1.httpClient.sendRequest({
76
- url: constants_1.BASE_URL + '/listen',
77
- method: pieces_common_1.HttpMethod.POST,
78
- headers: {
79
- Authorization: `Token ${context.auth.secret_text}`,
80
- 'Content-Type': mimeType,
81
- },
82
- body: audioFile.data,
83
- responseType: 'json',
84
- queryParams: {
85
- model,
86
- summarize: 'v2',
87
- language: language || 'en',
88
- },
89
- });
90
- if (response.body.results.summary) {
91
- return response.body.results.summary;
92
- }
93
- if (fallbackToTranscript &&
94
- ((_d = (_c = (_b = (_a = response.body.results.channels) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.alternatives) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.transcript)) {
95
- return response.body.results.channels[0].alternatives[0].transcript;
96
- }
97
- throw new Error('No summary or transcript available');
98
- });
99
- },
100
- });
101
- //# sourceMappingURL=create-summary.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-summary.js","sourceRoot":"","sources":["../../../src/actions/create-summary.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAA8C;AAC9C,mDAA6D;AAC7D,6CAAkD;AAClD,oEAA8B;AAC9B,+DAAqE;AAExD,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC9C,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,uDAAuD;IACpE,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,yZAAyZ;QAC3Z,UAAU,EAAE,KAAK;KAClB;IACD,KAAK,EAAE;QACL,SAAS,EAAE,2BAAQ,CAAC,IAAI,CAAC;YACvB,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACvB,IAAI,EAAE,mBAAY;YAClB,WAAW,EAAE,OAAO;YACpB,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,EAAE;YACd,OAAO,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;gBACtB,IAAI,CAAC,IAAI,EAAE,CAAC;oBACV,OAAO;wBACL,QAAQ,EAAE,IAAI;wBACd,WAAW,EAAE,0BAA0B;wBACvC,OAAO,EAAE,EAAE;qBACZ,CAAC;gBACJ,CAAC;gBACD,IAAI,CAAC;oBACH,MAAM,OAAO,GAAG,MAAM,uBAAc,CAAC,oBAAoB,CAAC;wBACxD,MAAM,EAAE,IAAI,CAAC,WAAW;qBACzB,CAAC,CAAC;oBACH,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;gBACtC,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,OAAO;wBACL,QAAQ,EAAE,IAAI;wBACd,OAAO,EAAE,EAAE;wBACX,WAAW,EACT,wDAAwD;qBAC3D,CAAC;gBACJ,CAAC;YACH,CAAC,CAAA;SACF,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAChC,WAAW,EAAE,UAAU;YACvB,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,IAAI;YACjB,OAAO,EAAE;gBACP,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,wBAAY;aACtB;SACF,CAAC;QACF,oBAAoB,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtC,WAAW,EAAE,6BAA6B;YAC1C,WAAW,EAAE,qDAAqD;YAClE,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,IAAI;SACnB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;;YACf,MAAM,EACJ,SAAS,EACT,KAAK,GAAG,MAAM,EACd,oBAAoB,EACpB,QAAQ,GACT,GAAG,OAAO,CAAC,UAAU,CAAC;YACvB,MAAM,QAAQ,GAAG,oBAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,IAAI,EAAE,CAAC,IAAI,WAAW,CAAC;YAEvE,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,GAAG,EAAE,oBAAQ,GAAG,SAAS;gBACzB,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,OAAO,EAAE;oBACP,aAAa,EAAE,SAAS,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE;oBAClD,cAAc,EAAE,QAAQ;iBACzB;gBACD,IAAI,EAAE,SAAS,CAAC,IAAI;gBACpB,YAAY,EAAE,MAAM;gBACpB,WAAW,EAAE;oBACX,KAAK;oBACL,SAAS,EAAE,IAAI;oBACf,QAAQ,EAAE,QAAQ,IAAI,IAAI;iBAC3B;aACF,CAAC,CAAC;YAEH,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;gBAClC,OAAO,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;YACvC,CAAC;YAED,IACE,oBAAoB;iBACpB,MAAA,MAAA,MAAA,MAAA,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,0CAAG,CAAC,CAAC,0CAAE,YAAY,0CAAG,CAAC,CAAC,0CAAE,UAAU,CAAA,EAClE,CAAC;gBACD,OAAO,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;YACtE,CAAC;YAED,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;QACxD,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- export declare const createTranscriptionCallbackAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- audioFile: import("@activepieces/pieces-framework").FileProperty<true>;
3
- model: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
4
- language: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
5
- callbackUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
- }>;
7
- //# sourceMappingURL=create-transcription.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-transcription.d.ts","sourceRoot":"","sources":["../../../src/actions/create-transcription.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,iCAAiC;;;;;EA0F5C,CAAC"}