@ekyc_qoobiss/qbs-ect-cmp 3.6.27 → 3.6.28
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/cjs/agreement-check_19.cjs.entry.js +9498 -0
- package/dist/cjs/base-component-aa9e52bf.js +832 -0
- package/dist/cjs/index-41696e0e.js +1573 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader-dots.cjs.entry.js +19 -0
- package/dist/cjs/loader.cjs.js +22 -0
- package/dist/cjs/qbs-ect-cmp.cjs.js +23 -0
- package/dist/cjs/random-actions.cjs.entry.js +23 -0
- package/dist/collection/assets/canvas-masks/face_green.svg +8 -0
- package/dist/collection/assets/canvas-masks/face_white.svg +8 -0
- package/dist/collection/assets/canvas-masks/id_green.svg +6 -0
- package/dist/collection/assets/canvas-masks/id_white.svg +6 -0
- package/dist/collection/assets/complete.svg +4 -0
- package/dist/collection/assets/landing/device.svg +14 -0
- package/dist/collection/assets/landing/id.svg +3 -0
- package/dist/collection/assets/landing/info.svg +3 -0
- package/dist/collection/assets/landing/validation.svg +16 -0
- package/dist/collection/assets/loader.svg +29 -0
- package/dist/collection/collection-manifest.json +32 -0
- package/dist/collection/components/base-component.js +63 -0
- package/dist/collection/components/common/agreement-check/agreement-check.css +0 -0
- package/dist/collection/components/common/agreement-check/agreement-check.js +104 -0
- package/dist/collection/components/common/camera-error/camera-error.css +0 -0
- package/dist/{qbs-ect-cmp/camera-error.entry.js → collection/components/common/camera-error/camera-error.js} +52 -20
- package/dist/collection/components/common/capture-error/capture-error.css +0 -0
- package/dist/{qbs-ect-cmp/capture-error.entry.js → collection/components/common/capture-error/capture-error.js} +63 -16
- package/dist/collection/components/common/how-to-info/how-to-info.css +0 -0
- package/dist/collection/components/common/how-to-info/how-to-info.js +121 -0
- package/dist/collection/components/common/id-back-capture/id-back-capture.css +35 -0
- package/dist/{qbs-ect-cmp/id-back-capture.entry.js → collection/components/common/id-back-capture/id-back-capture.js} +94 -24
- package/dist/collection/components/common/id-capture/id-capture.css +35 -0
- package/dist/{qbs-ect-cmp/id-capture.entry.js → collection/components/common/id-capture/id-capture.js} +94 -24
- package/dist/collection/components/common/id-tilt/id-tilt.css +35 -0
- package/dist/{qbs-ect-cmp/id-tilt.entry.js → collection/components/common/id-tilt/id-tilt.js} +94 -24
- package/dist/collection/components/common/random-actions/random-actions.css +0 -0
- package/dist/collection/components/common/random-actions/random-actions.js +24 -0
- package/dist/collection/components/common/selfie-capture/selfie-capture.css +7 -0
- package/dist/{qbs-ect-cmp/selfie-capture.entry.js → collection/components/common/selfie-capture/selfie-capture.js} +95 -24
- package/dist/collection/components/common/selfie-tilt/selfie-tilt.css +7 -0
- package/dist/{qbs-ect-cmp/selfie-tilt.entry.js → collection/components/common/selfie-tilt/selfie-tilt.js} +95 -24
- package/dist/collection/components/controls/camera/camera.css +47 -0
- package/dist/collection/components/controls/camera/camera.js +289 -0
- package/dist/collection/components/controls/loader-dots/loader-dots.css +61 -0
- package/dist/collection/components/controls/loader-dots/loader-dots.js +18 -0
- package/dist/collection/components/flow/agreement-info/agreement-info.css +0 -0
- package/dist/{qbs-ect-cmp/agreement-info.entry.js → collection/components/flow/agreement-info/agreement-info.js} +57 -18
- package/dist/collection/components/flow/end-redirect/end-redirect.css +128 -0
- package/dist/collection/components/flow/end-redirect/end-redirect.js +47 -0
- package/dist/collection/components/flow/error-end/error-end.css +0 -0
- package/dist/collection/components/flow/error-end/error-end.js +61 -0
- package/dist/collection/components/flow/landing-validation/landing-validation.css +0 -0
- package/dist/collection/components/flow/landing-validation/landing-validation.js +122 -0
- package/dist/collection/components/flow/mobile-redirect/mobile-redirect.css +10 -0
- package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +143 -0
- package/dist/collection/components/flow/process-id/process-id.css +0 -0
- package/dist/{qbs-ect-cmp/process-id.entry.js → collection/components/flow/process-id/process-id.js} +100 -32
- package/dist/collection/components/flow/sms-code-validation/sms-code-validation.css +0 -0
- package/dist/{qbs-ect-cmp/sms-code-validation.entry.js → collection/components/flow/sms-code-validation/sms-code-validation.js} +63 -30
- package/dist/collection/components/flow/user-liveness/user-liveness.css +0 -0
- package/dist/{qbs-ect-cmp/user-liveness.entry.js → collection/components/flow/user-liveness/user-liveness.js} +91 -25
- package/dist/collection/components/identification-component/identification-component.css +991 -0
- package/dist/collection/components/identification-component/identification-component.js +408 -0
- package/dist/collection/global.js +0 -0
- package/dist/collection/helpers/ApiCall.js +223 -0
- package/dist/{qbs-ect-cmp/Cameras-dfbebc29.js → collection/helpers/Cameras.js} +6 -9
- package/dist/collection/helpers/DeviceDetection.js +85 -0
- package/dist/collection/helpers/Events.js +58 -0
- package/dist/collection/helpers/ML5.js +38 -0
- package/dist/collection/helpers/Stream.js +229 -0
- package/dist/collection/helpers/TranslationUtils.js +37 -0
- package/dist/collection/helpers/canvas.js +10 -0
- package/dist/collection/helpers/index.js +21 -0
- package/dist/collection/helpers/security.js +25 -0
- package/dist/collection/helpers/store.js +48 -0
- package/dist/collection/helpers/textValues.js +48 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/libs/FaceML5Detector/FaceML5Detector.js +182 -0
- package/dist/collection/libs/FaceML5Detector/FacePose.js +85 -0
- package/dist/collection/libs/IDML5Detector/IDML5Detector.js +99 -0
- package/dist/{qbs-ect-cmp/IDPose-181bcb25.js → collection/libs/IDML5Detector/IDPose.js} +2 -4
- package/dist/{qbs-ect-cmp/CaptureFlow-db5d90a4.js → collection/models/CaptureFlow.js} +4 -6
- package/dist/collection/models/FlowStatus.js +14 -0
- package/dist/collection/models/FlowSteps.js +30 -0
- package/dist/collection/models/IAbortResult.js +1 -0
- package/dist/collection/models/IAddRequest.js +1 -0
- package/dist/collection/models/IAgreement.js +1 -0
- package/dist/collection/models/ICamera.js +1 -0
- package/dist/{qbs-ect-cmp/IDevice-15ecfdeb.js → collection/models/IDevice.js} +4 -6
- package/dist/collection/models/IEctStore.js +1 -0
- package/dist/collection/models/IGeneration.js +1 -0
- package/dist/collection/models/ILinkSend.js +1 -0
- package/dist/collection/models/ILogResult.js +1 -0
- package/dist/collection/models/IOrderStatus.js +1 -0
- package/dist/collection/models/IOtpCheck.js +1 -0
- package/dist/collection/models/IOtpSend.js +1 -0
- package/dist/collection/models/ITranslationValues.js +1 -0
- package/dist/collection/models/IUploadFile.js +1 -0
- package/dist/collection/models/IVerificationMode.js +5 -0
- package/dist/collection/models/OrderStatuses.js +8 -0
- package/dist/{qbs-ect-cmp/utils-8225f0b7.js → collection/utils/utils.js} +8 -10
- package/dist/esm/agreement-check_19.entry.js +9476 -0
- package/dist/{qbs-ect-cmp/base-component-2e490fd9.js → esm/base-component-b7f50d31.js} +384 -62
- package/dist/esm/index-cf54a432.js +1543 -0
- package/dist/esm/index.js +1 -0
- package/dist/{qbs-ect-cmp → esm}/loader-dots.entry.js +1 -1
- package/dist/esm/loader.js +18 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/qbs-ect-cmp.js +18 -0
- package/dist/{qbs-ect-cmp → esm}/random-actions.entry.js +2 -4
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/loader/cdn.js +3 -0
- package/dist/loader/index.cjs.js +3 -0
- package/dist/loader/index.d.ts +21 -0
- package/dist/loader/index.es2017.js +3 -0
- package/dist/loader/index.js +4 -0
- package/dist/loader/package.json +11 -0
- package/dist/qbs-ect-cmp/index.esm.js +0 -1
- package/dist/qbs-ect-cmp/p-054dc5b3.entry.js +1 -0
- package/dist/qbs-ect-cmp/p-215a7e76.entry.js +1 -0
- package/dist/qbs-ect-cmp/p-7bedffaa.js +1 -0
- package/dist/qbs-ect-cmp/p-8942656c.js +2 -0
- package/dist/qbs-ect-cmp/p-c32a782a.entry.js +1373 -0
- package/dist/qbs-ect-cmp/qbs-ect-cmp.css +1 -320
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -148
- package/package.json +1 -1
- package/dist/qbs-ect-cmp/ML5-657ef934.js +0 -1370
- package/dist/qbs-ect-cmp/Stream-b867a2be.js +0 -3104
- package/dist/qbs-ect-cmp/_commonjsHelpers-321aa363.js +0 -44
- package/dist/qbs-ect-cmp/agreement-check.entry.js +0 -41
- package/dist/qbs-ect-cmp/app-globals-0f993ce5.js +0 -3
- package/dist/qbs-ect-cmp/camera-comp.entry.js +0 -103
- package/dist/qbs-ect-cmp/css-shim-b7d3d95f.js +0 -4
- package/dist/qbs-ect-cmp/dom-64053c71.js +0 -73
- package/dist/qbs-ect-cmp/end-redirect.entry.js +0 -25
- package/dist/qbs-ect-cmp/error-end.entry.js +0 -19
- package/dist/qbs-ect-cmp/how-to-info.entry.js +0 -52
- package/dist/qbs-ect-cmp/identification-component.entry.js +0 -909
- package/dist/qbs-ect-cmp/index-78a05b9e.js +0 -3371
- package/dist/qbs-ect-cmp/landing-validation.entry.js +0 -90
- package/dist/qbs-ect-cmp/mobile-redirect.entry.js +0 -2984
- package/dist/qbs-ect-cmp/shadow-css-98135883.js +0 -387
- package/dist/qbs-ect-cmp/textValues-6bcc85dd.js +0 -302
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "qbs-ect-cmp-loader",
|
|
3
|
+
"private": true,
|
|
4
|
+
"typings": "./index.d.ts",
|
|
5
|
+
"module": "./index.js",
|
|
6
|
+
"main": "./index.cjs.js",
|
|
7
|
+
"jsnext:main": "./index.es2017.js",
|
|
8
|
+
"es2015": "./index.es2017.js",
|
|
9
|
+
"es2017": "./index.es2017.js",
|
|
10
|
+
"unpkg": "./cdn.js"
|
|
11
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,h as a}from"./p-8942656c.js";const e=class{constructor(a){i(this,a)}render(){return a("i",null)}};e.style="i,i::before,i::after{animation-duration:0.5s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}body{font-family:sans-serif}i{width:300px;height:75px;margin:auto;display:block;background:no-repeat;background-image:radial-gradient(closest-side, #1FEAA6 90%, rgba(0, 0, 0, 0)), radial-gradient(closest-side, #1FEAA6 90%, rgba(0, 0, 0, 0));background-size:75px 75px;background-position:0%, 50%;position:relative;transform:translateZ(0) scale(0.25);animation-name:slide}i::before,i::after{content:'';width:75px;height:75px;background:radial-gradient(closest-side, #1FEAA6 90%, rgba(0, 0, 0, 0));position:absolute;top:50%;margin-top:-37.5px;animation-name:reveal}i::before{left:1%;animation-delay:40ms}i::after{right:1%;animation-direction:reverse}@keyframes slide{from{background-position:0%, 50%}to{background-position:50%, 100%}}@keyframes reveal{from{transform:scale(0.001)}to{transform:scale(1)}}";export{e as loader_dots}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as s}from"./p-8942656c.js";import{B as i,F as o}from"./p-7bedffaa.js";const n=class{constructor(s){t(this,s),this.baseComponent=new i(o.SelfieTilt)}componentWillLoad(){}buttonClick(){}render(){return s("div",{class:"container"},s("div",{class:"row"},s("div",{class:"text-center"},s("h1",null,this.topTitle)),s("div",{class:"pos-relative show-bottom"},s("div",{class:"btn-buletin"},s("button",{class:"main-button",onClick:()=>this.buttonClick()},this.buttonText),s("p",{class:"main-text font-size-18 text-right mb-0"},this.baseComponent.translations.GlobalValues.FooterText)))))}};n.style="";export{n as random_actions}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t,f as e}from"./p-8942656c.js";var i;!function(t){t[t.Capturing=0]="Capturing",t[t.FinishedCapturing=1]="FinishedCapturing",t[t.Waiting=2]="Waiting",t[t.NotFound=3]="NotFound",t[t.Aborted=4]="Aborted"}(i||(i={}));const s=t=>!("isConnected"in t)||t.isConnected,n=(()=>{let t;return(...e)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let e of t.keys())t.set(e,t.get(e).filter(s))})(...e)}),2e3)}})(),o=t=>"function"==typeof t?t():t;var a;!function(t){t[t.LANDING=0]="LANDING",t[t.AGREEMENT=1]="AGREEMENT",t[t.PHONE=2]="PHONE",t[t.CODE=3]="CODE",t[t.CODEERROR=4]="CODEERROR",t[t.ID=5]="ID",t[t.LIVENESS=6]="LIVENESS",t[t.COMPLETE=7]="COMPLETE",t[t.ERROREND=8]="ERROREND",t[t.CAMERAERROR=9]="CAMERAERROR",t[t.NONE=10]="NONE"}(a||(a={}));class r{}r.IDPoseDemoMapping={0:"https://ekyc.blob.core.windows.net/$web/animations/id/id_front.mp4",1:"https://ekyc.blob.core.windows.net/$web/animations/id/id_front_tilt.mp4",2:"https://ekyc.blob.core.windows.net/$web/animations/id/id_rotate.mp4",3:"https://ekyc.blob.core.windows.net/$web/animations/id/id_back.mp4",4:"https://ekyc.blob.core.windows.net/$web/animations/id/id_back_tilt.mp4"};class c{}c.FacePoseDemoMapping={0:"https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_rotate_left.mp4",1:"https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_rotate_right.mp4",2:"https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_tilt_back.mp4",3:"https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_tilt_front.mp4",4:"https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_main.mp4"};class h{}h.FlowStatusKey="qbs-ect-flowstatus",h.RequestIdKey="qbs-ect-requestid",h.TokenKey="qbs-ect-token",h.InitialisedKey="qbs-ect-initialised",h.HasIdBackKey="qbs-ect-has-id-back",h.AgreementValidationKey="qbs-ect-agreement-validation",h.PhoneValidationKey="qbs-ect-phone-validation",h.RefreshDoneKey="qbs-ect-refresh-done";class l{constructor(){this.uriEnv="/",this.uriEnv="QA"==d.environment?"/dev_":"/",this.OtpSend=this.uriEnv+"validation/otp/send",this.OtpCheck=this.uriEnv+"validation/otp/check",this.IdentityInsert=this.uriEnv+"validation/identity/insert",this.UploadCapture=this.uriEnv+"validation/upload/capture",this.GetAgreement=this.uriEnv+"validation/agreement/content",this.GenerateAgreement=this.uriEnv+"validation/agreement/generate",this.SendLink=this.uriEnv+"validation/otp/sendlink",this.GetStatus=this.uriEnv+"validation/identity/status",this.AddLog=this.uriEnv+"validation/logs/add",this.AddStep=this.uriEnv+"validation/logs/step",this.AbortRequest=this.uriEnv+"validation/identity/abort"}}const{state:d,onChange:u}=(()=>{const i=((t,e=((t,e)=>t!==e))=>{const i=o(t);let s=new Map(Object.entries(null!=i?i:{}));const n={dispose:[],get:[],set:[],reset:[]},a=()=>{var e;s=new Map(Object.entries(null!==(e=o(t))&&void 0!==e?e:{})),n.reset.forEach((t=>t()))},r=t=>(n.get.forEach((e=>e(t))),s.get(t)),c=(t,i)=>{const o=s.get(t);e(i,o,t)&&(s.set(t,i),n.set.forEach((e=>e(t,i,o))))},h="undefined"==typeof Proxy?{}:new Proxy(i,{get:(t,e)=>r(e),ownKeys:()=>Array.from(s.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,e)=>s.has(e),set:(t,e,i)=>(c(e,i),!0)}),l=(t,e)=>(n[t].push(e),()=>{((t,e)=>{const i=t.indexOf(e);i>=0&&(t[i]=t[t.length-1],t.length--)})(n[t],e)});return{state:h,get:r,set:c,on:l,onChange:(e,i)=>{const s=l("set",((t,s)=>{t===e&&i(s)})),n=l("reset",(()=>i(o(t)[e])));return()=>{s(),n()}},use:(...t)=>{const e=t.reduce(((t,e)=>(e.set&&t.push(l("set",e.set)),e.get&&t.push(l("get",e.get)),e.reset&&t.push(l("reset",e.reset)),e.dispose&&t.push(l("dispose",e.dispose)),t)),[]);return()=>e.forEach((t=>t()))},dispose:()=>{n.dispose.forEach((t=>t())),a()},reset:a,forceUpdate:t=>{const e=s.get(t);n.set.forEach((i=>i(t,e,e)))}}})({flowStatus:a.NONE,environment:"PROD",debug:!1,requestId:"",redirectId:"",initialised:!1,token:"",cameraIds:[],cameraId:"",hasIdBack:!1,hasSelfieGesture:!1,hasIdTilt:!1,agreementsValidation:!0,phoneValidation:!0,phoneNumber:"",apiBaseUrl:"https://apiro.id-kyc.com",device:null,langIso:"ro"},void 0);return i.use((()=>{if("function"!=typeof t)return{};const i=new Map;return{dispose:()=>i.clear(),get:e=>{const s=t();s&&((t,e,i)=>{const s=t.get(e);s?s.includes(i)||s.push(i):t.set(e,[i])})(i,e,s)},set:t=>{const s=i.get(t);s&&i.set(t,s.filter(e)),n(i)},reset:()=>{i.forEach((t=>t.forEach(e))),n(i)}}})()),i})();var p,w,b,m,f;u("environment",(t=>{d.debug="QA"==t})),u("flowStatus",(t=>{sessionStorage.setItem(h.FlowStatusKey,a[t])})),u("token",(t=>{sessionStorage.setItem(h.TokenKey,t)})),u("requestId",(t=>{sessionStorage.setItem(h.RequestIdKey,t)})),u("initialised",(t=>{sessionStorage.setItem(h.InitialisedKey,String(t))})),u("hasIdBack",(t=>{sessionStorage.setItem(h.HasIdBackKey,String(t))})),u("agreementsValidation",(t=>{sessionStorage.setItem(h.AgreementValidationKey,String(t))})),u("phoneValidation",(t=>{sessionStorage.setItem(h.PhoneValidationKey,String(t))})),function(t){t[t.ComponentLoaded="component-loaded"]="ComponentLoaded",t[t.MobileRedirect="mobile-redirect"]="MobileRedirect",t[t.Landing="landing"]="Landing",t[t.Agreements="agreements"]="Agreements",t[t.OtpSend="otp-send"]="OtpSend",t[t.OtpCheck="otp-check"]="OtpCheck",t[t.CiFront="ci-front"]="CiFront",t[t.CiFrontHowTo="ci-front-how-to"]="CiFrontHowTo",t[t.CiFrontCapture="ci-front-capture"]="CiFrontCapture",t[t.CiBack="ci-back"]="CiBack",t[t.CiBackHowTo="ci-back-how-to"]="CiBackHowTo",t[t.CiBackCapture="ci-back-capture"]="CiBackCapture",t[t.CiTilt="ci-tilt"]="CiTilt",t[t.CiError="ci-error"]="CiError",t[t.SelfieHowTo="selfie-how-to"]="SelfieHowTo",t[t.SelfieTilt="selfie-tilt"]="SelfieTilt",t[t.SelfieCapture="selfie-capture"]="SelfieCapture",t[t.Selfie="selfie"]="Selfie",t[t.SelfieError="selfie-error"]="SelfieError",t[t.End="end"]="End",t[t.CameraError="camera-error"]="CameraError"}(p||(p={})),function(t){t[t.Initialized="initialized"]="Initialized",t[t.Finalized="finalized"]="Finalized",t[t.None="none"]="None"}(w||(w={}));class y{constructor(){this.serviceErrors=["Service Unavailable","Unauthorized"],this.toBase64=t=>new Promise(((e,i)=>{const s=new FileReader;s.readAsDataURL(t),s.onload=()=>e(s.result),s.onerror=t=>i(t)})),this.urls=new l}async http(t){const e=await fetch(t);if(!e.ok)throw new Error(e.statusText);try{return await e.json()}catch(t){throw new Error("No json found in response "+t)}}async post(t,e,i=!0){var s=new Request(d.apiBaseUrl+t,{method:"POST",body:e,headers:{"Content-Type":"application/json",Authorization:"IDKYC-TOKEN "+d.token}});try{return await this.http(s)}catch(s){if(!i||this.serviceErrors.includes(s.message))throw s;this.AddLog("Error in post ",s);try{var n=new Request(d.apiBaseUrl+t,{method:"POST",body:e,headers:{"Content-Type":"application/json",Authorization:"IDKYC-TOKEN "+d.token}});return await this.http(n)}catch(i){this.AddLog("Error in post ",i);var o=new Request(d.apiBaseUrl+t,{method:"POST",body:e,headers:{"Content-Type":"application/json",Authorization:"IDKYC-TOKEN "+d.token}});return await this.http(o)}}}async get(t,e=!0){var i=new Request(d.apiBaseUrl+t,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"IDKYC-TOKEN "+d.token}});try{return await this.http(i)}catch(i){if(!e||this.serviceErrors.includes(i.message))throw i;this.AddLog("Error in get ",i);try{var s=new Request(d.apiBaseUrl+t,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"IDKYC-TOKEN "+d.token}});return await this.http(s)}catch(e){this.AddLog("Error in get ",e);var n=new Request(d.apiBaseUrl+t,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"IDKYC-TOKEN "+d.token}});return await this.http(n)}}}async SendOTPCode(t,e){let i={requestId:t,phone:e};return(await this.post(this.urls.OtpSend,JSON.stringify(i))).sent}async CheckOTPCode(t,e){let i={requestId:t,otp:e};return(await this.post(this.urls.OtpCheck,JSON.stringify(i))).valid}async AddIdentificationRequest(t,e){d.debug&&console.log("Calling identity request with store:"+JSON.stringify(d));let i={requestId:d.requestId,clientDeviceInfo:JSON.stringify(t),redirectId:d.redirectId,phoneNumber:d.phoneNumber,version:e},s=await this.post(this.urls.IdentityInsert,JSON.stringify(i));return""==d.requestId&&(d.requestId=s.requestId),d.hasIdBack=s.hasIdBack,d.hasIdTilt=s.hasIdTilt,d.hasSelfieGesture=s.hasSelfieGesture,d.agreementsValidation=s.agreementsValidation,d.phoneValidation=s.phoneValidation,d.phoneNumber=s.phoneNumber,!0}async UploadFileForRequestB64(t,e,i){let s={requestId:t,type:e,data:await this.toBase64(i)},n=await this.post(this.urls.UploadCapture,JSON.stringify(s));return d.hasIdBack||"IdFront"!=e?d.hasIdBack&&"IdBack"==e?n.isValid:"Selfie"!=e||n.isValid:n.isValid}async GetAgreement(t){return(await this.get(this.urls.GetAgreement+"?type="+t+"&requestId="+d.requestId)).htmlText}async GenerateAgreement(t){let e={requestId:d.requestId,documentType:t};return(await this.post(this.urls.GenerateAgreement,JSON.stringify(e))).generation}async GetStatus(t){let e=await this.get(this.urls.GetStatus+"?orderId="+t);return i[e.status]}async SendLink(t,e){let i={requestId:d.requestId,link:t,phoneNumber:e};return(await this.post(this.urls.SendLink,JSON.stringify(i))).sent}async AddLog(t,e){try{let i={requestId:d.requestId,action:a[d.flowStatus],message:JSON.stringify({error:t,context:e})};return(await this.post(this.urls.AddLog,JSON.stringify(i),!1)).saved}catch(t){}}async AddStep(t,e){let i={requestId:d.requestId,redirectId:d.redirectId,step:p[t],moment:w[e],timestamp:(new Date).toISOString()};return(await this.post(this.urls.AddStep,JSON.stringify(i))).saved}async AbortRequest(){return(await this.post(this.urls.AbortRequest,JSON.stringify({requestId:d.requestId}))).saved}}!function(t){t.Android="android",t.iOS="ios",t.Unknown="unknown",t.WindowsPhone="Windows Phone"}(b||(b={})),function(t){t.Linux="linux",t.MacOS="mac_os",t.Unix="unix",t.Unknown="unknown",t.Windows="windows"}(m||(m={})),function(t){t.Chrome="chrome",t.Firefox="firefox",t.Safari="safari",t.Mi="mi",t.Unknown="unknown"}(f||(f={}));class v{constructor(){var t,e,i,s;this.supportedScreenOrientation=null!==(e=null!==(t=((null===screen||void 0===screen?void 0:screen.orientation)||{}).type)&&void 0!==t?t:screen.mozOrientation)&&void 0!==e?e:screen.msOrientation,this.safariScreenOrientation=!(null===screen||void 0===screen?void 0:screen.orientation)&&matchMedia("(orientation: portrait)").matches?"portrait-primary":"landscape-primary",this.initialScreenOrientation=null!==(s=null!==(i=this.supportedScreenOrientation)&&void 0!==i?i:this.safariScreenOrientation)&&void 0!==s?s:"portrait-primary",this.userAgent=navigator.userAgent||navigator.vendor||window.opera||void 0,this.isMobile=this.isMobileDevice(),this.isTablet=this.isTabletDevice(),this.isDesktop=!this.isMobile&&!this.isTablet}isMobileDevice(){return[/(Android)(.+)(Mobile)/i,/BlackBerry/i,/iPhone|iPod/i,/Opera Mini/i,/IEMobile/i].some((t=>this.userAgent.match(t)))}isTabletDevice(){return/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(this.userAgent.toLowerCase())}getMobileOS(){return this.isMobileDevice()?/windows phone/i.test(this.userAgent)?b.WindowsPhone:/android/i.test(this.userAgent)?b.Android:/iPad|iPhone|iPod/.test(this.userAgent)&&!window.MSStream?b.iOS:b.Unknown:void 0}getDesktopOS(){return this.isDesktop?-1!==this.userAgent.indexOf("Win")?m.Windows:-1!==this.userAgent.indexOf("Mac")?m.MacOS:-1!==this.userAgent.indexOf("X11")?m.Unix:-1!==this.userAgent.indexOf("Linux")?m.Linux:m.Unknown:void 0}getDeviceOS(){var t;return null!==(t=this.getMobileOS())&&void 0!==t?t:this.getDesktopOS()}getBrowser(){if(/XiaoMi/i.test(this.userAgent)||/MiuiBrowser/i.test(this.userAgent))return f.Mi;var t=/chrome/i.test(this.userAgent);return t?f.Chrome:/firefox/i.test(navigator.userAgent)?f.Firefox:!t&&/safari/i.test(navigator.userAgent)?f.Safari:f.Unknown}getDevice(){return{isDesktop:this.isDesktop,desktopOS:this.getDesktopOS(),isWindowsDesktop:this.getDeviceOS()===m.Windows,isLinuxOrUnixDesktop:this.getDeviceOS()===m.Linux||this.getDeviceOS()===m.Unix,isMobile:this.isMobile,mobileOS:this.getMobileOS(),isAndroidDevice:this.getDeviceOS()===b.Android,isAppleDevice:this.getDeviceOS()===b.iOS||this.getDeviceOS()===m.MacOS,isUnknownMobileDevice:this.getDeviceOS()===b.Unknown,browser:this.getBrowser(),isTablet:this.isTablet,initialScreenOrientation:this.initialScreenOrientation}}}class g{static init(t){this.callingModule=t}static flowEvent(t,e){const i=`ect-${t.toString()}-${e.toString()}-event`;this.callingModule.dispatchEvent(new CustomEvent(i,{detail:{},bubbles:!0,cancelable:!0,composed:!0}))}static flowStarted(){this.callingModule.dispatchEvent(new CustomEvent("ect-started",{detail:{},bubbles:!0,cancelable:!0,composed:!0}))}static flowAborted(){sessionStorage.clear(),this.callingModule.dispatchEvent(new CustomEvent("ect-aborted",{detail:{},bubbles:!0,cancelable:!0,composed:!0}))}static flowCompleted(){sessionStorage.clear(),this.callingModule.dispatchEvent(new CustomEvent("ect-completed",{detail:{},bubbles:!0,cancelable:!0,composed:!0}))}static flowError(t){sessionStorage.clear(),this.callingModule.dispatchEvent(new CustomEvent("ect-error",{detail:{error:t},bubbles:!0,cancelable:!0,composed:!0}))}static tokenExpired(){sessionStorage.clear(),this.callingModule.dispatchEvent(new CustomEvent("ect-session-expired",{detail:{},bubbles:!0,cancelable:!0,composed:!0}))}}const S=new class{async getValues(){return this.values||(this.values=await this.fetchTranslations()),this.values}getLocale(t=document.body){const e=t.closest("[lang]");return e?e.lang:d.langIso}async fetchTranslations(){const t=this.getLocale(),e=JSON.parse(sessionStorage.getItem(`i18n.${t}`));if(e&&Object.keys(e).length>0)return e;try{const e=await fetch(`/i18n/${t}.json`);if(e.ok){const i=await e.json();return sessionStorage.setItem(`i18n.${t}`,JSON.stringify(i)),i}}catch(e){console.error(`Error loading locale: ${t}`,e)}}};class E{constructor(t){this.apiErrorEvent=null,this.processError=null,this.apiCall=new y,t&&(this.flowStep=t),d.device||(d.device=(new v).getDevice()),S.getValues().then((t=>{this.translations=t}))}setEventEmitter(t){this.apiErrorEvent=t}setErrorCallback(t){this.processError=t}async logStep(t,e){g.flowEvent(t,e);try{await this.apiCall.AddStep(t,e)}catch(i){this.apiErrorEvent?this.apiErrorEvent.emit(i):this.processError(i,`${t}-${e}`)}}async initialize(){g.flowEvent(this.flowStep,w.Initialized);try{await this.apiCall.AddStep(this.flowStep,w.Initialized)}catch(t){this.apiErrorEvent?this.apiErrorEvent.emit(t):this.processError(t,`${this.flowStep}-${w.Initialized}`)}}async finalize(){g.flowEvent(this.flowStep,w.Finalized);try{await this.apiCall.AddStep(this.flowStep,w.Finalized)}catch(t){this.apiErrorEvent?this.apiErrorEvent.emit(t):this.processError(t,`${this.flowStep}-${w.Finalized}`)}}}export{y as A,E as B,g as E,p as F,r as I,b as M,i as O,h as S,a,f as b,w as c,c as d,d as s}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
let n,e,t=null,l=!1;const o={},s=n=>"object"==(n=typeof n)||"function"===n;function c(n){var e,t,l;return null!==(l=null===(t=null===(e=n.head)||void 0===e?void 0:e.querySelector('meta[name="csp-nonce"]'))||void 0===t?void 0:t.getAttribute("content"))&&void 0!==l?l:void 0}const i=(n,e,...t)=>{let l=null,o=!1,c=!1;const i=[],u=e=>{for(let t=0;t<e.length;t++)l=e[t],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof n&&!s(l))&&(l+=""),o&&c?i[i.length-1].t+=l:i.push(o?r(null,l):l),c=o)};if(u(t),e){const n=e.className||e.class;n&&(e.class="object"!=typeof n?n:Object.keys(n).filter((e=>n[e])).join(" "))}const a=r(n,null);return a.l=e,i.length>0&&(a.o=i),a},r=(n,e)=>({i:0,u:n,t:e,m:null,o:null,l:null}),u={},a=n=>B(n).p,f=(n,e,t)=>{const l=a(n);return{emit:n=>d(l,e,{bubbles:!!(4&t),composed:!!(2&t),cancelable:!!(1&t),detail:n})}},d=(n,e,t)=>{const l=en.ce(e,t);return n.dispatchEvent(l),l},m=new WeakMap,p=n=>"sc-"+n.h,h=(n,e,t,l,o,c)=>{if(t!==l){let i=J(n,e),r=e.toLowerCase();if("class"===e){const e=n.classList,o=$(t),s=$(l);e.remove(...o.filter((n=>n&&!s.includes(n)))),e.add(...s.filter((n=>n&&!o.includes(n))))}else if("style"===e){for(const e in t)l&&null!=l[e]||(e.includes("-")?n.style.removeProperty(e):n.style[e]="");for(const e in l)t&&l[e]===t[e]||(e.includes("-")?n.style.setProperty(e,l[e]):n.style[e]=l[e])}else if("ref"===e)l&&l(n);else if(i||"o"!==e[0]||"n"!==e[1]){const r=s(l);if((i||r&&null!==l)&&!o)try{if(n.tagName.includes("-"))n[e]=l;else{const o=null==l?"":l;"list"===e?i=!1:null!=t&&n[e]==o||(n[e]=o)}}catch(n){}null==l||!1===l?!1===l&&""!==n.getAttribute(e)||n.removeAttribute(e):(!i||4&c||o)&&!r&&n.setAttribute(e,l=!0===l?"":l)}else e="-"===e[2]?e.slice(3):J(Z,r)?r.slice(2):r[2]+e.slice(3),t&&en.rel(n,e,t,!1),l&&en.ael(n,e,l,!1)}},y=/\s/,$=n=>n?n.split(y):[],b=(n,e,t,l)=>{const s=11===e.m.nodeType&&e.m.host?e.m.host:e.m,c=n&&n.l||o,i=e.l||o;for(l in c)l in i||h(s,l,c[l],void 0,t,e.i);for(l in i)h(s,l,c[l],i[l],t,e.i)},w=(e,t,l)=>{const o=t.o[l];let s,c,i=0;if(null!==o.t)s=o.m=nn.createTextNode(o.t);else if(s=o.m=nn.createElement(o.u),b(null,o,!1),null!=n&&s["s-si"]!==n&&s.classList.add(s["s-si"]=n),o.o)for(i=0;i<o.o.length;++i)c=w(e,o,i),c&&s.appendChild(c);return s},v=(n,t,l,o,s,c)=>{let i,r=n;for(r.shadowRoot&&r.tagName===e&&(r=r.shadowRoot);s<=c;++s)o[s]&&(i=w(null,l,s),i&&(o[s].m=i,r.insertBefore(i,t)))},S=(n,e,t,l,o)=>{for(;e<=t;++e)(l=n[e])&&(o=l.m,M(l),o.remove())},g=(n,e)=>n.u===e.u,j=(n,e)=>{const t=e.m=n.m,l=n.o,o=e.o,s=e.t;null===s?(b(n,e,!1),null!==l&&null!==o?((n,e,t,l)=>{let o,s=0,c=0,i=e.length-1,r=e[0],u=e[i],a=l.length-1,f=l[0],d=l[a];for(;s<=i&&c<=a;)null==r?r=e[++s]:null==u?u=e[--i]:null==f?f=l[++c]:null==d?d=l[--a]:g(r,f)?(j(r,f),r=e[++s],f=l[++c]):g(u,d)?(j(u,d),u=e[--i],d=l[--a]):g(r,d)?(j(r,d),n.insertBefore(r.m,u.m.nextSibling),r=e[++s],d=l[--a]):g(u,f)?(j(u,f),n.insertBefore(u.m,r.m),u=e[--i],f=l[++c]):(o=w(e&&e[c],t,c),f=l[++c],o&&r.m.parentNode.insertBefore(o,r.m));s>i?v(n,null==l[a+1]?null:l[a+1].m,t,l,c,a):c>a&&S(e,s,i)})(t,l,e,o):null!==o?(null!==n.t&&(t.textContent=""),v(t,null,e,o,0,o.length-1)):null!==l&&S(l,0,l.length-1)):n.t!==s&&(t.data=s)},M=n=>{n.l&&n.l.ref&&n.l.ref(null),n.o&&n.o.map(M)},k=(n,e)=>{e&&!n.$&&e["s-p"]&&e["s-p"].push(new Promise((e=>n.$=e)))},C=(n,e)=>{if(n.i|=16,!(4&n.i))return k(n,n.v),fn((()=>O(n,e)));n.i|=512},O=(n,e)=>{const t=n.S;let l;return e&&(n.i|=256,n.g&&(n.g.map((([n,e])=>R(t,n,e))),n.g=null),l=R(t,"componentWillLoad")),l=T(l,(()=>R(t,"componentWillRender"))),T(l,(()=>L(n,t,e)))},L=async(n,e,t)=>{const l=n.p,o=l["s-rc"];t&&(n=>{const e=n.j,t=n.p,l=e.i,o=((n,e)=>{var t;let l=p(e);const o=Y.get(l);if(n=11===n.nodeType?n:nn,o)if("string"==typeof o){let e,s=m.get(n=n.head||n);if(s||m.set(n,s=new Set),!s.has(l)){{e=nn.createElement("style"),e.innerHTML=o;const l=null!==(t=en.M)&&void 0!==t?t:c(nn);null!=l&&e.setAttribute("nonce",l),n.insertBefore(e,n.querySelector("link"))}s&&s.add(l)}}else n.adoptedStyleSheets.includes(o)||(n.adoptedStyleSheets=[...n.adoptedStyleSheets,o]);return l})(t.shadowRoot?t.shadowRoot:t.getRootNode(),e);10&l&&(t["s-sc"]=o,t.classList.add(o+"-h"))})(n);P(n,e),o&&(o.map((n=>n())),l["s-rc"]=void 0);{const e=l["s-p"],t=()=>x(n);0===e.length?t():(Promise.all(e).then(t),n.i|=4,e.length=0)}},P=(l,o)=>{try{t=o,o=o.render(),l.i&=-17,l.i|=2,((t,l)=>{const o=t.p,s=t.j,c=t.k||r(null,null),a=(n=>n&&n.u===u)(l)?l:i(null,null,l);e=o.tagName,s.C&&(a.l=a.l||{},s.C.map((([n,e])=>a.l[e]=o[n]))),a.u=null,a.i|=4,t.k=a,a.m=c.m=o.shadowRoot||o,n=o["s-sc"],j(c,a)})(l,o)}catch(n){K(n,l.p)}return t=null,null},W=()=>t,x=n=>{const e=n.p,t=n.S,l=n.v;64&n.i||(n.i|=64,q(e),R(t,"componentDidLoad"),n.O(e),l||N()),n.$&&(n.$(),n.$=void 0),512&n.i&&an((()=>C(n,!1))),n.i&=-517},E=n=>{{const e=B(n),t=e.p.isConnected;return t&&2==(18&e.i)&&C(e,!1),t}},N=()=>{q(nn.documentElement),an((()=>d(Z,"appload",{detail:{namespace:"qbs-ect-cmp"}})))},R=(n,e,t)=>{if(n&&n[e])try{return n[e](t)}catch(n){K(n)}},T=(n,e)=>n&&n.then?n.then(e):e(),q=n=>n.classList.add("hydrated"),A=(n,e,t)=>{if(e.L){n.watchers&&(e.P=n.watchers);const l=Object.entries(e.L),o=n.prototype;if(l.map((([n,[l]])=>{(31&l||2&t&&32&l)&&Object.defineProperty(o,n,{get(){return((n,e)=>B(this).W.get(e))(0,n)},set(t){((n,e,t,l)=>{const o=B(n),c=o.p,i=o.W.get(e),r=o.i,u=o.S;if(t=((n,e)=>null==n||s(n)?n:2&e?parseFloat(n):1&e?n+"":n)(t,l.L[e][0]),(!(8&r)||void 0===i)&&t!==i&&(!Number.isNaN(i)||!Number.isNaN(t))&&(o.W.set(e,t),u)){if(l.P&&128&r){const n=l.P[e];n&&n.map((n=>{try{u[n](t,i,e)}catch(n){K(n,c)}}))}2==(18&r)&&C(o,!1)}})(this,n,t,e)},configurable:!0,enumerable:!0})})),1&t){const t=new Map;o.attributeChangedCallback=function(n,e,l){en.jmp((()=>{const e=t.get(n);if(this.hasOwnProperty(e))l=this[e],delete this[e];else if(o.hasOwnProperty(e)&&"number"==typeof this[e]&&this[e]==l)return;this[e]=(null!==l||"boolean"!=typeof this[e])&&l}))},n.observedAttributes=l.filter((([n,e])=>15&e[0])).map((([n,l])=>{const o=l[1]||n;return t.set(o,n),512&l[0]&&e.C.push([n,o]),o}))}}return n},F=(n,e={})=>{var t;const l=[],o=e.exclude||[],s=Z.customElements,i=nn.head,r=i.querySelector("meta[charset]"),u=nn.createElement("style"),a=[];let f,d=!0;Object.assign(en,e),en.N=new URL(e.resourcesUrl||"./",nn.baseURI).href,n.map((n=>{n[1].map((e=>{const t={i:e[0],h:e[1],L:e[2],R:e[3]};t.L=e[2],t.R=e[3],t.C=[],t.P={};const c=t.h,i=class extends HTMLElement{constructor(n){super(n),I(n=this,t),1&t.i&&n.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),d?a.push(this):en.jmp((()=>(n=>{if(0==(1&en.i)){const e=B(n),t=e.j,l=()=>{};if(1&e.i)U(n,e,t.R);else{e.i|=1;{let t=n;for(;t=t.parentNode||t.host;)if(t["s-p"]){k(e,e.v=t);break}}t.L&&Object.entries(t.L).map((([e,[t]])=>{if(31&t&&n.hasOwnProperty(e)){const t=n[e];delete n[e],n[e]=t}})),(async(n,e,t,l,o)=>{if(0==(32&e.i)){{if(e.i|=32,(o=X(t)).then){const n=()=>{};o=await o,n()}o.isProxied||(t.P=o.watchers,A(o,t,2),o.isProxied=!0);const n=()=>{};e.i|=8;try{new o(e)}catch(n){K(n)}e.i&=-9,e.i|=128,n()}if(o.style){let n=o.style;const e=p(t);if(!Y.has(e)){const l=()=>{};((n,e,t)=>{let l=Y.get(n);ln&&t?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,Y.set(n,l)})(e,n,!!(1&t.i)),l()}}}const s=e.v,c=()=>C(e,!0);s&&s["s-rc"]?s["s-rc"].push(c):c()})(0,e,t)}l()}})(this)))}disconnectedCallback(){en.jmp((()=>(()=>{if(0==(1&en.i)){const n=B(this),e=n.S;n.T&&(n.T.map((n=>n())),n.T=void 0),R(e,"disconnectedCallback")}})()))}componentOnReady(){return B(this).q}};t.A=n[0],o.includes(c)||s.get(c)||(l.push(c),s.define(c,A(i,t,1)))}))}));{u.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",u.setAttribute("data-styles","");const n=null!==(t=en.M)&&void 0!==t?t:c(nn);null!=n&&u.setAttribute("nonce",n),i.insertBefore(u,r?r.nextSibling:i.firstChild)}d=!1,a.length?a.map((n=>n.connectedCallback())):en.jmp((()=>f=setTimeout(N,30)))},U=(n,e,t)=>{t&&t.map((([t,l,o])=>{const s=H(n,t),c=D(e,o),i=V(t);en.ael(s,l,c,i),(e.T=e.T||[]).push((()=>en.rel(s,l,c,i)))}))},D=(n,e)=>t=>{try{256&n.i?n.S[e](t):(n.g=n.g||[]).push([e,t])}catch(n){K(n)}},H=(n,e)=>8&e?Z:n,V=n=>0!=(2&n),_=n=>en.M=n,z=new WeakMap,B=n=>z.get(n),G=(n,e)=>z.set(e.S=n,e),I=(n,e)=>{const t={i:0,p:n,j:e,W:new Map};return t.q=new Promise((n=>t.O=n)),n["s-p"]=[],n["s-rc"]=[],U(n,t,e.R),z.set(n,t)},J=(n,e)=>e in n,K=(n,e)=>(0,console.error)(n,e),Q=new Map,X=n=>{const e=n.h.replace(/-/g,"_"),t=n.A,l=Q.get(t);return l?l[e]:import(`./${t}.entry.js`).then((n=>(Q.set(t,n),n[e])),K)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},Y=new Map,Z="undefined"!=typeof window?window:{},nn=Z.document||{head:{}},en={i:0,N:"",jmp:n=>n(),raf:n=>requestAnimationFrame(n),ael:(n,e,t,l)=>n.addEventListener(e,t,l),rel:(n,e,t,l)=>n.removeEventListener(e,t,l),ce:(n,e)=>new CustomEvent(n,e)},tn=n=>Promise.resolve(n),ln=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(n){}return!1})(),on=[],sn=[],cn=(n,e)=>t=>{n.push(t),l||(l=!0,e&&4&en.i?an(un):en.raf(un))},rn=n=>{for(let e=0;e<n.length;e++)try{n[e](performance.now())}catch(n){K(n)}n.length=0},un=()=>{rn(on),rn(sn),(l=on.length>0)&&en.raf(un)},an=n=>tn().then(n),fn=cn(sn,!0);export{W as a,F as b,f as c,E as f,a as g,i as h,tn as p,G as r,_ as s}
|