@activepieces/piece-stripe 0.6.8 → 0.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -13
- package/src/index.js +26 -127
- package/src/index.d.ts +0 -3
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/cancel-subscription.d.ts +0 -5
- package/src/lib/actions/cancel-subscription.d.ts.map +0 -1
- package/src/lib/actions/cancel-subscription.js +0 -37
- package/src/lib/actions/cancel-subscription.js.map +0 -1
- package/src/lib/actions/create-customer.d.ts +0 -12
- package/src/lib/actions/create-customer.d.ts.map +0 -1
- package/src/lib/actions/create-customer.js +0 -86
- package/src/lib/actions/create-customer.js.map +0 -1
- package/src/lib/actions/create-invoice.d.ts +0 -6
- package/src/lib/actions/create-invoice.d.ts.map +0 -1
- package/src/lib/actions/create-invoice.js +0 -54
- package/src/lib/actions/create-invoice.js.map +0 -1
- package/src/lib/actions/create-payment-intent.d.ts +0 -11
- package/src/lib/actions/create-payment-intent.d.ts.map +0 -1
- package/src/lib/actions/create-payment-intent.js +0 -108
- package/src/lib/actions/create-payment-intent.js.map +0 -1
- package/src/lib/actions/create-payment-link.d.ts +0 -9
- package/src/lib/actions/create-payment-link.d.ts.map +0 -1
- package/src/lib/actions/create-payment-link.js +0 -92
- package/src/lib/actions/create-payment-link.js.map +0 -1
- package/src/lib/actions/create-price.d.ts +0 -8
- package/src/lib/actions/create-price.d.ts.map +0 -1
- package/src/lib/actions/create-price.js +0 -92
- package/src/lib/actions/create-price.js.map +0 -1
- package/src/lib/actions/create-product.d.ts +0 -9
- package/src/lib/actions/create-product.d.ts.map +0 -1
- package/src/lib/actions/create-product.js +0 -84
- package/src/lib/actions/create-product.js.map +0 -1
- package/src/lib/actions/create-refund.d.ts +0 -7
- package/src/lib/actions/create-refund.d.ts.map +0 -1
- package/src/lib/actions/create-refund.js +0 -72
- package/src/lib/actions/create-refund.js.map +0 -1
- package/src/lib/actions/create-subscription.d.ts +0 -10
- package/src/lib/actions/create-subscription.d.ts.map +0 -1
- package/src/lib/actions/create-subscription.js +0 -105
- package/src/lib/actions/create-subscription.js.map +0 -1
- package/src/lib/actions/deactivate-payment-link.d.ts +0 -4
- package/src/lib/actions/deactivate-payment-link.d.ts.map +0 -1
- package/src/lib/actions/deactivate-payment-link.js +0 -26
- package/src/lib/actions/deactivate-payment-link.js.map +0 -1
- package/src/lib/actions/find-invoice.d.ts +0 -4
- package/src/lib/actions/find-invoice.d.ts.map +0 -1
- package/src/lib/actions/find-invoice.js +0 -32
- package/src/lib/actions/find-invoice.js.map +0 -1
- package/src/lib/actions/retrieve-customer.d.ts +0 -4
- package/src/lib/actions/retrieve-customer.d.ts.map +0 -1
- package/src/lib/actions/retrieve-customer.js +0 -37
- package/src/lib/actions/retrieve-customer.js.map +0 -1
- package/src/lib/actions/retrieve-invoice.d.ts +0 -4
- package/src/lib/actions/retrieve-invoice.d.ts.map +0 -1
- package/src/lib/actions/retrieve-invoice.js +0 -32
- package/src/lib/actions/retrieve-invoice.js.map +0 -1
- package/src/lib/actions/retrieve-payment-intent.d.ts +0 -4
- package/src/lib/actions/retrieve-payment-intent.d.ts.map +0 -1
- package/src/lib/actions/retrieve-payment-intent.js +0 -32
- package/src/lib/actions/retrieve-payment-intent.js.map +0 -1
- package/src/lib/actions/retrieve-payout.d.ts +0 -4
- package/src/lib/actions/retrieve-payout.d.ts.map +0 -1
- package/src/lib/actions/retrieve-payout.js +0 -32
- package/src/lib/actions/retrieve-payout.js.map +0 -1
- package/src/lib/actions/search-customer.d.ts +0 -4
- package/src/lib/actions/search-customer.d.ts.map +0 -1
- package/src/lib/actions/search-customer.js +0 -42
- package/src/lib/actions/search-customer.js.map +0 -1
- package/src/lib/actions/search-subscriptions.d.ts +0 -11
- package/src/lib/actions/search-subscriptions.d.ts.map +0 -1
- package/src/lib/actions/search-subscriptions.js +0 -194
- package/src/lib/actions/search-subscriptions.js.map +0 -1
- package/src/lib/actions/update-customer.d.ts +0 -13
- package/src/lib/actions/update-customer.d.ts.map +0 -1
- package/src/lib/actions/update-customer.js +0 -95
- package/src/lib/actions/update-customer.js.map +0 -1
- package/src/lib/common/index.d.ts +0 -18
- package/src/lib/common/index.d.ts.map +0 -1
- package/src/lib/common/index.js +0 -405
- package/src/lib/common/index.js.map +0 -1
- package/src/lib/common/types.d.ts +0 -59
- package/src/lib/common/types.d.ts.map +0 -1
- package/src/lib/common/types.js +0 -3
- package/src/lib/common/types.js.map +0 -1
- package/src/lib/trigger/canceled-subscription.d.ts +0 -11
- package/src/lib/trigger/canceled-subscription.d.ts.map +0 -1
- package/src/lib/trigger/canceled-subscription.js +0 -113
- package/src/lib/trigger/canceled-subscription.js.map +0 -1
- package/src/lib/trigger/checkout-session-completed.d.ts +0 -11
- package/src/lib/trigger/checkout-session-completed.d.ts.map +0 -1
- package/src/lib/trigger/checkout-session-completed.js +0 -91
- package/src/lib/trigger/checkout-session-completed.js.map +0 -1
- package/src/lib/trigger/invoice-payment-failed.d.ts +0 -11
- package/src/lib/trigger/invoice-payment-failed.d.ts.map +0 -1
- package/src/lib/trigger/invoice-payment-failed.js +0 -101
- package/src/lib/trigger/invoice-payment-failed.js.map +0 -1
- package/src/lib/trigger/new-charge.d.ts +0 -3
- package/src/lib/trigger/new-charge.d.ts.map +0 -1
- package/src/lib/trigger/new-charge.js +0 -96
- package/src/lib/trigger/new-charge.js.map +0 -1
- package/src/lib/trigger/new-customer.d.ts +0 -3
- package/src/lib/trigger/new-customer.d.ts.map +0 -1
- package/src/lib/trigger/new-customer.js +0 -91
- package/src/lib/trigger/new-customer.js.map +0 -1
- package/src/lib/trigger/new-dispute.d.ts +0 -15
- package/src/lib/trigger/new-dispute.d.ts.map +0 -1
- package/src/lib/trigger/new-dispute.js +0 -99
- package/src/lib/trigger/new-dispute.js.map +0 -1
- package/src/lib/trigger/new-invoice.d.ts +0 -19
- package/src/lib/trigger/new-invoice.d.ts.map +0 -1
- package/src/lib/trigger/new-invoice.js +0 -114
- package/src/lib/trigger/new-invoice.js.map +0 -1
- package/src/lib/trigger/new-payment-link.d.ts +0 -3
- package/src/lib/trigger/new-payment-link.d.ts.map +0 -1
- package/src/lib/trigger/new-payment-link.js +0 -76
- package/src/lib/trigger/new-payment-link.js.map +0 -1
- package/src/lib/trigger/new-payment.d.ts +0 -3
- package/src/lib/trigger/new-payment.d.ts.map +0 -1
- package/src/lib/trigger/new-payment.js +0 -158
- package/src/lib/trigger/new-payment.js.map +0 -1
- package/src/lib/trigger/new-refund.d.ts +0 -15
- package/src/lib/trigger/new-refund.d.ts.map +0 -1
- package/src/lib/trigger/new-refund.js +0 -91
- package/src/lib/trigger/new-refund.js.map +0 -1
- package/src/lib/trigger/new-subscription.d.ts +0 -3
- package/src/lib/trigger/new-subscription.d.ts.map +0 -1
- package/src/lib/trigger/new-subscription.js +0 -197
- package/src/lib/trigger/new-subscription.js.map +0 -1
- package/src/lib/trigger/payment-failed.d.ts +0 -3
- package/src/lib/trigger/payment-failed.d.ts.map +0 -1
- package/src/lib/trigger/payment-failed.js +0 -204
- package/src/lib/trigger/payment-failed.js.map +0 -1
- package/src/lib/trigger/updated-subscription.d.ts +0 -15
- package/src/lib/trigger/updated-subscription.d.ts.map +0 -1
- package/src/lib/trigger/updated-subscription.js +0 -127
- package/src/lib/trigger/updated-subscription.js.map +0 -1
package/src/index.js
CHANGED
|
@@ -1,127 +1,26 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const payment_failed_1 = require("./lib/trigger/payment-failed");
|
|
16
|
-
const search_subscriptions_1 = require("./lib/actions/search-subscriptions");
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const create_payment_intent_1 = require("./lib/actions/create-payment-intent");
|
|
28
|
-
const create_product_1 = require("./lib/actions/create-product");
|
|
29
|
-
const create_price_1 = require("./lib/actions/create-price");
|
|
30
|
-
const create_subscription_1 = require("./lib/actions/create-subscription");
|
|
31
|
-
const cancel_subscription_1 = require("./lib/actions/cancel-subscription");
|
|
32
|
-
const retrieve_invoice_1 = require("./lib/actions/retrieve-invoice");
|
|
33
|
-
const retrieve_payout_1 = require("./lib/actions/retrieve-payout");
|
|
34
|
-
const create_refund_1 = require("./lib/actions/create-refund");
|
|
35
|
-
const create_payment_link_1 = require("./lib/actions/create-payment-link");
|
|
36
|
-
const deactivate_payment_link_1 = require("./lib/actions/deactivate-payment-link");
|
|
37
|
-
const retrieve_payment_intent_1 = require("./lib/actions/retrieve-payment-intent");
|
|
38
|
-
const find_invoice_1 = require("./lib/actions/find-invoice");
|
|
39
|
-
exports.stripeAuth = pieces_framework_1.PieceAuth.SecretText({
|
|
40
|
-
displayName: 'Secret API Key',
|
|
41
|
-
required: true,
|
|
42
|
-
description: 'Secret key acquired from your Stripe dashboard',
|
|
43
|
-
validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
44
|
-
try {
|
|
45
|
-
yield pieces_common_1.httpClient.sendRequest({
|
|
46
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
47
|
-
url: `https://api.stripe.com/v1/customers`,
|
|
48
|
-
headers: {
|
|
49
|
-
Authorization: `Bearer ${auth}`,
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
return {
|
|
53
|
-
valid: true,
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
catch (e) {
|
|
57
|
-
return {
|
|
58
|
-
valid: false,
|
|
59
|
-
error: 'Invalid API Key. Please check the key and try again.',
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
}),
|
|
63
|
-
});
|
|
64
|
-
exports.stripe = (0, pieces_framework_1.createPiece)({
|
|
65
|
-
displayName: 'Stripe',
|
|
66
|
-
description: 'Online payment processing for internet businesses',
|
|
67
|
-
minimumSupportedRelease: '0.30.0',
|
|
68
|
-
logoUrl: 'https://cdn.activepieces.com/pieces/stripe.png',
|
|
69
|
-
authors: [
|
|
70
|
-
'lldiegon',
|
|
71
|
-
'doskyft',
|
|
72
|
-
'kishanprmr',
|
|
73
|
-
'MoShizzle',
|
|
74
|
-
'AbdulTheActivePiecer',
|
|
75
|
-
'khaledmashaly',
|
|
76
|
-
'abuaboud',
|
|
77
|
-
'Prabhukiran161',
|
|
78
|
-
'sanket-a11y',
|
|
79
|
-
],
|
|
80
|
-
categories: [shared_1.PieceCategory.COMMERCE, shared_1.PieceCategory.PAYMENT_PROCESSING],
|
|
81
|
-
auth: exports.stripeAuth,
|
|
82
|
-
actions: [
|
|
83
|
-
create_customer_1.stripeCreateCustomer,
|
|
84
|
-
create_invoice_1.stripeCreateInvoice,
|
|
85
|
-
search_customer_1.stripeSearchCustomer,
|
|
86
|
-
search_subscriptions_1.stripeSearchSubscriptions,
|
|
87
|
-
retrieve_customer_1.stripeRetrieveCustomer,
|
|
88
|
-
update_customer_1.stripeUpdateCustomer,
|
|
89
|
-
create_payment_intent_1.stripeCreatePaymentIntent,
|
|
90
|
-
create_product_1.stripeCreateProduct,
|
|
91
|
-
create_price_1.stripeCreatePrice,
|
|
92
|
-
create_subscription_1.stripeCreateSubscription,
|
|
93
|
-
cancel_subscription_1.stripeCancelSubscription,
|
|
94
|
-
retrieve_invoice_1.stripeRetrieveInvoice,
|
|
95
|
-
retrieve_payout_1.stripeRetrievePayout,
|
|
96
|
-
create_refund_1.stripeCreateRefund,
|
|
97
|
-
create_payment_link_1.stripeCreatePaymentLink,
|
|
98
|
-
deactivate_payment_link_1.stripeDeactivatePaymentLink,
|
|
99
|
-
retrieve_payment_intent_1.stripeRetrievePaymentIntent,
|
|
100
|
-
find_invoice_1.stripeFindInvoice,
|
|
101
|
-
(0, pieces_common_1.createCustomApiCallAction)({
|
|
102
|
-
baseUrl: () => 'https://api.stripe.com/v1',
|
|
103
|
-
auth: exports.stripeAuth,
|
|
104
|
-
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
105
|
-
return ({
|
|
106
|
-
Authorization: `Bearer ${auth.secret_text}`,
|
|
107
|
-
});
|
|
108
|
-
}),
|
|
109
|
-
}),
|
|
110
|
-
],
|
|
111
|
-
triggers: [
|
|
112
|
-
new_payment_1.stripeNewPayment,
|
|
113
|
-
new_customer_1.stripeNewCustomer,
|
|
114
|
-
payment_failed_1.stripePaymentFailed,
|
|
115
|
-
new_subscription_1.stripeNewSubscription,
|
|
116
|
-
new_charge_1.stripeNewCharge,
|
|
117
|
-
new_invoice_1.stripeNewInvoice,
|
|
118
|
-
invoice_payment_failed_1.stripeInvoicePaymentFailed,
|
|
119
|
-
canceled_subscription_1.stripeCanceledSubscription,
|
|
120
|
-
new_refund_1.stripeNewRefund,
|
|
121
|
-
new_dispute_1.stripeNewDispute,
|
|
122
|
-
new_payment_link_1.stripeNewPaymentLink,
|
|
123
|
-
updated_subscription_1.stripeUpdatedSubscription,
|
|
124
|
-
checkout_session_completed_1.stripeCheckoutSessionCompleted,
|
|
125
|
-
],
|
|
126
|
-
});
|
|
127
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";var lg=Object.create;var mr=Object.defineProperty;var pg=Object.getOwnPropertyDescriptor;var dg=Object.getOwnPropertyNames;var mg=Object.getPrototypeOf,fg=Object.prototype.hasOwnProperty;var i=(t,e)=>mr(t,"name",{value:e,configurable:!0});var $=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),_n=(t,e)=>{for(var r in e)mr(t,r,{get:e[r],enumerable:!0})},os=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of dg(e))!fg.call(t,o)&&o!==r&&mr(t,o,{get:()=>e[o],enumerable:!(n=pg(e,o))||n.enumerable});return t};var we=(t,e,r)=>(r=t!=null?lg(mg(t)):{},os(e||!t||!t.__esModule?mr(r,"default",{value:t,enumerable:!0}):r,t)),hg=t=>os(mr({},"__esModule",{value:!0}),t);var xu=$((Pu,Un)=>{(function(t){"use strict";let e="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${e}\\.${e}\\.${e}\\.${e}$`,"i"),threeOctet:new RegExp(`^${e}\\.${e}\\.${e}$`,"i"),twoOctet:new RegExp(`^${e}\\.${e}$`,"i"),longValue:new RegExp(`^${e}$`,"i")},n=new RegExp("^0[0-7]+$","i"),o=new RegExp("^0x[a-f0-9]+$","i"),a="%[0-9a-z]{1,}",u="(?:[0-9a-f]+::?)+",p={zoneIndex:new RegExp(a,"i"),native:new RegExp(`^(::)?(${u})?([0-9a-f]+)?(::)?(${a})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${e}\\.${e}\\.${e}\\.${e}(${a})?)$`,"i"),transitional:new RegExp(`^((?:${u})|(?:::)(?:${u})?)${e}\\.${e}\\.${e}\\.${e}(${a})?$`,"i")};function d(c,f){if(c.indexOf("::")!==c.lastIndexOf("::"))return null;let _=0,y=-1,x=(c.match(p.zoneIndex)||[])[0],b,E;for(x&&(x=x.substring(1),c=c.replace(/%.+$/,""));(y=c.indexOf(":",y+1))>=0;)_++;if(c.substr(0,2)==="::"&&_--,c.substr(-2,2)==="::"&&_--,_>f)return null;for(E=f-_,b=":";E--;)b+="0:";return c=c.replace("::",b),c[0]===":"&&(c=c.slice(1)),c[c.length-1]===":"&&(c=c.slice(0,-1)),f=function(){let L=c.split(":"),J=[];for(let xe=0;xe<L.length;xe++)J.push(parseInt(L[xe],16));return J}(),{parts:f,zoneId:x}}i(d,"expandIPv6");function g(c,f,_,y){if(c.length!==f.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let x=0,b;for(;y>0;){if(b=_-y,b<0&&(b=0),c[x]>>b!==f[x]>>b)return!1;y-=_,x+=1}return!0}i(g,"matchCIDR");function m(c){if(o.test(c))return parseInt(c,16);if(c[0]==="0"&&!isNaN(parseInt(c[1],10))){if(n.test(c))return parseInt(c,8);throw new Error(`ipaddr: cannot parse ${c} as octal`)}return parseInt(c,10)}i(m,"parseIntAuto");function v(c,f){for(;c.length<f;)c=`0${c}`;return c}i(v,"padPart");let h={};h.IPv4=function(){function c(f){if(f.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let _,y;for(_=0;_<f.length;_++)if(y=f[_],!(0<=y&&y<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=f}return i(c,"IPv4"),c.prototype.SpecialRanges={unspecified:[[new c([0,0,0,0]),8]],broadcast:[[new c([255,255,255,255]),32]],multicast:[[new c([224,0,0,0]),4]],linkLocal:[[new c([169,254,0,0]),16]],loopback:[[new c([127,0,0,0]),8]],carrierGradeNat:[[new c([100,64,0,0]),10]],private:[[new c([10,0,0,0]),8],[new c([172,16,0,0]),12],[new c([192,168,0,0]),16]],reserved:[[new c([192,0,0,0]),24],[new c([192,0,2,0]),24],[new c([192,88,99,0]),24],[new c([198,18,0,0]),15],[new c([198,51,100,0]),24],[new c([203,0,113,0]),24],[new c([240,0,0,0]),4]],as112:[[new c([192,175,48,0]),24],[new c([192,31,196,0]),24]],amt:[[new c([192,52,193,0]),24]]},c.prototype.kind=function(){return"ipv4"},c.prototype.match=function(f,_){let y;if(_===void 0&&(y=f,f=y[0],_=y[1]),f.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return g(this.octets,f.octets,8,_)},c.prototype.prefixLengthFromSubnetMask=function(){let f=0,_=!1,y={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},x,b,E;for(x=3;x>=0;x-=1)if(b=this.octets[x],b in y){if(E=y[b],_&&E!==0)return null;E!==8&&(_=!0),f+=E}else return null;return 32-f},c.prototype.range=function(){return h.subnetMatch(this,this.SpecialRanges)},c.prototype.toByteArray=function(){return this.octets.slice(0)},c.prototype.toIPv4MappedAddress=function(){return h.IPv6.parse(`::ffff:${this.toString()}`)},c.prototype.toNormalizedString=function(){return this.toString()},c.prototype.toString=function(){return this.octets.join(".")},c}(),h.IPv4.broadcastAddressFromCIDR=function(c){try{let f=this.parseCIDR(c),_=f[0].toByteArray(),y=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),x=[],b=0;for(;b<4;)x.push(parseInt(_[b],10)|parseInt(y[b],10)^255),b++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},h.IPv4.isIPv4=function(c){return this.parser(c)!==null},h.IPv4.isValid=function(c){try{return new this(this.parser(c)),!0}catch{return!1}},h.IPv4.isValidCIDR=function(c){try{return this.parseCIDR(c),!0}catch{return!1}},h.IPv4.isValidFourPartDecimal=function(c){return!!(h.IPv4.isValid(c)&&c.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},h.IPv4.isValidCIDRFourPartDecimal=function(c){let f=c.match(/^(.+)\/(\d+)$/);return!h.IPv4.isValidCIDR(c)||!f?!1:h.IPv4.isValidFourPartDecimal(f[1])},h.IPv4.networkAddressFromCIDR=function(c){let f,_,y,x,b;try{for(f=this.parseCIDR(c),y=f[0].toByteArray(),b=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),x=[],_=0;_<4;)x.push(parseInt(y[_],10)&parseInt(b[_],10)),_++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},h.IPv4.parse=function(c){let f=this.parser(c);if(f===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(f)},h.IPv4.parseCIDR=function(c){let f;if(f=c.match(/^(.+)\/(\d+)$/)){let _=parseInt(f[2]);if(_>=0&&_<=32){let y=[this.parse(f[1]),_];return Object.defineProperty(y,"toString",{value:i(function(){return this.join("/")},"value")}),y}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},h.IPv4.parser=function(c){let f,_,y;if(f=c.match(r.fourOctet))return function(){let x=f.slice(1,6),b=[];for(let E=0;E<x.length;E++)_=x[E],b.push(m(_));return b}();if(f=c.match(r.longValue)){if(y=m(f[1]),y>4294967295||y<0)throw new Error("ipaddr: address outside defined range");return function(){let x=[],b;for(b=0;b<=24;b+=8)x.push(y>>b&255);return x}().reverse()}else return(f=c.match(r.twoOctet))?function(){let x=f.slice(1,4),b=[];if(y=m(x[1]),y>16777215||y<0)throw new Error("ipaddr: address outside defined range");return b.push(m(x[0])),b.push(y>>16&255),b.push(y>>8&255),b.push(y&255),b}():(f=c.match(r.threeOctet))?function(){let x=f.slice(1,5),b=[];if(y=m(x[2]),y>65535||y<0)throw new Error("ipaddr: address outside defined range");return b.push(m(x[0])),b.push(m(x[1])),b.push(y>>8&255),b.push(y&255),b}():null},h.IPv4.subnetMaskFromPrefixLength=function(c){if(c=parseInt(c),c<0||c>32)throw new Error("ipaddr: invalid IPv4 prefix length");let f=[0,0,0,0],_=0,y=Math.floor(c/8);for(;_<y;)f[_]=255,_++;return y<4&&(f[y]=Math.pow(2,c%8)-1<<8-c%8),new this(f)},h.IPv6=function(){function c(f,_){let y,x;if(f.length===16)for(this.parts=[],y=0;y<=14;y+=2)this.parts.push(f[y]<<8|f[y+1]);else if(f.length===8)this.parts=f;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(y=0;y<this.parts.length;y++)if(x=this.parts[y],!(0<=x&&x<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");_&&(this.zoneId=_)}return i(c,"IPv6"),c.prototype.SpecialRanges={unspecified:[new c([0,0,0,0,0,0,0,0]),128],linkLocal:[new c([65152,0,0,0,0,0,0,0]),10],multicast:[new c([65280,0,0,0,0,0,0,0]),8],loopback:[new c([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new c([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new c([0,0,0,0,0,65535,0,0]),96],discard:[new c([256,0,0,0,0,0,0,0]),64],rfc6145:[new c([0,0,0,0,65535,0,0,0]),96],rfc6052:[new c([100,65435,0,0,0,0,0,0]),96],"6to4":[new c([8194,0,0,0,0,0,0,0]),16],teredo:[new c([8193,0,0,0,0,0,0,0]),32],benchmarking:[new c([8193,2,0,0,0,0,0,0]),48],amt:[new c([8193,3,0,0,0,0,0,0]),32],as112v6:[[new c([8193,4,274,0,0,0,0,0]),48],[new c([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new c([8193,16,0,0,0,0,0,0]),28],orchid2:[new c([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new c([8193,48,0,0,0,0,0,0]),28],reserved:[[new c([8193,0,0,0,0,0,0,0]),23],[new c([8193,3512,0,0,0,0,0,0]),32]]},c.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},c.prototype.kind=function(){return"ipv6"},c.prototype.match=function(f,_){let y;if(_===void 0&&(y=f,f=y[0],_=y[1]),f.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return g(this.parts,f.parts,16,_)},c.prototype.prefixLengthFromSubnetMask=function(){let f=0,_=!1,y={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},x,b;for(let E=7;E>=0;E-=1)if(x=this.parts[E],x in y){if(b=y[x],_&&b!==0)return null;b!==16&&(_=!0),f+=b}else return null;return 128-f},c.prototype.range=function(){return h.subnetMatch(this,this.SpecialRanges)},c.prototype.toByteArray=function(){let f,_=[],y=this.parts;for(let x=0;x<y.length;x++)f=y[x],_.push(f>>8),_.push(f&255);return _},c.prototype.toFixedLengthString=function(){let f=function(){let y=[];for(let x=0;x<this.parts.length;x++)y.push(v(this.parts[x].toString(16),4));return y}.call(this).join(":"),_="";return this.zoneId&&(_=`%${this.zoneId}`),f+_},c.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let f=this.parts.slice(-2),_=f[0],y=f[1];return new h.IPv4([_>>8,_&255,y>>8,y&255])},c.prototype.toNormalizedString=function(){let f=function(){let y=[];for(let x=0;x<this.parts.length;x++)y.push(this.parts[x].toString(16));return y}.call(this).join(":"),_="";return this.zoneId&&(_=`%${this.zoneId}`),f+_},c.prototype.toRFC5952String=function(){let f=/((^|:)(0(:|$)){2,})/g,_=this.toNormalizedString(),y=0,x=-1,b;for(;b=f.exec(_);)b[0].length>x&&(y=b.index,x=b[0].length);return x<0?_:`${_.substring(0,y)}::${_.substring(y+x)}`},c.prototype.toString=function(){return this.toRFC5952String()},c}(),h.IPv6.broadcastAddressFromCIDR=function(c){try{let f=this.parseCIDR(c),_=f[0].toByteArray(),y=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),x=[],b=0;for(;b<16;)x.push(parseInt(_[b],10)|parseInt(y[b],10)^255),b++;return new this(x)}catch(f){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${f})`)}},h.IPv6.isIPv6=function(c){return this.parser(c)!==null},h.IPv6.isValid=function(c){if(typeof c=="string"&&c.indexOf(":")===-1)return!1;try{let f=this.parser(c);return new this(f.parts,f.zoneId),!0}catch{return!1}},h.IPv6.isValidCIDR=function(c){if(typeof c=="string"&&c.indexOf(":")===-1)return!1;try{return this.parseCIDR(c),!0}catch{return!1}},h.IPv6.networkAddressFromCIDR=function(c){let f,_,y,x,b;try{for(f=this.parseCIDR(c),y=f[0].toByteArray(),b=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),x=[],_=0;_<16;)x.push(parseInt(y[_],10)&parseInt(b[_],10)),_++;return new this(x)}catch(E){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${E})`)}},h.IPv6.parse=function(c){let f=this.parser(c);if(f.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(f.parts,f.zoneId)},h.IPv6.parseCIDR=function(c){let f,_,y;if((_=c.match(/^(.+)\/(\d+)$/))&&(f=parseInt(_[2]),f>=0&&f<=128))return y=[this.parse(_[1]),f],Object.defineProperty(y,"toString",{value:i(function(){return this.join("/")},"value")}),y;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},h.IPv6.parser=function(c){let f,_,y,x,b,E;if(y=c.match(p.deprecatedTransitional))return this.parser(`::ffff:${y[1]}`);if(p.native.test(c))return d(c,8);if((y=c.match(p.transitional))&&(E=y[6]||"",f=y[1],y[1].endsWith("::")||(f=f.slice(0,-1)),f=d(f+E,6),f.parts)){for(b=[parseInt(y[2]),parseInt(y[3]),parseInt(y[4]),parseInt(y[5])],_=0;_<b.length;_++)if(x=b[_],!(0<=x&&x<=255))return null;return f.parts.push(b[0]<<8|b[1]),f.parts.push(b[2]<<8|b[3]),{parts:f.parts,zoneId:f.zoneId}}return null},h.IPv6.subnetMaskFromPrefixLength=function(c){if(c=parseInt(c),c<0||c>128)throw new Error("ipaddr: invalid IPv6 prefix length");let f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],_=0,y=Math.floor(c/8);for(;_<y;)f[_]=255,_++;return y<16&&(f[y]=Math.pow(2,c%8)-1<<8-c%8),new this(f)},h.fromByteArray=function(c){let f=c.length;if(f===4)return new h.IPv4(c);if(f===16)return new h.IPv6(c);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},h.isValid=function(c){return h.IPv6.isValid(c)||h.IPv4.isValid(c)},h.isValidCIDR=function(c){return h.IPv6.isValidCIDR(c)||h.IPv4.isValidCIDR(c)},h.parse=function(c){if(h.IPv6.isValid(c))return h.IPv6.parse(c);if(h.IPv4.isValid(c))return h.IPv4.parse(c);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},h.parseCIDR=function(c){try{return h.IPv6.parseCIDR(c)}catch{try{return h.IPv4.parseCIDR(c)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},h.process=function(c){let f=this.parse(c);return f.kind()==="ipv6"&&f.isIPv4MappedAddress()?f.toIPv4Address():f},h.subnetMatch=function(c,f,_){let y,x,b,E;_==null&&(_="unicast");for(x in f)if(Object.prototype.hasOwnProperty.call(f,x)){for(b=f[x],b[0]&&!(b[0]instanceof Array)&&(b=[b]),y=0;y<b.length;y++)if(E=b[y],c.kind()===E[0].kind()&&c.match.apply(c,E))return x}return _},typeof Un<"u"&&Un.exports?Un.exports=h:t.ipaddr=h})(Pu)});var yc=$((XM,gc)=>{var hc=require("stream").Stream,Vv=require("util");gc.exports=ke;function ke(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}i(ke,"DelayedStream");Vv.inherits(ke,hc);ke.create=function(t,e){var r=new this;e=e||{};for(var n in e)r[n]=e[n];r.source=t;var o=t.emit;return t.emit=function(){return r._handleEmit(arguments),o.apply(t,arguments)},t.on("error",function(){}),r.pauseStream&&t.pause(),r};Object.defineProperty(ke.prototype,"readable",{configurable:!0,enumerable:!0,get:i(function(){return this.source.readable},"get")});ke.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};ke.prototype.resume=function(){this._released||this.release(),this.source.resume()};ke.prototype.pause=function(){this.source.pause()};ke.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(t){this.emit.apply(this,t)}.bind(this)),this._bufferedEvents=[]};ke.prototype.pipe=function(){var t=hc.prototype.pipe.apply(this,arguments);return this.resume(),t};ke.prototype._handleEmit=function(t){if(this._released){this.emit.apply(this,t);return}t[0]==="data"&&(this.dataSize+=t[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(t)};ke.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(t))}}});var xc=$((QM,Pc)=>{var Zv=require("util"),_c=require("stream").Stream,vc=yc();Pc.exports=ue;function ue(){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}i(ue,"CombinedStream");Zv.inherits(ue,_c);ue.create=function(t){var e=new this;t=t||{};for(var r in t)e[r]=t[r];return e};ue.isStreamLike=function(t){return typeof t!="function"&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"&&!Buffer.isBuffer(t)};ue.prototype.append=function(t){var e=ue.isStreamLike(t);if(e){if(!(t instanceof vc)){var r=vc.create(t,{maxDataSize:1/0,pauseStream:this.pauseStreams});t.on("data",this._checkDataSize.bind(this)),t=r}this._handleErrors(t),this.pauseStreams&&t.pause()}return this._streams.push(t),this};ue.prototype.pipe=function(t,e){return _c.prototype.pipe.call(this,t,e),this.resume(),t};ue.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}};ue.prototype._realGetNext=function(){var t=this._streams.shift();if(typeof t>"u"){this.end();return}if(typeof t!="function"){this._pipeNext(t);return}var e=t;e(function(r){var n=ue.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};ue.prototype._pipeNext=function(t){this._currentStream=t;var e=ue.isStreamLike(t);if(e){t.on("end",this._getNext.bind(this)),t.pipe(this,{end:!1});return}var r=t;this.write(r),this._getNext()};ue.prototype._handleErrors=function(t){var e=this;t.on("error",function(r){e._emitError(r)})};ue.prototype.write=function(t){this.emit("data",t)};ue.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};ue.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")};ue.prototype.end=function(){this._reset(),this.emit("end")};ue.prototype.destroy=function(){this._reset(),this.emit("close")};ue.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};ue.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(t))}};ue.prototype._updateDataSize=function(){this.dataSize=0;var t=this;this._streams.forEach(function(e){e.dataSize&&(t.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};ue.prototype._emitError=function(t){this._reset(),this.emit("error",t)}});var Tc=$((t0,bc)=>{"use strict";bc.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 Ic=$(Te=>{"use strict";var Vn=Tc(),Gv=require("path").extname,Sc=/^\s*([^;\s]*)(?:;|\s|$)/,Hv=/^text\//i;Te.charset=Ec;Te.charsets={lookup:Ec};Te.contentType=Wv;Te.extension=Kv;Te.extensions=Object.create(null);Te.lookup=Jv;Te.types=Object.create(null);Xv(Te.extensions,Te.types);function Ec(t){if(!t||typeof t!="string")return!1;var e=Sc.exec(t),r=e&&Vn[e[1].toLowerCase()];return r&&r.charset?r.charset:e&&Hv.test(e[1])?"UTF-8":!1}i(Ec,"charset");function Wv(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?Te.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var r=Te.charset(e);r&&(e+="; charset="+r.toLowerCase())}return e}i(Wv,"contentType");function Kv(t){if(!t||typeof t!="string")return!1;var e=Sc.exec(t),r=e&&Te.extensions[e[1].toLowerCase()];return!r||!r.length?!1:r[0]}i(Kv,"extension");function Jv(t){if(!t||typeof t!="string")return!1;var e=Gv("x."+t).toLowerCase().substr(1);return e&&Te.types[e]||!1}i(Jv,"lookup");function Xv(t,e){var r=["nginx","apache",void 0,"iana"];Object.keys(Vn).forEach(i(function(o){var a=Vn[o],u=a.extensions;if(!(!u||!u.length)){t[o]=u;for(var p=0;p<u.length;p++){var d=u[p];if(e[d]){var g=r.indexOf(Vn[e[d]].source),m=r.indexOf(a.source);if(e[d]!=="application/octet-stream"&&(g>m||g===m&&e[d].substr(0,12)==="application/"))continue}e[d]=o}}},"forEachMimeType"))}i(Xv,"populateMaps")});var wc=$((o0,Ac)=>{Ac.exports=Yv;function Yv(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}i(Yv,"defer")});var Li=$((a0,Oc)=>{var $c=wc();Oc.exports=Qv;function Qv(t){var e=!1;return $c(function(){e=!0}),i(function(n,o){e?t(n,o):$c(i(function(){t(n,o)},"nextTick_callback"))},"async_callback")}i(Qv,"async")});var ji=$((u0,kc)=>{kc.exports=e_;function e_(t){Object.keys(t.jobs).forEach(t_.bind(t)),t.jobs={}}i(e_,"abort");function t_(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}i(t_,"clean")});var Fi=$((l0,Rc)=>{var zc=Li(),r_=ji();Rc.exports=n_;function n_(t,e,r,n){var o=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[o]=o_(e,o,t[o],function(a,u){o in r.jobs&&(delete r.jobs[o],a?r_(r):r.results[o]=u,n(a,r.results))})}i(n_,"iterate");function o_(t,e,r,n){var o;return t.length==2?o=t(r,zc(n)):o=t(r,e,zc(n)),o}i(o_,"runJob")});var Bi=$((d0,Cc)=>{Cc.exports=i_;function i_(t,e){var r=!Array.isArray(t),n={index:0,keyedList:r||e?Object.keys(t):null,jobs:{},results:r?{}:[],size:r?Object.keys(t).length:t.length};return e&&n.keyedList.sort(r?e:function(o,a){return e(t[o],t[a])}),n}i(i_,"state")});var qi=$((f0,Dc)=>{var a_=ji(),s_=Li();Dc.exports=u_;function u_(t){Object.keys(this.jobs).length&&(this.index=this.size,a_(this),s_(t)(null,this.results))}i(u_,"terminator")});var Mc=$((g0,Nc)=>{var c_=Fi(),l_=Bi(),p_=qi();Nc.exports=d_;function d_(t,e,r){for(var n=l_(t);n.index<(n.keyedList||t).length;)c_(t,e,n,function(o,a){if(o){r(o,a);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return p_.bind(n,r)}i(d_,"parallel")});var Vi=$((v0,Zn)=>{var Uc=Fi(),m_=Bi(),f_=qi();Zn.exports=h_;Zn.exports.ascending=Lc;Zn.exports.descending=g_;function h_(t,e,r,n){var o=m_(t,r);return Uc(t,e,o,i(function a(u,p){if(u){n(u,p);return}if(o.index++,o.index<(o.keyedList||t).length){Uc(t,e,o,a);return}n(null,o.results)},"iteratorHandler")),f_.bind(o,n)}i(h_,"serialOrdered");function Lc(t,e){return t<e?-1:t>e?1:0}i(Lc,"ascending");function g_(t,e){return-1*Lc(t,e)}i(g_,"descending")});var Fc=$((P0,jc)=>{var y_=Vi();jc.exports=v_;function v_(t,e,r){return y_(t,e,null,r)}i(v_,"serial")});var qc=$((b0,Bc)=>{Bc.exports={parallel:Mc(),serial:Fc(),serialOrdered:Vi()}});var Zi=$((T0,Vc)=>{"use strict";Vc.exports=Object});var Gc=$((S0,Zc)=>{"use strict";Zc.exports=Error});var Wc=$((E0,Hc)=>{"use strict";Hc.exports=EvalError});var Jc=$((I0,Kc)=>{"use strict";Kc.exports=RangeError});var Yc=$((A0,Xc)=>{"use strict";Xc.exports=ReferenceError});var el=$((w0,Qc)=>{"use strict";Qc.exports=SyntaxError});var ut=$(($0,tl)=>{"use strict";tl.exports=TypeError});var nl=$((O0,rl)=>{"use strict";rl.exports=URIError});var il=$((k0,ol)=>{"use strict";ol.exports=Math.abs});var sl=$((z0,al)=>{"use strict";al.exports=Math.floor});var cl=$((R0,ul)=>{"use strict";ul.exports=Math.max});var pl=$((C0,ll)=>{"use strict";ll.exports=Math.min});var ml=$((D0,dl)=>{"use strict";dl.exports=Math.pow});var hl=$((N0,fl)=>{"use strict";fl.exports=Math.round});var yl=$((M0,gl)=>{"use strict";gl.exports=Number.isNaN||i(function(e){return e!==e},"isNaN")});var _l=$((L0,vl)=>{"use strict";var __=yl();vl.exports=i(function(e){return __(e)||e===0?e:e<0?-1:1},"sign")});var xl=$((F0,Pl)=>{"use strict";Pl.exports=Object.getOwnPropertyDescriptor});var Gi=$((B0,bl)=>{"use strict";var Gn=xl();if(Gn)try{Gn([],"length")}catch{Gn=null}bl.exports=Gn});var Sl=$((q0,Tl)=>{"use strict";var Hn=Object.defineProperty||!1;if(Hn)try{Hn({},"a",{value:1})}catch{Hn=!1}Tl.exports=Hn});var Hi=$((V0,El)=>{"use strict";El.exports=i(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},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 o=42;e[r]=o;for(var a in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var u=Object.getOwnPropertySymbols(e);if(u.length!==1||u[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var p=Object.getOwnPropertyDescriptor(e,r);if(p.value!==o||p.enumerable!==!0)return!1}return!0},"hasSymbols")});var wl=$((G0,Al)=>{"use strict";var Il=typeof Symbol<"u"&&Symbol,P_=Hi();Al.exports=i(function(){return typeof Il!="function"||typeof Symbol!="function"||typeof Il("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:P_()},"hasNativeSymbols")});var Wi=$((W0,$l)=>{"use strict";$l.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Ki=$((K0,Ol)=>{"use strict";var x_=Zi();Ol.exports=x_.getPrototypeOf||null});var Rl=$((J0,zl)=>{"use strict";var b_="Function.prototype.bind called on incompatible ",T_=Object.prototype.toString,S_=Math.max,E_="[object Function]",kl=i(function(e,r){for(var n=[],o=0;o<e.length;o+=1)n[o]=e[o];for(var a=0;a<r.length;a+=1)n[a+e.length]=r[a];return n},"concatty"),I_=i(function(e,r){for(var n=[],o=r||0,a=0;o<e.length;o+=1,a+=1)n[a]=e[o];return n},"slicy"),A_=i(function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r},"joiny");zl.exports=i(function(e){var r=this;if(typeof r!="function"||T_.apply(r)!==E_)throw new TypeError(b_+r);for(var n=I_(arguments,1),o,a=i(function(){if(this instanceof o){var m=r.apply(this,kl(n,arguments));return Object(m)===m?m:this}return r.apply(e,kl(n,arguments))},"binder"),u=S_(0,r.length-n.length),p=[],d=0;d<u;d++)p[d]="$"+d;if(o=Function("binder","return function ("+A_(p,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var g=i(function(){},"Empty");g.prototype=r.prototype,o.prototype=new g,g.prototype=null}return o},"bind")});var Ft=$((Y0,Cl)=>{"use strict";var w_=Rl();Cl.exports=Function.prototype.bind||w_});var Wn=$((Q0,Dl)=>{"use strict";Dl.exports=Function.prototype.call});var Ji=$((eU,Nl)=>{"use strict";Nl.exports=Function.prototype.apply});var Ul=$((tU,Ml)=>{"use strict";Ml.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var jl=$((rU,Ll)=>{"use strict";var $_=Ft(),O_=Ji(),k_=Wn(),z_=Ul();Ll.exports=z_||$_.call(k_,O_)});var Xi=$((nU,Fl)=>{"use strict";var R_=Ft(),C_=ut(),D_=Wn(),N_=jl();Fl.exports=i(function(e){if(e.length<1||typeof e[0]!="function")throw new C_("a function is required");return N_(R_,D_,e)},"callBindBasic")});var Hl=$((iU,Gl)=>{"use strict";var M_=Xi(),Bl=Gi(),Vl;try{Vl=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var Yi=!!Vl&&Bl&&Bl(Object.prototype,"__proto__"),Zl=Object,ql=Zl.getPrototypeOf;Gl.exports=Yi&&typeof Yi.get=="function"?M_([Yi.get]):typeof ql=="function"?i(function(e){return ql(e==null?e:Zl(e))},"getDunder"):!1});var Yl=$((sU,Xl)=>{"use strict";var Wl=Wi(),Kl=Ki(),Jl=Hl();Xl.exports=Wl?i(function(e){return Wl(e)},"getProto"):Kl?i(function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return Kl(e)},"getProto"):Jl?i(function(e){return Jl(e)},"getProto"):null});var Qi=$((cU,Ql)=>{"use strict";var U_=Function.prototype.call,L_=Object.prototype.hasOwnProperty,j_=Ft();Ql.exports=j_.call(U_,L_)});var Nr=$((lU,ip)=>{"use strict";var G,F_=Zi(),B_=Gc(),q_=Wc(),V_=Jc(),Z_=Yc(),Zt=el(),Vt=ut(),G_=nl(),H_=il(),W_=sl(),K_=cl(),J_=pl(),X_=ml(),Y_=hl(),Q_=_l(),np=Function,ea=i(function(t){try{return np('"use strict"; return ('+t+").constructor;")()}catch{}},"getEvalledConstructor"),Rr=Gi(),eP=Sl(),ta=i(function(){throw new Vt},"throwTypeError"),tP=Rr?function(){try{return arguments.callee,ta}catch{try{return Rr(arguments,"callee").get}catch{return ta}}}():ta,Bt=wl()(),ge=Yl(),rP=Ki(),nP=Wi(),op=Ji(),Cr=Wn(),qt={},oP=typeof Uint8Array>"u"||!ge?G:ge(Uint8Array),bt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?G:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?G:ArrayBuffer,"%ArrayIteratorPrototype%":Bt&&ge?ge([][Symbol.iterator]()):G,"%AsyncFromSyncIteratorPrototype%":G,"%AsyncFunction%":qt,"%AsyncGenerator%":qt,"%AsyncGeneratorFunction%":qt,"%AsyncIteratorPrototype%":qt,"%Atomics%":typeof Atomics>"u"?G:Atomics,"%BigInt%":typeof BigInt>"u"?G:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?G:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?G:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?G:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":B_,"%eval%":eval,"%EvalError%":q_,"%Float16Array%":typeof Float16Array>"u"?G:Float16Array,"%Float32Array%":typeof Float32Array>"u"?G:Float32Array,"%Float64Array%":typeof Float64Array>"u"?G:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?G:FinalizationRegistry,"%Function%":np,"%GeneratorFunction%":qt,"%Int8Array%":typeof Int8Array>"u"?G:Int8Array,"%Int16Array%":typeof Int16Array>"u"?G:Int16Array,"%Int32Array%":typeof Int32Array>"u"?G:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Bt&&ge?ge(ge([][Symbol.iterator]())):G,"%JSON%":typeof JSON=="object"?JSON:G,"%Map%":typeof Map>"u"?G:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Bt||!ge?G:ge(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":F_,"%Object.getOwnPropertyDescriptor%":Rr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?G:Promise,"%Proxy%":typeof Proxy>"u"?G:Proxy,"%RangeError%":V_,"%ReferenceError%":Z_,"%Reflect%":typeof Reflect>"u"?G:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?G:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Bt||!ge?G:ge(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?G:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Bt&&ge?ge(""[Symbol.iterator]()):G,"%Symbol%":Bt?Symbol:G,"%SyntaxError%":Zt,"%ThrowTypeError%":tP,"%TypedArray%":oP,"%TypeError%":Vt,"%Uint8Array%":typeof Uint8Array>"u"?G:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?G:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?G:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?G:Uint32Array,"%URIError%":G_,"%WeakMap%":typeof WeakMap>"u"?G:WeakMap,"%WeakRef%":typeof WeakRef>"u"?G:WeakRef,"%WeakSet%":typeof WeakSet>"u"?G:WeakSet,"%Function.prototype.call%":Cr,"%Function.prototype.apply%":op,"%Object.defineProperty%":eP,"%Object.getPrototypeOf%":rP,"%Math.abs%":H_,"%Math.floor%":W_,"%Math.max%":K_,"%Math.min%":J_,"%Math.pow%":X_,"%Math.round%":Y_,"%Math.sign%":Q_,"%Reflect.getPrototypeOf%":nP};if(ge)try{null.error}catch(t){ep=ge(ge(t)),bt["%Error.prototype%"]=ep}var ep,iP=i(function t(e){var r;if(e==="%AsyncFunction%")r=ea("async function () {}");else if(e==="%GeneratorFunction%")r=ea("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=ea("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&ge&&(r=ge(o.prototype))}return bt[e]=r,r},"doEval"),tp={__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"]},Dr=Ft(),Kn=Qi(),aP=Dr.call(Cr,Array.prototype.concat),sP=Dr.call(op,Array.prototype.splice),rp=Dr.call(Cr,String.prototype.replace),Jn=Dr.call(Cr,String.prototype.slice),uP=Dr.call(Cr,RegExp.prototype.exec),cP=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,lP=/\\(\\)?/g,pP=i(function(e){var r=Jn(e,0,1),n=Jn(e,-1);if(r==="%"&&n!=="%")throw new Zt("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Zt("invalid intrinsic syntax, expected opening `%`");var o=[];return rp(e,cP,function(a,u,p,d){o[o.length]=p?rp(d,lP,"$1"):u||a}),o},"stringToPath"),dP=i(function(e,r){var n=e,o;if(Kn(tp,n)&&(o=tp[n],n="%"+o[0]+"%"),Kn(bt,n)){var a=bt[n];if(a===qt&&(a=iP(n)),typeof a>"u"&&!r)throw new Vt("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:a}}throw new Zt("intrinsic "+e+" does not exist!")},"getBaseIntrinsic");ip.exports=i(function(e,r){if(typeof e!="string"||e.length===0)throw new Vt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Vt('"allowMissing" argument must be a boolean');if(uP(/^%?[^%]*%?$/,e)===null)throw new Zt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=pP(e),o=n.length>0?n[0]:"",a=dP("%"+o+"%",r),u=a.name,p=a.value,d=!1,g=a.alias;g&&(o=g[0],sP(n,aP([0,1],g)));for(var m=1,v=!0;m<n.length;m+=1){var h=n[m],c=Jn(h,0,1),f=Jn(h,-1);if((c==='"'||c==="'"||c==="`"||f==='"'||f==="'"||f==="`")&&c!==f)throw new Zt("property names with quotes must have matching quotes");if((h==="constructor"||!v)&&(d=!0),o+="."+h,u="%"+o+"%",Kn(bt,u))p=bt[u];else if(p!=null){if(!(h in p)){if(!r)throw new Vt("base intrinsic for "+e+" exists, but the property is not available.");return}if(Rr&&m+1>=n.length){var _=Rr(p,h);v=!!_,v&&"get"in _&&!("originalValue"in _.get)?p=_.get:p=p[h]}else v=Kn(p,h),p=p[h];v&&!d&&(bt[u]=p)}}return p},"GetIntrinsic")});var sp=$((dU,ap)=>{"use strict";var mP=Hi();ap.exports=i(function(){return mP()&&!!Symbol.toStringTag},"hasToStringTagShams")});var lp=$((fU,cp)=>{"use strict";var fP=Nr(),up=fP("%Object.defineProperty%",!0),hP=sp()(),gP=Qi(),yP=ut(),Xn=hP?Symbol.toStringTag:null;cp.exports=i(function(e,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,o=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof o<"u"&&typeof o!="boolean")throw new yP("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Xn&&(n||!gP(e,Xn))&&(up?up(e,Xn,{configurable:!o,enumerable:!1,value:r,writable:!1}):e[Xn]=r)},"setToStringTag")});var dp=$((gU,pp)=>{"use strict";var vP=Function.prototype.call,_P=Object.prototype.hasOwnProperty,PP=Ft();pp.exports=PP.call(vP,_P)});var fp=$((yU,mp)=>{"use strict";mp.exports=function(t,e){return Object.keys(e).forEach(function(r){t[r]=t[r]||e[r]}),t}});var yp=$((vU,gp)=>{"use strict";var ia=xc(),xP=require("util"),ra=require("path"),bP=require("http"),TP=require("https"),SP=require("url").parse,EP=require("fs"),IP=require("stream").Stream,AP=require("crypto"),na=Ic(),wP=qc(),$P=lp(),ct=dp(),oa=fp();function hp(t){return String(t).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}i(hp,"escapeHeaderParam");function H(t){if(!(this instanceof H))return new H(t);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],ia.call(this),t=t||{};for(var e in t)this[e]=t[e]}i(H,"FormData");xP.inherits(H,ia);H.LINE_BREAK=`\r
|
|
2
|
+
`;H.DEFAULT_CONTENT_TYPE="application/octet-stream";H.prototype.append=function(t,e,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=ia.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(t,e,r),a=this._multiPartFooter();n(o),n(e),n(a),this._trackLength(o,e,r)};H.prototype._trackLength=function(t,e,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(e)?n=e.length:typeof e=="string"&&(n=Buffer.byteLength(e)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(t)+H.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&ct(e,"httpVersion"))&&!(e instanceof IP))&&(r.knownLength||this._valuesToMeasure.push(e))};H.prototype._lengthRetriever=function(t,e){ct(t,"fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):EP.stat(t.path,function(r,n){if(r){e(r);return}var o=n.size-(t.start?t.start:0);e(null,o)}):ct(t,"httpVersion")?e(null,Number(t.headers["content-length"])):ct(t,"httpModule")?(t.on("response",function(r){t.pause(),e(null,Number(r.headers["content-length"]))}),t.resume()):e("Unknown stream")};H.prototype._multiPartHeader=function(t,e,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(e,r),o=this._getContentType(e,r),a="",u={"Content-Disposition":["form-data",'name="'+hp(t)+'"'].concat(n||[]),"Content-Type":[].concat(o||[])};typeof r.header=="object"&&oa(u,r.header);var p;for(var d in u)if(ct(u,d)){if(p=u[d],p==null)continue;Array.isArray(p)||(p=[p]),p.length&&(a+=d+": "+p.join("; ")+H.LINE_BREAK)}return"--"+this.getBoundary()+H.LINE_BREAK+a+H.LINE_BREAK};H.prototype._getContentDisposition=function(t,e){var r;if(typeof e.filepath=="string"?r=ra.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?r=ra.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&ct(t,"httpVersion")&&(r=ra.basename(t.client._httpMessage.path||"")),r)return'filename="'+hp(r)+'"'};H.prototype._getContentType=function(t,e){var r=e.contentType;return!r&&t&&t.name&&(r=na.lookup(t.name)),!r&&t&&t.path&&(r=na.lookup(t.path)),!r&&t&&t.readable&&ct(t,"httpVersion")&&(r=t.headers["content-type"]),!r&&(e.filepath||e.filename)&&(r=na.lookup(e.filepath||e.filename)),!r&&t&&typeof t=="object"&&(r=H.DEFAULT_CONTENT_TYPE),r};H.prototype._multiPartFooter=function(){return function(t){var e=H.LINE_BREAK,r=this._streams.length===0;r&&(e+=this._lastBoundary()),t(e)}.bind(this)};H.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+H.LINE_BREAK};H.prototype.getHeaders=function(t){var e,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)ct(t,e)&&(r[e.toLowerCase()]=t[e]);return r};H.prototype.setBoundary=function(t){if(typeof t!="string")throw new TypeError("FormData boundary must be a string");this._boundary=t};H.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};H.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?t=Buffer.concat([t,this._streams[r]]):t=Buffer.concat([t,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(H.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};H.prototype._generateBoundary=function(){this._boundary="--------------------------"+AP.randomBytes(12).toString("hex")};H.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};H.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};H.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}wP.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){t(r);return}n.forEach(function(o){e+=o}),t(null,e)})};H.prototype.submit=function(t,e){var r,n,o={method:"post"};return typeof t=="string"?(t=SP(t),n=oa({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},o)):(n=oa(t,o),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(t.headers),n.protocol==="https:"?r=TP.request(n):r=bP.request(n),this.getLength(function(a,u){if(a&&a!=="Unknown stream"){this._error(a);return}if(u&&r.setHeader("Content-Length",u),this.pipe(r),e){var p,d=i(function(g,m){return r.removeListener("error",d),r.removeListener("response",p),e.call(this,g,m)},"callback");p=d.bind(this,null),r.on("error",d),r.on("response",p)}}.bind(this)),r};H.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error",t))};H.prototype.toString=function(){return"[object FormData]"};$P(H.prototype,"FormData");gp.exports=H});var Ip=$((aL,Ep)=>{Ep.exports=require("util").inspect});var Br=$((sL,Gp)=>{var va=typeof Map=="function"&&Map.prototype,ca=Object.getOwnPropertyDescriptor&&va?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,to=va&&ca&&typeof ca.get=="function"?ca.get:null,Ap=va&&Map.prototype.forEach,_a=typeof Set=="function"&&Set.prototype,la=Object.getOwnPropertyDescriptor&&_a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ro=_a&&la&&typeof la.get=="function"?la.get:null,wp=_a&&Set.prototype.forEach,LP=typeof WeakMap=="function"&&WeakMap.prototype,Lr=LP?WeakMap.prototype.has:null,jP=typeof WeakSet=="function"&&WeakSet.prototype,jr=jP?WeakSet.prototype.has:null,FP=typeof WeakRef=="function"&&WeakRef.prototype,$p=FP?WeakRef.prototype.deref:null,BP=Boolean.prototype.valueOf,qP=Object.prototype.toString,VP=Function.prototype.toString,ZP=String.prototype.match,Pa=String.prototype.slice,dt=String.prototype.replace,GP=String.prototype.toUpperCase,Op=String.prototype.toLowerCase,Lp=RegExp.prototype.test,kp=Array.prototype.concat,Ue=Array.prototype.join,HP=Array.prototype.slice,zp=Math.floor,ma=typeof BigInt=="function"?BigInt.prototype.valueOf:null,pa=Object.getOwnPropertySymbols,fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ht=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Fr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ht||!0)?Symbol.toStringTag:null,jp=Object.prototype.propertyIsEnumerable,Rp=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Cp(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Lp.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-zp(-t):zp(t);if(n!==t){var o=String(n),a=Pa.call(e,o.length+1);return dt.call(o,r,"$&_")+"."+dt.call(dt.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return dt.call(e,r,"$&_")}i(Cp,"addNumericSeparator");var ha=Ip(),Dp=ha.custom,Np=qp(Dp)?Dp:null,Fp={__proto__:null,double:'"',single:"'"},WP={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Gp.exports=i(function t(e,r,n,o){var a=r||{};if(Qe(a,"quoteStyle")&&!Qe(Fp,a.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Qe(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=Qe(a,"customInspect")?a.customInspect:!0;if(typeof u!="boolean"&&u!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Qe(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Qe(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var p=a.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Zp(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var d=String(e);return p?Cp(e,d):d}if(typeof e=="bigint"){var g=String(e)+"n";return p?Cp(e,g):g}var m=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=m&&m>0&&typeof e=="object")return ga(e)?"[Array]":"[Object]";var v=dx(a,n);if(typeof o>"u")o=[];else if(Vp(o,e)>=0)return"[Circular]";function h(be,Ie,Ge){if(Ie&&(o=HP.call(o),o.push(Ie)),Ge){var dr={depth:a.depth};return Qe(a,"quoteStyle")&&(dr.quoteStyle=a.quoteStyle),t(be,dr,n+1,o)}return t(be,a,n+1,o)}if(i(h,"inspect"),typeof e=="function"&&!Mp(e)){var c=nx(e),f=eo(e,h);return"[Function"+(c?": "+c:" (anonymous)")+"]"+(f.length>0?" { "+Ue.call(f,", ")+" }":"")}if(qp(e)){var _=Ht?dt.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):fa.call(e);return typeof e=="object"&&!Ht?Ur(_):_}if(cx(e)){for(var y="<"+Op.call(String(e.nodeName)),x=e.attributes||[],b=0;b<x.length;b++)y+=" "+x[b].name+"="+Bp(KP(x[b].value),"double",a);return y+=">",e.childNodes&&e.childNodes.length&&(y+="..."),y+="</"+Op.call(String(e.nodeName))+">",y}if(ga(e)){if(e.length===0)return"[]";var E=eo(e,h);return v&&!px(E)?"["+ya(E,v)+"]":"[ "+Ue.call(E,", ")+" ]"}if(XP(e)){var L=eo(e,h);return!("cause"in Error.prototype)&&"cause"in e&&!jp.call(e,"cause")?"{ ["+String(e)+"] "+Ue.call(kp.call("[cause]: "+h(e.cause),L),", ")+" }":L.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Ue.call(L,", ")+" }"}if(typeof e=="object"&&u){if(Np&&typeof e[Np]=="function"&&ha)return ha(e,{depth:m-n});if(u!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(ox(e)){var J=[];return Ap&&Ap.call(e,function(be,Ie){J.push(h(Ie,e,!0)+" => "+h(be,e))}),Up("Map",to.call(e),J,v)}if(sx(e)){var xe=[];return wp&&wp.call(e,function(be){xe.push(h(be,e))}),Up("Set",ro.call(e),xe,v)}if(ix(e))return da("WeakMap");if(ux(e))return da("WeakSet");if(ax(e))return da("WeakRef");if(QP(e))return Ur(h(Number(e)));if(tx(e))return Ur(h(ma.call(e)));if(ex(e))return Ur(BP.call(e));if(YP(e))return Ur(h(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof global<"u"&&e===global)return"{ [object globalThis] }";if(!JP(e)&&!Mp(e)){var ee=eo(e,h),ne=Rp?Rp(e)===Object.prototype:e instanceof Object||e.constructor===Object,_e=e instanceof Object?"":"null prototype",te=!ne&&Fr&&Object(e)===e&&Fr in e?Pa.call(mt(e),8,-1):_e?"Object":"",Ve=ne||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",Ze=Ve+(te||_e?"["+Ue.call(kp.call([],te||[],_e||[]),": ")+"] ":"");return ee.length===0?Ze+"{}":v?Ze+"{"+ya(ee,v)+"}":Ze+"{ "+Ue.call(ee,", ")+" }"}return String(e)},"inspect_");function Bp(t,e,r){var n=r.quoteStyle||e,o=Fp[n];return o+t+o}i(Bp,"wrapQuotes");function KP(t){return dt.call(String(t),/"/g,""")}i(KP,"quote");function Tt(t){return!Fr||!(typeof t=="object"&&(Fr in t||typeof t[Fr]<"u"))}i(Tt,"canTrustToString");function ga(t){return mt(t)==="[object Array]"&&Tt(t)}i(ga,"isArray");function JP(t){return mt(t)==="[object Date]"&&Tt(t)}i(JP,"isDate");function Mp(t){return mt(t)==="[object RegExp]"&&Tt(t)}i(Mp,"isRegExp");function XP(t){return mt(t)==="[object Error]"&&Tt(t)}i(XP,"isError");function YP(t){return mt(t)==="[object String]"&&Tt(t)}i(YP,"isString");function QP(t){return mt(t)==="[object Number]"&&Tt(t)}i(QP,"isNumber");function ex(t){return mt(t)==="[object Boolean]"&&Tt(t)}i(ex,"isBoolean");function qp(t){if(Ht)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!fa)return!1;try{return fa.call(t),!0}catch{}return!1}i(qp,"isSymbol");function tx(t){if(!t||typeof t!="object"||!ma)return!1;try{return ma.call(t),!0}catch{}return!1}i(tx,"isBigInt");var rx=Object.prototype.hasOwnProperty||function(t){return t in this};function Qe(t,e){return rx.call(t,e)}i(Qe,"has");function mt(t){return qP.call(t)}i(mt,"toStr");function nx(t){if(t.name)return t.name;var e=ZP.call(VP.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}i(nx,"nameOf");function Vp(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}i(Vp,"indexOf");function ox(t){if(!to||!t||typeof t!="object")return!1;try{to.call(t);try{ro.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}i(ox,"isMap");function ix(t){if(!Lr||!t||typeof t!="object")return!1;try{Lr.call(t,Lr);try{jr.call(t,jr)}catch{return!0}return t instanceof WeakMap}catch{}return!1}i(ix,"isWeakMap");function ax(t){if(!$p||!t||typeof t!="object")return!1;try{return $p.call(t),!0}catch{}return!1}i(ax,"isWeakRef");function sx(t){if(!ro||!t||typeof t!="object")return!1;try{ro.call(t);try{to.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}i(sx,"isSet");function ux(t){if(!jr||!t||typeof t!="object")return!1;try{jr.call(t,jr);try{Lr.call(t,Lr)}catch{return!0}return t instanceof WeakSet}catch{}return!1}i(ux,"isWeakSet");function cx(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}i(cx,"isElement");function Zp(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Zp(Pa.call(t,0,e.maxStringLength),e)+n}var o=WP[e.quoteStyle||"single"];o.lastIndex=0;var a=dt.call(dt.call(t,o,"\\$1"),/[\x00-\x1f]/g,lx);return Bp(a,"single",e)}i(Zp,"inspectString");function lx(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+GP.call(e.toString(16))}i(lx,"lowbyte");function Ur(t){return"Object("+t+")"}i(Ur,"markBoxed");function da(t){return t+" { ? }"}i(da,"weakCollectionOf");function Up(t,e,r,n){var o=n?ya(r,n):Ue.call(r,", ");return t+" ("+e+") {"+o+"}"}i(Up,"collectionOf");function px(t){for(var e=0;e<t.length;e++)if(Vp(t[e],`
|
|
3
|
+
`)>=0)return!1;return!0}i(px,"singleLineValues");function dx(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=Ue.call(Array(t.indent+1)," ");else return null;return{base:r,prev:Ue.call(Array(e+1),r)}}i(dx,"getIndent");function ya(t,e){if(t.length===0)return"";var r=`
|
|
4
|
+
`+e.prev+e.base;return r+Ue.call(t,","+r)+`
|
|
5
|
+
`+e.prev}i(ya,"indentedJoin");function eo(t,e){var r=ga(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=Qe(t,o)?e(t[o],t):""}var a=typeof pa=="function"?pa(t):[],u;if(Ht){u={};for(var p=0;p<a.length;p++)u["$"+a[p]]=a[p]}for(var d in t)Qe(t,d)&&(r&&String(Number(d))===d&&d<t.length||Ht&&u["$"+d]instanceof Symbol||(Lp.call(/[^\w$]/,d)?n.push(e(d,t)+": "+e(t[d],t)):n.push(d+": "+e(t[d],t))));if(typeof pa=="function")for(var g=0;g<a.length;g++)jp.call(t,a[g])&&n.push("["+e(a[g])+"]: "+e(t[a[g]],t));return n}i(eo,"arrObjKeys")});var Wp=$((cL,Hp)=>{"use strict";var mx=Br(),fx=ut(),no=i(function(t,e,r){for(var n=t,o;(o=n.next)!=null;n=o)if(o.key===e)return n.next=o.next,r||(o.next=t.next,t.next=o),o},"listGetNode"),hx=i(function(t,e){if(t){var r=no(t,e);return r&&r.value}},"listGet"),gx=i(function(t,e,r){var n=no(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},"listSet"),yx=i(function(t,e){return t?!!no(t,e):!1},"listHas"),vx=i(function(t,e){if(t)return no(t,e,!0)},"listDelete");Hp.exports=i(function(){var e,r={assert:i(function(n){if(!r.has(n))throw new fx("Side channel does not contain "+mx(n))},"assert"),delete:i(function(n){var o=vx(e,n);return o&&e&&!e.next&&(e=void 0),!!o},"delete"),get:i(function(n){return hx(e,n)},"get"),has:i(function(n){return yx(e,n)},"has"),set:i(function(n,o){e||(e={next:void 0}),gx(e,n,o)},"set")};return r},"getSideChannelList")});var xa=$((pL,Xp)=>{"use strict";var Kp=Nr(),Jp=Xi(),_x=Jp([Kp("%String.prototype.indexOf%")]);Xp.exports=i(function(e,r){var n=Kp(e,!!r);return typeof n=="function"&&_x(e,".prototype.")>-1?Jp([n]):n},"callBoundIntrinsic")});var ba=$((mL,Qp)=>{"use strict";var Px=Nr(),qr=xa(),xx=Br(),bx=ut(),Yp=Px("%Map%",!0),Tx=qr("Map.prototype.get",!0),Sx=qr("Map.prototype.set",!0),Ex=qr("Map.prototype.has",!0),Ix=qr("Map.prototype.delete",!0),Ax=qr("Map.prototype.size",!0);Qp.exports=!!Yp&&i(function(){var e,r={assert:i(function(n){if(!r.has(n))throw new bx("Side channel does not contain "+xx(n))},"assert"),delete:i(function(n){if(e){var o=Ix(e,n);return Ax(e)===0&&(e=void 0),o}return!1},"delete"),get:i(function(n){if(e)return Tx(e,n)},"get"),has:i(function(n){return e?Ex(e,n):!1},"has"),set:i(function(n,o){e||(e=new Yp),Sx(e,n,o)},"set")};return r},"getSideChannelMap")});var td=$((hL,ed)=>{"use strict";var wx=Nr(),io=xa(),$x=Br(),oo=ba(),Ox=ut(),Wt=wx("%WeakMap%",!0),kx=io("WeakMap.prototype.get",!0),zx=io("WeakMap.prototype.set",!0),Rx=io("WeakMap.prototype.has",!0),Cx=io("WeakMap.prototype.delete",!0);ed.exports=Wt?i(function(){var e,r,n={assert:i(function(o){if(!n.has(o))throw new Ox("Side channel does not contain "+$x(o))},"assert"),delete:i(function(o){if(Wt&&o&&(typeof o=="object"||typeof o=="function")){if(e)return Cx(e,o)}else if(oo&&r)return r.delete(o);return!1},"delete"),get:i(function(o){return Wt&&o&&(typeof o=="object"||typeof o=="function")&&e?kx(e,o):r&&r.get(o)},"get"),has:i(function(o){return Wt&&o&&(typeof o=="object"||typeof o=="function")&&e?Rx(e,o):!!r&&r.has(o)},"has"),set:i(function(o,a){Wt&&o&&(typeof o=="object"||typeof o=="function")?(e||(e=new Wt),zx(e,o,a)):oo&&(r||(r=oo()),r.set(o,a))},"set")};return n},"getSideChannelWeakMap"):oo});var Ta=$((yL,rd)=>{"use strict";var Dx=ut(),Nx=Br(),Mx=Wp(),Ux=ba(),Lx=td(),jx=Lx||Ux||Mx;rd.exports=i(function(){var e,r={assert:i(function(n){if(!r.has(n))throw new Dx("Side channel does not contain "+Nx(n))},"assert"),delete:i(function(n){return!!e&&e.delete(n)},"delete"),get:i(function(n){return e&&e.get(n)},"get"),has:i(function(n){return!!e&&e.has(n)},"has"),set:i(function(n,o){e||(e=jx()),e.set(n,o)},"set")};return r},"getSideChannel")});var ao=$((_L,nd)=>{"use strict";var Fx=String.prototype.replace,Bx=/%20/g,Sa={RFC1738:"RFC1738",RFC3986:"RFC3986"};nd.exports={default:Sa.RFC3986,formatters:{RFC1738:i(function(t){return Fx.call(t,Bx,"+")},"RFC1738"),RFC3986:i(function(t){return String(t)},"RFC3986")},RFC1738:Sa.RFC1738,RFC3986:Sa.RFC3986}});var wa=$((xL,od)=>{"use strict";var qx=ao(),Vx=Ta(),Ea=Object.prototype.hasOwnProperty,St=Array.isArray,so=Vx(),Kt=i(function(e,r){return so.set(e,r),e},"markOverflow"),Et=i(function(e){return so.has(e)},"isOverflow"),Vr=i(function(e){return so.get(e)},"getMaxIndex"),Aa=i(function(e,r){so.set(e,r)},"setMaxIndex"),Le=function(){for(var t=[],e=0;e<256;++e)t[t.length]="%"+((e<16?"0":"")+e.toString(16)).toUpperCase();return t}(),Zx=i(function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if(St(n)){for(var o=[],a=0;a<n.length;++a)typeof n[a]<"u"&&(o[o.length]=n[a]);r.obj[r.prop]=o}}},"compactQueue"),Zr=i(function(e,r){for(var n=r&&r.plainObjects?{__proto__:null}:{},o=0;o<e.length;++o)typeof e[o]<"u"&&(n[o]=e[o]);return n},"arrayToObject"),Gx=i(function t(e,r,n){if(!r)return e;if(typeof r!="object"&&typeof r!="function"){if(St(e)){var o=e.length;if(n&&typeof n.arrayLimit=="number"&&o>n.arrayLimit)return Kt(Zr(e.concat(r),n),o);e[o]=r}else if(e&&typeof e=="object")if(Et(e)){var a=Vr(e)+1;e[a]=r,Aa(e,a)}else(n&&(n.plainObjects||n.allowPrototypes)||!Ea.call(Object.prototype,r))&&(e[r]=!0);else return[e,r];return e}if(!e||typeof e!="object"){if(Et(r)){for(var u=Object.keys(r),p=n&&n.plainObjects?{__proto__:null,0:e}:{0:e},d=0;d<u.length;d++){var g=parseInt(u[d],10);p[g+1]=r[u[d]]}return Kt(p,Vr(r)+1)}var m=[e].concat(r);return n&&typeof n.arrayLimit=="number"&&m.length>n.arrayLimit?Kt(Zr(m,n),m.length-1):m}var v=e;return St(e)&&!St(r)&&(v=Zr(e,n)),St(e)&&St(r)?(r.forEach(function(h,c){if(Ea.call(e,c)){var f=e[c];f&&typeof f=="object"&&h&&typeof h=="object"?e[c]=t(f,h,n):e[e.length]=h}else e[c]=h}),e):Object.keys(r).reduce(function(h,c){var f=r[c];if(Ea.call(h,c)?h[c]=t(h[c],f,n):h[c]=f,Et(r)&&!Et(h)&&Kt(h,Vr(r)),Et(h)){var _=parseInt(c,10);String(_)===c&&_>=0&&_>Vr(h)&&Aa(h,_)}return h},v)},"merge"),Hx=i(function(e,r){return Object.keys(r).reduce(function(n,o){return n[o]=r[o],n},e)},"assignSingleSource"),Wx=i(function(t,e,r){var n=t.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},"decode"),Ia=1024,Kx=i(function(e,r,n,o,a){if(e.length===0)return e;var u=e;if(typeof e=="symbol"?u=Symbol.prototype.toString.call(e):typeof e!="string"&&(u=String(e)),n==="iso-8859-1")return escape(u).replace(/%u[0-9a-f]{4}/gi,function(c){return"%26%23"+parseInt(c.slice(2),16)+"%3B"});for(var p="",d=0;d<u.length;d+=Ia){for(var g=u.length>=Ia?u.slice(d,d+Ia):u,m=[],v=0;v<g.length;++v){var h=g.charCodeAt(v);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||a===qx.RFC1738&&(h===40||h===41)){m[m.length]=g.charAt(v);continue}if(h<128){m[m.length]=Le[h];continue}if(h<2048){m[m.length]=Le[192|h>>6]+Le[128|h&63];continue}if(h<55296||h>=57344){m[m.length]=Le[224|h>>12]+Le[128|h>>6&63]+Le[128|h&63];continue}v+=1,h=65536+((h&1023)<<10|g.charCodeAt(v)&1023),m[m.length]=Le[240|h>>18]+Le[128|h>>12&63]+Le[128|h>>6&63]+Le[128|h&63]}p+=m.join("")}return p},"encode"),Jx=i(function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],o=0;o<r.length;++o)for(var a=r[o],u=a.obj[a.prop],p=Object.keys(u),d=0;d<p.length;++d){var g=p[d],m=u[g];typeof m=="object"&&m!==null&&n.indexOf(m)===-1&&(r[r.length]={obj:u,prop:g},n[n.length]=m)}return Zx(r),e},"compact"),Xx=i(function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},"isRegExp"),Yx=i(function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},"isBuffer"),Qx=i(function(e,r,n,o){if(Et(e)){var a=Vr(e)+1;return e[a]=r,Aa(e,a),e}var u=[].concat(e,r);return u.length>n?Kt(Zr(u,{plainObjects:o}),u.length-1):u},"combine"),eb=i(function(e,r){if(St(e)){for(var n=[],o=0;o<e.length;o+=1)n[n.length]=r(e[o]);return n}return r(e)},"maybeMap");od.exports={arrayToObject:Zr,assign:Hx,combine:Qx,compact:Jx,decode:Wx,encode:Kx,isBuffer:Yx,isOverflow:Et,isRegExp:Xx,markOverflow:Kt,maybeMap:eb,merge:Gx}});var ld=$((TL,cd)=>{"use strict";var ad=Ta(),uo=wa(),Gr=ao(),tb=Object.prototype.hasOwnProperty,sd={brackets:i(function(e){return e+"[]"},"brackets"),comma:"comma",indices:i(function(e,r){return e+"["+r+"]"},"indices"),repeat:i(function(e){return e},"repeat")},je=Array.isArray,rb=Array.prototype.push,ud=i(function(t,e){rb.apply(t,je(e)?e:[e])},"pushToArray"),nb=Date.prototype.toISOString,id=Gr.default,he={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:uo.encode,encodeValuesOnly:!1,filter:void 0,format:id,formatter:Gr.formatters[id],indices:!1,serializeDate:i(function(e){return nb.call(e)},"serializeDate"),skipNulls:!1,strictNullHandling:!1},ob=i(function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},"isNonNullishPrimitive"),$a={},ib=i(function t(e,r,n,o,a,u,p,d,g,m,v,h,c,f,_,y,x,b){for(var E=e,L=b,J=0,xe=!1;(L=L.get($a))!==void 0&&!xe;){var ee=L.get(e);if(J+=1,typeof ee<"u"){if(ee===J)throw new RangeError("Cyclic object value");xe=!0}typeof L.get($a)>"u"&&(J=0)}if(typeof m=="function"?E=m(r,E):E instanceof Date?E=c(E):n==="comma"&&je(E)&&(E=uo.maybeMap(E,function(Qo){return Qo instanceof Date?c(Qo):Qo})),E===null){if(u)return g&&!y?g(r,he.encoder,x,"key",f):r;E=""}if(ob(E)||uo.isBuffer(E)){if(g){var ne=y?r:g(r,he.encoder,x,"key",f);return[_(ne)+"="+_(g(E,he.encoder,x,"value",f))]}return[_(r)+"="+_(String(E))]}var _e=[];if(typeof E>"u")return _e;var te;if(n==="comma"&&je(E))y&&g&&(E=uo.maybeMap(E,g)),te=[{value:E.length>0?E.join(",")||null:void 0}];else if(je(m))te=m;else{var Ve=Object.keys(E);te=v?Ve.sort(v):Ve}var Ze=d?String(r).replace(/\./g,"%2E"):String(r),be=o&&je(E)&&E.length===1?Ze+"[]":Ze;if(a&&je(E)&&E.length===0)return be+"[]";for(var Ie=0;Ie<te.length;++Ie){var Ge=te[Ie],dr=typeof Ge=="object"&&Ge&&typeof Ge.value<"u"?Ge.value:E[Ge];if(!(p&&dr===null)){var Yo=h&&d?String(Ge).replace(/\./g,"%2E"):String(Ge),cg=je(E)?typeof n=="function"?n(be,Yo):be:be+(h?"."+Yo:"["+Yo+"]");b.set(e,J);var ns=ad();ns.set($a,b),ud(_e,t(dr,cg,n,o,a,u,p,d,n==="comma"&&y&&je(E)?null:g,m,v,h,c,f,_,y,x,ns))}}return _e},"stringify"),ab=i(function(e){if(!e)return he;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=e.charset||he.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Gr.default;if(typeof e.format<"u"){if(!tb.call(Gr.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var o=Gr.formatters[n],a=he.filter;(typeof e.filter=="function"||je(e.filter))&&(a=e.filter);var u;if(e.arrayFormat in sd?u=e.arrayFormat:"indices"in e?u=e.indices?"indices":"repeat":u=he.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var p=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:he.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:he.addQueryPrefix,allowDots:p,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:he.allowEmptyArrays,arrayFormat:u,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:he.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?he.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:he.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:he.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:he.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:he.encodeValuesOnly,filter:a,format:n,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:he.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:he.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:he.strictNullHandling}},"normalizeStringifyOptions");cd.exports=function(t,e){var r=t,n=ab(e),o,a;typeof n.filter=="function"?(a=n.filter,r=a("",r)):je(n.filter)&&(a=n.filter,o=a);var u=[];if(typeof r!="object"||r===null)return"";var p=sd[n.arrayFormat],d=p==="comma"&&n.commaRoundTrip;o||(o=Object.keys(r)),n.sort&&o.sort(n.sort);for(var g=ad(),m=0;m<o.length;++m){var v=o[m],h=r[v];n.skipNulls&&h===null||ud(u,ib(h,v,p,d,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,g))}var c=u.join(n.delimiter),f=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),c.length>0?f+c:""}});var md=$((EL,dd)=>{"use strict";var Fe=wa(),co=Object.prototype.hasOwnProperty,Oa=Array.isArray,ce={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Fe.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},sb=i(function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},"interpretNumericEntities"),pd=i(function(t,e,r){if(t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1)return t.split(",");if(e.throwOnLimitExceeded&&r>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(e.arrayLimit===1?"":"s")+" allowed in an array.");return t},"parseArrayValue"),ub="utf8=%26%2310003%3B",cb="utf8=%E2%9C%93",lb=i(function(e,r){var n={__proto__:null},o=r.ignoreQueryPrefix?e.replace(/^\?/,""):e;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=r.parameterLimit===1/0?void 0:r.parameterLimit,u=o.split(r.delimiter,r.throwOnLimitExceeded?a+1:a);if(r.throwOnLimitExceeded&&u.length>a)throw new RangeError("Parameter limit exceeded. Only "+a+" parameter"+(a===1?"":"s")+" allowed.");var p=-1,d,g=r.charset;if(r.charsetSentinel)for(d=0;d<u.length;++d)u[d].indexOf("utf8=")===0&&(u[d]===cb?g="utf-8":u[d]===ub&&(g="iso-8859-1"),p=d,d=u.length);for(d=0;d<u.length;++d)if(d!==p){var m=u[d],v=m.indexOf("]="),h=v===-1?m.indexOf("="):v+1,c,f;if(h===-1?(c=r.decoder(m,ce.decoder,g,"key"),f=r.strictNullHandling?null:""):(c=r.decoder(m.slice(0,h),ce.decoder,g,"key"),c!==null&&(f=Fe.maybeMap(pd(m.slice(h+1),r,Oa(n[c])?n[c].length:0),function(y){return r.decoder(y,ce.decoder,g,"value")}))),f&&r.interpretNumericEntities&&g==="iso-8859-1"&&(f=sb(String(f))),m.indexOf("[]=")>-1&&(f=Oa(f)?[f]:f),r.comma&&Oa(f)&&f.length>r.arrayLimit){if(r.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(r.arrayLimit===1?"":"s")+" allowed in an array.");f=Fe.combine([],f,r.arrayLimit,r.plainObjects)}if(c!==null){var _=co.call(n,c);_&&r.duplicates==="combine"?n[c]=Fe.combine(n[c],f,r.arrayLimit,r.plainObjects):(!_||r.duplicates==="last")&&(n[c]=f)}}return n},"parseQueryStringValues"),pb=i(function(t,e,r,n){var o=0;if(t.length>0&&t[t.length-1]==="[]"){var a=t.slice(0,-1).join("");o=Array.isArray(e)&&e[a]?e[a].length:0}for(var u=n?e:pd(e,r,o),p=t.length-1;p>=0;--p){var d,g=t[p];if(g==="[]"&&r.parseArrays)Fe.isOverflow(u)?d=u:d=r.allowEmptyArrays&&(u===""||r.strictNullHandling&&u===null)?[]:Fe.combine([],u,r.arrayLimit,r.plainObjects);else{d=r.plainObjects?{__proto__:null}:{};var m=g.charAt(0)==="["&&g.charAt(g.length-1)==="]"?g.slice(1,-1):g,v=r.decodeDotInKeys?m.replace(/%2E/g,"."):m,h=parseInt(v,10),c=!isNaN(h)&&g!==v&&String(h)===v&&h>=0&&r.parseArrays;if(!r.parseArrays&&v==="")d={0:u};else if(c&&h<r.arrayLimit)d=[],d[h]=u;else{if(c&&r.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(r.arrayLimit===1?"":"s")+" allowed in an array.");c?(d[h]=u,Fe.markOverflow(d,h)):v!=="__proto__"&&(d[v]=u)}}u=d}return u},"parseObject"),db=i(function(e,r){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(r.depth<=0)return!r.plainObjects&&co.call(Object.prototype,n)&&!r.allowPrototypes?void 0:[n];var o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,u=o.exec(n),p=u?n.slice(0,u.index):n,d=[];if(p){if(!r.plainObjects&&co.call(Object.prototype,p)&&!r.allowPrototypes)return;d[d.length]=p}for(var g=0;(u=a.exec(n))!==null&&g<r.depth;){g+=1;var m=u[1].slice(1,-1);if(!r.plainObjects&&co.call(Object.prototype,m)&&!r.allowPrototypes)return;d[d.length]=u[1]}if(u){if(r.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");d[d.length]="["+n.slice(u.index)+"]"}return d},"splitKeyIntoSegments"),mb=i(function(e,r,n,o){if(e){var a=db(e,n);if(a)return pb(a,r,n,o)}},"parseQueryStringKeys"),fb=i(function(e){if(!e)return ce;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof e.throwOnLimitExceeded<"u"&&typeof e.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=typeof e.charset>"u"?ce.charset:e.charset,n=typeof e.duplicates>"u"?ce.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:ce.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:ce.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:ce.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:ce.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:ce.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:ce.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:ce.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:ce.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:ce.decoder,delimiter:typeof e.delimiter=="string"||Fe.isRegExp(e.delimiter)?e.delimiter:ce.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:ce.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:ce.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:ce.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:ce.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:ce.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:ce.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded=="boolean"?e.throwOnLimitExceeded:!1}},"normalizeParseOptions");dd.exports=function(t,e){var r=fb(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?{__proto__:null}:{};for(var n=typeof t=="string"?lb(t,r):t,o=r.plainObjects?{__proto__:null}:{},a=Object.keys(n),u=0;u<a.length;++u){var p=a[u],d=mb(p,n[p],r,typeof t=="string");o=Fe.merge(o,d,r)}return r.allowSparse===!0?o:Fe.compact(o)}});var hd=$((AL,fd)=>{"use strict";var hb=ld(),gb=md(),yb=ao();fd.exports={formats:yb,parse:gb,stringify:hb}});var xT={};_n(xT,{stripe:()=>PT,stripeAuth:()=>A});module.exports=hg(xT);var gg=Object.freeze({status:"aborted"});function O(t,e,r){function n(p,d){if(p._zod||Object.defineProperty(p,"_zod",{value:{def:d,constr:u,traits:new Set},enumerable:!1}),p._zod.traits.has(t))return;p._zod.traits.add(t),e(p,d);let g=u.prototype,m=Object.keys(g);for(let v=0;v<m.length;v++){let h=m[v];h in p||(p[h]=g[h].bind(p))}}i(n,"init");let o=r?.Parent??Object;class a extends o{static{i(this,"Definition")}}Object.defineProperty(a,"name",{value:t});function u(p){var d;let g=r?.Parent?new a:this;n(g,p),(d=g._zod).deferred??(d.deferred=[]);for(let m of g._zod.deferred)m();return g}return i(u,"_"),Object.defineProperty(u,"init",{value:n}),Object.defineProperty(u,Symbol.hasInstance,{value:i(p=>r?.Parent&&p instanceof r.Parent?!0:p?._zod?.traits?.has(t),"value")}),Object.defineProperty(u,"name",{value:t}),u}i(O,"$constructor");var yg=Symbol("zod_brand"),Ne=class extends Error{static{i(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Pn=class extends Error{static{i(this,"$ZodEncodeError")}constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}},ei={};function He(t){return t&&Object.assign(ei,t),ei}i(He,"config");function ri(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,o])=>e.indexOf(+n)===-1).map(([n,o])=>o)}i(ri,"getEnumValues");function as(t,e){return typeof e=="bigint"?e.toString():e}i(as,"jsonStringifyReplacer");function bn(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}i(bn,"cached");function ss(t){return t==null}i(ss,"nullish");function Tn(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}i(Tn,"cleanRegex");var is=Symbol("evaluating");function de(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==is)return n===void 0&&(n=is,n=r()),n},set(o){Object.defineProperty(t,e,{value:o})},configurable:!0})}i(de,"defineLazy");var ni="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function fr(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}i(fr,"isObject");var vg=bn(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function us(t){if(fr(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(fr(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}i(us,"isPlainObject");var cs=new Set(["string","number","symbol"]);function kt(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(kt,"escapeRegex");function Sn(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}i(Sn,"clone");function ie(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:i(()=>e,"error")};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:i(()=>e.error,"error")}:e}i(ie,"normalizeParams");function ls(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}i(ls,"optionalKeys");var _g={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 zt(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}i(zt,"aborted");function rt(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}i(rt,"prefixIssues");function xn(t){return typeof t=="string"?t:t?.message}i(xn,"unwrapMessage");function nt(t,e,r){let n={...t,path:t.path??[]};if(!t.message){let o=xn(t.inst?._zod.def?.error?.(t))??xn(e?.error?.(t))??xn(r.customError?.(t))??xn(r.localeError?.(t))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,e?.reportInput||delete n.input,n}i(nt,"finalizeIssue");function ps(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}i(ps,"getLengthableOrigin");function oi(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}i(oi,"issue");var ds=i((t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,as,2),Object.defineProperty(t,"toString",{value:i(()=>t.message,"value"),enumerable:!1})},"initializer"),ms=O("$ZodError",ds),hr=O("$ZodError",ds,{Parent:Error});var xg=i(t=>(e,r,n,o)=>{let a=n?Object.assign(n,{async:!1}):{async:!1},u=e._zod.run({value:r,issues:[]},a);if(u instanceof Promise)throw new Ne;if(u.issues.length){let p=new(o?.Err??t)(u.issues.map(d=>nt(d,a,He())));throw ni(p,o?.callee),p}return u.value},"_parse"),En=xg(hr),bg=i(t=>async(e,r,n,o)=>{let a=n?Object.assign(n,{async:!0}):{async:!0},u=e._zod.run({value:r,issues:[]},a);if(u instanceof Promise&&(u=await u),u.issues.length){let p=new(o?.Err??t)(u.issues.map(d=>nt(d,a,He())));throw ni(p,o?.callee),p}return u.value},"_parseAsync"),In=bg(hr),Tg=i(t=>(e,r,n)=>{let o=n?{...n,async:!1}:{async:!1},a=e._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Ne;return a.issues.length?{success:!1,error:new(t??ms)(a.issues.map(u=>nt(u,o,He())))}:{success:!0,data:a.value}},"_safeParse"),gr=Tg(hr),Sg=i(t=>async(e,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},a=e._zod.run({value:r,issues:[]},o);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new t(a.issues.map(u=>nt(u,o,He())))}:{success:!0,data:a.value}},"_safeParseAsync"),yr=Sg(hr);var Eg="(?:(?:\\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])))",Ig=new RegExp(`^${Eg}$`);var fs=i(t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},"string"),hs=/^-?\d+n?$/;var ii=/^-?\d+(?:\.\d+)?$/,gs=/^(?:true|false)$/i;var Rt=O("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])});var ys=O("$ZodCheckMinLength",(t,e)=>{var r;Rt.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!ss(o)&&o.length!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>o&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let o=n.value;if(o.length>=e.minimum)return;let u=ps(o);n.issues.push({origin:u,code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:t,continue:!e.abort})}});var ai=O("$ZodCheckStringFormat",(t,e)=>{var r,n;Rt.init(t,e),t._zod.onattach.push(o=>{let a=o._zod.bag;a.format=e.format,e.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=o=>{e.pattern.lastIndex=0,!e.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:e.format,input:o.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),vs=O("$ZodCheckRegex",(t,e)=>{ai.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}});var Ps={major:4,minor:3,patch:6};var ae=O("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Ps;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let o of n)for(let a of o._zod.onattach)a(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let o=i((u,p,d)=>{let g=zt(u),m;for(let v of p){if(v._zod.def.when){if(!v._zod.def.when(u))continue}else if(g)continue;let h=u.issues.length,c=v._zod.check(u);if(c instanceof Promise&&d?.async===!1)throw new Ne;if(m||c instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await c,u.issues.length!==h&&(g||(g=zt(u,h)))});else{if(u.issues.length===h)continue;g||(g=zt(u,h))}}return m?m.then(()=>u):u},"runChecks"),a=i((u,p,d)=>{if(zt(u))return u.aborted=!0,u;let g=o(p,n,d);if(g instanceof Promise){if(d.async===!1)throw new Ne;return g.then(m=>t._zod.parse(m,d))}return t._zod.parse(g,d)},"handleCanaryResult");t._zod.run=(u,p)=>{if(p.skipChecks)return t._zod.parse(u,p);if(p.direction==="backward"){let g=t._zod.parse({value:u.value,issues:[]},{...p,skipChecks:!0});return g instanceof Promise?g.then(m=>a(m,u,p)):a(g,u,p)}let d=t._zod.parse(u,p);if(d instanceof Promise){if(p.async===!1)throw new Ne;return d.then(g=>o(g,n,p))}return o(d,n,p)}}de(t,"~standard",()=>({validate:i(o=>{try{let a=gr(t,o);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return yr(t,o).then(u=>u.success?{value:u.data}:{issues:u.error?.issues})}},"validate"),vendor:"zod",version:1}))}),$n=O("$ZodString",(t,e)=>{ae.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??fs(t._zod.bag),t._zod.parse=(r,n)=>{if(e.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:t}),r}}),si=O("$ZodStringFormat",(t,e)=>{ai.init(t,e),$n.init(t,e)});var Es=O("$ZodURL",(t,e)=>{si.init(t,e),t._zod.check=r=>{try{let n=r.value.trim(),o=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}});var Is=O("$ZodNumber",(t,e)=>{ae.init(t,e),t._zod.pattern=t._zod.bag.pattern??ii,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let a=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:t,...a?{received:a}:{}}),r}});var ui=O("$ZodBoolean",(t,e)=>{ae.init(t,e),t._zod.pattern=gs,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:t}),r}}),As=O("$ZodBigInt",(t,e)=>{ae.init(t,e),t._zod.pattern=hs,t._zod.parse=(r,n)=>{if(e.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:t}),r}});var ws=O("$ZodAny",(t,e)=>{ae.init(t,e),t._zod.parse=r=>r}),$s=O("$ZodUnknown",(t,e)=>{ae.init(t,e),t._zod.parse=r=>r});var Os=O("$ZodVoid",(t,e)=>{ae.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:t}),r}}),ks=O("$ZodDate",(t,e)=>{ae.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,a=o instanceof Date;return a&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...a?{received:"Invalid Date"}:{},inst:t}),r}});function xs(t,e,r){t.issues.length&&e.issues.push(...rt(r,t.issues)),e.value[r]=t.value}i(xs,"handleArrayResult");var zs=O("$ZodArray",(t,e)=>{ae.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:t}),r;r.value=Array(o.length);let a=[];for(let u=0;u<o.length;u++){let p=o[u],d=e.element._zod.run({value:p,issues:[]},n);d instanceof Promise?a.push(d.then(g=>xs(g,r,u))):xs(d,r,u)}return a.length?Promise.all(a).then(()=>r):r}});function wn(t,e,r,n,o){if(t.issues.length){if(o&&!(r in n))return;e.issues.push(...rt(r,t.issues))}t.value===void 0?r in n&&(e.value[r]=void 0):e.value[r]=t.value}i(wn,"handlePropertyResult");function Ag(t){let e=Object.keys(t.shape);for(let n of e)if(!t.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=ls(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}i(Ag,"normalizeDef");function wg(t,e,r,n,o,a){let u=[],p=o.keySet,d=o.catchall._zod,g=d.def.type,m=d.optout==="optional";for(let v in e){if(p.has(v))continue;if(g==="never"){u.push(v);continue}let h=d.run({value:e[v],issues:[]},n);h instanceof Promise?t.push(h.then(c=>wn(c,r,v,e,m))):wn(h,r,v,e,m)}return u.length&&r.issues.push({code:"unrecognized_keys",keys:u,input:e,inst:a}),t.length?Promise.all(t).then(()=>r):r}i(wg,"handleCatchall");var Rs=O("$ZodObject",(t,e)=>{if(ae.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let p=e.shape;Object.defineProperty(e,"shape",{get:i(()=>{let d={...p};return Object.defineProperty(e,"shape",{value:d}),d},"get")})}let n=bn(()=>Ag(e));de(t._zod,"propValues",()=>{let p=e.shape,d={};for(let g in p){let m=p[g]._zod;if(m.values){d[g]??(d[g]=new Set);for(let v of m.values)d[g].add(v)}}return d});let o=fr,a=e.catchall,u;t._zod.parse=(p,d)=>{u??(u=n.value);let g=p.value;if(!o(g))return p.issues.push({expected:"object",code:"invalid_type",input:g,inst:t}),p;p.value={};let m=[],v=u.shape;for(let h of u.keys){let c=v[h],f=c._zod.optout==="optional",_=c._zod.run({value:g[h],issues:[]},d);_ instanceof Promise?m.push(_.then(y=>wn(y,p,h,g,f))):wn(_,p,h,g,f)}return a?wg(m,g,p,d,n.value,t):m.length?Promise.all(m).then(()=>p):p}});function bs(t,e,r,n){for(let a of t)if(a.issues.length===0)return e.value=a.value,e;let o=t.filter(a=>!zt(a));return o.length===1?(e.value=o[0].value,o[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(a=>a.issues.map(u=>nt(u,n,He())))}),e)}i(bs,"handleUnionResults");var ci=O("$ZodUnion",(t,e)=>{ae.init(t,e),de(t._zod,"optin",()=>e.options.some(o=>o._zod.optin==="optional")?"optional":void 0),de(t._zod,"optout",()=>e.options.some(o=>o._zod.optout==="optional")?"optional":void 0),de(t._zod,"values",()=>{if(e.options.every(o=>o._zod.values))return new Set(e.options.flatMap(o=>Array.from(o._zod.values)))}),de(t._zod,"pattern",()=>{if(e.options.every(o=>o._zod.pattern)){let o=e.options.map(a=>a._zod.pattern);return new RegExp(`^(${o.map(a=>Tn(a.source)).join("|")})$`)}});let r=e.options.length===1,n=e.options[0]._zod.run;t._zod.parse=(o,a)=>{if(r)return n(o,a);let u=!1,p=[];for(let d of e.options){let g=d._zod.run({value:o.value,issues:[]},a);if(g instanceof Promise)p.push(g),u=!0;else{if(g.issues.length===0)return g;p.push(g)}}return u?Promise.all(p).then(d=>bs(d,o,t,a)):bs(p,o,t,a)}});var Cs=O("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,ci.init(t,e);let r=t._zod.parse;de(t._zod,"propValues",()=>{let o={};for(let a of e.options){let u=a._zod.propValues;if(!u||Object.keys(u).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(a)}"`);for(let[p,d]of Object.entries(u)){o[p]||(o[p]=new Set);for(let g of d)o[p].add(g)}}return o});let n=bn(()=>{let o=e.options,a=new Map;for(let u of o){let p=u._zod.propValues?.[e.discriminator];if(!p||p.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(u)}"`);for(let d of p){if(a.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);a.set(d,u)}}return a});t._zod.parse=(o,a)=>{let u=o.value;if(!fr(u))return o.issues.push({code:"invalid_type",expected:"object",input:u,inst:t}),o;let p=n.value.get(u?.[e.discriminator]);return p?p._zod.run(o,a):e.unionFallback?r(o,a):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:u,path:[e.discriminator],inst:t}),o)}});var Ds=O("$ZodRecord",(t,e)=>{ae.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;if(!us(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:t}),r;let a=[],u=e.keyType._zod.values;if(u){r.value={};let p=new Set;for(let g of u)if(typeof g=="string"||typeof g=="number"||typeof g=="symbol"){p.add(typeof g=="number"?g.toString():g);let m=e.valueType._zod.run({value:o[g],issues:[]},n);m instanceof Promise?a.push(m.then(v=>{v.issues.length&&r.issues.push(...rt(g,v.issues)),r.value[g]=v.value})):(m.issues.length&&r.issues.push(...rt(g,m.issues)),r.value[g]=m.value)}let d;for(let g in o)p.has(g)||(d=d??[],d.push(g));d&&d.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:t,keys:d})}else{r.value={};for(let p of Reflect.ownKeys(o)){if(p==="__proto__")continue;let d=e.keyType._zod.run({value:p,issues:[]},n);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof p=="string"&&ii.test(p)&&d.issues.length){let v=e.keyType._zod.run({value:Number(p),issues:[]},n);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");v.issues.length===0&&(d=v)}if(d.issues.length){e.mode==="loose"?r.value[p]=o[p]:r.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(v=>nt(v,n,He())),input:p,path:[p],inst:t});continue}let m=e.valueType._zod.run({value:o[p],issues:[]},n);m instanceof Promise?a.push(m.then(v=>{v.issues.length&&r.issues.push(...rt(p,v.issues)),r.value[d.value]=v.value})):(m.issues.length&&r.issues.push(...rt(p,m.issues)),r.value[d.value]=m.value)}}return a.length?Promise.all(a).then(()=>r):r}});var Ns=O("$ZodEnum",(t,e)=>{ae.init(t,e);let r=ri(e.entries),n=new Set(r);t._zod.values=n,t._zod.pattern=new RegExp(`^(${r.filter(o=>cs.has(typeof o)).map(o=>typeof o=="string"?kt(o):o.toString()).join("|")})$`),t._zod.parse=(o,a)=>{let u=o.value;return n.has(u)||o.issues.push({code:"invalid_value",values:r,input:u,inst:t}),o}}),Ms=O("$ZodLiteral",(t,e)=>{if(ae.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(e.values);t._zod.values=r,t._zod.pattern=new RegExp(`^(${e.values.map(n=>typeof n=="string"?kt(n):n?kt(n.toString()):String(n)).join("|")})$`),t._zod.parse=(n,o)=>{let a=n.value;return r.has(a)||n.issues.push({code:"invalid_value",values:e.values,input:a,inst:t}),n}});var Us=O("$ZodTransform",(t,e)=>{ae.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Pn(t.constructor.name);let o=e.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(u=>(r.value=u,r));if(o instanceof Promise)throw new Ne;return r.value=o,r}});function Ts(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}i(Ts,"handleOptionalResult");var Ls=O("$ZodOptional",(t,e)=>{ae.init(t,e),t._zod.optin="optional",t._zod.optout="optional",de(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),de(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${Tn(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>{if(e.innerType._zod.optin==="optional"){let o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(a=>Ts(a,r.value)):Ts(o,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,n)}});var js=O("$ZodNullable",(t,e)=>{ae.init(t,e),de(t._zod,"optin",()=>e.innerType._zod.optin),de(t._zod,"optout",()=>e.innerType._zod.optout),de(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${Tn(r.source)}|null)$`):void 0}),de(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)});var Fs=O("$ZodPipe",(t,e)=>{ae.init(t,e),de(t._zod,"values",()=>e.in._zod.values),de(t._zod,"optin",()=>e.in._zod.optin),de(t._zod,"optout",()=>e.out._zod.optout),de(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if(n.direction==="backward"){let a=e.out._zod.run(r,n);return a instanceof Promise?a.then(u=>An(u,e.in,n)):An(a,e.in,n)}let o=e.in._zod.run(r,n);return o instanceof Promise?o.then(a=>An(a,e.out,n)):An(o,e.out,n)}});function An(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}i(An,"handlePipeResult");var Bs=O("$ZodCustom",(t,e)=>{Rt.init(t,e),ae.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{let n=r.value,o=e.fn(n);if(o instanceof Promise)return o.then(a=>Ss(a,r,n,t));Ss(o,r,n,t)}});function Ss(t,e,r,n){if(!t){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),e.issues.push(oi(o))}}i(Ss,"handleRefineResult");var Vs,zg=Symbol("ZodOutput"),Rg=Symbol("ZodInput"),li=class{static{i(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let n=r[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let o={...n,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Zs(){return new li}i(Zs,"registry");(Vs=globalThis).__zod_globalRegistry??(Vs.__zod_globalRegistry=Zs());var pi=globalThis.__zod_globalRegistry;function Gs(t,e){return new t({type:"string",...ie(e)})}i(Gs,"_string");function Hs(t,e){return new t({type:"string",coerce:!0,...ie(e)})}i(Hs,"_coercedString");function Ws(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...ie(e)})}i(Ws,"_url");function Ks(t,e){return new t({type:"number",checks:[],...ie(e)})}i(Ks,"_number");function Js(t,e){return new t({type:"number",coerce:!0,checks:[],...ie(e)})}i(Js,"_coercedNumber");function Xs(t,e){return new t({type:"boolean",...ie(e)})}i(Xs,"_boolean");function Ys(t,e){return new t({type:"boolean",coerce:!0,...ie(e)})}i(Ys,"_coercedBoolean");function Qs(t,e){return new t({type:"bigint",coerce:!0,...ie(e)})}i(Qs,"_coercedBigint");function eu(t){return new t({type:"any"})}i(eu,"_any");function tu(t){return new t({type:"unknown"})}i(tu,"_unknown");function ru(t,e){return new t({type:"void",...ie(e)})}i(ru,"_void");function nu(t,e){return new t({type:"date",coerce:!0,...ie(e)})}i(nu,"_coercedDate");function $e(t,e){return new ys({check:"min_length",...ie(e),minimum:t})}i($e,"_minLength");function ot(t,e){return new vs({check:"string_format",format:"regex",...ie(e),pattern:t})}i(ot,"_regex");function ou(t,e,r){let n=ie(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}i(ou,"_custom");var me=O("ZodMiniType",(t,e)=>{if(!t._zod)throw new Error("Uninitialized schema in ZodMiniType.");ae.init(t,e),t.def=e,t.type=e.type,t.parse=(r,n)=>En(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>gr(t,r,n),t.parseAsync=async(r,n)=>In(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>yr(t,r,n),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),t.with=t.check,t.clone=(r,n)=>Sn(t,r,n),t.brand=()=>t,t.register=(r,n)=>(r.add(t,n),t),t.apply=r=>r(t)}),kn=O("ZodMiniString",(t,e)=>{$n.init(t,e),me.init(t,e)});function l(t){return Gs(kn,t)}i(l,"string");var iu=O("ZodMiniStringFormat",(t,e)=>{si.init(t,e),kn.init(t,e)});var qg=O("ZodMiniURL",(t,e)=>{Es.init(t,e),iu.init(t,e)});function au(t){return Ws(qg,t)}i(au,"url");var di=O("ZodMiniNumber",(t,e)=>{Is.init(t,e),me.init(t,e)});function Pe(t){return Ks(di,t)}i(Pe,"number");var mi=O("ZodMiniBoolean",(t,e)=>{ui.init(t,e),me.init(t,e)});function X(t){return Xs(mi,t)}i(X,"boolean");var su=O("ZodMiniBigInt",(t,e)=>{As.init(t,e),me.init(t,e)});var Vg=O("ZodMiniAny",(t,e)=>{ws.init(t,e),me.init(t,e)});function _r(){return eu(Vg)}i(_r,"any");var Zg=O("ZodMiniUnknown",(t,e)=>{$s.init(t,e),me.init(t,e)});function N(){return tu(Zg)}i(N,"unknown");var Gg=O("ZodMiniVoid",(t,e)=>{Os.init(t,e),me.init(t,e)});function uu(t){return ru(Gg,t)}i(uu,"_void");var cu=O("ZodMiniDate",(t,e)=>{ks.init(t,e),me.init(t,e)});var Hg=O("ZodMiniArray",(t,e)=>{zs.init(t,e),me.init(t,e)});function F(t,e){return new Hg({type:"array",element:t,...ie(e)})}i(F,"array");var Wg=O("ZodMiniObject",(t,e)=>{Rs.init(t,e),me.init(t,e),de(t,"shape",()=>e.shape)});function P(t,e){let r={type:"object",shape:t??{},...ie(e)};return new Wg(r)}i(P,"object");var Kg=O("ZodMiniUnion",(t,e)=>{ci.init(t,e),me.init(t,e)});function B(t,e){return new Kg({type:"union",options:t,...ie(e)})}i(B,"union");var Jg=O("ZodMiniDiscriminatedUnion",(t,e)=>{Cs.init(t,e),me.init(t,e)});function Ct(t,e,r){return new Jg({type:"union",options:e,discriminator:t,...ie(r)})}i(Ct,"discriminatedUnion");var Xg=O("ZodMiniRecord",(t,e)=>{Ds.init(t,e),me.init(t,e)});function M(t,e,r){return new Xg({type:"record",keyType:t,valueType:e,...ie(r)})}i(M,"record");var Yg=O("ZodMiniEnum",(t,e)=>{Ns.init(t,e),me.init(t,e),t.options=Object.values(e.entries)});function V(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new Yg({type:"enum",entries:r,...ie(e)})}i(V,"_enum");var Qg=O("ZodMiniLiteral",(t,e)=>{Ms.init(t,e),me.init(t,e)});function z(t,e){return new Qg({type:"literal",values:Array.isArray(t)?t:[t],...ie(e)})}i(z,"literal");var ey=O("ZodMiniTransform",(t,e)=>{Us.init(t,e),me.init(t,e)});function it(t){return new ey({type:"transform",transform:t})}i(it,"transform");var ty=O("ZodMiniOptional",(t,e)=>{Ls.init(t,e),me.init(t,e)});function S(t){return new ty({type:"optional",innerType:t})}i(S,"optional");var ry=O("ZodMiniNullable",(t,e)=>{js.init(t,e),me.init(t,e)});function Pr(t){return new ry({type:"nullable",innerType:t})}i(Pr,"nullable");var ny=O("ZodMiniPipe",(t,e)=>{Fs.init(t,e),me.init(t,e)});function at(t,e){return new ny({type:"pipe",in:t,out:e})}i(at,"pipe");var oy=O("ZodMiniCustom",(t,e)=>{Bs.init(t,e),me.init(t,e)});function zn(t,e){return ou(oy,t??(()=>!0),e)}i(zn,"custom");var xr={};_n(xr,{bigint:()=>py,boolean:()=>ly,date:()=>dy,number:()=>cy,string:()=>uy});function uy(t){return Hs(kn,t)}i(uy,"string");function cy(t){return Js(di,t)}i(cy,"number");function ly(t){return Ys(mi,t)}i(ly,"boolean");function py(t){return Qs(su,t)}i(py,"bigint");function dy(t){return nu(cu,t)}i(dy,"date");var hi=P({retryOnFailure:P({defaultValue:S(X()),hide:S(X())}),continueOnFailure:P({defaultValue:S(X()),hide:S(X())})}),fi=class{constructor(e,r,n,o,a,u,p,d,g,m,v){this.name=e;this.displayName=r;this.description=n;this.props=o;this.run=a;this.test=u;this.requireAuth=p;this.errorHandlingOptions=d;this.outputSchema=g;this.audience=m;this.aiMetadata=v}static{i(this,"IAction")}},Z=i(t=>new fi(t.name,t.displayName,t.description,t.props,t.run,t.test??t.run,t.requireAuth??!0,t.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},t.outputSchema,t.audience,t.aiMetadata),"createAction");var K=P({displayName:l(),description:S(l())}),q=i((t,e)=>P({type:z(e),required:X(),defaultValue:S(_r())}),"TPropertyValue");var Se=P({...K.shape,...q(l(),"SHORT_TEXT").shape}),We=P({...K.shape,...q(l(),"LONG_TEXT").shape});var pu=P({label:l(),value:N()}),Rn=P({disabled:S(X()),placeholder:S(l()),options:F(pu)});var Ee=P({...K.shape,options:Rn,...q(N(),"STATIC_DROPDOWN").shape}),Ke=P({...K.shape,options:Rn,...q(F(N()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var gi=P({...K.shape,...q(N(),"DROPDOWN").shape,refreshers:F(l())}),br=P({...K.shape,...q(F(N()),"MULTI_SELECT_DROPDOWN").shape,refreshers:F(l())});var Je=P({...K.shape,...q(X(),"CHECKBOX").shape});var Xe=P({...K.shape,...q(Pe(),"NUMBER").shape});var Tr=P({...K.shape,...q(N(),"FILE").shape});var Sr=P({...K.shape,...q(l(),"DATE_TIME").shape});var du=M(l(),B([Se,We,Ee,br,Ke,Je,Xe,Tr,Sr])),Er=P({...K.shape,properties:du,...q(F(N()),"ARRAY").shape});var Ir=P({...K.shape,...q(B([M(l(),N())]),"JSON").shape});var mu=B([Se,Ee,Ir,Er,Ke]),fy=M(l(),mu),yi=P({refreshers:F(l()),...K.shape,...q(N(),"DYNAMIC").shape});var Cn=P({...K.shape,...q(uu(),"MARKDOWN").shape});var Ar=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(Ar||{}),Dt=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Dt||{}),Nt=(x=>(x.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",x.COMMUNICATION="COMMUNICATION",x.COMMERCE="COMMERCE",x.CORE="CORE",x.UNIVERSAL_AI="UNIVERSAL_AI",x.FLOW_CONTROL="FLOW_CONTROL",x.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",x.ACCOUNTING="ACCOUNTING",x.PRODUCTIVITY="PRODUCTIVITY",x.CONTENT_AND_FILES="CONTENT_AND_FILES",x.DEVELOPER_TOOLS="DEVELOPER_TOOLS",x.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",x.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",x.HUMAN_RESOURCES="HUMAN_RESOURCES",x.PAYMENT_PROCESSING="PAYMENT_PROCESSING",x.MARKETING="MARKETING",x.SALES_AND_CRM="SALES_AND_CRM",x))(Nt||{});var wr=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(wr||{}),vi="both_client_credentials_and_authorization_code";var fe=(o=>(o.POLLING="POLLING",o.WEBHOOK="WEBHOOK",o.APP_WEBHOOK="APP_WEBHOOK",o.MANUAL="MANUAL",o))(fe||{}),$r=(a=>(a.NONE="NONE",a.HEADER_PRESENT="HEADER_PRESENT",a.QUERY_PRESENT="QUERY_PRESENT",a.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",a.HEAD_REQUEST="HEAD_REQUEST",a))($r||{}),hy=P({strategy:V($r),paramName:S(l())}),Or=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(Or||{});var Dn=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Dn||{}),fu=P({status:S(Pe()),body:S(N()),headers:S(M(l(),l()))}),hu=P({type:z("DELAY"),resumeDateTime:l(),requestIdToReply:S(l()),handlerId:S(l()),streamStepProgress:S(V(Dn))}),gu=P({type:z("WEBHOOK"),requestId:l(),requestIdToReply:S(l()),response:fu,handlerId:S(l()),streamStepProgress:S(V(Dn))}),gy=B([hu,gu]);var yy=P({body:N(),rawBody:S(N()),headers:M(l(),l()),queryParams:M(l(),l())});function Oe(t){return t==null}i(Oe,"isNil");function j(t){return t==null?!0:typeof t=="string"||Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:!1}i(j,"isEmpty");function Nn(t,e){if(t==null)throw new Error(`${e} is null or undefined`)}i(Nn,"assertNotNullOrUndefined");var _i=we(require("crypto"),1);var vy=128,_t,Mt,_y=i(t=>{!_t||_t.length<t?(_t=Buffer.allocUnsafe(t*vy),_i.default.randomFillSync(_t),Mt=0):Mt+t>_t.length&&(_i.default.randomFillSync(_t),Mt=0),Mt+=t},"fillPool"),Py=i(t=>(_y(t|=0),_t.subarray(Mt-t,Mt)),"random"),xy=i((t,e,r)=>{let n=(2<<31-Math.clz32(t.length-1|1))-1,o=Math.ceil(1.6*n*e/t.length);return(a=e)=>{let u="";for(;;){let p=r(o),d=o;for(;d--;)if(u+=t[p[d]&n]||"",u.length===a)return u}}},"customRandom"),vu=i((t,e=21)=>xy(t,e,Py),"customAlphabet");var by="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",_u=21,nR=l().check(ot(new RegExp(`^[0-9a-zA-Z]{${_u}}$`))),Ty=vu(by,_u);var st=at(it(t=>t instanceof Date?t.toISOString():t),l()),Ae={id:l(),created:st,updated:st},oe=i(t=>S(Pr(t)),"Nullable");function Pi(t){return S(Pr(V(t)))}i(Pi,"NullableEnum");var aR=at(it(t=>t==="true"||t===!0?!0:t==="false"||t===!1?!1:void 0),S(X())),Mn=i(t=>at(it(e=>Array.isArray(e)?e:e!==void 0?[e]:void 0),S(F(t))),"OptionalArrayFromQuery");var cR=M(l(),N());var kr=(m=>(m.OPENAI="openai",m.OPENROUTER="openrouter",m.ANTHROPIC="anthropic",m.AZURE="azure",m.GOOGLE="google",m.ACTIVEPIECES="activepieces",m.CLOUDFLARE_GATEWAY="cloudflare-gateway",m.CUSTOM="custom",m.BEDROCK="bedrock",m.MISTRAL="mistral",m))(kr||{});var xR=l().check(ot(/^#[0-9A-Fa-f]{6}$/));var TR=P({filename:l(),data:N(),type:z("file"),mimetype:S(l())});var Sy=we(xu());var OR=P({...Ae,name:l(),permissions:F(l()),platformId:oe(l()),type:l(),userCount:S(Pe())});var bu=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(bu||{}),xi=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(xi||{}),bi=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(bi||{});var Ti=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Ti||{});var Si=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Si||{});var Ey=P({mode:V(bu),value:N()}),Iy=P({auth:S(l()),fields:M(l(),Ey)}),Ay=P({pieceName:l(),pieceVersion:l(),actionName:l(),predefinedInput:S(Iy)}),wy=P({type:z("PIECE"),toolName:l().check($e(1)),pieceMetadata:Ay}),$y=P({type:z("none")}),Oy=P({type:z("access_token"),accessToken:l()}),ky=P({type:z("api_key"),apiKey:l(),apiKeyHeader:l()}),zy=P({type:z("headers"),headers:M(l(),l())}),Ry=Ct("type",[$y,Oy,ky,zy]),Tu=P({type:z("FLOW"),toolName:l().check($e(1)),externalFlowId:l(),flowDisplayName:S(l())}),Su=P({type:z("MCP"),toolName:l().check($e(1)),serverUrl:au(),protocol:V(bi),auth:Ry}),Eu=P({type:z("KNOWLEDGE_BASE"),toolName:l().check($e(1)),sourceType:V(xi),sourceId:l(),sourceName:l()}),Cy=Ct("type",[wy,Tu,Su,Eu]),Dy=P({displayName:l(),description:S(l()),type:V(Ti)}),Iu=P({type:z("MARKDOWN"),markdown:l()}),Ut={type:z("TOOL_CALL"),input:oe(M(l(),N())),output:S(N()),toolName:l(),status:V(Si),toolCallId:l(),startTime:l(),endTime:S(l())},nC=P(Ut),Au=Ct("toolCallType",[P({...Ut,toolCallType:z("PIECE"),pieceName:l(),pieceVersion:l(),actionName:l()}),P({...Ut,toolCallType:z("FLOW"),displayName:l(),externalFlowId:l()}),P({...Ut,toolCallType:z("MCP"),displayName:l(),serverUrl:l()}),P({...Ut,toolCallType:z("KNOWLEDGE_BASE"),displayName:l(),sourceType:l()}),P({...Ut,toolCallType:z("UNKNOWN"),displayName:l()})]),Ny=B([Iu,Au]);var Ei=(r=>(r.IMAGE="image",r.TEXT="text",r))(Ei||{}),Ye=P({apiKey:l()}),My=Ye,Uy=P({apiKey:l(),apiKeyHash:l()}),Ly=Ye,jy=Ye,Fy=Ye,By=Ye,qy=Ye,Vy=Ye,Zy=Ye,wu=P({accessKeyId:l().check($e(1)),secretAccessKey:l().check($e(1))}),Gy=P({}),Hy=P({}),Wy=P({}),Ky=P({}),Jy=P({}),Xy=P({}),$u=P({modelId:l(),modelName:l(),modelType:V(Ei)}),Ou=P({apiKeyHeader:l(),baseUrl:l(),models:F($u),defaultHeaders:S(M(l(),l()))}),ku=P({accountId:l(),gatewayId:l(),models:F($u),vertexProject:S(l()),vertexRegion:S(l())}),zu=P({resourceName:l(),apiVersion:at(it(t=>typeof t=="string"&&t.trim().length===0?void 0:t),S(l()))}),Ru=P({region:l().check($e(1))}),Yy=B([My,Fy,By,qy,Vy,jy,Ly,Uy,wu,Zy]),Cu=B([Ou,ku,zu,Ru,Gy,Wy,Ky,Jy,Hy,Xy]),Qy=P({id:l(),name:l(),type:V(Ei)}),ev=P({id:l(),name:l(),provider:V(kr),config:Cu,enabledForChat:X()}),tv=P({provider:V(kr),config:Cu,auth:Yy,platformId:l()});var sC={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var rv=P({base64Url:l(),fileName:l(),extension:S(l())}),nv=P({mimeType:l(),url:l(),fileName:S(l())}),Ii=B([rv,nv]);var ov=B([P({type:z("file"),value:Ii}),P({type:z("markdown"),value:l(),files:S(F(Ii))})]),iv=P({sessionId:l(),message:l(),files:S(F(l()))});var Nu=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Nu||{}),Mu=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(Mu||{}),Ai=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Ai||{});var av=B([P({...Ae,name:l(),externalId:l(),type:z("STATIC_DROPDOWN"),tableId:l(),projectId:l(),data:P({options:F(P({value:l()}))})}),P({...Ae,name:l(),externalId:l(),type:B([z("TEXT"),z("NUMBER"),z("DATE")]),tableId:l(),projectId:l()})]),sv=P({...Ae,name:l(),folderId:oe(l()),projectId:l(),externalId:l(),status:Pi(Mu),trigger:Pi(Nu)}),uv=P({...Ae,tableId:l(),projectId:l(),cells:M(l(),P({updated:l(),created:l(),value:N(),fieldName:l()}))}),cv=P({events:F(V(Ai)),webhookUrl:l(),flowId:l()}),lv=P({fields:F(P({id:l(),name:l()})),rows:F(M(l(),l())),name:l()}),pv=P({projectId:l(),limit:S(xr.number()),cursor:S(l()),name:S(l()),externalIds:Mn(l()),folderId:S(l()),folderIds:Mn(l())}),dv=P({records:F(F(P({fieldId:l(),value:Lu()}))),tableId:l()}),mv=P({cells:S(F(P({fieldId:l(),value:Lu()}))),tableId:l(),agentUpdate:S(X())}),Uu=Ct("operator",[Pt("eq"),Pt("neq"),Pt("gt"),Pt("gte"),Pt("lt"),Pt("lte"),Pt("co"),Du("exists"),Du("not_exists")]),fv=P({tableId:l(),limit:S(xr.number()),cursor:S(l()),filters:Mn(Uu)});function Lu(){return at(it(t=>t==null?t:String(t)),Pr(l()))}i(Lu,"coerceToString");function Pt(t){return P({fieldId:l(),operator:z(t),value:l()})}i(Pt,"valueFilter");function Du(t){return P({fieldId:l(),operator:z(t)})}i(Du,"existenceFilter");var hv=P({status:S(Pe()),body:S(N()),headers:S(M(l(),l()))}),gv=P({...Ae,deleted:oe(st),ownerId:l(),displayName:l(),platformId:l(),externalId:oe(l())});var ju=P({name:l(),description:S(l()),type:l(),required:X()}),yv=P({pieceName:l(),triggerName:l(),input:P({toolName:l(),toolDescription:l(),inputSchema:F(ju),returnsResponse:X()})});var Fu="^[0-9]+\\.[0-9]+\\.[0-9]+$",IC=new RegExp(Fu),_v="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",AC=l().check(ot(new RegExp(Fu))),wC=l().check(ot(new RegExp(_v))),Pv=P({packageType:z("ARCHIVE"),pieceType:V(Dt),pieceName:l(),pieceVersion:l(),archiveId:l(),platformId:l()}),Bu=P({packageType:z("REGISTRY"),pieceType:z("OFFICIAL"),pieceName:l(),pieceVersion:l()}),qu=P({packageType:z("REGISTRY"),pieceType:z("CUSTOM"),pieceName:l(),pieceVersion:l(),platformId:l()}),$C=B([Bu,qu]),OC=B([Pv,Bu,qu]),Vu=(e=>(e.CRON_EXPRESSION="CRON_EXPRESSION",e))(Vu||{}),xv=P({type:V(Vu),cronExpression:l(),timezone:l()}),kC=P({...Ae,type:V(fe),projectId:l(),flowId:l(),triggerName:l(),schedule:oe(xv),flowVersionId:l(),pieceName:l(),pieceVersion:l(),deleted:oe(l()),simulate:X()}),Zu=(y=>(y.UNKNOWN="UNKNOWN",y.FLOW_RUN_LOG="FLOW_RUN_LOG",y.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",y.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",y.FLOW_STEP_FILE="FLOW_STEP_FILE",y.SAMPLE_DATA="SAMPLE_DATA",y.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",y.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",y.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",y.PROJECT_RELEASE="PROJECT_RELEASE",y.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",y.PLATFORM_ASSET="PLATFORM_ASSET",y.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",y.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",y.KNOWLEDGE_BASE="KNOWLEDGE_BASE",y.FLOW_BUNDLE="FLOW_BUNDLE",y))(Zu||{}),Gu=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(Gu||{}),Hu=(r=>(r.S3="S3",r.DB="DB",r))(Hu||{}),zC=P({...Ae,projectId:oe(l()),platformId:oe(l()),type:V(Zu),compression:V(Gu),data:S(N()),location:V(Hu),size:oe(Pe()),fileName:oe(l()),s3Key:oe(l()),metadata:oe(M(l(),l()))}),Wu=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(Wu||{}),Ku=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(Ku||{}),RC=P({id:l(),email:l(),firstName:l(),status:V(Ku),externalId:oe(l()),platformId:oe(l()),platformRole:V(Wu),lastName:l(),created:st,updated:st,lastActiveDate:oe(st),imageUrl:oe(l())});var wi=P({...K.shape,...q(M(l(),N()),"OBJECT").shape});var Qu=P({...K.shape,...q(l(),"COLOR").shape});var $i=B([Se,We,Cn,Je,Ee,Ke,gi,br,yi,Xe,Er,wi,Ir,Sr,Tr,Qu]),T={ShortText(t){return{...t,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(t){return{...t,valueSchema:void 0,type:"CHECKBOX"}},LongText(t){return{...t,valueSchema:void 0,type:"LONG_TEXT"}},MarkDown(t){return{displayName:"Markdown",required:!1,description:t.value,type:"MARKDOWN",valueSchema:void 0,variant:t.variant??"INFO"}},Number(t){return{...t,valueSchema:void 0,type:"NUMBER"}},Json(t){return{...t,valueSchema:void 0,type:"JSON"}},Array(t){return{...t,valueSchema:void 0,type:"ARRAY"}},Object(t){return{...t,valueSchema:void 0,type:"OBJECT"}},Dropdown(t){return{...t,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(t){return{...t,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(t){return{...t,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(t){return{...t,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(t){return{...t,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(t){return{...t,valueSchema:void 0,type:"DATE_TIME"}},File(t){return{...t,valueSchema:void 0,type:"FILE"}},Custom(t){let e=t.code.toString();return{...t,code:e,valueSchema:void 0,type:"CUSTOM"}},Color(t){return{...t,valueSchema:void 0,type:"COLOR"}}};var Me=P({displayName:l(),description:S(l())});var ec=P({username:l(),password:l()}),Oi=P({...Me.shape,username:P({displayName:l(),description:S(l())}),password:P({displayName:l(),description:S(l())}),...q(ec,"BASIC_AUTH").shape});var Ev=M(l(),B([Se,We,Xe,Je,Ee])),ki=P({...Me.shape,props:Ev,...q(N(),"CUSTOM_AUTH").shape});var xt=P({...Me.shape,...q(P({auth:l()}),"SECRET_TEXT").shape});var Iv=M(l(),B([Se,We,xt,Xe,Je,Ee,Ke,Cn])),tc=P({...Me.shape,props:Iv,...q(N(),"OIDC").shape});var zi=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(zi||{}),rc=B([Se,xt,Ee]),nc=M(l(),rc),Av=P({props:S(M(l(),rc)),authUrl:l(),tokenUrl:l(),scope:F(l()),prompt:S(B([z("none"),z("consent"),z("login"),z("omit")])),pkce:S(X()),pkceMethod:S(B([z("plain"),z("S256")])),authorizationMethod:S(V(zi)),grantType:S(B([V(wr),z(vi)])),extra:S(M(l(),l()))}),oc=P({access_token:l(),props:S(nc),data:M(l(),_r())}),Ri=P({...Me.shape,...Av.shape,...q(oc,"OAUTH2").shape});var Lt=B([Oi,ki,tc,Ri,xt]),zr="Connection",Ci={SecretText(t){return{...t,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(t){return{...t,valueSchema:void 0,type:"OAUTH2",displayName:t.displayName||zr}},BasicAuth(t){return{...t,valueSchema:void 0,type:"BASIC_AUTH",displayName:t.displayName||zr,required:!0}},CustomAuth(t){return{...t,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:t.displayName||zr}},OIDC(t){return{...t,valueSchema:void 0,type:"OIDC",displayName:t.displayName||zr}},None(){}};var pN={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 wv=P({...K.shape,...q(N(),"CUSTOM").shape,code:l()});var $v=B([$i,Lt]),Di=M(l(),$v),kN=M(l(),$i);var ic=B([P({strategy:z("CRON"),cronExpression:l()}),P({strategy:z("NONE")})]),jt=class{constructor(e,r,n,o,a,u,p,d,g,m,v,h,c,f,_,y,x,b,E){this.name=e;this.displayName=r;this.description=n;this.requireAuth=o;this.props=a;this.type=u;this.handshakeConfiguration=p;this.onHandshake=d;this.renewConfiguration=g;this.onRenew=m;this.onEnable=v;this.onDisable=h;this.onStart=c;this.run=f;this.test=_;this.sampleData=y;this.testStrategy=x;this.outputSchema=b;this.aiMetadata=E}static{i(this,"ITrigger")}},Q=i(t=>{switch(t.type){case"WEBHOOK":return new jt(t.name,t.displayName,t.description,t.requireAuth??!0,t.props,t.type,t.handshakeConfiguration??{strategy:"NONE"},t.onHandshake??(async()=>({status:200})),t.renewConfiguration??{strategy:"NONE"},t.onRenew??(async()=>Promise.resolve()),t.onEnable,t.onDisable,t.onStart??(async()=>Promise.resolve()),t.run,t.test??(()=>Promise.resolve([t.sampleData])),t.sampleData,t.test?"TEST_FUNCTION":"SIMULATION",t.outputSchema,t.aiMetadata);case"POLLING":return new jt(t.name,t.displayName,t.description,t.requireAuth??!0,t.props,t.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},async()=>Promise.resolve(),t.onEnable,t.onDisable,t.onStart??(async()=>Promise.resolve()),t.run,t.test??(()=>Promise.resolve([t.sampleData])),t.sampleData,"TEST_FUNCTION",t.outputSchema,t.aiMetadata);case"MANUAL":return new jt(t.name,t.displayName,t.description,t.requireAuth??!0,t.props,t.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},async()=>Promise.resolve(),t.onEnable,t.onDisable,t.onStart??(async()=>Promise.resolve()),t.run,t.test??(()=>Promise.resolve([t.sampleData])),t.sampleData,"TEST_FUNCTION",t.outputSchema,t.aiMetadata);case"APP_WEBHOOK":return new jt(t.name,t.displayName,t.description,t.requireAuth??!0,t.props,t.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},async()=>Promise.resolve(),t.onEnable,t.onDisable,t.onStart??(async()=>Promise.resolve()),t.run,t.test??(()=>Promise.resolve([t.sampleData])),t.sampleData,Oe(t.sampleData)&&Oe(t.test)?"SIMULATION":"TEST_FUNCTION",t.outputSchema,t.aiMetadata)}},"createTrigger");var ac="2",Ln="0.82.0";var Ni=class{constructor(e,r,n,o,a,u,p,d,g=Ln,m,v=""){this.displayName=e;this.logoUrl=r;this.authors=n;this.events=o;this.categories=p;this.auth=d;this.minimumSupportedRelease=g;this.maximumSupportedRelease=m;this.description=v;this._actions={};this._triggers={};this.getContextInfo=i(()=>({version:ac}),"getContextInfo");(!Ov(g)||kv(g,Ln))&&(this.minimumSupportedRelease=Ln),a.forEach(h=>this._actions[h.name]=h),u.forEach(h=>this._triggers[h.name]=h)}static{i(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(e){return this._actions[e]}getTrigger(e){return this._triggers[e]}actions(){return this._actions}triggers(){return this._triggers}},sc=i(t=>{if(t.auth&&Array.isArray(t.auth)&&!t.auth.every((r,n,o)=>n===o.findIndex(a=>a.type===r.type)))throw new Error("Auth properties must be unique by type");return new Ni(t.displayName,t.logoUrl,t.authors??[],t.events,t.actions,t.triggers,t.categories??[],t.auth,t.minimumSupportedRelease,t.maximumSupportedRelease,t.description)},"createPiece");function Ov(t){return/^\d+\.\d+\.\d+$/.test(t)}i(Ov,"isValidSimpleSemver");function kv(t,e){let[r,n,o]=t.split(".").map(Number),[a,u,p]=e.split(".").map(Number);return r!==a?r<a:n!==u?n<u:o<p}i(kv,"isSemverLessThan");var zv=S(M(l(),M(l(),l()))),uc=P({id:S(l()),name:l(),displayName:l(),logoUrl:l(),description:l(),authors:F(l()),platformId:S(l()),directoryPath:S(l()),auth:S(B([Lt,F(Lt)])),version:l(),categories:S(F(V(Nt))),minimumSupportedRelease:S(l()),maximumSupportedRelease:S(l()),i18n:zv}),Rv=V(["human","ai","both"]),cc=P({description:S(l()),idempotent:S(X())}),lc=P({name:l(),displayName:l(),description:l(),props:Di,requireAuth:X(),errorHandlingOptions:S(hi),outputSchema:S(zn()),audience:S(Rv),aiMetadata:S(cc)}),pc=P({name:l(),displayName:l(),description:l(),props:Di,errorHandlingOptions:S(hi),type:V(fe),sampleData:N(),handshakeConfiguration:S(zn()),renewConfiguration:S(ic),testStrategy:V(Or),outputSchema:S(zn()),aiMetadata:S(cc)}),Cv=P({...uc.shape,actions:M(l(),lc),triggers:M(l(),pc)}),Dv=P({...uc.shape,actions:Pe(),triggers:Pe(),suggestedActions:S(F(pc)),suggestedTriggers:S(F(lc))}),dc=P({projectUsage:Pe(),tags:S(F(l())),pieceType:V(Dt),packageType:V(Ar),platformId:S(l()),archiveId:S(l())}),k1=P({...Cv.shape,...dc.shape}),z1=P({...Dv.shape,...dc.shape}),R1=P({name:l(),version:l()});var Nv=we(require("path")),Mv=we(require("fs/promises"));var jn=class{constructor(e,r){this.baseUrl=e;this.authenticationConverter=r}static{i(this,"BaseHttpClient")}getUrl(e){let r=new URL(`${this.baseUrl}${e.url}`),n=`${r.origin}${r.pathname}`,o=new URLSearchParams;return r.searchParams.forEach((a,u)=>{o.append(u,a)}),{urlWithoutQueryParams:n,queryParams:o}}getHeaders(e){let r={Accept:"application/json"};if(e.authentication&&this.populateAuthentication(e.authentication,r),e.body)switch(e.headers?.["Content-Type"]){case"text/csv":r["Content-Type"]="text/csv";break;default:r["Content-Type"]="application/json";break}return e.headers&&(r={...r,...e.headers}),r}populateAuthentication(e,r){this.authenticationConverter.convert(e,r)}};var Fn=class{static{i(this,"DelegatingAuthenticationConverter")}constructor(e=new Mi,r=new Ui){this.converters={BEARER_TOKEN:e,BASIC:r}}convert(e,r){return this.converters[e.type].convert(e,r)}},Mi=class{static{i(this,"BearerTokenAuthenticationConverter")}convert(e,r){return r.Authorization=`Bearer ${e.token}`,r}},Ui=class{static{i(this,"BasicTokenAuthenticationConverter")}convert(e,r){let n=`${e.username}:${e.password}`,o=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${o}`,r}};var Bn=class extends Error{constructor(r,n){let o=n.status||500,a=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:o,body:a},request:{body:r}}));this.requestBody=r;this.status=o,this.responseBody=a}static{i(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 qn=class extends jn{static{i(this,"FetchHttpClient")}constructor(e="",r=new Fn){super(e,r)}async sendRequest(e,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:o}=this.getUrl(e),a=this.getHeaders(e),u=e.queryParams??{};for(let[E,L]of Object.entries(u))o.append(E,L);let p=o.toString(),d=p?`${n}?${p}`:n,g=e.responseType??"json",m=e.followRedirects??!0,v=e.retries??0,{body:h,extraHeaders:c,isStream:f}=Uv(e.body,a),_=jv({...a,...c}),y=await Lv(async()=>{let E=new AbortController,L=e.timeout&&e.timeout>0?setTimeout(()=>E.abort(),e.timeout):void 0;try{let J={method:e.method.toString(),headers:_,body:h,redirect:m?"follow":"manual",signal:E.signal};return f&&(J.duplex="half"),r?.dispatcher!==void 0&&(J.dispatcher=r.dispatcher),await fetch(d,J)}finally{L!==void 0&&clearTimeout(L)}},v),x=m?300:400;if(y.status<200||y.status>=x){let E=await mc(y,g),L=new Bn(e.body,{status:y.status,responseBody:E});throw console.error("[HttpClient#(sanitized error message)] Request failed:",L),L}let b=await mc(y,g);return{status:y.status,headers:Fv(y.headers),body:b}}};function Uv(t,e){return qv(t)?{body:void 0,extraHeaders:{},isStream:!1}:Bv(t)?{body:t,extraHeaders:t.getHeaders(),isStream:!0}:typeof t=="string"||Buffer.isBuffer(t)||t instanceof URLSearchParams||t instanceof ArrayBuffer||typeof FormData<"u"&&t instanceof FormData||typeof Blob<"u"&&t instanceof Blob?{body:t,extraHeaders:{},isStream:!1}:(e["Content-Type"]??e["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(t).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(t),extraHeaders:{},isStream:!1}}i(Uv,"serializeBody");async function mc(t,e){switch(e){case"arraybuffer":return Buffer.from(await t.arrayBuffer());case"blob":return await t.blob();case"text":return await t.text();case"json":default:{let r=await t.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}i(mc,"parseResponseBody");async function Lv(t,e){let r;for(let n=0;n<=e;n++)try{let o=await t();if(o.status>=500&&n<e){await fc(n);continue}return o}catch(o){if(r=o,n<e){await fc(n);continue}throw o}throw r}i(Lv,"sendWithRetries");function fc(t){let e=Math.min(1e3*2**t,3e4);return new Promise(r=>setTimeout(r,e))}i(fc,"backoff");function jv(t){let e={};for(let[r,n]of Object.entries(t))n!==void 0&&(e[r]=Array.isArray(n)?n.join(", "):n);return e}i(jv,"normalizeHeaders");function Fv(t){let e={};return t.forEach((r,n)=>{e[n]=r}),e}i(Fv,"toHttpHeaders");function Bv(t){return typeof t=="object"&&t!==null&&typeof t.getHeaders=="function"&&typeof t.pipe=="function"}i(Bv,"isNodeFormData");function qv(t){return t==null}i(qv,"isNil");var w=new qn;var W=(u=>(u.GET="GET",u.POST="POST",u.PATCH="PATCH",u.PUT="PUT",u.DELETE="DELETE",u.HEAD="HEAD",u))(W||{});var OP=we(require("fs")),vp=we(yp());var kP={"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 zP(t){let e=t.split(";")[0].trim().toLowerCase();return kP[e]??""}i(zP,"contentTypeToExtension");var RP=i(({baseUrl:t,relativePath:e})=>{let r=t.endsWith("/")?t:`${t}/`,n=e.startsWith("/")?e.slice(1):e;return`${r}${n}`},"joinBaseUrlWithRelativePath"),CP=i((t,e)=>{let r="https://api.example.com";try{let n=e?t(e):void 0;return(n?.endsWith("/")?n.slice(0,-1):n)??r}catch{return r}},"getBaseUrlForDescription");function _p({auth:t,baseUrl:e,authMapping:r,description:n,displayName:o,name:a,props:u,extraProps:p,authLocation:d="headers"}){return Z({audience:"human",name:a||"custom_api_call",displayName:o||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:t,requireAuth:!!t,props:{url:T.DynamicProperties({auth:t,displayName:"",required:!0,refreshers:[],props:i(async({auth:g})=>({url:T.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
|
|
6
|
+
i.e ${CP(e,g)}/resource or /resource`,required:!0,defaultValue:g?e(g):"",...u?.url??{}})}),"props")}),method:T.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(W).map(g=>({label:g,value:g}))},...u?.method??{}}),headers:T.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...u?.headers??{}}),queryParams:T.Object({displayName:"Query Parameters",required:!0,...u?.queryParams??{}}),body_type:T.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:T.DynamicProperties({auth:t,displayName:"Body",refreshers:["body_type"],required:!1,props:i(async({body_type:g})=>{if(!g)return{};let m=g,v={};switch(m){case"none":break;case"json":v.data=T.Json({displayName:"JSON Body",required:!0,...u?.body??{}});break;case"raw":v.data=T.LongText({displayName:"Raw Body",required:!0});break;case"form_data":v.data=T.Array({displayName:"Form Data",required:!0,properties:{fieldName:T.ShortText({displayName:"Field Name",required:!0}),fieldType:T.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:T.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:T.File({displayName:"File Field Value",required:!1})}});break}return v},"props")}),response_is_binary:T.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:T.Checkbox({displayName:"No Error on Failure",required:!1,...u?.failsafe??{}}),timeout:T.Number({displayName:"Timeout (in seconds)",required:!1,...u?.timeout??{}}),followRedirects:T.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...p},run:i(async g=>{let{method:m,url:v,headers:h,queryParams:c,body:f,body_type:_,failsafe:y,timeout:x,response_is_binary:b,followRedirects:E}=g.propsValue;Nn(m,"Method"),Nn(v,"URL");let L=Oe(r)?{}:await r(g.auth,g.propsValue),J=v.url,xe=J.startsWith("http://")||J.startsWith("https://")?J:RP({baseUrl:e(g.auth),relativePath:J}),ee={method:m,url:xe,headers:{...h??{},...d==="headers"||!Oe(d)?L:{}},queryParams:{...d==="queryParams"?L:{},...c??{}},timeout:x?x*1e3:0,followRedirects:E};if(b&&(ee.responseType="arraybuffer"),f)if(_&&_!=="none"){let ne=f.data;if(_==="form_data"){let _e=ne,te=new vp.default;for(let{fieldName:Ve,fieldType:Ze,textFieldValue:be,fileFieldValue:Ie}of _e)Ze==="text"&&!j(be)?te.append(Ve,be):Ze==="file"&&!j(Ie)&&te.append(Ve,Ie.data,{filename:Ie?.filename});ee.body=te,ee.headers={...ee.headers,...te.getHeaders()}}else ee.body=ne}else _||(ee.body=f);try{let ne=await w.sendRequest(ee);return await DP(g.files,ne.body,ne.status,ne.headers,b)}catch(ne){if(y)return ne.errorMessage();throw ne}},"run")})}i(_p,"createCustomApiCallAction");var DP=i(async(t,e,r,n,o)=>{let a;if(o&&NP(e)){let u=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],p=zP(u??"")||"txt",d;e instanceof ArrayBuffer?d=Buffer.from(new Uint8Array(e)):Buffer.isBuffer(e)?d=e:d=Buffer.from(e),a=await t.write({fileName:`output.${p}`,data:d})}else a=e;return{status:r,headers:n,body:a}},"handleBinaryResponse"),NP=i(t=>t instanceof ArrayBuffer||Buffer.isBuffer(t),"isBinaryBody");var Pp=Z({name:"create_customer",auth:A,displayName:"Create Customer",description:"Create a customer in stripe",audience:"both",aiMetadata:{description:"Creates a new customer record in Stripe from an email and name, with optional contact and address fields. Use when onboarding a new payer before charging, invoicing, or subscribing them. Not idempotent: each call creates a distinct customer even with identical input.",idempotent:!1},props:{email:T.ShortText({displayName:"Email",description:void 0,required:!0}),name:T.ShortText({displayName:"Name",required:!0}),description:T.LongText({displayName:"Description",required:!1}),phone:T.ShortText({displayName:"Phone",required:!1}),line1:T.ShortText({displayName:"Address Line 1",required:!1}),postal_code:T.ShortText({displayName:"Postal Code",required:!1}),city:T.ShortText({displayName:"City",required:!1}),state:T.ShortText({displayName:"State",required:!1}),country:T.ShortText({displayName:"Country",required:!1})},async run(t){let e={email:t.propsValue.email,name:t.propsValue.name,description:t.propsValue.description,phone:t.propsValue.phone,address:{line1:t.propsValue.line1,postal_code:t.propsValue.postal_code,city:t.propsValue.city,state:t.propsValue.state,country:t.propsValue.country}};return(await w.sendRequest({method:"POST",url:"https://api.stripe.com/v1/customers",headers:{Authorization:"Bearer "+t.auth.secret_text,"Content-Type":"application/x-www-form-urlencoded"},body:{email:e.email,name:e.name,description:e.description,phone:e.phone,address:e.address}})).body}});var xp=Z({name:"create_invoice",auth:A,displayName:"Create Invoice",description:"Create an Invoice in stripe",audience:"both",aiMetadata:{description:"Creates a draft invoice in Stripe for an existing customer in the given currency. Use to bill a customer for pending invoice items. Requires a valid Stripe customer ID; not idempotent, as each call creates a separate invoice.",idempotent:!1},props:{customer_id:T.ShortText({displayName:"Customer ID",description:"Stripe Customer ID",required:!0}),currency:T.ShortText({displayName:"Currency",description:"Currency for the invoice (e.g., USD)",required:!0}),description:T.LongText({displayName:"Description",description:"Description for the invoice",required:!1})},async run(t){let e={customer:t.propsValue.customer_id,currency:t.propsValue.currency,description:t.propsValue.description};return(await w.sendRequest({method:"POST",url:"https://api.stripe.com/v1/invoices",headers:{Authorization:"Bearer "+t.auth.secret_text,"Content-Type":"application/x-www-form-urlencoded"},body:{customer:e.customer,currency:e.currency,description:e.description}})).body}});var bp=Z({name:"retrieve_customer",auth:A,displayName:"Retrieve Customer",description:"Retrieve a customer in stripe by id",audience:"both",aiMetadata:{description:"Fetches the full details of a single Stripe customer by its customer ID (e.g., cus_...). Use when you already have the exact ID and need the current record; for lookup by email use Search Customer instead. Read-only and idempotent.",idempotent:!0},props:{id:T.ShortText({displayName:"ID",description:void 0,required:!0})},async run(t){let e={id:t.propsValue.id};return(await w.sendRequest({method:"GET",url:`https://api.stripe.com/v1/customers/${e.id}`,authentication:{type:"BEARER_TOKEN",token:t.auth.secret_text}})).body}});var tr=we(require("crypto"),1),Da=require("events");var Qn=we(require("crypto"),1);var lt=class{static{i(this,"CryptoProvider")}computeHMACSignature(e,r){throw new Error("computeHMACSignature not implemented.")}computeHMACSignatureAsync(e,r){throw new Error("computeHMACSignatureAsync not implemented.")}computeSHA256Async(e){throw new Error("computeSHA256 not implemented.")}},Gt=class extends Error{static{i(this,"CryptoProviderOnlySupportsAsyncError")}};var Yn=class extends lt{static{i(this,"NodeCryptoProvider")}computeHMACSignature(e,r){return Qn.createHmac("sha256",r).update(e,"utf8").digest("hex")}async computeHMACSignatureAsync(e,r){return await this.computeHMACSignature(e,r)}async computeSHA256Async(e){return new Uint8Array(await Qn.createHash("sha256").update(e).digest())}};var sa=we(require("http"),1),ua=we(require("https"),1);var ve=class t{static{i(this,"HttpClient")}getClientName(){throw new Error("getClientName not implemented.")}makeRequest(e,r,n,o,a,u,p,d){throw new Error("makeRequest not implemented.")}static makeTimeoutError(){let e=new TypeError(t.TIMEOUT_ERROR_CODE);return e.code=t.TIMEOUT_ERROR_CODE,e}};ve.CONNECTION_CLOSED_ERROR_CODES=["ECONNRESET","EPIPE"];ve.TIMEOUT_ERROR_CODE="ETIMEDOUT";var pt=class{static{i(this,"HttpClientResponse")}constructor(e,r){this._statusCode=e,this._headers=r}getStatusCode(){return this._statusCode}getHeaders(){return this._headers}getRawResponse(){throw new Error("getRawResponse not implemented.")}toStream(e){throw new Error("toStream not implemented.")}toJSON(){throw new Error("toJSON not implemented.")}};var Tp=sa.default||sa,Sp=ua.default||ua,MP=new Tp.Agent({keepAlive:!0}),UP=new Sp.Agent({keepAlive:!0}),Mr=class extends ve{static{i(this,"NodeHttpClient")}constructor(e){super(),this._agent=e}getClientName(){return"node"}makeRequest(e,r,n,o,a,u,p,d){let g=p==="http",m=this._agent;return m||(m=g?MP:UP),new Promise((h,c)=>{let f=(g?Tp:Sp).request({host:e,port:r,path:n,method:o,agent:m,headers:a,ciphers:"DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2:!MD5"});f.setTimeout(d,()=>{f.destroy(ve.makeTimeoutError())}),f.on("response",_=>{h(new aa(_))}),f.on("error",_=>{c(_)}),f.once("socket",_=>{_.connecting?_.once(g?"connect":"secureConnect",()=>{f.write(u),f.end()}):(f.write(u),f.end())})})}},aa=class extends pt{static{i(this,"NodeHttpClientResponse")}constructor(e){super(e.statusCode,e.headers||{}),this._res=e}getRawResponse(){return this._res}toStream(e){return this._res.once("end",()=>e()),this._res}toJSON(){return new Promise((e,r)=>{let n="";this._res.setEncoding("utf8"),this._res.on("data",o=>{n+=o}),this._res.once("end",()=>{try{e(JSON.parse(n))}catch(o){r(o)}})})}};var gd=we(hd(),1);var ka=["apiKey","idempotencyKey","stripeAccount","apiVersion","maxNetworkRetries","timeout","host","authenticator","stripeContext","additionalHeaders","streaming"];function yd(t){return t&&typeof t=="object"&&ka.some(e=>Object.prototype.hasOwnProperty.call(t,e))}i(yd,"isOptionsHash");function ft(t,e){return gd.stringify(t,{serializeDate:i(r=>Math.floor(r.getTime()/1e3).toString(),"serializeDate"),arrayFormat:e=="v2"?"repeat":"indices"}).replace(/%5B/g,"[").replace(/%5D/g,"]")}i(ft,"queryStringifyRequestData");var po=(()=>{let t={"\n":"\\n",'"':'\\"',"\u2028":"\\u2028","\u2029":"\\u2029"};return e=>{let r=e.replace(/["\n\r\u2028\u2029]/g,n=>t[n]);return n=>r.replace(/\{([\s\S]+?)\}/g,(o,a)=>{let u=n[a];return vb(u)?encodeURIComponent(u):""})}})();function vb(t){return["number","string","boolean"].includes(typeof t)}i(vb,"isValidEncodeUriComponentType");function vd(t){let e=t.match(/\{\w+\}/g);return e?e.map(r=>r.replace(/[{}]/g,"")):[]}i(vd,"extractUrlParams");function Jt(t){if(!Array.isArray(t)||!t[0]||typeof t[0]!="object")return{};if(!yd(t[0]))return t.shift();let e=Object.keys(t[0]),r=e.filter(n=>ka.includes(n));return r.length>0&&r.length!==e.length&&Wr(`Options found in arguments (${r.join(", ")}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options.`),{}}i(Jt,"getDataFromArgs");function mo(t){let e={host:null,headers:{},settings:{},streaming:!1};if(t.length>0){let r=t[t.length-1];if(typeof r=="string")e.authenticator=lo(t.pop());else if(yd(r)){let n=Object.assign({},t.pop()),o=Object.keys(n).filter(a=>!ka.includes(a));if(o.length&&Wr(`Invalid options found (${o.join(", ")}); ignoring.`),n.apiKey&&(e.authenticator=lo(n.apiKey)),n.idempotencyKey&&(e.headers["Idempotency-Key"]=n.idempotencyKey),n.stripeAccount&&(e.headers["Stripe-Account"]=n.stripeAccount),n.stripeContext){if(e.headers["Stripe-Account"])throw new Error("Can't specify both stripeAccount and stripeContext.");e.headers["Stripe-Context"]=n.stripeContext}if(n.apiVersion&&(e.headers["Stripe-Version"]=n.apiVersion),Number.isInteger(n.maxNetworkRetries)&&(e.settings.maxNetworkRetries=n.maxNetworkRetries),Number.isInteger(n.timeout)&&(e.settings.timeout=n.timeout),n.host&&(e.host=n.host),n.authenticator){if(n.apiKey)throw new Error("Can't specify both apiKey and authenticator.");if(typeof n.authenticator!="function")throw new Error("The authenticator must be a function receiving a request as the first parameter.");e.authenticator=n.authenticator}n.additionalHeaders&&(e.headers=n.additionalHeaders),n.streaming&&(e.streaming=!0)}}return e}i(mo,"getOptionsFromArgs");function _d(t){let e=this,r=Object.prototype.hasOwnProperty.call(t,"constructor")?t.constructor:function(...n){e.apply(this,n)};return Object.assign(r,e),r.prototype=Object.create(e.prototype),Object.assign(r.prototype,t),r}i(_d,"protoExtend");function fo(t){if(typeof t!="object")throw new Error("Argument must be an object");return Object.keys(t).reduce((e,r)=>(t[r]!=null&&(e[r]=t[r]),e),{})}i(fo,"removeNullish");function Pd(t){return t&&typeof t=="object"?Object.keys(t).reduce((e,r)=>(e[_b(r)]=t[r],e),{}):t}i(Pd,"normalizeHeaders");function _b(t){return t.split("-").map(e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()).join("-")}i(_b,"normalizeHeader");function Hr(t,e){return e?t.then(r=>{setTimeout(()=>{e(null,r)},0)},r=>{setTimeout(()=>{e(r,null)},0)}):t}i(Hr,"callbackifyPromiseWithTimeout");function xd(t){return t==="OAuth"?"oauth":t[0].toLowerCase()+t.substring(1)}i(xd,"pascalToCamelCase");function Wr(t){return typeof process.emitWarning!="function"?console.warn(`Stripe: ${t}`):process.emitWarning(t,"Stripe")}i(Wr,"emitWarning");function Pb(t){let e=typeof t;return(e==="function"||e==="object")&&!!t}i(Pb,"isObject");function bd(t){let e={},r=i((n,o)=>{Object.entries(n).forEach(([a,u])=>{let p=o?`${o}[${a}]`:a;if(Pb(u)){if(!(u instanceof Uint8Array)&&!Object.prototype.hasOwnProperty.call(u,"data"))return r(u,p);e[p]=u}else e[p]=String(u)})},"step");return r(t,null),e}i(bd,"flattenAndStringify");function ho(t,e,r){if(!Number.isInteger(e)){if(r!==void 0)return r;throw new Error(`${t} must be an integer`)}return e}i(ho,"validateInteger");function Td(){return typeof process>"u"?{}:{lang_version:process.version,platform:process.platform}}i(Td,"determineProcessUserAgentProperties");function lo(t){let e=i(r=>(r.headers.Authorization="Bearer "+t,Promise.resolve()),"authenticator");return e._apiKey=t,e}i(lo,"createApiKeyAuthenticator");function Sd(t){let e=t.reduce((o,a)=>o+a.length,0),r=new Uint8Array(e),n=0;return t.forEach(o=>{r.set(o,n),n+=o.length}),r}i(Sd,"concat");function xb(t,e){return this[t]instanceof Date?Math.floor(this[t].getTime()/1e3).toString():e}i(xb,"dateTimeReplacer");function Ed(t){return JSON.stringify(t,xb)}i(Ed,"jsonStringifyRequestData");function Xt(t){return t&&t.startsWith("/v2")?"v2":"v1"}i(Xt,"getAPIMode");function go(t){return Array.isArray(t)?t.join(", "):String(t)}i(go,"parseHttpHeaderAsString");function Id(t){let e=Array.isArray(t)?t[0]:t;return Number(e)}i(Id,"parseHttpHeaderAsNumber");function Ad(t){return Object.entries(t).map(([e,r])=>[e,go(r)])}i(Ad,"parseHeadersForFetch");var yo=class t extends ve{static{i(this,"FetchHttpClient")}constructor(e){if(super(),!e){if(!globalThis.fetch)throw new Error("fetch() function not provided and is not defined in the global scope. You must provide a fetch implementation.");e=globalThis.fetch}globalThis.AbortController?this._fetchFn=t.makeFetchWithAbortTimeout(e):this._fetchFn=t.makeFetchWithRaceTimeout(e)}static makeFetchWithRaceTimeout(e){return(r,n,o)=>{let a,u=new Promise((d,g)=>{a=setTimeout(()=>{a=null,g(ve.makeTimeoutError())},o)}),p=e(r,n);return Promise.race([p,u]).finally(()=>{a&&clearTimeout(a)})}}static makeFetchWithAbortTimeout(e){return async(r,n,o)=>{let a=new AbortController,u=setTimeout(()=>{u=null,a.abort(ve.makeTimeoutError())},o);try{return await e(r,Object.assign(Object.assign({},n),{signal:a.signal}))}catch(p){throw p.name==="AbortError"?ve.makeTimeoutError():p}finally{u&&clearTimeout(u)}}}getClientName(){return"fetch"}async makeRequest(e,r,n,o,a,u,p,d){let g=p==="http",m=new URL(n,`${g?"http":"https"}://${e}`);m.port=r;let v=o=="POST"||o=="PUT"||o=="PATCH",h=u||(v?"":void 0),c=await this._fetchFn(m.toString(),{method:o,headers:Ad(a),body:typeof h=="object"?JSON.stringify(h):h},d);return new za(c)}},za=class t extends pt{static{i(this,"FetchHttpClientResponse")}constructor(e){super(e.status,t._transformHeadersToObject(e.headers)),this._res=e}getRawResponse(){return this._res}toStream(e){return e(),this._res.body}toJSON(){return this._res.json()}static _transformHeadersToObject(e){let r={};for(let n of e){if(!Array.isArray(n)||n.length!=2)throw new Error("Response objects produced by the fetch function given to FetchHttpClient do not have an iterable headers map. Response#headers should be an iterable object.");r[n[0]]=n[1]}return r}};var vo=class extends lt{static{i(this,"SubtleCryptoProvider")}constructor(e){super(),this.subtleCrypto=e||crypto.subtle}computeHMACSignature(e,r){throw new Gt("SubtleCryptoProvider cannot be used in a synchronous context.")}async computeHMACSignatureAsync(e,r){let n=new TextEncoder,o=await this.subtleCrypto.importKey("raw",n.encode(r),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),a=await this.subtleCrypto.sign("hmac",o,n.encode(e)),u=new Uint8Array(a),p=new Array(u.length);for(let d=0;d<u.length;d++)p[d]=Ra[u[d]];return p.join("")}async computeSHA256Async(e){return new Uint8Array(await this.subtleCrypto.digest("SHA-256",e))}},Ra=new Array(256);for(let t=0;t<Ra.length;t++)Ra[t]=t.toString(16).padStart(2,"0");var _o=class{static{i(this,"PlatformFunctions")}constructor(){this._fetchFn=null,this._agent=null}getUname(){throw new Error("getUname not implemented.")}uuid4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let r=Math.random()*16|0;return(e==="x"?r:r&3|8).toString(16)})}secureCompare(e,r){if(e.length!==r.length)return!1;let n=e.length,o=0;for(let a=0;a<n;++a)o|=e.charCodeAt(a)^r.charCodeAt(a);return o===0}createEmitter(){throw new Error("createEmitter not implemented.")}tryBufferData(e){throw new Error("tryBufferData not implemented.")}createNodeHttpClient(e){throw new Error("createNodeHttpClient not implemented.")}createFetchHttpClient(e){return new yo(e)}createDefaultHttpClient(){throw new Error("createDefaultHttpClient not implemented.")}createNodeCryptoProvider(){throw new Error("createNodeCryptoProvider not implemented.")}createSubtleCryptoProvider(e){return new vo(e)}createDefaultCryptoProvider(){throw new Error("createDefaultCryptoProvider not implemented.")}};var Eo={};_n(Eo,{StripeAPIError:()=>Yt,StripeAuthenticationError:()=>Qt,StripeCardError:()=>Po,StripeConnectionError:()=>Xr,StripeError:()=>le,StripeIdempotencyError:()=>xo,StripeInvalidGrantError:()=>bo,StripeInvalidRequestError:()=>Kr,StripePermissionError:()=>Jr,StripeRateLimitError:()=>er,StripeSignatureVerificationError:()=>Re,StripeUnknownError:()=>To,TemporarySessionExpiredError:()=>So,generateV1Error:()=>Yr,generateV2Error:()=>Ca});var Yr=i(t=>{switch(t.type){case"card_error":return new Po(t);case"invalid_request_error":return new Kr(t);case"api_error":return new Yt(t);case"authentication_error":return new Qt(t);case"rate_limit_error":return new er(t);case"idempotency_error":return new xo(t);case"invalid_grant":return new bo(t);default:return new To(t)}},"generateV1Error"),Ca=i(t=>{switch(t.type){case"temporary_session_expired":return new So(t)}switch(t.code){case"invalid_fields":return new Kr(t)}return Yr(t)},"generateV2Error"),le=class extends Error{static{i(this,"StripeError")}constructor(e={},r=null){var n;super(e.message),this.type=r||this.constructor.name,this.raw=e,this.rawType=e.type,this.code=e.code,this.doc_url=e.doc_url,this.param=e.param,this.detail=e.detail,this.headers=e.headers,this.requestId=e.requestId,this.statusCode=e.statusCode,this.message=(n=e.message)!==null&&n!==void 0?n:"",this.userMessage=e.user_message,this.charge=e.charge,this.decline_code=e.decline_code,this.payment_intent=e.payment_intent,this.payment_method=e.payment_method,this.payment_method_type=e.payment_method_type,this.setup_intent=e.setup_intent,this.source=e.source}};le.generate=Yr;var Po=class extends le{static{i(this,"StripeCardError")}constructor(e={}){super(e,"StripeCardError")}},Kr=class extends le{static{i(this,"StripeInvalidRequestError")}constructor(e={}){super(e,"StripeInvalidRequestError")}},Yt=class extends le{static{i(this,"StripeAPIError")}constructor(e={}){super(e,"StripeAPIError")}},Qt=class extends le{static{i(this,"StripeAuthenticationError")}constructor(e={}){super(e,"StripeAuthenticationError")}},Jr=class extends le{static{i(this,"StripePermissionError")}constructor(e={}){super(e,"StripePermissionError")}},er=class extends le{static{i(this,"StripeRateLimitError")}constructor(e={}){super(e,"StripeRateLimitError")}},Xr=class extends le{static{i(this,"StripeConnectionError")}constructor(e={}){super(e,"StripeConnectionError")}},Re=class extends le{static{i(this,"StripeSignatureVerificationError")}constructor(e,r,n={}){super(n,"StripeSignatureVerificationError"),this.header=e,this.payload=r}},xo=class extends le{static{i(this,"StripeIdempotencyError")}constructor(e={}){super(e,"StripeIdempotencyError")}},bo=class extends le{static{i(this,"StripeInvalidGrantError")}constructor(e={}){super(e,"StripeInvalidGrantError")}},To=class extends le{static{i(this,"StripeUnknownError")}constructor(e={}){super(e,"StripeUnknownError")}},So=class extends le{static{i(this,"TemporarySessionExpiredError")}constructor(e={}){super(e,"TemporarySessionExpiredError")}};var wd=require("child_process");var Na=class extends le{static{i(this,"StreamProcessingError")}},Io=class extends _o{static{i(this,"NodePlatformFunctions")}constructor(){super(),this._exec=wd.exec,this._UNAME_CACHE=null}uuid4(){return tr.randomUUID?tr.randomUUID():super.uuid4()}getUname(){return this._UNAME_CACHE||(this._UNAME_CACHE=new Promise((e,r)=>{try{this._exec("uname -a",(n,o)=>{if(n)return e(null);e(o)})}catch{e(null)}})),this._UNAME_CACHE}secureCompare(e,r){if(!e||!r)throw new Error("secureCompare must receive two arguments");if(e.length!==r.length)return!1;if(tr.timingSafeEqual){let n=new TextEncoder,o=n.encode(e),a=n.encode(r);return tr.timingSafeEqual(o,a)}return super.secureCompare(e,r)}createEmitter(){return new Da.EventEmitter}tryBufferData(e){if(!(e.file.data instanceof Da.EventEmitter))return Promise.resolve(e);let r=[];return new Promise((n,o)=>{e.file.data.on("data",a=>{r.push(a)}).once("end",()=>{let a=Object.assign({},e);a.file.data=Sd(r),n(a)}).on("error",a=>{o(new Na({message:"An error occurred while attempting to process the file for upload.",detail:a}))})})}createNodeHttpClient(e){return new Mr(e)}createDefaultHttpClient(){return new Mr}createNodeCryptoProvider(){return new Yn}createDefaultCryptoProvider(){return this.createNodeCryptoProvider()}};var bb=60,Ao=class t{static{i(this,"RequestSender")}constructor(e,r){this._stripe=e,this._maxBufferedRequestMetric=r}_addHeadersDirectlyToObject(e,r){e.requestId=r["request-id"],e.stripeAccount=e.stripeAccount||r["stripe-account"],e.apiVersion=e.apiVersion||r["stripe-version"],e.idempotencyKey=e.idempotencyKey||r["idempotency-key"]}_makeResponseEvent(e,r,n){let o=Date.now(),a=o-e.request_start_time;return fo({api_version:n["stripe-version"],account:n["stripe-account"],idempotency_key:n["idempotency-key"],method:e.method,path:e.path,status:r,request_id:this._getRequestId(n),elapsed:a,request_start_time:e.request_start_time,request_end_time:o})}_getRequestId(e){return e["request-id"]}_streamingResponseHandler(e,r,n){return o=>{let a=o.getHeaders(),u=i(()=>{let d=this._makeResponseEvent(e,o.getStatusCode(),a);this._stripe._emitter.emit("response",d),this._recordRequestMetrics(this._getRequestId(a),d.elapsed,r)},"streamCompleteCallback"),p=o.toStream(u);return this._addHeadersDirectlyToObject(p,a),n(null,p)}}_jsonResponseHandler(e,r,n,o){return a=>{let u=a.getHeaders(),p=this._getRequestId(u),d=a.getStatusCode(),g=this._makeResponseEvent(e,d,u);this._stripe._emitter.emit("response",g),a.toJSON().then(m=>{if(m.error){let v;throw typeof m.error=="string"&&(m.error={type:m.error,message:m.error_description}),m.error.headers=u,m.error.statusCode=d,m.error.requestId=p,d===401?v=new Qt(m.error):d===403?v=new Jr(m.error):d===429?v=new er(m.error):r==="v2"?v=Ca(m.error):v=Yr(m.error),v}return m},m=>{throw new Yt({message:"Invalid JSON received from the Stripe API",exception:m,requestId:u["request-id"]})}).then(m=>{this._recordRequestMetrics(p,g.elapsed,n);let v=a.getRawResponse();this._addHeadersDirectlyToObject(v,u),Object.defineProperty(m,"lastResponse",{enumerable:!1,writable:!1,value:v}),o(null,m)},m=>o(m,null))}}static _generateConnectionErrorMessage(e){return`An error occurred with our connection to Stripe.${e>0?` Request was retried ${e} times.`:""}`}static _shouldRetry(e,r,n,o){return o&&r===0&&ve.CONNECTION_CLOSED_ERROR_CODES.includes(o.code)?!0:r>=n?!1:e?e.getHeaders()["stripe-should-retry"]==="false"?!1:e.getHeaders()["stripe-should-retry"]==="true"||e.getStatusCode()===409||e.getStatusCode()>=500:!0}_getSleepTimeInMS(e,r=null){let n=this._stripe.getInitialNetworkRetryDelay(),o=this._stripe.getMaxNetworkRetryDelay(),a=Math.min(n*Math.pow(2,e-1),o);return a*=.5*(1+Math.random()),a=Math.max(n,a),Number.isInteger(r)&&r<=bb&&(a=Math.max(a,r)),a*1e3}_getMaxNetworkRetries(e={}){return e.maxNetworkRetries!==void 0&&Number.isInteger(e.maxNetworkRetries)?e.maxNetworkRetries:this._stripe.getMaxNetworkRetries()}_defaultIdempotencyKey(e,r,n){let o=this._getMaxNetworkRetries(r),a=i(()=>`stripe-node-retry-${this._stripe._platformFunctions.uuid4()}`,"genKey");if(n==="v2"){if(e==="POST"||e==="DELETE")return a()}else if(n==="v1"&&e==="POST"&&o>0)return a();return null}_makeHeaders({contentType:e,contentLength:r,apiVersion:n,clientUserAgent:o,method:a,userSuppliedHeaders:u,userSuppliedSettings:p,stripeAccount:d,stripeContext:g,apiMode:m}){let v={Accept:"application/json","Content-Type":e,"User-Agent":this._getUserAgentString(m),"X-Stripe-Client-User-Agent":o,"X-Stripe-Client-Telemetry":this._getTelemetryHeader(),"Stripe-Version":n,"Stripe-Account":d,"Stripe-Context":g,"Idempotency-Key":this._defaultIdempotencyKey(a,p,m)},h=a=="POST"||a=="PUT"||a=="PATCH";return(h||r)&&(h||Wr(`${a} method had non-zero contentLength but no payload is expected for this verb`),v["Content-Length"]=r),Object.assign(fo(v),Pd(u))}_getUserAgentString(e){let r=this._stripe.getConstant("PACKAGE_VERSION"),n=this._stripe._appInfo?this._stripe.getAppInfoAsString():"";return`Stripe/${e} NodeBindings/${r} ${n}`.trim()}_getTelemetryHeader(){if(this._stripe.getTelemetryEnabled()&&this._stripe._prevRequestMetrics.length>0){let e=this._stripe._prevRequestMetrics.shift();return JSON.stringify({last_request_metrics:e})}}_recordRequestMetrics(e,r,n){if(this._stripe.getTelemetryEnabled()&&e)if(this._stripe._prevRequestMetrics.length>this._maxBufferedRequestMetric)Wr("Request metrics buffer is full, dropping telemetry message.");else{let o={request_id:e,request_duration_ms:r};n&&n.length>0&&(o.usage=n),this._stripe._prevRequestMetrics.push(o)}}_rawRequest(e,r,n,o){return new Promise((u,p)=>{let d;try{let c=e.toUpperCase();if(c!=="POST"&&n&&Object.keys(n).length!==0)throw new Error("rawRequest only supports params on POST requests. Please pass null and add your parameters to path.");let f=[].slice.call([n,o]),_=Jt(f),y=c==="POST"?Object.assign({},_):null,x=mo(f),b=x.headers,E=x.authenticator;d={requestMethod:c,requestPath:r,bodyData:y,queryData:{},authenticator:E,headers:b,host:x.host,streaming:!!x.streaming,settings:{},usage:["raw_request"]}}catch(c){p(c);return}function g(c,f){c?p(c):u(f)}i(g,"requestCallback");let{headers:m,settings:v}=d,h=d.authenticator;this._request(d.requestMethod,d.host,r,d.bodyData,h,{headers:m,settings:v,streaming:d.streaming},d.usage,g)})}_request(e,r,n,o,a,u,p=[],d,g=null){var m;let v;a=(m=a??this._stripe._authenticator)!==null&&m!==void 0?m:null;let h=Xt(n),c=i((y,x,b,E,L)=>setTimeout(y,this._getSleepTimeInMS(E,L),x,b,E+1),"retryRequest"),f=i((y,x,b)=>{let E=u.settings&&u.settings.timeout&&Number.isInteger(u.settings.timeout)&&u.settings.timeout>=0?u.settings.timeout:this._stripe.getApiField("timeout"),L={host:r||this._stripe.getApiField("host"),port:this._stripe.getApiField("port"),path:n,method:e,headers:Object.assign({},x),body:v,protocol:this._stripe.getApiField("protocol")};a(L).then(()=>{let J=this._stripe.getApiField("httpClient").makeRequest(L.host,L.port,L.path,L.method,L.headers,L.body,L.protocol,E),xe=Date.now(),ee=fo({api_version:y,account:go(x["Stripe-Account"]),idempotency_key:go(x["Idempotency-Key"]),method:e,path:n,request_start_time:xe}),ne=b||0,_e=this._getMaxNetworkRetries(u.settings||{});this._stripe._emitter.emit("request",ee),J.then(te=>t._shouldRetry(te,ne,_e)?c(f,y,x,ne,Id(te.getHeaders()["retry-after"])):u.streaming&&te.getStatusCode()<400?this._streamingResponseHandler(ee,p,d)(te):this._jsonResponseHandler(ee,h,p,d)(te)).catch(te=>{if(t._shouldRetry(null,ne,_e,te))return c(f,y,x,ne,null);{let Ve=te.code&&te.code===ve.TIMEOUT_ERROR_CODE;return d(new Xr({message:Ve?`Request aborted due to timeout being reached (${E}ms)`:t._generateConnectionErrorMessage(ne),detail:te}))}})}).catch(J=>{throw new le({message:"Unable to authenticate the request",exception:J})})},"makeRequest"),_=i((y,x)=>{if(y)return d(y);v=x,this._stripe.getClientUserAgent(b=>{let E=this._stripe.getApiField("version"),L=this._makeHeaders({contentType:h=="v2"?"application/json":"application/x-www-form-urlencoded",contentLength:v.length,apiVersion:E,clientUserAgent:b,method:e,userSuppliedHeaders:u.headers,userSuppliedSettings:u.settings,stripeAccount:h=="v2"?null:this._stripe.getApiField("stripeAccount"),stripeContext:h=="v2"?this._stripe.getApiField("stripeContext"):null,apiMode:h});f(E,L,0)})},"prepareAndMakeRequest");if(g)g(e,o,u.headers,_);else{let y;h=="v2"?y=o?Ed(o):"":y=ft(o||{},h),_(null,y)}}};var wo=class{static{i(this,"V1Iterator")}constructor(e,r,n,o){this.index=0,this.pagePromise=e,this.promiseCache={currentPromise:null},this.requestArgs=r,this.spec=n,this.stripeResource=o}async iterate(e){if(!(e&&e.data&&typeof e.data.length=="number"))throw Error("Unexpected: Stripe API response does not have a well-formed `data` array.");let r=Od(this.requestArgs);if(this.index<e.data.length){let n=r?e.data.length-1-this.index:this.index,o=e.data[n];return this.index+=1,{value:o,done:!1}}else if(e.has_more){this.index=0,this.pagePromise=this.getNextPage(e);let n=await this.pagePromise;return this.iterate(n)}return{done:!0,value:void 0}}getNextPage(e){throw new Error("Unimplemented")}async _next(){return this.iterate(await this.pagePromise)}next(){if(this.promiseCache.currentPromise)return this.promiseCache.currentPromise;let e=(async()=>{let r=await this._next();return this.promiseCache.currentPromise=null,r})();return this.promiseCache.currentPromise=e,e}},Ua=class extends wo{static{i(this,"V1ListIterator")}getNextPage(e){let r=Od(this.requestArgs),n=Ib(e,r);return this.stripeResource._makeRequest(this.requestArgs,this.spec,{[r?"ending_before":"starting_after"]:n})}},La=class extends wo{static{i(this,"V1SearchIterator")}getNextPage(e){if(!e.next_page)throw Error("Unexpected: Stripe API response does not have a well-formed `next_page` field, but `has_more` was true.");return this.stripeResource._makeRequest(this.requestArgs,this.spec,{page:e.next_page})}},ja=class{static{i(this,"V2ListIterator")}constructor(e,r,n,o){this.currentPageIterator=(async()=>(await e).data[Symbol.iterator]())(),this.nextPageUrl=(async()=>(await e).next_page_url||null)(),this.requestArgs=r,this.spec=n,this.stripeResource=o}async turnPage(){let e=await this.nextPageUrl;if(!e)return null;this.spec.fullPath=e;let r=await this.stripeResource._makeRequest([],this.spec,{});return this.nextPageUrl=Promise.resolve(r.next_page_url),this.currentPageIterator=Promise.resolve(r.data[Symbol.iterator]()),this.currentPageIterator}async next(){{let n=(await this.currentPageIterator).next();if(!n.done)return{done:!1,value:n.value}}let e=await this.turnPage();if(!e)return{done:!0,value:void 0};let r=e.next();return r.done?{done:!0,value:void 0}:{done:!1,value:r.value}}},$d=i((t,e,r,n)=>{let o=Xt(r.fullPath||r.path);return o!=="v2"&&r.methodType==="search"?Ma(new La(n,e,r,t)):o!=="v2"&&r.methodType==="list"?Ma(new Ua(n,e,r,t)):o==="v2"&&r.methodType==="list"?Ma(new ja(n,e,r,t)):null},"makeAutoPaginationMethods"),Ma=i(t=>{let e=Ab((...o)=>t.next(...o)),r=wb(e),n={autoPagingEach:e,autoPagingToArray:r,next:i(()=>t.next(),"next"),return:i(()=>({}),"return"),[Tb()]:()=>n};return n},"makeAutoPaginationMethodsFromIterator");function Tb(){return typeof Symbol<"u"&&Symbol.asyncIterator?Symbol.asyncIterator:"@@asyncIterator"}i(Tb,"getAsyncIteratorSymbol");function Sb(t){if(t.length<2)return null;let e=t[1];if(typeof e!="function")throw Error(`The second argument to autoPagingEach, if present, must be a callback function; received ${typeof e}`);return e}i(Sb,"getDoneCallback");function Eb(t){if(t.length===0)return;let e=t[0];if(typeof e!="function")throw Error(`The first argument to autoPagingEach, if present, must be a callback function; received ${typeof e}`);if(e.length===2)return e;if(e.length>2)throw Error(`The \`onItem\` callback function passed to autoPagingEach must accept at most two arguments; got ${e}`);return i(function(n,o){let a=e(n);o(a)},"_onItem")}i(Eb,"getItemCallback");function Ib(t,e){let r=e?0:t.data.length-1,n=t.data[r],o=n&&n.id;if(!o)throw Error("Unexpected: No `id` found on the last item while auto-paging a list.");return o}i(Ib,"getLastId");function Ab(t){return i(function(){let r=[].slice.call(arguments),n=Eb(r),o=Sb(r);if(r.length>2)throw Error(`autoPagingEach takes up to two arguments; received ${r}`);let a=$b(t,n);return Hr(a,o)},"autoPagingEach")}i(Ab,"makeAutoPagingEach");function wb(t){return i(function(r,n){let o=r&&r.limit;if(!o)throw Error("You must pass a `limit` option to autoPagingToArray, e.g., `autoPagingToArray({limit: 1000});`.");if(o>1e4)throw Error("You cannot specify a limit of more than 10,000 items to fetch in `autoPagingToArray`; use `autoPagingEach` to iterate through longer lists.");let a=new Promise((u,p)=>{let d=[];t(g=>{if(d.push(g),d.length>=o)return!1}).then(()=>{u(d)}).catch(p)});return Hr(a,n)},"autoPagingToArray")}i(wb,"makeAutoPagingToArray");function $b(t,e){return new Promise((r,n)=>{function o(a){if(a.done){r();return}let u=a.value;return new Promise(p=>{e(u,p)}).then(p=>p===!1?o({done:!0,value:void 0}):t().then(o))}i(o,"handleIteration"),t().then(o).catch(n)})}i($b,"wrapAsyncIteratorWithCallback");function Od(t){let e=[].slice.call(t);return!!Jt(e).ending_before}i(Od,"isReverseIteration");function kd(t){if(t.path!==void 0&&t.fullPath!==void 0)throw new Error(`Method spec specified both a 'path' (${t.path}) and a 'fullPath' (${t.fullPath}).`);return function(...e){let r=typeof e[e.length-1]=="function"&&e.pop();t.urlParams=vd(t.fullPath||this.createResourcePathWithSymbols(t.path||""));let n=Hr(this._makeRequest(e,t,{}),r);return Object.assign(n,$d(this,e,t,n)),n}}i(kd,"stripeMethod");s.extend=_d;s.method=kd;s.MAX_BUFFERED_REQUEST_METRICS=100;function s(t,e){if(this._stripe=t,e)throw new Error("Support for curried url params was dropped in stripe-node v7.0.0. Instead, pass two ids.");this.basePath=po(this.basePath||t.getApiField("basePath")),this.resourcePath=this.path,this.path=po(this.path),this.initialize(...arguments)}i(s,"StripeResource");s.prototype={_stripe:null,path:"",resourcePath:"",basePath:null,initialize(){},requestDataProcessor:null,validateRequest:null,createFullPath(t,e){let r=[this.basePath(e),this.path(e)];if(typeof t=="function"){let n=t(e);n&&r.push(n)}else r.push(t);return this._joinUrlParts(r)},createResourcePathWithSymbols(t){return t?`/${this._joinUrlParts([this.resourcePath,t])}`:`/${this.resourcePath}`},_joinUrlParts(t){return t.join("/").replace(/\/{2,}/g,"/")},_getRequestOpts(t,e,r){var n;let o=(e.method||"GET").toUpperCase(),a=e.usage||[],u=e.urlParams||[],p=e.encode||(ee=>ee),d=!!e.fullPath,g=po(d?e.fullPath:e.path||""),m=d?e.fullPath:this.createResourcePathWithSymbols(e.path),v=[].slice.call(t),h=u.reduce((ee,ne)=>{let _e=v.shift();if(typeof _e!="string")throw new Error(`Stripe: Argument "${ne}" must be a string, but got: ${_e} (on API request to \`${o} ${m}\`)`);return ee[ne]=_e,ee},{}),c=Jt(v),f=p(Object.assign({},c,r)),_=mo(v),y=_.host||e.host,x=!!e.streaming||!!_.streaming;if(v.filter(ee=>ee!=null).length)throw new Error(`Stripe: Unknown arguments (${v}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options. (on API request to ${o} \`${m}\`)`);let b=d?g(h):this.createFullPath(g,h),E=Object.assign(_.headers,e.headers);e.validator&&e.validator(f,{headers:E});let L=e.method==="GET"||e.method==="DELETE";return{requestMethod:o,requestPath:b,bodyData:L?null:f,queryData:L?f:{},authenticator:(n=_.authenticator)!==null&&n!==void 0?n:null,headers:E,host:y??null,streaming:x,settings:_.settings,usage:a}},_makeRequest(t,e,r){return new Promise((n,o)=>{var a;let u;try{u=this._getRequestOpts(t,e,r)}catch(h){o(h);return}function p(h,c){h?o(h):n(e.transformResponseData?e.transformResponseData(c):c)}i(p,"requestCallback");let d=Object.keys(u.queryData).length===0,g=[u.requestPath,d?"":"?",ft(u.queryData,Xt(u.requestPath))].join(""),{headers:m,settings:v}=u;this._stripe._requestSender._request(u.requestMethod,u.host,g,u.bodyData,u.authenticator,{headers:m,settings:v,streaming:u.streaming},u.usage,p,(a=this.requestDataProcessor)===null||a===void 0?void 0:a.bind(this))})}};function zd(t){let e={DEFAULT_TOLERANCE:300,signature:null,constructEvent(m,v,h,c,f,_){try{if(!this.signature)throw new Error("ERR: missing signature helper, unable to verify");this.signature.verifyHeader(m,v,h,c||e.DEFAULT_TOLERANCE,f,_)}catch(x){throw x instanceof Gt&&(x.message+="\nUse `await constructEventAsync(...)` instead of `constructEvent(...)`"),x}return m instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(m)):JSON.parse(m)},async constructEventAsync(m,v,h,c,f,_){if(!this.signature)throw new Error("ERR: missing signature helper, unable to verify");return await this.signature.verifyHeaderAsync(m,v,h,c||e.DEFAULT_TOLERANCE,f,_),m instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(m)):JSON.parse(m)},generateTestHeaderString:i(function(m){let v=g(m),h=v.signature||v.cryptoProvider.computeHMACSignature(v.payloadString,v.secret);return v.generateHeaderString(h)},"generateTestHeaderString"),generateTestHeaderStringAsync:i(async function(m){let v=g(m),h=v.signature||await v.cryptoProvider.computeHMACSignatureAsync(v.payloadString,v.secret);return v.generateHeaderString(h)},"generateTestHeaderStringAsync")},r={EXPECTED_SCHEME:"v1",verifyHeader(m,v,h,c,f,_){let{decodedHeader:y,decodedPayload:x,details:b,suspectPayloadType:E}=o(m,v,this.EXPECTED_SCHEME),L=/\s/.test(h);f=f||d();let J=f.computeHMACSignature(n(x,b),h);return a(x,y,b,J,c,E,L,_),!0},async verifyHeaderAsync(m,v,h,c,f,_){let{decodedHeader:y,decodedPayload:x,details:b,suspectPayloadType:E}=o(m,v,this.EXPECTED_SCHEME),L=/\s/.test(h);f=f||d();let J=await f.computeHMACSignatureAsync(n(x,b),h);return a(x,y,b,J,c,E,L,_)}};function n(m,v){return`${v.timestamp}.${m}`}i(n,"makeHMACContent");function o(m,v,h){if(!m)throw new Re(v,m,{message:"No webhook payload was provided."});let c=typeof m!="string"&&!(m instanceof Uint8Array),f=new TextDecoder("utf8"),_=m instanceof Uint8Array?f.decode(m):m;if(Array.isArray(v))throw new Error("Unexpected: An array was passed as a header, which should not be possible for the stripe-signature header.");if(v==null||v=="")throw new Re(v,m,{message:"No stripe-signature header value was provided."});let y=v instanceof Uint8Array?f.decode(v):v,x=u(y,h);if(!x||x.timestamp===-1)throw new Re(y,_,{message:"Unable to extract timestamp and signatures from header"});if(!x.signatures.length)throw new Re(y,_,{message:"No signatures found with expected scheme"});return{decodedPayload:_,decodedHeader:y,details:x,suspectPayloadType:c}}i(o,"parseEventDetails");function a(m,v,h,c,f,_,y,x){let b=!!h.signatures.filter(t.secureCompare.bind(t,c)).length,E=`
|
|
7
|
+
Learn more about webhook signing and explore webhook integration examples for various frameworks at https://docs.stripe.com/webhooks/signature`,L=y?`
|
|
8
|
+
|
|
9
|
+
Note: The provided signing secret contains whitespace. This often indicates an extra newline or space is in the value`:"";if(!b)throw _?new Re(v,m,{message:`Webhook payload must be provided as a string or a Buffer (https://nodejs.org/api/buffer.html) instance representing the _raw_ request body.Payload was provided as a parsed JavaScript object instead.
|
|
10
|
+
Signature verification is impossible without access to the original signed material.
|
|
11
|
+
`+E+`
|
|
12
|
+
`+L}):new Re(v,m,{message:`No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe?
|
|
13
|
+
If a webhook request is being forwarded by a third-party tool, ensure that the exact request body, including JSON formatting and new line style, is preserved.
|
|
14
|
+
`+E+`
|
|
15
|
+
`+L});let J=Math.floor((typeof x=="number"?x:Date.now())/1e3)-h.timestamp;if(f>0&&J>f)throw new Re(v,m,{message:"Timestamp outside the tolerance zone"});return!0}i(a,"validateComputedSignature");function u(m,v){return typeof m!="string"?null:m.split(",").reduce((h,c)=>{let f=c.split("=");return f[0]==="t"&&(h.timestamp=parseInt(f[1],10)),f[0]===v&&h.signatures.push(f[1]),h},{timestamp:-1,signatures:[]})}i(u,"parseHeader");let p=null;function d(){return p||(p=t.createDefaultCryptoProvider()),p}i(d,"getCryptoProvider");function g(m){if(!m)throw new le({message:"Options are required"});let v=Math.floor(m.timestamp)||Math.floor(Date.now()/1e3),h=m.scheme||r.EXPECTED_SCHEME,c=m.cryptoProvider||d(),f=`${v}.${m.payload}`,_=i(y=>`t=${v},${h}=${y}`,"generateHeaderString");return Object.assign(Object.assign({},m),{timestamp:v,scheme:h,cryptoProvider:c,payloadString:f,generateHeaderString:_})}return i(g,"prepareOptions"),e.signature=r,e}i(zd,"createWebhooks");var Rd="2025-05-28.basil";var pr={};_n(pr,{Account:()=>Qa,AccountLinks:()=>yf,AccountSessions:()=>vf,Accounts:()=>Qa,ApplePayDomains:()=>_f,ApplicationFees:()=>Pf,Apps:()=>Qb,Balance:()=>xf,BalanceTransactions:()=>Tf,Billing:()=>eT,BillingPortal:()=>tT,Charges:()=>Sf,Checkout:()=>rT,Climate:()=>nT,ConfirmationTokens:()=>Ef,CountrySpecs:()=>Af,Coupons:()=>wf,CreditNotes:()=>$f,CustomerSessions:()=>Of,Customers:()=>kf,Disputes:()=>zf,Entitlements:()=>oT,EphemeralKeys:()=>Cf,Events:()=>Nf,ExchangeRates:()=>Uf,FileLinks:()=>Lf,Files:()=>Ff,FinancialConnections:()=>iT,Forwarding:()=>aT,Identity:()=>sT,InvoiceItems:()=>Bf,InvoicePayments:()=>Vf,InvoiceRenderingTemplates:()=>Zf,Invoices:()=>Gf,Issuing:()=>uT,Mandates:()=>Hf,OAuth:()=>Kf,PaymentIntents:()=>Jf,PaymentLinks:()=>Xf,PaymentMethodConfigurations:()=>Yf,PaymentMethodDomains:()=>Qf,PaymentMethods:()=>eh,Payouts:()=>th,Plans:()=>rh,Prices:()=>nh,Products:()=>oh,PromotionCodes:()=>ih,Quotes:()=>ah,Radar:()=>cT,Refunds:()=>sh,Reporting:()=>lT,Reviews:()=>uh,SetupAttempts:()=>ch,SetupIntents:()=>lh,ShippingRates:()=>ph,Sigma:()=>pT,Sources:()=>dh,SubscriptionItems:()=>mh,SubscriptionSchedules:()=>fh,Subscriptions:()=>hh,Tax:()=>dT,TaxCodes:()=>yh,TaxIds:()=>vh,TaxRates:()=>_h,Terminal:()=>mT,TestHelpers:()=>fT,Tokens:()=>xh,Topups:()=>bh,Transfers:()=>Th,Treasury:()=>hT,V2:()=>gT,WebhookEndpoints:()=>Sh});function Ob(t,e){for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let n=r[0].toLowerCase()+r.substring(1),o=new e[r](t);this[n]=o}}i(Ob,"ResourceNamespace");function re(t,e){return function(r){return new Ob(r,e)}}i(re,"resourceNamespace");var It=s.method,Cd=s.extend({retrieve:It({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}"}),list:It({method:"GET",fullPath:"/v1/financial_connections/accounts",methodType:"list"}),disconnect:It({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/disconnect"}),listOwners:It({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}/owners",methodType:"list"}),refresh:It({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/refresh"}),subscribe:It({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/subscribe"}),unsubscribe:It({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/unsubscribe"})});var Dd=s.method,Nd=s.extend({retrieve:Dd({method:"GET",fullPath:"/v1/entitlements/active_entitlements/{id}"}),list:Dd({method:"GET",fullPath:"/v1/entitlements/active_entitlements",methodType:"list"})});var rr=s.method,Md=s.extend({create:rr({method:"POST",fullPath:"/v1/billing/alerts"}),retrieve:rr({method:"GET",fullPath:"/v1/billing/alerts/{id}"}),list:rr({method:"GET",fullPath:"/v1/billing/alerts",methodType:"list"}),activate:rr({method:"POST",fullPath:"/v1/billing/alerts/{id}/activate"}),archive:rr({method:"POST",fullPath:"/v1/billing/alerts/{id}/archive"}),deactivate:rr({method:"POST",fullPath:"/v1/billing/alerts/{id}/deactivate"})});var At=s.method,Ud=s.extend({create:At({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations"}),capture:At({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/capture"}),expire:At({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/expire"}),finalizeAmount:At({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount"}),increment:At({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/increment"}),respond:At({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond"}),reverse:At({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/reverse"})});var Qr=s.method,Ld=s.extend({retrieve:Qr({method:"GET",fullPath:"/v1/issuing/authorizations/{authorization}"}),update:Qr({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}"}),list:Qr({method:"GET",fullPath:"/v1/issuing/authorizations",methodType:"list"}),approve:Qr({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/approve"}),decline:Qr({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/decline"})});var Fa=s.method,jd=s.extend({create:Fa({method:"POST",fullPath:"/v1/tax/calculations"}),retrieve:Fa({method:"GET",fullPath:"/v1/tax/calculations/{calculation}"}),listLineItems:Fa({method:"GET",fullPath:"/v1/tax/calculations/{calculation}/line_items",methodType:"list"})});var $o=s.method,Fd=s.extend({create:$o({method:"POST",fullPath:"/v1/issuing/cardholders"}),retrieve:$o({method:"GET",fullPath:"/v1/issuing/cardholders/{cardholder}"}),update:$o({method:"POST",fullPath:"/v1/issuing/cardholders/{cardholder}"}),list:$o({method:"GET",fullPath:"/v1/issuing/cardholders",methodType:"list"})});var en=s.method,Bd=s.extend({deliverCard:en({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/deliver"}),failCard:en({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/fail"}),returnCard:en({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/return"}),shipCard:en({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/ship"}),submitCard:en({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/submit"})});var Oo=s.method,qd=s.extend({create:Oo({method:"POST",fullPath:"/v1/issuing/cards"}),retrieve:Oo({method:"GET",fullPath:"/v1/issuing/cards/{card}"}),update:Oo({method:"POST",fullPath:"/v1/issuing/cards/{card}"}),list:Oo({method:"GET",fullPath:"/v1/issuing/cards",methodType:"list"})});var ko=s.method,Vd=s.extend({create:ko({method:"POST",fullPath:"/v1/billing_portal/configurations"}),retrieve:ko({method:"GET",fullPath:"/v1/billing_portal/configurations/{configuration}"}),update:ko({method:"POST",fullPath:"/v1/billing_portal/configurations/{configuration}"}),list:ko({method:"GET",fullPath:"/v1/billing_portal/configurations",methodType:"list"})});var tn=s.method,Zd=s.extend({create:tn({method:"POST",fullPath:"/v1/terminal/configurations"}),retrieve:tn({method:"GET",fullPath:"/v1/terminal/configurations/{configuration}"}),update:tn({method:"POST",fullPath:"/v1/terminal/configurations/{configuration}"}),list:tn({method:"GET",fullPath:"/v1/terminal/configurations",methodType:"list"}),del:tn({method:"DELETE",fullPath:"/v1/terminal/configurations/{configuration}"})});var kb=s.method,Gd=s.extend({create:kb({method:"POST",fullPath:"/v1/test_helpers/confirmation_tokens"})});var zb=s.method,Hd=s.extend({create:zb({method:"POST",fullPath:"/v1/terminal/connection_tokens"})});var Rb=s.method,Wd=s.extend({retrieve:Rb({method:"GET",fullPath:"/v1/billing/credit_balance_summary"})});var Kd=s.method,Jd=s.extend({retrieve:Kd({method:"GET",fullPath:"/v1/billing/credit_balance_transactions/{id}"}),list:Kd({method:"GET",fullPath:"/v1/billing/credit_balance_transactions",methodType:"list"})});var nr=s.method,Xd=s.extend({create:nr({method:"POST",fullPath:"/v1/billing/credit_grants"}),retrieve:nr({method:"GET",fullPath:"/v1/billing/credit_grants/{id}"}),update:nr({method:"POST",fullPath:"/v1/billing/credit_grants/{id}"}),list:nr({method:"GET",fullPath:"/v1/billing/credit_grants",methodType:"list"}),expire:nr({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/expire"}),voidGrant:nr({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/void"})});var Ba=s.method,Yd=s.extend({create:Ba({method:"POST",fullPath:"/v1/treasury/credit_reversals"}),retrieve:Ba({method:"GET",fullPath:"/v1/treasury/credit_reversals/{credit_reversal}"}),list:Ba({method:"GET",fullPath:"/v1/treasury/credit_reversals",methodType:"list"})});var Cb=s.method,Qd=s.extend({fundCashBalance:Cb({method:"POST",fullPath:"/v1/test_helpers/customers/{customer}/fund_cash_balance"})});var qa=s.method,em=s.extend({create:qa({method:"POST",fullPath:"/v1/treasury/debit_reversals"}),retrieve:qa({method:"GET",fullPath:"/v1/treasury/debit_reversals/{debit_reversal}"}),list:qa({method:"GET",fullPath:"/v1/treasury/debit_reversals",methodType:"list"})});var rn=s.method,tm=s.extend({create:rn({method:"POST",fullPath:"/v1/issuing/disputes"}),retrieve:rn({method:"GET",fullPath:"/v1/issuing/disputes/{dispute}"}),update:rn({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}"}),list:rn({method:"GET",fullPath:"/v1/issuing/disputes",methodType:"list"}),submit:rn({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}/submit"})});var rm=s.method,nm=s.extend({retrieve:rm({method:"GET",fullPath:"/v1/radar/early_fraud_warnings/{early_fraud_warning}"}),list:rm({method:"GET",fullPath:"/v1/radar/early_fraud_warnings",methodType:"list"})});var ht=s.method,om=s.extend({create:ht({method:"POST",fullPath:"/v2/core/event_destinations"}),retrieve:ht({method:"GET",fullPath:"/v2/core/event_destinations/{id}"}),update:ht({method:"POST",fullPath:"/v2/core/event_destinations/{id}"}),list:ht({method:"GET",fullPath:"/v2/core/event_destinations",methodType:"list"}),del:ht({method:"DELETE",fullPath:"/v2/core/event_destinations/{id}"}),disable:ht({method:"POST",fullPath:"/v2/core/event_destinations/{id}/disable"}),enable:ht({method:"POST",fullPath:"/v2/core/event_destinations/{id}/enable"}),ping:ht({method:"POST",fullPath:"/v2/core/event_destinations/{id}/ping"})});var Va=s.method,im=s.extend({retrieve(...t){return Va({method:"GET",fullPath:"/v2/core/events/{id}",transformResponseData:i(r=>this.addFetchRelatedObjectIfNeeded(r),"transformResponseData")}).apply(this,t)},list(...t){return Va({method:"GET",fullPath:"/v2/core/events",methodType:"list",transformResponseData:i(r=>Object.assign(Object.assign({},r),{data:r.data.map(this.addFetchRelatedObjectIfNeeded.bind(this))}),"transformResponseData")}).apply(this,t)},addFetchRelatedObjectIfNeeded(t){return!t.related_object||!t.related_object.url?t:Object.assign(Object.assign({},t),{fetchRelatedObject:i(()=>Va({method:"GET",fullPath:t.related_object.url}).apply(this,[{stripeAccount:t.context}]),"fetchRelatedObject")})}});var zo=s.method,am=s.extend({create:zo({method:"POST",fullPath:"/v1/entitlements/features"}),retrieve:zo({method:"GET",fullPath:"/v1/entitlements/features/{id}"}),update:zo({method:"POST",fullPath:"/v1/entitlements/features/{id}"}),list:zo({method:"GET",fullPath:"/v1/entitlements/features",methodType:"list"})});var wt=s.method,sm=s.extend({create:wt({method:"POST",fullPath:"/v1/treasury/financial_accounts"}),retrieve:wt({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),update:wt({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),list:wt({method:"GET",fullPath:"/v1/treasury/financial_accounts",methodType:"list"}),close:wt({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}/close"}),retrieveFeatures:wt({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"}),updateFeatures:wt({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"})});var Za=s.method,um=s.extend({fail:Za({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/fail"}),returnInboundTransfer:Za({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/return"}),succeed:Za({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/succeed"})});var Ro=s.method,cm=s.extend({create:Ro({method:"POST",fullPath:"/v1/treasury/inbound_transfers"}),retrieve:Ro({method:"GET",fullPath:"/v1/treasury/inbound_transfers/{id}"}),list:Ro({method:"GET",fullPath:"/v1/treasury/inbound_transfers",methodType:"list"}),cancel:Ro({method:"POST",fullPath:"/v1/treasury/inbound_transfers/{inbound_transfer}/cancel"})});var nn=s.method,lm=s.extend({create:nn({method:"POST",fullPath:"/v1/terminal/locations"}),retrieve:nn({method:"GET",fullPath:"/v1/terminal/locations/{location}"}),update:nn({method:"POST",fullPath:"/v1/terminal/locations/{location}"}),list:nn({method:"GET",fullPath:"/v1/terminal/locations",methodType:"list"}),del:nn({method:"DELETE",fullPath:"/v1/terminal/locations/{location}"})});var Db=s.method,pm=s.extend({create:Db({method:"POST",fullPath:"/v1/billing/meter_event_adjustments"})});var Nb=s.method,dm=s.extend({create:Nb({method:"POST",fullPath:"/v2/billing/meter_event_adjustments"})});var Mb=s.method,mm=s.extend({create:Mb({method:"POST",fullPath:"/v2/billing/meter_event_session"})});var Ub=s.method,fm=s.extend({create:Ub({method:"POST",fullPath:"/v2/billing/meter_event_stream",host:"meter-events.stripe.com"})});var Lb=s.method,hm=s.extend({create:Lb({method:"POST",fullPath:"/v1/billing/meter_events"})});var jb=s.method,gm=s.extend({create:jb({method:"POST",fullPath:"/v2/billing/meter_events"})});var $t=s.method,ym=s.extend({create:$t({method:"POST",fullPath:"/v1/billing/meters"}),retrieve:$t({method:"GET",fullPath:"/v1/billing/meters/{id}"}),update:$t({method:"POST",fullPath:"/v1/billing/meters/{id}"}),list:$t({method:"GET",fullPath:"/v1/billing/meters",methodType:"list"}),deactivate:$t({method:"POST",fullPath:"/v1/billing/meters/{id}/deactivate"}),listEventSummaries:$t({method:"GET",fullPath:"/v1/billing/meters/{id}/event_summaries",methodType:"list"}),reactivate:$t({method:"POST",fullPath:"/v1/billing/meters/{id}/reactivate"})});var on=s.method,vm=s.extend({create:on({method:"POST",fullPath:"/v1/climate/orders"}),retrieve:on({method:"GET",fullPath:"/v1/climate/orders/{order}"}),update:on({method:"POST",fullPath:"/v1/climate/orders/{order}"}),list:on({method:"GET",fullPath:"/v1/climate/orders",methodType:"list"}),cancel:on({method:"POST",fullPath:"/v1/climate/orders/{order}/cancel"})});var Co=s.method,_m=s.extend({update:Co({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}"}),fail:Co({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/fail"}),post:Co({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/post"}),returnOutboundPayment:Co({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/return"})});var Do=s.method,Pm=s.extend({create:Do({method:"POST",fullPath:"/v1/treasury/outbound_payments"}),retrieve:Do({method:"GET",fullPath:"/v1/treasury/outbound_payments/{id}"}),list:Do({method:"GET",fullPath:"/v1/treasury/outbound_payments",methodType:"list"}),cancel:Do({method:"POST",fullPath:"/v1/treasury/outbound_payments/{id}/cancel"})});var No=s.method,xm=s.extend({update:No({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}"}),fail:No({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail"}),post:No({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post"}),returnOutboundTransfer:No({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return"})});var Mo=s.method,bm=s.extend({create:Mo({method:"POST",fullPath:"/v1/treasury/outbound_transfers"}),retrieve:Mo({method:"GET",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}"}),list:Mo({method:"GET",fullPath:"/v1/treasury/outbound_transfers",methodType:"list"}),cancel:Mo({method:"POST",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}/cancel"})});var Ga=s.method,Tm=s.extend({activate:Ga({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate"}),deactivate:Ga({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate"}),reject:Ga({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject"})});var Uo=s.method,Sm=s.extend({create:Uo({method:"POST",fullPath:"/v1/issuing/personalization_designs"}),retrieve:Uo({method:"GET",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),update:Uo({method:"POST",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),list:Uo({method:"GET",fullPath:"/v1/issuing/personalization_designs",methodType:"list"})});var Em=s.method,Im=s.extend({retrieve:Em({method:"GET",fullPath:"/v1/issuing/physical_bundles/{physical_bundle}"}),list:Em({method:"GET",fullPath:"/v1/issuing/physical_bundles",methodType:"list"})});var Am=s.method,wm=s.extend({retrieve:Am({method:"GET",fullPath:"/v1/climate/products/{product}"}),list:Am({method:"GET",fullPath:"/v1/climate/products",methodType:"list"})});var Ha=s.method,$m=s.extend({presentPaymentMethod:Ha({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/present_payment_method"}),succeedInputCollection:Ha({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/succeed_input_collection"}),timeoutInputCollection:Ha({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/timeout_input_collection"})});var Ce=s.method,Om=s.extend({create:Ce({method:"POST",fullPath:"/v1/terminal/readers"}),retrieve:Ce({method:"GET",fullPath:"/v1/terminal/readers/{reader}"}),update:Ce({method:"POST",fullPath:"/v1/terminal/readers/{reader}"}),list:Ce({method:"GET",fullPath:"/v1/terminal/readers",methodType:"list"}),del:Ce({method:"DELETE",fullPath:"/v1/terminal/readers/{reader}"}),cancelAction:Ce({method:"POST",fullPath:"/v1/terminal/readers/{reader}/cancel_action"}),collectInputs:Ce({method:"POST",fullPath:"/v1/terminal/readers/{reader}/collect_inputs"}),processPaymentIntent:Ce({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_payment_intent"}),processSetupIntent:Ce({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_setup_intent"}),refundPayment:Ce({method:"POST",fullPath:"/v1/terminal/readers/{reader}/refund_payment"}),setReaderDisplay:Ce({method:"POST",fullPath:"/v1/terminal/readers/{reader}/set_reader_display"})});var Fb=s.method,km=s.extend({create:Fb({method:"POST",fullPath:"/v1/test_helpers/treasury/received_credits"})});var zm=s.method,Rm=s.extend({retrieve:zm({method:"GET",fullPath:"/v1/treasury/received_credits/{id}"}),list:zm({method:"GET",fullPath:"/v1/treasury/received_credits",methodType:"list"})});var Bb=s.method,Cm=s.extend({create:Bb({method:"POST",fullPath:"/v1/test_helpers/treasury/received_debits"})});var Dm=s.method,Nm=s.extend({retrieve:Dm({method:"GET",fullPath:"/v1/treasury/received_debits/{id}"}),list:Dm({method:"GET",fullPath:"/v1/treasury/received_debits",methodType:"list"})});var qb=s.method,Mm=s.extend({expire:qb({method:"POST",fullPath:"/v1/test_helpers/refunds/{refund}/expire"})});var Lo=s.method,Um=s.extend({create:Lo({method:"POST",fullPath:"/v1/tax/registrations"}),retrieve:Lo({method:"GET",fullPath:"/v1/tax/registrations/{id}"}),update:Lo({method:"POST",fullPath:"/v1/tax/registrations/{id}"}),list:Lo({method:"GET",fullPath:"/v1/tax/registrations",methodType:"list"})});var Wa=s.method,Lm=s.extend({create:Wa({method:"POST",fullPath:"/v1/reporting/report_runs"}),retrieve:Wa({method:"GET",fullPath:"/v1/reporting/report_runs/{report_run}"}),list:Wa({method:"GET",fullPath:"/v1/reporting/report_runs",methodType:"list"})});var jm=s.method,Fm=s.extend({retrieve:jm({method:"GET",fullPath:"/v1/reporting/report_types/{report_type}"}),list:jm({method:"GET",fullPath:"/v1/reporting/report_types",methodType:"list"})});var Ka=s.method,Bm=s.extend({create:Ka({method:"POST",fullPath:"/v1/forwarding/requests"}),retrieve:Ka({method:"GET",fullPath:"/v1/forwarding/requests/{id}"}),list:Ka({method:"GET",fullPath:"/v1/forwarding/requests",methodType:"list"})});var qm=s.method,Vm=s.extend({retrieve:qm({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs/{scheduled_query_run}"}),list:qm({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs",methodType:"list"})});var jo=s.method,Zm=s.extend({create:jo({method:"POST",fullPath:"/v1/apps/secrets"}),list:jo({method:"GET",fullPath:"/v1/apps/secrets",methodType:"list"}),deleteWhere:jo({method:"POST",fullPath:"/v1/apps/secrets/delete"}),find:jo({method:"GET",fullPath:"/v1/apps/secrets/find"})});var Vb=s.method,Gm=s.extend({create:Vb({method:"POST",fullPath:"/v1/billing_portal/sessions"})});var or=s.method,Hm=s.extend({create:or({method:"POST",fullPath:"/v1/checkout/sessions"}),retrieve:or({method:"GET",fullPath:"/v1/checkout/sessions/{session}"}),update:or({method:"POST",fullPath:"/v1/checkout/sessions/{session}"}),list:or({method:"GET",fullPath:"/v1/checkout/sessions",methodType:"list"}),expire:or({method:"POST",fullPath:"/v1/checkout/sessions/{session}/expire"}),listLineItems:or({method:"GET",fullPath:"/v1/checkout/sessions/{session}/line_items",methodType:"list"})});var Wm=s.method,Km=s.extend({create:Wm({method:"POST",fullPath:"/v1/financial_connections/sessions"}),retrieve:Wm({method:"GET",fullPath:"/v1/financial_connections/sessions/{session}"})});var Jm=s.method,Xm=s.extend({retrieve:Jm({method:"GET",fullPath:"/v1/tax/settings"}),update:Jm({method:"POST",fullPath:"/v1/tax/settings"})});var Ym=s.method,Qm=s.extend({retrieve:Ym({method:"GET",fullPath:"/v1/climate/suppliers/{supplier}"}),list:Ym({method:"GET",fullPath:"/v1/climate/suppliers",methodType:"list"})});var an=s.method,ef=s.extend({create:an({method:"POST",fullPath:"/v1/test_helpers/test_clocks"}),retrieve:an({method:"GET",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),list:an({method:"GET",fullPath:"/v1/test_helpers/test_clocks",methodType:"list"}),del:an({method:"DELETE",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),advance:an({method:"POST",fullPath:"/v1/test_helpers/test_clocks/{test_clock}/advance"})});var Ja=s.method,tf=s.extend({retrieve:Ja({method:"GET",fullPath:"/v1/issuing/tokens/{token}"}),update:Ja({method:"POST",fullPath:"/v1/issuing/tokens/{token}"}),list:Ja({method:"GET",fullPath:"/v1/issuing/tokens",methodType:"list"})});var rf=s.method,nf=s.extend({retrieve:rf({method:"GET",fullPath:"/v1/treasury/transaction_entries/{id}"}),list:rf({method:"GET",fullPath:"/v1/treasury/transaction_entries",methodType:"list"})});var Xa=s.method,of=s.extend({createForceCapture:Xa({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_force_capture"}),createUnlinkedRefund:Xa({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_unlinked_refund"}),refund:Xa({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/{transaction}/refund"})});var af=s.method,sf=s.extend({retrieve:af({method:"GET",fullPath:"/v1/financial_connections/transactions/{transaction}"}),list:af({method:"GET",fullPath:"/v1/financial_connections/transactions",methodType:"list"})});var Ya=s.method,uf=s.extend({retrieve:Ya({method:"GET",fullPath:"/v1/issuing/transactions/{transaction}"}),update:Ya({method:"POST",fullPath:"/v1/issuing/transactions/{transaction}"}),list:Ya({method:"GET",fullPath:"/v1/issuing/transactions",methodType:"list"})});var Fo=s.method,cf=s.extend({retrieve:Fo({method:"GET",fullPath:"/v1/tax/transactions/{transaction}"}),createFromCalculation:Fo({method:"POST",fullPath:"/v1/tax/transactions/create_from_calculation"}),createReversal:Fo({method:"POST",fullPath:"/v1/tax/transactions/create_reversal"}),listLineItems:Fo({method:"GET",fullPath:"/v1/tax/transactions/{transaction}/line_items",methodType:"list"})});var lf=s.method,pf=s.extend({retrieve:lf({method:"GET",fullPath:"/v1/treasury/transactions/{id}"}),list:lf({method:"GET",fullPath:"/v1/treasury/transactions",methodType:"list"})});var Bo=s.method,df=s.extend({create:Bo({method:"POST",fullPath:"/v1/radar/value_list_items"}),retrieve:Bo({method:"GET",fullPath:"/v1/radar/value_list_items/{item}"}),list:Bo({method:"GET",fullPath:"/v1/radar/value_list_items",methodType:"list"}),del:Bo({method:"DELETE",fullPath:"/v1/radar/value_list_items/{item}"})});var sn=s.method,mf=s.extend({create:sn({method:"POST",fullPath:"/v1/radar/value_lists"}),retrieve:sn({method:"GET",fullPath:"/v1/radar/value_lists/{value_list}"}),update:sn({method:"POST",fullPath:"/v1/radar/value_lists/{value_list}"}),list:sn({method:"GET",fullPath:"/v1/radar/value_lists",methodType:"list"}),del:sn({method:"DELETE",fullPath:"/v1/radar/value_lists/{value_list}"})});var ff=s.method,hf=s.extend({retrieve:ff({method:"GET",fullPath:"/v1/identity/verification_reports/{report}"}),list:ff({method:"GET",fullPath:"/v1/identity/verification_reports",methodType:"list"})});var ir=s.method,gf=s.extend({create:ir({method:"POST",fullPath:"/v1/identity/verification_sessions"}),retrieve:ir({method:"GET",fullPath:"/v1/identity/verification_sessions/{session}"}),update:ir({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}"}),list:ir({method:"GET",fullPath:"/v1/identity/verification_sessions",methodType:"list"}),cancel:ir({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/cancel"}),redact:ir({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/redact"})});var pe=s.method,Qa=s.extend({create:pe({method:"POST",fullPath:"/v1/accounts"}),retrieve(t,...e){return typeof t=="string"?pe({method:"GET",fullPath:"/v1/accounts/{id}"}).apply(this,[t,...e]):(t==null&&[].shift.apply([t,...e]),pe({method:"GET",fullPath:"/v1/account"}).apply(this,[t,...e]))},update:pe({method:"POST",fullPath:"/v1/accounts/{account}"}),list:pe({method:"GET",fullPath:"/v1/accounts",methodType:"list"}),del:pe({method:"DELETE",fullPath:"/v1/accounts/{account}"}),createExternalAccount:pe({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts"}),createLoginLink:pe({method:"POST",fullPath:"/v1/accounts/{account}/login_links"}),createPerson:pe({method:"POST",fullPath:"/v1/accounts/{account}/persons"}),deleteExternalAccount:pe({method:"DELETE",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),deletePerson:pe({method:"DELETE",fullPath:"/v1/accounts/{account}/persons/{person}"}),listCapabilities:pe({method:"GET",fullPath:"/v1/accounts/{account}/capabilities",methodType:"list"}),listExternalAccounts:pe({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts",methodType:"list"}),listPersons:pe({method:"GET",fullPath:"/v1/accounts/{account}/persons",methodType:"list"}),reject:pe({method:"POST",fullPath:"/v1/accounts/{account}/reject"}),retrieveCurrent:pe({method:"GET",fullPath:"/v1/account"}),retrieveCapability:pe({method:"GET",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),retrieveExternalAccount:pe({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),retrievePerson:pe({method:"GET",fullPath:"/v1/accounts/{account}/persons/{person}"}),updateCapability:pe({method:"POST",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),updateExternalAccount:pe({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),updatePerson:pe({method:"POST",fullPath:"/v1/accounts/{account}/persons/{person}"})});var Zb=s.method,yf=s.extend({create:Zb({method:"POST",fullPath:"/v1/account_links"})});var Gb=s.method,vf=s.extend({create:Gb({method:"POST",fullPath:"/v1/account_sessions"})});var qo=s.method,_f=s.extend({create:qo({method:"POST",fullPath:"/v1/apple_pay/domains"}),retrieve:qo({method:"GET",fullPath:"/v1/apple_pay/domains/{domain}"}),list:qo({method:"GET",fullPath:"/v1/apple_pay/domains",methodType:"list"}),del:qo({method:"DELETE",fullPath:"/v1/apple_pay/domains/{domain}"})});var ar=s.method,Pf=s.extend({retrieve:ar({method:"GET",fullPath:"/v1/application_fees/{id}"}),list:ar({method:"GET",fullPath:"/v1/application_fees",methodType:"list"}),createRefund:ar({method:"POST",fullPath:"/v1/application_fees/{id}/refunds"}),listRefunds:ar({method:"GET",fullPath:"/v1/application_fees/{id}/refunds",methodType:"list"}),retrieveRefund:ar({method:"GET",fullPath:"/v1/application_fees/{fee}/refunds/{id}"}),updateRefund:ar({method:"POST",fullPath:"/v1/application_fees/{fee}/refunds/{id}"})});var Hb=s.method,xf=s.extend({retrieve:Hb({method:"GET",fullPath:"/v1/balance"})});var bf=s.method,Tf=s.extend({retrieve:bf({method:"GET",fullPath:"/v1/balance_transactions/{id}"}),list:bf({method:"GET",fullPath:"/v1/balance_transactions",methodType:"list"})});var sr=s.method,Sf=s.extend({create:sr({method:"POST",fullPath:"/v1/charges"}),retrieve:sr({method:"GET",fullPath:"/v1/charges/{charge}"}),update:sr({method:"POST",fullPath:"/v1/charges/{charge}"}),list:sr({method:"GET",fullPath:"/v1/charges",methodType:"list"}),capture:sr({method:"POST",fullPath:"/v1/charges/{charge}/capture"}),search:sr({method:"GET",fullPath:"/v1/charges/search",methodType:"search"})});var Wb=s.method,Ef=s.extend({retrieve:Wb({method:"GET",fullPath:"/v1/confirmation_tokens/{confirmation_token}"})});var If=s.method,Af=s.extend({retrieve:If({method:"GET",fullPath:"/v1/country_specs/{country}"}),list:If({method:"GET",fullPath:"/v1/country_specs",methodType:"list"})});var un=s.method,wf=s.extend({create:un({method:"POST",fullPath:"/v1/coupons"}),retrieve:un({method:"GET",fullPath:"/v1/coupons/{coupon}"}),update:un({method:"POST",fullPath:"/v1/coupons/{coupon}"}),list:un({method:"GET",fullPath:"/v1/coupons",methodType:"list"}),del:un({method:"DELETE",fullPath:"/v1/coupons/{coupon}"})});var gt=s.method,$f=s.extend({create:gt({method:"POST",fullPath:"/v1/credit_notes"}),retrieve:gt({method:"GET",fullPath:"/v1/credit_notes/{id}"}),update:gt({method:"POST",fullPath:"/v1/credit_notes/{id}"}),list:gt({method:"GET",fullPath:"/v1/credit_notes",methodType:"list"}),listLineItems:gt({method:"GET",fullPath:"/v1/credit_notes/{credit_note}/lines",methodType:"list"}),listPreviewLineItems:gt({method:"GET",fullPath:"/v1/credit_notes/preview/lines",methodType:"list"}),preview:gt({method:"GET",fullPath:"/v1/credit_notes/preview"}),voidCreditNote:gt({method:"POST",fullPath:"/v1/credit_notes/{id}/void"})});var Kb=s.method,Of=s.extend({create:Kb({method:"POST",fullPath:"/v1/customer_sessions"})});var Y=s.method,kf=s.extend({create:Y({method:"POST",fullPath:"/v1/customers"}),retrieve:Y({method:"GET",fullPath:"/v1/customers/{customer}"}),update:Y({method:"POST",fullPath:"/v1/customers/{customer}"}),list:Y({method:"GET",fullPath:"/v1/customers",methodType:"list"}),del:Y({method:"DELETE",fullPath:"/v1/customers/{customer}"}),createBalanceTransaction:Y({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions"}),createFundingInstructions:Y({method:"POST",fullPath:"/v1/customers/{customer}/funding_instructions"}),createSource:Y({method:"POST",fullPath:"/v1/customers/{customer}/sources"}),createTaxId:Y({method:"POST",fullPath:"/v1/customers/{customer}/tax_ids"}),deleteDiscount:Y({method:"DELETE",fullPath:"/v1/customers/{customer}/discount"}),deleteSource:Y({method:"DELETE",fullPath:"/v1/customers/{customer}/sources/{id}"}),deleteTaxId:Y({method:"DELETE",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),listBalanceTransactions:Y({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions",methodType:"list"}),listCashBalanceTransactions:Y({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions",methodType:"list"}),listPaymentMethods:Y({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods",methodType:"list"}),listSources:Y({method:"GET",fullPath:"/v1/customers/{customer}/sources",methodType:"list"}),listTaxIds:Y({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids",methodType:"list"}),retrieveBalanceTransaction:Y({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),retrieveCashBalance:Y({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance"}),retrieveCashBalanceTransaction:Y({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions/{transaction}"}),retrievePaymentMethod:Y({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods/{payment_method}"}),retrieveSource:Y({method:"GET",fullPath:"/v1/customers/{customer}/sources/{id}"}),retrieveTaxId:Y({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),search:Y({method:"GET",fullPath:"/v1/customers/search",methodType:"search"}),updateBalanceTransaction:Y({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),updateCashBalance:Y({method:"POST",fullPath:"/v1/customers/{customer}/cash_balance"}),updateSource:Y({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}"}),verifySource:Y({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}/verify"})});var Vo=s.method,zf=s.extend({retrieve:Vo({method:"GET",fullPath:"/v1/disputes/{dispute}"}),update:Vo({method:"POST",fullPath:"/v1/disputes/{dispute}"}),list:Vo({method:"GET",fullPath:"/v1/disputes",methodType:"list"}),close:Vo({method:"POST",fullPath:"/v1/disputes/{dispute}/close"})});var Rf=s.method,Cf=s.extend({create:Rf({method:"POST",fullPath:"/v1/ephemeral_keys",validator:i((t,e)=>{if(!e.headers||!e.headers["Stripe-Version"])throw new Error("Passing apiVersion in a separate options hash is required to create an ephemeral key. See https://stripe.com/docs/api/versioning?lang=node")},"validator")}),del:Rf({method:"DELETE",fullPath:"/v1/ephemeral_keys/{key}"})});var Df=s.method,Nf=s.extend({retrieve:Df({method:"GET",fullPath:"/v1/events/{id}"}),list:Df({method:"GET",fullPath:"/v1/events",methodType:"list"})});var Mf=s.method,Uf=s.extend({retrieve:Mf({method:"GET",fullPath:"/v1/exchange_rates/{rate_id}"}),list:Mf({method:"GET",fullPath:"/v1/exchange_rates",methodType:"list"})});var Zo=s.method,Lf=s.extend({create:Zo({method:"POST",fullPath:"/v1/file_links"}),retrieve:Zo({method:"GET",fullPath:"/v1/file_links/{link}"}),update:Zo({method:"POST",fullPath:"/v1/file_links/{link}"}),list:Zo({method:"GET",fullPath:"/v1/file_links",methodType:"list"})});var Jb=i((t,e,r)=>{let n=(Math.round(Math.random()*1e16)+Math.round(Math.random()*1e16)).toString();r["Content-Type"]=`multipart/form-data; boundary=${n}`;let o=new TextEncoder,a=new Uint8Array(0),u=o.encode(`\r
|
|
16
|
+
`);function p(m){let v=a,h=m instanceof Uint8Array?m:new Uint8Array(o.encode(m));a=new Uint8Array(v.length+h.length+2),a.set(v),a.set(h,v.length),a.set(u,a.length-2)}i(p,"push");function d(m){return`"${m.replace(/"|"/g,"%22").replace(/\r\n|\r|\n/g," ")}"`}i(d,"q");let g=bd(e);for(let m in g){if(!Object.prototype.hasOwnProperty.call(g,m))continue;let v=g[m];if(p(`--${n}`),Object.prototype.hasOwnProperty.call(v,"data")){let h=v;p(`Content-Disposition: form-data; name=${d(m)}; filename=${d(h.name||"blob")}`),p(`Content-Type: ${h.type||"application/octet-stream"}`),p(""),p(h.data)}else p(`Content-Disposition: form-data; name=${d(m)}`),p(""),p(v)}return p(`--${n}--`),a},"multipartDataGenerator");function jf(t,e,r,n){if(e=e||{},t!=="POST")return n(null,ft(e));this._stripe._platformFunctions.tryBufferData(e).then(o=>{let a=Jb(t,o,r);return n(null,a)}).catch(o=>n(o,null))}i(jf,"multipartRequestDataProcessor");var es=s.method,Ff=s.extend({create:es({method:"POST",fullPath:"/v1/files",headers:{"Content-Type":"multipart/form-data"},host:"files.stripe.com"}),retrieve:es({method:"GET",fullPath:"/v1/files/{file}"}),list:es({method:"GET",fullPath:"/v1/files",methodType:"list"}),requestDataProcessor:jf});var cn=s.method,Bf=s.extend({create:cn({method:"POST",fullPath:"/v1/invoiceitems"}),retrieve:cn({method:"GET",fullPath:"/v1/invoiceitems/{invoiceitem}"}),update:cn({method:"POST",fullPath:"/v1/invoiceitems/{invoiceitem}"}),list:cn({method:"GET",fullPath:"/v1/invoiceitems",methodType:"list"}),del:cn({method:"DELETE",fullPath:"/v1/invoiceitems/{invoiceitem}"})});var qf=s.method,Vf=s.extend({retrieve:qf({method:"GET",fullPath:"/v1/invoice_payments/{invoice_payment}"}),list:qf({method:"GET",fullPath:"/v1/invoice_payments",methodType:"list"})});var Go=s.method,Zf=s.extend({retrieve:Go({method:"GET",fullPath:"/v1/invoice_rendering_templates/{template}"}),list:Go({method:"GET",fullPath:"/v1/invoice_rendering_templates",methodType:"list"}),archive:Go({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/archive"}),unarchive:Go({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/unarchive"})});var ye=s.method,Gf=s.extend({create:ye({method:"POST",fullPath:"/v1/invoices"}),retrieve:ye({method:"GET",fullPath:"/v1/invoices/{invoice}"}),update:ye({method:"POST",fullPath:"/v1/invoices/{invoice}"}),list:ye({method:"GET",fullPath:"/v1/invoices",methodType:"list"}),del:ye({method:"DELETE",fullPath:"/v1/invoices/{invoice}"}),addLines:ye({method:"POST",fullPath:"/v1/invoices/{invoice}/add_lines"}),attachPayment:ye({method:"POST",fullPath:"/v1/invoices/{invoice}/attach_payment"}),createPreview:ye({method:"POST",fullPath:"/v1/invoices/create_preview"}),finalizeInvoice:ye({method:"POST",fullPath:"/v1/invoices/{invoice}/finalize"}),listLineItems:ye({method:"GET",fullPath:"/v1/invoices/{invoice}/lines",methodType:"list"}),markUncollectible:ye({method:"POST",fullPath:"/v1/invoices/{invoice}/mark_uncollectible"}),pay:ye({method:"POST",fullPath:"/v1/invoices/{invoice}/pay"}),removeLines:ye({method:"POST",fullPath:"/v1/invoices/{invoice}/remove_lines"}),search:ye({method:"GET",fullPath:"/v1/invoices/search",methodType:"search"}),sendInvoice:ye({method:"POST",fullPath:"/v1/invoices/{invoice}/send"}),updateLines:ye({method:"POST",fullPath:"/v1/invoices/{invoice}/update_lines"}),updateLineItem:ye({method:"POST",fullPath:"/v1/invoices/{invoice}/lines/{line_item_id}"}),voidInvoice:ye({method:"POST",fullPath:"/v1/invoices/{invoice}/void"})});var Xb=s.method,Hf=s.extend({retrieve:Xb({method:"GET",fullPath:"/v1/mandates/{mandate}"})});var Wf=s.method,ts="connect.stripe.com",Kf=s.extend({basePath:"/",authorizeUrl(t,e){t=t||{},e=e||{};let r="oauth/authorize";return e.express&&(r=`express/${r}`),t.response_type||(t.response_type="code"),t.client_id||(t.client_id=this._stripe.getClientId()),t.scope||(t.scope="read_write"),`https://${ts}/${r}?${ft(t)}`},token:Wf({method:"POST",path:"oauth/token",host:ts}),deauthorize(t,...e){return t.client_id||(t.client_id=this._stripe.getClientId()),Wf({method:"POST",path:"oauth/deauthorize",host:ts}).apply(this,[t,...e])}});var De=s.method,Jf=s.extend({create:De({method:"POST",fullPath:"/v1/payment_intents"}),retrieve:De({method:"GET",fullPath:"/v1/payment_intents/{intent}"}),update:De({method:"POST",fullPath:"/v1/payment_intents/{intent}"}),list:De({method:"GET",fullPath:"/v1/payment_intents",methodType:"list"}),applyCustomerBalance:De({method:"POST",fullPath:"/v1/payment_intents/{intent}/apply_customer_balance"}),cancel:De({method:"POST",fullPath:"/v1/payment_intents/{intent}/cancel"}),capture:De({method:"POST",fullPath:"/v1/payment_intents/{intent}/capture"}),confirm:De({method:"POST",fullPath:"/v1/payment_intents/{intent}/confirm"}),incrementAuthorization:De({method:"POST",fullPath:"/v1/payment_intents/{intent}/increment_authorization"}),search:De({method:"GET",fullPath:"/v1/payment_intents/search",methodType:"search"}),verifyMicrodeposits:De({method:"POST",fullPath:"/v1/payment_intents/{intent}/verify_microdeposits"})});var ln=s.method,Xf=s.extend({create:ln({method:"POST",fullPath:"/v1/payment_links"}),retrieve:ln({method:"GET",fullPath:"/v1/payment_links/{payment_link}"}),update:ln({method:"POST",fullPath:"/v1/payment_links/{payment_link}"}),list:ln({method:"GET",fullPath:"/v1/payment_links",methodType:"list"}),listLineItems:ln({method:"GET",fullPath:"/v1/payment_links/{payment_link}/line_items",methodType:"list"})});var Ho=s.method,Yf=s.extend({create:Ho({method:"POST",fullPath:"/v1/payment_method_configurations"}),retrieve:Ho({method:"GET",fullPath:"/v1/payment_method_configurations/{configuration}"}),update:Ho({method:"POST",fullPath:"/v1/payment_method_configurations/{configuration}"}),list:Ho({method:"GET",fullPath:"/v1/payment_method_configurations",methodType:"list"})});var pn=s.method,Qf=s.extend({create:pn({method:"POST",fullPath:"/v1/payment_method_domains"}),retrieve:pn({method:"GET",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),update:pn({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),list:pn({method:"GET",fullPath:"/v1/payment_method_domains",methodType:"list"}),validate:pn({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}/validate"})});var ur=s.method,eh=s.extend({create:ur({method:"POST",fullPath:"/v1/payment_methods"}),retrieve:ur({method:"GET",fullPath:"/v1/payment_methods/{payment_method}"}),update:ur({method:"POST",fullPath:"/v1/payment_methods/{payment_method}"}),list:ur({method:"GET",fullPath:"/v1/payment_methods",methodType:"list"}),attach:ur({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/attach"}),detach:ur({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/detach"})});var cr=s.method,th=s.extend({create:cr({method:"POST",fullPath:"/v1/payouts"}),retrieve:cr({method:"GET",fullPath:"/v1/payouts/{payout}"}),update:cr({method:"POST",fullPath:"/v1/payouts/{payout}"}),list:cr({method:"GET",fullPath:"/v1/payouts",methodType:"list"}),cancel:cr({method:"POST",fullPath:"/v1/payouts/{payout}/cancel"}),reverse:cr({method:"POST",fullPath:"/v1/payouts/{payout}/reverse"})});var dn=s.method,rh=s.extend({create:dn({method:"POST",fullPath:"/v1/plans"}),retrieve:dn({method:"GET",fullPath:"/v1/plans/{plan}"}),update:dn({method:"POST",fullPath:"/v1/plans/{plan}"}),list:dn({method:"GET",fullPath:"/v1/plans",methodType:"list"}),del:dn({method:"DELETE",fullPath:"/v1/plans/{plan}"})});var mn=s.method,nh=s.extend({create:mn({method:"POST",fullPath:"/v1/prices"}),retrieve:mn({method:"GET",fullPath:"/v1/prices/{price}"}),update:mn({method:"POST",fullPath:"/v1/prices/{price}"}),list:mn({method:"GET",fullPath:"/v1/prices",methodType:"list"}),search:mn({method:"GET",fullPath:"/v1/prices/search",methodType:"search"})});var Be=s.method,oh=s.extend({create:Be({method:"POST",fullPath:"/v1/products"}),retrieve:Be({method:"GET",fullPath:"/v1/products/{id}"}),update:Be({method:"POST",fullPath:"/v1/products/{id}"}),list:Be({method:"GET",fullPath:"/v1/products",methodType:"list"}),del:Be({method:"DELETE",fullPath:"/v1/products/{id}"}),createFeature:Be({method:"POST",fullPath:"/v1/products/{product}/features"}),deleteFeature:Be({method:"DELETE",fullPath:"/v1/products/{product}/features/{id}"}),listFeatures:Be({method:"GET",fullPath:"/v1/products/{product}/features",methodType:"list"}),retrieveFeature:Be({method:"GET",fullPath:"/v1/products/{product}/features/{id}"}),search:Be({method:"GET",fullPath:"/v1/products/search",methodType:"search"})});var Wo=s.method,ih=s.extend({create:Wo({method:"POST",fullPath:"/v1/promotion_codes"}),retrieve:Wo({method:"GET",fullPath:"/v1/promotion_codes/{promotion_code}"}),update:Wo({method:"POST",fullPath:"/v1/promotion_codes/{promotion_code}"}),list:Wo({method:"GET",fullPath:"/v1/promotion_codes",methodType:"list"})});var qe=s.method,ah=s.extend({create:qe({method:"POST",fullPath:"/v1/quotes"}),retrieve:qe({method:"GET",fullPath:"/v1/quotes/{quote}"}),update:qe({method:"POST",fullPath:"/v1/quotes/{quote}"}),list:qe({method:"GET",fullPath:"/v1/quotes",methodType:"list"}),accept:qe({method:"POST",fullPath:"/v1/quotes/{quote}/accept"}),cancel:qe({method:"POST",fullPath:"/v1/quotes/{quote}/cancel"}),finalizeQuote:qe({method:"POST",fullPath:"/v1/quotes/{quote}/finalize"}),listComputedUpfrontLineItems:qe({method:"GET",fullPath:"/v1/quotes/{quote}/computed_upfront_line_items",methodType:"list"}),listLineItems:qe({method:"GET",fullPath:"/v1/quotes/{quote}/line_items",methodType:"list"}),pdf:qe({method:"GET",fullPath:"/v1/quotes/{quote}/pdf",host:"files.stripe.com",streaming:!0})});var fn=s.method,sh=s.extend({create:fn({method:"POST",fullPath:"/v1/refunds"}),retrieve:fn({method:"GET",fullPath:"/v1/refunds/{refund}"}),update:fn({method:"POST",fullPath:"/v1/refunds/{refund}"}),list:fn({method:"GET",fullPath:"/v1/refunds",methodType:"list"}),cancel:fn({method:"POST",fullPath:"/v1/refunds/{refund}/cancel"})});var rs=s.method,uh=s.extend({retrieve:rs({method:"GET",fullPath:"/v1/reviews/{review}"}),list:rs({method:"GET",fullPath:"/v1/reviews",methodType:"list"}),approve:rs({method:"POST",fullPath:"/v1/reviews/{review}/approve"})});var Yb=s.method,ch=s.extend({list:Yb({method:"GET",fullPath:"/v1/setup_attempts",methodType:"list"})});var Ot=s.method,lh=s.extend({create:Ot({method:"POST",fullPath:"/v1/setup_intents"}),retrieve:Ot({method:"GET",fullPath:"/v1/setup_intents/{intent}"}),update:Ot({method:"POST",fullPath:"/v1/setup_intents/{intent}"}),list:Ot({method:"GET",fullPath:"/v1/setup_intents",methodType:"list"}),cancel:Ot({method:"POST",fullPath:"/v1/setup_intents/{intent}/cancel"}),confirm:Ot({method:"POST",fullPath:"/v1/setup_intents/{intent}/confirm"}),verifyMicrodeposits:Ot({method:"POST",fullPath:"/v1/setup_intents/{intent}/verify_microdeposits"})});var Ko=s.method,ph=s.extend({create:Ko({method:"POST",fullPath:"/v1/shipping_rates"}),retrieve:Ko({method:"GET",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),update:Ko({method:"POST",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),list:Ko({method:"GET",fullPath:"/v1/shipping_rates",methodType:"list"})});var hn=s.method,dh=s.extend({create:hn({method:"POST",fullPath:"/v1/sources"}),retrieve:hn({method:"GET",fullPath:"/v1/sources/{source}"}),update:hn({method:"POST",fullPath:"/v1/sources/{source}"}),listSourceTransactions:hn({method:"GET",fullPath:"/v1/sources/{source}/source_transactions",methodType:"list"}),verify:hn({method:"POST",fullPath:"/v1/sources/{source}/verify"})});var gn=s.method,mh=s.extend({create:gn({method:"POST",fullPath:"/v1/subscription_items"}),retrieve:gn({method:"GET",fullPath:"/v1/subscription_items/{item}"}),update:gn({method:"POST",fullPath:"/v1/subscription_items/{item}"}),list:gn({method:"GET",fullPath:"/v1/subscription_items",methodType:"list"}),del:gn({method:"DELETE",fullPath:"/v1/subscription_items/{item}"})});var lr=s.method,fh=s.extend({create:lr({method:"POST",fullPath:"/v1/subscription_schedules"}),retrieve:lr({method:"GET",fullPath:"/v1/subscription_schedules/{schedule}"}),update:lr({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}"}),list:lr({method:"GET",fullPath:"/v1/subscription_schedules",methodType:"list"}),cancel:lr({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/cancel"}),release:lr({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/release"})});var yt=s.method,hh=s.extend({create:yt({method:"POST",fullPath:"/v1/subscriptions"}),retrieve:yt({method:"GET",fullPath:"/v1/subscriptions/{subscription_exposed_id}"}),update:yt({method:"POST",fullPath:"/v1/subscriptions/{subscription_exposed_id}"}),list:yt({method:"GET",fullPath:"/v1/subscriptions",methodType:"list"}),cancel:yt({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}"}),deleteDiscount:yt({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}/discount"}),resume:yt({method:"POST",fullPath:"/v1/subscriptions/{subscription}/resume"}),search:yt({method:"GET",fullPath:"/v1/subscriptions/search",methodType:"search"})});var gh=s.method,yh=s.extend({retrieve:gh({method:"GET",fullPath:"/v1/tax_codes/{id}"}),list:gh({method:"GET",fullPath:"/v1/tax_codes",methodType:"list"})});var Jo=s.method,vh=s.extend({create:Jo({method:"POST",fullPath:"/v1/tax_ids"}),retrieve:Jo({method:"GET",fullPath:"/v1/tax_ids/{id}"}),list:Jo({method:"GET",fullPath:"/v1/tax_ids",methodType:"list"}),del:Jo({method:"DELETE",fullPath:"/v1/tax_ids/{id}"})});var Xo=s.method,_h=s.extend({create:Xo({method:"POST",fullPath:"/v1/tax_rates"}),retrieve:Xo({method:"GET",fullPath:"/v1/tax_rates/{tax_rate}"}),update:Xo({method:"POST",fullPath:"/v1/tax_rates/{tax_rate}"}),list:Xo({method:"GET",fullPath:"/v1/tax_rates",methodType:"list"})});var Ph=s.method,xh=s.extend({create:Ph({method:"POST",fullPath:"/v1/tokens"}),retrieve:Ph({method:"GET",fullPath:"/v1/tokens/{token}"})});var yn=s.method,bh=s.extend({create:yn({method:"POST",fullPath:"/v1/topups"}),retrieve:yn({method:"GET",fullPath:"/v1/topups/{topup}"}),update:yn({method:"POST",fullPath:"/v1/topups/{topup}"}),list:yn({method:"GET",fullPath:"/v1/topups",methodType:"list"}),cancel:yn({method:"POST",fullPath:"/v1/topups/{topup}/cancel"})});var vt=s.method,Th=s.extend({create:vt({method:"POST",fullPath:"/v1/transfers"}),retrieve:vt({method:"GET",fullPath:"/v1/transfers/{transfer}"}),update:vt({method:"POST",fullPath:"/v1/transfers/{transfer}"}),list:vt({method:"GET",fullPath:"/v1/transfers",methodType:"list"}),createReversal:vt({method:"POST",fullPath:"/v1/transfers/{id}/reversals"}),listReversals:vt({method:"GET",fullPath:"/v1/transfers/{id}/reversals",methodType:"list"}),retrieveReversal:vt({method:"GET",fullPath:"/v1/transfers/{transfer}/reversals/{id}"}),updateReversal:vt({method:"POST",fullPath:"/v1/transfers/{transfer}/reversals/{id}"})});var vn=s.method,Sh=s.extend({create:vn({method:"POST",fullPath:"/v1/webhook_endpoints"}),retrieve:vn({method:"GET",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),update:vn({method:"POST",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),list:vn({method:"GET",fullPath:"/v1/webhook_endpoints",methodType:"list"}),del:vn({method:"DELETE",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"})});var Qb=re("apps",{Secrets:Zm}),eT=re("billing",{Alerts:Md,CreditBalanceSummary:Wd,CreditBalanceTransactions:Jd,CreditGrants:Xd,MeterEventAdjustments:pm,MeterEvents:hm,Meters:ym}),tT=re("billingPortal",{Configurations:Vd,Sessions:Gm}),rT=re("checkout",{Sessions:Hm}),nT=re("climate",{Orders:vm,Products:wm,Suppliers:Qm}),oT=re("entitlements",{ActiveEntitlements:Nd,Features:am}),iT=re("financialConnections",{Accounts:Cd,Sessions:Km,Transactions:sf}),aT=re("forwarding",{Requests:Bm}),sT=re("identity",{VerificationReports:hf,VerificationSessions:gf}),uT=re("issuing",{Authorizations:Ld,Cardholders:Fd,Cards:qd,Disputes:tm,PersonalizationDesigns:Sm,PhysicalBundles:Im,Tokens:tf,Transactions:uf}),cT=re("radar",{EarlyFraudWarnings:nm,ValueListItems:df,ValueLists:mf}),lT=re("reporting",{ReportRuns:Lm,ReportTypes:Fm}),pT=re("sigma",{ScheduledQueryRuns:Vm}),dT=re("tax",{Calculations:jd,Registrations:Um,Settings:Xm,Transactions:cf}),mT=re("terminal",{Configurations:Zd,ConnectionTokens:Hd,Locations:lm,Readers:Om}),fT=re("testHelpers",{ConfirmationTokens:Gd,Customers:Qd,Refunds:Mm,TestClocks:ef,Issuing:re("issuing",{Authorizations:Ud,Cards:Bd,PersonalizationDesigns:Tm,Transactions:of}),Terminal:re("terminal",{Readers:$m}),Treasury:re("treasury",{InboundTransfers:um,OutboundPayments:_m,OutboundTransfers:xm,ReceivedCredits:km,ReceivedDebits:Cm})}),hT=re("treasury",{CreditReversals:Yd,DebitReversals:em,FinancialAccounts:sm,InboundTransfers:cm,OutboundPayments:Pm,OutboundTransfers:bm,ReceivedCredits:Rm,ReceivedDebits:Nm,TransactionEntries:nf,Transactions:pf}),gT=re("v2",{Billing:re("billing",{MeterEventAdjustments:dm,MeterEventSession:mm,MeterEventStream:fm,MeterEvents:gm}),Core:re("core",{EventDestinations:om,Events:im})});var Eh="api.stripe.com",Ih="443",Ah="/v1/",wh=Rd,$h=8e4,Oh=5,kh=.5,yT=["name","version","url","partner_id"],zh=["authenticator","apiVersion","typescript","maxNetworkRetries","httpAgent","httpClient","timeout","host","port","protocol","telemetry","appInfo","stripeAccount","stripeContext"],vT=i(t=>new Ao(t,s.MAX_BUFFERED_REQUEST_METRICS),"defaultRequestSenderFactory");function Rh(t,e=vT){r.PACKAGE_VERSION="18.2.1",r.USER_AGENT=Object.assign({bindings_version:r.PACKAGE_VERSION,lang:"node",publisher:"stripe",uname:null,typescript:!1},Td()),r.StripeResource=s,r.resources=pr,r.HttpClient=ve,r.HttpClientResponse=pt,r.CryptoProvider=lt,r.webhooks=zd(t);function r(n,o={}){if(!(this instanceof r))return new r(n,o);let a=this._getPropsFromConfig(o);this._platformFunctions=t,Object.defineProperty(this,"_emitter",{value:this._platformFunctions.createEmitter(),enumerable:!1,configurable:!1,writable:!1}),this.VERSION=r.PACKAGE_VERSION,this.on=this._emitter.on.bind(this._emitter),this.once=this._emitter.once.bind(this._emitter),this.off=this._emitter.removeListener.bind(this._emitter);let u=a.httpAgent||null;this._api={host:a.host||Eh,port:a.port||Ih,protocol:a.protocol||"https",basePath:Ah,version:a.apiVersion||wh,timeout:ho("timeout",a.timeout,$h),maxNetworkRetries:ho("maxNetworkRetries",a.maxNetworkRetries,2),agent:u,httpClient:a.httpClient||(u?this._platformFunctions.createNodeHttpClient(u):this._platformFunctions.createDefaultHttpClient()),dev:!1,stripeAccount:a.stripeAccount||null,stripeContext:a.stripeContext||null};let p=a.typescript||!1;p!==r.USER_AGENT.typescript&&(r.USER_AGENT.typescript=p),a.appInfo&&this._setAppInfo(a.appInfo),this._prepResources(),this._setAuthenticator(n,a.authenticator),this.errors=Eo,this.webhooks=r.webhooks,this._prevRequestMetrics=[],this._enableTelemetry=a.telemetry!==!1,this._requestSender=e(this),this.StripeResource=r.StripeResource}return i(r,"Stripe"),r.errors=Eo,r.createNodeHttpClient=t.createNodeHttpClient,r.createFetchHttpClient=t.createFetchHttpClient,r.createNodeCryptoProvider=t.createNodeCryptoProvider,r.createSubtleCryptoProvider=t.createSubtleCryptoProvider,r.prototype={_appInfo:void 0,on:null,off:null,once:null,VERSION:null,StripeResource:null,webhooks:null,errors:null,_api:null,_prevRequestMetrics:null,_emitter:null,_enableTelemetry:null,_requestSender:null,_platformFunctions:null,rawRequest(n,o,a,u){return this._requestSender._rawRequest(n,o,a,u)},_setAuthenticator(n,o){if(n&&o)throw new Error("Can't specify both apiKey and authenticator");if(!n&&!o)throw new Error("Neither apiKey nor config.authenticator provided");this._authenticator=n?lo(n):o},_setAppInfo(n){if(n&&typeof n!="object")throw new Error("AppInfo must be an object.");if(n&&!n.name)throw new Error("AppInfo.name is required");n=n||{},this._appInfo=yT.reduce((o,a)=>(typeof n[a]=="string"&&(o=o||{},o[a]=n[a]),o),{})},_setApiField(n,o){this._api[n]=o},getApiField(n){return this._api[n]},setClientId(n){this._clientId=n},getClientId(){return this._clientId},getConstant:i(n=>{switch(n){case"DEFAULT_HOST":return Eh;case"DEFAULT_PORT":return Ih;case"DEFAULT_BASE_PATH":return Ah;case"DEFAULT_API_VERSION":return wh;case"DEFAULT_TIMEOUT":return $h;case"MAX_NETWORK_RETRY_DELAY_SEC":return Oh;case"INITIAL_NETWORK_RETRY_DELAY_SEC":return kh}return r[n]},"getConstant"),getMaxNetworkRetries(){return this.getApiField("maxNetworkRetries")},_setApiNumberField(n,o,a){let u=ho(n,o,a);this._setApiField(n,u)},getMaxNetworkRetryDelay(){return Oh},getInitialNetworkRetryDelay(){return kh},getClientUserAgent(n){return this.getClientUserAgentSeeded(r.USER_AGENT,n)},getClientUserAgentSeeded(n,o){this._platformFunctions.getUname().then(a=>{var u;let p={};for(let g in n)Object.prototype.hasOwnProperty.call(n,g)&&(p[g]=encodeURIComponent((u=n[g])!==null&&u!==void 0?u:"null"));p.uname=encodeURIComponent(a||"UNKNOWN");let d=this.getApiField("httpClient");d&&(p.httplib=encodeURIComponent(d.getClientName())),this._appInfo&&(p.application=this._appInfo),o(JSON.stringify(p))})},getAppInfoAsString(){if(!this._appInfo)return"";let n=this._appInfo.name;return this._appInfo.version&&(n+=`/${this._appInfo.version}`),this._appInfo.url&&(n+=` (${this._appInfo.url})`),n},getTelemetryEnabled(){return this._enableTelemetry},_prepResources(){for(let n in pr)Object.prototype.hasOwnProperty.call(pr,n)&&(this[xd(n)]=new pr[n](this))},_getPropsFromConfig(n){if(!n)return{};let o=typeof n=="string";if(!(n===Object(n)&&!Array.isArray(n))&&!o)throw new Error("Config must either be an object or a string");if(o)return{apiVersion:n};if(Object.keys(n).filter(p=>!zh.includes(p)).length>0)throw new Error(`Config object may only contain the following: ${zh.join(", ")}`);return n},parseThinEvent(n,o,a,u,p,d){return this.webhooks.constructEvent(n,o,a,u,p,d)}},r}i(Rh,"createStripe");var Ch=Rh(new Io);var et="https://api.stripe.com/v1",tt=i(t=>new Ch(t,{apiVersion:"2025-05-28.basil"}),"getClient"),I={baseUrl:et,subscribeWebhook:i(async(t,e,r)=>{let n={method:"POST",url:`${et}/webhook_endpoints`,headers:{"Content-Type":"application/x-www-form-urlencoded"},body:{enabled_events:[t],url:e},authentication:{type:"BEARER_TOKEN",token:r},queryParams:{}},{body:o}=await w.sendRequest(n);return o},"subscribeWebhook"),unsubscribeWebhook:i(async(t,e)=>{let r={method:"DELETE",url:`${et}/webhook_endpoints/${t}`,authentication:{type:"BEARER_TOKEN",token:e}};return await w.sendRequest(r)},"unsubscribeWebhook"),invoice:T.Dropdown({auth:A,displayName:"Invoice",required:!0,refreshers:[],options:i(async({auth:t})=>{if(!t)return{disabled:!0,options:[],placeholder:"Please connect your Stripe account first"};try{return{disabled:!1,options:(await tt(t.secret_text).invoices.list({limit:100,expand:["data.customer"]})).data.map(n=>{let o=n.customer,a=o?.name||o?.email||"Unknown Customer",u=(n.total/100).toFixed(2),p=`Invoice #${n.number||n.id} for ${a} (${u} ${n.currency.toUpperCase()})`;return{value:n.id,label:p}}).filter(n=>n.value!==void 0&&n.value!==null)}}catch(e){return console.error("Failed to load Stripe invoices:",e),{disabled:!0,options:[],placeholder:"Error loading invoices. Check connection."}}},"options")}),customer:T.Dropdown({auth:A,displayName:"Customer",required:!0,refreshers:[],options:i(async({auth:t,searchValue:e})=>{if(!t)return{disabled:!0,options:[],placeholder:"Please connect your account"};let r={method:"GET",authentication:{type:"BEARER_TOKEN",token:t.secret_text},url:e?`${et}/customers/search`:`${et}/customers`,queryParams:e?{query:`name~"${e}" OR email~"${e}"`}:{limit:"100"}},n=await w.sendRequest(r);return n.status===200?{disabled:!1,options:n.body.data.map(o=>({value:o.id,label:`${o.name||o.id} (${o.email||"No Email"})`}))}:{disabled:!0,options:[],placeholder:"Couldn't load customers"}},"options")}),product:T.Dropdown({auth:A,displayName:"Product",required:!0,refreshers:[],options:i(async({auth:t,searchValue:e})=>{if(!t)return{disabled:!0,options:[],placeholder:"Please connect your account"};let r="active:'true'";e&&(r+=` AND name~"${e}"`);let n=await w.sendRequest({method:"GET",url:`${et}/products/search`,authentication:{type:"BEARER_TOKEN",token:t.secret_text},queryParams:{query:r}});return n.status===200?{disabled:!1,options:n.body.data.map(o=>({value:o.id,label:o.name}))}:{disabled:!0,options:[],placeholder:"Couldn't load products"}},"options")}),price:T.Dropdown({auth:A,displayName:"Price",required:!0,refreshers:[],options:i(async({auth:t,searchValue:e})=>{if(!t)return{disabled:!0,options:[],placeholder:"Please connect your account"};let r=await w.sendRequest({method:"GET",url:`${et}/prices/search`,authentication:{type:"BEARER_TOKEN",token:t.secret_text},queryParams:{query:`active:'true' AND type:'recurring' AND (product.name~"${e||""}" OR nickname~"${e||""}")`,expand:"data.product"}});return r.status===200?{disabled:!1,options:r.body.data.map(n=>{let o=n.nickname?`${n.nickname} (${n.product.name})`:n.product.name;return{value:n.id,label:o}})}:{disabled:!0,options:[],placeholder:"Couldn't load prices"}},"options")}),subscription:T.Dropdown({auth:A,displayName:"Subscription",required:!0,refreshers:[],options:i(async({auth:t})=>{if(!t)return{disabled:!0,options:[],placeholder:"Please connect your account first"};try{return{disabled:!1,options:(await tt(t.secret_text).subscriptions.list({limit:100,status:"active",expand:["data.customer"]})).data.map(n=>{let o=n.customer,u=`Subscription for ${o?.name||o?.email||"Unknown Customer"} (${n.id})`;return{value:n.id,label:u}})}}catch(e){return console.error("Failed to load Stripe subscriptions:",e),{disabled:!0,options:[],placeholder:"Couldn't load subscriptions. See console."}}},"options")}),payout:T.Dropdown({auth:A,displayName:"Payout",required:!0,refreshers:[],options:i(async({auth:t})=>{if(!t)return{disabled:!0,options:[],placeholder:"Please connect your account"};let e=await w.sendRequest({method:"GET",url:`${et}/payouts`,authentication:{type:"BEARER_TOKEN",token:t.secret_text},queryParams:{limit:"100"}});return e.status===200?{disabled:!1,options:e.body.data.map(r=>{let n=new Date(r.arrival_date*1e3).toLocaleDateString(),o=(r.amount/100).toFixed(2),a=`Payout on ${n} - ${o} ${r.currency.toUpperCase()} (${r.status})`;return{value:r.id,label:a}})}:{disabled:!0,options:[],placeholder:"Couldn't load payouts"}},"options")}),paymentIntent:T.Dropdown({auth:A,displayName:"Payment Intent",required:!0,refreshers:[],options:i(async({auth:t,searchValue:e})=>{if(!t)return{disabled:!0,options:[],placeholder:"Please connect your account"};let r="status:'succeeded'";e&&(r+=` AND customer.email~"${e}"`);let n=await w.sendRequest({method:"GET",url:`${et}/payment_intents/search`,authentication:{type:"BEARER_TOKEN",token:t.secret_text},queryParams:{query:r,"expand[]":"data.customer"}});return n.status===200?{disabled:!1,options:n.body.data.map(o=>{let a=o.customer?.name||o.customer?.email||"Unknown Customer",u=(o.amount/100).toFixed(2),p=`Payment from ${a} - ${u} ${o.currency.toUpperCase()}`;return{value:o.id,label:p}})}:{disabled:!0,options:[],placeholder:"Couldn't load payment intents"}},"options")}),paymentLink:T.Dropdown({auth:A,displayName:"Payment Link",required:!0,refreshers:[],options:i(async({auth:t})=>{if(!t)return{disabled:!0,options:[],placeholder:"Please connect your account"};try{return{disabled:!1,options:(await tt(t.secret_text).paymentLinks.list({active:!0,limit:100})).data.map(n=>({value:n.id,label:n.url}))}}catch{return{disabled:!0,options:[],placeholder:"Couldn't load payment links"}}},"options")})};var Dh=Z({name:"search_customer",auth:A,displayName:"Search Customer",description:"Search for a customer in stripe by email",audience:"both",aiMetadata:{description:"Looks up Stripe customers matching a given email address. Use to find an existing customer record before creating, updating, or charging one, to avoid duplicates. Read-only and idempotent; matches on the exact email.",idempotent:!0},props:{email:T.ShortText({displayName:"Email",description:void 0,required:!0})},async run(t){let e={email:t.propsValue.email};return(await w.sendRequest({method:"GET",url:`${I.baseUrl}/customers/search`,headers:{Authorization:"Bearer "+t.auth.secret_text,"Content-Type":"application/x-www-form-urlencoded","Stripe-Version":"2026-02-25.clover"},body:{query:`email:'${e.email}'`}})).body}});var Nh=Q({auth:A,name:"new_customer",displayName:"New Customer",description:"Triggers when a new customer is created",aiMetadata:{description:"Fires when a new customer is created in Stripe (the customer.created event), emitting the new customer record. Use to react to customer onboarding, such as syncing them to a CRM or sending a welcome flow."},props:{},sampleData:{id:"cus_NGtyEf4hNGTj3p",object:"customer",address:null,balance:0,created:1675180509,currency:null,default_currency:null,default_source:null,delinquent:!1,description:null,discount:null,email:"jane@example.com",invoice_prefix:"B7162248",invoice_settings:{custom_fields:null,default_payment_method:null,footer:null,rendering_options:null},livemode:!1,metadata:{},name:"John Doe",next_invoice_sequence:1,phone:null,preferred_locales:[],shipping:null,tax_exempt:"none",test_clock:null},type:"WEBHOOK",async onEnable(t){let e=await I.subscribeWebhook("customer.created",t.webhookUrl,t.auth.secret_text);await t.store.put("_new_customer_trigger",{webhookId:e.id})},async onDisable(t){let e=await t.store?.get("_new_customer_trigger");e!=null&&await I.unsubscribeWebhook(e.webhookId,t.auth.secret_text)},async test(t){let e=await w.sendRequest({method:"GET",url:"https://api.stripe.com/v1/customers",headers:{Authorization:"Bearer "+t.auth.secret_text,"Content-Type":"application/x-www-form-urlencoded","Stripe-Version":"2026-02-25.clover"},queryParams:{limit:"5"}});return j(e.body)||j(e.body.data)?[]:e.body.data},async run(t){return[t.payload.body.data.object]}});var Mh=Q({auth:A,name:"new_payment",displayName:"New Payment",description:"Triggers when a new payment is made",aiMetadata:{description:"Fires when a payment succeeds in Stripe (the payment_intent.succeeded event), emitting the completed payment. Use to react to a successful payment, such as fulfilling an order or recording revenue."},props:{},type:"WEBHOOK",sampleData:{id:"ch_3MWM7aKZ0dZRqLEK1soCKVrq",object:"charge",amount:1e4,amount_captured:1e4,amount_refunded:0,application:null,application_fee:null,application_fee_amount:null,balance_transaction:"txn_3MWM7aKZ0dZRqLEK1VyE8QH1",billing_details:{address:{city:null,country:"DE",line1:null,line2:null,postal_code:null,state:null},email:"test@gmail.com",name:"Test user",phone:null},calculated_statement_descriptor:"WWW.ACTIVEPIECES.COM",captured:!0,created:1675180355,currency:"usd",customer:"cus_NGtvUQ18FJXcGI",description:"Subscription creation",destination:null,dispute:null,disputed:!1,failure_balance_transaction:null,failure_code:null,failure_message:null,fraud_details:{},invoice:"in_1MWM7ZKZ0dZRqLEKQbrgSBnh",livemode:!1,metadata:{},on_behalf_of:null,order:null,outcome:{network_status:"approved_by_network",reason:null,risk_level:"normal",risk_score:64,seller_message:"Payment complete.",type:"authorized"},paid:!0,payment_intent:"pi_3MWM7aKZ0dZRqLEK1BsblcVI",payment_method:"pm_1MWM8MKZ0dZRqLEKnIH41f76",payment_method_details:{card:{brand:"visa",checks:{address_line1_check:null,address_postal_code_check:null,cvc_check:"pass"},country:"US",exp_month:12,exp_year:2034,fingerprint:"t8SMsmS4h2vvODpN",funding:"credit",installments:null,last4:"4242",mandate:null,network:"visa",three_d_secure:null,wallet:null},type:"card"},receipt_email:null,receipt_number:null,receipt_url:"https://pay.stripe.com/receipts/invoices/CAcaFwoVYWNjdF8xS214ZEtLWjBkWlJxTEVLKMXy5J4GMgZcuppYWF06LBZEoiAhZ6H7EoJ3bN-BMHCXdaW-_i-ywhSIG9wPGTmtE0CdpD75s1hIyprK?s=ap",refunded:!1,refunds:{object:"list",data:[],has_more:!1,total_count:0,url:"/v1/charges/ch_3MWM7aKZ0dZRqLEK1soCKVrq/refunds"},review:null,shipping:null,source:null,source_transfer:null,statement_descriptor:null,statement_descriptor_suffix:null,status:"succeeded",transfer_data:null,transfer_group:null},async onEnable(t){let e=await I.subscribeWebhook("payment_intent.succeeded",t.webhookUrl,t.auth.secret_text);await t.store?.put("_new_payment_trigger",{webhookId:e.id})},async onDisable(t){let e=await t.store?.get("_new_payment_trigger");e!=null&&await I.unsubscribeWebhook(e.webhookId,t.auth.secret_text)},async test(t){let e=await w.sendRequest({method:"GET",url:"https://api.stripe.com/v1/payment_intents/search",headers:{Authorization:"Bearer "+t.auth.secret_text,"Content-Type":"application/x-www-form-urlencoded","Stripe-Version":"2026-02-25.clover"},queryParams:{query:'status:"succeeded"',limit:"5"}});return j(e.body)||j(e.body.data)?[]:e.body.data},async run(t){return[t.payload.body.data.object]}});var Uh=Q({auth:A,name:"new_subscription",displayName:"New Subscription",description:"Triggers when a new subscription is made",aiMetadata:{description:"Fires when a new subscription is created in Stripe (the customer.subscription.created event), emitting the new subscription. Use to react to a customer starting recurring billing, such as provisioning access or sending an onboarding flow."},props:{},type:"WEBHOOK",sampleData:{id:"sub_1MWMJXKZ0dZRqLEKJX80JXfv",object:"subscription",application:null,application_fee_percent:null,automatic_tax:{enabled:!0},billing_cycle_anchor:1675181047,billing_thresholds:null,cancel_at:null,cancel_at_period_end:!1,canceled_at:null,collection_method:"charge_automatically",created:1675181047,currency:"usd",current_period_end:1677600247,current_period_start:1675181047,customer:"cus_NGtvUQ18FJXcGI",days_until_due:null,default_payment_method:"pm_1MWM8MKZ0dZRqLEKnIH41f76",default_source:null,default_tax_rates:[],description:null,discount:null,ended_at:null,items:{object:"list",data:[{id:"si_NGu7pb7hS3Rps3",object:"subscription_item",billing_thresholds:null,created:1675181048,metadata:{},plan:{id:"price_1MWLz3KZ0dZRqLEK06gRMHCF",object:"plan",active:!0,aggregate_usage:null,amount:1e4,amount_decimal:"10000",billing_scheme:"per_unit",created:1675179777,currency:"usd",interval:"month",interval_count:1,livemode:!1,metadata:{},nickname:null,product:"prod_NGtm3AlvaGjaLN",tiers_mode:null,transform_usage:null,trial_period_days:null,usage_type:"licensed"},price:{id:"price_1MWLz3KZ0dZRqLEK06gRMHCF",object:"price",active:!0,billing_scheme:"per_unit",created:1675179777,currency:"usd",custom_unit_amount:null,livemode:!1,lookup_key:null,metadata:{},nickname:null,product:"prod_NGtm3AlvaGjaLN",recurring:{aggregate_usage:null,interval:"month",interval_count:1,trial_period_days:null,usage_type:"licensed"},tax_behavior:"exclusive",tiers_mode:null,transform_quantity:null,type:"recurring",unit_amount:1e4,unit_amount_decimal:"10000"},quantity:1,subscription:"sub_1MWMJXKZ0dZRqLEKJX80JXfv",tax_rates:[]}],has_more:!1,total_count:1,url:"/v1/subscription_items?subscription=sub_1MWMJXKZ0dZRqLEKJX80JXfv"},latest_invoice:"in_1MWMJXKZ0dZRqLEKIu4a51u7",livemode:!1,metadata:{},next_pending_invoice_item_invoice:null,on_behalf_of:null,pause_collection:null,payment_settings:{payment_method_options:null,payment_method_types:null,save_default_payment_method:"off"},pending_invoice_item_interval:null,pending_setup_intent:null,pending_update:null,plan:{id:"price_1MWLz3KZ0dZRqLEK06gRMHCF",object:"plan",active:!0,aggregate_usage:null,amount:1e4,amount_decimal:"10000",billing_scheme:"per_unit",created:1675179777,currency:"usd",interval:"month",interval_count:1,livemode:!1,metadata:{},nickname:null,product:"prod_NGtm3AlvaGjaLN",tiers_mode:null,transform_usage:null,trial_period_days:null,usage_type:"licensed"},quantity:1,schedule:null,start_date:1675181047,status:"active",test_clock:null,transfer_data:null,trial_end:null,trial_start:null},async onEnable(t){let e=await I.subscribeWebhook("customer.subscription.created",t.webhookUrl,t.auth.secret_text);await t.store?.put("_new_customer_subscription_trigger",{webhookId:e.id})},async onDisable(t){let e=await t.store?.get("_new_customer_subscription_trigger");e!=null&&await I.unsubscribeWebhook(e.webhookId,t.auth.secret_text)},async test(t){let e=await w.sendRequest({method:"GET",url:"https://api.stripe.com/v1/subscriptions",headers:{Authorization:"Bearer "+t.auth.secret_text,"Content-Type":"application/x-www-form-urlencoded"},queryParams:{limit:"5"}});return j(e.body)||j(e.body.data)?[]:e.body.data},async run(t){return[t.payload.body.data.object]}});var Lh=Q({auth:A,name:"payment_failed",displayName:"Payment Failed",description:"Triggers when a payment fails",aiMetadata:{description:"Fires when a charge fails in Stripe (the charge.failed event), emitting the failed charge including its failure code and message. Use to react to declined payments, such as alerting the customer or triggering a retry/dunning flow."},props:{},sampleData:{id:"ch_3MWMPQKZ0dZRqLEK063rxD7q",object:"charge",amount:1e5,amount_captured:0,amount_refunded:0,application:null,application_fee:null,application_fee_amount:null,balance_transaction:null,billing_details:{address:{city:null,country:null,line1:null,line2:null,postal_code:"12321",state:null},email:null,name:null,phone:null},calculated_statement_descriptor:"WWW.ACTIVEPIECES.COM",captured:!1,created:1675181413,currency:"usd",customer:"cus_NGtvUQ18FJXcGI",description:"Failed Payment",destination:null,dispute:null,disputed:!1,failure_balance_transaction:null,failure_code:"card_declined",failure_message:"Your card was declined.",fraud_details:{},invoice:null,livemode:!1,metadata:{},on_behalf_of:null,order:null,outcome:{network_status:"declined_by_network",reason:"generic_decline",risk_level:"normal",risk_score:60,seller_message:"The bank did not return any further details with this decline.",type:"issuer_declined"},paid:!1,payment_intent:"pi_3MWMPQKZ0dZRqLEK0Nsc6WhL",payment_method:"src_1MWMPQKZ0dZRqLEKuQ83wmZI",payment_method_details:{card:{brand:"visa",checks:{address_line1_check:null,address_postal_code_check:"pass",cvc_check:"pass"},country:"US",exp_month:12,exp_year:2031,fingerprint:"mtYxM2Q4edpEt8Pw",funding:"credit",installments:null,last4:"0341",mandate:null,network:"visa",three_d_secure:null,wallet:null},type:"card"},receipt_email:null,receipt_number:null,receipt_url:null,refunded:!1,refunds:{object:"list",data:[],has_more:!1,total_count:0,url:"/v1/charges/ch_3MWMPQKZ0dZRqLEK063rxD7q/refunds"},review:null,shipping:null,source:{id:"src_1MWMPQKZ0dZRqLEKuQ83wmZI",object:"source",amount:null,card:{exp_month:12,exp_year:2031,last4:"0341",country:"US",brand:"Visa",address_zip_check:"pass",cvc_check:"pass",funding:"credit",fingerprint:"mtYxM2Q4edpEt8Pw",three_d_secure:"optional",name:null,address_line1_check:null,tokenization_method:null,dynamic_last4:null},client_secret:"src_client_secret_TlLkl6IvhCvmbx8Cz12YNDVb",created:1675181413,currency:null,flow:"none",livemode:!1,metadata:{},owner:{address:{city:null,country:null,line1:null,line2:null,postal_code:"12321",state:null},email:null,name:null,phone:null,verified_address:null,verified_email:null,verified_name:null,verified_phone:null},statement_descriptor:null,status:"chargeable",type:"card",usage:"reusable"},source_transfer:null,statement_descriptor:"www.activepieces.com",statement_descriptor_suffix:null,status:"failed",transfer_data:null,transfer_group:null},type:"WEBHOOK",async onEnable(t){let e=await I.subscribeWebhook("charge.failed",t.webhookUrl,t.auth.secret_text);await t.store?.put("_payment_failed_trigger",{webhookId:e.id})},async onDisable(t){let e=await t.store?.get("_payment_failed_trigger");e!=null&&await I.unsubscribeWebhook(e.webhookId,t.auth.secret_text)},async test(t){let e=await w.sendRequest({method:"GET",url:"https://api.stripe.com/v1/charges/search",headers:{Authorization:"Bearer "+t.auth.secret_text,"Content-Type":"application/x-www-form-urlencoded","Stripe-Version":"2026-02-25.clover"},queryParams:{query:'status:"failed"',limit:"5"}});return j(e.body)||j(e.body.data)?[]:e.body.data},async run(t){return[t.payload.body.data.object]}});var _T=[{label:"All Statuses",value:""},{label:"Active",value:"active"},{label:"Past Due",value:"past_due"},{label:"Unpaid",value:"unpaid"},{label:"Canceled",value:"canceled"},{label:"Incomplete",value:"incomplete"},{label:"Incomplete Expired",value:"incomplete_expired"},{label:"Trialing",value:"trialing"},{label:"Paused",value:"paused"}],jh=Z({name:"search_subscriptions",auth:A,displayName:"Search Subscriptions",description:"Search for subscriptions by price ID, status, customer ID and other filters, including customer details",audience:"both",aiMetadata:{description:"Lists and filters Stripe subscriptions by price ID, status, customer ID, and creation date range, optionally expanding full customer details for each. Use to find subscriptions matching criteria or to audit a customer's subscriptions; supports paging through all results. Read-only and idempotent.",idempotent:!0},props:{price_ids:T.LongText({displayName:"Price IDs",description:"Comma-separated list of price IDs to filter by (e.g., price_1ABC123, price_2DEF456)",required:!1}),status:T.StaticDropdown({displayName:"Subscription Status",description:"Filter by subscription status",required:!1,options:{options:_T}}),customer_id:T.ShortText({displayName:"Customer ID",description:"Filter by specific customer ID (optional)",required:!1}),created_after:T.DateTime({displayName:"Created After",description:"Filter subscriptions created after this date (YYYY-MM-DD format)",required:!1}),created_before:T.DateTime({displayName:"Created Before",description:"Filter subscriptions created before this date (YYYY-MM-DD format)",required:!1}),limit:T.Number({displayName:"Limit",description:"Maximum number of subscriptions to return (default: 100, set to 0 for all)",required:!1,defaultValue:100}),fetch_all:T.Checkbox({displayName:"Fetch All Results",description:"Fetch all matching subscriptions (ignores limit, may take longer for large datasets)",required:!1,defaultValue:!1}),include_customer_details:T.Checkbox({displayName:"Include Customer Details",description:"Fetch detailed customer information for each subscription",required:!1,defaultValue:!0})},async run(t){let{price_ids:e,status:r,customer_id:n,created_after:o,created_before:a,limit:u=100,fetch_all:p=!1,include_customer_details:d=!0}=t.propsValue,g=i(x=>{let b=new URLSearchParams;if(b.append("limit","100"),b.append("expand[]","data.items.data.price"),d&&b.append("expand[]","data.customer"),r&&b.append("status",r),n&&b.append("customer",n),o){let E=Math.floor(new Date(o).getTime()/1e3);b.append("created[gte]",E.toString())}if(a){let E=Math.floor(new Date(a).getTime()/1e3);b.append("created[lte]",E.toString())}return x&&b.append("starting_after",x),b},"buildQueryParams"),m=[],v=!0,h,c=0,f=p?50:Math.ceil(u/100);for(;v&&c<f;){let x=g(h),b=await w.sendRequest({method:"GET",url:`${I.baseUrl}/subscriptions?${x.toString()}`,headers:{Authorization:"Bearer "+t.auth.secret_text,"Content-Type":"application/x-www-form-urlencoded"}});if(!b.body)throw new Error("Failed to fetch subscriptions from Stripe");let E=b.body.data;if(m=m.concat(E),v=b.body.has_more,c++,v&&E.length>0&&(h=E[E.length-1].id),!p&&m.length>=u){m=m.slice(0,u);break}}let _=m;if(e&&e.trim()){let x=e.split(",").map(b=>b.trim()).filter(b=>b.length>0);x.length>0&&(_=_.filter(b=>b.items.data.some(E=>E.price&&typeof E.price=="object"&&x.includes(E.price.id))))}let y=await Promise.all(_.map(async x=>{let b={...x};if(d){if(typeof x.customer=="object"&&x.customer!==null&&!("deleted"in x.customer&&x.customer.deleted))b.customer=x.customer;else if(typeof x.customer=="string")try{let E=await w.sendRequest({method:"GET",url:`${I.baseUrl}/customers/${x.customer}`,headers:{Authorization:"Bearer "+t.auth.secret_text}});b.customer=E.body}catch(E){console.warn(`Failed to fetch customer details for ${x.customer}:`,E)}}return b}));return{success:!0,count:y.length,total_fetched:m.length,requests_made:c,has_more_available:v&&!p,pagination_info:{limit_requested:p?"All":u,fetch_all_enabled:p,max_requests_limit:f},subscriptions:y,filters_applied:{price_ids:e?e.split(",").map(x=>x.trim()).filter(x=>x.length>0):null,status:r||null,customer_id:n||null,created_after:o||null,created_before:a||null,limit:u,fetch_all:p,include_customer_details:d}}}});var Fh=Q({auth:A,name:"new_charge",displayName:"New Charge",description:"Fires when a charge is successfully completed.",aiMetadata:{description:"Fires when a charge is successfully completed in Stripe (the charge.succeeded event), emitting the charge record. Use to react to a successful card charge; note this is the charge-level event, distinct from the New Payment trigger which fires on a succeeded payment intent."},props:{},sampleData:{id:"ch_3MmlLrLkdIwHu7ix0snN0B15",object:"charge",amount:1099,amount_captured:1099,amount_refunded:0,application:null,application_fee:null,application_fee_amount:null,balance_transaction:"txn_3MmlLrLkdIwHu7ix0uke3Ezy",billing_details:{address:{city:null,country:null,line1:null,line2:null,postal_code:null,state:null},email:"customer@example.com",name:"John Doe",phone:null},captured:!0,created:1679090539,currency:"usd",customer:"cus_ABC123",description:"My First Test Charge",disputed:!1,paid:!0,payment_intent:"pi_123",payment_method:"pm_123",receipt_url:"https://pay.stripe.com/receipts/...",refunded:!1,status:"succeeded"},type:"WEBHOOK",async onEnable(t){let e=await I.subscribeWebhook("charge.succeeded",t.webhookUrl,t.auth.secret_text);await t.store.put("_new_charge_trigger",{webhookId:e.id})},async onDisable(t){let e=await t.store.get("_new_charge_trigger");e!=null&&await I.unsubscribeWebhook(e.webhookId,t.auth.secret_text)},async test(t){let e=await w.sendRequest({method:"GET",url:"https://api.stripe.com/v1/charges/search",headers:{Authorization:"Bearer "+t.auth.secret_text,"Content-Type":"application/x-www-form-urlencoded","Stripe-Version":"2026-02-25.clover"},queryParams:{query:'status:"succeeded"',limit:"5"}});return j(e.body)||j(e.body.data)?[]:e.body.data},async run(t){return[t.payload.body.data.object]}});var Bh=Q({auth:A,name:"new_invoice",displayName:"New Invoice",description:"Fires when an invoice is created. Supports filters like status, customer, subscription.",aiMetadata:{description:"Fires when an invoice is created in Stripe (the invoice.created event), emitting the new invoice. Optional filters narrow firing to a specific status, customer ID, or subscription ID. Use to react to newly issued invoices, for example to record or forward them."},props:{status:T.StaticDropdown({displayName:"Status",description:"Only trigger for invoices with this status.",required:!1,options:{options:[{label:"Draft",value:"draft"},{label:"Open",value:"open"},{label:"Paid",value:"paid"},{label:"Uncollectible",value:"uncollectible"},{label:"Void",value:"void"}]}}),customer:T.ShortText({displayName:"Customer ID",description:"Only trigger for invoices belonging to this customer ID (e.g., `cus_...`).",required:!1}),subscription:T.ShortText({displayName:"Subscription ID",description:"Only trigger for invoices belonging to this subscription ID (e.g., `sub_...`).",required:!1})},sampleData:{id:"in_1MtHbELkdIwHu7ixl4OzzPMv",object:"invoice",customer:"cus_NeZwdNtLEOXuvB",subscription:"sub_12345ABC",status:"paid",amount_due:999,amount_paid:999,amount_remaining:0,billing_reason:"subscription_cycle",collection_method:"charge_automatically",created:1680644467,currency:"usd",customer_email:"jennyrosen@example.com",customer_name:"Jenny Rosen",hosted_invoice_url:"https://invoice.stripe.com/i/acct_...",invoice_pdf:"https://pay.stripe.com/invoice/acct_.../pdf",livemode:!1,number:"ABC-123-456"},type:"WEBHOOK",async onEnable(t){let e=await I.subscribeWebhook("invoice.created",t.webhookUrl,t.auth.secret_text);await t.store.put("_new_invoice_trigger",{webhookId:e.id})},async onDisable(t){let e=await t.store.get("_new_invoice_trigger");e!=null&&await I.unsubscribeWebhook(e.webhookId,t.auth.secret_text)},async test(t){let e=await w.sendRequest({method:"GET",url:"https://api.stripe.com/v1/invoices",headers:{Authorization:"Bearer "+t.auth.secret_text,"Content-Type":"application/x-www-form-urlencoded"},queryParams:{limit:"5"}});return j(e.body)||j(e.body.data)?[]:e.body.data},async run(t){let r=t.payload.body.data.object,{status:n,customer:o,subscription:a}=t.propsValue;return n&&r.status!==n?[]:o&&r.customer!==o?[]:a&&r.subscription!==a?[]:[r]}});var qh=Q({auth:A,name:"invoice_payment_failed",displayName:"Invoice Payment Failed",description:"Fires when a payment against an invoice fails.",aiMetadata:{description:"Fires when a payment against an invoice fails in Stripe (the invoice.payment_failed event), emitting the affected invoice including the finalization error. An optional customer ID filter narrows firing to one customer. Use to react to failed invoice payments, such as starting a dunning or retry flow."},props:{customer:T.ShortText({displayName:"Customer ID",description:"Only trigger for invoices belonging to this customer ID (e.g., `cus_...`).",required:!1})},sampleData:{id:"in_1MtHbELkdIwHu7ixl4OzzPMv",object:"invoice",customer:"cus_NeZwdNtLEOXuvB",status:"open",amount_due:1500,amount_paid:0,amount_remaining:1500,attempt_count:1,attempted:!0,billing_reason:"subscription_cycle",collection_method:"charge_automatically",created:1680644467,currency:"usd",customer_email:"jennyrosen@example.com",customer_name:"Jenny Rosen",hosted_invoice_url:"https://invoice.stripe.com/i/acct_...",last_finalization_error:{code:"card_declined",doc_url:"https://stripe.com/docs/error-codes/card-declined",message:"Your card was declined.",param:"",payment_intent:{id:"pi_123",object:"payment_intent"},type:"card_error"},livemode:!1,next_payment_attempt:1681251667},type:"WEBHOOK",async onEnable(t){let e=await I.subscribeWebhook("invoice.payment_failed",t.webhookUrl,t.auth.secret_text);await t.store.put("_invoice_payment_failed_trigger",{webhookId:e.id})},async onDisable(t){let e=await t.store.get("_invoice_payment_failed_trigger");e!=null&&await I.unsubscribeWebhook(e.webhookId,t.auth.secret_text)},async test(t){let e=await w.sendRequest({method:"GET",url:"https://api.stripe.com/v1/invoices",headers:{Authorization:"Bearer "+t.auth.secret_text,"Content-Type":"application/x-www-form-urlencoded"},queryParams:{status:"open",limit:"5"}});return j(e.body)||j(e.body.data)?[]:e.body.data},async run(t){let r=t.payload.body.data.object,{customer:n}=t.propsValue;return n&&r.customer!==n?[]:[r]}});var Vh=Q({auth:A,name:"canceled_subscription",displayName:"Canceled Subscription",description:"Fires when a subscription is canceled.",aiMetadata:{description:"Fires when a subscription is canceled in Stripe (the customer.subscription.deleted event), emitting the canceled subscription including any cancellation details. An optional customer ID filter narrows firing to one customer. Use to react to churn, such as revoking access or sending a win-back flow."},props:{customer:T.ShortText({displayName:"Customer ID",description:"Only trigger for subscriptions belonging to this customer ID (e.g., `cus_...`).",required:!1})},sampleData:{id:"sub_1MlPf9LkdIwHu7ixB6VIYRyX",object:"subscription",application:null,application_fee_percent:null,billing_cycle_anchor:1678768838,cancel_at_period_end:!1,canceled_at:1678768842,cancellation_details:{comment:"User requested cancellation via support.",feedback:"missing_features",reason:"cancellation_requested"},collection_method:"charge_automatically",created:1678768838,currency:"usd",customer:"cus_NWSaVkvdacCUi4",ended_at:1678768842,items:{object:"list",data:[{id:"si_NWSaWTp80M123q",object:"subscription_item",price:{id:"price_1MlPf7LkdIwHu7ixgcbP7cwE",object:"price",active:!0,currency:"usd",product:"prod_NWSaMgipulx8IQ",type:"recurring",unit_amount:1099},quantity:1}]},latest_invoice:"in_1MlPf9LkdIwHu7ixEo6hdgCw",livemode:!1,metadata:{},start_date:1678768838,status:"canceled"},type:"WEBHOOK",async onEnable(t){let e=await I.subscribeWebhook("customer.subscription.deleted",t.webhookUrl,t.auth.secret_text);await t.store.put("_canceled_subscription_trigger",{webhookId:e.id})},async onDisable(t){let e=await t.store.get("_canceled_subscription_trigger");e!=null&&await I.unsubscribeWebhook(e.webhookId,t.auth.secret_text)},async test(t){let e=await w.sendRequest({method:"GET",url:"https://api.stripe.com/v1/subscriptions",headers:{Authorization:"Bearer "+t.auth.secret_text,"Content-Type":"application/x-www-form-urlencoded"},queryParams:{status:"canceled",limit:"5"}});return j(e.body)||j(e.body.data)?[]:e.body.data},async run(t){let r=t.payload.body.data.object,{customer:n}=t.propsValue;return n&&r.customer!==n?[]:[r]}});var Zh=Q({auth:A,name:"new_refund",displayName:"New Refund",description:"Fires when a charge is refunded (full or partial).",aiMetadata:{description:"Fires when a refund is created in Stripe (the refund.created event), for a full or partial refund, emitting the refund record. Optional filters narrow firing to a specific charge ID or payment intent ID. Use to react to money returned to a customer, such as updating accounting or notifying them."},props:{charge:T.ShortText({displayName:"Charge ID",description:"Only trigger for refunds related to this Charge ID (e.g., `ch_...`).",required:!1}),payment_intent:T.ShortText({displayName:"Payment Intent ID",description:"Only trigger for refunds related to this Payment Intent ID (e.g., `pi_...`).",required:!1})},sampleData:{id:"re_1Nispe2eZvKYlo2Cd31jOCgZ",object:"refund",amount:1e3,balance_transaction:"txn_1Nispe2eZvKYlo2CYezqFhEx",charge:"ch_1NirD82eZvKYlo2CIvbtLWuY",created:1692942318,currency:"usd",metadata:{},payment_intent:"pi_1GszsK2eZvKYlo2CfhZyoZLp",reason:"requested_by_customer",receipt_number:null,status:"succeeded"},type:"WEBHOOK",async onEnable(t){let e=await I.subscribeWebhook("refund.created",t.webhookUrl,t.auth.secret_text);await t.store.put("_new_refund_trigger",{webhookId:e.id})},async onDisable(t){let e=await t.store.get("_new_refund_trigger");e!=null&&await I.unsubscribeWebhook(e.webhookId,t.auth.secret_text)},async test(t){let e=await w.sendRequest({method:"GET",url:"https://api.stripe.com/v1/refunds",headers:{Authorization:"Bearer "+t.auth.secret_text,"Content-Type":"application/x-www-form-urlencoded"},queryParams:{limit:"5"}});return j(e.body)||j(e.body.data)?[]:e.body.data},async run(t){let r=t.payload.body.data.object,{charge:n,payment_intent:o}=t.propsValue;return n&&r.charge!==n?[]:o&&r.payment_intent!==o?[]:[r]}});var Gh=Q({auth:A,name:"new_dispute",displayName:"New Dispute",description:"Fires when a customer disputes a charge.",aiMetadata:{description:"Fires when a customer disputes a charge in Stripe (the charge.dispute.created event), emitting the dispute including its reason and evidence due date. Optional filters narrow firing to a specific charge ID or payment intent ID. Use to react to chargebacks, such as alerting a team or gathering evidence."},props:{charge:T.ShortText({displayName:"Charge ID",description:"Only trigger for disputes related to this Charge ID (e.g., `ch_...`).",required:!1}),payment_intent:T.ShortText({displayName:"Payment Intent ID",description:"Only trigger for disputes related to this Payment Intent ID (e.g., `pi_...`).",required:!1})},sampleData:{id:"du_1MtJUT2eZvKYlo2CNaw2HvEv",object:"dispute",amount:1e3,balance_transactions:[],charge:"ch_1AZtxr2eZvKYlo2CJDX8whov",created:1680651737,currency:"usd",evidence_details:{due_by:1682294399,has_evidence:!1,past_due:!1,submission_count:0},is_charge_refundable:!0,livemode:!1,metadata:{},payment_intent:"pi_1AZtxr2eZvKYlo2CJDX8whov",reason:"general",status:"needs_response"},type:"WEBHOOK",async onEnable(t){let e=await I.subscribeWebhook("charge.dispute.created",t.webhookUrl,t.auth.secret_text);await t.store.put("_new_dispute_trigger",{webhookId:e.id})},async onDisable(t){let e=await t.store.get("_new_dispute_trigger");e!=null&&await I.unsubscribeWebhook(e.webhookId,t.auth.secret_text)},async test(t){let e=await w.sendRequest({method:"GET",url:"https://api.stripe.com/v1/issuing/disputes",headers:{Authorization:"Bearer "+t.auth.secret_text,"Content-Type":"application/x-www-form-urlencoded"},queryParams:{status:"submitted",limit:"5"}});return j(e.body)||j(e.body.data)?[]:e.body.data},async run(t){let r=t.payload.body.data.object,{charge:n,payment_intent:o}=t.propsValue;return n&&r.charge!==n?[]:o&&r.payment_intent!==o?[]:[r]}});var Hh=Q({auth:A,name:"new_payment_link",displayName:"New Payment Link",description:"Fires when a new Payment Link is created.",aiMetadata:{description:"Fires when a new payment link is created in Stripe (the payment_link.created event), emitting the new payment link including its shareable URL. Use to react to payment-link creation, such as distributing the URL or logging it."},props:{},sampleData:{id:"plink_1MoC3ULkdIwHu7ixZjtGpVl2",object:"payment_link",active:!0,after_completion:{hosted_confirmation:{custom_message:null},type:"hosted_confirmation"},allow_promotion_codes:!1,currency:"usd",customer_creation:"if_required",livemode:!1,metadata:{},payment_method_collection:"always",url:"https://buy.stripe.com/test_cN25nr0iZ7bUa7meUY"},type:"WEBHOOK",async onEnable(t){let e=await I.subscribeWebhook("payment_link.created",t.webhookUrl,t.auth.secret_text);await t.store.put("_new_payment_link_trigger",{webhookId:e.id})},async onDisable(t){let e=await t.store.get("_new_payment_link_trigger");e!=null&&await I.unsubscribeWebhook(e.webhookId,t.auth.secret_text)},async test(t){let e=await w.sendRequest({method:"GET",url:"https://api.stripe.com/v1/payment_links",headers:{Authorization:"Bearer "+t.auth.secret_text,"Content-Type":"application/x-www-form-urlencoded"},queryParams:{limit:"5"}});return j(e.body)||j(e.body.data)?[]:e.body.data},async run(t){return[t.payload.body.data.object]}});var Wh=Q({auth:A,name:"updated_subscription",displayName:"Updated Subscription",description:"Fires when an existing subscription is changed.",aiMetadata:{description:"Fires when an existing subscription is updated in Stripe (the customer.subscription.updated event), emitting the changed subscription. Optional filters narrow firing to a target new status or a specific customer ID. Use to react to plan changes, status transitions, or quantity updates."},props:{status:T.StaticDropdown({displayName:"New Status",description:"Only trigger when the subscription is updated to this status.",required:!1,options:{options:[{label:"Incomplete",value:"incomplete"},{label:"Incomplete - Expired",value:"incomplete_expired"},{label:"Trialing",value:"trialing"},{label:"Active",value:"active"},{label:"Past Due",value:"past_due"},{label:"Canceled",value:"canceled"},{label:"Unpaid",value:"unpaid"},{label:"Paused",value:"paused"}]}}),customer:T.ShortText({displayName:"Customer ID",description:"Only trigger for subscriptions belonging to this customer ID (e.g., `cus_...`).",required:!1})},sampleData:{id:"sub_1MowQVLkdIwHu7ixeRlqHVzs",object:"subscription",application:null,application_fee_percent:null,automatic_tax:{enabled:!1},billing_cycle_anchor:1679609767,cancel_at_period_end:!1,canceled_at:null,collection_method:"charge_automatically",created:1679609767,currency:"usd",customer:"cus_Na6dX7aXxi11N4",items:{object:"list",data:[{id:"si_Na6dzxczY5fwHx",object:"subscription_item",price:{id:"price_1MowQULkdIwHu7ixraBm864M",object:"price",product:"prod_Na6dGcTsmU0I4R",unit_amount:2e3},quantity:1}]},latest_invoice:"in_1MowQWLkdIwHu7ixuzkSPfKd",livemode:!1,metadata:{plan:"premium"},start_date:1679609767,status:"active"},type:"WEBHOOK",async onEnable(t){let e=await I.subscribeWebhook("customer.subscription.updated",t.webhookUrl,t.auth.secret_text);await t.store.put("_updated_subscription_trigger",{webhookId:e.id})},async onDisable(t){let e=await t.store.get("_updated_subscription_trigger");e!=null&&await I.unsubscribeWebhook(e.webhookId,t.auth.secret_text)},async test(t){let e=await w.sendRequest({method:"GET",url:"https://api.stripe.com/v1/subscriptions",headers:{Authorization:"Bearer "+t.auth.secret_text,"Content-Type":"application/x-www-form-urlencoded"},queryParams:{status:"incomplete",limit:"5"}});return j(e.body)||j(e.body.data)?[]:e.body.data},async run(t){let r=t.payload.body.data.object,{status:n,customer:o}=t.propsValue;return n&&r.status!==n?[]:o&&r.customer!==o?[]:[r]}});var Kh=Q({auth:A,name:"checkout_session_completed",displayName:"Checkout Session Completed",description:"Fires when a Stripe Checkout Session is successfully completed.",aiMetadata:{description:"Fires when a Stripe Checkout Session is successfully completed (the checkout.session.completed event), emitting the completed session including customer and payment details. An optional customer ID filter narrows firing to one customer. Use to react to a completed hosted checkout, such as fulfilling an order or granting access."},props:{customer:T.ShortText({displayName:"Customer ID",description:"Only trigger for checkout sessions created by this customer ID (e.g., `cus_...`).",required:!1})},sampleData:{id:"cs_test_a11YYufWQzNY63zpQ6QSNRQhkUpVph4WRmzW0zWJO2znZKdVujZ0N0S22u",object:"checkout.session",amount_subtotal:2198,amount_total:2198,created:1679600215,currency:"usd",customer:"cus_NWSaVkvdacCUi4",customer_details:{email:"jenny.rosen@example.com",name:"Jenny Rosen",phone:null},livemode:!1,mode:"payment",payment_intent:"pi_12345ABC",payment_status:"paid",status:"complete",success_url:"https://example.com/success",url:null},type:"WEBHOOK",async onEnable(t){let e=await I.subscribeWebhook("checkout.session.completed",t.webhookUrl,t.auth.secret_text);await t.store.put("_checkout_session_completed_trigger",{webhookId:e.id})},async onDisable(t){let e=await t.store.get("_checkout_session_completed_trigger");e!=null&&await I.unsubscribeWebhook(e.webhookId,t.auth.secret_text)},async test(t){let e=await w.sendRequest({method:"GET",url:"https://api.stripe.com/v1/checkout/sessions",headers:{Authorization:"Bearer "+t.auth.secret_text,"Content-Type":"application/x-www-form-urlencoded"},queryParams:{status:"complete",limit:"5"}});return j(e.body)||j(e.body.data)?[]:e.body.data},async run(t){let r=t.payload.body.data.object,{customer:n}=t.propsValue;return n&&r.customer!==n?[]:[r]}});var Jh=Z({name:"update_customer",auth:A,displayName:"Update Customer",description:"Modify an existing customer\u2019s details.",audience:"both",aiMetadata:{description:"Updates fields on an existing Stripe customer (email, name, description, phone, address); only the fields you provide are changed. Use to correct or enrich a customer record identified by its customer ID. Idempotent in effect: repeating the same update yields the same final state.",idempotent:!0},props:{customer:I.customer,email:T.ShortText({displayName:"Email",required:!1}),name:T.ShortText({displayName:"Name",required:!1}),description:T.LongText({displayName:"Description",required:!1}),phone:T.ShortText({displayName:"Phone",required:!1}),line1:T.ShortText({displayName:"Address Line 1",required:!1}),postal_code:T.ShortText({displayName:"Postal Code",required:!1}),city:T.ShortText({displayName:"City",required:!1}),state:T.ShortText({displayName:"State",required:!1}),country:T.ShortText({displayName:"Country",required:!1})},async run(t){let{customer:e,...r}=t.propsValue,n={};r.name&&(n.name=r.name),r.email&&(n.email=r.email),r.description&&(n.description=r.description),r.phone&&(n.phone=r.phone);let o={};return r.line1&&(o.line1=r.line1),r.city&&(o.city=r.city),r.state&&(o.state=r.state),r.postal_code&&(o.postal_code=r.postal_code),r.country&&(o.country=r.country),Object.keys(o).length>0&&(n.address=o),(await w.sendRequest({method:"POST",url:`https://api.stripe.com/v1/customers/${e}`,authentication:{type:"BEARER_TOKEN",token:t.auth.secret_text},headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n})).body}});var Xh=Z({name:"create_payment_intent",auth:A,displayName:"Create Payment (Payment Intent)",description:"Creates a new payment intent to start a payment flow.",audience:"both",aiMetadata:{description:"Creates a Stripe PaymentIntent for a given amount and currency to begin collecting a payment, optionally tied to a customer. Can run in two modes: leave it unconfirmed to obtain a client secret for client-side completion, or set confirm to immediately charge a supplied payment method (which then also requires a return URL). Not idempotent: each call starts a separate payment.",idempotent:!1},props:{amount:T.Number({displayName:"Amount",description:"The amount to charge, in a decimal format (e.g., 10.50 for $10.50).",required:!0}),currency:T.StaticDropdown({displayName:"Currency",description:"The three-letter ISO code for the currency.",required:!0,options:{options:[{label:"US Dollar",value:"usd"},{label:"Euro",value:"eur"},{label:"Pound Sterling",value:"gbp"},{label:"Australian Dollar",value:"aud"},{label:"Canadian Dollar",value:"cad"},{label:"Swiss Franc",value:"chf"},{label:"Chinese Yuan",value:"cny"},{label:"Japanese Yen",value:"jpy"},{label:"Indian Rupee",value:"inr"},{label:"Singapore Dollar",value:"sgd"}]}}),customer:I.customer,payment_method:T.ShortText({displayName:"Payment Method ID",description:"The ID of the Payment Method to attach (e.g., `pm_...`). Required if you want to confirm the payment immediately.",required:!1}),confirm:T.Checkbox({displayName:"Confirm Payment Immediately",description:"If true, Stripe will attempt to charge the provided payment method. A `Payment Method ID` is required.",required:!1,defaultValue:!1}),return_url:T.ShortText({displayName:"Return URL",description:"The URL to redirect your customer back to after they authenticate their payment. Required when confirming the payment.",required:!1}),description:T.LongText({displayName:"Description",required:!1}),receipt_email:T.ShortText({displayName:"Receipt Email",description:"The email address to send a receipt to. This will override the customer's email address.",required:!1})},async run(t){let{amount:e,currency:r,customer:n,payment_method:o,confirm:a,return_url:u,description:p,receipt_email:d}=t.propsValue;if(a&&!o)throw new Error("A Payment Method ID is required when 'Confirm Payment' is set to true.");if(a&&!u)throw new Error("A Return URL is required when 'Confirm Payment' is set to true.");let m={amount:Math.round(e*100),currency:r};return n&&(m.customer=n),o&&(m.payment_method=o),a&&(m.confirm=a),u&&(m.return_url=u),p&&(m.description=p),d&&(m.receipt_email=d),(await w.sendRequest({method:"POST",url:`${I.baseUrl}/payment_intents`,authentication:{type:"BEARER_TOKEN",token:t.auth.secret_text},headers:{"Content-Type":"application/x-www-form-urlencoded"},body:m})).body}});var Yh=Z({name:"create_product",auth:A,displayName:"Create Product",description:"Create a new product object in Stripe.",audience:"both",aiMetadata:{description:"Creates a new product object in Stripe (the catalog item that prices attach to), with optional description, images, URL, and metadata. Use before creating a price or when adding a sellable item. Not idempotent: each call creates a distinct product.",idempotent:!1},props:{name:T.ShortText({displayName:"Product Name",description:"The product\u2019s name, meant to be displayable to the customer.",required:!0}),description:T.LongText({displayName:"Description",description:"The product\u2019s description, meant to be displayable to the customer.",required:!1}),active:T.Checkbox({displayName:"Active",description:"Whether the product is currently available for purchase. Defaults to true.",required:!1}),images:T.Array({displayName:"Image URLs",description:"A list of up to 8 URLs of images for this product.",required:!1}),url:T.ShortText({displayName:"Product URL",description:"A publicly-accessible online page for this product.",required:!1}),metadata:T.Json({displayName:"Metadata",description:"A set of key-value pairs to store additional information about the product.",required:!1})},async run(t){let{name:e,description:r,active:n,images:o,url:a,metadata:u}=t.propsValue,p={name:e};return r&&(p.description=r),n!==void 0&&(p.active=n),a&&(p.url=a),o&&Array.isArray(o)&&o.forEach((g,m)=>{p[`images[${m}]`]=g}),u&&typeof u=="object"&&Object.keys(u).forEach(g=>{p[`metadata[${g}]`]=u[g]}),(await w.sendRequest({method:"POST",url:`${I.baseUrl}/products`,authentication:{type:"BEARER_TOKEN",token:t.auth.secret_text},headers:{"Content-Type":"application/x-www-form-urlencoded"},body:p})).body}});var Qh=Z({name:"create_price",auth:A,displayName:"Create Price",description:"Create a price (one-time or recurring), associated with a product.",audience:"both",aiMetadata:{description:"Creates a price for an existing Stripe product, in either one-time or recurring mode depending on the selected billing interval. Use after creating a product to define what to charge before building a subscription or payment link. Requires the product ID; not idempotent, as each call creates a new price.",idempotent:!1},props:{product:I.product,unit_amount:T.Number({displayName:"Unit Amount",description:"The price amount as a decimal, for example, 25.50 for $25.50.",required:!0}),currency:T.StaticDropdown({displayName:"Currency",description:"The three-letter ISO code for the currency.",required:!0,options:{options:[{label:"US Dollar",value:"usd"},{label:"Euro",value:"eur"},{label:"Pound Sterling",value:"gbp"},{label:"Indian Rupee",value:"inr"},{label:"Australian Dollar",value:"aud"},{label:"Canadian Dollar",value:"cad"},{label:"Swiss Franc",value:"chf"},{label:"Chinese Yuan",value:"cny"},{label:"Japanese Yen",value:"jpy"},{label:"Singapore Dollar",value:"sgd"}]}}),recurring_interval:T.StaticDropdown({displayName:"Billing Interval",description:"Specify the billing frequency. Select 'One-Time' for a single, non-recurring payment.",required:!0,defaultValue:"one_time",options:{options:[{label:"One-Time",value:"one_time"},{label:"Daily",value:"day"},{label:"Weekly",value:"week"},{label:"Monthly",value:"month"},{label:"Yearly",value:"year"}]}}),recurring_interval_count:T.Number({displayName:"Interval Count",description:"The number of intervals between subscription billings (e.g., for billing every 3 months, set Interval to Monthly and Interval Count to 3). Only used for recurring prices.",required:!1})},async run(t){let{product:e,unit_amount:r,currency:n,recurring_interval:o,recurring_interval_count:a}=t.propsValue,u=Math.round(r*100),p={product:e,unit_amount:u,currency:n};return o!=="one_time"&&(p["recurring[interval]"]=o,a&&(p["recurring[interval_count]"]=a)),(await w.sendRequest({method:"POST",url:`${I.baseUrl}/prices`,authentication:{type:"BEARER_TOKEN",token:t.auth.secret_text},headers:{"Content-Type":"application/x-www-form-urlencoded"},body:p})).body}});var eg=Z({name:"create_subscription",auth:A,displayName:"Create Subscription",description:"Start a subscription for a customer with specified items/prices.",audience:"both",aiMetadata:{description:"Starts a recurring subscription for an existing customer against one or more price IDs, with optional collection method, trial period, and default payment method. Use to enroll a customer in recurring billing. Requires a customer ID and at least one price; not idempotent, as each call creates a separate subscription.",idempotent:!1},props:{customer:I.customer,items:T.Array({displayName:"Subscription Items",description:"A list of prices to subscribe the customer to.",required:!0,properties:{price:T.ShortText({displayName:"Price ID",description:"The ID of the price object (e.g., price_...). You can find this in your Stripe Dashboard under Products.",required:!0}),quantity:T.Number({displayName:"Quantity",description:"The number of units of this price to subscribe to. Defaults to 1.",required:!1})}}),collection_method:T.StaticDropdown({displayName:"Collection Method",description:"How to collect payment. 'charge_automatically' will try to bill the default payment method. 'send_invoice' will email an invoice.",required:!1,options:{options:[{label:"Charge Automatically",value:"charge_automatically"},{label:"Send Invoice",value:"send_invoice"}]}}),days_until_due:T.Number({displayName:"Days Until Due",description:"Number of days before an invoice is due. Required if Collection Method is 'Send Invoice'.",required:!1}),trial_period_days:T.Number({displayName:"Trial Period (Days)",description:"Integer representing the number of trial days the customer receives before the subscription bills for the first time.",required:!1}),default_payment_method:T.ShortText({displayName:"Default Payment Method ID",description:"ID of the default payment method for the subscription (e.g., `pm_...`).",required:!1}),metadata:T.Json({displayName:"Metadata",required:!1})},async run(t){let{customer:e,items:r,collection_method:n,days_until_due:o,trial_period_days:a,default_payment_method:u,metadata:p}=t.propsValue,d={customer:e,collection_method:n,days_until_due:o,trial_period_days:a,default_payment_method:u,metadata:p};return Object.keys(d).forEach(m=>{(d[m]===void 0||d[m]===null)&&delete d[m]}),r&&Array.isArray(r)&&r.forEach((m,v)=>{let h=m;d[`items[${v}][price]`]=h.price,h.quantity&&(d[`items[${v}][quantity]`]=h.quantity)}),(await w.sendRequest({method:"POST",url:`${I.baseUrl}/subscriptions`,authentication:{type:"BEARER_TOKEN",token:t.auth.secret_text},headers:{"Content-Type":"application/x-www-form-urlencoded"},body:d})).body}});var tg=Z({name:"cancel_subscription",auth:A,displayName:"Cancel Subscription",description:"Cancel an existing subscription, either immediately or at the end of the current billing period.",audience:"both",aiMetadata:{description:"Cancels an existing Stripe subscription by its ID, in one of two modes: immediately, or scheduled to end at the close of the current billing period. Use to stop recurring billing for a customer. Effectively idempotent: re-running on an already-canceled subscription leaves it canceled.",idempotent:!0},props:{subscription:I.subscription,cancel_at_period_end:T.Checkbox({displayName:"Cancel at Period End",description:"If true, the subscription remains active until the end of the current billing period. If false, it cancels immediately.",required:!1,defaultValue:!1})},async run(t){let{subscription:e,cancel_at_period_end:r}=t.propsValue,n=tt(t.auth.secret_text);return r?await n.subscriptions.update(e,{cancel_at_period_end:!0}):await n.subscriptions.cancel(e)}});var rg=Z({name:"retrieve_invoice",auth:A,displayName:"Retrieve an Invoice",description:"Retrieves the details of an existing invoice by its ID.",audience:"both",aiMetadata:{description:"Fetches the full details of a single Stripe invoice by its invoice ID (e.g., in_...). Use when you have the exact invoice ID and need its current status, amounts, or hosted/PDF links. Read-only and idempotent.",idempotent:!0},props:{invoice_id:I.invoice},async run(t){let{invoice_id:e}=t.propsValue;return(await w.sendRequest({method:"GET",url:`${I.baseUrl}/invoices/${e}`,authentication:{type:"BEARER_TOKEN",token:t.auth.secret_text}})).body}});var ng=Z({name:"retrieve_payout",auth:A,displayName:"Retrieve a Payout",description:"Retrieves the details of an existing payout by its ID.",audience:"both",aiMetadata:{description:"Fetches the full details of a single Stripe payout (funds sent to your bank account) by its payout ID (e.g., po_...). Use to check a payout's status, amount, or arrival date. Read-only and idempotent.",idempotent:!0},props:{payout_id:I.payout},async run(t){let{payout_id:e}=t.propsValue;return(await w.sendRequest({method:"GET",url:`${I.baseUrl}/payouts/${e}`,authentication:{type:"BEARER_TOKEN",token:t.auth.secret_text}})).body}});var og=Z({name:"create_refund",auth:A,displayName:"Create a Refund",description:"Create a full or partial refund for a payment.",audience:"both",aiMetadata:{description:"Issues a refund against a payment identified by its PaymentIntent ID; refunds the full amount by default, or a partial amount if one is given, with an optional reason. Use to return funds to a customer for a captured payment. Not idempotent: each call creates a new refund and moves money again.",idempotent:!1},props:{payment_intent:I.paymentIntent,amount:T.Number({displayName:"Amount",description:"The amount to refund (e.g., 12.99). If left blank, a full refund will be issued.",required:!1}),reason:T.StaticDropdown({displayName:"Reason",description:"An optional reason for the refund.",required:!1,options:{options:[{label:"Duplicate",value:"duplicate"},{label:"Fraudulent",value:"fraudulent"},{label:"Requested by Customer",value:"requested_by_customer"}]}}),metadata:T.Json({displayName:"Metadata",description:"A set of key-value pairs to store additional information about the refund.",required:!1})},async run(t){let{payment_intent:e,amount:r,reason:n,metadata:o}=t.propsValue,a={payment_intent:e};return r!=null&&(a.amount=Math.round(r*100)),n&&(a.reason=n),o&&typeof o=="object"&&Object.keys(o).forEach(p=>{a[`metadata[${p}]`]=o[p]}),(await w.sendRequest({method:"POST",url:`${I.baseUrl}/refunds`,authentication:{type:"BEARER_TOKEN",token:t.auth.secret_text},headers:{"Content-Type":"application/x-www-form-urlencoded"},body:a})).body}});var ig=Z({name:"create_payment_link",auth:A,displayName:"Create Payment Link",description:"Creates a shareable, Stripe-hosted payment link for one-time purchases or subscriptions.",audience:"both",aiMetadata:{description:"Creates a reusable, Stripe-hosted payment link for the given line items (price IDs and quantities), with optional after-completion redirect, promotion codes, and billing-address collection. Use to generate a shareable checkout URL without building a custom flow. Not idempotent: each call creates a new payment link.",idempotent:!1},props:{line_items:T.Array({displayName:"Line Items",description:"The products and quantities to include in the payment link.",required:!0,properties:{price:T.ShortText({displayName:"Price ID",description:"The ID of the price object (e.g., price_1J2X3Y4Z...). Find this in your Stripe Dashboard under Products.",required:!0}),quantity:T.Number({displayName:"Quantity",required:!0})}}),after_completion_type:T.StaticDropdown({displayName:"After Completion Behavior",description:"Controls the behavior after the purchase is complete. Defaults to showing Stripe's hosted confirmation page.",required:!1,options:{options:[{label:"Show Confirmation Page",value:"hosted_confirmation"},{label:"Redirect to URL",value:"redirect"}]}}),after_completion_redirect_url:T.ShortText({displayName:"Redirect URL",description:'The URL to redirect the customer to after a successful purchase. Only used if the behavior is set to "Redirect to URL".',required:!1}),allow_promotion_codes:T.Checkbox({displayName:"Allow Promotion Codes",description:"Enables the user to enter a promotion code on the Payment Link page.",required:!1}),billing_address_collection:T.StaticDropdown({displayName:"Billing Address Collection",description:"Describes whether Checkout should collect the customer\u2019s billing address.",required:!1,options:{options:[{label:"Auto",value:"auto"},{label:"Required",value:"required"}]}}),metadata:T.Json({displayName:"Metadata",required:!1})},async run(t){let e=tt(t.auth.secret_text),r=t.propsValue,n={line_items:r.line_items,allow_promotion_codes:r.allow_promotion_codes,billing_address_collection:r.billing_address_collection,metadata:r.metadata};return r.after_completion_type&&(n.after_completion={type:r.after_completion_type},r.after_completion_type==="redirect"&&r.after_completion_redirect_url&&(n.after_completion.redirect={url:r.after_completion_redirect_url})),await e.paymentLinks.create(n)}});var ag=Z({name:"deactivate_payment_link",auth:A,displayName:"Deactivate Payment Link",description:"Disable or deactivate a Payment Link so it can no longer be used.",audience:"both",aiMetadata:{description:"Deactivates an existing Stripe payment link by its ID so it can no longer accept payments. Use to retire a shared checkout URL. Idempotent in effect: re-running on an already-inactive link leaves it inactive.",idempotent:!0},props:{payment_link_id:I.paymentLink},async run(t){let{payment_link_id:e}=t.propsValue;return await tt(t.auth.secret_text).paymentLinks.update(e,{active:!1})}});var sg=Z({name:"retrieve_payment_intent",auth:A,displayName:"Find Payment (by Payment Intent ID)",description:"Retrieves the details of a payment by its unique Payment Intent ID.",audience:"both",aiMetadata:{description:"Fetches the full details of a single payment by its PaymentIntent ID (e.g., pi_...). Use when you have the exact ID and need the payment's current status, amount, or associated charge. Read-only and idempotent.",idempotent:!0},props:{payment_intent_id:I.paymentIntent},async run(t){let{payment_intent_id:e}=t.propsValue;return(await w.sendRequest({method:"GET",url:`${I.baseUrl}/payment_intents/${e}`,authentication:{type:"BEARER_TOKEN",token:t.auth.secret_text}})).body}});var ug=Z({name:"find_invoice",auth:A,displayName:"Find Invoice",description:"Finds an invoice by its unique ID.",audience:"both",aiMetadata:{description:"Fetches a single Stripe invoice by its unique invoice ID (e.g., in_...). Use when you already have the exact invoice ID and need its current details. Read-only and idempotent.",idempotent:!0},props:{invoice_id:I.invoice},async run(t){let{invoice_id:e}=t.propsValue;return(await w.sendRequest({method:"GET",url:`${I.baseUrl}/invoices/${e}`,authentication:{type:"BEARER_TOKEN",token:t.auth.secret_text}})).body}});var A=Ci.SecretText({displayName:"Secret API Key",required:!0,description:"Secret key acquired from your Stripe dashboard",validate:i(async({auth:t})=>{try{return await w.sendRequest({method:"GET",url:"https://api.stripe.com/v1/customers",headers:{Authorization:`Bearer ${t}`}}),{valid:!0}}catch{return{valid:!1,error:"Invalid API Key. Please check the key and try again."}}},"validate")}),PT=sc({displayName:"Stripe",description:"Online payment processing for internet businesses",minimumSupportedRelease:"0.30.0",logoUrl:"https://cdn.activepieces.com/pieces/stripe.png",authors:["lldiegon","doskyft","kishanprmr","MoShizzle","AbdulTheActivePiecer","khaledmashaly","abuaboud","Prabhukiran161","sanket-a11y"],categories:["COMMERCE","PAYMENT_PROCESSING"],auth:A,actions:[Pp,xp,Dh,jh,bp,Jh,Xh,Yh,Qh,eg,tg,rg,ng,og,ig,ag,sg,ug,_p({baseUrl:i(()=>"https://api.stripe.com/v1","baseUrl"),auth:A,authMapping:i(async t=>({Authorization:`Bearer ${t.secret_text}`}),"authMapping")})],triggers:[Mh,Nh,Lh,Uh,Fh,Bh,qh,Vh,Zh,Gh,Hh,Wh,Kh]});0&&(module.exports={stripe,stripeAuth});
|
|
17
|
+
/*! Bundled license information:
|
|
18
|
+
|
|
19
|
+
mime-types/index.js:
|
|
20
|
+
(*!
|
|
21
|
+
* mime-types
|
|
22
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
23
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
24
|
+
* MIT Licensed
|
|
25
|
+
*)
|
|
26
|
+
*/
|