@regulaforensics/idv-document 4.0.690-rc → 4.0.691-nightly
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +49 -10
- package/dist/main.iife.js +23 -23
- package/dist/main.js +164 -138
- package/package.json +6 -1
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
//#region ../../node_modules/@lit/reactive-element/css-tag.js
|
|
2
2
|
var e = globalThis, t = e.ShadowRoot && (e.ShadyCSS === void 0 || e.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, n = Symbol(), r = /* @__PURE__ */ new WeakMap(), i = class {
|
|
3
3
|
constructor(e, t, r) {
|
|
4
4
|
if (this._$cssResult$ = !0, r !== n) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
@@ -30,7 +30,8 @@ var e = globalThis, t = e.ShadowRoot && (e.ShadyCSS === void 0 || e.ShadyCSS.nat
|
|
|
30
30
|
for (let n of e.cssRules) t += n.cssText;
|
|
31
31
|
return a(t);
|
|
32
32
|
})(e) : e;
|
|
33
|
-
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/asyncToGenerator.js
|
|
34
35
|
function l(e, t, n, r, i, a, o) {
|
|
35
36
|
try {
|
|
36
37
|
var s = e[a](o), c = s.value;
|
|
@@ -55,7 +56,8 @@ function u(e) {
|
|
|
55
56
|
});
|
|
56
57
|
};
|
|
57
58
|
}
|
|
58
|
-
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region ../../node_modules/@lit/reactive-element/reactive-element.js
|
|
59
61
|
var d, f, { is: p, defineProperty: m, getOwnPropertyDescriptor: h, getOwnPropertyNames: g, getOwnPropertySymbols: _, getPrototypeOf: v } = Object, y = globalThis, b = y.trustedTypes, x = b ? b.emptyScript : "", S = y.reactiveElementPolyfillSupport, C = (e, t) => e, w = {
|
|
60
62
|
toAttribute(e, t) {
|
|
61
63
|
switch (t) {
|
|
@@ -309,7 +311,8 @@ var D = class extends HTMLElement {
|
|
|
309
311
|
firstUpdated(e) {}
|
|
310
312
|
};
|
|
311
313
|
D.elementStyles = [], D.shadowRootOptions = { mode: "open" }, D[C("elementProperties")] = /* @__PURE__ */ new Map(), D[C("finalized")] = /* @__PURE__ */ new Map(), S == null || S({ ReactiveElement: D }), ((f = y.reactiveElementVersions) == null ? y.reactiveElementVersions = [] : f).push("2.1.2");
|
|
312
|
-
|
|
314
|
+
//#endregion
|
|
315
|
+
//#region ../../node_modules/lit-html/lit-html.js
|
|
313
316
|
var O, k = globalThis, A = (e) => e, j = k.trustedTypes, M = j ? j.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, N = "$lit$", P = `lit$${Math.random().toFixed(9).slice(2)}$`, F = "?" + P, I = `<${F}>`, L = document, ee = () => L.createComment(""), te = (e) => e === null || typeof e != "object" && typeof e != "function", ne = Array.isArray, R = (e) => ne(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", re = "[ \n\f\r]", ie = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ae = /-->/g, oe = />/g, se = RegExp(`>|${re}(?:([^\\s"'>=/]+)(${re}*=${re}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), ce = /'/g, le = /"/g, ue = /^(?:script|style|textarea|title)$/i, de = ((e) => (t, ...n) => ({
|
|
314
317
|
_$litType$: e,
|
|
315
318
|
strings: t,
|
|
@@ -595,7 +598,8 @@ var Oe = (e, t, n) => {
|
|
|
595
598
|
Me._$litElement$ = !0, Me.finalized = !0, (ke = je.litElementHydrateSupport) == null || ke.call(je, { LitElement: Me });
|
|
596
599
|
var Ne = je.litElementPolyfillSupport;
|
|
597
600
|
Ne == null || Ne({ LitElement: Me }), ((Ae = je.litElementVersions) == null ? je.litElementVersions = [] : Ae).push("4.2.2");
|
|
598
|
-
|
|
601
|
+
//#endregion
|
|
602
|
+
//#region ../../node_modules/lit-html/directive.js
|
|
599
603
|
var Pe = (e) => (...t) => ({
|
|
600
604
|
_$litDirective$: e,
|
|
601
605
|
values: t
|
|
@@ -9765,7 +9769,7 @@ function Nb(...e) {
|
|
|
9765
9769
|
let { caseless: t, skipUndefined: n } = Mb(this) && this || {}, r = {}, i = (e, i) => {
|
|
9766
9770
|
if (i === "__proto__" || i === "constructor" || i === "prototype") return;
|
|
9767
9771
|
let a = t && Ab(r, i) || i, o = Gb(r, a) ? r[a] : void 0;
|
|
9768
|
-
ub(o) && ub(e) ? r[a] = Nb(o, e) : ub(e) ? r[a] = Nb({}, e) : eb(e) ? r[a] = e.slice() : n
|
|
9772
|
+
ub(o) && ub(e) ? r[a] = Nb(o, e) : ub(e) ? r[a] = Nb({}, e) : eb(e) ? r[a] = e.slice() : (!n || !tb(e)) && (r[a] = e);
|
|
9769
9773
|
};
|
|
9770
9774
|
for (let t = 0, n = e.length; t < n; t++) e[t] && kb(e[t], i);
|
|
9771
9775
|
return r;
|
|
@@ -9799,7 +9803,7 @@ var Pb = (e, t, n, { allOwnKeys: r } = {}) => (kb(t, (t, r) => {
|
|
|
9799
9803
|
let i, a, o, s = {};
|
|
9800
9804
|
if (t = t || {}, e == null) return t;
|
|
9801
9805
|
do {
|
|
9802
|
-
for (i = Object.getOwnPropertyNames(e), a = i.length; a-- > 0;) o = i[a], r
|
|
9806
|
+
for (i = Object.getOwnPropertyNames(e), a = i.length; a-- > 0;) o = i[a], (!r || r(o, e, t)) && !s[o] && (t[o] = e[o], s[o] = !0);
|
|
9803
9807
|
e = n !== !1 && Jy(e);
|
|
9804
9808
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
9805
9809
|
return t;
|
|
@@ -10390,7 +10394,7 @@ function Wx(e) {
|
|
|
10390
10394
|
let a = e[i++];
|
|
10391
10395
|
if (a === "__proto__") return !0;
|
|
10392
10396
|
let o = Number.isFinite(+a), s = i >= e.length;
|
|
10393
|
-
return a = !a && Q.isArray(r) ? r.length : a, s ? (Q.hasOwnProp(r, a) ? r[a] = Q.isArray(r[a]) ? r[a].concat(n) : [r[a], n] : r[a] = n, !o) : (r[a]
|
|
10397
|
+
return a = !a && Q.isArray(r) ? r.length : a, s ? (Q.hasOwnProp(r, a) ? r[a] = Q.isArray(r[a]) ? r[a].concat(n) : [r[a], n] : r[a] = n, !o) : ((!r[a] || !Q.isObject(r[a])) && (r[a] = []), t(e, n, r[a], i) && Q.isArray(r[a]) && (r[a] = Ux(r[a])), !o);
|
|
10394
10398
|
}
|
|
10395
10399
|
if (Q.isFormData(e) && Q.isFunction(e.entries)) {
|
|
10396
10400
|
let n = {};
|
|
@@ -19790,7 +19794,7 @@ var jL = (function(e) {
|
|
|
19790
19794
|
var t;
|
|
19791
19795
|
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
|
|
19792
19796
|
var n = this.closed;
|
|
19793
|
-
e.prototype.unsubscribe.call(this), n
|
|
19797
|
+
e.prototype.unsubscribe.call(this), !n && ((t = this.onFinalize) == null || t.call(this));
|
|
19794
19798
|
}
|
|
19795
19799
|
}, t;
|
|
19796
19800
|
})(hL), ML = rL(function(e) {
|
|
@@ -20319,7 +20323,7 @@ function LR(e, t) {
|
|
|
20319
20323
|
let n = Array.isArray(t.customProtocols) ? t.customProtocols : [], r = new Set(n.map((e) => OR(e)).filter(Boolean)), i = kR(e);
|
|
20320
20324
|
if (i && !r.has(i)) return e;
|
|
20321
20325
|
let a = e.startsWith("//");
|
|
20322
|
-
|
|
20326
|
+
(a || !/^\.*\//.test(e)) && !i && (e = e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//, t.defaultProtocol));
|
|
20323
20327
|
let o = new URL(e);
|
|
20324
20328
|
if (t.forceHttp && t.forceHttps) throw Error("The `forceHttp` and `forceHttps` options cannot be used together");
|
|
20325
20329
|
if (t.forceHttp && o.protocol === "https:" && (o.protocol = "http:"), t.forceHttps && o.protocol === "http:" && (o.protocol = "https:"), t.stripAuthentication && (o.username = "", o.password = ""), t.stripHash ? o.hash = "" : t.stripTextFragment && (o.hash = o.hash.replace(/#?:~:text.*?$/i, "")), o.pathname) {
|
|
@@ -20607,7 +20611,8 @@ function KR() {
|
|
|
20607
20611
|
]);
|
|
20608
20612
|
});
|
|
20609
20613
|
}
|
|
20610
|
-
|
|
20614
|
+
//#endregion
|
|
20615
|
+
//#region ../../node_modules/@lit/reactive-element/decorators/property.js
|
|
20611
20616
|
var qR = {
|
|
20612
20617
|
attribute: !0,
|
|
20613
20618
|
type: String,
|
|
@@ -20643,12 +20648,14 @@ function YR(e) {
|
|
|
20643
20648
|
return t.constructor.createProperty(n, e), r ? Object.getOwnPropertyDescriptor(t, n) : void 0;
|
|
20644
20649
|
})(e, t, n);
|
|
20645
20650
|
}
|
|
20646
|
-
|
|
20651
|
+
//#endregion
|
|
20652
|
+
//#region ../../node_modules/lit-html/directives/choose.js
|
|
20647
20653
|
var XR = (e, t, n) => {
|
|
20648
20654
|
for (let n of t) if (n[0] === e) return (0, n[1])();
|
|
20649
20655
|
return n == null ? void 0 : n();
|
|
20650
20656
|
};
|
|
20651
|
-
|
|
20657
|
+
//#endregion
|
|
20658
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/typeof.js
|
|
20652
20659
|
function ZR(e) {
|
|
20653
20660
|
"@babel/helpers - typeof";
|
|
20654
20661
|
return ZR = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
@@ -20657,7 +20664,8 @@ function ZR(e) {
|
|
|
20657
20664
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
20658
20665
|
}, ZR(e);
|
|
20659
20666
|
}
|
|
20660
|
-
|
|
20667
|
+
//#endregion
|
|
20668
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/toPrimitive.js
|
|
20661
20669
|
function QR(e, t) {
|
|
20662
20670
|
if (ZR(e) != "object" || !e) return e;
|
|
20663
20671
|
var n = e[Symbol.toPrimitive];
|
|
@@ -20668,12 +20676,14 @@ function QR(e, t) {
|
|
|
20668
20676
|
}
|
|
20669
20677
|
return (t === "string" ? String : Number)(e);
|
|
20670
20678
|
}
|
|
20671
|
-
|
|
20679
|
+
//#endregion
|
|
20680
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/toPropertyKey.js
|
|
20672
20681
|
function $R(e) {
|
|
20673
20682
|
var t = QR(e, "string");
|
|
20674
20683
|
return ZR(t) == "symbol" ? t : t + "";
|
|
20675
20684
|
}
|
|
20676
|
-
|
|
20685
|
+
//#endregion
|
|
20686
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/defineProperty.js
|
|
20677
20687
|
function ez(e, t, n) {
|
|
20678
20688
|
return (t = $R(t)) in e ? Object.defineProperty(e, t, {
|
|
20679
20689
|
value: n,
|
|
@@ -20682,7 +20692,8 @@ function ez(e, t, n) {
|
|
|
20682
20692
|
writable: !0
|
|
20683
20693
|
}) : e[t] = n, e;
|
|
20684
20694
|
}
|
|
20685
|
-
|
|
20695
|
+
//#endregion
|
|
20696
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/objectSpread2.js
|
|
20686
20697
|
function tz(e, t) {
|
|
20687
20698
|
var n = Object.keys(e);
|
|
20688
20699
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -20704,7 +20715,8 @@ function nz(e) {
|
|
|
20704
20715
|
}
|
|
20705
20716
|
return e;
|
|
20706
20717
|
}
|
|
20707
|
-
|
|
20718
|
+
//#endregion
|
|
20719
|
+
//#region ../interfaces-idv/src/index.ts
|
|
20708
20720
|
var rz = class e {
|
|
20709
20721
|
constructor({ errorCode: e, errorCodeKey: t, message: n, underlyingError: r, underlyingBaseError: i, domain: a, module: o, errorEnumName: s, shortDomainCode: c }) {
|
|
20710
20722
|
this.errorCode = e, this.errorCodeKey = t, this.message = n, this.underlyingError = r, this.underlyingBaseError = i, this.module = o, this.domain = a, this.errorEnumName = s, this.shortDomainCode = c;
|
|
@@ -20757,43 +20769,48 @@ function az(e) {
|
|
|
20757
20769
|
var oz = {
|
|
20758
20770
|
FORM: "form",
|
|
20759
20771
|
DATA: "data"
|
|
20760
|
-
}, sz =
|
|
20772
|
+
}, sz = (e) => {
|
|
20773
|
+
if (typeof e != "string") return !1;
|
|
20774
|
+
try {
|
|
20775
|
+
return new URL(e), !0;
|
|
20776
|
+
} catch (e) {
|
|
20777
|
+
return !1;
|
|
20778
|
+
}
|
|
20779
|
+
}, cz = ["ar", "he"], lz = (e) => {
|
|
20761
20780
|
var t;
|
|
20762
20781
|
let n = e ? (t = e.substring(0, 2)) == null ? void 0 : t.toLowerCase() : "";
|
|
20763
|
-
return
|
|
20764
|
-
},
|
|
20782
|
+
return cz.includes(n) ? "rtl" : "ltr";
|
|
20783
|
+
}, uz = (e, t) => e.base64 && !(t != null && t.base64.has(e.base64)) ? e.base64 : e.imageURL && !(t != null && t.imageURL.has(e.imageURL)) ? e.imageURL : "", dz = (e, t, n) => {
|
|
20765
20784
|
var r;
|
|
20766
20785
|
if (!t) return;
|
|
20767
20786
|
let i = (r = e == null ? void 0 : e.idvAsset) == null ? null : r;
|
|
20768
20787
|
for (; i;) {
|
|
20769
|
-
let e =
|
|
20788
|
+
let e = uz(i, n);
|
|
20770
20789
|
if (e) return e;
|
|
20771
20790
|
i = i.failurePolicy === "placeholderImage" && i.placeholderImage || null;
|
|
20772
20791
|
}
|
|
20773
|
-
},
|
|
20792
|
+
}, fz = {
|
|
20774
20793
|
DOC_READER: "DOC_READER",
|
|
20775
20794
|
DOC_READER_GALLERY: "DOC_READER_GALLERY"
|
|
20776
|
-
},
|
|
20795
|
+
}, pz = /* @__PURE__ */ function(e) {
|
|
20777
20796
|
return e[e.NO_INITIALIZED = 0] = "NO_INITIALIZED", e[e.UNKNOWN_STEP = 1] = "UNKNOWN_STEP", e[e.SCAN_ERROR = 2] = "SCAN_ERROR", e[e.RFID_ERROR = 3] = "RFID_ERROR", e[e.IMAGE_LOADING_FAILED = 4] = "IMAGE_LOADING_FAILED", e;
|
|
20778
|
-
}({}),
|
|
20797
|
+
}({}), mz = /* @__PURE__ */ function(e) {
|
|
20779
20798
|
return e[e.CONFIGURATION_FAILED = 0] = "CONFIGURATION_FAILED", e[e.INTERNAL_ERROR = 1] = "INTERNAL_ERROR", e[e.PRESENTER_UNAVAILABLE = 2] = "PRESENTER_UNAVAILABLE", e;
|
|
20780
|
-
}({}),
|
|
20799
|
+
}({}), hz = "idv-document", gz = {
|
|
20781
20800
|
0: ff.auto,
|
|
20782
20801
|
1: ff.captureVideo,
|
|
20783
20802
|
2: ff.captureFrame
|
|
20784
|
-
},
|
|
20803
|
+
}, _z = {
|
|
20785
20804
|
0: vf.line,
|
|
20786
20805
|
1: vf.corners
|
|
20787
|
-
},
|
|
20806
|
+
}, vz = {
|
|
20788
20807
|
0: !0,
|
|
20789
20808
|
1: !0,
|
|
20790
20809
|
2: !1,
|
|
20791
20810
|
3: !0
|
|
20792
|
-
},
|
|
20793
|
-
return e.BarcodeMRZ = "BarcodeMRZ", e.BoundsLite = "BoundsLite", e;
|
|
20794
|
-
}({}), Sz, Cz, wz = class e extends rz {
|
|
20811
|
+
}, yz = 1920, bz = 4e6, xz = 5e7, Sz, Cz, wz = class e extends rz {
|
|
20795
20812
|
constructor({ errorCode: t, message: n, underlyingError: r, underlyingBaseError: i }) {
|
|
20796
|
-
let a = rz.getErrorKey(t,
|
|
20813
|
+
let a = rz.getErrorKey(t, pz);
|
|
20797
20814
|
super({
|
|
20798
20815
|
errorCode: t,
|
|
20799
20816
|
errorCodeKey: a,
|
|
@@ -20807,10 +20824,10 @@ var oz = {
|
|
|
20807
20824
|
});
|
|
20808
20825
|
}
|
|
20809
20826
|
};
|
|
20810
|
-
Sz = wz, Sz.MODULE =
|
|
20827
|
+
Sz = wz, Sz.MODULE = hz, Sz.ERROR_ENUM_NAME = "ReaderModuleError", Sz.SHORT_CODE = "RM";
|
|
20811
20828
|
var Tz = class e extends rz {
|
|
20812
20829
|
constructor({ errorCode: t, message: n, underlyingError: r, underlyingBaseError: i }) {
|
|
20813
|
-
let a = rz.getErrorKey(t,
|
|
20830
|
+
let a = rz.getErrorKey(t, mz);
|
|
20814
20831
|
super({
|
|
20815
20832
|
errorCode: t,
|
|
20816
20833
|
errorCodeKey: a,
|
|
@@ -20824,23 +20841,27 @@ var Tz = class e extends rz {
|
|
|
20824
20841
|
});
|
|
20825
20842
|
}
|
|
20826
20843
|
};
|
|
20827
|
-
Cz = Tz, Cz.MODULE =
|
|
20828
|
-
|
|
20844
|
+
Cz = Tz, Cz.MODULE = hz, Cz.ERROR_ENUM_NAME = "ScanError", Cz.SHORT_CODE = "RMS";
|
|
20845
|
+
//#endregion
|
|
20846
|
+
//#region ../../node_modules/@lit/reactive-element/decorators/custom-element.js
|
|
20829
20847
|
var Ez = (e) => (t, n) => {
|
|
20830
20848
|
n === void 0 ? customElements.define(e, t) : n.addInitializer(() => {
|
|
20831
20849
|
customElements.define(e, t);
|
|
20832
20850
|
});
|
|
20833
20851
|
};
|
|
20834
|
-
|
|
20852
|
+
//#endregion
|
|
20853
|
+
//#region ../../node_modules/@lit/reactive-element/decorators/state.js
|
|
20835
20854
|
function Dz(e) {
|
|
20836
20855
|
return YR(nz(nz({}, e), {}, {
|
|
20837
20856
|
state: !0,
|
|
20838
20857
|
attribute: !1
|
|
20839
20858
|
}));
|
|
20840
20859
|
}
|
|
20841
|
-
|
|
20860
|
+
//#endregion
|
|
20861
|
+
//#region ../../node_modules/@lit/reactive-element/decorators/base.js
|
|
20842
20862
|
var Oz = (e, t, n) => (n.configurable = !0, n.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, n), n);
|
|
20843
|
-
|
|
20863
|
+
//#endregion
|
|
20864
|
+
//#region ../../node_modules/@lit/reactive-element/decorators/query.js
|
|
20844
20865
|
function kz(e, t) {
|
|
20845
20866
|
return (n, r, i) => {
|
|
20846
20867
|
let a = (t) => {
|
|
@@ -20869,7 +20890,8 @@ function kz(e, t) {
|
|
|
20869
20890
|
} });
|
|
20870
20891
|
};
|
|
20871
20892
|
}
|
|
20872
|
-
|
|
20893
|
+
//#endregion
|
|
20894
|
+
//#region src/utils/index.ts
|
|
20873
20895
|
function Az(e) {
|
|
20874
20896
|
return jz.apply(this, arguments);
|
|
20875
20897
|
}
|
|
@@ -20897,14 +20919,8 @@ function Nz() {
|
|
|
20897
20919
|
throw r;
|
|
20898
20920
|
}), Nz.apply(this, arguments);
|
|
20899
20921
|
}
|
|
20900
|
-
var Pz = (e) => e ? (e.internalScenario && (e.scenario = e.internalScenario), delete e.internalScenario, e) : {}
|
|
20901
|
-
|
|
20902
|
-
return new URL(e), !0;
|
|
20903
|
-
} catch (e) {
|
|
20904
|
-
return !1;
|
|
20905
|
-
}
|
|
20906
|
-
};
|
|
20907
|
-
function Iz(e, t, n, r, i) {
|
|
20922
|
+
var Pz = (e) => e ? (e.internalScenario && (e.scenario = e.internalScenario), delete e.internalScenario, e) : {};
|
|
20923
|
+
function Fz(e, t, n, r, i) {
|
|
20908
20924
|
let a = e * t, o = a > i;
|
|
20909
20925
|
return {
|
|
20910
20926
|
width: e,
|
|
@@ -20913,16 +20929,16 @@ function Iz(e, t, n, r, i) {
|
|
|
20913
20929
|
isDownscaleNeeded: (e > n || t > n || a > r) && !o
|
|
20914
20930
|
};
|
|
20915
20931
|
}
|
|
20916
|
-
var
|
|
20932
|
+
var Iz = function() {
|
|
20917
20933
|
var e = u(function* (e, t, n, r) {
|
|
20918
20934
|
let i = yield createImageBitmap(e), { width: a, height: o } = i;
|
|
20919
|
-
return i == null || i.close(),
|
|
20935
|
+
return i == null || i.close(), Fz(a, o, t, n, r);
|
|
20920
20936
|
});
|
|
20921
20937
|
return function(t, n, r, i) {
|
|
20922
20938
|
return e.apply(this, arguments);
|
|
20923
20939
|
};
|
|
20924
20940
|
}();
|
|
20925
|
-
function
|
|
20941
|
+
function Lz({ width: e, height: t, softSideLimit: n, softPixelLimit: r }) {
|
|
20926
20942
|
if (!(e > 0 && t > 0)) return {
|
|
20927
20943
|
width: 1,
|
|
20928
20944
|
height: 1
|
|
@@ -20933,11 +20949,11 @@ function Rz({ width: e, height: t, softSideLimit: n, softPixelLimit: r }) {
|
|
|
20933
20949
|
height: Math.max(1, Math.floor(t * c))
|
|
20934
20950
|
};
|
|
20935
20951
|
}
|
|
20936
|
-
function
|
|
20937
|
-
return
|
|
20952
|
+
function Rz(e, t, n) {
|
|
20953
|
+
return zz.apply(this, arguments);
|
|
20938
20954
|
}
|
|
20939
|
-
function
|
|
20940
|
-
return
|
|
20955
|
+
function zz() {
|
|
20956
|
+
return zz = u(function* (e, t, n) {
|
|
20941
20957
|
return new Promise((r) => {
|
|
20942
20958
|
if (!e || !e.size) return r({ ok: !1 });
|
|
20943
20959
|
let i = document.createElement("canvas"), a = i.getContext("2d"), o = URL.createObjectURL(e), s = new Image(), c = (e) => {
|
|
@@ -20950,7 +20966,7 @@ function Bz() {
|
|
|
20950
20966
|
s.onload = null, s.onerror = null, s.src = "", r(e);
|
|
20951
20967
|
};
|
|
20952
20968
|
s.onload = function() {
|
|
20953
|
-
let e =
|
|
20969
|
+
let e = Lz({
|
|
20954
20970
|
width: s.width,
|
|
20955
20971
|
height: s.height,
|
|
20956
20972
|
softSideLimit: t,
|
|
@@ -20969,14 +20985,14 @@ function Bz() {
|
|
|
20969
20985
|
return c({ ok: !1 });
|
|
20970
20986
|
}, s.onerror = () => c({ ok: !1 }), s.src = o;
|
|
20971
20987
|
});
|
|
20972
|
-
}),
|
|
20988
|
+
}), zz.apply(this, arguments);
|
|
20973
20989
|
}
|
|
20974
|
-
var
|
|
20990
|
+
var Bz = (e) => {
|
|
20975
20991
|
let { translationKeysData: t, translationKeysProps: n, locale: r } = e, i = {}, a = null;
|
|
20976
20992
|
for (let e in t) i[t[e].key] = e;
|
|
20977
20993
|
for (let e in n) i[e] && n[e] && (a ? a[i[e]] = n[e] : a = { [i[e]]: n[e] });
|
|
20978
20994
|
return a ? { [r]: a } : {};
|
|
20979
|
-
},
|
|
20995
|
+
}, Vz = {
|
|
20980
20996
|
preparingCamera: {
|
|
20981
20997
|
fallback: "Preparing the camera...",
|
|
20982
20998
|
key: "strPrepareCamera"
|
|
@@ -21161,7 +21177,7 @@ var Vz = (e) => {
|
|
|
21161
21177
|
fallback: "Tilt the document",
|
|
21162
21178
|
key: "strTiltDocument"
|
|
21163
21179
|
}
|
|
21164
|
-
},
|
|
21180
|
+
}, Hz = o`
|
|
21165
21181
|
*,
|
|
21166
21182
|
::after,
|
|
21167
21183
|
::before {
|
|
@@ -21187,19 +21203,22 @@ var Vz = (e) => {
|
|
|
21187
21203
|
height: 100%;
|
|
21188
21204
|
}
|
|
21189
21205
|
`;
|
|
21190
|
-
|
|
21191
|
-
|
|
21206
|
+
//#endregion
|
|
21207
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/decorateMetadata.js
|
|
21208
|
+
function Uz(e, t) {
|
|
21192
21209
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
|
|
21193
21210
|
}
|
|
21194
|
-
|
|
21195
|
-
|
|
21211
|
+
//#endregion
|
|
21212
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/decorate.js
|
|
21213
|
+
function Wz(e, t, n, r) {
|
|
21196
21214
|
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
21197
21215
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
|
|
21198
21216
|
else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
|
|
21199
21217
|
return i > 3 && a && Object.defineProperty(t, n, a), a;
|
|
21200
21218
|
}
|
|
21201
|
-
|
|
21202
|
-
|
|
21219
|
+
//#endregion
|
|
21220
|
+
//#region src/web-components/document-idv/components/document-reader-camera/index.ts
|
|
21221
|
+
var Gz = class extends Me {
|
|
21203
21222
|
constructor(...e) {
|
|
21204
21223
|
super(...e), this._performType = oz.DATA, this.props = null, this._handleDocumentReader = (e) => {
|
|
21205
21224
|
var t, n, r, i;
|
|
@@ -21217,7 +21236,10 @@ var Kz = class extends Me {
|
|
|
21217
21236
|
}
|
|
21218
21237
|
let t = (o = e.detail.data) == null ? void 0 : o.status, n = t === rp.OK, r = t === rp.TIMEOUT;
|
|
21219
21238
|
if (!(n || r) || !((s = e.detail.data) != null && s.response)) return;
|
|
21220
|
-
(c = this.props) != null && c.isProcessing
|
|
21239
|
+
if ((c = this.props) != null && c.isProcessing) {
|
|
21240
|
+
var d, f;
|
|
21241
|
+
(d = this.props) == null || (f = d.idvEventListener) == null || f.call(d, "IDV-DOCUMENT", "Success. Start to finalize package", "DEBUG"), this.props.isProcessing(!0);
|
|
21242
|
+
}
|
|
21221
21243
|
let i = (l = this.props) == null || (l = l.moduleProps) == null ? void 0 : l.finalizePackageSettings;
|
|
21222
21244
|
Mz(() => window.RegulaDocumentSDK.finalizePackage(), i == null ? void 0 : i.retryCount, i == null ? void 0 : i.retryDelay).then((e) => {
|
|
21223
21245
|
var t;
|
|
@@ -21239,8 +21261,8 @@ var Kz = class extends Me {
|
|
|
21239
21261
|
});
|
|
21240
21262
|
}
|
|
21241
21263
|
if (((i = e.detail) == null ? void 0 : i.action) === W.CLOSE || e.detail.action === W.CAMERA_PROCESS_CLOSED) {
|
|
21242
|
-
var
|
|
21243
|
-
(
|
|
21264
|
+
var p;
|
|
21265
|
+
(p = this.props) == null || p.perform({
|
|
21244
21266
|
transactionId: "",
|
|
21245
21267
|
cancel: !0,
|
|
21246
21268
|
has_nfc: !1,
|
|
@@ -21308,7 +21330,7 @@ var Kz = class extends Me {
|
|
|
21308
21330
|
background-color: ${a(e.cameraPreviewBackgroundColor)};
|
|
21309
21331
|
}
|
|
21310
21332
|
`), e != null && e.containerCloseButtonImage) {
|
|
21311
|
-
let i =
|
|
21333
|
+
let i = dz(e.containerCloseButtonImage, t, n);
|
|
21312
21334
|
i && r.push(o`
|
|
21313
21335
|
document-reader::part(container-close-button)::before {
|
|
21314
21336
|
background-image: url(${a(i)});
|
|
@@ -21316,7 +21338,7 @@ var Kz = class extends Me {
|
|
|
21316
21338
|
`);
|
|
21317
21339
|
}
|
|
21318
21340
|
if (e != null && e.menuFromCameraButtonImage) {
|
|
21319
|
-
let i =
|
|
21341
|
+
let i = dz(e.menuFromCameraButtonImage, t, n);
|
|
21320
21342
|
i && r.push(o`
|
|
21321
21343
|
document-reader::part(menu-from-camera-button)::before {
|
|
21322
21344
|
background-image: url(${a(i)});
|
|
@@ -21324,7 +21346,7 @@ var Kz = class extends Me {
|
|
|
21324
21346
|
`);
|
|
21325
21347
|
}
|
|
21326
21348
|
if (e != null && e.menuFromGalleryButtonImage) {
|
|
21327
|
-
let i =
|
|
21349
|
+
let i = dz(e.menuFromGalleryButtonImage, t, n);
|
|
21328
21350
|
i && r.push(o`
|
|
21329
21351
|
document-reader::part(menu-from-gallery-button)::before {
|
|
21330
21352
|
background-image: url(${a(i)});
|
|
@@ -21332,7 +21354,7 @@ var Kz = class extends Me {
|
|
|
21332
21354
|
`);
|
|
21333
21355
|
}
|
|
21334
21356
|
if (e != null && e.menuFromMobileButtonImage) {
|
|
21335
|
-
let i =
|
|
21357
|
+
let i = dz(e.menuFromMobileButtonImage, t, n);
|
|
21336
21358
|
i && r.push(o`
|
|
21337
21359
|
document-reader::part(menu-from-mobile-button)::before {
|
|
21338
21360
|
background-image: url(${a(i)});
|
|
@@ -21340,7 +21362,7 @@ var Kz = class extends Me {
|
|
|
21340
21362
|
`);
|
|
21341
21363
|
}
|
|
21342
21364
|
if (e != null && e.closeButton) {
|
|
21343
|
-
let i =
|
|
21365
|
+
let i = dz(e.closeButton, t, n);
|
|
21344
21366
|
i && r.push(o`
|
|
21345
21367
|
document-reader::part(controls-process-close-button)::before {
|
|
21346
21368
|
background-image: url(${a(i)});
|
|
@@ -21348,7 +21370,7 @@ var Kz = class extends Me {
|
|
|
21348
21370
|
`);
|
|
21349
21371
|
}
|
|
21350
21372
|
if (e != null && e.switchButton) {
|
|
21351
|
-
let i =
|
|
21373
|
+
let i = dz(e.switchButton, t, n);
|
|
21352
21374
|
i && r.push(o`
|
|
21353
21375
|
document-reader::part(controls-change-camera-button)::before {
|
|
21354
21376
|
background-image: url(${a(i)});
|
|
@@ -21356,7 +21378,7 @@ var Kz = class extends Me {
|
|
|
21356
21378
|
`);
|
|
21357
21379
|
}
|
|
21358
21380
|
if (e != null && e.infoTryAgainButtonImage) {
|
|
21359
|
-
let i =
|
|
21381
|
+
let i = dz(e.infoTryAgainButtonImage, t, n);
|
|
21360
21382
|
i && r.push(o`
|
|
21361
21383
|
document-reader::part(info-try-again-button)::before {
|
|
21362
21384
|
background-image: url(${a(i)});
|
|
@@ -21367,8 +21389,8 @@ var Kz = class extends Me {
|
|
|
21367
21389
|
}
|
|
21368
21390
|
_prepareTranslations(e) {
|
|
21369
21391
|
let { locale: t, localizationKeys: n } = e, r = t && typeof t == "string" ? t.slice(0, 2).toLowerCase() : "";
|
|
21370
|
-
return !r || !n ? null :
|
|
21371
|
-
translationKeysData:
|
|
21392
|
+
return !r || !n ? null : Bz({
|
|
21393
|
+
translationKeysData: Vz,
|
|
21372
21394
|
translationKeysProps: n,
|
|
21373
21395
|
locale: r
|
|
21374
21396
|
});
|
|
@@ -21415,7 +21437,7 @@ var Kz = class extends Me {
|
|
|
21415
21437
|
uploadFileButton: t == null ? void 0 : t.uploadFileButton,
|
|
21416
21438
|
mirrorButton: t == null ? void 0 : t.mirrorButton,
|
|
21417
21439
|
nonce: (i = this.props) == null ? void 0 : i.nonce
|
|
21418
|
-
}), u = nz(nz(nz(nz(nz({}, !!r && typeof r == "string" && { locale: r.slice(0, 2).toLowerCase() }), typeof (n == null ? void 0 : n.captureMode) == "number" && n.captureMode in
|
|
21440
|
+
}), u = nz(nz(nz(nz(nz({}, !!r && typeof r == "string" && { locale: r.slice(0, 2).toLowerCase() }), typeof (n == null ? void 0 : n.captureMode) == "number" && n.captureMode in gz && { captureMode: gz[n.captureMode] }), typeof (t == null ? void 0 : t.cameraFrameShapeType) == "number" && t.cameraFrameShapeType in _z && { cameraFrameShapeType: _z[t.cameraFrameShapeType] }), (typeof (n == null || (a = n.videoOutputSettings) == null ? void 0 : a.AVVideoWidthKey) == "number" || typeof (n == null || (o = n.videoOutputSettings) == null ? void 0 : o.AVVideoHeightKey) == "number") && { resolution: nz(nz({}, typeof (n == null || (s = n.videoOutputSettings) == null ? void 0 : s.AVVideoWidthKey) == "number" && { width: n.videoOutputSettings.AVVideoWidthKey }), typeof (n == null || (c = n.videoOutputSettings) == null ? void 0 : c.AVVideoHeightKey) == "number" && { height: n.videoOutputSettings.AVVideoHeightKey }) }), typeof (n == null ? void 0 : n.cameraFrame) == "number" && n.cameraFrame in vz && { cameraFrame: vz[n.cameraFrame] });
|
|
21419
21441
|
return nz(nz({}, l), u);
|
|
21420
21442
|
}
|
|
21421
21443
|
_setDocReaderProps() {
|
|
@@ -21423,12 +21445,12 @@ var Kz = class extends Me {
|
|
|
21423
21445
|
if (!this.props || !this._component) return;
|
|
21424
21446
|
(e = (t = this.props).isProcessing) == null || e.call(t, !0);
|
|
21425
21447
|
let { processParam: r, functionality: i, customization: a, sessionId: o, copyright: c, serviceToken: l, locale: u, preloadAssetsRequired: d, failedAssets: f } = this.props.moduleProps, p = Pz(r), m = p == null || (n = p.backendProcessing) == null ? void 0 : n.serviceURL;
|
|
21426
|
-
if (!m || !
|
|
21448
|
+
if (!m || !sz(m)) {
|
|
21427
21449
|
let e = new Tz({
|
|
21428
|
-
errorCode:
|
|
21450
|
+
errorCode: mz.CONFIGURATION_FAILED,
|
|
21429
21451
|
message: "serviceURL is not defined or is invalid."
|
|
21430
21452
|
}), t = new wz({
|
|
21431
|
-
errorCode:
|
|
21453
|
+
errorCode: pz.SCAN_ERROR,
|
|
21432
21454
|
underlyingBaseError: e
|
|
21433
21455
|
});
|
|
21434
21456
|
this.props.perform(t);
|
|
@@ -21455,10 +21477,11 @@ var Kz = class extends Me {
|
|
|
21455
21477
|
@document-reader=${this._handleDocumentReader}
|
|
21456
21478
|
></document-reader>`;
|
|
21457
21479
|
}
|
|
21458
|
-
},
|
|
21459
|
-
|
|
21460
|
-
|
|
21461
|
-
|
|
21480
|
+
}, Kz = (Gz.styles = [Hz], Gz);
|
|
21481
|
+
Wz([Dz(), Uz("design:type", Object)], Kz.prototype, "props", void 0), Wz([kz("document-reader"), Uz("design:type", wI === void 0 ? Object : wI)], Kz.prototype, "_component", void 0), Kz = Wz([Ez("document-reader-camera")], Kz);
|
|
21482
|
+
//#endregion
|
|
21483
|
+
//#region ../../node_modules/lit-html/directives/if-defined.js
|
|
21484
|
+
var qz = (e) => e == null ? z : e, Jz = o`
|
|
21462
21485
|
.gallery-root {
|
|
21463
21486
|
display: flex;
|
|
21464
21487
|
width: 100%;
|
|
@@ -21519,7 +21542,7 @@ var Jz = (e) => e == null ? z : e, Yz = o`
|
|
|
21519
21542
|
align-items: center;
|
|
21520
21543
|
justify-content: center;
|
|
21521
21544
|
}
|
|
21522
|
-
`,
|
|
21545
|
+
`, Yz = de`<svg
|
|
21523
21546
|
xmlns="http://www.w3.org/2000/svg"
|
|
21524
21547
|
viewBox="0 0 24 24"
|
|
21525
21548
|
width="24"
|
|
@@ -21527,7 +21550,7 @@ var Jz = (e) => e == null ? z : e, Yz = o`
|
|
|
21527
21550
|
fill="rgba(0,0,0,0.6)"
|
|
21528
21551
|
>
|
|
21529
21552
|
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" />
|
|
21530
|
-
</svg>`,
|
|
21553
|
+
</svg>`, Xz = de` <svg
|
|
21531
21554
|
width="40"
|
|
21532
21555
|
height="40"
|
|
21533
21556
|
viewBox="0 0 23 22"
|
|
@@ -21558,7 +21581,7 @@ var Jz = (e) => e == null ? z : e, Yz = o`
|
|
|
21558
21581
|
<rect width="22" height="22" fill="white" transform="translate(0.5 1.90735e-05)" />
|
|
21559
21582
|
</clipPath>
|
|
21560
21583
|
</defs>
|
|
21561
|
-
</svg>`,
|
|
21584
|
+
</svg>`, Zz = de`<svg
|
|
21562
21585
|
width="113"
|
|
21563
21586
|
height="16"
|
|
21564
21587
|
viewBox="0 0 113 16"
|
|
@@ -21590,7 +21613,7 @@ var Jz = (e) => e == null ? z : e, Yz = o`
|
|
|
21590
21613
|
d="M93.1547 5.85404C92.7965 5.24412 91.9727 4.77991 90.8981 4.77991C89.0174 4.77991 87.459 6.35794 87.459 8.38431C87.459 10.3925 89.0174 11.9336 90.8981 11.9336C91.9191 11.9336 92.5637 11.6287 93.0651 10.9996V11.6455C93.0651 13.0442 92.08 13.5462 91.1308 13.5462C90.1816 13.5462 89.4292 13.0792 89.286 12.0578H87.7099C87.7818 13.8512 89.2142 15 91.1308 15C93.0474 15 94.6758 13.9063 94.6758 11.539V4.83175H93.1547V5.85404ZM91.0772 10.3911C89.9307 10.3911 89.1069 9.54811 89.1069 8.38291C89.1069 7.21772 89.9307 6.32058 91.0772 6.32058C92.2237 6.32058 93.0651 7.21725 93.0651 8.38291C93.0651 9.54858 92.2232 10.3911 91.0772 10.3911Z"
|
|
21591
21614
|
fill="#BD7DFF"
|
|
21592
21615
|
/>
|
|
21593
|
-
</svg>`,
|
|
21616
|
+
</svg>`, Qz = class extends Me {
|
|
21594
21617
|
constructor(...e) {
|
|
21595
21618
|
var t;
|
|
21596
21619
|
super(...e), t = this, this._performType = oz.DATA, this.props = null, this._handleInputChange = function() {
|
|
@@ -21599,11 +21622,12 @@ var Jz = (e) => e == null ? z : e, Yz = o`
|
|
|
21599
21622
|
let a = [...(n = e.target.files) == null ? [] : n];
|
|
21600
21623
|
if (!a.length) return;
|
|
21601
21624
|
(r = t.props) != null && r.isProcessing && t.props.isProcessing(!0), yield window.RegulaDocumentSDK.createBackendTransaction({}, window.RegulaDocumentSDK.recognizerProcessParam);
|
|
21625
|
+
let o = [];
|
|
21602
21626
|
for (let e of a) {
|
|
21603
|
-
let { isExtraLargeResolution: n, isDownscaleNeeded: r } = yield
|
|
21627
|
+
let { isExtraLargeResolution: n, isDownscaleNeeded: r } = yield Iz(e, yz, bz, xz), i = e.type.startsWith("image/webp");
|
|
21604
21628
|
if (n) {
|
|
21605
|
-
var
|
|
21606
|
-
(
|
|
21629
|
+
var s;
|
|
21630
|
+
(s = t.props) == null || s.perform({
|
|
21607
21631
|
transactionId: "",
|
|
21608
21632
|
cancel: !1,
|
|
21609
21633
|
has_nfc: !1,
|
|
@@ -21611,49 +21635,49 @@ var Jz = (e) => e == null ? z : e, Yz = o`
|
|
|
21611
21635
|
}, t._performType);
|
|
21612
21636
|
return;
|
|
21613
21637
|
}
|
|
21614
|
-
let a;
|
|
21615
21638
|
if (r || i) {
|
|
21616
|
-
let n = yield
|
|
21639
|
+
let n = yield Rz(e, yz, bz);
|
|
21617
21640
|
if (!n.ok) {
|
|
21618
|
-
var
|
|
21641
|
+
var c;
|
|
21619
21642
|
let e = {
|
|
21620
21643
|
transactionId: "",
|
|
21621
21644
|
cancel: !1,
|
|
21622
21645
|
has_nfc: !1,
|
|
21623
21646
|
errorCode: r ? "IMAGE_DOWNSCALING_ERROR" : "IMAGE_PROCESSING_ERROR"
|
|
21624
21647
|
};
|
|
21625
|
-
(
|
|
21648
|
+
(c = t.props) == null || c.perform(e, t._performType);
|
|
21626
21649
|
return;
|
|
21627
21650
|
}
|
|
21628
|
-
|
|
21629
|
-
} else
|
|
21630
|
-
|
|
21631
|
-
|
|
21632
|
-
|
|
21633
|
-
|
|
21634
|
-
|
|
21635
|
-
|
|
21636
|
-
|
|
21637
|
-
|
|
21638
|
-
|
|
21639
|
-
|
|
21640
|
-
}
|
|
21651
|
+
o.push(n.imageData);
|
|
21652
|
+
} else o.push(yield e.arrayBuffer());
|
|
21653
|
+
}
|
|
21654
|
+
try {
|
|
21655
|
+
yield window.RegulaDocumentSDK.processImage(o);
|
|
21656
|
+
} catch (e) {
|
|
21657
|
+
var l;
|
|
21658
|
+
(l = t.props) == null || l.perform({
|
|
21659
|
+
transactionId: "",
|
|
21660
|
+
cancel: !1,
|
|
21661
|
+
has_nfc: !1,
|
|
21662
|
+
errorCode: "IMAGE_PROCESSING_ERROR"
|
|
21663
|
+
}, t._performType);
|
|
21664
|
+
return;
|
|
21641
21665
|
}
|
|
21642
|
-
let
|
|
21666
|
+
let d = (i = t.props) == null || (i = i.moduleProps) == null ? void 0 : i.finalizePackageSettings;
|
|
21643
21667
|
try {
|
|
21644
|
-
var
|
|
21668
|
+
var f;
|
|
21645
21669
|
let e = yield Mz(u(function* () {
|
|
21646
21670
|
return window.RegulaDocumentSDK.finalizePackage();
|
|
21647
|
-
}),
|
|
21671
|
+
}), d == null ? void 0 : d.retryCount, d == null ? void 0 : d.retryDelay), n = {
|
|
21648
21672
|
transactionId: e == null ? void 0 : e.transactionId,
|
|
21649
21673
|
cancel: !1,
|
|
21650
21674
|
has_nfc: !1,
|
|
21651
21675
|
errorCode: ""
|
|
21652
21676
|
};
|
|
21653
|
-
(
|
|
21677
|
+
(f = t.props) == null || f.perform(n, t._performType);
|
|
21654
21678
|
} catch (e) {
|
|
21655
|
-
var
|
|
21656
|
-
console.log("finalizePackage error: ", e), (
|
|
21679
|
+
var p;
|
|
21680
|
+
console.log("finalizePackage error: ", e), (p = t.props) == null || p.perform({
|
|
21657
21681
|
transactionId: "",
|
|
21658
21682
|
cancel: !0,
|
|
21659
21683
|
has_nfc: !1,
|
|
@@ -21684,12 +21708,12 @@ var Jz = (e) => e == null ? z : e, Yz = o`
|
|
|
21684
21708
|
let { processParam: t, sessionId: n, serviceToken: r, selectionLimit: i } = this.props.moduleProps;
|
|
21685
21709
|
this._input.multiple = typeof i == "number" && (i === 0 || i > 1);
|
|
21686
21710
|
let a = Pz(t), o = a == null || (e = a.backendProcessing) == null ? void 0 : e.serviceURL;
|
|
21687
|
-
if (!o || !
|
|
21711
|
+
if (!o || !sz(o)) {
|
|
21688
21712
|
let e = new Tz({
|
|
21689
|
-
errorCode:
|
|
21713
|
+
errorCode: mz.CONFIGURATION_FAILED,
|
|
21690
21714
|
message: "serviceURL is not defined or is invalid."
|
|
21691
21715
|
}), t = new wz({
|
|
21692
|
-
errorCode:
|
|
21716
|
+
errorCode: pz.SCAN_ERROR,
|
|
21693
21717
|
underlyingBaseError: e
|
|
21694
21718
|
});
|
|
21695
21719
|
this.props.perform(t);
|
|
@@ -21707,14 +21731,14 @@ var Jz = (e) => e == null ? z : e, Yz = o`
|
|
|
21707
21731
|
return de`<div
|
|
21708
21732
|
part="gallery-root"
|
|
21709
21733
|
class="gallery-root"
|
|
21710
|
-
dir="${
|
|
21734
|
+
dir="${lz(n)}"
|
|
21711
21735
|
lang="${n}"
|
|
21712
|
-
style="background: ${
|
|
21736
|
+
style="background: ${qz((t = this.props) == null || (t = t.moduleProps) == null ? void 0 : t.backgroundColor)}"
|
|
21713
21737
|
>
|
|
21714
21738
|
<div class="header">
|
|
21715
|
-
<button @click="${this._handleCloseClick}" class="close-btn">${
|
|
21739
|
+
<button @click="${this._handleCloseClick}" class="close-btn">${Yz}</button>
|
|
21716
21740
|
</div>
|
|
21717
|
-
<button @click="${this._handleUploadClick}" class="btn">${
|
|
21741
|
+
<button @click="${this._handleUploadClick}" class="btn">${Xz}</button>
|
|
21718
21742
|
<input
|
|
21719
21743
|
@change="${this._handleInputChange}"
|
|
21720
21744
|
id="file-input"
|
|
@@ -21723,14 +21747,15 @@ var Jz = (e) => e == null ? z : e, Yz = o`
|
|
|
21723
21747
|
accept="image/png, image/jpeg, image/bmp, image/webp, image/gif, .jpg, .jpeg"
|
|
21724
21748
|
/>
|
|
21725
21749
|
<div class="footer">
|
|
21726
|
-
<a href>${
|
|
21750
|
+
<a href>${Zz} </a>
|
|
21727
21751
|
</div>
|
|
21728
21752
|
</div>`;
|
|
21729
21753
|
}
|
|
21730
|
-
},
|
|
21731
|
-
|
|
21732
|
-
|
|
21733
|
-
|
|
21754
|
+
}, $z = (Qz.styles = [Jz], Qz);
|
|
21755
|
+
Wz([Dz(), Uz("design:type", Object)], $z.prototype, "props", void 0), Wz([kz("#file-input"), Uz("design:type", typeof HTMLInputElement > "u" ? Object : HTMLInputElement)], $z.prototype, "_input", void 0), $z = Wz([Ez("document-reader-gallery")], $z);
|
|
21756
|
+
//#endregion
|
|
21757
|
+
//#region src/web-components/document-idv/index.ts
|
|
21758
|
+
var eB, tB = !1, nB = class e extends Me {
|
|
21734
21759
|
constructor(...e) {
|
|
21735
21760
|
super(...e), this.props = null, this.renderVersion = 0;
|
|
21736
21761
|
}
|
|
@@ -21738,7 +21763,7 @@ var tB, nB = !1, rB = class e extends Me {
|
|
|
21738
21763
|
if (!e.getSupportedTemplates().includes(t.moduleProps.templateId)) {
|
|
21739
21764
|
var n;
|
|
21740
21765
|
let e = new wz({
|
|
21741
|
-
errorCode:
|
|
21766
|
+
errorCode: pz.UNKNOWN_STEP,
|
|
21742
21767
|
message: `TemplateId ${t.moduleProps.templateId} is not supported`
|
|
21743
21768
|
});
|
|
21744
21769
|
(n = t.perform) == null || n.call(t, e);
|
|
@@ -21747,7 +21772,7 @@ var tB, nB = !1, rB = class e extends Me {
|
|
|
21747
21772
|
if (r && r.blockingAssets.size > 0) {
|
|
21748
21773
|
var i;
|
|
21749
21774
|
let e = new wz({
|
|
21750
|
-
errorCode:
|
|
21775
|
+
errorCode: pz.IMAGE_LOADING_FAILED,
|
|
21751
21776
|
message: `Failed to load image asset${r.blockingAssets.size > 1 ? "s" : ""}: ${[...r.blockingAssets].join(", ")}`
|
|
21752
21777
|
});
|
|
21753
21778
|
(i = t.perform) == null || i.call(t, e);
|
|
@@ -21755,10 +21780,10 @@ var tB, nB = !1, rB = class e extends Me {
|
|
|
21755
21780
|
this.renderVersion++, this.props = t;
|
|
21756
21781
|
}
|
|
21757
21782
|
static isReady() {
|
|
21758
|
-
return
|
|
21783
|
+
return tB;
|
|
21759
21784
|
}
|
|
21760
21785
|
static getSupportedTemplates() {
|
|
21761
|
-
return [
|
|
21786
|
+
return [fz.DOC_READER, fz.DOC_READER_GALLERY];
|
|
21762
21787
|
}
|
|
21763
21788
|
static initialize(e) {
|
|
21764
21789
|
var t, n;
|
|
@@ -21767,21 +21792,22 @@ var tB, nB = !1, rB = class e extends Me {
|
|
|
21767
21792
|
window.RegulaDocumentSDK.initialize({
|
|
21768
21793
|
license: r,
|
|
21769
21794
|
module: i
|
|
21770
|
-
}).then(() =>
|
|
21795
|
+
}).then(() => tB = !0);
|
|
21771
21796
|
});
|
|
21772
21797
|
}
|
|
21773
21798
|
static deinitialize() {
|
|
21774
21799
|
var e;
|
|
21775
|
-
|
|
21800
|
+
tB = !1, (e = window.RegulaDocumentSDK) == null || e.shutdown();
|
|
21776
21801
|
}
|
|
21777
21802
|
static getIdentifier() {
|
|
21778
|
-
return
|
|
21803
|
+
return hz;
|
|
21779
21804
|
}
|
|
21780
21805
|
static cancel() {}
|
|
21781
21806
|
render() {
|
|
21782
21807
|
var e;
|
|
21783
|
-
return de`${ze(this.renderVersion, de`${XR((e = this.props) == null || (e = e.moduleProps) == null ? void 0 : e.templateId, [[
|
|
21808
|
+
return de`${ze(this.renderVersion, de`${XR((e = this.props) == null || (e = e.moduleProps) == null ? void 0 : e.templateId, [[fz.DOC_READER, () => de`<document-reader-camera .props=${this.props}></document-reader-camera>`], [fz.DOC_READER_GALLERY, () => de`<document-reader-gallery .props=${this.props}></document-reader-gallery>`]])}`)}`;
|
|
21784
21809
|
}
|
|
21785
21810
|
};
|
|
21786
|
-
|
|
21787
|
-
|
|
21811
|
+
eB = nB, eB.displayName = hz, Wz([YR({ attribute: !1 }), Uz("design:type", Object)], nB.prototype, "props", void 0), Wz([YR({ attribute: !1 }), Uz("design:type", Object)], nB.prototype, "renderVersion", void 0), iz(hz, nB);
|
|
21812
|
+
//#endregion
|
|
21813
|
+
export { nB as DocumentIdv, Tf as ModuleType };
|