@ekyc_qoobiss/qbs-ect-cmp 4.7.22 → 4.7.24
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-info_23.cjs.entry.js +9 -8
- package/dist/cjs/agreement-info_23.cjs.entry.js.map +1 -1
- package/dist/collection/components/common/id-auto-capture/id-auto-capture.js +8 -7
- package/dist/collection/components/common/id-auto-capture/id-auto-capture.js.map +1 -1
- package/dist/esm/agreement-info_23.entry.js +9 -8
- package/dist/esm/agreement-info_23.entry.js.map +1 -1
- package/dist/qbs-ect-cmp/{p-c90d6e07.entry.js → p-a284f87f.entry.js} +2 -2
- package/dist/qbs-ect-cmp/p-a284f87f.entry.js.map +1 -0
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/package.json +1 -1
- package/dist/qbs-ect-cmp/p-c90d6e07.entry.js.map +0 -1
|
@@ -592,6 +592,7 @@ const IdAutoCapture = class {
|
|
|
592
592
|
// Method for continuous video frame processing with OpenCV
|
|
593
593
|
this.processVideoFrame = () => {
|
|
594
594
|
if (this.videoElement && this.processingCanvasElement && this.opencvReady && this.isDetecting) {
|
|
595
|
+
console.log('Processing frame. cv.Mat is a constructor:', typeof cv.Mat === 'function');
|
|
595
596
|
const video = this.videoElement;
|
|
596
597
|
const processingCanvas = this.processingCanvasElement;
|
|
597
598
|
const context = processingCanvas.getContext('2d');
|
|
@@ -600,7 +601,8 @@ const IdAutoCapture = class {
|
|
|
600
601
|
context.drawImage(video, 0, 0, processingCanvas.width, processingCanvas.height);
|
|
601
602
|
const imageData = context.getImageData(0, 0, processingCanvas.width, processingCanvas.height);
|
|
602
603
|
// --- OpenCV.js processing starts here ---
|
|
603
|
-
let src = cv.
|
|
604
|
+
let src = new cv.Mat(processingCanvas.height, processingCanvas.width, cv.CV_8UC4);
|
|
605
|
+
src.data.set(imageData.data);
|
|
604
606
|
let gray = new cv.Mat();
|
|
605
607
|
let blurred = new cv.Mat();
|
|
606
608
|
let edges = new cv.Mat();
|
|
@@ -733,10 +735,6 @@ const IdAutoCapture = class {
|
|
|
733
735
|
this.loadOpenCVScript();
|
|
734
736
|
// Listen for the custom event dispatched by global.ts (ensures global.ts sets up window.Module)
|
|
735
737
|
document.addEventListener('opencv:ready', this.handleOpencvReady);
|
|
736
|
-
// Initial check in case opencv.js loads very fast and event was already dispatched
|
|
737
|
-
if (typeof cv !== 'undefined' && cv.Mat) {
|
|
738
|
-
this.handleOpencvReady();
|
|
739
|
-
}
|
|
740
738
|
}
|
|
741
739
|
disconnectedCallback() {
|
|
742
740
|
if (this.mediaStream) {
|
|
@@ -757,7 +755,7 @@ const IdAutoCapture = class {
|
|
|
757
755
|
}
|
|
758
756
|
}
|
|
759
757
|
loadOpenCVScript() {
|
|
760
|
-
if (!
|
|
758
|
+
if (!document.querySelector('script[src="https://docs.opencv.org/4.x/opencv.js"]')) {
|
|
761
759
|
// Only load if not already loaded
|
|
762
760
|
this.opencvScriptElement = document.createElement('script');
|
|
763
761
|
this.opencvScriptElement.type = 'text/javascript';
|
|
@@ -766,6 +764,9 @@ const IdAutoCapture = class {
|
|
|
766
764
|
document.body.appendChild(this.opencvScriptElement); // Append to body or head
|
|
767
765
|
console.log('Dynamically loaded opencv.js');
|
|
768
766
|
}
|
|
767
|
+
else {
|
|
768
|
+
console.log('OpenCV.js script already present in the DOM.');
|
|
769
|
+
}
|
|
769
770
|
}
|
|
770
771
|
// Method to get user media (camera stream)
|
|
771
772
|
async getMedia() {
|
|
@@ -790,7 +791,7 @@ const IdAutoCapture = class {
|
|
|
790
791
|
if (TranslationUtils.state.device.isDesktop) {
|
|
791
792
|
cameraVideoClass = 'cameraVideoSelfieDesk';
|
|
792
793
|
}
|
|
793
|
-
return (index.h("div", { key: '
|
|
794
|
+
return (index.h("div", { key: '0b0333b5c7b20a216319cf081a9f49111012596e', class: "container flex center" }, index.h("div", { key: 'e7980ea76bddf47ac73f865b3c4cb609d4597cbd', class: "px-2 w-100" }, index.h("h1", { key: 'd5a97b44269a80d3a3cee564ff48cf543d3bfc04', class: this.titleStyle, innerHTML: this.titleMesage }), index.h("div", { key: 'e52e5f59f446be42bba3ae25377fbbe7e2b87d87', hidden: this.verified }, index.h("div", { key: 'f680400952063d743350a607e2f503bc57fdcdff', class: "w-100 h-100 rounded" }, index.h("div", { key: '237debd548236f0a12c71ac73b61ff420bd91203', class: "camera rounded" }, index.h("video", { key: 'db25e8012fc4639d785a175a449ac4ec5130d113', id: "video", loop: true, autoplay: true, playsinline: true, muted: true, class: cameraVideoClass, ref: el => (this.videoElement = el) }), index.h("canvas", { key: 'd2c08faa9f71bf7c8b5f161fd76d49a99960a73e', id: "output", ref: el => (this.canvasElement = el), style: { display: 'none' } }), index.h("canvas", { key: '1882ca42f1716dd6573e28ffb289958000d8e23a', id: "processingCanvasElement", ref: el => (this.processingCanvasElement = el), style: { display: 'none' } }), index.h("div", { key: 'ed29e8ff7706909244dfc6ef8ef2a3529e010628', class: "id-guide-rectangle" }), this.isCapturing && index.h("div", { key: '4df9ad4556cd2d57b0a5e18d0fe18b10b61cd55b', class: "capture-flash-overlay" }), this.countdown > 0 && (index.h("div", { key: 'c06a98f7a785bdefeba161a39a701eb7257a90d6', class: "absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center" }, index.h("span", { key: '63407cf0373b92248eef073d863b12536c6f9cfc', class: "text-white text-9xl font-bold animate-bounce" }, this.countdown)))))), index.h("div", { key: '047ebeeb0b61d05f95f51b23e48a14eed82dbb31', class: "footer text-center" }, index.h("img", { key: 'deeea20a5acf6618ee24fbfa6919b8a5a38bb1d0', src: Cameras.logoOntraceSvg })))));
|
|
794
795
|
}
|
|
795
796
|
get el() { return index.getElement(this); }
|
|
796
797
|
};
|
|
@@ -855,7 +856,7 @@ const IdSelection = class {
|
|
|
855
856
|
};
|
|
856
857
|
IdSelection.style = idSelectionCss;
|
|
857
858
|
|
|
858
|
-
const version$1 = "4.7.
|
|
859
|
+
const version$1 = "4.7.24";
|
|
859
860
|
var packageJson = {
|
|
860
861
|
version: version$1};
|
|
861
862
|
|