pipwave-ekyc-uikit 0.0.1-beta.2 → 0.0.1-beta.3
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/pw-bundle.js
CHANGED
|
@@ -3406,7 +3406,7 @@ eval("/*!\n * Pikaday\n *\n * Copyright © 2014 David Bushell | BSD & MIT licens
|
|
|
3406
3406
|
\*********************************************************/
|
|
3407
3407
|
/***/ ((module) => {
|
|
3408
3408
|
|
|
3409
|
-
eval("!function(e,t){ true?module.exports=t():0}(self,(()=>(()=>{\"use strict\";var e={245:(e,t,n)=>{function r(e){this.message=e}n.r(t),n.d(t,{InvalidTokenError:()=>s,default:()=>a}),r.prototype=new Error,r.prototype.name=\"InvalidCharacterError\";var o=\"undefined\"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,\"\");if(t.length%4==1)throw new r(\"'atob' failed: The string to be decoded is not correctly encoded.\");for(var n,o,i=0,s=0,a=\"\";o=t.charAt(s++);~o&&(n=i%4?64*n+o:o,i++%4)?a+=String.fromCharCode(255&n>>(-2*i&6)):0)o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\".indexOf(o);return a};function i(e){var t=e.replace(/-/g,\"+\").replace(/_/g,\"/\");switch(t.length%4){case 0:break;case 2:t+=\"==\";break;case 3:t+=\"=\";break;default:throw\"Illegal base64url string!\"}try{return function(e){return decodeURIComponent(o(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n=\"0\"+n),\"%\"+n})))}(t)}catch(e){return o(t)}}function s(e){this.message=e}s.prototype=new Error,s.prototype.name=\"InvalidTokenError\";const a=function(e,t){if(\"string\"!=typeof e)throw new s(\"Invalid token specified\");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(i(e.split(\".\")[n]))}catch(e){throw new s(\"Invalid token specified: \"+e.message)}}},607:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.PWSDK=void 0;const o=r(n(245)),i=r(n(207)),s=n(284),a=n(860),c=n(882);class u{constructor(){this.countries=[],this.issuingCountries=[],this.init=s.PWAUTHSDK.prototype.init,this.fetchStates=a.PWCOMMONSDK.prototype.fetchStates,this.viewIpCountry=a.PWCOMMONSDK.prototype.viewIpCountry,this.fetchCountries=a.PWCOMMONSDK.prototype.fetchCountries,this.fetchSupportedCountries=a.PWCOMMONSDK.prototype.fetchSupportedCountries,this.viewDefaultCountry=a.PWCOMMONSDK.prototype.viewDefaultCountry,this.uploadDoc=c.PWPROOFSDK.prototype.uploadDoc,this.uploadSelfie=c.PWPROOFSDK.prototype.uploadSelfie,this.viewResult=c.PWPROOFSDK.prototype.viewResult,this.updateForm=c.PWPROOFSDK.prototype.updateForm}get tokenDetails(){const e=i.default.getAccessToken();return e?(0,o.default)(e):{}}get sessionId(){return this.tokenDetails.sessionId||\"\"}get verificationTypes(){return this.tokenDetails.verificationTypes||[]}}t.PWSDK=u,t.default={PWSDK:u}},207:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.instance=void 0;const i=o(n(218)),s=n(249);t.instance={};let a=\"\",c=Object.freeze(new class{getAccessToken(){return a}create(e,n){t.instance&&!Object.keys(t.instance).length&&(a=n,t.instance=i.default.create({baseURL:e||\"https://staging-open-api.pipwave.com\",headers:{common:{Authorization:n}}}),t.instance.interceptors.request.use((function(e){return e}),this.onResponseError),t.instance.interceptors.response.use(void 0,this.onResponseError))}onResponseError(e){return r(this,void 0,void 0,(function*(){const t=(0,s.constructAxiosError)(e);return Promise.reject(t)}))}});t.default=c},599:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.ERROR_TYPE=t.ERROR_MESSAGE=t.INVALID_ARGUMENT_FORMAT=t.INVALID_ARGUMENT_LENGTH=t.INVALID_ARGUMENTS=t.ATTEMPT_EXCEEDED=t.CODE_BAD_REQ=t.CODE_LIMIT_EXCEED=t.CODE_ACCESS_DENIED=t.CODE_VALIDATION_ERROR=t.CODE_MISSING_PARAM=t.CODE_IMG_EXPOSED_3=t.CODE_IMG_EXPOSED_2=t.CODE_IMG_EXPOSED_1=t.CODE_DOC_NOT_POSITIONED=t.CODE_DOC_IMG_UNSIMILAR=t.CODE_DOC_EMPTY=t.CODE_DOC_UNPAIR=t.CODE_DOC_TYPE_INVALID=t.CODE_MAX_SESSION_ATTEMPT=t.CODE_MAX_DOC_ATTEMPT=t.CODE_MAX_SELFIE_ATTEMPT=t.CODE_ISSUING_COUNTRY_INVALID=t.CODE_VERIFICATION_TYPE_INVALID=t.CODE_SESSION_EXPIRED=t.API_MODULE=t.REQUEST_ERROR_NAME=t.ERROR_NAME=void 0,t.ERROR_NAME=\"PwError\",t.REQUEST_ERROR_NAME=\"PwReqError\",t.API_MODULE=\"openApi\",t.CODE_SESSION_EXPIRED=14003,t.CODE_VERIFICATION_TYPE_INVALID=14002,t.CODE_ISSUING_COUNTRY_INVALID=12015,t.CODE_MAX_SELFIE_ATTEMPT=14019,t.CODE_MAX_DOC_ATTEMPT=14020,t.CODE_MAX_SESSION_ATTEMPT=14021,t.CODE_DOC_TYPE_INVALID=12002,t.CODE_DOC_UNPAIR=12006,t.CODE_DOC_EMPTY=12014,t.CODE_DOC_IMG_UNSIMILAR=12013,t.CODE_DOC_NOT_POSITIONED=12009,t.CODE_IMG_EXPOSED_1=11008,t.CODE_IMG_EXPOSED_2=11010,t.CODE_IMG_EXPOSED_3=12012,t.CODE_MISSING_PARAM=4001,t.CODE_VALIDATION_ERROR=4002,t.CODE_ACCESS_DENIED=4031,t.CODE_LIMIT_EXCEED=4291,t.CODE_BAD_REQ=4003,t.ATTEMPT_EXCEEDED=\"ATTEMPT_EXCEEDED\",t.INVALID_ARGUMENTS=\"INVALID_ARGUMENTS\",t.INVALID_ARGUMENT_LENGTH=\"INVALID_ARGUMENT_LENGTH\",t.INVALID_ARGUMENT_FORMAT=\"INVALID_ARGUMENT_FORMAT\",t.ERROR_MESSAGE={[t.ATTEMPT_EXCEEDED]:\"Maximum attempt exceeded\",[t.INVALID_ARGUMENTS]:\"Invalid arguments\",[t.INVALID_ARGUMENT_LENGTH]:\"Invalid length for argument\",[t.INVALID_ARGUMENT_FORMAT]:\"Invalid format for argument\",[t.CODE_SESSION_EXPIRED]:\"Token expired\"},t.ERROR_TYPE={[t.ATTEMPT_EXCEEDED]:\"attempt-exceeded\",[t.INVALID_ARGUMENTS]:\"invalid-arguments\",[t.INVALID_ARGUMENT_LENGTH]:\"invalid-argument-length\",[t.INVALID_ARGUMENT_FORMAT]:\"invalid-argument-format\",[t.CODE_SESSION_EXPIRED]:\"session-id-expired\",[t.CODE_VERIFICATION_TYPE_INVALID]:\"verification-type-invalid\",[t.CODE_ISSUING_COUNTRY_INVALID]:\"issuing-country-invalid\",[t.CODE_MAX_SELFIE_ATTEMPT]:\"max-selfie-attempt\",[t.CODE_MAX_DOC_ATTEMPT]:\"max-doc-attempt\",[t.CODE_MAX_SESSION_ATTEMPT]:\"max-session-attempt\",[t.CODE_DOC_TYPE_INVALID]:\"doc-type-invalid\",[t.CODE_DOC_UNPAIR]:\"doc-unpair\",[t.CODE_DOC_EMPTY]:\"doc-empty\",[t.CODE_DOC_IMG_UNSIMILAR]:\"doc-front-back-img-unsimilar\",[t.CODE_DOC_NOT_POSITIONED]:\"doc-not-positioned-proper\",[t.CODE_IMG_EXPOSED_1|t.CODE_IMG_EXPOSED_2|t.CODE_IMG_EXPOSED_3]:\"img-exposed\",[t.CODE_MISSING_PARAM]:\"missing-param\",[t.CODE_VALIDATION_ERROR]:\"validation-error\",[t.CODE_ACCESS_DENIED]:\"access-denied\",[t.CODE_LIMIT_EXCEED]:\"limit-exceed\",[t.CODE_BAD_REQ]:\"bad-request\"}},249:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.validateRegex=t.validateLength=t.validateParam=t.validateParams=t.constructAxiosError=void 0;const r=n(145),o=n(599);t.constructAxiosError=e=>{let t=new r.PwReqError;const{code:n,message:i,config:s,request:a,response:c}=e;if(t.status=null==c?void 0:c.status,t.statusText=n,t.message=i,t.config=s,t.request=a,t.response=c,null==c?void 0:c.data){const{code:e,messages:n=[],Message:r=\"\"}=c.data;if(r&&(t.message=r),n.length){const{code:r,text:i}=n[0];t.code=r||e||void 0,i&&(t.message=i);const s=t.code&&o.ERROR_TYPE[t.code];t.type=s?`${o.API_MODULE}/${s}`:\"unknown\"}}return t},t.validateParams=function(e,n,r){const o=Object.keys(n);for(const i of o){const o=!!r&&r.includes(i);(0,t.validateParam)(i,e[i],n[i],o)}return!0},t.validateParam=(e,t,n,i)=>{const s=null!==t&&(\"array\"===n?Array.isArray(t):typeof t===n&&!Array.isArray(t));if(!i&&(void 0===t||s))return!0;if(s&&\"object\"===n&&Object.keys(t).length>0)return!0;if(s&&\"array\"===n&&t.length>0)return!0;if(s&&\"string\"===n&&t)return!0;const a=new r.PwError(`${o.ERROR_MESSAGE[o.INVALID_ARGUMENTS]}: ${e}`);throw a.type=o.ERROR_TYPE[o.INVALID_ARGUMENTS],a},t.validateLength=(e,t,n,i,s)=>{if(void 0===t)return!0;const a=\"string\"==typeof t?t.length:t.toString().length,c=new r.PwError;if(c.type=o.ERROR_TYPE[o.INVALID_ARGUMENT_LENGTH],c.message=`${o.ERROR_MESSAGE[o.INVALID_ARGUMENT_LENGTH]}: ${e} `,n&&a!==n)throw c.message+=`must have exactly length ${n}`,c;if(i&&s&&(a<i||a>s))throw c.message+=`must be between ${i} and ${s} characters in length`,c;if(i&&a<i)throw c.message+=`must be at least ${i} characters in length`,c;if(s&&a>s)throw c.message+=`must not exceed ${s} characters in length`,c;return!0},t.validateRegex=(e,t,n,i)=>{if(i.test(t))return!0;const s=new r.PwError(`${o.ERROR_MESSAGE[o.INVALID_ARGUMENT_FORMAT]}: ${e} ${n} `);throw s.type=o.ERROR_TYPE[o.INVALID_ARGUMENT_FORMAT],s}},145:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.PwReqError=t.PwError=void 0;const r=n(599);class o extends Error{constructor(e){super(e),this.name=r.ERROR_NAME}}t.PwError=o,t.PwReqError=class extends o{constructor(e){super(e),this.name=r.REQUEST_ERROR_NAME}}},531:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.VIEW_MERCHANT=t.CREATE_SESSION=void 0;const r=n(207);t.CREATE_SESSION=(e,t)=>r.instance.post(\"ekyc/session\",e,{headers:t}),t.VIEW_MERCHANT=e=>r.instance.get(`/ekyc/session/${e}/merchant`)},219:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.isExpired=void 0,t.isExpired=e=>!e||e<Math.floor(Date.now()/1e3)},284:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.PWAUTHSDK=void 0;const i=o(n(245)),s=o(n(207)),a=n(249),c=n(599),u=n(145),l=n(531),d=n(219);t.PWAUTHSDK=class{constructor(){this.sessionId=\"\",this.countries=[],this.issuingCountries=[],this.fetchCountries=()=>r(this,void 0,void 0,(function*(){return[]})),this.fetchSupportedCountries=()=>r(this,void 0,void 0,(function*(){return[]})),this.viewDefaultCountry=()=>r(this,void 0,void 0,(function*(){return{}}))}get tokenDetails(){return{}}init(e){return r(this,void 0,void 0,(function*(){(0,a.validateParam)(\"accessToken\",e,\"string\",!0);const{verificationTypes:t,sessionId:n,exp:r,sub:o,aud:f}=(0,i.default)(e);if((0,d.isExpired)(r)){const e=new u.PwError(c.ERROR_MESSAGE[c.CODE_SESSION_EXPIRED]);throw e.type=c.ERROR_TYPE[c.CODE_SESSION_EXPIRED],e}s.default.create(f,e);const p=yield(0,l.VIEW_MERCHANT)(this.sessionId),{payload:h}=p.data;return this.merchantDetail=h.result,this.countries=yield this.fetchCountries(),this.issuingCountries=yield this.fetchSupportedCountries(),this.defaultCountry=yield this.viewDefaultCountry(),{verification_types:t,session_id:n,expired_at:r,user_id:o}}))}}},99:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.FETCH_STATES=t.FETCH_COUNTRIES=t.VIEW_IP_COUNTRY=void 0;const r=n(207);t.VIEW_IP_COUNTRY=()=>r.instance.get(\"locale/ip_info\"),t.FETCH_COUNTRIES=()=>r.instance.get(\"locale/country\"),t.FETCH_STATES=e=>r.instance.get(\"locale/states\",{params:e})},860:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,\"__esModule\",{value:!0}),t.PWCOMMONSDK=void 0;const o=n(249),i=n(99);t.PWCOMMONSDK=class{constructor(){this.countries=[],this.issuingCountries=[]}get tokenDetails(){return{}}viewIpCountry(){return r(this,void 0,void 0,(function*(){if(this._ipCountry)return this._ipCountry;const e=yield(0,i.VIEW_IP_COUNTRY)(),{payload:t}=e.data;return this._ipCountry=t,t}))}fetchStates(e){return r(this,void 0,void 0,(function*(){(0,o.validateParam)(\"country\",e,\"string\",!0);const t=yield(0,i.FETCH_STATES)({country:e}),{payload:n}=t.data,{results:r}=n;return Object.entries(r).map((([e,t])=>({iso_code:e,name:t})))}))}fetchCountries(){return r(this,void 0,void 0,(function*(){if(this.countries.length)return this.countries;const e=yield(0,i.FETCH_COUNTRIES)(),{payload:t}=e.data;return this.countries=t.results.map((e=>({iso_code:e.country,name:e.country_name}))),this.countries}))}fetchSupportedCountries(){return r(this,void 0,void 0,(function*(){const e=yield this.fetchCountries(),t=e.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t.iso_code]:t})),{}),{supportedCountries:n=[],excludedCountries:r=[]}=this.tokenDetails;if(n&&n.length)return n.map((e=>t[e.toLowerCase()]));if(r&&r.length){const t=r.map((e=>e.toLowerCase()));return e.filter((e=>t.includes(e.iso_code)))}return e}))}viewDefaultCountry(){return r(this,void 0,void 0,(function*(){const e=yield this.viewIpCountry(),t=yield this.fetchSupportedCountries(),{country:n}=this.tokenDetails;if(n){const e=t.find((e=>e.iso_code===n.toLowerCase()));if(e)return e}if(null==e?void 0:e.country){const n=t.find((t=>t.iso_code===(null==e?void 0:e.country.toLowerCase())));if(n)return n}return{}}))}}},639:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.VIEW_RESULT=t.UPDATE_FORM=t.UPLOAD_SELFIE=t.UPLOAD_DOC=void 0;const r=n(207);t.UPLOAD_DOC=(e,t)=>r.instance.post(`/ekyc/session/${e}/doc`,t),t.UPLOAD_SELFIE=(e,t)=>r.instance.post(`/ekyc/session/${e}/selfie`,t),t.UPDATE_FORM=(e,t)=>r.instance.put(`/ekyc/session/${e}/feedback`,t),t.VIEW_RESULT=e=>r.instance.get(`/ekyc/session/${e}/check`)},746:(e,t)=>{var n,r,o;Object.defineProperty(t,\"__esModule\",{value:!0}),t.VERIFICATION_STATUS=t.AI_DOC_TYPE=t.DOC_TYPE=void 0,function(e){e.PASSPORT=\"passport\",e.NATIONAL_ID=\"national_identity_document\",e.LICENSE=\"driving_license\"}(n||(t.DOC_TYPE=n={})),function(e){e.PASSPORT=\"passport\",e.ID=\"identity_document\",e.LICENSE=\"driving_license\"}(r||(t.AI_DOC_TYPE=r={})),function(e){e.PENDING=\"pending\",e.APPROVED=\"approved\",e.REJECTED=\"rejected\",e.REVIEW=\"review\"}(o||(t.VERIFICATION_STATUS=o={}))},602:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,\"__esModule\",{value:!0}),t.viewResult=void 0;const o=n(145),i=n(599),s=n(639),a=n(746);t.viewResult=(e,n=1)=>r(void 0,void 0,void 0,(function*(){const r=yield(0,s.VIEW_RESULT)(e),{payload:c}=r.data,{status:u=\"\"}=c;if(u===a.VERIFICATION_STATUS.PENDING){if(n<5)return yield new Promise((e=>setTimeout(e,3e3))),yield(0,t.viewResult)(e,n+1);const r=new o.PwReqError;return r.type=`${i.API_MODULE}/${i.ERROR_TYPE[i.ATTEMPT_EXCEEDED]}`,r.message=`${i.ERROR_MESSAGE[i.ATTEMPT_EXCEEDED]}: 5\"}`,Promise.reject(r)}{const{status:e,is_retriable:t,identity_document:n,selfie:r}=c,o={status:e,is_retriable:t,id_status:null==n?void 0:n.system_status,selfie_status:null==r?void 0:r.system_status},i=null==n?void 0:n.system_result;if(!i)return o;const{name:s,id_result:u,doc_type:l,filepaths:d}=i;if(!u)return o;const f=l===a.AI_DOC_TYPE.ID?a.DOC_TYPE.NATIONAL_ID:l,{full_name:p,given_name:h,surname:E}=s,{nationality:_=\"\",id_number:m=\"\",date_of_birth:O=\"\",address:y}=u;let g={nationality:_,id_number:m,date_of_birth:O};p?g.full_name=p||\"\":h||E?(g.given_name=h||\"\",g.surname=E||\"\"):g.full_name=p||\"\";const R={state_iso:\"\",state_name:\"\",country_iso2:\"\",country_name:\"\",city:\"\",line1:\"\",zip:\"\"};if(y){for(const[e,t]of Object.entries(R))R[e]=y[e]||t;g=Object.assign(Object.assign({},g),R)}return Object.assign(Object.assign({},o),{result:g,id_type:f,filepaths:d})}}))},882:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,\"__esModule\",{value:!0}),t.PWPROOFSDK=void 0;const o=n(249),i=n(602),s=n(639);t.PWPROOFSDK=class{constructor(){this.sessionId=\"\"}uploadDoc(e){return r(this,void 0,void 0,(function*(){const t=e.front_doc_uri?\"front_doc_uri\":\"front_doc_base64\";(0,o.validateParams)(e,{front_doc_uri:\"string\",back_doc_uri:\"string\",front_doc_base64:\"string\",back_doc_base64:\"string\",doc_type:\"string\",issuing_country:\"string\"},[t,\"doc_type\",\"issuing_country\"]);const n=yield(0,s.UPLOAD_DOC)(this.sessionId,e),{payload:r}=n.data;return r}))}uploadSelfie(e){return r(this,void 0,void 0,(function*(){const t=e.selfie_uri?\"selfie_uri\":\"selfie_base64\";(0,o.validateParams)(e,{selfie_uri:\"string\",selfie_base64:\"string\",liveness_score:\"number\"},[t]);const{selfie_uri:n,selfie_base64:r,liveness_score:i}=e,a=Object.assign({selfie_uri:n,selfie_base64:r},i&&{metadata:{facial_liveness_score:i.toString()}}),c=yield(0,s.UPLOAD_SELFIE)(this.sessionId,a),{payload:u}=c.data;return u}))}viewResult(){return r(this,void 0,void 0,(function*(){return yield(0,i.viewResult)(this.sessionId)}))}updateForm(e){return r(this,void 0,void 0,(function*(){let t=[\"id_number\",\"date_of_birth\",\"line1\",\"city\",\"zip\",\"state_iso\",\"country_iso2\"];if(e.given_name||e.surname?(t.push(\"surname\"),t.push(\"given_name\")):t.push(\"full_name\"),(0,o.validateParams)(e,{full_name:\"string\",given_name:\"string\",surname:\"string\",id_number:\"string\",date_of_birth:\"string\",line1:\"string\",city:\"string\",zip:\"string\",state_iso:\"string\",country_iso2:\"string\"},t),(0,o.validateLength)(\"full_name\",e.full_name,0,1,160),(0,o.validateLength)(\"given_name\",e.given_name,0,1,70),(0,o.validateLength)(\"surname\",e.surname,0,1,70),(0,o.validateLength)(\"id_number\",e.id_number,0,1,40),(0,o.validateLength)(\"date_of_birth\",e.date_of_birth,0,1,10),(0,o.validateLength)(\"line1\",e.line1,0,1,350),(0,o.validateLength)(\"city\",e.city,0,1,70),(0,o.validateLength)(\"state_iso\",e.state_iso,0,1,9),(0,o.validateLength)(\"address\",e.zip,0,1,40),(0,o.validateLength)(\"country_iso2\",e.country_iso2,2),e.date_of_birth){const t=/^\\d{4}-\\d{2}-\\d{2}$/;(0,o.validateRegex)(\"date_of_birth\",e.date_of_birth,\"YYYY-MM-DD\",t)}const n=yield(0,s.UPDATE_FORM)(this.sessionId,{feedback_params:e}),{payload:r}=n.data;return r}))}}},218:(e,t,n)=>{function r(e,t){return function(){return e.apply(t,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,s=(a=Object.create(null),e=>{const t=o.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});var a;const c=e=>(e=e.toLowerCase(),t=>s(t)===e),u=e=>t=>typeof t===e,{isArray:l}=Array,d=u(\"undefined\"),f=c(\"ArrayBuffer\"),p=u(\"string\"),h=u(\"function\"),E=u(\"number\"),_=e=>null!==e&&\"object\"==typeof e,m=e=>{if(\"object\"!==s(e))return!1;const t=i(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},O=c(\"Date\"),y=c(\"File\"),g=c(\"Blob\"),R=c(\"FileList\"),S=c(\"URLSearchParams\");function D(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if(\"object\"!=typeof e&&(e=[e]),l(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function T(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const A=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:n.g,v=e=>!d(e)&&e!==A,b=(C=\"undefined\"!=typeof Uint8Array&&i(Uint8Array),e=>C&&e instanceof C);var C;const w=c(\"HTMLFormElement\"),I=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),P=c(\"RegExp\"),N=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};D(n,((n,o)=>{!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},M=\"abcdefghijklmnopqrstuvwxyz\",L=\"0123456789\",U={DIGIT:L,ALPHA:M,ALPHA_DIGIT:M+M.toUpperCase()+L},x=c(\"AsyncFunction\");var j={isArray:l,isArrayBuffer:f,isBuffer:function(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&h(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&(\"function\"==typeof FormData&&e instanceof FormData||h(e.append)&&(\"formdata\"===(t=s(e))||\"object\"===t&&h(e.toString)&&\"[object FormData]\"===e.toString()))},isArrayBufferView:function(e){let t;return t=\"undefined\"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer),t},isString:p,isNumber:E,isBoolean:e=>!0===e||!1===e,isObject:_,isPlainObject:m,isUndefined:d,isDate:O,isFile:y,isBlob:g,isRegExp:P,isFunction:h,isStream:e=>_(e)&&h(e.pipe),isURLSearchParams:S,isTypedArray:b,isFileList:R,forEach:D,merge:function e(){const{caseless:t}=v(this)&&this||{},n={},r=(r,o)=>{const i=t&&T(n,o)||o;m(n[i])&&m(r)?n[i]=e(n[i],r):m(r)?n[i]=e({},r):l(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&D(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:o}={})=>(D(t,((t,o)=>{n&&h(t)?e[o]=r(t,n):e[o]=t}),{allOwnKeys:o}),e),trim:e=>e.trim?e.trim():e.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\"\"),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,\"super\",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,s,a;const c={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:c,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(l(e))return e;let t=e.length;if(!E(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:w,hasOwnProperty:I,hasOwnProp:I,reduceDescriptors:N,freezeMethods:e=>{N(e,((t,n)=>{if(h(e)&&-1!==[\"arguments\",\"caller\",\"callee\"].indexOf(n))return!1;const r=e[n];h(r)&&(t.enumerable=!1,\"writable\"in t?t.writable=!1:t.set||(t.set=()=>{throw Error(\"Can not rewrite read-only method '\"+n+\"'\")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return l(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:T,global:A,isContextDefined:v,ALPHABET:U,generateString:(e=16,t=U.ALPHA_DIGIT)=>{let n=\"\";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&h(e.append)&&\"FormData\"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(_(e)){if(t.indexOf(e)>=0)return;if(!(\"toJSON\"in e)){t[r]=e;const o=l(e)?[]:{};return D(e,((e,t)=>{const i=n(e,r+1);!d(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:x,isThenable:e=>e&&(_(e)||h(e))&&h(e.then)&&h(e.catch)};function F(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name=\"AxiosError\",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}j.inherits(F,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:j.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const k=F.prototype,B={};function V(e){return j.isPlainObject(e)||j.isArray(e)}function G(e){return j.endsWith(e,\"[]\")?e.slice(0,-2):e}function W(e,t,n){return e?e.concat(t).map((function(e,t){return e=G(e),!n&&t?\"[\"+e+\"]\":e})).join(n?\".\":\"\"):t}[\"ERR_BAD_OPTION_VALUE\",\"ERR_BAD_OPTION\",\"ECONNABORTED\",\"ETIMEDOUT\",\"ERR_NETWORK\",\"ERR_FR_TOO_MANY_REDIRECTS\",\"ERR_DEPRECATED\",\"ERR_BAD_RESPONSE\",\"ERR_BAD_REQUEST\",\"ERR_CANCELED\",\"ERR_NOT_SUPPORT\",\"ERR_INVALID_URL\"].forEach((e=>{B[e]={value:e}})),Object.defineProperties(F,B),Object.defineProperty(k,\"isAxiosError\",{value:!0}),F.from=(e,t,n,r,o,i)=>{const s=Object.create(k);return j.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>\"isAxiosError\"!==e)),F.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const H=j.toFlatObject(j,{},null,(function(e){return/^is[A-Z]/.test(e)}));function q(e,t,n){if(!j.isObject(e))throw new TypeError(\"target must be an object\");t=t||new FormData;const r=(n=j.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!j.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,i=n.dots,s=n.indexes,a=(n.Blob||\"undefined\"!=typeof Blob&&Blob)&&j.isSpecCompliantForm(t);if(!j.isFunction(o))throw new TypeError(\"visitor must be a function\");function c(e){if(null===e)return\"\";if(j.isDate(e))return e.toISOString();if(!a&&j.isBlob(e))throw new F(\"Blob is not supported. Use a Buffer instead.\");return j.isArrayBuffer(e)||j.isTypedArray(e)?a&&\"function\"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&\"object\"==typeof e)if(j.endsWith(n,\"{}\"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(j.isArray(e)&&function(e){return j.isArray(e)&&!e.some(V)}(e)||(j.isFileList(e)||j.endsWith(n,\"[]\"))&&(a=j.toArray(e)))return n=G(n),a.forEach((function(e,r){!j.isUndefined(e)&&null!==e&&t.append(!0===s?W([n],r,i):null===s?n:n+\"[]\",c(e))})),!1;return!!V(e)||(t.append(W(o,n,i),c(e)),!1)}const l=[],d=Object.assign(H,{defaultVisitor:u,convertValue:c,isVisitable:V});if(!j.isObject(e))throw new TypeError(\"data must be an object\");return function e(n,r){if(!j.isUndefined(n)){if(-1!==l.indexOf(n))throw Error(\"Circular reference detected in \"+r.join(\".\"));l.push(n),j.forEach(n,(function(n,i){!0===(!(j.isUndefined(n)||null===n)&&o.call(t,n,j.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t}function X(e){const t={\"!\":\"%21\",\"'\":\"%27\",\"(\":\"%28\",\")\":\"%29\",\"~\":\"%7E\",\"%20\":\"+\",\"%00\":\"\\0\"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function K(e,t){this._pairs=[],e&&q(e,this,t)}const z=K.prototype;function Y(e){return encodeURIComponent(e).replace(/%3A/gi,\":\").replace(/%24/g,\"$\").replace(/%2C/gi,\",\").replace(/%20/g,\"+\").replace(/%5B/gi,\"[\").replace(/%5D/gi,\"]\")}function $(e,t,n){if(!t)return e;const r=n&&n.encode||Y,o=n&&n.serialize;let i;if(i=o?o(t,n):j.isURLSearchParams(t)?t.toString():new K(t,n).toString(r),i){const t=e.indexOf(\"#\");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf(\"?\")?\"?\":\"&\")+i}return e}z.append=function(e,t){this._pairs.push([e,t])},z.toString=function(e){const t=e?function(t){return e.call(this,t,X)}:X;return this._pairs.map((function(e){return t(e[0])+\"=\"+t(e[1])}),\"\").join(\"&\")};var J=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){j.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Q={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z={isBrowser:!0,classes:{URLSearchParams:\"undefined\"!=typeof URLSearchParams?URLSearchParams:K,FormData:\"undefined\"!=typeof FormData?FormData:null,Blob:\"undefined\"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return(\"undefined\"==typeof navigator||\"ReactNative\"!==(e=navigator.product)&&\"NativeScript\"!==e&&\"NS\"!==e)&&\"undefined\"!=typeof window&&\"undefined\"!=typeof document})(),isStandardBrowserWebWorkerEnv:\"undefined\"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&\"function\"==typeof self.importScripts,protocols:[\"http\",\"https\",\"file\",\"blob\",\"url\",\"data\"]};function ee(e){function t(e,n,r,o){let i=e[o++];const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&j.isArray(r)?r.length:i,a?(j.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s):(r[i]&&j.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&j.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s)}if(j.isFormData(e)&&j.isFunction(e.entries)){const n={};return j.forEachEntry(e,((e,r)=>{t(function(e){return j.matchAll(/\\w+|\\[(\\w*)]/g,e).map((e=>\"[]\"===e[0]?\"\":e[1]||e[0]))}(e),r,n,0)})),n}return null}const te={\"Content-Type\":void 0},ne={transitional:Q,adapter:[\"xhr\",\"http\"],transformRequest:[function(e,t){const n=t.getContentType()||\"\",r=n.indexOf(\"application/json\")>-1,o=j.isObject(e);if(o&&j.isHTMLForm(e)&&(e=new FormData(e)),j.isFormData(e))return r&&r?JSON.stringify(ee(e)):e;if(j.isArrayBuffer(e)||j.isBuffer(e)||j.isStream(e)||j.isFile(e)||j.isBlob(e))return e;if(j.isArrayBufferView(e))return e.buffer;if(j.isURLSearchParams(e))return t.setContentType(\"application/x-www-form-urlencoded;charset=utf-8\",!1),e.toString();let i;if(o){if(n.indexOf(\"application/x-www-form-urlencoded\")>-1)return function(e,t){return q(e,new Z.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Z.isNode&&j.isBuffer(e)?(this.append(t,e.toString(\"base64\")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=j.isFileList(e))||n.indexOf(\"multipart/form-data\")>-1){const t=this.env&&this.env.FormData;return q(i?{\"files[]\":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType(\"application/json\",!1),function(e,t,n){if(j.isString(e))try{return(0,JSON.parse)(e),j.trim(e)}catch(e){if(\"SyntaxError\"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ne.transitional,n=t&&t.forcedJSONParsing,r=\"json\"===this.responseType;if(e&&j.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if(\"SyntaxError\"===e.name)throw F.from(e,F.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:\"XSRF-TOKEN\",xsrfHeaderName:\"X-XSRF-TOKEN\",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Z.classes.FormData,Blob:Z.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:\"application/json, text/plain, */*\"}}};j.forEach([\"delete\",\"get\",\"head\"],(function(e){ne.headers[e]={}})),j.forEach([\"post\",\"put\",\"patch\"],(function(e){ne.headers[e]=j.merge(te)}));var re=ne;const oe=j.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\"]),ie=Symbol(\"internals\");function se(e){return e&&String(e).trim().toLowerCase()}function ae(e){return!1===e||null==e?e:j.isArray(e)?e.map(ae):String(e)}function ce(e,t,n,r,o){return j.isFunction(r)?r.call(this,t,n):(o&&(t=n),j.isString(t)?j.isString(r)?-1!==t.indexOf(r):j.isRegExp(r)?r.test(t):void 0:void 0)}class ue{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=se(t);if(!o)throw new Error(\"header name must be a non-empty string\");const i=j.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=ae(e))}const i=(e,t)=>j.forEach(e,((e,n)=>o(e,n,t)));return j.isPlainObject(e)||e instanceof this.constructor?i(e,t):j.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split(\"\\n\").forEach((function(e){o=e.indexOf(\":\"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&oe[n]||(\"set-cookie\"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+\", \"+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=se(e)){const n=j.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(j.isFunction(t))return t.call(this,e,n);if(j.isRegExp(t))return t.exec(e);throw new TypeError(\"parser must be boolean|regexp|function\")}}}has(e,t){if(e=se(e)){const n=j.findKey(this,e);return!(!n||void 0===this[n]||t&&!ce(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=se(e)){const o=j.findKey(n,e);!o||t&&!ce(0,n[o],o,t)||(delete n[o],r=!0)}}return j.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!ce(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return j.forEach(this,((r,o)=>{const i=j.findKey(n,o);if(i)return t[i]=ae(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\\d])(\\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete t[o],t[s]=ae(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return j.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&j.isArray(n)?n.join(\", \"):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+\": \"+t)).join(\"\\n\")}get[Symbol.toStringTag](){return\"AxiosHeaders\"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[ie]=this[ie]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=se(e);t[r]||(function(e,t){const n=j.toCamelCase(\" \"+t);[\"get\",\"set\",\"has\"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return j.isArray(e)?e.forEach(r):r(e),this}}ue.accessor([\"Content-Type\",\"Content-Length\",\"Accept\",\"Accept-Encoding\",\"User-Agent\",\"Authorization\"]),j.freezeMethods(ue.prototype),j.freezeMethods(ue);var le=ue;function de(e,t){const n=this||re,r=t||n,o=le.from(r.headers);let i=r.data;return j.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function fe(e){return!(!e||!e.__CANCEL__)}function pe(e,t,n){F.call(this,null==e?\"canceled\":e,F.ERR_CANCELED,t,n),this.name=\"CanceledError\"}j.inherits(pe,F,{__CANCEL__:!0});var he=Z.isStandardBrowserEnv?{write:function(e,t,n,r,o,i){const s=[];s.push(e+\"=\"+encodeURIComponent(t)),j.isNumber(n)&&s.push(\"expires=\"+new Date(n).toGMTString()),j.isString(r)&&s.push(\"path=\"+r),j.isString(o)&&s.push(\"domain=\"+o),!0===i&&s.push(\"secure\"),document.cookie=s.join(\"; \")},read:function(e){const t=document.cookie.match(new RegExp(\"(^|;\\\\s*)(\"+e+\")=([^;]*)\"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,\"\",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Ee(e,t){return e&&!/^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(t)?function(e,t){return t?e.replace(/\\/+$/,\"\")+\"/\"+t.replace(/^\\/+/,\"\"):e}(e,t):t}var _e=Z.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement(\"a\");let n;function r(n){let r=n;return e&&(t.setAttribute(\"href\",r),r=t.href),t.setAttribute(\"href\",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,\"\"):\"\",host:t.host,search:t.search?t.search.replace(/^\\?/,\"\"):\"\",hash:t.hash?t.hash.replace(/^#/,\"\"):\"\",hostname:t.hostname,port:t.port,pathname:\"/\"===t.pathname.charAt(0)?t.pathname:\"/\"+t.pathname}}return n=r(window.location.href),function(e){const t=j.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function me(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[s];o||(o=c),n[i]=a,r[i]=c;let l=s,d=0;for(;l!==i;)d+=n[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const f=u&&c-u;return f?Math.round(1e3*d/f):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,c=r(a);n=i;const u={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:o};u[t?\"download\":\"upload\"]=!0,e(u)}}const Oe={http:null,xhr:\"undefined\"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=le.from(e.headers).normalize(),i=e.responseType;let s;function a(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener(\"abort\",s)}j.isFormData(r)&&(Z.isStandardBrowserEnv||Z.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType(\"multipart/form-data;\",!1));let c=new XMLHttpRequest;if(e.auth){const t=e.auth.username||\"\",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):\"\";o.set(\"Authorization\",\"Basic \"+btoa(t+\":\"+n))}const u=Ee(e.baseURL,e.url);function l(){if(!c)return;const r=le.from(\"getAllResponseHeaders\"in c&&c.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new F(\"Request failed with status code \"+n.status,[F.ERR_BAD_REQUEST,F.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),a()}),(function(e){n(e),a()}),{data:i&&\"text\"!==i&&\"json\"!==i?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:e,request:c}),c=null}if(c.open(e.method.toUpperCase(),$(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,\"onloadend\"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf(\"file:\"))&&setTimeout(l)},c.onabort=function(){c&&(n(new F(\"Request aborted\",F.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new F(\"Network Error\",F.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let t=e.timeout?\"timeout of \"+e.timeout+\"ms exceeded\":\"timeout exceeded\";const r=e.transitional||Q;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new F(t,r.clarifyTimeoutError?F.ETIMEDOUT:F.ECONNABORTED,e,c)),c=null},Z.isStandardBrowserEnv){const t=(e.withCredentials||_e(u))&&e.xsrfCookieName&&he.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),\"setRequestHeader\"in c&&j.forEach(o.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),j.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),i&&\"json\"!==i&&(c.responseType=e.responseType),\"function\"==typeof e.onDownloadProgress&&c.addEventListener(\"progress\",me(e.onDownloadProgress,!0)),\"function\"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener(\"progress\",me(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{c&&(n(!t||t.type?new pe(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener(\"abort\",s)));const d=function(e){const t=/^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(e);return t&&t[1]||\"\"}(u);d&&-1===Z.protocols.indexOf(d)?n(new F(\"Unsupported protocol \"+d+\":\",F.ERR_BAD_REQUEST,e)):c.send(r||null)}))}};j.forEach(Oe,((e,t)=>{if(e){try{Object.defineProperty(e,\"name\",{value:t})}catch(e){}Object.defineProperty(e,\"adapterName\",{value:t})}}));function ye(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pe(null,e)}function ge(e){return ye(e),e.headers=le.from(e.headers),e.data=de.call(e,e.transformRequest),-1!==[\"post\",\"put\",\"patch\"].indexOf(e.method)&&e.headers.setContentType(\"application/x-www-form-urlencoded\",!1),(e=>{e=j.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=j.isString(n)?Oe[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new F(`Adapter ${n} is not supported by the environment`,\"ERR_NOT_SUPPORT\");throw new Error(j.hasOwnProp(Oe,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!j.isFunction(r))throw new TypeError(\"adapter is not a function\");return r})(e.adapter||re.adapter)(e).then((function(t){return ye(e),t.data=de.call(e,e.transformResponse,t),t.headers=le.from(t.headers),t}),(function(t){return fe(t)||(ye(e),t&&t.response&&(t.response.data=de.call(e,e.transformResponse,t.response),t.response.headers=le.from(t.response.headers))),Promise.reject(t)}))}const Re=e=>e instanceof le?e.toJSON():e;function Se(e,t){t=t||{};const n={};function r(e,t,n){return j.isPlainObject(e)&&j.isPlainObject(t)?j.merge.call({caseless:n},e,t):j.isPlainObject(t)?j.merge({},t):j.isArray(t)?t.slice():t}function o(e,t,n){return j.isUndefined(t)?j.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!j.isUndefined(t))return r(void 0,t)}function s(e,t){return j.isUndefined(t)?j.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>o(Re(e),Re(t),!0)};return j.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=c[r]||o,s=i(e[r],t[r],r);j.isUndefined(s)&&i!==a||(n[r]=s)})),n}const De={};[\"object\",\"boolean\",\"number\",\"function\",\"string\",\"symbol\"].forEach(((e,t)=>{De[e]=function(n){return typeof n===e||\"a\"+(t<1?\"n \":\" \")+e}}));const Te={};De.transitional=function(e,t,n){function r(e,t){return\"[Axios v1.4.0] Transitional option '\"+e+\"'\"+t+(n?\". \"+n:\"\")}return(n,o,i)=>{if(!1===e)throw new F(r(o,\" has been removed\"+(t?\" in \"+t:\"\")),F.ERR_DEPRECATED);return t&&!Te[o]&&(Te[o]=!0,console.warn(r(o,\" has been deprecated since v\"+t+\" and will be removed in the near future\"))),!e||e(n,o,i)}};var Ae={assertOptions:function(e,t,n){if(\"object\"!=typeof e)throw new F(\"options must be an object\",F.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new F(\"option \"+i+\" must be \"+n,F.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new F(\"Unknown option \"+i,F.ERR_BAD_OPTION)}},validators:De};const ve=Ae.validators;class be{constructor(e){this.defaults=e,this.interceptors={request:new J,response:new J}}request(e,t){\"string\"==typeof e?(t=t||{}).url=e:t=e||{},t=Se(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;let i;void 0!==n&&Ae.assertOptions(n,{silentJSONParsing:ve.transitional(ve.boolean),forcedJSONParsing:ve.transitional(ve.boolean),clarifyTimeoutError:ve.transitional(ve.boolean)},!1),null!=r&&(j.isFunction(r)?t.paramsSerializer={serialize:r}:Ae.assertOptions(r,{encode:ve.function,serialize:ve.function},!0)),t.method=(t.method||this.defaults.method||\"get\").toLowerCase(),i=o&&j.merge(o.common,o[t.method]),i&&j.forEach([\"delete\",\"get\",\"head\",\"post\",\"put\",\"patch\",\"common\"],(e=>{delete o[e]})),t.headers=le.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){\"function\"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,d=0;if(!a){const e=[ge.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);d<l;)u=u.then(e[d++],e[d++]);return u}l=s.length;let f=t;for(d=0;d<l;){const e=s[d++],t=s[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{u=ge.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,l=c.length;d<l;)u=u.then(c[d++],c[d++]);return u}getUri(e){return $(Ee((e=Se(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}j.forEach([\"delete\",\"get\",\"head\",\"options\"],(function(e){be.prototype[e]=function(t,n){return this.request(Se(n||{},{method:e,url:t,data:(n||{}).data}))}})),j.forEach([\"post\",\"put\",\"patch\"],(function(e){function t(t){return function(n,r,o){return this.request(Se(o||{},{method:e,headers:t?{\"Content-Type\":\"multipart/form-data\"}:{},url:n,data:r}))}}be.prototype[e]=t(),be.prototype[e+\"Form\"]=t(!0)}));var Ce=be;class we{constructor(e){if(\"function\"!=typeof e)throw new TypeError(\"executor must be a function.\");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new pe(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new we((function(t){e=t})),cancel:e}}}var Ie=we;const Pe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pe).forEach((([e,t])=>{Pe[t]=e}));var Ne=Pe;const Me=function e(t){const n=new Ce(t),o=r(Ce.prototype.request,n);return j.extend(o,Ce.prototype,n,{allOwnKeys:!0}),j.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return e(Se(t,n))},o}(re);Me.Axios=Ce,Me.CanceledError=pe,Me.CancelToken=Ie,Me.isCancel=fe,Me.VERSION=\"1.4.0\",Me.toFormData=q,Me.AxiosError=F,Me.Cancel=Me.CanceledError,Me.all=function(e){return Promise.all(e)},Me.spread=function(e){return function(t){return e.apply(null,t)}},Me.isAxiosError=function(e){return j.isObject(e)&&!0===e.isAxiosError},Me.mergeConfig=Se,Me.AxiosHeaders=le,Me.formToJSON=e=>ee(j.isHTMLForm(e)?new FormData(e):e),Me.HttpStatusCode=Ne,Me.default=Me,e.exports=Me}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(e){if(\"object\"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})};var r=n(607);return r.default})()));\n\n//# sourceURL=webpack://PWUISDK/./node_modules/pipwave-ekyc-sdk/dist/pw-bundle.js?");
|
|
3409
|
+
eval("!function(e,t){ true?module.exports=t():0}(self,(()=>(()=>{\"use strict\";var e={245:(e,t,n)=>{function r(e){this.message=e}n.r(t),n.d(t,{InvalidTokenError:()=>s,default:()=>a}),r.prototype=new Error,r.prototype.name=\"InvalidCharacterError\";var o=\"undefined\"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,\"\");if(t.length%4==1)throw new r(\"'atob' failed: The string to be decoded is not correctly encoded.\");for(var n,o,i=0,s=0,a=\"\";o=t.charAt(s++);~o&&(n=i%4?64*n+o:o,i++%4)?a+=String.fromCharCode(255&n>>(-2*i&6)):0)o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\".indexOf(o);return a};function i(e){var t=e.replace(/-/g,\"+\").replace(/_/g,\"/\");switch(t.length%4){case 0:break;case 2:t+=\"==\";break;case 3:t+=\"=\";break;default:throw\"Illegal base64url string!\"}try{return function(e){return decodeURIComponent(o(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n=\"0\"+n),\"%\"+n})))}(t)}catch(e){return o(t)}}function s(e){this.message=e}s.prototype=new Error,s.prototype.name=\"InvalidTokenError\";const a=function(e,t){if(\"string\"!=typeof e)throw new s(\"Invalid token specified\");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(i(e.split(\".\")[n]))}catch(e){throw new s(\"Invalid token specified: \"+e.message)}}},607:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.PWSDK=void 0;const o=r(n(245)),i=r(n(207)),s=n(284),a=n(860),c=n(882);class u{constructor(){this.countries=[],this.issuingCountries=[],this.init=s.PWAUTHSDK.prototype.init,this.fetchStates=a.PWCOMMONSDK.prototype.fetchStates,this.viewIpCountry=a.PWCOMMONSDK.prototype.viewIpCountry,this.fetchCountries=a.PWCOMMONSDK.prototype.fetchCountries,this.fetchSupportedCountries=a.PWCOMMONSDK.prototype.fetchSupportedCountries,this.viewDefaultCountry=a.PWCOMMONSDK.prototype.viewDefaultCountry,this.uploadDoc=c.PWPROOFSDK.prototype.uploadDoc,this.uploadSelfie=c.PWPROOFSDK.prototype.uploadSelfie,this.viewResult=c.PWPROOFSDK.prototype.viewResult,this.updateForm=c.PWPROOFSDK.prototype.updateForm}get tokenDetails(){const e=i.default.getAccessToken();return e?(0,o.default)(e):{}}get sessionId(){return this.tokenDetails.sessionId||\"\"}get verificationTypes(){return this.tokenDetails.verificationTypes||[]}}t.PWSDK=u,t.default={PWSDK:u}},207:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.instance=void 0;const i=o(n(218)),s=n(249);t.instance={};let a=\"\",c=Object.freeze(new class{getAccessToken(){return a}create(e,n){t.instance&&!Object.keys(t.instance).length&&(a=n,t.instance=i.default.create({baseURL:e||\"https://staging-open-api.pipwave.com\",headers:{common:{Authorization:n}}}),t.instance.interceptors.request.use((function(e){return e}),this.onResponseError),t.instance.interceptors.response.use(void 0,this.onResponseError))}onResponseError(e){return r(this,void 0,void 0,(function*(){const t=(0,s.constructAxiosError)(e);return Promise.reject(t)}))}});t.default=c},599:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.ERROR_TYPE=t.ERROR_MESSAGE=t.INVALID_ARGUMENT_FORMAT=t.INVALID_ARGUMENT_LENGTH=t.INVALID_ARGUMENTS=t.ATTEMPT_EXCEEDED=t.CODE_BAD_REQ=t.CODE_LIMIT_EXCEED=t.CODE_ACCESS_DENIED=t.CODE_VALIDATION_ERROR=t.CODE_MISSING_PARAM=t.CODE_IMG_EXPOSED_3=t.CODE_IMG_EXPOSED_2=t.CODE_IMG_EXPOSED_1=t.CODE_DOC_NOT_POSITIONED=t.CODE_DOC_IMG_UNSIMILAR=t.CODE_DOC_EMPTY=t.CODE_DOC_UNPAIR=t.CODE_DOC_TYPE_INVALID=t.CODE_MAX_SESSION_ATTEMPT=t.CODE_MAX_DOC_ATTEMPT=t.CODE_MAX_SELFIE_ATTEMPT=t.CODE_ISSUING_COUNTRY_INVALID=t.CODE_VERIFICATION_TYPE_INVALID=t.CODE_SESSION_EXPIRED=t.API_MODULE=t.REQUEST_ERROR_NAME=t.ERROR_NAME=void 0,t.ERROR_NAME=\"PwError\",t.REQUEST_ERROR_NAME=\"PwReqError\",t.API_MODULE=\"openApi\",t.CODE_SESSION_EXPIRED=14003,t.CODE_VERIFICATION_TYPE_INVALID=14002,t.CODE_ISSUING_COUNTRY_INVALID=12015,t.CODE_MAX_SELFIE_ATTEMPT=14019,t.CODE_MAX_DOC_ATTEMPT=14020,t.CODE_MAX_SESSION_ATTEMPT=14021,t.CODE_DOC_TYPE_INVALID=12002,t.CODE_DOC_UNPAIR=12006,t.CODE_DOC_EMPTY=12014,t.CODE_DOC_IMG_UNSIMILAR=12013,t.CODE_DOC_NOT_POSITIONED=12009,t.CODE_IMG_EXPOSED_1=11008,t.CODE_IMG_EXPOSED_2=11010,t.CODE_IMG_EXPOSED_3=12012,t.CODE_MISSING_PARAM=4001,t.CODE_VALIDATION_ERROR=4002,t.CODE_ACCESS_DENIED=4031,t.CODE_LIMIT_EXCEED=4291,t.CODE_BAD_REQ=4003,t.ATTEMPT_EXCEEDED=\"ATTEMPT_EXCEEDED\",t.INVALID_ARGUMENTS=\"INVALID_ARGUMENTS\",t.INVALID_ARGUMENT_LENGTH=\"INVALID_ARGUMENT_LENGTH\",t.INVALID_ARGUMENT_FORMAT=\"INVALID_ARGUMENT_FORMAT\",t.ERROR_MESSAGE={[t.ATTEMPT_EXCEEDED]:\"Maximum attempt exceeded\",[t.INVALID_ARGUMENTS]:\"Invalid arguments\",[t.INVALID_ARGUMENT_LENGTH]:\"Invalid length for argument\",[t.INVALID_ARGUMENT_FORMAT]:\"Invalid format for argument\",[t.CODE_SESSION_EXPIRED]:\"Token expired\"},t.ERROR_TYPE={[t.ATTEMPT_EXCEEDED]:\"attempt-exceeded\",[t.INVALID_ARGUMENTS]:\"invalid-arguments\",[t.INVALID_ARGUMENT_LENGTH]:\"invalid-argument-length\",[t.INVALID_ARGUMENT_FORMAT]:\"invalid-argument-format\",[t.CODE_SESSION_EXPIRED]:\"session-id-expired\",[t.CODE_VERIFICATION_TYPE_INVALID]:\"verification-type-invalid\",[t.CODE_ISSUING_COUNTRY_INVALID]:\"issuing-country-invalid\",[t.CODE_MAX_SELFIE_ATTEMPT]:\"max-selfie-attempt\",[t.CODE_MAX_DOC_ATTEMPT]:\"max-doc-attempt\",[t.CODE_MAX_SESSION_ATTEMPT]:\"max-session-attempt\",[t.CODE_DOC_TYPE_INVALID]:\"doc-type-invalid\",[t.CODE_DOC_UNPAIR]:\"doc-unpair\",[t.CODE_DOC_EMPTY]:\"doc-empty\",[t.CODE_DOC_IMG_UNSIMILAR]:\"doc-front-back-img-unsimilar\",[t.CODE_DOC_NOT_POSITIONED]:\"doc-not-positioned-proper\",[t.CODE_IMG_EXPOSED_1|t.CODE_IMG_EXPOSED_2|t.CODE_IMG_EXPOSED_3]:\"img-exposed\",[t.CODE_MISSING_PARAM]:\"missing-param\",[t.CODE_VALIDATION_ERROR]:\"validation-error\",[t.CODE_ACCESS_DENIED]:\"access-denied\",[t.CODE_LIMIT_EXCEED]:\"limit-exceed\",[t.CODE_BAD_REQ]:\"bad-request\"}},249:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.validateRegex=t.validateLength=t.validateParam=t.validateParams=t.constructAxiosError=void 0;const r=n(145),o=n(599);t.constructAxiosError=e=>{let t=new r.PwReqError;const{code:n,message:i,config:s,request:a,response:c}=e;if(t.status=null==c?void 0:c.status,t.statusText=n,t.message=i,t.config=s,t.request=a,t.response=c,null==c?void 0:c.data){const{code:e,messages:n=[],Message:r=\"\"}=c.data;if(r&&(t.message=r),n.length){const{code:r,text:i}=n[0];t.code=r||e||void 0,i&&(t.message=i);const s=t.code&&o.ERROR_TYPE[t.code];t.type=s?`${o.API_MODULE}/${s}`:\"unknown\"}}return t},t.validateParams=function(e,n,r){const o=Object.keys(n);for(const i of o){const o=!!r&&r.includes(i);(0,t.validateParam)(i,e[i],n[i],o)}return!0},t.validateParam=(e,t,n,i)=>{const s=null!==t&&(\"array\"===n?Array.isArray(t):typeof t===n&&!Array.isArray(t));if(!i&&(void 0===t||s))return!0;if(s&&\"object\"===n&&Object.keys(t).length>0)return!0;if(s&&\"array\"===n&&t.length>0)return!0;if(s&&\"string\"===n&&t)return!0;const a=new r.PwError(`${o.ERROR_MESSAGE[o.INVALID_ARGUMENTS]}: ${e}`);throw a.type=o.ERROR_TYPE[o.INVALID_ARGUMENTS],a},t.validateLength=(e,t,n,i,s)=>{if(void 0===t)return!0;const a=\"string\"==typeof t?t.length:t.toString().length,c=new r.PwError;if(c.type=o.ERROR_TYPE[o.INVALID_ARGUMENT_LENGTH],c.message=`${o.ERROR_MESSAGE[o.INVALID_ARGUMENT_LENGTH]}: ${e} `,n&&a!==n)throw c.message+=`must have exactly length ${n}`,c;if(i&&s&&(a<i||a>s))throw c.message+=`must be between ${i} and ${s} characters in length`,c;if(i&&a<i)throw c.message+=`must be at least ${i} characters in length`,c;if(s&&a>s)throw c.message+=`must not exceed ${s} characters in length`,c;return!0},t.validateRegex=(e,t,n,i)=>{if(i.test(t))return!0;const s=new r.PwError(`${o.ERROR_MESSAGE[o.INVALID_ARGUMENT_FORMAT]}: ${e} ${n} `);throw s.type=o.ERROR_TYPE[o.INVALID_ARGUMENT_FORMAT],s}},145:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.PwReqError=t.PwError=void 0;const r=n(599);class o extends Error{constructor(e){super(e),this.name=r.ERROR_NAME}}t.PwError=o,t.PwReqError=class extends o{constructor(e){super(e),this.name=r.REQUEST_ERROR_NAME}}},531:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.VIEW_MERCHANT=t.CREATE_SESSION=void 0;const r=n(207);t.CREATE_SESSION=(e,t)=>r.instance.post(\"ekyc/session\",e,{headers:t}),t.VIEW_MERCHANT=e=>r.instance.get(`merchant/${e}`)},219:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.isExpired=void 0,t.isExpired=e=>!e||e<Math.floor(Date.now()/1e3)},284:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.PWAUTHSDK=void 0;const i=o(n(245)),s=o(n(207)),a=n(249),c=n(599),u=n(145),l=n(531),d=n(219);t.PWAUTHSDK=class{constructor(){this.sessionId=\"\",this.countries=[],this.issuingCountries=[],this.fetchCountries=()=>r(this,void 0,void 0,(function*(){return[]})),this.fetchSupportedCountries=()=>r(this,void 0,void 0,(function*(){return[]})),this.viewDefaultCountry=()=>r(this,void 0,void 0,(function*(){return{}}))}get tokenDetails(){return{}}init(e){return r(this,void 0,void 0,(function*(){(0,a.validateParam)(\"accessToken\",e,\"string\",!0);const{verificationTypes:t,sessionId:n,exp:r,sub:o,aud:f,merchantId:p}=(0,i.default)(e);if((0,d.isExpired)(r)){const e=new u.PwError(c.ERROR_MESSAGE[c.CODE_SESSION_EXPIRED]);throw e.type=c.ERROR_TYPE[c.CODE_SESSION_EXPIRED],e}s.default.create(f,e);const h=yield(0,l.VIEW_MERCHANT)(p),{payload:E}=h.data;return this.merchantDetail=E.result,this.countries=yield this.fetchCountries(),this.issuingCountries=yield this.fetchSupportedCountries(),this.defaultCountry=yield this.viewDefaultCountry(),{verification_types:t,session_id:n,expired_at:r,user_id:o}}))}}},99:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.FETCH_STATES=t.FETCH_COUNTRIES=t.VIEW_IP_COUNTRY=void 0;const r=n(207);t.VIEW_IP_COUNTRY=()=>r.instance.get(\"locale/ip_info\"),t.FETCH_COUNTRIES=()=>r.instance.get(\"locale/country\"),t.FETCH_STATES=e=>r.instance.get(\"locale/states\",{params:e})},860:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,\"__esModule\",{value:!0}),t.PWCOMMONSDK=void 0;const o=n(249),i=n(99);t.PWCOMMONSDK=class{constructor(){this.countries=[],this.issuingCountries=[]}get tokenDetails(){return{}}viewIpCountry(){return r(this,void 0,void 0,(function*(){if(this._ipCountry)return this._ipCountry;const e=yield(0,i.VIEW_IP_COUNTRY)(),{payload:t}=e.data;return this._ipCountry=t,t}))}fetchStates(e){return r(this,void 0,void 0,(function*(){(0,o.validateParam)(\"country\",e,\"string\",!0);const t=yield(0,i.FETCH_STATES)({country:e}),{payload:n}=t.data,{results:r}=n;return Object.entries(r).map((([e,t])=>({iso_code:e,name:t})))}))}fetchCountries(){return r(this,void 0,void 0,(function*(){if(this.countries.length)return this.countries;const e=yield(0,i.FETCH_COUNTRIES)(),{payload:t}=e.data;return this.countries=t.results.map((e=>({iso_code:e.country,name:e.country_name}))),this.countries}))}fetchSupportedCountries(){return r(this,void 0,void 0,(function*(){const e=yield this.fetchCountries(),t=e.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t.iso_code]:t})),{}),{supportedCountries:n=[],excludedCountries:r=[]}=this.tokenDetails;if(n&&n.length)return n.map((e=>t[e.toLowerCase()]));if(r&&r.length){const t=r.map((e=>e.toLowerCase()));return e.filter((e=>t.includes(e.iso_code)))}return e}))}viewDefaultCountry(){return r(this,void 0,void 0,(function*(){const e=yield this.viewIpCountry(),t=yield this.fetchSupportedCountries(),{country:n}=this.tokenDetails;if(n){const e=t.find((e=>e.iso_code===n.toLowerCase()));if(e)return e}if(null==e?void 0:e.country){const n=t.find((t=>t.iso_code===(null==e?void 0:e.country.toLowerCase())));if(n)return n}return{}}))}}},639:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.VIEW_RESULT=t.UPDATE_FORM=t.UPLOAD_SELFIE=t.UPLOAD_DOC=void 0;const r=n(207);t.UPLOAD_DOC=(e,t)=>r.instance.post(`/ekyc/session/${e}/doc`,t),t.UPLOAD_SELFIE=(e,t)=>r.instance.post(`/ekyc/session/${e}/selfie`,t),t.UPDATE_FORM=(e,t)=>r.instance.put(`/ekyc/session/${e}/feedback`,t),t.VIEW_RESULT=e=>r.instance.get(`/ekyc/session/${e}/check`)},746:(e,t)=>{var n,r,o;Object.defineProperty(t,\"__esModule\",{value:!0}),t.VERIFICATION_STATUS=t.AI_DOC_TYPE=t.DOC_TYPE=void 0,function(e){e.PASSPORT=\"passport\",e.NATIONAL_ID=\"national_identity_document\",e.LICENSE=\"driving_license\"}(n||(t.DOC_TYPE=n={})),function(e){e.PASSPORT=\"passport\",e.ID=\"identity_document\",e.LICENSE=\"driving_license\"}(r||(t.AI_DOC_TYPE=r={})),function(e){e.PENDING=\"pending\",e.APPROVED=\"approved\",e.REJECTED=\"rejected\",e.REVIEW=\"review\"}(o||(t.VERIFICATION_STATUS=o={}))},602:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,\"__esModule\",{value:!0}),t.viewResult=void 0;const o=n(145),i=n(599),s=n(639),a=n(746);t.viewResult=(e,n=1)=>r(void 0,void 0,void 0,(function*(){const r=yield(0,s.VIEW_RESULT)(e),{payload:c}=r.data,{status:u=\"\"}=c;if(u===a.VERIFICATION_STATUS.PENDING){if(n<5)return yield new Promise((e=>setTimeout(e,3e3))),yield(0,t.viewResult)(e,n+1);const r=new o.PwReqError;return r.type=`${i.API_MODULE}/${i.ERROR_TYPE[i.ATTEMPT_EXCEEDED]}`,r.message=`${i.ERROR_MESSAGE[i.ATTEMPT_EXCEEDED]}: 5\"}`,Promise.reject(r)}{const{status:e,is_retriable:t,identity_document:n,selfie:r}=c,o={status:e,is_retriable:t,id_status:null==n?void 0:n.system_status,selfie_status:null==r?void 0:r.system_status},i=null==n?void 0:n.system_result;if(!i)return o;const{name:s,id_result:u,doc_type:l,filepaths:d}=i;if(!u)return o;const f=l===a.AI_DOC_TYPE.ID?a.DOC_TYPE.NATIONAL_ID:l,{full_name:p,given_name:h,surname:E}=s,{nationality:_=\"\",id_number:m=\"\",date_of_birth:O=\"\",address:y}=u;let g={nationality:_,id_number:m,date_of_birth:O};p?g.full_name=p||\"\":h||E?(g.given_name=h||\"\",g.surname=E||\"\"):g.full_name=p||\"\";const R={state_iso:\"\",state_name:\"\",country_iso2:\"\",country_name:\"\",city:\"\",line1:\"\",zip:\"\"};if(y){for(const[e,t]of Object.entries(R))R[e]=y[e]||t;g=Object.assign(Object.assign({},g),R)}return Object.assign(Object.assign({},o),{result:g,id_type:f,filepaths:d})}}))},882:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,\"__esModule\",{value:!0}),t.PWPROOFSDK=void 0;const o=n(249),i=n(602),s=n(639);t.PWPROOFSDK=class{constructor(){this.sessionId=\"\"}uploadDoc(e){return r(this,void 0,void 0,(function*(){const t=e.front_doc_uri?\"front_doc_uri\":\"front_doc_base64\";(0,o.validateParams)(e,{front_doc_uri:\"string\",back_doc_uri:\"string\",front_doc_base64:\"string\",back_doc_base64:\"string\",doc_type:\"string\",issuing_country:\"string\"},[t,\"doc_type\",\"issuing_country\"]);const n=yield(0,s.UPLOAD_DOC)(this.sessionId,e),{payload:r}=n.data;return r}))}uploadSelfie(e){return r(this,void 0,void 0,(function*(){const t=e.selfie_uri?\"selfie_uri\":\"selfie_base64\";(0,o.validateParams)(e,{selfie_uri:\"string\",selfie_base64:\"string\",liveness_score:\"number\"},[t]);const{selfie_uri:n,selfie_base64:r,liveness_score:i}=e,a=Object.assign({selfie_uri:n,selfie_base64:r},i&&{metadata:{facial_liveness_score:i.toString()}}),c=yield(0,s.UPLOAD_SELFIE)(this.sessionId,a),{payload:u}=c.data;return u}))}viewResult(){return r(this,void 0,void 0,(function*(){return yield(0,i.viewResult)(this.sessionId)}))}updateForm(e){return r(this,void 0,void 0,(function*(){let t=[\"id_number\",\"date_of_birth\",\"line1\",\"city\",\"zip\",\"state_iso\",\"country_iso2\"];if(e.given_name||e.surname?(t.push(\"surname\"),t.push(\"given_name\")):t.push(\"full_name\"),(0,o.validateParams)(e,{full_name:\"string\",given_name:\"string\",surname:\"string\",id_number:\"string\",date_of_birth:\"string\",line1:\"string\",city:\"string\",zip:\"string\",state_iso:\"string\",country_iso2:\"string\"},t),(0,o.validateLength)(\"full_name\",e.full_name,0,1,160),(0,o.validateLength)(\"given_name\",e.given_name,0,1,70),(0,o.validateLength)(\"surname\",e.surname,0,1,70),(0,o.validateLength)(\"id_number\",e.id_number,0,1,40),(0,o.validateLength)(\"date_of_birth\",e.date_of_birth,0,1,10),(0,o.validateLength)(\"line1\",e.line1,0,1,350),(0,o.validateLength)(\"city\",e.city,0,1,70),(0,o.validateLength)(\"state_iso\",e.state_iso,0,1,9),(0,o.validateLength)(\"address\",e.zip,0,1,40),(0,o.validateLength)(\"country_iso2\",e.country_iso2,2),e.date_of_birth){const t=/^\\d{4}-\\d{2}-\\d{2}$/;(0,o.validateRegex)(\"date_of_birth\",e.date_of_birth,\"YYYY-MM-DD\",t)}const n=yield(0,s.UPDATE_FORM)(this.sessionId,{feedback_params:e}),{payload:r}=n.data;return r}))}}},218:(e,t,n)=>{function r(e,t){return function(){return e.apply(t,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,s=(a=Object.create(null),e=>{const t=o.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});var a;const c=e=>(e=e.toLowerCase(),t=>s(t)===e),u=e=>t=>typeof t===e,{isArray:l}=Array,d=u(\"undefined\"),f=c(\"ArrayBuffer\"),p=u(\"string\"),h=u(\"function\"),E=u(\"number\"),_=e=>null!==e&&\"object\"==typeof e,m=e=>{if(\"object\"!==s(e))return!1;const t=i(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},O=c(\"Date\"),y=c(\"File\"),g=c(\"Blob\"),R=c(\"FileList\"),S=c(\"URLSearchParams\");function D(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if(\"object\"!=typeof e&&(e=[e]),l(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function T(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const A=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:n.g,v=e=>!d(e)&&e!==A,b=(C=\"undefined\"!=typeof Uint8Array&&i(Uint8Array),e=>C&&e instanceof C);var C;const w=c(\"HTMLFormElement\"),I=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),P=c(\"RegExp\"),N=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};D(n,((n,o)=>{!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},M=\"abcdefghijklmnopqrstuvwxyz\",L=\"0123456789\",U={DIGIT:L,ALPHA:M,ALPHA_DIGIT:M+M.toUpperCase()+L},x=c(\"AsyncFunction\");var j={isArray:l,isArrayBuffer:f,isBuffer:function(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&h(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&(\"function\"==typeof FormData&&e instanceof FormData||h(e.append)&&(\"formdata\"===(t=s(e))||\"object\"===t&&h(e.toString)&&\"[object FormData]\"===e.toString()))},isArrayBufferView:function(e){let t;return t=\"undefined\"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer),t},isString:p,isNumber:E,isBoolean:e=>!0===e||!1===e,isObject:_,isPlainObject:m,isUndefined:d,isDate:O,isFile:y,isBlob:g,isRegExp:P,isFunction:h,isStream:e=>_(e)&&h(e.pipe),isURLSearchParams:S,isTypedArray:b,isFileList:R,forEach:D,merge:function e(){const{caseless:t}=v(this)&&this||{},n={},r=(r,o)=>{const i=t&&T(n,o)||o;m(n[i])&&m(r)?n[i]=e(n[i],r):m(r)?n[i]=e({},r):l(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&D(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:o}={})=>(D(t,((t,o)=>{n&&h(t)?e[o]=r(t,n):e[o]=t}),{allOwnKeys:o}),e),trim:e=>e.trim?e.trim():e.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\"\"),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,\"super\",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,s,a;const c={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:c,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(l(e))return e;let t=e.length;if(!E(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:w,hasOwnProperty:I,hasOwnProp:I,reduceDescriptors:N,freezeMethods:e=>{N(e,((t,n)=>{if(h(e)&&-1!==[\"arguments\",\"caller\",\"callee\"].indexOf(n))return!1;const r=e[n];h(r)&&(t.enumerable=!1,\"writable\"in t?t.writable=!1:t.set||(t.set=()=>{throw Error(\"Can not rewrite read-only method '\"+n+\"'\")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return l(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:T,global:A,isContextDefined:v,ALPHABET:U,generateString:(e=16,t=U.ALPHA_DIGIT)=>{let n=\"\";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&h(e.append)&&\"FormData\"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(_(e)){if(t.indexOf(e)>=0)return;if(!(\"toJSON\"in e)){t[r]=e;const o=l(e)?[]:{};return D(e,((e,t)=>{const i=n(e,r+1);!d(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:x,isThenable:e=>e&&(_(e)||h(e))&&h(e.then)&&h(e.catch)};function F(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name=\"AxiosError\",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}j.inherits(F,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:j.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const k=F.prototype,B={};function V(e){return j.isPlainObject(e)||j.isArray(e)}function G(e){return j.endsWith(e,\"[]\")?e.slice(0,-2):e}function W(e,t,n){return e?e.concat(t).map((function(e,t){return e=G(e),!n&&t?\"[\"+e+\"]\":e})).join(n?\".\":\"\"):t}[\"ERR_BAD_OPTION_VALUE\",\"ERR_BAD_OPTION\",\"ECONNABORTED\",\"ETIMEDOUT\",\"ERR_NETWORK\",\"ERR_FR_TOO_MANY_REDIRECTS\",\"ERR_DEPRECATED\",\"ERR_BAD_RESPONSE\",\"ERR_BAD_REQUEST\",\"ERR_CANCELED\",\"ERR_NOT_SUPPORT\",\"ERR_INVALID_URL\"].forEach((e=>{B[e]={value:e}})),Object.defineProperties(F,B),Object.defineProperty(k,\"isAxiosError\",{value:!0}),F.from=(e,t,n,r,o,i)=>{const s=Object.create(k);return j.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>\"isAxiosError\"!==e)),F.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const H=j.toFlatObject(j,{},null,(function(e){return/^is[A-Z]/.test(e)}));function q(e,t,n){if(!j.isObject(e))throw new TypeError(\"target must be an object\");t=t||new FormData;const r=(n=j.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!j.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,i=n.dots,s=n.indexes,a=(n.Blob||\"undefined\"!=typeof Blob&&Blob)&&j.isSpecCompliantForm(t);if(!j.isFunction(o))throw new TypeError(\"visitor must be a function\");function c(e){if(null===e)return\"\";if(j.isDate(e))return e.toISOString();if(!a&&j.isBlob(e))throw new F(\"Blob is not supported. Use a Buffer instead.\");return j.isArrayBuffer(e)||j.isTypedArray(e)?a&&\"function\"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&\"object\"==typeof e)if(j.endsWith(n,\"{}\"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(j.isArray(e)&&function(e){return j.isArray(e)&&!e.some(V)}(e)||(j.isFileList(e)||j.endsWith(n,\"[]\"))&&(a=j.toArray(e)))return n=G(n),a.forEach((function(e,r){!j.isUndefined(e)&&null!==e&&t.append(!0===s?W([n],r,i):null===s?n:n+\"[]\",c(e))})),!1;return!!V(e)||(t.append(W(o,n,i),c(e)),!1)}const l=[],d=Object.assign(H,{defaultVisitor:u,convertValue:c,isVisitable:V});if(!j.isObject(e))throw new TypeError(\"data must be an object\");return function e(n,r){if(!j.isUndefined(n)){if(-1!==l.indexOf(n))throw Error(\"Circular reference detected in \"+r.join(\".\"));l.push(n),j.forEach(n,(function(n,i){!0===(!(j.isUndefined(n)||null===n)&&o.call(t,n,j.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t}function X(e){const t={\"!\":\"%21\",\"'\":\"%27\",\"(\":\"%28\",\")\":\"%29\",\"~\":\"%7E\",\"%20\":\"+\",\"%00\":\"\\0\"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function K(e,t){this._pairs=[],e&&q(e,this,t)}const z=K.prototype;function Y(e){return encodeURIComponent(e).replace(/%3A/gi,\":\").replace(/%24/g,\"$\").replace(/%2C/gi,\",\").replace(/%20/g,\"+\").replace(/%5B/gi,\"[\").replace(/%5D/gi,\"]\")}function $(e,t,n){if(!t)return e;const r=n&&n.encode||Y,o=n&&n.serialize;let i;if(i=o?o(t,n):j.isURLSearchParams(t)?t.toString():new K(t,n).toString(r),i){const t=e.indexOf(\"#\");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf(\"?\")?\"?\":\"&\")+i}return e}z.append=function(e,t){this._pairs.push([e,t])},z.toString=function(e){const t=e?function(t){return e.call(this,t,X)}:X;return this._pairs.map((function(e){return t(e[0])+\"=\"+t(e[1])}),\"\").join(\"&\")};var J=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){j.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Q={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z={isBrowser:!0,classes:{URLSearchParams:\"undefined\"!=typeof URLSearchParams?URLSearchParams:K,FormData:\"undefined\"!=typeof FormData?FormData:null,Blob:\"undefined\"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return(\"undefined\"==typeof navigator||\"ReactNative\"!==(e=navigator.product)&&\"NativeScript\"!==e&&\"NS\"!==e)&&\"undefined\"!=typeof window&&\"undefined\"!=typeof document})(),isStandardBrowserWebWorkerEnv:\"undefined\"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&\"function\"==typeof self.importScripts,protocols:[\"http\",\"https\",\"file\",\"blob\",\"url\",\"data\"]};function ee(e){function t(e,n,r,o){let i=e[o++];const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&j.isArray(r)?r.length:i,a?(j.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s):(r[i]&&j.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&j.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s)}if(j.isFormData(e)&&j.isFunction(e.entries)){const n={};return j.forEachEntry(e,((e,r)=>{t(function(e){return j.matchAll(/\\w+|\\[(\\w*)]/g,e).map((e=>\"[]\"===e[0]?\"\":e[1]||e[0]))}(e),r,n,0)})),n}return null}const te={\"Content-Type\":void 0},ne={transitional:Q,adapter:[\"xhr\",\"http\"],transformRequest:[function(e,t){const n=t.getContentType()||\"\",r=n.indexOf(\"application/json\")>-1,o=j.isObject(e);if(o&&j.isHTMLForm(e)&&(e=new FormData(e)),j.isFormData(e))return r&&r?JSON.stringify(ee(e)):e;if(j.isArrayBuffer(e)||j.isBuffer(e)||j.isStream(e)||j.isFile(e)||j.isBlob(e))return e;if(j.isArrayBufferView(e))return e.buffer;if(j.isURLSearchParams(e))return t.setContentType(\"application/x-www-form-urlencoded;charset=utf-8\",!1),e.toString();let i;if(o){if(n.indexOf(\"application/x-www-form-urlencoded\")>-1)return function(e,t){return q(e,new Z.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Z.isNode&&j.isBuffer(e)?(this.append(t,e.toString(\"base64\")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=j.isFileList(e))||n.indexOf(\"multipart/form-data\")>-1){const t=this.env&&this.env.FormData;return q(i?{\"files[]\":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType(\"application/json\",!1),function(e,t,n){if(j.isString(e))try{return(0,JSON.parse)(e),j.trim(e)}catch(e){if(\"SyntaxError\"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ne.transitional,n=t&&t.forcedJSONParsing,r=\"json\"===this.responseType;if(e&&j.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if(\"SyntaxError\"===e.name)throw F.from(e,F.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:\"XSRF-TOKEN\",xsrfHeaderName:\"X-XSRF-TOKEN\",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Z.classes.FormData,Blob:Z.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:\"application/json, text/plain, */*\"}}};j.forEach([\"delete\",\"get\",\"head\"],(function(e){ne.headers[e]={}})),j.forEach([\"post\",\"put\",\"patch\"],(function(e){ne.headers[e]=j.merge(te)}));var re=ne;const oe=j.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\"]),ie=Symbol(\"internals\");function se(e){return e&&String(e).trim().toLowerCase()}function ae(e){return!1===e||null==e?e:j.isArray(e)?e.map(ae):String(e)}function ce(e,t,n,r,o){return j.isFunction(r)?r.call(this,t,n):(o&&(t=n),j.isString(t)?j.isString(r)?-1!==t.indexOf(r):j.isRegExp(r)?r.test(t):void 0:void 0)}class ue{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=se(t);if(!o)throw new Error(\"header name must be a non-empty string\");const i=j.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=ae(e))}const i=(e,t)=>j.forEach(e,((e,n)=>o(e,n,t)));return j.isPlainObject(e)||e instanceof this.constructor?i(e,t):j.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split(\"\\n\").forEach((function(e){o=e.indexOf(\":\"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&oe[n]||(\"set-cookie\"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+\", \"+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=se(e)){const n=j.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(j.isFunction(t))return t.call(this,e,n);if(j.isRegExp(t))return t.exec(e);throw new TypeError(\"parser must be boolean|regexp|function\")}}}has(e,t){if(e=se(e)){const n=j.findKey(this,e);return!(!n||void 0===this[n]||t&&!ce(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=se(e)){const o=j.findKey(n,e);!o||t&&!ce(0,n[o],o,t)||(delete n[o],r=!0)}}return j.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!ce(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return j.forEach(this,((r,o)=>{const i=j.findKey(n,o);if(i)return t[i]=ae(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\\d])(\\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete t[o],t[s]=ae(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return j.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&j.isArray(n)?n.join(\", \"):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+\": \"+t)).join(\"\\n\")}get[Symbol.toStringTag](){return\"AxiosHeaders\"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[ie]=this[ie]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=se(e);t[r]||(function(e,t){const n=j.toCamelCase(\" \"+t);[\"get\",\"set\",\"has\"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return j.isArray(e)?e.forEach(r):r(e),this}}ue.accessor([\"Content-Type\",\"Content-Length\",\"Accept\",\"Accept-Encoding\",\"User-Agent\",\"Authorization\"]),j.freezeMethods(ue.prototype),j.freezeMethods(ue);var le=ue;function de(e,t){const n=this||re,r=t||n,o=le.from(r.headers);let i=r.data;return j.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function fe(e){return!(!e||!e.__CANCEL__)}function pe(e,t,n){F.call(this,null==e?\"canceled\":e,F.ERR_CANCELED,t,n),this.name=\"CanceledError\"}j.inherits(pe,F,{__CANCEL__:!0});var he=Z.isStandardBrowserEnv?{write:function(e,t,n,r,o,i){const s=[];s.push(e+\"=\"+encodeURIComponent(t)),j.isNumber(n)&&s.push(\"expires=\"+new Date(n).toGMTString()),j.isString(r)&&s.push(\"path=\"+r),j.isString(o)&&s.push(\"domain=\"+o),!0===i&&s.push(\"secure\"),document.cookie=s.join(\"; \")},read:function(e){const t=document.cookie.match(new RegExp(\"(^|;\\\\s*)(\"+e+\")=([^;]*)\"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,\"\",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Ee(e,t){return e&&!/^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(t)?function(e,t){return t?e.replace(/\\/+$/,\"\")+\"/\"+t.replace(/^\\/+/,\"\"):e}(e,t):t}var _e=Z.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement(\"a\");let n;function r(n){let r=n;return e&&(t.setAttribute(\"href\",r),r=t.href),t.setAttribute(\"href\",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,\"\"):\"\",host:t.host,search:t.search?t.search.replace(/^\\?/,\"\"):\"\",hash:t.hash?t.hash.replace(/^#/,\"\"):\"\",hostname:t.hostname,port:t.port,pathname:\"/\"===t.pathname.charAt(0)?t.pathname:\"/\"+t.pathname}}return n=r(window.location.href),function(e){const t=j.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function me(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[s];o||(o=c),n[i]=a,r[i]=c;let l=s,d=0;for(;l!==i;)d+=n[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const f=u&&c-u;return f?Math.round(1e3*d/f):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,c=r(a);n=i;const u={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:o};u[t?\"download\":\"upload\"]=!0,e(u)}}const Oe={http:null,xhr:\"undefined\"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=le.from(e.headers).normalize(),i=e.responseType;let s;function a(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener(\"abort\",s)}j.isFormData(r)&&(Z.isStandardBrowserEnv||Z.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType(\"multipart/form-data;\",!1));let c=new XMLHttpRequest;if(e.auth){const t=e.auth.username||\"\",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):\"\";o.set(\"Authorization\",\"Basic \"+btoa(t+\":\"+n))}const u=Ee(e.baseURL,e.url);function l(){if(!c)return;const r=le.from(\"getAllResponseHeaders\"in c&&c.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new F(\"Request failed with status code \"+n.status,[F.ERR_BAD_REQUEST,F.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),a()}),(function(e){n(e),a()}),{data:i&&\"text\"!==i&&\"json\"!==i?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:e,request:c}),c=null}if(c.open(e.method.toUpperCase(),$(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,\"onloadend\"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf(\"file:\"))&&setTimeout(l)},c.onabort=function(){c&&(n(new F(\"Request aborted\",F.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new F(\"Network Error\",F.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let t=e.timeout?\"timeout of \"+e.timeout+\"ms exceeded\":\"timeout exceeded\";const r=e.transitional||Q;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new F(t,r.clarifyTimeoutError?F.ETIMEDOUT:F.ECONNABORTED,e,c)),c=null},Z.isStandardBrowserEnv){const t=(e.withCredentials||_e(u))&&e.xsrfCookieName&&he.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),\"setRequestHeader\"in c&&j.forEach(o.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),j.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),i&&\"json\"!==i&&(c.responseType=e.responseType),\"function\"==typeof e.onDownloadProgress&&c.addEventListener(\"progress\",me(e.onDownloadProgress,!0)),\"function\"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener(\"progress\",me(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{c&&(n(!t||t.type?new pe(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener(\"abort\",s)));const d=function(e){const t=/^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(e);return t&&t[1]||\"\"}(u);d&&-1===Z.protocols.indexOf(d)?n(new F(\"Unsupported protocol \"+d+\":\",F.ERR_BAD_REQUEST,e)):c.send(r||null)}))}};j.forEach(Oe,((e,t)=>{if(e){try{Object.defineProperty(e,\"name\",{value:t})}catch(e){}Object.defineProperty(e,\"adapterName\",{value:t})}}));function ye(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pe(null,e)}function ge(e){return ye(e),e.headers=le.from(e.headers),e.data=de.call(e,e.transformRequest),-1!==[\"post\",\"put\",\"patch\"].indexOf(e.method)&&e.headers.setContentType(\"application/x-www-form-urlencoded\",!1),(e=>{e=j.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=j.isString(n)?Oe[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new F(`Adapter ${n} is not supported by the environment`,\"ERR_NOT_SUPPORT\");throw new Error(j.hasOwnProp(Oe,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!j.isFunction(r))throw new TypeError(\"adapter is not a function\");return r})(e.adapter||re.adapter)(e).then((function(t){return ye(e),t.data=de.call(e,e.transformResponse,t),t.headers=le.from(t.headers),t}),(function(t){return fe(t)||(ye(e),t&&t.response&&(t.response.data=de.call(e,e.transformResponse,t.response),t.response.headers=le.from(t.response.headers))),Promise.reject(t)}))}const Re=e=>e instanceof le?e.toJSON():e;function Se(e,t){t=t||{};const n={};function r(e,t,n){return j.isPlainObject(e)&&j.isPlainObject(t)?j.merge.call({caseless:n},e,t):j.isPlainObject(t)?j.merge({},t):j.isArray(t)?t.slice():t}function o(e,t,n){return j.isUndefined(t)?j.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!j.isUndefined(t))return r(void 0,t)}function s(e,t){return j.isUndefined(t)?j.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>o(Re(e),Re(t),!0)};return j.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=c[r]||o,s=i(e[r],t[r],r);j.isUndefined(s)&&i!==a||(n[r]=s)})),n}const De={};[\"object\",\"boolean\",\"number\",\"function\",\"string\",\"symbol\"].forEach(((e,t)=>{De[e]=function(n){return typeof n===e||\"a\"+(t<1?\"n \":\" \")+e}}));const Te={};De.transitional=function(e,t,n){function r(e,t){return\"[Axios v1.4.0] Transitional option '\"+e+\"'\"+t+(n?\". \"+n:\"\")}return(n,o,i)=>{if(!1===e)throw new F(r(o,\" has been removed\"+(t?\" in \"+t:\"\")),F.ERR_DEPRECATED);return t&&!Te[o]&&(Te[o]=!0,console.warn(r(o,\" has been deprecated since v\"+t+\" and will be removed in the near future\"))),!e||e(n,o,i)}};var Ae={assertOptions:function(e,t,n){if(\"object\"!=typeof e)throw new F(\"options must be an object\",F.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new F(\"option \"+i+\" must be \"+n,F.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new F(\"Unknown option \"+i,F.ERR_BAD_OPTION)}},validators:De};const ve=Ae.validators;class be{constructor(e){this.defaults=e,this.interceptors={request:new J,response:new J}}request(e,t){\"string\"==typeof e?(t=t||{}).url=e:t=e||{},t=Se(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;let i;void 0!==n&&Ae.assertOptions(n,{silentJSONParsing:ve.transitional(ve.boolean),forcedJSONParsing:ve.transitional(ve.boolean),clarifyTimeoutError:ve.transitional(ve.boolean)},!1),null!=r&&(j.isFunction(r)?t.paramsSerializer={serialize:r}:Ae.assertOptions(r,{encode:ve.function,serialize:ve.function},!0)),t.method=(t.method||this.defaults.method||\"get\").toLowerCase(),i=o&&j.merge(o.common,o[t.method]),i&&j.forEach([\"delete\",\"get\",\"head\",\"post\",\"put\",\"patch\",\"common\"],(e=>{delete o[e]})),t.headers=le.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){\"function\"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,d=0;if(!a){const e=[ge.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);d<l;)u=u.then(e[d++],e[d++]);return u}l=s.length;let f=t;for(d=0;d<l;){const e=s[d++],t=s[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{u=ge.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,l=c.length;d<l;)u=u.then(c[d++],c[d++]);return u}getUri(e){return $(Ee((e=Se(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}j.forEach([\"delete\",\"get\",\"head\",\"options\"],(function(e){be.prototype[e]=function(t,n){return this.request(Se(n||{},{method:e,url:t,data:(n||{}).data}))}})),j.forEach([\"post\",\"put\",\"patch\"],(function(e){function t(t){return function(n,r,o){return this.request(Se(o||{},{method:e,headers:t?{\"Content-Type\":\"multipart/form-data\"}:{},url:n,data:r}))}}be.prototype[e]=t(),be.prototype[e+\"Form\"]=t(!0)}));var Ce=be;class we{constructor(e){if(\"function\"!=typeof e)throw new TypeError(\"executor must be a function.\");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new pe(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new we((function(t){e=t})),cancel:e}}}var Ie=we;const Pe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pe).forEach((([e,t])=>{Pe[t]=e}));var Ne=Pe;const Me=function e(t){const n=new Ce(t),o=r(Ce.prototype.request,n);return j.extend(o,Ce.prototype,n,{allOwnKeys:!0}),j.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return e(Se(t,n))},o}(re);Me.Axios=Ce,Me.CanceledError=pe,Me.CancelToken=Ie,Me.isCancel=fe,Me.VERSION=\"1.4.0\",Me.toFormData=q,Me.AxiosError=F,Me.Cancel=Me.CanceledError,Me.all=function(e){return Promise.all(e)},Me.spread=function(e){return function(t){return e.apply(null,t)}},Me.isAxiosError=function(e){return j.isObject(e)&&!0===e.isAxiosError},Me.mergeConfig=Se,Me.AxiosHeaders=le,Me.formToJSON=e=>ee(j.isHTMLForm(e)?new FormData(e):e),Me.HttpStatusCode=Ne,Me.default=Me,e.exports=Me}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(e){if(\"object\"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})};var r=n(607);return r.default})()));\n\n//# sourceURL=webpack://PWUISDK/./node_modules/pipwave-ekyc-sdk/dist/pw-bundle.js?");
|
|
3410
3410
|
|
|
3411
3411
|
/***/ }),
|
|
3412
3412
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pipwave-ekyc-uikit",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/pw-bundle.js",
|
|
6
6
|
"scripts": {
|
|
@@ -40,6 +40,6 @@
|
|
|
40
40
|
"material-design-icons": "^3.0.1",
|
|
41
41
|
"moment": "^2.29.4",
|
|
42
42
|
"pikaday": "^1.8.2",
|
|
43
|
-
"pipwave-ekyc-sdk": "
|
|
43
|
+
"pipwave-ekyc-sdk": "^0.0.1-beta.2"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
Binary file
|