@jaak.ai/stamps 2.0.0-beta.1 → 2.0.0-beta.2
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/README.md +73 -18
- package/dist/cjs/jaak-stamps-webcomponent.cjs.js +1 -1
- package/dist/cjs/jaak-stamps.cjs.entry.js +159 -24
- package/dist/cjs/jaak-stamps.cjs.entry.js.map +1 -1
- package/dist/cjs/jaak-stamps.entry.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/my-component/my-component.js +219 -24
- package/dist/collection/components/my-component/my-component.js.map +1 -1
- package/dist/components/jaak-stamps.js +162 -24
- package/dist/components/jaak-stamps.js.map +1 -1
- package/dist/esm/jaak-stamps-webcomponent.js +1 -1
- package/dist/esm/jaak-stamps.entry.js +159 -24
- package/dist/esm/jaak-stamps.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/jaak-stamps-webcomponent/jaak-stamps-webcomponent.esm.js +1 -1
- package/dist/jaak-stamps-webcomponent/jaak-stamps.entry.esm.js.map +1 -1
- package/dist/jaak-stamps-webcomponent/p-f1172b06.entry.js +2 -0
- package/dist/jaak-stamps-webcomponent/p-f1172b06.entry.js.map +1 -0
- package/dist/types/components/my-component/my-component.d.ts +12 -0
- package/dist/types/components.d.ts +24 -0
- package/package.json +1 -1
- package/dist/jaak-stamps-webcomponent/p-dd6cc14e.entry.js +0 -2
- package/dist/jaak-stamps-webcomponent/p-dd6cc14e.entry.js.map +0 -1
|
@@ -11,6 +11,9 @@ const JaakStamps = class {
|
|
|
11
11
|
get el() { return getElement(this); }
|
|
12
12
|
debug = false;
|
|
13
13
|
alignmentTolerance = 10; // Tolerancia en píxeles para considerar un lado alineado (escalado para 320x320)
|
|
14
|
+
maskSize = 90; // Porcentaje del video que ocupará la máscara (default 90%)
|
|
15
|
+
cropMargin = 0; // Margen en píxeles para el recorte del documento (default 0)
|
|
16
|
+
useDocumentClassification = false; // Habilita la clasificación automática de documentos para determinar si solicitar reverso
|
|
14
17
|
captureCompleted;
|
|
15
18
|
isReady;
|
|
16
19
|
isVideoActive = false;
|
|
@@ -44,6 +47,8 @@ const JaakStamps = class {
|
|
|
44
47
|
animationId;
|
|
45
48
|
hasScreenshotTaken = false;
|
|
46
49
|
lastDetectedBox;
|
|
50
|
+
mobileNetSession;
|
|
51
|
+
mobileNetClassMap;
|
|
47
52
|
// Performance optimization properties
|
|
48
53
|
frameSkipCounter = 0;
|
|
49
54
|
FRAME_SKIP = 2; // Process every 3rd frame (reduces CPU by ~66%)
|
|
@@ -56,7 +61,9 @@ const JaakStamps = class {
|
|
|
56
61
|
preprocessCtx;
|
|
57
62
|
captureCanvas;
|
|
58
63
|
captureCtx;
|
|
59
|
-
MODEL_PATH = "https://storage.googleapis.com/jaak-static/web/component/stamps/
|
|
64
|
+
MODEL_PATH = "https://storage.googleapis.com/jaak-static/web/component/stamps/ddmyp-v1.onnx";
|
|
65
|
+
MOBILENET_MODEL_PATH = "https://storage.googleapis.com/jaak-static/web/component/stamps/cdmmp-v1.onnx";
|
|
66
|
+
MOBILENET_CLASSES_PATH = "https://storage.googleapis.com/jaak-static/web/component/stamps/cdmmp-v1.json";
|
|
60
67
|
INPUT_SIZE = 320;
|
|
61
68
|
CONFIDENCE_THRESHOLD = 0.6;
|
|
62
69
|
// ISO/IEC 7810 ID-1 standard dimensions (85.60mm x 53.98mm)
|
|
@@ -66,6 +73,18 @@ const JaakStamps = class {
|
|
|
66
73
|
console.log(...args);
|
|
67
74
|
}
|
|
68
75
|
}
|
|
76
|
+
validateMaskSize() {
|
|
77
|
+
if (this.maskSize < 50 || this.maskSize > 100) {
|
|
78
|
+
console.warn(`maskSize debe estar entre 50 y 100. Valor actual: ${this.maskSize}. Usando valor por defecto: 90`);
|
|
79
|
+
this.maskSize = 90;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
validateCropMargin() {
|
|
83
|
+
if (this.cropMargin < 0 || this.cropMargin > 100) {
|
|
84
|
+
console.warn(`cropMargin debe estar entre 0 y 100. Valor actual: ${this.cropMargin}. Usando valor por defecto: 0`);
|
|
85
|
+
this.cropMargin = 0;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
69
88
|
emitReadyEvent() {
|
|
70
89
|
const isDocumentReady = !!window.ort && this.isModelPreloaded;
|
|
71
90
|
this.isReady.emit(isDocumentReady);
|
|
@@ -79,6 +98,8 @@ const JaakStamps = class {
|
|
|
79
98
|
return settings.facingMode === 'environment';
|
|
80
99
|
}
|
|
81
100
|
async componentDidLoad() {
|
|
101
|
+
this.validateMaskSize();
|
|
102
|
+
this.validateCropMargin();
|
|
82
103
|
if (!window.ort) {
|
|
83
104
|
const script = document.createElement('script');
|
|
84
105
|
script.src = 'https://cdn.jsdelivr.net/npm/onnxruntime-web/dist/ort.min.js';
|
|
@@ -146,14 +167,15 @@ const JaakStamps = class {
|
|
|
146
167
|
// Calculate what would be the max width if limited by video height
|
|
147
168
|
const maxWidthByHeight = displayedVideoHeight * this.ID1_ASPECT_RATIO;
|
|
148
169
|
let maskWidthInVideo, maskHeightInVideo;
|
|
170
|
+
const sizeRatio = this.maskSize / 100;
|
|
149
171
|
if (maxWidthByHeight <= displayedVideoWidth) {
|
|
150
172
|
// Video height is the limiting factor
|
|
151
|
-
maskHeightInVideo = displayedVideoHeight *
|
|
173
|
+
maskHeightInVideo = displayedVideoHeight * sizeRatio;
|
|
152
174
|
maskWidthInVideo = maskHeightInVideo * this.ID1_ASPECT_RATIO;
|
|
153
175
|
}
|
|
154
176
|
else {
|
|
155
177
|
// Video width is the limiting factor
|
|
156
|
-
maskWidthInVideo = displayedVideoWidth *
|
|
178
|
+
maskWidthInVideo = displayedVideoWidth * sizeRatio;
|
|
157
179
|
maskHeightInVideo = maskWidthInVideo / this.ID1_ASPECT_RATIO;
|
|
158
180
|
}
|
|
159
181
|
// Convert to percentages of the container
|
|
@@ -247,25 +269,29 @@ const JaakStamps = class {
|
|
|
247
269
|
}
|
|
248
270
|
try {
|
|
249
271
|
this.isLoading = true;
|
|
250
|
-
this.statusMessage = "Precargando
|
|
272
|
+
this.statusMessage = "Precargando modelos...";
|
|
251
273
|
this.statusColor = "#007bff";
|
|
252
274
|
const modelPath = this.MODEL_PATH;
|
|
253
|
-
this.debugLog('🤖 Preloading model:', modelPath);
|
|
275
|
+
this.debugLog('🤖 Preloading detection model:', modelPath);
|
|
254
276
|
// Configure ONNX Runtime with device-specific optimizations
|
|
255
277
|
const sessionOptions = this.getSessionOptions();
|
|
256
278
|
this.session = await window.ort.InferenceSession.create(modelPath, sessionOptions);
|
|
279
|
+
// Preload MobileNet model and classes only if classification is enabled
|
|
280
|
+
if (this.useDocumentClassification) {
|
|
281
|
+
await this.loadMobileNetModel();
|
|
282
|
+
}
|
|
257
283
|
this.isModelPreloaded = true;
|
|
258
284
|
this.isLoading = false;
|
|
259
|
-
this.statusMessage = "
|
|
285
|
+
this.statusMessage = "Modelos precargados. Listo para comenzar detección";
|
|
260
286
|
this.statusColor = "#28a745";
|
|
261
287
|
this.emitReadyEvent();
|
|
262
|
-
this.debugLog('✅
|
|
263
|
-
return { success: true, message: '
|
|
288
|
+
this.debugLog('✅ Models preloaded successfully');
|
|
289
|
+
return { success: true, message: 'Models preloaded successfully' };
|
|
264
290
|
}
|
|
265
291
|
catch (error) {
|
|
266
|
-
this.debugLog('❌ Error preloading
|
|
292
|
+
this.debugLog('❌ Error preloading models:', error);
|
|
267
293
|
this.isLoading = false;
|
|
268
|
-
this.statusMessage = "Error al precargar
|
|
294
|
+
this.statusMessage = "Error al precargar los modelos";
|
|
269
295
|
this.statusColor = "#ff6b6b";
|
|
270
296
|
return { success: false, error: error.message };
|
|
271
297
|
}
|
|
@@ -275,6 +301,80 @@ const JaakStamps = class {
|
|
|
275
301
|
this.completeProcess(true);
|
|
276
302
|
}
|
|
277
303
|
}
|
|
304
|
+
async loadMobileNetModel() {
|
|
305
|
+
try {
|
|
306
|
+
this.debugLog('🤖 Loading MobileNet model...');
|
|
307
|
+
// Load class map
|
|
308
|
+
const classResponse = await fetch(this.MOBILENET_CLASSES_PATH);
|
|
309
|
+
if (!classResponse.ok) {
|
|
310
|
+
throw new Error(`Failed to load class map: ${this.MOBILENET_CLASSES_PATH}`);
|
|
311
|
+
}
|
|
312
|
+
this.mobileNetClassMap = await classResponse.json();
|
|
313
|
+
this.debugLog('📋 MobileNet classes loaded:', this.mobileNetClassMap);
|
|
314
|
+
// Load model
|
|
315
|
+
const sessionOptions = this.getSessionOptions();
|
|
316
|
+
this.mobileNetSession = await window.ort.InferenceSession.create(this.MOBILENET_MODEL_PATH, sessionOptions);
|
|
317
|
+
this.debugLog('✅ MobileNet model loaded successfully');
|
|
318
|
+
}
|
|
319
|
+
catch (error) {
|
|
320
|
+
this.debugLog('❌ Error loading MobileNet model:', error);
|
|
321
|
+
throw error;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
preprocessMobileNet(canvas) {
|
|
325
|
+
// Create a temporary canvas for MobileNet preprocessing (224x224)
|
|
326
|
+
const tempCanvas = document.createElement('canvas');
|
|
327
|
+
tempCanvas.width = 224;
|
|
328
|
+
tempCanvas.height = 224;
|
|
329
|
+
const tempCtx = tempCanvas.getContext('2d');
|
|
330
|
+
// Draw the cropped image onto the 224x224 canvas
|
|
331
|
+
tempCtx.drawImage(canvas, 0, 0, 224, 224);
|
|
332
|
+
// Get image data and preprocess for MobileNet
|
|
333
|
+
const imageData = tempCtx.getImageData(0, 0, 224, 224);
|
|
334
|
+
const data = imageData.data;
|
|
335
|
+
const hw = 224 * 224;
|
|
336
|
+
const arr = new Float32Array(3 * hw);
|
|
337
|
+
// Normalize pixels: (pixel/255 - 0.5) / 0.5 = (pixel - 127.5) / 127.5
|
|
338
|
+
for (let i = 0; i < hw; i++) {
|
|
339
|
+
arr[i] = (data[i * 4 + 0] / 255 - 0.5) / 0.5; // R
|
|
340
|
+
arr[hw + i] = (data[i * 4 + 1] / 255 - 0.5) / 0.5; // G
|
|
341
|
+
arr[2 * hw + i] = (data[i * 4 + 2] / 255 - 0.5) / 0.5; // B
|
|
342
|
+
}
|
|
343
|
+
return new window.ort.Tensor('float32', arr, [1, 3, 224, 224]);
|
|
344
|
+
}
|
|
345
|
+
async classifyDocument(canvas) {
|
|
346
|
+
if (!this.mobileNetSession || !this.mobileNetClassMap) {
|
|
347
|
+
this.debugLog('⚠️ MobileNet model not loaded');
|
|
348
|
+
return null;
|
|
349
|
+
}
|
|
350
|
+
try {
|
|
351
|
+
this.debugLog('🔍 Classifying document...');
|
|
352
|
+
// Preprocess image for MobileNet
|
|
353
|
+
const inputTensor = this.preprocessMobileNet(canvas);
|
|
354
|
+
// Run inference
|
|
355
|
+
const feeds = { input: inputTensor };
|
|
356
|
+
const results = await this.mobileNetSession.run(feeds);
|
|
357
|
+
const output = results[Object.keys(results)[0]].data;
|
|
358
|
+
// Find the class with highest confidence
|
|
359
|
+
const maxIdx = output.reduce((bestIdx, val, idx, arr) => val > arr[bestIdx] ? idx : bestIdx, 0);
|
|
360
|
+
const confidence = output[maxIdx];
|
|
361
|
+
const className = this.mobileNetClassMap[maxIdx.toString()] || "unknown";
|
|
362
|
+
this.debugLog('📄 Document classification result:', {
|
|
363
|
+
class: className,
|
|
364
|
+
confidence: confidence.toFixed(3),
|
|
365
|
+
classIndex: maxIdx
|
|
366
|
+
});
|
|
367
|
+
return {
|
|
368
|
+
class: className,
|
|
369
|
+
confidence: confidence,
|
|
370
|
+
classIndex: maxIdx
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
catch (error) {
|
|
374
|
+
this.debugLog('❌ Error classifying document:', error);
|
|
375
|
+
return null;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
278
378
|
cleanup() {
|
|
279
379
|
if (this.animationId) {
|
|
280
380
|
cancelAnimationFrame(this.animationId);
|
|
@@ -302,11 +402,16 @@ const JaakStamps = class {
|
|
|
302
402
|
this.captureCtx = undefined;
|
|
303
403
|
this.captureCanvas = undefined;
|
|
304
404
|
}
|
|
305
|
-
// Disposed ONNX
|
|
405
|
+
// Disposed ONNX sessions
|
|
306
406
|
if (this.session) {
|
|
307
407
|
this.session.release?.();
|
|
308
408
|
this.session = undefined;
|
|
309
409
|
}
|
|
410
|
+
if (this.mobileNetSession) {
|
|
411
|
+
this.mobileNetSession.release?.();
|
|
412
|
+
this.mobileNetSession = undefined;
|
|
413
|
+
}
|
|
414
|
+
this.mobileNetClassMap = undefined;
|
|
310
415
|
this.isModelPreloaded = false;
|
|
311
416
|
this.debugLog('🧹 Canvas pool cleaned up');
|
|
312
417
|
}
|
|
@@ -437,18 +542,22 @@ const JaakStamps = class {
|
|
|
437
542
|
// Check if model is already preloaded
|
|
438
543
|
if (!this.session) {
|
|
439
544
|
this.isLoading = true;
|
|
440
|
-
this.statusMessage = "Cargando
|
|
545
|
+
this.statusMessage = "Cargando modelos...";
|
|
441
546
|
this.statusColor = "#007bff";
|
|
442
547
|
const modelPath = this.MODEL_PATH;
|
|
443
|
-
this.debugLog('🤖 Loading model:', modelPath);
|
|
548
|
+
this.debugLog('🤖 Loading detection model:', modelPath);
|
|
444
549
|
const sessionOptions = this.getSessionOptions();
|
|
445
550
|
this.session = await window.ort.InferenceSession.create(modelPath, sessionOptions);
|
|
551
|
+
// Load MobileNet model if classification is enabled and not already loaded
|
|
552
|
+
if (this.useDocumentClassification && !this.mobileNetSession) {
|
|
553
|
+
await this.loadMobileNetModel();
|
|
554
|
+
}
|
|
446
555
|
this.isModelPreloaded = true;
|
|
447
556
|
this.emitReadyEvent();
|
|
448
557
|
}
|
|
449
558
|
else {
|
|
450
|
-
this.debugLog('🚀 Using preloaded
|
|
451
|
-
this.statusMessage = "Usando
|
|
559
|
+
this.debugLog('🚀 Using preloaded models');
|
|
560
|
+
this.statusMessage = "Usando modelos precargados...";
|
|
452
561
|
this.statusColor = "#007bff";
|
|
453
562
|
}
|
|
454
563
|
this.statusMessage = "Configurando cámara...";
|
|
@@ -591,14 +700,15 @@ const JaakStamps = class {
|
|
|
591
700
|
// Calculate mask dimensions using the same logic as updateMaskDimensions
|
|
592
701
|
const maxWidthByHeight = displayedVideoHeight * this.ID1_ASPECT_RATIO;
|
|
593
702
|
let visualMaskWidth, visualMaskHeight;
|
|
703
|
+
const sizeRatio = this.maskSize / 100;
|
|
594
704
|
if (maxWidthByHeight <= displayedVideoWidth) {
|
|
595
705
|
// Video height is the limiting factor
|
|
596
|
-
visualMaskHeight = displayedVideoHeight *
|
|
706
|
+
visualMaskHeight = displayedVideoHeight * sizeRatio;
|
|
597
707
|
visualMaskWidth = visualMaskHeight * this.ID1_ASPECT_RATIO;
|
|
598
708
|
}
|
|
599
709
|
else {
|
|
600
710
|
// Video width is the limiting factor
|
|
601
|
-
visualMaskWidth = displayedVideoWidth *
|
|
711
|
+
visualMaskWidth = displayedVideoWidth * sizeRatio;
|
|
602
712
|
visualMaskHeight = visualMaskWidth / this.ID1_ASPECT_RATIO;
|
|
603
713
|
}
|
|
604
714
|
// Now map these visual mask dimensions to the distorted model space
|
|
@@ -666,7 +776,9 @@ const JaakStamps = class {
|
|
|
666
776
|
corners?.forEach(corner => corner.classList.add('perfect-match'));
|
|
667
777
|
if (!this.hasScreenshotTaken) {
|
|
668
778
|
this.lastDetectedBox = bestBox;
|
|
669
|
-
this.takeScreenshot()
|
|
779
|
+
this.takeScreenshot().catch(error => {
|
|
780
|
+
this.debugLog('❌ Error taking screenshot:', error);
|
|
781
|
+
});
|
|
670
782
|
this.hasScreenshotTaken = true;
|
|
671
783
|
// Reset para permitir segunda captura
|
|
672
784
|
setTimeout(() => {
|
|
@@ -749,7 +861,7 @@ const JaakStamps = class {
|
|
|
749
861
|
ctx.strokeRect(x, y, w, h);
|
|
750
862
|
});
|
|
751
863
|
}
|
|
752
|
-
takeScreenshot() {
|
|
864
|
+
async takeScreenshot() {
|
|
753
865
|
if (!this.videoRef || !this.lastDetectedBox)
|
|
754
866
|
return;
|
|
755
867
|
// Activar animación
|
|
@@ -765,10 +877,10 @@ const JaakStamps = class {
|
|
|
765
877
|
// Calcular las coordenadas de recorte basadas en la detección
|
|
766
878
|
const scaleX = this.videoRef.videoWidth / this.INPUT_SIZE;
|
|
767
879
|
const scaleY = this.videoRef.videoHeight / this.INPUT_SIZE;
|
|
768
|
-
const cropX = Math.max(0, this.lastDetectedBox.x * scaleX);
|
|
769
|
-
const cropY = Math.max(0, this.lastDetectedBox.y * scaleY);
|
|
770
|
-
const cropWidth = Math.min(this.lastDetectedBox.w * scaleX, this.videoRef.videoWidth - cropX);
|
|
771
|
-
const cropHeight = Math.min(this.lastDetectedBox.h * scaleY, this.videoRef.videoHeight - cropY);
|
|
880
|
+
const cropX = Math.max(0, (this.lastDetectedBox.x * scaleX) - this.cropMargin);
|
|
881
|
+
const cropY = Math.max(0, (this.lastDetectedBox.y * scaleY) - this.cropMargin);
|
|
882
|
+
const cropWidth = Math.min((this.lastDetectedBox.w * scaleX) + (2 * this.cropMargin), this.videoRef.videoWidth - cropX);
|
|
883
|
+
const cropHeight = Math.min((this.lastDetectedBox.h * scaleY) + (2 * this.cropMargin), this.videoRef.videoHeight - cropY);
|
|
772
884
|
// OPTIMIZATION: Create temporary canvas only for cropped version
|
|
773
885
|
// (We reuse main capture canvas for full frame)
|
|
774
886
|
const croppedCanvas = document.createElement('canvas');
|
|
@@ -783,6 +895,29 @@ const JaakStamps = class {
|
|
|
783
895
|
// Captura del frente usando canvas reutilizado
|
|
784
896
|
this.capturedFullFrame = this.captureCanvas.toDataURL('image/png');
|
|
785
897
|
this.capturedCroppedId = croppedCanvas.toDataURL('image/png');
|
|
898
|
+
// Check if document classification is enabled
|
|
899
|
+
if (this.useDocumentClassification) {
|
|
900
|
+
// Load MobileNet model if not loaded yet (lazy loading)
|
|
901
|
+
if (!this.mobileNetSession) {
|
|
902
|
+
try {
|
|
903
|
+
await this.loadMobileNetModel();
|
|
904
|
+
}
|
|
905
|
+
catch (error) {
|
|
906
|
+
this.debugLog('⚠️ Failed to load classification model, continuing without classification:', error);
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
// Classify the cropped document if model is available
|
|
910
|
+
if (this.mobileNetSession) {
|
|
911
|
+
const classification = await this.classifyDocument(croppedCanvas);
|
|
912
|
+
if (classification && classification.class === 'passport') {
|
|
913
|
+
// If it's a passport, skip back capture since passports don't have a back side
|
|
914
|
+
this.debugLog('📄 Passport detected - skipping back capture');
|
|
915
|
+
this.completeProcess(true);
|
|
916
|
+
return;
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
// For other IDs, continue with normal flow (back capture)
|
|
786
921
|
this.captureStep = 'back';
|
|
787
922
|
this.statusMessage = "Voltee la identificación y muestre la parte trasera";
|
|
788
923
|
this.statusColor = "#007bff";
|
|
@@ -912,7 +1047,7 @@ const JaakStamps = class {
|
|
|
912
1047
|
this.cleanup();
|
|
913
1048
|
}
|
|
914
1049
|
render() {
|
|
915
|
-
return (h("div", { key: '
|
|
1050
|
+
return (h("div", { key: '42591479495df221b101555198a23288d7d765b0', class: "detector-container" }, h("div", { key: '2b9ab48572aa2fb5542b8a8dc1b70a0f2a6eca89', class: "video-container" }, h("video", { key: 'b9e84f2eb67fa6f7f158e19b90871a1eebee624b', ref: el => this.videoRef = el, autoplay: true, muted: true, playsinline: true, class: this.shouldMirrorVideo ? 'mirror' : '', style: { display: this.isVideoActive ? 'block' : 'none' } }), h("canvas", { key: 'a82fc4826e220e696799b07b3510456f174a6628', ref: el => this.canvasRef = el, class: this.shouldMirrorVideo ? 'mirror' : '' }), this.isMaskReady && (h("div", { key: '9b3b838f99030e3dfa760fa0dd7c89ff24f26ed9', class: "overlay-mask" }, h("div", { key: 'f6a3b1ac2f12c1fb081f6b5eb853e627040396f4', class: "card-outline" }, h("div", { key: '6626259249ac5e0fd6ba665ab802af1ac2f9fc17', class: "side side-top" }), h("div", { key: '7a3195c96b2406b40b122f4267c2a251614cdede', class: "side side-right" }), h("div", { key: 'ece78305cfb083ada1d44de1d7d5226730879cc3', class: "side side-bottom" }), h("div", { key: '107468c583bbb01dd46c36c096e49be8e0b574ba', class: "side side-left" }), h("div", { key: 'c590f13b80c5e37c0ac0c68cfc2e2904b4345ebc', class: "corner corner-tl" }), h("div", { key: 'ab1e5aab179068ad1bc7b58ef3628d9618a877a8', class: "corner corner-tr" }), h("div", { key: '3a1db6cf1105bd3a2dfe7d4b998e79f6e40625ec', class: "corner corner-bl" }), h("div", { key: '5f9bc4e4557e5539335894160dccbaa2a6d6ac2d', class: "corner corner-br" }), !this.showFlipAnimation && !this.showSuccessAnimation && (h("div", { key: '8226d6721b0ae800f935e978a93113bd3b99656a', class: "guide-text" }, this.statusMessage))), this.captureStep === 'back' && !this.showFlipAnimation && !this.showSuccessAnimation && (h("button", { key: '16cec7ca4a80ba0db1ace768826da17063eddb3e', class: "skip-button", onClick: () => this.skipBackCapture(), type: "button" }, "Saltar reverso")))), this.isCapturing && (h("div", { key: 'bfdca0059eb50d37a77e8e43ef963ba7ed953edf', class: "capture-animation" })), this.showFlipAnimation && (h("div", { key: 'a1ad4b4f884d7d9f6090f148ddd6df19250073dd', class: "flip-animation" }, h("div", { key: 'e159ce385824dc049a6e9409d3747105c6f0a08e', class: "id-card-icon" }), h("div", { key: '6fcff650a3c7fdb16f8d327750e06055b9a93d0d', class: "flip-text" }, "\u00A1Voltea tu identificaci\u00F3n!"))), this.showSuccessAnimation && (h("div", { key: 'c4b76ecb19c65969676e5156689c2c0b1c9a584e', class: "success-animation" }, h("div", { key: '12203a8fe7ee878089b3dda1d1142cde5489eed0', class: "check-icon" }), h("div", { key: 'a2d41c8944873d33106994b8d56c3ee1ee1ae9fc', class: "success-text" }, "\u00A1Proceso completado!"))), this.isLoading && (h("div", { key: 'a155cd999fa40c35fa7b391cde7c1026edb250a7', class: "loading-overlay" }, h("div", { key: 'ccba76c5d4a472158c28bc564ba95bd65829b58d', class: "loading-spinner" }), h("div", { key: '23168f9bdcf4e993539288ff5703acaed13bb16a', class: "loading-text" }, this.statusMessage))), h("div", { key: '0107b82ad19726c1bab131e17892a46b04e08cfd', class: "watermark" }, h("img", { key: 'ad8831a6f77fa61805f22e3a27f5c5619ac1cc0e', src: "https://storage.googleapis.com/jaak-static/commons/powered-by-jaak.png", alt: "Powered by Jaak" })))));
|
|
916
1051
|
}
|
|
917
1052
|
};
|
|
918
1053
|
JaakStamps.style = myComponentCss;
|