@jaak.ai/stamps 2.5.6-dev.2 → 2.5.7-dev.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/dist/cjs/{index-D6NBn_qu.js → index-BcFBOmM6.js} +30 -4
- package/dist/cjs/index-BcFBOmM6.js.map +1 -0
- package/dist/cjs/jaak-stamps-webcomponent.cjs.js +2 -2
- package/dist/cjs/jaak-stamps.cjs.entry.js +111 -39
- 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 +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/{my-component/my-component.js → jaak-stamps/jaak-stamps.js} +73 -33
- package/dist/collection/components/jaak-stamps/jaak-stamps.js.map +1 -0
- package/dist/collection/components/jaak-stamps/watermark-fallback.js.map +1 -0
- package/dist/collection/services/DetectionService.js +41 -6
- package/dist/collection/services/DetectionService.js.map +1 -1
- package/dist/components/index.js +20 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/jaak-stamps.js +112 -38
- package/dist/components/jaak-stamps.js.map +1 -1
- package/dist/esm/{index-BCfAsrzL.js → index-Cb0ILUvS.js} +30 -4
- package/dist/esm/index-Cb0ILUvS.js.map +1 -0
- package/dist/esm/jaak-stamps-webcomponent.js +3 -3
- package/dist/esm/jaak-stamps.entry.js +111 -39
- package/dist/esm/jaak-stamps.entry.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- 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-5724f34b.entry.js → p-8b4ce8cb.entry.js} +3 -3
- package/dist/jaak-stamps-webcomponent/p-8b4ce8cb.entry.js.map +1 -0
- package/dist/jaak-stamps-webcomponent/p-Cb0ILUvS.js +3 -0
- package/dist/jaak-stamps-webcomponent/p-Cb0ILUvS.js.map +1 -0
- package/dist/types/components/{my-component/my-component.d.ts → jaak-stamps/jaak-stamps.d.ts} +4 -0
- package/dist/types/services/DetectionService.d.ts +5 -0
- package/package.json +4 -4
- package/dist/cjs/index-D6NBn_qu.js.map +0 -1
- package/dist/collection/components/my-component/my-component.js.map +0 -1
- package/dist/collection/components/my-component/watermark-fallback.js.map +0 -1
- package/dist/collection/utils/utils.js +0 -4
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/esm/index-BCfAsrzL.js.map +0 -1
- package/dist/jaak-stamps-webcomponent/p-5724f34b.entry.js.map +0 -1
- package/dist/jaak-stamps-webcomponent/p-BCfAsrzL.js +0 -3
- package/dist/jaak-stamps-webcomponent/p-BCfAsrzL.js.map +0 -1
- package/dist/types/utils/utils.d.ts +0 -1
- /package/dist/collection/components/{my-component/my-component.css → jaak-stamps/jaak-stamps.css} +0 -0
- /package/dist/collection/components/{my-component → jaak-stamps}/watermark-fallback.js +0 -0
- /package/dist/types/components/{my-component → jaak-stamps}/watermark-fallback.d.ts +0 -0
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BcFBOmM6.js');
|
|
4
4
|
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
5
5
|
|
|
6
6
|
const defineCustomElements = async (win, options) => {
|
|
7
7
|
if (typeof window === 'undefined') return undefined;
|
|
8
8
|
await appGlobals.globalScripts();
|
|
9
|
-
return index.bootstrapLazy([["jaak-stamps.cjs",[[257,"jaak-stamps",{"debug":[4],"alignmentTolerance":[2,"alignment-tolerance"],"maskSize":[2,"mask-size"],"cropMargin":[2,"crop-margin"],"useDocumentClassification":[4,"use-document-classification"],"useDocumentDetector":[4,"use-document-detector"],"preferredCamera":[1,"preferred-camera"],"captureDelay":[2,"capture-delay"],"enableBackDocumentTimer":[4,"enable-back-document-timer"],"backDocumentTimerDuration":[2,"back-document-timer-duration"],"telemetryCollectorUrl":[1,"telemetry-collector-url"],"metricsCollectorUrl":[1,"metrics-collector-url"],"enableTelemetry":[4,"enable-telemetry"],"enableMetrics":[4,"enable-metrics"],"customerId":[1,"customer-id"],"tenantId":[1,"tenant-id"],"environment":[1],"propagateTraceHeaderCorsUrls":[1,"propagate-trace-header-cors-urls"],"metricsExportIntervalMillis":[2,"metrics-export-interval-millis"],"license":[1],"licenseEnvironment":[1,"license-environment"],"traceId":[1,"trace-id"],"appId":[1,"app-id"],"detectionBoxes":[32],"sideAlignment":[32],"isMaskReady":[32],"shouldMirrorVideo":[32],"showCameraSelector":[32],"isSwitchingCamera":[32],"hasDocumentDetected":[32],"cameraInfoWithAutofocus":[32],"currentStatus":[32],"performanceData":[32],"backDocumentTimerRemaining":[32],"showManualCaptureButton":[32],"performanceDegradedMode":[32],"showPerformanceMessage":[32],"captureStateVersion":[32],"processingButton":[32],"licenseValid":[32],"licenseError":[32],"classificationDisabled":[32],"getCapturedImages":[64],"isProcessCompleted":[64],"startCapture":[64],"stopCapture":[64],"resetCapture":[64],"skipBackCapture":[64],"getStatus":[64],"preloadModel":[64],"getCameraInfo":[64],"setPreferredCamera":[64],"setCaptureDelay":[64],"getCaptureDelay":[64]}]]]], options);
|
|
9
|
+
return index.bootstrapLazy([["jaak-stamps.cjs",[[257,"jaak-stamps",{"debug":[4],"alignmentTolerance":[2,"alignment-tolerance"],"maskSize":[2,"mask-size"],"cropMargin":[2,"crop-margin"],"useDocumentClassification":[4,"use-document-classification"],"useDocumentDetector":[4,"use-document-detector"],"preferredCamera":[1,"preferred-camera"],"captureDelay":[2,"capture-delay"],"enableBackDocumentTimer":[4,"enable-back-document-timer"],"backDocumentTimerDuration":[2,"back-document-timer-duration"],"telemetryCollectorUrl":[1,"telemetry-collector-url"],"metricsCollectorUrl":[1,"metrics-collector-url"],"enableTelemetry":[4,"enable-telemetry"],"enableMetrics":[4,"enable-metrics"],"customerId":[1,"customer-id"],"tenantId":[1,"tenant-id"],"environment":[1],"propagateTraceHeaderCorsUrls":[1,"propagate-trace-header-cors-urls"],"metricsExportIntervalMillis":[2,"metrics-export-interval-millis"],"license":[1],"licenseEnvironment":[1,"license-environment"],"traceId":[1,"trace-id"],"appId":[1,"app-id"],"detectionBoxes":[32],"sideAlignment":[32],"isMaskReady":[32],"shouldMirrorVideo":[32],"showCameraSelector":[32],"isSwitchingCamera":[32],"hasDocumentDetected":[32],"cameraInfoWithAutofocus":[32],"currentStatus":[32],"performanceData":[32],"backDocumentTimerRemaining":[32],"showManualCaptureButton":[32],"performanceDegradedMode":[32],"showPerformanceMessage":[32],"captureStateVersion":[32],"processingButton":[32],"licenseValid":[32],"licenseError":[32],"classificationDisabled":[32],"getCapturedImages":[64],"isProcessCompleted":[64],"startCapture":[64],"stopCapture":[64],"resetCapture":[64],"skipBackCapture":[64],"getStatus":[64],"preloadModel":[64],"getCameraInfo":[64],"setPreferredCamera":[64],"setCaptureDelay":[64],"getCaptureDelay":[64]},null,{"license":["onLicenseChanged"]}]]]], options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
package/dist/collection/components/{my-component/my-component.js → jaak-stamps/jaak-stamps.js}
RENAMED
|
@@ -72,6 +72,8 @@ export class JaakStamps {
|
|
|
72
72
|
licenseValid = true; // License validation status
|
|
73
73
|
licenseError = null; // License validation error message
|
|
74
74
|
classificationDisabled = false; // Classification disabled at runtime due to errors
|
|
75
|
+
_initialized = false;
|
|
76
|
+
_initializing = false;
|
|
75
77
|
// Services
|
|
76
78
|
licenseValidationService = null;
|
|
77
79
|
serviceContainer;
|
|
@@ -141,8 +143,10 @@ export class JaakStamps {
|
|
|
141
143
|
canvasPool = [];
|
|
142
144
|
MAX_CANVAS_POOL_SIZE = 3;
|
|
143
145
|
async componentWillLoad() {
|
|
146
|
+
// Yield one microtask so attributes set synchronously after innerHTML are reflected as props
|
|
147
|
+
await Promise.resolve();
|
|
144
148
|
if (this.debug) {
|
|
145
|
-
console.log('[JAAK-DEBUG] componentWillLoad() - Props
|
|
149
|
+
console.log('[JAAK-DEBUG] componentWillLoad() - Props after microtask yield:');
|
|
146
150
|
console.log('[JAAK-DEBUG] useDocumentDetector:', this.useDocumentDetector, '(type:', typeof this.useDocumentDetector, ')');
|
|
147
151
|
console.log('[JAAK-DEBUG] useDocumentClassification:', this.useDocumentClassification);
|
|
148
152
|
console.log('[JAAK-DEBUG] debug:', this.debug);
|
|
@@ -154,32 +158,53 @@ export class JaakStamps {
|
|
|
154
158
|
console.log('[JAAK-DEBUG] preferredCamera:', this.preferredCamera);
|
|
155
159
|
console.log('[JAAK-DEBUG] appId:', this.appId);
|
|
156
160
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
console.log('[JAAK-DEBUG] useDocumentDetector:', this.useDocumentDetector, '(type:', typeof this.useDocumentDetector, ')');
|
|
161
|
+
if (!this.license) {
|
|
162
|
+
// No license yet — show blocking UI; @Watch('license') triggers init when it arrives
|
|
163
|
+
this.licenseValid = false;
|
|
164
|
+
this.licenseError = 'Se requiere una licencia para continuar. Por favor, proporcione una licencia usando el atributo "license".';
|
|
165
|
+
this.updateStatus('Licencia requerida', 'Proporcione una licencia para continuar', 'error');
|
|
163
166
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
167
|
+
else {
|
|
168
|
+
// License present — pre-set the first status synchronously so the initial render
|
|
169
|
+
// already shows it, preventing a state change inside componentDidLoad that Stencil
|
|
170
|
+
// would flag as an extra re-render.
|
|
171
|
+
this.updateStatus('Validando licencia...', 'Verificando autorización de uso', 'initializing');
|
|
172
|
+
}
|
|
173
|
+
// Heavy initialization is deferred to componentDidLoad so the first render is not blocked
|
|
174
|
+
}
|
|
175
|
+
async componentDidLoad() {
|
|
176
|
+
// License absent at mount time — @Watch('license') handles initialization when it arrives
|
|
177
|
+
if (!this.license || this._initialized || this._initializing) {
|
|
171
178
|
return;
|
|
172
179
|
}
|
|
173
|
-
|
|
174
|
-
|
|
180
|
+
await this.validateAndInitialize();
|
|
181
|
+
}
|
|
182
|
+
async onLicenseChanged(newLicense) {
|
|
183
|
+
if (!newLicense || this._initialized || this._initializing) {
|
|
184
|
+
return;
|
|
175
185
|
}
|
|
186
|
+
// Set status synchronously before the async work so the UI updates immediately
|
|
187
|
+
this.updateStatus('Validando licencia...', 'Verificando autorización de uso', 'initializing');
|
|
188
|
+
await this.validateAndInitialize();
|
|
176
189
|
}
|
|
177
|
-
async
|
|
190
|
+
async validateAndInitialize() {
|
|
191
|
+
if (this._initialized || this._initializing) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
this._initializing = true;
|
|
178
195
|
try {
|
|
179
|
-
//
|
|
196
|
+
// Status was already set synchronously by the caller (componentWillLoad or @Watch)
|
|
197
|
+
// to avoid a state change inside componentDidLoad that Stencil warns about.
|
|
198
|
+
await this.validateLicense();
|
|
180
199
|
if (!this.licenseValid) {
|
|
200
|
+
if (this.debug) {
|
|
201
|
+
console.error('[JAAK-DEBUG] License validation FAILED. Stopping initialization.');
|
|
202
|
+
}
|
|
181
203
|
return;
|
|
182
204
|
}
|
|
205
|
+
if (this.debug) {
|
|
206
|
+
console.log('[JAAK-DEBUG] License validation OK');
|
|
207
|
+
}
|
|
183
208
|
this.updateStatus('Preparando capturador...', 'Configurando herramientas de captura', 'initializing');
|
|
184
209
|
await this.initializeServices();
|
|
185
210
|
this.updateStatus('Preparando funciones...', 'Configurando herramientas de trabajo', 'initializing');
|
|
@@ -189,9 +214,14 @@ export class JaakStamps {
|
|
|
189
214
|
if (this.debug) {
|
|
190
215
|
this.initializePerformanceMonitor();
|
|
191
216
|
}
|
|
217
|
+
this._initialized = true;
|
|
192
218
|
}
|
|
193
219
|
catch (error) {
|
|
194
|
-
|
|
220
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
221
|
+
this.updateStatus('Error de inicialización', errorMessage, 'error');
|
|
222
|
+
}
|
|
223
|
+
finally {
|
|
224
|
+
this._initializing = false;
|
|
195
225
|
}
|
|
196
226
|
}
|
|
197
227
|
async initializeServices() {
|
|
@@ -241,14 +271,14 @@ export class JaakStamps {
|
|
|
241
271
|
}
|
|
242
272
|
async validateLicense() {
|
|
243
273
|
if (!this.license) {
|
|
244
|
-
console.error('❌ No license provided for JAAK Stamps component');
|
|
245
274
|
this.licenseError = 'Este componente requiere una licencia válida. Por favor, proporcione una licencia usando el atributo "license".';
|
|
246
275
|
this.licenseValid = false;
|
|
247
276
|
this.updateStatus('Error de licencia', 'Licencia no proporcionada', 'error');
|
|
248
277
|
return;
|
|
249
278
|
}
|
|
250
279
|
try {
|
|
251
|
-
|
|
280
|
+
if (this.debug)
|
|
281
|
+
console.log('[jaak-stamps] validating license...');
|
|
252
282
|
// Initialize license validation service
|
|
253
283
|
this.licenseValidationService = new LicenseValidationService(this.licenseEnvironment);
|
|
254
284
|
// Validate the license, passing traceId and appId if provided
|
|
@@ -256,18 +286,21 @@ export class JaakStamps {
|
|
|
256
286
|
if (response && response.access_token) {
|
|
257
287
|
this.licenseValid = true;
|
|
258
288
|
this.licenseError = null;
|
|
259
|
-
|
|
289
|
+
if (this.debug)
|
|
290
|
+
console.log('[jaak-stamps] license validated successfully');
|
|
260
291
|
// Emit the traceId (either provided or generated)
|
|
261
292
|
if (response.traceId) {
|
|
262
293
|
this.traceIdGenerated.emit({ traceId: response.traceId });
|
|
263
|
-
|
|
294
|
+
if (this.debug)
|
|
295
|
+
console.log('[jaak-stamps] traceId:', response.traceId);
|
|
264
296
|
}
|
|
265
297
|
}
|
|
266
298
|
else {
|
|
267
299
|
this.licenseValid = false;
|
|
268
300
|
this.licenseError = 'La licencia proporcionada no es válida. Por favor, verifique su licencia e intente nuevamente.';
|
|
269
301
|
this.updateStatus('Error de licencia', 'Licencia inválida', 'error');
|
|
270
|
-
|
|
302
|
+
if (this.debug)
|
|
303
|
+
console.error('[jaak-stamps] invalid license');
|
|
271
304
|
}
|
|
272
305
|
}
|
|
273
306
|
catch (error) {
|
|
@@ -275,7 +308,8 @@ export class JaakStamps {
|
|
|
275
308
|
const licenseError = error;
|
|
276
309
|
this.licenseError = licenseError.error_description || 'Error al validar la licencia. Por favor, verifique su conexión e intente nuevamente.';
|
|
277
310
|
this.updateStatus('Error de licencia', 'Fallo en la validación', 'error');
|
|
278
|
-
|
|
311
|
+
if (this.debug)
|
|
312
|
+
console.error('[jaak-stamps] license validation failed:', error);
|
|
279
313
|
}
|
|
280
314
|
}
|
|
281
315
|
async setupEventListeners() {
|
|
@@ -1562,7 +1596,7 @@ export class JaakStamps {
|
|
|
1562
1596
|
isCapturing: false
|
|
1563
1597
|
};
|
|
1564
1598
|
const cameraInfo = this.cameraInfoWithAutofocus;
|
|
1565
|
-
return (h("div", { key: '
|
|
1599
|
+
return (h("div", { key: 'b533e0e46bb543aaadc66743be6909810c7568c7', class: "detector-container" }, !this.licenseValid && this.licenseError && (h("div", { key: '3f2f7f2ada6522158bed6ecc1784e2406bbb46fc', class: "license-error-container" }, h("div", { key: 'a1bff0acfe2b0e4dff2ff9409667915ab07ebdbc', class: "license-error-card" }, h("svg", { key: '4439f6f5d3c229e345fb7fb8f2ea91fcf7e06352', class: "license-error-icon", width: "64", height: "64", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '8009833d6aff12806fa19159346f177ad71258eb', d: "M12 22C12 22 20 18 20 12V5L12 2L4 5V12C4 18 12 22 12 22Z", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { key: '689396c400df0edd56b22e703973a02e151d556b', d: "M12 8V12", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" }), h("circle", { key: '6a7ebf2223c786d8622000deca0d10067dd6d498', cx: "12", cy: "16", r: "0.5", fill: "currentColor", stroke: "currentColor", "stroke-width": "1" })), h("h2", { key: '471f9c10b12c6534dc759115c11c128918abfd03', class: "license-error-title" }, "Licencia Requerida"), h("p", { key: '0654bf2673aef315d518521918149a7459d4588c', class: "license-error-message" }, this.licenseError), h("p", { key: '8aaf0f0d9cf272d734f8f7d0ecd43fecb9fd2c88', class: "license-error-help" }, "Contacte a soporte: ", h("a", { key: '53bd8e527e3ce0965ed70a15093e10a212664d8a', href: "mailto:support@jaak.ai" }, "support@jaak.ai")), h("div", { key: '108bbbdd5ef383654388d988ace7ca5e76d6eca7', class: "license-error-footer" }, "JAAK Stamps")))), this.licenseValid && (h("div", { key: '57f82c48630bba2ee7ef07faf0cd74fed43f6d2a', class: "video-container" }, h("video", { key: '97a2b0639188408c358ea96453ba77be415b63bf', ref: el => this.videoRef = el, autoplay: true, muted: true, playsinline: true, class: this.shouldMirrorVideo ? 'mirror' : '', style: {
|
|
1566
1600
|
// Keep the element rendered (display: block) so the browser
|
|
1567
1601
|
// loads stream metadata and fires 'loadedmetadata'. Hiding it
|
|
1568
1602
|
// with display:none prevents metadata loading in Chrome and
|
|
@@ -1571,7 +1605,7 @@ export class JaakStamps {
|
|
|
1571
1605
|
// render context alive.
|
|
1572
1606
|
opacity: captureState.isVideoActive ? '1' : '0',
|
|
1573
1607
|
visibility: captureState.isVideoActive ? 'visible' : 'hidden',
|
|
1574
|
-
} }), h("div", { key: '
|
|
1608
|
+
} }), h("div", { key: '1bec42994ce3769df263cfc870ecee025a52ed9d', ref: el => this.detectionContainer = el, class: `detection-overlay ${this.shouldMirrorVideo ? 'mirror' : ''}` }, this.debug && this.detectionBoxes.map((box, index) => (h("div", { key: index, class: "detection-box", style: {
|
|
1575
1609
|
position: 'absolute',
|
|
1576
1610
|
left: `${box.x}px`,
|
|
1577
1611
|
top: `${box.y}px`,
|
|
@@ -1580,9 +1614,9 @@ export class JaakStamps {
|
|
|
1580
1614
|
border: '2px solid #32406C',
|
|
1581
1615
|
pointerEvents: 'none',
|
|
1582
1616
|
boxSizing: 'border-box'
|
|
1583
|
-
} })))), this.isMaskReady && (h("div", { key: '
|
|
1617
|
+
} })))), this.isMaskReady && (h("div", { key: 'f88f149cbaf5bbf330ef0075423d1e6c67b5c7f0', class: "overlay-mask" }, h("div", { key: '70228ae3af11ecf5d321b1071fd9f8ec9a88e27c', class: "card-outline" }, h("div", { key: '465c8ec7952453668736dd730baffc4a8a731123', class: "side side-top" }), h("div", { key: '421277c9d9f6441ecaecee3c159bd6cdd677d5ee', class: "side side-right" }), h("div", { key: '24793d3e86b2cd4c12d3ca6b94e5703bded895ff', class: "side side-bottom" }), h("div", { key: '0a474a4afff857518281b021b23dcdde10f715f3', class: "side side-left" })), !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: '396969da92aab145f8d06d73246341e950176f7e', class: `guide-text ${this.showPerformanceMessage ? 'performance-warning-text' : ''}` }, this.getGuideText(captureState.step))), captureState.step === 'back' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: '1cdadfffa4b51edbed1e2a8e1163cc677aa25be6', class: "back-capture-section" }, h("div", { key: '7ee551c033a9018abc282f6ca50b8d9a0fd58561', class: "back-capture-buttons" }, (!this.useDocumentDetector || this.performanceDegradedMode || this.showManualCaptureButton) && (h("button", { key: 'c477248ff527cde290a4b733573e70809c317219', class: "capture-button primary-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-back' && (h("span", { key: '846d379dd42c927271494e26fbab413034a7d3e4', class: "button-spinner" })), "Capturar Reverso")), h("button", { key: '056a549211f964b8b112d7c87fb2a4a44bed9891', class: "skip-button", onClick: () => this.skipBackCapture(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'skip-back' && (h("span", { key: '1415973f65372077bc2c073fa3bcac12926d9aa1', class: "button-spinner" })), this.enableBackDocumentTimer && this.backDocumentTimerRemaining > 0
|
|
1584
1618
|
? `Saltar reverso (${this.backDocumentTimerRemaining}s)`
|
|
1585
|
-
: 'Saltar reverso')))), captureState.isVideoActive && (h("div", { key: '
|
|
1619
|
+
: 'Saltar reverso')))), captureState.isVideoActive && (h("div", { key: '80af397e68e479a8f72cbf419f2a27062e75bb9f', class: "camera-controls" }, h("button", { key: 'e0c243dbf19530c0e73ad6ad698c0c1632c8bbcc', class: `camera-selector-button ${this.isSwitchingCamera ? 'loading' : ''}`, onClick: () => this.toggleCameraSelector(), type: "button", title: "Seleccionar c\u00E1mara", disabled: this.isSwitchingCamera }, this.isSwitchingCamera ? (h("div", { class: "button-spinner" })) : ('Cámaras')))), this.showCameraSelector && cameraInfo.availableCameras.length > 0 && (h("div", { key: '2c2bd71e6c8d3946cc4b27a6f5ca2baf6fe76dfd', class: "camera-selector-dropdown" }, h("div", { key: 'a3fe75222fc85a30090d2a8a14c97b40608a2b58', class: "camera-selector-header" }, h("span", { key: 'a70f84e97d28937b9f5b3f6d18a3760bbb675ae5' }, "Seleccionar C\u00E1mara"), h("button", { key: '07ace1d353628f287b6bccbdf5762a4a2be069b7', class: "close-selector", onClick: () => this.toggleCameraSelector(), type: "button" }, "\u00D7")), h("div", { key: '35e812b079eccce3fef8310d5396c86de80d4ebc', class: "camera-list" }, cameraInfo.availableCameras.map((camera) => (h("button", { key: camera.id, class: `camera-option ${cameraInfo.selectedCameraId === camera.id ? 'selected' : ''}`, onClick: () => this.handleCameraSwitch(camera.id), type: "button" }, h("span", { class: "camera-label" }, camera.label || `Cámara ${cameraInfo.availableCameras.indexOf(camera) + 1}`, camera.hasAutofocus && (h("span", { class: "autofocus-icon", title: "Autofoco disponible" }, "\u29BF"))), cameraInfo.selectedCameraId === camera.id && (h("span", { class: "selected-indicator" }, "\u2713")))))), h("div", { key: 'cd8e3052b8ae483c4ac3adbaf0fb741ff43196e3', class: "device-info" }, h("small", { key: '99c8ffd14e815b87e9fde60bde16417b91f416e8' }, "Dispositivo: ", cameraInfo.deviceType)))), this.showManualCaptureButton && captureState.step === 'front' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: 'b06fa4e858cb212b937c0d2a7c0a8e57c44286ad', class: "manual-capture-section" }, h("button", { key: '02f78013891b25aad3a8c1dfe279372694b67437', class: "manual-capture-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-front' && (h("span", { key: '0f8304c2674f9ebe9689dc6af366f682fadc8b8c', class: "button-spinner" })), "Capturar Frente"))))), captureState.isCapturing && (h("div", { key: '4f8d1a54209a1089fbe869470aa34a895f4236da', class: "capture-animation" })), captureState.showFlipAnimation && (h("div", { key: 'aafebea328c9237aae90a23ac5912c88c3745c9c', class: "flip-animation" }, h("div", { key: '1c94cedfe43582d7b671525dbf9cc3d5ad8d2bda', class: "id-card-icon" }), h("div", { key: '15a55492738f4a7503c4f6eedeaa735160eb4329', class: "flip-text" }, "\u00A1Voltea tu identificaci\u00F3n!"))), captureState.showSuccessAnimation && (h("div", { key: '57c27170db47116e222f224e9bce47a5e9815fdf', class: "success-animation" }, h("div", { key: '57ef50e90891bce64bf34c5a313098e4ad161ff5', class: "check-icon" }), h("div", { key: '0f2f4552bfb7b43baa3ff63abc7e5589b6e3a310', class: "success-text" }, "\u00A1Proceso completado!"))), h("div", { key: '6c46b21e2c06d470f0cb9d1d6b915db652383559', class: `component-status status-${this.currentStatus.type}` }, (this.currentStatus.type === 'loading' || this.currentStatus.type === 'initializing') && (h("div", { key: '55dc63e42673d1b58c4de6c991cf453dcf8499e1', class: "status-spinner" })), h("div", { key: 'dc2cd6149b83cd1ca89759078d1ebf7834729d2e', class: "status-content" }, h("div", { key: '08bbadc5ef735f04037e4abdc9c9f3df491c9ab9', class: "status-message" }, this.currentStatus.message), this.currentStatus.description && (h("div", { key: '2fd5f2e2f602b6714b8bbafe0f3e4393ead73b8d', class: "status-description" }, this.currentStatus.description)))), this.debug && (h("div", { key: '1e91ab156abc3126eac19b83c3bf8401d935ea95', class: "performance-monitor" }, h("div", { key: '82f1cf187d145833d7ffeba36ee13ff9cc3f93bd', class: "performance-expanded" }, h("div", { key: '0723044bf1bd77e849b2fc1ee05570a7fc842b18', class: "metrics-row" }, h("div", { key: 'a3173079186fcdce89ea72c26965af224593a89a', class: "metric-compact" }, h("span", { key: '4cd1beeae9b636d38f39d283e6a4936f57245b22', class: "metric-label" }, "FPS"), h("span", { key: '5b297af74ec878268ab6c1e5dcadeaf7ce3e4385', class: `metric-value ${this.performanceData.fps < 15 ? 'warning' : this.performanceData.fps < 10 ? 'danger' : 'good'}` }, this.performanceData.fps)), h("div", { key: '34ba1f18c1828e459929440b33be96f3ce5de329', class: "metric-compact" }, h("span", { key: '4f0c69a95fdcb2755cfb3f1f82112e367b72a9a3', class: "metric-label" }, "MEM"), h("span", { key: 'b1a71103ca929ac970fbdb73ae5f09e164bd7254', class: `metric-value ${this.performanceData.memoryUsage > 100 ? 'warning' : this.performanceData.memoryUsage > 200 ? 'danger' : 'good'}` }, this.performanceData.memoryUsage, "MB"))), h("div", { key: '70f34641bb27bdaf5326273e05ddd02bd7398bf2', class: "metrics-row" }, h("div", { key: 'bdb611ebe6b8442012d40a02dd4e75e0c3cc82ee', class: "metric-compact" }, h("span", { key: 'afa3059162ba3cbfb213b6e5ed50021bd5528610', class: "metric-label" }, "INF"), h("span", { key: '818242fa154d5afeba5536bb6b58fd775ddb6488', class: `metric-value ${this.performanceData.inferenceTime > 100 ? 'warning' : this.performanceData.inferenceTime > 200 ? 'danger' : 'good'}` }, this.performanceData.inferenceTime, "ms")), h("div", { key: '0bcb397887b0d5399a9c9c01fac9868d380806d0', class: "metric-compact" }, h("span", { key: '1266c1f8b5fcf44b97dccece815069977ce1c2b8', class: "metric-label" }, "FRAME"), h("span", { key: 'a4f2c048caf03798e18bed52951154d5ad861737', class: `metric-value ${this.performanceData.frameProcessingTime > 50 ? 'warning' : this.performanceData.frameProcessingTime > 100 ? 'danger' : 'good'}` }, this.performanceData.frameProcessingTime, "ms"))), h("div", { key: '07eae24f65b3c81d764eb62c67c0592ec5a4ab94', class: "metrics-row" }, h("div", { key: '511109a92d36fe4b7bfc604ee9ff690bf73cc0cd', class: "metric-compact" }, h("span", { key: 'd2d4fec760bacf03e80ba7e7b604c4020f60f36a', class: "metric-label" }, "DET"), h("span", { key: '5f357fdaf4d09da9142758533c24c0064426c97a', class: "metric-value good" }, this.performanceData.successfulDetections, "/", this.performanceData.totalDetections)), h("div", { key: '4afbaf1be6d66074a5fac89e8a66203f31c2f747', class: "metric-compact" }, h("span", { key: '506715eafc515643f1ca2c85ec7f1e06a3cad471', class: "metric-label" }, "RATE"), h("span", { key: 'c59b467e6196facda16d7849b63079982e1a4974', class: `metric-value ${this.performanceData.detectionRate < 30 ? 'danger' : this.performanceData.detectionRate < 60 ? 'warning' : 'good'}` }, this.performanceData.detectionRate, "%")))))), h("div", { key: '22683574db6bdd9f33b21b5d3ab706590c667011', class: "watermark" }, h("img", { key: '7ff0eb2df6c655f281bd3f71c06adbcea2be0db8', src: "https://static.jaak.ai/commons/powered-by-jaak.png", alt: "Powered by Jaak", onError: (e) => {
|
|
1586
1620
|
const img = e.target;
|
|
1587
1621
|
img.onerror = null;
|
|
1588
1622
|
img.src = POWERED_BY_JAAK_FALLBACK;
|
|
@@ -2130,7 +2164,7 @@ export class JaakStamps {
|
|
|
2130
2164
|
await this.tracingService.flush();
|
|
2131
2165
|
}
|
|
2132
2166
|
catch (error) {
|
|
2133
|
-
console.error('[
|
|
2167
|
+
console.error('[jaak-stamps] Failed to flush traces:', error);
|
|
2134
2168
|
}
|
|
2135
2169
|
}
|
|
2136
2170
|
this.captureCompleted.emit(finalImages);
|
|
@@ -2406,12 +2440,12 @@ export class JaakStamps {
|
|
|
2406
2440
|
static get encapsulation() { return "shadow"; }
|
|
2407
2441
|
static get originalStyleUrls() {
|
|
2408
2442
|
return {
|
|
2409
|
-
"$": ["
|
|
2443
|
+
"$": ["jaak-stamps.css"]
|
|
2410
2444
|
};
|
|
2411
2445
|
}
|
|
2412
2446
|
static get styleUrls() {
|
|
2413
2447
|
return {
|
|
2414
|
-
"$": ["
|
|
2448
|
+
"$": ["jaak-stamps.css"]
|
|
2415
2449
|
};
|
|
2416
2450
|
}
|
|
2417
2451
|
static get assetsDirs() { return ["../../assets"]; }
|
|
@@ -3177,5 +3211,11 @@ export class JaakStamps {
|
|
|
3177
3211
|
};
|
|
3178
3212
|
}
|
|
3179
3213
|
static get elementRef() { return "el"; }
|
|
3214
|
+
static get watchers() {
|
|
3215
|
+
return [{
|
|
3216
|
+
"propName": "license",
|
|
3217
|
+
"methodName": "onLicenseChanged"
|
|
3218
|
+
}];
|
|
3219
|
+
}
|
|
3180
3220
|
}
|
|
3181
|
-
//# sourceMappingURL=
|
|
3221
|
+
//# sourceMappingURL=jaak-stamps.js.map
|