@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, g as getElement, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, g as getElement, h } from './index-Cb0ILUvS.js';
|
|
2
2
|
|
|
3
3
|
class EventBusService {
|
|
4
4
|
events = new Map();
|
|
@@ -822,7 +822,7 @@ class DetectionService {
|
|
|
822
822
|
try {
|
|
823
823
|
const sessionOptions = this.deviceStrategy.getSessionOptions(this.debug);
|
|
824
824
|
try {
|
|
825
|
-
this.session = await
|
|
825
|
+
this.session = await this.createSession(this.MODEL_PATH, sessionOptions);
|
|
826
826
|
this.detectFloat16Support();
|
|
827
827
|
}
|
|
828
828
|
catch (error) {
|
|
@@ -837,7 +837,7 @@ class DetectionService {
|
|
|
837
837
|
if (isFloat16Error) {
|
|
838
838
|
this.useFloat16 = false;
|
|
839
839
|
try {
|
|
840
|
-
this.session = await
|
|
840
|
+
this.session = await this.createSession(this.MODEL_PATH_FP32, sessionOptions);
|
|
841
841
|
}
|
|
842
842
|
catch (fp32Error) {
|
|
843
843
|
// Intentar con opciones minimas de WASM
|
|
@@ -846,7 +846,7 @@ class DetectionService {
|
|
|
846
846
|
graphOptimizationLevel: 'all',
|
|
847
847
|
logSeverityLevel: this.debug ? 2 : 4,
|
|
848
848
|
};
|
|
849
|
-
this.session = await
|
|
849
|
+
this.session = await this.createSession(this.MODEL_PATH_FP32, wasmOptions);
|
|
850
850
|
}
|
|
851
851
|
}
|
|
852
852
|
else if (isMemoryError) {
|
|
@@ -865,7 +865,7 @@ class DetectionService {
|
|
|
865
865
|
};
|
|
866
866
|
this.useFloat16 = false;
|
|
867
867
|
try {
|
|
868
|
-
this.session = await
|
|
868
|
+
this.session = await this.createSession(this.MODEL_PATH_FP32, fallbackOptions);
|
|
869
869
|
}
|
|
870
870
|
catch (fallbackError) {
|
|
871
871
|
throw new Error(`no available backend found. ERR: [wasm] RangeError: Out of memory`);
|
|
@@ -906,7 +906,7 @@ class DetectionService {
|
|
|
906
906
|
// Load model
|
|
907
907
|
const sessionOptions = this.deviceStrategy.getSessionOptions(this.debug);
|
|
908
908
|
try {
|
|
909
|
-
this.mobileNetSession = await
|
|
909
|
+
this.mobileNetSession = await this.createSession(this.MOBILENET_MODEL_PATH, sessionOptions);
|
|
910
910
|
}
|
|
911
911
|
catch (error) {
|
|
912
912
|
// Múltiples tipos de errores de memoria que pueden ocurrir
|
|
@@ -930,7 +930,7 @@ class DetectionService {
|
|
|
930
930
|
sessionLogVerbosityLevel: 0,
|
|
931
931
|
};
|
|
932
932
|
try {
|
|
933
|
-
this.mobileNetSession = await
|
|
933
|
+
this.mobileNetSession = await this.createSession(this.MOBILENET_MODEL_PATH, fallbackOptions);
|
|
934
934
|
}
|
|
935
935
|
catch (fallbackError) {
|
|
936
936
|
throw new Error(`no available backend found. ERR: [wasm] RangeError: Out of memory`);
|
|
@@ -1122,6 +1122,41 @@ class DetectionService {
|
|
|
1122
1122
|
areAllSidesAligned(alignment) {
|
|
1123
1123
|
return alignment.top && alignment.right && alignment.bottom && alignment.left;
|
|
1124
1124
|
}
|
|
1125
|
+
// Reference counter so concurrent sessions share one filter and the last
|
|
1126
|
+
// one to finish restores the original console.warn.
|
|
1127
|
+
static _ortWarnActiveCount = 0;
|
|
1128
|
+
static _originalWarn = null;
|
|
1129
|
+
static _acquireWarnFilter() {
|
|
1130
|
+
if (DetectionService._ortWarnActiveCount === 0) {
|
|
1131
|
+
DetectionService._originalWarn = console.warn;
|
|
1132
|
+
console.warn = (...args) => {
|
|
1133
|
+
const msg = typeof args[0] === 'string' ? args[0] : '';
|
|
1134
|
+
if (!msg.includes('removing requested execution provider')) {
|
|
1135
|
+
DetectionService._originalWarn.apply(console, args);
|
|
1136
|
+
}
|
|
1137
|
+
};
|
|
1138
|
+
}
|
|
1139
|
+
DetectionService._ortWarnActiveCount++;
|
|
1140
|
+
}
|
|
1141
|
+
static _releaseWarnFilter() {
|
|
1142
|
+
DetectionService._ortWarnActiveCount--;
|
|
1143
|
+
if (DetectionService._ortWarnActiveCount === 0 && DetectionService._originalWarn) {
|
|
1144
|
+
console.warn = DetectionService._originalWarn;
|
|
1145
|
+
DetectionService._originalWarn = null;
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
async createSession(modelPath, options) {
|
|
1149
|
+
// Keep the filter active for the full await: ORT may emit
|
|
1150
|
+
// "removing requested execution provider" during async resolution,
|
|
1151
|
+
// not only in the synchronous preamble of create().
|
|
1152
|
+
DetectionService._acquireWarnFilter();
|
|
1153
|
+
try {
|
|
1154
|
+
return await window.ort.InferenceSession.create(modelPath, options);
|
|
1155
|
+
}
|
|
1156
|
+
finally {
|
|
1157
|
+
DetectionService._releaseWarnFilter();
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1125
1160
|
cleanup() {
|
|
1126
1161
|
this.cleanupCanvasPool();
|
|
1127
1162
|
if (this.session) {
|
|
@@ -18632,7 +18667,7 @@ class LicenseValidationService {
|
|
|
18632
18667
|
}
|
|
18633
18668
|
}
|
|
18634
18669
|
|
|
18635
|
-
const myComponentCss = ":host{display:block;width:100%;height:100%;font-family:system-ui, -apple-system, sans-serif;color:#1a1a1a}.detector-container{display:flex;flex-direction:column;align-items:center;width:100%;height:100%}h1{font-size:24px;font-weight:500;color:#333;margin:0 0 24px 0}.video-container{position:relative;width:100%;height:100%;background-color:#000;border:none;border-radius:8px;overflow:hidden}video,.detection-overlay{position:absolute;width:100%;height:100%;border-radius:8px}video.mirror,.detection-overlay.mirror{transform:rotateY(180deg)}.detection-overlay{z-index:1;pointer-events:none}video{z-index:0}video::-webkit-media-controls{display:none !important}video::-webkit-media-controls-panel{display:none !important}video::-webkit-media-controls-play-button{display:none !important}video::-webkit-media-controls-start-playback-button{display:none !important}video::-webkit-media-controls-enclosure{display:none !important}.detection-box{transition:opacity 0.2s ease}.status{margin-top:16px;font-size:12px;color:#666}.overlay-mask{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;display:block;pointer-events:none}.card-outline{position:absolute;top:var(--mask-center-y, 50%);left:var(--mask-center-x, 50%);transform:translate(-50%, -50%);width:var(--mask-width, 88%);height:var(--mask-height, 55%);border:none;border-radius:4px;background:transparent;opacity:0.8}.side{position:absolute;background:#999;transition:background-color 0.3s ease;border-radius:1px}.side-top.aligned{border-left-color:#28a745;border-top-color:#28a745}.side-right.aligned{border-right-color:#28a745;border-top-color:#28a745}.side-bottom.aligned{border-left-color:#28a745;border-bottom-color:#28a745}.side-left.aligned{border-right-color:#28a745;border-bottom-color:#28a745}.side-top{top:-3px;left:-3px;width:30px;height:30px;border-left:6px solid #ffffff;border-top:6px solid #ffffff;background:transparent}.side-right{top:-3px;right:-3px;width:30px;height:30px;border-right:6px solid #ffffff;border-top:6px solid #ffffff;background:transparent}.side-bottom{bottom:-3px;left:-3px;width:30px;height:30px;border-left:6px solid #ffffff;border-bottom:6px solid #ffffff;background:transparent}.side-left{bottom:-3px;right:-3px;width:30px;height:30px;border-right:6px solid #ffffff;border-bottom:6px solid #ffffff;background:transparent}.guide-text{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);background:rgba(0, 0, 0, 0.25);backdrop-filter:blur(20px);border-radius:12px;border:1px solid rgba(255, 255, 255, 0.1);color:#ffffff;font-size:12px;font-weight:500;text-align:center;white-space:normal;padding:13px;max-width:300px;z-index:20;height:fit-content;width:fit-content;animation:slideInFromTopCentered 0.3s ease-out}.quality-indicator{position:absolute;top:20px;right:20px;display:flex;align-items:center;gap:8px;background:rgba(0, 0, 0, 0.8);padding:8px 12px;border-radius:20px;z-index:25;transition:all 0.3s ease}.quality-indicator.warning{background:rgba(255, 152, 0, 0.9)}.quality-indicator.good{background:rgba(76, 175, 80, 0.9)}.quality-score{color:#fff;font-size:12px;font-weight:600;min-width:30px;text-align:center}.quality-status{width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:bold;color:#fff;transition:all 0.3s ease}.quality-status.ready{background:#4CAF50}.quality-status.not-ready{background:#f44336}.card-outline.quality-warning{animation:qualityWarning 1s ease-in-out infinite alternate}@keyframes qualityWarning{0%{box-shadow:0 0 0 3px rgba(255, 152, 0, 0.6)}100%{box-shadow:0 0 0 6px rgba(255, 152, 0, 0.3)}}.capture-animation{position:absolute;top:0;left:0;width:100%;height:100%;background:#fff;opacity:0;z-index:30;pointer-events:none;animation:captureFlash 0.6s ease-out}@keyframes captureFlash{0%{opacity:0}15%{opacity:0.8}30%{opacity:0}45%{opacity:0.4}60%{opacity:0}100%{opacity:0}}.card-outline.capturing{animation:pulseGreen 0.6s ease-out}@keyframes pulseGreen{0%{border-color:#28a745;box-shadow:0 0 0 4px rgba(40, 167, 69, 0)}50%{border-color:#28a745;box-shadow:0 0 0 8px rgba(40, 167, 69, 0.6)}100%{border-color:#28a745;box-shadow:0 0 0 4px rgba(40, 167, 69, 0)}}.flip-animation{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);z-index:35;pointer-events:none;opacity:0;animation:showFlipInstruction 3s ease-in-out;display:flex;flex-direction:column;align-items:center;justify-content:center}.id-card-icon{width:80px;height:50px;background:linear-gradient(135deg, #6c757d 0%, #495057 100%);border-radius:8px;position:relative;animation:flipCard 2s ease-in-out infinite;box-shadow:0 4px 12px rgba(0, 0, 0, 0.3)}.id-card-icon::before{content:'';position:absolute;top:8px;left:8px;width:16px;height:12px;background:rgba(255, 255, 255, 0.9);border-radius:2px}.id-card-icon::after{content:'';position:absolute;top:25px;left:8px;width:64px;height:3px;background:rgba(255, 255, 255, 0.7);border-radius:1px;box-shadow:0 6px 0 rgba(255, 255, 255, 0.7), 0 12px 0 rgba(255, 255, 255, 0.7)}.flip-text{margin-top:12px;color:#fff;font-size:14px;font-weight:600;text-align:center;background:rgba(128, 128, 128, 0.8);padding:12px 20px;border-radius:20px;max-width:300px}@keyframes showFlipInstruction{0%{opacity:0;transform:translate(-50%, -50%) scale(0.8)}15%{opacity:1;transform:translate(-50%, -50%) scale(1)}85%{opacity:1;transform:translate(-50%, -50%) scale(1)}100%{opacity:0;transform:translate(-50%, -50%) scale(0.8)}}@keyframes flipCard{0%{transform:rotateY(0deg)}50%{transform:rotateY(180deg)}100%{transform:rotateY(360deg)}}.success-animation{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);z-index:35;pointer-events:none;opacity:0;animation:showSuccessMessage 3s ease-in-out;display:flex;flex-direction:column;align-items:center;justify-content:center}.check-icon{width:80px;height:80px;background:linear-gradient(135deg, #6c757d 0%, #495057 100%);border-radius:50%;position:relative;animation:bounceSuccess 0.6s ease-out;box-shadow:0 4px 16px rgba(108, 117, 125, 0.4);display:flex;align-items:center;justify-content:center}.check-icon::before{content:'';position:absolute;width:20px;height:35px;border:4px solid #fff;border-top:none;border-left:none;transform:rotate(45deg);}.success-text{margin-top:16px;color:#fff;font-size:14px;font-weight:600;text-align:center;background:rgba(128, 128, 128, 0.8);padding:12px 20px;border-radius:20px;max-width:300px;animation:fadeInUp 0.5s ease-out 0.4s both}@keyframes showSuccessMessage{0%{opacity:0;transform:translate(-50%, -50%) scale(0.5)}15%{opacity:1;transform:translate(-50%, -50%) scale(1)}85%{opacity:1;transform:translate(-50%, -50%) scale(1)}100%{opacity:0;transform:translate(-50%, -50%) scale(0.9)}}@keyframes bounceSuccess{0%{transform:scale(0)}50%{transform:scale(1.1)}100%{transform:scale(1)}}@keyframes drawCheck{0%{width:0;height:0}50%{width:20px;height:0}100%{width:20px;height:35px}}@keyframes fadeInUp{0%{opacity:0;transform:translateY(20px)}100%{opacity:1;transform:translateY(0)}}.skip-section{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);z-index:25;display:flex;flex-direction:column;align-items:center;width:100%;max-width:300px}.back-capture-section{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);z-index:25;display:flex;flex-direction:column;align-items:center;width:100%;max-width:320px}.back-capture-buttons{display:flex;gap:12px;align-items:center;justify-content:center;flex-wrap:wrap}.capture-button{pointer-events:auto;background:#fff;color:#333;border:none;border-radius:25px;padding:12px 24px;font-size:14px;font-weight:600;cursor:pointer;transition:all 0.3s ease}.capture-button:hover{background:#f8f9fa}.capture-button:active{background:#e9ecef;transform:translateY(1px)}.capture-button:disabled,.capture-button.primary-button:disabled{cursor:not-allowed !important;transform:none !important;opacity:0.7 !important;transition:none !important}@media (max-width: 480px){.back-capture-section{bottom:16px;max-width:300px}.back-capture-buttons{flex-direction:column;gap:8px;width:100%}.capture-button,.back-capture-buttons .skip-button{width:100%;max-width:200px;padding:10px 20px;font-size:13px}.capture-button:disabled,.capture-button.primary-button:disabled,.skip-button:disabled{opacity:0.7 !important;cursor:not-allowed !important}}.skip-explanation{background:rgba(0, 0, 0, 0.5);color:#ffffff;padding:10px 16px;border-radius:8px;font-size:14px;font-weight:500;text-align:center;margin-bottom:12px;box-shadow:0 2px 8px rgba(0, 0, 0, 0.2);backdrop-filter:blur(12px);border:1px solid rgba(255, 255, 255, 0.1);animation:fadeIn 0.3s ease-in-out}@keyframes fadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.guide-text.performance-warning-text{animation:gentlePulse 2s ease-in-out infinite;background:rgba(255, 107, 107, 0.3);border:1px solid rgba(255, 107, 107, 0.5)}@keyframes gentlePulse{0%,100%{transform:translate(-50%, -50%) scale(1);background:rgba(255, 107, 107, 0.3)}50%{transform:translate(-50%, -50%) scale(1.02);background:rgba(255, 107, 107, 0.4)}}.skip-button{pointer-events:auto;background:#fff;color:#333;border:none;border-radius:25px;padding:12px 24px;font-size:14px;font-weight:600;cursor:pointer;transition:all 0.3s ease}.skip-button:hover{background:#f8f9fa}.skip-button:active{background:#e9ecef;transform:translateY(1px)}.skip-button:disabled{cursor:not-allowed !important;transform:none !important;opacity:0.7 !important;transition:none !important}.camera-controls{position:absolute;top:16px;right:16px;z-index:25;display:flex;gap:8px;pointer-events:auto;animation:slideInFromTop 0.3s ease-out}.camera-selector-button{height:32px;padding:0 10px;border:none;border-radius:8px;background:rgba(0, 0, 0, 0.25);backdrop-filter:blur(12px);color:#ffffff;font-size:12px;font-weight:500;cursor:pointer;transition:all 0.2s ease;display:flex;align-items:center;justify-content:center;border:1px solid rgba(255, 255, 255, 0.1);white-space:nowrap;min-width:fit-content}.camera-selector-button:hover{background:rgba(0, 0, 0, 0.8);border-color:rgba(255, 255, 255, 0.2);transform:translateY(-1px)}.camera-selector-button:active{transform:translateY(0);background:rgba(0, 0, 0, 0.9)}.camera-selector-button:disabled,.camera-selector-button.loading{opacity:0.7;cursor:not-allowed;pointer-events:none}.camera-selector-button:disabled:hover,.camera-selector-button.loading:hover{transform:none;background:rgba(0, 0, 0, 0.6);border-color:rgba(255, 255, 255, 0.1)}.button-spinner{width:16px;height:16px;border:2px solid rgba(0, 0, 0, 0.2);border-top:2px solid #333333;border-radius:50%;animation:spin 1s linear infinite;display:inline-block;margin-right:8px;vertical-align:middle}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.camera-selector-dropdown{position:absolute;top:56px;right:16px;z-index:30;background:rgba(0, 0, 0, 0.25);backdrop-filter:blur(20px);border-radius:12px;min-width:260px;max-width:300px;border:1px solid rgba(255, 255, 255, 0.1);overflow:hidden;pointer-events:auto;animation:slideInFromTop 0.3s ease-out}@keyframes slideInFromTop{0%{opacity:0;transform:translateY(-8px) scale(0.95)}100%{opacity:1;transform:translateY(0) scale(1)}}@keyframes slideInFromTopCentered{0%{opacity:0;transform:translate(-50%, -50%) translateY(-8px) scale(0.95)}100%{opacity:1;transform:translate(-50%, -50%) translateY(0) scale(1)}}.camera-selector-header{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;border-bottom:1px solid rgba(255, 255, 255, 0.1)}.camera-selector-header span{font-weight:500;color:#ffffff;font-size:13px;opacity:0.9}.close-selector{width:20px;height:20px;border:none;background:none;color:rgba(255, 255, 255, 0.7);font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all 0.2s ease}.close-selector:hover{background:rgba(255, 255, 255, 0.1);color:#ffffff}.camera-list{padding:4px 0;max-height:240px;overflow-y:auto}.camera-option{width:100%;padding:8px 12px;border:none;background:none;text-align:left;cursor:pointer;transition:all 0.2s ease;display:flex;justify-content:flex-start;align-items:center;gap:8px;color:rgba(255, 255, 255, 0.9)}.camera-option:hover{background:rgba(255, 255, 255, 0.08)}.camera-option.selected{background:rgba(255, 255, 255, 0.12);color:#ffffff}.camera-label{font-size:13px;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:0;font-weight:400;display:flex;align-items:center;gap:6px}.camera-label .autofocus-icon{font-size:12px;color:#ffffff !important;opacity:0.8;flex-shrink:0}.selected-indicator{font-size:14px;color:#ffffff;opacity:0.9;flex-shrink:0}.device-info{padding:6px 12px;border-top:1px solid rgba(255, 255, 255, 0.1);background:rgba(255, 255, 255, 0.05)}.device-info small{color:rgba(255, 255, 255, 0.6);font-size:11px;text-transform:capitalize;font-weight:400}@media (max-width: 480px){.camera-controls{top:12px;right:12px;gap:6px}.camera-selector-button{height:36px;padding:0 12px;font-size:11px;border-radius:6px}.camera-selector-dropdown{right:12px;top:48px;min-width:240px;max-width:calc(100vw - 24px)}.camera-selector-header{padding:6px 10px}.camera-option{padding:6px 10px}.device-info{padding:4px 10px}}.watermark{position:absolute;bottom:12px;right:12px;z-index:15;pointer-events:none;opacity:0.7}.watermark img{height:24px;width:auto;filter:drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3))}.component-status{position:absolute;top:16px;left:16px;background:rgba(0, 0, 0, 0.25);backdrop-filter:blur(20px);border-radius:12px;border:1px solid rgba(255, 255, 255, 0.1);display:flex;align-items:center;gap:6px;padding:6px 10px;z-index:40;height:32px;width:fit-content;animation:slideInFromTop 0.3s ease-out}.status-spinner{width:16px;height:16px;border:1px solid rgba(255, 255, 255, 0.3);border-top:1px solid #ffffff;border-radius:50%;animation:statusSpin 1s linear infinite;flex-shrink:0}.status-content{display:flex;flex-direction:column;gap:1px}.status-message{color:#ffffff;font-size:12px;font-weight:500;margin:0}.status-description{color:rgba(255, 255, 255, 0.7);font-size:10px;line-height:1.2;margin:0}@keyframes statusSpin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@media (max-width: 480px){.component-status{top:12px;left:12px;padding:4px 8px;gap:4px;height:28px;border-radius:8px}.status-spinner{width:14px;height:14px}.status-message{font-size:11px}.status-description{font-size:9px}.guide-text{font-size:11px;padding:4px 8px;border-radius:8px}}.loading-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.85);backdrop-filter:blur(4px);display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:30;border-radius:8px}.loading-spinner{width:50px;height:50px;border:3px solid rgba(255, 255, 255, 0.15);border-top:3px solid #28a745;border-radius:50%;animation:spin 1s ease-in-out infinite;margin-bottom:16px}.loading-text{color:#ffffff;font-size:14px;font-weight:500;text-align:center;opacity:0.9;margin-bottom:4px}.loading-description{color:rgba(255, 255, 255, 0.7);font-size:12px;text-align:center;opacity:0.8}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.performance-monitor{position:absolute;top:70px;left:16px;background:rgba(0, 0, 0, 0.25);backdrop-filter:blur(20px);border-radius:12px;border:1px solid rgba(255, 255, 255, 0.1);z-index:35;width:fit-content;animation:slideInFromTop 0.3s ease-out;transition:all 0.3s ease}@keyframes slideInFromLeft{0%{opacity:0;transform:translateX(-20px) scale(0.95)}100%{opacity:1;transform:translateX(0) scale(1)}}.performance-expanded{padding:6px 10px}.metrics-row{display:flex;gap:8px;margin-bottom:4px}.metrics-row:last-child{margin-bottom:0}.metric-compact{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:50px}.metric-label{font-size:9px;color:rgba(255, 255, 255, 0.6);font-weight:500;text-transform:uppercase;letter-spacing:0.3px}.metric-value{font-size:10px;font-weight:600;font-family:'Monaco', 'Menlo', 'Consolas', monospace;padding:2px 4px;border-radius:3px;text-align:center;white-space:nowrap}.metric-value.good{color:#4ade80;background:rgba(74, 222, 128, 0.1);border:1px solid rgba(74, 222, 128, 0.2)}.metric-value.warning{color:#fbbf24;background:rgba(251, 191, 36, 0.1);border:1px solid rgba(251, 191, 36, 0.2)}.metric-value.danger{color:#f87171;background:rgba(248, 113, 113, 0.1);border:1px solid rgba(248, 113, 113, 0.2)}@media (max-width: 480px){.performance-monitor{top:60px;left:12px;width:fit-content}.performance-expanded{padding:4px 8px}.metrics-row{gap:6px;margin-bottom:3px}.metric-compact{min-width:45px;gap:1px}.metric-label{font-size:8px}.metric-value{font-size:9px;padding:1px 3px}}.quality-monitor{position:absolute;top:200px;left:16px;background:rgba(0, 0, 0, 0.25);backdrop-filter:blur(20px);border-radius:12px;border:1px solid rgba(255, 255, 255, 0.1);z-index:35;width:fit-content;animation:slideInFromLeft 0.3s ease-out;transition:all 0.3s ease}.quality-text{padding:6px 10px;font-size:11px;color:white;font-family:'Monaco', 'Menlo', 'Consolas', monospace;line-height:1.4}.quality-fail{color:#ff9999}@keyframes pulse{0%,100%{opacity:1}50%{opacity:0.7}}.metric-value.danger{animation:pulse 2s infinite}@media (max-width: 480px){.quality-monitor{top:160px;left:12px}.quality-text{padding:4px 8px;font-size:10px}}.manual-capture-section{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);z-index:25;display:flex;flex-direction:column;align-items:center;width:100%;max-width:300px}.manual-capture-button{pointer-events:auto;background:#fff;color:#333;border:none;border-radius:25px;padding:12px 24px;font-size:14px;font-weight:600;cursor:pointer;transition:all 0.3s ease}.manual-capture-button:hover{background:#f8f9fa}.manual-capture-button:active{background:#e9ecef;transform:translateY(1px)}.manual-capture-button:disabled{cursor:not-allowed !important;transform:none !important;opacity:0.7 !important;transition:none !important}@media (max-width: 480px){.manual-capture-section{bottom:16px;max-width:280px}.manual-capture-button{padding:10px 20px;font-size:13px}.manual-capture-button:disabled{opacity:0.7 !important;cursor:not-allowed !important}}.license-error-container{display:flex;align-items:center;justify-content:center;padding:40px 20px;height:100%;width:100%;background:#f5f7fa;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif}.license-error-card{background:#ffffff;border-radius:8px;box-shadow:0 2px 12px rgba(0, 0, 0, 0.1);max-width:480px;width:100%;padding:48px 32px;text-align:center}.license-error-icon{color:#dc3545;margin-bottom:24px}.license-error-title{color:#2c3e50;font-size:24px;font-weight:600;margin:0 0 16px 0}.license-error-message{color:#495057;font-size:16px;line-height:1.6;margin:0 0 24px 0}.license-error-help{color:#6c757d;font-size:14px;margin:0 0 32px 0}.license-error-help a{color:#007bff;text-decoration:none;font-weight:500}.license-error-help a:hover{text-decoration:underline}.license-error-footer{color:#adb5bd;font-size:12px;font-weight:500;padding-top:24px;border-top:1px solid #e9ecef}@media (max-width: 640px){.license-error-card{padding:32px 24px}.license-error-title{font-size:20px}.license-error-message{font-size:14px}}";
|
|
18670
|
+
const jaakStampsCss = ":host{display:block;width:100%;height:100%;font-family:system-ui, -apple-system, sans-serif;color:#1a1a1a}.detector-container{display:flex;flex-direction:column;align-items:center;width:100%;height:100%}h1{font-size:24px;font-weight:500;color:#333;margin:0 0 24px 0}.video-container{position:relative;width:100%;height:100%;background-color:#000;border:none;border-radius:8px;overflow:hidden}video,.detection-overlay{position:absolute;width:100%;height:100%;border-radius:8px}video.mirror,.detection-overlay.mirror{transform:rotateY(180deg)}.detection-overlay{z-index:1;pointer-events:none}video{z-index:0}video::-webkit-media-controls{display:none !important}video::-webkit-media-controls-panel{display:none !important}video::-webkit-media-controls-play-button{display:none !important}video::-webkit-media-controls-start-playback-button{display:none !important}video::-webkit-media-controls-enclosure{display:none !important}.detection-box{transition:opacity 0.2s ease}.status{margin-top:16px;font-size:12px;color:#666}.overlay-mask{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;display:block;pointer-events:none}.card-outline{position:absolute;top:var(--mask-center-y, 50%);left:var(--mask-center-x, 50%);transform:translate(-50%, -50%);width:var(--mask-width, 88%);height:var(--mask-height, 55%);border:none;border-radius:4px;background:transparent;opacity:0.8}.side{position:absolute;background:#999;transition:background-color 0.3s ease;border-radius:1px}.side-top.aligned{border-left-color:#28a745;border-top-color:#28a745}.side-right.aligned{border-right-color:#28a745;border-top-color:#28a745}.side-bottom.aligned{border-left-color:#28a745;border-bottom-color:#28a745}.side-left.aligned{border-right-color:#28a745;border-bottom-color:#28a745}.side-top{top:-3px;left:-3px;width:30px;height:30px;border-left:6px solid #ffffff;border-top:6px solid #ffffff;background:transparent}.side-right{top:-3px;right:-3px;width:30px;height:30px;border-right:6px solid #ffffff;border-top:6px solid #ffffff;background:transparent}.side-bottom{bottom:-3px;left:-3px;width:30px;height:30px;border-left:6px solid #ffffff;border-bottom:6px solid #ffffff;background:transparent}.side-left{bottom:-3px;right:-3px;width:30px;height:30px;border-right:6px solid #ffffff;border-bottom:6px solid #ffffff;background:transparent}.guide-text{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);background:rgba(0, 0, 0, 0.25);backdrop-filter:blur(20px);border-radius:12px;border:1px solid rgba(255, 255, 255, 0.1);color:#ffffff;font-size:12px;font-weight:500;text-align:center;white-space:normal;padding:13px;max-width:300px;z-index:20;height:fit-content;width:fit-content;animation:slideInFromTopCentered 0.3s ease-out}.quality-indicator{position:absolute;top:20px;right:20px;display:flex;align-items:center;gap:8px;background:rgba(0, 0, 0, 0.8);padding:8px 12px;border-radius:20px;z-index:25;transition:all 0.3s ease}.quality-indicator.warning{background:rgba(255, 152, 0, 0.9)}.quality-indicator.good{background:rgba(76, 175, 80, 0.9)}.quality-score{color:#fff;font-size:12px;font-weight:600;min-width:30px;text-align:center}.quality-status{width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:bold;color:#fff;transition:all 0.3s ease}.quality-status.ready{background:#4CAF50}.quality-status.not-ready{background:#f44336}.card-outline.quality-warning{animation:qualityWarning 1s ease-in-out infinite alternate}@keyframes qualityWarning{0%{box-shadow:0 0 0 3px rgba(255, 152, 0, 0.6)}100%{box-shadow:0 0 0 6px rgba(255, 152, 0, 0.3)}}.capture-animation{position:absolute;top:0;left:0;width:100%;height:100%;background:#fff;opacity:0;z-index:30;pointer-events:none;animation:captureFlash 0.6s ease-out}@keyframes captureFlash{0%{opacity:0}15%{opacity:0.8}30%{opacity:0}45%{opacity:0.4}60%{opacity:0}100%{opacity:0}}.card-outline.capturing{animation:pulseGreen 0.6s ease-out}@keyframes pulseGreen{0%{border-color:#28a745;box-shadow:0 0 0 4px rgba(40, 167, 69, 0)}50%{border-color:#28a745;box-shadow:0 0 0 8px rgba(40, 167, 69, 0.6)}100%{border-color:#28a745;box-shadow:0 0 0 4px rgba(40, 167, 69, 0)}}.flip-animation{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);z-index:35;pointer-events:none;opacity:0;animation:showFlipInstruction 3s ease-in-out;display:flex;flex-direction:column;align-items:center;justify-content:center}.id-card-icon{width:80px;height:50px;background:linear-gradient(135deg, #6c757d 0%, #495057 100%);border-radius:8px;position:relative;animation:flipCard 2s ease-in-out infinite;box-shadow:0 4px 12px rgba(0, 0, 0, 0.3)}.id-card-icon::before{content:'';position:absolute;top:8px;left:8px;width:16px;height:12px;background:rgba(255, 255, 255, 0.9);border-radius:2px}.id-card-icon::after{content:'';position:absolute;top:25px;left:8px;width:64px;height:3px;background:rgba(255, 255, 255, 0.7);border-radius:1px;box-shadow:0 6px 0 rgba(255, 255, 255, 0.7), 0 12px 0 rgba(255, 255, 255, 0.7)}.flip-text{margin-top:12px;color:#fff;font-size:14px;font-weight:600;text-align:center;background:rgba(128, 128, 128, 0.8);padding:12px 20px;border-radius:20px;max-width:300px}@keyframes showFlipInstruction{0%{opacity:0;transform:translate(-50%, -50%) scale(0.8)}15%{opacity:1;transform:translate(-50%, -50%) scale(1)}85%{opacity:1;transform:translate(-50%, -50%) scale(1)}100%{opacity:0;transform:translate(-50%, -50%) scale(0.8)}}@keyframes flipCard{0%{transform:rotateY(0deg)}50%{transform:rotateY(180deg)}100%{transform:rotateY(360deg)}}.success-animation{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);z-index:35;pointer-events:none;opacity:0;animation:showSuccessMessage 3s ease-in-out;display:flex;flex-direction:column;align-items:center;justify-content:center}.check-icon{width:80px;height:80px;background:linear-gradient(135deg, #6c757d 0%, #495057 100%);border-radius:50%;position:relative;animation:bounceSuccess 0.6s ease-out;box-shadow:0 4px 16px rgba(108, 117, 125, 0.4);display:flex;align-items:center;justify-content:center}.check-icon::before{content:'';position:absolute;width:20px;height:35px;border:4px solid #fff;border-top:none;border-left:none;transform:rotate(45deg);}.success-text{margin-top:16px;color:#fff;font-size:14px;font-weight:600;text-align:center;background:rgba(128, 128, 128, 0.8);padding:12px 20px;border-radius:20px;max-width:300px;animation:fadeInUp 0.5s ease-out 0.4s both}@keyframes showSuccessMessage{0%{opacity:0;transform:translate(-50%, -50%) scale(0.5)}15%{opacity:1;transform:translate(-50%, -50%) scale(1)}85%{opacity:1;transform:translate(-50%, -50%) scale(1)}100%{opacity:0;transform:translate(-50%, -50%) scale(0.9)}}@keyframes bounceSuccess{0%{transform:scale(0)}50%{transform:scale(1.1)}100%{transform:scale(1)}}@keyframes drawCheck{0%{width:0;height:0}50%{width:20px;height:0}100%{width:20px;height:35px}}@keyframes fadeInUp{0%{opacity:0;transform:translateY(20px)}100%{opacity:1;transform:translateY(0)}}.skip-section{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);z-index:25;display:flex;flex-direction:column;align-items:center;width:100%;max-width:300px}.back-capture-section{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);z-index:25;display:flex;flex-direction:column;align-items:center;width:100%;max-width:320px}.back-capture-buttons{display:flex;gap:12px;align-items:center;justify-content:center;flex-wrap:wrap}.capture-button{pointer-events:auto;background:#fff;color:#333;border:none;border-radius:25px;padding:12px 24px;font-size:14px;font-weight:600;cursor:pointer;transition:all 0.3s ease}.capture-button:hover{background:#f8f9fa}.capture-button:active{background:#e9ecef;transform:translateY(1px)}.capture-button:disabled,.capture-button.primary-button:disabled{cursor:not-allowed !important;transform:none !important;opacity:0.7 !important;transition:none !important}@media (max-width: 480px){.back-capture-section{bottom:16px;max-width:300px}.back-capture-buttons{flex-direction:column;gap:8px;width:100%}.capture-button,.back-capture-buttons .skip-button{width:100%;max-width:200px;padding:10px 20px;font-size:13px}.capture-button:disabled,.capture-button.primary-button:disabled,.skip-button:disabled{opacity:0.7 !important;cursor:not-allowed !important}}.skip-explanation{background:rgba(0, 0, 0, 0.5);color:#ffffff;padding:10px 16px;border-radius:8px;font-size:14px;font-weight:500;text-align:center;margin-bottom:12px;box-shadow:0 2px 8px rgba(0, 0, 0, 0.2);backdrop-filter:blur(12px);border:1px solid rgba(255, 255, 255, 0.1);animation:fadeIn 0.3s ease-in-out}@keyframes fadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.guide-text.performance-warning-text{animation:gentlePulse 2s ease-in-out infinite;background:rgba(255, 107, 107, 0.3);border:1px solid rgba(255, 107, 107, 0.5)}@keyframes gentlePulse{0%,100%{transform:translate(-50%, -50%) scale(1);background:rgba(255, 107, 107, 0.3)}50%{transform:translate(-50%, -50%) scale(1.02);background:rgba(255, 107, 107, 0.4)}}.skip-button{pointer-events:auto;background:#fff;color:#333;border:none;border-radius:25px;padding:12px 24px;font-size:14px;font-weight:600;cursor:pointer;transition:all 0.3s ease}.skip-button:hover{background:#f8f9fa}.skip-button:active{background:#e9ecef;transform:translateY(1px)}.skip-button:disabled{cursor:not-allowed !important;transform:none !important;opacity:0.7 !important;transition:none !important}.camera-controls{position:absolute;top:16px;right:16px;z-index:25;display:flex;gap:8px;pointer-events:auto;animation:slideInFromTop 0.3s ease-out}.camera-selector-button{height:32px;padding:0 10px;border:none;border-radius:8px;background:rgba(0, 0, 0, 0.25);backdrop-filter:blur(12px);color:#ffffff;font-size:12px;font-weight:500;cursor:pointer;transition:all 0.2s ease;display:flex;align-items:center;justify-content:center;border:1px solid rgba(255, 255, 255, 0.1);white-space:nowrap;min-width:fit-content}.camera-selector-button:hover{background:rgba(0, 0, 0, 0.8);border-color:rgba(255, 255, 255, 0.2);transform:translateY(-1px)}.camera-selector-button:active{transform:translateY(0);background:rgba(0, 0, 0, 0.9)}.camera-selector-button:disabled,.camera-selector-button.loading{opacity:0.7;cursor:not-allowed;pointer-events:none}.camera-selector-button:disabled:hover,.camera-selector-button.loading:hover{transform:none;background:rgba(0, 0, 0, 0.6);border-color:rgba(255, 255, 255, 0.1)}.button-spinner{width:16px;height:16px;border:2px solid rgba(0, 0, 0, 0.2);border-top:2px solid #333333;border-radius:50%;animation:spin 1s linear infinite;display:inline-block;margin-right:8px;vertical-align:middle}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.camera-selector-dropdown{position:absolute;top:56px;right:16px;z-index:30;background:rgba(0, 0, 0, 0.25);backdrop-filter:blur(20px);border-radius:12px;min-width:260px;max-width:300px;border:1px solid rgba(255, 255, 255, 0.1);overflow:hidden;pointer-events:auto;animation:slideInFromTop 0.3s ease-out}@keyframes slideInFromTop{0%{opacity:0;transform:translateY(-8px) scale(0.95)}100%{opacity:1;transform:translateY(0) scale(1)}}@keyframes slideInFromTopCentered{0%{opacity:0;transform:translate(-50%, -50%) translateY(-8px) scale(0.95)}100%{opacity:1;transform:translate(-50%, -50%) translateY(0) scale(1)}}.camera-selector-header{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;border-bottom:1px solid rgba(255, 255, 255, 0.1)}.camera-selector-header span{font-weight:500;color:#ffffff;font-size:13px;opacity:0.9}.close-selector{width:20px;height:20px;border:none;background:none;color:rgba(255, 255, 255, 0.7);font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all 0.2s ease}.close-selector:hover{background:rgba(255, 255, 255, 0.1);color:#ffffff}.camera-list{padding:4px 0;max-height:240px;overflow-y:auto}.camera-option{width:100%;padding:8px 12px;border:none;background:none;text-align:left;cursor:pointer;transition:all 0.2s ease;display:flex;justify-content:flex-start;align-items:center;gap:8px;color:rgba(255, 255, 255, 0.9)}.camera-option:hover{background:rgba(255, 255, 255, 0.08)}.camera-option.selected{background:rgba(255, 255, 255, 0.12);color:#ffffff}.camera-label{font-size:13px;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:0;font-weight:400;display:flex;align-items:center;gap:6px}.camera-label .autofocus-icon{font-size:12px;color:#ffffff !important;opacity:0.8;flex-shrink:0}.selected-indicator{font-size:14px;color:#ffffff;opacity:0.9;flex-shrink:0}.device-info{padding:6px 12px;border-top:1px solid rgba(255, 255, 255, 0.1);background:rgba(255, 255, 255, 0.05)}.device-info small{color:rgba(255, 255, 255, 0.6);font-size:11px;text-transform:capitalize;font-weight:400}@media (max-width: 480px){.camera-controls{top:12px;right:12px;gap:6px}.camera-selector-button{height:36px;padding:0 12px;font-size:11px;border-radius:6px}.camera-selector-dropdown{right:12px;top:48px;min-width:240px;max-width:calc(100vw - 24px)}.camera-selector-header{padding:6px 10px}.camera-option{padding:6px 10px}.device-info{padding:4px 10px}}.watermark{position:absolute;bottom:12px;right:12px;z-index:15;pointer-events:none;opacity:0.7}.watermark img{height:24px;width:auto;filter:drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3))}.component-status{position:absolute;top:16px;left:16px;background:rgba(0, 0, 0, 0.25);backdrop-filter:blur(20px);border-radius:12px;border:1px solid rgba(255, 255, 255, 0.1);display:flex;align-items:center;gap:6px;padding:6px 10px;z-index:40;height:32px;width:fit-content;animation:slideInFromTop 0.3s ease-out}.status-spinner{width:16px;height:16px;border:1px solid rgba(255, 255, 255, 0.3);border-top:1px solid #ffffff;border-radius:50%;animation:statusSpin 1s linear infinite;flex-shrink:0}.status-content{display:flex;flex-direction:column;gap:1px}.status-message{color:#ffffff;font-size:12px;font-weight:500;margin:0}.status-description{color:rgba(255, 255, 255, 0.7);font-size:10px;line-height:1.2;margin:0}@keyframes statusSpin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@media (max-width: 480px){.component-status{top:12px;left:12px;padding:4px 8px;gap:4px;height:28px;border-radius:8px}.status-spinner{width:14px;height:14px}.status-message{font-size:11px}.status-description{font-size:9px}.guide-text{font-size:11px;padding:4px 8px;border-radius:8px}}.loading-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.85);backdrop-filter:blur(4px);display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:30;border-radius:8px}.loading-spinner{width:50px;height:50px;border:3px solid rgba(255, 255, 255, 0.15);border-top:3px solid #28a745;border-radius:50%;animation:spin 1s ease-in-out infinite;margin-bottom:16px}.loading-text{color:#ffffff;font-size:14px;font-weight:500;text-align:center;opacity:0.9;margin-bottom:4px}.loading-description{color:rgba(255, 255, 255, 0.7);font-size:12px;text-align:center;opacity:0.8}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.performance-monitor{position:absolute;top:70px;left:16px;background:rgba(0, 0, 0, 0.25);backdrop-filter:blur(20px);border-radius:12px;border:1px solid rgba(255, 255, 255, 0.1);z-index:35;width:fit-content;animation:slideInFromTop 0.3s ease-out;transition:all 0.3s ease}@keyframes slideInFromLeft{0%{opacity:0;transform:translateX(-20px) scale(0.95)}100%{opacity:1;transform:translateX(0) scale(1)}}.performance-expanded{padding:6px 10px}.metrics-row{display:flex;gap:8px;margin-bottom:4px}.metrics-row:last-child{margin-bottom:0}.metric-compact{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:50px}.metric-label{font-size:9px;color:rgba(255, 255, 255, 0.6);font-weight:500;text-transform:uppercase;letter-spacing:0.3px}.metric-value{font-size:10px;font-weight:600;font-family:'Monaco', 'Menlo', 'Consolas', monospace;padding:2px 4px;border-radius:3px;text-align:center;white-space:nowrap}.metric-value.good{color:#4ade80;background:rgba(74, 222, 128, 0.1);border:1px solid rgba(74, 222, 128, 0.2)}.metric-value.warning{color:#fbbf24;background:rgba(251, 191, 36, 0.1);border:1px solid rgba(251, 191, 36, 0.2)}.metric-value.danger{color:#f87171;background:rgba(248, 113, 113, 0.1);border:1px solid rgba(248, 113, 113, 0.2)}@media (max-width: 480px){.performance-monitor{top:60px;left:12px;width:fit-content}.performance-expanded{padding:4px 8px}.metrics-row{gap:6px;margin-bottom:3px}.metric-compact{min-width:45px;gap:1px}.metric-label{font-size:8px}.metric-value{font-size:9px;padding:1px 3px}}.quality-monitor{position:absolute;top:200px;left:16px;background:rgba(0, 0, 0, 0.25);backdrop-filter:blur(20px);border-radius:12px;border:1px solid rgba(255, 255, 255, 0.1);z-index:35;width:fit-content;animation:slideInFromLeft 0.3s ease-out;transition:all 0.3s ease}.quality-text{padding:6px 10px;font-size:11px;color:white;font-family:'Monaco', 'Menlo', 'Consolas', monospace;line-height:1.4}.quality-fail{color:#ff9999}@keyframes pulse{0%,100%{opacity:1}50%{opacity:0.7}}.metric-value.danger{animation:pulse 2s infinite}@media (max-width: 480px){.quality-monitor{top:160px;left:12px}.quality-text{padding:4px 8px;font-size:10px}}.manual-capture-section{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);z-index:25;display:flex;flex-direction:column;align-items:center;width:100%;max-width:300px}.manual-capture-button{pointer-events:auto;background:#fff;color:#333;border:none;border-radius:25px;padding:12px 24px;font-size:14px;font-weight:600;cursor:pointer;transition:all 0.3s ease}.manual-capture-button:hover{background:#f8f9fa}.manual-capture-button:active{background:#e9ecef;transform:translateY(1px)}.manual-capture-button:disabled{cursor:not-allowed !important;transform:none !important;opacity:0.7 !important;transition:none !important}@media (max-width: 480px){.manual-capture-section{bottom:16px;max-width:280px}.manual-capture-button{padding:10px 20px;font-size:13px}.manual-capture-button:disabled{opacity:0.7 !important;cursor:not-allowed !important}}.license-error-container{display:flex;align-items:center;justify-content:center;padding:40px 20px;height:100%;width:100%;background:#f5f7fa;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif}.license-error-card{background:#ffffff;border-radius:8px;box-shadow:0 2px 12px rgba(0, 0, 0, 0.1);max-width:480px;width:100%;padding:48px 32px;text-align:center}.license-error-icon{color:#dc3545;margin-bottom:24px}.license-error-title{color:#2c3e50;font-size:24px;font-weight:600;margin:0 0 16px 0}.license-error-message{color:#495057;font-size:16px;line-height:1.6;margin:0 0 24px 0}.license-error-help{color:#6c757d;font-size:14px;margin:0 0 32px 0}.license-error-help a{color:#007bff;text-decoration:none;font-weight:500}.license-error-help a:hover{text-decoration:underline}.license-error-footer{color:#adb5bd;font-size:12px;font-weight:500;padding-top:24px;border-top:1px solid #e9ecef}@media (max-width: 640px){.license-error-card{padding:32px 24px}.license-error-title{font-size:20px}.license-error-message{font-size:14px}}";
|
|
18636
18671
|
|
|
18637
18672
|
const JaakStamps = class {
|
|
18638
18673
|
constructor(hostRef) {
|
|
@@ -18710,6 +18745,8 @@ const JaakStamps = class {
|
|
|
18710
18745
|
licenseValid = true; // License validation status
|
|
18711
18746
|
licenseError = null; // License validation error message
|
|
18712
18747
|
classificationDisabled = false; // Classification disabled at runtime due to errors
|
|
18748
|
+
_initialized = false;
|
|
18749
|
+
_initializing = false;
|
|
18713
18750
|
// Services
|
|
18714
18751
|
licenseValidationService = null;
|
|
18715
18752
|
serviceContainer;
|
|
@@ -18779,8 +18816,10 @@ const JaakStamps = class {
|
|
|
18779
18816
|
canvasPool = [];
|
|
18780
18817
|
MAX_CANVAS_POOL_SIZE = 3;
|
|
18781
18818
|
async componentWillLoad() {
|
|
18819
|
+
// Yield one microtask so attributes set synchronously after innerHTML are reflected as props
|
|
18820
|
+
await Promise.resolve();
|
|
18782
18821
|
if (this.debug) {
|
|
18783
|
-
console.log('[JAAK-DEBUG] componentWillLoad() - Props
|
|
18822
|
+
console.log('[JAAK-DEBUG] componentWillLoad() - Props after microtask yield:');
|
|
18784
18823
|
console.log('[JAAK-DEBUG] useDocumentDetector:', this.useDocumentDetector, '(type:', typeof this.useDocumentDetector, ')');
|
|
18785
18824
|
console.log('[JAAK-DEBUG] useDocumentClassification:', this.useDocumentClassification);
|
|
18786
18825
|
console.log('[JAAK-DEBUG] debug:', this.debug);
|
|
@@ -18792,32 +18831,53 @@ const JaakStamps = class {
|
|
|
18792
18831
|
console.log('[JAAK-DEBUG] preferredCamera:', this.preferredCamera);
|
|
18793
18832
|
console.log('[JAAK-DEBUG] appId:', this.appId);
|
|
18794
18833
|
}
|
|
18795
|
-
|
|
18796
|
-
|
|
18797
|
-
|
|
18798
|
-
|
|
18799
|
-
|
|
18800
|
-
console.log('[JAAK-DEBUG] useDocumentDetector:', this.useDocumentDetector, '(type:', typeof this.useDocumentDetector, ')');
|
|
18834
|
+
if (!this.license) {
|
|
18835
|
+
// No license yet — show blocking UI; @Watch('license') triggers init when it arrives
|
|
18836
|
+
this.licenseValid = false;
|
|
18837
|
+
this.licenseError = 'Se requiere una licencia para continuar. Por favor, proporcione una licencia usando el atributo "license".';
|
|
18838
|
+
this.updateStatus('Licencia requerida', 'Proporcione una licencia para continuar', 'error');
|
|
18801
18839
|
}
|
|
18802
|
-
|
|
18803
|
-
|
|
18804
|
-
|
|
18805
|
-
|
|
18806
|
-
|
|
18807
|
-
|
|
18808
|
-
|
|
18840
|
+
else {
|
|
18841
|
+
// License present — pre-set the first status synchronously so the initial render
|
|
18842
|
+
// already shows it, preventing a state change inside componentDidLoad that Stencil
|
|
18843
|
+
// would flag as an extra re-render.
|
|
18844
|
+
this.updateStatus('Validando licencia...', 'Verificando autorización de uso', 'initializing');
|
|
18845
|
+
}
|
|
18846
|
+
// Heavy initialization is deferred to componentDidLoad so the first render is not blocked
|
|
18847
|
+
}
|
|
18848
|
+
async componentDidLoad() {
|
|
18849
|
+
// License absent at mount time — @Watch('license') handles initialization when it arrives
|
|
18850
|
+
if (!this.license || this._initialized || this._initializing) {
|
|
18809
18851
|
return;
|
|
18810
18852
|
}
|
|
18811
|
-
|
|
18812
|
-
|
|
18853
|
+
await this.validateAndInitialize();
|
|
18854
|
+
}
|
|
18855
|
+
async onLicenseChanged(newLicense) {
|
|
18856
|
+
if (!newLicense || this._initialized || this._initializing) {
|
|
18857
|
+
return;
|
|
18813
18858
|
}
|
|
18859
|
+
// Set status synchronously before the async work so the UI updates immediately
|
|
18860
|
+
this.updateStatus('Validando licencia...', 'Verificando autorización de uso', 'initializing');
|
|
18861
|
+
await this.validateAndInitialize();
|
|
18814
18862
|
}
|
|
18815
|
-
async
|
|
18863
|
+
async validateAndInitialize() {
|
|
18864
|
+
if (this._initialized || this._initializing) {
|
|
18865
|
+
return;
|
|
18866
|
+
}
|
|
18867
|
+
this._initializing = true;
|
|
18816
18868
|
try {
|
|
18817
|
-
//
|
|
18869
|
+
// Status was already set synchronously by the caller (componentWillLoad or @Watch)
|
|
18870
|
+
// to avoid a state change inside componentDidLoad that Stencil warns about.
|
|
18871
|
+
await this.validateLicense();
|
|
18818
18872
|
if (!this.licenseValid) {
|
|
18873
|
+
if (this.debug) {
|
|
18874
|
+
console.error('[JAAK-DEBUG] License validation FAILED. Stopping initialization.');
|
|
18875
|
+
}
|
|
18819
18876
|
return;
|
|
18820
18877
|
}
|
|
18878
|
+
if (this.debug) {
|
|
18879
|
+
console.log('[JAAK-DEBUG] License validation OK');
|
|
18880
|
+
}
|
|
18821
18881
|
this.updateStatus('Preparando capturador...', 'Configurando herramientas de captura', 'initializing');
|
|
18822
18882
|
await this.initializeServices();
|
|
18823
18883
|
this.updateStatus('Preparando funciones...', 'Configurando herramientas de trabajo', 'initializing');
|
|
@@ -18827,9 +18887,14 @@ const JaakStamps = class {
|
|
|
18827
18887
|
if (this.debug) {
|
|
18828
18888
|
this.initializePerformanceMonitor();
|
|
18829
18889
|
}
|
|
18890
|
+
this._initialized = true;
|
|
18830
18891
|
}
|
|
18831
18892
|
catch (error) {
|
|
18832
|
-
|
|
18893
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
18894
|
+
this.updateStatus('Error de inicialización', errorMessage, 'error');
|
|
18895
|
+
}
|
|
18896
|
+
finally {
|
|
18897
|
+
this._initializing = false;
|
|
18833
18898
|
}
|
|
18834
18899
|
}
|
|
18835
18900
|
async initializeServices() {
|
|
@@ -18879,14 +18944,14 @@ const JaakStamps = class {
|
|
|
18879
18944
|
}
|
|
18880
18945
|
async validateLicense() {
|
|
18881
18946
|
if (!this.license) {
|
|
18882
|
-
console.error('❌ No license provided for JAAK Stamps component');
|
|
18883
18947
|
this.licenseError = 'Este componente requiere una licencia válida. Por favor, proporcione una licencia usando el atributo "license".';
|
|
18884
18948
|
this.licenseValid = false;
|
|
18885
18949
|
this.updateStatus('Error de licencia', 'Licencia no proporcionada', 'error');
|
|
18886
18950
|
return;
|
|
18887
18951
|
}
|
|
18888
18952
|
try {
|
|
18889
|
-
|
|
18953
|
+
if (this.debug)
|
|
18954
|
+
console.log('[jaak-stamps] validating license...');
|
|
18890
18955
|
// Initialize license validation service
|
|
18891
18956
|
this.licenseValidationService = new LicenseValidationService(this.licenseEnvironment);
|
|
18892
18957
|
// Validate the license, passing traceId and appId if provided
|
|
@@ -18894,18 +18959,21 @@ const JaakStamps = class {
|
|
|
18894
18959
|
if (response && response.access_token) {
|
|
18895
18960
|
this.licenseValid = true;
|
|
18896
18961
|
this.licenseError = null;
|
|
18897
|
-
|
|
18962
|
+
if (this.debug)
|
|
18963
|
+
console.log('[jaak-stamps] license validated successfully');
|
|
18898
18964
|
// Emit the traceId (either provided or generated)
|
|
18899
18965
|
if (response.traceId) {
|
|
18900
18966
|
this.traceIdGenerated.emit({ traceId: response.traceId });
|
|
18901
|
-
|
|
18967
|
+
if (this.debug)
|
|
18968
|
+
console.log('[jaak-stamps] traceId:', response.traceId);
|
|
18902
18969
|
}
|
|
18903
18970
|
}
|
|
18904
18971
|
else {
|
|
18905
18972
|
this.licenseValid = false;
|
|
18906
18973
|
this.licenseError = 'La licencia proporcionada no es válida. Por favor, verifique su licencia e intente nuevamente.';
|
|
18907
18974
|
this.updateStatus('Error de licencia', 'Licencia inválida', 'error');
|
|
18908
|
-
|
|
18975
|
+
if (this.debug)
|
|
18976
|
+
console.error('[jaak-stamps] invalid license');
|
|
18909
18977
|
}
|
|
18910
18978
|
}
|
|
18911
18979
|
catch (error) {
|
|
@@ -18913,7 +18981,8 @@ const JaakStamps = class {
|
|
|
18913
18981
|
const licenseError = error;
|
|
18914
18982
|
this.licenseError = licenseError.error_description || 'Error al validar la licencia. Por favor, verifique su conexión e intente nuevamente.';
|
|
18915
18983
|
this.updateStatus('Error de licencia', 'Fallo en la validación', 'error');
|
|
18916
|
-
|
|
18984
|
+
if (this.debug)
|
|
18985
|
+
console.error('[jaak-stamps] license validation failed:', error);
|
|
18917
18986
|
}
|
|
18918
18987
|
}
|
|
18919
18988
|
async setupEventListeners() {
|
|
@@ -20199,7 +20268,7 @@ const JaakStamps = class {
|
|
|
20199
20268
|
isCapturing: false
|
|
20200
20269
|
};
|
|
20201
20270
|
const cameraInfo = this.cameraInfoWithAutofocus;
|
|
20202
|
-
return (h("div", { key: '
|
|
20271
|
+
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: {
|
|
20203
20272
|
// Keep the element rendered (display: block) so the browser
|
|
20204
20273
|
// loads stream metadata and fires 'loadedmetadata'. Hiding it
|
|
20205
20274
|
// with display:none prevents metadata loading in Chrome and
|
|
@@ -20208,7 +20277,7 @@ const JaakStamps = class {
|
|
|
20208
20277
|
// render context alive.
|
|
20209
20278
|
opacity: captureState.isVideoActive ? '1' : '0',
|
|
20210
20279
|
visibility: captureState.isVideoActive ? 'visible' : 'hidden',
|
|
20211
|
-
} }), h("div", { key: '
|
|
20280
|
+
} }), 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: {
|
|
20212
20281
|
position: 'absolute',
|
|
20213
20282
|
left: `${box.x}px`,
|
|
20214
20283
|
top: `${box.y}px`,
|
|
@@ -20217,9 +20286,9 @@ const JaakStamps = class {
|
|
|
20217
20286
|
border: '2px solid #32406C',
|
|
20218
20287
|
pointerEvents: 'none',
|
|
20219
20288
|
boxSizing: 'border-box'
|
|
20220
|
-
} })))), this.isMaskReady && (h("div", { key: '
|
|
20289
|
+
} })))), 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
|
|
20221
20290
|
? `Saltar reverso (${this.backDocumentTimerRemaining}s)`
|
|
20222
|
-
: 'Saltar reverso')))), captureState.isVideoActive && (h("div", { key: '
|
|
20291
|
+
: '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) => {
|
|
20223
20292
|
const img = e.target;
|
|
20224
20293
|
img.onerror = null;
|
|
20225
20294
|
img.src = POWERED_BY_JAAK_FALLBACK;
|
|
@@ -20767,7 +20836,7 @@ const JaakStamps = class {
|
|
|
20767
20836
|
await this.tracingService.flush();
|
|
20768
20837
|
}
|
|
20769
20838
|
catch (error) {
|
|
20770
|
-
console.error('[
|
|
20839
|
+
console.error('[jaak-stamps] Failed to flush traces:', error);
|
|
20771
20840
|
}
|
|
20772
20841
|
}
|
|
20773
20842
|
this.captureCompleted.emit(finalImages);
|
|
@@ -21040,8 +21109,11 @@ const JaakStamps = class {
|
|
|
21040
21109
|
// If pool is full, let the canvas be garbage collected
|
|
21041
21110
|
}
|
|
21042
21111
|
static get assetsDirs() { return ["../../assets"]; }
|
|
21112
|
+
static get watchers() { return {
|
|
21113
|
+
"license": ["onLicenseChanged"]
|
|
21114
|
+
}; }
|
|
21043
21115
|
};
|
|
21044
|
-
JaakStamps.style =
|
|
21116
|
+
JaakStamps.style = jaakStampsCss;
|
|
21045
21117
|
|
|
21046
21118
|
export { JaakStamps as jaak_stamps };
|
|
21047
21119
|
//# sourceMappingURL=jaak-stamps.entry.js.map
|