ebay-api 8.1.0 → 8.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- function bind$2(e,t){return function wrap(){return e.apply(t,arguments)}}const{toString:e}=Object.prototype,{getPrototypeOf:t}=Object,r=(n=Object.create(null),t=>{const r=e.call(t);return n[r]||(n[r]=r.slice(8,-1).toLowerCase())});var n;const kindOfTest=e=>(e=e.toLowerCase(),t=>r(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray:o}=Array,i=typeOfTest("undefined");const s=kindOfTest("ArrayBuffer");const c=typeOfTest("string"),u=typeOfTest("function"),l=typeOfTest("number"),isObject=e=>null!==e&&"object"==typeof e,isPlainObject=e=>{if("object"!==r(e))return!1;const n=t(e);return!(null!==n&&n!==Object.prototype&&null!==Object.getPrototypeOf(n)||Symbol.toStringTag in e||Symbol.iterator in e)},p=kindOfTest("Date"),d=kindOfTest("File"),E=kindOfTest("Blob"),f=kindOfTest("FileList"),_=kindOfTest("URLSearchParams");function forEach(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),o(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(n=0;n<i;n++)s=o[n],t.call(null,e[s],s,e)}}function findKey(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const h="undefined"==typeof self?"undefined"==typeof global?window:global:self,isContextDefined=e=>!i(e)&&e!==h;const g=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&t(Uint8Array)),m=kindOfTest("HTMLFormElement"),R=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),A=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};forEach(r,((r,o)=>{!1!==t(r,o,e)&&(n[o]=r)})),Object.defineProperties(e,n)};var y={isArray:o,isArrayBuffer:s,isBuffer:function isBuffer$1(e){return null!==e&&!i(e)&&null!==e.constructor&&!i(e.constructor)&&u(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:t=>{const r="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||e.call(t)===r||u(t.toString)&&t.toString()===r)},isArrayBufferView:function isArrayBufferView(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&s(e.buffer),t},isString:c,isNumber:l,isBoolean:e=>!0===e||!1===e,isObject:isObject,isPlainObject:isPlainObject,isUndefined:i,isDate:p,isFile:d,isBlob:E,isRegExp:A,isFunction:u,isStream:e=>isObject(e)&&u(e.pipe),isURLSearchParams:_,isTypedArray:g,isFileList:f,forEach:forEach,merge:function merge$1(){const{caseless:e}=isContextDefined(this)&&this||{},t={},assignValue=(r,n)=>{const i=e&&findKey(t,n)||n;isPlainObject(t[i])&&isPlainObject(r)?t[i]=merge$1(t[i],r):isPlainObject(r)?t[i]=merge$1({},r):o(r)?t[i]=r.slice():t[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&forEach(arguments[e],assignValue);return t},extend:(e,t,r,{allOwnKeys:n}={})=>(forEach(t,((t,n)=>{r&&u(t)?e[n]=bind$2(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,r,n,o)=>{let i,s,c;const u={};if(r=r||{},null==e)return r;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)c=i[s],o&&!o(c,e,r)||u[c]||(r[c]=e[c],u[c]=!0);e=!1!==n&&t(e)}while(e&&(!n||n(e,r))&&e!==Object.prototype);return r},kindOf:r,kindOfTest:kindOfTest,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(o(e))return e;let t=e.length;if(!l(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:m,hasOwnProperty:R,hasOwnProp:R,reduceDescriptors:reduceDescriptors,freezeMethods:e=>{reduceDescriptors(e,((t,r)=>{if(u(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];u(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},define=e=>{e.forEach((e=>{r[e]=!0}))};return o(e)?define(e):define(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,(function replacer(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:findKey,global:h,isContextDefined:isContextDefined,toJSONObject:e=>{const t=new Array(10),visit=(e,r)=>{if(isObject(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const n=o(e)?[]:{};return forEach(e,((e,t)=>{const o=visit(e,r+1);!i(o)&&(n[t]=o)})),t[r]=void 0,n}}return e};return visit(e,0)}};function AxiosError(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}y.inherits(AxiosError,Error,{toJSON:function toJSON(){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:y.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const I=AxiosError.prototype,T={};function getAugmentedNamespace(e){var t=e.default;if("function"==typeof t){var r=function a(){if(this instanceof a){var e=[null];e.push.apply(e,arguments);var r=Function.bind.apply(t,e);return new r}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{T[e]={value:e}})),Object.defineProperties(AxiosError,T),Object.defineProperty(I,"isAxiosError",{value:!0}),AxiosError.from=(e,t,r,n,o,i)=>{const s=Object.create(I);return y.toFlatObject(e,s,(function filter(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),AxiosError.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};var S="object"==typeof self?self.FormData:window.FormData;function isVisitable(e){return y.isPlainObject(e)||y.isArray(e)}function removeBrackets(e){return y.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,r){return e?e.concat(t).map((function each(e,t){return e=removeBrackets(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const N=y.toFlatObject(y,{},null,(function filter(e){return/^is[A-Z]/.test(e)}));function toFormData(e,t,r){if(!y.isObject(e))throw new TypeError("target must be an object");t=t||new(S||FormData);const n=(r=y.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function defined(e,t){return!y.isUndefined(t[e])}))).metaTokens,o=r.visitor||defaultVisitor,i=r.dots,s=r.indexes,c=(r.Blob||"undefined"!=typeof Blob&&Blob)&&function isSpecCompliant(e){return e&&y.isFunction(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator]}(t);if(!y.isFunction(o))throw new TypeError("visitor must be a function");function convertValue(e){if(null===e)return"";if(y.isDate(e))return e.toISOString();if(!c&&y.isBlob(e))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return y.isArrayBuffer(e)||y.isTypedArray(e)?c&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function defaultVisitor(e,r,o){let c=e;if(e&&!o&&"object"==typeof e)if(y.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(y.isArray(e)&&function isFlatArray(e){return y.isArray(e)&&!e.some(isVisitable)}(e)||y.isFileList(e)||y.endsWith(r,"[]")&&(c=y.toArray(e)))return r=removeBrackets(r),c.forEach((function each(e,n){!y.isUndefined(e)&&null!==e&&t.append(!0===s?renderKey([r],n,i):null===s?r:r+"[]",convertValue(e))})),!1;return!!isVisitable(e)||(t.append(renderKey(o,r,i),convertValue(e)),!1)}const u=[],l=Object.assign(N,{defaultVisitor:defaultVisitor,convertValue:convertValue,isVisitable:isVisitable});if(!y.isObject(e))throw new TypeError("data must be an object");return function build(e,r){if(!y.isUndefined(e)){if(-1!==u.indexOf(e))throw Error("Circular reference detected in "+r.join("."));u.push(e),y.forEach(e,(function each(e,n){!0===(!(y.isUndefined(e)||null===e)&&o.call(t,e,y.isString(n)?n.trim():n,r,l))&&build(e,r?r.concat(n):[n])})),u.pop()}}(e),t}function encode$2(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function replacer(e){return t[e]}))}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData(e,this,t)}const O=AxiosURLSearchParams.prototype;function encode$1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,r){if(!t)return e;const n=r&&r.encode||encode$1,o=r&&r.serialize;let i;if(i=o?o(t,r):y.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}O.append=function append(e,t){this._pairs.push([e,t])},O.toString=function toString(e){const t=e?function(t){return e.call(this,t,encode$2)}:encode$2;return this._pairs.map((function each(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var C=class InterceptorManager{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){y.forEach(this.handlers,(function forEachHandler(t){null!==t&&e(t)}))}},P={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},b="undefined"!=typeof URLSearchParams?URLSearchParams:AxiosURLSearchParams,D=FormData;const U=(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),L="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var M={isBrowser:!0,classes:{URLSearchParams:b,FormData:D,Blob:Blob},isStandardBrowserEnv:U,isStandardBrowserWebWorkerEnv:L,protocols:["http","https","file","blob","url","data"]};function formDataToJSON(e){function buildPath(e,t,r,n){let o=e[n++];const i=Number.isFinite(+o),s=n>=e.length;if(o=!o&&y.isArray(r)?r.length:o,s)return y.hasOwnProp(r,o)?r[o]=[r[o],t]:r[o]=t,!i;r[o]&&y.isObject(r[o])||(r[o]=[]);return buildPath(e,t,r[o],n)&&y.isArray(r[o])&&(r[o]=function arrayToObject$1(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(r[o])),!i}if(y.isFormData(e)&&y.isFunction(e.entries)){const t={};return y.forEachEntry(e,((e,r)=>{buildPath(function parsePropPath(e){return y.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,t,0)})),t}return null}const B={"Content-Type":void 0};const F={transitional:P,adapter:["xhr","http"],transformRequest:[function transformRequest(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=y.isObject(e);o&&y.isHTMLForm(e)&&(e=new FormData(e));if(y.isFormData(e))return n&&n?JSON.stringify(formDataToJSON(e)):e;if(y.isArrayBuffer(e)||y.isBuffer(e)||y.isStream(e)||y.isFile(e)||y.isBlob(e))return e;if(y.isArrayBufferView(e))return e.buffer;if(y.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function toURLEncodedForm(e,t){return toFormData(e,new M.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return M.isNode&&y.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=y.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return toFormData(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function stringifySafely(e,t,r){if(y.isString(e))try{return(t||JSON.parse)(e),y.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function transformResponse(e){const t=this.transitional||F.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&y.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw AxiosError.from(e,AxiosError.ERR_BAD_RESPONSE,this,null,this.response);throw 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 validateStatus(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};y.forEach(["delete","get","head"],(function forEachMethodNoData(e){F.headers[e]={}})),y.forEach(["post","put","patch"],(function forEachMethodWithData(e){F.headers[e]=y.merge(B)}));var v=F;const x=y.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"]);const w=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:y.isArray(e)?e.map(normalizeValue):String(e)}function matchHeaderValue(e,t,r,n){return y.isFunction(n)?n.call(this,t,r):y.isString(t)?y.isString(n)?-1!==t.indexOf(n):y.isRegExp(n)?n.test(t):void 0:void 0}class AxiosHeaders{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function setHeader(e,t,r){const o=normalizeHeader(t);if(!o)throw new Error("header name must be a non-empty string");const i=y.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=normalizeValue(e))}const setHeaders=(e,t)=>y.forEach(e,((e,r)=>setHeader(e,r,t)));return y.isPlainObject(e)||e instanceof this.constructor?setHeaders(e,t):y.isString(e)&&(e=e.trim())&&!function isValidHeaderName(e){return/^[-_a-zA-Z]+$/.test(e.trim())}(e)?setHeaders((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function parser(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&x[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&setHeader(t,e,r),this}get(e,t){if(e=normalizeHeader(e)){const r=y.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function parseTokens(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(y.isFunction(t))return t.call(this,e,r);if(y.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e)){const r=y.findKey(this,e);return!(!r||t&&!matchHeaderValue(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function deleteHeader(e){if(e=normalizeHeader(e)){const o=y.findKey(r,e);!o||t&&!matchHeaderValue(0,r[o],o,t)||(delete r[o],n=!0)}}return y.isArray(e)?e.forEach(deleteHeader):deleteHeader(e),n}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(e){const t=this,r={};return y.forEach(this,((n,o)=>{const i=y.findKey(r,o);if(i)return t[i]=normalizeValue(n),void delete t[o];const s=e?function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();s!==o&&delete t[o],t[s]=normalizeValue(n),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return y.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&y.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[w]=this[w]={accessors:{}}).accessors,r=this.prototype;function defineAccessor(e){const n=normalizeHeader(e);t[n]||(!function buildAccessors(e,t){const r=y.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return y.isArray(e)?e.forEach(defineAccessor):defineAccessor(e),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),y.freezeMethods(AxiosHeaders.prototype),y.freezeMethods(AxiosHeaders);var k=AxiosHeaders;function transformData(e,t){const r=this||v,n=t||r,o=k.from(n.headers);let i=n.data;return y.forEach(e,(function transform(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function isCancel(e){return!(!e||!e.__CANCEL__)}function CanceledError(e,t,r){AxiosError.call(this,null==e?"canceled":e,AxiosError.ERR_CANCELED,t,r),this.name="CanceledError"}y.inherits(CanceledError,AxiosError,{__CANCEL__:!0});var G=M.isStandardBrowserEnv?function standardBrowserEnv(){return{write:function write(e,t,r,n,o,i){const s=[];s.push(e+"="+encodeURIComponent(t)),y.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),y.isString(n)&&s.push("path="+n),y.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function remove(e){this.write(e,"",Date.now()-864e5)}}}():{write:function write(){},read:function read(){return null},remove:function remove(){}};function buildFullPath(e,t){return e&&!function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t)?function combineURLs(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Y=M.isStandardBrowserEnv?function standardBrowserEnv(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function resolveURL(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=resolveURL(window.location.href),function isURLSameOrigin(e){const t=y.isString(e)?resolveURL(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function isURLSameOrigin(){return!0};function progressEventReducer(e,t){let r=0;const n=function speedometer(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function push(c){const u=Date.now(),l=n[s];o||(o=u),r[i]=c,n[i]=u;let p=s,d=0;for(;p!==i;)d+=r[p++],p%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-o<t)return;const E=l&&u-l;return E?Math.round(1e3*d/E):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,c=i-r,u=n(c);r=i;const l={loaded:i,total:s,progress:s?i/s:void 0,bytes:c,rate:u||void 0,estimated:u&&s&&i<=s?(s-i)/u:void 0,event:o};l[t?"download":"upload"]=!0,e(l)}}const H={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function dispatchXhrRequest(t,r){let n=e.data;const o=k.from(e.headers).normalize(),i=e.responseType;let s;function done(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}y.isFormData(n)&&(M.isStandardBrowserEnv||M.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let c=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+r))}const u=buildFullPath(e.baseURL,e.url);function onloadend(){if(!c)return;const n=k.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function settle(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new AxiosError("Request failed with status code "+r.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function _resolve(e){t(e),done()}),(function _reject(e){r(e),done()}),{data:i&&"text"!==i&&"json"!==i?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:n,config:e,request:c}),c=null}if(c.open(e.method.toUpperCase(),buildURL(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=onloadend:c.onreadystatechange=function handleLoad(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(onloadend)},c.onabort=function handleAbort(){c&&(r(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,c)),c=null)},c.onerror=function handleError(){r(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,c)),c=null},c.ontimeout=function handleTimeout(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||P;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new AxiosError(t,n.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,c)),c=null},M.isStandardBrowserEnv){const t=(e.withCredentials||Y(u))&&e.xsrfCookieName&&G.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===n&&o.setContentType(null),"setRequestHeader"in c&&y.forEach(o.toJSON(),(function setRequestHeader(e,t){c.setRequestHeader(t,e)})),y.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),i&&"json"!==i&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",progressEventReducer(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",progressEventReducer(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{c&&(r(!t||t.type?new CanceledError(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const l=function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);l&&-1===M.protocols.indexOf(l)?r(new AxiosError("Unsupported protocol "+l+":",AxiosError.ERR_BAD_REQUEST,e)):c.send(n||null)}))}};y.forEach(H,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var adapters_getAdapter=e=>{e=y.isArray(e)?e:[e];const{length:t}=e;let r,n;for(let o=0;o<t&&(r=e[o],!(n=y.isString(r)?H[r.toLowerCase()]:r));o++);if(!n){if(!1===n)throw new AxiosError(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(y.hasOwnProp(H,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`)}if(!y.isFunction(n))throw new TypeError("adapter is not a function");return n};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError(null,e)}function dispatchRequest(e){throwIfCancellationRequested(e),e.headers=k.from(e.headers),e.data=transformData.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return adapters_getAdapter(e.adapter||v.adapter)(e).then((function onAdapterResolution(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,e.transformResponse,t),t.headers=k.from(t.headers),t}),(function onAdapterRejection(t){return isCancel(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData.call(e,e.transformResponse,t.response),t.response.headers=k.from(t.response.headers))),Promise.reject(t)}))}const headersToObject=e=>e instanceof k?e.toJSON():e;function mergeConfig(e,t){t=t||{};const r={};function getMergedValue(e,t,r){return y.isPlainObject(e)&&y.isPlainObject(t)?y.merge.call({caseless:r},e,t):y.isPlainObject(t)?y.merge({},t):y.isArray(t)?t.slice():t}function mergeDeepProperties(e,t,r){return y.isUndefined(t)?y.isUndefined(e)?void 0:getMergedValue(void 0,e,r):getMergedValue(e,t,r)}function valueFromConfig2(e,t){if(!y.isUndefined(t))return getMergedValue(void 0,t)}function defaultToConfig2(e,t){return y.isUndefined(t)?y.isUndefined(e)?void 0:getMergedValue(void 0,e):getMergedValue(void 0,t)}function mergeDirectKeys(r,n,o){return o in t?getMergedValue(r,n):o in e?getMergedValue(void 0,r):void 0}const n={url:valueFromConfig2,method:valueFromConfig2,data:valueFromConfig2,baseURL:defaultToConfig2,transformRequest:defaultToConfig2,transformResponse:defaultToConfig2,paramsSerializer:defaultToConfig2,timeout:defaultToConfig2,timeoutMessage:defaultToConfig2,withCredentials:defaultToConfig2,adapter:defaultToConfig2,responseType:defaultToConfig2,xsrfCookieName:defaultToConfig2,xsrfHeaderName:defaultToConfig2,onUploadProgress:defaultToConfig2,onDownloadProgress:defaultToConfig2,decompress:defaultToConfig2,maxContentLength:defaultToConfig2,maxBodyLength:defaultToConfig2,beforeRedirect:defaultToConfig2,transport:defaultToConfig2,httpAgent:defaultToConfig2,httpsAgent:defaultToConfig2,cancelToken:defaultToConfig2,socketPath:defaultToConfig2,responseEncoding:defaultToConfig2,validateStatus:mergeDirectKeys,headers:(e,t)=>mergeDeepProperties(headersToObject(e),headersToObject(t),!0)};return y.forEach(Object.keys(e).concat(Object.keys(t)),(function computeConfigValue(o){const i=n[o]||mergeDeepProperties,s=i(e[o],t[o],o);y.isUndefined(s)&&i!==mergeDirectKeys||(r[o]=s)})),r}const $="1.2.1",j={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{j[e]=function validator(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const V={};j.transitional=function transitional(e,t,r){function formatMessage(e,t){return"[Axios v1.2.1] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,n,o)=>{if(!1===e)throw new AxiosError(formatMessage(n," has been removed"+(t?" in "+t:"")),AxiosError.ERR_DEPRECATED);return t&&!V[n]&&(V[n]=!0,console.warn(formatMessage(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,o)}};var K={assertOptions:function assertOptions(e,t,r){if("object"!=typeof e)throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const t=e[i],r=void 0===t||s(t,i,e);if(!0!==r)throw new AxiosError("option "+i+" must be "+r,AxiosError.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new AxiosError("Unknown option "+i,AxiosError.ERR_BAD_OPTION)}},validators:j};const W=K.validators;class Axios{constructor(e){this.defaults=e,this.interceptors={request:new C,response:new C}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=mergeConfig(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;let i;void 0!==r&&K.assertOptions(r,{silentJSONParsing:W.transitional(W.boolean),forcedJSONParsing:W.transitional(W.boolean),clarifyTimeoutError:W.transitional(W.boolean)},!1),void 0!==n&&K.assertOptions(n,{encode:W.function,serialize:W.function},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase(),i=o&&y.merge(o.common,o[t.method]),i&&y.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=k.concat(i,o);const s=[];let c=!0;this.interceptors.request.forEach((function unshiftRequestInterceptors(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const u=[];let l;this.interceptors.response.forEach((function pushResponseInterceptors(e){u.push(e.fulfilled,e.rejected)}));let p,d=0;if(!c){const e=[dispatchRequest.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,u),p=e.length,l=Promise.resolve(t);d<p;)l=l.then(e[d++],e[d++]);return l}p=s.length;let E=t;for(d=0;d<p;){const e=s[d++],t=s[d++];try{E=e(E)}catch(e){t.call(this,e);break}}try{l=dispatchRequest.call(this,E)}catch(e){return Promise.reject(e)}for(d=0,p=u.length;d<p;)l=l.then(u[d++],u[d++]);return l}getUri(e){return buildURL(buildFullPath((e=mergeConfig(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}y.forEach(["delete","get","head","options"],(function forEachMethodNoData(e){Axios.prototype[e]=function(t,r){return this.request(mergeConfig(r||{},{method:e,url:t,data:(r||{}).data}))}})),y.forEach(["post","put","patch"],(function forEachMethodWithData(e){function generateHTTPMethod(t){return function httpMethod(r,n,o){return this.request(mergeConfig(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Axios.prototype[e]=generateHTTPMethod(),Axios.prototype[e+"Form"]=generateHTTPMethod(!0)}));var q=Axios;class CancelToken{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function promiseExecutor(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function reject(){r.unsubscribe(t)},n},e((function cancel(e,n,o){r.reason||(r.reason=new CanceledError(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new CancelToken((function executor(t){e=t})),cancel:e}}}var X=CancelToken;const J=function createInstance(e){const t=new q(e),r=bind$2(q.prototype.request,t);return y.extend(r,q.prototype,t,{allOwnKeys:!0}),y.extend(r,t,null,{allOwnKeys:!0}),r.create=function create(t){return createInstance(mergeConfig(e,t))},r}(v);J.Axios=q,J.CanceledError=CanceledError,J.CancelToken=X,J.isCancel=isCancel,J.VERSION=$,J.toFormData=toFormData,J.AxiosError=AxiosError,J.Cancel=J.CanceledError,J.all=function all(e){return Promise.all(e)},J.spread=function spread(e){return function wrap(t){return e.apply(null,t)}},J.isAxiosError=function isAxiosError(e){return y.isObject(e)&&!0===e.isAxiosError},J.mergeConfig=mergeConfig,J.AxiosHeaders=k,J.formToJSON=e=>formDataToJSON(y.isHTMLForm(e)?new FormData(e):e),J.default=J;var z,Q,Z=J,ee={exports:{}};function requireMs(){if(Q)return z;Q=1;var e=1e3,t=60*e,r=60*t,n=24*r,o=7*n,i=365.25*n;function plural(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}return z=function(s,c){c=c||{};var u=typeof s;if("string"===u&&s.length>0)return function parse(s){if((s=String(s)).length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(!c)return;var u=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*i;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*n;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*t;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(s);if("number"===u&&isFinite(s))return c.long?function fmtLong(o){var i=Math.abs(o);if(i>=n)return plural(o,i,n,"day");if(i>=r)return plural(o,i,r,"hour");if(i>=t)return plural(o,i,t,"minute");if(i>=e)return plural(o,i,e,"second");return o+" ms"}(s):function fmtShort(o){var i=Math.abs(o);if(i>=n)return Math.round(o/n)+"d";if(i>=r)return Math.round(o/r)+"h";if(i>=t)return Math.round(o/t)+"m";if(i>=e)return Math.round(o/e)+"s";return o+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))}}var te=function setup(e){function createDebug(e){let t,r,n,o=null;function debug(...e){if(!debug.enabled)return;const r=debug,n=Number(new Date),o=n-(t||n);r.diff=o,r.prev=t,r.curr=n,t=n,e[0]=createDebug.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,n)=>{if("%%"===t)return"%";i++;const o=createDebug.formatters[n];if("function"==typeof o){const n=e[i];t=o.call(r,n),e.splice(i,1),i--}return t})),createDebug.formatArgs.call(r,e);(r.log||createDebug.log).apply(r,e)}return debug.namespace=e,debug.useColors=createDebug.useColors(),debug.color=createDebug.selectColor(e),debug.extend=extend,debug.destroy=createDebug.destroy,Object.defineProperty(debug,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(r!==createDebug.namespaces&&(r=createDebug.namespaces,n=createDebug.enabled(e)),n),set:e=>{o=e}}),"function"==typeof createDebug.init&&createDebug.init(debug),debug}function extend(e,t){const r=createDebug(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function toNamespace(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return createDebug.debug=createDebug,createDebug.default=createDebug,createDebug.coerce=function coerce(e){if(e instanceof Error)return e.stack||e.message;return e},createDebug.disable=function disable(){const e=[...createDebug.names.map(toNamespace),...createDebug.skips.map(toNamespace).map((e=>"-"+e))].join(",");return createDebug.enable(""),e},createDebug.enable=function enable(e){let t;createDebug.save(e),createDebug.namespaces=e,createDebug.names=[],createDebug.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length;for(t=0;t<n;t++)r[t]&&("-"===(e=r[t].replace(/\*/g,".*?"))[0]?createDebug.skips.push(new RegExp("^"+e.slice(1)+"$")):createDebug.names.push(new RegExp("^"+e+"$")))},createDebug.enabled=function enabled(e){if("*"===e[e.length-1])return!0;let t,r;for(t=0,r=createDebug.skips.length;t<r;t++)if(createDebug.skips[t].test(e))return!1;for(t=0,r=createDebug.names.length;t<r;t++)if(createDebug.names[t].test(e))return!0;return!1},createDebug.humanize=requireMs(),createDebug.destroy=function destroy(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((t=>{createDebug[t]=e[t]})),createDebug.names=[],createDebug.skips=[],createDebug.formatters={},createDebug.selectColor=function selectColor(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return createDebug.colors[Math.abs(t)%createDebug.colors.length]},createDebug.enable(createDebug.load()),createDebug};!function(e,t){t.formatArgs=function formatArgs(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function save(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function load(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function useColors(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function localstorage(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=te(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(ee,ee.exports);var re,ne=ee.exports,oe="undefined"!=typeof Symbol&&Symbol,ie=function hasSymbols(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0},se="Function.prototype.bind called on incompatible ",ae=Array.prototype.slice,ce=Object.prototype.toString,ue="[object Function]",le=function bind(e){var t=this;if("function"!=typeof t||ce.call(t)!==ue)throw new TypeError(se+t);for(var r,n=ae.call(arguments,1),binder=function(){if(this instanceof r){var o=t.apply(this,n.concat(ae.call(arguments)));return Object(o)===o?o:this}return t.apply(e,n.concat(ae.call(arguments)))},o=Math.max(0,t.length-n.length),i=[],s=0;s<o;s++)i.push("$"+s);if(r=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this,arguments); }")(binder),t.prototype){var c=function Empty(){};c.prototype=t.prototype,r.prototype=new c,c.prototype=null}return r},pe=Function.prototype.bind||le,de=pe.call(Function.call,Object.prototype.hasOwnProperty),Ee=SyntaxError,fe=Function,_e=TypeError,getEvalledConstructor=function(e){try{return fe('"use strict"; return ('+e+").constructor;")()}catch(e){}},he=Object.getOwnPropertyDescriptor;if(he)try{he({},"")}catch(e){he=null}var throwTypeError=function(){throw new _e},ge=he?function(){try{return throwTypeError}catch(e){try{return he(arguments,"callee").get}catch(e){return throwTypeError}}}():throwTypeError,me=function hasNativeSymbols(){return"function"==typeof oe&&("function"==typeof Symbol&&("symbol"==typeof oe("foo")&&("symbol"==typeof Symbol("bar")&&ie())))}(),Re=Object.getPrototypeOf||function(e){return e.__proto__},Ae={},ye="undefined"==typeof Uint8Array?re:Re(Uint8Array),Ie={"%AggregateError%":"undefined"==typeof AggregateError?re:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?re:ArrayBuffer,"%ArrayIteratorPrototype%":me?Re([][Symbol.iterator]()):re,"%AsyncFromSyncIteratorPrototype%":re,"%AsyncFunction%":Ae,"%AsyncGenerator%":Ae,"%AsyncGeneratorFunction%":Ae,"%AsyncIteratorPrototype%":Ae,"%Atomics%":"undefined"==typeof Atomics?re:Atomics,"%BigInt%":"undefined"==typeof BigInt?re:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?re:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?re:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?re:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?re:FinalizationRegistry,"%Function%":fe,"%GeneratorFunction%":Ae,"%Int8Array%":"undefined"==typeof Int8Array?re:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?re:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?re:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":me?Re(Re([][Symbol.iterator]())):re,"%JSON%":"object"==typeof JSON?JSON:re,"%Map%":"undefined"==typeof Map?re:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&me?Re((new Map)[Symbol.iterator]()):re,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?re:Promise,"%Proxy%":"undefined"==typeof Proxy?re:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?re:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?re:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&me?Re((new Set)[Symbol.iterator]()):re,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?re:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":me?Re(""[Symbol.iterator]()):re,"%Symbol%":me?Symbol:re,"%SyntaxError%":Ee,"%ThrowTypeError%":ge,"%TypedArray%":ye,"%TypeError%":_e,"%Uint8Array%":"undefined"==typeof Uint8Array?re:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?re:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?re:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?re:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?re:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?re:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?re:WeakSet},Te=function doEval(e){var t;if("%AsyncFunction%"===e)t=getEvalledConstructor("async function () {}");else if("%GeneratorFunction%"===e)t=getEvalledConstructor("function* () {}");else if("%AsyncGeneratorFunction%"===e)t=getEvalledConstructor("async function* () {}");else if("%AsyncGenerator%"===e){var r=doEval("%AsyncGeneratorFunction%");r&&(t=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var n=doEval("%AsyncGenerator%");n&&(t=Re(n.prototype))}return Ie[e]=t,t},Se={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Ne=pe,Oe=de,Ce=Ne.call(Function.call,Array.prototype.concat),Pe=Ne.call(Function.apply,Array.prototype.splice),be=Ne.call(Function.call,String.prototype.replace),De=Ne.call(Function.call,String.prototype.slice),Ue=Ne.call(Function.call,RegExp.prototype.exec),Le=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Me=/\\(\\)?/g,Be=function stringToPath(e){var t=De(e,0,1),r=De(e,-1);if("%"===t&&"%"!==r)throw new Ee("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new Ee("invalid intrinsic syntax, expected opening `%`");var n=[];return be(e,Le,(function(e,t,r,o){n[n.length]=r?be(o,Me,"$1"):t||e})),n},Fe=function getBaseIntrinsic(e,t){var r,n=e;if(Oe(Se,n)&&(n="%"+(r=Se[n])[0]+"%"),Oe(Ie,n)){var o=Ie[n];if(o===Ae&&(o=Te(n)),void 0===o&&!t)throw new _e("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new Ee("intrinsic "+e+" does not exist!")},ve=function GetIntrinsic(e,t){if("string"!=typeof e||0===e.length)throw new _e("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new _e('"allowMissing" argument must be a boolean');if(null===Ue(/^%?[^%]*%?$/,e))throw new Ee("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Be(e),n=r.length>0?r[0]:"",o=Fe("%"+n+"%",t),i=o.name,s=o.value,c=!1,u=o.alias;u&&(n=u[0],Pe(r,Ce([0,1],u)));for(var l=1,p=!0;l<r.length;l+=1){var d=r[l],E=De(d,0,1),f=De(d,-1);if(('"'===E||"'"===E||"`"===E||'"'===f||"'"===f||"`"===f)&&E!==f)throw new Ee("property names with quotes must have matching quotes");if("constructor"!==d&&p||(c=!0),Oe(Ie,i="%"+(n+="."+d)+"%"))s=Ie[i];else if(null!=s){if(!(d in s)){if(!t)throw new _e("base intrinsic for "+e+" exists, but the property is not available.");return}if(he&&l+1>=r.length){var _=he(s,d);s=(p=!!_)&&"get"in _&&!("originalValue"in _.get)?_.get:s[d]}else p=Oe(s,d),s=s[d];p&&!c&&(Ie[i]=s)}}return s},xe={exports:{}};!function(e){var t=pe,r=ve,n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(o,n),s=r("%Object.getOwnPropertyDescriptor%",!0),c=r("%Object.defineProperty%",!0),u=r("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function callBind(e){var r=i(t,o,arguments);if(s&&c){var n=s(r,"length");n.configurable&&c(r,"length",{value:1+u(0,e.length-(arguments.length-1))})}return r};var l=function applyBind(){return i(t,n,arguments)};c?c(e.exports,"apply",{value:l}):e.exports.apply=l}(xe);var we=ve,ke=xe.exports,Ge=ke(we("String.prototype.indexOf")),Ye=getAugmentedNamespace(Object.freeze({__proto__:null,default:{}})),He="function"==typeof Map&&Map.prototype,$e=Object.getOwnPropertyDescriptor&&He?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,je=He&&$e&&"function"==typeof $e.get?$e.get:null,Ve=He&&Map.prototype.forEach,Ke="function"==typeof Set&&Set.prototype,We=Object.getOwnPropertyDescriptor&&Ke?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,qe=Ke&&We&&"function"==typeof We.get?We.get:null,Xe=Ke&&Set.prototype.forEach,Je="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,ze="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Qe="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,Ze=Boolean.prototype.valueOf,et=Object.prototype.toString,tt=Function.prototype.toString,rt=String.prototype.match,nt=String.prototype.slice,ot=String.prototype.replace,it=String.prototype.toUpperCase,st=String.prototype.toLowerCase,at=RegExp.prototype.test,ct=Array.prototype.concat,ut=Array.prototype.join,lt=Array.prototype.slice,pt=Math.floor,dt="function"==typeof BigInt?BigInt.prototype.valueOf:null,Et=Object.getOwnPropertySymbols,ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,_t="function"==typeof Symbol&&"object"==typeof Symbol.iterator,ht="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===_t||"symbol")?Symbol.toStringTag:null,gt=Object.prototype.propertyIsEnumerable,mt=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function addNumericSeparator(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||at.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-pt(-e):pt(e);if(n!==e){var o=String(n),i=nt.call(t,o.length+1);return ot.call(o,r,"$&_")+"."+ot.call(ot.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ot.call(t,r,"$&_")}var Rt=Ye,At=Rt.custom,yt=isSymbol(At)?At:null;function wrapQuotes(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function quote(e){return ot.call(String(e),/"/g,"&quot;")}function isArray$3(e){return!("[object Array]"!==toStr(e)||ht&&"object"==typeof e&&ht in e)}function isRegExp$1(e){return!("[object RegExp]"!==toStr(e)||ht&&"object"==typeof e&&ht in e)}function isSymbol(e){if(_t)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!ft)return!1;try{return ft.call(e),!0}catch(e){}return!1}var It=Object.prototype.hasOwnProperty||function(e){return e in this};function has$3(e,t){return It.call(e,t)}function toStr(e){return et.call(e)}function indexOf(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function inspectString(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return inspectString(nt.call(e,0,t.maxStringLength),t)+n}return wrapQuotes(ot.call(ot.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lowbyte),"single",t)}function lowbyte(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+it.call(t.toString(16))}function markBoxed(e){return"Object("+e+")"}function weakCollectionOf(e){return e+" { ? }"}function collectionOf(e,t,r,n){return e+" ("+t+") {"+(n?indentedJoin(r,n):ut.call(r,", "))+"}"}function indentedJoin(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+ut.call(e,","+r)+"\n"+t.prev}function arrObjKeys(e,t){var r=isArray$3(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=has$3(e,o)?t(e[o],e):""}var i,s="function"==typeof Et?Et(e):[];if(_t){i={};for(var c=0;c<s.length;c++)i["$"+s[c]]=s[c]}for(var u in e)has$3(e,u)&&(r&&String(Number(u))===u&&u<e.length||_t&&i["$"+u]instanceof Symbol||(at.call(/[^\w$]/,u)?n.push(t(u,e)+": "+t(e[u],e)):n.push(u+": "+t(e[u],e))));if("function"==typeof Et)for(var l=0;l<s.length;l++)gt.call(e,s[l])&&n.push("["+t(s[l])+"]: "+t(e[s[l]],e));return n}var Tt=ve,St=function callBoundIntrinsic(e,t){var r=we(e,!!t);return"function"==typeof r&&Ge(e,".prototype.")>-1?ke(r):r},Nt=function inspect_(e,t,r,n){var o=t||{};if(has$3(o,"quoteStyle")&&"single"!==o.quoteStyle&&"double"!==o.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has$3(o,"maxStringLength")&&("number"==typeof o.maxStringLength?o.maxStringLength<0&&o.maxStringLength!==1/0:null!==o.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=!has$3(o,"customInspect")||o.customInspect;if("boolean"!=typeof i&&"symbol"!==i)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has$3(o,"indent")&&null!==o.indent&&"\t"!==o.indent&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has$3(o,"numericSeparator")&&"boolean"!=typeof o.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=o.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return inspectString(e,o);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var c=String(e);return s?addNumericSeparator(e,c):c}if("bigint"==typeof e){var u=String(e)+"n";return s?addNumericSeparator(e,u):u}var l=void 0===o.depth?5:o.depth;if(void 0===r&&(r=0),r>=l&&l>0&&"object"==typeof e)return isArray$3(e)?"[Array]":"[Object]";var p=function getIndent(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=ut.call(Array(e.indent+1)," ")}return{base:r,prev:ut.call(Array(t+1),r)}}(o,r);if(void 0===n)n=[];else if(indexOf(n,e)>=0)return"[Circular]";function inspect(e,t,i){if(t&&(n=lt.call(n)).push(t),i){var s={depth:o.depth};return has$3(o,"quoteStyle")&&(s.quoteStyle=o.quoteStyle),inspect_(e,s,r+1,n)}return inspect_(e,o,r+1,n)}if("function"==typeof e&&!isRegExp$1(e)){var d=function nameOf(e){if(e.name)return e.name;var t=rt.call(tt.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(e),E=arrObjKeys(e,inspect);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(E.length>0?" { "+ut.call(E,", ")+" }":"")}if(isSymbol(e)){var f=_t?ot.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):ft.call(e);return"object"!=typeof e||_t?f:markBoxed(f)}if(function isElement(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(e)){for(var _="<"+st.call(String(e.nodeName)),h=e.attributes||[],g=0;g<h.length;g++)_+=" "+h[g].name+"="+wrapQuotes(quote(h[g].value),"double",o);return _+=">",e.childNodes&&e.childNodes.length&&(_+="..."),_+="</"+st.call(String(e.nodeName))+">"}if(isArray$3(e)){if(0===e.length)return"[]";var m=arrObjKeys(e,inspect);return p&&!function singleLineValues(e){for(var t=0;t<e.length;t++)if(indexOf(e[t],"\n")>=0)return!1;return!0}(m)?"["+indentedJoin(m,p)+"]":"[ "+ut.call(m,", ")+" ]"}if(function isError(e){return!("[object Error]"!==toStr(e)||ht&&"object"==typeof e&&ht in e)}(e)){var R=arrObjKeys(e,inspect);return"cause"in Error.prototype||!("cause"in e)||gt.call(e,"cause")?0===R.length?"["+String(e)+"]":"{ ["+String(e)+"] "+ut.call(R,", ")+" }":"{ ["+String(e)+"] "+ut.call(ct.call("[cause]: "+inspect(e.cause),R),", ")+" }"}if("object"==typeof e&&i){if(yt&&"function"==typeof e[yt]&&Rt)return Rt(e,{depth:l-r});if("symbol"!==i&&"function"==typeof e.inspect)return e.inspect()}if(function isMap(e){if(!je||!e||"object"!=typeof e)return!1;try{je.call(e);try{qe.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(e)){var A=[];return Ve.call(e,(function(t,r){A.push(inspect(r,e,!0)+" => "+inspect(t,e))})),collectionOf("Map",je.call(e),A,p)}if(function isSet(e){if(!qe||!e||"object"!=typeof e)return!1;try{qe.call(e);try{je.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(e)){var y=[];return Xe.call(e,(function(t){y.push(inspect(t,e))})),collectionOf("Set",qe.call(e),y,p)}if(function isWeakMap(e){if(!Je||!e||"object"!=typeof e)return!1;try{Je.call(e,Je);try{ze.call(e,ze)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(e))return weakCollectionOf("WeakMap");if(function isWeakSet(e){if(!ze||!e||"object"!=typeof e)return!1;try{ze.call(e,ze);try{Je.call(e,Je)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(e))return weakCollectionOf("WeakSet");if(function isWeakRef(e){if(!Qe||!e||"object"!=typeof e)return!1;try{return Qe.call(e),!0}catch(e){}return!1}(e))return weakCollectionOf("WeakRef");if(function isNumber(e){return!("[object Number]"!==toStr(e)||ht&&"object"==typeof e&&ht in e)}(e))return markBoxed(inspect(Number(e)));if(function isBigInt(e){if(!e||"object"!=typeof e||!dt)return!1;try{return dt.call(e),!0}catch(e){}return!1}(e))return markBoxed(inspect(dt.call(e)));if(function isBoolean(e){return!("[object Boolean]"!==toStr(e)||ht&&"object"==typeof e&&ht in e)}(e))return markBoxed(Ze.call(e));if(function isString(e){return!("[object String]"!==toStr(e)||ht&&"object"==typeof e&&ht in e)}(e))return markBoxed(inspect(String(e)));if(!function isDate(e){return!("[object Date]"!==toStr(e)||ht&&"object"==typeof e&&ht in e)}(e)&&!isRegExp$1(e)){var I=arrObjKeys(e,inspect),T=mt?mt(e)===Object.prototype:e instanceof Object||e.constructor===Object,S=e instanceof Object?"":"null prototype",N=!T&&ht&&Object(e)===e&&ht in e?nt.call(toStr(e),8,-1):S?"Object":"",O=(T||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(N||S?"["+ut.call(ct.call([],N||[],S||[]),": ")+"] ":"");return 0===I.length?O+"{}":p?O+"{"+indentedJoin(I,p)+"}":O+"{ "+ut.call(I,", ")+" }"}return String(e)},Ot=Tt("%TypeError%"),Ct=Tt("%WeakMap%",!0),Pt=Tt("%Map%",!0),bt=St("WeakMap.prototype.get",!0),Dt=St("WeakMap.prototype.set",!0),Ut=St("WeakMap.prototype.has",!0),Lt=St("Map.prototype.get",!0),Mt=St("Map.prototype.set",!0),Bt=St("Map.prototype.has",!0),listGetNode=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},Ft=String.prototype.replace,vt=/%20/g,xt="RFC3986",wt={default:xt,formatters:{RFC1738:function(e){return Ft.call(e,vt,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:xt},kt=wt,Gt=Object.prototype.hasOwnProperty,Yt=Array.isArray,Ht=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),$t=function arrayToObject(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},jt={arrayToObject:$t,assign:function assignSingleSource(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function combine(e,t){return[].concat(e,t)},compact:function compact(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],s=Object.keys(i),c=0;c<s.length;++c){var u=s[c],l=i[u];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:i,prop:u}),r.push(l))}return function compactQueue(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(Yt(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function encode(e,t,r,n,o){if(0===e.length)return e;var i=e;if("symbol"==typeof e?i=Symbol.prototype.toString.call(e):"string"!=typeof e&&(i=String(e)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var s="",c=0;c<i.length;++c){var u=i.charCodeAt(c);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===kt.RFC1738&&(40===u||41===u)?s+=i.charAt(c):u<128?s+=Ht[u]:u<2048?s+=Ht[192|u>>6]+Ht[128|63&u]:u<55296||u>=57344?s+=Ht[224|u>>12]+Ht[128|u>>6&63]+Ht[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&i.charCodeAt(c)),s+=Ht[240|u>>18]+Ht[128|u>>12&63]+Ht[128|u>>6&63]+Ht[128|63&u])}return s},isBuffer:function isBuffer(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function maybeMap(e,t){if(Yt(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function merge(e,t,r){if(!t)return e;if("object"!=typeof t){if(Yt(e))e.push(t);else{if(!e||"object"!=typeof e)return[e,t];(r&&(r.plainObjects||r.allowPrototypes)||!Gt.call(Object.prototype,t))&&(e[t]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(t);var n=e;return Yt(e)&&!Yt(t)&&(n=$t(e,r)),Yt(e)&&Yt(t)?(t.forEach((function(t,n){if(Gt.call(e,n)){var o=e[n];o&&"object"==typeof o&&t&&"object"==typeof t?e[n]=merge(o,t,r):e.push(t)}else e[n]=t})),e):Object.keys(t).reduce((function(e,n){var o=t[n];return Gt.call(e,n)?e[n]=merge(e[n],o,r):e[n]=o,e}),n)}},Vt=function getSideChannel(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new Ot("Side channel does not contain "+Nt(e))},get:function(n){if(Ct&&n&&("object"==typeof n||"function"==typeof n)){if(e)return bt(e,n)}else if(Pt){if(t)return Lt(t,n)}else if(r)return function(e,t){var r=listGetNode(e,t);return r&&r.value}(r,n)},has:function(n){if(Ct&&n&&("object"==typeof n||"function"==typeof n)){if(e)return Ut(e,n)}else if(Pt){if(t)return Bt(t,n)}else if(r)return function(e,t){return!!listGetNode(e,t)}(r,n);return!1},set:function(n,o){Ct&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new Ct),Dt(e,n,o)):Pt?(t||(t=new Pt),Mt(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=listGetNode(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n},Kt=jt,Wt=wt,qt=Object.prototype.hasOwnProperty,Xt={brackets:function brackets(e){return e+"[]"},comma:"comma",indices:function indices(e,t){return e+"["+t+"]"},repeat:function repeat(e){return e}},Jt=Array.isArray,zt=String.prototype.split,Qt=Array.prototype.push,pushToArray=function(e,t){Qt.apply(e,Jt(t)?t:[t])},Zt=Date.prototype.toISOString,er=Wt.default,tr={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Kt.encode,encodeValuesOnly:!1,format:er,formatter:Wt.formatters[er],indices:!1,serializeDate:function serializeDate(e){return Zt.call(e)},skipNulls:!1,strictNullHandling:!1},rr={},nr=function stringify(e,t,r,n,o,i,s,c,u,l,p,d,E,f,_,h){for(var g=e,m=h,R=0,A=!1;void 0!==(m=m.get(rr))&&!A;){var y=m.get(e);if(R+=1,void 0!==y){if(y===R)throw new RangeError("Cyclic object value");A=!0}void 0===m.get(rr)&&(R=0)}if("function"==typeof c?g=c(t,g):g instanceof Date?g=p(g):"comma"===r&&Jt(g)&&(g=Kt.maybeMap(g,(function(e){return e instanceof Date?p(e):e}))),null===g){if(o)return s&&!f?s(t,tr.encoder,_,"key",d):t;g=""}if(function isNonNullishPrimitive(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e}(g)||Kt.isBuffer(g)){if(s){var I=f?t:s(t,tr.encoder,_,"key",d);if("comma"===r&&f){for(var T=zt.call(String(g),","),S="",N=0;N<T.length;++N)S+=(0===N?"":",")+E(s(T[N],tr.encoder,_,"value",d));return[E(I)+(n&&Jt(g)&&1===T.length?"[]":"")+"="+S]}return[E(I)+"="+E(s(g,tr.encoder,_,"value",d))]}return[E(t)+"="+E(String(g))]}var O,C=[];if(void 0===g)return C;if("comma"===r&&Jt(g))O=[{value:g.length>0?g.join(",")||null:void 0}];else if(Jt(c))O=c;else{var P=Object.keys(g);O=u?P.sort(u):P}for(var b=n&&Jt(g)&&1===g.length?t+"[]":t,D=0;D<O.length;++D){var U=O[D],L="object"==typeof U&&void 0!==U.value?U.value:g[U];if(!i||null!==L){var M=Jt(g)?"function"==typeof r?r(b,U):b:b+(l?"."+U:"["+U+"]");h.set(e,R);var B=Vt();B.set(rr,h),pushToArray(C,stringify(L,M,r,n,o,i,s,c,u,l,p,d,E,f,_,B))}}return C},or=jt,ir=Object.prototype.hasOwnProperty,sr=Array.isArray,ar={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:or.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},interpretNumericEntities=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},parseArrayValue=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},cr=function parseQueryStringKeys(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(o),c=s?o.slice(0,s.index):o,u=[];if(c){if(!r.plainObjects&&ir.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var l=0;r.depth>0&&null!==(s=i.exec(o))&&l<r.depth;){if(l+=1,!r.plainObjects&&ir.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(s[1])}return s&&u.push("["+o.slice(s.index)+"]"),function(e,t,r,n){for(var o=n?t:parseArrayValue(t,r),i=e.length-1;i>=0;--i){var s,c=e[i];if("[]"===c&&r.parseArrays)s=[].concat(o);else{s=r.plainObjects?Object.create(null):{};var u="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,l=parseInt(u,10);r.parseArrays||""!==u?!isNaN(l)&&c!==u&&String(l)===u&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(s=[])[l]=o:"__proto__"!==u&&(s[u]=o):s={0:o}}o=s}return o}(u,t,r,n)}},stringify=function(e,t){var r,n=e,o=function normalizeStringifyOptions(e){if(!e)return tr;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||tr.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Wt.default;if(void 0!==e.format){if(!qt.call(Wt.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=Wt.formatters[r],o=tr.filter;return("function"==typeof e.filter||Jt(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:tr.addQueryPrefix,allowDots:void 0===e.allowDots?tr.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:tr.charsetSentinel,delimiter:void 0===e.delimiter?tr.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:tr.encode,encoder:"function"==typeof e.encoder?e.encoder:tr.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:tr.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:tr.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:tr.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:tr.strictNullHandling}}(t);"function"==typeof o.filter?n=(0,o.filter)("",n):Jt(o.filter)&&(r=o.filter);var i,s=[];if("object"!=typeof n||null===n)return"";i=t&&t.arrayFormat in Xt?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var c=Xt[i];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u="comma"===c&&t&&t.commaRoundTrip;r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var l=Vt(),p=0;p<r.length;++p){var d=r[p];o.skipNulls&&null===n[d]||pushToArray(s,nr(n[d],d,c,u,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,l))}var E=s.join(o.delimiter),f=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),E.length>0?f+E:""},ur={formats:wt,parse:function(e,t){var r=function normalizeParseOptions(e){if(!e)return ar;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?ar.charset:e.charset;return{allowDots:void 0===e.allowDots?ar.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:ar.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:ar.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:ar.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:ar.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:ar.comma,decoder:"function"==typeof e.decoder?e.decoder:ar.decoder,delimiter:"string"==typeof e.delimiter||or.isRegExp(e.delimiter)?e.delimiter:ar.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:ar.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:ar.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:ar.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:ar.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:ar.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?function parseQueryStringValues(e,t){var r,n={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,s=o.split(t.delimiter,i),c=-1,u=t.charset;if(t.charsetSentinel)for(r=0;r<s.length;++r)0===s[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===s[r]?u="utf-8":"utf8=%26%2310003%3B"===s[r]&&(u="iso-8859-1"),c=r,r=s.length);for(r=0;r<s.length;++r)if(r!==c){var l,p,d=s[r],E=d.indexOf("]="),f=-1===E?d.indexOf("="):E+1;-1===f?(l=t.decoder(d,ar.decoder,u,"key"),p=t.strictNullHandling?null:""):(l=t.decoder(d.slice(0,f),ar.decoder,u,"key"),p=or.maybeMap(parseArrayValue(d.slice(f+1),t),(function(e){return t.decoder(e,ar.decoder,u,"value")}))),p&&t.interpretNumericEntities&&"iso-8859-1"===u&&(p=interpretNumericEntities(p)),d.indexOf("[]=")>-1&&(p=sr(p)?[p]:p),ir.call(n,l)?n[l]=or.combine(n[l],p):n[l]=p}return n}(e,r):e,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),s=0;s<i.length;++s){var c=i[s],u=cr(c,n[c],r,"string"==typeof e);o=or.merge(o,u,r)}return!0===r.allowSparse?o:or.compact(o)},stringify:stringify};const lr=ne("ebay:request"),pr={"Access-Control-Allow-Origin":"*","Access-Control-Allow-Headers":"X-Requested-With, Origin, Content-Type, X-Auth-Token","Access-Control-Allow-Methods":"GET, PUT, POST, DELETE"},dr={"Content-Type":"multipart/form-data"};class AxiosRequest{constructor(e={}){this.instance=Z.create({headers:{...pr},...e})}get(e,t){return lr("get: "+e,t),this.instance.get(e,t)}post(e,t,r){return lr("post: "+e,{payload:t,config:r}),this.instance.post(e,t,r)}delete(e,t){return lr("delete: "+e,t),this.instance.delete(e,t)}put(e,t,r){return lr("put: "+e,{payload:t,config:r}),this.instance.put(e,t,r)}postForm(e,t,r){lr("postForm: "+e);const n=ur.stringify(t);return this.instance.post(e,n,r)}}class Base{constructor(e,t=new AxiosRequest(e.axiosConfig)){this.config=e,this.req=t}}var Er={},fr={};!function(e){const t=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r="["+t+"]["+(t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",n=new RegExp("^"+r+"$");e.isExist=function(e){return void 0!==e},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,r){if(t){const n=Object.keys(t),o=n.length;for(let i=0;i<o;i++)e[n[i]]="strict"===r?[t[n[i]]]:t[n[i]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(e){const t=n.exec(e);return!(null==t)},e.getAllMatches=function(e,t){const r=[];let n=t.exec(e);for(;n;){const o=[];o.startIndex=t.lastIndex-n[0].length;const i=n.length;for(let e=0;e<i;e++)o.push(n[e]);r.push(o),n=t.exec(e)}return r},e.nameRegexp=r}(fr);const _r=fr,hr={allowBooleanAttributes:!1,unpairedTags:[]};function isWhiteSpace(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function readPI(e,t){const r=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const n=e.substr(r,t-r);if(t>5&&"xml"===n)return getErrorObject("InvalidXml","XML declaration allowed only at the start of the document.",getLineNumberForPosition(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function readCommentAndCDATA(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let r=1;for(t+=8;t<e.length;t++)if("<"===e[t])r++;else if(">"===e[t]&&(r--,0===r))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}Er.validate=function(e,t){t=Object.assign({},hr,t);const r=[];let n=!1,o=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let s=0;s<e.length;s++)if("<"===e[s]&&"?"===e[s+1]){if(s+=2,s=readPI(e,s),s.err)return s}else{if("<"!==e[s]){if(isWhiteSpace(e[s]))continue;return getErrorObject("InvalidChar","char '"+e[s]+"' is not expected.",getLineNumberForPosition(e,s))}{let c=s;if(s++,"!"===e[s]){s=readCommentAndCDATA(e,s);continue}{let u=!1;"/"===e[s]&&(u=!0,s++);let l="";for(;s<e.length&&">"!==e[s]&&" "!==e[s]&&"\t"!==e[s]&&"\n"!==e[s]&&"\r"!==e[s];s++)l+=e[s];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),s--),i=l,!_r.isName(i)){let t;return t=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",getErrorObject("InvalidTag",t,getLineNumberForPosition(e,s))}const p=readAttributeStr(e,s);if(!1===p)return getErrorObject("InvalidAttr","Attributes for '"+l+"' have open quote.",getLineNumberForPosition(e,s));let d=p.value;if(s=p.index,"/"===d[d.length-1]){const r=s-d.length;d=d.substring(0,d.length-1);const o=validateAttributeString(d,t);if(!0!==o)return getErrorObject(o.err.code,o.err.msg,getLineNumberForPosition(e,r+o.err.line));n=!0}else if(u){if(!p.tagClosed)return getErrorObject("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",getLineNumberForPosition(e,s));if(d.trim().length>0)return getErrorObject("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",getLineNumberForPosition(e,c));{const t=r.pop();if(l!==t.tagName){let r=getLineNumberForPosition(e,t.tagStartPos);return getErrorObject("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+l+"'.",getLineNumberForPosition(e,c))}0==r.length&&(o=!0)}}else{const i=validateAttributeString(d,t);if(!0!==i)return getErrorObject(i.err.code,i.err.msg,getLineNumberForPosition(e,s-d.length+i.err.line));if(!0===o)return getErrorObject("InvalidXml","Multiple possible root nodes found.",getLineNumberForPosition(e,s));-1!==t.unpairedTags.indexOf(l)||r.push({tagName:l,tagStartPos:c}),n=!0}for(s++;s<e.length;s++)if("<"===e[s]){if("!"===e[s+1]){s++,s=readCommentAndCDATA(e,s);continue}if("?"!==e[s+1])break;if(s=readPI(e,++s),s.err)return s}else if("&"===e[s]){const t=validateAmpersand(e,s);if(-1==t)return getErrorObject("InvalidChar","char '&' is not expected.",getLineNumberForPosition(e,s));s=t}else if(!0===o&&!isWhiteSpace(e[s]))return getErrorObject("InvalidXml","Extra text at the end",getLineNumberForPosition(e,s));"<"===e[s]&&s--}}}var i;return n?1==r.length?getErrorObject("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",getLineNumberForPosition(e,r[0].tagStartPos)):!(r.length>0)||getErrorObject("InvalidXml","Invalid '"+JSON.stringify(r.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):getErrorObject("InvalidXml","Start tag expected.",1)};function readAttributeStr(e,t){let r="",n="",o=!1;for(;t<e.length;t++){if('"'===e[t]||"'"===e[t])""===n?n=e[t]:n!==e[t]||(n="");else if(">"===e[t]&&""===n){o=!0;break}r+=e[t]}return""===n&&{value:r,index:t,tagClosed:o}}const gr=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function validateAttributeString(e,t){const r=_r.getAllMatches(e,gr),n={};for(let e=0;e<r.length;e++){if(0===r[e][1].length)return getErrorObject("InvalidAttr","Attribute '"+r[e][2]+"' has no space in starting.",getPositionFromMatch(r[e]));if(void 0!==r[e][3]&&void 0===r[e][4])return getErrorObject("InvalidAttr","Attribute '"+r[e][2]+"' is without value.",getPositionFromMatch(r[e]));if(void 0===r[e][3]&&!t.allowBooleanAttributes)return getErrorObject("InvalidAttr","boolean attribute '"+r[e][2]+"' is not allowed.",getPositionFromMatch(r[e]));const o=r[e][2];if(!validateAttrName(o))return getErrorObject("InvalidAttr","Attribute '"+o+"' is an invalid name.",getPositionFromMatch(r[e]));if(n.hasOwnProperty(o))return getErrorObject("InvalidAttr","Attribute '"+o+"' is repeated.",getPositionFromMatch(r[e]));n[o]=1}return!0}function validateAmpersand(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function validateNumberAmpersand(e,t){let r=/\d/;for("x"===e[t]&&(t++,r=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(r))break}return-1}(e,++t);let r=0;for(;t<e.length;t++,r++)if(!(e[t].match(/\w/)&&r<20)){if(";"===e[t])break;return-1}return t}function getErrorObject(e,t,r){return{err:{code:e,msg:t,line:r.line||r,col:r.col}}}function validateAttrName(e){return _r.isName(e)}function getLineNumberForPosition(e,t){const r=e.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function getPositionFromMatch(e){return e.startIndex+e[1].length}var mr={};const Rr={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1};mr.buildOptions=function(e){return Object.assign({},Rr,e)},mr.defaultOptions=Rr;var Ar=class XmlNode{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){this.child.push({[e]:t})}addChild(e){e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}};const yr=RegExp("^\\s([a-zA-z0-0]+)[ \t](['\"])([^&]+)\\2");function parseEntityExp(e,t){const r=yr.exec(e);r&&(t[r[1]]={regx:RegExp(`&${r[1]};`,"g"),val:r[3]})}var Ir=function readDocType$1(e,t){const r={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let n=1,o=!1,i=!1,s=!1,c="";for(;t<e.length;t++)if("<"===e[t]){if(o&&"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7])t+=7,i=!0;else if(o&&"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8])t+=8;else if(o&&"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8])t+=8;else if(o&&"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9])t+=9;else{if("!"!==e[t+1]||"-"!==e[t+2]||"-"!==e[t+3])throw new Error("Invalid DOCTYPE");s=!0}n++,c=""}else if(">"===e[t]){if(s){if("-"!==e[t-1]||"-"!==e[t-2])throw new Error("Invalid XML comment in DOCTYPE");s=!1}else i&&(parseEntityExp(c,r),i=!1);if(n--,0===n)break}else"["===e[t]?o=!0:c+=e[t];if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}};const Tr=/^[-+]?0x[a-fA-F0-9]+$/,Sr=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const Nr={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};const Or=fr,Cr=Ar,Pr=Ir,br=function toNumber$1(e,t={}){if(t=Object.assign({},Nr,t),!e||"string"!=typeof e)return e;let r=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(r))return e;if(t.hex&&Tr.test(r))return Number.parseInt(r,16);{const n=Sr.exec(r);if(n){const o=n[1],i=n[2];let s=function trimZeros(e){if(e&&-1!==e.indexOf("."))return"."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1)),e;return e}(n[3]);const c=n[4]||n[6];if(!t.leadingZeros&&i.length>0&&o&&"."!==r[2])return e;if(!t.leadingZeros&&i.length>0&&!o&&"."!==r[1])return e;{const n=Number(r),u=""+n;return-1!==u.search(/[eE]/)||c?t.eNotation?n:e:-1!==r.indexOf(".")?"0"===u&&""===s||u===s||o&&u==="-"+s?n:e:i?s===u||o+s===u?n:e:r===u||r===o+u?n:e}}return e}};"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,Or.nameRegexp);function addExternalEntities(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:e[n]}}}function parseTextData(e,t,r,n,o,i,s){if(void 0!==e&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){s||(e=this.replaceEntitiesValue(e));const n=this.options.tagValueProcessor(t,e,r,o,i);if(null==n)return e;if(typeof n!=typeof e||n!==e)return n;if(this.options.trimValues)return parseValue(e,this.options.parseTagValue,this.options.numberParseOptions);return e.trim()===e?parseValue(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function resolveNameSpace(e){if(this.options.removeNSPrefix){const t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}const Dr=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function buildAttributesMap(e,t){if(!this.options.ignoreAttributes&&"string"==typeof e){const r=Or.getAllMatches(e,Dr),n=r.length,o={};for(let e=0;e<n;e++){const n=this.resolveNameSpace(r[e][1]);let i=r[e][4];const s=this.options.attributeNamePrefix+n;if(n.length)if(void 0!==i){this.options.trimValues&&(i=i.trim()),i=this.replaceEntitiesValue(i);const e=this.options.attributeValueProcessor(n,i,t);o[s]=null==e?i:typeof e!=typeof i||e!==i?e:parseValue(i,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[s]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=o,e}return o}}const parseXml=function(e){e=e.replace(/\r\n?/g,"\n");const t=new Cr("!xml");let r=t,n="",o="";for(let i=0;i<e.length;i++){if("<"===e[i])if("/"===e[i+1]){const t=findClosingIndex(e,">",i,"Closing Tag is not closed.");let s=e.substring(i+2,t).trim();if(this.options.removeNSPrefix){const e=s.indexOf(":");-1!==e&&(s=s.substr(e+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),r&&(n=this.saveTextToParentTag(n,r,o)),o=o.substr(0,o.lastIndexOf(".")),r=this.tagsNodeStack.pop(),n="",i=t}else if("?"===e[i+1]){let t=readTagExp(e,i,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,o),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new Cr(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,o)),r.addChild(e)}i=t.closeIndex+1}else if("!--"===e.substr(i+1,3)){const t=findClosingIndex(e,"--\x3e",i+4,"Comment is not closed.");if(this.options.commentPropName){const s=e.substring(i+4,t-2);n=this.saveTextToParentTag(n,r,o),r.add(this.options.commentPropName,[{[this.options.textNodeName]:s}])}i=t}else if("!D"===e.substr(i+1,2)){const t=Pr(e,i);this.docTypeEntities=t.entities,i=t.i}else if("!["===e.substr(i+1,2)){const t=findClosingIndex(e,"]]>",i,"CDATA is not closed.")-2,s=e.substring(i+9,t);if(n=this.saveTextToParentTag(n,r,o),this.options.cdataPropName)r.add(this.options.cdataPropName,[{[this.options.textNodeName]:s}]);else{let e=this.parseTextData(s,r.tagname,o,!0,!1,!0);null==e&&(e=""),r.add(this.options.textNodeName,e)}i=t+2}else{let s=readTagExp(e,i,this.options.removeNSPrefix),c=s.tagName,u=s.tagExp,l=s.attrExpPresent,p=s.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,o,!1)),c!==t.tagname&&(o+=o?"."+c:c);const d=r;if(d&&-1!==this.options.unpairedTags.indexOf(d.tagname)&&(r=this.tagsNodeStack.pop()),this.isItStopNode(this.options.stopNodes,o,c)){let t="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)i=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))i=s.closeIndex;else{const r=this.readStopNodeData(e,c,p+1);if(!r)throw new Error(`Unexpected end of ${c}`);i=r.i,t=r.tagContent}const n=new Cr(c);c!==u&&l&&(n[":@"]=this.buildAttributesMap(u,o)),t&&(t=this.parseTextData(t,c,o,!0,l,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),n.add(this.options.textNodeName,t),r.addChild(n)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),u=c):u=u.substr(0,u.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new Cr(c);c!==u&&l&&(e[":@"]=this.buildAttributesMap(u,o)),o=o.substr(0,o.lastIndexOf(".")),r.addChild(e)}else{const e=new Cr(c);this.tagsNodeStack.push(r),c!==u&&l&&(e[":@"]=this.buildAttributesMap(u,o)),r.addChild(e),r=e}n="",i=p}}else n+=e[i]}return t.child},replaceEntitiesValue$2=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const r=this.docTypeEntities[t];e=e.replace(r.regx,r.val)}for(let t in this.lastEntities){const r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function saveTextToParentTag(e,t,r,n){return e&&(void 0===n&&(n=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,r,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,n))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function isItStopNode(e,t,r){const n="*."+r;for(const r in e){const o=e[r];if(n===o||t===o)return!0}return!1}function findClosingIndex(e,t,r,n){const o=e.indexOf(t,r);if(-1===o)throw new Error(n);return o+t.length-1}function readTagExp(e,t,r,n=">"){const o=function tagExpWithClosingIndex(e,t,r=">"){let n,o="";for(let i=t;i<e.length;i++){let t=e[i];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===r[0]){if(!r[1])return{data:o,index:i};if(e[i+1]===r[1])return{data:o,index:i}}else"\t"===t&&(t=" ");o+=t}}(e,t+1,n);if(!o)return;let i=o.data;const s=o.index,c=i.search(/\s/);let u=i,l=!0;if(-1!==c&&(u=i.substr(0,c).replace(/\s\s*$/,""),i=i.substr(c+1)),r){const e=u.indexOf(":");-1!==e&&(u=u.substr(e+1),l=u!==o.data.substr(e+1))}return{tagName:u,tagExp:i,closeIndex:s,attrExpPresent:l}}function readStopNodeData(e,t,r){const n=r;let o=1;for(;r<e.length;r++)if("<"===e[r])if("/"===e[r+1]){const i=findClosingIndex(e,">",r,`${t} is not closed`);if(e.substring(r+2,i).trim()===t&&(o--,0===o))return{tagContent:e.substring(n,r),i:i};r=i}else if("?"===e[r+1]){r=findClosingIndex(e,"?>",r+1,"StopNode is not closed.")}else if("!--"===e.substr(r+1,3)){r=findClosingIndex(e,"--\x3e",r+3,"StopNode is not closed.")}else if("!["===e.substr(r+1,2)){r=findClosingIndex(e,"]]>",r,"StopNode is not closed.")-2}else{const n=readTagExp(e,r,">");if(n){(n&&n.tagName)===t&&"/"!==n.tagExp[n.tagExp.length-1]&&o++,r=n.closeIndex}}}function parseValue(e,t,r){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&br(e,r)}return Or.isExist(e)?e:""}var Ur=class OrderedObjParser{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"}},this.addExternalEntities=addExternalEntities,this.parseXml=parseXml,this.parseTextData=parseTextData,this.resolveNameSpace=resolveNameSpace,this.buildAttributesMap=buildAttributesMap,this.isItStopNode=isItStopNode,this.replaceEntitiesValue=replaceEntitiesValue$2,this.readStopNodeData=readStopNodeData,this.saveTextToParentTag=saveTextToParentTag}},Lr={};function compress(e,t,r){let n;const o={};for(let i=0;i<e.length;i++){const s=e[i],c=propName$1(s);let u="";if(u=void 0===r?c:r+"."+c,c===t.textNodeName)void 0===n?n=s[c]:n+=""+s[c];else{if(void 0===c)continue;if(s[c]){let e=compress(s[c],t,u);const r=isLeafTag(e,t);s[":@"]?assignAttributes(e,s[":@"],u,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==o[c]&&o.hasOwnProperty(c)?(Array.isArray(o[c])||(o[c]=[o[c]]),o[c].push(e)):t.isArray(c,u,r)?o[c]=[e]:o[c]=e}}}return"string"==typeof n?n.length>0&&(o[t.textNodeName]=n):void 0!==n&&(o[t.textNodeName]=n),o}function propName$1(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function assignAttributes(e,t,r,n){if(t){const o=Object.keys(t),i=o.length;for(let s=0;s<i;s++){const i=o[s];n.isArray(i,r+"."+i,!0,!0)?e[i]=[t[i]]:e[i]=t[i]}}}function isLeafTag(e,t){const r=Object.keys(e).length;return!!(0===r||1===r&&e[t.textNodeName])}Lr.prettify=function prettify$1(e,t){return compress(e,t)};const{buildOptions:Mr}=mr,Br=Ur,{prettify:Fr}=Lr,vr=Er;var xr=class XMLParser{constructor(e){this.externalEntities={},this.options=Mr(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const r=vr.validate(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new Br(this.options);r.addExternalEntities(this.externalEntities);const n=r.parseXml(e);return this.options.preserveOrder||void 0===n?n:Fr(n,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}};function arrToStr(e,t,r,n){let o="",i="";t.format&&t.indentBy.length>0&&(i="\n"+t.indentBy.repeat(n));for(let s=0;s<e.length;s++){const c=e[s],u=propName(c);let l="";if(l=0===r.length?u:`${r}.${u}`,u===t.textNodeName){let e=c[u];isStopNode(l,t)||(e=t.tagValueProcessor(u,e),e=replaceEntitiesValue$1(e,t)),o+=i+e;continue}if(u===t.cdataPropName){o+=i+`<![CDATA[${c[u][0][t.textNodeName]}]]>`;continue}if(u===t.commentPropName){o+=i+`\x3c!--${c[u][0][t.textNodeName]}--\x3e`;continue}if("?"===u[0]){const e=attr_to_str(c[":@"],t),r="?xml"===u?"":i;let n=c[u][0][t.textNodeName];n=0!==n.length?" "+n:"",o+=r+`<${u}${n}${e}?>`;continue}let p=i+`<${u}${attr_to_str(c[":@"],t)}`,d=arrToStr(c[u],t,l,n+1);-1!==t.unpairedTags.indexOf(u)?t.suppressUnpairedNode?o+=p+">":o+=p+"/>":d&&0!==d.length||!t.suppressEmptyNode?o+=p+`>${d}${i}</${u}>`:o+=p+"/>"}return o}function propName(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function attr_to_str(e,t){let r="";if(e&&!t.ignoreAttributes)for(let n in e){let o=t.attributeValueProcessor(n,e[n]);o=replaceEntitiesValue$1(o,t),!0===o&&t.suppressBooleanAttributes?r+=` ${n.substr(t.attributeNamePrefix.length)}`:r+=` ${n.substr(t.attributeNamePrefix.length)}="${o}"`}return r}function isStopNode(e,t){let r=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===e||t.stopNodes[n]==="*."+r)return!0;return!1}function replaceEntitiesValue$1(e,t){if(e&&e.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const n=t.entities[r];e=e.replace(n.regex,n.val)}return e}const wr=function toXml(e,t){return arrToStr(e,t,"",0)},kr={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],transformTagName:!1};function Builder(e){this.options=Object.assign({},kr,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=isAttribute),this.processTextOrObjNode=processTextOrObjNode,this.options.format?(this.indentate=indentate,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""),this.options.suppressEmptyNode?(this.buildTextNode=buildEmptyTextNode,this.buildObjNode=buildEmptyObjNode):(this.buildTextNode=buildTextValNode,this.buildObjNode=buildObjectNode),this.buildTextValNode=buildTextValNode,this.buildObjectNode=buildObjectNode,this.replaceEntitiesValue=replaceEntitiesValue,this.buildAttrPairStr=buildAttrPairStr}function buildAttrPairStr(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'}function processTextOrObjNode(e,t,r){const n=this.j2x(e,r+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextNode(e[this.options.textNodeName],t,n.attrStr,r):this.buildObjNode(n.val,t,n.attrStr,r)}function buildObjectNode(e,t,r,n){let o="</"+t+this.tagEndChar,i="";return"?"===t[0]&&(i="?",o=""),r&&-1===e.indexOf("<")?this.indentate(n)+"<"+t+r+i+">"+e+o:!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===i.length?this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(n)+"<"+t+r+i+this.tagEndChar+e+this.indentate(n)+o}function buildEmptyObjNode(e,t,r,n){return""!==e?this.buildObjectNode(e,t,r,n):"?"===t[0]?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+"/"+this.tagEndChar}function buildTextValNode(e,t,r,n){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine;{let o=this.options.tagValueProcessor(t,e);return o=this.replaceEntitiesValue(o),""===o&&-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode?this.indentate(n)+"<"+t+this.tagEndChar:this.indentate(n)+"<"+t+"/"+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+o+"</"+t+this.tagEndChar}}function replaceEntitiesValue(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];e=e.replace(r.regex,r.val)}return e}function buildEmptyTextNode(e,t,r,n){return""===e&&-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode?this.indentate(n)+"<"+t+this.tagEndChar:this.indentate(n)+"<"+t+"/"+this.tagEndChar:""!==e?this.buildTextValNode(e,t,r,n):"?"===t[0]?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+"/"+this.tagEndChar}function indentate(e){return this.options.indentBy.repeat(e)}function isAttribute(e){return!!e.startsWith(this.options.attributeNamePrefix)&&e.substr(this.attrPrefixLen)}Builder.prototype.build=function(e){return this.options.preserveOrder?wr(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},Builder.prototype.j2x=function(e,t){let r="",n="";for(let o in e)if(void 0===e[o]);else if(null===e[o])"?"===o[0]?n+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+o+"/"+this.tagEndChar;else if(e[o]instanceof Date)n+=this.buildTextNode(e[o],o,"",t);else if("object"!=typeof e[o]){const i=this.isAttribute(o);if(i)r+=this.buildAttrPairStr(i,""+e[o]);else if(o===this.options.textNodeName){let t=this.options.tagValueProcessor(o,""+e[o]);n+=this.replaceEntitiesValue(t)}else n+=this.buildTextNode(e[o],o,"",t)}else if(Array.isArray(e[o])){const r=e[o].length;for(let i=0;i<r;i++){const r=e[o][i];void 0===r||(null===r?"?"===o[0]?n+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+o+"/"+this.tagEndChar:n+="object"==typeof r?this.processTextOrObjNode(r,o,t):this.buildTextNode(r,o,"",t))}}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const t=Object.keys(e[o]),n=t.length;for(let i=0;i<n;i++)r+=this.buildAttrPairStr(t[i],""+e[o][t[i]])}else n+=this.processTextOrObjNode(e[o],o,t);return{attrStr:r,val:n}};var Gr={XMLParser:xr,XMLValidator:Er,XMLBuilder:Builder};const Yr=ne("ebay:error"),Hr=Symbol("raw-error");class EBayError extends Error{constructor(e,t="",r={}){super(e),Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name,this.description=t,this.meta=r}toJSON(){return{message:this.message,description:this.description,stack:this.stack,type:this.constructor.name,meta:this.meta||null}}}class EbayNoCallError extends EBayError{constructor(e="No eBay API call defined, please invoke one."){super(e)}}class ApiEnvError extends EBayError{constructor(e){super(`Could not find ${e} in process.env.`)}}const getErrorMessage=e=>e.response?.data?.message||e.response?.data?.error?.[0]?.message||e.response?.data?.errors?.[0]?.message||e.errorMessage?.error?.message||e.Errors?.ShortMessage||e.message||"eBay API request error",getErrorDescription=e=>e.response?.data?.error_description||e.response?.data?.error?.[0]?.longMessage||e.response?.data?.errors?.[0]?.longMessage||e.longMessage||e.Errors?.LongMessage||e.response?.statusText||"";class EbayApiError extends EBayError{constructor(e){const{message:t,description:r,meta:n}=mapEBayError(e);super(t,r,n)}}class EBayAccessDenied extends EbayApiError{}class EBayInvalidGrant extends EbayApiError{}class EBayNotFound extends EbayApiError{}EBayNotFound.code=11001;class EBayInvalidAccessToken extends EbayApiError{}class EBayIAFTokenExpired extends EbayApiError{}EBayIAFTokenExpired.code=21917053;class EBayIAFTokenInvalid extends EbayApiError{}EBayIAFTokenInvalid.code=21916984;class EBayTokenRequired extends EbayApiError{}EBayTokenRequired.code=930;class EBayInvalidScope extends EbayApiError{}const mapEBayError=e=>{if(!e)return{};let t={};if(e.response?.data){const r=e.response.data;t=Array.isArray(r.error)?r.error[0]??r:Array.isArray(r.errors)?r.errors[0]??r:"string"==typeof r.error?{message:r.error,description:r.error_description||""}:r}else e.Errors&&(t=e);const r={message:t.message||getErrorMessage(e),description:t.description||getErrorDescription(e),meta:{...t,[Hr]:e}};return e.response&&(r.meta.res={status:e.response.status,statusText:e.response.statusText,headers:e.response.headers,data:e.response.data??{}}),e.request&&e.config&&(r.meta.req={url:e.config.url,method:e.config.method,headers:e.config.headers,params:e.config.params}),r},handleEBayError=e=>{if(Yr("handleEBayError",e),e instanceof EBayError)throw e;const{message:t,meta:r,description:n}=mapEBayError(e);if("ACCESS"===r.domain)throw new EBayAccessDenied(e);if("invalid_grant"===r.message)throw new EBayInvalidGrant(e);if(r.errorId===EBayNotFound.code)throw new EBayNotFound(e);if("invalid_scope"===r.message)throw new EBayInvalidScope(e);if("Invalid access token"===r.message)throw new EBayInvalidAccessToken(e);throw new EBayError(t,n,r)},checkEBayResponse=e=>{if("Failure"===e.Ack){if(e.Errors?.ErrorCode)switch(e.Errors.ErrorCode){case EBayIAFTokenExpired.code:throw new EBayIAFTokenExpired(e);case EBayIAFTokenInvalid.code:throw new EBayIAFTokenInvalid(e);case EBayTokenRequired.code:throw new EBayTokenRequired(e)}throw new EbayApiError(e)}if(e.errorMessage)throw new EbayApiError(e)};var $r=Object.freeze({__proto__:null,rawError:Hr,EBayError:EBayError,EbayNoCallError:EbayNoCallError,ApiEnvError:ApiEnvError,getErrorMessage:getErrorMessage,getErrorDescription:getErrorDescription,EbayApiError:EbayApiError,EBayAccessDenied:EBayAccessDenied,EBayInvalidGrant:EBayInvalidGrant,EBayNotFound:EBayNotFound,EBayInvalidAccessToken:EBayInvalidAccessToken,EBayIAFTokenExpired:EBayIAFTokenExpired,EBayIAFTokenInvalid:EBayIAFTokenInvalid,EBayTokenRequired:EBayTokenRequired,EBayInvalidScope:EBayInvalidScope,mapEBayError:mapEBayError,handleEBayError:handleEBayError,checkEBayResponse:checkEBayResponse});const jr=ne("ebay:xml:request"),Vr={attributeNamePrefix:"",textNodeName:"value",ignoreAttributes:!1,parseAttributeValue:!0,parseNodeValue:!0,numberParseOptions:{hex:!1,leadingZeros:!1},removeNSPrefix:!0,isArray:(e,t)=>/Array$/.test(t.slice(0,-e.length-1))},Kr={raw:!1,parseOptions:Vr,useIaf:!0,headers:{},returnResponse:!1},Wr={"Content-Type":"text/xml"};class XMLRequest{constructor(e,t,r,n){if(!e)throw new EbayNoCallError;this.callName=e,this.fields=t||{},this.config={...Kr,...r},this.req=n}getResponseWrapper(){return`${this.callName}Response`}getCredentials(){return this.config.eBayAuthToken?{RequesterCredentials:{eBayAuthToken:this.config.eBayAuthToken}}:{}}getParseOptions(){return{...Vr,...this.config.parseOptions}}getHeaders(){return{...Wr,...this.config.headers}}toJSON(e){const t=this.getParseOptions();return jr("parseOption",t),new Gr.XMLParser(t).parse(e)}toXML(e){return'<?xml version="1.0" encoding="utf-8"?>'+XMLRequest.j2x.build({[this.callName+"Request"]:{"@_xmlns":this.config.xmlns,...this.getCredentials(),...e}})}async request(){const e=this.toXML(this.fields);jr("xml",e);try{const{body:t,headers:r={}}=this.config.hook?.(e)??{body:e},n={headers:{...this.getHeaders(),...r||{}}};jr("config",n);const o=await this.req.post(this.config.endpoint,t,n);if(jr("response",o),this.config.returnResponse)return o;const{data:i}=o;if(this.config.raw)return i;const s=this.xml2JSON(i);return checkEBayResponse(s),s}catch(e){if(jr("error",e),e.response?.data){const t=this.toJSON(e.response.data);checkEBayResponse(t)}throw e}}xml2JSON(e){const t=this.toJSON(e);return t[this.getResponseWrapper()]??t}}XMLRequest.j2x=new Gr.XMLBuilder({attributeNamePrefix:"@_",textNodeName:"#value",ignoreAttributes:!1,cdataTagName:"__cdata",cdataPositionChar:"\\c",format:!1,indentBy:" ",suppressEmptyNode:!1,cdataPropName:"__cdata"});const qr=ne("ebay:authNAuth");class AuthNAuth extends Base{static generateAuthUrl(e,t,r,n=!1){return[e?AuthNAuth.SIGNIN_ENDPOINT.sandbox:AuthNAuth.SIGNIN_ENDPOINT.production,"?SignIn","&RuName=",encodeURIComponent(t),"&SessID=",encodeURIComponent(r),n?"&prompt=login":""].join("")}constructor(e,t){super(e,t),this.authToken=null,this.config.authToken&&this.setAuthToken(this.config.authToken)}get apiEndpoint(){return this.config.sandbox?AuthNAuth.API_ENDPOINT.sandbox:AuthNAuth.API_ENDPOINT.production}async getSessionIdAndAuthUrl(e){if(!this.config.devId)throw new Error("DevId is required.");if(!(e=e||this.config.ruName))throw new Error("RuName is required.");const t=new XMLRequest("GetSessionID",{RuName:e},this.getRequestConfig("GetSessionID"),this.req),r=await t.request();return qr("GetSessionID data",r),{sessionId:r.SessionID,url:AuthNAuth.generateAuthUrl(this.config.sandbox,e,r.SessionID)}}async mintToken(e){if(!this.config.devId)throw new Error("DevId is required.");const t=new XMLRequest("FetchToken",{SessionID:e},this.getRequestConfig("FetchToken"),this.req);try{return await t.request()}catch(e){throw qr("Fetch auth token failed",e),e}}async obtainToken(e){const t=await this.mintToken(e);return qr("Obtain auth token",t),this.setAuthToken(t),t}setAuthToken(e){this.authToken="string"==typeof e?{eBayAuthToken:e}:e}getAuthToken(){return this.authToken?{...this.authToken}:null}get eBayAuthToken(){return this.authToken?.eBayAuthToken??null}getRequestConfig(e){if("number"!=typeof this.config.siteId)throw new Error("\"siteId\" is required for Auth'n'Auth.");return{useIaf:!1,xmlns:"urn:ebay:apis:eBLBaseComponents",endpoint:this.apiEndpoint,headers:{"X-EBAY-API-CALL-NAME":e,"X-EBAY-API-CERT-NAME":this.config.certId,"X-EBAY-API-APP-NAME":this.config.appId,"X-EBAY-API-DEV-NAME":this.config.devId,"X-EBAY-API-SITEID":this.config.siteId,"X-EBAY-API-COMPATIBILITY-LEVEL":967}}}}AuthNAuth.SIGNIN_ENDPOINT={sandbox:"https://signin.sandbox.ebay.com/ws/eBayISAPI.dll",production:"https://signin.ebay.com/ws/eBayISAPI.dll"},AuthNAuth.API_ENDPOINT={production:"https://api.ebay.com/ws/api.dll",sandbox:"https://api.sandbox.ebay.com/ws/api.dll"};let createNanoEvents=()=>({events:{},emit(e,...t){const r=this.events[e]||[];for(let e=0,n=r.length;e<n;e++)r[e](...t)},on(e,t){return this.events[e]?this.events[e].push(t):this.events[e]=[t],()=>{this.events[e]=this.events[e]?.filter((e=>t!==e))}}});const Xr=ne("ebay:oauth2");class OAuth2 extends Base{constructor(e,t){super(e,t),this.emitter=createNanoEvents(),this.scope=this.config.scope||OAuth2.defaultScopes}on(e,t){return this.emitter.on(e,t)}static generateAuthUrl(e,t,r,n,o=""){return[e?OAuth2.AUTHORIZE_ENDPOINT.sandbox:OAuth2.AUTHORIZE_ENDPOINT.production,"?client_id=",encodeURIComponent(t),"&redirect_uri=",encodeURIComponent(r),"&response_type=code","&state=",encodeURIComponent(o),"&scope=",encodeURIComponent(n.join(" "))].join("")}get identityEndpoint(){return this.config.sandbox?OAuth2.IDENTITY_ENDPOINT.sandbox:OAuth2.IDENTITY_ENDPOINT.production}async getAccessToken(){return this.getUserAccessToken()||this.getApplicationAccessToken()}getUserAccessToken(){return this._authToken?.access_token??null}async getApplicationAccessToken(){if(this._clientToken)return Xr("Return existing application access token: ",this._clientToken),this._clientToken.access_token;try{return(await this.obtainApplicationAccessToken()).access_token}catch(e){throw e}}setClientToken(e){this._clientToken=e}setScope(e){this.scope=e}getScope(){return[...this.scope]}async mintApplicationAccessToken(){if(!this.config.appId)throw new Error("Missing App ID (Client Id)");if(!this.config.certId)throw new Error("Missing Cert Id (Client Secret)");try{return(await this.req.postForm(this.identityEndpoint,{scope:this.scope.join(" "),grant_type:"client_credentials"},{auth:{username:this.config.appId,password:this.config.certId}})).data}catch(e){throw Xr("Failed to mint application token",e),e}}async obtainApplicationAccessToken(){Xr("Obtain a new application access token with scope: ",this.scope.join(","));try{const e=await this.mintApplicationAccessToken();return Xr("Obtained a new application access token:",e),this.setClientToken(e),this.emitter.emit("refreshClientToken",e),e}catch(e){throw Xr("Failed to obtain application token",e),e}}generateAuthUrl(e,t=this.scope,r=""){if(!(e=e||this.config.ruName))throw new Error("RuName is required.");return OAuth2.generateAuthUrl(this.config.sandbox,this.config.appId,e,t,r)}async mintUserAccessToken(e,t=this.config.ruName){try{const r=(await this.req.postForm(this.identityEndpoint,{grant_type:"authorization_code",code:e,redirect_uri:t},{auth:{username:this.config.appId,password:this.config.certId}})).data;return Xr("User Access Token",r),r}catch(e){throw Xr("Failed to get the token",e),e}}async getToken(e,t=this.config.ruName){return await this.mintUserAccessToken(e,t)}async refreshUserAccessToken(){if(!this._authToken||!this._authToken.refresh_token)throw Xr("Tried to refresh user access token before it was set."),new Error("Failed to refresh the user access token. Token or refresh_token is not set.");try{const e=(await this.req.postForm(this.identityEndpoint,{grant_type:"refresh_token",refresh_token:this._authToken.refresh_token,scope:this.scope.join(" ")},{auth:{username:this.config.appId,password:this.config.certId}})).data;Xr("Successfully refreshed token",e);const t={...this._authToken,...e};return this.setCredentials(t),this.emitter.emit("refreshAuthToken",t),t}catch(e){throw Xr("Failed to refresh the token",e),e}}async obtainToken(e){const t=await this.getToken(e);return Xr("Obtain user access token",t),this.setCredentials(t),t}getCredentials(){return this._authToken?{...this._authToken}:this._clientToken?{...this._clientToken}:null}setCredentials(e){this._authToken="string"==typeof e?{refresh_token:"",expires_in:7200,refresh_token_expires_in:47304e3,token_type:"User Access Token",access_token:e}:e}async refreshToken(){if(this._authToken)return await this.refreshUserAccessToken();if(this._clientToken)return await this.obtainApplicationAccessToken();throw new Error("Missing credentials. To refresh a token an application access token or user access token must be already set.")}}OAuth2.IDENTITY_ENDPOINT={production:"https://api.ebay.com/identity/v1/oauth2/token",sandbox:"https://api.sandbox.ebay.com/identity/v1/oauth2/token"},OAuth2.AUTHORIZE_ENDPOINT={production:"https://auth.ebay.com/oauth2/authorize",sandbox:"https://auth.sandbox.ebay.com/oauth2/authorize"},OAuth2.defaultScopes=["https://api.ebay.com/oauth/api_scope"];class Auth extends Base{constructor(e,t){super(e,t),this.authNAuth=new AuthNAuth(this.config,this.req),this.OAuth2=new OAuth2(this.config,this.req),this.oAuth2=this.OAuth2}async getHeaderAuthorization(e){if(this.authNAuth.eBayAuthToken)return{Authorization:"Token "+this.authNAuth.eBayAuthToken};return{Authorization:(e?"IAF ":"Bearer ")+await this.OAuth2.getAccessToken()}}}class Api extends Base{constructor(e,t,r){super(e,t),this.auth=r||new Auth(this.config,this.req)}}const Jr={"Content-Type":"application/json","Cache-Control":"no-cache",..."undefined"==typeof window?{"Accept-Encoding":"application/gzip"}:{}},zr={marketplaceId:"X-EBAY-C-MARKETPLACE-ID",endUserCtx:"X-EBAY-C-ENDUSERCTX",acceptLanguage:"Accept-Language",contentLanguage:"Content-Language"};class Restful extends Api{constructor(e,t,r,n={}){super(e,t,r),this.apiConfig={...this.getApiConfig(),...n}}static buildServerUrl(e,t,r,n){return`${e}${t}.${r?"sandbox.":""}${n}`}get useIaf(){return!1}get schema(){return"https://"}get subdomain(){return"api"}get apiVersionPath(){return""}getServerUrl({schema:e,subdomain:t,apiVersion:r,basePath:n,sandbox:o,tld:i}){return Restful.buildServerUrl(e,t,o,i)+r+n}getApiConfig(){return{subdomain:this.subdomain,useIaf:this.useIaf,apiVersion:this.apiVersionPath,basePath:this.basePath,schema:this.schema,sandbox:this.config.sandbox,tld:"ebay.com",headers:{},returnResponse:!1}}get baseUrl(){return this.getServerUrl(this.apiConfig)}api(e){return new this.constructor(this.config,this.req,this.auth,e)}get apix(){return this.api({subdomain:"apix"})}get apiz(){return this.api({subdomain:"apiz"})}async get(e,t={},r){return this.doRequest({method:"get",url:e,config:t},r)}async delete(e,t={},r){return this.doRequest({method:"delete",url:e,config:t},r)}async post(e,t,r={},n){return this.doRequest({method:"post",url:e,data:t,config:r},n)}async put(e,t,r={},n){return this.doRequest({method:"put",url:e,data:t,config:r},n)}get additionalHeaders(){return Object.keys(zr).filter((e=>void 0!==this.config[e])).reduce(((e,t)=>(e[zr[t]]=this.config[t],e)),{})}async enrichRequestConfig(e={},t=this.apiConfig){const r=await this.auth.getHeaderAuthorization(t.useIaf),n={...Jr,...this.additionalHeaders,...r,...t.headers};return{...e,headers:{...e.headers||{},...n}}}async doRequest(e,t){try{return await this.request(e,t)}catch(r){if(this.shouldRefreshToken(r))return await this.request(e,t,!0);throw r}}shouldRefreshToken(e){return!!this.config.autoRefreshToken&&(e.name===EBayInvalidAccessToken.name||401===e?.meta?.res?.status&&"/post-order/v2"===this.apiConfig.basePath)}async request(e,t=this.apiConfig,r=!1){const{url:n,method:o,data:i,config:s}=e,c={...this.apiConfig,...t},u=this.getServerUrl(c)+n;try{r&&await this.auth.OAuth2.refreshToken();const e=await this.enrichRequestConfig(s,c),t=["get","delete"].includes(o)?[e]:[i,e],n=await this.req[o](u,...t);return this.apiConfig.returnResponse?n:n.data}catch(e){handleEBayError(e)}}}class Browse extends Restful{get basePath(){return"/buy/browse/v1"}search(e){return this.get("/item_summary/search",{params:e})}searchByImage(e,t={}){return this.post("/item_summary/search_by_image",t,{params:e})}getItems({itemIds:e,itemGroupIds:t}){return this.get("/item/",{params:{item_ids:e,item_group_ids:t}})}getItem(e,t){const r=encodeURIComponent(e);return this.get(`/item/${r}`,{params:{fieldgroups:t}})}getItemByLegacyId(e){return this.get("/item/get_item_by_legacy_id",{params:e})}getItemsByItemGroup(e){return this.get("/item/get_items_by_item_group",{params:{item_group_id:e}})}checkCompatibility(e,t){const r=encodeURIComponent(e);return this.post(`/item/${r}/check_compatibility`,t)}addItem(e){return this.post("/shopping_cart/add_item",e)}getShoppingCart(){return this.get("/shopping_cart/")}removeItem(e){return this.post("/shopping_cart/remove_item",e)}updateQuantity(e){return this.post("/shopping_cart/update_quantity",e)}}Browse.id="Browse";let Qr=class Feed extends Restful{get basePath(){return"/buy/feed/v1_beta"}getItemFeed(e,t){return this.get("/item",{params:e,headers:{Range:t}})}getItemGroupFeed(e,t){return this.get("/item_group",{params:e,headers:{Range:t}})}getItemSnapshotFeed(e,t,r){return this.get("/item_snapshot",{params:{...e,snapshot_date:t},headers:{Range:r}})}getProductFeed(e,t,r){return this.get("/product",{params:{...e,snapshot_date:t},headers:{Range:r}})}};Qr.id="Feed";let Zr=class Marketing extends Restful{get basePath(){return"/buy/marketing/v1_beta"}getAlsoBoughtByProduct(e){return this.get("/merchandised_product/get_also_bought_products",{params:e})}getAlsoViewedByProduct(e){return this.get("/merchandised_product/get_also_viewed_products",{params:e})}getMerchandisedProducts(e){return this.get("/merchandised_product",{params:e})}};Zr.id="Marketing";class Offer extends Restful{get basePath(){return"/buy/offer/v1_beta"}getBidding(e){const t=encodeURIComponent(e);return this.get(`/bidding/${t}`)}placeProxyBid(e,t){const r=encodeURIComponent(e);return this.post(`/bidding/${r}/place_proxy_bid`,t)}}Offer.id="Offer";class Order extends Restful{get basePath(){return"/buy/order/v1"}applyCoupon(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/apply_coupon`,t)}getCheckoutSession(e){return e=encodeURIComponent(e),this.get(`/checkout_session/${e}`)}initiateCheckoutSession(e){return this.post("/checkout_session/initiate",e)}placeOrder(e){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/place_order`)}removeCoupon(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/remove_coupon`,t)}updatePaymentInfo(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_payment_info`,t)}updateQuantity(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_quantity`,t)}checkoutSessionId(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_quantity`,t)}updateShippingAddress(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_shipping_address`,t)}updateShippingOption(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_shipping_option`,t)}applyGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/apply_coupon`,t)}getGuestCheckoutSession(e){return e=encodeURIComponent(e),this.get(`/guest_checkout_session/${e}`)}initiateGuestCheckoutSession(e){return this.post("/guest_checkout_session/initiate",e)}initiateGuestPayment(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/initiate_payment`,t)}placeGuestOrder(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/place_order`,t)}removeGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/remove_coupon`,t)}updateGuestPaymentInfo(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_payment_info`,t)}updateGuestQuantity(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_quantity`,t)}updateGuestShippingAddress(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_shipping_address`,t)}updateGuestShippingOption(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_shipping_option`,t)}applyProxyGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/apply_coupon`,t)}getProxyGuestCheckoutSession(e){return e=encodeURIComponent(e),this.get(`/proxy_guest_checkout_session/${e}`)}initiateProxyGuestCheckoutSession(e){return this.post("/proxy_guest_checkout_session/initiate",e)}placeProxyGuestOrder(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/place_order`,t)}removeProxyGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/remove_coupon`,t)}updateProxyGuestPaymentInfo(e,t,r,n,o,i){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_payment_info`,i,{headers:{Authorization:t,"X-EBAY-C-DATE":r,"X-EBAY-C-REQUEST-NONCE":n,"X-EBAY-C-SIGNATURE":o}})}updateProxyGuestQuantity(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_quantity`,t)}updateProxyGuestShippingAddress(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_shipping_address`,t)}updateProxyGuestShippingOption(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_shipping_option`,t)}getGuestPurchaseOrder(e){return e=encodeURIComponent(e),this.get(`/guest_purchase_order/${e}`)}getPurchaseOrder(e){return e=encodeURIComponent(e),this.get(`/purchase_order/${e}`)}}Order.id="Order";class Deal extends Restful{get basePath(){return"/buy/deal/v1"}getDealItems({categoryIds:e,commissionable:t,deliveryCountry:r,limit:n,offset:o}){return this.get("/deal_item",{params:{category_ids:e,commissionable:t,delivery_country:r,limit:n,offset:o}})}getEvent(e){return e=encodeURIComponent(e),this.get(`/event/${e}`)}getEvents({limit:e,offset:t}){return this.get("/event",{params:{limit:e,offset:t}})}getEventItems(e,{categoryIds:t,deliveryCountry:r,limit:n,offset:o}={}){return this.get("/event_item",{params:{event_ids:e,limit:n,offset:o,category_ids:t,delivery_country:r}})}}Deal.id="Deal";class MarketplaceInsights extends Restful{get basePath(){return"/buy/marketplace_insights/v1_beta"}search({aspectFilter:e,categoryIds:t,epid:r,fieldgroups:n,filter:o,gtin:i,limit:s,offset:c,q:u,sort:l}){return this.get("/item_sales/search",{params:{aspect_filter:e,category_ids:t,epid:r,fieldgroups:n,filter:o,gtin:i,limit:s,offset:c,q:u,sort:l}})}}MarketplaceInsights.id="MarketplaceInsights";class Catalog extends Restful{get basePath(){return"/commerce/catalog/v1_beta"}getChangeRequest(e){return this.get(`/change_request/${e}`)}getChangeRequests({filter:e,limit:t,offset:r}={}){return this.get("/change_request",{params:{filter:e,limit:t,offset:r}})}getProduct(e){const t=encodeURIComponent(e);return this.get(`/product/${t}`)}search(e){return this.get("/product_summary/search",{params:{...e&&e}})}getProductMetadata(e,{otherApplicableCategoryIds:t,primaryCategoryId:r}={}){return this.get("/get_product_metadata",{params:{epid:e,other_applicable_category_ids:t,primary_category_id:r}})}getProductMetadataForCategories(e,t){return this.get("/get_product_metadata_for_categories",{params:{primary_category_id:e,other_applicable_category_ids:t}})}}Catalog.id="Catalog";class Charity extends Restful{get basePath(){return"/commerce/charity/v1"}getCharityOrg(e){return e=encodeURIComponent(e),this.get(`/charity_org/${e}`)}getCharityOrgs({limit:e,offset:t,q:r,registrationIds:n}){return this.get("/charity_org",{params:{limit:e,offset:t,q:r,registration_ids:n}})}getCharityOrgByLegacyId(e){return this.get("/charity_org/get_charity_org_by_legacy_id",{params:{legacy_charity_org_id:e}})}}Charity.id="Charity";class Identity extends Restful{get basePath(){return"/commerce/identity/v1"}get subdomain(){return"apiz"}getUser(){return this.get("/user/")}}Identity.id="Identity";class Notification extends Restful{get basePath(){return"/commerce/notification/v1"}getPublicKey(e){return e=encodeURIComponent(e),this.get(`/public_key/${e}`)}getTopic(e){return e=encodeURIComponent(e),this.get(`/topic/${e}`)}getTopics({limit:e,continuationToken:t}){return this.get("/topic",{params:{limit:e,continuation_token:t}})}getSubscriptions({limit:e,continuationToken:t}){return this.get("/subscription",{params:{limit:e,continuation_token:t}})}createSubscription(e){return this.post("/subscription",e)}getSubscription(e){return e=encodeURIComponent(e),this.get(`/subscription/${e}`)}updateSubscription(e,t){return e=encodeURIComponent(e),this.put(`/subscription/${e}`,t)}deleteSubscription(e){return e=encodeURIComponent(e),this.delete(`/subscription/${e}`)}enableSubscription(e){return e=encodeURIComponent(e),this.post(`/subscription/${e}/enable`)}disableSubscription(e){return e=encodeURIComponent(e),this.post(`/subscription/${e}/disable`)}test(e){return e=encodeURIComponent(e),this.post(`/subscription/${e}/test`)}getDestinations({limit:e,continuationToken:t}){return this.get("/destination",{params:{limit:e,continuation_token:t}})}createDestination(e){return this.post("/destination",e)}getDestination(e){return e=encodeURIComponent(e),this.get(`/destination/${e}`)}updateDestination(e,t){return e=encodeURIComponent(e),this.put(`/destination/${e}`,t)}deleteDestination(e){return e=encodeURIComponent(e),this.delete(`/destination/${e}`)}getConfig(){return this.get("/config")}updateConfig(e){return this.put("/config",e)}}Notification.id="Notification";class Taxonomy extends Restful{get basePath(){return"/commerce/taxonomy/v1"}getDefaultCategoryTreeId(e){return this.get("/get_default_category_tree_id",{params:{marketplace_id:e}})}getCategoryTree(e){const t=encodeURIComponent(e);return this.get(`/category_tree/${t}`)}getCategorySubtree(e,t){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_category_subtree`,{params:{category_id:t}})}getCategorySuggestions(e,t){return this.get(`/category_tree/${e}/get_category_suggestions`,{params:{q:t}})}getItemAspectsForCategory(e,t){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_item_aspects_for_category`,{params:{category_id:t}})}getCompatibilityProperties(e,t){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_compatibility_properties`,{params:{category_id:t}})}getCompatibilityPropertyValues(e,t,r){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_compatibility_property_values`,{params:{category_id:t,compatibility_property:r}})}fetchItemAspects(e){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/fetch_item_aspects`,{responseType:"arraybuffer"})}}Taxonomy.id="Taxonomy";class Translation extends Restful{get basePath(){return"/commerce/translation/v1_beta"}translate(e){return this.post("/translate",e)}}Translation.id="Translation";let en=class Analytics extends Restful{get basePath(){return"/developer/analytics/v1_beta"}getRateLimits(e,t){return this.get("/rate_limit/",{params:{api_context:e,api_name:t}})}getUserRateLimits(e,t){return this.get("/user_rate_limit/",{params:{api_context:e,api_name:t}})}};en.id="Analytics";class KeyManagement extends Restful{get subdomain(){return"apiz"}get basePath(){return"/developer/key_management/v1"}getSigningKeys(){return this.get("/signing_key")}createSigningKey(e){return this.post("/signing_key",e)}getSigningKey(e){return this.get(`/signing_key/${e}`)}}KeyManagement.id="KeyManagement";class Cancellation extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}approveCancellationRequest(e){return e=encodeURIComponent(e),this.post(`/cancellation/${e}/approve`)}checkCancellationEligibility(e){return this.post("/cancellation/check_eligibility",{legacyOrderId:e})}confirmRefundReceived(e,t){return e=encodeURIComponent(e),this.post(`/cancellation/${e}/confirm`,t)}createCancellation(e){return this.post("/cancellation",e)}getCancellation(e,t){return e=encodeURIComponent(e),this.get(`/cancellation/${e}`,{params:{fieldgroups:t}})}rejectCancellationRequest(e,t){return e=encodeURIComponent(e),this.post(`/cancellation/${e}/reject`,t)}search(e){return this.get("/cancellation/search",{params:{params:e}})}}Cancellation.id="Cancellation";class Case extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}appealCaseDecision(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/appeal`,t)}closeCase(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/close`,t)}getCase(e){const t=encodeURIComponent(e);return this.get(`/casemanagement/${t}`)}issueCaseRefund(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/issue_refund`,t)}provideReturnShipmentInfo(e,{shippingCarrierName:t,trackingNumber:r}){const n=encodeURIComponent(e);return this.post(`/casemanagement/${n}/provide_shipment_info`,{shippingCarrierName:t,trackingNumber:r})}providesReturnAddress(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/provide_return_address`,t)}search(e){return this.get("/casemanagement/search",{params:e})}}Case.id="Case";class Inquiry extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}checkInquiryEligibility(e){return this.post("/inquiry/check_eligibility",e)}closeInquiry(e,t){return e=encodeURIComponent(e),"string"==typeof t?.closeReason&&(t.closeReason=t.closeReason.trim()),this.post(`/inquiry/${e}/close`,t)}confirmInquiryRefund(e){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/confirm_refund`)}createInquiry(e){return"string"==typeof e.desiredOutcome&&(e.desiredOutcome=e.desiredOutcome.trim()),this.post("/inquiry",e)}escalateInquiry(e,t){return e=encodeURIComponent(e),t.escalateInquiryReason=t.escalateInquiryReason.trim(),this.post(`/inquiry/${e}/escalate`,t)}getInquiry(e){return e=encodeURIComponent(e),this.get(`/inquiry/${e}`)}issueInquiryRefund(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/issue_refund`,t)}provideInquiryRefundInfo(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/provide_refund_info`,t)}provideInquiryShipmentInfo(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/provide_shipment_info`,t)}search(e){return this.get("/inquiry/search",{params:e})}sendInquiryMessage(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/send_message`,t)}}Inquiry.id="Inquiry";class Return extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}addShippingLabelInfo(e,t){const r=encodeURIComponent(e);return this.post(`/return/${r}/add_shipping_label`,t)}cancelReturnRequest(e,t){const r=encodeURIComponent(e);return t&&t.buyerCloseReason&&(t.buyerCloseReason=t.buyerCloseReason.trim()),this.post(`/return/${r}/cancel`,t)}checkReturnEligibility(e){return this.post("/return/check_eligibility",e)}checkShippingLabelEligibility(e){const t=encodeURIComponent(e);return this.get(`/return/${t}/check_label_print_eligibility`)}createReturnDraft(e){return this.post("/return/draft",e)}createReturnRequest(e,t){return this.post("/return",e,{params:{fieldgroups:t}})}createReturnShippingLabel(e){const t=encodeURIComponent(e);return this.post(`/return/${t}/initiate_shipping_label`)}deleteReturnDraftFile(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.delete(`/return/draft/${e}/file/${t}`)}escalateReturn(e,t){const r=encodeURIComponent(e);return this.post(`/return/${r}/escalate`,t)}getReturn(e,t){return e=encodeURIComponent(e),this.get(`/return/${e}`,{params:{fieldgroups:t}})}getReturnDraft(e){const t=encodeURIComponent(e);return this.get(`/return/draft/${t}`)}getReturnDraftFiles(e){const t=encodeURIComponent(e);return this.get(`/return/draft/${t}/files`)}getReturnEstimate(e){return this.post("/return/estimate",e)}getReturnFiles(e){const t=encodeURIComponent(e);return this.get(`/return/${t}/files`)}getReturnPreferences(){return this.get("/return/preference")}getReturnShippingLabel(e){return e=encodeURIComponent(e),this.get(`/return/${e}/get_shipping_label`)}getShipmentTrackingInfo(e,t,r){return e=encodeURIComponent(e),this.get(`/return/${e}/tracking`,{params:{carrier_used:t,tracking_number:r}})}issueReturnRefund(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/issue_refund`,t)}markReturnReceived(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_as_received`,t)}markReturnRefundReceived(e){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_refund_received`)}markReturnRefundSent(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_refund_sent`,t)}markReturnShipped(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_as_shipped`,t)}processReturnRequest(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/decide`,t)}search(e){return this.get("/return/search",{params:e})}sendReturnMessage(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/send_message`,t)}sendReturnShippingLabel(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/send_shipping_label`,{},{params:{to_email_address:t}})}setReturnPreferences(e){return this.post("/return/preference",{rmaRequired:e})}submitReturnFile(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/file/submit`,{filePurpose:t})}updateReturnDraft(e,t){return e=encodeURIComponent(e),this.put(`/return/draft/${e}`,{returnRequest:t})}updateShipmentTrackingInfo(e,t){return e=encodeURIComponent(e),this.put(`/return/${e}/update_tracking`,t)}uploadReturnDraftFile(e,t){return e=encodeURIComponent(e),this.post(`/return/draft/${e}/file/upload`,t)}uploadReturnFile(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/file/upload`,t)}voidShippingLabel(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/void_shipping_label`,t)}}Return.id="Return";class Account extends Restful{get basePath(){return"/sell/account/v1"}getFulfillmentPolicies(e){return this.get("/fulfillment_policy",{params:{marketplace_id:e}})}createFulfillmentPolicy(e){return this.post("/fulfillment_policy",e)}updateFulfillmentPolicy(e,t){const r=encodeURIComponent(e);return this.put(`/fulfillment_policy/${r}`,t)}deleteFulfillmentPolicy(e){const t=encodeURIComponent(e);return this.delete(`/fulfillment_policy/${t}`)}getFulfillmentPolicy(e){return this.get(`/fulfillment_policy/${e}`)}getFulfillmentPolicyByName(e,t){return this.get("/fulfillment_policy/get_by_policy_name",{params:{marketplace_id:e,name:t}})}getPaymentPolicies(e){return this.get("/payment_policy",{params:{marketplace_id:e}})}getPaymentPolicy(e){return e=encodeURIComponent(e),this.get(`/payment_policy/${e}`)}createPaymentPolicy(e){return this.post("/payment_policy",e)}updatePaymentPolicy(e,t){return e=encodeURIComponent(e),this.put(`/payment_policy/${e}`,t)}deletePaymentPolicy(e){return e=encodeURIComponent(e),this.delete(`/payment_policy/${e}`)}getPaymentPolicyByName(e,t){return this.get("/payment_policy/get_by_policy_name",{params:{marketplace_id:e,name:t}})}getPaymentsProgram(e,t){e=encodeURIComponent(e);const r=encodeURIComponent(t);return this.get(`/payments_program/${e}/${r}`)}getPaymentsProgramOnboarding(e,t){e=encodeURIComponent(e);const r=encodeURIComponent(t);return this.get(`/payments_program/${e}/${r}/onboarding`)}getPrivileges(){return this.get("/privilege")}getOptedInPrograms(){return this.get("/program/get_opted_in_programs")}optInToProgram(e){return this.post("/program/opt_in",e)}optOutOfProgram(e){return this.post("/program/opt_out",e)}getRateTables(e){return this.get("/rate_table",{params:{country_code:e}})}getReturnPolicies(e){return this.get("/return_policy",{params:{marketplace_id:e}})}getReturnPolicy(e){return e=encodeURIComponent(e),this.get(`/return_policy/${e}`)}createReturnPolicy(e){return this.post("/return_policy",e)}updateReturnPolicy(e,t){return e=encodeURIComponent(e),this.put(`/return_policy/${e}`,t)}deleteReturnPolicy(e){return e=encodeURIComponent(e),this.delete(`/return_policy/${e}`)}getReturnPolicyByName(e,t){return this.get("/return_policy/get_by_policy_name",{params:{marketplace_id:e,name:t}})}getSalesTax(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/sales_tax/${e}/${t}`)}createOrReplaceSalesTax(e,t,r){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.put(`/sales_tax/${e}/${t}`,r)}deleteSalesTax(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.delete(`/sales_tax/${e}/${t}`)}getSalesTaxes(e){return this.get("/sales_tax",{params:{country_code:e}})}getKYC(){return this.get("/kyc")}}Account.id="Account";class Analytics extends Restful{get basePath(){return"/sell/analytics/v1"}findSellerStandardsProfiles(){return this.get("/seller_standards_profile")}getSellerStandardsProfile(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/seller_standards_profile/${e}/${t}`)}getTrafficReport({dimension:e,filter:t,metric:r,sort:n}={}){return this.get("/traffic_report",{params:{dimension:e,filter:t,metric:r,sort:n}})}getCustomerServiceMetric(e,t){return this.get(`/customer_service_metric/${e}/${t}`)}}Analytics.id="Analytics";class Compliance extends Restful{get basePath(){return"/sell/compliance/v1"}getListingViolationsSummary(e){return this.get("/listing_violation_summary",{params:{compliance_type:e}})}getListingViolations({complianceType:e,offset:t,listingId:r,limit:n}={}){return this.get("/listing_violation",{params:{compliance_type:e,offset:t,listing_id:r,limit:n}})}suppressViolation(e){return this.post("/suppress_listing_violation",e)}}Compliance.id="Compliance";class Finances extends Restful{get basePath(){return"/sell/finances/v1"}get subdomain(){return"apiz"}getPayout(e){return e=encodeURIComponent(e),this.get(`/payout/${e}`)}getPayouts({filter:e,limit:t,offset:r,sort:n}={}){return this.get("/payout",{params:{filter:e,limit:t,offset:r,sort:n}})}getPayoutSummary({filter:e}={}){return this.get("/payout_summary",{params:{filter:e}})}getTransactions({filter:e,limit:t,offset:r,sort:n}={}){return this.get("/transaction",{params:{filter:e,limit:t,offset:r,sort:n}})}getTransactionSummary({filter:e}={}){return this.get("/transaction_summary",{params:{filter:e}})}getTransfer(e){return e=encodeURIComponent(e),this.get(`/transfer/${e}`)}getSellerFundsSummary(){return this.get("/seller_funds_summary")}}Finances.id="Finances";class Fulfillment extends Restful{get basePath(){return"/sell/fulfillment/v1"}getOrder(e,{fieldGroups:t}={}){return this.get(`/order/${e}`,{params:{fieldGroups:t}})}getOrders({filter:e,limit:t,offset:r,orderIds:n,fieldGroups:o}={}){return this.get("/order",{params:{filter:e,limit:t,offset:r,orderIds:Array.isArray(n)?n.join():n,fieldGroups:o}})}issueRefund(e,t){return e=encodeURIComponent(e),this.post(`/order/${e}/issue_refund`,t)}getShippingFulfillments(e){return e=encodeURIComponent(e),this.get(`/order/${e}/shipping_fulfillment`)}createShippingFulfillment(e,t){return e=encodeURIComponent(e),this.post(`/order/${e}/shipping_fulfillment`,t)}getShippingFulfillment(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/order/${e}/shipping_fulfillment/${t}`)}getPaymentDispute(e){return this.get(`/payment_dispute/${e}`)}fetchEvidenceContent(e){return this.get(`/payment_dispute/${e}/fetch_evidence_content`)}getActivities(e){return this.get(`/payment_dispute/${e}/activity`)}getPaymentDisputeSummaries({orderId:e,buyerUsername:t,openDateFrom:r,openDateTo:n,paymentDisputeStatus:o,limit:i,offset:s}){return this.get("/payment_dispute_summary",{params:{order_id:e,buyer_username:t,open_date_from:r,open_date_to:n,payment_dispute_status:o,limit:i,offset:s}})}contestPaymentDispute(e,t){return this.post(`/payment_dispute/${e}/contest`,t)}acceptPaymentDispute(e){return this.post(`/payment_dispute/${e}/accept`)}uploadEvidenceFile(e,t){return this.post(`/payment_dispute/${e}/upload_evidence_file`,t,{headers:{...dr}})}addEvidence(e,t){return this.post(`/payment_dispute/${e}/add_evidence`,t)}updateEvidence(e,t){return this.post(`/payment_dispute/${e}/update_evidence`,t)}}Fulfillment.id="Fulfillment";class Inventory extends Restful{get basePath(){return"/sell/inventory/v1"}getInventoryLocation(e){const t=encodeURIComponent(e);return this.get(`/location/${t}`)}disableInventoryLocation(e){const t=encodeURIComponent(e);return this.post(`/location/${t}/disable`)}enableInventoryLocation(e){const t=encodeURIComponent(e);return this.post(`/location/${t}/enable`)}getInventoryLocations({limit:e,offset:t}={}){return this.get("/location",{params:{limit:e,offset:t}})}createInventoryLocation(e,t){const r=encodeURIComponent(e);return this.post(`/location/${r}`,t)}deleteInventoryLocation(e){const t=encodeURIComponent(e);return this.delete(`/location/${t}`)}updateInventoryLocation(e,t){const r=encodeURIComponent(e);return this.post(`/location/${r}/update_location_details`,t)}getInventoryItem(e){return e=encodeURIComponent(e),this.get(`/inventory_item/${e}`)}createOrReplaceInventoryItem(e,t){return e=encodeURIComponent(e),this.put(`/inventory_item/${e}`,t)}deleteInventoryItem(e){return e=encodeURIComponent(e),this.delete(`/inventory_item/${e}`)}getInventoryItems({limit:e,offset:t}={}){return this.get("/inventory_item",{params:{limit:e,offset:t}})}bulkUpdatePriceQuantity(e){return this.post("/bulk_update_price_quantity",e)}bulkCreateOrReplaceInventoryItem(e){return this.post("/bulk_create_or_replace_inventory_item",e)}bulkGetInventoryItem(e){return this.post("/bulk_get_inventory_item",e)}getProductCompatibility(e){return e=encodeURIComponent(e),this.get(`/inventory_item/${e}/product_compatibility`)}createOrReplaceProductCompatibility(e,t){return e=encodeURIComponent(e),this.put(`/inventory_item/${e}/product_compatibility`,t)}deleteProductCompatibility(e){return e=encodeURIComponent(e),this.delete(`/inventory_item/${e}/product_compatibility`)}getOffers({sku:e,marketplaceId:t,format:r,limit:n,offset:o}={}){return this.get("/offer",{params:{sku:e,marketplace_id:t,format:r,limit:n,offset:o}})}getOffer(e){return e=encodeURIComponent(e),this.get(`/offer/${e}`)}createOffer(e){return this.post("/offer",e)}updateOffer(e,t){return e=encodeURIComponent(e),this.put(`/offer/${e}`,t)}deleteOffer(e){return this.delete(`/offer/${e}`)}publishOffer(e){const t=encodeURIComponent(e);return this.post(`/offer/${t}/publish/`)}publishOfferByInventoryItemGroup(e){return this.post("/offer/publish_by_inventory_item_group/",e)}withdrawOfferByInventoryItemGroup(e){return this.post("/offer/withdraw_by_inventory_item_group",e)}getListingFees(e){return this.post("/offer/get_listing_fees",e)}bulkCreateOffer(e){return this.post("/bulk_create_offer",e)}bulkPublishOffer(e){return this.post("/bulk_publish_offer",e)}withdrawOffer(e){const t=encodeURIComponent(e);return this.post(`/offer/${t}/withdraw`)}getInventoryItemGroup(e){return e=encodeURIComponent(e),this.get(`/inventory_item_group/${e}`)}createOrReplaceInventoryItemGroup(e,t){return e=encodeURIComponent(e),this.put(`/inventory_item_group/${e}`,t)}deleteInventoryItemGroup(e){return this.delete(`/inventory_item_group/${e}`)}bulkMigrateListing(e){return this.post("/bulk_migrate_listing",e)}}Inventory.id="Inventory";class Marketing extends Restful{get basePath(){return"/sell/marketing/v1"}bulkCreateAdsByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_create_ads_by_inventory_reference`,t)}bulkCreateAdsByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_create_ads_by_listing_id`,t)}bulkDeleteAdsByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_delete_ads_by_inventory_reference`,t)}bulkDeleteAdsByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_delete_ads_by_listing_id`,t)}bulkUpdateAdsBidByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_bid_by_inventory_reference`,t)}bulkUpdateAdsBidByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_bid_by_listing_id`,t)}getAds(e,{limit:t,listingIds:r,offset:n}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/ad`,{params:{limit:t,listing_ids:r,offset:n}})}createAdByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad`,t)}createAdsByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/create_ads_by_inventory_reference`,t)}getAd(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/ad_campaign/${e}/ad/${t}`)}deleteAd(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.delete(`/ad_campaign/${e}/ad/${t}`)}deleteAdsByInventoryReference(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/delete_ads_by_inventory_reference`)}getAdsByInventoryReference(e,t,r){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/get_ads_by_inventory_reference`,{params:{inventory_reference_id:t,inventory_reference_type:r}})}updateBid(e,t,r){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.post(`/ad_campaign/${e}/ad/${t}/update_bid`,r)}cloneCampaign(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/clone`,t)}getCampaigns({campaignName:e,campaignStatus:t,endDateRange:r,limit:n,offset:o,startDateRange:i}={}){return this.get("/ad_campaign",{params:{campaign_name:e,campaign_status:t,end_date_range:r,limit:n,offset:o,start_date_range:i}})}getCampaign(e){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}`)}createCampaign(e){return this.post("/ad_campaign",e)}deleteCampaign(e){return e=encodeURIComponent(e),this.delete(`/ad_campaign/${e}`)}endCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/end`)}findCampaignByAdReference({inventoryReferenceId:e,inventoryReferenceType:t,listingId:r}={}){return this.get("/ad_campaign/find_campaign_by_ad_reference",{params:{inventory_reference_id:e,inventory_reference_type:t,listing_id:r}})}getCampaignByName(e){return this.get("/ad_campaign/get_campaign_by_name",{params:{campaign_name:e}})}pauseCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/pause`)}resumeCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/resume`)}updateCampaignIdentification(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/update_campaign_identification`,t)}getReport(e){return e=encodeURIComponent(e),this.get(`/ad_report/${e}`)}getReportMetadata(){return this.get("/ad_report_metadata")}getReportMetadataForReportType(e){return e=encodeURIComponent(e),this.get(`/ad_report_metadata/${e}`)}getReportTasks({limit:e,offset:t,reportTaskStatuses:r}={}){return this.get("/ad_report_task",{params:{limit:e,offset:t,report_task_statuses:r}})}getReportTask(e){return e=encodeURIComponent(e),this.get(`/ad_report_task/${e}`)}createReportTask(e){return this.post("/ad_report_task",e)}deleteReportTask(e){return e=encodeURIComponent(e),this.delete(`/ad_report_task/${e}`)}createItemPriceMarkdownPromotion(e){return this.post("/item_price_markdown",e)}updateItemPriceMarkdownPromotion(e,t){return e=encodeURIComponent(e),this.put(`/item_price_markdown/${e}`,t)}deleteItemPriceMarkdownPromotion(e){return e=encodeURIComponent(e),this.delete(`/item_price_markdown/${e}`)}getItemPriceMarkdownPromotion(e){return e=encodeURIComponent(e),this.get(`/item_price_markdown/${e}`)}createItemPromotion(e){return this.post("/item_promotion",e)}updateItemPromotion(e,t){return e=encodeURIComponent(e),this.put(`/item_promotion/${e}`,t)}deleteItemPromotion(e){return e=encodeURIComponent(e),this.delete(`/item_promotion/${e}`)}getItemPromotion(e){return e=encodeURIComponent(e),this.get(`/item_promotion/${e}`)}getListingSet(e,{limit:t,offset:r,q:n,sort:o,status:i}={}){return e=encodeURIComponent(e),this.get(`/promotion/${e}/get_listing_set`,{params:{limit:t,offset:r,q:n,sort:o,status:i}})}getPromotions(e,{limit:t,offset:r,promotionStatus:n,promotionType:o,q:i,sort:s}={}){return this.get("/promotion",{params:{marketplace_id:e,limit:t,offset:r,promotion_status:n,promotion_type:o,q:i,sort:s}})}pausePromotion(e){const t=encodeURIComponent(e);return this.post(`/promotion/${t}/pause`)}resumePromotion(e){const t=encodeURIComponent(e);return this.post(`/promotion/${t}/resume`)}getPromotionReports(e,{limit:t,offset:r,promotionStatus:n,promotionType:o,q:i}={}){return this.get("/promotion_report",{params:{marketplace_id:e,limit:t,offset:r,promotion_status:n,promotion_type:o,q:i}})}getPromotionSummaryReport(e){return this.get("/promotion_summary_report",{params:{marketplace_id:e}})}}Marketing.id="Marketing";class Metadata extends Restful{get basePath(){return"/sell/metadata/v1"}getSalesTaxJurisdictions(e){return e=encodeURIComponent(e),this.get(`/country/${e}/sales_tax_jurisdiction`)}getAutomotivePartsCompatibilityPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_automotive_parts_compatibility_policies`,{params:{filter:t}})}getItemConditionPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_item_condition_policies`,{params:{filter:t}})}getListingStructurePolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_listing_structure_policies`,{params:{filter:t}})}getNegotiatedPricePolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_negotiated_price_policies`,{params:{filter:t}})}getProductAdoptionPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_product_adoption_policies`,{params:{filter:t}})}getReturnPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_return_policies`,{params:{filter:t}})}}Metadata.id="Metadata";class Recommendation extends Restful{get basePath(){return"/sell/recommendation/v1"}findListingRecommendations({filter:e,limit:t,offset:r}={},n){return this.post("/find",{data:n,params:{filter:e,limit:t,offset:r}})}}Recommendation.id="Recommendation";class Feed extends Restful{get basePath(){return"/sell/feed/v1"}getOrderTasks({dateRange:e,feedType:t,limit:r,lookBackDays:n,offset:o,scheduleId:i}={}){return this.get("/order_task",{params:{date_range:e,feed_type:t,limit:r,look_back_days:n,offset:o,schedule_id:i}})}createOrderTask(e){return this.post("/order_task",e)}getOrderTask(e){return e=encodeURIComponent(e),this.get(`/order_task/${e}`)}getInventoryTasks({feedType:e,scheduleId:t,lookBackDays:r,dateRange:n,limit:o,offset:i}={}){return this.get("/inventory_task",{params:{feed_type:e,schedule_id:t,look_back_days:r,date_range:n,limit:o,offset:i}})}createInventoryTask(e){return this.post("/inventory_task",e)}getInventoryTask(e){return e=encodeURIComponent(e),this.get(`/inventory_task/${e}`)}getSchedules({feedType:e,limit:t,offset:r}={}){return this.get("/schedule",{params:{feed_type:e,limit:t,offset:r}})}createSchedule(e){return this.post("/schedule",e)}getSchedule(e){return e=encodeURIComponent(e),this.get(`/schedule/${e}`)}updateSchedule(e,t){return e=encodeURIComponent(e),this.put(`/schedule/${e}`,t)}deleteSchedule(e){return e=encodeURIComponent(e),this.delete(`/schedule/${e}`)}getLatestResultFile(e){return e=encodeURIComponent(e),this.get(`/schedule/${e}/download_result_file`)}getScheduleTemplate(e){return e=encodeURIComponent(e),this.get(`/schedule_template/${e}`)}getScheduleTemplates({feedType:e,limit:t,offset:r}={}){return this.get("/schedule_template",{params:{feed_type:e,limit:t,offset:r}})}getTasks({dateRange:e,feedType:t,limit:r,lookBackDays:n,offset:o,scheduleId:i}={}){return this.get("/task",{params:{date_range:e,feed_type:t,limit:r,look_back_days:n,offset:o,schedule_id:i}})}createTask(e){return this.post("/task",e)}getInputFile(e){return e=encodeURIComponent(e),this.get(`/task/${e}/download_input_file`)}getResultFile(e){return e=encodeURIComponent(e),this.get(`/task/${e}/download_result_file`)}getTask(e){return e=encodeURIComponent(e),this.get(`/task/${e}`)}uploadFile(e,t){return e=encodeURIComponent(e),this.post(`/task/${e}/upload_file`,t,{headers:dr})}getCustomerServiceMetricTasks({dateRange:e,feedType:t,limit:r,lookBackDays:n,offset:o}={}){return this.get("/customer_service_metric_task",{params:{date_range:e,feed_type:t,limit:r,look_back_days:n,offset:o}})}createCustomerServiceMetricTask(e,t){return this.post("/customer_service_metric_task",t,{headers:{"accept-language":e}})}getCustomerServiceMetricTask(e){return e=encodeURIComponent(e),this.get(`/customer_service_metric_task/${e}`)}}Feed.id="Feed";class Logistics extends Restful{get basePath(){return"/sell/logistics/v1_beta"}createShippingQuote(e){return this.post("/shipping_quote",e)}getShippingQuote(e){return e=encodeURIComponent(e),this.get(`/shipping_quote/${e}`)}createFromShippingQuote(e){return this.post("/shipment/create_from_shipping_quote",e)}getShipment(e){return this.get(`/shipment/${e}`)}downloadLabelFile(e){return this.get(`/shipment/${e}/download_label_file`)}cancelShipment(e){return this.post(`/shipment/${e}/cancel`)}}Logistics.id="Logistics";class Negotiation extends Restful{get basePath(){return"/sell/negotiation/v1"}findEligibleItems({limit:e,offset:t}={}){return this.get("/find_eligible_items",{params:{limit:e,offset:t}})}sendOfferToInterestedBuyers(e){return this.post("/send_offer_to_interested_buyers",e)}}Negotiation.id="Negotiation";class Listing extends Restful{get basePath(){return"/sell/listing/v1_beta"}createItemDraft(e){return this.post("/item_draft/",e)}}var tn,rn;Listing.id="Listing",function(e){e.AskSellerQuestion="AskSellerQuestion",e.BestOffer="BestOffer",e.BestOfferDeclined="BestOfferDeclined",e.BestOfferPlaced="BestOfferPlaced",e.BidPlaced="BidPlaced",e.BidReceived="BidReceived",e.CounterOfferReceived="CounterOfferReceived",e.CustomCode="CustomCode",e.EndOfAuction="EndOfAuction",e.FeedbackLeft="FeedbackLeft",e.FeedbackReceived="FeedbackReceived",e.FeedbackStarChanged="FeedbackStarChanged",e.FixedPriceEndOfTransaction="FixedPriceEndOfTransaction",e.FixedPriceTransaction="FixedPriceTransaction",e.ItemAddedToWatchList="ItemAddedToWatchList",e.ItemEnded="ItemEnded",e.ItemListed="ItemListed",e.ItemLost="ItemLost",e.ItemMarkedPaid="ItemMarkedPaid",e.ItemMarkedShipped="ItemMarkedShipped",e.ItemRemovedFromWatchList="ItemRemovedFromWatchList",e.ItemSold="ItemSold",e.ItemUnsold="ItemUnsold",e.ItemWon="ItemWon",e.OutBid="OutBid",e.PriceChange="PriceChange",e.SecondChanceOffer="SecondChanceOffer",e.WatchedItemEndingSoon="WatchedItemEndingSoon"}(tn||(tn={})),function(e){e[e.GetPublicAlerts=0]="GetPublicAlerts",e[e.GetUserAlerts=1]="GetUserAlerts",e[e.Login=2]="Login",e[e.Logout=3]="Logout"}(rn||(rn={}));var nn,on=rn;!function(e){e[e.findCompletedItems=0]="findCompletedItems",e[e.findItemsAdvanced=1]="findItemsAdvanced",e[e.findItemsByCategory=2]="findItemsByCategory",e[e.findItemsByKeywords=3]="findItemsByKeywords",e[e.findItemsByProduct=4]="findItemsByProduct",e[e.findItemsIneBayStores=5]="findItemsIneBayStores",e[e.getHistograms=6]="getHistograms",e[e.getSearchKeywordsRecommendation=7]="getSearchKeywordsRecommendation",e[e.getVersion=8]="getVersion"}(nn||(nn={}));var sn,an=nn;!function(e){e[e.getMostWatchedItems=0]="getMostWatchedItems",e[e.getRelatedCategoryItems=1]="getRelatedCategoryItems",e[e.getSimilarItems=2]="getSimilarItems",e[e.getVersion=3]="getVersion"}(sn||(sn={}));var cn,un=sn;!function(e){e[e.FindProducts=0]="FindProducts",e[e.GetCategoryInfo=1]="GetCategoryInfo",e[e.GeteBayTime=2]="GeteBayTime",e[e.GetItemStatus=3]="GetItemStatus",e[e.GetMultipleItems=4]="GetMultipleItems",e[e.GetShippingCosts=5]="GetShippingCosts",e[e.GetSingleItem=6]="GetSingleItem",e[e.GetUserProfile=7]="GetUserProfile"}(cn||(cn={}));var ln,pn=cn;!function(e){e[e.AddDispute=0]="AddDispute",e[e.AddDisputeResponse=1]="AddDisputeResponse",e[e.AddFixedPriceItem=2]="AddFixedPriceItem",e[e.AddItem=3]="AddItem",e[e.AddItemFromSellingManagerTemplate=4]="AddItemFromSellingManagerTemplate",e[e.AddItems=5]="AddItems",e[e.AddMemberMessageAAQToPartner=6]="AddMemberMessageAAQToPartner",e[e.AddMemberMessageRTQ=7]="AddMemberMessageRTQ",e[e.AddMemberMessagesAAQToBidder=8]="AddMemberMessagesAAQToBidder",e[e.AddOrder=9]="AddOrder",e[e.AddSecondChanceItem=10]="AddSecondChanceItem",e[e.AddSellingManagerInventoryFolder=11]="AddSellingManagerInventoryFolder",e[e.AddSellingManagerProduct=12]="AddSellingManagerProduct",e[e.AddSellingManagerTemplate=13]="AddSellingManagerTemplate",e[e.AddToItemDescription=14]="AddToItemDescription",e[e.AddToWatchList=15]="AddToWatchList",e[e.AddTransactionConfirmationItem=16]="AddTransactionConfirmationItem",e[e.CompleteSale=17]="CompleteSale",e[e.ConfirmIdentity=18]="ConfirmIdentity",e[e.DeleteMyMessages=19]="DeleteMyMessages",e[e.DeleteSellingManagerInventoryFolder=20]="DeleteSellingManagerInventoryFolder",e[e.DeleteSellingManagerItemAutomationRule=21]="DeleteSellingManagerItemAutomationRule",e[e.DeleteSellingManagerProduct=22]="DeleteSellingManagerProduct",e[e.DeleteSellingManagerTemplate=23]="DeleteSellingManagerTemplate",e[e.DeleteSellingManagerTemplateAutomationRule=24]="DeleteSellingManagerTemplateAutomationRule",e[e.DisableUnpaidItemAssistance=25]="DisableUnpaidItemAssistance",e[e.EndFixedPriceItem=26]="EndFixedPriceItem",e[e.EndItem=27]="EndItem",e[e.EndItems=28]="EndItems",e[e.ExtendSiteHostedPictures=29]="ExtendSiteHostedPictures",e[e.FetchToken=30]="FetchToken",e[e.GetAccount=31]="GetAccount",e[e.GetAdFormatLeads=32]="GetAdFormatLeads",e[e.GetAllBidders=33]="GetAllBidders",e[e.GetApiAccessRules=34]="GetApiAccessRules",e[e.GetBestOffers=35]="GetBestOffers",e[e.GetBidderList=36]="GetBidderList",e[e.GetCategories=37]="GetCategories",e[e.GetCategoryFeatures=38]="GetCategoryFeatures",e[e.GetCategoryMappings=39]="GetCategoryMappings",e[e.GetCategorySpecifics=40]="GetCategorySpecifics",e[e.GetChallengeToken=41]="GetChallengeToken",e[e.GetCharities=42]="GetCharities",e[e.GetClientAlertsAuthToken=43]="GetClientAlertsAuthToken",e[e.GetContextualKeywords=44]="GetContextualKeywords",e[e.GetDescriptionTemplates=45]="GetDescriptionTemplates",e[e.GetDispute=46]="GetDispute",e[e.GeteBayDetails=47]="GeteBayDetails",e[e.GeteBayOfficialTime=48]="GeteBayOfficialTime",e[e.GetFeedback=49]="GetFeedback",e[e.GetItem=50]="GetItem",e[e.GetItemsAwaitingFeedback=51]="GetItemsAwaitingFeedback",e[e.GetItemShipping=52]="GetItemShipping",e[e.GetItemTransactions=53]="GetItemTransactions",e[e.GetMemberMessages=54]="GetMemberMessages",e[e.GetMessagePreferences=55]="GetMessagePreferences",e[e.GetMyeBayBuying=56]="GetMyeBayBuying",e[e.GetMyeBayReminders=57]="GetMyeBayReminders",e[e.GetMyeBaySelling=58]="GetMyeBaySelling",e[e.GetMyMessages=59]="GetMyMessages",e[e.GetNotificationPreferences=60]="GetNotificationPreferences",e[e.GetNotificationsUsage=61]="GetNotificationsUsage",e[e.GetOrders=62]="GetOrders",e[e.GetOrderTransactions=63]="GetOrderTransactions",e[e.GetPromotionalSaleDetails=64]="GetPromotionalSaleDetails",e[e.GetSellerDashboard=65]="GetSellerDashboard",e[e.GetSellerEvents=66]="GetSellerEvents",e[e.GetSellerList=67]="GetSellerList",e[e.GetSellerTransactions=68]="GetSellerTransactions",e[e.GetSellingManagerAlerts=69]="GetSellingManagerAlerts",e[e.GetSellingManagerEmailLog=70]="GetSellingManagerEmailLog",e[e.GetSellingManagerInventory=71]="GetSellingManagerInventory",e[e.GetSellingManagerInventoryFolder=72]="GetSellingManagerInventoryFolder",e[e.GetSellingManagerItemAutomationRule=73]="GetSellingManagerItemAutomationRule",e[e.GetSellingManagerSaleRecord=74]="GetSellingManagerSaleRecord",e[e.GetSellingManagerSoldListings=75]="GetSellingManagerSoldListings",e[e.GetSellingManagerTemplateAutomationRule=76]="GetSellingManagerTemplateAutomationRule",e[e.GetSellingManagerTemplates=77]="GetSellingManagerTemplates",e[e.GetSessionID=78]="GetSessionID",e[e.GetShippingDiscountProfiles=79]="GetShippingDiscountProfiles",e[e.GetStore=80]="GetStore",e[e.GetStoreCategoryUpdateStatus=81]="GetStoreCategoryUpdateStatus",e[e.GetStoreCustomPage=82]="GetStoreCustomPage",e[e.GetStoreOptions=83]="GetStoreOptions",e[e.GetStorePreferences=84]="GetStorePreferences",e[e.GetSuggestedCategories=85]="GetSuggestedCategories",e[e.GetTaxTable=86]="GetTaxTable",e[e.GetTokenStatus=87]="GetTokenStatus",e[e.GetUser=88]="GetUser",e[e.GetUserContactDetails=89]="GetUserContactDetails",e[e.GetUserDisputes=90]="GetUserDisputes",e[e.GetUserPreferences=91]="GetUserPreferences",e[e.GetVeROReasonCodeDetails=92]="GetVeROReasonCodeDetails",e[e.GetVeROReportStatus=93]="GetVeROReportStatus",e[e.LeaveFeedback=94]="LeaveFeedback",e[e.MoveSellingManagerInventoryFolder=95]="MoveSellingManagerInventoryFolder",e[e.PlaceOffer=96]="PlaceOffer",e[e.RelistFixedPriceItem=97]="RelistFixedPriceItem",e[e.RelistItem=98]="RelistItem",e[e.RemoveFromWatchList=99]="RemoveFromWatchList",e[e.RespondToBestOffer=100]="RespondToBestOffer",e[e.RespondToFeedback=101]="RespondToFeedback",e[e.ReviseCheckoutStatus=102]="ReviseCheckoutStatus",e[e.ReviseFixedPriceItem=103]="ReviseFixedPriceItem",e[e.ReviseInventoryStatus=104]="ReviseInventoryStatus",e[e.ReviseItem=105]="ReviseItem",e[e.ReviseMyMessages=106]="ReviseMyMessages",e[e.ReviseMyMessagesFolders=107]="ReviseMyMessagesFolders",e[e.ReviseSellingManagerInventoryFolder=108]="ReviseSellingManagerInventoryFolder",e[e.ReviseSellingManagerProduct=109]="ReviseSellingManagerProduct",e[e.ReviseSellingManagerSaleRecord=110]="ReviseSellingManagerSaleRecord",e[e.ReviseSellingManagerTemplate=111]="ReviseSellingManagerTemplate",e[e.RevokeToken=112]="RevokeToken",e[e.SaveItemToSellingManagerTemplate=113]="SaveItemToSellingManagerTemplate",e[e.SellerReverseDispute=114]="SellerReverseDispute",e[e.SendInvoice=115]="SendInvoice",e[e.SetMessagePreferences=116]="SetMessagePreferences",e[e.SetNotificationPreferences=117]="SetNotificationPreferences",e[e.SetPromotionalSale=118]="SetPromotionalSale",e[e.SetPromotionalSaleListings=119]="SetPromotionalSaleListings",e[e.SetSellingManagerFeedbackOptions=120]="SetSellingManagerFeedbackOptions",e[e.SetSellingManagerItemAutomationRule=121]="SetSellingManagerItemAutomationRule",e[e.SetSellingManagerTemplateAutomationRule=122]="SetSellingManagerTemplateAutomationRule",e[e.SetShippingDiscountProfiles=123]="SetShippingDiscountProfiles",e[e.SetStore=124]="SetStore",e[e.SetStoreCategories=125]="SetStoreCategories",e[e.SetStoreCustomPage=126]="SetStoreCustomPage",e[e.SetStorePreferences=127]="SetStorePreferences",e[e.SetTaxTable=128]="SetTaxTable",e[e.SetUserNotes=129]="SetUserNotes",e[e.SetUserPreferences=130]="SetUserPreferences",e[e.UploadSiteHostedPictures=131]="UploadSiteHostedPictures",e[e.ValidateChallengeInput=132]="ValidateChallengeInput",e[e.ValidateTestUserRegistration=133]="ValidateTestUserRegistration",e[e.VerifyAddFixedPriceItem=134]="VerifyAddFixedPriceItem",e[e.VerifyAddItem=135]="VerifyAddItem",e[e.VerifyAddSecondChanceItem=136]="VerifyAddSecondChanceItem",e[e.VerifyRelistItem=137]="VerifyRelistItem",e[e.VeROReportItems=138]="VeROReportItems"}(ln||(ln={}));var dn,En,fn,_n,hn,gn,mn,Rn,An,yn,In,Tn,Sn,Nn,On,Cn,Pn,bn,Dn,Un,Ln,Mn,Bn,Fn,vn,xn,wn,kn,Gn,Yn,Hn,$n,jn,Vn,Kn,Wn,qn,Xn,Jn,zn,Qn,Zn,eo,to,ro,no=ln;class Traditional extends Api{constructor(){super(...arguments),this.createXMLRequest=(e,t)=>async(r,n)=>{const o={...Kr,...n};try{return await this.request(o,t,e,r)}catch(n){if(this.config.autoRefreshToken&&(n.name===EBayIAFTokenExpired.name||n.name===EBayIAFTokenInvalid.name))return await this.request(o,t,e,r,!0);throw n}}}createTradingApi(){if(!this.config.devId)throw new Error("devId is required for trading API.");if("number"!=typeof this.config.siteId)throw new Error("siteId is required for trading API.");return this.createTraditionalXMLApi({endpoint:{production:"https://api.ebay.com/ws/api.dll",sandbox:"https://api.sandbox.ebay.com/ws/api.dll"},calls:no,xmlns:"urn:ebay:apis:eBLBaseComponents",headers:(e,t)=>({"X-EBAY-API-CALL-NAME":e,"X-EBAY-API-CERT-NAME":this.config.certId,"X-EBAY-API-APP-NAME":this.config.appId,"X-EBAY-API-DEV-NAME":this.config.devId,"X-EBAY-API-SITEID":this.config.siteId,"X-EBAY-API-COMPATIBILITY-LEVEL":967,...t&&{"X-EBAY-API-IAF-TOKEN":t}})})}createShoppingApi(){if("number"!=typeof this.config.siteId)throw new Error("siteId is required for shopping API.");return this.createTraditionalXMLApi({endpoint:{production:"https://open.api.ebay.com/shopping",sandbox:"https://open.api.sandbox.ebay.com/shopping"},xmlns:"urn:ebay:apis:eBLBaseComponents",calls:pn,headers:(e,t)=>({"X-EBAY-API-CALL-NAME":e,"X-EBAY-API-SITE-ID":this.config.siteId,"X-EBAY-API-VERSION":863,"X-EBAY-API-REQUEST-ENCODING":"xml",...t&&{"X-EBAY-API-IAF-TOKEN":t}})})}createFindingApi(){return this.createTraditionalXMLApi({endpoint:{production:"https://svcs.ebay.com/services/search/FindingService/v1",sandbox:"https://svcs.sandbox.ebay.com/services/search/FindingService/v1"},xmlns:"http://www.ebay.com/marketplace/search/v1/services",calls:an,headers:e=>({"X-EBAY-SOA-SECURITY-APPNAME":this.config.appId,"X-EBAY-SOA-OPERATION-NAME":e})})}createClientAlertsApi(){if("number"!=typeof this.config.siteId)throw new Error("siteId is required for client alerts API.");const e={endpoint:{production:"https://clientalerts.ebay.com/ws/ecasvc/ClientAlerts",sandbox:"https://clientalerts.sandbox.ebay.com/ws/ecasvc/ClientAlerts"},calls:on},t=e.endpoint[this.config.sandbox?"sandbox":"production"],paramsSerializer=e=>ur.stringify(e,{allowDots:!0}).replace(/%5B/gi,"(").replace(/%5D/gi,")"),r={appid:this.config.appId,siteid:this.config.siteId,version:643},n={};return Object.keys(e.calls).forEach((e=>{n[e]=async n=>this.req.get(t,{paramsSerializer:{serialize:paramsSerializer},params:{...r,...n,callname:e}})})),n}createMerchandisingApi(){return this.createTraditionalXMLApi({endpoint:{production:"https://svcs.ebay.com/MerchandisingService",sandbox:"https://svcs.sandbox.ebay.com/MerchandisingService"},xmlns:"http://www.ebay.com/marketplace/services",calls:un,headers:e=>({"EBAY-SOA-CONSUMER-ID":this.config.appId,"X-EBAY-SOA-OPERATION-NAME":e})})}createBusinessPolicyManagementApi(){throw new Error("Important! This API is deprecated and will be decommissioned on January 31, 2022. We recommend that you migrate to the fulfillment_policy, payment_policy, and return_policy resources of the Account API to set up and manage all of your fulfillment, payment, and return business policies.")}async request(e,t,r,n,o=!1){try{o&&await this.auth.OAuth2.refreshToken();const i=await this.getConfig(t,r,e),s=new XMLRequest(r,n,i,this.req);return await s.request()}catch(e){handleEBayError(e)}}async getConfig(e,t,r){const n=this.auth.authNAuth.eBayAuthToken,o=!n&&r.useIaf?await this.auth.OAuth2.getAccessToken():null,i=!n&&o;return{...r,xmlns:e.xmlns,endpoint:e.endpoint[this.config.sandbox?"sandbox":"production"],headers:{...e.headers(t,i?o:null),...r.headers},...i?{}:{eBayAuthToken:n}}}createTraditionalXMLApi(e){const t={};return Object.keys(e.calls).forEach((r=>{t[r]=this.createXMLRequest(r,e)})),t}}class ApiFactory extends Api{constructor(){super(...arguments),this._restful={}}createBuyApi(){return{browse:this.createRestfulApi(Browse),feed:this.createRestfulApi(Qr),marketing:this.createRestfulApi(Zr),offer:this.createRestfulApi(Offer),order:this.createRestfulApi(Order),deal:this.createRestfulApi(Deal),marketplaceInsights:this.createRestfulApi(MarketplaceInsights)}}createCommerceApi(){return{catalog:this.createRestfulApi(Catalog),identity:this.createRestfulApi(Identity),taxonomy:this.createRestfulApi(Taxonomy),translation:this.createRestfulApi(Translation),charity:this.createRestfulApi(Charity),notification:this.createRestfulApi(Notification)}}createDeveloperApi(){return{analytics:this.createRestfulApi(en),keyManagement:this.createRestfulApi(KeyManagement)}}createPostOrderApi(){return{cancellation:this.createRestfulApi(Cancellation),case:this.createRestfulApi(Case),inquiry:this.createRestfulApi(Inquiry),return:this.createRestfulApi(Return)}}createSellApi(){return{account:this.createRestfulApi(Account),analytics:this.createRestfulApi(Analytics),compliance:this.createRestfulApi(Compliance),fulfillment:this.createRestfulApi(Fulfillment),inventory:this.createRestfulApi(Inventory),marketing:this.createRestfulApi(Marketing),metadata:this.createRestfulApi(Metadata),recommendation:this.createRestfulApi(Recommendation),finances:this.createRestfulApi(Finances),feed:this.createRestfulApi(Feed),logistics:this.createRestfulApi(Logistics),negotiation:this.createRestfulApi(Negotiation),listing:this.createRestfulApi(Listing)}}get traditional(){return this._traditional?this._traditional:this._traditional=new Traditional(this.config,this.req,this.auth)}createTradingApi(){return this.traditional.createTradingApi()}createShoppingApi(){return this.traditional.createShoppingApi()}createFindingApi(){return this.traditional.createFindingApi()}createClientAlertsApi(){return this.traditional.createClientAlertsApi()}createMerchandisingApi(){return this.traditional.createMerchandisingApi()}createRestfulApi(e){const t=e.id;return this._restful[t]||(this._restful[t]=new e(this.config,this.req,this.auth))}}!function(e){e[e.EBAY_US=0]="EBAY_US",e[e.EBAY_ENCA=2]="EBAY_ENCA",e[e.EBAY_GB=3]="EBAY_GB",e[e.EBAY_AU=15]="EBAY_AU",e[e.EBAY_AT=16]="EBAY_AT",e[e.EBAY_FRBE=23]="EBAY_FRBE",e[e.EBAY_FR=71]="EBAY_FR",e[e.EBAY_DE=77]="EBAY_DE",e[e.EBAY_MOTOR=100]="EBAY_MOTOR",e[e.EBAY_IT=101]="EBAY_IT",e[e.EBAY_NLBE=123]="EBAY_NLBE",e[e.EBAY_NL=146]="EBAY_NL",e[e.EBAY_ES=186]="EBAY_ES",e[e.EBAY_CH=193]="EBAY_CH",e[e.EBAY_HK=201]="EBAY_HK",e[e.EBAY_IN=203]="EBAY_IN",e[e.EBAY_IE=205]="EBAY_IE",e[e.EBAY_MY=207]="EBAY_MY",e[e.EBAY_FRCA=210]="EBAY_FRCA",e[e.EBAY_PH=211]="EBAY_PH",e[e.EBAY_PL=212]="EBAY_PL",e[e.EBAY_SG=216]="EBAY_SG"}(dn=dn||(dn={})),function(e){e.EBAY_US="EBAY_US",e.EBAY_AT="EBAY_AT",e.EBAY_AU="EBAY_AU",e.EBAY_BE="EBAY_BE",e.EBAY_CA="EBAY_CA",e.EBAY_CH="EBAY_CH",e.EBAY_DE="EBAY_DE",e.EBAY_ES="EBAY_ES",e.EBAY_FR="EBAY_FR",e.EBAY_GB="EBAY_GB",e.EBAY_HK="EBAY_HK",e.EBAY_IE="EBAY_IE",e.EBAY_IN="EBAY_IN",e.EBAY_IT="EBAY_IT",e.EBAY_MY="EBAY_MY",e.EBAY_NL="EBAY_NL",e.EBAY_PH="EBAY_PH",e.EBAY_PL="EBAY_PL",e.EBAY_SG="EBAY_SG",e.EBAY_TH="EBAY_TH",e.EBAY_TW="EBAY_TW",e.EBAY_VN="EBAY_VN",e.EBAY_MOTORS_US="EBAY_MOTORS_US"}(En=En||(En={})),function(e){e.BUYER="BUYER",e.SELLER="SELLER"}(fn=fn||(fn={})),function(e){e.DEFAULT="DEFAULT",e.SUMMARY="SUMMARY"}(_n=_n||(_n={})),function(e){e.CLOSED="CLOSED",e.CS_CLOSED="CS_CLOSED",e.ON_HOLD="ON_HOLD",e.OPEN="OPEN",e.OTHER="OTHER",e.REFUND_AGREED_BUT_FAILED="REFUND_AGREED_BUT_FAILED",e.WAITING_CS="WAITING_CS",e.WAITING_DELIVERY="WAITING_DELIVERY"}(hn=hn||(hn={})),function(e){e.DEFAULT="DEFAULT",e.SUMMARY="SUMMARY"}(gn=gn||(gn={})),function(e){e.CLOSED="CLOSED",e.CLOSED_WITH_ESCALATION="CLOSED_WITH_ESCALATION",e.CS_CLOSED="CS_CLOSED",e.OPEN="OPEN",e.OTHER="OTHER",e.PENDING="PENDING",e.WAITING_BUYER_RESPONSE="WAITING_BUYER_RESPONSE",e.WAITING_SELLER_RESPONSE="WAITING_SELLER_RESPONSE"}(mn=mn||(mn={})),function(e){e.AUSTRALIA_POST="AUSTRALIA_POST",e.BARTOLINI="BARTOLINI",e.CANADA_POST="CANADA_POST",e.COLISSIMO="COLISSIMO",e.COLLECT_PLUS="COLLECT_PLUS",e.CORREOS="CORREOS",e.DEUTSCHE_POST="DEUTSCHE_POST",e.DHL="DHL",e.FEDEX="FEDEX",e.HERMES="HERMES",e.LA_POSTE="LA_POSTE",e.MONDIAL_RELAY="MONDIAL_RELAY",e.MRW="MRW",e.NEXIVE="NEXIVE",e.OTHER="OTHER",e.PARCEL_FORCE="PARCEL_FORCE",e.POSTE="POSTE",e.ROYAL_MAIL="ROYAL_MAIL",e.SEUR="SEUR",e.UNKNOWN="UNKNOWN",e.UPS="UPS",e.USPS="USPS"}(Rn=Rn||(Rn={})),function(e){e.ARRIVED_DAMAGED="ARRIVED_DAMAGED",e.ARRIVED_LATE="ARRIVED_LATE",e.BUYER_CANCEL_ORDER="BUYER_CANCEL_ORDER",e.BUYER_NO_SHOW="BUYER_NO_SHOW",e.BUYER_NOT_SCHEDULED="BUYER_NOT_SCHEDULED",e.BUYER_REFUSED_TO_PICKUP="BUYER_REFUSED_TO_PICKUP",e.DEFECTIVE_ITEM="DEFECTIVE_ITEM",e.DIFFERENT_FROM_LISTING="DIFFERENT_FROM_LISTING",e.EXPIRED_ITEM="EXPIRED_ITEM",e.FAKE_OR_COUNTERFEIT="FAKE_OR_COUNTERFEIT",e.FOUND_BETTER_PRICE="FOUND_BETTER_PRICE",e.IN_STORE_RETURN="IN_STORE_RETURN",e.MISSING_PARTS="MISSING_PARTS",e.NO_LONGER_NEED_ITEM="NO_LONGER_NEED_ITEM",e.NO_REASON="NO_REASON",e.NOT_AS_DESCRIBED="NOT_AS_DESCRIBED",e.ORDERED_ACCIDENTALLY="ORDERED_ACCIDENTALLY",e.ORDERED_DIFFERENT_ITEM="ORDERED_DIFFERENT_ITEM",e.ORDERED_WRONG_ITEM="ORDERED_WRONG_ITEM",e.OTHER="OTHER",e.OUT_OF_STOCK="OUT_OF_STOCK",e.RETURNING_GIFT="RETURNING_GIFT",e.VALET_DELIVERY_ISSUES="VALET_DELIVERY_ISSUES",e.VALET_UNAVAILABLE="VALET_UNAVAILABLE",e.WRONG_SIZE="WRONG_SIZE"}(An=An||(An={})),function(e){e.CREATE="CREATE",e.REQUEST="REQUEST",e.UNKNOWN="UNKNOWN"}(yn=yn||(yn={})),function(e){e.EXCHANGE="EXCHANGE",e.MONEY_BACK="MONEY_BACK",e.REPLACEMENT="REPLACEMENT",e.UNKNOWN="UNKNOWN"}(In=In||(In={})),function(e){e.FULL="FULL",e.NONE="NONE",e.SUMMARY="SUMMARY"}(Tn=Tn||(Tn={})),function(e){e.BUYER_NORESPONSE="BUYER_NORESPONSE",e.BUYER_RETURNED_WRONG_ITEM="BUYER_RETURNED_WRONG_ITEM",e.DISAGREE_WITH_RETURN_REASON="DISAGREE_WITH_RETURN_REASON",e.ITEM_NOT_RECEIVED="ITEM_NOT_RECEIVED",e.ITEM_RECEIVED_IN_DIFFERENT_CONDITION="ITEM_RECEIVED_IN_DIFFERENT_CONDITION",e.NEW_ITEM_NOT_RECEIVED="NEW_ITEM_NOT_RECEIVED",e.NO_REFUND_FOR_RETURN_SHIPPING="NO_REFUND_FOR_RETURN_SHIPPING",e.NO_REFUND_RECEIVED="NO_REFUND_RECEIVED",e.OTHER="OTHER",e.RECEIVED_WRONG_ITEM="RECEIVED_WRONG_ITEM",e.SELLER_NO_RESPONSE="SELLER_NO_RESPONSE",e.TROUBLE_COMMUNICATION_WITH_BUYER="TROUBLE_COMMUNICATION_WITH_BUYER",e.TROUBLE_COMMUNICATION_WITH_SELLER="TROUBLE_COMMUNICATION_WITH_SELLER"}(Sn=Sn||(Sn={})),function(e){e.ACCEPT_PARTIAL_REFUND="ACCEPT_PARTIAL_REFUND",e.ACCEPT_REPLACEMENT_OFFER="ACCEPT_REPLACEMENT_OFFER",e.APPROVE="APPROVE",e.APPROVE_WITHOUT_EBAY_LABEL="APPROVE_WITHOUT_EBAY_LABEL",e.DECLINE="DECLINE",e.DECLINE_PARTIAL_REFUND="DECLINE_PARTIAL_REFUND",e.DECLINE_REPLACEMENT_OFFER="DECLINE_REPLACEMENT_OFFER",e.OFFER_PARTIAL_REFUND="OFFER_PARTIAL_REFUND",e.OFFER_REPLACEMENT="OFFER_REPLACEMENT",e.OFFER_RETURN="OFFER_RETURN",e.OFFER_RETURN_WITHOUT_LABEL="OFFER_RETURN_WITHOUT_LABEL",e.PROVIDE_RMA="PROVIDE_RMA",e.UNKNOWN="UNKNOWN"}(Nn=Nn||(Nn={})),function(e){e.MOTORS_VEHICLES="MOTORS_VEHICLES",e.ALL_EXCLUDING_MOTORS_VEHICLES="ALL_EXCLUDING_MOTORS_VEHICLES"}(On=On||(On={})),function(e){e.ALL_OPEN="ALL_OPEN",e.ALL_OPEN_REPLACEMENT="ALL_OPEN_REPLACEMENT",e.ALL_OPEN_RETURN="ALL_OPEN_RETURN",e.CLOSED="CLOSED",e.EBAY_PLUS="EBAY_PLUS",e.ITEM_DELIVERED="ITEM_DELIVERED",e.ITEM_SHIPPED="ITEM_SHIPPED",e.RETURN_STARTED="RETURN_STARTED",e.SELLER_ACTION_DUE="SELLER_ACTION_DUE",e.SELLER_ACTION_OVERDUE="SELLER_ACTION_OVERDUE",e.SELLER_NO_ACTION="SELLER_NO_ACTION",e.UNKNOWN="UNKNOWN"}(Cn=Cn||(Cn={})),function(e){e.AUTO_REFUND_INITIATED="AUTO_REFUND_INITIATED",e.CLOSED="CLOSED",e.INITIAL="INITIAL",e.ITEM_DELIVERED="ITEM_DELIVERED",e.ITEM_KEPT="ITEM_KEPT",e.ITEM_READY_TO_SHIP="ITEM_READY_TO_SHIP",e.ITEM_SHIPPED="ITEM_SHIPPED",e.LESS_THAN_A_FULL_REFUND_ISSUED="LESS_THAN_A_FULL_REFUND_ISSUED",e.PARTIAL_REFUND_AS_PAYOUT_INITIATED="PARTIAL_REFUND_AS_PAYOUT_INITIATED",e.PARTIAL_REFUND_DECLINED="PARTIAL_REFUND_DECLINED",e.PARTIAL_REFUND_FAILED="PARTIAL_REFUND_FAILED",e.PARTIAL_REFUND_INITIATED="PARTIAL_REFUND_INITIATED",e.PARTIAL_REFUND_NON_PAYPAL_INITIATED="PARTIAL_REFUND_NON_PAYPAL_INITIATED",e.PARTIAL_REFUND_REQUESTED="PARTIAL_REFUND_REQUESTED",e.PARTIAL_REFUNDED="PARTIAL_REFUNDED",e.PAYOUT_INITIATED="PAYOUT_INITIATED",e.REFUND_AS_PAYOUT_INITIATED="REFUND_AS_PAYOUT_INITIATED",e.REFUND_FAILED="REFUND_FAILED",e.REFUND_INITIATED="REFUND_INITIATED",e.REFUND_SENT_PENDING_CONFIRMATION="REFUND_SENT_PENDING_CONFIRMATION",e.REFUND_TIMEOUT="REFUND_TIMEOUT",e.REPLACED="REPLACED",e.REPLACEMENT_CLOSED="REPLACEMENT_CLOSED",e.REPLACEMENT_DELIVERED="REPLACEMENT_DELIVERED",e.REPLACEMENT_LABEL_PENDING="REPLACEMENT_LABEL_PENDING",e.REPLACEMENT_LABEL_PENDING_TIMEOUT="REPLACEMENT_LABEL_PENDING_TIMEOUT",e.REPLACEMENT_LABEL_REQUESTED="REPLACEMENT_LABEL_REQUESTED",e.REPLACEMENT_LABEL_REQUESTED_TIMEOUT="REPLACEMENT_LABEL_REQUESTED_TIMEOUT",e.REPLACEMENT_OFFER_PENDING="REPLACEMENT_OFFER_PENDING",e.REPLACEMENT_REQUEST_TIMEOUT="REPLACEMENT_REQUEST_TIMEOUT",e.REPLACEMENT_REQUESTED="REPLACEMENT_REQUESTED",e.REPLACEMENT_RMA_PENDING="REPLACEMENT_RMA_PENDING",e.REPLACEMENT_SHIPPED="REPLACEMENT_SHIPPED",e.REPLACEMENT_STARTED="REPLACEMENT_STARTED",e.RETURN_LABEL_PENDING="RETURN_LABEL_PENDING",e.RETURN_LABEL_PENDING_TIMEOUT="RETURN_LABEL_PENDING_TIMEOUT",e.RETURN_LABEL_REQUESTED="RETURN_LABEL_REQUESTED",e.RETURN_LABEL_REQUESTED_TIMEOUT="RETURN_LABEL_REQUESTED_TIMEOUT",e.RETURN_REJECTED="RETURN_REJECTED",e.RETURN_REQUEST_TIMEOUT="RETURN_REQUEST_TIMEOUT",e.RETURN_REQUESTED="RETURN_REQUESTED",e.RMA_PENDING="RMA_PENDING",e.UNKNOWN="UNKNOWN"}(Pn=Pn||(Pn={})),function(e){e.ITEM_RELATED="ITEM_RELATED",e.LABEL_RELATED="LABEL_RELATED",e.REFUND_RELATED="REFUND_RELATED",e.UNKNOWN="UNKNOWN"}(bn=bn||(bn={})),function(e){e.DOMESTIC_SHIPPING="DOMESTIC_SHIPPING",e.IMPORT_CHARGE="IMPORT_CHARGE",e.INTERNATIONAL_SHIPPING="INTERNATIONAL_SHIPPING",e.ITEM_IMPORT_TAX="ITEM_IMPORT_TAX",e.ITEM_TAX="ITEM_TAX",e.ORDER_ADJUSTMENT="ORDER_ADJUSTMENT",e.ORIGINAL_SHIPPING="ORIGINAL_SHIPPING",e.OTHER="OTHER",e.PURCHASE_PRICE="PURCHASE_PRICE",e.REFUND_FROM_PAYPAL="REFUND_FROM_PAYPAL",e.RETURN_SHIPPING="RETURN_SHIPPING",e.SHIPPING_IMPORT_TAX="SHIPPING_IMPORT_TAX",e.SHIPPING_TAX="SHIPPING_TAX"}(Dn=Dn||(Dn={})),function(e){e.AUTO_APPROVE_REMORSE="AUTO_APPROVE_REMORSE",e.BUYER_ACCEPT_REPLACEMENT_OFFER="BUYER_ACCEPT_REPLACEMENT_OFFER",e.BUYER_ACCEPTS_NON_PAYPAL_PARTIAL_REFUND="BUYER_ACCEPTS_NON_PAYPAL_PARTIAL_REFUND",e.BUYER_ACCEPTS_PARTIAL_REFUND="BUYER_ACCEPTS_PARTIAL_REFUND",e.BUYER_CLOSE_RETURN="BUYER_CLOSE_RETURN",e.BUYER_CREATE_RETURN="BUYER_CREATE_RETURN",e.BUYER_DECLINE_PARTIAL_REFUND="BUYER_DECLINE_PARTIAL_REFUND",e.BUYER_DECLINE_REPLACEMENT_OFFER="BUYER_DECLINE_REPLACEMENT_OFFER",e.BUYER_ESCALATE="BUYER_ESCALATE",e.BUYER_MARK_AS_RECEIVED="BUYER_MARK_AS_RECEIVED",e.BUYER_MARK_REFUND_RECEIVED="BUYER_MARK_REFUND_RECEIVED",e.BUYER_MARK_RETURN_SHIPPED="BUYER_MARK_RETURN_SHIPPED",e.BUYER_PRINT_SHIPPING_LABEL="BUYER_PRINT_SHIPPING_LABEL",e.BUYER_PROVIDE_LABEL="BUYER_PROVIDE_LABEL",e.BUYER_PROVIDE_TRACKING_INFO="BUYER_PROVIDE_TRACKING_INFO",e.BUYER_SEND_MESSAGE="BUYER_SEND_MESSAGE",e.BUYER_UPDATE_TRACKING="BUYER_UPDATE_TRACKING",e.BUYER_VOID_LABEL="BUYER_VOID_LABEL",e.CHARGEBACK_OPEN="CHARGEBACK_OPEN",e.DELETE_FILE="DELETE_FILE",e.EMAIL_SHIPPING_LABEL="EMAIL_SHIPPING_LABEL",e.EXTERNAL_CLAIM_OPENED="EXTERNAL_CLAIM_OPENED",e.GENERAL_TIME_OUT="GENERAL_TIME_OUT",e.NOTIFIED_DELIVERED="NOTIFIED_DELIVERED",e.NOTIFIED_SHIPPED="NOTIFIED_SHIPPED",e.NOTIFY_REPLACEMENT_DELIVERED="NOTIFY_REPLACEMENT_DELIVERED",e.NOTIFY_REPLACEMENT_SHIPPED="NOTIFY_REPLACEMENT_SHIPPED",e.NOTIFY_UPDATE_REFUND_STATUS="NOTIFY_UPDATE_REFUND_STATUS",e.OTHER="OTHER",e.REMINDER_BUYER_TO_RESPOND_RE_OFFER="REMINDER_BUYER_TO_RESPOND_RE_OFFER",e.REMINDER_BUYER_TO_SHIP="REMINDER_BUYER_TO_SHIP",e.REMINDER_FOR_REFUND="REMINDER_FOR_REFUND",e.REMINDER_FOR_REFUND_NO_SHIPPING="REMINDER_FOR_REFUND_NO_SHIPPING",e.REMINDER_FOR_RMA="REMINDER_FOR_RMA",e.REMINDER_FOR_SHIPPING="REMINDER_FOR_SHIPPING",e.REMINDER_SELLER_TO_RESPOND="REMINDER_SELLER_TO_RESPOND",e.REMINDER_SELLER_TO_SHIP="REMINDER_SELLER_TO_SHIP",e.SELLER_APPROVE_REQUEST="SELLER_APPROVE_REQUEST",e.SELLER_DECLINE_REQUEST="SELLER_DECLINE_REQUEST",e.SELLER_ESCALATE="SELLER_ESCALATE",e.SELLER_ISSUE_REFUND="SELLER_ISSUE_REFUND",e.SELLER_ISSUE_STORE_CREDIT_REFUND="SELLER_ISSUE_STORE_CREDIT_REFUND",e.SELLER_MARK_AS_RECEIVED="SELLER_MARK_AS_RECEIVED",e.SELLER_MARK_REFUND_SENT="SELLER_MARK_REFUND_SENT",e.SELLER_MARK_REPLACEMENT_SHIPPED="SELLER_MARK_REPLACEMENT_SHIPPED",e.SELLER_OFFER_PARTIAL_REFUND="SELLER_OFFER_PARTIAL_REFUND",e.SELLER_OFFER_REPLACEMENT="SELLER_OFFER_REPLACEMENT",e.SELLER_OFFER_RETURNS="SELLER_OFFER_RETURNS",e.SELLER_PRINT_SHIPPING_LABEL="SELLER_PRINT_SHIPPING_LABEL",e.SELLER_PROVIDE_LABEL="SELLER_PROVIDE_LABEL",e.SELLER_PROVIDE_RMA="SELLER_PROVIDE_RMA",e.SELLER_PROVIDE_TRACKING_INFO="SELLER_PROVIDE_TRACKING_INFO",e.SELLER_RETRY_REFUND="SELLER_RETRY_REFUND",e.SELLER_SEND_MESSAGE="SELLER_SEND_MESSAGE",e.SELLER_UPDATE_TRACKING="SELLER_UPDATE_TRACKING",e.SELLER_VOID_LABEL="SELLER_VOID_LABEL",e.SUBMIT_FILE="SUBMIT_FILE",e.SYSTEM_BUYER_PARTIAL_REFUND_AS_PAYOUT="SYSTEM_BUYER_PARTIAL_REFUND_AS_PAYOUT",e.SYSTEM_BUYER_REFUND_AS_PAYOUT="SYSTEM_BUYER_REFUND_AS_PAYOUT",e.SYSTEM_CLOSE_RETURN="SYSTEM_CLOSE_RETURN",e.SYSTEM_CREATE_RETURN="SYSTEM_CREATE_RETURN",e.SYSTEM_IMMEDIATE_REFUND="SYSTEM_IMMEDIATE_REFUND",e.TIME_OUT_AFTER_DECLINE="TIME_OUT_AFTER_DECLINE",e.TIME_OUT_AFTER_REFUNDED="TIME_OUT_AFTER_REFUNDED",e.TIME_OUT_AFTER_REFUNDED_AS_PAYOUT="TIME_OUT_AFTER_REFUNDED_AS_PAYOUT",e.TIME_OUT_AFTER_REPLACED="TIME_OUT_AFTER_REPLACED",e.TIME_OUT_FOR_AUTHORIZE="TIME_OUT_FOR_AUTHORIZE",e.TIME_OUT_FOR_AUTO_REFUND="TIME_OUT_FOR_AUTO_REFUND",e.TIME_OUT_FOR_BUYER_RECOUP="TIME_OUT_FOR_BUYER_RECOUP",e.TIME_OUT_FOR_DELIVERY="TIME_OUT_FOR_DELIVERY",e.TIME_OUT_FOR_ESCALATION="TIME_OUT_FOR_ESCALATION",e.TIME_OUT_FOR_ESCALATION_AFTER_SMIR="TIME_OUT_FOR_ESCALATION_AFTER_SMIR",e.TIME_OUT_FOR_ITEM_REPLACED="TIME_OUT_FOR_ITEM_REPLACED",e.TIME_OUT_FOR_MARK_REFUND_RECEIVED="TIME_OUT_FOR_MARK_REFUND_RECEIVED",e.TIME_OUT_FOR_MARK_REFUND_SENT="TIME_OUT_FOR_MARK_REFUND_SENT",e.TIME_OUT_FOR_MASS_PAYOUT="TIME_OUT_FOR_MASS_PAYOUT",e.TIME_OUT_FOR_PAYOUT="TIME_OUT_FOR_PAYOUT",e.TIME_OUT_FOR_PROVIDE_LABEL="TIME_OUT_FOR_PROVIDE_LABEL",e.TIME_OUT_FOR_REFUND="TIME_OUT_FOR_REFUND",e.TIME_OUT_FOR_REPLACEMENT_DELIVERED_ITEM_NOT_RETURNED="TIME_OUT_FOR_REPLACEMENT_DELIVERED_ITEM_NOT_RETURNED",e.TIME_OUT_FOR_REPLACEMENT_SHIPPED="TIME_OUT_FOR_REPLACEMENT_SHIPPED",e.TIME_OUT_FOR_RETURN_SHIPPING="TIME_OUT_FOR_RETURN_SHIPPING",e.TIME_OUT_FOR_RMA="TIME_OUT_FOR_RMA",e.TIME_OUT_FOR_SELLER_INVOICE="TIME_OUT_FOR_SELLER_INVOICE",e.TIME_OUT_FOR_SELLER_PAYOUT="TIME_OUT_FOR_SELLER_PAYOUT",e.TIME_OUT_FOR_SHIPMENT_TRACKING="TIME_OUT_FOR_SHIPMENT_TRACKING",e.TIME_OUT_FOR_SHIPPING="TIME_OUT_FOR_SHIPPING",e.TIME_OUT_FOR_SHIPPING_SYSTEM_CLOSE="TIME_OUT_FOR_SHIPPING_SYSTEM_CLOSE"}(Un=Un||(Un={})),function(e){e.STORE="STORE",e.WAREHOUSE="WAREHOUSE"}(Ln=Ln||(Ln={})),function(e){e.YEAR="YEAR",e.MONTH="MONTH",e.DAY="DAY",e.HOUR="HOUR",e.CALENDAR_DAY="CALENDAR_DAY",e.BUSINESS_DAY="BUSINESS_DAY",e.MINUTE="MINUTE",e.SECOND="SECOND",e.MILLISECOND="MILLISECOND"}(Mn=Mn||(Mn={})),function(e){e.DOMESTIC="DOMESTIC",e.INTERNATIONAL="INTERNATIONAL"}(Bn=Bn||(Bn={})),function(e){e.CALCULATED="CALCULATED",e.FLAT_RATE="FLAT_RATE",e.NOT_SPECIFIED="NOT_SPECIFIED"}(Fn=Fn||(Fn={})),function(e){e.EBAY_PAYMENTS="EBAY_PAYMENTS"}(vn=vn||(vn={})),function(e){e.OPTED_IN="OPTED_IN",e.NOT_OPTED_IN="NOT_OPTED_IN"}(xn=xn||(xn={})),function(e){e.CASH_IN_PERSON="CASH_IN_PERSON",e.CASH_ON_DELIVERY="CASH_ON_DELIVERY",e.CASH_ON_PICKUP="CASH_ON_PICKUP",e.CASHIER_CHECK="CASHIER_CHECK",e.CREDIT_CARD="CREDIT_CARD",e.ESCROW="ESCROW",e.INTEGRATED_MERCHANT_CREDIT_CARD="INTEGRATED_MERCHANT_CREDIT_CARD",e.LOAN_CHECK="LOAN_CHECK",e.MONEY_ORDER="MONEY_ORDER",e.PAISA_PAY="PAISA_PAY",e.PAISA_PAY_ESCROW="PAISA_PAY_ESCROW",e.PAISA_PAY_ESCROW_EMI="PAISA_PAY_ESCROW_EMI",e.PAYPAL="PAYPAL",e.PERSONAL_CHECK="PERSONAL_CHECK",e.OTHER="OTHER"}(wn=wn||(wn={})),function(e){e.PAYPAL_EMAIL="PAYPAL_EMAIL"}(kn=kn||(kn={})),function(e){e.AD="AD",e.AE="AE",e.AF="AF",e.AG="AG",e.AI="AI",e.AL="AL",e.AM="AM",e.AN="AN",e.AO="AO",e.AQ="AQ",e.AR="AR",e.AS="AS",e.AT="AT",e.AU="AU",e.AW="AW",e.AX="AX",e.AZ="AZ",e.BA="BA",e.BB="BB",e.BD="BD",e.BE="BE",e.BF="BF",e.BG="BG",e.BH="BH",e.BI="BI",e.BJ="BJ",e.BL="BL",e.BM="BM",e.BN="BN",e.BO="BO",e.BQ="BQ",e.BR="BR",e.BS="BS",e.BT="BT",e.BV="BV",e.BW="BW",e.BY="BY",e.BZ="BZ",e.CA="CA",e.CC="CC",e.CD="CD",e.CF="CF",e.CG="CG",e.CH="CH",e.CI="CI",e.CK="CK",e.CL="CL",e.CM="CM",e.CN="CN",e.CO="CO",e.CR="CR",e.CU="CU",e.CV="CV",e.CW="CW",e.CX="CX",e.CY="CY",e.CZ="CZ",e.DE="DE",e.DJ="DJ",e.DK="DK",e.DM="DM",e.DO="DO",e.DZ="DZ",e.EC="EC",e.EE="EE",e.EG="EG",e.EH="EH",e.ER="ER",e.ES="ES",e.ET="ET",e.FI="FI",e.FJ="FJ",e.FK="FK",e.FM="FM",e.FO="FO",e.FR="FR",e.GA="GA",e.GB="GB",e.GD="GD",e.GE="GE",e.GF="GF",e.GG="GG",e.GH="GH",e.GI="GI",e.GL="GL",e.GM="GM",e.GN="GN",e.GP="GP",e.GQ="GQ",e.GR="GR",e.GS="GS",e.GT="GT",e.GU="GU",e.GW="GW",e.GY="GY",e.HK="HK",e.HM="HM",e.HN="HN",e.HR="HR",e.HT="HT",e.HU="HU",e.ID="ID",e.IE="IE",e.IL="IL",e.IM="IM",e.IN="IN",e.IO="IO",e.IQ="IQ",e.IR="IR",e.IS="IS",e.IT="IT",e.JE="JE",e.JM="JM",e.JO="JO",e.JP="JP",e.KE="KE",e.KG="KG",e.KH="KH",e.KI="KI",e.KM="KM",e.KN="KN",e.KP="KP",e.KR="KR",e.KW="KW",e.KY="KY",e.KZ="KZ",e.LA="LA",e.LB="LB",e.LC="LC",e.LI="LI",e.LK="LK",e.LR="LR",e.LS="LS",e.LT="LT",e.LU="LU",e.LV="LV",e.LY="LY",e.MA="MA",e.MC="MC",e.MD="MD",e.ME="ME",e.MF="MF",e.MG="MG",e.MH="MH",e.MK="MK",e.ML="ML",e.MM="MM",e.MN="MN",e.MO="MO",e.MP="MP",e.MQ="MQ",e.MR="MR",e.MS="MS",e.MT="MT",e.MU="MU",e.MV="MV",e.MW="MW",e.MX="MX",e.MY="MY",e.MZ="MZ",e.NA="NA",e.NC="NC",e.NE="NE",e.NF="NF",e.NG="NG",e.NI="NI",e.NL="NL",e.NO="NO",e.NP="NP",e.NR="NR",e.NU="NU",e.NZ="NZ",e.OM="OM",e.PA="PA",e.PE="PE",e.PF="PF",e.PG="PG",e.PH="PH",e.PK="PK",e.PL="PL",e.PM="PM",e.PN="PN",e.PR="PR",e.PS="PS",e.PT="PT",e.PW="PW",e.PY="PY",e.QA="QA",e.RE="RE",e.RO="RO",e.RS="RS",e.RU="RU",e.RW="RW",e.SA="SA",e.SB="SB",e.SC="SC",e.SD="SD",e.SE="SE",e.SG="SG",e.SH="SH",e.SI="SI",e.SJ="SJ",e.SK="SK",e.SL="SL",e.SM="SM",e.SN="SN",e.SO="SO",e.SR="SR",e.ST="ST",e.SV="SV",e.SX="SX",e.SY="SY",e.SZ="SZ",e.TC="TC",e.TD="TD",e.TF="TF",e.TG="TG",e.TH="TH",e.TJ="TJ",e.TK="TK",e.TL="TL",e.TM="TM",e.TN="TN",e.TO="TO",e.TR="TR",e.TT="TT",e.TV="TV",e.TW="TW",e.TZ="TZ",e.UA="UA",e.UG="UG",e.UM="UM",e.US="US",e.UY="UY",e.UZ="UZ",e.VA="VA",e.VC="VC",e.VE="VE",e.VG="VG",e.VI="VI",e.VN="VN",e.VU="VU",e.WF="WF",e.WS="WS",e.YE="YE",e.YT="YT",e.ZA="ZA",e.ZM="ZM",e.ZW="ZW"}(Gn=Gn||(Gn={})),function(e){e.AED="AED",e.AFN="AFN",e.ALL="ALL",e.AMD="AMD",e.ANG="ANG",e.AOA="AOA",e.ARS="ARS",e.AUD="AUD",e.AWG="AWG",e.AZN="AZN",e.BAM="BAM",e.BBD="BBD",e.BDT="BDT",e.BGN="BGN",e.BHD="BHD",e.BIF="BIF",e.BMD="BMD",e.BND="BND",e.BOB="BOB",e.BRL="BRL",e.BSD="BSD",e.BTN="BTN",e.BWP="BWP",e.BYR="BYR",e.BZD="BZD",e.CAD="CAD",e.CDF="CDF",e.CHF="CHF",e.CLP="CLP",e.CNY="CNY",e.COP="COP",e.CRC="CRC",e.CUP="CUP",e.CVE="CVE",e.CZK="CZK",e.DJF="DJF",e.DKK="DKK",e.DOP="DOP",e.DZD="DZD",e.EGP="EGP",e.ERN="ERN",e.ETB="ETB",e.EUR="EUR",e.FJD="FJD",e.FKP="FKP",e.GBP="GBP",e.GEL="GEL",e.GHS="GHS",e.GIP="GIP",e.GMD="GMD",e.GNF="GNF",e.GTQ="GTQ",e.GYD="GYD",e.HKD="HKD",e.HNL="HNL",e.HRK="HRK",e.HTG="HTG",e.HUF="HUF",e.IDR="IDR",e.ILS="ILS",e.INR="INR",e.IQD="IQD",e.IRR="IRR",e.ISK="ISK",e.JMD="JMD",e.JOD="JOD",e.JPY="JPY",e.KES="KES",e.KGS="KGS",e.KHR="KHR",e.KMF="KMF",e.KPW="KPW",e.KRW="KRW",e.KWD="KWD",e.KYD="KYD",e.KZT="KZT",e.LAK="LAK",e.LBP="LBP",e.LKR="LKR",e.LRD="LRD",e.LSL="LSL",e.LTL="LTL",e.LYD="LYD",e.MAD="MAD",e.MDL="MDL",e.MGA="MGA",e.MKD="MKD",e.MMK="MMK",e.MNT="MNT",e.MOP="MOP",e.MRO="MRO",e.MUR="MUR",e.MVR="MVR",e.MWK="MWK",e.MXN="MXN",e.MYR="MYR",e.MZN="MZN",e.NAD="NAD",e.NGN="NGN",e.NIO="NIO",e.NOK="NOK",e.NPR="NPR",e.NZD="NZD",e.OMR="OMR",e.PAB="PAB",e.PEN="PEN",e.PGK="PGK",e.PHP="PHP",e.PKR="PKR",e.PLN="PLN",e.PYG="PYG",e.QAR="QAR",e.RON="RON",e.RSD="RSD",e.RUB="RUB",e.RWF="RWF",e.SAR="SAR",e.SBD="SBD",e.SCR="SCR",e.SDG="SDG",e.SEK="SEK",e.SGD="SGD",e.SHP="SHP",e.SLL="SLL",e.SOS="SOS",e.SRD="SRD",e.STD="STD",e.SYP="SYP",e.SZL="SZL",e.THB="THB",e.TJS="TJS",e.TMT="TMT",e.TND="TND",e.TOP="TOP",e.TRY="TRY",e.TTD="TTD",e.TWD="TWD",e.TZS="TZS",e.UAH="UAH",e.UGX="UGX",e.USD="USD",e.UYU="UYU",e.UZS="UZS",e.VEF="VEF",e.VND="VND",e.VUV="VUV",e.WST="WST",e.XAF="XAF",e.XCD="XCD",e.XOF="XOF",e.XPF="XPF",e.YER="YER",e.ZAR="ZAR",e.ZMW="ZMW",e.ZWL="ZWL"}(Yn=Yn||(Yn={})),function(e){e.NEW="NEW",e.LIKE_NEW="LIKE_NEW",e.NEW_OTHER="NEW_OTHER",e.NEW_WITH_DEFECTS="NEW_WITH_DEFECTS",e.MANUFACTURER_REFURBISHED="MANUFACTURER_REFURBISHED",e.SELLER_REFURBISHED="SELLER_REFURBISHED",e.USED_EXCELLENT="USED_EXCELLENT",e.USED_VERY_GOOD="USED_VERY_GOOD",e.USED_GOOD="USED_GOOD",e.USED_ACCEPTABLE="USED_ACCEPTABLE",e.FOR_PARTS_OR_NOT_WORKING="FOR_PARTS_OR_NOT_WORKING"}(Hn=Hn||(Hn={})),function(e){e.en_US="en_US",e.en_CA="en_CA",e.fr_CA="fr_CA",e.en_GB="en_GB",e.en_AU="en_AU",e.en_IN="en_IN",e.de_AT="de_AT",e.fr_BE="fr_BE",e.fr_FR="fr_FR",e.de_DE="de_DE",e.it_IT="it_IT",e.nl_BE="nl_BE",e.nl_NL="nl_NL",e.es_ES="es_ES",e.de_CH="de_CH",e.fi_FI="fi_FI",e.zh_HK="zh_HK",e.hu_HU="hu_HU",e.en_PH="en_PH",e.pl_PL="pl_PL",e.pt_PT="pt_PT",e.ru_RU="ru_RU",e.en_SG="en_SG",e.en_IE="en_IE",e.en_MY="en_MY"}($n=$n||($n={})),function(e){e.de_AT="de-AT",e.de_CH="de-CH",e.de_DE="de-DE",e.en_AU="en-AU",e.en_CA="en-CA",e.en_GB="en-GB",e.en_IE="en-IE",e.en_PH="en-PH",e.en_US="en-US",e.es_ES="es-ES",e.fr_BE="fr-BE",e.fr_CA="fr-CA",e.fr_FR="fr-FR",e.it_IT="it-IT",e.nl_BE="nl-BE",e.nl_NL="nl-NL",e.pl_PL="pl-PL",e.th_TH="th-TH",e.zh_HK="zh-HK",e.zh_TW="zh-TW"}(jn=jn||(jn={})),function(e){e.EBAY_US="EBAY_US",e.EBAY_MOTORS="EBAY_MOTORS",e.EBAY_CA="EBAY_CA",e.EBAY_GB="EBAY_GB",e.EBAY_AU="EBAY_AU",e.EBAY_AT="EBAY_AT",e.EBAY_BE="EBAY_BE",e.EBAY_FR="EBAY_FR",e.EBAY_DE="EBAY_DE",e.EBAY_IT="EBAY_IT",e.EBAY_NL="EBAY_NL",e.EBAY_ES="EBAY_ES",e.EBAY_CH="EBAY_CH",e.EBAY_TW="EBAY_TW",e.EBAY_CZ="EBAY_CZ",e.EBAY_DK="EBAY_DK",e.EBAY_FI="EBAY_FI",e.EBAY_GR="EBAY_GR",e.EBAY_HK="EBAY_HK",e.EBAY_HU="EBAY_HU",e.EBAY_IN="EBAY_IN",e.EBAY_ID="EBAY_ID",e.EBAY_IE="EBAY_IE",e.EBAY_IL="EBAY_IL",e.EBAY_MY="EBAY_MY",e.EBAY_NZ="EBAY_NZ",e.EBAY_NO="EBAY_NO",e.EBAY_PH="EBAY_PH",e.EBAY_PL="EBAY_PL",e.EBAY_PT="EBAY_PT",e.EBAY_PR="EBAY_PR",e.EBAY_RU="EBAY_RU",e.EBAY_SG="EBAY_SG",e.EBAY_ZA="EBAY_ZA",e.EBAY_SE="EBAY_SE",e.EBAY_TH="EBAY_TH",e.EBAY_VN="EBAY_VN",e.EBAY_CN="EBAY_CN",e.EBAY_PE="EBAY_PE",e.EBAY_JP="EBAY_JP"}(Vn=Vn||(Vn={})),function(e){e.AUCTION="AUCTION",e.FIXED_PRICE="FIXED_PRICE"}(Kn=Kn||(Kn={})),function(e){e[e.CLICK_THROUGH_RATE=0]="CLICK_THROUGH_RATE",e[e.LISTING_IMPRESSION_STORE=1]="LISTING_IMPRESSION_STORE",e[e.LISTING_IMPRESSION_TOTAL=2]="LISTING_IMPRESSION_TOTAL",e[e.LISTING_VIEWS_SOURCE_DIRECT=3]="LISTING_VIEWS_SOURCE_DIRECT",e[e.LISTING_VIEWS_SOURCE_OFF_EBAY=4]="LISTING_VIEWS_SOURCE_OFF_EBAY",e[e.LISTING_VIEWS_SOURCE_OTHER_EBAY=5]="LISTING_VIEWS_SOURCE_OTHER_EBAY",e[e.LISTING_VIEWS_SOURCE_SEARCH_RESULTS_PAGE=6]="LISTING_VIEWS_SOURCE_SEARCH_RESULTS_PAGE",e[e.LISTING_VIEWS_SOURCE_STORE=7]="LISTING_VIEWS_SOURCE_STORE",e[e.LISTING_VIEWS_TOTAL=8]="LISTING_VIEWS_TOTAL",e[e.SALES_CONVERSION_RATE=9]="SALES_CONVERSION_RATE",e[e.TRANSACTION=10]="TRANSACTION"}(Wn=Wn||(Wn={})),function(e){e.MERCHANDISE_CREDIT="MERCHANDISE_CREDIT",e.MONEY_BACK="MONEY_BACK"}(qn=qn||(qn={})),function(e){e.EXCHANGE="EXCHANGE",e.REPLACEMENT="REPLACEMENT"}(Xn=Xn||(Xn={})),function(e){e.BUYER="BUYER",e.SELLER="SELLER"}(Jn=Jn||(Jn={})),function(e){e.COUNTRY="COUNTRY",e.COUNTRY_REGION="COUNTRY_REGION",e.STATE_OR_PROVINCE="STATE_OR_PROVINCE",e.WORLD_REGION="WORLD_REGION",e.WORLDWIDE="WORLDWIDE"}(zn=zn||(zn={})),function(e){e.BUYER_CANCEL="BUYER_CANCEL",e.SELLER_CANCEL="SELLER_CANCEL",e.ITEM_NOT_RECEIVED="ITEM_NOT_RECEIVED",e.BUYER_RETURN="BUYER_RETURN",e.ITEM_NOT_AS_DESCRIBED="ITEM_NOT_AS_DESCRIBED",e.OTHER_ADJUSTMENT="OTHER_ADJUSTMENT",e.SHIPPING_DISCOUNT="SHIPPING_DISCOUNT"}(Qn=Qn||(Qn={})),function(e){e.ADDRESS_ISSUES="ADDRESS_ISSUES",e.BUYER_ASKED_CANCEL="BUYER_ASKED_CANCEL",e.BUYER_CANCEL_OR_ADDRESS_ISSUE="BUYER_CANCEL_OR_ADDRESS_ISSUE",e.FOUND_CHEAPER_PRICE="FOUND_CHEAPER_PRICE",e.ORDER_MISTAKE="ORDER_MISTAKE",e.ORDER_UNPAID="ORDER_UNPAID",e.OTHER="OTHER",e.OUT_OF_STOCK_OR_CANNOT_FULFILL="OUT_OF_STOCK_OR_CANNOT_FULFILL",e.PRICE_TOO_HIGH="PRICE_TOO_HIGH",e.UNKNOWN="UNKNOWN",e.WONT_ARRIVE_IN_TIME="WONT_ARRIVE_IN_TIME",e.WRONG_PAYMENT_METHOD="WRONG_PAYMENT_METHOD",e.WRONG_SHIPPING_ADDRESS="WRONG_SHIPPING_ADDRESS",e.WRONG_SHIPPING_METHOD="WRONG_SHIPPING_METHOD"}(Zn=Zn||(Zn={})),function(e){e.INCH="INCH",e.FEET="FEET",e.CENTIMETER="CENTIMETER",e.METER="METER"}(eo=eo||(eo={})),function(e){e.POUND="POUND",e.KILOGRAM="KILOGRAM",e.OUNCE="OUNCE",e.GRAM="GRAM"}(to=to||(to={})),function(e){e.LETTER="LETTER",e.BULKY_GOODS="BULKY_GOODS",e.CARAVAN="CARAVAN",e.CARS="CARS",e.EUROPALLET="EUROPALLET",e.EXPANDABLE_TOUGH_BAGS="EXPANDABLE_TOUGH_BAGS",e.EXTRA_LARGE_PACK="EXTRA_LARGE_PACK",e.FURNITURE="FURNITURE",e.INDUSTRY_VEHICLES="INDUSTRY_VEHICLES",e.LARGE_CANADA_POSTBOX="LARGE_CANADA_POSTBOX",e.LARGE_CANADA_POST_BUBBLE_MAILER="LARGE_CANADA_POST_BUBBLE_MAILER",e.LARGE_ENVELOPE="LARGE_ENVELOPE",e.MAILING_BOX="MAILING_BOX",e.MEDIUM_CANADA_POST_BOX="MEDIUM_CANADA_POST_BOX",e.MEDIUM_CANADA_POST_BUBBLE_MAILER="MEDIUM_CANADA_POST_BUBBLE_MAILER",e.MOTORBIKES="MOTORBIKES",e.ONE_WAY_PALLET="ONE_WAY_PALLET",e.PACKAGE_THICK_ENVELOPE="PACKAGE_THICK_ENVELOPE",e.PADDED_BAGS="PADDED_BAGS",e.PARCEL_OR_PADDED_ENVELOPE="PARCEL_OR_PADDED_ENVELOPE",e.ROLL="ROLL",e.SMALL_CANADA_POST_BOX="SMALL_CANADA_POST_BOX",e.SMALL_CANADA_POST_BUBBLE_MAILER="SMALL_CANADA_POST_BUBBLE_MAILER",e.TOUGH_BAGS="TOUGH_BAGS",e.UPS_LETTER="UPS_LETTER",e.USPS_FLAT_RATE_ENVELOPE="USPS_FLAT_RATE_ENVELOPE",e.USPS_LARGE_PACK="USPS_LARGE_PACK",e.VERY_LARGE_PACK="VERY_LARGE_PACK",e.WINE_PAK="WINE_PAK"}(ro=ro||(ro={}));var oo=Object.freeze({__proto__:null,get SiteId(){return dn},get MarketplaceId(){return En},get UserRoleFilter(){return fn},get InquirySearchFieldGroup(){return _n},get CaseStatusFilter(){return hn},get CaseSearchFieldGroup(){return gn},get InquiryStatusFilter(){return mn},get ShippingCarrier(){return Rn},get ReturnReason(){return An},get RequestType(){return yn},get ReturnType(){return In},get GetReturnFieldGroupEnum(){return Tn},get EscalateReason(){return Sn},get Decision(){return Nn},get CategoryType(){return On},get ReturnCountFilter(){return Cn},get ReturnState(){return Pn},get FilePurpose(){return bn},get RefundFeeType(){return Dn},get ActivityOption(){return Un},get StoreType(){return Ln},get TimeDurationUnit(){return Mn},get ShippingOptionType(){return Bn},get ShippingCostType(){return Fn},get PaymentsProgramType(){return vn},get PaymentsProgramStatus(){return xn},get PaymentMethodType(){return wn},get RecipientAccountReferenceType(){return kn},get CountryCode(){return Gn},get CurrencyCode(){return Yn},get Condition(){return Hn},get Locale(){return $n},get ContentLanguage(){return jn},get Marketplace(){return Vn},get FormatType(){return Kn},get Metric(){return Wn},get RefundMethod(){return qn},get ReturnMethod(){return Xn},get ReturnShippingCostPayer(){return Jn},get RegionType(){return zn},get ReasonForRefund(){return Qn},get CancelReason(){return Zn},get LengthUnitOfMeasure(){return eo},get WeightUnitOfMeasure(){return to},get PackageType(){return ro}}),io=Object.freeze({__proto__:null});const so={sandbox:!1,autoRefreshToken:!0,siteId:dn.EBAY_US,marketplaceId:En.EBAY_US,acceptLanguage:$n.en_US,contentLanguage:jn.en_US};class eBayApi extends Api{static fromEnv(e){if(!process.env.EBAY_APP_ID)throw new ApiEnvError("EBAY_APP_ID");if(!process.env.EBAY_CERT_ID)throw new ApiEnvError("EBAY_CERT_ID");return new eBayApi({appId:process.env.EBAY_APP_ID,certId:process.env.EBAY_CERT_ID,devId:process.env.EBAY_DEV_ID,authToken:process.env.EBAY_AUTH_TOKEN,siteId:process.env.EBAY_SITE_ID?parseInt(process.env.EBAY_SITE_ID,10):dn.EBAY_US,marketplaceId:process.env.EBAY_MARKETPLACE_ID&&process.env.EBAY_MARKETPLACE_ID in En?En[process.env.EBAY_MARKETPLACE_ID]:En.EBAY_US,ruName:process.env.EBAY_RU_NAME,sandbox:"true"===process.env.EBAY_SANDBOX},e)}constructor(e,t){super({...so,...e},t),this.factory=new ApiFactory(this.config,this.req,this.auth),this.authNAuth=this.auth.authNAuth,this.OAuth2=this.auth.OAuth2,this.oAuth2=this.OAuth2}get buy(){return this._buy||(this._buy=this.factory.createBuyApi())}get commerce(){return this._commerce||(this._commerce=this.factory.createCommerceApi())}get developer(){return this._developer||(this._developer=this.factory.createDeveloperApi())}get postOrder(){return this._postOrder||(this._postOrder=this.factory.createPostOrderApi())}get sell(){return this._sell||(this._sell=this.factory.createSellApi())}get trading(){return this._trading||(this._trading=this.factory.createTradingApi())}get finding(){return this._finding||(this._finding=this.factory.createFindingApi())}get shopping(){return this._shopping||(this._shopping=this.factory.createShoppingApi())}get merchandising(){return this._merchandising||(this._merchandising=this.factory.createMerchandisingApi())}get clientAlerts(){return this._clientAlerts||(this._clientAlerts=this.factory.createClientAlertsApi())}}eBayApi.SiteId=dn,eBayApi.MarketplaceId=En,eBayApi.ContentLanguage=jn,eBayApi.Locale=$n;export{jn as ContentLanguage,$n as Locale,En as MarketplaceId,dn as SiteId,eBayApi as default,eBayApi,oo as enums,$r as errors,io as types};
1
+ function bind$2(e,t){return function wrap(){return e.apply(t,arguments)}}const{toString:e}=Object.prototype,{getPrototypeOf:t}=Object,r=(n=Object.create(null),t=>{const r=e.call(t);return n[r]||(n[r]=r.slice(8,-1).toLowerCase())});var n;const kindOfTest=e=>(e=e.toLowerCase(),t=>r(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray:o}=Array,i=typeOfTest("undefined");const s=kindOfTest("ArrayBuffer");const c=typeOfTest("string"),u=typeOfTest("function"),l=typeOfTest("number"),isObject=e=>null!==e&&"object"==typeof e,isPlainObject=e=>{if("object"!==r(e))return!1;const n=t(e);return!(null!==n&&n!==Object.prototype&&null!==Object.getPrototypeOf(n)||Symbol.toStringTag in e||Symbol.iterator in e)},p=kindOfTest("Date"),d=kindOfTest("File"),E=kindOfTest("Blob"),f=kindOfTest("FileList"),_=kindOfTest("URLSearchParams");function forEach(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),o(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(n=0;n<i;n++)s=o[n],t.call(null,e[s],s,e)}}function findKey(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const h="undefined"==typeof self?"undefined"==typeof global?window:global:self,isContextDefined=e=>!i(e)&&e!==h;const g=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&t(Uint8Array)),m=kindOfTest("HTMLFormElement"),R=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),A=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};forEach(r,((r,o)=>{!1!==t(r,o,e)&&(n[o]=r)})),Object.defineProperties(e,n)};var y={isArray:o,isArrayBuffer:s,isBuffer:function isBuffer$1(e){return null!==e&&!i(e)&&null!==e.constructor&&!i(e.constructor)&&u(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:t=>{const r="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||e.call(t)===r||u(t.toString)&&t.toString()===r)},isArrayBufferView:function isArrayBufferView(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&s(e.buffer),t},isString:c,isNumber:l,isBoolean:e=>!0===e||!1===e,isObject:isObject,isPlainObject:isPlainObject,isUndefined:i,isDate:p,isFile:d,isBlob:E,isRegExp:A,isFunction:u,isStream:e=>isObject(e)&&u(e.pipe),isURLSearchParams:_,isTypedArray:g,isFileList:f,forEach:forEach,merge:function merge$1(){const{caseless:e}=isContextDefined(this)&&this||{},t={},assignValue=(r,n)=>{const i=e&&findKey(t,n)||n;isPlainObject(t[i])&&isPlainObject(r)?t[i]=merge$1(t[i],r):isPlainObject(r)?t[i]=merge$1({},r):o(r)?t[i]=r.slice():t[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&forEach(arguments[e],assignValue);return t},extend:(e,t,r,{allOwnKeys:n}={})=>(forEach(t,((t,n)=>{r&&u(t)?e[n]=bind$2(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,r,n,o)=>{let i,s,c;const u={};if(r=r||{},null==e)return r;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)c=i[s],o&&!o(c,e,r)||u[c]||(r[c]=e[c],u[c]=!0);e=!1!==n&&t(e)}while(e&&(!n||n(e,r))&&e!==Object.prototype);return r},kindOf:r,kindOfTest:kindOfTest,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(o(e))return e;let t=e.length;if(!l(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:m,hasOwnProperty:R,hasOwnProp:R,reduceDescriptors:reduceDescriptors,freezeMethods:e=>{reduceDescriptors(e,((t,r)=>{if(u(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];u(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},define=e=>{e.forEach((e=>{r[e]=!0}))};return o(e)?define(e):define(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,(function replacer(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:findKey,global:h,isContextDefined:isContextDefined,toJSONObject:e=>{const t=new Array(10),visit=(e,r)=>{if(isObject(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const n=o(e)?[]:{};return forEach(e,((e,t)=>{const o=visit(e,r+1);!i(o)&&(n[t]=o)})),t[r]=void 0,n}}return e};return visit(e,0)}};function AxiosError(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}y.inherits(AxiosError,Error,{toJSON:function toJSON(){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:y.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const I=AxiosError.prototype,T={};function getAugmentedNamespace(e){var t=e.default;if("function"==typeof t){var r=function a(){if(this instanceof a){var e=[null];e.push.apply(e,arguments);var r=Function.bind.apply(t,e);return new r}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{T[e]={value:e}})),Object.defineProperties(AxiosError,T),Object.defineProperty(I,"isAxiosError",{value:!0}),AxiosError.from=(e,t,r,n,o,i)=>{const s=Object.create(I);return y.toFlatObject(e,s,(function filter(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),AxiosError.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};var S="object"==typeof self?self.FormData:window.FormData;function isVisitable(e){return y.isPlainObject(e)||y.isArray(e)}function removeBrackets(e){return y.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,r){return e?e.concat(t).map((function each(e,t){return e=removeBrackets(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const N=y.toFlatObject(y,{},null,(function filter(e){return/^is[A-Z]/.test(e)}));function toFormData(e,t,r){if(!y.isObject(e))throw new TypeError("target must be an object");t=t||new(S||FormData);const n=(r=y.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function defined(e,t){return!y.isUndefined(t[e])}))).metaTokens,o=r.visitor||defaultVisitor,i=r.dots,s=r.indexes,c=(r.Blob||"undefined"!=typeof Blob&&Blob)&&function isSpecCompliant(e){return e&&y.isFunction(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator]}(t);if(!y.isFunction(o))throw new TypeError("visitor must be a function");function convertValue(e){if(null===e)return"";if(y.isDate(e))return e.toISOString();if(!c&&y.isBlob(e))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return y.isArrayBuffer(e)||y.isTypedArray(e)?c&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function defaultVisitor(e,r,o){let c=e;if(e&&!o&&"object"==typeof e)if(y.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(y.isArray(e)&&function isFlatArray(e){return y.isArray(e)&&!e.some(isVisitable)}(e)||y.isFileList(e)||y.endsWith(r,"[]")&&(c=y.toArray(e)))return r=removeBrackets(r),c.forEach((function each(e,n){!y.isUndefined(e)&&null!==e&&t.append(!0===s?renderKey([r],n,i):null===s?r:r+"[]",convertValue(e))})),!1;return!!isVisitable(e)||(t.append(renderKey(o,r,i),convertValue(e)),!1)}const u=[],l=Object.assign(N,{defaultVisitor:defaultVisitor,convertValue:convertValue,isVisitable:isVisitable});if(!y.isObject(e))throw new TypeError("data must be an object");return function build(e,r){if(!y.isUndefined(e)){if(-1!==u.indexOf(e))throw Error("Circular reference detected in "+r.join("."));u.push(e),y.forEach(e,(function each(e,n){!0===(!(y.isUndefined(e)||null===e)&&o.call(t,e,y.isString(n)?n.trim():n,r,l))&&build(e,r?r.concat(n):[n])})),u.pop()}}(e),t}function encode$2(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function replacer(e){return t[e]}))}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData(e,this,t)}const C=AxiosURLSearchParams.prototype;function encode$1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,r){if(!t)return e;const n=r&&r.encode||encode$1,o=r&&r.serialize;let i;if(i=o?o(t,r):y.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}C.append=function append(e,t){this._pairs.push([e,t])},C.toString=function toString(e){const t=e?function(t){return e.call(this,t,encode$2)}:encode$2;return this._pairs.map((function each(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var O=class InterceptorManager{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){y.forEach(this.handlers,(function forEachHandler(t){null!==t&&e(t)}))}},P={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},b="undefined"!=typeof URLSearchParams?URLSearchParams:AxiosURLSearchParams,D=FormData;const U=(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),L="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var M={isBrowser:!0,classes:{URLSearchParams:b,FormData:D,Blob:Blob},isStandardBrowserEnv:U,isStandardBrowserWebWorkerEnv:L,protocols:["http","https","file","blob","url","data"]};function formDataToJSON(e){function buildPath(e,t,r,n){let o=e[n++];const i=Number.isFinite(+o),s=n>=e.length;if(o=!o&&y.isArray(r)?r.length:o,s)return y.hasOwnProp(r,o)?r[o]=[r[o],t]:r[o]=t,!i;r[o]&&y.isObject(r[o])||(r[o]=[]);return buildPath(e,t,r[o],n)&&y.isArray(r[o])&&(r[o]=function arrayToObject$1(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(r[o])),!i}if(y.isFormData(e)&&y.isFunction(e.entries)){const t={};return y.forEachEntry(e,((e,r)=>{buildPath(function parsePropPath(e){return y.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,t,0)})),t}return null}const B={"Content-Type":void 0};const F={transitional:P,adapter:["xhr","http"],transformRequest:[function transformRequest(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=y.isObject(e);o&&y.isHTMLForm(e)&&(e=new FormData(e));if(y.isFormData(e))return n&&n?JSON.stringify(formDataToJSON(e)):e;if(y.isArrayBuffer(e)||y.isBuffer(e)||y.isStream(e)||y.isFile(e)||y.isBlob(e))return e;if(y.isArrayBufferView(e))return e.buffer;if(y.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function toURLEncodedForm(e,t){return toFormData(e,new M.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return M.isNode&&y.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=y.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return toFormData(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function stringifySafely(e,t,r){if(y.isString(e))try{return(t||JSON.parse)(e),y.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function transformResponse(e){const t=this.transitional||F.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&y.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw AxiosError.from(e,AxiosError.ERR_BAD_RESPONSE,this,null,this.response);throw 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 validateStatus(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};y.forEach(["delete","get","head"],(function forEachMethodNoData(e){F.headers[e]={}})),y.forEach(["post","put","patch"],(function forEachMethodWithData(e){F.headers[e]=y.merge(B)}));var v=F;const x=y.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"]);const w=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:y.isArray(e)?e.map(normalizeValue):String(e)}function matchHeaderValue(e,t,r,n){return y.isFunction(n)?n.call(this,t,r):y.isString(t)?y.isString(n)?-1!==t.indexOf(n):y.isRegExp(n)?n.test(t):void 0:void 0}class AxiosHeaders{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function setHeader(e,t,r){const o=normalizeHeader(t);if(!o)throw new Error("header name must be a non-empty string");const i=y.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=normalizeValue(e))}const setHeaders=(e,t)=>y.forEach(e,((e,r)=>setHeader(e,r,t)));return y.isPlainObject(e)||e instanceof this.constructor?setHeaders(e,t):y.isString(e)&&(e=e.trim())&&!function isValidHeaderName(e){return/^[-_a-zA-Z]+$/.test(e.trim())}(e)?setHeaders((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function parser(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&x[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&setHeader(t,e,r),this}get(e,t){if(e=normalizeHeader(e)){const r=y.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function parseTokens(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(y.isFunction(t))return t.call(this,e,r);if(y.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e)){const r=y.findKey(this,e);return!(!r||t&&!matchHeaderValue(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function deleteHeader(e){if(e=normalizeHeader(e)){const o=y.findKey(r,e);!o||t&&!matchHeaderValue(0,r[o],o,t)||(delete r[o],n=!0)}}return y.isArray(e)?e.forEach(deleteHeader):deleteHeader(e),n}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(e){const t=this,r={};return y.forEach(this,((n,o)=>{const i=y.findKey(r,o);if(i)return t[i]=normalizeValue(n),void delete t[o];const s=e?function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();s!==o&&delete t[o],t[s]=normalizeValue(n),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return y.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&y.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[w]=this[w]={accessors:{}}).accessors,r=this.prototype;function defineAccessor(e){const n=normalizeHeader(e);t[n]||(!function buildAccessors(e,t){const r=y.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return y.isArray(e)?e.forEach(defineAccessor):defineAccessor(e),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),y.freezeMethods(AxiosHeaders.prototype),y.freezeMethods(AxiosHeaders);var k=AxiosHeaders;function transformData(e,t){const r=this||v,n=t||r,o=k.from(n.headers);let i=n.data;return y.forEach(e,(function transform(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function isCancel(e){return!(!e||!e.__CANCEL__)}function CanceledError(e,t,r){AxiosError.call(this,null==e?"canceled":e,AxiosError.ERR_CANCELED,t,r),this.name="CanceledError"}y.inherits(CanceledError,AxiosError,{__CANCEL__:!0});var G=M.isStandardBrowserEnv?function standardBrowserEnv(){return{write:function write(e,t,r,n,o,i){const s=[];s.push(e+"="+encodeURIComponent(t)),y.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),y.isString(n)&&s.push("path="+n),y.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function remove(e){this.write(e,"",Date.now()-864e5)}}}():{write:function write(){},read:function read(){return null},remove:function remove(){}};function buildFullPath(e,t){return e&&!function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t)?function combineURLs(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Y=M.isStandardBrowserEnv?function standardBrowserEnv(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function resolveURL(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=resolveURL(window.location.href),function isURLSameOrigin(e){const t=y.isString(e)?resolveURL(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function isURLSameOrigin(){return!0};function progressEventReducer(e,t){let r=0;const n=function speedometer(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function push(c){const u=Date.now(),l=n[s];o||(o=u),r[i]=c,n[i]=u;let p=s,d=0;for(;p!==i;)d+=r[p++],p%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-o<t)return;const E=l&&u-l;return E?Math.round(1e3*d/E):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,c=i-r,u=n(c);r=i;const l={loaded:i,total:s,progress:s?i/s:void 0,bytes:c,rate:u||void 0,estimated:u&&s&&i<=s?(s-i)/u:void 0,event:o};l[t?"download":"upload"]=!0,e(l)}}const H={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function dispatchXhrRequest(t,r){let n=e.data;const o=k.from(e.headers).normalize(),i=e.responseType;let s;function done(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}y.isFormData(n)&&(M.isStandardBrowserEnv||M.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let c=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+r))}const u=buildFullPath(e.baseURL,e.url);function onloadend(){if(!c)return;const n=k.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function settle(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new AxiosError("Request failed with status code "+r.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function _resolve(e){t(e),done()}),(function _reject(e){r(e),done()}),{data:i&&"text"!==i&&"json"!==i?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:n,config:e,request:c}),c=null}if(c.open(e.method.toUpperCase(),buildURL(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=onloadend:c.onreadystatechange=function handleLoad(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(onloadend)},c.onabort=function handleAbort(){c&&(r(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,c)),c=null)},c.onerror=function handleError(){r(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,c)),c=null},c.ontimeout=function handleTimeout(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||P;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new AxiosError(t,n.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,c)),c=null},M.isStandardBrowserEnv){const t=(e.withCredentials||Y(u))&&e.xsrfCookieName&&G.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===n&&o.setContentType(null),"setRequestHeader"in c&&y.forEach(o.toJSON(),(function setRequestHeader(e,t){c.setRequestHeader(t,e)})),y.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),i&&"json"!==i&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",progressEventReducer(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",progressEventReducer(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{c&&(r(!t||t.type?new CanceledError(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const l=function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);l&&-1===M.protocols.indexOf(l)?r(new AxiosError("Unsupported protocol "+l+":",AxiosError.ERR_BAD_REQUEST,e)):c.send(n||null)}))}};y.forEach(H,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var adapters_getAdapter=e=>{e=y.isArray(e)?e:[e];const{length:t}=e;let r,n;for(let o=0;o<t&&(r=e[o],!(n=y.isString(r)?H[r.toLowerCase()]:r));o++);if(!n){if(!1===n)throw new AxiosError(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(y.hasOwnProp(H,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`)}if(!y.isFunction(n))throw new TypeError("adapter is not a function");return n};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError(null,e)}function dispatchRequest(e){throwIfCancellationRequested(e),e.headers=k.from(e.headers),e.data=transformData.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return adapters_getAdapter(e.adapter||v.adapter)(e).then((function onAdapterResolution(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,e.transformResponse,t),t.headers=k.from(t.headers),t}),(function onAdapterRejection(t){return isCancel(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData.call(e,e.transformResponse,t.response),t.response.headers=k.from(t.response.headers))),Promise.reject(t)}))}const headersToObject=e=>e instanceof k?e.toJSON():e;function mergeConfig(e,t){t=t||{};const r={};function getMergedValue(e,t,r){return y.isPlainObject(e)&&y.isPlainObject(t)?y.merge.call({caseless:r},e,t):y.isPlainObject(t)?y.merge({},t):y.isArray(t)?t.slice():t}function mergeDeepProperties(e,t,r){return y.isUndefined(t)?y.isUndefined(e)?void 0:getMergedValue(void 0,e,r):getMergedValue(e,t,r)}function valueFromConfig2(e,t){if(!y.isUndefined(t))return getMergedValue(void 0,t)}function defaultToConfig2(e,t){return y.isUndefined(t)?y.isUndefined(e)?void 0:getMergedValue(void 0,e):getMergedValue(void 0,t)}function mergeDirectKeys(r,n,o){return o in t?getMergedValue(r,n):o in e?getMergedValue(void 0,r):void 0}const n={url:valueFromConfig2,method:valueFromConfig2,data:valueFromConfig2,baseURL:defaultToConfig2,transformRequest:defaultToConfig2,transformResponse:defaultToConfig2,paramsSerializer:defaultToConfig2,timeout:defaultToConfig2,timeoutMessage:defaultToConfig2,withCredentials:defaultToConfig2,adapter:defaultToConfig2,responseType:defaultToConfig2,xsrfCookieName:defaultToConfig2,xsrfHeaderName:defaultToConfig2,onUploadProgress:defaultToConfig2,onDownloadProgress:defaultToConfig2,decompress:defaultToConfig2,maxContentLength:defaultToConfig2,maxBodyLength:defaultToConfig2,beforeRedirect:defaultToConfig2,transport:defaultToConfig2,httpAgent:defaultToConfig2,httpsAgent:defaultToConfig2,cancelToken:defaultToConfig2,socketPath:defaultToConfig2,responseEncoding:defaultToConfig2,validateStatus:mergeDirectKeys,headers:(e,t)=>mergeDeepProperties(headersToObject(e),headersToObject(t),!0)};return y.forEach(Object.keys(e).concat(Object.keys(t)),(function computeConfigValue(o){const i=n[o]||mergeDeepProperties,s=i(e[o],t[o],o);y.isUndefined(s)&&i!==mergeDirectKeys||(r[o]=s)})),r}const $="1.2.1",j={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{j[e]=function validator(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const V={};j.transitional=function transitional(e,t,r){function formatMessage(e,t){return"[Axios v1.2.1] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,n,o)=>{if(!1===e)throw new AxiosError(formatMessage(n," has been removed"+(t?" in "+t:"")),AxiosError.ERR_DEPRECATED);return t&&!V[n]&&(V[n]=!0,console.warn(formatMessage(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,o)}};var K={assertOptions:function assertOptions(e,t,r){if("object"!=typeof e)throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const t=e[i],r=void 0===t||s(t,i,e);if(!0!==r)throw new AxiosError("option "+i+" must be "+r,AxiosError.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new AxiosError("Unknown option "+i,AxiosError.ERR_BAD_OPTION)}},validators:j};const W=K.validators;class Axios{constructor(e){this.defaults=e,this.interceptors={request:new O,response:new O}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=mergeConfig(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;let i;void 0!==r&&K.assertOptions(r,{silentJSONParsing:W.transitional(W.boolean),forcedJSONParsing:W.transitional(W.boolean),clarifyTimeoutError:W.transitional(W.boolean)},!1),void 0!==n&&K.assertOptions(n,{encode:W.function,serialize:W.function},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase(),i=o&&y.merge(o.common,o[t.method]),i&&y.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=k.concat(i,o);const s=[];let c=!0;this.interceptors.request.forEach((function unshiftRequestInterceptors(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const u=[];let l;this.interceptors.response.forEach((function pushResponseInterceptors(e){u.push(e.fulfilled,e.rejected)}));let p,d=0;if(!c){const e=[dispatchRequest.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,u),p=e.length,l=Promise.resolve(t);d<p;)l=l.then(e[d++],e[d++]);return l}p=s.length;let E=t;for(d=0;d<p;){const e=s[d++],t=s[d++];try{E=e(E)}catch(e){t.call(this,e);break}}try{l=dispatchRequest.call(this,E)}catch(e){return Promise.reject(e)}for(d=0,p=u.length;d<p;)l=l.then(u[d++],u[d++]);return l}getUri(e){return buildURL(buildFullPath((e=mergeConfig(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}y.forEach(["delete","get","head","options"],(function forEachMethodNoData(e){Axios.prototype[e]=function(t,r){return this.request(mergeConfig(r||{},{method:e,url:t,data:(r||{}).data}))}})),y.forEach(["post","put","patch"],(function forEachMethodWithData(e){function generateHTTPMethod(t){return function httpMethod(r,n,o){return this.request(mergeConfig(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Axios.prototype[e]=generateHTTPMethod(),Axios.prototype[e+"Form"]=generateHTTPMethod(!0)}));var q=Axios;class CancelToken{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function promiseExecutor(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function reject(){r.unsubscribe(t)},n},e((function cancel(e,n,o){r.reason||(r.reason=new CanceledError(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new CancelToken((function executor(t){e=t})),cancel:e}}}var X=CancelToken;const J=function createInstance(e){const t=new q(e),r=bind$2(q.prototype.request,t);return y.extend(r,q.prototype,t,{allOwnKeys:!0}),y.extend(r,t,null,{allOwnKeys:!0}),r.create=function create(t){return createInstance(mergeConfig(e,t))},r}(v);J.Axios=q,J.CanceledError=CanceledError,J.CancelToken=X,J.isCancel=isCancel,J.VERSION=$,J.toFormData=toFormData,J.AxiosError=AxiosError,J.Cancel=J.CanceledError,J.all=function all(e){return Promise.all(e)},J.spread=function spread(e){return function wrap(t){return e.apply(null,t)}},J.isAxiosError=function isAxiosError(e){return y.isObject(e)&&!0===e.isAxiosError},J.mergeConfig=mergeConfig,J.AxiosHeaders=k,J.formToJSON=e=>formDataToJSON(y.isHTMLForm(e)?new FormData(e):e),J.default=J;var z,Q,Z=J,ee={exports:{}};function requireMs(){if(Q)return z;Q=1;var e=1e3,t=60*e,r=60*t,n=24*r,o=7*n,i=365.25*n;function plural(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}return z=function(s,c){c=c||{};var u=typeof s;if("string"===u&&s.length>0)return function parse(s){if((s=String(s)).length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(!c)return;var u=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*i;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*n;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*t;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(s);if("number"===u&&isFinite(s))return c.long?function fmtLong(o){var i=Math.abs(o);if(i>=n)return plural(o,i,n,"day");if(i>=r)return plural(o,i,r,"hour");if(i>=t)return plural(o,i,t,"minute");if(i>=e)return plural(o,i,e,"second");return o+" ms"}(s):function fmtShort(o){var i=Math.abs(o);if(i>=n)return Math.round(o/n)+"d";if(i>=r)return Math.round(o/r)+"h";if(i>=t)return Math.round(o/t)+"m";if(i>=e)return Math.round(o/e)+"s";return o+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))}}var te=function setup(e){function createDebug(e){let t,r,n,o=null;function debug(...e){if(!debug.enabled)return;const r=debug,n=Number(new Date),o=n-(t||n);r.diff=o,r.prev=t,r.curr=n,t=n,e[0]=createDebug.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,n)=>{if("%%"===t)return"%";i++;const o=createDebug.formatters[n];if("function"==typeof o){const n=e[i];t=o.call(r,n),e.splice(i,1),i--}return t})),createDebug.formatArgs.call(r,e);(r.log||createDebug.log).apply(r,e)}return debug.namespace=e,debug.useColors=createDebug.useColors(),debug.color=createDebug.selectColor(e),debug.extend=extend,debug.destroy=createDebug.destroy,Object.defineProperty(debug,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(r!==createDebug.namespaces&&(r=createDebug.namespaces,n=createDebug.enabled(e)),n),set:e=>{o=e}}),"function"==typeof createDebug.init&&createDebug.init(debug),debug}function extend(e,t){const r=createDebug(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function toNamespace(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return createDebug.debug=createDebug,createDebug.default=createDebug,createDebug.coerce=function coerce(e){if(e instanceof Error)return e.stack||e.message;return e},createDebug.disable=function disable(){const e=[...createDebug.names.map(toNamespace),...createDebug.skips.map(toNamespace).map((e=>"-"+e))].join(",");return createDebug.enable(""),e},createDebug.enable=function enable(e){let t;createDebug.save(e),createDebug.namespaces=e,createDebug.names=[],createDebug.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length;for(t=0;t<n;t++)r[t]&&("-"===(e=r[t].replace(/\*/g,".*?"))[0]?createDebug.skips.push(new RegExp("^"+e.slice(1)+"$")):createDebug.names.push(new RegExp("^"+e+"$")))},createDebug.enabled=function enabled(e){if("*"===e[e.length-1])return!0;let t,r;for(t=0,r=createDebug.skips.length;t<r;t++)if(createDebug.skips[t].test(e))return!1;for(t=0,r=createDebug.names.length;t<r;t++)if(createDebug.names[t].test(e))return!0;return!1},createDebug.humanize=requireMs(),createDebug.destroy=function destroy(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((t=>{createDebug[t]=e[t]})),createDebug.names=[],createDebug.skips=[],createDebug.formatters={},createDebug.selectColor=function selectColor(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return createDebug.colors[Math.abs(t)%createDebug.colors.length]},createDebug.enable(createDebug.load()),createDebug};!function(e,t){t.formatArgs=function formatArgs(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function save(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function load(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function useColors(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function localstorage(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=te(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(ee,ee.exports);var re,ne=ee.exports,oe="undefined"!=typeof Symbol&&Symbol,ie=function hasSymbols(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0},se="Function.prototype.bind called on incompatible ",ae=Array.prototype.slice,ce=Object.prototype.toString,ue="[object Function]",le=function bind(e){var t=this;if("function"!=typeof t||ce.call(t)!==ue)throw new TypeError(se+t);for(var r,n=ae.call(arguments,1),binder=function(){if(this instanceof r){var o=t.apply(this,n.concat(ae.call(arguments)));return Object(o)===o?o:this}return t.apply(e,n.concat(ae.call(arguments)))},o=Math.max(0,t.length-n.length),i=[],s=0;s<o;s++)i.push("$"+s);if(r=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this,arguments); }")(binder),t.prototype){var c=function Empty(){};c.prototype=t.prototype,r.prototype=new c,c.prototype=null}return r},pe=Function.prototype.bind||le,de=pe.call(Function.call,Object.prototype.hasOwnProperty),Ee=SyntaxError,fe=Function,_e=TypeError,getEvalledConstructor=function(e){try{return fe('"use strict"; return ('+e+").constructor;")()}catch(e){}},he=Object.getOwnPropertyDescriptor;if(he)try{he({},"")}catch(e){he=null}var throwTypeError=function(){throw new _e},ge=he?function(){try{return throwTypeError}catch(e){try{return he(arguments,"callee").get}catch(e){return throwTypeError}}}():throwTypeError,me=function hasNativeSymbols(){return"function"==typeof oe&&("function"==typeof Symbol&&("symbol"==typeof oe("foo")&&("symbol"==typeof Symbol("bar")&&ie())))}(),Re=Object.getPrototypeOf||function(e){return e.__proto__},Ae={},ye="undefined"==typeof Uint8Array?re:Re(Uint8Array),Ie={"%AggregateError%":"undefined"==typeof AggregateError?re:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?re:ArrayBuffer,"%ArrayIteratorPrototype%":me?Re([][Symbol.iterator]()):re,"%AsyncFromSyncIteratorPrototype%":re,"%AsyncFunction%":Ae,"%AsyncGenerator%":Ae,"%AsyncGeneratorFunction%":Ae,"%AsyncIteratorPrototype%":Ae,"%Atomics%":"undefined"==typeof Atomics?re:Atomics,"%BigInt%":"undefined"==typeof BigInt?re:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?re:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?re:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?re:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?re:FinalizationRegistry,"%Function%":fe,"%GeneratorFunction%":Ae,"%Int8Array%":"undefined"==typeof Int8Array?re:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?re:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?re:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":me?Re(Re([][Symbol.iterator]())):re,"%JSON%":"object"==typeof JSON?JSON:re,"%Map%":"undefined"==typeof Map?re:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&me?Re((new Map)[Symbol.iterator]()):re,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?re:Promise,"%Proxy%":"undefined"==typeof Proxy?re:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?re:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?re:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&me?Re((new Set)[Symbol.iterator]()):re,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?re:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":me?Re(""[Symbol.iterator]()):re,"%Symbol%":me?Symbol:re,"%SyntaxError%":Ee,"%ThrowTypeError%":ge,"%TypedArray%":ye,"%TypeError%":_e,"%Uint8Array%":"undefined"==typeof Uint8Array?re:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?re:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?re:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?re:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?re:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?re:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?re:WeakSet},Te=function doEval(e){var t;if("%AsyncFunction%"===e)t=getEvalledConstructor("async function () {}");else if("%GeneratorFunction%"===e)t=getEvalledConstructor("function* () {}");else if("%AsyncGeneratorFunction%"===e)t=getEvalledConstructor("async function* () {}");else if("%AsyncGenerator%"===e){var r=doEval("%AsyncGeneratorFunction%");r&&(t=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var n=doEval("%AsyncGenerator%");n&&(t=Re(n.prototype))}return Ie[e]=t,t},Se={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Ne=pe,Ce=de,Oe=Ne.call(Function.call,Array.prototype.concat),Pe=Ne.call(Function.apply,Array.prototype.splice),be=Ne.call(Function.call,String.prototype.replace),De=Ne.call(Function.call,String.prototype.slice),Ue=Ne.call(Function.call,RegExp.prototype.exec),Le=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Me=/\\(\\)?/g,Be=function stringToPath(e){var t=De(e,0,1),r=De(e,-1);if("%"===t&&"%"!==r)throw new Ee("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new Ee("invalid intrinsic syntax, expected opening `%`");var n=[];return be(e,Le,(function(e,t,r,o){n[n.length]=r?be(o,Me,"$1"):t||e})),n},Fe=function getBaseIntrinsic(e,t){var r,n=e;if(Ce(Se,n)&&(n="%"+(r=Se[n])[0]+"%"),Ce(Ie,n)){var o=Ie[n];if(o===Ae&&(o=Te(n)),void 0===o&&!t)throw new _e("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new Ee("intrinsic "+e+" does not exist!")},ve=function GetIntrinsic(e,t){if("string"!=typeof e||0===e.length)throw new _e("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new _e('"allowMissing" argument must be a boolean');if(null===Ue(/^%?[^%]*%?$/,e))throw new Ee("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Be(e),n=r.length>0?r[0]:"",o=Fe("%"+n+"%",t),i=o.name,s=o.value,c=!1,u=o.alias;u&&(n=u[0],Pe(r,Oe([0,1],u)));for(var l=1,p=!0;l<r.length;l+=1){var d=r[l],E=De(d,0,1),f=De(d,-1);if(('"'===E||"'"===E||"`"===E||'"'===f||"'"===f||"`"===f)&&E!==f)throw new Ee("property names with quotes must have matching quotes");if("constructor"!==d&&p||(c=!0),Ce(Ie,i="%"+(n+="."+d)+"%"))s=Ie[i];else if(null!=s){if(!(d in s)){if(!t)throw new _e("base intrinsic for "+e+" exists, but the property is not available.");return}if(he&&l+1>=r.length){var _=he(s,d);s=(p=!!_)&&"get"in _&&!("originalValue"in _.get)?_.get:s[d]}else p=Ce(s,d),s=s[d];p&&!c&&(Ie[i]=s)}}return s},xe={exports:{}};!function(e){var t=pe,r=ve,n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(o,n),s=r("%Object.getOwnPropertyDescriptor%",!0),c=r("%Object.defineProperty%",!0),u=r("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function callBind(e){var r=i(t,o,arguments);if(s&&c){var n=s(r,"length");n.configurable&&c(r,"length",{value:1+u(0,e.length-(arguments.length-1))})}return r};var l=function applyBind(){return i(t,n,arguments)};c?c(e.exports,"apply",{value:l}):e.exports.apply=l}(xe);var we=ve,ke=xe.exports,Ge=ke(we("String.prototype.indexOf")),Ye=getAugmentedNamespace(Object.freeze({__proto__:null,default:{}})),He="function"==typeof Map&&Map.prototype,$e=Object.getOwnPropertyDescriptor&&He?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,je=He&&$e&&"function"==typeof $e.get?$e.get:null,Ve=He&&Map.prototype.forEach,Ke="function"==typeof Set&&Set.prototype,We=Object.getOwnPropertyDescriptor&&Ke?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,qe=Ke&&We&&"function"==typeof We.get?We.get:null,Xe=Ke&&Set.prototype.forEach,Je="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,ze="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Qe="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,Ze=Boolean.prototype.valueOf,et=Object.prototype.toString,tt=Function.prototype.toString,rt=String.prototype.match,nt=String.prototype.slice,ot=String.prototype.replace,it=String.prototype.toUpperCase,st=String.prototype.toLowerCase,at=RegExp.prototype.test,ct=Array.prototype.concat,ut=Array.prototype.join,lt=Array.prototype.slice,pt=Math.floor,dt="function"==typeof BigInt?BigInt.prototype.valueOf:null,Et=Object.getOwnPropertySymbols,ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,_t="function"==typeof Symbol&&"object"==typeof Symbol.iterator,ht="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===_t||"symbol")?Symbol.toStringTag:null,gt=Object.prototype.propertyIsEnumerable,mt=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function addNumericSeparator(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||at.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-pt(-e):pt(e);if(n!==e){var o=String(n),i=nt.call(t,o.length+1);return ot.call(o,r,"$&_")+"."+ot.call(ot.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ot.call(t,r,"$&_")}var Rt=Ye,At=Rt.custom,yt=isSymbol(At)?At:null;function wrapQuotes(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function quote(e){return ot.call(String(e),/"/g,"&quot;")}function isArray$3(e){return!("[object Array]"!==toStr(e)||ht&&"object"==typeof e&&ht in e)}function isRegExp$1(e){return!("[object RegExp]"!==toStr(e)||ht&&"object"==typeof e&&ht in e)}function isSymbol(e){if(_t)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!ft)return!1;try{return ft.call(e),!0}catch(e){}return!1}var It=Object.prototype.hasOwnProperty||function(e){return e in this};function has$3(e,t){return It.call(e,t)}function toStr(e){return et.call(e)}function indexOf(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function inspectString(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return inspectString(nt.call(e,0,t.maxStringLength),t)+n}return wrapQuotes(ot.call(ot.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lowbyte),"single",t)}function lowbyte(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+it.call(t.toString(16))}function markBoxed(e){return"Object("+e+")"}function weakCollectionOf(e){return e+" { ? }"}function collectionOf(e,t,r,n){return e+" ("+t+") {"+(n?indentedJoin(r,n):ut.call(r,", "))+"}"}function indentedJoin(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+ut.call(e,","+r)+"\n"+t.prev}function arrObjKeys(e,t){var r=isArray$3(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=has$3(e,o)?t(e[o],e):""}var i,s="function"==typeof Et?Et(e):[];if(_t){i={};for(var c=0;c<s.length;c++)i["$"+s[c]]=s[c]}for(var u in e)has$3(e,u)&&(r&&String(Number(u))===u&&u<e.length||_t&&i["$"+u]instanceof Symbol||(at.call(/[^\w$]/,u)?n.push(t(u,e)+": "+t(e[u],e)):n.push(u+": "+t(e[u],e))));if("function"==typeof Et)for(var l=0;l<s.length;l++)gt.call(e,s[l])&&n.push("["+t(s[l])+"]: "+t(e[s[l]],e));return n}var Tt=ve,St=function callBoundIntrinsic(e,t){var r=we(e,!!t);return"function"==typeof r&&Ge(e,".prototype.")>-1?ke(r):r},Nt=function inspect_(e,t,r,n){var o=t||{};if(has$3(o,"quoteStyle")&&"single"!==o.quoteStyle&&"double"!==o.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has$3(o,"maxStringLength")&&("number"==typeof o.maxStringLength?o.maxStringLength<0&&o.maxStringLength!==1/0:null!==o.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=!has$3(o,"customInspect")||o.customInspect;if("boolean"!=typeof i&&"symbol"!==i)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has$3(o,"indent")&&null!==o.indent&&"\t"!==o.indent&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has$3(o,"numericSeparator")&&"boolean"!=typeof o.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=o.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return inspectString(e,o);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var c=String(e);return s?addNumericSeparator(e,c):c}if("bigint"==typeof e){var u=String(e)+"n";return s?addNumericSeparator(e,u):u}var l=void 0===o.depth?5:o.depth;if(void 0===r&&(r=0),r>=l&&l>0&&"object"==typeof e)return isArray$3(e)?"[Array]":"[Object]";var p=function getIndent(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=ut.call(Array(e.indent+1)," ")}return{base:r,prev:ut.call(Array(t+1),r)}}(o,r);if(void 0===n)n=[];else if(indexOf(n,e)>=0)return"[Circular]";function inspect(e,t,i){if(t&&(n=lt.call(n)).push(t),i){var s={depth:o.depth};return has$3(o,"quoteStyle")&&(s.quoteStyle=o.quoteStyle),inspect_(e,s,r+1,n)}return inspect_(e,o,r+1,n)}if("function"==typeof e&&!isRegExp$1(e)){var d=function nameOf(e){if(e.name)return e.name;var t=rt.call(tt.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(e),E=arrObjKeys(e,inspect);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(E.length>0?" { "+ut.call(E,", ")+" }":"")}if(isSymbol(e)){var f=_t?ot.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):ft.call(e);return"object"!=typeof e||_t?f:markBoxed(f)}if(function isElement(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(e)){for(var _="<"+st.call(String(e.nodeName)),h=e.attributes||[],g=0;g<h.length;g++)_+=" "+h[g].name+"="+wrapQuotes(quote(h[g].value),"double",o);return _+=">",e.childNodes&&e.childNodes.length&&(_+="..."),_+="</"+st.call(String(e.nodeName))+">"}if(isArray$3(e)){if(0===e.length)return"[]";var m=arrObjKeys(e,inspect);return p&&!function singleLineValues(e){for(var t=0;t<e.length;t++)if(indexOf(e[t],"\n")>=0)return!1;return!0}(m)?"["+indentedJoin(m,p)+"]":"[ "+ut.call(m,", ")+" ]"}if(function isError(e){return!("[object Error]"!==toStr(e)||ht&&"object"==typeof e&&ht in e)}(e)){var R=arrObjKeys(e,inspect);return"cause"in Error.prototype||!("cause"in e)||gt.call(e,"cause")?0===R.length?"["+String(e)+"]":"{ ["+String(e)+"] "+ut.call(R,", ")+" }":"{ ["+String(e)+"] "+ut.call(ct.call("[cause]: "+inspect(e.cause),R),", ")+" }"}if("object"==typeof e&&i){if(yt&&"function"==typeof e[yt]&&Rt)return Rt(e,{depth:l-r});if("symbol"!==i&&"function"==typeof e.inspect)return e.inspect()}if(function isMap(e){if(!je||!e||"object"!=typeof e)return!1;try{je.call(e);try{qe.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(e)){var A=[];return Ve.call(e,(function(t,r){A.push(inspect(r,e,!0)+" => "+inspect(t,e))})),collectionOf("Map",je.call(e),A,p)}if(function isSet(e){if(!qe||!e||"object"!=typeof e)return!1;try{qe.call(e);try{je.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(e)){var y=[];return Xe.call(e,(function(t){y.push(inspect(t,e))})),collectionOf("Set",qe.call(e),y,p)}if(function isWeakMap(e){if(!Je||!e||"object"!=typeof e)return!1;try{Je.call(e,Je);try{ze.call(e,ze)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(e))return weakCollectionOf("WeakMap");if(function isWeakSet(e){if(!ze||!e||"object"!=typeof e)return!1;try{ze.call(e,ze);try{Je.call(e,Je)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(e))return weakCollectionOf("WeakSet");if(function isWeakRef(e){if(!Qe||!e||"object"!=typeof e)return!1;try{return Qe.call(e),!0}catch(e){}return!1}(e))return weakCollectionOf("WeakRef");if(function isNumber(e){return!("[object Number]"!==toStr(e)||ht&&"object"==typeof e&&ht in e)}(e))return markBoxed(inspect(Number(e)));if(function isBigInt(e){if(!e||"object"!=typeof e||!dt)return!1;try{return dt.call(e),!0}catch(e){}return!1}(e))return markBoxed(inspect(dt.call(e)));if(function isBoolean(e){return!("[object Boolean]"!==toStr(e)||ht&&"object"==typeof e&&ht in e)}(e))return markBoxed(Ze.call(e));if(function isString(e){return!("[object String]"!==toStr(e)||ht&&"object"==typeof e&&ht in e)}(e))return markBoxed(inspect(String(e)));if(!function isDate(e){return!("[object Date]"!==toStr(e)||ht&&"object"==typeof e&&ht in e)}(e)&&!isRegExp$1(e)){var I=arrObjKeys(e,inspect),T=mt?mt(e)===Object.prototype:e instanceof Object||e.constructor===Object,S=e instanceof Object?"":"null prototype",N=!T&&ht&&Object(e)===e&&ht in e?nt.call(toStr(e),8,-1):S?"Object":"",C=(T||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(N||S?"["+ut.call(ct.call([],N||[],S||[]),": ")+"] ":"");return 0===I.length?C+"{}":p?C+"{"+indentedJoin(I,p)+"}":C+"{ "+ut.call(I,", ")+" }"}return String(e)},Ct=Tt("%TypeError%"),Ot=Tt("%WeakMap%",!0),Pt=Tt("%Map%",!0),bt=St("WeakMap.prototype.get",!0),Dt=St("WeakMap.prototype.set",!0),Ut=St("WeakMap.prototype.has",!0),Lt=St("Map.prototype.get",!0),Mt=St("Map.prototype.set",!0),Bt=St("Map.prototype.has",!0),listGetNode=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},Ft=String.prototype.replace,vt=/%20/g,xt="RFC3986",wt={default:xt,formatters:{RFC1738:function(e){return Ft.call(e,vt,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:xt},kt=wt,Gt=Object.prototype.hasOwnProperty,Yt=Array.isArray,Ht=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),$t=function arrayToObject(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},jt={arrayToObject:$t,assign:function assignSingleSource(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function combine(e,t){return[].concat(e,t)},compact:function compact(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],s=Object.keys(i),c=0;c<s.length;++c){var u=s[c],l=i[u];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:i,prop:u}),r.push(l))}return function compactQueue(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(Yt(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function encode(e,t,r,n,o){if(0===e.length)return e;var i=e;if("symbol"==typeof e?i=Symbol.prototype.toString.call(e):"string"!=typeof e&&(i=String(e)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var s="",c=0;c<i.length;++c){var u=i.charCodeAt(c);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===kt.RFC1738&&(40===u||41===u)?s+=i.charAt(c):u<128?s+=Ht[u]:u<2048?s+=Ht[192|u>>6]+Ht[128|63&u]:u<55296||u>=57344?s+=Ht[224|u>>12]+Ht[128|u>>6&63]+Ht[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&i.charCodeAt(c)),s+=Ht[240|u>>18]+Ht[128|u>>12&63]+Ht[128|u>>6&63]+Ht[128|63&u])}return s},isBuffer:function isBuffer(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function maybeMap(e,t){if(Yt(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function merge(e,t,r){if(!t)return e;if("object"!=typeof t){if(Yt(e))e.push(t);else{if(!e||"object"!=typeof e)return[e,t];(r&&(r.plainObjects||r.allowPrototypes)||!Gt.call(Object.prototype,t))&&(e[t]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(t);var n=e;return Yt(e)&&!Yt(t)&&(n=$t(e,r)),Yt(e)&&Yt(t)?(t.forEach((function(t,n){if(Gt.call(e,n)){var o=e[n];o&&"object"==typeof o&&t&&"object"==typeof t?e[n]=merge(o,t,r):e.push(t)}else e[n]=t})),e):Object.keys(t).reduce((function(e,n){var o=t[n];return Gt.call(e,n)?e[n]=merge(e[n],o,r):e[n]=o,e}),n)}},Vt=function getSideChannel(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new Ct("Side channel does not contain "+Nt(e))},get:function(n){if(Ot&&n&&("object"==typeof n||"function"==typeof n)){if(e)return bt(e,n)}else if(Pt){if(t)return Lt(t,n)}else if(r)return function(e,t){var r=listGetNode(e,t);return r&&r.value}(r,n)},has:function(n){if(Ot&&n&&("object"==typeof n||"function"==typeof n)){if(e)return Ut(e,n)}else if(Pt){if(t)return Bt(t,n)}else if(r)return function(e,t){return!!listGetNode(e,t)}(r,n);return!1},set:function(n,o){Ot&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new Ot),Dt(e,n,o)):Pt?(t||(t=new Pt),Mt(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=listGetNode(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n},Kt=jt,Wt=wt,qt=Object.prototype.hasOwnProperty,Xt={brackets:function brackets(e){return e+"[]"},comma:"comma",indices:function indices(e,t){return e+"["+t+"]"},repeat:function repeat(e){return e}},Jt=Array.isArray,zt=String.prototype.split,Qt=Array.prototype.push,pushToArray=function(e,t){Qt.apply(e,Jt(t)?t:[t])},Zt=Date.prototype.toISOString,er=Wt.default,tr={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Kt.encode,encodeValuesOnly:!1,format:er,formatter:Wt.formatters[er],indices:!1,serializeDate:function serializeDate(e){return Zt.call(e)},skipNulls:!1,strictNullHandling:!1},rr={},nr=function stringify(e,t,r,n,o,i,s,c,u,l,p,d,E,f,_,h){for(var g=e,m=h,R=0,A=!1;void 0!==(m=m.get(rr))&&!A;){var y=m.get(e);if(R+=1,void 0!==y){if(y===R)throw new RangeError("Cyclic object value");A=!0}void 0===m.get(rr)&&(R=0)}if("function"==typeof c?g=c(t,g):g instanceof Date?g=p(g):"comma"===r&&Jt(g)&&(g=Kt.maybeMap(g,(function(e){return e instanceof Date?p(e):e}))),null===g){if(o)return s&&!f?s(t,tr.encoder,_,"key",d):t;g=""}if(function isNonNullishPrimitive(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e}(g)||Kt.isBuffer(g)){if(s){var I=f?t:s(t,tr.encoder,_,"key",d);if("comma"===r&&f){for(var T=zt.call(String(g),","),S="",N=0;N<T.length;++N)S+=(0===N?"":",")+E(s(T[N],tr.encoder,_,"value",d));return[E(I)+(n&&Jt(g)&&1===T.length?"[]":"")+"="+S]}return[E(I)+"="+E(s(g,tr.encoder,_,"value",d))]}return[E(t)+"="+E(String(g))]}var C,O=[];if(void 0===g)return O;if("comma"===r&&Jt(g))C=[{value:g.length>0?g.join(",")||null:void 0}];else if(Jt(c))C=c;else{var P=Object.keys(g);C=u?P.sort(u):P}for(var b=n&&Jt(g)&&1===g.length?t+"[]":t,D=0;D<C.length;++D){var U=C[D],L="object"==typeof U&&void 0!==U.value?U.value:g[U];if(!i||null!==L){var M=Jt(g)?"function"==typeof r?r(b,U):b:b+(l?"."+U:"["+U+"]");h.set(e,R);var B=Vt();B.set(rr,h),pushToArray(O,stringify(L,M,r,n,o,i,s,c,u,l,p,d,E,f,_,B))}}return O},or=jt,ir=Object.prototype.hasOwnProperty,sr=Array.isArray,ar={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:or.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},interpretNumericEntities=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},parseArrayValue=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},cr=function parseQueryStringKeys(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(o),c=s?o.slice(0,s.index):o,u=[];if(c){if(!r.plainObjects&&ir.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var l=0;r.depth>0&&null!==(s=i.exec(o))&&l<r.depth;){if(l+=1,!r.plainObjects&&ir.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(s[1])}return s&&u.push("["+o.slice(s.index)+"]"),function(e,t,r,n){for(var o=n?t:parseArrayValue(t,r),i=e.length-1;i>=0;--i){var s,c=e[i];if("[]"===c&&r.parseArrays)s=[].concat(o);else{s=r.plainObjects?Object.create(null):{};var u="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,l=parseInt(u,10);r.parseArrays||""!==u?!isNaN(l)&&c!==u&&String(l)===u&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(s=[])[l]=o:"__proto__"!==u&&(s[u]=o):s={0:o}}o=s}return o}(u,t,r,n)}},stringify=function(e,t){var r,n=e,o=function normalizeStringifyOptions(e){if(!e)return tr;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||tr.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Wt.default;if(void 0!==e.format){if(!qt.call(Wt.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=Wt.formatters[r],o=tr.filter;return("function"==typeof e.filter||Jt(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:tr.addQueryPrefix,allowDots:void 0===e.allowDots?tr.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:tr.charsetSentinel,delimiter:void 0===e.delimiter?tr.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:tr.encode,encoder:"function"==typeof e.encoder?e.encoder:tr.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:tr.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:tr.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:tr.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:tr.strictNullHandling}}(t);"function"==typeof o.filter?n=(0,o.filter)("",n):Jt(o.filter)&&(r=o.filter);var i,s=[];if("object"!=typeof n||null===n)return"";i=t&&t.arrayFormat in Xt?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var c=Xt[i];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u="comma"===c&&t&&t.commaRoundTrip;r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var l=Vt(),p=0;p<r.length;++p){var d=r[p];o.skipNulls&&null===n[d]||pushToArray(s,nr(n[d],d,c,u,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,l))}var E=s.join(o.delimiter),f=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),E.length>0?f+E:""},ur={formats:wt,parse:function(e,t){var r=function normalizeParseOptions(e){if(!e)return ar;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?ar.charset:e.charset;return{allowDots:void 0===e.allowDots?ar.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:ar.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:ar.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:ar.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:ar.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:ar.comma,decoder:"function"==typeof e.decoder?e.decoder:ar.decoder,delimiter:"string"==typeof e.delimiter||or.isRegExp(e.delimiter)?e.delimiter:ar.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:ar.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:ar.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:ar.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:ar.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:ar.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?function parseQueryStringValues(e,t){var r,n={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,s=o.split(t.delimiter,i),c=-1,u=t.charset;if(t.charsetSentinel)for(r=0;r<s.length;++r)0===s[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===s[r]?u="utf-8":"utf8=%26%2310003%3B"===s[r]&&(u="iso-8859-1"),c=r,r=s.length);for(r=0;r<s.length;++r)if(r!==c){var l,p,d=s[r],E=d.indexOf("]="),f=-1===E?d.indexOf("="):E+1;-1===f?(l=t.decoder(d,ar.decoder,u,"key"),p=t.strictNullHandling?null:""):(l=t.decoder(d.slice(0,f),ar.decoder,u,"key"),p=or.maybeMap(parseArrayValue(d.slice(f+1),t),(function(e){return t.decoder(e,ar.decoder,u,"value")}))),p&&t.interpretNumericEntities&&"iso-8859-1"===u&&(p=interpretNumericEntities(p)),d.indexOf("[]=")>-1&&(p=sr(p)?[p]:p),ir.call(n,l)?n[l]=or.combine(n[l],p):n[l]=p}return n}(e,r):e,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),s=0;s<i.length;++s){var c=i[s],u=cr(c,n[c],r,"string"==typeof e);o=or.merge(o,u,r)}return!0===r.allowSparse?o:or.compact(o)},stringify:stringify};const lr=ne("ebay:request"),pr={"Access-Control-Allow-Origin":"*","Access-Control-Allow-Headers":"X-Requested-With, Origin, Content-Type, X-Auth-Token","Access-Control-Allow-Methods":"GET, PUT, POST, DELETE"},dr={"Content-Type":"multipart/form-data"};class AxiosRequest{constructor(e={}){this.instance=Z.create({headers:{...pr},...e})}get(e,t){return lr("get: "+e,t),this.instance.get(e,t)}post(e,t,r){return lr("post: "+e,{payload:t,config:r}),this.instance.post(e,t,r)}delete(e,t){return lr("delete: "+e,t),this.instance.delete(e,t)}put(e,t,r){return lr("put: "+e,{payload:t,config:r}),this.instance.put(e,t,r)}postForm(e,t,r){lr("postForm: "+e);const n=ur.stringify(t);return this.instance.post(e,n,r)}}class Base{constructor(e,t=new AxiosRequest(e.axiosConfig)){this.config=e,this.req=t}}var Er={},fr={};!function(e){const t=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r="["+t+"]["+(t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",n=new RegExp("^"+r+"$");e.isExist=function(e){return void 0!==e},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,r){if(t){const n=Object.keys(t),o=n.length;for(let i=0;i<o;i++)e[n[i]]="strict"===r?[t[n[i]]]:t[n[i]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(e){const t=n.exec(e);return!(null==t)},e.getAllMatches=function(e,t){const r=[];let n=t.exec(e);for(;n;){const o=[];o.startIndex=t.lastIndex-n[0].length;const i=n.length;for(let e=0;e<i;e++)o.push(n[e]);r.push(o),n=t.exec(e)}return r},e.nameRegexp=r}(fr);const _r=fr,hr={allowBooleanAttributes:!1,unpairedTags:[]};function isWhiteSpace(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function readPI(e,t){const r=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const n=e.substr(r,t-r);if(t>5&&"xml"===n)return getErrorObject("InvalidXml","XML declaration allowed only at the start of the document.",getLineNumberForPosition(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function readCommentAndCDATA(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let r=1;for(t+=8;t<e.length;t++)if("<"===e[t])r++;else if(">"===e[t]&&(r--,0===r))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}Er.validate=function(e,t){t=Object.assign({},hr,t);const r=[];let n=!1,o=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let s=0;s<e.length;s++)if("<"===e[s]&&"?"===e[s+1]){if(s+=2,s=readPI(e,s),s.err)return s}else{if("<"!==e[s]){if(isWhiteSpace(e[s]))continue;return getErrorObject("InvalidChar","char '"+e[s]+"' is not expected.",getLineNumberForPosition(e,s))}{let c=s;if(s++,"!"===e[s]){s=readCommentAndCDATA(e,s);continue}{let u=!1;"/"===e[s]&&(u=!0,s++);let l="";for(;s<e.length&&">"!==e[s]&&" "!==e[s]&&"\t"!==e[s]&&"\n"!==e[s]&&"\r"!==e[s];s++)l+=e[s];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),s--),i=l,!_r.isName(i)){let t;return t=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",getErrorObject("InvalidTag",t,getLineNumberForPosition(e,s))}const p=readAttributeStr(e,s);if(!1===p)return getErrorObject("InvalidAttr","Attributes for '"+l+"' have open quote.",getLineNumberForPosition(e,s));let d=p.value;if(s=p.index,"/"===d[d.length-1]){const r=s-d.length;d=d.substring(0,d.length-1);const o=validateAttributeString(d,t);if(!0!==o)return getErrorObject(o.err.code,o.err.msg,getLineNumberForPosition(e,r+o.err.line));n=!0}else if(u){if(!p.tagClosed)return getErrorObject("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",getLineNumberForPosition(e,s));if(d.trim().length>0)return getErrorObject("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",getLineNumberForPosition(e,c));{const t=r.pop();if(l!==t.tagName){let r=getLineNumberForPosition(e,t.tagStartPos);return getErrorObject("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+l+"'.",getLineNumberForPosition(e,c))}0==r.length&&(o=!0)}}else{const i=validateAttributeString(d,t);if(!0!==i)return getErrorObject(i.err.code,i.err.msg,getLineNumberForPosition(e,s-d.length+i.err.line));if(!0===o)return getErrorObject("InvalidXml","Multiple possible root nodes found.",getLineNumberForPosition(e,s));-1!==t.unpairedTags.indexOf(l)||r.push({tagName:l,tagStartPos:c}),n=!0}for(s++;s<e.length;s++)if("<"===e[s]){if("!"===e[s+1]){s++,s=readCommentAndCDATA(e,s);continue}if("?"!==e[s+1])break;if(s=readPI(e,++s),s.err)return s}else if("&"===e[s]){const t=validateAmpersand(e,s);if(-1==t)return getErrorObject("InvalidChar","char '&' is not expected.",getLineNumberForPosition(e,s));s=t}else if(!0===o&&!isWhiteSpace(e[s]))return getErrorObject("InvalidXml","Extra text at the end",getLineNumberForPosition(e,s));"<"===e[s]&&s--}}}var i;return n?1==r.length?getErrorObject("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",getLineNumberForPosition(e,r[0].tagStartPos)):!(r.length>0)||getErrorObject("InvalidXml","Invalid '"+JSON.stringify(r.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):getErrorObject("InvalidXml","Start tag expected.",1)};function readAttributeStr(e,t){let r="",n="",o=!1;for(;t<e.length;t++){if('"'===e[t]||"'"===e[t])""===n?n=e[t]:n!==e[t]||(n="");else if(">"===e[t]&&""===n){o=!0;break}r+=e[t]}return""===n&&{value:r,index:t,tagClosed:o}}const gr=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function validateAttributeString(e,t){const r=_r.getAllMatches(e,gr),n={};for(let e=0;e<r.length;e++){if(0===r[e][1].length)return getErrorObject("InvalidAttr","Attribute '"+r[e][2]+"' has no space in starting.",getPositionFromMatch(r[e]));if(void 0!==r[e][3]&&void 0===r[e][4])return getErrorObject("InvalidAttr","Attribute '"+r[e][2]+"' is without value.",getPositionFromMatch(r[e]));if(void 0===r[e][3]&&!t.allowBooleanAttributes)return getErrorObject("InvalidAttr","boolean attribute '"+r[e][2]+"' is not allowed.",getPositionFromMatch(r[e]));const o=r[e][2];if(!validateAttrName(o))return getErrorObject("InvalidAttr","Attribute '"+o+"' is an invalid name.",getPositionFromMatch(r[e]));if(n.hasOwnProperty(o))return getErrorObject("InvalidAttr","Attribute '"+o+"' is repeated.",getPositionFromMatch(r[e]));n[o]=1}return!0}function validateAmpersand(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function validateNumberAmpersand(e,t){let r=/\d/;for("x"===e[t]&&(t++,r=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(r))break}return-1}(e,++t);let r=0;for(;t<e.length;t++,r++)if(!(e[t].match(/\w/)&&r<20)){if(";"===e[t])break;return-1}return t}function getErrorObject(e,t,r){return{err:{code:e,msg:t,line:r.line||r,col:r.col}}}function validateAttrName(e){return _r.isName(e)}function getLineNumberForPosition(e,t){const r=e.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function getPositionFromMatch(e){return e.startIndex+e[1].length}var mr={};const Rr={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1};mr.buildOptions=function(e){return Object.assign({},Rr,e)},mr.defaultOptions=Rr;var Ar=class XmlNode{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){this.child.push({[e]:t})}addChild(e){e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}};const yr=RegExp("^\\s([a-zA-z0-0]+)[ \t](['\"])([^&]+)\\2");function parseEntityExp(e,t){const r=yr.exec(e);r&&(t[r[1]]={regx:RegExp(`&${r[1]};`,"g"),val:r[3]})}var Ir=function readDocType$1(e,t){const r={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let n=1,o=!1,i=!1,s=!1,c="";for(;t<e.length;t++)if("<"===e[t]){if(o&&"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7])t+=7,i=!0;else if(o&&"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8])t+=8;else if(o&&"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8])t+=8;else if(o&&"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9])t+=9;else{if("!"!==e[t+1]||"-"!==e[t+2]||"-"!==e[t+3])throw new Error("Invalid DOCTYPE");s=!0}n++,c=""}else if(">"===e[t]){if(s){if("-"!==e[t-1]||"-"!==e[t-2])throw new Error("Invalid XML comment in DOCTYPE");s=!1}else i&&(parseEntityExp(c,r),i=!1);if(n--,0===n)break}else"["===e[t]?o=!0:c+=e[t];if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}};const Tr=/^[-+]?0x[a-fA-F0-9]+$/,Sr=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const Nr={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};const Cr=fr,Or=Ar,Pr=Ir,br=function toNumber$1(e,t={}){if(t=Object.assign({},Nr,t),!e||"string"!=typeof e)return e;let r=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(r))return e;if(t.hex&&Tr.test(r))return Number.parseInt(r,16);{const n=Sr.exec(r);if(n){const o=n[1],i=n[2];let s=function trimZeros(e){if(e&&-1!==e.indexOf("."))return"."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1)),e;return e}(n[3]);const c=n[4]||n[6];if(!t.leadingZeros&&i.length>0&&o&&"."!==r[2])return e;if(!t.leadingZeros&&i.length>0&&!o&&"."!==r[1])return e;{const n=Number(r),u=""+n;return-1!==u.search(/[eE]/)||c?t.eNotation?n:e:-1!==r.indexOf(".")?"0"===u&&""===s||u===s||o&&u==="-"+s?n:e:i?s===u||o+s===u?n:e:r===u||r===o+u?n:e}}return e}};"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,Cr.nameRegexp);function addExternalEntities(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:e[n]}}}function parseTextData(e,t,r,n,o,i,s){if(void 0!==e&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){s||(e=this.replaceEntitiesValue(e));const n=this.options.tagValueProcessor(t,e,r,o,i);if(null==n)return e;if(typeof n!=typeof e||n!==e)return n;if(this.options.trimValues)return parseValue(e,this.options.parseTagValue,this.options.numberParseOptions);return e.trim()===e?parseValue(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function resolveNameSpace(e){if(this.options.removeNSPrefix){const t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}const Dr=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function buildAttributesMap(e,t){if(!this.options.ignoreAttributes&&"string"==typeof e){const r=Cr.getAllMatches(e,Dr),n=r.length,o={};for(let e=0;e<n;e++){const n=this.resolveNameSpace(r[e][1]);let i=r[e][4];const s=this.options.attributeNamePrefix+n;if(n.length)if(void 0!==i){this.options.trimValues&&(i=i.trim()),i=this.replaceEntitiesValue(i);const e=this.options.attributeValueProcessor(n,i,t);o[s]=null==e?i:typeof e!=typeof i||e!==i?e:parseValue(i,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[s]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=o,e}return o}}const parseXml=function(e){e=e.replace(/\r\n?/g,"\n");const t=new Or("!xml");let r=t,n="",o="";for(let i=0;i<e.length;i++){if("<"===e[i])if("/"===e[i+1]){const t=findClosingIndex(e,">",i,"Closing Tag is not closed.");let s=e.substring(i+2,t).trim();if(this.options.removeNSPrefix){const e=s.indexOf(":");-1!==e&&(s=s.substr(e+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),r&&(n=this.saveTextToParentTag(n,r,o)),o=o.substr(0,o.lastIndexOf(".")),r=this.tagsNodeStack.pop(),n="",i=t}else if("?"===e[i+1]){let t=readTagExp(e,i,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,o),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new Or(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,o)),r.addChild(e)}i=t.closeIndex+1}else if("!--"===e.substr(i+1,3)){const t=findClosingIndex(e,"--\x3e",i+4,"Comment is not closed.");if(this.options.commentPropName){const s=e.substring(i+4,t-2);n=this.saveTextToParentTag(n,r,o),r.add(this.options.commentPropName,[{[this.options.textNodeName]:s}])}i=t}else if("!D"===e.substr(i+1,2)){const t=Pr(e,i);this.docTypeEntities=t.entities,i=t.i}else if("!["===e.substr(i+1,2)){const t=findClosingIndex(e,"]]>",i,"CDATA is not closed.")-2,s=e.substring(i+9,t);if(n=this.saveTextToParentTag(n,r,o),this.options.cdataPropName)r.add(this.options.cdataPropName,[{[this.options.textNodeName]:s}]);else{let e=this.parseTextData(s,r.tagname,o,!0,!1,!0);null==e&&(e=""),r.add(this.options.textNodeName,e)}i=t+2}else{let s=readTagExp(e,i,this.options.removeNSPrefix),c=s.tagName,u=s.tagExp,l=s.attrExpPresent,p=s.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,o,!1)),c!==t.tagname&&(o+=o?"."+c:c);const d=r;if(d&&-1!==this.options.unpairedTags.indexOf(d.tagname)&&(r=this.tagsNodeStack.pop()),this.isItStopNode(this.options.stopNodes,o,c)){let t="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)i=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))i=s.closeIndex;else{const r=this.readStopNodeData(e,c,p+1);if(!r)throw new Error(`Unexpected end of ${c}`);i=r.i,t=r.tagContent}const n=new Or(c);c!==u&&l&&(n[":@"]=this.buildAttributesMap(u,o)),t&&(t=this.parseTextData(t,c,o,!0,l,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),n.add(this.options.textNodeName,t),r.addChild(n)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),u=c):u=u.substr(0,u.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new Or(c);c!==u&&l&&(e[":@"]=this.buildAttributesMap(u,o)),o=o.substr(0,o.lastIndexOf(".")),r.addChild(e)}else{const e=new Or(c);this.tagsNodeStack.push(r),c!==u&&l&&(e[":@"]=this.buildAttributesMap(u,o)),r.addChild(e),r=e}n="",i=p}}else n+=e[i]}return t.child},replaceEntitiesValue$2=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const r=this.docTypeEntities[t];e=e.replace(r.regx,r.val)}for(let t in this.lastEntities){const r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function saveTextToParentTag(e,t,r,n){return e&&(void 0===n&&(n=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,r,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,n))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function isItStopNode(e,t,r){const n="*."+r;for(const r in e){const o=e[r];if(n===o||t===o)return!0}return!1}function findClosingIndex(e,t,r,n){const o=e.indexOf(t,r);if(-1===o)throw new Error(n);return o+t.length-1}function readTagExp(e,t,r,n=">"){const o=function tagExpWithClosingIndex(e,t,r=">"){let n,o="";for(let i=t;i<e.length;i++){let t=e[i];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===r[0]){if(!r[1])return{data:o,index:i};if(e[i+1]===r[1])return{data:o,index:i}}else"\t"===t&&(t=" ");o+=t}}(e,t+1,n);if(!o)return;let i=o.data;const s=o.index,c=i.search(/\s/);let u=i,l=!0;if(-1!==c&&(u=i.substr(0,c).replace(/\s\s*$/,""),i=i.substr(c+1)),r){const e=u.indexOf(":");-1!==e&&(u=u.substr(e+1),l=u!==o.data.substr(e+1))}return{tagName:u,tagExp:i,closeIndex:s,attrExpPresent:l}}function readStopNodeData(e,t,r){const n=r;let o=1;for(;r<e.length;r++)if("<"===e[r])if("/"===e[r+1]){const i=findClosingIndex(e,">",r,`${t} is not closed`);if(e.substring(r+2,i).trim()===t&&(o--,0===o))return{tagContent:e.substring(n,r),i:i};r=i}else if("?"===e[r+1]){r=findClosingIndex(e,"?>",r+1,"StopNode is not closed.")}else if("!--"===e.substr(r+1,3)){r=findClosingIndex(e,"--\x3e",r+3,"StopNode is not closed.")}else if("!["===e.substr(r+1,2)){r=findClosingIndex(e,"]]>",r,"StopNode is not closed.")-2}else{const n=readTagExp(e,r,">");if(n){(n&&n.tagName)===t&&"/"!==n.tagExp[n.tagExp.length-1]&&o++,r=n.closeIndex}}}function parseValue(e,t,r){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&br(e,r)}return Cr.isExist(e)?e:""}var Ur=class OrderedObjParser{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"}},this.addExternalEntities=addExternalEntities,this.parseXml=parseXml,this.parseTextData=parseTextData,this.resolveNameSpace=resolveNameSpace,this.buildAttributesMap=buildAttributesMap,this.isItStopNode=isItStopNode,this.replaceEntitiesValue=replaceEntitiesValue$2,this.readStopNodeData=readStopNodeData,this.saveTextToParentTag=saveTextToParentTag}},Lr={};function compress(e,t,r){let n;const o={};for(let i=0;i<e.length;i++){const s=e[i],c=propName$1(s);let u="";if(u=void 0===r?c:r+"."+c,c===t.textNodeName)void 0===n?n=s[c]:n+=""+s[c];else{if(void 0===c)continue;if(s[c]){let e=compress(s[c],t,u);const r=isLeafTag(e,t);s[":@"]?assignAttributes(e,s[":@"],u,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==o[c]&&o.hasOwnProperty(c)?(Array.isArray(o[c])||(o[c]=[o[c]]),o[c].push(e)):t.isArray(c,u,r)?o[c]=[e]:o[c]=e}}}return"string"==typeof n?n.length>0&&(o[t.textNodeName]=n):void 0!==n&&(o[t.textNodeName]=n),o}function propName$1(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function assignAttributes(e,t,r,n){if(t){const o=Object.keys(t),i=o.length;for(let s=0;s<i;s++){const i=o[s];n.isArray(i,r+"."+i,!0,!0)?e[i]=[t[i]]:e[i]=t[i]}}}function isLeafTag(e,t){const r=Object.keys(e).length;return!!(0===r||1===r&&e[t.textNodeName])}Lr.prettify=function prettify$1(e,t){return compress(e,t)};const{buildOptions:Mr}=mr,Br=Ur,{prettify:Fr}=Lr,vr=Er;var xr=class XMLParser{constructor(e){this.externalEntities={},this.options=Mr(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const r=vr.validate(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new Br(this.options);r.addExternalEntities(this.externalEntities);const n=r.parseXml(e);return this.options.preserveOrder||void 0===n?n:Fr(n,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}};function arrToStr(e,t,r,n){let o="",i="";t.format&&t.indentBy.length>0&&(i="\n"+t.indentBy.repeat(n));for(let s=0;s<e.length;s++){const c=e[s],u=propName(c);let l="";if(l=0===r.length?u:`${r}.${u}`,u===t.textNodeName){let e=c[u];isStopNode(l,t)||(e=t.tagValueProcessor(u,e),e=replaceEntitiesValue$1(e,t)),o+=i+e;continue}if(u===t.cdataPropName){o+=i+`<![CDATA[${c[u][0][t.textNodeName]}]]>`;continue}if(u===t.commentPropName){o+=i+`\x3c!--${c[u][0][t.textNodeName]}--\x3e`;continue}if("?"===u[0]){const e=attr_to_str(c[":@"],t),r="?xml"===u?"":i;let n=c[u][0][t.textNodeName];n=0!==n.length?" "+n:"",o+=r+`<${u}${n}${e}?>`;continue}let p=i+`<${u}${attr_to_str(c[":@"],t)}`,d=arrToStr(c[u],t,l,n+1);-1!==t.unpairedTags.indexOf(u)?t.suppressUnpairedNode?o+=p+">":o+=p+"/>":d&&0!==d.length||!t.suppressEmptyNode?o+=p+`>${d}${i}</${u}>`:o+=p+"/>"}return o}function propName(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function attr_to_str(e,t){let r="";if(e&&!t.ignoreAttributes)for(let n in e){let o=t.attributeValueProcessor(n,e[n]);o=replaceEntitiesValue$1(o,t),!0===o&&t.suppressBooleanAttributes?r+=` ${n.substr(t.attributeNamePrefix.length)}`:r+=` ${n.substr(t.attributeNamePrefix.length)}="${o}"`}return r}function isStopNode(e,t){let r=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===e||t.stopNodes[n]==="*."+r)return!0;return!1}function replaceEntitiesValue$1(e,t){if(e&&e.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const n=t.entities[r];e=e.replace(n.regex,n.val)}return e}const wr=function toXml(e,t){return arrToStr(e,t,"",0)},kr={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],transformTagName:!1};function Builder(e){this.options=Object.assign({},kr,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=isAttribute),this.processTextOrObjNode=processTextOrObjNode,this.options.format?(this.indentate=indentate,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""),this.options.suppressEmptyNode?(this.buildTextNode=buildEmptyTextNode,this.buildObjNode=buildEmptyObjNode):(this.buildTextNode=buildTextValNode,this.buildObjNode=buildObjectNode),this.buildTextValNode=buildTextValNode,this.buildObjectNode=buildObjectNode,this.replaceEntitiesValue=replaceEntitiesValue,this.buildAttrPairStr=buildAttrPairStr}function buildAttrPairStr(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'}function processTextOrObjNode(e,t,r){const n=this.j2x(e,r+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextNode(e[this.options.textNodeName],t,n.attrStr,r):this.buildObjNode(n.val,t,n.attrStr,r)}function buildObjectNode(e,t,r,n){let o="</"+t+this.tagEndChar,i="";return"?"===t[0]&&(i="?",o=""),r&&-1===e.indexOf("<")?this.indentate(n)+"<"+t+r+i+">"+e+o:!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===i.length?this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(n)+"<"+t+r+i+this.tagEndChar+e+this.indentate(n)+o}function buildEmptyObjNode(e,t,r,n){return""!==e?this.buildObjectNode(e,t,r,n):"?"===t[0]?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+"/"+this.tagEndChar}function buildTextValNode(e,t,r,n){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine;{let o=this.options.tagValueProcessor(t,e);return o=this.replaceEntitiesValue(o),""===o&&-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode?this.indentate(n)+"<"+t+this.tagEndChar:this.indentate(n)+"<"+t+"/"+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+o+"</"+t+this.tagEndChar}}function replaceEntitiesValue(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];e=e.replace(r.regex,r.val)}return e}function buildEmptyTextNode(e,t,r,n){return""===e&&-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode?this.indentate(n)+"<"+t+this.tagEndChar:this.indentate(n)+"<"+t+"/"+this.tagEndChar:""!==e?this.buildTextValNode(e,t,r,n):"?"===t[0]?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+"/"+this.tagEndChar}function indentate(e){return this.options.indentBy.repeat(e)}function isAttribute(e){return!!e.startsWith(this.options.attributeNamePrefix)&&e.substr(this.attrPrefixLen)}Builder.prototype.build=function(e){return this.options.preserveOrder?wr(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},Builder.prototype.j2x=function(e,t){let r="",n="";for(let o in e)if(void 0===e[o]);else if(null===e[o])"?"===o[0]?n+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+o+"/"+this.tagEndChar;else if(e[o]instanceof Date)n+=this.buildTextNode(e[o],o,"",t);else if("object"!=typeof e[o]){const i=this.isAttribute(o);if(i)r+=this.buildAttrPairStr(i,""+e[o]);else if(o===this.options.textNodeName){let t=this.options.tagValueProcessor(o,""+e[o]);n+=this.replaceEntitiesValue(t)}else n+=this.buildTextNode(e[o],o,"",t)}else if(Array.isArray(e[o])){const r=e[o].length;for(let i=0;i<r;i++){const r=e[o][i];void 0===r||(null===r?"?"===o[0]?n+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+o+"/"+this.tagEndChar:n+="object"==typeof r?this.processTextOrObjNode(r,o,t):this.buildTextNode(r,o,"",t))}}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const t=Object.keys(e[o]),n=t.length;for(let i=0;i<n;i++)r+=this.buildAttrPairStr(t[i],""+e[o][t[i]])}else n+=this.processTextOrObjNode(e[o],o,t);return{attrStr:r,val:n}};var Gr={XMLParser:xr,XMLValidator:Er,XMLBuilder:Builder};const Yr=ne("ebay:error"),Hr=Symbol("raw-error");class EBayError extends Error{constructor(e,t="",r={}){super(e),Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name,this.description=t,this.meta=r}toJSON(){return{message:this.message,description:this.description,stack:this.stack,type:this.constructor.name,meta:this.meta||null}}}class EbayNoCallError extends EBayError{constructor(e="No eBay API call defined, please invoke one."){super(e)}}class ApiEnvError extends EBayError{constructor(e){super(`Could not find ${e} in process.env.`)}}const getErrorMessage=e=>e.response?.data?.message||e.response?.data?.error?.[0]?.message||e.response?.data?.errors?.[0]?.message||e.errorMessage?.error?.message||e.Errors?.ShortMessage||e.message||"eBay API request error",getErrorDescription=e=>e.response?.data?.error_description||e.response?.data?.error?.[0]?.longMessage||e.response?.data?.errors?.[0]?.longMessage||e.longMessage||e.Errors?.LongMessage||e.response?.statusText||"";class EbayApiError extends EBayError{constructor(e){const{message:t,description:r,meta:n}=mapEBayError(e);super(t,r,n)}}class EBayAccessDenied extends EbayApiError{}class EBayInvalidGrant extends EbayApiError{}class EBayNotFound extends EbayApiError{}EBayNotFound.code=11001;class EBayInvalidAccessToken extends EbayApiError{}class EBayIAFTokenExpired extends EbayApiError{}EBayIAFTokenExpired.code=21917053;class EBayIAFTokenInvalid extends EbayApiError{}EBayIAFTokenInvalid.code=21916984;class EBayTokenRequired extends EbayApiError{}EBayTokenRequired.code=930;class EBayInvalidScope extends EbayApiError{}const mapEBayError=e=>{if(!e)return{};let t={};if(e.response?.data){const r=e.response.data;t=Array.isArray(r.error)?r.error[0]??r:Array.isArray(r.errors)?r.errors[0]??r:"string"==typeof r.error?{message:r.error,description:r.error_description||""}:r}else e.Errors&&(t=e);const r={message:t.message||getErrorMessage(e),description:t.description||getErrorDescription(e),meta:{...t,[Hr]:e}};return e.response&&(r.meta.res={status:e.response.status,statusText:e.response.statusText,headers:e.response.headers,data:e.response.data??{}}),e.request&&e.config&&(r.meta.req={url:e.config.url,method:e.config.method,headers:e.config.headers,params:e.config.params}),r},handleEBayError=e=>{if(Yr("handleEBayError",e),e instanceof EBayError)throw e;const{message:t,meta:r,description:n}=mapEBayError(e);if("ACCESS"===r.domain)throw new EBayAccessDenied(e);if("invalid_grant"===r.message)throw new EBayInvalidGrant(e);if(r.errorId===EBayNotFound.code)throw new EBayNotFound(e);if("invalid_scope"===r.message)throw new EBayInvalidScope(e);if("Invalid access token"===r.message)throw new EBayInvalidAccessToken(e);throw new EBayError(t,n,r)},checkEBayResponse=e=>{if("Failure"===e.Ack){if(e.Errors?.ErrorCode)switch(e.Errors.ErrorCode){case EBayIAFTokenExpired.code:throw new EBayIAFTokenExpired(e);case EBayIAFTokenInvalid.code:throw new EBayIAFTokenInvalid(e);case EBayTokenRequired.code:throw new EBayTokenRequired(e)}throw new EbayApiError(e)}if(e.errorMessage)throw new EbayApiError(e)};var $r=Object.freeze({__proto__:null,rawError:Hr,EBayError:EBayError,EbayNoCallError:EbayNoCallError,ApiEnvError:ApiEnvError,getErrorMessage:getErrorMessage,getErrorDescription:getErrorDescription,EbayApiError:EbayApiError,EBayAccessDenied:EBayAccessDenied,EBayInvalidGrant:EBayInvalidGrant,EBayNotFound:EBayNotFound,EBayInvalidAccessToken:EBayInvalidAccessToken,EBayIAFTokenExpired:EBayIAFTokenExpired,EBayIAFTokenInvalid:EBayIAFTokenInvalid,EBayTokenRequired:EBayTokenRequired,EBayInvalidScope:EBayInvalidScope,mapEBayError:mapEBayError,handleEBayError:handleEBayError,checkEBayResponse:checkEBayResponse});const jr=ne("ebay:xml:request"),Vr={attributeNamePrefix:"",textNodeName:"value",ignoreAttributes:!1,parseAttributeValue:!0,parseNodeValue:!0,numberParseOptions:{hex:!1,leadingZeros:!1},removeNSPrefix:!0,isArray:(e,t)=>/Array$/.test(t.slice(0,-e.length-1))},Kr={raw:!1,parseOptions:Vr,useIaf:!0,headers:{},returnResponse:!1},Wr={"Content-Type":"text/xml"};class XMLRequest{constructor(e,t,r,n){if(!e)throw new EbayNoCallError;this.callName=e,this.fields=t||{},this.config={...Kr,...r},this.req=n}getResponseWrapper(){return`${this.callName}Response`}getCredentials(){return this.config.eBayAuthToken?{RequesterCredentials:{eBayAuthToken:this.config.eBayAuthToken}}:{}}getParseOptions(){return{...Vr,...this.config.parseOptions}}getHeaders(){return{...Wr,...this.config.headers}}toJSON(e){const t=this.getParseOptions();return jr("parseOption",t),new Gr.XMLParser(t).parse(e)}toXML(e){return'<?xml version="1.0" encoding="utf-8"?>'+XMLRequest.j2x.build({[this.callName+"Request"]:{"@_xmlns":this.config.xmlns,...this.getCredentials(),...e}})}async request(){const e=this.toXML(this.fields);jr("xml",e);try{const{body:t,headers:r={}}=this.config.hook?.(e)??{body:e},n={headers:{...this.getHeaders(),...r||{}}};jr("config",n);const o=await this.req.post(this.config.endpoint,t,n);if(jr("response",o),this.config.returnResponse)return o;const{data:i}=o;if(this.config.raw)return i;const s=this.xml2JSON(i);return checkEBayResponse(s),s}catch(e){if(jr("error",e),e.response?.data){const t=this.toJSON(e.response.data);checkEBayResponse(t)}throw e}}xml2JSON(e){const t=this.toJSON(e);return t[this.getResponseWrapper()]??t}}XMLRequest.j2x=new Gr.XMLBuilder({attributeNamePrefix:"@_",textNodeName:"#value",ignoreAttributes:!1,cdataTagName:"__cdata",cdataPositionChar:"\\c",format:!1,indentBy:" ",suppressEmptyNode:!1,cdataPropName:"__cdata"});const qr=ne("ebay:authNAuth");class AuthNAuth extends Base{static generateAuthUrl(e,t,r,n=!1){return[e?AuthNAuth.SIGNIN_ENDPOINT.sandbox:AuthNAuth.SIGNIN_ENDPOINT.production,"?SignIn","&RuName=",encodeURIComponent(t),"&SessID=",encodeURIComponent(r),n?"&prompt=login":""].join("")}constructor(e,t){super(e,t),this.authToken=null,this.config.authToken&&this.setAuthToken(this.config.authToken)}get apiEndpoint(){return this.config.sandbox?AuthNAuth.API_ENDPOINT.sandbox:AuthNAuth.API_ENDPOINT.production}async getSessionIdAndAuthUrl(e){if(!this.config.devId)throw new Error("DevId is required.");if(!(e=e||this.config.ruName))throw new Error("RuName is required.");const t=new XMLRequest("GetSessionID",{RuName:e},this.getRequestConfig("GetSessionID"),this.req),r=await t.request();return qr("GetSessionID data",r),{sessionId:r.SessionID,url:AuthNAuth.generateAuthUrl(this.config.sandbox,e,r.SessionID)}}async mintToken(e){if(!this.config.devId)throw new Error("DevId is required.");const t=new XMLRequest("FetchToken",{SessionID:e},this.getRequestConfig("FetchToken"),this.req);try{return await t.request()}catch(e){throw qr("Fetch auth token failed",e),e}}async obtainToken(e){const t=await this.mintToken(e);return qr("Obtain auth token",t),this.setAuthToken(t),t}setAuthToken(e){this.authToken="string"==typeof e?{eBayAuthToken:e}:e}getAuthToken(){return this.authToken?{...this.authToken}:null}get eBayAuthToken(){return this.authToken?.eBayAuthToken??null}getRequestConfig(e){if("number"!=typeof this.config.siteId)throw new Error("\"siteId\" is required for Auth'n'Auth.");return{useIaf:!1,xmlns:"urn:ebay:apis:eBLBaseComponents",endpoint:this.apiEndpoint,headers:{"X-EBAY-API-CALL-NAME":e,"X-EBAY-API-CERT-NAME":this.config.certId,"X-EBAY-API-APP-NAME":this.config.appId,"X-EBAY-API-DEV-NAME":this.config.devId,"X-EBAY-API-SITEID":this.config.siteId,"X-EBAY-API-COMPATIBILITY-LEVEL":967}}}}AuthNAuth.SIGNIN_ENDPOINT={sandbox:"https://signin.sandbox.ebay.com/ws/eBayISAPI.dll",production:"https://signin.ebay.com/ws/eBayISAPI.dll"},AuthNAuth.API_ENDPOINT={production:"https://api.ebay.com/ws/api.dll",sandbox:"https://api.sandbox.ebay.com/ws/api.dll"};let createNanoEvents=()=>({events:{},emit(e,...t){const r=this.events[e]||[];for(let e=0,n=r.length;e<n;e++)r[e](...t)},on(e,t){return this.events[e]?this.events[e].push(t):this.events[e]=[t],()=>{this.events[e]=this.events[e]?.filter((e=>t!==e))}}});const Xr=ne("ebay:oauth2");class OAuth2 extends Base{constructor(e,t){super(e,t),this.emitter=createNanoEvents(),this.scope=this.config.scope||OAuth2.defaultScopes}on(e,t){return this.emitter.on(e,t)}static generateAuthUrl(e,t,r,n,o=""){return[e?OAuth2.AUTHORIZE_ENDPOINT.sandbox:OAuth2.AUTHORIZE_ENDPOINT.production,"?client_id=",encodeURIComponent(t),"&redirect_uri=",encodeURIComponent(r),"&response_type=code","&state=",encodeURIComponent(o),"&scope=",encodeURIComponent(n.join(" "))].join("")}get identityEndpoint(){return this.config.sandbox?OAuth2.IDENTITY_ENDPOINT.sandbox:OAuth2.IDENTITY_ENDPOINT.production}async getAccessToken(){return this.getUserAccessToken()||this.getApplicationAccessToken()}getUserAccessToken(){return this._authToken?.access_token??null}async getApplicationAccessToken(){if(this._clientToken)return Xr("Return existing application access token: ",this._clientToken),this._clientToken.access_token;try{return(await this.obtainApplicationAccessToken()).access_token}catch(e){throw e}}setClientToken(e){this._clientToken=e}setScope(e){this.scope=e}getScope(){return[...this.scope]}async mintApplicationAccessToken(){if(!this.config.appId)throw new Error("Missing App ID (Client Id)");if(!this.config.certId)throw new Error("Missing Cert Id (Client Secret)");try{return(await this.req.postForm(this.identityEndpoint,{scope:this.scope.join(" "),grant_type:"client_credentials"},{auth:{username:this.config.appId,password:this.config.certId}})).data}catch(e){throw Xr("Failed to mint application token",e),e}}async obtainApplicationAccessToken(){Xr("Obtain a new application access token with scope: ",this.scope.join(","));try{const e=await this.mintApplicationAccessToken();return Xr("Obtained a new application access token:",e),this.setClientToken(e),this.emitter.emit("refreshClientToken",e),e}catch(e){throw Xr("Failed to obtain application token",e),e}}generateAuthUrl(e,t=this.scope,r=""){if(!(e=e||this.config.ruName))throw new Error("RuName is required.");return OAuth2.generateAuthUrl(this.config.sandbox,this.config.appId,e,t,r)}async mintUserAccessToken(e,t=this.config.ruName){try{const r=(await this.req.postForm(this.identityEndpoint,{grant_type:"authorization_code",code:e,redirect_uri:t},{auth:{username:this.config.appId,password:this.config.certId}})).data;return Xr("User Access Token",r),r}catch(e){throw Xr("Failed to get the token",e),e}}async getToken(e,t=this.config.ruName){return await this.mintUserAccessToken(e,t)}async refreshUserAccessToken(){if(!this._authToken||!this._authToken.refresh_token)throw Xr("Tried to refresh user access token before it was set."),new Error("Failed to refresh the user access token. Token or refresh_token is not set.");try{const e=(await this.req.postForm(this.identityEndpoint,{grant_type:"refresh_token",refresh_token:this._authToken.refresh_token,scope:this.scope.join(" ")},{auth:{username:this.config.appId,password:this.config.certId}})).data;Xr("Successfully refreshed token",e);const t={...this._authToken,...e};return this.setCredentials(t),this.emitter.emit("refreshAuthToken",t),t}catch(e){throw Xr("Failed to refresh the token",e),e}}async obtainToken(e){const t=await this.getToken(e);return Xr("Obtain user access token",t),this.setCredentials(t),t}getCredentials(){return this._authToken?{...this._authToken}:this._clientToken?{...this._clientToken}:null}setCredentials(e){this._authToken="string"==typeof e?{refresh_token:"",expires_in:7200,refresh_token_expires_in:47304e3,token_type:"User Access Token",access_token:e}:e}async refreshToken(){if(this._authToken)return await this.refreshUserAccessToken();if(this._clientToken)return await this.obtainApplicationAccessToken();throw new Error("Missing credentials. To refresh a token an application access token or user access token must be already set.")}}OAuth2.IDENTITY_ENDPOINT={production:"https://api.ebay.com/identity/v1/oauth2/token",sandbox:"https://api.sandbox.ebay.com/identity/v1/oauth2/token"},OAuth2.AUTHORIZE_ENDPOINT={production:"https://auth.ebay.com/oauth2/authorize",sandbox:"https://auth.sandbox.ebay.com/oauth2/authorize"},OAuth2.defaultScopes=["https://api.ebay.com/oauth/api_scope"];class Auth extends Base{constructor(e,t){super(e,t),this.authNAuth=new AuthNAuth(this.config,this.req),this.OAuth2=new OAuth2(this.config,this.req),this.oAuth2=this.OAuth2}async getHeaderAuthorization(e){if(this.authNAuth.eBayAuthToken)return{Authorization:"Token "+this.authNAuth.eBayAuthToken};return{Authorization:(e?"IAF ":"Bearer ")+await this.OAuth2.getAccessToken()}}}class Api extends Base{constructor(e,t,r){super(e,t),this.auth=r||new Auth(this.config,this.req)}}const Jr={"Content-Type":"application/json","Cache-Control":"no-cache",..."undefined"==typeof window?{"Accept-Encoding":"application/gzip"}:{}},zr={marketplaceId:"X-EBAY-C-MARKETPLACE-ID",endUserCtx:"X-EBAY-C-ENDUSERCTX",acceptLanguage:"Accept-Language",contentLanguage:"Content-Language"};class Restful extends Api{constructor(e,t,r,n={}){super(e,t,r),this.apiConfig={...this.getApiConfig(),...n}}static buildServerUrl(e,t,r,n){return`${e}${t}.${r?"sandbox.":""}${n}`}get useIaf(){return!1}get schema(){return"https://"}get subdomain(){return"api"}get apiVersionPath(){return""}getServerUrl({schema:e,subdomain:t,apiVersion:r,basePath:n,sandbox:o,tld:i}){return Restful.buildServerUrl(e,t,o,i)+r+n}getApiConfig(){return{subdomain:this.subdomain,useIaf:this.useIaf,apiVersion:this.apiVersionPath,basePath:this.basePath,schema:this.schema,sandbox:this.config.sandbox,tld:"ebay.com",headers:{},returnResponse:!1}}get baseUrl(){return this.getServerUrl(this.apiConfig)}api(e){return new this.constructor(this.config,this.req,this.auth,e)}get apix(){return this.api({subdomain:"apix"})}get apiz(){return this.api({subdomain:"apiz"})}async get(e,t={},r){return this.doRequest({method:"get",url:e,config:t},r)}async delete(e,t={},r){return this.doRequest({method:"delete",url:e,config:t},r)}async post(e,t,r={},n){return this.doRequest({method:"post",url:e,data:t,config:r},n)}async put(e,t,r={},n){return this.doRequest({method:"put",url:e,data:t,config:r},n)}get additionalHeaders(){return Object.keys(zr).filter((e=>void 0!==this.config[e])).reduce(((e,t)=>(e[zr[t]]=this.config[t],e)),{})}async enrichRequestConfig(e={},t=this.apiConfig){const r=await this.auth.getHeaderAuthorization(t.useIaf),n={...Jr,...this.additionalHeaders,...r,...t.headers};return{...e,headers:{...e.headers||{},...n}}}async doRequest(e,t){try{return await this.request(e,t)}catch(r){if(this.shouldRefreshToken(r))return await this.request(e,t,!0);throw r}}shouldRefreshToken(e){return!!this.config.autoRefreshToken&&(e.name===EBayInvalidAccessToken.name||401===e?.meta?.res?.status&&"/post-order/v2"===this.apiConfig.basePath)}async request(e,t=this.apiConfig,r=!1){const{url:n,method:o,data:i,config:s}=e,c={...this.apiConfig,...t},u=this.getServerUrl(c)+n;try{r&&await this.auth.OAuth2.refreshToken();const e=await this.enrichRequestConfig(s,c),t=["get","delete"].includes(o)?[e]:[i,e],n=await this.req[o](u,...t);return this.apiConfig.returnResponse?n:n.data}catch(e){handleEBayError(e)}}}class Browse extends Restful{get basePath(){return"/buy/browse/v1"}search(e){return this.get("/item_summary/search",{params:e})}searchByImage(e,t={}){return this.post("/item_summary/search_by_image",t,{params:e})}getItems({itemIds:e,itemGroupIds:t}){return this.get("/item/",{params:{item_ids:e,item_group_ids:t}})}getItem(e,t){const r=encodeURIComponent(e);return this.get(`/item/${r}`,{params:{fieldgroups:t}})}getItemByLegacyId(e){return this.get("/item/get_item_by_legacy_id",{params:e})}getItemsByItemGroup(e){return this.get("/item/get_items_by_item_group",{params:{item_group_id:e}})}checkCompatibility(e,t){const r=encodeURIComponent(e);return this.post(`/item/${r}/check_compatibility`,t)}addItem(e){return this.post("/shopping_cart/add_item",e)}getShoppingCart(){return this.get("/shopping_cart/")}removeItem(e){return this.post("/shopping_cart/remove_item",e)}updateQuantity(e){return this.post("/shopping_cart/update_quantity",e)}}Browse.id="Browse";let Qr=class Feed extends Restful{get basePath(){return"/buy/feed/v1_beta"}getItemFeed(e,t){return this.get("/item",{params:e,headers:{Range:t}})}getItemGroupFeed(e,t){return this.get("/item_group",{params:e,headers:{Range:t}})}getItemSnapshotFeed(e,t,r){return this.get("/item_snapshot",{params:{...e,snapshot_date:t},headers:{Range:r}})}getProductFeed(e,t,r){return this.get("/product",{params:{...e,snapshot_date:t},headers:{Range:r}})}};Qr.id="Feed";let Zr=class Marketing extends Restful{get basePath(){return"/buy/marketing/v1_beta"}getAlsoBoughtByProduct(e){return this.get("/merchandised_product/get_also_bought_products",{params:e})}getAlsoViewedByProduct(e){return this.get("/merchandised_product/get_also_viewed_products",{params:e})}getMerchandisedProducts(e){return this.get("/merchandised_product",{params:e})}};Zr.id="Marketing";class Offer extends Restful{get basePath(){return"/buy/offer/v1_beta"}getBidding(e){const t=encodeURIComponent(e);return this.get(`/bidding/${t}`)}placeProxyBid(e,t){const r=encodeURIComponent(e);return this.post(`/bidding/${r}/place_proxy_bid`,t)}}Offer.id="Offer";class Order extends Restful{get basePath(){return"/buy/order/v1"}applyCoupon(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/apply_coupon`,t)}getCheckoutSession(e){return e=encodeURIComponent(e),this.get(`/checkout_session/${e}`)}initiateCheckoutSession(e){return this.post("/checkout_session/initiate",e)}placeOrder(e){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/place_order`)}removeCoupon(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/remove_coupon`,t)}updatePaymentInfo(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_payment_info`,t)}updateQuantity(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_quantity`,t)}checkoutSessionId(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_quantity`,t)}updateShippingAddress(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_shipping_address`,t)}updateShippingOption(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_shipping_option`,t)}applyGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/apply_coupon`,t)}getGuestCheckoutSession(e){return e=encodeURIComponent(e),this.get(`/guest_checkout_session/${e}`)}initiateGuestCheckoutSession(e){return this.post("/guest_checkout_session/initiate",e)}initiateGuestPayment(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/initiate_payment`,t)}placeGuestOrder(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/place_order`,t)}removeGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/remove_coupon`,t)}updateGuestPaymentInfo(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_payment_info`,t)}updateGuestQuantity(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_quantity`,t)}updateGuestShippingAddress(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_shipping_address`,t)}updateGuestShippingOption(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_shipping_option`,t)}applyProxyGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/apply_coupon`,t)}getProxyGuestCheckoutSession(e){return e=encodeURIComponent(e),this.get(`/proxy_guest_checkout_session/${e}`)}initiateProxyGuestCheckoutSession(e){return this.post("/proxy_guest_checkout_session/initiate",e)}placeProxyGuestOrder(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/place_order`,t)}removeProxyGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/remove_coupon`,t)}updateProxyGuestPaymentInfo(e,t,r,n,o,i){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_payment_info`,i,{headers:{Authorization:t,"X-EBAY-C-DATE":r,"X-EBAY-C-REQUEST-NONCE":n,"X-EBAY-C-SIGNATURE":o}})}updateProxyGuestQuantity(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_quantity`,t)}updateProxyGuestShippingAddress(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_shipping_address`,t)}updateProxyGuestShippingOption(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_shipping_option`,t)}getGuestPurchaseOrder(e){return e=encodeURIComponent(e),this.get(`/guest_purchase_order/${e}`)}getPurchaseOrder(e){return e=encodeURIComponent(e),this.get(`/purchase_order/${e}`)}}Order.id="Order";class Deal extends Restful{get basePath(){return"/buy/deal/v1"}getDealItems({categoryIds:e,commissionable:t,deliveryCountry:r,limit:n,offset:o}){return this.get("/deal_item",{params:{category_ids:e,commissionable:t,delivery_country:r,limit:n,offset:o}})}getEvent(e){return e=encodeURIComponent(e),this.get(`/event/${e}`)}getEvents({limit:e,offset:t}){return this.get("/event",{params:{limit:e,offset:t}})}getEventItems(e,{categoryIds:t,deliveryCountry:r,limit:n,offset:o}={}){return this.get("/event_item",{params:{event_ids:e,limit:n,offset:o,category_ids:t,delivery_country:r}})}}Deal.id="Deal";class MarketplaceInsights extends Restful{get basePath(){return"/buy/marketplace_insights/v1_beta"}search({aspectFilter:e,categoryIds:t,epid:r,fieldgroups:n,filter:o,gtin:i,limit:s,offset:c,q:u,sort:l}){return this.get("/item_sales/search",{params:{aspect_filter:e,category_ids:t,epid:r,fieldgroups:n,filter:o,gtin:i,limit:s,offset:c,q:u,sort:l}})}}MarketplaceInsights.id="MarketplaceInsights";class Catalog extends Restful{get basePath(){return"/commerce/catalog/v1_beta"}getChangeRequest(e){return this.get(`/change_request/${e}`)}getChangeRequests({filter:e,limit:t,offset:r}={}){return this.get("/change_request",{params:{filter:e,limit:t,offset:r}})}getProduct(e){const t=encodeURIComponent(e);return this.get(`/product/${t}`)}search(e){return this.get("/product_summary/search",{params:{...e&&e}})}getProductMetadata(e,{otherApplicableCategoryIds:t,primaryCategoryId:r}={}){return this.get("/get_product_metadata",{params:{epid:e,other_applicable_category_ids:t,primary_category_id:r}})}getProductMetadataForCategories(e,t){return this.get("/get_product_metadata_for_categories",{params:{primary_category_id:e,other_applicable_category_ids:t}})}}Catalog.id="Catalog";class Charity extends Restful{get basePath(){return"/commerce/charity/v1"}getCharityOrg(e){return e=encodeURIComponent(e),this.get(`/charity_org/${e}`)}getCharityOrgs({limit:e,offset:t,q:r,registrationIds:n}){return this.get("/charity_org",{params:{limit:e,offset:t,q:r,registration_ids:n}})}getCharityOrgByLegacyId(e){return this.get("/charity_org/get_charity_org_by_legacy_id",{params:{legacy_charity_org_id:e}})}}Charity.id="Charity";class Identity extends Restful{get basePath(){return"/commerce/identity/v1"}get subdomain(){return"apiz"}getUser(){return this.get("/user/")}}Identity.id="Identity";class Notification extends Restful{get basePath(){return"/commerce/notification/v1"}getPublicKey(e){return e=encodeURIComponent(e),this.get(`/public_key/${e}`)}getTopic(e){return e=encodeURIComponent(e),this.get(`/topic/${e}`)}getTopics({limit:e,continuationToken:t}){return this.get("/topic",{params:{limit:e,continuation_token:t}})}getSubscriptions({limit:e,continuationToken:t}){return this.get("/subscription",{params:{limit:e,continuation_token:t}})}createSubscription(e){return this.post("/subscription",e)}getSubscription(e){return e=encodeURIComponent(e),this.get(`/subscription/${e}`)}updateSubscription(e,t){return e=encodeURIComponent(e),this.put(`/subscription/${e}`,t)}deleteSubscription(e){return e=encodeURIComponent(e),this.delete(`/subscription/${e}`)}enableSubscription(e){return e=encodeURIComponent(e),this.post(`/subscription/${e}/enable`)}disableSubscription(e){return e=encodeURIComponent(e),this.post(`/subscription/${e}/disable`)}test(e){return e=encodeURIComponent(e),this.post(`/subscription/${e}/test`)}getDestinations({limit:e,continuationToken:t}){return this.get("/destination",{params:{limit:e,continuation_token:t}})}createDestination(e){return this.post("/destination",e)}getDestination(e){return e=encodeURIComponent(e),this.get(`/destination/${e}`)}updateDestination(e,t){return e=encodeURIComponent(e),this.put(`/destination/${e}`,t)}deleteDestination(e){return e=encodeURIComponent(e),this.delete(`/destination/${e}`)}getConfig(){return this.get("/config")}updateConfig(e){return this.put("/config",e)}}Notification.id="Notification";class Taxonomy extends Restful{get basePath(){return"/commerce/taxonomy/v1"}getDefaultCategoryTreeId(e){return this.get("/get_default_category_tree_id",{params:{marketplace_id:e}})}getCategoryTree(e){const t=encodeURIComponent(e);return this.get(`/category_tree/${t}`)}getCategorySubtree(e,t){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_category_subtree`,{params:{category_id:t}})}getCategorySuggestions(e,t){return this.get(`/category_tree/${e}/get_category_suggestions`,{params:{q:t}})}getItemAspectsForCategory(e,t){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_item_aspects_for_category`,{params:{category_id:t}})}getCompatibilityProperties(e,t){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_compatibility_properties`,{params:{category_id:t}})}getCompatibilityPropertyValues(e,t,r){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_compatibility_property_values`,{params:{category_id:t,compatibility_property:r}})}fetchItemAspects(e){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/fetch_item_aspects`,{responseType:"arraybuffer"})}}Taxonomy.id="Taxonomy";class Translation extends Restful{get basePath(){return"/commerce/translation/v1_beta"}translate(e){return this.post("/translate",e)}}Translation.id="Translation";let en=class Analytics extends Restful{get basePath(){return"/developer/analytics/v1_beta"}getRateLimits(e,t){return this.get("/rate_limit/",{params:{api_context:e,api_name:t}})}getUserRateLimits(e,t){return this.get("/user_rate_limit/",{params:{api_context:e,api_name:t}})}};en.id="Analytics";class KeyManagement extends Restful{get subdomain(){return"apiz"}get basePath(){return"/developer/key_management/v1"}getSigningKeys(){return this.get("/signing_key")}createSigningKey(e){return this.post("/signing_key",e)}getSigningKey(e){return this.get(`/signing_key/${e}`)}}KeyManagement.id="KeyManagement";class Cancellation extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}approveCancellationRequest(e){return e=encodeURIComponent(e),this.post(`/cancellation/${e}/approve`)}checkCancellationEligibility(e){return this.post("/cancellation/check_eligibility",{legacyOrderId:e})}confirmRefundReceived(e,t){return e=encodeURIComponent(e),this.post(`/cancellation/${e}/confirm`,t)}createCancellation(e){return this.post("/cancellation",e)}getCancellation(e,t){return e=encodeURIComponent(e),this.get(`/cancellation/${e}`,{params:{fieldgroups:t}})}rejectCancellationRequest(e,t){return e=encodeURIComponent(e),this.post(`/cancellation/${e}/reject`,t)}search(e){return this.get("/cancellation/search",{params:{params:e}})}}Cancellation.id="Cancellation";class Case extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}appealCaseDecision(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/appeal`,t)}closeCase(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/close`,t)}getCase(e){const t=encodeURIComponent(e);return this.get(`/casemanagement/${t}`)}issueCaseRefund(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/issue_refund`,t)}provideReturnShipmentInfo(e,{shippingCarrierName:t,trackingNumber:r}){const n=encodeURIComponent(e);return this.post(`/casemanagement/${n}/provide_shipment_info`,{shippingCarrierName:t,trackingNumber:r})}providesReturnAddress(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/provide_return_address`,t)}search(e){return this.get("/casemanagement/search",{params:e})}}Case.id="Case";class Inquiry extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}checkInquiryEligibility(e){return this.post("/inquiry/check_eligibility",e)}closeInquiry(e,t){return e=encodeURIComponent(e),"string"==typeof t?.closeReason&&(t.closeReason=t.closeReason.trim()),this.post(`/inquiry/${e}/close`,t)}confirmInquiryRefund(e){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/confirm_refund`)}createInquiry(e){return"string"==typeof e.desiredOutcome&&(e.desiredOutcome=e.desiredOutcome.trim()),this.post("/inquiry",e)}escalateInquiry(e,t){return e=encodeURIComponent(e),t.escalateInquiryReason=t.escalateInquiryReason.trim(),this.post(`/inquiry/${e}/escalate`,t)}getInquiry(e){return e=encodeURIComponent(e),this.get(`/inquiry/${e}`)}issueInquiryRefund(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/issue_refund`,t)}provideInquiryRefundInfo(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/provide_refund_info`,t)}provideInquiryShipmentInfo(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/provide_shipment_info`,t)}search(e){return this.get("/inquiry/search",{params:e})}sendInquiryMessage(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/send_message`,t)}}Inquiry.id="Inquiry";class Return extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}addShippingLabelInfo(e,t){const r=encodeURIComponent(e);return this.post(`/return/${r}/add_shipping_label`,t)}cancelReturnRequest(e,t){const r=encodeURIComponent(e);return t&&t.buyerCloseReason&&(t.buyerCloseReason=t.buyerCloseReason.trim()),this.post(`/return/${r}/cancel`,t)}checkReturnEligibility(e){return this.post("/return/check_eligibility",e)}checkShippingLabelEligibility(e){const t=encodeURIComponent(e);return this.get(`/return/${t}/check_label_print_eligibility`)}createReturnDraft(e){return this.post("/return/draft",e)}createReturnRequest(e,t){return this.post("/return",e,{params:{fieldgroups:t}})}createReturnShippingLabel(e){const t=encodeURIComponent(e);return this.post(`/return/${t}/initiate_shipping_label`)}deleteReturnDraftFile(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.delete(`/return/draft/${e}/file/${t}`)}escalateReturn(e,t){const r=encodeURIComponent(e);return this.post(`/return/${r}/escalate`,t)}getReturn(e,t){return e=encodeURIComponent(e),this.get(`/return/${e}`,{params:{fieldgroups:t}})}getReturnDraft(e){const t=encodeURIComponent(e);return this.get(`/return/draft/${t}`)}getReturnDraftFiles(e){const t=encodeURIComponent(e);return this.get(`/return/draft/${t}/files`)}getReturnEstimate(e){return this.post("/return/estimate",e)}getReturnFiles(e){const t=encodeURIComponent(e);return this.get(`/return/${t}/files`)}getReturnPreferences(){return this.get("/return/preference")}getReturnShippingLabel(e){return e=encodeURIComponent(e),this.get(`/return/${e}/get_shipping_label`)}getShipmentTrackingInfo(e,t,r){return e=encodeURIComponent(e),this.get(`/return/${e}/tracking`,{params:{carrier_used:t,tracking_number:r}})}issueReturnRefund(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/issue_refund`,t)}markReturnReceived(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_as_received`,t)}markReturnRefundReceived(e){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_refund_received`)}markReturnRefundSent(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_refund_sent`,t)}markReturnShipped(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_as_shipped`,t)}processReturnRequest(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/decide`,t)}search(e){return this.get("/return/search",{params:e})}sendReturnMessage(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/send_message`,t)}sendReturnShippingLabel(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/send_shipping_label`,{},{params:{to_email_address:t}})}setReturnPreferences(e){return this.post("/return/preference",{rmaRequired:e})}submitReturnFile(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/file/submit`,{filePurpose:t})}updateReturnDraft(e,t){return e=encodeURIComponent(e),this.put(`/return/draft/${e}`,{returnRequest:t})}updateShipmentTrackingInfo(e,t){return e=encodeURIComponent(e),this.put(`/return/${e}/update_tracking`,t)}uploadReturnDraftFile(e,t){return e=encodeURIComponent(e),this.post(`/return/draft/${e}/file/upload`,t)}uploadReturnFile(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/file/upload`,t)}voidShippingLabel(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/void_shipping_label`,t)}}Return.id="Return";class Account extends Restful{get basePath(){return"/sell/account/v1"}getCustomPolicies(e){return this.get("/custom_policy/",{params:{policy_types:e}})}createCustomPolicy(e){return this.post("/custom_policy/",e)}getCustomPolicy(e){return e=encodeURIComponent(e),this.get(`/custom_policy/${e}`)}updateCustomPolicy(e,t){return e=encodeURIComponent(e),this.put(`/custom_policy/${e}`,t)}getFulfillmentPolicies(e){return this.get("/fulfillment_policy",{params:{marketplace_id:e}})}createFulfillmentPolicy(e){return this.post("/fulfillment_policy/",e)}updateFulfillmentPolicy(e,t){return e=encodeURIComponent(e),this.put(`/fulfillment_policy/${e}`,t)}deleteFulfillmentPolicy(e){return e=encodeURIComponent(e),this.delete(`/fulfillment_policy/${e}`)}getFulfillmentPolicy(e){return this.get(`/fulfillment_policy/${e}`)}getFulfillmentPolicyByName(e,t){return this.get("/fulfillment_policy/get_by_policy_name",{params:{marketplace_id:e,name:t}})}getPaymentPolicies(e){return this.get("/payment_policy",{params:{marketplace_id:e}})}getPaymentPolicy(e){return e=encodeURIComponent(e),this.get(`/payment_policy/${e}`)}createPaymentPolicy(e){return this.post("/payment_policy",e)}updatePaymentPolicy(e,t){return e=encodeURIComponent(e),this.put(`/payment_policy/${e}`,t)}deletePaymentPolicy(e){return e=encodeURIComponent(e),this.delete(`/payment_policy/${e}`)}getPaymentPolicyByName(e,t){return this.get("/payment_policy/get_by_policy_name",{params:{marketplace_id:e,name:t}})}getPaymentsProgram(e,t){e=encodeURIComponent(e);const r=encodeURIComponent(t);return this.get(`/payments_program/${e}/${r}`)}getPaymentsProgramOnboarding(e,t){e=encodeURIComponent(e);const r=encodeURIComponent(t);return this.get(`/payments_program/${e}/${r}/onboarding`)}getPrivileges(){return this.get("/privilege")}getOptedInPrograms(){return this.get("/program/get_opted_in_programs")}optInToProgram(e){return this.post("/program/opt_in",e)}optOutOfProgram(e){return this.post("/program/opt_out",e)}getRateTables(e){return this.get("/rate_table",{params:{country_code:e}})}getReturnPolicies(e){return this.get("/return_policy",{params:{marketplace_id:e}})}getReturnPolicy(e){return e=encodeURIComponent(e),this.get(`/return_policy/${e}`)}createReturnPolicy(e){return this.post("/return_policy",e)}updateReturnPolicy(e,t){return e=encodeURIComponent(e),this.put(`/return_policy/${e}`,t)}deleteReturnPolicy(e){return e=encodeURIComponent(e),this.delete(`/return_policy/${e}`)}getReturnPolicyByName(e,t){return this.get("/return_policy/get_by_policy_name",{params:{marketplace_id:e,name:t}})}getSalesTax(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/sales_tax/${e}/${t}`)}createOrReplaceSalesTax(e,t,r){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.put(`/sales_tax/${e}/${t}`,r)}deleteSalesTax(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.delete(`/sales_tax/${e}/${t}`)}getSalesTaxes(e){return this.get("/sales_tax",{params:{country_code:e}})}getSubscription({limit:e,continuationToken:t}={}){return this.get("/subscription",{params:{limit:e,continuation_token:t}})}getKYC(){return this.get("/kyc")}getAdvertisingEligibility(e){return this.get("/advertising_eligibility",{params:{program_types:e}})}getInventoryLocation(e){return e=encodeURIComponent(e),this.get(`/location/${e}`)}createInventoryLocation(e,t){return e=encodeURIComponent(e),this.post(`/location/${e}`,t)}deleteInventoryLocation(e){return e=encodeURIComponent(e),this.delete(`/location/${e}`)}disableInventoryLocation(e){return e=encodeURIComponent(e),this.post(`/location/${e}/disable`)}enableInventoryLocation(e){return e=encodeURIComponent(e),this.post(`/location/${e}/enable`)}getInventoryLocations({limit:e,offset:t}={}){return this.get("/location",{params:{limit:e,offset:t}})}updateInventoryLocation(e,t){return e=encodeURIComponent(e),this.post(`/location/${e}/update_location_details`,t)}getSalesTaxJurisdictions(e){return e=encodeURIComponent(e),this.get(`/country/${e}/sales_tax_jurisdiction`)}}Account.id="Account";class Analytics extends Restful{get basePath(){return"/sell/analytics/v1"}findSellerStandardsProfiles(){return this.get("/seller_standards_profile")}getSellerStandardsProfile(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/seller_standards_profile/${e}/${t}`)}getTrafficReport({dimension:e,filter:t,metric:r,sort:n}={}){return this.get("/traffic_report",{params:{dimension:e,filter:t,metric:r,sort:n}})}getCustomerServiceMetric(e,t){return this.get(`/customer_service_metric/${e}/${t}`)}}Analytics.id="Analytics";class Compliance extends Restful{get basePath(){return"/sell/compliance/v1"}getListingViolationsSummary(e){return this.get("/listing_violation_summary",{params:{compliance_type:e}})}getListingViolations({complianceType:e,offset:t,listingId:r,limit:n}={}){return this.get("/listing_violation",{params:{compliance_type:e,offset:t,listing_id:r,limit:n}})}suppressViolation(e){return this.post("/suppress_listing_violation",e)}}Compliance.id="Compliance";class Finances extends Restful{get basePath(){return"/sell/finances/v1"}get subdomain(){return"apiz"}getPayout(e){return e=encodeURIComponent(e),this.get(`/payout/${e}`)}getPayouts({filter:e,limit:t,offset:r,sort:n}={}){return this.get("/payout",{params:{filter:e,limit:t,offset:r,sort:n}})}getPayoutSummary({filter:e}={}){return this.get("/payout_summary",{params:{filter:e}})}getTransactions({filter:e,limit:t,offset:r,sort:n}={}){return this.get("/transaction",{params:{filter:e,limit:t,offset:r,sort:n}})}getTransactionSummary({filter:e}={}){return this.get("/transaction_summary",{params:{filter:e}})}getTransfer(e){return e=encodeURIComponent(e),this.get(`/transfer/${e}`)}getSellerFundsSummary(){return this.get("/seller_funds_summary")}}Finances.id="Finances";class Fulfillment extends Restful{get basePath(){return"/sell/fulfillment/v1"}getOrder(e,{fieldGroups:t}={}){return this.get(`/order/${e}`,{params:{fieldGroups:t}})}getOrders({filter:e,limit:t,offset:r,orderIds:n,fieldGroups:o}={}){return this.get("/order",{params:{filter:e,limit:t,offset:r,orderIds:Array.isArray(n)?n.join():n,fieldGroups:o}})}issueRefund(e,t){return e=encodeURIComponent(e),this.post(`/order/${e}/issue_refund`,t)}getShippingFulfillments(e){return e=encodeURIComponent(e),this.get(`/order/${e}/shipping_fulfillment`)}createShippingFulfillment(e,t){return e=encodeURIComponent(e),this.post(`/order/${e}/shipping_fulfillment`,t)}getShippingFulfillment(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/order/${e}/shipping_fulfillment/${t}`)}getPaymentDispute(e){return this.get(`/payment_dispute/${e}`)}fetchEvidenceContent(e){return this.get(`/payment_dispute/${e}/fetch_evidence_content`)}getActivities(e){return this.get(`/payment_dispute/${e}/activity`)}getPaymentDisputeSummaries({orderId:e,buyerUsername:t,openDateFrom:r,openDateTo:n,paymentDisputeStatus:o,limit:i,offset:s}){return this.get("/payment_dispute_summary",{params:{order_id:e,buyer_username:t,open_date_from:r,open_date_to:n,payment_dispute_status:o,limit:i,offset:s}})}contestPaymentDispute(e,t){return this.post(`/payment_dispute/${e}/contest`,t)}acceptPaymentDispute(e){return this.post(`/payment_dispute/${e}/accept`)}uploadEvidenceFile(e,t){return this.post(`/payment_dispute/${e}/upload_evidence_file`,t,{headers:{...dr}})}addEvidence(e,t){return this.post(`/payment_dispute/${e}/add_evidence`,t)}updateEvidence(e,t){return this.post(`/payment_dispute/${e}/update_evidence`,t)}}Fulfillment.id="Fulfillment";class Inventory extends Restful{get basePath(){return"/sell/inventory/v1"}getInventoryLocation(e){const t=encodeURIComponent(e);return this.get(`/location/${t}`)}disableInventoryLocation(e){const t=encodeURIComponent(e);return this.post(`/location/${t}/disable`)}enableInventoryLocation(e){const t=encodeURIComponent(e);return this.post(`/location/${t}/enable`)}getInventoryLocations({limit:e,offset:t}={}){return this.get("/location",{params:{limit:e,offset:t}})}createInventoryLocation(e,t){const r=encodeURIComponent(e);return this.post(`/location/${r}`,t)}deleteInventoryLocation(e){const t=encodeURIComponent(e);return this.delete(`/location/${t}`)}updateInventoryLocation(e,t){const r=encodeURIComponent(e);return this.post(`/location/${r}/update_location_details`,t)}getInventoryItem(e){return e=encodeURIComponent(e),this.get(`/inventory_item/${e}`)}createOrReplaceInventoryItem(e,t){return e=encodeURIComponent(e),this.put(`/inventory_item/${e}`,t)}deleteInventoryItem(e){return e=encodeURIComponent(e),this.delete(`/inventory_item/${e}`)}getInventoryItems({limit:e,offset:t}={}){return this.get("/inventory_item",{params:{limit:e,offset:t}})}bulkUpdatePriceQuantity(e){return this.post("/bulk_update_price_quantity",e)}bulkCreateOrReplaceInventoryItem(e){return this.post("/bulk_create_or_replace_inventory_item",e)}bulkGetInventoryItem(e){return this.post("/bulk_get_inventory_item",e)}getProductCompatibility(e){return e=encodeURIComponent(e),this.get(`/inventory_item/${e}/product_compatibility`)}createOrReplaceProductCompatibility(e,t){return e=encodeURIComponent(e),this.put(`/inventory_item/${e}/product_compatibility`,t)}deleteProductCompatibility(e){return e=encodeURIComponent(e),this.delete(`/inventory_item/${e}/product_compatibility`)}getOffers({sku:e,marketplaceId:t,format:r,limit:n,offset:o}={}){return this.get("/offer",{params:{sku:e,marketplace_id:t,format:r,limit:n,offset:o}})}getOffer(e){return e=encodeURIComponent(e),this.get(`/offer/${e}`)}createOffer(e){return this.post("/offer",e)}updateOffer(e,t){return e=encodeURIComponent(e),this.put(`/offer/${e}`,t)}deleteOffer(e){return this.delete(`/offer/${e}`)}publishOffer(e){const t=encodeURIComponent(e);return this.post(`/offer/${t}/publish/`)}publishOfferByInventoryItemGroup(e){return this.post("/offer/publish_by_inventory_item_group/",e)}withdrawOfferByInventoryItemGroup(e){return this.post("/offer/withdraw_by_inventory_item_group",e)}getListingFees(e){return this.post("/offer/get_listing_fees",e)}bulkCreateOffer(e){return this.post("/bulk_create_offer",e)}bulkPublishOffer(e){return this.post("/bulk_publish_offer",e)}withdrawOffer(e){const t=encodeURIComponent(e);return this.post(`/offer/${t}/withdraw`)}getInventoryItemGroup(e){return e=encodeURIComponent(e),this.get(`/inventory_item_group/${e}`)}createOrReplaceInventoryItemGroup(e,t){return e=encodeURIComponent(e),this.put(`/inventory_item_group/${e}`,t)}deleteInventoryItemGroup(e){return this.delete(`/inventory_item_group/${e}`)}bulkMigrateListing(e){return this.post("/bulk_migrate_listing",e)}}Inventory.id="Inventory";class Marketing extends Restful{get basePath(){return"/sell/marketing/v1"}bulkCreateAdsByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_create_ads_by_inventory_reference`,t)}bulkCreateAdsByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_create_ads_by_listing_id`,t)}bulkDeleteAdsByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_delete_ads_by_inventory_reference`,t)}bulkDeleteAdsByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_delete_ads_by_listing_id`,t)}bulkUpdateAdsBidByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_bid_by_inventory_reference`,t)}bulkUpdateAdsBidByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_bid_by_listing_id`,t)}getAds(e,{limit:t,listingIds:r,offset:n}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/ad`,{params:{limit:t,listing_ids:r,offset:n}})}createAdByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad`,t)}createAdsByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/create_ads_by_inventory_reference`,t)}getAd(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/ad_campaign/${e}/ad/${t}`)}deleteAd(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.delete(`/ad_campaign/${e}/ad/${t}`)}deleteAdsByInventoryReference(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/delete_ads_by_inventory_reference`)}getAdsByInventoryReference(e,t,r){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/get_ads_by_inventory_reference`,{params:{inventory_reference_id:t,inventory_reference_type:r}})}updateBid(e,t,r){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.post(`/ad_campaign/${e}/ad/${t}/update_bid`,r)}cloneCampaign(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/clone`,t)}getCampaigns({campaignName:e,campaignStatus:t,endDateRange:r,limit:n,offset:o,startDateRange:i}={}){return this.get("/ad_campaign",{params:{campaign_name:e,campaign_status:t,end_date_range:r,limit:n,offset:o,start_date_range:i}})}getCampaign(e){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}`)}createCampaign(e){return this.post("/ad_campaign",e)}deleteCampaign(e){return e=encodeURIComponent(e),this.delete(`/ad_campaign/${e}`)}endCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/end`)}findCampaignByAdReference({inventoryReferenceId:e,inventoryReferenceType:t,listingId:r}={}){return this.get("/ad_campaign/find_campaign_by_ad_reference",{params:{inventory_reference_id:e,inventory_reference_type:t,listing_id:r}})}getCampaignByName(e){return this.get("/ad_campaign/get_campaign_by_name",{params:{campaign_name:e}})}pauseCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/pause`)}resumeCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/resume`)}updateCampaignIdentification(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/update_campaign_identification`,t)}getReport(e){return e=encodeURIComponent(e),this.get(`/ad_report/${e}`)}getReportMetadata(){return this.get("/ad_report_metadata")}getReportMetadataForReportType(e){return e=encodeURIComponent(e),this.get(`/ad_report_metadata/${e}`)}getReportTasks({limit:e,offset:t,reportTaskStatuses:r}={}){return this.get("/ad_report_task",{params:{limit:e,offset:t,report_task_statuses:r}})}getReportTask(e){return e=encodeURIComponent(e),this.get(`/ad_report_task/${e}`)}createReportTask(e){return this.post("/ad_report_task",e)}deleteReportTask(e){return e=encodeURIComponent(e),this.delete(`/ad_report_task/${e}`)}createItemPriceMarkdownPromotion(e){return this.post("/item_price_markdown",e)}updateItemPriceMarkdownPromotion(e,t){return e=encodeURIComponent(e),this.put(`/item_price_markdown/${e}`,t)}deleteItemPriceMarkdownPromotion(e){return e=encodeURIComponent(e),this.delete(`/item_price_markdown/${e}`)}getItemPriceMarkdownPromotion(e){return e=encodeURIComponent(e),this.get(`/item_price_markdown/${e}`)}createItemPromotion(e){return this.post("/item_promotion",e)}updateItemPromotion(e,t){return e=encodeURIComponent(e),this.put(`/item_promotion/${e}`,t)}deleteItemPromotion(e){return e=encodeURIComponent(e),this.delete(`/item_promotion/${e}`)}getItemPromotion(e){return e=encodeURIComponent(e),this.get(`/item_promotion/${e}`)}getListingSet(e,{limit:t,offset:r,q:n,sort:o,status:i}={}){return e=encodeURIComponent(e),this.get(`/promotion/${e}/get_listing_set`,{params:{limit:t,offset:r,q:n,sort:o,status:i}})}getPromotions(e,{limit:t,offset:r,promotionStatus:n,promotionType:o,q:i,sort:s}={}){return this.get("/promotion",{params:{marketplace_id:e,limit:t,offset:r,promotion_status:n,promotion_type:o,q:i,sort:s}})}pausePromotion(e){const t=encodeURIComponent(e);return this.post(`/promotion/${t}/pause`)}resumePromotion(e){const t=encodeURIComponent(e);return this.post(`/promotion/${t}/resume`)}getPromotionReports(e,{limit:t,offset:r,promotionStatus:n,promotionType:o,q:i}={}){return this.get("/promotion_report",{params:{marketplace_id:e,limit:t,offset:r,promotion_status:n,promotion_type:o,q:i}})}getPromotionSummaryReport(e){return this.get("/promotion_summary_report",{params:{marketplace_id:e}})}}Marketing.id="Marketing";class Metadata extends Restful{get basePath(){return"/sell/metadata/v1"}getSalesTaxJurisdictions(e){return e=encodeURIComponent(e),this.get(`/country/${e}/sales_tax_jurisdiction`)}getAutomotivePartsCompatibilityPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_automotive_parts_compatibility_policies`,{params:{filter:t}})}getItemConditionPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_item_condition_policies`,{params:{filter:t}})}getListingStructurePolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_listing_structure_policies`,{params:{filter:t}})}getNegotiatedPricePolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_negotiated_price_policies`,{params:{filter:t}})}getProductAdoptionPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_product_adoption_policies`,{params:{filter:t}})}getReturnPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_return_policies`,{params:{filter:t}})}}Metadata.id="Metadata";class Recommendation extends Restful{get basePath(){return"/sell/recommendation/v1"}findListingRecommendations({filter:e,limit:t,offset:r}={},n){return this.post("/find",{data:n,params:{filter:e,limit:t,offset:r}})}}Recommendation.id="Recommendation";class Feed extends Restful{get basePath(){return"/sell/feed/v1"}getOrderTasks({dateRange:e,feedType:t,limit:r,lookBackDays:n,offset:o,scheduleId:i}={}){return this.get("/order_task",{params:{date_range:e,feed_type:t,limit:r,look_back_days:n,offset:o,schedule_id:i}})}createOrderTask(e){return this.post("/order_task",e)}getOrderTask(e){return e=encodeURIComponent(e),this.get(`/order_task/${e}`)}getInventoryTasks({feedType:e,scheduleId:t,lookBackDays:r,dateRange:n,limit:o,offset:i}={}){return this.get("/inventory_task",{params:{feed_type:e,schedule_id:t,look_back_days:r,date_range:n,limit:o,offset:i}})}createInventoryTask(e){return this.post("/inventory_task",e)}getInventoryTask(e){return e=encodeURIComponent(e),this.get(`/inventory_task/${e}`)}getSchedules({feedType:e,limit:t,offset:r}={}){return this.get("/schedule",{params:{feed_type:e,limit:t,offset:r}})}createSchedule(e){return this.post("/schedule",e)}getSchedule(e){return e=encodeURIComponent(e),this.get(`/schedule/${e}`)}updateSchedule(e,t){return e=encodeURIComponent(e),this.put(`/schedule/${e}`,t)}deleteSchedule(e){return e=encodeURIComponent(e),this.delete(`/schedule/${e}`)}getLatestResultFile(e){return e=encodeURIComponent(e),this.get(`/schedule/${e}/download_result_file`)}getScheduleTemplate(e){return e=encodeURIComponent(e),this.get(`/schedule_template/${e}`)}getScheduleTemplates({feedType:e,limit:t,offset:r}={}){return this.get("/schedule_template",{params:{feed_type:e,limit:t,offset:r}})}getTasks({dateRange:e,feedType:t,limit:r,lookBackDays:n,offset:o,scheduleId:i}={}){return this.get("/task",{params:{date_range:e,feed_type:t,limit:r,look_back_days:n,offset:o,schedule_id:i}})}createTask(e){return this.post("/task",e)}getInputFile(e){return e=encodeURIComponent(e),this.get(`/task/${e}/download_input_file`)}getResultFile(e){return e=encodeURIComponent(e),this.get(`/task/${e}/download_result_file`)}getTask(e){return e=encodeURIComponent(e),this.get(`/task/${e}`)}uploadFile(e,t){return e=encodeURIComponent(e),this.post(`/task/${e}/upload_file`,t,{headers:dr})}getCustomerServiceMetricTasks({dateRange:e,feedType:t,limit:r,lookBackDays:n,offset:o}={}){return this.get("/customer_service_metric_task",{params:{date_range:e,feed_type:t,limit:r,look_back_days:n,offset:o}})}createCustomerServiceMetricTask(e,t){return this.post("/customer_service_metric_task",t,{headers:{"accept-language":e}})}getCustomerServiceMetricTask(e){return e=encodeURIComponent(e),this.get(`/customer_service_metric_task/${e}`)}}Feed.id="Feed";class Logistics extends Restful{get basePath(){return"/sell/logistics/v1_beta"}createShippingQuote(e){return this.post("/shipping_quote",e)}getShippingQuote(e){return e=encodeURIComponent(e),this.get(`/shipping_quote/${e}`)}createFromShippingQuote(e){return this.post("/shipment/create_from_shipping_quote",e)}getShipment(e){return this.get(`/shipment/${e}`)}downloadLabelFile(e){return this.get(`/shipment/${e}/download_label_file`)}cancelShipment(e){return this.post(`/shipment/${e}/cancel`)}}Logistics.id="Logistics";class Negotiation extends Restful{get basePath(){return"/sell/negotiation/v1"}findEligibleItems({limit:e,offset:t}={}){return this.get("/find_eligible_items",{params:{limit:e,offset:t}})}sendOfferToInterestedBuyers(e){return this.post("/send_offer_to_interested_buyers",e)}}Negotiation.id="Negotiation";class Listing extends Restful{get basePath(){return"/sell/listing/v1_beta"}createItemDraft(e){return this.post("/item_draft/",e)}}var tn,rn;Listing.id="Listing",function(e){e.AskSellerQuestion="AskSellerQuestion",e.BestOffer="BestOffer",e.BestOfferDeclined="BestOfferDeclined",e.BestOfferPlaced="BestOfferPlaced",e.BidPlaced="BidPlaced",e.BidReceived="BidReceived",e.CounterOfferReceived="CounterOfferReceived",e.CustomCode="CustomCode",e.EndOfAuction="EndOfAuction",e.FeedbackLeft="FeedbackLeft",e.FeedbackReceived="FeedbackReceived",e.FeedbackStarChanged="FeedbackStarChanged",e.FixedPriceEndOfTransaction="FixedPriceEndOfTransaction",e.FixedPriceTransaction="FixedPriceTransaction",e.ItemAddedToWatchList="ItemAddedToWatchList",e.ItemEnded="ItemEnded",e.ItemListed="ItemListed",e.ItemLost="ItemLost",e.ItemMarkedPaid="ItemMarkedPaid",e.ItemMarkedShipped="ItemMarkedShipped",e.ItemRemovedFromWatchList="ItemRemovedFromWatchList",e.ItemSold="ItemSold",e.ItemUnsold="ItemUnsold",e.ItemWon="ItemWon",e.OutBid="OutBid",e.PriceChange="PriceChange",e.SecondChanceOffer="SecondChanceOffer",e.WatchedItemEndingSoon="WatchedItemEndingSoon"}(tn||(tn={})),function(e){e[e.GetPublicAlerts=0]="GetPublicAlerts",e[e.GetUserAlerts=1]="GetUserAlerts",e[e.Login=2]="Login",e[e.Logout=3]="Logout"}(rn||(rn={}));var nn,on=rn;!function(e){e[e.findCompletedItems=0]="findCompletedItems",e[e.findItemsAdvanced=1]="findItemsAdvanced",e[e.findItemsByCategory=2]="findItemsByCategory",e[e.findItemsByKeywords=3]="findItemsByKeywords",e[e.findItemsByProduct=4]="findItemsByProduct",e[e.findItemsIneBayStores=5]="findItemsIneBayStores",e[e.getHistograms=6]="getHistograms",e[e.getSearchKeywordsRecommendation=7]="getSearchKeywordsRecommendation",e[e.getVersion=8]="getVersion"}(nn||(nn={}));var sn,an=nn;!function(e){e[e.getMostWatchedItems=0]="getMostWatchedItems",e[e.getRelatedCategoryItems=1]="getRelatedCategoryItems",e[e.getSimilarItems=2]="getSimilarItems",e[e.getVersion=3]="getVersion"}(sn||(sn={}));var cn,un=sn;!function(e){e[e.FindProducts=0]="FindProducts",e[e.GetCategoryInfo=1]="GetCategoryInfo",e[e.GeteBayTime=2]="GeteBayTime",e[e.GetItemStatus=3]="GetItemStatus",e[e.GetMultipleItems=4]="GetMultipleItems",e[e.GetShippingCosts=5]="GetShippingCosts",e[e.GetSingleItem=6]="GetSingleItem",e[e.GetUserProfile=7]="GetUserProfile"}(cn||(cn={}));var ln,pn=cn;!function(e){e[e.AddDispute=0]="AddDispute",e[e.AddDisputeResponse=1]="AddDisputeResponse",e[e.AddFixedPriceItem=2]="AddFixedPriceItem",e[e.AddItem=3]="AddItem",e[e.AddItemFromSellingManagerTemplate=4]="AddItemFromSellingManagerTemplate",e[e.AddItems=5]="AddItems",e[e.AddMemberMessageAAQToPartner=6]="AddMemberMessageAAQToPartner",e[e.AddMemberMessageRTQ=7]="AddMemberMessageRTQ",e[e.AddMemberMessagesAAQToBidder=8]="AddMemberMessagesAAQToBidder",e[e.AddOrder=9]="AddOrder",e[e.AddSecondChanceItem=10]="AddSecondChanceItem",e[e.AddSellingManagerInventoryFolder=11]="AddSellingManagerInventoryFolder",e[e.AddSellingManagerProduct=12]="AddSellingManagerProduct",e[e.AddSellingManagerTemplate=13]="AddSellingManagerTemplate",e[e.AddToItemDescription=14]="AddToItemDescription",e[e.AddToWatchList=15]="AddToWatchList",e[e.AddTransactionConfirmationItem=16]="AddTransactionConfirmationItem",e[e.CompleteSale=17]="CompleteSale",e[e.ConfirmIdentity=18]="ConfirmIdentity",e[e.DeleteMyMessages=19]="DeleteMyMessages",e[e.DeleteSellingManagerInventoryFolder=20]="DeleteSellingManagerInventoryFolder",e[e.DeleteSellingManagerItemAutomationRule=21]="DeleteSellingManagerItemAutomationRule",e[e.DeleteSellingManagerProduct=22]="DeleteSellingManagerProduct",e[e.DeleteSellingManagerTemplate=23]="DeleteSellingManagerTemplate",e[e.DeleteSellingManagerTemplateAutomationRule=24]="DeleteSellingManagerTemplateAutomationRule",e[e.DisableUnpaidItemAssistance=25]="DisableUnpaidItemAssistance",e[e.EndFixedPriceItem=26]="EndFixedPriceItem",e[e.EndItem=27]="EndItem",e[e.EndItems=28]="EndItems",e[e.ExtendSiteHostedPictures=29]="ExtendSiteHostedPictures",e[e.FetchToken=30]="FetchToken",e[e.GetAccount=31]="GetAccount",e[e.GetAdFormatLeads=32]="GetAdFormatLeads",e[e.GetAllBidders=33]="GetAllBidders",e[e.GetApiAccessRules=34]="GetApiAccessRules",e[e.GetBestOffers=35]="GetBestOffers",e[e.GetBidderList=36]="GetBidderList",e[e.GetCategories=37]="GetCategories",e[e.GetCategoryFeatures=38]="GetCategoryFeatures",e[e.GetCategoryMappings=39]="GetCategoryMappings",e[e.GetCategorySpecifics=40]="GetCategorySpecifics",e[e.GetChallengeToken=41]="GetChallengeToken",e[e.GetCharities=42]="GetCharities",e[e.GetClientAlertsAuthToken=43]="GetClientAlertsAuthToken",e[e.GetContextualKeywords=44]="GetContextualKeywords",e[e.GetDescriptionTemplates=45]="GetDescriptionTemplates",e[e.GetDispute=46]="GetDispute",e[e.GeteBayDetails=47]="GeteBayDetails",e[e.GeteBayOfficialTime=48]="GeteBayOfficialTime",e[e.GetFeedback=49]="GetFeedback",e[e.GetItem=50]="GetItem",e[e.GetItemsAwaitingFeedback=51]="GetItemsAwaitingFeedback",e[e.GetItemShipping=52]="GetItemShipping",e[e.GetItemTransactions=53]="GetItemTransactions",e[e.GetMemberMessages=54]="GetMemberMessages",e[e.GetMessagePreferences=55]="GetMessagePreferences",e[e.GetMyeBayBuying=56]="GetMyeBayBuying",e[e.GetMyeBayReminders=57]="GetMyeBayReminders",e[e.GetMyeBaySelling=58]="GetMyeBaySelling",e[e.GetMyMessages=59]="GetMyMessages",e[e.GetNotificationPreferences=60]="GetNotificationPreferences",e[e.GetNotificationsUsage=61]="GetNotificationsUsage",e[e.GetOrders=62]="GetOrders",e[e.GetOrderTransactions=63]="GetOrderTransactions",e[e.GetPromotionalSaleDetails=64]="GetPromotionalSaleDetails",e[e.GetSellerDashboard=65]="GetSellerDashboard",e[e.GetSellerEvents=66]="GetSellerEvents",e[e.GetSellerList=67]="GetSellerList",e[e.GetSellerTransactions=68]="GetSellerTransactions",e[e.GetSellingManagerAlerts=69]="GetSellingManagerAlerts",e[e.GetSellingManagerEmailLog=70]="GetSellingManagerEmailLog",e[e.GetSellingManagerInventory=71]="GetSellingManagerInventory",e[e.GetSellingManagerInventoryFolder=72]="GetSellingManagerInventoryFolder",e[e.GetSellingManagerItemAutomationRule=73]="GetSellingManagerItemAutomationRule",e[e.GetSellingManagerSaleRecord=74]="GetSellingManagerSaleRecord",e[e.GetSellingManagerSoldListings=75]="GetSellingManagerSoldListings",e[e.GetSellingManagerTemplateAutomationRule=76]="GetSellingManagerTemplateAutomationRule",e[e.GetSellingManagerTemplates=77]="GetSellingManagerTemplates",e[e.GetSessionID=78]="GetSessionID",e[e.GetShippingDiscountProfiles=79]="GetShippingDiscountProfiles",e[e.GetStore=80]="GetStore",e[e.GetStoreCategoryUpdateStatus=81]="GetStoreCategoryUpdateStatus",e[e.GetStoreCustomPage=82]="GetStoreCustomPage",e[e.GetStoreOptions=83]="GetStoreOptions",e[e.GetStorePreferences=84]="GetStorePreferences",e[e.GetSuggestedCategories=85]="GetSuggestedCategories",e[e.GetTaxTable=86]="GetTaxTable",e[e.GetTokenStatus=87]="GetTokenStatus",e[e.GetUser=88]="GetUser",e[e.GetUserContactDetails=89]="GetUserContactDetails",e[e.GetUserDisputes=90]="GetUserDisputes",e[e.GetUserPreferences=91]="GetUserPreferences",e[e.GetVeROReasonCodeDetails=92]="GetVeROReasonCodeDetails",e[e.GetVeROReportStatus=93]="GetVeROReportStatus",e[e.LeaveFeedback=94]="LeaveFeedback",e[e.MoveSellingManagerInventoryFolder=95]="MoveSellingManagerInventoryFolder",e[e.PlaceOffer=96]="PlaceOffer",e[e.RelistFixedPriceItem=97]="RelistFixedPriceItem",e[e.RelistItem=98]="RelistItem",e[e.RemoveFromWatchList=99]="RemoveFromWatchList",e[e.RespondToBestOffer=100]="RespondToBestOffer",e[e.RespondToFeedback=101]="RespondToFeedback",e[e.ReviseCheckoutStatus=102]="ReviseCheckoutStatus",e[e.ReviseFixedPriceItem=103]="ReviseFixedPriceItem",e[e.ReviseInventoryStatus=104]="ReviseInventoryStatus",e[e.ReviseItem=105]="ReviseItem",e[e.ReviseMyMessages=106]="ReviseMyMessages",e[e.ReviseMyMessagesFolders=107]="ReviseMyMessagesFolders",e[e.ReviseSellingManagerInventoryFolder=108]="ReviseSellingManagerInventoryFolder",e[e.ReviseSellingManagerProduct=109]="ReviseSellingManagerProduct",e[e.ReviseSellingManagerSaleRecord=110]="ReviseSellingManagerSaleRecord",e[e.ReviseSellingManagerTemplate=111]="ReviseSellingManagerTemplate",e[e.RevokeToken=112]="RevokeToken",e[e.SaveItemToSellingManagerTemplate=113]="SaveItemToSellingManagerTemplate",e[e.SellerReverseDispute=114]="SellerReverseDispute",e[e.SendInvoice=115]="SendInvoice",e[e.SetMessagePreferences=116]="SetMessagePreferences",e[e.SetNotificationPreferences=117]="SetNotificationPreferences",e[e.SetPromotionalSale=118]="SetPromotionalSale",e[e.SetPromotionalSaleListings=119]="SetPromotionalSaleListings",e[e.SetSellingManagerFeedbackOptions=120]="SetSellingManagerFeedbackOptions",e[e.SetSellingManagerItemAutomationRule=121]="SetSellingManagerItemAutomationRule",e[e.SetSellingManagerTemplateAutomationRule=122]="SetSellingManagerTemplateAutomationRule",e[e.SetShippingDiscountProfiles=123]="SetShippingDiscountProfiles",e[e.SetStore=124]="SetStore",e[e.SetStoreCategories=125]="SetStoreCategories",e[e.SetStoreCustomPage=126]="SetStoreCustomPage",e[e.SetStorePreferences=127]="SetStorePreferences",e[e.SetTaxTable=128]="SetTaxTable",e[e.SetUserNotes=129]="SetUserNotes",e[e.SetUserPreferences=130]="SetUserPreferences",e[e.UploadSiteHostedPictures=131]="UploadSiteHostedPictures",e[e.ValidateChallengeInput=132]="ValidateChallengeInput",e[e.ValidateTestUserRegistration=133]="ValidateTestUserRegistration",e[e.VerifyAddFixedPriceItem=134]="VerifyAddFixedPriceItem",e[e.VerifyAddItem=135]="VerifyAddItem",e[e.VerifyAddSecondChanceItem=136]="VerifyAddSecondChanceItem",e[e.VerifyRelistItem=137]="VerifyRelistItem",e[e.VeROReportItems=138]="VeROReportItems"}(ln||(ln={}));var dn,En,fn,_n,hn,gn,mn,Rn,An,yn,In,Tn,Sn,Nn,Cn,On,Pn,bn,Dn,Un,Ln,Mn,Bn,Fn,vn,xn,wn,kn,Gn,Yn,Hn,$n,jn,Vn,Kn,Wn,qn,Xn,Jn,zn,Qn,Zn,eo,to,ro,no=ln;class Traditional extends Api{constructor(){super(...arguments),this.createXMLRequest=(e,t)=>async(r,n)=>{const o={...Kr,...n};try{return await this.request(o,t,e,r)}catch(n){if(this.config.autoRefreshToken&&(n.name===EBayIAFTokenExpired.name||n.name===EBayIAFTokenInvalid.name))return await this.request(o,t,e,r,!0);throw n}}}createTradingApi(){if(!this.config.devId)throw new Error("devId is required for trading API.");if("number"!=typeof this.config.siteId)throw new Error("siteId is required for trading API.");return this.createTraditionalXMLApi({endpoint:{production:"https://api.ebay.com/ws/api.dll",sandbox:"https://api.sandbox.ebay.com/ws/api.dll"},calls:no,xmlns:"urn:ebay:apis:eBLBaseComponents",headers:(e,t)=>({"X-EBAY-API-CALL-NAME":e,"X-EBAY-API-CERT-NAME":this.config.certId,"X-EBAY-API-APP-NAME":this.config.appId,"X-EBAY-API-DEV-NAME":this.config.devId,"X-EBAY-API-SITEID":this.config.siteId,"X-EBAY-API-COMPATIBILITY-LEVEL":967,...t&&{"X-EBAY-API-IAF-TOKEN":t}})})}createShoppingApi(){if("number"!=typeof this.config.siteId)throw new Error("siteId is required for shopping API.");return this.createTraditionalXMLApi({endpoint:{production:"https://open.api.ebay.com/shopping",sandbox:"https://open.api.sandbox.ebay.com/shopping"},xmlns:"urn:ebay:apis:eBLBaseComponents",calls:pn,headers:(e,t)=>({"X-EBAY-API-CALL-NAME":e,"X-EBAY-API-SITE-ID":this.config.siteId,"X-EBAY-API-VERSION":863,"X-EBAY-API-REQUEST-ENCODING":"xml",...t&&{"X-EBAY-API-IAF-TOKEN":t}})})}createFindingApi(){return this.createTraditionalXMLApi({endpoint:{production:"https://svcs.ebay.com/services/search/FindingService/v1",sandbox:"https://svcs.sandbox.ebay.com/services/search/FindingService/v1"},xmlns:"http://www.ebay.com/marketplace/search/v1/services",calls:an,headers:e=>({"X-EBAY-SOA-SECURITY-APPNAME":this.config.appId,"X-EBAY-SOA-OPERATION-NAME":e})})}createClientAlertsApi(){if("number"!=typeof this.config.siteId)throw new Error("siteId is required for client alerts API.");const e={endpoint:{production:"https://clientalerts.ebay.com/ws/ecasvc/ClientAlerts",sandbox:"https://clientalerts.sandbox.ebay.com/ws/ecasvc/ClientAlerts"},calls:on},t=e.endpoint[this.config.sandbox?"sandbox":"production"],paramsSerializer=e=>ur.stringify(e,{allowDots:!0}).replace(/%5B/gi,"(").replace(/%5D/gi,")"),r={appid:this.config.appId,siteid:this.config.siteId,version:643},n={};return Object.keys(e.calls).forEach((e=>{n[e]=async n=>this.req.get(t,{paramsSerializer:{serialize:paramsSerializer},params:{...r,...n,callname:e}})})),n}createMerchandisingApi(){return this.createTraditionalXMLApi({endpoint:{production:"https://svcs.ebay.com/MerchandisingService",sandbox:"https://svcs.sandbox.ebay.com/MerchandisingService"},xmlns:"http://www.ebay.com/marketplace/services",calls:un,headers:e=>({"EBAY-SOA-CONSUMER-ID":this.config.appId,"X-EBAY-SOA-OPERATION-NAME":e})})}createBusinessPolicyManagementApi(){throw new Error("Important! This API is deprecated and will be decommissioned on January 31, 2022. We recommend that you migrate to the fulfillment_policy, payment_policy, and return_policy resources of the Account API to set up and manage all of your fulfillment, payment, and return business policies.")}async request(e,t,r,n,o=!1){try{o&&await this.auth.OAuth2.refreshToken();const i=await this.getConfig(t,r,e),s=new XMLRequest(r,n,i,this.req);return await s.request()}catch(e){handleEBayError(e)}}async getConfig(e,t,r){const n=this.auth.authNAuth.eBayAuthToken,o=!n&&r.useIaf?await this.auth.OAuth2.getAccessToken():null,i=!n&&o;return{...r,xmlns:e.xmlns,endpoint:e.endpoint[this.config.sandbox?"sandbox":"production"],headers:{...e.headers(t,i?o:null),...r.headers},...i?{}:{eBayAuthToken:n}}}createTraditionalXMLApi(e){const t={};return Object.keys(e.calls).forEach((r=>{t[r]=this.createXMLRequest(r,e)})),t}}class ApiFactory extends Api{constructor(){super(...arguments),this._restful={}}createBuyApi(){return{browse:this.createRestfulApi(Browse),feed:this.createRestfulApi(Qr),marketing:this.createRestfulApi(Zr),offer:this.createRestfulApi(Offer),order:this.createRestfulApi(Order),deal:this.createRestfulApi(Deal),marketplaceInsights:this.createRestfulApi(MarketplaceInsights)}}createCommerceApi(){return{catalog:this.createRestfulApi(Catalog),identity:this.createRestfulApi(Identity),taxonomy:this.createRestfulApi(Taxonomy),translation:this.createRestfulApi(Translation),charity:this.createRestfulApi(Charity),notification:this.createRestfulApi(Notification)}}createDeveloperApi(){return{analytics:this.createRestfulApi(en),keyManagement:this.createRestfulApi(KeyManagement)}}createPostOrderApi(){return{cancellation:this.createRestfulApi(Cancellation),case:this.createRestfulApi(Case),inquiry:this.createRestfulApi(Inquiry),return:this.createRestfulApi(Return)}}createSellApi(){return{account:this.createRestfulApi(Account),analytics:this.createRestfulApi(Analytics),compliance:this.createRestfulApi(Compliance),fulfillment:this.createRestfulApi(Fulfillment),inventory:this.createRestfulApi(Inventory),marketing:this.createRestfulApi(Marketing),metadata:this.createRestfulApi(Metadata),recommendation:this.createRestfulApi(Recommendation),finances:this.createRestfulApi(Finances),feed:this.createRestfulApi(Feed),logistics:this.createRestfulApi(Logistics),negotiation:this.createRestfulApi(Negotiation),listing:this.createRestfulApi(Listing)}}get traditional(){return this._traditional?this._traditional:this._traditional=new Traditional(this.config,this.req,this.auth)}createTradingApi(){return this.traditional.createTradingApi()}createShoppingApi(){return this.traditional.createShoppingApi()}createFindingApi(){return this.traditional.createFindingApi()}createClientAlertsApi(){return this.traditional.createClientAlertsApi()}createMerchandisingApi(){return this.traditional.createMerchandisingApi()}createRestfulApi(e){const t=e.id;return this._restful[t]||(this._restful[t]=new e(this.config,this.req,this.auth))}}!function(e){e[e.EBAY_US=0]="EBAY_US",e[e.EBAY_ENCA=2]="EBAY_ENCA",e[e.EBAY_GB=3]="EBAY_GB",e[e.EBAY_AU=15]="EBAY_AU",e[e.EBAY_AT=16]="EBAY_AT",e[e.EBAY_FRBE=23]="EBAY_FRBE",e[e.EBAY_FR=71]="EBAY_FR",e[e.EBAY_DE=77]="EBAY_DE",e[e.EBAY_MOTOR=100]="EBAY_MOTOR",e[e.EBAY_IT=101]="EBAY_IT",e[e.EBAY_NLBE=123]="EBAY_NLBE",e[e.EBAY_NL=146]="EBAY_NL",e[e.EBAY_ES=186]="EBAY_ES",e[e.EBAY_CH=193]="EBAY_CH",e[e.EBAY_HK=201]="EBAY_HK",e[e.EBAY_IN=203]="EBAY_IN",e[e.EBAY_IE=205]="EBAY_IE",e[e.EBAY_MY=207]="EBAY_MY",e[e.EBAY_FRCA=210]="EBAY_FRCA",e[e.EBAY_PH=211]="EBAY_PH",e[e.EBAY_PL=212]="EBAY_PL",e[e.EBAY_SG=216]="EBAY_SG"}(dn=dn||(dn={})),function(e){e.EBAY_US="EBAY_US",e.EBAY_AT="EBAY_AT",e.EBAY_AU="EBAY_AU",e.EBAY_BE="EBAY_BE",e.EBAY_CA="EBAY_CA",e.EBAY_CH="EBAY_CH",e.EBAY_DE="EBAY_DE",e.EBAY_ES="EBAY_ES",e.EBAY_FR="EBAY_FR",e.EBAY_GB="EBAY_GB",e.EBAY_HK="EBAY_HK",e.EBAY_IE="EBAY_IE",e.EBAY_IN="EBAY_IN",e.EBAY_IT="EBAY_IT",e.EBAY_MY="EBAY_MY",e.EBAY_NL="EBAY_NL",e.EBAY_PH="EBAY_PH",e.EBAY_PL="EBAY_PL",e.EBAY_SG="EBAY_SG",e.EBAY_TH="EBAY_TH",e.EBAY_TW="EBAY_TW",e.EBAY_VN="EBAY_VN",e.EBAY_MOTORS_US="EBAY_MOTORS_US"}(En=En||(En={})),function(e){e.BUYER="BUYER",e.SELLER="SELLER"}(fn=fn||(fn={})),function(e){e.DEFAULT="DEFAULT",e.SUMMARY="SUMMARY"}(_n=_n||(_n={})),function(e){e.CLOSED="CLOSED",e.CS_CLOSED="CS_CLOSED",e.ON_HOLD="ON_HOLD",e.OPEN="OPEN",e.OTHER="OTHER",e.REFUND_AGREED_BUT_FAILED="REFUND_AGREED_BUT_FAILED",e.WAITING_CS="WAITING_CS",e.WAITING_DELIVERY="WAITING_DELIVERY"}(hn=hn||(hn={})),function(e){e.DEFAULT="DEFAULT",e.SUMMARY="SUMMARY"}(gn=gn||(gn={})),function(e){e.CLOSED="CLOSED",e.CLOSED_WITH_ESCALATION="CLOSED_WITH_ESCALATION",e.CS_CLOSED="CS_CLOSED",e.OPEN="OPEN",e.OTHER="OTHER",e.PENDING="PENDING",e.WAITING_BUYER_RESPONSE="WAITING_BUYER_RESPONSE",e.WAITING_SELLER_RESPONSE="WAITING_SELLER_RESPONSE"}(mn=mn||(mn={})),function(e){e.AUSTRALIA_POST="AUSTRALIA_POST",e.BARTOLINI="BARTOLINI",e.CANADA_POST="CANADA_POST",e.COLISSIMO="COLISSIMO",e.COLLECT_PLUS="COLLECT_PLUS",e.CORREOS="CORREOS",e.DEUTSCHE_POST="DEUTSCHE_POST",e.DHL="DHL",e.FEDEX="FEDEX",e.HERMES="HERMES",e.LA_POSTE="LA_POSTE",e.MONDIAL_RELAY="MONDIAL_RELAY",e.MRW="MRW",e.NEXIVE="NEXIVE",e.OTHER="OTHER",e.PARCEL_FORCE="PARCEL_FORCE",e.POSTE="POSTE",e.ROYAL_MAIL="ROYAL_MAIL",e.SEUR="SEUR",e.UNKNOWN="UNKNOWN",e.UPS="UPS",e.USPS="USPS"}(Rn=Rn||(Rn={})),function(e){e.ARRIVED_DAMAGED="ARRIVED_DAMAGED",e.ARRIVED_LATE="ARRIVED_LATE",e.BUYER_CANCEL_ORDER="BUYER_CANCEL_ORDER",e.BUYER_NO_SHOW="BUYER_NO_SHOW",e.BUYER_NOT_SCHEDULED="BUYER_NOT_SCHEDULED",e.BUYER_REFUSED_TO_PICKUP="BUYER_REFUSED_TO_PICKUP",e.DEFECTIVE_ITEM="DEFECTIVE_ITEM",e.DIFFERENT_FROM_LISTING="DIFFERENT_FROM_LISTING",e.EXPIRED_ITEM="EXPIRED_ITEM",e.FAKE_OR_COUNTERFEIT="FAKE_OR_COUNTERFEIT",e.FOUND_BETTER_PRICE="FOUND_BETTER_PRICE",e.IN_STORE_RETURN="IN_STORE_RETURN",e.MISSING_PARTS="MISSING_PARTS",e.NO_LONGER_NEED_ITEM="NO_LONGER_NEED_ITEM",e.NO_REASON="NO_REASON",e.NOT_AS_DESCRIBED="NOT_AS_DESCRIBED",e.ORDERED_ACCIDENTALLY="ORDERED_ACCIDENTALLY",e.ORDERED_DIFFERENT_ITEM="ORDERED_DIFFERENT_ITEM",e.ORDERED_WRONG_ITEM="ORDERED_WRONG_ITEM",e.OTHER="OTHER",e.OUT_OF_STOCK="OUT_OF_STOCK",e.RETURNING_GIFT="RETURNING_GIFT",e.VALET_DELIVERY_ISSUES="VALET_DELIVERY_ISSUES",e.VALET_UNAVAILABLE="VALET_UNAVAILABLE",e.WRONG_SIZE="WRONG_SIZE"}(An=An||(An={})),function(e){e.CREATE="CREATE",e.REQUEST="REQUEST",e.UNKNOWN="UNKNOWN"}(yn=yn||(yn={})),function(e){e.EXCHANGE="EXCHANGE",e.MONEY_BACK="MONEY_BACK",e.REPLACEMENT="REPLACEMENT",e.UNKNOWN="UNKNOWN"}(In=In||(In={})),function(e){e.FULL="FULL",e.NONE="NONE",e.SUMMARY="SUMMARY"}(Tn=Tn||(Tn={})),function(e){e.BUYER_NORESPONSE="BUYER_NORESPONSE",e.BUYER_RETURNED_WRONG_ITEM="BUYER_RETURNED_WRONG_ITEM",e.DISAGREE_WITH_RETURN_REASON="DISAGREE_WITH_RETURN_REASON",e.ITEM_NOT_RECEIVED="ITEM_NOT_RECEIVED",e.ITEM_RECEIVED_IN_DIFFERENT_CONDITION="ITEM_RECEIVED_IN_DIFFERENT_CONDITION",e.NEW_ITEM_NOT_RECEIVED="NEW_ITEM_NOT_RECEIVED",e.NO_REFUND_FOR_RETURN_SHIPPING="NO_REFUND_FOR_RETURN_SHIPPING",e.NO_REFUND_RECEIVED="NO_REFUND_RECEIVED",e.OTHER="OTHER",e.RECEIVED_WRONG_ITEM="RECEIVED_WRONG_ITEM",e.SELLER_NO_RESPONSE="SELLER_NO_RESPONSE",e.TROUBLE_COMMUNICATION_WITH_BUYER="TROUBLE_COMMUNICATION_WITH_BUYER",e.TROUBLE_COMMUNICATION_WITH_SELLER="TROUBLE_COMMUNICATION_WITH_SELLER"}(Sn=Sn||(Sn={})),function(e){e.ACCEPT_PARTIAL_REFUND="ACCEPT_PARTIAL_REFUND",e.ACCEPT_REPLACEMENT_OFFER="ACCEPT_REPLACEMENT_OFFER",e.APPROVE="APPROVE",e.APPROVE_WITHOUT_EBAY_LABEL="APPROVE_WITHOUT_EBAY_LABEL",e.DECLINE="DECLINE",e.DECLINE_PARTIAL_REFUND="DECLINE_PARTIAL_REFUND",e.DECLINE_REPLACEMENT_OFFER="DECLINE_REPLACEMENT_OFFER",e.OFFER_PARTIAL_REFUND="OFFER_PARTIAL_REFUND",e.OFFER_REPLACEMENT="OFFER_REPLACEMENT",e.OFFER_RETURN="OFFER_RETURN",e.OFFER_RETURN_WITHOUT_LABEL="OFFER_RETURN_WITHOUT_LABEL",e.PROVIDE_RMA="PROVIDE_RMA",e.UNKNOWN="UNKNOWN"}(Nn=Nn||(Nn={})),function(e){e.MOTORS_VEHICLES="MOTORS_VEHICLES",e.ALL_EXCLUDING_MOTORS_VEHICLES="ALL_EXCLUDING_MOTORS_VEHICLES"}(Cn=Cn||(Cn={})),function(e){e.ALL_OPEN="ALL_OPEN",e.ALL_OPEN_REPLACEMENT="ALL_OPEN_REPLACEMENT",e.ALL_OPEN_RETURN="ALL_OPEN_RETURN",e.CLOSED="CLOSED",e.EBAY_PLUS="EBAY_PLUS",e.ITEM_DELIVERED="ITEM_DELIVERED",e.ITEM_SHIPPED="ITEM_SHIPPED",e.RETURN_STARTED="RETURN_STARTED",e.SELLER_ACTION_DUE="SELLER_ACTION_DUE",e.SELLER_ACTION_OVERDUE="SELLER_ACTION_OVERDUE",e.SELLER_NO_ACTION="SELLER_NO_ACTION",e.UNKNOWN="UNKNOWN"}(On=On||(On={})),function(e){e.AUTO_REFUND_INITIATED="AUTO_REFUND_INITIATED",e.CLOSED="CLOSED",e.INITIAL="INITIAL",e.ITEM_DELIVERED="ITEM_DELIVERED",e.ITEM_KEPT="ITEM_KEPT",e.ITEM_READY_TO_SHIP="ITEM_READY_TO_SHIP",e.ITEM_SHIPPED="ITEM_SHIPPED",e.LESS_THAN_A_FULL_REFUND_ISSUED="LESS_THAN_A_FULL_REFUND_ISSUED",e.PARTIAL_REFUND_AS_PAYOUT_INITIATED="PARTIAL_REFUND_AS_PAYOUT_INITIATED",e.PARTIAL_REFUND_DECLINED="PARTIAL_REFUND_DECLINED",e.PARTIAL_REFUND_FAILED="PARTIAL_REFUND_FAILED",e.PARTIAL_REFUND_INITIATED="PARTIAL_REFUND_INITIATED",e.PARTIAL_REFUND_NON_PAYPAL_INITIATED="PARTIAL_REFUND_NON_PAYPAL_INITIATED",e.PARTIAL_REFUND_REQUESTED="PARTIAL_REFUND_REQUESTED",e.PARTIAL_REFUNDED="PARTIAL_REFUNDED",e.PAYOUT_INITIATED="PAYOUT_INITIATED",e.REFUND_AS_PAYOUT_INITIATED="REFUND_AS_PAYOUT_INITIATED",e.REFUND_FAILED="REFUND_FAILED",e.REFUND_INITIATED="REFUND_INITIATED",e.REFUND_SENT_PENDING_CONFIRMATION="REFUND_SENT_PENDING_CONFIRMATION",e.REFUND_TIMEOUT="REFUND_TIMEOUT",e.REPLACED="REPLACED",e.REPLACEMENT_CLOSED="REPLACEMENT_CLOSED",e.REPLACEMENT_DELIVERED="REPLACEMENT_DELIVERED",e.REPLACEMENT_LABEL_PENDING="REPLACEMENT_LABEL_PENDING",e.REPLACEMENT_LABEL_PENDING_TIMEOUT="REPLACEMENT_LABEL_PENDING_TIMEOUT",e.REPLACEMENT_LABEL_REQUESTED="REPLACEMENT_LABEL_REQUESTED",e.REPLACEMENT_LABEL_REQUESTED_TIMEOUT="REPLACEMENT_LABEL_REQUESTED_TIMEOUT",e.REPLACEMENT_OFFER_PENDING="REPLACEMENT_OFFER_PENDING",e.REPLACEMENT_REQUEST_TIMEOUT="REPLACEMENT_REQUEST_TIMEOUT",e.REPLACEMENT_REQUESTED="REPLACEMENT_REQUESTED",e.REPLACEMENT_RMA_PENDING="REPLACEMENT_RMA_PENDING",e.REPLACEMENT_SHIPPED="REPLACEMENT_SHIPPED",e.REPLACEMENT_STARTED="REPLACEMENT_STARTED",e.RETURN_LABEL_PENDING="RETURN_LABEL_PENDING",e.RETURN_LABEL_PENDING_TIMEOUT="RETURN_LABEL_PENDING_TIMEOUT",e.RETURN_LABEL_REQUESTED="RETURN_LABEL_REQUESTED",e.RETURN_LABEL_REQUESTED_TIMEOUT="RETURN_LABEL_REQUESTED_TIMEOUT",e.RETURN_REJECTED="RETURN_REJECTED",e.RETURN_REQUEST_TIMEOUT="RETURN_REQUEST_TIMEOUT",e.RETURN_REQUESTED="RETURN_REQUESTED",e.RMA_PENDING="RMA_PENDING",e.UNKNOWN="UNKNOWN"}(Pn=Pn||(Pn={})),function(e){e.ITEM_RELATED="ITEM_RELATED",e.LABEL_RELATED="LABEL_RELATED",e.REFUND_RELATED="REFUND_RELATED",e.UNKNOWN="UNKNOWN"}(bn=bn||(bn={})),function(e){e.DOMESTIC_SHIPPING="DOMESTIC_SHIPPING",e.IMPORT_CHARGE="IMPORT_CHARGE",e.INTERNATIONAL_SHIPPING="INTERNATIONAL_SHIPPING",e.ITEM_IMPORT_TAX="ITEM_IMPORT_TAX",e.ITEM_TAX="ITEM_TAX",e.ORDER_ADJUSTMENT="ORDER_ADJUSTMENT",e.ORIGINAL_SHIPPING="ORIGINAL_SHIPPING",e.OTHER="OTHER",e.PURCHASE_PRICE="PURCHASE_PRICE",e.REFUND_FROM_PAYPAL="REFUND_FROM_PAYPAL",e.RETURN_SHIPPING="RETURN_SHIPPING",e.SHIPPING_IMPORT_TAX="SHIPPING_IMPORT_TAX",e.SHIPPING_TAX="SHIPPING_TAX"}(Dn=Dn||(Dn={})),function(e){e.AUTO_APPROVE_REMORSE="AUTO_APPROVE_REMORSE",e.BUYER_ACCEPT_REPLACEMENT_OFFER="BUYER_ACCEPT_REPLACEMENT_OFFER",e.BUYER_ACCEPTS_NON_PAYPAL_PARTIAL_REFUND="BUYER_ACCEPTS_NON_PAYPAL_PARTIAL_REFUND",e.BUYER_ACCEPTS_PARTIAL_REFUND="BUYER_ACCEPTS_PARTIAL_REFUND",e.BUYER_CLOSE_RETURN="BUYER_CLOSE_RETURN",e.BUYER_CREATE_RETURN="BUYER_CREATE_RETURN",e.BUYER_DECLINE_PARTIAL_REFUND="BUYER_DECLINE_PARTIAL_REFUND",e.BUYER_DECLINE_REPLACEMENT_OFFER="BUYER_DECLINE_REPLACEMENT_OFFER",e.BUYER_ESCALATE="BUYER_ESCALATE",e.BUYER_MARK_AS_RECEIVED="BUYER_MARK_AS_RECEIVED",e.BUYER_MARK_REFUND_RECEIVED="BUYER_MARK_REFUND_RECEIVED",e.BUYER_MARK_RETURN_SHIPPED="BUYER_MARK_RETURN_SHIPPED",e.BUYER_PRINT_SHIPPING_LABEL="BUYER_PRINT_SHIPPING_LABEL",e.BUYER_PROVIDE_LABEL="BUYER_PROVIDE_LABEL",e.BUYER_PROVIDE_TRACKING_INFO="BUYER_PROVIDE_TRACKING_INFO",e.BUYER_SEND_MESSAGE="BUYER_SEND_MESSAGE",e.BUYER_UPDATE_TRACKING="BUYER_UPDATE_TRACKING",e.BUYER_VOID_LABEL="BUYER_VOID_LABEL",e.CHARGEBACK_OPEN="CHARGEBACK_OPEN",e.DELETE_FILE="DELETE_FILE",e.EMAIL_SHIPPING_LABEL="EMAIL_SHIPPING_LABEL",e.EXTERNAL_CLAIM_OPENED="EXTERNAL_CLAIM_OPENED",e.GENERAL_TIME_OUT="GENERAL_TIME_OUT",e.NOTIFIED_DELIVERED="NOTIFIED_DELIVERED",e.NOTIFIED_SHIPPED="NOTIFIED_SHIPPED",e.NOTIFY_REPLACEMENT_DELIVERED="NOTIFY_REPLACEMENT_DELIVERED",e.NOTIFY_REPLACEMENT_SHIPPED="NOTIFY_REPLACEMENT_SHIPPED",e.NOTIFY_UPDATE_REFUND_STATUS="NOTIFY_UPDATE_REFUND_STATUS",e.OTHER="OTHER",e.REMINDER_BUYER_TO_RESPOND_RE_OFFER="REMINDER_BUYER_TO_RESPOND_RE_OFFER",e.REMINDER_BUYER_TO_SHIP="REMINDER_BUYER_TO_SHIP",e.REMINDER_FOR_REFUND="REMINDER_FOR_REFUND",e.REMINDER_FOR_REFUND_NO_SHIPPING="REMINDER_FOR_REFUND_NO_SHIPPING",e.REMINDER_FOR_RMA="REMINDER_FOR_RMA",e.REMINDER_FOR_SHIPPING="REMINDER_FOR_SHIPPING",e.REMINDER_SELLER_TO_RESPOND="REMINDER_SELLER_TO_RESPOND",e.REMINDER_SELLER_TO_SHIP="REMINDER_SELLER_TO_SHIP",e.SELLER_APPROVE_REQUEST="SELLER_APPROVE_REQUEST",e.SELLER_DECLINE_REQUEST="SELLER_DECLINE_REQUEST",e.SELLER_ESCALATE="SELLER_ESCALATE",e.SELLER_ISSUE_REFUND="SELLER_ISSUE_REFUND",e.SELLER_ISSUE_STORE_CREDIT_REFUND="SELLER_ISSUE_STORE_CREDIT_REFUND",e.SELLER_MARK_AS_RECEIVED="SELLER_MARK_AS_RECEIVED",e.SELLER_MARK_REFUND_SENT="SELLER_MARK_REFUND_SENT",e.SELLER_MARK_REPLACEMENT_SHIPPED="SELLER_MARK_REPLACEMENT_SHIPPED",e.SELLER_OFFER_PARTIAL_REFUND="SELLER_OFFER_PARTIAL_REFUND",e.SELLER_OFFER_REPLACEMENT="SELLER_OFFER_REPLACEMENT",e.SELLER_OFFER_RETURNS="SELLER_OFFER_RETURNS",e.SELLER_PRINT_SHIPPING_LABEL="SELLER_PRINT_SHIPPING_LABEL",e.SELLER_PROVIDE_LABEL="SELLER_PROVIDE_LABEL",e.SELLER_PROVIDE_RMA="SELLER_PROVIDE_RMA",e.SELLER_PROVIDE_TRACKING_INFO="SELLER_PROVIDE_TRACKING_INFO",e.SELLER_RETRY_REFUND="SELLER_RETRY_REFUND",e.SELLER_SEND_MESSAGE="SELLER_SEND_MESSAGE",e.SELLER_UPDATE_TRACKING="SELLER_UPDATE_TRACKING",e.SELLER_VOID_LABEL="SELLER_VOID_LABEL",e.SUBMIT_FILE="SUBMIT_FILE",e.SYSTEM_BUYER_PARTIAL_REFUND_AS_PAYOUT="SYSTEM_BUYER_PARTIAL_REFUND_AS_PAYOUT",e.SYSTEM_BUYER_REFUND_AS_PAYOUT="SYSTEM_BUYER_REFUND_AS_PAYOUT",e.SYSTEM_CLOSE_RETURN="SYSTEM_CLOSE_RETURN",e.SYSTEM_CREATE_RETURN="SYSTEM_CREATE_RETURN",e.SYSTEM_IMMEDIATE_REFUND="SYSTEM_IMMEDIATE_REFUND",e.TIME_OUT_AFTER_DECLINE="TIME_OUT_AFTER_DECLINE",e.TIME_OUT_AFTER_REFUNDED="TIME_OUT_AFTER_REFUNDED",e.TIME_OUT_AFTER_REFUNDED_AS_PAYOUT="TIME_OUT_AFTER_REFUNDED_AS_PAYOUT",e.TIME_OUT_AFTER_REPLACED="TIME_OUT_AFTER_REPLACED",e.TIME_OUT_FOR_AUTHORIZE="TIME_OUT_FOR_AUTHORIZE",e.TIME_OUT_FOR_AUTO_REFUND="TIME_OUT_FOR_AUTO_REFUND",e.TIME_OUT_FOR_BUYER_RECOUP="TIME_OUT_FOR_BUYER_RECOUP",e.TIME_OUT_FOR_DELIVERY="TIME_OUT_FOR_DELIVERY",e.TIME_OUT_FOR_ESCALATION="TIME_OUT_FOR_ESCALATION",e.TIME_OUT_FOR_ESCALATION_AFTER_SMIR="TIME_OUT_FOR_ESCALATION_AFTER_SMIR",e.TIME_OUT_FOR_ITEM_REPLACED="TIME_OUT_FOR_ITEM_REPLACED",e.TIME_OUT_FOR_MARK_REFUND_RECEIVED="TIME_OUT_FOR_MARK_REFUND_RECEIVED",e.TIME_OUT_FOR_MARK_REFUND_SENT="TIME_OUT_FOR_MARK_REFUND_SENT",e.TIME_OUT_FOR_MASS_PAYOUT="TIME_OUT_FOR_MASS_PAYOUT",e.TIME_OUT_FOR_PAYOUT="TIME_OUT_FOR_PAYOUT",e.TIME_OUT_FOR_PROVIDE_LABEL="TIME_OUT_FOR_PROVIDE_LABEL",e.TIME_OUT_FOR_REFUND="TIME_OUT_FOR_REFUND",e.TIME_OUT_FOR_REPLACEMENT_DELIVERED_ITEM_NOT_RETURNED="TIME_OUT_FOR_REPLACEMENT_DELIVERED_ITEM_NOT_RETURNED",e.TIME_OUT_FOR_REPLACEMENT_SHIPPED="TIME_OUT_FOR_REPLACEMENT_SHIPPED",e.TIME_OUT_FOR_RETURN_SHIPPING="TIME_OUT_FOR_RETURN_SHIPPING",e.TIME_OUT_FOR_RMA="TIME_OUT_FOR_RMA",e.TIME_OUT_FOR_SELLER_INVOICE="TIME_OUT_FOR_SELLER_INVOICE",e.TIME_OUT_FOR_SELLER_PAYOUT="TIME_OUT_FOR_SELLER_PAYOUT",e.TIME_OUT_FOR_SHIPMENT_TRACKING="TIME_OUT_FOR_SHIPMENT_TRACKING",e.TIME_OUT_FOR_SHIPPING="TIME_OUT_FOR_SHIPPING",e.TIME_OUT_FOR_SHIPPING_SYSTEM_CLOSE="TIME_OUT_FOR_SHIPPING_SYSTEM_CLOSE"}(Un=Un||(Un={})),function(e){e.STORE="STORE",e.WAREHOUSE="WAREHOUSE"}(Ln=Ln||(Ln={})),function(e){e.YEAR="YEAR",e.MONTH="MONTH",e.DAY="DAY",e.HOUR="HOUR",e.CALENDAR_DAY="CALENDAR_DAY",e.BUSINESS_DAY="BUSINESS_DAY",e.MINUTE="MINUTE",e.SECOND="SECOND",e.MILLISECOND="MILLISECOND"}(Mn=Mn||(Mn={})),function(e){e.DOMESTIC="DOMESTIC",e.INTERNATIONAL="INTERNATIONAL"}(Bn=Bn||(Bn={})),function(e){e.CALCULATED="CALCULATED",e.FLAT_RATE="FLAT_RATE",e.NOT_SPECIFIED="NOT_SPECIFIED"}(Fn=Fn||(Fn={})),function(e){e.EBAY_PAYMENTS="EBAY_PAYMENTS"}(vn=vn||(vn={})),function(e){e.OPTED_IN="OPTED_IN",e.NOT_OPTED_IN="NOT_OPTED_IN"}(xn=xn||(xn={})),function(e){e.CASH_IN_PERSON="CASH_IN_PERSON",e.CASH_ON_DELIVERY="CASH_ON_DELIVERY",e.CASH_ON_PICKUP="CASH_ON_PICKUP",e.CASHIER_CHECK="CASHIER_CHECK",e.CREDIT_CARD="CREDIT_CARD",e.ESCROW="ESCROW",e.INTEGRATED_MERCHANT_CREDIT_CARD="INTEGRATED_MERCHANT_CREDIT_CARD",e.LOAN_CHECK="LOAN_CHECK",e.MONEY_ORDER="MONEY_ORDER",e.PAISA_PAY="PAISA_PAY",e.PAISA_PAY_ESCROW="PAISA_PAY_ESCROW",e.PAISA_PAY_ESCROW_EMI="PAISA_PAY_ESCROW_EMI",e.PAYPAL="PAYPAL",e.PERSONAL_CHECK="PERSONAL_CHECK",e.OTHER="OTHER"}(wn=wn||(wn={})),function(e){e.PAYPAL_EMAIL="PAYPAL_EMAIL"}(kn=kn||(kn={})),function(e){e.AD="AD",e.AE="AE",e.AF="AF",e.AG="AG",e.AI="AI",e.AL="AL",e.AM="AM",e.AN="AN",e.AO="AO",e.AQ="AQ",e.AR="AR",e.AS="AS",e.AT="AT",e.AU="AU",e.AW="AW",e.AX="AX",e.AZ="AZ",e.BA="BA",e.BB="BB",e.BD="BD",e.BE="BE",e.BF="BF",e.BG="BG",e.BH="BH",e.BI="BI",e.BJ="BJ",e.BL="BL",e.BM="BM",e.BN="BN",e.BO="BO",e.BQ="BQ",e.BR="BR",e.BS="BS",e.BT="BT",e.BV="BV",e.BW="BW",e.BY="BY",e.BZ="BZ",e.CA="CA",e.CC="CC",e.CD="CD",e.CF="CF",e.CG="CG",e.CH="CH",e.CI="CI",e.CK="CK",e.CL="CL",e.CM="CM",e.CN="CN",e.CO="CO",e.CR="CR",e.CU="CU",e.CV="CV",e.CW="CW",e.CX="CX",e.CY="CY",e.CZ="CZ",e.DE="DE",e.DJ="DJ",e.DK="DK",e.DM="DM",e.DO="DO",e.DZ="DZ",e.EC="EC",e.EE="EE",e.EG="EG",e.EH="EH",e.ER="ER",e.ES="ES",e.ET="ET",e.FI="FI",e.FJ="FJ",e.FK="FK",e.FM="FM",e.FO="FO",e.FR="FR",e.GA="GA",e.GB="GB",e.GD="GD",e.GE="GE",e.GF="GF",e.GG="GG",e.GH="GH",e.GI="GI",e.GL="GL",e.GM="GM",e.GN="GN",e.GP="GP",e.GQ="GQ",e.GR="GR",e.GS="GS",e.GT="GT",e.GU="GU",e.GW="GW",e.GY="GY",e.HK="HK",e.HM="HM",e.HN="HN",e.HR="HR",e.HT="HT",e.HU="HU",e.ID="ID",e.IE="IE",e.IL="IL",e.IM="IM",e.IN="IN",e.IO="IO",e.IQ="IQ",e.IR="IR",e.IS="IS",e.IT="IT",e.JE="JE",e.JM="JM",e.JO="JO",e.JP="JP",e.KE="KE",e.KG="KG",e.KH="KH",e.KI="KI",e.KM="KM",e.KN="KN",e.KP="KP",e.KR="KR",e.KW="KW",e.KY="KY",e.KZ="KZ",e.LA="LA",e.LB="LB",e.LC="LC",e.LI="LI",e.LK="LK",e.LR="LR",e.LS="LS",e.LT="LT",e.LU="LU",e.LV="LV",e.LY="LY",e.MA="MA",e.MC="MC",e.MD="MD",e.ME="ME",e.MF="MF",e.MG="MG",e.MH="MH",e.MK="MK",e.ML="ML",e.MM="MM",e.MN="MN",e.MO="MO",e.MP="MP",e.MQ="MQ",e.MR="MR",e.MS="MS",e.MT="MT",e.MU="MU",e.MV="MV",e.MW="MW",e.MX="MX",e.MY="MY",e.MZ="MZ",e.NA="NA",e.NC="NC",e.NE="NE",e.NF="NF",e.NG="NG",e.NI="NI",e.NL="NL",e.NO="NO",e.NP="NP",e.NR="NR",e.NU="NU",e.NZ="NZ",e.OM="OM",e.PA="PA",e.PE="PE",e.PF="PF",e.PG="PG",e.PH="PH",e.PK="PK",e.PL="PL",e.PM="PM",e.PN="PN",e.PR="PR",e.PS="PS",e.PT="PT",e.PW="PW",e.PY="PY",e.QA="QA",e.RE="RE",e.RO="RO",e.RS="RS",e.RU="RU",e.RW="RW",e.SA="SA",e.SB="SB",e.SC="SC",e.SD="SD",e.SE="SE",e.SG="SG",e.SH="SH",e.SI="SI",e.SJ="SJ",e.SK="SK",e.SL="SL",e.SM="SM",e.SN="SN",e.SO="SO",e.SR="SR",e.ST="ST",e.SV="SV",e.SX="SX",e.SY="SY",e.SZ="SZ",e.TC="TC",e.TD="TD",e.TF="TF",e.TG="TG",e.TH="TH",e.TJ="TJ",e.TK="TK",e.TL="TL",e.TM="TM",e.TN="TN",e.TO="TO",e.TR="TR",e.TT="TT",e.TV="TV",e.TW="TW",e.TZ="TZ",e.UA="UA",e.UG="UG",e.UM="UM",e.US="US",e.UY="UY",e.UZ="UZ",e.VA="VA",e.VC="VC",e.VE="VE",e.VG="VG",e.VI="VI",e.VN="VN",e.VU="VU",e.WF="WF",e.WS="WS",e.YE="YE",e.YT="YT",e.ZA="ZA",e.ZM="ZM",e.ZW="ZW"}(Gn=Gn||(Gn={})),function(e){e.AED="AED",e.AFN="AFN",e.ALL="ALL",e.AMD="AMD",e.ANG="ANG",e.AOA="AOA",e.ARS="ARS",e.AUD="AUD",e.AWG="AWG",e.AZN="AZN",e.BAM="BAM",e.BBD="BBD",e.BDT="BDT",e.BGN="BGN",e.BHD="BHD",e.BIF="BIF",e.BMD="BMD",e.BND="BND",e.BOB="BOB",e.BRL="BRL",e.BSD="BSD",e.BTN="BTN",e.BWP="BWP",e.BYR="BYR",e.BZD="BZD",e.CAD="CAD",e.CDF="CDF",e.CHF="CHF",e.CLP="CLP",e.CNY="CNY",e.COP="COP",e.CRC="CRC",e.CUP="CUP",e.CVE="CVE",e.CZK="CZK",e.DJF="DJF",e.DKK="DKK",e.DOP="DOP",e.DZD="DZD",e.EGP="EGP",e.ERN="ERN",e.ETB="ETB",e.EUR="EUR",e.FJD="FJD",e.FKP="FKP",e.GBP="GBP",e.GEL="GEL",e.GHS="GHS",e.GIP="GIP",e.GMD="GMD",e.GNF="GNF",e.GTQ="GTQ",e.GYD="GYD",e.HKD="HKD",e.HNL="HNL",e.HRK="HRK",e.HTG="HTG",e.HUF="HUF",e.IDR="IDR",e.ILS="ILS",e.INR="INR",e.IQD="IQD",e.IRR="IRR",e.ISK="ISK",e.JMD="JMD",e.JOD="JOD",e.JPY="JPY",e.KES="KES",e.KGS="KGS",e.KHR="KHR",e.KMF="KMF",e.KPW="KPW",e.KRW="KRW",e.KWD="KWD",e.KYD="KYD",e.KZT="KZT",e.LAK="LAK",e.LBP="LBP",e.LKR="LKR",e.LRD="LRD",e.LSL="LSL",e.LTL="LTL",e.LYD="LYD",e.MAD="MAD",e.MDL="MDL",e.MGA="MGA",e.MKD="MKD",e.MMK="MMK",e.MNT="MNT",e.MOP="MOP",e.MRO="MRO",e.MUR="MUR",e.MVR="MVR",e.MWK="MWK",e.MXN="MXN",e.MYR="MYR",e.MZN="MZN",e.NAD="NAD",e.NGN="NGN",e.NIO="NIO",e.NOK="NOK",e.NPR="NPR",e.NZD="NZD",e.OMR="OMR",e.PAB="PAB",e.PEN="PEN",e.PGK="PGK",e.PHP="PHP",e.PKR="PKR",e.PLN="PLN",e.PYG="PYG",e.QAR="QAR",e.RON="RON",e.RSD="RSD",e.RUB="RUB",e.RWF="RWF",e.SAR="SAR",e.SBD="SBD",e.SCR="SCR",e.SDG="SDG",e.SEK="SEK",e.SGD="SGD",e.SHP="SHP",e.SLL="SLL",e.SOS="SOS",e.SRD="SRD",e.STD="STD",e.SYP="SYP",e.SZL="SZL",e.THB="THB",e.TJS="TJS",e.TMT="TMT",e.TND="TND",e.TOP="TOP",e.TRY="TRY",e.TTD="TTD",e.TWD="TWD",e.TZS="TZS",e.UAH="UAH",e.UGX="UGX",e.USD="USD",e.UYU="UYU",e.UZS="UZS",e.VEF="VEF",e.VND="VND",e.VUV="VUV",e.WST="WST",e.XAF="XAF",e.XCD="XCD",e.XOF="XOF",e.XPF="XPF",e.YER="YER",e.ZAR="ZAR",e.ZMW="ZMW",e.ZWL="ZWL"}(Yn=Yn||(Yn={})),function(e){e.NEW="NEW",e.LIKE_NEW="LIKE_NEW",e.NEW_OTHER="NEW_OTHER",e.NEW_WITH_DEFECTS="NEW_WITH_DEFECTS",e.MANUFACTURER_REFURBISHED="MANUFACTURER_REFURBISHED",e.SELLER_REFURBISHED="SELLER_REFURBISHED",e.USED_EXCELLENT="USED_EXCELLENT",e.USED_VERY_GOOD="USED_VERY_GOOD",e.USED_GOOD="USED_GOOD",e.USED_ACCEPTABLE="USED_ACCEPTABLE",e.FOR_PARTS_OR_NOT_WORKING="FOR_PARTS_OR_NOT_WORKING"}(Hn=Hn||(Hn={})),function(e){e.en_US="en_US",e.en_CA="en_CA",e.fr_CA="fr_CA",e.en_GB="en_GB",e.en_AU="en_AU",e.en_IN="en_IN",e.de_AT="de_AT",e.fr_BE="fr_BE",e.fr_FR="fr_FR",e.de_DE="de_DE",e.it_IT="it_IT",e.nl_BE="nl_BE",e.nl_NL="nl_NL",e.es_ES="es_ES",e.de_CH="de_CH",e.fi_FI="fi_FI",e.zh_HK="zh_HK",e.hu_HU="hu_HU",e.en_PH="en_PH",e.pl_PL="pl_PL",e.pt_PT="pt_PT",e.ru_RU="ru_RU",e.en_SG="en_SG",e.en_IE="en_IE",e.en_MY="en_MY"}($n=$n||($n={})),function(e){e.de_AT="de-AT",e.de_CH="de-CH",e.de_DE="de-DE",e.en_AU="en-AU",e.en_CA="en-CA",e.en_GB="en-GB",e.en_IE="en-IE",e.en_PH="en-PH",e.en_US="en-US",e.es_ES="es-ES",e.fr_BE="fr-BE",e.fr_CA="fr-CA",e.fr_FR="fr-FR",e.it_IT="it-IT",e.nl_BE="nl-BE",e.nl_NL="nl-NL",e.pl_PL="pl-PL",e.th_TH="th-TH",e.zh_HK="zh-HK",e.zh_TW="zh-TW"}(jn=jn||(jn={})),function(e){e.EBAY_US="EBAY_US",e.EBAY_MOTORS="EBAY_MOTORS",e.EBAY_CA="EBAY_CA",e.EBAY_GB="EBAY_GB",e.EBAY_AU="EBAY_AU",e.EBAY_AT="EBAY_AT",e.EBAY_BE="EBAY_BE",e.EBAY_FR="EBAY_FR",e.EBAY_DE="EBAY_DE",e.EBAY_IT="EBAY_IT",e.EBAY_NL="EBAY_NL",e.EBAY_ES="EBAY_ES",e.EBAY_CH="EBAY_CH",e.EBAY_TW="EBAY_TW",e.EBAY_CZ="EBAY_CZ",e.EBAY_DK="EBAY_DK",e.EBAY_FI="EBAY_FI",e.EBAY_GR="EBAY_GR",e.EBAY_HK="EBAY_HK",e.EBAY_HU="EBAY_HU",e.EBAY_IN="EBAY_IN",e.EBAY_ID="EBAY_ID",e.EBAY_IE="EBAY_IE",e.EBAY_IL="EBAY_IL",e.EBAY_MY="EBAY_MY",e.EBAY_NZ="EBAY_NZ",e.EBAY_NO="EBAY_NO",e.EBAY_PH="EBAY_PH",e.EBAY_PL="EBAY_PL",e.EBAY_PT="EBAY_PT",e.EBAY_PR="EBAY_PR",e.EBAY_RU="EBAY_RU",e.EBAY_SG="EBAY_SG",e.EBAY_ZA="EBAY_ZA",e.EBAY_SE="EBAY_SE",e.EBAY_TH="EBAY_TH",e.EBAY_VN="EBAY_VN",e.EBAY_CN="EBAY_CN",e.EBAY_PE="EBAY_PE",e.EBAY_JP="EBAY_JP"}(Vn=Vn||(Vn={})),function(e){e.AUCTION="AUCTION",e.FIXED_PRICE="FIXED_PRICE"}(Kn=Kn||(Kn={})),function(e){e[e.CLICK_THROUGH_RATE=0]="CLICK_THROUGH_RATE",e[e.LISTING_IMPRESSION_STORE=1]="LISTING_IMPRESSION_STORE",e[e.LISTING_IMPRESSION_TOTAL=2]="LISTING_IMPRESSION_TOTAL",e[e.LISTING_VIEWS_SOURCE_DIRECT=3]="LISTING_VIEWS_SOURCE_DIRECT",e[e.LISTING_VIEWS_SOURCE_OFF_EBAY=4]="LISTING_VIEWS_SOURCE_OFF_EBAY",e[e.LISTING_VIEWS_SOURCE_OTHER_EBAY=5]="LISTING_VIEWS_SOURCE_OTHER_EBAY",e[e.LISTING_VIEWS_SOURCE_SEARCH_RESULTS_PAGE=6]="LISTING_VIEWS_SOURCE_SEARCH_RESULTS_PAGE",e[e.LISTING_VIEWS_SOURCE_STORE=7]="LISTING_VIEWS_SOURCE_STORE",e[e.LISTING_VIEWS_TOTAL=8]="LISTING_VIEWS_TOTAL",e[e.SALES_CONVERSION_RATE=9]="SALES_CONVERSION_RATE",e[e.TRANSACTION=10]="TRANSACTION"}(Wn=Wn||(Wn={})),function(e){e.MERCHANDISE_CREDIT="MERCHANDISE_CREDIT",e.MONEY_BACK="MONEY_BACK"}(qn=qn||(qn={})),function(e){e.EXCHANGE="EXCHANGE",e.REPLACEMENT="REPLACEMENT"}(Xn=Xn||(Xn={})),function(e){e.BUYER="BUYER",e.SELLER="SELLER"}(Jn=Jn||(Jn={})),function(e){e.COUNTRY="COUNTRY",e.COUNTRY_REGION="COUNTRY_REGION",e.STATE_OR_PROVINCE="STATE_OR_PROVINCE",e.WORLD_REGION="WORLD_REGION",e.WORLDWIDE="WORLDWIDE"}(zn=zn||(zn={})),function(e){e.BUYER_CANCEL="BUYER_CANCEL",e.SELLER_CANCEL="SELLER_CANCEL",e.ITEM_NOT_RECEIVED="ITEM_NOT_RECEIVED",e.BUYER_RETURN="BUYER_RETURN",e.ITEM_NOT_AS_DESCRIBED="ITEM_NOT_AS_DESCRIBED",e.OTHER_ADJUSTMENT="OTHER_ADJUSTMENT",e.SHIPPING_DISCOUNT="SHIPPING_DISCOUNT"}(Qn=Qn||(Qn={})),function(e){e.ADDRESS_ISSUES="ADDRESS_ISSUES",e.BUYER_ASKED_CANCEL="BUYER_ASKED_CANCEL",e.BUYER_CANCEL_OR_ADDRESS_ISSUE="BUYER_CANCEL_OR_ADDRESS_ISSUE",e.FOUND_CHEAPER_PRICE="FOUND_CHEAPER_PRICE",e.ORDER_MISTAKE="ORDER_MISTAKE",e.ORDER_UNPAID="ORDER_UNPAID",e.OTHER="OTHER",e.OUT_OF_STOCK_OR_CANNOT_FULFILL="OUT_OF_STOCK_OR_CANNOT_FULFILL",e.PRICE_TOO_HIGH="PRICE_TOO_HIGH",e.UNKNOWN="UNKNOWN",e.WONT_ARRIVE_IN_TIME="WONT_ARRIVE_IN_TIME",e.WRONG_PAYMENT_METHOD="WRONG_PAYMENT_METHOD",e.WRONG_SHIPPING_ADDRESS="WRONG_SHIPPING_ADDRESS",e.WRONG_SHIPPING_METHOD="WRONG_SHIPPING_METHOD"}(Zn=Zn||(Zn={})),function(e){e.INCH="INCH",e.FEET="FEET",e.CENTIMETER="CENTIMETER",e.METER="METER"}(eo=eo||(eo={})),function(e){e.POUND="POUND",e.KILOGRAM="KILOGRAM",e.OUNCE="OUNCE",e.GRAM="GRAM"}(to=to||(to={})),function(e){e.LETTER="LETTER",e.BULKY_GOODS="BULKY_GOODS",e.CARAVAN="CARAVAN",e.CARS="CARS",e.EUROPALLET="EUROPALLET",e.EXPANDABLE_TOUGH_BAGS="EXPANDABLE_TOUGH_BAGS",e.EXTRA_LARGE_PACK="EXTRA_LARGE_PACK",e.FURNITURE="FURNITURE",e.INDUSTRY_VEHICLES="INDUSTRY_VEHICLES",e.LARGE_CANADA_POSTBOX="LARGE_CANADA_POSTBOX",e.LARGE_CANADA_POST_BUBBLE_MAILER="LARGE_CANADA_POST_BUBBLE_MAILER",e.LARGE_ENVELOPE="LARGE_ENVELOPE",e.MAILING_BOX="MAILING_BOX",e.MEDIUM_CANADA_POST_BOX="MEDIUM_CANADA_POST_BOX",e.MEDIUM_CANADA_POST_BUBBLE_MAILER="MEDIUM_CANADA_POST_BUBBLE_MAILER",e.MOTORBIKES="MOTORBIKES",e.ONE_WAY_PALLET="ONE_WAY_PALLET",e.PACKAGE_THICK_ENVELOPE="PACKAGE_THICK_ENVELOPE",e.PADDED_BAGS="PADDED_BAGS",e.PARCEL_OR_PADDED_ENVELOPE="PARCEL_OR_PADDED_ENVELOPE",e.ROLL="ROLL",e.SMALL_CANADA_POST_BOX="SMALL_CANADA_POST_BOX",e.SMALL_CANADA_POST_BUBBLE_MAILER="SMALL_CANADA_POST_BUBBLE_MAILER",e.TOUGH_BAGS="TOUGH_BAGS",e.UPS_LETTER="UPS_LETTER",e.USPS_FLAT_RATE_ENVELOPE="USPS_FLAT_RATE_ENVELOPE",e.USPS_LARGE_PACK="USPS_LARGE_PACK",e.VERY_LARGE_PACK="VERY_LARGE_PACK",e.WINE_PAK="WINE_PAK"}(ro=ro||(ro={}));var oo=Object.freeze({__proto__:null,get SiteId(){return dn},get MarketplaceId(){return En},get UserRoleFilter(){return fn},get InquirySearchFieldGroup(){return _n},get CaseStatusFilter(){return hn},get CaseSearchFieldGroup(){return gn},get InquiryStatusFilter(){return mn},get ShippingCarrier(){return Rn},get ReturnReason(){return An},get RequestType(){return yn},get ReturnType(){return In},get GetReturnFieldGroupEnum(){return Tn},get EscalateReason(){return Sn},get Decision(){return Nn},get CategoryType(){return Cn},get ReturnCountFilter(){return On},get ReturnState(){return Pn},get FilePurpose(){return bn},get RefundFeeType(){return Dn},get ActivityOption(){return Un},get StoreType(){return Ln},get TimeDurationUnit(){return Mn},get ShippingOptionType(){return Bn},get ShippingCostType(){return Fn},get PaymentsProgramType(){return vn},get PaymentsProgramStatus(){return xn},get PaymentMethodType(){return wn},get RecipientAccountReferenceType(){return kn},get CountryCode(){return Gn},get CurrencyCode(){return Yn},get Condition(){return Hn},get Locale(){return $n},get ContentLanguage(){return jn},get Marketplace(){return Vn},get FormatType(){return Kn},get Metric(){return Wn},get RefundMethod(){return qn},get ReturnMethod(){return Xn},get ReturnShippingCostPayer(){return Jn},get RegionType(){return zn},get ReasonForRefund(){return Qn},get CancelReason(){return Zn},get LengthUnitOfMeasure(){return eo},get WeightUnitOfMeasure(){return to},get PackageType(){return ro}}),io=Object.freeze({__proto__:null});const so={sandbox:!1,autoRefreshToken:!0,siteId:dn.EBAY_US,marketplaceId:En.EBAY_US,acceptLanguage:$n.en_US,contentLanguage:jn.en_US};class eBayApi extends Api{static fromEnv(e){if(!process.env.EBAY_APP_ID)throw new ApiEnvError("EBAY_APP_ID");if(!process.env.EBAY_CERT_ID)throw new ApiEnvError("EBAY_CERT_ID");return new eBayApi({appId:process.env.EBAY_APP_ID,certId:process.env.EBAY_CERT_ID,devId:process.env.EBAY_DEV_ID,authToken:process.env.EBAY_AUTH_TOKEN,siteId:process.env.EBAY_SITE_ID?parseInt(process.env.EBAY_SITE_ID,10):dn.EBAY_US,marketplaceId:process.env.EBAY_MARKETPLACE_ID&&process.env.EBAY_MARKETPLACE_ID in En?En[process.env.EBAY_MARKETPLACE_ID]:En.EBAY_US,ruName:process.env.EBAY_RU_NAME,sandbox:"true"===process.env.EBAY_SANDBOX},e)}constructor(e,t){super({...so,...e},t),this.factory=new ApiFactory(this.config,this.req,this.auth),this.authNAuth=this.auth.authNAuth,this.OAuth2=this.auth.OAuth2,this.oAuth2=this.OAuth2}get buy(){return this._buy||(this._buy=this.factory.createBuyApi())}get commerce(){return this._commerce||(this._commerce=this.factory.createCommerceApi())}get developer(){return this._developer||(this._developer=this.factory.createDeveloperApi())}get postOrder(){return this._postOrder||(this._postOrder=this.factory.createPostOrderApi())}get sell(){return this._sell||(this._sell=this.factory.createSellApi())}get trading(){return this._trading||(this._trading=this.factory.createTradingApi())}get finding(){return this._finding||(this._finding=this.factory.createFindingApi())}get shopping(){return this._shopping||(this._shopping=this.factory.createShoppingApi())}get merchandising(){return this._merchandising||(this._merchandising=this.factory.createMerchandisingApi())}get clientAlerts(){return this._clientAlerts||(this._clientAlerts=this.factory.createClientAlertsApi())}}eBayApi.SiteId=dn,eBayApi.MarketplaceId=En,eBayApi.ContentLanguage=jn,eBayApi.Locale=$n;export{jn as ContentLanguage,$n as Locale,En as MarketplaceId,dn as SiteId,eBayApi as default,eBayApi,oo as enums,$r as errors,io as types};