@jaak.ai/stamps 2.5.7-dev.3 → 2.5.7-dev.4
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/jaak-stamps.cjs.entry.js +8 -6
- package/dist/cjs/jaak-stamps.cjs.entry.js.map +1 -1
- package/dist/cjs/jaak-stamps.entry.cjs.js.map +1 -1
- package/dist/collection/components/jaak-stamps/jaak-stamps.js +8 -6
- package/dist/collection/components/jaak-stamps/jaak-stamps.js.map +1 -1
- package/dist/components/jaak-stamps.js +8 -6
- package/dist/components/jaak-stamps.js.map +1 -1
- package/dist/esm/jaak-stamps.entry.js +8 -6
- package/dist/esm/jaak-stamps.entry.js.map +1 -1
- package/dist/jaak-stamps-webcomponent/jaak-stamps-webcomponent.esm.js +1 -1
- package/dist/jaak-stamps-webcomponent/jaak-stamps.entry.esm.js.map +1 -1
- package/dist/jaak-stamps-webcomponent/{p-268577ba.entry.js → p-9afd846d.entry.js} +2 -2
- package/dist/jaak-stamps-webcomponent/{p-268577ba.entry.js.map → p-9afd846d.entry.js.map} +1 -1
- package/package.json +1 -1
|
@@ -18818,8 +18818,10 @@ const JaakStamps$1 = /*@__PURE__*/ proxyCustomElement(class JaakStamps extends H
|
|
|
18818
18818
|
canvasPool = [];
|
|
18819
18819
|
MAX_CANVAS_POOL_SIZE = 3;
|
|
18820
18820
|
async componentWillLoad() {
|
|
18821
|
-
//
|
|
18822
|
-
|
|
18821
|
+
// Use setTimeout(0) instead of Promise.resolve() so Angular's synchronous change-detection
|
|
18822
|
+
// cycle (which sets property bindings like licenseEnvironment) finishes before we read props.
|
|
18823
|
+
// A microtask yield is not enough when the consuming framework defers its first CD cycle.
|
|
18824
|
+
await new Promise(resolve => setTimeout(resolve, 0));
|
|
18823
18825
|
if (this.debug) {
|
|
18824
18826
|
console.log('[JAAK-DEBUG] componentWillLoad() - Props after microtask yield:');
|
|
18825
18827
|
console.log('[JAAK-DEBUG] useDocumentDetector:', this.useDocumentDetector, '(type:', typeof this.useDocumentDetector, ')');
|
|
@@ -20281,7 +20283,7 @@ const JaakStamps$1 = /*@__PURE__*/ proxyCustomElement(class JaakStamps extends H
|
|
|
20281
20283
|
isCapturing: false
|
|
20282
20284
|
};
|
|
20283
20285
|
const cameraInfo = this.cameraInfoWithAutofocus;
|
|
20284
|
-
return (h("div", { key: '
|
|
20286
|
+
return (h("div", { key: 'ebb920fee5499ae979cb60332342b2f0758fb497', class: "detector-container" }, !this.licenseValid && this.licenseError && (h("div", { key: 'c5f912119d581b52c66e72b67241a72b976ec44e', class: "license-error-container" }, h("div", { key: '19ab81fde436b79252b45b44e772ab303e19405e', class: "license-error-card" }, h("svg", { key: '68ab28d6649949dcfd4c13d2dc8e77486b242da5', 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: '19e0e5aa75368a125a65932d116467f65a4ffffc', 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: 'b5aee63abfc96b7851d59d5ccb19f872de0fed66', d: "M12 8V12", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" }), h("circle", { key: '5d25fedbe498d583a96ec0c5c3b91872b3cdf111', cx: "12", cy: "16", r: "0.5", fill: "currentColor", stroke: "currentColor", "stroke-width": "1" })), h("h2", { key: '679c39266afc7c3c987a3da02510a739d4f34679', class: "license-error-title" }, "Licencia Requerida"), h("p", { key: '38069563654e3aa16784e77c2539620fcf2b60f6', class: "license-error-message" }, this.licenseError), h("p", { key: '3fcd6403a7c39e3ed6e63699d051607f348b5ea2', class: "license-error-help" }, "Contacte a soporte: ", h("a", { key: '328e62a4d4a70ec06eb73aa6bb90a2b7912dfdc4', href: "mailto:support@jaak.ai" }, "support@jaak.ai")), h("div", { key: 'c16315263a11d06d1cd9a6aff673f1a8cd609d05', class: "license-error-footer" }, "JAAK Stamps")))), this.licenseValid && (h("div", { key: 'c7baf6eca897342a564c8dfe3c3e81091bb881ef', class: "video-container" }, h("video", { key: '3ea8f97b026f2e53dbee64c0cd2976d9a84c47db', ref: el => this.videoRef = el, autoplay: true, muted: true, playsinline: true, class: this.shouldMirrorVideo ? 'mirror' : '', style: {
|
|
20285
20287
|
// Keep the element rendered (display: block) so the browser
|
|
20286
20288
|
// loads stream metadata and fires 'loadedmetadata'. Hiding it
|
|
20287
20289
|
// with display:none prevents metadata loading in Chrome and
|
|
@@ -20290,7 +20292,7 @@ const JaakStamps$1 = /*@__PURE__*/ proxyCustomElement(class JaakStamps extends H
|
|
|
20290
20292
|
// render context alive.
|
|
20291
20293
|
opacity: captureState.isVideoActive ? '1' : '0',
|
|
20292
20294
|
visibility: captureState.isVideoActive ? 'visible' : 'hidden',
|
|
20293
|
-
} }), h("div", { key: '
|
|
20295
|
+
} }), h("div", { key: '03150c4c1d5b5978b7a1742760b56135873c754d', 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: {
|
|
20294
20296
|
position: 'absolute',
|
|
20295
20297
|
left: `${box.x}px`,
|
|
20296
20298
|
top: `${box.y}px`,
|
|
@@ -20299,9 +20301,9 @@ const JaakStamps$1 = /*@__PURE__*/ proxyCustomElement(class JaakStamps extends H
|
|
|
20299
20301
|
border: '2px solid #32406C',
|
|
20300
20302
|
pointerEvents: 'none',
|
|
20301
20303
|
boxSizing: 'border-box'
|
|
20302
|
-
} })))), this.isMaskReady && (h("div", { key: '
|
|
20304
|
+
} })))), this.isMaskReady && (h("div", { key: '96d73c2ff335d9dc7acf443c7b6e62613d2d3ed7', class: "overlay-mask" }, h("div", { key: 'cac27d59a12131f3d93ea763fcf7c00987861926', class: "card-outline" }, h("div", { key: '29b40014f26a20f7ec1aaa7dd1a154f834b40d2b', class: "side side-top" }), h("div", { key: 'cb31796ea1d74cfb68b4e74f7a0abbef873f67c3', class: "side side-right" }), h("div", { key: 'ec596a1ff9f6e51243359145a2f8a9ea5ceca61d', class: "side side-bottom" }), h("div", { key: '20e19a59cc88e6fab27452c828187b8916126211', class: "side side-left" })), !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: 'd03cd5a33364b1b6cb368c998e3cb05373c284c9', class: `guide-text ${this.showPerformanceMessage ? 'performance-warning-text' : ''}` }, this.getGuideText(captureState.step))), captureState.step === 'back' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: 'd4b4760cbda1af33f4e4e037c6d0222e9f5966f0', class: "back-capture-section" }, h("div", { key: '318ffc4138982564b23e84b399533034b42b9ec7', class: "back-capture-buttons" }, (!this.useDocumentDetector || this.performanceDegradedMode || this.showManualCaptureButton) && (h("button", { key: '33e12aae5d1981a56f5706ad840c46ea46686a8c', class: "capture-button primary-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-back' && (h("span", { key: '5e2d871d21c972c2ae929b06a971ecea5291ae09', class: "button-spinner" })), "Capturar Reverso")), h("button", { key: 'cd5e64d18b99893f973b8279a18ebe6058705be2', class: "skip-button", onClick: () => this.skipBackCapture(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'skip-back' && (h("span", { key: 'aa41d6aae7440fa35941734398e26b7ec5c87dd6', class: "button-spinner" })), this.enableBackDocumentTimer && this.backDocumentTimerRemaining > 0
|
|
20303
20305
|
? `Saltar reverso (${this.backDocumentTimerRemaining}s)`
|
|
20304
|
-
: 'Saltar reverso')))), captureState.isVideoActive && (h("div", { key: '
|
|
20306
|
+
: 'Saltar reverso')))), captureState.isVideoActive && (h("div", { key: '67dd6532dbba68518b1e63f3b7a4274c7c4752ee', class: "camera-controls" }, h("button", { key: '263a995b82253189b0dd38166b4922fd05116359', 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: '26b730e85d5e8b6343bc5f7b9fb7d8e17caa7020', class: "camera-selector-dropdown" }, h("div", { key: 'c738e36131f87fb1aac2d872b9e53d2e3c315056', class: "camera-selector-header" }, h("span", { key: 'b5fd2cfa2700bca4b27cec3a8ebfe1ece6fe111a' }, "Seleccionar C\u00E1mara"), h("button", { key: '5d11e0227a6727733fee1c204635146c5c748ae9', class: "close-selector", onClick: () => this.toggleCameraSelector(), type: "button" }, "\u00D7")), h("div", { key: '190a36537e7650d37c8ed8d891a1c97fd4303869', 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: '51405091e987752df5b85891ee9805b26d9e5fb8', class: "device-info" }, h("small", { key: '95c3e242217b722b584966946f4809aa61fb2b54' }, "Dispositivo: ", cameraInfo.deviceType)))), this.showManualCaptureButton && captureState.step === 'front' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: '577cc09e5ffdaeef0de4c06dbb82d299e48716d6', class: "manual-capture-section" }, h("button", { key: 'bf1fd11171e13c4c52b83d076d6cb3c79a225a84', class: "manual-capture-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-front' && (h("span", { key: 'cbf77eb7cb791bb298de3cbbafd9955535e32c15', class: "button-spinner" })), "Capturar Frente"))))), captureState.isCapturing && (h("div", { key: 'bdd3793d2ce5ba351308fb64aa5a31bfa8dd85a1', class: "capture-animation" })), captureState.showFlipAnimation && (h("div", { key: '0f9df69e3a1002967c407505b965c14061c47365', class: "flip-animation" }, h("div", { key: '1384d5b75bd5e1f3584b93711a39825ae5a9b9a0', class: "id-card-icon" }), h("div", { key: 'aa4912fe5a4ec46ca69793a454a8c51632381fcd', class: "flip-text" }, "\u00A1Voltea tu identificaci\u00F3n!"))), captureState.showSuccessAnimation && (h("div", { key: '5e95f8b372b49719dd601367e9c7ba6dfbd13e30', class: "success-animation" }, h("div", { key: '72085304ac5fe6e2777f009a2091a39381fbc219', class: "check-icon" }), h("div", { key: '1476720f83274b7002365eb8c911f6dce0b84772', class: "success-text" }, "\u00A1Proceso completado!"))), h("div", { key: '68c3f77eb5fa1f442e9c77bcc8207189fd8126e4', class: `component-status status-${this.currentStatus.type}` }, (this.currentStatus.type === 'loading' || this.currentStatus.type === 'initializing') && (h("div", { key: '22bd3df4eca189c0100795befb31408ee4399461', class: "status-spinner" })), h("div", { key: '84c5b65b1b9f3f92704589d791e817a75e2e677d', class: "status-content" }, h("div", { key: 'a474e0cc716fff4f76cfb98dd0e7783eb4521db9', class: "status-message" }, this.currentStatus.message), this.currentStatus.description && (h("div", { key: '5255fe7ddb68f84b7a33ecede21af80c4ef9c476', class: "status-description" }, this.currentStatus.description)))), this.debug && (h("div", { key: 'a4e3a44c7896d3861980cca96329cf88a1cb6693', class: "performance-monitor" }, h("div", { key: '145ec7a322e316bf9989ea72e7ca877eb9630016', class: "performance-expanded" }, h("div", { key: '5bafabe9b0c82ac4682c474dafe7ecbe9be33896', class: "metrics-row" }, h("div", { key: '2c30946e8340f20887ba3a2c769fd731388a1fc8', class: "metric-compact" }, h("span", { key: '82b3b0679c93b88f0f0d88b1cd43479f01dbbd75', class: "metric-label" }, "FPS"), h("span", { key: '9af03b3dda821a0b8fbaec5be7127dd41d897b5d', class: `metric-value ${this.performanceData.fps < 15 ? 'warning' : this.performanceData.fps < 10 ? 'danger' : 'good'}` }, this.performanceData.fps)), h("div", { key: '2d0cc36e696b72f9d616b16e8e75c9bc977dd984', class: "metric-compact" }, h("span", { key: '624beadfa8641dbd690059fc7606cadc413ac247', class: "metric-label" }, "MEM"), h("span", { key: '30bd599357c1cbe7b945d2b72c1723ba7f361982', class: `metric-value ${this.performanceData.memoryUsage > 100 ? 'warning' : this.performanceData.memoryUsage > 200 ? 'danger' : 'good'}` }, this.performanceData.memoryUsage, "MB"))), h("div", { key: '661a150fca2411a1565cda581b105dd15a17a3d5', class: "metrics-row" }, h("div", { key: '82a8101abcbdebe1a32314d866a10d7be42b3e2f', class: "metric-compact" }, h("span", { key: '5abfae37ed5ec1f1bb14785f55a61bc1364aab40', class: "metric-label" }, "INF"), h("span", { key: '481df1d1fa0e1603bea786de8f20351f2cd9f949', class: `metric-value ${this.performanceData.inferenceTime > 100 ? 'warning' : this.performanceData.inferenceTime > 200 ? 'danger' : 'good'}` }, this.performanceData.inferenceTime, "ms")), h("div", { key: 'bfd657acb2cf6686e47c2ae4a348bf6ddfd11a66', class: "metric-compact" }, h("span", { key: '8dd9dfd72ae9183dce9985cca81c6ce6f80bc072', class: "metric-label" }, "FRAME"), h("span", { key: '09bff194b73d48d5e7c400d6132eab3741cd30f7', class: `metric-value ${this.performanceData.frameProcessingTime > 50 ? 'warning' : this.performanceData.frameProcessingTime > 100 ? 'danger' : 'good'}` }, this.performanceData.frameProcessingTime, "ms"))), h("div", { key: 'ad18e77ee79c7cec2257f30ed70cf1fd4289548e', class: "metrics-row" }, h("div", { key: 'ca2614b32424d8ccaa5e0823a740dfefc17a1ed5', class: "metric-compact" }, h("span", { key: 'd4b78f37d0b23bdcc35133417960d5a744f4a7df', class: "metric-label" }, "DET"), h("span", { key: 'c8b52e13d51f737e7e6cd1985abf570db27ccb0e', class: "metric-value good" }, this.performanceData.successfulDetections, "/", this.performanceData.totalDetections)), h("div", { key: '018d1bb321178b969fa868f1cf5eecba4bfdaa1f', class: "metric-compact" }, h("span", { key: '19b475406a767cf7fe417fd7c7dad980f54536b9', class: "metric-label" }, "RATE"), h("span", { key: '5994ed1ad88e07a597d82e1246cbe90c66d58214', class: `metric-value ${this.performanceData.detectionRate < 30 ? 'danger' : this.performanceData.detectionRate < 60 ? 'warning' : 'good'}` }, this.performanceData.detectionRate, "%")))))), h("div", { key: 'f07bd04ef68386e02f0b8d468bff1547986196e5', class: "watermark" }, h("img", { key: '009735bf081ace290d1a8e1805dd5d27201898c4', src: "https://static.jaak.ai/commons/powered-by-jaak.png", alt: "Powered by Jaak", onError: (e) => {
|
|
20305
20307
|
const img = e.target;
|
|
20306
20308
|
img.onerror = null;
|
|
20307
20309
|
img.src = POWERED_BY_JAAK_FALLBACK;
|