@regulaforensics/facesdk-webclient 8.1.407-nightly → 8.1.409-nightly
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -6
- package/dist/index.d.ts +412 -1462
- package/dist/index.js +1639 -1879
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function ot(s,e){return function(){return s.apply(e,arguments)}}const{toString:Gt}=Object.prototype,{getPrototypeOf:Ne}=Object,{iterator:Ee,toStringTag:at}=Symbol,Ae=(s=>e=>{const t=Gt.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),D=s=>(s=s.toLowerCase(),e=>Ae(e)===s),Oe=s=>e=>typeof e===s,{isArray:Y}=Array,J=Oe("undefined");function se(s){return s!==null&&!J(s)&&s.constructor!==null&&!J(s.constructor)&&L(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const it=D("ArrayBuffer");function xt(s){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(s):e=s&&s.buffer&&it(s.buffer),e}const Bt=Oe("string"),L=Oe("function"),ct=Oe("number"),re=s=>s!==null&&typeof s=="object",Mt=s=>s===!0||s===!1,de=s=>{if(Ae(s)!=="object")return!1;const e=Ne(s);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(at in s)&&!(Ee in s)},jt=s=>{if(!re(s)||se(s))return!1;try{return Object.keys(s).length===0&&Object.getPrototypeOf(s)===Object.prototype}catch{return!1}},kt=D("Date"),vt=D("File"),zt=D("Blob"),Qt=D("FileList"),$t=s=>re(s)&&L(s.pipe),qt=s=>{let e;return s&&(typeof FormData=="function"&&s instanceof FormData||L(s.append)&&((e=Ae(s))==="formdata"||e==="object"&&L(s.toString)&&s.toString()==="[object FormData]"))},Wt=D("URLSearchParams"),[Kt,Xt,Jt,Yt]=["ReadableStream","Request","Response","Headers"].map(D),Zt=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ne(s,e,{allOwnKeys:t=!1}={}){if(s===null||typeof s>"u")return;let r,n;if(typeof s!="object"&&(s=[s]),Y(s))for(r=0,n=s.length;r<n;r++)e.call(null,s[r],r,s);else{if(se(s))return;const o=t?Object.getOwnPropertyNames(s):Object.keys(s),a=o.length;let i;for(r=0;r<a;r++)i=o[r],e.call(null,s[i],i,s)}}function lt(s,e){if(se(s))return null;e=e.toLowerCase();const t=Object.keys(s);let r=t.length,n;for(;r-- >0;)if(n=t[r],e===n.toLowerCase())return n;return null}const Q=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ut=s=>!J(s)&&s!==Q;function _e(){const{caseless:s,skipUndefined:e}=ut(this)&&this||{},t={},r=(n,o)=>{const a=s&<(t,o)||o;de(t[a])&&de(n)?t[a]=_e(t[a],n):de(n)?t[a]=_e({},n):Y(n)?t[a]=n.slice():(!e||!J(n))&&(t[a]=n)};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&ne(arguments[n],r);return t}const es=(s,e,t,{allOwnKeys:r}={})=>(ne(e,(n,o)=>{t&&L(n)?s[o]=ot(n,t):s[o]=n},{allOwnKeys:r}),s),ts=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),ss=(s,e,t,r)=>{s.prototype=Object.create(e.prototype,r),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:e.prototype}),t&&Object.assign(s.prototype,t)},rs=(s,e,t,r)=>{let n,o,a;const i={};if(e=e||{},s==null)return e;do{for(n=Object.getOwnPropertyNames(s),o=n.length;o-- >0;)a=n[o],(!r||r(a,s,e))&&!i[a]&&(e[a]=s[a],i[a]=!0);s=t!==!1&&Ne(s)}while(s&&(!t||t(s,e))&&s!==Object.prototype);return e},ns=(s,e,t)=>{s=String(s),(t===void 0||t>s.length)&&(t=s.length),t-=e.length;const r=s.indexOf(e,t);return r!==-1&&r===t},os=s=>{if(!s)return null;if(Y(s))return s;let e=s.length;if(!ct(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=s[e];return t},as=(s=>e=>s&&e instanceof s)(typeof Uint8Array<"u"&&Ne(Uint8Array)),is=(s,e)=>{const r=(s&&s[Ee]).call(s);let n;for(;(n=r.next())&&!n.done;){const o=n.value;e.call(s,o[0],o[1])}},cs=(s,e)=>{let t;const r=[];for(;(t=s.exec(e))!==null;)r.push(t);return r},ls=D("HTMLFormElement"),us=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,n){return r.toUpperCase()+n}),je=(({hasOwnProperty:s})=>(e,t)=>s.call(e,t))(Object.prototype),ds=D("RegExp"),dt=(s,e)=>{const t=Object.getOwnPropertyDescriptors(s),r={};ne(t,(n,o)=>{let a;(a=e(n,o,s))!==!1&&(r[o]=a||n)}),Object.defineProperties(s,r)},ps=s=>{dt(s,(e,t)=>{if(L(s)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=s[t];if(L(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},hs=(s,e)=>{const t={},r=n=>{n.forEach(o=>{t[o]=!0})};return Y(s)?r(s):r(String(s).split(e)),t},fs=()=>{},ms=(s,e)=>s!=null&&Number.isFinite(s=+s)?s:e;function Es(s){return!!(s&&L(s.append)&&s[at]==="FormData"&&s[Ee])}const As=s=>{const e=new Array(10),t=(r,n)=>{if(re(r)){if(e.indexOf(r)>=0)return;if(se(r))return r;if(!("toJSON"in r)){e[n]=r;const o=Y(r)?[]:{};return ne(r,(a,i)=>{const c=t(a,n+1);!J(c)&&(o[i]=c)}),e[n]=void 0,o}}return r};return t(s,0)},Os=D("AsyncFunction"),ys=s=>s&&(re(s)||L(s))&&L(s.then)&&L(s.catch),pt=((s,e)=>s?setImmediate:e?((t,r)=>(Q.addEventListener("message",({source:n,data:o})=>{n===Q&&o===t&&r.length&&r.shift()()},!1),n=>{r.push(n),Q.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",L(Q.postMessage)),Ss=typeof queueMicrotask<"u"?queueMicrotask.bind(Q):typeof process<"u"&&process.nextTick||pt,gs=s=>s!=null&&L(s[Ee]),u={isArray:Y,isArrayBuffer:it,isBuffer:se,isFormData:qt,isArrayBufferView:xt,isString:Bt,isNumber:ct,isBoolean:Mt,isObject:re,isPlainObject:de,isEmptyObject:jt,isReadableStream:Kt,isRequest:Xt,isResponse:Jt,isHeaders:Yt,isUndefined:J,isDate:kt,isFile:vt,isBlob:zt,isRegExp:ds,isFunction:L,isStream:$t,isURLSearchParams:Wt,isTypedArray:as,isFileList:Qt,forEach:ne,merge:_e,extend:es,trim:Zt,stripBOM:ts,inherits:ss,toFlatObject:rs,kindOf:Ae,kindOfTest:D,endsWith:ns,toArray:os,forEachEntry:is,matchAll:cs,isHTMLForm:ls,hasOwnProperty:je,hasOwnProp:je,reduceDescriptors:dt,freezeMethods:ps,toObjectSet:hs,toCamelCase:us,noop:fs,toFiniteNumber:ms,findKey:lt,global:Q,isContextDefined:ut,isSpecCompliantForm:Es,toJSONObject:As,isAsyncFn:Os,isThenable:ys,setImmediate:pt,asap:Ss,isIterable:gs};function A(s,e,t,r,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),n&&(this.response=n,this.status=n.status?n.status:null)}u.inherits(A,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:u.toJSONObject(this.config),code:this.code,status:this.status}}});const ht=A.prototype,ft={};["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(s=>{ft[s]={value:s}});Object.defineProperties(A,ft);Object.defineProperty(ht,"isAxiosError",{value:!0});A.from=(s,e,t,r,n,o)=>{const a=Object.create(ht);u.toFlatObject(s,a,function(d){return d!==Error.prototype},l=>l!=="isAxiosError");const i=s&&s.message?s.message:"Error",c=e==null&&s?s.code:e;return A.call(a,i,c,t,r,n),s&&a.cause==null&&Object.defineProperty(a,"cause",{value:s,configurable:!0}),a.name=s&&s.name||"Error",o&&Object.assign(a,o),a};const Rs=null;function we(s){return u.isPlainObject(s)||u.isArray(s)}function mt(s){return u.endsWith(s,"[]")?s.slice(0,-2):s}function ke(s,e,t){return s?s.concat(e).map(function(n,o){return n=mt(n),!t&&o?"["+n+"]":n}).join(t?".":""):e}function Ps(s){return u.isArray(s)&&!s.some(we)}const Ts=u.toFlatObject(u,{},null,function(e){return/^is[A-Z]/.test(e)});function ye(s,e,t){if(!u.isObject(s))throw new TypeError("target must be an object");e=e||new FormData,t=u.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,f){return!u.isUndefined(f[m])});const r=t.metaTokens,n=t.visitor||d,o=t.dots,a=t.indexes,c=(t.Blob||typeof Blob<"u"&&Blob)&&u.isSpecCompliantForm(e);if(!u.isFunction(n))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(u.isDate(p))return p.toISOString();if(u.isBoolean(p))return p.toString();if(!c&&u.isBlob(p))throw new A("Blob is not supported. Use a Buffer instead.");return u.isArrayBuffer(p)||u.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function d(p,m,f){let b=p;if(p&&!f&&typeof p=="object"){if(u.endsWith(m,"{}"))m=r?m:m.slice(0,-2),p=JSON.stringify(p);else if(u.isArray(p)&&Ps(p)||(u.isFileList(p)||u.endsWith(m,"[]"))&&(b=u.toArray(p)))return m=mt(m),b.forEach(function(C,I){!(u.isUndefined(C)||C===null)&&e.append(a===!0?ke([m],I,o):a===null?m:m+"[]",l(C))}),!1}return we(p)?!0:(e.append(ke(f,m,o),l(p)),!1)}const h=[],O=Object.assign(Ts,{defaultVisitor:d,convertValue:l,isVisitable:we});function _(p,m){if(!u.isUndefined(p)){if(h.indexOf(p)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(p),u.forEach(p,function(b,N){(!(u.isUndefined(b)||b===null)&&n.call(e,b,u.isString(N)?N.trim():N,m,O))===!0&&_(b,m?m.concat(N):[N])}),h.pop()}}if(!u.isObject(s))throw new TypeError("data must be an object");return _(s),e}function ve(s){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Ue(s,e){this._pairs=[],s&&ye(s,this,e)}const Et=Ue.prototype;Et.append=function(e,t){this._pairs.push([e,t])};Et.toString=function(e){const t=e?function(r){return e.call(this,r,ve)}:ve;return this._pairs.map(function(n){return t(n[0])+"="+t(n[1])},"").join("&")};function bs(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function At(s,e,t){if(!e)return s;const r=t&&t.encode||bs;u.isFunction(t)&&(t={serialize:t});const n=t&&t.serialize;let o;if(n?o=n(e,t):o=u.isURLSearchParams(e)?e.toString():new Ue(e,t).toString(r),o){const a=s.indexOf("#");a!==-1&&(s=s.slice(0,a)),s+=(s.indexOf("?")===-1?"?":"&")+o}return s}class ze{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,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){u.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Ot={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Cs=typeof URLSearchParams<"u"?URLSearchParams:Ue,_s=typeof FormData<"u"?FormData:null,ws=typeof Blob<"u"?Blob:null,Is={isBrowser:!0,classes:{URLSearchParams:Cs,FormData:_s,Blob:ws},protocols:["http","https","file","blob","url","data"]},Ve=typeof window<"u"&&typeof document<"u",Ie=typeof navigator=="object"&&navigator||void 0,Ls=Ve&&(!Ie||["ReactNative","NativeScript","NS"].indexOf(Ie.product)<0),Fs=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ns=Ve&&window.location.href||"http://localhost",Us=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ve,hasStandardBrowserEnv:Ls,hasStandardBrowserWebWorkerEnv:Fs,navigator:Ie,origin:Ns},Symbol.toStringTag,{value:"Module"})),w={...Us,...Is};function Vs(s,e){return ye(s,new w.classes.URLSearchParams,{visitor:function(t,r,n,o){return w.isNode&&u.isBuffer(t)?(this.append(r,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}function Ds(s){return u.matchAll(/\w+|\[(\w*)]/g,s).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Hs(s){const e={},t=Object.keys(s);let r;const n=t.length;let o;for(r=0;r<n;r++)o=t[r],e[o]=s[o];return e}function yt(s){function e(t,r,n,o){let a=t[o++];if(a==="__proto__")return!0;const i=Number.isFinite(+a),c=o>=t.length;return a=!a&&u.isArray(n)?n.length:a,c?(u.hasOwnProp(n,a)?n[a]=[n[a],r]:n[a]=r,!i):((!n[a]||!u.isObject(n[a]))&&(n[a]=[]),e(t,r,n[a],o)&&u.isArray(n[a])&&(n[a]=Hs(n[a])),!i)}if(u.isFormData(s)&&u.isFunction(s.entries)){const t={};return u.forEachEntry(s,(r,n)=>{e(Ds(r),n,t,0)}),t}return null}function Gs(s,e,t){if(u.isString(s))try{return(e||JSON.parse)(s),u.trim(s)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(s)}const oe={transitional:Ot,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=u.isObject(e);if(o&&u.isHTMLForm(e)&&(e=new FormData(e)),u.isFormData(e))return n?JSON.stringify(yt(e)):e;if(u.isArrayBuffer(e)||u.isBuffer(e)||u.isStream(e)||u.isFile(e)||u.isBlob(e)||u.isReadableStream(e))return e;if(u.isArrayBufferView(e))return e.buffer;if(u.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 Vs(e,this.formSerializer).toString();if((i=u.isFileList(e))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ye(i?{"files[]":e}:e,c&&new c,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),Gs(e)):e}],transformResponse:[function(e){const t=this.transitional||oe.transitional,r=t&&t.forcedJSONParsing,n=this.responseType==="json";if(u.isResponse(e)||u.isReadableStream(e))return e;if(e&&u.isString(e)&&(r&&!this.responseType||n)){const a=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(i){if(a)throw i.name==="SyntaxError"?A.from(i,A.ERR_BAD_RESPONSE,this,null,this.response):i}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:w.classes.FormData,Blob:w.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};u.forEach(["delete","get","head","post","put","patch"],s=>{oe.headers[s]={}});const xs=u.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"]),Bs=s=>{const e={};let t,r,n;return s&&s.split(`
|
|
2
|
-
`).forEach(function(
|
|
3
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(n=>r.set(n)),r}static accessor(e){const r=(this[Qe]=this[Qe]={accessors:{}}).accessors,n=this.prototype;function o(a){const i=te(a);r[i]||(vs(n,a),r[i]=!0)}return u.isArray(e)?e.forEach(o):o(e),this}};F.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);u.reduceDescriptors(F.prototype,({value:s},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>s,set(r){this[t]=r}}});u.freezeMethods(F);function Te(s,e){const t=this||oe,r=e||t,n=F.from(r.headers);let o=r.data;return u.forEach(s,function(i){o=i.call(t,o,n.normalize(),e?e.status:void 0)}),n.normalize(),o}function St(s){return!!(s&&s.__CANCEL__)}function Z(s,e,t){A.call(this,s??"canceled",A.ERR_CANCELED,e,t),this.name="CanceledError"}u.inherits(Z,A,{__CANCEL__:!0});function gt(s,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?s(t):e(new A("Request failed with status code "+t.status,[A.ERR_BAD_REQUEST,A.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function zs(s){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return e&&e[1]||""}function Qs(s,e){s=s||10;const t=new Array(s),r=new Array(s);let n=0,o=0,a;return e=e!==void 0?e:1e3,function(c){const l=Date.now(),d=r[o];a||(a=l),t[n]=c,r[n]=l;let h=o,O=0;for(;h!==n;)O+=t[h++],h=h%s;if(n=(n+1)%s,n===o&&(o=(o+1)%s),l-a<e)return;const _=d&&l-d;return _?Math.round(O*1e3/_):void 0}}function $s(s,e){let t=0,r=1e3/e,n,o;const a=(l,d=Date.now())=>{t=d,n=null,o&&(clearTimeout(o),o=null),s(...l)};return[(...l)=>{const d=Date.now(),h=d-t;h>=r?a(l,d):(n=l,o||(o=setTimeout(()=>{o=null,a(n)},r-h)))},()=>n&&a(n)]}const fe=(s,e,t=3)=>{let r=0;const n=Qs(50,250);return $s(o=>{const a=o.loaded,i=o.lengthComputable?o.total:void 0,c=a-r,l=n(c),d=a<=i;r=a;const h={loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:l||void 0,estimated:l&&i&&d?(i-a)/l:void 0,event:o,lengthComputable:i!=null,[e?"download":"upload"]:!0};s(h)},t)},$e=(s,e)=>{const t=s!=null;return[r=>e[0]({lengthComputable:t,total:s,loaded:r}),e[1]]},qe=s=>(...e)=>u.asap(()=>s(...e)),qs=w.hasStandardBrowserEnv?((s,e)=>t=>(t=new URL(t,w.origin),s.protocol===t.protocol&&s.host===t.host&&(e||s.port===t.port)))(new URL(w.origin),w.navigator&&/(msie|trident)/i.test(w.navigator.userAgent)):()=>!0,Ws=w.hasStandardBrowserEnv?{write(s,e,t,r,n,o){const a=[s+"="+encodeURIComponent(e)];u.isNumber(t)&&a.push("expires="+new Date(t).toGMTString()),u.isString(r)&&a.push("path="+r),u.isString(n)&&a.push("domain="+n),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(s){const e=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(s){this.write(s,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ks(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function Xs(s,e){return e?s.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):s}function Rt(s,e,t){let r=!Ks(e);return s&&(r||t==!1)?Xs(s,e):e}const We=s=>s instanceof F?{...s}:s;function q(s,e){e=e||{};const t={};function r(l,d,h,O){return u.isPlainObject(l)&&u.isPlainObject(d)?u.merge.call({caseless:O},l,d):u.isPlainObject(d)?u.merge({},d):u.isArray(d)?d.slice():d}function n(l,d,h,O){if(u.isUndefined(d)){if(!u.isUndefined(l))return r(void 0,l,h,O)}else return r(l,d,h,O)}function o(l,d){if(!u.isUndefined(d))return r(void 0,d)}function a(l,d){if(u.isUndefined(d)){if(!u.isUndefined(l))return r(void 0,l)}else return r(void 0,d)}function i(l,d,h){if(h in e)return r(l,d);if(h in s)return r(void 0,l)}const c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(l,d,h)=>n(We(l),We(d),h,!0)};return u.forEach(Object.keys({...s,...e}),function(d){const h=c[d]||n,O=h(s[d],e[d],d);u.isUndefined(O)&&h!==i||(t[d]=O)}),t}const Pt=s=>{const e=q({},s);let{data:t,withXSRFToken:r,xsrfHeaderName:n,xsrfCookieName:o,headers:a,auth:i}=e;if(e.headers=a=F.from(a),e.url=At(Rt(e.baseURL,e.url,e.allowAbsoluteUrls),s.params,s.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),u.isFormData(t)){if(w.hasStandardBrowserEnv||w.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(u.isFunction(t.getHeaders)){const c=t.getHeaders(),l=["content-type","content-length"];Object.entries(c).forEach(([d,h])=>{l.includes(d.toLowerCase())&&a.set(d,h)})}}if(w.hasStandardBrowserEnv&&(r&&u.isFunction(r)&&(r=r(e)),r||r!==!1&&qs(e.url))){const c=n&&o&&Ws.read(o);c&&a.set(n,c)}return e},Js=typeof XMLHttpRequest<"u",Ys=Js&&function(s){return new Promise(function(t,r){const n=Pt(s);let o=n.data;const a=F.from(n.headers).normalize();let{responseType:i,onUploadProgress:c,onDownloadProgress:l}=n,d,h,O,_,p;function m(){_&&_(),p&&p(),n.cancelToken&&n.cancelToken.unsubscribe(d),n.signal&&n.signal.removeEventListener("abort",d)}let f=new XMLHttpRequest;f.open(n.method.toUpperCase(),n.url,!0),f.timeout=n.timeout;function b(){if(!f)return;const C=F.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),V={data:!i||i==="text"||i==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:C,config:s,request:f};gt(function(U){t(U),m()},function(U){r(U),m()},V),f=null}"onloadend"in f?f.onloadend=b:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(b)},f.onabort=function(){f&&(r(new A("Request aborted",A.ECONNABORTED,s,f)),f=null)},f.onerror=function(I){const V=I&&I.message?I.message:"Network Error",k=new A(V,A.ERR_NETWORK,s,f);k.event=I||null,r(k),f=null},f.ontimeout=function(){let I=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const V=n.transitional||Ot;n.timeoutErrorMessage&&(I=n.timeoutErrorMessage),r(new A(I,V.clarifyTimeoutError?A.ETIMEDOUT:A.ECONNABORTED,s,f)),f=null},o===void 0&&a.setContentType(null),"setRequestHeader"in f&&u.forEach(a.toJSON(),function(I,V){f.setRequestHeader(V,I)}),u.isUndefined(n.withCredentials)||(f.withCredentials=!!n.withCredentials),i&&i!=="json"&&(f.responseType=n.responseType),l&&([O,p]=fe(l,!0),f.addEventListener("progress",O)),c&&f.upload&&([h,_]=fe(c),f.upload.addEventListener("progress",h),f.upload.addEventListener("loadend",_)),(n.cancelToken||n.signal)&&(d=C=>{f&&(r(!C||C.type?new Z(null,s,f):C),f.abort(),f=null)},n.cancelToken&&n.cancelToken.subscribe(d),n.signal&&(n.signal.aborted?d():n.signal.addEventListener("abort",d)));const N=zs(n.url);if(N&&w.protocols.indexOf(N)===-1){r(new A("Unsupported protocol "+N+":",A.ERR_BAD_REQUEST,s));return}f.send(o||null)})},Zs=(s,e)=>{const{length:t}=s=s?s.filter(Boolean):[];if(e||t){let r=new AbortController,n;const o=function(l){if(!n){n=!0,i();const d=l instanceof Error?l:this.reason;r.abort(d instanceof A?d:new Z(d instanceof Error?d.message:d))}};let a=e&&setTimeout(()=>{a=null,o(new A(`timeout ${e} of ms exceeded`,A.ETIMEDOUT))},e);const i=()=>{s&&(a&&clearTimeout(a),a=null,s.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),s=null)};s.forEach(l=>l.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>u.asap(i),c}},er=function*(s,e){let t=s.byteLength;if(t<e){yield s;return}let r=0,n;for(;r<t;)n=r+e,yield s.slice(r,n),r=n},tr=async function*(s,e){for await(const t of sr(s))yield*er(t,e)},sr=async function*(s){if(s[Symbol.asyncIterator]){yield*s;return}const e=s.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},Ke=(s,e,t,r)=>{const n=tr(s,e);let o=0,a,i=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:d}=await n.next();if(l){i(),c.close();return}let h=d.byteLength;if(t){let O=o+=h;t(O)}c.enqueue(new Uint8Array(d))}catch(l){throw i(l),l}},cancel(c){return i(c),n.return()}},{highWaterMark:2})},Xe=64*1024,{isFunction:le}=u,rr=(({Request:s,Response:e})=>({Request:s,Response:e}))(u.global),{ReadableStream:Je,TextEncoder:Ye}=u.global,Ze=(s,...e)=>{try{return!!s(...e)}catch{return!1}},nr=s=>{s=u.merge.call({skipUndefined:!0},rr,s);const{fetch:e,Request:t,Response:r}=s,n=e?le(e):typeof fetch=="function",o=le(t),a=le(r);if(!n)return!1;const i=n&&le(Je),c=n&&(typeof Ye=="function"?(p=>m=>p.encode(m))(new Ye):async p=>new Uint8Array(await new t(p).arrayBuffer())),l=o&&i&&Ze(()=>{let p=!1;const m=new t(w.origin,{body:new Je,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!m}),d=a&&i&&Ze(()=>u.isReadableStream(new r("").body)),h={stream:d&&(p=>p.body)};n&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!h[p]&&(h[p]=(m,f)=>{let b=m&&m[p];if(b)return b.call(m);throw new A(`Response type '${p}' is not supported`,A.ERR_NOT_SUPPORT,f)})});const O=async p=>{if(p==null)return 0;if(u.isBlob(p))return p.size;if(u.isSpecCompliantForm(p))return(await new t(w.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(u.isArrayBufferView(p)||u.isArrayBuffer(p))return p.byteLength;if(u.isURLSearchParams(p)&&(p=p+""),u.isString(p))return(await c(p)).byteLength},_=async(p,m)=>{const f=u.toFiniteNumber(p.getContentLength());return f??O(m)};return async p=>{let{url:m,method:f,data:b,signal:N,cancelToken:C,timeout:I,onDownloadProgress:V,onUploadProgress:k,responseType:U,headers:ge,withCredentials:ae="same-origin",fetchOptions:De}=Pt(p),He=e||fetch;U=U?(U+"").toLowerCase():"text";let ie=Zs([N,C&&C.toAbortSignal()],I),ee=null;const v=ie&&ie.unsubscribe&&(()=>{ie.unsubscribe()});let Ge;try{if(k&&l&&f!=="get"&&f!=="head"&&(Ge=await _(ge,b))!==0){let j=new t(m,{method:"POST",body:b,duplex:"half"}),K;if(u.isFormData(b)&&(K=j.headers.get("content-type"))&&ge.setContentType(K),j.body){const[Re,ce]=$e(Ge,fe(qe(k)));b=Ke(j.body,Xe,Re,ce)}}u.isString(ae)||(ae=ae?"include":"omit");const H=o&&"credentials"in t.prototype,xe={...De,signal:ie,method:f.toUpperCase(),headers:ge.normalize().toJSON(),body:b,duplex:"half",credentials:H?ae:void 0};ee=o&&new t(m,xe);let M=await(o?He(ee,De):He(m,xe));const Be=d&&(U==="stream"||U==="response");if(d&&(V||Be&&v)){const j={};["status","statusText","headers"].forEach(Me=>{j[Me]=M[Me]});const K=u.toFiniteNumber(M.headers.get("content-length")),[Re,ce]=V&&$e(K,fe(qe(V),!0))||[];M=new r(Ke(M.body,Xe,Re,()=>{ce&&ce(),v&&v()}),j)}U=U||"text";let Ht=await h[u.findKey(h,U)||"text"](M,p);return!Be&&v&&v(),await new Promise((j,K)=>{gt(j,K,{data:Ht,headers:F.from(M.headers),status:M.status,statusText:M.statusText,config:p,request:ee})})}catch(H){throw v&&v(),H&&H.name==="TypeError"&&/Load failed|fetch/i.test(H.message)?Object.assign(new A("Network Error",A.ERR_NETWORK,p,ee),{cause:H.cause||H}):A.from(H,H&&H.code,p,ee)}}},or=new Map,Tt=s=>{let e=s?s.env:{};const{fetch:t,Request:r,Response:n}=e,o=[r,n,t];let a=o.length,i=a,c,l,d=or;for(;i--;)c=o[i],l=d.get(c),l===void 0&&d.set(c,l=i?new Map:nr(e)),d=l;return l};Tt();const Le={http:Rs,xhr:Ys,fetch:{get:Tt}};u.forEach(Le,(s,e)=>{if(s){try{Object.defineProperty(s,"name",{value:e})}catch{}Object.defineProperty(s,"adapterName",{value:e})}});const et=s=>`- ${s}`,ar=s=>u.isFunction(s)||s===null||s===!1,bt={getAdapter:(s,e)=>{s=u.isArray(s)?s:[s];const{length:t}=s;let r,n;const o={};for(let a=0;a<t;a++){r=s[a];let i;if(n=r,!ar(r)&&(n=Le[(i=String(r)).toLowerCase()],n===void 0))throw new A(`Unknown adapter '${i}'`);if(n&&(u.isFunction(n)||(n=n.get(e))))break;o[i||"#"+a]=n}if(!n){const a=Object.entries(o).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
|
|
4
|
-
`+
|
|
5
|
-
`):" "+
|
|
6
|
-
`+o):r.stack=o}catch{}}throw r}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=q(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;r!==void 0&&he.assertOptions(r,{silentJSONParsing:G.transitional(G.boolean),forcedJSONParsing:G.transitional(G.boolean),clarifyTimeoutError:G.transitional(G.boolean)},!1),n!=null&&(u.isFunction(n)?t.paramsSerializer={serialize:n}:he.assertOptions(n,{encode:G.function,serialize:G.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),he.assertOptions(t,{baseUrl:G.spelling("baseURL"),withXsrfToken:G.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&u.merge(o.common,o[t.method]);o&&u.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),t.headers=F.concat(a,o);const i=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(t)===!1||(c=c&&m.synchronous,i.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let d,h=0,O;if(!c){const p=[tt.bind(this),void 0];for(p.unshift(...i),p.push(...l),O=p.length,d=Promise.resolve(t);h<O;)d=d.then(p[h++],p[h++]);return d}O=i.length;let _=t;for(;h<O;){const p=i[h++],m=i[h++];try{_=p(_)}catch(f){m.call(this,f);break}}try{d=tt.call(this,_)}catch(p){return Promise.reject(p)}for(h=0,O=l.length;h<O;)d=d.then(l[h++],l[h++]);return d}getUri(e){e=q(this.defaults,e);const t=Rt(e.baseURL,e.url,e.allowAbsoluteUrls);return At(t,e.params,e.paramsSerializer)}};u.forEach(["delete","get","head","options"],function(e){$.prototype[e]=function(t,r){return this.request(q(r||{},{method:e,url:t,data:(r||{}).data}))}});u.forEach(["post","put","patch"],function(e){function t(r){return function(o,a,i){return this.request(q(i||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}$.prototype[e]=t(),$.prototype[e+"Form"]=t(!0)});let cr=class _t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(o){t=o});const r=this;this.promise.then(n=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](n);r._listeners=null}),this.promise.then=n=>{let o;const a=new Promise(i=>{r.subscribe(i),o=i}).then(n);return a.cancel=function(){r.unsubscribe(o)},a},e(function(o,a,i){r.reason||(r.reason=new Z(o,a,i),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=r=>{e.abort(r)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new _t(function(n){e=n}),cancel:e}}};function lr(s){return function(t){return s.apply(null,t)}}function ur(s){return u.isObject(s)&&s.isAxiosError===!0}const Fe={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(Fe).forEach(([s,e])=>{Fe[e]=s});function wt(s){const e=new $(s),t=ot($.prototype.request,e);return u.extend(t,$.prototype,e,{allOwnKeys:!0}),u.extend(t,e,null,{allOwnKeys:!0}),t.create=function(n){return wt(q(s,n))},t}const E=wt(oe);E.Axios=$;E.CanceledError=Z;E.CancelToken=cr;E.isCancel=St;E.VERSION=Ct;E.toFormData=ye;E.AxiosError=A;E.Cancel=E.CanceledError;E.all=function(e){return Promise.all(e)};E.spread=lr;E.isAxiosError=ur;E.mergeConfig=q;E.AxiosHeaders=F;E.formToJSON=s=>yt(u.isHTMLForm(s)?new FormData(s):s);E.getAdapter=bt.getAdapter;E.HttpStatusCode=Fe;E.default=E;const{Axios:zr,AxiosError:Qr,CanceledError:$r,isCancel:qr,CancelToken:Wr,VERSION:Kr,all:Xr,Cancel:Jr,isAxiosError:Yr,spread:Zr,toFormData:en,AxiosHeaders:tn,HttpStatusCode:sn,formToJSON:rn,getAdapter:nn,mergeConfig:on}=E,S="http://localhost:41101".replace(/\/+$/,"");class W{constructor(e,t=S,r=E){this.basePath=t,this.axios=r,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}}class dr extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}}const g="https://example.com",y=function(s,e,t){if(t==null)throw new dr(e,`Required parameter ${e} was null or undefined when calling ${s}.`)},R=function(s,...e){const t=new URLSearchParams(s.search);for(const r of e)for(const n in r)if(Array.isArray(r[n])){t.delete(n);for(const o of r[n])t.append(n,o)}else t.set(n,r[n]);s.search=t.toString()},x=function(s,e,t){const r=typeof s!="string";return(r&&t&&t.isJsonMime?t.isJsonMime(e.headers["Content-Type"]):r)?JSON.stringify(s!==void 0?s:{}):s||""},P=function(s){return s.pathname+s.search+s.hash},T=function(s,e,t,r){return(n=e,o=t)=>{const a={...s.options,url:(r?.basePath||o)+s.url};return n.request(a)}},pr=function(s){return{detect:async(e,t,r={})=>{y("detect","detectRequest",e);const n="/api/detect",o=new URL(n,g);let a;s&&(a=s.baseOptions);const i={method:"POST",...a,...r},c={},l={};t!=null&&(c["X-RequestID"]=String(t)),c["Content-Type"]="application/json",R(o,l);let d=a&&a.headers?a.headers:{};return i.headers={...c,...d,...r.headers},i.data=x(e,i,s),{url:P(o),options:i}},match:async(e,t,r={})=>{y("match","matchRequest",e);const n="/api/match",o=new URL(n,g);let a;s&&(a=s.baseOptions);const i={method:"POST",...a,...r},c={},l={};t!=null&&(c["X-RequestID"]=String(t)),c["Content-Type"]="application/json",R(o,l);let d=a&&a.headers?a.headers:{};return i.headers={...c,...d,...r.headers},i.data=x(e,i,s),{url:P(o),options:i}},matchAndSearch:async(e,t,r={})=>{y("matchAndSearch","matchAndSearchRequest",e);const n="/api/match_and_search",o=new URL(n,g);let a;s&&(a=s.baseOptions);const i={method:"POST",...a,...r},c={},l={};t!=null&&(c["X-RequestID"]=String(t)),c["Content-Type"]="application/json",R(o,l);let d=a&&a.headers?a.headers:{};return i.headers={...c,...d,...r.headers},i.data=x(e,i,s),{url:P(o),options:i}}}},Ce=function(s){const e=pr(s);return{async detect(t,r,n){const o=await e.detect(t,r,n);return T(o,E,S,s)},async match(t,r,n){const o=await e.match(t,r,n);return T(o,E,S,s)},async matchAndSearch(t,r,n){const o=await e.matchAndSearch(t,r,n);return T(o,E,S,s)}}};let hr=class extends W{detect(e,t,r){return Ce(this.configuration).detect(e,t,r).then(n=>n(this.axios,this.basePath))}match(e,t,r){return Ce(this.configuration).match(e,t,r).then(n=>n(this.axios,this.basePath))}matchAndSearch(e,t,r){return Ce(this.configuration).matchAndSearch(e,t,r).then(n=>n(this.axios,this.basePath))}};const fr={AGE:"Age",EMOTION:"Emotion",EYE_LEFT:"EyeLeft",EYE_RIGHT:"EyeRight",SMILE:"Smile",GLASSES:"Glasses",HEAD_COVERING:"HeadCovering",FOREHEAD_COVERING:"ForeheadCovering",MOUTH:"Mouth",MEDICAL_MASK:"MedicalMask",OCCLUSION:"Occlusion",STRONG_MAKEUP:"StrongMakeup",HEADPHONES:"Headphones"},mr={ALIGN_3x4:0,ALIGN_4x5:1,ALIGN_2x3:2,ALIGN_1x1:3,ALIGN_7x9:4},Er={IMAGE_CHARACTERISTICS:1,HEAD_SIZE_AND_POSITIONS:2,FACE_QUALITY:3,EYES_CHARACTERISTICS:4,SHADOWS_AND_LIGHTNING:5,POSE_AND_EXPRESSION:6,HEAD_OCCLUSION:7,BACKGROUND:8},Ar={IMAGE_CHARACTERISTICS:"ImageCharacteristics",HEAD_SIZE_AND_POSITIONS:"HeadSizeAndPosition",FACE_QUALITY:"FaceQuality",EYES_CHARACTERISTICS:"EyesCharacteristics",SHADOWS_AND_LIGHTNING:"ShadowsAndLightning",POSE_AND_EXPRESSION:"PoseAndExpression",HEAD_OCCLUSION:"HeadOcclusion",BACKGROUND:"Background"},Or={QUALITY_STATUS_FALSE:0,QUALITY_STATUS_TRUE:1,QUALITY_STATUS_UNDETERMINED:2},yr={IMAGE_WIDTH:"ImageWidth",IMAGE_HEIGHT:"ImageHeight",IMAGE_WIDTH_TO_HEIGHT:"ImageWidthToHeight",IMAGE_CHANNELS_NUMBER:"ImageChannelsNumber",PADDING_RATIO:"PaddingRatio",FACE_MID_POINT_HORIZONTAL_POSITION:"FaceMidPointHorizontalPosition",FACE_MID_POINT_VERTICAL_POSITION:"FaceMidPointVerticalPosition",HEAD_WIDTH_RATIO:"HeadWidthRatio",HEAD_HEIGHT_RATIO:"HeadHeightRatio",EYES_DISTANCE:"EyesDistance",YAW:"Yaw",PITCH:"Pitch",ROLL:"Roll",BLUR_LEVEL:"BlurLevel",NOISE_LEVEL:"NoiseLevel",EYE_RIGHT_CLOSED:"EyeRightClosed",EYE_LEFT_CLOSED:"EyeLeftClosed",EYE_RIGHT_OCCLUDED:"EyeRightOccluded",EYE_LEFT_OCCLUDED:"EyeLeftOccluded",EYES_RED:"EyesRed",EYE_RIGHT_COVERED_WITH_HAIR:"EyeRightCoveredWithHair",EYE_LEFT_COVERED_WITH_HAIR:"EyeLeftCoveredWithHair",OFF_GAZE:"OffGaze",FACE_DYNAMIC_RANGE:"FaceDynamicRange",UNNATURAL_SKIN_TONE:"UnnaturalSkinTone",TOO_DARK:"TooDark",TOO_LIGHT:"TooLight",FACE_GLARE:"FaceGlare",SHADOWS_ON_FACE:"ShadowsOnFace",DARK_GLASSES:"DarkGlasses",REFLECTION_ON_GLASSES:"ReflectionOnGlasses",FRAMES_TOO_HEAVY:"FramesTooHeavy",FACE_OCCLUDED:"FaceOccluded",HEAD_COVERING:"HeadCovering",BACKGROUND_UNIFORMITY:"BackgroundUniformity",SHADOWS_ON_BACKGROUND:"ShadowsOnBackground",OTHER_FACES:"OtherFaces",SHOULDERS_POSE:"ShouldersPose",EXPRESSION_LEVEL:"ExpressionLevel",MOUTH_OPEN:"MouthOpen",FOREHEAD_COVERING:"ForeheadCovering",SMILE:"Smile",STRONG_MAKEUP:"StrongMakeup",HEADPHONES:"Headphones",MEDICAL_MASK:"MedicalMask",BACKGROUND_COLOR_MATCH:"BackgroundColorMatch",ART_FACE:"ArtFace",CONTACT_LENSES:"ContactLenses"},Sr={OLD_MODE:"OldMode",QUALITY_FULL:"QualityFull",QUALITY_ICAO:"QualityICAO",QUALITY_VISA_SCHENGEN:"QualityVisaSchengen",QUALITY_VISA_USA:"QualityVisaUSA",CROP_CENTRAL_FACE:"CropCentralFace",CROP_ALL_FACES:"CropAllFaces",THUMBNAIL:"Thumbnail",ATTRIBUTES_ALL:"AttributesAll",EMPTY:""},gr={FACER_OK:0,FR_IMAGE_EMPTY:1,FR_FACE_NOT_DETECTED:2,FR_LANDMARKS_NOT_DETECTED:3,FR_FACE_ALIGHNER_FAILED:4,FR_DESCRIPTOR_EXTRACTOR_ERROR:5,FR_IMAGE_DECODE_ERROR:6,FR_INTERNAL_ERROR:7,FACER_CONFIG_ERROR:199,FACER_NO_LICENSE:200,FACER_IS_NOT_INITIALIZED:201,FACER_COMMAND_IS_NOT_SUPPORTED:202,FACER_COMMAND_PARAMS_READ_ERROR:203,FACER_LESS_THAN_TWO_IMAGES_IN_REQUEST:224,FACER_VIDEO_DECODE_ERROR:227,FACER_NOT_ENOUGH_FRAMES:228,FACER_OUTPUT_IS_NOT_DEFINED:229,FACER_CLOSED_EYES_DETECTED:230,FACER_LOW_QUALITY:231,FACER_HIGH_ASYMMETRY:232,FACER_FACE_OVER_EMOTIONAL:233,FACER_SUNGLASSES_DETECTED:234,FACER_SMALL_AGE:235,FACER_HEADDRESS_DETECTED:236,FACER_FACES_NOT_MATCHED:237,FACER_IMAGES_COUNT_LIMIT_EXCEEDED:238,FACER_MEDICINE_MASK_DETECTED:239,FACER_OCCLUSION_DETECTED:240,FACER_FOREHEAD_GLASSES_DETECTED:242,FACER_MOUTH_OPENED:243,FACER_ART_MASK_DETECTED:244,FACER_ELECTRONIC_DEVICE_DETECTED:245,FACER_TRACK_BREAK:246,FACER_WRONG_GEO:247,FACER_WRONG_OF:248,FACER_WRONG_VIEW:249,FACER_TIMEOUT_LIVENESS_TRANSACTION:250,FACER_FAILED_LIVENESS_TRANSACTION:251,FACER_ABORTED_LIVENESS_TRANSACTION:252,FACER_GENERAL_ERROR:253,FACER_PASSIVE_LIVENESS_FAIL:254},Rr={IN:"in",NOT_IN:"nin"},It={DOCUMENT_PRINTED:1,DOCUMENT_RFID:2,LIVE:3,DOCUMENT_WITH_LIVE:4,EXTERNAL:5,GHOST:6,BARCODE:7},Pr={ACTIVE:0,PASSIVE:1};var X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Tr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var ue=0;ue<X.length;ue++)Tr[X.charCodeAt(ue)]=ue;var me=function(s){var e=new Uint8Array(s),t,r=e.length,n="";for(t=0;t<r;t+=3)n+=X[e[t]>>2],n+=X[(e[t]&3)<<4|e[t+1]>>4],n+=X[(e[t+1]&15)<<2|e[t+2]>>6],n+=X[e[t+2]&63];return r%3===2?n=n.substring(0,n.length-1)+"=":r%3===1&&(n=n.substring(0,n.length-2)+"=="),n};class Lt{constructor(e,t,r){this.superClass=new hr(e,t,r)}async match(e,t,r){for(const o of e.images)o.type||(o.type=It.LIVE),typeof o.data!="string"&&(o.data=me(o.data));return(await this.superClass.match(e,t,r)).data}async detect(e,t,r){return e.image&&typeof e.image!="string"&&(e.image=me(e.image)),(await this.superClass.detect(e,t,r)).data}}const br=function(s){return{createGroup:async(e,t,r={})=>{y("createGroup","groupToCreate",e);const n="/api/groups",o=new URL(n,g);let a;s&&(a=s.baseOptions);const i={method:"POST",...a,...r},c={},l={};t!=null&&(c["X-RequestID"]=String(t)),c["Content-Type"]="application/json",R(o,l);let d=a&&a.headers?a.headers:{};return i.headers={...c,...d,...r.headers},i.data=x(e,i,s),{url:P(o),options:i}},deleteGroup:async(e,t,r={})=>{y("deleteGroup","groupId",e);const n="/api/groups/{groupId}".replace("{groupId}",encodeURIComponent(String(e))),o=new URL(n,g);let a;s&&(a=s.baseOptions);const i={method:"DELETE",...a,...r},c={},l={};t!=null&&(c["X-RequestID"]=String(t)),R(o,l);let d=a&&a.headers?a.headers:{};return i.headers={...c,...d,...r.headers},{url:P(o),options:i}},getAllGroups:async(e,t,r,n={})=>{const o="/api/groups",a=new URL(o,g);let i;s&&(i=s.baseOptions);const c={method:"GET",...i,...n},l={},d={};e!==void 0&&(d.page=e),t!==void 0&&(d.size=t),r!=null&&(l["X-RequestID"]=String(r)),R(a,d);let h=i&&i.headers?i.headers:{};return c.headers={...l,...h,...n.headers},{url:P(a),options:c}},getAllPersonsByGroupId:async(e,t,r,n,o={})=>{y("getAllPersonsByGroupId","groupId",e);const a="/api/groups/{groupId}/persons".replace("{groupId}",encodeURIComponent(String(e))),i=new URL(a,g);let c;s&&(c=s.baseOptions);const l={method:"GET",...c,...o},d={},h={};t!==void 0&&(h.page=t),r!==void 0&&(h.size=r),n!=null&&(d["X-RequestID"]=String(n)),R(i,h);let O=c&&c.headers?c.headers:{};return l.headers={...d,...O,...o.headers},{url:P(i),options:l}},getGroup:async(e,t,r={})=>{y("getGroup","groupId",e);const n="/api/groups/{groupId}".replace("{groupId}",encodeURIComponent(String(e))),o=new URL(n,g);let a;s&&(a=s.baseOptions);const i={method:"GET",...a,...r},c={},l={};t!=null&&(c["X-RequestID"]=String(t)),R(o,l);let d=a&&a.headers?a.headers:{};return i.headers={...c,...d,...r.headers},{url:P(o),options:i}},updateGroup:async(e,t,r,n={})=>{y("updateGroup","groupId",e),y("updateGroup","groupToCreate",t);const o="/api/groups/{groupId}".replace("{groupId}",encodeURIComponent(String(e))),a=new URL(o,g);let i;s&&(i=s.baseOptions);const c={method:"PUT",...i,...n},l={},d={};r!=null&&(l["X-RequestID"]=String(r)),l["Content-Type"]="application/json",R(a,d);let h=i&&i.headers?i.headers:{};return c.headers={...l,...h,...n.headers},c.data=x(t,c,s),{url:P(a),options:c}},updatePersonsInGroup:async(e,t,r,n={})=>{y("updatePersonsInGroup","groupId",e),y("updatePersonsInGroup","updateGroup",t);const o="/api/groups/{groupId}/persons".replace("{groupId}",encodeURIComponent(String(e))),a=new URL(o,g);let i;s&&(i=s.baseOptions);const c={method:"PUT",...i,...n},l={},d={};r!=null&&(l["X-RequestID"]=String(r)),l["Content-Type"]="application/json",R(a,d);let h=i&&i.headers?i.headers:{};return c.headers={...l,...h,...n.headers},c.data=x(t,c,s),{url:P(a),options:c}}}},z=function(s){const e=br(s);return{async createGroup(t,r,n){const o=await e.createGroup(t,r,n);return T(o,E,S,s)},async deleteGroup(t,r,n){const o=await e.deleteGroup(t,r,n);return T(o,E,S,s)},async getAllGroups(t,r,n,o){const a=await e.getAllGroups(t,r,n,o);return T(a,E,S,s)},async getAllPersonsByGroupId(t,r,n,o,a){const i=await e.getAllPersonsByGroupId(t,r,n,o,a);return T(i,E,S,s)},async getGroup(t,r,n){const o=await e.getGroup(t,r,n);return T(o,E,S,s)},async updateGroup(t,r,n,o){const a=await e.updateGroup(t,r,n,o);return T(a,E,S,s)},async updatePersonsInGroup(t,r,n,o){const a=await e.updatePersonsInGroup(t,r,n,o);return T(a,E,S,s)}}};let Cr=class extends W{createGroup(e,t,r){return z(this.configuration).createGroup(e,t,r).then(n=>n(this.axios,this.basePath))}deleteGroup(e,t,r){return z(this.configuration).deleteGroup(e,t,r).then(n=>n(this.axios,this.basePath))}getAllGroups(e,t,r,n){return z(this.configuration).getAllGroups(e,t,r,n).then(o=>o(this.axios,this.basePath))}getAllPersonsByGroupId(e,t,r,n,o){return z(this.configuration).getAllPersonsByGroupId(e,t,r,n,o).then(a=>a(this.axios,this.basePath))}getGroup(e,t,r){return z(this.configuration).getGroup(e,t,r).then(n=>n(this.axios,this.basePath))}updateGroup(e,t,r,n){return z(this.configuration).updateGroup(e,t,r,n).then(o=>o(this.axios,this.basePath))}updatePersonsInGroup(e,t,r,n){return z(this.configuration).updatePersonsInGroup(e,t,r,n).then(o=>o(this.axios,this.basePath))}};class Ft{constructor(e,t,r){this.superClass=new Cr(e,t,r)}async createGroup(e,t,r){const n={...e,metadata:e?.metadata?e.metadata:{}};return(await this.superClass.createGroup(n,t,r)).data}async deleteGroup(e,t,r){await this.superClass.deleteGroup(e,t,r)}async getAllGroups(e,t,r,n){return(await this.superClass.getAllGroups(e,t,r,n)).data}async getAllPersonsByGroupId(e,t,r,n,o){return(await this.superClass.getAllPersonsByGroupId(r,e,t,n,o)).data}async getGroup(e,t,r){return(await this.superClass.getGroup(e,t,r)).data}async updateGroup(e,t,r,n){await this.superClass.updateGroup(e,t,r,n)}async updatePersonsInGroup(e,t,r,n){await this.superClass.updatePersonsInGroup(e,t,r,n)}}const _r=function(s){return{addImageToPerson:async(e,t,r,n={})=>{y("addImageToPerson","personId",e),y("addImageToPerson","addImageToPersonRequest",t);const o="/api/persons/{personId}/images".replace("{personId}",encodeURIComponent(String(e))),a=new URL(o,g);let i;s&&(i=s.baseOptions);const c={method:"POST",...i,...n},l={},d={};r!=null&&(l["X-RequestID"]=String(r)),l["Content-Type"]="application/json",R(a,d);let h=i&&i.headers?i.headers:{};return c.headers={...l,...h,...n.headers},c.data=x(t,c,s),{url:P(a),options:c}},createPerson:async(e,t,r={})=>{y("createPerson","personFields",e);const n="/api/persons",o=new URL(n,g);let a;s&&(a=s.baseOptions);const i={method:"POST",...a,...r},c={},l={};t!=null&&(c["X-RequestID"]=String(t)),c["Content-Type"]="application/json",R(o,l);let d=a&&a.headers?a.headers:{};return i.headers={...c,...d,...r.headers},i.data=x(e,i,s),{url:P(o),options:i}},deleteImageOfPerson:async(e,t,r,n={})=>{y("deleteImageOfPerson","imageId",e),y("deleteImageOfPerson","personId",t);const o="/api/persons/{personId}/images/{imageId}".replace("{imageId}",encodeURIComponent(String(e))).replace("{personId}",encodeURIComponent(String(t))),a=new URL(o,g);let i;s&&(i=s.baseOptions);const c={method:"DELETE",...i,...n},l={},d={};r!=null&&(l["X-RequestID"]=String(r)),R(a,d);let h=i&&i.headers?i.headers:{};return c.headers={...l,...h,...n.headers},{url:P(a),options:c}},deletePerson:async(e,t,r={})=>{y("deletePerson","personId",e);const n="/api/persons/{personId}".replace("{personId}",encodeURIComponent(String(e))),o=new URL(n,g);let a;s&&(a=s.baseOptions);const i={method:"DELETE",...a,...r},c={},l={};t!=null&&(c["X-RequestID"]=String(t)),R(o,l);let d=a&&a.headers?a.headers:{};return i.headers={...c,...d,...r.headers},{url:P(o),options:i}},getAllGroupsByPersonId:async(e,t,r,n,o={})=>{y("getAllGroupsByPersonId","personId",e);const a="/api/persons/{personId}/groups".replace("{personId}",encodeURIComponent(String(e))),i=new URL(a,g);let c;s&&(c=s.baseOptions);const l={method:"GET",...c,...o},d={},h={};t!==void 0&&(h.page=t),r!==void 0&&(h.size=r),n!=null&&(d["X-RequestID"]=String(n)),R(i,h);let O=c&&c.headers?c.headers:{};return l.headers={...d,...O,...o.headers},{url:P(i),options:l}},getAllImagesByPersonId:async(e,t,r,n,o={})=>{y("getAllImagesByPersonId","personId",e);const a="/api/persons/{personId}/images".replace("{personId}",encodeURIComponent(String(e))),i=new URL(a,g);let c;s&&(c=s.baseOptions);const l={method:"GET",...c,...o},d={},h={};t!==void 0&&(h.page=t),r!==void 0&&(h.size=r),n!=null&&(d["X-RequestID"]=String(n)),R(i,h);let O=c&&c.headers?c.headers:{};return l.headers={...d,...O,...o.headers},{url:P(i),options:l}},getImageOfPerson:async(e,t,r,n={})=>{y("getImageOfPerson","imageId",e),y("getImageOfPerson","personId",t);const o="/api/persons/{personId}/images/{imageId}".replace("{imageId}",encodeURIComponent(String(e))).replace("{personId}",encodeURIComponent(String(t))),a=new URL(o,g);let i;s&&(i=s.baseOptions);const c={method:"GET",...i,...n},l={},d={};r!=null&&(l["X-RequestID"]=String(r)),R(a,d);let h=i&&i.headers?i.headers:{};return c.headers={...l,...h,...n.headers},{url:P(a),options:c}},getPerson:async(e,t,r={})=>{y("getPerson","personId",e);const n="/api/persons/{personId}".replace("{personId}",encodeURIComponent(String(e))),o=new URL(n,g);let a;s&&(a=s.baseOptions);const i={method:"GET",...a,...r},c={},l={};t!=null&&(c["X-RequestID"]=String(t)),R(o,l);let d=a&&a.headers?a.headers:{};return i.headers={...c,...d,...r.headers},{url:P(o),options:i}},updatePerson:async(e,t,r,n={})=>{y("updatePerson","personId",e),y("updatePerson","personToUpdateFields",t);const o="/api/persons/{personId}".replace("{personId}",encodeURIComponent(String(e))),a=new URL(o,g);let i;s&&(i=s.baseOptions);const c={method:"PUT",...i,...n},l={},d={};r!=null&&(l["X-RequestID"]=String(r)),l["Content-Type"]="application/json",R(a,d);let h=i&&i.headers?i.headers:{};return c.headers={...l,...h,...n.headers},c.data=x(t,c,s),{url:P(a),options:c}}}},B=function(s){const e=_r(s);return{async addImageToPerson(t,r,n,o){const a=await e.addImageToPerson(t,r,n,o);return T(a,E,S,s)},async createPerson(t,r,n){const o=await e.createPerson(t,r,n);return T(o,E,S,s)},async deleteImageOfPerson(t,r,n,o){const a=await e.deleteImageOfPerson(t,r,n,o);return T(a,E,S,s)},async deletePerson(t,r,n){const o=await e.deletePerson(t,r,n);return T(o,E,S,s)},async getAllGroupsByPersonId(t,r,n,o,a){const i=await e.getAllGroupsByPersonId(t,r,n,o,a);return T(i,E,S,s)},async getAllImagesByPersonId(t,r,n,o,a){const i=await e.getAllImagesByPersonId(t,r,n,o,a);return T(i,E,S,s)},async getImageOfPerson(t,r,n,o){const a=await e.getImageOfPerson(t,r,n,o);return T(a,E,S,s)},async getPerson(t,r,n){const o=await e.getPerson(t,r,n);return T(o,E,S,s)},async updatePerson(t,r,n,o){const a=await e.updatePerson(t,r,n,o);return T(a,E,S,s)}}};let wr=class extends W{addImageToPerson(e,t,r,n){return B(this.configuration).addImageToPerson(e,t,r,n).then(o=>o(this.axios,this.basePath))}createPerson(e,t,r){return B(this.configuration).createPerson(e,t,r).then(n=>n(this.axios,this.basePath))}deleteImageOfPerson(e,t,r,n){return B(this.configuration).deleteImageOfPerson(e,t,r,n).then(o=>o(this.axios,this.basePath))}deletePerson(e,t,r){return B(this.configuration).deletePerson(e,t,r).then(n=>n(this.axios,this.basePath))}getAllGroupsByPersonId(e,t,r,n,o){return B(this.configuration).getAllGroupsByPersonId(e,t,r,n,o).then(a=>a(this.axios,this.basePath))}getAllImagesByPersonId(e,t,r,n,o){return B(this.configuration).getAllImagesByPersonId(e,t,r,n,o).then(a=>a(this.axios,this.basePath))}getImageOfPerson(e,t,r,n){return B(this.configuration).getImageOfPerson(e,t,r,n).then(o=>o(this.axios,this.basePath))}getPerson(e,t,r){return B(this.configuration).getPerson(e,t,r).then(n=>n(this.axios,this.basePath))}updatePerson(e,t,r,n){return B(this.configuration).updatePerson(e,t,r,n).then(o=>o(this.axios,this.basePath))}};class Nt{constructor(e,t,r){this.superClass=new wr(e,t,r)}async createPerson(e,t,r){const n={...e,metadata:e?.metadata?e.metadata:{}};return(await this.superClass.createPerson(n,t,r)).data}async addImageToPerson(e,t,r,n){return t?.image?.content&&typeof t.image.content!="string"&&(t.image.content=me(t.image.content)),(await this.superClass.addImageToPerson(e,t,r,n)).data}async deleteImageOfPerson(e,t,r,n){await this.superClass.deleteImageOfPerson(e,t,r,n)}async deletePerson(e,t,r){await this.superClass.deletePerson(e,t,r)}async getAllGroupsByPersonId(e,t,r,n,o){return(await this.superClass.getAllGroupsByPersonId(r,e,t,n,o)).data}async getAllImagesByPersonId(e,t,r,n,o){return(await this.superClass.getAllImagesByPersonId(r,e,t,n,o)).data}async getImageOfPerson(e,t,r,n){return(await this.superClass.getImageOfPerson(e,t,r,n)).data}async getPerson(e,t,r){return(await this.superClass.getPerson(e,t,r)).data}async updatePerson(e,t,r,n){await this.superClass.updatePerson(e,t,r,n)}}const Ir=function(s){return{search:async(e,t,r,n={})=>{y("search","searchRequest",e);const o="/api/search",a=new URL(o,g);let i;s&&(i=s.baseOptions);const c={method:"POST",...i,...n},l={},d={};r!==void 0&&(d.withImages=r),t!=null&&(l["X-RequestID"]=String(t)),l["Content-Type"]="application/json",R(a,d);let h=i&&i.headers?i.headers:{};return c.headers={...l,...h,...n.headers},c.data=x(e,c,s),{url:P(a),options:c}}}},Lr=function(s){const e=Ir(s);return{async search(t,r,n,o){const a=await e.search(t,r,n,o);return T(a,E,S,s)}}};let Fr=class extends W{search(e,t,r,n){return Lr(this.configuration).search(e,t,r,n).then(o=>o(this.axios,this.basePath))}};class Ut{constructor(e,t,r){this.superClass=new Fr(e,t,r)}async search(e,t,r,n){return e?.image?.content&&typeof e.image.content!="string"&&(e.image.content=me(e.image.content)),(await this.superClass.search(e,t,r,n)).data}}const Nr=function(s){return{readiness:async(e,t={})=>{const r="/api/readiness",n=new URL(r,g);let o;s&&(o=s.baseOptions);const a={method:"GET",...o,...t},i={},c={};e!=null&&(i["X-RequestID"]=String(e)),R(n,c);let l=o&&o.headers?o.headers:{};return a.headers={...i,...l,...t.headers},{url:P(n),options:a}}}},Ur=function(s){const e=Nr(s);return{async readiness(t,r){const n=await e.readiness(t,r);return T(n,E,S,s)}}};let Vr=class extends W{readiness(e,t){return Ur(this.configuration).readiness(e,t).then(r=>r(this.axios,this.basePath))}};class Vt{constructor(e,t,r){this.superClass=new Vr(e,t,r)}async readiness(e,t){return(await this.superClass.readiness(e,t)).data}}const Dr=function(s){return{deleteLivenessTransaction:async(e,t,r={})=>{y("deleteLivenessTransaction","transactionId",e),y("deleteLivenessTransaction","tag",t);const n="/api/v2/liveness",o=new URL(n,g);let a;s&&(a=s.baseOptions);const i={method:"DELETE",...a,...r},c={},l={};e!==void 0&&(l.transactionId=e),t!==void 0&&(l.tag=t),R(o,l);let d=a&&a.headers?a.headers:{};return i.headers={...c,...d,...r.headers},{url:P(o),options:i}},getLivenessTransactionInfo:async(e,t={})=>{y("getLivenessTransactionInfo","transactionId",e);const r="/api/v2/liveness",n=new URL(r,g);let o;s&&(o=s.baseOptions);const a={method:"GET",...o,...t},i={},c={};e!==void 0&&(c.transactionId=e),R(n,c);let l=o&&o.headers?o.headers:{};return a.headers={...i,...l,...t.headers},{url:P(n),options:a}}}},rt=function(s){const e=Dr(s);return{async deleteLivenessTransaction(t,r,n){const o=await e.deleteLivenessTransaction(t,r,n);return T(o,E,S,s)},async getLivenessTransactionInfo(t,r){const n=await e.getLivenessTransactionInfo(t,r);return T(n,E,S,s)}}};let Hr=class extends W{deleteLivenessTransaction(e,t,r){return rt(this.configuration).deleteLivenessTransaction(e,t,r).then(n=>n(this.axios,this.basePath))}getLivenessTransactionInfo(e,t){return rt(this.configuration).getLivenessTransactionInfo(e,t).then(r=>r(this.axios,this.basePath))}};class Dt{constructor(e,t,r){this.superClass=new Hr(e,t,r)}async getLivenessTransactionInfo(e,t){return(await this.superClass.getLivenessTransactionInfo(e,t)).data}}class Gr{constructor(e,t=S,r=E){this.basePath=t,this.axios=r,this.matchApi=new Lt(e,t,r),this.groupApi=new Ft(e,t,r),this.personApi=new Nt(e,t,r),this.searchApi=new Ut(e,t,r),this.diagnosticsApi=new Vt(e,t,r),this.livenessApi=new Dt(e,t,r)}}const xr=function(s){return{healthz:async(e,t={})=>{const r="/api/healthz",n=new URL(r,g);let o;s&&(o=s.baseOptions);const a={method:"GET",...o,...t},i={},c={};e!=null&&(i["X-RequestID"]=String(e)),R(n,c);let l=o&&o.headers?o.headers:{};return a.headers={...i,...l,...t.headers},{url:P(n),options:a}},readyz:async(e,t={})=>{const r="/api/readyz",n=new URL(r,g);let o;s&&(o=s.baseOptions);const a={method:"GET",...o,...t},i={},c={};e!=null&&(i["X-RequestID"]=String(e)),R(n,c);let l=o&&o.headers?o.headers:{};return a.headers={...i,...l,...t.headers},{url:P(n),options:a}}}},nt=function(s){const e=xr(s);return{async healthz(t,r){const n=await e.healthz(t,r);return T(n,E,S,s)},async readyz(t,r){const n=await e.readyz(t,r);return T(n,E,S,s)}}};let Br=class extends W{healthz(e,t){return nt(this.configuration).healthz(e,t).then(r=>r(this.axios,this.basePath))}readyz(e,t){return nt(this.configuration).readyz(e,t).then(r=>r(this.axios,this.basePath))}};class Mr{constructor(e,t,r){this.superClass=new Br(e,t,r)}async healthz(e,t){return(await this.superClass.healthz(e,t)).data}async readyz(e,t){return(await this.superClass.readyz(e,t)).data}}class jr{constructor(e={}){this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.baseOptions=e.baseOptions,this.formDataCtor=e.formDataCtor}isJsonMime(e){const t=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return e!==null&&(t.test(e)||e.toLowerCase()==="application/json-patch+json")}}exports.Configuration=jr;exports.DiagnosticsApi=Vt;exports.FaceAttribute=fr;exports.FaceImageQualityAlignType=mr;exports.FaceImageQualityGroups=Er;exports.FaceImageQualityGroupsStrings=Ar;exports.FaceImageQualityStatus=Or;exports.FaceQualityConfigName=yr;exports.FaceQualityScenarios=Sr;exports.FaceSDKResultCode=gr;exports.FaceSdk=Gr;exports.FilterOp=Rr;exports.GroupApi=Ft;exports.HealthcheckApi=Mr;exports.ImageSource=It;exports.Liveness20Api=Dt;exports.LivenessType=Pr;exports.MatchApi=Lt;exports.PersonApi=Nt;exports.SearchApi=Ut;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function lt(e,t){return function(){return e.apply(t,arguments)}}const{toString:Xt}=Object.prototype,{getPrototypeOf:xe}=Object,{iterator:Oe,toStringTag:ct}=Symbol,me=(e=>t=>{const r=Xt.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),H=e=>(e=e.toLowerCase(),t=>me(t)===e),_e=e=>t=>typeof t===e,{isArray:K}=Array,Z=_e("undefined");function se(e){return e!==null&&!Z(e)&&e.constructor!==null&&!Z(e.constructor)&&g(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const dt=H("ArrayBuffer");function Jt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&dt(e.buffer),t}const Zt=_e("string"),g=_e("function"),ut=_e("number"),ne=e=>e!==null&&typeof e=="object",Kt=e=>e===!0||e===!1,pe=e=>{if(me(e)!=="object")return!1;const t=xe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ct in e)&&!(Oe in e)},Qt=e=>{if(!ne(e)||se(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},er=H("Date"),tr=H("File"),rr=H("Blob"),sr=H("FileList"),nr=e=>ne(e)&&g(e.pipe),or=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||g(e.append)&&((t=me(e))==="formdata"||t==="object"&&g(e.toString)&&e.toString()==="[object FormData]"))},ar=H("URLSearchParams"),[ir,lr,cr,dr]=["ReadableStream","Request","Response","Headers"].map(H),ur=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function oe(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let s,n;if(typeof e!="object"&&(e=[e]),K(e))for(s=0,n=e.length;s<n;s++)t.call(null,e[s],s,e);else{if(se(e))return;const a=r?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let i;for(s=0;s<o;s++)i=a[s],t.call(null,e[i],i,e)}}function pt(e,t){if(se(e))return null;t=t.toLowerCase();const r=Object.keys(e);let s=r.length,n;for(;s-- >0;)if(n=r[s],t===n.toLowerCase())return n;return null}const $=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ht=e=>!Z(e)&&e!==$;function Ce(){const{caseless:e,skipUndefined:t}=ht(this)&&this||{},r={},s=(n,a)=>{const o=e&&pt(r,a)||a;pe(r[o])&&pe(n)?r[o]=Ce(r[o],n):pe(n)?r[o]=Ce({},n):K(n)?r[o]=n.slice():(!t||!Z(n))&&(r[o]=n)};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&oe(arguments[n],s);return r}const pr=(e,t,r,{allOwnKeys:s}={})=>(oe(t,(n,a)=>{r&&g(n)?e[a]=lt(n,r):e[a]=n},{allOwnKeys:s}),e),hr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),fr=(e,t,r,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Er=(e,t,r,s)=>{let n,a,o;const i={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),a=n.length;a-- >0;)o=n[a],(!s||s(o,e,t))&&!i[o]&&(t[o]=e[o],i[o]=!0);e=r!==!1&&xe(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Ar=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const s=e.indexOf(t,r);return s!==-1&&s===r},Or=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!ut(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},mr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&xe(Uint8Array)),_r=(e,t)=>{const s=(e&&e[Oe]).call(e);let n;for(;(n=s.next())&&!n.done;){const a=n.value;t.call(e,a[0],a[1])}},Tr=(e,t)=>{let r;const s=[];for(;(r=e.exec(t))!==null;)s.push(r);return s},Rr=H("HTMLFormElement"),Pr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,s,n){return s.toUpperCase()+n}),qe=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Ir=H("RegExp"),ft=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),s={};oe(r,(n,a)=>{let o;(o=t(n,a,e))!==!1&&(s[a]=o||n)}),Object.defineProperties(e,s)},Sr=e=>{ft(e,(t,r)=>{if(g(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const s=e[r];if(g(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},br=(e,t)=>{const r={},s=n=>{n.forEach(a=>{r[a]=!0})};return K(e)?s(e):s(String(e).split(t)),r},yr=()=>{},wr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Cr(e){return!!(e&&g(e.append)&&e[ct]==="FormData"&&e[Oe])}const Lr=e=>{const t=new Array(10),r=(s,n)=>{if(ne(s)){if(t.indexOf(s)>=0)return;if(se(s))return s;if(!("toJSON"in s)){t[n]=s;const a=K(s)?[]:{};return oe(s,(o,i)=>{const l=r(o,n+1);!Z(l)&&(a[i]=l)}),t[n]=void 0,a}}return s};return r(e,0)},Vr=H("AsyncFunction"),gr=e=>e&&(ne(e)||g(e))&&g(e.then)&&g(e.catch),Et=((e,t)=>e?setImmediate:t?((r,s)=>($.addEventListener("message",({source:n,data:a})=>{n===$&&a===r&&s.length&&s.shift()()},!1),n=>{s.push(n),$.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",g($.postMessage)),Nr=typeof queueMicrotask<"u"?queueMicrotask.bind($):typeof process<"u"&&process.nextTick||Et,Ur=e=>e!=null&&g(e[Oe]),u={isArray:K,isArrayBuffer:dt,isBuffer:se,isFormData:or,isArrayBufferView:Jt,isString:Zt,isNumber:ut,isBoolean:Kt,isObject:ne,isPlainObject:pe,isEmptyObject:Qt,isReadableStream:ir,isRequest:lr,isResponse:cr,isHeaders:dr,isUndefined:Z,isDate:er,isFile:tr,isBlob:rr,isRegExp:Ir,isFunction:g,isStream:nr,isURLSearchParams:ar,isTypedArray:mr,isFileList:sr,forEach:oe,merge:Ce,extend:pr,trim:ur,stripBOM:hr,inherits:fr,toFlatObject:Er,kindOf:me,kindOfTest:H,endsWith:Ar,toArray:Or,forEachEntry:_r,matchAll:Tr,isHTMLForm:Rr,hasOwnProperty:qe,hasOwnProp:qe,reduceDescriptors:ft,freezeMethods:Sr,toObjectSet:br,toCamelCase:Pr,noop:yr,toFiniteNumber:wr,findKey:pt,global:$,isContextDefined:ht,isSpecCompliantForm:Cr,toJSONObject:Lr,isAsyncFn:Vr,isThenable:gr,setImmediate:Et,asap:Nr,isIterable:Ur};function O(e,t,r,s,n){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),s&&(this.request=s),n&&(this.response=n,this.status=n.status?n.status:null)}u.inherits(O,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:u.toJSONObject(this.config),code:this.code,status:this.status}}});const At=O.prototype,Ot={};["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=>{Ot[e]={value:e}});Object.defineProperties(O,Ot);Object.defineProperty(At,"isAxiosError",{value:!0});O.from=(e,t,r,s,n,a)=>{const o=Object.create(At);u.toFlatObject(e,o,function(d){return d!==Error.prototype},c=>c!=="isAxiosError");const i=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return O.call(o,i,l,r,s,n),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",a&&Object.assign(o,a),o};const xr=null;function Le(e){return u.isPlainObject(e)||u.isArray(e)}function mt(e){return u.endsWith(e,"[]")?e.slice(0,-2):e}function ze(e,t,r){return e?e.concat(t).map(function(n,a){return n=mt(n),!r&&a?"["+n+"]":n}).join(r?".":""):t}function Dr(e){return u.isArray(e)&&!e.some(Le)}const Hr=u.toFlatObject(u,{},null,function(t){return/^is[A-Z]/.test(t)});function Te(e,t,r){if(!u.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=u.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,f){return!u.isUndefined(f[E])});const s=r.metaTokens,n=r.visitor||d,a=r.dots,o=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&u.isSpecCompliantForm(t);if(!u.isFunction(n))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(u.isDate(h))return h.toISOString();if(u.isBoolean(h))return h.toString();if(!l&&u.isBlob(h))throw new O("Blob is not supported. Use a Buffer instead.");return u.isArrayBuffer(h)||u.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function d(h,E,f){let y=h;if(h&&!f&&typeof h=="object"){if(u.endsWith(E,"{}"))E=s?E:E.slice(0,-2),h=JSON.stringify(h);else if(u.isArray(h)&&Dr(h)||(u.isFileList(h)||u.endsWith(E,"[]"))&&(y=u.toArray(h)))return E=mt(E),y.forEach(function(w,V){!(u.isUndefined(w)||w===null)&&t.append(o===!0?ze([E],V,a):o===null?E:E+"[]",c(w))}),!1}return Le(h)?!0:(t.append(ze(f,E,a),c(h)),!1)}const p=[],m=Object.assign(Hr,{defaultVisitor:d,convertValue:c,isVisitable:Le});function C(h,E){if(!u.isUndefined(h)){if(p.indexOf(h)!==-1)throw Error("Circular reference detected in "+E.join("."));p.push(h),u.forEach(h,function(y,U){(!(u.isUndefined(y)||y===null)&&n.call(t,y,u.isString(U)?U.trim():U,E,m))===!0&&C(y,E?E.concat(U):[U])}),p.pop()}}if(!u.isObject(e))throw new TypeError("data must be an object");return C(e),t}function $e(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function De(e,t){this._pairs=[],e&&Te(e,this,t)}const _t=De.prototype;_t.append=function(t,r){this._pairs.push([t,r])};_t.toString=function(t){const r=t?function(s){return t.call(this,s,$e)}:$e;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};function Br(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Tt(e,t,r){if(!t)return e;const s=r&&r.encode||Br;u.isFunction(r)&&(r={serialize:r});const n=r&&r.serialize;let a;if(n?a=n(t,r):a=u.isURLSearchParams(t)?t.toString():new De(t,r).toString(s),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class We{constructor(){this.handlers=[]}use(t,r,s){return this.handlers.push({fulfilled:t,rejected:r,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){u.forEach(this.handlers,function(s){s!==null&&t(s)})}}const Rt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Gr=typeof URLSearchParams<"u"?URLSearchParams:De,Mr=typeof FormData<"u"?FormData:null,vr=typeof Blob<"u"?Blob:null,jr={isBrowser:!0,classes:{URLSearchParams:Gr,FormData:Mr,Blob:vr},protocols:["http","https","file","blob","url","data"]},He=typeof window<"u"&&typeof document<"u",Ve=typeof navigator=="object"&&navigator||void 0,Fr=He&&(!Ve||["ReactNative","NativeScript","NS"].indexOf(Ve.product)<0),kr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qr=He&&window.location.href||"http://localhost",zr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:He,hasStandardBrowserEnv:Fr,hasStandardBrowserWebWorkerEnv:kr,navigator:Ve,origin:qr},Symbol.toStringTag,{value:"Module"})),L={...zr,...jr};function $r(e,t){return Te(e,new L.classes.URLSearchParams,{visitor:function(r,s,n,a){return L.isNode&&u.isBuffer(r)?(this.append(s,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function Wr(e){return u.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Yr(e){const t={},r=Object.keys(e);let s;const n=r.length;let a;for(s=0;s<n;s++)a=r[s],t[a]=e[a];return t}function Pt(e){function t(r,s,n,a){let o=r[a++];if(o==="__proto__")return!0;const i=Number.isFinite(+o),l=a>=r.length;return o=!o&&u.isArray(n)?n.length:o,l?(u.hasOwnProp(n,o)?n[o]=[n[o],s]:n[o]=s,!i):((!n[o]||!u.isObject(n[o]))&&(n[o]=[]),t(r,s,n[o],a)&&u.isArray(n[o])&&(n[o]=Yr(n[o])),!i)}if(u.isFormData(e)&&u.isFunction(e.entries)){const r={};return u.forEachEntry(e,(s,n)=>{t(Wr(s),n,r,0)}),r}return null}function Xr(e,t,r){if(u.isString(e))try{return(t||JSON.parse)(e),u.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(r||JSON.stringify)(e)}const ae={transitional:Rt,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const s=r.getContentType()||"",n=s.indexOf("application/json")>-1,a=u.isObject(t);if(a&&u.isHTMLForm(t)&&(t=new FormData(t)),u.isFormData(t))return n?JSON.stringify(Pt(t)):t;if(u.isArrayBuffer(t)||u.isBuffer(t)||u.isStream(t)||u.isFile(t)||u.isBlob(t)||u.isReadableStream(t))return t;if(u.isArrayBufferView(t))return t.buffer;if(u.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(a){if(s.indexOf("application/x-www-form-urlencoded")>-1)return $r(t,this.formSerializer).toString();if((i=u.isFileList(t))||s.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Te(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||n?(r.setContentType("application/json",!1),Xr(t)):t}],transformResponse:[function(t){const r=this.transitional||ae.transitional,s=r&&r.forcedJSONParsing,n=this.responseType==="json";if(u.isResponse(t)||u.isReadableStream(t))return t;if(t&&u.isString(t)&&(s&&!this.responseType||n)){const o=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(t,this.parseReviver)}catch(i){if(o)throw i.name==="SyntaxError"?O.from(i,O.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:L.classes.FormData,Blob:L.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};u.forEach(["delete","get","head","post","put","patch"],e=>{ae.headers[e]={}});const Jr=u.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"]),Zr=e=>{const t={};let r,s,n;return e&&e.split(`
|
|
2
|
+
`).forEach(function(o){n=o.indexOf(":"),r=o.substring(0,n).trim().toLowerCase(),s=o.substring(n+1).trim(),!(!r||t[r]&&Jr[r])&&(r==="set-cookie"?t[r]?t[r].push(s):t[r]=[s]:t[r]=t[r]?t[r]+", "+s:s)}),t},Ye=Symbol("internals");function re(e){return e&&String(e).trim().toLowerCase()}function he(e){return e===!1||e==null?e:u.isArray(e)?e.map(he):String(e)}function Kr(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(e);)t[s[1]]=s[2];return t}const Qr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Se(e,t,r,s,n){if(u.isFunction(s))return s.call(this,t,r);if(n&&(t=r),!!u.isString(t)){if(u.isString(s))return t.indexOf(s)!==-1;if(u.isRegExp(s))return s.test(t)}}function es(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,s)=>r.toUpperCase()+s)}function ts(e,t){const r=u.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+r,{value:function(n,a,o){return this[s].call(this,t,n,a,o)},configurable:!0})})}let N=class{constructor(t){t&&this.set(t)}set(t,r,s){const n=this;function a(i,l,c){const d=re(l);if(!d)throw new Error("header name must be a non-empty string");const p=u.findKey(n,d);(!p||n[p]===void 0||c===!0||c===void 0&&n[p]!==!1)&&(n[p||l]=he(i))}const o=(i,l)=>u.forEach(i,(c,d)=>a(c,d,l));if(u.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(u.isString(t)&&(t=t.trim())&&!Qr(t))o(Zr(t),r);else if(u.isObject(t)&&u.isIterable(t)){let i={},l,c;for(const d of t){if(!u.isArray(d))throw TypeError("Object iterator must return a key-value pair");i[c=d[0]]=(l=i[c])?u.isArray(l)?[...l,d[1]]:[l,d[1]]:d[1]}o(i,r)}else t!=null&&a(r,t,s);return this}get(t,r){if(t=re(t),t){const s=u.findKey(this,t);if(s){const n=this[s];if(!r)return n;if(r===!0)return Kr(n);if(u.isFunction(r))return r.call(this,n,s);if(u.isRegExp(r))return r.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=re(t),t){const s=u.findKey(this,t);return!!(s&&this[s]!==void 0&&(!r||Se(this,this[s],s,r)))}return!1}delete(t,r){const s=this;let n=!1;function a(o){if(o=re(o),o){const i=u.findKey(s,o);i&&(!r||Se(s,s[i],i,r))&&(delete s[i],n=!0)}}return u.isArray(t)?t.forEach(a):a(t),n}clear(t){const r=Object.keys(this);let s=r.length,n=!1;for(;s--;){const a=r[s];(!t||Se(this,this[a],a,t,!0))&&(delete this[a],n=!0)}return n}normalize(t){const r=this,s={};return u.forEach(this,(n,a)=>{const o=u.findKey(s,a);if(o){r[o]=he(n),delete r[a];return}const i=t?es(a):String(a).trim();i!==a&&delete r[a],r[i]=he(n),s[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return u.forEach(this,(s,n)=>{s!=null&&s!==!1&&(r[n]=t&&u.isArray(s)?s.join(", "):s)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
3
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const s=new this(t);return r.forEach(n=>s.set(n)),s}static accessor(t){const s=(this[Ye]=this[Ye]={accessors:{}}).accessors,n=this.prototype;function a(o){const i=re(o);s[i]||(ts(n,o),s[i]=!0)}return u.isArray(t)?t.forEach(a):a(t),this}};N.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);u.reduceDescriptors(N.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[r]=s}}});u.freezeMethods(N);function be(e,t){const r=this||ae,s=t||r,n=N.from(s.headers);let a=s.data;return u.forEach(e,function(i){a=i.call(r,a,n.normalize(),t?t.status:void 0)}),n.normalize(),a}function It(e){return!!(e&&e.__CANCEL__)}function Q(e,t,r){O.call(this,e??"canceled",O.ERR_CANCELED,t,r),this.name="CanceledError"}u.inherits(Q,O,{__CANCEL__:!0});function St(e,t,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?e(r):t(new O("Request failed with status code "+r.status,[O.ERR_BAD_REQUEST,O.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function rs(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ss(e,t){e=e||10;const r=new Array(e),s=new Array(e);let n=0,a=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),d=s[a];o||(o=c),r[n]=l,s[n]=c;let p=a,m=0;for(;p!==n;)m+=r[p++],p=p%e;if(n=(n+1)%e,n===a&&(a=(a+1)%e),c-o<t)return;const C=d&&c-d;return C?Math.round(m*1e3/C):void 0}}function ns(e,t){let r=0,s=1e3/t,n,a;const o=(c,d=Date.now())=>{r=d,n=null,a&&(clearTimeout(a),a=null),e(...c)};return[(...c)=>{const d=Date.now(),p=d-r;p>=s?o(c,d):(n=c,a||(a=setTimeout(()=>{a=null,o(n)},s-p)))},()=>n&&o(n)]}const Ee=(e,t,r=3)=>{let s=0;const n=ss(50,250);return ns(a=>{const o=a.loaded,i=a.lengthComputable?a.total:void 0,l=o-s,c=n(l),d=o<=i;s=o;const p={loaded:o,total:i,progress:i?o/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i&&d?(i-o)/c:void 0,event:a,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(p)},r)},Xe=(e,t)=>{const r=e!=null;return[s=>t[0]({lengthComputable:r,total:e,loaded:s}),t[1]]},Je=e=>(...t)=>u.asap(()=>e(...t)),os=L.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,L.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(L.origin),L.navigator&&/(msie|trident)/i.test(L.navigator.userAgent)):()=>!0,as=L.hasStandardBrowserEnv?{write(e,t,r,s,n,a){const o=[e+"="+encodeURIComponent(t)];u.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),u.isString(s)&&o.push("path="+s),u.isString(n)&&o.push("domain="+n),a===!0&&o.push("secure"),document.cookie=o.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(){return null},remove(){}};function is(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ls(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function bt(e,t,r){let s=!is(t);return e&&(s||r==!1)?ls(e,t):t}const Ze=e=>e instanceof N?{...e}:e;function Y(e,t){t=t||{};const r={};function s(c,d,p,m){return u.isPlainObject(c)&&u.isPlainObject(d)?u.merge.call({caseless:m},c,d):u.isPlainObject(d)?u.merge({},d):u.isArray(d)?d.slice():d}function n(c,d,p,m){if(u.isUndefined(d)){if(!u.isUndefined(c))return s(void 0,c,p,m)}else return s(c,d,p,m)}function a(c,d){if(!u.isUndefined(d))return s(void 0,d)}function o(c,d){if(u.isUndefined(d)){if(!u.isUndefined(c))return s(void 0,c)}else return s(void 0,d)}function i(c,d,p){if(p in t)return s(c,d);if(p in e)return s(void 0,c)}const l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:i,headers:(c,d,p)=>n(Ze(c),Ze(d),p,!0)};return u.forEach(Object.keys({...e,...t}),function(d){const p=l[d]||n,m=p(e[d],t[d],d);u.isUndefined(m)&&p!==i||(r[d]=m)}),r}const yt=e=>{const t=Y({},e);let{data:r,withXSRFToken:s,xsrfHeaderName:n,xsrfCookieName:a,headers:o,auth:i}=t;if(t.headers=o=N.from(o),t.url=Tt(bt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&o.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),u.isFormData(r)){if(L.hasStandardBrowserEnv||L.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(u.isFunction(r.getHeaders)){const l=r.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([d,p])=>{c.includes(d.toLowerCase())&&o.set(d,p)})}}if(L.hasStandardBrowserEnv&&(s&&u.isFunction(s)&&(s=s(t)),s||s!==!1&&os(t.url))){const l=n&&a&&as.read(a);l&&o.set(n,l)}return t},cs=typeof XMLHttpRequest<"u",ds=cs&&function(e){return new Promise(function(r,s){const n=yt(e);let a=n.data;const o=N.from(n.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:c}=n,d,p,m,C,h;function E(){C&&C(),h&&h(),n.cancelToken&&n.cancelToken.unsubscribe(d),n.signal&&n.signal.removeEventListener("abort",d)}let f=new XMLHttpRequest;f.open(n.method.toUpperCase(),n.url,!0),f.timeout=n.timeout;function y(){if(!f)return;const w=N.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),D={data:!i||i==="text"||i==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:w,config:e,request:f};St(function(x){r(x),E()},function(x){s(x),E()},D),f=null}"onloadend"in f?f.onloadend=y:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(y)},f.onabort=function(){f&&(s(new O("Request aborted",O.ECONNABORTED,e,f)),f=null)},f.onerror=function(V){const D=V&&V.message?V.message:"Network Error",k=new O(D,O.ERR_NETWORK,e,f);k.event=V||null,s(k),f=null},f.ontimeout=function(){let V=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const D=n.transitional||Rt;n.timeoutErrorMessage&&(V=n.timeoutErrorMessage),s(new O(V,D.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,e,f)),f=null},a===void 0&&o.setContentType(null),"setRequestHeader"in f&&u.forEach(o.toJSON(),function(V,D){f.setRequestHeader(D,V)}),u.isUndefined(n.withCredentials)||(f.withCredentials=!!n.withCredentials),i&&i!=="json"&&(f.responseType=n.responseType),c&&([m,h]=Ee(c,!0),f.addEventListener("progress",m)),l&&f.upload&&([p,C]=Ee(l),f.upload.addEventListener("progress",p),f.upload.addEventListener("loadend",C)),(n.cancelToken||n.signal)&&(d=w=>{f&&(s(!w||w.type?new Q(null,e,f):w),f.abort(),f=null)},n.cancelToken&&n.cancelToken.subscribe(d),n.signal&&(n.signal.aborted?d():n.signal.addEventListener("abort",d)));const U=rs(n.url);if(U&&L.protocols.indexOf(U)===-1){s(new O("Unsupported protocol "+U+":",O.ERR_BAD_REQUEST,e));return}f.send(a||null)})},us=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let s=new AbortController,n;const a=function(c){if(!n){n=!0,i();const d=c instanceof Error?c:this.reason;s.abort(d instanceof O?d:new Q(d instanceof Error?d.message:d))}};let o=t&&setTimeout(()=>{o=null,a(new O(`timeout ${t} of ms exceeded`,O.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:l}=s;return l.unsubscribe=()=>u.asap(i),l}},ps=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let s=0,n;for(;s<r;)n=s+t,yield e.slice(s,n),s=n},hs=async function*(e,t){for await(const r of fs(e))yield*ps(r,t)},fs=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:s}=await t.read();if(r)break;yield s}}finally{await t.cancel()}},Ke=(e,t,r,s)=>{const n=hs(e,t);let a=0,o,i=l=>{o||(o=!0,s&&s(l))};return new ReadableStream({async pull(l){try{const{done:c,value:d}=await n.next();if(c){i(),l.close();return}let p=d.byteLength;if(r){let m=a+=p;r(m)}l.enqueue(new Uint8Array(d))}catch(c){throw i(c),c}},cancel(l){return i(l),n.return()}},{highWaterMark:2})},Qe=64*1024,{isFunction:de}=u,Es=(({Request:e,Response:t})=>({Request:e,Response:t}))(u.global),{ReadableStream:et,TextEncoder:tt}=u.global,rt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},As=e=>{e=u.merge.call({skipUndefined:!0},Es,e);const{fetch:t,Request:r,Response:s}=e,n=t?de(t):typeof fetch=="function",a=de(r),o=de(s);if(!n)return!1;const i=n&&de(et),l=n&&(typeof tt=="function"?(h=>E=>h.encode(E))(new tt):async h=>new Uint8Array(await new r(h).arrayBuffer())),c=a&&i&&rt(()=>{let h=!1;const E=new r(L.origin,{body:new et,method:"POST",get duplex(){return h=!0,"half"}}).headers.has("Content-Type");return h&&!E}),d=o&&i&&rt(()=>u.isReadableStream(new s("").body)),p={stream:d&&(h=>h.body)};n&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!p[h]&&(p[h]=(E,f)=>{let y=E&&E[h];if(y)return y.call(E);throw new O(`Response type '${h}' is not supported`,O.ERR_NOT_SUPPORT,f)})});const m=async h=>{if(h==null)return 0;if(u.isBlob(h))return h.size;if(u.isSpecCompliantForm(h))return(await new r(L.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(u.isArrayBufferView(h)||u.isArrayBuffer(h))return h.byteLength;if(u.isURLSearchParams(h)&&(h=h+""),u.isString(h))return(await l(h)).byteLength},C=async(h,E)=>{const f=u.toFiniteNumber(h.getContentLength());return f??m(E)};return async h=>{let{url:E,method:f,data:y,signal:U,cancelToken:w,timeout:V,onDownloadProgress:D,onUploadProgress:k,responseType:x,headers:Pe,withCredentials:ie="same-origin",fetchOptions:Ge}=yt(h),Me=t||fetch;x=x?(x+"").toLowerCase():"text";let le=us([U,w&&w.toAbortSignal()],V),te=null;const q=le&&le.unsubscribe&&(()=>{le.unsubscribe()});let ve;try{if(k&&c&&f!=="get"&&f!=="head"&&(ve=await C(Pe,y))!==0){let F=new r(E,{method:"POST",body:y,duplex:"half"}),X;if(u.isFormData(y)&&(X=F.headers.get("content-type"))&&Pe.setContentType(X),F.body){const[Ie,ce]=Xe(ve,Ee(Je(k)));y=Ke(F.body,Qe,Ie,ce)}}u.isString(ie)||(ie=ie?"include":"omit");const B=a&&"credentials"in r.prototype,je={...Ge,signal:le,method:f.toUpperCase(),headers:Pe.normalize().toJSON(),body:y,duplex:"half",credentials:B?ie:void 0};te=a&&new r(E,je);let j=await(a?Me(te,Ge):Me(E,je));const Fe=d&&(x==="stream"||x==="response");if(d&&(D||Fe&&q)){const F={};["status","statusText","headers"].forEach(ke=>{F[ke]=j[ke]});const X=u.toFiniteNumber(j.headers.get("content-length")),[Ie,ce]=D&&Xe(X,Ee(Je(D),!0))||[];j=new s(Ke(j.body,Qe,Ie,()=>{ce&&ce(),q&&q()}),F)}x=x||"text";let Yt=await p[u.findKey(p,x)||"text"](j,h);return!Fe&&q&&q(),await new Promise((F,X)=>{St(F,X,{data:Yt,headers:N.from(j.headers),status:j.status,statusText:j.statusText,config:h,request:te})})}catch(B){throw q&&q(),B&&B.name==="TypeError"&&/Load failed|fetch/i.test(B.message)?Object.assign(new O("Network Error",O.ERR_NETWORK,h,te),{cause:B.cause||B}):O.from(B,B&&B.code,h,te)}}},Os=new Map,wt=e=>{let t=e?e.env:{};const{fetch:r,Request:s,Response:n}=t,a=[s,n,r];let o=a.length,i=o,l,c,d=Os;for(;i--;)l=a[i],c=d.get(l),c===void 0&&d.set(l,c=i?new Map:As(t)),d=c;return c};wt();const ge={http:xr,xhr:ds,fetch:{get:wt}};u.forEach(ge,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const st=e=>`- ${e}`,ms=e=>u.isFunction(e)||e===null||e===!1,Ct={getAdapter:(e,t)=>{e=u.isArray(e)?e:[e];const{length:r}=e;let s,n;const a={};for(let o=0;o<r;o++){s=e[o];let i;if(n=s,!ms(s)&&(n=ge[(i=String(s)).toLowerCase()],n===void 0))throw new O(`Unknown adapter '${i}'`);if(n&&(u.isFunction(n)||(n=n.get(t))))break;a[i||"#"+o]=n}if(!n){const o=Object.entries(a).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=r?o.length>1?`since :
|
|
4
|
+
`+o.map(st).join(`
|
|
5
|
+
`):" "+st(o[0]):"as no adapter specified";throw new O("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:ge};function ye(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Q(null,e)}function nt(e){return ye(e),e.headers=N.from(e.headers),e.data=be.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ct.getAdapter(e.adapter||ae.adapter,e)(e).then(function(s){return ye(e),s.data=be.call(e,e.transformResponse,s),s.headers=N.from(s.headers),s},function(s){return It(s)||(ye(e),s&&s.response&&(s.response.data=be.call(e,e.transformResponse,s.response),s.response.headers=N.from(s.response.headers))),Promise.reject(s)})}const Lt="1.12.2",Re={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Re[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const ot={};Re.transitional=function(t,r,s){function n(a,o){return"[Axios v"+Lt+"] Transitional option '"+a+"'"+o+(s?". "+s:"")}return(a,o,i)=>{if(t===!1)throw new O(n(o," has been removed"+(r?" in "+r:"")),O.ERR_DEPRECATED);return r&&!ot[o]&&(ot[o]=!0,console.warn(n(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,o,i):!0}};Re.spelling=function(t){return(r,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function _s(e,t,r){if(typeof e!="object")throw new O("options must be an object",O.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let n=s.length;for(;n-- >0;){const a=s[n],o=t[a];if(o){const i=e[a],l=i===void 0||o(i,a,e);if(l!==!0)throw new O("option "+a+" must be "+l,O.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new O("Unknown option "+a,O.ERR_BAD_OPTION)}}const fe={assertOptions:_s,validators:Re},G=fe.validators;let W=class{constructor(t){this.defaults=t||{},this.interceptors={request:new We,response:new We}}async request(t,r){try{return await this._request(t,r)}catch(s){if(s instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const a=n.stack?n.stack.replace(/^.+\n/,""):"";try{s.stack?a&&!String(s.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
|
6
|
+
`+a):s.stack=a}catch{}}throw s}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Y(this.defaults,r);const{transitional:s,paramsSerializer:n,headers:a}=r;s!==void 0&&fe.assertOptions(s,{silentJSONParsing:G.transitional(G.boolean),forcedJSONParsing:G.transitional(G.boolean),clarifyTimeoutError:G.transitional(G.boolean)},!1),n!=null&&(u.isFunction(n)?r.paramsSerializer={serialize:n}:fe.assertOptions(n,{encode:G.function,serialize:G.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),fe.assertOptions(r,{baseUrl:G.spelling("baseURL"),withXsrfToken:G.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=a&&u.merge(a.common,a[r.method]);a&&u.forEach(["delete","get","head","post","put","patch","common"],h=>{delete a[h]}),r.headers=N.concat(o,a);const i=[];let l=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(r)===!1||(l=l&&E.synchronous,i.unshift(E.fulfilled,E.rejected))});const c=[];this.interceptors.response.forEach(function(E){c.push(E.fulfilled,E.rejected)});let d,p=0,m;if(!l){const h=[nt.bind(this),void 0];for(h.unshift(...i),h.push(...c),m=h.length,d=Promise.resolve(r);p<m;)d=d.then(h[p++],h[p++]);return d}m=i.length;let C=r;for(;p<m;){const h=i[p++],E=i[p++];try{C=h(C)}catch(f){E.call(this,f);break}}try{d=nt.call(this,C)}catch(h){return Promise.reject(h)}for(p=0,m=c.length;p<m;)d=d.then(c[p++],c[p++]);return d}getUri(t){t=Y(this.defaults,t);const r=bt(t.baseURL,t.url,t.allowAbsoluteUrls);return Tt(r,t.params,t.paramsSerializer)}};u.forEach(["delete","get","head","options"],function(t){W.prototype[t]=function(r,s){return this.request(Y(s||{},{method:t,url:r,data:(s||{}).data}))}});u.forEach(["post","put","patch"],function(t){function r(s){return function(a,o,i){return this.request(Y(i||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}W.prototype[t]=r(),W.prototype[t+"Form"]=r(!0)});let Ts=class Vt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const s=this;this.promise.then(n=>{if(!s._listeners)return;let a=s._listeners.length;for(;a-- >0;)s._listeners[a](n);s._listeners=null}),this.promise.then=n=>{let a;const o=new Promise(i=>{s.subscribe(i),a=i}).then(n);return o.cancel=function(){s.unsubscribe(a)},o},t(function(a,o,i){s.reason||(s.reason=new Q(a,o,i),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=s=>{t.abort(s)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Vt(function(n){t=n}),cancel:t}}};function Rs(e){return function(r){return e.apply(null,r)}}function Ps(e){return u.isObject(e)&&e.isAxiosError===!0}const Ne={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(Ne).forEach(([e,t])=>{Ne[t]=e});function gt(e){const t=new W(e),r=lt(W.prototype.request,t);return u.extend(r,W.prototype,t,{allOwnKeys:!0}),u.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return gt(Y(e,n))},r}const A=gt(ae);A.Axios=W;A.CanceledError=Q;A.CancelToken=Ts;A.isCancel=It;A.VERSION=Lt;A.toFormData=Te;A.AxiosError=O;A.Cancel=A.CanceledError;A.all=function(t){return Promise.all(t)};A.spread=Rs;A.isAxiosError=Ps;A.mergeConfig=Y;A.AxiosHeaders=N;A.formToJSON=e=>Pt(u.isHTMLForm(e)?new FormData(e):e);A.getAdapter=Ct.getAdapter;A.HttpStatusCode=Ne;A.default=A;const{Axios:Fs,AxiosError:ks,CanceledError:qs,isCancel:zs,CancelToken:$s,VERSION:Ws,all:Ys,Cancel:Xs,isAxiosError:Js,spread:Zs,toFormData:Ks,AxiosHeaders:Qs,HttpStatusCode:en,formToJSON:tn,getAdapter:rn,mergeConfig:sn}=A,T="https://faceapi.regulaforensics.com".replace(/\/+$/,"");class ee{constructor(t,r=T,s=A){this.basePath=r,this.axios=s,t&&(this.configuration=t,this.basePath=t.basePath??r)}}class Is extends Error{constructor(t,r){super(r),this.field=t,this.name="RequiredError"}}const R={},P="https://example.com",_=function(e,t,r){if(r==null)throw new Is(t,`Required parameter ${t} was null or undefined when calling ${e}.`)};function Ue(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(s=>Ue(e,s,r)):Object.keys(t).forEach(s=>Ue(e,t[s],`${r}${r!==""?".":""}${s}`)):e.has(r)?e.append(r,t):e.set(r,t))}const I=function(e,...t){const r=new URLSearchParams(e.search);Ue(r,t),e.search=r.toString()},M=function(e,t,r){const s=typeof e!="string";return(s&&r&&r.isJsonMime?r.isJsonMime(t.headers["Content-Type"]):s)?JSON.stringify(e!==void 0?e:{}):e||""},S=function(e){return e.pathname+e.search+e.hash},b=function(e,t,r,s){return(n=t,a=r)=>{const o={...e.options,url:(n.defaults.baseURL?"":s?.basePath??a)+e.url};return n.request(o)}},Ss=function(e){return{detect:async(t,r,s={})=>{_("detect","detectRequest",t);const n="/api/detect",a=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...s},l={},c={};l["Content-Type"]="application/json",r!=null&&(l["X-RequestID"]=String(r)),I(a,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...s.headers},i.data=M(t,i,e),{url:S(a),options:i}},match:async(t,r,s={})=>{_("match","matchRequest",t);const n="/api/match",a=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...s},l={},c={};l["Content-Type"]="application/json",r!=null&&(l["X-RequestID"]=String(r)),I(a,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...s.headers},i.data=M(t,i,e),{url:S(a),options:i}},matchAndSearch:async(t,r,s={})=>{_("matchAndSearch","matchAndSearchRequest",t);const n="/api/match_and_search",a=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...s},l={},c={};l["Content-Type"]="application/json",r!=null&&(l["X-RequestID"]=String(r)),I(a,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...s.headers},i.data=M(t,i,e),{url:S(a),options:i}}}},we=function(e){const t=Ss(e);return{async detect(r,s,n){const a=await t.detect(r,s,n),o=e?.serverIndex??0,i=R["MatchApi.detect"]?.[o]?.url;return(l,c)=>b(a,A,T,e)(l,i||c)},async match(r,s,n){const a=await t.match(r,s,n),o=e?.serverIndex??0,i=R["MatchApi.match"]?.[o]?.url;return(l,c)=>b(a,A,T,e)(l,i||c)},async matchAndSearch(r,s,n){const a=await t.matchAndSearch(r,s,n),o=e?.serverIndex??0,i=R["MatchApi.matchAndSearch"]?.[o]?.url;return(l,c)=>b(a,A,T,e)(l,i||c)}}};let bs=class extends ee{detect(t,r,s){return we(this.configuration).detect(t,r,s).then(n=>n(this.axios,this.basePath))}match(t,r,s){return we(this.configuration).match(t,r,s).then(n=>n(this.axios,this.basePath))}matchAndSearch(t,r,s){return we(this.configuration).matchAndSearch(t,r,s).then(n=>n(this.axios,this.basePath))}};var Nt=(e=>(e.AGE="Age",e.EMOTION="Emotion",e.EYE_LEFT="EyeLeft",e.EYE_RIGHT="EyeRight",e.SMILE="Smile",e.GLASSES="Glasses",e.HEAD_COVERING="HeadCovering",e.FOREHEAD_COVERING="ForeheadCovering",e.MOUTH="Mouth",e.MEDICAL_MASK="MedicalMask",e.OCCLUSION="Occlusion",e.STRONG_MAKEUP="StrongMakeup",e.HEADPHONES="Headphones",e))(Nt||{}),Ut=(e=>(e[e.ALIGN_3x4=0]="ALIGN_3x4",e[e.ALIGN_4x5=1]="ALIGN_4x5",e[e.ALIGN_2x3=2]="ALIGN_2x3",e[e.ALIGN_1x1=3]="ALIGN_1x1",e[e.ALIGN_7x9=4]="ALIGN_7x9",e))(Ut||{}),xt=(e=>(e[e.IMAGE_CHARACTERISTICS=1]="IMAGE_CHARACTERISTICS",e[e.HEAD_SIZE_AND_POSITIONS=2]="HEAD_SIZE_AND_POSITIONS",e[e.FACE_QUALITY=3]="FACE_QUALITY",e[e.EYES_CHARACTERISTICS=4]="EYES_CHARACTERISTICS",e[e.SHADOWS_AND_LIGHTNING=5]="SHADOWS_AND_LIGHTNING",e[e.POSE_AND_EXPRESSION=6]="POSE_AND_EXPRESSION",e[e.HEAD_OCCLUSION=7]="HEAD_OCCLUSION",e[e.BACKGROUND=8]="BACKGROUND",e))(xt||{}),Dt=(e=>(e.IMAGE_CHARACTERISTICS="ImageCharacteristics",e.HEAD_SIZE_AND_POSITIONS="HeadSizeAndPosition",e.FACE_QUALITY="FaceQuality",e.EYES_CHARACTERISTICS="EyesCharacteristics",e.SHADOWS_AND_LIGHTNING="ShadowsAndLightning",e.POSE_AND_EXPRESSION="PoseAndExpression",e.HEAD_OCCLUSION="HeadOcclusion",e.BACKGROUND="Background",e))(Dt||{}),Ht=(e=>(e[e.QUALITY_STATUS_FALSE=0]="QUALITY_STATUS_FALSE",e[e.QUALITY_STATUS_TRUE=1]="QUALITY_STATUS_TRUE",e[e.QUALITY_STATUS_UNDETERMINED=2]="QUALITY_STATUS_UNDETERMINED",e))(Ht||{}),Bt=(e=>(e.IMAGE_WIDTH="ImageWidth",e.IMAGE_HEIGHT="ImageHeight",e.IMAGE_WIDTH_TO_HEIGHT="ImageWidthToHeight",e.IMAGE_CHANNELS_NUMBER="ImageChannelsNumber",e.PADDING_RATIO="PaddingRatio",e.FACE_MID_POINT_HORIZONTAL_POSITION="FaceMidPointHorizontalPosition",e.FACE_MID_POINT_VERTICAL_POSITION="FaceMidPointVerticalPosition",e.HEAD_WIDTH_RATIO="HeadWidthRatio",e.HEAD_HEIGHT_RATIO="HeadHeightRatio",e.EYES_DISTANCE="EyesDistance",e.YAW="Yaw",e.PITCH="Pitch",e.ROLL="Roll",e.BLUR_LEVEL="BlurLevel",e.NOISE_LEVEL="NoiseLevel",e.EYE_RIGHT_CLOSED="EyeRightClosed",e.EYE_LEFT_CLOSED="EyeLeftClosed",e.EYE_RIGHT_OCCLUDED="EyeRightOccluded",e.EYE_LEFT_OCCLUDED="EyeLeftOccluded",e.EYES_RED="EyesRed",e.EYE_RIGHT_COVERED_WITH_HAIR="EyeRightCoveredWithHair",e.EYE_LEFT_COVERED_WITH_HAIR="EyeLeftCoveredWithHair",e.OFF_GAZE="OffGaze",e.FACE_DYNAMIC_RANGE="FaceDynamicRange",e.UNNATURAL_SKIN_TONE="UnnaturalSkinTone",e.TOO_DARK="TooDark",e.TOO_LIGHT="TooLight",e.FACE_GLARE="FaceGlare",e.SHADOWS_ON_FACE="ShadowsOnFace",e.DARK_GLASSES="DarkGlasses",e.REFLECTION_ON_GLASSES="ReflectionOnGlasses",e.FRAMES_TOO_HEAVY="FramesTooHeavy",e.FACE_OCCLUDED="FaceOccluded",e.HEAD_COVERING="HeadCovering",e.BACKGROUND_UNIFORMITY="BackgroundUniformity",e.SHADOWS_ON_BACKGROUND="ShadowsOnBackground",e.OTHER_FACES="OtherFaces",e.SHOULDERS_POSE="ShouldersPose",e.EXPRESSION_LEVEL="ExpressionLevel",e.MOUTH_OPEN="MouthOpen",e.FOREHEAD_COVERING="ForeheadCovering",e.SMILE="Smile",e.STRONG_MAKEUP="StrongMakeup",e.HEADPHONES="Headphones",e.MEDICAL_MASK="MedicalMask",e.BACKGROUND_COLOR_MATCH="BackgroundColorMatch",e.ART_FACE="ArtFace",e.CONTACT_LENSES="ContactLenses",e))(Bt||{}),Gt=(e=>(e.OLD_MODE="OldMode",e.QUALITY_FULL="QualityFull",e.QUALITY_ICAO="QualityICAO",e.QUALITY_VISA_SCHENGEN="QualityVisaSchengen",e.QUALITY_VISA_USA="QualityVisaUSA",e.CROP_CENTRAL_FACE="CropCentralFace",e.CROP_ALL_FACES="CropAllFaces",e.THUMBNAIL="Thumbnail",e.ATTRIBUTES_ALL="AttributesAll",e.EMPTY="",e))(Gt||{}),Mt=(e=>(e[e.FACER_OK=0]="FACER_OK",e[e.FR_IMAGE_EMPTY=1]="FR_IMAGE_EMPTY",e[e.FR_FACE_NOT_DETECTED=2]="FR_FACE_NOT_DETECTED",e[e.FR_LANDMARKS_NOT_DETECTED=3]="FR_LANDMARKS_NOT_DETECTED",e[e.FR_FACE_ALIGHNER_FAILED=4]="FR_FACE_ALIGHNER_FAILED",e[e.FR_DESCRIPTOR_EXTRACTOR_ERROR=5]="FR_DESCRIPTOR_EXTRACTOR_ERROR",e[e.FR_IMAGE_DECODE_ERROR=6]="FR_IMAGE_DECODE_ERROR",e[e.FR_INTERNAL_ERROR=7]="FR_INTERNAL_ERROR",e[e.FACER_CONFIG_ERROR=199]="FACER_CONFIG_ERROR",e[e.FACER_NO_LICENSE=200]="FACER_NO_LICENSE",e[e.FACER_IS_NOT_INITIALIZED=201]="FACER_IS_NOT_INITIALIZED",e[e.FACER_COMMAND_IS_NOT_SUPPORTED=202]="FACER_COMMAND_IS_NOT_SUPPORTED",e[e.FACER_COMMAND_PARAMS_READ_ERROR=203]="FACER_COMMAND_PARAMS_READ_ERROR",e[e.FACER_LESS_THAN_TWO_IMAGES_IN_REQUEST=224]="FACER_LESS_THAN_TWO_IMAGES_IN_REQUEST",e[e.FACER_VIDEO_DECODE_ERROR=227]="FACER_VIDEO_DECODE_ERROR",e[e.FACER_NOT_ENOUGH_FRAMES=228]="FACER_NOT_ENOUGH_FRAMES",e[e.FACER_OUTPUT_IS_NOT_DEFINED=229]="FACER_OUTPUT_IS_NOT_DEFINED",e[e.FACER_CLOSED_EYES_DETECTED=230]="FACER_CLOSED_EYES_DETECTED",e[e.FACER_LOW_QUALITY=231]="FACER_LOW_QUALITY",e[e.FACER_HIGH_ASYMMETRY=232]="FACER_HIGH_ASYMMETRY",e[e.FACER_FACE_OVER_EMOTIONAL=233]="FACER_FACE_OVER_EMOTIONAL",e[e.FACER_SUNGLASSES_DETECTED=234]="FACER_SUNGLASSES_DETECTED",e[e.FACER_SMALL_AGE=235]="FACER_SMALL_AGE",e[e.FACER_HEADDRESS_DETECTED=236]="FACER_HEADDRESS_DETECTED",e[e.FACER_FACES_NOT_MATCHED=237]="FACER_FACES_NOT_MATCHED",e[e.FACER_IMAGES_COUNT_LIMIT_EXCEEDED=238]="FACER_IMAGES_COUNT_LIMIT_EXCEEDED",e[e.FACER_MEDICINE_MASK_DETECTED=239]="FACER_MEDICINE_MASK_DETECTED",e[e.FACER_OCCLUSION_DETECTED=240]="FACER_OCCLUSION_DETECTED",e[e.FACER_FOREHEAD_GLASSES_DETECTED=242]="FACER_FOREHEAD_GLASSES_DETECTED",e[e.FACER_MOUTH_OPENED=243]="FACER_MOUTH_OPENED",e[e.FACER_ART_MASK_DETECTED=244]="FACER_ART_MASK_DETECTED",e[e.FACER_ELECTRONIC_DEVICE_DETECTED=245]="FACER_ELECTRONIC_DEVICE_DETECTED",e[e.FACER_TRACK_BREAK=246]="FACER_TRACK_BREAK",e[e.FACER_WRONG_GEO=247]="FACER_WRONG_GEO",e[e.FACER_WRONG_OF=248]="FACER_WRONG_OF",e[e.FACER_WRONG_VIEW=249]="FACER_WRONG_VIEW",e[e.FACER_TIMEOUT_LIVENESS_TRANSACTION=250]="FACER_TIMEOUT_LIVENESS_TRANSACTION",e[e.FACER_FAILED_LIVENESS_TRANSACTION=251]="FACER_FAILED_LIVENESS_TRANSACTION",e[e.FACER_ABORTED_LIVENESS_TRANSACTION=252]="FACER_ABORTED_LIVENESS_TRANSACTION",e[e.FACER_GENERAL_ERROR=253]="FACER_GENERAL_ERROR",e[e.FACER_PASSIVE_LIVENESS_FAIL=254]="FACER_PASSIVE_LIVENESS_FAIL",e))(Mt||{}),vt=(e=>(e.IN="in",e.NOT_IN="nin",e))(vt||{}),Be=(e=>(e[e.DOCUMENT_PRINTED=1]="DOCUMENT_PRINTED",e[e.DOCUMENT_RFID=2]="DOCUMENT_RFID",e[e.LIVE=3]="LIVE",e[e.DOCUMENT_WITH_LIVE=4]="DOCUMENT_WITH_LIVE",e[e.EXTERNAL=5]="EXTERNAL",e[e.GHOST=6]="GHOST",e[e.BARCODE=7]="BARCODE",e))(Be||{}),jt=(e=>(e[e.ACTIVE=0]="ACTIVE",e[e.PASSIVE=1]="PASSIVE",e))(jt||{}),J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ys=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var ue=0;ue<J.length;ue++)ys[J.charCodeAt(ue)]=ue;var Ae=function(e){var t=new Uint8Array(e),r,s=t.length,n="";for(r=0;r<s;r+=3)n+=J[t[r]>>2],n+=J[(t[r]&3)<<4|t[r+1]>>4],n+=J[(t[r+1]&15)<<2|t[r+2]>>6],n+=J[t[r+2]&63];return s%3===2?n=n.substring(0,n.length-1)+"=":s%3===1&&(n=n.substring(0,n.length-2)+"=="),n};class Ft{constructor(t,r,s){this.superClass=new bs(t,r,s)}async match(t,r,s){for(const a of t.images)a.type||(a.type=Be.LIVE),typeof a.data!="string"&&(a.data=Ae(a.data));return(await this.superClass.match(t,r,s)).data}async detect(t,r,s){return t.image&&typeof t.image!="string"&&(t.image=Ae(t.image)),(await this.superClass.detect(t,r,s)).data}}const ws=function(e){return{createGroup:async(t,r,s={})=>{_("createGroup","groupToCreate",t);const n="/api/groups",a=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...s},l={},c={};l["Content-Type"]="application/json",r!=null&&(l["X-RequestID"]=String(r)),I(a,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...s.headers},i.data=M(t,i,e),{url:S(a),options:i}},deleteGroup:async(t,r,s={})=>{_("deleteGroup","groupId",t);const n="/api/groups/{groupId}".replace("{groupId}",encodeURIComponent(String(t))),a=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...s},l={},c={};r!=null&&(l["X-RequestID"]=String(r)),I(a,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...s.headers},{url:S(a),options:i}},getAllGroups:async(t,r,s,n={})=>{const a="/api/groups",o=new URL(a,P);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...n},c={},d={};r!==void 0&&(d.page=r),s!==void 0&&(d.size=s),t!=null&&(c["X-RequestID"]=String(t)),I(o,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},{url:S(o),options:l}},getAllPersonsByGroupId:async(t,r,s,n,a={})=>{_("getAllPersonsByGroupId","groupId",t);const o="/api/groups/{groupId}/persons".replace("{groupId}",encodeURIComponent(String(t))),i=new URL(o,P);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...a},d={},p={};s!==void 0&&(p.page=s),n!==void 0&&(p.size=n),r!=null&&(d["X-RequestID"]=String(r)),I(i,p);let m=l&&l.headers?l.headers:{};return c.headers={...d,...m,...a.headers},{url:S(i),options:c}},getGroup:async(t,r,s={})=>{_("getGroup","groupId",t);const n="/api/groups/{groupId}".replace("{groupId}",encodeURIComponent(String(t))),a=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...s},l={},c={};r!=null&&(l["X-RequestID"]=String(r)),I(a,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...s.headers},{url:S(a),options:i}},updateGroup:async(t,r,s,n={})=>{_("updateGroup","groupId",t),_("updateGroup","groupToCreate",r);const a="/api/groups/{groupId}".replace("{groupId}",encodeURIComponent(String(t))),o=new URL(a,P);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...n},c={},d={};c["Content-Type"]="application/json",s!=null&&(c["X-RequestID"]=String(s)),I(o,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},l.data=M(r,l,e),{url:S(o),options:l}},updatePersonsInGroup:async(t,r,s,n={})=>{_("updatePersonsInGroup","groupId",t),_("updatePersonsInGroup","updateGroup",r);const a="/api/groups/{groupId}/persons".replace("{groupId}",encodeURIComponent(String(t))),o=new URL(a,P);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...n},c={},d={};c["Content-Type"]="application/json",s!=null&&(c["X-RequestID"]=String(s)),I(o,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},l.data=M(r,l,e),{url:S(o),options:l}}}},z=function(e){const t=ws(e);return{async createGroup(r,s,n){const a=await t.createGroup(r,s,n),o=e?.serverIndex??0,i=R["GroupApi.createGroup"]?.[o]?.url;return(l,c)=>b(a,A,T,e)(l,i||c)},async deleteGroup(r,s,n){const a=await t.deleteGroup(r,s,n),o=e?.serverIndex??0,i=R["GroupApi.deleteGroup"]?.[o]?.url;return(l,c)=>b(a,A,T,e)(l,i||c)},async getAllGroups(r,s,n,a){const o=await t.getAllGroups(r,s,n,a),i=e?.serverIndex??0,l=R["GroupApi.getAllGroups"]?.[i]?.url;return(c,d)=>b(o,A,T,e)(c,l||d)},async getAllPersonsByGroupId(r,s,n,a,o){const i=await t.getAllPersonsByGroupId(r,s,n,a,o),l=e?.serverIndex??0,c=R["GroupApi.getAllPersonsByGroupId"]?.[l]?.url;return(d,p)=>b(i,A,T,e)(d,c||p)},async getGroup(r,s,n){const a=await t.getGroup(r,s,n),o=e?.serverIndex??0,i=R["GroupApi.getGroup"]?.[o]?.url;return(l,c)=>b(a,A,T,e)(l,i||c)},async updateGroup(r,s,n,a){const o=await t.updateGroup(r,s,n,a),i=e?.serverIndex??0,l=R["GroupApi.updateGroup"]?.[i]?.url;return(c,d)=>b(o,A,T,e)(c,l||d)},async updatePersonsInGroup(r,s,n,a){const o=await t.updatePersonsInGroup(r,s,n,a),i=e?.serverIndex??0,l=R["GroupApi.updatePersonsInGroup"]?.[i]?.url;return(c,d)=>b(o,A,T,e)(c,l||d)}}};let Cs=class extends ee{createGroup(t,r,s){return z(this.configuration).createGroup(t,r,s).then(n=>n(this.axios,this.basePath))}deleteGroup(t,r,s){return z(this.configuration).deleteGroup(t,r,s).then(n=>n(this.axios,this.basePath))}getAllGroups(t,r,s,n){return z(this.configuration).getAllGroups(t,r,s,n).then(a=>a(this.axios,this.basePath))}getAllPersonsByGroupId(t,r,s,n,a){return z(this.configuration).getAllPersonsByGroupId(t,r,s,n,a).then(o=>o(this.axios,this.basePath))}getGroup(t,r,s){return z(this.configuration).getGroup(t,r,s).then(n=>n(this.axios,this.basePath))}updateGroup(t,r,s,n){return z(this.configuration).updateGroup(t,r,s,n).then(a=>a(this.axios,this.basePath))}updatePersonsInGroup(t,r,s,n){return z(this.configuration).updatePersonsInGroup(t,r,s,n).then(a=>a(this.axios,this.basePath))}};class kt{constructor(t,r,s){this.superClass=new Cs(t,r,s)}async createGroup(t,r,s){const n={...t,metadata:t?.metadata?t.metadata:{}};return(await this.superClass.createGroup(n,r,s)).data}async deleteGroup(t,r,s){await this.superClass.deleteGroup(t,r,s)}async getAllGroups(t,r,s,n){return(await this.superClass.getAllGroups(s,t,r,n)).data}async getAllPersonsByGroupId(t,r,s,n,a){return(await this.superClass.getAllPersonsByGroupId(s,n,t,r,a)).data}async getGroup(t,r,s){return(await this.superClass.getGroup(t,r,s)).data}async updateGroup(t,r,s,n){await this.superClass.updateGroup(t,r,s,n)}async updatePersonsInGroup(t,r,s,n){await this.superClass.updatePersonsInGroup(t,r,s,n)}}const Ls=function(e){return{addImageToPerson:async(t,r,s,n={})=>{_("addImageToPerson","personId",t),_("addImageToPerson","addImageToPersonRequest",r);const a="/api/persons/{personId}/images".replace("{personId}",encodeURIComponent(String(t))),o=new URL(a,P);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...n},c={},d={};c["Content-Type"]="application/json",s!=null&&(c["X-RequestID"]=String(s)),I(o,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},l.data=M(r,l,e),{url:S(o),options:l}},createPerson:async(t,r,s={})=>{_("createPerson","personFields",t);const n="/api/persons",a=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...s},l={},c={};l["Content-Type"]="application/json",r!=null&&(l["X-RequestID"]=String(r)),I(a,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...s.headers},i.data=M(t,i,e),{url:S(a),options:i}},deleteImageOfPerson:async(t,r,s,n={})=>{_("deleteImageOfPerson","personId",t),_("deleteImageOfPerson","imageId",r);const a="/api/persons/{personId}/images/{imageId}".replace("{personId}",encodeURIComponent(String(t))).replace("{imageId}",encodeURIComponent(String(r))),o=new URL(a,P);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...n},c={},d={};s!=null&&(c["X-RequestID"]=String(s)),I(o,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},{url:S(o),options:l}},deletePerson:async(t,r,s={})=>{_("deletePerson","personId",t);const n="/api/persons/{personId}".replace("{personId}",encodeURIComponent(String(t))),a=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...s},l={},c={};r!=null&&(l["X-RequestID"]=String(r)),I(a,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...s.headers},{url:S(a),options:i}},getAllGroupsByPersonId:async(t,r,s,n,a={})=>{_("getAllGroupsByPersonId","personId",t);const o="/api/persons/{personId}/groups".replace("{personId}",encodeURIComponent(String(t))),i=new URL(o,P);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...a},d={},p={};s!==void 0&&(p.page=s),n!==void 0&&(p.size=n),r!=null&&(d["X-RequestID"]=String(r)),I(i,p);let m=l&&l.headers?l.headers:{};return c.headers={...d,...m,...a.headers},{url:S(i),options:c}},getAllImagesByPersonId:async(t,r,s,n,a={})=>{_("getAllImagesByPersonId","personId",t);const o="/api/persons/{personId}/images".replace("{personId}",encodeURIComponent(String(t))),i=new URL(o,P);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...a},d={},p={};s!==void 0&&(p.page=s),n!==void 0&&(p.size=n),r!=null&&(d["X-RequestID"]=String(r)),I(i,p);let m=l&&l.headers?l.headers:{};return c.headers={...d,...m,...a.headers},{url:S(i),options:c}},getImageOfPerson:async(t,r,s,n={})=>{_("getImageOfPerson","personId",t),_("getImageOfPerson","imageId",r);const a="/api/persons/{personId}/images/{imageId}".replace("{personId}",encodeURIComponent(String(t))).replace("{imageId}",encodeURIComponent(String(r))),o=new URL(a,P);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...n},c={},d={};s!=null&&(c["X-RequestID"]=String(s)),I(o,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},{url:S(o),options:l}},getPerson:async(t,r,s={})=>{_("getPerson","personId",t);const n="/api/persons/{personId}".replace("{personId}",encodeURIComponent(String(t))),a=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...s},l={},c={};r!=null&&(l["X-RequestID"]=String(r)),I(a,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...s.headers},{url:S(a),options:i}},updatePerson:async(t,r,s,n={})=>{_("updatePerson","personId",t),_("updatePerson","personToUpdateFields",r);const a="/api/persons/{personId}".replace("{personId}",encodeURIComponent(String(t))),o=new URL(a,P);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...n},c={},d={};c["Content-Type"]="application/json",s!=null&&(c["X-RequestID"]=String(s)),I(o,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},l.data=M(r,l,e),{url:S(o),options:l}}}},v=function(e){const t=Ls(e);return{async addImageToPerson(r,s,n,a){const o=await t.addImageToPerson(r,s,n,a),i=e?.serverIndex??0,l=R["PersonApi.addImageToPerson"]?.[i]?.url;return(c,d)=>b(o,A,T,e)(c,l||d)},async createPerson(r,s,n){const a=await t.createPerson(r,s,n),o=e?.serverIndex??0,i=R["PersonApi.createPerson"]?.[o]?.url;return(l,c)=>b(a,A,T,e)(l,i||c)},async deleteImageOfPerson(r,s,n,a){const o=await t.deleteImageOfPerson(r,s,n,a),i=e?.serverIndex??0,l=R["PersonApi.deleteImageOfPerson"]?.[i]?.url;return(c,d)=>b(o,A,T,e)(c,l||d)},async deletePerson(r,s,n){const a=await t.deletePerson(r,s,n),o=e?.serverIndex??0,i=R["PersonApi.deletePerson"]?.[o]?.url;return(l,c)=>b(a,A,T,e)(l,i||c)},async getAllGroupsByPersonId(r,s,n,a,o){const i=await t.getAllGroupsByPersonId(r,s,n,a,o),l=e?.serverIndex??0,c=R["PersonApi.getAllGroupsByPersonId"]?.[l]?.url;return(d,p)=>b(i,A,T,e)(d,c||p)},async getAllImagesByPersonId(r,s,n,a,o){const i=await t.getAllImagesByPersonId(r,s,n,a,o),l=e?.serverIndex??0,c=R["PersonApi.getAllImagesByPersonId"]?.[l]?.url;return(d,p)=>b(i,A,T,e)(d,c||p)},async getImageOfPerson(r,s,n,a){const o=await t.getImageOfPerson(r,s,n,a),i=e?.serverIndex??0,l=R["PersonApi.getImageOfPerson"]?.[i]?.url;return(c,d)=>b(o,A,T,e)(c,l||d)},async getPerson(r,s,n){const a=await t.getPerson(r,s,n),o=e?.serverIndex??0,i=R["PersonApi.getPerson"]?.[o]?.url;return(l,c)=>b(a,A,T,e)(l,i||c)},async updatePerson(r,s,n,a){const o=await t.updatePerson(r,s,n,a),i=e?.serverIndex??0,l=R["PersonApi.updatePerson"]?.[i]?.url;return(c,d)=>b(o,A,T,e)(c,l||d)}}};let Vs=class extends ee{addImageToPerson(t,r,s,n){return v(this.configuration).addImageToPerson(t,r,s,n).then(a=>a(this.axios,this.basePath))}createPerson(t,r,s){return v(this.configuration).createPerson(t,r,s).then(n=>n(this.axios,this.basePath))}deleteImageOfPerson(t,r,s,n){return v(this.configuration).deleteImageOfPerson(t,r,s,n).then(a=>a(this.axios,this.basePath))}deletePerson(t,r,s){return v(this.configuration).deletePerson(t,r,s).then(n=>n(this.axios,this.basePath))}getAllGroupsByPersonId(t,r,s,n,a){return v(this.configuration).getAllGroupsByPersonId(t,r,s,n,a).then(o=>o(this.axios,this.basePath))}getAllImagesByPersonId(t,r,s,n,a){return v(this.configuration).getAllImagesByPersonId(t,r,s,n,a).then(o=>o(this.axios,this.basePath))}getImageOfPerson(t,r,s,n){return v(this.configuration).getImageOfPerson(t,r,s,n).then(a=>a(this.axios,this.basePath))}getPerson(t,r,s){return v(this.configuration).getPerson(t,r,s).then(n=>n(this.axios,this.basePath))}updatePerson(t,r,s,n){return v(this.configuration).updatePerson(t,r,s,n).then(a=>a(this.axios,this.basePath))}};class qt{constructor(t,r,s){this.superClass=new Vs(t,r,s)}async createPerson(t,r,s){const n={...t,metadata:t?.metadata?t.metadata:{}};return(await this.superClass.createPerson(n,r,s)).data}async addImageToPerson(t,r,s,n){return r?.image?.content&&typeof r.image.content!="string"&&(r.image.content=Ae(r.image.content)),(await this.superClass.addImageToPerson(t,r,s,n)).data}async deleteImageOfPerson(t,r,s,n){await this.superClass.deleteImageOfPerson(r,t,s,n)}async deletePerson(t,r,s){await this.superClass.deletePerson(t,r,s)}async getAllGroupsByPersonId(t,r,s,n,a){return(await this.superClass.getAllGroupsByPersonId(s,n,t,r,a)).data}async getAllImagesByPersonId(t,r,s,n,a){return(await this.superClass.getAllImagesByPersonId(s,n,t,r,a)).data}async getImageOfPerson(t,r,s,n){return(await this.superClass.getImageOfPerson(r,t,s,n)).data}async getPerson(t,r,s){return(await this.superClass.getPerson(t,r,s)).data}async updatePerson(t,r,s,n){await this.superClass.updatePerson(t,r,s,n)}}const gs=function(e){return{search:async(t,r,s,n={})=>{_("search","searchRequest",t);const a="/api/search",o=new URL(a,P);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...n},c={},d={};s!==void 0&&(d.withImages=s),c["Content-Type"]="application/json",r!=null&&(c["X-RequestID"]=String(r)),I(o,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},l.data=M(t,l,e),{url:S(o),options:l}}}},Ns=function(e){const t=gs(e);return{async search(r,s,n,a){const o=await t.search(r,s,n,a),i=e?.serverIndex??0,l=R["SearchApi.search"]?.[i]?.url;return(c,d)=>b(o,A,T,e)(c,l||d)}}};let Us=class extends ee{search(t,r,s,n){return Ns(this.configuration).search(t,r,s,n).then(a=>a(this.axios,this.basePath))}};class zt{constructor(t,r,s){this.superClass=new Us(t,r,s)}async search(t,r,s,n){return t?.image?.content&&typeof t.image.content!="string"&&(t.image.content=Ae(t.image.content)),(await this.superClass.search(t,r,s,n)).data}}const xs=function(e){return{deleteLivenessTransaction:async(t,r,s={})=>{_("deleteLivenessTransaction","transactionId",t),_("deleteLivenessTransaction","tag",r);const n="/api/v2/liveness",a=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...s},l={},c={};t!==void 0&&(c.transactionId=t),r!==void 0&&(c.tag=r),I(a,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...s.headers},{url:S(a),options:i}},getLivenessTransactionInfo:async(t,r={})=>{_("getLivenessTransactionInfo","transactionId",t);const s="/api/v2/liveness",n=new URL(s,P);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...r},i={},l={};t!==void 0&&(l.transactionId=t),I(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...r.headers},{url:S(n),options:o}}}},at=function(e){const t=xs(e);return{async deleteLivenessTransaction(r,s,n){const a=await t.deleteLivenessTransaction(r,s,n),o=e?.serverIndex??0,i=R["Liveness20Api.deleteLivenessTransaction"]?.[o]?.url;return(l,c)=>b(a,A,T,e)(l,i||c)},async getLivenessTransactionInfo(r,s){const n=await t.getLivenessTransactionInfo(r,s),a=e?.serverIndex??0,o=R["Liveness20Api.getLivenessTransactionInfo"]?.[a]?.url;return(i,l)=>b(n,A,T,e)(i,o||l)}}};let Ds=class extends ee{deleteLivenessTransaction(t,r,s){return at(this.configuration).deleteLivenessTransaction(t,r,s).then(n=>n(this.axios,this.basePath))}getLivenessTransactionInfo(t,r){return at(this.configuration).getLivenessTransactionInfo(t,r).then(s=>s(this.axios,this.basePath))}};class $t{constructor(t,r,s){this.superClass=new Ds(t,r,s)}async getLivenessTransactionInfo(t,r){return(await this.superClass.getLivenessTransactionInfo(t,r)).data}}const Hs=function(e){return{healthz:async(t,r={})=>{const s="/api/healthz",n=new URL(s,P);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...r},i={},l={};t!=null&&(i["X-RequestID"]=String(t)),I(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...r.headers},{url:S(n),options:o}},readyz:async(t,r={})=>{const s="/api/readyz",n=new URL(s,P);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...r},i={},l={};t!=null&&(i["X-RequestID"]=String(t)),I(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...r.headers},{url:S(n),options:o}}}},it=function(e){const t=Hs(e);return{async healthz(r,s){const n=await t.healthz(r,s),a=e?.serverIndex??0,o=R["HealthcheckApi.healthz"]?.[a]?.url;return(i,l)=>b(n,A,T,e)(i,o||l)},async readyz(r,s){const n=await t.readyz(r,s),a=e?.serverIndex??0,o=R["HealthcheckApi.readyz"]?.[a]?.url;return(i,l)=>b(n,A,T,e)(i,o||l)}}};let Bs=class extends ee{healthz(t,r){return it(this.configuration).healthz(t,r).then(s=>s(this.axios,this.basePath))}readyz(t,r){return it(this.configuration).readyz(t,r).then(s=>s(this.axios,this.basePath))}};class Wt{constructor(t,r,s){this.superClass=new Bs(t,r,s)}async healthz(t,r){return(await this.superClass.healthz(t,r)).data}async readyz(t,r){return(await this.superClass.readyz(t,r)).data}}class Gs{constructor(t,r=T,s=A){this.basePath=r,this.axios=s,this.matchApi=new Ft(t,r,s),this.groupApi=new kt(t,r,s),this.personApi=new qt(t,r,s),this.searchApi=new zt(t,r,s),this.livenessApi=new $t(t,r,s),this.healthcheckApi=new Wt(t,r,s)}}class Ms{constructor(t={}){this.apiKey=t.apiKey,this.username=t.username,this.password=t.password,this.accessToken=t.accessToken,this.basePath=t.basePath,this.serverIndex=t.serverIndex,this.baseOptions={...t.baseOptions,headers:{...t.baseOptions?.headers}},this.formDataCtor=t.formDataCtor}isJsonMime(t){const r=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return t!==null&&(r.test(t)||t.toLowerCase()==="application/json-patch+json")}}exports.Configuration=Ms;exports.FaceAttribute=Nt;exports.FaceImageQualityAlignType=Ut;exports.FaceImageQualityGroups=xt;exports.FaceImageQualityGroupsStrings=Dt;exports.FaceImageQualityStatus=Ht;exports.FaceQualityConfigName=Bt;exports.FaceQualityScenarios=Gt;exports.FaceSDKResultCode=Mt;exports.FaceSdk=Gs;exports.FilterOp=vt;exports.GroupApi=kt;exports.HealthcheckApi=Wt;exports.ImageSource=Be;exports.Liveness20Api=$t;exports.LivenessType=jt;exports.MatchApi=Ft;exports.PersonApi=qt;exports.SearchApi=zt;
|