@incodetech/web 2.0.1-rc.0 → 2.1.0-rc.0
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/ae-signature/ae-signature.es.js +15 -13
- package/dist/ae-signature/styles.css +3 -17
- package/dist/ae-signature/styles2.css +15 -5
- package/dist/aligndevicelottie-DY_bX_p8.js +12769 -0
- package/dist/antifraud/antifraud.es.js +23 -16
- package/dist/authentication/authentication.es.js +42 -27
- package/dist/autoFocusTitle-BzkUiELM.js +29 -0
- package/dist/{back-horizontal-hint-B8Brxh3U.js → back-horizontal-hint-D_8LptLm.js} +26 -26
- package/dist/back-tutorial-vb1MxlrT.js +14597 -0
- package/dist/{back-vertical-hint-BBo36dxn.js → back-vertical-hint-C1evxxq2.js} +27 -27
- package/dist/backdevicelottie-HypPqBz7.js +16690 -0
- package/dist/base.css +1258 -104
- package/dist/blurdevicelottie-CBXtBFiJ.js +15951 -0
- package/dist/bottomSheet-F1GJfQx_.js +39 -0
- package/dist/browser-ponyfill-CLLvZCVg.js +441 -0
- package/dist/button-CM_hgyIP.js +35 -0
- package/dist/checkbox-BoeLHKgp.js +96 -0
- package/dist/consent/consent.es.js +89 -73
- package/dist/consent/styles.css +35 -22
- package/dist/countrySelector-mSWyHSy4.js +60 -0
- package/dist/cpf-ocr/cpf-ocr.es.js +2 -0
- package/dist/cpfOcr-MtpRztkG.js +92 -0
- package/dist/cpfOcr-jJkYCfsX.js +2 -0
- package/dist/cross-document-data-match/cross-document-data-match.es.js +20 -16
- package/dist/curp-validation/curp-validation.es.js +247 -203
- package/dist/customFields-DXXt9HGM.js +140 -0
- package/dist/customWatchlist-DsW04UF6.js +36 -0
- package/dist/dateInputComposed-C_mh4XBg.js +69 -0
- package/dist/dateInputComposed-Cy6a7ymh.js +1 -0
- package/dist/defineProperty-mefzVtTv.js +39 -0
- package/dist/document-capture/document-capture.es.js +2 -0
- package/dist/document-capture/styles.css +2 -5
- package/dist/documentCapture-8ypBJehw.js +2 -0
- package/dist/documentCapture-BDV_921m.js +880 -0
- package/dist/dropdownComposed-CEWBSdGl.js +1 -0
- package/dist/dropdownComposed-_fgAlo_C.js +380 -0
- package/dist/dynamic-forms/styles.css +25 -13
- package/dist/dynamicForms-DyfnsS7E.js +352 -0
- package/dist/ekyb/ekyb.es.js +2 -2
- package/dist/ekyb/styles.css +2 -0
- package/dist/ekybModule-CIPGmCvD.js +279 -0
- package/dist/ekybModule-DFoYpheB.js +2 -0
- package/dist/ekyc/ekyc.es.js +2 -2
- package/dist/ekyc/styles.css +9 -7
- package/dist/ekycModule-BGzwgjl1.js +2 -0
- package/dist/ekycModule-BuTaC5ct.js +257 -0
- package/dist/electronic-signature/electronic-signature.es.js +2 -2
- package/dist/electronic-signature-B-Q7M0wK.js +430 -0
- package/dist/email/email.es.js +199 -66
- package/dist/emailInput-KZmhjOdZ.js +39 -0
- package/dist/errorIcon-DJRZpd8j.js +26 -0
- package/dist/expiredId-Q1t6aVpk.js +85 -0
- package/dist/extensibility-Cs3KQQdC.js +3070 -0
- package/dist/extensibility.es.js +26 -25
- package/dist/face-match/face-match.es.js +2 -2
- package/dist/face-match/styles.css +0 -4
- package/dist/faceMatch--RDHJe4t.js +343 -0
- package/dist/faceMatch-yEKPYaym.js +2 -0
- package/dist/field-comparison/field-comparison.es.js +2 -0
- package/dist/field-comparison/styles.css +16 -0
- package/dist/fieldComparison-CAF86bTC.js +88 -0
- package/dist/fieldComparison-D0an7T_g.js +2 -0
- package/dist/fiscal-qr/fiscal-qr.es.js +224 -0
- package/dist/fiscal-qr/styles.css +71 -0
- package/dist/{flip-animation-CgwRsEmK.js → flip-animation-BGRvygw9.js} +4221 -4221
- package/dist/flow/flow.es.js +619 -484
- package/dist/flow/styles.css +378 -418
- package/dist/{front-horizontal-hint-DGGGi8e1.js → front-horizontal-hint-Uf5bHCsd.js} +70 -70
- package/dist/{front-vertical-hint-CNr5mE6Q.js → front-vertical-hint-DdWNA45v.js} +81 -81
- package/dist/frontdevicelottie-CLqitJhG.js +17314 -0
- package/dist/geolocation/geolocation.es.js +486 -395
- package/dist/glaredevicelottie-BS04U6Fc.js +14478 -0
- package/dist/governmentValidation/governmentValidation.es.js +166 -93
- package/dist/governmentValidation/styles.css +0 -17
- package/dist/homeScreen-BZnIEDrV.js +264 -0
- package/dist/hooks-Da_yP_Dr.js +149 -0
- package/dist/i18n-CoCO2ZuN.js +2971 -0
- package/dist/icons-Dbs9ZfYM.js +360 -0
- package/dist/id/id.es.js +583 -414
- package/dist/id/styles.css +59 -43
- package/dist/id-laser-h-DX8UbVNH.js +467 -0
- package/dist/id-laser-v-DhnHdjlB.js +490 -0
- package/dist/id-tutorial-lj4iKtYT.js +13165 -0
- package/dist/id-verification/id-verification.es.js +21 -17
- package/dist/idOcr-CjGbb4dB.js +123 -0
- package/dist/identity-reuse/identity-reuse.es.js +311 -182
- package/dist/identity-reuse/styles.css +134 -80
- package/dist/incode-logo-57XFniXU.js +4 -0
- package/dist/incodeComponent-wfnHlnXx.js +63 -0
- package/dist/incodeModule-BUDoTwT9.js +13 -0
- package/dist/index.es.js +16 -13
- package/dist/inputComposed-BEn7_nZd.js +1 -0
- package/dist/inputComposed-CQ4AsvZg.js +99 -0
- package/dist/loadingIcon-B0ysgiNq.js +148 -0
- package/dist/lottie_light-Dp9Bz3mf.js +9031 -0
- package/dist/mandatoryConsent-r0PQHmv-.js +107 -0
- package/dist/modal-nTSaG7nB.js +139 -0
- package/dist/modal.hooks-D2xhIuHA.js +195 -0
- package/dist/numberedStep-CEtwZqLp.js +13 -0
- package/dist/optionAccessibleLabel-CnA-mNAU.js +202 -0
- package/dist/otpInput-_JmtVwa0.js +195 -0
- package/dist/page-DxGQj7Gk.js +71 -0
- package/dist/{passport-horizontal-hint-Bgquwtac.js → passport-horizontal-hint-Bbm2mvSn.js} +55 -55
- package/dist/{passport-tutorial-DwRwtPVX.js → passport-tutorial-zT1ZoA-D.js} +7096 -7084
- package/dist/{passport-vertical-hint-BT1D5BrW.js → passport-vertical-hint-DJbCtBiM.js} +49 -49
- package/dist/pdf-BZA70WbM.js +22398 -0
- package/dist/pdfViewer-BK-yVIve.js +114 -0
- package/dist/phone/phone.es.js +214 -70
- package/dist/phoneInputComposed-DjNdsmPE.js +12142 -0
- package/dist/processing-BM-wT-1W.js +8 -0
- package/dist/qe-signature/qe-signature.es.js +15 -13
- package/dist/radioGroupComposed-BNuaopVr.js +215 -0
- package/dist/redirect-to-mobile/redirect-to-mobile.es.js +2774 -0
- package/dist/redirect-to-mobile/styles.css +19 -269
- package/dist/registerIncodeElement-77NGCDsy.js +11 -0
- package/dist/requiredLabelHint-DEadtiwx.js +17 -0
- package/dist/richText-Cf9aMOCk.js +3153 -0
- package/dist/rolldown-runtime--E5BIlTp.js +33 -0
- package/dist/selfie/selfie.es.js +54 -37
- package/dist/selfie/styles.css +0 -4
- package/dist/selfieTutorial-CtruLyO2.js +2689 -0
- package/dist/signature/signature.es.js +778 -405
- package/dist/snackbar-CxepGC3e.js +16 -0
- package/dist/spinner-B6RxGFrI.js +1 -0
- package/dist/spinner-D8a_2LvW.js +42 -0
- package/dist/statusPage-DMYPUwRZ.js +28 -0
- package/dist/successIcon-BAyDPT7I.js +30 -0
- package/dist/tabs-C8npVBbk.js +103 -0
- package/dist/themes/dark.css +5 -0
- package/dist/themes/light.css +4 -0
- package/dist/transitionSpinner-DRRz-NV8.js +26 -0
- package/dist/{tutorial-9vHAHvMK.js → tutorial-D1qaY2Tm.js} +1105 -856
- package/dist/types/ae-signature.d.ts +4 -1
- package/dist/types/antifraud.d.ts +9 -3
- package/dist/types/authentication.d.ts +4 -1
- package/dist/types/consent.d.ts +4 -1
- package/dist/types/cpf-ocr.d.ts +12 -0
- package/dist/types/cross-document-data-match.d.ts +4 -1
- package/dist/types/curp-validation.d.ts +9 -3
- package/dist/types/document-capture.d.ts +37 -0
- package/dist/types/ekyb.d.ts +4 -1
- package/dist/types/ekyc.d.ts +4 -1
- package/dist/types/electronic-signature.d.ts +4 -1
- package/dist/types/email.d.ts +4 -1
- package/dist/types/extensibility.d.ts +40 -15
- package/dist/types/face-match.d.ts +4 -1
- package/dist/types/field-comparison.d.ts +38 -0
- package/dist/types/fiscal-qr.d.ts +43 -0
- package/dist/types/flow.d.ts +5 -2
- package/dist/types/geolocation.d.ts +4 -1
- package/dist/types/governmentValidation.d.ts +4 -1
- package/dist/types/id-verification.d.ts +4 -1
- package/dist/types/id.d.ts +4 -1
- package/dist/types/identity-reuse.d.ts +4 -1
- package/dist/types/index.d.ts +20 -2
- package/dist/types/phone.d.ts +4 -1
- package/dist/types/qe-signature.d.ts +4 -1
- package/dist/types/redirect-to-mobile.d.ts +17 -0
- package/dist/types/selfie.d.ts +4 -1
- package/dist/types/signature.d.ts +4 -1
- package/dist/types/watchlist.d.ts +4 -1
- package/dist/types/workflow.d.ts +55 -11
- package/dist/typography-YLgHHuao.js +45 -0
- package/dist/uiConfig-D2_wawvr.js +25 -0
- package/dist/useModuleLoader-CeJ2jL25.js +672 -0
- package/dist/vendor-preact-DThS2ZQ_.js +955 -0
- package/dist/verificationResult-Do5SpZ6X.js +64 -0
- package/dist/verifiedByIncode-DjXOdCml.js +103 -0
- package/dist/watchlist/watchlist.es.js +31 -28
- package/dist/watchlistForBusiness-BFFXC9d-.js +80 -0
- package/dist/workflow/styles.css +449 -427
- package/dist/workflow/workflow.es.js +268 -182
- package/package.json +32 -10
- package/dist/aligndevicelottie-DoV8xKjh.js +0 -12757
- package/dist/autoFocusTitle-QexamZ4i.js +0 -16
- package/dist/back-tutorial-1NOQobGO.js +0 -14585
- package/dist/backdevicelottie-C_ceuqY7.js +0 -16678
- package/dist/blurdevicelottie-UO14Y0WC.js +0 -15939
- package/dist/bottomSheet-DE_8TFEC.js +0 -31
- package/dist/browser-ponyfill-jOkuz57z.js +0 -299
- package/dist/button-DcCUEn2n.js +0 -24
- package/dist/checkbox-Cl57ltq_.js +0 -85
- package/dist/countrySelector-CE-JgIsv.js +0 -58
- package/dist/cpfOcr-D_tbwbvh.js +0 -78
- package/dist/customFields-CW38fQUv.js +0 -127
- package/dist/customWatchlist-D9_yjEQd.js +0 -33
- package/dist/dateInputComposed-BpAGsjN6.js +0 -55
- package/dist/dateInputComposed-DU3o6PAV.js +0 -1
- package/dist/defineProperty-Dh8nSJpJ.js +0 -39
- package/dist/documentCapture-xX-JT7ZY.js +0 -763
- package/dist/dropdownComposed-DFRBG22E.js +0 -284
- package/dist/dropdownComposed-DwTzc2YU.js +0 -1
- package/dist/dynamicForms-CJP1Ia6Q.js +0 -262
- package/dist/ekybModule-BSs7mndb.js +0 -280
- package/dist/ekybModule-D9M3E2Gm.js +0 -2
- package/dist/ekycModule-CU9pt5YN.js +0 -246
- package/dist/ekycModule-CZw9cLno.js +0 -2
- package/dist/electronic-signature-COYXjGdd.js +0 -410
- package/dist/emailInput-DppGf9pv.js +0 -37
- package/dist/expiredId-BnmzE8T3.js +0 -70
- package/dist/extensibility-CzEJfRwo.js +0 -2586
- package/dist/faceMatch-B8j0g0Yo.js +0 -2
- package/dist/faceMatch-BV8UD7tj.js +0 -201
- package/dist/frontdevicelottie-Bu6f9fDE.js +0 -17302
- package/dist/glaredevicelottie-B10axYs_.js +0 -14466
- package/dist/homeScreen-DnP1jw9A.js +0 -227
- package/dist/hooks-BVnGysT7.js +0 -80
- package/dist/i18n-9s4OSqwi.js +0 -2010
- package/dist/icons-Cc7zwchP.js +0 -310
- package/dist/id-laser-h-mBAzHVOK.js +0 -467
- package/dist/id-laser-v-CrFg4bcJ.js +0 -483
- package/dist/id-tutorial-BCr42Pnn.js +0 -13153
- package/dist/idOcr-CCjfWQvH.js +0 -94
- package/dist/incode-logo-DX016usY.js +0 -4
- package/dist/incodeComponent-C1o4M0ZK.js +0 -50
- package/dist/incodeModule-BqCjVgEI.js +0 -18
- package/dist/inputComposed-APSw8C7o.js +0 -89
- package/dist/inputComposed-XYrarFxS.js +0 -1
- package/dist/loadingIcon-BN5YRQUb.js +0 -104
- package/dist/mandatoryConsent-DssKMC3v.js +0 -100
- package/dist/modal-NMxsQHAO.js +0 -135
- package/dist/modal.hooks-CAjcIFZK.js +0 -126
- package/dist/numberedStep-CT-alrK5.js +0 -11
- package/dist/optionAccessibleLabel-CzEeX3Q4.js +0 -140
- package/dist/otpInput-DqRA_egd.js +0 -145
- package/dist/page-C1yT4DLb.js +0 -69
- package/dist/pdf-BurGZ08w.js +0 -14967
- package/dist/pdfViewer-BGBNL1Ea.js +0 -63
- package/dist/phoneInputComposed-bvWhGLFZ.js +0 -11206
- package/dist/processing-G_y3o32b.js +0 -6
- package/dist/radioGroupComposed-BbmvxmD2.js +0 -177
- package/dist/redirectToMobile-C3k1gloW.js +0 -1514
- package/dist/requiredLabelHint-BLwgqozE.js +0 -13
- package/dist/richText-DbJ5sl2n.js +0 -1973
- package/dist/rolldown-runtime-CYMK-g2i.js +0 -20
- package/dist/selfieTutorial-BgrlUMXP.js +0 -2677
- package/dist/snackbar-BDp8x7Cv.js +0 -14
- package/dist/spinner-B4dcie2T.js +0 -1
- package/dist/spinner-CKnjVHxw.js +0 -39
- package/dist/statusPage-CUI7ApcU.js +0 -28
- package/dist/successIcon-DbILeIz_.js +0 -28
- package/dist/tabs-DaPyP71c.js +0 -78
- package/dist/transitionSpinner-PIEPU2Vx.js +0 -17
- package/dist/types/cpf-ocr/styles.d.ts +0 -1
- package/dist/types/document-capture/styles.d.ts +0 -1
- package/dist/types/redirect-to-mobile/styles.d.ts +0 -1
- package/dist/typography-CxjaknHN.js +0 -28
- package/dist/uiConfig-CwpQ-IM6.js +0 -20
- package/dist/useModuleLoader-BFiVA41N.js +0 -432
- package/dist/vendor-preact-D6SntenC.js +0 -958
- package/dist/verificationResult-BrVbUJ4U.js +0 -97
- package/dist/verifiedByIncode-ChZBpqNy.js +0 -101
- package/dist/watchlistForBusiness-BcSNtHCV.js +0 -77
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { h as e, l as t, v as n } from "./vendor-preact-D6SntenC.js";
|
|
2
|
-
import { i as r, n as i, o as a, r as o, s } from "./modal.hooks-CAjcIFZK.js";
|
|
3
|
-
//#region src/shared/bottomSheet/bottomSheet.tsx
|
|
4
|
-
var c = ({ isOpen: c = !1, onClose: l, labelledById: u, children: d }) => {
|
|
5
|
-
let f = t(null), p = t(null), m = e(() => {
|
|
6
|
-
l?.();
|
|
7
|
-
}, [l]);
|
|
8
|
-
return i(c), o(c, !0, m), r(c, f), a(c, f), s(c, p), c ? /* @__PURE__ */ n("div", {
|
|
9
|
-
ref: p,
|
|
10
|
-
class: "IncodeBottomSheetOverlay",
|
|
11
|
-
onClick: (e) => {
|
|
12
|
-
e.target === e.currentTarget && m();
|
|
13
|
-
},
|
|
14
|
-
children: /* @__PURE__ */ n("div", {
|
|
15
|
-
class: "IncodeBottomSheetContainer",
|
|
16
|
-
onClick: m,
|
|
17
|
-
children: /* @__PURE__ */ n("div", {
|
|
18
|
-
ref: f,
|
|
19
|
-
class: "IncodeBottomSheet",
|
|
20
|
-
role: "dialog",
|
|
21
|
-
"aria-modal": "true",
|
|
22
|
-
"aria-labelledby": u,
|
|
23
|
-
tabIndex: -1,
|
|
24
|
-
onClick: (e) => e.stopPropagation(),
|
|
25
|
-
children: d
|
|
26
|
-
})
|
|
27
|
-
})
|
|
28
|
-
}) : null;
|
|
29
|
-
};
|
|
30
|
-
//#endregion
|
|
31
|
-
export { c as t };
|
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-CYMK-g2i.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/cross-fetch@4.0.0/node_modules/cross-fetch/dist/browser-ponyfill.js
|
|
3
|
-
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
|
-
var n = typeof globalThis < "u" && globalThis || typeof self < "u" && self || typeof global < "u" && global, r = (function() {
|
|
5
|
-
function e() {
|
|
6
|
-
this.fetch = !1, this.DOMException = n.DOMException;
|
|
7
|
-
}
|
|
8
|
-
return e.prototype = n, new e();
|
|
9
|
-
})();
|
|
10
|
-
(function(e) {
|
|
11
|
-
(function(t) {
|
|
12
|
-
var n = e !== void 0 && e || typeof self < "u" && self || n !== void 0 && n, r = {
|
|
13
|
-
searchParams: "URLSearchParams" in n,
|
|
14
|
-
iterable: "Symbol" in n && "iterator" in Symbol,
|
|
15
|
-
blob: "FileReader" in n && "Blob" in n && (function() {
|
|
16
|
-
try {
|
|
17
|
-
return new Blob(), !0;
|
|
18
|
-
} catch {
|
|
19
|
-
return !1;
|
|
20
|
-
}
|
|
21
|
-
})(),
|
|
22
|
-
formData: "FormData" in n,
|
|
23
|
-
arrayBuffer: "ArrayBuffer" in n
|
|
24
|
-
};
|
|
25
|
-
function i(e) {
|
|
26
|
-
return e && DataView.prototype.isPrototypeOf(e);
|
|
27
|
-
}
|
|
28
|
-
if (r.arrayBuffer) var a = [
|
|
29
|
-
"[object Int8Array]",
|
|
30
|
-
"[object Uint8Array]",
|
|
31
|
-
"[object Uint8ClampedArray]",
|
|
32
|
-
"[object Int16Array]",
|
|
33
|
-
"[object Uint16Array]",
|
|
34
|
-
"[object Int32Array]",
|
|
35
|
-
"[object Uint32Array]",
|
|
36
|
-
"[object Float32Array]",
|
|
37
|
-
"[object Float64Array]"
|
|
38
|
-
], o = ArrayBuffer.isView || function(e) {
|
|
39
|
-
return e && a.indexOf(Object.prototype.toString.call(e)) > -1;
|
|
40
|
-
};
|
|
41
|
-
function s(e) {
|
|
42
|
-
if (typeof e != "string" && (e = String(e)), /[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e) || e === "") throw TypeError("Invalid character in header field name: \"" + e + "\"");
|
|
43
|
-
return e.toLowerCase();
|
|
44
|
-
}
|
|
45
|
-
function c(e) {
|
|
46
|
-
return typeof e != "string" && (e = String(e)), e;
|
|
47
|
-
}
|
|
48
|
-
function l(e) {
|
|
49
|
-
var t = { next: function() {
|
|
50
|
-
var t = e.shift();
|
|
51
|
-
return {
|
|
52
|
-
done: t === void 0,
|
|
53
|
-
value: t
|
|
54
|
-
};
|
|
55
|
-
} };
|
|
56
|
-
return r.iterable && (t[Symbol.iterator] = function() {
|
|
57
|
-
return t;
|
|
58
|
-
}), t;
|
|
59
|
-
}
|
|
60
|
-
function u(e) {
|
|
61
|
-
this.map = {}, e instanceof u ? e.forEach(function(e, t) {
|
|
62
|
-
this.append(t, e);
|
|
63
|
-
}, this) : Array.isArray(e) ? e.forEach(function(e) {
|
|
64
|
-
this.append(e[0], e[1]);
|
|
65
|
-
}, this) : e && Object.getOwnPropertyNames(e).forEach(function(t) {
|
|
66
|
-
this.append(t, e[t]);
|
|
67
|
-
}, this);
|
|
68
|
-
}
|
|
69
|
-
u.prototype.append = function(e, t) {
|
|
70
|
-
e = s(e), t = c(t);
|
|
71
|
-
var n = this.map[e];
|
|
72
|
-
this.map[e] = n ? n + ", " + t : t;
|
|
73
|
-
}, u.prototype.delete = function(e) {
|
|
74
|
-
delete this.map[s(e)];
|
|
75
|
-
}, u.prototype.get = function(e) {
|
|
76
|
-
return e = s(e), this.has(e) ? this.map[e] : null;
|
|
77
|
-
}, u.prototype.has = function(e) {
|
|
78
|
-
return this.map.hasOwnProperty(s(e));
|
|
79
|
-
}, u.prototype.set = function(e, t) {
|
|
80
|
-
this.map[s(e)] = c(t);
|
|
81
|
-
}, u.prototype.forEach = function(e, t) {
|
|
82
|
-
for (var n in this.map) this.map.hasOwnProperty(n) && e.call(t, this.map[n], n, this);
|
|
83
|
-
}, u.prototype.keys = function() {
|
|
84
|
-
var e = [];
|
|
85
|
-
return this.forEach(function(t, n) {
|
|
86
|
-
e.push(n);
|
|
87
|
-
}), l(e);
|
|
88
|
-
}, u.prototype.values = function() {
|
|
89
|
-
var e = [];
|
|
90
|
-
return this.forEach(function(t) {
|
|
91
|
-
e.push(t);
|
|
92
|
-
}), l(e);
|
|
93
|
-
}, u.prototype.entries = function() {
|
|
94
|
-
var e = [];
|
|
95
|
-
return this.forEach(function(t, n) {
|
|
96
|
-
e.push([n, t]);
|
|
97
|
-
}), l(e);
|
|
98
|
-
}, r.iterable && (u.prototype[Symbol.iterator] = u.prototype.entries);
|
|
99
|
-
function d(e) {
|
|
100
|
-
if (e.bodyUsed) return Promise.reject(/* @__PURE__ */ TypeError("Already read"));
|
|
101
|
-
e.bodyUsed = !0;
|
|
102
|
-
}
|
|
103
|
-
function f(e) {
|
|
104
|
-
return new Promise(function(t, n) {
|
|
105
|
-
e.onload = function() {
|
|
106
|
-
t(e.result);
|
|
107
|
-
}, e.onerror = function() {
|
|
108
|
-
n(e.error);
|
|
109
|
-
};
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
function p(e) {
|
|
113
|
-
var t = new FileReader(), n = f(t);
|
|
114
|
-
return t.readAsArrayBuffer(e), n;
|
|
115
|
-
}
|
|
116
|
-
function m(e) {
|
|
117
|
-
var t = new FileReader(), n = f(t);
|
|
118
|
-
return t.readAsText(e), n;
|
|
119
|
-
}
|
|
120
|
-
function h(e) {
|
|
121
|
-
for (var t = new Uint8Array(e), n = Array(t.length), r = 0; r < t.length; r++) n[r] = String.fromCharCode(t[r]);
|
|
122
|
-
return n.join("");
|
|
123
|
-
}
|
|
124
|
-
function g(e) {
|
|
125
|
-
if (e.slice) return e.slice(0);
|
|
126
|
-
var t = new Uint8Array(e.byteLength);
|
|
127
|
-
return t.set(new Uint8Array(e)), t.buffer;
|
|
128
|
-
}
|
|
129
|
-
function _() {
|
|
130
|
-
return this.bodyUsed = !1, this._initBody = function(e) {
|
|
131
|
-
this.bodyUsed = this.bodyUsed, this._bodyInit = e, e ? typeof e == "string" ? this._bodyText = e : r.blob && Blob.prototype.isPrototypeOf(e) ? this._bodyBlob = e : r.formData && FormData.prototype.isPrototypeOf(e) ? this._bodyFormData = e : r.searchParams && URLSearchParams.prototype.isPrototypeOf(e) ? this._bodyText = e.toString() : r.arrayBuffer && r.blob && i(e) ? (this._bodyArrayBuffer = g(e.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : r.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(e) || o(e)) ? this._bodyArrayBuffer = g(e) : this._bodyText = e = Object.prototype.toString.call(e) : this._bodyText = "", this.headers.get("content-type") || (typeof e == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : r.searchParams && URLSearchParams.prototype.isPrototypeOf(e) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
|
|
132
|
-
}, r.blob && (this.blob = function() {
|
|
133
|
-
var e = d(this);
|
|
134
|
-
if (e) return e;
|
|
135
|
-
if (this._bodyBlob) return Promise.resolve(this._bodyBlob);
|
|
136
|
-
if (this._bodyArrayBuffer) return Promise.resolve(new Blob([this._bodyArrayBuffer]));
|
|
137
|
-
if (this._bodyFormData) throw Error("could not read FormData body as blob");
|
|
138
|
-
return Promise.resolve(new Blob([this._bodyText]));
|
|
139
|
-
}, this.arrayBuffer = function() {
|
|
140
|
-
return this._bodyArrayBuffer ? d(this) || (ArrayBuffer.isView(this._bodyArrayBuffer) ? Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset, this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength)) : Promise.resolve(this._bodyArrayBuffer)) : this.blob().then(p);
|
|
141
|
-
}), this.text = function() {
|
|
142
|
-
var e = d(this);
|
|
143
|
-
if (e) return e;
|
|
144
|
-
if (this._bodyBlob) return m(this._bodyBlob);
|
|
145
|
-
if (this._bodyArrayBuffer) return Promise.resolve(h(this._bodyArrayBuffer));
|
|
146
|
-
if (this._bodyFormData) throw Error("could not read FormData body as text");
|
|
147
|
-
return Promise.resolve(this._bodyText);
|
|
148
|
-
}, r.formData && (this.formData = function() {
|
|
149
|
-
return this.text().then(x);
|
|
150
|
-
}), this.json = function() {
|
|
151
|
-
return this.text().then(JSON.parse);
|
|
152
|
-
}, this;
|
|
153
|
-
}
|
|
154
|
-
var v = [
|
|
155
|
-
"DELETE",
|
|
156
|
-
"GET",
|
|
157
|
-
"HEAD",
|
|
158
|
-
"OPTIONS",
|
|
159
|
-
"POST",
|
|
160
|
-
"PUT"
|
|
161
|
-
];
|
|
162
|
-
function y(e) {
|
|
163
|
-
var t = e.toUpperCase();
|
|
164
|
-
return v.indexOf(t) > -1 ? t : e;
|
|
165
|
-
}
|
|
166
|
-
function b(e, t) {
|
|
167
|
-
if (!(this instanceof b)) throw TypeError("Please use the \"new\" operator, this DOM object constructor cannot be called as a function.");
|
|
168
|
-
t ||= {};
|
|
169
|
-
var n = t.body;
|
|
170
|
-
if (e instanceof b) {
|
|
171
|
-
if (e.bodyUsed) throw TypeError("Already read");
|
|
172
|
-
this.url = e.url, this.credentials = e.credentials, t.headers || (this.headers = new u(e.headers)), this.method = e.method, this.mode = e.mode, this.signal = e.signal, !n && e._bodyInit != null && (n = e._bodyInit, e.bodyUsed = !0);
|
|
173
|
-
} else this.url = String(e);
|
|
174
|
-
if (this.credentials = t.credentials || this.credentials || "same-origin", (t.headers || !this.headers) && (this.headers = new u(t.headers)), this.method = y(t.method || this.method || "GET"), this.mode = t.mode || this.mode || null, this.signal = t.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && n) throw TypeError("Body not allowed for GET or HEAD requests");
|
|
175
|
-
if (this._initBody(n), (this.method === "GET" || this.method === "HEAD") && (t.cache === "no-store" || t.cache === "no-cache")) {
|
|
176
|
-
var r = /([?&])_=[^&]*/;
|
|
177
|
-
r.test(this.url) ? this.url = this.url.replace(r, "$1_=" + (/* @__PURE__ */ new Date()).getTime()) : this.url += (/\?/.test(this.url) ? "&" : "?") + "_=" + (/* @__PURE__ */ new Date()).getTime();
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
b.prototype.clone = function() {
|
|
181
|
-
return new b(this, { body: this._bodyInit });
|
|
182
|
-
};
|
|
183
|
-
function x(e) {
|
|
184
|
-
var t = new FormData();
|
|
185
|
-
return e.trim().split("&").forEach(function(e) {
|
|
186
|
-
if (e) {
|
|
187
|
-
var n = e.split("="), r = n.shift().replace(/\+/g, " "), i = n.join("=").replace(/\+/g, " ");
|
|
188
|
-
t.append(decodeURIComponent(r), decodeURIComponent(i));
|
|
189
|
-
}
|
|
190
|
-
}), t;
|
|
191
|
-
}
|
|
192
|
-
function S(e) {
|
|
193
|
-
var t = new u();
|
|
194
|
-
return e.replace(/\r?\n[\t ]+/g, " ").split("\r").map(function(e) {
|
|
195
|
-
return e.indexOf("\n") === 0 ? e.substr(1, e.length) : e;
|
|
196
|
-
}).forEach(function(e) {
|
|
197
|
-
var n = e.split(":"), r = n.shift().trim();
|
|
198
|
-
if (r) {
|
|
199
|
-
var i = n.join(":").trim();
|
|
200
|
-
t.append(r, i);
|
|
201
|
-
}
|
|
202
|
-
}), t;
|
|
203
|
-
}
|
|
204
|
-
_.call(b.prototype);
|
|
205
|
-
function C(e, t) {
|
|
206
|
-
if (!(this instanceof C)) throw TypeError("Please use the \"new\" operator, this DOM object constructor cannot be called as a function.");
|
|
207
|
-
t ||= {}, this.type = "default", this.status = t.status === void 0 ? 200 : t.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = t.statusText === void 0 ? "" : "" + t.statusText, this.headers = new u(t.headers), this.url = t.url || "", this._initBody(e);
|
|
208
|
-
}
|
|
209
|
-
_.call(C.prototype), C.prototype.clone = function() {
|
|
210
|
-
return new C(this._bodyInit, {
|
|
211
|
-
status: this.status,
|
|
212
|
-
statusText: this.statusText,
|
|
213
|
-
headers: new u(this.headers),
|
|
214
|
-
url: this.url
|
|
215
|
-
});
|
|
216
|
-
}, C.error = function() {
|
|
217
|
-
var e = new C(null, {
|
|
218
|
-
status: 0,
|
|
219
|
-
statusText: ""
|
|
220
|
-
});
|
|
221
|
-
return e.type = "error", e;
|
|
222
|
-
};
|
|
223
|
-
var w = [
|
|
224
|
-
301,
|
|
225
|
-
302,
|
|
226
|
-
303,
|
|
227
|
-
307,
|
|
228
|
-
308
|
|
229
|
-
];
|
|
230
|
-
C.redirect = function(e, t) {
|
|
231
|
-
if (w.indexOf(t) === -1) throw RangeError("Invalid status code");
|
|
232
|
-
return new C(null, {
|
|
233
|
-
status: t,
|
|
234
|
-
headers: { location: e }
|
|
235
|
-
});
|
|
236
|
-
}, t.DOMException = n.DOMException;
|
|
237
|
-
try {
|
|
238
|
-
new t.DOMException();
|
|
239
|
-
} catch {
|
|
240
|
-
t.DOMException = function(e, t) {
|
|
241
|
-
this.message = e, this.name = t, this.stack = Error(e).stack;
|
|
242
|
-
}, t.DOMException.prototype = Object.create(Error.prototype), t.DOMException.prototype.constructor = t.DOMException;
|
|
243
|
-
}
|
|
244
|
-
function T(e, i) {
|
|
245
|
-
return new Promise(function(a, o) {
|
|
246
|
-
var s = new b(e, i);
|
|
247
|
-
if (s.signal && s.signal.aborted) return o(new t.DOMException("Aborted", "AbortError"));
|
|
248
|
-
var l = new XMLHttpRequest();
|
|
249
|
-
function d() {
|
|
250
|
-
l.abort();
|
|
251
|
-
}
|
|
252
|
-
l.onload = function() {
|
|
253
|
-
var e = {
|
|
254
|
-
status: l.status,
|
|
255
|
-
statusText: l.statusText,
|
|
256
|
-
headers: S(l.getAllResponseHeaders() || "")
|
|
257
|
-
};
|
|
258
|
-
e.url = "responseURL" in l ? l.responseURL : e.headers.get("X-Request-URL");
|
|
259
|
-
var t = "response" in l ? l.response : l.responseText;
|
|
260
|
-
setTimeout(function() {
|
|
261
|
-
a(new C(t, e));
|
|
262
|
-
}, 0);
|
|
263
|
-
}, l.onerror = function() {
|
|
264
|
-
setTimeout(function() {
|
|
265
|
-
o(/* @__PURE__ */ TypeError("Network request failed"));
|
|
266
|
-
}, 0);
|
|
267
|
-
}, l.ontimeout = function() {
|
|
268
|
-
setTimeout(function() {
|
|
269
|
-
o(/* @__PURE__ */ TypeError("Network request failed"));
|
|
270
|
-
}, 0);
|
|
271
|
-
}, l.onabort = function() {
|
|
272
|
-
setTimeout(function() {
|
|
273
|
-
o(new t.DOMException("Aborted", "AbortError"));
|
|
274
|
-
}, 0);
|
|
275
|
-
};
|
|
276
|
-
function f(e) {
|
|
277
|
-
try {
|
|
278
|
-
return e === "" && n.location.href ? n.location.href : e;
|
|
279
|
-
} catch {
|
|
280
|
-
return e;
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
l.open(s.method, f(s.url), !0), s.credentials === "include" ? l.withCredentials = !0 : s.credentials === "omit" && (l.withCredentials = !1), "responseType" in l && (r.blob ? l.responseType = "blob" : r.arrayBuffer && s.headers.get("Content-Type") && s.headers.get("Content-Type").indexOf("application/octet-stream") !== -1 && (l.responseType = "arraybuffer")), i && typeof i.headers == "object" && !(i.headers instanceof u) ? Object.getOwnPropertyNames(i.headers).forEach(function(e) {
|
|
284
|
-
l.setRequestHeader(e, c(i.headers[e]));
|
|
285
|
-
}) : s.headers.forEach(function(e, t) {
|
|
286
|
-
l.setRequestHeader(t, e);
|
|
287
|
-
}), s.signal && (s.signal.addEventListener("abort", d), l.onreadystatechange = function() {
|
|
288
|
-
l.readyState === 4 && s.signal.removeEventListener("abort", d);
|
|
289
|
-
}), l.send(s._bodyInit === void 0 ? null : s._bodyInit);
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
return T.polyfill = !0, n.fetch || (n.fetch = T, n.Headers = u, n.Request = b, n.Response = C), t.Headers = u, t.Request = b, t.Response = C, t.fetch = T, t;
|
|
293
|
-
})({});
|
|
294
|
-
})(r), r.fetch.ponyfill = !0, delete r.fetch.polyfill;
|
|
295
|
-
var i = n.fetch ? n : r;
|
|
296
|
-
e = i.fetch, e.default = i.fetch, e.fetch = i.fetch, e.Headers = i.Headers, e.Request = i.Request, e.Response = i.Response, t.exports = e;
|
|
297
|
-
}));
|
|
298
|
-
//#endregion
|
|
299
|
-
export default t();
|
package/dist/button-DcCUEn2n.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { S as e, a as t, v as n } from "./vendor-preact-D6SntenC.js";
|
|
2
|
-
import { n as r, t as i } from "./loadingIcon-BN5YRQUb.js";
|
|
3
|
-
//#region src/shared/button/button.tsx
|
|
4
|
-
var a = 30, o = {
|
|
5
|
-
primary: "IncodeButtonPrimary",
|
|
6
|
-
secondary: "IncodeButtonSecondary",
|
|
7
|
-
link: "IncodeButtonLink"
|
|
8
|
-
}, s = {
|
|
9
|
-
L: "IncodeButtonL",
|
|
10
|
-
M: "IncodeButtonM",
|
|
11
|
-
S: "IncodeButtonS"
|
|
12
|
-
}, c = t((t, c) => {
|
|
13
|
-
let { isLoading: l = !1, variant: u = "primary", size: d = "L", icon: f, class: p, type: m = "button", children: h, disabled: g, ..._ } = t, v = !h && !!f, y = l && d === "L", b = () => y ? /* @__PURE__ */ n(i, { size: a }) : v ? f : f ? /* @__PURE__ */ n(e, { children: [h, f] }) : h;
|
|
14
|
-
return /* @__PURE__ */ n("button", {
|
|
15
|
-
ref: c,
|
|
16
|
-
..._,
|
|
17
|
-
class: r("IncodeButton", o[u], s[d], y ? "IncodeButtonLoading" : "", v ? "IncodeButtonIconOnly" : "", p),
|
|
18
|
-
disabled: g || y,
|
|
19
|
-
type: m,
|
|
20
|
-
children: b()
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
//#endregion
|
|
24
|
-
export { c as t };
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { a as e, p as t, v as n } from "./vendor-preact-D6SntenC.js";
|
|
2
|
-
import { n as r } from "./loadingIcon-BN5YRQUb.js";
|
|
3
|
-
import { d as i, g as a } from "./icons-Cc7zwchP.js";
|
|
4
|
-
//#region src/shared/checkbox/checkbox.tsx
|
|
5
|
-
var o = e(({ id: e, label: o, labelHint: s, size: c = "m", checked: l, defaultChecked: u, disabled: d = !1, required: f = !1, name: p, value: m, onChange: h, error: g, helper: _, showErrorIcon: v = !0, class: y, "aria-label": b, "aria-labelledby": x, "aria-describedby": S, "aria-invalid": C, ...w }, T) => {
|
|
6
|
-
let [E, D] = t(!!u), O = l !== void 0, k = O ? !!l : E, A = !!d, j = !!f, M = typeof y == "string" ? y : void 0, N = (e) => {
|
|
7
|
-
O || D(e.target.checked), h?.(e);
|
|
8
|
-
}, P = _ ? `${e}-helper` : void 0, F = g ? `${e}-error` : void 0, I = [
|
|
9
|
-
S,
|
|
10
|
-
F,
|
|
11
|
-
P
|
|
12
|
-
].filter(Boolean).join(" ") || void 0;
|
|
13
|
-
return /* @__PURE__ */ n("div", {
|
|
14
|
-
class: r("IncodeCheckbox", M),
|
|
15
|
-
children: [
|
|
16
|
-
/* @__PURE__ */ n("label", {
|
|
17
|
-
class: r("IncodeCheckboxLabel", { IncodeCheckboxLabelDisabled: A }),
|
|
18
|
-
htmlFor: e,
|
|
19
|
-
children: [/* @__PURE__ */ n("div", {
|
|
20
|
-
class: "relative inline-flex",
|
|
21
|
-
children: [/* @__PURE__ */ n("input", {
|
|
22
|
-
ref: T,
|
|
23
|
-
type: "checkbox",
|
|
24
|
-
class: "IncodeCheckboxInput",
|
|
25
|
-
id: e,
|
|
26
|
-
name: p,
|
|
27
|
-
value: m,
|
|
28
|
-
...O ? { checked: l } : { defaultChecked: u },
|
|
29
|
-
disabled: d,
|
|
30
|
-
required: f,
|
|
31
|
-
onChange: N,
|
|
32
|
-
"aria-label": b,
|
|
33
|
-
"aria-labelledby": x,
|
|
34
|
-
"aria-describedby": I,
|
|
35
|
-
"aria-invalid": C || !!g,
|
|
36
|
-
"aria-required": j,
|
|
37
|
-
...w
|
|
38
|
-
}), /* @__PURE__ */ n("div", {
|
|
39
|
-
class: r("IncodeCheckboxVisual", {
|
|
40
|
-
IncodeCheckboxVisualChecked: k,
|
|
41
|
-
IncodeCheckboxVisualDisabled: A,
|
|
42
|
-
IncodeCheckboxVisualError: !!g
|
|
43
|
-
}),
|
|
44
|
-
children: k && /* @__PURE__ */ n(i, { size: 28 })
|
|
45
|
-
})]
|
|
46
|
-
}), o && /* @__PURE__ */ n("span", {
|
|
47
|
-
class: r("IncodeCheckboxText", {
|
|
48
|
-
IncodeCheckboxTextS: c === "s",
|
|
49
|
-
IncodeCheckboxTextM: c === "m",
|
|
50
|
-
IncodeCheckboxTextDisabled: A
|
|
51
|
-
}),
|
|
52
|
-
"aria-hidden": x ? "true" : void 0,
|
|
53
|
-
children: [o, s && /* @__PURE__ */ n("span", {
|
|
54
|
-
class: "IncodeCheckboxLabelHint",
|
|
55
|
-
"data-testid": `${e}-label-hint`,
|
|
56
|
-
children: s
|
|
57
|
-
})]
|
|
58
|
-
})]
|
|
59
|
-
}),
|
|
60
|
-
g && /* @__PURE__ */ n("div", {
|
|
61
|
-
class: "IncodeCheckboxMessageWrapper",
|
|
62
|
-
"data-testid": `${e}-error-wrapper`,
|
|
63
|
-
children: [v && /* @__PURE__ */ n("div", {
|
|
64
|
-
class: "IncodeCheckboxIconWrapper",
|
|
65
|
-
children: /* @__PURE__ */ n(a, { size: 17 })
|
|
66
|
-
}), /* @__PURE__ */ n("p", {
|
|
67
|
-
id: F,
|
|
68
|
-
class: "IncodeCheckboxErrorText",
|
|
69
|
-
children: g
|
|
70
|
-
})]
|
|
71
|
-
}),
|
|
72
|
-
_ && !g && /* @__PURE__ */ n("div", {
|
|
73
|
-
class: "IncodeCheckboxMessageWrapper",
|
|
74
|
-
"data-testid": `${e}-helper-wrapper`,
|
|
75
|
-
children: /* @__PURE__ */ n("p", {
|
|
76
|
-
id: P,
|
|
77
|
-
class: "IncodeCheckboxHelperText",
|
|
78
|
-
children: _
|
|
79
|
-
})
|
|
80
|
-
})
|
|
81
|
-
]
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
//#endregion
|
|
85
|
-
export { o as t };
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./i18n-9s4OSqwi.js";
|
|
2
|
-
import { d as t, v as n } from "./vendor-preact-D6SntenC.js";
|
|
3
|
-
import { t as r } from "./dropdownComposed-DFRBG22E.js";
|
|
4
|
-
//#region src/shared/countrySelector/countrySelector.tsx
|
|
5
|
-
var i = [
|
|
6
|
-
"BR",
|
|
7
|
-
"CN",
|
|
8
|
-
"FR",
|
|
9
|
-
"DE",
|
|
10
|
-
"IL",
|
|
11
|
-
"IT",
|
|
12
|
-
"MX",
|
|
13
|
-
"ES",
|
|
14
|
-
"GB",
|
|
15
|
-
"US"
|
|
16
|
-
], a = [
|
|
17
|
-
"CM",
|
|
18
|
-
"KE",
|
|
19
|
-
"NG"
|
|
20
|
-
];
|
|
21
|
-
function o(e) {
|
|
22
|
-
return [...e.toUpperCase()].map((e) => String.fromCodePoint(127462 + e.charCodeAt(0) - 65)).join("");
|
|
23
|
-
}
|
|
24
|
-
function s() {
|
|
25
|
-
if (typeof window > "u") return !1;
|
|
26
|
-
let { hostname: e } = window.location;
|
|
27
|
-
return e === "localhost" || e.includes("stage") || e.includes("demo");
|
|
28
|
-
}
|
|
29
|
-
var c = ({ value: c, onChange: l, label: u, id: d = "country-selector", countryCodes: f = i, devOnlyCountryCodes: p = a, "data-testid": m }) => {
|
|
30
|
-
let { i18n: h } = e(), g = h.language || "en";
|
|
31
|
-
return /* @__PURE__ */ n("div", {
|
|
32
|
-
class: "IncodeCountrySelector",
|
|
33
|
-
children: /* @__PURE__ */ n(r, {
|
|
34
|
-
id: d,
|
|
35
|
-
label: u,
|
|
36
|
-
value: c,
|
|
37
|
-
options: t(() => {
|
|
38
|
-
let e = new Intl.DisplayNames([g, "en"], { type: "region" });
|
|
39
|
-
return (s() ? [...f, ...p] : [...f]).map((t) => {
|
|
40
|
-
let n = e.of(t) ?? t;
|
|
41
|
-
return {
|
|
42
|
-
value: t,
|
|
43
|
-
label: `${o(t)} ${n}`,
|
|
44
|
-
ariaLabel: n
|
|
45
|
-
};
|
|
46
|
-
}).sort((e, t) => e.label.localeCompare(t.label, g));
|
|
47
|
-
}, [
|
|
48
|
-
f,
|
|
49
|
-
p,
|
|
50
|
-
g
|
|
51
|
-
]),
|
|
52
|
-
onChange: l,
|
|
53
|
-
"data-testid": m
|
|
54
|
-
})
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
//#endregion
|
|
58
|
-
export { c as t };
|
package/dist/cpfOcr-D_tbwbvh.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { _ as e, p as t, v as n } from "./vendor-preact-D6SntenC.js";
|
|
2
|
-
import { o as r } from "./hooks-BVnGysT7.js";
|
|
3
|
-
import { r as i } from "./loadingIcon-BN5YRQUb.js";
|
|
4
|
-
import { t as a } from "./page-C1yT4DLb.js";
|
|
5
|
-
import { t as o } from "./spinner-CKnjVHxw.js";
|
|
6
|
-
import "./spinner-B4dcie2T.js";
|
|
7
|
-
import { t as s } from "./button-DcCUEn2n.js";
|
|
8
|
-
import { t as c } from "./verificationResult-BrVbUJ4U.js";
|
|
9
|
-
import { t as l } from "./inputComposed-APSw8C7o.js";
|
|
10
|
-
import { createCpfOcrManager as u } from "@incodetech/core/cpf-ocr";
|
|
11
|
-
//#region src/modules/cpf-ocr/cpfOcr.tsx
|
|
12
|
-
var d = (e) => e.status === "inputting" ? {
|
|
13
|
-
cpf: e.cpf,
|
|
14
|
-
isValid: e.isValid
|
|
15
|
-
} : {
|
|
16
|
-
cpf: "",
|
|
17
|
-
isValid: !1
|
|
18
|
-
}, f = ({ onFinish: f, onError: p }) => {
|
|
19
|
-
let [m, h] = r(() => u()), [g, _] = t(!1), [v, y] = t(!1), [b, x] = t(!1);
|
|
20
|
-
if (e(() => {
|
|
21
|
-
m.status === "finished" && f?.();
|
|
22
|
-
}, [m.status, f]), e(() => {
|
|
23
|
-
m.status === "error" && p?.(m.error);
|
|
24
|
-
}, [m, p]), m.status === "idle" || m.status === "loading" || m.status === "submitting") return /* @__PURE__ */ n(a, {
|
|
25
|
-
className: "IncodeCpfOcrPage",
|
|
26
|
-
children: /* @__PURE__ */ n("div", {
|
|
27
|
-
class: "IncodeCpfOcrLoading",
|
|
28
|
-
children: /* @__PURE__ */ n(o, { fullScreen: !1 })
|
|
29
|
-
})
|
|
30
|
-
});
|
|
31
|
-
if (m.status === "error") return /* @__PURE__ */ n(c, {
|
|
32
|
-
status: "failure",
|
|
33
|
-
failureTitle: "Não foi possível verificar o CPF",
|
|
34
|
-
onRetry: () => h.retry()
|
|
35
|
-
});
|
|
36
|
-
if (m.status === "finished") return null;
|
|
37
|
-
let S = d(m), C = S.cpf.replace(/\D/g, "").length === 11, w = v && !S.isValid && (C || g && !b) ? "Insira um CPF válido" : void 0;
|
|
38
|
-
return /* @__PURE__ */ n(a, {
|
|
39
|
-
className: "IncodeCpfOcrPage",
|
|
40
|
-
title: "Insira e verifique o número do seu CPF",
|
|
41
|
-
children: /* @__PURE__ */ n("div", {
|
|
42
|
-
class: "IncodeCpfOcr",
|
|
43
|
-
children: [
|
|
44
|
-
/* @__PURE__ */ n(i, { size: 32 }),
|
|
45
|
-
/* @__PURE__ */ n(l, {
|
|
46
|
-
id: "cpf-ocr-input",
|
|
47
|
-
label: "",
|
|
48
|
-
value: S.cpf,
|
|
49
|
-
placeholder: "Seu CPF",
|
|
50
|
-
maxLength: 14,
|
|
51
|
-
inputMode: "numeric",
|
|
52
|
-
"aria-label": "CPF",
|
|
53
|
-
onInput: (e) => {
|
|
54
|
-
y(!0), h.setCpf(e.target.value);
|
|
55
|
-
},
|
|
56
|
-
onFocus: () => {
|
|
57
|
-
x(!0);
|
|
58
|
-
},
|
|
59
|
-
onBlur: () => {
|
|
60
|
-
x(!1), _(!0);
|
|
61
|
-
},
|
|
62
|
-
error: w,
|
|
63
|
-
showErrorIcon: !0
|
|
64
|
-
}),
|
|
65
|
-
/* @__PURE__ */ n(i, {}),
|
|
66
|
-
/* @__PURE__ */ n(s, {
|
|
67
|
-
type: "button",
|
|
68
|
-
onClick: () => h.submit(),
|
|
69
|
-
disabled: !S.isValid,
|
|
70
|
-
"data-testid": "cpf-ocr-continue",
|
|
71
|
-
children: "Continuar"
|
|
72
|
-
})
|
|
73
|
-
]
|
|
74
|
-
})
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
|
-
//#endregion
|
|
78
|
-
export { f as CpfOcr };
|