ebay-api 9.5.0 → 9.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/api/traditional/XMLRequest.d.ts +2 -2
- package/dist/api/traditional/XMLRequest.js +1 -1
- package/dist/ebay-api.min.mjs +1 -1
- package/dist/types/traditional/get-seller-list-response.d.ts +10 -5
- package/lib/api/traditional/XMLRequest.d.ts +2 -2
- package/lib/api/traditional/XMLRequest.js +1 -1
- package/lib/ebay-api.min.js +1 -1
- package/lib/types/traditional/get-seller-list-response.d.ts +10 -5
- package/package.json +4 -3
package/dist/ebay-api.min.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function bind(e,t){return function wrap(){return e.apply(t,arguments)}}const{toString:e}=Object.prototype,{getPrototypeOf:t}=Object,{iterator:r,toStringTag:n}=Symbol,o=(i=Object.create(null),t=>{const r=e.call(t);return i[r]||(i[r]=r.slice(8,-1).toLowerCase())});var i;const kindOfTest=e=>(e=e.toLowerCase(),t=>o(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray:s}=Array,u=typeOfTest("undefined");function isBuffer(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&p(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const c=kindOfTest("ArrayBuffer");const l=typeOfTest("string"),p=typeOfTest("function"),d=typeOfTest("number"),isObject=e=>null!==e&&"object"==typeof e,isPlainObject=e=>{if("object"!==o(e))return!1;const i=t(e);return!(null!==i&&i!==Object.prototype&&null!==Object.getPrototypeOf(i)||n in e||r in e)},f=kindOfTest("Date"),E=kindOfTest("File"),g=kindOfTest("Blob"),h=kindOfTest("FileList"),_=kindOfTest("URLSearchParams"),[m,y,R,A]=["ReadableStream","Request","Response","Headers"].map(kindOfTest);function forEach(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),s(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(isBuffer(e))return;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){if(isBuffer(e))return null;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 I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,isContextDefined=e=>!u(e)&&e!==I;const T=(S="undefined"!=typeof Uint8Array&&t(Uint8Array),e=>S&&e instanceof S);var S;const C=kindOfTest("HTMLFormElement"),N=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),O=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};forEach(r,(r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)}),Object.defineProperties(e,n)};const b=kindOfTest("AsyncFunction"),P=(U="function"==typeof setImmediate,D=p(I.postMessage),U?setImmediate:D?(L=`axios@${Math.random()}`,v=[],I.addEventListener("message",({source:e,data:t})=>{e===I&&t===L&&v.length&&v.shift()()},!1),e=>{v.push(e),I.postMessage(L,"*")}):e=>setTimeout(e));var U,D,L,v;const B="undefined"!=typeof queueMicrotask?queueMicrotask.bind(I):"undefined"!=typeof process&&process.nextTick||P;var M={isArray:s,isArrayBuffer:c,isBuffer:isBuffer,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||p(e.append)&&("formdata"===(t=o(e))||"object"===t&&p(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function isArrayBufferView(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&c(e.buffer),t},isString:l,isNumber:d,isBoolean:e=>!0===e||!1===e,isObject:isObject,isPlainObject:isPlainObject,isEmptyObject:e=>{if(!isObject(e)||isBuffer(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:m,isRequest:y,isResponse:R,isHeaders:A,isUndefined:u,isDate:f,isFile:E,isBlob:g,isRegExp:O,isFunction:p,isStream:e=>isObject(e)&&p(e.pipe),isURLSearchParams:_,isTypedArray:T,isFileList:h,forEach:forEach,merge:function merge(){const{caseless:e,skipUndefined:t}=isContextDefined(this)&&this||{},r={},assignValue=(n,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;const i=e&&findKey(r,o)||o;isPlainObject(r[i])&&isPlainObject(n)?r[i]=merge(r[i],n):isPlainObject(n)?r[i]=merge({},n):s(n)?r[i]=n.slice():t&&u(n)||(r[i]=n)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&forEach(arguments[e],assignValue);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(forEach(t,(t,n)=>{r&&p(t)?Object.defineProperty(e,n,{value:bind(t,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,n,{value:t,writable:!0,enumerable:!0,configurable:!0})},{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),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,r,n,o)=>{let i,s,u;const c={};if(r=r||{},null==e)return r;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)u=i[s],o&&!o(u,e,r)||c[u]||(r[u]=e[u],c[u]=!0);e=!1!==n&&t(e)}while(e&&(!n||n(e,r))&&e!==Object.prototype);return r},kindOf:o,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(s(e))return e;let t=e.length;if(!d(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const n=(e&&e[r]).call(e);let o;for(;(o=n.next())&&!o.done;){const r=o.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:C,hasOwnProperty:N,hasOwnProp:N,reduceDescriptors:reduceDescriptors,freezeMethods:e=>{reduceDescriptors(e,(t,r)=>{if(p(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];p(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 s(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)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:findKey,global:I,isContextDefined:isContextDefined,isSpecCompliantForm:function isSpecCompliantForm(e){return!!(e&&p(e.append)&&"FormData"===e[n]&&e[r])},toJSONObject:e=>{const t=new Array(10),visit=(e,r)=>{if(isObject(e)){if(t.indexOf(e)>=0)return;if(isBuffer(e))return e;if(!("toJSON"in e)){t[r]=e;const n=s(e)?[]:{};return forEach(e,(e,t)=>{const o=visit(e,r+1);!u(o)&&(n[t]=o)}),t[r]=void 0,n}}return e};return visit(e,0)},isAsyncFn:b,isThenable:e=>e&&(isObject(e)||p(e))&&p(e.then)&&p(e.catch),setImmediate:P,asap:B,isIterable:e=>null!=e&&p(e[r])};let F=class AxiosError extends Error{static from(e,t,r,n,o,i){const s=new AxiosError(e.message,t||e.code,r,n,o);return s.cause=e,s.name=e.name,i&&Object.assign(s,i),s}constructor(e,t,r,n,o){super(e),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status)}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:M.toJSONObject(this.config),code:this.code,status:this.status}}};F.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",F.ERR_BAD_OPTION="ERR_BAD_OPTION",F.ECONNABORTED="ECONNABORTED",F.ETIMEDOUT="ETIMEDOUT",F.ERR_NETWORK="ERR_NETWORK",F.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",F.ERR_DEPRECATED="ERR_DEPRECATED",F.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",F.ERR_BAD_REQUEST="ERR_BAD_REQUEST",F.ERR_CANCELED="ERR_CANCELED",F.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",F.ERR_INVALID_URL="ERR_INVALID_URL";function isVisitable(e){return M.isPlainObject(e)||M.isArray(e)}function removeBrackets(e){return M.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 w=M.toFlatObject(M,{},null,function filter(e){return/^is[A-Z]/.test(e)});function toFormData$1(e,t,r){if(!M.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=M.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function defined(e,t){return!M.isUndefined(t[e])})).metaTokens,o=r.visitor||defaultVisitor,i=r.dots,s=r.indexes,u=(r.Blob||"undefined"!=typeof Blob&&Blob)&&M.isSpecCompliantForm(t);if(!M.isFunction(o))throw new TypeError("visitor must be a function");function convertValue(e){if(null===e)return"";if(M.isDate(e))return e.toISOString();if(M.isBoolean(e))return e.toString();if(!u&&M.isBlob(e))throw new F("Blob is not supported. Use a Buffer instead.");return M.isArrayBuffer(e)||M.isTypedArray(e)?u&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function defaultVisitor(e,r,o){let u=e;if(e&&!o&&"object"==typeof e)if(M.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(M.isArray(e)&&function isFlatArray(e){return M.isArray(e)&&!e.some(isVisitable)}(e)||(M.isFileList(e)||M.endsWith(r,"[]"))&&(u=M.toArray(e)))return r=removeBrackets(r),u.forEach(function each(e,n){!M.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 c=[],l=Object.assign(w,{defaultVisitor:defaultVisitor,convertValue:convertValue,isVisitable:isVisitable});if(!M.isObject(e))throw new TypeError("data must be an object");return function build(e,r){if(!M.isUndefined(e)){if(-1!==c.indexOf(e))throw Error("Circular reference detected in "+r.join("."));c.push(e),M.forEach(e,function each(e,n){!0===(!(M.isUndefined(e)||null===e)&&o.call(t,e,M.isString(n)?n.trim():n,r,l))&&build(e,r?r.concat(n):[n])}),c.pop()}}(e),t}function encode$1(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$1(e,this,t)}const x=AxiosURLSearchParams.prototype;function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function buildURL(e,t,r){if(!t)return e;const n=r&&r.encode||encode,o=M.isFunction(r)?{serialize:r}:r,i=o&&o.serialize;let s;if(s=i?i(t,o):M.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,o).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}x.append=function append(e,t){this._pairs.push([e,t])},x.toString=function toString(e){const t=e?function(t){return e.call(this,t,encode$1)}:encode$1;return this._pairs.map(function each(e){return t(e[0])+"="+t(e[1])},"").join("&")};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){M.forEach(this.handlers,function forEachHandler(t){null!==t&&e(t)})}}var k={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},G={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:AxiosURLSearchParams,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Y="undefined"!=typeof window&&"undefined"!=typeof document,$="object"==typeof navigator&&navigator||void 0,H=Y&&(!$||["ReactNative","NativeScript","NS"].indexOf($.product)<0),j="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,V=Y&&window.location.href||"http://localhost";var q={...Object.freeze({__proto__:null,hasBrowserEnv:Y,hasStandardBrowserEnv:H,hasStandardBrowserWebWorkerEnv:j,navigator:$,origin:V}),...G};function formDataToJSON(e){function buildPath(e,t,r,n){let o=e[n++];if("__proto__"===o)return!0;const i=Number.isFinite(+o),s=n>=e.length;if(o=!o&&M.isArray(r)?r.length:o,s)return M.hasOwnProp(r,o)?r[o]=[r[o],t]:r[o]=t,!i;r[o]&&M.isObject(r[o])||(r[o]=[]);return buildPath(e,t,r[o],n)&&M.isArray(r[o])&&(r[o]=function arrayToObject(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(M.isFormData(e)&&M.isFunction(e.entries)){const t={};return M.forEachEntry(e,(e,r)=>{buildPath(function parsePropPath(e){return M.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,t,0)}),t}return null}const K={transitional:k,adapter:["xhr","http","fetch"],transformRequest:[function transformRequest(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=M.isObject(e);o&&M.isHTMLForm(e)&&(e=new FormData(e));if(M.isFormData(e))return n?JSON.stringify(formDataToJSON(e)):e;if(M.isArrayBuffer(e)||M.isBuffer(e)||M.isStream(e)||M.isFile(e)||M.isBlob(e)||M.isReadableStream(e))return e;if(M.isArrayBufferView(e))return e.buffer;if(M.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function toURLEncodedForm(e,t){return toFormData$1(e,new q.classes.URLSearchParams,{visitor:function(e,t,r,n){return q.isNode&&M.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=M.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return toFormData$1(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function stringifySafely(e,t,r){if(M.isString(e))try{return(t||JSON.parse)(e),M.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||K.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(M.isResponse(e)||M.isReadableStream(e))return e;if(e&&M.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(e){if(r){if("SyntaxError"===e.name)throw F.from(e,F.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:q.classes.FormData,Blob:q.classes.Blob},validateStatus:function validateStatus(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};M.forEach(["delete","get","head","post","put","patch"],e=>{K.headers[e]={}});const W=M.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const X=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:M.isArray(e)?e.map(normalizeValue):String(e)}function matchHeaderValue(e,t,r,n,o){return M.isFunction(n)?n.call(this,t,r):(o&&(t=r),M.isString(t)?M.isString(n)?-1!==t.indexOf(n):M.isRegExp(n)?n.test(t):void 0:void 0)}let z=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=M.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)=>M.forEach(e,(e,r)=>setHeader(e,r,t));if(M.isPlainObject(e)||e instanceof this.constructor)setHeaders(e,t);else if(M.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))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]&&W[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t})(e),t);else if(M.isObject(e)&&M.isIterable(e)){let r,n,o={};for(const t of e){if(!M.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?M.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}setHeaders(o,t)}else null!=e&&setHeader(t,e,r);return this}get(e,t){if(e=normalizeHeader(e)){const r=M.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(M.isFunction(t))return t.call(this,e,r);if(M.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e)){const r=M.findKey(this,e);return!(!r||void 0===this[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=M.findKey(r,e);!o||t&&!matchHeaderValue(0,r[o],o,t)||(delete r[o],n=!0)}}return M.isArray(e)?e.forEach(deleteHeader):deleteHeader(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!matchHeaderValue(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return M.forEach(this,(n,o)=>{const i=M.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 M.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&M.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")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){const t=(this[X]=this[X]={accessors:{}}).accessors,r=this.prototype;function defineAccessor(e){const n=normalizeHeader(e);t[n]||(!function buildAccessors(e,t){const r=M.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 M.isArray(e)?e.forEach(defineAccessor):defineAccessor(e),this}};function transformData(e,t){const r=this||K,n=t||r,o=z.from(n.headers);let i=n.data;return M.forEach(e,function transform(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function isCancel$1(e){return!(!e||!e.__CANCEL__)}z.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),M.reduceDescriptors(z.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),M.freezeMethods(z);let J=class CanceledError extends F{constructor(e,t,r){super(null==e?"canceled":e,F.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function settle(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new F("Request failed with status code "+r.status,[F.ERR_BAD_REQUEST,F.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const progressEventReducer=(e,t,r=3)=>{let n=0;const o=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(u){const c=Date.now(),l=n[s];o||(o=c),r[i]=u,n[i]=c;let p=s,d=0;for(;p!==i;)d+=r[p++],p%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const f=l&&c-l;return f?Math.round(1e3*d/f):void 0}}(50,250);return function throttle(e,t){let r,n,o=0,i=1e3/t;const invoke=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?invoke(e,t):(r=e,n||(n=setTimeout(()=>{n=null,invoke(r)},i-s)))},()=>r&&invoke(r)]}(r=>{const i=r.loaded,s=r.lengthComputable?r.total:void 0,u=i-n,c=o(u);n=i;e({loaded:i,total:s,progress:s?i/s:void 0,bytes:u,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},progressEventDecorator=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},asyncDecorator=e=>(...t)=>M.asap(()=>e(...t));var Q=q.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,q.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(q.origin),q.navigator&&/(msie|trident)/i.test(q.navigator.userAgent)):()=>!0,Z=q.hasStandardBrowserEnv?{write(e,t,r,n,o,i,s){if("undefined"==typeof document)return;const u=[`${e}=${encodeURIComponent(t)}`];M.isNumber(r)&&u.push(`expires=${new Date(r).toUTCString()}`),M.isString(n)&&u.push(`path=${n}`),M.isString(o)&&u.push(`domain=${o}`),!0===i&&u.push("secure"),M.isString(s)&&u.push(`SameSite=${s}`),document.cookie=u.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function buildFullPath(e,t,r){let n=!function isAbsoluteURL(e){return"string"==typeof e&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t);return e&&(n||0==r)?function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const headersToObject=e=>e instanceof z?{...e}:e;function mergeConfig$1(e,t){t=t||{};const r={};function getMergedValue(e,t,r,n){return M.isPlainObject(e)&&M.isPlainObject(t)?M.merge.call({caseless:n},e,t):M.isPlainObject(t)?M.merge({},t):M.isArray(t)?t.slice():t}function mergeDeepProperties(e,t,r,n){return M.isUndefined(t)?M.isUndefined(e)?void 0:getMergedValue(void 0,e,0,n):getMergedValue(e,t,0,n)}function valueFromConfig2(e,t){if(!M.isUndefined(t))return getMergedValue(void 0,t)}function defaultToConfig2(e,t){return M.isUndefined(t)?M.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,withXSRFToken: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,r)=>mergeDeepProperties(headersToObject(e),headersToObject(t),0,!0)};return M.forEach(Object.keys({...e,...t}),function computeConfigValue(o){if("__proto__"===o||"constructor"===o||"prototype"===o)return;const i=M.hasOwnProp(n,o)?n[o]:mergeDeepProperties,s=i(e[o],t[o],o);M.isUndefined(s)&&i!==mergeDirectKeys||(r[o]=s)}),r}var resolveConfig=e=>{const t=mergeConfig$1({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:u}=t;if(t.headers=s=z.from(s),t.url=buildURL(buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),u&&s.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),M.isFormData(r))if(q.hasStandardBrowserEnv||q.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(M.isFunction(r.getHeaders)){const e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&s.set(e,r)})}if(q.hasStandardBrowserEnv&&(n&&M.isFunction(n)&&(n=n(t)),n||!1!==n&&Q(t.url))){const e=o&&i&&Z.read(i);e&&s.set(o,e)}return t};var ee="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function dispatchXhrRequest(t,r){const n=resolveConfig(e);let o=n.data;const i=z.from(n.headers).normalize();let s,u,c,l,p,{responseType:d,onUploadProgress:f,onDownloadProgress:E}=n;function done(){l&&l(),p&&p(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let g=new XMLHttpRequest;function onloadend(){if(!g)return;const n=z.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());settle(function _resolve(e){t(e),done()},function _reject(e){r(e),done()},{data:d&&"text"!==d&&"json"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g}),g=null}g.open(n.method.toUpperCase(),n.url,!0),g.timeout=n.timeout,"onloadend"in g?g.onloadend=onloadend:g.onreadystatechange=function handleLoad(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(onloadend)},g.onabort=function handleAbort(){g&&(r(new F("Request aborted",F.ECONNABORTED,e,g)),g=null)},g.onerror=function handleError(t){const n=t&&t.message?t.message:"Network Error",o=new F(n,F.ERR_NETWORK,e,g);o.event=t||null,r(o),g=null},g.ontimeout=function handleTimeout(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||k;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new F(t,o.clarifyTimeoutError?F.ETIMEDOUT:F.ECONNABORTED,e,g)),g=null},void 0===o&&i.setContentType(null),"setRequestHeader"in g&&M.forEach(i.toJSON(),function setRequestHeader(e,t){g.setRequestHeader(t,e)}),M.isUndefined(n.withCredentials)||(g.withCredentials=!!n.withCredentials),d&&"json"!==d&&(g.responseType=n.responseType),E&&([c,p]=progressEventReducer(E,!0),g.addEventListener("progress",c)),f&&g.upload&&([u,l]=progressEventReducer(f),g.upload.addEventListener("progress",u),g.upload.addEventListener("loadend",l)),(n.cancelToken||n.signal)&&(s=t=>{g&&(r(!t||t.type?new J(null,e,g):t),g.abort(),g=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const h=function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);h&&-1===q.protocols.indexOf(h)?r(new F("Unsupported protocol "+h+":",F.ERR_BAD_REQUEST,e)):g.send(o||null)})};const composeSignals=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const onabort=function(e){if(!r){r=!0,unsubscribe();const t=e instanceof Error?e:this.reason;n.abort(t instanceof F?t:new J(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null,onabort(new F(`timeout of ${t}ms exceeded`,F.ETIMEDOUT))},t);const unsubscribe=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(onabort):e.removeEventListener("abort",onabort)}),e=null)};e.forEach(e=>e.addEventListener("abort",onabort));const{signal:i}=n;return i.unsubscribe=()=>M.asap(unsubscribe),i}},streamChunk=function*(e,t){let r=e.byteLength;if(r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},readStream=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},trackStream=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of readStream(e))yield*streamChunk(r,t)}(e,t);let i,s=0,_onFinish=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return _onFinish(),void e.close();let i=n.byteLength;if(r){let e=s+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw _onFinish(e),e}},cancel:e=>(_onFinish(e),o.return())},{highWaterMark:2})},{isFunction:te}=M,re=(({Request:e,Response:t})=>({Request:e,Response:t}))(M.global),{ReadableStream:ne,TextEncoder:oe}=M.global,test=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},factory=e=>{e=M.merge.call({skipUndefined:!0},re,e);const{fetch:t,Request:r,Response:n}=e,o=t?te(t):"function"==typeof fetch,i=te(r),s=te(n);if(!o)return!1;const u=o&&te(ne),c=o&&("function"==typeof oe?(l=new oe,e=>l.encode(e)):async e=>new Uint8Array(await new r(e).arrayBuffer()));var l;const p=i&&u&&test(()=>{let e=!1;const t=new r(q.origin,{body:new ne,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=s&&u&&test(()=>M.isReadableStream(new n("").body)),f={stream:d&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!f[e]&&(f[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new F(`Response type '${e}' is not supported`,F.ERR_NOT_SUPPORT,r)})});const resolveBodyLength=async(e,t)=>{const n=M.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(M.isBlob(e))return e.size;if(M.isSpecCompliantForm(e)){const t=new r(q.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return M.isArrayBufferView(e)||M.isArrayBuffer(e)?e.byteLength:(M.isURLSearchParams(e)&&(e+=""),M.isString(e)?(await c(e)).byteLength:void 0)})(t):n};return async e=>{let{url:o,method:s,data:u,signal:c,cancelToken:l,timeout:E,onDownloadProgress:g,onUploadProgress:h,responseType:_,headers:m,withCredentials:y="same-origin",fetchOptions:R}=resolveConfig(e),A=t||fetch;_=_?(_+"").toLowerCase():"text";let I=composeSignals([c,l&&l.toAbortSignal()],E),T=null;const S=I&&I.unsubscribe&&(()=>{I.unsubscribe()});let C;try{if(h&&p&&"get"!==s&&"head"!==s&&0!==(C=await resolveBodyLength(m,u))){let e,t=new r(o,{method:"POST",body:u,duplex:"half"});if(M.isFormData(u)&&(e=t.headers.get("content-type"))&&m.setContentType(e),t.body){const[e,r]=progressEventDecorator(C,progressEventReducer(asyncDecorator(h)));u=trackStream(t.body,65536,e,r)}}M.isString(y)||(y=y?"include":"omit");const t=i&&"credentials"in r.prototype,c={...R,signal:I,method:s.toUpperCase(),headers:m.normalize().toJSON(),body:u,duplex:"half",credentials:t?y:void 0};T=i&&new r(o,c);let l=await(i?A(T,R):A(o,c));const E=d&&("stream"===_||"response"===_);if(d&&(g||E&&S)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=l[t]});const t=M.toFiniteNumber(l.headers.get("content-length")),[r,o]=g&&progressEventDecorator(t,progressEventReducer(asyncDecorator(g),!0))||[];l=new n(trackStream(l.body,65536,r,()=>{o&&o(),S&&S()}),e)}_=_||"text";let N=await f[M.findKey(f,_)||"text"](l,e);return!E&&S&&S(),await new Promise((t,r)=>{settle(t,r,{data:N,headers:z.from(l.headers),status:l.status,statusText:l.statusText,config:e,request:T})})}catch(t){if(S&&S(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new F("Network Error",F.ERR_NETWORK,e,T,t&&t.response),{cause:t.cause||t});throw F.from(t,t&&t.code,e,T,t&&t.response)}}},ie=new Map,getFetch=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:o}=t,i=[n,o,r];let s,u,c=i.length,l=ie;for(;c--;)s=i[c],u=l.get(s),void 0===u&&l.set(s,u=c?new Map:factory(t)),l=u;return u};getFetch();const se={http:null,xhr:ee,fetch:{get:getFetch}};M.forEach(se,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const renderReason=e=>`- ${e}`,isResolvedHandle=e=>M.isFunction(e)||null===e||!1===e;var ae={getAdapter:function getAdapter$1(e,t){e=M.isArray(e)?e:[e];const{length:r}=e;let n,o;const i={};for(let s=0;s<r;s++){let r;if(n=e[s],o=n,!isResolvedHandle(n)&&(o=se[(r=String(n)).toLowerCase()],void 0===o))throw new F(`Unknown adapter '${r}'`);if(o&&(M.isFunction(o)||(o=o.get(t))))break;i[r||"#"+s]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=r?e.length>1?"since :\n"+e.map(renderReason).join("\n"):" "+renderReason(e[0]):"as no adapter specified";throw new F("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return o},adapters:se};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new J(null,e)}function dispatchRequest(e){throwIfCancellationRequested(e),e.headers=z.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 ae.getAdapter(e.adapter||K.adapter,e)(e).then(function onAdapterResolution(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,e.transformResponse,t),t.headers=z.from(t.headers),t},function onAdapterRejection(t){return isCancel$1(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData.call(e,e.transformResponse,t.response),t.response.headers=z.from(t.response.headers))),Promise.reject(t)})}const ue="1.13.5",ce={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ce[e]=function validator(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const le={};ce.transitional=function transitional(e,t,r){function formatMessage(e,t){return"[Axios v"+ue+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,n,o)=>{if(!1===e)throw new F(formatMessage(n," has been removed"+(t?" in "+t:"")),F.ERR_DEPRECATED);return t&&!le[n]&&(le[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)}},ce.spelling=function spelling(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var pe={assertOptions:function assertOptions(e,t,r){if("object"!=typeof e)throw new F("options must be an object",F.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 F("option "+i+" must be "+r,F.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new F("Unknown option "+i,F.ERR_BAD_OPTION)}},validators:ce};const de=pe.validators;let fe=class Axios{constructor(e){this.defaults=e||{},this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=mergeConfig$1(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&pe.assertOptions(r,{silentJSONParsing:de.transitional(de.boolean),forcedJSONParsing:de.transitional(de.boolean),clarifyTimeoutError:de.transitional(de.boolean),legacyInterceptorReqResOrdering:de.transitional(de.boolean)},!1),null!=n&&(M.isFunction(n)?t.paramsSerializer={serialize:n}:pe.assertOptions(n,{encode:de.function,serialize:de.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),pe.assertOptions(t,{baseUrl:de.spelling("baseURL"),withXsrfToken:de.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&M.merge(o.common,o[t.method]);o&&M.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=z.concat(i,o);const s=[];let u=!0;this.interceptors.request.forEach(function unshiftRequestInterceptors(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;u=u&&e.synchronous;const r=t.transitional||k;r&&r.legacyInterceptorReqResOrdering?s.unshift(e.fulfilled,e.rejected):s.push(e.fulfilled,e.rejected)});const c=[];let l;this.interceptors.response.forEach(function pushResponseInterceptors(e){c.push(e.fulfilled,e.rejected)});let p,d=0;if(!u){const e=[dispatchRequest.bind(this),void 0];for(e.unshift(...s),e.push(...c),p=e.length,l=Promise.resolve(t);d<p;)l=l.then(e[d++],e[d++]);return l}p=s.length;let f=t;for(;d<p;){const e=s[d++],t=s[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=dispatchRequest.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,p=c.length;d<p;)l=l.then(c[d++],c[d++]);return l}getUri(e){return buildURL(buildFullPath((e=mergeConfig$1(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};M.forEach(["delete","get","head","options"],function forEachMethodNoData(e){fe.prototype[e]=function(t,r){return this.request(mergeConfig$1(r||{},{method:e,url:t,data:(r||{}).data}))}}),M.forEach(["post","put","patch"],function forEachMethodWithData(e){function generateHTTPMethod(t){return function httpMethod(r,n,o){return this.request(mergeConfig$1(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}fe.prototype[e]=generateHTTPMethod(),fe.prototype[e+"Form"]=generateHTTPMethod(!0)});const Ee={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ee).forEach(([e,t])=>{Ee[t]=e});const ge=function createInstance(e){const t=new fe(e),r=bind(fe.prototype.request,t);return M.extend(r,fe.prototype,t,{allOwnKeys:!0}),M.extend(r,t,null,{allOwnKeys:!0}),r.create=function create(t){return createInstance(mergeConfig$1(e,t))},r}(K);ge.Axios=fe,ge.CanceledError=J,ge.CancelToken=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 J(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)}toAbortSignal(){const e=new AbortController,abort=t=>{e.abort(t)};return this.subscribe(abort),e.signal.unsubscribe=()=>this.unsubscribe(abort),e.signal}static source(){let e;return{token:new CancelToken(function executor(t){e=t}),cancel:e}}},ge.isCancel=isCancel$1,ge.VERSION=ue,ge.toFormData=toFormData$1,ge.AxiosError=F,ge.Cancel=ge.CanceledError,ge.all=function all(e){return Promise.all(e)},ge.spread=function spread$1(e){return function wrap(t){return e.apply(null,t)}},ge.isAxiosError=function isAxiosError$1(e){return M.isObject(e)&&!0===e.isAxiosError},ge.mergeConfig=mergeConfig$1,ge.AxiosHeaders=z,ge.formToJSON=e=>formDataToJSON(M.isHTMLForm(e)?new FormData(e):e),ge.getAdapter=ae.getAdapter,ge.HttpStatusCode=Ee,ge.default=ge;const{Axios:he,AxiosError:_e,CanceledError:me,isCancel:ye,CancelToken:Re,VERSION:Ae,all:Ie,Cancel:Te,isAxiosError:Se,spread:Ce,toFormData:Ne,AxiosHeaders:Oe,HttpStatusCode:be,formToJSON:Pe,getAdapter:Ue,mergeConfig:De}=ge;var Le="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function a(){var e=!1;try{e=this instanceof a}catch{}return e?Reflect.construct(t,arguments,this.constructor):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}var ve,Be,Me,Fe,we,xe={exports:{}};function requireMs(){if(Be)return ve;Be=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 ve=function(s,u){u=u||{};var c=typeof s;if("string"===c&&s.length>0)return function parse(s){if((s=String(s)).length>100)return;var u=/^(-?(?:\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(!u)return;var c=parseFloat(u[1]);switch((u[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*i;case"weeks":case"week":case"w":return c*o;case"days":case"day":case"d":return c*n;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(s);if("number"===c&&isFinite(s))return u.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))},ve}var ke,Ge,Ye=function requireBrowser(){return we||(we=1,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")||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;let e;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&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[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=function requireCommon(){return Fe||(Fe=1,Me=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 matchesTemplate(e,t){let r=0,n=0,o=-1,i=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(o=n,i=r,n++):(r++,n++);else{if(-1===o)return!1;n=o+1,i++,r=i}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return createDebug.debug=createDebug,createDebug.default=createDebug,createDebug.coerce=function coerce(e){return e instanceof Error?e.stack||e.message:e},createDebug.disable=function disable(){const e=[...createDebug.names,...createDebug.skips.map(e=>"-"+e)].join(",");return createDebug.enable(""),e},createDebug.enable=function enable(e){createDebug.save(e),createDebug.namespaces=e,createDebug.names=[],createDebug.skips=[];const t=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of t)"-"===e[0]?createDebug.skips.push(e.slice(1)):createDebug.names.push(e)},createDebug.enabled=function enabled(e){for(const t of createDebug.skips)if(matchesTemplate(e,t))return!1;for(const t of createDebug.names)if(matchesTemplate(e,t))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}),Me}()(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(xe,xe.exports)),xe.exports}(),$e=getDefaultExportFromCjs(Ye);function requireType(){return Ge?ke:(Ge=1,ke=TypeError)}var He,je,Ve,qe,Ke,We,Xe,ze,Je,Qe,Ze,et,tt,rt,nt,ot,it,st,at,ut,ct,lt,pt,dt,ft,Et,gt,ht,_t,mt,yt,Rt,At,It,Tt,St,Ct,Nt,Ot,bt,Pt,Ut,Dt,Lt,vt,Bt,Mt,Ft,wt,xt,kt,Gt,Yt,$t,Ht,jt,Vt,qt,Kt,Wt,Xt,zt,Jt,Qt,Zt,er,tr,rr,nr,or,ir,sr,ar,ur,cr,lr,pr,dr,fr,Er,gr,hr,_r,mr,yr,Rr,Ar,Ir,Tr=getAugmentedNamespace(Object.freeze({__proto__:null,default:{}}));function requireObjectInspect(){if(je)return He;je=1;var e="function"==typeof Map&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=e&&t&&"function"==typeof t.get?t.get:null,n=e&&Map.prototype.forEach,o="function"==typeof Set&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=o&&i&&"function"==typeof i.get?i.get:null,u=o&&Set.prototype.forEach,c="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,l="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,f=Object.prototype.toString,E=Function.prototype.toString,g=String.prototype.match,h=String.prototype.slice,_=String.prototype.replace,m=String.prototype.toUpperCase,y=String.prototype.toLowerCase,R=RegExp.prototype.test,A=Array.prototype.concat,I=Array.prototype.join,T=Array.prototype.slice,S=Math.floor,C="function"==typeof BigInt?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,b="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===b||"symbol")?Symbol.toStringTag:null,U=Object.prototype.propertyIsEnumerable,D=("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||R.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-S(-e):S(e);if(n!==e){var o=String(n),i=h.call(t,o.length+1);return _.call(o,r,"$&_")+"."+_.call(_.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _.call(t,r,"$&_")}var L=Tr,v=L.custom,B=isSymbol(v)?v:null,M={__proto__:null,double:'"',single:"'"},F={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function wrapQuotes(e,t,r){var n=r.quoteStyle||t,o=M[n];return o+e+o}function quote(e){return _.call(String(e),/"/g,""")}function canTrustToString(e){return!P||!("object"==typeof e&&(P in e||void 0!==e[P]))}function isArray(e){return"[object Array]"===toStr(e)&&canTrustToString(e)}function isRegExp(e){return"[object RegExp]"===toStr(e)&&canTrustToString(e)}function isSymbol(e){if(b)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!O)return!1;try{return O.call(e),!0}catch(e){}return!1}He=function inspect_(e,t,o,i){var f=t||{};if(has(f,"quoteStyle")&&!has(M,f.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has(f,"maxStringLength")&&("number"==typeof f.maxStringLength?f.maxStringLength<0&&f.maxStringLength!==1/0:null!==f.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!has(f,"customInspect")||f.customInspect;if("boolean"!=typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has(f,"indent")&&null!==f.indent&&"\t"!==f.indent&&!(parseInt(f.indent,10)===f.indent&&f.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has(f,"numericSeparator")&&"boolean"!=typeof f.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var R=f.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,f);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var S=String(e);return R?addNumericSeparator(e,S):S}if("bigint"==typeof e){var N=String(e)+"n";return R?addNumericSeparator(e,N):N}var v=void 0===f.depth?5:f.depth;if(void 0===o&&(o=0),o>=v&&v>0&&"object"==typeof e)return isArray(e)?"[Array]":"[Object]";var F=function getIndent(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=I.call(Array(e.indent+1)," ")}return{base:r,prev:I.call(Array(t+1),r)}}(f,o);if(void 0===i)i=[];else if(indexOf(i,e)>=0)return"[Circular]";function inspect(e,t,r){if(t&&(i=T.call(i)).push(t),r){var n={depth:f.depth};return has(f,"quoteStyle")&&(n.quoteStyle=f.quoteStyle),inspect_(e,n,o+1,i)}return inspect_(e,f,o+1,i)}if("function"==typeof e&&!isRegExp(e)){var w=function nameOf(e){if(e.name)return e.name;var t=g.call(E.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(e),x=arrObjKeys(e,inspect);return"[Function"+(w?": "+w:" (anonymous)")+"]"+(x.length>0?" { "+I.call(x,", ")+" }":"")}if(isSymbol(e)){var k=b?_.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(e);return"object"!=typeof e||b?k:markBoxed(k)}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 G="<"+y.call(String(e.nodeName)),Y=e.attributes||[],$=0;$<Y.length;$++)G+=" "+Y[$].name+"="+wrapQuotes(quote(Y[$].value),"double",f);return G+=">",e.childNodes&&e.childNodes.length&&(G+="..."),G+="</"+y.call(String(e.nodeName))+">"}if(isArray(e)){if(0===e.length)return"[]";var H=arrObjKeys(e,inspect);return F&&!function singleLineValues(e){for(var t=0;t<e.length;t++)if(indexOf(e[t],"\n")>=0)return!1;return!0}(H)?"["+indentedJoin(H,F)+"]":"[ "+I.call(H,", ")+" ]"}if(function isError(e){return"[object Error]"===toStr(e)&&canTrustToString(e)}(e)){var j=arrObjKeys(e,inspect);return"cause"in Error.prototype||!("cause"in e)||U.call(e,"cause")?0===j.length?"["+String(e)+"]":"{ ["+String(e)+"] "+I.call(j,", ")+" }":"{ ["+String(e)+"] "+I.call(A.call("[cause]: "+inspect(e.cause),j),", ")+" }"}if("object"==typeof e&&m){if(B&&"function"==typeof e[B]&&L)return L(e,{depth:v-o});if("symbol"!==m&&"function"==typeof e.inspect)return e.inspect()}if(function isMap(e){if(!r||!e||"object"!=typeof e)return!1;try{r.call(e);try{s.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(e)){var V=[];return n&&n.call(e,function(t,r){V.push(inspect(r,e,!0)+" => "+inspect(t,e))}),collectionOf("Map",r.call(e),V,F)}if(function isSet(e){if(!s||!e||"object"!=typeof e)return!1;try{s.call(e);try{r.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(e)){var q=[];return u&&u.call(e,function(t){q.push(inspect(t,e))}),collectionOf("Set",s.call(e),q,F)}if(function isWeakMap(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e,c);try{l.call(e,l)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(e))return weakCollectionOf("WeakMap");if(function isWeakSet(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e,l);try{c.call(e,c)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(e))return weakCollectionOf("WeakSet");if(function isWeakRef(e){if(!p||!e||"object"!=typeof e)return!1;try{return p.call(e),!0}catch(e){}return!1}(e))return weakCollectionOf("WeakRef");if(function isNumber(e){return"[object Number]"===toStr(e)&&canTrustToString(e)}(e))return markBoxed(inspect(Number(e)));if(function isBigInt(e){if(!e||"object"!=typeof e||!C)return!1;try{return C.call(e),!0}catch(e){}return!1}(e))return markBoxed(inspect(C.call(e)));if(function isBoolean(e){return"[object Boolean]"===toStr(e)&&canTrustToString(e)}(e))return markBoxed(d.call(e));if(function isString(e){return"[object String]"===toStr(e)&&canTrustToString(e)}(e))return markBoxed(inspect(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&e===globalThis||void 0!==Le&&e===Le)return"{ [object globalThis] }";if(!function isDate(e){return"[object Date]"===toStr(e)&&canTrustToString(e)}(e)&&!isRegExp(e)){var K=arrObjKeys(e,inspect),W=D?D(e)===Object.prototype:e instanceof Object||e.constructor===Object,X=e instanceof Object?"":"null prototype",z=!W&&P&&Object(e)===e&&P in e?h.call(toStr(e),8,-1):X?"Object":"",J=(W||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(z||X?"["+I.call(A.call([],z||[],X||[]),": ")+"] ":"");return 0===K.length?J+"{}":F?J+"{"+indentedJoin(K,F)+"}":J+"{ "+I.call(K,", ")+" }"}return String(e)};var w=Object.prototype.hasOwnProperty||function(e){return e in this};function has(e,t){return w.call(e,t)}function toStr(e){return f.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(h.call(e,0,t.maxStringLength),t)+n}var o=F[t.quoteStyle||"single"];return o.lastIndex=0,wrapQuotes(_.call(_.call(e,o,"\\$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":"")+m.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):I.call(r,", "))+"}"}function indentedJoin(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+I.call(e,","+r)+"\n"+t.prev}function arrObjKeys(e,t){var r=isArray(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=has(e,o)?t(e[o],e):""}var i,s="function"==typeof N?N(e):[];if(b){i={};for(var u=0;u<s.length;u++)i["$"+s[u]]=s[u]}for(var c in e)has(e,c)&&(r&&String(Number(c))===c&&c<e.length||b&&i["$"+c]instanceof Symbol||(R.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof N)for(var l=0;l<s.length;l++)U.call(e,s[l])&&n.push("["+t(s[l])+"]: "+t(e[s[l]],e));return n}return He}function requireSideChannelList(){if(qe)return Ve;qe=1;var e=requireObjectInspect(),t=requireType(),listGetNode=function(e,t,r){for(var n,o=e;null!=(n=o.next);o=n)if(n.key===t)return o.next=n.next,r||(n.next=e.next,e.next=n),n};return Ve=function getSideChannelList(){var r,n={assert:function(r){if(!n.has(r))throw new t("Side channel does not contain "+e(r))},delete:function(e){var t=r&&r.next,n=function(e,t){if(e)return listGetNode(e,t,!0)}(r,e);return n&&t&&t===n&&(r=void 0),!!n},get:function(e){return function(e,t){if(e){var r=listGetNode(e,t);return r&&r.value}}(r,e)},has:function(e){return function(e,t){return!!e&&!!listGetNode(e,t)}(r,e)},set:function(e,t){r||(r={next:void 0}),function(e,t,r){var n=listGetNode(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,e,t)}};return n}}function requireEsObjectAtoms(){return We?Ke:(We=1,Ke=Object)}function requireEsErrors(){return ze?Xe:(ze=1,Xe=Error)}function require_eval(){return Qe?Je:(Qe=1,Je=EvalError)}function requireRange(){return et?Ze:(et=1,Ze=RangeError)}function requireRef(){return rt?tt:(rt=1,tt=ReferenceError)}function requireSyntax(){return ot?nt:(ot=1,nt=SyntaxError)}function requireUri(){return st?it:(st=1,it=URIError)}function requireAbs(){return ut?at:(ut=1,at=Math.abs)}function requireFloor(){return lt?ct:(lt=1,ct=Math.floor)}function requireMax(){return dt?pt:(dt=1,pt=Math.max)}function requireMin(){return Et?ft:(Et=1,ft=Math.min)}function requirePow(){return ht?gt:(ht=1,gt=Math.pow)}function requireRound(){return mt?_t:(mt=1,_t=Math.round)}function require_isNaN(){return Rt?yt:(Rt=1,yt=Number.isNaN||function isNaN(e){return e!=e})}function requireSign(){if(It)return At;It=1;var e=require_isNaN();return At=function sign(t){return e(t)||0===t?t:t<0?-1:1}}function requireGOPD(){return St?Tt:(St=1,Tt=Object.getOwnPropertyDescriptor)}function requireGopd(){if(Nt)return Ct;Nt=1;var e=requireGOPD();if(e)try{e([],"length")}catch(t){e=null}return Ct=e}function requireEsDefineProperty(){if(bt)return Ot;bt=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}return Ot=e}function requireHasSymbols(){if(Lt)return Dt;Lt=1;var e="undefined"!=typeof Symbol&&Symbol,t=function requireShams(){return Ut?Pt:(Ut=1,Pt=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(var n 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 o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0})}();return Dt=function hasNativeSymbols(){return"function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&t())))}}function requireReflect_getPrototypeOf(){return Bt?vt:(Bt=1,vt="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function requireObject_getPrototypeOf(){return Ft?Mt:(Ft=1,Mt=requireEsObjectAtoms().getPrototypeOf||null)}function requireImplementation(){if(xt)return wt;xt=1;var e=Object.prototype.toString,t=Math.max,r=function concatty(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r};return wt=function bind(n){var o=this;if("function"!=typeof o||"[object Function]"!==e.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,s=function slicy(e,t){for(var r=[],n=t,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),u=t(0,o.length-s.length),c=[],l=0;l<u;l++)c[l]="$"+l;if(i=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(c,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof i){var e=o.apply(this,r(s,arguments));return Object(e)===e?e:this}return o.apply(n,r(s,arguments))}),o.prototype){var p=function Empty(){};p.prototype=o.prototype,i.prototype=new p,p.prototype=null}return i},wt}function requireFunctionBind(){if(Gt)return kt;Gt=1;var e=requireImplementation();return kt=Function.prototype.bind||e}function requireFunctionCall(){return $t?Yt:($t=1,Yt=Function.prototype.call)}function requireFunctionApply(){return jt?Ht:(jt=1,Ht=Function.prototype.apply)}function requireActualApply(){if(Wt)return Kt;Wt=1;var e=requireFunctionBind(),t=requireFunctionApply(),r=requireFunctionCall(),n=function requireReflectApply(){return qt?Vt:(qt=1,Vt="undefined"!=typeof Reflect&&Reflect&&Reflect.apply)}();return Kt=n||e.call(r,t)}function requireCallBindApplyHelpers(){if(zt)return Xt;zt=1;var e=requireFunctionBind(),t=requireType(),r=requireFunctionCall(),n=requireActualApply();return Xt=function callBindBasic(o){if(o.length<1||"function"!=typeof o[0])throw new t("a function is required");return n(e,r,o)}}function requireGet(){if(Qt)return Jt;Qt=1;var e,t=requireCallBindApplyHelpers(),r=requireGopd();try{e=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var n=!!e&&r&&r(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return Jt=n&&"function"==typeof n.get?t([n.get]):"function"==typeof i&&function getDunder(e){return i(null==e?e:o(e))}}function requireGetProto(){if(er)return Zt;er=1;var e=requireReflect_getPrototypeOf(),t=requireObject_getPrototypeOf(),r=requireGet();return Zt=e?function getProto(t){return e(t)}:t?function getProto(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:r?function getProto(e){return r(e)}:null}function requireHasown(){if(rr)return tr;rr=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=requireFunctionBind();return tr=r.call(e,t)}function requireGetIntrinsic(){if(or)return nr;var e;or=1;var t=requireEsObjectAtoms(),r=requireEsErrors(),n=require_eval(),o=requireRange(),i=requireRef(),s=requireSyntax(),u=requireType(),c=requireUri(),l=requireAbs(),p=requireFloor(),d=requireMax(),f=requireMin(),E=requirePow(),g=requireRound(),h=requireSign(),_=Function,getEvalledConstructor=function(e){try{return _('"use strict"; return ('+e+").constructor;")()}catch(e){}},m=requireGopd(),y=requireEsDefineProperty(),throwTypeError=function(){throw new u},R=m?function(){try{return throwTypeError}catch(e){try{return m(arguments,"callee").get}catch(e){return throwTypeError}}}():throwTypeError,A=requireHasSymbols()(),I=requireGetProto(),T=requireObject_getPrototypeOf(),S=requireReflect_getPrototypeOf(),C=requireFunctionApply(),N=requireFunctionCall(),O={},b="undefined"!=typeof Uint8Array&&I?I(Uint8Array):e,P={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer,"%ArrayIteratorPrototype%":A&&I?I([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":O,"%AsyncGenerator%":O,"%AsyncGeneratorFunction%":O,"%AsyncIteratorPrototype%":O,"%Atomics%":"undefined"==typeof Atomics?e:Atomics,"%BigInt%":"undefined"==typeof BigInt?e:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?e:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":"undefined"==typeof Float16Array?e:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?e:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?e:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?e:FinalizationRegistry,"%Function%":_,"%GeneratorFunction%":O,"%Int8Array%":"undefined"==typeof Int8Array?e:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?e:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":A&&I?I(I([][Symbol.iterator]())):e,"%JSON%":"object"==typeof JSON?JSON:e,"%Map%":"undefined"==typeof Map?e:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&A&&I?I((new Map)[Symbol.iterator]()):e,"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":m,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?e:Promise,"%Proxy%":"undefined"==typeof Proxy?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":"undefined"==typeof Reflect?e:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?e:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&A&&I?I((new Set)[Symbol.iterator]()):e,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A&&I?I(""[Symbol.iterator]()):e,"%Symbol%":A?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":R,"%TypedArray%":b,"%TypeError%":u,"%Uint8Array%":"undefined"==typeof Uint8Array?e:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?e:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?e:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?e:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?e:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?e:WeakSet,"%Function.prototype.call%":N,"%Function.prototype.apply%":C,"%Object.defineProperty%":y,"%Object.getPrototypeOf%":T,"%Math.abs%":l,"%Math.floor%":p,"%Math.max%":d,"%Math.min%":f,"%Math.pow%":E,"%Math.round%":g,"%Math.sign%":h,"%Reflect.getPrototypeOf%":S};if(I)try{null.error}catch(e){var U=I(I(e));P["%Error.prototype%"]=U}var D=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&&I&&(t=I(n.prototype))}return P[e]=t,t},L={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},v=requireFunctionBind(),B=requireHasown(),M=v.call(N,Array.prototype.concat),F=v.call(C,Array.prototype.splice),w=v.call(N,String.prototype.replace),x=v.call(N,String.prototype.slice),k=v.call(N,RegExp.prototype.exec),G=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y=/\\(\\)?/g,$=function getBaseIntrinsic(e,t){var r,n=e;if(B(L,n)&&(n="%"+(r=L[n])[0]+"%"),B(P,n)){var o=P[n];if(o===O&&(o=D(n)),void 0===o&&!t)throw new u("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new s("intrinsic "+e+" does not exist!")};return nr=function GetIntrinsic(e,t){if("string"!=typeof e||0===e.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new u('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function stringToPath(e){var t=x(e,0,1),r=x(e,-1);if("%"===t&&"%"!==r)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var n=[];return w(e,G,function(e,t,r,o){n[n.length]=r?w(o,Y,"$1"):t||e}),n}(e),n=r.length>0?r[0]:"",o=$("%"+n+"%",t),i=o.name,c=o.value,l=!1,p=o.alias;p&&(n=p[0],F(r,M([0,1],p)));for(var d=1,f=!0;d<r.length;d+=1){var E=r[d],g=x(E,0,1),h=x(E,-1);if(('"'===g||"'"===g||"`"===g||'"'===h||"'"===h||"`"===h)&&g!==h)throw new s("property names with quotes must have matching quotes");if("constructor"!==E&&f||(l=!0),B(P,i="%"+(n+="."+E)+"%"))c=P[i];else if(null!=c){if(!(E in c)){if(!t)throw new u("base intrinsic for "+e+" exists, but the property is not available.");return}if(m&&d+1>=r.length){var _=m(c,E);c=(f=!!_)&&"get"in _&&!("originalValue"in _.get)?_.get:c[E]}else f=B(c,E),c=c[E];f&&!l&&(P[i]=c)}}return c},nr}function requireCallBound(){if(sr)return ir;sr=1;var e=requireGetIntrinsic(),t=requireCallBindApplyHelpers(),r=t([e("%String.prototype.indexOf%")]);return ir=function callBoundIntrinsic(n,o){var i=e(n,!!o);return"function"==typeof i&&r(n,".prototype.")>-1?t([i]):i}}function requireSideChannelMap(){if(ur)return ar;ur=1;var e=requireGetIntrinsic(),t=requireCallBound(),r=requireObjectInspect(),n=requireType(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),s=t("Map.prototype.set",!0),u=t("Map.prototype.has",!0),c=t("Map.prototype.delete",!0),l=t("Map.prototype.size",!0);return ar=!!o&&function getSideChannelMap(){var e,t={assert:function(e){if(!t.has(e))throw new n("Side channel does not contain "+r(e))},delete:function(t){if(e){var r=c(e,t);return 0===l(e)&&(e=void 0),r}return!1},get:function(t){if(e)return i(e,t)},has:function(t){return!!e&&u(e,t)},set:function(t,r){e||(e=new o),s(e,t,r)}};return t}}function requireSideChannel(){if(dr)return pr;dr=1;var e=requireType(),t=requireObjectInspect(),r=requireSideChannelList(),n=requireSideChannelMap(),o=function requireSideChannelWeakmap(){if(lr)return cr;lr=1;var e=requireGetIntrinsic(),t=requireCallBound(),r=requireObjectInspect(),n=requireSideChannelMap(),o=requireType(),i=e("%WeakMap%",!0),s=t("WeakMap.prototype.get",!0),u=t("WeakMap.prototype.set",!0),c=t("WeakMap.prototype.has",!0),l=t("WeakMap.prototype.delete",!0);return cr=i?function getSideChannelWeakMap(){var e,t,p={assert:function(e){if(!p.has(e))throw new o("Side channel does not contain "+r(e))},delete:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(e)return l(e,r)}else if(n&&t)return t.delete(r);return!1},get:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&e?s(e,r):t&&t.get(r)},has:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&e?c(e,r):!!t&&t.has(r)},set:function(r,o){i&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new i),u(e,r,o)):n&&(t||(t=n()),t.set(r,o))}};return p}:n}(),i=o||n||r;return pr=function getSideChannel(){var r,n={assert:function(r){if(!n.has(r))throw new e("Side channel does not contain "+t(r))},delete:function(e){return!!r&&r.delete(e)},get:function(e){return r&&r.get(e)},has:function(e){return!!r&&r.has(e)},set:function(e,t){r||(r=i()),r.set(e,t)}};return n}}function requireFormats(){if(Er)return fr;Er=1;var e=String.prototype.replace,t=/%20/g,r="RFC3986";return fr={default:r,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:r}}function requireUtils(){if(hr)return gr;hr=1;var e=requireFormats(),t=requireSideChannel(),r=Object.prototype.hasOwnProperty,n=Array.isArray,o=t(),i=function markOverflow(e,t){return o.set(e,t),e},s=function isOverflow(e){return o.has(e)},u=function getMaxIndex(e){return o.get(e)},c=function setMaxIndex(e,t){o.set(e,t)},l=function(){for(var e=[],t=0;t<256;++t)e[e.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return e}(),p=function arrayToObject(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},d=1024;return gr={arrayToObject:p,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,r,n){if(s(e)){var o=u(e)+1;return e[o]=t,c(e,o),e}var l=[].concat(e,t);return l.length>r?i(p(l,{plainObjects:n}),l.length-1):l},compact:function compact(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],o=0;o<t.length;++o)for(var i=t[o],s=i.obj[i.prop],u=Object.keys(s),c=0;c<u.length;++c){var l=u[c],p=s[l];"object"==typeof p&&null!==p&&-1===r.indexOf(p)&&(t[t.length]={obj:s,prop:l},r[r.length]=p)}return function compactQueue(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(n(r)){for(var o=[],i=0;i<r.length;++i)void 0!==r[i]&&(o[o.length]=r[i]);t.obj[t.prop]=o}}}(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(t,r,n,o,i){if(0===t.length)return t;var s=t;if("symbol"==typeof t?s=Symbol.prototype.toString.call(t):"string"!=typeof t&&(s=String(t)),"iso-8859-1"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var u="",c=0;c<s.length;c+=d){for(var p=s.length>=d?s.slice(c,c+d):s,f=[],E=0;E<p.length;++E){var g=p.charCodeAt(E);45===g||46===g||95===g||126===g||g>=48&&g<=57||g>=65&&g<=90||g>=97&&g<=122||i===e.RFC1738&&(40===g||41===g)?f[f.length]=p.charAt(E):g<128?f[f.length]=l[g]:g<2048?f[f.length]=l[192|g>>6]+l[128|63&g]:g<55296||g>=57344?f[f.length]=l[224|g>>12]+l[128|g>>6&63]+l[128|63&g]:(E+=1,g=65536+((1023&g)<<10|1023&p.charCodeAt(E)),f[f.length]=l[240|g>>18]+l[128|g>>12&63]+l[128|g>>6&63]+l[128|63&g])}u+=f.join("")}return u},isBuffer:function isBuffer(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isOverflow:s,isRegExp:function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)},markOverflow:i,maybeMap:function maybeMap(e,t){if(n(e)){for(var r=[],o=0;o<e.length;o+=1)r[r.length]=t(e[o]);return r}return t(e)},merge:function merge(e,t,o){if(!t)return e;if("object"!=typeof t&&"function"!=typeof t){if(n(e)){var l=e.length;if(o&&"number"==typeof o.arrayLimit&&l>o.arrayLimit)return i(p(e.concat(t),o),l);e[l]=t}else{if(!e||"object"!=typeof e)return[e,t];if(s(e)){var d=u(e)+1;e[d]=t,c(e,d)}else{if(o&&o.strictMerge)return[e,t];(o&&(o.plainObjects||o.allowPrototypes)||!r.call(Object.prototype,t))&&(e[t]=!0)}}return e}if(!e||"object"!=typeof e){if(s(t)){for(var f=Object.keys(t),E=o&&o.plainObjects?{__proto__:null,0:e}:{0:e},g=0;g<f.length;g++){E[parseInt(f[g],10)+1]=t[f[g]]}return i(E,u(t)+1)}var h=[e].concat(t);return o&&"number"==typeof o.arrayLimit&&h.length>o.arrayLimit?i(p(h,o),h.length-1):h}var _=e;return n(e)&&!n(t)&&(_=p(e,o)),n(e)&&n(t)?(t.forEach(function(t,n){if(r.call(e,n)){var i=e[n];i&&"object"==typeof i&&t&&"object"==typeof t?e[n]=merge(i,t,o):e[e.length]=t}else e[n]=t}),e):Object.keys(t).reduce(function(e,n){var l=t[n];if(r.call(e,n)?e[n]=merge(e[n],l,o):e[n]=l,s(t)&&!s(e)&&i(e,u(t)),s(e)){var p=parseInt(n,10);String(p)===n&&p>=0&&p>u(e)&&c(e,p)}return e},_)}},gr}function requireStringify(){if(mr)return _r;mr=1;var e=requireSideChannel(),t=requireUtils(),r=requireFormats(),n=Object.prototype.hasOwnProperty,o={brackets:function brackets(e){return e+"[]"},comma:"comma",indices:function indices(e,t){return e+"["+t+"]"},repeat:function repeat(e){return e}},i=Array.isArray,s=Array.prototype.push,pushToArray=function(e,t){s.apply(e,i(t)?t:[t])},u=Date.prototype.toISOString,c=r.default,l={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:r.formatters[c],indices:!1,serializeDate:function serializeDate(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p={},d=function stringify(r,n,o,s,u,c,d,f,E,g,h,_,m,y,R,A,I,T){for(var S=r,C=T,N=0,O=!1;void 0!==(C=C.get(p))&&!O;){var b=C.get(r);if(N+=1,void 0!==b){if(b===N)throw new RangeError("Cyclic object value");O=!0}void 0===C.get(p)&&(N=0)}if("function"==typeof g?S=g(n,S):S instanceof Date?S=m(S):"comma"===o&&i(S)&&(S=t.maybeMap(S,function(e){return e instanceof Date?m(e):e})),null===S){if(c)return E&&!A?E(n,l.encoder,I,"key",y):n;S=""}if(function isNonNullishPrimitive(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e}(S)||t.isBuffer(S))return E?[R(A?n:E(n,l.encoder,I,"key",y))+"="+R(E(S,l.encoder,I,"value",y))]:[R(n)+"="+R(String(S))];var P,U=[];if(void 0===S)return U;if("comma"===o&&i(S))A&&E&&(S=t.maybeMap(S,E)),P=[{value:S.length>0?S.join(",")||null:void 0}];else if(i(g))P=g;else{var D=Object.keys(S);P=h?D.sort(h):D}var L=f?String(n).replace(/\./g,"%2E"):String(n),v=s&&i(S)&&1===S.length?L+"[]":L;if(u&&i(S)&&0===S.length)return v+"[]";for(var B=0;B<P.length;++B){var M=P[B],F="object"==typeof M&&M&&void 0!==M.value?M.value:S[M];if(!d||null!==F){var w=_&&f?String(M).replace(/\./g,"%2E"):String(M),x=i(S)?"function"==typeof o?o(v,w):v:v+(_?"."+w:"["+w+"]");T.set(r,N);var k=e();k.set(p,T),pushToArray(U,stringify(F,x,o,s,u,c,d,f,"comma"===o&&A&&i(S)?null:E,g,h,_,m,y,R,A,I,k))}}return U};return _r=function(t,s){var u,c=t,p=function normalizeStringifyOptions(e){if(!e)return l;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");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||l.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 s=r.default;if(void 0!==e.format){if(!n.call(r.formatters,e.format))throw new TypeError("Unknown format option provided.");s=e.format}var u,c=r.formatters[s],p=l.filter;if(("function"==typeof e.filter||i(e.filter))&&(p=e.filter),u=e.arrayFormat in o?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":l.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=void 0===e.allowDots?!0===e.encodeDotInKeys||l.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:l.addQueryPrefix,allowDots:d,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:l.allowEmptyArrays,arrayFormat:u,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:l.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?l.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:l.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:l.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:l.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:l.encodeValuesOnly,filter:p,format:s,formatter:c,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:l.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:l.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:l.strictNullHandling}}(s);"function"==typeof p.filter?c=(0,p.filter)("",c):i(p.filter)&&(u=p.filter);var f=[];if("object"!=typeof c||null===c)return"";var E=o[p.arrayFormat],g="comma"===E&&p.commaRoundTrip;u||(u=Object.keys(c)),p.sort&&u.sort(p.sort);for(var h=e(),_=0;_<u.length;++_){var m=u[_],y=c[m];p.skipNulls&&null===y||pushToArray(f,d(y,m,E,g,p.allowEmptyArrays,p.strictNullHandling,p.skipNulls,p.encodeDotInKeys,p.encode?p.encoder:null,p.filter,p.sort,p.allowDots,p.serializeDate,p.format,p.formatter,p.encodeValuesOnly,p.charset,h))}var R=f.join(p.delimiter),A=!0===p.addQueryPrefix?"?":"";return p.charsetSentinel&&("iso-8859-1"===p.charset?A+="utf8=%26%2310003%3B&":A+="utf8=%E2%9C%93&"),R.length>0?A+R:""},_r}function requireParse(){if(Rr)return yr;Rr=1;var e=requireUtils(),t=Object.prototype.hasOwnProperty,r=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},interpretNumericEntities=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},parseArrayValue=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},o=function parseQueryStringKeys(r,n,o,i){if(r){var s=function splitKeyIntoSegments(e,r){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(r.depth<=0){if(!r.plainObjects&&t.call(Object.prototype,n)&&!r.allowPrototypes)return;return[n]}var o=/(\[[^[\]]*])/g,i=/(\[[^[\]]*])/.exec(n),s=i?n.slice(0,i.index):n,u=[];if(s){if(!r.plainObjects&&t.call(Object.prototype,s)&&!r.allowPrototypes)return;u[u.length]=s}for(var c=0;null!==(i=o.exec(n))&&c<r.depth;){c+=1;var l=i[1].slice(1,-1);if(!r.plainObjects&&t.call(Object.prototype,l)&&!r.allowPrototypes)return;u[u.length]=i[1]}if(i){if(!0===r.strictDepth)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");u[u.length]="["+n.slice(i.index)+"]"}return u}(r,o);if(s)return function(t,r,n,o){var i=0;if(t.length>0&&"[]"===t[t.length-1]){var s=t.slice(0,-1).join("");i=Array.isArray(r)&&r[s]?r[s].length:0}for(var u=o?r:parseArrayValue(r,n,i),c=t.length-1;c>=0;--c){var l,p=t[c];if("[]"===p&&n.parseArrays)l=e.isOverflow(u)?u:n.allowEmptyArrays&&(""===u||n.strictNullHandling&&null===u)?[]:e.combine([],u,n.arrayLimit,n.plainObjects);else{l=n.plainObjects?{__proto__:null}:{};var d="["===p.charAt(0)&&"]"===p.charAt(p.length-1)?p.slice(1,-1):p,f=n.decodeDotInKeys?d.replace(/%2E/g,"."):d,E=parseInt(f,10),g=!isNaN(E)&&p!==f&&String(E)===f&&E>=0&&n.parseArrays;if(n.parseArrays||""!==f)if(g&&E<n.arrayLimit)(l=[])[E]=u;else{if(g&&n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(1===n.arrayLimit?"":"s")+" allowed in an array.");g?(l[E]=u,e.markOverflow(l,E)):"__proto__"!==f&&(l[f]=u)}else l={0:u}}u=l}return u}(s,n,o,i)}};return yr=function(i,s){var u=function normalizeParseOptions(t){if(!t)return n;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.decodeDotInKeys&&"boolean"!=typeof t.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==t.throwOnLimitExceeded&&"boolean"!=typeof t.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=void 0===t.charset?n.charset:t.charset,o=void 0===t.duplicates?n.duplicates:t.duplicates;if("combine"!==o&&"first"!==o&&"last"!==o)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===t.allowDots?!0===t.decodeDotInKeys||n.allowDots:!!t.allowDots,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:n.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:n.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:n.arrayLimit,charset:r,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:n.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:n.comma,decodeDotInKeys:"boolean"==typeof t.decodeDotInKeys?t.decodeDotInKeys:n.decodeDotInKeys,decoder:"function"==typeof t.decoder?t.decoder:n.decoder,delimiter:"string"==typeof t.delimiter||e.isRegExp(t.delimiter)?t.delimiter:n.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:n.depth,duplicates:o,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:n.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:n.plainObjects,strictDepth:"boolean"==typeof t.strictDepth?!!t.strictDepth:n.strictDepth,strictMerge:"boolean"==typeof t.strictMerge?!!t.strictMerge:n.strictMerge,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:n.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof t.throwOnLimitExceeded&&t.throwOnLimitExceeded}}(s);if(""===i||null==i)return u.plainObjects?{__proto__:null}:{};for(var c="string"==typeof i?function parseQueryStringValues(o,i){var s={__proto__:null},u=i.ignoreQueryPrefix?o.replace(/^\?/,""):o;u=u.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var c=i.parameterLimit===1/0?void 0:i.parameterLimit,l=u.split(i.delimiter,i.throwOnLimitExceeded?c+1:c);if(i.throwOnLimitExceeded&&l.length>c)throw new RangeError("Parameter limit exceeded. Only "+c+" parameter"+(1===c?"":"s")+" allowed.");var p,d=-1,f=i.charset;if(i.charsetSentinel)for(p=0;p<l.length;++p)0===l[p].indexOf("utf8=")&&("utf8=%E2%9C%93"===l[p]?f="utf-8":"utf8=%26%2310003%3B"===l[p]&&(f="iso-8859-1"),d=p,p=l.length);for(p=0;p<l.length;++p)if(p!==d){var E,g,h=l[p],_=h.indexOf("]="),m=-1===_?h.indexOf("="):_+1;if(-1===m?(E=i.decoder(h,n.decoder,f,"key"),g=i.strictNullHandling?null:""):null!==(E=i.decoder(h.slice(0,m),n.decoder,f,"key"))&&(g=e.maybeMap(parseArrayValue(h.slice(m+1),i,r(s[E])?s[E].length:0),function(e){return i.decoder(e,n.decoder,f,"value")})),g&&i.interpretNumericEntities&&"iso-8859-1"===f&&(g=interpretNumericEntities(String(g))),h.indexOf("[]=")>-1&&(g=r(g)?[g]:g),i.comma&&r(g)&&g.length>i.arrayLimit){if(i.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+i.arrayLimit+" element"+(1===i.arrayLimit?"":"s")+" allowed in an array.");g=e.combine([],g,i.arrayLimit,i.plainObjects)}if(null!==E){var y=t.call(s,E);y&&("combine"===i.duplicates||h.indexOf("[]=")>-1)?s[E]=e.combine(s[E],g,i.arrayLimit,i.plainObjects):y&&"last"!==i.duplicates||(s[E]=g)}}return s}(i,u):i,l=u.plainObjects?{__proto__:null}:{},p=Object.keys(c),d=0;d<p.length;++d){var f=p[d],E=o(f,c[f],u,"string"==typeof i);l=e.merge(l,E,u)}return!0===u.allowSparse?l:e.compact(l)}}function requireLib(){if(Ir)return Ar;Ir=1;var e=requireStringify(),t=requireParse();return Ar={formats:requireFormats(),parse:t,stringify:e}}var Sr=requireLib();const Cr=$e("ebay:request"),Nr={"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"},Or={"Content-Type":"multipart/form-data"},br={paramsSerializer:{indexes:null}};class AxiosRequest{constructor(e={}){this.instance=ge.create({headers:{...Nr},...br,...e})}get(e,t){return Cr("get: "+e,t),this.instance.get(e,t)}post(e,t,r){return Cr("post: "+e,{payload:t,config:r}),this.instance.post(e,t,r)}delete(e,t){return Cr("delete: "+e,t),this.instance.delete(e,t)}put(e,t,r){return Cr("put: "+e,{payload:t,config:r}),this.instance.put(e,t,r)}postForm(e,t,r){Cr("postForm: "+e);const n=Sr.stringify(t);return this.instance.post(e,n,r)}}class Base{constructor(e,t=new AxiosRequest(e.axiosConfig)){this.config=e,this.req=t}}const Pr=":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",Ur=new RegExp("^"+("["+Pr+"]["+(Pr+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*")+"$");function getAllMatches(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}const isName=function(e){const t=Ur.exec(e);return!(null==t)};const Dr={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]){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}continue}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}const Lr='"',vr="'";function readAttributeStr(e,t){let r="",n="",o=!1;for(;t<e.length;t++){if(e[t]===Lr||e[t]===vr)""===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 Br=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function validateAttributeString(e,t){const r=getAllMatches(e,Br),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(Object.prototype.hasOwnProperty.call(n,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 isName(e)}function validateTagName(e){return 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}const Mr={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,eNotation:!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,transformAttributeName:!1,updateTag:function(e,t,r){return e},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0};function normalizeProcessEntities(e){return"boolean"==typeof e?{enabled:e,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,allowedTags:null,tagFilter:null}:"object"==typeof e&&null!==e?{enabled:!1!==e.enabled,maxEntitySize:e.maxEntitySize??1e4,maxExpansionDepth:e.maxExpansionDepth??10,maxTotalExpansions:e.maxTotalExpansions??1e3,maxExpandedLength:e.maxExpandedLength??1e5,allowedTags:e.allowedTags??null,tagFilter:e.tagFilter??null}:normalizeProcessEntities(!0)}const buildOptions=function(e){const t=Object.assign({},Mr,e);return t.processEntities=normalizeProcessEntities(t.processEntities),t};let Fr;Fr="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class XmlNode{constructor(e){this.tagname=e,this.child=[],this[":@"]=Object.create(null)}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e,t){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),void 0!==t&&(this.child[this.child.length-1][Fr]={startIndex:t})}static getMetaDataSymbol(){return Fr}}class DocTypeReader{constructor(e){this.suppressValidationErr=!e,this.options=e}readDocType(e,t){const r=Object.create(null);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="";for(;t<e.length;t++)if("<"!==e[t]||i)if(">"===e[t]){if(i?"-"===e[t-1]&&"-"===e[t-2]&&(i=!1,n--):n--,0===n)break}else"["===e[t]?o=!0:s+=e[t];else{if(o&&hasSeq(e,"!ENTITY",t)){let n,o;if(t+=7,[n,o,t]=this.readEntityExp(e,t+1,this.suppressValidationErr),-1===o.indexOf("&")){const e=n.replace(/[.\-+*:]/g,"\\.");r[n]={regx:RegExp(`&${e};`,"g"),val:o}}}else if(o&&hasSeq(e,"!ELEMENT",t)){t+=8;const{index:r}=this.readElementExp(e,t+1);t=r}else if(o&&hasSeq(e,"!ATTLIST",t))t+=8;else if(o&&hasSeq(e,"!NOTATION",t)){t+=9;const{index:r}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=r}else{if(!hasSeq(e,"!--",t))throw new Error("Invalid DOCTYPE");i=!0}n++,s=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}}readEntityExp(e,t){t=skipWhitespace(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t])&&'"'!==e[t]&&"'"!==e[t];)r+=e[t],t++;if(validateEntityName(r),t=skipWhitespace(e,t),!this.suppressValidationErr){if("SYSTEM"===e.substring(t,t+6).toUpperCase())throw new Error("External entities are not supported");if("%"===e[t])throw new Error("Parameter entities are not supported")}let n="";if([t,n]=this.readIdentifierVal(e,t,"entity"),!1!==this.options.enabled&&this.options.maxEntitySize&&n.length>this.options.maxEntitySize)throw new Error(`Entity "${r}" size (${n.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[r,n,--t]}readNotationExp(e,t){t=skipWhitespace(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;!this.suppressValidationErr&&validateEntityName(r),t=skipWhitespace(e,t);const n=e.substring(t,t+6).toUpperCase();if(!this.suppressValidationErr&&"SYSTEM"!==n&&"PUBLIC"!==n)throw new Error(`Expected SYSTEM or PUBLIC, found "${n}"`);t+=n.length,t=skipWhitespace(e,t);let o=null,i=null;if("PUBLIC"===n)[t,o]=this.readIdentifierVal(e,t,"publicIdentifier"),'"'!==e[t=skipWhitespace(e,t)]&&"'"!==e[t]||([t,i]=this.readIdentifierVal(e,t,"systemIdentifier"));else if("SYSTEM"===n&&([t,i]=this.readIdentifierVal(e,t,"systemIdentifier"),!this.suppressValidationErr&&!i))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:r,publicIdentifier:o,systemIdentifier:i,index:--t}}readIdentifierVal(e,t,r){let n="";const o=e[t];if('"'!==o&&"'"!==o)throw new Error(`Expected quoted string, found "${o}"`);for(t++;t<e.length&&e[t]!==o;)n+=e[t],t++;if(e[t]!==o)throw new Error(`Unterminated ${r} value`);return[++t,n]}readElementExp(e,t){t=skipWhitespace(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;if(!this.suppressValidationErr&&!isName(r))throw new Error(`Invalid element name: "${r}"`);let n="";if("E"===e[t=skipWhitespace(e,t)]&&hasSeq(e,"MPTY",t))t+=4;else if("A"===e[t]&&hasSeq(e,"NY",t))t+=2;else if("("===e[t]){for(t++;t<e.length&&")"!==e[t];)n+=e[t],t++;if(")"!==e[t])throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${e[t]}"`);return{elementName:r,contentModel:n.trim(),index:t}}readAttlistExp(e,t){t=skipWhitespace(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;validateEntityName(r),t=skipWhitespace(e,t);let n="";for(;t<e.length&&!/\s/.test(e[t]);)n+=e[t],t++;if(!validateEntityName(n))throw new Error(`Invalid attribute name: "${n}"`);t=skipWhitespace(e,t);let o="";if("NOTATION"===e.substring(t,t+8).toUpperCase()){if(o="NOTATION","("!==e[t=skipWhitespace(e,t+=8)])throw new Error(`Expected '(', found "${e[t]}"`);t++;let r=[];for(;t<e.length&&")"!==e[t];){let n="";for(;t<e.length&&"|"!==e[t]&&")"!==e[t];)n+=e[t],t++;if(n=n.trim(),!validateEntityName(n))throw new Error(`Invalid notation name: "${n}"`);r.push(n),"|"===e[t]&&(t++,t=skipWhitespace(e,t))}if(")"!==e[t])throw new Error("Unterminated list of notations");t++,o+=" ("+r.join("|")+")"}else{for(;t<e.length&&!/\s/.test(e[t]);)o+=e[t],t++;const r=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!r.includes(o.toUpperCase()))throw new Error(`Invalid attribute type: "${o}"`)}t=skipWhitespace(e,t);let i="";return"#REQUIRED"===e.substring(t,t+8).toUpperCase()?(i="#REQUIRED",t+=8):"#IMPLIED"===e.substring(t,t+7).toUpperCase()?(i="#IMPLIED",t+=7):[t,i]=this.readIdentifierVal(e,t,"ATTLIST"),{elementName:r,attributeName:n,attributeType:o,defaultValue:i,index:t}}}const skipWhitespace=(e,t)=>{for(;t<e.length&&/\s/.test(e[t]);)t++;return t};function hasSeq(e,t,r){for(let n=0;n<t.length;n++)if(t[n]!==e[r+n+1])return!1;return!0}function validateEntityName(e){if(isName(e))return e;throw new Error(`Invalid entity name ${e}`)}const wr=/^[-+]?0x[a-fA-F0-9]+$/,xr=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,kr={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function toNumber(e,t={}){if(t=Object.assign({},kr,t),!e||"string"!=typeof e)return e;let r=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(r))return e;if("0"===e)return 0;if(t.hex&&wr.test(r))return function parse_int(e,t){if(parseInt)return parseInt(e,t);if(Number.parseInt)return Number.parseInt(e,t);if(window&&window.parseInt)return window.parseInt(e,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(r,16);if(r.includes("e")||r.includes("E"))return function resolveEnotation(e,t,r){if(!r.eNotation)return e;const n=t.match(Gr);if(n){let o=n[1]||"";const i=-1===n[3].indexOf("e")?"E":"e",s=n[2],u=o?e[s.length+1]===i:e[s.length]===i;return s.length>1&&u?e:1!==s.length||!n[3].startsWith(`.${i}`)&&n[3][0]!==i?r.leadingZeros&&!u?(t=(n[1]||"")+n[3],Number(t)):e:Number(t)}return e}(e,r,t);{const n=xr.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.substring(0,e.length-1)),e;return e}(n[3]);const u=o?"."===e[i.length+1]:"."===e[i.length];if(!t.leadingZeros&&(i.length>1||1===i.length&&!u))return e;{const n=Number(r),u=String(n);if(0===n)return n;if(-1!==u.search(/[eE]/))return t.eNotation?n:e;if(-1!==r.indexOf("."))return"0"===u||u===s||u===`${o}${s}`?n:e;let c=i?s:r;return i?c===u||o+c===u?n:e:c===u||c===o+u?n:e}}return e}}const Gr=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;class OrderedObjParser{constructor(e){if(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:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>fromCodePoint(t,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>fromCodePoint(t,16,"&#x")}},this.addExternalEntities=addExternalEntities,this.parseXml=parseXml,this.parseTextData=parseTextData,this.resolveNameSpace=resolveNameSpace,this.buildAttributesMap=buildAttributesMap,this.isItStopNode=isItStopNode,this.replaceEntitiesValue=replaceEntitiesValue$1,this.readStopNodeData=readStopNodeData,this.saveTextToParentTag=saveTextToParentTag,this.addChild=addChild,this.ignoreAttributesFn=function getIgnoreAttributesFn$1(e){return"function"==typeof e?e:Array.isArray(e)?t=>{for(const r of e){if("string"==typeof r&&t===r)return!0;if(r instanceof RegExp&&r.test(t))return!0}}:()=>!1}(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let e=0;e<this.options.stopNodes.length;e++){const t=this.options.stopNodes[e];"string"==typeof t&&(t.startsWith("*.")?this.stopNodesWildcard.add(t.substring(2)):this.stopNodesExact.add(t))}}}}function addExternalEntities(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r],o=n.replace(/[.\-+*:]/g,"\\.");this.lastEntities[n]={regex:new RegExp("&"+o+";","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,t,r));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 Yr=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function buildAttributesMap(e,t,r){if(!0!==this.options.ignoreAttributes&&"string"==typeof e){const n=getAllMatches(e,Yr),o=n.length,i={};for(let e=0;e<o;e++){const o=this.resolveNameSpace(n[e][1]);if(this.ignoreAttributesFn(o,t))continue;let s=n[e][4],u=this.options.attributeNamePrefix+o;if(o.length)if(this.options.transformAttributeName&&(u=this.options.transformAttributeName(u)),"__proto__"===u&&(u="#__proto__"),void 0!==s){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s,r,t);const e=this.options.attributeValueProcessor(o,s,t);i[u]=null==e?s:typeof e!=typeof s||e!==s?e:parseValue(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[u]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=i,e}return i}}const parseXml=function(e){e=e.replace(/\r\n?/g,"\n");const t=new XmlNode("!xml");let r=t,n="",o="";this.entityExpansionCount=0,this.currentExpandedLength=0;const i=new DocTypeReader(this.options.processEntities);for(let s=0;s<e.length;s++){if("<"===e[s])if("/"===e[s+1]){const t=findClosingIndex(e,">",s,"Closing Tag is not closed.");let i=e.substring(s+2,t).trim();if(this.options.removeNSPrefix){const e=i.indexOf(":");-1!==e&&(i=i.substr(e+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),r&&(n=this.saveTextToParentTag(n,r,o));const u=o.substring(o.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error(`Unpaired tag can not be used as closing tag: </${i}>`);let c=0;u&&-1!==this.options.unpairedTags.indexOf(u)?(c=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=o.lastIndexOf("."),o=o.substring(0,c),r=this.tagsNodeStack.pop(),n="",s=t}else if("?"===e[s+1]){let t=readTagExp(e,s,!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 XmlNode(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,o,t.tagName)),this.addChild(r,e,o,s)}s=t.closeIndex+1}else if("!--"===e.substr(s+1,3)){const t=findClosingIndex(e,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const i=e.substring(s+4,t-2);n=this.saveTextToParentTag(n,r,o),r.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}s=t}else if("!D"===e.substr(s+1,2)){const t=i.readDocType(e,s);this.docTypeEntities=t.entities,s=t.i}else if("!["===e.substr(s+1,2)){const t=findClosingIndex(e,"]]>",s,"CDATA is not closed.")-2,i=e.substring(s+9,t);n=this.saveTextToParentTag(n,r,o);let u=this.parseTextData(i,r.tagname,o,!0,!1,!0,!0);null==u&&(u=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):r.add(this.options.textNodeName,u),s=t+2}else{let i=readTagExp(e,s,this.options.removeNSPrefix),u=i.tagName;const c=i.rawTagName;let l=i.tagExp,p=i.attrExpPresent,d=i.closeIndex;if(this.options.transformTagName){const e=this.options.transformTagName(u);l===u&&(l=e),u=e}if(this.options.strictReservedNames&&(u===this.options.commentPropName||u===this.options.cdataPropName))throw new Error(`Invalid tag name: ${u}`);r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,o,!1));const f=r;f&&-1!==this.options.unpairedTags.indexOf(f.tagname)&&(r=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),u!==t.tagname&&(o+=o?"."+u:u);const E=s;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,o,u)){let t="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)"/"===u[u.length-1]?(u=u.substr(0,u.length-1),o=o.substr(0,o.length-1),l=u):l=l.substr(0,l.length-1),s=i.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(u))s=i.closeIndex;else{const r=this.readStopNodeData(e,c,d+1);if(!r)throw new Error(`Unexpected end of ${c}`);s=r.i,t=r.tagContent}const n=new XmlNode(u);u!==l&&p&&(n[":@"]=this.buildAttributesMap(l,o,u)),t&&(t=this.parseTextData(t,u,o,!0,p,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),n.add(this.options.textNodeName,t),this.addChild(r,n,o,E)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){if("/"===u[u.length-1]?(u=u.substr(0,u.length-1),o=o.substr(0,o.length-1),l=u):l=l.substr(0,l.length-1),this.options.transformTagName){const e=this.options.transformTagName(u);l===u&&(l=e),u=e}const e=new XmlNode(u);u!==l&&p&&(e[":@"]=this.buildAttributesMap(l,o,u)),this.addChild(r,e,o,E),o=o.substr(0,o.lastIndexOf("."))}else{if(-1!==this.options.unpairedTags.indexOf(u)){const e=new XmlNode(u);u!==l&&p&&(e[":@"]=this.buildAttributesMap(l,o)),this.addChild(r,e,o,E),o=o.substr(0,o.lastIndexOf(".")),s=i.closeIndex;continue}{const e=new XmlNode(u);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(r),u!==l&&p&&(e[":@"]=this.buildAttributesMap(l,o,u)),this.addChild(r,e,o,E),r=e}}n="",s=d}}else n+=e[s]}return t.child};function addChild(e,t,r,n){this.options.captureMetaData||(n=void 0);const o=this.options.updateTag(t.tagname,r,t[":@"]);!1===o||("string"==typeof o?(t.tagname=o,e.addChild(t,n)):e.addChild(t,n))}const replaceEntitiesValue$1=function(e,t,r){if(-1===e.indexOf("&"))return e;const n=this.options.processEntities;if(!n.enabled)return e;if(n.allowedTags&&!n.allowedTags.includes(t))return e;if(n.tagFilter&&!n.tagFilter(t,r))return e;for(let t in this.docTypeEntities){const r=this.docTypeEntities[t],o=e.match(r.regx);if(o){if(this.entityExpansionCount+=o.length,n.maxTotalExpansions&&this.entityExpansionCount>n.maxTotalExpansions)throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n.maxTotalExpansions}`);const t=e.length;if(e=e.replace(r.regx,r.val),n.maxExpandedLength&&(this.currentExpandedLength+=e.length-t,this.currentExpandedLength>n.maxExpandedLength))throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${n.maxExpandedLength}`)}}if(-1===e.indexOf("&"))return e;for(let t in this.lastEntities){const r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(-1===e.indexOf("&"))return e;if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}return e=e.replace(this.ampEntity.regex,this.ampEntity.val)};function saveTextToParentTag(e,t,r,n){return e&&(void 0===n&&(n=0===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,n){return!(!t||!t.has(n))||!(!e||!e.has(r))}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,u=i.search(/\s/);let c=i,l=!0;-1!==u&&(c=i.substring(0,u),i=i.substring(u+1).trimStart());const p=c;if(r){const e=c.indexOf(":");-1!==e&&(c=c.substr(e+1),l=c!==o.data.substr(e+1))}return{tagName:c,tagExp:i,closeIndex:s,attrExpPresent:l,rawTagName:p}}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&&toNumber(e,r)}return function isExist(e){return void 0!==e}(e)?e:""}function fromCodePoint(e,t,r){const n=Number.parseInt(e,t);return n>=0&&n<=1114111?String.fromCodePoint(n):r+e+";"}const $r=XmlNode.getMetaDataSymbol();function prettify(e,t){return compress(e,t)}function compress(e,t,r){let n;const o={};for(let i=0;i<e.length;i++){const s=e[i],u=propName$1(s);let c="";if(c=void 0===r?u:r+"."+u,u===t.textNodeName)void 0===n?n=s[u]:n+=""+s[u];else{if(void 0===u)continue;if(s[u]){let e=compress(s[u],t,c);const r=isLeafTag(e,t);s[":@"]?assignAttributes(e,s[":@"],c,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!==s[$r]&&"object"==typeof e&&null!==e&&(e[$r]=s[$r]),void 0!==o[u]&&Object.prototype.hasOwnProperty.call(o,u)?(Array.isArray(o[u])||(o[u]=[o[u]]),o[u].push(e)):t.isArray(u,c,r)?o[u]=[e]:o[u]=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{textNodeName:r}=t,n=Object.keys(e).length;return 0===n||!(1!==n||!e[r]&&"boolean"!=typeof e[r]&&0!==e[r])}class XMLParser{constructor(e){this.externalEntities={},this.options=buildOptions(e)}parse(e,t){if("string"!=typeof e&&e.toString)e=e.toString();else if("string"!=typeof e)throw new Error("XML data is accepted in String or Bytes[] form.");if(t){!0===t&&(t={});const r=function validate(e,t){t=Object.assign({},Dr,t);const r=[];let n=!1,o=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let i=0;i<e.length;i++)if("<"===e[i]&&"?"===e[i+1]){if(i+=2,i=readPI(e,i),i.err)return i}else{if("<"!==e[i]){if(isWhiteSpace(e[i]))continue;return getErrorObject("InvalidChar","char '"+e[i]+"' is not expected.",getLineNumberForPosition(e,i))}{let s=i;if(i++,"!"===e[i]){i=readCommentAndCDATA(e,i);continue}{let u=!1;"/"===e[i]&&(u=!0,i++);let c="";for(;i<e.length&&">"!==e[i]&&" "!==e[i]&&"\t"!==e[i]&&"\n"!==e[i]&&"\r"!==e[i];i++)c+=e[i];if(c=c.trim(),"/"===c[c.length-1]&&(c=c.substring(0,c.length-1),i--),!validateTagName(c)){let t;return t=0===c.trim().length?"Invalid space after '<'.":"Tag '"+c+"' is an invalid name.",getErrorObject("InvalidTag",t,getLineNumberForPosition(e,i))}const l=readAttributeStr(e,i);if(!1===l)return getErrorObject("InvalidAttr","Attributes for '"+c+"' have open quote.",getLineNumberForPosition(e,i));let p=l.value;if(i=l.index,"/"===p[p.length-1]){const r=i-p.length;p=p.substring(0,p.length-1);const o=validateAttributeString(p,t);if(!0!==o)return getErrorObject(o.err.code,o.err.msg,getLineNumberForPosition(e,r+o.err.line));n=!0}else if(u){if(!l.tagClosed)return getErrorObject("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",getLineNumberForPosition(e,i));if(p.trim().length>0)return getErrorObject("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",getLineNumberForPosition(e,s));if(0===r.length)return getErrorObject("InvalidTag","Closing tag '"+c+"' has not been opened.",getLineNumberForPosition(e,s));{const t=r.pop();if(c!==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 '"+c+"'.",getLineNumberForPosition(e,s))}0==r.length&&(o=!0)}}else{const u=validateAttributeString(p,t);if(!0!==u)return getErrorObject(u.err.code,u.err.msg,getLineNumberForPosition(e,i-p.length+u.err.line));if(!0===o)return getErrorObject("InvalidXml","Multiple possible root nodes found.",getLineNumberForPosition(e,i));-1!==t.unpairedTags.indexOf(c)||r.push({tagName:c,tagStartPos:s}),n=!0}for(i++;i<e.length;i++)if("<"===e[i]){if("!"===e[i+1]){i++,i=readCommentAndCDATA(e,i);continue}if("?"!==e[i+1])break;if(i=readPI(e,++i),i.err)return i}else if("&"===e[i]){const t=validateAmpersand(e,i);if(-1==t)return getErrorObject("InvalidChar","char '&' is not expected.",getLineNumberForPosition(e,i));i=t}else if(!0===o&&!isWhiteSpace(e[i]))return getErrorObject("InvalidXml","Extra text at the end",getLineNumberForPosition(e,i));"<"===e[i]&&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)}(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new OrderedObjParser(this.options);r.addExternalEntities(this.externalEntities);const n=r.parseXml(e);return this.options.preserveOrder||void 0===n?n:prettify(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 '
'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}static getMetaDataSymbol(){return XmlNode.getMetaDataSymbol()}}function toXml(e,t){let r="";return t.format&&t.indentBy.length>0&&(r="\n"),arrToStr(e,t,"",r)}function arrToStr(e,t,r,n){let o="",i=!1;if(!Array.isArray(e)){if(null!=e){let r=e.toString();return r=replaceEntitiesValue(r,t),r}return""}for(let s=0;s<e.length;s++){const u=e[s],c=propName(u);if(void 0===c)continue;let l="";if(l=0===r.length?c:`${r}.${c}`,c===t.textNodeName){let e=u[c];isStopNode(l,t)||(e=t.tagValueProcessor(c,e),e=replaceEntitiesValue(e,t)),i&&(o+=n),o+=e,i=!1;continue}if(c===t.cdataPropName){i&&(o+=n),o+=`<![CDATA[${u[c][0][t.textNodeName]}]]>`,i=!1;continue}if(c===t.commentPropName){o+=n+`\x3c!--${u[c][0][t.textNodeName]}--\x3e`,i=!0;continue}if("?"===c[0]){const e=attr_to_str(u[":@"],t),r="?xml"===c?"":n;let s=u[c][0][t.textNodeName];s=0!==s.length?" "+s:"",o+=r+`<${c}${s}${e}?>`,i=!0;continue}let p=n;""!==p&&(p+=t.indentBy);const d=n+`<${c}${attr_to_str(u[":@"],t)}`,f=arrToStr(u[c],t,l,p);-1!==t.unpairedTags.indexOf(c)?t.suppressUnpairedNode?o+=d+">":o+=d+"/>":f&&0!==f.length||!t.suppressEmptyNode?f&&f.endsWith(">")?o+=d+`>${f}${n}</${c}>`:(o+=d+">",f&&""!==n&&(f.includes("/>")||f.includes("</"))?o+=n+t.indentBy+f+n:o+=f,o+=`</${c}>`):o+=d+"/>",i=!0}return o}function propName(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];if(Object.prototype.hasOwnProperty.call(e,n)&&":@"!==n)return n}}function attr_to_str(e,t){let r="";if(e&&!t.ignoreAttributes)for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let o=t.attributeValueProcessor(n,e[n]);o=replaceEntitiesValue(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(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 Hr={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:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Builder(e){this.options=Object.assign({},Hr,e),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=function getIgnoreAttributesFn(e){return"function"==typeof e?e:Array.isArray(e)?t=>{for(const r of e){if("string"==typeof r&&t===r)return!0;if(r instanceof RegExp&&r.test(t))return!0}}:()=>!1}(this.options.ignoreAttributes),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="")}function processTextOrObjNode(e,t,r,n){const o=this.j2x(e,r+1,n.concat(t));return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,o.attrStr,r):this.buildObjectNode(o.val,t,o.attrStr,r)}function indentate(e){return this.options.indentBy.repeat(e)}function isAttribute(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}Builder.prototype.build=function(e){return this.options.preserveOrder?toXml(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,r){let n="",o="";const i=r.join(".");for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s))if(void 0===e[s])this.isAttribute(s)&&(o+="");else if(null===e[s])this.isAttribute(s)||s===this.options.cdataPropName?o+="":"?"===s[0]?o+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:o+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if(e[s]instanceof Date)o+=this.buildTextValNode(e[s],s,"",t);else if("object"!=typeof e[s]){const r=this.isAttribute(s);if(r&&!this.ignoreAttributesFn(r,i))n+=this.buildAttrPairStr(r,""+e[s]);else if(!r)if(s===this.options.textNodeName){let t=this.options.tagValueProcessor(s,""+e[s]);o+=this.replaceEntitiesValue(t)}else o+=this.buildTextValNode(e[s],s,"",t)}else if(Array.isArray(e[s])){const n=e[s].length;let i="",u="";for(let c=0;c<n;c++){const n=e[s][c];if(void 0===n);else if(null===n)"?"===s[0]?o+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:o+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if("object"==typeof n)if(this.options.oneListGroup){const e=this.j2x(n,t+1,r.concat(s));i+=e.val,this.options.attributesGroupName&&n.hasOwnProperty(this.options.attributesGroupName)&&(u+=e.attrStr)}else i+=this.processTextOrObjNode(n,s,t,r);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(s,n);e=this.replaceEntitiesValue(e),i+=e}else i+=this.buildTextValNode(n,s,"",t)}this.options.oneListGroup&&(i=this.buildObjectNode(i,s,u,t)),o+=i}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){const t=Object.keys(e[s]),r=t.length;for(let o=0;o<r;o++)n+=this.buildAttrPairStr(t[o],""+e[s][t[o]])}else o+=this.processTextOrObjNode(e[s],s,t,r);return{attrStr:n,val:o}},Builder.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},Builder.prototype.buildObjectNode=function(e,t,r,n){if(""===e)return"?"===t[0]?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let o="</"+t+this.tagEndChar,i="";return"?"===t[0]&&(i="?",o=""),!r&&""!==r||-1!==e.indexOf("<")?!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:this.indentate(n)+"<"+t+r+i+">"+e+o}},Builder.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},Builder.prototype.buildTextValNode=function(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;if("?"===t[0])return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(t,e);return o=this.replaceEntitiesValue(o),""===o?this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+o+"</"+t+this.tagEndChar}},Builder.prototype.replaceEntitiesValue=function(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};const jr=$e("ebay:error"),Vr=Symbol("raw-error");class EBayError extends Error{constructor(e,t="",r={}){super(e),this.name=this.constructor.name,this.description=t,this.meta=r,Object.setPrototypeOf(this,new.target.prototype)}}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.`)}}class EbayApiError extends EBayError{constructor(e,t,r,n,o){super(e,t,r),this.errorCode=n,this.firstError=o}}class EBayApiError extends EbayApiError{}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 EBayAuthTokenIsInvalid extends EBayApiError{}EBayAuthTokenIsInvalid.code=931;class EBayAuthTokenIsHardExpired extends EBayApiError{}EBayAuthTokenIsHardExpired.code=932;class EBayIAFTokenInvalid extends EBayApiError{}EBayIAFTokenInvalid.code=21916984;class EBayTokenRequired extends EBayApiError{}EBayTokenRequired.code=930;class EBayInvalidScope extends EBayApiError{}const getErrorMessage=e=>"message"in e?e.message:"Errors"in e?Array.isArray(e.Errors)?e.Errors[0].ShortMessage:e.Errors.ShortMessage:"eBay API request error",getErrorDescription=(e,t)=>"description"in e?e.description:"Errors"in e?Array.isArray(e.Errors)?e.Errors[0].LongMessage:e.Errors.LongMessage:"longMessage"in e?e.longMessage:(200!==t?.status?t?.statusText:"")||"",getErrorCode=e=>"errorId"in e?e.errorId:"Errors"in e?Array.isArray(e.Errors)?e.Errors[0].ErrorCode:e.Errors.ErrorCode:void 0,extractEBayError=(e,t)=>{const r=function getEBayError(e){return e?"string"==typeof e?{message:e}:"Errors"in e?e:"error"in e&&"string"==typeof e.error?{message:e.error,description:"error_description"in e&&e.error_description||""}:"errors"in e&&Array.isArray(e.errors)?e.errors[0]:"error"in e&&Array.isArray(e.error)?e.error[0]:"errorMessage"in e?Array.isArray(e.errorMessage?.error)?e.errorMessage.error[0]:e.errorMessage.error:{message:"Unknown eBay API Error",description:'This error response is not known. You should investigate the "meta.res.data" for more information.'}:{message:"eBay API Error",description:"No data is set in response result."}}(t||e.response?.data),n={...r,[Vr]:e},o="Errors"in r?Array.isArray(r.Errors)?r.Errors[0]:r.Errors:r;return e?.response&&(n.res={status:e.response.status,statusText:e.response.statusText,headers:e.response.headers,data:e.response.data??{}}),e?.config&&(n.req={url:e.config.url,method:e.config.method,headers:e.config.headers,params:e.config.params}),{message:getErrorMessage(r),description:getErrorDescription(r,e?.response),errorCode:getErrorCode(r),meta:n,firstError:o}},handleEBayError=e=>{if(jr("handleEBayError",e),e instanceof EBayError||!e.response)throw e;if("object"!=typeof e)throw new EBayError(e);const{message:t,meta:r,description:n,errorCode:o,firstError:i}=extractEBayError(e);if("domain"in r&&"ACCESS"===r.domain)throw new EBayAccessDenied(t,n,r,o,i);if("message"in r&&"invalid_grant"===r.message)throw new EBayInvalidGrant(t,n,r,o,i);if("message"in r&&"invalid_scope"===r.message)throw new EBayInvalidScope(t,n,r,o,i);if("message"in r&&"Invalid access token"===r.message)throw new EBayInvalidAccessToken(t,n,r,o,i);if(o===EBayNotFound.code)throw new EBayNotFound(t,n,r,o,i);throw new EBayApiError(t,n,r,o,i)},checkEBayTraditionalResponse=(e,t)=>{if(!t)return void jr("checkEBayTraditionalResponse: No data found in response.");if(!("Errors"in t)&&!("errorMessage"in t))return;if("Errors"in t&&"Failure"!==t.Ack)return void jr(`checkEBayTraditionalResponse: eBay API returned ${t.Ack}`);const{message:r,meta:n,description:o,errorCode:i,firstError:s}=extractEBayError(e,t);if(void 0===i)throw new EBayApiError(r,o,n,i,s);switch(i){case EBayIAFTokenExpired.code:throw new EBayIAFTokenExpired(r,o,n,i,s);case EBayIAFTokenInvalid.code:case 1.32:throw new EBayIAFTokenInvalid(r,o,n,i,s);case EBayTokenRequired.code:throw new EBayTokenRequired(r,o,n,i,s);case EBayAuthTokenIsHardExpired.code:throw new EBayAuthTokenIsHardExpired(r,o,n,i,s);case EBayAuthTokenIsInvalid.code:throw new EBayAuthTokenIsInvalid(r,o,n,i,s)}throw new EBayApiError(r,o,n,i,s)};var qr=Object.freeze({__proto__:null,ApiEnvError:ApiEnvError,EBayAccessDenied:EBayAccessDenied,EBayApiError:EBayApiError,EBayAuthTokenIsHardExpired:EBayAuthTokenIsHardExpired,EBayAuthTokenIsInvalid:EBayAuthTokenIsInvalid,EBayError:EBayError,EBayIAFTokenExpired:EBayIAFTokenExpired,EBayIAFTokenInvalid:EBayIAFTokenInvalid,EBayInvalidAccessToken:EBayInvalidAccessToken,EBayInvalidGrant:EBayInvalidGrant,EBayInvalidScope:EBayInvalidScope,EBayNoCallError:EBayNoCallError,EBayNotFound:EBayNotFound,EBayTokenRequired:EBayTokenRequired,EbayApiError:EbayApiError,checkEBayTraditionalResponse:checkEBayTraditionalResponse,extractEBayError:extractEBayError,handleEBayError:handleEBayError,rawError:Vr});const Kr=$e("ebay:xml:request"),Wr={attributeNamePrefix:"@_",textNodeName:"#value",ignoreAttributes:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,cdataPropName:"__cdata"},Xr={raw:!1,parseOptions:{attributeNamePrefix:"",textNodeName:"value",ignoreAttributes:!1,parseAttributeValue:!0,parseTagValue:!0,numberParseOptions:{hex:!1,leadingZeros:!1},removeNSPrefix:!0,processEntities:{enabled:!0,maxEntitySize:1e4,maxTotalExpansions:1e4,maxExpandedLength:1e5,maxEntityCount:100},isArray:(e,t)=>/Array$/.test(t.slice(0,-e.length-1))},xmlBuilderOptions:Wr,useIaf:!0,sign:!1,headers:{},returnResponse:!1},zr={"Content-Type":"text/xml"};class XMLRequest{constructor(e,t,r,n){if(!e)throw new EBayNoCallError;this.config={...Xr,...r},this.j2x=new Builder({...Wr,...this.config.xmlBuilderOptions}),this.callName=e,this.fields=t||{},this.req=n}getResponseWrapper(){return`${this.callName}Response`}getCredentials(){return this.config.eBayAuthToken?{RequesterCredentials:{eBayAuthToken:this.config.eBayAuthToken}}:{}}getHeaders(){return{...zr,...this.config.headers}}toJSON(e){return Kr("parseOption",this.config.parseOptions),new XMLParser(this.config.parseOptions).parse(e)}toXML(e){return'<?xml version="1.0" encoding="utf-8"?>'+this.j2x.build({[this.callName+"Request"]:{"@_xmlns":this.config.xmlns,...this.getCredentials(),...e}})}async request(){const e=this.toXML(this.fields);Kr("xml",e);try{const{body:t,headers:r={}}=this.config.hook?.(e)??{body:e},n={headers:{...this.getHeaders(),...this.config.digitalSignatureHeaders?this.config.digitalSignatureHeaders(t):{},...r||{}}};Kr("config",n);const o=await this.req.post(this.config.endpoint,t,n);if(Kr("response",o),this.config.returnResponse)return o;const{data:i}=o;if(this.config.raw)return i;const s=this.xml2JSON(i);return checkEBayTraditionalResponse(o,s),s}catch(e){if(Kr("error",e),e.response?.data){const t=this.toJSON(e.response.data);checkEBayTraditionalResponse(e,t[this.callName+"Response"])}throw e}}xml2JSON(e){const t=this.toJSON(e);return t[this.getResponseWrapper()]??t}}const Jr=$e("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 Jr("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 Jr("Fetch auth token failed",e),e}}async obtainToken(e){const t=await this.mintToken(e);return Jr("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 Qr=$e("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)}get identityEndpoint(){return this.config.sandbox?OAuth2.IDENTITY_ENDPOINT.sandbox:OAuth2.IDENTITY_ENDPOINT.production}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("")}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 getAccessToken(){return this.getUserAccessToken()||this.getApplicationAccessToken()}getUserAccessToken(){return this._authToken?.access_token??null}async getApplicationAccessToken(){if(this._clientToken)return Qr("Return existing application access token: ",this._clientToken),this._clientToken.access_token;try{return(await this.obtainApplicationAccessToken()).access_token}catch(e){throw e}}getScope(){return[...this.scope]}setClientToken(e){this._clientToken=e}setScope(e){this.scope=e}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 Qr("Failed to mint application token",e),e}}async obtainApplicationAccessToken(){Qr("Obtain a new application access token with scope: ",this.scope.join(","));try{const e=await this.mintApplicationAccessToken();return Qr("Obtained a new application access token:",e),this.setClientToken(e),this.emitter.emit("refreshClientToken",e),e}catch(e){throw Qr("Failed to obtain application token",e),e}}async mintUserAccessToken(e,t=this.config.ruName){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{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 Qr("User Access Token",r),r}catch(e){throw Qr("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 Qr("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;Qr("Successfully refreshed token",e);const t={...this._authToken,...e};return this.setCredentials(t),this.emitter.emit("refreshAuthToken",t),t}catch(e){throw Qr("Failed to refresh the token",e),e}}async obtainToken(e){const t=await this.getToken(e);return Qr("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()}}}const Zr="-----BEGIN PRIVATE KEY-----",getUnixTimestamp=()=>Math.floor(Date.now()/1e3),getSignatureParams=e=>[...e?["content-digest"]:[],"x-ebay-signature-key","@method","@path","@authority"],getSignatureParamsValue=e=>getSignatureParams(e).map(e=>`"${e}"`).join(" "),generateContentDigestValue=(e,t="sha256")=>{const r=Buffer.from("string"==typeof e?e:JSON.stringify(e));return`${"sha512"===t?"sha-512":"sha-256"}=:${function createHash(){throw Error("crypto.createHash is not supported in browser.")}().update(r).digest("base64")}:`};const generateSignatureInput=(e,t=getUnixTimestamp())=>`sig1=(${getSignatureParamsValue(e)});created=${t}`;function generateSignature(e,t,r,n,o=getUnixTimestamp()){const i=function generateBaseString(e,t,r,n=getUnixTimestamp()){try{let o="";return getSignatureParams(r).forEach(r=>{if(o+=`"${r.toLowerCase()}": `,r.startsWith("@"))switch(r.toLowerCase()){case"@method":o+=t.method;break;case"@authority":o+=t.authority;break;case"@path":o+=t.path;break;default:throw new Error("Unknown pseudo header "+r)}else{if(!e[r])throw new Error("Header "+r+" not included in message");o+=e[r]}o+="\n"}),o+=`"@signature-params": (${getSignatureParamsValue(r)});created=${n}`,o}catch(e){throw new EBayError(`Error calculating signature base: ${e.message}`)}}(e,r,n,o);(t=t.trim()).startsWith(Zr)||(t=Zr+"\n"+t+"\n-----END PRIVATE KEY-----");return`sig1=:${function sign(){throw Error("crypto.sign is not supported in browser.")}(Buffer.from(i)).toString("base64")}:`}class Api extends Base{constructor(e,t,r){super(e,t),this.auth=r||new Auth(this.config,this.req)}getDigitalSignatureHeaders(e,t){if(!this.config.signature)return{};const r=getUnixTimestamp(),n={"x-ebay-enforce-signature":!0,"x-ebay-signature-key":this.config.signature.jwe,...t?{"content-digest":generateContentDigestValue(t,this.config.signature.cipher??"sha256")}:{},"signature-input":generateSignatureInput(t,r)};return{...n,signature:generateSignature(n,this.config.signature.privateKey,e,t,r)}}}const en={"Content-Type":"application/json","Cache-Control":"no-cache",..."undefined"==typeof window?{"Accept-Encoding":"application/gzip"}:{}},tn={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,sign:!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"})}get sign(){return this.api({sign:!0})}async get(e,t={},r){return this.doRequest({method:"get",path:e,config:t},r)}async delete(e,t={},r){return this.doRequest({method:"delete",path:e,config:t},r)}async post(e,t,r={},n){return this.doRequest({method:"post",path:e,data:t,config:r},n)}async put(e,t,r={},n){return this.doRequest({method:"put",path:e,data:t,config:r},n)}get additionalHeaders(){return Object.keys(tn).filter(e=>void 0!==this.config[e]).reduce((e,t)=>(e[tn[t]]=this.config[t],e),{})}async enrichRequestConfig(e,t=null,r=this.apiConfig){const n=await this.auth.getHeaderAuthorization(r.useIaf),o=r.sign?this.getDigitalSignatureHeaders({method:e.method.toUpperCase(),authority:Restful.buildServerUrl("",r.subdomain,r.sandbox,r.tld),path:r.apiVersion+r.basePath+e.path},t):{},i={...en,...this.additionalHeaders,...n,...r.headers,...o};return{...e.config,headers:{...e.config.headers||{},...i}}}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||(403===e?.meta?.res?.status&&"/sell/inventory/v1"===this.apiConfig.basePath||401===e?.meta?.res?.status&&"/post-order/v2"===this.apiConfig.basePath))}async request(e,t=this.apiConfig,r=!1){const{path:n,method:o,data:i}=e,s={...this.apiConfig,...t},u=this.getServerUrl(s)+n;try{r&&await this.auth.OAuth2.refreshToken();const t=await this.enrichRequestConfig(e,i,s),n=["get","delete"].includes(o)?[t]:[i,t],c=await this.req[o](u,...n);return this.apiConfig.returnResponse?c:c.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(e){return this.get("/item/",{params:e})}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 rn=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}})}};rn.id="Feed";let nn=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})}};nn.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:u,q:c,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:u,q:c,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})}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 Media extends Restful{get basePath(){return"/commerce/media/v1_beta"}get subdomain(){return"apim"}async createVideo(e){return this.post("/video",e)}async getVideo(e){return e=encodeURIComponent(e),this.get(`/video/${e}`)}async uploadVideo(e,t){return e=encodeURIComponent(e),this.post(`/video/${e}/upload`,t)}}Media.id="Media";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,n){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_compatibility_property_values`,{params:{category_id:t,compatibility_property:r,...n?.trim()&&{filter:n}}})}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";class Message extends Restful{get basePath(){return"/commerce/message/v1"}getConversations({limit:e,offset:t,conversationStatus:r,conversationType:n,referenceId:o,referenceType:i,startTime:s,endTime:u,otherPartyUsername:c}={}){return this.get("/conversation",{params:{limit:e,offset:t,conversation_status:r,conversation_type:n,reference_id:o,reference_type:i,start_time:s,end_time:u,other_party_username:c}})}getConversation(e,{conversationType:t,limit:r,offset:n}){return this.get(`/conversation/${e}`,{params:{conversation_type:t,limit:r,offset:n}})}updateConversation(e){return this.post("/update_conversation",e)}bulkUpdateConversation(e){return this.post("/bulk_update_conversation",e)}sendMessage(e){return this.post("/send_message",e)}}Message.id="Message";let on=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}})}};on.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",{signingKeyCipher: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: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 AccountV1 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`)}}AccountV1.id="AccountV1";class AccountV2 extends Restful{get basePath(){return"/sell/account/v2"}getRateTable(e){return e=encodeURIComponent(e),this.get(`/rate_table/${e}`)}updateShippingCost(e,t){return e=encodeURIComponent(e),this.post(`/rate_table/${e}/update_shipping_cost`,t)}getPayoutSettings(){return this.get("/payout_settings")}updatePayoutPercentage(e){return this.post("/payout_settings/update_percentage",e)}}AccountV2.id="AccountV2";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:{...Or}})}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)}getSkuLocationMapping(e,t){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.get(`/listing/${e}/sku/${t}/locations`)}createOrReplaceSkuLocationMapping(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.put(`/listing/${e}/sku/${t}/locations`,r)}deleteSkuLocationMapping(e,t){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.delete(`/listing/${e}/sku/${t}/locations`)}}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)}bulkUpdateAdsStatus(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_status`,t)}bulkUpdateAdsStatusByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_status_by_listing_id`,t)}launchCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/launch`)}setupQuickCampaign(e){return this.post("/ad_campaign/setup_quick_campaign",e)}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)}getAdGroups(e,{adGroupStatus:t,limit:r,offset:n}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/ad_group`,{params:{ad_group_status:t,limit:r,offset:n}})}createAdGroup(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad_group`,t)}getAdGroup(e,t){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/ad_group/${t}`)}updateAdGroup(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.put(`/ad_campaign/${e}/ad_group/${t}`,r)}suggestBids(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad_group/${t}/suggest_bids`,r)}suggestKeywords(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad_group/${t}/suggest_keywords`,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`)}suggestItems(e,{categoryIds:t,limit:r,offset:n}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/suggest_items`,{params:{category_ids:t,limit:r,offset:n}})}updateAdRateStrategy(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/update_ad_rate_strategy`,t)}updateCampaignBudget(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/update_campaign_budget`,t)}updateCampaignIdentification(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/update_campaign_identification`,t)}bulkCreateKeyword(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_create_keyword`,t)}bulkUpdateKeyword(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_keyword`,t)}getKeywords(e,{adGroupIds:t,keywordStatus:r,limit:n,offset:o}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/keyword`,{params:{ad_group_ids:t,keyword_status:r,limit:n,offset:o}})}createKeyword(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/keyword`,t)}getKeyword(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/ad_campaign/${e}/keyword/${t}`)}updateKeyword(e,t,r){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.put(`/ad_campaign/${e}/keyword/${t}`,r)}bulkCreateNegativeKeyword(e){return this.post("/bulk_create_negative_keyword",e)}bulkUpdateNegativeKeyword(e){return this.post("/bulk_update_negative_keyword",e)}getNegativeKeywords({adGroupIds:e,campaignIds:t,limit:r,negativeKeywordStatus:n,offset:o}={}){return this.get("/negative_keyword",{params:{ad_group_ids:e,campaign_ids:t,limit:r,negative_keyword_status:n,offset:o}})}createNegativeKeyword(e){return this.post("/negative_keyword",e)}getNegativeKeyword(e){return e=encodeURIComponent(e),this.get(`/negative_keyword/${e}`)}updateNegativeKeyword(e,t){return e=encodeURIComponent(e),this.put(`/negative_keyword/${e}`,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}})}getEmailCampaign(e){return e=encodeURIComponent(e),this.get(`/email_campaign/${e}`)}getEmailCampaigns({limit:e,q:t,offset:r,sort:n}={}){return this.get("/email_campaign",{params:{limit:e,offset:r,q:t,sort:n}})}createEmailCampaign(e){return this.post("/email_campaign",e)}updateEmailCampaign(e,t){return e=encodeURIComponent(e),this.put(`/email_campaign/${e}`,t)}deleteEmailCampaign(e){return e=encodeURIComponent(e),this.delete(`/email_campaign/${e}`)}getEmailPreview(e){return e=encodeURIComponent(e),this.get(`/email_campaign/${e}/email_preview`)}getAudiences(){return this.get("/email_campaign/audience")}getEmailReport(e,t){return this.get("/email_campaign/report",{params:{startDate:e,endDate:t}})}}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}})}getExtendedProducerResponsibilityPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_extended_producer_responsibility_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}})}getHazardousMaterialsLabels(e){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_hazardous_materials_labels`)}}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`,{responseType:"arraybuffer",responseEncoding:"binary"})}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`,{responseType:"arraybuffer",responseEncoding:"binary"})}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:Or})}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 sn,an;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"}(sn||(sn={})),function(e){e[e.GetPublicAlerts=0]="GetPublicAlerts",e[e.GetUserAlerts=1]="GetUserAlerts",e[e.Login=2]="Login",e[e.Logout=3]="Logout"}(an||(an={}));var un,cn=an;!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"}(un||(un={}));var ln,pn=un;!function(e){e[e.getMostWatchedItems=0]="getMostWatchedItems",e[e.getRelatedCategoryItems=1]="getRelatedCategoryItems",e[e.getSimilarItems=2]="getSimilarItems",e[e.getVersion=3]="getVersion"}(ln||(ln={}));var dn,fn=ln;!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"}(dn||(dn={}));var En,gn=dn;!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"}(En||(En={}));var hn,_n,mn,yn,Rn,An,In,Tn,Sn,Cn,Nn,On,bn,Pn,Un,Dn,Ln,vn,Bn,Mn,Fn,wn,xn,kn,Gn,Yn,$n,Hn,jn,Vn,qn,Kn,Wn,Xn,zn,Jn,Qn,Zn,eo,to,ro,no,oo,io,so,ao=En;class Traditional extends Api{constructor(){super(...arguments),this.createXMLRequest=(e,t)=>async(r,n)=>{const o={...Xr,...n,parseOptions:{...Xr.parseOptions,...this.config.parseOptions,...n?.parseOptions,processEntities:{...Xr.parseOptions.processEntities,...this.config.parseOptions?.processEntities,...n?.parseOptions?.processEntities}}};try{return await this.request(o,t,e,r)}catch(n){if(this.shouldRefreshToken(n))return await this.request(o,t,e,r,!0);throw n}}}createTradingApi(){if("number"!=typeof this.config.siteId)throw new Error("siteId is required for trading API.");return this.createTraditionalXMLApi({endpoint:{production:"api.ebay.com",sandbox:"api.sandbox.ebay.com"},path:"/ws/api.dll",calls:ao,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:"open.api.ebay.com",sandbox:"open.api.sandbox.ebay.com"},path:"/shopping",xmlns:"urn:ebay:apis:eBLBaseComponents",calls:gn,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:"svcs.ebay.com",sandbox:"svcs.sandbox.ebay.com"},path:"/services/search/FindingService/v1",xmlns:"http://www.ebay.com/marketplace/search/v1/services",calls:pn,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:"clientalerts.ebay.com",sandbox:"clientalerts.sandbox.ebay.com"},calls:cn},t=e.endpoint[this.config.sandbox?"sandbox":"production"],paramsSerializer=e=>Sr.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:"svcs.ebay.com",sandbox:"svcs.sandbox.ebay.com"},path:"/MerchandisingService",xmlns:"http://www.ebay.com/marketplace/services",calls:fn,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.")}shouldRefreshToken(e){return!!this.config.autoRefreshToken&&(e.name===EBayIAFTokenExpired.name||e.name===EBayIAFTokenInvalid.name||e.name===EBayAuthTokenIsHardExpired.name||e.name===EBayAuthTokenIsInvalid.name)}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,s=this.config.sandbox?e.endpoint.sandbox:e.endpoint.production;return{...r,xmlns:e.xmlns,endpoint:`https://${s}${e.path}`,headers:{...e.headers(t,i?o:null),...r.headers},digitalSignatureHeaders:t=>r.sign?this.getDigitalSignatureHeaders({method:"POST",authority:s,path:e.path},t):{},...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(rn),marketing:this.createRestfulApi(nn),offer:this.createRestfulApi(Offer),order:this.createRestfulApi(Order),deal:this.createRestfulApi(Deal),marketplaceInsights:this.createRestfulApi(MarketplaceInsights)}}createCommerceApi(){return{catalog:this.createRestfulApi(Catalog),charity:this.createRestfulApi(Charity),identity:this.createRestfulApi(Identity),notification:this.createRestfulApi(Notification),media:this.createRestfulApi(Media),translation:this.createRestfulApi(Translation),taxonomy:this.createRestfulApi(Taxonomy),message:this.createRestfulApi(Message)}}createDeveloperApi(){return{analytics:this.createRestfulApi(on),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(AccountV1),accountV2:this.createRestfulApi(AccountV2),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"}(hn||(hn={})),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"}(_n||(_n={})),function(e){e.BUYER="BUYER",e.SELLER="SELLER"}(mn||(mn={})),function(e){e.DEFAULT="DEFAULT",e.SUMMARY="SUMMARY"}(yn||(yn={})),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"}(Rn||(Rn={})),function(e){e.DEFAULT="DEFAULT",e.SUMMARY="SUMMARY"}(An||(An={})),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"}(In||(In={})),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"}(Tn||(Tn={})),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"}(Sn||(Sn={})),function(e){e.CREATE="CREATE",e.REQUEST="REQUEST",e.UNKNOWN="UNKNOWN"}(Cn||(Cn={})),function(e){e.EXCHANGE="EXCHANGE",e.MONEY_BACK="MONEY_BACK",e.REPLACEMENT="REPLACEMENT",e.UNKNOWN="UNKNOWN"}(Nn||(Nn={})),function(e){e.FULL="FULL",e.NONE="NONE",e.SUMMARY="SUMMARY"}(On||(On={})),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"}(bn||(bn={})),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"}(Pn||(Pn={})),function(e){e.MOTORS_VEHICLES="MOTORS_VEHICLES",e.ALL_EXCLUDING_MOTORS_VEHICLES="ALL_EXCLUDING_MOTORS_VEHICLES"}(Un||(Un={})),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"}(Dn||(Dn={})),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"}(Ln||(Ln={})),function(e){e.ITEM_RELATED="ITEM_RELATED",e.LABEL_RELATED="LABEL_RELATED",e.REFUND_RELATED="REFUND_RELATED",e.UNKNOWN="UNKNOWN"}(vn||(vn={})),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"}(Bn||(Bn={})),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"}(Mn||(Mn={})),function(e){e.STORE="STORE",e.WAREHOUSE="WAREHOUSE"}(Fn||(Fn={})),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"}(wn||(wn={})),function(e){e.DOMESTIC="DOMESTIC",e.INTERNATIONAL="INTERNATIONAL"}(xn||(xn={})),function(e){e.CALCULATED="CALCULATED",e.FLAT_RATE="FLAT_RATE",e.NOT_SPECIFIED="NOT_SPECIFIED"}(kn||(kn={})),function(e){e.EBAY_PAYMENTS="EBAY_PAYMENTS"}(Gn||(Gn={})),function(e){e.OPTED_IN="OPTED_IN",e.NOT_OPTED_IN="NOT_OPTED_IN"}(Yn||(Yn={})),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"}($n||($n={})),function(e){e.PAYPAL_EMAIL="PAYPAL_EMAIL"}(Hn||(Hn={})),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"}(jn||(jn={})),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"}(Vn||(Vn={})),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"}(qn||(qn={})),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"}(Kn||(Kn={})),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"}(Wn||(Wn={})),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"}(Xn||(Xn={})),function(e){e.AUCTION="AUCTION",e.FIXED_PRICE="FIXED_PRICE"}(zn||(zn={})),function(e){e.CLICK_THROUGH_RATE="CLICK_THROUGH_RATE",e.LISTING_IMPRESSION_SEARCH_RESULTS_PAGE="LISTING_IMPRESSION_SEARCH_RESULTS_PAGE",e.LISTING_IMPRESSION_STORE="CLICK_THROUGH_RATE",e.LISTING_IMPRESSION_TOTAL="LISTING_IMPRESSION_TOTAL",e.LISTING_VIEWS_SOURCE_DIRECT="LISTING_VIEWS_SOURCE_DIRECT",e.LISTING_VIEWS_SOURCE_OFF_EBAY="LISTING_VIEWS_SOURCE_OFF_EBAY",e.LISTING_VIEWS_SOURCE_OTHER_EBAY="LISTING_VIEWS_SOURCE_OTHER_EBAY",e.LISTING_VIEWS_SOURCE_SEARCH_RESULTS_PAGE="LISTING_VIEWS_SOURCE_SEARCH_RESULTS_PAGE",e.LISTING_VIEWS_SOURCE_STORE="LISTING_VIEWS_SOURCE_STORE",e.LISTING_VIEWS_TOTAL="LISTING_VIEWS_TOTAL",e.SALES_CONVERSION_RATE="SALES_CONVERSION_RATE",e.TOTAL_IMPRESSION_TOTAL="TOTAL_IMPRESSION_TOTAL",e.TRANSACTION="TRANSACTION"}(Jn||(Jn={})),function(e){e.MERCHANDISE_CREDIT="MERCHANDISE_CREDIT",e.MONEY_BACK="MONEY_BACK"}(Qn||(Qn={})),function(e){e.EXCHANGE="EXCHANGE",e.REPLACEMENT="REPLACEMENT"}(Zn||(Zn={})),function(e){e.BUYER="BUYER",e.SELLER="SELLER"}(eo||(eo={})),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"}(to||(to={})),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"}(ro||(ro={})),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"}(no||(no={})),function(e){e.INCH="INCH",e.FEET="FEET",e.CENTIMETER="CENTIMETER",e.METER="METER"}(oo||(oo={})),function(e){e.POUND="POUND",e.KILOGRAM="KILOGRAM",e.OUNCE="OUNCE",e.GRAM="GRAM"}(io||(io={})),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"}(so||(so={}));var uo=Object.freeze({__proto__:null,get ActivityOption(){return Mn},get CancelReason(){return no},get CaseSearchFieldGroup(){return An},get CaseStatusFilter(){return Rn},get CategoryType(){return Un},get Condition(){return Kn},get ContentLanguage(){return qn},get CountryCode(){return jn},get CurrencyCode(){return Vn},get Decision(){return Pn},get EscalateReason(){return bn},get FilePurpose(){return vn},get FormatType(){return zn},get GetReturnFieldGroupEnum(){return On},get InquirySearchFieldGroup(){return yn},get InquiryStatusFilter(){return In},get LengthUnitOfMeasure(){return oo},get Locale(){return qn},get LocaleEnum(){return Wn},get Marketplace(){return Xn},get MarketplaceId(){return _n},get Metric(){return Jn},get PackageType(){return so},get PaymentMethodType(){return $n},get PaymentsProgramStatus(){return Yn},get PaymentsProgramType(){return Gn},get ReasonForRefund(){return ro},get RecipientAccountReferenceType(){return Hn},get RefundFeeType(){return Bn},get RefundMethod(){return Qn},get RegionType(){return to},get RequestType(){return Cn},get ReturnCountFilter(){return Dn},get ReturnMethod(){return Zn},get ReturnReason(){return Sn},get ReturnShippingCostPayer(){return eo},get ReturnState(){return Ln},get ReturnType(){return Nn},get ShippingCarrier(){return Tn},get ShippingCostType(){return kn},get ShippingOptionType(){return xn},get SiteId(){return hn},get StoreType(){return Fn},get TimeDurationUnit(){return wn},get UserRoleFilter(){return mn},get WeightUnitOfMeasure(){return io}}),co=Object.freeze({__proto__:null});const lo={sandbox:!1,autoRefreshToken:!0,siteId:hn.EBAY_US,marketplaceId:_n.EBAY_US,acceptLanguage:qn.en_US,contentLanguage:qn.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");let t=null;return process.env.EBAY_JWE&&process.env.EBAY_PRIVATE_KEY&&(t={jwe:process.env.EBAY_JWE,privateKey:process.env.EBAY_PRIVATE_KEY}),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):hn.EBAY_US,marketplaceId:process.env.EBAY_MARKETPLACE_ID&&process.env.EBAY_MARKETPLACE_ID in _n?_n[process.env.EBAY_MARKETPLACE_ID]:_n.EBAY_US,ruName:process.env.EBAY_RU_NAME,sandbox:"true"===process.env.EBAY_SANDBOX,signature:t},e)}constructor(e,t){super({...lo,...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())}setSignature(e){this.config.signature=e}}eBayApi.SiteId=hn,eBayApi.MarketplaceId=_n,eBayApi.ContentLanguage=qn,eBayApi.Locale=qn;export{qn as ContentLanguage,qn as Locale,_n as MarketplaceId,hn as SiteId,eBayApi as default,eBayApi,uo as enums,qr as errors,co as types};
|
|
1
|
+
function bind(e,t){return function wrap(){return e.apply(t,arguments)}}const{toString:e}=Object.prototype,{getPrototypeOf:t}=Object,{iterator:r,toStringTag:n}=Symbol,o=(i=Object.create(null),t=>{const r=e.call(t);return i[r]||(i[r]=r.slice(8,-1).toLowerCase())});var i;const kindOfTest=e=>(e=e.toLowerCase(),t=>o(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray:s}=Array,c=typeOfTest("undefined");function isBuffer(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&p(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const u=kindOfTest("ArrayBuffer");const l=typeOfTest("string"),p=typeOfTest("function"),d=typeOfTest("number"),isObject=e=>null!==e&&"object"==typeof e,isPlainObject=e=>{if("object"!==o(e))return!1;const i=t(e);return!(null!==i&&i!==Object.prototype&&null!==Object.getPrototypeOf(i)||n in e||r in e)},h=kindOfTest("Date"),f=kindOfTest("File"),E=kindOfTest("Blob"),g=kindOfTest("FileList");const m=function getGlobal(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}}(),_=void 0!==m.FormData?m.FormData:void 0,y=kindOfTest("URLSearchParams"),[A,R,I,T]=["ReadableStream","Request","Response","Headers"].map(kindOfTest);function forEach(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),s(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(isBuffer(e))return;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){if(isBuffer(e))return null;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 S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,isContextDefined=e=>!c(e)&&e!==S;const N=(C="undefined"!=typeof Uint8Array&&t(Uint8Array),e=>C&&e instanceof C);var C;const b=kindOfTest("HTMLFormElement"),O=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),P=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};forEach(r,(r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)}),Object.defineProperties(e,n)};const D=kindOfTest("AsyncFunction"),U=(L="function"==typeof setImmediate,v=p(S.postMessage),L?setImmediate:v?(M=`axios@${Math.random()}`,w=[],S.addEventListener("message",({source:e,data:t})=>{e===S&&t===M&&w.length&&w.shift()()},!1),e=>{w.push(e),S.postMessage(M,"*")}):e=>setTimeout(e));var L,v,M,w;const B="undefined"!=typeof queueMicrotask?queueMicrotask.bind(S):"undefined"!=typeof process&&process.nextTick||U;var x={isArray:s,isArrayBuffer:u,isBuffer:isBuffer,isFormData:e=>{if(!e)return!1;if(_&&e instanceof _)return!0;const r=t(e);if(!r||r===Object.prototype)return!1;if(!p(e.append))return!1;const n=o(e);return"formdata"===n||"object"===n&&p(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function isArrayBufferView(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer),t},isString:l,isNumber:d,isBoolean:e=>!0===e||!1===e,isObject:isObject,isPlainObject:isPlainObject,isEmptyObject:e=>{if(!isObject(e)||isBuffer(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:A,isRequest:R,isResponse:I,isHeaders:T,isUndefined:c,isDate:h,isFile:f,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:E,isRegExp:P,isFunction:p,isStream:e=>isObject(e)&&p(e.pipe),isURLSearchParams:y,isTypedArray:N,isFileList:g,forEach:forEach,merge:function merge(...e){const{caseless:t,skipUndefined:r}=isContextDefined(this)&&this||{},n={},assignValue=(e,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;const i=t&&findKey(n,o)||o,u=O(n,i)?n[i]:void 0;isPlainObject(u)&&isPlainObject(e)?n[i]=merge(u,e):isPlainObject(e)?n[i]=merge({},e):s(e)?n[i]=e.slice():r&&c(e)||(n[i]=e)};for(let t=0,r=e.length;t<r;t++)e[t]&&forEach(e[t],assignValue);return n},extend:(e,t,r,{allOwnKeys:n}={})=>(forEach(t,(t,n)=>{r&&p(t)?Object.defineProperty(e,n,{__proto__:null,value:bind(t,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,n,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{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),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,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:o,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(s(e))return e;let t=e.length;if(!d(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const n=(e&&e[r]).call(e);let o;for(;(o=n.next())&&!o.done;){const r=o.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:b,hasOwnProperty:O,hasOwnProp:O,reduceDescriptors:reduceDescriptors,freezeMethods:e=>{reduceDescriptors(e,(t,r)=>{if(p(e)&&["arguments","caller","callee"].includes(r))return!1;const n=e[r];p(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 s(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)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:findKey,global:S,isContextDefined:isContextDefined,isSpecCompliantForm:function isSpecCompliantForm(e){return!!(e&&p(e.append)&&"FormData"===e[n]&&e[r])},toJSONObject:e=>{const t=new Array(10),visit=(e,r)=>{if(isObject(e)){if(t.indexOf(e)>=0)return;if(isBuffer(e))return e;if(!("toJSON"in e)){t[r]=e;const n=s(e)?[]:{};return forEach(e,(e,t)=>{const o=visit(e,r+1);!c(o)&&(n[t]=o)}),t[r]=void 0,n}}return e};return visit(e,0)},isAsyncFn:D,isThenable:e=>e&&(isObject(e)||p(e))&&p(e.then)&&p(e.catch),setImmediate:U,asap:B,isIterable:e=>null!=e&&p(e[r])};const F=x.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 k=Symbol("internals"),G=/[^\x09\x20-\x7E\x80-\xFF]/g;function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:x.isArray(e)?e.map(normalizeValue):function sanitizeHeaderValue(e){return function trimSPorHTAB(e){let t=0,r=e.length;for(;t<r;){const r=e.charCodeAt(t);if(9!==r&&32!==r)break;t+=1}for(;r>t;){const t=e.charCodeAt(r-1);if(9!==t&&32!==t)break;r-=1}return 0===t&&r===e.length?e:e.slice(t,r)}(e.replace(G,""))}(String(e))}function matchHeaderValue(e,t,r,n,o){return x.isFunction(n)?n.call(this,t,r):(o&&(t=r),x.isString(t)?x.isString(n)?-1!==t.indexOf(n):x.isRegExp(n)?n.test(t):void 0:void 0)}let Y=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=x.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)=>x.forEach(e,(e,r)=>setHeader(e,r,t));if(x.isPlainObject(e)||e instanceof this.constructor)setHeaders(e,t);else if(x.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))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]&&F[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t})(e),t);else if(x.isObject(e)&&x.isIterable(e)){let r,n,o={};for(const t of e){if(!x.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?x.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}setHeaders(o,t)}else null!=e&&setHeader(t,e,r);return this}get(e,t){if(e=normalizeHeader(e)){const r=x.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(x.isFunction(t))return t.call(this,e,r);if(x.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e)){const r=x.findKey(this,e);return!(!r||void 0===this[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=x.findKey(r,e);!o||t&&!matchHeaderValue(0,r[o],o,t)||(delete r[o],n=!0)}}return x.isArray(e)?e.forEach(deleteHeader):deleteHeader(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!matchHeaderValue(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return x.forEach(this,(n,o)=>{const i=x.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 x.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&x.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")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){const t=(this[k]=this[k]={accessors:{}}).accessors,r=this.prototype;function defineAccessor(e){const n=normalizeHeader(e);t[n]||(!function buildAccessors(e,t){const r=x.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{__proto__:null,value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})})}(r,e),t[n]=!0)}return x.isArray(e)?e.forEach(defineAccessor):defineAccessor(e),this}};Y.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),x.reduceDescriptors(Y.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),x.freezeMethods(Y);function redactConfig(e,t){const r=new Set(t.map(e=>String(e).toLowerCase())),n=[],visit=e=>{if(null===e||"object"!=typeof e)return e;if(x.isBuffer(e))return e;if(-1!==n.indexOf(e))return;let t;if(e instanceof Y&&(e=e.toJSON()),n.push(e),x.isArray(e))t=[],e.forEach((e,r)=>{const n=visit(e);x.isUndefined(n)||(t[r]=n)});else{if(!x.isPlainObject(e)&&function hasOwnOrPrototypeToJSON(e){if(x.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(x.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return n.pop(),e;t=Object.create(null);for(const[n,o]of Object.entries(e)){const e=r.has(n.toLowerCase())?"[REDACTED ****]":visit(o);x.isUndefined(e)||(t[n]=e)}}return n.pop(),t};return visit(e)}let $=class AxiosError extends Error{static from(e,t,r,n,o,i){const s=new AxiosError(e.message,t||e.code,r,n,o);return s.cause=e,s.name=e.name,null!=e.status&&null==s.status&&(s.status=e.status),i&&Object.assign(s,i),s}constructor(e,t,r,n,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,t=e&&x.hasOwnProp(e,"redact")?e.redact:void 0,r=x.isArray(t)&&t.length>0?redactConfig(e,t):x.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};$.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",$.ERR_BAD_OPTION="ERR_BAD_OPTION",$.ECONNABORTED="ECONNABORTED",$.ETIMEDOUT="ETIMEDOUT",$.ECONNREFUSED="ECONNREFUSED",$.ERR_NETWORK="ERR_NETWORK",$.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",$.ERR_DEPRECATED="ERR_DEPRECATED",$.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",$.ERR_BAD_REQUEST="ERR_BAD_REQUEST",$.ERR_CANCELED="ERR_CANCELED",$.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",$.ERR_INVALID_URL="ERR_INVALID_URL",$.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";function isVisitable(e){return x.isPlainObject(e)||x.isArray(e)}function removeBrackets(e){return x.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 j=x.toFlatObject(x,{},null,function filter(e){return/^is[A-Z]/.test(e)});function toFormData$1(e,t,r){if(!x.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=x.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function defined(e,t){return!x.isUndefined(t[e])})).metaTokens,o=r.visitor||defaultVisitor,i=r.dots,s=r.indexes,c=r.Blob||"undefined"!=typeof Blob&&Blob,u=void 0===r.maxDepth?100:r.maxDepth,l=c&&x.isSpecCompliantForm(t);if(!x.isFunction(o))throw new TypeError("visitor must be a function");function convertValue(e){if(null===e)return"";if(x.isDate(e))return e.toISOString();if(x.isBoolean(e))return e.toString();if(!l&&x.isBlob(e))throw new $("Blob is not supported. Use a Buffer instead.");return x.isArrayBuffer(e)||x.isTypedArray(e)?l&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function defaultVisitor(e,r,o){let c=e;if(x.isReactNative(t)&&x.isReactNativeBlob(e))return t.append(renderKey(o,r,i),convertValue(e)),!1;if(e&&!o&&"object"==typeof e)if(x.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(x.isArray(e)&&function isFlatArray(e){return x.isArray(e)&&!e.some(isVisitable)}(e)||(x.isFileList(e)||x.endsWith(r,"[]"))&&(c=x.toArray(e)))return r=removeBrackets(r),c.forEach(function each(e,n){!x.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 p=[],d=Object.assign(j,{defaultVisitor:defaultVisitor,convertValue:convertValue,isVisitable:isVisitable});if(!x.isObject(e))throw new TypeError("data must be an object");return function build(e,r,n=0){if(!x.isUndefined(e)){if(n>u)throw new $("Object is too deeply nested ("+n+" levels). Max depth: "+u,$.ERR_FORM_DATA_DEPTH_EXCEEDED);if(-1!==p.indexOf(e))throw Error("Circular reference detected in "+r.join("."));p.push(e),x.forEach(e,function each(e,i){!0===(!(x.isUndefined(e)||null===e)&&o.call(t,e,x.isString(i)?i.trim():i,r,d))&&build(e,r?r.concat(i):[i],n+1)}),p.pop()}}(e),t}function encode$1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function replacer(e){return t[e]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData$1(e,this,t)}const H=AxiosURLSearchParams.prototype;function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function buildURL(e,t,r){if(!t)return e;const n=r&&r.encode||encode,o=x.isFunction(r)?{serialize:r}:r,i=o&&o.serialize;let s;if(s=i?i(t,o):x.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,o).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}H.append=function append(e,t){this._pairs.push([e,t])},H.toString=function toString(e){const t=e?function(t){return e.call(this,t,encode$1)}:encode$1;return this._pairs.map(function each(e){return t(e[0])+"="+t(e[1])},"").join("&")};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){x.forEach(this.handlers,function forEachHandler(t){null!==t&&e(t)})}}var V={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},q={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:AxiosURLSearchParams,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const K="undefined"!=typeof window&&"undefined"!=typeof document,W="object"==typeof navigator&&navigator||void 0,X=K&&(!W||["ReactNative","NativeScript","NS"].indexOf(W.product)<0),z="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,J=K&&window.location.href||"http://localhost";var Q={...Object.freeze({__proto__:null,hasBrowserEnv:K,hasStandardBrowserEnv:X,hasStandardBrowserWebWorkerEnv:z,navigator:W,origin:J}),...q};function formDataToJSON(e){function buildPath(e,t,r,n){let o=e[n++];if("__proto__"===o)return!0;const i=Number.isFinite(+o),s=n>=e.length;if(o=!o&&x.isArray(r)?r.length:o,s)return x.hasOwnProp(r,o)?r[o]=x.isArray(r[o])?r[o].concat(t):[r[o],t]:r[o]=t,!i;r[o]&&x.isObject(r[o])||(r[o]=[]);return buildPath(e,t,r[o],n)&&x.isArray(r[o])&&(r[o]=function arrayToObject(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(x.isFormData(e)&&x.isFunction(e.entries)){const t={};return x.forEachEntry(e,(e,r)=>{buildPath(function parsePropPath(e){return x.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,t,0)}),t}return null}const own=(e,t)=>null!=e&&x.hasOwnProp(e,t)?e[t]:void 0;const Z={transitional:V,adapter:["xhr","http","fetch"],transformRequest:[function transformRequest(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=x.isObject(e);o&&x.isHTMLForm(e)&&(e=new FormData(e));if(x.isFormData(e))return n?JSON.stringify(formDataToJSON(e)):e;if(x.isArrayBuffer(e)||x.isBuffer(e)||x.isStream(e)||x.isFile(e)||x.isBlob(e)||x.isReadableStream(e))return e;if(x.isArrayBufferView(e))return e.buffer;if(x.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){const t=own(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return function toURLEncodedForm(e,t){return toFormData$1(e,new Q.classes.URLSearchParams,{visitor:function(e,t,r,n){return Q.isNode&&x.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((i=x.isFileList(e))||r.indexOf("multipart/form-data")>-1){const r=own(this,"env"),n=r&&r.FormData;return toFormData$1(i?{"files[]":e}:e,n&&new n,t)}}return o||n?(t.setContentType("application/json",!1),function stringifySafely(e,t,r){if(x.isString(e))try{return(t||JSON.parse)(e),x.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function transformResponse(e){const t=own(this,"transitional")||Z.transitional,r=t&&t.forcedJSONParsing,n=own(this,"responseType"),o="json"===n;if(x.isResponse(e)||x.isReadableStream(e))return e;if(e&&x.isString(e)&&(r&&!n||o)){const r=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,own(this,"parseReviver"))}catch(e){if(r){if("SyntaxError"===e.name)throw $.from(e,$.ERR_BAD_RESPONSE,this,null,own(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Q.classes.FormData,Blob:Q.classes.Blob},validateStatus:function validateStatus(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function transformData(e,t){const r=this||Z,n=t||r,o=Y.from(n.headers);let i=n.data;return x.forEach(e,function transform(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function isCancel$1(e){return!(!e||!e.__CANCEL__)}x.forEach(["delete","get","head","post","put","patch","query"],e=>{Z.headers[e]={}});let ee=class CanceledError extends ${constructor(e,t,r){super(null==e?"canceled":e,$.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function settle(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new $("Request failed with status code "+r.status,r.status>=400&&r.status<500?$.ERR_BAD_REQUEST:$.ERR_BAD_RESPONSE,r.config,r.request,r)):e(r)}const progressEventReducer=(e,t,r=3)=>{let n=0;const o=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 h=l&&u-l;return h?Math.round(1e3*d/h):void 0}}(50,250);return function throttle(e,t){let r,n,o=0,i=1e3/t;const invoke=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?invoke(e,t):(r=e,n||(n=setTimeout(()=>{n=null,invoke(r)},i-s)))},()=>r&&invoke(r)]}(r=>{const i=r.loaded,s=r.lengthComputable?r.total:void 0,c=null!=s?Math.min(i,s):i,u=Math.max(0,c-n),l=o(u);n=Math.max(n,c);e({loaded:c,total:s,progress:s?c/s:void 0,bytes:u,rate:l||void 0,estimated:l&&s?(s-c)/l:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},progressEventDecorator=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},asyncDecorator=e=>(...t)=>x.asap(()=>e(...t));var te=Q.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Q.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Q.origin),Q.navigator&&/(msie|trident)/i.test(Q.navigator.userAgent)):()=>!0,re=Q.hasStandardBrowserEnv?{write(e,t,r,n,o,i,s){if("undefined"==typeof document)return;const c=[`${e}=${encodeURIComponent(t)}`];x.isNumber(r)&&c.push(`expires=${new Date(r).toUTCString()}`),x.isString(n)&&c.push(`path=${n}`),x.isString(o)&&c.push(`domain=${o}`),!0===i&&c.push("secure"),x.isString(s)&&c.push(`SameSite=${s}`),document.cookie=c.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.split(";");for(let r=0;r<t.length;r++){const n=t[r].replace(/^\s+/,""),o=n.indexOf("=");if(-1!==o&&n.slice(0,o)===e)return decodeURIComponent(n.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function buildFullPath(e,t,r){let n=!function isAbsoluteURL(e){return"string"==typeof e&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t);return e&&(n||!1===r)?function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const headersToObject=e=>e instanceof Y?{...e}:e;function mergeConfig$1(e,t){t=t||{};const r=Object.create(null);function getMergedValue(e,t,r,n){return x.isPlainObject(e)&&x.isPlainObject(t)?x.merge.call({caseless:n},e,t):x.isPlainObject(t)?x.merge({},t):x.isArray(t)?t.slice():t}function mergeDeepProperties(e,t,r,n){return x.isUndefined(t)?x.isUndefined(e)?void 0:getMergedValue(void 0,e,0,n):getMergedValue(e,t,0,n)}function valueFromConfig2(e,t){if(!x.isUndefined(t))return getMergedValue(void 0,t)}function defaultToConfig2(e,t){return x.isUndefined(t)?x.isUndefined(e)?void 0:getMergedValue(void 0,e):getMergedValue(void 0,t)}function mergeDirectKeys(r,n,o){return x.hasOwnProp(t,o)?getMergedValue(r,n):x.hasOwnProp(e,o)?getMergedValue(void 0,r):void 0}Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});const n={url:valueFromConfig2,method:valueFromConfig2,data:valueFromConfig2,baseURL:defaultToConfig2,transformRequest:defaultToConfig2,transformResponse:defaultToConfig2,paramsSerializer:defaultToConfig2,timeout:defaultToConfig2,timeoutMessage:defaultToConfig2,withCredentials:defaultToConfig2,withXSRFToken: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,allowedSocketPaths:defaultToConfig2,responseEncoding:defaultToConfig2,validateStatus:mergeDirectKeys,headers:(e,t,r)=>mergeDeepProperties(headersToObject(e),headersToObject(t),0,!0)};return x.forEach(Object.keys({...e,...t}),function computeConfigValue(o){if("__proto__"===o||"constructor"===o||"prototype"===o)return;const i=x.hasOwnProp(n,o)?n[o]:mergeDeepProperties,s=i(x.hasOwnProp(e,o)?e[o]:void 0,x.hasOwnProp(t,o)?t[o]:void 0,o);x.isUndefined(s)&&i!==mergeDirectKeys||(r[o]=s)}),r}const ne=["content-type","content-length"];var resolveConfig=e=>{const t=mergeConfig$1({},e),own=e=>x.hasOwnProp(t,e)?t[e]:void 0,r=own("data");let n=own("withXSRFToken");const o=own("xsrfHeaderName"),i=own("xsrfCookieName");let s=own("headers");const c=own("auth"),u=own("baseURL"),l=own("allowAbsoluteUrls"),p=own("url");var d;if(t.headers=s=Y.from(s),t.url=buildURL(buildFullPath(u,p,l),e.params,e.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?(d=c.password,encodeURIComponent(d).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)))):""))),x.isFormData(r)&&(Q.hasStandardBrowserEnv||Q.hasStandardBrowserWebWorkerEnv?s.setContentType(void 0):x.isFunction(r.getHeaders)&&function setFormDataHeaders(e,t,r){"content-only"===r?Object.entries(t).forEach(([t,r])=>{ne.includes(t.toLowerCase())&&e.set(t,r)}):e.set(t)}(s,r.getHeaders(),own("formDataHeaderPolicy"))),Q.hasStandardBrowserEnv){x.isFunction(n)&&(n=n(t));if(!0===n||null==n&&te(t.url)){const e=o&&i&&re.read(i);e&&s.set(o,e)}}return t};var oe="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function dispatchXhrRequest(t,r){const n=resolveConfig(e);let o=n.data;const i=Y.from(n.headers).normalize();let s,c,u,l,p,{responseType:d,onUploadProgress:h,onDownloadProgress:f}=n;function done(){l&&l(),p&&p(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let E=new XMLHttpRequest;function onloadend(){if(!E)return;const n=Y.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders());settle(function _resolve(e){t(e),done()},function _reject(e){r(e),done()},{data:d&&"text"!==d&&"json"!==d?E.response:E.responseText,status:E.status,statusText:E.statusText,headers:n,config:e,request:E}),E=null}E.open(n.method.toUpperCase(),n.url,!0),E.timeout=n.timeout,"onloadend"in E?E.onloadend=onloadend:E.onreadystatechange=function handleLoad(){E&&4===E.readyState&&(0!==E.status||E.responseURL&&E.responseURL.startsWith("file:"))&&setTimeout(onloadend)},E.onabort=function handleAbort(){E&&(r(new $("Request aborted",$.ECONNABORTED,e,E)),done(),E=null)},E.onerror=function handleError(t){const n=t&&t.message?t.message:"Network Error",o=new $(n,$.ERR_NETWORK,e,E);o.event=t||null,r(o),done(),E=null},E.ontimeout=function handleTimeout(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||V;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new $(t,o.clarifyTimeoutError?$.ETIMEDOUT:$.ECONNABORTED,e,E)),done(),E=null},void 0===o&&i.setContentType(null),"setRequestHeader"in E&&x.forEach(i.toJSON(),function setRequestHeader(e,t){E.setRequestHeader(t,e)}),x.isUndefined(n.withCredentials)||(E.withCredentials=!!n.withCredentials),d&&"json"!==d&&(E.responseType=n.responseType),f&&([u,p]=progressEventReducer(f,!0),E.addEventListener("progress",u)),h&&E.upload&&([c,l]=progressEventReducer(h),E.upload.addEventListener("progress",c),E.upload.addEventListener("loadend",l)),(n.cancelToken||n.signal)&&(s=t=>{E&&(r(!t||t.type?new ee(null,e,E):t),E.abort(),done(),E=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const g=function parseProtocol(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}(n.url);!g||Q.protocols.includes(g)?E.send(o||null):r(new $("Unsupported protocol "+g+":",$.ERR_BAD_REQUEST,e))})};const composeSignals=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const onabort=function(e){if(!r){r=!0,unsubscribe();const t=e instanceof Error?e:this.reason;n.abort(t instanceof $?t:new ee(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null,onabort(new $(`timeout of ${t}ms exceeded`,$.ETIMEDOUT))},t);const unsubscribe=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(onabort):e.removeEventListener("abort",onabort)}),e=null)};e.forEach(e=>e.addEventListener("abort",onabort));const{signal:i}=n;return i.unsubscribe=()=>x.asap(unsubscribe),i}},streamChunk=function*(e,t){let r=e.byteLength;if(r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},readStream=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},trackStream=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of readStream(e))yield*streamChunk(r,t)}(e,t);let i,s=0,_onFinish=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return _onFinish(),void e.close();let i=n.byteLength;if(r){let e=s+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw _onFinish(e),e}},cancel:e=>(_onFinish(e),o.return())},{highWaterMark:2})};const ie="1.16.0",{isFunction:se}=x,test=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},factory=e=>{const t=x.global??globalThis,{ReadableStream:r,TextEncoder:n}=t;e=x.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:i,Response:s}=e,c=o?se(o):"function"==typeof fetch,u=se(i),l=se(s);if(!c)return!1;const p=c&&se(r),d=c&&("function"==typeof n?(h=new n,e=>h.encode(e)):async e=>new Uint8Array(await new i(e).arrayBuffer()));var h;const f=u&&p&&test(()=>{let e=!1;const t=new i(Q.origin,{body:new r,method:"POST",get duplex(){return e=!0,"half"}}),n=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!n}),E=l&&p&&test(()=>x.isReadableStream(new s("").body)),g={stream:E&&(e=>e.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!g[e]&&(g[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new $(`Response type '${e}' is not supported`,$.ERR_NOT_SUPPORT,r)})});const resolveBodyLength=async(e,t)=>{const r=x.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(x.isBlob(e))return e.size;if(x.isSpecCompliantForm(e)){const t=new i(Q.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return x.isArrayBufferView(e)||x.isArrayBuffer(e)?e.byteLength:(x.isURLSearchParams(e)&&(e+=""),x.isString(e)?(await d(e)).byteLength:void 0)})(t):r};return async e=>{let{url:t,method:r,data:c,signal:l,cancelToken:p,timeout:d,onDownloadProgress:h,onUploadProgress:m,responseType:_,headers:y,withCredentials:A="same-origin",fetchOptions:R,maxContentLength:I,maxBodyLength:T}=resolveConfig(e);const S=x.isNumber(I)&&I>-1,N=x.isNumber(T)&&T>-1;let C=o||fetch;_=_?(_+"").toLowerCase():"text";let b=composeSignals([l,p&&p.toAbortSignal()],d),O=null;const P=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let D;try{if(S&&"string"==typeof t&&t.startsWith("data:")){const r=function estimateDataURLDecodedBytes(e){if(!e||"string"!=typeof e)return 0;if(!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const r=e.slice(5,t),n=e.slice(t+1);if(/;base64/i.test(r)){let e=n.length;const t=n.length;for(let r=0;r<t;r++)if(37===n.charCodeAt(r)&&r+2<t){const t=n.charCodeAt(r+1),o=n.charCodeAt(r+2);(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(o>=48&&o<=57||o>=65&&o<=70||o>=97&&o<=102)&&(e-=2,r+=2)}let r=0,o=t-1;const tailIsPct3D=e=>e>=2&&37===n.charCodeAt(e-2)&&51===n.charCodeAt(e-1)&&(68===n.charCodeAt(e)||100===n.charCodeAt(e));o>=0&&(61===n.charCodeAt(o)?(r++,o--):tailIsPct3D(o)&&(r++,o-=3)),1===r&&o>=0&&(61===n.charCodeAt(o)||tailIsPct3D(o))&&r++;const i=3*Math.floor(e/4)-(r||0);return i>0?i:0}if("undefined"!=typeof Buffer&&"function"==typeof Buffer.byteLength)return Buffer.byteLength(n,"utf8");let o=0;for(let e=0,t=n.length;e<t;e++){const r=n.charCodeAt(e);if(r<128)o+=1;else if(r<2048)o+=2;else if(r>=55296&&r<=56319&&e+1<t){const t=n.charCodeAt(e+1);t>=56320&&t<=57343?(o+=4,e++):o+=3}else o+=3}return o}(t);if(r>I)throw new $("maxContentLength size of "+I+" exceeded",$.ERR_BAD_RESPONSE,e,O)}if(N&&"get"!==r&&"head"!==r){const t=await resolveBodyLength(y,c);if("number"==typeof t&&isFinite(t)&&t>T)throw new $("Request body larger than maxBodyLength limit",$.ERR_BAD_REQUEST,e,O)}if(m&&f&&"get"!==r&&"head"!==r&&0!==(D=await resolveBodyLength(y,c))){let e,r=new i(t,{method:"POST",body:c,duplex:"half"});if(x.isFormData(c)&&(e=r.headers.get("content-type"))&&y.setContentType(e),r.body){const[e,t]=progressEventDecorator(D,progressEventReducer(asyncDecorator(m)));c=trackStream(r.body,65536,e,t)}}x.isString(A)||(A=A?"include":"omit");const o=u&&"credentials"in i.prototype;if(x.isFormData(c)){const e=y.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&y.delete("content-type")}y.set("User-Agent","axios/"+ie,!1);const l={...R,signal:b,method:r.toUpperCase(),headers:y.normalize().toJSON(),body:c,duplex:"half",credentials:o?A:void 0};O=u&&new i(t,l);let p=await(u?C(O,R):C(t,l));if(S){const t=x.toFiniteNumber(p.headers.get("content-length"));if(null!=t&&t>I)throw new $("maxContentLength size of "+I+" exceeded",$.ERR_BAD_RESPONSE,e,O)}const d=E&&("stream"===_||"response"===_);if(E&&p.body&&(h||S||d&&P)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=p[e]});const r=x.toFiniteNumber(p.headers.get("content-length")),[n,o]=h&&progressEventDecorator(r,progressEventReducer(asyncDecorator(h),!0))||[];let i=0;const onChunkProgress=t=>{if(S&&(i=t,i>I))throw new $("maxContentLength size of "+I+" exceeded",$.ERR_BAD_RESPONSE,e,O);n&&n(t)};p=new s(trackStream(p.body,65536,onChunkProgress,()=>{o&&o(),P&&P()}),t)}_=_||"text";let U=await g[x.findKey(g,_)||"text"](p,e);if(S&&!E&&!d){let t;if(null!=U&&("number"==typeof U.byteLength?t=U.byteLength:"number"==typeof U.size?t=U.size:"string"==typeof U&&(t="function"==typeof n?(new n).encode(U).byteLength:U.length)),"number"==typeof t&&t>I)throw new $("maxContentLength size of "+I+" exceeded",$.ERR_BAD_RESPONSE,e,O)}return!d&&P&&P(),await new Promise((t,r)=>{settle(t,r,{data:U,headers:Y.from(p.headers),status:p.status,statusText:p.statusText,config:e,request:O})})}catch(t){if(P&&P(),b&&b.aborted&&b.reason instanceof $){const r=b.reason;throw r.config=e,O&&(r.request=O),t!==r&&(r.cause=t),r}if(t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new $("Network Error",$.ERR_NETWORK,e,O,t&&t.response),{cause:t.cause||t});throw $.from(t,t&&t.code,e,O,t&&t.response)}}},ae=new Map,getFetch=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:o}=t,i=[n,o,r];let s,c,u=i.length,l=ae;for(;u--;)s=i[u],c=l.get(s),void 0===c&&l.set(s,c=u?new Map:factory(t)),l=c;return c};getFetch();const ce={http:null,xhr:oe,fetch:{get:getFetch}};x.forEach(ce,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const renderReason=e=>`- ${e}`,isResolvedHandle=e=>x.isFunction(e)||null===e||!1===e;var ue={getAdapter:function getAdapter$1(e,t){e=x.isArray(e)?e:[e];const{length:r}=e;let n,o;const i={};for(let s=0;s<r;s++){let r;if(n=e[s],o=n,!isResolvedHandle(n)&&(o=ce[(r=String(n)).toLowerCase()],void 0===o))throw new $(`Unknown adapter '${r}'`);if(o&&(x.isFunction(o)||(o=o.get(t))))break;i[r||"#"+s]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=r?e.length>1?"since :\n"+e.map(renderReason).join("\n"):" "+renderReason(e[0]):"as no adapter specified";throw new $("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return o},adapters:ce};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ee(null,e)}function dispatchRequest(e){throwIfCancellationRequested(e),e.headers=Y.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 ue.getAdapter(e.adapter||Z.adapter,e)(e).then(function onAdapterResolution(t){throwIfCancellationRequested(e),e.response=t;try{t.data=transformData.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=Y.from(t.headers),t},function onAdapterRejection(t){if(!isCancel$1(t)&&(throwIfCancellationRequested(e),t&&t.response)){e.response=t.response;try{t.response.data=transformData.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=Y.from(t.response.headers)}return Promise.reject(t)})}const le={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{le[e]=function validator(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const pe={};le.transitional=function transitional(e,t,r){function formatMessage(e,t){return"[Axios v"+ie+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,n,o)=>{if(!1===e)throw new $(formatMessage(n," has been removed"+(t?" in "+t:"")),$.ERR_DEPRECATED);return t&&!pe[n]&&(pe[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)}},le.spelling=function spelling(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var de={assertOptions:function assertOptions(e,t,r){if("object"!=typeof e)throw new $("options must be an object",$.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(s){const t=e[i],r=void 0===t||s(t,i,e);if(!0!==r)throw new $("option "+i+" must be "+r,$.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new $("Unknown option "+i,$.ERR_BAD_OPTION)}},validators:le};const he=de.validators;let fe=class Axios{constructor(e){this.defaults=e||{},this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=(()=>{if(!t.stack)return"";const e=t.stack.indexOf("\n");return-1===e?"":t.stack.slice(e+1)})();try{if(e.stack){if(r){const t=r.indexOf("\n"),n=-1===t?-1:r.indexOf("\n",t+1),o=-1===n?"":r.slice(n+1);String(e.stack).endsWith(o)||(e.stack+="\n"+r)}}else e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=mergeConfig$1(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&de.assertOptions(r,{silentJSONParsing:he.transitional(he.boolean),forcedJSONParsing:he.transitional(he.boolean),clarifyTimeoutError:he.transitional(he.boolean),legacyInterceptorReqResOrdering:he.transitional(he.boolean)},!1),null!=n&&(x.isFunction(n)?t.paramsSerializer={serialize:n}:de.assertOptions(n,{encode:he.function,serialize:he.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),de.assertOptions(t,{baseUrl:he.spelling("baseURL"),withXsrfToken:he.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&x.merge(o.common,o[t.method]);o&&x.forEach(["delete","get","head","post","put","patch","query","common"],e=>{delete o[e]}),t.headers=Y.concat(i,o);const s=[];let c=!0;this.interceptors.request.forEach(function unshiftRequestInterceptors(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;c=c&&e.synchronous;const r=t.transitional||V;r&&r.legacyInterceptorReqResOrdering?s.unshift(e.fulfilled,e.rejected):s.push(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(...s),e.push(...u),p=e.length,l=Promise.resolve(t);d<p;)l=l.then(e[d++],e[d++]);return l}p=s.length;let h=t;for(;d<p;){const e=s[d++],t=s[d++];try{h=e(h)}catch(e){t.call(this,e);break}}try{l=dispatchRequest.call(this,h)}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$1(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};x.forEach(["delete","get","head","options"],function forEachMethodNoData(e){fe.prototype[e]=function(t,r){return this.request(mergeConfig$1(r||{},{method:e,url:t,data:(r||{}).data}))}}),x.forEach(["post","put","patch","query"],function forEachMethodWithData(e){function generateHTTPMethod(t){return function httpMethod(r,n,o){return this.request(mergeConfig$1(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}fe.prototype[e]=generateHTTPMethod(),"query"!==e&&(fe.prototype[e+"Form"]=generateHTTPMethod(!0))});const Ee={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ee).forEach(([e,t])=>{Ee[t]=e});const ge=function createInstance(e){const t=new fe(e),r=bind(fe.prototype.request,t);return x.extend(r,fe.prototype,t,{allOwnKeys:!0}),x.extend(r,t,null,{allOwnKeys:!0}),r.create=function create(t){return createInstance(mergeConfig$1(e,t))},r}(Z);ge.Axios=fe,ge.CanceledError=ee,ge.CancelToken=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 ee(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)}toAbortSignal(){const e=new AbortController,abort=t=>{e.abort(t)};return this.subscribe(abort),e.signal.unsubscribe=()=>this.unsubscribe(abort),e.signal}static source(){let e;return{token:new CancelToken(function executor(t){e=t}),cancel:e}}},ge.isCancel=isCancel$1,ge.VERSION=ie,ge.toFormData=toFormData$1,ge.AxiosError=$,ge.Cancel=ge.CanceledError,ge.all=function all(e){return Promise.all(e)},ge.spread=function spread$1(e){return function wrap(t){return e.apply(null,t)}},ge.isAxiosError=function isAxiosError$1(e){return x.isObject(e)&&!0===e.isAxiosError},ge.mergeConfig=mergeConfig$1,ge.AxiosHeaders=Y,ge.formToJSON=e=>formDataToJSON(x.isHTMLForm(e)?new FormData(e):e),ge.getAdapter=ue.getAdapter,ge.HttpStatusCode=Ee,ge.default=ge;const{Axios:me,AxiosError:_e,CanceledError:ye,isCancel:Ae,CancelToken:Re,VERSION:Ie,all:Te,Cancel:Se,isAxiosError:Ne,spread:Ce,toFormData:be,AxiosHeaders:Oe,HttpStatusCode:Pe,formToJSON:De,getAdapter:Ue,mergeConfig:Le,create:ve}=ge;var Me="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function a(){var e=!1;try{e=this instanceof a}catch{}return e?Reflect.construct(t,arguments,this.constructor):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}var we,Be,xe,Fe,ke,Ge={exports:{}};function requireMs(){if(Be)return we;Be=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 we=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))},we}var Ye,$e,je=function requireBrowser(){return ke||(ke=1,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")||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;let e;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&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[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=function requireCommon(){return Fe||(Fe=1,xe=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 matchesTemplate(e,t){let r=0,n=0,o=-1,i=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(o=n,i=r,n++):(r++,n++);else{if(-1===o)return!1;n=o+1,i++,r=i}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return createDebug.debug=createDebug,createDebug.default=createDebug,createDebug.coerce=function coerce(e){return e instanceof Error?e.stack||e.message:e},createDebug.disable=function disable(){const e=[...createDebug.names,...createDebug.skips.map(e=>"-"+e)].join(",");return createDebug.enable(""),e},createDebug.enable=function enable(e){createDebug.save(e),createDebug.namespaces=e,createDebug.names=[],createDebug.skips=[];const t=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of t)"-"===e[0]?createDebug.skips.push(e.slice(1)):createDebug.names.push(e)},createDebug.enabled=function enabled(e){for(const t of createDebug.skips)if(matchesTemplate(e,t))return!1;for(const t of createDebug.names)if(matchesTemplate(e,t))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}),xe}()(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Ge,Ge.exports)),Ge.exports}(),He=getDefaultExportFromCjs(je);function requireType(){return $e?Ye:($e=1,Ye=TypeError)}var Ve,qe,Ke,We,Xe,ze,Je,Qe,Ze,et,tt,rt,nt,ot,it,st,at,ct,ut,lt,pt,dt,ht,ft,Et,gt,mt,_t,yt,At,Rt,It,Tt,St,Nt,Ct,bt,Ot,Pt,Dt,Ut,Lt,vt,Mt,wt,Bt,xt,Ft,kt,Gt,Yt,$t,jt,Ht,Vt,qt,Kt,Wt,Xt,zt,Jt,Qt,Zt,er,tr,rr,nr,or,ir,sr,ar,cr,ur,lr,pr,dr,hr,fr,Er,gr,mr,_r,yr,Ar,Rr,Ir,Tr,Sr,Nr=getAugmentedNamespace(Object.freeze({__proto__:null,default:{}}));function requireObjectInspect(){if(qe)return Ve;qe=1;var e="function"==typeof Map&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=e&&t&&"function"==typeof t.get?t.get:null,n=e&&Map.prototype.forEach,o="function"==typeof Set&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=o&&i&&"function"==typeof i.get?i.get:null,c=o&&Set.prototype.forEach,u="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,l="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,h=Object.prototype.toString,f=Function.prototype.toString,E=String.prototype.match,g=String.prototype.slice,m=String.prototype.replace,_=String.prototype.toUpperCase,y=String.prototype.toLowerCase,A=RegExp.prototype.test,R=Array.prototype.concat,I=Array.prototype.join,T=Array.prototype.slice,S=Math.floor,N="function"==typeof BigInt?BigInt.prototype.valueOf:null,C=Object.getOwnPropertySymbols,b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,O="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===O||"symbol")?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,U=("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||A.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-S(-e):S(e);if(n!==e){var o=String(n),i=g.call(t,o.length+1);return m.call(o,r,"$&_")+"."+m.call(m.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return m.call(t,r,"$&_")}var L=Nr,v=L.custom,M=isSymbol(v)?v:null,w={__proto__:null,double:'"',single:"'"},B={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function wrapQuotes(e,t,r){var n=r.quoteStyle||t,o=w[n];return o+e+o}function quote(e){return m.call(String(e),/"/g,""")}function canTrustToString(e){return!P||!("object"==typeof e&&(P in e||void 0!==e[P]))}function isArray(e){return"[object Array]"===toStr(e)&&canTrustToString(e)}function isRegExp(e){return"[object RegExp]"===toStr(e)&&canTrustToString(e)}function isSymbol(e){if(O)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!b)return!1;try{return b.call(e),!0}catch(e){}return!1}Ve=function inspect_(e,t,o,i){var h=t||{};if(has(h,"quoteStyle")&&!has(w,h.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has(h,"maxStringLength")&&("number"==typeof h.maxStringLength?h.maxStringLength<0&&h.maxStringLength!==1/0:null!==h.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var _=!has(h,"customInspect")||h.customInspect;if("boolean"!=typeof _&&"symbol"!==_)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has(h,"indent")&&null!==h.indent&&"\t"!==h.indent&&!(parseInt(h.indent,10)===h.indent&&h.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has(h,"numericSeparator")&&"boolean"!=typeof h.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var A=h.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,h);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var S=String(e);return A?addNumericSeparator(e,S):S}if("bigint"==typeof e){var C=String(e)+"n";return A?addNumericSeparator(e,C):C}var v=void 0===h.depth?5:h.depth;if(void 0===o&&(o=0),o>=v&&v>0&&"object"==typeof e)return isArray(e)?"[Array]":"[Object]";var B=function getIndent(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=I.call(Array(e.indent+1)," ")}return{base:r,prev:I.call(Array(t+1),r)}}(h,o);if(void 0===i)i=[];else if(indexOf(i,e)>=0)return"[Circular]";function inspect(e,t,r){if(t&&(i=T.call(i)).push(t),r){var n={depth:h.depth};return has(h,"quoteStyle")&&(n.quoteStyle=h.quoteStyle),inspect_(e,n,o+1,i)}return inspect_(e,h,o+1,i)}if("function"==typeof e&&!isRegExp(e)){var x=function nameOf(e){if(e.name)return e.name;var t=E.call(f.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(e),F=arrObjKeys(e,inspect);return"[Function"+(x?": "+x:" (anonymous)")+"]"+(F.length>0?" { "+I.call(F,", ")+" }":"")}if(isSymbol(e)){var k=O?m.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):b.call(e);return"object"!=typeof e||O?k:markBoxed(k)}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 G="<"+y.call(String(e.nodeName)),Y=e.attributes||[],$=0;$<Y.length;$++)G+=" "+Y[$].name+"="+wrapQuotes(quote(Y[$].value),"double",h);return G+=">",e.childNodes&&e.childNodes.length&&(G+="..."),G+="</"+y.call(String(e.nodeName))+">"}if(isArray(e)){if(0===e.length)return"[]";var j=arrObjKeys(e,inspect);return B&&!function singleLineValues(e){for(var t=0;t<e.length;t++)if(indexOf(e[t],"\n")>=0)return!1;return!0}(j)?"["+indentedJoin(j,B)+"]":"[ "+I.call(j,", ")+" ]"}if(function isError(e){return"[object Error]"===toStr(e)&&canTrustToString(e)}(e)){var H=arrObjKeys(e,inspect);return"cause"in Error.prototype||!("cause"in e)||D.call(e,"cause")?0===H.length?"["+String(e)+"]":"{ ["+String(e)+"] "+I.call(H,", ")+" }":"{ ["+String(e)+"] "+I.call(R.call("[cause]: "+inspect(e.cause),H),", ")+" }"}if("object"==typeof e&&_){if(M&&"function"==typeof e[M]&&L)return L(e,{depth:v-o});if("symbol"!==_&&"function"==typeof e.inspect)return e.inspect()}if(function isMap(e){if(!r||!e||"object"!=typeof e)return!1;try{r.call(e);try{s.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(e)){var V=[];return n&&n.call(e,function(t,r){V.push(inspect(r,e,!0)+" => "+inspect(t,e))}),collectionOf("Map",r.call(e),V,B)}if(function isSet(e){if(!s||!e||"object"!=typeof e)return!1;try{s.call(e);try{r.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(e)){var q=[];return c&&c.call(e,function(t){q.push(inspect(t,e))}),collectionOf("Set",s.call(e),q,B)}if(function isWeakMap(e){if(!u||!e||"object"!=typeof e)return!1;try{u.call(e,u);try{l.call(e,l)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(e))return weakCollectionOf("WeakMap");if(function isWeakSet(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e,l);try{u.call(e,u)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(e))return weakCollectionOf("WeakSet");if(function isWeakRef(e){if(!p||!e||"object"!=typeof e)return!1;try{return p.call(e),!0}catch(e){}return!1}(e))return weakCollectionOf("WeakRef");if(function isNumber(e){return"[object Number]"===toStr(e)&&canTrustToString(e)}(e))return markBoxed(inspect(Number(e)));if(function isBigInt(e){if(!e||"object"!=typeof e||!N)return!1;try{return N.call(e),!0}catch(e){}return!1}(e))return markBoxed(inspect(N.call(e)));if(function isBoolean(e){return"[object Boolean]"===toStr(e)&&canTrustToString(e)}(e))return markBoxed(d.call(e));if(function isString(e){return"[object String]"===toStr(e)&&canTrustToString(e)}(e))return markBoxed(inspect(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&e===globalThis||void 0!==Me&&e===Me)return"{ [object globalThis] }";if(!function isDate(e){return"[object Date]"===toStr(e)&&canTrustToString(e)}(e)&&!isRegExp(e)){var K=arrObjKeys(e,inspect),W=U?U(e)===Object.prototype:e instanceof Object||e.constructor===Object,X=e instanceof Object?"":"null prototype",z=!W&&P&&Object(e)===e&&P in e?g.call(toStr(e),8,-1):X?"Object":"",J=(W||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(z||X?"["+I.call(R.call([],z||[],X||[]),": ")+"] ":"");return 0===K.length?J+"{}":B?J+"{"+indentedJoin(K,B)+"}":J+"{ "+I.call(K,", ")+" }"}return String(e)};var x=Object.prototype.hasOwnProperty||function(e){return e in this};function has(e,t){return x.call(e,t)}function toStr(e){return h.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(g.call(e,0,t.maxStringLength),t)+n}var o=B[t.quoteStyle||"single"];return o.lastIndex=0,wrapQuotes(m.call(m.call(e,o,"\\$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":"")+_.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):I.call(r,", "))+"}"}function indentedJoin(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+I.call(e,","+r)+"\n"+t.prev}function arrObjKeys(e,t){var r=isArray(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=has(e,o)?t(e[o],e):""}var i,s="function"==typeof C?C(e):[];if(O){i={};for(var c=0;c<s.length;c++)i["$"+s[c]]=s[c]}for(var u in e)has(e,u)&&(r&&String(Number(u))===u&&u<e.length||O&&i["$"+u]instanceof Symbol||(A.call(/[^\w$]/,u)?n.push(t(u,e)+": "+t(e[u],e)):n.push(u+": "+t(e[u],e))));if("function"==typeof C)for(var l=0;l<s.length;l++)D.call(e,s[l])&&n.push("["+t(s[l])+"]: "+t(e[s[l]],e));return n}return Ve}function requireSideChannelList(){if(We)return Ke;We=1;var e=requireObjectInspect(),t=requireType(),listGetNode=function(e,t,r){for(var n,o=e;null!=(n=o.next);o=n)if(n.key===t)return o.next=n.next,r||(n.next=e.next,e.next=n),n};return Ke=function getSideChannelList(){var r,n={assert:function(r){if(!n.has(r))throw new t("Side channel does not contain "+e(r))},delete:function(e){var t=r&&r.next,n=function(e,t){if(e)return listGetNode(e,t,!0)}(r,e);return n&&t&&t===n&&(r=void 0),!!n},get:function(e){return function(e,t){if(e){var r=listGetNode(e,t);return r&&r.value}}(r,e)},has:function(e){return function(e,t){return!!e&&!!listGetNode(e,t)}(r,e)},set:function(e,t){r||(r={next:void 0}),function(e,t,r){var n=listGetNode(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,e,t)}};return n}}function requireEsObjectAtoms(){return ze?Xe:(ze=1,Xe=Object)}function requireEsErrors(){return Qe?Je:(Qe=1,Je=Error)}function require_eval(){return et?Ze:(et=1,Ze=EvalError)}function requireRange(){return rt?tt:(rt=1,tt=RangeError)}function requireRef(){return ot?nt:(ot=1,nt=ReferenceError)}function requireSyntax(){return st?it:(st=1,it=SyntaxError)}function requireUri(){return ct?at:(ct=1,at=URIError)}function requireAbs(){return lt?ut:(lt=1,ut=Math.abs)}function requireFloor(){return dt?pt:(dt=1,pt=Math.floor)}function requireMax(){return ft?ht:(ft=1,ht=Math.max)}function requireMin(){return gt?Et:(gt=1,Et=Math.min)}function requirePow(){return _t?mt:(_t=1,mt=Math.pow)}function requireRound(){return At?yt:(At=1,yt=Math.round)}function require_isNaN(){return It?Rt:(It=1,Rt=Number.isNaN||function isNaN(e){return e!=e})}function requireSign(){if(St)return Tt;St=1;var e=require_isNaN();return Tt=function sign(t){return e(t)||0===t?t:t<0?-1:1}}function requireGOPD(){return Ct?Nt:(Ct=1,Nt=Object.getOwnPropertyDescriptor)}function requireGopd(){if(Ot)return bt;Ot=1;var e=requireGOPD();if(e)try{e([],"length")}catch(t){e=null}return bt=e}function requireEsDefineProperty(){if(Dt)return Pt;Dt=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}return Pt=e}function requireHasSymbols(){if(Mt)return vt;Mt=1;var e="undefined"!=typeof Symbol&&Symbol,t=function requireShams(){return Lt?Ut:(Lt=1,Ut=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(var n 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 o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0})}();return vt=function hasNativeSymbols(){return"function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&t())))}}function requireReflect_getPrototypeOf(){return Bt?wt:(Bt=1,wt="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function requireObject_getPrototypeOf(){return Ft?xt:(Ft=1,xt=requireEsObjectAtoms().getPrototypeOf||null)}function requireImplementation(){if(Gt)return kt;Gt=1;var e=Object.prototype.toString,t=Math.max,r=function concatty(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r};return kt=function bind(n){var o=this;if("function"!=typeof o||"[object Function]"!==e.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,s=function slicy(e,t){for(var r=[],n=t,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),c=t(0,o.length-s.length),u=[],l=0;l<c;l++)u[l]="$"+l;if(i=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(u,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof i){var e=o.apply(this,r(s,arguments));return Object(e)===e?e:this}return o.apply(n,r(s,arguments))}),o.prototype){var p=function Empty(){};p.prototype=o.prototype,i.prototype=new p,p.prototype=null}return i},kt}function requireFunctionBind(){if($t)return Yt;$t=1;var e=requireImplementation();return Yt=Function.prototype.bind||e}function requireFunctionCall(){return Ht?jt:(Ht=1,jt=Function.prototype.call)}function requireFunctionApply(){return qt?Vt:(qt=1,Vt=Function.prototype.apply)}function requireActualApply(){if(zt)return Xt;zt=1;var e=requireFunctionBind(),t=requireFunctionApply(),r=requireFunctionCall(),n=function requireReflectApply(){return Wt?Kt:(Wt=1,Kt="undefined"!=typeof Reflect&&Reflect&&Reflect.apply)}();return Xt=n||e.call(r,t)}function requireCallBindApplyHelpers(){if(Qt)return Jt;Qt=1;var e=requireFunctionBind(),t=requireType(),r=requireFunctionCall(),n=requireActualApply();return Jt=function callBindBasic(o){if(o.length<1||"function"!=typeof o[0])throw new t("a function is required");return n(e,r,o)}}function requireGet(){if(er)return Zt;er=1;var e,t=requireCallBindApplyHelpers(),r=requireGopd();try{e=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var n=!!e&&r&&r(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return Zt=n&&"function"==typeof n.get?t([n.get]):"function"==typeof i&&function getDunder(e){return i(null==e?e:o(e))}}function requireGetProto(){if(rr)return tr;rr=1;var e=requireReflect_getPrototypeOf(),t=requireObject_getPrototypeOf(),r=requireGet();return tr=e?function getProto(t){return e(t)}:t?function getProto(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:r?function getProto(e){return r(e)}:null}function requireHasown(){if(or)return nr;or=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=requireFunctionBind();return nr=r.call(e,t)}function requireGetIntrinsic(){if(sr)return ir;var e;sr=1;var t=requireEsObjectAtoms(),r=requireEsErrors(),n=require_eval(),o=requireRange(),i=requireRef(),s=requireSyntax(),c=requireType(),u=requireUri(),l=requireAbs(),p=requireFloor(),d=requireMax(),h=requireMin(),f=requirePow(),E=requireRound(),g=requireSign(),m=Function,getEvalledConstructor=function(e){try{return m('"use strict"; return ('+e+").constructor;")()}catch(e){}},_=requireGopd(),y=requireEsDefineProperty(),throwTypeError=function(){throw new c},A=_?function(){try{return throwTypeError}catch(e){try{return _(arguments,"callee").get}catch(e){return throwTypeError}}}():throwTypeError,R=requireHasSymbols()(),I=requireGetProto(),T=requireObject_getPrototypeOf(),S=requireReflect_getPrototypeOf(),N=requireFunctionApply(),C=requireFunctionCall(),b={},O="undefined"!=typeof Uint8Array&&I?I(Uint8Array):e,P={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer,"%ArrayIteratorPrototype%":R&&I?I([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?e:Atomics,"%BigInt%":"undefined"==typeof BigInt?e:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?e:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":"undefined"==typeof Float16Array?e:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?e:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?e:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?e:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?e:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?e:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":R&&I?I(I([][Symbol.iterator]())):e,"%JSON%":"object"==typeof JSON?JSON:e,"%Map%":"undefined"==typeof Map?e:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&R&&I?I((new Map)[Symbol.iterator]()):e,"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?e:Promise,"%Proxy%":"undefined"==typeof Proxy?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":"undefined"==typeof Reflect?e:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?e:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&R&&I?I((new Set)[Symbol.iterator]()):e,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":R&&I?I(""[Symbol.iterator]()):e,"%Symbol%":R?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":A,"%TypedArray%":O,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?e:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?e:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?e:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?e:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?e:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?e:WeakSet,"%Function.prototype.call%":C,"%Function.prototype.apply%":N,"%Object.defineProperty%":y,"%Object.getPrototypeOf%":T,"%Math.abs%":l,"%Math.floor%":p,"%Math.max%":d,"%Math.min%":h,"%Math.pow%":f,"%Math.round%":E,"%Math.sign%":g,"%Reflect.getPrototypeOf%":S};if(I)try{null.error}catch(e){var D=I(I(e));P["%Error.prototype%"]=D}var U=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&&I&&(t=I(n.prototype))}return P[e]=t,t},L={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},v=requireFunctionBind(),M=requireHasown(),w=v.call(C,Array.prototype.concat),B=v.call(N,Array.prototype.splice),x=v.call(C,String.prototype.replace),F=v.call(C,String.prototype.slice),k=v.call(C,RegExp.prototype.exec),G=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y=/\\(\\)?/g,$=function getBaseIntrinsic(e,t){var r,n=e;if(M(L,n)&&(n="%"+(r=L[n])[0]+"%"),M(P,n)){var o=P[n];if(o===b&&(o=U(n)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new s("intrinsic "+e+" does not exist!")};return ir=function GetIntrinsic(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function stringToPath(e){var t=F(e,0,1),r=F(e,-1);if("%"===t&&"%"!==r)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var n=[];return x(e,G,function(e,t,r,o){n[n.length]=r?x(o,Y,"$1"):t||e}),n}(e),n=r.length>0?r[0]:"",o=$("%"+n+"%",t),i=o.name,u=o.value,l=!1,p=o.alias;p&&(n=p[0],B(r,w([0,1],p)));for(var d=1,h=!0;d<r.length;d+=1){var f=r[d],E=F(f,0,1),g=F(f,-1);if(('"'===E||"'"===E||"`"===E||'"'===g||"'"===g||"`"===g)&&E!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==f&&h||(l=!0),M(P,i="%"+(n+="."+f)+"%"))u=P[i];else if(null!=u){if(!(f in u)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(_&&d+1>=r.length){var m=_(u,f);u=(h=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:u[f]}else h=M(u,f),u=u[f];h&&!l&&(P[i]=u)}}return u},ir}function requireCallBound(){if(cr)return ar;cr=1;var e=requireGetIntrinsic(),t=requireCallBindApplyHelpers(),r=t([e("%String.prototype.indexOf%")]);return ar=function callBoundIntrinsic(n,o){var i=e(n,!!o);return"function"==typeof i&&r(n,".prototype.")>-1?t([i]):i}}function requireSideChannelMap(){if(lr)return ur;lr=1;var e=requireGetIntrinsic(),t=requireCallBound(),r=requireObjectInspect(),n=requireType(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),s=t("Map.prototype.set",!0),c=t("Map.prototype.has",!0),u=t("Map.prototype.delete",!0),l=t("Map.prototype.size",!0);return ur=!!o&&function getSideChannelMap(){var e,t={assert:function(e){if(!t.has(e))throw new n("Side channel does not contain "+r(e))},delete:function(t){if(e){var r=u(e,t);return 0===l(e)&&(e=void 0),r}return!1},get:function(t){if(e)return i(e,t)},has:function(t){return!!e&&c(e,t)},set:function(t,r){e||(e=new o),s(e,t,r)}};return t}}function requireSideChannel(){if(fr)return hr;fr=1;var e=requireType(),t=requireObjectInspect(),r=requireSideChannelList(),n=requireSideChannelMap(),o=function requireSideChannelWeakmap(){if(dr)return pr;dr=1;var e=requireGetIntrinsic(),t=requireCallBound(),r=requireObjectInspect(),n=requireSideChannelMap(),o=requireType(),i=e("%WeakMap%",!0),s=t("WeakMap.prototype.get",!0),c=t("WeakMap.prototype.set",!0),u=t("WeakMap.prototype.has",!0),l=t("WeakMap.prototype.delete",!0);return pr=i?function getSideChannelWeakMap(){var e,t,p={assert:function(e){if(!p.has(e))throw new o("Side channel does not contain "+r(e))},delete:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(e)return l(e,r)}else if(n&&t)return t.delete(r);return!1},get:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&e?s(e,r):t&&t.get(r)},has:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&e?u(e,r):!!t&&t.has(r)},set:function(r,o){i&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new i),c(e,r,o)):n&&(t||(t=n()),t.set(r,o))}};return p}:n}(),i=o||n||r;return hr=function getSideChannel(){var r,n={assert:function(r){if(!n.has(r))throw new e("Side channel does not contain "+t(r))},delete:function(e){return!!r&&r.delete(e)},get:function(e){return r&&r.get(e)},has:function(e){return!!r&&r.has(e)},set:function(e,t){r||(r=i()),r.set(e,t)}};return n}}function requireFormats(){if(gr)return Er;gr=1;var e=String.prototype.replace,t=/%20/g,r="RFC3986";return Er={default:r,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:r}}function requireUtils(){if(_r)return mr;_r=1;var e=requireFormats(),t=requireSideChannel(),r=Object.prototype.hasOwnProperty,n=Array.isArray,o=t(),i=function markOverflow(e,t){return o.set(e,t),e},s=function isOverflow(e){return o.has(e)},c=function getMaxIndex(e){return o.get(e)},u=function setMaxIndex(e,t){o.set(e,t)},l=function(){for(var e=[],t=0;t<256;++t)e[e.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return e}(),p=function arrayToObject(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},d=1024;return mr={arrayToObject:p,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,r,n){if(s(e)){var o=c(e)+1;return e[o]=t,u(e,o),e}var l=[].concat(e,t);return l.length>r?i(p(l,{plainObjects:n}),l.length-1):l},compact:function compact(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],o=0;o<t.length;++o)for(var i=t[o],s=i.obj[i.prop],c=Object.keys(s),u=0;u<c.length;++u){var l=c[u],p=s[l];"object"==typeof p&&null!==p&&-1===r.indexOf(p)&&(t[t.length]={obj:s,prop:l},r[r.length]=p)}return function compactQueue(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(n(r)){for(var o=[],i=0;i<r.length;++i)void 0!==r[i]&&(o[o.length]=r[i]);t.obj[t.prop]=o}}}(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(t,r,n,o,i){if(0===t.length)return t;var s=t;if("symbol"==typeof t?s=Symbol.prototype.toString.call(t):"string"!=typeof t&&(s=String(t)),"iso-8859-1"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var c="",u=0;u<s.length;u+=d){for(var p=s.length>=d?s.slice(u,u+d):s,h=[],f=0;f<p.length;++f){var E=p.charCodeAt(f);45===E||46===E||95===E||126===E||E>=48&&E<=57||E>=65&&E<=90||E>=97&&E<=122||i===e.RFC1738&&(40===E||41===E)?h[h.length]=p.charAt(f):E<128?h[h.length]=l[E]:E<2048?h[h.length]=l[192|E>>6]+l[128|63&E]:E<55296||E>=57344?h[h.length]=l[224|E>>12]+l[128|E>>6&63]+l[128|63&E]:(f+=1,E=65536+((1023&E)<<10|1023&p.charCodeAt(f)),h[h.length]=l[240|E>>18]+l[128|E>>12&63]+l[128|E>>6&63]+l[128|63&E])}c+=h.join("")}return c},isBuffer:function isBuffer(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isOverflow:s,isRegExp:function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)},markOverflow:i,maybeMap:function maybeMap(e,t){if(n(e)){for(var r=[],o=0;o<e.length;o+=1)r[r.length]=t(e[o]);return r}return t(e)},merge:function merge(e,t,o){if(!t)return e;if("object"!=typeof t&&"function"!=typeof t){if(n(e)){var l=e.length;if(o&&"number"==typeof o.arrayLimit&&l>o.arrayLimit)return i(p(e.concat(t),o),l);e[l]=t}else{if(!e||"object"!=typeof e)return[e,t];if(s(e)){var d=c(e)+1;e[d]=t,u(e,d)}else{if(o&&o.strictMerge)return[e,t];(o&&(o.plainObjects||o.allowPrototypes)||!r.call(Object.prototype,t))&&(e[t]=!0)}}return e}if(!e||"object"!=typeof e){if(s(t)){for(var h=Object.keys(t),f=o&&o.plainObjects?{__proto__:null,0:e}:{0:e},E=0;E<h.length;E++){f[parseInt(h[E],10)+1]=t[h[E]]}return i(f,c(t)+1)}var g=[e].concat(t);return o&&"number"==typeof o.arrayLimit&&g.length>o.arrayLimit?i(p(g,o),g.length-1):g}var m=e;return n(e)&&!n(t)&&(m=p(e,o)),n(e)&&n(t)?(t.forEach(function(t,n){if(r.call(e,n)){var i=e[n];i&&"object"==typeof i&&t&&"object"==typeof t?e[n]=merge(i,t,o):e[e.length]=t}else e[n]=t}),e):Object.keys(t).reduce(function(e,n){var l=t[n];if(r.call(e,n)?e[n]=merge(e[n],l,o):e[n]=l,s(t)&&!s(e)&&i(e,c(t)),s(e)){var p=parseInt(n,10);String(p)===n&&p>=0&&p>c(e)&&u(e,p)}return e},m)}},mr}function requireStringify(){if(Ar)return yr;Ar=1;var e=requireSideChannel(),t=requireUtils(),r=requireFormats(),n=Object.prototype.hasOwnProperty,o={brackets:function brackets(e){return e+"[]"},comma:"comma",indices:function indices(e,t){return e+"["+t+"]"},repeat:function repeat(e){return e}},i=Array.isArray,s=Array.prototype.push,pushToArray=function(e,t){s.apply(e,i(t)?t:[t])},c=Date.prototype.toISOString,u=r.default,l={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:u,formatter:r.formatters[u],indices:!1,serializeDate:function serializeDate(e){return c.call(e)},skipNulls:!1,strictNullHandling:!1},p={},d=function stringify(r,n,o,s,c,u,d,h,f,E,g,m,_,y,A,R,I,T){for(var S=r,N=T,C=0,b=!1;void 0!==(N=N.get(p))&&!b;){var O=N.get(r);if(C+=1,void 0!==O){if(O===C)throw new RangeError("Cyclic object value");b=!0}void 0===N.get(p)&&(C=0)}if("function"==typeof E?S=E(n,S):S instanceof Date?S=_(S):"comma"===o&&i(S)&&(S=t.maybeMap(S,function(e){return e instanceof Date?_(e):e})),null===S){if(u)return f&&!R?f(n,l.encoder,I,"key",y):n;S=""}if(function isNonNullishPrimitive(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e}(S)||t.isBuffer(S))return f?[A(R?n:f(n,l.encoder,I,"key",y))+"="+A(f(S,l.encoder,I,"value",y))]:[A(n)+"="+A(String(S))];var P,D=[];if(void 0===S)return D;if("comma"===o&&i(S))R&&f&&(S=t.maybeMap(S,f)),P=[{value:S.length>0?S.join(",")||null:void 0}];else if(i(E))P=E;else{var U=Object.keys(S);P=g?U.sort(g):U}var L=h?String(n).replace(/\./g,"%2E"):String(n),v=s&&i(S)&&1===S.length?L+"[]":L;if(c&&i(S)&&0===S.length)return v+"[]";for(var M=0;M<P.length;++M){var w=P[M],B="object"==typeof w&&w&&void 0!==w.value?w.value:S[w];if(!d||null!==B){var x=m&&h?String(w).replace(/\./g,"%2E"):String(w),F=i(S)?"function"==typeof o?o(v,x):v:v+(m?"."+x:"["+x+"]");T.set(r,C);var k=e();k.set(p,T),pushToArray(D,stringify(B,F,o,s,c,u,d,h,"comma"===o&&R&&i(S)?null:f,E,g,m,_,y,A,R,I,k))}}return D};return yr=function(t,s){var c,u=t,p=function normalizeStringifyOptions(e){if(!e)return l;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");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||l.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 s=r.default;if(void 0!==e.format){if(!n.call(r.formatters,e.format))throw new TypeError("Unknown format option provided.");s=e.format}var c,u=r.formatters[s],p=l.filter;if(("function"==typeof e.filter||i(e.filter))&&(p=e.filter),c=e.arrayFormat in o?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":l.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=void 0===e.allowDots?!0===e.encodeDotInKeys||l.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:l.addQueryPrefix,allowDots:d,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:l.allowEmptyArrays,arrayFormat:c,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:l.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?l.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:l.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:l.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:l.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:l.encodeValuesOnly,filter:p,format:s,formatter:u,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:l.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:l.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:l.strictNullHandling}}(s);"function"==typeof p.filter?u=(0,p.filter)("",u):i(p.filter)&&(c=p.filter);var h=[];if("object"!=typeof u||null===u)return"";var f=o[p.arrayFormat],E="comma"===f&&p.commaRoundTrip;c||(c=Object.keys(u)),p.sort&&c.sort(p.sort);for(var g=e(),m=0;m<c.length;++m){var _=c[m],y=u[_];p.skipNulls&&null===y||pushToArray(h,d(y,_,f,E,p.allowEmptyArrays,p.strictNullHandling,p.skipNulls,p.encodeDotInKeys,p.encode?p.encoder:null,p.filter,p.sort,p.allowDots,p.serializeDate,p.format,p.formatter,p.encodeValuesOnly,p.charset,g))}var A=h.join(p.delimiter),R=!0===p.addQueryPrefix?"?":"";return p.charsetSentinel&&("iso-8859-1"===p.charset?R+="utf8=%26%2310003%3B&":R+="utf8=%E2%9C%93&"),A.length>0?R+A:""},yr}function requireParse(){if(Ir)return Rr;Ir=1;var e=requireUtils(),t=Object.prototype.hasOwnProperty,r=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},interpretNumericEntities=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},parseArrayValue=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},o=function parseQueryStringKeys(r,n,o,i){if(r){var s=function splitKeyIntoSegments(e,r){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(r.depth<=0){if(!r.plainObjects&&t.call(Object.prototype,n)&&!r.allowPrototypes)return;return[n]}var o=/(\[[^[\]]*])/g,i=/(\[[^[\]]*])/.exec(n),s=i?n.slice(0,i.index):n,c=[];if(s){if(!r.plainObjects&&t.call(Object.prototype,s)&&!r.allowPrototypes)return;c[c.length]=s}for(var u=0;null!==(i=o.exec(n))&&u<r.depth;){u+=1;var l=i[1].slice(1,-1);if(!r.plainObjects&&t.call(Object.prototype,l)&&!r.allowPrototypes)return;c[c.length]=i[1]}if(i){if(!0===r.strictDepth)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");c[c.length]="["+n.slice(i.index)+"]"}return c}(r,o);if(s)return function(t,r,n,o){var i=0;if(t.length>0&&"[]"===t[t.length-1]){var s=t.slice(0,-1).join("");i=Array.isArray(r)&&r[s]?r[s].length:0}for(var c=o?r:parseArrayValue(r,n,i),u=t.length-1;u>=0;--u){var l,p=t[u];if("[]"===p&&n.parseArrays)l=e.isOverflow(c)?c:n.allowEmptyArrays&&(""===c||n.strictNullHandling&&null===c)?[]:e.combine([],c,n.arrayLimit,n.plainObjects);else{l=n.plainObjects?{__proto__:null}:{};var d="["===p.charAt(0)&&"]"===p.charAt(p.length-1)?p.slice(1,-1):p,h=n.decodeDotInKeys?d.replace(/%2E/g,"."):d,f=parseInt(h,10),E=!isNaN(f)&&p!==h&&String(f)===h&&f>=0&&n.parseArrays;if(n.parseArrays||""!==h)if(E&&f<n.arrayLimit)(l=[])[f]=c;else{if(E&&n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(1===n.arrayLimit?"":"s")+" allowed in an array.");E?(l[f]=c,e.markOverflow(l,f)):"__proto__"!==h&&(l[h]=c)}else l={0:c}}c=l}return c}(s,n,o,i)}};return Rr=function(i,s){var c=function normalizeParseOptions(t){if(!t)return n;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.decodeDotInKeys&&"boolean"!=typeof t.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==t.throwOnLimitExceeded&&"boolean"!=typeof t.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=void 0===t.charset?n.charset:t.charset,o=void 0===t.duplicates?n.duplicates:t.duplicates;if("combine"!==o&&"first"!==o&&"last"!==o)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===t.allowDots?!0===t.decodeDotInKeys||n.allowDots:!!t.allowDots,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:n.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:n.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:n.arrayLimit,charset:r,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:n.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:n.comma,decodeDotInKeys:"boolean"==typeof t.decodeDotInKeys?t.decodeDotInKeys:n.decodeDotInKeys,decoder:"function"==typeof t.decoder?t.decoder:n.decoder,delimiter:"string"==typeof t.delimiter||e.isRegExp(t.delimiter)?t.delimiter:n.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:n.depth,duplicates:o,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:n.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:n.plainObjects,strictDepth:"boolean"==typeof t.strictDepth?!!t.strictDepth:n.strictDepth,strictMerge:"boolean"==typeof t.strictMerge?!!t.strictMerge:n.strictMerge,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:n.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof t.throwOnLimitExceeded&&t.throwOnLimitExceeded}}(s);if(""===i||null==i)return c.plainObjects?{__proto__:null}:{};for(var u="string"==typeof i?function parseQueryStringValues(o,i){var s={__proto__:null},c=i.ignoreQueryPrefix?o.replace(/^\?/,""):o;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u=i.parameterLimit===1/0?void 0:i.parameterLimit,l=c.split(i.delimiter,i.throwOnLimitExceeded?u+1:u);if(i.throwOnLimitExceeded&&l.length>u)throw new RangeError("Parameter limit exceeded. Only "+u+" parameter"+(1===u?"":"s")+" allowed.");var p,d=-1,h=i.charset;if(i.charsetSentinel)for(p=0;p<l.length;++p)0===l[p].indexOf("utf8=")&&("utf8=%E2%9C%93"===l[p]?h="utf-8":"utf8=%26%2310003%3B"===l[p]&&(h="iso-8859-1"),d=p,p=l.length);for(p=0;p<l.length;++p)if(p!==d){var f,E,g=l[p],m=g.indexOf("]="),_=-1===m?g.indexOf("="):m+1;if(-1===_?(f=i.decoder(g,n.decoder,h,"key"),E=i.strictNullHandling?null:""):null!==(f=i.decoder(g.slice(0,_),n.decoder,h,"key"))&&(E=e.maybeMap(parseArrayValue(g.slice(_+1),i,r(s[f])?s[f].length:0),function(e){return i.decoder(e,n.decoder,h,"value")})),E&&i.interpretNumericEntities&&"iso-8859-1"===h&&(E=interpretNumericEntities(String(E))),g.indexOf("[]=")>-1&&(E=r(E)?[E]:E),i.comma&&r(E)&&E.length>i.arrayLimit){if(i.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+i.arrayLimit+" element"+(1===i.arrayLimit?"":"s")+" allowed in an array.");E=e.combine([],E,i.arrayLimit,i.plainObjects)}if(null!==f){var y=t.call(s,f);y&&("combine"===i.duplicates||g.indexOf("[]=")>-1)?s[f]=e.combine(s[f],E,i.arrayLimit,i.plainObjects):y&&"last"!==i.duplicates||(s[f]=E)}}return s}(i,c):i,l=c.plainObjects?{__proto__:null}:{},p=Object.keys(u),d=0;d<p.length;++d){var h=p[d],f=o(h,u[h],c,"string"==typeof i);l=e.merge(l,f,c)}return!0===c.allowSparse?l:e.compact(l)}}function requireLib(){if(Sr)return Tr;Sr=1;var e=requireStringify(),t=requireParse();return Tr={formats:requireFormats(),parse:t,stringify:e}}var Cr=requireLib();const br=He("ebay:request"),Or={"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"},Pr={"Content-Type":"multipart/form-data"},Dr={paramsSerializer:{indexes:null}};class AxiosRequest{constructor(e={}){this.instance=ge.create({headers:{...Or},...Dr,...e})}get(e,t){return br("get: "+e,t),this.instance.get(e,t)}post(e,t,r){return br("post: "+e,{payload:t,config:r}),this.instance.post(e,t,r)}delete(e,t){return br("delete: "+e,t),this.instance.delete(e,t)}put(e,t,r){return br("put: "+e,{payload:t,config:r}),this.instance.put(e,t,r)}postForm(e,t,r){br("postForm: "+e);const n=Cr.stringify(t);return this.instance.post(e,n,r)}}class Base{constructor(e,t=new AxiosRequest(e.axiosConfig)){this.config=e,this.req=t}}const Ur=":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",Lr=new RegExp("^"+("["+Ur+"]["+(Ur+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*")+"$");function getAllMatches(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}const isName=function(e){const t=Lr.exec(e);return!(null==t)};const vr=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],Mr=["__proto__","constructor","prototype"],wr={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]){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}continue}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}const Br='"',xr="'";function readAttributeStr(e,t){let r="",n="",o=!1;for(;t<e.length;t++){if(e[t]===Br||e[t]===xr)""===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 Fr=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function validateAttributeString(e,t){const r=getAllMatches(e,Fr),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(Object.prototype.hasOwnProperty.call(n,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 isName(e)}function validateTagName(e){return 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}const kr={cent:"¢",pound:"£",curren:"¤",yen:"¥",euro:"€",dollar:"$",euro:"€",fnof:"ƒ",inr:"₹",af:"؋",birr:"ብር",peso:"₱",rub:"₽",won:"₩",yuan:"¥",cedil:"¸"},Gr={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},Yr={nbsp:" ",copy:"©",reg:"®",trade:"™",mdash:"—",ndash:"–",hellip:"…",laquo:"«",raquo:"»",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",bull:"•",para:"¶",sect:"§",deg:"°",frac12:"½",frac14:"¼",frac34:"¾"},$r=new Set("!?\\\\/[]$%{}^&*()<>|+");function validateEntityName$1(e){if("#"===e[0])throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${e}"`);for(const t of e)if($r.has(t))throw new Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${e}"`);return e}function mergeEntityMaps(...e){const t=Object.create(null);for(const r of e)if(r)for(const e of Object.keys(r)){const n=r[e];if("string"==typeof n)t[e]=n;else if(n&&"object"==typeof n&&void 0!==n.val){const r=n.val;"string"==typeof r&&(t[e]=r)}}return t}const jr="external",Hr="base",Vr="all";const qr=Object.freeze({allow:0,leave:1,remove:2,throw:3}),Kr=new Set([9,10,13]);class EntityDecoder{constructor(e={}){this._limit=e.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck="function"==typeof e.postCheck?e.postCheck:e=>e,this._limitTiers=function parseLimitTiers(e){return e&&e!==jr?e===Vr?new Set([Vr]):e===Hr?new Set([Hr]):Array.isArray(e)?new Set(e):new Set([jr]):new Set([jr])}(this._limit.applyLimitsTo??jr),this._numericAllowed=e.numericAllowed??!0,this._baseMap=mergeEntityMaps(Gr,e.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(e.remove&&Array.isArray(e.remove)?e.remove:[]),this._leaveSet=new Set(e.leave&&Array.isArray(e.leave)?e.leave:[]);const t=function parseNCRConfig(e){if(!e)return{xmlVersion:1,onLevel:qr.allow,nullLevel:qr.remove};const t=1.1===e.xmlVersion?1.1:1,r=qr[e.onNCR]??qr.allow,n=qr[e.nullNCR]??qr.remove;return{xmlVersion:t,onLevel:r,nullLevel:Math.max(n,qr.remove)}}(e.ncr);this._ncrXmlVersion=t.xmlVersion,this._ncrOnLevel=t.onLevel,this._ncrNullLevel=t.nullLevel}setExternalEntities(e){if(e)for(const t of Object.keys(e))validateEntityName$1(t);this._externalMap=mergeEntityMaps(e)}addExternalEntity(e,t){validateEntityName$1(e),"string"==typeof t&&-1===t.indexOf("&")&&(this._externalMap[e]=t)}addInputEntities(e){this._totalExpansions=0,this._expandedLength=0,this._inputMap=mergeEntityMaps(e)}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(e){this._ncrXmlVersion=1.1===e?1.1:1}decode(e){if("string"!=typeof e||0===e.length)return e;const t=e,r=[],n=e.length;let o=0,i=0;const s=this._maxTotalExpansions>0,c=this._maxExpandedLength>0,u=s||c;for(;i<n;){if(38!==e.charCodeAt(i)){i++;continue}let t=i+1;for(;t<n&&59!==e.charCodeAt(t)&&t-i<=32;)t++;if(t>=n||59!==e.charCodeAt(t)){i++;continue}const l=e.slice(i+1,t);if(0===l.length){i++;continue}let p,d;if(this._removeSet.has(l))p="",void 0===d&&(d=jr);else{if(this._leaveSet.has(l)){i++;continue}if(35===l.charCodeAt(0)){const e=this._resolveNCR(l);if(void 0===e){i++;continue}p=e,d=Hr}else{const e=this._resolveName(l);p=e?.value,d=e?.tier}}if(void 0!==p){if(i>o&&r.push(e.slice(o,i)),r.push(p),o=t+1,i=o,u&&this._tierCounts(d)){if(s&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw new Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(c){const e=p.length-(l.length+2);if(e>0&&(this._expandedLength+=e,this._expandedLength>this._maxExpandedLength))throw new Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}else i++}o<n&&r.push(e.slice(o));const l=0===r.length?e:r.join("");return this._postCheck(l,t)}_tierCounts(e){return!!this._limitTiers.has(Vr)||this._limitTiers.has(e)}_resolveName(e){return e in this._inputMap?{value:this._inputMap[e],tier:jr}:e in this._externalMap?{value:this._externalMap[e],tier:jr}:e in this._baseMap?{value:this._baseMap[e],tier:Hr}:void 0}_classifyNCR(e){return 0===e?this._ncrNullLevel:e>=55296&&e<=57343||1===this._ncrXmlVersion&&e>=1&&e<=31&&!Kr.has(e)?qr.remove:-1}_applyNCRAction(e,t,r){switch(e){case qr.allow:return String.fromCodePoint(r);case qr.remove:return"";case qr.leave:return;case qr.throw:throw new Error(`[EntityDecoder] Prohibited numeric character reference &${t}; (U+${r.toString(16).toUpperCase().padStart(4,"0")})`);default:return String.fromCodePoint(r)}}_resolveNCR(e){const t=e.charCodeAt(1);let r;if(r=120===t||88===t?parseInt(e.slice(2),16):parseInt(e.slice(1),10),Number.isNaN(r)||r<0||r>1114111)return;const n=this._classifyNCR(r);if(!this._numericAllowed&&n<qr.remove)return;const o=-1===n?this._ncrOnLevel:Math.max(this._ncrOnLevel,n);return this._applyNCRAction(o,e,r)}}const defaultOnDangerousProperty=e=>vr.includes(e)?"__"+e:e,Wr={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,eNotation:!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,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:defaultOnDangerousProperty};function validatePropertyName(e,t){if("string"!=typeof e)return;const r=e.toLowerCase();if(vr.some(e=>r===e.toLowerCase()))throw new Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);if(Mr.some(e=>r===e.toLowerCase()))throw new Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`)}function normalizeProcessEntities(e,t){return"boolean"==typeof e?{enabled:e,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1e3,allowedTags:null,tagFilter:null,appliesTo:"all"}:"object"==typeof e&&null!==e?{enabled:!1!==e.enabled,maxEntitySize:Math.max(1,e.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,e.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,e.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,e.maxExpandedLength??1e5),maxEntityCount:Math.max(1,e.maxEntityCount??1e3),allowedTags:e.allowedTags??null,tagFilter:e.tagFilter??null,appliesTo:e.appliesTo??"all"}:normalizeProcessEntities(!0)}const buildOptions=function(e){const t=Object.assign({},Wr,e),r=[{value:t.attributeNamePrefix,name:"attributeNamePrefix"},{value:t.attributesGroupName,name:"attributesGroupName"},{value:t.textNodeName,name:"textNodeName"},{value:t.cdataPropName,name:"cdataPropName"},{value:t.commentPropName,name:"commentPropName"}];for(const{value:e,name:t}of r)e&&validatePropertyName(e,t);return null===t.onDangerousProperty&&(t.onDangerousProperty=defaultOnDangerousProperty),t.processEntities=normalizeProcessEntities(t.processEntities,t.htmlEntities),t.unpairedTagsSet=new Set(t.unpairedTags),t.stopNodes&&Array.isArray(t.stopNodes)&&(t.stopNodes=t.stopNodes.map(e=>"string"==typeof e&&e.startsWith("*.")?".."+e.substring(2):e)),t};let Xr;Xr="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class XmlNode{constructor(e){this.tagname=e,this.child=[],this[":@"]=Object.create(null)}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e,t){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),void 0!==t&&(this.child[this.child.length-1][Xr]={startIndex:t})}static getMetaDataSymbol(){return Xr}}class DocTypeReader{constructor(e){this.suppressValidationErr=!e,this.options=e}readDocType(e,t){const r=Object.create(null);let n=0;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 o=1,i=!1,s=!1,c="";for(;t<e.length;t++)if("<"!==e[t]||s)if(">"===e[t]){if(s?"-"===e[t-1]&&"-"===e[t-2]&&(s=!1,o--):o--,0===o)break}else"["===e[t]?i=!0:c+=e[t];else{if(i&&hasSeq(e,"!ENTITY",t)){let o,i;if(t+=7,[o,i,t]=this.readEntityExp(e,t+1,this.suppressValidationErr),-1===i.indexOf("&")){if(!1!==this.options.enabled&&null!=this.options.maxEntityCount&&n>=this.options.maxEntityCount)throw new Error(`Entity count (${n+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);r[o]=i,n++}}else if(i&&hasSeq(e,"!ELEMENT",t)){t+=8;const{index:r}=this.readElementExp(e,t+1);t=r}else if(i&&hasSeq(e,"!ATTLIST",t))t+=8;else if(i&&hasSeq(e,"!NOTATION",t)){t+=9;const{index:r}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=r}else{if(!hasSeq(e,"!--",t))throw new Error("Invalid DOCTYPE");s=!0}o++,c=""}if(0!==o)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}}readEntityExp(e,t){const r=t=skipWhitespace(e,t);for(;t<e.length&&!/\s/.test(e[t])&&'"'!==e[t]&&"'"!==e[t];)t++;let n=e.substring(r,t);if(validateEntityName(n),t=skipWhitespace(e,t),!this.suppressValidationErr){if("SYSTEM"===e.substring(t,t+6).toUpperCase())throw new Error("External entities are not supported");if("%"===e[t])throw new Error("Parameter entities are not supported")}let o="";if([t,o]=this.readIdentifierVal(e,t,"entity"),!1!==this.options.enabled&&null!=this.options.maxEntitySize&&o.length>this.options.maxEntitySize)throw new Error(`Entity "${n}" size (${o.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[n,o,--t]}readNotationExp(e,t){const r=t=skipWhitespace(e,t);for(;t<e.length&&!/\s/.test(e[t]);)t++;let n=e.substring(r,t);!this.suppressValidationErr&&validateEntityName(n),t=skipWhitespace(e,t);const o=e.substring(t,t+6).toUpperCase();if(!this.suppressValidationErr&&"SYSTEM"!==o&&"PUBLIC"!==o)throw new Error(`Expected SYSTEM or PUBLIC, found "${o}"`);t+=o.length,t=skipWhitespace(e,t);let i=null,s=null;if("PUBLIC"===o)[t,i]=this.readIdentifierVal(e,t,"publicIdentifier"),'"'!==e[t=skipWhitespace(e,t)]&&"'"!==e[t]||([t,s]=this.readIdentifierVal(e,t,"systemIdentifier"));else if("SYSTEM"===o&&([t,s]=this.readIdentifierVal(e,t,"systemIdentifier"),!this.suppressValidationErr&&!s))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:i,systemIdentifier:s,index:--t}}readIdentifierVal(e,t,r){let n="";const o=e[t];if('"'!==o&&"'"!==o)throw new Error(`Expected quoted string, found "${o}"`);const i=++t;for(;t<e.length&&e[t]!==o;)t++;if(n=e.substring(i,t),e[t]!==o)throw new Error(`Unterminated ${r} value`);return[++t,n]}readElementExp(e,t){const r=t=skipWhitespace(e,t);for(;t<e.length&&!/\s/.test(e[t]);)t++;let n=e.substring(r,t);if(!this.suppressValidationErr&&!isName(n))throw new Error(`Invalid element name: "${n}"`);let o="";if("E"===e[t=skipWhitespace(e,t)]&&hasSeq(e,"MPTY",t))t+=4;else if("A"===e[t]&&hasSeq(e,"NY",t))t+=2;else if("("===e[t]){const r=++t;for(;t<e.length&&")"!==e[t];)t++;if(o=e.substring(r,t),")"!==e[t])throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${e[t]}"`);return{elementName:n,contentModel:o.trim(),index:t}}readAttlistExp(e,t){let r=t=skipWhitespace(e,t);for(;t<e.length&&!/\s/.test(e[t]);)t++;let n=e.substring(r,t);for(validateEntityName(n),r=t=skipWhitespace(e,t);t<e.length&&!/\s/.test(e[t]);)t++;let o=e.substring(r,t);if(!validateEntityName(o))throw new Error(`Invalid attribute name: "${o}"`);t=skipWhitespace(e,t);let i="";if("NOTATION"===e.substring(t,t+8).toUpperCase()){if(i="NOTATION","("!==e[t=skipWhitespace(e,t+=8)])throw new Error(`Expected '(', found "${e[t]}"`);t++;let r=[];for(;t<e.length&&")"!==e[t];){const n=t;for(;t<e.length&&"|"!==e[t]&&")"!==e[t];)t++;let o=e.substring(n,t);if(o=o.trim(),!validateEntityName(o))throw new Error(`Invalid notation name: "${o}"`);r.push(o),"|"===e[t]&&(t++,t=skipWhitespace(e,t))}if(")"!==e[t])throw new Error("Unterminated list of notations");t++,i+=" ("+r.join("|")+")"}else{const r=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;i+=e.substring(r,t);const n=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!n.includes(i.toUpperCase()))throw new Error(`Invalid attribute type: "${i}"`)}t=skipWhitespace(e,t);let s="";return"#REQUIRED"===e.substring(t,t+8).toUpperCase()?(s="#REQUIRED",t+=8):"#IMPLIED"===e.substring(t,t+7).toUpperCase()?(s="#IMPLIED",t+=7):[t,s]=this.readIdentifierVal(e,t,"ATTLIST"),{elementName:n,attributeName:o,attributeType:i,defaultValue:s,index:t}}}const skipWhitespace=(e,t)=>{for(;t<e.length&&/\s/.test(e[t]);)t++;return t};function hasSeq(e,t,r){for(let n=0;n<t.length;n++)if(t[n]!==e[r+n+1])return!1;return!0}function validateEntityName(e){if(isName(e))return e;throw new Error(`Invalid entity name ${e}`)}const zr=/^[-+]?0x[a-fA-F0-9]+$/,Jr=/^0b[01]+$/,Qr=/^0o[0-7]+$/,Zr=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,en={hex:!0,binary:!1,octal:!1,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original"};function toNumber(e,t={}){if(t=Object.assign({},en,t),!e||"string"!=typeof e)return e;let r=e.trim();if(0===r.length)return e;if(void 0!==t.skipLike&&t.skipLike.test(r))return e;if("0"===r)return 0;if(t.hex&&zr.test(r))return parse_int(r,16);if(t.binary&&Jr.test(r))return parse_int(r,2);if(t.octal&&Qr.test(r))return parse_int(r,8);if(isFinite(r)){if(r.includes("e")||r.includes("E"))return function resolveEnotation(e,t,r){if(!r.eNotation)return e;const n=t.match(tn);if(n){let o=n[1]||"";const i=-1===n[3].indexOf("e")?"E":"e",s=n[2],c=o?e[s.length+1]===i:e[s.length]===i;return s.length>1&&c?e:(1!==s.length||!n[3].startsWith(`.${i}`)&&n[3][0]!==i)&&s.length>0?r.leadingZeros&&!c?(t=(n[1]||"")+n[3],Number(t)):e:Number(t)}return e}(e,r,t);{const n=Zr.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.substring(0,e.length-1)),e;return e}(n[3]);const c=o?"."===e[i.length+1]:"."===e[i.length];if(!t.leadingZeros&&(i.length>1||1===i.length&&!c))return e;{const n=Number(r),c=String(n);if(0===n)return n;if(-1!==c.search(/[eE]/))return t.eNotation?n:e;if(-1!==r.indexOf("."))return"0"===c||c===s||c===`${o}${s}`?n:e;let u=i?s:r;return i?u===c||o+u===c?n:e:u===c||u===o+c?n:e}}return e}}return function handleInfinity(e,t,r){const n=t===1/0;switch(r.infinity.toLowerCase()){case"null":return null;case"infinity":return t;case"string":return n?"Infinity":"-Infinity";default:return e}}(e,Number(r),t)}const tn=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function parse_int(e,t){const r=e.trim();if(2!==t&&8!==t||(e=r.substring(2)),parseInt)return parseInt(e,t);if(Number.parseInt)return Number.parseInt(e,t);if(window&&window.parseInt)return window.parseInt(e,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}class Expression{constructor(e,t={},r){this.pattern=e,this.separator=t.separator||".",this.segments=this._parse(e),this.data=r,this._hasDeepWildcard=this.segments.some(e=>"deep-wildcard"===e.type),this._hasAttributeCondition=this.segments.some(e=>void 0!==e.attrName),this._hasPositionSelector=this.segments.some(e=>void 0!==e.position)}_parse(e){const t=[];let r=0,n="";for(;r<e.length;)e[r]===this.separator?r+1<e.length&&e[r+1]===this.separator?(n.trim()&&(t.push(this._parseSegment(n.trim())),n=""),t.push({type:"deep-wildcard"}),r+=2):(n.trim()&&t.push(this._parseSegment(n.trim())),n="",r++):(n+=e[r],r++);return n.trim()&&t.push(this._parseSegment(n.trim())),t}_parseSegment(e){const t={type:"tag"};let r=null,n=e;const o=e.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(o&&(n=o[1]+o[3],o[2])){const e=o[2].slice(1,-1);e&&(r=e)}let i,s,c=n;if(n.includes("::")){const t=n.indexOf("::");if(i=n.substring(0,t).trim(),c=n.substring(t+2).trim(),!i)throw new Error(`Invalid namespace in pattern: ${e}`)}let u=null;if(c.includes(":")){const e=c.lastIndexOf(":"),t=c.substring(0,e).trim(),r=c.substring(e+1).trim();["first","last","odd","even"].includes(r)||/^nth\(\d+\)$/.test(r)?(s=t,u=r):s=c}else s=c;if(!s)throw new Error(`Invalid segment pattern: ${e}`);if(t.tag=s,i&&(t.namespace=i),r)if(r.includes("=")){const e=r.indexOf("=");t.attrName=r.substring(0,e).trim(),t.attrValue=r.substring(e+1).trim()}else t.attrName=r.trim();if(u){const e=u.match(/^nth\((\d+)\)$/);e?(t.position="nth",t.positionValue=parseInt(e[1],10)):t.position=u}return t}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class ExpressionSet{constructor(){this._byDepthAndTag=new Map,this._wildcardByDepth=new Map,this._deepWildcards=[],this._patterns=new Set,this._sealed=!1}add(e){if(this._sealed)throw new TypeError("ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.");if(this._patterns.has(e.pattern))return this;if(this._patterns.add(e.pattern),e.hasDeepWildcard())return this._deepWildcards.push(e),this;const t=e.length,r=e.segments[e.segments.length-1],n=r?.tag;if(n&&"*"!==n){const r=`${t}:${n}`;this._byDepthAndTag.has(r)||this._byDepthAndTag.set(r,[]),this._byDepthAndTag.get(r).push(e)}else this._wildcardByDepth.has(t)||this._wildcardByDepth.set(t,[]),this._wildcardByDepth.get(t).push(e);return this}addAll(e){for(const t of e)this.add(t);return this}has(e){return this._patterns.has(e.pattern)}get size(){return this._patterns.size}seal(){return this._sealed=!0,this}get isSealed(){return this._sealed}matchesAny(e){return null!==this.findMatch(e)}findMatch(e){const t=e.getDepth(),r=`${t}:${e.getCurrentTag()}`,n=this._byDepthAndTag.get(r);if(n)for(let t=0;t<n.length;t++)if(e.matches(n[t]))return n[t];const o=this._wildcardByDepth.get(t);if(o)for(let t=0;t<o.length;t++)if(e.matches(o[t]))return o[t];for(let t=0;t<this._deepWildcards.length;t++)if(e.matches(this._deepWildcards[t]))return this._deepWildcards[t];return null}}class MatcherView{constructor(e){this._matcher=e}get separator(){return this._matcher.separator}getCurrentTag(){const e=this._matcher.path;return e.length>0?e[e.length-1].tag:void 0}getCurrentNamespace(){const e=this._matcher.path;return e.length>0?e[e.length-1].namespace:void 0}getAttrValue(e){const t=this._matcher.path;if(0!==t.length)return t[t.length-1].values?.[e]}hasAttr(e){const t=this._matcher.path;if(0===t.length)return!1;const r=t[t.length-1];return void 0!==r.values&&e in r.values}getPosition(){const e=this._matcher.path;return 0===e.length?-1:e[e.length-1].position??0}getCounter(){const e=this._matcher.path;return 0===e.length?-1:e[e.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(e,t=!0){return this._matcher.toString(e,t)}toArray(){return this._matcher.path.map(e=>e.tag)}matches(e){return this._matcher.matches(e)}matchesAny(e){return e.matchesAny(this._matcher)}}class Matcher{constructor(e={}){this.separator=e.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new MatcherView(this)}push(e,t=null,r=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);const n=this.path.length;this.siblingStacks[n]||(this.siblingStacks[n]=new Map);const o=this.siblingStacks[n],i=r?`${r}:${e}`:e,s=o.get(i)||0;let c=0;for(const e of o.values())c+=e;o.set(i,s+1);const u={tag:e,position:c,counter:s};null!=r&&(u.namespace=r),null!=t&&(u.values=t),this.path.push(u)}pop(){if(0===this.path.length)return;this._pathStringCache=null;const e=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),e}updateCurrent(e){if(this.path.length>0){const t=this.path[this.path.length-1];null!=e&&(t.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){if(0!==this.path.length)return this.path[this.path.length-1].values?.[e]}hasAttr(e){if(0===this.path.length)return!1;const t=this.path[this.path.length-1];return void 0!==t.values&&e in t.values}getPosition(){return 0===this.path.length?-1:this.path[this.path.length-1].position??0}getCounter(){return 0===this.path.length?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,t=!0){const r=e||this.separator;if(r===this.separator&&!0===t){if(null!==this._pathStringCache)return this._pathStringCache;const e=this.path.map(e=>e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(r);return this._pathStringCache=e,e}return this.path.map(e=>t&&e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(r)}toArray(){return this.path.map(e=>e.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(e){const t=e.segments;return 0!==t.length&&(e.hasDeepWildcard()?this._matchWithDeepWildcard(t):this._matchSimple(t))}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let t=0;t<e.length;t++)if(!this._matchSegment(e[t],this.path[t],t===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(e){let t=this.path.length-1,r=e.length-1;for(;r>=0&&t>=0;){const n=e[r];if("deep-wildcard"===n.type){if(r--,r<0)return!0;const n=e[r];let o=!1;for(let e=t;e>=0;e--)if(this._matchSegment(n,this.path[e],e===this.path.length-1)){t=e-1,r--,o=!0;break}if(!o)return!1}else{if(!this._matchSegment(n,this.path[t],t===this.path.length-1))return!1;t--,r--}}return r<0}_matchSegment(e,t,r){if("*"!==e.tag&&e.tag!==t.tag)return!1;if(void 0!==e.namespace&&"*"!==e.namespace&&e.namespace!==t.namespace)return!1;if(void 0!==e.attrName){if(!r)return!1;if(!t.values||!(e.attrName in t.values))return!1;if(void 0!==e.attrValue&&String(t.values[e.attrName])!==String(e.attrValue))return!1}if(void 0!==e.position){if(!r)return!1;const n=t.counter??0;if("first"===e.position&&0!==n)return!1;if("odd"===e.position&&n%2!=1)return!1;if("even"===e.position&&n%2!=0)return!1;if("nth"===e.position&&n!==e.positionValue)return!1}return!0}matchesAny(e){return e.matchesAny(this)}snapshot(){return{path:this.path.map(e=>({...e})),siblingStacks:this.siblingStacks.map(e=>new Map(e))}}restore(e){this._pathStringCache=null,this.path=e.path.map(e=>({...e})),this.siblingStacks=e.siblingStacks.map(e=>new Map(e))}readOnly(){return this._view}}function extractRawAttributes(e,t){if(!e)return{};const r=t.attributesGroupName?e[t.attributesGroupName]:e;if(!r)return{};const n={};for(const e in r)if(e.startsWith(t.attributeNamePrefix)){n[e.substring(t.attributeNamePrefix.length)]=r[e]}else n[e]=r[e];return n}function extractNamespace(e){if(!e||"string"!=typeof e)return;const t=e.indexOf(":");if(-1!==t&&t>0){const r=e.substring(0,t);if("xmlns"!==r)return r}}class OrderedObjParser{constructor(e,t){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.parseXml=parseXml,this.parseTextData=parseTextData,this.resolveNameSpace=resolveNameSpace,this.buildAttributesMap=buildAttributesMap,this.isItStopNode=isItStopNode,this.replaceEntitiesValue=replaceEntitiesValue$1,this.readStopNodeData=readStopNodeData,this.saveTextToParentTag=saveTextToParentTag,this.addChild=addChild,this.ignoreAttributesFn=function getIgnoreAttributesFn$1(e){return"function"==typeof e?e:Array.isArray(e)?t=>{for(const r of e){if("string"==typeof r&&t===r)return!0;if(r instanceof RegExp&&r.test(t))return!0}}:()=>!1}(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0;let r={...Gr};this.options.entityDecoder?this.entityDecoder=this.options.entityDecoder:("object"==typeof this.options.htmlEntities?r=this.options.htmlEntities:!0===this.options.htmlEntities&&(r={...Yr,...kr}),this.entityDecoder=new EntityDecoder({namedEntities:{...r,...t},numericAllowed:this.options.htmlEntities,limit:{maxTotalExpansions:this.options.processEntities.maxTotalExpansions,maxExpandedLength:this.options.processEntities.maxExpandedLength,applyLimitsTo:this.options.processEntities.appliesTo}})),this.matcher=new Matcher,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.stopNodeExpressionsSet=new ExpressionSet;const n=this.options.stopNodes;if(n&&n.length>0){for(let e=0;e<n.length;e++){const t=n[e];"string"==typeof t?this.stopNodeExpressionsSet.add(new Expression(t)):t instanceof Expression&&this.stopNodeExpressionsSet.add(t)}this.stopNodeExpressionsSet.seal()}}}function parseTextData(e,t,r,n,o,i,s){const c=this.options;if(void 0!==e&&(c.trimValues&&!n&&(e=e.trim()),e.length>0)){s||(e=this.replaceEntitiesValue(e,t,r));const n=c.jPath?r.toString():r,u=c.tagValueProcessor(t,e,n,o,i);if(null==u)return e;if(typeof u!=typeof e||u!==e)return u;if(c.trimValues)return parseValue(e,c.parseTagValue,c.numberParseOptions);return e.trim()===e?parseValue(e,c.parseTagValue,c.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 rn=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function buildAttributesMap(e,t,r,n=!1){const o=this.options;if(!0===n||!0!==o.ignoreAttributes&&"string"==typeof e){const n=getAllMatches(e,rn),i=n.length,s={},c=new Array(i);let u=!1;const l={};for(let e=0;e<i;e++){const t=this.resolveNameSpace(n[e][1]),i=n[e][4];if(t.length&&void 0!==i){let n=i;o.trimValues&&(n=n.trim()),n=this.replaceEntitiesValue(n,r,this.readonlyMatcher),c[e]=n,l[t]=n,u=!0}}u&&"object"==typeof t&&t.updateCurrent&&t.updateCurrent(l);const p=o.jPath?t.toString():this.readonlyMatcher;let d=!1;for(let e=0;e<i;e++){const t=this.resolveNameSpace(n[e][1]);if(this.ignoreAttributesFn(t,p))continue;let r=o.attributeNamePrefix+t;if(t.length)if(o.transformAttributeName&&(r=o.transformAttributeName(r)),r=sanitizeName(r,o),void 0!==n[e][4]){const n=c[e],i=o.attributeValueProcessor(t,n,p);s[r]=null==i?n:typeof i!=typeof n||i!==n?i:parseValue(n,o.parseAttributeValue,o.numberParseOptions),d=!0}else o.allowBooleanAttributes&&(s[r]=!0,d=!0)}if(!d)return;if(o.attributesGroupName&&!o.preserveOrder){const e={};return e[o.attributesGroupName]=s,e}return s}}const parseXml=function(e){e=e.replace(/\r\n?/g,"\n");const t=new XmlNode("!xml");let r=t,n="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;const o=this.options,i=new DocTypeReader(o.processEntities),s=e.length;for(let c=0;c<s;c++){if("<"===e[c]){const u=e.charCodeAt(c+1);if(47===u){const t=findClosingIndex(e,">",c,"Closing Tag is not closed.");let i=e.substring(c+2,t).trim();if(o.removeNSPrefix){const e=i.indexOf(":");-1!==e&&(i=i.substr(e+1))}i=transformTagName(o.transformTagName,i,"",o).tagName,r&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher));const s=this.matcher.getCurrentTag();if(i&&o.unpairedTagsSet.has(i))throw new Error(`Unpaired tag can not be used as closing tag: </${i}>`);s&&o.unpairedTagsSet.has(s)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),n="",c=t}else if(63===u){let t=readTagExp(e,c,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");n=this.saveTextToParentTag(n,r,this.readonlyMatcher);const i=this.buildAttributesMap(t.tagExp,this.matcher,t.tagName,!0);if(i){const e=i[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(e)||1)}if(o.ignoreDeclaration&&"?xml"===t.tagName||o.ignorePiTags);else{const e=new XmlNode(t.tagName);e.add(o.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&!0!==o.ignoreAttributes&&(e[":@"]=i),this.addChild(r,e,this.readonlyMatcher,c)}c=t.closeIndex+1}else if(33===u&&45===e.charCodeAt(c+2)&&45===e.charCodeAt(c+3)){const t=findClosingIndex(e,"--\x3e",c+4,"Comment is not closed.");if(o.commentPropName){const i=e.substring(c+4,t-2);n=this.saveTextToParentTag(n,r,this.readonlyMatcher),r.add(o.commentPropName,[{[o.textNodeName]:i}])}c=t}else if(33===u&&68===e.charCodeAt(c+2)){const t=i.readDocType(e,c);this.entityDecoder.addInputEntities(t.entities),c=t.i}else if(33===u&&91===e.charCodeAt(c+2)){const t=findClosingIndex(e,"]]>",c,"CDATA is not closed.")-2,i=e.substring(c+9,t);n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let s=this.parseTextData(i,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);null==s&&(s=""),o.cdataPropName?r.add(o.cdataPropName,[{[o.textNodeName]:i}]):r.add(o.textNodeName,s),c=t+2}else{let i=readTagExp(e,c,o.removeNSPrefix);if(!i){const t=e.substring(Math.max(0,c-50),Math.min(s,c+50));throw new Error(`readTagExp returned undefined at position ${c}. Context: "${t}"`)}let u=i.tagName;const l=i.rawTagName;let p=i.tagExp,d=i.attrExpPresent,h=i.closeIndex;if(({tagName:u,tagExp:p}=transformTagName(o.transformTagName,u,p,o)),o.strictReservedNames&&(u===o.commentPropName||u===o.cdataPropName||u===o.textNodeName||u===o.attributesGroupName))throw new Error(`Invalid tag name: ${u}`);r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher,!1));const f=r;f&&o.unpairedTagsSet.has(f.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let E=!1;p.length>0&&p.lastIndexOf("/")===p.length-1&&(E=!0,"/"===u[u.length-1]?(u=u.substr(0,u.length-1),p=u):p=p.substr(0,p.length-1),d=u!==p);let g,m=null;g=extractNamespace(l),u!==t.tagname&&this.matcher.push(u,{},g),u!==p&&d&&(m=this.buildAttributesMap(p,this.matcher,u),m&&extractRawAttributes(m,o)),u!==t.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());const _=c;if(this.isCurrentNodeStopNode){let t="";if(E)c=i.closeIndex;else if(o.unpairedTagsSet.has(u))c=i.closeIndex;else{const r=this.readStopNodeData(e,l,h+1);if(!r)throw new Error(`Unexpected end of ${l}`);c=r.i,t=r.tagContent}const n=new XmlNode(u);m&&(n[":@"]=m),n.add(o.textNodeName,t),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,n,this.readonlyMatcher,_)}else{if(E){({tagName:u,tagExp:p}=transformTagName(o.transformTagName,u,p,o));const e=new XmlNode(u);m&&(e[":@"]=m),this.addChild(r,e,this.readonlyMatcher,_),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(o.unpairedTagsSet.has(u)){const e=new XmlNode(u);m&&(e[":@"]=m),this.addChild(r,e,this.readonlyMatcher,_),this.matcher.pop(),this.isCurrentNodeStopNode=!1,c=i.closeIndex;continue}{const e=new XmlNode(u);if(this.tagsNodeStack.length>o.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(r),m&&(e[":@"]=m),this.addChild(r,e,this.readonlyMatcher,_),r=e}}n="",c=h}}}else n+=e[c]}return t.child};function addChild(e,t,r,n){this.options.captureMetaData||(n=void 0);const o=this.options.jPath?r.toString():r,i=this.options.updateTag(t.tagname,o,t[":@"]);!1===i||("string"==typeof i?(t.tagname=i,e.addChild(t,n)):e.addChild(t,n))}function replaceEntitiesValue$1(e,t,r){const n=this.options.processEntities;if(!n||!n.enabled)return e;if(n.allowedTags){const o=this.options.jPath?r.toString():r;if(!(Array.isArray(n.allowedTags)?n.allowedTags.includes(t):n.allowedTags(t,o)))return e}if(n.tagFilter){const o=this.options.jPath?r.toString():r;if(!n.tagFilter(t,o))return e}return this.entityDecoder.decode(e)}function saveTextToParentTag(e,t,r,n){return e&&(void 0===n&&(n=0===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(){return 0!==this.stopNodeExpressionsSet.size&&this.matcher.matchesAny(this.stopNodeExpressionsSet)}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 findClosingChar(e,t,r,n){const o=e.indexOf(t,r);if(-1===o)throw new Error(n);return o}function readTagExp(e,t,r,n=">"){const o=function tagExpWithClosingIndex(e,t,r=">"){let n=0;const o=e.length,i=r.charCodeAt(0),s=r.length>1?r.charCodeAt(1):-1;let c="",u=t;for(let r=t;r<o;r++){const t=e.charCodeAt(r);if(n)t===n&&(n=0);else if(34===t||39===t)n=t;else if(t===i){if(-1===s)return c+=e.substring(u,r),{data:c,index:r};if(e.charCodeAt(r+1)===s)return c+=e.substring(u,r),{data:c,index:r}}else 9!==t||n||(c+=e.substring(u,r)+" ",u=r+1)}}(e,t+1,n);if(!o)return;let i=o.data;const s=o.index,c=i.search(/\s/);let u=i,l=!0;-1!==c&&(u=i.substring(0,c),i=i.substring(c+1).trimStart());const p=u;if(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,rawTagName:p}}function readStopNodeData(e,t,r){const n=r;let o=1;const i=e.length;for(;r<i;r++)if("<"===e[r]){const i=e.charCodeAt(r+1);if(47===i){const i=findClosingChar(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(63===i){r=findClosingIndex(e,"?>",r+1,"StopNode is not closed.")}else if(33===i&&45===e.charCodeAt(r+2)&&45===e.charCodeAt(r+3)){r=findClosingIndex(e,"--\x3e",r+3,"StopNode is not closed.")}else if(33===i&&91===e.charCodeAt(r+2)){r=findClosingIndex(e,"]]>",r,"StopNode is not closed.")-2}else{const n=readTagExp(e,r,!1);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&&toNumber(e,r)}return function isExist(e){return void 0!==e}(e)?e:""}function transformTagName(e,t,r,n){if(e){const n=e(t);r===t&&(r=n),t=n}return{tagName:t=sanitizeName(t,n),tagExp:r}}function sanitizeName(e,t){if(Mr.includes(e))throw new Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);return vr.includes(e)?t.onDangerousProperty(e):e}const nn=XmlNode.getMetaDataSymbol();function stripAttributePrefix(e,t){if(!e||"object"!=typeof e)return{};if(!t)return e;const r={};for(const n in e)if(n.startsWith(t)){r[n.substring(t.length)]=e[n]}else r[n]=e[n];return r}function prettify(e,t,r,n){return compress(e,t,r,n)}function compress(e,t,r,n){let o;const i={};for(let s=0;s<e.length;s++){const c=e[s],u=propName$1(c);if(void 0!==u&&u!==t.textNodeName){const e=stripAttributePrefix(c[":@"]||{},t.attributeNamePrefix);r.push(u,e)}if(u===t.textNodeName)void 0===o?o=c[u]:o+=""+c[u];else{if(void 0===u)continue;if(c[u]){let e=compress(c[u],t,r,n);const o=isLeafTag(e,t);if(0===Object.keys(e).length&&t.alwaysCreateTextNode&&(e[t.textNodeName]=""),c[":@"]?assignAttributes(e,c[":@"],n,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!==c[nn]&&"object"==typeof e&&null!==e&&(e[nn]=c[nn]),void 0!==i[u]&&Object.prototype.hasOwnProperty.call(i,u))Array.isArray(i[u])||(i[u]=[i[u]]),i[u].push(e);else{const r=t.jPath?n.toString():n;t.isArray(u,r,o)?i[u]=[e]:i[u]=e}void 0!==u&&u!==t.textNodeName&&r.pop()}}}return"string"==typeof o?o.length>0&&(i[t.textNodeName]=o):void 0!==o&&(i[t.textNodeName]=o),i}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],c=i.startsWith(n.attributeNamePrefix)?i.substring(n.attributeNamePrefix.length):i,u=n.jPath?r.toString()+"."+c:r;n.isArray(i,u,!0,!0)?e[i]=[t[i]]:e[i]=t[i]}}}function isLeafTag(e,t){const{textNodeName:r}=t,n=Object.keys(e).length;return 0===n||!(1!==n||!e[r]&&"boolean"!=typeof e[r]&&0!==e[r])}class XMLParser{constructor(e){this.externalEntities={},this.options=buildOptions(e)}parse(e,t){if("string"!=typeof e&&e.toString)e=e.toString();else if("string"!=typeof e)throw new Error("XML data is accepted in String or Bytes[] form.");if(t){!0===t&&(t={});const r=function validate(e,t){t=Object.assign({},wr,t);const r=[];let n=!1,o=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let i=0;i<e.length;i++)if("<"===e[i]&&"?"===e[i+1]){if(i+=2,i=readPI(e,i),i.err)return i}else{if("<"!==e[i]){if(isWhiteSpace(e[i]))continue;return getErrorObject("InvalidChar","char '"+e[i]+"' is not expected.",getLineNumberForPosition(e,i))}{let s=i;if(i++,"!"===e[i]){i=readCommentAndCDATA(e,i);continue}{let c=!1;"/"===e[i]&&(c=!0,i++);let u="";for(;i<e.length&&">"!==e[i]&&" "!==e[i]&&"\t"!==e[i]&&"\n"!==e[i]&&"\r"!==e[i];i++)u+=e[i];if(u=u.trim(),"/"===u[u.length-1]&&(u=u.substring(0,u.length-1),i--),!validateTagName(u)){let t;return t=0===u.trim().length?"Invalid space after '<'.":"Tag '"+u+"' is an invalid name.",getErrorObject("InvalidTag",t,getLineNumberForPosition(e,i))}const l=readAttributeStr(e,i);if(!1===l)return getErrorObject("InvalidAttr","Attributes for '"+u+"' have open quote.",getLineNumberForPosition(e,i));let p=l.value;if(i=l.index,"/"===p[p.length-1]){const r=i-p.length;p=p.substring(0,p.length-1);const o=validateAttributeString(p,t);if(!0!==o)return getErrorObject(o.err.code,o.err.msg,getLineNumberForPosition(e,r+o.err.line));n=!0}else if(c){if(!l.tagClosed)return getErrorObject("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",getLineNumberForPosition(e,i));if(p.trim().length>0)return getErrorObject("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",getLineNumberForPosition(e,s));if(0===r.length)return getErrorObject("InvalidTag","Closing tag '"+u+"' has not been opened.",getLineNumberForPosition(e,s));{const t=r.pop();if(u!==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 '"+u+"'.",getLineNumberForPosition(e,s))}0==r.length&&(o=!0)}}else{const c=validateAttributeString(p,t);if(!0!==c)return getErrorObject(c.err.code,c.err.msg,getLineNumberForPosition(e,i-p.length+c.err.line));if(!0===o)return getErrorObject("InvalidXml","Multiple possible root nodes found.",getLineNumberForPosition(e,i));-1!==t.unpairedTags.indexOf(u)||r.push({tagName:u,tagStartPos:s}),n=!0}for(i++;i<e.length;i++)if("<"===e[i]){if("!"===e[i+1]){i++,i=readCommentAndCDATA(e,i);continue}if("?"!==e[i+1])break;if(i=readPI(e,++i),i.err)return i}else if("&"===e[i]){const t=validateAmpersand(e,i);if(-1==t)return getErrorObject("InvalidChar","char '&' is not expected.",getLineNumberForPosition(e,i));i=t}else if(!0===o&&!isWhiteSpace(e[i]))return getErrorObject("InvalidXml","Extra text at the end",getLineNumberForPosition(e,i));"<"===e[i]&&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)}(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new OrderedObjParser(this.options,this.externalEntities),n=r.parseXml(e);return this.options.preserveOrder||void 0===n?n:prettify(n,this.options,r.matcher,r.readonlyMatcher)}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 '
'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}static getMetaDataSymbol(){return XmlNode.getMetaDataSymbol()}}function safeComment(e){return String(e).replace(/--/g,"- -").replace(/--/g,"- -").replace(/-$/,"- ")}function safeCdata(e){return String(e).replace(/\]\]>/g,"]]]]><![CDATA[>")}function escapeAttribute(e){return String(e).replace(/"/g,""").replace(/'/g,"'")}const on=":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�",sn=":A-Za-z_À-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",an=sn+"\\-\\.\\d·̀-ͯ҇‿-⁀",buildRegexes=(e,t,r="")=>{const n=`[${e.replace(":","")}][${t.replace(":","")}]*`;return{name:new RegExp(`^[${e}][${t}]*$`,r),ncName:new RegExp(`^${n}$`,r),qName:new RegExp(`^${n}(?::${n})?$`,r),nmToken:new RegExp(`^[${t}]+$`,r),nmTokens:new RegExp(`^[${t}]+(?:\\s+[${t}]+)*$`,r)}},cn=buildRegexes(on,on+"\\-\\.\\d·̀-ͯ‿-⁀"),un=buildRegexes(sn,an,"u"),qName=(e,{xmlVersion:t="1.0"}={})=>((e="1.0")=>"1.1"===e?un:cn)(t).qName.test(e);function resolveTagName$1(e,t,r,n,o){return r.sanitizeName?qName(e,{xmlVersion:o})?e:r.sanitizeName(e,{isAttribute:t,matcher:n.readOnly()}):e}function toXml(e,t){let r="";t.format&&(r="\n");const n=[];if(t.stopNodes&&Array.isArray(t.stopNodes))for(let e=0;e<t.stopNodes.length;e++){const r=t.stopNodes[e];"string"==typeof r?n.push(new Expression(r)):r instanceof Expression&&n.push(r)}const o=function detectXmlVersionFromArray(e,t){if(!Array.isArray(e)||0===e.length)return"1.0";const r=e[0];if("?xml"===propName(r)){const e=r[":@"];if(e){const r=t.attributeNamePrefix+"version";if(e[r])return e[r]}}return"1.0"}(e,t);return arrToStr(e,t,r,new Matcher,n,o)}function arrToStr(e,t,r,n,o,i){let s="",c=!1;if(t.maxNestedTags&&n.getDepth()>t.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(e)){if(null!=e){let r=e.toString();return r=replaceEntitiesValue(r,t),r}return""}for(let u=0;u<e.length;u++){const l=e[u],p=propName(l);if(void 0===p)continue;const d=p===t.textNodeName||p===t.cdataPropName||p===t.commentPropName||"?"===p[0]?p:resolveTagName$1(p,!1,t,n,i),h=extractAttributeValues(l[":@"],t);n.push(d,h);const f=checkStopNode(n,o);if(d===t.textNodeName){let e=l[p];f||(e=t.tagValueProcessor(d,e),e=replaceEntitiesValue(e,t)),c&&(s+=r),s+=e,c=!1,n.pop();continue}if(d===t.cdataPropName){c&&(s+=r);s+=`<![CDATA[${safeCdata(l[p][0][t.textNodeName])}]]>`,c=!1,n.pop();continue}if(d===t.commentPropName){s+=r+`\x3c!--${safeComment(l[p][0][t.textNodeName])}--\x3e`,c=!0,n.pop();continue}if("?"===d[0]){s+=("?xml"===d?"":r)+`<${d}${attr_to_str(l[":@"],t,f,n,i)}?>`,c=!0,n.pop();continue}let E=r;""!==E&&(E+=t.indentBy);const g=r+`<${d}${attr_to_str(l[":@"],t,f,n,i)}`;let m;m=f?getRawContent(l[p],t):arrToStr(l[p],t,E,n,o,i),-1!==t.unpairedTags.indexOf(d)?t.suppressUnpairedNode?s+=g+">":s+=g+"/>":m&&0!==m.length||!t.suppressEmptyNode?m&&m.endsWith(">")?s+=g+`>${m}${r}</${d}>`:(s+=g+">",m&&""!==r&&(m.includes("/>")||m.includes("</"))?s+=r+t.indentBy+m+r:s+=m,s+=`</${d}>`):s+=g+"/>",c=!0,n.pop()}return s}function extractAttributeValues(e,t){if(!e||t.ignoreAttributes)return null;const r={};let n=!1;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;r[o.startsWith(t.attributeNamePrefix)?o.substr(t.attributeNamePrefix.length):o]=escapeAttribute(e[o]),n=!0}return n?r:null}function getRawContent(e,t){if(!Array.isArray(e))return null!=e?e.toString():"";let r="";for(let n=0;n<e.length;n++){const o=e[n],i=propName(o);if(i===t.textNodeName)r+=o[i];else if(i===t.cdataPropName)r+=o[i][0][t.textNodeName];else if(i===t.commentPropName)r+=o[i][0][t.textNodeName];else{if(i&&"?"===i[0])continue;if(i){const e=attr_to_str_raw(o[":@"],t),n=getRawContent(o[i],t);n&&0!==n.length?r+=`<${i}${e}>${n}</${i}>`:r+=`<${i}${e}/>`}}}return r}function attr_to_str_raw(e,t){let r="";if(e&&!t.ignoreAttributes)for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let o=e[n];!0===o&&t.suppressBooleanAttributes?r+=` ${n.substr(t.attributeNamePrefix.length)}`:r+=` ${n.substr(t.attributeNamePrefix.length)}="${escapeAttribute(o)}"`}return r}function propName(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];if(Object.prototype.hasOwnProperty.call(e,n)&&":@"!==n)return n}}function attr_to_str(e,t,r,n,o){let i="";if(e&&!t.ignoreAttributes)for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;const c=s.substr(t.attributeNamePrefix.length),u=r?c:resolveTagName$1(c,!0,t,n,o);let l;r?l=e[s]:(l=t.attributeValueProcessor(s,e[s]),l=replaceEntitiesValue(l,t)),!0===l&&t.suppressBooleanAttributes?i+=` ${u}`:i+=` ${u}="${escapeAttribute(l)}"`}return i}function checkStopNode(e,t){if(!t||0===t.length)return!1;for(let r=0;r<t.length;r++)if(e.matches(t[r]))return!0;return!1}function replaceEntitiesValue(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 ln={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:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0,sanitizeName:!1};function Builder(e){if(this.options=Object.assign({},ln,e),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>"string"==typeof e&&e.startsWith("*.")?".."+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let e=0;e<this.options.stopNodes.length;e++){const t=this.options.stopNodes[e];"string"==typeof t?this.stopNodeExpressions.push(new Expression(t)):t instanceof Expression&&this.stopNodeExpressions.push(t)}!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=function getIgnoreAttributesFn(e){return"function"==typeof e?e:Array.isArray(e)?t=>{for(const r of e){if("string"==typeof r&&t===r)return!0;if(r instanceof RegExp&&r.test(t))return!0}}:()=>!1}(this.options.ignoreAttributes),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="")}function resolveTagName(e,t,r,n,o){return r.sanitizeName?qName(e,{xmlVersion:o})?e:r.sanitizeName(e,{isAttribute:t,matcher:n.readOnly()}):e}function processTextOrObjNode(e,t,r,n,o){const i=this.extractAttributes(e);n.push(t,i);if(this.checkStopNode(n)){const o=this.buildRawContent(e),i=this.buildAttributesForStopNode(e);return n.pop(),this.buildObjectNode(o,t,i,r)}const s=this.j2x(e,r+1,n,o);return n.pop(),"?"===t[0]?this.buildTextValNode("",t,s.attrStr,r,n):void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,s.attrStr,r,n):this.buildObjectNode(s.val,t,s.attrStr,r)}function indentate(e){return this.options.indentBy.repeat(e)}function isAttribute(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}Builder.prototype.build=function(e){if(this.options.preserveOrder)return toXml(e,this.options);{Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e});const t=new Matcher,r=function detectXmlVersionFromObj(e,t){const r=e["?xml"];if(r&&"object"==typeof r){if(t.attributesGroupName&&r[t.attributesGroupName]){const e=r[t.attributesGroupName][t.attributeNamePrefix+"version"];if(e)return e}const e=r[t.attributeNamePrefix+"version"];if(e)return e}return"1.0"}(e,this.options);return this.j2x(e,0,t,r).val}},Builder.prototype.j2x=function(e,t,r,n){let o="",i="";if(this.options.maxNestedTags&&r.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");const s=this.options.jPath?r.toString():r,c=this.checkStopNode(r);for(let u in e){if(!Object.prototype.hasOwnProperty.call(e,u))continue;const l=u===this.options.textNodeName||u===this.options.cdataPropName||u===this.options.commentPropName||this.options.attributesGroupName&&u===this.options.attributesGroupName||this.isAttribute(u)||"?"===u[0]?u:resolveTagName(u,!1,this.options,r,n);if(void 0===e[u])this.isAttribute(u)&&(i+="");else if(null===e[u])this.isAttribute(u)||l===this.options.cdataPropName||l===this.options.commentPropName?i+="":"?"===l[0]?i+=this.indentate(t)+"<"+l+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+l+"/"+this.tagEndChar;else if(e[u]instanceof Date)i+=this.buildTextValNode(e[u],l,"",t,r);else if("object"!=typeof e[u]){const p=this.isAttribute(u);if(p&&!this.ignoreAttributesFn(p,s)){const t=resolveTagName(p,!0,this.options,r,n);o+=this.buildAttrPairStr(t,""+e[u],c)}else if(!p)if(u===this.options.textNodeName){let t=this.options.tagValueProcessor(u,""+e[u]);i+=this.replaceEntitiesValue(t)}else{r.push(l);const n=this.checkStopNode(r);if(r.pop(),n){const r=""+e[u];i+=""===r?this.indentate(t)+"<"+l+this.closeTag(l)+this.tagEndChar:this.indentate(t)+"<"+l+">"+r+"</"+l+this.tagEndChar}else i+=this.buildTextValNode(e[u],l,"",t,r)}}else if(Array.isArray(e[u])){const o=e[u].length;let s="",c="";for(let p=0;p<o;p++){const o=e[u][p];if(void 0===o);else if(null===o)"?"===l[0]?i+=this.indentate(t)+"<"+l+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+l+"/"+this.tagEndChar;else if("object"==typeof o)if(this.options.oneListGroup){r.push(l);const e=this.j2x(o,t+1,r,n);r.pop(),s+=e.val,this.options.attributesGroupName&&o.hasOwnProperty(this.options.attributesGroupName)&&(c+=e.attrStr)}else s+=this.processTextOrObjNode(o,l,t,r,n);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(l,o);e=this.replaceEntitiesValue(e),s+=e}else{r.push(l);const e=this.checkStopNode(r);if(r.pop(),e){const e=""+o;s+=""===e?this.indentate(t)+"<"+l+this.closeTag(l)+this.tagEndChar:this.indentate(t)+"<"+l+">"+e+"</"+l+this.tagEndChar}else s+=this.buildTextValNode(o,l,"",t,r)}}this.options.oneListGroup&&(s=this.buildObjectNode(s,l,c,t)),i+=s}else if(this.options.attributesGroupName&&u===this.options.attributesGroupName){const t=Object.keys(e[u]),i=t.length;for(let s=0;s<i;s++){const i=resolveTagName(t[s],!0,this.options,r,n);o+=this.buildAttrPairStr(i,""+e[u][t[s]],c)}}else i+=this.processTextOrObjNode(e[u],l,t,r,n)}return{attrStr:o,val:i}},Builder.prototype.buildAttrPairStr=function(e,t,r){return r||(t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t)),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+escapeAttribute(t)+'"'},Builder.prototype.extractAttributes=function(e){if(!e||"object"!=typeof e)return null;const t={};let r=!1;if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){const n=e[this.options.attributesGroupName];for(let e in n){if(!Object.prototype.hasOwnProperty.call(n,e))continue;t[e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e]=escapeAttribute(n[e]),r=!0}}else for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;const o=this.isAttribute(n);o&&(t[o]=escapeAttribute(e[n]),r=!0)}return r?t:null},Builder.prototype.buildRawContent=function(e){if("string"==typeof e)return e;if("object"!=typeof e||null===e)return String(e);if(void 0!==e[this.options.textNodeName])return e[this.options.textNodeName];let t="";for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if(this.isAttribute(r))continue;if(this.options.attributesGroupName&&r===this.options.attributesGroupName)continue;const n=e[r];if(r===this.options.textNodeName)t+=n;else if(Array.isArray(n)){for(let e of n)if("string"==typeof e||"number"==typeof e)t+=`<${r}>${e}</${r}>`;else if("object"==typeof e&&null!==e){const n=this.buildRawContent(e),o=this.buildAttributesForStopNode(e);t+=""===n?`<${r}${o}/>`:`<${r}${o}>${n}</${r}>`}}else if("object"==typeof n&&null!==n){const e=this.buildRawContent(n),o=this.buildAttributesForStopNode(n);t+=""===e?`<${r}${o}/>`:`<${r}${o}>${e}</${r}>`}else t+=`<${r}>${n}</${r}>`}return t},Builder.prototype.buildAttributesForStopNode=function(e){if(!e||"object"!=typeof e)return"";let t="";if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){const r=e[this.options.attributesGroupName];for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;const n=e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e,o=r[e];!0===o&&this.options.suppressBooleanAttributes?t+=" "+n:t+=" "+n+'="'+o+'"'}}else for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;const n=this.isAttribute(r);if(n){const o=e[r];!0===o&&this.options.suppressBooleanAttributes?t+=" "+n:t+=" "+n+'="'+o+'"'}}return t},Builder.prototype.buildObjectNode=function(e,t,r,n){if(""===e)return"?"===t[0]?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar;if("?"===t[0])return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{let o="</"+t+this.tagEndChar,i="";return"?"===t[0]&&(i="?",o=""),!r&&""!==r||-1!==e.indexOf("<")?!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:this.indentate(n)+"<"+t+r+i+">"+e+o}},Builder.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},Builder.prototype.checkStopNode=function(e){if(!this.stopNodeExpressions||0===this.stopNodeExpressions.length)return!1;for(let t=0;t<this.stopNodeExpressions.length;t++)if(e.matches(this.stopNodeExpressions[t]))return!0;return!1},Builder.prototype.buildTextValNode=function(e,t,r,n,o){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName){const t=safeCdata(e);return this.indentate(n)+`<![CDATA[${t}]]>`+this.newLine}if(!1!==this.options.commentPropName&&t===this.options.commentPropName){const t=safeComment(e);return this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine}if("?"===t[0])return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(t,e);return o=this.replaceEntitiesValue(o),""===o?this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+o+"</"+t+this.tagEndChar}},Builder.prototype.replaceEntitiesValue=function(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};const pn=He("ebay:error"),dn=Symbol("raw-error");class EBayError extends Error{constructor(e,t="",r={}){super(e),this.name=this.constructor.name,this.description=t,this.meta=r,Object.setPrototypeOf(this,new.target.prototype)}}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.`)}}class EbayApiError extends EBayError{constructor(e,t,r,n,o){super(e,t,r),this.errorCode=n,this.firstError=o}}class EBayApiError extends EbayApiError{}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 EBayAuthTokenIsInvalid extends EBayApiError{}EBayAuthTokenIsInvalid.code=931;class EBayAuthTokenIsHardExpired extends EBayApiError{}EBayAuthTokenIsHardExpired.code=932;class EBayIAFTokenInvalid extends EBayApiError{}EBayIAFTokenInvalid.code=21916984;class EBayTokenRequired extends EBayApiError{}EBayTokenRequired.code=930;class EBayInvalidScope extends EBayApiError{}const getErrorMessage=e=>"message"in e?e.message:"Errors"in e?Array.isArray(e.Errors)?e.Errors[0].ShortMessage:e.Errors.ShortMessage:"eBay API request error",getErrorDescription=(e,t)=>"description"in e?e.description:"Errors"in e?Array.isArray(e.Errors)?e.Errors[0].LongMessage:e.Errors.LongMessage:"longMessage"in e?e.longMessage:(200!==t?.status?t?.statusText:"")||"",getErrorCode=e=>"errorId"in e?e.errorId:"Errors"in e?Array.isArray(e.Errors)?e.Errors[0].ErrorCode:e.Errors.ErrorCode:void 0,extractEBayError=(e,t)=>{const r=function getEBayError(e){return e?"string"==typeof e?{message:e}:"Errors"in e?e:"error"in e&&"string"==typeof e.error?{message:e.error,description:"error_description"in e&&e.error_description||""}:"errors"in e&&Array.isArray(e.errors)?e.errors[0]:"error"in e&&Array.isArray(e.error)?e.error[0]:"errorMessage"in e?Array.isArray(e.errorMessage?.error)?e.errorMessage.error[0]:e.errorMessage.error:{message:"Unknown eBay API Error",description:'This error response is not known. You should investigate the "meta.res.data" for more information.'}:{message:"eBay API Error",description:"No data is set in response result."}}(t||e.response?.data),n={...r,[dn]:e},o="Errors"in r?Array.isArray(r.Errors)?r.Errors[0]:r.Errors:r;return e?.response&&(n.res={status:e.response.status,statusText:e.response.statusText,headers:e.response.headers,data:e.response.data??{}}),e?.config&&(n.req={url:e.config.url,method:e.config.method,headers:e.config.headers,params:e.config.params}),{message:getErrorMessage(r),description:getErrorDescription(r,e?.response),errorCode:getErrorCode(r),meta:n,firstError:o}},handleEBayError=e=>{if(pn("handleEBayError",e),e instanceof EBayError||!e.response)throw e;if("object"!=typeof e)throw new EBayError(e);const{message:t,meta:r,description:n,errorCode:o,firstError:i}=extractEBayError(e);if("domain"in r&&"ACCESS"===r.domain)throw new EBayAccessDenied(t,n,r,o,i);if("message"in r&&"invalid_grant"===r.message)throw new EBayInvalidGrant(t,n,r,o,i);if("message"in r&&"invalid_scope"===r.message)throw new EBayInvalidScope(t,n,r,o,i);if("message"in r&&"Invalid access token"===r.message)throw new EBayInvalidAccessToken(t,n,r,o,i);if(o===EBayNotFound.code)throw new EBayNotFound(t,n,r,o,i);throw new EBayApiError(t,n,r,o,i)},checkEBayTraditionalResponse=(e,t)=>{if(!t)return void pn("checkEBayTraditionalResponse: No data found in response.");if(!("Errors"in t)&&!("errorMessage"in t))return;if("Errors"in t&&"Failure"!==t.Ack)return void pn(`checkEBayTraditionalResponse: eBay API returned ${t.Ack}`);const{message:r,meta:n,description:o,errorCode:i,firstError:s}=extractEBayError(e,t);if(void 0===i)throw new EBayApiError(r,o,n,i,s);switch(i){case EBayIAFTokenExpired.code:throw new EBayIAFTokenExpired(r,o,n,i,s);case EBayIAFTokenInvalid.code:case 1.32:throw new EBayIAFTokenInvalid(r,o,n,i,s);case EBayTokenRequired.code:throw new EBayTokenRequired(r,o,n,i,s);case EBayAuthTokenIsHardExpired.code:throw new EBayAuthTokenIsHardExpired(r,o,n,i,s);case EBayAuthTokenIsInvalid.code:throw new EBayAuthTokenIsInvalid(r,o,n,i,s)}throw new EBayApiError(r,o,n,i,s)};var hn=Object.freeze({__proto__:null,ApiEnvError:ApiEnvError,EBayAccessDenied:EBayAccessDenied,EBayApiError:EBayApiError,EBayAuthTokenIsHardExpired:EBayAuthTokenIsHardExpired,EBayAuthTokenIsInvalid:EBayAuthTokenIsInvalid,EBayError:EBayError,EBayIAFTokenExpired:EBayIAFTokenExpired,EBayIAFTokenInvalid:EBayIAFTokenInvalid,EBayInvalidAccessToken:EBayInvalidAccessToken,EBayInvalidGrant:EBayInvalidGrant,EBayInvalidScope:EBayInvalidScope,EBayNoCallError:EBayNoCallError,EBayNotFound:EBayNotFound,EBayTokenRequired:EBayTokenRequired,EbayApiError:EbayApiError,checkEBayTraditionalResponse:checkEBayTraditionalResponse,extractEBayError:extractEBayError,handleEBayError:handleEBayError,rawError:dn});const fn=He("ebay:xml:request"),En={attributeNamePrefix:"@_",textNodeName:"#value",ignoreAttributes:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,cdataPropName:"__cdata"},gn={raw:!1,parseOptions:{attributeNamePrefix:"",textNodeName:"value",ignoreAttributes:!1,parseAttributeValue:!0,parseTagValue:!0,numberParseOptions:{hex:!1,leadingZeros:!1},removeNSPrefix:!0,processEntities:{enabled:!0,maxEntitySize:1e4,maxTotalExpansions:1e4,maxExpandedLength:1e5,maxEntityCount:100},isArray:(e,t)=>"string"==typeof t&&/Array$/.test(t.slice(0,-e.length-1))},xmlBuilderOptions:En,useIaf:!0,sign:!1,headers:{},returnResponse:!1},mn={"Content-Type":"text/xml"};class XMLRequest{constructor(e,t,r,n){if(!e)throw new EBayNoCallError;this.config={...gn,...r},this.j2x=new Builder({...En,...this.config.xmlBuilderOptions}),this.callName=e,this.fields=t||{},this.req=n}getResponseWrapper(){return`${this.callName}Response`}getCredentials(){return this.config.eBayAuthToken?{RequesterCredentials:{eBayAuthToken:this.config.eBayAuthToken}}:{}}getHeaders(){return{...mn,...this.config.headers}}toJSON(e){return fn("parseOption",this.config.parseOptions),new XMLParser(this.config.parseOptions).parse(e)}toXML(e){return'<?xml version="1.0" encoding="utf-8"?>'+this.j2x.build({[this.callName+"Request"]:{"@_xmlns":this.config.xmlns,...this.getCredentials(),...e}})}async request(){const e=this.toXML(this.fields);fn("xml",e);try{const{body:t,headers:r={}}=this.config.hook?.(e)??{body:e},n={headers:{...this.getHeaders(),...this.config.digitalSignatureHeaders?this.config.digitalSignatureHeaders(t):{},...r||{}}};fn("config",n);const o=await this.req.post(this.config.endpoint,t,n);if(fn("response",o),this.config.returnResponse)return o;const{data:i}=o;if(this.config.raw)return i;const s=this.xml2JSON(i);return checkEBayTraditionalResponse(o,s),s}catch(e){if(fn("error",e),e.response?.data){const t=this.toJSON(e.response.data);checkEBayTraditionalResponse(e,t[this.callName+"Response"])}throw e}}xml2JSON(e){const t=this.toJSON(e);return t[this.getResponseWrapper()]??t}}const _n=He("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 _n("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 _n("Fetch auth token failed",e),e}}async obtainToken(e){const t=await this.mintToken(e);return _n("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 yn=He("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)}get identityEndpoint(){return this.config.sandbox?OAuth2.IDENTITY_ENDPOINT.sandbox:OAuth2.IDENTITY_ENDPOINT.production}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("")}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 getAccessToken(){return this.getUserAccessToken()||this.getApplicationAccessToken()}getUserAccessToken(){return this._authToken?.access_token??null}async getApplicationAccessToken(){if(this._clientToken)return yn("Return existing application access token: ",this._clientToken),this._clientToken.access_token;try{return(await this.obtainApplicationAccessToken()).access_token}catch(e){throw e}}getScope(){return[...this.scope]}setClientToken(e){this._clientToken=e}setScope(e){this.scope=e}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 yn("Failed to mint application token",e),e}}async obtainApplicationAccessToken(){yn("Obtain a new application access token with scope: ",this.scope.join(","));try{const e=await this.mintApplicationAccessToken();return yn("Obtained a new application access token:",e),this.setClientToken(e),this.emitter.emit("refreshClientToken",e),e}catch(e){throw yn("Failed to obtain application token",e),e}}async mintUserAccessToken(e,t=this.config.ruName){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{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 yn("User Access Token",r),r}catch(e){throw yn("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 yn("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;yn("Successfully refreshed token",e);const t={...this._authToken,...e};return this.setCredentials(t),this.emitter.emit("refreshAuthToken",t),t}catch(e){throw yn("Failed to refresh the token",e),e}}async obtainToken(e){const t=await this.getToken(e);return yn("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()}}}const An="-----BEGIN PRIVATE KEY-----",getUnixTimestamp=()=>Math.floor(Date.now()/1e3),getSignatureParams=e=>[...e?["content-digest"]:[],"x-ebay-signature-key","@method","@path","@authority"],getSignatureParamsValue=e=>getSignatureParams(e).map(e=>`"${e}"`).join(" "),generateContentDigestValue=(e,t="sha256")=>{const r=Buffer.from("string"==typeof e?e:JSON.stringify(e));return`${"sha512"===t?"sha-512":"sha-256"}=:${function createHash(){throw Error("crypto.createHash is not supported in browser.")}().update(r).digest("base64")}:`};const generateSignatureInput=(e,t=getUnixTimestamp())=>`sig1=(${getSignatureParamsValue(e)});created=${t}`;function generateSignature(e,t,r,n,o=getUnixTimestamp()){const i=function generateBaseString(e,t,r,n=getUnixTimestamp()){try{let o="";return getSignatureParams(r).forEach(r=>{if(o+=`"${r.toLowerCase()}": `,r.startsWith("@"))switch(r.toLowerCase()){case"@method":o+=t.method;break;case"@authority":o+=t.authority;break;case"@path":o+=t.path;break;default:throw new Error("Unknown pseudo header "+r)}else{if(!e[r])throw new Error("Header "+r+" not included in message");o+=e[r]}o+="\n"}),o+=`"@signature-params": (${getSignatureParamsValue(r)});created=${n}`,o}catch(e){throw new EBayError(`Error calculating signature base: ${e.message}`)}}(e,r,n,o);(t=t.trim()).startsWith(An)||(t=An+"\n"+t+"\n-----END PRIVATE KEY-----");return`sig1=:${function sign(){throw Error("crypto.sign is not supported in browser.")}(Buffer.from(i)).toString("base64")}:`}class Api extends Base{constructor(e,t,r){super(e,t),this.auth=r||new Auth(this.config,this.req)}getDigitalSignatureHeaders(e,t){if(!this.config.signature)return{};const r=getUnixTimestamp(),n={"x-ebay-enforce-signature":!0,"x-ebay-signature-key":this.config.signature.jwe,...t?{"content-digest":generateContentDigestValue(t,this.config.signature.cipher??"sha256")}:{},"signature-input":generateSignatureInput(t,r)};return{...n,signature:generateSignature(n,this.config.signature.privateKey,e,t,r)}}}const Rn={"Content-Type":"application/json","Cache-Control":"no-cache",..."undefined"==typeof window?{"Accept-Encoding":"application/gzip"}:{}},In={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,sign:!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"})}get sign(){return this.api({sign:!0})}async get(e,t={},r){return this.doRequest({method:"get",path:e,config:t},r)}async delete(e,t={},r){return this.doRequest({method:"delete",path:e,config:t},r)}async post(e,t,r={},n){return this.doRequest({method:"post",path:e,data:t,config:r},n)}async put(e,t,r={},n){return this.doRequest({method:"put",path:e,data:t,config:r},n)}get additionalHeaders(){return Object.keys(In).filter(e=>void 0!==this.config[e]).reduce((e,t)=>(e[In[t]]=this.config[t],e),{})}async enrichRequestConfig(e,t=null,r=this.apiConfig){const n=await this.auth.getHeaderAuthorization(r.useIaf),o=r.sign?this.getDigitalSignatureHeaders({method:e.method.toUpperCase(),authority:Restful.buildServerUrl("",r.subdomain,r.sandbox,r.tld),path:r.apiVersion+r.basePath+e.path},t):{},i={...Rn,...this.additionalHeaders,...n,...r.headers,...o};return{...e.config,headers:{...e.config.headers||{},...i}}}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||(403===e?.meta?.res?.status&&"/sell/inventory/v1"===this.apiConfig.basePath||401===e?.meta?.res?.status&&"/post-order/v2"===this.apiConfig.basePath))}async request(e,t=this.apiConfig,r=!1){const{path:n,method:o,data:i}=e,s={...this.apiConfig,...t},c=this.getServerUrl(s)+n;try{r&&await this.auth.OAuth2.refreshToken();const t=await this.enrichRequestConfig(e,i,s),n=["get","delete"].includes(o)?[t]:[i,t],u=await this.req[o](c,...n);return this.apiConfig.returnResponse?u:u.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(e){return this.get("/item/",{params:e})}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 Tn=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}})}};Tn.id="Feed";let Sn=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})}};Sn.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})}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 Media extends Restful{get basePath(){return"/commerce/media/v1_beta"}get subdomain(){return"apim"}async createVideo(e){return this.post("/video",e)}async getVideo(e){return e=encodeURIComponent(e),this.get(`/video/${e}`)}async uploadVideo(e,t){return e=encodeURIComponent(e),this.post(`/video/${e}/upload`,t)}}Media.id="Media";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,n){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_compatibility_property_values`,{params:{category_id:t,compatibility_property:r,...n?.trim()&&{filter:n}}})}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";class Message extends Restful{get basePath(){return"/commerce/message/v1"}getConversations({limit:e,offset:t,conversationStatus:r,conversationType:n,referenceId:o,referenceType:i,startTime:s,endTime:c,otherPartyUsername:u}={}){return this.get("/conversation",{params:{limit:e,offset:t,conversation_status:r,conversation_type:n,reference_id:o,reference_type:i,start_time:s,end_time:c,other_party_username:u}})}getConversation(e,{conversationType:t,limit:r,offset:n}){return this.get(`/conversation/${e}`,{params:{conversation_type:t,limit:r,offset:n}})}updateConversation(e){return this.post("/update_conversation",e)}bulkUpdateConversation(e){return this.post("/bulk_update_conversation",e)}sendMessage(e){return this.post("/send_message",e)}}Message.id="Message";let Nn=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}})}};Nn.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",{signingKeyCipher: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: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 AccountV1 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`)}}AccountV1.id="AccountV1";class AccountV2 extends Restful{get basePath(){return"/sell/account/v2"}getRateTable(e){return e=encodeURIComponent(e),this.get(`/rate_table/${e}`)}updateShippingCost(e,t){return e=encodeURIComponent(e),this.post(`/rate_table/${e}/update_shipping_cost`,t)}getPayoutSettings(){return this.get("/payout_settings")}updatePayoutPercentage(e){return this.post("/payout_settings/update_percentage",e)}}AccountV2.id="AccountV2";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:{...Pr}})}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)}getSkuLocationMapping(e,t){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.get(`/listing/${e}/sku/${t}/locations`)}createOrReplaceSkuLocationMapping(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.put(`/listing/${e}/sku/${t}/locations`,r)}deleteSkuLocationMapping(e,t){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.delete(`/listing/${e}/sku/${t}/locations`)}}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)}bulkUpdateAdsStatus(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_status`,t)}bulkUpdateAdsStatusByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_status_by_listing_id`,t)}launchCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/launch`)}setupQuickCampaign(e){return this.post("/ad_campaign/setup_quick_campaign",e)}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)}getAdGroups(e,{adGroupStatus:t,limit:r,offset:n}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/ad_group`,{params:{ad_group_status:t,limit:r,offset:n}})}createAdGroup(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad_group`,t)}getAdGroup(e,t){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/ad_group/${t}`)}updateAdGroup(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.put(`/ad_campaign/${e}/ad_group/${t}`,r)}suggestBids(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad_group/${t}/suggest_bids`,r)}suggestKeywords(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad_group/${t}/suggest_keywords`,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`)}suggestItems(e,{categoryIds:t,limit:r,offset:n}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/suggest_items`,{params:{category_ids:t,limit:r,offset:n}})}updateAdRateStrategy(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/update_ad_rate_strategy`,t)}updateCampaignBudget(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/update_campaign_budget`,t)}updateCampaignIdentification(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/update_campaign_identification`,t)}bulkCreateKeyword(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_create_keyword`,t)}bulkUpdateKeyword(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_keyword`,t)}getKeywords(e,{adGroupIds:t,keywordStatus:r,limit:n,offset:o}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/keyword`,{params:{ad_group_ids:t,keyword_status:r,limit:n,offset:o}})}createKeyword(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/keyword`,t)}getKeyword(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/ad_campaign/${e}/keyword/${t}`)}updateKeyword(e,t,r){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.put(`/ad_campaign/${e}/keyword/${t}`,r)}bulkCreateNegativeKeyword(e){return this.post("/bulk_create_negative_keyword",e)}bulkUpdateNegativeKeyword(e){return this.post("/bulk_update_negative_keyword",e)}getNegativeKeywords({adGroupIds:e,campaignIds:t,limit:r,negativeKeywordStatus:n,offset:o}={}){return this.get("/negative_keyword",{params:{ad_group_ids:e,campaign_ids:t,limit:r,negative_keyword_status:n,offset:o}})}createNegativeKeyword(e){return this.post("/negative_keyword",e)}getNegativeKeyword(e){return e=encodeURIComponent(e),this.get(`/negative_keyword/${e}`)}updateNegativeKeyword(e,t){return e=encodeURIComponent(e),this.put(`/negative_keyword/${e}`,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}})}getEmailCampaign(e){return e=encodeURIComponent(e),this.get(`/email_campaign/${e}`)}getEmailCampaigns({limit:e,q:t,offset:r,sort:n}={}){return this.get("/email_campaign",{params:{limit:e,offset:r,q:t,sort:n}})}createEmailCampaign(e){return this.post("/email_campaign",e)}updateEmailCampaign(e,t){return e=encodeURIComponent(e),this.put(`/email_campaign/${e}`,t)}deleteEmailCampaign(e){return e=encodeURIComponent(e),this.delete(`/email_campaign/${e}`)}getEmailPreview(e){return e=encodeURIComponent(e),this.get(`/email_campaign/${e}/email_preview`)}getAudiences(){return this.get("/email_campaign/audience")}getEmailReport(e,t){return this.get("/email_campaign/report",{params:{startDate:e,endDate:t}})}}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}})}getExtendedProducerResponsibilityPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_extended_producer_responsibility_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}})}getHazardousMaterialsLabels(e){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_hazardous_materials_labels`)}}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`,{responseType:"arraybuffer",responseEncoding:"binary"})}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`,{responseType:"arraybuffer",responseEncoding:"binary"})}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:Pr})}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 Cn,bn;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"}(Cn||(Cn={})),function(e){e[e.GetPublicAlerts=0]="GetPublicAlerts",e[e.GetUserAlerts=1]="GetUserAlerts",e[e.Login=2]="Login",e[e.Logout=3]="Logout"}(bn||(bn={}));var On,Pn=bn;!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"}(On||(On={}));var Dn,Un=On;!function(e){e[e.getMostWatchedItems=0]="getMostWatchedItems",e[e.getRelatedCategoryItems=1]="getRelatedCategoryItems",e[e.getSimilarItems=2]="getSimilarItems",e[e.getVersion=3]="getVersion"}(Dn||(Dn={}));var Ln,vn=Dn;!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"}(Ln||(Ln={}));var Mn,wn=Ln;!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"}(Mn||(Mn={}));var Bn,xn,Fn,kn,Gn,Yn,$n,jn,Hn,Vn,qn,Kn,Wn,Xn,zn,Jn,Qn,Zn,eo,to,ro,no,oo,io,so,ao,co,uo,lo,po,ho,fo,Eo,go,mo,_o,yo,Ao,Ro,Io,To,So,No,Co,bo,Oo=Mn;class Traditional extends Api{constructor(){super(...arguments),this.createXMLRequest=(e,t)=>async(r,n)=>{const o={...gn,...n,parseOptions:{...gn.parseOptions,...this.config.parseOptions,...n?.parseOptions,processEntities:{...gn.parseOptions.processEntities,...this.config.parseOptions?.processEntities,...n?.parseOptions?.processEntities}}};try{return await this.request(o,t,e,r)}catch(n){if(this.shouldRefreshToken(n))return await this.request(o,t,e,r,!0);throw n}}}createTradingApi(){if("number"!=typeof this.config.siteId)throw new Error("siteId is required for trading API.");return this.createTraditionalXMLApi({endpoint:{production:"api.ebay.com",sandbox:"api.sandbox.ebay.com"},path:"/ws/api.dll",calls:Oo,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:"open.api.ebay.com",sandbox:"open.api.sandbox.ebay.com"},path:"/shopping",xmlns:"urn:ebay:apis:eBLBaseComponents",calls:wn,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:"svcs.ebay.com",sandbox:"svcs.sandbox.ebay.com"},path:"/services/search/FindingService/v1",xmlns:"http://www.ebay.com/marketplace/search/v1/services",calls:Un,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:"clientalerts.ebay.com",sandbox:"clientalerts.sandbox.ebay.com"},calls:Pn},t=e.endpoint[this.config.sandbox?"sandbox":"production"],paramsSerializer=e=>Cr.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:"svcs.ebay.com",sandbox:"svcs.sandbox.ebay.com"},path:"/MerchandisingService",xmlns:"http://www.ebay.com/marketplace/services",calls:vn,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.")}shouldRefreshToken(e){return!!this.config.autoRefreshToken&&(e.name===EBayIAFTokenExpired.name||e.name===EBayIAFTokenInvalid.name||e.name===EBayAuthTokenIsHardExpired.name||e.name===EBayAuthTokenIsInvalid.name)}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,s=this.config.sandbox?e.endpoint.sandbox:e.endpoint.production;return{...r,xmlns:e.xmlns,endpoint:`https://${s}${e.path}`,headers:{...e.headers(t,i?o:null),...r.headers},digitalSignatureHeaders:t=>r.sign?this.getDigitalSignatureHeaders({method:"POST",authority:s,path:e.path},t):{},...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(Tn),marketing:this.createRestfulApi(Sn),offer:this.createRestfulApi(Offer),order:this.createRestfulApi(Order),deal:this.createRestfulApi(Deal),marketplaceInsights:this.createRestfulApi(MarketplaceInsights)}}createCommerceApi(){return{catalog:this.createRestfulApi(Catalog),charity:this.createRestfulApi(Charity),identity:this.createRestfulApi(Identity),notification:this.createRestfulApi(Notification),media:this.createRestfulApi(Media),translation:this.createRestfulApi(Translation),taxonomy:this.createRestfulApi(Taxonomy),message:this.createRestfulApi(Message)}}createDeveloperApi(){return{analytics:this.createRestfulApi(Nn),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(AccountV1),accountV2:this.createRestfulApi(AccountV2),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"}(Bn||(Bn={})),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"}(xn||(xn={})),function(e){e.BUYER="BUYER",e.SELLER="SELLER"}(Fn||(Fn={})),function(e){e.DEFAULT="DEFAULT",e.SUMMARY="SUMMARY"}(kn||(kn={})),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"}(Gn||(Gn={})),function(e){e.DEFAULT="DEFAULT",e.SUMMARY="SUMMARY"}(Yn||(Yn={})),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"}($n||($n={})),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"}(jn||(jn={})),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"}(Hn||(Hn={})),function(e){e.CREATE="CREATE",e.REQUEST="REQUEST",e.UNKNOWN="UNKNOWN"}(Vn||(Vn={})),function(e){e.EXCHANGE="EXCHANGE",e.MONEY_BACK="MONEY_BACK",e.REPLACEMENT="REPLACEMENT",e.UNKNOWN="UNKNOWN"}(qn||(qn={})),function(e){e.FULL="FULL",e.NONE="NONE",e.SUMMARY="SUMMARY"}(Kn||(Kn={})),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"}(Wn||(Wn={})),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"}(Xn||(Xn={})),function(e){e.MOTORS_VEHICLES="MOTORS_VEHICLES",e.ALL_EXCLUDING_MOTORS_VEHICLES="ALL_EXCLUDING_MOTORS_VEHICLES"}(zn||(zn={})),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"}(Jn||(Jn={})),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"}(Qn||(Qn={})),function(e){e.ITEM_RELATED="ITEM_RELATED",e.LABEL_RELATED="LABEL_RELATED",e.REFUND_RELATED="REFUND_RELATED",e.UNKNOWN="UNKNOWN"}(Zn||(Zn={})),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"}(eo||(eo={})),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"}(to||(to={})),function(e){e.STORE="STORE",e.WAREHOUSE="WAREHOUSE"}(ro||(ro={})),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"}(no||(no={})),function(e){e.DOMESTIC="DOMESTIC",e.INTERNATIONAL="INTERNATIONAL"}(oo||(oo={})),function(e){e.CALCULATED="CALCULATED",e.FLAT_RATE="FLAT_RATE",e.NOT_SPECIFIED="NOT_SPECIFIED"}(io||(io={})),function(e){e.EBAY_PAYMENTS="EBAY_PAYMENTS"}(so||(so={})),function(e){e.OPTED_IN="OPTED_IN",e.NOT_OPTED_IN="NOT_OPTED_IN"}(ao||(ao={})),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"}(co||(co={})),function(e){e.PAYPAL_EMAIL="PAYPAL_EMAIL"}(uo||(uo={})),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"}(lo||(lo={})),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"}(po||(po={})),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"}(ho||(ho={})),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"}(fo||(fo={})),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"}(Eo||(Eo={})),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"}(go||(go={})),function(e){e.AUCTION="AUCTION",e.FIXED_PRICE="FIXED_PRICE"}(mo||(mo={})),function(e){e.CLICK_THROUGH_RATE="CLICK_THROUGH_RATE",e.LISTING_IMPRESSION_SEARCH_RESULTS_PAGE="LISTING_IMPRESSION_SEARCH_RESULTS_PAGE",e.LISTING_IMPRESSION_STORE="CLICK_THROUGH_RATE",e.LISTING_IMPRESSION_TOTAL="LISTING_IMPRESSION_TOTAL",e.LISTING_VIEWS_SOURCE_DIRECT="LISTING_VIEWS_SOURCE_DIRECT",e.LISTING_VIEWS_SOURCE_OFF_EBAY="LISTING_VIEWS_SOURCE_OFF_EBAY",e.LISTING_VIEWS_SOURCE_OTHER_EBAY="LISTING_VIEWS_SOURCE_OTHER_EBAY",e.LISTING_VIEWS_SOURCE_SEARCH_RESULTS_PAGE="LISTING_VIEWS_SOURCE_SEARCH_RESULTS_PAGE",e.LISTING_VIEWS_SOURCE_STORE="LISTING_VIEWS_SOURCE_STORE",e.LISTING_VIEWS_TOTAL="LISTING_VIEWS_TOTAL",e.SALES_CONVERSION_RATE="SALES_CONVERSION_RATE",e.TOTAL_IMPRESSION_TOTAL="TOTAL_IMPRESSION_TOTAL",e.TRANSACTION="TRANSACTION"}(_o||(_o={})),function(e){e.MERCHANDISE_CREDIT="MERCHANDISE_CREDIT",e.MONEY_BACK="MONEY_BACK"}(yo||(yo={})),function(e){e.EXCHANGE="EXCHANGE",e.REPLACEMENT="REPLACEMENT"}(Ao||(Ao={})),function(e){e.BUYER="BUYER",e.SELLER="SELLER"}(Ro||(Ro={})),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"}(Io||(Io={})),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"}(To||(To={})),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"}(So||(So={})),function(e){e.INCH="INCH",e.FEET="FEET",e.CENTIMETER="CENTIMETER",e.METER="METER"}(No||(No={})),function(e){e.POUND="POUND",e.KILOGRAM="KILOGRAM",e.OUNCE="OUNCE",e.GRAM="GRAM"}(Co||(Co={})),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"}(bo||(bo={}));var Po=Object.freeze({__proto__:null,get ActivityOption(){return to},get CancelReason(){return So},get CaseSearchFieldGroup(){return Yn},get CaseStatusFilter(){return Gn},get CategoryType(){return zn},get Condition(){return fo},get ContentLanguage(){return ho},get CountryCode(){return lo},get CurrencyCode(){return po},get Decision(){return Xn},get EscalateReason(){return Wn},get FilePurpose(){return Zn},get FormatType(){return mo},get GetReturnFieldGroupEnum(){return Kn},get InquirySearchFieldGroup(){return kn},get InquiryStatusFilter(){return $n},get LengthUnitOfMeasure(){return No},get Locale(){return ho},get LocaleEnum(){return Eo},get Marketplace(){return go},get MarketplaceId(){return xn},get Metric(){return _o},get PackageType(){return bo},get PaymentMethodType(){return co},get PaymentsProgramStatus(){return ao},get PaymentsProgramType(){return so},get ReasonForRefund(){return To},get RecipientAccountReferenceType(){return uo},get RefundFeeType(){return eo},get RefundMethod(){return yo},get RegionType(){return Io},get RequestType(){return Vn},get ReturnCountFilter(){return Jn},get ReturnMethod(){return Ao},get ReturnReason(){return Hn},get ReturnShippingCostPayer(){return Ro},get ReturnState(){return Qn},get ReturnType(){return qn},get ShippingCarrier(){return jn},get ShippingCostType(){return io},get ShippingOptionType(){return oo},get SiteId(){return Bn},get StoreType(){return ro},get TimeDurationUnit(){return no},get UserRoleFilter(){return Fn},get WeightUnitOfMeasure(){return Co}}),Do=Object.freeze({__proto__:null});const Uo={sandbox:!1,autoRefreshToken:!0,siteId:Bn.EBAY_US,marketplaceId:xn.EBAY_US,acceptLanguage:ho.en_US,contentLanguage:ho.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");let t=null;return process.env.EBAY_JWE&&process.env.EBAY_PRIVATE_KEY&&(t={jwe:process.env.EBAY_JWE,privateKey:process.env.EBAY_PRIVATE_KEY}),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):Bn.EBAY_US,marketplaceId:process.env.EBAY_MARKETPLACE_ID&&process.env.EBAY_MARKETPLACE_ID in xn?xn[process.env.EBAY_MARKETPLACE_ID]:xn.EBAY_US,ruName:process.env.EBAY_RU_NAME,sandbox:"true"===process.env.EBAY_SANDBOX,signature:t},e)}constructor(e,t){super({...Uo,...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())}setSignature(e){this.config.signature=e}}eBayApi.SiteId=Bn,eBayApi.MarketplaceId=xn,eBayApi.ContentLanguage=ho,eBayApi.Locale=ho;export{ho as ContentLanguage,ho as Locale,xn as MarketplaceId,Bn as SiteId,eBayApi as default,eBayApi,Po as enums,hn as errors,Do as types};
|