@incodetech/core 0.0.0-dev-20260807-9907417f → 0.0.0-dev-20260810-1d53aaba
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/{BrowserDiagnosticsCryptoProvider-BzByrg2n.esm.js → BrowserDiagnosticsCryptoProvider-DVqOKb7m.esm.js} +1 -1
- package/dist/{IFeatureManagementCapability-ErPJywQ_.d.ts → IFeatureManagementCapability-DdEUp6tB.d.ts} +5 -1
- package/dist/{IIdCaptureCapability-Cj_aceph.d.ts → IIdCaptureCapability-DHTT3FC2.d.ts} +6 -0
- package/dist/ae-signature.esm.js +1 -1
- package/dist/antifraud.esm.js +1 -1
- package/dist/{antifraudManager-C4_d-1a0.esm.js → antifraudManager-B8Plzf7a.esm.js} +1 -1
- package/dist/{apiError-GcTTQxue.esm.js → apiError-kW5eUMgX.esm.js} +1 -1
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-DzaxaLf_.esm.js → authenticationManager-Bq5M5Sw-.esm.js} +3 -3
- package/dist/{authenticationStateMachine-CH0yB1n5.esm.js → authenticationStateMachine-Chq-F7Is.esm.js} +2 -2
- package/dist/certificate-issuance.esm.js +1 -1
- package/dist/consent.d.ts +1 -1
- package/dist/consent.esm.js +1 -1
- package/dist/{consentManager-lG6fCXOk.esm.js → consentManager-BApTlfA0.esm.js} +1 -1
- package/dist/{consentManager-3Pbtj-RV.d.ts → consentManager-DLOyIZzt.d.ts} +5 -5
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/{crossDocumentDataMatchManager-B5bnUpSo.esm.js → crossDocumentDataMatchManager-OmYvyung.esm.js} +1 -1
- package/dist/curp-validation.esm.js +1 -1
- package/dist/{curpValidationManager-CYkSBXCF.esm.js → curpValidationManager-UZxcrsrz.esm.js} +1 -1
- package/dist/custom-fields.esm.js +1 -1
- package/dist/custom-watchlist.esm.js +1 -1
- package/dist/{deepsightLoader-BXNzqgjC.esm.js → deepsightLoader-DLR2ajBH.esm.js} +3 -3
- package/dist/document-capture.esm.js +1 -1
- package/dist/document-upload.esm.js +1 -1
- package/dist/{documentCaptureManager-CPb1ooah.esm.js → documentCaptureManager-DszmcU-l.esm.js} +1 -1
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-DTYPCotP.esm.js → dynamicFormsManager-czLgb-3u.esm.js} +2 -2
- package/dist/{dynamicFormsStateMachine-DqhIXSL0.esm.js → dynamicFormsStateMachine-DZNdhEf_.esm.js} +1 -1
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-Dw-apOmj.esm.js → ekybManager-DjqSgoBA.esm.js} +2 -2
- package/dist/{ekybStateMachine-1np62ocf.esm.js → ekybStateMachine-B9VqEuUU.esm.js} +1 -1
- package/dist/ekyc.esm.js +1 -1
- package/dist/{ekycManager-BnPKaiV_.esm.js → ekycManager-oTstTJuL.esm.js} +1 -1
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-BjVKOU14.esm.js → electronicSignatureManager-kUqdRuPy.esm.js} +2 -2
- package/dist/email.esm.js +1 -1
- package/dist/{emailManager-D-3pYOas.esm.js → emailManager-tE-YvNtS.esm.js} +1 -1
- package/dist/{events-ethtfu2b.esm.js → events-CxfNJVZW.esm.js} +8 -6
- package/dist/events.d.ts +3 -4
- package/dist/events.esm.js +1 -1
- package/dist/extensibility.d.ts +6 -6
- package/dist/extensibility.esm.js +26 -26
- package/dist/face-match.esm.js +1 -1
- package/dist/{faceCaptureManagerFactory-C1fWhpb3.esm.js → faceCaptureManagerFactory-DapJHpxR.esm.js} +2 -2
- package/dist/{faceCaptureSetup-CWKYKKei.esm.js → faceCaptureSetup-DNrvk8Vz.esm.js} +2 -2
- package/dist/{faceMatchManager-Dnp-edw5.esm.js → faceMatchManager-BXp2WUT-.esm.js} +1 -1
- package/dist/{feature-management-CFRmD8Nr.esm.js → feature-management-DS_Nj5Gg.esm.js} +157 -23
- package/dist/feature-management.d.ts +90 -10
- package/dist/feature-management.esm.js +2 -2
- package/dist/field-comparison.esm.js +1 -1
- package/dist/{fieldComparisonManager-CU1JQDG4.esm.js → fieldComparisonManager-DhnYdYZ2.esm.js} +1 -1
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/flow.d.ts +1 -1
- package/dist/flow.esm.js +4 -4
- package/dist/{flowCompletionService-DjQepG1I.esm.js → flowCompletionService-BW8wJ1Ya.esm.js} +1 -1
- package/dist/{flowServices-DERjSTC9.esm.js → flowServices-De2U4wZB.esm.js} +4 -4
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-JVFoIOGV.esm.js → geolocationManager-QOpupgt7.esm.js} +2 -2
- package/dist/{geolocationStateMachine-DcnyGm4v.esm.js → geolocationStateMachine-CvOLKZFn.esm.js} +1 -1
- package/dist/government-validation.esm.js +1 -1
- package/dist/home.esm.js +1 -1
- package/dist/id-ocr.d.ts +1 -1
- package/dist/id-ocr.esm.js +1 -1
- package/dist/id-selfie-flow.d.ts +2 -2
- package/dist/id-selfie-flow.esm.js +7 -7
- package/dist/id-verification.esm.js +1 -1
- package/dist/id.d.ts +3 -3
- package/dist/id.esm.js +11 -7
- package/dist/{idCaptureDefaults-DrQe0hWr.esm.js → idCaptureDefaults-WeHbQM7W.esm.js} +12 -2
- package/dist/{idCaptureManager-JWz-mYr-.d.ts → idCaptureManager-BjU-Wyow.d.ts} +11 -3
- package/dist/{idCaptureManager-Dvg0GVpq.esm.js → idCaptureManager-CW_PqtYf.esm.js} +32 -6
- package/dist/{idCaptureServices-Cd8X5IYl.esm.js → idCaptureServices-Cztpla_C.esm.js} +62 -19
- package/dist/{idCaptureStateMachine-LnEIroru.esm.js → idCaptureStateMachine-B9oqtIOr.esm.js} +93 -39
- package/dist/{idOcrManager-DWGed-91.esm.js → idOcrManager-CvJZhmBR.esm.js} +1 -1
- package/dist/{idOcrManager-DXc_xRN7.d.ts → idOcrManager-dLuxey6y.d.ts} +1 -1
- package/dist/{idVerificationManager-W8v-boCx.esm.js → idVerificationManager-CduNXhWd.esm.js} +1 -1
- package/dist/identity-reuse.d.ts +1 -1
- package/dist/identity-reuse.esm.js +1 -1
- package/dist/{identityReuseManager-CUVKNTFa.esm.js → identityReuseManager-D5vXknnJ.esm.js} +1 -1
- package/dist/{identityReuseManager-v2TH5g7e.d.ts → identityReuseManager-D6pD4hcZ.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{invokeOnCaptureCallback-DVtdZdpI.esm.js → invokeOnCaptureCallback-1m1VJ3Q4.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +1 -1
- package/dist/mandatory-consent.esm.js +1 -1
- package/dist/{mandatoryConsentManager-DyPzUmsZ.d.ts → mandatoryConsentManager-B7oBXoBB.d.ts} +5 -5
- package/dist/{mandatoryConsentManager-CFd276xc.esm.js → mandatoryConsentManager-BeELm1zS.esm.js} +1 -1
- package/dist/{onDeviceFaceResults-4V5CfwpH.esm.js → onDeviceFaceResults-AOKW5LFl.esm.js} +3 -3
- package/dist/personhood.esm.js +4 -4
- package/dist/phone.esm.js +1 -1
- package/dist/{phoneManager-SONkmpec.esm.js → phoneManager-Cpiai2IM.esm.js} +1 -1
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{recordingService-XRbtK8sl.esm.js → recordingService-BvBR_orc.esm.js} +1 -1
- package/dist/redirect-to-mobile.esm.js +1 -1
- package/dist/{redirectToMobileManager-B7EYFwY_.esm.js → redirectToMobileManager-C0dfc7f6.esm.js} +1 -1
- package/dist/{runChildModule-BFB2AaPg.esm.js → runChildModule-BKZeyVoB.esm.js} +2 -2
- package/dist/selfie.esm.js +6 -6
- package/dist/{selfieManager-DPO3nuK4.esm.js → selfieManager-BXhw3-Z_.esm.js} +3 -3
- package/dist/{selfieStateMachine-CqUlaar7.esm.js → selfieStateMachine-C0HzH85W.esm.js} +2 -2
- package/dist/{session-BmUqn2Yv.esm.js → session-CeFbCodp.esm.js} +4 -4
- package/dist/session.esm.js +4 -4
- package/dist/{sessionInitializer-CHm90VzO.esm.js → sessionInitializer-zac1pYo3.esm.js} +4 -4
- package/dist/{setup-qV3Hq0Y2.esm.js → setup-CCGCRaIV.esm.js} +7 -6
- package/dist/{setup-DMFac2Ms.d.ts → setup-DywQeePQ.d.ts} +1 -1
- package/dist/signature.esm.js +1 -1
- package/dist/{signatureManager-BpstxH7R.esm.js → signatureManager-DdPgcmou.esm.js} +1 -1
- package/dist/trueSight-CPe_rGn8.esm.js +1 -0
- package/dist/{trueSightService-QAySpgvt.esm.js → trueSightService-BO9JcrCP.esm.js} +3 -3
- package/dist/trust-graph.esm.js +1 -1
- package/dist/{types-DT9tqQtP2.d.ts → types-M6eb82ra2.d.ts} +28 -1
- package/dist/video-selfie.d.ts +2 -2
- package/dist/video-selfie.esm.js +3 -3
- package/dist/{videoSelfieCameraWarmer-LiiksurI.esm.js → videoSelfieCameraWarmer-ByQI5A9h.esm.js} +3 -3
- package/dist/{videoSelfieStepDetector-OoiAbUo2.d.ts → videoSelfieStepDetector-D3oo2ofo.d.ts} +1 -1
- package/dist/wasm.d.ts +1 -1
- package/dist/wasm.esm.js +1 -1
- package/dist/watchlist-for-business.esm.js +1 -1
- package/dist/watchlist.esm.js +1 -1
- package/dist/{watchlistManager-QakKGrF0.esm.js → watchlistManager-CjSMmbyq.esm.js} +1 -1
- package/dist/workflow.esm.js +16 -16
- package/package.json +3 -3
- package/dist/trueSight-DOaDX17m.esm.js +0 -1
|
@@ -168,11 +168,12 @@ var FeatureManagementProvider = class FeatureManagementProvider {
|
|
|
168
168
|
return createFallback("error");
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
getParameterStore(name) {
|
|
171
|
+
getParameterStore(name, options) {
|
|
172
172
|
if (!this._client) return createFallback("uninitialized");
|
|
173
173
|
try {
|
|
174
|
+
const statsigOptions = options === void 0 ? void 0 : { disableExposureLog: options.disableExposureLog };
|
|
174
175
|
return {
|
|
175
|
-
get: this._client.getParameterStore(name).get,
|
|
176
|
+
get: this._client.getParameterStore(name, statsigOptions).get,
|
|
176
177
|
status: "initialized"
|
|
177
178
|
};
|
|
178
179
|
} catch {
|
|
@@ -270,7 +271,6 @@ const freshReady = () => new Promise((resolve) => {
|
|
|
270
271
|
resolveReady = resolve;
|
|
271
272
|
});
|
|
272
273
|
let readyPromise = freshReady();
|
|
273
|
-
const assignedExperiments = /* @__PURE__ */ new Set();
|
|
274
274
|
let version = 0;
|
|
275
275
|
const listeners = /* @__PURE__ */ new Set();
|
|
276
276
|
/**
|
|
@@ -408,8 +408,8 @@ function getLayer(name) {
|
|
|
408
408
|
return getProvider().getLayer(name);
|
|
409
409
|
}
|
|
410
410
|
/** Evaluates a parameter store. Returns a fallback-only result before initialization. Exposure is logged natively for the mapped source on `.get()`. */
|
|
411
|
-
function getFeatureParameterStore(name) {
|
|
412
|
-
return getProvider().getParameterStore(name);
|
|
411
|
+
function getFeatureParameterStore(name, options) {
|
|
412
|
+
return getProvider().getParameterStore(name, options);
|
|
413
413
|
}
|
|
414
414
|
/** Evaluates a dynamic config. Returns `null` before initialization or if the config is unknown. */
|
|
415
415
|
function getFeatureDynamicConfig(name) {
|
|
@@ -428,22 +428,6 @@ function logEvent(name, value, options) {
|
|
|
428
428
|
getProvider().logEvent(name, value, options);
|
|
429
429
|
}
|
|
430
430
|
/**
|
|
431
|
-
* Emits an experiment-assignment event once per flag key for the current SDK
|
|
432
|
-
* lifecycle. Calls before successful feature-management initialization are
|
|
433
|
-
* ignored.
|
|
434
|
-
*/
|
|
435
|
-
function assignExperimentOnce(flagKey, payload, eventName = "experimentAssigned") {
|
|
436
|
-
if (!getProvider().initialized || assignedExperiments.has(flagKey)) return;
|
|
437
|
-
assignedExperiments.add(flagKey);
|
|
438
|
-
logEvent(eventName, void 0, {
|
|
439
|
-
metadata: {
|
|
440
|
-
...payload,
|
|
441
|
-
flagKey
|
|
442
|
-
},
|
|
443
|
-
type: "immediate"
|
|
444
|
-
});
|
|
445
|
-
}
|
|
446
|
-
/**
|
|
447
431
|
* Tears down the active FeatureManagement client and clears the
|
|
448
432
|
* initialization-attempt flag, so a
|
|
449
433
|
* subsequent `setup()` call starts fresh instead of treating the SDK as
|
|
@@ -453,7 +437,6 @@ function assignExperimentOnce(flagKey, payload, eventName = "experimentAssigned"
|
|
|
453
437
|
function resetFeatureManagement() {
|
|
454
438
|
isFeatureManagementLocked = false;
|
|
455
439
|
readyPromise = freshReady();
|
|
456
|
-
assignedExperiments.clear();
|
|
457
440
|
getProvider().reset();
|
|
458
441
|
notifyFeatureManagementChanged();
|
|
459
442
|
}
|
|
@@ -478,4 +461,155 @@ function buildInitializeOptions(options) {
|
|
|
478
461
|
return initializeOptions;
|
|
479
462
|
}
|
|
480
463
|
//#endregion
|
|
481
|
-
|
|
464
|
+
//#region src/integrations/feature-management/experiments.ts
|
|
465
|
+
const EXPERIMENT_ASSIGNED_ANALYTICS_EVENT_GATE = "experiment_assigned_analytics_event";
|
|
466
|
+
const resolvedExperiments = /* @__PURE__ */ new Map();
|
|
467
|
+
const exposedExperiments = /* @__PURE__ */ new Set();
|
|
468
|
+
/**
|
|
469
|
+
* Non-null fallback compared by reference. A `null` code fallback disables
|
|
470
|
+
* Statsig validation; this sentinel distinguishes `unavailable` from console
|
|
471
|
+
* `not_allocated`.
|
|
472
|
+
*/
|
|
473
|
+
const EXPERIMENT_UNAVAILABLE_SENTINEL = Object.freeze({
|
|
474
|
+
schema: "v1",
|
|
475
|
+
status: "not_allocated",
|
|
476
|
+
arm: "",
|
|
477
|
+
flagKey: "",
|
|
478
|
+
experimentId: "",
|
|
479
|
+
experimentName: "",
|
|
480
|
+
params: {}
|
|
481
|
+
});
|
|
482
|
+
function isRecord(value) {
|
|
483
|
+
return typeof value === "object" && value !== null;
|
|
484
|
+
}
|
|
485
|
+
function defaultsResult(spec) {
|
|
486
|
+
return {
|
|
487
|
+
params: { ...spec.defaults },
|
|
488
|
+
assignment: null
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
function buildAssignment(payload) {
|
|
492
|
+
const flagKey = payload.flagKey;
|
|
493
|
+
const experimentId = payload.experimentId;
|
|
494
|
+
const experimentName = payload.experimentName;
|
|
495
|
+
const arm = payload.arm;
|
|
496
|
+
if (typeof flagKey !== "string" || typeof experimentId !== "string" || typeof experimentName !== "string" || typeof arm !== "string" || !flagKey || !experimentId || !experimentName || !arm) return null;
|
|
497
|
+
return {
|
|
498
|
+
flagKey,
|
|
499
|
+
experimentId,
|
|
500
|
+
experimentName,
|
|
501
|
+
variant: arm
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
function evaluateExperimentPayload(spec, raw) {
|
|
505
|
+
if (raw === EXPERIMENT_UNAVAILABLE_SENTINEL) return defaultsResult(spec);
|
|
506
|
+
if (!isRecord(raw) || raw.schema !== "v1") return defaultsResult(spec);
|
|
507
|
+
const status = raw.status;
|
|
508
|
+
if (status !== "ongoing" && status !== "completed" && status !== "not_allocated") return defaultsResult(spec);
|
|
509
|
+
if (status === "not_allocated") return defaultsResult(spec);
|
|
510
|
+
const rawParams = isRecord(raw.params) ? raw.params : {};
|
|
511
|
+
const parsedParams = spec.parseParams(rawParams);
|
|
512
|
+
if (parsedParams === null) return defaultsResult(spec);
|
|
513
|
+
const params = {
|
|
514
|
+
...spec.defaults,
|
|
515
|
+
...parsedParams
|
|
516
|
+
};
|
|
517
|
+
if (status === "completed") return {
|
|
518
|
+
params,
|
|
519
|
+
assignment: null
|
|
520
|
+
};
|
|
521
|
+
if (!getFeatureGate(EXPERIMENT_ASSIGNED_ANALYTICS_EVENT_GATE).enabled) return {
|
|
522
|
+
params,
|
|
523
|
+
assignment: null
|
|
524
|
+
};
|
|
525
|
+
return {
|
|
526
|
+
params,
|
|
527
|
+
assignment: buildAssignment(raw)
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Resolves an object-shaped experiment param with exposure suppressed (phase 1).
|
|
532
|
+
* Pass `store` when the caller already holds a reactive parameter-store handle
|
|
533
|
+
* (UI hooks) so the read logs exposure through that handle instead.
|
|
534
|
+
*/
|
|
535
|
+
function resolveExperiment(spec, options) {
|
|
536
|
+
return evaluateExperimentPayload(spec, (options?.store ?? getFeatureParameterStore("onboarding_web_sdk_ps", { disableExposureLog: true })).get(spec.storeParam, EXPERIMENT_UNAVAILABLE_SENTINEL));
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Phase 1 (core). Memoized for the SDK session: the first resolution is the arm
|
|
540
|
+
* the user actually experiences, so later identity changes cannot retroactively
|
|
541
|
+
* rewrite it. Exposure suppressed.
|
|
542
|
+
*/
|
|
543
|
+
function resolveExperimentOnce(spec) {
|
|
544
|
+
const memoized = resolvedExperiments.get(spec.storeParam);
|
|
545
|
+
if (memoized) return memoized;
|
|
546
|
+
const resolved = resolveExperiment(spec);
|
|
547
|
+
resolvedExperiments.set(spec.storeParam, resolved);
|
|
548
|
+
return resolved;
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Phase 2 (core). Performs the exposing read for its Statsig side effect at
|
|
552
|
+
* most once per SDK session (keyed by `storeParam`), then returns the memoized
|
|
553
|
+
* phase-1 assignment so analytics reports what the user saw.
|
|
554
|
+
*/
|
|
555
|
+
function exposeExperimentOnce(spec) {
|
|
556
|
+
const memoized = resolvedExperiments.get(spec.storeParam);
|
|
557
|
+
if (exposedExperiments.has(spec.storeParam)) return memoized?.assignment ?? null;
|
|
558
|
+
exposedExperiments.add(spec.storeParam);
|
|
559
|
+
const raw = getFeatureParameterStore(ONBOARDING_WEB_SDK_PARAMETER_STORE, { disableExposureLog: false }).get(spec.storeParam, EXPERIMENT_UNAVAILABLE_SENTINEL);
|
|
560
|
+
if (memoized) return memoized.assignment;
|
|
561
|
+
const resolved = evaluateExperimentPayload(spec, raw);
|
|
562
|
+
resolvedExperiments.set(spec.storeParam, resolved);
|
|
563
|
+
return resolved.assignment;
|
|
564
|
+
}
|
|
565
|
+
/** Clears phase-1 memoization and phase-2 exposure dedup. Called from SDK `reset()`. */
|
|
566
|
+
function resetResolvedExperiments() {
|
|
567
|
+
resolvedExperiments.clear();
|
|
568
|
+
exposedExperiments.clear();
|
|
569
|
+
}
|
|
570
|
+
//#endregion
|
|
571
|
+
//#region src/integrations/feature-management/experimentParams.ts
|
|
572
|
+
const booleanParam = (defaultValue) => ({
|
|
573
|
+
default: defaultValue,
|
|
574
|
+
isValid: (value) => typeof value === "boolean"
|
|
575
|
+
});
|
|
576
|
+
const numberParam = (defaultValue, bounds = {}) => ({
|
|
577
|
+
default: defaultValue,
|
|
578
|
+
isValid: (value) => typeof value === "number" && Number.isFinite(value) && (!bounds.integer || Number.isInteger(value)) && (bounds.min === void 0 || value >= bounds.min) && (bounds.max === void 0 || value <= bounds.max)
|
|
579
|
+
});
|
|
580
|
+
/** Empty strings are console mistakes, not values. */
|
|
581
|
+
const stringParam = (defaultValue) => ({
|
|
582
|
+
default: defaultValue,
|
|
583
|
+
isValid: (value) => typeof value === "string" && value.length > 0
|
|
584
|
+
});
|
|
585
|
+
const enumParam = (defaultValue, allowed) => ({
|
|
586
|
+
default: defaultValue,
|
|
587
|
+
isValid: (value) => typeof value === "string" && allowed.includes(value)
|
|
588
|
+
});
|
|
589
|
+
/**
|
|
590
|
+
* Derives the `defaults` / `parseParams` half of an `ExperimentSpec` from a
|
|
591
|
+
* schema. An omitted param keeps its code default (control users still get
|
|
592
|
+
* shipped behavior); a present-but-invalid param rejects the whole payload so
|
|
593
|
+
* a corrupt console edit can never produce a half-applied treatment.
|
|
594
|
+
*/
|
|
595
|
+
function defineExperimentParams(schema) {
|
|
596
|
+
const keys = Object.keys(schema);
|
|
597
|
+
return {
|
|
598
|
+
defaults: Object.freeze(keys.reduce((acc, key) => {
|
|
599
|
+
acc[key] = schema[key].default;
|
|
600
|
+
return acc;
|
|
601
|
+
}, {})),
|
|
602
|
+
parseParams(raw) {
|
|
603
|
+
const parsed = {};
|
|
604
|
+
for (const key of keys) {
|
|
605
|
+
if (!(key in raw) || raw[key] === void 0) continue;
|
|
606
|
+
const value = raw[key];
|
|
607
|
+
if (!schema[key].isValid(value)) return null;
|
|
608
|
+
parsed[key] = value;
|
|
609
|
+
}
|
|
610
|
+
return parsed;
|
|
611
|
+
}
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
//#endregion
|
|
615
|
+
export { resetFeatureManagement as C, applyEnvironment as D, updateFeatureManagementUser as E, getEnvironment as O, optOutFeatureManagement as S, subscribeFeatureManagement as T, getIsFeatureManagementInitialized as _, stringParam as a, initializeFeatureManagement as b, resetResolvedExperiments as c, ONBOARDING_WEB_SDK_PARAMETER_STORE as d, getExperiment as f, getFeatureParameterStore as g, getFeatureManagementVersion as h, numberParam as i, resetEnvironment as k, resolveExperiment as l, getFeatureGate as m, defineExperimentParams as n, EXPERIMENT_UNAVAILABLE_SENTINEL as o, getFeatureDynamicConfig as p, enumParam as r, exposeExperimentOnce as s, booleanParam as t, resolveExperimentOnce as u, getIsFeatureManagementLocked as v, resetFeatureManagementProviderInstance as w, logEvent as x, getLayer as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as FeatureManagementParameterStore, c as
|
|
1
|
+
import { a as FeatureManagementParameterStore, c as FeatureManagementRedactedUserInfo, i as FeatureManagementLayer, l as FeatureManagementUserUpdate, n as FeatureManagementExperiment, o as FeatureManagementParameterStoreEvaluationOptions, r as FeatureManagementGate, s as FeatureManagementReadStatus, t as FeatureManagementEventMetadata } from "./IFeatureManagementCapability-DdEUp6tB.js";
|
|
2
2
|
//#region src/integrations/feature-management/featureManagement.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Name of the shared Statsig parameter store fronting SDK-module
|
|
@@ -60,7 +60,7 @@ declare function getExperiment(name: string): FeatureManagementExperiment;
|
|
|
60
60
|
/** Evaluates a layer. Returns a fallback-only result before initialization. Exposure is logged natively per-parameter on `.get()`. */
|
|
61
61
|
declare function getLayer(name: string): FeatureManagementLayer;
|
|
62
62
|
/** Evaluates a parameter store. Returns a fallback-only result before initialization. Exposure is logged natively for the mapped source on `.get()`. */
|
|
63
|
-
declare function getFeatureParameterStore(name: string): FeatureManagementParameterStore;
|
|
63
|
+
declare function getFeatureParameterStore(name: string, options?: FeatureManagementParameterStoreEvaluationOptions): FeatureManagementParameterStore;
|
|
64
64
|
/** Evaluates a dynamic config. Returns `null` before initialization or if the config is unknown. */
|
|
65
65
|
declare function getFeatureDynamicConfig(name: string): Record<string, unknown> | null;
|
|
66
66
|
/**
|
|
@@ -76,18 +76,98 @@ declare function logEvent(name: string, value?: string | number, options?: {
|
|
|
76
76
|
metadata?: FeatureManagementEventMetadata;
|
|
77
77
|
type?: 'scheduled' | 'immediate';
|
|
78
78
|
}): void;
|
|
79
|
-
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/integrations/feature-management/experiments.d.ts
|
|
81
|
+
/** Statsig object payload for a v1 experiment param. */
|
|
82
|
+
type ExperimentTransportV1 = {
|
|
83
|
+
schema: 'v1';
|
|
84
|
+
status: 'ongoing' | 'completed' | 'not_allocated';
|
|
85
|
+
arm: string;
|
|
86
|
+
flagKey: string;
|
|
87
|
+
experimentId: string;
|
|
88
|
+
experimentName: string;
|
|
89
|
+
params: Record<string, unknown>;
|
|
90
|
+
};
|
|
91
|
+
type ExperimentSpec<P> = {
|
|
92
|
+
storeParam: string;
|
|
93
|
+
defaults: P;
|
|
94
|
+
parseParams(raw: Record<string, unknown>): Partial<P> | null;
|
|
95
|
+
};
|
|
96
|
+
type ExperimentAssignedPayload = {
|
|
97
|
+
flagKey: string;
|
|
80
98
|
experimentId: string;
|
|
81
99
|
experimentName: string;
|
|
82
|
-
module: string;
|
|
83
100
|
variant: string;
|
|
84
|
-
conditions
|
|
101
|
+
conditions?: Record<string, boolean | number | string>;
|
|
102
|
+
};
|
|
103
|
+
type ResolvedExperiment<P> = {
|
|
104
|
+
params: P;
|
|
105
|
+
/** Null when not reportable: notAllocated, shipped, unavailable, or gate off. */
|
|
106
|
+
assignment: ExperimentAssignedPayload | null;
|
|
107
|
+
};
|
|
108
|
+
type ResolveExperimentOptions = {
|
|
109
|
+
/** When omitted, a fresh store read is performed with exposure suppressed. */
|
|
110
|
+
store?: FeatureManagementParameterStore;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Non-null fallback compared by reference. A `null` code fallback disables
|
|
114
|
+
* Statsig validation; this sentinel distinguishes `unavailable` from console
|
|
115
|
+
* `not_allocated`.
|
|
116
|
+
*/
|
|
117
|
+
declare const EXPERIMENT_UNAVAILABLE_SENTINEL: Readonly<{
|
|
118
|
+
schema: "v1";
|
|
119
|
+
status: "not_allocated";
|
|
120
|
+
arm: "";
|
|
121
|
+
flagKey: "";
|
|
122
|
+
experimentId: "";
|
|
123
|
+
experimentName: "";
|
|
124
|
+
params: {};
|
|
125
|
+
}>;
|
|
126
|
+
/**
|
|
127
|
+
* Resolves an object-shaped experiment param with exposure suppressed (phase 1).
|
|
128
|
+
* Pass `store` when the caller already holds a reactive parameter-store handle
|
|
129
|
+
* (UI hooks) so the read logs exposure through that handle instead.
|
|
130
|
+
*/
|
|
131
|
+
declare function resolveExperiment<P extends object>(spec: ExperimentSpec<P>, options?: ResolveExperimentOptions): ResolvedExperiment<P>;
|
|
132
|
+
/**
|
|
133
|
+
* Phase 1 (core). Memoized for the SDK session: the first resolution is the arm
|
|
134
|
+
* the user actually experiences, so later identity changes cannot retroactively
|
|
135
|
+
* rewrite it. Exposure suppressed.
|
|
136
|
+
*/
|
|
137
|
+
declare function resolveExperimentOnce<P extends object>(spec: ExperimentSpec<P>): ResolvedExperiment<P>;
|
|
138
|
+
/**
|
|
139
|
+
* Phase 2 (core). Performs the exposing read for its Statsig side effect at
|
|
140
|
+
* most once per SDK session (keyed by `storeParam`), then returns the memoized
|
|
141
|
+
* phase-1 assignment so analytics reports what the user saw.
|
|
142
|
+
*/
|
|
143
|
+
declare function exposeExperimentOnce<P extends object>(spec: ExperimentSpec<P>): ExperimentAssignedPayload | null;
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/integrations/feature-management/experimentParams.d.ts
|
|
146
|
+
type ExperimentParamValue = boolean | number | string;
|
|
147
|
+
/** One declared param: its default and the guard that admits a store value. */
|
|
148
|
+
type ExperimentParamDescriptor<T extends ExperimentParamValue> = {
|
|
149
|
+
default: T;
|
|
150
|
+
isValid: (value: unknown) => value is T;
|
|
151
|
+
};
|
|
152
|
+
type ExperimentParamsSchema = Record<string, ExperimentParamDescriptor<ExperimentParamValue>>;
|
|
153
|
+
/** The params map a schema implies — the single source of truth for `P`. */
|
|
154
|
+
type InferExperimentParams<S extends ExperimentParamsSchema> = { [K in keyof S]: S[K] extends ExperimentParamDescriptor<infer T> ? T : never; };
|
|
155
|
+
type NumberParamBounds = {
|
|
156
|
+
min?: number;
|
|
157
|
+
max?: number;
|
|
158
|
+
integer?: boolean;
|
|
85
159
|
};
|
|
160
|
+
declare const booleanParam: (defaultValue: boolean) => ExperimentParamDescriptor<boolean>;
|
|
161
|
+
declare const numberParam: (defaultValue: number, bounds?: NumberParamBounds) => ExperimentParamDescriptor<number>;
|
|
162
|
+
/** Empty strings are console mistakes, not values. */
|
|
163
|
+
declare const stringParam: (defaultValue: string) => ExperimentParamDescriptor<string>;
|
|
164
|
+
declare const enumParam: <const T extends readonly string[]>(defaultValue: T[number], allowed: T) => ExperimentParamDescriptor<T[number]>;
|
|
86
165
|
/**
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
166
|
+
* Derives the `defaults` / `parseParams` half of an `ExperimentSpec` from a
|
|
167
|
+
* schema. An omitted param keeps its code default (control users still get
|
|
168
|
+
* shipped behavior); a present-but-invalid param rejects the whole payload so
|
|
169
|
+
* a corrupt console edit can never produce a half-applied treatment.
|
|
90
170
|
*/
|
|
91
|
-
declare function
|
|
171
|
+
declare function defineExperimentParams<S extends ExperimentParamsSchema>(schema: S): Pick<ExperimentSpec<InferExperimentParams<S>>, 'defaults' | 'parseParams'>;
|
|
92
172
|
//#endregion
|
|
93
|
-
export { type
|
|
173
|
+
export { EXPERIMENT_UNAVAILABLE_SENTINEL, type ExperimentAssignedPayload, type ExperimentParamDescriptor, type ExperimentParamValue, type ExperimentParamsSchema, type ExperimentSpec, type ExperimentTransportV1, type FeatureManagementExperiment, type FeatureManagementGate, type FeatureManagementLayer, type FeatureManagementParameterStore, type FeatureManagementParameterStoreEvaluationOptions, type FeatureManagementReadStatus, type FeatureManagementRedactedUserInfo, type FeatureManagementUserUpdate, type InferExperimentParams, type NumberParamBounds, ONBOARDING_WEB_SDK_PARAMETER_STORE, type ResolveExperimentOptions, type ResolvedExperiment, booleanParam, defineExperimentParams, enumParam, exposeExperimentOnce, getExperiment, getFeatureDynamicConfig, getFeatureGate, getFeatureManagementVersion, getFeatureParameterStore, getIsFeatureManagementInitialized, getLayer, logEvent, numberParam, resolveExperiment, resolveExperimentOnce, stringParam, subscribeFeatureManagement, updateFeatureManagementUser };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { ONBOARDING_WEB_SDK_PARAMETER_STORE,
|
|
1
|
+
import { E as updateFeatureManagementUser, T as subscribeFeatureManagement, _ as getIsFeatureManagementInitialized, a as stringParam, d as ONBOARDING_WEB_SDK_PARAMETER_STORE, f as getExperiment, g as getFeatureParameterStore, h as getFeatureManagementVersion, i as numberParam, l as resolveExperiment, m as getFeatureGate, n as defineExperimentParams, o as EXPERIMENT_UNAVAILABLE_SENTINEL, p as getFeatureDynamicConfig, r as enumParam, s as exposeExperimentOnce, t as booleanParam, u as resolveExperimentOnce, x as logEvent, y as getLayer } from "./feature-management-DS_Nj5Gg.esm.js";
|
|
2
|
+
export { EXPERIMENT_UNAVAILABLE_SENTINEL, ONBOARDING_WEB_SDK_PARAMETER_STORE, booleanParam, defineExperimentParams, enumParam, exposeExperimentOnce, getExperiment, getFeatureDynamicConfig, getFeatureGate, getFeatureManagementVersion, getFeatureParameterStore, getIsFeatureManagementInitialized, getLayer, logEvent, numberParam, resolveExperiment, resolveExperimentOnce, stringParam, subscribeFeatureManagement, updateFeatureManagementUser };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createFieldComparisonManagerFromActor, r as fieldComparisonMachine, t as createFieldComparisonManager } from "./fieldComparisonManager-
|
|
1
|
+
import { n as createFieldComparisonManagerFromActor, r as fieldComparisonMachine, t as createFieldComparisonManager } from "./fieldComparisonManager-DhnYdYZ2.esm.js";
|
|
2
2
|
export { createFieldComparisonManager, createFieldComparisonManagerFromActor, fieldComparisonMachine };
|
package/dist/{fieldComparisonManager-CU1JQDG4.esm.js → fieldComparisonManager-DhnYdYZ2.esm.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as api } from "./api-Bx3gKW_y.esm.js";
|
|
2
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
2
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CxfNJVZW.esm.js";
|
|
3
3
|
import { t as endpoints } from "./endpoints-CCzL3XD_.esm.js";
|
|
4
4
|
import { c as createManager, o as createActor, r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
5
5
|
import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
|
package/dist/fiscal-qr.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
2
2
|
import { t as api } from "./api-Bx3gKW_y.esm.js";
|
|
3
|
-
import { n as eventModuleNames, o as createManagerInstrumentation, v as addEvent } from "./events-
|
|
3
|
+
import { n as eventModuleNames, o as createManagerInstrumentation, v as addEvent } from "./events-CxfNJVZW.esm.js";
|
|
4
4
|
import { t as endpoints } from "./endpoints-CCzL3XD_.esm.js";
|
|
5
5
|
import { c as createManager, o as createActor, r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
6
6
|
import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-CtI5S0f4.esm.js";
|
package/dist/flow.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { t as AuthenticationConfig } from "./types-EELWyWpd.js";
|
|
|
9
9
|
import { r as DocumentCaptureConfig } from "./types-DelMqZLe.js";
|
|
10
10
|
import { t as DynamicFormsConfig } from "./types-BSBzhHRH.js";
|
|
11
11
|
import { t as EkybConfig } from "./types-BfHiko5D.js";
|
|
12
|
-
import { c as IdCaptureConfig } from "./types-
|
|
12
|
+
import { c as IdCaptureConfig } from "./types-M6eb82ra2.js";
|
|
13
13
|
import { r as MandatoryConsentConfig } from "./types-BX_XkMsQ2.js";
|
|
14
14
|
import { t as IdOcrConfig } from "./types-CJ7Yl9K-2.js";
|
|
15
15
|
import { t as RedirectToMobileConfig } from "./types-DPIDuhut.js";
|
package/dist/flow.esm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { v as addEvent } from "./events-
|
|
2
|
-
import { a as enrichFlowModuleConfig, c as resolveFlowModuleConfig, i as resolveDashboardModuleConfig, k as mergeDashboardConfig, n as preloadDashboardFlow, o as getRequiredWasmPipelines, s as normalizeFlowModules, t as getFlow } from "./flowServices-
|
|
1
|
+
import { v as addEvent } from "./events-CxfNJVZW.esm.js";
|
|
2
|
+
import { a as enrichFlowModuleConfig, c as resolveFlowModuleConfig, i as resolveDashboardModuleConfig, k as mergeDashboardConfig, n as preloadDashboardFlow, o as getRequiredWasmPipelines, s as normalizeFlowModules, t as getFlow } from "./flowServices-De2U4wZB.esm.js";
|
|
3
3
|
import { c as createManager, o as createActor, r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
4
4
|
import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
|
|
5
|
-
import { n as getFinishStatus, r as getTotalScoreStatus, t as classifyScoreStatus } from "./flowCompletionService-
|
|
6
|
-
import { n as isAdvanceableError, r as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-
|
|
5
|
+
import { n as getFinishStatus, r as getTotalScoreStatus, t as classifyScoreStatus } from "./flowCompletionService-BW8wJ1Ya.esm.js";
|
|
6
|
+
import { n as isAdvanceableError, r as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-BKZeyVoB.esm.js";
|
|
7
7
|
//#region src/modules/flow/noOpFlowModuleMachine.ts
|
|
8
8
|
const noOpFlowModuleMachine = setup({}).createMachine({
|
|
9
9
|
id: "noOpFlowModule",
|
package/dist/{flowCompletionService-DjQepG1I.esm.js → flowCompletionService-BW8wJ1Ya.esm.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as api } from "./api-Bx3gKW_y.esm.js";
|
|
2
2
|
import { t as endpoints } from "./endpoints-CCzL3XD_.esm.js";
|
|
3
|
-
import { r as toIncodeApiError } from "./apiError-
|
|
3
|
+
import { r as toIncodeApiError } from "./apiError-kW5eUMgX.esm.js";
|
|
4
4
|
//#region src/modules/flow/flowCompletionService.ts
|
|
5
5
|
const getFinishStatus = async (flowId, signal) => {
|
|
6
6
|
const url = `${endpoints.finishStatus}${flowId ? `?flowId=${flowId}` : ""}`;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as updateFeatureManagementUser } from "./feature-management-DS_Nj5Gg.esm.js";
|
|
2
2
|
import { r as getToken, t as api } from "./api-Bx3gKW_y.esm.js";
|
|
3
|
-
import { c as getStandaloneFlowPolicy, i as initializeSession, r as getSessionFingerprintResult } from "./sessionInitializer-
|
|
3
|
+
import { c as getStandaloneFlowPolicy, i as initializeSession, r as getSessionFingerprintResult } from "./sessionInitializer-zac1pYo3.esm.js";
|
|
4
4
|
import { t as endpoints } from "./endpoints-CCzL3XD_.esm.js";
|
|
5
|
-
import { r as toIncodeApiError } from "./apiError-
|
|
6
|
-
import "./session-
|
|
5
|
+
import { r as toIncodeApiError } from "./apiError-kW5eUMgX.esm.js";
|
|
6
|
+
import "./session-CeFbCodp.esm.js";
|
|
7
7
|
import { i as toEkycConfig } from "./ekycUtils-Dew1rBG0.esm.js";
|
|
8
8
|
//#region src/modules/flow/dashboardConfig.ts
|
|
9
9
|
function isPlainObject(value) {
|
package/dist/geolocation.esm.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as createGeolocationManager } from "./geolocationManager-
|
|
2
|
-
import { t as geolocationMachine } from "./geolocationStateMachine-
|
|
1
|
+
import { t as createGeolocationManager } from "./geolocationManager-QOpupgt7.esm.js";
|
|
2
|
+
import { t as geolocationMachine } from "./geolocationStateMachine-CvOLKZFn.esm.js";
|
|
3
3
|
export { createGeolocationManager, geolocationMachine };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
1
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CxfNJVZW.esm.js";
|
|
2
2
|
import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
3
|
-
import { t as geolocationMachine } from "./geolocationStateMachine-
|
|
3
|
+
import { t as geolocationMachine } from "./geolocationStateMachine-CvOLKZFn.esm.js";
|
|
4
4
|
//#region ../infra/src/providers/browser/BrowserGeolocationProvider.ts
|
|
5
5
|
var BrowserGeolocationProvider = class {
|
|
6
6
|
getCurrentPosition() {
|
package/dist/{geolocationStateMachine-DcnyGm4v.esm.js → geolocationStateMachine-CvOLKZFn.esm.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as api } from "./api-Bx3gKW_y.esm.js";
|
|
2
2
|
import { t as endpoints } from "./endpoints-CCzL3XD_.esm.js";
|
|
3
3
|
import { i as isIOS, t as isAndroid } from "./platform-BJrm5nzZ.esm.js";
|
|
4
|
-
import { n as isConnectivityError } from "./apiError-
|
|
4
|
+
import { n as isConnectivityError } from "./apiError-kW5eUMgX.esm.js";
|
|
5
5
|
import { r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
6
6
|
import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
|
|
7
7
|
//#region src/modules/geolocation/geolocationServices.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
1
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CxfNJVZW.esm.js";
|
|
2
2
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
3
3
|
import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
4
4
|
import { t as governmentValidationMachine } from "./governmentValidationStateMachine-BYKYUdza.esm.js";
|
package/dist/home.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
1
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CxfNJVZW.esm.js";
|
|
2
2
|
import { c as createManager, o as createActor, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
3
3
|
//#region src/modules/home/homeStateMachine.ts
|
|
4
4
|
const homeMachine = setup({ types: {
|
package/dist/id-ocr.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as UpdateOcrDataParams, n as OcrData, o as ValidationRule, r as OcrFieldConfig, t as IdOcrConfig } from "./types-CJ7Yl9K-2.js";
|
|
2
|
-
import { a as IdOcrActor, i as createIdOcrManagerFromActor, n as IdOcrState, o as IdOcrOcrDocument, r as createIdOcrManager, s as idOcrStateMachine, t as IdOcrManager } from "./idOcrManager-
|
|
2
|
+
import { a as IdOcrActor, i as createIdOcrManagerFromActor, n as IdOcrState, o as IdOcrOcrDocument, r as createIdOcrManager, s as idOcrStateMachine, t as IdOcrManager } from "./idOcrManager-dLuxey6y.js";
|
|
3
3
|
//#region src/modules/id-ocr/idOcrFields.d.ts
|
|
4
4
|
declare const OCR_FIELDS: OcrFieldConfig[];
|
|
5
5
|
declare const getOcrFields: (config: Pick<IdOcrConfig, "cpfOnly" | "flowId">) => OcrFieldConfig[];
|
package/dist/id-ocr.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as validateCPF } from "./cpf-BIADjddF.esm.js";
|
|
2
2
|
import { a as MIN_AGE, i as CPFFlowIds, n as OCR_FIELDS, r as getOcrFields, t as idOcrStateMachine } from "./idOcrStateMachine-Bq_e3l4E.esm.js";
|
|
3
|
-
import { n as createIdOcrManagerFromActor, t as createIdOcrManager } from "./idOcrManager-
|
|
3
|
+
import { n as createIdOcrManagerFromActor, t as createIdOcrManager } from "./idOcrManager-CvJZhmBR.esm.js";
|
|
4
4
|
//#region src/modules/id-ocr/idOcrCpfUtils.ts
|
|
5
5
|
function formatCPF(value) {
|
|
6
6
|
const digits = value.replace(/\D/g, "").slice(0, 11);
|
package/dist/id-selfie-flow.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./StateMachine-EDpYWy0i.js";
|
|
2
2
|
import "./Actor-iTq7YY48.js";
|
|
3
3
|
import { t as CameraStream } from "./camera-9wWD-pwg.js";
|
|
4
|
-
import { t as DetectionOrientation } from "./IIdCaptureCapability-
|
|
4
|
+
import { t as DetectionOrientation } from "./IIdCaptureCapability-DHTT3FC2.js";
|
|
5
5
|
import { n as FinishStatus } from "./flowCompletionService-BlAHsKyv.js";
|
|
6
|
-
import { a as FacingMode, i as CameraCompositor, n as VideoSelfieDetectionStatus, r as VideoSelfieValidationFailure, s as VideoSelfieStep, t as StepDetector } from "./videoSelfieStepDetector-
|
|
6
|
+
import { a as FacingMode, i as CameraCompositor, n as VideoSelfieDetectionStatus, r as VideoSelfieValidationFailure, s as VideoSelfieStep, t as StepDetector } from "./videoSelfieStepDetector-D3oo2ofo.js";
|
|
7
7
|
//#region src/modules/id-selfie-flow/types.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* The capture steps an ID + Selfie flow session can run, in flow order. A
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { r as WasmUtilProvider } from "./safeStorage-Ep56I-f_.esm.js";
|
|
2
|
-
import { t as ensureWasmPipelines } from "./setup-
|
|
2
|
+
import { t as ensureWasmPipelines } from "./setup-CCGCRaIV.esm.js";
|
|
3
3
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
4
|
-
import { i as resolveDashboardModuleConfig, l as facingModeForStep } from "./flowServices-
|
|
4
|
+
import { i as resolveDashboardModuleConfig, l as facingModeForStep } from "./flowServices-De2U4wZB.esm.js";
|
|
5
5
|
import { c as createManager, n as sendTo, o as createActor, r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
6
6
|
import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-CtI5S0f4.esm.js";
|
|
7
|
-
import { _ as StreamCanvasProcessingSession, a as encryptSelfieImage, l as startDetection, v as FaceDetectionProvider } from "./onDeviceFaceResults-
|
|
7
|
+
import { _ as StreamCanvasProcessingSession, a as encryptSelfieImage, l as startDetection, v as FaceDetectionProvider } from "./onDeviceFaceResults-AOKW5LFl.esm.js";
|
|
8
8
|
import { n as getWindowDimensions } from "./getDeviceClass-CeBiEayS.esm.js";
|
|
9
9
|
import { i as uploadSelfie, r as processFace } from "./selfieErrorUtils-C2PYBVsp.esm.js";
|
|
10
10
|
import { t as StreamCanvasCapture } from "./StreamCanvasCapture-D2XcXCZ4.esm.js";
|
|
11
|
-
import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider, t as DEFAULT_ID_CAPTURE_GEOMETRY } from "./idCaptureDefaults-
|
|
12
|
-
import { a as processId, d as validateUploadResponse, f as ID_ERROR_CODES, l as uploadIdImage } from "./idCaptureServices-
|
|
13
|
-
import { n as getFinishStatus } from "./flowCompletionService-
|
|
14
|
-
import { a as delay, c as isWrongVideoSelfieIdSide, n as defaultAcquireCamera, r as CameraCompositor, s as isSelfieValidationError } from "./videoSelfieCameraWarmer-
|
|
11
|
+
import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider, t as DEFAULT_ID_CAPTURE_GEOMETRY } from "./idCaptureDefaults-WeHbQM7W.esm.js";
|
|
12
|
+
import { a as processId, d as validateUploadResponse, f as ID_ERROR_CODES, l as uploadIdImage } from "./idCaptureServices-Cztpla_C.esm.js";
|
|
13
|
+
import { n as getFinishStatus } from "./flowCompletionService-BW8wJ1Ya.esm.js";
|
|
14
|
+
import { a as delay, c as isWrongVideoSelfieIdSide, n as defaultAcquireCamera, r as CameraCompositor, s as isSelfieValidationError } from "./videoSelfieCameraWarmer-ByQI5A9h.esm.js";
|
|
15
15
|
//#region src/modules/id-selfie-flow/idSelfieFlowStepDetector.ts
|
|
16
16
|
/** Default autocapture window for the selfie step. */
|
|
17
17
|
const SELFIE_AUTOCAPTURE_MS = 1e4;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as idVerificationMachine } from "./idVerificationStateMachine-GEQWUPU2.esm.js";
|
|
2
|
-
import { n as createIdVerificationManagerFromActor, t as createIdVerificationManager } from "./idVerificationManager-
|
|
2
|
+
import { n as createIdVerificationManagerFromActor, t as createIdVerificationManager } from "./idVerificationManager-CduNXhWd.esm.js";
|
|
3
3
|
export { createIdVerificationManager, createIdVerificationManagerFromActor, idVerificationMachine };
|
package/dist/id.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
|
|
2
2
|
import { t as CameraStream } from "./camera-9wWD-pwg.js";
|
|
3
3
|
import { n as PermissionStatus, t as PermissionResult } from "./types-BEwVKkLJ.js";
|
|
4
|
-
import { r as IdCaptureSettings, t as DetectionOrientation } from "./IIdCaptureCapability-
|
|
5
|
-
import { A as ManualUploadSide, C as RecordingSession, D as MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, E as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, O as MANUAL_UPLOAD_MAX_RETRIES, S as IdFlowStep, _ as IdCaptureThresholds, a as DetectionArea, b as IdError, c as IdCaptureConfig, d as IdCaptureEvent, f as IdCaptureGeometry, g as IdCaptureOutput, h as IdCaptureOnlyConfig, i as CapturedImage, j as ManualUploadTab, k as ManualUploadContext, l as IdCaptureContext, m as IdCaptureMode, n as CaptureIdResponse, o as DetectionStatus, p as IdCaptureInput, r as CaptureOnlyResponse, s as ID_ERROR_CODES, t as AddBarcodeV3Response, u as IdCaptureDependencies, v as IdCapturedImageData, w as UploadIdResponse, x as IdErrorCode, y as IdDocumentType } from "./types-
|
|
6
|
-
import { A as createIdCaptureActor, C as CreateIdCaptureOnlyActorOptions, D as idCaptureOnlyMachine, E as IdCaptureOnlyMachine, M as idCaptureMachine, O as CreateIdCaptureActorOptions, S as validateUploadResponse, T as createIdCaptureOnlyActor, _ as startRecordingSession, a as AddBarcodeParams, b as uploadIdImage, c as StartRecordingParams, d as ValidationError, f as addBarcode, g as processId, h as preloadIdRecordingProvider, j as IdCaptureMachine, k as IdCaptureActor, l as UploadIdImageParams, m as initializeIdCapture, n as IdCaptureManager, o as IdCaptureInitResult, p as barcodeToBase64, r as IdCaptureState, s as InitializeIdCaptureParams, t as createIdCaptureManager, u as UploadManualIdFileParams, v as stopRecording, w as IdCaptureOnlyActor, x as uploadManualIdFile, y as stopStream } from "./idCaptureManager-
|
|
4
|
+
import { r as IdCaptureSettings, t as DetectionOrientation } from "./IIdCaptureCapability-DHTT3FC2.js";
|
|
5
|
+
import { A as ManualUploadSide, C as RecordingSession, D as MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, E as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, O as MANUAL_UPLOAD_MAX_RETRIES, S as IdFlowStep, _ as IdCaptureThresholds, a as DetectionArea, b as IdError, c as IdCaptureConfig, d as IdCaptureEvent, f as IdCaptureGeometry, g as IdCaptureOutput, h as IdCaptureOnlyConfig, i as CapturedImage, j as ManualUploadTab, k as ManualUploadContext, l as IdCaptureContext, m as IdCaptureMode, n as CaptureIdResponse, o as DetectionStatus, p as IdCaptureInput, r as CaptureOnlyResponse, s as ID_ERROR_CODES, t as AddBarcodeV3Response, u as IdCaptureDependencies, v as IdCapturedImageData, w as UploadIdResponse, x as IdErrorCode, y as IdDocumentType } from "./types-M6eb82ra2.js";
|
|
6
|
+
import { A as createIdCaptureActor, C as CreateIdCaptureOnlyActorOptions, D as idCaptureOnlyMachine, E as IdCaptureOnlyMachine, M as idCaptureMachine, O as CreateIdCaptureActorOptions, S as validateUploadResponse, T as createIdCaptureOnlyActor, _ as startRecordingSession, a as AddBarcodeParams, b as uploadIdImage, c as StartRecordingParams, d as ValidationError, f as addBarcode, g as processId, h as preloadIdRecordingProvider, j as IdCaptureMachine, k as IdCaptureActor, l as UploadIdImageParams, m as initializeIdCapture, n as IdCaptureManager, o as IdCaptureInitResult, p as barcodeToBase64, r as IdCaptureState, s as InitializeIdCaptureParams, t as createIdCaptureManager, u as UploadManualIdFileParams, v as stopRecording, w as IdCaptureOnlyActor, x as uploadManualIdFile, y as stopStream } from "./idCaptureManager-BjU-Wyow.js";
|
|
7
7
|
//#region src/modules/id/idCaptureOnlyManager.d.ts
|
|
8
8
|
type IdCaptureOnlyManager = IdCaptureManager;
|
|
9
9
|
/**
|
package/dist/id.esm.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as BrowserStorageProvider } from "./BrowserStorageProvider-k-FDkC4W.esm.js";
|
|
2
|
-
import { n as eventModuleNames } from "./events-
|
|
2
|
+
import { n as eventModuleNames } from "./events-CxfNJVZW.esm.js";
|
|
3
3
|
import { o as createActor, r as assign } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
4
4
|
import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
|
|
5
|
-
import { a as MANUAL_UPLOAD_MAX_RETRIES, i as MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, r as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, t as idCaptureMachine } from "./idCaptureStateMachine-
|
|
6
|
-
import { n as createIdCaptureActor, r as createIdCaptureManagerFromActor, t as createIdCaptureManager } from "./idCaptureManager-
|
|
7
|
-
import { a as processId, c as stopStream, d as validateUploadResponse, f as ID_ERROR_CODES, i as preloadIdRecordingProvider, l as uploadIdImage, n as barcodeToBase64, o as startRecordingSession, r as initializeIdCapture, s as stopRecording, t as addBarcode, u as uploadManualIdFile } from "./idCaptureServices-
|
|
8
|
-
import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-
|
|
5
|
+
import { a as MANUAL_UPLOAD_MAX_RETRIES, i as MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, r as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, t as idCaptureMachine } from "./idCaptureStateMachine-B9oqtIOr.esm.js";
|
|
6
|
+
import { n as createIdCaptureActor, r as createIdCaptureManagerFromActor, t as createIdCaptureManager } from "./idCaptureManager-CW_PqtYf.esm.js";
|
|
7
|
+
import { a as processId, c as stopStream, d as validateUploadResponse, f as ID_ERROR_CODES, i as preloadIdRecordingProvider, l as uploadIdImage, m as resolveIdCaptureThresholds, n as barcodeToBase64, o as startRecordingSession, r as initializeIdCapture, s as stopRecording, t as addBarcode, u as uploadManualIdFile } from "./idCaptureServices-Cztpla_C.esm.js";
|
|
8
|
+
import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-1m1VJ3Q4.esm.js";
|
|
9
9
|
//#region src/modules/id/idCaptureOnlyStateMachine.ts
|
|
10
10
|
function buildSubImage(canvas) {
|
|
11
11
|
if (!canvas) return void 0;
|
|
@@ -148,10 +148,14 @@ const DEFAULT_ID_CAPTURE_ONLY_CONFIG = {
|
|
|
148
148
|
};
|
|
149
149
|
function createIdCaptureOnlyActor(options) {
|
|
150
150
|
const dependencies = options.dependencies ?? { storage: new BrowserStorageProvider() };
|
|
151
|
+
const mergedConfig = {
|
|
152
|
+
...DEFAULT_ID_CAPTURE_ONLY_CONFIG,
|
|
153
|
+
...options.config
|
|
154
|
+
};
|
|
151
155
|
return createActor(idCaptureOnlyMachine, { input: {
|
|
152
156
|
config: {
|
|
153
|
-
...
|
|
154
|
-
|
|
157
|
+
...mergedConfig,
|
|
158
|
+
thresholds: resolveIdCaptureThresholds(mergedConfig)
|
|
155
159
|
},
|
|
156
160
|
dependencies
|
|
157
161
|
} }).start();
|
|
@@ -168,12 +168,22 @@ var IdCaptureProvider = class extends BaseWasmProvider {
|
|
|
168
168
|
this.originalCapturedCanvas = original;
|
|
169
169
|
this.capturedCanvas = transformed;
|
|
170
170
|
}
|
|
171
|
-
|
|
171
|
+
/**
|
|
172
|
+
* Re-arms WASM detection without discarding the captured result.
|
|
173
|
+
*
|
|
174
|
+
* Detection-session teardown runs immediately after a successful capture.
|
|
175
|
+
* The captured canvases must remain available for the subsequent upload and
|
|
176
|
+
* are only replaced by `setCapturedCanvases()` or cleared by a full reset.
|
|
177
|
+
*/
|
|
178
|
+
resetDetectionState() {
|
|
172
179
|
super.reset();
|
|
173
180
|
this.lastProcessResult = null;
|
|
181
|
+
this.lastDecodedBarcode = null;
|
|
182
|
+
}
|
|
183
|
+
reset() {
|
|
184
|
+
this.resetDetectionState();
|
|
174
185
|
this.capturedCanvas = null;
|
|
175
186
|
this.originalCapturedCanvas = null;
|
|
176
|
-
this.lastDecodedBarcode = null;
|
|
177
187
|
}
|
|
178
188
|
async dispose() {
|
|
179
189
|
await super.dispose();
|