@jaak.ai/stamps 2.4.0 → 2.4.1-beta.1

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.
@@ -791,10 +791,10 @@ class DetectionService {
791
791
  mobileNetClassMap;
792
792
  modelLoaded = false;
793
793
  deviceStrategy;
794
- MODEL_PATH = "https://storage.googleapis.com/jaak-static/web/component/stamps/ddmyp-v2.onnx";
795
- MODEL_PATH_FP32 = "https://storage.googleapis.com/jaak-static/web/component/stamps/ddmyp-v2-fp32.onnx";
796
- MOBILENET_MODEL_PATH = "https://storage.googleapis.com/jaak-static/web/component/stamps/squeezenet_new_fp32.onnx";
797
- MOBILENET_CLASSES_PATH = "https://storage.googleapis.com/jaak-static/web/component/stamps/cdmmp-v1.json";
794
+ MODEL_PATH = "https://static.jaak.ai/web/component/stamps/ddmyp-v2.onnx";
795
+ MODEL_PATH_FP32 = "https://static.jaak.ai/web/component/stamps/ddmyp-v2-fp32.onnx";
796
+ MOBILENET_MODEL_PATH = "https://static.jaak.ai/web/component/stamps/squeezenet_new_fp32.onnx";
797
+ MOBILENET_CLASSES_PATH = "https://static.jaak.ai/web/component/stamps/cdmmp-v1.json";
798
798
  INPUT_SIZE = 320;
799
799
  CONFIDENCE_THRESHOLD = 0.6;
800
800
  useFloat16 = true;
@@ -19897,7 +19897,7 @@ const JaakStamps = class {
19897
19897
  boxSizing: 'border-box'
19898
19898
  } })))), this.isMaskReady && (index.h("div", { key: '00e7b7a30d95f72fff38d37dbad7715262f4bcbc', class: "overlay-mask" }, index.h("div", { key: '7f2cefac16306c4db77145ff4a2e0c36bbf71b41', class: "card-outline" }, index.h("div", { key: '6a160a7be2fa6b39a01af7e7ac26612439726a0d', class: "side side-top" }), index.h("div", { key: '33317ed5d33142557198e315796fe472915988e5', class: "side side-right" }), index.h("div", { key: '15428b208d96c70da90540ade83ea736829b6cfc', class: "side side-bottom" }), index.h("div", { key: '615e5c6cd8861921a314372aa522ce678b035297', class: "side side-left" })), !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (index.h("div", { key: '786fdc87ffc5977ccab04e201b68cca6624a3a75', class: `guide-text ${this.showPerformanceMessage ? 'performance-warning-text' : ''}` }, this.getGuideText(captureState.step))), captureState.step === 'back' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (index.h("div", { key: '87a0b3460776e267a6288800b4c27d790f874555', class: "back-capture-section" }, index.h("div", { key: 'f75551d152bc5f1b41d56daaa44c360d42b3c6d7', class: "back-capture-buttons" }, (!this.useDocumentDetector || this.performanceDegradedMode || this.showManualCaptureButton) && (index.h("button", { key: '798801b00d7be739db78267224193a64813c92be', class: "capture-button primary-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-back' && (index.h("span", { key: '14ecf72110b1583bd8c4e75f669cd8c71c01d074', class: "button-spinner" })), "Capturar Reverso")), index.h("button", { key: 'ed12d7774f8399244913c468e118a6a9d9a6888b', class: "skip-button", onClick: () => this.skipBackCapture(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'skip-back' && (index.h("span", { key: 'e75d2a3da9167050fd315b27871eff612f6954ff', class: "button-spinner" })), this.enableBackDocumentTimer && this.backDocumentTimerRemaining > 0
19899
19899
  ? `Saltar reverso (${this.backDocumentTimerRemaining}s)`
19900
- : 'Saltar reverso')))), captureState.isVideoActive && (index.h("div", { key: '019fdafddac5d9ad093f7d0adaf0f9dda29c8944', class: "camera-controls" }, index.h("button", { key: 'dbdeac63de4cf5f09f12b1757e87fc5c5c21fc29', class: `camera-selector-button ${this.isSwitchingCamera ? 'loading' : ''}`, onClick: () => this.toggleCameraSelector(), type: "button", title: "Seleccionar c\u00E1mara", disabled: this.isSwitchingCamera }, this.isSwitchingCamera ? (index.h("div", { class: "button-spinner" })) : ('Cámaras')))), this.showCameraSelector && cameraInfo.availableCameras.length > 0 && (index.h("div", { key: 'c62b8914fba9dec18ddcecfeccb1cbe0ec59fae2', class: "camera-selector-dropdown" }, index.h("div", { key: '9a1861c72c2ae75cced3a13b4e3cce28f2f2eff3', class: "camera-selector-header" }, index.h("span", { key: 'f4d20f3efe85bf727d3cc7bb380b9fa53bfd00e8' }, "Seleccionar C\u00E1mara"), index.h("button", { key: '2cae8c595fff51108c9a17786350cc42a129bb88', class: "close-selector", onClick: () => this.toggleCameraSelector(), type: "button" }, "\u00D7")), index.h("div", { key: '643dbb27c6f52372819b9d2daf4b5f2ed67b5dc3', class: "camera-list" }, cameraInfo.availableCameras.map((camera) => (index.h("button", { key: camera.id, class: `camera-option ${cameraInfo.selectedCameraId === camera.id ? 'selected' : ''}`, onClick: () => this.handleCameraSwitch(camera.id), type: "button" }, index.h("span", { class: "camera-label" }, camera.label || `Cámara ${cameraInfo.availableCameras.indexOf(camera) + 1}`, camera.hasAutofocus && (index.h("span", { class: "autofocus-icon", title: "Autofoco disponible" }, "\u29BF"))), cameraInfo.selectedCameraId === camera.id && (index.h("span", { class: "selected-indicator" }, "\u2713")))))), index.h("div", { key: '750fe47a0ae0eb1802b3126d8e49e6b8ad536879', class: "device-info" }, index.h("small", { key: 'a6fa21c1ae530708f830c17774e226c8f06d8b96' }, "Dispositivo: ", cameraInfo.deviceType)))), this.showManualCaptureButton && captureState.step === 'front' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (index.h("div", { key: 'a2f91224f2166eb3a8962ba581196d64c7cec2cb', class: "manual-capture-section" }, index.h("button", { key: '4ce9090a4ed8e0346463ab0a77502a25990a2512', class: "manual-capture-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-front' && (index.h("span", { key: '4e9b12bdc735e86faadcf521083d42080f230183', class: "button-spinner" })), "Capturar Frente"))))), captureState.isCapturing && (index.h("div", { key: 'd275dd3d3f62cfa943efd2e69d6898981c34f547', class: "capture-animation" })), captureState.showFlipAnimation && (index.h("div", { key: '038cc4f1b245ff6fad917efb8d558e216de1771b', class: "flip-animation" }, index.h("div", { key: '61d9097585ed53d9b2798d826aac274b9ea42390', class: "id-card-icon" }), index.h("div", { key: '90db95f234a9f25aae40d3b2c480e6dc1a580a84', class: "flip-text" }, "\u00A1Voltea tu identificaci\u00F3n!"))), captureState.showSuccessAnimation && (index.h("div", { key: '586ac9d2e89fdd4bf13610e31c43142c84f4d8c3', class: "success-animation" }, index.h("div", { key: '8ed80578d1deacd808988d80d9677fb849267b1e', class: "check-icon" }), index.h("div", { key: '124615b15175f16946c0b3722fcf5a39b9ad4631', class: "success-text" }, "\u00A1Proceso completado!"))), index.h("div", { key: 'e587fd78705e91f5f3885e514f556288724bbc57', class: `component-status status-${this.currentStatus.type}` }, (this.currentStatus.type === 'loading' || this.currentStatus.type === 'initializing') && (index.h("div", { key: 'a9a8afa7f3653586778acc95ccecd6927a0350c8', class: "status-spinner" })), index.h("div", { key: 'db30d1bf772920b111e60ca22ff2fc8150e5d51f', class: "status-content" }, index.h("div", { key: '3dc8912cc18fc61d2f42173e2605ef9e3b7f906a', class: "status-message" }, this.currentStatus.message), this.currentStatus.description && (index.h("div", { key: '9025868961082897f19b1c230346a985ea3e0ca2', class: "status-description" }, this.currentStatus.description)))), this.debug && (index.h("div", { key: '8f18ba02911a3605ed88cb6f93926f9412289e56', class: "performance-monitor" }, index.h("div", { key: '5531d873b7baed61d17f7b94106a7dd953e079c1', class: "performance-expanded" }, index.h("div", { key: 'af62b9f0dcfa3f4ecdc1925fe26d36a221d74afd', class: "metrics-row" }, index.h("div", { key: '230c75005a1c8608d97486063b23897da676f9d6', class: "metric-compact" }, index.h("span", { key: '48a28744a884124517e5ce55e0e47dd16c207a6f', class: "metric-label" }, "FPS"), index.h("span", { key: 'e6504c0075f9c730898dc5597a91475e99a5550f', class: `metric-value ${this.performanceData.fps < 15 ? 'warning' : this.performanceData.fps < 10 ? 'danger' : 'good'}` }, this.performanceData.fps)), index.h("div", { key: 'df732632425cb06d47f14d18f2d87900f2ff293b', class: "metric-compact" }, index.h("span", { key: 'f32737c081480760714c3224749d67b4dffd6756', class: "metric-label" }, "MEM"), index.h("span", { key: 'd2d2ff4ed6721bfbc15bf20e41ea452b0a6f6670', class: `metric-value ${this.performanceData.memoryUsage > 100 ? 'warning' : this.performanceData.memoryUsage > 200 ? 'danger' : 'good'}` }, this.performanceData.memoryUsage, "MB"))), index.h("div", { key: '7d6333691cf92a12c8b2974b68756d2d59df4301', class: "metrics-row" }, index.h("div", { key: '63f1b39293780e01c6119c14b46febf67ff58a89', class: "metric-compact" }, index.h("span", { key: '84f4ed08009d3a2414c3a6e097c78b69d8854a3b', class: "metric-label" }, "INF"), index.h("span", { key: '5512948dcebaadc442fe9161bc4ad05ae0960dbf', class: `metric-value ${this.performanceData.inferenceTime > 100 ? 'warning' : this.performanceData.inferenceTime > 200 ? 'danger' : 'good'}` }, this.performanceData.inferenceTime, "ms")), index.h("div", { key: '9e523d2a51c36d08748a4fa3c88f0aa48ad4482e', class: "metric-compact" }, index.h("span", { key: '38593b6e84eadc87f129bfc3d5494845063c936a', class: "metric-label" }, "FRAME"), index.h("span", { key: '5fcddc82c511360870875c1be5eaaedd1523eb20', class: `metric-value ${this.performanceData.frameProcessingTime > 50 ? 'warning' : this.performanceData.frameProcessingTime > 100 ? 'danger' : 'good'}` }, this.performanceData.frameProcessingTime, "ms"))), index.h("div", { key: 'ea0ff4f807a7c70fce1938dd9b8036362855b547', class: "metrics-row" }, index.h("div", { key: '929c04a5bee635a8de0e79208cd4c6fb47fb4120', class: "metric-compact" }, index.h("span", { key: '5f3b500ede8ffcaf1c824cb0760f18d441dd4c1b', class: "metric-label" }, "DET"), index.h("span", { key: '050ae9a0f52bc4614f35f16cf8d4f47e96b5d55b', class: "metric-value good" }, this.performanceData.successfulDetections, "/", this.performanceData.totalDetections)), index.h("div", { key: '8cbee2808ec4355007a9c441495579235415f47b', class: "metric-compact" }, index.h("span", { key: '769941a75abbc120289c6663d69d3f73c783d79e', class: "metric-label" }, "RATE"), index.h("span", { key: '64b9954fd29a39bbf560833fdde393e4778fc6ec', class: `metric-value ${this.performanceData.detectionRate < 30 ? 'danger' : this.performanceData.detectionRate < 60 ? 'warning' : 'good'}` }, this.performanceData.detectionRate, "%")))))), index.h("div", { key: 'bc87799947f87213ff5f781353aa948882bfdce3', class: "watermark" }, index.h("img", { key: 'c95b85725b371769eadb95c0d8b42d3ff2f4788d', src: "https://storage.googleapis.com/jaak-static/commons/powered-by-jaak.png", alt: "Powered by Jaak" }))))));
19900
+ : 'Saltar reverso')))), captureState.isVideoActive && (index.h("div", { key: '019fdafddac5d9ad093f7d0adaf0f9dda29c8944', class: "camera-controls" }, index.h("button", { key: 'dbdeac63de4cf5f09f12b1757e87fc5c5c21fc29', class: `camera-selector-button ${this.isSwitchingCamera ? 'loading' : ''}`, onClick: () => this.toggleCameraSelector(), type: "button", title: "Seleccionar c\u00E1mara", disabled: this.isSwitchingCamera }, this.isSwitchingCamera ? (index.h("div", { class: "button-spinner" })) : ('Cámaras')))), this.showCameraSelector && cameraInfo.availableCameras.length > 0 && (index.h("div", { key: 'c62b8914fba9dec18ddcecfeccb1cbe0ec59fae2', class: "camera-selector-dropdown" }, index.h("div", { key: '9a1861c72c2ae75cced3a13b4e3cce28f2f2eff3', class: "camera-selector-header" }, index.h("span", { key: 'f4d20f3efe85bf727d3cc7bb380b9fa53bfd00e8' }, "Seleccionar C\u00E1mara"), index.h("button", { key: '2cae8c595fff51108c9a17786350cc42a129bb88', class: "close-selector", onClick: () => this.toggleCameraSelector(), type: "button" }, "\u00D7")), index.h("div", { key: '643dbb27c6f52372819b9d2daf4b5f2ed67b5dc3', class: "camera-list" }, cameraInfo.availableCameras.map((camera) => (index.h("button", { key: camera.id, class: `camera-option ${cameraInfo.selectedCameraId === camera.id ? 'selected' : ''}`, onClick: () => this.handleCameraSwitch(camera.id), type: "button" }, index.h("span", { class: "camera-label" }, camera.label || `Cámara ${cameraInfo.availableCameras.indexOf(camera) + 1}`, camera.hasAutofocus && (index.h("span", { class: "autofocus-icon", title: "Autofoco disponible" }, "\u29BF"))), cameraInfo.selectedCameraId === camera.id && (index.h("span", { class: "selected-indicator" }, "\u2713")))))), index.h("div", { key: '750fe47a0ae0eb1802b3126d8e49e6b8ad536879', class: "device-info" }, index.h("small", { key: 'a6fa21c1ae530708f830c17774e226c8f06d8b96' }, "Dispositivo: ", cameraInfo.deviceType)))), this.showManualCaptureButton && captureState.step === 'front' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (index.h("div", { key: 'a2f91224f2166eb3a8962ba581196d64c7cec2cb', class: "manual-capture-section" }, index.h("button", { key: '4ce9090a4ed8e0346463ab0a77502a25990a2512', class: "manual-capture-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-front' && (index.h("span", { key: '4e9b12bdc735e86faadcf521083d42080f230183', class: "button-spinner" })), "Capturar Frente"))))), captureState.isCapturing && (index.h("div", { key: 'd275dd3d3f62cfa943efd2e69d6898981c34f547', class: "capture-animation" })), captureState.showFlipAnimation && (index.h("div", { key: '038cc4f1b245ff6fad917efb8d558e216de1771b', class: "flip-animation" }, index.h("div", { key: '61d9097585ed53d9b2798d826aac274b9ea42390', class: "id-card-icon" }), index.h("div", { key: '90db95f234a9f25aae40d3b2c480e6dc1a580a84', class: "flip-text" }, "\u00A1Voltea tu identificaci\u00F3n!"))), captureState.showSuccessAnimation && (index.h("div", { key: '586ac9d2e89fdd4bf13610e31c43142c84f4d8c3', class: "success-animation" }, index.h("div", { key: '8ed80578d1deacd808988d80d9677fb849267b1e', class: "check-icon" }), index.h("div", { key: '124615b15175f16946c0b3722fcf5a39b9ad4631', class: "success-text" }, "\u00A1Proceso completado!"))), index.h("div", { key: 'e587fd78705e91f5f3885e514f556288724bbc57', class: `component-status status-${this.currentStatus.type}` }, (this.currentStatus.type === 'loading' || this.currentStatus.type === 'initializing') && (index.h("div", { key: 'a9a8afa7f3653586778acc95ccecd6927a0350c8', class: "status-spinner" })), index.h("div", { key: 'db30d1bf772920b111e60ca22ff2fc8150e5d51f', class: "status-content" }, index.h("div", { key: '3dc8912cc18fc61d2f42173e2605ef9e3b7f906a', class: "status-message" }, this.currentStatus.message), this.currentStatus.description && (index.h("div", { key: '9025868961082897f19b1c230346a985ea3e0ca2', class: "status-description" }, this.currentStatus.description)))), this.debug && (index.h("div", { key: '8f18ba02911a3605ed88cb6f93926f9412289e56', class: "performance-monitor" }, index.h("div", { key: '5531d873b7baed61d17f7b94106a7dd953e079c1', class: "performance-expanded" }, index.h("div", { key: 'af62b9f0dcfa3f4ecdc1925fe26d36a221d74afd', class: "metrics-row" }, index.h("div", { key: '230c75005a1c8608d97486063b23897da676f9d6', class: "metric-compact" }, index.h("span", { key: '48a28744a884124517e5ce55e0e47dd16c207a6f', class: "metric-label" }, "FPS"), index.h("span", { key: 'e6504c0075f9c730898dc5597a91475e99a5550f', class: `metric-value ${this.performanceData.fps < 15 ? 'warning' : this.performanceData.fps < 10 ? 'danger' : 'good'}` }, this.performanceData.fps)), index.h("div", { key: 'df732632425cb06d47f14d18f2d87900f2ff293b', class: "metric-compact" }, index.h("span", { key: 'f32737c081480760714c3224749d67b4dffd6756', class: "metric-label" }, "MEM"), index.h("span", { key: 'd2d2ff4ed6721bfbc15bf20e41ea452b0a6f6670', class: `metric-value ${this.performanceData.memoryUsage > 100 ? 'warning' : this.performanceData.memoryUsage > 200 ? 'danger' : 'good'}` }, this.performanceData.memoryUsage, "MB"))), index.h("div", { key: '7d6333691cf92a12c8b2974b68756d2d59df4301', class: "metrics-row" }, index.h("div", { key: '63f1b39293780e01c6119c14b46febf67ff58a89', class: "metric-compact" }, index.h("span", { key: '84f4ed08009d3a2414c3a6e097c78b69d8854a3b', class: "metric-label" }, "INF"), index.h("span", { key: '5512948dcebaadc442fe9161bc4ad05ae0960dbf', class: `metric-value ${this.performanceData.inferenceTime > 100 ? 'warning' : this.performanceData.inferenceTime > 200 ? 'danger' : 'good'}` }, this.performanceData.inferenceTime, "ms")), index.h("div", { key: '9e523d2a51c36d08748a4fa3c88f0aa48ad4482e', class: "metric-compact" }, index.h("span", { key: '38593b6e84eadc87f129bfc3d5494845063c936a', class: "metric-label" }, "FRAME"), index.h("span", { key: '5fcddc82c511360870875c1be5eaaedd1523eb20', class: `metric-value ${this.performanceData.frameProcessingTime > 50 ? 'warning' : this.performanceData.frameProcessingTime > 100 ? 'danger' : 'good'}` }, this.performanceData.frameProcessingTime, "ms"))), index.h("div", { key: 'ea0ff4f807a7c70fce1938dd9b8036362855b547', class: "metrics-row" }, index.h("div", { key: '929c04a5bee635a8de0e79208cd4c6fb47fb4120', class: "metric-compact" }, index.h("span", { key: '5f3b500ede8ffcaf1c824cb0760f18d441dd4c1b', class: "metric-label" }, "DET"), index.h("span", { key: '050ae9a0f52bc4614f35f16cf8d4f47e96b5d55b', class: "metric-value good" }, this.performanceData.successfulDetections, "/", this.performanceData.totalDetections)), index.h("div", { key: '8cbee2808ec4355007a9c441495579235415f47b', class: "metric-compact" }, index.h("span", { key: '769941a75abbc120289c6663d69d3f73c783d79e', class: "metric-label" }, "RATE"), index.h("span", { key: '64b9954fd29a39bbf560833fdde393e4778fc6ec', class: `metric-value ${this.performanceData.detectionRate < 30 ? 'danger' : this.performanceData.detectionRate < 60 ? 'warning' : 'good'}` }, this.performanceData.detectionRate, "%")))))), index.h("div", { key: 'bc87799947f87213ff5f781353aa948882bfdce3', class: "watermark" }, index.h("img", { key: '8ddf884a54af69e548eea8619340ca83cc736acc', src: "https://static.jaak.ai/commons/powered-by-jaak.png", alt: "Powered by Jaak" }))))));
19901
19901
  }
19902
19902
  // Utility methods
19903
19903
  updateDetectionBoxes(boxes) {