@stacksjs/payments 0.65.0 → 0.67.0
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 +1 -4
- package/package.json +6 -7
- package/dist/index.js.map +0 -187
- package/src/drivers/stripe.ts +0 -157
- package/src/index.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var Z1=Object.create;var{getPrototypeOf:Q1,defineProperty:Ol,getOwnPropertyNames:X1}=Object;var J1=Object.prototype.hasOwnProperty;var Y1=(t,h,l)=>{l=t!=null?Z1(Q1(t)):{};const P=h||!t||!t.__esModule?Ol(l,"default",{value:t,enumerable:!0}):l;for(let u of X1(t))if(!J1.call(P,u))Ol(P,u,{get:()=>t[u],enumerable:!0});return P};var M=(t,h)=>()=>(h||t((h={exports:{}}).exports,h),h.exports);var Gl=(t,h)=>{for(var l in h)Ol(t,l,{get:h[l],enumerable:!0,configurable:!0,set:(P)=>h[l]=()=>P})};var Mm=M((be,om)=>{om.exports=Error});var Lm=M((je,zm)=>{zm.exports=EvalError});var Qm=M((ae,Zm)=>{Zm.exports=RangeError});var Jm=M((h_,Xm)=>{Xm.exports=ReferenceError});var Jl=M((t_,Ym)=>{Ym.exports=SyntaxError});var Oh=M((l_,Bm)=>{Bm.exports=TypeError});var Am=M((m_,Um)=>{Um.exports=URIError});var Wm=M((P_,Vm)=>{Vm.exports=function t(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var h={},l=Symbol("test"),P=Object(l);if(typeof l==="string")return!1;if(Object.prototype.toString.call(l)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(P)!=="[object Symbol]")return!1;var u=42;h[l]=u;for(l in h)return!1;if(typeof Object.keys==="function"&&Object.keys(h).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(h).length!==0)return!1;var f=Object.getOwnPropertySymbols(h);if(f.length!==1||f[0]!==l)return!1;if(!Object.prototype.propertyIsEnumerable.call(h,l))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var T=Object.getOwnPropertyDescriptor(h,l);if(T.value!==u||T.enumerable!==!0)return!1}return!0}});var Km=M((u_,Im)=>{var Rm=typeof Symbol!=="undefined"&&Symbol,B1=Wm();Im.exports=function t(){if(typeof Rm!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof Rm("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return B1()}});var Dm=M((f_,Nm)=>{var Yl={__proto__:null,foo:{}},U1=Object;Nm.exports=function t(){return{__proto__:Yl}.foo===Yl.foo&&!(Yl instanceof U1)}});var qm=M((T_,Hm)=>{var A1="Function.prototype.bind called on incompatible ",V1=Object.prototype.toString,W1=Math.max,R1="[object Function]",Cm=function t(h,l){var P=[];for(var u=0;u<h.length;u+=1)P[u]=h[u];for(var f=0;f<l.length;f+=1)P[f+h.length]=l[f];return P},I1=function t(h,l){var P=[];for(var u=l||0,f=0;u<h.length;u+=1,f+=1)P[f]=h[u];return P},K1=function(t,h){var l="";for(var P=0;P<t.length;P+=1)if(l+=t[P],P+1<t.length)l+=h;return l};Hm.exports=function t(h){var l=this;if(typeof l!=="function"||V1.apply(l)!==R1)throw new TypeError(A1+l);var P=I1(arguments,1),u,f=function(){if(this instanceof u){var d=l.apply(this,Cm(P,arguments));if(Object(d)===d)return d;return this}return l.apply(h,Cm(P,arguments))},T=W1(0,l.length-P.length),v=[];for(var e=0;e<T;e++)v[e]="$"+e;if(u=Function("binder","return function ("+K1(v,",")+"){ return binder.apply(this,arguments); }")(f),l.prototype){var c=function d(){};c.prototype=l.prototype,u.prototype=new c,c.prototype=null}return u}});var Mt=M((d_,$m)=>{var N1=qm();$m.exports=Function.prototype.bind||N1});var km=M((v_,wm)=>{var D1=Function.prototype.call,C1=Object.prototype.hasOwnProperty,H1=Mt();wm.exports=H1.call(D1,C1)});var Th=M((e_,rm)=>{var S,q1=Mm(),$1=Lm(),w1=Qm(),k1=Jm(),Fh=Jl(),xh=Oh(),g1=Am(),sm=Function,Bl=function(t){try{return sm('"use strict"; return ('+t+").constructor;")()}catch(h){}},uh=Object.getOwnPropertyDescriptor;if(uh)try{uh({},"")}catch(t){uh=null}var Ul=function(){throw new xh},y1=uh?function(){try{return arguments.callee,Ul}catch(t){try{return uh(arguments,"callee").get}catch(h){return Ul}}}():Ul,Gh=Km()(),p1=Dm()(),W=Object.getPrototypeOf||(p1?function(t){return t.__proto__}:null),nh={},s1=typeof Uint8Array==="undefined"||!W?S:W(Uint8Array),fh={__proto__:null,"%AggregateError%":typeof AggregateError==="undefined"?S:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?S:ArrayBuffer,"%ArrayIteratorPrototype%":Gh&&W?W([][Symbol.iterator]()):S,"%AsyncFromSyncIteratorPrototype%":S,"%AsyncFunction%":nh,"%AsyncGenerator%":nh,"%AsyncGeneratorFunction%":nh,"%AsyncIteratorPrototype%":nh,"%Atomics%":typeof Atomics==="undefined"?S:Atomics,"%BigInt%":typeof BigInt==="undefined"?S:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?S:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?S:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?S:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":q1,"%eval%":eval,"%EvalError%":$1,"%Float32Array%":typeof Float32Array==="undefined"?S:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?S:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?S:FinalizationRegistry,"%Function%":sm,"%GeneratorFunction%":nh,"%Int8Array%":typeof Int8Array==="undefined"?S:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?S:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?S:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Gh&&W?W(W([][Symbol.iterator]())):S,"%JSON%":typeof JSON==="object"?JSON:S,"%Map%":typeof Map==="undefined"?S:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!Gh||!W?S:W(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?S:Promise,"%Proxy%":typeof Proxy==="undefined"?S:Proxy,"%RangeError%":w1,"%ReferenceError%":k1,"%Reflect%":typeof Reflect==="undefined"?S:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?S:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!Gh||!W?S:W(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?S:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Gh&&W?W(""[Symbol.iterator]()):S,"%Symbol%":Gh?Symbol:S,"%SyntaxError%":Fh,"%ThrowTypeError%":y1,"%TypedArray%":s1,"%TypeError%":xh,"%Uint8Array%":typeof Uint8Array==="undefined"?S:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?S:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?S:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?S:Uint32Array,"%URIError%":g1,"%WeakMap%":typeof WeakMap==="undefined"?S:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?S:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?S:WeakSet};if(W)try{null.error}catch(t){gm=W(W(t)),fh["%Error.prototype%"]=gm}var gm,r1=function t(h){var l;if(h==="%AsyncFunction%")l=Bl("async function () {}");else if(h==="%GeneratorFunction%")l=Bl("function* () {}");else if(h==="%AsyncGeneratorFunction%")l=Bl("async function* () {}");else if(h==="%AsyncGenerator%"){var P=t("%AsyncGeneratorFunction%");if(P)l=P.prototype}else if(h==="%AsyncIteratorPrototype%"){var u=t("%AsyncGenerator%");if(u&&W)l=W(u.prototype)}return fh[h]=l,l},ym={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},yh=Mt(),zt=km(),b1=yh.call(Function.call,Array.prototype.concat),j1=yh.call(Function.apply,Array.prototype.splice),pm=yh.call(Function.call,String.prototype.replace),Lt=yh.call(Function.call,String.prototype.slice),a1=yh.call(Function.call,RegExp.prototype.exec),hd=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,td=/\\(\\)?/g,ld=function t(h){var l=Lt(h,0,1),P=Lt(h,-1);if(l==="%"&&P!=="%")throw new Fh("invalid intrinsic syntax, expected closing `%`");else if(P==="%"&&l!=="%")throw new Fh("invalid intrinsic syntax, expected opening `%`");var u=[];return pm(h,hd,function(f,T,v,e){u[u.length]=v?pm(e,td,"$1"):T||f}),u},md=function t(h,l){var P=h,u;if(zt(ym,P))u=ym[P],P="%"+u[0]+"%";if(zt(fh,P)){var f=fh[P];if(f===nh)f=r1(P);if(typeof f==="undefined"&&!l)throw new xh("intrinsic "+h+" exists, but is not available. Please file an issue!");return{alias:u,name:P,value:f}}throw new Fh("intrinsic "+h+" does not exist!")};rm.exports=function t(h,l){if(typeof h!=="string"||h.length===0)throw new xh("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof l!=="boolean")throw new xh('"allowMissing" argument must be a boolean');if(a1(/^%?[^%]*%?$/,h)===null)throw new Fh("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var P=ld(h),u=P.length>0?P[0]:"",f=md("%"+u+"%",l),T=f.name,v=f.value,e=!1,c=f.alias;if(c)u=c[0],j1(P,b1([0,1],c));for(var d=1,i=!0;d<P.length;d+=1){var _=P[d],n=Lt(_,0,1),O=Lt(_,-1);if((n==='"'||n==="'"||n==="`"||(O==='"'||O==="'"||O==="`"))&&n!==O)throw new Fh("property names with quotes must have matching quotes");if(_==="constructor"||!i)e=!0;if(u+="."+_,T="%"+u+"%",zt(fh,T))v=fh[T];else if(v!=null){if(!(_ in v)){if(!l)throw new xh("base intrinsic for "+h+" exists, but the property is not available.");return}if(uh&&d+1>=P.length){var x=uh(v,_);if(i=!!x,i&&"get"in x&&!("originalValue"in x.get))v=x.get;else v=v[_]}else i=zt(v,_),v=v[_];if(i&&!e)fh[T]=v}}return v}});var Qt=M((__,bm)=>{var Pd=Th(),Zt=Pd("%Object.defineProperty%",!0)||!1;if(Zt)try{Zt({},"a",{value:1})}catch(t){Zt=!1}bm.exports=Zt});var Al=M((c_,jm)=>{var ud=Th(),Xt=ud("%Object.getOwnPropertyDescriptor%",!0);if(Xt)try{Xt([],"length")}catch(t){Xt=null}jm.exports=Xt});var lP=M((i_,tP)=>{var am=Qt(),fd=Jl(),Eh=Oh(),hP=Al();tP.exports=function t(h,l,P){if(!h||typeof h!=="object"&&typeof h!=="function")throw new Eh("`obj` must be an object or a function`");if(typeof l!=="string"&&typeof l!=="symbol")throw new Eh("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=="boolean"&&arguments[3]!==null)throw new Eh("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=="boolean"&&arguments[4]!==null)throw new Eh("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=="boolean"&&arguments[5]!==null)throw new Eh("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=="boolean")throw new Eh("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,f=arguments.length>4?arguments[4]:null,T=arguments.length>5?arguments[5]:null,v=arguments.length>6?arguments[6]:!1,e=!!hP&&hP(h,l);if(am)am(h,l,{configurable:T===null&&e?e.configurable:!T,enumerable:u===null&&e?e.enumerable:!u,value:P,writable:f===null&&e?e.writable:!f});else if(v||!u&&!f&&!T)h[l]=P;else throw new fd("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var uP=M((O_,PP)=>{var Vl=Qt(),mP=function t(){return!!Vl};mP.hasArrayLengthDefineBug=function t(){if(!Vl)return null;try{return Vl([],"length",{value:1}).length!==1}catch(h){return!0}};PP.exports=mP});var eP=M((G_,vP)=>{var Td=Th(),fP=lP(),dd=uP()(),TP=Al(),dP=Oh(),vd=Td("%Math.floor%");vP.exports=function t(h,l){if(typeof h!=="function")throw new dP("`fn` is not a function");if(typeof l!=="number"||l<0||l>4294967295||vd(l)!==l)throw new dP("`length` must be a positive 32-bit integer");var P=arguments.length>2&&!!arguments[2],u=!0,f=!0;if("length"in h&&TP){var T=TP(h,"length");if(T&&!T.configurable)u=!1;if(T&&!T.writable)f=!1}if(u||f||!P)if(dd)fP(h,"length",l,!0,!0);else fP(h,"length",l);return h}});var nP=M((n_,Jt)=>{var Wl=Mt(),Yt=Th(),ed=eP(),_d=Oh(),iP=Yt("%Function.prototype.apply%"),OP=Yt("%Function.prototype.call%"),GP=Yt("%Reflect.apply%",!0)||Wl.call(OP,iP),_P=Qt(),cd=Yt("%Math.max%");Jt.exports=function t(h){if(typeof h!=="function")throw new _d("a function is required");var l=GP(Wl,OP,arguments);return ed(l,1+cd(0,h.length-(arguments.length-1)),!0)};var cP=function t(){return GP(Wl,iP,arguments)};if(_P)_P(Jt.exports,"apply",{value:cP});else Jt.exports.apply=cP});var SP=M((x_,EP)=>{var xP=Th(),FP=nP(),id=FP(xP("String.prototype.indexOf"));EP.exports=function t(h,l){var P=xP(h,!!l);if(typeof P==="function"&&id(h,".prototype.")>-1)return FP(P);return P}});var MP=M((F_,oP)=>{oP.exports=import.meta.require("util").inspect});var qP=M((E_,HP)=>{function BP(t,h){if(t===1/0||t===-1/0||t!==t||t&&t>-1000&&t<1000||RP.call(/e/,h))return h;var l=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t==="number"){var P=t<0?-JP(-t):JP(t);if(P!==t){var u=String(P),f=gl.call(h,u.length+1);return a.call(u,l,"$&_")+"."+a.call(a.call(f,/([0-9]{3})/g,"$&_"),/_$/,"")}}return a.call(h,l,"$&_")}function KP(t,h,l){var P=(l.quoteStyle||h)==="double"?'"':"'";return P+t+P}function zd(t){return a.call(String(t),/"/g,""")}function ql(t){return hh(t)==="[object Array]"&&(!I||!(typeof t==="object"&&(I in t)))}function Ld(t){return hh(t)==="[object Date]"&&(!I||!(typeof t==="object"&&(I in t)))}function VP(t){return hh(t)==="[object RegExp]"&&(!I||!(typeof t==="object"&&(I in t)))}function Zd(t){return hh(t)==="[object Error]"&&(!I||!(typeof t==="object"&&(I in t)))}function Qd(t){return hh(t)==="[object String]"&&(!I||!(typeof t==="object"&&(I in t)))}function Xd(t){return hh(t)==="[object Number]"&&(!I||!(typeof t==="object"&&(I in t)))}function Jd(t){return hh(t)==="[object Boolean]"&&(!I||!(typeof t==="object"&&(I in t)))}function NP(t){if(Sh)return t&&typeof t==="object"&&t instanceof Symbol;if(typeof t==="symbol")return!0;if(!t||typeof t!=="object"||!Cl)return!1;try{return Cl.call(t),!0}catch(h){}return!1}function Yd(t){if(!t||typeof t!=="object"||!Dl)return!1;try{return Dl.call(t),!0}catch(h){}return!1}function j(t,h){return Bd.call(t,h)}function hh(t){return Fd.call(t)}function Ud(t){if(t.name)return t.name;var h=Sd.call(Ed.call(t),/^function\s*([\w$]+)/);if(h)return h[1];return null}function DP(t,h){if(t.indexOf)return t.indexOf(h);for(var l=0,P=t.length;l<P;l++)if(t[l]===h)return l;return-1}function Ad(t){if(!Ut||!t||typeof t!=="object")return!1;try{Ut.call(t);try{At.call(t)}catch(h){return!0}return t instanceof Map}catch(h){}return!1}function Vd(t){if(!sh||!t||typeof t!=="object")return!1;try{sh.call(t,sh);try{rh.call(t,rh)}catch(h){return!0}return t instanceof WeakMap}catch(h){}return!1}function Wd(t){if(!ZP||!t||typeof t!=="object")return!1;try{return ZP.call(t),!0}catch(h){}return!1}function Rd(t){if(!At||!t||typeof t!=="object")return!1;try{At.call(t);try{Ut.call(t)}catch(h){return!0}return t instanceof Set}catch(h){}return!1}function Id(t){if(!rh||!t||typeof t!=="object")return!1;try{rh.call(t,rh);try{sh.call(t,sh)}catch(h){return!0}return t instanceof WeakSet}catch(h){}return!1}function Kd(t){if(!t||typeof t!=="object")return!1;if(typeof HTMLElement!=="undefined"&&t instanceof HTMLElement)return!0;return typeof t.nodeName==="string"&&typeof t.getAttribute==="function"}function CP(t,h){if(t.length>h.maxStringLength){var l=t.length-h.maxStringLength,P="... "+l+" more character"+(l>1?"s":"");return CP(gl.call(t,0,h.maxStringLength),h)+P}var u=a.call(a.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Nd);return KP(u,"single",h)}function Nd(t){var h=t.charCodeAt(0),l={8:"b",9:"t",10:"n",12:"f",13:"r"}[h];if(l)return"\\"+l;return"\\x"+(h<16?"0":"")+od.call(h.toString(16))}function ph(t){return"Object("+t+")"}function Nl(t){return t+" { ? }"}function WP(t,h,l,P){var u=P?$l(l,P):w.call(l,", ");return t+" ("+h+") {"+u+"}"}function Dd(t){for(var h=0;h<t.length;h++)if(DP(t[h],"\n")>=0)return!1;return!0}function Cd(t,h){var l;if(t.indent==="\t")l="\t";else if(typeof t.indent==="number"&&t.indent>0)l=w.call(Array(t.indent+1)," ");else return null;return{base:l,prev:w.call(Array(h+1),l)}}function $l(t,h){if(t.length===0)return"";var l="\n"+h.prev+h.base;return l+w.call(t,","+l)+"\n"+h.prev}function Bt(t,h){var l=ql(t),P=[];if(l){P.length=t.length;for(var u=0;u<t.length;u++)P[u]=j(t,u)?h(t[u],t):""}var f=typeof Kl==="function"?Kl(t):[],T;if(Sh){T={};for(var v=0;v<f.length;v++)T["$"+f[v]]=f[v]}for(var e in t){if(!j(t,e))continue;if(l&&String(Number(e))===e&&e<t.length)continue;if(Sh&&T["$"+e]instanceof Symbol)continue;else if(RP.call(/[^\w$]/,e))P.push(h(e,t)+": "+h(t[e],t));else P.push(e+": "+h(t[e],t))}if(typeof Kl==="function"){for(var c=0;c<f.length;c++)if(IP.call(t,f[c]))P.push("["+h(f[c])+"]: "+h(t[f[c]],t))}return P}var wl=typeof Map==="function"&&Map.prototype,Rl=Object.getOwnPropertyDescriptor&&wl?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ut=wl&&Rl&&typeof Rl.get==="function"?Rl.get:null,zP=wl&&Map.prototype.forEach,kl=typeof Set==="function"&&Set.prototype,Il=Object.getOwnPropertyDescriptor&&kl?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,At=kl&&Il&&typeof Il.get==="function"?Il.get:null,LP=kl&&Set.prototype.forEach,Od=typeof WeakMap==="function"&&WeakMap.prototype,sh=Od?WeakMap.prototype.has:null,Gd=typeof WeakSet==="function"&&WeakSet.prototype,rh=Gd?WeakSet.prototype.has:null,nd=typeof WeakRef==="function"&&WeakRef.prototype,ZP=nd?WeakRef.prototype.deref:null,xd=Boolean.prototype.valueOf,Fd=Object.prototype.toString,Ed=Function.prototype.toString,Sd=String.prototype.match,gl=String.prototype.slice,a=String.prototype.replace,od=String.prototype.toUpperCase,QP=String.prototype.toLowerCase,RP=RegExp.prototype.test,XP=Array.prototype.concat,w=Array.prototype.join,Md=Array.prototype.slice,JP=Math.floor,Dl=typeof BigInt==="function"?BigInt.prototype.valueOf:null,Kl=Object.getOwnPropertySymbols,Cl=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol.prototype.toString:null,Sh=typeof Symbol==="function"&&typeof Symbol.iterator==="object",I=typeof Symbol==="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Sh?"object":"symbol")?Symbol.toStringTag:null,IP=Object.prototype.propertyIsEnumerable,YP=(typeof Reflect==="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null),Hl=MP(),UP=Hl.custom,AP=NP(UP)?UP:null;HP.exports=function t(h,l,P,u){var f=l||{};if(j(f,"quoteStyle")&&(f.quoteStyle!=="single"&&f.quoteStyle!=="double"))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(j(f,"maxStringLength")&&(typeof f.maxStringLength==="number"?f.maxStringLength<0&&f.maxStringLength!==1/0:f.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var T=j(f,"customInspect")?f.customInspect:!0;if(typeof T!=="boolean"&&T!=="symbol")throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');if(j(f,"indent")&&f.indent!==null&&f.indent!=="\t"&&!(parseInt(f.indent,10)===f.indent&&f.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(j(f,"numericSeparator")&&typeof f.numericSeparator!=="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=f.numericSeparator;if(typeof h==="undefined")return"undefined";if(h===null)return"null";if(typeof h==="boolean")return h?"true":"false";if(typeof h==="string")return CP(h,f);if(typeof h==="number"){if(h===0)return 1/0/h>0?"0":"-0";var e=String(h);return v?BP(h,e):e}if(typeof h==="bigint"){var c=String(h)+"n";return v?BP(h,c):c}var d=typeof f.depth==="undefined"?5:f.depth;if(typeof P==="undefined")P=0;if(P>=d&&d>0&&typeof h==="object")return ql(h)?"[Array]":"[Object]";var i=Cd(f,P);if(typeof u==="undefined")u=[];else if(DP(u,h)>=0)return"[Circular]";function _(N,r,b){if(r)u=Md.call(u),u.push(r);if(b){var Nh={depth:f.depth};if(j(f,"quoteStyle"))Nh.quoteStyle=f.quoteStyle;return t(N,Nh,P+1,u)}return t(N,f,P+1,u)}if(typeof h==="function"&&!VP(h)){var n=Ud(h),O=Bt(h,_);return"[Function"+(n?": "+n:" (anonymous)")+"]"+(O.length>0?" { "+w.call(O,", ")+" }":"")}if(NP(h)){var x=Sh?a.call(String(h),/^(Symbol\(.*\))_[^)]*$/,"$1"):Cl.call(h);return typeof h==="object"&&!Sh?ph(x):x}if(Kd(h)){var F="<"+QP.call(String(h.nodeName)),E=h.attributes||[];for(var o=0;o<E.length;o++)F+=" "+E[o].name+"="+KP(zd(E[o].value),"double",f);if(F+=">",h.childNodes&&h.childNodes.length)F+="...";return F+="</"+QP.call(String(h.nodeName))+">",F}if(ql(h)){if(h.length===0)return"[]";var G=Bt(h,_);if(i&&!Dd(G))return"["+$l(G,i)+"]";return"[ "+w.call(G,", ")+" ]"}if(Zd(h)){var L=Bt(h,_);if(!("cause"in Error.prototype)&&"cause"in h&&!IP.call(h,"cause"))return"{ ["+String(h)+"] "+w.call(XP.call("[cause]: "+_(h.cause),L),", ")+" }";if(L.length===0)return"["+String(h)+"]";return"{ ["+String(h)+"] "+w.call(L,", ")+" }"}if(typeof h==="object"&&T){if(AP&&typeof h[AP]==="function"&&Hl)return Hl(h,{depth:d-P});else if(T!=="symbol"&&typeof h.inspect==="function")return h.inspect()}if(Ad(h)){var R=[];if(zP)zP.call(h,function(N,r){R.push(_(r,h,!0)+" => "+_(N,h))});return WP("Map",Ut.call(h),R,i)}if(Rd(h)){var C=[];if(LP)LP.call(h,function(N){C.push(_(N,h))});return WP("Set",At.call(h),C,i)}if(Vd(h))return Nl("WeakMap");if(Id(h))return Nl("WeakSet");if(Wd(h))return Nl("WeakRef");if(Xd(h))return ph(_(Number(h)));if(Yd(h))return ph(_(Dl.call(h)));if(Jd(h))return ph(xd.call(h));if(Qd(h))return ph(_(String(h)));if(typeof window!=="undefined"&&h===window)return"{ [object Window] }";if(typeof globalThis!=="undefined"&&h===globalThis||typeof global!=="undefined"&&h===global)return"{ [object globalThis] }";if(!Ld(h)&&!VP(h)){var B=Bt(h,_),H=YP?YP(h)===Object.prototype:h instanceof Object||h.constructor===Object,Z=h instanceof Object?"":"null prototype",q=!H&&I&&Object(h)===h&&I in h?gl.call(hh(h),8,-1):Z?"Object":"",xt=H||typeof h.constructor!=="function"?"":h.constructor.name?h.constructor.name+" ":"",ih=xt+(q||Z?"["+w.call(XP.call([],q||[],Z||[]),": ")+"] ":"");if(B.length===0)return ih+"{}";if(i)return ih+"{"+$l(B,i)+"}";return ih+"{ "+w.call(B,", ")+" }"}return String(h)};var Bd=Object.prototype.hasOwnProperty||function(t){return t in this}});var kP=M((S_,wP)=>{var $P=Th(),oh=SP(),Hd=qP(),qd=Oh(),Vt=$P("%WeakMap%",!0),Wt=$P("%Map%",!0),$d=oh("WeakMap.prototype.get",!0),wd=oh("WeakMap.prototype.set",!0),kd=oh("WeakMap.prototype.has",!0),gd=oh("Map.prototype.get",!0),yd=oh("Map.prototype.set",!0),pd=oh("Map.prototype.has",!0),yl=function(t,h){var l=t,P;for(;(P=l.next)!==null;l=P)if(P.key===h)return l.next=P.next,P.next=t.next,t.next=P,P},sd=function(t,h){var l=yl(t,h);return l&&l.value},rd=function(t,h,l){var P=yl(t,h);if(P)P.value=l;else t.next={key:h,next:t.next,value:l}},bd=function(t,h){return!!yl(t,h)};wP.exports=function t(){var h,l,P,u={assert:function(f){if(!u.has(f))throw new qd("Side channel does not contain "+Hd(f))},get:function(f){if(Vt&&f&&(typeof f==="object"||typeof f==="function")){if(h)return $d(h,f)}else if(Wt){if(l)return gd(l,f)}else if(P)return sd(P,f)},has:function(f){if(Vt&&f&&(typeof f==="object"||typeof f==="function")){if(h)return kd(h,f)}else if(Wt){if(l)return pd(l,f)}else if(P)return bd(P,f);return!1},set:function(f,T){if(Vt&&f&&(typeof f==="object"||typeof f==="function")){if(!h)h=new Vt;wd(h,f,T)}else if(Wt){if(!l)l=new Wt;yd(l,f,T)}else{if(!P)P={key:{},next:null};rd(P,f,T)}}};return u}});var Rt=M((o_,gP)=>{var jd=String.prototype.replace,ad=/%20/g,pl={RFC1738:"RFC1738",RFC3986:"RFC3986"};gP.exports={default:pl.RFC3986,formatters:{RFC1738:function(t){return jd.call(t,ad,"+")},RFC3986:function(t){return String(t)}},RFC1738:pl.RFC1738,RFC3986:pl.RFC3986}});var bl=M((M_,pP)=>{var hv=Rt(),sl=Object.prototype.hasOwnProperty,dh=Array.isArray,k=function(){var t=[];for(var h=0;h<256;++h)t.push("%"+((h<16?"0":"")+h.toString(16)).toUpperCase());return t}(),tv=function t(h){while(h.length>1){var l=h.pop(),P=l.obj[l.prop];if(dh(P)){var u=[];for(var f=0;f<P.length;++f)if(typeof P[f]!=="undefined")u.push(P[f]);l.obj[l.prop]=u}}},yP=function t(h,l){var P=l&&l.plainObjects?Object.create(null):{};for(var u=0;u<h.length;++u)if(typeof h[u]!=="undefined")P[u]=h[u];return P},lv=function t(h,l,P){if(!l)return h;if(typeof l!=="object"){if(dh(h))h.push(l);else if(h&&typeof h==="object"){if(P&&(P.plainObjects||P.allowPrototypes)||!sl.call(Object.prototype,l))h[l]=!0}else return[h,l];return h}if(!h||typeof h!=="object")return[h].concat(l);var u=h;if(dh(h)&&!dh(l))u=yP(h,P);if(dh(h)&&dh(l))return l.forEach(function(f,T){if(sl.call(h,T)){var v=h[T];if(v&&typeof v==="object"&&f&&typeof f==="object")h[T]=t(v,f,P);else h.push(f)}else h[T]=f}),h;return Object.keys(l).reduce(function(f,T){var v=l[T];if(sl.call(f,T))f[T]=t(f[T],v,P);else f[T]=v;return f},u)},mv=function t(h,l){return Object.keys(l).reduce(function(P,u){return P[u]=l[u],P},h)},Pv=function(t,h,l){var P=t.replace(/\+/g," ");if(l==="iso-8859-1")return P.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(P)}catch(u){return P}},rl=1024,uv=function t(h,l,P,u,f){if(h.length===0)return h;var T=h;if(typeof h==="symbol")T=Symbol.prototype.toString.call(h);else if(typeof h!=="string")T=String(h);if(P==="iso-8859-1")return escape(T).replace(/%u[0-9a-f]{4}/gi,function(n){return"%26%23"+parseInt(n.slice(2),16)+"%3B"});var v="";for(var e=0;e<T.length;e+=rl){var c=T.length>=rl?T.slice(e,e+rl):T,d=[];for(var i=0;i<c.length;++i){var _=c.charCodeAt(i);if(_===45||_===46||_===95||_===126||_>=48&&_<=57||_>=65&&_<=90||_>=97&&_<=122||f===hv.RFC1738&&(_===40||_===41)){d[d.length]=c.charAt(i);continue}if(_<128){d[d.length]=k[_];continue}if(_<2048){d[d.length]=k[192|_>>6]+k[128|_&63];continue}if(_<55296||_>=57344){d[d.length]=k[224|_>>12]+k[128|_>>6&63]+k[128|_&63];continue}i+=1,_=65536+((_&1023)<<10|c.charCodeAt(i)&1023),d[d.length]=k[240|_>>18]+k[128|_>>12&63]+k[128|_>>6&63]+k[128|_&63]}v+=d.join("")}return v},fv=function t(h){var l=[{obj:{o:h},prop:"o"}],P=[];for(var u=0;u<l.length;++u){var f=l[u],T=f.obj[f.prop],v=Object.keys(T);for(var e=0;e<v.length;++e){var c=v[e],d=T[c];if(typeof d==="object"&&d!==null&&P.indexOf(d)===-1)l.push({obj:T,prop:c}),P.push(d)}}return tv(l),h},Tv=function t(h){return Object.prototype.toString.call(h)==="[object RegExp]"},dv=function t(h){if(!h||typeof h!=="object")return!1;return!!(h.constructor&&h.constructor.isBuffer&&h.constructor.isBuffer(h))},vv=function t(h,l){return[].concat(h,l)},ev=function t(h,l){if(dh(h)){var P=[];for(var u=0;u<h.length;u+=1)P.push(l(h[u]));return P}return l(h)};pP.exports={arrayToObject:yP,assign:mv,combine:vv,compact:fv,decode:Pv,encode:uv,isBuffer:dv,isRegExp:Tv,maybeMap:ev,merge:lv}});var hu=M((z_,aP)=>{var rP=kP(),It=bl(),bh=Rt(),_v=Object.prototype.hasOwnProperty,bP={brackets:function t(h){return h+"[]"},comma:"comma",indices:function t(h,l){return h+"["+l+"]"},repeat:function t(h){return h}},g=Array.isArray,cv=Array.prototype.push,jP=function(t,h){cv.apply(t,g(h)?h:[h])},iv=Date.prototype.toISOString,sP=bh.default,A={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:It.encode,encodeValuesOnly:!1,format:sP,formatter:bh.formatters[sP],indices:!1,serializeDate:function t(h){return iv.call(h)},skipNulls:!1,strictNullHandling:!1},Ov=function t(h){return typeof h==="string"||typeof h==="number"||typeof h==="boolean"||typeof h==="symbol"||typeof h==="bigint"},jl={},Gv=function t(h,l,P,u,f,T,v,e,c,d,i,_,n,O,x,F,E,o){var G=h,L=o,R=0,C=!1;while((L=L.get(jl))!==void 0&&!C){var B=L.get(h);if(R+=1,typeof B!=="undefined")if(B===R)throw new RangeError("Cyclic object value");else C=!0;if(typeof L.get(jl)==="undefined")R=0}if(typeof d==="function")G=d(l,G);else if(G instanceof Date)G=n(G);else if(P==="comma"&&g(G))G=It.maybeMap(G,function(il){if(il instanceof Date)return n(il);return il});if(G===null){if(T)return c&&!F?c(l,A.encoder,E,"key",O):l;G=""}if(Ov(G)||It.isBuffer(G)){if(c){var H=F?l:c(l,A.encoder,E,"key",O);return[x(H)+"="+x(c(G,A.encoder,E,"value",O))]}return[x(l)+"="+x(String(G))]}var Z=[];if(typeof G==="undefined")return Z;var q;if(P==="comma"&&g(G)){if(F&&c)G=It.maybeMap(G,c);q=[{value:G.length>0?G.join(",")||null:void 0}]}else if(g(d))q=d;else{var xt=Object.keys(G);q=i?xt.sort(i):xt}var ih=e?l.replace(/\./g,"%2E"):l,N=u&&g(G)&&G.length===1?ih+"[]":ih;if(f&&g(G)&&G.length===0)return N+"[]";for(var r=0;r<q.length;++r){var b=q[r],Nh=typeof b==="object"&&typeof b.value!=="undefined"?b.value:G[b];if(v&&Nh===null)continue;var cl=_&&e?b.replace(/\./g,"%2E"):b,L1=g(G)?typeof P==="function"?P(N,cl):N:N+(_?"."+cl:"["+cl+"]");o.set(h,R);var Em=rP();Em.set(jl,o),jP(Z,t(Nh,L1,P,u,f,T,v,e,P==="comma"&&F&&g(G)?null:c,d,i,_,n,O,x,F,E,Em))}return Z},nv=function t(h){if(!h)return A;if(typeof h.allowEmptyArrays!=="undefined"&&typeof h.allowEmptyArrays!=="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.encodeDotInKeys!=="undefined"&&typeof h.encodeDotInKeys!=="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(h.encoder!==null&&typeof h.encoder!=="undefined"&&typeof h.encoder!=="function")throw new TypeError("Encoder has to be a function.");var l=h.charset||A.charset;if(typeof h.charset!=="undefined"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var P=bh.default;if(typeof h.format!=="undefined"){if(!_v.call(bh.formatters,h.format))throw new TypeError("Unknown format option provided.");P=h.format}var u=bh.formatters[P],f=A.filter;if(typeof h.filter==="function"||g(h.filter))f=h.filter;var T;if(h.arrayFormat in bP)T=h.arrayFormat;else if("indices"in h)T=h.indices?"indices":"repeat";else T=A.arrayFormat;if("commaRoundTrip"in h&&typeof h.commaRoundTrip!=="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var v=typeof h.allowDots==="undefined"?h.encodeDotInKeys===!0?!0:A.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix==="boolean"?h.addQueryPrefix:A.addQueryPrefix,allowDots:v,allowEmptyArrays:typeof h.allowEmptyArrays==="boolean"?!!h.allowEmptyArrays:A.allowEmptyArrays,arrayFormat:T,charset:l,charsetSentinel:typeof h.charsetSentinel==="boolean"?h.charsetSentinel:A.charsetSentinel,commaRoundTrip:h.commaRoundTrip,delimiter:typeof h.delimiter==="undefined"?A.delimiter:h.delimiter,encode:typeof h.encode==="boolean"?h.encode:A.encode,encodeDotInKeys:typeof h.encodeDotInKeys==="boolean"?h.encodeDotInKeys:A.encodeDotInKeys,encoder:typeof h.encoder==="function"?h.encoder:A.encoder,encodeValuesOnly:typeof h.encodeValuesOnly==="boolean"?h.encodeValuesOnly:A.encodeValuesOnly,filter:f,format:P,formatter:u,serializeDate:typeof h.serializeDate==="function"?h.serializeDate:A.serializeDate,skipNulls:typeof h.skipNulls==="boolean"?h.skipNulls:A.skipNulls,sort:typeof h.sort==="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling==="boolean"?h.strictNullHandling:A.strictNullHandling}};aP.exports=function(t,h){var l=t,P=nv(h),u,f;if(typeof P.filter==="function")f=P.filter,l=f("",l);else if(g(P.filter))f=P.filter,u=f;var T=[];if(typeof l!=="object"||l===null)return"";var v=bP[P.arrayFormat],e=v==="comma"&&P.commaRoundTrip;if(!u)u=Object.keys(l);if(P.sort)u.sort(P.sort);var c=rP();for(var d=0;d<u.length;++d){var i=u[d];if(P.skipNulls&&l[i]===null)continue;jP(T,Gv(l[i],i,v,e,P.allowEmptyArrays,P.strictNullHandling,P.skipNulls,P.encodeDotInKeys,P.encode?P.encoder:null,P.filter,P.sort,P.allowDots,P.serializeDate,P.format,P.formatter,P.encodeValuesOnly,P.charset,c))}var _=T.join(P.delimiter),n=P.addQueryPrefix===!0?"?":"";if(P.charsetSentinel)if(P.charset==="iso-8859-1")n+="utf8=%26%2310003%3B&";else n+="utf8=%E2%9C%93&";return _.length>0?n+_:""}});var mu=M((L_,lu)=>{var Mh=bl(),al=Object.prototype.hasOwnProperty,xv=Array.isArray,Q={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Mh.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1000,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},Fv=function(t){return t.replace(/&#(\d+);/g,function(h,l){return String.fromCharCode(parseInt(l,10))})},tu=function(t,h){if(t&&typeof t==="string"&&h.comma&&t.indexOf(",")>-1)return t.split(",");return t},Ev="utf8=%26%2310003%3B",Sv="utf8=%E2%9C%93",ov=function t(h,l){var P={__proto__:null},u=l.ignoreQueryPrefix?h.replace(/^\?/,""):h;u=u.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var f=l.parameterLimit===1/0?void 0:l.parameterLimit,T=u.split(l.delimiter,f),v=-1,e,c=l.charset;if(l.charsetSentinel){for(e=0;e<T.length;++e)if(T[e].indexOf("utf8=")===0){if(T[e]===Sv)c="utf-8";else if(T[e]===Ev)c="iso-8859-1";v=e,e=T.length}}for(e=0;e<T.length;++e){if(e===v)continue;var d=T[e],i=d.indexOf("]="),_=i===-1?d.indexOf("="):i+1,n,O;if(_===-1)n=l.decoder(d,Q.decoder,c,"key"),O=l.strictNullHandling?null:"";else n=l.decoder(d.slice(0,_),Q.decoder,c,"key"),O=Mh.maybeMap(tu(d.slice(_+1),l),function(F){return l.decoder(F,Q.decoder,c,"value")});if(O&&l.interpretNumericEntities&&c==="iso-8859-1")O=Fv(O);if(d.indexOf("[]=")>-1)O=xv(O)?[O]:O;var x=al.call(P,n);if(x&&l.duplicates==="combine")P[n]=Mh.combine(P[n],O);else if(!x||l.duplicates==="last")P[n]=O}return P},Mv=function(t,h,l,P){var u=P?h:tu(h,l);for(var f=t.length-1;f>=0;--f){var T,v=t[f];if(v==="[]"&&l.parseArrays)T=l.allowEmptyArrays&&(u===""||l.strictNullHandling&&u===null)?[]:[].concat(u);else{T=l.plainObjects?Object.create(null):{};var e=v.charAt(0)==="["&&v.charAt(v.length-1)==="]"?v.slice(1,-1):v,c=l.decodeDotInKeys?e.replace(/%2E/g,"."):e,d=parseInt(c,10);if(!l.parseArrays&&c==="")T={0:u};else if(!isNaN(d)&&v!==c&&String(d)===c&&d>=0&&(l.parseArrays&&d<=l.arrayLimit))T=[],T[d]=u;else if(c!=="__proto__")T[c]=u}u=T}return u},zv=function t(h,l,P,u){if(!h)return;var f=P.allowDots?h.replace(/\.([^.[]+)/g,"[$1]"):h,T=/(\[[^[\]]*])/,v=/(\[[^[\]]*])/g,e=P.depth>0&&T.exec(f),c=e?f.slice(0,e.index):f,d=[];if(c){if(!P.plainObjects&&al.call(Object.prototype,c)){if(!P.allowPrototypes)return}d.push(c)}var i=0;while(P.depth>0&&(e=v.exec(f))!==null&&i<P.depth){if(i+=1,!P.plainObjects&&al.call(Object.prototype,e[1].slice(1,-1))){if(!P.allowPrototypes)return}d.push(e[1])}if(e){if(P.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+P.depth+" and strictDepth is true");d.push("["+f.slice(e.index)+"]")}return Mv(d,l,P,u)},Lv=function t(h){if(!h)return Q;if(typeof h.allowEmptyArrays!=="undefined"&&typeof h.allowEmptyArrays!=="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.decodeDotInKeys!=="undefined"&&typeof h.decodeDotInKeys!=="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(h.decoder!==null&&typeof h.decoder!=="undefined"&&typeof h.decoder!=="function")throw new TypeError("Decoder has to be a function.");if(typeof h.charset!=="undefined"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var l=typeof h.charset==="undefined"?Q.charset:h.charset,P=typeof h.duplicates==="undefined"?Q.duplicates:h.duplicates;if(P!=="combine"&&P!=="first"&&P!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var u=typeof h.allowDots==="undefined"?h.decodeDotInKeys===!0?!0:Q.allowDots:!!h.allowDots;return{allowDots:u,allowEmptyArrays:typeof h.allowEmptyArrays==="boolean"?!!h.allowEmptyArrays:Q.allowEmptyArrays,allowPrototypes:typeof h.allowPrototypes==="boolean"?h.allowPrototypes:Q.allowPrototypes,allowSparse:typeof h.allowSparse==="boolean"?h.allowSparse:Q.allowSparse,arrayLimit:typeof h.arrayLimit==="number"?h.arrayLimit:Q.arrayLimit,charset:l,charsetSentinel:typeof h.charsetSentinel==="boolean"?h.charsetSentinel:Q.charsetSentinel,comma:typeof h.comma==="boolean"?h.comma:Q.comma,decodeDotInKeys:typeof h.decodeDotInKeys==="boolean"?h.decodeDotInKeys:Q.decodeDotInKeys,decoder:typeof h.decoder==="function"?h.decoder:Q.decoder,delimiter:typeof h.delimiter==="string"||Mh.isRegExp(h.delimiter)?h.delimiter:Q.delimiter,depth:typeof h.depth==="number"||h.depth===!1?+h.depth:Q.depth,duplicates:P,ignoreQueryPrefix:h.ignoreQueryPrefix===!0,interpretNumericEntities:typeof h.interpretNumericEntities==="boolean"?h.interpretNumericEntities:Q.interpretNumericEntities,parameterLimit:typeof h.parameterLimit==="number"?h.parameterLimit:Q.parameterLimit,parseArrays:h.parseArrays!==!1,plainObjects:typeof h.plainObjects==="boolean"?h.plainObjects:Q.plainObjects,strictDepth:typeof h.strictDepth==="boolean"?!!h.strictDepth:Q.strictDepth,strictNullHandling:typeof h.strictNullHandling==="boolean"?h.strictNullHandling:Q.strictNullHandling}};lu.exports=function(t,h){var l=Lv(h);if(t===""||t===null||typeof t==="undefined")return l.plainObjects?Object.create(null):{};var P=typeof t==="string"?ov(t,l):t,u=l.plainObjects?Object.create(null):{},f=Object.keys(P);for(var T=0;T<f.length;++T){var v=f[T],e=zv(v,P[v],l,typeof t==="string");u=Mh.merge(u,e,l)}if(l.allowSparse===!0)return u;return Mh.compact(u)}});var uu=M((Z_,Pu)=>{var Zv=hu(),Qv=mu(),Xv=Rt();Pu.exports={formats:Xv,parse:Qv,stringify:Zv}});var z1={};Gl(z1,{paymentIntent:()=>Be,events:()=>Ie,dispute:()=>Re,customer:()=>Ae,charge:()=>Ve,balanceTransactions:()=>We,balance:()=>Ue});class K{getClientName(){throw new Error("getClientName not implemented.")}makeRequest(t,h,l,P,u,f,T,v){throw new Error("makeRequest not implemented.")}static makeTimeoutError(){const t=new TypeError(K.TIMEOUT_ERROR_CODE);return t.code=K.TIMEOUT_ERROR_CODE,t}}K.CONNECTION_CLOSED_ERROR_CODES=["ECONNRESET","EPIPE"];K.TIMEOUT_ERROR_CODE="ETIMEDOUT";class Dh{constructor(t,h){this._statusCode=t,this._headers=h}getStatusCode(){return this._statusCode}getHeaders(){return this._headers}getRawResponse(){throw new Error("getRawResponse not implemented.")}toStream(t){throw new Error("toStream not implemented.")}toJSON(){throw new Error("toJSON not implemented.")}}class Ch extends K{constructor(t){super();if(!t){if(!globalThis.fetch)throw new Error("fetch() function not provided and is not defined in the global scope. You must provide a fetch implementation.");t=globalThis.fetch}if(globalThis.AbortController)this._fetchFn=Ch.makeFetchWithAbortTimeout(t);else this._fetchFn=Ch.makeFetchWithRaceTimeout(t)}static makeFetchWithRaceTimeout(t){return(h,l,P)=>{let u;const f=new Promise((v,e)=>{u=setTimeout(()=>{u=null,e(K.makeTimeoutError())},P)}),T=t(h,l);return Promise.race([T,f]).finally(()=>{if(u)clearTimeout(u)})}}static makeFetchWithAbortTimeout(t){return async(h,l,P)=>{const u=new AbortController;let f=setTimeout(()=>{f=null,u.abort(K.makeTimeoutError())},P);try{return await t(h,Object.assign(Object.assign({},l),{signal:u.signal}))}catch(T){if(T.name==="AbortError")throw K.makeTimeoutError();else throw T}finally{if(f)clearTimeout(f)}}}getClientName(){return"fetch"}async makeRequest(t,h,l,P,u,f,T,v){const c=new URL(l,`${T==="http"?"http":"https"}://${t}`);c.port=h;const d=P=="POST"||P=="PUT"||P=="PATCH",i=f||(d?"":void 0),_=await this._fetchFn(c.toString(),{method:P,headers:u,body:i},v);return new nl(_)}}class nl extends Dh{constructor(t){super(t.status,nl._transformHeadersToObject(t.headers));this._res=t}getRawResponse(){return this._res}toStream(t){return t(),this._res.body}toJSON(){return this._res.json()}static _transformHeadersToObject(t){const h={};for(let l of t){if(!Array.isArray(l)||l.length!=2)throw new Error("Response objects produced by the fetch function given to FetchHttpClient do not have an iterable headers map. Response#headers should be an iterable object.");h[l[0]]=l[1]}return h}}class Hh{computeHMACSignature(t,h){throw new Error("computeHMACSignature not implemented.")}computeHMACSignatureAsync(t,h){throw new Error("computeHMACSignatureAsync not implemented.")}computeSHA256Async(t){throw new Error("computeSHA256 not implemented.")}}class qh extends Error{}class Fl extends Hh{constructor(t){super();this.subtleCrypto=t||crypto.subtle}computeHMACSignature(t,h){throw new qh("SubtleCryptoProvider cannot be used in a synchronous context.")}async computeHMACSignatureAsync(t,h){const l=new TextEncoder,P=await this.subtleCrypto.importKey("raw",l.encode(h),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),u=await this.subtleCrypto.sign("hmac",P,l.encode(t)),f=new Uint8Array(u),T=new Array(f.length);for(let v=0;v<f.length;v++)T[v]=xl[f[v]];return T.join("")}async computeSHA256Async(t){return new Uint8Array(await this.subtleCrypto.digest("SHA-256",t))}}var xl=new Array(256);for(let t=0;t<xl.length;t++)xl[t]=t.toString(16).padStart(2,"0");class El{constructor(){this._fetchFn=null,this._agent=null}getUname(){throw new Error("getUname not implemented.")}uuid4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t)=>{const h=Math.random()*16|0;return(t==="x"?h:h&3|8).toString(16)})}secureCompare(t,h){if(t.length!==h.length)return!1;const l=t.length;let P=0;for(let u=0;u<l;++u)P|=t.charCodeAt(u)^h.charCodeAt(u);return P===0}createEmitter(){throw new Error("createEmitter not implemented.")}tryBufferData(t){throw new Error("tryBufferData not implemented.")}createNodeHttpClient(t){throw new Error("createNodeHttpClient not implemented.")}createFetchHttpClient(t){return new Ch(t)}createDefaultHttpClient(){throw new Error("createDefaultHttpClient not implemented.")}createNodeCryptoProvider(){throw new Error("createNodeCryptoProvider not implemented.")}createSubtleCryptoProvider(t){return new Fl(t)}createDefaultCryptoProvider(){throw new Error("createDefaultCryptoProvider not implemented.")}}class Sm extends Event{constructor(t,h){super(t);this.data=h}}class Sl{constructor(){this.eventTarget=new EventTarget,this.listenerMapping=new Map}on(t,h){const l=(P)=>{h(P.data)};return this.listenerMapping.set(h,l),this.eventTarget.addEventListener(t,l)}removeListener(t,h){const l=this.listenerMapping.get(h);return this.listenerMapping.delete(h),this.eventTarget.removeEventListener(t,l)}once(t,h){const l=(P)=>{h(P.data)};return this.listenerMapping.set(h,l),this.eventTarget.addEventListener(t,l,{once:!0})}emit(t,h){return this.eventTarget.dispatchEvent(new Sm(t,h))}}class ol extends El{getUname(){return Promise.resolve(null)}createEmitter(){return new Sl}tryBufferData(t){if(t.file.data instanceof ReadableStream)throw new Error("Uploading a file as a stream is not supported in non-Node environments. Please open or upvote an issue at github.com/stripe/stripe-node if you use this, detailing your use-case.");return Promise.resolve(t)}createNodeHttpClient(){throw new Error("Stripe: `createNodeHttpClient()` is not available in non-Node environments. Please use `createFetchHttpClient()` instead.")}createDefaultHttpClient(){return super.createFetchHttpClient()}createNodeCryptoProvider(){throw new Error("Stripe: `createNodeCryptoProvider()` is not available in non-Node environments. Please use `createSubtleCryptoProvider()` instead.")}createDefaultCryptoProvider(){return this.createSubtleCryptoProvider()}}var ot={};Gl(ot,{generateV2Error:()=>Ml,generateV1Error:()=>$h,TemporarySessionExpiredError:()=>Xl,StripeUnknownError:()=>Ql,StripeSignatureVerificationError:()=>$,StripeRateLimitError:()=>gh,StripePermissionError:()=>Et,StripeInvalidRequestError:()=>Ft,StripeInvalidGrantError:()=>Zl,StripeIdempotencyError:()=>Ll,StripeError:()=>U,StripeConnectionError:()=>St,StripeCardError:()=>zl,StripeAuthenticationError:()=>kh,StripeAPIError:()=>wh});var $h=(t)=>{switch(t.type){case"card_error":return new zl(t);case"invalid_request_error":return new Ft(t);case"api_error":return new wh(t);case"authentication_error":return new kh(t);case"rate_limit_error":return new gh(t);case"idempotency_error":return new Ll(t);case"invalid_grant":return new Zl(t);default:return new Ql(t)}},Ml=(t)=>{switch(t.type){case"temporary_session_expired":return new Xl(t)}switch(t.code){case"invalid_fields":return new Ft(t)}return $h(t)};class U extends Error{constructor(t={},h=null){super(t.message);this.type=h||this.constructor.name,this.raw=t,this.rawType=t.type,this.code=t.code,this.doc_url=t.doc_url,this.param=t.param,this.detail=t.detail,this.headers=t.headers,this.requestId=t.requestId,this.statusCode=t.statusCode,this.message=t.message,this.userMessage=t.user_message,this.charge=t.charge,this.decline_code=t.decline_code,this.payment_intent=t.payment_intent,this.payment_method=t.payment_method,this.payment_method_type=t.payment_method_type,this.setup_intent=t.setup_intent,this.source=t.source}}U.generate=$h;class zl extends U{constructor(t={}){super(t,"StripeCardError")}}class Ft extends U{constructor(t={}){super(t,"StripeInvalidRequestError")}}class wh extends U{constructor(t={}){super(t,"StripeAPIError")}}class kh extends U{constructor(t={}){super(t,"StripeAuthenticationError")}}class Et extends U{constructor(t={}){super(t,"StripePermissionError")}}class gh extends U{constructor(t={}){super(t,"StripeRateLimitError")}}class St extends U{constructor(t={}){super(t,"StripeConnectionError")}}class $ extends U{constructor(t,h,l={}){super(l,"StripeSignatureVerificationError");this.header=t,this.payload=h}}class Ll extends U{constructor(t={}){super(t,"StripeIdempotencyError")}}class Zl extends U{constructor(t={}){super(t,"StripeInvalidGrantError")}}class Ql extends U{constructor(t={}){super(t,"StripeUnknownError")}}class Xl extends U{constructor(t={}){super(t,"TemporarySessionExpiredError")}}var fu=Y1(uu(),1);function Tu(t){return t&&typeof t==="object"&&hm.some((h)=>Object.prototype.hasOwnProperty.call(t,h))}function th(t,h){return fu.stringify(t,{serializeDate:(l)=>Math.floor(l.getTime()/1000).toString(),arrayFormat:h=="v2"?"repeat":"indices"}).replace(/%5B/g,"[").replace(/%5D/g,"]")}function du(t){const h=t.match(/\{\w+\}/g);if(!h)return[];return h.map((l)=>l.replace(/[{}]/g,""))}function zh(t){if(!Array.isArray(t)||!t[0]||typeof t[0]!=="object")return{};if(!Tu(t[0]))return t.shift();const h=Object.keys(t[0]),l=h.filter((P)=>hm.includes(P));if(l.length>0&&l.length!==h.length)ah(`Options found in arguments (${l.join(", ")}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options.`);return{}}function Dt(t){const h={host:null,headers:{},settings:{}};if(t.length>0){const l=t[t.length-1];if(typeof l==="string")h.authenticator=Kt(t.pop());else if(Tu(l)){const P=Object.assign({},t.pop()),u=Object.keys(P).filter((f)=>!hm.includes(f));if(u.length)ah(`Invalid options found (${u.join(", ")}); ignoring.`);if(P.apiKey)h.authenticator=Kt(P.apiKey);if(P.idempotencyKey)h.headers["Idempotency-Key"]=P.idempotencyKey;if(P.stripeAccount)h.headers["Stripe-Account"]=P.stripeAccount;if(P.stripeContext){if(h.headers["Stripe-Account"])throw new Error("Can't specify both stripeAccount and stripeContext.");h.headers["Stripe-Context"]=P.stripeContext}if(P.apiVersion)h.headers["Stripe-Version"]=P.apiVersion;if(Number.isInteger(P.maxNetworkRetries))h.settings.maxNetworkRetries=P.maxNetworkRetries;if(Number.isInteger(P.timeout))h.settings.timeout=P.timeout;if(P.host)h.host=P.host;if(P.authenticator){if(P.apiKey)throw new Error("Can't specify both apiKey and authenticator.");if(typeof P.authenticator!=="function")throw new Error("The authenticator must be a function receiving a request as the first parameter.");h.authenticator=P.authenticator}if(P.additionalHeaders)h.headers=P.additionalHeaders}}return h}function vu(t){const h=this,l=Object.prototype.hasOwnProperty.call(t,"constructor")?t.constructor:function(...P){h.apply(this,P)};return Object.assign(l,h),l.prototype=Object.create(h.prototype),Object.assign(l.prototype,t),l}function Ct(t){if(typeof t!=="object")throw new Error("Argument must be an object");return Object.keys(t).reduce((h,l)=>{if(t[l]!=null)h[l]=t[l];return h},{})}function eu(t){if(!(t&&typeof t==="object"))return t;return Object.keys(t).reduce((h,l)=>{return h[Jv(l)]=t[l],h},{})}function Jv(t){return t.split("-").map((h)=>h.charAt(0).toUpperCase()+h.substr(1).toLowerCase()).join("-")}function jh(t,h){if(h)return t.then((l)=>{setTimeout(()=>{h(null,l)},0)},(l)=>{setTimeout(()=>{h(l,null)},0)});return t}function _u(t){if(t==="OAuth")return"oauth";else return t[0].toLowerCase()+t.substring(1)}function ah(t){if(typeof process.emitWarning!=="function")return console.warn(`Stripe: ${t}`);return process.emitWarning(t,"Stripe")}function Yv(t){const h=typeof t;return(h==="function"||h==="object")&&!!t}function cu(t){const h={},l=(P,u)=>{Object.entries(P).forEach(([f,T])=>{const v=u?`${u}[${f}]`:f;if(Yv(T))if(!(T instanceof Uint8Array)&&!Object.prototype.hasOwnProperty.call(T,"data"))return l(T,v);else h[v]=T;else h[v]=String(T)})};return l(t,null),h}function Ht(t,h,l){if(!Number.isInteger(h))if(l!==void 0)return l;else throw new Error(`${t} must be an integer`);return h}function iu(){return typeof process==="undefined"?{}:{lang_version:process.version,platform:process.platform}}function Kt(t){const h=(l)=>{return l.headers.Authorization="Bearer "+t,Promise.resolve()};return h._apiKey=t,h}function Bv(t,h){if(this[t]instanceof Date)return Math.floor(this[t].getTime()/1000).toString();return h}function Ou(t){return JSON.stringify(t,Bv)}function Lh(t){if(!t)return"v1";return t.startsWith("/v2")?"v2":"v1"}var hm=["apiKey","idempotencyKey","stripeAccount","apiVersion","maxNetworkRetries","timeout","host","authenticator","stripeContext","additionalHeaders"],Nt=(()=>{const t={"\n":"\\n",'"':'\\"',"\u2028":"\\u2028","\u2029":"\\u2029"};return(h)=>{const l=h.replace(/["\n\r\u2028\u2029]/g,(P)=>t[P]);return(P)=>{return l.replace(/\{([\s\S]+?)\}/g,(u,f)=>encodeURIComponent(P[f]||""))}}})();var Uv=60;class Zh{constructor(t,h){this._stripe=t,this._maxBufferedRequestMetric=h}_addHeadersDirectlyToObject(t,h){t.requestId=h["request-id"],t.stripeAccount=t.stripeAccount||h["stripe-account"],t.apiVersion=t.apiVersion||h["stripe-version"],t.idempotencyKey=t.idempotencyKey||h["idempotency-key"]}_makeResponseEvent(t,h,l){const P=Date.now(),u=P-t.request_start_time;return Ct({api_version:l["stripe-version"],account:l["stripe-account"],idempotency_key:l["idempotency-key"],method:t.method,path:t.path,status:h,request_id:this._getRequestId(l),elapsed:u,request_start_time:t.request_start_time,request_end_time:P})}_getRequestId(t){return t["request-id"]}_streamingResponseHandler(t,h,l){return(P)=>{const u=P.getHeaders(),f=()=>{const v=this._makeResponseEvent(t,P.getStatusCode(),u);this._stripe._emitter.emit("response",v),this._recordRequestMetrics(this._getRequestId(u),v.elapsed,h)},T=P.toStream(f);return this._addHeadersDirectlyToObject(T,u),l(null,T)}}_jsonResponseHandler(t,h,l,P){return(u)=>{const f=u.getHeaders(),T=this._getRequestId(f),v=u.getStatusCode(),e=this._makeResponseEvent(t,v,f);this._stripe._emitter.emit("response",e),u.toJSON().then((c)=>{if(c.error){let d;if(typeof c.error==="string")c.error={type:c.error,message:c.error_description};if(c.error.headers=f,c.error.statusCode=v,c.error.requestId=T,v===401)d=new kh(c.error);else if(v===403)d=new Et(c.error);else if(v===429)d=new gh(c.error);else if(h==="v2")d=Ml(c.error);else d=$h(c.error);throw d}return c},(c)=>{throw new wh({message:"Invalid JSON received from the Stripe API",exception:c,requestId:f["request-id"]})}).then((c)=>{this._recordRequestMetrics(T,e.elapsed,l);const d=u.getRawResponse();this._addHeadersDirectlyToObject(d,f),Object.defineProperty(c,"lastResponse",{enumerable:!1,writable:!1,value:d}),P(null,c)},(c)=>P(c,null))}}static _generateConnectionErrorMessage(t){return`An error occurred with our connection to Stripe.${t>0?` Request was retried ${t} times.`:""}`}static _shouldRetry(t,h,l,P){if(P&&h===0&&K.CONNECTION_CLOSED_ERROR_CODES.includes(P.code))return!0;if(h>=l)return!1;if(!t)return!0;if(t.getHeaders()["stripe-should-retry"]==="false")return!1;if(t.getHeaders()["stripe-should-retry"]==="true")return!0;if(t.getStatusCode()===409)return!0;if(t.getStatusCode()>=500)return!0;return!1}_getSleepTimeInMS(t,h=null){const l=this._stripe.getInitialNetworkRetryDelay(),P=this._stripe.getMaxNetworkRetryDelay();let u=Math.min(l*Math.pow(2,t-1),P);if(u*=0.5*(1+Math.random()),u=Math.max(l,u),Number.isInteger(h)&&h<=Uv)u=Math.max(u,h);return u*1000}_getMaxNetworkRetries(t={}){return t.maxNetworkRetries!==void 0&&Number.isInteger(t.maxNetworkRetries)?t.maxNetworkRetries:this._stripe.getMaxNetworkRetries()}_defaultIdempotencyKey(t,h,l){const P=this._getMaxNetworkRetries(h),u=()=>`stripe-node-retry-${this._stripe._platformFunctions.uuid4()}`;if(l==="v2"){if(t==="POST"||t==="DELETE")return u()}else if(l==="v1"){if(t==="POST"&&P>0)return u()}return null}_makeHeaders({contentType:t,contentLength:h,apiVersion:l,clientUserAgent:P,method:u,userSuppliedHeaders:f,userSuppliedSettings:T,stripeAccount:v,stripeContext:e,apiMode:c}){const d={Accept:"application/json","Content-Type":t,"User-Agent":this._getUserAgentString(c),"X-Stripe-Client-User-Agent":P,"X-Stripe-Client-Telemetry":this._getTelemetryHeader(),"Stripe-Version":l,"Stripe-Account":v,"Stripe-Context":e,"Idempotency-Key":this._defaultIdempotencyKey(u,T,c)},i=u=="POST"||u=="PUT"||u=="PATCH";if(i||h){if(!i)ah(`${u} method had non-zero contentLength but no payload is expected for this verb`);d["Content-Length"]=h}return Object.assign(Ct(d),eu(f))}_getUserAgentString(t){const h=this._stripe.getConstant("PACKAGE_VERSION"),l=this._stripe._appInfo?this._stripe.getAppInfoAsString():"";return`Stripe/${t} NodeBindings/${h} ${l}`.trim()}_getTelemetryHeader(){if(this._stripe.getTelemetryEnabled()&&this._stripe._prevRequestMetrics.length>0){const t=this._stripe._prevRequestMetrics.shift();return JSON.stringify({last_request_metrics:t})}}_recordRequestMetrics(t,h,l){if(this._stripe.getTelemetryEnabled()&&t)if(this._stripe._prevRequestMetrics.length>this._maxBufferedRequestMetric)ah("Request metrics buffer is full, dropping telemetry message.");else{const P={request_id:t,request_duration_ms:h};if(l&&l.length>0)P.usage=l;this._stripe._prevRequestMetrics.push(P)}}_rawRequest(t,h,l,P){return new Promise((f,T)=>{let v;try{const _=t.toUpperCase();if(_!=="POST"&&l&&Object.keys(l).length!==0)throw new Error("rawRequest only supports params on POST requests. Please pass null and add your parameters to path.");const n=[].slice.call([l,P]),O=zh(n),x=Object.assign({},O),F=Dt(n),E=F.headers,o=F.authenticator;v={requestMethod:_,requestPath:h,bodyData:x,queryData:{},authenticator:o,headers:E,host:null,streaming:!1,settings:{},usage:["raw_request"]}}catch(_){T(_);return}function e(_,n){if(_)T(_);else f(n)}const{headers:c,settings:d}=v,i=v.authenticator;this._request(v.requestMethod,v.host,h,v.bodyData,i,{headers:c,settings:d,streaming:v.streaming},v.usage,e)})}_request(t,h,l,P,u,f,T=[],v,e=null){var c;let d;u=(c=u!==null&&u!==void 0?u:this._stripe._authenticator)!==null&&c!==void 0?c:null;const i=Lh(l),_=(x,F,E,o,G)=>{return setTimeout(x,this._getSleepTimeInMS(o,G),F,E,o+1)},n=(x,F,E)=>{const o=f.settings&&f.settings.timeout&&Number.isInteger(f.settings.timeout)&&f.settings.timeout>=0?f.settings.timeout:this._stripe.getApiField("timeout"),G={host:h||this._stripe.getApiField("host"),port:this._stripe.getApiField("port"),path:l,method:t,headers:Object.assign({},F),body:d,protocol:this._stripe.getApiField("protocol")};u(G).then(()=>{const L=this._stripe.getApiField("httpClient").makeRequest(G.host,G.port,G.path,G.method,G.headers,G.body,G.protocol,o),R=Date.now(),C=Ct({api_version:x,account:F["Stripe-Account"],idempotency_key:F["Idempotency-Key"],method:t,path:l,request_start_time:R}),B=E||0,H=this._getMaxNetworkRetries(f.settings||{});this._stripe._emitter.emit("request",C),L.then((Z)=>{if(Zh._shouldRetry(Z,B,H))return _(n,x,F,B,Z.getHeaders()["retry-after"]);else if(f.streaming&&Z.getStatusCode()<400)return this._streamingResponseHandler(C,T,v)(Z);else return this._jsonResponseHandler(C,i,T,v)(Z)}).catch((Z)=>{if(Zh._shouldRetry(null,B,H,Z))return _(n,x,F,B,null);else{const q=Z.code&&Z.code===K.TIMEOUT_ERROR_CODE;return v(new St({message:q?`Request aborted due to timeout being reached (${o}ms)`:Zh._generateConnectionErrorMessage(B),detail:Z}))}})}).catch((L)=>{throw new U({message:"Unable to authenticate the request",exception:L})})},O=(x,F)=>{if(x)return v(x);d=F,this._stripe.getClientUserAgent((E)=>{const o=this._stripe.getApiField("version"),G=this._makeHeaders({contentType:i=="v2"?"application/json":"application/x-www-form-urlencoded",contentLength:d.length,apiVersion:o,clientUserAgent:E,method:t,userSuppliedHeaders:f.headers,userSuppliedSettings:f.settings,stripeAccount:i=="v2"?null:this._stripe.getApiField("stripeAccount"),stripeContext:i=="v2"?this._stripe.getApiField("stripeContext"):null,apiMode:i});n(o,G,0)})};if(e)e(t,P,f.headers,O);else{let x;if(i=="v2")x=P?Ou(P):"";else x=th(P||{},i);O(null,x)}}}function Av(){if(typeof Symbol!=="undefined"&&Symbol.asyncIterator)return Symbol.asyncIterator;return"@@asyncIterator"}function Vv(t){if(t.length<2)return null;const h=t[1];if(typeof h!=="function")throw Error(`The second argument to autoPagingEach, if present, must be a callback function; received ${typeof h}`);return h}function Wv(t){if(t.length===0)return;const h=t[0];if(typeof h!=="function")throw Error(`The first argument to autoPagingEach, if present, must be a callback function; received ${typeof h}`);if(h.length===2)return h;if(h.length>2)throw Error(`The \`onItem\` callback function passed to autoPagingEach must accept at most two arguments; got ${h}`);return function l(P,u){const f=h(P);u(f)}}function Rv(t,h){const l=h?0:t.data.length-1,P=t.data[l],u=P&&P.id;if(!u)throw Error("Unexpected: No `id` found on the last item while auto-paging a list.");return u}function Iv(t){return function h(){const l=[].slice.call(arguments),P=Wv(l),u=Vv(l);if(l.length>2)throw Error(`autoPagingEach takes up to two arguments; received ${l}`);const f=Nv(t,P);return jh(f,u)}}function Kv(t){return function h(l,P){const u=l&&l.limit;if(!u)throw Error("You must pass a `limit` option to autoPagingToArray, e.g., `autoPagingToArray({limit: 1000});`.");if(u>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.");const f=new Promise((T,v)=>{const e=[];t((c)=>{if(e.push(c),e.length>=u)return!1}).then(()=>{T(e)}).catch(v)});return jh(f,P)}}function Nv(t,h){return new Promise((l,P)=>{function u(f){if(f.done){l();return}const T=f.value;return new Promise((v)=>{h(T,v)}).then((v)=>{if(v===!1)return u({done:!0,value:void 0});else return t().then(u)})}t().then(u).catch(P)})}function Eu(t){const h=[].slice.call(t);return!!zh(h).ending_before}class lm{constructor(t,h,l,P){this.index=0,this.pagePromise=t,this.promiseCache={currentPromise:null},this.requestArgs=h,this.spec=l,this.stripeResource=P}async iterate(t){if(!(t&&t.data&&typeof t.data.length==="number"))throw Error("Unexpected: Stripe API response does not have a well-formed `data` array.");const h=Eu(this.requestArgs);if(this.index<t.data.length){const l=h?t.data.length-1-this.index:this.index,P=t.data[l];return this.index+=1,{value:P,done:!1}}else if(t.has_more){this.index=0,this.pagePromise=this.getNextPage(t);const l=await this.pagePromise;return this.iterate(l)}return{done:!0,value:void 0}}getNextPage(t){throw new Error("Unimplemented")}async _next(){return this.iterate(await this.pagePromise)}next(){if(this.promiseCache.currentPromise)return this.promiseCache.currentPromise;const t=(async()=>{const h=await this._next();return this.promiseCache.currentPromise=null,h})();return this.promiseCache.currentPromise=t,t}}class Gu extends lm{getNextPage(t){const h=Eu(this.requestArgs),l=Rv(t,h);return this.stripeResource._makeRequest(this.requestArgs,this.spec,{[h?"ending_before":"starting_after"]:l})}}class nu extends lm{getNextPage(t){if(!t.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:t.next_page})}}class xu{constructor(t,h,l,P){this.currentPageIterator=(async()=>{return(await t).data[Symbol.iterator]()})(),this.nextPageUrl=(async()=>{return(await t).next_page_url||null})(),this.requestArgs=h,this.spec=l,this.stripeResource=P}async turnPage(){const t=await this.nextPageUrl;if(!t)return null;this.spec.fullPath=t;const h=await this.stripeResource._makeRequest([],this.spec,{});return this.nextPageUrl=Promise.resolve(h.next_page_url),this.currentPageIterator=Promise.resolve(h.data[Symbol.iterator]()),this.currentPageIterator}async next(){{const l=(await this.currentPageIterator).next();if(!l.done)return{done:!1,value:l.value}}const t=await this.turnPage();if(!t)return{done:!0,value:void 0};const h=t.next();if(!h.done)return{done:!1,value:h.value};return{done:!0,value:void 0}}}var Fu=(t,h,l,P)=>{const u=Lh(l.fullPath||l.path);if(u!=="v2"&&l.methodType==="search")return tm(new nu(P,h,l,t));if(u!=="v2"&&l.methodType==="list")return tm(new Gu(P,h,l,t));if(u==="v2"&&l.methodType==="list")return tm(new xu(P,h,l,t));return null},tm=(t)=>{const h=Iv((...u)=>t.next(...u)),l=Kv(h),P={autoPagingEach:h,autoPagingToArray:l,next:()=>t.next(),return:()=>{return{}},[Av()]:()=>{return P}};return P};function Su(t){if(t.path!==void 0&&t.fullPath!==void 0)throw new Error(`Method spec specified both a 'path' (${t.path}) and a 'fullPath' (${t.fullPath}).`);return function(...h){const l=typeof h[h.length-1]=="function"&&h.pop();t.urlParams=du(t.fullPath||this.createResourcePathWithSymbols(t.path||""));const P=jh(this._makeRequest(h,t,{}),l);return Object.assign(P,Fu(this,h,t,P)),P}}function m(t,h){if(this._stripe=t,h)throw new Error("Support for curried url params was dropped in stripe-node v7.0.0. Instead, pass two ids.");this.basePath=Nt(this.basePath||t.getApiField("basePath")),this.resourcePath=this.path,this.path=Nt(this.path),this.initialize(...arguments)}m.extend=vu;m.method=Su;m.MAX_BUFFERED_REQUEST_METRICS=100;m.prototype={_stripe:null,path:"",resourcePath:"",basePath:null,initialize(){},requestDataProcessor:null,validateRequest:null,createFullPath(t,h){const l=[this.basePath(h),this.path(h)];if(typeof t==="function"){const P=t(h);if(P)l.push(P)}else l.push(t);return this._joinUrlParts(l)},createResourcePathWithSymbols(t){if(t)return`/${this._joinUrlParts([this.resourcePath,t])}`;else return`/${this.resourcePath}`},_joinUrlParts(t){return t.join("/").replace(/\/{2,}/g,"/")},_getRequestOpts(t,h,l){var P;const u=(h.method||"GET").toUpperCase(),f=h.usage||[],T=h.urlParams||[],v=h.encode||((B)=>B),e=!!h.fullPath,c=Nt(e?h.fullPath:h.path||""),d=e?h.fullPath:this.createResourcePathWithSymbols(h.path),i=[].slice.call(t),_=T.reduce((B,H)=>{const Z=i.shift();if(typeof Z!=="string")throw new Error(`Stripe: Argument "${H}" must be a string, but got: ${Z} (on API request to \`${u} ${d}\`)`);return B[H]=Z,B},{}),n=zh(i),O=v(Object.assign({},n,l)),x=Dt(i),F=x.host||h.host,E=!!h.streaming;if(i.filter((B)=>B!=null).length)throw new Error(`Stripe: Unknown arguments (${i}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options. (on API request to ${u} \`${d}\`)`);const o=e?c(_):this.createFullPath(c,_),G=Object.assign(x.headers,h.headers);if(h.validator)h.validator(O,{headers:G});const L=h.method==="GET"||h.method==="DELETE";return{requestMethod:u,requestPath:o,bodyData:L?null:O,queryData:L?O:{},authenticator:(P=x.authenticator)!==null&&P!==void 0?P:null,headers:G,host:F!==null&&F!==void 0?F:null,streaming:E,settings:x.settings,usage:f}},_makeRequest(t,h,l){return new Promise((P,u)=>{var f;let T;try{T=this._getRequestOpts(t,h,l)}catch(_){u(_);return}function v(_,n){if(_)u(_);else P(h.transformResponseData?h.transformResponseData(n):n)}const e=Object.keys(T.queryData).length===0,c=[T.requestPath,e?"":"?",th(T.queryData,Lh(T.requestPath))].join(""),{headers:d,settings:i}=T;this._stripe._requestSender._request(T.requestMethod,T.host,c,T.bodyData,T.authenticator,{headers:d,settings:i,streaming:T.streaming},T.usage,v,(f=this.requestDataProcessor)===null||f===void 0?void 0:f.bind(this))})}};function mm(t){const h={DEFAULT_TOLERANCE:300,signature:null,constructEvent(d,i,_,n,O,x){try{this.signature.verifyHeader(d,i,_,n||h.DEFAULT_TOLERANCE,O,x)}catch(E){if(E instanceof qh)E.message+="\nUse `await constructEventAsync(...)` instead of `constructEvent(...)`";throw E}return d instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(d)):JSON.parse(d)},async constructEventAsync(d,i,_,n,O,x){return await this.signature.verifyHeaderAsync(d,i,_,n||h.DEFAULT_TOLERANCE,O,x),d instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(d)):JSON.parse(d)},generateTestHeaderString:function(d){const i=c(d),_=i.signature||i.cryptoProvider.computeHMACSignature(i.payloadString,i.secret);return i.generateHeaderString(_)},generateTestHeaderStringAsync:async function(d){const i=c(d),_=i.signature||await i.cryptoProvider.computeHMACSignatureAsync(i.payloadString,i.secret);return i.generateHeaderString(_)}},l={EXPECTED_SCHEME:"v1",verifyHeader(d,i,_,n,O,x){const{decodedHeader:F,decodedPayload:E,details:o,suspectPayloadType:G}=u(d,i,this.EXPECTED_SCHEME),L=/\s/.test(_);O=O||e();const R=O.computeHMACSignature(P(E,o),_);return f(E,F,o,R,n,G,L,x),!0},async verifyHeaderAsync(d,i,_,n,O,x){const{decodedHeader:F,decodedPayload:E,details:o,suspectPayloadType:G}=u(d,i,this.EXPECTED_SCHEME),L=/\s/.test(_);O=O||e();const R=await O.computeHMACSignatureAsync(P(E,o),_);return f(E,F,o,R,n,G,L,x)}};function P(d,i){return`${i.timestamp}.${d}`}function u(d,i,_){if(!d)throw new $(i,d,{message:"No webhook payload was provided."});const n=typeof d!="string"&&!(d instanceof Uint8Array),O=new TextDecoder("utf8"),x=d instanceof Uint8Array?O.decode(d):d;if(Array.isArray(i))throw new Error("Unexpected: An array was passed as a header, which should not be possible for the stripe-signature header.");if(i==null||i=="")throw new $(i,d,{message:"No stripe-signature header value was provided."});const F=i instanceof Uint8Array?O.decode(i):i,E=T(F,_);if(!E||E.timestamp===-1)throw new $(F,x,{message:"Unable to extract timestamp and signatures from header"});if(!E.signatures.length)throw new $(F,x,{message:"No signatures found with expected scheme"});return{decodedPayload:x,decodedHeader:F,details:E,suspectPayloadType:n}}function f(d,i,_,n,O,x,F,E){const o=!!_.signatures.filter(t.secureCompare.bind(t,n)).length,G="\nLearn more about webhook signing and explore webhook integration examples for various frameworks at https://github.com/stripe/stripe-node#webhook-signing",L=F?"\n\nNote: The provided signing secret contains whitespace. This often indicates an extra newline or space is in the value":"";if(!o){if(x)throw new $(i,d,{message:"Webhook payload must be provided as a string or a Buffer (https://nodejs.org/api/buffer.html) instance representing the _raw_ request body.Payload was provided as a parsed JavaScript object instead. \nSignature verification is impossible without access to the original signed material. \n"+G+"\n"+L});throw new $(i,d,{message:"No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe? \n If a webhook request is being forwarded by a third-party tool, ensure that the exact request body, including JSON formatting and new line style, is preserved.\n"+G+"\n"+L})}const R=Math.floor((typeof E==="number"?E:Date.now())/1000)-_.timestamp;if(O>0&&R>O)throw new $(i,d,{message:"Timestamp outside the tolerance zone"});return!0}function T(d,i){if(typeof d!=="string")return null;return d.split(",").reduce((_,n)=>{const O=n.split("=");if(O[0]==="t")_.timestamp=parseInt(O[1],10);if(O[0]===i)_.signatures.push(O[1]);return _},{timestamp:-1,signatures:[]})}let v=null;function e(){if(!v)v=t.createDefaultCryptoProvider();return v}function c(d){if(!d)throw new U({message:"Options are required"});const i=Math.floor(d.timestamp)||Math.floor(Date.now()/1000),_=d.scheme||l.EXPECTED_SCHEME,n=d.cryptoProvider||e(),O=`${i}.${d.payload}`,x=(F)=>{return`t=${i},${_}=${F}`};return Object.assign(Object.assign({},d),{timestamp:i,scheme:_,cryptoProvider:n,payloadString:O,generateHeaderString:x})}return h.signature=l,h}var ou="2024-09-30.acacia";var Kh={};Gl(Kh,{WebhookEndpoints:()=>c1,V2:()=>_1,Treasury:()=>Ze,Transfers:()=>m1,Topups:()=>l1,Tokens:()=>t1,TestHelpers:()=>Le,Terminal:()=>ze,TaxRates:()=>aT,TaxIds:()=>jT,TaxCodes:()=>bT,Tax:()=>Me,Subscriptions:()=>sT,SubscriptionSchedules:()=>pT,SubscriptionItems:()=>yT,Sources:()=>gT,Sigma:()=>oe,ShippingRates:()=>kT,SetupIntents:()=>wT,SetupAttempts:()=>$T,Reviews:()=>qT,Reporting:()=>Se,Refunds:()=>HT,Radar:()=>Ee,Quotes:()=>CT,PromotionCodes:()=>DT,Products:()=>NT,Prices:()=>KT,Plans:()=>IT,Payouts:()=>RT,PaymentMethods:()=>WT,PaymentMethodDomains:()=>VT,PaymentMethodConfigurations:()=>AT,PaymentLinks:()=>UT,PaymentIntents:()=>BT,OAuth:()=>YT,Mandates:()=>XT,Issuing:()=>Fe,Invoices:()=>QT,InvoiceRenderingTemplates:()=>ZT,InvoiceItems:()=>LT,Identity:()=>xe,Forwarding:()=>ne,FinancialConnections:()=>Ge,Files:()=>zT,FileLinks:()=>oT,ExchangeRates:()=>ST,Events:()=>FT,EphemeralKeys:()=>nT,Entitlements:()=>Oe,Disputes:()=>OT,Customers:()=>iT,CustomerSessions:()=>cT,CreditNotes:()=>_T,Coupons:()=>eT,CountrySpecs:()=>vT,ConfirmationTokens:()=>TT,Climate:()=>ie,Checkout:()=>ce,Charges:()=>fT,BillingPortal:()=>_e,Billing:()=>ee,BalanceTransactions:()=>uT,Balance:()=>mT,Apps:()=>ve,ApplicationFees:()=>lT,ApplePayDomains:()=>tT,Accounts:()=>Om,AccountSessions:()=>hT,AccountLinks:()=>af,Account:()=>Om});function Dv(t,h){for(let l in h){if(!Object.prototype.hasOwnProperty.call(h,l))continue;const P=l[0].toLowerCase()+l.substring(1),u=new h[l](t);this[P]=u}}function J(t,h){return function(l){return new Dv(l,h)}}var vh=m.method,Mu=m.extend({retrieve:vh({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}"}),list:vh({method:"GET",fullPath:"/v1/financial_connections/accounts",methodType:"list"}),disconnect:vh({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/disconnect"}),listOwners:vh({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}/owners",methodType:"list"}),refresh:vh({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/refresh"}),subscribe:vh({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/subscribe"}),unsubscribe:vh({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/unsubscribe"})});var zu=m.method,Lu=m.extend({retrieve:zu({method:"GET",fullPath:"/v1/entitlements/active_entitlements/{id}"}),list:zu({method:"GET",fullPath:"/v1/entitlements/active_entitlements",methodType:"list"})});var Qh=m.method,Zu=m.extend({create:Qh({method:"POST",fullPath:"/v1/billing/alerts"}),retrieve:Qh({method:"GET",fullPath:"/v1/billing/alerts/{id}"}),list:Qh({method:"GET",fullPath:"/v1/billing/alerts",methodType:"list"}),activate:Qh({method:"POST",fullPath:"/v1/billing/alerts/{id}/activate"}),archive:Qh({method:"POST",fullPath:"/v1/billing/alerts/{id}/archive"}),deactivate:Qh({method:"POST",fullPath:"/v1/billing/alerts/{id}/deactivate"})});var Xh=m.method,Qu=m.extend({create:Xh({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations"}),capture:Xh({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/capture"}),expire:Xh({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/expire"}),finalizeAmount:Xh({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount"}),increment:Xh({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/increment"}),reverse:Xh({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/reverse"})});var ht=m.method,Xu=m.extend({retrieve:ht({method:"GET",fullPath:"/v1/issuing/authorizations/{authorization}"}),update:ht({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}"}),list:ht({method:"GET",fullPath:"/v1/issuing/authorizations",methodType:"list"}),approve:ht({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/approve"}),decline:ht({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/decline"})});var Pm=m.method,Ju=m.extend({create:Pm({method:"POST",fullPath:"/v1/tax/calculations"}),retrieve:Pm({method:"GET",fullPath:"/v1/tax/calculations/{calculation}"}),listLineItems:Pm({method:"GET",fullPath:"/v1/tax/calculations/{calculation}/line_items",methodType:"list"})});var qt=m.method,Yu=m.extend({create:qt({method:"POST",fullPath:"/v1/issuing/cardholders"}),retrieve:qt({method:"GET",fullPath:"/v1/issuing/cardholders/{cardholder}"}),update:qt({method:"POST",fullPath:"/v1/issuing/cardholders/{cardholder}"}),list:qt({method:"GET",fullPath:"/v1/issuing/cardholders",methodType:"list"})});var $t=m.method,Bu=m.extend({deliverCard:$t({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/deliver"}),failCard:$t({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/fail"}),returnCard:$t({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/return"}),shipCard:$t({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/ship"})});var wt=m.method,Uu=m.extend({create:wt({method:"POST",fullPath:"/v1/issuing/cards"}),retrieve:wt({method:"GET",fullPath:"/v1/issuing/cards/{card}"}),update:wt({method:"POST",fullPath:"/v1/issuing/cards/{card}"}),list:wt({method:"GET",fullPath:"/v1/issuing/cards",methodType:"list"})});var kt=m.method,Au=m.extend({create:kt({method:"POST",fullPath:"/v1/billing_portal/configurations"}),retrieve:kt({method:"GET",fullPath:"/v1/billing_portal/configurations/{configuration}"}),update:kt({method:"POST",fullPath:"/v1/billing_portal/configurations/{configuration}"}),list:kt({method:"GET",fullPath:"/v1/billing_portal/configurations",methodType:"list"})});var tt=m.method,Vu=m.extend({create:tt({method:"POST",fullPath:"/v1/terminal/configurations"}),retrieve:tt({method:"GET",fullPath:"/v1/terminal/configurations/{configuration}"}),update:tt({method:"POST",fullPath:"/v1/terminal/configurations/{configuration}"}),list:tt({method:"GET",fullPath:"/v1/terminal/configurations",methodType:"list"}),del:tt({method:"DELETE",fullPath:"/v1/terminal/configurations/{configuration}"})});var Cv=m.method,Wu=m.extend({create:Cv({method:"POST",fullPath:"/v1/test_helpers/confirmation_tokens"})});var Hv=m.method,Ru=m.extend({create:Hv({method:"POST",fullPath:"/v1/terminal/connection_tokens"})});var qv=m.method,Iu=m.extend({retrieve:qv({method:"GET",fullPath:"/v1/billing/credit_balance_summary"})});var Ku=m.method,Nu=m.extend({retrieve:Ku({method:"GET",fullPath:"/v1/billing/credit_balance_transactions/{id}"}),list:Ku({method:"GET",fullPath:"/v1/billing/credit_balance_transactions",methodType:"list"})});var Jh=m.method,Du=m.extend({create:Jh({method:"POST",fullPath:"/v1/billing/credit_grants"}),retrieve:Jh({method:"GET",fullPath:"/v1/billing/credit_grants/{id}"}),update:Jh({method:"POST",fullPath:"/v1/billing/credit_grants/{id}"}),list:Jh({method:"GET",fullPath:"/v1/billing/credit_grants",methodType:"list"}),expire:Jh({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/expire"}),voidGrant:Jh({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/void"})});var um=m.method,Cu=m.extend({create:um({method:"POST",fullPath:"/v1/treasury/credit_reversals"}),retrieve:um({method:"GET",fullPath:"/v1/treasury/credit_reversals/{credit_reversal}"}),list:um({method:"GET",fullPath:"/v1/treasury/credit_reversals",methodType:"list"})});var $v=m.method,Hu=m.extend({fundCashBalance:$v({method:"POST",fullPath:"/v1/test_helpers/customers/{customer}/fund_cash_balance"})});var fm=m.method,qu=m.extend({create:fm({method:"POST",fullPath:"/v1/treasury/debit_reversals"}),retrieve:fm({method:"GET",fullPath:"/v1/treasury/debit_reversals/{debit_reversal}"}),list:fm({method:"GET",fullPath:"/v1/treasury/debit_reversals",methodType:"list"})});var lt=m.method,$u=m.extend({create:lt({method:"POST",fullPath:"/v1/issuing/disputes"}),retrieve:lt({method:"GET",fullPath:"/v1/issuing/disputes/{dispute}"}),update:lt({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}"}),list:lt({method:"GET",fullPath:"/v1/issuing/disputes",methodType:"list"}),submit:lt({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}/submit"})});var wu=m.method,ku=m.extend({retrieve:wu({method:"GET",fullPath:"/v1/radar/early_fraud_warnings/{early_fraud_warning}"}),list:wu({method:"GET",fullPath:"/v1/radar/early_fraud_warnings",methodType:"list"})});var gt=m.method,gu=m.extend({create:gt({method:"POST",fullPath:"/v1/entitlements/features"}),retrieve:gt({method:"GET",fullPath:"/v1/entitlements/features/{id}"}),update:gt({method:"POST",fullPath:"/v1/entitlements/features/{id}"}),list:gt({method:"GET",fullPath:"/v1/entitlements/features",methodType:"list"})});var Yh=m.method,yu=m.extend({create:Yh({method:"POST",fullPath:"/v1/treasury/financial_accounts"}),retrieve:Yh({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),update:Yh({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),list:Yh({method:"GET",fullPath:"/v1/treasury/financial_accounts",methodType:"list"}),retrieveFeatures:Yh({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"}),updateFeatures:Yh({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"})});var Tm=m.method,pu=m.extend({fail:Tm({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/fail"}),returnInboundTransfer:Tm({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/return"}),succeed:Tm({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/succeed"})});var yt=m.method,su=m.extend({create:yt({method:"POST",fullPath:"/v1/treasury/inbound_transfers"}),retrieve:yt({method:"GET",fullPath:"/v1/treasury/inbound_transfers/{id}"}),list:yt({method:"GET",fullPath:"/v1/treasury/inbound_transfers",methodType:"list"}),cancel:yt({method:"POST",fullPath:"/v1/treasury/inbound_transfers/{inbound_transfer}/cancel"})});var mt=m.method,ru=m.extend({create:mt({method:"POST",fullPath:"/v1/terminal/locations"}),retrieve:mt({method:"GET",fullPath:"/v1/terminal/locations/{location}"}),update:mt({method:"POST",fullPath:"/v1/terminal/locations/{location}"}),list:mt({method:"GET",fullPath:"/v1/terminal/locations",methodType:"list"}),del:mt({method:"DELETE",fullPath:"/v1/terminal/locations/{location}"})});var wv=m.method,bu=m.extend({create:wv({method:"POST",fullPath:"/v1/billing/meter_event_adjustments"})});var kv=m.method,ju=m.extend({create:kv({method:"POST",fullPath:"/v1/billing/meter_events"})});var eh=m.method,au=m.extend({create:eh({method:"POST",fullPath:"/v1/billing/meters"}),retrieve:eh({method:"GET",fullPath:"/v1/billing/meters/{id}"}),update:eh({method:"POST",fullPath:"/v1/billing/meters/{id}"}),list:eh({method:"GET",fullPath:"/v1/billing/meters",methodType:"list"}),deactivate:eh({method:"POST",fullPath:"/v1/billing/meters/{id}/deactivate"}),listEventSummaries:eh({method:"GET",fullPath:"/v1/billing/meters/{id}/event_summaries",methodType:"list"}),reactivate:eh({method:"POST",fullPath:"/v1/billing/meters/{id}/reactivate"})});var Pt=m.method,hf=m.extend({create:Pt({method:"POST",fullPath:"/v1/climate/orders"}),retrieve:Pt({method:"GET",fullPath:"/v1/climate/orders/{order}"}),update:Pt({method:"POST",fullPath:"/v1/climate/orders/{order}"}),list:Pt({method:"GET",fullPath:"/v1/climate/orders",methodType:"list"}),cancel:Pt({method:"POST",fullPath:"/v1/climate/orders/{order}/cancel"})});var pt=m.method,tf=m.extend({update:pt({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}"}),fail:pt({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/fail"}),post:pt({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/post"}),returnOutboundPayment:pt({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/return"})});var st=m.method,lf=m.extend({create:st({method:"POST",fullPath:"/v1/treasury/outbound_payments"}),retrieve:st({method:"GET",fullPath:"/v1/treasury/outbound_payments/{id}"}),list:st({method:"GET",fullPath:"/v1/treasury/outbound_payments",methodType:"list"}),cancel:st({method:"POST",fullPath:"/v1/treasury/outbound_payments/{id}/cancel"})});var rt=m.method,mf=m.extend({update:rt({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}"}),fail:rt({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail"}),post:rt({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post"}),returnOutboundTransfer:rt({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return"})});var bt=m.method,Pf=m.extend({create:bt({method:"POST",fullPath:"/v1/treasury/outbound_transfers"}),retrieve:bt({method:"GET",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}"}),list:bt({method:"GET",fullPath:"/v1/treasury/outbound_transfers",methodType:"list"}),cancel:bt({method:"POST",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}/cancel"})});var dm=m.method,uf=m.extend({activate:dm({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate"}),deactivate:dm({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate"}),reject:dm({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject"})});var jt=m.method,ff=m.extend({create:jt({method:"POST",fullPath:"/v1/issuing/personalization_designs"}),retrieve:jt({method:"GET",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),update:jt({method:"POST",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),list:jt({method:"GET",fullPath:"/v1/issuing/personalization_designs",methodType:"list"})});var Tf=m.method,df=m.extend({retrieve:Tf({method:"GET",fullPath:"/v1/issuing/physical_bundles/{physical_bundle}"}),list:Tf({method:"GET",fullPath:"/v1/issuing/physical_bundles",methodType:"list"})});var vf=m.method,ef=m.extend({retrieve:vf({method:"GET",fullPath:"/v1/climate/products/{product}"}),list:vf({method:"GET",fullPath:"/v1/climate/products",methodType:"list"})});var gv=m.method,_f=m.extend({presentPaymentMethod:gv({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/present_payment_method"})});var y=m.method,cf=m.extend({create:y({method:"POST",fullPath:"/v1/terminal/readers"}),retrieve:y({method:"GET",fullPath:"/v1/terminal/readers/{reader}"}),update:y({method:"POST",fullPath:"/v1/terminal/readers/{reader}"}),list:y({method:"GET",fullPath:"/v1/terminal/readers",methodType:"list"}),del:y({method:"DELETE",fullPath:"/v1/terminal/readers/{reader}"}),cancelAction:y({method:"POST",fullPath:"/v1/terminal/readers/{reader}/cancel_action"}),processPaymentIntent:y({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_payment_intent"}),processSetupIntent:y({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_setup_intent"}),refundPayment:y({method:"POST",fullPath:"/v1/terminal/readers/{reader}/refund_payment"}),setReaderDisplay:y({method:"POST",fullPath:"/v1/terminal/readers/{reader}/set_reader_display"})});var yv=m.method,Of=m.extend({create:yv({method:"POST",fullPath:"/v1/test_helpers/treasury/received_credits"})});var Gf=m.method,nf=m.extend({retrieve:Gf({method:"GET",fullPath:"/v1/treasury/received_credits/{id}"}),list:Gf({method:"GET",fullPath:"/v1/treasury/received_credits",methodType:"list"})});var pv=m.method,xf=m.extend({create:pv({method:"POST",fullPath:"/v1/test_helpers/treasury/received_debits"})});var Ff=m.method,Ef=m.extend({retrieve:Ff({method:"GET",fullPath:"/v1/treasury/received_debits/{id}"}),list:Ff({method:"GET",fullPath:"/v1/treasury/received_debits",methodType:"list"})});var sv=m.method,Sf=m.extend({expire:sv({method:"POST",fullPath:"/v1/test_helpers/refunds/{refund}/expire"})});var at=m.method,of=m.extend({create:at({method:"POST",fullPath:"/v1/tax/registrations"}),retrieve:at({method:"GET",fullPath:"/v1/tax/registrations/{id}"}),update:at({method:"POST",fullPath:"/v1/tax/registrations/{id}"}),list:at({method:"GET",fullPath:"/v1/tax/registrations",methodType:"list"})});var vm=m.method,Mf=m.extend({create:vm({method:"POST",fullPath:"/v1/reporting/report_runs"}),retrieve:vm({method:"GET",fullPath:"/v1/reporting/report_runs/{report_run}"}),list:vm({method:"GET",fullPath:"/v1/reporting/report_runs",methodType:"list"})});var zf=m.method,Lf=m.extend({retrieve:zf({method:"GET",fullPath:"/v1/reporting/report_types/{report_type}"}),list:zf({method:"GET",fullPath:"/v1/reporting/report_types",methodType:"list"})});var em=m.method,Zf=m.extend({create:em({method:"POST",fullPath:"/v1/forwarding/requests"}),retrieve:em({method:"GET",fullPath:"/v1/forwarding/requests/{id}"}),list:em({method:"GET",fullPath:"/v1/forwarding/requests",methodType:"list"})});var Qf=m.method,Xf=m.extend({retrieve:Qf({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs/{scheduled_query_run}"}),list:Qf({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs",methodType:"list"})});var hl=m.method,Jf=m.extend({create:hl({method:"POST",fullPath:"/v1/apps/secrets"}),list:hl({method:"GET",fullPath:"/v1/apps/secrets",methodType:"list"}),deleteWhere:hl({method:"POST",fullPath:"/v1/apps/secrets/delete"}),find:hl({method:"GET",fullPath:"/v1/apps/secrets/find"})});var rv=m.method,Yf=m.extend({create:rv({method:"POST",fullPath:"/v1/billing_portal/sessions"})});var Bh=m.method,Bf=m.extend({create:Bh({method:"POST",fullPath:"/v1/checkout/sessions"}),retrieve:Bh({method:"GET",fullPath:"/v1/checkout/sessions/{session}"}),update:Bh({method:"POST",fullPath:"/v1/checkout/sessions/{session}"}),list:Bh({method:"GET",fullPath:"/v1/checkout/sessions",methodType:"list"}),expire:Bh({method:"POST",fullPath:"/v1/checkout/sessions/{session}/expire"}),listLineItems:Bh({method:"GET",fullPath:"/v1/checkout/sessions/{session}/line_items",methodType:"list"})});var Uf=m.method,Af=m.extend({create:Uf({method:"POST",fullPath:"/v1/financial_connections/sessions"}),retrieve:Uf({method:"GET",fullPath:"/v1/financial_connections/sessions/{session}"})});var Vf=m.method,Wf=m.extend({retrieve:Vf({method:"GET",fullPath:"/v1/tax/settings"}),update:Vf({method:"POST",fullPath:"/v1/tax/settings"})});var Rf=m.method,If=m.extend({retrieve:Rf({method:"GET",fullPath:"/v1/climate/suppliers/{supplier}"}),list:Rf({method:"GET",fullPath:"/v1/climate/suppliers",methodType:"list"})});var ut=m.method,Kf=m.extend({create:ut({method:"POST",fullPath:"/v1/test_helpers/test_clocks"}),retrieve:ut({method:"GET",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),list:ut({method:"GET",fullPath:"/v1/test_helpers/test_clocks",methodType:"list"}),del:ut({method:"DELETE",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),advance:ut({method:"POST",fullPath:"/v1/test_helpers/test_clocks/{test_clock}/advance"})});var _m=m.method,Nf=m.extend({retrieve:_m({method:"GET",fullPath:"/v1/issuing/tokens/{token}"}),update:_m({method:"POST",fullPath:"/v1/issuing/tokens/{token}"}),list:_m({method:"GET",fullPath:"/v1/issuing/tokens",methodType:"list"})});var Df=m.method,Cf=m.extend({retrieve:Df({method:"GET",fullPath:"/v1/treasury/transaction_entries/{id}"}),list:Df({method:"GET",fullPath:"/v1/treasury/transaction_entries",methodType:"list"})});var cm=m.method,Hf=m.extend({createForceCapture:cm({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_force_capture"}),createUnlinkedRefund:cm({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_unlinked_refund"}),refund:cm({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/{transaction}/refund"})});var qf=m.method,$f=m.extend({retrieve:qf({method:"GET",fullPath:"/v1/financial_connections/transactions/{transaction}"}),list:qf({method:"GET",fullPath:"/v1/financial_connections/transactions",methodType:"list"})});var im=m.method,wf=m.extend({retrieve:im({method:"GET",fullPath:"/v1/issuing/transactions/{transaction}"}),update:im({method:"POST",fullPath:"/v1/issuing/transactions/{transaction}"}),list:im({method:"GET",fullPath:"/v1/issuing/transactions",methodType:"list"})});var tl=m.method,kf=m.extend({retrieve:tl({method:"GET",fullPath:"/v1/tax/transactions/{transaction}"}),createFromCalculation:tl({method:"POST",fullPath:"/v1/tax/transactions/create_from_calculation"}),createReversal:tl({method:"POST",fullPath:"/v1/tax/transactions/create_reversal"}),listLineItems:tl({method:"GET",fullPath:"/v1/tax/transactions/{transaction}/line_items",methodType:"list"})});var gf=m.method,yf=m.extend({retrieve:gf({method:"GET",fullPath:"/v1/treasury/transactions/{id}"}),list:gf({method:"GET",fullPath:"/v1/treasury/transactions",methodType:"list"})});var ll=m.method,pf=m.extend({create:ll({method:"POST",fullPath:"/v1/radar/value_list_items"}),retrieve:ll({method:"GET",fullPath:"/v1/radar/value_list_items/{item}"}),list:ll({method:"GET",fullPath:"/v1/radar/value_list_items",methodType:"list"}),del:ll({method:"DELETE",fullPath:"/v1/radar/value_list_items/{item}"})});var ft=m.method,sf=m.extend({create:ft({method:"POST",fullPath:"/v1/radar/value_lists"}),retrieve:ft({method:"GET",fullPath:"/v1/radar/value_lists/{value_list}"}),update:ft({method:"POST",fullPath:"/v1/radar/value_lists/{value_list}"}),list:ft({method:"GET",fullPath:"/v1/radar/value_lists",methodType:"list"}),del:ft({method:"DELETE",fullPath:"/v1/radar/value_lists/{value_list}"})});var rf=m.method,bf=m.extend({retrieve:rf({method:"GET",fullPath:"/v1/identity/verification_reports/{report}"}),list:rf({method:"GET",fullPath:"/v1/identity/verification_reports",methodType:"list"})});var Uh=m.method,jf=m.extend({create:Uh({method:"POST",fullPath:"/v1/identity/verification_sessions"}),retrieve:Uh({method:"GET",fullPath:"/v1/identity/verification_sessions/{session}"}),update:Uh({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}"}),list:Uh({method:"GET",fullPath:"/v1/identity/verification_sessions",methodType:"list"}),cancel:Uh({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/cancel"}),redact:Uh({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/redact"})});var X=m.method,Om=m.extend({create:X({method:"POST",fullPath:"/v1/accounts"}),retrieve(t,...h){if(typeof t==="string")return X({method:"GET",fullPath:"/v1/accounts/{id}"}).apply(this,[t,...h]);else{if(t===null||t===void 0)[].shift.apply([t,...h]);return X({method:"GET",fullPath:"/v1/account"}).apply(this,[t,...h])}},update:X({method:"POST",fullPath:"/v1/accounts/{account}"}),list:X({method:"GET",fullPath:"/v1/accounts",methodType:"list"}),del:X({method:"DELETE",fullPath:"/v1/accounts/{account}"}),createExternalAccount:X({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts"}),createLoginLink:X({method:"POST",fullPath:"/v1/accounts/{account}/login_links"}),createPerson:X({method:"POST",fullPath:"/v1/accounts/{account}/persons"}),deleteExternalAccount:X({method:"DELETE",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),deletePerson:X({method:"DELETE",fullPath:"/v1/accounts/{account}/persons/{person}"}),listCapabilities:X({method:"GET",fullPath:"/v1/accounts/{account}/capabilities",methodType:"list"}),listExternalAccounts:X({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts",methodType:"list"}),listPersons:X({method:"GET",fullPath:"/v1/accounts/{account}/persons",methodType:"list"}),reject:X({method:"POST",fullPath:"/v1/accounts/{account}/reject"}),retrieveCurrent:X({method:"GET",fullPath:"/v1/account"}),retrieveCapability:X({method:"GET",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),retrieveExternalAccount:X({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),retrievePerson:X({method:"GET",fullPath:"/v1/accounts/{account}/persons/{person}"}),updateCapability:X({method:"POST",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),updateExternalAccount:X({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),updatePerson:X({method:"POST",fullPath:"/v1/accounts/{account}/persons/{person}"})});var bv=m.method,af=m.extend({create:bv({method:"POST",fullPath:"/v1/account_links"})});var jv=m.method,hT=m.extend({create:jv({method:"POST",fullPath:"/v1/account_sessions"})});var ml=m.method,tT=m.extend({create:ml({method:"POST",fullPath:"/v1/apple_pay/domains"}),retrieve:ml({method:"GET",fullPath:"/v1/apple_pay/domains/{domain}"}),list:ml({method:"GET",fullPath:"/v1/apple_pay/domains",methodType:"list"}),del:ml({method:"DELETE",fullPath:"/v1/apple_pay/domains/{domain}"})});var Ah=m.method,lT=m.extend({retrieve:Ah({method:"GET",fullPath:"/v1/application_fees/{id}"}),list:Ah({method:"GET",fullPath:"/v1/application_fees",methodType:"list"}),createRefund:Ah({method:"POST",fullPath:"/v1/application_fees/{id}/refunds"}),listRefunds:Ah({method:"GET",fullPath:"/v1/application_fees/{id}/refunds",methodType:"list"}),retrieveRefund:Ah({method:"GET",fullPath:"/v1/application_fees/{fee}/refunds/{id}"}),updateRefund:Ah({method:"POST",fullPath:"/v1/application_fees/{fee}/refunds/{id}"})});var av=m.method,mT=m.extend({retrieve:av({method:"GET",fullPath:"/v1/balance"})});var PT=m.method,uT=m.extend({retrieve:PT({method:"GET",fullPath:"/v1/balance_transactions/{id}"}),list:PT({method:"GET",fullPath:"/v1/balance_transactions",methodType:"list"})});var Vh=m.method,fT=m.extend({create:Vh({method:"POST",fullPath:"/v1/charges"}),retrieve:Vh({method:"GET",fullPath:"/v1/charges/{charge}"}),update:Vh({method:"POST",fullPath:"/v1/charges/{charge}"}),list:Vh({method:"GET",fullPath:"/v1/charges",methodType:"list"}),capture:Vh({method:"POST",fullPath:"/v1/charges/{charge}/capture"}),search:Vh({method:"GET",fullPath:"/v1/charges/search",methodType:"search"})});var he=m.method,TT=m.extend({retrieve:he({method:"GET",fullPath:"/v1/confirmation_tokens/{confirmation_token}"})});var dT=m.method,vT=m.extend({retrieve:dT({method:"GET",fullPath:"/v1/country_specs/{country}"}),list:dT({method:"GET",fullPath:"/v1/country_specs",methodType:"list"})});var Tt=m.method,eT=m.extend({create:Tt({method:"POST",fullPath:"/v1/coupons"}),retrieve:Tt({method:"GET",fullPath:"/v1/coupons/{coupon}"}),update:Tt({method:"POST",fullPath:"/v1/coupons/{coupon}"}),list:Tt({method:"GET",fullPath:"/v1/coupons",methodType:"list"}),del:Tt({method:"DELETE",fullPath:"/v1/coupons/{coupon}"})});var lh=m.method,_T=m.extend({create:lh({method:"POST",fullPath:"/v1/credit_notes"}),retrieve:lh({method:"GET",fullPath:"/v1/credit_notes/{id}"}),update:lh({method:"POST",fullPath:"/v1/credit_notes/{id}"}),list:lh({method:"GET",fullPath:"/v1/credit_notes",methodType:"list"}),listLineItems:lh({method:"GET",fullPath:"/v1/credit_notes/{credit_note}/lines",methodType:"list"}),listPreviewLineItems:lh({method:"GET",fullPath:"/v1/credit_notes/preview/lines",methodType:"list"}),preview:lh({method:"GET",fullPath:"/v1/credit_notes/preview"}),voidCreditNote:lh({method:"POST",fullPath:"/v1/credit_notes/{id}/void"})});var te=m.method,cT=m.extend({create:te({method:"POST",fullPath:"/v1/customer_sessions"})});var z=m.method,iT=m.extend({create:z({method:"POST",fullPath:"/v1/customers"}),retrieve:z({method:"GET",fullPath:"/v1/customers/{customer}"}),update:z({method:"POST",fullPath:"/v1/customers/{customer}"}),list:z({method:"GET",fullPath:"/v1/customers",methodType:"list"}),del:z({method:"DELETE",fullPath:"/v1/customers/{customer}"}),createBalanceTransaction:z({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions"}),createFundingInstructions:z({method:"POST",fullPath:"/v1/customers/{customer}/funding_instructions"}),createSource:z({method:"POST",fullPath:"/v1/customers/{customer}/sources"}),createTaxId:z({method:"POST",fullPath:"/v1/customers/{customer}/tax_ids"}),deleteDiscount:z({method:"DELETE",fullPath:"/v1/customers/{customer}/discount"}),deleteSource:z({method:"DELETE",fullPath:"/v1/customers/{customer}/sources/{id}"}),deleteTaxId:z({method:"DELETE",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),listBalanceTransactions:z({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions",methodType:"list"}),listCashBalanceTransactions:z({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions",methodType:"list"}),listPaymentMethods:z({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods",methodType:"list"}),listSources:z({method:"GET",fullPath:"/v1/customers/{customer}/sources",methodType:"list"}),listTaxIds:z({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids",methodType:"list"}),retrieveBalanceTransaction:z({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),retrieveCashBalance:z({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance"}),retrieveCashBalanceTransaction:z({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions/{transaction}"}),retrievePaymentMethod:z({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods/{payment_method}"}),retrieveSource:z({method:"GET",fullPath:"/v1/customers/{customer}/sources/{id}"}),retrieveTaxId:z({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),search:z({method:"GET",fullPath:"/v1/customers/search",methodType:"search"}),updateBalanceTransaction:z({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),updateCashBalance:z({method:"POST",fullPath:"/v1/customers/{customer}/cash_balance"}),updateSource:z({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}"}),verifySource:z({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}/verify"})});var Pl=m.method,OT=m.extend({retrieve:Pl({method:"GET",fullPath:"/v1/disputes/{dispute}"}),update:Pl({method:"POST",fullPath:"/v1/disputes/{dispute}"}),list:Pl({method:"GET",fullPath:"/v1/disputes",methodType:"list"}),close:Pl({method:"POST",fullPath:"/v1/disputes/{dispute}/close"})});var GT=m.method,nT=m.extend({create:GT({method:"POST",fullPath:"/v1/ephemeral_keys",validator:(t,h)=>{if(!h.headers||!h.headers["Stripe-Version"])throw new Error("Passing apiVersion in a separate options hash is required to create an ephemeral key. See https://stripe.com/docs/api/versioning?lang=node")}}),del:GT({method:"DELETE",fullPath:"/v1/ephemeral_keys/{key}"})});var xT=m.method,FT=m.extend({retrieve:xT({method:"GET",fullPath:"/v1/events/{id}"}),list:xT({method:"GET",fullPath:"/v1/events",methodType:"list"})});var ET=m.method,ST=m.extend({retrieve:ET({method:"GET",fullPath:"/v1/exchange_rates/{rate_id}"}),list:ET({method:"GET",fullPath:"/v1/exchange_rates",methodType:"list"})});var ul=m.method,oT=m.extend({create:ul({method:"POST",fullPath:"/v1/file_links"}),retrieve:ul({method:"GET",fullPath:"/v1/file_links/{link}"}),update:ul({method:"POST",fullPath:"/v1/file_links/{link}"}),list:ul({method:"GET",fullPath:"/v1/file_links",methodType:"list"})});function MT(t,h,l,P){if(h=h||{},t!=="POST")return P(null,th(h));this._stripe._platformFunctions.tryBufferData(h).then((u)=>{const f=le(t,u,l);return P(null,f)}).catch((u)=>P(u,null))}var le=(t,h,l)=>{const P=(Math.round(Math.random()*10000000000000000)+Math.round(Math.random()*10000000000000000)).toString();l["Content-Type"]=`multipart/form-data; boundary=${P}`;const u=new TextEncoder;let f=new Uint8Array(0);const T=u.encode("\r\n");function v(d){const i=f,_=d instanceof Uint8Array?d:new Uint8Array(u.encode(d));f=new Uint8Array(i.length+_.length+2),f.set(i),f.set(_,i.length),f.set(T,f.length-2)}function e(d){return`"${d.replace(/"|"/g,"%22").replace(/\r\n|\r|\n/g," ")}"`}const c=cu(h);for(let d in c){if(!Object.prototype.hasOwnProperty.call(c,d))continue;const i=c[d];if(v(`--${P}`),Object.prototype.hasOwnProperty.call(i,"data")){const _=i;v(`Content-Disposition: form-data; name=${e(d)}; filename=${e(_.name||"blob")}`),v(`Content-Type: ${_.type||"application/octet-stream"}`),v(""),v(_.data)}else v(`Content-Disposition: form-data; name=${e(d)}`),v(""),v(i)}return v(`--${P}--`),f};var Gm=m.method,zT=m.extend({create:Gm({method:"POST",fullPath:"/v1/files",headers:{"Content-Type":"multipart/form-data"},host:"files.stripe.com"}),retrieve:Gm({method:"GET",fullPath:"/v1/files/{file}"}),list:Gm({method:"GET",fullPath:"/v1/files",methodType:"list"}),requestDataProcessor:MT});var dt=m.method,LT=m.extend({create:dt({method:"POST",fullPath:"/v1/invoiceitems"}),retrieve:dt({method:"GET",fullPath:"/v1/invoiceitems/{invoiceitem}"}),update:dt({method:"POST",fullPath:"/v1/invoiceitems/{invoiceitem}"}),list:dt({method:"GET",fullPath:"/v1/invoiceitems",methodType:"list"}),del:dt({method:"DELETE",fullPath:"/v1/invoiceitems/{invoiceitem}"})});var fl=m.method,ZT=m.extend({retrieve:fl({method:"GET",fullPath:"/v1/invoice_rendering_templates/{template}"}),list:fl({method:"GET",fullPath:"/v1/invoice_rendering_templates",methodType:"list"}),archive:fl({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/archive"}),unarchive:fl({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/unarchive"})});var V=m.method,QT=m.extend({create:V({method:"POST",fullPath:"/v1/invoices"}),retrieve:V({method:"GET",fullPath:"/v1/invoices/{invoice}"}),update:V({method:"POST",fullPath:"/v1/invoices/{invoice}"}),list:V({method:"GET",fullPath:"/v1/invoices",methodType:"list"}),del:V({method:"DELETE",fullPath:"/v1/invoices/{invoice}"}),addLines:V({method:"POST",fullPath:"/v1/invoices/{invoice}/add_lines"}),createPreview:V({method:"POST",fullPath:"/v1/invoices/create_preview"}),finalizeInvoice:V({method:"POST",fullPath:"/v1/invoices/{invoice}/finalize"}),listLineItems:V({method:"GET",fullPath:"/v1/invoices/{invoice}/lines",methodType:"list"}),listUpcomingLines:V({method:"GET",fullPath:"/v1/invoices/upcoming/lines",methodType:"list"}),markUncollectible:V({method:"POST",fullPath:"/v1/invoices/{invoice}/mark_uncollectible"}),pay:V({method:"POST",fullPath:"/v1/invoices/{invoice}/pay"}),removeLines:V({method:"POST",fullPath:"/v1/invoices/{invoice}/remove_lines"}),retrieveUpcoming:V({method:"GET",fullPath:"/v1/invoices/upcoming"}),search:V({method:"GET",fullPath:"/v1/invoices/search",methodType:"search"}),sendInvoice:V({method:"POST",fullPath:"/v1/invoices/{invoice}/send"}),updateLines:V({method:"POST",fullPath:"/v1/invoices/{invoice}/update_lines"}),updateLineItem:V({method:"POST",fullPath:"/v1/invoices/{invoice}/lines/{line_item_id}"}),voidInvoice:V({method:"POST",fullPath:"/v1/invoices/{invoice}/void"})});var me=m.method,XT=m.extend({retrieve:me({method:"GET",fullPath:"/v1/mandates/{mandate}"})});var JT=m.method,nm="connect.stripe.com",YT=m.extend({basePath:"/",authorizeUrl(t,h){t=t||{},h=h||{};let l="oauth/authorize";if(h.express)l=`express/${l}`;if(!t.response_type)t.response_type="code";if(!t.client_id)t.client_id=this._stripe.getClientId();if(!t.scope)t.scope="read_write";return`https://${nm}/${l}?${th(t)}`},token:JT({method:"POST",path:"oauth/token",host:nm}),deauthorize(t,...h){if(!t.client_id)t.client_id=this._stripe.getClientId();return JT({method:"POST",path:"oauth/deauthorize",host:nm}).apply(this,[t,...h])}});var D=m.method,BT=m.extend({create:D({method:"POST",fullPath:"/v1/payment_intents"}),retrieve:D({method:"GET",fullPath:"/v1/payment_intents/{intent}"}),update:D({method:"POST",fullPath:"/v1/payment_intents/{intent}"}),list:D({method:"GET",fullPath:"/v1/payment_intents",methodType:"list"}),applyCustomerBalance:D({method:"POST",fullPath:"/v1/payment_intents/{intent}/apply_customer_balance"}),cancel:D({method:"POST",fullPath:"/v1/payment_intents/{intent}/cancel"}),capture:D({method:"POST",fullPath:"/v1/payment_intents/{intent}/capture"}),confirm:D({method:"POST",fullPath:"/v1/payment_intents/{intent}/confirm"}),incrementAuthorization:D({method:"POST",fullPath:"/v1/payment_intents/{intent}/increment_authorization"}),search:D({method:"GET",fullPath:"/v1/payment_intents/search",methodType:"search"}),verifyMicrodeposits:D({method:"POST",fullPath:"/v1/payment_intents/{intent}/verify_microdeposits"})});var vt=m.method,UT=m.extend({create:vt({method:"POST",fullPath:"/v1/payment_links"}),retrieve:vt({method:"GET",fullPath:"/v1/payment_links/{payment_link}"}),update:vt({method:"POST",fullPath:"/v1/payment_links/{payment_link}"}),list:vt({method:"GET",fullPath:"/v1/payment_links",methodType:"list"}),listLineItems:vt({method:"GET",fullPath:"/v1/payment_links/{payment_link}/line_items",methodType:"list"})});var Tl=m.method,AT=m.extend({create:Tl({method:"POST",fullPath:"/v1/payment_method_configurations"}),retrieve:Tl({method:"GET",fullPath:"/v1/payment_method_configurations/{configuration}"}),update:Tl({method:"POST",fullPath:"/v1/payment_method_configurations/{configuration}"}),list:Tl({method:"GET",fullPath:"/v1/payment_method_configurations",methodType:"list"})});var et=m.method,VT=m.extend({create:et({method:"POST",fullPath:"/v1/payment_method_domains"}),retrieve:et({method:"GET",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),update:et({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),list:et({method:"GET",fullPath:"/v1/payment_method_domains",methodType:"list"}),validate:et({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}/validate"})});var Wh=m.method,WT=m.extend({create:Wh({method:"POST",fullPath:"/v1/payment_methods"}),retrieve:Wh({method:"GET",fullPath:"/v1/payment_methods/{payment_method}"}),update:Wh({method:"POST",fullPath:"/v1/payment_methods/{payment_method}"}),list:Wh({method:"GET",fullPath:"/v1/payment_methods",methodType:"list"}),attach:Wh({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/attach"}),detach:Wh({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/detach"})});var Rh=m.method,RT=m.extend({create:Rh({method:"POST",fullPath:"/v1/payouts"}),retrieve:Rh({method:"GET",fullPath:"/v1/payouts/{payout}"}),update:Rh({method:"POST",fullPath:"/v1/payouts/{payout}"}),list:Rh({method:"GET",fullPath:"/v1/payouts",methodType:"list"}),cancel:Rh({method:"POST",fullPath:"/v1/payouts/{payout}/cancel"}),reverse:Rh({method:"POST",fullPath:"/v1/payouts/{payout}/reverse"})});var _t=m.method,IT=m.extend({create:_t({method:"POST",fullPath:"/v1/plans"}),retrieve:_t({method:"GET",fullPath:"/v1/plans/{plan}"}),update:_t({method:"POST",fullPath:"/v1/plans/{plan}"}),list:_t({method:"GET",fullPath:"/v1/plans",methodType:"list"}),del:_t({method:"DELETE",fullPath:"/v1/plans/{plan}"})});var ct=m.method,KT=m.extend({create:ct({method:"POST",fullPath:"/v1/prices"}),retrieve:ct({method:"GET",fullPath:"/v1/prices/{price}"}),update:ct({method:"POST",fullPath:"/v1/prices/{price}"}),list:ct({method:"GET",fullPath:"/v1/prices",methodType:"list"}),search:ct({method:"GET",fullPath:"/v1/prices/search",methodType:"search"})});var p=m.method,NT=m.extend({create:p({method:"POST",fullPath:"/v1/products"}),retrieve:p({method:"GET",fullPath:"/v1/products/{id}"}),update:p({method:"POST",fullPath:"/v1/products/{id}"}),list:p({method:"GET",fullPath:"/v1/products",methodType:"list"}),del:p({method:"DELETE",fullPath:"/v1/products/{id}"}),createFeature:p({method:"POST",fullPath:"/v1/products/{product}/features"}),deleteFeature:p({method:"DELETE",fullPath:"/v1/products/{product}/features/{id}"}),listFeatures:p({method:"GET",fullPath:"/v1/products/{product}/features",methodType:"list"}),retrieveFeature:p({method:"GET",fullPath:"/v1/products/{product}/features/{id}"}),search:p({method:"GET",fullPath:"/v1/products/search",methodType:"search"})});var dl=m.method,DT=m.extend({create:dl({method:"POST",fullPath:"/v1/promotion_codes"}),retrieve:dl({method:"GET",fullPath:"/v1/promotion_codes/{promotion_code}"}),update:dl({method:"POST",fullPath:"/v1/promotion_codes/{promotion_code}"}),list:dl({method:"GET",fullPath:"/v1/promotion_codes",methodType:"list"})});var s=m.method,CT=m.extend({create:s({method:"POST",fullPath:"/v1/quotes"}),retrieve:s({method:"GET",fullPath:"/v1/quotes/{quote}"}),update:s({method:"POST",fullPath:"/v1/quotes/{quote}"}),list:s({method:"GET",fullPath:"/v1/quotes",methodType:"list"}),accept:s({method:"POST",fullPath:"/v1/quotes/{quote}/accept"}),cancel:s({method:"POST",fullPath:"/v1/quotes/{quote}/cancel"}),finalizeQuote:s({method:"POST",fullPath:"/v1/quotes/{quote}/finalize"}),listComputedUpfrontLineItems:s({method:"GET",fullPath:"/v1/quotes/{quote}/computed_upfront_line_items",methodType:"list"}),listLineItems:s({method:"GET",fullPath:"/v1/quotes/{quote}/line_items",methodType:"list"}),pdf:s({method:"GET",fullPath:"/v1/quotes/{quote}/pdf",host:"files.stripe.com",streaming:!0})});var it=m.method,HT=m.extend({create:it({method:"POST",fullPath:"/v1/refunds"}),retrieve:it({method:"GET",fullPath:"/v1/refunds/{refund}"}),update:it({method:"POST",fullPath:"/v1/refunds/{refund}"}),list:it({method:"GET",fullPath:"/v1/refunds",methodType:"list"}),cancel:it({method:"POST",fullPath:"/v1/refunds/{refund}/cancel"})});var xm=m.method,qT=m.extend({retrieve:xm({method:"GET",fullPath:"/v1/reviews/{review}"}),list:xm({method:"GET",fullPath:"/v1/reviews",methodType:"list"}),approve:xm({method:"POST",fullPath:"/v1/reviews/{review}/approve"})});var Pe=m.method,$T=m.extend({list:Pe({method:"GET",fullPath:"/v1/setup_attempts",methodType:"list"})});var _h=m.method,wT=m.extend({create:_h({method:"POST",fullPath:"/v1/setup_intents"}),retrieve:_h({method:"GET",fullPath:"/v1/setup_intents/{intent}"}),update:_h({method:"POST",fullPath:"/v1/setup_intents/{intent}"}),list:_h({method:"GET",fullPath:"/v1/setup_intents",methodType:"list"}),cancel:_h({method:"POST",fullPath:"/v1/setup_intents/{intent}/cancel"}),confirm:_h({method:"POST",fullPath:"/v1/setup_intents/{intent}/confirm"}),verifyMicrodeposits:_h({method:"POST",fullPath:"/v1/setup_intents/{intent}/verify_microdeposits"})});var vl=m.method,kT=m.extend({create:vl({method:"POST",fullPath:"/v1/shipping_rates"}),retrieve:vl({method:"GET",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),update:vl({method:"POST",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),list:vl({method:"GET",fullPath:"/v1/shipping_rates",methodType:"list"})});var Ot=m.method,gT=m.extend({create:Ot({method:"POST",fullPath:"/v1/sources"}),retrieve:Ot({method:"GET",fullPath:"/v1/sources/{source}"}),update:Ot({method:"POST",fullPath:"/v1/sources/{source}"}),listSourceTransactions:Ot({method:"GET",fullPath:"/v1/sources/{source}/source_transactions",methodType:"list"}),verify:Ot({method:"POST",fullPath:"/v1/sources/{source}/verify"})});var ch=m.method,yT=m.extend({create:ch({method:"POST",fullPath:"/v1/subscription_items"}),retrieve:ch({method:"GET",fullPath:"/v1/subscription_items/{item}"}),update:ch({method:"POST",fullPath:"/v1/subscription_items/{item}"}),list:ch({method:"GET",fullPath:"/v1/subscription_items",methodType:"list"}),del:ch({method:"DELETE",fullPath:"/v1/subscription_items/{item}"}),createUsageRecord:ch({method:"POST",fullPath:"/v1/subscription_items/{subscription_item}/usage_records"}),listUsageRecordSummaries:ch({method:"GET",fullPath:"/v1/subscription_items/{subscription_item}/usage_record_summaries",methodType:"list"})});var Ih=m.method,pT=m.extend({create:Ih({method:"POST",fullPath:"/v1/subscription_schedules"}),retrieve:Ih({method:"GET",fullPath:"/v1/subscription_schedules/{schedule}"}),update:Ih({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}"}),list:Ih({method:"GET",fullPath:"/v1/subscription_schedules",methodType:"list"}),cancel:Ih({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/cancel"}),release:Ih({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/release"})});var mh=m.method,sT=m.extend({create:mh({method:"POST",fullPath:"/v1/subscriptions"}),retrieve:mh({method:"GET",fullPath:"/v1/subscriptions/{subscription_exposed_id}"}),update:mh({method:"POST",fullPath:"/v1/subscriptions/{subscription_exposed_id}"}),list:mh({method:"GET",fullPath:"/v1/subscriptions",methodType:"list"}),cancel:mh({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}"}),deleteDiscount:mh({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}/discount"}),resume:mh({method:"POST",fullPath:"/v1/subscriptions/{subscription}/resume"}),search:mh({method:"GET",fullPath:"/v1/subscriptions/search",methodType:"search"})});var rT=m.method,bT=m.extend({retrieve:rT({method:"GET",fullPath:"/v1/tax_codes/{id}"}),list:rT({method:"GET",fullPath:"/v1/tax_codes",methodType:"list"})});var el=m.method,jT=m.extend({create:el({method:"POST",fullPath:"/v1/tax_ids"}),retrieve:el({method:"GET",fullPath:"/v1/tax_ids/{id}"}),list:el({method:"GET",fullPath:"/v1/tax_ids",methodType:"list"}),del:el({method:"DELETE",fullPath:"/v1/tax_ids/{id}"})});var _l=m.method,aT=m.extend({create:_l({method:"POST",fullPath:"/v1/tax_rates"}),retrieve:_l({method:"GET",fullPath:"/v1/tax_rates/{tax_rate}"}),update:_l({method:"POST",fullPath:"/v1/tax_rates/{tax_rate}"}),list:_l({method:"GET",fullPath:"/v1/tax_rates",methodType:"list"})});var h1=m.method,t1=m.extend({create:h1({method:"POST",fullPath:"/v1/tokens"}),retrieve:h1({method:"GET",fullPath:"/v1/tokens/{token}"})});var Gt=m.method,l1=m.extend({create:Gt({method:"POST",fullPath:"/v1/topups"}),retrieve:Gt({method:"GET",fullPath:"/v1/topups/{topup}"}),update:Gt({method:"POST",fullPath:"/v1/topups/{topup}"}),list:Gt({method:"GET",fullPath:"/v1/topups",methodType:"list"}),cancel:Gt({method:"POST",fullPath:"/v1/topups/{topup}/cancel"})});var Ph=m.method,m1=m.extend({create:Ph({method:"POST",fullPath:"/v1/transfers"}),retrieve:Ph({method:"GET",fullPath:"/v1/transfers/{transfer}"}),update:Ph({method:"POST",fullPath:"/v1/transfers/{transfer}"}),list:Ph({method:"GET",fullPath:"/v1/transfers",methodType:"list"}),createReversal:Ph({method:"POST",fullPath:"/v1/transfers/{id}/reversals"}),listReversals:Ph({method:"GET",fullPath:"/v1/transfers/{id}/reversals",methodType:"list"}),retrieveReversal:Ph({method:"GET",fullPath:"/v1/transfers/{transfer}/reversals/{id}"}),updateReversal:Ph({method:"POST",fullPath:"/v1/transfers/{transfer}/reversals/{id}"})});var ue=m.method,P1=m.extend({create:ue({method:"POST",fullPath:"/v2/billing/meter_event_session"})});var fe=m.method,u1=m.extend({create:fe({method:"POST",fullPath:"/v2/billing/meter_event_adjustments"})});var Te=m.method,f1=m.extend({create:Te({method:"POST",fullPath:"/v2/billing/meter_event_stream",host:"meter-events.stripe.com"})});var de=m.method,T1=m.extend({create:de({method:"POST",fullPath:"/v2/billing/meter_events"})});var d1=m.extend({constructor:function(...t){m.apply(this,t),this.meterEventSession=new P1(...t),this.meterEventAdjustments=new u1(...t),this.meterEventStream=new f1(...t),this.meterEvents=new T1(...t)}});var Fm=m.method,v1=m.extend({retrieve(...t){return Fm({method:"GET",fullPath:"/v2/core/events/{id}",transformResponseData:(l)=>{return this.addFetchRelatedObjectIfNeeded(l)}}).apply(this,t)},list(...t){return Fm({method:"GET",fullPath:"/v2/core/events",methodType:"list",transformResponseData:(l)=>{return Object.assign(Object.assign({},l),{data:l.data.map(this.addFetchRelatedObjectIfNeeded.bind(this))})}}).apply(this,t)},addFetchRelatedObjectIfNeeded(t){if(!t.related_object||!t.related_object.url)return t;return Object.assign(Object.assign({},t),{fetchRelatedObject:()=>Fm({method:"GET",fullPath:t.related_object.url}).apply(this,[{stripeAccount:t.context}])})}});var e1=m.extend({constructor:function(...t){m.apply(this,t),this.events=new v1(...t)}});var _1=m.extend({constructor:function(...t){m.apply(this,t),this.billing=new d1(...t),this.core=new e1(...t)}});var nt=m.method,c1=m.extend({create:nt({method:"POST",fullPath:"/v1/webhook_endpoints"}),retrieve:nt({method:"GET",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),update:nt({method:"POST",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),list:nt({method:"GET",fullPath:"/v1/webhook_endpoints",methodType:"list"}),del:nt({method:"DELETE",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"})});var ve=J("apps",{Secrets:Jf}),ee=J("billing",{Alerts:Zu,CreditBalanceSummary:Iu,CreditBalanceTransactions:Nu,CreditGrants:Du,MeterEventAdjustments:bu,MeterEvents:ju,Meters:au}),_e=J("billingPortal",{Configurations:Au,Sessions:Yf}),ce=J("checkout",{Sessions:Bf}),ie=J("climate",{Orders:hf,Products:ef,Suppliers:If}),Oe=J("entitlements",{ActiveEntitlements:Lu,Features:gu}),Ge=J("financialConnections",{Accounts:Mu,Sessions:Af,Transactions:$f}),ne=J("forwarding",{Requests:Zf}),xe=J("identity",{VerificationReports:bf,VerificationSessions:jf}),Fe=J("issuing",{Authorizations:Xu,Cardholders:Yu,Cards:Uu,Disputes:$u,PersonalizationDesigns:ff,PhysicalBundles:df,Tokens:Nf,Transactions:wf}),Ee=J("radar",{EarlyFraudWarnings:ku,ValueListItems:pf,ValueLists:sf}),Se=J("reporting",{ReportRuns:Mf,ReportTypes:Lf}),oe=J("sigma",{ScheduledQueryRuns:Xf}),Me=J("tax",{Calculations:Ju,Registrations:of,Settings:Wf,Transactions:kf}),ze=J("terminal",{Configurations:Vu,ConnectionTokens:Ru,Locations:ru,Readers:cf}),Le=J("testHelpers",{ConfirmationTokens:Wu,Customers:Hu,Refunds:Sf,TestClocks:Kf,Issuing:J("issuing",{Authorizations:Qu,Cards:Bu,PersonalizationDesigns:uf,Transactions:Hf}),Terminal:J("terminal",{Readers:_f}),Treasury:J("treasury",{InboundTransfers:pu,OutboundPayments:tf,OutboundTransfers:mf,ReceivedCredits:Of,ReceivedDebits:xf})}),Ze=J("treasury",{CreditReversals:Cu,DebitReversals:qu,FinancialAccounts:yu,InboundTransfers:su,OutboundPayments:lf,OutboundTransfers:Pf,ReceivedCredits:nf,ReceivedDebits:Ef,TransactionEntries:Cf,Transactions:yf});function o1(t,h=Xe){P.PACKAGE_VERSION="17.2.0",P.USER_AGENT=Object.assign({bindings_version:P.PACKAGE_VERSION,lang:"node",publisher:"stripe",uname:null,typescript:!1},iu()),P.StripeResource=m,P.resources=Kh,P.HttpClient=K,P.HttpClientResponse=Dh,P.CryptoProvider=Hh;function l(u=t){return mm(u)}P.webhooks=Object.assign(l,mm(t));function P(u,f={}){if(!(this instanceof P))return new P(u,f);const T=this._getPropsFromConfig(f);this._platformFunctions=t,Object.defineProperty(this,"_emitter",{value:this._platformFunctions.createEmitter(),enumerable:!1,configurable:!1,writable:!1}),this.VERSION=P.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);const v=T.httpAgent||null;this._api={host:T.host||i1,port:T.port||O1,protocol:T.protocol||"https",basePath:G1,version:T.apiVersion||n1,timeout:Ht("timeout",T.timeout,x1),maxNetworkRetries:Ht("maxNetworkRetries",T.maxNetworkRetries,2),agent:v,httpClient:T.httpClient||(v?this._platformFunctions.createNodeHttpClient(v):this._platformFunctions.createDefaultHttpClient()),dev:!1,stripeAccount:T.stripeAccount||null,stripeContext:T.stripeContext||null};const e=T.typescript||!1;if(e!==P.USER_AGENT.typescript)P.USER_AGENT.typescript=e;if(T.appInfo)this._setAppInfo(T.appInfo);this._prepResources(),this._setAuthenticator(u,T.authenticator),this.errors=ot,this.webhooks=l(),this._prevRequestMetrics=[],this._enableTelemetry=T.telemetry!==!1,this._requestSender=h(this),this.StripeResource=P.StripeResource}return P.errors=ot,P.createNodeHttpClient=t.createNodeHttpClient,P.createFetchHttpClient=t.createFetchHttpClient,P.createNodeCryptoProvider=t.createNodeCryptoProvider,P.createSubtleCryptoProvider=t.createSubtleCryptoProvider,P.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(u,f,T,v){return this._requestSender._rawRequest(u,f,T,v)},_setAuthenticator(u,f){if(u&&f)throw new Error("Can't specify both apiKey and authenticator");if(!u&&!f)throw new Error("Neither apiKey nor config.authenticator provided");this._authenticator=u?Kt(u):f},_setAppInfo(u){if(u&&typeof u!=="object")throw new Error("AppInfo must be an object.");if(u&&!u.name)throw new Error("AppInfo.name is required");u=u||{},this._appInfo=Qe.reduce((f,T)=>{if(typeof u[T]=="string")f=f||{},f[T]=u[T];return f},void 0)},_setApiField(u,f){this._api[u]=f},getApiField(u){return this._api[u]},setClientId(u){this._clientId=u},getClientId(){return this._clientId},getConstant:(u)=>{switch(u){case"DEFAULT_HOST":return i1;case"DEFAULT_PORT":return O1;case"DEFAULT_BASE_PATH":return G1;case"DEFAULT_API_VERSION":return n1;case"DEFAULT_TIMEOUT":return x1;case"MAX_NETWORK_RETRY_DELAY_SEC":return F1;case"INITIAL_NETWORK_RETRY_DELAY_SEC":return E1}return P[u]},getMaxNetworkRetries(){return this.getApiField("maxNetworkRetries")},_setApiNumberField(u,f,T){const v=Ht(u,f,T);this._setApiField(u,v)},getMaxNetworkRetryDelay(){return F1},getInitialNetworkRetryDelay(){return E1},getClientUserAgent(u){return this.getClientUserAgentSeeded(P.USER_AGENT,u)},getClientUserAgentSeeded(u,f){this._platformFunctions.getUname().then((T)=>{var v;const e={};for(let d in u){if(!Object.prototype.hasOwnProperty.call(u,d))continue;e[d]=encodeURIComponent((v=u[d])!==null&&v!==void 0?v:"null")}e.uname=encodeURIComponent(T||"UNKNOWN");const c=this.getApiField("httpClient");if(c)e.httplib=encodeURIComponent(c.getClientName());if(this._appInfo)e.application=this._appInfo;f(JSON.stringify(e))})},getAppInfoAsString(){if(!this._appInfo)return"";let u=this._appInfo.name;if(this._appInfo.version)u+=`/${this._appInfo.version}`;if(this._appInfo.url)u+=` (${this._appInfo.url})`;return u},getTelemetryEnabled(){return this._enableTelemetry},_prepResources(){for(let u in Kh){if(!Object.prototype.hasOwnProperty.call(Kh,u))continue;this[_u(u)]=new Kh[u](this)}},_getPropsFromConfig(u){if(!u)return{};const f=typeof u==="string";if(!(u===Object(u)&&!Array.isArray(u))&&!f)throw new Error("Config must either be an object or a string");if(f)return{apiVersion:u};if(Object.keys(u).filter((e)=>!S1.includes(e)).length>0)throw new Error(`Config object may only contain the following: ${S1.join(", ")}`);return u},parseThinEvent(u,f,T,v,e,c){return this.webhooks.constructEvent(u,f,T,v,e,c)}},P}var i1="api.stripe.com",O1="443",G1="/v1/",n1=ou,x1=80000,F1=5,E1=0.5,Qe=["name","version","url","partner_id"],S1=["authenticator","apiVersion","typescript","maxNetworkRetries","httpAgent","httpClient","timeout","host","port","protocol","telemetry","appInfo","stripeAccount","stripeContext"],Xe=(t)=>new Zh(t,m.MAX_BUFFERED_REQUEST_METRICS);var Je=o1(new ol),M1=Je;var Ye="",Y=new M1(Ye,{apiVersion:"2024-06-20"}),Be=(()=>{async function t(u){return await Y.paymentIntents.create(u)}async function h(u){return await Y.paymentIntents.retrieve(u)}async function l(u,f){return await Y.paymentIntents.update(u,f)}async function P(u){return await Y.paymentIntents.cancel(u)}return{create:t,retrieve:h,update:l,cancel:P}})(),Ue=(()=>{async function t(){return await Y.balance.retrieve()}return{retrieve:t}})(),Ae=(()=>{async function t(P){return await Y.customers.create(P)}async function h(P,u){return await Y.customers.update(P,u)}async function l(P){return await Y.customers.retrieve(P)}return{create:t,update:h,retrieve:l}})(),Ve=(()=>{async function t(u){return await Y.charges.create(u)}async function h(u,f){return await Y.charges.update(u,f)}async function l(u){return await Y.charges.capture(u)}async function P(u){return await Y.charges.retrieve(u)}return{create:t,update:h,retrieve:P,capture:l}})(),We=(()=>{async function t(l){return await Y.balanceTransactions.retrieve(l)}async function h(l){return await Y.balanceTransactions.list({limit:l})}return{retrieve:t,list:h}})(),Re=(()=>{async function t(u){return await Y.disputes.retrieve(u)}async function h(u,f){return await Y.disputes.update(u,f)}async function l(u){return await Y.disputes.close(u)}async function P(u){return await Y.disputes.list({limit:u})}return{retrieve:t,update:h,close:l,list:P}})(),Ie=(()=>{async function t(l){return await Y.events.retrieve(l)}async function h(l){return await Y.events.list({limit:l})}return{retrieve:t,list:h}})();export{z1 as stripe};
|
|
3
|
-
|
|
4
|
-
//# debugId=28F0E21BD353390A64756E2164756E21
|
|
5
|
-
//# sourceMappingURL=index.js.map
|
|
2
|
+
var Z1=Object.create;var{getPrototypeOf:Q1,defineProperty:Ol,getOwnPropertyNames:X1}=Object;var J1=Object.prototype.hasOwnProperty;var Y1=(t,h,l)=>{l=t!=null?Z1(Q1(t)):{};let P=h||!t||!t.__esModule?Ol(l,"default",{value:t,enumerable:!0}):l;for(let u of X1(t))if(!J1.call(P,u))Ol(P,u,{get:()=>t[u],enumerable:!0});return P};var M=(t,h)=>()=>(h||t((h={exports:{}}).exports,h),h.exports);var Gl=(t,h)=>{for(var l in h)Ol(t,l,{get:h[l],enumerable:!0,configurable:!0,set:(P)=>h[l]=()=>P})};var Mm=M((be,om)=>{om.exports=Error});var Lm=M((je,zm)=>{zm.exports=EvalError});var Qm=M((ae,Zm)=>{Zm.exports=RangeError});var Jm=M((h_,Xm)=>{Xm.exports=ReferenceError});var Jl=M((t_,Ym)=>{Ym.exports=SyntaxError});var Oh=M((l_,Bm)=>{Bm.exports=TypeError});var Am=M((m_,Um)=>{Um.exports=URIError});var Wm=M((P_,Vm)=>{Vm.exports=function t(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var h={},l=Symbol("test"),P=Object(l);if(typeof l==="string")return!1;if(Object.prototype.toString.call(l)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(P)!=="[object Symbol]")return!1;var u=42;h[l]=u;for(l in h)return!1;if(typeof Object.keys==="function"&&Object.keys(h).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(h).length!==0)return!1;var f=Object.getOwnPropertySymbols(h);if(f.length!==1||f[0]!==l)return!1;if(!Object.prototype.propertyIsEnumerable.call(h,l))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var T=Object.getOwnPropertyDescriptor(h,l);if(T.value!==u||T.enumerable!==!0)return!1}return!0}});var Km=M((u_,Im)=>{var Rm=typeof Symbol!=="undefined"&&Symbol,B1=Wm();Im.exports=function t(){if(typeof Rm!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof Rm("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return B1()}});var Dm=M((f_,Nm)=>{var Yl={__proto__:null,foo:{}},U1=Object;Nm.exports=function t(){return{__proto__:Yl}.foo===Yl.foo&&!(Yl instanceof U1)}});var qm=M((T_,Hm)=>{var A1="Function.prototype.bind called on incompatible ",V1=Object.prototype.toString,W1=Math.max,R1="[object Function]",Cm=function t(h,l){var P=[];for(var u=0;u<h.length;u+=1)P[u]=h[u];for(var f=0;f<l.length;f+=1)P[f+h.length]=l[f];return P},I1=function t(h,l){var P=[];for(var u=l||0,f=0;u<h.length;u+=1,f+=1)P[f]=h[u];return P},K1=function(t,h){var l="";for(var P=0;P<t.length;P+=1)if(l+=t[P],P+1<t.length)l+=h;return l};Hm.exports=function t(h){var l=this;if(typeof l!=="function"||V1.apply(l)!==R1)throw new TypeError(A1+l);var P=I1(arguments,1),u,f=function(){if(this instanceof u){var d=l.apply(this,Cm(P,arguments));if(Object(d)===d)return d;return this}return l.apply(h,Cm(P,arguments))},T=W1(0,l.length-P.length),v=[];for(var e=0;e<T;e++)v[e]="$"+e;if(u=Function("binder","return function ("+K1(v,",")+"){ return binder.apply(this,arguments); }")(f),l.prototype){var c=function d(){};c.prototype=l.prototype,u.prototype=new c,c.prototype=null}return u}});var Mt=M((d_,$m)=>{var N1=qm();$m.exports=Function.prototype.bind||N1});var km=M((v_,wm)=>{var D1=Function.prototype.call,C1=Object.prototype.hasOwnProperty,H1=Mt();wm.exports=H1.call(D1,C1)});var Th=M((e_,rm)=>{var S,q1=Mm(),$1=Lm(),w1=Qm(),k1=Jm(),Fh=Jl(),xh=Oh(),g1=Am(),sm=Function,Bl=function(t){try{return sm('"use strict"; return ('+t+").constructor;")()}catch(h){}},uh=Object.getOwnPropertyDescriptor;if(uh)try{uh({},"")}catch(t){uh=null}var Ul=function(){throw new xh},y1=uh?function(){try{return arguments.callee,Ul}catch(t){try{return uh(arguments,"callee").get}catch(h){return Ul}}}():Ul,Gh=Km()(),p1=Dm()(),W=Object.getPrototypeOf||(p1?function(t){return t.__proto__}:null),nh={},s1=typeof Uint8Array==="undefined"||!W?S:W(Uint8Array),fh={__proto__:null,"%AggregateError%":typeof AggregateError==="undefined"?S:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?S:ArrayBuffer,"%ArrayIteratorPrototype%":Gh&&W?W([][Symbol.iterator]()):S,"%AsyncFromSyncIteratorPrototype%":S,"%AsyncFunction%":nh,"%AsyncGenerator%":nh,"%AsyncGeneratorFunction%":nh,"%AsyncIteratorPrototype%":nh,"%Atomics%":typeof Atomics==="undefined"?S:Atomics,"%BigInt%":typeof BigInt==="undefined"?S:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?S:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?S:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?S:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":q1,"%eval%":eval,"%EvalError%":$1,"%Float32Array%":typeof Float32Array==="undefined"?S:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?S:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?S:FinalizationRegistry,"%Function%":sm,"%GeneratorFunction%":nh,"%Int8Array%":typeof Int8Array==="undefined"?S:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?S:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?S:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Gh&&W?W(W([][Symbol.iterator]())):S,"%JSON%":typeof JSON==="object"?JSON:S,"%Map%":typeof Map==="undefined"?S:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!Gh||!W?S:W(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?S:Promise,"%Proxy%":typeof Proxy==="undefined"?S:Proxy,"%RangeError%":w1,"%ReferenceError%":k1,"%Reflect%":typeof Reflect==="undefined"?S:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?S:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!Gh||!W?S:W(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?S:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Gh&&W?W(""[Symbol.iterator]()):S,"%Symbol%":Gh?Symbol:S,"%SyntaxError%":Fh,"%ThrowTypeError%":y1,"%TypedArray%":s1,"%TypeError%":xh,"%Uint8Array%":typeof Uint8Array==="undefined"?S:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?S:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?S:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?S:Uint32Array,"%URIError%":g1,"%WeakMap%":typeof WeakMap==="undefined"?S:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?S:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?S:WeakSet};if(W)try{null.error}catch(t){gm=W(W(t)),fh["%Error.prototype%"]=gm}var gm,r1=function t(h){var l;if(h==="%AsyncFunction%")l=Bl("async function () {}");else if(h==="%GeneratorFunction%")l=Bl("function* () {}");else if(h==="%AsyncGeneratorFunction%")l=Bl("async function* () {}");else if(h==="%AsyncGenerator%"){var P=t("%AsyncGeneratorFunction%");if(P)l=P.prototype}else if(h==="%AsyncIteratorPrototype%"){var u=t("%AsyncGenerator%");if(u&&W)l=W(u.prototype)}return fh[h]=l,l},ym={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},yh=Mt(),zt=km(),b1=yh.call(Function.call,Array.prototype.concat),j1=yh.call(Function.apply,Array.prototype.splice),pm=yh.call(Function.call,String.prototype.replace),Lt=yh.call(Function.call,String.prototype.slice),a1=yh.call(Function.call,RegExp.prototype.exec),hd=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,td=/\\(\\)?/g,ld=function t(h){var l=Lt(h,0,1),P=Lt(h,-1);if(l==="%"&&P!=="%")throw new Fh("invalid intrinsic syntax, expected closing `%`");else if(P==="%"&&l!=="%")throw new Fh("invalid intrinsic syntax, expected opening `%`");var u=[];return pm(h,hd,function(f,T,v,e){u[u.length]=v?pm(e,td,"$1"):T||f}),u},md=function t(h,l){var P=h,u;if(zt(ym,P))u=ym[P],P="%"+u[0]+"%";if(zt(fh,P)){var f=fh[P];if(f===nh)f=r1(P);if(typeof f==="undefined"&&!l)throw new xh("intrinsic "+h+" exists, but is not available. Please file an issue!");return{alias:u,name:P,value:f}}throw new Fh("intrinsic "+h+" does not exist!")};rm.exports=function t(h,l){if(typeof h!=="string"||h.length===0)throw new xh("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof l!=="boolean")throw new xh('"allowMissing" argument must be a boolean');if(a1(/^%?[^%]*%?$/,h)===null)throw new Fh("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var P=ld(h),u=P.length>0?P[0]:"",f=md("%"+u+"%",l),T=f.name,v=f.value,e=!1,c=f.alias;if(c)u=c[0],j1(P,b1([0,1],c));for(var d=1,i=!0;d<P.length;d+=1){var _=P[d],n=Lt(_,0,1),O=Lt(_,-1);if((n==='"'||n==="'"||n==="`"||(O==='"'||O==="'"||O==="`"))&&n!==O)throw new Fh("property names with quotes must have matching quotes");if(_==="constructor"||!i)e=!0;if(u+="."+_,T="%"+u+"%",zt(fh,T))v=fh[T];else if(v!=null){if(!(_ in v)){if(!l)throw new xh("base intrinsic for "+h+" exists, but the property is not available.");return}if(uh&&d+1>=P.length){var x=uh(v,_);if(i=!!x,i&&"get"in x&&!("originalValue"in x.get))v=x.get;else v=v[_]}else i=zt(v,_),v=v[_];if(i&&!e)fh[T]=v}}return v}});var Qt=M((__,bm)=>{var Pd=Th(),Zt=Pd("%Object.defineProperty%",!0)||!1;if(Zt)try{Zt({},"a",{value:1})}catch(t){Zt=!1}bm.exports=Zt});var Al=M((c_,jm)=>{var ud=Th(),Xt=ud("%Object.getOwnPropertyDescriptor%",!0);if(Xt)try{Xt([],"length")}catch(t){Xt=null}jm.exports=Xt});var lP=M((i_,tP)=>{var am=Qt(),fd=Jl(),Eh=Oh(),hP=Al();tP.exports=function t(h,l,P){if(!h||typeof h!=="object"&&typeof h!=="function")throw new Eh("`obj` must be an object or a function`");if(typeof l!=="string"&&typeof l!=="symbol")throw new Eh("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=="boolean"&&arguments[3]!==null)throw new Eh("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=="boolean"&&arguments[4]!==null)throw new Eh("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=="boolean"&&arguments[5]!==null)throw new Eh("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=="boolean")throw new Eh("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,f=arguments.length>4?arguments[4]:null,T=arguments.length>5?arguments[5]:null,v=arguments.length>6?arguments[6]:!1,e=!!hP&&hP(h,l);if(am)am(h,l,{configurable:T===null&&e?e.configurable:!T,enumerable:u===null&&e?e.enumerable:!u,value:P,writable:f===null&&e?e.writable:!f});else if(v||!u&&!f&&!T)h[l]=P;else throw new fd("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var uP=M((O_,PP)=>{var Vl=Qt(),mP=function t(){return!!Vl};mP.hasArrayLengthDefineBug=function t(){if(!Vl)return null;try{return Vl([],"length",{value:1}).length!==1}catch(h){return!0}};PP.exports=mP});var eP=M((G_,vP)=>{var Td=Th(),fP=lP(),dd=uP()(),TP=Al(),dP=Oh(),vd=Td("%Math.floor%");vP.exports=function t(h,l){if(typeof h!=="function")throw new dP("`fn` is not a function");if(typeof l!=="number"||l<0||l>4294967295||vd(l)!==l)throw new dP("`length` must be a positive 32-bit integer");var P=arguments.length>2&&!!arguments[2],u=!0,f=!0;if("length"in h&&TP){var T=TP(h,"length");if(T&&!T.configurable)u=!1;if(T&&!T.writable)f=!1}if(u||f||!P)if(dd)fP(h,"length",l,!0,!0);else fP(h,"length",l);return h}});var nP=M((n_,Jt)=>{var Wl=Mt(),Yt=Th(),ed=eP(),_d=Oh(),iP=Yt("%Function.prototype.apply%"),OP=Yt("%Function.prototype.call%"),GP=Yt("%Reflect.apply%",!0)||Wl.call(OP,iP),_P=Qt(),cd=Yt("%Math.max%");Jt.exports=function t(h){if(typeof h!=="function")throw new _d("a function is required");var l=GP(Wl,OP,arguments);return ed(l,1+cd(0,h.length-(arguments.length-1)),!0)};var cP=function t(){return GP(Wl,iP,arguments)};if(_P)_P(Jt.exports,"apply",{value:cP});else Jt.exports.apply=cP});var SP=M((x_,EP)=>{var xP=Th(),FP=nP(),id=FP(xP("String.prototype.indexOf"));EP.exports=function t(h,l){var P=xP(h,!!l);if(typeof P==="function"&&id(h,".prototype.")>-1)return FP(P);return P}});var MP=M((F_,oP)=>{oP.exports=import.meta.require("util").inspect});var qP=M((E_,HP)=>{var wl=typeof Map==="function"&&Map.prototype,Rl=Object.getOwnPropertyDescriptor&&wl?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ut=wl&&Rl&&typeof Rl.get==="function"?Rl.get:null,zP=wl&&Map.prototype.forEach,kl=typeof Set==="function"&&Set.prototype,Il=Object.getOwnPropertyDescriptor&&kl?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,At=kl&&Il&&typeof Il.get==="function"?Il.get:null,LP=kl&&Set.prototype.forEach,Od=typeof WeakMap==="function"&&WeakMap.prototype,sh=Od?WeakMap.prototype.has:null,Gd=typeof WeakSet==="function"&&WeakSet.prototype,rh=Gd?WeakSet.prototype.has:null,nd=typeof WeakRef==="function"&&WeakRef.prototype,ZP=nd?WeakRef.prototype.deref:null,xd=Boolean.prototype.valueOf,Fd=Object.prototype.toString,Ed=Function.prototype.toString,Sd=String.prototype.match,gl=String.prototype.slice,a=String.prototype.replace,od=String.prototype.toUpperCase,QP=String.prototype.toLowerCase,RP=RegExp.prototype.test,XP=Array.prototype.concat,w=Array.prototype.join,Md=Array.prototype.slice,JP=Math.floor,Dl=typeof BigInt==="function"?BigInt.prototype.valueOf:null,Kl=Object.getOwnPropertySymbols,Cl=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol.prototype.toString:null,Sh=typeof Symbol==="function"&&typeof Symbol.iterator==="object",I=typeof Symbol==="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Sh?"object":"symbol")?Symbol.toStringTag:null,IP=Object.prototype.propertyIsEnumerable,YP=(typeof Reflect==="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function BP(t,h){if(t===1/0||t===-1/0||t!==t||t&&t>-1000&&t<1000||RP.call(/e/,h))return h;var l=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t==="number"){var P=t<0?-JP(-t):JP(t);if(P!==t){var u=String(P),f=gl.call(h,u.length+1);return a.call(u,l,"$&_")+"."+a.call(a.call(f,/([0-9]{3})/g,"$&_"),/_$/,"")}}return a.call(h,l,"$&_")}var Hl=MP(),UP=Hl.custom,AP=NP(UP)?UP:null;HP.exports=function t(h,l,P,u){var f=l||{};if(j(f,"quoteStyle")&&(f.quoteStyle!=="single"&&f.quoteStyle!=="double"))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(j(f,"maxStringLength")&&(typeof f.maxStringLength==="number"?f.maxStringLength<0&&f.maxStringLength!==1/0:f.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var T=j(f,"customInspect")?f.customInspect:!0;if(typeof T!=="boolean"&&T!=="symbol")throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');if(j(f,"indent")&&f.indent!==null&&f.indent!=="\t"&&!(parseInt(f.indent,10)===f.indent&&f.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(j(f,"numericSeparator")&&typeof f.numericSeparator!=="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=f.numericSeparator;if(typeof h==="undefined")return"undefined";if(h===null)return"null";if(typeof h==="boolean")return h?"true":"false";if(typeof h==="string")return CP(h,f);if(typeof h==="number"){if(h===0)return 1/0/h>0?"0":"-0";var e=String(h);return v?BP(h,e):e}if(typeof h==="bigint"){var c=String(h)+"n";return v?BP(h,c):c}var d=typeof f.depth==="undefined"?5:f.depth;if(typeof P==="undefined")P=0;if(P>=d&&d>0&&typeof h==="object")return ql(h)?"[Array]":"[Object]";var i=Cd(f,P);if(typeof u==="undefined")u=[];else if(DP(u,h)>=0)return"[Circular]";function _(N,r,b){if(r)u=Md.call(u),u.push(r);if(b){var Nh={depth:f.depth};if(j(f,"quoteStyle"))Nh.quoteStyle=f.quoteStyle;return t(N,Nh,P+1,u)}return t(N,f,P+1,u)}if(typeof h==="function"&&!VP(h)){var n=Ud(h),O=Bt(h,_);return"[Function"+(n?": "+n:" (anonymous)")+"]"+(O.length>0?" { "+w.call(O,", ")+" }":"")}if(NP(h)){var x=Sh?a.call(String(h),/^(Symbol\(.*\))_[^)]*$/,"$1"):Cl.call(h);return typeof h==="object"&&!Sh?ph(x):x}if(Kd(h)){var F="<"+QP.call(String(h.nodeName)),E=h.attributes||[];for(var o=0;o<E.length;o++)F+=" "+E[o].name+"="+KP(zd(E[o].value),"double",f);if(F+=">",h.childNodes&&h.childNodes.length)F+="...";return F+="</"+QP.call(String(h.nodeName))+">",F}if(ql(h)){if(h.length===0)return"[]";var G=Bt(h,_);if(i&&!Dd(G))return"["+$l(G,i)+"]";return"[ "+w.call(G,", ")+" ]"}if(Zd(h)){var L=Bt(h,_);if(!("cause"in Error.prototype)&&"cause"in h&&!IP.call(h,"cause"))return"{ ["+String(h)+"] "+w.call(XP.call("[cause]: "+_(h.cause),L),", ")+" }";if(L.length===0)return"["+String(h)+"]";return"{ ["+String(h)+"] "+w.call(L,", ")+" }"}if(typeof h==="object"&&T){if(AP&&typeof h[AP]==="function"&&Hl)return Hl(h,{depth:d-P});else if(T!=="symbol"&&typeof h.inspect==="function")return h.inspect()}if(Ad(h)){var R=[];if(zP)zP.call(h,function(N,r){R.push(_(r,h,!0)+" => "+_(N,h))});return WP("Map",Ut.call(h),R,i)}if(Rd(h)){var C=[];if(LP)LP.call(h,function(N){C.push(_(N,h))});return WP("Set",At.call(h),C,i)}if(Vd(h))return Nl("WeakMap");if(Id(h))return Nl("WeakSet");if(Wd(h))return Nl("WeakRef");if(Xd(h))return ph(_(Number(h)));if(Yd(h))return ph(_(Dl.call(h)));if(Jd(h))return ph(xd.call(h));if(Qd(h))return ph(_(String(h)));if(typeof window!=="undefined"&&h===window)return"{ [object Window] }";if(typeof globalThis!=="undefined"&&h===globalThis||typeof global!=="undefined"&&h===global)return"{ [object globalThis] }";if(!Ld(h)&&!VP(h)){var B=Bt(h,_),H=YP?YP(h)===Object.prototype:h instanceof Object||h.constructor===Object,Z=h instanceof Object?"":"null prototype",q=!H&&I&&Object(h)===h&&I in h?gl.call(hh(h),8,-1):Z?"Object":"",xt=H||typeof h.constructor!=="function"?"":h.constructor.name?h.constructor.name+" ":"",ih=xt+(q||Z?"["+w.call(XP.call([],q||[],Z||[]),": ")+"] ":"");if(B.length===0)return ih+"{}";if(i)return ih+"{"+$l(B,i)+"}";return ih+"{ "+w.call(B,", ")+" }"}return String(h)};function KP(t,h,l){var P=(l.quoteStyle||h)==="double"?'"':"'";return P+t+P}function zd(t){return a.call(String(t),/"/g,""")}function ql(t){return hh(t)==="[object Array]"&&(!I||!(typeof t==="object"&&(I in t)))}function Ld(t){return hh(t)==="[object Date]"&&(!I||!(typeof t==="object"&&(I in t)))}function VP(t){return hh(t)==="[object RegExp]"&&(!I||!(typeof t==="object"&&(I in t)))}function Zd(t){return hh(t)==="[object Error]"&&(!I||!(typeof t==="object"&&(I in t)))}function Qd(t){return hh(t)==="[object String]"&&(!I||!(typeof t==="object"&&(I in t)))}function Xd(t){return hh(t)==="[object Number]"&&(!I||!(typeof t==="object"&&(I in t)))}function Jd(t){return hh(t)==="[object Boolean]"&&(!I||!(typeof t==="object"&&(I in t)))}function NP(t){if(Sh)return t&&typeof t==="object"&&t instanceof Symbol;if(typeof t==="symbol")return!0;if(!t||typeof t!=="object"||!Cl)return!1;try{return Cl.call(t),!0}catch(h){}return!1}function Yd(t){if(!t||typeof t!=="object"||!Dl)return!1;try{return Dl.call(t),!0}catch(h){}return!1}var Bd=Object.prototype.hasOwnProperty||function(t){return t in this};function j(t,h){return Bd.call(t,h)}function hh(t){return Fd.call(t)}function Ud(t){if(t.name)return t.name;var h=Sd.call(Ed.call(t),/^function\s*([\w$]+)/);if(h)return h[1];return null}function DP(t,h){if(t.indexOf)return t.indexOf(h);for(var l=0,P=t.length;l<P;l++)if(t[l]===h)return l;return-1}function Ad(t){if(!Ut||!t||typeof t!=="object")return!1;try{Ut.call(t);try{At.call(t)}catch(h){return!0}return t instanceof Map}catch(h){}return!1}function Vd(t){if(!sh||!t||typeof t!=="object")return!1;try{sh.call(t,sh);try{rh.call(t,rh)}catch(h){return!0}return t instanceof WeakMap}catch(h){}return!1}function Wd(t){if(!ZP||!t||typeof t!=="object")return!1;try{return ZP.call(t),!0}catch(h){}return!1}function Rd(t){if(!At||!t||typeof t!=="object")return!1;try{At.call(t);try{Ut.call(t)}catch(h){return!0}return t instanceof Set}catch(h){}return!1}function Id(t){if(!rh||!t||typeof t!=="object")return!1;try{rh.call(t,rh);try{sh.call(t,sh)}catch(h){return!0}return t instanceof WeakSet}catch(h){}return!1}function Kd(t){if(!t||typeof t!=="object")return!1;if(typeof HTMLElement!=="undefined"&&t instanceof HTMLElement)return!0;return typeof t.nodeName==="string"&&typeof t.getAttribute==="function"}function CP(t,h){if(t.length>h.maxStringLength){var l=t.length-h.maxStringLength,P="... "+l+" more character"+(l>1?"s":"");return CP(gl.call(t,0,h.maxStringLength),h)+P}var u=a.call(a.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Nd);return KP(u,"single",h)}function Nd(t){var h=t.charCodeAt(0),l={8:"b",9:"t",10:"n",12:"f",13:"r"}[h];if(l)return"\\"+l;return"\\x"+(h<16?"0":"")+od.call(h.toString(16))}function ph(t){return"Object("+t+")"}function Nl(t){return t+" { ? }"}function WP(t,h,l,P){var u=P?$l(l,P):w.call(l,", ");return t+" ("+h+") {"+u+"}"}function Dd(t){for(var h=0;h<t.length;h++)if(DP(t[h],"\n")>=0)return!1;return!0}function Cd(t,h){var l;if(t.indent==="\t")l="\t";else if(typeof t.indent==="number"&&t.indent>0)l=w.call(Array(t.indent+1)," ");else return null;return{base:l,prev:w.call(Array(h+1),l)}}function $l(t,h){if(t.length===0)return"";var l="\n"+h.prev+h.base;return l+w.call(t,","+l)+"\n"+h.prev}function Bt(t,h){var l=ql(t),P=[];if(l){P.length=t.length;for(var u=0;u<t.length;u++)P[u]=j(t,u)?h(t[u],t):""}var f=typeof Kl==="function"?Kl(t):[],T;if(Sh){T={};for(var v=0;v<f.length;v++)T["$"+f[v]]=f[v]}for(var e in t){if(!j(t,e))continue;if(l&&String(Number(e))===e&&e<t.length)continue;if(Sh&&T["$"+e]instanceof Symbol)continue;else if(RP.call(/[^\w$]/,e))P.push(h(e,t)+": "+h(t[e],t));else P.push(e+": "+h(t[e],t))}if(typeof Kl==="function"){for(var c=0;c<f.length;c++)if(IP.call(t,f[c]))P.push("["+h(f[c])+"]: "+h(t[f[c]],t))}return P}});var kP=M((S_,wP)=>{var $P=Th(),oh=SP(),Hd=qP(),qd=Oh(),Vt=$P("%WeakMap%",!0),Wt=$P("%Map%",!0),$d=oh("WeakMap.prototype.get",!0),wd=oh("WeakMap.prototype.set",!0),kd=oh("WeakMap.prototype.has",!0),gd=oh("Map.prototype.get",!0),yd=oh("Map.prototype.set",!0),pd=oh("Map.prototype.has",!0),yl=function(t,h){var l=t,P;for(;(P=l.next)!==null;l=P)if(P.key===h)return l.next=P.next,P.next=t.next,t.next=P,P},sd=function(t,h){var l=yl(t,h);return l&&l.value},rd=function(t,h,l){var P=yl(t,h);if(P)P.value=l;else t.next={key:h,next:t.next,value:l}},bd=function(t,h){return!!yl(t,h)};wP.exports=function t(){var h,l,P,u={assert:function(f){if(!u.has(f))throw new qd("Side channel does not contain "+Hd(f))},get:function(f){if(Vt&&f&&(typeof f==="object"||typeof f==="function")){if(h)return $d(h,f)}else if(Wt){if(l)return gd(l,f)}else if(P)return sd(P,f)},has:function(f){if(Vt&&f&&(typeof f==="object"||typeof f==="function")){if(h)return kd(h,f)}else if(Wt){if(l)return pd(l,f)}else if(P)return bd(P,f);return!1},set:function(f,T){if(Vt&&f&&(typeof f==="object"||typeof f==="function")){if(!h)h=new Vt;wd(h,f,T)}else if(Wt){if(!l)l=new Wt;yd(l,f,T)}else{if(!P)P={key:{},next:null};rd(P,f,T)}}};return u}});var Rt=M((o_,gP)=>{var jd=String.prototype.replace,ad=/%20/g,pl={RFC1738:"RFC1738",RFC3986:"RFC3986"};gP.exports={default:pl.RFC3986,formatters:{RFC1738:function(t){return jd.call(t,ad,"+")},RFC3986:function(t){return String(t)}},RFC1738:pl.RFC1738,RFC3986:pl.RFC3986}});var bl=M((M_,pP)=>{var hv=Rt(),sl=Object.prototype.hasOwnProperty,dh=Array.isArray,k=function(){var t=[];for(var h=0;h<256;++h)t.push("%"+((h<16?"0":"")+h.toString(16)).toUpperCase());return t}(),tv=function t(h){while(h.length>1){var l=h.pop(),P=l.obj[l.prop];if(dh(P)){var u=[];for(var f=0;f<P.length;++f)if(typeof P[f]!=="undefined")u.push(P[f]);l.obj[l.prop]=u}}},yP=function t(h,l){var P=l&&l.plainObjects?Object.create(null):{};for(var u=0;u<h.length;++u)if(typeof h[u]!=="undefined")P[u]=h[u];return P},lv=function t(h,l,P){if(!l)return h;if(typeof l!=="object"){if(dh(h))h.push(l);else if(h&&typeof h==="object"){if(P&&(P.plainObjects||P.allowPrototypes)||!sl.call(Object.prototype,l))h[l]=!0}else return[h,l];return h}if(!h||typeof h!=="object")return[h].concat(l);var u=h;if(dh(h)&&!dh(l))u=yP(h,P);if(dh(h)&&dh(l))return l.forEach(function(f,T){if(sl.call(h,T)){var v=h[T];if(v&&typeof v==="object"&&f&&typeof f==="object")h[T]=t(v,f,P);else h.push(f)}else h[T]=f}),h;return Object.keys(l).reduce(function(f,T){var v=l[T];if(sl.call(f,T))f[T]=t(f[T],v,P);else f[T]=v;return f},u)},mv=function t(h,l){return Object.keys(l).reduce(function(P,u){return P[u]=l[u],P},h)},Pv=function(t,h,l){var P=t.replace(/\+/g," ");if(l==="iso-8859-1")return P.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(P)}catch(u){return P}},rl=1024,uv=function t(h,l,P,u,f){if(h.length===0)return h;var T=h;if(typeof h==="symbol")T=Symbol.prototype.toString.call(h);else if(typeof h!=="string")T=String(h);if(P==="iso-8859-1")return escape(T).replace(/%u[0-9a-f]{4}/gi,function(n){return"%26%23"+parseInt(n.slice(2),16)+"%3B"});var v="";for(var e=0;e<T.length;e+=rl){var c=T.length>=rl?T.slice(e,e+rl):T,d=[];for(var i=0;i<c.length;++i){var _=c.charCodeAt(i);if(_===45||_===46||_===95||_===126||_>=48&&_<=57||_>=65&&_<=90||_>=97&&_<=122||f===hv.RFC1738&&(_===40||_===41)){d[d.length]=c.charAt(i);continue}if(_<128){d[d.length]=k[_];continue}if(_<2048){d[d.length]=k[192|_>>6]+k[128|_&63];continue}if(_<55296||_>=57344){d[d.length]=k[224|_>>12]+k[128|_>>6&63]+k[128|_&63];continue}i+=1,_=65536+((_&1023)<<10|c.charCodeAt(i)&1023),d[d.length]=k[240|_>>18]+k[128|_>>12&63]+k[128|_>>6&63]+k[128|_&63]}v+=d.join("")}return v},fv=function t(h){var l=[{obj:{o:h},prop:"o"}],P=[];for(var u=0;u<l.length;++u){var f=l[u],T=f.obj[f.prop],v=Object.keys(T);for(var e=0;e<v.length;++e){var c=v[e],d=T[c];if(typeof d==="object"&&d!==null&&P.indexOf(d)===-1)l.push({obj:T,prop:c}),P.push(d)}}return tv(l),h},Tv=function t(h){return Object.prototype.toString.call(h)==="[object RegExp]"},dv=function t(h){if(!h||typeof h!=="object")return!1;return!!(h.constructor&&h.constructor.isBuffer&&h.constructor.isBuffer(h))},vv=function t(h,l){return[].concat(h,l)},ev=function t(h,l){if(dh(h)){var P=[];for(var u=0;u<h.length;u+=1)P.push(l(h[u]));return P}return l(h)};pP.exports={arrayToObject:yP,assign:mv,combine:vv,compact:fv,decode:Pv,encode:uv,isBuffer:dv,isRegExp:Tv,maybeMap:ev,merge:lv}});var hu=M((z_,aP)=>{var rP=kP(),It=bl(),bh=Rt(),_v=Object.prototype.hasOwnProperty,bP={brackets:function t(h){return h+"[]"},comma:"comma",indices:function t(h,l){return h+"["+l+"]"},repeat:function t(h){return h}},g=Array.isArray,cv=Array.prototype.push,jP=function(t,h){cv.apply(t,g(h)?h:[h])},iv=Date.prototype.toISOString,sP=bh.default,A={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:It.encode,encodeValuesOnly:!1,format:sP,formatter:bh.formatters[sP],indices:!1,serializeDate:function t(h){return iv.call(h)},skipNulls:!1,strictNullHandling:!1},Ov=function t(h){return typeof h==="string"||typeof h==="number"||typeof h==="boolean"||typeof h==="symbol"||typeof h==="bigint"},jl={},Gv=function t(h,l,P,u,f,T,v,e,c,d,i,_,n,O,x,F,E,o){var G=h,L=o,R=0,C=!1;while((L=L.get(jl))!==void 0&&!C){var B=L.get(h);if(R+=1,typeof B!=="undefined")if(B===R)throw new RangeError("Cyclic object value");else C=!0;if(typeof L.get(jl)==="undefined")R=0}if(typeof d==="function")G=d(l,G);else if(G instanceof Date)G=n(G);else if(P==="comma"&&g(G))G=It.maybeMap(G,function(il){if(il instanceof Date)return n(il);return il});if(G===null){if(T)return c&&!F?c(l,A.encoder,E,"key",O):l;G=""}if(Ov(G)||It.isBuffer(G)){if(c){var H=F?l:c(l,A.encoder,E,"key",O);return[x(H)+"="+x(c(G,A.encoder,E,"value",O))]}return[x(l)+"="+x(String(G))]}var Z=[];if(typeof G==="undefined")return Z;var q;if(P==="comma"&&g(G)){if(F&&c)G=It.maybeMap(G,c);q=[{value:G.length>0?G.join(",")||null:void 0}]}else if(g(d))q=d;else{var xt=Object.keys(G);q=i?xt.sort(i):xt}var ih=e?l.replace(/\./g,"%2E"):l,N=u&&g(G)&&G.length===1?ih+"[]":ih;if(f&&g(G)&&G.length===0)return N+"[]";for(var r=0;r<q.length;++r){var b=q[r],Nh=typeof b==="object"&&typeof b.value!=="undefined"?b.value:G[b];if(v&&Nh===null)continue;var cl=_&&e?b.replace(/\./g,"%2E"):b,L1=g(G)?typeof P==="function"?P(N,cl):N:N+(_?"."+cl:"["+cl+"]");o.set(h,R);var Em=rP();Em.set(jl,o),jP(Z,t(Nh,L1,P,u,f,T,v,e,P==="comma"&&F&&g(G)?null:c,d,i,_,n,O,x,F,E,Em))}return Z},nv=function t(h){if(!h)return A;if(typeof h.allowEmptyArrays!=="undefined"&&typeof h.allowEmptyArrays!=="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.encodeDotInKeys!=="undefined"&&typeof h.encodeDotInKeys!=="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(h.encoder!==null&&typeof h.encoder!=="undefined"&&typeof h.encoder!=="function")throw new TypeError("Encoder has to be a function.");var l=h.charset||A.charset;if(typeof h.charset!=="undefined"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var P=bh.default;if(typeof h.format!=="undefined"){if(!_v.call(bh.formatters,h.format))throw new TypeError("Unknown format option provided.");P=h.format}var u=bh.formatters[P],f=A.filter;if(typeof h.filter==="function"||g(h.filter))f=h.filter;var T;if(h.arrayFormat in bP)T=h.arrayFormat;else if("indices"in h)T=h.indices?"indices":"repeat";else T=A.arrayFormat;if("commaRoundTrip"in h&&typeof h.commaRoundTrip!=="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var v=typeof h.allowDots==="undefined"?h.encodeDotInKeys===!0?!0:A.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix==="boolean"?h.addQueryPrefix:A.addQueryPrefix,allowDots:v,allowEmptyArrays:typeof h.allowEmptyArrays==="boolean"?!!h.allowEmptyArrays:A.allowEmptyArrays,arrayFormat:T,charset:l,charsetSentinel:typeof h.charsetSentinel==="boolean"?h.charsetSentinel:A.charsetSentinel,commaRoundTrip:h.commaRoundTrip,delimiter:typeof h.delimiter==="undefined"?A.delimiter:h.delimiter,encode:typeof h.encode==="boolean"?h.encode:A.encode,encodeDotInKeys:typeof h.encodeDotInKeys==="boolean"?h.encodeDotInKeys:A.encodeDotInKeys,encoder:typeof h.encoder==="function"?h.encoder:A.encoder,encodeValuesOnly:typeof h.encodeValuesOnly==="boolean"?h.encodeValuesOnly:A.encodeValuesOnly,filter:f,format:P,formatter:u,serializeDate:typeof h.serializeDate==="function"?h.serializeDate:A.serializeDate,skipNulls:typeof h.skipNulls==="boolean"?h.skipNulls:A.skipNulls,sort:typeof h.sort==="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling==="boolean"?h.strictNullHandling:A.strictNullHandling}};aP.exports=function(t,h){var l=t,P=nv(h),u,f;if(typeof P.filter==="function")f=P.filter,l=f("",l);else if(g(P.filter))f=P.filter,u=f;var T=[];if(typeof l!=="object"||l===null)return"";var v=bP[P.arrayFormat],e=v==="comma"&&P.commaRoundTrip;if(!u)u=Object.keys(l);if(P.sort)u.sort(P.sort);var c=rP();for(var d=0;d<u.length;++d){var i=u[d];if(P.skipNulls&&l[i]===null)continue;jP(T,Gv(l[i],i,v,e,P.allowEmptyArrays,P.strictNullHandling,P.skipNulls,P.encodeDotInKeys,P.encode?P.encoder:null,P.filter,P.sort,P.allowDots,P.serializeDate,P.format,P.formatter,P.encodeValuesOnly,P.charset,c))}var _=T.join(P.delimiter),n=P.addQueryPrefix===!0?"?":"";if(P.charsetSentinel)if(P.charset==="iso-8859-1")n+="utf8=%26%2310003%3B&";else n+="utf8=%E2%9C%93&";return _.length>0?n+_:""}});var mu=M((L_,lu)=>{var Mh=bl(),al=Object.prototype.hasOwnProperty,xv=Array.isArray,Q={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Mh.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1000,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},Fv=function(t){return t.replace(/&#(\d+);/g,function(h,l){return String.fromCharCode(parseInt(l,10))})},tu=function(t,h){if(t&&typeof t==="string"&&h.comma&&t.indexOf(",")>-1)return t.split(",");return t},Ev="utf8=%26%2310003%3B",Sv="utf8=%E2%9C%93",ov=function t(h,l){var P={__proto__:null},u=l.ignoreQueryPrefix?h.replace(/^\?/,""):h;u=u.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var f=l.parameterLimit===1/0?void 0:l.parameterLimit,T=u.split(l.delimiter,f),v=-1,e,c=l.charset;if(l.charsetSentinel){for(e=0;e<T.length;++e)if(T[e].indexOf("utf8=")===0){if(T[e]===Sv)c="utf-8";else if(T[e]===Ev)c="iso-8859-1";v=e,e=T.length}}for(e=0;e<T.length;++e){if(e===v)continue;var d=T[e],i=d.indexOf("]="),_=i===-1?d.indexOf("="):i+1,n,O;if(_===-1)n=l.decoder(d,Q.decoder,c,"key"),O=l.strictNullHandling?null:"";else n=l.decoder(d.slice(0,_),Q.decoder,c,"key"),O=Mh.maybeMap(tu(d.slice(_+1),l),function(F){return l.decoder(F,Q.decoder,c,"value")});if(O&&l.interpretNumericEntities&&c==="iso-8859-1")O=Fv(O);if(d.indexOf("[]=")>-1)O=xv(O)?[O]:O;var x=al.call(P,n);if(x&&l.duplicates==="combine")P[n]=Mh.combine(P[n],O);else if(!x||l.duplicates==="last")P[n]=O}return P},Mv=function(t,h,l,P){var u=P?h:tu(h,l);for(var f=t.length-1;f>=0;--f){var T,v=t[f];if(v==="[]"&&l.parseArrays)T=l.allowEmptyArrays&&(u===""||l.strictNullHandling&&u===null)?[]:[].concat(u);else{T=l.plainObjects?Object.create(null):{};var e=v.charAt(0)==="["&&v.charAt(v.length-1)==="]"?v.slice(1,-1):v,c=l.decodeDotInKeys?e.replace(/%2E/g,"."):e,d=parseInt(c,10);if(!l.parseArrays&&c==="")T={0:u};else if(!isNaN(d)&&v!==c&&String(d)===c&&d>=0&&(l.parseArrays&&d<=l.arrayLimit))T=[],T[d]=u;else if(c!=="__proto__")T[c]=u}u=T}return u},zv=function t(h,l,P,u){if(!h)return;var f=P.allowDots?h.replace(/\.([^.[]+)/g,"[$1]"):h,T=/(\[[^[\]]*])/,v=/(\[[^[\]]*])/g,e=P.depth>0&&T.exec(f),c=e?f.slice(0,e.index):f,d=[];if(c){if(!P.plainObjects&&al.call(Object.prototype,c)){if(!P.allowPrototypes)return}d.push(c)}var i=0;while(P.depth>0&&(e=v.exec(f))!==null&&i<P.depth){if(i+=1,!P.plainObjects&&al.call(Object.prototype,e[1].slice(1,-1))){if(!P.allowPrototypes)return}d.push(e[1])}if(e){if(P.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+P.depth+" and strictDepth is true");d.push("["+f.slice(e.index)+"]")}return Mv(d,l,P,u)},Lv=function t(h){if(!h)return Q;if(typeof h.allowEmptyArrays!=="undefined"&&typeof h.allowEmptyArrays!=="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.decodeDotInKeys!=="undefined"&&typeof h.decodeDotInKeys!=="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(h.decoder!==null&&typeof h.decoder!=="undefined"&&typeof h.decoder!=="function")throw new TypeError("Decoder has to be a function.");if(typeof h.charset!=="undefined"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var l=typeof h.charset==="undefined"?Q.charset:h.charset,P=typeof h.duplicates==="undefined"?Q.duplicates:h.duplicates;if(P!=="combine"&&P!=="first"&&P!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var u=typeof h.allowDots==="undefined"?h.decodeDotInKeys===!0?!0:Q.allowDots:!!h.allowDots;return{allowDots:u,allowEmptyArrays:typeof h.allowEmptyArrays==="boolean"?!!h.allowEmptyArrays:Q.allowEmptyArrays,allowPrototypes:typeof h.allowPrototypes==="boolean"?h.allowPrototypes:Q.allowPrototypes,allowSparse:typeof h.allowSparse==="boolean"?h.allowSparse:Q.allowSparse,arrayLimit:typeof h.arrayLimit==="number"?h.arrayLimit:Q.arrayLimit,charset:l,charsetSentinel:typeof h.charsetSentinel==="boolean"?h.charsetSentinel:Q.charsetSentinel,comma:typeof h.comma==="boolean"?h.comma:Q.comma,decodeDotInKeys:typeof h.decodeDotInKeys==="boolean"?h.decodeDotInKeys:Q.decodeDotInKeys,decoder:typeof h.decoder==="function"?h.decoder:Q.decoder,delimiter:typeof h.delimiter==="string"||Mh.isRegExp(h.delimiter)?h.delimiter:Q.delimiter,depth:typeof h.depth==="number"||h.depth===!1?+h.depth:Q.depth,duplicates:P,ignoreQueryPrefix:h.ignoreQueryPrefix===!0,interpretNumericEntities:typeof h.interpretNumericEntities==="boolean"?h.interpretNumericEntities:Q.interpretNumericEntities,parameterLimit:typeof h.parameterLimit==="number"?h.parameterLimit:Q.parameterLimit,parseArrays:h.parseArrays!==!1,plainObjects:typeof h.plainObjects==="boolean"?h.plainObjects:Q.plainObjects,strictDepth:typeof h.strictDepth==="boolean"?!!h.strictDepth:Q.strictDepth,strictNullHandling:typeof h.strictNullHandling==="boolean"?h.strictNullHandling:Q.strictNullHandling}};lu.exports=function(t,h){var l=Lv(h);if(t===""||t===null||typeof t==="undefined")return l.plainObjects?Object.create(null):{};var P=typeof t==="string"?ov(t,l):t,u=l.plainObjects?Object.create(null):{},f=Object.keys(P);for(var T=0;T<f.length;++T){var v=f[T],e=zv(v,P[v],l,typeof t==="string");u=Mh.merge(u,e,l)}if(l.allowSparse===!0)return u;return Mh.compact(u)}});var uu=M((Z_,Pu)=>{var Zv=hu(),Qv=mu(),Xv=Rt();Pu.exports={formats:Xv,parse:Qv,stringify:Zv}});var z1={};Gl(z1,{paymentIntent:()=>Be,events:()=>Ie,dispute:()=>Re,customer:()=>Ae,charge:()=>Ve,balanceTransactions:()=>We,balance:()=>Ue});class K{getClientName(){throw new Error("getClientName not implemented.")}makeRequest(t,h,l,P,u,f,T,v){throw new Error("makeRequest not implemented.")}static makeTimeoutError(){let t=new TypeError(K.TIMEOUT_ERROR_CODE);return t.code=K.TIMEOUT_ERROR_CODE,t}}K.CONNECTION_CLOSED_ERROR_CODES=["ECONNRESET","EPIPE"];K.TIMEOUT_ERROR_CODE="ETIMEDOUT";class Dh{constructor(t,h){this._statusCode=t,this._headers=h}getStatusCode(){return this._statusCode}getHeaders(){return this._headers}getRawResponse(){throw new Error("getRawResponse not implemented.")}toStream(t){throw new Error("toStream not implemented.")}toJSON(){throw new Error("toJSON not implemented.")}}class Ch extends K{constructor(t){super();if(!t){if(!globalThis.fetch)throw new Error("fetch() function not provided and is not defined in the global scope. You must provide a fetch implementation.");t=globalThis.fetch}if(globalThis.AbortController)this._fetchFn=Ch.makeFetchWithAbortTimeout(t);else this._fetchFn=Ch.makeFetchWithRaceTimeout(t)}static makeFetchWithRaceTimeout(t){return(h,l,P)=>{let u,f=new Promise((v,e)=>{u=setTimeout(()=>{u=null,e(K.makeTimeoutError())},P)}),T=t(h,l);return Promise.race([T,f]).finally(()=>{if(u)clearTimeout(u)})}}static makeFetchWithAbortTimeout(t){return async(h,l,P)=>{let u=new AbortController,f=setTimeout(()=>{f=null,u.abort(K.makeTimeoutError())},P);try{return await t(h,Object.assign(Object.assign({},l),{signal:u.signal}))}catch(T){if(T.name==="AbortError")throw K.makeTimeoutError();else throw T}finally{if(f)clearTimeout(f)}}}getClientName(){return"fetch"}async makeRequest(t,h,l,P,u,f,T,v){let c=new URL(l,`${T==="http"?"http":"https"}://${t}`);c.port=h;let d=P=="POST"||P=="PUT"||P=="PATCH",i=f||(d?"":void 0),_=await this._fetchFn(c.toString(),{method:P,headers:u,body:i},v);return new nl(_)}}class nl extends Dh{constructor(t){super(t.status,nl._transformHeadersToObject(t.headers));this._res=t}getRawResponse(){return this._res}toStream(t){return t(),this._res.body}toJSON(){return this._res.json()}static _transformHeadersToObject(t){let h={};for(let l of t){if(!Array.isArray(l)||l.length!=2)throw new Error("Response objects produced by the fetch function given to FetchHttpClient do not have an iterable headers map. Response#headers should be an iterable object.");h[l[0]]=l[1]}return h}}class Hh{computeHMACSignature(t,h){throw new Error("computeHMACSignature not implemented.")}computeHMACSignatureAsync(t,h){throw new Error("computeHMACSignatureAsync not implemented.")}computeSHA256Async(t){throw new Error("computeSHA256 not implemented.")}}class qh extends Error{}class Fl extends Hh{constructor(t){super();this.subtleCrypto=t||crypto.subtle}computeHMACSignature(t,h){throw new qh("SubtleCryptoProvider cannot be used in a synchronous context.")}async computeHMACSignatureAsync(t,h){let l=new TextEncoder,P=await this.subtleCrypto.importKey("raw",l.encode(h),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),u=await this.subtleCrypto.sign("hmac",P,l.encode(t)),f=new Uint8Array(u),T=new Array(f.length);for(let v=0;v<f.length;v++)T[v]=xl[f[v]];return T.join("")}async computeSHA256Async(t){return new Uint8Array(await this.subtleCrypto.digest("SHA-256",t))}}var xl=new Array(256);for(let t=0;t<xl.length;t++)xl[t]=t.toString(16).padStart(2,"0");class El{constructor(){this._fetchFn=null,this._agent=null}getUname(){throw new Error("getUname not implemented.")}uuid4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t)=>{let h=Math.random()*16|0;return(t==="x"?h:h&3|8).toString(16)})}secureCompare(t,h){if(t.length!==h.length)return!1;let l=t.length,P=0;for(let u=0;u<l;++u)P|=t.charCodeAt(u)^h.charCodeAt(u);return P===0}createEmitter(){throw new Error("createEmitter not implemented.")}tryBufferData(t){throw new Error("tryBufferData not implemented.")}createNodeHttpClient(t){throw new Error("createNodeHttpClient not implemented.")}createFetchHttpClient(t){return new Ch(t)}createDefaultHttpClient(){throw new Error("createDefaultHttpClient not implemented.")}createNodeCryptoProvider(){throw new Error("createNodeCryptoProvider not implemented.")}createSubtleCryptoProvider(t){return new Fl(t)}createDefaultCryptoProvider(){throw new Error("createDefaultCryptoProvider not implemented.")}}class Sm extends Event{constructor(t,h){super(t);this.data=h}}class Sl{constructor(){this.eventTarget=new EventTarget,this.listenerMapping=new Map}on(t,h){let l=(P)=>{h(P.data)};return this.listenerMapping.set(h,l),this.eventTarget.addEventListener(t,l)}removeListener(t,h){let l=this.listenerMapping.get(h);return this.listenerMapping.delete(h),this.eventTarget.removeEventListener(t,l)}once(t,h){let l=(P)=>{h(P.data)};return this.listenerMapping.set(h,l),this.eventTarget.addEventListener(t,l,{once:!0})}emit(t,h){return this.eventTarget.dispatchEvent(new Sm(t,h))}}class ol extends El{getUname(){return Promise.resolve(null)}createEmitter(){return new Sl}tryBufferData(t){if(t.file.data instanceof ReadableStream)throw new Error("Uploading a file as a stream is not supported in non-Node environments. Please open or upvote an issue at github.com/stripe/stripe-node if you use this, detailing your use-case.");return Promise.resolve(t)}createNodeHttpClient(){throw new Error("Stripe: `createNodeHttpClient()` is not available in non-Node environments. Please use `createFetchHttpClient()` instead.")}createDefaultHttpClient(){return super.createFetchHttpClient()}createNodeCryptoProvider(){throw new Error("Stripe: `createNodeCryptoProvider()` is not available in non-Node environments. Please use `createSubtleCryptoProvider()` instead.")}createDefaultCryptoProvider(){return this.createSubtleCryptoProvider()}}var ot={};Gl(ot,{generateV2Error:()=>Ml,generateV1Error:()=>$h,TemporarySessionExpiredError:()=>Xl,StripeUnknownError:()=>Ql,StripeSignatureVerificationError:()=>$,StripeRateLimitError:()=>gh,StripePermissionError:()=>Et,StripeInvalidRequestError:()=>Ft,StripeInvalidGrantError:()=>Zl,StripeIdempotencyError:()=>Ll,StripeError:()=>U,StripeConnectionError:()=>St,StripeCardError:()=>zl,StripeAuthenticationError:()=>kh,StripeAPIError:()=>wh});var $h=(t)=>{switch(t.type){case"card_error":return new zl(t);case"invalid_request_error":return new Ft(t);case"api_error":return new wh(t);case"authentication_error":return new kh(t);case"rate_limit_error":return new gh(t);case"idempotency_error":return new Ll(t);case"invalid_grant":return new Zl(t);default:return new Ql(t)}},Ml=(t)=>{switch(t.type){case"temporary_session_expired":return new Xl(t)}switch(t.code){case"invalid_fields":return new Ft(t)}return $h(t)};class U extends Error{constructor(t={},h=null){super(t.message);this.type=h||this.constructor.name,this.raw=t,this.rawType=t.type,this.code=t.code,this.doc_url=t.doc_url,this.param=t.param,this.detail=t.detail,this.headers=t.headers,this.requestId=t.requestId,this.statusCode=t.statusCode,this.message=t.message,this.userMessage=t.user_message,this.charge=t.charge,this.decline_code=t.decline_code,this.payment_intent=t.payment_intent,this.payment_method=t.payment_method,this.payment_method_type=t.payment_method_type,this.setup_intent=t.setup_intent,this.source=t.source}}U.generate=$h;class zl extends U{constructor(t={}){super(t,"StripeCardError")}}class Ft extends U{constructor(t={}){super(t,"StripeInvalidRequestError")}}class wh extends U{constructor(t={}){super(t,"StripeAPIError")}}class kh extends U{constructor(t={}){super(t,"StripeAuthenticationError")}}class Et extends U{constructor(t={}){super(t,"StripePermissionError")}}class gh extends U{constructor(t={}){super(t,"StripeRateLimitError")}}class St extends U{constructor(t={}){super(t,"StripeConnectionError")}}class $ extends U{constructor(t,h,l={}){super(l,"StripeSignatureVerificationError");this.header=t,this.payload=h}}class Ll extends U{constructor(t={}){super(t,"StripeIdempotencyError")}}class Zl extends U{constructor(t={}){super(t,"StripeInvalidGrantError")}}class Ql extends U{constructor(t={}){super(t,"StripeUnknownError")}}class Xl extends U{constructor(t={}){super(t,"TemporarySessionExpiredError")}}var fu=Y1(uu(),1),hm=["apiKey","idempotencyKey","stripeAccount","apiVersion","maxNetworkRetries","timeout","host","authenticator","stripeContext","additionalHeaders"];function Tu(t){return t&&typeof t==="object"&&hm.some((h)=>Object.prototype.hasOwnProperty.call(t,h))}function th(t,h){return fu.stringify(t,{serializeDate:(l)=>Math.floor(l.getTime()/1000).toString(),arrayFormat:h=="v2"?"repeat":"indices"}).replace(/%5B/g,"[").replace(/%5D/g,"]")}var Nt=(()=>{let t={"\n":"\\n",'"':'\\"',"\u2028":"\\u2028","\u2029":"\\u2029"};return(h)=>{let l=h.replace(/["\n\r\u2028\u2029]/g,(P)=>t[P]);return(P)=>{return l.replace(/\{([\s\S]+?)\}/g,(u,f)=>encodeURIComponent(P[f]||""))}}})();function du(t){let h=t.match(/\{\w+\}/g);if(!h)return[];return h.map((l)=>l.replace(/[{}]/g,""))}function zh(t){if(!Array.isArray(t)||!t[0]||typeof t[0]!=="object")return{};if(!Tu(t[0]))return t.shift();let h=Object.keys(t[0]),l=h.filter((P)=>hm.includes(P));if(l.length>0&&l.length!==h.length)ah(`Options found in arguments (${l.join(", ")}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options.`);return{}}function Dt(t){let h={host:null,headers:{},settings:{}};if(t.length>0){let l=t[t.length-1];if(typeof l==="string")h.authenticator=Kt(t.pop());else if(Tu(l)){let P=Object.assign({},t.pop()),u=Object.keys(P).filter((f)=>!hm.includes(f));if(u.length)ah(`Invalid options found (${u.join(", ")}); ignoring.`);if(P.apiKey)h.authenticator=Kt(P.apiKey);if(P.idempotencyKey)h.headers["Idempotency-Key"]=P.idempotencyKey;if(P.stripeAccount)h.headers["Stripe-Account"]=P.stripeAccount;if(P.stripeContext){if(h.headers["Stripe-Account"])throw new Error("Can't specify both stripeAccount and stripeContext.");h.headers["Stripe-Context"]=P.stripeContext}if(P.apiVersion)h.headers["Stripe-Version"]=P.apiVersion;if(Number.isInteger(P.maxNetworkRetries))h.settings.maxNetworkRetries=P.maxNetworkRetries;if(Number.isInteger(P.timeout))h.settings.timeout=P.timeout;if(P.host)h.host=P.host;if(P.authenticator){if(P.apiKey)throw new Error("Can't specify both apiKey and authenticator.");if(typeof P.authenticator!=="function")throw new Error("The authenticator must be a function receiving a request as the first parameter.");h.authenticator=P.authenticator}if(P.additionalHeaders)h.headers=P.additionalHeaders}}return h}function vu(t){let h=this,l=Object.prototype.hasOwnProperty.call(t,"constructor")?t.constructor:function(...P){h.apply(this,P)};return Object.assign(l,h),l.prototype=Object.create(h.prototype),Object.assign(l.prototype,t),l}function Ct(t){if(typeof t!=="object")throw new Error("Argument must be an object");return Object.keys(t).reduce((h,l)=>{if(t[l]!=null)h[l]=t[l];return h},{})}function eu(t){if(!(t&&typeof t==="object"))return t;return Object.keys(t).reduce((h,l)=>{return h[Jv(l)]=t[l],h},{})}function Jv(t){return t.split("-").map((h)=>h.charAt(0).toUpperCase()+h.substr(1).toLowerCase()).join("-")}function jh(t,h){if(h)return t.then((l)=>{setTimeout(()=>{h(null,l)},0)},(l)=>{setTimeout(()=>{h(l,null)},0)});return t}function _u(t){if(t==="OAuth")return"oauth";else return t[0].toLowerCase()+t.substring(1)}function ah(t){if(typeof process.emitWarning!=="function")return console.warn(`Stripe: ${t}`);return process.emitWarning(t,"Stripe")}function Yv(t){let h=typeof t;return(h==="function"||h==="object")&&!!t}function cu(t){let h={},l=(P,u)=>{Object.entries(P).forEach(([f,T])=>{let v=u?`${u}[${f}]`:f;if(Yv(T))if(!(T instanceof Uint8Array)&&!Object.prototype.hasOwnProperty.call(T,"data"))return l(T,v);else h[v]=T;else h[v]=String(T)})};return l(t,null),h}function Ht(t,h,l){if(!Number.isInteger(h))if(l!==void 0)return l;else throw new Error(`${t} must be an integer`);return h}function iu(){return typeof process==="undefined"?{}:{lang_version:process.version,platform:process.platform}}function Kt(t){let h=(l)=>{return l.headers.Authorization="Bearer "+t,Promise.resolve()};return h._apiKey=t,h}function Bv(t,h){if(this[t]instanceof Date)return Math.floor(this[t].getTime()/1000).toString();return h}function Ou(t){return JSON.stringify(t,Bv)}function Lh(t){if(!t)return"v1";return t.startsWith("/v2")?"v2":"v1"}var Uv=60;class Zh{constructor(t,h){this._stripe=t,this._maxBufferedRequestMetric=h}_addHeadersDirectlyToObject(t,h){t.requestId=h["request-id"],t.stripeAccount=t.stripeAccount||h["stripe-account"],t.apiVersion=t.apiVersion||h["stripe-version"],t.idempotencyKey=t.idempotencyKey||h["idempotency-key"]}_makeResponseEvent(t,h,l){let P=Date.now(),u=P-t.request_start_time;return Ct({api_version:l["stripe-version"],account:l["stripe-account"],idempotency_key:l["idempotency-key"],method:t.method,path:t.path,status:h,request_id:this._getRequestId(l),elapsed:u,request_start_time:t.request_start_time,request_end_time:P})}_getRequestId(t){return t["request-id"]}_streamingResponseHandler(t,h,l){return(P)=>{let u=P.getHeaders(),f=()=>{let v=this._makeResponseEvent(t,P.getStatusCode(),u);this._stripe._emitter.emit("response",v),this._recordRequestMetrics(this._getRequestId(u),v.elapsed,h)},T=P.toStream(f);return this._addHeadersDirectlyToObject(T,u),l(null,T)}}_jsonResponseHandler(t,h,l,P){return(u)=>{let f=u.getHeaders(),T=this._getRequestId(f),v=u.getStatusCode(),e=this._makeResponseEvent(t,v,f);this._stripe._emitter.emit("response",e),u.toJSON().then((c)=>{if(c.error){let d;if(typeof c.error==="string")c.error={type:c.error,message:c.error_description};if(c.error.headers=f,c.error.statusCode=v,c.error.requestId=T,v===401)d=new kh(c.error);else if(v===403)d=new Et(c.error);else if(v===429)d=new gh(c.error);else if(h==="v2")d=Ml(c.error);else d=$h(c.error);throw d}return c},(c)=>{throw new wh({message:"Invalid JSON received from the Stripe API",exception:c,requestId:f["request-id"]})}).then((c)=>{this._recordRequestMetrics(T,e.elapsed,l);let d=u.getRawResponse();this._addHeadersDirectlyToObject(d,f),Object.defineProperty(c,"lastResponse",{enumerable:!1,writable:!1,value:d}),P(null,c)},(c)=>P(c,null))}}static _generateConnectionErrorMessage(t){return`An error occurred with our connection to Stripe.${t>0?` Request was retried ${t} times.`:""}`}static _shouldRetry(t,h,l,P){if(P&&h===0&&K.CONNECTION_CLOSED_ERROR_CODES.includes(P.code))return!0;if(h>=l)return!1;if(!t)return!0;if(t.getHeaders()["stripe-should-retry"]==="false")return!1;if(t.getHeaders()["stripe-should-retry"]==="true")return!0;if(t.getStatusCode()===409)return!0;if(t.getStatusCode()>=500)return!0;return!1}_getSleepTimeInMS(t,h=null){let l=this._stripe.getInitialNetworkRetryDelay(),P=this._stripe.getMaxNetworkRetryDelay(),u=Math.min(l*Math.pow(2,t-1),P);if(u*=0.5*(1+Math.random()),u=Math.max(l,u),Number.isInteger(h)&&h<=Uv)u=Math.max(u,h);return u*1000}_getMaxNetworkRetries(t={}){return t.maxNetworkRetries!==void 0&&Number.isInteger(t.maxNetworkRetries)?t.maxNetworkRetries:this._stripe.getMaxNetworkRetries()}_defaultIdempotencyKey(t,h,l){let P=this._getMaxNetworkRetries(h),u=()=>`stripe-node-retry-${this._stripe._platformFunctions.uuid4()}`;if(l==="v2"){if(t==="POST"||t==="DELETE")return u()}else if(l==="v1"){if(t==="POST"&&P>0)return u()}return null}_makeHeaders({contentType:t,contentLength:h,apiVersion:l,clientUserAgent:P,method:u,userSuppliedHeaders:f,userSuppliedSettings:T,stripeAccount:v,stripeContext:e,apiMode:c}){let d={Accept:"application/json","Content-Type":t,"User-Agent":this._getUserAgentString(c),"X-Stripe-Client-User-Agent":P,"X-Stripe-Client-Telemetry":this._getTelemetryHeader(),"Stripe-Version":l,"Stripe-Account":v,"Stripe-Context":e,"Idempotency-Key":this._defaultIdempotencyKey(u,T,c)},i=u=="POST"||u=="PUT"||u=="PATCH";if(i||h){if(!i)ah(`${u} method had non-zero contentLength but no payload is expected for this verb`);d["Content-Length"]=h}return Object.assign(Ct(d),eu(f))}_getUserAgentString(t){let h=this._stripe.getConstant("PACKAGE_VERSION"),l=this._stripe._appInfo?this._stripe.getAppInfoAsString():"";return`Stripe/${t} NodeBindings/${h} ${l}`.trim()}_getTelemetryHeader(){if(this._stripe.getTelemetryEnabled()&&this._stripe._prevRequestMetrics.length>0){let t=this._stripe._prevRequestMetrics.shift();return JSON.stringify({last_request_metrics:t})}}_recordRequestMetrics(t,h,l){if(this._stripe.getTelemetryEnabled()&&t)if(this._stripe._prevRequestMetrics.length>this._maxBufferedRequestMetric)ah("Request metrics buffer is full, dropping telemetry message.");else{let P={request_id:t,request_duration_ms:h};if(l&&l.length>0)P.usage=l;this._stripe._prevRequestMetrics.push(P)}}_rawRequest(t,h,l,P){return new Promise((f,T)=>{let v;try{let _=t.toUpperCase();if(_!=="POST"&&l&&Object.keys(l).length!==0)throw new Error("rawRequest only supports params on POST requests. Please pass null and add your parameters to path.");let n=[].slice.call([l,P]),O=zh(n),x=Object.assign({},O),F=Dt(n),E=F.headers,o=F.authenticator;v={requestMethod:_,requestPath:h,bodyData:x,queryData:{},authenticator:o,headers:E,host:null,streaming:!1,settings:{},usage:["raw_request"]}}catch(_){T(_);return}function e(_,n){if(_)T(_);else f(n)}let{headers:c,settings:d}=v,i=v.authenticator;this._request(v.requestMethod,v.host,h,v.bodyData,i,{headers:c,settings:d,streaming:v.streaming},v.usage,e)})}_request(t,h,l,P,u,f,T=[],v,e=null){var c;let d;u=(c=u!==null&&u!==void 0?u:this._stripe._authenticator)!==null&&c!==void 0?c:null;let i=Lh(l),_=(x,F,E,o,G)=>{return setTimeout(x,this._getSleepTimeInMS(o,G),F,E,o+1)},n=(x,F,E)=>{let o=f.settings&&f.settings.timeout&&Number.isInteger(f.settings.timeout)&&f.settings.timeout>=0?f.settings.timeout:this._stripe.getApiField("timeout"),G={host:h||this._stripe.getApiField("host"),port:this._stripe.getApiField("port"),path:l,method:t,headers:Object.assign({},F),body:d,protocol:this._stripe.getApiField("protocol")};u(G).then(()=>{let L=this._stripe.getApiField("httpClient").makeRequest(G.host,G.port,G.path,G.method,G.headers,G.body,G.protocol,o),R=Date.now(),C=Ct({api_version:x,account:F["Stripe-Account"],idempotency_key:F["Idempotency-Key"],method:t,path:l,request_start_time:R}),B=E||0,H=this._getMaxNetworkRetries(f.settings||{});this._stripe._emitter.emit("request",C),L.then((Z)=>{if(Zh._shouldRetry(Z,B,H))return _(n,x,F,B,Z.getHeaders()["retry-after"]);else if(f.streaming&&Z.getStatusCode()<400)return this._streamingResponseHandler(C,T,v)(Z);else return this._jsonResponseHandler(C,i,T,v)(Z)}).catch((Z)=>{if(Zh._shouldRetry(null,B,H,Z))return _(n,x,F,B,null);else{let q=Z.code&&Z.code===K.TIMEOUT_ERROR_CODE;return v(new St({message:q?`Request aborted due to timeout being reached (${o}ms)`:Zh._generateConnectionErrorMessage(B),detail:Z}))}})}).catch((L)=>{throw new U({message:"Unable to authenticate the request",exception:L})})},O=(x,F)=>{if(x)return v(x);d=F,this._stripe.getClientUserAgent((E)=>{let o=this._stripe.getApiField("version"),G=this._makeHeaders({contentType:i=="v2"?"application/json":"application/x-www-form-urlencoded",contentLength:d.length,apiVersion:o,clientUserAgent:E,method:t,userSuppliedHeaders:f.headers,userSuppliedSettings:f.settings,stripeAccount:i=="v2"?null:this._stripe.getApiField("stripeAccount"),stripeContext:i=="v2"?this._stripe.getApiField("stripeContext"):null,apiMode:i});n(o,G,0)})};if(e)e(t,P,f.headers,O);else{let x;if(i=="v2")x=P?Ou(P):"";else x=th(P||{},i);O(null,x)}}}class lm{constructor(t,h,l,P){this.index=0,this.pagePromise=t,this.promiseCache={currentPromise:null},this.requestArgs=h,this.spec=l,this.stripeResource=P}async iterate(t){if(!(t&&t.data&&typeof t.data.length==="number"))throw Error("Unexpected: Stripe API response does not have a well-formed `data` array.");let h=Eu(this.requestArgs);if(this.index<t.data.length){let l=h?t.data.length-1-this.index:this.index,P=t.data[l];return this.index+=1,{value:P,done:!1}}else if(t.has_more){this.index=0,this.pagePromise=this.getNextPage(t);let l=await this.pagePromise;return this.iterate(l)}return{done:!0,value:void 0}}getNextPage(t){throw new Error("Unimplemented")}async _next(){return this.iterate(await this.pagePromise)}next(){if(this.promiseCache.currentPromise)return this.promiseCache.currentPromise;let t=(async()=>{let h=await this._next();return this.promiseCache.currentPromise=null,h})();return this.promiseCache.currentPromise=t,t}}class Gu extends lm{getNextPage(t){let h=Eu(this.requestArgs),l=Rv(t,h);return this.stripeResource._makeRequest(this.requestArgs,this.spec,{[h?"ending_before":"starting_after"]:l})}}class nu extends lm{getNextPage(t){if(!t.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:t.next_page})}}class xu{constructor(t,h,l,P){this.currentPageIterator=(async()=>{return(await t).data[Symbol.iterator]()})(),this.nextPageUrl=(async()=>{return(await t).next_page_url||null})(),this.requestArgs=h,this.spec=l,this.stripeResource=P}async turnPage(){let t=await this.nextPageUrl;if(!t)return null;this.spec.fullPath=t;let h=await this.stripeResource._makeRequest([],this.spec,{});return this.nextPageUrl=Promise.resolve(h.next_page_url),this.currentPageIterator=Promise.resolve(h.data[Symbol.iterator]()),this.currentPageIterator}async next(){{let l=(await this.currentPageIterator).next();if(!l.done)return{done:!1,value:l.value}}let t=await this.turnPage();if(!t)return{done:!0,value:void 0};let h=t.next();if(!h.done)return{done:!1,value:h.value};return{done:!0,value:void 0}}}var Fu=(t,h,l,P)=>{let u=Lh(l.fullPath||l.path);if(u!=="v2"&&l.methodType==="search")return tm(new nu(P,h,l,t));if(u!=="v2"&&l.methodType==="list")return tm(new Gu(P,h,l,t));if(u==="v2"&&l.methodType==="list")return tm(new xu(P,h,l,t));return null},tm=(t)=>{let h=Iv((...u)=>t.next(...u)),l=Kv(h),P={autoPagingEach:h,autoPagingToArray:l,next:()=>t.next(),return:()=>{return{}},[Av()]:()=>{return P}};return P};function Av(){if(typeof Symbol!=="undefined"&&Symbol.asyncIterator)return Symbol.asyncIterator;return"@@asyncIterator"}function Vv(t){if(t.length<2)return null;let h=t[1];if(typeof h!=="function")throw Error(`The second argument to autoPagingEach, if present, must be a callback function; received ${typeof h}`);return h}function Wv(t){if(t.length===0)return;let h=t[0];if(typeof h!=="function")throw Error(`The first argument to autoPagingEach, if present, must be a callback function; received ${typeof h}`);if(h.length===2)return h;if(h.length>2)throw Error(`The \`onItem\` callback function passed to autoPagingEach must accept at most two arguments; got ${h}`);return function l(P,u){let f=h(P);u(f)}}function Rv(t,h){let l=h?0:t.data.length-1,P=t.data[l],u=P&&P.id;if(!u)throw Error("Unexpected: No `id` found on the last item while auto-paging a list.");return u}function Iv(t){return function h(){let l=[].slice.call(arguments),P=Wv(l),u=Vv(l);if(l.length>2)throw Error(`autoPagingEach takes up to two arguments; received ${l}`);let f=Nv(t,P);return jh(f,u)}}function Kv(t){return function h(l,P){let u=l&&l.limit;if(!u)throw Error("You must pass a `limit` option to autoPagingToArray, e.g., `autoPagingToArray({limit: 1000});`.");if(u>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 f=new Promise((T,v)=>{let e=[];t((c)=>{if(e.push(c),e.length>=u)return!1}).then(()=>{T(e)}).catch(v)});return jh(f,P)}}function Nv(t,h){return new Promise((l,P)=>{function u(f){if(f.done){l();return}let T=f.value;return new Promise((v)=>{h(T,v)}).then((v)=>{if(v===!1)return u({done:!0,value:void 0});else return t().then(u)})}t().then(u).catch(P)})}function Eu(t){let h=[].slice.call(t);return!!zh(h).ending_before}function Su(t){if(t.path!==void 0&&t.fullPath!==void 0)throw new Error(`Method spec specified both a 'path' (${t.path}) and a 'fullPath' (${t.fullPath}).`);return function(...h){let l=typeof h[h.length-1]=="function"&&h.pop();t.urlParams=du(t.fullPath||this.createResourcePathWithSymbols(t.path||""));let P=jh(this._makeRequest(h,t,{}),l);return Object.assign(P,Fu(this,h,t,P)),P}}m.extend=vu;m.method=Su;m.MAX_BUFFERED_REQUEST_METRICS=100;function m(t,h){if(this._stripe=t,h)throw new Error("Support for curried url params was dropped in stripe-node v7.0.0. Instead, pass two ids.");this.basePath=Nt(this.basePath||t.getApiField("basePath")),this.resourcePath=this.path,this.path=Nt(this.path),this.initialize(...arguments)}m.prototype={_stripe:null,path:"",resourcePath:"",basePath:null,initialize(){},requestDataProcessor:null,validateRequest:null,createFullPath(t,h){let l=[this.basePath(h),this.path(h)];if(typeof t==="function"){let P=t(h);if(P)l.push(P)}else l.push(t);return this._joinUrlParts(l)},createResourcePathWithSymbols(t){if(t)return`/${this._joinUrlParts([this.resourcePath,t])}`;else return`/${this.resourcePath}`},_joinUrlParts(t){return t.join("/").replace(/\/{2,}/g,"/")},_getRequestOpts(t,h,l){var P;let u=(h.method||"GET").toUpperCase(),f=h.usage||[],T=h.urlParams||[],v=h.encode||((B)=>B),e=!!h.fullPath,c=Nt(e?h.fullPath:h.path||""),d=e?h.fullPath:this.createResourcePathWithSymbols(h.path),i=[].slice.call(t),_=T.reduce((B,H)=>{let Z=i.shift();if(typeof Z!=="string")throw new Error(`Stripe: Argument "${H}" must be a string, but got: ${Z} (on API request to \`${u} ${d}\`)`);return B[H]=Z,B},{}),n=zh(i),O=v(Object.assign({},n,l)),x=Dt(i),F=x.host||h.host,E=!!h.streaming;if(i.filter((B)=>B!=null).length)throw new Error(`Stripe: Unknown arguments (${i}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options. (on API request to ${u} \`${d}\`)`);let o=e?c(_):this.createFullPath(c,_),G=Object.assign(x.headers,h.headers);if(h.validator)h.validator(O,{headers:G});let L=h.method==="GET"||h.method==="DELETE";return{requestMethod:u,requestPath:o,bodyData:L?null:O,queryData:L?O:{},authenticator:(P=x.authenticator)!==null&&P!==void 0?P:null,headers:G,host:F!==null&&F!==void 0?F:null,streaming:E,settings:x.settings,usage:f}},_makeRequest(t,h,l){return new Promise((P,u)=>{var f;let T;try{T=this._getRequestOpts(t,h,l)}catch(_){u(_);return}function v(_,n){if(_)u(_);else P(h.transformResponseData?h.transformResponseData(n):n)}let e=Object.keys(T.queryData).length===0,c=[T.requestPath,e?"":"?",th(T.queryData,Lh(T.requestPath))].join(""),{headers:d,settings:i}=T;this._stripe._requestSender._request(T.requestMethod,T.host,c,T.bodyData,T.authenticator,{headers:d,settings:i,streaming:T.streaming},T.usage,v,(f=this.requestDataProcessor)===null||f===void 0?void 0:f.bind(this))})}};function mm(t){let h={DEFAULT_TOLERANCE:300,signature:null,constructEvent(d,i,_,n,O,x){try{this.signature.verifyHeader(d,i,_,n||h.DEFAULT_TOLERANCE,O,x)}catch(E){if(E instanceof qh)E.message+="\nUse `await constructEventAsync(...)` instead of `constructEvent(...)`";throw E}return d instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(d)):JSON.parse(d)},async constructEventAsync(d,i,_,n,O,x){return await this.signature.verifyHeaderAsync(d,i,_,n||h.DEFAULT_TOLERANCE,O,x),d instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(d)):JSON.parse(d)},generateTestHeaderString:function(d){let i=c(d),_=i.signature||i.cryptoProvider.computeHMACSignature(i.payloadString,i.secret);return i.generateHeaderString(_)},generateTestHeaderStringAsync:async function(d){let i=c(d),_=i.signature||await i.cryptoProvider.computeHMACSignatureAsync(i.payloadString,i.secret);return i.generateHeaderString(_)}},l={EXPECTED_SCHEME:"v1",verifyHeader(d,i,_,n,O,x){let{decodedHeader:F,decodedPayload:E,details:o,suspectPayloadType:G}=u(d,i,this.EXPECTED_SCHEME),L=/\s/.test(_);O=O||e();let R=O.computeHMACSignature(P(E,o),_);return f(E,F,o,R,n,G,L,x),!0},async verifyHeaderAsync(d,i,_,n,O,x){let{decodedHeader:F,decodedPayload:E,details:o,suspectPayloadType:G}=u(d,i,this.EXPECTED_SCHEME),L=/\s/.test(_);O=O||e();let R=await O.computeHMACSignatureAsync(P(E,o),_);return f(E,F,o,R,n,G,L,x)}};function P(d,i){return`${i.timestamp}.${d}`}function u(d,i,_){if(!d)throw new $(i,d,{message:"No webhook payload was provided."});let n=typeof d!="string"&&!(d instanceof Uint8Array),O=new TextDecoder("utf8"),x=d instanceof Uint8Array?O.decode(d):d;if(Array.isArray(i))throw new Error("Unexpected: An array was passed as a header, which should not be possible for the stripe-signature header.");if(i==null||i=="")throw new $(i,d,{message:"No stripe-signature header value was provided."});let F=i instanceof Uint8Array?O.decode(i):i,E=T(F,_);if(!E||E.timestamp===-1)throw new $(F,x,{message:"Unable to extract timestamp and signatures from header"});if(!E.signatures.length)throw new $(F,x,{message:"No signatures found with expected scheme"});return{decodedPayload:x,decodedHeader:F,details:E,suspectPayloadType:n}}function f(d,i,_,n,O,x,F,E){let o=!!_.signatures.filter(t.secureCompare.bind(t,n)).length,G="\nLearn more about webhook signing and explore webhook integration examples for various frameworks at https://github.com/stripe/stripe-node#webhook-signing",L=F?"\n\nNote: The provided signing secret contains whitespace. This often indicates an extra newline or space is in the value":"";if(!o){if(x)throw new $(i,d,{message:"Webhook payload must be provided as a string or a Buffer (https://nodejs.org/api/buffer.html) instance representing the _raw_ request body.Payload was provided as a parsed JavaScript object instead. \nSignature verification is impossible without access to the original signed material. \n"+G+"\n"+L});throw new $(i,d,{message:"No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe? \n If a webhook request is being forwarded by a third-party tool, ensure that the exact request body, including JSON formatting and new line style, is preserved.\n"+G+"\n"+L})}let R=Math.floor((typeof E==="number"?E:Date.now())/1000)-_.timestamp;if(O>0&&R>O)throw new $(i,d,{message:"Timestamp outside the tolerance zone"});return!0}function T(d,i){if(typeof d!=="string")return null;return d.split(",").reduce((_,n)=>{let O=n.split("=");if(O[0]==="t")_.timestamp=parseInt(O[1],10);if(O[0]===i)_.signatures.push(O[1]);return _},{timestamp:-1,signatures:[]})}let v=null;function e(){if(!v)v=t.createDefaultCryptoProvider();return v}function c(d){if(!d)throw new U({message:"Options are required"});let i=Math.floor(d.timestamp)||Math.floor(Date.now()/1000),_=d.scheme||l.EXPECTED_SCHEME,n=d.cryptoProvider||e(),O=`${i}.${d.payload}`,x=(F)=>{return`t=${i},${_}=${F}`};return Object.assign(Object.assign({},d),{timestamp:i,scheme:_,cryptoProvider:n,payloadString:O,generateHeaderString:x})}return h.signature=l,h}var ou="2024-09-30.acacia";var Kh={};Gl(Kh,{WebhookEndpoints:()=>c1,V2:()=>_1,Treasury:()=>Ze,Transfers:()=>m1,Topups:()=>l1,Tokens:()=>t1,TestHelpers:()=>Le,Terminal:()=>ze,TaxRates:()=>aT,TaxIds:()=>jT,TaxCodes:()=>bT,Tax:()=>Me,Subscriptions:()=>sT,SubscriptionSchedules:()=>pT,SubscriptionItems:()=>yT,Sources:()=>gT,Sigma:()=>oe,ShippingRates:()=>kT,SetupIntents:()=>wT,SetupAttempts:()=>$T,Reviews:()=>qT,Reporting:()=>Se,Refunds:()=>HT,Radar:()=>Ee,Quotes:()=>CT,PromotionCodes:()=>DT,Products:()=>NT,Prices:()=>KT,Plans:()=>IT,Payouts:()=>RT,PaymentMethods:()=>WT,PaymentMethodDomains:()=>VT,PaymentMethodConfigurations:()=>AT,PaymentLinks:()=>UT,PaymentIntents:()=>BT,OAuth:()=>YT,Mandates:()=>XT,Issuing:()=>Fe,Invoices:()=>QT,InvoiceRenderingTemplates:()=>ZT,InvoiceItems:()=>LT,Identity:()=>xe,Forwarding:()=>ne,FinancialConnections:()=>Ge,Files:()=>zT,FileLinks:()=>oT,ExchangeRates:()=>ST,Events:()=>FT,EphemeralKeys:()=>nT,Entitlements:()=>Oe,Disputes:()=>OT,Customers:()=>iT,CustomerSessions:()=>cT,CreditNotes:()=>_T,Coupons:()=>eT,CountrySpecs:()=>vT,ConfirmationTokens:()=>TT,Climate:()=>ie,Checkout:()=>ce,Charges:()=>fT,BillingPortal:()=>_e,Billing:()=>ee,BalanceTransactions:()=>uT,Balance:()=>mT,Apps:()=>ve,ApplicationFees:()=>lT,ApplePayDomains:()=>tT,Accounts:()=>Om,AccountSessions:()=>hT,AccountLinks:()=>af,Account:()=>Om});function Dv(t,h){for(let l in h){if(!Object.prototype.hasOwnProperty.call(h,l))continue;let P=l[0].toLowerCase()+l.substring(1),u=new h[l](t);this[P]=u}}function J(t,h){return function(l){return new Dv(l,h)}}var vh=m.method,Mu=m.extend({retrieve:vh({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}"}),list:vh({method:"GET",fullPath:"/v1/financial_connections/accounts",methodType:"list"}),disconnect:vh({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/disconnect"}),listOwners:vh({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}/owners",methodType:"list"}),refresh:vh({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/refresh"}),subscribe:vh({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/subscribe"}),unsubscribe:vh({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/unsubscribe"})});var zu=m.method,Lu=m.extend({retrieve:zu({method:"GET",fullPath:"/v1/entitlements/active_entitlements/{id}"}),list:zu({method:"GET",fullPath:"/v1/entitlements/active_entitlements",methodType:"list"})});var Qh=m.method,Zu=m.extend({create:Qh({method:"POST",fullPath:"/v1/billing/alerts"}),retrieve:Qh({method:"GET",fullPath:"/v1/billing/alerts/{id}"}),list:Qh({method:"GET",fullPath:"/v1/billing/alerts",methodType:"list"}),activate:Qh({method:"POST",fullPath:"/v1/billing/alerts/{id}/activate"}),archive:Qh({method:"POST",fullPath:"/v1/billing/alerts/{id}/archive"}),deactivate:Qh({method:"POST",fullPath:"/v1/billing/alerts/{id}/deactivate"})});var Xh=m.method,Qu=m.extend({create:Xh({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations"}),capture:Xh({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/capture"}),expire:Xh({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/expire"}),finalizeAmount:Xh({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount"}),increment:Xh({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/increment"}),reverse:Xh({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/reverse"})});var ht=m.method,Xu=m.extend({retrieve:ht({method:"GET",fullPath:"/v1/issuing/authorizations/{authorization}"}),update:ht({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}"}),list:ht({method:"GET",fullPath:"/v1/issuing/authorizations",methodType:"list"}),approve:ht({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/approve"}),decline:ht({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/decline"})});var Pm=m.method,Ju=m.extend({create:Pm({method:"POST",fullPath:"/v1/tax/calculations"}),retrieve:Pm({method:"GET",fullPath:"/v1/tax/calculations/{calculation}"}),listLineItems:Pm({method:"GET",fullPath:"/v1/tax/calculations/{calculation}/line_items",methodType:"list"})});var qt=m.method,Yu=m.extend({create:qt({method:"POST",fullPath:"/v1/issuing/cardholders"}),retrieve:qt({method:"GET",fullPath:"/v1/issuing/cardholders/{cardholder}"}),update:qt({method:"POST",fullPath:"/v1/issuing/cardholders/{cardholder}"}),list:qt({method:"GET",fullPath:"/v1/issuing/cardholders",methodType:"list"})});var $t=m.method,Bu=m.extend({deliverCard:$t({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/deliver"}),failCard:$t({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/fail"}),returnCard:$t({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/return"}),shipCard:$t({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/ship"})});var wt=m.method,Uu=m.extend({create:wt({method:"POST",fullPath:"/v1/issuing/cards"}),retrieve:wt({method:"GET",fullPath:"/v1/issuing/cards/{card}"}),update:wt({method:"POST",fullPath:"/v1/issuing/cards/{card}"}),list:wt({method:"GET",fullPath:"/v1/issuing/cards",methodType:"list"})});var kt=m.method,Au=m.extend({create:kt({method:"POST",fullPath:"/v1/billing_portal/configurations"}),retrieve:kt({method:"GET",fullPath:"/v1/billing_portal/configurations/{configuration}"}),update:kt({method:"POST",fullPath:"/v1/billing_portal/configurations/{configuration}"}),list:kt({method:"GET",fullPath:"/v1/billing_portal/configurations",methodType:"list"})});var tt=m.method,Vu=m.extend({create:tt({method:"POST",fullPath:"/v1/terminal/configurations"}),retrieve:tt({method:"GET",fullPath:"/v1/terminal/configurations/{configuration}"}),update:tt({method:"POST",fullPath:"/v1/terminal/configurations/{configuration}"}),list:tt({method:"GET",fullPath:"/v1/terminal/configurations",methodType:"list"}),del:tt({method:"DELETE",fullPath:"/v1/terminal/configurations/{configuration}"})});var Cv=m.method,Wu=m.extend({create:Cv({method:"POST",fullPath:"/v1/test_helpers/confirmation_tokens"})});var Hv=m.method,Ru=m.extend({create:Hv({method:"POST",fullPath:"/v1/terminal/connection_tokens"})});var qv=m.method,Iu=m.extend({retrieve:qv({method:"GET",fullPath:"/v1/billing/credit_balance_summary"})});var Ku=m.method,Nu=m.extend({retrieve:Ku({method:"GET",fullPath:"/v1/billing/credit_balance_transactions/{id}"}),list:Ku({method:"GET",fullPath:"/v1/billing/credit_balance_transactions",methodType:"list"})});var Jh=m.method,Du=m.extend({create:Jh({method:"POST",fullPath:"/v1/billing/credit_grants"}),retrieve:Jh({method:"GET",fullPath:"/v1/billing/credit_grants/{id}"}),update:Jh({method:"POST",fullPath:"/v1/billing/credit_grants/{id}"}),list:Jh({method:"GET",fullPath:"/v1/billing/credit_grants",methodType:"list"}),expire:Jh({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/expire"}),voidGrant:Jh({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/void"})});var um=m.method,Cu=m.extend({create:um({method:"POST",fullPath:"/v1/treasury/credit_reversals"}),retrieve:um({method:"GET",fullPath:"/v1/treasury/credit_reversals/{credit_reversal}"}),list:um({method:"GET",fullPath:"/v1/treasury/credit_reversals",methodType:"list"})});var $v=m.method,Hu=m.extend({fundCashBalance:$v({method:"POST",fullPath:"/v1/test_helpers/customers/{customer}/fund_cash_balance"})});var fm=m.method,qu=m.extend({create:fm({method:"POST",fullPath:"/v1/treasury/debit_reversals"}),retrieve:fm({method:"GET",fullPath:"/v1/treasury/debit_reversals/{debit_reversal}"}),list:fm({method:"GET",fullPath:"/v1/treasury/debit_reversals",methodType:"list"})});var lt=m.method,$u=m.extend({create:lt({method:"POST",fullPath:"/v1/issuing/disputes"}),retrieve:lt({method:"GET",fullPath:"/v1/issuing/disputes/{dispute}"}),update:lt({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}"}),list:lt({method:"GET",fullPath:"/v1/issuing/disputes",methodType:"list"}),submit:lt({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}/submit"})});var wu=m.method,ku=m.extend({retrieve:wu({method:"GET",fullPath:"/v1/radar/early_fraud_warnings/{early_fraud_warning}"}),list:wu({method:"GET",fullPath:"/v1/radar/early_fraud_warnings",methodType:"list"})});var gt=m.method,gu=m.extend({create:gt({method:"POST",fullPath:"/v1/entitlements/features"}),retrieve:gt({method:"GET",fullPath:"/v1/entitlements/features/{id}"}),update:gt({method:"POST",fullPath:"/v1/entitlements/features/{id}"}),list:gt({method:"GET",fullPath:"/v1/entitlements/features",methodType:"list"})});var Yh=m.method,yu=m.extend({create:Yh({method:"POST",fullPath:"/v1/treasury/financial_accounts"}),retrieve:Yh({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),update:Yh({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),list:Yh({method:"GET",fullPath:"/v1/treasury/financial_accounts",methodType:"list"}),retrieveFeatures:Yh({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"}),updateFeatures:Yh({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"})});var Tm=m.method,pu=m.extend({fail:Tm({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/fail"}),returnInboundTransfer:Tm({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/return"}),succeed:Tm({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/succeed"})});var yt=m.method,su=m.extend({create:yt({method:"POST",fullPath:"/v1/treasury/inbound_transfers"}),retrieve:yt({method:"GET",fullPath:"/v1/treasury/inbound_transfers/{id}"}),list:yt({method:"GET",fullPath:"/v1/treasury/inbound_transfers",methodType:"list"}),cancel:yt({method:"POST",fullPath:"/v1/treasury/inbound_transfers/{inbound_transfer}/cancel"})});var mt=m.method,ru=m.extend({create:mt({method:"POST",fullPath:"/v1/terminal/locations"}),retrieve:mt({method:"GET",fullPath:"/v1/terminal/locations/{location}"}),update:mt({method:"POST",fullPath:"/v1/terminal/locations/{location}"}),list:mt({method:"GET",fullPath:"/v1/terminal/locations",methodType:"list"}),del:mt({method:"DELETE",fullPath:"/v1/terminal/locations/{location}"})});var wv=m.method,bu=m.extend({create:wv({method:"POST",fullPath:"/v1/billing/meter_event_adjustments"})});var kv=m.method,ju=m.extend({create:kv({method:"POST",fullPath:"/v1/billing/meter_events"})});var eh=m.method,au=m.extend({create:eh({method:"POST",fullPath:"/v1/billing/meters"}),retrieve:eh({method:"GET",fullPath:"/v1/billing/meters/{id}"}),update:eh({method:"POST",fullPath:"/v1/billing/meters/{id}"}),list:eh({method:"GET",fullPath:"/v1/billing/meters",methodType:"list"}),deactivate:eh({method:"POST",fullPath:"/v1/billing/meters/{id}/deactivate"}),listEventSummaries:eh({method:"GET",fullPath:"/v1/billing/meters/{id}/event_summaries",methodType:"list"}),reactivate:eh({method:"POST",fullPath:"/v1/billing/meters/{id}/reactivate"})});var Pt=m.method,hf=m.extend({create:Pt({method:"POST",fullPath:"/v1/climate/orders"}),retrieve:Pt({method:"GET",fullPath:"/v1/climate/orders/{order}"}),update:Pt({method:"POST",fullPath:"/v1/climate/orders/{order}"}),list:Pt({method:"GET",fullPath:"/v1/climate/orders",methodType:"list"}),cancel:Pt({method:"POST",fullPath:"/v1/climate/orders/{order}/cancel"})});var pt=m.method,tf=m.extend({update:pt({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}"}),fail:pt({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/fail"}),post:pt({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/post"}),returnOutboundPayment:pt({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/return"})});var st=m.method,lf=m.extend({create:st({method:"POST",fullPath:"/v1/treasury/outbound_payments"}),retrieve:st({method:"GET",fullPath:"/v1/treasury/outbound_payments/{id}"}),list:st({method:"GET",fullPath:"/v1/treasury/outbound_payments",methodType:"list"}),cancel:st({method:"POST",fullPath:"/v1/treasury/outbound_payments/{id}/cancel"})});var rt=m.method,mf=m.extend({update:rt({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}"}),fail:rt({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail"}),post:rt({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post"}),returnOutboundTransfer:rt({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return"})});var bt=m.method,Pf=m.extend({create:bt({method:"POST",fullPath:"/v1/treasury/outbound_transfers"}),retrieve:bt({method:"GET",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}"}),list:bt({method:"GET",fullPath:"/v1/treasury/outbound_transfers",methodType:"list"}),cancel:bt({method:"POST",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}/cancel"})});var dm=m.method,uf=m.extend({activate:dm({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate"}),deactivate:dm({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate"}),reject:dm({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject"})});var jt=m.method,ff=m.extend({create:jt({method:"POST",fullPath:"/v1/issuing/personalization_designs"}),retrieve:jt({method:"GET",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),update:jt({method:"POST",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),list:jt({method:"GET",fullPath:"/v1/issuing/personalization_designs",methodType:"list"})});var Tf=m.method,df=m.extend({retrieve:Tf({method:"GET",fullPath:"/v1/issuing/physical_bundles/{physical_bundle}"}),list:Tf({method:"GET",fullPath:"/v1/issuing/physical_bundles",methodType:"list"})});var vf=m.method,ef=m.extend({retrieve:vf({method:"GET",fullPath:"/v1/climate/products/{product}"}),list:vf({method:"GET",fullPath:"/v1/climate/products",methodType:"list"})});var gv=m.method,_f=m.extend({presentPaymentMethod:gv({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/present_payment_method"})});var y=m.method,cf=m.extend({create:y({method:"POST",fullPath:"/v1/terminal/readers"}),retrieve:y({method:"GET",fullPath:"/v1/terminal/readers/{reader}"}),update:y({method:"POST",fullPath:"/v1/terminal/readers/{reader}"}),list:y({method:"GET",fullPath:"/v1/terminal/readers",methodType:"list"}),del:y({method:"DELETE",fullPath:"/v1/terminal/readers/{reader}"}),cancelAction:y({method:"POST",fullPath:"/v1/terminal/readers/{reader}/cancel_action"}),processPaymentIntent:y({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_payment_intent"}),processSetupIntent:y({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_setup_intent"}),refundPayment:y({method:"POST",fullPath:"/v1/terminal/readers/{reader}/refund_payment"}),setReaderDisplay:y({method:"POST",fullPath:"/v1/terminal/readers/{reader}/set_reader_display"})});var yv=m.method,Of=m.extend({create:yv({method:"POST",fullPath:"/v1/test_helpers/treasury/received_credits"})});var Gf=m.method,nf=m.extend({retrieve:Gf({method:"GET",fullPath:"/v1/treasury/received_credits/{id}"}),list:Gf({method:"GET",fullPath:"/v1/treasury/received_credits",methodType:"list"})});var pv=m.method,xf=m.extend({create:pv({method:"POST",fullPath:"/v1/test_helpers/treasury/received_debits"})});var Ff=m.method,Ef=m.extend({retrieve:Ff({method:"GET",fullPath:"/v1/treasury/received_debits/{id}"}),list:Ff({method:"GET",fullPath:"/v1/treasury/received_debits",methodType:"list"})});var sv=m.method,Sf=m.extend({expire:sv({method:"POST",fullPath:"/v1/test_helpers/refunds/{refund}/expire"})});var at=m.method,of=m.extend({create:at({method:"POST",fullPath:"/v1/tax/registrations"}),retrieve:at({method:"GET",fullPath:"/v1/tax/registrations/{id}"}),update:at({method:"POST",fullPath:"/v1/tax/registrations/{id}"}),list:at({method:"GET",fullPath:"/v1/tax/registrations",methodType:"list"})});var vm=m.method,Mf=m.extend({create:vm({method:"POST",fullPath:"/v1/reporting/report_runs"}),retrieve:vm({method:"GET",fullPath:"/v1/reporting/report_runs/{report_run}"}),list:vm({method:"GET",fullPath:"/v1/reporting/report_runs",methodType:"list"})});var zf=m.method,Lf=m.extend({retrieve:zf({method:"GET",fullPath:"/v1/reporting/report_types/{report_type}"}),list:zf({method:"GET",fullPath:"/v1/reporting/report_types",methodType:"list"})});var em=m.method,Zf=m.extend({create:em({method:"POST",fullPath:"/v1/forwarding/requests"}),retrieve:em({method:"GET",fullPath:"/v1/forwarding/requests/{id}"}),list:em({method:"GET",fullPath:"/v1/forwarding/requests",methodType:"list"})});var Qf=m.method,Xf=m.extend({retrieve:Qf({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs/{scheduled_query_run}"}),list:Qf({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs",methodType:"list"})});var hl=m.method,Jf=m.extend({create:hl({method:"POST",fullPath:"/v1/apps/secrets"}),list:hl({method:"GET",fullPath:"/v1/apps/secrets",methodType:"list"}),deleteWhere:hl({method:"POST",fullPath:"/v1/apps/secrets/delete"}),find:hl({method:"GET",fullPath:"/v1/apps/secrets/find"})});var rv=m.method,Yf=m.extend({create:rv({method:"POST",fullPath:"/v1/billing_portal/sessions"})});var Bh=m.method,Bf=m.extend({create:Bh({method:"POST",fullPath:"/v1/checkout/sessions"}),retrieve:Bh({method:"GET",fullPath:"/v1/checkout/sessions/{session}"}),update:Bh({method:"POST",fullPath:"/v1/checkout/sessions/{session}"}),list:Bh({method:"GET",fullPath:"/v1/checkout/sessions",methodType:"list"}),expire:Bh({method:"POST",fullPath:"/v1/checkout/sessions/{session}/expire"}),listLineItems:Bh({method:"GET",fullPath:"/v1/checkout/sessions/{session}/line_items",methodType:"list"})});var Uf=m.method,Af=m.extend({create:Uf({method:"POST",fullPath:"/v1/financial_connections/sessions"}),retrieve:Uf({method:"GET",fullPath:"/v1/financial_connections/sessions/{session}"})});var Vf=m.method,Wf=m.extend({retrieve:Vf({method:"GET",fullPath:"/v1/tax/settings"}),update:Vf({method:"POST",fullPath:"/v1/tax/settings"})});var Rf=m.method,If=m.extend({retrieve:Rf({method:"GET",fullPath:"/v1/climate/suppliers/{supplier}"}),list:Rf({method:"GET",fullPath:"/v1/climate/suppliers",methodType:"list"})});var ut=m.method,Kf=m.extend({create:ut({method:"POST",fullPath:"/v1/test_helpers/test_clocks"}),retrieve:ut({method:"GET",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),list:ut({method:"GET",fullPath:"/v1/test_helpers/test_clocks",methodType:"list"}),del:ut({method:"DELETE",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),advance:ut({method:"POST",fullPath:"/v1/test_helpers/test_clocks/{test_clock}/advance"})});var _m=m.method,Nf=m.extend({retrieve:_m({method:"GET",fullPath:"/v1/issuing/tokens/{token}"}),update:_m({method:"POST",fullPath:"/v1/issuing/tokens/{token}"}),list:_m({method:"GET",fullPath:"/v1/issuing/tokens",methodType:"list"})});var Df=m.method,Cf=m.extend({retrieve:Df({method:"GET",fullPath:"/v1/treasury/transaction_entries/{id}"}),list:Df({method:"GET",fullPath:"/v1/treasury/transaction_entries",methodType:"list"})});var cm=m.method,Hf=m.extend({createForceCapture:cm({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_force_capture"}),createUnlinkedRefund:cm({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_unlinked_refund"}),refund:cm({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/{transaction}/refund"})});var qf=m.method,$f=m.extend({retrieve:qf({method:"GET",fullPath:"/v1/financial_connections/transactions/{transaction}"}),list:qf({method:"GET",fullPath:"/v1/financial_connections/transactions",methodType:"list"})});var im=m.method,wf=m.extend({retrieve:im({method:"GET",fullPath:"/v1/issuing/transactions/{transaction}"}),update:im({method:"POST",fullPath:"/v1/issuing/transactions/{transaction}"}),list:im({method:"GET",fullPath:"/v1/issuing/transactions",methodType:"list"})});var tl=m.method,kf=m.extend({retrieve:tl({method:"GET",fullPath:"/v1/tax/transactions/{transaction}"}),createFromCalculation:tl({method:"POST",fullPath:"/v1/tax/transactions/create_from_calculation"}),createReversal:tl({method:"POST",fullPath:"/v1/tax/transactions/create_reversal"}),listLineItems:tl({method:"GET",fullPath:"/v1/tax/transactions/{transaction}/line_items",methodType:"list"})});var gf=m.method,yf=m.extend({retrieve:gf({method:"GET",fullPath:"/v1/treasury/transactions/{id}"}),list:gf({method:"GET",fullPath:"/v1/treasury/transactions",methodType:"list"})});var ll=m.method,pf=m.extend({create:ll({method:"POST",fullPath:"/v1/radar/value_list_items"}),retrieve:ll({method:"GET",fullPath:"/v1/radar/value_list_items/{item}"}),list:ll({method:"GET",fullPath:"/v1/radar/value_list_items",methodType:"list"}),del:ll({method:"DELETE",fullPath:"/v1/radar/value_list_items/{item}"})});var ft=m.method,sf=m.extend({create:ft({method:"POST",fullPath:"/v1/radar/value_lists"}),retrieve:ft({method:"GET",fullPath:"/v1/radar/value_lists/{value_list}"}),update:ft({method:"POST",fullPath:"/v1/radar/value_lists/{value_list}"}),list:ft({method:"GET",fullPath:"/v1/radar/value_lists",methodType:"list"}),del:ft({method:"DELETE",fullPath:"/v1/radar/value_lists/{value_list}"})});var rf=m.method,bf=m.extend({retrieve:rf({method:"GET",fullPath:"/v1/identity/verification_reports/{report}"}),list:rf({method:"GET",fullPath:"/v1/identity/verification_reports",methodType:"list"})});var Uh=m.method,jf=m.extend({create:Uh({method:"POST",fullPath:"/v1/identity/verification_sessions"}),retrieve:Uh({method:"GET",fullPath:"/v1/identity/verification_sessions/{session}"}),update:Uh({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}"}),list:Uh({method:"GET",fullPath:"/v1/identity/verification_sessions",methodType:"list"}),cancel:Uh({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/cancel"}),redact:Uh({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/redact"})});var X=m.method,Om=m.extend({create:X({method:"POST",fullPath:"/v1/accounts"}),retrieve(t,...h){if(typeof t==="string")return X({method:"GET",fullPath:"/v1/accounts/{id}"}).apply(this,[t,...h]);else{if(t===null||t===void 0)[].shift.apply([t,...h]);return X({method:"GET",fullPath:"/v1/account"}).apply(this,[t,...h])}},update:X({method:"POST",fullPath:"/v1/accounts/{account}"}),list:X({method:"GET",fullPath:"/v1/accounts",methodType:"list"}),del:X({method:"DELETE",fullPath:"/v1/accounts/{account}"}),createExternalAccount:X({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts"}),createLoginLink:X({method:"POST",fullPath:"/v1/accounts/{account}/login_links"}),createPerson:X({method:"POST",fullPath:"/v1/accounts/{account}/persons"}),deleteExternalAccount:X({method:"DELETE",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),deletePerson:X({method:"DELETE",fullPath:"/v1/accounts/{account}/persons/{person}"}),listCapabilities:X({method:"GET",fullPath:"/v1/accounts/{account}/capabilities",methodType:"list"}),listExternalAccounts:X({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts",methodType:"list"}),listPersons:X({method:"GET",fullPath:"/v1/accounts/{account}/persons",methodType:"list"}),reject:X({method:"POST",fullPath:"/v1/accounts/{account}/reject"}),retrieveCurrent:X({method:"GET",fullPath:"/v1/account"}),retrieveCapability:X({method:"GET",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),retrieveExternalAccount:X({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),retrievePerson:X({method:"GET",fullPath:"/v1/accounts/{account}/persons/{person}"}),updateCapability:X({method:"POST",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),updateExternalAccount:X({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),updatePerson:X({method:"POST",fullPath:"/v1/accounts/{account}/persons/{person}"})});var bv=m.method,af=m.extend({create:bv({method:"POST",fullPath:"/v1/account_links"})});var jv=m.method,hT=m.extend({create:jv({method:"POST",fullPath:"/v1/account_sessions"})});var ml=m.method,tT=m.extend({create:ml({method:"POST",fullPath:"/v1/apple_pay/domains"}),retrieve:ml({method:"GET",fullPath:"/v1/apple_pay/domains/{domain}"}),list:ml({method:"GET",fullPath:"/v1/apple_pay/domains",methodType:"list"}),del:ml({method:"DELETE",fullPath:"/v1/apple_pay/domains/{domain}"})});var Ah=m.method,lT=m.extend({retrieve:Ah({method:"GET",fullPath:"/v1/application_fees/{id}"}),list:Ah({method:"GET",fullPath:"/v1/application_fees",methodType:"list"}),createRefund:Ah({method:"POST",fullPath:"/v1/application_fees/{id}/refunds"}),listRefunds:Ah({method:"GET",fullPath:"/v1/application_fees/{id}/refunds",methodType:"list"}),retrieveRefund:Ah({method:"GET",fullPath:"/v1/application_fees/{fee}/refunds/{id}"}),updateRefund:Ah({method:"POST",fullPath:"/v1/application_fees/{fee}/refunds/{id}"})});var av=m.method,mT=m.extend({retrieve:av({method:"GET",fullPath:"/v1/balance"})});var PT=m.method,uT=m.extend({retrieve:PT({method:"GET",fullPath:"/v1/balance_transactions/{id}"}),list:PT({method:"GET",fullPath:"/v1/balance_transactions",methodType:"list"})});var Vh=m.method,fT=m.extend({create:Vh({method:"POST",fullPath:"/v1/charges"}),retrieve:Vh({method:"GET",fullPath:"/v1/charges/{charge}"}),update:Vh({method:"POST",fullPath:"/v1/charges/{charge}"}),list:Vh({method:"GET",fullPath:"/v1/charges",methodType:"list"}),capture:Vh({method:"POST",fullPath:"/v1/charges/{charge}/capture"}),search:Vh({method:"GET",fullPath:"/v1/charges/search",methodType:"search"})});var he=m.method,TT=m.extend({retrieve:he({method:"GET",fullPath:"/v1/confirmation_tokens/{confirmation_token}"})});var dT=m.method,vT=m.extend({retrieve:dT({method:"GET",fullPath:"/v1/country_specs/{country}"}),list:dT({method:"GET",fullPath:"/v1/country_specs",methodType:"list"})});var Tt=m.method,eT=m.extend({create:Tt({method:"POST",fullPath:"/v1/coupons"}),retrieve:Tt({method:"GET",fullPath:"/v1/coupons/{coupon}"}),update:Tt({method:"POST",fullPath:"/v1/coupons/{coupon}"}),list:Tt({method:"GET",fullPath:"/v1/coupons",methodType:"list"}),del:Tt({method:"DELETE",fullPath:"/v1/coupons/{coupon}"})});var lh=m.method,_T=m.extend({create:lh({method:"POST",fullPath:"/v1/credit_notes"}),retrieve:lh({method:"GET",fullPath:"/v1/credit_notes/{id}"}),update:lh({method:"POST",fullPath:"/v1/credit_notes/{id}"}),list:lh({method:"GET",fullPath:"/v1/credit_notes",methodType:"list"}),listLineItems:lh({method:"GET",fullPath:"/v1/credit_notes/{credit_note}/lines",methodType:"list"}),listPreviewLineItems:lh({method:"GET",fullPath:"/v1/credit_notes/preview/lines",methodType:"list"}),preview:lh({method:"GET",fullPath:"/v1/credit_notes/preview"}),voidCreditNote:lh({method:"POST",fullPath:"/v1/credit_notes/{id}/void"})});var te=m.method,cT=m.extend({create:te({method:"POST",fullPath:"/v1/customer_sessions"})});var z=m.method,iT=m.extend({create:z({method:"POST",fullPath:"/v1/customers"}),retrieve:z({method:"GET",fullPath:"/v1/customers/{customer}"}),update:z({method:"POST",fullPath:"/v1/customers/{customer}"}),list:z({method:"GET",fullPath:"/v1/customers",methodType:"list"}),del:z({method:"DELETE",fullPath:"/v1/customers/{customer}"}),createBalanceTransaction:z({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions"}),createFundingInstructions:z({method:"POST",fullPath:"/v1/customers/{customer}/funding_instructions"}),createSource:z({method:"POST",fullPath:"/v1/customers/{customer}/sources"}),createTaxId:z({method:"POST",fullPath:"/v1/customers/{customer}/tax_ids"}),deleteDiscount:z({method:"DELETE",fullPath:"/v1/customers/{customer}/discount"}),deleteSource:z({method:"DELETE",fullPath:"/v1/customers/{customer}/sources/{id}"}),deleteTaxId:z({method:"DELETE",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),listBalanceTransactions:z({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions",methodType:"list"}),listCashBalanceTransactions:z({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions",methodType:"list"}),listPaymentMethods:z({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods",methodType:"list"}),listSources:z({method:"GET",fullPath:"/v1/customers/{customer}/sources",methodType:"list"}),listTaxIds:z({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids",methodType:"list"}),retrieveBalanceTransaction:z({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),retrieveCashBalance:z({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance"}),retrieveCashBalanceTransaction:z({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions/{transaction}"}),retrievePaymentMethod:z({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods/{payment_method}"}),retrieveSource:z({method:"GET",fullPath:"/v1/customers/{customer}/sources/{id}"}),retrieveTaxId:z({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),search:z({method:"GET",fullPath:"/v1/customers/search",methodType:"search"}),updateBalanceTransaction:z({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),updateCashBalance:z({method:"POST",fullPath:"/v1/customers/{customer}/cash_balance"}),updateSource:z({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}"}),verifySource:z({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}/verify"})});var Pl=m.method,OT=m.extend({retrieve:Pl({method:"GET",fullPath:"/v1/disputes/{dispute}"}),update:Pl({method:"POST",fullPath:"/v1/disputes/{dispute}"}),list:Pl({method:"GET",fullPath:"/v1/disputes",methodType:"list"}),close:Pl({method:"POST",fullPath:"/v1/disputes/{dispute}/close"})});var GT=m.method,nT=m.extend({create:GT({method:"POST",fullPath:"/v1/ephemeral_keys",validator:(t,h)=>{if(!h.headers||!h.headers["Stripe-Version"])throw new Error("Passing apiVersion in a separate options hash is required to create an ephemeral key. See https://stripe.com/docs/api/versioning?lang=node")}}),del:GT({method:"DELETE",fullPath:"/v1/ephemeral_keys/{key}"})});var xT=m.method,FT=m.extend({retrieve:xT({method:"GET",fullPath:"/v1/events/{id}"}),list:xT({method:"GET",fullPath:"/v1/events",methodType:"list"})});var ET=m.method,ST=m.extend({retrieve:ET({method:"GET",fullPath:"/v1/exchange_rates/{rate_id}"}),list:ET({method:"GET",fullPath:"/v1/exchange_rates",methodType:"list"})});var ul=m.method,oT=m.extend({create:ul({method:"POST",fullPath:"/v1/file_links"}),retrieve:ul({method:"GET",fullPath:"/v1/file_links/{link}"}),update:ul({method:"POST",fullPath:"/v1/file_links/{link}"}),list:ul({method:"GET",fullPath:"/v1/file_links",methodType:"list"})});var le=(t,h,l)=>{let P=(Math.round(Math.random()*10000000000000000)+Math.round(Math.random()*10000000000000000)).toString();l["Content-Type"]=`multipart/form-data; boundary=${P}`;let u=new TextEncoder,f=new Uint8Array(0),T=u.encode("\r\n");function v(d){let i=f,_=d instanceof Uint8Array?d:new Uint8Array(u.encode(d));f=new Uint8Array(i.length+_.length+2),f.set(i),f.set(_,i.length),f.set(T,f.length-2)}function e(d){return`"${d.replace(/"|"/g,"%22").replace(/\r\n|\r|\n/g," ")}"`}let c=cu(h);for(let d in c){if(!Object.prototype.hasOwnProperty.call(c,d))continue;let i=c[d];if(v(`--${P}`),Object.prototype.hasOwnProperty.call(i,"data")){let _=i;v(`Content-Disposition: form-data; name=${e(d)}; filename=${e(_.name||"blob")}`),v(`Content-Type: ${_.type||"application/octet-stream"}`),v(""),v(_.data)}else v(`Content-Disposition: form-data; name=${e(d)}`),v(""),v(i)}return v(`--${P}--`),f};function MT(t,h,l,P){if(h=h||{},t!=="POST")return P(null,th(h));this._stripe._platformFunctions.tryBufferData(h).then((u)=>{let f=le(t,u,l);return P(null,f)}).catch((u)=>P(u,null))}var Gm=m.method,zT=m.extend({create:Gm({method:"POST",fullPath:"/v1/files",headers:{"Content-Type":"multipart/form-data"},host:"files.stripe.com"}),retrieve:Gm({method:"GET",fullPath:"/v1/files/{file}"}),list:Gm({method:"GET",fullPath:"/v1/files",methodType:"list"}),requestDataProcessor:MT});var dt=m.method,LT=m.extend({create:dt({method:"POST",fullPath:"/v1/invoiceitems"}),retrieve:dt({method:"GET",fullPath:"/v1/invoiceitems/{invoiceitem}"}),update:dt({method:"POST",fullPath:"/v1/invoiceitems/{invoiceitem}"}),list:dt({method:"GET",fullPath:"/v1/invoiceitems",methodType:"list"}),del:dt({method:"DELETE",fullPath:"/v1/invoiceitems/{invoiceitem}"})});var fl=m.method,ZT=m.extend({retrieve:fl({method:"GET",fullPath:"/v1/invoice_rendering_templates/{template}"}),list:fl({method:"GET",fullPath:"/v1/invoice_rendering_templates",methodType:"list"}),archive:fl({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/archive"}),unarchive:fl({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/unarchive"})});var V=m.method,QT=m.extend({create:V({method:"POST",fullPath:"/v1/invoices"}),retrieve:V({method:"GET",fullPath:"/v1/invoices/{invoice}"}),update:V({method:"POST",fullPath:"/v1/invoices/{invoice}"}),list:V({method:"GET",fullPath:"/v1/invoices",methodType:"list"}),del:V({method:"DELETE",fullPath:"/v1/invoices/{invoice}"}),addLines:V({method:"POST",fullPath:"/v1/invoices/{invoice}/add_lines"}),createPreview:V({method:"POST",fullPath:"/v1/invoices/create_preview"}),finalizeInvoice:V({method:"POST",fullPath:"/v1/invoices/{invoice}/finalize"}),listLineItems:V({method:"GET",fullPath:"/v1/invoices/{invoice}/lines",methodType:"list"}),listUpcomingLines:V({method:"GET",fullPath:"/v1/invoices/upcoming/lines",methodType:"list"}),markUncollectible:V({method:"POST",fullPath:"/v1/invoices/{invoice}/mark_uncollectible"}),pay:V({method:"POST",fullPath:"/v1/invoices/{invoice}/pay"}),removeLines:V({method:"POST",fullPath:"/v1/invoices/{invoice}/remove_lines"}),retrieveUpcoming:V({method:"GET",fullPath:"/v1/invoices/upcoming"}),search:V({method:"GET",fullPath:"/v1/invoices/search",methodType:"search"}),sendInvoice:V({method:"POST",fullPath:"/v1/invoices/{invoice}/send"}),updateLines:V({method:"POST",fullPath:"/v1/invoices/{invoice}/update_lines"}),updateLineItem:V({method:"POST",fullPath:"/v1/invoices/{invoice}/lines/{line_item_id}"}),voidInvoice:V({method:"POST",fullPath:"/v1/invoices/{invoice}/void"})});var me=m.method,XT=m.extend({retrieve:me({method:"GET",fullPath:"/v1/mandates/{mandate}"})});var JT=m.method,nm="connect.stripe.com",YT=m.extend({basePath:"/",authorizeUrl(t,h){t=t||{},h=h||{};let l="oauth/authorize";if(h.express)l=`express/${l}`;if(!t.response_type)t.response_type="code";if(!t.client_id)t.client_id=this._stripe.getClientId();if(!t.scope)t.scope="read_write";return`https://${nm}/${l}?${th(t)}`},token:JT({method:"POST",path:"oauth/token",host:nm}),deauthorize(t,...h){if(!t.client_id)t.client_id=this._stripe.getClientId();return JT({method:"POST",path:"oauth/deauthorize",host:nm}).apply(this,[t,...h])}});var D=m.method,BT=m.extend({create:D({method:"POST",fullPath:"/v1/payment_intents"}),retrieve:D({method:"GET",fullPath:"/v1/payment_intents/{intent}"}),update:D({method:"POST",fullPath:"/v1/payment_intents/{intent}"}),list:D({method:"GET",fullPath:"/v1/payment_intents",methodType:"list"}),applyCustomerBalance:D({method:"POST",fullPath:"/v1/payment_intents/{intent}/apply_customer_balance"}),cancel:D({method:"POST",fullPath:"/v1/payment_intents/{intent}/cancel"}),capture:D({method:"POST",fullPath:"/v1/payment_intents/{intent}/capture"}),confirm:D({method:"POST",fullPath:"/v1/payment_intents/{intent}/confirm"}),incrementAuthorization:D({method:"POST",fullPath:"/v1/payment_intents/{intent}/increment_authorization"}),search:D({method:"GET",fullPath:"/v1/payment_intents/search",methodType:"search"}),verifyMicrodeposits:D({method:"POST",fullPath:"/v1/payment_intents/{intent}/verify_microdeposits"})});var vt=m.method,UT=m.extend({create:vt({method:"POST",fullPath:"/v1/payment_links"}),retrieve:vt({method:"GET",fullPath:"/v1/payment_links/{payment_link}"}),update:vt({method:"POST",fullPath:"/v1/payment_links/{payment_link}"}),list:vt({method:"GET",fullPath:"/v1/payment_links",methodType:"list"}),listLineItems:vt({method:"GET",fullPath:"/v1/payment_links/{payment_link}/line_items",methodType:"list"})});var Tl=m.method,AT=m.extend({create:Tl({method:"POST",fullPath:"/v1/payment_method_configurations"}),retrieve:Tl({method:"GET",fullPath:"/v1/payment_method_configurations/{configuration}"}),update:Tl({method:"POST",fullPath:"/v1/payment_method_configurations/{configuration}"}),list:Tl({method:"GET",fullPath:"/v1/payment_method_configurations",methodType:"list"})});var et=m.method,VT=m.extend({create:et({method:"POST",fullPath:"/v1/payment_method_domains"}),retrieve:et({method:"GET",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),update:et({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),list:et({method:"GET",fullPath:"/v1/payment_method_domains",methodType:"list"}),validate:et({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}/validate"})});var Wh=m.method,WT=m.extend({create:Wh({method:"POST",fullPath:"/v1/payment_methods"}),retrieve:Wh({method:"GET",fullPath:"/v1/payment_methods/{payment_method}"}),update:Wh({method:"POST",fullPath:"/v1/payment_methods/{payment_method}"}),list:Wh({method:"GET",fullPath:"/v1/payment_methods",methodType:"list"}),attach:Wh({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/attach"}),detach:Wh({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/detach"})});var Rh=m.method,RT=m.extend({create:Rh({method:"POST",fullPath:"/v1/payouts"}),retrieve:Rh({method:"GET",fullPath:"/v1/payouts/{payout}"}),update:Rh({method:"POST",fullPath:"/v1/payouts/{payout}"}),list:Rh({method:"GET",fullPath:"/v1/payouts",methodType:"list"}),cancel:Rh({method:"POST",fullPath:"/v1/payouts/{payout}/cancel"}),reverse:Rh({method:"POST",fullPath:"/v1/payouts/{payout}/reverse"})});var _t=m.method,IT=m.extend({create:_t({method:"POST",fullPath:"/v1/plans"}),retrieve:_t({method:"GET",fullPath:"/v1/plans/{plan}"}),update:_t({method:"POST",fullPath:"/v1/plans/{plan}"}),list:_t({method:"GET",fullPath:"/v1/plans",methodType:"list"}),del:_t({method:"DELETE",fullPath:"/v1/plans/{plan}"})});var ct=m.method,KT=m.extend({create:ct({method:"POST",fullPath:"/v1/prices"}),retrieve:ct({method:"GET",fullPath:"/v1/prices/{price}"}),update:ct({method:"POST",fullPath:"/v1/prices/{price}"}),list:ct({method:"GET",fullPath:"/v1/prices",methodType:"list"}),search:ct({method:"GET",fullPath:"/v1/prices/search",methodType:"search"})});var p=m.method,NT=m.extend({create:p({method:"POST",fullPath:"/v1/products"}),retrieve:p({method:"GET",fullPath:"/v1/products/{id}"}),update:p({method:"POST",fullPath:"/v1/products/{id}"}),list:p({method:"GET",fullPath:"/v1/products",methodType:"list"}),del:p({method:"DELETE",fullPath:"/v1/products/{id}"}),createFeature:p({method:"POST",fullPath:"/v1/products/{product}/features"}),deleteFeature:p({method:"DELETE",fullPath:"/v1/products/{product}/features/{id}"}),listFeatures:p({method:"GET",fullPath:"/v1/products/{product}/features",methodType:"list"}),retrieveFeature:p({method:"GET",fullPath:"/v1/products/{product}/features/{id}"}),search:p({method:"GET",fullPath:"/v1/products/search",methodType:"search"})});var dl=m.method,DT=m.extend({create:dl({method:"POST",fullPath:"/v1/promotion_codes"}),retrieve:dl({method:"GET",fullPath:"/v1/promotion_codes/{promotion_code}"}),update:dl({method:"POST",fullPath:"/v1/promotion_codes/{promotion_code}"}),list:dl({method:"GET",fullPath:"/v1/promotion_codes",methodType:"list"})});var s=m.method,CT=m.extend({create:s({method:"POST",fullPath:"/v1/quotes"}),retrieve:s({method:"GET",fullPath:"/v1/quotes/{quote}"}),update:s({method:"POST",fullPath:"/v1/quotes/{quote}"}),list:s({method:"GET",fullPath:"/v1/quotes",methodType:"list"}),accept:s({method:"POST",fullPath:"/v1/quotes/{quote}/accept"}),cancel:s({method:"POST",fullPath:"/v1/quotes/{quote}/cancel"}),finalizeQuote:s({method:"POST",fullPath:"/v1/quotes/{quote}/finalize"}),listComputedUpfrontLineItems:s({method:"GET",fullPath:"/v1/quotes/{quote}/computed_upfront_line_items",methodType:"list"}),listLineItems:s({method:"GET",fullPath:"/v1/quotes/{quote}/line_items",methodType:"list"}),pdf:s({method:"GET",fullPath:"/v1/quotes/{quote}/pdf",host:"files.stripe.com",streaming:!0})});var it=m.method,HT=m.extend({create:it({method:"POST",fullPath:"/v1/refunds"}),retrieve:it({method:"GET",fullPath:"/v1/refunds/{refund}"}),update:it({method:"POST",fullPath:"/v1/refunds/{refund}"}),list:it({method:"GET",fullPath:"/v1/refunds",methodType:"list"}),cancel:it({method:"POST",fullPath:"/v1/refunds/{refund}/cancel"})});var xm=m.method,qT=m.extend({retrieve:xm({method:"GET",fullPath:"/v1/reviews/{review}"}),list:xm({method:"GET",fullPath:"/v1/reviews",methodType:"list"}),approve:xm({method:"POST",fullPath:"/v1/reviews/{review}/approve"})});var Pe=m.method,$T=m.extend({list:Pe({method:"GET",fullPath:"/v1/setup_attempts",methodType:"list"})});var _h=m.method,wT=m.extend({create:_h({method:"POST",fullPath:"/v1/setup_intents"}),retrieve:_h({method:"GET",fullPath:"/v1/setup_intents/{intent}"}),update:_h({method:"POST",fullPath:"/v1/setup_intents/{intent}"}),list:_h({method:"GET",fullPath:"/v1/setup_intents",methodType:"list"}),cancel:_h({method:"POST",fullPath:"/v1/setup_intents/{intent}/cancel"}),confirm:_h({method:"POST",fullPath:"/v1/setup_intents/{intent}/confirm"}),verifyMicrodeposits:_h({method:"POST",fullPath:"/v1/setup_intents/{intent}/verify_microdeposits"})});var vl=m.method,kT=m.extend({create:vl({method:"POST",fullPath:"/v1/shipping_rates"}),retrieve:vl({method:"GET",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),update:vl({method:"POST",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),list:vl({method:"GET",fullPath:"/v1/shipping_rates",methodType:"list"})});var Ot=m.method,gT=m.extend({create:Ot({method:"POST",fullPath:"/v1/sources"}),retrieve:Ot({method:"GET",fullPath:"/v1/sources/{source}"}),update:Ot({method:"POST",fullPath:"/v1/sources/{source}"}),listSourceTransactions:Ot({method:"GET",fullPath:"/v1/sources/{source}/source_transactions",methodType:"list"}),verify:Ot({method:"POST",fullPath:"/v1/sources/{source}/verify"})});var ch=m.method,yT=m.extend({create:ch({method:"POST",fullPath:"/v1/subscription_items"}),retrieve:ch({method:"GET",fullPath:"/v1/subscription_items/{item}"}),update:ch({method:"POST",fullPath:"/v1/subscription_items/{item}"}),list:ch({method:"GET",fullPath:"/v1/subscription_items",methodType:"list"}),del:ch({method:"DELETE",fullPath:"/v1/subscription_items/{item}"}),createUsageRecord:ch({method:"POST",fullPath:"/v1/subscription_items/{subscription_item}/usage_records"}),listUsageRecordSummaries:ch({method:"GET",fullPath:"/v1/subscription_items/{subscription_item}/usage_record_summaries",methodType:"list"})});var Ih=m.method,pT=m.extend({create:Ih({method:"POST",fullPath:"/v1/subscription_schedules"}),retrieve:Ih({method:"GET",fullPath:"/v1/subscription_schedules/{schedule}"}),update:Ih({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}"}),list:Ih({method:"GET",fullPath:"/v1/subscription_schedules",methodType:"list"}),cancel:Ih({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/cancel"}),release:Ih({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/release"})});var mh=m.method,sT=m.extend({create:mh({method:"POST",fullPath:"/v1/subscriptions"}),retrieve:mh({method:"GET",fullPath:"/v1/subscriptions/{subscription_exposed_id}"}),update:mh({method:"POST",fullPath:"/v1/subscriptions/{subscription_exposed_id}"}),list:mh({method:"GET",fullPath:"/v1/subscriptions",methodType:"list"}),cancel:mh({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}"}),deleteDiscount:mh({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}/discount"}),resume:mh({method:"POST",fullPath:"/v1/subscriptions/{subscription}/resume"}),search:mh({method:"GET",fullPath:"/v1/subscriptions/search",methodType:"search"})});var rT=m.method,bT=m.extend({retrieve:rT({method:"GET",fullPath:"/v1/tax_codes/{id}"}),list:rT({method:"GET",fullPath:"/v1/tax_codes",methodType:"list"})});var el=m.method,jT=m.extend({create:el({method:"POST",fullPath:"/v1/tax_ids"}),retrieve:el({method:"GET",fullPath:"/v1/tax_ids/{id}"}),list:el({method:"GET",fullPath:"/v1/tax_ids",methodType:"list"}),del:el({method:"DELETE",fullPath:"/v1/tax_ids/{id}"})});var _l=m.method,aT=m.extend({create:_l({method:"POST",fullPath:"/v1/tax_rates"}),retrieve:_l({method:"GET",fullPath:"/v1/tax_rates/{tax_rate}"}),update:_l({method:"POST",fullPath:"/v1/tax_rates/{tax_rate}"}),list:_l({method:"GET",fullPath:"/v1/tax_rates",methodType:"list"})});var h1=m.method,t1=m.extend({create:h1({method:"POST",fullPath:"/v1/tokens"}),retrieve:h1({method:"GET",fullPath:"/v1/tokens/{token}"})});var Gt=m.method,l1=m.extend({create:Gt({method:"POST",fullPath:"/v1/topups"}),retrieve:Gt({method:"GET",fullPath:"/v1/topups/{topup}"}),update:Gt({method:"POST",fullPath:"/v1/topups/{topup}"}),list:Gt({method:"GET",fullPath:"/v1/topups",methodType:"list"}),cancel:Gt({method:"POST",fullPath:"/v1/topups/{topup}/cancel"})});var Ph=m.method,m1=m.extend({create:Ph({method:"POST",fullPath:"/v1/transfers"}),retrieve:Ph({method:"GET",fullPath:"/v1/transfers/{transfer}"}),update:Ph({method:"POST",fullPath:"/v1/transfers/{transfer}"}),list:Ph({method:"GET",fullPath:"/v1/transfers",methodType:"list"}),createReversal:Ph({method:"POST",fullPath:"/v1/transfers/{id}/reversals"}),listReversals:Ph({method:"GET",fullPath:"/v1/transfers/{id}/reversals",methodType:"list"}),retrieveReversal:Ph({method:"GET",fullPath:"/v1/transfers/{transfer}/reversals/{id}"}),updateReversal:Ph({method:"POST",fullPath:"/v1/transfers/{transfer}/reversals/{id}"})});var ue=m.method,P1=m.extend({create:ue({method:"POST",fullPath:"/v2/billing/meter_event_session"})});var fe=m.method,u1=m.extend({create:fe({method:"POST",fullPath:"/v2/billing/meter_event_adjustments"})});var Te=m.method,f1=m.extend({create:Te({method:"POST",fullPath:"/v2/billing/meter_event_stream",host:"meter-events.stripe.com"})});var de=m.method,T1=m.extend({create:de({method:"POST",fullPath:"/v2/billing/meter_events"})});var d1=m.extend({constructor:function(...t){m.apply(this,t),this.meterEventSession=new P1(...t),this.meterEventAdjustments=new u1(...t),this.meterEventStream=new f1(...t),this.meterEvents=new T1(...t)}});var Fm=m.method,v1=m.extend({retrieve(...t){return Fm({method:"GET",fullPath:"/v2/core/events/{id}",transformResponseData:(l)=>{return this.addFetchRelatedObjectIfNeeded(l)}}).apply(this,t)},list(...t){return Fm({method:"GET",fullPath:"/v2/core/events",methodType:"list",transformResponseData:(l)=>{return Object.assign(Object.assign({},l),{data:l.data.map(this.addFetchRelatedObjectIfNeeded.bind(this))})}}).apply(this,t)},addFetchRelatedObjectIfNeeded(t){if(!t.related_object||!t.related_object.url)return t;return Object.assign(Object.assign({},t),{fetchRelatedObject:()=>Fm({method:"GET",fullPath:t.related_object.url}).apply(this,[{stripeAccount:t.context}])})}});var e1=m.extend({constructor:function(...t){m.apply(this,t),this.events=new v1(...t)}});var _1=m.extend({constructor:function(...t){m.apply(this,t),this.billing=new d1(...t),this.core=new e1(...t)}});var nt=m.method,c1=m.extend({create:nt({method:"POST",fullPath:"/v1/webhook_endpoints"}),retrieve:nt({method:"GET",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),update:nt({method:"POST",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),list:nt({method:"GET",fullPath:"/v1/webhook_endpoints",methodType:"list"}),del:nt({method:"DELETE",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"})});var ve=J("apps",{Secrets:Jf}),ee=J("billing",{Alerts:Zu,CreditBalanceSummary:Iu,CreditBalanceTransactions:Nu,CreditGrants:Du,MeterEventAdjustments:bu,MeterEvents:ju,Meters:au}),_e=J("billingPortal",{Configurations:Au,Sessions:Yf}),ce=J("checkout",{Sessions:Bf}),ie=J("climate",{Orders:hf,Products:ef,Suppliers:If}),Oe=J("entitlements",{ActiveEntitlements:Lu,Features:gu}),Ge=J("financialConnections",{Accounts:Mu,Sessions:Af,Transactions:$f}),ne=J("forwarding",{Requests:Zf}),xe=J("identity",{VerificationReports:bf,VerificationSessions:jf}),Fe=J("issuing",{Authorizations:Xu,Cardholders:Yu,Cards:Uu,Disputes:$u,PersonalizationDesigns:ff,PhysicalBundles:df,Tokens:Nf,Transactions:wf}),Ee=J("radar",{EarlyFraudWarnings:ku,ValueListItems:pf,ValueLists:sf}),Se=J("reporting",{ReportRuns:Mf,ReportTypes:Lf}),oe=J("sigma",{ScheduledQueryRuns:Xf}),Me=J("tax",{Calculations:Ju,Registrations:of,Settings:Wf,Transactions:kf}),ze=J("terminal",{Configurations:Vu,ConnectionTokens:Ru,Locations:ru,Readers:cf}),Le=J("testHelpers",{ConfirmationTokens:Wu,Customers:Hu,Refunds:Sf,TestClocks:Kf,Issuing:J("issuing",{Authorizations:Qu,Cards:Bu,PersonalizationDesigns:uf,Transactions:Hf}),Terminal:J("terminal",{Readers:_f}),Treasury:J("treasury",{InboundTransfers:pu,OutboundPayments:tf,OutboundTransfers:mf,ReceivedCredits:Of,ReceivedDebits:xf})}),Ze=J("treasury",{CreditReversals:Cu,DebitReversals:qu,FinancialAccounts:yu,InboundTransfers:su,OutboundPayments:lf,OutboundTransfers:Pf,ReceivedCredits:nf,ReceivedDebits:Ef,TransactionEntries:Cf,Transactions:yf});var i1="api.stripe.com",O1="443",G1="/v1/",n1=ou,x1=80000,F1=5,E1=0.5,Qe=["name","version","url","partner_id"],S1=["authenticator","apiVersion","typescript","maxNetworkRetries","httpAgent","httpClient","timeout","host","port","protocol","telemetry","appInfo","stripeAccount","stripeContext"],Xe=(t)=>new Zh(t,m.MAX_BUFFERED_REQUEST_METRICS);function o1(t,h=Xe){P.PACKAGE_VERSION="17.2.0",P.USER_AGENT=Object.assign({bindings_version:P.PACKAGE_VERSION,lang:"node",publisher:"stripe",uname:null,typescript:!1},iu()),P.StripeResource=m,P.resources=Kh,P.HttpClient=K,P.HttpClientResponse=Dh,P.CryptoProvider=Hh;function l(u=t){return mm(u)}P.webhooks=Object.assign(l,mm(t));function P(u,f={}){if(!(this instanceof P))return new P(u,f);let T=this._getPropsFromConfig(f);this._platformFunctions=t,Object.defineProperty(this,"_emitter",{value:this._platformFunctions.createEmitter(),enumerable:!1,configurable:!1,writable:!1}),this.VERSION=P.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=T.httpAgent||null;this._api={host:T.host||i1,port:T.port||O1,protocol:T.protocol||"https",basePath:G1,version:T.apiVersion||n1,timeout:Ht("timeout",T.timeout,x1),maxNetworkRetries:Ht("maxNetworkRetries",T.maxNetworkRetries,2),agent:v,httpClient:T.httpClient||(v?this._platformFunctions.createNodeHttpClient(v):this._platformFunctions.createDefaultHttpClient()),dev:!1,stripeAccount:T.stripeAccount||null,stripeContext:T.stripeContext||null};let e=T.typescript||!1;if(e!==P.USER_AGENT.typescript)P.USER_AGENT.typescript=e;if(T.appInfo)this._setAppInfo(T.appInfo);this._prepResources(),this._setAuthenticator(u,T.authenticator),this.errors=ot,this.webhooks=l(),this._prevRequestMetrics=[],this._enableTelemetry=T.telemetry!==!1,this._requestSender=h(this),this.StripeResource=P.StripeResource}return P.errors=ot,P.createNodeHttpClient=t.createNodeHttpClient,P.createFetchHttpClient=t.createFetchHttpClient,P.createNodeCryptoProvider=t.createNodeCryptoProvider,P.createSubtleCryptoProvider=t.createSubtleCryptoProvider,P.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(u,f,T,v){return this._requestSender._rawRequest(u,f,T,v)},_setAuthenticator(u,f){if(u&&f)throw new Error("Can't specify both apiKey and authenticator");if(!u&&!f)throw new Error("Neither apiKey nor config.authenticator provided");this._authenticator=u?Kt(u):f},_setAppInfo(u){if(u&&typeof u!=="object")throw new Error("AppInfo must be an object.");if(u&&!u.name)throw new Error("AppInfo.name is required");u=u||{},this._appInfo=Qe.reduce((f,T)=>{if(typeof u[T]=="string")f=f||{},f[T]=u[T];return f},void 0)},_setApiField(u,f){this._api[u]=f},getApiField(u){return this._api[u]},setClientId(u){this._clientId=u},getClientId(){return this._clientId},getConstant:(u)=>{switch(u){case"DEFAULT_HOST":return i1;case"DEFAULT_PORT":return O1;case"DEFAULT_BASE_PATH":return G1;case"DEFAULT_API_VERSION":return n1;case"DEFAULT_TIMEOUT":return x1;case"MAX_NETWORK_RETRY_DELAY_SEC":return F1;case"INITIAL_NETWORK_RETRY_DELAY_SEC":return E1}return P[u]},getMaxNetworkRetries(){return this.getApiField("maxNetworkRetries")},_setApiNumberField(u,f,T){let v=Ht(u,f,T);this._setApiField(u,v)},getMaxNetworkRetryDelay(){return F1},getInitialNetworkRetryDelay(){return E1},getClientUserAgent(u){return this.getClientUserAgentSeeded(P.USER_AGENT,u)},getClientUserAgentSeeded(u,f){this._platformFunctions.getUname().then((T)=>{var v;let e={};for(let d in u){if(!Object.prototype.hasOwnProperty.call(u,d))continue;e[d]=encodeURIComponent((v=u[d])!==null&&v!==void 0?v:"null")}e.uname=encodeURIComponent(T||"UNKNOWN");let c=this.getApiField("httpClient");if(c)e.httplib=encodeURIComponent(c.getClientName());if(this._appInfo)e.application=this._appInfo;f(JSON.stringify(e))})},getAppInfoAsString(){if(!this._appInfo)return"";let u=this._appInfo.name;if(this._appInfo.version)u+=`/${this._appInfo.version}`;if(this._appInfo.url)u+=` (${this._appInfo.url})`;return u},getTelemetryEnabled(){return this._enableTelemetry},_prepResources(){for(let u in Kh){if(!Object.prototype.hasOwnProperty.call(Kh,u))continue;this[_u(u)]=new Kh[u](this)}},_getPropsFromConfig(u){if(!u)return{};let f=typeof u==="string";if(!(u===Object(u)&&!Array.isArray(u))&&!f)throw new Error("Config must either be an object or a string");if(f)return{apiVersion:u};if(Object.keys(u).filter((e)=>!S1.includes(e)).length>0)throw new Error(`Config object may only contain the following: ${S1.join(", ")}`);return u},parseThinEvent(u,f,T,v,e,c){return this.webhooks.constructEvent(u,f,T,v,e,c)}},P}var Je=o1(new ol),M1=Je;var Ye="",Y=new M1(Ye,{apiVersion:"2024-06-20"}),Be=(()=>{async function t(u){return await Y.paymentIntents.create(u)}async function h(u){return await Y.paymentIntents.retrieve(u)}async function l(u,f){return await Y.paymentIntents.update(u,f)}async function P(u){return await Y.paymentIntents.cancel(u)}return{create:t,retrieve:h,update:l,cancel:P}})(),Ue=(()=>{async function t(){return await Y.balance.retrieve()}return{retrieve:t}})(),Ae=(()=>{async function t(P){return await Y.customers.create(P)}async function h(P,u){return await Y.customers.update(P,u)}async function l(P){return await Y.customers.retrieve(P)}return{create:t,update:h,retrieve:l}})(),Ve=(()=>{async function t(u){return await Y.charges.create(u)}async function h(u,f){return await Y.charges.update(u,f)}async function l(u){return await Y.charges.capture(u)}async function P(u){return await Y.charges.retrieve(u)}return{create:t,update:h,retrieve:P,capture:l}})(),We=(()=>{async function t(l){return await Y.balanceTransactions.retrieve(l)}async function h(l){return await Y.balanceTransactions.list({limit:l})}return{retrieve:t,list:h}})(),Re=(()=>{async function t(u){return await Y.disputes.retrieve(u)}async function h(u,f){return await Y.disputes.update(u,f)}async function l(u){return await Y.disputes.close(u)}async function P(u){return await Y.disputes.list({limit:u})}return{retrieve:t,update:h,close:l,list:P}})(),Ie=(()=>{async function t(l){return await Y.events.retrieve(l)}async function h(l){return await Y.events.list({limit:l})}return{retrieve:t,list:h}})();export{z1 as stripe};
|