@stacksjs/orm 0.70.78 → 0.70.80

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/dist/index.js CHANGED
@@ -1,31 +1,31 @@
1
1
  // @bun
2
- var o3=Object.create;var{getPrototypeOf:s3,defineProperty:w9,getOwnPropertyNames:r3}=Object;var t3=Object.prototype.hasOwnProperty;function e3($){return this[$]}var $B,ZB,JB=($,Z,J)=>{var Q=$!=null&&typeof $==="object";if(Q){var X=Z?$B??=new WeakMap:ZB??=new WeakMap,Y=X.get($);if(Y)return Y}J=$!=null?o3(s3($)):{};let G=Z||!$||!$.__esModule?w9(J,"default",{value:$,enumerable:!0}):J;for(let V of r3($))if(!t3.call(G,V))w9(G,V,{get:e3.bind($,V),enumerable:!0});if(Q)X.set($,G);return G};var K=($,Z)=>()=>(Z||$((Z={exports:{}}).exports,Z),Z.exports);var C=import.meta.require;var b0=K((u9)=>{Object.defineProperty(u9,"__esModule",{value:!0});u9.CryptoProviderOnlySupportsAsyncError=u9.CryptoProvider=void 0;class h9{computeHMACSignature($,Z){throw Error("computeHMACSignature not implemented.")}computeHMACSignatureAsync($,Z){throw Error("computeHMACSignatureAsync not implemented.")}computeSHA256Async($){throw Error("computeSHA256 not implemented.")}}u9.CryptoProvider=h9;class m9 extends Error{}u9.CryptoProviderOnlySupportsAsyncError=m9});var i9=K((p9)=>{Object.defineProperty(p9,"__esModule",{value:!0});p9.NodeCryptoProvider=void 0;var n9=C("crypto"),RB=b0();class l9 extends RB.CryptoProvider{computeHMACSignature($,Z){return n9.createHmac("sha256",Z).update($,"utf8").digest("hex")}async computeHMACSignatureAsync($,Z){return await this.computeHMACSignature($,Z)}async computeSHA256Async($){return new Uint8Array(await n9.createHash("sha256").update($).digest())}}p9.NodeCryptoProvider=l9});var j0=K((o9)=>{Object.defineProperty(o9,"__esModule",{value:!0});o9.HttpClientResponse=o9.HttpClient=void 0;class H0{getClientName(){throw Error("getClientName not implemented.")}makeRequest($,Z,J,Q,X,Y,G,V){throw Error("makeRequest not implemented.")}static makeTimeoutError(){let $=TypeError(H0.TIMEOUT_ERROR_CODE);return $.code=H0.TIMEOUT_ERROR_CODE,$}}o9.HttpClient=H0;H0.CONNECTION_CLOSED_ERROR_CODES=["ECONNRESET","EPIPE"];H0.TIMEOUT_ERROR_CODE="ETIMEDOUT";class a9{constructor($,Z){this._statusCode=$,this._headers=Z}getStatusCode(){return this._statusCode}getHeaders(){return this._headers}getRawResponse(){throw Error("getRawResponse not implemented.")}toStream($){throw Error("toStream not implemented.")}toJSON(){throw Error("toJSON not implemented.")}}o9.HttpClientResponse=a9});var XZ=K((JZ)=>{Object.defineProperty(JZ,"__esModule",{value:!0});JZ.NodeHttpClientResponse=JZ.NodeHttpClient=void 0;var r9=C("http"),t9=C("https"),A$=j0(),e9=r9.default||r9,$Z=t9.default||t9,vB=new e9.Agent({keepAlive:!0}),bB=new $Z.Agent({keepAlive:!0});class ZZ extends A$.HttpClient{constructor($){super();this._agent=$}getClientName(){return"node"}makeRequest($,Z,J,Q,X,Y,G,V){let U=G==="http",W=this._agent;if(!W)W=U?vB:bB;return new Promise((z,L)=>{let H=(U?e9:$Z).request({host:$,port:Z,path:J,method:Q,agent:W,headers:X,ciphers:"DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2:!MD5"});H.setTimeout(V,()=>{H.destroy(A$.HttpClient.makeTimeoutError())}),H.on("response",(T)=>{z(new N$(T))}),H.on("error",(T)=>{L(T)}),H.once("socket",(T)=>{if(T.connecting)T.once(U?"connect":"secureConnect",()=>{H.write(Y),H.end()});else H.write(Y),H.end()})})}}JZ.NodeHttpClient=ZZ;class N$ extends A$.HttpClientResponse{constructor($){super($.statusCode,$.headers||{});this._res=$}getRawResponse(){return this._res}toStream($){return this._res.once("end",()=>$()),this._res}toJSON(){return new Promise(($,Z)=>{let J="";this._res.setEncoding("utf8"),this._res.on("data",(Q)=>{J+=Q}),this._res.once("end",()=>{try{$(JSON.parse(J))}catch(Q){Z(Q)}})})}}JZ.NodeHttpClientResponse=N$});var c=K((WZ)=>{Object.defineProperty(WZ,"__esModule",{value:!0});WZ.parseHeadersForFetch=WZ.parseHttpHeaderAsNumber=WZ.parseHttpHeaderAsString=WZ.getAPIMode=WZ.jsonStringifyRequestData=WZ.concat=WZ.createApiKeyAuthenticator=WZ.detectAIAgent=WZ.AI_AGENTS=WZ.determineProcessUserAgentProperties=WZ.validateInteger=WZ.flattenAndStringify=WZ.isObject=WZ.emitWarning=WZ.pascalToCamelCase=WZ.callbackifyPromiseWithTimeout=WZ.normalizeHeader=WZ.normalizeHeaders=WZ.removeNullish=WZ.protoExtend=WZ.getOptionsFromArgs=WZ.getDataFromArgs=WZ.extractUrlParams=WZ.makeURLInterpolator=WZ.queryStringifyRequestData=WZ.isOptionsHash=void 0;var I$=["apiKey","idempotencyKey","stripeAccount","apiVersion","maxNetworkRetries","timeout","host","authenticator","stripeContext","headers","additionalHeaders","streaming"];function P$($){return $&&typeof $==="object"&&I$.some((Z)=>Object.prototype.hasOwnProperty.call($,Z))}WZ.isOptionsHash=P$;function fB($){return _B($)}WZ.queryStringifyRequestData=fB;function YZ($){return encodeURIComponent($).replace(/!/g,"%21").replace(/\*/g,"%2A").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27").replace(/%5B/g,"[").replace(/%5D/g,"]")}function MB($){if($ instanceof Date)return Math.floor($.getTime()/1000).toString();if($===null)return"";return String($)}function _B($){let Z=[];function J(Q,X){if(X===void 0)return;if(X===null||typeof X!=="object"||X instanceof Date){Z.push(YZ(Q)+"="+YZ(MB(X)));return}if(Array.isArray(X)){for(let Y=0;Y<X.length;Y++)if(X[Y]!==void 0)J(Q+"["+Y+"]",X[Y]);return}for(let Y of Object.keys(X))J(Q+"["+Y+"]",X[Y])}if(typeof $==="object"&&$!==null)for(let Q of Object.keys($))J(Q,$[Q]);return Z.join("&")}WZ.makeURLInterpolator=(()=>{let $={"\n":"\\n",'"':"\\\"","\u2028":"\\u2028","\u2029":"\\u2029"};return(Z)=>{let J=Z.replace(/["\n\r\u2028\u2029]/g,(Q)=>$[Q]);return(Q)=>{return J.replace(/\{([\s\S]+?)\}/g,(X,Y)=>{let G=Q[Y];if(gB(G))return encodeURIComponent(G);return""})}}})();function gB($){return["number","string","boolean"].includes(typeof $)}function hB($){let Z=$.match(/\{\w+\}/g);if(!Z)return[];return Z.map((J)=>J.replace(/[{}]/g,""))}WZ.extractUrlParams=hB;function mB($){if(!Array.isArray($)||!$[0]||typeof $[0]!=="object")return{};if(!P$($[0]))return $.shift();let Z=Object.keys($[0]),J=Z.filter((Q)=>I$.includes(Q));if(J.length>0&&J.length!==Z.length)S$(`Options found in arguments (${J.join(", ")}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options.`);return{}}WZ.getDataFromArgs=mB;function uB($){let Z={host:null,headers:{},settings:{},streaming:!1};if($.length>0){let J=$[$.length-1];if(typeof J==="string")Z.authenticator=x$($.pop());else if(P$(J)){let Q={...$.pop()},X=Object.keys(Q).filter((Y)=>!I$.includes(Y));if(X.length)S$(`Invalid options found (${X.join(", ")}); ignoring.`);if(Q.apiKey)Z.authenticator=x$(Q.apiKey);if(Q.idempotencyKey)Z.headers["Idempotency-Key"]=Q.idempotencyKey;if(Q.stripeAccount)Z.headers["Stripe-Account"]=Q.stripeAccount;if(Q.stripeContext){if(Z.headers["Stripe-Account"])throw Error("Can't specify both stripeAccount and stripeContext.");Z.headers["Stripe-Context"]=Q.stripeContext}if(Q.apiVersion)Z.headers["Stripe-Version"]=Q.apiVersion;if(Number.isInteger(Q.maxNetworkRetries))Z.settings.maxNetworkRetries=Q.maxNetworkRetries;if(Number.isInteger(Q.timeout))Z.settings.timeout=Q.timeout;if(Q.host)Z.host=Q.host;if(Q.authenticator){if(Q.apiKey)throw Error("Can't specify both apiKey and authenticator.");if(typeof Q.authenticator!=="function")throw Error("The authenticator must be a function receiving a request as the first parameter.");Z.authenticator=Q.authenticator}if(Q.headers)Object.assign(Z.headers,Q.headers);if(Q.additionalHeaders)Object.assign(Z.headers,Q.additionalHeaders);if(Q.streaming)Z.streaming=!0}}return Z}WZ.getOptionsFromArgs=uB;function cB($){let Z=this,J=Object.prototype.hasOwnProperty.call($,"constructor")?$.constructor:function(...Q){Z.apply(this,Q)};return Object.assign(J,Z),J.prototype=Object.create(Z.prototype),Object.assign(J.prototype,$),J}WZ.protoExtend=cB;function nB($){if(typeof $!=="object")throw Error("Argument must be an object");return Object.keys($).reduce((Z,J)=>{if($[J]!=null)Z[J]=$[J];return Z},{})}WZ.removeNullish=nB;function lB($){if(!($&&typeof $==="object"))return $;return Object.keys($).reduce((Z,J)=>{return Z[GZ(J)]=$[J],Z},{})}WZ.normalizeHeaders=lB;function GZ($){return $.split("-").map((Z)=>Z.charAt(0).toUpperCase()+Z.substr(1).toLowerCase()).join("-")}WZ.normalizeHeader=GZ;function pB($,Z){if(Z)return $.then((J)=>{setTimeout(()=>{Z(null,J)},0)},(J)=>{setTimeout(()=>{Z(J,null)},0)});return $}WZ.callbackifyPromiseWithTimeout=pB;function dB($){if($==="OAuth")return"oauth";else return $[0].toLowerCase()+$.substring(1)}WZ.pascalToCamelCase=dB;function S$($){if(typeof process.emitWarning!=="function")return console.warn(`Stripe: ${$}`);return process.emitWarning($,"Stripe")}WZ.emitWarning=S$;function VZ($){let Z=typeof $;return(Z==="function"||Z==="object")&&!!$}WZ.isObject=VZ;function iB($){let Z={},J=(Q,X)=>{Object.entries(Q).forEach(([Y,G])=>{let V=X?`${X}[${Y}]`:Y;if(VZ(G))if(!(G instanceof Uint8Array)&&!Object.prototype.hasOwnProperty.call(G,"data"))return J(G,V);else Z[V]=G;else Z[V]=String(G)})};return J($,null),Z}WZ.flattenAndStringify=iB;function aB($,Z,J){if(!Number.isInteger(Z))if(J!==void 0)return J;else throw Error(`${$} must be an integer`);return Z}WZ.validateInteger=aB;function oB(){return typeof process>"u"?{}:{lang_version:process.version}}WZ.determineProcessUserAgentProperties=oB;WZ.AI_AGENTS=[["ANTIGRAVITY_CLI_ALIAS","antigravity"],["CLAUDECODE","claude_code"],["CLINE_ACTIVE","cline"],["CODEX_SANDBOX","codex_cli"],["CODEX_THREAD_ID","codex_cli"],["CODEX_SANDBOX_NETWORK_DISABLED","codex_cli"],["CODEX_CI","codex_cli"],["CURSOR_AGENT","cursor"],["GEMINI_CLI","gemini_cli"],["OPENCLAW_SHELL","openclaw"],["OPENCODE","open_code"]];function sB($){for(let[Z,J]of WZ.AI_AGENTS)if($[Z])return J;return""}WZ.detectAIAgent=sB;function x$($){let Z=(J)=>{return J.headers.Authorization="Bearer "+$,Promise.resolve()};return Z._apiKey=$,Z}WZ.createApiKeyAuthenticator=x$;function rB($){let Z=$.reduce((X,Y)=>X+Y.length,0),J=new Uint8Array(Z),Q=0;return $.forEach((X)=>{J.set(X,Q),Q+=X.length}),J}WZ.concat=rB;function tB($,Z){if(this[$]instanceof Date)return Math.floor(this[$].getTime()/1000).toString();return Z}function eB($){return JSON.stringify($,tB)}WZ.jsonStringifyRequestData=eB;function $W($){if(!$)return"v1";return $.startsWith("/v2")?"v2":"v1"}WZ.getAPIMode=$W;function BZ($){if(Array.isArray($))return $.join(", ");return String($)}WZ.parseHttpHeaderAsString=BZ;function ZW($){let Z=Array.isArray($)?$[0]:$;return Number(Z)}WZ.parseHttpHeaderAsNumber=ZW;function JW($){return Object.entries($).map(([Z,J])=>{return[Z,BZ(J)]})}WZ.parseHeadersForFetch=JW});var HZ=K((LZ)=>{Object.defineProperty(LZ,"__esModule",{value:!0});LZ.FetchHttpClientResponse=LZ.FetchHttpClient=void 0;var IW=c(),f0=j0();class E8 extends f0.HttpClient{constructor($){super();if(!$){if(!globalThis.fetch)throw Error("fetch() function not provided and is not defined in the global scope. You must provide a fetch implementation.");$=globalThis.fetch}if(globalThis.AbortController)this._fetchFn=E8.makeFetchWithAbortTimeout($);else this._fetchFn=E8.makeFetchWithRaceTimeout($)}static makeFetchWithRaceTimeout($){return(Z,J,Q)=>{let X,Y=new Promise((V,U)=>{X=setTimeout(()=>{X=null,U(f0.HttpClient.makeTimeoutError())},Q)}),G=$(Z,J);return Promise.race([G,Y]).finally(()=>{if(X)clearTimeout(X)})}}static makeFetchWithAbortTimeout($){return async(Z,J,Q)=>{let X=new AbortController,Y=setTimeout(()=>{Y=null,X.abort(f0.HttpClient.makeTimeoutError())},Q);try{return await $(Z,{...J,signal:X.signal})}catch(G){if(G.name==="AbortError")throw f0.HttpClient.makeTimeoutError();else throw G}finally{if(Y)clearTimeout(Y)}}}getClientName(){return"fetch"}async makeRequest($,Z,J,Q,X,Y,G,V){let W=new URL(J,`${G==="http"?"http":"https"}://${$}`);W.port=Z;let B=Q=="POST"||Q=="PUT"||Q=="PATCH",z=Y||(B?"":void 0),L=await this._fetchFn(W.toString(),{method:Q,headers:(0,IW.parseHeadersForFetch)(X),body:z},V);return new F8(L)}}LZ.FetchHttpClient=E8;class F8 extends f0.HttpClientResponse{constructor($){super($.status,F8._transformHeadersToObject($.headers));this._res=$}getRawResponse(){return this._res}toStream($){return $(),this._res.body}toJSON(){return this._res.json()}static _transformHeadersToObject($){let Z={};for(let J of $){if(!Array.isArray(J)||J.length!=2)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.");Z[J[0]]=J[1]}return Z}}LZ.FetchHttpClientResponse=F8});var qZ=K((DZ)=>{Object.defineProperty(DZ,"__esModule",{value:!0});DZ.SubtleCryptoProvider=void 0;var wZ=b0();class TZ extends wZ.CryptoProvider{constructor($){super();this.subtleCrypto=$||crypto.subtle}computeHMACSignature($,Z){throw new wZ.CryptoProviderOnlySupportsAsyncError("SubtleCryptoProvider cannot be used in a synchronous context.")}async computeHMACSignatureAsync($,Z){let J=new TextEncoder,Q=await this.subtleCrypto.importKey("raw",J.encode(Z),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),X=await this.subtleCrypto.sign("hmac",Q,J.encode($)),Y=new Uint8Array(X),G=Array(Y.length);for(let V=0;V<Y.length;V++)G[V]=R$[Y[V]];return G.join("")}async computeSHA256Async($){return new Uint8Array(await this.subtleCrypto.digest("SHA-256",$))}}DZ.SubtleCryptoProvider=TZ;var R$=Array(256);for(let $=0;$<R$.length;$++)R$[$]=$.toString(16).padStart(2,"0")});var kZ=K((FZ)=>{Object.defineProperty(FZ,"__esModule",{value:!0});FZ.PlatformFunctions=void 0;var SW=HZ(),RW=qZ();class EZ{constructor(){this._fetchFn=null,this._agent=null}getPlatformInfo(){return null}uuid4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,($)=>{let Z=Math.random()*16|0;return($==="x"?Z:Z&3|8).toString(16)})}secureCompare($,Z){if($.length!==Z.length)return!1;let J=$.length,Q=0;for(let X=0;X<J;++X)Q|=$.charCodeAt(X)^Z.charCodeAt(X);return Q===0}createEmitter(){throw Error("createEmitter not implemented.")}tryBufferData($){throw Error("tryBufferData not implemented.")}createNodeHttpClient($){throw Error("createNodeHttpClient not implemented.")}createFetchHttpClient($){return new SW.FetchHttpClient($)}createDefaultHttpClient(){throw Error("createDefaultHttpClient not implemented.")}createNodeCryptoProvider(){throw Error("createNodeCryptoProvider not implemented.")}createSubtleCryptoProvider($){return new RW.SubtleCryptoProvider($)}createDefaultCryptoProvider(){throw Error("createDefaultCryptoProvider not implemented.")}}FZ.PlatformFunctions=EZ});var M0=K((xZ)=>{Object.defineProperty(xZ,"__esModule",{value:!0});xZ.TemporarySessionExpiredError=xZ.RateLimitError=xZ.StripeUnsupportedResponseTypeError=xZ.StripeUnsupportedGrantTypeError=xZ.StripeInvalidScopeError=xZ.StripeOAuthInvalidRequestError=xZ.StripeInvalidClientError=xZ.StripeInvalidGrantError=xZ.StripeOAuthError=xZ.StripeIdempotencyError=xZ.StripeSignatureVerificationError=xZ.StripeConnectionError=xZ.StripeRateLimitError=xZ.StripePermissionError=xZ.StripeAuthenticationError=xZ.StripeAPIError=xZ.StripeInvalidRequestError=xZ.StripeCardError=xZ.StripeError=xZ.generateV2Error=xZ.generateOAuthError=xZ.generateV1Error=void 0;var yW=($)=>{let Z=$.statusCode;if(Z===429||Z===400&&$.code==="rate_limit")return new f$($);if(Z===400||Z===404){if($.type==="idempotency_error")return new k8($);return new C8($)}if(Z===401)return new b$($);if(Z===402)return new y$($);if(Z===403)return new j$($);return new v$($)};xZ.generateV1Error=yW;var vW=($)=>{switch($.type){case"invalid_grant":return new M$($);case"invalid_client":return new _$($);case"invalid_request":return new g$($);case"invalid_scope":return new h$($);case"unsupported_grant_type":return new m$($);case"unsupported_response_type":return new u$($);default:return new d($)}};xZ.generateOAuthError=vW;var bW=($)=>{switch($.type){case"idempotency_error":return new k8($);case"rate_limit":return new c$($);case"temporary_session_expired":return new n$($)}switch($.code){case"invalid_fields":return new C8($)}return xZ.generateV1Error($)};xZ.generateV2Error=bW;class y extends Error{constructor($={},Z=null){super($.message);this.type=Z||this.constructor.name,this.raw=$,this.rawType=$.type,this.code=$.code,this.doc_url=$.doc_url,this.param=$.param,this.detail=$.detail,this.headers=$.headers,this.requestId=$.requestId,this.statusCode=$.statusCode,this.message=$.message??"",this.userMessage=$.user_message,this.charge=$.charge,this.decline_code=$.decline_code,this.payment_intent=$.payment_intent,this.payment_method=$.payment_method,this.payment_method_type=$.payment_method_type,this.setup_intent=$.setup_intent,this.source=$.source}}xZ.StripeError=y;y.generate=xZ.generateV1Error;class y$ extends y{constructor($={}){super($,"StripeCardError")}}xZ.StripeCardError=y$;class C8 extends y{constructor($={}){super($,"StripeInvalidRequestError")}}xZ.StripeInvalidRequestError=C8;class v$ extends y{constructor($={}){super($,"StripeAPIError")}}xZ.StripeAPIError=v$;class b$ extends y{constructor($={}){super($,"StripeAuthenticationError")}}xZ.StripeAuthenticationError=b$;class j$ extends y{constructor($={}){super($,"StripePermissionError")}}xZ.StripePermissionError=j$;class f$ extends y{constructor($={}){super($,"StripeRateLimitError")}}xZ.StripeRateLimitError=f$;class AZ extends y{constructor($={}){super($,"StripeConnectionError")}}xZ.StripeConnectionError=AZ;class NZ extends y{constructor($,Z,J={}){super(J,"StripeSignatureVerificationError");this.header=$,this.payload=Z}}xZ.StripeSignatureVerificationError=NZ;class k8 extends y{constructor($={}){super($,"StripeIdempotencyError")}}xZ.StripeIdempotencyError=k8;class d extends y{constructor($={},Z="StripeOAuthError"){super($,Z)}}xZ.StripeOAuthError=d;class M$ extends d{constructor($={}){super($,"StripeInvalidGrantError")}}xZ.StripeInvalidGrantError=M$;class _$ extends d{constructor($={}){super($,"StripeInvalidClientError")}}xZ.StripeInvalidClientError=_$;class g$ extends d{constructor($={}){super($,"StripeOAuthInvalidRequestError")}}xZ.StripeOAuthInvalidRequestError=g$;class h$ extends d{constructor($={}){super($,"StripeInvalidScopeError")}}xZ.StripeInvalidScopeError=h$;class m$ extends d{constructor($={}){super($,"StripeUnsupportedGrantTypeError")}}xZ.StripeUnsupportedGrantTypeError=m$;class u$ extends d{constructor($={}){super($,"StripeUnsupportedResponseTypeError")}}xZ.StripeUnsupportedResponseTypeError=u$;class c$ extends y{constructor($={}){super($,"RateLimitError")}}xZ.RateLimitError=c$;class n$ extends y{constructor($={}){super($,"TemporarySessionExpiredError")}}xZ.TemporarySessionExpiredError=n$});var fZ=K((bZ)=>{Object.defineProperty(bZ,"__esModule",{value:!0});bZ.NodePlatformFunctions=void 0;var A8=C("crypto"),PZ=C("events"),$U=i9(),SZ=XZ(),ZU=kZ(),JU=M0(),QU=c(),RZ=C("os");class yZ extends JU.StripeError{}class vZ extends ZU.PlatformFunctions{uuid4(){if(A8.randomUUID)return A8.randomUUID();return super.uuid4()}getPlatformInfo(){return`${process.platform} ${(0,RZ.release)()} ${(0,RZ.arch)()}`}secureCompare($,Z){if(!$||!Z)throw Error("secureCompare must receive two arguments");if($.length!==Z.length)return!1;if(A8.timingSafeEqual){let J=new TextEncoder,Q=J.encode($),X=J.encode(Z);return A8.timingSafeEqual(Q,X)}return super.secureCompare($,Z)}createEmitter(){return new PZ.EventEmitter}tryBufferData($){if(!($.file.data instanceof PZ.EventEmitter))return Promise.resolve($);let Z=[];return new Promise((J,Q)=>{$.file.data.on("data",(X)=>{Z.push(X)}).once("end",()=>{let X=Object.assign({},$);X.file.data=(0,QU.concat)(Z),J(X)}).on("error",(X)=>{Q(new yZ({message:"An error occurred while attempting to process the file for upload.",detail:X}))})})}createNodeHttpClient($){return new SZ.NodeHttpClient($)}createDefaultHttpClient(){return new SZ.NodeHttpClient}createNodeCryptoProvider(){return new $U.NodeCryptoProvider}createDefaultCryptoProvider(){return this.createNodeCryptoProvider()}}bZ.NodePlatformFunctions=vZ});var hZ=K((_Z)=>{Object.defineProperty(_Z,"__esModule",{value:!0});_Z.RequestSender=void 0;var w0=M0(),MZ=j0(),j=c(),XU=60;class _0{constructor($,Z){this._stripe=$,this._maxBufferedRequestMetric=Z}_normalizeStripeContext($,Z){if($)return $.toString()||null;return Z?.toString()||null}_addHeadersDirectlyToObject($,Z){$.requestId=Z["request-id"],$.stripeAccount=$.stripeAccount||Z["stripe-account"],$.apiVersion=$.apiVersion||Z["stripe-version"],$.idempotencyKey=$.idempotencyKey||Z["idempotency-key"]}_makeResponseEvent($,Z,J){let Q=Date.now(),X=Q-$.request_start_time;return(0,j.removeNullish)({api_version:J["stripe-version"],account:J["stripe-account"],idempotency_key:J["idempotency-key"],method:$.method,path:$.path,status:Z,request_id:this._getRequestId(J),elapsed:X,request_start_time:$.request_start_time,request_end_time:Q})}_getRequestId($){return $["request-id"]}_streamingResponseHandler($,Z,J){return(Q)=>{let X=Q.getHeaders(),Y=()=>{let V=this._makeResponseEvent($,Q.getStatusCode(),X);this._stripe._emitter.emit("response",V),this._recordRequestMetrics(this._getRequestId(X),V.elapsed,Z)},G=Q.toStream(Y);return this._addHeadersDirectlyToObject(G,X),J(null,G)}}_jsonResponseHandler($,Z,J,Q){return(X)=>{let Y=X.getHeaders(),G=this._getRequestId(Y),V=X.getStatusCode(),U=this._makeResponseEvent($,V,Y);this._stripe._emitter.emit("response",U),X.toJSON().then((W)=>{if(W.error){let B=typeof W.error==="string";if(B)W.error={type:W.error,message:W.error_description};W.error.headers=Y,W.error.statusCode=V,W.error.requestId=G;let z;if(B)z=(0,w0.generateOAuthError)(W.error);else if(Z==="v2")z=(0,w0.generateV2Error)(W.error);else z=(0,w0.generateV1Error)(W.error);throw z}return W},(W)=>{throw new w0.StripeAPIError({message:"Invalid JSON received from the Stripe API",exception:W,requestId:Y["request-id"]})}).then((W)=>{this._recordRequestMetrics(G,U.elapsed,J);let B=X.getRawResponse();this._addHeadersDirectlyToObject(B,Y),Object.defineProperty(W,"lastResponse",{enumerable:!1,writable:!1,value:B}),Q(null,W)},(W)=>Q(W,null))}}static _generateConnectionErrorMessage($){return`An error occurred with our connection to Stripe.${$>0?` Request was retried ${$} times.`:""}`}static _shouldRetry($,Z,J,Q){if(Q&&Z===0&&MZ.HttpClient.CONNECTION_CLOSED_ERROR_CODES.includes(Q.code))return!0;if(Z>=J)return!1;if(!$)return!0;if($.getHeaders()["stripe-should-retry"]==="false")return!1;if($.getHeaders()["stripe-should-retry"]==="true")return!0;if($.getStatusCode()===409)return!0;if($.getStatusCode()>=500)return!0;return!1}_getSleepTimeInMS($,Z=null){let J=this._stripe.getInitialNetworkRetryDelay(),Q=this._stripe.getMaxNetworkRetryDelay(),X=Math.min(J*Math.pow(2,$-1),Q);if(X*=0.5*(1+Math.random()),X=Math.max(J,X),Number.isInteger(Z)&&Z<=XU)X=Math.max(X,Z);return X*1000}_getMaxNetworkRetries($={}){return $.maxNetworkRetries!==void 0&&Number.isInteger($.maxNetworkRetries)?$.maxNetworkRetries:this._stripe.getMaxNetworkRetries()}_defaultIdempotencyKey($,Z,J){let Q=this._getMaxNetworkRetries(Z),X=()=>`stripe-node-retry-${this._stripe._platformFunctions.uuid4()}`;if(J==="v2"){if($==="POST"||$==="DELETE")return X()}else if(J==="v1"){if($==="POST"&&Q>0)return X()}return null}_makeHeaders({contentType:$,contentLength:Z,apiVersion:J,clientUserAgent:Q,method:X,userSuppliedHeaders:Y,userSuppliedSettings:G,stripeAccount:V,stripeContext:U,apiMode:W}){let B={Accept:"application/json","Content-Type":$,"User-Agent":this._getUserAgentString(W),"X-Stripe-Client-User-Agent":Q,"X-Stripe-Client-Telemetry":this._getTelemetryHeader(),"Stripe-Version":J,"Stripe-Account":V,"Stripe-Context":U,"Idempotency-Key":this._defaultIdempotencyKey(X,G,W)},z=X=="POST"||X=="PUT"||X=="PATCH";if(z||Z){if(!z)(0,j.emitWarning)(`${X} method had non-zero contentLength but no payload is expected for this verb`);B["Content-Length"]=Z}return Object.assign((0,j.removeNullish)(B),(0,j.normalizeHeaders)(Y))}_getUserAgentString($){let Z=this._stripe.getConstant("PACKAGE_VERSION"),J=this._stripe._appInfo?this._stripe.getAppInfoAsString():"",Q=this._stripe.getConstant("AI_AGENT"),X=`Stripe/${$} NodeBindings/${Z}`;if(J)X+=` ${J}`;if(Q)X+=` AIAgent/${Q}`;return X}_getTelemetryHeader(){if(this._stripe.getTelemetryEnabled()&&this._stripe._prevRequestMetrics.length>0){let $=this._stripe._prevRequestMetrics.shift();return JSON.stringify({last_request_metrics:$})}}_recordRequestMetrics($,Z,J){if(this._stripe.getTelemetryEnabled()&&$)if(this._stripe._prevRequestMetrics.length>this._maxBufferedRequestMetric)(0,j.emitWarning)("Request metrics buffer is full, dropping telemetry message.");else{let Q={request_id:$,request_duration_ms:Z};if(J&&J.length>0)Q.usage=J;this._stripe._prevRequestMetrics.push(Q)}}_rawRequest($,Z,J,Q,X){return new Promise((G,V)=>{let U;try{let H=$.toUpperCase();if(H!=="POST"&&J&&Object.keys(J).length!==0)throw Error("rawRequest only supports params on POST requests. Please pass null and add your parameters to path.");let T=[].slice.call([J,Q]),D=(0,j.getDataFromArgs)(T),q=H==="POST"?Object.assign({},D):null,O=(0,j.getOptionsFromArgs)(T),k=O.headers,N=O.authenticator;U={requestMethod:H,requestPath:Z,bodyData:q,queryData:{},authenticator:N,headers:k,host:O.host,streaming:!!O.streaming,settings:{},usage:X||["raw_request"]}}catch(H){V(H);return}function W(H,T){if(H)V(H);else G(T)}let{headers:B,settings:z}=U,L=U.authenticator;this._request(U.requestMethod,U.host,Z,U.bodyData,L,{headers:B,settings:z,streaming:U.streaming},U.usage,W)})}_getContentLength($){return typeof $==="string"?new TextEncoder().encode($).length:$.length}_request($,Z,J,Q,X,Y,G=[],V,U=null){let W;X=X??this._stripe._authenticator??null;let B=(0,j.getAPIMode)(J),z=(T,D,q,O,k)=>{return setTimeout(T,this._getSleepTimeInMS(O,k),D,q,O+1)},L=(T,D,q)=>{let O=Y.settings&&Y.settings.timeout&&Number.isInteger(Y.settings.timeout)&&Y.settings.timeout>=0?Y.settings.timeout:this._stripe.getApiField("timeout"),k={host:Z||this._stripe.getApiField("host"),port:this._stripe.getApiField("port"),path:J,method:$,headers:Object.assign({},D),body:W,protocol:this._stripe.getApiField("protocol")};X(k).then(()=>{let N=this._stripe.getApiField("httpClient").makeRequest(k.host,k.port,k.path,k.method,k.headers,k.body,k.protocol,O),R=Date.now(),M=(0,j.removeNullish)({api_version:T,account:(0,j.parseHttpHeaderAsString)(D["Stripe-Account"]),idempotency_key:(0,j.parseHttpHeaderAsString)(D["Idempotency-Key"]),method:$,path:J,request_start_time:R}),_=q||0,P0=this._getMaxNetworkRetries(Y.settings||{});this._stripe._emitter.emit("request",M),N.then((v)=>{if(_0._shouldRetry(v,_,P0))return z(L,T,D,_,(0,j.parseHttpHeaderAsNumber)(v.getHeaders()["retry-after"]));else if(Y.streaming&&v.getStatusCode()<400)return this._streamingResponseHandler(M,G,V)(v);else return this._jsonResponseHandler(M,B,G,V)(v)}).catch((v)=>{if(_0._shouldRetry(null,_,P0,v))return z(L,T,D,_,null);else{let a3=v.code&&v.code===MZ.HttpClient.TIMEOUT_ERROR_CODE;return V(new w0.StripeConnectionError({message:a3?`Request aborted due to timeout being reached (${O}ms)`:_0._generateConnectionErrorMessage(_),detail:v}))}})}).catch((N)=>{throw new w0.StripeError({message:"Unable to authenticate the request",exception:N})})},H=(T,D)=>{if(T)return V(T);W=D,this._stripe.getClientUserAgent((q)=>{let O=this._stripe.getApiField("version"),k=this._makeHeaders({contentType:B=="v2"?"application/json":"application/x-www-form-urlencoded",contentLength:this._getContentLength(D),apiVersion:O,clientUserAgent:q,method:$,userSuppliedHeaders:Y.headers??null,userSuppliedSettings:Y.settings??{},stripeAccount:Y.stripeAccount??this._stripe.getApiField("stripeAccount"),stripeContext:this._normalizeStripeContext(Y.stripeContext,this._stripe.getApiField("stripeContext")),apiMode:B});L(O,k,0)})};if(U)U($,Q,Y.headers,H);else{let T;if(B=="v2")T=Q?(0,j.jsonStringifyRequestData)(Q):"";else T=(0,j.queryStringifyRequestData)(Q||{});H(null,T)}}}_Z.RequestSender=_0});var dZ=K((lZ)=>{Object.defineProperty(lZ,"__esModule",{value:!0});lZ.makeAutoPaginationMethods=void 0;var N8=c();class d${constructor($,Z,J,Q){this.index=0,this.pagePromise=$,this.promiseCache={currentPromise:null},this.requestArgs=Z,this.spec=J,this.stripeResource=Q}async iterate($){if(!($&&$.data&&typeof $.data.length==="number"))throw Error("Unexpected: Stripe API response does not have a well-formed `data` array.");let Z=nZ(this.requestArgs);if(this.index<$.data.length){let J=Z?$.data.length-1-this.index:this.index,Q=$.data[J];return this.index+=1,{value:Q,done:!1}}else if($.has_more){this.index=0,this.pagePromise=this.getNextPage($);let J=await this.pagePromise;return this.iterate(J)}return{done:!0,value:void 0}}getNextPage($){throw Error("Unimplemented")}async _next(){return this.iterate(await this.pagePromise)}next(){if(this.promiseCache.currentPromise)return this.promiseCache.currentPromise;let $=(async()=>{let Z=await this._next();return this.promiseCache.currentPromise=null,Z})();return this.promiseCache.currentPromise=$,$}}class mZ extends d${getNextPage($){let Z=nZ(this.requestArgs),J=WU($,Z);return this.stripeResource._makeRequest(this.requestArgs,this.spec,{[Z?"ending_before":"starting_after"]:J})}}class uZ extends d${getNextPage($){if(!$.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:$.next_page})}}class cZ{constructor($,Z,J,Q){this.firstPagePromise=$,this.currentPageIterator=null,this.nextPageUrl=null,this.requestArgs=Z,this.spec=J,this.stripeResource=Q}async initFirstPage(){if(this.firstPagePromise){let $=await this.firstPagePromise;this.firstPagePromise=null,this.currentPageIterator=$.data[Symbol.iterator](),this.nextPageUrl=$.next_page_url||null}}async turnPage(){if(!this.nextPageUrl)return null;this.spec.fullPath=this.nextPageUrl;let $=await this.stripeResource._makeRequest([],this.spec,{});return this.nextPageUrl=$.next_page_url||null,this.currentPageIterator=$.data[Symbol.iterator](),this.currentPageIterator}async next(){if(await this.initFirstPage(),this.currentPageIterator){let J=this.currentPageIterator.next();if(!J.done)return{done:!1,value:J.value}}let $=await this.turnPage();if(!$)return{done:!0,value:void 0};let Z=$.next();if(!Z.done)return{done:!1,value:Z.value};return{done:!0,value:void 0}}}var YU=($,Z,J,Q)=>{let X=(0,N8.getAPIMode)(J.fullPath||J.path);if(X!=="v2"&&J.methodType==="search")return p$(new uZ(Q,Z,J,$));if(X!=="v2"&&J.methodType==="list")return p$(new mZ(Q,Z,J,$));if(X==="v2"&&J.methodType==="list")return p$(new cZ(Q,Z,J,$));return null};lZ.makeAutoPaginationMethods=YU;var p$=($)=>{let Z=UU((...X)=>$.next(...X)),J=zU(Z),Q={autoPagingEach:Z,autoPagingToArray:J,next:()=>$.next(),return:()=>{return{}},[GU()]:()=>{return Q}};return Q};function GU(){if(typeof Symbol<"u"&&Symbol.asyncIterator)return Symbol.asyncIterator;return"@@asyncIterator"}function VU($){if($.length<2)return null;let Z=$[1];if(typeof Z!=="function")throw Error(`The second argument to autoPagingEach, if present, must be a callback function; received ${typeof Z}`);return Z}function BU($){if($.length===0)return;let Z=$[0];if(typeof Z!=="function")throw Error(`The first argument to autoPagingEach, if present, must be a callback function; received ${typeof Z}`);if(Z.length===2)return Z;if(Z.length>2)throw Error(`The \`onItem\` callback function passed to autoPagingEach must accept at most two arguments; got ${Z}`);return function(Q,X){let Y=Z(Q);X(Y)}}function WU($,Z){let J=Z?0:$.data.length-1,Q=$.data[J],X=Q&&Q.id;if(!X)throw Error("Unexpected: No `id` found on the last item while auto-paging a list.");return X}function UU($){return function(){let J=[].slice.call(arguments),Q=BU(J),X=VU(J);if(J.length>2)throw Error(`autoPagingEach takes up to two arguments; received ${J}`);let Y=LU($,Q);return(0,N8.callbackifyPromiseWithTimeout)(Y,X)}}function zU($){return function(J,Q){let X=J&&J.limit;if(!X)throw Error("You must pass a `limit` option to autoPagingToArray, e.g., `autoPagingToArray({limit: 1000});`.");if(X>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 Y=new Promise((G,V)=>{let U=[];$((W)=>{if(U.push(W),U.length>=X)return!1}).then(()=>{G(U)}).catch(V)});return(0,N8.callbackifyPromiseWithTimeout)(Y,Q)}}function LU($,Z){return new Promise((J,Q)=>{function X(Y){if(Y.done){J();return}let G=Y.value;return new Promise((V)=>{Z(G,V)}).then((V)=>{if(V===!1)return X({done:!0,value:void 0});else return $().then(X)})}$().then(X).catch(Q)})}function nZ($){let Z=[].slice.call($);return!!(0,N8.getDataFromArgs)(Z).ending_before}});var sZ=K((aZ)=>{Object.defineProperty(aZ,"__esModule",{value:!0});aZ.stripeMethod=void 0;var iZ=c(),KU=dZ();function HU($){if($.path!==void 0&&$.fullPath!==void 0)throw Error(`Method spec specified both a 'path' (${$.path}) and a 'fullPath' (${$.fullPath}).`);return function(...Z){let J=typeof Z[Z.length-1]=="function"&&Z.pop();$.urlParams=(0,iZ.extractUrlParams)($.fullPath||this.createResourcePathWithSymbols($.path||""));let Q=(0,iZ.callbackifyPromiseWithTimeout)(this._makeRequest(Z,$,{}),J);return Object.assign(Q,(0,KU.makeAutoPaginationMethods)(this,Z,$,Q)),Q}}aZ.stripeMethod=HU});var I8=K((tZ)=>{Object.defineProperty(tZ,"__esModule",{value:!0});tZ.Decimal=tZ.isDecimal=tZ.DEFAULT_DIV_PRECISION=void 0;var wU={"ubb-usage-count":{mode:"significant-figures",value:15},"v1-api":{mode:"decimal-places",value:12}};tZ.DEFAULT_DIV_PRECISION=34;var rZ=30,x8=1e6;class P{constructor($,Z){let[J,Q]=P.normalize($,Z);this._coefficient=J,this._exponent=Q,Object.freeze(this)}static normalize($,Z){if($===0n)return[0n,0];let J=$,Q=Z;while(J!==0n&&J%10n===0n)J/=10n,Q+=1;return[J,Q]}static roundDivision($,Z,J,Q){if(Z===0n)return $;if(Q==="round-down")return $;let X=Z>0n===J>0n?1n:-1n;if(Q==="round-up")return $+X;if(Q==="ceil")return X===1n?$+1n:$;if(Q==="floor")return X===-1n?$-1n:$;let Y=Z<0n?-Z:Z,G=J<0n?-J:J,V=Y*2n,U;if(V===G)U=0;else if(V<G)U=-1;else U=1;if(U<0)return $;if(U>0)return $+X;if(Q==="half-up")return $+X;if(Q==="half-down")return $;if($%2n===0n)return $;else return $+X}add($){let Z=$;if(this._exponent===Z._exponent)return new P(this._coefficient+Z._coefficient,this._exponent);if(this._exponent<Z._exponent){let J=10n**BigInt(Z._exponent-this._exponent);return new P(this._coefficient+Z._coefficient*J,this._exponent)}else{let J=10n**BigInt(this._exponent-Z._exponent);return new P(this._coefficient*J+Z._coefficient,Z._exponent)}}sub($){let Z=$;if(this._exponent===Z._exponent)return new P(this._coefficient-Z._coefficient,this._exponent);if(this._exponent<Z._exponent){let J=10n**BigInt(Z._exponent-this._exponent);return new P(this._coefficient-Z._coefficient*J,this._exponent)}else{let J=10n**BigInt(this._exponent-Z._exponent);return new P(this._coefficient*J-Z._coefficient,Z._exponent)}}mul($){let Z=$;return new P(this._coefficient*Z._coefficient,this._exponent+Z._exponent)}div($,Z,J){if(Z<0||!Number.isInteger(Z))throw Error("precision must be a non-negative integer");let Q=$;if(Q._coefficient===0n)throw Error("Division by zero");let X=this._exponent-Q._exponent+Z,Y,G,V;if(X>=0){let W=this._coefficient*10n**BigInt(X);Y=W/Q._coefficient,G=W%Q._coefficient,V=Q._coefficient}else{let W=Q._coefficient*10n**BigInt(-X);Y=this._coefficient/W,G=this._coefficient%W,V=W}let U=P.roundDivision(Y,G,V,J);return new P(U,-Z)}cmp($){let Z=$;if(this._exponent===Z._exponent){if(this._coefficient<Z._coefficient)return-1;if(this._coefficient>Z._coefficient)return 1;return 0}if(this._exponent<Z._exponent){let J=10n**BigInt(Z._exponent-this._exponent),Q=Z._coefficient*J;if(this._coefficient<Q)return-1;if(this._coefficient>Q)return 1;return 0}else{let J=10n**BigInt(this._exponent-Z._exponent),Q=this._coefficient*J;if(Q<Z._coefficient)return-1;if(Q>Z._coefficient)return 1;return 0}}eq($){return this.cmp($)===0}lt($){return this.cmp($)===-1}lte($){return this.cmp($)<=0}gt($){return this.cmp($)===1}gte($){return this.cmp($)>=0}isZero(){return this._coefficient===0n}isNegative(){return this._coefficient<0n}isPositive(){return this._coefficient>0n}neg(){return new P(-this._coefficient,this._exponent)}abs(){if(this._coefficient<0n)return new P(-this._coefficient,this._exponent);return this}round($,Z){let J=typeof Z==="string"?wU[Z]:Z;if(J===void 0)throw Error(`Unknown rounding preset: "${Z}"`);if(J.value<0||!Number.isInteger(J.value))throw Error("DecimalRoundingOptions.value must be a non-negative integer");if(J.mode==="decimal-places"){let B=this.toFixed(J.value,$);return tZ.Decimal.from(B)}if(this._coefficient===0n)return this;let X=(this._coefficient<0n?(-this._coefficient).toString():this._coefficient.toString()).length;if(J.value===0)return tZ.Decimal.zero;if(X<=J.value)return this;let Y=X-J.value,G=10n**BigInt(Y),V=this._coefficient/G,U=this._coefficient%G,W=P.roundDivision(V,U,G,$);return new P(W,this._exponent+Y)}toString(){if(this._coefficient===0n)return"0";let $=this._coefficient.toString(),Z=$.startsWith("-"),J=Z?$.slice(1):$;if(this._exponent<0){let X=-this._exponent;if((X>=J.length?X-J.length:0)>rZ){if(J.length===1)return`${$}E${String(this._exponent)}`;let G=J[0]??"",V=J.slice(1),U=this._exponent+J.length-1;return`${Z?"-":""}${G}.${V}E${String(U)}`}if(X>=J.length){let G="0".repeat(X-J.length);return`${Z?"-":""}0.${G}${J}`}else{let G=J.slice(0,J.length-X),V=J.slice(J.length-X);return`${Z?"-":""}${G}.${V}`}}if(J.length+this._exponent<=rZ){if(this._exponent===0)return $;let X="0".repeat(this._exponent);return`${Z?"-":""}${J}${X}`}else{if(J.length===1)return`${$}E+${String(this._exponent)}`;let X=J[0]??"",Y=J.slice(1),G=this._exponent+J.length-1;return`${Z?"-":""}${X}.${Y}E+${String(G)}`}}toJSON(){return this.toString()}toNumber(){return Number(this.toString())}toFixed($,Z){if($<0||!Number.isInteger($))throw Error("decimalPlaces must be a non-negative integer");let J=(X)=>{let Y=X.toString(),G=Y.startsWith("-"),V=G?Y.slice(1):Y;if($===0)return Y;if($>=V.length){let U="0".repeat($-V.length);return`${G?"-":""}0.${U}${V}`}else{let U=V.slice(0,V.length-$),W=V.slice(V.length-$);return`${G?"-":""}${U}.${W}`}},Q=-$;if(this._exponent===Q)return J(this._coefficient);if(this._exponent<Q){let X=Q-this._exponent,Y=10n**BigInt(X),G=this._coefficient/Y,V=this._coefficient%Y,U=P.roundDivision(G,V,Y,Z);return J(U)}else{let X=this._exponent-Q,Y=this._coefficient*10n**BigInt(X);return J(Y)}}valueOf(){return this.toString()}}function TU($){return $ instanceof P}tZ.isDecimal=TU;tZ.Decimal={from($){if(typeof $==="bigint")return new P($,0);if(typeof $==="number"){if(!Number.isFinite($))throw Error("Number must be finite");return tZ.Decimal.from($.toString())}let Z=$.trim();if(Z==="")throw Error("Cannot parse empty string as Decimal");let J=/^([+-]?)(\d+)(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/.exec(Z);if(!J)throw Error(`Invalid decimal string: ${$}`);let Q=J[1]==="-"?-1n:1n,X=J[2]??"",Y=J[3]??"",G=J[4]?Number(J[4]):0;if(!Number.isSafeInteger(G)||G>x8||G<-x8)throw Error(`Exponent out of range: ${String(J[4])} exceeds safe integer bounds`);let V=X+Y,U=Q*BigInt(V),W=G-Y.length;if(!Number.isSafeInteger(W)||W>x8||W<-x8)throw Error(`Computed exponent out of range: ${String(W)} exceeds safe integer bounds`);return new P(U,W)},zero:new P(0n,0)}});var $1=K((eZ)=>{Object.defineProperty(eZ,"__esModule",{value:!0});eZ.coerceV2ResponseData=eZ.coerceV2RequestData=void 0;var qU=I8(),EU=($,Z)=>{if($==null)return $;switch(Z.kind){case"int64_string":return typeof $==="bigint"||typeof $==="number"?String($):$;case"decimal_string":return typeof $.toFixed==="function"&&typeof $.isZero==="function"?$.toString():$;case"object":{if(typeof $!=="object"||Array.isArray($))return $;let J=$,Q={};for(let X of Object.keys(J)){let Y=Z.fields[X];Q[X]=Y?eZ.coerceV2RequestData(J[X],Y):J[X]}return Q}case"array":{if(!Array.isArray($))return $;return $.map((J)=>eZ.coerceV2RequestData(J,Z.element))}case"nullable":return eZ.coerceV2RequestData($,Z.inner)}};eZ.coerceV2RequestData=EU;var FU=($,Z)=>{if($==null)return $;switch(Z.kind){case"int64_string":if(typeof $==="string")try{return BigInt($)}catch{throw Error(`Failed to coerce int64_string value: expected an integer string, got '${$}'`)}return $;case"decimal_string":if(typeof $==="string")try{return qU.Decimal.from($)}catch{throw Error(`Failed to coerce decimal_string value: expected a decimal string, got '${$}'`)}return $;case"object":{if(typeof $!=="object"||Array.isArray($))return $;let J=$;for(let Q of Object.keys(Z.fields))if(Q in J)J[Q]=eZ.coerceV2ResponseData(J[Q],Z.fields[Q]);return J}case"array":{if(!Array.isArray($))return $;for(let J=0;J<$.length;J++)$[J]=eZ.coerceV2ResponseData($[J],Z.element);return $}case"nullable":return eZ.coerceV2ResponseData($,Z.inner)}};eZ.coerceV2ResponseData=FU});var w=K((J1)=>{Object.defineProperty(J1,"__esModule",{value:!0});J1.StripeResource=void 0;var J0=c(),CU=sZ(),Z1=$1();m0.extend=J0.protoExtend;m0.method=CU.stripeMethod;m0.MAX_BUFFERED_REQUEST_METRICS=100;function m0($,Z){if(this._stripe=$,Z)throw Error("Support for curried url params was dropped in stripe-node v7.0.0. Instead, pass two ids.");this.basePath=(0,J0.makeURLInterpolator)(this.basePath||$.getApiField("basePath")),this.resourcePath=this.path,this.path=(0,J0.makeURLInterpolator)(this.path),this.initialize(...arguments)}J1.StripeResource=m0;m0.prototype={_stripe:null,path:"",resourcePath:"",basePath:null,initialize(){},requestDataProcessor:null,validateRequest:null,createFullPath($,Z){let J=[this.basePath(Z),this.path(Z)];if(typeof $==="function"){let Q=$(Z);if(Q)J.push(Q)}else J.push($);return this._joinUrlParts(J)},createResourcePathWithSymbols($){if($)return`/${this._joinUrlParts([this.resourcePath,$])}`;else return`/${this.resourcePath}`},_joinUrlParts($){return $.join("/").replace(/\/{2,}/g,"/")},_getRequestOpts($,Z,J){let Q=(Z.method||"GET").toUpperCase(),X=Z.usage||[],Y=Z.urlParams||[],G=Z.encode||((_)=>_),V=!!Z.fullPath,U=(0,J0.makeURLInterpolator)(V?Z.fullPath:Z.path||""),W=V?Z.fullPath:this.createResourcePathWithSymbols(Z.path),B=[].slice.call($),z=Y.reduce((_,P0)=>{let v=B.shift();if(typeof v!=="string")throw Error(`Stripe: Argument "${P0}" must be a string, but got: ${v} (on API request to \`${Q} ${W}\`)`);return _[P0]=v,_},{}),L=(0,J0.getDataFromArgs)(B),H=G(Object.assign({},L,J)),T=(0,J0.getOptionsFromArgs)(B),D=T.host||Z.host,q=!!Z.streaming||!!T.streaming;if(B.filter((_)=>_!=null).length)throw Error(`Stripe: Unknown arguments (${B}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options. (on API request to ${Q} \`${W}\`)`);let O=V?U(z):this.createFullPath(U,z),k=Object.assign(T.headers,Z.headers);if(Z.validator)Z.validator(H,{headers:k});let N=Z.method==="GET"||Z.method==="DELETE";return{requestMethod:Q,requestPath:O,bodyData:N?null:H,queryData:N?H:{},authenticator:T.authenticator??null,headers:k,host:D??null,streaming:q,settings:T.settings,usage:X}},_makeRequest($,Z,J){return new Promise((Q,X)=>{let Y;try{Y=this._getRequestOpts($,Z,J)}catch(z){X(z);return}if(Z.requestSchema&&Y.bodyData)Y.bodyData=(0,Z1.coerceV2RequestData)(Y.bodyData,Z.requestSchema);function G(z,L){if(z)X(z);else try{if(Z.responseSchema)(0,Z1.coerceV2ResponseData)(L,Z.responseSchema);Q(Z.transformResponseData?Z.transformResponseData(L):L)}catch(H){X(H)}}let V=Object.keys(Y.queryData).length===0,U=[Y.requestPath,V?"":"?",(0,J0.queryStringifyRequestData)(Y.queryData)].join(""),{headers:W,settings:B}=Y;this._stripe._requestSender._request(Y.requestMethod,Y.host,U,Y.bodyData,Y.authenticator,{headers:W,settings:B,streaming:Y.streaming},Y.usage,G,this.requestDataProcessor?.bind(this))})}}});var G1=K((X1)=>{Object.defineProperty(X1,"__esModule",{value:!0});X1.StripeContext=void 0;class T0{constructor($=[]){this._segments=[...$]}get segments(){return[...this._segments]}push($){if(!$)throw Error("Segment cannot be null or undefined");return new T0([...this._segments,$])}pop(){if(this._segments.length===0)throw Error("Cannot pop from an empty context");return new T0(this._segments.slice(0,-1))}toString(){return this._segments.join("/")}static parse($){if(!$)return new T0([]);return new T0($.split("/"))}}X1.StripeContext=T0});var W1=K((V1)=>{Object.defineProperty(V1,"__esModule",{value:!0});V1.createWebhooks=void 0;var o=M0(),kU=b0();function AU($){let Z={DEFAULT_TOLERANCE:300,signature:null,constructEvent(B,z,L,H,T,D){try{if(!this.signature)throw Error("ERR: missing signature helper, unable to verify");this.signature.verifyHeader(B,z,L,H||Z.DEFAULT_TOLERANCE,T,D)}catch(O){if(O instanceof kU.CryptoProviderOnlySupportsAsyncError)O.message+="\nUse `await constructEventAsync(...)` instead of `constructEvent(...)`";throw O}let q=B instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(B)):JSON.parse(B);if(q&&q.object==="v2.core.event")throw Error("You passed an event notification to stripe.webhooks.constructEvent, which expects a webhook payload. Use stripe.parseEventNotification instead.");return q},async constructEventAsync(B,z,L,H,T,D){if(!this.signature)throw Error("ERR: missing signature helper, unable to verify");await this.signature.verifyHeaderAsync(B,z,L,H||Z.DEFAULT_TOLERANCE,T,D);let q=B instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(B)):JSON.parse(B);if(q&&q.object==="v2.core.event")throw Error("You passed an event notification to stripe.webhooks.constructEvent, which expects a webhook payload. Use stripe.parseEventNotification instead.");return q},generateTestHeaderString:function(B){let z=W(B),L=z.signature||z.cryptoProvider.computeHMACSignature(z.payloadString,z.secret);return z.generateHeaderString(L)},generateTestHeaderStringAsync:async function(B){let z=W(B),L=z.signature||await z.cryptoProvider.computeHMACSignatureAsync(z.payloadString,z.secret);return z.generateHeaderString(L)}},J={EXPECTED_SCHEME:"v1",verifyHeader(B,z,L,H,T,D){let{decodedHeader:q,decodedPayload:O,details:k,suspectPayloadType:N}=X(B,z,this.EXPECTED_SCHEME),R=/\s/.test(L);T=T||U();let M=T.computeHMACSignature(Q(O,k),L);return Y(O,q,k,M,H,N,R,D),!0},async verifyHeaderAsync(B,z,L,H,T,D){let{decodedHeader:q,decodedPayload:O,details:k,suspectPayloadType:N}=X(B,z,this.EXPECTED_SCHEME),R=/\s/.test(L);T=T||U();let M=await T.computeHMACSignatureAsync(Q(O,k),L);return Y(O,q,k,M,H,N,R,D)}};function Q(B,z){return`${z.timestamp}.${B}`}function X(B,z,L){if(!B)throw new o.StripeSignatureVerificationError(z,B,{message:"No webhook payload was provided."});let H=typeof B!="string"&&!(B instanceof Uint8Array),T=new TextDecoder("utf8"),D=B instanceof Uint8Array?T.decode(B):B;if(Array.isArray(z))throw Error("Unexpected: An array was passed as a header, which should not be possible for the stripe-signature header.");if(z==null||z=="")throw new o.StripeSignatureVerificationError(z,B,{message:"No stripe-signature header value was provided."});let q=z instanceof Uint8Array?T.decode(z):z,O=G(q,L);if(!O||O.timestamp===-1)throw new o.StripeSignatureVerificationError(q,D,{message:"Unable to extract timestamp and signatures from header"});if(!O.signatures.length)throw new o.StripeSignatureVerificationError(q,D,{message:"No signatures found with expected scheme"});return{decodedPayload:D,decodedHeader:q,details:O,suspectPayloadType:H}}function Y(B,z,L,H,T,D,q,O){let k=!!L.signatures.filter($.secureCompare.bind($,H)).length,N=`
2
+ var i3=Object.create;var{getPrototypeOf:a3,defineProperty:H9,getOwnPropertyNames:o3}=Object;var s3=Object.prototype.hasOwnProperty;function r3($){return this[$]}var t3,e3,$B=($,Z,J)=>{var Q=$!=null&&typeof $==="object";if(Q){var X=Z?t3??=new WeakMap:e3??=new WeakMap,Y=X.get($);if(Y)return Y}J=$!=null?i3(a3($)):{};let G=Z||!$||!$.__esModule?H9(J,"default",{value:$,enumerable:!0}):J;for(let V of o3($))if(!s3.call(G,V))H9(G,V,{get:r3.bind($,V),enumerable:!0});if(Q)X.set($,G);return G};var K=($,Z)=>()=>(Z||$((Z={exports:{}}).exports,Z),Z.exports);var C=import.meta.require;var b0=K((h9)=>{Object.defineProperty(h9,"__esModule",{value:!0});h9.CryptoProviderOnlySupportsAsyncError=h9.CryptoProvider=void 0;class _9{computeHMACSignature($,Z){throw Error("computeHMACSignature not implemented.")}computeHMACSignatureAsync($,Z){throw Error("computeHMACSignatureAsync not implemented.")}computeSHA256Async($){throw Error("computeSHA256 not implemented.")}}h9.CryptoProvider=_9;class g9 extends Error{}h9.CryptoProviderOnlySupportsAsyncError=g9});var p9=K((n9)=>{Object.defineProperty(n9,"__esModule",{value:!0});n9.NodeCryptoProvider=void 0;var u9=C("crypto"),PB=b0();class c9 extends PB.CryptoProvider{computeHMACSignature($,Z){return u9.createHmac("sha256",Z).update($,"utf8").digest("hex")}async computeHMACSignatureAsync($,Z){return await this.computeHMACSignature($,Z)}async computeSHA256Async($){return new Uint8Array(await u9.createHash("sha256").update($).digest())}}n9.NodeCryptoProvider=c9});var j0=K((i9)=>{Object.defineProperty(i9,"__esModule",{value:!0});i9.HttpClientResponse=i9.HttpClient=void 0;class H0{getClientName(){throw Error("getClientName not implemented.")}makeRequest($,Z,J,Q,X,Y,G,V){throw Error("makeRequest not implemented.")}static makeTimeoutError(){let $=TypeError(H0.TIMEOUT_ERROR_CODE);return $.code=H0.TIMEOUT_ERROR_CODE,$}}i9.HttpClient=H0;H0.CONNECTION_CLOSED_ERROR_CODES=["ECONNRESET","EPIPE"];H0.TIMEOUT_ERROR_CODE="ETIMEDOUT";class d9{constructor($,Z){this._statusCode=$,this._headers=Z}getStatusCode(){return this._statusCode}getHeaders(){return this._headers}getRawResponse(){throw Error("getRawResponse not implemented.")}toStream($){throw Error("toStream not implemented.")}toJSON(){throw Error("toJSON not implemented.")}}i9.HttpClientResponse=d9});var JZ=K(($Z)=>{Object.defineProperty($Z,"__esModule",{value:!0});$Z.NodeHttpClientResponse=$Z.NodeHttpClient=void 0;var o9=C("http"),s9=C("https"),k$=j0(),r9=o9.default||o9,t9=s9.default||s9,RB=new r9.Agent({keepAlive:!0}),yB=new t9.Agent({keepAlive:!0});class e9 extends k$.HttpClient{constructor($){super();this._agent=$}getClientName(){return"node"}makeRequest($,Z,J,Q,X,Y,G,V){let U=G==="http",W=this._agent;if(!W)W=U?RB:yB;return new Promise((z,L)=>{let H=(U?r9:t9).request({host:$,port:Z,path:J,method:Q,agent:W,headers:X,ciphers:"DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2:!MD5"});H.setTimeout(V,()=>{H.destroy(k$.HttpClient.makeTimeoutError())}),H.on("response",(T)=>{z(new A$(T))}),H.on("error",(T)=>{L(T)}),H.once("socket",(T)=>{if(T.connecting)T.once(U?"connect":"secureConnect",()=>{H.write(Y),H.end()});else H.write(Y),H.end()})})}}$Z.NodeHttpClient=e9;class A$ extends k$.HttpClientResponse{constructor($){super($.statusCode,$.headers||{});this._res=$}getRawResponse(){return this._res}toStream($){return this._res.once("end",()=>$()),this._res}toJSON(){return new Promise(($,Z)=>{let J="";this._res.setEncoding("utf8"),this._res.on("data",(Q)=>{J+=Q}),this._res.once("end",()=>{try{$(JSON.parse(J))}catch(Q){Z(Q)}})})}}$Z.NodeHttpClientResponse=A$});var c=K((VZ)=>{Object.defineProperty(VZ,"__esModule",{value:!0});VZ.parseHeadersForFetch=VZ.parseHttpHeaderAsNumber=VZ.parseHttpHeaderAsString=VZ.getAPIMode=VZ.jsonStringifyRequestData=VZ.concat=VZ.createApiKeyAuthenticator=VZ.detectAIAgent=VZ.AI_AGENTS=VZ.determineProcessUserAgentProperties=VZ.validateInteger=VZ.flattenAndStringify=VZ.isObject=VZ.emitWarning=VZ.pascalToCamelCase=VZ.callbackifyPromiseWithTimeout=VZ.normalizeHeader=VZ.normalizeHeaders=VZ.removeNullish=VZ.protoExtend=VZ.getOptionsFromArgs=VZ.getDataFromArgs=VZ.extractUrlParams=VZ.makeURLInterpolator=VZ.queryStringifyRequestData=VZ.isOptionsHash=void 0;var x$=["apiKey","idempotencyKey","stripeAccount","apiVersion","maxNetworkRetries","timeout","host","authenticator","stripeContext","headers","additionalHeaders","streaming"];function I$($){return $&&typeof $==="object"&&x$.some((Z)=>Object.prototype.hasOwnProperty.call($,Z))}VZ.isOptionsHash=I$;function bB($){return fB($)}VZ.queryStringifyRequestData=bB;function QZ($){return encodeURIComponent($).replace(/!/g,"%21").replace(/\*/g,"%2A").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27").replace(/%5B/g,"[").replace(/%5D/g,"]")}function jB($){if($ instanceof Date)return Math.floor($.getTime()/1000).toString();if($===null)return"";return String($)}function fB($){let Z=[];function J(Q,X){if(X===void 0)return;if(X===null||typeof X!=="object"||X instanceof Date){Z.push(QZ(Q)+"="+QZ(jB(X)));return}if(Array.isArray(X)){for(let Y=0;Y<X.length;Y++)if(X[Y]!==void 0)J(Q+"["+Y+"]",X[Y]);return}for(let Y of Object.keys(X))J(Q+"["+Y+"]",X[Y])}if(typeof $==="object"&&$!==null)for(let Q of Object.keys($))J(Q,$[Q]);return Z.join("&")}VZ.makeURLInterpolator=(()=>{let $={"\n":"\\n",'"':"\\\"","\u2028":"\\u2028","\u2029":"\\u2029"};return(Z)=>{let J=Z.replace(/["\n\r\u2028\u2029]/g,(Q)=>$[Q]);return(Q)=>{return J.replace(/\{([\s\S]+?)\}/g,(X,Y)=>{let G=Q[Y];if(MB(G))return encodeURIComponent(G);return""})}}})();function MB($){return["number","string","boolean"].includes(typeof $)}function _B($){let Z=$.match(/\{\w+\}/g);if(!Z)return[];return Z.map((J)=>J.replace(/[{}]/g,""))}VZ.extractUrlParams=_B;function gB($){if(!Array.isArray($)||!$[0]||typeof $[0]!=="object")return{};if(!I$($[0]))return $.shift();let Z=Object.keys($[0]),J=Z.filter((Q)=>x$.includes(Q));if(J.length>0&&J.length!==Z.length)P$(`Options found in arguments (${J.join(", ")}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options.`);return{}}VZ.getDataFromArgs=gB;function hB($){let Z={host:null,headers:{},settings:{},streaming:!1};if($.length>0){let J=$[$.length-1];if(typeof J==="string")Z.authenticator=N$($.pop());else if(I$(J)){let Q={...$.pop()},X=Object.keys(Q).filter((Y)=>!x$.includes(Y));if(X.length)P$(`Invalid options found (${X.join(", ")}); ignoring.`);if(Q.apiKey)Z.authenticator=N$(Q.apiKey);if(Q.idempotencyKey)Z.headers["Idempotency-Key"]=Q.idempotencyKey;if(Q.stripeAccount)Z.headers["Stripe-Account"]=Q.stripeAccount;if(Q.stripeContext){if(Z.headers["Stripe-Account"])throw Error("Can't specify both stripeAccount and stripeContext.");Z.headers["Stripe-Context"]=Q.stripeContext}if(Q.apiVersion)Z.headers["Stripe-Version"]=Q.apiVersion;if(Number.isInteger(Q.maxNetworkRetries))Z.settings.maxNetworkRetries=Q.maxNetworkRetries;if(Number.isInteger(Q.timeout))Z.settings.timeout=Q.timeout;if(Q.host)Z.host=Q.host;if(Q.authenticator){if(Q.apiKey)throw Error("Can't specify both apiKey and authenticator.");if(typeof Q.authenticator!=="function")throw Error("The authenticator must be a function receiving a request as the first parameter.");Z.authenticator=Q.authenticator}if(Q.headers)Object.assign(Z.headers,Q.headers);if(Q.additionalHeaders)Object.assign(Z.headers,Q.additionalHeaders);if(Q.streaming)Z.streaming=!0}}return Z}VZ.getOptionsFromArgs=hB;function mB($){let Z=this,J=Object.prototype.hasOwnProperty.call($,"constructor")?$.constructor:function(...Q){Z.apply(this,Q)};return Object.assign(J,Z),J.prototype=Object.create(Z.prototype),Object.assign(J.prototype,$),J}VZ.protoExtend=mB;function uB($){if(typeof $!=="object")throw Error("Argument must be an object");return Object.keys($).reduce((Z,J)=>{if($[J]!=null)Z[J]=$[J];return Z},{})}VZ.removeNullish=uB;function cB($){if(!($&&typeof $==="object"))return $;return Object.keys($).reduce((Z,J)=>{return Z[XZ(J)]=$[J],Z},{})}VZ.normalizeHeaders=cB;function XZ($){return $.split("-").map((Z)=>Z.charAt(0).toUpperCase()+Z.substr(1).toLowerCase()).join("-")}VZ.normalizeHeader=XZ;function nB($,Z){if(Z)return $.then((J)=>{setTimeout(()=>{Z(null,J)},0)},(J)=>{setTimeout(()=>{Z(J,null)},0)});return $}VZ.callbackifyPromiseWithTimeout=nB;function lB($){if($==="OAuth")return"oauth";else return $[0].toLowerCase()+$.substring(1)}VZ.pascalToCamelCase=lB;function P$($){if(typeof process.emitWarning!=="function")return console.warn(`Stripe: ${$}`);return process.emitWarning($,"Stripe")}VZ.emitWarning=P$;function YZ($){let Z=typeof $;return(Z==="function"||Z==="object")&&!!$}VZ.isObject=YZ;function pB($){let Z={},J=(Q,X)=>{Object.entries(Q).forEach(([Y,G])=>{let V=X?`${X}[${Y}]`:Y;if(YZ(G))if(!(G instanceof Uint8Array)&&!Object.prototype.hasOwnProperty.call(G,"data"))return J(G,V);else Z[V]=G;else Z[V]=String(G)})};return J($,null),Z}VZ.flattenAndStringify=pB;function dB($,Z,J){if(!Number.isInteger(Z))if(J!==void 0)return J;else throw Error(`${$} must be an integer`);return Z}VZ.validateInteger=dB;function iB(){return typeof process>"u"?{}:{lang_version:process.version}}VZ.determineProcessUserAgentProperties=iB;VZ.AI_AGENTS=[["ANTIGRAVITY_CLI_ALIAS","antigravity"],["CLAUDECODE","claude_code"],["CLINE_ACTIVE","cline"],["CODEX_SANDBOX","codex_cli"],["CODEX_THREAD_ID","codex_cli"],["CODEX_SANDBOX_NETWORK_DISABLED","codex_cli"],["CODEX_CI","codex_cli"],["CURSOR_AGENT","cursor"],["GEMINI_CLI","gemini_cli"],["OPENCLAW_SHELL","openclaw"],["OPENCODE","open_code"]];function aB($){for(let[Z,J]of VZ.AI_AGENTS)if($[Z])return J;return""}VZ.detectAIAgent=aB;function N$($){let Z=(J)=>{return J.headers.Authorization="Bearer "+$,Promise.resolve()};return Z._apiKey=$,Z}VZ.createApiKeyAuthenticator=N$;function oB($){let Z=$.reduce((X,Y)=>X+Y.length,0),J=new Uint8Array(Z),Q=0;return $.forEach((X)=>{J.set(X,Q),Q+=X.length}),J}VZ.concat=oB;function sB($,Z){if(this[$]instanceof Date)return Math.floor(this[$].getTime()/1000).toString();return Z}function rB($){return JSON.stringify($,sB)}VZ.jsonStringifyRequestData=rB;function tB($){if(!$)return"v1";return $.startsWith("/v2")?"v2":"v1"}VZ.getAPIMode=tB;function GZ($){if(Array.isArray($))return $.join(", ");return String($)}VZ.parseHttpHeaderAsString=GZ;function eB($){let Z=Array.isArray($)?$[0]:$;return Number(Z)}VZ.parseHttpHeaderAsNumber=eB;function $W($){return Object.entries($).map(([Z,J])=>{return[Z,GZ(J)]})}VZ.parseHeadersForFetch=$W});var LZ=K((UZ)=>{Object.defineProperty(UZ,"__esModule",{value:!0});UZ.FetchHttpClientResponse=UZ.FetchHttpClient=void 0;var NW=c(),f0=j0();class E8 extends f0.HttpClient{constructor($){super();if(!$){if(!globalThis.fetch)throw Error("fetch() function not provided and is not defined in the global scope. You must provide a fetch implementation.");$=globalThis.fetch}if(globalThis.AbortController)this._fetchFn=E8.makeFetchWithAbortTimeout($);else this._fetchFn=E8.makeFetchWithRaceTimeout($)}static makeFetchWithRaceTimeout($){return(Z,J,Q)=>{let X,Y=new Promise((V,U)=>{X=setTimeout(()=>{X=null,U(f0.HttpClient.makeTimeoutError())},Q)}),G=$(Z,J);return Promise.race([G,Y]).finally(()=>{if(X)clearTimeout(X)})}}static makeFetchWithAbortTimeout($){return async(Z,J,Q)=>{let X=new AbortController,Y=setTimeout(()=>{Y=null,X.abort(f0.HttpClient.makeTimeoutError())},Q);try{return await $(Z,{...J,signal:X.signal})}catch(G){if(G.name==="AbortError")throw f0.HttpClient.makeTimeoutError();else throw G}finally{if(Y)clearTimeout(Y)}}}getClientName(){return"fetch"}async makeRequest($,Z,J,Q,X,Y,G,V){let W=new URL(J,`${G==="http"?"http":"https"}://${$}`);W.port=Z;let B=Q=="POST"||Q=="PUT"||Q=="PATCH",z=Y||(B?"":void 0),L=await this._fetchFn(W.toString(),{method:Q,headers:(0,NW.parseHeadersForFetch)(X),body:z},V);return new F8(L)}}UZ.FetchHttpClient=E8;class F8 extends f0.HttpClientResponse{constructor($){super($.status,F8._transformHeadersToObject($.headers));this._res=$}getRawResponse(){return this._res}toStream($){return $(),this._res.body}toJSON(){return this._res.json()}static _transformHeadersToObject($){let Z={};for(let J of $){if(!Array.isArray(J)||J.length!=2)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.");Z[J[0]]=J[1]}return Z}}UZ.FetchHttpClientResponse=F8});var DZ=K((wZ)=>{Object.defineProperty(wZ,"__esModule",{value:!0});wZ.SubtleCryptoProvider=void 0;var KZ=b0();class HZ extends KZ.CryptoProvider{constructor($){super();this.subtleCrypto=$||crypto.subtle}computeHMACSignature($,Z){throw new KZ.CryptoProviderOnlySupportsAsyncError("SubtleCryptoProvider cannot be used in a synchronous context.")}async computeHMACSignatureAsync($,Z){let J=new TextEncoder,Q=await this.subtleCrypto.importKey("raw",J.encode(Z),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),X=await this.subtleCrypto.sign("hmac",Q,J.encode($)),Y=new Uint8Array(X),G=Array(Y.length);for(let V=0;V<Y.length;V++)G[V]=S$[Y[V]];return G.join("")}async computeSHA256Async($){return new Uint8Array(await this.subtleCrypto.digest("SHA-256",$))}}wZ.SubtleCryptoProvider=HZ;var S$=Array(256);for(let $=0;$<S$.length;$++)S$[$]=$.toString(16).padStart(2,"0")});var FZ=K((qZ)=>{Object.defineProperty(qZ,"__esModule",{value:!0});qZ.PlatformFunctions=void 0;var IW=LZ(),PW=DZ();class OZ{constructor(){this._fetchFn=null,this._agent=null}getPlatformInfo(){return null}uuid4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,($)=>{let Z=Math.random()*16|0;return($==="x"?Z:Z&3|8).toString(16)})}secureCompare($,Z){if($.length!==Z.length)return!1;let J=$.length,Q=0;for(let X=0;X<J;++X)Q|=$.charCodeAt(X)^Z.charCodeAt(X);return Q===0}createEmitter(){throw Error("createEmitter not implemented.")}tryBufferData($){throw Error("tryBufferData not implemented.")}createNodeHttpClient($){throw Error("createNodeHttpClient not implemented.")}createFetchHttpClient($){return new IW.FetchHttpClient($)}createDefaultHttpClient(){throw Error("createDefaultHttpClient not implemented.")}createNodeCryptoProvider(){throw Error("createNodeCryptoProvider not implemented.")}createSubtleCryptoProvider($){return new PW.SubtleCryptoProvider($)}createDefaultCryptoProvider(){throw Error("createDefaultCryptoProvider not implemented.")}}qZ.PlatformFunctions=OZ});var M0=K((AZ)=>{Object.defineProperty(AZ,"__esModule",{value:!0});AZ.TemporarySessionExpiredError=AZ.RateLimitError=AZ.StripeUnsupportedResponseTypeError=AZ.StripeUnsupportedGrantTypeError=AZ.StripeInvalidScopeError=AZ.StripeOAuthInvalidRequestError=AZ.StripeInvalidClientError=AZ.StripeInvalidGrantError=AZ.StripeOAuthError=AZ.StripeIdempotencyError=AZ.StripeSignatureVerificationError=AZ.StripeConnectionError=AZ.StripeRateLimitError=AZ.StripePermissionError=AZ.StripeAuthenticationError=AZ.StripeAPIError=AZ.StripeInvalidRequestError=AZ.StripeCardError=AZ.StripeError=AZ.generateV2Error=AZ.generateOAuthError=AZ.generateV1Error=void 0;var SW=($)=>{let Z=$.statusCode;if(Z===429||Z===400&&$.code==="rate_limit")return new j$($);if(Z===400||Z===404){if($.type==="idempotency_error")return new k8($);return new C8($)}if(Z===401)return new v$($);if(Z===402)return new R$($);if(Z===403)return new b$($);return new y$($)};AZ.generateV1Error=SW;var RW=($)=>{switch($.type){case"invalid_grant":return new f$($);case"invalid_client":return new M$($);case"invalid_request":return new _$($);case"invalid_scope":return new g$($);case"unsupported_grant_type":return new h$($);case"unsupported_response_type":return new m$($);default:return new d($)}};AZ.generateOAuthError=RW;var yW=($)=>{switch($.type){case"idempotency_error":return new k8($);case"rate_limit":return new u$($);case"temporary_session_expired":return new c$($)}switch($.code){case"invalid_fields":return new C8($)}return AZ.generateV1Error($)};AZ.generateV2Error=yW;class y extends Error{constructor($={},Z=null){super($.message);this.type=Z||this.constructor.name,this.raw=$,this.rawType=$.type,this.code=$.code,this.doc_url=$.doc_url,this.param=$.param,this.detail=$.detail,this.headers=$.headers,this.requestId=$.requestId,this.statusCode=$.statusCode,this.message=$.message??"",this.userMessage=$.user_message,this.charge=$.charge,this.decline_code=$.decline_code,this.payment_intent=$.payment_intent,this.payment_method=$.payment_method,this.payment_method_type=$.payment_method_type,this.setup_intent=$.setup_intent,this.source=$.source}}AZ.StripeError=y;y.generate=AZ.generateV1Error;class R$ extends y{constructor($={}){super($,"StripeCardError")}}AZ.StripeCardError=R$;class C8 extends y{constructor($={}){super($,"StripeInvalidRequestError")}}AZ.StripeInvalidRequestError=C8;class y$ extends y{constructor($={}){super($,"StripeAPIError")}}AZ.StripeAPIError=y$;class v$ extends y{constructor($={}){super($,"StripeAuthenticationError")}}AZ.StripeAuthenticationError=v$;class b$ extends y{constructor($={}){super($,"StripePermissionError")}}AZ.StripePermissionError=b$;class j$ extends y{constructor($={}){super($,"StripeRateLimitError")}}AZ.StripeRateLimitError=j$;class CZ extends y{constructor($={}){super($,"StripeConnectionError")}}AZ.StripeConnectionError=CZ;class kZ extends y{constructor($,Z,J={}){super(J,"StripeSignatureVerificationError");this.header=$,this.payload=Z}}AZ.StripeSignatureVerificationError=kZ;class k8 extends y{constructor($={}){super($,"StripeIdempotencyError")}}AZ.StripeIdempotencyError=k8;class d extends y{constructor($={},Z="StripeOAuthError"){super($,Z)}}AZ.StripeOAuthError=d;class f$ extends d{constructor($={}){super($,"StripeInvalidGrantError")}}AZ.StripeInvalidGrantError=f$;class M$ extends d{constructor($={}){super($,"StripeInvalidClientError")}}AZ.StripeInvalidClientError=M$;class _$ extends d{constructor($={}){super($,"StripeOAuthInvalidRequestError")}}AZ.StripeOAuthInvalidRequestError=_$;class g$ extends d{constructor($={}){super($,"StripeInvalidScopeError")}}AZ.StripeInvalidScopeError=g$;class h$ extends d{constructor($={}){super($,"StripeUnsupportedGrantTypeError")}}AZ.StripeUnsupportedGrantTypeError=h$;class m$ extends d{constructor($={}){super($,"StripeUnsupportedResponseTypeError")}}AZ.StripeUnsupportedResponseTypeError=m$;class u$ extends y{constructor($={}){super($,"RateLimitError")}}AZ.RateLimitError=u$;class c$ extends y{constructor($={}){super($,"TemporarySessionExpiredError")}}AZ.TemporarySessionExpiredError=c$});var bZ=K((yZ)=>{Object.defineProperty(yZ,"__esModule",{value:!0});yZ.NodePlatformFunctions=void 0;var A8=C("crypto"),xZ=C("events"),tW=p9(),IZ=JZ(),eW=FZ(),$U=M0(),ZU=c(),PZ=C("os");class SZ extends $U.StripeError{}class RZ extends eW.PlatformFunctions{uuid4(){if(A8.randomUUID)return A8.randomUUID();return super.uuid4()}getPlatformInfo(){return`${process.platform} ${(0,PZ.release)()} ${(0,PZ.arch)()}`}secureCompare($,Z){if(!$||!Z)throw Error("secureCompare must receive two arguments");if($.length!==Z.length)return!1;if(A8.timingSafeEqual){let J=new TextEncoder,Q=J.encode($),X=J.encode(Z);return A8.timingSafeEqual(Q,X)}return super.secureCompare($,Z)}createEmitter(){return new xZ.EventEmitter}tryBufferData($){if(!($.file.data instanceof xZ.EventEmitter))return Promise.resolve($);let Z=[];return new Promise((J,Q)=>{$.file.data.on("data",(X)=>{Z.push(X)}).once("end",()=>{let X=Object.assign({},$);X.file.data=(0,ZU.concat)(Z),J(X)}).on("error",(X)=>{Q(new SZ({message:"An error occurred while attempting to process the file for upload.",detail:X}))})})}createNodeHttpClient($){return new IZ.NodeHttpClient($)}createDefaultHttpClient(){return new IZ.NodeHttpClient}createNodeCryptoProvider(){return new tW.NodeCryptoProvider}createDefaultCryptoProvider(){return this.createNodeCryptoProvider()}}yZ.NodePlatformFunctions=RZ});var _Z=K((fZ)=>{Object.defineProperty(fZ,"__esModule",{value:!0});fZ.RequestSender=void 0;var w0=M0(),jZ=j0(),j=c(),JU=60;class _0{constructor($,Z){this._stripe=$,this._maxBufferedRequestMetric=Z}_normalizeStripeContext($,Z){if($)return $.toString()||null;return Z?.toString()||null}_addHeadersDirectlyToObject($,Z){$.requestId=Z["request-id"],$.stripeAccount=$.stripeAccount||Z["stripe-account"],$.apiVersion=$.apiVersion||Z["stripe-version"],$.idempotencyKey=$.idempotencyKey||Z["idempotency-key"]}_makeResponseEvent($,Z,J){let Q=Date.now(),X=Q-$.request_start_time;return(0,j.removeNullish)({api_version:J["stripe-version"],account:J["stripe-account"],idempotency_key:J["idempotency-key"],method:$.method,path:$.path,status:Z,request_id:this._getRequestId(J),elapsed:X,request_start_time:$.request_start_time,request_end_time:Q})}_getRequestId($){return $["request-id"]}_streamingResponseHandler($,Z,J){return(Q)=>{let X=Q.getHeaders(),Y=()=>{let V=this._makeResponseEvent($,Q.getStatusCode(),X);this._stripe._emitter.emit("response",V),this._recordRequestMetrics(this._getRequestId(X),V.elapsed,Z)},G=Q.toStream(Y);return this._addHeadersDirectlyToObject(G,X),J(null,G)}}_jsonResponseHandler($,Z,J,Q){return(X)=>{let Y=X.getHeaders(),G=this._getRequestId(Y),V=X.getStatusCode(),U=this._makeResponseEvent($,V,Y);this._stripe._emitter.emit("response",U),X.toJSON().then((W)=>{if(W.error){let B=typeof W.error==="string";if(B)W.error={type:W.error,message:W.error_description};W.error.headers=Y,W.error.statusCode=V,W.error.requestId=G;let z;if(B)z=(0,w0.generateOAuthError)(W.error);else if(Z==="v2")z=(0,w0.generateV2Error)(W.error);else z=(0,w0.generateV1Error)(W.error);throw z}return W},(W)=>{throw new w0.StripeAPIError({message:"Invalid JSON received from the Stripe API",exception:W,requestId:Y["request-id"]})}).then((W)=>{this._recordRequestMetrics(G,U.elapsed,J);let B=X.getRawResponse();this._addHeadersDirectlyToObject(B,Y),Object.defineProperty(W,"lastResponse",{enumerable:!1,writable:!1,value:B}),Q(null,W)},(W)=>Q(W,null))}}static _generateConnectionErrorMessage($){return`An error occurred with our connection to Stripe.${$>0?` Request was retried ${$} times.`:""}`}static _shouldRetry($,Z,J,Q){if(Q&&Z===0&&jZ.HttpClient.CONNECTION_CLOSED_ERROR_CODES.includes(Q.code))return!0;if(Z>=J)return!1;if(!$)return!0;if($.getHeaders()["stripe-should-retry"]==="false")return!1;if($.getHeaders()["stripe-should-retry"]==="true")return!0;if($.getStatusCode()===409)return!0;if($.getStatusCode()>=500)return!0;return!1}_getSleepTimeInMS($,Z=null){let J=this._stripe.getInitialNetworkRetryDelay(),Q=this._stripe.getMaxNetworkRetryDelay(),X=Math.min(J*Math.pow(2,$-1),Q);if(X*=0.5*(1+Math.random()),X=Math.max(J,X),Number.isInteger(Z)&&Z<=JU)X=Math.max(X,Z);return X*1000}_getMaxNetworkRetries($={}){return $.maxNetworkRetries!==void 0&&Number.isInteger($.maxNetworkRetries)?$.maxNetworkRetries:this._stripe.getMaxNetworkRetries()}_defaultIdempotencyKey($,Z,J){let Q=this._getMaxNetworkRetries(Z),X=()=>`stripe-node-retry-${this._stripe._platformFunctions.uuid4()}`;if(J==="v2"){if($==="POST"||$==="DELETE")return X()}else if(J==="v1"){if($==="POST"&&Q>0)return X()}return null}_makeHeaders({contentType:$,contentLength:Z,apiVersion:J,clientUserAgent:Q,method:X,userSuppliedHeaders:Y,userSuppliedSettings:G,stripeAccount:V,stripeContext:U,apiMode:W}){let B={Accept:"application/json","Content-Type":$,"User-Agent":this._getUserAgentString(W),"X-Stripe-Client-User-Agent":Q,"X-Stripe-Client-Telemetry":this._getTelemetryHeader(),"Stripe-Version":J,"Stripe-Account":V,"Stripe-Context":U,"Idempotency-Key":this._defaultIdempotencyKey(X,G,W)},z=X=="POST"||X=="PUT"||X=="PATCH";if(z||Z){if(!z)(0,j.emitWarning)(`${X} method had non-zero contentLength but no payload is expected for this verb`);B["Content-Length"]=Z}return Object.assign((0,j.removeNullish)(B),(0,j.normalizeHeaders)(Y))}_getUserAgentString($){let Z=this._stripe.getConstant("PACKAGE_VERSION"),J=this._stripe._appInfo?this._stripe.getAppInfoAsString():"",Q=this._stripe.getConstant("AI_AGENT"),X=`Stripe/${$} NodeBindings/${Z}`;if(J)X+=` ${J}`;if(Q)X+=` AIAgent/${Q}`;return X}_getTelemetryHeader(){if(this._stripe.getTelemetryEnabled()&&this._stripe._prevRequestMetrics.length>0){let $=this._stripe._prevRequestMetrics.shift();return JSON.stringify({last_request_metrics:$})}}_recordRequestMetrics($,Z,J){if(this._stripe.getTelemetryEnabled()&&$)if(this._stripe._prevRequestMetrics.length>this._maxBufferedRequestMetric)(0,j.emitWarning)("Request metrics buffer is full, dropping telemetry message.");else{let Q={request_id:$,request_duration_ms:Z};if(J&&J.length>0)Q.usage=J;this._stripe._prevRequestMetrics.push(Q)}}_rawRequest($,Z,J,Q,X){return new Promise((G,V)=>{let U;try{let H=$.toUpperCase();if(H!=="POST"&&J&&Object.keys(J).length!==0)throw Error("rawRequest only supports params on POST requests. Please pass null and add your parameters to path.");let T=[].slice.call([J,Q]),D=(0,j.getDataFromArgs)(T),q=H==="POST"?Object.assign({},D):null,O=(0,j.getOptionsFromArgs)(T),k=O.headers,N=O.authenticator;U={requestMethod:H,requestPath:Z,bodyData:q,queryData:{},authenticator:N,headers:k,host:O.host,streaming:!!O.streaming,settings:{},usage:X||["raw_request"]}}catch(H){V(H);return}function W(H,T){if(H)V(H);else G(T)}let{headers:B,settings:z}=U,L=U.authenticator;this._request(U.requestMethod,U.host,Z,U.bodyData,L,{headers:B,settings:z,streaming:U.streaming},U.usage,W)})}_getContentLength($){return typeof $==="string"?new TextEncoder().encode($).length:$.length}_request($,Z,J,Q,X,Y,G=[],V,U=null){let W;X=X??this._stripe._authenticator??null;let B=(0,j.getAPIMode)(J),z=(T,D,q,O,k)=>{return setTimeout(T,this._getSleepTimeInMS(O,k),D,q,O+1)},L=(T,D,q)=>{let O=Y.settings&&Y.settings.timeout&&Number.isInteger(Y.settings.timeout)&&Y.settings.timeout>=0?Y.settings.timeout:this._stripe.getApiField("timeout"),k={host:Z||this._stripe.getApiField("host"),port:this._stripe.getApiField("port"),path:J,method:$,headers:Object.assign({},D),body:W,protocol:this._stripe.getApiField("protocol")};X(k).then(()=>{let N=this._stripe.getApiField("httpClient").makeRequest(k.host,k.port,k.path,k.method,k.headers,k.body,k.protocol,O),R=Date.now(),M=(0,j.removeNullish)({api_version:T,account:(0,j.parseHttpHeaderAsString)(D["Stripe-Account"]),idempotency_key:(0,j.parseHttpHeaderAsString)(D["Idempotency-Key"]),method:$,path:J,request_start_time:R}),_=q||0,P0=this._getMaxNetworkRetries(Y.settings||{});this._stripe._emitter.emit("request",M),N.then((v)=>{if(_0._shouldRetry(v,_,P0))return z(L,T,D,_,(0,j.parseHttpHeaderAsNumber)(v.getHeaders()["retry-after"]));else if(Y.streaming&&v.getStatusCode()<400)return this._streamingResponseHandler(M,G,V)(v);else return this._jsonResponseHandler(M,B,G,V)(v)}).catch((v)=>{if(_0._shouldRetry(null,_,P0,v))return z(L,T,D,_,null);else{let d3=v.code&&v.code===jZ.HttpClient.TIMEOUT_ERROR_CODE;return V(new w0.StripeConnectionError({message:d3?`Request aborted due to timeout being reached (${O}ms)`:_0._generateConnectionErrorMessage(_),detail:v}))}})}).catch((N)=>{throw new w0.StripeError({message:"Unable to authenticate the request",exception:N})})},H=(T,D)=>{if(T)return V(T);W=D,this._stripe.getClientUserAgent((q)=>{let O=this._stripe.getApiField("version"),k=this._makeHeaders({contentType:B=="v2"?"application/json":"application/x-www-form-urlencoded",contentLength:this._getContentLength(D),apiVersion:O,clientUserAgent:q,method:$,userSuppliedHeaders:Y.headers??null,userSuppliedSettings:Y.settings??{},stripeAccount:Y.stripeAccount??this._stripe.getApiField("stripeAccount"),stripeContext:this._normalizeStripeContext(Y.stripeContext,this._stripe.getApiField("stripeContext")),apiMode:B});L(O,k,0)})};if(U)U($,Q,Y.headers,H);else{let T;if(B=="v2")T=Q?(0,j.jsonStringifyRequestData)(Q):"";else T=(0,j.queryStringifyRequestData)(Q||{});H(null,T)}}}fZ.RequestSender=_0});var lZ=K((cZ)=>{Object.defineProperty(cZ,"__esModule",{value:!0});cZ.makeAutoPaginationMethods=void 0;var N8=c();class p${constructor($,Z,J,Q){this.index=0,this.pagePromise=$,this.promiseCache={currentPromise:null},this.requestArgs=Z,this.spec=J,this.stripeResource=Q}async iterate($){if(!($&&$.data&&typeof $.data.length==="number"))throw Error("Unexpected: Stripe API response does not have a well-formed `data` array.");let Z=uZ(this.requestArgs);if(this.index<$.data.length){let J=Z?$.data.length-1-this.index:this.index,Q=$.data[J];return this.index+=1,{value:Q,done:!1}}else if($.has_more){this.index=0,this.pagePromise=this.getNextPage($);let J=await this.pagePromise;return this.iterate(J)}return{done:!0,value:void 0}}getNextPage($){throw Error("Unimplemented")}async _next(){return this.iterate(await this.pagePromise)}next(){if(this.promiseCache.currentPromise)return this.promiseCache.currentPromise;let $=(async()=>{let Z=await this._next();return this.promiseCache.currentPromise=null,Z})();return this.promiseCache.currentPromise=$,$}}class gZ extends p${getNextPage($){let Z=uZ(this.requestArgs),J=VU($,Z);return this.stripeResource._makeRequest(this.requestArgs,this.spec,{[Z?"ending_before":"starting_after"]:J})}}class hZ extends p${getNextPage($){if(!$.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:$.next_page})}}class mZ{constructor($,Z,J,Q){this.firstPagePromise=$,this.currentPageIterator=null,this.nextPageUrl=null,this.requestArgs=Z,this.spec=J,this.stripeResource=Q}async initFirstPage(){if(this.firstPagePromise){let $=await this.firstPagePromise;this.firstPagePromise=null,this.currentPageIterator=$.data[Symbol.iterator](),this.nextPageUrl=$.next_page_url||null}}async turnPage(){if(!this.nextPageUrl)return null;this.spec.fullPath=this.nextPageUrl;let $=await this.stripeResource._makeRequest([],this.spec,{});return this.nextPageUrl=$.next_page_url||null,this.currentPageIterator=$.data[Symbol.iterator](),this.currentPageIterator}async next(){if(await this.initFirstPage(),this.currentPageIterator){let J=this.currentPageIterator.next();if(!J.done)return{done:!1,value:J.value}}let $=await this.turnPage();if(!$)return{done:!0,value:void 0};let Z=$.next();if(!Z.done)return{done:!1,value:Z.value};return{done:!0,value:void 0}}}var QU=($,Z,J,Q)=>{let X=(0,N8.getAPIMode)(J.fullPath||J.path);if(X!=="v2"&&J.methodType==="search")return l$(new hZ(Q,Z,J,$));if(X!=="v2"&&J.methodType==="list")return l$(new gZ(Q,Z,J,$));if(X==="v2"&&J.methodType==="list")return l$(new mZ(Q,Z,J,$));return null};cZ.makeAutoPaginationMethods=QU;var l$=($)=>{let Z=BU((...X)=>$.next(...X)),J=WU(Z),Q={autoPagingEach:Z,autoPagingToArray:J,next:()=>$.next(),return:()=>{return{}},[XU()]:()=>{return Q}};return Q};function XU(){if(typeof Symbol<"u"&&Symbol.asyncIterator)return Symbol.asyncIterator;return"@@asyncIterator"}function YU($){if($.length<2)return null;let Z=$[1];if(typeof Z!=="function")throw Error(`The second argument to autoPagingEach, if present, must be a callback function; received ${typeof Z}`);return Z}function GU($){if($.length===0)return;let Z=$[0];if(typeof Z!=="function")throw Error(`The first argument to autoPagingEach, if present, must be a callback function; received ${typeof Z}`);if(Z.length===2)return Z;if(Z.length>2)throw Error(`The \`onItem\` callback function passed to autoPagingEach must accept at most two arguments; got ${Z}`);return function(Q,X){let Y=Z(Q);X(Y)}}function VU($,Z){let J=Z?0:$.data.length-1,Q=$.data[J],X=Q&&Q.id;if(!X)throw Error("Unexpected: No `id` found on the last item while auto-paging a list.");return X}function BU($){return function(){let J=[].slice.call(arguments),Q=GU(J),X=YU(J);if(J.length>2)throw Error(`autoPagingEach takes up to two arguments; received ${J}`);let Y=UU($,Q);return(0,N8.callbackifyPromiseWithTimeout)(Y,X)}}function WU($){return function(J,Q){let X=J&&J.limit;if(!X)throw Error("You must pass a `limit` option to autoPagingToArray, e.g., `autoPagingToArray({limit: 1000});`.");if(X>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 Y=new Promise((G,V)=>{let U=[];$((W)=>{if(U.push(W),U.length>=X)return!1}).then(()=>{G(U)}).catch(V)});return(0,N8.callbackifyPromiseWithTimeout)(Y,Q)}}function UU($,Z){return new Promise((J,Q)=>{function X(Y){if(Y.done){J();return}let G=Y.value;return new Promise((V)=>{Z(G,V)}).then((V)=>{if(V===!1)return X({done:!0,value:void 0});else return $().then(X)})}$().then(X).catch(Q)})}function uZ($){let Z=[].slice.call($);return!!(0,N8.getDataFromArgs)(Z).ending_before}});var aZ=K((dZ)=>{Object.defineProperty(dZ,"__esModule",{value:!0});dZ.stripeMethod=void 0;var pZ=c(),zU=lZ();function LU($){if($.path!==void 0&&$.fullPath!==void 0)throw Error(`Method spec specified both a 'path' (${$.path}) and a 'fullPath' (${$.fullPath}).`);return function(...Z){let J=typeof Z[Z.length-1]=="function"&&Z.pop();$.urlParams=(0,pZ.extractUrlParams)($.fullPath||this.createResourcePathWithSymbols($.path||""));let Q=(0,pZ.callbackifyPromiseWithTimeout)(this._makeRequest(Z,$,{}),J);return Object.assign(Q,(0,zU.makeAutoPaginationMethods)(this,Z,$,Q)),Q}}dZ.stripeMethod=LU});var I8=K((sZ)=>{Object.defineProperty(sZ,"__esModule",{value:!0});sZ.Decimal=sZ.isDecimal=sZ.DEFAULT_DIV_PRECISION=void 0;var KU={"ubb-usage-count":{mode:"significant-figures",value:15},"v1-api":{mode:"decimal-places",value:12}};sZ.DEFAULT_DIV_PRECISION=34;var oZ=30,x8=1e6;class P{constructor($,Z){let[J,Q]=P.normalize($,Z);this._coefficient=J,this._exponent=Q,Object.freeze(this)}static normalize($,Z){if($===0n)return[0n,0];let J=$,Q=Z;while(J!==0n&&J%10n===0n)J/=10n,Q+=1;return[J,Q]}static roundDivision($,Z,J,Q){if(Z===0n)return $;if(Q==="round-down")return $;let X=Z>0n===J>0n?1n:-1n;if(Q==="round-up")return $+X;if(Q==="ceil")return X===1n?$+1n:$;if(Q==="floor")return X===-1n?$-1n:$;let Y=Z<0n?-Z:Z,G=J<0n?-J:J,V=Y*2n,U;if(V===G)U=0;else if(V<G)U=-1;else U=1;if(U<0)return $;if(U>0)return $+X;if(Q==="half-up")return $+X;if(Q==="half-down")return $;if($%2n===0n)return $;else return $+X}add($){let Z=$;if(this._exponent===Z._exponent)return new P(this._coefficient+Z._coefficient,this._exponent);if(this._exponent<Z._exponent){let J=10n**BigInt(Z._exponent-this._exponent);return new P(this._coefficient+Z._coefficient*J,this._exponent)}else{let J=10n**BigInt(this._exponent-Z._exponent);return new P(this._coefficient*J+Z._coefficient,Z._exponent)}}sub($){let Z=$;if(this._exponent===Z._exponent)return new P(this._coefficient-Z._coefficient,this._exponent);if(this._exponent<Z._exponent){let J=10n**BigInt(Z._exponent-this._exponent);return new P(this._coefficient-Z._coefficient*J,this._exponent)}else{let J=10n**BigInt(this._exponent-Z._exponent);return new P(this._coefficient*J-Z._coefficient,Z._exponent)}}mul($){let Z=$;return new P(this._coefficient*Z._coefficient,this._exponent+Z._exponent)}div($,Z,J){if(Z<0||!Number.isInteger(Z))throw Error("precision must be a non-negative integer");let Q=$;if(Q._coefficient===0n)throw Error("Division by zero");let X=this._exponent-Q._exponent+Z,Y,G,V;if(X>=0){let W=this._coefficient*10n**BigInt(X);Y=W/Q._coefficient,G=W%Q._coefficient,V=Q._coefficient}else{let W=Q._coefficient*10n**BigInt(-X);Y=this._coefficient/W,G=this._coefficient%W,V=W}let U=P.roundDivision(Y,G,V,J);return new P(U,-Z)}cmp($){let Z=$;if(this._exponent===Z._exponent){if(this._coefficient<Z._coefficient)return-1;if(this._coefficient>Z._coefficient)return 1;return 0}if(this._exponent<Z._exponent){let J=10n**BigInt(Z._exponent-this._exponent),Q=Z._coefficient*J;if(this._coefficient<Q)return-1;if(this._coefficient>Q)return 1;return 0}else{let J=10n**BigInt(this._exponent-Z._exponent),Q=this._coefficient*J;if(Q<Z._coefficient)return-1;if(Q>Z._coefficient)return 1;return 0}}eq($){return this.cmp($)===0}lt($){return this.cmp($)===-1}lte($){return this.cmp($)<=0}gt($){return this.cmp($)===1}gte($){return this.cmp($)>=0}isZero(){return this._coefficient===0n}isNegative(){return this._coefficient<0n}isPositive(){return this._coefficient>0n}neg(){return new P(-this._coefficient,this._exponent)}abs(){if(this._coefficient<0n)return new P(-this._coefficient,this._exponent);return this}round($,Z){let J=typeof Z==="string"?KU[Z]:Z;if(J===void 0)throw Error(`Unknown rounding preset: "${Z}"`);if(J.value<0||!Number.isInteger(J.value))throw Error("DecimalRoundingOptions.value must be a non-negative integer");if(J.mode==="decimal-places"){let B=this.toFixed(J.value,$);return sZ.Decimal.from(B)}if(this._coefficient===0n)return this;let X=(this._coefficient<0n?(-this._coefficient).toString():this._coefficient.toString()).length;if(J.value===0)return sZ.Decimal.zero;if(X<=J.value)return this;let Y=X-J.value,G=10n**BigInt(Y),V=this._coefficient/G,U=this._coefficient%G,W=P.roundDivision(V,U,G,$);return new P(W,this._exponent+Y)}toString(){if(this._coefficient===0n)return"0";let $=this._coefficient.toString(),Z=$.startsWith("-"),J=Z?$.slice(1):$;if(this._exponent<0){let X=-this._exponent;if((X>=J.length?X-J.length:0)>oZ){if(J.length===1)return`${$}E${String(this._exponent)}`;let G=J[0]??"",V=J.slice(1),U=this._exponent+J.length-1;return`${Z?"-":""}${G}.${V}E${String(U)}`}if(X>=J.length){let G="0".repeat(X-J.length);return`${Z?"-":""}0.${G}${J}`}else{let G=J.slice(0,J.length-X),V=J.slice(J.length-X);return`${Z?"-":""}${G}.${V}`}}if(J.length+this._exponent<=oZ){if(this._exponent===0)return $;let X="0".repeat(this._exponent);return`${Z?"-":""}${J}${X}`}else{if(J.length===1)return`${$}E+${String(this._exponent)}`;let X=J[0]??"",Y=J.slice(1),G=this._exponent+J.length-1;return`${Z?"-":""}${X}.${Y}E+${String(G)}`}}toJSON(){return this.toString()}toNumber(){return Number(this.toString())}toFixed($,Z){if($<0||!Number.isInteger($))throw Error("decimalPlaces must be a non-negative integer");let J=(X)=>{let Y=X.toString(),G=Y.startsWith("-"),V=G?Y.slice(1):Y;if($===0)return Y;if($>=V.length){let U="0".repeat($-V.length);return`${G?"-":""}0.${U}${V}`}else{let U=V.slice(0,V.length-$),W=V.slice(V.length-$);return`${G?"-":""}${U}.${W}`}},Q=-$;if(this._exponent===Q)return J(this._coefficient);if(this._exponent<Q){let X=Q-this._exponent,Y=10n**BigInt(X),G=this._coefficient/Y,V=this._coefficient%Y,U=P.roundDivision(G,V,Y,Z);return J(U)}else{let X=this._exponent-Q,Y=this._coefficient*10n**BigInt(X);return J(Y)}}valueOf(){return this.toString()}}function HU($){return $ instanceof P}sZ.isDecimal=HU;sZ.Decimal={from($){if(typeof $==="bigint")return new P($,0);if(typeof $==="number"){if(!Number.isFinite($))throw Error("Number must be finite");return sZ.Decimal.from($.toString())}let Z=$.trim();if(Z==="")throw Error("Cannot parse empty string as Decimal");let J=/^([+-]?)(\d+)(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/.exec(Z);if(!J)throw Error(`Invalid decimal string: ${$}`);let Q=J[1]==="-"?-1n:1n,X=J[2]??"",Y=J[3]??"",G=J[4]?Number(J[4]):0;if(!Number.isSafeInteger(G)||G>x8||G<-x8)throw Error(`Exponent out of range: ${String(J[4])} exceeds safe integer bounds`);let V=X+Y,U=Q*BigInt(V),W=G-Y.length;if(!Number.isSafeInteger(W)||W>x8||W<-x8)throw Error(`Computed exponent out of range: ${String(W)} exceeds safe integer bounds`);return new P(U,W)},zero:new P(0n,0)}});var tZ=K((rZ)=>{Object.defineProperty(rZ,"__esModule",{value:!0});rZ.coerceV2ResponseData=rZ.coerceV2RequestData=void 0;var DU=I8(),OU=($,Z)=>{if($==null)return $;switch(Z.kind){case"int64_string":return typeof $==="bigint"||typeof $==="number"?String($):$;case"decimal_string":return typeof $.toFixed==="function"&&typeof $.isZero==="function"?$.toString():$;case"object":{if(typeof $!=="object"||Array.isArray($))return $;let J=$,Q={};for(let X of Object.keys(J)){let Y=Z.fields[X];Q[X]=Y?rZ.coerceV2RequestData(J[X],Y):J[X]}return Q}case"array":{if(!Array.isArray($))return $;return $.map((J)=>rZ.coerceV2RequestData(J,Z.element))}case"nullable":return rZ.coerceV2RequestData($,Z.inner)}};rZ.coerceV2RequestData=OU;var qU=($,Z)=>{if($==null)return $;switch(Z.kind){case"int64_string":if(typeof $==="string")try{return BigInt($)}catch{throw Error(`Failed to coerce int64_string value: expected an integer string, got '${$}'`)}return $;case"decimal_string":if(typeof $==="string")try{return DU.Decimal.from($)}catch{throw Error(`Failed to coerce decimal_string value: expected a decimal string, got '${$}'`)}return $;case"object":{if(typeof $!=="object"||Array.isArray($))return $;let J=$;for(let Q of Object.keys(Z.fields))if(Q in J)J[Q]=rZ.coerceV2ResponseData(J[Q],Z.fields[Q]);return J}case"array":{if(!Array.isArray($))return $;for(let J=0;J<$.length;J++)$[J]=rZ.coerceV2ResponseData($[J],Z.element);return $}case"nullable":return rZ.coerceV2ResponseData($,Z.inner)}};rZ.coerceV2ResponseData=qU});var w=K(($1)=>{Object.defineProperty($1,"__esModule",{value:!0});$1.StripeResource=void 0;var Z0=c(),EU=aZ(),eZ=tZ();m0.extend=Z0.protoExtend;m0.method=EU.stripeMethod;m0.MAX_BUFFERED_REQUEST_METRICS=100;function m0($,Z){if(this._stripe=$,Z)throw Error("Support for curried url params was dropped in stripe-node v7.0.0. Instead, pass two ids.");this.basePath=(0,Z0.makeURLInterpolator)(this.basePath||$.getApiField("basePath")),this.resourcePath=this.path,this.path=(0,Z0.makeURLInterpolator)(this.path),this.initialize(...arguments)}$1.StripeResource=m0;m0.prototype={_stripe:null,path:"",resourcePath:"",basePath:null,initialize(){},requestDataProcessor:null,validateRequest:null,createFullPath($,Z){let J=[this.basePath(Z),this.path(Z)];if(typeof $==="function"){let Q=$(Z);if(Q)J.push(Q)}else J.push($);return this._joinUrlParts(J)},createResourcePathWithSymbols($){if($)return`/${this._joinUrlParts([this.resourcePath,$])}`;else return`/${this.resourcePath}`},_joinUrlParts($){return $.join("/").replace(/\/{2,}/g,"/")},_getRequestOpts($,Z,J){let Q=(Z.method||"GET").toUpperCase(),X=Z.usage||[],Y=Z.urlParams||[],G=Z.encode||((_)=>_),V=!!Z.fullPath,U=(0,Z0.makeURLInterpolator)(V?Z.fullPath:Z.path||""),W=V?Z.fullPath:this.createResourcePathWithSymbols(Z.path),B=[].slice.call($),z=Y.reduce((_,P0)=>{let v=B.shift();if(typeof v!=="string")throw Error(`Stripe: Argument "${P0}" must be a string, but got: ${v} (on API request to \`${Q} ${W}\`)`);return _[P0]=v,_},{}),L=(0,Z0.getDataFromArgs)(B),H=G(Object.assign({},L,J)),T=(0,Z0.getOptionsFromArgs)(B),D=T.host||Z.host,q=!!Z.streaming||!!T.streaming;if(B.filter((_)=>_!=null).length)throw Error(`Stripe: Unknown arguments (${B}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options. (on API request to ${Q} \`${W}\`)`);let O=V?U(z):this.createFullPath(U,z),k=Object.assign(T.headers,Z.headers);if(Z.validator)Z.validator(H,{headers:k});let N=Z.method==="GET"||Z.method==="DELETE";return{requestMethod:Q,requestPath:O,bodyData:N?null:H,queryData:N?H:{},authenticator:T.authenticator??null,headers:k,host:D??null,streaming:q,settings:T.settings,usage:X}},_makeRequest($,Z,J){return new Promise((Q,X)=>{let Y;try{Y=this._getRequestOpts($,Z,J)}catch(z){X(z);return}if(Z.requestSchema&&Y.bodyData)Y.bodyData=(0,eZ.coerceV2RequestData)(Y.bodyData,Z.requestSchema);function G(z,L){if(z)X(z);else try{if(Z.responseSchema)(0,eZ.coerceV2ResponseData)(L,Z.responseSchema);Q(Z.transformResponseData?Z.transformResponseData(L):L)}catch(H){X(H)}}let V=Object.keys(Y.queryData).length===0,U=[Y.requestPath,V?"":"?",(0,Z0.queryStringifyRequestData)(Y.queryData)].join(""),{headers:W,settings:B}=Y;this._stripe._requestSender._request(Y.requestMethod,Y.host,U,Y.bodyData,Y.authenticator,{headers:W,settings:B,streaming:Y.streaming},Y.usage,G,this.requestDataProcessor?.bind(this))})}}});var X1=K((J1)=>{Object.defineProperty(J1,"__esModule",{value:!0});J1.StripeContext=void 0;class T0{constructor($=[]){this._segments=[...$]}get segments(){return[...this._segments]}push($){if(!$)throw Error("Segment cannot be null or undefined");return new T0([...this._segments,$])}pop(){if(this._segments.length===0)throw Error("Cannot pop from an empty context");return new T0(this._segments.slice(0,-1))}toString(){return this._segments.join("/")}static parse($){if(!$)return new T0([]);return new T0($.split("/"))}}J1.StripeContext=T0});var V1=K((Y1)=>{Object.defineProperty(Y1,"__esModule",{value:!0});Y1.createWebhooks=void 0;var a=M0(),FU=b0();function CU($){let Z={DEFAULT_TOLERANCE:300,signature:null,constructEvent(B,z,L,H,T,D){try{if(!this.signature)throw Error("ERR: missing signature helper, unable to verify");this.signature.verifyHeader(B,z,L,H||Z.DEFAULT_TOLERANCE,T,D)}catch(O){if(O instanceof FU.CryptoProviderOnlySupportsAsyncError)O.message+="\nUse `await constructEventAsync(...)` instead of `constructEvent(...)`";throw O}let q=B instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(B)):JSON.parse(B);if(q&&q.object==="v2.core.event")throw Error("You passed an event notification to stripe.webhooks.constructEvent, which expects a webhook payload. Use stripe.parseEventNotification instead.");return q},async constructEventAsync(B,z,L,H,T,D){if(!this.signature)throw Error("ERR: missing signature helper, unable to verify");await this.signature.verifyHeaderAsync(B,z,L,H||Z.DEFAULT_TOLERANCE,T,D);let q=B instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(B)):JSON.parse(B);if(q&&q.object==="v2.core.event")throw Error("You passed an event notification to stripe.webhooks.constructEvent, which expects a webhook payload. Use stripe.parseEventNotification instead.");return q},generateTestHeaderString:function(B){let z=W(B),L=z.signature||z.cryptoProvider.computeHMACSignature(z.payloadString,z.secret);return z.generateHeaderString(L)},generateTestHeaderStringAsync:async function(B){let z=W(B),L=z.signature||await z.cryptoProvider.computeHMACSignatureAsync(z.payloadString,z.secret);return z.generateHeaderString(L)}},J={EXPECTED_SCHEME:"v1",verifyHeader(B,z,L,H,T,D){let{decodedHeader:q,decodedPayload:O,details:k,suspectPayloadType:N}=X(B,z,this.EXPECTED_SCHEME),R=/\s/.test(L);T=T||U();let M=T.computeHMACSignature(Q(O,k),L);return Y(O,q,k,M,H,N,R,D),!0},async verifyHeaderAsync(B,z,L,H,T,D){let{decodedHeader:q,decodedPayload:O,details:k,suspectPayloadType:N}=X(B,z,this.EXPECTED_SCHEME),R=/\s/.test(L);T=T||U();let M=await T.computeHMACSignatureAsync(Q(O,k),L);return Y(O,q,k,M,H,N,R,D)}};function Q(B,z){return`${z.timestamp}.${B}`}function X(B,z,L){if(!B)throw new a.StripeSignatureVerificationError(z,B,{message:"No webhook payload was provided."});let H=typeof B!="string"&&!(B instanceof Uint8Array),T=new TextDecoder("utf8"),D=B instanceof Uint8Array?T.decode(B):B;if(Array.isArray(z))throw Error("Unexpected: An array was passed as a header, which should not be possible for the stripe-signature header.");if(z==null||z=="")throw new a.StripeSignatureVerificationError(z,B,{message:"No stripe-signature header value was provided."});let q=z instanceof Uint8Array?T.decode(z):z,O=G(q,L);if(!O||O.timestamp===-1)throw new a.StripeSignatureVerificationError(q,D,{message:"Unable to extract timestamp and signatures from header"});if(!O.signatures.length)throw new a.StripeSignatureVerificationError(q,D,{message:"No signatures found with expected scheme"});return{decodedPayload:D,decodedHeader:q,details:O,suspectPayloadType:H}}function Y(B,z,L,H,T,D,q,O){let k=!!L.signatures.filter($.secureCompare.bind($,H)).length,N=`
3
3
  Learn more about webhook signing and explore webhook integration examples for various frameworks at https://docs.stripe.com/webhooks/signature`,R=q?`
4
4
 
5
- Note: The provided signing secret contains whitespace. This often indicates an extra newline or space is in the value`:"";if(!k){if(D)throw new o.StripeSignatureVerificationError(z,B,{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.
5
+ Note: The provided signing secret contains whitespace. This often indicates an extra newline or space is in the value`:"";if(!k){if(D)throw new a.StripeSignatureVerificationError(z,B,{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.
6
6
  Signature verification is impossible without access to the original signed material.
7
7
  `+N+`
8
- `+R});throw new o.StripeSignatureVerificationError(z,B,{message:`No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe?
8
+ `+R});throw new a.StripeSignatureVerificationError(z,B,{message:`No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe?
9
9
  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.
10
10
  `+N+`
11
- `+R})}let M=Math.floor((typeof O==="number"?O:Date.now())/1000)-L.timestamp;if(T>0&&M>T)throw new o.StripeSignatureVerificationError(z,B,{message:"Timestamp outside the tolerance zone"});return!0}function G(B,z){if(typeof B!=="string")return null;return B.split(",").reduce((L,H)=>{let T=H.split("=");if(T[0]==="t")L.timestamp=parseInt(T[1],10);if(T[0]===z)L.signatures.push(T[1]);return L},{timestamp:-1,signatures:[]})}let V=null;function U(){if(!V)V=$.createDefaultCryptoProvider();return V}function W(B){if(!B)throw new o.StripeError({message:"Options are required"});let z=Math.floor(B.timestamp)||Math.floor(Date.now()/1000),L=B.scheme||J.EXPECTED_SCHEME,H=B.cryptoProvider||U(),T=`${z}.${B.payload}`;return{...B,timestamp:z,scheme:L,cryptoProvider:H,payloadString:T,generateHeaderString:(q)=>{return`t=${z},${L}=${q}`}}}return Z.signature=J,Z}V1.createWebhooks=AU});var L1=K((U1)=>{Object.defineProperty(U1,"__esModule",{value:!0});U1.ApiMajorVersion=U1.ApiVersion=void 0;U1.ApiVersion="2026-03-25.dahlia";U1.ApiMajorVersion="dahlia"});var w1=K((K1)=>{Object.defineProperty(K1,"__esModule",{value:!0});K1.resourceNamespace=void 0;function xU($,Z){for(let J in Z){if(!Object.prototype.hasOwnProperty.call(Z,J))continue;let Q=J[0].toLowerCase()+J.substring(1),X=new Z[J]($);this[Q]=X}}function IU($,Z){return function(J){return new xU(J,Z)}}K1.resourceNamespace=IU});var q1=K((D1)=>{Object.defineProperty(D1,"__esModule",{value:!0});D1.AccountLinks=void 0;var T1=w(),PU=T1.StripeResource.method;D1.AccountLinks=T1.StripeResource.extend({create:PU({method:"POST",fullPath:"/v2/core/account_links"})})});var A1=K((C1)=>{Object.defineProperty(C1,"__esModule",{value:!0});C1.AccountTokens=void 0;var F1=w(),E1=F1.StripeResource.method;C1.AccountTokens=F1.StripeResource.extend({create:E1({method:"POST",fullPath:"/v2/core/account_tokens",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),retrieve:E1({method:"GET",fullPath:"/v2/core/account_tokens/{id}"})})});var P1=K((x1)=>{Object.defineProperty(x1,"__esModule",{value:!0});x1.Accounts=void 0;var N1=w(),Q0=N1.StripeResource.method;x1.Accounts=N1.StripeResource.extend({retrieve:Q0({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}"}),list:Q0({method:"GET",fullPath:"/v1/financial_connections/accounts",methodType:"list"}),disconnect:Q0({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/disconnect"}),listOwners:Q0({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}/owners",methodType:"list"}),refresh:Q0({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/refresh"}),subscribe:Q0({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/subscribe"}),unsubscribe:Q0({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/unsubscribe"})})});var v1=K((R1)=>{Object.defineProperty(R1,"__esModule",{value:!0});R1.Persons=void 0;var S1=w(),u0=S1.StripeResource.method;R1.Persons=S1.StripeResource.extend({create:u0({method:"POST",fullPath:"/v2/core/accounts/{account_id}/persons",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),retrieve:u0({method:"GET",fullPath:"/v2/core/accounts/{account_id}/persons/{id}",responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),update:u0({method:"POST",fullPath:"/v2/core/accounts/{account_id}/persons/{id}",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),list:u0({method:"GET",fullPath:"/v2/core/accounts/{account_id}/persons",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}),del:u0({method:"DELETE",fullPath:"/v2/core/accounts/{account_id}/persons/{id}"})})});var _1=K((f1)=>{Object.defineProperty(f1,"__esModule",{value:!0});f1.PersonTokens=void 0;var j1=w(),b1=j1.StripeResource.method;f1.PersonTokens=j1.StripeResource.extend({create:b1({method:"POST",fullPath:"/v2/core/accounts/{account_id}/person_tokens",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),retrieve:b1({method:"GET",fullPath:"/v2/core/accounts/{account_id}/person_tokens/{id}"})})});var m1=K((g1)=>{Object.defineProperty(g1,"__esModule",{value:!0});g1.Accounts=void 0;var i$=w(),SU=v1(),RU=_1(),c0=i$.StripeResource.method;g1.Accounts=i$.StripeResource.extend({constructor:function(...$){i$.StripeResource.apply(this,$),this.persons=new SU.Persons(...$),this.personTokens=new RU.PersonTokens(...$)},create:c0({method:"POST",fullPath:"/v2/core/accounts",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}},responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),retrieve:c0({method:"GET",fullPath:"/v2/core/accounts/{id}",responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),update:c0({method:"POST",fullPath:"/v2/core/accounts/{id}",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}},responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),list:c0({method:"GET",fullPath:"/v2/core/accounts",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}}}}),close:c0({method:"POST",fullPath:"/v2/core/accounts/{id}/close",responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}})})});var p1=K((n1)=>{Object.defineProperty(n1,"__esModule",{value:!0});n1.ActiveEntitlements=void 0;var c1=w(),u1=c1.StripeResource.method;n1.ActiveEntitlements=c1.StripeResource.extend({retrieve:u1({method:"GET",fullPath:"/v1/entitlements/active_entitlements/{id}"}),list:u1({method:"GET",fullPath:"/v1/entitlements/active_entitlements",methodType:"list"})})});var o1=K((i1)=>{Object.defineProperty(i1,"__esModule",{value:!0});i1.Alerts=void 0;var d1=w(),D0=d1.StripeResource.method;i1.Alerts=d1.StripeResource.extend({create:D0({method:"POST",fullPath:"/v1/billing/alerts"}),retrieve:D0({method:"GET",fullPath:"/v1/billing/alerts/{id}"}),list:D0({method:"GET",fullPath:"/v1/billing/alerts",methodType:"list"}),activate:D0({method:"POST",fullPath:"/v1/billing/alerts/{id}/activate"}),archive:D0({method:"POST",fullPath:"/v1/billing/alerts/{id}/archive"}),deactivate:D0({method:"POST",fullPath:"/v1/billing/alerts/{id}/deactivate"})})});var e1=K((r1)=>{Object.defineProperty(r1,"__esModule",{value:!0});r1.Associations=void 0;var s1=w(),yU=s1.StripeResource.method;r1.Associations=s1.StripeResource.extend({find:yU({method:"GET",fullPath:"/v1/tax/associations/find"})})});var Q4=K((Z4)=>{Object.defineProperty(Z4,"__esModule",{value:!0});Z4.Authorizations=void 0;var $4=w(),n0=$4.StripeResource.method;Z4.Authorizations=$4.StripeResource.extend({retrieve:n0({method:"GET",fullPath:"/v1/issuing/authorizations/{authorization}",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),update:n0({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),list:n0({method:"GET",fullPath:"/v1/issuing/authorizations",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}),approve:n0({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/approve",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),decline:n0({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/decline",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})})});var V4=K((Y4)=>{Object.defineProperty(Y4,"__esModule",{value:!0});Y4.Authorizations=void 0;var X4=w(),X0=X4.StripeResource.method;Y4.Authorizations=X4.StripeResource.extend({create:X0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations",requestSchema:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),capture:X0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/capture",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),expire:X0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/expire",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),finalizeAmount:X0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount",requestSchema:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),increment:X0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/increment",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),respond:X0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),reverse:X0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/reverse",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})})});var z4=K((W4)=>{Object.defineProperty(W4,"__esModule",{value:!0});W4.Calculations=void 0;var B4=w(),a$=B4.StripeResource.method;W4.Calculations=B4.StripeResource.extend({create:a$({method:"POST",fullPath:"/v1/tax/calculations"}),retrieve:a$({method:"GET",fullPath:"/v1/tax/calculations/{calculation}"}),listLineItems:a$({method:"GET",fullPath:"/v1/tax/calculations/{calculation}/line_items",methodType:"list"})})});var w4=K((K4)=>{Object.defineProperty(K4,"__esModule",{value:!0});K4.Cardholders=void 0;var L4=w(),S8=L4.StripeResource.method;K4.Cardholders=L4.StripeResource.extend({create:S8({method:"POST",fullPath:"/v1/issuing/cardholders"}),retrieve:S8({method:"GET",fullPath:"/v1/issuing/cardholders/{cardholder}"}),update:S8({method:"POST",fullPath:"/v1/issuing/cardholders/{cardholder}"}),list:S8({method:"GET",fullPath:"/v1/issuing/cardholders",methodType:"list"})})});var q4=K((D4)=>{Object.defineProperty(D4,"__esModule",{value:!0});D4.Cards=void 0;var T4=w(),R8=T4.StripeResource.method;D4.Cards=T4.StripeResource.extend({create:R8({method:"POST",fullPath:"/v1/issuing/cards"}),retrieve:R8({method:"GET",fullPath:"/v1/issuing/cards/{card}"}),update:R8({method:"POST",fullPath:"/v1/issuing/cards/{card}"}),list:R8({method:"GET",fullPath:"/v1/issuing/cards",methodType:"list"})})});var k4=K((F4)=>{Object.defineProperty(F4,"__esModule",{value:!0});F4.Cards=void 0;var E4=w(),l0=E4.StripeResource.method;F4.Cards=E4.StripeResource.extend({deliverCard:l0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/deliver"}),failCard:l0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/fail"}),returnCard:l0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/return"}),shipCard:l0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/ship"}),submitCard:l0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/submit"})})});var I4=K((N4)=>{Object.defineProperty(N4,"__esModule",{value:!0});N4.Configurations=void 0;var A4=w(),y8=A4.StripeResource.method;N4.Configurations=A4.StripeResource.extend({create:y8({method:"POST",fullPath:"/v1/billing_portal/configurations"}),retrieve:y8({method:"GET",fullPath:"/v1/billing_portal/configurations/{configuration}"}),update:y8({method:"POST",fullPath:"/v1/billing_portal/configurations/{configuration}"}),list:y8({method:"GET",fullPath:"/v1/billing_portal/configurations",methodType:"list"})})});var y4=K((S4)=>{Object.defineProperty(S4,"__esModule",{value:!0});S4.Configurations=void 0;var P4=w(),p0=P4.StripeResource.method;S4.Configurations=P4.StripeResource.extend({create:p0({method:"POST",fullPath:"/v1/terminal/configurations"}),retrieve:p0({method:"GET",fullPath:"/v1/terminal/configurations/{configuration}"}),update:p0({method:"POST",fullPath:"/v1/terminal/configurations/{configuration}"}),list:p0({method:"GET",fullPath:"/v1/terminal/configurations",methodType:"list"}),del:p0({method:"DELETE",fullPath:"/v1/terminal/configurations/{configuration}"})})});var f4=K((b4)=>{Object.defineProperty(b4,"__esModule",{value:!0});b4.ConfirmationTokens=void 0;var v4=w(),vU=v4.StripeResource.method;b4.ConfirmationTokens=v4.StripeResource.extend({create:vU({method:"POST",fullPath:"/v1/test_helpers/confirmation_tokens"})})});var h4=K((_4)=>{Object.defineProperty(_4,"__esModule",{value:!0});_4.ConnectionTokens=void 0;var M4=w(),bU=M4.StripeResource.method;_4.ConnectionTokens=M4.StripeResource.extend({create:bU({method:"POST",fullPath:"/v1/terminal/connection_tokens"})})});var n4=K((u4)=>{Object.defineProperty(u4,"__esModule",{value:!0});u4.CreditBalanceSummary=void 0;var m4=w(),jU=m4.StripeResource.method;u4.CreditBalanceSummary=m4.StripeResource.extend({retrieve:jU({method:"GET",fullPath:"/v1/billing/credit_balance_summary"})})});var a4=K((d4)=>{Object.defineProperty(d4,"__esModule",{value:!0});d4.CreditBalanceTransactions=void 0;var p4=w(),l4=p4.StripeResource.method;d4.CreditBalanceTransactions=p4.StripeResource.extend({retrieve:l4({method:"GET",fullPath:"/v1/billing/credit_balance_transactions/{id}"}),list:l4({method:"GET",fullPath:"/v1/billing/credit_balance_transactions",methodType:"list"})})});var t4=K((s4)=>{Object.defineProperty(s4,"__esModule",{value:!0});s4.CreditGrants=void 0;var o4=w(),O0=o4.StripeResource.method;s4.CreditGrants=o4.StripeResource.extend({create:O0({method:"POST",fullPath:"/v1/billing/credit_grants"}),retrieve:O0({method:"GET",fullPath:"/v1/billing/credit_grants/{id}"}),update:O0({method:"POST",fullPath:"/v1/billing/credit_grants/{id}"}),list:O0({method:"GET",fullPath:"/v1/billing/credit_grants",methodType:"list"}),expire:O0({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/expire"}),voidGrant:O0({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/void"})})});var J6=K(($6)=>{Object.defineProperty($6,"__esModule",{value:!0});$6.CreditReversals=void 0;var e4=w(),o$=e4.StripeResource.method;$6.CreditReversals=e4.StripeResource.extend({create:o$({method:"POST",fullPath:"/v1/treasury/credit_reversals"}),retrieve:o$({method:"GET",fullPath:"/v1/treasury/credit_reversals/{credit_reversal}"}),list:o$({method:"GET",fullPath:"/v1/treasury/credit_reversals",methodType:"list"})})});var G6=K((X6)=>{Object.defineProperty(X6,"__esModule",{value:!0});X6.Customers=void 0;var Q6=w(),fU=Q6.StripeResource.method;X6.Customers=Q6.StripeResource.extend({fundCashBalance:fU({method:"POST",fullPath:"/v1/test_helpers/customers/{customer}/fund_cash_balance"})})});var U6=K((B6)=>{Object.defineProperty(B6,"__esModule",{value:!0});B6.DebitReversals=void 0;var V6=w(),s$=V6.StripeResource.method;B6.DebitReversals=V6.StripeResource.extend({create:s$({method:"POST",fullPath:"/v1/treasury/debit_reversals"}),retrieve:s$({method:"GET",fullPath:"/v1/treasury/debit_reversals/{debit_reversal}"}),list:s$({method:"GET",fullPath:"/v1/treasury/debit_reversals",methodType:"list"})})});var H6=K((L6)=>{Object.defineProperty(L6,"__esModule",{value:!0});L6.Disputes=void 0;var z6=w(),d0=z6.StripeResource.method;L6.Disputes=z6.StripeResource.extend({create:d0({method:"POST",fullPath:"/v1/issuing/disputes"}),retrieve:d0({method:"GET",fullPath:"/v1/issuing/disputes/{dispute}"}),update:d0({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}"}),list:d0({method:"GET",fullPath:"/v1/issuing/disputes",methodType:"list"}),submit:d0({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}/submit"})})});var q6=K((D6)=>{Object.defineProperty(D6,"__esModule",{value:!0});D6.EarlyFraudWarnings=void 0;var T6=w(),w6=T6.StripeResource.method;D6.EarlyFraudWarnings=T6.StripeResource.extend({retrieve:w6({method:"GET",fullPath:"/v1/radar/early_fraud_warnings/{early_fraud_warning}"}),list:w6({method:"GET",fullPath:"/v1/radar/early_fraud_warnings",methodType:"list"})})});var k6=K((F6)=>{Object.defineProperty(F6,"__esModule",{value:!0});F6.EventDestinations=void 0;var E6=w(),s=E6.StripeResource.method;F6.EventDestinations=E6.StripeResource.extend({create:s({method:"POST",fullPath:"/v2/core/event_destinations"}),retrieve:s({method:"GET",fullPath:"/v2/core/event_destinations/{id}"}),update:s({method:"POST",fullPath:"/v2/core/event_destinations/{id}"}),list:s({method:"GET",fullPath:"/v2/core/event_destinations",methodType:"list"}),del:s({method:"DELETE",fullPath:"/v2/core/event_destinations/{id}"}),disable:s({method:"POST",fullPath:"/v2/core/event_destinations/{id}/disable"}),enable:s({method:"POST",fullPath:"/v2/core/event_destinations/{id}/enable"}),ping:s({method:"POST",fullPath:"/v2/core/event_destinations/{id}/ping"})})});var I6=K((N6)=>{Object.defineProperty(N6,"__esModule",{value:!0});N6.Events=void 0;var A6=w(),r$=A6.StripeResource.method;N6.Events=A6.StripeResource.extend({retrieve(...$){return r$({method:"GET",fullPath:"/v2/core/events/{id}",transformResponseData:(J)=>{return this.addFetchRelatedObjectIfNeeded(J)}}).apply(this,$)},list(...$){return r$({method:"GET",fullPath:"/v2/core/events",methodType:"list",transformResponseData:(J)=>{return{...J,data:J.data.map(this.addFetchRelatedObjectIfNeeded.bind(this))}}}).apply(this,$)},addFetchRelatedObjectIfNeeded($){if(!$.related_object||!$.related_object.url)return $;return{...$,fetchRelatedObject:()=>r$({method:"GET",fullPath:$.related_object.url}).apply(this,[{stripeContext:$.context,headers:{"Stripe-Request-Trigger":`event=${$.id}`}}])}}})});var y6=K((S6)=>{Object.defineProperty(S6,"__esModule",{value:!0});S6.Features=void 0;var P6=w(),v8=P6.StripeResource.method;S6.Features=P6.StripeResource.extend({create:v8({method:"POST",fullPath:"/v1/entitlements/features"}),retrieve:v8({method:"GET",fullPath:"/v1/entitlements/features/{id}"}),update:v8({method:"POST",fullPath:"/v1/entitlements/features/{id}"}),list:v8({method:"GET",fullPath:"/v1/entitlements/features",methodType:"list"})})});var f6=K((b6)=>{Object.defineProperty(b6,"__esModule",{value:!0});b6.FinancialAccounts=void 0;var v6=w(),Y0=v6.StripeResource.method;b6.FinancialAccounts=v6.StripeResource.extend({create:Y0({method:"POST",fullPath:"/v1/treasury/financial_accounts"}),retrieve:Y0({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),update:Y0({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),list:Y0({method:"GET",fullPath:"/v1/treasury/financial_accounts",methodType:"list"}),close:Y0({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}/close"}),retrieveFeatures:Y0({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"}),updateFeatures:Y0({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"})})});var h6=K((_6)=>{Object.defineProperty(_6,"__esModule",{value:!0});_6.InboundTransfers=void 0;var M6=w(),t$=M6.StripeResource.method;_6.InboundTransfers=M6.StripeResource.extend({fail:t$({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/fail"}),returnInboundTransfer:t$({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/return"}),succeed:t$({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/succeed"})})});var n6=K((u6)=>{Object.defineProperty(u6,"__esModule",{value:!0});u6.InboundTransfers=void 0;var m6=w(),b8=m6.StripeResource.method;u6.InboundTransfers=m6.StripeResource.extend({create:b8({method:"POST",fullPath:"/v1/treasury/inbound_transfers"}),retrieve:b8({method:"GET",fullPath:"/v1/treasury/inbound_transfers/{id}"}),list:b8({method:"GET",fullPath:"/v1/treasury/inbound_transfers",methodType:"list"}),cancel:b8({method:"POST",fullPath:"/v1/treasury/inbound_transfers/{inbound_transfer}/cancel"})})});var i6=K((p6)=>{Object.defineProperty(p6,"__esModule",{value:!0});p6.Locations=void 0;var l6=w(),i0=l6.StripeResource.method;p6.Locations=l6.StripeResource.extend({create:i0({method:"POST",fullPath:"/v1/terminal/locations"}),retrieve:i0({method:"GET",fullPath:"/v1/terminal/locations/{location}"}),update:i0({method:"POST",fullPath:"/v1/terminal/locations/{location}"}),list:i0({method:"GET",fullPath:"/v1/terminal/locations",methodType:"list"}),del:i0({method:"DELETE",fullPath:"/v1/terminal/locations/{location}"})})});var r6=K((o6)=>{Object.defineProperty(o6,"__esModule",{value:!0});o6.MeterEventAdjustments=void 0;var a6=w(),MU=a6.StripeResource.method;o6.MeterEventAdjustments=a6.StripeResource.extend({create:MU({method:"POST",fullPath:"/v1/billing/meter_event_adjustments"})})});var Z7=K((e6)=>{Object.defineProperty(e6,"__esModule",{value:!0});e6.MeterEventAdjustments=void 0;var t6=w(),_U=t6.StripeResource.method;e6.MeterEventAdjustments=t6.StripeResource.extend({create:_U({method:"POST",fullPath:"/v2/billing/meter_event_adjustments"})})});var Y7=K((Q7)=>{Object.defineProperty(Q7,"__esModule",{value:!0});Q7.MeterEventSession=void 0;var J7=w(),gU=J7.StripeResource.method;Q7.MeterEventSession=J7.StripeResource.extend({create:gU({method:"POST",fullPath:"/v2/billing/meter_event_session"})})});var W7=K((V7)=>{Object.defineProperty(V7,"__esModule",{value:!0});V7.MeterEventStream=void 0;var G7=w(),hU=G7.StripeResource.method;V7.MeterEventStream=G7.StripeResource.extend({create:hU({method:"POST",fullPath:"/v2/billing/meter_event_stream",host:"meter-events.stripe.com"})})});var K7=K((z7)=>{Object.defineProperty(z7,"__esModule",{value:!0});z7.MeterEvents=void 0;var U7=w(),mU=U7.StripeResource.method;z7.MeterEvents=U7.StripeResource.extend({create:mU({method:"POST",fullPath:"/v1/billing/meter_events"})})});var D7=K((w7)=>{Object.defineProperty(w7,"__esModule",{value:!0});w7.MeterEvents=void 0;var H7=w(),uU=H7.StripeResource.method;w7.MeterEvents=H7.StripeResource.extend({create:uU({method:"POST",fullPath:"/v2/billing/meter_events"})})});var F7=K((q7)=>{Object.defineProperty(q7,"__esModule",{value:!0});q7.Meters=void 0;var O7=w(),G0=O7.StripeResource.method;q7.Meters=O7.StripeResource.extend({create:G0({method:"POST",fullPath:"/v1/billing/meters"}),retrieve:G0({method:"GET",fullPath:"/v1/billing/meters/{id}"}),update:G0({method:"POST",fullPath:"/v1/billing/meters/{id}"}),list:G0({method:"GET",fullPath:"/v1/billing/meters",methodType:"list"}),deactivate:G0({method:"POST",fullPath:"/v1/billing/meters/{id}/deactivate"}),listEventSummaries:G0({method:"GET",fullPath:"/v1/billing/meters/{id}/event_summaries",methodType:"list"}),reactivate:G0({method:"POST",fullPath:"/v1/billing/meters/{id}/reactivate"})})});var N7=K((k7)=>{Object.defineProperty(k7,"__esModule",{value:!0});k7.OnboardingLinks=void 0;var C7=w(),cU=C7.StripeResource.method;k7.OnboardingLinks=C7.StripeResource.extend({create:cU({method:"POST",fullPath:"/v1/terminal/onboarding_links"})})});var S7=K((I7)=>{Object.defineProperty(I7,"__esModule",{value:!0});I7.Orders=void 0;var x7=w(),a0=x7.StripeResource.method;I7.Orders=x7.StripeResource.extend({create:a0({method:"POST",fullPath:"/v1/climate/orders",requestSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),retrieve:a0({method:"GET",fullPath:"/v1/climate/orders/{order}",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),update:a0({method:"POST",fullPath:"/v1/climate/orders/{order}",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),list:a0({method:"GET",fullPath:"/v1/climate/orders",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}}}}),cancel:a0({method:"POST",fullPath:"/v1/climate/orders/{order}/cancel",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}})})});var b7=K((y7)=>{Object.defineProperty(y7,"__esModule",{value:!0});y7.OutboundPayments=void 0;var R7=w(),j8=R7.StripeResource.method;y7.OutboundPayments=R7.StripeResource.extend({update:j8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}"}),fail:j8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/fail"}),post:j8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/post"}),returnOutboundPayment:j8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/return"})})});var _7=K((f7)=>{Object.defineProperty(f7,"__esModule",{value:!0});f7.OutboundPayments=void 0;var j7=w(),f8=j7.StripeResource.method;f7.OutboundPayments=j7.StripeResource.extend({create:f8({method:"POST",fullPath:"/v1/treasury/outbound_payments"}),retrieve:f8({method:"GET",fullPath:"/v1/treasury/outbound_payments/{id}"}),list:f8({method:"GET",fullPath:"/v1/treasury/outbound_payments",methodType:"list"}),cancel:f8({method:"POST",fullPath:"/v1/treasury/outbound_payments/{id}/cancel"})})});var u7=K((h7)=>{Object.defineProperty(h7,"__esModule",{value:!0});h7.OutboundTransfers=void 0;var g7=w(),M8=g7.StripeResource.method;h7.OutboundTransfers=g7.StripeResource.extend({update:M8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}"}),fail:M8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail"}),post:M8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post"}),returnOutboundTransfer:M8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return"})})});var p7=K((n7)=>{Object.defineProperty(n7,"__esModule",{value:!0});n7.OutboundTransfers=void 0;var c7=w(),_8=c7.StripeResource.method;n7.OutboundTransfers=c7.StripeResource.extend({create:_8({method:"POST",fullPath:"/v1/treasury/outbound_transfers"}),retrieve:_8({method:"GET",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}"}),list:_8({method:"GET",fullPath:"/v1/treasury/outbound_transfers",methodType:"list"}),cancel:_8({method:"POST",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}/cancel"})})});var o7=K((i7)=>{Object.defineProperty(i7,"__esModule",{value:!0});i7.PaymentEvaluations=void 0;var d7=w(),nU=d7.StripeResource.method;i7.PaymentEvaluations=d7.StripeResource.extend({create:nU({method:"POST",fullPath:"/v1/radar/payment_evaluations"})})});var e7=K((r7)=>{Object.defineProperty(r7,"__esModule",{value:!0});r7.PersonalizationDesigns=void 0;var s7=w(),g8=s7.StripeResource.method;r7.PersonalizationDesigns=s7.StripeResource.extend({create:g8({method:"POST",fullPath:"/v1/issuing/personalization_designs"}),retrieve:g8({method:"GET",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),update:g8({method:"POST",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),list:g8({method:"GET",fullPath:"/v1/issuing/personalization_designs",methodType:"list"})})});var QJ=K((ZJ)=>{Object.defineProperty(ZJ,"__esModule",{value:!0});ZJ.PersonalizationDesigns=void 0;var $J=w(),e$=$J.StripeResource.method;ZJ.PersonalizationDesigns=$J.StripeResource.extend({activate:e$({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate"}),deactivate:e$({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate"}),reject:e$({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject"})})});var BJ=K((GJ)=>{Object.defineProperty(GJ,"__esModule",{value:!0});GJ.PhysicalBundles=void 0;var YJ=w(),XJ=YJ.StripeResource.method;GJ.PhysicalBundles=YJ.StripeResource.extend({retrieve:XJ({method:"GET",fullPath:"/v1/issuing/physical_bundles/{physical_bundle}"}),list:XJ({method:"GET",fullPath:"/v1/issuing/physical_bundles",methodType:"list"})})});var KJ=K((zJ)=>{Object.defineProperty(zJ,"__esModule",{value:!0});zJ.Products=void 0;var UJ=w(),WJ=UJ.StripeResource.method;zJ.Products=UJ.StripeResource.extend({retrieve:WJ({method:"GET",fullPath:"/v1/climate/products/{product}",responseSchema:{kind:"object",fields:{metric_tons_available:{kind:"decimal_string"}}}}),list:WJ({method:"GET",fullPath:"/v1/climate/products",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{metric_tons_available:{kind:"decimal_string"}}}}}}})})});var DJ=K((wJ)=>{Object.defineProperty(wJ,"__esModule",{value:!0});wJ.Readers=void 0;var HJ=w(),f=HJ.StripeResource.method;wJ.Readers=HJ.StripeResource.extend({create:f({method:"POST",fullPath:"/v1/terminal/readers"}),retrieve:f({method:"GET",fullPath:"/v1/terminal/readers/{reader}"}),update:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}"}),list:f({method:"GET",fullPath:"/v1/terminal/readers",methodType:"list"}),del:f({method:"DELETE",fullPath:"/v1/terminal/readers/{reader}"}),cancelAction:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/cancel_action"}),collectInputs:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/collect_inputs"}),collectPaymentMethod:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/collect_payment_method"}),confirmPaymentIntent:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/confirm_payment_intent"}),processPaymentIntent:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_payment_intent"}),processSetupIntent:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_setup_intent"}),refundPayment:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/refund_payment"}),setReaderDisplay:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/set_reader_display"})})});var FJ=K((qJ)=>{Object.defineProperty(qJ,"__esModule",{value:!0});qJ.Readers=void 0;var OJ=w(),$9=OJ.StripeResource.method;qJ.Readers=OJ.StripeResource.extend({presentPaymentMethod:$9({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/present_payment_method"}),succeedInputCollection:$9({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/succeed_input_collection"}),timeoutInputCollection:$9({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/timeout_input_collection"})})});var NJ=K((kJ)=>{Object.defineProperty(kJ,"__esModule",{value:!0});kJ.ReceivedCredits=void 0;var CJ=w(),lU=CJ.StripeResource.method;kJ.ReceivedCredits=CJ.StripeResource.extend({create:lU({method:"POST",fullPath:"/v1/test_helpers/treasury/received_credits"})})});var RJ=K((PJ)=>{Object.defineProperty(PJ,"__esModule",{value:!0});PJ.ReceivedCredits=void 0;var IJ=w(),xJ=IJ.StripeResource.method;PJ.ReceivedCredits=IJ.StripeResource.extend({retrieve:xJ({method:"GET",fullPath:"/v1/treasury/received_credits/{id}"}),list:xJ({method:"GET",fullPath:"/v1/treasury/received_credits",methodType:"list"})})});var jJ=K((vJ)=>{Object.defineProperty(vJ,"__esModule",{value:!0});vJ.ReceivedDebits=void 0;var yJ=w(),pU=yJ.StripeResource.method;vJ.ReceivedDebits=yJ.StripeResource.extend({create:pU({method:"POST",fullPath:"/v1/test_helpers/treasury/received_debits"})})});var hJ=K((_J)=>{Object.defineProperty(_J,"__esModule",{value:!0});_J.ReceivedDebits=void 0;var MJ=w(),fJ=MJ.StripeResource.method;_J.ReceivedDebits=MJ.StripeResource.extend({retrieve:fJ({method:"GET",fullPath:"/v1/treasury/received_debits/{id}"}),list:fJ({method:"GET",fullPath:"/v1/treasury/received_debits",methodType:"list"})})});var nJ=K((uJ)=>{Object.defineProperty(uJ,"__esModule",{value:!0});uJ.Refunds=void 0;var mJ=w(),dU=mJ.StripeResource.method;uJ.Refunds=mJ.StripeResource.extend({expire:dU({method:"POST",fullPath:"/v1/test_helpers/refunds/{refund}/expire"})})});var iJ=K((pJ)=>{Object.defineProperty(pJ,"__esModule",{value:!0});pJ.Registrations=void 0;var lJ=w(),h8=lJ.StripeResource.method;pJ.Registrations=lJ.StripeResource.extend({create:h8({method:"POST",fullPath:"/v1/tax/registrations"}),retrieve:h8({method:"GET",fullPath:"/v1/tax/registrations/{id}"}),update:h8({method:"POST",fullPath:"/v1/tax/registrations/{id}"}),list:h8({method:"GET",fullPath:"/v1/tax/registrations",methodType:"list"})})});var rJ=K((oJ)=>{Object.defineProperty(oJ,"__esModule",{value:!0});oJ.ReportRuns=void 0;var aJ=w(),Z9=aJ.StripeResource.method;oJ.ReportRuns=aJ.StripeResource.extend({create:Z9({method:"POST",fullPath:"/v1/reporting/report_runs"}),retrieve:Z9({method:"GET",fullPath:"/v1/reporting/report_runs/{report_run}"}),list:Z9({method:"GET",fullPath:"/v1/reporting/report_runs",methodType:"list"})})});var J5=K(($5)=>{Object.defineProperty($5,"__esModule",{value:!0});$5.ReportTypes=void 0;var eJ=w(),tJ=eJ.StripeResource.method;$5.ReportTypes=eJ.StripeResource.extend({retrieve:tJ({method:"GET",fullPath:"/v1/reporting/report_types/{report_type}"}),list:tJ({method:"GET",fullPath:"/v1/reporting/report_types",methodType:"list"})})});var G5=K((X5)=>{Object.defineProperty(X5,"__esModule",{value:!0});X5.Requests=void 0;var Q5=w(),J9=Q5.StripeResource.method;X5.Requests=Q5.StripeResource.extend({create:J9({method:"POST",fullPath:"/v1/forwarding/requests"}),retrieve:J9({method:"GET",fullPath:"/v1/forwarding/requests/{id}"}),list:J9({method:"GET",fullPath:"/v1/forwarding/requests",methodType:"list"})})});var z5=K((W5)=>{Object.defineProperty(W5,"__esModule",{value:!0});W5.ScheduledQueryRuns=void 0;var B5=w(),V5=B5.StripeResource.method;W5.ScheduledQueryRuns=B5.StripeResource.extend({retrieve:V5({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs/{scheduled_query_run}"}),list:V5({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs",methodType:"list"})})});var w5=K((K5)=>{Object.defineProperty(K5,"__esModule",{value:!0});K5.Secrets=void 0;var L5=w(),m8=L5.StripeResource.method;K5.Secrets=L5.StripeResource.extend({create:m8({method:"POST",fullPath:"/v1/apps/secrets"}),list:m8({method:"GET",fullPath:"/v1/apps/secrets",methodType:"list"}),deleteWhere:m8({method:"POST",fullPath:"/v1/apps/secrets/delete"}),find:m8({method:"GET",fullPath:"/v1/apps/secrets/find"})})});var q5=K((D5)=>{Object.defineProperty(D5,"__esModule",{value:!0});D5.Sessions=void 0;var T5=w(),iU=T5.StripeResource.method;D5.Sessions=T5.StripeResource.extend({create:iU({method:"POST",fullPath:"/v1/billing_portal/sessions"})})});var k5=K((F5)=>{Object.defineProperty(F5,"__esModule",{value:!0});F5.Sessions=void 0;var E5=w(),q0=E5.StripeResource.method;F5.Sessions=E5.StripeResource.extend({create:q0({method:"POST",fullPath:"/v1/checkout/sessions",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),retrieve:q0({method:"GET",fullPath:"/v1/checkout/sessions/{session}",responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),update:q0({method:"POST",fullPath:"/v1/checkout/sessions/{session}",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),list:q0({method:"GET",fullPath:"/v1/checkout/sessions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}),expire:q0({method:"POST",fullPath:"/v1/checkout/sessions/{session}/expire",responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),listLineItems:q0({method:"GET",fullPath:"/v1/checkout/sessions/{session}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}})})});var P5=K((x5)=>{Object.defineProperty(x5,"__esModule",{value:!0});x5.Sessions=void 0;var N5=w(),A5=N5.StripeResource.method;x5.Sessions=N5.StripeResource.extend({create:A5({method:"POST",fullPath:"/v1/financial_connections/sessions"}),retrieve:A5({method:"GET",fullPath:"/v1/financial_connections/sessions/{session}"})})});var b5=K((y5)=>{Object.defineProperty(y5,"__esModule",{value:!0});y5.Settings=void 0;var R5=w(),S5=R5.StripeResource.method;y5.Settings=R5.StripeResource.extend({retrieve:S5({method:"GET",fullPath:"/v1/tax/settings"}),update:S5({method:"POST",fullPath:"/v1/tax/settings"})})});var g5=K((M5)=>{Object.defineProperty(M5,"__esModule",{value:!0});M5.Suppliers=void 0;var f5=w(),j5=f5.StripeResource.method;M5.Suppliers=f5.StripeResource.extend({retrieve:j5({method:"GET",fullPath:"/v1/climate/suppliers/{supplier}"}),list:j5({method:"GET",fullPath:"/v1/climate/suppliers",methodType:"list"})})});var c5=K((m5)=>{Object.defineProperty(m5,"__esModule",{value:!0});m5.TestClocks=void 0;var h5=w(),o0=h5.StripeResource.method;m5.TestClocks=h5.StripeResource.extend({create:o0({method:"POST",fullPath:"/v1/test_helpers/test_clocks"}),retrieve:o0({method:"GET",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),list:o0({method:"GET",fullPath:"/v1/test_helpers/test_clocks",methodType:"list"}),del:o0({method:"DELETE",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),advance:o0({method:"POST",fullPath:"/v1/test_helpers/test_clocks/{test_clock}/advance"})})});var d5=K((l5)=>{Object.defineProperty(l5,"__esModule",{value:!0});l5.Tokens=void 0;var n5=w(),Q9=n5.StripeResource.method;l5.Tokens=n5.StripeResource.extend({retrieve:Q9({method:"GET",fullPath:"/v1/issuing/tokens/{token}"}),update:Q9({method:"POST",fullPath:"/v1/issuing/tokens/{token}"}),list:Q9({method:"GET",fullPath:"/v1/issuing/tokens",methodType:"list"})})});var r5=K((o5)=>{Object.defineProperty(o5,"__esModule",{value:!0});o5.TransactionEntries=void 0;var a5=w(),i5=a5.StripeResource.method;o5.TransactionEntries=a5.StripeResource.extend({retrieve:i5({method:"GET",fullPath:"/v1/treasury/transaction_entries/{id}",responseSchema:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}),list:i5({method:"GET",fullPath:"/v1/treasury/transaction_entries",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}})})});var JQ=K(($Q)=>{Object.defineProperty($Q,"__esModule",{value:!0});$Q.Transactions=void 0;var e5=w(),t5=e5.StripeResource.method;$Q.Transactions=e5.StripeResource.extend({retrieve:t5({method:"GET",fullPath:"/v1/financial_connections/transactions/{transaction}"}),list:t5({method:"GET",fullPath:"/v1/financial_connections/transactions",methodType:"list"})})});var GQ=K((XQ)=>{Object.defineProperty(XQ,"__esModule",{value:!0});XQ.Transactions=void 0;var QQ=w(),X9=QQ.StripeResource.method;XQ.Transactions=QQ.StripeResource.extend({retrieve:X9({method:"GET",fullPath:"/v1/issuing/transactions/{transaction}",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),update:X9({method:"POST",fullPath:"/v1/issuing/transactions/{transaction}",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),list:X9({method:"GET",fullPath:"/v1/issuing/transactions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})})});var UQ=K((BQ)=>{Object.defineProperty(BQ,"__esModule",{value:!0});BQ.Transactions=void 0;var VQ=w(),u8=VQ.StripeResource.method;BQ.Transactions=VQ.StripeResource.extend({retrieve:u8({method:"GET",fullPath:"/v1/tax/transactions/{transaction}"}),createFromCalculation:u8({method:"POST",fullPath:"/v1/tax/transactions/create_from_calculation"}),createReversal:u8({method:"POST",fullPath:"/v1/tax/transactions/create_reversal"}),listLineItems:u8({method:"GET",fullPath:"/v1/tax/transactions/{transaction}/line_items",methodType:"list"})})});var HQ=K((LQ)=>{Object.defineProperty(LQ,"__esModule",{value:!0});LQ.Transactions=void 0;var zQ=w(),Y9=zQ.StripeResource.method;LQ.Transactions=zQ.StripeResource.extend({createForceCapture:Y9({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_force_capture",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),createUnlinkedRefund:Y9({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_unlinked_refund",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),refund:Y9({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/{transaction}/refund",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}})})});var qQ=K((DQ)=>{Object.defineProperty(DQ,"__esModule",{value:!0});DQ.Transactions=void 0;var TQ=w(),wQ=TQ.StripeResource.method;DQ.Transactions=TQ.StripeResource.extend({retrieve:wQ({method:"GET",fullPath:"/v1/treasury/transactions/{id}",responseSchema:{kind:"object",fields:{entries:{kind:"nullable",inner:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}}}}}),list:wQ({method:"GET",fullPath:"/v1/treasury/transactions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{entries:{kind:"nullable",inner:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}}}}}}}})})});var kQ=K((FQ)=>{Object.defineProperty(FQ,"__esModule",{value:!0});FQ.ValueListItems=void 0;var EQ=w(),c8=EQ.StripeResource.method;FQ.ValueListItems=EQ.StripeResource.extend({create:c8({method:"POST",fullPath:"/v1/radar/value_list_items"}),retrieve:c8({method:"GET",fullPath:"/v1/radar/value_list_items/{item}"}),list:c8({method:"GET",fullPath:"/v1/radar/value_list_items",methodType:"list"}),del:c8({method:"DELETE",fullPath:"/v1/radar/value_list_items/{item}"})})});var IQ=K((NQ)=>{Object.defineProperty(NQ,"__esModule",{value:!0});NQ.ValueLists=void 0;var AQ=w(),s0=AQ.StripeResource.method;NQ.ValueLists=AQ.StripeResource.extend({create:s0({method:"POST",fullPath:"/v1/radar/value_lists"}),retrieve:s0({method:"GET",fullPath:"/v1/radar/value_lists/{value_list}"}),update:s0({method:"POST",fullPath:"/v1/radar/value_lists/{value_list}"}),list:s0({method:"GET",fullPath:"/v1/radar/value_lists",methodType:"list"}),del:s0({method:"DELETE",fullPath:"/v1/radar/value_lists/{value_list}"})})});var vQ=K((RQ)=>{Object.defineProperty(RQ,"__esModule",{value:!0});RQ.VerificationReports=void 0;var SQ=w(),PQ=SQ.StripeResource.method;RQ.VerificationReports=SQ.StripeResource.extend({retrieve:PQ({method:"GET",fullPath:"/v1/identity/verification_reports/{report}"}),list:PQ({method:"GET",fullPath:"/v1/identity/verification_reports",methodType:"list"})})});var MQ=K((jQ)=>{Object.defineProperty(jQ,"__esModule",{value:!0});jQ.VerificationSessions=void 0;var bQ=w(),E0=bQ.StripeResource.method;jQ.VerificationSessions=bQ.StripeResource.extend({create:E0({method:"POST",fullPath:"/v1/identity/verification_sessions"}),retrieve:E0({method:"GET",fullPath:"/v1/identity/verification_sessions/{session}"}),update:E0({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}"}),list:E0({method:"GET",fullPath:"/v1/identity/verification_sessions",methodType:"list"}),cancel:E0({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/cancel"}),redact:E0({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/redact"})})});var G9=K((gQ)=>{Object.defineProperty(gQ,"__esModule",{value:!0});gQ.Accounts=void 0;var _Q=w(),I=_Q.StripeResource.method;gQ.Accounts=_Q.StripeResource.extend({create:I({method:"POST",fullPath:"/v1/accounts"}),retrieve($,...Z){if(typeof $==="string")return I({method:"GET",fullPath:"/v1/accounts/{id}"}).apply(this,[$,...Z]);else{if($===null||$===void 0)[].shift.apply([$,...Z]);return I({method:"GET",fullPath:"/v1/account"}).apply(this,[$,...Z])}},update:I({method:"POST",fullPath:"/v1/accounts/{account}"}),list:I({method:"GET",fullPath:"/v1/accounts",methodType:"list"}),del:I({method:"DELETE",fullPath:"/v1/accounts/{account}"}),createExternalAccount:I({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts"}),createLoginLink:I({method:"POST",fullPath:"/v1/accounts/{account}/login_links"}),createPerson:I({method:"POST",fullPath:"/v1/accounts/{account}/persons"}),deleteExternalAccount:I({method:"DELETE",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),deletePerson:I({method:"DELETE",fullPath:"/v1/accounts/{account}/persons/{person}"}),listCapabilities:I({method:"GET",fullPath:"/v1/accounts/{account}/capabilities",methodType:"list"}),listExternalAccounts:I({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts",methodType:"list"}),listPersons:I({method:"GET",fullPath:"/v1/accounts/{account}/persons",methodType:"list"}),reject:I({method:"POST",fullPath:"/v1/accounts/{account}/reject"}),retrieveCurrent:I({method:"GET",fullPath:"/v1/account"}),retrieveCapability:I({method:"GET",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),retrieveExternalAccount:I({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),retrievePerson:I({method:"GET",fullPath:"/v1/accounts/{account}/persons/{person}"}),updateCapability:I({method:"POST",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),updateExternalAccount:I({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),updatePerson:I({method:"POST",fullPath:"/v1/accounts/{account}/persons/{person}"})})});var nQ=K((uQ)=>{Object.defineProperty(uQ,"__esModule",{value:!0});uQ.AccountLinks=void 0;var mQ=w(),aU=mQ.StripeResource.method;uQ.AccountLinks=mQ.StripeResource.extend({create:aU({method:"POST",fullPath:"/v1/account_links"})})});var iQ=K((pQ)=>{Object.defineProperty(pQ,"__esModule",{value:!0});pQ.AccountSessions=void 0;var lQ=w(),oU=lQ.StripeResource.method;pQ.AccountSessions=lQ.StripeResource.extend({create:oU({method:"POST",fullPath:"/v1/account_sessions"})})});var rQ=K((oQ)=>{Object.defineProperty(oQ,"__esModule",{value:!0});oQ.ApplePayDomains=void 0;var aQ=w(),n8=aQ.StripeResource.method;oQ.ApplePayDomains=aQ.StripeResource.extend({create:n8({method:"POST",fullPath:"/v1/apple_pay/domains"}),retrieve:n8({method:"GET",fullPath:"/v1/apple_pay/domains/{domain}"}),list:n8({method:"GET",fullPath:"/v1/apple_pay/domains",methodType:"list"}),del:n8({method:"DELETE",fullPath:"/v1/apple_pay/domains/{domain}"})})});var ZX=K((eQ)=>{Object.defineProperty(eQ,"__esModule",{value:!0});eQ.ApplicationFees=void 0;var tQ=w(),F0=tQ.StripeResource.method;eQ.ApplicationFees=tQ.StripeResource.extend({retrieve:F0({method:"GET",fullPath:"/v1/application_fees/{id}"}),list:F0({method:"GET",fullPath:"/v1/application_fees",methodType:"list"}),createRefund:F0({method:"POST",fullPath:"/v1/application_fees/{id}/refunds"}),listRefunds:F0({method:"GET",fullPath:"/v1/application_fees/{id}/refunds",methodType:"list"}),retrieveRefund:F0({method:"GET",fullPath:"/v1/application_fees/{fee}/refunds/{id}"}),updateRefund:F0({method:"POST",fullPath:"/v1/application_fees/{fee}/refunds/{id}"})})});var YX=K((QX)=>{Object.defineProperty(QX,"__esModule",{value:!0});QX.Balance=void 0;var JX=w(),sU=JX.StripeResource.method;QX.Balance=JX.StripeResource.extend({retrieve:sU({method:"GET",fullPath:"/v1/balance"})})});var UX=K((BX)=>{Object.defineProperty(BX,"__esModule",{value:!0});BX.BalanceSettings=void 0;var VX=w(),GX=VX.StripeResource.method;BX.BalanceSettings=VX.StripeResource.extend({retrieve:GX({method:"GET",fullPath:"/v1/balance_settings"}),update:GX({method:"POST",fullPath:"/v1/balance_settings"})})});var wX=K((KX)=>{Object.defineProperty(KX,"__esModule",{value:!0});KX.BalanceTransactions=void 0;var LX=w(),zX=LX.StripeResource.method;KX.BalanceTransactions=LX.StripeResource.extend({retrieve:zX({method:"GET",fullPath:"/v1/balance_transactions/{id}"}),list:zX({method:"GET",fullPath:"/v1/balance_transactions",methodType:"list"})})});var qX=K((DX)=>{Object.defineProperty(DX,"__esModule",{value:!0});DX.Charges=void 0;var TX=w(),C0=TX.StripeResource.method;DX.Charges=TX.StripeResource.extend({create:C0({method:"POST",fullPath:"/v1/charges"}),retrieve:C0({method:"GET",fullPath:"/v1/charges/{charge}"}),update:C0({method:"POST",fullPath:"/v1/charges/{charge}"}),list:C0({method:"GET",fullPath:"/v1/charges",methodType:"list"}),capture:C0({method:"POST",fullPath:"/v1/charges/{charge}/capture"}),search:C0({method:"GET",fullPath:"/v1/charges/search",methodType:"search"})})});var kX=K((FX)=>{Object.defineProperty(FX,"__esModule",{value:!0});FX.ConfirmationTokens=void 0;var EX=w(),rU=EX.StripeResource.method;FX.ConfirmationTokens=EX.StripeResource.extend({retrieve:rU({method:"GET",fullPath:"/v1/confirmation_tokens/{confirmation_token}"})})});var PX=K((xX)=>{Object.defineProperty(xX,"__esModule",{value:!0});xX.CountrySpecs=void 0;var NX=w(),AX=NX.StripeResource.method;xX.CountrySpecs=NX.StripeResource.extend({retrieve:AX({method:"GET",fullPath:"/v1/country_specs/{country}"}),list:AX({method:"GET",fullPath:"/v1/country_specs",methodType:"list"})})});var vX=K((RX)=>{Object.defineProperty(RX,"__esModule",{value:!0});RX.Coupons=void 0;var SX=w(),r0=SX.StripeResource.method;RX.Coupons=SX.StripeResource.extend({create:r0({method:"POST",fullPath:"/v1/coupons"}),retrieve:r0({method:"GET",fullPath:"/v1/coupons/{coupon}"}),update:r0({method:"POST",fullPath:"/v1/coupons/{coupon}"}),list:r0({method:"GET",fullPath:"/v1/coupons",methodType:"list"}),del:r0({method:"DELETE",fullPath:"/v1/coupons/{coupon}"})})});var MX=K((jX)=>{Object.defineProperty(jX,"__esModule",{value:!0});jX.CreditNotes=void 0;var bX=w(),r=bX.StripeResource.method;jX.CreditNotes=bX.StripeResource.extend({create:r({method:"POST",fullPath:"/v1/credit_notes",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),retrieve:r({method:"GET",fullPath:"/v1/credit_notes/{id}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),update:r({method:"POST",fullPath:"/v1/credit_notes/{id}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),list:r({method:"GET",fullPath:"/v1/credit_notes",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),listLineItems:r({method:"GET",fullPath:"/v1/credit_notes/{credit_note}/lines",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),listPreviewLineItems:r({method:"GET",fullPath:"/v1/credit_notes/preview/lines",methodType:"list",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),preview:r({method:"GET",fullPath:"/v1/credit_notes/preview",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),voidCreditNote:r({method:"POST",fullPath:"/v1/credit_notes/{id}/void",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})})});var mX=K((gX)=>{Object.defineProperty(gX,"__esModule",{value:!0});gX.CustomerSessions=void 0;var _X=w(),tU=_X.StripeResource.method;gX.CustomerSessions=_X.StripeResource.extend({create:tU({method:"POST",fullPath:"/v1/customer_sessions"})})});var lX=K((cX)=>{Object.defineProperty(cX,"__esModule",{value:!0});cX.Customers=void 0;var uX=w(),A=uX.StripeResource.method;cX.Customers=uX.StripeResource.extend({create:A({method:"POST",fullPath:"/v1/customers",responseSchema:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),retrieve:A({method:"GET",fullPath:"/v1/customers/{customer}"}),update:A({method:"POST",fullPath:"/v1/customers/{customer}",responseSchema:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),list:A({method:"GET",fullPath:"/v1/customers",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),del:A({method:"DELETE",fullPath:"/v1/customers/{customer}"}),createBalanceTransaction:A({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions"}),createFundingInstructions:A({method:"POST",fullPath:"/v1/customers/{customer}/funding_instructions"}),createSource:A({method:"POST",fullPath:"/v1/customers/{customer}/sources"}),createTaxId:A({method:"POST",fullPath:"/v1/customers/{customer}/tax_ids"}),deleteDiscount:A({method:"DELETE",fullPath:"/v1/customers/{customer}/discount"}),deleteSource:A({method:"DELETE",fullPath:"/v1/customers/{customer}/sources/{id}"}),deleteTaxId:A({method:"DELETE",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),listBalanceTransactions:A({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions",methodType:"list"}),listCashBalanceTransactions:A({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions",methodType:"list"}),listPaymentMethods:A({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods",methodType:"list"}),listSources:A({method:"GET",fullPath:"/v1/customers/{customer}/sources",methodType:"list"}),listTaxIds:A({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids",methodType:"list"}),retrieveBalanceTransaction:A({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),retrieveCashBalance:A({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance"}),retrieveCashBalanceTransaction:A({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions/{transaction}"}),retrievePaymentMethod:A({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods/{payment_method}"}),retrieveSource:A({method:"GET",fullPath:"/v1/customers/{customer}/sources/{id}"}),retrieveTaxId:A({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),search:A({method:"GET",fullPath:"/v1/customers/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),updateBalanceTransaction:A({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),updateCashBalance:A({method:"POST",fullPath:"/v1/customers/{customer}/cash_balance"}),updateSource:A({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}"}),verifySource:A({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}/verify"})})});var aX=K((dX)=>{Object.defineProperty(dX,"__esModule",{value:!0});dX.Disputes=void 0;var pX=w(),l8=pX.StripeResource.method;dX.Disputes=pX.StripeResource.extend({retrieve:l8({method:"GET",fullPath:"/v1/disputes/{dispute}"}),update:l8({method:"POST",fullPath:"/v1/disputes/{dispute}"}),list:l8({method:"GET",fullPath:"/v1/disputes",methodType:"list"}),close:l8({method:"POST",fullPath:"/v1/disputes/{dispute}/close"})})});var eX=K((rX)=>{Object.defineProperty(rX,"__esModule",{value:!0});rX.EphemeralKeys=void 0;var sX=w(),oX=sX.StripeResource.method;rX.EphemeralKeys=sX.StripeResource.extend({create:oX({method:"POST",fullPath:"/v1/ephemeral_keys",validator:($,Z)=>{if(!Z.headers||!Z.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:oX({method:"DELETE",fullPath:"/v1/ephemeral_keys/{key}"})})});var XY=K((JY)=>{Object.defineProperty(JY,"__esModule",{value:!0});JY.Events=void 0;var ZY=w(),$Y=ZY.StripeResource.method;JY.Events=ZY.StripeResource.extend({retrieve:$Y({method:"GET",fullPath:"/v1/events/{id}"}),list:$Y({method:"GET",fullPath:"/v1/events",methodType:"list"})})});var WY=K((VY)=>{Object.defineProperty(VY,"__esModule",{value:!0});VY.ExchangeRates=void 0;var GY=w(),YY=GY.StripeResource.method;VY.ExchangeRates=GY.StripeResource.extend({retrieve:YY({method:"GET",fullPath:"/v1/exchange_rates/{rate_id}"}),list:YY({method:"GET",fullPath:"/v1/exchange_rates",methodType:"list"})})});var KY=K((zY)=>{Object.defineProperty(zY,"__esModule",{value:!0});zY.FileLinks=void 0;var UY=w(),p8=UY.StripeResource.method;zY.FileLinks=UY.StripeResource.extend({create:p8({method:"POST",fullPath:"/v1/file_links"}),retrieve:p8({method:"GET",fullPath:"/v1/file_links/{link}"}),update:p8({method:"POST",fullPath:"/v1/file_links/{link}"}),list:p8({method:"GET",fullPath:"/v1/file_links",methodType:"list"})})});var DY=K((wY)=>{Object.defineProperty(wY,"__esModule",{value:!0});wY.multipartRequestDataProcessor=void 0;var HY=c(),eU=($,Z,J)=>{let Q=(Math.round(Math.random()*10000000000000000)+Math.round(Math.random()*10000000000000000)).toString();J["Content-Type"]=`multipart/form-data; boundary=${Q}`;let X=new TextEncoder,Y=new Uint8Array(0),G=X.encode(`\r
12
- `);function V(B){let z=Y,L=B instanceof Uint8Array?B:new Uint8Array(X.encode(B));Y=new Uint8Array(z.length+L.length+2),Y.set(z),Y.set(L,z.length),Y.set(G,Y.length-2)}function U(B){return`"${B.replace(/"|"/g,"%22").replace(/\r\n|\r|\n/g," ")}"`}let W=(0,HY.flattenAndStringify)(Z);for(let B in W){if(!Object.prototype.hasOwnProperty.call(W,B))continue;let z=W[B];if(V(`--${Q}`),Object.prototype.hasOwnProperty.call(z,"data")){let L=z;V(`Content-Disposition: form-data; name=${U(B)}; filename=${U(L.name||"blob")}`),V(`Content-Type: ${L.type||"application/octet-stream"}`),V(""),V(L.data)}else V(`Content-Disposition: form-data; name=${U(B)}`),V(""),V(z)}return V(`--${Q}--`),Y};function $z($,Z,J,Q){if(Z=Z||{},$!=="POST")return Q(null,(0,HY.queryStringifyRequestData)(Z));this._stripe._platformFunctions.tryBufferData(Z).then((X)=>{let Y=eU($,X,J);return Q(null,Y)}).catch((X)=>Q(X,null))}wY.multipartRequestDataProcessor=$z});var FY=K((qY)=>{Object.defineProperty(qY,"__esModule",{value:!0});qY.Files=void 0;var Zz=DY(),OY=w(),V9=OY.StripeResource.method;qY.Files=OY.StripeResource.extend({create:V9({method:"POST",fullPath:"/v1/files",headers:{"Content-Type":"multipart/form-data"},host:"files.stripe.com"}),retrieve:V9({method:"GET",fullPath:"/v1/files/{file}"}),list:V9({method:"GET",fullPath:"/v1/files",methodType:"list"}),requestDataProcessor:Zz.multipartRequestDataProcessor})});var NY=K((kY)=>{Object.defineProperty(kY,"__esModule",{value:!0});kY.InvoiceItems=void 0;var CY=w(),t0=CY.StripeResource.method;kY.InvoiceItems=CY.StripeResource.extend({create:t0({method:"POST",fullPath:"/v1/invoiceitems",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),retrieve:t0({method:"GET",fullPath:"/v1/invoiceitems/{invoiceitem}",responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),update:t0({method:"POST",fullPath:"/v1/invoiceitems/{invoiceitem}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),list:t0({method:"GET",fullPath:"/v1/invoiceitems",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}}}}),del:t0({method:"DELETE",fullPath:"/v1/invoiceitems/{invoiceitem}"})})});var RY=K((PY)=>{Object.defineProperty(PY,"__esModule",{value:!0});PY.InvoicePayments=void 0;var IY=w(),xY=IY.StripeResource.method;PY.InvoicePayments=IY.StripeResource.extend({retrieve:xY({method:"GET",fullPath:"/v1/invoice_payments/{invoice_payment}"}),list:xY({method:"GET",fullPath:"/v1/invoice_payments",methodType:"list"})})});var jY=K((vY)=>{Object.defineProperty(vY,"__esModule",{value:!0});vY.InvoiceRenderingTemplates=void 0;var yY=w(),d8=yY.StripeResource.method;vY.InvoiceRenderingTemplates=yY.StripeResource.extend({retrieve:d8({method:"GET",fullPath:"/v1/invoice_rendering_templates/{template}"}),list:d8({method:"GET",fullPath:"/v1/invoice_rendering_templates",methodType:"list"}),archive:d8({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/archive"}),unarchive:d8({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/unarchive"})})});var gY=K((MY)=>{Object.defineProperty(MY,"__esModule",{value:!0});MY.Invoices=void 0;var fY=w(),S=fY.StripeResource.method;MY.Invoices=fY.StripeResource.extend({create:S({method:"POST",fullPath:"/v1/invoices",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),retrieve:S({method:"GET",fullPath:"/v1/invoices/{invoice}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),update:S({method:"POST",fullPath:"/v1/invoices/{invoice}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),list:S({method:"GET",fullPath:"/v1/invoices",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),del:S({method:"DELETE",fullPath:"/v1/invoices/{invoice}"}),addLines:S({method:"POST",fullPath:"/v1/invoices/{invoice}/add_lines",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),attachPayment:S({method:"POST",fullPath:"/v1/invoices/{invoice}/attach_payment",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),createPreview:S({method:"POST",fullPath:"/v1/invoices/create_preview",requestSchema:{kind:"object",fields:{invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},schedule_details:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}},subscription_details:{kind:"object",fields:{items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),finalizeInvoice:S({method:"POST",fullPath:"/v1/invoices/{invoice}/finalize",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),listLineItems:S({method:"GET",fullPath:"/v1/invoices/{invoice}/lines",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),markUncollectible:S({method:"POST",fullPath:"/v1/invoices/{invoice}/mark_uncollectible",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),pay:S({method:"POST",fullPath:"/v1/invoices/{invoice}/pay",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),removeLines:S({method:"POST",fullPath:"/v1/invoices/{invoice}/remove_lines",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),search:S({method:"GET",fullPath:"/v1/invoices/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),sendInvoice:S({method:"POST",fullPath:"/v1/invoices/{invoice}/send",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),updateLines:S({method:"POST",fullPath:"/v1/invoices/{invoice}/update_lines",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),updateLineItem:S({method:"POST",fullPath:"/v1/invoices/{invoice}/lines/{line_item_id}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),voidInvoice:S({method:"POST",fullPath:"/v1/invoices/{invoice}/void",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})})});var cY=K((mY)=>{Object.defineProperty(mY,"__esModule",{value:!0});mY.Mandates=void 0;var hY=w(),Jz=hY.StripeResource.method;mY.Mandates=hY.StripeResource.extend({retrieve:Jz({method:"GET",fullPath:"/v1/mandates/{mandate}"})})});var iY=K((pY)=>{Object.defineProperty(pY,"__esModule",{value:!0});pY.OAuth=void 0;var lY=w(),Qz=c(),nY=lY.StripeResource.method,B9="connect.stripe.com";pY.OAuth=lY.StripeResource.extend({basePath:"/",authorizeUrl($,Z){$=$||{},Z=Z||{};let J="oauth/authorize";if(Z.express)J=`express/${J}`;if(!$.response_type)$.response_type="code";if(!$.client_id)$.client_id=this._stripe.getClientId();if(!$.scope)$.scope="read_write";return`https://${B9}/${J}?${(0,Qz.queryStringifyRequestData)($)}`},token:nY({method:"POST",path:"oauth/token",host:B9}),deauthorize($,...Z){if(!$.client_id)$.client_id=this._stripe.getClientId();return nY({method:"POST",path:"oauth/deauthorize",host:B9}).apply(this,[$,...Z])}})});var tY=K((sY)=>{Object.defineProperty(sY,"__esModule",{value:!0});sY.PaymentAttemptRecords=void 0;var oY=w(),aY=oY.StripeResource.method;sY.PaymentAttemptRecords=oY.StripeResource.extend({retrieve:aY({method:"GET",fullPath:"/v1/payment_attempt_records/{id}"}),list:aY({method:"GET",fullPath:"/v1/payment_attempt_records",methodType:"list"})})});var JG=K(($G)=>{Object.defineProperty($G,"__esModule",{value:!0});$G.PaymentIntents=void 0;var eY=w(),g=eY.StripeResource.method;$G.PaymentIntents=eY.StripeResource.extend({create:g({method:"POST",fullPath:"/v1/payment_intents"}),retrieve:g({method:"GET",fullPath:"/v1/payment_intents/{intent}"}),update:g({method:"POST",fullPath:"/v1/payment_intents/{intent}"}),list:g({method:"GET",fullPath:"/v1/payment_intents",methodType:"list"}),applyCustomerBalance:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/apply_customer_balance"}),cancel:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/cancel"}),capture:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/capture"}),confirm:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/confirm"}),incrementAuthorization:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/increment_authorization"}),listAmountDetailsLineItems:g({method:"GET",fullPath:"/v1/payment_intents/{intent}/amount_details_line_items",methodType:"list"}),search:g({method:"GET",fullPath:"/v1/payment_intents/search",methodType:"search"}),verifyMicrodeposits:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/verify_microdeposits"})})});var GG=K((XG)=>{Object.defineProperty(XG,"__esModule",{value:!0});XG.PaymentLinks=void 0;var QG=w(),e0=QG.StripeResource.method;XG.PaymentLinks=QG.StripeResource.extend({create:e0({method:"POST",fullPath:"/v1/payment_links",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),retrieve:e0({method:"GET",fullPath:"/v1/payment_links/{payment_link}",responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),update:e0({method:"POST",fullPath:"/v1/payment_links/{payment_link}",responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),list:e0({method:"GET",fullPath:"/v1/payment_links",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}),listLineItems:e0({method:"GET",fullPath:"/v1/payment_links/{payment_link}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}})})});var UG=K((BG)=>{Object.defineProperty(BG,"__esModule",{value:!0});BG.PaymentMethodConfigurations=void 0;var VG=w(),i8=VG.StripeResource.method;BG.PaymentMethodConfigurations=VG.StripeResource.extend({create:i8({method:"POST",fullPath:"/v1/payment_method_configurations"}),retrieve:i8({method:"GET",fullPath:"/v1/payment_method_configurations/{configuration}"}),update:i8({method:"POST",fullPath:"/v1/payment_method_configurations/{configuration}"}),list:i8({method:"GET",fullPath:"/v1/payment_method_configurations",methodType:"list"})})});var HG=K((LG)=>{Object.defineProperty(LG,"__esModule",{value:!0});LG.PaymentMethodDomains=void 0;var zG=w(),$8=zG.StripeResource.method;LG.PaymentMethodDomains=zG.StripeResource.extend({create:$8({method:"POST",fullPath:"/v1/payment_method_domains"}),retrieve:$8({method:"GET",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),update:$8({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),list:$8({method:"GET",fullPath:"/v1/payment_method_domains",methodType:"list"}),validate:$8({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}/validate"})})});var OG=K((TG)=>{Object.defineProperty(TG,"__esModule",{value:!0});TG.PaymentMethods=void 0;var wG=w(),k0=wG.StripeResource.method;TG.PaymentMethods=wG.StripeResource.extend({create:k0({method:"POST",fullPath:"/v1/payment_methods"}),retrieve:k0({method:"GET",fullPath:"/v1/payment_methods/{payment_method}"}),update:k0({method:"POST",fullPath:"/v1/payment_methods/{payment_method}"}),list:k0({method:"GET",fullPath:"/v1/payment_methods",methodType:"list"}),attach:k0({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/attach"}),detach:k0({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/detach"})})});var CG=K((EG)=>{Object.defineProperty(EG,"__esModule",{value:!0});EG.PaymentRecords=void 0;var qG=w(),t=qG.StripeResource.method;EG.PaymentRecords=qG.StripeResource.extend({retrieve:t({method:"GET",fullPath:"/v1/payment_records/{id}"}),reportPayment:t({method:"POST",fullPath:"/v1/payment_records/report_payment"}),reportPaymentAttempt:t({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt"}),reportPaymentAttemptCanceled:t({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_canceled"}),reportPaymentAttemptFailed:t({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_failed"}),reportPaymentAttemptGuaranteed:t({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_guaranteed"}),reportPaymentAttemptInformational:t({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_informational"}),reportRefund:t({method:"POST",fullPath:"/v1/payment_records/{id}/report_refund"})})});var xG=K((AG)=>{Object.defineProperty(AG,"__esModule",{value:!0});AG.Payouts=void 0;var kG=w(),A0=kG.StripeResource.method;AG.Payouts=kG.StripeResource.extend({create:A0({method:"POST",fullPath:"/v1/payouts"}),retrieve:A0({method:"GET",fullPath:"/v1/payouts/{payout}"}),update:A0({method:"POST",fullPath:"/v1/payouts/{payout}"}),list:A0({method:"GET",fullPath:"/v1/payouts",methodType:"list"}),cancel:A0({method:"POST",fullPath:"/v1/payouts/{payout}/cancel"}),reverse:A0({method:"POST",fullPath:"/v1/payouts/{payout}/reverse"})})});var RG=K((PG)=>{Object.defineProperty(PG,"__esModule",{value:!0});PG.Plans=void 0;var IG=w(),Z8=IG.StripeResource.method;PG.Plans=IG.StripeResource.extend({create:Z8({method:"POST",fullPath:"/v1/plans",requestSchema:{kind:"object",fields:{amount_decimal:{kind:"decimal_string"},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),retrieve:Z8({method:"GET",fullPath:"/v1/plans/{plan}",responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),update:Z8({method:"POST",fullPath:"/v1/plans/{plan}",responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),list:Z8({method:"GET",fullPath:"/v1/plans",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),del:Z8({method:"DELETE",fullPath:"/v1/plans/{plan}"})})});var jG=K((vG)=>{Object.defineProperty(vG,"__esModule",{value:!0});vG.Prices=void 0;var yG=w(),J8=yG.StripeResource.method;vG.Prices=yG.StripeResource.extend({create:J8({method:"POST",fullPath:"/v1/prices",requestSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),retrieve:J8({method:"GET",fullPath:"/v1/prices/{price}",responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),update:J8({method:"POST",fullPath:"/v1/prices/{price}",responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),list:J8({method:"GET",fullPath:"/v1/prices",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),search:J8({method:"GET",fullPath:"/v1/prices/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}})})});var gG=K((MG)=>{Object.defineProperty(MG,"__esModule",{value:!0});MG.Products=void 0;var fG=w(),n=fG.StripeResource.method;MG.Products=fG.StripeResource.extend({create:n({method:"POST",fullPath:"/v1/products",requestSchema:{kind:"object",fields:{default_price_data:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}}}}),retrieve:n({method:"GET",fullPath:"/v1/products/{id}"}),update:n({method:"POST",fullPath:"/v1/products/{id}"}),list:n({method:"GET",fullPath:"/v1/products",methodType:"list"}),del:n({method:"DELETE",fullPath:"/v1/products/{id}"}),createFeature:n({method:"POST",fullPath:"/v1/products/{product}/features"}),deleteFeature:n({method:"DELETE",fullPath:"/v1/products/{product}/features/{id}"}),listFeatures:n({method:"GET",fullPath:"/v1/products/{product}/features",methodType:"list"}),retrieveFeature:n({method:"GET",fullPath:"/v1/products/{product}/features/{id}"}),search:n({method:"GET",fullPath:"/v1/products/search",methodType:"search"})})});var cG=K((mG)=>{Object.defineProperty(mG,"__esModule",{value:!0});mG.PromotionCodes=void 0;var hG=w(),a8=hG.StripeResource.method;mG.PromotionCodes=hG.StripeResource.extend({create:a8({method:"POST",fullPath:"/v1/promotion_codes"}),retrieve:a8({method:"GET",fullPath:"/v1/promotion_codes/{promotion_code}"}),update:a8({method:"POST",fullPath:"/v1/promotion_codes/{promotion_code}"}),list:a8({method:"GET",fullPath:"/v1/promotion_codes",methodType:"list"})})});var dG=K((lG)=>{Object.defineProperty(lG,"__esModule",{value:!0});lG.Quotes=void 0;var nG=w(),l=nG.StripeResource.method;lG.Quotes=nG.StripeResource.extend({create:l({method:"POST",fullPath:"/v1/quotes",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),retrieve:l({method:"GET",fullPath:"/v1/quotes/{quote}",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),update:l({method:"POST",fullPath:"/v1/quotes/{quote}",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),list:l({method:"GET",fullPath:"/v1/quotes",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),accept:l({method:"POST",fullPath:"/v1/quotes/{quote}/accept",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),cancel:l({method:"POST",fullPath:"/v1/quotes/{quote}/cancel",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),finalizeQuote:l({method:"POST",fullPath:"/v1/quotes/{quote}/finalize",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),listComputedUpfrontLineItems:l({method:"GET",fullPath:"/v1/quotes/{quote}/computed_upfront_line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),listLineItems:l({method:"GET",fullPath:"/v1/quotes/{quote}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),pdf:l({method:"GET",fullPath:"/v1/quotes/{quote}/pdf",host:"files.stripe.com",streaming:!0})})});var sG=K((aG)=>{Object.defineProperty(aG,"__esModule",{value:!0});aG.Refunds=void 0;var iG=w(),Q8=iG.StripeResource.method;aG.Refunds=iG.StripeResource.extend({create:Q8({method:"POST",fullPath:"/v1/refunds"}),retrieve:Q8({method:"GET",fullPath:"/v1/refunds/{refund}"}),update:Q8({method:"POST",fullPath:"/v1/refunds/{refund}"}),list:Q8({method:"GET",fullPath:"/v1/refunds",methodType:"list"}),cancel:Q8({method:"POST",fullPath:"/v1/refunds/{refund}/cancel"})})});var $V=K((tG)=>{Object.defineProperty(tG,"__esModule",{value:!0});tG.Reviews=void 0;var rG=w(),W9=rG.StripeResource.method;tG.Reviews=rG.StripeResource.extend({retrieve:W9({method:"GET",fullPath:"/v1/reviews/{review}"}),list:W9({method:"GET",fullPath:"/v1/reviews",methodType:"list"}),approve:W9({method:"POST",fullPath:"/v1/reviews/{review}/approve"})})});var XV=K((JV)=>{Object.defineProperty(JV,"__esModule",{value:!0});JV.SetupAttempts=void 0;var ZV=w(),Xz=ZV.StripeResource.method;JV.SetupAttempts=ZV.StripeResource.extend({list:Xz({method:"GET",fullPath:"/v1/setup_attempts",methodType:"list"})})});var BV=K((GV)=>{Object.defineProperty(GV,"__esModule",{value:!0});GV.SetupIntents=void 0;var YV=w(),V0=YV.StripeResource.method;GV.SetupIntents=YV.StripeResource.extend({create:V0({method:"POST",fullPath:"/v1/setup_intents"}),retrieve:V0({method:"GET",fullPath:"/v1/setup_intents/{intent}"}),update:V0({method:"POST",fullPath:"/v1/setup_intents/{intent}"}),list:V0({method:"GET",fullPath:"/v1/setup_intents",methodType:"list"}),cancel:V0({method:"POST",fullPath:"/v1/setup_intents/{intent}/cancel"}),confirm:V0({method:"POST",fullPath:"/v1/setup_intents/{intent}/confirm"}),verifyMicrodeposits:V0({method:"POST",fullPath:"/v1/setup_intents/{intent}/verify_microdeposits"})})});var LV=K((UV)=>{Object.defineProperty(UV,"__esModule",{value:!0});UV.ShippingRates=void 0;var WV=w(),o8=WV.StripeResource.method;UV.ShippingRates=WV.StripeResource.extend({create:o8({method:"POST",fullPath:"/v1/shipping_rates"}),retrieve:o8({method:"GET",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),update:o8({method:"POST",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),list:o8({method:"GET",fullPath:"/v1/shipping_rates",methodType:"list"})})});var TV=K((HV)=>{Object.defineProperty(HV,"__esModule",{value:!0});HV.Sources=void 0;var KV=w(),X8=KV.StripeResource.method;HV.Sources=KV.StripeResource.extend({create:X8({method:"POST",fullPath:"/v1/sources"}),retrieve:X8({method:"GET",fullPath:"/v1/sources/{source}"}),update:X8({method:"POST",fullPath:"/v1/sources/{source}"}),listSourceTransactions:X8({method:"GET",fullPath:"/v1/sources/{source}/source_transactions",methodType:"list"}),verify:X8({method:"POST",fullPath:"/v1/sources/{source}/verify"})})});var EV=K((OV)=>{Object.defineProperty(OV,"__esModule",{value:!0});OV.SubscriptionItems=void 0;var DV=w(),Y8=DV.StripeResource.method;OV.SubscriptionItems=DV.StripeResource.extend({create:Y8({method:"POST",fullPath:"/v1/subscription_items",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),retrieve:Y8({method:"GET",fullPath:"/v1/subscription_items/{item}",responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),update:Y8({method:"POST",fullPath:"/v1/subscription_items/{item}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),list:Y8({method:"GET",fullPath:"/v1/subscription_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),del:Y8({method:"DELETE",fullPath:"/v1/subscription_items/{item}"})})});var AV=K((CV)=>{Object.defineProperty(CV,"__esModule",{value:!0});CV.SubscriptionSchedules=void 0;var FV=w(),N0=FV.StripeResource.method;CV.SubscriptionSchedules=FV.StripeResource.extend({create:N0({method:"POST",fullPath:"/v1/subscription_schedules",requestSchema:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}}}),retrieve:N0({method:"GET",fullPath:"/v1/subscription_schedules/{schedule}"}),update:N0({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}",requestSchema:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}}}),list:N0({method:"GET",fullPath:"/v1/subscription_schedules",methodType:"list"}),cancel:N0({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/cancel"}),release:N0({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/release"})})});var PV=K((xV)=>{Object.defineProperty(xV,"__esModule",{value:!0});xV.Subscriptions=void 0;var NV=w(),i=NV.StripeResource.method;xV.Subscriptions=NV.StripeResource.extend({create:i({method:"POST",fullPath:"/v1/subscriptions",requestSchema:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),retrieve:i({method:"GET",fullPath:"/v1/subscriptions/{subscription_exposed_id}",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),update:i({method:"POST",fullPath:"/v1/subscriptions/{subscription_exposed_id}",requestSchema:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),list:i({method:"GET",fullPath:"/v1/subscriptions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}),cancel:i({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),deleteDiscount:i({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}/discount"}),migrate:i({method:"POST",fullPath:"/v1/subscriptions/{subscription}/migrate",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),resume:i({method:"POST",fullPath:"/v1/subscriptions/{subscription}/resume",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),search:i({method:"GET",fullPath:"/v1/subscriptions/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}})})});var bV=K((yV)=>{Object.defineProperty(yV,"__esModule",{value:!0});yV.TaxCodes=void 0;var RV=w(),SV=RV.StripeResource.method;yV.TaxCodes=RV.StripeResource.extend({retrieve:SV({method:"GET",fullPath:"/v1/tax_codes/{id}"}),list:SV({method:"GET",fullPath:"/v1/tax_codes",methodType:"list"})})});var _V=K((fV)=>{Object.defineProperty(fV,"__esModule",{value:!0});fV.TaxIds=void 0;var jV=w(),s8=jV.StripeResource.method;fV.TaxIds=jV.StripeResource.extend({create:s8({method:"POST",fullPath:"/v1/tax_ids"}),retrieve:s8({method:"GET",fullPath:"/v1/tax_ids/{id}"}),list:s8({method:"GET",fullPath:"/v1/tax_ids",methodType:"list"}),del:s8({method:"DELETE",fullPath:"/v1/tax_ids/{id}"})})});var uV=K((hV)=>{Object.defineProperty(hV,"__esModule",{value:!0});hV.TaxRates=void 0;var gV=w(),r8=gV.StripeResource.method;hV.TaxRates=gV.StripeResource.extend({create:r8({method:"POST",fullPath:"/v1/tax_rates"}),retrieve:r8({method:"GET",fullPath:"/v1/tax_rates/{tax_rate}"}),update:r8({method:"POST",fullPath:"/v1/tax_rates/{tax_rate}"}),list:r8({method:"GET",fullPath:"/v1/tax_rates",methodType:"list"})})});var dV=K((lV)=>{Object.defineProperty(lV,"__esModule",{value:!0});lV.Tokens=void 0;var nV=w(),cV=nV.StripeResource.method;lV.Tokens=nV.StripeResource.extend({create:cV({method:"POST",fullPath:"/v1/tokens"}),retrieve:cV({method:"GET",fullPath:"/v1/tokens/{token}"})})});var sV=K((aV)=>{Object.defineProperty(aV,"__esModule",{value:!0});aV.Topups=void 0;var iV=w(),G8=iV.StripeResource.method;aV.Topups=iV.StripeResource.extend({create:G8({method:"POST",fullPath:"/v1/topups"}),retrieve:G8({method:"GET",fullPath:"/v1/topups/{topup}"}),update:G8({method:"POST",fullPath:"/v1/topups/{topup}"}),list:G8({method:"GET",fullPath:"/v1/topups",methodType:"list"}),cancel:G8({method:"POST",fullPath:"/v1/topups/{topup}/cancel"})})});var $3=K((tV)=>{Object.defineProperty(tV,"__esModule",{value:!0});tV.Transfers=void 0;var rV=w(),e=rV.StripeResource.method;tV.Transfers=rV.StripeResource.extend({create:e({method:"POST",fullPath:"/v1/transfers"}),retrieve:e({method:"GET",fullPath:"/v1/transfers/{transfer}"}),update:e({method:"POST",fullPath:"/v1/transfers/{transfer}"}),list:e({method:"GET",fullPath:"/v1/transfers",methodType:"list"}),createReversal:e({method:"POST",fullPath:"/v1/transfers/{id}/reversals"}),listReversals:e({method:"GET",fullPath:"/v1/transfers/{id}/reversals",methodType:"list"}),retrieveReversal:e({method:"GET",fullPath:"/v1/transfers/{transfer}/reversals/{id}"}),updateReversal:e({method:"POST",fullPath:"/v1/transfers/{transfer}/reversals/{id}"})})});var X3=K((J3)=>{Object.defineProperty(J3,"__esModule",{value:!0});J3.WebhookEndpoints=void 0;var Z3=w(),V8=Z3.StripeResource.method;J3.WebhookEndpoints=Z3.StripeResource.extend({create:V8({method:"POST",fullPath:"/v1/webhook_endpoints"}),retrieve:V8({method:"GET",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),update:V8({method:"POST",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),list:V8({method:"GET",fullPath:"/v1/webhook_endpoints",methodType:"list"}),del:V8({method:"DELETE",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"})})});var G3=K((E)=>{Object.defineProperty(E,"__esModule",{value:!0});E.Subscriptions=E.SubscriptionSchedules=E.SubscriptionItems=E.Sources=E.ShippingRates=E.SetupIntents=E.SetupAttempts=E.Reviews=E.Refunds=E.Quotes=E.PromotionCodes=E.Products=E.Prices=E.Plans=E.Payouts=E.PaymentRecords=E.PaymentMethods=E.PaymentMethodDomains=E.PaymentMethodConfigurations=E.PaymentLinks=E.PaymentIntents=E.PaymentAttemptRecords=E.OAuth=E.Mandates=E.Invoices=E.InvoiceRenderingTemplates=E.InvoicePayments=E.InvoiceItems=E.Files=E.FileLinks=E.ExchangeRates=E.Events=E.EphemeralKeys=E.Disputes=E.Customers=E.CustomerSessions=E.CreditNotes=E.Coupons=E.CountrySpecs=E.ConfirmationTokens=E.Charges=E.BalanceTransactions=E.BalanceSettings=E.Balance=E.ApplicationFees=E.ApplePayDomains=E.Accounts=E.AccountSessions=E.AccountLinks=E.Account=void 0;E.V2=E.Treasury=E.TestHelpers=E.Terminal=E.Tax=E.Sigma=E.Reporting=E.Radar=E.Issuing=E.Identity=E.Forwarding=E.FinancialConnections=E.Entitlements=E.Climate=E.Checkout=E.BillingPortal=E.Billing=E.Apps=E.WebhookEndpoints=E.Transfers=E.Topups=E.Tokens=E.TaxRates=E.TaxIds=E.TaxCodes=void 0;var x=w1(),Yz=q1(),Gz=A1(),Vz=P1(),Bz=m1(),Wz=p1(),Uz=o1(),zz=e1(),Lz=Q4(),Kz=V4(),Hz=z4(),wz=w4(),Tz=q4(),Dz=k4(),Oz=I4(),qz=y4(),Ez=f4(),Fz=h4(),Cz=n4(),kz=a4(),Az=t4(),Nz=J6(),xz=G6(),Iz=U6(),Pz=H6(),Sz=q6(),Rz=k6(),yz=I6(),vz=y6(),bz=f6(),jz=h6(),fz=n6(),Mz=i6(),_z=r6(),gz=Z7(),hz=Y7(),mz=W7(),uz=K7(),cz=D7(),nz=F7(),lz=N7(),pz=S7(),dz=b7(),iz=_7(),az=u7(),oz=p7(),sz=o7(),rz=e7(),tz=QJ(),ez=BJ(),$L=KJ(),ZL=DJ(),JL=FJ(),QL=NJ(),XL=RJ(),YL=jJ(),GL=hJ(),VL=nJ(),BL=iJ(),WL=rJ(),UL=J5(),zL=G5(),LL=z5(),KL=w5(),HL=q5(),wL=k5(),TL=P5(),DL=b5(),OL=g5(),qL=c5(),EL=d5(),FL=r5(),CL=JQ(),kL=GQ(),AL=UQ(),NL=HQ(),xL=qQ(),IL=kQ(),PL=IQ(),SL=vQ(),RL=MQ(),yL=G9();Object.defineProperty(E,"Account",{enumerable:!0,get:function(){return yL.Accounts}});var vL=nQ();Object.defineProperty(E,"AccountLinks",{enumerable:!0,get:function(){return vL.AccountLinks}});var bL=iQ();Object.defineProperty(E,"AccountSessions",{enumerable:!0,get:function(){return bL.AccountSessions}});var jL=G9();Object.defineProperty(E,"Accounts",{enumerable:!0,get:function(){return jL.Accounts}});var fL=rQ();Object.defineProperty(E,"ApplePayDomains",{enumerable:!0,get:function(){return fL.ApplePayDomains}});var ML=ZX();Object.defineProperty(E,"ApplicationFees",{enumerable:!0,get:function(){return ML.ApplicationFees}});var _L=YX();Object.defineProperty(E,"Balance",{enumerable:!0,get:function(){return _L.Balance}});var gL=UX();Object.defineProperty(E,"BalanceSettings",{enumerable:!0,get:function(){return gL.BalanceSettings}});var hL=wX();Object.defineProperty(E,"BalanceTransactions",{enumerable:!0,get:function(){return hL.BalanceTransactions}});var mL=qX();Object.defineProperty(E,"Charges",{enumerable:!0,get:function(){return mL.Charges}});var uL=kX();Object.defineProperty(E,"ConfirmationTokens",{enumerable:!0,get:function(){return uL.ConfirmationTokens}});var cL=PX();Object.defineProperty(E,"CountrySpecs",{enumerable:!0,get:function(){return cL.CountrySpecs}});var nL=vX();Object.defineProperty(E,"Coupons",{enumerable:!0,get:function(){return nL.Coupons}});var lL=MX();Object.defineProperty(E,"CreditNotes",{enumerable:!0,get:function(){return lL.CreditNotes}});var pL=mX();Object.defineProperty(E,"CustomerSessions",{enumerable:!0,get:function(){return pL.CustomerSessions}});var dL=lX();Object.defineProperty(E,"Customers",{enumerable:!0,get:function(){return dL.Customers}});var iL=aX();Object.defineProperty(E,"Disputes",{enumerable:!0,get:function(){return iL.Disputes}});var aL=eX();Object.defineProperty(E,"EphemeralKeys",{enumerable:!0,get:function(){return aL.EphemeralKeys}});var oL=XY();Object.defineProperty(E,"Events",{enumerable:!0,get:function(){return oL.Events}});var sL=WY();Object.defineProperty(E,"ExchangeRates",{enumerable:!0,get:function(){return sL.ExchangeRates}});var rL=KY();Object.defineProperty(E,"FileLinks",{enumerable:!0,get:function(){return rL.FileLinks}});var tL=FY();Object.defineProperty(E,"Files",{enumerable:!0,get:function(){return tL.Files}});var eL=NY();Object.defineProperty(E,"InvoiceItems",{enumerable:!0,get:function(){return eL.InvoiceItems}});var $K=RY();Object.defineProperty(E,"InvoicePayments",{enumerable:!0,get:function(){return $K.InvoicePayments}});var ZK=jY();Object.defineProperty(E,"InvoiceRenderingTemplates",{enumerable:!0,get:function(){return ZK.InvoiceRenderingTemplates}});var JK=gY();Object.defineProperty(E,"Invoices",{enumerable:!0,get:function(){return JK.Invoices}});var QK=cY();Object.defineProperty(E,"Mandates",{enumerable:!0,get:function(){return QK.Mandates}});var XK=iY();Object.defineProperty(E,"OAuth",{enumerable:!0,get:function(){return XK.OAuth}});var YK=tY();Object.defineProperty(E,"PaymentAttemptRecords",{enumerable:!0,get:function(){return YK.PaymentAttemptRecords}});var GK=JG();Object.defineProperty(E,"PaymentIntents",{enumerable:!0,get:function(){return GK.PaymentIntents}});var VK=GG();Object.defineProperty(E,"PaymentLinks",{enumerable:!0,get:function(){return VK.PaymentLinks}});var BK=UG();Object.defineProperty(E,"PaymentMethodConfigurations",{enumerable:!0,get:function(){return BK.PaymentMethodConfigurations}});var WK=HG();Object.defineProperty(E,"PaymentMethodDomains",{enumerable:!0,get:function(){return WK.PaymentMethodDomains}});var UK=OG();Object.defineProperty(E,"PaymentMethods",{enumerable:!0,get:function(){return UK.PaymentMethods}});var zK=CG();Object.defineProperty(E,"PaymentRecords",{enumerable:!0,get:function(){return zK.PaymentRecords}});var LK=xG();Object.defineProperty(E,"Payouts",{enumerable:!0,get:function(){return LK.Payouts}});var KK=RG();Object.defineProperty(E,"Plans",{enumerable:!0,get:function(){return KK.Plans}});var HK=jG();Object.defineProperty(E,"Prices",{enumerable:!0,get:function(){return HK.Prices}});var wK=gG();Object.defineProperty(E,"Products",{enumerable:!0,get:function(){return wK.Products}});var TK=cG();Object.defineProperty(E,"PromotionCodes",{enumerable:!0,get:function(){return TK.PromotionCodes}});var DK=dG();Object.defineProperty(E,"Quotes",{enumerable:!0,get:function(){return DK.Quotes}});var OK=sG();Object.defineProperty(E,"Refunds",{enumerable:!0,get:function(){return OK.Refunds}});var qK=$V();Object.defineProperty(E,"Reviews",{enumerable:!0,get:function(){return qK.Reviews}});var EK=XV();Object.defineProperty(E,"SetupAttempts",{enumerable:!0,get:function(){return EK.SetupAttempts}});var FK=BV();Object.defineProperty(E,"SetupIntents",{enumerable:!0,get:function(){return FK.SetupIntents}});var CK=LV();Object.defineProperty(E,"ShippingRates",{enumerable:!0,get:function(){return CK.ShippingRates}});var kK=TV();Object.defineProperty(E,"Sources",{enumerable:!0,get:function(){return kK.Sources}});var AK=EV();Object.defineProperty(E,"SubscriptionItems",{enumerable:!0,get:function(){return AK.SubscriptionItems}});var NK=AV();Object.defineProperty(E,"SubscriptionSchedules",{enumerable:!0,get:function(){return NK.SubscriptionSchedules}});var xK=PV();Object.defineProperty(E,"Subscriptions",{enumerable:!0,get:function(){return xK.Subscriptions}});var IK=bV();Object.defineProperty(E,"TaxCodes",{enumerable:!0,get:function(){return IK.TaxCodes}});var PK=_V();Object.defineProperty(E,"TaxIds",{enumerable:!0,get:function(){return PK.TaxIds}});var SK=uV();Object.defineProperty(E,"TaxRates",{enumerable:!0,get:function(){return SK.TaxRates}});var RK=dV();Object.defineProperty(E,"Tokens",{enumerable:!0,get:function(){return RK.Tokens}});var yK=sV();Object.defineProperty(E,"Topups",{enumerable:!0,get:function(){return yK.Topups}});var vK=$3();Object.defineProperty(E,"Transfers",{enumerable:!0,get:function(){return vK.Transfers}});var bK=X3();Object.defineProperty(E,"WebhookEndpoints",{enumerable:!0,get:function(){return bK.WebhookEndpoints}});E.Apps=(0,x.resourceNamespace)("apps",{Secrets:KL.Secrets});E.Billing=(0,x.resourceNamespace)("billing",{Alerts:Uz.Alerts,CreditBalanceSummary:Cz.CreditBalanceSummary,CreditBalanceTransactions:kz.CreditBalanceTransactions,CreditGrants:Az.CreditGrants,MeterEventAdjustments:_z.MeterEventAdjustments,MeterEvents:uz.MeterEvents,Meters:nz.Meters});E.BillingPortal=(0,x.resourceNamespace)("billingPortal",{Configurations:Oz.Configurations,Sessions:HL.Sessions});E.Checkout=(0,x.resourceNamespace)("checkout",{Sessions:wL.Sessions});E.Climate=(0,x.resourceNamespace)("climate",{Orders:pz.Orders,Products:$L.Products,Suppliers:OL.Suppliers});E.Entitlements=(0,x.resourceNamespace)("entitlements",{ActiveEntitlements:Wz.ActiveEntitlements,Features:vz.Features});E.FinancialConnections=(0,x.resourceNamespace)("financialConnections",{Accounts:Vz.Accounts,Sessions:TL.Sessions,Transactions:CL.Transactions});E.Forwarding=(0,x.resourceNamespace)("forwarding",{Requests:zL.Requests});E.Identity=(0,x.resourceNamespace)("identity",{VerificationReports:SL.VerificationReports,VerificationSessions:RL.VerificationSessions});E.Issuing=(0,x.resourceNamespace)("issuing",{Authorizations:Lz.Authorizations,Cardholders:wz.Cardholders,Cards:Tz.Cards,Disputes:Pz.Disputes,PersonalizationDesigns:rz.PersonalizationDesigns,PhysicalBundles:ez.PhysicalBundles,Tokens:EL.Tokens,Transactions:kL.Transactions});E.Radar=(0,x.resourceNamespace)("radar",{EarlyFraudWarnings:Sz.EarlyFraudWarnings,PaymentEvaluations:sz.PaymentEvaluations,ValueListItems:IL.ValueListItems,ValueLists:PL.ValueLists});E.Reporting=(0,x.resourceNamespace)("reporting",{ReportRuns:WL.ReportRuns,ReportTypes:UL.ReportTypes});E.Sigma=(0,x.resourceNamespace)("sigma",{ScheduledQueryRuns:LL.ScheduledQueryRuns});E.Tax=(0,x.resourceNamespace)("tax",{Associations:zz.Associations,Calculations:Hz.Calculations,Registrations:BL.Registrations,Settings:DL.Settings,Transactions:AL.Transactions});E.Terminal=(0,x.resourceNamespace)("terminal",{Configurations:qz.Configurations,ConnectionTokens:Fz.ConnectionTokens,Locations:Mz.Locations,OnboardingLinks:lz.OnboardingLinks,Readers:ZL.Readers});E.TestHelpers=(0,x.resourceNamespace)("testHelpers",{ConfirmationTokens:Ez.ConfirmationTokens,Customers:xz.Customers,Refunds:VL.Refunds,TestClocks:qL.TestClocks,Issuing:(0,x.resourceNamespace)("issuing",{Authorizations:Kz.Authorizations,Cards:Dz.Cards,PersonalizationDesigns:tz.PersonalizationDesigns,Transactions:NL.Transactions}),Terminal:(0,x.resourceNamespace)("terminal",{Readers:JL.Readers}),Treasury:(0,x.resourceNamespace)("treasury",{InboundTransfers:jz.InboundTransfers,OutboundPayments:dz.OutboundPayments,OutboundTransfers:az.OutboundTransfers,ReceivedCredits:QL.ReceivedCredits,ReceivedDebits:YL.ReceivedDebits})});E.Treasury=(0,x.resourceNamespace)("treasury",{CreditReversals:Nz.CreditReversals,DebitReversals:Iz.DebitReversals,FinancialAccounts:bz.FinancialAccounts,InboundTransfers:fz.InboundTransfers,OutboundPayments:iz.OutboundPayments,OutboundTransfers:oz.OutboundTransfers,ReceivedCredits:XL.ReceivedCredits,ReceivedDebits:GL.ReceivedDebits,TransactionEntries:FL.TransactionEntries,Transactions:xL.Transactions});E.V2=(0,x.resourceNamespace)("v2",{Billing:(0,x.resourceNamespace)("billing",{MeterEventAdjustments:gz.MeterEventAdjustments,MeterEventSession:hz.MeterEventSession,MeterEventStream:mz.MeterEventStream,MeterEvents:cz.MeterEvents}),Core:(0,x.resourceNamespace)("core",{AccountLinks:Yz.AccountLinks,AccountTokens:Gz.AccountTokens,Accounts:Bz.Accounts,EventDestinations:Rz.EventDestinations,Events:yz.Events})})});var C3=K((E3)=>{Object.defineProperty(E3,"__esModule",{value:!0});E3.createStripe=void 0;var V3=M0(),tK=hZ(),O3=w(),B3=G1(),eK=W1(),q3=L1(),$H=b0(),ZH=I8(),W3=j0(),t8=G3(),B0=c(),U3="api.stripe.com",z3="443",L3="/v1/",K3=q3.ApiVersion,H3=80000,w3=5,T3=0.5,JH=["name","version","url","partner_id"],D3=["authenticator","apiVersion","typescript","maxNetworkRetries","httpAgent","httpClient","timeout","host","port","protocol","telemetry","appInfo","stripeAccount","stripeContext"],QH=($)=>new tK.RequestSender($,O3.StripeResource.MAX_BUFFERED_REQUEST_METRICS);function XH($,Z=QH){Q.PACKAGE_VERSION="21.0.1",Q.API_VERSION=q3.ApiVersion;let J=typeof process<"u"&&process.env?(0,B0.detectAIAgent)(process.env):"";Q.AI_AGENT=J,Q.USER_AGENT={bindings_version:Q.PACKAGE_VERSION,lang:"node",typescript:!1,...(0,B0.determineProcessUserAgentProperties)(),...J?{ai_agent:J}:{}},Q.StripeResource=O3.StripeResource,Q.StripeContext=B3.StripeContext,Q.resources=t8,Q.HttpClient=W3.HttpClient,Q.HttpClientResponse=W3.HttpClientResponse,Q.CryptoProvider=$H.CryptoProvider,Q.webhooks=(0,eK.createWebhooks)($),Q.Decimal=ZH.Decimal;function Q(X,Y={}){if(!(this instanceof Q))return new Q(X,Y);let G=this._getPropsFromConfig(Y);this._platformFunctions=$,Object.defineProperty(this,"_emitter",{value:this._platformFunctions.createEmitter(),enumerable:!1,configurable:!1,writable:!1}),this.VERSION=Q.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 V=G.httpAgent||null;this._api={host:G.host||U3,port:G.port||z3,protocol:G.protocol||"https",basePath:L3,version:G.apiVersion||K3,timeout:(0,B0.validateInteger)("timeout",G.timeout,H3),maxNetworkRetries:(0,B0.validateInteger)("maxNetworkRetries",G.maxNetworkRetries,2),agent:V,httpClient:G.httpClient||(V?this._platformFunctions.createNodeHttpClient(V):this._platformFunctions.createDefaultHttpClient()),dev:!1,stripeAccount:G.stripeAccount||null,stripeContext:G.stripeContext||null};let U=G.typescript||!1;if(U!==Q.USER_AGENT.typescript)Q.USER_AGENT.typescript=U;if(G.appInfo)this._setAppInfo(G.appInfo);this._prepResources(),this._setAuthenticator(X,G.authenticator),this.errors=V3,this.webhooks=Q.webhooks,this._prevRequestMetrics=[],this._enableTelemetry=G.telemetry!==!1,this._requestSender=Z(this),this.StripeResource=Q.StripeResource,this.Decimal=Q.Decimal}return Q.errors=V3,Q.createNodeHttpClient=$.createNodeHttpClient,Q.createFetchHttpClient=$.createFetchHttpClient,Q.createNodeCryptoProvider=$.createNodeCryptoProvider,Q.createSubtleCryptoProvider=$.createSubtleCryptoProvider,Q.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(X,Y,G,V){return this._requestSender._rawRequest(X,Y,G,V)},_setAuthenticator(X,Y){if(X&&Y)throw Error("Can't specify both apiKey and authenticator");if(!X&&!Y)throw Error("Neither apiKey nor config.authenticator provided");this._authenticator=X?(0,B0.createApiKeyAuthenticator)(X):Y},_setAppInfo(X){if(X&&typeof X!=="object")throw Error("AppInfo must be an object.");if(X&&!X.name)throw Error("AppInfo.name is required");X=X||{},this._appInfo=JH.reduce((Y,G)=>{if(typeof X[G]=="string")Y=Y||{},Y[G]=X[G];return Y},{})},_setApiField(X,Y){this._api[X]=Y},getApiField(X){return this._api[X]},setClientId(X){this._clientId=X},getClientId(){return this._clientId},getConstant:(X)=>{switch(X){case"DEFAULT_HOST":return U3;case"DEFAULT_PORT":return z3;case"DEFAULT_BASE_PATH":return L3;case"DEFAULT_API_VERSION":return K3;case"DEFAULT_TIMEOUT":return H3;case"MAX_NETWORK_RETRY_DELAY_SEC":return w3;case"INITIAL_NETWORK_RETRY_DELAY_SEC":return T3}return Q[X]},getMaxNetworkRetries(){return this.getApiField("maxNetworkRetries")},_setApiNumberField(X,Y,G){let V=(0,B0.validateInteger)(X,Y,G);this._setApiField(X,V)},getMaxNetworkRetryDelay(){return w3},getInitialNetworkRetryDelay(){return T3},getClientUserAgent(X){return this.getClientUserAgentSeeded(Q.USER_AGENT,X)},getClientUserAgentSeeded(X,Y){let G={};for(let W in X){if(!Object.prototype.hasOwnProperty.call(X,W))continue;G[W]=encodeURIComponent(X[W]??"null")}let V=this._platformFunctions.getPlatformInfo();if(V&&this.getTelemetryEnabled())G.platform=encodeURIComponent(V);else delete G.platform;let U=this.getApiField("httpClient");if(U)G.httplib=encodeURIComponent(U.getClientName());if(this._appInfo)G.application=this._appInfo;Y(JSON.stringify(G))},getAppInfoAsString(){if(!this._appInfo)return"";let X=this._appInfo.name;if(this._appInfo.version)X+=`/${this._appInfo.version}`;if(this._appInfo.url)X+=` (${this._appInfo.url})`;return X},getTelemetryEnabled(){return this._enableTelemetry},_prepResources(){for(let X in t8){if(!Object.prototype.hasOwnProperty.call(t8,X))continue;this[(0,B0.pascalToCamelCase)(X)]=new t8[X](this)}},_getPropsFromConfig(X){if(!X)return{};let Y=typeof X==="string";if(!(X===Object(X)&&!Array.isArray(X))&&!Y)throw Error("Config must either be an object or a string");if(Y)return{apiVersion:X};if(Object.keys(X).filter((U)=>!D3.includes(U)).length>0)throw Error(`Config object may only contain the following: ${D3.join(", ")}`);return X},parseEventNotification(X,Y,G,V,U,W){this.webhooks.signature.verifyHeader(X,Y,G,V||this.webhooks.DEFAULT_TOLERANCE,U,W);let B=X instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(X)):JSON.parse(X);if(B&&B.object==="event")throw Error("You passed a webhook payload to stripe.parseEventNotification, which expects an event notification. Use stripe.webhooks.constructEvent instead.");if(B.context)B.context=B3.StripeContext.parse(B.context);return B.fetchEvent=()=>{return this._requestSender._rawRequest("GET",`/v2/core/events/${B.id}`,void 0,{stripeContext:B.context,headers:{"Stripe-Request-Trigger":`event=${B.id}`}},["fetch_event"])},B.fetchRelatedObject=()=>{if(!B.related_object)return Promise.resolve(null);return this._requestSender._rawRequest("GET",B.related_object.url,void 0,{stripeContext:B.context,headers:{"Stripe-Request-Trigger":`event=${B.id}`}},["fetch_related_object"])},B}},Q}E3.createStripe=XH});var A3=K((k3,B8)=>{Object.defineProperty(k3,"__esModule",{value:!0});var YH=fZ(),GH=C3(),VH=I8(),U9=(0,GH.createStripe)(new YH.NodePlatformFunctions);B8.exports=U9;B8.exports.Stripe=U9;B8.exports.default=U9;B8.exports.Decimal=VH.Decimal});import"@stacksjs/validation";import{log as Q$}from"@stacksjs/cli";import{db as T9}from"@stacksjs/database";async function QB($,Z={}){let{olderThanDays:J=30,column:Q="created_at",query:X}=Z;try{if(X){let W=T9.deleteFrom($);W=X(W);let B=await W.execute(),z=Array.isArray(B)?B:[B],L=Number(z[0]?.numDeletedRows??z.length??0);return Q$.info(`Pruned ${L} records from ${$}`),L}let Y=new Date;Y.setDate(Y.getDate()-J);let G=await T9.deleteFrom($).where(Q,"<",Y.toISOString()).execute(),V=Array.isArray(G)?G:[G],U=Number(V[0]?.numDeletedRows??V.length??0);return Q$.info(`Pruned ${U} records from ${$} older than ${J} days`),U}catch(Y){throw Q$.error(`Failed to prune ${$}:`,Y),Y}}async function JT($,Z={}){return QB($,Z)}function QT($){if(!$?.prunable)return null;if(typeof $.prunable==="boolean")return{olderThanDays:30,column:"created_at"};return $.prunable}import{createCipheriv as XB,createDecipheriv as YB,createHash as GB,randomBytes as VB}from"crypto";import{log as H8}from"@stacksjs/logging";var D9="enc:",O9="aes-256-gcm",BB=12,K8=null;async function q9(){if(K8)return K8;let $=process.env.APP_KEY;if(!$)try{$=(await import("@stacksjs/config").catch(()=>null))?.config?.app?.key}catch{}if(!$)return null;return K8=GB("sha256").update($).digest(),K8}function S0($){return typeof $==="string"&&$.startsWith(D9)}async function X$($){if($==null)return $;if(S0($))return $;if(typeof $!=="string")return $;let Z=await q9();if(!Z)return H8.warn("[orm] encrypted attribute: APP_KEY not set \u2014 storing value in plaintext"),$;let J=VB(BB),Q=XB(O9,Z,J),X=Buffer.concat([Q.update($,"utf8"),Q.final()]),Y=Q.getAuthTag();return`${D9}${J.toString("base64")}:${Y.toString("base64")}:${X.toString("base64")}`}async function Y$($){if($==null)return $;if(typeof $!=="string")return $;if(!S0($))return $;try{let Z=await q9();if(!Z)return H8.warn("[orm] encrypted attribute: APP_KEY not set \u2014 cannot decrypt"),null;let[,J,Q,X]=$.split(":");if(!J||!Q||!X)return H8.warn("[orm] encrypted attribute: malformed envelope, returning null"),null;let Y=Buffer.from(J,"base64"),G=Buffer.from(Q,"base64"),V=Buffer.from(X,"base64"),U=YB(O9,Z,Y);return U.setAuthTag(G),Buffer.concat([U.update(V),U.final()]).toString("utf8")}catch(Z){return H8.warn("[orm] encrypted attribute: decrypt failed (key rotation? corrupted ciphertext?)",{error:Z}),null}}function G$($){let Z=$.attributes;if(!Z||typeof Z!=="object")return[];let J=[];for(let[Q,X]of Object.entries(Z))if(X&&typeof X==="object"&&X.encrypted===!0)J.push(Q);return J}import{log as y0}from"@stacksjs/logging";var WB=[/^password$/i,/^password_hash$/i,/^api_key$/i,/_token$/i,/_secret$/i,/^remember_token$/i],F9="model_audits",W$=null;function UB($){W$=$}async function V$(){if(W$!=null)return W$;try{let $=await import("@stacksjs/router").catch(()=>null);if(!$)return null;let Z=$.getCurrentRequest;if(typeof Z!=="function")return null;let J=Z();if(!J)return null;return(J.user??J._user)?.id??null}catch{return null}}function w8($){if(!$||typeof $!=="object")return null;let Z={};for(let[J,Q]of Object.entries($)){if(WB.some((X)=>X.test(J)))continue;Z[J]=Q}return Z}function R0($){if(!$||typeof $!=="object")return null;let Z=$;if(Z._attributes&&typeof Z._attributes==="object")return{...Z._attributes};return{...$}}function zB($,Z){if(!$||!Z)return{old:$,next:Z};let J={},Q={},X=new Set([...Object.keys($),...Object.keys(Z)]);for(let Y of X)if($[Y]!==Z[Y])J[Y]=$[Y],Q[Y]=Z[Y];return{old:J,next:Q}}async function B$($,Z=!1){try{let{db:J}=await import("@stacksjs/database");await J.insertInto(F9).values({auditable_type:$.auditable_type,auditable_id:$.auditable_id,event:$.event,old_values:$.old_values?JSON.stringify($.old_values):null,new_values:$.new_values?JSON.stringify($.new_values):null,user_id:$.user_id,created_at:new Date().toISOString()}).executeTakeFirst()}catch(J){if(y0.warn(`[orm] audit row write failed for ${$.auditable_type}#${String($.auditable_id)} (${$.event})`,{error:J}),Z)throw J}}function C9($){return{async audits(Z){try{let{db:J}=await import("@stacksjs/database");return(await J.selectFrom(F9).selectAll().where("auditable_type","=",$).where("auditable_id","=",Z).orderBy("created_at","desc").execute()??[]).map((X)=>({...X,old_values:typeof X.old_values==="string"?E9(X.old_values):X.old_values,new_values:typeof X.new_values==="string"?E9(X.new_values):X.new_values}))}catch(J){return y0.warn(`[orm] audits() lookup failed for ${$}#${String(Z)}`,{error:J}),[]}}}}function E9($){try{return JSON.parse($)}catch{return $}}function k9($){if($&&typeof $==="object"&&"transactional"in $)return{transactional:$.transactional===!0};return{transactional:!1}}function A9($,Z,J="id",Q={}){let X=Q.transactional===!0,Y=$;if(typeof $.audits!=="function")$.audits=C9(Z).audits;let G=async(B)=>{if(!X)return await B();let{db:z}=await import("@stacksjs/database");return await z.transaction(async()=>B())},V=$.create;if(typeof V==="function")$.create=async function(...B){return await G(async()=>{let z=await V.apply(this,B);try{let L=R0(z),H=L?.[J];if(H!=null){let T=await V$();await B$({auditable_type:Z,auditable_id:H,event:"created",old_values:null,new_values:w8(L),user_id:T},X)}}catch(L){if(y0.warn(`[orm] audit(create) failed for ${Z}`,{error:L}),X)throw L}return z})};let U=$.update;if(typeof U==="function")$.update=async function(B,z){return await G(async()=>{let L=Y.find,H=typeof L==="function"?R0(await L.call(Y,B)):null,T=await U.call(this,B,z);try{let D=R0(T)??(typeof L==="function"?R0(await L.call(Y,B)):null),{old:q,next:O}=zB(H,D);if(O&&Object.keys(O).length>0){let k=await V$();await B$({auditable_type:Z,auditable_id:B,event:"updated",old_values:w8(q),new_values:w8(O),user_id:k},X)}}catch(D){if(y0.warn(`[orm] audit(update) failed for ${Z}#${String(B)}`,{error:D}),X)throw D}return T})};let W=(B)=>{let z=$[B];if(typeof z!=="function")return;$[B]=async function(L){return await G(async()=>{let H=Y.find,T=typeof H==="function"?R0(await H.call(Y,L)):null,D=await z.call(this,L);try{if(D!==!1&&T){let q=await V$();await B$({auditable_type:Z,auditable_id:L,event:"deleted",old_values:w8(T),new_values:null,user_id:q},X)}}catch(q){if(y0.warn(`[orm] audit(${B}) failed for ${Z}#${String(L)}`,{error:q}),X)throw q}return D})}};W("delete"),W("softDelete")}function N9($){let Z=$;return Z?.code==="SQLITE_CONSTRAINT_UNIQUE"||Z?.code==="SQLITE_CONSTRAINT"||Z?.code==="23505"||Z?.errno===1062||/unique|duplicate/i.test(Z?.message??"")}function LB($,Z,J){let Q=$;if($ instanceof Error&&typeof Q.status==="number"&&Number.isInteger(Q.status)&&Q.status>=400&&Q.status<600){let X={error:$.message};if(Q.details!==void 0)X.details=Q.details;return{status:Q.status,body:X}}if(N9($))return{status:409,body:{error:`${Z} already exists`}};return{status:500,body:{error:`Failed to ${J} ${Z}`,detail:String($)}}}import{cacheRequestQuery as KB}from"@stacksjs/router";var T8=new WeakMap;function LT($,Z){return KB(`batchLoad:${$.name??"model"}:${String(Z)}`,async()=>{return new Promise((J,Q)=>{let X=T8.get($);if(!X)X={keys:[],resolvers:[],scheduled:!1},T8.set($,X);if(X.keys.push(Z),X.resolvers.push({key:Z,resolve:J,reject:Q}),X.scheduled)return;X.scheduled=!0,Promise.resolve().then(async()=>{let Y=T8.get($);if(!Y)return;T8.delete($);let G=Array.from(new Set(Y.keys));try{let V=typeof $.findMany==="function"?await $.findMany(G):await Promise.all(G.map((W)=>$.find?.(W))),U=new Map;for(let W of V??[]){let B=W?.id;if(B!==void 0)U.set(B,W)}for(let W of Y.resolvers)W.resolve(U.get(W.key))}catch(V){for(let U of Y.resolvers)U.reject(V)}})})})}import{db as TT}from"@stacksjs/database";class HB{conditions=[];where($,...Z){let[J,Q]=Z,X=Q===void 0?"=":J,Y=Q===void 0?J:Q;this.addCondition("and","where",$,X,Y)}orWhere($,...Z){let[J,Q]=Z,X=Q===void 0?"=":J,Y=Q===void 0?J:Q;this.addCondition("or","where",$,X,Y)}whereIn($,Z){this.conditions.push({type:"and",method:"whereIn",column:$,values:Z})}whereNotIn($,Z){this.conditions.push({type:"and",method:"whereIn",column:$,values:Z,operator:"not in"})}whereNull($){this.conditions.push({type:"and",method:"whereNull",column:$})}whereNotNull($){this.conditions.push({type:"and",method:"whereNotNull",column:$})}whereBetween($,Z){this.conditions.push({type:"and",method:"whereBetween",column:$,range:Z})}whereExists($){this.conditions.push({type:"and",method:"whereExists",column:"",callback:$})}addCondition($,Z,J,Q,X){this.conditions.push({type:$,method:Z,column:J,operator:Q,value:X})}getConditions(){return this.conditions}}import{db as D8,runInTransactionScope as wB}from"@stacksjs/database";async function qT($,Z){return await wB(async()=>{return await D8.transaction($,Z)})}function ET($){return D8.transaction(async()=>{await $()})}async function FT($){return await D8.savepoint($)}function CT($,Z){return D8.transactional($,Z)}import{path as p}from"@stacksjs/path";import{fs as a,globSync as H$}from"@stacksjs/storage";import{plural as R9,singular as x9,snakeCase as b}from"@stacksjs/strings";import{isString as O8}from"@stacksjs/validation";var U$;function y9(){if(!U$)U$=import("@stacksjs/build");return U$}async function PT($){if(typeof $==="string")$=(await import($)).default;return $.table??b(R9($?.name||""))}function v0($,Z){if($.name)return $.name;return p.basename(Z).replace(/\.ts$/,"")}function u($,Z){if($.table)return $.table;return b(R9(v0($,Z)))}function TB($,Z){let J=[$,Z];return J.sort(),J.join("_")}function ST($,Z){return Z in $}async function DB($,Z){let J=[];if($.hasOne)for(let Q of $.hasOne)J.push(await z$(Q,$,Z,"hasOne"));if($.hasMany)for(let Q of $.hasMany)J.push(await z$(Q,$,Z,"hasMany"));if($.belongsTo)for(let Q of $.belongsTo)J.push(await z$(Q,$,Z,"belongsTo"));if($.hasOneThrough)for(let Q of $.hasOneThrough)J.push(await P9(Q,$,Z,"hasOneThrough"));if($.hasManyThrough)for(let Q of $.hasManyThrough)J.push(await P9(Q,$,Z,"hasManyThrough"));if($.belongsToMany)for(let Q of $.belongsToMany)J.push(await qB(Q,$,Z,"belongsToMany"));if($.morphOne)J.push(await S9($.morphOne,$,Z,"morphOne"));if($.morphMany){let Q=Array.isArray($.morphMany)?$.morphMany:[$.morphMany];for(let X of Q)J.push(await S9(X,$,Z,"morphMany"))}if($.morphTo){let Q=$.morphTo,X=Array.isArray(Q)?Q:typeof Q==="object"&&Q!==null?[Q]:[];for(let Y of X)J.push(OB(Y,$,Z))}if($.morphToMany){let Q=Array.isArray($.morphToMany)?$.morphToMany:[$.morphToMany];for(let X of Q)J.push(I9(X,$,Z,"morphToMany"))}if($.morphedByMany){let Q=Array.isArray($.morphedByMany)?$.morphedByMany:[$.morphedByMany];for(let X of Q)J.push(I9(X,$,Z,"morphedByMany"))}return J}function OB($,Z,J){let Q=$&&typeof $==="object"&&$.name?String($.name):`${b(J)}able`,X=$?.type||`${Q}_type`;return{relationship:"morphTo",model:"",table:"",relationTable:"",foreignKey:$?.id||`${Q}_id`,modelKey:X,relationName:Q,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:"",pivotKey:"",pivotTable:""}}function I9($,Z,J,Q){let X=typeof $==="object"&&$!==null,Y=X?String($.model||""):String($),G=X&&$.morphName?String($.morphName):`${b(J)}able`,V=X&&$.pivotTable?String($.pivotTable):G,U=X&&$.id||`${G}_id`,W=X&&$.type||`${G}_type`;return{relationship:Q,model:Y,table:"",relationTable:"",foreignKey:U,modelKey:W,relationName:G,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:U,pivotKey:W,pivotTable:V}}async function q8($,Z){let J=K$(`${Z}.ts`),Q=K$(`${$}.ts`),X=L$(`${$}.ts`),Y=L$(`${Z}.ts`);if(!J&&!Y)throw Error(`Model not found: ${Z}`);if(!Q&&!X)throw Error(`Model not found: ${$}`);let G;try{if(a.existsSync(J))G=(await import(J)).default;else G=(await import(Y)).default}catch(U){throw Error(`Failed to load model: ${Z}. Error: ${U?.message||"Unknown error"}`)}let V=a.existsSync(Q)?Q:X;return{modelRelation:G,modelPath:V,modelRelationPath:a.existsSync(J)?J:Y}}async function P9($,Z,J,Q){let X="",Y="",G="",V="";if(O8($))X=$;else X=$.model,Y=$.relationName||"",G=$.through,V=$.throughForeignKey||"";let{modelRelation:U,modelPath:W,modelRelationPath:B}=await q8(J,X),z=u(U,B),L=u(Z,W),H=b(v0(U,B)),T=b(J);return{relationship:Q,model:X,table:z,relationTable:L,foreignKey:`${T}_id`,modelKey:`${H}_id`,relationName:Y,relationModel:J,throughModel:G,throughForeignKey:V,pivotForeign:`${T}_id`,pivotKey:`${H}_id`,pivotTable:L}}async function qB($,Z,J,Q){let X="",Y="",G="",V=b(J);if(O8($))X=$;else X=$.model,Y=$.pivotTable||"",G=$.firstForeignKey||`${V}_id`;let{modelRelation:U,modelPath:W,modelRelationPath:B}=await q8(J,X),z=u(U,B),L=u(Z,W),H=b(v0(U,B));return{relationship:Q,model:X,table:z,relationTable:L,foreignKey:typeof $==="string"?`${V}_id`:$.firstForeignKey||`${V}_id`,modelKey:typeof $==="string"?`${H}_id`:$.secondForeignKey||`${H}_id`,relationName:"",relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:G,pivotKey:`${H}_id`,pivotTable:Y}}async function S9($,Z,J,Q){let X="",Y="",G="",V="";if(O8($))X=$,Y=`${b(J)}able`;else X=$.model,Y=$.morphName||`${b(J)}able`,G=$.type||`${Y}_type`,V=$.id||`${Y}_id`;let{modelRelation:U,modelPath:W,modelRelationPath:B}=await q8(J,X),z=u(U,B),L=u(Z,W);return{relationship:Q,model:X,table:z,relationTable:L,foreignKey:V||`${Y}_id`,modelKey:G||`${Y}_type`,relationName:Y,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:"",pivotKey:"",pivotTable:L}}async function z$($,Z,J,Q){let X="",Y="";if(O8($))X=$;else X=$.model,Y=$.relationName||"";let{modelRelation:G,modelPath:V,modelRelationPath:U}=await q8(J,X),W=u(G,U),B=u(Z,V),z=b(v0(G,U)),L=b(J),H={relationship:Q,model:X,table:W,relationTable:B,foreignKey:typeof $==="string"?`${L}_id`:$.foreignKey||`${L}_id`,modelKey:`${z}_id`,relationName:Y,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:`${L}_id`,pivotKey:`${z}_id`,pivotTable:B};if(Q==="belongsTo")H.foreignKey="";return H}function RT($){let Z=/belongs/,J=/has/,Q=/Through/,X=/morph/;if(Q.test($))return"throughType";if(Z.test($))return"belongsType";if(J.test($))return"hasType";if(X.test($))return"morphType";return""}function yT($){let Z=/One/;if(/Many/.test($))return"many";if(Z.test($))return"one";return""}async function vT($,Z){let J=[];if("belongsToMany"in $){let Q=$.belongsToMany||[];for(let X of Q){let Y,G;if(typeof X==="string")G=X;else G=X.model;let V=K$(`${G}.ts`),U=L$(`${G}.ts`);if(a.existsSync(V))Y=(await import(V)).default;else Y=(await import(U)).default;let W=u(Y,V),B=u($,Z),z=typeof X==="object"&&"firstForeignKey"in X?X.firstForeignKey:`${x9(B)}_${$.primaryKey}`,L=typeof X==="object"&&"secondForeignKey"in X?X.secondForeignKey:`${x9(W)}_${$.primaryKey}`;J.push({table:(typeof X==="object"&&"pivotTable"in X?X.pivotTable:void 0)??TB(B,W),firstForeignKey:z,secondForeignKey:L})}return J}return[]}async function bT($){let Z=H$([p.userModelsPath("*.ts"),p.storagePath("framework/defaults/app/Models/**/*.ts")],{absolute:!0}),J=[];for(let Q=0;Q<Z.length;Q++){let X=Z[Q],Y=await import(X);if($===Y.default.name)continue;let G=v0(Y,X),V=await DB(Y.default,G);if(!V.length)continue;let U=V.find((W)=>W.model===$);if(U)J.push(U)}return J}function jT($){if($===void 0)return[];return Object.keys($).filter((Z)=>{return $[Z]?.hidden===!0})}function fT($){let Z=$.attributes;if(Z===void 0)return[];return Object.keys(Z).filter((J)=>{return Z[J]?.guarded===!0}).map((J)=>b(J))}function MT($,Z){let J=$.attributes,Q=[];if(J===void 0)return[];let X=typeof $.traits?.billable==="object"||typeof $.traits?.billable==="boolean",Y=typeof $.traits?.useAuth==="object"?$.traits?.useAuth.usePasskey:!1,G=$.traits?.useUuid||!1;if(X)Q.push("stripe_id");if(G)Q.push("uuid");if(Y)Q.push(...["two_factor_secret","public_key"]);let V=Z.map((U)=>U.foreignKey).filter((U)=>U);return[...Object.keys(J).filter((U)=>{if(J===void 0)return!1;return J[U]?.fillable===!0}).map((U)=>b(U)),...Q,...V]}async function _T($,Z){let J=$.attributes;if(!J)J={};let Q=Object.keys(J),X=[],Y=Bun.file(Z),G="";try{if(await Y.exists())G=await Y.text()}catch{G=""}let V=/rule:.*$/gm,U;U=V.exec(G);while(U!==null)X.push(U[0]),U=V.exec(G);return Q.map((B,z)=>{let L=J[B],H=null,T=!1,D=!1,q=!1,O=!1;if(L)H=L||null,T=L.unique||!1,D=L.hidden||!1,q=L.fillable||!1;let k=X[z]??"";return O=(L.validation?.rule).isRequired??!1,{field:B,default:H,unique:T,hidden:D,fillable:q,required:O,fieldArray:EB(k)}})}function EB($){let Z=$.split("rule: schema.");if(Z.length!==2)return null;if(!Z[1])Z[1]="";let J=Z[1].replace(/,/g,"");if(!J)return null;let Q=J.split("."),X=/\(([^)]+)\)/;return Q.map((Y)=>{let G=X.exec(Y),V=G?G[1]:null;return{entity:Y.replace(X,"").replace(/\(|\)/g,""),charValue:V}})[0]||null}function gT($){let Z=$.fieldArray?.entity;switch(Z){case"enum":return"string | string[]";case"date":return"Date | string";case"timestamp":return"Date | string";case"datetime":return"Date | string";case"float":return"number";case"double":return"number";case"decimal":return"number";case"integer":return"number";case"bigint":return"number";default:return Z}}async function hT($){let{generator:Z,parser:J,traverse:Q}=await y9(),X=a.readFileSync($,"utf8"),Y=J.parse(X,{sourceType:"module",plugins:["typescript","classProperties","decorators-legacy"]}),G=[];return Q(Y,{ImportDeclaration(V){let U=Z(V.node,{},X);G.push(U.code)}}),G}async function mT($){let{generator:Z,parser:J,traverse:Q}=await y9(),X=a.readFileSync($,"utf8"),Y=J.parse(X,{sourceType:"module",plugins:["typescript","classProperties","decorators-legacy"]}),G;return Q(Y,{ObjectExpression(V){let U=V.node.properties.find((W)=>W.type==="ObjectProperty"&&W.key.type==="Identifier"&&W.key.name==="attributes");if(U&&U.type==="ObjectProperty"&&U.value)G=Z(U.value,{},X).code,V.stop()}}),G}function L$($){let Z=p.join(p.storagePath("framework/defaults/app/Models"),"/"),J=p.join(Z,$);if(a.existsSync(J))return J;return H$(`${Z}**/${$}`,{absolute:!0})[0]??""}function K$($){let Z=p.join(p.userModelsPath("/"),"/"),J=p.join(Z,$);if(a.existsSync(J))return J;return H$(`${Z}**/${$}`,{absolute:!0})[0]??""}function uT($){let Z=typeof $==="number"?new Date($):typeof $==="string"?new Date($):$;if(Number.isNaN(Z.getTime()))throw Error(`Invalid date value: ${String($)}`);return Z.toISOString().replace("T"," ").split(".")[0]??""}function cT($){return $.toISOString().split("T")[0]??""}function nT($){return $.getTime()}import{createModel as LH,registerModel as KH}from"@stacksjs/query-builder";import{log as h}from"@stacksjs/logging";import{snakeCase as Z$}from"@stacksjs/strings";import{AsyncLocalStorage as HH}from"async_hooks";function FB($){if($===null||typeof $!=="object")return!1;let Z=$;return Array.isArray(Z.data)&&typeof Z.current_page==="number"&&typeof Z.per_page==="number"&&typeof Z.total==="number"&&typeof Z.last_page==="number"}function CB($){if($===null||typeof $!=="object")return!1;let Z=$;return Array.isArray(Z.data)&&typeof Z.current_page==="number"&&typeof Z.per_page==="number"&&typeof Z.has_more_pages==="boolean"&&!("total"in Z)}function kB($){if($===null||typeof $!=="object")return!1;let Z=$;return Array.isArray(Z.data)&&(typeof Z.next_cursor==="string"||Z.next_cursor===null)}function w$($){let{data:Z}=$,{perPage:J,page:Q,total:X,lastPage:Y}=$.meta,G=Z.length===0,V=G?null:(Q-1)*J+1,U=G?null:V+Z.length-1;return{data:Z,current_page:Q,per_page:J,total:X,last_page:Y,from:V,to:U,has_more_pages:Q<Y}}function T$($){return{data:$.data,current_page:$.meta.page,per_page:$.meta.perPage,has_more_pages:$.meta.hasMore}}function D$($){return{data:$.data,per_page:$.meta.perPage,next_cursor:v9($.meta.nextCursor),prev_cursor:v9($.meta.prevCursor),has_more_pages:$.meta.nextCursor!==null&&$.meta.nextCursor!==void 0}}function v9($){if($===null||$===void 0)return null;if(typeof $==="string")return $;return JSON.stringify($)}function q$($,Z){let J=C$(),Q=J?O$(J,"per_page"):void 0,X=J?O$(J,"page"):void 0,Y=$!==void 0?Math.max(1,Math.floor($)):Math.min(100,Math.max(1,Q??15)),G=Math.max(1,Math.floor(Z??X??1));return{perPage:Y,page:G}}function E$($,Z){let J=C$(),Q=J?j9(J,"cursor"):void 0,X=J?O$(J,"per_page"):void 0,Y=$!==void 0?Math.max(1,Math.floor($)):Math.min(100,Math.max(1,X??15)),V=b9(Z!==void 0?Z:Q??null);return{perPage:Y,cursor:V}}function b9($){if($===null||$===void 0)return null;if(Array.isArray($))return $;if(typeof $==="string"&&$.startsWith("["))try{let Z=JSON.parse($);if(Array.isArray(Z))return Z}catch{}return $}function F$($){let Z=C$();if(!Z)return $;let J=(()=>{try{return new URL(Z.url)}catch{return null}})();if(!J)return $;let Q=J.pathname;if($.path=Q,"next_cursor"in $)return $.next_page_url=$.next_cursor!==null?Z0(J,{cursor:$.next_cursor}):null,$.prev_page_url=$.prev_cursor!==null?Z0(J,{cursor:$.prev_cursor}):null,$;let X=$.current_page;if($.prev_page_url=X>1?Z0(J,{page:X-1}):null,"total"in $){let Y=$.last_page;$.next_page_url=X<Y?Z0(J,{page:X+1}):null,$.first_page_url=Z0(J,{page:1}),$.last_page_url=Z0(J,{page:Y})}else $.next_page_url=$.has_more_pages?Z0(J,{page:X+1}):null;return $}function Z0($,Z){let J=new URL($.toString());for(let[Q,X]of Object.entries(Z))J.searchParams.set(Q,String(X));return`${J.pathname}${J.search}`}var K0;function C$(){if(K0===null)return;if(K0===void 0)try{let Z=C("@stacksjs/router");if(typeof Z.getCurrentRequest==="function")K0=Z.getCurrentRequest;else{K0=null;return}}catch{K0=null;return}return K0()}function O$($,Z){let J=j9($,Z);if(J===void 0)return;let Q=Number(J);return Number.isFinite(Q)?Q:void 0}function j9($,Z){let J=$.query?.[Z];if(J===void 0)return;return Array.isArray(J)?J[0]:J}import{db as AB,sql as NB}from"@stacksjs/database";function k$($,Z){if(typeof $!=="number"||!Number.isFinite($)||$<=0)throw Error(`[orm/taggable] ${Z} requires a positive numeric id (received ${String($)})`)}function f9($){let Z=AB;return{async tags(J){return k$(J,"tags"),await Z.selectFrom("taggable").where("taggable_id","=",J).where("taggable_type","=",$).selectAll().execute()},async tagCount(J){k$(J,"tagCount");let Q=await Z.selectFrom("taggable").select(NB`count(*) as count`).where("taggable_id","=",J).where("taggable_type","=",$).executeTakeFirst();return Number(Q?.count)||0},async addTag(J,Q){if(k$(J,"addTag"),!Q||typeof Q.name!=="string"||Q.name.trim().length===0)throw Error("[orm/taggable] addTag requires a non-empty tag.name");return await Z.insertInto("taggable").values({...Q,taggable_id:J,taggable_type:$,slug:Q.name.toLowerCase().replace(/[^a-z0-9]+/g,"-"),order:0,is_active:!0,created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).returningAll().executeTakeFirst()},async activeTags(J){return await Z.selectFrom("taggable").where("taggable_id","=",J).where("taggable_type","=",$).where("is_active","=",!0).selectAll().execute()},async inactiveTags(J){return await Z.selectFrom("taggable").where("taggable_id","=",J).where("taggable_type","=",$).where("is_active","=",!1).selectAll().execute()},async removeTag(J,Q){await Z.deleteFrom("taggable").where("taggable_id","=",J).where("taggable_type","=",$).where("id","=",Q).execute()}}}import{db as xB}from"@stacksjs/database";function M9($){let Z=xB;async function J(Q){return(await Z.selectFrom("categorizable_models").where("categorizable_id","=",Q).where("categorizable_type","=",$).selectAll().execute()).map((Y)=>Y.category_id)}return{async categories(Q){let X=await J(Q);if(X.length===0)return[];return await Z.selectFrom("categorizable").where("id","in",X).selectAll().execute()},async categoryCount(Q){return(await J(Q)).length},async addCategory(Q,X){let Y=await Z.selectFrom("categorizable").where("name","=",X.name).selectAll().executeTakeFirst();if(!Y)Y=await Z.insertInto("categorizable").values({name:X.name,description:X.description,slug:X.name.toLowerCase().replace(/[^a-z0-9]+/g,"-"),is_active:!0,created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).returningAll().executeTakeFirst();return await Z.insertInto("categorizable_models").values({categorizable_id:Q,categorizable_type:$,category_id:Y.id,created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).returningAll().executeTakeFirst()},async activeCategories(Q){let X=await J(Q);if(X.length===0)return[];return await Z.selectFrom("categorizable").where("id","in",X).where("is_active","=",!0).selectAll().execute()},async inactiveCategories(Q){let X=await J(Q);if(X.length===0)return[];return await Z.selectFrom("categorizable").where("id","in",X).where("is_active","=",!1).selectAll().execute()},async removeCategory(Q,X){await Z.deleteFrom("categorizable_models").where("categorizable_id","=",Q).where("categorizable_type","=",$).where("category_id","=",X).execute()}}}import{db as IB,sql as PB}from"@stacksjs/database";function _9($,Z){if(typeof $!=="number"||!Number.isFinite($)||$<=0)throw Error(`[orm/commentable] ${Z} requires a positive numeric id (received ${String($)})`)}function g9($){let Z=IB;return{async comments(J){return _9(J,"comments"),await Z.selectFrom("comments").where("commentables_id","=",J).where("commentables_type","=",$).selectAll().execute()},async commentCount(J){let Q=await Z.selectFrom("comments").select(PB`count(*) as count`).where("commentables_id","=",J).where("commentables_type","=",$).executeTakeFirst();return Number(Q?.count)||0},async addComment(J,Q){if(_9(J,"addComment"),!Q||typeof Q.title!=="string"||Q.title.trim().length===0)throw Error("[orm/commentable] addComment requires a non-empty comment.title");if(typeof Q.body!=="string"||Q.body.trim().length===0)throw Error("[orm/commentable] addComment requires a non-empty comment.body");return await Z.insertInto("comments").values({...Q,commentables_id:J,commentables_type:$,status:"pending",created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).returningAll().executeTakeFirst()},async approvedComments(J){return await Z.selectFrom("comments").where("commentables_id","=",J).where("commentables_type","=",$).where("status","=","approved").selectAll().execute()},async pendingComments(J){return await Z.selectFrom("comments").where("commentables_id","=",J).where("commentables_type","=",$).where("status","=","pending").selectAll().execute()},async rejectedComments(J){return await Z.selectFrom("comments").where("commentables_id","=",J).where("commentables_type","=",$).where("status","=","rejected").selectAll().execute()}}}import{db as BH}from"@stacksjs/database";function N3($){let Z=BH;return{async createStripeUser(J,Q){let{manageCustomer:X}=await import("@stacksjs/payments");return await X.createStripeCustomer(J,Q)},async updateStripeUser(J,Q){let{manageCustomer:X}=await import("@stacksjs/payments");return await X.updateStripeCustomer(J,Q)},async deleteStripeUser(J){let{manageCustomer:Q}=await import("@stacksjs/payments");return await Q.deleteStripeUser(J)},async createOrGetStripeUser(J,Q){let{manageCustomer:X}=await import("@stacksjs/payments");return await X.createOrGetStripeUser(J,Q)},async retrieveStripeUser(J){let{manageCustomer:Q}=await import("@stacksjs/payments");return await Q.retrieveStripeUser(J)},async defaultPaymentMethod(J){let{managePaymentMethod:Q}=await import("@stacksjs/payments");return await Q.retrieveDefaultPaymentMethod(J)},async setDefaultPaymentMethod(J,Q){let{managePaymentMethod:X}=await import("@stacksjs/payments");return await X.setDefaultPaymentMethod(J,Q)},async addPaymentMethod(J,Q){let{managePaymentMethod:X}=await import("@stacksjs/payments");return await X.addPaymentMethod(J,Q)},async paymentMethods(J,Q){let{managePaymentMethod:X}=await import("@stacksjs/payments");return await X.listPaymentMethods(J,Q)},async newSubscription(J,Q,X,Y={}){let{manageSubscription:G}=await import("@stacksjs/payments"),V=await G.create(J,Q,X,Y),W=V.latest_invoice?.payment_intent;return{subscription:V,paymentIntent:W}},async updateSubscription(J,Q,X,Y={}){let{manageSubscription:G}=await import("@stacksjs/payments"),V=await G.update(J,Q,X,Y),W=V.latest_invoice?.payment_intent;return{subscription:V,paymentIntent:W}},async cancelSubscription(J,Q,X={}){let{manageSubscription:Y}=await import("@stacksjs/payments");return{subscription:await Y.cancel(Q,X)}},async activeSubscription(J){let{manageSubscription:Q}=await import("@stacksjs/payments"),X=await Z.selectFrom("subscriptions").where("user_id","=",J.id).where("provider_status","=","active").selectAll().executeTakeFirst();if(X){let Y=await Q.retrieve(J,X.provider_id||"");return{subscription:X,providerSubscription:Y}}return},async checkout(J,Q,X={}){let{manageCheckout:Y,manageCustomer:G}=await import("@stacksjs/payments"),V={};if(X.enableTax)V.automatic_tax={enabled:!0},delete X.enableTax;if(X.allowPromotions)V.allow_promotion_codes=!0,delete X.allowPromotions;let B={...{mode:"payment",customer:(await G.createOrGetStripeUser(J,{})).id,line_items:Q.map((z)=>({price:z.priceId,quantity:z.quantity||1}))},...V,...X};return await Y.create(J,B)},async createSetupIntent(J,Q={}){let{manageSetupIntent:X}=await import("@stacksjs/payments");return await X.create(J,Q)},async subscriptionHistory(J){let{manageInvoice:Q}=await import("@stacksjs/payments");return await Q.list(J)},async transactionHistory(J){let{manageTransaction:Q}=await import("@stacksjs/payments");return await Q.list(J)},async connectAccount(J,Q={}){let X=Q.accountColumn||"stripe_account_id",Y=(J._attributes??J)[X];if(!Y)return null;let G=await W8();try{return await G.accounts.retrieve(Y)}catch{return null}},async createConnectAccount(J,Q={}){let X=Q.accountColumn||"stripe_account_id",Y=J._attributes??J,G=Y[X],V=await W8();if(!G){let{stacksIdempotencyKey:U}=await import("@stacksjs/payments"),W=Q.modelTable||$,B=await V.accounts.create({type:Q.type??"express",email:Q.email??Y.email,country:Q.country??"US",capabilities:Q.capabilities??{card_payments:{requested:!0},transfers:{requested:!0}}},{idempotencyKey:U("connect.account.create",W,Y.id)});return G=B.id,await Z.updateTable(W).set({[X]:G}).where("id","=",Number(Y.id)).execute(),B}return await V.accounts.retrieve(G)},async connectOnboardLink(J,Q){let X=Q.accountColumn||"stripe_account_id",G=(J._attributes??J)[X];if(!G)throw Error("connectOnboardLink: model has no Stripe Connect account; call createConnectAccount first");return{url:(await(await W8()).accountLinks.create({account:G,refresh_url:Q.refreshUrl,return_url:Q.returnUrl,type:Q.type??"account_onboarding"})).url,accountId:G}},async syncConnectStatus(J,Q={}){let X=Q.accountColumn||"stripe_account_id",Y=Q.chargesColumn||"charges_enabled",G=Q.payoutsColumn||"payouts_enabled",V=J._attributes??J,U=V[X];if(!U)return{chargesEnabled:!1,payoutsEnabled:!1};let B=await(await W8()).accounts.retrieve(U),z=!!B.charges_enabled,L=!!B.payouts_enabled,H=Q.modelTable||$;return await Z.updateTable(H).set({[Y]:z,[G]:L}).where("id","=",Number(V.id)).execute(),{chargesEnabled:z,payoutsEnabled:L}},async chargeWithSplit(J,Q){let X=await W8(),Y=Q.accountColumn||"stripe_account_id",G=J._attributes??J,V=Q.connectAccountId||G[Y],U={amount:Q.amountCents,currency:Q.currency||"usd",automatic_payment_methods:{enabled:!0},metadata:Q.metadata};if(V){if(U.transfer_data={destination:V},Q.platformFeeCents)U.application_fee_amount=Q.platformFeeCents}let{freshIdempotencyKey:W}=await import("@stacksjs/payments");return await X.paymentIntents.create(U,{idempotencyKey:W("payment_intent.create",G.id,Q.amountCents)})}}}async function W8(){let $=globalThis.process?.env?.STRIPE_SECRET_KEY;if(!$)throw Error("Stripe Connect: STRIPE_SECRET_KEY not configured");return new(await Promise.resolve().then(() => JB(A3(),1))).default($,{apiVersion:"2026-03-25.dahlia"})}import{db as WH}from"@stacksjs/database";function x3($,Z){let J=WH,Q=Z?.table||`${$}_likes`,X=Z?.foreignKey||`${$.replace(/s$/,"")}_id`;return{async likes(Y){return await J.selectFrom(Q).where(X,"=",Y).selectAll().execute()},async likeCount(Y){let G=await J.selectFrom(Q).select("count(*) as count").where(X,"=",Y).executeTakeFirst();return Number(G?.count)||0},async like(Y,G){if(typeof Y!=="number"||!Number.isFinite(Y)||Y<=0)throw Error(`[orm/likeable] like requires a positive numeric id (received ${String(Y)})`);if(typeof G!=="number"||!Number.isFinite(G)||G<=0)throw Error(`[orm/likeable] like requires a positive numeric userId (received ${String(G)})`);let V=new Date().toISOString();try{return await J.insertInto(Q).values({[X]:Y,user_id:G,created_at:V,updated_at:V}).returningAll().executeTakeFirst()}catch(U){let W=U;if(!(W.code==="SQLITE_CONSTRAINT_UNIQUE"||W.code==="SQLITE_CONSTRAINT"||W.code==="23505"||W.errno===1062||/unique|duplicate/i.test(W.message??"")))throw U;let z=await J.selectFrom(Q).where(X,"=",Y).where("user_id","=",G).selectAll().executeTakeFirst();if(z)return z;throw U}},async unlike(Y,G){await J.deleteFrom(Q).where(X,"=",Y).where("user_id","=",G).execute()},async isLiked(Y,G){return!!await J.selectFrom(Q).where(X,"=",Y).where("user_id","=",G).selectAll().executeTakeFirst()},async likedBy(Y){return(await J.selectFrom(Q).select([X]).where("user_id","=",Y).execute()).map((V)=>Number(V[X])).filter(Boolean)}}}function I3(){return{async generateTwoFactorForModel($){let{generateTwoFactorSecret:Z}=await import("@stacksjs/auth"),J=Z();await $.update({two_factor_secret:J})},async verifyTwoFactorCode($,Z){let J=$.get("two_factor_secret");if(typeof J!=="string")return!1;let{verifyTwoFactorCode:Q,RateLimiter:X}=await import("@stacksjs/auth"),Y=String($.id??$.get?.("id")??$.get?.("email")??J),G=`2fa:${Y}`;if(await X.isRateLimited(G)){let{HttpError:U}=await import("@stacksjs/error-handling");throw new U(429,"Too many verification attempts. Please try again later.")}if(!await Q(Z,J))return await X.recordFailedAttempt(G),!1;try{let{cache:U}=await import("@stacksjs/cache"),W=`2fa:used:${Y}:${Z}`;if(await U.has(W))return await X.recordFailedAttempt(G),!1;await U.set(W,"1",90)}catch{}return await X.resetAttempts(G),!0}}}import{log as x0}from"@stacksjs/logging";var e8="deleted_at";function P3($,Z="id"){return{async softDelete(J){let Q=new Date().toISOString(),X=$.where(Z,J);if(typeof X?.update==="function")return await X.update({[e8]:Q}),!0;return!1},async restore(J){let Q=$.where(Z,J);if(typeof Q?.update==="function")return await Q.update({[e8]:null}),!0;return!1},async forceDelete(J){let Q=$.where(Z,J);if(typeof Q?.delete==="function")return await Q.delete(),!0;return!1},withTrashed(){return typeof $.query==="function"?$.query():$},onlyTrashed(){let J=typeof $.query==="function"?$.query():$;if(typeof J?.whereNotNull==="function")return J.whereNotNull(e8);return J?.where?.(e8,"!=",null)??J}}}function S3($){if($===!0||$==null)return{};if(typeof $==="object"&&!Array.isArray($)){let Z=$;if(Array.isArray(Z.cascade)){let J=Z.cascade.filter((Q)=>typeof Q==="string");return J.length?{cascade:J}:{}}return{}}return{}}function UH($,Z){let J=$.hasMany??[],Q=$.hasOne??[],X=J.some((B)=>z9(B,Z,!0)),Y=Q.some((B)=>z9(B,Z,!1));if(!X&&!Y)return x0.warn(`[orm] soft-delete cascade: '${Z}' is not a declared hasMany/hasOne relation \u2014 skipping`),null;let V=(X?J:Q).find((B)=>z9(B,Z,X))??null;if(!V)return null;let W=globalThis[V];if(!W)return x0.warn(`[orm] soft-delete cascade: model '${V}' is not yet on globalThis \u2014 skipping cascade for '${Z}'`),null;return{className:V,model:W}}function z9($,Z,J){let Q=$.toLowerCase();if(Z===Q)return!0;if(J&&Z===`${Q}s`)return!0;if(J&&Q.endsWith("y")&&Z===`${Q.slice(0,-1)}ies`)return!0;return!1}async function zH($,Z,J,Q,X){try{let Y=J.where;if(typeof Y!=="function"){x0.warn(`[orm] cascade ${X}: child model has no .where()`);return}if(X==="softDelete"){let G=J.softDelete;if(typeof G==="function"){let U=Y.call(J,Q,Z),W=typeof U?.get==="function"?await U.get():Array.isArray(U)?U:[],B=J.primaryKey||"id";for(let z of W){let L=z?.[B];if(L!=null)await G.call(J,L)}return}let V=Y.call(J,Q,Z);if(typeof V?.delete==="function"){x0.debug(`[orm] cascade soft-delete: child has no softDeletes trait, hard-deleting from ${String(J.table??"?")}`),await V.delete();return}}else{let G=J.restore;if(typeof G!=="function"){x0.debug("[orm] cascade restore: child has no restore() \u2014 nothing to do");return}let V=J.withTrashed,W=(typeof V==="function"?V.call(J):J).where?.(Q,Z),B=typeof W?.get==="function"?await W.get():[],z=J.primaryKey||"id";for(let L of B){let H=L?.[z];if(H!=null)await G.call(J,H)}}}catch(Y){if(x0.warn(`[orm] soft-delete cascade ${X} on ${$}#${String(Z)} failed`,{error:Y}),process.env.STACKS_ORM_CASCADE_SWALLOW!=="true")throw Y}}async function U8($,Z,J,Q){let X=Z.cascade;if(!X||X.length===0)return;let Y=`${$.name.toLowerCase()}_id`;for(let G of X){let V=UH($,G);if(!V)continue;await zH(V.className,J,V.model,Y,Q)}}var _3=new HH;function U0(){return _3.getStore()?.suppressed===!0}function W0($){return Promise.resolve(_3.run({suppressed:!0},$))}var R3=new Set;function wH($,Z){let J=typeof $==="string"?$.slice(0,80):String($),Q=`${typeof $}:${J}`;if(R3.has(Q))return;R3.add(Q);let X=Z instanceof Error?Z.message:String(Z);console.error(`[orm] JSON cast failed to parse value (returning null): ${X} \u2014 value preview: ${JSON.stringify(J)}`)}var TH={string:{get:($)=>$!=null?String($):null,set:($)=>$!=null?String($):null},number:{get:($)=>$!=null?Number($):null,set:($)=>$!=null?Number($):null},integer:{get:($)=>$!=null?Math.trunc(Number($)):null,set:($)=>$!=null?Math.trunc(Number($)):null},float:{get:($)=>$!=null?Number.parseFloat(String($)):null,set:($)=>$!=null?Number.parseFloat(String($)):null},boolean:{get:($)=>$===1||$==="1"||$===!0||$==="true",set:($)=>$===!0||$===1||$==="1"||$==="true"?1:0},json:{get:($)=>{if($==null)return null;if(typeof $==="string")try{return JSON.parse($)}catch(Z){return wH($,Z),null}return $},set:($)=>{if($==null)return null;return typeof $==="string"?$:JSON.stringify($)}},datetime:{get:($)=>$?new Date($):null,set:($)=>$ instanceof Date?$.toISOString():$},date:{get:($)=>$?new Date($):null,set:($)=>$ instanceof Date?$.toISOString().split("T")[0]:$},array:{get:($)=>{if($==null)return[];if(Array.isArray($))return $;if(typeof $==="string")try{return JSON.parse($)}catch{return[]}return[]},set:($)=>{if($==null)return null;return Array.isArray($)?JSON.stringify($):$}}};function g3($){return typeof $==="string"?TH[$]:$}function y3($,Z,J){if(!$||typeof $!=="object")return $;let Q={...$};for(let[X,Y]of Object.entries(Z))if(X in Q){let G=g3(Y);Q[X]=G[J](Q[X])}return Q}var $$=new Set(["_attributes","_original","_definition","_hasSaved","_relations"]),v3=Symbol.for("stacks.modelInstanceProxy"),DH={tags:{bag:"_taggable",mode:"id"},tagCount:{bag:"_taggable",mode:"id"},addTag:{bag:"_taggable",mode:"id"},activeTags:{bag:"_taggable",mode:"id"},inactiveTags:{bag:"_taggable",mode:"id"},removeTag:{bag:"_taggable",mode:"id"},categories:{bag:"_categorizable",mode:"id"},categoryCount:{bag:"_categorizable",mode:"id"},addCategory:{bag:"_categorizable",mode:"id"},activeCategories:{bag:"_categorizable",mode:"id"},inactiveCategories:{bag:"_categorizable",mode:"id"},removeCategory:{bag:"_categorizable",mode:"id"},comments:{bag:"_commentable",mode:"id"},commentCount:{bag:"_commentable",mode:"id"},addComment:{bag:"_commentable",mode:"id"},approvedComments:{bag:"_commentable",mode:"id"},pendingComments:{bag:"_commentable",mode:"id"},rejectedComments:{bag:"_commentable",mode:"id"},likes:{bag:"_likeable",mode:"id"},likeCount:{bag:"_likeable",mode:"id"},like:{bag:"_likeable",mode:"id"},unlike:{bag:"_likeable",mode:"id"},isLiked:{bag:"_likeable",mode:"id"},createStripeUser:{bag:"_billable",mode:"model"},updateStripeUser:{bag:"_billable",mode:"model"},deleteStripeUser:{bag:"_billable",mode:"model"},createOrGetStripeUser:{bag:"_billable",mode:"model"},retrieveStripeUser:{bag:"_billable",mode:"model"},defaultPaymentMethod:{bag:"_billable",mode:"model"},setDefaultPaymentMethod:{bag:"_billable",mode:"model"},addPaymentMethod:{bag:"_billable",mode:"model"},paymentMethods:{bag:"_billable",mode:"model"},newSubscription:{bag:"_billable",mode:"model"},updateSubscription:{bag:"_billable",mode:"model"},cancelSubscription:{bag:"_billable",mode:"model"},activeSubscription:{bag:"_billable",mode:"model"},checkout:{bag:"_billable",mode:"model"},createSetupIntent:{bag:"_billable",mode:"model"},subscriptionHistory:{bag:"_billable",mode:"model"},transactionHistory:{bag:"_billable",mode:"model"},connectAccount:{bag:"_billable",mode:"model"},createConnectAccount:{bag:"_billable",mode:"model"},connectOnboardLink:{bag:"_billable",mode:"model"},syncConnectStatus:{bag:"_billable",mode:"model"},chargeWithSplit:{bag:"_billable",mode:"model"},generateTwoFactorForModel:{bag:"_twoFactor",mode:"model"},verifyTwoFactorCode:{bag:"_twoFactor",mode:"model"}};function OH($,Z){if(!$||!Z)return null;let J=Z.split("."),Q=$;for(let X of J){if(Q==null||typeof Q!=="object")return null;let Y=Q;if("_attributes"in Y&&Y._attributes&&typeof Y._attributes==="object"){let G=Y._attributes;if(X in G){Q=G[X];continue}}if(X in Y){Q=Y[X];continue}return null}return Q??null}function m($,Z){if(!$||typeof $!=="object")return $;if($[v3])return $;let J=$._attributes;if(!J||typeof J!=="object")return $;if(Z&&Object.keys(Z).length>0){for(let[Q,X]of Object.entries(Z))if(Object.prototype.hasOwnProperty.call(J,Q))J[Q]=g3(X).get(J[Q])}return new Proxy($,{get(Q,X,Y){if(X===v3)return!0;if(X==="saveAsync")return async function(){let V=Q._definition,U=V?.set;if(U&&typeof Q.isDirty==="function"){for(let[B,z]of Object.entries(U)){if(typeof z!=="function")continue;if(!Q.isDirty(B))continue;let L=z(Q._attributes),H=L&&typeof L.then==="function"?await L:L;Q._attributes[B]=H}let W=V.set;V.set={};try{return Q.save()}finally{V.set=W}}return Q.save()};if(X==="save")return function(){let V=Q._definition,U=V?.set;if(U&&Object.keys(U).length>0&&typeof Q.isDirty==="function"){for(let[B,z]of Object.entries(U)){if(typeof z!=="function")continue;if(!Q.isDirty(B))continue;let L=z(Q._attributes);if(L&&typeof L.then==="function")throw Error(`Setter for "${B}" returned a Promise \u2014 use \`saveAsync()\` instead of \`save()\` when a model has async setters.`);Q._attributes[B]=L}let W=V.set;V.set={};try{return Q.save()}finally{V.set=W}}return Q.save()};if(X==="updateAsync")return async function(V){if(V&&typeof V==="object"&&!Array.isArray(V))for(let[U,W]of Object.entries(V))Y[U]=W;return Y.saveAsync()};if(X==="saveQuietly")return function(){return W0(()=>Q.save())};if(X==="saveAsyncQuietly")return function(){return W0(()=>Y.saveAsync())};if(X==="updateQuietly")return function(V){return W0(()=>Q.update(V))};if(X==="updateAsyncQuietly")return function(V){return W0(()=>Y.updateAsync(V))};if(X==="deleteQuietly")return function(){return W0(()=>Q.delete())};if(X==="toSearchableObject")return function(){let W=Q._definition?.traits?.useSearch;if(!W)return null;let B=Q._attributes;if(!B)return null;if(W===!0){let D={...B};if(B.id!=null)D.id=String(B.id);return D}let z={},L=W.displayable?.length?W.displayable:[...W.searchable??[],...W.filterable??[],...W.sortable??[],"id"],H=W.denormalize??{},T=Q._relations;for(let D of L){let q=Z$(D),O=B[q]??B[D];if(O!==void 0){z[q]=O;continue}let k=H[D]??H[q];if(k){z[q]=OH(T,k);continue}z[q]=void 0}if(B.id!=null)z.id=String(B.id);return z};if(typeof X==="string"&&!$$.has(X)){let V=Q._attributes;if(V&&Object.prototype.hasOwnProperty.call(V,X))return V[X];let U=Q._relations;if(U&&Object.prototype.hasOwnProperty.call(U,X)){let B=U[X];if(Array.isArray(B))return B.map((z)=>m(z,Z));return m(B,Z)}let W=DH[X];if(W){let L=Q._definition?.__traitMethods?.[W.bag]?.[X];if(typeof L==="function")return W.mode==="model"?(...H)=>L(Y,...H):(...H)=>L(Q.id,...H)}}let G=Reflect.get(Q,X,Q);return typeof G==="function"?G.bind(Q):G},set(Q,X,Y,G){if(typeof X==="string"&&!$$.has(X)){let{_attributes:V,set:U}=Q;if(V&&Object.prototype.hasOwnProperty.call(V,X)){if(typeof U==="function")U.call(Q,X,Y);else V[X]=Y;return!0}if(V&&!(X in Q)){if(typeof U==="function")U.call(Q,X,Y);else V[X]=Y;return!0}}return Reflect.set(Q,X,Y,G)},has(Q,X){if(typeof X==="string"&&!$$.has(X)){let Y=Q._attributes;if(Y&&Object.prototype.hasOwnProperty.call(Y,X))return!0;let G=Q._relations;if(G&&Object.prototype.hasOwnProperty.call(G,X))return!0}return Reflect.has(Q,X)},deleteProperty(Q,X){if(typeof X==="string"&&!$$.has(X)){let Y=Q._attributes;if(Y&&Object.prototype.hasOwnProperty.call(Y,X))return delete Y[X],!0}return Reflect.deleteProperty(Q,X)},ownKeys(Q){let X=Q._attributes;return X?Object.keys(X):[]},getOwnPropertyDescriptor(Q,X){if(typeof X==="string"){let Y=Q._attributes;if(Y&&Object.prototype.hasOwnProperty.call(Y,X))return{configurable:!0,enumerable:!0,value:Y[X],writable:!0}}return Object.getOwnPropertyDescriptor(Q,X)}})}var qH=new Set(["get","first","last","firstOrFail","find","findOrFail","all","paginate","simplePaginate","cursorPaginate"]),EH={paginate:w$,simplePaginate:T$,cursorPaginate:D$},b3=Symbol.for("stacks.queryBuilderProxy");function h3($,Z){if(!$||typeof $!=="object")return $;if($[b3])return $;return new Proxy($,{get(J,Q,X){if(Q===b3)return!0;let Y=Reflect.get(J,Q,X);if(typeof Y!=="function")return Y;return function(...G){let V=G,U=String(Q);if(U==="paginate"||U==="simplePaginate"){let{perPage:z,page:L}=q$(G[0],G[1]);V=[z,L]}else if(U==="cursorPaginate"){let{perPage:z,cursor:L}=E$(G[0],G[1]);V=[z,L,G[2],G[3]]}let W=Y.apply(J,V),B=(z)=>{if(qH.has(U)){if(Array.isArray(z))return z.map((H)=>m(H,Z));let L=EH[U];if(L&&z&&Array.isArray(z.data)){let H=z.data.map((D)=>m(D,Z)),T=L({...z,data:H});return F$(T)}if(z&&Array.isArray(z.data))return{...z,data:z.data.map((H)=>m(H,Z))};return m(z,Z)}if(z&&typeof z==="object"&&typeof z.get==="function")return h3(z,Z);return z};if(W&&typeof W.then==="function")return W.then(B);return B(W)}}})}function FH($,Z){let J=["find","first","last","all","firstOrFail","findOrFail","findMany"];for(let Y of J){let G=$[Y];if(typeof G!=="function")continue;$[Y]=function(...V){let U=G.apply(this,V),W=(B)=>Array.isArray(B)?B.map((z)=>m(z,Z)):m(B,Z);if(U&&typeof U.then==="function")return U.then(W);return W(U)}}let Q=["create","firstOrCreate","updateOrCreate","make"];for(let Y of Q){let G=$[Y];if(typeof G!=="function")continue;$[Y]=function(...V){let U=G.apply(this,V),W=(B)=>Array.isArray(B)?B.map((z)=>m(z,Z)):m(B,Z);if(U&&typeof U.then==="function")return U.then(W);return W(U)}}let X=["query","where","orWhere","whereIn","whereNotIn","whereNull","whereNotNull","whereLike","whereBetween","whereNotBetween","orderBy","orderByDesc","select","with","limit","take","skip","latest","oldest"];for(let Y of X){let G=$[Y];if(typeof G!=="function")continue;$[Y]=function(...V){let U=G.apply(this,V);return h3(U,Z)}}}class m3 extends Error{model;id;constructor($,Z){super(Z!=null?`[ORM] ${$} not found for id=${String(Z)}`:`[ORM] No matching ${$} row`);this.name="ModelNotFoundError",this.model=$,this.id=Z}}class K9 extends Error{model;attribute;reason;constructor($,Z,J){let Q=J==="guarded"?`'${Z}' is marked guarded`:`'${Z}' is not in the fillable allowlist`;super(`[ORM] Mass assignment to ${$} forbidden: ${Q}. Use ${$}.forceCreate(...) / .forceUpdate(...) to bypass.`);this.name="MassAssignmentException",this.model=$,this.attribute=Z,this.reason=J}}var CH=new Set(["id","created_at","updated_at","deleted_at","uuid"]);function z8($,Z,J={}){if(J.force)return Z;if(!Z||typeof Z!=="object"||Array.isArray(Z))return Z;let Q=$.attributes;if(!Q)return Z;let X=new Set,Y=new Set,G=new Set;for(let[U,W]of Object.entries(Q)){let B=Z$(U);if(X.add(B),W?.fillable===!0)Y.add(B);if(W?.guarded===!0)G.add(B)}let V=Y.size>0?Y:X;for(let U of Object.keys(Z)){if(CH.has(U))continue;if(G.has(U))throw new K9($.name,U,"guarded");if(U.endsWith("_id"))continue;if(!V.has(U))throw new K9($.name,U,"not-fillable")}return Z}async function H9($,Z){let J=$.set;if(!J||typeof J!=="object")return Z;let Q={...Z};for(let[X,Y]of Object.entries(J)){if(typeof Y!=="function"||!(X in Q))continue;try{Q[X]=await Y(Q)}catch(G){h.error(`[orm] ${$.name}.set.${X} threw \u2014 skipping setter`,G)}}return Q}function kH($,Z){let J=Z.primaryKey||"id",Q=$.create;function X(W){let B=$.where;if(typeof B!=="function")throw Error(`[ORM] ${Z.name}.${W} needs a working where(): the underlying query builder did not expose one`);return B}function Y(W){let B=$.find;if(typeof B!=="function")throw Error(`[ORM] ${Z.name}.${W} needs a working find(): the underlying query builder did not expose one`);return B}function G(W){let B=$.create;if(typeof B!=="function")throw Error(`[ORM] ${Z.name}.${W} cannot create: the underlying query builder did not expose create()`);return B}if(typeof $.update!=="function")$.update=async function(W,B){if(W==null)throw Error(`[ORM] ${Z.name}.update requires an id as the first argument`);if(!B||typeof B!=="object"||Array.isArray(B))throw Error(`[ORM] ${Z.name}.update requires a data object as the second argument`);if(Object.keys(B).length===0){h.debug(`[orm] ${Z.name}.update called with empty data \u2014 short-circuiting and returning current row`);let H=$.find;return typeof H==="function"?await H.call($,W):null}z8(Z,B);let z=await H9(Z,B);await X("update").call($,J,W).update(z);let L=$.find;return typeof L==="function"?await L.call($,W):null};if(typeof $.forceUpdate!=="function")$.forceUpdate=async function(W,B){if(W==null)throw Error(`[ORM] ${Z.name}.forceUpdate requires an id as the first argument`);if(!B||typeof B!=="object"||Array.isArray(B))throw Error(`[ORM] ${Z.name}.forceUpdate requires a data object as the second argument`);let z=await H9(Z,B);await X("forceUpdate").call($,J,W).update(z);let L=$.find;return typeof L==="function"?await L.call($,W):null};if(typeof $.forceCreate!=="function")$.forceCreate=async function(W){if(!W||typeof W!=="object"||Array.isArray(W))throw Error(`[ORM] ${Z.name}.forceCreate requires a data object`);if(typeof Q!=="function")throw Error(`[ORM] ${Z.name}.forceCreate cannot create: the underlying query builder did not expose create()`);return await Q.call($,W)};if(typeof $.delete!=="function")$.delete=async function(W){if(W==null)throw Error(`[ORM] ${Z.name}.delete requires an id as the first argument`);if(!await Y("delete").call($,W))return!1;return await X("delete").call($,J,W).delete(),!0};if(typeof $.findOrFail!=="function")$.findOrFail=async function(W){let B=await Y("findOrFail").call($,W);if(B==null)throw new m3(Z.name,W);return B};if(typeof $.exists!=="function")$.exists=async function(W){if(W==null)return!1;let B=X("exists").call($,J,W);if(typeof B.count==="function"){let L=await B.count();return Number(L)>0}let z=$.find;return typeof z==="function"?await z.call($,W)!=null:!1};if(typeof $.firstOrCreate!=="function")$.firstOrCreate=async function(W,B={}){if(!W||typeof W!=="object"||Array.isArray(W))throw Error(`[ORM] ${Z.name}.firstOrCreate requires a where-attrs object`);let z=X("firstOrCreate").call($,W),L=typeof z.first==="function"?await z.first():await z;if(L)return L;let H={...W,...B};return z8(Z,H),await G("firstOrCreate").call($,H)};if(typeof $.updateOrCreate!=="function")$.updateOrCreate=async function(W,B){if(!W||typeof W!=="object"||Array.isArray(W))throw Error(`[ORM] ${Z.name}.updateOrCreate requires a where-attrs object`);if(!B||typeof B!=="object"||Array.isArray(B))throw Error(`[ORM] ${Z.name}.updateOrCreate requires a values object`);let z=X("updateOrCreate").call($,W),L=typeof z.first==="function"?await z.first():await z;if(L){z8(Z,B);let T=L[J];await X("updateOrCreate").call($,J,T).update(B);let D=$.find;return typeof D==="function"?await D.call($,T):{...L,...B}}let H={...W,...B};return z8(Z,H),await G("updateOrCreate").call($,H)};if(typeof $.count!=="function")$.count=async function(){let W=$;if(typeof W.query==="function"){let L=W.query();if(typeof L?.count==="function"){let H=await L.count();return Number(H)||0}}let{all:B,get:z}=$;if(typeof B==="function")return(await B.call($)||[]).length;if(typeof z==="function")return(await z.call($)||[]).length;return 0};if(typeof $.pluck!=="function")$.pluck=async function(W){if(!W||typeof W!=="string")throw Error(`[ORM] ${Z.name}.pluck requires a column name`);let B=$.all;return((typeof B==="function"?await B.call($):[])||[]).map((L)=>L?.[W])};if(typeof $.whereIn!=="function")$.whereIn=async function(W,B){if(!W||typeof W!=="string")throw Error(`[ORM] ${Z.name}.whereIn requires a column name`);if(!Array.isArray(B))throw Error(`[ORM] ${Z.name}.whereIn requires an array of values`);if(B.length===0)return[];let z=$.where;if(typeof z!=="function")return[];let L=z.call($,W,"in",B);if(L&&typeof L.get==="function")return await L.get();return await L};let V=[["latest","desc"],["oldest","asc"]];for(let[W,B]of V)if(typeof $[W]!=="function")$[W]=async function(z="created_at"){let L=$,H=typeof L.query==="function"?L.query():L;if(typeof H?.orderBy==="function"){let O=H.orderBy(z,B);if(typeof O.first==="function")return await O.first();if(typeof O.get==="function")return(await O.get())?.[0]??null}let T=$.all;if(typeof T!=="function")return null;return[...await T.call($)||[]].sort((O,k)=>{let N=O?.[z],R=k?.[z];if(N===R)return 0;return(N>R?1:-1)*(B==="desc"?-1:1)})[0]??null};let U=u3(Z.traits?.useSearch);if(U){let W=U.index??Z.table??Z$(`${Z.name}s`);if(typeof $.search!=="function")$.search=function(B,z){return AH($,W,B,z)};if(typeof $.makeAllSearchable!=="function")$.makeAllSearchable=async function(B=500){let z=$.all;if(typeof z!=="function")throw Error(`[ORM] ${Z.name}.makeAllSearchable cannot run: the underlying query builder did not expose all()`);let{useSearchEngine:L}=await import("@stacksjs/search-engine"),H=L(),T=0,D=$.query;if(typeof D==="function")try{let k=D.call($);if(k&&typeof k.chunk==="function")return await k.chunk(B,async(N)=>{let R=N.map((M)=>j3(M,U)).filter(Boolean);if(R.length>0)await H.addDocuments(W,R);T+=R.length}),T}catch{}let O=(await z.call($)||[]).map((k)=>j3(k,U)).filter(Boolean);if(O.length>0)await H.addDocuments(W,O);return O.length};if(typeof $.removeAllFromSearch!=="function")$.removeAllFromSearch=async function(){let{useSearchEngine:B}=await import("@stacksjs/search-engine"),z=B();if(typeof z.deleteAllDocuments==="function"){await z.deleteAllDocuments(W);return}let L=$.all,H=typeof L==="function"?await L.call($)||[]:[],T=B();for(let D of H){let q=D?.id??D?._attributes?.id;if(q!=null)await T.deleteDocument(W,Number(q))}}}}function j3($,Z){if(typeof Z.shape==="function")try{return Z.shape($)}catch{return}let J=$?.toSearchableObject?.();if(J!==void 0)return J;return $?._attributes??(typeof $?.toJSON==="function"?$.toJSON():null)}function AH($,Z,J,Q){let X={q:J,...Q??{}},Y={with(G){return X={...X,...G},Y},where(G){return X={...X,filter:G},Y},async get(){let{useSearchEngine:G}=await import("@stacksjs/search-engine");return(await G().search(Z,X))?.hits??[]},async paginate(G,V=1){let{useSearchEngine:U}=await import("@stacksjs/search-engine"),B=await U().search(Z,{...X,limit:G,offset:(V-1)*G});return{hits:B.hits??[],total:Number(B.estimatedTotalHits??B.nbHits??B.total??0),page:V,perPage:G}},async raw(){let{useSearchEngine:G}=await import("@stacksjs/search-engine");return await G().search(Z,X)}};return Y}async function L9($,Z){if(!$||typeof $!=="object")return;let J=$._attributes??$;for(let Q of Z){if(!(Q in J))continue;let X=J[Q];if(!S0(X))continue;J[Q]=await Y$(X)}}function NH($,Z){if(Z.length===0)return;let J=async(G)=>{if(Array.isArray(G)){for(let V of G)await L9(V,Z);return G}if(G&&typeof G==="object"&&Array.isArray(G.data)){for(let V of G.data)await L9(V,Z);return G}if(G)await L9(G,Z);return G},Q=["find","first","last","all","firstOrFail","findOrFail","findMany"];for(let G of Q){let V=$[G];if(typeof V!=="function")continue;$[G]=async function(...U){let W=await V.apply(this,U);return await J(W)}}let X=["create","firstOrCreate","updateOrCreate","make"];for(let G of X){let V=$[G];if(typeof V!=="function")continue;$[G]=async function(...U){let W=await V.apply(this,U);return await J(W)}}let Y=$.update;if(typeof Y==="function")$.update=async function(G,V){let U=await Y.call(this,G,V);return await J(U)}}function xH($,Z){if(Z.length===0)return;let J=async(Y)=>{if(!Y||typeof Y!=="object"||Array.isArray(Y))return Y;let G={...Y};for(let V of Z)if(V in G)G[V]=await X$(G[V]);return G},Q=["create","firstOrCreate","updateOrCreate"];for(let Y of Q){let G=$[Y];if(typeof G!=="function")continue;$[Y]=async function(...V){if(V[0]=await J(V[0]),V[1])V[1]=await J(V[1]);return await G.apply(this,V)}}let X=$.update;if(typeof X==="function")$.update=async function(Y,G){let V=await J(G);return await X.call(this,Y,V)}}function IH($,Z){let J=$.create;if(typeof J==="function")$.create=async function(Q,...X){z8(Z,Q);let Y=await H9(Z,Q);return await J.call(this,Y,...X)};for(let Q of["firstOrCreate","updateOrCreate"]){let X=$[Q];if(typeof X!=="function")continue}}function PH($,Z){let J=["create","firstOrCreate","updateOrCreate"];for(let X of J){let Y=$[X];if(typeof Y==="function")$[X]=async function(...G){if(h.debug(`[orm] ${X.charAt(0).toUpperCase()+X.slice(1)} ${String($.name||"unknown")}`,G[0]),G[0]&&typeof G[0]==="object"&&!Array.isArray(G[0]))G[0]=y3(G[0],Z,"set");return await Y.apply(this,G)}}let Q=$.update;if(typeof Q==="function")$.update=async function(X,Y){let G=Y&&typeof Y==="object"&&!Array.isArray(Y)?y3(Y,Z,"set"):Y;return await Q.call(this,X,G)}}function CF($){h.debug(`[orm] Defining model: ${$.name} (table: ${$.table})`);let Z=SH($),J=yH($),Q=RH(Z,J),X=vH($);$.__traitMethods=X;let Y=Q?{...$,hooks:{...$.hooks,...Q}}:$,G=LH(Y);if(FH(G,$.casts),kH(G,Y),IH(G,Y),$.casts&&Object.keys($.casts).length>0)PH(G,$.casts);let V=G$($);if(V.length>0)xH(G,V),NH(G,V);let U=$.traits?.useSoftDeletes;if(U)bH(G,Y,U);let W=$.traits?.useAudit;if(W){let z=k9(W);A9(G,$.name,$.primaryKey||"id",z)}G.withoutEvents=function(z){return W0(z)};for(let z of["create","update","firstOrCreate","updateOrCreate","forceCreate","forceUpdate","delete","forceDelete","softDelete","restore"]){let L=G[z];if(typeof L!=="function")continue;let H=`${z}Quietly`;if(typeof G[H]==="function")continue;G[H]=function(...T){return W0(()=>L.apply(G,T))}}let B=Object.assign(G,X,{...$,getDefinition:()=>$,_isStacksModel:!0});return KH($.name,B),B}function SH($){let Z=$.traits?.observe;if(!Z)return;let J=$.name.toLowerCase(),Q=(L)=>{let H=L?.attributes;if(!H||typeof H!=="object")return L;let T=$.primaryKey||"id",D={...H};if(D[T]===void 0&&L[T]!==void 0)D[T]=L[T];return D},X=async(L,H)=>{if(U0())return;try{let{dispatch:T}=await import("@stacksjs/events");await T(L,H)}catch(T){if(T&&typeof T==="object"&&"code"in T&&T.code==="MODULE_NOT_FOUND")return;if(console.error(`[ORM] Event '${L}' handler error:`,T),process.env.STACKS_ORM_EVENT_ERRORS!=="swallow")throw T}},Y=$.traits?.broadcastOn,G=$.traits?.broadcastWith,V=typeof Y==="function"&&typeof G==="function",U=async(L,H)=>{if(!V)return;if(U0())return;try{let T=Y(H),D=Array.isArray(T)?T:[T],q=G(H),k=(await import("@stacksjs/realtime").catch(()=>null))?.broadcast;if(typeof k!=="function")return;for(let N of D){if(typeof N!=="string"||N.length===0)continue;await k(N,L,q)}}catch(T){if(T&&typeof T==="object"&&"code"in T&&T.code==="MODULE_NOT_FOUND")return;if(console.error(`[ORM] Broadcast '${L}' handler error:`,T),process.env.STACKS_ORM_BROADCAST_ERRORS==="throw")throw T}},W=async(L,H)=>{if(U0())return!0;try{let{dispatchAsync:T}=await import("@stacksjs/events"),D=await T(L,H);if(Array.isArray(D)&&D.some((q)=>q===!1))return!1}catch(T){if(T&&typeof T==="object"&&"code"in T&&T.code==="MODULE_NOT_FOUND")return!0;if(console.error(`[ORM] Before-event '${L}' handler error:`,T),process.env.STACKS_ORM_EVENT_ERRORS!=="swallow")throw T}return!0},B=Z===!0?["create","update","delete"]:Array.isArray(Z)?Z:[],z={};if(B.includes("create"))z.beforeCreate=async(L)=>{if(h.debug(`[orm] Create ${J}`,L),!await W(`${J}:saving`,L))throw Error(`[ORM] ${J}:saving event cancelled the operation`);if(!await W(`${J}:creating`,L))throw Error(`[ORM] ${J}:creating event cancelled the operation`)},z.afterCreate=async(L)=>{let H=Q(L);await X(`${J}:created`,H),await X(`${J}:saved`,H),await U(`${J}:created`,L)};if(B.includes("update"))z.beforeUpdate=async(L)=>{if(h.debug(`[orm] Update ${J}#${L?.id??"unknown"}`,L),!await W(`${J}:saving`,L))throw Error(`[ORM] ${J}:saving event cancelled the operation`);if(!await W(`${J}:updating`,L))throw Error(`[ORM] ${J}:updating event cancelled the operation`)},z.afterUpdate=async(L)=>{let H=Q(L);await X(`${J}:updated`,H),await X(`${J}:saved`,H),await U(`${J}:updated`,L)};if(B.includes("delete"))z.beforeDelete=async(L)=>{if(h.debug(`[orm] Delete ${J}#${L?.id??"unknown"}`),!await W(`${J}:deleting`,L))throw Error(`[ORM] ${J}:deleting event cancelled the operation`)},z.afterDelete=async(L)=>{await X(`${J}:deleted`,Q(L)),await U(`${J}:deleted`,L)};return z}function RH(...$){let Z={},J=new Set;for(let Q of $){if(!Q)continue;for(let X of Object.keys(Q))J.add(X)}for(let Q of J){let X=$.map((Y)=>Y?.[Q]).filter((Y)=>typeof Y==="function");if(!X.length)continue;Z[Q]=async(...Y)=>{for(let G of X)await G(...Y)}}return Object.keys(Z).length?Z:void 0}function u3($){if(!$)return null;if($===!0)return{};if(typeof $==="object")return $;return null}function yH($){let Z=u3($.traits?.useSearch);if(!Z)return;let J=Z,Q=J.index??$.table??Z$(`${$.name}s`);function X(V){if(typeof J.shape==="function")try{return J.shape(V)}catch(B){h.warn(`[orm/search] shape() threw for ${$.name}: ${B.message}`);return}let W=m(V).toSearchableObject?.();if(W!==void 0)return W;return V?._attributes??(typeof V?.toJSON==="function"?V.toJSON():null)}let Y=async(V)=>{if(U0())return;let U=X(V);if(!U)return;if(Z.queueable){try{let{Jobs:W}=await import("@stacksjs/queue");await W.dispatch("SyncSearchIndex",{index:Q,op:"upsert",doc:U})}catch(W){h.warn(`[orm/search] queue dispatch failed for ${$.name}; falling back to inline: ${W.message}`),await f3(Q,U,$.name)}return}await f3(Q,U,$.name)};return{afterCreate:Y,afterUpdate:Y,afterDelete:async(V)=>{if(U0())return;let U=V?.id??V?._attributes?.id;if(U==null)return;if(Z.queueable){try{let{Jobs:W}=await import("@stacksjs/queue");await W.dispatch("SyncSearchIndex",{index:Q,op:"delete",id:Number(U)})}catch(W){h.warn(`[orm/search] queue dispatch failed for ${$.name}#${U}; falling back to inline: ${W.message}`),await M3(Q,Number(U),$.name)}return}await M3(Q,Number(U),$.name)}}}async function f3($,Z,J){try{let{useSearchEngine:Q}=await import("@stacksjs/search-engine");await Q().addDocument($,Z)}catch(Q){h.warn(`[orm/search] Failed to index ${J}: ${Q.message}`)}}async function M3($,Z,J){try{let{useSearchEngine:Q}=await import("@stacksjs/search-engine");await Q().deleteDocument($,Z)}catch(Q){h.warn(`[orm/search] Failed to remove ${J}#${Z}: ${Q.message}`)}}function vH($){let Z={},J=$.table,Q=$.traits;if(!Q)return Z;if(Q.taggable)Z._taggable=f9(J);if(Q.categorizable)Z._categorizable=M9(J);if(Q.commentable)Z._commentable=g9(J);if(Q.billable)Z._billable=N3(J);if(Q.likeable){let Y=typeof Q.likeable==="object"?Q.likeable:void 0;Z._likeable=x3(J,Y)}let X=Q.useAuth||Q.authenticatable;if(typeof X==="object"&&X&&"useTwoFactor"in X&&X.useTwoFactor)Z._twoFactor=I3();return Z}function bH($,Z,J){let Q=P3($,Z.primaryKey||"id"),X=S3(J),Y=Z,G=Z.name.toLowerCase(),V=Z.traits?.observe!=null&&Z.traits?.observe!==!1,U=async(H)=>{if(!V||U0())return!0;try{let{dispatchAsync:T}=await import("@stacksjs/events"),D=await T(`${G}:restoring`,{id:H});if(Array.isArray(D)&&D.some((q)=>q===!1))return!1}catch(T){if(T?.code!=="MODULE_NOT_FOUND")console.error(`[ORM] Before-event '${G}:restoring' handler error:`,T)}return!0},W=async(H)=>{if(!V||U0())return;try{let{dispatch:T}=await import("@stacksjs/events");await T(`${G}:restored`,{id:H})}catch(T){if(T?.code!=="MODULE_NOT_FOUND")console.error(`[ORM] Event '${G}:restored' handler error:`,T)}},B=process.env.STACKS_ORM_CASCADE_SWALLOW!=="true",z=async(H)=>{if(!X.cascade?.length||!B){let D=await Q.softDelete(H);if(D&&X.cascade?.length)await U8(Y,X,H,"softDelete");return D}let{db:T}=await import("@stacksjs/database");return await T.transaction(async()=>{let D=await Q.softDelete(H);if(D)await U8(Y,X,H,"softDelete");return D})},L=async(H)=>{if(!await U(H))return!1;if(!X.cascade?.length||!B){let O=await Q.restore(H);if(O){if(X.cascade?.length)await U8(Y,X,H,"restore");await W(H)}return O}let{db:D}=await import("@stacksjs/database"),q=await D.transaction(async()=>{let O=await Q.restore(H);if(O)await U8(Y,X,H,"restore");return O});if(q)await W(H);return q};$.softDelete=z,$.restore=L,$.forceDelete=Q.forceDelete,$.withTrashed=Q.withTrashed,$.onlyTrashed=Q.onlyTrashed,$.delete=z}function jH($){if($==null)return $;if(Array.isArray($))return $.map(jH);if(typeof $!=="object")return $;if(typeof $.toJSON==="function")return $.toJSON();if($._attributes&&typeof $._attributes==="object")return $._attributes;return $}import{log as fH}from"@stacksjs/logging";import{path as z0}from"@stacksjs/path";import{fs as L8}from"@stacksjs/storage";function L0($){return $.replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/(\d)([A-Za-z])/g,"$1_$2").toLowerCase()}function MH($){let Z=typeof $.type==="string"?$.type.toLowerCase():"",J=(()=>{switch(Z){case"string":case"text":case"longtext":case"mediumtext":case"tinytext":case"char":case"varchar":case"enum":case"uuid":case"date":case"datetime":case"timestamp":case"timestamptz":case"time":case"year":return"string";case"integer":case"int":case"tinyint":case"smallint":case"mediumint":case"float":case"double":case"decimal":case"numeric":return"number";case"bigint":return"number | bigint";case"boolean":case"bool":return"boolean";case"json":case"jsonb":return"unknown";case"binary":case"blob":case"bytea":return"Uint8Array";default:return"unknown"}})();return $.nullable===!0?`${J} | null`:J}function _H($){let Z={},J=$.belongsTo;if(!J)return Z;let Q=Array.isArray(J)?J:Object.keys(J);for(let X of Q)Z[`${L0(X)}_id`]="number";return Z}function gH($,Z){let[J,Q]=[L0($),L0(Z)].sort();return`${J}_${Q}`}function hH($,Z){let J=Z.belongsToMany;if(!J)return[];let Q=[],X=Array.isArray(J)?J:[];for(let Y of X){let G,V,U,W;if(typeof Y==="string")G=Y;else if(Y&&typeof Y==="object"&&"model"in Y){let H=Y;G=H.model,V=H.pivotTable,U=H.firstForeignKey,W=H.secondForeignKey}else continue;let B=V??gH($,G),z=U??`${L0($)}_id`,L=W??`${L0(G)}_id`;Q.push({table:B,columns:{id:"number",[z]:"number",[L]:"number",created_at:"string",updated_at:"string | null"}})}return Q}function mH($){let Z={id:"number"},J=$.traits??{};if(J.useUuid)Z.uuid="string";if((J.useTimestamps??J.timestampable)!==!1)Z.created_at="string",Z.updated_at="string | null";if(J.useSoftDeletes??J.softDeletable)Z.deleted_at="string | null";return Z}function uH($){let Z={},J=$.attributes??{};for(let[Q,X]of Object.entries(J))Z[L0(Q)]=MH(X);return Z}function c3($,Z){let J=Object.entries(Z).map(([Q,X])=>` ${Q}: ${X}`).join(`
11
+ `+R})}let M=Math.floor((typeof O==="number"?O:Date.now())/1000)-L.timestamp;if(T>0&&M>T)throw new a.StripeSignatureVerificationError(z,B,{message:"Timestamp outside the tolerance zone"});return!0}function G(B,z){if(typeof B!=="string")return null;return B.split(",").reduce((L,H)=>{let T=H.split("=");if(T[0]==="t")L.timestamp=parseInt(T[1],10);if(T[0]===z)L.signatures.push(T[1]);return L},{timestamp:-1,signatures:[]})}let V=null;function U(){if(!V)V=$.createDefaultCryptoProvider();return V}function W(B){if(!B)throw new a.StripeError({message:"Options are required"});let z=Math.floor(B.timestamp)||Math.floor(Date.now()/1000),L=B.scheme||J.EXPECTED_SCHEME,H=B.cryptoProvider||U(),T=`${z}.${B.payload}`;return{...B,timestamp:z,scheme:L,cryptoProvider:H,payloadString:T,generateHeaderString:(q)=>{return`t=${z},${L}=${q}`}}}return Z.signature=J,Z}Y1.createWebhooks=CU});var U1=K((B1)=>{Object.defineProperty(B1,"__esModule",{value:!0});B1.ApiMajorVersion=B1.ApiVersion=void 0;B1.ApiVersion="2026-03-25.dahlia";B1.ApiMajorVersion="dahlia"});var K1=K((z1)=>{Object.defineProperty(z1,"__esModule",{value:!0});z1.resourceNamespace=void 0;function AU($,Z){for(let J in Z){if(!Object.prototype.hasOwnProperty.call(Z,J))continue;let Q=J[0].toLowerCase()+J.substring(1),X=new Z[J]($);this[Q]=X}}function NU($,Z){return function(J){return new AU(J,Z)}}z1.resourceNamespace=NU});var D1=K((w1)=>{Object.defineProperty(w1,"__esModule",{value:!0});w1.AccountLinks=void 0;var H1=w(),xU=H1.StripeResource.method;w1.AccountLinks=H1.StripeResource.extend({create:xU({method:"POST",fullPath:"/v2/core/account_links"})})});var C1=K((E1)=>{Object.defineProperty(E1,"__esModule",{value:!0});E1.AccountTokens=void 0;var q1=w(),O1=q1.StripeResource.method;E1.AccountTokens=q1.StripeResource.extend({create:O1({method:"POST",fullPath:"/v2/core/account_tokens",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),retrieve:O1({method:"GET",fullPath:"/v2/core/account_tokens/{id}"})})});var x1=K((A1)=>{Object.defineProperty(A1,"__esModule",{value:!0});A1.Accounts=void 0;var k1=w(),J0=k1.StripeResource.method;A1.Accounts=k1.StripeResource.extend({retrieve:J0({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}"}),list:J0({method:"GET",fullPath:"/v1/financial_connections/accounts",methodType:"list"}),disconnect:J0({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/disconnect"}),listOwners:J0({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}/owners",methodType:"list"}),refresh:J0({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/refresh"}),subscribe:J0({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/subscribe"}),unsubscribe:J0({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/unsubscribe"})})});var R1=K((P1)=>{Object.defineProperty(P1,"__esModule",{value:!0});P1.Persons=void 0;var I1=w(),u0=I1.StripeResource.method;P1.Persons=I1.StripeResource.extend({create:u0({method:"POST",fullPath:"/v2/core/accounts/{account_id}/persons",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),retrieve:u0({method:"GET",fullPath:"/v2/core/accounts/{account_id}/persons/{id}",responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),update:u0({method:"POST",fullPath:"/v2/core/accounts/{account_id}/persons/{id}",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),list:u0({method:"GET",fullPath:"/v2/core/accounts/{account_id}/persons",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}),del:u0({method:"DELETE",fullPath:"/v2/core/accounts/{account_id}/persons/{id}"})})});var f1=K((b1)=>{Object.defineProperty(b1,"__esModule",{value:!0});b1.PersonTokens=void 0;var v1=w(),y1=v1.StripeResource.method;b1.PersonTokens=v1.StripeResource.extend({create:y1({method:"POST",fullPath:"/v2/core/accounts/{account_id}/person_tokens",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),retrieve:y1({method:"GET",fullPath:"/v2/core/accounts/{account_id}/person_tokens/{id}"})})});var g1=K((M1)=>{Object.defineProperty(M1,"__esModule",{value:!0});M1.Accounts=void 0;var d$=w(),IU=R1(),PU=f1(),c0=d$.StripeResource.method;M1.Accounts=d$.StripeResource.extend({constructor:function(...$){d$.StripeResource.apply(this,$),this.persons=new IU.Persons(...$),this.personTokens=new PU.PersonTokens(...$)},create:c0({method:"POST",fullPath:"/v2/core/accounts",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}},responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),retrieve:c0({method:"GET",fullPath:"/v2/core/accounts/{id}",responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),update:c0({method:"POST",fullPath:"/v2/core/accounts/{id}",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}},responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),list:c0({method:"GET",fullPath:"/v2/core/accounts",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}}}}),close:c0({method:"POST",fullPath:"/v2/core/accounts/{id}/close",responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}})})});var n1=K((u1)=>{Object.defineProperty(u1,"__esModule",{value:!0});u1.ActiveEntitlements=void 0;var m1=w(),h1=m1.StripeResource.method;u1.ActiveEntitlements=m1.StripeResource.extend({retrieve:h1({method:"GET",fullPath:"/v1/entitlements/active_entitlements/{id}"}),list:h1({method:"GET",fullPath:"/v1/entitlements/active_entitlements",methodType:"list"})})});var i1=K((p1)=>{Object.defineProperty(p1,"__esModule",{value:!0});p1.Alerts=void 0;var l1=w(),D0=l1.StripeResource.method;p1.Alerts=l1.StripeResource.extend({create:D0({method:"POST",fullPath:"/v1/billing/alerts"}),retrieve:D0({method:"GET",fullPath:"/v1/billing/alerts/{id}"}),list:D0({method:"GET",fullPath:"/v1/billing/alerts",methodType:"list"}),activate:D0({method:"POST",fullPath:"/v1/billing/alerts/{id}/activate"}),archive:D0({method:"POST",fullPath:"/v1/billing/alerts/{id}/archive"}),deactivate:D0({method:"POST",fullPath:"/v1/billing/alerts/{id}/deactivate"})})});var r1=K((o1)=>{Object.defineProperty(o1,"__esModule",{value:!0});o1.Associations=void 0;var a1=w(),SU=a1.StripeResource.method;o1.Associations=a1.StripeResource.extend({find:SU({method:"GET",fullPath:"/v1/tax/associations/find"})})});var Z4=K((e1)=>{Object.defineProperty(e1,"__esModule",{value:!0});e1.Authorizations=void 0;var t1=w(),n0=t1.StripeResource.method;e1.Authorizations=t1.StripeResource.extend({retrieve:n0({method:"GET",fullPath:"/v1/issuing/authorizations/{authorization}",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),update:n0({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),list:n0({method:"GET",fullPath:"/v1/issuing/authorizations",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}),approve:n0({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/approve",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),decline:n0({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/decline",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})})});var Y4=K((Q4)=>{Object.defineProperty(Q4,"__esModule",{value:!0});Q4.Authorizations=void 0;var J4=w(),Q0=J4.StripeResource.method;Q4.Authorizations=J4.StripeResource.extend({create:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations",requestSchema:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),capture:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/capture",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),expire:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/expire",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),finalizeAmount:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount",requestSchema:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),increment:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/increment",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),respond:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),reverse:Q0({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/reverse",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})})});var W4=K((V4)=>{Object.defineProperty(V4,"__esModule",{value:!0});V4.Calculations=void 0;var G4=w(),i$=G4.StripeResource.method;V4.Calculations=G4.StripeResource.extend({create:i$({method:"POST",fullPath:"/v1/tax/calculations"}),retrieve:i$({method:"GET",fullPath:"/v1/tax/calculations/{calculation}"}),listLineItems:i$({method:"GET",fullPath:"/v1/tax/calculations/{calculation}/line_items",methodType:"list"})})});var K4=K((z4)=>{Object.defineProperty(z4,"__esModule",{value:!0});z4.Cardholders=void 0;var U4=w(),S8=U4.StripeResource.method;z4.Cardholders=U4.StripeResource.extend({create:S8({method:"POST",fullPath:"/v1/issuing/cardholders"}),retrieve:S8({method:"GET",fullPath:"/v1/issuing/cardholders/{cardholder}"}),update:S8({method:"POST",fullPath:"/v1/issuing/cardholders/{cardholder}"}),list:S8({method:"GET",fullPath:"/v1/issuing/cardholders",methodType:"list"})})});var D4=K((w4)=>{Object.defineProperty(w4,"__esModule",{value:!0});w4.Cards=void 0;var H4=w(),R8=H4.StripeResource.method;w4.Cards=H4.StripeResource.extend({create:R8({method:"POST",fullPath:"/v1/issuing/cards"}),retrieve:R8({method:"GET",fullPath:"/v1/issuing/cards/{card}"}),update:R8({method:"POST",fullPath:"/v1/issuing/cards/{card}"}),list:R8({method:"GET",fullPath:"/v1/issuing/cards",methodType:"list"})})});var F4=K((q4)=>{Object.defineProperty(q4,"__esModule",{value:!0});q4.Cards=void 0;var O4=w(),l0=O4.StripeResource.method;q4.Cards=O4.StripeResource.extend({deliverCard:l0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/deliver"}),failCard:l0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/fail"}),returnCard:l0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/return"}),shipCard:l0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/ship"}),submitCard:l0({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/submit"})})});var N4=K((k4)=>{Object.defineProperty(k4,"__esModule",{value:!0});k4.Configurations=void 0;var C4=w(),y8=C4.StripeResource.method;k4.Configurations=C4.StripeResource.extend({create:y8({method:"POST",fullPath:"/v1/billing_portal/configurations"}),retrieve:y8({method:"GET",fullPath:"/v1/billing_portal/configurations/{configuration}"}),update:y8({method:"POST",fullPath:"/v1/billing_portal/configurations/{configuration}"}),list:y8({method:"GET",fullPath:"/v1/billing_portal/configurations",methodType:"list"})})});var S4=K((I4)=>{Object.defineProperty(I4,"__esModule",{value:!0});I4.Configurations=void 0;var x4=w(),p0=x4.StripeResource.method;I4.Configurations=x4.StripeResource.extend({create:p0({method:"POST",fullPath:"/v1/terminal/configurations"}),retrieve:p0({method:"GET",fullPath:"/v1/terminal/configurations/{configuration}"}),update:p0({method:"POST",fullPath:"/v1/terminal/configurations/{configuration}"}),list:p0({method:"GET",fullPath:"/v1/terminal/configurations",methodType:"list"}),del:p0({method:"DELETE",fullPath:"/v1/terminal/configurations/{configuration}"})})});var b4=K((y4)=>{Object.defineProperty(y4,"__esModule",{value:!0});y4.ConfirmationTokens=void 0;var R4=w(),RU=R4.StripeResource.method;y4.ConfirmationTokens=R4.StripeResource.extend({create:RU({method:"POST",fullPath:"/v1/test_helpers/confirmation_tokens"})})});var _4=K((f4)=>{Object.defineProperty(f4,"__esModule",{value:!0});f4.ConnectionTokens=void 0;var j4=w(),yU=j4.StripeResource.method;f4.ConnectionTokens=j4.StripeResource.extend({create:yU({method:"POST",fullPath:"/v1/terminal/connection_tokens"})})});var u4=K((h4)=>{Object.defineProperty(h4,"__esModule",{value:!0});h4.CreditBalanceSummary=void 0;var g4=w(),vU=g4.StripeResource.method;h4.CreditBalanceSummary=g4.StripeResource.extend({retrieve:vU({method:"GET",fullPath:"/v1/billing/credit_balance_summary"})})});var d4=K((l4)=>{Object.defineProperty(l4,"__esModule",{value:!0});l4.CreditBalanceTransactions=void 0;var n4=w(),c4=n4.StripeResource.method;l4.CreditBalanceTransactions=n4.StripeResource.extend({retrieve:c4({method:"GET",fullPath:"/v1/billing/credit_balance_transactions/{id}"}),list:c4({method:"GET",fullPath:"/v1/billing/credit_balance_transactions",methodType:"list"})})});var s4=K((a4)=>{Object.defineProperty(a4,"__esModule",{value:!0});a4.CreditGrants=void 0;var i4=w(),O0=i4.StripeResource.method;a4.CreditGrants=i4.StripeResource.extend({create:O0({method:"POST",fullPath:"/v1/billing/credit_grants"}),retrieve:O0({method:"GET",fullPath:"/v1/billing/credit_grants/{id}"}),update:O0({method:"POST",fullPath:"/v1/billing/credit_grants/{id}"}),list:O0({method:"GET",fullPath:"/v1/billing/credit_grants",methodType:"list"}),expire:O0({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/expire"}),voidGrant:O0({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/void"})})});var $6=K((t4)=>{Object.defineProperty(t4,"__esModule",{value:!0});t4.CreditReversals=void 0;var r4=w(),a$=r4.StripeResource.method;t4.CreditReversals=r4.StripeResource.extend({create:a$({method:"POST",fullPath:"/v1/treasury/credit_reversals"}),retrieve:a$({method:"GET",fullPath:"/v1/treasury/credit_reversals/{credit_reversal}"}),list:a$({method:"GET",fullPath:"/v1/treasury/credit_reversals",methodType:"list"})})});var X6=K((J6)=>{Object.defineProperty(J6,"__esModule",{value:!0});J6.Customers=void 0;var Z6=w(),bU=Z6.StripeResource.method;J6.Customers=Z6.StripeResource.extend({fundCashBalance:bU({method:"POST",fullPath:"/v1/test_helpers/customers/{customer}/fund_cash_balance"})})});var B6=K((G6)=>{Object.defineProperty(G6,"__esModule",{value:!0});G6.DebitReversals=void 0;var Y6=w(),o$=Y6.StripeResource.method;G6.DebitReversals=Y6.StripeResource.extend({create:o$({method:"POST",fullPath:"/v1/treasury/debit_reversals"}),retrieve:o$({method:"GET",fullPath:"/v1/treasury/debit_reversals/{debit_reversal}"}),list:o$({method:"GET",fullPath:"/v1/treasury/debit_reversals",methodType:"list"})})});var L6=K((U6)=>{Object.defineProperty(U6,"__esModule",{value:!0});U6.Disputes=void 0;var W6=w(),d0=W6.StripeResource.method;U6.Disputes=W6.StripeResource.extend({create:d0({method:"POST",fullPath:"/v1/issuing/disputes"}),retrieve:d0({method:"GET",fullPath:"/v1/issuing/disputes/{dispute}"}),update:d0({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}"}),list:d0({method:"GET",fullPath:"/v1/issuing/disputes",methodType:"list"}),submit:d0({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}/submit"})})});var D6=K((w6)=>{Object.defineProperty(w6,"__esModule",{value:!0});w6.EarlyFraudWarnings=void 0;var H6=w(),K6=H6.StripeResource.method;w6.EarlyFraudWarnings=H6.StripeResource.extend({retrieve:K6({method:"GET",fullPath:"/v1/radar/early_fraud_warnings/{early_fraud_warning}"}),list:K6({method:"GET",fullPath:"/v1/radar/early_fraud_warnings",methodType:"list"})})});var F6=K((q6)=>{Object.defineProperty(q6,"__esModule",{value:!0});q6.EventDestinations=void 0;var O6=w(),o=O6.StripeResource.method;q6.EventDestinations=O6.StripeResource.extend({create:o({method:"POST",fullPath:"/v2/core/event_destinations"}),retrieve:o({method:"GET",fullPath:"/v2/core/event_destinations/{id}"}),update:o({method:"POST",fullPath:"/v2/core/event_destinations/{id}"}),list:o({method:"GET",fullPath:"/v2/core/event_destinations",methodType:"list"}),del:o({method:"DELETE",fullPath:"/v2/core/event_destinations/{id}"}),disable:o({method:"POST",fullPath:"/v2/core/event_destinations/{id}/disable"}),enable:o({method:"POST",fullPath:"/v2/core/event_destinations/{id}/enable"}),ping:o({method:"POST",fullPath:"/v2/core/event_destinations/{id}/ping"})})});var N6=K((k6)=>{Object.defineProperty(k6,"__esModule",{value:!0});k6.Events=void 0;var C6=w(),s$=C6.StripeResource.method;k6.Events=C6.StripeResource.extend({retrieve(...$){return s$({method:"GET",fullPath:"/v2/core/events/{id}",transformResponseData:(J)=>{return this.addFetchRelatedObjectIfNeeded(J)}}).apply(this,$)},list(...$){return s$({method:"GET",fullPath:"/v2/core/events",methodType:"list",transformResponseData:(J)=>{return{...J,data:J.data.map(this.addFetchRelatedObjectIfNeeded.bind(this))}}}).apply(this,$)},addFetchRelatedObjectIfNeeded($){if(!$.related_object||!$.related_object.url)return $;return{...$,fetchRelatedObject:()=>s$({method:"GET",fullPath:$.related_object.url}).apply(this,[{stripeContext:$.context,headers:{"Stripe-Request-Trigger":`event=${$.id}`}}])}}})});var S6=K((I6)=>{Object.defineProperty(I6,"__esModule",{value:!0});I6.Features=void 0;var x6=w(),v8=x6.StripeResource.method;I6.Features=x6.StripeResource.extend({create:v8({method:"POST",fullPath:"/v1/entitlements/features"}),retrieve:v8({method:"GET",fullPath:"/v1/entitlements/features/{id}"}),update:v8({method:"POST",fullPath:"/v1/entitlements/features/{id}"}),list:v8({method:"GET",fullPath:"/v1/entitlements/features",methodType:"list"})})});var b6=K((y6)=>{Object.defineProperty(y6,"__esModule",{value:!0});y6.FinancialAccounts=void 0;var R6=w(),X0=R6.StripeResource.method;y6.FinancialAccounts=R6.StripeResource.extend({create:X0({method:"POST",fullPath:"/v1/treasury/financial_accounts"}),retrieve:X0({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),update:X0({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),list:X0({method:"GET",fullPath:"/v1/treasury/financial_accounts",methodType:"list"}),close:X0({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}/close"}),retrieveFeatures:X0({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"}),updateFeatures:X0({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"})})});var _6=K((f6)=>{Object.defineProperty(f6,"__esModule",{value:!0});f6.InboundTransfers=void 0;var j6=w(),r$=j6.StripeResource.method;f6.InboundTransfers=j6.StripeResource.extend({fail:r$({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/fail"}),returnInboundTransfer:r$({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/return"}),succeed:r$({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/succeed"})})});var u6=K((h6)=>{Object.defineProperty(h6,"__esModule",{value:!0});h6.InboundTransfers=void 0;var g6=w(),b8=g6.StripeResource.method;h6.InboundTransfers=g6.StripeResource.extend({create:b8({method:"POST",fullPath:"/v1/treasury/inbound_transfers"}),retrieve:b8({method:"GET",fullPath:"/v1/treasury/inbound_transfers/{id}"}),list:b8({method:"GET",fullPath:"/v1/treasury/inbound_transfers",methodType:"list"}),cancel:b8({method:"POST",fullPath:"/v1/treasury/inbound_transfers/{inbound_transfer}/cancel"})})});var p6=K((n6)=>{Object.defineProperty(n6,"__esModule",{value:!0});n6.Locations=void 0;var c6=w(),i0=c6.StripeResource.method;n6.Locations=c6.StripeResource.extend({create:i0({method:"POST",fullPath:"/v1/terminal/locations"}),retrieve:i0({method:"GET",fullPath:"/v1/terminal/locations/{location}"}),update:i0({method:"POST",fullPath:"/v1/terminal/locations/{location}"}),list:i0({method:"GET",fullPath:"/v1/terminal/locations",methodType:"list"}),del:i0({method:"DELETE",fullPath:"/v1/terminal/locations/{location}"})})});var o6=K((i6)=>{Object.defineProperty(i6,"__esModule",{value:!0});i6.MeterEventAdjustments=void 0;var d6=w(),jU=d6.StripeResource.method;i6.MeterEventAdjustments=d6.StripeResource.extend({create:jU({method:"POST",fullPath:"/v1/billing/meter_event_adjustments"})})});var e6=K((r6)=>{Object.defineProperty(r6,"__esModule",{value:!0});r6.MeterEventAdjustments=void 0;var s6=w(),fU=s6.StripeResource.method;r6.MeterEventAdjustments=s6.StripeResource.extend({create:fU({method:"POST",fullPath:"/v2/billing/meter_event_adjustments"})})});var Q7=K((Z7)=>{Object.defineProperty(Z7,"__esModule",{value:!0});Z7.MeterEventSession=void 0;var $7=w(),MU=$7.StripeResource.method;Z7.MeterEventSession=$7.StripeResource.extend({create:MU({method:"POST",fullPath:"/v2/billing/meter_event_session"})})});var V7=K((Y7)=>{Object.defineProperty(Y7,"__esModule",{value:!0});Y7.MeterEventStream=void 0;var X7=w(),_U=X7.StripeResource.method;Y7.MeterEventStream=X7.StripeResource.extend({create:_U({method:"POST",fullPath:"/v2/billing/meter_event_stream",host:"meter-events.stripe.com"})})});var z7=K((W7)=>{Object.defineProperty(W7,"__esModule",{value:!0});W7.MeterEvents=void 0;var B7=w(),gU=B7.StripeResource.method;W7.MeterEvents=B7.StripeResource.extend({create:gU({method:"POST",fullPath:"/v1/billing/meter_events"})})});var w7=K((K7)=>{Object.defineProperty(K7,"__esModule",{value:!0});K7.MeterEvents=void 0;var L7=w(),hU=L7.StripeResource.method;K7.MeterEvents=L7.StripeResource.extend({create:hU({method:"POST",fullPath:"/v2/billing/meter_events"})})});var q7=K((D7)=>{Object.defineProperty(D7,"__esModule",{value:!0});D7.Meters=void 0;var T7=w(),Y0=T7.StripeResource.method;D7.Meters=T7.StripeResource.extend({create:Y0({method:"POST",fullPath:"/v1/billing/meters"}),retrieve:Y0({method:"GET",fullPath:"/v1/billing/meters/{id}"}),update:Y0({method:"POST",fullPath:"/v1/billing/meters/{id}"}),list:Y0({method:"GET",fullPath:"/v1/billing/meters",methodType:"list"}),deactivate:Y0({method:"POST",fullPath:"/v1/billing/meters/{id}/deactivate"}),listEventSummaries:Y0({method:"GET",fullPath:"/v1/billing/meters/{id}/event_summaries",methodType:"list"}),reactivate:Y0({method:"POST",fullPath:"/v1/billing/meters/{id}/reactivate"})})});var k7=K((F7)=>{Object.defineProperty(F7,"__esModule",{value:!0});F7.OnboardingLinks=void 0;var E7=w(),mU=E7.StripeResource.method;F7.OnboardingLinks=E7.StripeResource.extend({create:mU({method:"POST",fullPath:"/v1/terminal/onboarding_links"})})});var I7=K((N7)=>{Object.defineProperty(N7,"__esModule",{value:!0});N7.Orders=void 0;var A7=w(),a0=A7.StripeResource.method;N7.Orders=A7.StripeResource.extend({create:a0({method:"POST",fullPath:"/v1/climate/orders",requestSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),retrieve:a0({method:"GET",fullPath:"/v1/climate/orders/{order}",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),update:a0({method:"POST",fullPath:"/v1/climate/orders/{order}",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),list:a0({method:"GET",fullPath:"/v1/climate/orders",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}}}}),cancel:a0({method:"POST",fullPath:"/v1/climate/orders/{order}/cancel",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}})})});var y7=K((S7)=>{Object.defineProperty(S7,"__esModule",{value:!0});S7.OutboundPayments=void 0;var P7=w(),j8=P7.StripeResource.method;S7.OutboundPayments=P7.StripeResource.extend({update:j8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}"}),fail:j8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/fail"}),post:j8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/post"}),returnOutboundPayment:j8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/return"})})});var f7=K((b7)=>{Object.defineProperty(b7,"__esModule",{value:!0});b7.OutboundPayments=void 0;var v7=w(),f8=v7.StripeResource.method;b7.OutboundPayments=v7.StripeResource.extend({create:f8({method:"POST",fullPath:"/v1/treasury/outbound_payments"}),retrieve:f8({method:"GET",fullPath:"/v1/treasury/outbound_payments/{id}"}),list:f8({method:"GET",fullPath:"/v1/treasury/outbound_payments",methodType:"list"}),cancel:f8({method:"POST",fullPath:"/v1/treasury/outbound_payments/{id}/cancel"})})});var h7=K((_7)=>{Object.defineProperty(_7,"__esModule",{value:!0});_7.OutboundTransfers=void 0;var M7=w(),M8=M7.StripeResource.method;_7.OutboundTransfers=M7.StripeResource.extend({update:M8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}"}),fail:M8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail"}),post:M8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post"}),returnOutboundTransfer:M8({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return"})})});var n7=K((u7)=>{Object.defineProperty(u7,"__esModule",{value:!0});u7.OutboundTransfers=void 0;var m7=w(),_8=m7.StripeResource.method;u7.OutboundTransfers=m7.StripeResource.extend({create:_8({method:"POST",fullPath:"/v1/treasury/outbound_transfers"}),retrieve:_8({method:"GET",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}"}),list:_8({method:"GET",fullPath:"/v1/treasury/outbound_transfers",methodType:"list"}),cancel:_8({method:"POST",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}/cancel"})})});var i7=K((p7)=>{Object.defineProperty(p7,"__esModule",{value:!0});p7.PaymentEvaluations=void 0;var l7=w(),uU=l7.StripeResource.method;p7.PaymentEvaluations=l7.StripeResource.extend({create:uU({method:"POST",fullPath:"/v1/radar/payment_evaluations"})})});var r7=K((o7)=>{Object.defineProperty(o7,"__esModule",{value:!0});o7.PersonalizationDesigns=void 0;var a7=w(),g8=a7.StripeResource.method;o7.PersonalizationDesigns=a7.StripeResource.extend({create:g8({method:"POST",fullPath:"/v1/issuing/personalization_designs"}),retrieve:g8({method:"GET",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),update:g8({method:"POST",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),list:g8({method:"GET",fullPath:"/v1/issuing/personalization_designs",methodType:"list"})})});var ZJ=K((e7)=>{Object.defineProperty(e7,"__esModule",{value:!0});e7.PersonalizationDesigns=void 0;var t7=w(),t$=t7.StripeResource.method;e7.PersonalizationDesigns=t7.StripeResource.extend({activate:t$({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate"}),deactivate:t$({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate"}),reject:t$({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject"})})});var GJ=K((XJ)=>{Object.defineProperty(XJ,"__esModule",{value:!0});XJ.PhysicalBundles=void 0;var QJ=w(),JJ=QJ.StripeResource.method;XJ.PhysicalBundles=QJ.StripeResource.extend({retrieve:JJ({method:"GET",fullPath:"/v1/issuing/physical_bundles/{physical_bundle}"}),list:JJ({method:"GET",fullPath:"/v1/issuing/physical_bundles",methodType:"list"})})});var zJ=K((WJ)=>{Object.defineProperty(WJ,"__esModule",{value:!0});WJ.Products=void 0;var BJ=w(),VJ=BJ.StripeResource.method;WJ.Products=BJ.StripeResource.extend({retrieve:VJ({method:"GET",fullPath:"/v1/climate/products/{product}",responseSchema:{kind:"object",fields:{metric_tons_available:{kind:"decimal_string"}}}}),list:VJ({method:"GET",fullPath:"/v1/climate/products",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{metric_tons_available:{kind:"decimal_string"}}}}}}})})});var wJ=K((KJ)=>{Object.defineProperty(KJ,"__esModule",{value:!0});KJ.Readers=void 0;var LJ=w(),f=LJ.StripeResource.method;KJ.Readers=LJ.StripeResource.extend({create:f({method:"POST",fullPath:"/v1/terminal/readers"}),retrieve:f({method:"GET",fullPath:"/v1/terminal/readers/{reader}"}),update:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}"}),list:f({method:"GET",fullPath:"/v1/terminal/readers",methodType:"list"}),del:f({method:"DELETE",fullPath:"/v1/terminal/readers/{reader}"}),cancelAction:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/cancel_action"}),collectInputs:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/collect_inputs"}),collectPaymentMethod:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/collect_payment_method"}),confirmPaymentIntent:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/confirm_payment_intent"}),processPaymentIntent:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_payment_intent"}),processSetupIntent:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_setup_intent"}),refundPayment:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/refund_payment"}),setReaderDisplay:f({method:"POST",fullPath:"/v1/terminal/readers/{reader}/set_reader_display"})})});var qJ=K((DJ)=>{Object.defineProperty(DJ,"__esModule",{value:!0});DJ.Readers=void 0;var TJ=w(),e$=TJ.StripeResource.method;DJ.Readers=TJ.StripeResource.extend({presentPaymentMethod:e$({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/present_payment_method"}),succeedInputCollection:e$({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/succeed_input_collection"}),timeoutInputCollection:e$({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/timeout_input_collection"})})});var kJ=K((FJ)=>{Object.defineProperty(FJ,"__esModule",{value:!0});FJ.ReceivedCredits=void 0;var EJ=w(),cU=EJ.StripeResource.method;FJ.ReceivedCredits=EJ.StripeResource.extend({create:cU({method:"POST",fullPath:"/v1/test_helpers/treasury/received_credits"})})});var PJ=K((xJ)=>{Object.defineProperty(xJ,"__esModule",{value:!0});xJ.ReceivedCredits=void 0;var NJ=w(),AJ=NJ.StripeResource.method;xJ.ReceivedCredits=NJ.StripeResource.extend({retrieve:AJ({method:"GET",fullPath:"/v1/treasury/received_credits/{id}"}),list:AJ({method:"GET",fullPath:"/v1/treasury/received_credits",methodType:"list"})})});var vJ=K((RJ)=>{Object.defineProperty(RJ,"__esModule",{value:!0});RJ.ReceivedDebits=void 0;var SJ=w(),nU=SJ.StripeResource.method;RJ.ReceivedDebits=SJ.StripeResource.extend({create:nU({method:"POST",fullPath:"/v1/test_helpers/treasury/received_debits"})})});var _J=K((fJ)=>{Object.defineProperty(fJ,"__esModule",{value:!0});fJ.ReceivedDebits=void 0;var jJ=w(),bJ=jJ.StripeResource.method;fJ.ReceivedDebits=jJ.StripeResource.extend({retrieve:bJ({method:"GET",fullPath:"/v1/treasury/received_debits/{id}"}),list:bJ({method:"GET",fullPath:"/v1/treasury/received_debits",methodType:"list"})})});var uJ=K((hJ)=>{Object.defineProperty(hJ,"__esModule",{value:!0});hJ.Refunds=void 0;var gJ=w(),lU=gJ.StripeResource.method;hJ.Refunds=gJ.StripeResource.extend({expire:lU({method:"POST",fullPath:"/v1/test_helpers/refunds/{refund}/expire"})})});var pJ=K((nJ)=>{Object.defineProperty(nJ,"__esModule",{value:!0});nJ.Registrations=void 0;var cJ=w(),h8=cJ.StripeResource.method;nJ.Registrations=cJ.StripeResource.extend({create:h8({method:"POST",fullPath:"/v1/tax/registrations"}),retrieve:h8({method:"GET",fullPath:"/v1/tax/registrations/{id}"}),update:h8({method:"POST",fullPath:"/v1/tax/registrations/{id}"}),list:h8({method:"GET",fullPath:"/v1/tax/registrations",methodType:"list"})})});var oJ=K((iJ)=>{Object.defineProperty(iJ,"__esModule",{value:!0});iJ.ReportRuns=void 0;var dJ=w(),$9=dJ.StripeResource.method;iJ.ReportRuns=dJ.StripeResource.extend({create:$9({method:"POST",fullPath:"/v1/reporting/report_runs"}),retrieve:$9({method:"GET",fullPath:"/v1/reporting/report_runs/{report_run}"}),list:$9({method:"GET",fullPath:"/v1/reporting/report_runs",methodType:"list"})})});var $5=K((tJ)=>{Object.defineProperty(tJ,"__esModule",{value:!0});tJ.ReportTypes=void 0;var rJ=w(),sJ=rJ.StripeResource.method;tJ.ReportTypes=rJ.StripeResource.extend({retrieve:sJ({method:"GET",fullPath:"/v1/reporting/report_types/{report_type}"}),list:sJ({method:"GET",fullPath:"/v1/reporting/report_types",methodType:"list"})})});var X5=K((J5)=>{Object.defineProperty(J5,"__esModule",{value:!0});J5.Requests=void 0;var Z5=w(),Z9=Z5.StripeResource.method;J5.Requests=Z5.StripeResource.extend({create:Z9({method:"POST",fullPath:"/v1/forwarding/requests"}),retrieve:Z9({method:"GET",fullPath:"/v1/forwarding/requests/{id}"}),list:Z9({method:"GET",fullPath:"/v1/forwarding/requests",methodType:"list"})})});var W5=K((V5)=>{Object.defineProperty(V5,"__esModule",{value:!0});V5.ScheduledQueryRuns=void 0;var G5=w(),Y5=G5.StripeResource.method;V5.ScheduledQueryRuns=G5.StripeResource.extend({retrieve:Y5({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs/{scheduled_query_run}"}),list:Y5({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs",methodType:"list"})})});var K5=K((z5)=>{Object.defineProperty(z5,"__esModule",{value:!0});z5.Secrets=void 0;var U5=w(),m8=U5.StripeResource.method;z5.Secrets=U5.StripeResource.extend({create:m8({method:"POST",fullPath:"/v1/apps/secrets"}),list:m8({method:"GET",fullPath:"/v1/apps/secrets",methodType:"list"}),deleteWhere:m8({method:"POST",fullPath:"/v1/apps/secrets/delete"}),find:m8({method:"GET",fullPath:"/v1/apps/secrets/find"})})});var D5=K((w5)=>{Object.defineProperty(w5,"__esModule",{value:!0});w5.Sessions=void 0;var H5=w(),pU=H5.StripeResource.method;w5.Sessions=H5.StripeResource.extend({create:pU({method:"POST",fullPath:"/v1/billing_portal/sessions"})})});var F5=K((q5)=>{Object.defineProperty(q5,"__esModule",{value:!0});q5.Sessions=void 0;var O5=w(),q0=O5.StripeResource.method;q5.Sessions=O5.StripeResource.extend({create:q0({method:"POST",fullPath:"/v1/checkout/sessions",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),retrieve:q0({method:"GET",fullPath:"/v1/checkout/sessions/{session}",responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),update:q0({method:"POST",fullPath:"/v1/checkout/sessions/{session}",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),list:q0({method:"GET",fullPath:"/v1/checkout/sessions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}),expire:q0({method:"POST",fullPath:"/v1/checkout/sessions/{session}/expire",responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),listLineItems:q0({method:"GET",fullPath:"/v1/checkout/sessions/{session}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}})})});var x5=K((A5)=>{Object.defineProperty(A5,"__esModule",{value:!0});A5.Sessions=void 0;var k5=w(),C5=k5.StripeResource.method;A5.Sessions=k5.StripeResource.extend({create:C5({method:"POST",fullPath:"/v1/financial_connections/sessions"}),retrieve:C5({method:"GET",fullPath:"/v1/financial_connections/sessions/{session}"})})});var y5=K((S5)=>{Object.defineProperty(S5,"__esModule",{value:!0});S5.Settings=void 0;var P5=w(),I5=P5.StripeResource.method;S5.Settings=P5.StripeResource.extend({retrieve:I5({method:"GET",fullPath:"/v1/tax/settings"}),update:I5({method:"POST",fullPath:"/v1/tax/settings"})})});var M5=K((j5)=>{Object.defineProperty(j5,"__esModule",{value:!0});j5.Suppliers=void 0;var b5=w(),v5=b5.StripeResource.method;j5.Suppliers=b5.StripeResource.extend({retrieve:v5({method:"GET",fullPath:"/v1/climate/suppliers/{supplier}"}),list:v5({method:"GET",fullPath:"/v1/climate/suppliers",methodType:"list"})})});var m5=K((g5)=>{Object.defineProperty(g5,"__esModule",{value:!0});g5.TestClocks=void 0;var _5=w(),o0=_5.StripeResource.method;g5.TestClocks=_5.StripeResource.extend({create:o0({method:"POST",fullPath:"/v1/test_helpers/test_clocks"}),retrieve:o0({method:"GET",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),list:o0({method:"GET",fullPath:"/v1/test_helpers/test_clocks",methodType:"list"}),del:o0({method:"DELETE",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),advance:o0({method:"POST",fullPath:"/v1/test_helpers/test_clocks/{test_clock}/advance"})})});var l5=K((c5)=>{Object.defineProperty(c5,"__esModule",{value:!0});c5.Tokens=void 0;var u5=w(),J9=u5.StripeResource.method;c5.Tokens=u5.StripeResource.extend({retrieve:J9({method:"GET",fullPath:"/v1/issuing/tokens/{token}"}),update:J9({method:"POST",fullPath:"/v1/issuing/tokens/{token}"}),list:J9({method:"GET",fullPath:"/v1/issuing/tokens",methodType:"list"})})});var o5=K((i5)=>{Object.defineProperty(i5,"__esModule",{value:!0});i5.TransactionEntries=void 0;var d5=w(),p5=d5.StripeResource.method;i5.TransactionEntries=d5.StripeResource.extend({retrieve:p5({method:"GET",fullPath:"/v1/treasury/transaction_entries/{id}",responseSchema:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}),list:p5({method:"GET",fullPath:"/v1/treasury/transaction_entries",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}})})});var $Q=K((t5)=>{Object.defineProperty(t5,"__esModule",{value:!0});t5.Transactions=void 0;var r5=w(),s5=r5.StripeResource.method;t5.Transactions=r5.StripeResource.extend({retrieve:s5({method:"GET",fullPath:"/v1/financial_connections/transactions/{transaction}"}),list:s5({method:"GET",fullPath:"/v1/financial_connections/transactions",methodType:"list"})})});var XQ=K((JQ)=>{Object.defineProperty(JQ,"__esModule",{value:!0});JQ.Transactions=void 0;var ZQ=w(),Q9=ZQ.StripeResource.method;JQ.Transactions=ZQ.StripeResource.extend({retrieve:Q9({method:"GET",fullPath:"/v1/issuing/transactions/{transaction}",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),update:Q9({method:"POST",fullPath:"/v1/issuing/transactions/{transaction}",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),list:Q9({method:"GET",fullPath:"/v1/issuing/transactions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})})});var BQ=K((GQ)=>{Object.defineProperty(GQ,"__esModule",{value:!0});GQ.Transactions=void 0;var YQ=w(),u8=YQ.StripeResource.method;GQ.Transactions=YQ.StripeResource.extend({retrieve:u8({method:"GET",fullPath:"/v1/tax/transactions/{transaction}"}),createFromCalculation:u8({method:"POST",fullPath:"/v1/tax/transactions/create_from_calculation"}),createReversal:u8({method:"POST",fullPath:"/v1/tax/transactions/create_reversal"}),listLineItems:u8({method:"GET",fullPath:"/v1/tax/transactions/{transaction}/line_items",methodType:"list"})})});var LQ=K((UQ)=>{Object.defineProperty(UQ,"__esModule",{value:!0});UQ.Transactions=void 0;var WQ=w(),X9=WQ.StripeResource.method;UQ.Transactions=WQ.StripeResource.extend({createForceCapture:X9({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_force_capture",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),createUnlinkedRefund:X9({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_unlinked_refund",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),refund:X9({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/{transaction}/refund",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}})})});var DQ=K((wQ)=>{Object.defineProperty(wQ,"__esModule",{value:!0});wQ.Transactions=void 0;var HQ=w(),KQ=HQ.StripeResource.method;wQ.Transactions=HQ.StripeResource.extend({retrieve:KQ({method:"GET",fullPath:"/v1/treasury/transactions/{id}",responseSchema:{kind:"object",fields:{entries:{kind:"nullable",inner:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}}}}}),list:KQ({method:"GET",fullPath:"/v1/treasury/transactions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{entries:{kind:"nullable",inner:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}}}}}}}})})});var FQ=K((qQ)=>{Object.defineProperty(qQ,"__esModule",{value:!0});qQ.ValueListItems=void 0;var OQ=w(),c8=OQ.StripeResource.method;qQ.ValueListItems=OQ.StripeResource.extend({create:c8({method:"POST",fullPath:"/v1/radar/value_list_items"}),retrieve:c8({method:"GET",fullPath:"/v1/radar/value_list_items/{item}"}),list:c8({method:"GET",fullPath:"/v1/radar/value_list_items",methodType:"list"}),del:c8({method:"DELETE",fullPath:"/v1/radar/value_list_items/{item}"})})});var NQ=K((kQ)=>{Object.defineProperty(kQ,"__esModule",{value:!0});kQ.ValueLists=void 0;var CQ=w(),s0=CQ.StripeResource.method;kQ.ValueLists=CQ.StripeResource.extend({create:s0({method:"POST",fullPath:"/v1/radar/value_lists"}),retrieve:s0({method:"GET",fullPath:"/v1/radar/value_lists/{value_list}"}),update:s0({method:"POST",fullPath:"/v1/radar/value_lists/{value_list}"}),list:s0({method:"GET",fullPath:"/v1/radar/value_lists",methodType:"list"}),del:s0({method:"DELETE",fullPath:"/v1/radar/value_lists/{value_list}"})})});var RQ=K((PQ)=>{Object.defineProperty(PQ,"__esModule",{value:!0});PQ.VerificationReports=void 0;var IQ=w(),xQ=IQ.StripeResource.method;PQ.VerificationReports=IQ.StripeResource.extend({retrieve:xQ({method:"GET",fullPath:"/v1/identity/verification_reports/{report}"}),list:xQ({method:"GET",fullPath:"/v1/identity/verification_reports",methodType:"list"})})});var jQ=K((vQ)=>{Object.defineProperty(vQ,"__esModule",{value:!0});vQ.VerificationSessions=void 0;var yQ=w(),E0=yQ.StripeResource.method;vQ.VerificationSessions=yQ.StripeResource.extend({create:E0({method:"POST",fullPath:"/v1/identity/verification_sessions"}),retrieve:E0({method:"GET",fullPath:"/v1/identity/verification_sessions/{session}"}),update:E0({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}"}),list:E0({method:"GET",fullPath:"/v1/identity/verification_sessions",methodType:"list"}),cancel:E0({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/cancel"}),redact:E0({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/redact"})})});var Y9=K((MQ)=>{Object.defineProperty(MQ,"__esModule",{value:!0});MQ.Accounts=void 0;var fQ=w(),I=fQ.StripeResource.method;MQ.Accounts=fQ.StripeResource.extend({create:I({method:"POST",fullPath:"/v1/accounts"}),retrieve($,...Z){if(typeof $==="string")return I({method:"GET",fullPath:"/v1/accounts/{id}"}).apply(this,[$,...Z]);else{if($===null||$===void 0)[].shift.apply([$,...Z]);return I({method:"GET",fullPath:"/v1/account"}).apply(this,[$,...Z])}},update:I({method:"POST",fullPath:"/v1/accounts/{account}"}),list:I({method:"GET",fullPath:"/v1/accounts",methodType:"list"}),del:I({method:"DELETE",fullPath:"/v1/accounts/{account}"}),createExternalAccount:I({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts"}),createLoginLink:I({method:"POST",fullPath:"/v1/accounts/{account}/login_links"}),createPerson:I({method:"POST",fullPath:"/v1/accounts/{account}/persons"}),deleteExternalAccount:I({method:"DELETE",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),deletePerson:I({method:"DELETE",fullPath:"/v1/accounts/{account}/persons/{person}"}),listCapabilities:I({method:"GET",fullPath:"/v1/accounts/{account}/capabilities",methodType:"list"}),listExternalAccounts:I({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts",methodType:"list"}),listPersons:I({method:"GET",fullPath:"/v1/accounts/{account}/persons",methodType:"list"}),reject:I({method:"POST",fullPath:"/v1/accounts/{account}/reject"}),retrieveCurrent:I({method:"GET",fullPath:"/v1/account"}),retrieveCapability:I({method:"GET",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),retrieveExternalAccount:I({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),retrievePerson:I({method:"GET",fullPath:"/v1/accounts/{account}/persons/{person}"}),updateCapability:I({method:"POST",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),updateExternalAccount:I({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),updatePerson:I({method:"POST",fullPath:"/v1/accounts/{account}/persons/{person}"})})});var uQ=K((hQ)=>{Object.defineProperty(hQ,"__esModule",{value:!0});hQ.AccountLinks=void 0;var gQ=w(),dU=gQ.StripeResource.method;hQ.AccountLinks=gQ.StripeResource.extend({create:dU({method:"POST",fullPath:"/v1/account_links"})})});var pQ=K((nQ)=>{Object.defineProperty(nQ,"__esModule",{value:!0});nQ.AccountSessions=void 0;var cQ=w(),iU=cQ.StripeResource.method;nQ.AccountSessions=cQ.StripeResource.extend({create:iU({method:"POST",fullPath:"/v1/account_sessions"})})});var oQ=K((iQ)=>{Object.defineProperty(iQ,"__esModule",{value:!0});iQ.ApplePayDomains=void 0;var dQ=w(),n8=dQ.StripeResource.method;iQ.ApplePayDomains=dQ.StripeResource.extend({create:n8({method:"POST",fullPath:"/v1/apple_pay/domains"}),retrieve:n8({method:"GET",fullPath:"/v1/apple_pay/domains/{domain}"}),list:n8({method:"GET",fullPath:"/v1/apple_pay/domains",methodType:"list"}),del:n8({method:"DELETE",fullPath:"/v1/apple_pay/domains/{domain}"})})});var eQ=K((rQ)=>{Object.defineProperty(rQ,"__esModule",{value:!0});rQ.ApplicationFees=void 0;var sQ=w(),F0=sQ.StripeResource.method;rQ.ApplicationFees=sQ.StripeResource.extend({retrieve:F0({method:"GET",fullPath:"/v1/application_fees/{id}"}),list:F0({method:"GET",fullPath:"/v1/application_fees",methodType:"list"}),createRefund:F0({method:"POST",fullPath:"/v1/application_fees/{id}/refunds"}),listRefunds:F0({method:"GET",fullPath:"/v1/application_fees/{id}/refunds",methodType:"list"}),retrieveRefund:F0({method:"GET",fullPath:"/v1/application_fees/{fee}/refunds/{id}"}),updateRefund:F0({method:"POST",fullPath:"/v1/application_fees/{fee}/refunds/{id}"})})});var QX=K((ZX)=>{Object.defineProperty(ZX,"__esModule",{value:!0});ZX.Balance=void 0;var $X=w(),aU=$X.StripeResource.method;ZX.Balance=$X.StripeResource.extend({retrieve:aU({method:"GET",fullPath:"/v1/balance"})})});var BX=K((GX)=>{Object.defineProperty(GX,"__esModule",{value:!0});GX.BalanceSettings=void 0;var YX=w(),XX=YX.StripeResource.method;GX.BalanceSettings=YX.StripeResource.extend({retrieve:XX({method:"GET",fullPath:"/v1/balance_settings"}),update:XX({method:"POST",fullPath:"/v1/balance_settings"})})});var KX=K((zX)=>{Object.defineProperty(zX,"__esModule",{value:!0});zX.BalanceTransactions=void 0;var UX=w(),WX=UX.StripeResource.method;zX.BalanceTransactions=UX.StripeResource.extend({retrieve:WX({method:"GET",fullPath:"/v1/balance_transactions/{id}"}),list:WX({method:"GET",fullPath:"/v1/balance_transactions",methodType:"list"})})});var DX=K((wX)=>{Object.defineProperty(wX,"__esModule",{value:!0});wX.Charges=void 0;var HX=w(),C0=HX.StripeResource.method;wX.Charges=HX.StripeResource.extend({create:C0({method:"POST",fullPath:"/v1/charges"}),retrieve:C0({method:"GET",fullPath:"/v1/charges/{charge}"}),update:C0({method:"POST",fullPath:"/v1/charges/{charge}"}),list:C0({method:"GET",fullPath:"/v1/charges",methodType:"list"}),capture:C0({method:"POST",fullPath:"/v1/charges/{charge}/capture"}),search:C0({method:"GET",fullPath:"/v1/charges/search",methodType:"search"})})});var FX=K((qX)=>{Object.defineProperty(qX,"__esModule",{value:!0});qX.ConfirmationTokens=void 0;var OX=w(),oU=OX.StripeResource.method;qX.ConfirmationTokens=OX.StripeResource.extend({retrieve:oU({method:"GET",fullPath:"/v1/confirmation_tokens/{confirmation_token}"})})});var xX=K((AX)=>{Object.defineProperty(AX,"__esModule",{value:!0});AX.CountrySpecs=void 0;var kX=w(),CX=kX.StripeResource.method;AX.CountrySpecs=kX.StripeResource.extend({retrieve:CX({method:"GET",fullPath:"/v1/country_specs/{country}"}),list:CX({method:"GET",fullPath:"/v1/country_specs",methodType:"list"})})});var RX=K((PX)=>{Object.defineProperty(PX,"__esModule",{value:!0});PX.Coupons=void 0;var IX=w(),r0=IX.StripeResource.method;PX.Coupons=IX.StripeResource.extend({create:r0({method:"POST",fullPath:"/v1/coupons"}),retrieve:r0({method:"GET",fullPath:"/v1/coupons/{coupon}"}),update:r0({method:"POST",fullPath:"/v1/coupons/{coupon}"}),list:r0({method:"GET",fullPath:"/v1/coupons",methodType:"list"}),del:r0({method:"DELETE",fullPath:"/v1/coupons/{coupon}"})})});var jX=K((vX)=>{Object.defineProperty(vX,"__esModule",{value:!0});vX.CreditNotes=void 0;var yX=w(),s=yX.StripeResource.method;vX.CreditNotes=yX.StripeResource.extend({create:s({method:"POST",fullPath:"/v1/credit_notes",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),retrieve:s({method:"GET",fullPath:"/v1/credit_notes/{id}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),update:s({method:"POST",fullPath:"/v1/credit_notes/{id}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),list:s({method:"GET",fullPath:"/v1/credit_notes",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),listLineItems:s({method:"GET",fullPath:"/v1/credit_notes/{credit_note}/lines",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),listPreviewLineItems:s({method:"GET",fullPath:"/v1/credit_notes/preview/lines",methodType:"list",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),preview:s({method:"GET",fullPath:"/v1/credit_notes/preview",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),voidCreditNote:s({method:"POST",fullPath:"/v1/credit_notes/{id}/void",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})})});var gX=K((MX)=>{Object.defineProperty(MX,"__esModule",{value:!0});MX.CustomerSessions=void 0;var fX=w(),sU=fX.StripeResource.method;MX.CustomerSessions=fX.StripeResource.extend({create:sU({method:"POST",fullPath:"/v1/customer_sessions"})})});var cX=K((mX)=>{Object.defineProperty(mX,"__esModule",{value:!0});mX.Customers=void 0;var hX=w(),A=hX.StripeResource.method;mX.Customers=hX.StripeResource.extend({create:A({method:"POST",fullPath:"/v1/customers",responseSchema:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),retrieve:A({method:"GET",fullPath:"/v1/customers/{customer}"}),update:A({method:"POST",fullPath:"/v1/customers/{customer}",responseSchema:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),list:A({method:"GET",fullPath:"/v1/customers",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),del:A({method:"DELETE",fullPath:"/v1/customers/{customer}"}),createBalanceTransaction:A({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions"}),createFundingInstructions:A({method:"POST",fullPath:"/v1/customers/{customer}/funding_instructions"}),createSource:A({method:"POST",fullPath:"/v1/customers/{customer}/sources"}),createTaxId:A({method:"POST",fullPath:"/v1/customers/{customer}/tax_ids"}),deleteDiscount:A({method:"DELETE",fullPath:"/v1/customers/{customer}/discount"}),deleteSource:A({method:"DELETE",fullPath:"/v1/customers/{customer}/sources/{id}"}),deleteTaxId:A({method:"DELETE",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),listBalanceTransactions:A({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions",methodType:"list"}),listCashBalanceTransactions:A({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions",methodType:"list"}),listPaymentMethods:A({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods",methodType:"list"}),listSources:A({method:"GET",fullPath:"/v1/customers/{customer}/sources",methodType:"list"}),listTaxIds:A({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids",methodType:"list"}),retrieveBalanceTransaction:A({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),retrieveCashBalance:A({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance"}),retrieveCashBalanceTransaction:A({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions/{transaction}"}),retrievePaymentMethod:A({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods/{payment_method}"}),retrieveSource:A({method:"GET",fullPath:"/v1/customers/{customer}/sources/{id}"}),retrieveTaxId:A({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),search:A({method:"GET",fullPath:"/v1/customers/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),updateBalanceTransaction:A({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),updateCashBalance:A({method:"POST",fullPath:"/v1/customers/{customer}/cash_balance"}),updateSource:A({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}"}),verifySource:A({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}/verify"})})});var dX=K((lX)=>{Object.defineProperty(lX,"__esModule",{value:!0});lX.Disputes=void 0;var nX=w(),l8=nX.StripeResource.method;lX.Disputes=nX.StripeResource.extend({retrieve:l8({method:"GET",fullPath:"/v1/disputes/{dispute}"}),update:l8({method:"POST",fullPath:"/v1/disputes/{dispute}"}),list:l8({method:"GET",fullPath:"/v1/disputes",methodType:"list"}),close:l8({method:"POST",fullPath:"/v1/disputes/{dispute}/close"})})});var rX=K((oX)=>{Object.defineProperty(oX,"__esModule",{value:!0});oX.EphemeralKeys=void 0;var aX=w(),iX=aX.StripeResource.method;oX.EphemeralKeys=aX.StripeResource.extend({create:iX({method:"POST",fullPath:"/v1/ephemeral_keys",validator:($,Z)=>{if(!Z.headers||!Z.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:iX({method:"DELETE",fullPath:"/v1/ephemeral_keys/{key}"})})});var JY=K(($Y)=>{Object.defineProperty($Y,"__esModule",{value:!0});$Y.Events=void 0;var eX=w(),tX=eX.StripeResource.method;$Y.Events=eX.StripeResource.extend({retrieve:tX({method:"GET",fullPath:"/v1/events/{id}"}),list:tX({method:"GET",fullPath:"/v1/events",methodType:"list"})})});var VY=K((YY)=>{Object.defineProperty(YY,"__esModule",{value:!0});YY.ExchangeRates=void 0;var XY=w(),QY=XY.StripeResource.method;YY.ExchangeRates=XY.StripeResource.extend({retrieve:QY({method:"GET",fullPath:"/v1/exchange_rates/{rate_id}"}),list:QY({method:"GET",fullPath:"/v1/exchange_rates",methodType:"list"})})});var zY=K((WY)=>{Object.defineProperty(WY,"__esModule",{value:!0});WY.FileLinks=void 0;var BY=w(),p8=BY.StripeResource.method;WY.FileLinks=BY.StripeResource.extend({create:p8({method:"POST",fullPath:"/v1/file_links"}),retrieve:p8({method:"GET",fullPath:"/v1/file_links/{link}"}),update:p8({method:"POST",fullPath:"/v1/file_links/{link}"}),list:p8({method:"GET",fullPath:"/v1/file_links",methodType:"list"})})});var wY=K((KY)=>{Object.defineProperty(KY,"__esModule",{value:!0});KY.multipartRequestDataProcessor=void 0;var LY=c(),rU=($,Z,J)=>{let Q=(Math.round(Math.random()*10000000000000000)+Math.round(Math.random()*10000000000000000)).toString();J["Content-Type"]=`multipart/form-data; boundary=${Q}`;let X=new TextEncoder,Y=new Uint8Array(0),G=X.encode(`\r
12
+ `);function V(B){let z=Y,L=B instanceof Uint8Array?B:new Uint8Array(X.encode(B));Y=new Uint8Array(z.length+L.length+2),Y.set(z),Y.set(L,z.length),Y.set(G,Y.length-2)}function U(B){return`"${B.replace(/"|"/g,"%22").replace(/\r\n|\r|\n/g," ")}"`}let W=(0,LY.flattenAndStringify)(Z);for(let B in W){if(!Object.prototype.hasOwnProperty.call(W,B))continue;let z=W[B];if(V(`--${Q}`),Object.prototype.hasOwnProperty.call(z,"data")){let L=z;V(`Content-Disposition: form-data; name=${U(B)}; filename=${U(L.name||"blob")}`),V(`Content-Type: ${L.type||"application/octet-stream"}`),V(""),V(L.data)}else V(`Content-Disposition: form-data; name=${U(B)}`),V(""),V(z)}return V(`--${Q}--`),Y};function tU($,Z,J,Q){if(Z=Z||{},$!=="POST")return Q(null,(0,LY.queryStringifyRequestData)(Z));this._stripe._platformFunctions.tryBufferData(Z).then((X)=>{let Y=rU($,X,J);return Q(null,Y)}).catch((X)=>Q(X,null))}KY.multipartRequestDataProcessor=tU});var qY=K((DY)=>{Object.defineProperty(DY,"__esModule",{value:!0});DY.Files=void 0;var eU=wY(),TY=w(),G9=TY.StripeResource.method;DY.Files=TY.StripeResource.extend({create:G9({method:"POST",fullPath:"/v1/files",headers:{"Content-Type":"multipart/form-data"},host:"files.stripe.com"}),retrieve:G9({method:"GET",fullPath:"/v1/files/{file}"}),list:G9({method:"GET",fullPath:"/v1/files",methodType:"list"}),requestDataProcessor:eU.multipartRequestDataProcessor})});var kY=K((FY)=>{Object.defineProperty(FY,"__esModule",{value:!0});FY.InvoiceItems=void 0;var EY=w(),t0=EY.StripeResource.method;FY.InvoiceItems=EY.StripeResource.extend({create:t0({method:"POST",fullPath:"/v1/invoiceitems",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),retrieve:t0({method:"GET",fullPath:"/v1/invoiceitems/{invoiceitem}",responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),update:t0({method:"POST",fullPath:"/v1/invoiceitems/{invoiceitem}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),list:t0({method:"GET",fullPath:"/v1/invoiceitems",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}}}}),del:t0({method:"DELETE",fullPath:"/v1/invoiceitems/{invoiceitem}"})})});var PY=K((xY)=>{Object.defineProperty(xY,"__esModule",{value:!0});xY.InvoicePayments=void 0;var NY=w(),AY=NY.StripeResource.method;xY.InvoicePayments=NY.StripeResource.extend({retrieve:AY({method:"GET",fullPath:"/v1/invoice_payments/{invoice_payment}"}),list:AY({method:"GET",fullPath:"/v1/invoice_payments",methodType:"list"})})});var vY=K((RY)=>{Object.defineProperty(RY,"__esModule",{value:!0});RY.InvoiceRenderingTemplates=void 0;var SY=w(),d8=SY.StripeResource.method;RY.InvoiceRenderingTemplates=SY.StripeResource.extend({retrieve:d8({method:"GET",fullPath:"/v1/invoice_rendering_templates/{template}"}),list:d8({method:"GET",fullPath:"/v1/invoice_rendering_templates",methodType:"list"}),archive:d8({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/archive"}),unarchive:d8({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/unarchive"})})});var MY=K((jY)=>{Object.defineProperty(jY,"__esModule",{value:!0});jY.Invoices=void 0;var bY=w(),S=bY.StripeResource.method;jY.Invoices=bY.StripeResource.extend({create:S({method:"POST",fullPath:"/v1/invoices",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),retrieve:S({method:"GET",fullPath:"/v1/invoices/{invoice}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),update:S({method:"POST",fullPath:"/v1/invoices/{invoice}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),list:S({method:"GET",fullPath:"/v1/invoices",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),del:S({method:"DELETE",fullPath:"/v1/invoices/{invoice}"}),addLines:S({method:"POST",fullPath:"/v1/invoices/{invoice}/add_lines",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),attachPayment:S({method:"POST",fullPath:"/v1/invoices/{invoice}/attach_payment",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),createPreview:S({method:"POST",fullPath:"/v1/invoices/create_preview",requestSchema:{kind:"object",fields:{invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},schedule_details:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}},subscription_details:{kind:"object",fields:{items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),finalizeInvoice:S({method:"POST",fullPath:"/v1/invoices/{invoice}/finalize",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),listLineItems:S({method:"GET",fullPath:"/v1/invoices/{invoice}/lines",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),markUncollectible:S({method:"POST",fullPath:"/v1/invoices/{invoice}/mark_uncollectible",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),pay:S({method:"POST",fullPath:"/v1/invoices/{invoice}/pay",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),removeLines:S({method:"POST",fullPath:"/v1/invoices/{invoice}/remove_lines",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),search:S({method:"GET",fullPath:"/v1/invoices/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),sendInvoice:S({method:"POST",fullPath:"/v1/invoices/{invoice}/send",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),updateLines:S({method:"POST",fullPath:"/v1/invoices/{invoice}/update_lines",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),updateLineItem:S({method:"POST",fullPath:"/v1/invoices/{invoice}/lines/{line_item_id}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),voidInvoice:S({method:"POST",fullPath:"/v1/invoices/{invoice}/void",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})})});var mY=K((gY)=>{Object.defineProperty(gY,"__esModule",{value:!0});gY.Mandates=void 0;var _Y=w(),$z=_Y.StripeResource.method;gY.Mandates=_Y.StripeResource.extend({retrieve:$z({method:"GET",fullPath:"/v1/mandates/{mandate}"})})});var pY=K((nY)=>{Object.defineProperty(nY,"__esModule",{value:!0});nY.OAuth=void 0;var cY=w(),Zz=c(),uY=cY.StripeResource.method,V9="connect.stripe.com";nY.OAuth=cY.StripeResource.extend({basePath:"/",authorizeUrl($,Z){$=$||{},Z=Z||{};let J="oauth/authorize";if(Z.express)J=`express/${J}`;if(!$.response_type)$.response_type="code";if(!$.client_id)$.client_id=this._stripe.getClientId();if(!$.scope)$.scope="read_write";return`https://${V9}/${J}?${(0,Zz.queryStringifyRequestData)($)}`},token:uY({method:"POST",path:"oauth/token",host:V9}),deauthorize($,...Z){if(!$.client_id)$.client_id=this._stripe.getClientId();return uY({method:"POST",path:"oauth/deauthorize",host:V9}).apply(this,[$,...Z])}})});var sY=K((aY)=>{Object.defineProperty(aY,"__esModule",{value:!0});aY.PaymentAttemptRecords=void 0;var iY=w(),dY=iY.StripeResource.method;aY.PaymentAttemptRecords=iY.StripeResource.extend({retrieve:dY({method:"GET",fullPath:"/v1/payment_attempt_records/{id}"}),list:dY({method:"GET",fullPath:"/v1/payment_attempt_records",methodType:"list"})})});var $G=K((tY)=>{Object.defineProperty(tY,"__esModule",{value:!0});tY.PaymentIntents=void 0;var rY=w(),g=rY.StripeResource.method;tY.PaymentIntents=rY.StripeResource.extend({create:g({method:"POST",fullPath:"/v1/payment_intents"}),retrieve:g({method:"GET",fullPath:"/v1/payment_intents/{intent}"}),update:g({method:"POST",fullPath:"/v1/payment_intents/{intent}"}),list:g({method:"GET",fullPath:"/v1/payment_intents",methodType:"list"}),applyCustomerBalance:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/apply_customer_balance"}),cancel:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/cancel"}),capture:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/capture"}),confirm:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/confirm"}),incrementAuthorization:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/increment_authorization"}),listAmountDetailsLineItems:g({method:"GET",fullPath:"/v1/payment_intents/{intent}/amount_details_line_items",methodType:"list"}),search:g({method:"GET",fullPath:"/v1/payment_intents/search",methodType:"search"}),verifyMicrodeposits:g({method:"POST",fullPath:"/v1/payment_intents/{intent}/verify_microdeposits"})})});var XG=K((JG)=>{Object.defineProperty(JG,"__esModule",{value:!0});JG.PaymentLinks=void 0;var ZG=w(),e0=ZG.StripeResource.method;JG.PaymentLinks=ZG.StripeResource.extend({create:e0({method:"POST",fullPath:"/v1/payment_links",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),retrieve:e0({method:"GET",fullPath:"/v1/payment_links/{payment_link}",responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),update:e0({method:"POST",fullPath:"/v1/payment_links/{payment_link}",responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),list:e0({method:"GET",fullPath:"/v1/payment_links",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}),listLineItems:e0({method:"GET",fullPath:"/v1/payment_links/{payment_link}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}})})});var BG=K((GG)=>{Object.defineProperty(GG,"__esModule",{value:!0});GG.PaymentMethodConfigurations=void 0;var YG=w(),i8=YG.StripeResource.method;GG.PaymentMethodConfigurations=YG.StripeResource.extend({create:i8({method:"POST",fullPath:"/v1/payment_method_configurations"}),retrieve:i8({method:"GET",fullPath:"/v1/payment_method_configurations/{configuration}"}),update:i8({method:"POST",fullPath:"/v1/payment_method_configurations/{configuration}"}),list:i8({method:"GET",fullPath:"/v1/payment_method_configurations",methodType:"list"})})});var LG=K((UG)=>{Object.defineProperty(UG,"__esModule",{value:!0});UG.PaymentMethodDomains=void 0;var WG=w(),$8=WG.StripeResource.method;UG.PaymentMethodDomains=WG.StripeResource.extend({create:$8({method:"POST",fullPath:"/v1/payment_method_domains"}),retrieve:$8({method:"GET",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),update:$8({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),list:$8({method:"GET",fullPath:"/v1/payment_method_domains",methodType:"list"}),validate:$8({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}/validate"})})});var TG=K((HG)=>{Object.defineProperty(HG,"__esModule",{value:!0});HG.PaymentMethods=void 0;var KG=w(),k0=KG.StripeResource.method;HG.PaymentMethods=KG.StripeResource.extend({create:k0({method:"POST",fullPath:"/v1/payment_methods"}),retrieve:k0({method:"GET",fullPath:"/v1/payment_methods/{payment_method}"}),update:k0({method:"POST",fullPath:"/v1/payment_methods/{payment_method}"}),list:k0({method:"GET",fullPath:"/v1/payment_methods",methodType:"list"}),attach:k0({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/attach"}),detach:k0({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/detach"})})});var EG=K((OG)=>{Object.defineProperty(OG,"__esModule",{value:!0});OG.PaymentRecords=void 0;var DG=w(),r=DG.StripeResource.method;OG.PaymentRecords=DG.StripeResource.extend({retrieve:r({method:"GET",fullPath:"/v1/payment_records/{id}"}),reportPayment:r({method:"POST",fullPath:"/v1/payment_records/report_payment"}),reportPaymentAttempt:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt"}),reportPaymentAttemptCanceled:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_canceled"}),reportPaymentAttemptFailed:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_failed"}),reportPaymentAttemptGuaranteed:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_guaranteed"}),reportPaymentAttemptInformational:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_informational"}),reportRefund:r({method:"POST",fullPath:"/v1/payment_records/{id}/report_refund"})})});var AG=K((CG)=>{Object.defineProperty(CG,"__esModule",{value:!0});CG.Payouts=void 0;var FG=w(),A0=FG.StripeResource.method;CG.Payouts=FG.StripeResource.extend({create:A0({method:"POST",fullPath:"/v1/payouts"}),retrieve:A0({method:"GET",fullPath:"/v1/payouts/{payout}"}),update:A0({method:"POST",fullPath:"/v1/payouts/{payout}"}),list:A0({method:"GET",fullPath:"/v1/payouts",methodType:"list"}),cancel:A0({method:"POST",fullPath:"/v1/payouts/{payout}/cancel"}),reverse:A0({method:"POST",fullPath:"/v1/payouts/{payout}/reverse"})})});var PG=K((xG)=>{Object.defineProperty(xG,"__esModule",{value:!0});xG.Plans=void 0;var NG=w(),Z8=NG.StripeResource.method;xG.Plans=NG.StripeResource.extend({create:Z8({method:"POST",fullPath:"/v1/plans",requestSchema:{kind:"object",fields:{amount_decimal:{kind:"decimal_string"},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),retrieve:Z8({method:"GET",fullPath:"/v1/plans/{plan}",responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),update:Z8({method:"POST",fullPath:"/v1/plans/{plan}",responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),list:Z8({method:"GET",fullPath:"/v1/plans",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),del:Z8({method:"DELETE",fullPath:"/v1/plans/{plan}"})})});var vG=K((RG)=>{Object.defineProperty(RG,"__esModule",{value:!0});RG.Prices=void 0;var SG=w(),J8=SG.StripeResource.method;RG.Prices=SG.StripeResource.extend({create:J8({method:"POST",fullPath:"/v1/prices",requestSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),retrieve:J8({method:"GET",fullPath:"/v1/prices/{price}",responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),update:J8({method:"POST",fullPath:"/v1/prices/{price}",responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),list:J8({method:"GET",fullPath:"/v1/prices",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),search:J8({method:"GET",fullPath:"/v1/prices/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}})})});var MG=K((jG)=>{Object.defineProperty(jG,"__esModule",{value:!0});jG.Products=void 0;var bG=w(),n=bG.StripeResource.method;jG.Products=bG.StripeResource.extend({create:n({method:"POST",fullPath:"/v1/products",requestSchema:{kind:"object",fields:{default_price_data:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}}}}),retrieve:n({method:"GET",fullPath:"/v1/products/{id}"}),update:n({method:"POST",fullPath:"/v1/products/{id}"}),list:n({method:"GET",fullPath:"/v1/products",methodType:"list"}),del:n({method:"DELETE",fullPath:"/v1/products/{id}"}),createFeature:n({method:"POST",fullPath:"/v1/products/{product}/features"}),deleteFeature:n({method:"DELETE",fullPath:"/v1/products/{product}/features/{id}"}),listFeatures:n({method:"GET",fullPath:"/v1/products/{product}/features",methodType:"list"}),retrieveFeature:n({method:"GET",fullPath:"/v1/products/{product}/features/{id}"}),search:n({method:"GET",fullPath:"/v1/products/search",methodType:"search"})})});var mG=K((gG)=>{Object.defineProperty(gG,"__esModule",{value:!0});gG.PromotionCodes=void 0;var _G=w(),a8=_G.StripeResource.method;gG.PromotionCodes=_G.StripeResource.extend({create:a8({method:"POST",fullPath:"/v1/promotion_codes"}),retrieve:a8({method:"GET",fullPath:"/v1/promotion_codes/{promotion_code}"}),update:a8({method:"POST",fullPath:"/v1/promotion_codes/{promotion_code}"}),list:a8({method:"GET",fullPath:"/v1/promotion_codes",methodType:"list"})})});var lG=K((cG)=>{Object.defineProperty(cG,"__esModule",{value:!0});cG.Quotes=void 0;var uG=w(),l=uG.StripeResource.method;cG.Quotes=uG.StripeResource.extend({create:l({method:"POST",fullPath:"/v1/quotes",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),retrieve:l({method:"GET",fullPath:"/v1/quotes/{quote}",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),update:l({method:"POST",fullPath:"/v1/quotes/{quote}",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),list:l({method:"GET",fullPath:"/v1/quotes",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),accept:l({method:"POST",fullPath:"/v1/quotes/{quote}/accept",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),cancel:l({method:"POST",fullPath:"/v1/quotes/{quote}/cancel",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),finalizeQuote:l({method:"POST",fullPath:"/v1/quotes/{quote}/finalize",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),listComputedUpfrontLineItems:l({method:"GET",fullPath:"/v1/quotes/{quote}/computed_upfront_line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),listLineItems:l({method:"GET",fullPath:"/v1/quotes/{quote}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),pdf:l({method:"GET",fullPath:"/v1/quotes/{quote}/pdf",host:"files.stripe.com",streaming:!0})})});var aG=K((dG)=>{Object.defineProperty(dG,"__esModule",{value:!0});dG.Refunds=void 0;var pG=w(),Q8=pG.StripeResource.method;dG.Refunds=pG.StripeResource.extend({create:Q8({method:"POST",fullPath:"/v1/refunds"}),retrieve:Q8({method:"GET",fullPath:"/v1/refunds/{refund}"}),update:Q8({method:"POST",fullPath:"/v1/refunds/{refund}"}),list:Q8({method:"GET",fullPath:"/v1/refunds",methodType:"list"}),cancel:Q8({method:"POST",fullPath:"/v1/refunds/{refund}/cancel"})})});var tG=K((sG)=>{Object.defineProperty(sG,"__esModule",{value:!0});sG.Reviews=void 0;var oG=w(),B9=oG.StripeResource.method;sG.Reviews=oG.StripeResource.extend({retrieve:B9({method:"GET",fullPath:"/v1/reviews/{review}"}),list:B9({method:"GET",fullPath:"/v1/reviews",methodType:"list"}),approve:B9({method:"POST",fullPath:"/v1/reviews/{review}/approve"})})});var JV=K(($V)=>{Object.defineProperty($V,"__esModule",{value:!0});$V.SetupAttempts=void 0;var eG=w(),Jz=eG.StripeResource.method;$V.SetupAttempts=eG.StripeResource.extend({list:Jz({method:"GET",fullPath:"/v1/setup_attempts",methodType:"list"})})});var GV=K((XV)=>{Object.defineProperty(XV,"__esModule",{value:!0});XV.SetupIntents=void 0;var QV=w(),G0=QV.StripeResource.method;XV.SetupIntents=QV.StripeResource.extend({create:G0({method:"POST",fullPath:"/v1/setup_intents"}),retrieve:G0({method:"GET",fullPath:"/v1/setup_intents/{intent}"}),update:G0({method:"POST",fullPath:"/v1/setup_intents/{intent}"}),list:G0({method:"GET",fullPath:"/v1/setup_intents",methodType:"list"}),cancel:G0({method:"POST",fullPath:"/v1/setup_intents/{intent}/cancel"}),confirm:G0({method:"POST",fullPath:"/v1/setup_intents/{intent}/confirm"}),verifyMicrodeposits:G0({method:"POST",fullPath:"/v1/setup_intents/{intent}/verify_microdeposits"})})});var UV=K((BV)=>{Object.defineProperty(BV,"__esModule",{value:!0});BV.ShippingRates=void 0;var VV=w(),o8=VV.StripeResource.method;BV.ShippingRates=VV.StripeResource.extend({create:o8({method:"POST",fullPath:"/v1/shipping_rates"}),retrieve:o8({method:"GET",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),update:o8({method:"POST",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),list:o8({method:"GET",fullPath:"/v1/shipping_rates",methodType:"list"})})});var HV=K((LV)=>{Object.defineProperty(LV,"__esModule",{value:!0});LV.Sources=void 0;var zV=w(),X8=zV.StripeResource.method;LV.Sources=zV.StripeResource.extend({create:X8({method:"POST",fullPath:"/v1/sources"}),retrieve:X8({method:"GET",fullPath:"/v1/sources/{source}"}),update:X8({method:"POST",fullPath:"/v1/sources/{source}"}),listSourceTransactions:X8({method:"GET",fullPath:"/v1/sources/{source}/source_transactions",methodType:"list"}),verify:X8({method:"POST",fullPath:"/v1/sources/{source}/verify"})})});var OV=K((TV)=>{Object.defineProperty(TV,"__esModule",{value:!0});TV.SubscriptionItems=void 0;var wV=w(),Y8=wV.StripeResource.method;TV.SubscriptionItems=wV.StripeResource.extend({create:Y8({method:"POST",fullPath:"/v1/subscription_items",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),retrieve:Y8({method:"GET",fullPath:"/v1/subscription_items/{item}",responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),update:Y8({method:"POST",fullPath:"/v1/subscription_items/{item}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),list:Y8({method:"GET",fullPath:"/v1/subscription_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),del:Y8({method:"DELETE",fullPath:"/v1/subscription_items/{item}"})})});var CV=K((EV)=>{Object.defineProperty(EV,"__esModule",{value:!0});EV.SubscriptionSchedules=void 0;var qV=w(),N0=qV.StripeResource.method;EV.SubscriptionSchedules=qV.StripeResource.extend({create:N0({method:"POST",fullPath:"/v1/subscription_schedules",requestSchema:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}}}),retrieve:N0({method:"GET",fullPath:"/v1/subscription_schedules/{schedule}"}),update:N0({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}",requestSchema:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}}}),list:N0({method:"GET",fullPath:"/v1/subscription_schedules",methodType:"list"}),cancel:N0({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/cancel"}),release:N0({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/release"})})});var xV=K((AV)=>{Object.defineProperty(AV,"__esModule",{value:!0});AV.Subscriptions=void 0;var kV=w(),i=kV.StripeResource.method;AV.Subscriptions=kV.StripeResource.extend({create:i({method:"POST",fullPath:"/v1/subscriptions",requestSchema:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),retrieve:i({method:"GET",fullPath:"/v1/subscriptions/{subscription_exposed_id}",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),update:i({method:"POST",fullPath:"/v1/subscriptions/{subscription_exposed_id}",requestSchema:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),list:i({method:"GET",fullPath:"/v1/subscriptions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}),cancel:i({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),deleteDiscount:i({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}/discount"}),migrate:i({method:"POST",fullPath:"/v1/subscriptions/{subscription}/migrate",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),resume:i({method:"POST",fullPath:"/v1/subscriptions/{subscription}/resume",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),search:i({method:"GET",fullPath:"/v1/subscriptions/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}})})});var yV=K((SV)=>{Object.defineProperty(SV,"__esModule",{value:!0});SV.TaxCodes=void 0;var PV=w(),IV=PV.StripeResource.method;SV.TaxCodes=PV.StripeResource.extend({retrieve:IV({method:"GET",fullPath:"/v1/tax_codes/{id}"}),list:IV({method:"GET",fullPath:"/v1/tax_codes",methodType:"list"})})});var fV=K((bV)=>{Object.defineProperty(bV,"__esModule",{value:!0});bV.TaxIds=void 0;var vV=w(),s8=vV.StripeResource.method;bV.TaxIds=vV.StripeResource.extend({create:s8({method:"POST",fullPath:"/v1/tax_ids"}),retrieve:s8({method:"GET",fullPath:"/v1/tax_ids/{id}"}),list:s8({method:"GET",fullPath:"/v1/tax_ids",methodType:"list"}),del:s8({method:"DELETE",fullPath:"/v1/tax_ids/{id}"})})});var hV=K((_V)=>{Object.defineProperty(_V,"__esModule",{value:!0});_V.TaxRates=void 0;var MV=w(),r8=MV.StripeResource.method;_V.TaxRates=MV.StripeResource.extend({create:r8({method:"POST",fullPath:"/v1/tax_rates"}),retrieve:r8({method:"GET",fullPath:"/v1/tax_rates/{tax_rate}"}),update:r8({method:"POST",fullPath:"/v1/tax_rates/{tax_rate}"}),list:r8({method:"GET",fullPath:"/v1/tax_rates",methodType:"list"})})});var lV=K((cV)=>{Object.defineProperty(cV,"__esModule",{value:!0});cV.Tokens=void 0;var uV=w(),mV=uV.StripeResource.method;cV.Tokens=uV.StripeResource.extend({create:mV({method:"POST",fullPath:"/v1/tokens"}),retrieve:mV({method:"GET",fullPath:"/v1/tokens/{token}"})})});var aV=K((dV)=>{Object.defineProperty(dV,"__esModule",{value:!0});dV.Topups=void 0;var pV=w(),G8=pV.StripeResource.method;dV.Topups=pV.StripeResource.extend({create:G8({method:"POST",fullPath:"/v1/topups"}),retrieve:G8({method:"GET",fullPath:"/v1/topups/{topup}"}),update:G8({method:"POST",fullPath:"/v1/topups/{topup}"}),list:G8({method:"GET",fullPath:"/v1/topups",methodType:"list"}),cancel:G8({method:"POST",fullPath:"/v1/topups/{topup}/cancel"})})});var tV=K((sV)=>{Object.defineProperty(sV,"__esModule",{value:!0});sV.Transfers=void 0;var oV=w(),t=oV.StripeResource.method;sV.Transfers=oV.StripeResource.extend({create:t({method:"POST",fullPath:"/v1/transfers"}),retrieve:t({method:"GET",fullPath:"/v1/transfers/{transfer}"}),update:t({method:"POST",fullPath:"/v1/transfers/{transfer}"}),list:t({method:"GET",fullPath:"/v1/transfers",methodType:"list"}),createReversal:t({method:"POST",fullPath:"/v1/transfers/{id}/reversals"}),listReversals:t({method:"GET",fullPath:"/v1/transfers/{id}/reversals",methodType:"list"}),retrieveReversal:t({method:"GET",fullPath:"/v1/transfers/{transfer}/reversals/{id}"}),updateReversal:t({method:"POST",fullPath:"/v1/transfers/{transfer}/reversals/{id}"})})});var J3=K(($3)=>{Object.defineProperty($3,"__esModule",{value:!0});$3.WebhookEndpoints=void 0;var eV=w(),V8=eV.StripeResource.method;$3.WebhookEndpoints=eV.StripeResource.extend({create:V8({method:"POST",fullPath:"/v1/webhook_endpoints"}),retrieve:V8({method:"GET",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),update:V8({method:"POST",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),list:V8({method:"GET",fullPath:"/v1/webhook_endpoints",methodType:"list"}),del:V8({method:"DELETE",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"})})});var X3=K((E)=>{Object.defineProperty(E,"__esModule",{value:!0});E.Subscriptions=E.SubscriptionSchedules=E.SubscriptionItems=E.Sources=E.ShippingRates=E.SetupIntents=E.SetupAttempts=E.Reviews=E.Refunds=E.Quotes=E.PromotionCodes=E.Products=E.Prices=E.Plans=E.Payouts=E.PaymentRecords=E.PaymentMethods=E.PaymentMethodDomains=E.PaymentMethodConfigurations=E.PaymentLinks=E.PaymentIntents=E.PaymentAttemptRecords=E.OAuth=E.Mandates=E.Invoices=E.InvoiceRenderingTemplates=E.InvoicePayments=E.InvoiceItems=E.Files=E.FileLinks=E.ExchangeRates=E.Events=E.EphemeralKeys=E.Disputes=E.Customers=E.CustomerSessions=E.CreditNotes=E.Coupons=E.CountrySpecs=E.ConfirmationTokens=E.Charges=E.BalanceTransactions=E.BalanceSettings=E.Balance=E.ApplicationFees=E.ApplePayDomains=E.Accounts=E.AccountSessions=E.AccountLinks=E.Account=void 0;E.V2=E.Treasury=E.TestHelpers=E.Terminal=E.Tax=E.Sigma=E.Reporting=E.Radar=E.Issuing=E.Identity=E.Forwarding=E.FinancialConnections=E.Entitlements=E.Climate=E.Checkout=E.BillingPortal=E.Billing=E.Apps=E.WebhookEndpoints=E.Transfers=E.Topups=E.Tokens=E.TaxRates=E.TaxIds=E.TaxCodes=void 0;var x=K1(),Qz=D1(),Xz=C1(),Yz=x1(),Gz=g1(),Vz=n1(),Bz=i1(),Wz=r1(),Uz=Z4(),zz=Y4(),Lz=W4(),Kz=K4(),Hz=D4(),wz=F4(),Tz=N4(),Dz=S4(),Oz=b4(),qz=_4(),Ez=u4(),Fz=d4(),Cz=s4(),kz=$6(),Az=X6(),Nz=B6(),xz=L6(),Iz=D6(),Pz=F6(),Sz=N6(),Rz=S6(),yz=b6(),vz=_6(),bz=u6(),jz=p6(),fz=o6(),Mz=e6(),_z=Q7(),gz=V7(),hz=z7(),mz=w7(),uz=q7(),cz=k7(),nz=I7(),lz=y7(),pz=f7(),dz=h7(),iz=n7(),az=i7(),oz=r7(),sz=ZJ(),rz=GJ(),tz=zJ(),ez=wJ(),$L=qJ(),ZL=kJ(),JL=PJ(),QL=vJ(),XL=_J(),YL=uJ(),GL=pJ(),VL=oJ(),BL=$5(),WL=X5(),UL=W5(),zL=K5(),LL=D5(),KL=F5(),HL=x5(),wL=y5(),TL=M5(),DL=m5(),OL=l5(),qL=o5(),EL=$Q(),FL=XQ(),CL=BQ(),kL=LQ(),AL=DQ(),NL=FQ(),xL=NQ(),IL=RQ(),PL=jQ(),SL=Y9();Object.defineProperty(E,"Account",{enumerable:!0,get:function(){return SL.Accounts}});var RL=uQ();Object.defineProperty(E,"AccountLinks",{enumerable:!0,get:function(){return RL.AccountLinks}});var yL=pQ();Object.defineProperty(E,"AccountSessions",{enumerable:!0,get:function(){return yL.AccountSessions}});var vL=Y9();Object.defineProperty(E,"Accounts",{enumerable:!0,get:function(){return vL.Accounts}});var bL=oQ();Object.defineProperty(E,"ApplePayDomains",{enumerable:!0,get:function(){return bL.ApplePayDomains}});var jL=eQ();Object.defineProperty(E,"ApplicationFees",{enumerable:!0,get:function(){return jL.ApplicationFees}});var fL=QX();Object.defineProperty(E,"Balance",{enumerable:!0,get:function(){return fL.Balance}});var ML=BX();Object.defineProperty(E,"BalanceSettings",{enumerable:!0,get:function(){return ML.BalanceSettings}});var _L=KX();Object.defineProperty(E,"BalanceTransactions",{enumerable:!0,get:function(){return _L.BalanceTransactions}});var gL=DX();Object.defineProperty(E,"Charges",{enumerable:!0,get:function(){return gL.Charges}});var hL=FX();Object.defineProperty(E,"ConfirmationTokens",{enumerable:!0,get:function(){return hL.ConfirmationTokens}});var mL=xX();Object.defineProperty(E,"CountrySpecs",{enumerable:!0,get:function(){return mL.CountrySpecs}});var uL=RX();Object.defineProperty(E,"Coupons",{enumerable:!0,get:function(){return uL.Coupons}});var cL=jX();Object.defineProperty(E,"CreditNotes",{enumerable:!0,get:function(){return cL.CreditNotes}});var nL=gX();Object.defineProperty(E,"CustomerSessions",{enumerable:!0,get:function(){return nL.CustomerSessions}});var lL=cX();Object.defineProperty(E,"Customers",{enumerable:!0,get:function(){return lL.Customers}});var pL=dX();Object.defineProperty(E,"Disputes",{enumerable:!0,get:function(){return pL.Disputes}});var dL=rX();Object.defineProperty(E,"EphemeralKeys",{enumerable:!0,get:function(){return dL.EphemeralKeys}});var iL=JY();Object.defineProperty(E,"Events",{enumerable:!0,get:function(){return iL.Events}});var aL=VY();Object.defineProperty(E,"ExchangeRates",{enumerable:!0,get:function(){return aL.ExchangeRates}});var oL=zY();Object.defineProperty(E,"FileLinks",{enumerable:!0,get:function(){return oL.FileLinks}});var sL=qY();Object.defineProperty(E,"Files",{enumerable:!0,get:function(){return sL.Files}});var rL=kY();Object.defineProperty(E,"InvoiceItems",{enumerable:!0,get:function(){return rL.InvoiceItems}});var tL=PY();Object.defineProperty(E,"InvoicePayments",{enumerable:!0,get:function(){return tL.InvoicePayments}});var eL=vY();Object.defineProperty(E,"InvoiceRenderingTemplates",{enumerable:!0,get:function(){return eL.InvoiceRenderingTemplates}});var $K=MY();Object.defineProperty(E,"Invoices",{enumerable:!0,get:function(){return $K.Invoices}});var ZK=mY();Object.defineProperty(E,"Mandates",{enumerable:!0,get:function(){return ZK.Mandates}});var JK=pY();Object.defineProperty(E,"OAuth",{enumerable:!0,get:function(){return JK.OAuth}});var QK=sY();Object.defineProperty(E,"PaymentAttemptRecords",{enumerable:!0,get:function(){return QK.PaymentAttemptRecords}});var XK=$G();Object.defineProperty(E,"PaymentIntents",{enumerable:!0,get:function(){return XK.PaymentIntents}});var YK=XG();Object.defineProperty(E,"PaymentLinks",{enumerable:!0,get:function(){return YK.PaymentLinks}});var GK=BG();Object.defineProperty(E,"PaymentMethodConfigurations",{enumerable:!0,get:function(){return GK.PaymentMethodConfigurations}});var VK=LG();Object.defineProperty(E,"PaymentMethodDomains",{enumerable:!0,get:function(){return VK.PaymentMethodDomains}});var BK=TG();Object.defineProperty(E,"PaymentMethods",{enumerable:!0,get:function(){return BK.PaymentMethods}});var WK=EG();Object.defineProperty(E,"PaymentRecords",{enumerable:!0,get:function(){return WK.PaymentRecords}});var UK=AG();Object.defineProperty(E,"Payouts",{enumerable:!0,get:function(){return UK.Payouts}});var zK=PG();Object.defineProperty(E,"Plans",{enumerable:!0,get:function(){return zK.Plans}});var LK=vG();Object.defineProperty(E,"Prices",{enumerable:!0,get:function(){return LK.Prices}});var KK=MG();Object.defineProperty(E,"Products",{enumerable:!0,get:function(){return KK.Products}});var HK=mG();Object.defineProperty(E,"PromotionCodes",{enumerable:!0,get:function(){return HK.PromotionCodes}});var wK=lG();Object.defineProperty(E,"Quotes",{enumerable:!0,get:function(){return wK.Quotes}});var TK=aG();Object.defineProperty(E,"Refunds",{enumerable:!0,get:function(){return TK.Refunds}});var DK=tG();Object.defineProperty(E,"Reviews",{enumerable:!0,get:function(){return DK.Reviews}});var OK=JV();Object.defineProperty(E,"SetupAttempts",{enumerable:!0,get:function(){return OK.SetupAttempts}});var qK=GV();Object.defineProperty(E,"SetupIntents",{enumerable:!0,get:function(){return qK.SetupIntents}});var EK=UV();Object.defineProperty(E,"ShippingRates",{enumerable:!0,get:function(){return EK.ShippingRates}});var FK=HV();Object.defineProperty(E,"Sources",{enumerable:!0,get:function(){return FK.Sources}});var CK=OV();Object.defineProperty(E,"SubscriptionItems",{enumerable:!0,get:function(){return CK.SubscriptionItems}});var kK=CV();Object.defineProperty(E,"SubscriptionSchedules",{enumerable:!0,get:function(){return kK.SubscriptionSchedules}});var AK=xV();Object.defineProperty(E,"Subscriptions",{enumerable:!0,get:function(){return AK.Subscriptions}});var NK=yV();Object.defineProperty(E,"TaxCodes",{enumerable:!0,get:function(){return NK.TaxCodes}});var xK=fV();Object.defineProperty(E,"TaxIds",{enumerable:!0,get:function(){return xK.TaxIds}});var IK=hV();Object.defineProperty(E,"TaxRates",{enumerable:!0,get:function(){return IK.TaxRates}});var PK=lV();Object.defineProperty(E,"Tokens",{enumerable:!0,get:function(){return PK.Tokens}});var SK=aV();Object.defineProperty(E,"Topups",{enumerable:!0,get:function(){return SK.Topups}});var RK=tV();Object.defineProperty(E,"Transfers",{enumerable:!0,get:function(){return RK.Transfers}});var yK=J3();Object.defineProperty(E,"WebhookEndpoints",{enumerable:!0,get:function(){return yK.WebhookEndpoints}});E.Apps=(0,x.resourceNamespace)("apps",{Secrets:zL.Secrets});E.Billing=(0,x.resourceNamespace)("billing",{Alerts:Bz.Alerts,CreditBalanceSummary:Ez.CreditBalanceSummary,CreditBalanceTransactions:Fz.CreditBalanceTransactions,CreditGrants:Cz.CreditGrants,MeterEventAdjustments:fz.MeterEventAdjustments,MeterEvents:hz.MeterEvents,Meters:uz.Meters});E.BillingPortal=(0,x.resourceNamespace)("billingPortal",{Configurations:Tz.Configurations,Sessions:LL.Sessions});E.Checkout=(0,x.resourceNamespace)("checkout",{Sessions:KL.Sessions});E.Climate=(0,x.resourceNamespace)("climate",{Orders:nz.Orders,Products:tz.Products,Suppliers:TL.Suppliers});E.Entitlements=(0,x.resourceNamespace)("entitlements",{ActiveEntitlements:Vz.ActiveEntitlements,Features:Rz.Features});E.FinancialConnections=(0,x.resourceNamespace)("financialConnections",{Accounts:Yz.Accounts,Sessions:HL.Sessions,Transactions:EL.Transactions});E.Forwarding=(0,x.resourceNamespace)("forwarding",{Requests:WL.Requests});E.Identity=(0,x.resourceNamespace)("identity",{VerificationReports:IL.VerificationReports,VerificationSessions:PL.VerificationSessions});E.Issuing=(0,x.resourceNamespace)("issuing",{Authorizations:Uz.Authorizations,Cardholders:Kz.Cardholders,Cards:Hz.Cards,Disputes:xz.Disputes,PersonalizationDesigns:oz.PersonalizationDesigns,PhysicalBundles:rz.PhysicalBundles,Tokens:OL.Tokens,Transactions:FL.Transactions});E.Radar=(0,x.resourceNamespace)("radar",{EarlyFraudWarnings:Iz.EarlyFraudWarnings,PaymentEvaluations:az.PaymentEvaluations,ValueListItems:NL.ValueListItems,ValueLists:xL.ValueLists});E.Reporting=(0,x.resourceNamespace)("reporting",{ReportRuns:VL.ReportRuns,ReportTypes:BL.ReportTypes});E.Sigma=(0,x.resourceNamespace)("sigma",{ScheduledQueryRuns:UL.ScheduledQueryRuns});E.Tax=(0,x.resourceNamespace)("tax",{Associations:Wz.Associations,Calculations:Lz.Calculations,Registrations:GL.Registrations,Settings:wL.Settings,Transactions:CL.Transactions});E.Terminal=(0,x.resourceNamespace)("terminal",{Configurations:Dz.Configurations,ConnectionTokens:qz.ConnectionTokens,Locations:jz.Locations,OnboardingLinks:cz.OnboardingLinks,Readers:ez.Readers});E.TestHelpers=(0,x.resourceNamespace)("testHelpers",{ConfirmationTokens:Oz.ConfirmationTokens,Customers:Az.Customers,Refunds:YL.Refunds,TestClocks:DL.TestClocks,Issuing:(0,x.resourceNamespace)("issuing",{Authorizations:zz.Authorizations,Cards:wz.Cards,PersonalizationDesigns:sz.PersonalizationDesigns,Transactions:kL.Transactions}),Terminal:(0,x.resourceNamespace)("terminal",{Readers:$L.Readers}),Treasury:(0,x.resourceNamespace)("treasury",{InboundTransfers:vz.InboundTransfers,OutboundPayments:lz.OutboundPayments,OutboundTransfers:dz.OutboundTransfers,ReceivedCredits:ZL.ReceivedCredits,ReceivedDebits:QL.ReceivedDebits})});E.Treasury=(0,x.resourceNamespace)("treasury",{CreditReversals:kz.CreditReversals,DebitReversals:Nz.DebitReversals,FinancialAccounts:yz.FinancialAccounts,InboundTransfers:bz.InboundTransfers,OutboundPayments:pz.OutboundPayments,OutboundTransfers:iz.OutboundTransfers,ReceivedCredits:JL.ReceivedCredits,ReceivedDebits:XL.ReceivedDebits,TransactionEntries:qL.TransactionEntries,Transactions:AL.Transactions});E.V2=(0,x.resourceNamespace)("v2",{Billing:(0,x.resourceNamespace)("billing",{MeterEventAdjustments:Mz.MeterEventAdjustments,MeterEventSession:_z.MeterEventSession,MeterEventStream:gz.MeterEventStream,MeterEvents:mz.MeterEvents}),Core:(0,x.resourceNamespace)("core",{AccountLinks:Qz.AccountLinks,AccountTokens:Xz.AccountTokens,Accounts:Gz.Accounts,EventDestinations:Pz.EventDestinations,Events:Sz.Events})})});var E3=K((O3)=>{Object.defineProperty(O3,"__esModule",{value:!0});O3.createStripe=void 0;var Y3=M0(),sK=_Z(),T3=w(),G3=X1(),rK=V1(),D3=U1(),tK=b0(),eK=I8(),V3=j0(),t8=X3(),V0=c(),B3="api.stripe.com",W3="443",U3="/v1/",z3=D3.ApiVersion,L3=80000,K3=5,H3=0.5,$H=["name","version","url","partner_id"],w3=["authenticator","apiVersion","typescript","maxNetworkRetries","httpAgent","httpClient","timeout","host","port","protocol","telemetry","appInfo","stripeAccount","stripeContext"],ZH=($)=>new sK.RequestSender($,T3.StripeResource.MAX_BUFFERED_REQUEST_METRICS);function JH($,Z=ZH){Q.PACKAGE_VERSION="21.0.1",Q.API_VERSION=D3.ApiVersion;let J=typeof process<"u"&&process.env?(0,V0.detectAIAgent)(process.env):"";Q.AI_AGENT=J,Q.USER_AGENT={bindings_version:Q.PACKAGE_VERSION,lang:"node",typescript:!1,...(0,V0.determineProcessUserAgentProperties)(),...J?{ai_agent:J}:{}},Q.StripeResource=T3.StripeResource,Q.StripeContext=G3.StripeContext,Q.resources=t8,Q.HttpClient=V3.HttpClient,Q.HttpClientResponse=V3.HttpClientResponse,Q.CryptoProvider=tK.CryptoProvider,Q.webhooks=(0,rK.createWebhooks)($),Q.Decimal=eK.Decimal;function Q(X,Y={}){if(!(this instanceof Q))return new Q(X,Y);let G=this._getPropsFromConfig(Y);this._platformFunctions=$,Object.defineProperty(this,"_emitter",{value:this._platformFunctions.createEmitter(),enumerable:!1,configurable:!1,writable:!1}),this.VERSION=Q.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 V=G.httpAgent||null;this._api={host:G.host||B3,port:G.port||W3,protocol:G.protocol||"https",basePath:U3,version:G.apiVersion||z3,timeout:(0,V0.validateInteger)("timeout",G.timeout,L3),maxNetworkRetries:(0,V0.validateInteger)("maxNetworkRetries",G.maxNetworkRetries,2),agent:V,httpClient:G.httpClient||(V?this._platformFunctions.createNodeHttpClient(V):this._platformFunctions.createDefaultHttpClient()),dev:!1,stripeAccount:G.stripeAccount||null,stripeContext:G.stripeContext||null};let U=G.typescript||!1;if(U!==Q.USER_AGENT.typescript)Q.USER_AGENT.typescript=U;if(G.appInfo)this._setAppInfo(G.appInfo);this._prepResources(),this._setAuthenticator(X,G.authenticator),this.errors=Y3,this.webhooks=Q.webhooks,this._prevRequestMetrics=[],this._enableTelemetry=G.telemetry!==!1,this._requestSender=Z(this),this.StripeResource=Q.StripeResource,this.Decimal=Q.Decimal}return Q.errors=Y3,Q.createNodeHttpClient=$.createNodeHttpClient,Q.createFetchHttpClient=$.createFetchHttpClient,Q.createNodeCryptoProvider=$.createNodeCryptoProvider,Q.createSubtleCryptoProvider=$.createSubtleCryptoProvider,Q.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(X,Y,G,V){return this._requestSender._rawRequest(X,Y,G,V)},_setAuthenticator(X,Y){if(X&&Y)throw Error("Can't specify both apiKey and authenticator");if(!X&&!Y)throw Error("Neither apiKey nor config.authenticator provided");this._authenticator=X?(0,V0.createApiKeyAuthenticator)(X):Y},_setAppInfo(X){if(X&&typeof X!=="object")throw Error("AppInfo must be an object.");if(X&&!X.name)throw Error("AppInfo.name is required");X=X||{},this._appInfo=$H.reduce((Y,G)=>{if(typeof X[G]=="string")Y=Y||{},Y[G]=X[G];return Y},{})},_setApiField(X,Y){this._api[X]=Y},getApiField(X){return this._api[X]},setClientId(X){this._clientId=X},getClientId(){return this._clientId},getConstant:(X)=>{switch(X){case"DEFAULT_HOST":return B3;case"DEFAULT_PORT":return W3;case"DEFAULT_BASE_PATH":return U3;case"DEFAULT_API_VERSION":return z3;case"DEFAULT_TIMEOUT":return L3;case"MAX_NETWORK_RETRY_DELAY_SEC":return K3;case"INITIAL_NETWORK_RETRY_DELAY_SEC":return H3}return Q[X]},getMaxNetworkRetries(){return this.getApiField("maxNetworkRetries")},_setApiNumberField(X,Y,G){let V=(0,V0.validateInteger)(X,Y,G);this._setApiField(X,V)},getMaxNetworkRetryDelay(){return K3},getInitialNetworkRetryDelay(){return H3},getClientUserAgent(X){return this.getClientUserAgentSeeded(Q.USER_AGENT,X)},getClientUserAgentSeeded(X,Y){let G={};for(let W in X){if(!Object.prototype.hasOwnProperty.call(X,W))continue;G[W]=encodeURIComponent(X[W]??"null")}let V=this._platformFunctions.getPlatformInfo();if(V&&this.getTelemetryEnabled())G.platform=encodeURIComponent(V);else delete G.platform;let U=this.getApiField("httpClient");if(U)G.httplib=encodeURIComponent(U.getClientName());if(this._appInfo)G.application=this._appInfo;Y(JSON.stringify(G))},getAppInfoAsString(){if(!this._appInfo)return"";let X=this._appInfo.name;if(this._appInfo.version)X+=`/${this._appInfo.version}`;if(this._appInfo.url)X+=` (${this._appInfo.url})`;return X},getTelemetryEnabled(){return this._enableTelemetry},_prepResources(){for(let X in t8){if(!Object.prototype.hasOwnProperty.call(t8,X))continue;this[(0,V0.pascalToCamelCase)(X)]=new t8[X](this)}},_getPropsFromConfig(X){if(!X)return{};let Y=typeof X==="string";if(!(X===Object(X)&&!Array.isArray(X))&&!Y)throw Error("Config must either be an object or a string");if(Y)return{apiVersion:X};if(Object.keys(X).filter((U)=>!w3.includes(U)).length>0)throw Error(`Config object may only contain the following: ${w3.join(", ")}`);return X},parseEventNotification(X,Y,G,V,U,W){this.webhooks.signature.verifyHeader(X,Y,G,V||this.webhooks.DEFAULT_TOLERANCE,U,W);let B=X instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(X)):JSON.parse(X);if(B&&B.object==="event")throw Error("You passed a webhook payload to stripe.parseEventNotification, which expects an event notification. Use stripe.webhooks.constructEvent instead.");if(B.context)B.context=G3.StripeContext.parse(B.context);return B.fetchEvent=()=>{return this._requestSender._rawRequest("GET",`/v2/core/events/${B.id}`,void 0,{stripeContext:B.context,headers:{"Stripe-Request-Trigger":`event=${B.id}`}},["fetch_event"])},B.fetchRelatedObject=()=>{if(!B.related_object)return Promise.resolve(null);return this._requestSender._rawRequest("GET",B.related_object.url,void 0,{stripeContext:B.context,headers:{"Stripe-Request-Trigger":`event=${B.id}`}},["fetch_related_object"])},B}},Q}O3.createStripe=JH});var C3=K((F3,B8)=>{Object.defineProperty(F3,"__esModule",{value:!0});var QH=bZ(),XH=E3(),YH=I8(),W9=(0,XH.createStripe)(new QH.NodePlatformFunctions);B8.exports=W9;B8.exports.Stripe=W9;B8.exports.default=W9;B8.exports.Decimal=YH.Decimal});import"@stacksjs/validation";import{log as Q$}from"@stacksjs/cli";import{db as w9}from"@stacksjs/database";async function ZB($,Z={}){let{olderThanDays:J=30,column:Q="created_at",query:X}=Z;try{if(X){let W=w9.deleteFrom($);W=X(W);let B=await W.execute(),z=Array.isArray(B)?B:[B],L=Number(z[0]?.numDeletedRows??z.length??0);return Q$.info(`Pruned ${L} records from ${$}`),L}let Y=new Date;Y.setDate(Y.getDate()-J);let G=await w9.deleteFrom($).where(Q,"<",Y.toISOString()).execute(),V=Array.isArray(G)?G:[G],U=Number(V[0]?.numDeletedRows??V.length??0);return Q$.info(`Pruned ${U} records from ${$} older than ${J} days`),U}catch(Y){throw Q$.error(`Failed to prune ${$}:`,Y),Y}}async function $T($,Z={}){return ZB($,Z)}function ZT($){if(!$?.prunable)return null;if(typeof $.prunable==="boolean")return{olderThanDays:30,column:"created_at"};return $.prunable}import{createCipheriv as JB,createDecipheriv as QB,createHash as XB,randomBytes as YB}from"crypto";import{log as H8}from"@stacksjs/logging";var T9="enc:",D9="aes-256-gcm",GB=12,K8=null;async function O9(){if(K8)return K8;let $=process.env.APP_KEY;if(!$)try{$=(await import("@stacksjs/config").catch(()=>null))?.config?.app?.key}catch{}if(!$)return null;return K8=XB("sha256").update($).digest(),K8}function S0($){return typeof $==="string"&&$.startsWith(T9)}async function X$($){if($==null)return $;if(S0($))return $;if(typeof $!=="string")return $;let Z=await O9();if(!Z)return H8.warn("[orm] encrypted attribute: APP_KEY not set \u2014 storing value in plaintext"),$;let J=YB(GB),Q=JB(D9,Z,J),X=Buffer.concat([Q.update($,"utf8"),Q.final()]),Y=Q.getAuthTag();return`${T9}${J.toString("base64")}:${Y.toString("base64")}:${X.toString("base64")}`}async function Y$($){if($==null)return $;if(typeof $!=="string")return $;if(!S0($))return $;try{let Z=await O9();if(!Z)return H8.warn("[orm] encrypted attribute: APP_KEY not set \u2014 cannot decrypt"),null;let[,J,Q,X]=$.split(":");if(!J||!Q||!X)return H8.warn("[orm] encrypted attribute: malformed envelope, returning null"),null;let Y=Buffer.from(J,"base64"),G=Buffer.from(Q,"base64"),V=Buffer.from(X,"base64"),U=QB(D9,Z,Y);return U.setAuthTag(G),Buffer.concat([U.update(V),U.final()]).toString("utf8")}catch(Z){return H8.warn("[orm] encrypted attribute: decrypt failed (key rotation? corrupted ciphertext?)",{error:Z}),null}}function G$($){let Z=$.attributes;if(!Z||typeof Z!=="object")return[];let J=[];for(let[Q,X]of Object.entries(Z))if(X&&typeof X==="object"&&X.encrypted===!0)J.push(Q);return J}import{log as y0}from"@stacksjs/logging";var VB=[/^password$/i,/^password_hash$/i,/^api_key$/i,/_token$/i,/_secret$/i,/^remember_token$/i],E9="model_audits",W$=null;function BB($){W$=$}async function V$(){if(W$!=null)return W$;try{let $=await import("@stacksjs/router").catch(()=>null);if(!$)return null;let Z=$.getCurrentRequest;if(typeof Z!=="function")return null;let J=Z();if(!J)return null;return(J.user??J._user)?.id??null}catch{return null}}function w8($){if(!$||typeof $!=="object")return null;let Z={};for(let[J,Q]of Object.entries($)){if(VB.some((X)=>X.test(J)))continue;Z[J]=Q}return Z}function R0($){if(!$||typeof $!=="object")return null;let Z=$;if(Z._attributes&&typeof Z._attributes==="object")return{...Z._attributes};return{...$}}function WB($,Z){if(!$||!Z)return{old:$,next:Z};let J={},Q={},X=new Set([...Object.keys($),...Object.keys(Z)]);for(let Y of X)if($[Y]!==Z[Y])J[Y]=$[Y],Q[Y]=Z[Y];return{old:J,next:Q}}async function B$($,Z=!1){try{let{db:J}=await import("@stacksjs/database");await J.insertInto(E9).values({auditable_type:$.auditable_type,auditable_id:$.auditable_id,event:$.event,old_values:$.old_values?JSON.stringify($.old_values):null,new_values:$.new_values?JSON.stringify($.new_values):null,user_id:$.user_id,created_at:new Date().toISOString()}).executeTakeFirst()}catch(J){if(y0.warn(`[orm] audit row write failed for ${$.auditable_type}#${String($.auditable_id)} (${$.event})`,{error:J}),Z)throw J}}function F9($){return{async audits(Z){try{let{db:J}=await import("@stacksjs/database");return(await J.selectFrom(E9).selectAll().where("auditable_type","=",$).where("auditable_id","=",Z).orderBy("created_at","desc").execute()??[]).map((X)=>({...X,old_values:typeof X.old_values==="string"?q9(X.old_values):X.old_values,new_values:typeof X.new_values==="string"?q9(X.new_values):X.new_values}))}catch(J){return y0.warn(`[orm] audits() lookup failed for ${$}#${String(Z)}`,{error:J}),[]}}}}function q9($){try{return JSON.parse($)}catch{return $}}function C9($){if($&&typeof $==="object"&&"transactional"in $)return{transactional:$.transactional===!0};return{transactional:!1}}function k9($,Z,J="id",Q={}){let X=Q.transactional===!0,Y=$;if(typeof $.audits!=="function")$.audits=F9(Z).audits;let G=async(B)=>{if(!X)return await B();let{db:z}=await import("@stacksjs/database");return await z.transaction(async()=>B())},V=$.create;if(typeof V==="function")$.create=async function(...B){return await G(async()=>{let z=await V.apply(this,B);try{let L=R0(z),H=L?.[J];if(H!=null){let T=await V$();await B$({auditable_type:Z,auditable_id:H,event:"created",old_values:null,new_values:w8(L),user_id:T},X)}}catch(L){if(y0.warn(`[orm] audit(create) failed for ${Z}`,{error:L}),X)throw L}return z})};let U=$.update;if(typeof U==="function")$.update=async function(B,z){return await G(async()=>{let L=Y.find,H=typeof L==="function"?R0(await L.call(Y,B)):null,T=await U.call(this,B,z);try{let D=R0(T)??(typeof L==="function"?R0(await L.call(Y,B)):null),{old:q,next:O}=WB(H,D);if(O&&Object.keys(O).length>0){let k=await V$();await B$({auditable_type:Z,auditable_id:B,event:"updated",old_values:w8(q),new_values:w8(O),user_id:k},X)}}catch(D){if(y0.warn(`[orm] audit(update) failed for ${Z}#${String(B)}`,{error:D}),X)throw D}return T})};let W=(B)=>{let z=$[B];if(typeof z!=="function")return;$[B]=async function(L){return await G(async()=>{let H=Y.find,T=typeof H==="function"?R0(await H.call(Y,L)):null,D=await z.call(this,L);try{if(D!==!1&&T){let q=await V$();await B$({auditable_type:Z,auditable_id:L,event:"deleted",old_values:w8(T),new_values:null,user_id:q},X)}}catch(q){if(y0.warn(`[orm] audit(${B}) failed for ${Z}#${String(L)}`,{error:q}),X)throw q}return D})}};W("delete"),W("softDelete")}function A9($){let Z=$;return Z?.code==="SQLITE_CONSTRAINT_UNIQUE"||Z?.code==="SQLITE_CONSTRAINT"||Z?.code==="23505"||Z?.errno===1062||/unique|duplicate/i.test(Z?.message??"")}function UB($,Z,J){let Q=$;if($ instanceof Error&&typeof Q.status==="number"&&Number.isInteger(Q.status)&&Q.status>=400&&Q.status<600){let X={error:$.message};if(Q.details!==void 0)X.details=Q.details;return{status:Q.status,body:X}}if(A9($))return{status:409,body:{error:`${Z} already exists`}};return{status:500,body:{error:`Failed to ${J} ${Z}`,detail:String($)}}}import{cacheRequestQuery as zB}from"@stacksjs/router";var T8=new WeakMap;function UT($,Z){return zB(`batchLoad:${$.name??"model"}:${String(Z)}`,async()=>{return new Promise((J,Q)=>{let X=T8.get($);if(!X)X={keys:[],resolvers:[],scheduled:!1},T8.set($,X);if(X.keys.push(Z),X.resolvers.push({key:Z,resolve:J,reject:Q}),X.scheduled)return;X.scheduled=!0,Promise.resolve().then(async()=>{let Y=T8.get($);if(!Y)return;T8.delete($);let G=Array.from(new Set(Y.keys));try{let V=typeof $.findMany==="function"?await $.findMany(G):await Promise.all(G.map((W)=>$.find?.(W))),U=new Map;for(let W of V??[]){let B=W?.id;if(B!==void 0)U.set(B,W)}for(let W of Y.resolvers)W.resolve(U.get(W.key))}catch(V){for(let U of Y.resolvers)U.reject(V)}})})})}import{db as HT}from"@stacksjs/database";class LB{conditions=[];where($,...Z){let[J,Q]=Z,X=Q===void 0?"=":J,Y=Q===void 0?J:Q;this.addCondition("and","where",$,X,Y)}orWhere($,...Z){let[J,Q]=Z,X=Q===void 0?"=":J,Y=Q===void 0?J:Q;this.addCondition("or","where",$,X,Y)}whereIn($,Z){this.conditions.push({type:"and",method:"whereIn",column:$,values:Z})}whereNotIn($,Z){this.conditions.push({type:"and",method:"whereIn",column:$,values:Z,operator:"not in"})}whereNull($){this.conditions.push({type:"and",method:"whereNull",column:$})}whereNotNull($){this.conditions.push({type:"and",method:"whereNotNull",column:$})}whereBetween($,Z){this.conditions.push({type:"and",method:"whereBetween",column:$,range:Z})}whereExists($){this.conditions.push({type:"and",method:"whereExists",column:"",callback:$})}addCondition($,Z,J,Q,X){this.conditions.push({type:$,method:Z,column:J,operator:Q,value:X})}getConditions(){return this.conditions}}import{db as D8,runInTransactionScope as KB}from"@stacksjs/database";async function DT($,Z){return await KB(async()=>{return await D8.transaction($,Z)})}function OT($){return D8.transaction(async()=>{await $()})}async function qT($){return await D8.savepoint($)}function ET($,Z){return D8.transactional($,Z)}import{path as p}from"@stacksjs/path";import{fs as L0,globSync as K$}from"@stacksjs/storage";import{plural as S9,singular as N9,snakeCase as b}from"@stacksjs/strings";import{isString as O8}from"@stacksjs/validation";async function xT($){if(typeof $==="string")$=(await import($)).default;return $.table??b(S9($?.name||""))}function v0($,Z){if($.name)return $.name;return p.basename(Z).replace(/\.ts$/,"")}function u($,Z){if($.table)return $.table;return b(S9(v0($,Z)))}function HB($,Z){let J=[$,Z];return J.sort(),J.join("_")}function IT($,Z){return Z in $}async function wB($,Z){let J=[];if($.hasOne)for(let Q of $.hasOne)J.push(await U$(Q,$,Z,"hasOne"));if($.hasMany)for(let Q of $.hasMany)J.push(await U$(Q,$,Z,"hasMany"));if($.belongsTo)for(let Q of $.belongsTo)J.push(await U$(Q,$,Z,"belongsTo"));if($.hasOneThrough)for(let Q of $.hasOneThrough)J.push(await I9(Q,$,Z,"hasOneThrough"));if($.hasManyThrough)for(let Q of $.hasManyThrough)J.push(await I9(Q,$,Z,"hasManyThrough"));if($.belongsToMany)for(let Q of $.belongsToMany)J.push(await DB(Q,$,Z,"belongsToMany"));if($.morphOne)J.push(await P9($.morphOne,$,Z,"morphOne"));if($.morphMany){let Q=Array.isArray($.morphMany)?$.morphMany:[$.morphMany];for(let X of Q)J.push(await P9(X,$,Z,"morphMany"))}if($.morphTo){let Q=$.morphTo,X=Array.isArray(Q)?Q:typeof Q==="object"&&Q!==null?[Q]:[];for(let Y of X)J.push(TB(Y,$,Z))}if($.morphToMany){let Q=Array.isArray($.morphToMany)?$.morphToMany:[$.morphToMany];for(let X of Q)J.push(x9(X,$,Z,"morphToMany"))}if($.morphedByMany){let Q=Array.isArray($.morphedByMany)?$.morphedByMany:[$.morphedByMany];for(let X of Q)J.push(x9(X,$,Z,"morphedByMany"))}return J}function TB($,Z,J){let Q=$&&typeof $==="object"&&$.name?String($.name):`${b(J)}able`,X=$?.type||`${Q}_type`;return{relationship:"morphTo",model:"",table:"",relationTable:"",foreignKey:$?.id||`${Q}_id`,modelKey:X,relationName:Q,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:"",pivotKey:"",pivotTable:""}}function x9($,Z,J,Q){let X=typeof $==="object"&&$!==null,Y=X?String($.model||""):String($),G=X&&$.morphName?String($.morphName):`${b(J)}able`,V=X&&$.pivotTable?String($.pivotTable):G,U=X&&$.id||`${G}_id`,W=X&&$.type||`${G}_type`;return{relationship:Q,model:Y,table:"",relationTable:"",foreignKey:U,modelKey:W,relationName:G,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:U,pivotKey:W,pivotTable:V}}async function q8($,Z){let J=L$(`${Z}.ts`),Q=L$(`${$}.ts`),X=z$(`${$}.ts`),Y=z$(`${Z}.ts`);if(!J&&!Y)throw Error(`Model not found: ${Z}`);if(!Q&&!X)throw Error(`Model not found: ${$}`);let G;try{if(L0.existsSync(J))G=(await import(J)).default;else G=(await import(Y)).default}catch(U){throw Error(`Failed to load model: ${Z}. Error: ${U?.message||"Unknown error"}`)}let V=L0.existsSync(Q)?Q:X;return{modelRelation:G,modelPath:V,modelRelationPath:L0.existsSync(J)?J:Y}}async function I9($,Z,J,Q){let X="",Y="",G="",V="";if(O8($))X=$;else X=$.model,Y=$.relationName||"",G=$.through,V=$.throughForeignKey||"";let{modelRelation:U,modelPath:W,modelRelationPath:B}=await q8(J,X),z=u(U,B),L=u(Z,W),H=b(v0(U,B)),T=b(J);return{relationship:Q,model:X,table:z,relationTable:L,foreignKey:`${T}_id`,modelKey:`${H}_id`,relationName:Y,relationModel:J,throughModel:G,throughForeignKey:V,pivotForeign:`${T}_id`,pivotKey:`${H}_id`,pivotTable:L}}async function DB($,Z,J,Q){let X="",Y="",G="",V=b(J);if(O8($))X=$;else X=$.model,Y=$.pivotTable||"",G=$.firstForeignKey||`${V}_id`;let{modelRelation:U,modelPath:W,modelRelationPath:B}=await q8(J,X),z=u(U,B),L=u(Z,W),H=b(v0(U,B));return{relationship:Q,model:X,table:z,relationTable:L,foreignKey:typeof $==="string"?`${V}_id`:$.firstForeignKey||`${V}_id`,modelKey:typeof $==="string"?`${H}_id`:$.secondForeignKey||`${H}_id`,relationName:"",relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:G,pivotKey:`${H}_id`,pivotTable:Y}}async function P9($,Z,J,Q){let X="",Y="",G="",V="";if(O8($))X=$,Y=`${b(J)}able`;else X=$.model,Y=$.morphName||`${b(J)}able`,G=$.type||`${Y}_type`,V=$.id||`${Y}_id`;let{modelRelation:U,modelPath:W,modelRelationPath:B}=await q8(J,X),z=u(U,B),L=u(Z,W);return{relationship:Q,model:X,table:z,relationTable:L,foreignKey:V||`${Y}_id`,modelKey:G||`${Y}_type`,relationName:Y,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:"",pivotKey:"",pivotTable:L}}async function U$($,Z,J,Q){let X="",Y="";if(O8($))X=$;else X=$.model,Y=$.relationName||"";let{modelRelation:G,modelPath:V,modelRelationPath:U}=await q8(J,X),W=u(G,U),B=u(Z,V),z=b(v0(G,U)),L=b(J),H={relationship:Q,model:X,table:W,relationTable:B,foreignKey:typeof $==="string"?`${L}_id`:$.foreignKey||`${L}_id`,modelKey:`${z}_id`,relationName:Y,relationModel:J,throughModel:"",throughForeignKey:"",pivotForeign:`${L}_id`,pivotKey:`${z}_id`,pivotTable:B};if(Q==="belongsTo")H.foreignKey="";return H}function PT($){let Z=/belongs/,J=/has/,Q=/Through/,X=/morph/;if(Q.test($))return"throughType";if(Z.test($))return"belongsType";if(J.test($))return"hasType";if(X.test($))return"morphType";return""}function ST($){let Z=/One/;if(/Many/.test($))return"many";if(Z.test($))return"one";return""}async function RT($,Z){let J=[];if("belongsToMany"in $){let Q=$.belongsToMany||[];for(let X of Q){let Y,G;if(typeof X==="string")G=X;else G=X.model;let V=L$(`${G}.ts`),U=z$(`${G}.ts`);if(L0.existsSync(V))Y=(await import(V)).default;else Y=(await import(U)).default;let W=u(Y,V),B=u($,Z),z=typeof X==="object"&&"firstForeignKey"in X?X.firstForeignKey:`${N9(B)}_${$.primaryKey}`,L=typeof X==="object"&&"secondForeignKey"in X?X.secondForeignKey:`${N9(W)}_${$.primaryKey}`;J.push({table:(typeof X==="object"&&"pivotTable"in X?X.pivotTable:void 0)??HB(B,W),firstForeignKey:z,secondForeignKey:L})}return J}return[]}async function yT($){let Z=K$([p.userModelsPath("*.ts"),p.storagePath("framework/defaults/app/Models/**/*.ts")],{absolute:!0}),J=[];for(let Q=0;Q<Z.length;Q++){let X=Z[Q],Y=await import(X);if($===Y.default.name)continue;let G=v0(Y,X),V=await wB(Y.default,G);if(!V.length)continue;let U=V.find((W)=>W.model===$);if(U)J.push(U)}return J}function vT($){if($===void 0)return[];return Object.keys($).filter((Z)=>{return $[Z]?.hidden===!0})}function bT($){let Z=$.attributes;if(Z===void 0)return[];return Object.keys(Z).filter((J)=>{return Z[J]?.guarded===!0}).map((J)=>b(J))}function jT($,Z){let J=$.attributes,Q=[];if(J===void 0)return[];let X=typeof $.traits?.billable==="object"||typeof $.traits?.billable==="boolean",Y=typeof $.traits?.useAuth==="object"?$.traits?.useAuth.usePasskey:!1,G=$.traits?.useUuid||!1;if(X)Q.push("stripe_id");if(G)Q.push("uuid");if(Y)Q.push(...["two_factor_secret","public_key"]);let V=Z.map((U)=>U.foreignKey).filter((U)=>U);return[...Object.keys(J).filter((U)=>{if(J===void 0)return!1;return J[U]?.fillable===!0}).map((U)=>b(U)),...Q,...V]}async function fT($,Z){let J=$.attributes;if(!J)J={};let Q=Object.keys(J),X=[],Y=Bun.file(Z),G="";try{if(await Y.exists())G=await Y.text()}catch{G=""}let V=/rule:.*$/gm,U;U=V.exec(G);while(U!==null)X.push(U[0]),U=V.exec(G);return Q.map((B,z)=>{let L=J[B],H=null,T=!1,D=!1,q=!1,O=!1;if(L)H=L||null,T=L.unique||!1,D=L.hidden||!1,q=L.fillable||!1;let k=X[z]??"";return O=(L.validation?.rule).isRequired??!1,{field:B,default:H,unique:T,hidden:D,fillable:q,required:O,fieldArray:OB(k)}})}function OB($){let Z=$.split("rule: schema.");if(Z.length!==2)return null;if(!Z[1])Z[1]="";let J=Z[1].replace(/,/g,"");if(!J)return null;let Q=J.split("."),X=/\(([^)]+)\)/;return Q.map((Y)=>{let G=X.exec(Y),V=G?G[1]:null;return{entity:Y.replace(X,"").replace(/\(|\)/g,""),charValue:V}})[0]||null}function MT($){let Z=$.fieldArray?.entity;switch(Z){case"enum":return"string | string[]";case"date":return"Date | string";case"timestamp":return"Date | string";case"datetime":return"Date | string";case"float":return"number";case"double":return"number";case"decimal":return"number";case"integer":return"number";case"bigint":return"number";default:return Z}}function z$($){let Z=p.join(p.storagePath("framework/defaults/app/Models"),"/"),J=p.join(Z,$);if(L0.existsSync(J))return J;return K$(`${Z}**/${$}`,{absolute:!0})[0]??""}function L$($){let Z=p.join(p.userModelsPath("/"),"/"),J=p.join(Z,$);if(L0.existsSync(J))return J;return K$(`${Z}**/${$}`,{absolute:!0})[0]??""}function _T($){let Z=typeof $==="number"?new Date($):typeof $==="string"?new Date($):$;if(Number.isNaN(Z.getTime()))throw Error(`Invalid date value: ${String($)}`);return Z.toISOString().replace("T"," ").split(".")[0]??""}function gT($){return $.toISOString().split("T")[0]??""}function hT($){return $.getTime()}import{createModel as UH,registerModel as zH}from"@stacksjs/query-builder";import{log as h}from"@stacksjs/logging";import{snakeCase as Z$}from"@stacksjs/strings";import{AsyncLocalStorage as LH}from"async_hooks";function qB($){if($===null||typeof $!=="object")return!1;let Z=$;return Array.isArray(Z.data)&&typeof Z.current_page==="number"&&typeof Z.per_page==="number"&&typeof Z.total==="number"&&typeof Z.last_page==="number"}function EB($){if($===null||typeof $!=="object")return!1;let Z=$;return Array.isArray(Z.data)&&typeof Z.current_page==="number"&&typeof Z.per_page==="number"&&typeof Z.has_more_pages==="boolean"&&!("total"in Z)}function FB($){if($===null||typeof $!=="object")return!1;let Z=$;return Array.isArray(Z.data)&&(typeof Z.next_cursor==="string"||Z.next_cursor===null)}function H$($){let{data:Z}=$,{perPage:J,page:Q,total:X,lastPage:Y}=$.meta,G=Z.length===0,V=G?null:(Q-1)*J+1,U=G?null:V+Z.length-1;return{data:Z,current_page:Q,per_page:J,total:X,last_page:Y,from:V,to:U,has_more_pages:Q<Y}}function w$($){return{data:$.data,current_page:$.meta.page,per_page:$.meta.perPage,has_more_pages:$.meta.hasMore}}function T$($){return{data:$.data,per_page:$.meta.perPage,next_cursor:R9($.meta.nextCursor),prev_cursor:R9($.meta.prevCursor),has_more_pages:$.meta.nextCursor!==null&&$.meta.nextCursor!==void 0}}function R9($){if($===null||$===void 0)return null;if(typeof $==="string")return $;return JSON.stringify($)}function O$($,Z){let J=F$(),Q=J?D$(J,"per_page"):void 0,X=J?D$(J,"page"):void 0,Y=$!==void 0?Math.max(1,Math.floor($)):Math.min(100,Math.max(1,Q??15)),G=Math.max(1,Math.floor(Z??X??1));return{perPage:Y,page:G}}function q$($,Z){let J=F$(),Q=J?v9(J,"cursor"):void 0,X=J?D$(J,"per_page"):void 0,Y=$!==void 0?Math.max(1,Math.floor($)):Math.min(100,Math.max(1,X??15)),V=y9(Z!==void 0?Z:Q??null);return{perPage:Y,cursor:V}}function y9($){if($===null||$===void 0)return null;if(Array.isArray($))return $;if(typeof $==="string"&&$.startsWith("["))try{let Z=JSON.parse($);if(Array.isArray(Z))return Z}catch{}return $}function E$($){let Z=F$();if(!Z)return $;let J=(()=>{try{return new URL(Z.url)}catch{return null}})();if(!J)return $;let Q=J.pathname;if($.path=Q,"next_cursor"in $)return $.next_page_url=$.next_cursor!==null?$0(J,{cursor:$.next_cursor}):null,$.prev_page_url=$.prev_cursor!==null?$0(J,{cursor:$.prev_cursor}):null,$;let X=$.current_page;if($.prev_page_url=X>1?$0(J,{page:X-1}):null,"total"in $){let Y=$.last_page;$.next_page_url=X<Y?$0(J,{page:X+1}):null,$.first_page_url=$0(J,{page:1}),$.last_page_url=$0(J,{page:Y})}else $.next_page_url=$.has_more_pages?$0(J,{page:X+1}):null;return $}function $0($,Z){let J=new URL($.toString());for(let[Q,X]of Object.entries(Z))J.searchParams.set(Q,String(X));return`${J.pathname}${J.search}`}var K0;function F$(){if(K0===null)return;if(K0===void 0)try{let Z=C("@stacksjs/router");if(typeof Z.getCurrentRequest==="function")K0=Z.getCurrentRequest;else{K0=null;return}}catch{K0=null;return}return K0()}function D$($,Z){let J=v9($,Z);if(J===void 0)return;let Q=Number(J);return Number.isFinite(Q)?Q:void 0}function v9($,Z){let J=$.query?.[Z];if(J===void 0)return;return Array.isArray(J)?J[0]:J}import{db as CB,sql as kB}from"@stacksjs/database";function C$($,Z){if(typeof $!=="number"||!Number.isFinite($)||$<=0)throw Error(`[orm/taggable] ${Z} requires a positive numeric id (received ${String($)})`)}function b9($){let Z=CB;return{async tags(J){return C$(J,"tags"),await Z.selectFrom("taggable").where("taggable_id","=",J).where("taggable_type","=",$).selectAll().execute()},async tagCount(J){C$(J,"tagCount");let Q=await Z.selectFrom("taggable").select(kB`count(*) as count`).where("taggable_id","=",J).where("taggable_type","=",$).executeTakeFirst();return Number(Q?.count)||0},async addTag(J,Q){if(C$(J,"addTag"),!Q||typeof Q.name!=="string"||Q.name.trim().length===0)throw Error("[orm/taggable] addTag requires a non-empty tag.name");return await Z.insertInto("taggable").values({...Q,taggable_id:J,taggable_type:$,slug:Q.name.toLowerCase().replace(/[^a-z0-9]+/g,"-"),order:0,is_active:!0,created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).returningAll().executeTakeFirst()},async activeTags(J){return await Z.selectFrom("taggable").where("taggable_id","=",J).where("taggable_type","=",$).where("is_active","=",!0).selectAll().execute()},async inactiveTags(J){return await Z.selectFrom("taggable").where("taggable_id","=",J).where("taggable_type","=",$).where("is_active","=",!1).selectAll().execute()},async removeTag(J,Q){await Z.deleteFrom("taggable").where("taggable_id","=",J).where("taggable_type","=",$).where("id","=",Q).execute()}}}import{db as AB}from"@stacksjs/database";function j9($){let Z=AB;async function J(Q){return(await Z.selectFrom("categorizable_models").where("categorizable_id","=",Q).where("categorizable_type","=",$).selectAll().execute()).map((Y)=>Y.category_id)}return{async categories(Q){let X=await J(Q);if(X.length===0)return[];return await Z.selectFrom("categorizable").where("id","in",X).selectAll().execute()},async categoryCount(Q){return(await J(Q)).length},async addCategory(Q,X){let Y=await Z.selectFrom("categorizable").where("name","=",X.name).selectAll().executeTakeFirst();if(!Y)Y=await Z.insertInto("categorizable").values({name:X.name,description:X.description,slug:X.name.toLowerCase().replace(/[^a-z0-9]+/g,"-"),is_active:!0,created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).returningAll().executeTakeFirst();return await Z.insertInto("categorizable_models").values({categorizable_id:Q,categorizable_type:$,category_id:Y.id,created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).returningAll().executeTakeFirst()},async activeCategories(Q){let X=await J(Q);if(X.length===0)return[];return await Z.selectFrom("categorizable").where("id","in",X).where("is_active","=",!0).selectAll().execute()},async inactiveCategories(Q){let X=await J(Q);if(X.length===0)return[];return await Z.selectFrom("categorizable").where("id","in",X).where("is_active","=",!1).selectAll().execute()},async removeCategory(Q,X){await Z.deleteFrom("categorizable_models").where("categorizable_id","=",Q).where("categorizable_type","=",$).where("category_id","=",X).execute()}}}import{db as NB,sql as xB}from"@stacksjs/database";function f9($,Z){if(typeof $!=="number"||!Number.isFinite($)||$<=0)throw Error(`[orm/commentable] ${Z} requires a positive numeric id (received ${String($)})`)}function M9($){let Z=NB;return{async comments(J){return f9(J,"comments"),await Z.selectFrom("comments").where("commentables_id","=",J).where("commentables_type","=",$).selectAll().execute()},async commentCount(J){let Q=await Z.selectFrom("comments").select(xB`count(*) as count`).where("commentables_id","=",J).where("commentables_type","=",$).executeTakeFirst();return Number(Q?.count)||0},async addComment(J,Q){if(f9(J,"addComment"),!Q||typeof Q.title!=="string"||Q.title.trim().length===0)throw Error("[orm/commentable] addComment requires a non-empty comment.title");if(typeof Q.body!=="string"||Q.body.trim().length===0)throw Error("[orm/commentable] addComment requires a non-empty comment.body");return await Z.insertInto("comments").values({...Q,commentables_id:J,commentables_type:$,status:"pending",created_at:new Date().toISOString(),updated_at:new Date().toISOString()}).returningAll().executeTakeFirst()},async approvedComments(J){return await Z.selectFrom("comments").where("commentables_id","=",J).where("commentables_type","=",$).where("status","=","approved").selectAll().execute()},async pendingComments(J){return await Z.selectFrom("comments").where("commentables_id","=",J).where("commentables_type","=",$).where("status","=","pending").selectAll().execute()},async rejectedComments(J){return await Z.selectFrom("comments").where("commentables_id","=",J).where("commentables_type","=",$).where("status","=","rejected").selectAll().execute()}}}import{db as GH}from"@stacksjs/database";function k3($){let Z=GH;return{async createStripeUser(J,Q){let{manageCustomer:X}=await import("@stacksjs/payments");return await X.createStripeCustomer(J,Q)},async updateStripeUser(J,Q){let{manageCustomer:X}=await import("@stacksjs/payments");return await X.updateStripeCustomer(J,Q)},async deleteStripeUser(J){let{manageCustomer:Q}=await import("@stacksjs/payments");return await Q.deleteStripeUser(J)},async createOrGetStripeUser(J,Q){let{manageCustomer:X}=await import("@stacksjs/payments");return await X.createOrGetStripeUser(J,Q)},async retrieveStripeUser(J){let{manageCustomer:Q}=await import("@stacksjs/payments");return await Q.retrieveStripeUser(J)},async defaultPaymentMethod(J){let{managePaymentMethod:Q}=await import("@stacksjs/payments");return await Q.retrieveDefaultPaymentMethod(J)},async setDefaultPaymentMethod(J,Q){let{managePaymentMethod:X}=await import("@stacksjs/payments");return await X.setDefaultPaymentMethod(J,Q)},async addPaymentMethod(J,Q){let{managePaymentMethod:X}=await import("@stacksjs/payments");return await X.addPaymentMethod(J,Q)},async paymentMethods(J,Q){let{managePaymentMethod:X}=await import("@stacksjs/payments");return await X.listPaymentMethods(J,Q)},async newSubscription(J,Q,X,Y={}){let{manageSubscription:G}=await import("@stacksjs/payments"),V=await G.create(J,Q,X,Y),W=V.latest_invoice?.payment_intent;return{subscription:V,paymentIntent:W}},async updateSubscription(J,Q,X,Y={}){let{manageSubscription:G}=await import("@stacksjs/payments"),V=await G.update(J,Q,X,Y),W=V.latest_invoice?.payment_intent;return{subscription:V,paymentIntent:W}},async cancelSubscription(J,Q,X={}){let{manageSubscription:Y}=await import("@stacksjs/payments");return{subscription:await Y.cancel(Q,X)}},async activeSubscription(J){let{manageSubscription:Q}=await import("@stacksjs/payments"),X=await Z.selectFrom("subscriptions").where("user_id","=",J.id).where("provider_status","=","active").selectAll().executeTakeFirst();if(X){let Y=await Q.retrieve(J,X.provider_id||"");return{subscription:X,providerSubscription:Y}}return},async checkout(J,Q,X={}){let{manageCheckout:Y,manageCustomer:G}=await import("@stacksjs/payments"),V={};if(X.enableTax)V.automatic_tax={enabled:!0},delete X.enableTax;if(X.allowPromotions)V.allow_promotion_codes=!0,delete X.allowPromotions;let B={...{mode:"payment",customer:(await G.createOrGetStripeUser(J,{})).id,line_items:Q.map((z)=>({price:z.priceId,quantity:z.quantity||1}))},...V,...X};return await Y.create(J,B)},async createSetupIntent(J,Q={}){let{manageSetupIntent:X}=await import("@stacksjs/payments");return await X.create(J,Q)},async subscriptionHistory(J){let{manageInvoice:Q}=await import("@stacksjs/payments");return await Q.list(J)},async transactionHistory(J){let{manageTransaction:Q}=await import("@stacksjs/payments");return await Q.list(J)},async connectAccount(J,Q={}){let X=Q.accountColumn||"stripe_account_id",Y=(J._attributes??J)[X];if(!Y)return null;let G=await W8();try{return await G.accounts.retrieve(Y)}catch{return null}},async createConnectAccount(J,Q={}){let X=Q.accountColumn||"stripe_account_id",Y=J._attributes??J,G=Y[X],V=await W8();if(!G){let{stacksIdempotencyKey:U}=await import("@stacksjs/payments"),W=Q.modelTable||$,B=await V.accounts.create({type:Q.type??"express",email:Q.email??Y.email,country:Q.country??"US",capabilities:Q.capabilities??{card_payments:{requested:!0},transfers:{requested:!0}}},{idempotencyKey:U("connect.account.create",W,Y.id)});return G=B.id,await Z.updateTable(W).set({[X]:G}).where("id","=",Number(Y.id)).execute(),B}return await V.accounts.retrieve(G)},async connectOnboardLink(J,Q){let X=Q.accountColumn||"stripe_account_id",G=(J._attributes??J)[X];if(!G)throw Error("connectOnboardLink: model has no Stripe Connect account; call createConnectAccount first");return{url:(await(await W8()).accountLinks.create({account:G,refresh_url:Q.refreshUrl,return_url:Q.returnUrl,type:Q.type??"account_onboarding"})).url,accountId:G}},async syncConnectStatus(J,Q={}){let X=Q.accountColumn||"stripe_account_id",Y=Q.chargesColumn||"charges_enabled",G=Q.payoutsColumn||"payouts_enabled",V=J._attributes??J,U=V[X];if(!U)return{chargesEnabled:!1,payoutsEnabled:!1};let B=await(await W8()).accounts.retrieve(U),z=!!B.charges_enabled,L=!!B.payouts_enabled,H=Q.modelTable||$;return await Z.updateTable(H).set({[Y]:z,[G]:L}).where("id","=",Number(V.id)).execute(),{chargesEnabled:z,payoutsEnabled:L}},async chargeWithSplit(J,Q){let X=await W8(),Y=Q.accountColumn||"stripe_account_id",G=J._attributes??J,V=Q.connectAccountId||G[Y],U={amount:Q.amountCents,currency:Q.currency||"usd",automatic_payment_methods:{enabled:!0},metadata:Q.metadata};if(V){if(U.transfer_data={destination:V},Q.platformFeeCents)U.application_fee_amount=Q.platformFeeCents}let{freshIdempotencyKey:W}=await import("@stacksjs/payments");return await X.paymentIntents.create(U,{idempotencyKey:W("payment_intent.create",G.id,Q.amountCents)})}}}async function W8(){let $=globalThis.process?.env?.STRIPE_SECRET_KEY;if(!$)throw Error("Stripe Connect: STRIPE_SECRET_KEY not configured");return new(await Promise.resolve().then(() => $B(C3(),1))).default($,{apiVersion:"2026-03-25.dahlia"})}import{db as VH}from"@stacksjs/database";function A3($,Z){let J=VH,Q=Z?.table||`${$}_likes`,X=Z?.foreignKey||`${$.replace(/s$/,"")}_id`;return{async likes(Y){return await J.selectFrom(Q).where(X,"=",Y).selectAll().execute()},async likeCount(Y){let G=await J.selectFrom(Q).select("count(*) as count").where(X,"=",Y).executeTakeFirst();return Number(G?.count)||0},async like(Y,G){if(typeof Y!=="number"||!Number.isFinite(Y)||Y<=0)throw Error(`[orm/likeable] like requires a positive numeric id (received ${String(Y)})`);if(typeof G!=="number"||!Number.isFinite(G)||G<=0)throw Error(`[orm/likeable] like requires a positive numeric userId (received ${String(G)})`);let V=new Date().toISOString();try{return await J.insertInto(Q).values({[X]:Y,user_id:G,created_at:V,updated_at:V}).returningAll().executeTakeFirst()}catch(U){let W=U;if(!(W.code==="SQLITE_CONSTRAINT_UNIQUE"||W.code==="SQLITE_CONSTRAINT"||W.code==="23505"||W.errno===1062||/unique|duplicate/i.test(W.message??"")))throw U;let z=await J.selectFrom(Q).where(X,"=",Y).where("user_id","=",G).selectAll().executeTakeFirst();if(z)return z;throw U}},async unlike(Y,G){await J.deleteFrom(Q).where(X,"=",Y).where("user_id","=",G).execute()},async isLiked(Y,G){return!!await J.selectFrom(Q).where(X,"=",Y).where("user_id","=",G).selectAll().executeTakeFirst()},async likedBy(Y){return(await J.selectFrom(Q).select([X]).where("user_id","=",Y).execute()).map((V)=>Number(V[X])).filter(Boolean)}}}function N3(){return{async generateTwoFactorForModel($){let{generateTwoFactorSecret:Z}=await import("@stacksjs/auth"),J=Z();await $.update({two_factor_secret:J})},async verifyTwoFactorCode($,Z){let J=$.get("two_factor_secret");if(typeof J!=="string")return!1;let{verifyTwoFactorCode:Q,RateLimiter:X}=await import("@stacksjs/auth"),Y=String($.id??$.get?.("id")??$.get?.("email")??J),G=`2fa:${Y}`;if(await X.isRateLimited(G)){let{HttpError:U}=await import("@stacksjs/error-handling");throw new U(429,"Too many verification attempts. Please try again later.")}if(!await Q(Z,J))return await X.recordFailedAttempt(G),!1;try{let{cache:U}=await import("@stacksjs/cache"),W=`2fa:used:${Y}:${Z}`;if(await U.has(W))return await X.recordFailedAttempt(G),!1;await U.set(W,"1",90)}catch{}return await X.resetAttempts(G),!0}}}import{log as x0}from"@stacksjs/logging";var e8="deleted_at";function x3($,Z="id"){return{async softDelete(J){let Q=new Date().toISOString(),X=$.where(Z,J);if(typeof X?.update==="function")return await X.update({[e8]:Q}),!0;return!1},async restore(J){let Q=$.where(Z,J);if(typeof Q?.update==="function")return await Q.update({[e8]:null}),!0;return!1},async forceDelete(J){let Q=$.where(Z,J);if(typeof Q?.delete==="function")return await Q.delete(),!0;return!1},withTrashed(){return typeof $.query==="function"?$.query():$},onlyTrashed(){let J=typeof $.query==="function"?$.query():$;if(typeof J?.whereNotNull==="function")return J.whereNotNull(e8);return J?.where?.(e8,"!=",null)??J}}}function I3($){if($===!0||$==null)return{};if(typeof $==="object"&&!Array.isArray($)){let Z=$;if(Array.isArray(Z.cascade)){let J=Z.cascade.filter((Q)=>typeof Q==="string");return J.length?{cascade:J}:{}}return{}}return{}}function BH($,Z){let J=$.hasMany??[],Q=$.hasOne??[],X=J.some((B)=>U9(B,Z,!0)),Y=Q.some((B)=>U9(B,Z,!1));if(!X&&!Y)return x0.warn(`[orm] soft-delete cascade: '${Z}' is not a declared hasMany/hasOne relation \u2014 skipping`),null;let V=(X?J:Q).find((B)=>U9(B,Z,X))??null;if(!V)return null;let W=globalThis[V];if(!W)return x0.warn(`[orm] soft-delete cascade: model '${V}' is not yet on globalThis \u2014 skipping cascade for '${Z}'`),null;return{className:V,model:W}}function U9($,Z,J){let Q=$.toLowerCase();if(Z===Q)return!0;if(J&&Z===`${Q}s`)return!0;if(J&&Q.endsWith("y")&&Z===`${Q.slice(0,-1)}ies`)return!0;return!1}async function WH($,Z,J,Q,X){try{let Y=J.where;if(typeof Y!=="function"){x0.warn(`[orm] cascade ${X}: child model has no .where()`);return}if(X==="softDelete"){let G=J.softDelete;if(typeof G==="function"){let U=Y.call(J,Q,Z),W=typeof U?.get==="function"?await U.get():Array.isArray(U)?U:[],B=J.primaryKey||"id";for(let z of W){let L=z?.[B];if(L!=null)await G.call(J,L)}return}let V=Y.call(J,Q,Z);if(typeof V?.delete==="function"){x0.debug(`[orm] cascade soft-delete: child has no softDeletes trait, hard-deleting from ${String(J.table??"?")}`),await V.delete();return}}else{let G=J.restore;if(typeof G!=="function"){x0.debug("[orm] cascade restore: child has no restore() \u2014 nothing to do");return}let V=J.withTrashed,W=(typeof V==="function"?V.call(J):J).where?.(Q,Z),B=typeof W?.get==="function"?await W.get():[],z=J.primaryKey||"id";for(let L of B){let H=L?.[z];if(H!=null)await G.call(J,H)}}}catch(Y){if(x0.warn(`[orm] soft-delete cascade ${X} on ${$}#${String(Z)} failed`,{error:Y}),process.env.STACKS_ORM_CASCADE_SWALLOW!=="true")throw Y}}async function U8($,Z,J,Q){let X=Z.cascade;if(!X||X.length===0)return;let Y=`${$.name.toLowerCase()}_id`;for(let G of X){let V=BH($,G);if(!V)continue;await WH(V.className,J,V.model,Y,Q)}}var f3=new LH;function W0(){return f3.getStore()?.suppressed===!0}function B0($){return Promise.resolve(f3.run({suppressed:!0},$))}var P3=new Set;function KH($,Z){let J=typeof $==="string"?$.slice(0,80):String($),Q=`${typeof $}:${J}`;if(P3.has(Q))return;P3.add(Q);let X=Z instanceof Error?Z.message:String(Z);console.error(`[orm] JSON cast failed to parse value (returning null): ${X} \u2014 value preview: ${JSON.stringify(J)}`)}var HH={string:{get:($)=>$!=null?String($):null,set:($)=>$!=null?String($):null},number:{get:($)=>$!=null?Number($):null,set:($)=>$!=null?Number($):null},integer:{get:($)=>$!=null?Math.trunc(Number($)):null,set:($)=>$!=null?Math.trunc(Number($)):null},float:{get:($)=>$!=null?Number.parseFloat(String($)):null,set:($)=>$!=null?Number.parseFloat(String($)):null},boolean:{get:($)=>$===1||$==="1"||$===!0||$==="true",set:($)=>$===!0||$===1||$==="1"||$==="true"?1:0},json:{get:($)=>{if($==null)return null;if(typeof $==="string")try{return JSON.parse($)}catch(Z){return KH($,Z),null}return $},set:($)=>{if($==null)return null;return typeof $==="string"?$:JSON.stringify($)}},datetime:{get:($)=>$?new Date($):null,set:($)=>$ instanceof Date?$.toISOString():$},date:{get:($)=>$?new Date($):null,set:($)=>$ instanceof Date?$.toISOString().split("T")[0]:$},array:{get:($)=>{if($==null)return[];if(Array.isArray($))return $;if(typeof $==="string")try{return JSON.parse($)}catch{return[]}return[]},set:($)=>{if($==null)return null;return Array.isArray($)?JSON.stringify($):$}}};function M3($){return typeof $==="string"?HH[$]:$}function S3($,Z,J){if(!$||typeof $!=="object")return $;let Q={...$};for(let[X,Y]of Object.entries(Z))if(X in Q){let G=M3(Y);Q[X]=G[J](Q[X])}return Q}var $$=new Set(["_attributes","_original","_definition","_hasSaved","_relations"]),R3=Symbol.for("stacks.modelInstanceProxy"),wH={tags:{bag:"_taggable",mode:"id"},tagCount:{bag:"_taggable",mode:"id"},addTag:{bag:"_taggable",mode:"id"},activeTags:{bag:"_taggable",mode:"id"},inactiveTags:{bag:"_taggable",mode:"id"},removeTag:{bag:"_taggable",mode:"id"},categories:{bag:"_categorizable",mode:"id"},categoryCount:{bag:"_categorizable",mode:"id"},addCategory:{bag:"_categorizable",mode:"id"},activeCategories:{bag:"_categorizable",mode:"id"},inactiveCategories:{bag:"_categorizable",mode:"id"},removeCategory:{bag:"_categorizable",mode:"id"},comments:{bag:"_commentable",mode:"id"},commentCount:{bag:"_commentable",mode:"id"},addComment:{bag:"_commentable",mode:"id"},approvedComments:{bag:"_commentable",mode:"id"},pendingComments:{bag:"_commentable",mode:"id"},rejectedComments:{bag:"_commentable",mode:"id"},likes:{bag:"_likeable",mode:"id"},likeCount:{bag:"_likeable",mode:"id"},like:{bag:"_likeable",mode:"id"},unlike:{bag:"_likeable",mode:"id"},isLiked:{bag:"_likeable",mode:"id"},createStripeUser:{bag:"_billable",mode:"model"},updateStripeUser:{bag:"_billable",mode:"model"},deleteStripeUser:{bag:"_billable",mode:"model"},createOrGetStripeUser:{bag:"_billable",mode:"model"},retrieveStripeUser:{bag:"_billable",mode:"model"},defaultPaymentMethod:{bag:"_billable",mode:"model"},setDefaultPaymentMethod:{bag:"_billable",mode:"model"},addPaymentMethod:{bag:"_billable",mode:"model"},paymentMethods:{bag:"_billable",mode:"model"},newSubscription:{bag:"_billable",mode:"model"},updateSubscription:{bag:"_billable",mode:"model"},cancelSubscription:{bag:"_billable",mode:"model"},activeSubscription:{bag:"_billable",mode:"model"},checkout:{bag:"_billable",mode:"model"},createSetupIntent:{bag:"_billable",mode:"model"},subscriptionHistory:{bag:"_billable",mode:"model"},transactionHistory:{bag:"_billable",mode:"model"},connectAccount:{bag:"_billable",mode:"model"},createConnectAccount:{bag:"_billable",mode:"model"},connectOnboardLink:{bag:"_billable",mode:"model"},syncConnectStatus:{bag:"_billable",mode:"model"},chargeWithSplit:{bag:"_billable",mode:"model"},generateTwoFactorForModel:{bag:"_twoFactor",mode:"model"},verifyTwoFactorCode:{bag:"_twoFactor",mode:"model"}};function TH($,Z){if(!$||!Z)return null;let J=Z.split("."),Q=$;for(let X of J){if(Q==null||typeof Q!=="object")return null;let Y=Q;if("_attributes"in Y&&Y._attributes&&typeof Y._attributes==="object"){let G=Y._attributes;if(X in G){Q=G[X];continue}}if(X in Y){Q=Y[X];continue}return null}return Q??null}function m($,Z){if(!$||typeof $!=="object")return $;if($[R3])return $;let J=$._attributes;if(!J||typeof J!=="object")return $;if(Z&&Object.keys(Z).length>0){for(let[Q,X]of Object.entries(Z))if(Object.prototype.hasOwnProperty.call(J,Q))J[Q]=M3(X).get(J[Q])}return new Proxy($,{get(Q,X,Y){if(X===R3)return!0;if(X==="saveAsync")return async function(){let V=Q._definition,U=V?.set;if(U&&typeof Q.isDirty==="function"){for(let[B,z]of Object.entries(U)){if(typeof z!=="function")continue;if(!Q.isDirty(B))continue;let L=z(Q._attributes),H=L&&typeof L.then==="function"?await L:L;Q._attributes[B]=H}let W=V.set;V.set={};try{return Q.save()}finally{V.set=W}}return Q.save()};if(X==="save")return function(){let V=Q._definition,U=V?.set;if(U&&Object.keys(U).length>0&&typeof Q.isDirty==="function"){for(let[B,z]of Object.entries(U)){if(typeof z!=="function")continue;if(!Q.isDirty(B))continue;let L=z(Q._attributes);if(L&&typeof L.then==="function")throw Error(`Setter for "${B}" returned a Promise \u2014 use \`saveAsync()\` instead of \`save()\` when a model has async setters.`);Q._attributes[B]=L}let W=V.set;V.set={};try{return Q.save()}finally{V.set=W}}return Q.save()};if(X==="updateAsync")return async function(V){if(V&&typeof V==="object"&&!Array.isArray(V))for(let[U,W]of Object.entries(V))Y[U]=W;return Y.saveAsync()};if(X==="saveQuietly")return function(){return B0(()=>Q.save())};if(X==="saveAsyncQuietly")return function(){return B0(()=>Y.saveAsync())};if(X==="updateQuietly")return function(V){return B0(()=>Q.update(V))};if(X==="updateAsyncQuietly")return function(V){return B0(()=>Y.updateAsync(V))};if(X==="deleteQuietly")return function(){return B0(()=>Q.delete())};if(X==="toSearchableObject")return function(){let W=Q._definition?.traits?.useSearch;if(!W)return null;let B=Q._attributes;if(!B)return null;if(W===!0){let D={...B};if(B.id!=null)D.id=String(B.id);return D}let z={},L=W.displayable?.length?W.displayable:[...W.searchable??[],...W.filterable??[],...W.sortable??[],"id"],H=W.denormalize??{},T=Q._relations;for(let D of L){let q=Z$(D),O=B[q]??B[D];if(O!==void 0){z[q]=O;continue}let k=H[D]??H[q];if(k){z[q]=TH(T,k);continue}z[q]=void 0}if(B.id!=null)z.id=String(B.id);return z};if(typeof X==="string"&&!$$.has(X)){let V=Q._attributes;if(V&&Object.prototype.hasOwnProperty.call(V,X))return V[X];let U=Q._relations;if(U&&Object.prototype.hasOwnProperty.call(U,X)){let B=U[X];if(Array.isArray(B))return B.map((z)=>m(z,Z));return m(B,Z)}let W=wH[X];if(W){let L=Q._definition?.__traitMethods?.[W.bag]?.[X];if(typeof L==="function")return W.mode==="model"?(...H)=>L(Y,...H):(...H)=>L(Q.id,...H)}}let G=Reflect.get(Q,X,Q);return typeof G==="function"?G.bind(Q):G},set(Q,X,Y,G){if(typeof X==="string"&&!$$.has(X)){let{_attributes:V,set:U}=Q;if(V&&Object.prototype.hasOwnProperty.call(V,X)){if(typeof U==="function")U.call(Q,X,Y);else V[X]=Y;return!0}if(V&&!(X in Q)){if(typeof U==="function")U.call(Q,X,Y);else V[X]=Y;return!0}}return Reflect.set(Q,X,Y,G)},has(Q,X){if(typeof X==="string"&&!$$.has(X)){let Y=Q._attributes;if(Y&&Object.prototype.hasOwnProperty.call(Y,X))return!0;let G=Q._relations;if(G&&Object.prototype.hasOwnProperty.call(G,X))return!0}return Reflect.has(Q,X)},deleteProperty(Q,X){if(typeof X==="string"&&!$$.has(X)){let Y=Q._attributes;if(Y&&Object.prototype.hasOwnProperty.call(Y,X))return delete Y[X],!0}return Reflect.deleteProperty(Q,X)},ownKeys(Q){let X=Q._attributes;return X?Object.keys(X):[]},getOwnPropertyDescriptor(Q,X){if(typeof X==="string"){let Y=Q._attributes;if(Y&&Object.prototype.hasOwnProperty.call(Y,X))return{configurable:!0,enumerable:!0,value:Y[X],writable:!0}}return Object.getOwnPropertyDescriptor(Q,X)}})}var DH=new Set(["get","first","last","firstOrFail","find","findOrFail","all","paginate","simplePaginate","cursorPaginate"]),OH={paginate:H$,simplePaginate:w$,cursorPaginate:T$},y3=Symbol.for("stacks.queryBuilderProxy");function _3($,Z){if(!$||typeof $!=="object")return $;if($[y3])return $;return new Proxy($,{get(J,Q,X){if(Q===y3)return!0;let Y=Reflect.get(J,Q,X);if(typeof Y!=="function")return Y;return function(...G){let V=G,U=String(Q);if(U==="paginate"||U==="simplePaginate"){let{perPage:z,page:L}=O$(G[0],G[1]);V=[z,L]}else if(U==="cursorPaginate"){let{perPage:z,cursor:L}=q$(G[0],G[1]);V=[z,L,G[2],G[3]]}let W=Y.apply(J,V),B=(z)=>{if(DH.has(U)){if(Array.isArray(z))return z.map((H)=>m(H,Z));let L=OH[U];if(L&&z&&Array.isArray(z.data)){let H=z.data.map((D)=>m(D,Z)),T=L({...z,data:H});return E$(T)}if(z&&Array.isArray(z.data))return{...z,data:z.data.map((H)=>m(H,Z))};return m(z,Z)}if(z&&typeof z==="object"&&typeof z.get==="function")return _3(z,Z);return z};if(W&&typeof W.then==="function")return W.then(B);return B(W)}}})}function qH($,Z){let J=["find","first","last","all","firstOrFail","findOrFail","findMany"];for(let Y of J){let G=$[Y];if(typeof G!=="function")continue;$[Y]=function(...V){let U=G.apply(this,V),W=(B)=>Array.isArray(B)?B.map((z)=>m(z,Z)):m(B,Z);if(U&&typeof U.then==="function")return U.then(W);return W(U)}}let Q=["create","firstOrCreate","updateOrCreate","make"];for(let Y of Q){let G=$[Y];if(typeof G!=="function")continue;$[Y]=function(...V){let U=G.apply(this,V),W=(B)=>Array.isArray(B)?B.map((z)=>m(z,Z)):m(B,Z);if(U&&typeof U.then==="function")return U.then(W);return W(U)}}let X=["query","where","orWhere","whereIn","whereNotIn","whereNull","whereNotNull","whereLike","whereBetween","whereNotBetween","orderBy","orderByDesc","select","with","limit","take","skip","latest","oldest"];for(let Y of X){let G=$[Y];if(typeof G!=="function")continue;$[Y]=function(...V){let U=G.apply(this,V);return _3(U,Z)}}}class g3 extends Error{model;id;constructor($,Z){super(Z!=null?`[ORM] ${$} not found for id=${String(Z)}`:`[ORM] No matching ${$} row`);this.name="ModelNotFoundError",this.model=$,this.id=Z}}class L9 extends Error{model;attribute;reason;constructor($,Z,J){let Q=J==="guarded"?`'${Z}' is marked guarded`:`'${Z}' is not in the fillable allowlist`;super(`[ORM] Mass assignment to ${$} forbidden: ${Q}. Use ${$}.forceCreate(...) / .forceUpdate(...) to bypass.`);this.name="MassAssignmentException",this.model=$,this.attribute=Z,this.reason=J}}var EH=new Set(["id","created_at","updated_at","deleted_at","uuid"]);function z8($,Z,J={}){if(J.force)return Z;if(!Z||typeof Z!=="object"||Array.isArray(Z))return Z;let Q=$.attributes;if(!Q)return Z;let X=new Set,Y=new Set,G=new Set;for(let[U,W]of Object.entries(Q)){let B=Z$(U);if(X.add(B),W?.fillable===!0)Y.add(B);if(W?.guarded===!0)G.add(B)}let V=Y.size>0?Y:X;for(let U of Object.keys(Z)){if(EH.has(U))continue;if(G.has(U))throw new L9($.name,U,"guarded");if(U.endsWith("_id"))continue;if(!V.has(U))throw new L9($.name,U,"not-fillable")}return Z}async function K9($,Z){let J=$.set;if(!J||typeof J!=="object")return Z;let Q={...Z};for(let[X,Y]of Object.entries(J)){if(typeof Y!=="function"||!(X in Q))continue;try{Q[X]=await Y(Q)}catch(G){h.error(`[orm] ${$.name}.set.${X} threw \u2014 skipping setter`,G)}}return Q}function FH($,Z){let J=Z.primaryKey||"id",Q=$.create;function X(W){let B=$.where;if(typeof B!=="function")throw Error(`[ORM] ${Z.name}.${W} needs a working where(): the underlying query builder did not expose one`);return B}function Y(W){let B=$.find;if(typeof B!=="function")throw Error(`[ORM] ${Z.name}.${W} needs a working find(): the underlying query builder did not expose one`);return B}function G(W){let B=$.create;if(typeof B!=="function")throw Error(`[ORM] ${Z.name}.${W} cannot create: the underlying query builder did not expose create()`);return B}if(typeof $.update!=="function")$.update=async function(W,B){if(W==null)throw Error(`[ORM] ${Z.name}.update requires an id as the first argument`);if(!B||typeof B!=="object"||Array.isArray(B))throw Error(`[ORM] ${Z.name}.update requires a data object as the second argument`);if(Object.keys(B).length===0){h.debug(`[orm] ${Z.name}.update called with empty data \u2014 short-circuiting and returning current row`);let H=$.find;return typeof H==="function"?await H.call($,W):null}z8(Z,B);let z=await K9(Z,B);await X("update").call($,J,W).update(z);let L=$.find;return typeof L==="function"?await L.call($,W):null};if(typeof $.forceUpdate!=="function")$.forceUpdate=async function(W,B){if(W==null)throw Error(`[ORM] ${Z.name}.forceUpdate requires an id as the first argument`);if(!B||typeof B!=="object"||Array.isArray(B))throw Error(`[ORM] ${Z.name}.forceUpdate requires a data object as the second argument`);let z=await K9(Z,B);await X("forceUpdate").call($,J,W).update(z);let L=$.find;return typeof L==="function"?await L.call($,W):null};if(typeof $.forceCreate!=="function")$.forceCreate=async function(W){if(!W||typeof W!=="object"||Array.isArray(W))throw Error(`[ORM] ${Z.name}.forceCreate requires a data object`);if(typeof Q!=="function")throw Error(`[ORM] ${Z.name}.forceCreate cannot create: the underlying query builder did not expose create()`);return await Q.call($,W)};if(typeof $.delete!=="function")$.delete=async function(W){if(W==null)throw Error(`[ORM] ${Z.name}.delete requires an id as the first argument`);if(!await Y("delete").call($,W))return!1;return await X("delete").call($,J,W).delete(),!0};if(typeof $.findOrFail!=="function")$.findOrFail=async function(W){let B=await Y("findOrFail").call($,W);if(B==null)throw new g3(Z.name,W);return B};if(typeof $.exists!=="function")$.exists=async function(W){if(W==null)return!1;let B=X("exists").call($,J,W);if(typeof B.count==="function"){let L=await B.count();return Number(L)>0}let z=$.find;return typeof z==="function"?await z.call($,W)!=null:!1};if(typeof $.firstOrCreate!=="function")$.firstOrCreate=async function(W,B={}){if(!W||typeof W!=="object"||Array.isArray(W))throw Error(`[ORM] ${Z.name}.firstOrCreate requires a where-attrs object`);let z=X("firstOrCreate").call($,W),L=typeof z.first==="function"?await z.first():await z;if(L)return L;let H={...W,...B};return z8(Z,H),await G("firstOrCreate").call($,H)};if(typeof $.updateOrCreate!=="function")$.updateOrCreate=async function(W,B){if(!W||typeof W!=="object"||Array.isArray(W))throw Error(`[ORM] ${Z.name}.updateOrCreate requires a where-attrs object`);if(!B||typeof B!=="object"||Array.isArray(B))throw Error(`[ORM] ${Z.name}.updateOrCreate requires a values object`);let z=X("updateOrCreate").call($,W),L=typeof z.first==="function"?await z.first():await z;if(L){z8(Z,B);let T=L[J];await X("updateOrCreate").call($,J,T).update(B);let D=$.find;return typeof D==="function"?await D.call($,T):{...L,...B}}let H={...W,...B};return z8(Z,H),await G("updateOrCreate").call($,H)};if(typeof $.count!=="function")$.count=async function(){let W=$;if(typeof W.query==="function"){let L=W.query();if(typeof L?.count==="function"){let H=await L.count();return Number(H)||0}}let{all:B,get:z}=$;if(typeof B==="function")return(await B.call($)||[]).length;if(typeof z==="function")return(await z.call($)||[]).length;return 0};if(typeof $.pluck!=="function")$.pluck=async function(W){if(!W||typeof W!=="string")throw Error(`[ORM] ${Z.name}.pluck requires a column name`);let B=$.all;return((typeof B==="function"?await B.call($):[])||[]).map((L)=>L?.[W])};if(typeof $.whereIn!=="function")$.whereIn=async function(W,B){if(!W||typeof W!=="string")throw Error(`[ORM] ${Z.name}.whereIn requires a column name`);if(!Array.isArray(B))throw Error(`[ORM] ${Z.name}.whereIn requires an array of values`);if(B.length===0)return[];let z=$.where;if(typeof z!=="function")return[];let L=z.call($,W,"in",B);if(L&&typeof L.get==="function")return await L.get();return await L};let V=[["latest","desc"],["oldest","asc"]];for(let[W,B]of V)if(typeof $[W]!=="function")$[W]=async function(z="created_at"){let L=$,H=typeof L.query==="function"?L.query():L;if(typeof H?.orderBy==="function"){let O=H.orderBy(z,B);if(typeof O.first==="function")return await O.first();if(typeof O.get==="function")return(await O.get())?.[0]??null}let T=$.all;if(typeof T!=="function")return null;return[...await T.call($)||[]].sort((O,k)=>{let N=O?.[z],R=k?.[z];if(N===R)return 0;return(N>R?1:-1)*(B==="desc"?-1:1)})[0]??null};let U=h3(Z.traits?.useSearch);if(U){let W=U.index??Z.table??Z$(`${Z.name}s`);if(typeof $.search!=="function")$.search=function(B,z){return CH($,W,B,z)};if(typeof $.makeAllSearchable!=="function")$.makeAllSearchable=async function(B=500){let z=$.all;if(typeof z!=="function")throw Error(`[ORM] ${Z.name}.makeAllSearchable cannot run: the underlying query builder did not expose all()`);let{useSearchEngine:L}=await import("@stacksjs/search-engine"),H=L(),T=0,D=$.query;if(typeof D==="function")try{let k=D.call($);if(k&&typeof k.chunk==="function")return await k.chunk(B,async(N)=>{let R=N.map((M)=>v3(M,U)).filter(Boolean);if(R.length>0)await H.addDocuments(W,R);T+=R.length}),T}catch{}let O=(await z.call($)||[]).map((k)=>v3(k,U)).filter(Boolean);if(O.length>0)await H.addDocuments(W,O);return O.length};if(typeof $.removeAllFromSearch!=="function")$.removeAllFromSearch=async function(){let{useSearchEngine:B}=await import("@stacksjs/search-engine"),z=B();if(typeof z.deleteAllDocuments==="function"){await z.deleteAllDocuments(W);return}let L=$.all,H=typeof L==="function"?await L.call($)||[]:[],T=B();for(let D of H){let q=D?.id??D?._attributes?.id;if(q!=null)await T.deleteDocument(W,Number(q))}}}}function v3($,Z){if(typeof Z.shape==="function")try{return Z.shape($)}catch{return}let J=$?.toSearchableObject?.();if(J!==void 0)return J;return $?._attributes??(typeof $?.toJSON==="function"?$.toJSON():null)}function CH($,Z,J,Q){let X={q:J,...Q??{}},Y={with(G){return X={...X,...G},Y},where(G){return X={...X,filter:G},Y},async get(){let{useSearchEngine:G}=await import("@stacksjs/search-engine");return(await G().search(Z,X))?.hits??[]},async paginate(G,V=1){let{useSearchEngine:U}=await import("@stacksjs/search-engine"),B=await U().search(Z,{...X,limit:G,offset:(V-1)*G});return{hits:B.hits??[],total:Number(B.estimatedTotalHits??B.nbHits??B.total??0),page:V,perPage:G}},async raw(){let{useSearchEngine:G}=await import("@stacksjs/search-engine");return await G().search(Z,X)}};return Y}async function z9($,Z){if(!$||typeof $!=="object")return;let J=$._attributes??$;for(let Q of Z){if(!(Q in J))continue;let X=J[Q];if(!S0(X))continue;J[Q]=await Y$(X)}}function kH($,Z){if(Z.length===0)return;let J=async(G)=>{if(Array.isArray(G)){for(let V of G)await z9(V,Z);return G}if(G&&typeof G==="object"&&Array.isArray(G.data)){for(let V of G.data)await z9(V,Z);return G}if(G)await z9(G,Z);return G},Q=["find","first","last","all","firstOrFail","findOrFail","findMany"];for(let G of Q){let V=$[G];if(typeof V!=="function")continue;$[G]=async function(...U){let W=await V.apply(this,U);return await J(W)}}let X=["create","firstOrCreate","updateOrCreate","make"];for(let G of X){let V=$[G];if(typeof V!=="function")continue;$[G]=async function(...U){let W=await V.apply(this,U);return await J(W)}}let Y=$.update;if(typeof Y==="function")$.update=async function(G,V){let U=await Y.call(this,G,V);return await J(U)}}function AH($,Z){if(Z.length===0)return;let J=async(Y)=>{if(!Y||typeof Y!=="object"||Array.isArray(Y))return Y;let G={...Y};for(let V of Z)if(V in G)G[V]=await X$(G[V]);return G},Q=["create","firstOrCreate","updateOrCreate"];for(let Y of Q){let G=$[Y];if(typeof G!=="function")continue;$[Y]=async function(...V){if(V[0]=await J(V[0]),V[1])V[1]=await J(V[1]);return await G.apply(this,V)}}let X=$.update;if(typeof X==="function")$.update=async function(Y,G){let V=await J(G);return await X.call(this,Y,V)}}function NH($,Z){let J=$.create;if(typeof J==="function")$.create=async function(Q,...X){z8(Z,Q);let Y=await K9(Z,Q);return await J.call(this,Y,...X)};for(let Q of["firstOrCreate","updateOrCreate"]){let X=$[Q];if(typeof X!=="function")continue}}function xH($,Z){let J=["create","firstOrCreate","updateOrCreate"];for(let X of J){let Y=$[X];if(typeof Y==="function")$[X]=async function(...G){if(h.debug(`[orm] ${X.charAt(0).toUpperCase()+X.slice(1)} ${String($.name||"unknown")}`,G[0]),G[0]&&typeof G[0]==="object"&&!Array.isArray(G[0]))G[0]=S3(G[0],Z,"set");return await Y.apply(this,G)}}let Q=$.update;if(typeof Q==="function")$.update=async function(X,Y){let G=Y&&typeof Y==="object"&&!Array.isArray(Y)?S3(Y,Z,"set"):Y;return await Q.call(this,X,G)}}function OF($){h.debug(`[orm] Defining model: ${$.name} (table: ${$.table})`);let Z=IH($),J=SH($),Q=PH(Z,J),X=RH($);$.__traitMethods=X;let Y=Q?{...$,hooks:{...$.hooks,...Q}}:$,G=UH(Y);if(qH(G,$.casts),FH(G,Y),NH(G,Y),$.casts&&Object.keys($.casts).length>0)xH(G,$.casts);let V=G$($);if(V.length>0)AH(G,V),kH(G,V);let U=$.traits?.useSoftDeletes;if(U)yH(G,Y,U);let W=$.traits?.useAudit;if(W){let z=C9(W);k9(G,$.name,$.primaryKey||"id",z)}G.withoutEvents=function(z){return B0(z)};for(let z of["create","update","firstOrCreate","updateOrCreate","forceCreate","forceUpdate","delete","forceDelete","softDelete","restore"]){let L=G[z];if(typeof L!=="function")continue;let H=`${z}Quietly`;if(typeof G[H]==="function")continue;G[H]=function(...T){return B0(()=>L.apply(G,T))}}let B=Object.assign(G,X,{...$,getDefinition:()=>$,_isStacksModel:!0});return zH($.name,B),B}function IH($){let Z=$.traits?.observe;if(!Z)return;let J=$.name.toLowerCase(),Q=(L)=>{let H=L?.attributes;if(!H||typeof H!=="object")return L;let T=$.primaryKey||"id",D={...H};if(D[T]===void 0&&L[T]!==void 0)D[T]=L[T];return D},X=async(L,H)=>{if(W0())return;try{let{dispatch:T}=await import("@stacksjs/events");await T(L,H)}catch(T){if(T&&typeof T==="object"&&"code"in T&&T.code==="MODULE_NOT_FOUND")return;if(console.error(`[ORM] Event '${L}' handler error:`,T),process.env.STACKS_ORM_EVENT_ERRORS!=="swallow")throw T}},Y=$.traits?.broadcastOn,G=$.traits?.broadcastWith,V=typeof Y==="function"&&typeof G==="function",U=async(L,H)=>{if(!V)return;if(W0())return;try{let T=Y(H),D=Array.isArray(T)?T:[T],q=G(H),k=(await import("@stacksjs/realtime").catch(()=>null))?.broadcast;if(typeof k!=="function")return;for(let N of D){if(typeof N!=="string"||N.length===0)continue;await k(N,L,q)}}catch(T){if(T&&typeof T==="object"&&"code"in T&&T.code==="MODULE_NOT_FOUND")return;if(console.error(`[ORM] Broadcast '${L}' handler error:`,T),process.env.STACKS_ORM_BROADCAST_ERRORS==="throw")throw T}},W=async(L,H)=>{if(W0())return!0;try{let{dispatchAsync:T}=await import("@stacksjs/events"),D=await T(L,H);if(Array.isArray(D)&&D.some((q)=>q===!1))return!1}catch(T){if(T&&typeof T==="object"&&"code"in T&&T.code==="MODULE_NOT_FOUND")return!0;if(console.error(`[ORM] Before-event '${L}' handler error:`,T),process.env.STACKS_ORM_EVENT_ERRORS!=="swallow")throw T}return!0},B=Z===!0?["create","update","delete"]:Array.isArray(Z)?Z:[],z={};if(B.includes("create"))z.beforeCreate=async(L)=>{if(h.debug(`[orm] Create ${J}`,L),!await W(`${J}:saving`,L))throw Error(`[ORM] ${J}:saving event cancelled the operation`);if(!await W(`${J}:creating`,L))throw Error(`[ORM] ${J}:creating event cancelled the operation`)},z.afterCreate=async(L)=>{let H=Q(L);await X(`${J}:created`,H),await X(`${J}:saved`,H),await U(`${J}:created`,L)};if(B.includes("update"))z.beforeUpdate=async(L)=>{if(h.debug(`[orm] Update ${J}#${L?.id??"unknown"}`,L),!await W(`${J}:saving`,L))throw Error(`[ORM] ${J}:saving event cancelled the operation`);if(!await W(`${J}:updating`,L))throw Error(`[ORM] ${J}:updating event cancelled the operation`)},z.afterUpdate=async(L)=>{let H=Q(L);await X(`${J}:updated`,H),await X(`${J}:saved`,H),await U(`${J}:updated`,L)};if(B.includes("delete"))z.beforeDelete=async(L)=>{if(h.debug(`[orm] Delete ${J}#${L?.id??"unknown"}`),!await W(`${J}:deleting`,L))throw Error(`[ORM] ${J}:deleting event cancelled the operation`)},z.afterDelete=async(L)=>{await X(`${J}:deleted`,Q(L)),await U(`${J}:deleted`,L)};return z}function PH(...$){let Z={},J=new Set;for(let Q of $){if(!Q)continue;for(let X of Object.keys(Q))J.add(X)}for(let Q of J){let X=$.map((Y)=>Y?.[Q]).filter((Y)=>typeof Y==="function");if(!X.length)continue;Z[Q]=async(...Y)=>{for(let G of X)await G(...Y)}}return Object.keys(Z).length?Z:void 0}function h3($){if(!$)return null;if($===!0)return{};if(typeof $==="object")return $;return null}function SH($){let Z=h3($.traits?.useSearch);if(!Z)return;let J=Z,Q=J.index??$.table??Z$(`${$.name}s`);function X(V){if(typeof J.shape==="function")try{return J.shape(V)}catch(B){h.warn(`[orm/search] shape() threw for ${$.name}: ${B.message}`);return}let W=m(V).toSearchableObject?.();if(W!==void 0)return W;return V?._attributes??(typeof V?.toJSON==="function"?V.toJSON():null)}let Y=async(V)=>{if(W0())return;let U=X(V);if(!U)return;if(Z.queueable){try{let{Jobs:W}=await import("@stacksjs/queue");await W.dispatch("SyncSearchIndex",{index:Q,op:"upsert",doc:U})}catch(W){h.warn(`[orm/search] queue dispatch failed for ${$.name}; falling back to inline: ${W.message}`),await b3(Q,U,$.name)}return}await b3(Q,U,$.name)};return{afterCreate:Y,afterUpdate:Y,afterDelete:async(V)=>{if(W0())return;let U=V?.id??V?._attributes?.id;if(U==null)return;if(Z.queueable){try{let{Jobs:W}=await import("@stacksjs/queue");await W.dispatch("SyncSearchIndex",{index:Q,op:"delete",id:Number(U)})}catch(W){h.warn(`[orm/search] queue dispatch failed for ${$.name}#${U}; falling back to inline: ${W.message}`),await j3(Q,Number(U),$.name)}return}await j3(Q,Number(U),$.name)}}}async function b3($,Z,J){try{let{useSearchEngine:Q}=await import("@stacksjs/search-engine");await Q().addDocument($,Z)}catch(Q){h.warn(`[orm/search] Failed to index ${J}: ${Q.message}`)}}async function j3($,Z,J){try{let{useSearchEngine:Q}=await import("@stacksjs/search-engine");await Q().deleteDocument($,Z)}catch(Q){h.warn(`[orm/search] Failed to remove ${J}#${Z}: ${Q.message}`)}}function RH($){let Z={},J=$.table,Q=$.traits;if(!Q)return Z;if(Q.taggable)Z._taggable=b9(J);if(Q.categorizable)Z._categorizable=j9(J);if(Q.commentable)Z._commentable=M9(J);if(Q.billable)Z._billable=k3(J);if(Q.likeable){let Y=typeof Q.likeable==="object"?Q.likeable:void 0;Z._likeable=A3(J,Y)}let X=Q.useAuth||Q.authenticatable;if(typeof X==="object"&&X&&"useTwoFactor"in X&&X.useTwoFactor)Z._twoFactor=N3();return Z}function yH($,Z,J){let Q=x3($,Z.primaryKey||"id"),X=I3(J),Y=Z,G=Z.name.toLowerCase(),V=Z.traits?.observe!=null&&Z.traits?.observe!==!1,U=async(H)=>{if(!V||W0())return!0;try{let{dispatchAsync:T}=await import("@stacksjs/events"),D=await T(`${G}:restoring`,{id:H});if(Array.isArray(D)&&D.some((q)=>q===!1))return!1}catch(T){if(T?.code!=="MODULE_NOT_FOUND")console.error(`[ORM] Before-event '${G}:restoring' handler error:`,T)}return!0},W=async(H)=>{if(!V||W0())return;try{let{dispatch:T}=await import("@stacksjs/events");await T(`${G}:restored`,{id:H})}catch(T){if(T?.code!=="MODULE_NOT_FOUND")console.error(`[ORM] Event '${G}:restored' handler error:`,T)}},B=process.env.STACKS_ORM_CASCADE_SWALLOW!=="true",z=async(H)=>{if(!X.cascade?.length||!B){let D=await Q.softDelete(H);if(D&&X.cascade?.length)await U8(Y,X,H,"softDelete");return D}let{db:T}=await import("@stacksjs/database");return await T.transaction(async()=>{let D=await Q.softDelete(H);if(D)await U8(Y,X,H,"softDelete");return D})},L=async(H)=>{if(!await U(H))return!1;if(!X.cascade?.length||!B){let O=await Q.restore(H);if(O){if(X.cascade?.length)await U8(Y,X,H,"restore");await W(H)}return O}let{db:D}=await import("@stacksjs/database"),q=await D.transaction(async()=>{let O=await Q.restore(H);if(O)await U8(Y,X,H,"restore");return O});if(q)await W(H);return q};$.softDelete=z,$.restore=L,$.forceDelete=Q.forceDelete,$.withTrashed=Q.withTrashed,$.onlyTrashed=Q.onlyTrashed,$.delete=z}function vH($){if($==null)return $;if(Array.isArray($))return $.map(vH);if(typeof $!=="object")return $;if(typeof $.toJSON==="function")return $.toJSON();if($._attributes&&typeof $._attributes==="object")return $._attributes;return $}import{log as bH}from"@stacksjs/logging";import{path as U0}from"@stacksjs/path";import{fs as L8}from"@stacksjs/storage";function z0($){return $.replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/(\d)([A-Za-z])/g,"$1_$2").toLowerCase()}function jH($){let Z=typeof $.type==="string"?$.type.toLowerCase():"",J=(()=>{switch(Z){case"string":case"text":case"longtext":case"mediumtext":case"tinytext":case"char":case"varchar":case"enum":case"uuid":case"date":case"datetime":case"timestamp":case"timestamptz":case"time":case"year":return"string";case"integer":case"int":case"tinyint":case"smallint":case"mediumint":case"float":case"double":case"decimal":case"numeric":return"number";case"bigint":return"number | bigint";case"boolean":case"bool":return"boolean";case"json":case"jsonb":return"unknown";case"binary":case"blob":case"bytea":return"Uint8Array";default:return"unknown"}})();return $.nullable===!0?`${J} | null`:J}function fH($){let Z={},J=$.belongsTo;if(!J)return Z;let Q=Array.isArray(J)?J:Object.keys(J);for(let X of Q)Z[`${z0(X)}_id`]="number";return Z}function MH($,Z){let[J,Q]=[z0($),z0(Z)].sort();return`${J}_${Q}`}function _H($,Z){let J=Z.belongsToMany;if(!J)return[];let Q=[],X=Array.isArray(J)?J:[];for(let Y of X){let G,V,U,W;if(typeof Y==="string")G=Y;else if(Y&&typeof Y==="object"&&"model"in Y){let H=Y;G=H.model,V=H.pivotTable,U=H.firstForeignKey,W=H.secondForeignKey}else continue;let B=V??MH($,G),z=U??`${z0($)}_id`,L=W??`${z0(G)}_id`;Q.push({table:B,columns:{id:"number",[z]:"number",[L]:"number",created_at:"string",updated_at:"string | null"}})}return Q}function gH($){let Z={id:"number"},J=$.traits??{};if(J.useUuid)Z.uuid="string";if((J.useTimestamps??J.timestampable)!==!1)Z.created_at="string",Z.updated_at="string | null";if(J.useSoftDeletes??J.softDeletable)Z.deleted_at="string | null";return Z}function hH($){let Z={},J=$.attributes??{};for(let[Q,X]of Object.entries(J))Z[z0(Q)]=jH(X);return Z}function m3($,Z){let J=Object.entries(Z).map(([Q,X])=>` ${Q}: ${X}`).join(`
13
13
  `);return` ${$}: {
14
14
  // columns
15
15
  ${J}
16
- }`}var n3=`/* eslint-disable */
16
+ }`}var u3=`/* eslint-disable */
17
17
  // AUTO-GENERATED by \`buddy generate:db-types\` \u2014 do not edit.
18
18
  // Regenerate after adding/removing a model or changing its attributes.
19
19
  // See stacksjs/stacks#1923.
20
20
 
21
21
  declare module '@stacksjs/database' {
22
22
  interface DatabaseSchema {
23
- `,l3=` }
23
+ `,c3=` }
24
24
  }
25
25
 
26
26
  export {}
27
- `;async function p3($,Z){let J=[];if(!L8.existsSync($))return J;let Q=L8.readdirSync($,{withFileTypes:!0});for(let X of Q){let Y=z0.join($,X.name);if(X.isDirectory()){if(Z){let G=await p3(Y,!0);J.push(...G)}continue}if(!X.name.endsWith(".ts"))continue;if(X.name.startsWith("_")||X.name.startsWith("index"))continue;try{let G=await import(Y),V=G.default||G;if(V?.name&&(V.attributes||V.table))J.push({filePath:Y,model:V})}catch{}}return J}async function cH($={}){let Z=$.modelsDir??z0.userModelsPath(),J=$.defaultsDir??z0.frameworkPath("defaults/app/Models"),Q=$.outFile??z0.projectPath("database/types.d.ts"),X=[],Y=[];for(let[z,L]of[[Z,!1],[J,!0]])try{let H=await p3(z,L);Y.push(...H)}catch(H){X.push({file:z,error:H.message})}let G=new Map;for(let z of Y)G.set(z.model.name??z0.basename(z.filePath).replace(/\.ts$/,""),z);for(let z of Y)if(z.filePath.startsWith(Z))G.set(z.model.name??z0.basename(z.filePath).replace(/\.ts$/,""),z);let V=[];for(let[z,{model:L}]of G){let H=L.table??`${L0(z)}s`,T={...mH(L),...uH(L),..._H(L)};V.push({table:H,model:z,columns:T})}let U=new Map;for(let[z,{model:L}]of G)for(let H of hH(z,L)){if(U.has(H.table))continue;U.set(H.table,{table:H.table,model:`(${H.table} pivot)`,columns:H.columns})}V.push(...U.values()),V.sort((z,L)=>z.table.localeCompare(L.table));let W=V.map((z)=>c3(z.table,z.columns)).join(`
28
- `),B=`${n3}${W}
29
- ${l3}`;if(!$.dryRun){let z=z0.dirname(Q);if(!L8.existsSync(z))L8.mkdirSync(z,{recursive:!0});L8.writeFileSync(Q,B,"utf-8"),fH.success(`[generate:db-types] wrote ${V.length} table(s) to ${Q}`)}return{outFile:Q,tables:V,errors:X,content:B}}function nH($){let Z=[...$].sort((J,Q)=>J.table.localeCompare(Q.table)).map((J)=>c3(J.table,J.columns)).join(`
30
- `);return`${n3}${Z}
31
- ${l3}`}import{configureOrm as lH}from"@stacksjs/query-builder";function pH(){try{let $=process.env.DB_DATABASE_PATH||"database/stacks.sqlite";if((process.env.DB_CONNECTION||"sqlite")==="sqlite")lH({database:$})}catch{}}pH();async function d3($){for(let Z=0;;Z++){let J=await import($);try{return J.default}catch(Q){if(Z<5&&Q instanceof ReferenceError&&/before initialization/.test(Q.message)){await new Promise((X)=>setTimeout(X,0));continue}throw Q}}}async function J$($,Z=[""]){let{path:J}=await import("@stacksjs/path"),Q=J.userModelsPath(`${$}.ts`);try{if(await Bun.file(Q).exists())return await d3(Q)}catch(X){console.error(`[orm] Failed to import userland model ${$} from ${Q} \u2014 falling back to framework default. Reason:`,X)}for(let X of Z){let Y=X?`${X}/`:"",G=J.frameworkPath(`defaults/app/Models/${Y}${$}.ts`);try{if(await Bun.file(G).exists())return await d3(G)}catch(V){console.error(`[orm] Failed to import framework default model ${$} from ${G} \u2014 trying next subdir. Reason:`,V)}}return null}var $0={},i3=()=>{},RF=new Promise(($)=>{i3=$});function F($){return new Proxy(function(){},{get(Z,J){if(J==="then")return;let Q=$0[$];if(Q==null)return;let X=Q[J];return typeof X==="function"?X.bind(Q):X},set(Z,J,Q){let X=$0[$];if(X==null)return!1;return X[J]=Q,!0},has(Z,J){let Q=$0[$];return Q==null?!1:(J in Q)},apply(Z,J,Q){let X=$0[$];if(X==null||typeof X!=="function")return;return X.apply(J,Q)}})}var dH=F("User"),iH=F("Job"),aH=F("FailedJob"),oH=[["Team",[""],"auth"],["Subscriber",[""],"auth"],["SubscriberEmail",[""],"auth"],["Subscription",[""],"auth"],["Post",["Content"],"cms"],["Page",["Content"],"cms"],["Author",["Content"],"cms"],["Comment",[""],"cms"],["Tag",[""],"cms"],["Activity",[""],"dashboard"],["Deployment",[""],"dashboard"],["Release",[""],"dashboard"],["Notification",[""],"dashboard"],["Log",[""],"dashboard"],["Request",[""],"dashboard"],["Error",[""],"monitoring"],["Websocket",["realtime"],"realtime"],["Campaign",[""],"marketing"],["CampaignSend",[""],"marketing"],["EmailList",[""],"marketing"],["EmailListSubscriber",[""],"marketing"],["SocialPost",[""],"marketing"],["PaymentMethod",[""],"commerce"],["PaymentProduct",[""],"commerce"],["PaymentTransaction",[""],"commerce"],["Order",["commerce"],"commerce"],["OrderItem",["commerce"],"commerce"],["Cart",["commerce"],"commerce"],["CartItem",["commerce"],"commerce"],["Customer",["commerce"],"commerce"],["Product",["commerce"],"commerce"],["ProductVariant",["commerce"],"commerce"],["ProductUnit",["commerce"],"commerce"],["Manufacturer",["commerce"],"commerce"],["Category",["commerce"],"commerce"],["Coupon",["commerce"],"commerce"],["GiftCard",["commerce"],"commerce"],["LicenseKey",["commerce"],"commerce"],["Review",["commerce"],"commerce"],["Receipt",["commerce"],"commerce"],["PrintDevice",["commerce"],"commerce"],["ShippingMethod",["commerce"],"commerce"],["ShippingRate",["commerce"],"commerce"],["ShippingZone",["commerce"],"commerce"],["DeliveryRoute",["commerce"],"commerce"],["DigitalDelivery",["commerce"],"commerce"],["Driver",["commerce"],"commerce"],["TaxRate",["commerce"],"commerce"],["WaitlistProduct",["commerce"],"commerce"],["WaitlistRestaurant",["commerce"],"commerce"],["LoyaltyPoint",["commerce"],"commerce"],["LoyaltyReward",["commerce"],"commerce"],["Payment",["commerce"],"commerce"],["Transaction",["commerce"],"commerce"]];queueMicrotask(async()=>{try{let{feature:$}=await import("@stacksjs/config"),Z=await J$("User");if(Z)$0.User=Z;if($("queue")){let J=await J$("Job");if(J)$0.Job=J;let Q=await J$("FailedJob");if(Q)$0.FailedJob=Q}for(let[J,Q,X]of oH){if(!$(X))continue;let Y=await J$(J,Q);if(Y)$0[J]=Y}}catch($){console.error("[orm] deferred model load failed:",$)}finally{i3()}});var sH=F("Activity"),rH=F("Author"),tH=F("Campaign"),eH=F("Cart"),$w=F("CartItem"),Zw=F("Category"),Jw=F("Comment"),Qw=F("Coupon"),Xw=F("Customer"),Yw=F("DeliveryRoute"),Gw=F("Deployment"),Vw=F("DigitalDelivery"),Bw=F("Driver"),Ww=F("CampaignSend"),Uw=F("EmailList"),zw=F("EmailListSubscriber"),Lw=F("Error"),Kw=F("GiftCard"),Hw=F("LicenseKey"),ww=F("Log"),Tw=F("LoyaltyPoint"),Dw=F("LoyaltyReward"),Ow=F("Manufacturer"),qw=F("Notification"),Ew=F("Order"),Fw=F("OrderItem"),Cw=F("Page"),kw=F("Payment"),Aw=F("PaymentMethod"),Nw=F("PaymentProduct"),xw=F("PaymentTransaction"),Iw=F("Post"),Pw=F("PrintDevice"),Sw=F("Product"),Rw=F("ProductUnit"),yw=F("ProductVariant"),vw=F("Receipt"),bw=F("Release"),jw=F("Request"),fw=F("Review"),Mw=F("ShippingMethod"),_w=F("ShippingRate"),gw=F("ShippingZone"),hw=F("SocialPost"),mw=F("Subscriber"),uw=F("SubscriberEmail"),cw=F("Subscription"),nw=F("Tag"),lw=F("TaxRate"),pw=F("Team"),dw=F("Transaction"),iw=F("WaitlistProduct"),aw=F("WaitlistRestaurant"),ow=F("Websocket"),sw={User:dH,Job:iH,FailedJob:aH,Activity:sH,Author:rH,Campaign:tH,CampaignSend:Ww,Cart:eH,CartItem:$w,Category:Zw,Comment:Jw,Coupon:Qw,Customer:Xw,DeliveryRoute:Yw,Deployment:Gw,DigitalDelivery:Vw,Driver:Bw,EmailList:Uw,EmailListSubscriber:zw,ErrorModel:Lw,GiftCard:Kw,LicenseKey:Hw,Log:ww,LoyaltyPoint:Tw,LoyaltyReward:Dw,Manufacturer:Ow,Notification:qw,Order:Ew,OrderItem:Fw,Page:Cw,Payment:kw,PaymentMethod:Aw,PaymentProduct:Nw,PaymentTransaction:xw,Post:Iw,PrintDevice:Pw,Product:Sw,ProductUnit:Rw,ProductVariant:yw,Receipt:vw,Release:bw,Request:jw,Review:fw,ShippingMethod:Mw,ShippingRate:_w,ShippingZone:gw,SocialPost:hw,Subscriber:mw,SubscriberEmail:uw,Subscription:cw,Tag:nw,TaxRate:lw,Team:pw,Transaction:dw,WaitlistProduct:iw,WaitlistRestaurant:aw,Websocket:ow},I0=globalThis;for(let[$,Z]of Object.entries(sw))if(Z&&I0[$]===void 0)I0[$]=Z;async function rw($){if(!$)return[];try{if(typeof $.all==="function"){let Z=await $.all();return Array.isArray(Z)?Z:[]}if(typeof $.get==="function"){let Z=await $.get();return Array.isArray(Z)?Z:[]}}catch{}return[]}function tw($,Z,J=""){if(!$)return J;try{if(typeof $.get==="function"){let X=$.get(Z);if(X!==void 0&&X!==null)return X}}catch{}let Q=$?.[Z];return Q!==void 0&&Q!==null?Q:J}if(I0.safeAll===void 0)I0.safeAll=rw;if(I0.safeGet===void 0)I0.safeGet=tw;export{W0 as withoutEvents,CT as transactional,ET as transactionBuilder,qT as transaction,nT as toTimestamp,T$ as toSimplePaginator,w$ as toPaginator,D$ as toCursorPaginator,jH as toAttrs,UB as setAuditUser,FT as savepoint,q$ as resolvePageArgs,E$ as resolveCursorArgs,nH as renderDatabaseTypeFile,QB as prunable,b9 as parseCursor,RF as ormReady,PT as modelTableName,JT as massPrunable,LB as mapWriteError,gT as mapEntity,N9 as isUniqueViolation,CB as isSimplePaginator,FB as isPaginator,S0 as isEncrypted,kB as isCursorPaginator,ST as hasRelations,u as getTableName,DB as getRelations,RT as getRelationType,yT as getRelationCount,QT as getPrunableConfig,vT as getPivotTables,TB as getPivotTableName,v0 as getModelName,jT as getHiddenAttributes,fT as getGuardedAttributes,MT as getFillableAttributes,uT as formatDate,K$ as findUserModel,L$ as findCoreModel,bT as fetchOtherModelRelations,hT as extractImports,_T as extractFields,cT as extractDate,mT as extractAttributesFromModel,F$ as enrichPaginatorUrls,X$ as encryptValue,CF as defineModel,Y$ as decryptValue,TT as db,C9 as createAuditMethods,G$ as collectEncryptedAttributes,cH as buildDatabaseSchema,LT as batchLoad,ow as Websocket,aw as WaitlistRestaurant,iw as WaitlistProduct,dH as User,dw as Transaction,pw as Team,lw as TaxRate,nw as Tag,cw as Subscription,uw as SubscriberEmail,mw as Subscriber,HB as SubqueryBuilder,hw as SocialPost,gw as ShippingZone,_w as ShippingRate,Mw as ShippingMethod,fw as Review,jw as Request,bw as Release,vw as Receipt,yw as ProductVariant,Rw as ProductUnit,Sw as Product,Pw as PrintDevice,Iw as Post,xw as PaymentTransaction,Nw as PaymentProduct,Aw as PaymentMethod,kw as Payment,Cw as Page,Fw as OrderItem,Ew as Order,qw as Notification,m3 as ModelNotFoundError,K9 as MassAssignmentException,Ow as Manufacturer,Dw as LoyaltyReward,Tw as LoyaltyPoint,ww as Log,Hw as LicenseKey,iH as Job,Kw as GiftCard,aH as FailedJob,Lw as ErrorModel,zw as EmailListSubscriber,Uw as EmailList,Bw as Driver,Vw as DigitalDelivery,Gw as Deployment,Yw as DeliveryRoute,Xw as Customer,Qw as Coupon,Jw as Comment,Zw as Category,$w as CartItem,eH as Cart,Ww as CampaignSend,tH as Campaign,rH as Author,sH as Activity};
27
+ `;async function n3($,Z){let J=[];if(!L8.existsSync($))return J;let Q=L8.readdirSync($,{withFileTypes:!0});for(let X of Q){let Y=U0.join($,X.name);if(X.isDirectory()){if(Z){let G=await n3(Y,!0);J.push(...G)}continue}if(!X.name.endsWith(".ts"))continue;if(X.name.startsWith("_")||X.name.startsWith("index"))continue;try{let G=await import(Y),V=G.default||G;if(V?.name&&(V.attributes||V.table))J.push({filePath:Y,model:V})}catch{}}return J}async function mH($={}){let Z=$.modelsDir??U0.userModelsPath(),J=$.defaultsDir??U0.frameworkPath("defaults/app/Models"),Q=$.outFile??U0.projectPath("database/types.d.ts"),X=[],Y=[];for(let[z,L]of[[Z,!1],[J,!0]])try{let H=await n3(z,L);Y.push(...H)}catch(H){X.push({file:z,error:H.message})}let G=new Map;for(let z of Y)G.set(z.model.name??U0.basename(z.filePath).replace(/\.ts$/,""),z);for(let z of Y)if(z.filePath.startsWith(Z))G.set(z.model.name??U0.basename(z.filePath).replace(/\.ts$/,""),z);let V=[];for(let[z,{model:L}]of G){let H=L.table??`${z0(z)}s`,T={...gH(L),...hH(L),...fH(L)};V.push({table:H,model:z,columns:T})}let U=new Map;for(let[z,{model:L}]of G)for(let H of _H(z,L)){if(U.has(H.table))continue;U.set(H.table,{table:H.table,model:`(${H.table} pivot)`,columns:H.columns})}V.push(...U.values()),V.sort((z,L)=>z.table.localeCompare(L.table));let W=V.map((z)=>m3(z.table,z.columns)).join(`
28
+ `),B=`${u3}${W}
29
+ ${c3}`;if(!$.dryRun){let z=U0.dirname(Q);if(!L8.existsSync(z))L8.mkdirSync(z,{recursive:!0});L8.writeFileSync(Q,B,"utf-8"),bH.success(`[generate:db-types] wrote ${V.length} table(s) to ${Q}`)}return{outFile:Q,tables:V,errors:X,content:B}}function uH($){let Z=[...$].sort((J,Q)=>J.table.localeCompare(Q.table)).map((J)=>m3(J.table,J.columns)).join(`
30
+ `);return`${u3}${Z}
31
+ ${c3}`}import{configureOrm as cH}from"@stacksjs/query-builder";function nH(){try{let $=process.env.DB_DATABASE_PATH||"database/stacks.sqlite";if((process.env.DB_CONNECTION||"sqlite")==="sqlite")cH({database:$})}catch{}}nH();async function l3($){for(let Z=0;;Z++){let J=await import($);try{return J.default}catch(Q){if(Z<5&&Q instanceof ReferenceError&&/before initialization/.test(Q.message)){await new Promise((X)=>setTimeout(X,0));continue}throw Q}}}async function J$($,Z=[""]){let{path:J}=await import("@stacksjs/path"),Q=J.userModelsPath(`${$}.ts`);try{if(await Bun.file(Q).exists())return await l3(Q)}catch(X){console.error(`[orm] Failed to import userland model ${$} from ${Q} \u2014 falling back to framework default. Reason:`,X)}for(let X of Z){let Y=X?`${X}/`:"",G=J.frameworkPath(`defaults/app/Models/${Y}${$}.ts`);try{if(await Bun.file(G).exists())return await l3(G)}catch(V){console.error(`[orm] Failed to import framework default model ${$} from ${G} \u2014 trying next subdir. Reason:`,V)}}return null}var e={},p3=()=>{},xF=new Promise(($)=>{p3=$});function F($){return new Proxy(function(){},{get(Z,J){if(J==="then")return;let Q=e[$];if(Q==null)return;let X=Q[J];return typeof X==="function"?X.bind(Q):X},set(Z,J,Q){let X=e[$];if(X==null)return!1;return X[J]=Q,!0},has(Z,J){let Q=e[$];return Q==null?!1:(J in Q)},apply(Z,J,Q){let X=e[$];if(X==null||typeof X!=="function")return;return X.apply(J,Q)}})}var lH=F("User"),pH=F("Job"),dH=F("FailedJob"),iH=[["Team",[""],"auth"],["Subscriber",[""],"auth"],["SubscriberEmail",[""],"auth"],["Subscription",[""],"auth"],["Post",["Content"],"cms"],["Page",["Content"],"cms"],["Author",["Content"],"cms"],["Comment",[""],"cms"],["Tag",[""],"cms"],["Activity",[""],"dashboard"],["Deployment",[""],"dashboard"],["Release",[""],"dashboard"],["Notification",[""],"dashboard"],["Log",[""],"dashboard"],["Request",[""],"dashboard"],["Error",[""],"monitoring"],["Websocket",["realtime"],"realtime"],["Campaign",[""],"marketing"],["CampaignSend",[""],"marketing"],["EmailList",[""],"marketing"],["EmailListSubscriber",[""],"marketing"],["SocialPost",[""],"marketing"],["PaymentMethod",[""],"commerce"],["PaymentProduct",[""],"commerce"],["PaymentTransaction",[""],"commerce"],["Order",["commerce"],"commerce"],["OrderItem",["commerce"],"commerce"],["Cart",["commerce"],"commerce"],["CartItem",["commerce"],"commerce"],["Customer",["commerce"],"commerce"],["Product",["commerce"],"commerce"],["ProductVariant",["commerce"],"commerce"],["ProductUnit",["commerce"],"commerce"],["Manufacturer",["commerce"],"commerce"],["Category",["commerce"],"commerce"],["Coupon",["commerce"],"commerce"],["GiftCard",["commerce"],"commerce"],["LicenseKey",["commerce"],"commerce"],["Review",["commerce"],"commerce"],["Receipt",["commerce"],"commerce"],["PrintDevice",["commerce"],"commerce"],["ShippingMethod",["commerce"],"commerce"],["ShippingRate",["commerce"],"commerce"],["ShippingZone",["commerce"],"commerce"],["DeliveryRoute",["commerce"],"commerce"],["DigitalDelivery",["commerce"],"commerce"],["Driver",["commerce"],"commerce"],["TaxRate",["commerce"],"commerce"],["WaitlistProduct",["commerce"],"commerce"],["WaitlistRestaurant",["commerce"],"commerce"],["LoyaltyPoint",["commerce"],"commerce"],["LoyaltyReward",["commerce"],"commerce"],["Payment",["commerce"],"commerce"],["Transaction",["commerce"],"commerce"]];queueMicrotask(async()=>{try{let{feature:$}=await import("@stacksjs/config"),Z=await J$("User");if(Z)e.User=Z;if($("queue")){let J=await J$("Job");if(J)e.Job=J;let Q=await J$("FailedJob");if(Q)e.FailedJob=Q}for(let[J,Q,X]of iH){if(!$(X))continue;let Y=await J$(J,Q);if(Y)e[J]=Y}}catch($){console.error("[orm] deferred model load failed:",$)}finally{p3()}});var aH=F("Activity"),oH=F("Author"),sH=F("Campaign"),rH=F("Cart"),tH=F("CartItem"),eH=F("Category"),$w=F("Comment"),Zw=F("Coupon"),Jw=F("Customer"),Qw=F("DeliveryRoute"),Xw=F("Deployment"),Yw=F("DigitalDelivery"),Gw=F("Driver"),Vw=F("CampaignSend"),Bw=F("EmailList"),Ww=F("EmailListSubscriber"),Uw=F("Error"),zw=F("GiftCard"),Lw=F("LicenseKey"),Kw=F("Log"),Hw=F("LoyaltyPoint"),ww=F("LoyaltyReward"),Tw=F("Manufacturer"),Dw=F("Notification"),Ow=F("Order"),qw=F("OrderItem"),Ew=F("Page"),Fw=F("Payment"),Cw=F("PaymentMethod"),kw=F("PaymentProduct"),Aw=F("PaymentTransaction"),Nw=F("Post"),xw=F("PrintDevice"),Iw=F("Product"),Pw=F("ProductUnit"),Sw=F("ProductVariant"),Rw=F("Receipt"),yw=F("Release"),vw=F("Request"),bw=F("Review"),jw=F("ShippingMethod"),fw=F("ShippingRate"),Mw=F("ShippingZone"),_w=F("SocialPost"),gw=F("Subscriber"),hw=F("SubscriberEmail"),mw=F("Subscription"),uw=F("Tag"),cw=F("TaxRate"),nw=F("Team"),lw=F("Transaction"),pw=F("WaitlistProduct"),dw=F("WaitlistRestaurant"),iw=F("Websocket"),aw={User:lH,Job:pH,FailedJob:dH,Activity:aH,Author:oH,Campaign:sH,CampaignSend:Vw,Cart:rH,CartItem:tH,Category:eH,Comment:$w,Coupon:Zw,Customer:Jw,DeliveryRoute:Qw,Deployment:Xw,DigitalDelivery:Yw,Driver:Gw,EmailList:Bw,EmailListSubscriber:Ww,ErrorModel:Uw,GiftCard:zw,LicenseKey:Lw,Log:Kw,LoyaltyPoint:Hw,LoyaltyReward:ww,Manufacturer:Tw,Notification:Dw,Order:Ow,OrderItem:qw,Page:Ew,Payment:Fw,PaymentMethod:Cw,PaymentProduct:kw,PaymentTransaction:Aw,Post:Nw,PrintDevice:xw,Product:Iw,ProductUnit:Pw,ProductVariant:Sw,Receipt:Rw,Release:yw,Request:vw,Review:bw,ShippingMethod:jw,ShippingRate:fw,ShippingZone:Mw,SocialPost:_w,Subscriber:gw,SubscriberEmail:hw,Subscription:mw,Tag:uw,TaxRate:cw,Team:nw,Transaction:lw,WaitlistProduct:pw,WaitlistRestaurant:dw,Websocket:iw},I0=globalThis;for(let[$,Z]of Object.entries(aw))if(Z&&I0[$]===void 0)I0[$]=Z;async function ow($){if(!$)return[];try{if(typeof $.all==="function"){let Z=await $.all();return Array.isArray(Z)?Z:[]}if(typeof $.get==="function"){let Z=await $.get();return Array.isArray(Z)?Z:[]}}catch{}return[]}function sw($,Z,J=""){if(!$)return J;try{if(typeof $.get==="function"){let X=$.get(Z);if(X!==void 0&&X!==null)return X}}catch{}let Q=$?.[Z];return Q!==void 0&&Q!==null?Q:J}if(I0.safeAll===void 0)I0.safeAll=ow;if(I0.safeGet===void 0)I0.safeGet=sw;export{B0 as withoutEvents,ET as transactional,OT as transactionBuilder,DT as transaction,hT as toTimestamp,w$ as toSimplePaginator,H$ as toPaginator,T$ as toCursorPaginator,vH as toAttrs,BB as setAuditUser,qT as savepoint,O$ as resolvePageArgs,q$ as resolveCursorArgs,uH as renderDatabaseTypeFile,ZB as prunable,y9 as parseCursor,xF as ormReady,xT as modelTableName,$T as massPrunable,UB as mapWriteError,MT as mapEntity,A9 as isUniqueViolation,EB as isSimplePaginator,qB as isPaginator,S0 as isEncrypted,FB as isCursorPaginator,IT as hasRelations,u as getTableName,wB as getRelations,PT as getRelationType,ST as getRelationCount,ZT as getPrunableConfig,RT as getPivotTables,HB as getPivotTableName,v0 as getModelName,vT as getHiddenAttributes,bT as getGuardedAttributes,jT as getFillableAttributes,_T as formatDate,L$ as findUserModel,z$ as findCoreModel,yT as fetchOtherModelRelations,fT as extractFields,gT as extractDate,E$ as enrichPaginatorUrls,X$ as encryptValue,OF as defineModel,Y$ as decryptValue,HT as db,F9 as createAuditMethods,G$ as collectEncryptedAttributes,mH as buildDatabaseSchema,UT as batchLoad,iw as Websocket,dw as WaitlistRestaurant,pw as WaitlistProduct,lH as User,lw as Transaction,nw as Team,cw as TaxRate,uw as Tag,mw as Subscription,hw as SubscriberEmail,gw as Subscriber,LB as SubqueryBuilder,_w as SocialPost,Mw as ShippingZone,fw as ShippingRate,jw as ShippingMethod,bw as Review,vw as Request,yw as Release,Rw as Receipt,Sw as ProductVariant,Pw as ProductUnit,Iw as Product,xw as PrintDevice,Nw as Post,Aw as PaymentTransaction,kw as PaymentProduct,Cw as PaymentMethod,Fw as Payment,Ew as Page,qw as OrderItem,Ow as Order,Dw as Notification,g3 as ModelNotFoundError,L9 as MassAssignmentException,Tw as Manufacturer,ww as LoyaltyReward,Hw as LoyaltyPoint,Kw as Log,Lw as LicenseKey,pH as Job,zw as GiftCard,dH as FailedJob,Uw as ErrorModel,Ww as EmailListSubscriber,Bw as EmailList,Gw as Driver,Yw as DigitalDelivery,Xw as Deployment,Qw as DeliveryRoute,Jw as Customer,Zw as Coupon,$w as Comment,eH as Category,tH as CartItem,rH as Cart,Vw as CampaignSend,sH as Campaign,oH as Author,aH as Activity};