snaptrade-typescript-sdk 12.2.18 → 12.2.20

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.
@@ -1,11 +1,11 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.client={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r};function r(e,t){return function(){return e.apply(t,arguments)}}let{toString:i}=Object.prototype,{getPrototypeOf:a}=Object,{iterator:o,toStringTag:s}=Symbol,c=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),l=(e,t)=>{let n=e,r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),c(n,t))return!0;n=a(n)}return!1},u=(e,t)=>e!=null&&l(e,t)?e[t]:void 0,d=(e=>t=>{let n=i.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),f=e=>(e=e.toLowerCase(),t=>d(t)===e),p=e=>t=>typeof t===e,{isArray:m}=Array,h=p(`undefined`);function g(e){return e!==null&&!h(e)&&e.constructor!==null&&!h(e.constructor)&&v(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let _=f(`ArrayBuffer`);function ee(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&_(e.buffer),t}let te=p(`string`),v=p(`function`),y=p(`number`),b=e=>typeof e==`object`&&!!e,ne=e=>e===!0||e===!1,x=e=>{if(!b(e))return!1;let t=a(e);return(t===null||t===Object.prototype||a(t)===null)&&!l(e,s)&&!l(e,o)},re=e=>{if(!b(e)||g(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ie=f(`Date`),ae=f(`File`),oe=e=>!!(e&&e.uri!==void 0),se=e=>e&&e.getParts!==void 0,S=f(`Blob`),C=f(`FileList`),w=e=>b(e)&&v(e.pipe);function ce(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}let T=ce(),le=T.FormData===void 0?void 0:T.FormData,ue=e=>{if(!e)return!1;if(le&&e instanceof le)return!0;let t=a(e);if(!t||t===Object.prototype||!v(e.append))return!1;let n=d(e);return n===`formdata`||n===`object`&&v(e.toString)&&e.toString()===`[object FormData]`},de=f(`URLSearchParams`),[E,fe,pe,D]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(f),me=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function he(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),m(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(g(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function ge(e,t){if(g(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}let O=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,_e=e=>!h(e)&&e!==O;function ve(...e){let{caseless:t,skipUndefined:n}=_e(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&typeof i==`string`&&ge(r,i)||i,o=c(r,a)?r[a]:void 0;x(o)&&x(e)?r[a]=ve(o,e):x(e)?r[a]=ve({},e):m(e)?r[a]=e.slice():(!n||!h(e))&&(r[a]=e)};for(let t=0,n=e.length;t<n;t++){let n=e[t];if(!n||g(n)||(he(n,i),typeof n!=`object`||m(n)))continue;let r=Object.getOwnPropertySymbols(n);for(let e=0;e<r.length;e++){let t=r[e];Ae.call(n,t)&&i(n[t],t)}}return r}let ye=(e,t,n,{allOwnKeys:i}={})=>(he(t,(t,i)=>{n&&v(t)?Object.defineProperty(e,i,{__proto__:null,value:r(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),e),be=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),xe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,`constructor`,{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,`super`,{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Se=(e,t,n,r)=>{let i,o,s,c={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!c[s]&&(t[s]=e[s],c[s]=!0);e=n!==!1&&a(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ce=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},we=e=>{if(!e)return null;if(m(e))return e;let t=e.length;if(!y(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},Te=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&a(Uint8Array)),Ee=(e,t)=>{let n=(e&&e[o]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},De=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Oe=f(`HTMLFormElement`),ke=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),{propertyIsEnumerable:Ae}=Object.prototype,je=f(`RegExp`),Me=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};he(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},Ne=e=>{Me(e,(t,n)=>{if(v(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(v(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)})}})},Pe=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return m(e)?r(e):r(String(e).split(t)),n},Fe=()=>{},Ie=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Le(e){return!!(e&&v(e.append)&&e[s]===`FormData`&&e[o])}let Re=e=>{let t=new WeakSet,n=e=>{if(b(e)){if(t.has(e))return;if(g(e))return e;if(!(`toJSON`in e)){t.add(e);let r=m(e)?[]:{};return he(e,(e,t)=>{let i=n(e);!h(i)&&(r[t]=i)}),t.delete(e),r}}return e};return n(e)},ze=f(`AsyncFunction`),Be=e=>e&&(b(e)||v(e))&&v(e.then)&&v(e.catch),Ve=((e,t)=>e?setImmediate:t?((e,t)=>(O.addEventListener(`message`,({source:n,data:r})=>{n===O&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),O.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,v(O.postMessage)),He=typeof queueMicrotask<`u`?queueMicrotask.bind(O):typeof process<`u`&&process.nextTick||Ve,Ue=e=>e!=null&&v(e[o]);var k={isArray:m,isArrayBuffer:_,isBuffer:g,isFormData:ue,isArrayBufferView:ee,isString:te,isNumber:y,isBoolean:ne,isObject:b,isPlainObject:x,isEmptyObject:re,isReadableStream:E,isRequest:fe,isResponse:pe,isHeaders:D,isUndefined:h,isDate:ie,isFile:ae,isReactNativeBlob:oe,isReactNative:se,isBlob:S,isRegExp:je,isFunction:v,isStream:w,isURLSearchParams:de,isTypedArray:Te,isFileList:C,forEach:he,merge:ve,extend:ye,trim:me,stripBOM:be,inherits:xe,toFlatObject:Se,kindOf:d,kindOfTest:f,endsWith:Ce,toArray:we,forEachEntry:Ee,matchAll:De,isHTMLForm:Oe,hasOwnProperty:c,hasOwnProp:c,hasOwnInPrototypeChain:l,getSafeProp:u,reduceDescriptors:Me,freezeMethods:Ne,toObjectSet:Pe,toCamelCase:ke,noop:Fe,toFiniteNumber:Ie,findKey:ge,global:O,isContextDefined:_e,isSpecCompliantForm:Le,toJSONObject:Re,isAsyncFn:ze,isThenable:Be,setImmediate:Ve,asap:He,isIterable:Ue,isSafeIterable:e=>e!=null&&l(e,o)&&Ue(e)};let We=k.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]);var Ge=e=>{let t={},n,r,i;return e&&e.split(`
2
- `).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&We[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t};function Ke(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}let qe=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),Je=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function Ye(e,t){return k.isArray(e)?e.map(e=>Ye(e,t)):Ke(String(e).replace(t,``))}let Xe=e=>Ye(e,qe),Ze=e=>Ye(e,Je);function Qe(e){let t=Object.create(null);return k.forEach(e.toJSON(),(e,n)=>{t[n]=Ze(e)}),t}let $e=Symbol(`internals`);function et(e){return e&&String(e).trim().toLowerCase()}function tt(e){return e===!1||e==null?e:k.isArray(e)?e.map(tt):Xe(String(e))}function nt(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}let rt=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function it(e,t,n,r,i){if(k.isFunction(r))return r.call(this,t,n);if(i&&(t=n),k.isString(t)){if(k.isString(r))return t.indexOf(r)!==-1;if(k.isRegExp(r))return r.test(t)}}function at(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function ot(e,t){let n=k.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var A=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=et(t);if(!i)return;let a=k.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=tt(e))}let a=(e,t)=>k.forEach(e,(e,n)=>i(e,n,t));if(k.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(k.isString(e)&&(e=e.trim())&&!rt(e))a(Ge(e),t);else if(k.isObject(e)&&k.isSafeIterable(e)){let n=Object.create(null),r,i;for(let t of e){if(!k.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);i=t[0],k.hasOwnProp(n,i)?(r=n[i],n[i]=k.isArray(r)?[...r,t[1]]:[r,t[1]]):n[i]=t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=et(e),e){let n=k.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return nt(e);if(k.isFunction(t))return t.call(this,e,n);if(k.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=et(e),e){let n=k.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||it(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=et(e),e){let i=k.findKey(n,e);i&&(!t||it(n,n[i],i,t))&&(delete n[i],r=!0)}}return k.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||it(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return k.forEach(this,(r,i)=>{let a=k.findKey(n,i);if(a){t[a]=tt(r),delete t[i];return}let o=e?at(i):String(i).trim();o!==i&&delete t[i],t[o]=tt(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return k.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&k.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(`
3
- `)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[$e]=this[$e]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=et(e);t[r]||(ot(n,e),t[r]=!0)}return k.isArray(e)?e.forEach(r):r(e),this}};A.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),k.reduceDescriptors(A.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),k.freezeMethods(A);function st(e){if(k.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(k.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function ct(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||k.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof A&&(e=e.toJSON()),r.push(e);let t;if(k.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);k.isUndefined(r)||(t[n]=r)});else{if(!k.isPlainObject(e)&&st(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?`[REDACTED ****]`:i(a);k.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}var j=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,`message`,{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&k.hasOwnProp(e,`redact`)?e.redact:void 0,n=k.isArray(t)&&t.length>0?ct(e,t):k.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};j.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,j.ERR_BAD_OPTION=`ERR_BAD_OPTION`,j.ECONNABORTED=`ECONNABORTED`,j.ETIMEDOUT=`ETIMEDOUT`,j.ECONNREFUSED=`ECONNREFUSED`,j.ERR_NETWORK=`ERR_NETWORK`,j.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,j.ERR_DEPRECATED=`ERR_DEPRECATED`,j.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,j.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,j.ERR_CANCELED=`ERR_CANCELED`,j.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,j.ERR_INVALID_URL=`ERR_INVALID_URL`,j.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function lt(e){return k.isPlainObject(e)||k.isArray(e)}function ut(e){return k.endsWith(e,`[]`)?e.slice(0,-2):e}function dt(e,t,n){return e?e.concat(t).map(function(e,t){return e=ut(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function ft(e){return k.isArray(e)&&!e.some(lt)}let pt=k.toFlatObject(k,{},null,function(e){return/^is[A-Z]/.test(e)});function mt(e,t,n){if(!k.isObject(e))throw TypeError(`target must be an object`);t=t||new FormData,n=k.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!k.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||m,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&k.isSpecCompliantForm(t),u=[];if(!k.isFunction(i))throw TypeError(`visitor must be a function`);function d(e){if(e===null)return``;if(k.isDate(e))return e.toISOString();if(k.isBoolean(e))return e.toString();if(!l&&k.isBlob(e))throw new j(`Blob is not supported. Use a Buffer instead.`);return k.isArrayBuffer(e)||k.isTypedArray(e)?l&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function f(e){if(e>c)throw new j(`Object is too deeply nested (`+e+` levels). Max depth: `+c,j.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(e,t){if(c===1/0)return JSON.stringify(e);let n=[];return JSON.stringify(e,function(e,r){if(!k.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),f(t+n.length-1),r})}function m(e,n,i){let s=e;if(k.isReactNative(t)&&k.isReactNativeBlob(e))return t.append(dt(i,n,a),d(e)),!1;if(e&&!i&&typeof e==`object`){if(k.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=p(e,1);else if(k.isArray(e)&&ft(e)||(k.isFileList(e)||k.endsWith(n,`[]`))&&(s=k.toArray(e)))return n=ut(n),s.forEach(function(e,r){!(k.isUndefined(e)||e===null)&&t.append(o===!0?dt([n],r,a):o===null?n:n+`[]`,d(e))}),!1}return lt(e)?!0:(t.append(dt(i,n,a),d(e)),!1)}let h=Object.assign(pt,{defaultVisitor:m,convertValue:d,isVisitable:lt});function g(e,n,r=0){if(!k.isUndefined(e)){if(f(r),u.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));u.push(e),k.forEach(e,function(e,a){(!(k.isUndefined(e)||e===null)&&i.call(t,e,k.isString(a)?a.trim():a,n,h))===!0&&g(e,n?n.concat(a):[a],r+1)}),u.pop()}}if(!k.isObject(e))throw TypeError(`data must be an object`);return g(e),t}function ht(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function gt(e,t){this._pairs=[],e&&mt(e,this,t)}let _t=gt.prototype;_t.append=function(e,t){this._pairs.push([e,t])},_t.toString=function(e){let t=e?function(t){return e.call(this,t,ht)}:ht;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function vt(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function yt(e,t,n){if(!t)return e;let r=k.isFunction(n)?{serialize:n}:n,i=k.getSafeProp(r,`encode`)||vt,a=k.getSafeProp(r,`serialize`),o;if(o=a?a(t,r):k.isURLSearchParams(t)?t.toString():new gt(t,r).toString(i),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var bt=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){k.forEach(this.handlers,function(t){t!==null&&e(t)})}},xt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},St={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:gt,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},Ct=n({hasBrowserEnv:()=>wt,hasStandardBrowserEnv:()=>Et,hasStandardBrowserWebWorkerEnv:()=>Dt,navigator:()=>Tt,origin:()=>Ot});let wt=typeof window<`u`&&typeof document<`u`,Tt=typeof navigator==`object`&&navigator||void 0,Et=wt&&(!Tt||[`ReactNative`,`NativeScript`,`NS`].indexOf(Tt.product)<0),Dt=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,Ot=wt&&window.location.href||`http://localhost`;var M={...Ct,...St};function kt(e,t){return mt(e,new M.classes.URLSearchParams,{visitor:function(e,t,n,r){return M.isNode&&k.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}function At(e){if(e>100)throw new j(`FormData field is too deeply nested (`+e+` levels). Max depth: 100`,j.ERR_FORM_DATA_DEPTH_EXCEEDED)}function jt(e){let t=[],n=/\w+|\[(\w*)]/g,r;for(;(r=n.exec(e))!==null;)At(t.length),t.push(r[0]===`[]`?``:r[1]||r[0]);return t}function Mt(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Nt(e){function t(e,n,r,i){At(i);let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&k.isArray(r)?r.length:a,s?(k.hasOwnProp(r,a)?r[a]=k.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!k.hasOwnProp(r,a)||!k.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&k.isArray(r[a])&&(r[a]=Mt(r[a])),!o)}if(k.isFormData(e)&&k.isFunction(e.entries)){let n={};return k.forEachEntry(e,(e,r)=>{t(jt(e),r,n,0)}),n}return null}let Pt=(e,t)=>e!=null&&k.hasOwnProp(e,t)?e[t]:void 0;function Ft(e,t,n){if(k.isString(e))try{return(t||JSON.parse)(e),k.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}let It={transitional:xt,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=k.isObject(e);if(i&&k.isHTMLForm(e)&&(e=new FormData(e)),k.isFormData(e))return r?JSON.stringify(Nt(e)):e;if(k.isArrayBuffer(e)||k.isBuffer(e)||k.isStream(e)||k.isFile(e)||k.isBlob(e)||k.isReadableStream(e))return e;if(k.isArrayBufferView(e))return e.buffer;if(k.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=Pt(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return kt(e,t).toString();if((a=k.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=Pt(this,`env`),r=n&&n.FormData;return mt(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),Ft(e)):e}],transformResponse:[function(e){let t=Pt(this,`transitional`)||It.transitional,n=t&&t.forcedJSONParsing,r=Pt(this,`responseType`),i=r===`json`;if(k.isResponse(e)||k.isReadableStream(e))return e;if(e&&k.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,Pt(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?j.from(e,j.ERR_BAD_RESPONSE,this,null,Pt(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:M.classes.FormData,Blob:M.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};k.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`],e=>{It.headers[e]={}});function Lt(e,t){let n=this||It,r=t||n,i=A.from(r.headers),a=r.data;return k.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Rt(e){return!!(e&&e.__CANCEL__)}var zt=class extends j{constructor(e,t,n){super(e??`canceled`,j.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function Bt(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new j(`Request failed with status code `+n.status,n.status>=400&&n.status<500?j.ERR_BAD_REQUEST:j.ERR_BAD_RESPONSE,n.config,n.request,n))}function Vt(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}function Ht(e,t){e=e||10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||(o=c),n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function Ut(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&(clearTimeout(a),a=null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||(a=setTimeout(()=>{a=null,o(i)},r-s)))},()=>i&&o(i)]}let Wt=(e,t,n=3)=>{let r=0,i=Ht(50,250);return Ut(n=>{if(!n||typeof n.loaded!=`number`)return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=o==null?a:Math.min(a,o),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},Gt=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Kt=e=>(...t)=>k.asap(()=>e(...t));var qt=M.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,M.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(M.origin),M.navigator&&/(msie|trident)/i.test(M.navigator.userAgent)):()=>!0,Jt=M.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];k.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),k.isString(r)&&s.push(`path=${r}`),k.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),k.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n].replace(/^\s+/,``),i=r.indexOf(`=`);if(i!==-1&&r.slice(0,i)===e)return decodeURIComponent(r.slice(i+1))}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function Yt(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function Xt(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}let Zt=/^https?:(?!\/\/)/i,Qt=/[\t\n\r]/g;function $t(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function en(e){return $t(e).replace(Qt,``)}function tn(e,t){if(typeof e==`string`&&Zt.test(en(e)))throw new j(`Invalid URL: missing "//" after protocol`,j.ERR_INVALID_URL,t)}function nn(e,t,n,r){tn(t,r);let i=!Yt(t);return e&&(i||n===!1)?(tn(e,r),Xt(e,t)):t}let rn=e=>e instanceof A?{...e}:e;function N(e,t){t=t||{};let n=Object.create(null);Object.defineProperty(n,`hasOwnProperty`,{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return k.isPlainObject(e)&&k.isPlainObject(t)?k.merge.call({caseless:r},e,t):k.isPlainObject(t)?k.merge({},t):k.isArray(t)?t.slice():t}function i(e,t,n,i){if(!k.isUndefined(t))return r(e,t,n,i);if(!k.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!k.isUndefined(t))return r(void 0,t)}function o(e,t){if(!k.isUndefined(t))return r(void 0,t);if(!k.isUndefined(e))return r(void 0,e)}function s(n){let r=k.hasOwnProp(t,`transitional`)?t.transitional:void 0;if(!k.isUndefined(r))if(k.isPlainObject(r)){if(k.hasOwnProp(r,n))return r[n]}else return;let i=k.hasOwnProp(e,`transitional`)?e.transitional:void 0;if(k.isPlainObject(i)&&k.hasOwnProp(i,n))return i[n]}function c(n,i,a){if(k.hasOwnProp(t,a))return r(n,i);if(k.hasOwnProp(e,a))return r(void 0,n)}let l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:c,headers:(e,t,n)=>i(rn(e),rn(t),n,!0)};return k.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=k.hasOwnProp(l,r)?l[r]:i,o=a(k.hasOwnProp(e,r)?e[r]:void 0,k.hasOwnProp(t,r)?t[r]:void 0,r);k.isUndefined(o)&&a!==c||(n[r]=o)}),k.hasOwnProp(t,`validateStatus`)&&k.isUndefined(t.validateStatus)&&s(`validateStatusUndefinedResolves`)===!1&&(k.hasOwnProp(e,`validateStatus`)?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}let an=[`content-type`,`content-length`];function on(e,t,n){if(n!==`content-only`){e.set(t);return}Object.entries(t).forEach(([t,n])=>{an.includes(t.toLowerCase())&&e.set(t,n)})}let sn=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)));function cn(e){let t=N({},e),n=e=>k.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=A.from(s),t.url=yt(nn(l,d,u,t),n(`params`),n(`paramsSerializer`)),c){let e=k.getSafeProp(c,`username`)||``,t=k.getSafeProp(c,`password`)||``;s.set(`Authorization`,`Basic `+btoa(e+`:`+(t?sn(t):``)))}if(k.isFormData(r)&&(M.hasStandardBrowserEnv||M.hasStandardBrowserWebWorkerEnv||k.isReactNative(r)?s.setContentType(void 0):k.isFunction(r.getHeaders)&&on(s,r.getHeaders(),n(`formDataHeaderPolicy`))),M.hasStandardBrowserEnv&&(k.isFunction(i)&&(i=i(t)),i===!0||i==null&&qt(t.url))){let e=a&&o&&Jt.read(o);e&&s.set(a,e)}return t}var ln=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=cn(e),i=r.data,a=A.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=A.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());Bt(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith(`file:`))||setTimeout(g)},h.onabort=function(){h&&(n(new j(`Request aborted`,j.ECONNABORTED,e,h)),m(),h=null)},h.onerror=function(t){let r=new j(t&&t.message?t.message:`Network Error`,j.ERR_NETWORK,e,h);r.event=t||null,n(r),m(),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||xt;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new j(t,i.clarifyTimeoutError?j.ETIMEDOUT:j.ECONNABORTED,e,h)),m(),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&k.forEach(Qe(a),function(e,t){h.setRequestHeader(t,e)}),k.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=Wt(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=Wt(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&(n(!t||t.type?new zt(null,e,h):t),h.abort(),m(),h=null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=Vt(r.url);if(_&&!M.protocols.includes(_)){n(new j(`Unsupported protocol `+_+`:`,j.ERR_BAD_REQUEST,e));return}h.send(i||null)})};let un=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof j?t:new zt(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new j(`timeout of ${t}ms exceeded`,j.ETIMEDOUT))},t),o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),e=null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>k.asap(o),s},dn=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},fn=async function*(e,t){for await(let n of pn(e))yield*dn(n,t)},pn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},mn=(e,t,n,r)=>{let i=fn(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},hn=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,gn=(e,t,n)=>t+2<n&&hn(e.charCodeAt(t+1))&&hn(e.charCodeAt(t+2));function _n(e){if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let t=e.indexOf(`,`);if(t<0)return 0;let n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length,t=r.length;for(let n=0;n<t;n++)if(r.charCodeAt(n)===37&&n+2<t){let t=r.charCodeAt(n+1),i=r.charCodeAt(n+2);hn(t)&&hn(i)&&(e-=2,n+=2)}let n=0,i=t-1,a=e=>e>=2&&r.charCodeAt(e-2)===37&&r.charCodeAt(e-1)===51&&(r.charCodeAt(e)===68||r.charCodeAt(e)===100);i>=0&&(r.charCodeAt(i)===61?(n++,i--):a(i)&&(n++,i-=3)),n===1&&i>=0&&(r.charCodeAt(i)===61||a(i))&&n++;let o=Math.floor(e/4)*3-(n||0);return o>0?o:0}let i=0;for(let e=0,t=r.length;e<t;e++){let n=r.charCodeAt(e);if(n===37&&gn(r,e,t))i+=1,e+=2;else if(n<128)i+=1;else if(n<2048)i+=2;else if(n>=55296&&n<=56319&&e+1<t){let t=r.charCodeAt(e+1);t>=56320&&t<=57343?(i+=4,e++):i+=3}else i+=3}return i}let vn=`1.18.0`,yn=64*1024,{isFunction:bn}=k,xn=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),Sn=e=>{if(!k.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Cn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},wn=e=>{let t=e.indexOf(`://`),n=e;return t!==-1&&(n=n.slice(t+3)),n.includes(`@`)||n.includes(`:`)},Tn=e=>{let t=k.global!==void 0&&k.global!==null?k.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=k.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,s=i?bn(i):typeof fetch==`function`,c=bn(a),l=bn(o);if(!s)return!1;let u=s&&bn(n),d=s&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),f=c&&u&&Cn(()=>{let e=!1,t=new a(M.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),p=l&&u&&Cn(()=>k.isReadableStream(new o(``).body)),m={stream:p&&(e=>e.body)};s&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new j(`Response type '${e}' is not supported`,j.ERR_NOT_SUPPORT,n)})});let h=async e=>{if(e==null)return 0;if(k.isBlob(e))return e.size;if(k.isSpecCompliantForm(e))return(await new a(M.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(k.isArrayBufferView(e)||k.isArrayBuffer(e))return e.byteLength;if(k.isURLSearchParams(e)&&(e+=``),k.isString(e))return(await d(e)).byteLength},g=async(e,t)=>k.toFiniteNumber(e.getContentLength())??h(t);return async e=>{let{url:t,method:n,data:s,signal:l,cancelToken:d,timeout:_,onDownloadProgress:ee,onUploadProgress:te,responseType:v,headers:y,withCredentials:b=`same-origin`,fetchOptions:ne,maxContentLength:x,maxBodyLength:re}=cn(e),ie=k.isNumber(x)&&x>-1,ae=k.isNumber(re)&&re>-1,oe=t=>k.hasOwnProp(e,t)?e[t]:void 0,se=i||fetch;v=v?(v+``).toLowerCase():`text`;let S=un([l,d&&d.toAbortSignal()],_),C=null,w=S&&S.unsubscribe&&(()=>{S.unsubscribe()}),ce,T=null,le=()=>new j(`Request body larger than maxBodyLength limit`,j.ERR_BAD_REQUEST,e,C);try{let i,l=oe(`auth`);if(l&&(i={username:k.getSafeProp(l,`username`)||``,password:k.getSafeProp(l,`password`)||``}),wn(t)){let e=new URL(t,M.origin);!i&&(e.username||e.password)&&(i={username:Sn(e.username),password:Sn(e.password)}),(e.username||e.password)&&(e.username=``,e.password=``,t=e.href)}if(i&&(y.delete(`authorization`),y.set(`Authorization`,`Basic `+btoa(xn((i.username||``)+`:`+(i.password||``))))),ie&&typeof t==`string`&&t.startsWith(`data:`)&&_n(t)>x)throw new j(`maxContentLength size of `+x+` exceeded`,j.ERR_BAD_RESPONSE,e,C);if(ae&&n!==`get`&&n!==`head`){let e=await h(s);if(typeof e==`number`&&isFinite(e)&&(ce=e,e>re))throw le()}let d=ae&&(k.isReadableStream(s)||k.isStream(s)),_=(e,t,n)=>mn(e,yn,e=>{if(ae&&e>re)throw T=le();t&&t(e)},n);if(f&&n!==`get`&&n!==`head`&&(te||d)){if(ce=ce??await g(y,s),ce!==0||d){let e=new a(t,{method:`POST`,body:s,duplex:`half`}),n;if(k.isFormData(s)&&(n=e.headers.get(`content-type`))&&y.setContentType(n),e.body){let[t,n]=te&&Gt(ce,Wt(Kt(te)))||[];s=_(e.body,t,n)}}}else if(d&&!c&&u&&n!==`get`&&n!==`head`)s=_(s);else if(d&&c&&!f&&n!==`get`&&n!==`head`)throw new j(`Stream request bodies are not supported by the current fetch implementation`,j.ERR_NOT_SUPPORT,e,C);k.isString(b)||(b=b?`include`:`omit`);let ue=c&&`credentials`in a.prototype;if(k.isFormData(s)){let e=y.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&y.delete(`content-type`)}y.set(`User-Agent`,`axios/`+vn,!1);let de={...ne,signal:S,method:n.toUpperCase(),headers:Qe(y.normalize()),body:s,duplex:`half`,credentials:ue?b:void 0};C=c&&new a(t,de);let E=await(c?se(C,ne):se(t,de)),fe=A.from(E.headers);if(ie){let t=k.toFiniteNumber(fe.getContentLength());if(t!=null&&t>x)throw new j(`maxContentLength size of `+x+` exceeded`,j.ERR_BAD_RESPONSE,e,C)}let pe=p&&(v===`stream`||v===`response`);if(p&&E.body&&(ee||ie||pe&&w)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=E[e]});let n=k.toFiniteNumber(fe.getContentLength()),[r,i]=ee&&Gt(n,Wt(Kt(ee),!0))||[],a=0;E=new o(mn(E.body,yn,t=>{if(ie&&(a=t,a>x))throw new j(`maxContentLength size of `+x+` exceeded`,j.ERR_BAD_RESPONSE,e,C);r&&r(t)},()=>{i&&i(),w&&w()}),t)}v=v||`text`;let D=await m[k.findKey(m,v)||`text`](E,e);if(ie&&!p&&!pe){let t;if(D!=null&&(typeof D.byteLength==`number`?t=D.byteLength:typeof D.size==`number`?t=D.size:typeof D==`string`&&(t=typeof r==`function`?new r().encode(D).byteLength:D.length)),typeof t==`number`&&t>x)throw new j(`maxContentLength size of `+x+` exceeded`,j.ERR_BAD_RESPONSE,e,C)}return!pe&&w&&w(),await new Promise((t,n)=>{Bt(t,n,{data:D,headers:A.from(E.headers),status:E.status,statusText:E.statusText,config:e,request:C})})}catch(t){if(w&&w(),S&&S.aborted&&S.reason instanceof j){let n=S.reason;throw n.config=e,C&&(n.request=C),t!==n&&(n.cause=t),n}throw T?(C&&!T.request&&(T.request=C),T):t instanceof j?(C&&!t.request&&(t.request=C),t):t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new j(`Network Error`,j.ERR_NETWORK,e,C,t&&t.response),{cause:t.cause||t}):j.from(t,t&&t.code,e,C,t&&t.response)}}},En=new Map,Dn=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=En;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:Tn(t)),l=c;return c};Dn();let On={http:null,xhr:ln,fetch:{get:Dn}};k.forEach(On,(e,t)=>{if(e){try{Object.defineProperty(e,`name`,{__proto__:null,value:t})}catch{}Object.defineProperty(e,`adapterName`,{__proto__:null,value:t})}});let kn=e=>`- ${e}`,An=e=>k.isFunction(e)||e===null||e===!1;function jn(e,t){e=k.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!An(r)&&(i=On[(n=String(r)).toLowerCase()],i===void 0))throw new j(`Unknown adapter '${n}'`);if(i&&(k.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new j(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
4
- `+e.map(kn).join(`
5
- `):` `+kn(e[0]):`as no adapter specified`),`ERR_NOT_SUPPORT`)}return i}var Mn={getAdapter:jn,adapters:On};function Nn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new zt(null,e)}function Pn(e){return Nn(e),e.headers=A.from(e.headers),e.data=Lt.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),Mn.getAdapter(e.adapter||It.adapter,e)(e).then(function(t){Nn(e),e.response=t;try{t.data=Lt.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=A.from(t.headers),t},function(t){if(!Rt(t)&&(Nn(e),t&&t.response)){e.response=t.response;try{t.response.data=Lt.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=A.from(t.response.headers)}return Promise.reject(t)})}let Fn={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{Fn[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});let In={};Fn.transitional=function(e,t,n){function r(e,t){return`[Axios v`+vn+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new j(r(i,` has been removed`+(t?` in `+t:``)),j.ERR_DEPRECATED);return t&&!In[i]&&(In[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},Fn.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Ln(e,t,n){if(typeof e!=`object`)throw new j(`options must be an object`,j.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new j(`option `+a+` must be `+n,j.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new j(`Unknown option `+a,j.ERR_BAD_OPTION)}}var Rn={assertOptions:Ln,validators:Fn};let P=Rn.validators;var F=class{constructor(e){this.defaults=e||{},this.interceptors={request:new bt,response:new bt}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=(()=>{if(!t.stack)return``;let e=t.stack.indexOf(`
6
- `);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(`
7
- `),r=t===-1?-1:n.indexOf(`
8
- `,t+1),i=r===-1?``:n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+=`
9
- `+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t=t||{},t.url=e):t=e||{},t=N(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Rn.assertOptions(n,{silentJSONParsing:P.transitional(P.boolean),forcedJSONParsing:P.transitional(P.boolean),clarifyTimeoutError:P.transitional(P.boolean),legacyInterceptorReqResOrdering:P.transitional(P.boolean),advertiseZstdAcceptEncoding:P.transitional(P.boolean),validateStatusUndefinedResolves:P.transitional(P.boolean)},!1),r!=null&&(k.isFunction(r)?t.paramsSerializer={serialize:r}:Rn.assertOptions(r,{encode:P.function,serialize:P.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Rn.assertOptions(t,{baseUrl:P.spelling(`baseURL`),withXsrfToken:P.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&k.merge(i.common,i[t.method]);i&&k.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`,`common`],e=>{delete i[e]}),t.headers=A.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s=s&&e.synchronous;let n=t.transitional||xt;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[Pn.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=Pn.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=N(this.defaults,e),yt(nn(e.baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}};k.forEach([`delete`,`get`,`head`,`options`],function(e){F.prototype[e]=function(t,n){return this.request(N(n||{},{method:e,url:t,data:n&&k.hasOwnProp(n,`data`)?n.data:void 0}))}}),k.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(N(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}F.prototype[e]=t(),e!==`query`&&(F.prototype[e+`Form`]=t(!0))});var zn=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new zt(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function Bn(e){return function(t){return e.apply(null,t)}}function Vn(e){return k.isObject(e)&&e.isAxiosError===!0}let Hn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Hn).forEach(([e,t])=>{Hn[t]=e});function Un(e){let t=new F(e),n=r(F.prototype.request,t);return k.extend(n,F.prototype,t,{allOwnKeys:!0}),k.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return Un(N(e,t))},n}let I=Un(It);I.Axios=F,I.CanceledError=zt,I.CancelToken=zn,I.isCancel=Rt,I.VERSION=vn,I.toFormData=mt,I.AxiosError=j,I.Cancel=I.CanceledError,I.all=function(e){return Promise.all(e)},I.spread=Bn,I.isAxiosError=Vn,I.mergeConfig=N,I.AxiosHeaders=A,I.formToJSON=e=>Nt(k.isHTMLForm(e)?new FormData(e):e),I.getAdapter=Mn.getAdapter,I.HttpStatusCode=Hn,I.default=I;let L=`https://api.snaptrade.com`.replace(/\/+$/,``);var R=class{constructor(e,t=L,n=I){this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}},Wn=class extends Error{constructor(e,t){super(t),this.field=e,this.name=`RequiredError`}};function Gn(e){let t=``;for(let n of e)t+=String.fromCharCode(n);if(typeof globalThis.btoa==`function`)return globalThis.btoa(t);if(typeof Buffer<`u`)return Buffer.from(e).toString(`base64`);throw Error(`Base64 encoding is not available in this runtime`)}async function Kn(e,t){if(!globalThis.crypto?.subtle)throw Error(`Web Crypto API is required to compute SnapTrade request signatures`);let n=new TextEncoder,r=n.encode(t),i=n.encode(e),a=await globalThis.crypto.subtle.importKey(`raw`,r,{name:`HMAC`,hash:`SHA-256`},!1,[`sign`]),o=await globalThis.crypto.subtle.sign(`HMAC`,a,i);return Gn(new Uint8Array(o))}let qn=e=>{var t=[],n={};return JSON.stringify(e,function(e,r){return e in n||(t.push(e),n[e]=null),r}),t.sort(),JSON.stringify(e,t)};async function Jn(e){let{configuration:t,basePath:n,axiosArgs:r,url:i,operationAuth:a}=e,o=a?.selectedAuthMode,s=o===void 0?void 0:a?.requestSigningByAuthMode?.[o];if(s===void 0||s.signedSecuritySchemes.find(e=>e.toLowerCase().endsWith(`signature`))===void 0)return;let c=t?.[s.secretParameter];if(typeof c!=`string`)throw Error(`${s.secretParameter} is required`);let l=encodeURI(c),u=r.options.data===void 0||r.options.data===`{}`?null:JSON.parse(r.options.data),d=r.url.indexOf(`?`)===-1?`${r.url}`:`${r.url.split(`?`)[0]}`,f=await Kn(qn({content:u,path:d,query:i.replace(n,``).replace(d,``).replace(`?`,``)}),l);r.options.headers&&(r.options.headers.Signature=f)}let Yn=new Set([`clientid`,`timestamp`,`userid`,`usersecret`]);function Xn(e){if(e===void 0||Yn.size===0)return e;try{let t=/^[a-z][a-z\d+.-]*:/i.test(e),n=new URL(e,`http://konfig.invalid`),r=new URLSearchParams;for(let[e,t]of n.searchParams.entries()){let n=t;Yn.has(e.toLowerCase())&&(n=`[REDACTED]`),r.append(e,n)}return n.search=r.toString(),t?n.toString():n.pathname+n.search+n.hash}catch{return}}function Zn(e,t,n){return t===void 0||!e.includes(t)?e:e.split(t).join(n??`[REDACTED URL]`)}var Qn=class extends Error{constructor(e,t,n){let r=e.config?.url,i=Xn(r),a=Zn(e.message,r,i)+`
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.client={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r};function r(e,t){return function(){return e.apply(t,arguments)}}let{toString:i}=Object.prototype,{getPrototypeOf:a}=Object,{iterator:o,toStringTag:s}=Symbol,c=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),l=e=>typeof e==`string`&&(e===`__proto__`||e===`constructor`||e===`prototype`),u=(e,t,n)=>e===Object.prototype||!n&&t===null,d=e=>{if(!Object.isExtensible(e))return!1;let t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(t=>{if(l(t))return!1;let n=Object.getOwnPropertyDescriptor(e,t);return!!n&&n.configurable&&n.writable===!0})},f=(e,t)=>{let n=e,r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);let i=a(n);if(u(n,i,n===e))return!1;if(c(n,t))return!0;n=i}return!1},p=(e,t)=>e!=null&&f(e,t)?e[t]:void 0,m=e=>{if(e==null||typeof e!=`object`&&typeof e!=`function`)return e;let t=a(e);if(t===null&&d(e))return e;let n=Object.create(null),r=Object.create(null),i=[],o=e;for(;o!=null&&i.indexOf(o)===-1;){i.push(o);let s=o===e?t:a(o);if(u(o,s,o===e))break;let d=Object.getOwnPropertyNames(o);Object.getOwnPropertySymbols&&d.push(...Object.getOwnPropertySymbols(o));for(let t of d)l(t)||c(r,t)||(n[t]=e[t],r[t]=!0);o=s}return n},h=(e=>t=>{let n=i.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),g=e=>(e=e.toLowerCase(),t=>h(t)===e),_=e=>t=>typeof t===e,{isArray:v}=Array,y=_(`undefined`);function b(e){return e!==null&&!y(e)&&e.constructor!==null&&!y(e.constructor)&&S(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let x=g(`ArrayBuffer`);function ee(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&x(e.buffer),t}let te=_(`string`),S=_(`function`),ne=_(`number`),C=e=>typeof e==`object`&&!!e,re=e=>e===!0||e===!1,w=e=>{if(!C(e))return!1;let t=a(e);return(t===null||t===Object.prototype||a(t)===null)&&!f(e,s)&&!f(e,o)},ie=e=>{if(!C(e)||b(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ae=g(`Date`),T=g(`File`),E=e=>!!(e&&e.uri!==void 0),D=e=>e&&e.getParts!==void 0,oe=g(`Blob`),se=g(`FileList`),ce=g(`Set`),le=e=>C(e)&&S(e.pipe);function O(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}let k=O(),A=k.FormData===void 0?void 0:k.FormData,ue=e=>{if(!e)return!1;if(A&&e instanceof A)return!0;let t=a(e);if(!t||t===Object.prototype||!S(e.append))return!1;let n=h(e);return n===`formdata`||n===`object`&&S(e.toString)&&e.toString()===`[object FormData]`},de=g(`URLSearchParams`),[j,fe,pe,me]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(g),he=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function ge(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),v(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(b(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function _e(e,t){if(b(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}let ve=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,ye=e=>!y(e)&&e!==ve;function be(...e){let{caseless:t,skipUndefined:n}=ye(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&typeof i==`string`&&_e(r,i)||i,o=c(r,a)?r[a]:void 0;w(o)&&w(e)?r[a]=be(o,e):w(e)?r[a]=be({},e):v(e)?r[a]=e.slice():(!n||!y(e))&&(r[a]=e)};for(let t=0,n=e.length;t<n;t++){let n=e[t];if(!n||b(n)||(ge(n,i),typeof n!=`object`||v(n)))continue;let r=Object.getOwnPropertySymbols(n);for(let e=0;e<r.length;e++){let t=r[e];Me.call(n,t)&&i(n[t],t)}}return r}let xe=(e,t,n,{allOwnKeys:i}={})=>(ge(t,(t,i)=>{n&&S(t)?Object.defineProperty(e,i,{__proto__:null,value:r(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),e),Se=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ce=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,`constructor`,{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,`super`,{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},we=(e,t,n,r)=>{let i,o,s,c={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!c[s]&&(t[s]=e[s],c[s]=!0);e=n!==!1&&a(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Te=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},Ee=e=>{if(!e)return null;if(v(e))return e;let t=e.length;if(!ne(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},De=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&a(Uint8Array)),Oe=(e,t)=>{let n=(e&&e[o]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},ke=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Ae=g(`HTMLFormElement`),je=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),{propertyIsEnumerable:Me}=Object.prototype,Ne=g(`RegExp`),Pe=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};ge(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},Fe=e=>{Pe(e,(t,n)=>{if(S(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(S(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)})}})},Ie=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return v(e)?r(e):r(String(e).split(t)),n},Le=()=>{},Re=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ze(e){return!!(e&&S(e.append)&&e[s]===`FormData`&&e[o])}let Be=e=>{let t=new WeakSet,n=e=>{if(C(e)){if(t.has(e))return;if(b(e))return e;if(!(`toJSON`in e)){t.add(e);let r;if(ce(e)){r=[];for(let t of e){let e=n(t);!y(e)&&r.push(e)}}else r=v(e)?[]:{},ge(e,(e,t)=>{let i=n(e);!y(i)&&(r[t]=i)});return t.delete(e),r}}return e};return n(e)},Ve=g(`AsyncFunction`),He=e=>e&&(C(e)||S(e))&&S(e.then)&&S(e.catch),Ue=((e,t)=>e?setImmediate:t?((e,t)=>(ve.addEventListener(`message`,({source:n,data:r})=>{n===ve&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),ve.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,S(ve.postMessage)),We=typeof queueMicrotask<`u`?queueMicrotask.bind(ve):typeof process<`u`&&process.nextTick||Ue,Ge=e=>e!=null&&S(e[o]);var M={isArray:v,isArrayBuffer:x,isBuffer:b,isFormData:ue,isArrayBufferView:ee,isString:te,isNumber:ne,isBoolean:re,isObject:C,isPlainObject:w,isEmptyObject:ie,isReadableStream:j,isRequest:fe,isResponse:pe,isHeaders:me,isUndefined:y,isDate:ae,isFile:T,isReactNativeBlob:E,isReactNative:D,isBlob:oe,isRegExp:Ne,isFunction:S,isStream:le,isURLSearchParams:de,isTypedArray:De,isFileList:se,forEach:ge,merge:be,extend:xe,trim:he,stripBOM:Se,inherits:Ce,toFlatObject:we,kindOf:h,kindOfTest:g,endsWith:Te,toArray:Ee,forEachEntry:Oe,matchAll:ke,isHTMLForm:Ae,hasOwnProperty:c,hasOwnProp:c,hasOwnInPrototypeChain:f,getSafeProp:p,toSafeFlatObject:m,reduceDescriptors:Pe,freezeMethods:Fe,toObjectSet:Ie,toCamelCase:je,noop:Le,toFiniteNumber:Re,findKey:_e,global:ve,isContextDefined:ye,isSpecCompliantForm:ze,toJSONObject:Be,isAsyncFn:Ve,isThenable:He,setImmediate:Ue,asap:We,isIterable:Ge,isSafeIterable:e=>e!=null&&f(e,o)&&Ge(e)};let Ke=M.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]);var qe=e=>{let t={},n,r,i;return e&&e.split(`
2
+ `).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim();let a=M.hasOwnProp(t,n);!n||a&&M.hasOwnProp(Ke,n)||(n===`set-cookie`?a?t[n].push(r):t[n]=[r]:t[n]=a?t[n]+`, `+r:r)}),t};function Je(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}let Ye=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),Xe=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function Ze(e,t){return M.isArray(e)?e.map(e=>Ze(e,t)):Je(String(e).replace(t,``))}let Qe=e=>Ze(e,Ye),$e=e=>Ze(e,Xe);function et(e){let t=Object.create(null);return M.forEach(e.toJSON(),(e,n)=>{t[n]=$e(e)}),t}let tt=Symbol(`internals`);function nt(e){return e&&String(e).trim().toLowerCase()}function rt(e){return e===!1||e==null?e:M.isArray(e)?e.map(rt):Qe(String(e))}function it(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}let at=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function ot(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}function st(e){let t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n=``;for(let r=1;r<t;r++){let i=e.charCodeAt(r);if(i===34||i===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function ct(e){let t=Object.create(null),n=String(e),r=0,i=!1,a=!1;function o(e){let i=ot(n.slice(r,e)),a=i.indexOf(`=`);if(a<1)return;let o=ot(i.slice(0,a));if(!at.test(o))return;let s=o.toLowerCase();s===`__proto__`||s===`constructor`||s===`prototype`||(t[s]=st(ot(i.slice(a+1))))}for(let e=0;e<n.length;e++){let t=n.charCodeAt(e);i?a?a=!1:t===92?a=!0:t===34&&(i=!1):t===34?i=!0:(t===44||t===59)&&(o(e),r=e+1)}return o(n.length),t}let lt=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ut(e,t,n,r,i){if(M.isFunction(r))return r.call(this,t,n);if(i&&(t=n),M.isString(t)){if(M.isString(r))return t.indexOf(r)!==-1;if(M.isRegExp(r))return r.test(t)}}function dt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function ft(e,t){let n=M.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var N=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=nt(t);if(!i)return;let a=M.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=rt(e))}let a=(e,t)=>M.forEach(e,(e,n)=>i(e,n,t));if(M.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(M.isString(e)&&(e=e.trim())&&!lt(e))a(qe(e),t);else if(M.isObject(e)&&M.isSafeIterable(e)){let n=Object.create(null),r,i;for(let t of e){if(!M.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);i=t[0],M.hasOwnProp(n,i)?(r=n[i],n[i]=M.isArray(r)?[...r,t[1]]:[r,t[1]]):n[i]=t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=nt(e),e){let n=M.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return it(e);if(M.isFunction(t))return t.call(this,e,n);if(M.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=nt(e),e){let n=M.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||ut(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=nt(e),e){let i=M.findKey(n,e);i&&(!t||ut(n,n[i],i,t))&&(delete n[i],r=!0)}}return M.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||ut(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return M.forEach(this,(r,i)=>{let a=M.findKey(n,i);if(a){t[a]=rt(r),delete t[i];return}let o=e?dt(i):String(i).trim();o!==i&&delete t[i],t[o]=rt(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return M.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&M.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(`
3
+ `)}getSetCookie(){let e=this.get(`set-cookie`);return M.isArray(e)?e:e==null||e===!1?[]:[e]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return ct(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[tt]=this[tt]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=nt(e);t[r]||(ft(n,e),t[r]=!0)}return M.isArray(e)?e.forEach(r):r(e),this}};N.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),M.reduceDescriptors(N.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),M.freezeMethods(N);let pt=`[REDACTED ****]`;function mt(e){if(M.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(M.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function ht(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||M.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof N&&(e=e.toJSON()),r.push(e);let t;if(M.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);M.isUndefined(r)||(t[n]=r)});else{if(!M.isPlainObject(e)&&mt(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?pt:i(a);M.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}function gt(e){try{return String(e)}catch{return``}}function _t(e){return e.errors.map(e=>{try{return e&&e.message?gt(e.message):gt(e)}catch{return``}}).filter(Boolean).join(`; `)||e.name||`AggregateError`}var P=class e extends Error{static from(t,n,r,i,a,o){let s=t.message;!s&&M.isArray(t.errors)&&t.errors.length&&(s=_t(t));let c=new e(s,n||t.code,r,i,a);return Object.defineProperty(c,`cause`,{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),o&&Object.assign(c,o),c}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,`message`,{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&M.hasOwnProp(e,`redact`)?e.redact:void 0,n=M.isArray(t)&&t.length>0?ht(e,t):M.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};P.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,P.ERR_BAD_OPTION=`ERR_BAD_OPTION`,P.ECONNABORTED=`ECONNABORTED`,P.ETIMEDOUT=`ETIMEDOUT`,P.ECONNREFUSED=`ECONNREFUSED`,P.ERR_NETWORK=`ERR_NETWORK`,P.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,P.ERR_DEPRECATED=`ERR_DEPRECATED`,P.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,P.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,P.ERR_CANCELED=`ERR_CANCELED`,P.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,P.ERR_INVALID_URL=`ERR_INVALID_URL`,P.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function vt(e){return M.isPlainObject(e)||M.isArray(e)}function yt(e){return M.endsWith(e,`[]`)?e.slice(0,-2):e}function bt(e,t,n){return e?e.concat(t).map(function(e,t){return e=yt(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function xt(e){return M.isArray(e)&&!e.some(vt)}let St=M.toFlatObject(M,{},null,function(e){return/^is[A-Z]/.test(e)});function Ct(e,t,n){if(!M.isObject(e))throw TypeError(`target must be an object`);t=t||new FormData;let r=(e,t)=>{let r=M.getSafeProp(n,e);return M.isUndefined(r)?t:r},i=r(`metaTokens`,!0),a=r(`visitor`)||h,o=r(`dots`,!1),s=r(`indexes`,!1),c=r(`Blob`)||typeof Blob<`u`&&Blob,l=r(`maxDepth`,100),u=c&&M.isSpecCompliantForm(t),d=[];if(!M.isFunction(a))throw TypeError(`visitor must be a function`);function f(e){if(e===null)return``;if(M.isDate(e))return e.toISOString();if(M.isBoolean(e))return e.toString();if(!u&&M.isBlob(e))throw new P(`Blob is not supported. Use a Buffer instead.`);if(M.isArrayBuffer(e)||M.isTypedArray(e)){if(u&&typeof c==`function`)return new c([e]);throw new P(`Blob is not supported. Use a Buffer instead.`,P.ERR_NOT_SUPPORT)}return e}function p(e){if(e>l)throw new P(`Object is too deeply nested (`+e+` levels). Max depth: `+l,P.ERR_FORM_DATA_DEPTH_EXCEEDED)}function m(e,t){if(l===1/0)return JSON.stringify(e);let n=[];return JSON.stringify(e,function(e,r){if(!M.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),p(t+n.length-1),r})}function h(e,n,r){let a=e;if(M.isReactNative(t)&&M.isReactNativeBlob(e))return t.append(bt(r,n,o),f(e)),!1;if(e&&!r&&typeof e==`object`){if(M.endsWith(n,`{}`))n=i?n:n.slice(0,-2),e=m(e,1);else if(M.isArray(e)&&xt(e)||(M.isFileList(e)||M.endsWith(n,`[]`))&&(a=M.toArray(e)))return n=yt(n),a.forEach(function(e,r){!(M.isUndefined(e)||e===null)&&t.append(s===!0?bt([n],r,o):s===null?n:n+`[]`,f(e))}),!1}return vt(e)?!0:(t.append(bt(r,n,o),f(e)),!1)}let g=Object.assign(St,{defaultVisitor:h,convertValue:f,isVisitable:vt});function _(e,n,r=0){if(!M.isUndefined(e)){if(p(r),d.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));d.push(e),M.forEach(e,function(e,i){(!(M.isUndefined(e)||e===null)&&a.call(t,e,M.isString(i)?i.trim():i,n,g))===!0&&_(e,n?n.concat(i):[i],r+1)}),d.pop()}}if(!M.isObject(e))throw TypeError(`data must be an object`);return _(e),t}function wt(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Tt(e,t){this._pairs=[],e&&Ct(e,this,t)}let Et=Tt.prototype;Et.append=function(e,t){this._pairs.push([e,t])},Et.toString=function(e){let t=e?t=>e.call(this,t,wt):wt;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function Dt(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function Ot(e,t,n){if(!t)return e;e=e||``;let r=M.isFunction(n)?{serialize:n}:n,i=M.getSafeProp(r,`encode`)||Dt,a=M.getSafeProp(r,`serialize`),o;if(o=a?a(t,r):M.isURLSearchParams(t)?t.toString():new Tt(t,r).toString(i),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}let kt=Symbol(`internals`);function At(e){return e?e.length:0}function jt(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function Mt(e,t){let n=e.handlers,r=At(n);n===t.handlersRef?r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(e,r){n[e.index]!==e.handler&&t.handlerEntries.delete(r)}):t.handlerEntries.clear()):(t.handlersRef=n,t.handlerEntries.clear()),t.handlersLength=r}var Nt=class{constructor(){this.handlers=[],this[kt]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(e,t,n){let r={fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null},i=this[kt];this.handlers??(this.handlers=[]),Mt(this,i);let a=i.nextId++;return this.handlers.push(r),i.handlerEntries.set(a,{handler:r,index:this.handlers.length-1}),i.handlersLength=this.handlers.length,a}eject(e){let t=this[kt];Mt(this,t);let n=t.handlerEntries.get(e);if(n){if(t.handlerEntries.delete(e),this.handlers[n.index]!==n.handler)return;this.handlers[n.index]=null,t.iterationDepth||(jt(this.handlers),t.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],Mt(this,this[kt]))}forEach(e){let t=this[kt];Mt(this,t),t.iterationDepth++;try{M.forEach(this.handlers,function(t){t!==null&&e(t)})}finally{--t.iterationDepth||(Mt(this,t),jt(this.handlers),t.handlersLength=At(this.handlers))}}},Pt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Ft={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:Tt,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},It=n({hasBrowserEnv:()=>Lt,hasStandardBrowserEnv:()=>zt,hasStandardBrowserWebWorkerEnv:()=>Bt,navigator:()=>Rt,origin:()=>Vt});let Lt=typeof window<`u`&&typeof document<`u`,Rt=typeof navigator==`object`&&navigator||void 0,zt=Lt&&(!Rt||[`ReactNative`,`NativeScript`,`NS`].indexOf(Rt.product)<0),Bt=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,Vt=Lt&&window.location.href||`http://localhost`;var F={...It,...Ft};function Ht(e,t){return Ct(e,new F.classes.URLSearchParams,{visitor:function(e,t,n,r){return F.isNode&&M.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}function Ut(e){if(e>100)throw new P(`FormData field is too deeply nested (`+e+` levels). Max depth: 100`,P.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Wt(e){let t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g,r;for(;(r=n.exec(e))!==null;)Ut(t.length),t.push(r[0]===`[]`?``:r[1]||r[0]);return t}function Gt(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Kt(e){function t(e,n,r,i){Ut(i);let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&M.isArray(r)?r.length:a,s?(M.hasOwnProp(r,a)?r[a]=M.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!M.hasOwnProp(r,a)||!M.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&M.isArray(r[a])&&(r[a]=Gt(r[a])),!o)}if(M.isFormData(e)&&M.isFunction(e.entries)){let n={};return M.forEachEntry(e,(e,r)=>{t(Wt(e),r,n,0)}),n}return null}let qt=Object.freeze([`get`,`delete`,`head`,`options`,`post`,`put`,`patch`,`purge`,`link`,`unlink`,`query`]),Jt=(e,t)=>e!=null&&M.hasOwnProp(e,t)?e[t]:void 0;function Yt(e,t,n){if(M.isString(e))try{return(t||JSON.parse)(e),M.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}let Xt={transitional:Pt,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=M.isObject(e);if(i&&M.isHTMLForm(e)&&(e=new FormData(e)),M.isFormData(e))return r?JSON.stringify(Kt(e)):e;if(M.isArrayBuffer(e)||M.isBuffer(e)||M.isStream(e)||M.isFile(e)||M.isBlob(e)||M.isReadableStream(e))return e;if(M.isArrayBufferView(e))return e.buffer;if(M.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=Jt(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return Ht(e,t).toString();if((a=M.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=Jt(this,`env`),r=n&&n.FormData;return Ct(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),Yt(e)):e}],transformResponse:[function(e){let t=Jt(this,`transitional`)||Xt.transitional,n=t&&t.forcedJSONParsing,r=Jt(this,`responseType`),i=r===`json`;if(M.isResponse(e)||M.isReadableStream(e))return e;if(e&&M.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,Jt(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?P.from(e,P.ERR_BAD_RESPONSE,this,null,Jt(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:F.classes.FormData,Blob:F.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};M.forEach(qt,e=>{Xt.headers[e]={}});function Zt(e,t){let n=this||Xt,r=t||n,i=N.from(r.headers),a=r.data;return M.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Qt(e){return!!(e&&e.__CANCEL__)}var $t=class extends P{constructor(e,t,n){super(e??`canceled`,P.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function en(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new P(`Request failed with status code `+n.status,n.status>=400&&n.status<500?P.ERR_BAD_REQUEST:P.ERR_BAD_RESPONSE,n.config,n.request,n))}let tn=/[\t\n\r]/g;function nn(e){if(typeof e!=`string`)return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(tn,``)}function rn(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}function an(e,t){e=e||10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||(o=c),n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function on(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&(clearTimeout(a),a=null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||(a=setTimeout(()=>{a=null,o(i)},r-s)))},()=>i&&o(i),(...e)=>o(e)]}let sn=(e,t,n=3)=>{let r=0,i=an(50,250);return on(n=>{if(!n||!M.isNumber(n.loaded))return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=Math.max(0,o==null?a:Math.min(a,o)),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},cn=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ln=(e,t=M.asap)=>(...n)=>t(()=>e(...n));var un=F.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,F.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(F.origin),F.navigator&&/(msie|trident)/i.test(F.navigator.userAgent)):()=>!0,dn=F.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];M.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),M.isString(r)&&s.push(`path=${r}`),M.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),M.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n].replace(/^\s+/,``),i=r.indexOf(`=`);if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function fn(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function pn(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+`/`+t.replace(/^\/+/,``)}let mn=/^https?:(?!\/\/)/i;function hn(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,t,n=``)=>`${t}${n}${pt}`)}function gn(e){let t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${pt}@`),n=t.indexOf(`#`),r=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${pt}`);return n===-1?r:`${r}#${hn(t.slice(n+1))}`}function _n(e,t){if(typeof e==`string`){let n=nn(e);if(mn.test(n))throw new P(`Invalid URL ${JSON.stringify(gn(n))}: missing "//" after protocol`,P.ERR_INVALID_URL,t)}}function vn(e,t,n,r){_n(t,r);let i=!fn(t);return e&&(i||n===!1)?(_n(e,r),pn(e,t)):t}let yn=e=>e instanceof N?{...e}:e,bn=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function I(e,t){e=e||{},t=t||{};let n=Object.create(null);Object.defineProperty(n,`hasOwnProperty`,{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return M.isPlainObject(e)&&M.isPlainObject(t)?M.merge.call({caseless:r},e,t):M.isPlainObject(t)?M.merge({},t):M.isArray(t)?t.slice():t}function i(e,t,n,i){if(!M.isUndefined(t))return r(e,t,n,i);if(!M.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!M.isUndefined(t))return r(void 0,t)}function o(e,t){if(!M.isUndefined(t))return r(void 0,t);if(!M.isUndefined(e))return r(void 0,e)}function s(n){let r=M.hasOwnProp(t,`transitional`)?t.transitional:void 0;if(!M.isUndefined(r))if(M.isPlainObject(r)){if(M.hasOwnProp(r,n))return r[n]}else return;let i=M.hasOwnProp(e,`transitional`)?e.transitional:void 0;if(M.isPlainObject(i)&&M.hasOwnProp(i,n))return i[n]}function c(n,i,a){if(M.hasOwnProp(t,a))return r(n,i);if(M.hasOwnProp(e,a))return r(void 0,n)}let l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutErrorMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:c,headers:(e,t,n)=>i(yn(e),yn(t),n,!0)};return M.forEach(bn({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=M.hasOwnProp(l,r)?l[r]:i,o=a(M.hasOwnProp(e,r)?e[r]:void 0,M.hasOwnProp(t,r)?t[r]:void 0,r);M.isUndefined(o)&&a!==c||(n[r]=o)}),M.hasOwnProp(t,`validateStatus`)&&M.isUndefined(t.validateStatus)&&s(`validateStatusUndefinedResolves`)===!1&&(M.hasOwnProp(e,`validateStatus`)?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}let xn=[`content-type`,`content-length`];function Sn(e,t,n){if(n!==`content-only`){e.set(t);return}Object.entries(t||{}).forEach(([t,n])=>{xn.includes(t.toLowerCase())&&e.set(t,n)})}let Cn=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)));function wn(e){let t=I({},e),n=e=>M.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=N.from(s),t.url=Ot(vn(l,d,u,t),n(`params`),n(`paramsSerializer`)),c){let t=M.getSafeProp(c,`username`)||``,n=M.getSafeProp(c,`password`)||``;try{s.set(`Authorization`,`Basic `+btoa(t+`:`+(n?Cn(n):``)))}catch(t){throw P.from(t,P.ERR_BAD_OPTION_VALUE,e)}}if(M.isFormData(r)){let e=M.getSafeProp(r,`getHeaders`);F.hasStandardBrowserEnv||F.hasStandardBrowserWebWorkerEnv||M.isReactNative(r)?s.setContentType(void 0):M.isFunction(e)&&Sn(s,e.call(r),n(`formDataHeaderPolicy`))}if(F.hasStandardBrowserEnv&&(M.isFunction(i)&&(i=i(t)),i===!0||i==null&&un(t.url))){let e=a&&o&&dn.read(o);e&&s.set(a,e)}return t}var Tn=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=wn(e),i=r.data,a=N.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p,m;function h(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let g=new XMLHttpRequest;g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout;function _(i){if(!g)return;if(g.status===0&&(rn(nn(r.url))||rn(F.origin))!==`file`&&!(g.responseURL&&g.responseURL.startsWith(`file:`))){n(new P(`Request aborted`,P.ECONNABORTED,e,g)),h(),g=null;return}try{i?m&&m(i):p&&p()}catch(e){setTimeout(()=>{throw e})}if(!g)return;let a=N.from(`getAllResponseHeaders`in g&&g.getAllResponseHeaders());en(function(e){t(e),h()},function(e){n(e),h()},{data:!o||o===`text`||o===`json`?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:a,config:e,request:g}),g=null}`onloadend`in g?g.onloadend=_:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.startsWith(`file:`))||setTimeout(_)},g.onabort=function(){g&&(n(new P(`Request aborted`,P.ECONNABORTED,e,g)),h(),g=null)},g.onerror=function(t){let r=new P(t&&t.message?t.message:`Network Error`,P.ERR_NETWORK,e,g);r.event=t||null,n(r),h(),g=null},g.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||Pt;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new P(t,i.clarifyTimeoutError?P.ETIMEDOUT:P.ECONNABORTED,e,g)),h(),g=null},i===void 0&&a.setContentType(null),`setRequestHeader`in g&&M.forEach(et(a),function(e,t){g.setRequestHeader(t,e)}),M.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),o&&o!==`json`&&(g.responseType=r.responseType),c&&([d,p,m]=sn(c,!0),g.addEventListener(`progress`,d)),s&&g.upload&&([u,f]=sn(s),g.upload.addEventListener(`progress`,u),g.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{g&&(n(!t||t.type?new $t(null,e,g):t),g.abort(),h(),g=null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let v=rn(r.url);if(v&&!F.protocols.includes(v)){n(new P(`Unsupported protocol `+v+`:`,P.ERR_BAD_REQUEST,e)),h();return}g.send(i||null)})};let En=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof P?t:new $t(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new P(`timeout of ${t}ms exceeded`,P.ETIMEDOUT))},t),o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),e=null)};e.forEach(e=>{if(!r){if(e.aborted){i.call(e);return}e.addEventListener(`abort`,i,{once:!0})}});let{signal:s}=n;return s.unsubscribe=()=>M.asap(o),s},Dn=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},On=async function*(e,t){for await(let n of kn(e))yield*Dn(n,t)},kn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},An=(e,t,n,r)=>{let i=On(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},jn=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Mn=(e,t,n)=>t+2<n&&jn(e.charCodeAt(t+1))&&jn(e.charCodeAt(t+2)),Nn=e=>e<=57?e-48:(e&223)-55,Pn=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,Fn=e=>e===9||e===10||e===12||e===13||e===32,In=e=>{let t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},Ln=e=>{let t=e.length,n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},Rn=e=>{let t=e.length,n=0,r=0,i=!1;for(let a=0;a<t;a++){let o=e.charCodeAt(a);if(o===37&&Mn(e,a,t)&&(o=Nn(e.charCodeAt(a+1))*16+Nn(e.charCodeAt(a+2)),a+=2),!Fn(o)){if(o===61){r++;continue}if(!Pn(o)||r>0){i=!0;continue}n++}}return i||r>2||r>0&&(n+r)%4!=0||n%4==1?Ln(e):In(n)},zn=(e,t)=>{if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let n=e.indexOf(`,`);if(n<0)return 0;let r=e.slice(5,n),i=e.slice(n+1);if(/;base64/i.test(r))return t(i);let a=0;for(let e=0,t=i.length;e<t;e++){let n=i.charCodeAt(e);if(n===37&&Mn(i,e,t))a+=1,e+=2;else if(n<128)a+=1;else if(n<2048)a+=2;else if(n>=55296&&n<=56319&&e+1<t){let t=i.charCodeAt(e+1);t>=56320&&t<=57343?(a+=4,e++):a+=3}else a+=3}return a};function Bn(e){let t=typeof e==`string`?e.indexOf(`#`):-1;return zn(t===-1?e:e.slice(0,t),Rn)}let Vn=`1.20.0`,Hn=64*1024,Un={cache:`default`,redirect:`follow`,referrer:`about:client`,referrerPolicy:``,mode:`cors`,integrity:``,keepalive:!1,priority:`auto`,window:null},{isFunction:Wn}=M,Gn=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),Kn=e=>{if(!M.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},qn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Jn=e=>{let t=e.indexOf(`://`),n=e;return t!==-1&&(n=n.slice(t+3)),n.includes(`@`)||n.includes(`:`)},Yn=e=>{let t=M.global!==void 0&&M.global!==null?M.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=M.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,s=i?Wn(i):typeof fetch==`function`,c=Wn(a),l=Wn(o);if(!s)return!1;let u=s&&Wn(n),d=s&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),f=c&&u&&qn(()=>{let e=!1,t=new a(F.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),p=l&&u&&qn(()=>M.isReadableStream(new o(``).body)),m={stream:p&&(e=>e.body)};s&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new P(`Response type '${e}' is not supported`,P.ERR_NOT_SUPPORT,n)})});let h=async e=>{if(e==null)return 0;if(M.isBlob(e))return e.size;if(M.isSpecCompliantForm(e))return(await new a(F.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(M.isArrayBufferView(e)||M.isArrayBuffer(e))return e.byteLength;if(M.isURLSearchParams(e)&&(e+=``),M.isString(e))return(await d(e)).byteLength},g=async(e,t)=>M.toFiniteNumber(e.getContentLength())??h(t);return async e=>{let{url:t,method:n,data:s,signal:l,cancelToken:d,timeout:_,onDownloadProgress:v,onUploadProgress:y,responseType:b,headers:x,withCredentials:ee=`same-origin`,fetchOptions:te,maxContentLength:S,maxBodyLength:ne,maxRedirects:C}=wn(e),re=M.isNumber(S)&&S>-1,w=M.isNumber(ne)&&ne>-1,ie=t=>M.hasOwnProp(e,t)?e[t]:void 0,ae=i||fetch;b=b?(b+``).toLowerCase():`text`;let T=En([l,d&&d.toAbortSignal()],_),E=null,D=T&&T.unsubscribe&&(()=>{T.unsubscribe()}),oe,se=null,ce=()=>new P(`Request body larger than maxBodyLength limit`,P.ERR_BAD_REQUEST,e,E);try{let i,l=ie(`auth`);if(l&&(i={username:M.getSafeProp(l,`username`)||``,password:M.getSafeProp(l,`password`)||``}),Jn(t)){let e=new URL(t,F.origin);!i&&(e.username||e.password)&&(i={username:Kn(e.username),password:Kn(e.password)}),(e.username||e.password)&&(e.username=``,e.password=``,t=e.href)}if(i&&(x.delete(`authorization`),x.set(`Authorization`,`Basic `+btoa(Gn((i.username||``)+`:`+(i.password||``))))),re&&typeof t==`string`&&t.startsWith(`data:`)&&Bn(t)>S)throw new P(`maxContentLength size of `+S+` exceeded`,P.ERR_BAD_RESPONSE,e,E);if(w&&n!==`get`&&n!==`head`){let e=await h(s);if(typeof e==`number`&&isFinite(e)&&(oe=e,e>ne))throw ce()}let d=w&&(M.isReadableStream(s)||M.isStream(s)),_=(e,t,n)=>An(e,Hn,e=>{if(w&&e>ne)throw se=ce();t&&t(e)},n);if(f&&n!==`get`&&n!==`head`&&(y||d)){if(oe=oe??await g(x,s),oe!==0||d){let e=new a(t,{method:`POST`,body:s,duplex:`half`}),n;if(M.isFormData(s)&&(n=e.headers.get(`content-type`))&&x.setContentType(n),e.body){let[t,n]=y&&cn(oe,sn(ln(y)))||[];s=_(e.body,t,n)}}}else if(d&&!c&&u&&n!==`get`&&n!==`head`)s=_(s);else if(d&&c&&!f&&n!==`get`&&n!==`head`)throw new P(`Stream request bodies are not supported by the current fetch implementation`,P.ERR_NOT_SUPPORT,e,E);M.isString(ee)||(ee=ee?`include`:`omit`);let le=c&&`credentials`in a.prototype;if(M.isFormData(s)){let e=x.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&x.delete(`content-type`)}x.set(`User-Agent`,`axios/`+Vn,!1);let O=te==null?te:Object.assign(Object.create(null),te);O&&(delete O.body,delete O.headers,delete O.method,delete O.signal,delete O.duplex,delete O.credentials);let k=Object.assign(Object.create(null),O,{signal:T,method:n.toUpperCase(),headers:et(x.normalize()),body:s,duplex:`half`,credentials:le?ee:void 0});c&&(M.forEach(Un,(e,t)=>{k[t]===void 0&&(k[t]=e)}),k.signal===void 0&&(k.signal=null),k.body===void 0&&(k.body=null)),C===0&&(k.redirect=`manual`,O&&(O.redirect=`manual`)),E=c&&new a(t,k);let A=await(c?ae(E,O):ae(t,k)),ue=N.from(A.headers);if(re){let t=M.toFiniteNumber(ue.getContentLength());if(t!=null&&t>S)throw new P(`maxContentLength size of `+S+` exceeded`,P.ERR_BAD_RESPONSE,e,E)}let de=p&&(b===`stream`||b===`response`);if(p&&A.body&&(v||re||de&&D)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=A[e]});let n=M.toFiniteNumber(ue.getContentLength()),[r,i]=v&&cn(n,sn(ln(v),!0))||[],a=0;A=new o(An(A.body,Hn,t=>{if(re&&(a=t,a>S))throw new P(`maxContentLength size of `+S+` exceeded`,P.ERR_BAD_RESPONSE,e,E);r&&r(t)},()=>{i&&i(),D&&D()}),t)}b=b||`text`;let j=await m[M.findKey(m,b)||`text`](A,e);if(re&&!p&&!de){let t;if(j!=null&&(typeof j.byteLength==`number`?t=j.byteLength:typeof j.size==`number`?t=j.size:typeof j==`string`&&(t=typeof r==`function`?new r().encode(j).byteLength:j.length)),typeof t==`number`&&t>S)throw new P(`maxContentLength size of `+S+` exceeded`,P.ERR_BAD_RESPONSE,e,E)}return!de&&D&&D(),await new Promise((t,n)=>{en(t,n,{data:j,headers:N.from(A.headers),status:A.status,statusText:A.statusText,config:e,request:E})})}catch(t){if(D&&D(),T&&T.aborted&&T.reason instanceof P){let n=T.reason;throw n.config=e,E&&(n.request=E),t!==n&&Object.defineProperty(n,`cause`,{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(se)throw E&&!se.request&&(se.request=E),se;if(t instanceof P)throw E&&!t.request&&(t.request=E),t;if(t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)){let n=new P(`Network Error`,P.ERR_NETWORK,e,E,t&&t.response);throw Object.defineProperty(n,`cause`,{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw P.from(t,t&&t.code,e,E,t&&t.response)}}},Xn=new Map,Zn=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=Xn;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:Yn(t)),l=c;return c};Zn();let Qn={http:null,xhr:Tn,fetch:{get:Zn}};M.forEach(Qn,(e,t)=>{if(e){try{Object.defineProperty(e,`name`,{__proto__:null,value:t})}catch{}Object.defineProperty(e,`adapterName`,{__proto__:null,value:t})}});let $n=e=>`- ${e}`,er=e=>M.isFunction(e)||e===null||e===!1;function tr(e,t){e=M.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!er(r)&&(i=Qn[(n=String(r)).toLowerCase()],i===void 0))throw new P(`Unknown adapter '${n}'`);if(i&&(M.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new P(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
4
+ `+e.map($n).join(`
5
+ `):` `+$n(e[0]):`as no adapter specified`),P.ERR_NOT_SUPPORT)}return i}var nr={getAdapter:tr,adapters:Qn};function rr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $t(null,e)}function ir(e){let t=M.toSafeFlatObject(e);return rr(t),t.headers=N.from(M.getSafeProp(t,`headers`)),t.data=Zt.call(t,t.transformRequest),[`post`,`put`,`patch`].indexOf(t.method)!==-1&&t.headers.setContentType(`application/x-www-form-urlencoded`,!1),nr.getAdapter(t.adapter||Xt.adapter,t)(t).then(function(e){rr(t),t.response=e;try{e.data=Zt.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=N.from(e.headers),e},function(e){if(!Qt(e)&&(rr(t),e&&e.response)){t.response=e.response;try{e.response.data=Zt.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=N.from(e.response.headers)}return Promise.reject(e)})}let ar={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{ar[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});let or={};ar.transitional=function(e,t,n){function r(e,t){return`[Axios v`+Vn+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new P(r(i,` has been removed`+(t?` in `+t:``)),P.ERR_DEPRECATED);return t&&!or[i]&&(or[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},ar.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function sr(e,t,n){if(typeof e!=`object`||!e)throw new P(`options must be an object`,P.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new P(`option `+a+` must be `+n,P.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new P(`Unknown option `+a,P.ERR_BAD_OPTION)}}var cr={assertOptions:sr,validators:ar};let L=cr.validators;var lr=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Nt,response:new Nt}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error)try{let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=t.stack,r=``;if(typeof n==`string`){let e=n.indexOf(`
6
+ `);r=e===-1?``:n.slice(e+1)}if(!e.stack)e.stack=r;else if(r){let t=r.indexOf(`
7
+ `),n=t===-1?-1:r.indexOf(`
8
+ `,t+1),i=n===-1?``:r.slice(n+1);String(e.stack).endsWith(i)||(e.stack+=`
9
+ `+r)}}catch{}throw e}}_request(e,t){typeof e==`string`?(t=t||{},t.url=e):t=e||{},t=I(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&cr.assertOptions(n,{silentJSONParsing:L.transitional(L.boolean),forcedJSONParsing:L.transitional(L.boolean),clarifyTimeoutError:L.transitional(L.boolean),legacyInterceptorReqResOrdering:L.transitional(L.boolean),advertiseZstdAcceptEncoding:L.transitional(L.boolean),validateStatusUndefinedResolves:L.transitional(L.boolean)},!1),r!=null&&(M.isFunction(r)?t.paramsSerializer={serialize:r}:cr.assertOptions(r,{encode:L.function,serialize:L.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),cr.assertOptions(t,{baseUrl:L.spelling(`baseURL`),withXsrfToken:L.spelling(`withXSRFToken`)},!0),t.method=(M.getSafeProp(t,`method`)||M.getSafeProp(this.defaults,`method`)||`get`).toLowerCase();let a=i&&M.merge(i.common,i[t.method]);i&&M.forEach(qt.concat(`common`),e=>{delete i[e]}),t.headers=N.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s=s&&e.synchronous;let n=t.transitional||Pt;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[ir.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e?e(f):f}catch(e){if(!t){l=Promise.reject(e);break}try{let n=t.call(this,e);M.isThenable(n)&&(l=Promise.resolve(n).then(()=>ir.call(this,f)))}catch(e){l=Promise.reject(e)}break}}if(!l)try{l=ir.call(this,f)}catch(e){l=Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=I(this.defaults,e),Ot(vn(e.baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}};M.forEach([`delete`,`get`,`head`,`options`],function(e){lr.prototype[e]=function(t,n){return this.request(I(n||{},{method:e,url:t,data:n&&M.hasOwnProp(n,`data`)?n.data:void 0}))}}),M.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(I(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}lr.prototype[e]=t(),e!==`query`&&(lr.prototype[e+`Form`]=t(!0))});var ur=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new $t(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function dr(e){return function(t){return e.apply(null,t)}}function fr(e){return M.isObject(e)&&e.isAxiosError===!0}let pr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(pr).forEach(([e,t])=>{pr[t]===void 0&&(pr[t]=e)});function mr(e){let t=new lr(e),n=r(lr.prototype.request,t);return M.extend(n,lr.prototype,t,{allOwnKeys:!0}),M.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return mr(I(e,t))},n}let R=mr(Xt);R.Axios=lr,R.CanceledError=$t,R.CancelToken=ur,R.isCancel=Qt,R.VERSION=Vn,R.toFormData=Ct,R.AxiosError=P,R.Cancel=R.CanceledError,R.all=function(e){return Promise.all(e)},R.spread=dr,R.isAxiosError=fr,R.mergeConfig=I,R.AxiosHeaders=N,R.formToJSON=e=>Kt(M.isHTMLForm(e)?new FormData(e):e),R.getAdapter=nr.getAdapter,R.HttpStatusCode=pr,R.default=R;let z=`https://api.snaptrade.com`.replace(/\/+$/,``);var hr=class{constructor(e,t=z,n=R){this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}},gr=class extends Error{constructor(e,t){super(t),this.field=e,this.name=`RequiredError`}};function _r(e){let t=``;for(let n of e)t+=String.fromCharCode(n);if(typeof globalThis.btoa==`function`)return globalThis.btoa(t);if(typeof Buffer<`u`)return Buffer.from(e).toString(`base64`);throw Error(`Base64 encoding is not available in this runtime`)}async function vr(e,t){if(!globalThis.crypto?.subtle)throw Error(`Web Crypto API is required to compute SnapTrade request signatures`);let n=new TextEncoder,r=n.encode(t),i=n.encode(e),a=await globalThis.crypto.subtle.importKey(`raw`,r,{name:`HMAC`,hash:`SHA-256`},!1,[`sign`]),o=await globalThis.crypto.subtle.sign(`HMAC`,a,i);return _r(new Uint8Array(o))}let yr=e=>{var t=[],n={};return JSON.stringify(e,function(e,r){return e in n||(t.push(e),n[e]=null),r}),t.sort(),JSON.stringify(e,t)};async function br(e){let{configuration:t,basePath:n,axiosArgs:r,url:i,operationAuth:a}=e,o=a?.selectedAuthMode,s=o===void 0?void 0:a?.requestSigningByAuthMode?.[o];if(s===void 0||s.signedSecuritySchemes.find(e=>e.toLowerCase().endsWith(`signature`))===void 0)return;let c=t?.[s.secretParameter];if(typeof c!=`string`)throw Error(`${s.secretParameter} is required`);let l=encodeURI(c),u=r.options.data===void 0||r.options.data===`{}`?null:JSON.parse(r.options.data),d=r.url.indexOf(`?`)===-1?`${r.url}`:`${r.url.split(`?`)[0]}`,f=await vr(yr({content:u,path:d,query:i.replace(n,``).replace(d,``).replace(`?`,``)}),l);r.options.headers&&(r.options.headers.Signature=f)}let xr=new Set([`clientid`,`timestamp`,`userid`,`usersecret`]);function Sr(e){if(e===void 0||xr.size===0)return e;try{let t=/^[a-z][a-z\d+.-]*:/i.test(e),n=new URL(e,`http://konfig.invalid`),r=new URLSearchParams;for(let[e,t]of n.searchParams.entries()){let n=t;xr.has(e.toLowerCase())&&(n=`[REDACTED]`),r.append(e,n)}return n.search=r.toString(),t?n.toString():n.pathname+n.search+n.hash}catch{return}}function Cr(e,t,n){return t===void 0||!e.includes(t)?e:e.split(t).join(n??`[REDACTED URL]`)}var wr=class extends Error{constructor(e,t,n){let r=e.config?.url,i=Sr(r),a=Cr(e.message,r,i)+`
10
10
  RESPONSE HEADERS:
11
- `+JSON.stringify(n,null,2);super(a),this.name=`SnaptradeError`,this.code=e.code,this.method=e.config?.method?.toUpperCase(),this.url=i,this.status=e.response?.status,this.statusText=e.response?.statusText,this.responseBody=t}toJSON(){return{name:this.name,message:this.message,method:this.method,url:this.url,code:this.code,status:this.status,statusText:this.statusText,responseBody:this.responseBody}}};async function $n(e){let t=new TextDecoder,n=e.getReader(),r=``;try{for(;;){let{done:e,value:i}=await n.read();if(e)break;let a=t.decode(i,{stream:!0});r+=a}}finally{n.releaseLock()}return r}function er(e){if(typeof e!=`string`)return e;try{let t=JSON.parse(e);return typeof t==`object`&&t?t:e}catch{return e}}let z=`https://example.com`,B=function(e,t,n){if(n==null)throw new Wn(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},V=async function({object:e,key:t,type:n,keyParamName:r,configuration:i,prefix:a}){t=t||r;let o=null;if(i&&i.apiKey)if(typeof i.apiKey==`function`)o=await i.apiKey(r);else if(typeof i.apiKey==`string`)o=i.apiKey;else if(typeof i.apiKey==`object`)r in i.apiKey&&(o=i.apiKey[r]);else throw Error(`Unexpected type ${typeof i.apiKey} for Configuration.apiKey`);o&&(e[t]=a===void 0?o:`${a}${o}`,n===`Cookie`&&(e[t]=`${r}=${e[t]}`))};function tr(e,t,n=``){typeof t==`object`?Array.isArray(t)?t.forEach(t=>tr(e,t,n)):Object.keys(t).forEach(r=>tr(e,t[r],`${n}${n===``?``:`.`}${r}`)):e.has(n)?e.append(n,t):e.set(n,t)}let H=function(e,...t){let n=new URLSearchParams(e.search);tr(n,t),e.search=n.toString()},U=function(e,t,n){let r=typeof e!=`string`;return(r&&n&&n.isJsonMime?n.isJsonMime(t.headers[`Content-Type`]):r)?JSON.stringify(e===void 0?{}:e):e||``},W=function(e){return nr(e.pathname)+e.search+e.hash},nr=function(e){return e.replace(/\/$/,``)};async function rr(e){let t=0,n=5e3;for(;t<3;)try{return await e()}catch(e){if(I.isAxiosError(e)){if(e.response?.status==429){t++,console.log(`429 error encountered, retrying in ${n/1e3} seconds...`),await new Promise(e=>setTimeout(e,n)),n*=2;continue}let r;try{let t=e.response?.data;r=t,typeof ReadableStream<`u`&&t instanceof ReadableStream&&(r=await $n(t)),r=er(r)}catch{r=void 0}throw new Qn(e,r,e.response?.headers)}throw e}throw Error(`Request failed after 3 retries due to 429 (rate limit) errors.`)}let G=function(e,t,n,r,i){return async(a=t,o=n)=>{let s=(r?.basePath||o)+e.url;return await Jn({axiosArgs:e,basePath:o,url:s,configuration:r,operationAuth:i?{...i,selectedAuthMode:r?.authMode}:void 0}),rr(async()=>await a.request({...e.options,url:s}))}};function K(){return typeof window<`u`}function q(e){let{queryParameters:t,operationAuth:n}=e,r=n?.selectedAuthMode;(r===void 0?void 0:n?.requestSigningByAuthMode?.[r])?.signedSecuritySchemes.find(e=>e.toLowerCase().endsWith(`timestamp`))!==void 0&&(t.timestamp=Math.round(new Date().getTime()/1e3).toString())}let ir=function(e){return{getAccountActivities:async(t,n,r,i,a,o,s,c,l={})=>{B(`getAccountActivities`,`accountId`,t);let u=`/accounts/{accountId}/activities`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),d=new URL(u,z),f;e&&(f=e.baseOptions);let p={method:`GET`,...f,...l},m=e&&!K()?{"User-Agent":e.userAgent}:{},h={};e?.authMode===`commercialApiKey`&&(await V({object:h,key:`clientId`,keyParamName:`clientId`,configuration:e}),s!==void 0&&(h.userId=s),c!==void 0&&(h.userSecret=c)),e?.authMode===`personalApiKey`&&await V({object:h,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(h.startDate=n instanceof Date?n.toISOString().substr(0,10):n),r!==void 0&&(h.endDate=r instanceof Date?r.toISOString().substr(0,10):r),i!==void 0&&(h.offset=i),a!==void 0&&(h.limit=a),o!==void 0&&(h.type=o);let g={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},_=f&&f.headers?f.headers:{};return p.headers={...m,..._,...l.headers},q({queryParameters:h,requestConfig:p,path:u,configuration:e,pathTemplate:`/accounts/{accountId}/activities`,httpMethod:`GET`,operationAuth:g}),H(d,h),{url:W(d),options:p}},getAccountBalanceHistory:async(t,n,r,i={})=>{B(`getAccountBalanceHistory`,`accountId`,t);let a=`/accounts/{accountId}/balanceHistory`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),o=new URL(a,z),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l=e&&!K()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},q({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/accounts/{accountId}/balanceHistory`,httpMethod:`GET`,operationAuth:d}),H(o,u),{url:W(o),options:c}},getAllAccountPositions:async(t,n,r,i={})=>{B(`getAllAccountPositions`,`accountId`,t);let a=`/accounts/{accountId}/positions/all`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),o=new URL(a,z),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l=e&&!K()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},q({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/accounts/{accountId}/positions/all`,httpMethod:`GET`,operationAuth:d}),H(o,u),{url:W(o),options:c}},getUserAccountBalance:async(t,n,r,i={})=>{B(`getUserAccountBalance`,`accountId`,t);let a=`/accounts/{accountId}/balances`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),o=new URL(a,z),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l=e&&!K()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},q({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/accounts/{accountId}/balances`,httpMethod:`GET`,operationAuth:d}),H(o,u),{url:W(o),options:c}},getUserAccountDetails:async(t,n,r,i={})=>{B(`getUserAccountDetails`,`accountId`,t);let a=`/accounts/{accountId}`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),o=new URL(a,z),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l=e&&!K()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},q({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/accounts/{accountId}`,httpMethod:`GET`,operationAuth:d}),H(o,u),{url:W(o),options:c}},getUserAccountOrderDetail:async(t,n,r,i,a={})=>{B(`getUserAccountOrderDetail`,`accountId`,t),B(`getUserAccountOrderDetail`,`accountInformationGetUserAccountOrderDetailRequest`,n);let o=`/accounts/{accountId}/orders/details`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,z),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!K()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},q({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/orders/details`,httpMethod:`POST`,operationAuth:f}),l.data=U(n,l,e),H(s,d),{url:W(s),options:l}},getUserAccountOrders:async(t,n,r,i,a,o={})=>{B(`getUserAccountOrders`,`accountId`,t);let s=`/accounts/{accountId}/orders`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),c=new URL(s,z),l;e&&(l=e.baseOptions);let u={method:`GET`,...l,...o},d=e&&!K()?{"User-Agent":e.userAgent}:{},f={};e?.authMode===`commercialApiKey`&&(await V({object:f,key:`clientId`,keyParamName:`clientId`,configuration:e}),i!==void 0&&(f.userId=i),a!==void 0&&(f.userSecret=a)),e?.authMode===`personalApiKey`&&await V({object:f,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(f.state=n),r!==void 0&&(f.days=r);let p={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},m=l&&l.headers?l.headers:{};return u.headers={...d,...m,...o.headers},q({queryParameters:f,requestConfig:u,path:s,configuration:e,pathTemplate:`/accounts/{accountId}/orders`,httpMethod:`GET`,operationAuth:p}),H(c,f),{url:W(c),options:u}},getUserAccountRecentOrders:async(t,n,r,i,a={})=>{B(`getUserAccountRecentOrders`,`accountId`,t);let o=`/accounts/{accountId}/recentOrders`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,z),c;e&&(c=e.baseOptions);let l={method:`GET`,...c,...a},u=e&&!K()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(d.only_executed=n);let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},q({queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/recentOrders`,httpMethod:`GET`,operationAuth:f}),H(s,d),{url:W(s),options:l}},getUserAccountReturnRates:async(t,n,r,i,a={})=>{B(`getUserAccountReturnRates`,`accountId`,t);let o=`/accounts/{accountId}/returnRates`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,z),c;e&&(c=e.baseOptions);let l={method:`GET`,...c,...a},u=e&&!K()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(d.timeframes=n);let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},q({queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/returnRates`,httpMethod:`GET`,operationAuth:f}),H(s,d),{url:W(s),options:l}},getUserHoldings:async(t,n,r,i={})=>{B(`getUserHoldings`,`accountId`,t);let a=`/accounts/{accountId}/holdings`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),o=new URL(a,z),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l=e&&!K()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},q({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/accounts/{accountId}/holdings`,httpMethod:`GET`,operationAuth:d}),H(o,u),{url:W(o),options:c}},listUserAccounts:async(t,n,r={})=>{let i=`/accounts`,a=new URL(i,z),o;e&&(o=e.baseOptions);let s={method:`GET`,...o,...r},c=e&&!K()?{"User-Agent":e.userAgent}:{},l={};e?.authMode===`commercialApiKey`&&(await V({object:l,key:`clientId`,keyParamName:`clientId`,configuration:e}),t!==void 0&&(l.userId=t),n!==void 0&&(l.userSecret=n)),e?.authMode===`personalApiKey`&&await V({object:l,key:`clientId`,keyParamName:`clientId`,configuration:e});let u={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},d=o&&o.headers?o.headers:{};return s.headers={...c,...d,...r.headers},q({queryParameters:l,requestConfig:s,path:i,configuration:e,pathTemplate:`/accounts`,httpMethod:`GET`,operationAuth:u}),H(a,l),{url:W(a),options:s}},updateUserAccount:async(t,n,r,i={})=>{B(`updateUserAccount`,`accountId`,t);let a=`/accounts/{accountId}`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),o=new URL(a,z),s;e&&(s=e.baseOptions);let c={method:`PUT`,...s,...i},l=e&&!K()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},q({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/accounts/{accountId}`,httpMethod:`PUT`,operationAuth:d}),H(o,u),{url:W(o),options:c}}}},J=function(e){let t=ir(e);return{async getAccountActivities(...n){let[r={},i]=n;return G(await t.getAccountActivities(r.accountId,r.startDate,r.endDate,r.offset,r.limit,r.type,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getAccountBalanceHistory(...n){let[r={},i]=n;return G(await t.getAccountBalanceHistory(r.accountId,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getAllAccountPositions(...n){let[r={},i]=n;return G(await t.getAllAccountPositions(r.accountId,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountBalance(...n){let[r={},i]=n;return G(await t.getUserAccountBalance(r.accountId,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountDetails(...n){let[r={},i]=n;return G(await t.getUserAccountDetails(r.accountId,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountOrderDetail(...n){let[r={},i]=n,a={brokerage_order_id:r.brokerage_order_id};return G(await t.getUserAccountOrderDetail(r.accountId,a,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountOrders(...n){let[r={},i]=n;return G(await t.getUserAccountOrders(r.accountId,r.state,r.days,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountRecentOrders(...n){let[r={},i]=n;return G(await t.getUserAccountRecentOrders(r.accountId,r.onlyExecuted,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountReturnRates(...n){let[r={},i]=n;return G(await t.getUserAccountReturnRates(r.accountId,r.timeframes,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserHoldings(...n){let[r={},i]=n;return G(await t.getUserHoldings(r.accountId,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async listUserAccounts(...n){let[r={},i]=n;return G(await t.listUserAccounts(r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async updateUserAccount(...n){let[r={},i]=n;return G(await t.updateUserAccount(r.accountId,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})}}},ar=function(e,t,n){let r=J(e);return{getAccountActivities(...e){return r.getAccountActivities(...e).then(e=>e(n,t))},getAccountBalanceHistory(...e){return r.getAccountBalanceHistory(...e).then(e=>e(n,t))},getAllAccountPositions(...e){return r.getAllAccountPositions(...e).then(e=>e(n,t))},getUserAccountBalance(...e){return r.getUserAccountBalance(...e).then(e=>e(n,t))},getUserAccountDetails(...e){return r.getUserAccountDetails(...e).then(e=>e(n,t))},getUserAccountOrderDetail(...e){return r.getUserAccountOrderDetail(...e).then(e=>e(n,t))},getUserAccountOrders(...e){return r.getUserAccountOrders(...e).then(e=>e(n,t))},getUserAccountRecentOrders(...e){return r.getUserAccountRecentOrders(...e).then(e=>e(n,t))},getUserAccountReturnRates(...e){return r.getUserAccountReturnRates(...e).then(e=>e(n,t))},getUserHoldings(...e){return r.getUserHoldings(...e).then(e=>e(n,t))},listUserAccounts(...e){return r.listUserAccounts(...e).then(e=>e(n,t))},updateUserAccount(...e){return r.updateUserAccount(...e).then(e=>e(n,t))}}};var or=class extends R{getAccountActivities(...e){return J(this.configuration).getAccountActivities(...e).then(e=>e(this.axios,this.basePath))}getAccountBalanceHistory(...e){return J(this.configuration).getAccountBalanceHistory(...e).then(e=>e(this.axios,this.basePath))}getAllAccountPositions(...e){return J(this.configuration).getAllAccountPositions(...e).then(e=>e(this.axios,this.basePath))}getUserAccountBalance(...e){return J(this.configuration).getUserAccountBalance(...e).then(e=>e(this.axios,this.basePath))}getUserAccountDetails(...e){return J(this.configuration).getUserAccountDetails(...e).then(e=>e(this.axios,this.basePath))}getUserAccountOrderDetail(...e){return J(this.configuration).getUserAccountOrderDetail(...e).then(e=>e(this.axios,this.basePath))}getUserAccountOrders(...e){return J(this.configuration).getUserAccountOrders(...e).then(e=>e(this.axios,this.basePath))}getUserAccountRecentOrders(...e){return J(this.configuration).getUserAccountRecentOrders(...e).then(e=>e(this.axios,this.basePath))}getUserAccountReturnRates(...e){return J(this.configuration).getUserAccountReturnRates(...e).then(e=>e(this.axios,this.basePath))}getUserHoldings(...e){return J(this.configuration).getUserHoldings(...e).then(e=>e(this.axios,this.basePath))}listUserAccounts(...e){return J(this.configuration).listUserAccounts(...e).then(e=>e(this.axios,this.basePath))}updateUserAccount(...e){return J(this.configuration).updateUserAccount(...e).then(e=>e(this.axios,this.basePath))}},sr=class extends or{};let cr=function(e){return{check:async(t={})=>{let n=new URL(`/`,z),r;e&&(r=e.baseOptions);let i={method:`GET`,...r,...t},a=e&&!K()?{"User-Agent":e.userAgent}:{},o={},s={authModes:[`public`],selectedAuthMode:e?.authMode},c=r&&r.headers?r.headers:{};return i.headers={...a,...c,...t.headers},q({queryParameters:o,requestConfig:i,path:`/`,configuration:e,pathTemplate:`/`,httpMethod:`GET`,operationAuth:s}),H(n,o),{url:W(n),options:i}}}},lr=function(e){let t=cr(e);return{async check(n){return G(await t.check(n),I,L,e,{authModes:[`public`]})}}},ur=function(e,t,n){let r=lr(e);return{check(e){return r.check(e).then(e=>e(n,t))}}};var dr=class extends R{check(e){return lr(this.configuration).check(e).then(e=>e(this.axios,this.basePath))}},fr=class extends dr{};let pr=function(e){return{deleteSnapTradeUser:async(t,n={})=>{let r=`/snapTrade/deleteUser`,i=new URL(r,z),a;e&&(a=e.baseOptions);let o={method:`DELETE`,...a,...n},s=e&&!K()?{"User-Agent":e.userAgent}:{},c={};e?.authMode===`commercialApiKey`&&(await V({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e}),t!==void 0&&(c.userId=t));let l={authModes:[`commercialApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]}},selectedAuthMode:e?.authMode},u=a&&a.headers?a.headers:{};return o.headers={...s,...u,...n.headers},q({queryParameters:c,requestConfig:o,path:r,configuration:e,pathTemplate:`/snapTrade/deleteUser`,httpMethod:`DELETE`,operationAuth:l}),H(i,c),{url:W(i),options:o}},listSnapTradeUsers:async(t={})=>{let n=`/snapTrade/listUsers`,r=new URL(n,z),i;e&&(i=e.baseOptions);let a={method:`GET`,...i,...t},o=e&&!K()?{"User-Agent":e.userAgent}:{},s={};e?.authMode===`commercialApiKey`&&await V({object:s,key:`clientId`,keyParamName:`clientId`,configuration:e});let c={authModes:[`commercialApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]}},selectedAuthMode:e?.authMode},l=i&&i.headers?i.headers:{};return a.headers={...o,...l,...t.headers},q({queryParameters:s,requestConfig:a,path:n,configuration:e,pathTemplate:`/snapTrade/listUsers`,httpMethod:`GET`,operationAuth:c}),H(r,s),{url:W(r),options:a}},loginSnapTradeUser:async(t,n,r,i={})=>{let a=`/snapTrade/login`,o=new URL(a,z),s;e&&(s=e.baseOptions);let c={method:`POST`,...s,...i},l=e&&!K()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};l[`Content-Type`]=`application/json`;let f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},q({requestBody:t,queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/snapTrade/login`,httpMethod:`POST`,operationAuth:d}),c.data=U(t,c,e),H(o,u),{url:W(o),options:c}},registerSnapTradeUser:async(t,n={})=>{B(`registerSnapTradeUser`,`snapTradeRegisterUserRequestBody`,t);let r=`/snapTrade/registerUser`,i=new URL(r,z),a;e&&(a=e.baseOptions);let o={method:`POST`,...a,...n},s=e&&!K()?{"User-Agent":e.userAgent}:{},c={};e?.authMode===`commercialApiKey`&&await V({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e});let l={authModes:[`commercialApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]}},selectedAuthMode:e?.authMode};s[`Content-Type`]=`application/json`;let u=a&&a.headers?a.headers:{};return o.headers={...s,...u,...n.headers},q({requestBody:t,queryParameters:c,requestConfig:o,path:r,configuration:e,pathTemplate:`/snapTrade/registerUser`,httpMethod:`POST`,operationAuth:l}),o.data=U(t,o,e),H(i,c),{url:W(i),options:o}},resetSnapTradeUserSecret:async(t,n={})=>{B(`resetSnapTradeUserSecret`,`userIDandSecret`,t);let r=`/snapTrade/resetUserSecret`,i=new URL(r,z),a;e&&(a=e.baseOptions);let o={method:`POST`,...a,...n},s=e&&!K()?{"User-Agent":e.userAgent}:{},c={};e?.authMode===`commercialApiKey`&&await V({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e});let l={authModes:[`commercialApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]}},selectedAuthMode:e?.authMode};s[`Content-Type`]=`application/json`;let u=a&&a.headers?a.headers:{};return o.headers={...s,...u,...n.headers},q({requestBody:t,queryParameters:c,requestConfig:o,path:r,configuration:e,pathTemplate:`/snapTrade/resetUserSecret`,httpMethod:`POST`,operationAuth:l}),o.data=U(t,o,e),H(i,c),{url:W(i),options:o}}}},Y=function(e){let t=pr(e);return{async deleteSnapTradeUser(...n){let[r={},i]=n;return G(await t.deleteSnapTradeUser(r.userId,i),I,L,e,{authModes:[`commercialApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]}}})},async listSnapTradeUsers(...n){let[r]=n;return G(await t.listSnapTradeUsers(r),I,L,e,{authModes:[`commercialApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]}}})},async loginSnapTradeUser(...n){let[r={},i]=n,a={broker:r.broker,immediateRedirect:r.immediateRedirect,customRedirect:r.customRedirect,reconnect:r.reconnect,connectionType:r.connectionType,showCloseButton:r.showCloseButton,darkMode:r.darkMode,locale:r.locale,connectionPortalVersion:r.connectionPortalVersion};return G(await t.loginSnapTradeUser(a,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async registerSnapTradeUser(...n){let[r={},i]=n,a={userId:r.userId};return G(await t.registerSnapTradeUser(a,i),I,L,e,{authModes:[`commercialApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]}}})},async resetSnapTradeUserSecret(...n){let[r={},i]=n,a={userId:r.userId,userSecret:r.userSecret};return G(await t.resetSnapTradeUserSecret(a,i),I,L,e,{authModes:[`commercialApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]}}})}}},mr=function(e,t,n){let r=Y(e);return{deleteSnapTradeUser(...e){return r.deleteSnapTradeUser(...e).then(e=>e(n,t))},listSnapTradeUsers(...e){return r.listSnapTradeUsers(...e).then(e=>e(n,t))},loginSnapTradeUser(...e){return r.loginSnapTradeUser(...e).then(e=>e(n,t))},registerSnapTradeUser(...e){return r.registerSnapTradeUser(...e).then(e=>e(n,t))},resetSnapTradeUserSecret(...e){return r.resetSnapTradeUserSecret(...e).then(e=>e(n,t))}}};var hr=class extends R{deleteSnapTradeUser(...e){return Y(this.configuration).deleteSnapTradeUser(...e).then(e=>e(this.axios,this.basePath))}listSnapTradeUsers(...e){return Y(this.configuration).listSnapTradeUsers(...e).then(e=>e(this.axios,this.basePath))}loginSnapTradeUser(...e){return Y(this.configuration).loginSnapTradeUser(...e).then(e=>e(this.axios,this.basePath))}registerSnapTradeUser(...e){return Y(this.configuration).registerSnapTradeUser(...e).then(e=>e(this.axios,this.basePath))}resetSnapTradeUserSecret(...e){return Y(this.configuration).resetSnapTradeUserSecret(...e).then(e=>e(this.axios,this.basePath))}},gr=class extends hr{};let _r=function(e){return{deleteConnection:async(t,n,r,i={})=>{B(`deleteConnection`,`connectionId`,t);let a=`/connection/{connectionId}`.replace(`{connectionId}`,encodeURIComponent(String(t===void 0?`-connectionId-`:t))),o=new URL(a,z),s;e&&(s=e.baseOptions);let c={method:`DELETE`,...s,...i},l=e&&!K()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},q({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/connection/{connectionId}`,httpMethod:`DELETE`,operationAuth:d}),H(o,u),{url:W(o),options:c}},detailBrokerageAuthorization:async(t,n,r,i={})=>{B(`detailBrokerageAuthorization`,`authorizationId`,t);let a=`/authorizations/{authorizationId}`.replace(`{authorizationId}`,encodeURIComponent(String(t===void 0?`-authorizationId-`:t))),o=new URL(a,z),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l=e&&!K()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},q({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/authorizations/{authorizationId}`,httpMethod:`GET`,operationAuth:d}),H(o,u),{url:W(o),options:c}},disableBrokerageAuthorization:async(t,n,r,i={})=>{B(`disableBrokerageAuthorization`,`authorizationId`,t);let a=`/authorizations/{authorizationId}/disable`.replace(`{authorizationId}`,encodeURIComponent(String(t===void 0?`-authorizationId-`:t))),o=new URL(a,z),s;e&&(s=e.baseOptions);let c={method:`POST`,...s,...i},l=e&&!K()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},q({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/authorizations/{authorizationId}/disable`,httpMethod:`POST`,operationAuth:d}),H(o,u),{url:W(o),options:c}},listBrokerageAuthorizationAccounts:async(t,n,r,i={})=>{B(`listBrokerageAuthorizationAccounts`,`authorizationId`,t);let a=`/authorizations/{authorizationId}/accounts`.replace(`{authorizationId}`,encodeURIComponent(String(t===void 0?`-authorizationId-`:t))),o=new URL(a,z),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l=e&&!K()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},q({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/authorizations/{authorizationId}/accounts`,httpMethod:`GET`,operationAuth:d}),H(o,u),{url:W(o),options:c}},listBrokerageAuthorizations:async(t,n,r={})=>{let i=`/authorizations`,a=new URL(i,z),o;e&&(o=e.baseOptions);let s={method:`GET`,...o,...r},c=e&&!K()?{"User-Agent":e.userAgent}:{},l={};e?.authMode===`commercialApiKey`&&(await V({object:l,key:`clientId`,keyParamName:`clientId`,configuration:e}),t!==void 0&&(l.userId=t),n!==void 0&&(l.userSecret=n)),e?.authMode===`personalApiKey`&&await V({object:l,key:`clientId`,keyParamName:`clientId`,configuration:e});let u={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},d=o&&o.headers?o.headers:{};return s.headers={...c,...d,...r.headers},q({queryParameters:l,requestConfig:s,path:i,configuration:e,pathTemplate:`/authorizations`,httpMethod:`GET`,operationAuth:u}),H(a,l),{url:W(a),options:s}},listConnectionAccounts:async(t,n,r,i={})=>{B(`listConnectionAccounts`,`connectionId`,t);let a=`/connections/{connectionId}/accounts`.replace(`{connectionId}`,encodeURIComponent(String(t===void 0?`-connectionId-`:t))),o=new URL(a,z),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l=e&&!K()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},q({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/connections/{connectionId}/accounts`,httpMethod:`GET`,operationAuth:d}),H(o,u),{url:W(o),options:c}},refreshBrokerageAuthorization:async(t,n,r,i={})=>{B(`refreshBrokerageAuthorization`,`authorizationId`,t);let a=`/authorizations/{authorizationId}/refresh`.replace(`{authorizationId}`,encodeURIComponent(String(t===void 0?`-authorizationId-`:t))),o=new URL(a,z),s;e&&(s=e.baseOptions);let c={method:`POST`,...s,...i},l=e&&!K()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},q({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/authorizations/{authorizationId}/refresh`,httpMethod:`POST`,operationAuth:d}),H(o,u),{url:W(o),options:c}},returnRates:async(t,n,r,i,a={})=>{B(`returnRates`,`authorizationId`,t);let o=`/authorizations/{authorizationId}/returnRates`.replace(`{authorizationId}`,encodeURIComponent(String(t===void 0?`-authorizationId-`:t))),s=new URL(o,z),c;e&&(c=e.baseOptions);let l={method:`GET`,...c,...a},u=e&&!K()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(d.timeframes=n);let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},q({queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/authorizations/{authorizationId}/returnRates`,httpMethod:`GET`,operationAuth:f}),H(s,d),{url:W(s),options:l}},syncBrokerageAuthorizationTransactions:async(t,n,r,i={})=>{B(`syncBrokerageAuthorizationTransactions`,`authorizationId`,t);let a=`/authorizations/{authorizationId}/transactions/sync`.replace(`{authorizationId}`,encodeURIComponent(String(t===void 0?`-authorizationId-`:t))),o=new URL(a,z),s;e&&(s=e.baseOptions);let c={method:`POST`,...s,...i},l=e&&!K()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},q({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/authorizations/{authorizationId}/transactions/sync`,httpMethod:`POST`,operationAuth:d}),H(o,u),{url:W(o),options:c}}}},X=function(e){let t=_r(e);return{async deleteConnection(...n){let[r={},i]=n;return G(await t.deleteConnection(r.connectionId,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async detailBrokerageAuthorization(...n){let[r={},i]=n;return G(await t.detailBrokerageAuthorization(r.authorizationId,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async disableBrokerageAuthorization(...n){let[r={},i]=n;return G(await t.disableBrokerageAuthorization(r.authorizationId,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async listBrokerageAuthorizationAccounts(...n){let[r={},i]=n;return G(await t.listBrokerageAuthorizationAccounts(r.authorizationId,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async listBrokerageAuthorizations(...n){let[r={},i]=n;return G(await t.listBrokerageAuthorizations(r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async listConnectionAccounts(...n){let[r={},i]=n;return G(await t.listConnectionAccounts(r.connectionId,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async refreshBrokerageAuthorization(...n){let[r={},i]=n;return G(await t.refreshBrokerageAuthorization(r.authorizationId,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async returnRates(...n){let[r={},i]=n;return G(await t.returnRates(r.authorizationId,r.timeframes,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async syncBrokerageAuthorizationTransactions(...n){let[r={},i]=n;return G(await t.syncBrokerageAuthorizationTransactions(r.authorizationId,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})}}},vr=function(e,t,n){let r=X(e);return{deleteConnection(...e){return r.deleteConnection(...e).then(e=>e(n,t))},detailBrokerageAuthorization(...e){return r.detailBrokerageAuthorization(...e).then(e=>e(n,t))},disableBrokerageAuthorization(...e){return r.disableBrokerageAuthorization(...e).then(e=>e(n,t))},listBrokerageAuthorizationAccounts(...e){return r.listBrokerageAuthorizationAccounts(...e).then(e=>e(n,t))},listBrokerageAuthorizations(...e){return r.listBrokerageAuthorizations(...e).then(e=>e(n,t))},listConnectionAccounts(...e){return r.listConnectionAccounts(...e).then(e=>e(n,t))},refreshBrokerageAuthorization(...e){return r.refreshBrokerageAuthorization(...e).then(e=>e(n,t))},returnRates(...e){return r.returnRates(...e).then(e=>e(n,t))},syncBrokerageAuthorizationTransactions(...e){return r.syncBrokerageAuthorizationTransactions(...e).then(e=>e(n,t))}}};var yr=class extends R{deleteConnection(...e){return X(this.configuration).deleteConnection(...e).then(e=>e(this.axios,this.basePath))}detailBrokerageAuthorization(...e){return X(this.configuration).detailBrokerageAuthorization(...e).then(e=>e(this.axios,this.basePath))}disableBrokerageAuthorization(...e){return X(this.configuration).disableBrokerageAuthorization(...e).then(e=>e(this.axios,this.basePath))}listBrokerageAuthorizationAccounts(...e){return X(this.configuration).listBrokerageAuthorizationAccounts(...e).then(e=>e(this.axios,this.basePath))}listBrokerageAuthorizations(...e){return X(this.configuration).listBrokerageAuthorizations(...e).then(e=>e(this.axios,this.basePath))}listConnectionAccounts(...e){return X(this.configuration).listConnectionAccounts(...e).then(e=>e(this.axios,this.basePath))}refreshBrokerageAuthorization(...e){return X(this.configuration).refreshBrokerageAuthorization(...e).then(e=>e(this.axios,this.basePath))}returnRates(...e){return X(this.configuration).returnRates(...e).then(e=>e(this.axios,this.basePath))}syncBrokerageAuthorizationTransactions(...e){return X(this.configuration).syncBrokerageAuthorizationTransactions(...e).then(e=>e(this.axios,this.basePath))}},br=class extends yr{};let xr=function(e){return{addSubscription:async(t,n,r,i={})=>{B(`addSubscription`,`tradeDetectionAddSubscriptionRequest`,t);let a=`/snapTrade/tradeDetection/subscriptions`,o=new URL(a,z),s;e&&(s=e.baseOptions);let c={method:`POST`,...s,...i},l=e&&!K()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};l[`Content-Type`]=`application/json`;let f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},q({requestBody:t,queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/snapTrade/tradeDetection/subscriptions`,httpMethod:`POST`,operationAuth:d}),c.data=U(t,c,e),H(o,u),{url:W(o),options:c}},cancelSubscription:async(t,n={})=>{B(`cancelSubscription`,`tradeDetectionCancelSubscriptionRequest`,t);let r=`/snapTrade/tradeDetection/subscriptions/cancel`,i=new URL(r,z),a;e&&(a=e.baseOptions);let o={method:`POST`,...a,...n},s=e&&!K()?{"User-Agent":e.userAgent}:{},c={};e?.authMode===`commercialApiKey`&&await V({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e}),e?.authMode===`personalApiKey`&&await V({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e});let l={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};s[`Content-Type`]=`application/json`;let u=a&&a.headers?a.headers:{};return o.headers={...s,...u,...n.headers},q({requestBody:t,queryParameters:c,requestConfig:o,path:r,configuration:e,pathTemplate:`/snapTrade/tradeDetection/subscriptions/cancel`,httpMethod:`POST`,operationAuth:l}),o.data=U(t,o,e),H(i,c),{url:W(i),options:o}},getAccountDetails:async(t,n,r,i={})=>{B(`getAccountDetails`,`accountId`,t);let a=`/accounts/{accountId}/details`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),o=new URL(a,z),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l=e&&!K()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},q({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/accounts/{accountId}/details`,httpMethod:`GET`,operationAuth:d}),H(o,u),{url:W(o),options:c}},getUserAccountOrderDetailV2:async(t,n,r,i,a={})=>{B(`getUserAccountOrderDetailV2`,`accountId`,t),B(`getUserAccountOrderDetailV2`,`brokerageOrderId`,n);let o=`/accounts/{accountId}/orders/details/v2/{brokerageOrderId}`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))).replace(`{brokerageOrderId}`,encodeURIComponent(String(n===void 0?`-brokerageOrderId-`:n))),s=new URL(o,z),c;e&&(c=e.baseOptions);let l={method:`GET`,...c,...a},u=e&&!K()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},q({queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/orders/details/v2/{brokerageOrderId}`,httpMethod:`GET`,operationAuth:f}),H(s,d),{url:W(s),options:l}},getUserAccountOrdersV2:async(t,n,r,i,a,o={})=>{B(`getUserAccountOrdersV2`,`accountId`,t);let s=`/accounts/{accountId}/orders/v2`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),c=new URL(s,z),l;e&&(l=e.baseOptions);let u={method:`GET`,...l,...o},d=e&&!K()?{"User-Agent":e.userAgent}:{},f={};e?.authMode===`commercialApiKey`&&(await V({object:f,key:`clientId`,keyParamName:`clientId`,configuration:e}),i!==void 0&&(f.userId=i),a!==void 0&&(f.userSecret=a)),e?.authMode===`personalApiKey`&&await V({object:f,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(f.state=n),r!==void 0&&(f.days=r);let p={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},m=l&&l.headers?l.headers:{};return u.headers={...d,...m,...o.headers},q({queryParameters:f,requestConfig:u,path:s,configuration:e,pathTemplate:`/accounts/{accountId}/orders/v2`,httpMethod:`GET`,operationAuth:p}),H(c,f),{url:W(c),options:u}},getUserAccountRecentOrdersV2:async(t,n,r,i,a={})=>{B(`getUserAccountRecentOrdersV2`,`accountId`,t);let o=`/accounts/{accountId}/recentOrders/v2`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,z),c;e&&(c=e.baseOptions);let l={method:`GET`,...c,...a},u=e&&!K()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(d.only_executed=n);let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},q({queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/recentOrders/v2`,httpMethod:`GET`,operationAuth:f}),H(s,d),{url:W(s),options:l}},listAllUserAccounts:async(t,n,r={})=>{let i=`/accounts/all`,a=new URL(i,z),o;e&&(o=e.baseOptions);let s={method:`GET`,...o,...r},c=e&&!K()?{"User-Agent":e.userAgent}:{},l={};e?.authMode===`commercialApiKey`&&(await V({object:l,key:`clientId`,keyParamName:`clientId`,configuration:e}),t!==void 0&&(l.userId=t),n!==void 0&&(l.userSecret=n)),e?.authMode===`personalApiKey`&&await V({object:l,key:`clientId`,keyParamName:`clientId`,configuration:e});let u={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},d=o&&o.headers?o.headers:{};return s.headers={...c,...d,...r.headers},q({queryParameters:l,requestConfig:s,path:i,configuration:e,pathTemplate:`/accounts/all`,httpMethod:`GET`,operationAuth:u}),H(a,l),{url:W(a),options:s}},listSubscriptions:async(t={})=>{let n=`/snapTrade/tradeDetection/subscriptions`,r=new URL(n,z),i;e&&(i=e.baseOptions);let a={method:`GET`,...i,...t},o=e&&!K()?{"User-Agent":e.userAgent}:{},s={};e?.authMode===`commercialApiKey`&&await V({object:s,key:`clientId`,keyParamName:`clientId`,configuration:e}),e?.authMode===`personalApiKey`&&await V({object:s,key:`clientId`,keyParamName:`clientId`,configuration:e});let c={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},l=i&&i.headers?i.headers:{};return a.headers={...o,...l,...t.headers},q({queryParameters:s,requestConfig:a,path:n,configuration:e,pathTemplate:`/snapTrade/tradeDetection/subscriptions`,httpMethod:`GET`,operationAuth:c}),H(r,s),{url:W(r),options:a}},placeSimpleOrder:async(t,n,r,i,a={})=>{B(`placeSimpleOrder`,`accountId`,t),B(`placeSimpleOrder`,`simpleTradeForm`,n);let o=`/accounts/{accountId}/trading/simple`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,z),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!K()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},q({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/trading/simple`,httpMethod:`POST`,operationAuth:f}),l.data=U(n,l,e),H(s,d),{url:W(s),options:l}}}},Z=function(e){let t=xr(e);return{async addSubscription(...n){let[r={},i]=n,a={account_id:r.account_id,check_interval_seconds:r.check_interval_seconds};return G(await t.addSubscription(a,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async cancelSubscription(...n){let[r={},i]=n,a={account_id:r.account_id};return G(await t.cancelSubscription(a,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getAccountDetails(...n){let[r={},i]=n;return G(await t.getAccountDetails(r.accountId,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountOrderDetailV2(...n){let[r={},i]=n;return G(await t.getUserAccountOrderDetailV2(r.accountId,r.brokerageOrderId,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountOrdersV2(...n){let[r={},i]=n;return G(await t.getUserAccountOrdersV2(r.accountId,r.state,r.days,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountRecentOrdersV2(...n){let[r={},i]=n;return G(await t.getUserAccountRecentOrdersV2(r.accountId,r.onlyExecuted,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async listAllUserAccounts(...n){let[r={},i]=n;return G(await t.listAllUserAccounts(r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async listSubscriptions(...n){let[r]=n;return G(await t.listSubscriptions(r),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async placeSimpleOrder(...n){let[r={},i]=n,a={order_type:r.order_type,time_in_force:r.time_in_force,legs:r.legs,limit_price:r.limit_price,stop_price:r.stop_price,price_effect:r.price_effect,client_order_id:r.client_order_id,expiry_date:r.expiry_date,notional_value:r.notional_value,trading_session:r.trading_session};return G(await t.placeSimpleOrder(r.accountId,a,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})}}},Sr=function(e,t,n){let r=Z(e);return{addSubscription(...e){return r.addSubscription(...e).then(e=>e(n,t))},cancelSubscription(...e){return r.cancelSubscription(...e).then(e=>e(n,t))},getAccountDetails(...e){return r.getAccountDetails(...e).then(e=>e(n,t))},getUserAccountOrderDetailV2(...e){return r.getUserAccountOrderDetailV2(...e).then(e=>e(n,t))},getUserAccountOrdersV2(...e){return r.getUserAccountOrdersV2(...e).then(e=>e(n,t))},getUserAccountRecentOrdersV2(...e){return r.getUserAccountRecentOrdersV2(...e).then(e=>e(n,t))},listAllUserAccounts(...e){return r.listAllUserAccounts(...e).then(e=>e(n,t))},listSubscriptions(...e){return r.listSubscriptions(...e).then(e=>e(n,t))},placeSimpleOrder(...e){return r.placeSimpleOrder(...e).then(e=>e(n,t))}}};var Cr=class extends R{addSubscription(...e){return Z(this.configuration).addSubscription(...e).then(e=>e(this.axios,this.basePath))}cancelSubscription(...e){return Z(this.configuration).cancelSubscription(...e).then(e=>e(this.axios,this.basePath))}getAccountDetails(...e){return Z(this.configuration).getAccountDetails(...e).then(e=>e(this.axios,this.basePath))}getUserAccountOrderDetailV2(...e){return Z(this.configuration).getUserAccountOrderDetailV2(...e).then(e=>e(this.axios,this.basePath))}getUserAccountOrdersV2(...e){return Z(this.configuration).getUserAccountOrdersV2(...e).then(e=>e(this.axios,this.basePath))}getUserAccountRecentOrdersV2(...e){return Z(this.configuration).getUserAccountRecentOrdersV2(...e).then(e=>e(this.axios,this.basePath))}listAllUserAccounts(...e){return Z(this.configuration).listAllUserAccounts(...e).then(e=>e(this.axios,this.basePath))}listSubscriptions(...e){return Z(this.configuration).listSubscriptions(...e).then(e=>e(this.axios,this.basePath))}placeSimpleOrder(...e){return Z(this.configuration).placeSimpleOrder(...e).then(e=>e(this.axios,this.basePath))}},wr=class extends Cr{};let Tr=function(e){return{getPartnerInfo:async(t={})=>{let n=`/snapTrade/partners`,r=new URL(n,z),i;e&&(i=e.baseOptions);let a={method:`GET`,...i,...t},o=e&&!K()?{"User-Agent":e.userAgent}:{},s={};e?.authMode===`commercialApiKey`&&await V({object:s,key:`clientId`,keyParamName:`clientId`,configuration:e}),e?.authMode===`personalApiKey`&&await V({object:s,key:`clientId`,keyParamName:`clientId`,configuration:e});let c={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},l=i&&i.headers?i.headers:{};return a.headers={...o,...l,...t.headers},q({queryParameters:s,requestConfig:a,path:n,configuration:e,pathTemplate:`/snapTrade/partners`,httpMethod:`GET`,operationAuth:c}),H(r,s),{url:W(r),options:a}},getStockExchanges:async(t={})=>{let n=`/exchanges`,r=new URL(n,z),i;e&&(i=e.baseOptions);let a={method:`GET`,...i,...t},o=e&&!K()?{"User-Agent":e.userAgent}:{},s={};e?.authMode===`commercialApiKey`&&await V({object:s,key:`clientId`,keyParamName:`clientId`,configuration:e}),e?.authMode===`personalApiKey`&&await V({object:s,key:`clientId`,keyParamName:`clientId`,configuration:e});let c={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},l=i&&i.headers?i.headers:{};return a.headers={...o,...l,...t.headers},q({queryParameters:s,requestConfig:a,path:n,configuration:e,pathTemplate:`/exchanges`,httpMethod:`GET`,operationAuth:c}),H(r,s),{url:W(r),options:a}},getSymbols:async(t,n={})=>{let r=`/symbols`,i=new URL(r,z),a;e&&(a=e.baseOptions);let o={method:`POST`,...a,...n},s=e&&!K()?{"User-Agent":e.userAgent}:{},c={};e?.authMode===`commercialApiKey`&&await V({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e}),e?.authMode===`personalApiKey`&&await V({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e});let l={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};s[`Content-Type`]=`application/json`;let u=a&&a.headers?a.headers:{};return o.headers={...s,...u,...n.headers},q({requestBody:t,queryParameters:c,requestConfig:o,path:r,configuration:e,pathTemplate:`/symbols`,httpMethod:`POST`,operationAuth:l}),o.data=U(t,o,e),H(i,c),{url:W(i),options:o}},getSymbolsByTicker:async(t,n={})=>{B(`getSymbolsByTicker`,`query`,t);let r=`/symbols/{query}`.replace(`{query}`,encodeURIComponent(String(t===void 0?`-query-`:t))),i=new URL(r,z),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s=e&&!K()?{"User-Agent":e.userAgent}:{},c={};e?.authMode===`commercialApiKey`&&await V({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e}),e?.authMode===`personalApiKey`&&await V({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e});let l={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},u=a&&a.headers?a.headers:{};return o.headers={...s,...u,...n.headers},q({queryParameters:c,requestConfig:o,path:r,configuration:e,pathTemplate:`/symbols/{query}`,httpMethod:`GET`,operationAuth:l}),H(i,c),{url:W(i),options:o}},listAllBrokerageAuthorizationType:async(t,n={})=>{let r=`/brokerageAuthorizationTypes`,i=new URL(r,z),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s=e&&!K()?{"User-Agent":e.userAgent}:{},c={};e?.authMode===`commercialApiKey`&&await V({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e}),e?.authMode===`personalApiKey`&&await V({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e}),t!==void 0&&(c.brokerage=t);let l={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},u=a&&a.headers?a.headers:{};return o.headers={...s,...u,...n.headers},q({queryParameters:c,requestConfig:o,path:r,configuration:e,pathTemplate:`/brokerageAuthorizationTypes`,httpMethod:`GET`,operationAuth:l}),H(i,c),{url:W(i),options:o}},listAllBrokerageInstruments:async(t,n={})=>{B(`listAllBrokerageInstruments`,`slug`,t);let r=`/brokerages/{slug}/instruments`.replace(`{slug}`,encodeURIComponent(String(t===void 0?`-slug-`:t))),i=new URL(r,z),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s=e&&!K()?{"User-Agent":e.userAgent}:{},c={};e?.authMode===`commercialApiKey`&&await V({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e}),e?.authMode===`personalApiKey`&&await V({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e});let l={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},u=a&&a.headers?a.headers:{};return o.headers={...s,...u,...n.headers},q({queryParameters:c,requestConfig:o,path:r,configuration:e,pathTemplate:`/brokerages/{slug}/instruments`,httpMethod:`GET`,operationAuth:l}),H(i,c),{url:W(i),options:o}},listAllBrokerages:async(t={})=>{let n=`/brokerages`,r=new URL(n,z),i;e&&(i=e.baseOptions);let a={method:`GET`,...i,...t},o=e&&!K()?{"User-Agent":e.userAgent}:{},s={};e?.authMode===`commercialApiKey`&&await V({object:s,key:`clientId`,keyParamName:`clientId`,configuration:e}),e?.authMode===`personalApiKey`&&await V({object:s,key:`clientId`,keyParamName:`clientId`,configuration:e});let c={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},l=i&&i.headers?i.headers:{};return a.headers={...o,...l,...t.headers},q({queryParameters:s,requestConfig:a,path:n,configuration:e,pathTemplate:`/brokerages`,httpMethod:`GET`,operationAuth:c}),H(r,s),{url:W(r),options:a}},listInstitutions:async(t={})=>{let n=`/institutions`,r=new URL(n,z),i;e&&(i=e.baseOptions);let a={method:`GET`,...i,...t},o=e&&!K()?{"User-Agent":e.userAgent}:{},s={},c={authModes:[`public`],selectedAuthMode:e?.authMode},l=i&&i.headers?i.headers:{};return a.headers={...o,...l,...t.headers},q({queryParameters:s,requestConfig:a,path:n,configuration:e,pathTemplate:`/institutions`,httpMethod:`GET`,operationAuth:c}),H(r,s),{url:W(r),options:a}},symbolSearchUserAccount:async(t,n,r,i,a={})=>{B(`symbolSearchUserAccount`,`accountId`,t);let o=`/accounts/{accountId}/symbols`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,z),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!K()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},q({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/symbols`,httpMethod:`POST`,operationAuth:f}),l.data=U(n,l,e),H(s,d),{url:W(s),options:l}}}},Q=function(e){let t=Tr(e);return{async getPartnerInfo(...n){let[r]=n;return G(await t.getPartnerInfo(r),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getStockExchanges(...n){let[r]=n;return G(await t.getStockExchanges(r),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getSymbols(...n){let[r={},i]=n,a={substring:r.substring};return G(await t.getSymbols(a,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getSymbolsByTicker(...n){let[r={},i]=n;return G(await t.getSymbolsByTicker(r.query,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async listAllBrokerageAuthorizationType(...n){let[r={},i]=n;return G(await t.listAllBrokerageAuthorizationType(r.brokerage,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async listAllBrokerageInstruments(...n){let[r={},i]=n;return G(await t.listAllBrokerageInstruments(r.slug,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async listAllBrokerages(...n){let[r]=n;return G(await t.listAllBrokerages(r),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async listInstitutions(n){return G(await t.listInstitutions(n),I,L,e,{authModes:[`public`]})},async symbolSearchUserAccount(...n){let[r={},i]=n,a={substring:r.substring};return G(await t.symbolSearchUserAccount(r.accountId,a,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})}}},Er=function(e,t,n){let r=Q(e);return{getPartnerInfo(...e){return r.getPartnerInfo(...e).then(e=>e(n,t))},getStockExchanges(...e){return r.getStockExchanges(...e).then(e=>e(n,t))},getSymbols(...e){return r.getSymbols(...e).then(e=>e(n,t))},getSymbolsByTicker(...e){return r.getSymbolsByTicker(...e).then(e=>e(n,t))},listAllBrokerageAuthorizationType(...e){return r.listAllBrokerageAuthorizationType(...e).then(e=>e(n,t))},listAllBrokerageInstruments(...e){return r.listAllBrokerageInstruments(...e).then(e=>e(n,t))},listAllBrokerages(...e){return r.listAllBrokerages(...e).then(e=>e(n,t))},listInstitutions(e){return r.listInstitutions(e).then(e=>e(n,t))},symbolSearchUserAccount(...e){return r.symbolSearchUserAccount(...e).then(e=>e(n,t))}}};var Dr=class extends R{getPartnerInfo(...e){return Q(this.configuration).getPartnerInfo(...e).then(e=>e(this.axios,this.basePath))}getStockExchanges(...e){return Q(this.configuration).getStockExchanges(...e).then(e=>e(this.axios,this.basePath))}getSymbols(...e){return Q(this.configuration).getSymbols(...e).then(e=>e(this.axios,this.basePath))}getSymbolsByTicker(...e){return Q(this.configuration).getSymbolsByTicker(...e).then(e=>e(this.axios,this.basePath))}listAllBrokerageAuthorizationType(...e){return Q(this.configuration).listAllBrokerageAuthorizationType(...e).then(e=>e(this.axios,this.basePath))}listAllBrokerageInstruments(...e){return Q(this.configuration).listAllBrokerageInstruments(...e).then(e=>e(this.axios,this.basePath))}listAllBrokerages(...e){return Q(this.configuration).listAllBrokerages(...e).then(e=>e(this.axios,this.basePath))}listInstitutions(e){return Q(this.configuration).listInstitutions(e).then(e=>e(this.axios,this.basePath))}symbolSearchUserAccount(...e){return Q(this.configuration).symbolSearchUserAccount(...e).then(e=>e(this.axios,this.basePath))}},Or=class extends Dr{};let kr=function(e){return{cancelOrder:async(t,n,r,i,a={})=>{B(`cancelOrder`,`accountId`,t),B(`cancelOrder`,`accountInformationGetUserAccountOrderDetailRequest`,n);let o=`/accounts/{accountId}/trading/cancel`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,z),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!K()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},q({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/trading/cancel`,httpMethod:`POST`,operationAuth:f}),l.data=U(n,l,e),H(s,d),{url:W(s),options:l}},getCryptocurrencyPairQuote:async(t,n,r,i,a={})=>{B(`getCryptocurrencyPairQuote`,`accountId`,t),B(`getCryptocurrencyPairQuote`,`instrumentSymbol`,n);let o=`/accounts/{accountId}/trading/instruments/cryptocurrencyPairs/{instrumentSymbol}/quote`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))).replace(`{instrumentSymbol}`,encodeURIComponent(String(n===void 0?`-instrumentSymbol-`:n))),s=new URL(o,z),c;e&&(c=e.baseOptions);let l={method:`GET`,...c,...a},u=e&&!K()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},q({queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/trading/instruments/cryptocurrencyPairs/{instrumentSymbol}/quote`,httpMethod:`GET`,operationAuth:f}),H(s,d),{url:W(s),options:l}},getOptionImpact:async(t,n,r,i,a={})=>{B(`getOptionImpact`,`accountId`,t),B(`getOptionImpact`,`mlegTradeForm`,n);let o=`/accounts/{accountId}/trading/options/impact`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,z),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!K()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},q({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/trading/options/impact`,httpMethod:`POST`,operationAuth:f}),l.data=U(n,l,e),H(s,d),{url:W(s),options:l}},getOrderImpact:async(t,n,r,i={})=>{B(`getOrderImpact`,`manualTradeForm`,t);let a=`/trade/impact`,o=new URL(a,z),s;e&&(s=e.baseOptions);let c={method:`POST`,...s,...i},l=e&&!K()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};l[`Content-Type`]=`application/json`;let f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},q({requestBody:t,queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/trade/impact`,httpMethod:`POST`,operationAuth:d}),c.data=U(t,c,e),H(o,u),{url:W(o),options:c}},getUserAccountOptionQuotes:async(t,n,r,i,a={})=>{B(`getUserAccountOptionQuotes`,`accountId`,t),B(`getUserAccountOptionQuotes`,`symbol`,n);let o=`/accounts/{accountId}/quotes/options`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,z),c;e&&(c=e.baseOptions);let l={method:`GET`,...c,...a},u=e&&!K()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(d.symbol=n);let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},q({queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/quotes/options`,httpMethod:`GET`,operationAuth:f}),H(s,d),{url:W(s),options:l}},getUserAccountQuotes:async(t,n,r,i,a,o={})=>{B(`getUserAccountQuotes`,`symbols`,t),B(`getUserAccountQuotes`,`accountId`,n);let s=`/accounts/{accountId}/quotes`.replace(`{accountId}`,encodeURIComponent(String(n===void 0?`-accountId-`:n))),c=new URL(s,z),l;e&&(l=e.baseOptions);let u={method:`GET`,...l,...o},d=e&&!K()?{"User-Agent":e.userAgent}:{},f={};e?.authMode===`commercialApiKey`&&(await V({object:f,key:`clientId`,keyParamName:`clientId`,configuration:e}),i!==void 0&&(f.userId=i),a!==void 0&&(f.userSecret=a)),e?.authMode===`personalApiKey`&&await V({object:f,key:`clientId`,keyParamName:`clientId`,configuration:e}),t!==void 0&&(f.symbols=t),r!==void 0&&(f.use_ticker=r);let p={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},m=l&&l.headers?l.headers:{};return u.headers={...d,...m,...o.headers},q({queryParameters:f,requestConfig:u,path:s,configuration:e,pathTemplate:`/accounts/{accountId}/quotes`,httpMethod:`GET`,operationAuth:p}),H(c,f),{url:W(c),options:u}},placeComplexOrder:async(t,n,r,i,a={})=>{B(`placeComplexOrder`,`accountId`,t),B(`placeComplexOrder`,`manualTradeFormComplex`,n);let o=`/accounts/{accountId}/trading/complex`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,z),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!K()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},q({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/trading/complex`,httpMethod:`POST`,operationAuth:f}),l.data=U(n,l,e),H(s,d),{url:W(s),options:l}},placeCryptoOrder:async(t,n,r,i,a={})=>{B(`placeCryptoOrder`,`accountId`,t),B(`placeCryptoOrder`,`cryptoOrderForm`,n);let o=`/accounts/{accountId}/trading/crypto`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,z),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!K()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},q({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/trading/crypto`,httpMethod:`POST`,operationAuth:f}),l.data=U(n,l,e),H(s,d),{url:W(s),options:l}},placeForceOrder:async(t,n,r,i={})=>{B(`placeForceOrder`,`manualTradeFormWithOptions`,t);let a=`/trade/place`,o=new URL(a,z),s;e&&(s=e.baseOptions);let c={method:`POST`,...s,...i},l=e&&!K()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await V({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};l[`Content-Type`]=`application/json`;let f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},q({requestBody:t,queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/trade/place`,httpMethod:`POST`,operationAuth:d}),c.data=U(t,c,e),H(o,u),{url:W(o),options:c}},placeMlegOrder:async(t,n,r,i,a={})=>{B(`placeMlegOrder`,`accountId`,t),B(`placeMlegOrder`,`mlegTradeForm`,n);let o=`/accounts/{accountId}/trading/options`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,z),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!K()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},q({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/trading/options`,httpMethod:`POST`,operationAuth:f}),l.data=U(n,l,e),H(s,d),{url:W(s),options:l}},placeOrder:async(t,n,r,i,a={})=>{B(`placeOrder`,`tradeId`,t);let o=`/trade/{tradeId}`.replace(`{tradeId}`,encodeURIComponent(String(t===void 0?`-tradeId-`:t))),s=new URL(o,z),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!K()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},q({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/trade/{tradeId}`,httpMethod:`POST`,operationAuth:f}),l.data=U(n,l,e),H(s,d),{url:W(s),options:l}},previewCryptoOrder:async(t,n,r,i,a={})=>{B(`previewCryptoOrder`,`accountId`,t),B(`previewCryptoOrder`,`cryptoOrderForm`,n);let o=`/accounts/{accountId}/trading/crypto/preview`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,z),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!K()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},q({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/trading/crypto/preview`,httpMethod:`POST`,operationAuth:f}),l.data=U(n,l,e),H(s,d),{url:W(s),options:l}},replaceOrder:async(t,n,r,i,a={})=>{B(`replaceOrder`,`accountId`,t),B(`replaceOrder`,`manualTradeReplaceForm`,n);let o=`/accounts/{accountId}/trading/replace`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,z),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!K()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await V({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},q({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/trading/replace`,httpMethod:`POST`,operationAuth:f}),l.data=U(n,l,e),H(s,d),{url:W(s),options:l}},searchCryptocurrencyPairInstruments:async(t,n,r,i,a,o={})=>{B(`searchCryptocurrencyPairInstruments`,`accountId`,t);let s=`/accounts/{accountId}/trading/instruments/cryptocurrencyPairs`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),c=new URL(s,z),l;e&&(l=e.baseOptions);let u={method:`GET`,...l,...o},d=e&&!K()?{"User-Agent":e.userAgent}:{},f={};e?.authMode===`commercialApiKey`&&(await V({object:f,key:`clientId`,keyParamName:`clientId`,configuration:e}),i!==void 0&&(f.userId=i),a!==void 0&&(f.userSecret=a)),e?.authMode===`personalApiKey`&&await V({object:f,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(f.base=n),r!==void 0&&(f.quote=r);let p={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},m=l&&l.headers?l.headers:{};return u.headers={...d,...m,...o.headers},q({queryParameters:f,requestConfig:u,path:s,configuration:e,pathTemplate:`/accounts/{accountId}/trading/instruments/cryptocurrencyPairs`,httpMethod:`GET`,operationAuth:p}),H(c,f),{url:W(c),options:u}}}},$=function(e){let t=kr(e);return{async cancelOrder(...n){let[r={},i]=n,a={brokerage_order_id:r.brokerage_order_id};return G(await t.cancelOrder(r.accountId,a,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getCryptocurrencyPairQuote(...n){let[r={},i]=n;return G(await t.getCryptocurrencyPairQuote(r.accountId,r.instrumentSymbol,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getOptionImpact(...n){let[r={},i]=n,a={order_type:r.order_type,time_in_force:r.time_in_force,limit_price:r.limit_price,stop_price:r.stop_price,price_effect:r.price_effect,legs:r.legs};return G(await t.getOptionImpact(r.accountId,a,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getOrderImpact(...n){let[r={},i]=n,a={account_id:r.account_id,action:r.action,universal_symbol_id:r.universal_symbol_id,order_type:r.order_type,time_in_force:r.time_in_force,price:r.price,stop:r.stop,units:r.units,notional_value:r.notional_value};return G(await t.getOrderImpact(a,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountOptionQuotes(...n){let[r={},i]=n;return G(await t.getUserAccountOptionQuotes(r.accountId,r.symbol,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountQuotes(...n){let[r={},i]=n;return G(await t.getUserAccountQuotes(r.symbols,r.accountId,r.useTicker,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async placeComplexOrder(...n){let[r={},i]=n,a={type:r.type,orders:r.orders,client_order_id:r.client_order_id};return G(await t.placeComplexOrder(r.accountId,a,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async placeCryptoOrder(...n){let[r={},i]=n,a={instrument:r.instrument,side:r.side,type:r.type,time_in_force:r.time_in_force,amount:r.amount,limit_price:r.limit_price,stop_price:r.stop_price,post_only:r.post_only,expiration_date:r.expiration_date};return G(await t.placeCryptoOrder(r.accountId,a,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async placeForceOrder(...n){let[r={},i]=n,a={account_id:r.account_id,action:r.action,universal_symbol_id:r.universal_symbol_id,symbol:r.symbol,order_type:r.order_type,time_in_force:r.time_in_force,trading_session:r.trading_session,expiry_date:r.expiry_date,price:r.price,stop:r.stop,units:r.units,notional_value:r.notional_value,client_order_id:r.client_order_id};return G(await t.placeForceOrder(a,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async placeMlegOrder(...n){let[r={},i]=n,a={order_type:r.order_type,time_in_force:r.time_in_force,limit_price:r.limit_price,stop_price:r.stop_price,price_effect:r.price_effect,legs:r.legs};return G(await t.placeMlegOrder(r.accountId,a,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async placeOrder(...n){let[r={},i]=n,a={wait_to_confirm:r.wait_to_confirm};return G(await t.placeOrder(r.tradeId,a,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async previewCryptoOrder(...n){let[r={},i]=n,a={instrument:r.instrument,side:r.side,type:r.type,time_in_force:r.time_in_force,amount:r.amount,limit_price:r.limit_price,stop_price:r.stop_price,post_only:r.post_only,expiration_date:r.expiration_date};return G(await t.previewCryptoOrder(r.accountId,a,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async replaceOrder(...n){let[r={},i]=n,a={brokerage_order_id:r.brokerage_order_id,action:r.action,order_type:r.order_type,time_in_force:r.time_in_force,price:r.price,symbol:r.symbol,stop:r.stop,units:r.units};return G(await t.replaceOrder(r.accountId,a,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async searchCryptocurrencyPairInstruments(...n){let[r={},i]=n;return G(await t.searchCryptocurrencyPairInstruments(r.accountId,r.base,r.quote,r.userId,r.userSecret,i),I,L,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})}}},Ar=function(e,t,n){let r=$(e);return{cancelOrder(...e){return r.cancelOrder(...e).then(e=>e(n,t))},getCryptocurrencyPairQuote(...e){return r.getCryptocurrencyPairQuote(...e).then(e=>e(n,t))},getOptionImpact(...e){return r.getOptionImpact(...e).then(e=>e(n,t))},getOrderImpact(...e){return r.getOrderImpact(...e).then(e=>e(n,t))},getUserAccountOptionQuotes(...e){return r.getUserAccountOptionQuotes(...e).then(e=>e(n,t))},getUserAccountQuotes(...e){return r.getUserAccountQuotes(...e).then(e=>e(n,t))},placeComplexOrder(...e){return r.placeComplexOrder(...e).then(e=>e(n,t))},placeCryptoOrder(...e){return r.placeCryptoOrder(...e).then(e=>e(n,t))},placeForceOrder(...e){return r.placeForceOrder(...e).then(e=>e(n,t))},placeMlegOrder(...e){return r.placeMlegOrder(...e).then(e=>e(n,t))},placeOrder(...e){return r.placeOrder(...e).then(e=>e(n,t))},previewCryptoOrder(...e){return r.previewCryptoOrder(...e).then(e=>e(n,t))},replaceOrder(...e){return r.replaceOrder(...e).then(e=>e(n,t))},searchCryptocurrencyPairInstruments(...e){return r.searchCryptocurrencyPairInstruments(...e).then(e=>e(n,t))}}};var jr=class extends R{cancelOrder(...e){return $(this.configuration).cancelOrder(...e).then(e=>e(this.axios,this.basePath))}getCryptocurrencyPairQuote(...e){return $(this.configuration).getCryptocurrencyPairQuote(...e).then(e=>e(this.axios,this.basePath))}getOptionImpact(...e){return $(this.configuration).getOptionImpact(...e).then(e=>e(this.axios,this.basePath))}getOrderImpact(...e){return $(this.configuration).getOrderImpact(...e).then(e=>e(this.axios,this.basePath))}getUserAccountOptionQuotes(...e){return $(this.configuration).getUserAccountOptionQuotes(...e).then(e=>e(this.axios,this.basePath))}getUserAccountQuotes(...e){return $(this.configuration).getUserAccountQuotes(...e).then(e=>e(this.axios,this.basePath))}placeComplexOrder(...e){return $(this.configuration).placeComplexOrder(...e).then(e=>e(this.axios,this.basePath))}placeCryptoOrder(...e){return $(this.configuration).placeCryptoOrder(...e).then(e=>e(this.axios,this.basePath))}placeForceOrder(...e){return $(this.configuration).placeForceOrder(...e).then(e=>e(this.axios,this.basePath))}placeMlegOrder(...e){return $(this.configuration).placeMlegOrder(...e).then(e=>e(this.axios,this.basePath))}placeOrder(...e){return $(this.configuration).placeOrder(...e).then(e=>e(this.axios,this.basePath))}previewCryptoOrder(...e){return $(this.configuration).previewCryptoOrder(...e).then(e=>e(this.axios,this.basePath))}replaceOrder(...e){return $(this.configuration).replaceOrder(...e).then(e=>e(this.axios,this.basePath))}searchCryptocurrencyPairInstruments(...e){return $(this.configuration).searchCryptocurrencyPairInstruments(...e).then(e=>e(this.axios,this.basePath))}},Mr=class extends jr{},Nr=class e{constructor(e){this.mode=`commercialApiKey`,this.consumerKey=e.consumerKey,this.clientId=e.clientId}static create(t){return new e(t)}},Pr=class e{constructor(e){this.mode=`personalApiKey`,this.consumerKey=e.consumerKey,this.clientId=e.clientId}static create(t){return new e(t)}},Fr=class{constructor(){}static commercialApiKey(e){return Nr.create(e)}static personalApiKey(e){return Pr.create(e)}},Ir=class{constructor(e){this.authMode=e.auth.mode,this.apiKey={},e.auth.mode===`commercialApiKey`&&(this.consumerKey=e.auth.consumerKey,e.auth.clientId!==void 0&&(this.apiKey.clientId=e.auth.clientId)),e.auth.mode===`personalApiKey`&&(this.consumerKey=e.auth.consumerKey,e.auth.clientId!==void 0&&(this.apiKey.clientId=e.auth.clientId)),this.basePath=e.basePath,this.baseOptions=e.baseOptions??{},this.userAgent=e.userAgent===void 0?`Konfig/12.2.18/typescript`:e.userAgent,this.formDataCtor=e.formDataCtor}isJsonMime(e){return e!==null&&(RegExp(`^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$`,`i`).test(e)||e.toLowerCase()===`application/json-patch+json`)}},Lr=class{constructor(e){}},Rr=class extends Lr{constructor(e){super(e);let t=new Ir(e);this.accountInformation=new sr(t),this.apiStatus=new fr(t),this.authentication=new gr(t),this.connections=new br(t),this.experimentalEndpoints=new wr(t),this.referenceData=new Or(t),this.trading=new Mr(t)}};e.AccountInformationApi=sr,e.AccountInformationApiAxiosParamCreator=ir,e.AccountInformationApiFactory=ar,e.AccountInformationApiFp=J,e.AccountInformationApiGenerated=or,e.ApiStatusApi=fr,e.ApiStatusApiAxiosParamCreator=cr,e.ApiStatusApiFactory=ur,e.ApiStatusApiFp=lr,e.ApiStatusApiGenerated=dr,e.AuthenticationApi=gr,e.AuthenticationApiAxiosParamCreator=pr,e.AuthenticationApiFactory=mr,e.AuthenticationApiFp=Y,e.AuthenticationApiGenerated=hr,e.CommercialApiKeyAuth=Nr,e.Configuration=Ir,e.ConnectionsApi=br,e.ConnectionsApiAxiosParamCreator=_r,e.ConnectionsApiFactory=vr,e.ConnectionsApiFp=X,e.ConnectionsApiGenerated=yr,e.ExperimentalEndpointsApi=wr,e.ExperimentalEndpointsApiAxiosParamCreator=xr,e.ExperimentalEndpointsApiFactory=Sr,e.ExperimentalEndpointsApiFp=Z,e.ExperimentalEndpointsApiGenerated=Cr,e.PersonalApiKeyAuth=Pr,e.ReferenceDataApi=Or,e.ReferenceDataApiAxiosParamCreator=Tr,e.ReferenceDataApiFactory=Er,e.ReferenceDataApiFp=Q,e.ReferenceDataApiGenerated=Dr,e.Snaptrade=Rr,e.SnaptradeAuth=Fr,e.SnaptradeError=Qn,e.TradingApi=Mr,e.TradingApiAxiosParamCreator=kr,e.TradingApiFactory=Ar,e.TradingApiFp=$,e.TradingApiGenerated=jr,e.parseIfJson=er,e.readableStreamToString=$n});
11
+ `+JSON.stringify(n,null,2);super(a),this.name=`SnaptradeError`,this.code=e.code,this.method=e.config?.method?.toUpperCase(),this.url=i,this.status=e.response?.status,this.statusText=e.response?.statusText,this.responseBody=t}toJSON(){return{name:this.name,message:this.message,method:this.method,url:this.url,code:this.code,status:this.status,statusText:this.statusText,responseBody:this.responseBody}}};async function Tr(e){let t=new TextDecoder,n=e.getReader(),r=``;try{for(;;){let{done:e,value:i}=await n.read();if(e)break;let a=t.decode(i,{stream:!0});r+=a}}finally{n.releaseLock()}return r}function Er(e){if(typeof e!=`string`)return e;try{let t=JSON.parse(e);return typeof t==`object`&&t?t:e}catch{return e}}let B=`https://example.com`,V=function(e,t,n){if(n==null)throw new gr(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},H=async function({object:e,key:t,type:n,keyParamName:r,configuration:i,prefix:a}){t=t||r;let o=null;if(i&&i.apiKey)if(typeof i.apiKey==`function`)o=await i.apiKey(r);else if(typeof i.apiKey==`string`)o=i.apiKey;else if(typeof i.apiKey==`object`)r in i.apiKey&&(o=i.apiKey[r]);else throw Error(`Unexpected type ${typeof i.apiKey} for Configuration.apiKey`);o&&(e[t]=a===void 0?o:`${a}${o}`,n===`Cookie`&&(e[t]=`${r}=${e[t]}`))};function Dr(e,t,n=``){typeof t==`object`?Array.isArray(t)?t.forEach(t=>Dr(e,t,n)):Object.keys(t).forEach(r=>Dr(e,t[r],`${n}${n===``?``:`.`}${r}`)):e.has(n)?e.append(n,t):e.set(n,t)}let U=function(e,...t){let n=new URLSearchParams(e.search);Dr(n,t),e.search=n.toString()},W=function(e,t,n){let r=typeof e!=`string`;return(r&&n&&n.isJsonMime?n.isJsonMime(t.headers[`Content-Type`]):r)?JSON.stringify(e===void 0?{}:e):e||``},G=function(e){return Or(e.pathname)+e.search+e.hash},Or=function(e){return e.replace(/\/$/,``)};async function kr(e){let t=0,n=5e3;for(;t<3;)try{return await e()}catch(e){if(R.isAxiosError(e)){if(e.response?.status==429){t++,console.log(`429 error encountered, retrying in ${n/1e3} seconds...`),await new Promise(e=>setTimeout(e,n)),n*=2;continue}let r;try{let t=e.response?.data;r=t,typeof ReadableStream<`u`&&t instanceof ReadableStream&&(r=await Tr(t)),r=Er(r)}catch{r=void 0}throw new wr(e,r,e.response?.headers)}throw e}throw Error(`Request failed after 3 retries due to 429 (rate limit) errors.`)}let K=function(e,t,n,r,i){return async(a=t,o=n)=>{let s=(r?.basePath||o)+e.url;return await br({axiosArgs:e,basePath:o,url:s,configuration:r,operationAuth:i?{...i,selectedAuthMode:r?.authMode}:void 0}),kr(async()=>await a.request({...e.options,url:s}))}};function q(){return typeof window<`u`}function J(e){let{queryParameters:t,operationAuth:n}=e,r=n?.selectedAuthMode;(r===void 0?void 0:n?.requestSigningByAuthMode?.[r])?.signedSecuritySchemes.find(e=>e.toLowerCase().endsWith(`timestamp`))!==void 0&&(t.timestamp=Math.round(new Date().getTime()/1e3).toString())}let Ar=function(e){return{getAccountActivities:async(t,n,r,i,a,o,s,c,l={})=>{V(`getAccountActivities`,`accountId`,t);let u=`/accounts/{accountId}/activities`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),d=new URL(u,B),f;e&&(f=e.baseOptions);let p={method:`GET`,...f,...l},m=e&&!q()?{"User-Agent":e.userAgent}:{},h={};e?.authMode===`commercialApiKey`&&(await H({object:h,key:`clientId`,keyParamName:`clientId`,configuration:e}),s!==void 0&&(h.userId=s),c!==void 0&&(h.userSecret=c)),e?.authMode===`personalApiKey`&&await H({object:h,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(h.startDate=n instanceof Date?n.toISOString().substr(0,10):n),r!==void 0&&(h.endDate=r instanceof Date?r.toISOString().substr(0,10):r),i!==void 0&&(h.offset=i),a!==void 0&&(h.limit=a),o!==void 0&&(h.type=o);let g={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},_=f&&f.headers?f.headers:{};return p.headers={...m,..._,...l.headers},J({queryParameters:h,requestConfig:p,path:u,configuration:e,pathTemplate:`/accounts/{accountId}/activities`,httpMethod:`GET`,operationAuth:g}),U(d,h),{url:G(d),options:p}},getAccountBalanceHistory:async(t,n,r,i={})=>{V(`getAccountBalanceHistory`,`accountId`,t);let a=`/accounts/{accountId}/balanceHistory`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),o=new URL(a,B),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l=e&&!q()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},J({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/accounts/{accountId}/balanceHistory`,httpMethod:`GET`,operationAuth:d}),U(o,u),{url:G(o),options:c}},getAllAccountPositions:async(t,n,r,i={})=>{V(`getAllAccountPositions`,`accountId`,t);let a=`/accounts/{accountId}/positions/all`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),o=new URL(a,B),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l=e&&!q()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},J({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/accounts/{accountId}/positions/all`,httpMethod:`GET`,operationAuth:d}),U(o,u),{url:G(o),options:c}},getUserAccountBalance:async(t,n,r,i={})=>{V(`getUserAccountBalance`,`accountId`,t);let a=`/accounts/{accountId}/balances`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),o=new URL(a,B),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l=e&&!q()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},J({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/accounts/{accountId}/balances`,httpMethod:`GET`,operationAuth:d}),U(o,u),{url:G(o),options:c}},getUserAccountDetails:async(t,n,r,i={})=>{V(`getUserAccountDetails`,`accountId`,t);let a=`/accounts/{accountId}`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),o=new URL(a,B),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l=e&&!q()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},J({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/accounts/{accountId}`,httpMethod:`GET`,operationAuth:d}),U(o,u),{url:G(o),options:c}},getUserAccountOrderDetail:async(t,n,r,i,a={})=>{V(`getUserAccountOrderDetail`,`accountId`,t),V(`getUserAccountOrderDetail`,`accountInformationGetUserAccountOrderDetailRequest`,n);let o=`/accounts/{accountId}/orders/details`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,B),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!q()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},J({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/orders/details`,httpMethod:`POST`,operationAuth:f}),l.data=W(n,l,e),U(s,d),{url:G(s),options:l}},getUserAccountOrders:async(t,n,r,i,a,o={})=>{V(`getUserAccountOrders`,`accountId`,t);let s=`/accounts/{accountId}/orders`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),c=new URL(s,B),l;e&&(l=e.baseOptions);let u={method:`GET`,...l,...o},d=e&&!q()?{"User-Agent":e.userAgent}:{},f={};e?.authMode===`commercialApiKey`&&(await H({object:f,key:`clientId`,keyParamName:`clientId`,configuration:e}),i!==void 0&&(f.userId=i),a!==void 0&&(f.userSecret=a)),e?.authMode===`personalApiKey`&&await H({object:f,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(f.state=n),r!==void 0&&(f.days=r);let p={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},m=l&&l.headers?l.headers:{};return u.headers={...d,...m,...o.headers},J({queryParameters:f,requestConfig:u,path:s,configuration:e,pathTemplate:`/accounts/{accountId}/orders`,httpMethod:`GET`,operationAuth:p}),U(c,f),{url:G(c),options:u}},getUserAccountRecentOrders:async(t,n,r,i,a={})=>{V(`getUserAccountRecentOrders`,`accountId`,t);let o=`/accounts/{accountId}/recentOrders`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,B),c;e&&(c=e.baseOptions);let l={method:`GET`,...c,...a},u=e&&!q()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(d.only_executed=n);let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},J({queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/recentOrders`,httpMethod:`GET`,operationAuth:f}),U(s,d),{url:G(s),options:l}},getUserAccountReturnRates:async(t,n,r,i,a={})=>{V(`getUserAccountReturnRates`,`accountId`,t);let o=`/accounts/{accountId}/returnRates`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,B),c;e&&(c=e.baseOptions);let l={method:`GET`,...c,...a},u=e&&!q()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(d.timeframes=n);let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},J({queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/returnRates`,httpMethod:`GET`,operationAuth:f}),U(s,d),{url:G(s),options:l}},getUserHoldings:async(t,n,r,i={})=>{V(`getUserHoldings`,`accountId`,t);let a=`/accounts/{accountId}/holdings`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),o=new URL(a,B),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l=e&&!q()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},J({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/accounts/{accountId}/holdings`,httpMethod:`GET`,operationAuth:d}),U(o,u),{url:G(o),options:c}},listUserAccounts:async(t,n,r={})=>{let i=`/accounts`,a=new URL(i,B),o;e&&(o=e.baseOptions);let s={method:`GET`,...o,...r},c=e&&!q()?{"User-Agent":e.userAgent}:{},l={};e?.authMode===`commercialApiKey`&&(await H({object:l,key:`clientId`,keyParamName:`clientId`,configuration:e}),t!==void 0&&(l.userId=t),n!==void 0&&(l.userSecret=n)),e?.authMode===`personalApiKey`&&await H({object:l,key:`clientId`,keyParamName:`clientId`,configuration:e});let u={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},d=o&&o.headers?o.headers:{};return s.headers={...c,...d,...r.headers},J({queryParameters:l,requestConfig:s,path:i,configuration:e,pathTemplate:`/accounts`,httpMethod:`GET`,operationAuth:u}),U(a,l),{url:G(a),options:s}},updateUserAccount:async(t,n,r,i={})=>{V(`updateUserAccount`,`accountId`,t);let a=`/accounts/{accountId}`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),o=new URL(a,B),s;e&&(s=e.baseOptions);let c={method:`PUT`,...s,...i},l=e&&!q()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},J({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/accounts/{accountId}`,httpMethod:`PUT`,operationAuth:d}),U(o,u),{url:G(o),options:c}}}},Y=function(e){let t=Ar(e);return{async getAccountActivities(...n){let[r={},i]=n;return K(await t.getAccountActivities(r.accountId,r.startDate,r.endDate,r.offset,r.limit,r.type,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getAccountBalanceHistory(...n){let[r={},i]=n;return K(await t.getAccountBalanceHistory(r.accountId,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getAllAccountPositions(...n){let[r={},i]=n;return K(await t.getAllAccountPositions(r.accountId,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountBalance(...n){let[r={},i]=n;return K(await t.getUserAccountBalance(r.accountId,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountDetails(...n){let[r={},i]=n;return K(await t.getUserAccountDetails(r.accountId,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountOrderDetail(...n){let[r={},i]=n,a={brokerage_order_id:r.brokerage_order_id};return K(await t.getUserAccountOrderDetail(r.accountId,a,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountOrders(...n){let[r={},i]=n;return K(await t.getUserAccountOrders(r.accountId,r.state,r.days,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountRecentOrders(...n){let[r={},i]=n;return K(await t.getUserAccountRecentOrders(r.accountId,r.onlyExecuted,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountReturnRates(...n){let[r={},i]=n;return K(await t.getUserAccountReturnRates(r.accountId,r.timeframes,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserHoldings(...n){let[r={},i]=n;return K(await t.getUserHoldings(r.accountId,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async listUserAccounts(...n){let[r={},i]=n;return K(await t.listUserAccounts(r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async updateUserAccount(...n){let[r={},i]=n;return K(await t.updateUserAccount(r.accountId,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})}}},jr=function(e,t,n){let r=Y(e);return{getAccountActivities(...e){return r.getAccountActivities(...e).then(e=>e(n,t))},getAccountBalanceHistory(...e){return r.getAccountBalanceHistory(...e).then(e=>e(n,t))},getAllAccountPositions(...e){return r.getAllAccountPositions(...e).then(e=>e(n,t))},getUserAccountBalance(...e){return r.getUserAccountBalance(...e).then(e=>e(n,t))},getUserAccountDetails(...e){return r.getUserAccountDetails(...e).then(e=>e(n,t))},getUserAccountOrderDetail(...e){return r.getUserAccountOrderDetail(...e).then(e=>e(n,t))},getUserAccountOrders(...e){return r.getUserAccountOrders(...e).then(e=>e(n,t))},getUserAccountRecentOrders(...e){return r.getUserAccountRecentOrders(...e).then(e=>e(n,t))},getUserAccountReturnRates(...e){return r.getUserAccountReturnRates(...e).then(e=>e(n,t))},getUserHoldings(...e){return r.getUserHoldings(...e).then(e=>e(n,t))},listUserAccounts(...e){return r.listUserAccounts(...e).then(e=>e(n,t))},updateUserAccount(...e){return r.updateUserAccount(...e).then(e=>e(n,t))}}};var Mr=class extends hr{getAccountActivities(...e){return Y(this.configuration).getAccountActivities(...e).then(e=>e(this.axios,this.basePath))}getAccountBalanceHistory(...e){return Y(this.configuration).getAccountBalanceHistory(...e).then(e=>e(this.axios,this.basePath))}getAllAccountPositions(...e){return Y(this.configuration).getAllAccountPositions(...e).then(e=>e(this.axios,this.basePath))}getUserAccountBalance(...e){return Y(this.configuration).getUserAccountBalance(...e).then(e=>e(this.axios,this.basePath))}getUserAccountDetails(...e){return Y(this.configuration).getUserAccountDetails(...e).then(e=>e(this.axios,this.basePath))}getUserAccountOrderDetail(...e){return Y(this.configuration).getUserAccountOrderDetail(...e).then(e=>e(this.axios,this.basePath))}getUserAccountOrders(...e){return Y(this.configuration).getUserAccountOrders(...e).then(e=>e(this.axios,this.basePath))}getUserAccountRecentOrders(...e){return Y(this.configuration).getUserAccountRecentOrders(...e).then(e=>e(this.axios,this.basePath))}getUserAccountReturnRates(...e){return Y(this.configuration).getUserAccountReturnRates(...e).then(e=>e(this.axios,this.basePath))}getUserHoldings(...e){return Y(this.configuration).getUserHoldings(...e).then(e=>e(this.axios,this.basePath))}listUserAccounts(...e){return Y(this.configuration).listUserAccounts(...e).then(e=>e(this.axios,this.basePath))}updateUserAccount(...e){return Y(this.configuration).updateUserAccount(...e).then(e=>e(this.axios,this.basePath))}},Nr=class extends Mr{};let Pr=function(e){return{check:async(t={})=>{let n=new URL(`/`,B),r;e&&(r=e.baseOptions);let i={method:`GET`,...r,...t},a=e&&!q()?{"User-Agent":e.userAgent}:{},o={},s={authModes:[`public`],selectedAuthMode:e?.authMode},c=r&&r.headers?r.headers:{};return i.headers={...a,...c,...t.headers},J({queryParameters:o,requestConfig:i,path:`/`,configuration:e,pathTemplate:`/`,httpMethod:`GET`,operationAuth:s}),U(n,o),{url:G(n),options:i}}}},Fr=function(e){let t=Pr(e);return{async check(n){return K(await t.check(n),R,z,e,{authModes:[`public`]})}}},Ir=function(e,t,n){let r=Fr(e);return{check(e){return r.check(e).then(e=>e(n,t))}}};var Lr=class extends hr{check(e){return Fr(this.configuration).check(e).then(e=>e(this.axios,this.basePath))}},Rr=class extends Lr{};let zr=function(e){return{deleteSnapTradeUser:async(t,n={})=>{let r=`/snapTrade/deleteUser`,i=new URL(r,B),a;e&&(a=e.baseOptions);let o={method:`DELETE`,...a,...n},s=e&&!q()?{"User-Agent":e.userAgent}:{},c={};e?.authMode===`commercialApiKey`&&(await H({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e}),t!==void 0&&(c.userId=t));let l={authModes:[`commercialApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]}},selectedAuthMode:e?.authMode},u=a&&a.headers?a.headers:{};return o.headers={...s,...u,...n.headers},J({queryParameters:c,requestConfig:o,path:r,configuration:e,pathTemplate:`/snapTrade/deleteUser`,httpMethod:`DELETE`,operationAuth:l}),U(i,c),{url:G(i),options:o}},listSnapTradeUsers:async(t={})=>{let n=`/snapTrade/listUsers`,r=new URL(n,B),i;e&&(i=e.baseOptions);let a={method:`GET`,...i,...t},o=e&&!q()?{"User-Agent":e.userAgent}:{},s={};e?.authMode===`commercialApiKey`&&await H({object:s,key:`clientId`,keyParamName:`clientId`,configuration:e});let c={authModes:[`commercialApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]}},selectedAuthMode:e?.authMode},l=i&&i.headers?i.headers:{};return a.headers={...o,...l,...t.headers},J({queryParameters:s,requestConfig:a,path:n,configuration:e,pathTemplate:`/snapTrade/listUsers`,httpMethod:`GET`,operationAuth:c}),U(r,s),{url:G(r),options:a}},loginSnapTradeUser:async(t,n,r,i={})=>{let a=`/snapTrade/login`,o=new URL(a,B),s;e&&(s=e.baseOptions);let c={method:`POST`,...s,...i},l=e&&!q()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};l[`Content-Type`]=`application/json`;let f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},J({requestBody:t,queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/snapTrade/login`,httpMethod:`POST`,operationAuth:d}),c.data=W(t,c,e),U(o,u),{url:G(o),options:c}},registerSnapTradeUser:async(t,n={})=>{V(`registerSnapTradeUser`,`snapTradeRegisterUserRequestBody`,t);let r=`/snapTrade/registerUser`,i=new URL(r,B),a;e&&(a=e.baseOptions);let o={method:`POST`,...a,...n},s=e&&!q()?{"User-Agent":e.userAgent}:{},c={};e?.authMode===`commercialApiKey`&&await H({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e});let l={authModes:[`commercialApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]}},selectedAuthMode:e?.authMode};s[`Content-Type`]=`application/json`;let u=a&&a.headers?a.headers:{};return o.headers={...s,...u,...n.headers},J({requestBody:t,queryParameters:c,requestConfig:o,path:r,configuration:e,pathTemplate:`/snapTrade/registerUser`,httpMethod:`POST`,operationAuth:l}),o.data=W(t,o,e),U(i,c),{url:G(i),options:o}},resetSnapTradeUserSecret:async(t,n={})=>{V(`resetSnapTradeUserSecret`,`userIDandSecret`,t);let r=`/snapTrade/resetUserSecret`,i=new URL(r,B),a;e&&(a=e.baseOptions);let o={method:`POST`,...a,...n},s=e&&!q()?{"User-Agent":e.userAgent}:{},c={};e?.authMode===`commercialApiKey`&&await H({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e});let l={authModes:[`commercialApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]}},selectedAuthMode:e?.authMode};s[`Content-Type`]=`application/json`;let u=a&&a.headers?a.headers:{};return o.headers={...s,...u,...n.headers},J({requestBody:t,queryParameters:c,requestConfig:o,path:r,configuration:e,pathTemplate:`/snapTrade/resetUserSecret`,httpMethod:`POST`,operationAuth:l}),o.data=W(t,o,e),U(i,c),{url:G(i),options:o}}}},Br=function(e){let t=zr(e);return{async deleteSnapTradeUser(...n){let[r={},i]=n;return K(await t.deleteSnapTradeUser(r.userId,i),R,z,e,{authModes:[`commercialApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]}}})},async listSnapTradeUsers(...n){let[r]=n;return K(await t.listSnapTradeUsers(r),R,z,e,{authModes:[`commercialApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]}}})},async loginSnapTradeUser(...n){let[r={},i]=n,a={broker:r.broker,immediateRedirect:r.immediateRedirect,customRedirect:r.customRedirect,reconnect:r.reconnect,connectionType:r.connectionType,showCloseButton:r.showCloseButton,darkMode:r.darkMode,locale:r.locale,connectionPortalVersion:r.connectionPortalVersion};return K(await t.loginSnapTradeUser(a,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async registerSnapTradeUser(...n){let[r={},i]=n,a={userId:r.userId};return K(await t.registerSnapTradeUser(a,i),R,z,e,{authModes:[`commercialApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]}}})},async resetSnapTradeUserSecret(...n){let[r={},i]=n,a={userId:r.userId,userSecret:r.userSecret};return K(await t.resetSnapTradeUserSecret(a,i),R,z,e,{authModes:[`commercialApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]}}})}}},Vr=function(e,t,n){let r=Br(e);return{deleteSnapTradeUser(...e){return r.deleteSnapTradeUser(...e).then(e=>e(n,t))},listSnapTradeUsers(...e){return r.listSnapTradeUsers(...e).then(e=>e(n,t))},loginSnapTradeUser(...e){return r.loginSnapTradeUser(...e).then(e=>e(n,t))},registerSnapTradeUser(...e){return r.registerSnapTradeUser(...e).then(e=>e(n,t))},resetSnapTradeUserSecret(...e){return r.resetSnapTradeUserSecret(...e).then(e=>e(n,t))}}};var Hr=class extends hr{deleteSnapTradeUser(...e){return Br(this.configuration).deleteSnapTradeUser(...e).then(e=>e(this.axios,this.basePath))}listSnapTradeUsers(...e){return Br(this.configuration).listSnapTradeUsers(...e).then(e=>e(this.axios,this.basePath))}loginSnapTradeUser(...e){return Br(this.configuration).loginSnapTradeUser(...e).then(e=>e(this.axios,this.basePath))}registerSnapTradeUser(...e){return Br(this.configuration).registerSnapTradeUser(...e).then(e=>e(this.axios,this.basePath))}resetSnapTradeUserSecret(...e){return Br(this.configuration).resetSnapTradeUserSecret(...e).then(e=>e(this.axios,this.basePath))}},Ur=class extends Hr{};let Wr=function(e){return{deleteConnection:async(t,n,r,i={})=>{V(`deleteConnection`,`connectionId`,t);let a=`/connection/{connectionId}`.replace(`{connectionId}`,encodeURIComponent(String(t===void 0?`-connectionId-`:t))),o=new URL(a,B),s;e&&(s=e.baseOptions);let c={method:`DELETE`,...s,...i},l=e&&!q()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},J({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/connection/{connectionId}`,httpMethod:`DELETE`,operationAuth:d}),U(o,u),{url:G(o),options:c}},detailBrokerageAuthorization:async(t,n,r,i={})=>{V(`detailBrokerageAuthorization`,`authorizationId`,t);let a=`/authorizations/{authorizationId}`.replace(`{authorizationId}`,encodeURIComponent(String(t===void 0?`-authorizationId-`:t))),o=new URL(a,B),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l=e&&!q()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},J({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/authorizations/{authorizationId}`,httpMethod:`GET`,operationAuth:d}),U(o,u),{url:G(o),options:c}},disableBrokerageAuthorization:async(t,n,r,i={})=>{V(`disableBrokerageAuthorization`,`authorizationId`,t);let a=`/authorizations/{authorizationId}/disable`.replace(`{authorizationId}`,encodeURIComponent(String(t===void 0?`-authorizationId-`:t))),o=new URL(a,B),s;e&&(s=e.baseOptions);let c={method:`POST`,...s,...i},l=e&&!q()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},J({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/authorizations/{authorizationId}/disable`,httpMethod:`POST`,operationAuth:d}),U(o,u),{url:G(o),options:c}},listBrokerageAuthorizationAccounts:async(t,n,r,i={})=>{V(`listBrokerageAuthorizationAccounts`,`authorizationId`,t);let a=`/authorizations/{authorizationId}/accounts`.replace(`{authorizationId}`,encodeURIComponent(String(t===void 0?`-authorizationId-`:t))),o=new URL(a,B),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l=e&&!q()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},J({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/authorizations/{authorizationId}/accounts`,httpMethod:`GET`,operationAuth:d}),U(o,u),{url:G(o),options:c}},listBrokerageAuthorizations:async(t,n,r={})=>{let i=`/authorizations`,a=new URL(i,B),o;e&&(o=e.baseOptions);let s={method:`GET`,...o,...r},c=e&&!q()?{"User-Agent":e.userAgent}:{},l={};e?.authMode===`commercialApiKey`&&(await H({object:l,key:`clientId`,keyParamName:`clientId`,configuration:e}),t!==void 0&&(l.userId=t),n!==void 0&&(l.userSecret=n)),e?.authMode===`personalApiKey`&&await H({object:l,key:`clientId`,keyParamName:`clientId`,configuration:e});let u={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},d=o&&o.headers?o.headers:{};return s.headers={...c,...d,...r.headers},J({queryParameters:l,requestConfig:s,path:i,configuration:e,pathTemplate:`/authorizations`,httpMethod:`GET`,operationAuth:u}),U(a,l),{url:G(a),options:s}},listConnectionAccounts:async(t,n,r,i={})=>{V(`listConnectionAccounts`,`connectionId`,t);let a=`/connections/{connectionId}/accounts`.replace(`{connectionId}`,encodeURIComponent(String(t===void 0?`-connectionId-`:t))),o=new URL(a,B),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l=e&&!q()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},J({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/connections/{connectionId}/accounts`,httpMethod:`GET`,operationAuth:d}),U(o,u),{url:G(o),options:c}},refreshBrokerageAuthorization:async(t,n,r,i={})=>{V(`refreshBrokerageAuthorization`,`authorizationId`,t);let a=`/authorizations/{authorizationId}/refresh`.replace(`{authorizationId}`,encodeURIComponent(String(t===void 0?`-authorizationId-`:t))),o=new URL(a,B),s;e&&(s=e.baseOptions);let c={method:`POST`,...s,...i},l=e&&!q()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},J({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/authorizations/{authorizationId}/refresh`,httpMethod:`POST`,operationAuth:d}),U(o,u),{url:G(o),options:c}},returnRates:async(t,n,r,i,a={})=>{V(`returnRates`,`authorizationId`,t);let o=`/authorizations/{authorizationId}/returnRates`.replace(`{authorizationId}`,encodeURIComponent(String(t===void 0?`-authorizationId-`:t))),s=new URL(o,B),c;e&&(c=e.baseOptions);let l={method:`GET`,...c,...a},u=e&&!q()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(d.timeframes=n);let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},J({queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/authorizations/{authorizationId}/returnRates`,httpMethod:`GET`,operationAuth:f}),U(s,d),{url:G(s),options:l}},syncBrokerageAuthorizationTransactions:async(t,n,r,i={})=>{V(`syncBrokerageAuthorizationTransactions`,`authorizationId`,t);let a=`/authorizations/{authorizationId}/transactions/sync`.replace(`{authorizationId}`,encodeURIComponent(String(t===void 0?`-authorizationId-`:t))),o=new URL(a,B),s;e&&(s=e.baseOptions);let c={method:`POST`,...s,...i},l=e&&!q()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},J({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/authorizations/{authorizationId}/transactions/sync`,httpMethod:`POST`,operationAuth:d}),U(o,u),{url:G(o),options:c}}}},X=function(e){let t=Wr(e);return{async deleteConnection(...n){let[r={},i]=n;return K(await t.deleteConnection(r.connectionId,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async detailBrokerageAuthorization(...n){let[r={},i]=n;return K(await t.detailBrokerageAuthorization(r.authorizationId,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async disableBrokerageAuthorization(...n){let[r={},i]=n;return K(await t.disableBrokerageAuthorization(r.authorizationId,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async listBrokerageAuthorizationAccounts(...n){let[r={},i]=n;return K(await t.listBrokerageAuthorizationAccounts(r.authorizationId,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async listBrokerageAuthorizations(...n){let[r={},i]=n;return K(await t.listBrokerageAuthorizations(r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async listConnectionAccounts(...n){let[r={},i]=n;return K(await t.listConnectionAccounts(r.connectionId,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async refreshBrokerageAuthorization(...n){let[r={},i]=n;return K(await t.refreshBrokerageAuthorization(r.authorizationId,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async returnRates(...n){let[r={},i]=n;return K(await t.returnRates(r.authorizationId,r.timeframes,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async syncBrokerageAuthorizationTransactions(...n){let[r={},i]=n;return K(await t.syncBrokerageAuthorizationTransactions(r.authorizationId,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})}}},Gr=function(e,t,n){let r=X(e);return{deleteConnection(...e){return r.deleteConnection(...e).then(e=>e(n,t))},detailBrokerageAuthorization(...e){return r.detailBrokerageAuthorization(...e).then(e=>e(n,t))},disableBrokerageAuthorization(...e){return r.disableBrokerageAuthorization(...e).then(e=>e(n,t))},listBrokerageAuthorizationAccounts(...e){return r.listBrokerageAuthorizationAccounts(...e).then(e=>e(n,t))},listBrokerageAuthorizations(...e){return r.listBrokerageAuthorizations(...e).then(e=>e(n,t))},listConnectionAccounts(...e){return r.listConnectionAccounts(...e).then(e=>e(n,t))},refreshBrokerageAuthorization(...e){return r.refreshBrokerageAuthorization(...e).then(e=>e(n,t))},returnRates(...e){return r.returnRates(...e).then(e=>e(n,t))},syncBrokerageAuthorizationTransactions(...e){return r.syncBrokerageAuthorizationTransactions(...e).then(e=>e(n,t))}}};var Kr=class extends hr{deleteConnection(...e){return X(this.configuration).deleteConnection(...e).then(e=>e(this.axios,this.basePath))}detailBrokerageAuthorization(...e){return X(this.configuration).detailBrokerageAuthorization(...e).then(e=>e(this.axios,this.basePath))}disableBrokerageAuthorization(...e){return X(this.configuration).disableBrokerageAuthorization(...e).then(e=>e(this.axios,this.basePath))}listBrokerageAuthorizationAccounts(...e){return X(this.configuration).listBrokerageAuthorizationAccounts(...e).then(e=>e(this.axios,this.basePath))}listBrokerageAuthorizations(...e){return X(this.configuration).listBrokerageAuthorizations(...e).then(e=>e(this.axios,this.basePath))}listConnectionAccounts(...e){return X(this.configuration).listConnectionAccounts(...e).then(e=>e(this.axios,this.basePath))}refreshBrokerageAuthorization(...e){return X(this.configuration).refreshBrokerageAuthorization(...e).then(e=>e(this.axios,this.basePath))}returnRates(...e){return X(this.configuration).returnRates(...e).then(e=>e(this.axios,this.basePath))}syncBrokerageAuthorizationTransactions(...e){return X(this.configuration).syncBrokerageAuthorizationTransactions(...e).then(e=>e(this.axios,this.basePath))}},qr=class extends Kr{};let Jr=function(e){return{addSubscription:async(t,n,r,i={})=>{V(`addSubscription`,`tradeDetectionAddSubscriptionRequest`,t);let a=`/snapTrade/tradeDetection/subscriptions`,o=new URL(a,B),s;e&&(s=e.baseOptions);let c={method:`POST`,...s,...i},l=e&&!q()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};l[`Content-Type`]=`application/json`;let f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},J({requestBody:t,queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/snapTrade/tradeDetection/subscriptions`,httpMethod:`POST`,operationAuth:d}),c.data=W(t,c,e),U(o,u),{url:G(o),options:c}},cancelSubscription:async(t,n={})=>{V(`cancelSubscription`,`tradeDetectionCancelSubscriptionRequest`,t);let r=`/snapTrade/tradeDetection/subscriptions/cancel`,i=new URL(r,B),a;e&&(a=e.baseOptions);let o={method:`POST`,...a,...n},s=e&&!q()?{"User-Agent":e.userAgent}:{},c={};e?.authMode===`commercialApiKey`&&await H({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e}),e?.authMode===`personalApiKey`&&await H({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e});let l={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};s[`Content-Type`]=`application/json`;let u=a&&a.headers?a.headers:{};return o.headers={...s,...u,...n.headers},J({requestBody:t,queryParameters:c,requestConfig:o,path:r,configuration:e,pathTemplate:`/snapTrade/tradeDetection/subscriptions/cancel`,httpMethod:`POST`,operationAuth:l}),o.data=W(t,o,e),U(i,c),{url:G(i),options:o}},getAccountDetails:async(t,n,r,i={})=>{V(`getAccountDetails`,`accountId`,t);let a=`/accounts/{accountId}/details`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),o=new URL(a,B),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l=e&&!q()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},J({queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/accounts/{accountId}/details`,httpMethod:`GET`,operationAuth:d}),U(o,u),{url:G(o),options:c}},getUserAccountOrderDetailV2:async(t,n,r,i,a={})=>{V(`getUserAccountOrderDetailV2`,`accountId`,t),V(`getUserAccountOrderDetailV2`,`brokerageOrderId`,n);let o=`/accounts/{accountId}/orders/details/v2/{brokerageOrderId}`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))).replace(`{brokerageOrderId}`,encodeURIComponent(String(n===void 0?`-brokerageOrderId-`:n))),s=new URL(o,B),c;e&&(c=e.baseOptions);let l={method:`GET`,...c,...a},u=e&&!q()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},J({queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/orders/details/v2/{brokerageOrderId}`,httpMethod:`GET`,operationAuth:f}),U(s,d),{url:G(s),options:l}},getUserAccountOrdersV2:async(t,n,r,i,a,o={})=>{V(`getUserAccountOrdersV2`,`accountId`,t);let s=`/accounts/{accountId}/orders/v2`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),c=new URL(s,B),l;e&&(l=e.baseOptions);let u={method:`GET`,...l,...o},d=e&&!q()?{"User-Agent":e.userAgent}:{},f={};e?.authMode===`commercialApiKey`&&(await H({object:f,key:`clientId`,keyParamName:`clientId`,configuration:e}),i!==void 0&&(f.userId=i),a!==void 0&&(f.userSecret=a)),e?.authMode===`personalApiKey`&&await H({object:f,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(f.state=n),r!==void 0&&(f.days=r);let p={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},m=l&&l.headers?l.headers:{};return u.headers={...d,...m,...o.headers},J({queryParameters:f,requestConfig:u,path:s,configuration:e,pathTemplate:`/accounts/{accountId}/orders/v2`,httpMethod:`GET`,operationAuth:p}),U(c,f),{url:G(c),options:u}},getUserAccountRecentOrdersV2:async(t,n,r,i,a={})=>{V(`getUserAccountRecentOrdersV2`,`accountId`,t);let o=`/accounts/{accountId}/recentOrders/v2`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,B),c;e&&(c=e.baseOptions);let l={method:`GET`,...c,...a},u=e&&!q()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(d.only_executed=n);let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},J({queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/recentOrders/v2`,httpMethod:`GET`,operationAuth:f}),U(s,d),{url:G(s),options:l}},listAllUserAccounts:async(t,n,r={})=>{let i=`/accounts/all`,a=new URL(i,B),o;e&&(o=e.baseOptions);let s={method:`GET`,...o,...r},c=e&&!q()?{"User-Agent":e.userAgent}:{},l={};e?.authMode===`commercialApiKey`&&(await H({object:l,key:`clientId`,keyParamName:`clientId`,configuration:e}),t!==void 0&&(l.userId=t),n!==void 0&&(l.userSecret=n)),e?.authMode===`personalApiKey`&&await H({object:l,key:`clientId`,keyParamName:`clientId`,configuration:e});let u={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},d=o&&o.headers?o.headers:{};return s.headers={...c,...d,...r.headers},J({queryParameters:l,requestConfig:s,path:i,configuration:e,pathTemplate:`/accounts/all`,httpMethod:`GET`,operationAuth:u}),U(a,l),{url:G(a),options:s}},listSubscriptions:async(t={})=>{let n=`/snapTrade/tradeDetection/subscriptions`,r=new URL(n,B),i;e&&(i=e.baseOptions);let a={method:`GET`,...i,...t},o=e&&!q()?{"User-Agent":e.userAgent}:{},s={};e?.authMode===`commercialApiKey`&&await H({object:s,key:`clientId`,keyParamName:`clientId`,configuration:e}),e?.authMode===`personalApiKey`&&await H({object:s,key:`clientId`,keyParamName:`clientId`,configuration:e});let c={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},l=i&&i.headers?i.headers:{};return a.headers={...o,...l,...t.headers},J({queryParameters:s,requestConfig:a,path:n,configuration:e,pathTemplate:`/snapTrade/tradeDetection/subscriptions`,httpMethod:`GET`,operationAuth:c}),U(r,s),{url:G(r),options:a}},placeSimpleOrder:async(t,n,r,i,a={})=>{V(`placeSimpleOrder`,`accountId`,t),V(`placeSimpleOrder`,`simpleTradeForm`,n);let o=`/accounts/{accountId}/trading/simple`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,B),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!q()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},J({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/trading/simple`,httpMethod:`POST`,operationAuth:f}),l.data=W(n,l,e),U(s,d),{url:G(s),options:l}}}},Z=function(e){let t=Jr(e);return{async addSubscription(...n){let[r={},i]=n,a={account_id:r.account_id,check_interval_seconds:r.check_interval_seconds};return K(await t.addSubscription(a,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async cancelSubscription(...n){let[r={},i]=n,a={account_id:r.account_id};return K(await t.cancelSubscription(a,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getAccountDetails(...n){let[r={},i]=n;return K(await t.getAccountDetails(r.accountId,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountOrderDetailV2(...n){let[r={},i]=n;return K(await t.getUserAccountOrderDetailV2(r.accountId,r.brokerageOrderId,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountOrdersV2(...n){let[r={},i]=n;return K(await t.getUserAccountOrdersV2(r.accountId,r.state,r.days,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountRecentOrdersV2(...n){let[r={},i]=n;return K(await t.getUserAccountRecentOrdersV2(r.accountId,r.onlyExecuted,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async listAllUserAccounts(...n){let[r={},i]=n;return K(await t.listAllUserAccounts(r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async listSubscriptions(...n){let[r]=n;return K(await t.listSubscriptions(r),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async placeSimpleOrder(...n){let[r={},i]=n,a={order_type:r.order_type,time_in_force:r.time_in_force,legs:r.legs,limit_price:r.limit_price,stop_price:r.stop_price,price_effect:r.price_effect,client_order_id:r.client_order_id,expiry_date:r.expiry_date,notional_value:r.notional_value,trading_session:r.trading_session};return K(await t.placeSimpleOrder(r.accountId,a,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})}}},Yr=function(e,t,n){let r=Z(e);return{addSubscription(...e){return r.addSubscription(...e).then(e=>e(n,t))},cancelSubscription(...e){return r.cancelSubscription(...e).then(e=>e(n,t))},getAccountDetails(...e){return r.getAccountDetails(...e).then(e=>e(n,t))},getUserAccountOrderDetailV2(...e){return r.getUserAccountOrderDetailV2(...e).then(e=>e(n,t))},getUserAccountOrdersV2(...e){return r.getUserAccountOrdersV2(...e).then(e=>e(n,t))},getUserAccountRecentOrdersV2(...e){return r.getUserAccountRecentOrdersV2(...e).then(e=>e(n,t))},listAllUserAccounts(...e){return r.listAllUserAccounts(...e).then(e=>e(n,t))},listSubscriptions(...e){return r.listSubscriptions(...e).then(e=>e(n,t))},placeSimpleOrder(...e){return r.placeSimpleOrder(...e).then(e=>e(n,t))}}};var Xr=class extends hr{addSubscription(...e){return Z(this.configuration).addSubscription(...e).then(e=>e(this.axios,this.basePath))}cancelSubscription(...e){return Z(this.configuration).cancelSubscription(...e).then(e=>e(this.axios,this.basePath))}getAccountDetails(...e){return Z(this.configuration).getAccountDetails(...e).then(e=>e(this.axios,this.basePath))}getUserAccountOrderDetailV2(...e){return Z(this.configuration).getUserAccountOrderDetailV2(...e).then(e=>e(this.axios,this.basePath))}getUserAccountOrdersV2(...e){return Z(this.configuration).getUserAccountOrdersV2(...e).then(e=>e(this.axios,this.basePath))}getUserAccountRecentOrdersV2(...e){return Z(this.configuration).getUserAccountRecentOrdersV2(...e).then(e=>e(this.axios,this.basePath))}listAllUserAccounts(...e){return Z(this.configuration).listAllUserAccounts(...e).then(e=>e(this.axios,this.basePath))}listSubscriptions(...e){return Z(this.configuration).listSubscriptions(...e).then(e=>e(this.axios,this.basePath))}placeSimpleOrder(...e){return Z(this.configuration).placeSimpleOrder(...e).then(e=>e(this.axios,this.basePath))}},Zr=class extends Xr{};let Qr=function(e){return{getPartnerInfo:async(t={})=>{let n=`/snapTrade/partners`,r=new URL(n,B),i;e&&(i=e.baseOptions);let a={method:`GET`,...i,...t},o=e&&!q()?{"User-Agent":e.userAgent}:{},s={};e?.authMode===`commercialApiKey`&&await H({object:s,key:`clientId`,keyParamName:`clientId`,configuration:e}),e?.authMode===`personalApiKey`&&await H({object:s,key:`clientId`,keyParamName:`clientId`,configuration:e});let c={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},l=i&&i.headers?i.headers:{};return a.headers={...o,...l,...t.headers},J({queryParameters:s,requestConfig:a,path:n,configuration:e,pathTemplate:`/snapTrade/partners`,httpMethod:`GET`,operationAuth:c}),U(r,s),{url:G(r),options:a}},getStockExchanges:async(t={})=>{let n=`/exchanges`,r=new URL(n,B),i;e&&(i=e.baseOptions);let a={method:`GET`,...i,...t},o=e&&!q()?{"User-Agent":e.userAgent}:{},s={};e?.authMode===`commercialApiKey`&&await H({object:s,key:`clientId`,keyParamName:`clientId`,configuration:e}),e?.authMode===`personalApiKey`&&await H({object:s,key:`clientId`,keyParamName:`clientId`,configuration:e});let c={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},l=i&&i.headers?i.headers:{};return a.headers={...o,...l,...t.headers},J({queryParameters:s,requestConfig:a,path:n,configuration:e,pathTemplate:`/exchanges`,httpMethod:`GET`,operationAuth:c}),U(r,s),{url:G(r),options:a}},getSymbols:async(t,n={})=>{let r=`/symbols`,i=new URL(r,B),a;e&&(a=e.baseOptions);let o={method:`POST`,...a,...n},s=e&&!q()?{"User-Agent":e.userAgent}:{},c={};e?.authMode===`commercialApiKey`&&await H({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e}),e?.authMode===`personalApiKey`&&await H({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e});let l={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};s[`Content-Type`]=`application/json`;let u=a&&a.headers?a.headers:{};return o.headers={...s,...u,...n.headers},J({requestBody:t,queryParameters:c,requestConfig:o,path:r,configuration:e,pathTemplate:`/symbols`,httpMethod:`POST`,operationAuth:l}),o.data=W(t,o,e),U(i,c),{url:G(i),options:o}},getSymbolsByTicker:async(t,n={})=>{V(`getSymbolsByTicker`,`query`,t);let r=`/symbols/{query}`.replace(`{query}`,encodeURIComponent(String(t===void 0?`-query-`:t))),i=new URL(r,B),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s=e&&!q()?{"User-Agent":e.userAgent}:{},c={};e?.authMode===`commercialApiKey`&&await H({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e}),e?.authMode===`personalApiKey`&&await H({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e});let l={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},u=a&&a.headers?a.headers:{};return o.headers={...s,...u,...n.headers},J({queryParameters:c,requestConfig:o,path:r,configuration:e,pathTemplate:`/symbols/{query}`,httpMethod:`GET`,operationAuth:l}),U(i,c),{url:G(i),options:o}},listAllBrokerageAuthorizationType:async(t,n={})=>{let r=`/brokerageAuthorizationTypes`,i=new URL(r,B),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s=e&&!q()?{"User-Agent":e.userAgent}:{},c={};e?.authMode===`commercialApiKey`&&await H({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e}),e?.authMode===`personalApiKey`&&await H({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e}),t!==void 0&&(c.brokerage=t);let l={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},u=a&&a.headers?a.headers:{};return o.headers={...s,...u,...n.headers},J({queryParameters:c,requestConfig:o,path:r,configuration:e,pathTemplate:`/brokerageAuthorizationTypes`,httpMethod:`GET`,operationAuth:l}),U(i,c),{url:G(i),options:o}},listAllBrokerageInstruments:async(t,n={})=>{V(`listAllBrokerageInstruments`,`slug`,t);let r=`/brokerages/{slug}/instruments`.replace(`{slug}`,encodeURIComponent(String(t===void 0?`-slug-`:t))),i=new URL(r,B),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s=e&&!q()?{"User-Agent":e.userAgent}:{},c={};e?.authMode===`commercialApiKey`&&await H({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e}),e?.authMode===`personalApiKey`&&await H({object:c,key:`clientId`,keyParamName:`clientId`,configuration:e});let l={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},u=a&&a.headers?a.headers:{};return o.headers={...s,...u,...n.headers},J({queryParameters:c,requestConfig:o,path:r,configuration:e,pathTemplate:`/brokerages/{slug}/instruments`,httpMethod:`GET`,operationAuth:l}),U(i,c),{url:G(i),options:o}},listAllBrokerages:async(t={})=>{let n=`/brokerages`,r=new URL(n,B),i;e&&(i=e.baseOptions);let a={method:`GET`,...i,...t},o=e&&!q()?{"User-Agent":e.userAgent}:{},s={};e?.authMode===`commercialApiKey`&&await H({object:s,key:`clientId`,keyParamName:`clientId`,configuration:e}),e?.authMode===`personalApiKey`&&await H({object:s,key:`clientId`,keyParamName:`clientId`,configuration:e});let c={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},l=i&&i.headers?i.headers:{};return a.headers={...o,...l,...t.headers},J({queryParameters:s,requestConfig:a,path:n,configuration:e,pathTemplate:`/brokerages`,httpMethod:`GET`,operationAuth:c}),U(r,s),{url:G(r),options:a}},listInstitutions:async(t={})=>{let n=`/institutions`,r=new URL(n,B),i;e&&(i=e.baseOptions);let a={method:`GET`,...i,...t},o=e&&!q()?{"User-Agent":e.userAgent}:{},s={},c={authModes:[`public`],selectedAuthMode:e?.authMode},l=i&&i.headers?i.headers:{};return a.headers={...o,...l,...t.headers},J({queryParameters:s,requestConfig:a,path:n,configuration:e,pathTemplate:`/institutions`,httpMethod:`GET`,operationAuth:c}),U(r,s),{url:G(r),options:a}},symbolSearchUserAccount:async(t,n,r,i,a={})=>{V(`symbolSearchUserAccount`,`accountId`,t);let o=`/accounts/{accountId}/symbols`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,B),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!q()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},J({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/symbols`,httpMethod:`POST`,operationAuth:f}),l.data=W(n,l,e),U(s,d),{url:G(s),options:l}}}},Q=function(e){let t=Qr(e);return{async getPartnerInfo(...n){let[r]=n;return K(await t.getPartnerInfo(r),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getStockExchanges(...n){let[r]=n;return K(await t.getStockExchanges(r),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getSymbols(...n){let[r={},i]=n,a={substring:r.substring};return K(await t.getSymbols(a,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getSymbolsByTicker(...n){let[r={},i]=n;return K(await t.getSymbolsByTicker(r.query,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async listAllBrokerageAuthorizationType(...n){let[r={},i]=n;return K(await t.listAllBrokerageAuthorizationType(r.brokerage,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async listAllBrokerageInstruments(...n){let[r={},i]=n;return K(await t.listAllBrokerageInstruments(r.slug,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async listAllBrokerages(...n){let[r]=n;return K(await t.listAllBrokerages(r),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async listInstitutions(n){return K(await t.listInstitutions(n),R,z,e,{authModes:[`public`]})},async symbolSearchUserAccount(...n){let[r={},i]=n,a={substring:r.substring};return K(await t.symbolSearchUserAccount(r.accountId,a,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})}}},$r=function(e,t,n){let r=Q(e);return{getPartnerInfo(...e){return r.getPartnerInfo(...e).then(e=>e(n,t))},getStockExchanges(...e){return r.getStockExchanges(...e).then(e=>e(n,t))},getSymbols(...e){return r.getSymbols(...e).then(e=>e(n,t))},getSymbolsByTicker(...e){return r.getSymbolsByTicker(...e).then(e=>e(n,t))},listAllBrokerageAuthorizationType(...e){return r.listAllBrokerageAuthorizationType(...e).then(e=>e(n,t))},listAllBrokerageInstruments(...e){return r.listAllBrokerageInstruments(...e).then(e=>e(n,t))},listAllBrokerages(...e){return r.listAllBrokerages(...e).then(e=>e(n,t))},listInstitutions(e){return r.listInstitutions(e).then(e=>e(n,t))},symbolSearchUserAccount(...e){return r.symbolSearchUserAccount(...e).then(e=>e(n,t))}}};var ei=class extends hr{getPartnerInfo(...e){return Q(this.configuration).getPartnerInfo(...e).then(e=>e(this.axios,this.basePath))}getStockExchanges(...e){return Q(this.configuration).getStockExchanges(...e).then(e=>e(this.axios,this.basePath))}getSymbols(...e){return Q(this.configuration).getSymbols(...e).then(e=>e(this.axios,this.basePath))}getSymbolsByTicker(...e){return Q(this.configuration).getSymbolsByTicker(...e).then(e=>e(this.axios,this.basePath))}listAllBrokerageAuthorizationType(...e){return Q(this.configuration).listAllBrokerageAuthorizationType(...e).then(e=>e(this.axios,this.basePath))}listAllBrokerageInstruments(...e){return Q(this.configuration).listAllBrokerageInstruments(...e).then(e=>e(this.axios,this.basePath))}listAllBrokerages(...e){return Q(this.configuration).listAllBrokerages(...e).then(e=>e(this.axios,this.basePath))}listInstitutions(e){return Q(this.configuration).listInstitutions(e).then(e=>e(this.axios,this.basePath))}symbolSearchUserAccount(...e){return Q(this.configuration).symbolSearchUserAccount(...e).then(e=>e(this.axios,this.basePath))}},ti=class extends ei{};let ni=function(e){return{cancelOrder:async(t,n,r,i,a={})=>{V(`cancelOrder`,`accountId`,t),V(`cancelOrder`,`accountInformationGetUserAccountOrderDetailRequest`,n);let o=`/accounts/{accountId}/trading/cancel`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,B),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!q()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},J({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/trading/cancel`,httpMethod:`POST`,operationAuth:f}),l.data=W(n,l,e),U(s,d),{url:G(s),options:l}},getCryptocurrencyPairQuote:async(t,n,r,i,a={})=>{V(`getCryptocurrencyPairQuote`,`accountId`,t),V(`getCryptocurrencyPairQuote`,`instrumentSymbol`,n);let o=`/accounts/{accountId}/trading/instruments/cryptocurrencyPairs/{instrumentSymbol}/quote`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))).replace(`{instrumentSymbol}`,encodeURIComponent(String(n===void 0?`-instrumentSymbol-`:n))),s=new URL(o,B),c;e&&(c=e.baseOptions);let l={method:`GET`,...c,...a},u=e&&!q()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},J({queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/trading/instruments/cryptocurrencyPairs/{instrumentSymbol}/quote`,httpMethod:`GET`,operationAuth:f}),U(s,d),{url:G(s),options:l}},getOptionImpact:async(t,n,r,i,a={})=>{V(`getOptionImpact`,`accountId`,t),V(`getOptionImpact`,`mlegTradeForm`,n);let o=`/accounts/{accountId}/trading/options/impact`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,B),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!q()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},J({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/trading/options/impact`,httpMethod:`POST`,operationAuth:f}),l.data=W(n,l,e),U(s,d),{url:G(s),options:l}},getOrderImpact:async(t,n,r,i={})=>{V(`getOrderImpact`,`manualTradeForm`,t);let a=`/trade/impact`,o=new URL(a,B),s;e&&(s=e.baseOptions);let c={method:`POST`,...s,...i},l=e&&!q()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};l[`Content-Type`]=`application/json`;let f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},J({requestBody:t,queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/trade/impact`,httpMethod:`POST`,operationAuth:d}),c.data=W(t,c,e),U(o,u),{url:G(o),options:c}},getUserAccountOptionQuotes:async(t,n,r,i,a={})=>{V(`getUserAccountOptionQuotes`,`accountId`,t),V(`getUserAccountOptionQuotes`,`symbol`,n);let o=`/accounts/{accountId}/quotes/options`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,B),c;e&&(c=e.baseOptions);let l={method:`GET`,...c,...a},u=e&&!q()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(d.symbol=n);let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},J({queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/quotes/options`,httpMethod:`GET`,operationAuth:f}),U(s,d),{url:G(s),options:l}},getUserAccountQuotes:async(t,n,r,i,a,o={})=>{V(`getUserAccountQuotes`,`symbols`,t),V(`getUserAccountQuotes`,`accountId`,n);let s=`/accounts/{accountId}/quotes`.replace(`{accountId}`,encodeURIComponent(String(n===void 0?`-accountId-`:n))),c=new URL(s,B),l;e&&(l=e.baseOptions);let u={method:`GET`,...l,...o},d=e&&!q()?{"User-Agent":e.userAgent}:{},f={};e?.authMode===`commercialApiKey`&&(await H({object:f,key:`clientId`,keyParamName:`clientId`,configuration:e}),i!==void 0&&(f.userId=i),a!==void 0&&(f.userSecret=a)),e?.authMode===`personalApiKey`&&await H({object:f,key:`clientId`,keyParamName:`clientId`,configuration:e}),t!==void 0&&(f.symbols=t),r!==void 0&&(f.use_ticker=r);let p={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},m=l&&l.headers?l.headers:{};return u.headers={...d,...m,...o.headers},J({queryParameters:f,requestConfig:u,path:s,configuration:e,pathTemplate:`/accounts/{accountId}/quotes`,httpMethod:`GET`,operationAuth:p}),U(c,f),{url:G(c),options:u}},placeComplexOrder:async(t,n,r,i,a={})=>{V(`placeComplexOrder`,`accountId`,t),V(`placeComplexOrder`,`manualTradeFormComplex`,n);let o=`/accounts/{accountId}/trading/complex`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,B),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!q()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},J({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/trading/complex`,httpMethod:`POST`,operationAuth:f}),l.data=W(n,l,e),U(s,d),{url:G(s),options:l}},placeCryptoOrder:async(t,n,r,i,a={})=>{V(`placeCryptoOrder`,`accountId`,t),V(`placeCryptoOrder`,`cryptoOrderForm`,n);let o=`/accounts/{accountId}/trading/crypto`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,B),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!q()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},J({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/trading/crypto`,httpMethod:`POST`,operationAuth:f}),l.data=W(n,l,e),U(s,d),{url:G(s),options:l}},placeForceOrder:async(t,n,r,i={})=>{V(`placeForceOrder`,`manualTradeFormWithOptions`,t);let a=`/trade/place`,o=new URL(a,B),s;e&&(s=e.baseOptions);let c={method:`POST`,...s,...i},l=e&&!q()?{"User-Agent":e.userAgent}:{},u={};e?.authMode===`commercialApiKey`&&(await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(u.userId=n),r!==void 0&&(u.userSecret=r)),e?.authMode===`personalApiKey`&&await H({object:u,key:`clientId`,keyParamName:`clientId`,configuration:e});let d={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};l[`Content-Type`]=`application/json`;let f=s&&s.headers?s.headers:{};return c.headers={...l,...f,...i.headers},J({requestBody:t,queryParameters:u,requestConfig:c,path:a,configuration:e,pathTemplate:`/trade/place`,httpMethod:`POST`,operationAuth:d}),c.data=W(t,c,e),U(o,u),{url:G(o),options:c}},placeMlegOrder:async(t,n,r,i,a={})=>{V(`placeMlegOrder`,`accountId`,t),V(`placeMlegOrder`,`mlegTradeForm`,n);let o=`/accounts/{accountId}/trading/options`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,B),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!q()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},J({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/trading/options`,httpMethod:`POST`,operationAuth:f}),l.data=W(n,l,e),U(s,d),{url:G(s),options:l}},placeOrder:async(t,n,r,i,a={})=>{V(`placeOrder`,`tradeId`,t);let o=`/trade/{tradeId}`.replace(`{tradeId}`,encodeURIComponent(String(t===void 0?`-tradeId-`:t))),s=new URL(o,B),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!q()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},J({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/trade/{tradeId}`,httpMethod:`POST`,operationAuth:f}),l.data=W(n,l,e),U(s,d),{url:G(s),options:l}},previewCryptoOrder:async(t,n,r,i,a={})=>{V(`previewCryptoOrder`,`accountId`,t),V(`previewCryptoOrder`,`cryptoOrderForm`,n);let o=`/accounts/{accountId}/trading/crypto/preview`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,B),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!q()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},J({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/trading/crypto/preview`,httpMethod:`POST`,operationAuth:f}),l.data=W(n,l,e),U(s,d),{url:G(s),options:l}},replaceOrder:async(t,n,r,i,a={})=>{V(`replaceOrder`,`accountId`,t),V(`replaceOrder`,`manualTradeReplaceForm`,n);let o=`/accounts/{accountId}/trading/replace`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),s=new URL(o,B),c;e&&(c=e.baseOptions);let l={method:`POST`,...c,...a},u=e&&!q()?{"User-Agent":e.userAgent}:{},d={};e?.authMode===`commercialApiKey`&&(await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e}),r!==void 0&&(d.userId=r),i!==void 0&&(d.userSecret=i)),e?.authMode===`personalApiKey`&&await H({object:d,key:`clientId`,keyParamName:`clientId`,configuration:e});let f={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode};u[`Content-Type`]=`application/json`;let p=c&&c.headers?c.headers:{};return l.headers={...u,...p,...a.headers},J({requestBody:n,queryParameters:d,requestConfig:l,path:o,configuration:e,pathTemplate:`/accounts/{accountId}/trading/replace`,httpMethod:`POST`,operationAuth:f}),l.data=W(n,l,e),U(s,d),{url:G(s),options:l}},searchCryptocurrencyPairInstruments:async(t,n,r,i,a,o={})=>{V(`searchCryptocurrencyPairInstruments`,`accountId`,t);let s=`/accounts/{accountId}/trading/instruments/cryptocurrencyPairs`.replace(`{accountId}`,encodeURIComponent(String(t===void 0?`-accountId-`:t))),c=new URL(s,B),l;e&&(l=e.baseOptions);let u={method:`GET`,...l,...o},d=e&&!q()?{"User-Agent":e.userAgent}:{},f={};e?.authMode===`commercialApiKey`&&(await H({object:f,key:`clientId`,keyParamName:`clientId`,configuration:e}),i!==void 0&&(f.userId=i),a!==void 0&&(f.userSecret=a)),e?.authMode===`personalApiKey`&&await H({object:f,key:`clientId`,keyParamName:`clientId`,configuration:e}),n!==void 0&&(f.base=n),r!==void 0&&(f.quote=r);let p={authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}},selectedAuthMode:e?.authMode},m=l&&l.headers?l.headers:{};return u.headers={...d,...m,...o.headers},J({queryParameters:f,requestConfig:u,path:s,configuration:e,pathTemplate:`/accounts/{accountId}/trading/instruments/cryptocurrencyPairs`,httpMethod:`GET`,operationAuth:p}),U(c,f),{url:G(c),options:u}}}},$=function(e){let t=ni(e);return{async cancelOrder(...n){let[r={},i]=n,a={brokerage_order_id:r.brokerage_order_id};return K(await t.cancelOrder(r.accountId,a,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getCryptocurrencyPairQuote(...n){let[r={},i]=n;return K(await t.getCryptocurrencyPairQuote(r.accountId,r.instrumentSymbol,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getOptionImpact(...n){let[r={},i]=n,a={order_type:r.order_type,time_in_force:r.time_in_force,limit_price:r.limit_price,stop_price:r.stop_price,price_effect:r.price_effect,legs:r.legs};return K(await t.getOptionImpact(r.accountId,a,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getOrderImpact(...n){let[r={},i]=n,a={account_id:r.account_id,action:r.action,universal_symbol_id:r.universal_symbol_id,order_type:r.order_type,time_in_force:r.time_in_force,price:r.price,stop:r.stop,units:r.units,notional_value:r.notional_value};return K(await t.getOrderImpact(a,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountOptionQuotes(...n){let[r={},i]=n;return K(await t.getUserAccountOptionQuotes(r.accountId,r.symbol,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async getUserAccountQuotes(...n){let[r={},i]=n;return K(await t.getUserAccountQuotes(r.symbols,r.accountId,r.useTicker,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async placeComplexOrder(...n){let[r={},i]=n,a={type:r.type,orders:r.orders,client_order_id:r.client_order_id};return K(await t.placeComplexOrder(r.accountId,a,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async placeCryptoOrder(...n){let[r={},i]=n,a={instrument:r.instrument,side:r.side,type:r.type,time_in_force:r.time_in_force,amount:r.amount,limit_price:r.limit_price,stop_price:r.stop_price,post_only:r.post_only,expiration_date:r.expiration_date};return K(await t.placeCryptoOrder(r.accountId,a,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async placeForceOrder(...n){let[r={},i]=n,a={account_id:r.account_id,action:r.action,universal_symbol_id:r.universal_symbol_id,symbol:r.symbol,order_type:r.order_type,time_in_force:r.time_in_force,trading_session:r.trading_session,expiry_date:r.expiry_date,price:r.price,stop:r.stop,units:r.units,notional_value:r.notional_value,client_order_id:r.client_order_id};return K(await t.placeForceOrder(a,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async placeMlegOrder(...n){let[r={},i]=n,a={order_type:r.order_type,time_in_force:r.time_in_force,limit_price:r.limit_price,stop_price:r.stop_price,price_effect:r.price_effect,legs:r.legs};return K(await t.placeMlegOrder(r.accountId,a,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async placeOrder(...n){let[r={},i]=n,a={wait_to_confirm:r.wait_to_confirm};return K(await t.placeOrder(r.tradeId,a,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async previewCryptoOrder(...n){let[r={},i]=n,a={instrument:r.instrument,side:r.side,type:r.type,time_in_force:r.time_in_force,amount:r.amount,limit_price:r.limit_price,stop_price:r.stop_price,post_only:r.post_only,expiration_date:r.expiration_date};return K(await t.previewCryptoOrder(r.accountId,a,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async replaceOrder(...n){let[r={},i]=n,a={brokerage_order_id:r.brokerage_order_id,action:r.action,order_type:r.order_type,time_in_force:r.time_in_force,price:r.price,symbol:r.symbol,stop:r.stop,units:r.units};return K(await t.replaceOrder(r.accountId,a,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})},async searchCryptocurrencyPairInstruments(...n){let[r={},i]=n;return K(await t.searchCryptocurrencyPairInstruments(r.accountId,r.base,r.quote,r.userId,r.userSecret,i),R,z,e,{authModes:[`commercialApiKey`,`personalApiKey`],requestSigningByAuthMode:{commercialApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PartnerSignature`,`PartnerTimestamp`]},personalApiKey:{secretParameter:`consumerKey`,signedSecuritySchemes:[`PersonalSignature`,`PersonalTimestamp`]}}})}}},ri=function(e,t,n){let r=$(e);return{cancelOrder(...e){return r.cancelOrder(...e).then(e=>e(n,t))},getCryptocurrencyPairQuote(...e){return r.getCryptocurrencyPairQuote(...e).then(e=>e(n,t))},getOptionImpact(...e){return r.getOptionImpact(...e).then(e=>e(n,t))},getOrderImpact(...e){return r.getOrderImpact(...e).then(e=>e(n,t))},getUserAccountOptionQuotes(...e){return r.getUserAccountOptionQuotes(...e).then(e=>e(n,t))},getUserAccountQuotes(...e){return r.getUserAccountQuotes(...e).then(e=>e(n,t))},placeComplexOrder(...e){return r.placeComplexOrder(...e).then(e=>e(n,t))},placeCryptoOrder(...e){return r.placeCryptoOrder(...e).then(e=>e(n,t))},placeForceOrder(...e){return r.placeForceOrder(...e).then(e=>e(n,t))},placeMlegOrder(...e){return r.placeMlegOrder(...e).then(e=>e(n,t))},placeOrder(...e){return r.placeOrder(...e).then(e=>e(n,t))},previewCryptoOrder(...e){return r.previewCryptoOrder(...e).then(e=>e(n,t))},replaceOrder(...e){return r.replaceOrder(...e).then(e=>e(n,t))},searchCryptocurrencyPairInstruments(...e){return r.searchCryptocurrencyPairInstruments(...e).then(e=>e(n,t))}}};var ii=class extends hr{cancelOrder(...e){return $(this.configuration).cancelOrder(...e).then(e=>e(this.axios,this.basePath))}getCryptocurrencyPairQuote(...e){return $(this.configuration).getCryptocurrencyPairQuote(...e).then(e=>e(this.axios,this.basePath))}getOptionImpact(...e){return $(this.configuration).getOptionImpact(...e).then(e=>e(this.axios,this.basePath))}getOrderImpact(...e){return $(this.configuration).getOrderImpact(...e).then(e=>e(this.axios,this.basePath))}getUserAccountOptionQuotes(...e){return $(this.configuration).getUserAccountOptionQuotes(...e).then(e=>e(this.axios,this.basePath))}getUserAccountQuotes(...e){return $(this.configuration).getUserAccountQuotes(...e).then(e=>e(this.axios,this.basePath))}placeComplexOrder(...e){return $(this.configuration).placeComplexOrder(...e).then(e=>e(this.axios,this.basePath))}placeCryptoOrder(...e){return $(this.configuration).placeCryptoOrder(...e).then(e=>e(this.axios,this.basePath))}placeForceOrder(...e){return $(this.configuration).placeForceOrder(...e).then(e=>e(this.axios,this.basePath))}placeMlegOrder(...e){return $(this.configuration).placeMlegOrder(...e).then(e=>e(this.axios,this.basePath))}placeOrder(...e){return $(this.configuration).placeOrder(...e).then(e=>e(this.axios,this.basePath))}previewCryptoOrder(...e){return $(this.configuration).previewCryptoOrder(...e).then(e=>e(this.axios,this.basePath))}replaceOrder(...e){return $(this.configuration).replaceOrder(...e).then(e=>e(this.axios,this.basePath))}searchCryptocurrencyPairInstruments(...e){return $(this.configuration).searchCryptocurrencyPairInstruments(...e).then(e=>e(this.axios,this.basePath))}},ai=class extends ii{},oi=class e{constructor(e){this.mode=`commercialApiKey`,this.consumerKey=e.consumerKey,this.clientId=e.clientId}static create(t){return new e(t)}},si=class e{constructor(e){this.mode=`personalApiKey`,this.consumerKey=e.consumerKey,this.clientId=e.clientId}static create(t){return new e(t)}},ci=class{constructor(){}static commercialApiKey(e){return oi.create(e)}static personalApiKey(e){return si.create(e)}},li=class{constructor(e){this.authMode=e.auth.mode,this.apiKey={},e.auth.mode===`commercialApiKey`&&(this.consumerKey=e.auth.consumerKey,e.auth.clientId!==void 0&&(this.apiKey.clientId=e.auth.clientId)),e.auth.mode===`personalApiKey`&&(this.consumerKey=e.auth.consumerKey,e.auth.clientId!==void 0&&(this.apiKey.clientId=e.auth.clientId)),this.basePath=e.basePath,this.baseOptions=e.baseOptions??{},this.userAgent=e.userAgent===void 0?`Konfig/12.2.20/typescript`:e.userAgent,this.formDataCtor=e.formDataCtor}isJsonMime(e){return e!==null&&(RegExp(`^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$`,`i`).test(e)||e.toLowerCase()===`application/json-patch+json`)}},ui=class{constructor(e){}},di=class extends ui{constructor(e){super(e);let t=new li(e);this.accountInformation=new Nr(t),this.apiStatus=new Rr(t),this.authentication=new Ur(t),this.connections=new qr(t),this.experimentalEndpoints=new Zr(t),this.referenceData=new ti(t),this.trading=new ai(t)}};e.AccountInformationApi=Nr,e.AccountInformationApiAxiosParamCreator=Ar,e.AccountInformationApiFactory=jr,e.AccountInformationApiFp=Y,e.AccountInformationApiGenerated=Mr,e.ApiStatusApi=Rr,e.ApiStatusApiAxiosParamCreator=Pr,e.ApiStatusApiFactory=Ir,e.ApiStatusApiFp=Fr,e.ApiStatusApiGenerated=Lr,e.AuthenticationApi=Ur,e.AuthenticationApiAxiosParamCreator=zr,e.AuthenticationApiFactory=Vr,e.AuthenticationApiFp=Br,e.AuthenticationApiGenerated=Hr,e.CommercialApiKeyAuth=oi,e.Configuration=li,e.ConnectionsApi=qr,e.ConnectionsApiAxiosParamCreator=Wr,e.ConnectionsApiFactory=Gr,e.ConnectionsApiFp=X,e.ConnectionsApiGenerated=Kr,e.ExperimentalEndpointsApi=Zr,e.ExperimentalEndpointsApiAxiosParamCreator=Jr,e.ExperimentalEndpointsApiFactory=Yr,e.ExperimentalEndpointsApiFp=Z,e.ExperimentalEndpointsApiGenerated=Xr,e.PersonalApiKeyAuth=si,e.ReferenceDataApi=ti,e.ReferenceDataApiAxiosParamCreator=Qr,e.ReferenceDataApiFactory=$r,e.ReferenceDataApiFp=Q,e.ReferenceDataApiGenerated=ei,e.Snaptrade=di,e.SnaptradeAuth=ci,e.SnaptradeError=wr,e.TradingApi=ai,e.TradingApiAxiosParamCreator=ni,e.TradingApiFactory=ri,e.TradingApiFp=$,e.TradingApiGenerated=ii,e.parseIfJson=Er,e.readableStreamToString=Tr});