Files
Shifted/.next/server/chunks/9777.js
2026-02-10 01:14:19 +00:00

1 line
89 KiB
JavaScript

"use strict";exports.id=9777,exports.ids=[9777],exports.modules={89777:(e,t,r)=>{r.d(t,{Z:()=>ie});var s={};r.r(s),r.d(s,{StripeAPIError:()=>K,StripeAuthenticationError:()=>W,StripeCardError:()=>B,StripeConnectionError:()=>Y,StripeError:()=>$,StripeIdempotencyError:()=>Z,StripeInvalidGrantError:()=>ee,StripeInvalidRequestError:()=>V,StripePermissionError:()=>J,StripeRateLimitError:()=>X,StripeSignatureVerificationError:()=>Q,StripeUnknownError:()=>et,TemporarySessionExpiredError:()=>er,generateV1Error:()=>F,generateV2Error:()=>z});var o={};r.r(o),r.d(o,{Account:()=>r2,AccountLinks:()=>r5,AccountSessions:()=>r6,Accounts:()=>r2,ApplePayDomains:()=>r3,ApplicationFees:()=>se,Apps:()=>oH,Balance:()=>sr,BalanceSettings:()=>so,BalanceTransactions:()=>sn,Billing:()=>oF,BillingPortal:()=>oz,Charges:()=>sl,Checkout:()=>o$,Climate:()=>oB,ConfirmationTokens:()=>su,CountrySpecs:()=>sc,Coupons:()=>sp,CreditNotes:()=>sP,CustomerSessions:()=>sT,Customers:()=>sy,Disputes:()=>sE,Entitlements:()=>oV,EphemeralKeys:()=>sO,Events:()=>sx,ExchangeRates:()=>sG,FileLinks:()=>sA,Files:()=>sI,FinancialConnections:()=>oK,Forwarding:()=>oW,Identity:()=>oJ,InvoiceItems:()=>sD,InvoicePayments:()=>sj,InvoiceRenderingTemplates:()=>sM,Invoices:()=>sH,Issuing:()=>oX,Mandates:()=>sz,OAuth:()=>sV,PaymentAttemptRecords:()=>sW,PaymentIntents:()=>sX,PaymentLinks:()=>sQ,PaymentMethodConfigurations:()=>s1,PaymentMethodDomains:()=>s2,PaymentMethods:()=>s5,PaymentRecords:()=>s6,Payouts:()=>s3,Plans:()=>oe,Prices:()=>or,Products:()=>oo,PromotionCodes:()=>on,Quotes:()=>ol,Radar:()=>oY,Refunds:()=>ou,Reporting:()=>oQ,Reviews:()=>oc,SetupAttempts:()=>op,SetupIntents:()=>oP,ShippingRates:()=>oT,Sigma:()=>oZ,Sources:()=>oy,SubscriptionItems:()=>oE,SubscriptionSchedules:()=>oO,Subscriptions:()=>ox,Tax:()=>o1,TaxCodes:()=>oG,TaxIds:()=>oA,TaxRates:()=>ok,Terminal:()=>o0,TestHelpers:()=>o2,Tokens:()=>oq,Topups:()=>oN,Transfers:()=>oU,Treasury:()=>o8,V2:()=>o5,WebhookEndpoints:()=>oL});var i=r(84770),n=r(17702);class a{computeHMACSignature(e,t){throw Error("computeHMACSignature not implemented.")}computeHMACSignatureAsync(e,t){throw Error("computeHMACSignatureAsync not implemented.")}computeSHA256Async(e){throw Error("computeSHA256 not implemented.")}}class l extends Error{}class h extends a{computeHMACSignature(e,t){return i.createHmac("sha256",t).update(e,"utf8").digest("hex")}async computeHMACSignatureAsync(e,t){return await this.computeHMACSignature(e,t)}async computeSHA256Async(e){return new Uint8Array(await i.createHash("sha256").update(e).digest())}}var u=r(32615),d=r.t(u,2),c=r(35240),m=r.t(c,2);class p{getClientName(){throw Error("getClientName not implemented.")}makeRequest(e,t,r,s,o,i,n,a){throw Error("makeRequest not implemented.")}static makeTimeoutError(){let e=TypeError(p.TIMEOUT_ERROR_CODE);return e.code=p.TIMEOUT_ERROR_CODE,e}}p.CONNECTION_CLOSED_ERROR_CODES=["ECONNRESET","EPIPE"],p.TIMEOUT_ERROR_CODE="ETIMEDOUT";class f{constructor(e,t){this._statusCode=e,this._headers=t}getStatusCode(){return this._statusCode}getHeaders(){return this._headers}getRawResponse(){throw Error("getRawResponse not implemented.")}toStream(e){throw Error("toStream not implemented.")}toJSON(){throw Error("toJSON not implemented.")}}let P=u||d,v=c||m,T=new P.Agent({keepAlive:!0}),_=new v.Agent({keepAlive:!0});class y extends p{constructor(e){super(),this._agent=e}getClientName(){return"node"}makeRequest(e,t,r,s,o,i,n,a){let l="http"===n,h=this._agent;return h||(h=l?T:_),new Promise((n,u)=>{let d=(l?P:v).request({host:e,port:t,path:r,method:s,agent:h,headers:o,ciphers:"DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2:!MD5"});d.setTimeout(a,()=>{d.destroy(p.makeTimeoutError())}),d.on("response",e=>{n(new g(e))}),d.on("error",e=>{u(e)}),d.once("socket",e=>{e.connecting?e.once(l?"connect":"secureConnect",()=>{d.write(i),d.end()}):(d.write(i),d.end())})})}}class g extends f{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,t)=>{let r="";this._res.setEncoding("utf8"),this._res.on("data",e=>{r+=e}),this._res.once("end",()=>{try{e(JSON.parse(r))}catch(e){t(e)}})})}}let E=["apiKey","idempotencyKey","stripeAccount","apiVersion","maxNetworkRetries","timeout","host","authenticator","stripeContext","additionalHeaders","streaming"];function S(e){return e&&"object"==typeof e&&E.some(t=>Object.prototype.hasOwnProperty.call(e,t))}function O(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/\*/g,"%2A").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27").replace(/%5B/g,"[").replace(/%5D/g,"]")}function b(e){let t=[];if("object"==typeof e&&null!==e)for(let r of Object.keys(e))!function e(r,s){if(void 0!==s){if(null===s||"object"!=typeof s||s instanceof Date){t.push(O(r)+"="+O(s instanceof Date?Math.floor(s.getTime()/1e3).toString():null===s?"":String(s)));return}if(Array.isArray(s)){for(let t=0;t<s.length;t++)void 0!==s[t]&&e(r+"["+t+"]",s[t]);return}for(let t of Object.keys(s))e(r+"["+t+"]",s[t])}}(r,e[r]);return t.join("&")}let x=(()=>{let e={"\n":"\\n",'"':'\\"',"\u2028":"\\u2028","\u2029":"\\u2029"};return t=>{let r=t.replace(/["\n\r\u2028\u2029]/g,t=>e[t]);return e=>r.replace(/\{([\s\S]+?)\}/g,(t,r)=>{let s=e[r];return["number","string","boolean"].includes(typeof s)?encodeURIComponent(s):""})}})();function w(e){if(!Array.isArray(e)||!e[0]||"object"!=typeof e[0])return{};if(!S(e[0]))return e.shift();let t=Object.keys(e[0]),r=t.filter(e=>E.includes(e));return r.length>0&&r.length!==t.length&&R(`Options found in arguments (${r.join(", ")}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options.`),{}}function G(e){let t={host:null,headers:{},settings:{},streaming:!1};if(e.length>0){let r=e[e.length-1];if("string"==typeof r)t.authenticator=I(e.pop());else if(S(r)){let r=Object.assign({},e.pop()),s=Object.keys(r).filter(e=>!E.includes(e));if(s.length&&R(`Invalid options found (${s.join(", ")}); ignoring.`),r.apiKey&&(t.authenticator=I(r.apiKey)),r.idempotencyKey&&(t.headers["Idempotency-Key"]=r.idempotencyKey),r.stripeAccount&&(t.headers["Stripe-Account"]=r.stripeAccount),r.stripeContext){if(t.headers["Stripe-Account"])throw Error("Can't specify both stripeAccount and stripeContext.");t.headers["Stripe-Context"]=r.stripeContext}if(r.apiVersion&&(t.headers["Stripe-Version"]=r.apiVersion),Number.isInteger(r.maxNetworkRetries)&&(t.settings.maxNetworkRetries=r.maxNetworkRetries),Number.isInteger(r.timeout)&&(t.settings.timeout=r.timeout),r.host&&(t.host=r.host),r.authenticator){if(r.apiKey)throw Error("Can't specify both apiKey and authenticator.");if("function"!=typeof r.authenticator)throw Error("The authenticator must be a function receiving a request as the first parameter.");t.authenticator=r.authenticator}r.additionalHeaders&&(t.headers=r.additionalHeaders),r.streaming&&(t.streaming=!0)}}return t}function C(e){if("object"!=typeof e)throw Error("Argument must be an object");return Object.keys(e).reduce((t,r)=>(null!=e[r]&&(t[r]=e[r]),t),{})}function A(e,t){return t?e.then(e=>{setTimeout(()=>{t(null,e)},0)},e=>{setTimeout(()=>{t(e,null)},0)}):e}function R(e){return"function"!=typeof process.emitWarning?console.warn(`Stripe: ${e}`):process.emitWarning(e,"Stripe")}function k(e,t,r){if(!Number.isInteger(t)){if(void 0!==r)return r;throw Error(`${e} must be an integer`)}return t}function I(e){let t=t=>(t.headers.Authorization="Bearer "+e,Promise.resolve());return t._apiKey=e,t}function q(e,t){return this[e]instanceof Date?Math.floor(this[e].getTime()/1e3).toString():t}function D(e){return e&&e.startsWith("/v2")?"v2":"v1"}function N(e){return Array.isArray(e)?e.join(", "):String(e)}class j extends p{constructor(e){if(super(),!e){if(!globalThis.fetch)throw 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=j.makeFetchWithAbortTimeout(e):this._fetchFn=j.makeFetchWithRaceTimeout(e)}static makeFetchWithRaceTimeout(e){return(t,r,s)=>{let o;let i=new Promise((e,t)=>{o=setTimeout(()=>{o=null,t(p.makeTimeoutError())},s)});return Promise.race([e(t,r),i]).finally(()=>{o&&clearTimeout(o)})}}static makeFetchWithAbortTimeout(e){return async(t,r,s)=>{let o=new AbortController,i=setTimeout(()=>{i=null,o.abort(p.makeTimeoutError())},s);try{return await e(t,Object.assign(Object.assign({},r),{signal:o.signal}))}catch(e){if("AbortError"===e.name)throw p.makeTimeoutError();throw e}finally{i&&clearTimeout(i)}}}getClientName(){return"fetch"}async makeRequest(e,t,r,s,o,i,n,a){let l=new URL(r,`${"http"===n?"http":"https"}://${e}`);l.port=t;let h="POST"==s||"PUT"==s||"PATCH"==s;return new U(await this._fetchFn(l.toString(),{method:s,headers:Object.entries(o).map(([e,t])=>[e,N(t)]),body:i||(h?"":void 0)},a))}}class U extends f{constructor(e){super(e.status,U._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 t={};for(let r of e){if(!Array.isArray(r)||2!=r.length)throw 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.");t[r[0]]=r[1]}return t}}class M extends a{constructor(e){super(),this.subtleCrypto=e||crypto.subtle}computeHMACSignature(e,t){throw new l("SubtleCryptoProvider cannot be used in a synchronous context.")}async computeHMACSignatureAsync(e,t){let r=new TextEncoder,s=await this.subtleCrypto.importKey("raw",r.encode(t),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),o=new Uint8Array(await this.subtleCrypto.sign("hmac",s,r.encode(e))),i=Array(o.length);for(let e=0;e<o.length;e++)i[e]=L[o[e]];return i.join("")}async computeSHA256Async(e){return new Uint8Array(await this.subtleCrypto.digest("SHA-256",e))}}let L=Array(256);for(let e=0;e<L.length;e++)L[e]=e.toString(16).padStart(2,"0");class H{constructor(){this._fetchFn=null,this._agent=null}getUname(){throw Error("getUname not implemented.")}uuid4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}secureCompare(e,t){if(e.length!==t.length)return!1;let r=e.length,s=0;for(let o=0;o<r;++o)s|=e.charCodeAt(o)^t.charCodeAt(o);return 0===s}createEmitter(){throw Error("createEmitter not implemented.")}tryBufferData(e){throw Error("tryBufferData not implemented.")}createNodeHttpClient(e){throw Error("createNodeHttpClient not implemented.")}createFetchHttpClient(e){return new j(e)}createDefaultHttpClient(){throw Error("createDefaultHttpClient not implemented.")}createNodeCryptoProvider(){throw Error("createNodeCryptoProvider not implemented.")}createSubtleCryptoProvider(e){return new M(e)}createDefaultCryptoProvider(){throw Error("createDefaultCryptoProvider not implemented.")}}let F=e=>{switch(e.type){case"card_error":return new B(e);case"invalid_request_error":return new V(e);case"api_error":return new K(e);case"authentication_error":return new W(e);case"rate_limit_error":return new X(e);case"idempotency_error":return new Z(e);case"invalid_grant":return new ee(e);default:return new et(e)}},z=e=>"temporary_session_expired"===e.type?new er(e):"invalid_fields"===e.code?new V(e):F(e);class $ extends Error{constructor(e={},t=null){var r;super(e.message),this.type=t||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=null!==(r=e.message)&&void 0!==r?r:"",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}}$.generate=F;class B extends ${constructor(e={}){super(e,"StripeCardError")}}class V extends ${constructor(e={}){super(e,"StripeInvalidRequestError")}}class K extends ${constructor(e={}){super(e,"StripeAPIError")}}class W extends ${constructor(e={}){super(e,"StripeAuthenticationError")}}class J extends ${constructor(e={}){super(e,"StripePermissionError")}}class X extends ${constructor(e={}){super(e,"StripeRateLimitError")}}class Y extends ${constructor(e={}){super(e,"StripeConnectionError")}}class Q extends ${constructor(e,t,r={}){super(r,"StripeSignatureVerificationError"),this.header=e,this.payload=t}}class Z extends ${constructor(e={}){super(e,"StripeIdempotencyError")}}class ee extends ${constructor(e={}){super(e,"StripeInvalidGrantError")}}class et extends ${constructor(e={}){super(e,"StripeUnknownError")}}class er extends ${constructor(e={}){super(e,"TemporarySessionExpiredError")}}var es=r(61282);class eo extends ${}class ei extends H{constructor(){super(),this._exec=es.exec,this._UNAME_CACHE=null}uuid4(){return i.randomUUID?i.randomUUID():super.uuid4()}getUname(){return this._UNAME_CACHE||(this._UNAME_CACHE=new Promise((e,t)=>{try{this._exec("uname -a",(t,r)=>{if(t)return e(null);e(r)})}catch(t){e(null)}})),this._UNAME_CACHE}secureCompare(e,t){if(!e||!t)throw Error("secureCompare must receive two arguments");if(e.length!==t.length)return!1;if(i.timingSafeEqual){let r=new TextEncoder,s=r.encode(e),o=r.encode(t);return i.timingSafeEqual(s,o)}return super.secureCompare(e,t)}createEmitter(){return new n.EventEmitter}tryBufferData(e){if(!(e.file.data instanceof n.EventEmitter))return Promise.resolve(e);let t=[];return new Promise((r,s)=>{e.file.data.on("data",e=>{t.push(e)}).once("end",()=>{let s=Object.assign({},e);s.file.data=function(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),r=0;return e.forEach(e=>{t.set(e,r),r+=e.length}),t}(t),r(s)}).on("error",e=>{s(new eo({message:"An error occurred while attempting to process the file for upload.",detail:e}))})})}createNodeHttpClient(e){return new y(e)}createDefaultHttpClient(){return new y}createNodeCryptoProvider(){return new h}createDefaultCryptoProvider(){return this.createNodeCryptoProvider()}}class en{constructor(e,t){this._stripe=e,this._maxBufferedRequestMetric=t}_normalizeStripeContext(e,t){return e?e.toString()||null:(null==t?void 0:t.toString())||null}_addHeadersDirectlyToObject(e,t){e.requestId=t["request-id"],e.stripeAccount=e.stripeAccount||t["stripe-account"],e.apiVersion=e.apiVersion||t["stripe-version"],e.idempotencyKey=e.idempotencyKey||t["idempotency-key"]}_makeResponseEvent(e,t,r){let s=Date.now(),o=s-e.request_start_time;return C({api_version:r["stripe-version"],account:r["stripe-account"],idempotency_key:r["idempotency-key"],method:e.method,path:e.path,status:t,request_id:this._getRequestId(r),elapsed:o,request_start_time:e.request_start_time,request_end_time:s})}_getRequestId(e){return e["request-id"]}_streamingResponseHandler(e,t,r){return s=>{let o=s.getHeaders(),i=s.toStream(()=>{let r=this._makeResponseEvent(e,s.getStatusCode(),o);this._stripe._emitter.emit("response",r),this._recordRequestMetrics(this._getRequestId(o),r.elapsed,t)});return this._addHeadersDirectlyToObject(i,o),r(null,i)}}_jsonResponseHandler(e,t,r,s){return o=>{let i=o.getHeaders(),n=this._getRequestId(i),a=o.getStatusCode(),l=this._makeResponseEvent(e,a,i);this._stripe._emitter.emit("response",l),o.toJSON().then(e=>{if(e.error)throw"string"==typeof e.error&&(e.error={type:e.error,message:e.error_description}),e.error.headers=i,e.error.statusCode=a,e.error.requestId=n,401===a?new W(e.error):403===a?new J(e.error):429===a?new X(e.error):"v2"===t?z(e.error):F(e.error);return e},e=>{throw new K({message:"Invalid JSON received from the Stripe API",exception:e,requestId:i["request-id"]})}).then(e=>{this._recordRequestMetrics(n,l.elapsed,r);let t=o.getRawResponse();this._addHeadersDirectlyToObject(t,i),Object.defineProperty(e,"lastResponse",{enumerable:!1,writable:!1,value:t}),s(null,e)},e=>s(e,null))}}static _generateConnectionErrorMessage(e){return`An error occurred with our connection to Stripe.${e>0?` Request was retried ${e} times.`:""}`}static _shouldRetry(e,t,r,s){return!!(s&&0===t&&p.CONNECTION_CLOSED_ERROR_CODES.includes(s.code))||!(t>=r)&&(!e||"false"!==e.getHeaders()["stripe-should-retry"]&&!!("true"===e.getHeaders()["stripe-should-retry"]||409===e.getStatusCode()||e.getStatusCode()>=500))}_getSleepTimeInMS(e,t=null){let r=this._stripe.getInitialNetworkRetryDelay(),s=Math.min(r*Math.pow(2,e-1),this._stripe.getMaxNetworkRetryDelay());return s*=.5*(1+Math.random()),s=Math.max(r,s),Number.isInteger(t)&&t<=60&&(s=Math.max(s,t)),1e3*s}_getMaxNetworkRetries(e={}){return void 0!==e.maxNetworkRetries&&Number.isInteger(e.maxNetworkRetries)?e.maxNetworkRetries:this._stripe.getMaxNetworkRetries()}_defaultIdempotencyKey(e,t,r){let s=this._getMaxNetworkRetries(t),o=()=>`stripe-node-retry-${this._stripe._platformFunctions.uuid4()}`;if("v2"===r){if("POST"===e||"DELETE"===e)return o()}else if("v1"===r&&"POST"===e&&s>0)return o();return null}_makeHeaders({contentType:e,contentLength:t,apiVersion:r,clientUserAgent:s,method:o,userSuppliedHeaders:i,userSuppliedSettings:n,stripeAccount:a,stripeContext:l,apiMode:h}){let u={Accept:"application/json","Content-Type":e,"User-Agent":this._getUserAgentString(h),"X-Stripe-Client-User-Agent":s,"X-Stripe-Client-Telemetry":this._getTelemetryHeader(),"Stripe-Version":r,"Stripe-Account":a,"Stripe-Context":l,"Idempotency-Key":this._defaultIdempotencyKey(o,n,h)},d="POST"==o||"PUT"==o||"PATCH"==o;return(d||t)&&(d||R(`${o} method had non-zero contentLength but no payload is expected for this verb`),u["Content-Length"]=t),Object.assign(C(u),i&&"object"==typeof i?Object.keys(i).reduce((e,t)=>(e[t.split("-").map(e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()).join("-")]=i[t],e),{}):i)}_getUserAgentString(e){let t=this._stripe.getConstant("PACKAGE_VERSION"),r=this._stripe._appInfo?this._stripe.getAppInfoAsString():"";return`Stripe/${e} NodeBindings/${t} ${r}`.trim()}_getTelemetryHeader(){if(this._stripe.getTelemetryEnabled()&&this._stripe._prevRequestMetrics.length>0)return JSON.stringify({last_request_metrics:this._stripe._prevRequestMetrics.shift()})}_recordRequestMetrics(e,t,r){if(this._stripe.getTelemetryEnabled()&&e){if(this._stripe._prevRequestMetrics.length>this._maxBufferedRequestMetric)R("Request metrics buffer is full, dropping telemetry message.");else{let s={request_id:e,request_duration_ms:t};r&&r.length>0&&(s.usage=r),this._stripe._prevRequestMetrics.push(s)}}}_rawRequest(e,t,r,s,o){return new Promise((i,n)=>{let a;try{let i=e.toUpperCase();if("POST"!==i&&r&&0!==Object.keys(r).length)throw Error("rawRequest only supports params on POST requests. Please pass null and add your parameters to path.");let n=[].slice.call([r,s]),l=w(n),h="POST"===i?Object.assign({},l):null,u=G(n),d=u.headers,c=u.authenticator;a={requestMethod:i,requestPath:t,bodyData:h,queryData:{},authenticator:c,headers:d,host:u.host,streaming:!!u.streaming,settings:{},usage:o||["raw_request"]}}catch(e){n(e);return}let{headers:l,settings:h}=a,u=a.authenticator;this._request(a.requestMethod,a.host,t,a.bodyData,u,{headers:l,settings:h,streaming:a.streaming},a.usage,function(e,t){e?n(e):i(t)})})}_getContentLength(e){return"string"==typeof e?new TextEncoder().encode(e).length:e.length}_request(e,t,r,s,o,i,n=[],a,l=null){var h;let u;o=null!==(h=null!=o?o:this._stripe._authenticator)&&void 0!==h?h:null;let d=D(r),c=(e,t,r,s,o)=>setTimeout(e,this._getSleepTimeInMS(s,o),t,r,s+1),m=(s,l,h)=>{let f=i.settings&&i.settings.timeout&&Number.isInteger(i.settings.timeout)&&i.settings.timeout>=0?i.settings.timeout:this._stripe.getApiField("timeout"),P={host:t||this._stripe.getApiField("host"),port:this._stripe.getApiField("port"),path:r,method:e,headers:Object.assign({},l),body:u,protocol:this._stripe.getApiField("protocol")};o(P).then(()=>{let t=this._stripe.getApiField("httpClient").makeRequest(P.host,P.port,P.path,P.method,P.headers,P.body,P.protocol,f),o=Date.now(),u=C({api_version:s,account:N(l["Stripe-Account"]),idempotency_key:N(l["Idempotency-Key"]),method:e,path:r,request_start_time:o}),v=h||0,T=this._getMaxNetworkRetries(i.settings||{});this._stripe._emitter.emit("request",u),t.then(e=>{if(en._shouldRetry(e,v,T)){var t;return c(m,s,l,v,Number(Array.isArray(t=e.getHeaders()["retry-after"])?t[0]:t))}return i.streaming&&400>e.getStatusCode()?this._streamingResponseHandler(u,n,a)(e):this._jsonResponseHandler(u,d,n,a)(e)}).catch(e=>en._shouldRetry(null,v,T,e)?c(m,s,l,v,null):a(new Y({message:e.code&&e.code===p.TIMEOUT_ERROR_CODE?`Request aborted due to timeout being reached (${f}ms)`:en._generateConnectionErrorMessage(v),detail:e})))}).catch(e=>{throw new $({message:"Unable to authenticate the request",exception:e})})},f=(t,r)=>{if(t)return a(t);u=r,this._stripe.getClientUserAgent(t=>{var s,o,n;let a=this._stripe.getApiField("version"),l=this._makeHeaders({contentType:"v2"==d?"application/json":"application/x-www-form-urlencoded",contentLength:this._getContentLength(r),apiVersion:a,clientUserAgent:t,method:e,userSuppliedHeaders:null!==(s=i.headers)&&void 0!==s?s:null,userSuppliedSettings:null!==(o=i.settings)&&void 0!==o?o:{},stripeAccount:null!==(n=i.stripeAccount)&&void 0!==n?n:this._stripe.getApiField("stripeAccount"),stripeContext:this._normalizeStripeContext(i.stripeContext,this._stripe.getApiField("stripeContext")),apiMode:d});m(a,l,0)})};if(l)l(e,s,i.headers,f);else{let e;f(null,"v2"==d?s?JSON.stringify(s,q):"":b(s||{}))}}}class ea{constructor(e,t,r,s){this.index=0,this.pagePromise=e,this.promiseCache={currentPromise:null},this.requestArgs=t,this.spec=r,this.stripeResource=s}async iterate(e){if(!(e&&e.data&&"number"==typeof e.data.length))throw Error("Unexpected: Stripe API response does not have a well-formed `data` array.");let t=em(this.requestArgs);if(this.index<e.data.length){let r=t?e.data.length-1-this.index:this.index,s=e.data[r];return this.index+=1,{value:s,done:!1}}if(e.has_more){this.index=0,this.pagePromise=this.getNextPage(e);let t=await this.pagePromise;return this.iterate(t)}return{done:!0,value:void 0}}getNextPage(e){throw Error("Unimplemented")}async _next(){return this.iterate(await this.pagePromise)}next(){if(this.promiseCache.currentPromise)return this.promiseCache.currentPromise;let e=(async()=>{let e=await this._next();return this.promiseCache.currentPromise=null,e})();return this.promiseCache.currentPromise=e,e}}class el extends ea{getNextPage(e){let t=em(this.requestArgs),r=function(e,t){let r=t?0:e.data.length-1,s=e.data[r],o=s&&s.id;if(!o)throw Error("Unexpected: No `id` found on the last item while auto-paging a list.");return o}(e,t);return this.stripeResource._makeRequest(this.requestArgs,this.spec,{[t?"ending_before":"starting_after"]:r})}}class eh extends ea{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})}}class eu{constructor(e,t,r,s){this.firstPagePromise=e,this.currentPageIterator=null,this.nextPageUrl=null,this.requestArgs=t,this.spec=r,this.stripeResource=s}async initFirstPage(){if(this.firstPagePromise){let e=await this.firstPagePromise;this.firstPagePromise=null,this.currentPageIterator=e.data[Symbol.iterator](),this.nextPageUrl=e.next_page_url||null}}async turnPage(){if(!this.nextPageUrl)return null;this.spec.fullPath=this.nextPageUrl;let e=await this.stripeResource._makeRequest([],this.spec,{});return this.nextPageUrl=e.next_page_url||null,this.currentPageIterator=e.data[Symbol.iterator](),this.currentPageIterator}async next(){if(await this.initFirstPage(),this.currentPageIterator){let e=this.currentPageIterator.next();if(!e.done)return{done:!1,value:e.value}}let e=await this.turnPage();if(!e)return{done:!0,value:void 0};let t=e.next();return t.done?{done:!0,value:void 0}:{done:!1,value:t.value}}}let ed=(e,t,r,s)=>{let o=D(r.fullPath||r.path);return"v2"!==o&&"search"===r.methodType?ec(new eh(s,t,r,e)):"v2"!==o&&"list"===r.methodType?ec(new el(s,t,r,e)):"v2"===o&&"list"===r.methodType?ec(new eu(s,t,r,e)):null},ec=e=>{var t;let r=(t=(...t)=>e.next(...t),function(){let e=[].slice.call(arguments),r=function(e){if(0===e.length)return;let t=e[0];if("function"!=typeof t)throw Error(`The first argument to autoPagingEach, if present, must be a callback function; received ${typeof t}`);if(2===t.length)return t;if(t.length>2)throw Error(`The \`onItem\` callback function passed to autoPagingEach must accept at most two arguments; got ${t}`);return function(e,r){r(t(e))}}(e),s=function(e){if(e.length<2)return null;let t=e[1];if("function"!=typeof t)throw Error(`The second argument to autoPagingEach, if present, must be a callback function; received ${typeof t}`);return t}(e);if(e.length>2)throw Error(`autoPagingEach takes up to two arguments; received ${e}`);return A(new Promise((e,s)=>{t().then(function s(o){if(o.done){e();return}let i=o.value;return new Promise(e=>{r(i,e)}).then(e=>!1===e?s({done:!0,value:void 0}):t().then(s))}).catch(s)}),s)}),s={autoPagingEach:r,autoPagingToArray:function(e,t){let s=e&&e.limit;if(!s)throw Error("You must pass a `limit` option to autoPagingToArray, e.g., `autoPagingToArray({limit: 1000});`.");if(s>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.");return A(new Promise((e,t)=>{let o=[];r(e=>{if(o.push(e),o.length>=s)return!1}).then(()=>{e(o)}).catch(t)}),t)},next:()=>e.next(),return:()=>({}),["undefined"!=typeof Symbol&&Symbol.asyncIterator?Symbol.asyncIterator:"@@asyncIterator"]:()=>s};return s};function em(e){return!!w([].slice.call(e)).ending_before}function ep(e,t){if(this._stripe=e,t)throw Error("Support for curried url params was dropped in stripe-node v7.0.0. Instead, pass two ids.");this.basePath=x(this.basePath||e.getApiField("basePath")),this.resourcePath=this.path,this.path=x(this.path),this.initialize(...arguments)}ep.extend=function(e){let t=this,r=Object.prototype.hasOwnProperty.call(e,"constructor")?e.constructor:function(...e){t.apply(this,e)};return Object.assign(r,t),r.prototype=Object.create(t.prototype),Object.assign(r.prototype,e),r},ep.method=function(e){if(void 0!==e.path&&void 0!==e.fullPath)throw Error(`Method spec specified both a 'path' (${e.path}) and a 'fullPath' (${e.fullPath}).`);return function(...t){let r="function"==typeof t[t.length-1]&&t.pop();e.urlParams=function(e){let t=e.match(/\{\w+\}/g);return t?t.map(e=>e.replace(/[{}]/g,"")):[]}(e.fullPath||this.createResourcePathWithSymbols(e.path||""));let s=A(this._makeRequest(t,e,{}),r);return Object.assign(s,ed(this,t,e,s)),s}},ep.MAX_BUFFERED_REQUEST_METRICS=100,ep.prototype={_stripe:null,path:"",resourcePath:"",basePath:null,initialize(){},requestDataProcessor:null,validateRequest:null,createFullPath(e,t){let r=[this.basePath(t),this.path(t)];if("function"==typeof e){let s=e(t);s&&r.push(s)}else r.push(e);return this._joinUrlParts(r)},createResourcePathWithSymbols(e){return e?`/${this._joinUrlParts([this.resourcePath,e])}`:`/${this.resourcePath}`},_joinUrlParts:e=>e.join("/").replace(/\/{2,}/g,"/"),_getRequestOpts(e,t,r){var s;let o=(t.method||"GET").toUpperCase(),i=t.usage||[],n=t.urlParams||[],a=t.encode||(e=>e),l=!!t.fullPath,h=x(l?t.fullPath:t.path||""),u=l?t.fullPath:this.createResourcePathWithSymbols(t.path),d=[].slice.call(e),c=n.reduce((e,t)=>{let r=d.shift();if("string"!=typeof r)throw Error(`Stripe: Argument "${t}" must be a string, but got: ${r} (on API request to \`${o} ${u}\`)`);return e[t]=r,e},{}),m=a(Object.assign({},w(d),r)),p=G(d),f=p.host||t.host,P=!!t.streaming||!!p.streaming;if(d.filter(e=>null!=e).length)throw Error(`Stripe: Unknown arguments (${d}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options. (on API request to ${o} \`${u}\`)`);let v=l?h(c):this.createFullPath(h,c),T=Object.assign(p.headers,t.headers);t.validator&&t.validator(m,{headers:T});let _="GET"===t.method||"DELETE"===t.method;return{requestMethod:o,requestPath:v,bodyData:_?null:m,queryData:_?m:{},authenticator:null!==(s=p.authenticator)&&void 0!==s?s:null,headers:T,host:null!=f?f:null,streaming:P,settings:p.settings,usage:i}},_makeRequest(e,t,r){return new Promise((s,o)=>{var i;let n;try{n=this._getRequestOpts(e,t,r)}catch(e){o(e);return}let a=0===Object.keys(n.queryData).length,l=[n.requestPath,a?"":"?",b(n.queryData)].join(""),{headers:h,settings:u}=n;this._stripe._requestSender._request(n.requestMethod,n.host,l,n.bodyData,n.authenticator,{headers:h,settings:u,streaming:n.streaming},n.usage,function(e,r){e?o(e):s(t.transformResponseData?t.transformResponseData(r):r)},null===(i=this.requestDataProcessor)||void 0===i?void 0:i.bind(this))})}};class ef{constructor(e=[]){this._segments=[...e]}get segments(){return[...this._segments]}push(e){if(!e)throw Error("Segment cannot be null or undefined");return new ef([...this._segments,e])}pop(){if(0===this._segments.length)throw Error("Cannot pop from an empty context");return new ef(this._segments.slice(0,-1))}toString(){return this._segments.join("/")}static parse(e){return new ef(e?e.split("/"):[])}}let eP="2026-01-28.clover";function ev(e,t){for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let s=r[0].toLowerCase()+r.substring(1),o=new t[r](e);this[s]=o}}function eT(e,t){return function(e){return new ev(e,t)}}let e_=ep.method,ey=ep.extend({create:e_({method:"POST",fullPath:"/v2/core/account_links"})}),eg=ep.method,eE=ep.extend({create:eg({method:"POST",fullPath:"/v2/core/account_tokens"}),retrieve:eg({method:"GET",fullPath:"/v2/core/account_tokens/{id}"})}),eS=ep.method,eO=ep.extend({retrieve:eS({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}"}),list:eS({method:"GET",fullPath:"/v1/financial_connections/accounts",methodType:"list"}),disconnect:eS({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/disconnect"}),listOwners:eS({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}/owners",methodType:"list"}),refresh:eS({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/refresh"}),subscribe:eS({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/subscribe"}),unsubscribe:eS({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/unsubscribe"})}),eb=ep.method,ex=ep.extend({create:eb({method:"POST",fullPath:"/v2/core/accounts/{account_id}/persons"}),retrieve:eb({method:"GET",fullPath:"/v2/core/accounts/{account_id}/persons/{id}"}),update:eb({method:"POST",fullPath:"/v2/core/accounts/{account_id}/persons/{id}"}),list:eb({method:"GET",fullPath:"/v2/core/accounts/{account_id}/persons",methodType:"list"}),del:eb({method:"DELETE",fullPath:"/v2/core/accounts/{account_id}/persons/{id}"})}),ew=ep.method,eG=ep.extend({create:ew({method:"POST",fullPath:"/v2/core/accounts/{account_id}/person_tokens"}),retrieve:ew({method:"GET",fullPath:"/v2/core/accounts/{account_id}/person_tokens/{id}"})}),eC=ep.method,eA=ep.extend({constructor:function(...e){ep.apply(this,e),this.persons=new ex(...e),this.personTokens=new eG(...e)},create:eC({method:"POST",fullPath:"/v2/core/accounts"}),retrieve:eC({method:"GET",fullPath:"/v2/core/accounts/{id}"}),update:eC({method:"POST",fullPath:"/v2/core/accounts/{id}"}),list:eC({method:"GET",fullPath:"/v2/core/accounts",methodType:"list"}),close:eC({method:"POST",fullPath:"/v2/core/accounts/{id}/close"})}),eR=ep.method,ek=ep.extend({retrieve:eR({method:"GET",fullPath:"/v1/entitlements/active_entitlements/{id}"}),list:eR({method:"GET",fullPath:"/v1/entitlements/active_entitlements",methodType:"list"})}),eI=ep.method,eq=ep.extend({create:eI({method:"POST",fullPath:"/v1/billing/alerts"}),retrieve:eI({method:"GET",fullPath:"/v1/billing/alerts/{id}"}),list:eI({method:"GET",fullPath:"/v1/billing/alerts",methodType:"list"}),activate:eI({method:"POST",fullPath:"/v1/billing/alerts/{id}/activate"}),archive:eI({method:"POST",fullPath:"/v1/billing/alerts/{id}/archive"}),deactivate:eI({method:"POST",fullPath:"/v1/billing/alerts/{id}/deactivate"})}),eD=ep.method,eN=ep.extend({find:eD({method:"GET",fullPath:"/v1/tax/associations/find"})}),ej=ep.method,eU=ep.extend({retrieve:ej({method:"GET",fullPath:"/v1/issuing/authorizations/{authorization}"}),update:ej({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}"}),list:ej({method:"GET",fullPath:"/v1/issuing/authorizations",methodType:"list"}),approve:ej({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/approve"}),decline:ej({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/decline"})}),eM=ep.method,eL=ep.extend({create:eM({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations"}),capture:eM({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/capture"}),expire:eM({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/expire"}),finalizeAmount:eM({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount"}),increment:eM({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/increment"}),respond:eM({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond"}),reverse:eM({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/reverse"})}),eH=ep.method,eF=ep.extend({create:eH({method:"POST",fullPath:"/v1/tax/calculations"}),retrieve:eH({method:"GET",fullPath:"/v1/tax/calculations/{calculation}"}),listLineItems:eH({method:"GET",fullPath:"/v1/tax/calculations/{calculation}/line_items",methodType:"list"})}),ez=ep.method,e$=ep.extend({create:ez({method:"POST",fullPath:"/v1/issuing/cardholders"}),retrieve:ez({method:"GET",fullPath:"/v1/issuing/cardholders/{cardholder}"}),update:ez({method:"POST",fullPath:"/v1/issuing/cardholders/{cardholder}"}),list:ez({method:"GET",fullPath:"/v1/issuing/cardholders",methodType:"list"})}),eB=ep.method,eV=ep.extend({create:eB({method:"POST",fullPath:"/v1/issuing/cards"}),retrieve:eB({method:"GET",fullPath:"/v1/issuing/cards/{card}"}),update:eB({method:"POST",fullPath:"/v1/issuing/cards/{card}"}),list:eB({method:"GET",fullPath:"/v1/issuing/cards",methodType:"list"})}),eK=ep.method,eW=ep.extend({deliverCard:eK({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/deliver"}),failCard:eK({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/fail"}),returnCard:eK({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/return"}),shipCard:eK({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/ship"}),submitCard:eK({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/submit"})}),eJ=ep.method,eX=ep.extend({create:eJ({method:"POST",fullPath:"/v1/billing_portal/configurations"}),retrieve:eJ({method:"GET",fullPath:"/v1/billing_portal/configurations/{configuration}"}),update:eJ({method:"POST",fullPath:"/v1/billing_portal/configurations/{configuration}"}),list:eJ({method:"GET",fullPath:"/v1/billing_portal/configurations",methodType:"list"})}),eY=ep.method,eQ=ep.extend({create:eY({method:"POST",fullPath:"/v1/terminal/configurations"}),retrieve:eY({method:"GET",fullPath:"/v1/terminal/configurations/{configuration}"}),update:eY({method:"POST",fullPath:"/v1/terminal/configurations/{configuration}"}),list:eY({method:"GET",fullPath:"/v1/terminal/configurations",methodType:"list"}),del:eY({method:"DELETE",fullPath:"/v1/terminal/configurations/{configuration}"})}),eZ=ep.method,e1=ep.extend({create:eZ({method:"POST",fullPath:"/v1/test_helpers/confirmation_tokens"})}),e0=ep.method,e2=ep.extend({create:e0({method:"POST",fullPath:"/v1/terminal/connection_tokens"})}),e8=ep.method,e5=ep.extend({retrieve:e8({method:"GET",fullPath:"/v1/billing/credit_balance_summary"})}),e4=ep.method,e6=ep.extend({retrieve:e4({method:"GET",fullPath:"/v1/billing/credit_balance_transactions/{id}"}),list:e4({method:"GET",fullPath:"/v1/billing/credit_balance_transactions",methodType:"list"})}),e7=ep.method,e3=ep.extend({create:e7({method:"POST",fullPath:"/v1/billing/credit_grants"}),retrieve:e7({method:"GET",fullPath:"/v1/billing/credit_grants/{id}"}),update:e7({method:"POST",fullPath:"/v1/billing/credit_grants/{id}"}),list:e7({method:"GET",fullPath:"/v1/billing/credit_grants",methodType:"list"}),expire:e7({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/expire"}),voidGrant:e7({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/void"})}),e9=ep.method,te=ep.extend({create:e9({method:"POST",fullPath:"/v1/treasury/credit_reversals"}),retrieve:e9({method:"GET",fullPath:"/v1/treasury/credit_reversals/{credit_reversal}"}),list:e9({method:"GET",fullPath:"/v1/treasury/credit_reversals",methodType:"list"})}),tt=ep.method,tr=ep.extend({fundCashBalance:tt({method:"POST",fullPath:"/v1/test_helpers/customers/{customer}/fund_cash_balance"})}),ts=ep.method,to=ep.extend({create:ts({method:"POST",fullPath:"/v1/treasury/debit_reversals"}),retrieve:ts({method:"GET",fullPath:"/v1/treasury/debit_reversals/{debit_reversal}"}),list:ts({method:"GET",fullPath:"/v1/treasury/debit_reversals",methodType:"list"})}),ti=ep.method,tn=ep.extend({create:ti({method:"POST",fullPath:"/v1/issuing/disputes"}),retrieve:ti({method:"GET",fullPath:"/v1/issuing/disputes/{dispute}"}),update:ti({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}"}),list:ti({method:"GET",fullPath:"/v1/issuing/disputes",methodType:"list"}),submit:ti({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}/submit"})}),ta=ep.method,tl=ep.extend({retrieve:ta({method:"GET",fullPath:"/v1/radar/early_fraud_warnings/{early_fraud_warning}"}),list:ta({method:"GET",fullPath:"/v1/radar/early_fraud_warnings",methodType:"list"})}),th=ep.method,tu=ep.extend({create:th({method:"POST",fullPath:"/v2/core/event_destinations"}),retrieve:th({method:"GET",fullPath:"/v2/core/event_destinations/{id}"}),update:th({method:"POST",fullPath:"/v2/core/event_destinations/{id}"}),list:th({method:"GET",fullPath:"/v2/core/event_destinations",methodType:"list"}),del:th({method:"DELETE",fullPath:"/v2/core/event_destinations/{id}"}),disable:th({method:"POST",fullPath:"/v2/core/event_destinations/{id}/disable"}),enable:th({method:"POST",fullPath:"/v2/core/event_destinations/{id}/enable"}),ping:th({method:"POST",fullPath:"/v2/core/event_destinations/{id}/ping"})}),td=ep.method,tc=ep.extend({retrieve(...e){return td({method:"GET",fullPath:"/v2/core/events/{id}",transformResponseData:e=>this.addFetchRelatedObjectIfNeeded(e)}).apply(this,e)},list(...e){return td({method:"GET",fullPath:"/v2/core/events",methodType:"list",transformResponseData:e=>Object.assign(Object.assign({},e),{data:e.data.map(this.addFetchRelatedObjectIfNeeded.bind(this))})}).apply(this,e)},addFetchRelatedObjectIfNeeded(e){return e.related_object&&e.related_object.url?Object.assign(Object.assign({},e),{fetchRelatedObject:()=>td({method:"GET",fullPath:e.related_object.url}).apply(this,[{stripeContext:e.context}])}):e}}),tm=ep.method,tp=ep.extend({create:tm({method:"POST",fullPath:"/v1/entitlements/features"}),retrieve:tm({method:"GET",fullPath:"/v1/entitlements/features/{id}"}),update:tm({method:"POST",fullPath:"/v1/entitlements/features/{id}"}),list:tm({method:"GET",fullPath:"/v1/entitlements/features",methodType:"list"})}),tf=ep.method,tP=ep.extend({create:tf({method:"POST",fullPath:"/v1/treasury/financial_accounts"}),retrieve:tf({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),update:tf({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),list:tf({method:"GET",fullPath:"/v1/treasury/financial_accounts",methodType:"list"}),close:tf({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}/close"}),retrieveFeatures:tf({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"}),updateFeatures:tf({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"})}),tv=ep.method,tT=ep.extend({fail:tv({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/fail"}),returnInboundTransfer:tv({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/return"}),succeed:tv({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/succeed"})}),t_=ep.method,ty=ep.extend({create:t_({method:"POST",fullPath:"/v1/treasury/inbound_transfers"}),retrieve:t_({method:"GET",fullPath:"/v1/treasury/inbound_transfers/{id}"}),list:t_({method:"GET",fullPath:"/v1/treasury/inbound_transfers",methodType:"list"}),cancel:t_({method:"POST",fullPath:"/v1/treasury/inbound_transfers/{inbound_transfer}/cancel"})}),tg=ep.method,tE=ep.extend({create:tg({method:"POST",fullPath:"/v1/terminal/locations"}),retrieve:tg({method:"GET",fullPath:"/v1/terminal/locations/{location}"}),update:tg({method:"POST",fullPath:"/v1/terminal/locations/{location}"}),list:tg({method:"GET",fullPath:"/v1/terminal/locations",methodType:"list"}),del:tg({method:"DELETE",fullPath:"/v1/terminal/locations/{location}"})}),tS=ep.method,tO=ep.extend({create:tS({method:"POST",fullPath:"/v1/billing/meter_event_adjustments"})}),tb=ep.method,tx=ep.extend({create:tb({method:"POST",fullPath:"/v2/billing/meter_event_adjustments"})}),tw=ep.method,tG=ep.extend({create:tw({method:"POST",fullPath:"/v2/billing/meter_event_session"})}),tC=ep.method,tA=ep.extend({create:tC({method:"POST",fullPath:"/v2/billing/meter_event_stream",host:"meter-events.stripe.com"})}),tR=ep.method,tk=ep.extend({create:tR({method:"POST",fullPath:"/v1/billing/meter_events"})}),tI=ep.method,tq=ep.extend({create:tI({method:"POST",fullPath:"/v2/billing/meter_events"})}),tD=ep.method,tN=ep.extend({create:tD({method:"POST",fullPath:"/v1/billing/meters"}),retrieve:tD({method:"GET",fullPath:"/v1/billing/meters/{id}"}),update:tD({method:"POST",fullPath:"/v1/billing/meters/{id}"}),list:tD({method:"GET",fullPath:"/v1/billing/meters",methodType:"list"}),deactivate:tD({method:"POST",fullPath:"/v1/billing/meters/{id}/deactivate"}),listEventSummaries:tD({method:"GET",fullPath:"/v1/billing/meters/{id}/event_summaries",methodType:"list"}),reactivate:tD({method:"POST",fullPath:"/v1/billing/meters/{id}/reactivate"})}),tj=ep.method,tU=ep.extend({create:tj({method:"POST",fullPath:"/v1/terminal/onboarding_links"})}),tM=ep.method,tL=ep.extend({create:tM({method:"POST",fullPath:"/v1/climate/orders"}),retrieve:tM({method:"GET",fullPath:"/v1/climate/orders/{order}"}),update:tM({method:"POST",fullPath:"/v1/climate/orders/{order}"}),list:tM({method:"GET",fullPath:"/v1/climate/orders",methodType:"list"}),cancel:tM({method:"POST",fullPath:"/v1/climate/orders/{order}/cancel"})}),tH=ep.method,tF=ep.extend({update:tH({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}"}),fail:tH({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/fail"}),post:tH({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/post"}),returnOutboundPayment:tH({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/return"})}),tz=ep.method,t$=ep.extend({create:tz({method:"POST",fullPath:"/v1/treasury/outbound_payments"}),retrieve:tz({method:"GET",fullPath:"/v1/treasury/outbound_payments/{id}"}),list:tz({method:"GET",fullPath:"/v1/treasury/outbound_payments",methodType:"list"}),cancel:tz({method:"POST",fullPath:"/v1/treasury/outbound_payments/{id}/cancel"})}),tB=ep.method,tV=ep.extend({update:tB({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}"}),fail:tB({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail"}),post:tB({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post"}),returnOutboundTransfer:tB({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return"})}),tK=ep.method,tW=ep.extend({create:tK({method:"POST",fullPath:"/v1/treasury/outbound_transfers"}),retrieve:tK({method:"GET",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}"}),list:tK({method:"GET",fullPath:"/v1/treasury/outbound_transfers",methodType:"list"}),cancel:tK({method:"POST",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}/cancel"})}),tJ=ep.method,tX=ep.extend({create:tJ({method:"POST",fullPath:"/v1/radar/payment_evaluations"})}),tY=ep.method,tQ=ep.extend({create:tY({method:"POST",fullPath:"/v1/issuing/personalization_designs"}),retrieve:tY({method:"GET",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),update:tY({method:"POST",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),list:tY({method:"GET",fullPath:"/v1/issuing/personalization_designs",methodType:"list"})}),tZ=ep.method,t1=ep.extend({activate:tZ({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate"}),deactivate:tZ({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate"}),reject:tZ({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject"})}),t0=ep.method,t2=ep.extend({retrieve:t0({method:"GET",fullPath:"/v1/issuing/physical_bundles/{physical_bundle}"}),list:t0({method:"GET",fullPath:"/v1/issuing/physical_bundles",methodType:"list"})}),t8=ep.method,t5=ep.extend({retrieve:t8({method:"GET",fullPath:"/v1/climate/products/{product}"}),list:t8({method:"GET",fullPath:"/v1/climate/products",methodType:"list"})}),t4=ep.method,t6=ep.extend({create:t4({method:"POST",fullPath:"/v1/terminal/readers"}),retrieve:t4({method:"GET",fullPath:"/v1/terminal/readers/{reader}"}),update:t4({method:"POST",fullPath:"/v1/terminal/readers/{reader}"}),list:t4({method:"GET",fullPath:"/v1/terminal/readers",methodType:"list"}),del:t4({method:"DELETE",fullPath:"/v1/terminal/readers/{reader}"}),cancelAction:t4({method:"POST",fullPath:"/v1/terminal/readers/{reader}/cancel_action"}),collectInputs:t4({method:"POST",fullPath:"/v1/terminal/readers/{reader}/collect_inputs"}),collectPaymentMethod:t4({method:"POST",fullPath:"/v1/terminal/readers/{reader}/collect_payment_method"}),confirmPaymentIntent:t4({method:"POST",fullPath:"/v1/terminal/readers/{reader}/confirm_payment_intent"}),processPaymentIntent:t4({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_payment_intent"}),processSetupIntent:t4({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_setup_intent"}),refundPayment:t4({method:"POST",fullPath:"/v1/terminal/readers/{reader}/refund_payment"}),setReaderDisplay:t4({method:"POST",fullPath:"/v1/terminal/readers/{reader}/set_reader_display"})}),t7=ep.method,t3=ep.extend({presentPaymentMethod:t7({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/present_payment_method"}),succeedInputCollection:t7({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/succeed_input_collection"}),timeoutInputCollection:t7({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/timeout_input_collection"})}),t9=ep.method,re=ep.extend({create:t9({method:"POST",fullPath:"/v1/test_helpers/treasury/received_credits"})}),rt=ep.method,rr=ep.extend({retrieve:rt({method:"GET",fullPath:"/v1/treasury/received_credits/{id}"}),list:rt({method:"GET",fullPath:"/v1/treasury/received_credits",methodType:"list"})}),rs=ep.method,ro=ep.extend({create:rs({method:"POST",fullPath:"/v1/test_helpers/treasury/received_debits"})}),ri=ep.method,rn=ep.extend({retrieve:ri({method:"GET",fullPath:"/v1/treasury/received_debits/{id}"}),list:ri({method:"GET",fullPath:"/v1/treasury/received_debits",methodType:"list"})}),ra=ep.method,rl=ep.extend({expire:ra({method:"POST",fullPath:"/v1/test_helpers/refunds/{refund}/expire"})}),rh=ep.method,ru=ep.extend({create:rh({method:"POST",fullPath:"/v1/tax/registrations"}),retrieve:rh({method:"GET",fullPath:"/v1/tax/registrations/{id}"}),update:rh({method:"POST",fullPath:"/v1/tax/registrations/{id}"}),list:rh({method:"GET",fullPath:"/v1/tax/registrations",methodType:"list"})}),rd=ep.method,rc=ep.extend({create:rd({method:"POST",fullPath:"/v1/reporting/report_runs"}),retrieve:rd({method:"GET",fullPath:"/v1/reporting/report_runs/{report_run}"}),list:rd({method:"GET",fullPath:"/v1/reporting/report_runs",methodType:"list"})}),rm=ep.method,rp=ep.extend({retrieve:rm({method:"GET",fullPath:"/v1/reporting/report_types/{report_type}"}),list:rm({method:"GET",fullPath:"/v1/reporting/report_types",methodType:"list"})}),rf=ep.method,rP=ep.extend({create:rf({method:"POST",fullPath:"/v1/forwarding/requests"}),retrieve:rf({method:"GET",fullPath:"/v1/forwarding/requests/{id}"}),list:rf({method:"GET",fullPath:"/v1/forwarding/requests",methodType:"list"})}),rv=ep.method,rT=ep.extend({retrieve:rv({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs/{scheduled_query_run}"}),list:rv({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs",methodType:"list"})}),r_=ep.method,ry=ep.extend({create:r_({method:"POST",fullPath:"/v1/apps/secrets"}),list:r_({method:"GET",fullPath:"/v1/apps/secrets",methodType:"list"}),deleteWhere:r_({method:"POST",fullPath:"/v1/apps/secrets/delete"}),find:r_({method:"GET",fullPath:"/v1/apps/secrets/find"})}),rg=ep.method,rE=ep.extend({create:rg({method:"POST",fullPath:"/v1/billing_portal/sessions"})}),rS=ep.method,rO=ep.extend({create:rS({method:"POST",fullPath:"/v1/checkout/sessions"}),retrieve:rS({method:"GET",fullPath:"/v1/checkout/sessions/{session}"}),update:rS({method:"POST",fullPath:"/v1/checkout/sessions/{session}"}),list:rS({method:"GET",fullPath:"/v1/checkout/sessions",methodType:"list"}),expire:rS({method:"POST",fullPath:"/v1/checkout/sessions/{session}/expire"}),listLineItems:rS({method:"GET",fullPath:"/v1/checkout/sessions/{session}/line_items",methodType:"list"})}),rb=ep.method,rx=ep.extend({create:rb({method:"POST",fullPath:"/v1/financial_connections/sessions"}),retrieve:rb({method:"GET",fullPath:"/v1/financial_connections/sessions/{session}"})}),rw=ep.method,rG=ep.extend({retrieve:rw({method:"GET",fullPath:"/v1/tax/settings"}),update:rw({method:"POST",fullPath:"/v1/tax/settings"})}),rC=ep.method,rA=ep.extend({retrieve:rC({method:"GET",fullPath:"/v1/climate/suppliers/{supplier}"}),list:rC({method:"GET",fullPath:"/v1/climate/suppliers",methodType:"list"})}),rR=ep.method,rk=ep.extend({create:rR({method:"POST",fullPath:"/v1/test_helpers/test_clocks"}),retrieve:rR({method:"GET",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),list:rR({method:"GET",fullPath:"/v1/test_helpers/test_clocks",methodType:"list"}),del:rR({method:"DELETE",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),advance:rR({method:"POST",fullPath:"/v1/test_helpers/test_clocks/{test_clock}/advance"})}),rI=ep.method,rq=ep.extend({retrieve:rI({method:"GET",fullPath:"/v1/issuing/tokens/{token}"}),update:rI({method:"POST",fullPath:"/v1/issuing/tokens/{token}"}),list:rI({method:"GET",fullPath:"/v1/issuing/tokens",methodType:"list"})}),rD=ep.method,rN=ep.extend({retrieve:rD({method:"GET",fullPath:"/v1/treasury/transaction_entries/{id}"}),list:rD({method:"GET",fullPath:"/v1/treasury/transaction_entries",methodType:"list"})}),rj=ep.method,rU=ep.extend({retrieve:rj({method:"GET",fullPath:"/v1/financial_connections/transactions/{transaction}"}),list:rj({method:"GET",fullPath:"/v1/financial_connections/transactions",methodType:"list"})}),rM=ep.method,rL=ep.extend({retrieve:rM({method:"GET",fullPath:"/v1/issuing/transactions/{transaction}"}),update:rM({method:"POST",fullPath:"/v1/issuing/transactions/{transaction}"}),list:rM({method:"GET",fullPath:"/v1/issuing/transactions",methodType:"list"})}),rH=ep.method,rF=ep.extend({retrieve:rH({method:"GET",fullPath:"/v1/tax/transactions/{transaction}"}),createFromCalculation:rH({method:"POST",fullPath:"/v1/tax/transactions/create_from_calculation"}),createReversal:rH({method:"POST",fullPath:"/v1/tax/transactions/create_reversal"}),listLineItems:rH({method:"GET",fullPath:"/v1/tax/transactions/{transaction}/line_items",methodType:"list"})}),rz=ep.method,r$=ep.extend({createForceCapture:rz({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_force_capture"}),createUnlinkedRefund:rz({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_unlinked_refund"}),refund:rz({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/{transaction}/refund"})}),rB=ep.method,rV=ep.extend({retrieve:rB({method:"GET",fullPath:"/v1/treasury/transactions/{id}"}),list:rB({method:"GET",fullPath:"/v1/treasury/transactions",methodType:"list"})}),rK=ep.method,rW=ep.extend({create:rK({method:"POST",fullPath:"/v1/radar/value_list_items"}),retrieve:rK({method:"GET",fullPath:"/v1/radar/value_list_items/{item}"}),list:rK({method:"GET",fullPath:"/v1/radar/value_list_items",methodType:"list"}),del:rK({method:"DELETE",fullPath:"/v1/radar/value_list_items/{item}"})}),rJ=ep.method,rX=ep.extend({create:rJ({method:"POST",fullPath:"/v1/radar/value_lists"}),retrieve:rJ({method:"GET",fullPath:"/v1/radar/value_lists/{value_list}"}),update:rJ({method:"POST",fullPath:"/v1/radar/value_lists/{value_list}"}),list:rJ({method:"GET",fullPath:"/v1/radar/value_lists",methodType:"list"}),del:rJ({method:"DELETE",fullPath:"/v1/radar/value_lists/{value_list}"})}),rY=ep.method,rQ=ep.extend({retrieve:rY({method:"GET",fullPath:"/v1/identity/verification_reports/{report}"}),list:rY({method:"GET",fullPath:"/v1/identity/verification_reports",methodType:"list"})}),rZ=ep.method,r1=ep.extend({create:rZ({method:"POST",fullPath:"/v1/identity/verification_sessions"}),retrieve:rZ({method:"GET",fullPath:"/v1/identity/verification_sessions/{session}"}),update:rZ({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}"}),list:rZ({method:"GET",fullPath:"/v1/identity/verification_sessions",methodType:"list"}),cancel:rZ({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/cancel"}),redact:rZ({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/redact"})}),r0=ep.method,r2=ep.extend({create:r0({method:"POST",fullPath:"/v1/accounts"}),retrieve(e,...t){return"string"==typeof e?r0({method:"GET",fullPath:"/v1/accounts/{id}"}).apply(this,[e,...t]):(null==e&&[].shift.apply([e,...t]),r0({method:"GET",fullPath:"/v1/account"}).apply(this,[e,...t]))},update:r0({method:"POST",fullPath:"/v1/accounts/{account}"}),list:r0({method:"GET",fullPath:"/v1/accounts",methodType:"list"}),del:r0({method:"DELETE",fullPath:"/v1/accounts/{account}"}),createExternalAccount:r0({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts"}),createLoginLink:r0({method:"POST",fullPath:"/v1/accounts/{account}/login_links"}),createPerson:r0({method:"POST",fullPath:"/v1/accounts/{account}/persons"}),deleteExternalAccount:r0({method:"DELETE",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),deletePerson:r0({method:"DELETE",fullPath:"/v1/accounts/{account}/persons/{person}"}),listCapabilities:r0({method:"GET",fullPath:"/v1/accounts/{account}/capabilities",methodType:"list"}),listExternalAccounts:r0({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts",methodType:"list"}),listPersons:r0({method:"GET",fullPath:"/v1/accounts/{account}/persons",methodType:"list"}),reject:r0({method:"POST",fullPath:"/v1/accounts/{account}/reject"}),retrieveCurrent:r0({method:"GET",fullPath:"/v1/account"}),retrieveCapability:r0({method:"GET",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),retrieveExternalAccount:r0({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),retrievePerson:r0({method:"GET",fullPath:"/v1/accounts/{account}/persons/{person}"}),updateCapability:r0({method:"POST",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),updateExternalAccount:r0({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),updatePerson:r0({method:"POST",fullPath:"/v1/accounts/{account}/persons/{person}"})}),r8=ep.method,r5=ep.extend({create:r8({method:"POST",fullPath:"/v1/account_links"})}),r4=ep.method,r6=ep.extend({create:r4({method:"POST",fullPath:"/v1/account_sessions"})}),r7=ep.method,r3=ep.extend({create:r7({method:"POST",fullPath:"/v1/apple_pay/domains"}),retrieve:r7({method:"GET",fullPath:"/v1/apple_pay/domains/{domain}"}),list:r7({method:"GET",fullPath:"/v1/apple_pay/domains",methodType:"list"}),del:r7({method:"DELETE",fullPath:"/v1/apple_pay/domains/{domain}"})}),r9=ep.method,se=ep.extend({retrieve:r9({method:"GET",fullPath:"/v1/application_fees/{id}"}),list:r9({method:"GET",fullPath:"/v1/application_fees",methodType:"list"}),createRefund:r9({method:"POST",fullPath:"/v1/application_fees/{id}/refunds"}),listRefunds:r9({method:"GET",fullPath:"/v1/application_fees/{id}/refunds",methodType:"list"}),retrieveRefund:r9({method:"GET",fullPath:"/v1/application_fees/{fee}/refunds/{id}"}),updateRefund:r9({method:"POST",fullPath:"/v1/application_fees/{fee}/refunds/{id}"})}),st=ep.method,sr=ep.extend({retrieve:st({method:"GET",fullPath:"/v1/balance"})}),ss=ep.method,so=ep.extend({retrieve:ss({method:"GET",fullPath:"/v1/balance_settings"}),update:ss({method:"POST",fullPath:"/v1/balance_settings"})}),si=ep.method,sn=ep.extend({retrieve:si({method:"GET",fullPath:"/v1/balance_transactions/{id}"}),list:si({method:"GET",fullPath:"/v1/balance_transactions",methodType:"list"})}),sa=ep.method,sl=ep.extend({create:sa({method:"POST",fullPath:"/v1/charges"}),retrieve:sa({method:"GET",fullPath:"/v1/charges/{charge}"}),update:sa({method:"POST",fullPath:"/v1/charges/{charge}"}),list:sa({method:"GET",fullPath:"/v1/charges",methodType:"list"}),capture:sa({method:"POST",fullPath:"/v1/charges/{charge}/capture"}),search:sa({method:"GET",fullPath:"/v1/charges/search",methodType:"search"})}),sh=ep.method,su=ep.extend({retrieve:sh({method:"GET",fullPath:"/v1/confirmation_tokens/{confirmation_token}"})}),sd=ep.method,sc=ep.extend({retrieve:sd({method:"GET",fullPath:"/v1/country_specs/{country}"}),list:sd({method:"GET",fullPath:"/v1/country_specs",methodType:"list"})}),sm=ep.method,sp=ep.extend({create:sm({method:"POST",fullPath:"/v1/coupons"}),retrieve:sm({method:"GET",fullPath:"/v1/coupons/{coupon}"}),update:sm({method:"POST",fullPath:"/v1/coupons/{coupon}"}),list:sm({method:"GET",fullPath:"/v1/coupons",methodType:"list"}),del:sm({method:"DELETE",fullPath:"/v1/coupons/{coupon}"})}),sf=ep.method,sP=ep.extend({create:sf({method:"POST",fullPath:"/v1/credit_notes"}),retrieve:sf({method:"GET",fullPath:"/v1/credit_notes/{id}"}),update:sf({method:"POST",fullPath:"/v1/credit_notes/{id}"}),list:sf({method:"GET",fullPath:"/v1/credit_notes",methodType:"list"}),listLineItems:sf({method:"GET",fullPath:"/v1/credit_notes/{credit_note}/lines",methodType:"list"}),listPreviewLineItems:sf({method:"GET",fullPath:"/v1/credit_notes/preview/lines",methodType:"list"}),preview:sf({method:"GET",fullPath:"/v1/credit_notes/preview"}),voidCreditNote:sf({method:"POST",fullPath:"/v1/credit_notes/{id}/void"})}),sv=ep.method,sT=ep.extend({create:sv({method:"POST",fullPath:"/v1/customer_sessions"})}),s_=ep.method,sy=ep.extend({create:s_({method:"POST",fullPath:"/v1/customers"}),retrieve:s_({method:"GET",fullPath:"/v1/customers/{customer}"}),update:s_({method:"POST",fullPath:"/v1/customers/{customer}"}),list:s_({method:"GET",fullPath:"/v1/customers",methodType:"list"}),del:s_({method:"DELETE",fullPath:"/v1/customers/{customer}"}),createBalanceTransaction:s_({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions"}),createFundingInstructions:s_({method:"POST",fullPath:"/v1/customers/{customer}/funding_instructions"}),createSource:s_({method:"POST",fullPath:"/v1/customers/{customer}/sources"}),createTaxId:s_({method:"POST",fullPath:"/v1/customers/{customer}/tax_ids"}),deleteDiscount:s_({method:"DELETE",fullPath:"/v1/customers/{customer}/discount"}),deleteSource:s_({method:"DELETE",fullPath:"/v1/customers/{customer}/sources/{id}"}),deleteTaxId:s_({method:"DELETE",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),listBalanceTransactions:s_({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions",methodType:"list"}),listCashBalanceTransactions:s_({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions",methodType:"list"}),listPaymentMethods:s_({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods",methodType:"list"}),listSources:s_({method:"GET",fullPath:"/v1/customers/{customer}/sources",methodType:"list"}),listTaxIds:s_({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids",methodType:"list"}),retrieveBalanceTransaction:s_({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),retrieveCashBalance:s_({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance"}),retrieveCashBalanceTransaction:s_({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions/{transaction}"}),retrievePaymentMethod:s_({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods/{payment_method}"}),retrieveSource:s_({method:"GET",fullPath:"/v1/customers/{customer}/sources/{id}"}),retrieveTaxId:s_({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),search:s_({method:"GET",fullPath:"/v1/customers/search",methodType:"search"}),updateBalanceTransaction:s_({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),updateCashBalance:s_({method:"POST",fullPath:"/v1/customers/{customer}/cash_balance"}),updateSource:s_({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}"}),verifySource:s_({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}/verify"})}),sg=ep.method,sE=ep.extend({retrieve:sg({method:"GET",fullPath:"/v1/disputes/{dispute}"}),update:sg({method:"POST",fullPath:"/v1/disputes/{dispute}"}),list:sg({method:"GET",fullPath:"/v1/disputes",methodType:"list"}),close:sg({method:"POST",fullPath:"/v1/disputes/{dispute}/close"})}),sS=ep.method,sO=ep.extend({create:sS({method:"POST",fullPath:"/v1/ephemeral_keys",validator:(e,t)=>{if(!t.headers||!t.headers["Stripe-Version"])throw Error("Passing apiVersion in a separate options hash is required to create an ephemeral key. See https://stripe.com/docs/api/versioning?lang=node")}}),del:sS({method:"DELETE",fullPath:"/v1/ephemeral_keys/{key}"})}),sb=ep.method,sx=ep.extend({retrieve:sb({method:"GET",fullPath:"/v1/events/{id}"}),list:sb({method:"GET",fullPath:"/v1/events",methodType:"list"})}),sw=ep.method,sG=ep.extend({retrieve:sw({method:"GET",fullPath:"/v1/exchange_rates/{rate_id}"}),list:sw({method:"GET",fullPath:"/v1/exchange_rates",methodType:"list"})}),sC=ep.method,sA=ep.extend({create:sC({method:"POST",fullPath:"/v1/file_links"}),retrieve:sC({method:"GET",fullPath:"/v1/file_links/{link}"}),update:sC({method:"POST",fullPath:"/v1/file_links/{link}"}),list:sC({method:"GET",fullPath:"/v1/file_links",methodType:"list"})}),sR=(e,t,r)=>{let s=(Math.round(1e16*Math.random())+Math.round(1e16*Math.random())).toString();r["Content-Type"]=`multipart/form-data; boundary=${s}`;let o=new TextEncoder,i=new Uint8Array(0),n=o.encode("\r\n");function a(e){let t=i,r=e instanceof Uint8Array?e:new Uint8Array(o.encode(e));(i=new Uint8Array(t.length+r.length+2)).set(t),i.set(r,t.length),i.set(n,i.length-2)}function l(e){return`"${e.replace(/"|"/g,"%22").replace(/\r\n|\r|\n/g," ")}"`}let h=function(e){let t={},r=(e,s)=>{Object.entries(e).forEach(([e,o])=>{let i=s?`${s}[${e}]`:e;if(function(e){let t=typeof e;return("function"===t||"object"===t)&&!!e}(o)){if(!(o instanceof Uint8Array)&&!Object.prototype.hasOwnProperty.call(o,"data"))return r(o,i);t[i]=o}else t[i]=String(o)})};return r(e,null),t}(t);for(let e in h){if(!Object.prototype.hasOwnProperty.call(h,e))continue;let t=h[e];a(`--${s}`),Object.prototype.hasOwnProperty.call(t,"data")?(a(`Content-Disposition: form-data; name=${l(e)}; filename=${l(t.name||"blob")}`),a(`Content-Type: ${t.type||"application/octet-stream"}`),a(""),a(t.data)):(a(`Content-Disposition: form-data; name=${l(e)}`),a(""),a(t))}return a(`--${s}--`),i},sk=ep.method,sI=ep.extend({create:sk({method:"POST",fullPath:"/v1/files",headers:{"Content-Type":"multipart/form-data"},host:"files.stripe.com"}),retrieve:sk({method:"GET",fullPath:"/v1/files/{file}"}),list:sk({method:"GET",fullPath:"/v1/files",methodType:"list"}),requestDataProcessor:function(e,t,r,s){if(t=t||{},"POST"!==e)return s(null,b(t));this._stripe._platformFunctions.tryBufferData(t).then(t=>s(null,sR(e,t,r))).catch(e=>s(e,null))}}),sq=ep.method,sD=ep.extend({create:sq({method:"POST",fullPath:"/v1/invoiceitems"}),retrieve:sq({method:"GET",fullPath:"/v1/invoiceitems/{invoiceitem}"}),update:sq({method:"POST",fullPath:"/v1/invoiceitems/{invoiceitem}"}),list:sq({method:"GET",fullPath:"/v1/invoiceitems",methodType:"list"}),del:sq({method:"DELETE",fullPath:"/v1/invoiceitems/{invoiceitem}"})}),sN=ep.method,sj=ep.extend({retrieve:sN({method:"GET",fullPath:"/v1/invoice_payments/{invoice_payment}"}),list:sN({method:"GET",fullPath:"/v1/invoice_payments",methodType:"list"})}),sU=ep.method,sM=ep.extend({retrieve:sU({method:"GET",fullPath:"/v1/invoice_rendering_templates/{template}"}),list:sU({method:"GET",fullPath:"/v1/invoice_rendering_templates",methodType:"list"}),archive:sU({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/archive"}),unarchive:sU({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/unarchive"})}),sL=ep.method,sH=ep.extend({create:sL({method:"POST",fullPath:"/v1/invoices"}),retrieve:sL({method:"GET",fullPath:"/v1/invoices/{invoice}"}),update:sL({method:"POST",fullPath:"/v1/invoices/{invoice}"}),list:sL({method:"GET",fullPath:"/v1/invoices",methodType:"list"}),del:sL({method:"DELETE",fullPath:"/v1/invoices/{invoice}"}),addLines:sL({method:"POST",fullPath:"/v1/invoices/{invoice}/add_lines"}),attachPayment:sL({method:"POST",fullPath:"/v1/invoices/{invoice}/attach_payment"}),createPreview:sL({method:"POST",fullPath:"/v1/invoices/create_preview"}),finalizeInvoice:sL({method:"POST",fullPath:"/v1/invoices/{invoice}/finalize"}),listLineItems:sL({method:"GET",fullPath:"/v1/invoices/{invoice}/lines",methodType:"list"}),markUncollectible:sL({method:"POST",fullPath:"/v1/invoices/{invoice}/mark_uncollectible"}),pay:sL({method:"POST",fullPath:"/v1/invoices/{invoice}/pay"}),removeLines:sL({method:"POST",fullPath:"/v1/invoices/{invoice}/remove_lines"}),search:sL({method:"GET",fullPath:"/v1/invoices/search",methodType:"search"}),sendInvoice:sL({method:"POST",fullPath:"/v1/invoices/{invoice}/send"}),updateLines:sL({method:"POST",fullPath:"/v1/invoices/{invoice}/update_lines"}),updateLineItem:sL({method:"POST",fullPath:"/v1/invoices/{invoice}/lines/{line_item_id}"}),voidInvoice:sL({method:"POST",fullPath:"/v1/invoices/{invoice}/void"})}),sF=ep.method,sz=ep.extend({retrieve:sF({method:"GET",fullPath:"/v1/mandates/{mandate}"})}),s$=ep.method,sB="connect.stripe.com",sV=ep.extend({basePath:"/",authorizeUrl(e,t){e=e||{};let r="oauth/authorize";return(t=t||{}).express&&(r=`express/${r}`),e.response_type||(e.response_type="code"),e.client_id||(e.client_id=this._stripe.getClientId()),e.scope||(e.scope="read_write"),`https://${sB}/${r}?${b(e)}`},token:s$({method:"POST",path:"oauth/token",host:sB}),deauthorize(e,...t){return e.client_id||(e.client_id=this._stripe.getClientId()),s$({method:"POST",path:"oauth/deauthorize",host:sB}).apply(this,[e,...t])}}),sK=ep.method,sW=ep.extend({retrieve:sK({method:"GET",fullPath:"/v1/payment_attempt_records/{id}"}),list:sK({method:"GET",fullPath:"/v1/payment_attempt_records",methodType:"list"})}),sJ=ep.method,sX=ep.extend({create:sJ({method:"POST",fullPath:"/v1/payment_intents"}),retrieve:sJ({method:"GET",fullPath:"/v1/payment_intents/{intent}"}),update:sJ({method:"POST",fullPath:"/v1/payment_intents/{intent}"}),list:sJ({method:"GET",fullPath:"/v1/payment_intents",methodType:"list"}),applyCustomerBalance:sJ({method:"POST",fullPath:"/v1/payment_intents/{intent}/apply_customer_balance"}),cancel:sJ({method:"POST",fullPath:"/v1/payment_intents/{intent}/cancel"}),capture:sJ({method:"POST",fullPath:"/v1/payment_intents/{intent}/capture"}),confirm:sJ({method:"POST",fullPath:"/v1/payment_intents/{intent}/confirm"}),incrementAuthorization:sJ({method:"POST",fullPath:"/v1/payment_intents/{intent}/increment_authorization"}),listAmountDetailsLineItems:sJ({method:"GET",fullPath:"/v1/payment_intents/{intent}/amount_details_line_items",methodType:"list"}),search:sJ({method:"GET",fullPath:"/v1/payment_intents/search",methodType:"search"}),verifyMicrodeposits:sJ({method:"POST",fullPath:"/v1/payment_intents/{intent}/verify_microdeposits"})}),sY=ep.method,sQ=ep.extend({create:sY({method:"POST",fullPath:"/v1/payment_links"}),retrieve:sY({method:"GET",fullPath:"/v1/payment_links/{payment_link}"}),update:sY({method:"POST",fullPath:"/v1/payment_links/{payment_link}"}),list:sY({method:"GET",fullPath:"/v1/payment_links",methodType:"list"}),listLineItems:sY({method:"GET",fullPath:"/v1/payment_links/{payment_link}/line_items",methodType:"list"})}),sZ=ep.method,s1=ep.extend({create:sZ({method:"POST",fullPath:"/v1/payment_method_configurations"}),retrieve:sZ({method:"GET",fullPath:"/v1/payment_method_configurations/{configuration}"}),update:sZ({method:"POST",fullPath:"/v1/payment_method_configurations/{configuration}"}),list:sZ({method:"GET",fullPath:"/v1/payment_method_configurations",methodType:"list"})}),s0=ep.method,s2=ep.extend({create:s0({method:"POST",fullPath:"/v1/payment_method_domains"}),retrieve:s0({method:"GET",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),update:s0({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),list:s0({method:"GET",fullPath:"/v1/payment_method_domains",methodType:"list"}),validate:s0({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}/validate"})}),s8=ep.method,s5=ep.extend({create:s8({method:"POST",fullPath:"/v1/payment_methods"}),retrieve:s8({method:"GET",fullPath:"/v1/payment_methods/{payment_method}"}),update:s8({method:"POST",fullPath:"/v1/payment_methods/{payment_method}"}),list:s8({method:"GET",fullPath:"/v1/payment_methods",methodType:"list"}),attach:s8({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/attach"}),detach:s8({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/detach"})}),s4=ep.method,s6=ep.extend({retrieve:s4({method:"GET",fullPath:"/v1/payment_records/{id}"}),reportPayment:s4({method:"POST",fullPath:"/v1/payment_records/report_payment"}),reportPaymentAttempt:s4({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt"}),reportPaymentAttemptCanceled:s4({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_canceled"}),reportPaymentAttemptFailed:s4({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_failed"}),reportPaymentAttemptGuaranteed:s4({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_guaranteed"}),reportPaymentAttemptInformational:s4({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_informational"}),reportRefund:s4({method:"POST",fullPath:"/v1/payment_records/{id}/report_refund"})}),s7=ep.method,s3=ep.extend({create:s7({method:"POST",fullPath:"/v1/payouts"}),retrieve:s7({method:"GET",fullPath:"/v1/payouts/{payout}"}),update:s7({method:"POST",fullPath:"/v1/payouts/{payout}"}),list:s7({method:"GET",fullPath:"/v1/payouts",methodType:"list"}),cancel:s7({method:"POST",fullPath:"/v1/payouts/{payout}/cancel"}),reverse:s7({method:"POST",fullPath:"/v1/payouts/{payout}/reverse"})}),s9=ep.method,oe=ep.extend({create:s9({method:"POST",fullPath:"/v1/plans"}),retrieve:s9({method:"GET",fullPath:"/v1/plans/{plan}"}),update:s9({method:"POST",fullPath:"/v1/plans/{plan}"}),list:s9({method:"GET",fullPath:"/v1/plans",methodType:"list"}),del:s9({method:"DELETE",fullPath:"/v1/plans/{plan}"})}),ot=ep.method,or=ep.extend({create:ot({method:"POST",fullPath:"/v1/prices"}),retrieve:ot({method:"GET",fullPath:"/v1/prices/{price}"}),update:ot({method:"POST",fullPath:"/v1/prices/{price}"}),list:ot({method:"GET",fullPath:"/v1/prices",methodType:"list"}),search:ot({method:"GET",fullPath:"/v1/prices/search",methodType:"search"})}),os=ep.method,oo=ep.extend({create:os({method:"POST",fullPath:"/v1/products"}),retrieve:os({method:"GET",fullPath:"/v1/products/{id}"}),update:os({method:"POST",fullPath:"/v1/products/{id}"}),list:os({method:"GET",fullPath:"/v1/products",methodType:"list"}),del:os({method:"DELETE",fullPath:"/v1/products/{id}"}),createFeature:os({method:"POST",fullPath:"/v1/products/{product}/features"}),deleteFeature:os({method:"DELETE",fullPath:"/v1/products/{product}/features/{id}"}),listFeatures:os({method:"GET",fullPath:"/v1/products/{product}/features",methodType:"list"}),retrieveFeature:os({method:"GET",fullPath:"/v1/products/{product}/features/{id}"}),search:os({method:"GET",fullPath:"/v1/products/search",methodType:"search"})}),oi=ep.method,on=ep.extend({create:oi({method:"POST",fullPath:"/v1/promotion_codes"}),retrieve:oi({method:"GET",fullPath:"/v1/promotion_codes/{promotion_code}"}),update:oi({method:"POST",fullPath:"/v1/promotion_codes/{promotion_code}"}),list:oi({method:"GET",fullPath:"/v1/promotion_codes",methodType:"list"})}),oa=ep.method,ol=ep.extend({create:oa({method:"POST",fullPath:"/v1/quotes"}),retrieve:oa({method:"GET",fullPath:"/v1/quotes/{quote}"}),update:oa({method:"POST",fullPath:"/v1/quotes/{quote}"}),list:oa({method:"GET",fullPath:"/v1/quotes",methodType:"list"}),accept:oa({method:"POST",fullPath:"/v1/quotes/{quote}/accept"}),cancel:oa({method:"POST",fullPath:"/v1/quotes/{quote}/cancel"}),finalizeQuote:oa({method:"POST",fullPath:"/v1/quotes/{quote}/finalize"}),listComputedUpfrontLineItems:oa({method:"GET",fullPath:"/v1/quotes/{quote}/computed_upfront_line_items",methodType:"list"}),listLineItems:oa({method:"GET",fullPath:"/v1/quotes/{quote}/line_items",methodType:"list"}),pdf:oa({method:"GET",fullPath:"/v1/quotes/{quote}/pdf",host:"files.stripe.com",streaming:!0})}),oh=ep.method,ou=ep.extend({create:oh({method:"POST",fullPath:"/v1/refunds"}),retrieve:oh({method:"GET",fullPath:"/v1/refunds/{refund}"}),update:oh({method:"POST",fullPath:"/v1/refunds/{refund}"}),list:oh({method:"GET",fullPath:"/v1/refunds",methodType:"list"}),cancel:oh({method:"POST",fullPath:"/v1/refunds/{refund}/cancel"})}),od=ep.method,oc=ep.extend({retrieve:od({method:"GET",fullPath:"/v1/reviews/{review}"}),list:od({method:"GET",fullPath:"/v1/reviews",methodType:"list"}),approve:od({method:"POST",fullPath:"/v1/reviews/{review}/approve"})}),om=ep.method,op=ep.extend({list:om({method:"GET",fullPath:"/v1/setup_attempts",methodType:"list"})}),of=ep.method,oP=ep.extend({create:of({method:"POST",fullPath:"/v1/setup_intents"}),retrieve:of({method:"GET",fullPath:"/v1/setup_intents/{intent}"}),update:of({method:"POST",fullPath:"/v1/setup_intents/{intent}"}),list:of({method:"GET",fullPath:"/v1/setup_intents",methodType:"list"}),cancel:of({method:"POST",fullPath:"/v1/setup_intents/{intent}/cancel"}),confirm:of({method:"POST",fullPath:"/v1/setup_intents/{intent}/confirm"}),verifyMicrodeposits:of({method:"POST",fullPath:"/v1/setup_intents/{intent}/verify_microdeposits"})}),ov=ep.method,oT=ep.extend({create:ov({method:"POST",fullPath:"/v1/shipping_rates"}),retrieve:ov({method:"GET",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),update:ov({method:"POST",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),list:ov({method:"GET",fullPath:"/v1/shipping_rates",methodType:"list"})}),o_=ep.method,oy=ep.extend({create:o_({method:"POST",fullPath:"/v1/sources"}),retrieve:o_({method:"GET",fullPath:"/v1/sources/{source}"}),update:o_({method:"POST",fullPath:"/v1/sources/{source}"}),listSourceTransactions:o_({method:"GET",fullPath:"/v1/sources/{source}/source_transactions",methodType:"list"}),verify:o_({method:"POST",fullPath:"/v1/sources/{source}/verify"})}),og=ep.method,oE=ep.extend({create:og({method:"POST",fullPath:"/v1/subscription_items"}),retrieve:og({method:"GET",fullPath:"/v1/subscription_items/{item}"}),update:og({method:"POST",fullPath:"/v1/subscription_items/{item}"}),list:og({method:"GET",fullPath:"/v1/subscription_items",methodType:"list"}),del:og({method:"DELETE",fullPath:"/v1/subscription_items/{item}"})}),oS=ep.method,oO=ep.extend({create:oS({method:"POST",fullPath:"/v1/subscription_schedules"}),retrieve:oS({method:"GET",fullPath:"/v1/subscription_schedules/{schedule}"}),update:oS({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}"}),list:oS({method:"GET",fullPath:"/v1/subscription_schedules",methodType:"list"}),cancel:oS({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/cancel"}),release:oS({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/release"})}),ob=ep.method,ox=ep.extend({create:ob({method:"POST",fullPath:"/v1/subscriptions"}),retrieve:ob({method:"GET",fullPath:"/v1/subscriptions/{subscription_exposed_id}"}),update:ob({method:"POST",fullPath:"/v1/subscriptions/{subscription_exposed_id}"}),list:ob({method:"GET",fullPath:"/v1/subscriptions",methodType:"list"}),cancel:ob({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}"}),deleteDiscount:ob({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}/discount"}),migrate:ob({method:"POST",fullPath:"/v1/subscriptions/{subscription}/migrate"}),resume:ob({method:"POST",fullPath:"/v1/subscriptions/{subscription}/resume"}),search:ob({method:"GET",fullPath:"/v1/subscriptions/search",methodType:"search"})}),ow=ep.method,oG=ep.extend({retrieve:ow({method:"GET",fullPath:"/v1/tax_codes/{id}"}),list:ow({method:"GET",fullPath:"/v1/tax_codes",methodType:"list"})}),oC=ep.method,oA=ep.extend({create:oC({method:"POST",fullPath:"/v1/tax_ids"}),retrieve:oC({method:"GET",fullPath:"/v1/tax_ids/{id}"}),list:oC({method:"GET",fullPath:"/v1/tax_ids",methodType:"list"}),del:oC({method:"DELETE",fullPath:"/v1/tax_ids/{id}"})}),oR=ep.method,ok=ep.extend({create:oR({method:"POST",fullPath:"/v1/tax_rates"}),retrieve:oR({method:"GET",fullPath:"/v1/tax_rates/{tax_rate}"}),update:oR({method:"POST",fullPath:"/v1/tax_rates/{tax_rate}"}),list:oR({method:"GET",fullPath:"/v1/tax_rates",methodType:"list"})}),oI=ep.method,oq=ep.extend({create:oI({method:"POST",fullPath:"/v1/tokens"}),retrieve:oI({method:"GET",fullPath:"/v1/tokens/{token}"})}),oD=ep.method,oN=ep.extend({create:oD({method:"POST",fullPath:"/v1/topups"}),retrieve:oD({method:"GET",fullPath:"/v1/topups/{topup}"}),update:oD({method:"POST",fullPath:"/v1/topups/{topup}"}),list:oD({method:"GET",fullPath:"/v1/topups",methodType:"list"}),cancel:oD({method:"POST",fullPath:"/v1/topups/{topup}/cancel"})}),oj=ep.method,oU=ep.extend({create:oj({method:"POST",fullPath:"/v1/transfers"}),retrieve:oj({method:"GET",fullPath:"/v1/transfers/{transfer}"}),update:oj({method:"POST",fullPath:"/v1/transfers/{transfer}"}),list:oj({method:"GET",fullPath:"/v1/transfers",methodType:"list"}),createReversal:oj({method:"POST",fullPath:"/v1/transfers/{id}/reversals"}),listReversals:oj({method:"GET",fullPath:"/v1/transfers/{id}/reversals",methodType:"list"}),retrieveReversal:oj({method:"GET",fullPath:"/v1/transfers/{transfer}/reversals/{id}"}),updateReversal:oj({method:"POST",fullPath:"/v1/transfers/{transfer}/reversals/{id}"})}),oM=ep.method,oL=ep.extend({create:oM({method:"POST",fullPath:"/v1/webhook_endpoints"}),retrieve:oM({method:"GET",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),update:oM({method:"POST",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),list:oM({method:"GET",fullPath:"/v1/webhook_endpoints",methodType:"list"}),del:oM({method:"DELETE",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"})}),oH=eT("apps",{Secrets:ry}),oF=eT("billing",{Alerts:eq,CreditBalanceSummary:e5,CreditBalanceTransactions:e6,CreditGrants:e3,MeterEventAdjustments:tO,MeterEvents:tk,Meters:tN}),oz=eT("billingPortal",{Configurations:eX,Sessions:rE}),o$=eT("checkout",{Sessions:rO}),oB=eT("climate",{Orders:tL,Products:t5,Suppliers:rA}),oV=eT("entitlements",{ActiveEntitlements:ek,Features:tp}),oK=eT("financialConnections",{Accounts:eO,Sessions:rx,Transactions:rU}),oW=eT("forwarding",{Requests:rP}),oJ=eT("identity",{VerificationReports:rQ,VerificationSessions:r1}),oX=eT("issuing",{Authorizations:eU,Cardholders:e$,Cards:eV,Disputes:tn,PersonalizationDesigns:tQ,PhysicalBundles:t2,Tokens:rq,Transactions:rL}),oY=eT("radar",{EarlyFraudWarnings:tl,PaymentEvaluations:tX,ValueListItems:rW,ValueLists:rX}),oQ=eT("reporting",{ReportRuns:rc,ReportTypes:rp}),oZ=eT("sigma",{ScheduledQueryRuns:rT}),o1=eT("tax",{Associations:eN,Calculations:eF,Registrations:ru,Settings:rG,Transactions:rF}),o0=eT("terminal",{Configurations:eQ,ConnectionTokens:e2,Locations:tE,OnboardingLinks:tU,Readers:t6}),o2=eT("testHelpers",{ConfirmationTokens:e1,Customers:tr,Refunds:rl,TestClocks:rk,Issuing:eT("issuing",{Authorizations:eL,Cards:eW,PersonalizationDesigns:t1,Transactions:r$}),Terminal:eT("terminal",{Readers:t3}),Treasury:eT("treasury",{InboundTransfers:tT,OutboundPayments:tF,OutboundTransfers:tV,ReceivedCredits:re,ReceivedDebits:ro})}),o8=eT("treasury",{CreditReversals:te,DebitReversals:to,FinancialAccounts:tP,InboundTransfers:ty,OutboundPayments:t$,OutboundTransfers:tW,ReceivedCredits:rr,ReceivedDebits:rn,TransactionEntries:rN,Transactions:rV}),o5=eT("v2",{Billing:eT("billing",{MeterEventAdjustments:tx,MeterEventSession:tG,MeterEventStream:tA,MeterEvents:tq}),Core:eT("core",{AccountLinks:ey,AccountTokens:eE,Accounts:eA,EventDestinations:tu,Events:tc})}),o4="api.stripe.com",o6="/v1/",o7=["name","version","url","partner_id"],o3=["authenticator","apiVersion","typescript","maxNetworkRetries","httpAgent","httpClient","timeout","host","port","protocol","telemetry","appInfo","stripeAccount","stripeContext"],o9=e=>new en(e,ep.MAX_BUFFERED_REQUEST_METRICS),ie=function(e,t=o9){function r(o,i={}){if(!(this instanceof r))return new r(o,i);let n=this._getPropsFromConfig(i);this._platformFunctions=e,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 a=n.httpAgent||null;this._api={host:n.host||o4,port:n.port||"443",protocol:n.protocol||"https",basePath:o6,version:n.apiVersion||eP,timeout:k("timeout",n.timeout,8e4),maxNetworkRetries:k("maxNetworkRetries",n.maxNetworkRetries,2),agent:a,httpClient:n.httpClient||(a?this._platformFunctions.createNodeHttpClient(a):this._platformFunctions.createDefaultHttpClient()),dev:!1,stripeAccount:n.stripeAccount||null,stripeContext:n.stripeContext||null};let l=n.typescript||!1;l!==r.USER_AGENT.typescript&&(r.USER_AGENT.typescript=l),n.appInfo&&this._setAppInfo(n.appInfo),this._prepResources(),this._setAuthenticator(o,n.authenticator),this.errors=s,this.webhooks=r.webhooks,this._prevRequestMetrics=[],this._enableTelemetry=!1!==n.telemetry,this._requestSender=t(this),this.StripeResource=r.StripeResource}return r.PACKAGE_VERSION="20.3.1",r.API_VERSION=eP,r.USER_AGENT=Object.assign({bindings_version:r.PACKAGE_VERSION,lang:"node",publisher:"stripe",uname:null,typescript:!1},"undefined"==typeof process?{}:{lang_version:process.version,platform:process.platform}),r.StripeResource=ep,r.StripeContext=ef,r.resources=o,r.HttpClient=p,r.HttpClientResponse=f,r.CryptoProvider=a,r.webhooks=function(e){let t={DEFAULT_TOLERANCE:300,signature:null,constructEvent(e,r,s,o,i,n){try{if(!this.signature)throw Error("ERR: missing signature helper, unable to verify");this.signature.verifyHeader(e,r,s,o||t.DEFAULT_TOLERANCE,i,n)}catch(e){throw e instanceof l&&(e.message+="\nUse `await constructEventAsync(...)` instead of `constructEvent(...)`"),e}return e instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(e)):JSON.parse(e)},async constructEventAsync(e,r,s,o,i,n){if(!this.signature)throw Error("ERR: missing signature helper, unable to verify");return await this.signature.verifyHeaderAsync(e,r,s,o||t.DEFAULT_TOLERANCE,i,n),e instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(e)):JSON.parse(e)},generateTestHeaderString:function(e){let t=h(e),r=t.signature||t.cryptoProvider.computeHMACSignature(t.payloadString,t.secret);return t.generateHeaderString(r)},generateTestHeaderStringAsync:async function(e){let t=h(e),r=t.signature||await t.cryptoProvider.computeHMACSignatureAsync(t.payloadString,t.secret);return t.generateHeaderString(r)}},r={EXPECTED_SCHEME:"v1",verifyHeader(e,t,r,n,l,h){let{decodedHeader:u,decodedPayload:d,details:c,suspectPayloadType:m}=o(e,t,this.EXPECTED_SCHEME),p=/\s/.test(r),f=(l=l||a()).computeHMACSignature(s(d,c),r);return i(d,u,c,f,n,m,p,h),!0},async verifyHeaderAsync(e,t,r,n,l,h){let{decodedHeader:u,decodedPayload:d,details:c,suspectPayloadType:m}=o(e,t,this.EXPECTED_SCHEME),p=/\s/.test(r);l=l||a();let f=await l.computeHMACSignatureAsync(s(d,c),r);return i(d,u,c,f,n,m,p,h)}};function s(e,t){return`${t.timestamp}.${e}`}function o(e,t,r){if(!e)throw new Q(t,e,{message:"No webhook payload was provided."});let s="string"!=typeof e&&!(e instanceof Uint8Array),o=new TextDecoder("utf8"),i=e instanceof Uint8Array?o.decode(e):e;if(Array.isArray(t))throw Error("Unexpected: An array was passed as a header, which should not be possible for the stripe-signature header.");if(null==t||""==t)throw new Q(t,e,{message:"No stripe-signature header value was provided."});let n=t instanceof Uint8Array?o.decode(t):t,a="string"!=typeof n?null:n.split(",").reduce((e,t)=>{let s=t.split("=");return"t"===s[0]&&(e.timestamp=parseInt(s[1],10)),s[0]===r&&e.signatures.push(s[1]),e},{timestamp:-1,signatures:[]});if(!a||-1===a.timestamp)throw new Q(n,i,{message:"Unable to extract timestamp and signatures from header"});if(!a.signatures.length)throw new Q(n,i,{message:"No signatures found with expected scheme"});return{decodedPayload:i,decodedHeader:n,details:a,suspectPayloadType:s}}function i(t,r,s,o,i,n,a,l){let h=!!s.signatures.filter(e.secureCompare.bind(e,o)).length,u="\nLearn more about webhook signing and explore webhook integration examples for various frameworks at https://docs.stripe.com/webhooks/signature",d=a?"\n\nNote: The provided signing secret contains whitespace. This often indicates an extra newline or space is in the value":"";if(!h){if(n)throw new Q(r,t,{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. \nSignature verification is impossible without access to the original signed material. \n"+u+"\n"+d});throw new Q(r,t,{message:"No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe? \n 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.\n"+u+"\n"+d})}let c=Math.floor(("number"==typeof l?l:Date.now())/1e3)-s.timestamp;if(i>0&&c>i)throw new Q(r,t,{message:"Timestamp outside the tolerance zone"});return!0}let n=null;function a(){return n||(n=e.createDefaultCryptoProvider()),n}function h(e){if(!e)throw new $({message:"Options are required"});let t=Math.floor(e.timestamp)||Math.floor(Date.now()/1e3),s=e.scheme||r.EXPECTED_SCHEME,o=e.cryptoProvider||a(),i=`${t}.${e.payload}`;return Object.assign(Object.assign({},e),{timestamp:t,scheme:s,cryptoProvider:o,payloadString:i,generateHeaderString:e=>`t=${t},${s}=${e}`})}return t.signature=r,t}(e),r.errors=s,r.createNodeHttpClient=e.createNodeHttpClient,r.createFetchHttpClient=e.createFetchHttpClient,r.createNodeCryptoProvider=e.createNodeCryptoProvider,r.createSubtleCryptoProvider=e.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(e,t,r,s){return this._requestSender._rawRequest(e,t,r,s)},_setAuthenticator(e,t){if(e&&t)throw Error("Can't specify both apiKey and authenticator");if(!e&&!t)throw Error("Neither apiKey nor config.authenticator provided");this._authenticator=e?I(e):t},_setAppInfo(e){if(e&&"object"!=typeof e)throw Error("AppInfo must be an object.");if(e&&!e.name)throw Error("AppInfo.name is required");e=e||{},this._appInfo=o7.reduce((t,r)=>("string"==typeof e[r]&&((t=t||{})[r]=e[r]),t),{})},_setApiField(e,t){this._api[e]=t},getApiField(e){return this._api[e]},setClientId(e){this._clientId=e},getClientId(){return this._clientId},getConstant:e=>{switch(e){case"DEFAULT_HOST":return o4;case"DEFAULT_PORT":return"443";case"DEFAULT_BASE_PATH":return o6;case"DEFAULT_API_VERSION":return eP;case"DEFAULT_TIMEOUT":return 8e4;case"MAX_NETWORK_RETRY_DELAY_SEC":return 5;case"INITIAL_NETWORK_RETRY_DELAY_SEC":return .5}return r[e]},getMaxNetworkRetries(){return this.getApiField("maxNetworkRetries")},_setApiNumberField(e,t,r){let s=k(e,t,r);this._setApiField(e,s)},getMaxNetworkRetryDelay:()=>5,getInitialNetworkRetryDelay:()=>.5,getClientUserAgent(e){return this.getClientUserAgentSeeded(r.USER_AGENT,e)},getClientUserAgentSeeded(e,t){this._platformFunctions.getUname().then(r=>{var s;let o={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=encodeURIComponent(null!==(s=e[t])&&void 0!==s?s:"null"));o.uname=encodeURIComponent(r||"UNKNOWN");let i=this.getApiField("httpClient");i&&(o.httplib=encodeURIComponent(i.getClientName())),this._appInfo&&(o.application=this._appInfo),t(JSON.stringify(o))})},getAppInfoAsString(){if(!this._appInfo)return"";let e=this._appInfo.name;return this._appInfo.version&&(e+=`/${this._appInfo.version}`),this._appInfo.url&&(e+=` (${this._appInfo.url})`),e},getTelemetryEnabled(){return this._enableTelemetry},_prepResources(){for(let e in o)Object.prototype.hasOwnProperty.call(o,e)&&(this["OAuth"===e?"oauth":e[0].toLowerCase()+e.substring(1)]=new o[e](this))},_getPropsFromConfig(e){if(!e)return{};let t="string"==typeof e;if(!(e===Object(e)&&!Array.isArray(e))&&!t)throw Error("Config must either be an object or a string");if(t)return{apiVersion:e};if(Object.keys(e).filter(e=>!o3.includes(e)).length>0)throw Error(`Config object may only contain the following: ${o3.join(", ")}`);return e},parseEventNotification(e,t,r,s,o,i){let n=this.webhooks.constructEvent(e,t,r,s,o,i);return n.context&&(n.context=ef.parse(n.context)),n.fetchEvent=()=>this._requestSender._rawRequest("GET",`/v2/core/events/${n.id}`,void 0,{stripeContext:n.context},["fetch_event"]),n.fetchRelatedObject=()=>n.related_object?this._requestSender._rawRequest("GET",n.related_object.url,void 0,{stripeContext:n.context},["fetch_related_object"]):Promise.resolve(null),n}},r}(new ei)}};