@regulaforensics/facesdk-webclient 8.2.597-nightly → 8.2.599-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 +9 -6
- package/dist/index.js +710 -611
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function ct(e,t){return function(){return e.apply(t,arguments)}}const{toString:Yt}=Object.prototype,{getPrototypeOf:Ue}=Object,{iterator:Oe,toStringTag:dt}=Symbol,_e=(e=>t=>{const r=Yt.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),G=e=>(e=e.toLowerCase(),t=>_e(t)===e),me=e=>t=>typeof t===e,{isArray:K}=Array,Z=me("undefined");function re(e){return e!==null&&!Z(e)&&e.constructor!==null&&!Z(e.constructor)&&N(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ut=G("ArrayBuffer");function Xt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ut(e.buffer),t}const Jt=me("string"),N=me("function"),pt=me("number"),se=e=>e!==null&&typeof e=="object",Zt=e=>e===!0||e===!1,pe=e=>{if(_e(e)!=="object")return!1;const t=Ue(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(dt in e)&&!(Oe in e)},Kt=e=>{if(!se(e)||re(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Qt=G("Date"),er=G("File"),tr=G("Blob"),rr=G("FileList"),sr=e=>se(e)&&N(e.pipe),nr=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||N(e.append)&&((t=_e(e))==="formdata"||t==="object"&&N(e.toString)&&e.toString()==="[object FormData]"))},or=G("URLSearchParams"),[ar,ir,lr,cr]=["ReadableStream","Request","Response","Headers"].map(G),dr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ne(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(re(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let i;for(s=0;s<a;s++)i=o[s],t.call(null,e[i],i,e)}}function ht(e,t){if(re(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 z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ft=e=>!Z(e)&&e!==z;function Ce(){const{caseless:e,skipUndefined:t}=ft(this)&&this||{},r={},s=(n,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const a=e&&ht(r,o)||o;pe(r[a])&&pe(n)?r[a]=Ce(r[a],n):pe(n)?r[a]=Ce({},n):K(n)?r[a]=n.slice():(!t||!Z(n))&&(r[a]=n)};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&ne(arguments[n],s);return r}const ur=(e,t,r,{allOwnKeys:s}={})=>(ne(t,(n,o)=>{r&&N(n)?Object.defineProperty(e,o,{value:ct(n,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:n,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:s}),e),pr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),hr=(e,t,r,s)=>{e.prototype=Object.create(t.prototype,s),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},fr=(e,t,r,s)=>{let n,o,a;const i={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),o=n.length;o-- >0;)a=n[o],(!s||s(a,e,t))&&!i[a]&&(t[a]=e[a],i[a]=!0);e=r!==!1&&Ue(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Er=(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},Ar=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!pt(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Or=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ue(Uint8Array)),_r=(e,t)=>{const s=(e&&e[Oe]).call(e);let n;for(;(n=s.next())&&!n.done;){const o=n.value;t.call(e,o[0],o[1])}},mr=(e,t)=>{let r;const s=[];for(;(r=e.exec(t))!==null;)s.push(r);return s},Rr=G("HTMLFormElement"),Tr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,s,n){return s.toUpperCase()+n}),$e=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Pr=G("RegExp"),Et=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),s={};ne(r,(n,o)=>{let a;(a=t(n,o,e))!==!1&&(s[o]=a||n)}),Object.defineProperties(e,s)},Ir=e=>{Et(e,(t,r)=>{if(N(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const s=e[r];if(N(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+"'")})}})},Sr=(e,t)=>{const r={},s=n=>{n.forEach(o=>{r[o]=!0})};return K(e)?s(e):s(String(e).split(t)),r},br=()=>{},yr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function wr(e){return!!(e&&N(e.append)&&e[dt]==="FormData"&&e[Oe])}const Cr=e=>{const t=new Array(10),r=(s,n)=>{if(se(s)){if(t.indexOf(s)>=0)return;if(re(s))return s;if(!("toJSON"in s)){t[n]=s;const o=K(s)?[]:{};return ne(s,(a,i)=>{const l=r(a,n+1);!Z(l)&&(o[i]=l)}),t[n]=void 0,o}}return s};return r(e,0)},Lr=G("AsyncFunction"),gr=e=>e&&(se(e)||N(e))&&N(e.then)&&N(e.catch),At=((e,t)=>e?setImmediate:t?((r,s)=>(z.addEventListener("message",({source:n,data:o})=>{n===z&&o===r&&s.length&&s.shift()()},!1),n=>{s.push(n),z.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",N(z.postMessage)),Vr=typeof queueMicrotask<"u"?queueMicrotask.bind(z):typeof process<"u"&&process.nextTick||At,Nr=e=>e!=null&&N(e[Oe]),u={isArray:K,isArrayBuffer:ut,isBuffer:re,isFormData:nr,isArrayBufferView:Xt,isString:Jt,isNumber:pt,isBoolean:Zt,isObject:se,isPlainObject:pe,isEmptyObject:Kt,isReadableStream:ar,isRequest:ir,isResponse:lr,isHeaders:cr,isUndefined:Z,isDate:Qt,isFile:er,isBlob:tr,isRegExp:Pr,isFunction:N,isStream:sr,isURLSearchParams:or,isTypedArray:Or,isFileList:rr,forEach:ne,merge:Ce,extend:ur,trim:dr,stripBOM:pr,inherits:hr,toFlatObject:fr,kindOf:_e,kindOfTest:G,endsWith:Er,toArray:Ar,forEachEntry:_r,matchAll:mr,isHTMLForm:Rr,hasOwnProperty:$e,hasOwnProp:$e,reduceDescriptors:Et,freezeMethods:Ir,toObjectSet:Sr,toCamelCase:Tr,noop:br,toFiniteNumber:yr,findKey:ht,global:z,isContextDefined:ft,isSpecCompliantForm:wr,toJSONObject:Cr,isAsyncFn:Lr,isThenable:gr,setImmediate:At,asap:Vr,isIterable:Nr};let A=class Ot extends Error{static from(t,r,s,n,o,a){const i=new Ot(t.message,r||t.code,s,n,o);return i.cause=t,i.name=t.name,a&&Object.assign(i,a),i}constructor(t,r,s,n,o){super(t),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),s&&(this.config=s),n&&(this.request=n),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:u.toJSONObject(this.config),code:this.code,status:this.status}}};A.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";A.ERR_BAD_OPTION="ERR_BAD_OPTION";A.ECONNABORTED="ECONNABORTED";A.ETIMEDOUT="ETIMEDOUT";A.ERR_NETWORK="ERR_NETWORK";A.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";A.ERR_DEPRECATED="ERR_DEPRECATED";A.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";A.ERR_BAD_REQUEST="ERR_BAD_REQUEST";A.ERR_CANCELED="ERR_CANCELED";A.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";A.ERR_INVALID_URL="ERR_INVALID_URL";const Ur=null;function Le(e){return u.isPlainObject(e)||u.isArray(e)}function _t(e){return u.endsWith(e,"[]")?e.slice(0,-2):e}function ze(e,t,r){return e?e.concat(t).map(function(n,o){return n=_t(n),!r&&o?"["+n+"]":n}).join(r?".":""):t}function xr(e){return u.isArray(e)&&!e.some(Le)}const Dr=u.toFlatObject(u,{},null,function(t){return/^is[A-Z]/.test(t)});function Re(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,o=r.dots,a=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 A("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)&&xr(h)||(u.isFileList(h)||u.endsWith(E,"[]"))&&(y=u.toArray(h)))return E=_t(E),y.forEach(function(w,g){!(u.isUndefined(w)||w===null)&&t.append(a===!0?ze([E],g,o):a===null?E:E+"[]",c(w))}),!1}return Le(h)?!0:(t.append(ze(f,E,o),c(h)),!1)}const p=[],_=Object.assign(Dr,{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,x){(!(u.isUndefined(y)||y===null)&&n.call(t,y,u.isString(x)?x.trim():x,E,_))===!0&&C(y,E?E.concat(x):[x])}),p.pop()}}if(!u.isObject(e))throw new TypeError("data must be an object");return C(e),t}function We(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function xe(e,t){this._pairs=[],e&&Re(e,this,t)}const mt=xe.prototype;mt.append=function(t,r){this._pairs.push([t,r])};mt.toString=function(t){const r=t?function(s){return t.call(this,s,We)}:We;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 Rt(e,t,r){if(!t)return e;const s=r&&r.encode||Br,n=u.isFunction(r)?{serialize:r}:r,o=n&&n.serialize;let a;if(o?a=o(t,n):a=u.isURLSearchParams(t)?t.toString():new xe(t,n).toString(s),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Ye{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 De={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Hr=typeof URLSearchParams<"u"?URLSearchParams:xe,Gr=typeof FormData<"u"?FormData:null,Mr=typeof Blob<"u"?Blob:null,vr={isBrowser:!0,classes:{URLSearchParams:Hr,FormData:Gr,Blob:Mr},protocols:["http","https","file","blob","url","data"]},Be=typeof window<"u"&&typeof document<"u",ge=typeof navigator=="object"&&navigator||void 0,jr=Be&&(!ge||["ReactNative","NativeScript","NS"].indexOf(ge.product)<0),Fr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kr=Be&&window.location.href||"http://localhost",qr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Be,hasStandardBrowserEnv:jr,hasStandardBrowserWebWorkerEnv:Fr,navigator:ge,origin:kr},Symbol.toStringTag,{value:"Module"})),L={...qr,...vr};function $r(e,t){return Re(e,new L.classes.URLSearchParams,{visitor:function(r,s,n,o){return L.isNode&&u.isBuffer(r)?(this.append(s,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function zr(e){return u.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Wr(e){const t={},r=Object.keys(e);let s;const n=r.length;let o;for(s=0;s<n;s++)o=r[s],t[o]=e[o];return t}function Tt(e){function t(r,s,n,o){let a=r[o++];if(a==="__proto__")return!0;const i=Number.isFinite(+a),l=o>=r.length;return a=!a&&u.isArray(n)?n.length:a,l?(u.hasOwnProp(n,a)?n[a]=[n[a],s]:n[a]=s,!i):((!n[a]||!u.isObject(n[a]))&&(n[a]=[]),t(r,s,n[a],o)&&u.isArray(n[a])&&(n[a]=Wr(n[a])),!i)}if(u.isFormData(e)&&u.isFunction(e.entries)){const r={};return u.forEachEntry(e,(s,n)=>{t(zr(s),n,r,0)}),r}return null}function Yr(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 oe={transitional:De,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const s=r.getContentType()||"",n=s.indexOf("application/json")>-1,o=u.isObject(t);if(o&&u.isHTMLForm(t)&&(t=new FormData(t)),u.isFormData(t))return n?JSON.stringify(Tt(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(o){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 Re(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||n?(r.setContentType("application/json",!1),Yr(t)):t}],transformResponse:[function(t){const r=this.transitional||oe.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 a=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(t,this.parseReviver)}catch(i){if(a)throw i.name==="SyntaxError"?A.from(i,A.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=>{oe.headers[e]={}});const Xr=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"]),Jr=e=>{const t={};let r,s,n;return e&&e.split(`
|
|
2
|
-
`).forEach(function(a){n=a.indexOf(":"),r=a.substring(0,n).trim().toLowerCase(),s=a.substring(n+1).trim(),!(!r||t[r]&&
|
|
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[Xe]=this[Xe]={accessors:{}}).accessors,n=this.prototype;function o(a){const i=te(a);s[i]||(es(n,a),s[i]=!0)}return u.isArray(t)?t.forEach(o):o(t),this}};U.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);u.reduceDescriptors(U.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[r]=s}}});u.freezeMethods(U);function be(e,t){const r=this||oe,s=t||r,n=U.from(s.headers);let o=s.data;return u.forEach(e,function(i){o=i.call(r,o,n.normalize(),t?t.status:void 0)}),n.normalize(),o}function Pt(e){return!!(e&&e.__CANCEL__)}let ae=class extends A{constructor(t,r,s){super(t??"canceled",A.ERR_CANCELED,r,s),this.name="CanceledError",this.__CANCEL__=!0}};function It(e,t,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?e(r):t(new A("Request failed with status code "+r.status,[A.ERR_BAD_REQUEST,A.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function ts(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function rs(e,t){e=e||10;const r=new Array(e),s=new Array(e);let n=0,o=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),d=s[o];a||(a=c),r[n]=l,s[n]=c;let p=o,_=0;for(;p!==n;)_+=r[p++],p=p%e;if(n=(n+1)%e,n===o&&(o=(o+1)%e),c-a<t)return;const C=d&&c-d;return C?Math.round(_*1e3/C):void 0}}function ss(e,t){let r=0,s=1e3/t,n,o;const a=(c,d=Date.now())=>{r=d,n=null,o&&(clearTimeout(o),o=null),e(...c)};return[(...c)=>{const d=Date.now(),p=d-r;p>=s?a(c,d):(n=c,o||(o=setTimeout(()=>{o=null,a(n)},s-p)))},()=>n&&a(n)]}const Ee=(e,t,r=3)=>{let s=0;const n=rs(50,250);return ss(o=>{const a=o.loaded,i=o.lengthComputable?o.total:void 0,l=a-s,c=n(l),d=a<=i;s=a;const p={loaded:a,total:i,progress:i?a/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i&&d?(i-a)/c:void 0,event:o,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(p)},r)},Je=(e,t)=>{const r=e!=null;return[s=>t[0]({lengthComputable:r,total:e,loaded:s}),t[1]]},Ze=e=>(...t)=>u.asap(()=>e(...t)),ns=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,os=L.hasStandardBrowserEnv?{write(e,t,r,s,n,o,a){if(typeof document>"u")return;const i=[`${e}=${encodeURIComponent(t)}`];u.isNumber(r)&&i.push(`expires=${new Date(r).toUTCString()}`),u.isString(s)&&i.push(`path=${s}`),u.isString(n)&&i.push(`domain=${n}`),o===!0&&i.push("secure"),u.isString(a)&&i.push(`SameSite=${a}`),document.cookie=i.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function as(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function is(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function St(e,t,r){let s=!as(t);return e&&(s||r==!1)?is(e,t):t}const Ke=e=>e instanceof U?{...e}:e;function Y(e,t){t=t||{};const r={};function s(c,d,p,_){return u.isPlainObject(c)&&u.isPlainObject(d)?u.merge.call({caseless:_},c,d):u.isPlainObject(d)?u.merge({},d):u.isArray(d)?d.slice():d}function n(c,d,p,_){if(u.isUndefined(d)){if(!u.isUndefined(c))return s(void 0,c,p,_)}else return s(c,d,p,_)}function o(c,d){if(!u.isUndefined(d))return s(void 0,d)}function a(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: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:(c,d,p)=>n(Ke(c),Ke(d),p,!0)};return u.forEach(Object.keys({...e,...t}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const p=u.hasOwnProp(l,d)?l[d]:n,_=p(e[d],t[d],d);u.isUndefined(_)&&p!==i||(r[d]=_)}),r}const bt=e=>{const t=Y({},e);let{data:r,withXSRFToken:s,xsrfHeaderName:n,xsrfCookieName:o,headers:a,auth:i}=t;if(t.headers=a=U.from(a),t.url=Rt(St(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),u.isFormData(r)){if(L.hasStandardBrowserEnv||L.hasStandardBrowserWebWorkerEnv)a.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())&&a.set(d,p)})}}if(L.hasStandardBrowserEnv&&(s&&u.isFunction(s)&&(s=s(t)),s||s!==!1&&ns(t.url))){const l=n&&o&&os.read(o);l&&a.set(n,l)}return t},ls=typeof XMLHttpRequest<"u",cs=ls&&function(e){return new Promise(function(r,s){const n=bt(e);let o=n.data;const a=U.from(n.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:c}=n,d,p,_,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=U.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),H={data:!i||i==="text"||i==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:w,config:e,request:f};It(function(D){r(D),E()},function(D){s(D),E()},H),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 A("Request aborted",A.ECONNABORTED,e,f)),f=null)},f.onerror=function(g){const H=g&&g.message?g.message:"Network Error",k=new A(H,A.ERR_NETWORK,e,f);k.event=g||null,s(k),f=null},f.ontimeout=function(){let g=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const H=n.transitional||De;n.timeoutErrorMessage&&(g=n.timeoutErrorMessage),s(new A(g,H.clarifyTimeoutError?A.ETIMEDOUT:A.ECONNABORTED,e,f)),f=null},o===void 0&&a.setContentType(null),"setRequestHeader"in f&&u.forEach(a.toJSON(),function(g,H){f.setRequestHeader(H,g)}),u.isUndefined(n.withCredentials)||(f.withCredentials=!!n.withCredentials),i&&i!=="json"&&(f.responseType=n.responseType),c&&([_,h]=Ee(c,!0),f.addEventListener("progress",_)),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 ae(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 x=ts(n.url);if(x&&L.protocols.indexOf(x)===-1){s(new A("Unsupported protocol "+x+":",A.ERR_BAD_REQUEST,e));return}f.send(o||null)})},ds=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let s=new AbortController,n;const o=function(c){if(!n){n=!0,i();const d=c instanceof Error?c:this.reason;s.abort(d instanceof A?d:new ae(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,o(new A(`timeout of ${t}ms exceeded`,A.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),e=null)};e.forEach(c=>c.addEventListener("abort",o));const{signal:l}=s;return l.unsubscribe=()=>u.asap(i),l}},us=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},ps=async function*(e,t){for await(const r of hs(e))yield*us(r,t)},hs=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()}},Qe=(e,t,r,s)=>{const n=ps(e,t);let o=0,a,i=l=>{a||(a=!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 _=o+=p;r(_)}l.enqueue(new Uint8Array(d))}catch(c){throw i(c),c}},cancel(l){return i(l),n.return()}},{highWaterMark:2})},et=64*1024,{isFunction:de}=u,fs=(({Request:e,Response:t})=>({Request:e,Response:t}))(u.global),{ReadableStream:tt,TextEncoder:rt}=u.global,st=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Es=e=>{e=u.merge.call({skipUndefined:!0},fs,e);const{fetch:t,Request:r,Response:s}=e,n=t?de(t):typeof fetch=="function",o=de(r),a=de(s);if(!n)return!1;const i=n&&de(tt),l=n&&(typeof rt=="function"?(h=>E=>h.encode(E))(new rt):async h=>new Uint8Array(await new r(h).arrayBuffer())),c=o&&i&&st(()=>{let h=!1;const E=new r(L.origin,{body:new tt,method:"POST",get duplex(){return h=!0,"half"}}).headers.has("Content-Type");return h&&!E}),d=a&&i&&st(()=>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 A(`Response type '${h}' is not supported`,A.ERR_NOT_SUPPORT,f)})});const _=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??_(E)};return async h=>{let{url:E,method:f,data:y,signal:x,cancelToken:w,timeout:g,onDownloadProgress:H,onUploadProgress:k,responseType:D,headers:Pe,withCredentials:ie="same-origin",fetchOptions:Me}=bt(h),ve=t||fetch;D=D?(D+"").toLowerCase():"text";let le=ds([x,w&&w.toAbortSignal()],g),ee=null;const q=le&&le.unsubscribe&&(()=>{le.unsubscribe()});let je;try{if(k&&c&&f!=="get"&&f!=="head"&&(je=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]=Je(je,Ee(Ze(k)));y=Qe(F.body,et,Ie,ce)}}u.isString(ie)||(ie=ie?"include":"omit");const V=o&&"credentials"in r.prototype,Fe={...Me,signal:le,method:f.toUpperCase(),headers:Pe.normalize().toJSON(),body:y,duplex:"half",credentials:V?ie:void 0};ee=o&&new r(E,Fe);let j=await(o?ve(ee,Me):ve(E,Fe));const ke=d&&(D==="stream"||D==="response");if(d&&(H||ke&&q)){const F={};["status","statusText","headers"].forEach(qe=>{F[qe]=j[qe]});const X=u.toFiniteNumber(j.headers.get("content-length")),[Ie,ce]=H&&Je(X,Ee(Ze(H),!0))||[];j=new s(Qe(j.body,et,Ie,()=>{ce&&ce(),q&&q()}),F)}D=D||"text";let Wt=await p[u.findKey(p,D)||"text"](j,h);return!ke&&q&&q(),await new Promise((F,X)=>{It(F,X,{data:Wt,headers:U.from(j.headers),status:j.status,statusText:j.statusText,config:h,request:ee})})}catch(V){throw q&&q(),V&&V.name==="TypeError"&&/Load failed|fetch/i.test(V.message)?Object.assign(new A("Network Error",A.ERR_NETWORK,h,ee,V&&V.response),{cause:V.cause||V}):A.from(V,V&&V.code,h,ee,V&&V.response)}}},As=new Map,yt=e=>{let t=e&&e.env||{};const{fetch:r,Request:s,Response:n}=t,o=[s,n,r];let a=o.length,i=a,l,c,d=As;for(;i--;)l=o[i],c=d.get(l),c===void 0&&d.set(l,c=i?new Map:Es(t)),d=c;return c};yt();const He={http:Ur,xhr:cs,fetch:{get:yt}};u.forEach(He,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const nt=e=>`- ${e}`,Os=e=>u.isFunction(e)||e===null||e===!1;function _s(e,t){e=u.isArray(e)?e:[e];const{length:r}=e;let s,n;const o={};for(let a=0;a<r;a++){s=e[a];let i;if(n=s,!Os(s)&&(n=He[(i=String(s)).toLowerCase()],n===void 0))throw new A(`Unknown adapter '${i}'`);if(n&&(u.isFunction(n)||(n=n.get(t))))break;o[i||"#"+a]=n}if(!n){const a=Object.entries(o).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=r?a.length>1?`since :
|
|
4
|
-
`+a.map(
|
|
5
|
-
`):" "+
|
|
6
|
-
`+o):s.stack=o}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:o}=r;s!==void 0&&fe.assertOptions(s,{silentJSONParsing:B.transitional(B.boolean),forcedJSONParsing:B.transitional(B.boolean),clarifyTimeoutError:B.transitional(B.boolean),legacyInterceptorReqResOrdering:B.transitional(B.boolean)},!1),n!=null&&(u.isFunction(n)?r.paramsSerializer={serialize:n}:fe.assertOptions(n,{encode:B.function,serialize:B.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),fe.assertOptions(r,{baseUrl:B.spelling("baseURL"),withXsrfToken:B.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=o&&u.merge(o.common,o[r.method]);o&&u.forEach(["delete","get","head","post","put","patch","common"],h=>{delete o[h]}),r.headers=U.concat(a,o);const i=[];let l=!0;this.interceptors.request.forEach(function(E){if(typeof E.runWhen=="function"&&E.runWhen(r)===!1)return;l=l&&E.synchronous;const f=r.transitional||De;f&&f.legacyInterceptorReqResOrdering?i.unshift(E.fulfilled,E.rejected):i.push(E.fulfilled,E.rejected)});const c=[];this.interceptors.response.forEach(function(E){c.push(E.fulfilled,E.rejected)});let d,p=0,_;if(!l){const h=[ot.bind(this),void 0];for(h.unshift(...i),h.push(...c),_=h.length,d=Promise.resolve(r);p<_;)d=d.then(h[p++],h[p++]);return d}_=i.length;let C=r;for(;p<_;){const h=i[p++],E=i[p++];try{C=h(C)}catch(f){E.call(this,f);break}}try{d=ot.call(this,C)}catch(h){return Promise.reject(h)}for(p=0,_=c.length;p<_;)d=d.then(c[p++],c[p++]);return d}getUri(t){t=Y(this.defaults,t);const r=St(t.baseURL,t.url,t.allowAbsoluteUrls);return Rt(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(o,a,i){return this.request(Y(i||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}W.prototype[t]=r(),W.prototype[t+"Form"]=r(!0)});let Rs=class Lt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const s=this;this.promise.then(n=>{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](n);s._listeners=null}),this.promise.then=n=>{let o;const a=new Promise(i=>{s.subscribe(i),o=i}).then(n);return a.cancel=function(){s.unsubscribe(o)},a},t(function(o,a,i){s.reason||(s.reason=new ae(o,a,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 Lt(function(n){t=n}),cancel:t}}};function Ts(e){return function(r){return e.apply(null,r)}}function Ps(e){return u.isObject(e)&&e.isAxiosError===!0}const Ve={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ve).forEach(([e,t])=>{Ve[t]=e});function gt(e){const t=new W(e),r=ct(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 O=gt(oe);O.Axios=W;O.CanceledError=ae;O.CancelToken=Rs;O.isCancel=Pt;O.VERSION=Ct;O.toFormData=Re;O.AxiosError=A;O.Cancel=O.CanceledError;O.all=function(t){return Promise.all(t)};O.spread=Ts;O.isAxiosError=Ps;O.mergeConfig=Y;O.AxiosHeaders=U;O.formToJSON=e=>Tt(u.isHTMLForm(e)?new FormData(e):e);O.getAdapter=wt.getAdapter;O.HttpStatusCode=Ve;O.default=O;const{Axios:ks,AxiosError:qs,CanceledError:$s,isCancel:zs,CancelToken:Ws,VERSION:Ys,all:Xs,Cancel:Js,isAxiosError:Zs,spread:Ks,toFormData:Qs,AxiosHeaders:en,HttpStatusCode:tn,formToJSON:rn,getAdapter:sn,mergeConfig:nn}=O,R="https://faceapi.regulaforensics.com".replace(/\/+$/,"");class Q{constructor(t,r=R,s=O){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 T={},P="https://example.com",m=function(e,t,r){if(r==null)throw new Is(t,`Required parameter ${t} was null or undefined when calling ${e}.`)};function Ne(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(s=>Ne(e,s,r)):Object.keys(t).forEach(s=>Ne(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);Ne(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,o=r)=>{const a={...e.options,url:(n.defaults.baseURL?"":s?.basePath??o)+e.url};return n.request(a)}},Ss=function(e){return{detect:async(t,r,s={})=>{m("detect","detectRequest",t);const n="/api/detect",o=new URL(n,P);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...s},l={},c={};l["Content-Type"]="application/json",r!=null&&(l["X-RequestID"]=String(r)),I(o,c);let d=a&&a.headers?a.headers:{};return i.headers={...l,...d,...s.headers},i.data=M(t,i,e),{url:S(o),options:i}},match:async(t,r,s={})=>{m("match","matchRequest",t);const n="/api/match",o=new URL(n,P);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...s},l={},c={};l["Content-Type"]="application/json",r!=null&&(l["X-RequestID"]=String(r)),I(o,c);let d=a&&a.headers?a.headers:{};return i.headers={...l,...d,...s.headers},i.data=M(t,i,e),{url:S(o),options:i}},matchAndSearch:async(t,r,s={})=>{m("matchAndSearch","matchAndSearchRequest",t);const n="/api/match_and_search",o=new URL(n,P);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...s},l={},c={};l["Content-Type"]="application/json",r!=null&&(l["X-RequestID"]=String(r)),I(o,c);let d=a&&a.headers?a.headers:{};return i.headers={...l,...d,...s.headers},i.data=M(t,i,e),{url:S(o),options:i}}}},we=function(e){const t=Ss(e);return{async detect(r,s,n){const o=await t.detect(r,s,n),a=e?.serverIndex??0,i=T["MatchApi.detect"]?.[a]?.url;return(l,c)=>b(o,O,R,e)(l,i||c)},async match(r,s,n){const o=await t.match(r,s,n),a=e?.serverIndex??0,i=T["MatchApi.match"]?.[a]?.url;return(l,c)=>b(o,O,R,e)(l,i||c)},async matchAndSearch(r,s,n){const o=await t.matchAndSearch(r,s,n),a=e?.serverIndex??0,i=T["MatchApi.matchAndSearch"]?.[a]?.url;return(l,c)=>b(o,O,R,e)(l,i||c)}}};let bs=class extends Q{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 Vt=(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))(Vt||{}),Nt=(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))(Nt||{}),Ut=(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))(Ut||{}),xt=(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))(xt||{}),Dt=(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))(Dt||{}),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||{}),Ht=(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))(Ht||{}),Gt=(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))(Gt||{}),Mt=(e=>(e.IN="in",e.NOT_IN="nin",e))(Mt||{}),Ge=(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))(Ge||{}),vt=(e=>(e[e.ACTIVE=0]="ACTIVE",e[e.PASSIVE=1]="PASSIVE",e))(vt||{}),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 jt{constructor(t,r,s){this.superClass=new bs(t,r,s)}async match(t,r,s){for(const o of t.images)o.type||(o.type=Ge.LIVE),typeof o.data!="string"&&(o.data=Ae(o.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={})=>{m("createGroup","groupToCreate",t);const n="/api/groups",o=new URL(n,P);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...s},l={},c={};l["Content-Type"]="application/json",r!=null&&(l["X-RequestID"]=String(r)),I(o,c);let d=a&&a.headers?a.headers:{};return i.headers={...l,...d,...s.headers},i.data=M(t,i,e),{url:S(o),options:i}},deleteGroup:async(t,r,s={})=>{m("deleteGroup","groupId",t);const n="/api/groups/{groupId}".replace("{groupId}",encodeURIComponent(String(t))),o=new URL(n,P);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...s},l={},c={};r!=null&&(l["X-RequestID"]=String(r)),I(o,c);let d=a&&a.headers?a.headers:{};return i.headers={...l,...d,...s.headers},{url:S(o),options:i}},getAllGroups:async(t,r,s,n={})=>{const o="/api/groups",a=new URL(o,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(a,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},{url:S(a),options:l}},getAllPersonsByGroupId:async(t,r,s,n,o={})=>{m("getAllPersonsByGroupId","groupId",t);const a="/api/groups/{groupId}/persons".replace("{groupId}",encodeURIComponent(String(t))),i=new URL(a,P);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...o},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 _=l&&l.headers?l.headers:{};return c.headers={...d,..._,...o.headers},{url:S(i),options:c}},getGroup:async(t,r,s={})=>{m("getGroup","groupId",t);const n="/api/groups/{groupId}".replace("{groupId}",encodeURIComponent(String(t))),o=new URL(n,P);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...s},l={},c={};r!=null&&(l["X-RequestID"]=String(r)),I(o,c);let d=a&&a.headers?a.headers:{};return i.headers={...l,...d,...s.headers},{url:S(o),options:i}},updateGroup:async(t,r,s,n={})=>{m("updateGroup","groupId",t),m("updateGroup","groupToCreate",r);const o="/api/groups/{groupId}".replace("{groupId}",encodeURIComponent(String(t))),a=new URL(o,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(a,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},l.data=M(r,l,e),{url:S(a),options:l}},updatePersonsInGroup:async(t,r,s,n={})=>{m("updatePersonsInGroup","groupId",t),m("updatePersonsInGroup","updateGroup",r);const o="/api/groups/{groupId}/persons".replace("{groupId}",encodeURIComponent(String(t))),a=new URL(o,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(a,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},l.data=M(r,l,e),{url:S(a),options:l}}}},$=function(e){const t=ws(e);return{async createGroup(r,s,n){const o=await t.createGroup(r,s,n),a=e?.serverIndex??0,i=T["GroupApi.createGroup"]?.[a]?.url;return(l,c)=>b(o,O,R,e)(l,i||c)},async deleteGroup(r,s,n){const o=await t.deleteGroup(r,s,n),a=e?.serverIndex??0,i=T["GroupApi.deleteGroup"]?.[a]?.url;return(l,c)=>b(o,O,R,e)(l,i||c)},async getAllGroups(r,s,n,o){const a=await t.getAllGroups(r,s,n,o),i=e?.serverIndex??0,l=T["GroupApi.getAllGroups"]?.[i]?.url;return(c,d)=>b(a,O,R,e)(c,l||d)},async getAllPersonsByGroupId(r,s,n,o,a){const i=await t.getAllPersonsByGroupId(r,s,n,o,a),l=e?.serverIndex??0,c=T["GroupApi.getAllPersonsByGroupId"]?.[l]?.url;return(d,p)=>b(i,O,R,e)(d,c||p)},async getGroup(r,s,n){const o=await t.getGroup(r,s,n),a=e?.serverIndex??0,i=T["GroupApi.getGroup"]?.[a]?.url;return(l,c)=>b(o,O,R,e)(l,i||c)},async updateGroup(r,s,n,o){const a=await t.updateGroup(r,s,n,o),i=e?.serverIndex??0,l=T["GroupApi.updateGroup"]?.[i]?.url;return(c,d)=>b(a,O,R,e)(c,l||d)},async updatePersonsInGroup(r,s,n,o){const a=await t.updatePersonsInGroup(r,s,n,o),i=e?.serverIndex??0,l=T["GroupApi.updatePersonsInGroup"]?.[i]?.url;return(c,d)=>b(a,O,R,e)(c,l||d)}}};let Cs=class extends Q{createGroup(t,r,s){return $(this.configuration).createGroup(t,r,s).then(n=>n(this.axios,this.basePath))}deleteGroup(t,r,s){return $(this.configuration).deleteGroup(t,r,s).then(n=>n(this.axios,this.basePath))}getAllGroups(t,r,s,n){return $(this.configuration).getAllGroups(t,r,s,n).then(o=>o(this.axios,this.basePath))}getAllPersonsByGroupId(t,r,s,n,o){return $(this.configuration).getAllPersonsByGroupId(t,r,s,n,o).then(a=>a(this.axios,this.basePath))}getGroup(t,r,s){return $(this.configuration).getGroup(t,r,s).then(n=>n(this.axios,this.basePath))}updateGroup(t,r,s,n){return $(this.configuration).updateGroup(t,r,s,n).then(o=>o(this.axios,this.basePath))}updatePersonsInGroup(t,r,s,n){return $(this.configuration).updatePersonsInGroup(t,r,s,n).then(o=>o(this.axios,this.basePath))}};class Ft{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,o){return(await this.superClass.getAllPersonsByGroupId(s,n,t,r,o)).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={})=>{m("addImageToPerson","personId",t),m("addImageToPerson","addImageToPersonRequest",r);const o="/api/persons/{personId}/images".replace("{personId}",encodeURIComponent(String(t))),a=new URL(o,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(a,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},l.data=M(r,l,e),{url:S(a),options:l}},createPerson:async(t,r,s={})=>{m("createPerson","personFields",t);const n="/api/persons",o=new URL(n,P);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...s},l={},c={};l["Content-Type"]="application/json",r!=null&&(l["X-RequestID"]=String(r)),I(o,c);let d=a&&a.headers?a.headers:{};return i.headers={...l,...d,...s.headers},i.data=M(t,i,e),{url:S(o),options:i}},deleteImageOfPerson:async(t,r,s,n={})=>{m("deleteImageOfPerson","personId",t),m("deleteImageOfPerson","imageId",r);const o="/api/persons/{personId}/images/{imageId}".replace("{personId}",encodeURIComponent(String(t))).replace("{imageId}",encodeURIComponent(String(r))),a=new URL(o,P);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...n},c={},d={};s!=null&&(c["X-RequestID"]=String(s)),I(a,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},{url:S(a),options:l}},deletePerson:async(t,r,s={})=>{m("deletePerson","personId",t);const n="/api/persons/{personId}".replace("{personId}",encodeURIComponent(String(t))),o=new URL(n,P);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...s},l={},c={};r!=null&&(l["X-RequestID"]=String(r)),I(o,c);let d=a&&a.headers?a.headers:{};return i.headers={...l,...d,...s.headers},{url:S(o),options:i}},getAllGroupsByPersonId:async(t,r,s,n,o={})=>{m("getAllGroupsByPersonId","personId",t);const a="/api/persons/{personId}/groups".replace("{personId}",encodeURIComponent(String(t))),i=new URL(a,P);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...o},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 _=l&&l.headers?l.headers:{};return c.headers={...d,..._,...o.headers},{url:S(i),options:c}},getAllImagesByPersonId:async(t,r,s,n,o={})=>{m("getAllImagesByPersonId","personId",t);const a="/api/persons/{personId}/images".replace("{personId}",encodeURIComponent(String(t))),i=new URL(a,P);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...o},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 _=l&&l.headers?l.headers:{};return c.headers={...d,..._,...o.headers},{url:S(i),options:c}},getImageOfPerson:async(t,r,s,n={})=>{m("getImageOfPerson","personId",t),m("getImageOfPerson","imageId",r);const o="/api/persons/{personId}/images/{imageId}".replace("{personId}",encodeURIComponent(String(t))).replace("{imageId}",encodeURIComponent(String(r))),a=new URL(o,P);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...n},c={},d={};s!=null&&(c["X-RequestID"]=String(s)),I(a,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},{url:S(a),options:l}},getPerson:async(t,r,s={})=>{m("getPerson","personId",t);const n="/api/persons/{personId}".replace("{personId}",encodeURIComponent(String(t))),o=new URL(n,P);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...s},l={},c={};r!=null&&(l["X-RequestID"]=String(r)),I(o,c);let d=a&&a.headers?a.headers:{};return i.headers={...l,...d,...s.headers},{url:S(o),options:i}},updatePerson:async(t,r,s,n={})=>{m("updatePerson","personId",t),m("updatePerson","personToUpdateFields",r);const o="/api/persons/{personId}".replace("{personId}",encodeURIComponent(String(t))),a=new URL(o,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(a,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},l.data=M(r,l,e),{url:S(a),options:l}}}},v=function(e){const t=Ls(e);return{async addImageToPerson(r,s,n,o){const a=await t.addImageToPerson(r,s,n,o),i=e?.serverIndex??0,l=T["PersonApi.addImageToPerson"]?.[i]?.url;return(c,d)=>b(a,O,R,e)(c,l||d)},async createPerson(r,s,n){const o=await t.createPerson(r,s,n),a=e?.serverIndex??0,i=T["PersonApi.createPerson"]?.[a]?.url;return(l,c)=>b(o,O,R,e)(l,i||c)},async deleteImageOfPerson(r,s,n,o){const a=await t.deleteImageOfPerson(r,s,n,o),i=e?.serverIndex??0,l=T["PersonApi.deleteImageOfPerson"]?.[i]?.url;return(c,d)=>b(a,O,R,e)(c,l||d)},async deletePerson(r,s,n){const o=await t.deletePerson(r,s,n),a=e?.serverIndex??0,i=T["PersonApi.deletePerson"]?.[a]?.url;return(l,c)=>b(o,O,R,e)(l,i||c)},async getAllGroupsByPersonId(r,s,n,o,a){const i=await t.getAllGroupsByPersonId(r,s,n,o,a),l=e?.serverIndex??0,c=T["PersonApi.getAllGroupsByPersonId"]?.[l]?.url;return(d,p)=>b(i,O,R,e)(d,c||p)},async getAllImagesByPersonId(r,s,n,o,a){const i=await t.getAllImagesByPersonId(r,s,n,o,a),l=e?.serverIndex??0,c=T["PersonApi.getAllImagesByPersonId"]?.[l]?.url;return(d,p)=>b(i,O,R,e)(d,c||p)},async getImageOfPerson(r,s,n,o){const a=await t.getImageOfPerson(r,s,n,o),i=e?.serverIndex??0,l=T["PersonApi.getImageOfPerson"]?.[i]?.url;return(c,d)=>b(a,O,R,e)(c,l||d)},async getPerson(r,s,n){const o=await t.getPerson(r,s,n),a=e?.serverIndex??0,i=T["PersonApi.getPerson"]?.[a]?.url;return(l,c)=>b(o,O,R,e)(l,i||c)},async updatePerson(r,s,n,o){const a=await t.updatePerson(r,s,n,o),i=e?.serverIndex??0,l=T["PersonApi.updatePerson"]?.[i]?.url;return(c,d)=>b(a,O,R,e)(c,l||d)}}};let gs=class extends Q{addImageToPerson(t,r,s,n){return v(this.configuration).addImageToPerson(t,r,s,n).then(o=>o(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(o=>o(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,o){return v(this.configuration).getAllGroupsByPersonId(t,r,s,n,o).then(a=>a(this.axios,this.basePath))}getAllImagesByPersonId(t,r,s,n,o){return v(this.configuration).getAllImagesByPersonId(t,r,s,n,o).then(a=>a(this.axios,this.basePath))}getImageOfPerson(t,r,s,n){return v(this.configuration).getImageOfPerson(t,r,s,n).then(o=>o(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(o=>o(this.axios,this.basePath))}};class kt{constructor(t,r,s){this.superClass=new gs(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,o){return(await this.superClass.getAllGroupsByPersonId(s,n,t,r,o)).data}async getAllImagesByPersonId(t,r,s,n,o){return(await this.superClass.getAllImagesByPersonId(s,n,t,r,o)).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 Vs=function(e){return{search:async(t,r,s,n={})=>{m("search","searchRequest",t);const o="/api/search",a=new URL(o,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(a,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},l.data=M(t,l,e),{url:S(a),options:l}}}},Ns=function(e){const t=Vs(e);return{async search(r,s,n,o){const a=await t.search(r,s,n,o),i=e?.serverIndex??0,l=T["SearchApi.search"]?.[i]?.url;return(c,d)=>b(a,O,R,e)(c,l||d)}}};let Us=class extends Q{search(t,r,s,n){return Ns(this.configuration).search(t,r,s,n).then(o=>o(this.axios,this.basePath))}};class qt{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={})=>{m("deleteLivenessTransaction","transactionId",t),m("deleteLivenessTransaction","tag",r);const n="/api/v2/liveness",o=new URL(n,P);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...s},l={},c={};t!==void 0&&(c.transactionId=t),r!==void 0&&(c.tag=r),I(o,c);let d=a&&a.headers?a.headers:{};return i.headers={...l,...d,...s.headers},{url:S(o),options:i}},getLivenessTransactionInfo:async(t,r={})=>{m("getLivenessTransactionInfo","transactionId",t);const s="/api/v2/liveness",n=new URL(s,P);let o;e&&(o=e.baseOptions);const a={method:"GET",...o,...r},i={},l={};t!==void 0&&(l.transactionId=t),I(n,l);let c=o&&o.headers?o.headers:{};return a.headers={...i,...c,...r.headers},{url:S(n),options:a}}}},it=function(e){const t=xs(e);return{async deleteLivenessTransaction(r,s,n){const o=await t.deleteLivenessTransaction(r,s,n),a=e?.serverIndex??0,i=T["Liveness20Api.deleteLivenessTransaction"]?.[a]?.url;return(l,c)=>b(o,O,R,e)(l,i||c)},async getLivenessTransactionInfo(r,s){const n=await t.getLivenessTransactionInfo(r,s),o=e?.serverIndex??0,a=T["Liveness20Api.getLivenessTransactionInfo"]?.[o]?.url;return(i,l)=>b(n,O,R,e)(i,a||l)}}};let Ds=class extends Q{deleteLivenessTransaction(t,r,s){return it(this.configuration).deleteLivenessTransaction(t,r,s).then(n=>n(this.axios,this.basePath))}getLivenessTransactionInfo(t,r){return it(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 Bs=function(e){return{healthz:async(t,r={})=>{const s="/api/healthz",n=new URL(s,P);let o;e&&(o=e.baseOptions);const a={method:"GET",...o,...r},i={},l={};t!=null&&(i["X-RequestID"]=String(t)),I(n,l);let c=o&&o.headers?o.headers:{};return a.headers={...i,...c,...r.headers},{url:S(n),options:a}},readyz:async(t,r={})=>{const s="/api/readyz",n=new URL(s,P);let o;e&&(o=e.baseOptions);const a={method:"GET",...o,...r},i={},l={};t!=null&&(i["X-RequestID"]=String(t)),I(n,l);let c=o&&o.headers?o.headers:{};return a.headers={...i,...c,...r.headers},{url:S(n),options:a}}}},lt=function(e){const t=Bs(e);return{async healthz(r,s){const n=await t.healthz(r,s),o=e?.serverIndex??0,a=T["HealthcheckApi.healthz"]?.[o]?.url;return(i,l)=>b(n,O,R,e)(i,a||l)},async readyz(r,s){const n=await t.readyz(r,s),o=e?.serverIndex??0,a=T["HealthcheckApi.readyz"]?.[o]?.url;return(i,l)=>b(n,O,R,e)(i,a||l)}}};let Hs=class extends Q{healthz(t,r){return lt(this.configuration).healthz(t,r).then(s=>s(this.axios,this.basePath))}readyz(t,r){return lt(this.configuration).readyz(t,r).then(s=>s(this.axios,this.basePath))}};class zt{constructor(t,r,s){this.superClass=new Hs(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=R,s=O){this.basePath=r,this.axios=s,this.matchApi=new jt(t,r,s),this.groupApi=new Ft(t,r,s),this.personApi=new kt(t,r,s),this.searchApi=new qt(t,r,s),this.livenessApi=new $t(t,r,s),this.healthcheckApi=new zt(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=Vt;exports.FaceImageQualityAlignType=Nt;exports.FaceImageQualityGroups=Ut;exports.FaceImageQualityGroupsStrings=xt;exports.FaceImageQualityStatus=Dt;exports.FaceQualityConfigName=Bt;exports.FaceQualityScenarios=Ht;exports.FaceSDKResultCode=Gt;exports.FaceSdk=Gs;exports.FilterOp=Mt;exports.GroupApi=Ft;exports.HealthcheckApi=zt;exports.ImageSource=Ge;exports.Liveness20Api=$t;exports.LivenessType=vt;exports.MatchApi=jt;exports.PersonApi=kt;exports.SearchApi=qt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function ut(e,t){return function(){return e.apply(t,arguments)}}const{toString:Zt}=Object.prototype,{getPrototypeOf:xe}=Object,{iterator:Oe,toStringTag:pt}=Symbol,_e=(e=>t=>{const r=Zt.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),G=e=>(e=e.toLowerCase(),t=>_e(t)===e),me=e=>t=>typeof t===e,{isArray:K}=Array,Z=me("undefined");function re(e){return e!==null&&!Z(e)&&e.constructor!==null&&!Z(e.constructor)&&N(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ht=G("ArrayBuffer");function Kt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ht(e.buffer),t}const Qt=me("string"),N=me("function"),ft=me("number"),se=e=>e!==null&&typeof e=="object",er=e=>e===!0||e===!1,pe=e=>{if(_e(e)!=="object")return!1;const t=xe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(pt in e)&&!(Oe in e)},tr=e=>{if(!se(e)||re(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},rr=G("Date"),sr=G("File"),nr=e=>!!(e&&typeof e.uri<"u"),or=e=>e&&typeof e.getParts<"u",ar=G("Blob"),ir=G("FileList"),lr=e=>se(e)&&N(e.pipe);function cr(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const ze=cr(),We=typeof ze.FormData<"u"?ze.FormData:void 0,dr=e=>{let t;return e&&(We&&e instanceof We||N(e.append)&&((t=_e(e))==="formdata"||t==="object"&&N(e.toString)&&e.toString()==="[object FormData]"))},ur=G("URLSearchParams"),[pr,hr,fr,Er]=["ReadableStream","Request","Response","Headers"].map(G),Ar=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ne(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(re(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let i;for(s=0;s<a;s++)i=o[s],t.call(null,e[i],i,e)}}function Et(e,t){if(re(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 z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,At=e=>!Z(e)&&e!==z;function Le(){const{caseless:e,skipUndefined:t}=At(this)&&this||{},r={},s=(n,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const a=e&&Et(r,o)||o;pe(r[a])&&pe(n)?r[a]=Le(r[a],n):pe(n)?r[a]=Le({},n):K(n)?r[a]=n.slice():(!t||!Z(n))&&(r[a]=n)};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&ne(arguments[n],s);return r}const Or=(e,t,r,{allOwnKeys:s}={})=>(ne(t,(n,o)=>{r&&N(n)?Object.defineProperty(e,o,{value:ut(n,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:n,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:s}),e),_r=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),mr=(e,t,r,s)=>{e.prototype=Object.create(t.prototype,s),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Rr=(e,t,r,s)=>{let n,o,a;const i={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),o=n.length;o-- >0;)a=n[o],(!s||s(a,e,t))&&!i[a]&&(t[a]=e[a],i[a]=!0);e=r!==!1&&xe(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Tr=(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},Pr=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!ft(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Ir=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&xe(Uint8Array)),Sr=(e,t)=>{const s=(e&&e[Oe]).call(e);let n;for(;(n=s.next())&&!n.done;){const o=n.value;t.call(e,o[0],o[1])}},br=(e,t)=>{let r;const s=[];for(;(r=e.exec(t))!==null;)s.push(r);return s},wr=G("HTMLFormElement"),yr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,s,n){return s.toUpperCase()+n}),Ye=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Cr=G("RegExp"),Ot=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),s={};ne(r,(n,o)=>{let a;(a=t(n,o,e))!==!1&&(s[o]=a||n)}),Object.defineProperties(e,s)},Lr=e=>{Ot(e,(t,r)=>{if(N(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const s=e[r];if(N(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+"'")})}})},gr=(e,t)=>{const r={},s=n=>{n.forEach(o=>{r[o]=!0})};return K(e)?s(e):s(String(e).split(t)),r},Vr=()=>{},Nr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ur(e){return!!(e&&N(e.append)&&e[pt]==="FormData"&&e[Oe])}const xr=e=>{const t=new Array(10),r=(s,n)=>{if(se(s)){if(t.indexOf(s)>=0)return;if(re(s))return s;if(!("toJSON"in s)){t[n]=s;const o=K(s)?[]:{};return ne(s,(a,i)=>{const l=r(a,n+1);!Z(l)&&(o[i]=l)}),t[n]=void 0,o}}return s};return r(e,0)},Dr=G("AsyncFunction"),Br=e=>e&&(se(e)||N(e))&&N(e.then)&&N(e.catch),_t=((e,t)=>e?setImmediate:t?((r,s)=>(z.addEventListener("message",({source:n,data:o})=>{n===z&&o===r&&s.length&&s.shift()()},!1),n=>{s.push(n),z.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",N(z.postMessage)),Hr=typeof queueMicrotask<"u"?queueMicrotask.bind(z):typeof process<"u"&&process.nextTick||_t,Gr=e=>e!=null&&N(e[Oe]),u={isArray:K,isArrayBuffer:ht,isBuffer:re,isFormData:dr,isArrayBufferView:Kt,isString:Qt,isNumber:ft,isBoolean:er,isObject:se,isPlainObject:pe,isEmptyObject:tr,isReadableStream:pr,isRequest:hr,isResponse:fr,isHeaders:Er,isUndefined:Z,isDate:rr,isFile:sr,isReactNativeBlob:nr,isReactNative:or,isBlob:ar,isRegExp:Cr,isFunction:N,isStream:lr,isURLSearchParams:ur,isTypedArray:Ir,isFileList:ir,forEach:ne,merge:Le,extend:Or,trim:Ar,stripBOM:_r,inherits:mr,toFlatObject:Rr,kindOf:_e,kindOfTest:G,endsWith:Tr,toArray:Pr,forEachEntry:Sr,matchAll:br,isHTMLForm:wr,hasOwnProperty:Ye,hasOwnProp:Ye,reduceDescriptors:Ot,freezeMethods:Lr,toObjectSet:gr,toCamelCase:yr,noop:Vr,toFiniteNumber:Nr,findKey:Et,global:z,isContextDefined:At,isSpecCompliantForm:Ur,toJSONObject:xr,isAsyncFn:Dr,isThenable:Br,setImmediate:_t,asap:Hr,isIterable:Gr};let A=class mt extends Error{static from(t,r,s,n,o,a){const i=new mt(t.message,r||t.code,s,n,o);return i.cause=t,i.name=t.name,t.status!=null&&i.status==null&&(i.status=t.status),a&&Object.assign(i,a),i}constructor(t,r,s,n,o){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),s&&(this.config=s),n&&(this.request=n),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:u.toJSONObject(this.config),code:this.code,status:this.status}}};A.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";A.ERR_BAD_OPTION="ERR_BAD_OPTION";A.ECONNABORTED="ECONNABORTED";A.ETIMEDOUT="ETIMEDOUT";A.ERR_NETWORK="ERR_NETWORK";A.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";A.ERR_DEPRECATED="ERR_DEPRECATED";A.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";A.ERR_BAD_REQUEST="ERR_BAD_REQUEST";A.ERR_CANCELED="ERR_CANCELED";A.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";A.ERR_INVALID_URL="ERR_INVALID_URL";const Mr=null;function ge(e){return u.isPlainObject(e)||u.isArray(e)}function Rt(e){return u.endsWith(e,"[]")?e.slice(0,-2):e}function Se(e,t,r){return e?e.concat(t).map(function(n,o){return n=Rt(n),!r&&o?"["+n+"]":n}).join(r?".":""):t}function vr(e){return u.isArray(e)&&!e.some(ge)}const jr=u.toFlatObject(u,{},null,function(t){return/^is[A-Z]/.test(t)});function Re(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,o=r.dots,a=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 A("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 w=h;if(u.isReactNative(t)&&u.isReactNativeBlob(h))return t.append(Se(f,E,o),c(h)),!1;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)&&vr(h)||(u.isFileList(h)||u.endsWith(E,"[]"))&&(w=u.toArray(h)))return E=Rt(E),w.forEach(function(y,g){!(u.isUndefined(y)||y===null)&&t.append(a===!0?Se([E],g,o):a===null?E:E+"[]",c(y))}),!1}return ge(h)?!0:(t.append(Se(f,E,o),c(h)),!1)}const p=[],_=Object.assign(jr,{defaultVisitor:d,convertValue:c,isVisitable:ge});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(w,x){(!(u.isUndefined(w)||w===null)&&n.call(t,w,u.isString(x)?x.trim():x,E,_))===!0&&C(w,E?E.concat(x):[x])}),p.pop()}}if(!u.isObject(e))throw new TypeError("data must be an object");return C(e),t}function Xe(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&&Re(e,this,t)}const Tt=De.prototype;Tt.append=function(t,r){this._pairs.push([t,r])};Tt.toString=function(t){const r=t?function(s){return t.call(this,s,Xe)}:Xe;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};function Fr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Pt(e,t,r){if(!t)return e;const s=r&&r.encode||Fr,n=u.isFunction(r)?{serialize:r}:r,o=n&&n.serialize;let a;if(o?a=o(t,n):a=u.isURLSearchParams(t)?t.toString():new De(t,n).toString(s),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Je{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 Be={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},kr=typeof URLSearchParams<"u"?URLSearchParams:De,qr=typeof FormData<"u"?FormData:null,$r=typeof Blob<"u"?Blob:null,zr={isBrowser:!0,classes:{URLSearchParams:kr,FormData:qr,Blob:$r},protocols:["http","https","file","blob","url","data"]},He=typeof window<"u"&&typeof document<"u",Ve=typeof navigator=="object"&&navigator||void 0,Wr=He&&(!Ve||["ReactNative","NativeScript","NS"].indexOf(Ve.product)<0),Yr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Xr=He&&window.location.href||"http://localhost",Jr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:He,hasStandardBrowserEnv:Wr,hasStandardBrowserWebWorkerEnv:Yr,navigator:Ve,origin:Xr},Symbol.toStringTag,{value:"Module"})),L={...Jr,...zr};function Zr(e,t){return Re(e,new L.classes.URLSearchParams,{visitor:function(r,s,n,o){return L.isNode&&u.isBuffer(r)?(this.append(s,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function Kr(e){return u.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Qr(e){const t={},r=Object.keys(e);let s;const n=r.length;let o;for(s=0;s<n;s++)o=r[s],t[o]=e[o];return t}function It(e){function t(r,s,n,o){let a=r[o++];if(a==="__proto__")return!0;const i=Number.isFinite(+a),l=o>=r.length;return a=!a&&u.isArray(n)?n.length:a,l?(u.hasOwnProp(n,a)?n[a]=[n[a],s]:n[a]=s,!i):((!n[a]||!u.isObject(n[a]))&&(n[a]=[]),t(r,s,n[a],o)&&u.isArray(n[a])&&(n[a]=Qr(n[a])),!i)}if(u.isFormData(e)&&u.isFunction(e.entries)){const r={};return u.forEachEntry(e,(s,n)=>{t(Kr(s),n,r,0)}),r}return null}function es(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 oe={transitional:Be,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const s=r.getContentType()||"",n=s.indexOf("application/json")>-1,o=u.isObject(t);if(o&&u.isHTMLForm(t)&&(t=new FormData(t)),u.isFormData(t))return n?JSON.stringify(It(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(o){if(s.indexOf("application/x-www-form-urlencoded")>-1)return Zr(t,this.formSerializer).toString();if((i=u.isFileList(t))||s.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Re(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||n?(r.setContentType("application/json",!1),es(t)):t}],transformResponse:[function(t){const r=this.transitional||oe.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 a=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(t,this.parseReviver)}catch(i){if(a)throw i.name==="SyntaxError"?A.from(i,A.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=>{oe.headers[e]={}});const ts=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"]),rs=e=>{const t={};let r,s,n;return e&&e.split(`
|
|
2
|
+
`).forEach(function(a){n=a.indexOf(":"),r=a.substring(0,n).trim().toLowerCase(),s=a.substring(n+1).trim(),!(!r||t[r]&&ts[r])&&(r==="set-cookie"?t[r]?t[r].push(s):t[r]=[s]:t[r]=t[r]?t[r]+", "+s:s)}),t},Ze=Symbol("internals"),ss=e=>!/[\r\n]/.test(e);function St(e,t){if(!(e===!1||e==null)){if(u.isArray(e)){e.forEach(r=>St(r,t));return}if(!ss(String(e)))throw new Error(`Invalid character in header content ["${t}"]`)}}function te(e){return e&&String(e).trim().toLowerCase()}function ns(e){let t=e.length;for(;t>0;){const r=e.charCodeAt(t-1);if(r!==10&&r!==13)break;t-=1}return t===e.length?e:e.slice(0,t)}function he(e){return e===!1||e==null?e:u.isArray(e)?e.map(he):ns(String(e))}function os(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 as=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function be(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 is(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,s)=>r.toUpperCase()+s)}function ls(e,t){const r=u.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+r,{value:function(n,o,a){return this[s].call(this,t,n,o,a)},configurable:!0})})}let U=class{constructor(t){t&&this.set(t)}set(t,r,s){const n=this;function o(i,l,c){const d=te(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)&&(St(i,l),n[p||l]=he(i))}const a=(i,l)=>u.forEach(i,(c,d)=>o(c,d,l));if(u.isPlainObject(t)||t instanceof this.constructor)a(t,r);else if(u.isString(t)&&(t=t.trim())&&!as(t))a(rs(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]}a(i,r)}else t!=null&&o(r,t,s);return this}get(t,r){if(t=te(t),t){const s=u.findKey(this,t);if(s){const n=this[s];if(!r)return n;if(r===!0)return os(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=te(t),t){const s=u.findKey(this,t);return!!(s&&this[s]!==void 0&&(!r||be(this,this[s],s,r)))}return!1}delete(t,r){const s=this;let n=!1;function o(a){if(a=te(a),a){const i=u.findKey(s,a);i&&(!r||be(s,s[i],i,r))&&(delete s[i],n=!0)}}return u.isArray(t)?t.forEach(o):o(t),n}clear(t){const r=Object.keys(this);let s=r.length,n=!1;for(;s--;){const o=r[s];(!t||be(this,this[o],o,t,!0))&&(delete this[o],n=!0)}return n}normalize(t){const r=this,s={};return u.forEach(this,(n,o)=>{const a=u.findKey(s,o);if(a){r[a]=he(n),delete r[o];return}const i=t?is(o):String(o).trim();i!==o&&delete r[o],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[Ze]=this[Ze]={accessors:{}}).accessors,n=this.prototype;function o(a){const i=te(a);s[i]||(ls(n,a),s[i]=!0)}return u.isArray(t)?t.forEach(o):o(t),this}};U.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);u.reduceDescriptors(U.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[r]=s}}});u.freezeMethods(U);function we(e,t){const r=this||oe,s=t||r,n=U.from(s.headers);let o=s.data;return u.forEach(e,function(i){o=i.call(r,o,n.normalize(),t?t.status:void 0)}),n.normalize(),o}function bt(e){return!!(e&&e.__CANCEL__)}let ae=class extends A{constructor(t,r,s){super(t??"canceled",A.ERR_CANCELED,r,s),this.name="CanceledError",this.__CANCEL__=!0}};function wt(e,t,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?e(r):t(new A("Request failed with status code "+r.status,[A.ERR_BAD_REQUEST,A.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function cs(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ds(e,t){e=e||10;const r=new Array(e),s=new Array(e);let n=0,o=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),d=s[o];a||(a=c),r[n]=l,s[n]=c;let p=o,_=0;for(;p!==n;)_+=r[p++],p=p%e;if(n=(n+1)%e,n===o&&(o=(o+1)%e),c-a<t)return;const C=d&&c-d;return C?Math.round(_*1e3/C):void 0}}function us(e,t){let r=0,s=1e3/t,n,o;const a=(c,d=Date.now())=>{r=d,n=null,o&&(clearTimeout(o),o=null),e(...c)};return[(...c)=>{const d=Date.now(),p=d-r;p>=s?a(c,d):(n=c,o||(o=setTimeout(()=>{o=null,a(n)},s-p)))},()=>n&&a(n)]}const Ee=(e,t,r=3)=>{let s=0;const n=ds(50,250);return us(o=>{const a=o.loaded,i=o.lengthComputable?o.total:void 0,l=a-s,c=n(l),d=a<=i;s=a;const p={loaded:a,total:i,progress:i?a/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i&&d?(i-a)/c:void 0,event:o,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(p)},r)},Ke=(e,t)=>{const r=e!=null;return[s=>t[0]({lengthComputable:r,total:e,loaded:s}),t[1]]},Qe=e=>(...t)=>u.asap(()=>e(...t)),ps=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,hs=L.hasStandardBrowserEnv?{write(e,t,r,s,n,o,a){if(typeof document>"u")return;const i=[`${e}=${encodeURIComponent(t)}`];u.isNumber(r)&&i.push(`expires=${new Date(r).toUTCString()}`),u.isString(s)&&i.push(`path=${s}`),u.isString(n)&&i.push(`domain=${n}`),o===!0&&i.push("secure"),u.isString(a)&&i.push(`SameSite=${a}`),document.cookie=i.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function fs(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Es(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function yt(e,t,r){let s=!fs(t);return e&&(s||r==!1)?Es(e,t):t}const et=e=>e instanceof U?{...e}:e;function Y(e,t){t=t||{};const r={};function s(c,d,p,_){return u.isPlainObject(c)&&u.isPlainObject(d)?u.merge.call({caseless:_},c,d):u.isPlainObject(d)?u.merge({},d):u.isArray(d)?d.slice():d}function n(c,d,p,_){if(u.isUndefined(d)){if(!u.isUndefined(c))return s(void 0,c,p,_)}else return s(c,d,p,_)}function o(c,d){if(!u.isUndefined(d))return s(void 0,d)}function a(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: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:(c,d,p)=>n(et(c),et(d),p,!0)};return u.forEach(Object.keys({...e,...t}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const p=u.hasOwnProp(l,d)?l[d]:n,_=p(e[d],t[d],d);u.isUndefined(_)&&p!==i||(r[d]=_)}),r}const Ct=e=>{const t=Y({},e);let{data:r,withXSRFToken:s,xsrfHeaderName:n,xsrfCookieName:o,headers:a,auth:i}=t;if(t.headers=a=U.from(a),t.url=Pt(yt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),u.isFormData(r)){if(L.hasStandardBrowserEnv||L.hasStandardBrowserWebWorkerEnv)a.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())&&a.set(d,p)})}}if(L.hasStandardBrowserEnv&&(s&&u.isFunction(s)&&(s=s(t)),s||s!==!1&&ps(t.url))){const l=n&&o&&hs.read(o);l&&a.set(n,l)}return t},As=typeof XMLHttpRequest<"u",Os=As&&function(e){return new Promise(function(r,s){const n=Ct(e);let o=n.data;const a=U.from(n.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:c}=n,d,p,_,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 w(){if(!f)return;const y=U.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),H={data:!i||i==="text"||i==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:y,config:e,request:f};wt(function(D){r(D),E()},function(D){s(D),E()},H),f=null}"onloadend"in f?f.onloadend=w:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(w)},f.onabort=function(){f&&(s(new A("Request aborted",A.ECONNABORTED,e,f)),f=null)},f.onerror=function(g){const H=g&&g.message?g.message:"Network Error",k=new A(H,A.ERR_NETWORK,e,f);k.event=g||null,s(k),f=null},f.ontimeout=function(){let g=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const H=n.transitional||Be;n.timeoutErrorMessage&&(g=n.timeoutErrorMessage),s(new A(g,H.clarifyTimeoutError?A.ETIMEDOUT:A.ECONNABORTED,e,f)),f=null},o===void 0&&a.setContentType(null),"setRequestHeader"in f&&u.forEach(a.toJSON(),function(g,H){f.setRequestHeader(H,g)}),u.isUndefined(n.withCredentials)||(f.withCredentials=!!n.withCredentials),i&&i!=="json"&&(f.responseType=n.responseType),c&&([_,h]=Ee(c,!0),f.addEventListener("progress",_)),l&&f.upload&&([p,C]=Ee(l),f.upload.addEventListener("progress",p),f.upload.addEventListener("loadend",C)),(n.cancelToken||n.signal)&&(d=y=>{f&&(s(!y||y.type?new ae(null,e,f):y),f.abort(),f=null)},n.cancelToken&&n.cancelToken.subscribe(d),n.signal&&(n.signal.aborted?d():n.signal.addEventListener("abort",d)));const x=cs(n.url);if(x&&L.protocols.indexOf(x)===-1){s(new A("Unsupported protocol "+x+":",A.ERR_BAD_REQUEST,e));return}f.send(o||null)})},_s=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let s=new AbortController,n;const o=function(c){if(!n){n=!0,i();const d=c instanceof Error?c:this.reason;s.abort(d instanceof A?d:new ae(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,o(new A(`timeout of ${t}ms exceeded`,A.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),e=null)};e.forEach(c=>c.addEventListener("abort",o));const{signal:l}=s;return l.unsubscribe=()=>u.asap(i),l}},ms=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},Rs=async function*(e,t){for await(const r of Ts(e))yield*ms(r,t)},Ts=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()}},tt=(e,t,r,s)=>{const n=Rs(e,t);let o=0,a,i=l=>{a||(a=!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 _=o+=p;r(_)}l.enqueue(new Uint8Array(d))}catch(c){throw i(c),c}},cancel(l){return i(l),n.return()}},{highWaterMark:2})},rt=64*1024,{isFunction:de}=u,Ps=(({Request:e,Response:t})=>({Request:e,Response:t}))(u.global),{ReadableStream:st,TextEncoder:nt}=u.global,ot=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Is=e=>{e=u.merge.call({skipUndefined:!0},Ps,e);const{fetch:t,Request:r,Response:s}=e,n=t?de(t):typeof fetch=="function",o=de(r),a=de(s);if(!n)return!1;const i=n&&de(st),l=n&&(typeof nt=="function"?(h=>E=>h.encode(E))(new nt):async h=>new Uint8Array(await new r(h).arrayBuffer())),c=o&&i&&ot(()=>{let h=!1;const E=new st,f=new r(L.origin,{body:E,method:"POST",get duplex(){return h=!0,"half"}}).headers.has("Content-Type");return E.cancel(),h&&!f}),d=a&&i&&ot(()=>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 w=E&&E[h];if(w)return w.call(E);throw new A(`Response type '${h}' is not supported`,A.ERR_NOT_SUPPORT,f)})});const _=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??_(E)};return async h=>{let{url:E,method:f,data:w,signal:x,cancelToken:y,timeout:g,onDownloadProgress:H,onUploadProgress:k,responseType:D,headers:Pe,withCredentials:ie="same-origin",fetchOptions:ve}=Ct(h),je=t||fetch;D=D?(D+"").toLowerCase():"text";let le=_s([x,y&&y.toAbortSignal()],g),ee=null;const q=le&&le.unsubscribe&&(()=>{le.unsubscribe()});let Fe;try{if(k&&c&&f!=="get"&&f!=="head"&&(Fe=await C(Pe,w))!==0){let F=new r(E,{method:"POST",body:w,duplex:"half"}),X;if(u.isFormData(w)&&(X=F.headers.get("content-type"))&&Pe.setContentType(X),F.body){const[Ie,ce]=Ke(Fe,Ee(Qe(k)));w=tt(F.body,rt,Ie,ce)}}u.isString(ie)||(ie=ie?"include":"omit");const V=o&&"credentials"in r.prototype,ke={...ve,signal:le,method:f.toUpperCase(),headers:Pe.normalize().toJSON(),body:w,duplex:"half",credentials:V?ie:void 0};ee=o&&new r(E,ke);let j=await(o?je(ee,ve):je(E,ke));const qe=d&&(D==="stream"||D==="response");if(d&&(H||qe&&q)){const F={};["status","statusText","headers"].forEach($e=>{F[$e]=j[$e]});const X=u.toFiniteNumber(j.headers.get("content-length")),[Ie,ce]=H&&Ke(X,Ee(Qe(H),!0))||[];j=new s(tt(j.body,rt,Ie,()=>{ce&&ce(),q&&q()}),F)}D=D||"text";let Jt=await p[u.findKey(p,D)||"text"](j,h);return!qe&&q&&q(),await new Promise((F,X)=>{wt(F,X,{data:Jt,headers:U.from(j.headers),status:j.status,statusText:j.statusText,config:h,request:ee})})}catch(V){throw q&&q(),V&&V.name==="TypeError"&&/Load failed|fetch/i.test(V.message)?Object.assign(new A("Network Error",A.ERR_NETWORK,h,ee,V&&V.response),{cause:V.cause||V}):A.from(V,V&&V.code,h,ee,V&&V.response)}}},Ss=new Map,Lt=e=>{let t=e&&e.env||{};const{fetch:r,Request:s,Response:n}=t,o=[s,n,r];let a=o.length,i=a,l,c,d=Ss;for(;i--;)l=o[i],c=d.get(l),c===void 0&&d.set(l,c=i?new Map:Is(t)),d=c;return c};Lt();const Ge={http:Mr,xhr:Os,fetch:{get:Lt}};u.forEach(Ge,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const at=e=>`- ${e}`,bs=e=>u.isFunction(e)||e===null||e===!1;function ws(e,t){e=u.isArray(e)?e:[e];const{length:r}=e;let s,n;const o={};for(let a=0;a<r;a++){s=e[a];let i;if(n=s,!bs(s)&&(n=Ge[(i=String(s)).toLowerCase()],n===void 0))throw new A(`Unknown adapter '${i}'`);if(n&&(u.isFunction(n)||(n=n.get(t))))break;o[i||"#"+a]=n}if(!n){const a=Object.entries(o).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=r?a.length>1?`since :
|
|
4
|
+
`+a.map(at).join(`
|
|
5
|
+
`):" "+at(a[0]):"as no adapter specified";throw new A("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n}const gt={getAdapter:ws,adapters:Ge};function ye(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ae(null,e)}function it(e){return ye(e),e.headers=U.from(e.headers),e.data=we.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),gt.getAdapter(e.adapter||oe.adapter,e)(e).then(function(s){return ye(e),s.data=we.call(e,e.transformResponse,s),s.headers=U.from(s.headers),s},function(s){return bt(s)||(ye(e),s&&s.response&&(s.response.data=we.call(e,e.transformResponse,s.response),s.response.headers=U.from(s.response.headers))),Promise.reject(s)})}const Vt="1.15.0",Te={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Te[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const lt={};Te.transitional=function(t,r,s){function n(o,a){return"[Axios v"+Vt+"] Transitional option '"+o+"'"+a+(s?". "+s:"")}return(o,a,i)=>{if(t===!1)throw new A(n(a," has been removed"+(r?" in "+r:"")),A.ERR_DEPRECATED);return r&&!lt[a]&&(lt[a]=!0,console.warn(n(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,a,i):!0}};Te.spelling=function(t){return(r,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function ys(e,t,r){if(typeof e!="object")throw new A("options must be an object",A.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let n=s.length;for(;n-- >0;){const o=s[n],a=t[o];if(a){const i=e[o],l=i===void 0||a(i,o,e);if(l!==!0)throw new A("option "+o+" must be "+l,A.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new A("Unknown option "+o,A.ERR_BAD_OPTION)}}const fe={assertOptions:ys,validators:Te},B=fe.validators;let W=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Je,response:new Je}}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 o=(()=>{if(!n.stack)return"";const a=n.stack.indexOf(`
|
|
6
|
+
`);return a===-1?"":n.stack.slice(a+1)})();try{if(!s.stack)s.stack=o;else if(o){const a=o.indexOf(`
|
|
7
|
+
`),i=a===-1?-1:o.indexOf(`
|
|
8
|
+
`,a+1),l=i===-1?"":o.slice(i+1);String(s.stack).endsWith(l)||(s.stack+=`
|
|
9
|
+
`+o)}}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:o}=r;s!==void 0&&fe.assertOptions(s,{silentJSONParsing:B.transitional(B.boolean),forcedJSONParsing:B.transitional(B.boolean),clarifyTimeoutError:B.transitional(B.boolean),legacyInterceptorReqResOrdering:B.transitional(B.boolean)},!1),n!=null&&(u.isFunction(n)?r.paramsSerializer={serialize:n}:fe.assertOptions(n,{encode:B.function,serialize:B.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),fe.assertOptions(r,{baseUrl:B.spelling("baseURL"),withXsrfToken:B.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=o&&u.merge(o.common,o[r.method]);o&&u.forEach(["delete","get","head","post","put","patch","common"],h=>{delete o[h]}),r.headers=U.concat(a,o);const i=[];let l=!0;this.interceptors.request.forEach(function(E){if(typeof E.runWhen=="function"&&E.runWhen(r)===!1)return;l=l&&E.synchronous;const f=r.transitional||Be;f&&f.legacyInterceptorReqResOrdering?i.unshift(E.fulfilled,E.rejected):i.push(E.fulfilled,E.rejected)});const c=[];this.interceptors.response.forEach(function(E){c.push(E.fulfilled,E.rejected)});let d,p=0,_;if(!l){const h=[it.bind(this),void 0];for(h.unshift(...i),h.push(...c),_=h.length,d=Promise.resolve(r);p<_;)d=d.then(h[p++],h[p++]);return d}_=i.length;let C=r;for(;p<_;){const h=i[p++],E=i[p++];try{C=h(C)}catch(f){E.call(this,f);break}}try{d=it.call(this,C)}catch(h){return Promise.reject(h)}for(p=0,_=c.length;p<_;)d=d.then(c[p++],c[p++]);return d}getUri(t){t=Y(this.defaults,t);const r=yt(t.baseURL,t.url,t.allowAbsoluteUrls);return Pt(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(o,a,i){return this.request(Y(i||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}W.prototype[t]=r(),W.prototype[t+"Form"]=r(!0)});let Cs=class Nt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const s=this;this.promise.then(n=>{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](n);s._listeners=null}),this.promise.then=n=>{let o;const a=new Promise(i=>{s.subscribe(i),o=i}).then(n);return a.cancel=function(){s.unsubscribe(o)},a},t(function(o,a,i){s.reason||(s.reason=new ae(o,a,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 Nt(function(n){t=n}),cancel:t}}};function Ls(e){return function(r){return e.apply(null,r)}}function gs(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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ne).forEach(([e,t])=>{Ne[t]=e});function Ut(e){const t=new W(e),r=ut(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 Ut(Y(e,n))},r}const O=Ut(oe);O.Axios=W;O.CanceledError=ae;O.CancelToken=Cs;O.isCancel=bt;O.VERSION=Vt;O.toFormData=Re;O.AxiosError=A;O.Cancel=O.CanceledError;O.all=function(t){return Promise.all(t)};O.spread=Ls;O.isAxiosError=gs;O.mergeConfig=Y;O.AxiosHeaders=U;O.formToJSON=e=>It(u.isHTMLForm(e)?new FormData(e):e);O.getAdapter=gt.getAdapter;O.HttpStatusCode=Ne;O.default=O;const{Axios:Zs,AxiosError:Ks,CanceledError:Qs,isCancel:en,CancelToken:tn,VERSION:rn,all:sn,Cancel:nn,isAxiosError:on,spread:an,toFormData:ln,AxiosHeaders:cn,HttpStatusCode:dn,formToJSON:un,getAdapter:pn,mergeConfig:hn}=O,R="https://faceapi.regulaforensics.com".replace(/\/+$/,"");class Q{constructor(t,r=R,s=O){this.basePath=r,this.axios=s,t&&(this.configuration=t,this.basePath=t.basePath??r)}}class Vs extends Error{constructor(t,r){super(r),this.field=t,this.name="RequiredError"}}const T={},P="https://example.com",m=function(e,t,r){if(r==null)throw new Vs(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,o=r)=>{const a={...e.options,url:(n.defaults.baseURL?"":s?.basePath??o)+e.url};return n.request(a)}},Ns=function(e){return{detect:async(t,r,s={})=>{m("detect","detectRequest",t);const n="/api/detect",o=new URL(n,P);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...s},l={},c={};l["Content-Type"]="application/json",r!=null&&(l["X-RequestID"]=String(r)),I(o,c);let d=a&&a.headers?a.headers:{};return i.headers={...l,...d,...s.headers},i.data=M(t,i,e),{url:S(o),options:i}},match:async(t,r,s={})=>{m("match","matchRequest",t);const n="/api/match",o=new URL(n,P);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...s},l={},c={};l["Content-Type"]="application/json",r!=null&&(l["X-RequestID"]=String(r)),I(o,c);let d=a&&a.headers?a.headers:{};return i.headers={...l,...d,...s.headers},i.data=M(t,i,e),{url:S(o),options:i}},matchAndSearch:async(t,r,s={})=>{m("matchAndSearch","matchAndSearchRequest",t);const n="/api/match_and_search",o=new URL(n,P);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...s},l={},c={};l["Content-Type"]="application/json",r!=null&&(l["X-RequestID"]=String(r)),I(o,c);let d=a&&a.headers?a.headers:{};return i.headers={...l,...d,...s.headers},i.data=M(t,i,e),{url:S(o),options:i}}}},Ce=function(e){const t=Ns(e);return{async detect(r,s,n){const o=await t.detect(r,s,n),a=e?.serverIndex??0,i=T["MatchApi.detect"]?.[a]?.url;return(l,c)=>b(o,O,R,e)(l,i||c)},async match(r,s,n){const o=await t.match(r,s,n),a=e?.serverIndex??0,i=T["MatchApi.match"]?.[a]?.url;return(l,c)=>b(o,O,R,e)(l,i||c)},async matchAndSearch(r,s,n){const o=await t.matchAndSearch(r,s,n),a=e?.serverIndex??0,i=T["MatchApi.matchAndSearch"]?.[a]?.url;return(l,c)=>b(o,O,R,e)(l,i||c)}}};let Us=class extends Q{detect(t,r,s){return Ce(this.configuration).detect(t,r,s).then(n=>n(this.axios,this.basePath))}match(t,r,s){return Ce(this.configuration).match(t,r,s).then(n=>n(this.axios,this.basePath))}matchAndSearch(t,r,s){return Ce(this.configuration).matchAndSearch(t,r,s).then(n=>n(this.axios,this.basePath))}};var xt=(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))(xt||{}),Dt=(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))(Dt||{}),Bt=(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))(Bt||{}),Ht=(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))(Ht||{}),Gt=(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))(Gt||{}),Mt=(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))(Mt||{}),vt=(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))(vt||{}),jt=(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))(jt||{}),Ft=(e=>(e.IN="in",e.NOT_IN="nin",e))(Ft||{}),Me=(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))(Me||{}),kt=(e=>(e[e.ACTIVE=0]="ACTIVE",e[e.PASSIVE=1]="PASSIVE",e))(kt||{}),J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xs=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var ue=0;ue<J.length;ue++)xs[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 qt{constructor(t,r,s){this.superClass=new Us(t,r,s)}async match(t,r,s){for(const o of t.images)o.type||(o.type=Me.LIVE),typeof o.data!="string"&&(o.data=Ae(o.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 Ds=function(e){return{createGroup:async(t,r,s={})=>{m("createGroup","groupToCreate",t);const n="/api/groups",o=new URL(n,P);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...s},l={},c={};l["Content-Type"]="application/json",r!=null&&(l["X-RequestID"]=String(r)),I(o,c);let d=a&&a.headers?a.headers:{};return i.headers={...l,...d,...s.headers},i.data=M(t,i,e),{url:S(o),options:i}},deleteGroup:async(t,r,s={})=>{m("deleteGroup","groupId",t);const n="/api/groups/{groupId}".replace("{groupId}",encodeURIComponent(String(t))),o=new URL(n,P);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...s},l={},c={};r!=null&&(l["X-RequestID"]=String(r)),I(o,c);let d=a&&a.headers?a.headers:{};return i.headers={...l,...d,...s.headers},{url:S(o),options:i}},getAllGroups:async(t,r,s,n={})=>{const o="/api/groups",a=new URL(o,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(a,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},{url:S(a),options:l}},getAllPersonsByGroupId:async(t,r,s,n,o={})=>{m("getAllPersonsByGroupId","groupId",t);const a="/api/groups/{groupId}/persons".replace("{groupId}",encodeURIComponent(String(t))),i=new URL(a,P);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...o},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 _=l&&l.headers?l.headers:{};return c.headers={...d,..._,...o.headers},{url:S(i),options:c}},getGroup:async(t,r,s={})=>{m("getGroup","groupId",t);const n="/api/groups/{groupId}".replace("{groupId}",encodeURIComponent(String(t))),o=new URL(n,P);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...s},l={},c={};r!=null&&(l["X-RequestID"]=String(r)),I(o,c);let d=a&&a.headers?a.headers:{};return i.headers={...l,...d,...s.headers},{url:S(o),options:i}},updateGroup:async(t,r,s,n={})=>{m("updateGroup","groupId",t),m("updateGroup","groupToCreate",r);const o="/api/groups/{groupId}".replace("{groupId}",encodeURIComponent(String(t))),a=new URL(o,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(a,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},l.data=M(r,l,e),{url:S(a),options:l}},updatePersonsInGroup:async(t,r,s,n={})=>{m("updatePersonsInGroup","groupId",t),m("updatePersonsInGroup","updateGroup",r);const o="/api/groups/{groupId}/persons".replace("{groupId}",encodeURIComponent(String(t))),a=new URL(o,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(a,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},l.data=M(r,l,e),{url:S(a),options:l}}}},$=function(e){const t=Ds(e);return{async createGroup(r,s,n){const o=await t.createGroup(r,s,n),a=e?.serverIndex??0,i=T["GroupApi.createGroup"]?.[a]?.url;return(l,c)=>b(o,O,R,e)(l,i||c)},async deleteGroup(r,s,n){const o=await t.deleteGroup(r,s,n),a=e?.serverIndex??0,i=T["GroupApi.deleteGroup"]?.[a]?.url;return(l,c)=>b(o,O,R,e)(l,i||c)},async getAllGroups(r,s,n,o){const a=await t.getAllGroups(r,s,n,o),i=e?.serverIndex??0,l=T["GroupApi.getAllGroups"]?.[i]?.url;return(c,d)=>b(a,O,R,e)(c,l||d)},async getAllPersonsByGroupId(r,s,n,o,a){const i=await t.getAllPersonsByGroupId(r,s,n,o,a),l=e?.serverIndex??0,c=T["GroupApi.getAllPersonsByGroupId"]?.[l]?.url;return(d,p)=>b(i,O,R,e)(d,c||p)},async getGroup(r,s,n){const o=await t.getGroup(r,s,n),a=e?.serverIndex??0,i=T["GroupApi.getGroup"]?.[a]?.url;return(l,c)=>b(o,O,R,e)(l,i||c)},async updateGroup(r,s,n,o){const a=await t.updateGroup(r,s,n,o),i=e?.serverIndex??0,l=T["GroupApi.updateGroup"]?.[i]?.url;return(c,d)=>b(a,O,R,e)(c,l||d)},async updatePersonsInGroup(r,s,n,o){const a=await t.updatePersonsInGroup(r,s,n,o),i=e?.serverIndex??0,l=T["GroupApi.updatePersonsInGroup"]?.[i]?.url;return(c,d)=>b(a,O,R,e)(c,l||d)}}};let Bs=class extends Q{createGroup(t,r,s){return $(this.configuration).createGroup(t,r,s).then(n=>n(this.axios,this.basePath))}deleteGroup(t,r,s){return $(this.configuration).deleteGroup(t,r,s).then(n=>n(this.axios,this.basePath))}getAllGroups(t,r,s,n){return $(this.configuration).getAllGroups(t,r,s,n).then(o=>o(this.axios,this.basePath))}getAllPersonsByGroupId(t,r,s,n,o){return $(this.configuration).getAllPersonsByGroupId(t,r,s,n,o).then(a=>a(this.axios,this.basePath))}getGroup(t,r,s){return $(this.configuration).getGroup(t,r,s).then(n=>n(this.axios,this.basePath))}updateGroup(t,r,s,n){return $(this.configuration).updateGroup(t,r,s,n).then(o=>o(this.axios,this.basePath))}updatePersonsInGroup(t,r,s,n){return $(this.configuration).updatePersonsInGroup(t,r,s,n).then(o=>o(this.axios,this.basePath))}};class $t{constructor(t,r,s){this.superClass=new Bs(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,o){return(await this.superClass.getAllPersonsByGroupId(s,n,t,r,o)).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 Hs=function(e){return{addImageToPerson:async(t,r,s,n={})=>{m("addImageToPerson","personId",t),m("addImageToPerson","addImageToPersonRequest",r);const o="/api/persons/{personId}/images".replace("{personId}",encodeURIComponent(String(t))),a=new URL(o,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(a,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},l.data=M(r,l,e),{url:S(a),options:l}},createPerson:async(t,r,s={})=>{m("createPerson","personFields",t);const n="/api/persons",o=new URL(n,P);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...s},l={},c={};l["Content-Type"]="application/json",r!=null&&(l["X-RequestID"]=String(r)),I(o,c);let d=a&&a.headers?a.headers:{};return i.headers={...l,...d,...s.headers},i.data=M(t,i,e),{url:S(o),options:i}},deleteImageOfPerson:async(t,r,s,n={})=>{m("deleteImageOfPerson","personId",t),m("deleteImageOfPerson","imageId",r);const o="/api/persons/{personId}/images/{imageId}".replace("{personId}",encodeURIComponent(String(t))).replace("{imageId}",encodeURIComponent(String(r))),a=new URL(o,P);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...n},c={},d={};s!=null&&(c["X-RequestID"]=String(s)),I(a,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},{url:S(a),options:l}},deletePerson:async(t,r,s={})=>{m("deletePerson","personId",t);const n="/api/persons/{personId}".replace("{personId}",encodeURIComponent(String(t))),o=new URL(n,P);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...s},l={},c={};r!=null&&(l["X-RequestID"]=String(r)),I(o,c);let d=a&&a.headers?a.headers:{};return i.headers={...l,...d,...s.headers},{url:S(o),options:i}},getAllGroupsByPersonId:async(t,r,s,n,o={})=>{m("getAllGroupsByPersonId","personId",t);const a="/api/persons/{personId}/groups".replace("{personId}",encodeURIComponent(String(t))),i=new URL(a,P);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...o},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 _=l&&l.headers?l.headers:{};return c.headers={...d,..._,...o.headers},{url:S(i),options:c}},getAllImagesByPersonId:async(t,r,s,n,o={})=>{m("getAllImagesByPersonId","personId",t);const a="/api/persons/{personId}/images".replace("{personId}",encodeURIComponent(String(t))),i=new URL(a,P);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...o},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 _=l&&l.headers?l.headers:{};return c.headers={...d,..._,...o.headers},{url:S(i),options:c}},getImageOfPerson:async(t,r,s,n={})=>{m("getImageOfPerson","personId",t),m("getImageOfPerson","imageId",r);const o="/api/persons/{personId}/images/{imageId}".replace("{personId}",encodeURIComponent(String(t))).replace("{imageId}",encodeURIComponent(String(r))),a=new URL(o,P);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...n},c={},d={};s!=null&&(c["X-RequestID"]=String(s)),I(a,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},{url:S(a),options:l}},getPerson:async(t,r,s={})=>{m("getPerson","personId",t);const n="/api/persons/{personId}".replace("{personId}",encodeURIComponent(String(t))),o=new URL(n,P);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...s},l={},c={};r!=null&&(l["X-RequestID"]=String(r)),I(o,c);let d=a&&a.headers?a.headers:{};return i.headers={...l,...d,...s.headers},{url:S(o),options:i}},updatePerson:async(t,r,s,n={})=>{m("updatePerson","personId",t),m("updatePerson","personToUpdateFields",r);const o="/api/persons/{personId}".replace("{personId}",encodeURIComponent(String(t))),a=new URL(o,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(a,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},l.data=M(r,l,e),{url:S(a),options:l}}}},v=function(e){const t=Hs(e);return{async addImageToPerson(r,s,n,o){const a=await t.addImageToPerson(r,s,n,o),i=e?.serverIndex??0,l=T["PersonApi.addImageToPerson"]?.[i]?.url;return(c,d)=>b(a,O,R,e)(c,l||d)},async createPerson(r,s,n){const o=await t.createPerson(r,s,n),a=e?.serverIndex??0,i=T["PersonApi.createPerson"]?.[a]?.url;return(l,c)=>b(o,O,R,e)(l,i||c)},async deleteImageOfPerson(r,s,n,o){const a=await t.deleteImageOfPerson(r,s,n,o),i=e?.serverIndex??0,l=T["PersonApi.deleteImageOfPerson"]?.[i]?.url;return(c,d)=>b(a,O,R,e)(c,l||d)},async deletePerson(r,s,n){const o=await t.deletePerson(r,s,n),a=e?.serverIndex??0,i=T["PersonApi.deletePerson"]?.[a]?.url;return(l,c)=>b(o,O,R,e)(l,i||c)},async getAllGroupsByPersonId(r,s,n,o,a){const i=await t.getAllGroupsByPersonId(r,s,n,o,a),l=e?.serverIndex??0,c=T["PersonApi.getAllGroupsByPersonId"]?.[l]?.url;return(d,p)=>b(i,O,R,e)(d,c||p)},async getAllImagesByPersonId(r,s,n,o,a){const i=await t.getAllImagesByPersonId(r,s,n,o,a),l=e?.serverIndex??0,c=T["PersonApi.getAllImagesByPersonId"]?.[l]?.url;return(d,p)=>b(i,O,R,e)(d,c||p)},async getImageOfPerson(r,s,n,o){const a=await t.getImageOfPerson(r,s,n,o),i=e?.serverIndex??0,l=T["PersonApi.getImageOfPerson"]?.[i]?.url;return(c,d)=>b(a,O,R,e)(c,l||d)},async getPerson(r,s,n){const o=await t.getPerson(r,s,n),a=e?.serverIndex??0,i=T["PersonApi.getPerson"]?.[a]?.url;return(l,c)=>b(o,O,R,e)(l,i||c)},async updatePerson(r,s,n,o){const a=await t.updatePerson(r,s,n,o),i=e?.serverIndex??0,l=T["PersonApi.updatePerson"]?.[i]?.url;return(c,d)=>b(a,O,R,e)(c,l||d)}}};let Gs=class extends Q{addImageToPerson(t,r,s,n){return v(this.configuration).addImageToPerson(t,r,s,n).then(o=>o(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(o=>o(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,o){return v(this.configuration).getAllGroupsByPersonId(t,r,s,n,o).then(a=>a(this.axios,this.basePath))}getAllImagesByPersonId(t,r,s,n,o){return v(this.configuration).getAllImagesByPersonId(t,r,s,n,o).then(a=>a(this.axios,this.basePath))}getImageOfPerson(t,r,s,n){return v(this.configuration).getImageOfPerson(t,r,s,n).then(o=>o(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(o=>o(this.axios,this.basePath))}};class zt{constructor(t,r,s){this.superClass=new Gs(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,o){return(await this.superClass.getAllGroupsByPersonId(s,n,t,r,o)).data}async getAllImagesByPersonId(t,r,s,n,o){return(await this.superClass.getAllImagesByPersonId(s,n,t,r,o)).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 Ms=function(e){return{search:async(t,r,s,n={})=>{m("search","searchRequest",t);const o="/api/search",a=new URL(o,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(a,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},l.data=M(t,l,e),{url:S(a),options:l}}}},vs=function(e){const t=Ms(e);return{async search(r,s,n,o){const a=await t.search(r,s,n,o),i=e?.serverIndex??0,l=T["SearchApi.search"]?.[i]?.url;return(c,d)=>b(a,O,R,e)(c,l||d)}}};let js=class extends Q{search(t,r,s,n){return vs(this.configuration).search(t,r,s,n).then(o=>o(this.axios,this.basePath))}};class Wt{constructor(t,r,s){this.superClass=new js(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 Fs=function(e){return{deleteLivenessTransaction:async(t,r,s={})=>{m("deleteLivenessTransaction","transactionId",t),m("deleteLivenessTransaction","tag",r);const n="/api/v2/liveness",o=new URL(n,P);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...s},l={},c={};t!==void 0&&(c.transactionId=t),r!==void 0&&(c.tag=r),I(o,c);let d=a&&a.headers?a.headers:{};return i.headers={...l,...d,...s.headers},{url:S(o),options:i}},getLivenessTransactionInfo:async(t,r={})=>{m("getLivenessTransactionInfo","transactionId",t);const s="/api/v2/liveness",n=new URL(s,P);let o;e&&(o=e.baseOptions);const a={method:"GET",...o,...r},i={},l={};t!==void 0&&(l.transactionId=t),I(n,l);let c=o&&o.headers?o.headers:{};return a.headers={...i,...c,...r.headers},{url:S(n),options:a}}}},ct=function(e){const t=Fs(e);return{async deleteLivenessTransaction(r,s,n){const o=await t.deleteLivenessTransaction(r,s,n),a=e?.serverIndex??0,i=T["Liveness20Api.deleteLivenessTransaction"]?.[a]?.url;return(l,c)=>b(o,O,R,e)(l,i||c)},async getLivenessTransactionInfo(r,s){const n=await t.getLivenessTransactionInfo(r,s),o=e?.serverIndex??0,a=T["Liveness20Api.getLivenessTransactionInfo"]?.[o]?.url;return(i,l)=>b(n,O,R,e)(i,a||l)}}};let ks=class extends Q{deleteLivenessTransaction(t,r,s){return ct(this.configuration).deleteLivenessTransaction(t,r,s).then(n=>n(this.axios,this.basePath))}getLivenessTransactionInfo(t,r){return ct(this.configuration).getLivenessTransactionInfo(t,r).then(s=>s(this.axios,this.basePath))}};class Yt{constructor(t,r,s){this.superClass=new ks(t,r,s)}async getLivenessTransactionInfo(t,r){return(await this.superClass.getLivenessTransactionInfo(t,r)).data}}const qs=function(e){return{healthz:async(t,r={})=>{const s="/api/healthz",n=new URL(s,P);let o;e&&(o=e.baseOptions);const a={method:"GET",...o,...r},i={},l={};t!=null&&(i["X-RequestID"]=String(t)),I(n,l);let c=o&&o.headers?o.headers:{};return a.headers={...i,...c,...r.headers},{url:S(n),options:a}},readyz:async(t,r={})=>{const s="/api/readyz",n=new URL(s,P);let o;e&&(o=e.baseOptions);const a={method:"GET",...o,...r},i={},l={};t!=null&&(i["X-RequestID"]=String(t)),I(n,l);let c=o&&o.headers?o.headers:{};return a.headers={...i,...c,...r.headers},{url:S(n),options:a}}}},dt=function(e){const t=qs(e);return{async healthz(r,s){const n=await t.healthz(r,s),o=e?.serverIndex??0,a=T["HealthcheckApi.healthz"]?.[o]?.url;return(i,l)=>b(n,O,R,e)(i,a||l)},async readyz(r,s){const n=await t.readyz(r,s),o=e?.serverIndex??0,a=T["HealthcheckApi.readyz"]?.[o]?.url;return(i,l)=>b(n,O,R,e)(i,a||l)}}};let $s=class extends Q{healthz(t,r){return dt(this.configuration).healthz(t,r).then(s=>s(this.axios,this.basePath))}readyz(t,r){return dt(this.configuration).readyz(t,r).then(s=>s(this.axios,this.basePath))}};class Xt{constructor(t,r,s){this.superClass=new $s(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 zs{constructor(t,r=R,s=O){this.basePath=r,this.axios=s,this.matchApi=new qt(t,r,s),this.groupApi=new $t(t,r,s),this.personApi=new zt(t,r,s),this.searchApi=new Wt(t,r,s),this.livenessApi=new Yt(t,r,s),this.healthcheckApi=new Xt(t,r,s)}}class Ws{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=Ws;exports.FaceAttribute=xt;exports.FaceImageQualityAlignType=Dt;exports.FaceImageQualityGroups=Bt;exports.FaceImageQualityGroupsStrings=Ht;exports.FaceImageQualityStatus=Gt;exports.FaceQualityConfigName=Mt;exports.FaceQualityScenarios=vt;exports.FaceSDKResultCode=jt;exports.FaceSdk=zs;exports.FilterOp=Ft;exports.GroupApi=$t;exports.HealthcheckApi=Xt;exports.ImageSource=Me;exports.Liveness20Api=Yt;exports.LivenessType=kt;exports.MatchApi=qt;exports.PersonApi=zt;exports.SearchApi=Wt;
|