UNPKG

cvat-sdk

Version:

CVAT SDK is a Javascript library. It provides you access to Javascript functions and objects that simplify server interaction and provide additional functionality like data validation and serialization.

1 lines 249 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("url")):"function"==typeof define&&define.amd?define(["exports","url"],t):t((e||self).CVAT={},e.url)}(this,function(e,t){function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(null,arguments)}function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,s(e,t)}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(i=function(){return!!e})()}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function a(e){var t="function"==typeof Map?new Map:void 0;return a=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(i())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&s(o,r.prototype),o}(e,arguments,n(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),s(r,e)},a(e)}function u(e,t){return function(){return e.apply(t,arguments)}}const{toString:c}=Object.prototype,{getPrototypeOf:l}=Object,d=(h=Object.create(null),e=>{const t=c.call(e);return h[t]||(h[t]=t.slice(8,-1).toLowerCase())});var h;const v=e=>(e=e.toLowerCase(),t=>d(t)===e),f=e=>t=>typeof t===e,{isArray:p}=Array,m=f("undefined"),g=v("ArrayBuffer"),P=f("string"),b=f("function"),R=f("number"),y=e=>null!==e&&"object"==typeof e,j=e=>{if("object"!==d(e))return!1;const t=l(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},C=v("Date"),A=v("File"),k=v("Blob"),w=v("FileList"),S=v("URLSearchParams"),[L,U,x,I]=["ReadableStream","Request","Response","Headers"].map(v);function E(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),p(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(n=0;n<i;n++)s=o[n],t.call(null,e[s],s,e)}}function O(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,T=e=>!m(e)&&e!==D,z=(q="undefined"!=typeof Uint8Array&&l(Uint8Array),e=>q&&e instanceof q);var q;const _=v("HTMLFormElement"),F=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),B=v("RegExp"),M=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};E(r,(r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)}),Object.defineProperties(e,n)},N=v("AsyncFunction"),G=(W="function"==typeof setImmediate,J=b(D.postMessage),W?setImmediate:J?(V=`axios@${Math.random()}`,H=[],D.addEventListener("message",({source:e,data:t})=>{e===D&&t===V&&H.length&&H.shift()()},!1),e=>{H.push(e),D.postMessage(V,"*")}):e=>setTimeout(e));var W,J,V,H;const K="undefined"!=typeof queueMicrotask?queueMicrotask.bind(D):"undefined"!=typeof process&&process.nextTick||G;var X={isArray:p,isArrayBuffer:g,isBuffer:function(e){return null!==e&&!m(e)&&null!==e.constructor&&!m(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||b(e.append)&&("formdata"===(t=d(e))||"object"===t&&b(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&g(e.buffer),t},isString:P,isNumber:R,isBoolean:e=>!0===e||!1===e,isObject:y,isPlainObject:j,isReadableStream:L,isRequest:U,isResponse:x,isHeaders:I,isUndefined:m,isDate:C,isFile:A,isBlob:k,isRegExp:B,isFunction:b,isStream:e=>y(e)&&b(e.pipe),isURLSearchParams:S,isTypedArray:z,isFileList:w,forEach:E,merge:function e(){const{caseless:t}=T(this)&&this||{},r={},n=(n,o)=>{const i=t&&O(r,o)||o;r[i]=j(r[i])&&j(n)?e(r[i],n):j(n)?e({},n):p(n)?n.slice():n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&E(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(E(t,(t,n)=>{e[n]=r&&b(t)?u(t,r):t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&l(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:d,kindOfTest:v,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length);const n=e.indexOf(t,r-=t.length);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(p(e))return e;let t=e.length;if(!R(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:_,hasOwnProperty:F,hasOwnProp:F,reduceDescriptors:M,freezeMethods:e=>{M(e,(t,r)=>{if(b(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;b(e[r])&&(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={},n=e=>{e.forEach(e=>{r[e]=!0})};return p(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:O,global:D,isContextDefined:T,isSpecCompliantForm:function(e){return!!(e&&b(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(y(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=p(e)?[]:{};return E(e,(e,t)=>{const i=r(e,n+1);!m(i)&&(o[t]=i)}),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:N,isThenable:e=>e&&(y(e)||b(e))&&b(e.then)&&b(e.catch),setImmediate:G,asap:K};function Q(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}X.inherits(Q,Error,{toJSON:function(){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:X.toJSONObject(this.config),code:this.code,status:this.status}}});const $=Q.prototype,Y={};function Z(e){return X.isPlainObject(e)||X.isArray(e)}function ee(e){return X.endsWith(e,"[]")?e.slice(0,-2):e}function te(e,t,r){return e?e.concat(t).map(function(e,t){return e=ee(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Y[e]={value:e}}),Object.defineProperties(Q,Y),Object.defineProperty($,"isAxiosError",{value:!0}),Q.from=(e,t,r,n,o,i)=>{const s=Object.create($);return X.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),Q.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const re=X.toFlatObject(X,{},null,function(e){return/^is[A-Z]/.test(e)});function ne(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(e,t){return!X.isUndefined(t[e])})).metaTokens,o=r.visitor||c,i=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&X.isSpecCompliantForm(t);if(!X.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(X.isDate(e))return e.toISOString();if(!a&&X.isBlob(e))throw new Q("Blob is not supported. Use a Buffer instead.");return X.isArrayBuffer(e)||X.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,o){let a=e;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(e){return X.isArray(e)&&!e.some(Z)}(e)||(X.isFileList(e)||X.endsWith(r,"[]"))&&(a=X.toArray(e)))return r=ee(r),a.forEach(function(e,n){!X.isUndefined(e)&&null!==e&&t.append(!0===s?te([r],n,i):null===s?r:r+"[]",u(e))}),!1;return!!Z(e)||(t.append(te(o,r,i),u(e)),!1)}const l=[],d=Object.assign(re,{defaultVisitor:c,convertValue:u,isVisitable:Z});if(!X.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!X.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),X.forEach(r,function(r,i){!0===(!(X.isUndefined(r)||null===r)&&o.call(t,r,X.isString(i)?i.trim():i,n,d))&&e(r,n?n.concat(i):[i])}),l.pop()}}(e),t}function oe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ie(e,t){this._pairs=[],e&&ne(e,this,t)}const se=ie.prototype;function ae(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ue(e,t,r){if(!t)return e;const n=r&&r.encode||ae;X.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):X.isURLSearchParams(t)?t.toString():new ie(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}se.append=function(e,t){this._pairs.push([e,t])},se.toString=function(e){const t=e?function(t){return e.call(this,t,oe)}:oe;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var ce=class{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(t){null!==t&&e(t)})}},le={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},de={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ie,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const he="undefined"!=typeof window&&"undefined"!=typeof document,ve="object"==typeof navigator&&navigator||void 0,fe=he&&(!ve||["ReactNative","NativeScript","NS"].indexOf(ve.product)<0);var pe={__proto__:null,hasBrowserEnv:he,hasStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,hasStandardBrowserEnv:fe,navigator:ve,origin:he&&window.location.href||"http://localhost",...de};function me(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&X.isArray(n)?n.length:i,a?(n[i]=X.hasOwnProp(n,i)?[n[i],r]:r,!s):(n[i]&&X.isObject(n[i])||(n[i]=[]),t(e,r,n[i],o)&&X.isArray(n[i])&&(n[i]=function(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}(n[i])),!s)}if(X.isFormData(e)&&X.isFunction(e.entries)){const r={};return X.forEachEntry(e,(e,n)=>{t(function(e){return X.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,r,0)}),r}return null}const ge={transitional:le,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=X.isObject(e);if(o&&X.isHTMLForm(e)&&(e=new FormData(e)),X.isFormData(e))return n?JSON.stringify(me(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){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ne(e,new pe.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return pe.isNode&&X.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=X.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ne(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e){if(X.isString(e))try{return(0,JSON.parse)(e),X.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ge.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(X.isResponse(e)||X.isReadableStream(e))return e;if(e&&X.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw Q.from(e,Q.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:pe.classes.FormData,Blob:pe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};X.forEach(["delete","get","head","post","put","patch"],e=>{ge.headers[e]={}});var Pe=ge;const be=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"]),Re=Symbol("internals");function ye(e){return e&&String(e).trim().toLowerCase()}function je(e){return!1===e||null==e?e:X.isArray(e)?e.map(je):String(e)}function Ce(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)}class Ae{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=ye(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]=je(e))}const i=(e,t)=>X.forEach(e,(e,r)=>o(e,r,t));if(X.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(X.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&be[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.isHeaders(e))for(const[t,n]of e.entries())o(n,t,r);else null!=e&&o(t,e,r);return this}get(e,t){if(e=ye(e)){const r=X.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(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=ye(e)){const r=X.findKey(this,e);return!(!r||void 0===this[r]||t&&!Ce(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=ye(e)){const o=X.findKey(r,e);!o||t&&!Ce(0,r[o],o,t)||(delete r[o],n=!0)}}return X.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!Ce(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]=je(n),void delete t[o];const s=e?function(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]=je(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")}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[Re]=this[Re]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=ye(e);t[n]||(function(e,t){const r=X.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 X.isArray(e)?e.forEach(n):n(e),this}}Ae.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),X.reduceDescriptors(Ae.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),X.freezeMethods(Ae);var ke=Ae;function we(e,t){const r=this||Pe,n=t||r,o=ke.from(n.headers);let i=n.data;return X.forEach(e,function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Se(e){return!(!e||!e.__CANCEL__)}function Le(e,t,r){Q.call(this,null==e?"canceled":e,Q.ERR_CANCELED,t,r),this.name="CanceledError"}function Ue(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Q("Request failed with status code "+r.status,[Q.ERR_BAD_REQUEST,Q.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}X.inherits(Le,Q,{__CANCEL__:!0});const xe=(e,t,r=3)=>{let n=0;const o=function(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(a){const u=Date.now(),c=n[s];o||(o=u),r[i]=a,n[i]=u;let l=s,d=0;for(;l!==i;)d+=r[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-o<t)return;const h=c&&u-c;return h?Math.round(1e3*d/h):void 0}}(50,250);return function(e,t){let r,n,o=0,i=1e3/t;const s=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(r=e,n||(n=setTimeout(()=>{n=null,s(r)},i-a)))},()=>r&&s(r)]}(r=>{const i=r.loaded,s=r.lengthComputable?r.total:void 0,a=i-n,u=o(a);n=i,e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&i<=s?(s-i)/u:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},Ie=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Ee=e=>(...t)=>X.asap(()=>e(...t));var Oe,De,Te=pe.hasStandardBrowserEnv?(Oe=new URL(pe.origin),De=pe.navigator&&/(msie|trident)/i.test(pe.navigator.userAgent),e=>(e=new URL(e,pe.origin),Oe.protocol===e.protocol&&Oe.host===e.host&&(De||Oe.port===e.port))):()=>!0,ze=pe.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];X.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),X.isString(n)&&s.push("path="+n),X.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function qe(e,t,r){let n=!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t);return e&&n||0==r?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const _e=e=>e instanceof ke?{...e}:e;function Fe(e,t){t=t||{};const r={};function n(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 o(e,t,r,o){return X.isUndefined(t)?X.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!X.isUndefined(t))return n(void 0,t)}function s(e,t){return X.isUndefined(t)?X.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,r)=>o(_e(e),_e(t),0,!0)};return X.forEach(Object.keys(Object.assign({},e,t)),function(n){const i=u[n]||o,s=i(e[n],t[n],n);X.isUndefined(s)&&i!==a||(r[n]=s)}),r}var Be=e=>{const t=Fe({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:u}=t;if(t.headers=a=ke.from(a),t.url=ue(qe(t.baseURL,t.url),e.params,e.paramsSerializer),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),X.isFormData(n))if(pe.hasStandardBrowserEnv||pe.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(r=a.getContentType())){const[e,...t]=r?r.split(";").map(e=>e.trim()).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(pe.hasStandardBrowserEnv&&(o&&X.isFunction(o)&&(o=o(t)),o||!1!==o&&Te(t.url))){const e=i&&s&&ze.read(s);e&&a.set(i,e)}return t},Me="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=Be(e);let o=n.data;const i=ke.from(n.headers).normalize();let s,a,u,c,l,{responseType:d,onUploadProgress:h,onDownloadProgress:v}=n;function f(){c&&c(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let p=new XMLHttpRequest;function m(){if(!p)return;const n=ke.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders());Ue(function(e){t(e),f()},function(e){r(e),f()},{data:d&&"text"!==d&&"json"!==d?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:n,config:e,request:p}),p=null}p.open(n.method.toUpperCase(),n.url,!0),p.timeout=n.timeout,"onloadend"in p?p.onloadend=m:p.onreadystatechange=function(){p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))&&setTimeout(m)},p.onabort=function(){p&&(r(new Q("Request aborted",Q.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new Q("Network Error",Q.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Q(t,(n.transitional||le).clarifyTimeoutError?Q.ETIMEDOUT:Q.ECONNABORTED,e,p)),p=null},void 0===o&&i.setContentType(null),"setRequestHeader"in p&&X.forEach(i.toJSON(),function(e,t){p.setRequestHeader(t,e)}),X.isUndefined(n.withCredentials)||(p.withCredentials=!!n.withCredentials),d&&"json"!==d&&(p.responseType=n.responseType),v&&([u,l]=xe(v,!0),p.addEventListener("progress",u)),h&&p.upload&&([a,c]=xe(h),p.upload.addEventListener("progress",a),p.upload.addEventListener("loadend",c)),(n.cancelToken||n.signal)&&(s=t=>{p&&(r(!t||t.type?new Le(null,e,p):t),p.abort(),p=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===pe.protocols.indexOf(g)?r(new Q("Unsupported protocol "+g+":",Q.ERR_BAD_REQUEST,e)):p.send(o||null)})},Ne=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Q?t:new Le(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new Q(`timeout ${t} of ms exceeded`,Q.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:a}=n;return a.unsubscribe=()=>X.asap(s),a}};const Ge=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},We=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of 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()}}(e))yield*Ge(r,t)}(e,t);let i,s=0,a=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 a(),void e.close();if(r){let e=s+=n.byteLength;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},Je="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ve=Je&&"function"==typeof ReadableStream,He=Je&&("function"==typeof TextEncoder?(Ke=new TextEncoder,e=>Ke.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Ke;const Xe=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Qe=Ve&&Xe(()=>{let e=!1;const t=new Request(pe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),$e=Ve&&Xe(()=>X.isReadableStream(new Response("").body)),Ye={stream:$e&&(e=>e.body)};var Ze;Je&&(Ze=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ye[e]&&(Ye[e]=X.isFunction(Ze[e])?t=>t[e]():(t,r)=>{throw new Q(`Response type '${e}' is not supported`,Q.ERR_NOT_SUPPORT,r)})}));var et=Je&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:u,responseType:c,headers:l,withCredentials:d="same-origin",fetchOptions:h}=Be(e);c=c?(c+"").toLowerCase():"text";let v,f=Ne([o,i&&i.toAbortSignal()],s);const p=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let m;try{if(u&&Qe&&"get"!==r&&"head"!==r&&0!==(m=await(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 Request(pe.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 He(e)).byteLength:void 0)})(t):r})(l,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(X.isFormData(n)&&(e=r.headers.get("content-type"))&&l.setContentType(e),r.body){const[e,t]=Ie(m,xe(Ee(u)));n=We(r.body,65536,e,t)}}X.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;v=new Request(t,{...h,signal:f,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:o?d:void 0});let i=await fetch(v);const s=$e&&("stream"===c||"response"===c);if($e&&(a||s&&p)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=i[t]});const t=X.toFiniteNumber(i.headers.get("content-length")),[r,n]=a&&Ie(t,xe(Ee(a),!0))||[];i=new Response(We(i.body,65536,r,()=>{n&&n(),p&&p()}),e)}c=c||"text";let g=await Ye[X.findKey(Ye,c)||"text"](i,e);return!s&&p&&p(),await new Promise((t,r)=>{Ue(t,r,{data:g,headers:ke.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:v})})}catch(t){if(p&&p(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new Q("Network Error",Q.ERR_NETWORK,e,v),{cause:t.cause||t});throw Q.from(t,t&&t.code,e,v)}});const tt={http:null,xhr:Me,fetch:et};X.forEach(tt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const rt=e=>`- ${e}`,nt=e=>X.isFunction(e)||null===e||!1===e;var ot=e=>{e=X.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!nt(r)&&(n=tt[(t=String(r)).toLowerCase()],void 0===n))throw new Q(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Q("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(rt).join("\n"):" "+rt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function it(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Le(null,e)}function st(e){return it(e),e.headers=ke.from(e.headers),e.data=we.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ot(e.adapter||Pe.adapter)(e).then(function(t){return it(e),t.data=we.call(e,e.transformResponse,t),t.headers=ke.from(t.headers),t},function(t){return Se(t)||(it(e),t&&t.response&&(t.response.data=we.call(e,e.transformResponse,t.response),t.response.headers=ke.from(t.response.headers))),Promise.reject(t)})}const at={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{at[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ut={};at.transitional=function(e,t,r){function n(e,t){return"[Axios v1.8.1] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new Q(n(o," has been removed"+(t?" in "+t:"")),Q.ERR_DEPRECATED);return t&&!ut[o]&&(ut[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},at.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var ct={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Q("options must be an object",Q.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 Q("option "+i+" must be "+r,Q.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Q("Unknown option "+i,Q.ERR_BAD_OPTION)}},validators:at};const lt=ct.validators;class dt{constructor(e){this.defaults=e,this.interceptors={request:new ce,response:new ce}}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=Fe(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&ct.assertOptions(r,{silentJSONParsing:lt.transitional(lt.boolean),forcedJSONParsing:lt.transitional(lt.boolean),clarifyTimeoutError:lt.transitional(lt.boolean)},!1),null!=n&&(X.isFunction(n)?t.paramsSerializer={serialize:n}:ct.assertOptions(n,{encode:lt.function,serialize:lt.function},!0)),void 0!==t.allowAbsoluteUrls||(t.allowAbsoluteUrls=void 0===this.defaults.allowAbsoluteUrls||this.defaults.allowAbsoluteUrls),ct.assertOptions(t,{baseUrl:lt.spelling("baseURL"),withXsrfToken:lt.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","common"],e=>{delete o[e]}),t.headers=ke.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});const u=[];let c;this.interceptors.response.forEach(function(e){u.push(e.fulfilled,e.rejected)});let l,d=0;if(!a){const e=[st.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,u),l=e.length,c=Promise.resolve(t);d<l;)c=c.then(e[d++],e[d++]);return c}l=s.length;let h=t;for(d=0;d<l;){const e=s[d++],t=s[d++];try{h=e(h)}catch(e){t.call(this,e);break}}try{c=st.call(this,h)}catch(e){return Promise.reject(e)}for(d=0,l=u.length;d<l;)c=c.then(u[d++],u[d++]);return c}getUri(e){return ue(qe((e=Fe(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}X.forEach(["delete","get","head","options"],function(e){dt.prototype[e]=function(t,r){return this.request(Fe(r||{},{method:e,url:t,data:(r||{}).data}))}}),X.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,o){return this.request(Fe(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}dt.prototype[e]=t(),dt.prototype[e+"Form"]=t(!0)});var ht=dt;class vt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(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(){r.unsubscribe(t)},n},e(function(e,n,o){r.reason||(r.reason=new Le(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,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new vt(function(t){e=t}),cancel:e}}}var ft=vt;const pt={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};Object.entries(pt).forEach(([e,t])=>{pt[t]=e});var mt=pt;const gt=function e(t){const r=new ht(t),n=u(ht.prototype.request,r);return X.extend(n,ht.prototype,r,{allOwnKeys:!0}),X.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Fe(t,r))},n}(Pe);gt.Axios=ht,gt.CanceledError=Le,gt.CancelToken=ft,gt.isCancel=Se,gt.VERSION="1.8.1",gt.toFormData=ne,gt.AxiosError=Q,gt.Cancel=gt.CanceledError,gt.all=function(e){return Promise.all(e)},gt.spread=function(e){return function(t){return e.apply(null,t)}},gt.isAxiosError=function(e){return X.isObject(e)&&!0===e.isAxiosError},gt.mergeConfig=Fe,gt.AxiosHeaders=ke,gt.formToJSON=e=>me(X.isHTMLForm(e)?new FormData(e):e),gt.getAdapter=ot,gt.HttpStatusCode=mt,gt.default=gt;var Pt=gt,bt="http://localhost".replace(/\/+$/,""),Rt=function(e,t,r){var n;void 0===t&&(t=bt),void 0===r&&(r=Pt),this.basePath=void 0,this.axios=void 0,this.configuration=void 0,this.basePath=t,this.axios=r,e&&(this.configuration=e,this.basePath=null!=(n=e.basePath)?n:t)},yt=/*#__PURE__*/function(e){function t(t,r){var n;return(n=e.call(this,r)||this).field=void 0,n.field=t,n.name="RequiredError",n}return o(t,e),t}(/*#__PURE__*/a(Error)),jt={},Ct="https://example.com",At=function(e,t,r){if(null==r)throw new yt(t,"Required parameter "+t+" was null or undefined when calling "+e+".")},kt=function(e,t,r){try{var n=function(){if(r&&r.apiKey)return Promise.resolve("function"==typeof r.apiKey?r.apiKey(t):r.apiKey).then(function(r){e[t]=r})}();return Promise.resolve(n&&n.then?n.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},wt=function(e,t){t&&(t.username||t.password)&&(e.auth={username:t.username,password:t.password})};function St(e,t,r){void 0===r&&(r=""),null!=t&&("object"==typeof t?Array.isArray(t)?t.forEach(function(t){return St(e,t,r)}):Object.keys(t).forEach(function(n){return St(e,t[n],r+(""!==r?".":"")+n)}):e.has(r)?e.append(r,t):e.set(r,t))}var Lt=function(e){var r=new t.URLSearchParams(e.search);St(r,[].slice.call(arguments,1)),e.search=r.toString()},Ut=function(e,t,r){var n="string"!=typeof e;return(n&&r&&r.isJsonMime?r.isJsonMime(t.headers["Content-Type"]):n)?JSON.stringify(void 0!==e?e:{}):e||""},xt=function(e){return e.pathname+e.search+e.hash},It=function(e,t,n,o){return function(i,s){var a;void 0===i&&(i=t),void 0===s&&(s=n);var u=r({},e.options,{url:(i.defaults.baseURL?"":null!=(a=null==o?void 0:o.basePath)?a:s)+e.url});return i.request(u)}},Et=function(e){return{analyticsCreateReport:function(n,o,i){void 0===i&&(i={});try{var s,a=new t.URL("/api/analytics/reports",Ct);e&&(s=e.baseOptions);var u=r({method:"POST"},s,i),c={},l={};return Promise.resolve(kt(l,"sign",e)).then(function(){return wt(u,e),Promise.resolve(kt(c,"Authorization",e)).then(function(){return void 0!==n&&(l.rq_id=n),c["Content-Type"]="application/json",Lt(a,l),u.headers=r({},c,s&&s.headers?s.headers:{},i.headers),u.data=Ut(o,u,e),{url:xt(a),options:u}})})}catch(e){return Promise.reject(e)}},analyticsGetReports:function(n,o,i,s,a,u){void 0===u&&(u={});try{var c,l=new t.URL("/api/analytics/reports",Ct);e&&(c=e.baseOptions);var d=r({method:"GET"},c,u),h={},v={};return Promise.resolve(kt(v,"sign",e)).then(function(){return wt(d,e),Promise.resolve(kt(h,"Authorization",e)).then(function(){return void 0!==n&&(v.end_date=n instanceof Date?n.toISOString():n),void 0!==o&&(v.job_id=o),void 0!==i&&(v.project_id=i),void 0!==s&&(v.start_date=s instanceof Date?s.toISOString():s),void 0!==a&&(v.task_id=a),Lt(l,v),d.headers=r({},h,c&&c.headers?c.headers:{},u.headers),{url:xt(l),options:d}})})}catch(e){return Promise.reject(e)}}}},Ot=function(e){var t=Et(e);return{analyticsCreateReport:function(r,n,o){try{return Promise.resolve(t.analyticsCreateReport(r,n,o)).then(function(t){var r,n,o=null!=(r=null==e?void 0:e.serverIndex)?r:0,i=null==(n=jt["AnalyticsApi.analyticsCreateReport"])||null==(n=n[o])?void 0:n.url;return function(r,n){return It(t,Pt,bt,e)(r,i||n)}})}catch(e){return Promise.reject(e)}},analyticsGetReports:function(r,n,o,i,s,a){try{return Promise.resolve(t.analyticsGetReports(r,n,o,i,s,a)).then(function(t){var r,n,o=null!=(r=null==e?void 0:e.serverIndex)?r:0,i=null==(n=jt["AnalyticsApi.analyticsGetReports"])||null==(n=n[o])?void 0:n.url;return function(r,n){return It(t,Pt,bt,e)(r,i||n)}})}catch(e){return Promise.reject(e)}}}},Dt=/*#__PURE__*/function(e){function t(){return e.apply(this,arguments)||this}o(t,e);var r=t.prototype;return r.analyticsCreateReport=function(e,t){var r=this;return void 0===e&&(e={}),Ot(this.configuration).analyticsCreateReport(e.rqId,e.analyticsReportCreateRequest,t).then(function(e){return e(r.axios,r.basePath)})},r.analyticsGetReports=function(e,t){var r=this;return void 0===e&&(e={}),Ot(this.configuration).analyticsGetReports(e.endDate,e.jobId,e.projectId,e.startDate,e.taskId,t).then(function(e){return e(r.axios,r.basePath)})},t}(Rt),Tt=function(e){return{assetsCreate:function(n,o){void 0===o&&(o={});try{var i,s=new t.URL("/api/assets",Ct);e&&(i=e.baseOptions);var a=r({method:"POST"},i,o),u={},c={},l=new(e&&e.formDataCtor||FormData);return Promise.resolve(kt(c,"sign",e)).then(function(){return wt(a,e),Promise.resolve(kt(u,"Authorization",e)).then(function(){return void 0!==n&&l.append("file",n),u["Content-Type"]="multipart/form-data",Lt(s,c),a.headers=r({},u,i&&i.headers?i.headers:{},o.headers),a.data=l,{url:xt(s),options:a}})})}catch(e){return Promise.reject(e)}},assetsDestroy:function(n,o){void 0===o&&(o={});try{At("assetsDestroy","uuid",n);var i,s="/api/assets/{uuid}".replace("{uuid}",encodeURIComponent(String(n))),a=new t.URL(s,Ct);e&&(i=e.baseOptions);var u=r({method:"DELETE"},i,o),c={},l={};return Promise.resolve(kt(l,"sign",e)).then(function(){return wt(u,e),Promise.resolve(kt(c,"Authorization",e)).then(function(){return Lt(a,l),u.headers=r({},c,i&&i.headers?i.headers:{},o.headers),{url:xt(a),options:u}})})}catch(e){return Promise.reject(e)}},assetsRetrieve:function(n,o){void 0===o&&(o={});try{At("assetsRetrieve","uuid",n);var i,s="/api/assets/{uuid}".replace("{uuid}",encodeURIComponent(String(n))),a=new t.URL(s,Ct);e&&(i=e.baseOptions);var u=r({method:"GET"},i,o),c={},l={};return Promise.resolve(kt(l,"sign",e)).then(function(){return wt(u,e),Promise.resolve(kt(c,"Authorization",e)).then(function(){return Lt(a,l),u.headers=r({},c,i&&i.headers?i.headers:{},o.headers),{url:xt(a),options:u}})})}catch(e){return Promise.reject(e)}}}},zt=function(e){var t=Tt(e);return{assetsCreate:function(r,n){try{return Promise.resolve(t.assetsCreate(r,n)).then(function(t){var r,n,o=null!=(r=null==e?void 0:e.serverIndex)?r:0,i=null==(n=jt["AssetsApi.assetsCreate"])||null==(n=n[o])?void 0:n.url;return function(r,n){return It(t,Pt,bt,e)(r,i||n)}})}catch(e){return Promise.reject(e)}},assetsDestroy:function(r,n){try{return Promise.resolve(t.assetsDestroy(r,n)).then(function(t){var r,n,o=null!=(r=null==e?void 0:e.serverIndex)?r:0,i=null==(n=jt["AssetsApi.assetsDestroy"])||null==(n=n[o])?void 0:n.url;return function(r,n){return It(t,Pt,bt,e)(r,i||n)}})}catch(e){return Promise.reject(e)}},assetsRetrieve:function(r,n){try{return Promise.resolve(t.assetsRetrieve(r,n)).then(function(t){var r,n,o=null!=(r=null==e?void 0:e.serverIndex)?r:0,i=null==(n=jt["AssetsApi.assetsRetrieve"])||null==(n=n[o])?void 0:n.url;return function(r,n){return It(t,Pt,bt,e)(r,i||n)}})}catch(e){return Promise.reject(e)}}}},qt=/*#__PURE__*/function(e){function t(){return e.apply(this,arguments)||this}o(t,e);var r=t.prototype;return r.assetsCreate=function(e,t){var r=this;return void 0===e&&(e={}),zt(this.configuration).assetsCreate(e.file,t).then(function(e){return e(r.axios,r.basePath)})},r.assetsDestroy=function(e,t){var r=this;return zt(this.configuration).assetsDestroy(e.uuid,t).then(function(e){return e(r.axios,r.basePath)})},r.assetsRetrieve=function(e,t){var r=this;return zt(this.configuration).assetsRetrieve(e.uuid,t).then(function(e){return e(r.axios,r.basePath)})},t}(Rt),_t=function(e){return{authCreateLogin:function(n,o){void 0===o&&(o={});try{At("authCreateLogin","loginSerializerExRequest",n);var i,s=new t.URL("/api/auth/login",Ct);e&&(i=e.baseOptions);var a=r({method:"POST"},i,o),u={},c={};return Promise.resolve(kt(c,"sign",e)).then(function(){return wt(a,e),Promise.resolve(kt(u,"Authorization",e)).then(function(){return u["Content-Type"]="application/json",Lt(s,c),a.headers=r({},u,i&&i.headers?i.headers:{},o.headers),a.data=Ut(n,a,e),{url:xt(s),options:a}})})}catch(e){return Promise.reject(e)}},authCreateLogout:function(n){void 0===n&&(n={});try{var o,i=new t.URL("/api/auth/logout",Ct);e&&(o=e.baseOptions);var s=r({method:"POST"},o,n),a={},u={};return Promise.resolve(kt(u,"sign",e)).then(function(){return wt(s,e),Promise.resolve(kt(a,"Authorization",e)).then(function(){return Lt(i,u),s.headers=r({},a,o&&o.headers?o.headers:{},n.headers),{url:xt(i),options:s}})})}catch(e){return Promise.reject(e)}},authCreatePasswordChange:function(n,o){void 0===o&&(o={});try{At("authCreatePasswordChange","passwordChangeRequest",n);var i,s=new t.URL("/api/auth/password/change",Ct);e&&(i=e.baseOptions);var a=r({method:"POST"},i,o),u={},c={};return Promise.resolve(kt(c,"sign",e)).then(function(){return wt(a,e),Promise.resolve(kt(u,"Authorization",e)).then(function(){return u["Content-Type"]="application/json",Lt(s,c),a.headers=r({},u,i&&i.headers?i.headers:{},o.headers),a.data=Ut(n,a,e),{url:xt(s),options:a}})})}catch(e){return Promise.reject(e)}},authCreatePasswordReset:function(n,o){void 0===o&&(o={});try{At("authCreatePasswordReset","passwordResetSerializerExRequest",n);var i,s=new t.URL("/api/auth/password/reset",Ct);e&&(i=e.baseOptions);var a=r({method:"POST"},i,o),u={},c={};return Promise.resolve(kt(c,"sign",e)).then(function(){return wt(a,e),Promise.resolve(kt(u,"Authorization",e)).then(function(){return u["Content-Type"]="application/json",Lt(s,c),a.headers=r({},u,i&&i.headers?i.headers:{},o.headers),a.data=Ut(n,a,e),{url:xt(s),options:a}})})}catch(e){return Promise.reject(e)}},authCreatePasswordResetConfirm:function(n,o){void 0===o&&(o={});try{At("authCreatePasswordResetConfirm","passwordResetConfirmRequest",n);var i,s=new t.URL("/api/auth/password/reset/confirm",Ct);e&&(i=e.baseOptions);var a=r({method:"POST"},i,o),u={},c={};return Promise.resolve(kt(c,"sign",e)).then(function(){return wt(a,e),Promise.resolve(kt(u,"Authorization",e)).then(function(){return u["Content-Type"]="application/json",Lt(s,c),a.headers=r({},u,i&&i.headers?i.headers:{},o.headers),a.data=Ut(n,a,e),{url:xt(s),options:a}})})}catch(e){return Promise.reject(e)}},authCreateRegister:function(n,o){void 0===o&&(o={});try{At("authCreateRegister","registerSerializerExRequest",n);var i,s=new t.URL("/api/auth/register",Ct);e&&(i=e.baseOptions);var a=r({method:"POST"},i,o),u={},c={};return Promise.resolve(kt(c,"sign",e)).then(function(){return wt(a,e),Promise.resolve(kt(u,"Authorization",e)).then(function(){return u["Content-Type"]="application/json",Lt(s,c),a.headers=r({},u,i&&i.headers?i.headers:{},o.headers),a.data=Ut(n,a,e),{url:xt(s),options:a}})})}catch(e){return Promise.reject(e)}},authCreateSigning:function(n,o){void 0===o&&(o={});try{At("authCreateSigning","signingRequest",n);var i,s=new t.URL("/api/auth/signing",Ct);e&&(i=e.baseOptions);var a=r({method:"POST"},i,o),u={},c={};return Promise.resolve(kt(c,"sign",e)).then(function(){return wt(a,e),Promise.resolve(kt(u,"Authorization",e)).then(function(){return u["Content-Type"]="application/json",Lt(s,c),a.headers=r({},u,i&&i.headers?i.headers:{},o.headers),a.data=Ut(n,a,e),{url:xt(s),options:a}})})}catch(e){return Promise.reject(e)}},authRetrieveRules:function(n){void 0===n&&(n={});try{var o,i=new t.URL("/api/auth/rules",Ct);e&&(o=e.baseOptions);var s=r({method:"GET"},o,n);return Lt(i,{}),s.headers=r({},{},o&&o.headers?o.headers:{},n.headers),Promise.resolve({url:xt(i),options:s})}catch(e){return Promise.reject(e)}}}},Ft=function(e){var t=_t(e);return{authCreateLogin:function(r,n){try{return Promise.resolve(t.authCreateLogin(r,n)).then(function(t){var r,n,o=null!=(r=null==e?void 0:e.serverIndex)?r:0,i=null==(n=jt["AuthApi.authCreateLogin"])||null==(n=n[o])?void 0:n.url;return function(r,n){return It(t,Pt,bt,e)(r,i||n)}})}catch(e){return Promise.reject(e)}},authCreateLogout:function(r){try{return Promise.resolve(t.authCreateLogout(r)).then(function(t){var r,n,o=null!=(r=null==e?void 0:e.serverIndex)?r:0,i=null==(n=jt["AuthApi.authCreateLogout"])||null==(n=n[o])?void 0:n.url;return function(r,n){return It(t,Pt,bt,e)(r,i||n)}})}catch(e){return Promise.reject(e)}},authCreatePasswordChange:function(r,n){try{return Promise.resolve(t.authCreatePasswordChange(r,n)).then(function(t){var r,n,o=null!=(r=null==e?void 0:e.serverIndex)?r:0,i=null==(n=jt["AuthApi.authCreatePasswordChange"])||null==(n=n[o])?void 0:n.url;return function(r,n){return It(t,Pt,bt,e)(r,i||n)}})}catch(e){return Promise.reject(e)}},authCreatePasswordReset:function(r,n){try{return Promise.resolve(t.authCreatePasswordReset(r,n)).then(function(t){var r,n,o=null!=(r=null==e?void 0:e.serverIndex)?r:0,i=null==(n=jt["AuthApi.authCreatePasswordReset"])||null==(n=n[o])?void 0:n.url;return function(r,n){return It(t,Pt,bt,e)(r,i||n)}})}catch(e){return Promise.reject(e)}},authCreatePasswordResetConfirm:function(r,n){try{return Promise.resolve(t.authCreatePasswordResetConfirm(r,n)).then(function(t){var r,n,o=null!=(r=null==e?void 0:e.serverIndex)?r:0,i=null==(n=jt["AuthApi.authCreatePasswordResetConfirm"])||null==(n=n[o])?void 0:n.url;return function(r,n){return It(t,Pt,bt,e)(r,i||n)}})}catch(e){return Promise.reject(e)}},authCreateRegister:function(r,n){try{return Promise.resolve(t.authCreateRegister(r,n)).then(function(t){var r,n,o=null!=(r=null==e?void 0:e.serverIndex)?r:0,i=null==(n=jt["AuthApi.authCreateRegister"])||null==(n=n[o])?void 0:n.url;return function(r,n){return It(t,Pt,bt,e)(r,i||n)}})}catch(e){return Promise.reject(e)}},authCreateSigning:function(r,n){try{return Promise.resolve(t.authCreateSigning(r,n)).then(function(t){var r,n,o=null!=(r=null==e?void 0:e.serverIndex)?r:0,i=null==(n=jt["AuthApi.authCreateSigning"])||null==(n=n[o])?void 0:n.url;return function(r,n){return It(t,Pt,bt,e)(r,i||n)}})}catch(e){return Promise.reject(e)}},authRetrieveRules:function(r){try{return Promise.resolve(t.authRetrieveRules(r)).then(function(t){var r,n,o=null!=(r=null==e?void 0:e.serverIndex)?r:0,i=null==(n=jt["AuthApi.authRetrieveRules"])||null==(n=n[o])?void 0:n.url;return function(r,n){return It(t,Pt,bt,e)(r,i||n)}})}catch(e){return Promise.reject(e)}}}},Bt=/*#__PURE__*/function(e){function t(){return e.apply(this,arguments)||this}o(t,e);var r=t.prototype;return r.authCreateLogin=function(e,t){var r=this;return Ft(this.configuration).authCreateLogin(e.loginSerializerExRequest,t).then(function(e){return e(r.axios,r