@incodetech/core 2.0.0 → 2.0.1-rc.0

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.
Files changed (178) hide show
  1. package/dist/Actor-CI32dTbG.d.ts +2 -0
  2. package/dist/BaseWasmProvider-C_DLEI40.esm.js +1118 -0
  3. package/dist/BrowserStorageProvider-CuOW1Er2.esm.js +55 -0
  4. package/dist/BrowserTimerProvider-DhNc_x02.esm.js +22 -0
  5. package/dist/ITimerCapability-C67ZRskg.esm.js +7 -0
  6. package/dist/IpifyProvider-D7jx52AL.esm.js +139 -0
  7. package/dist/Manager-C8PrhBOx.d.ts +19 -0
  8. package/dist/MotionSensorProvider-4v7xkqAp.esm.js +254 -0
  9. package/dist/OpenViduRecordingProvider-CMu6XVdc.esm.js +87 -0
  10. package/dist/StateMachine-BCQrZJhf.d.ts +2 -0
  11. package/dist/WasmUtilProvider-j98OJf-S.esm.js +114 -0
  12. package/dist/addressSearch-BpTbTWCa.esm.js +430 -0
  13. package/dist/ae-signature-DDDZmWXj.esm.js +12 -0
  14. package/dist/ae-signature.d.ts +25 -0
  15. package/dist/ae-signature.esm.js +8 -0
  16. package/dist/antifraud.d.ts +57 -0
  17. package/dist/antifraud.esm.js +45 -0
  18. package/dist/antifraudStateMachine-O0TMf6yc.esm.js +39 -0
  19. package/dist/api-CESGtpbH.esm.js +53 -0
  20. package/dist/authentication.d.ts +12 -0
  21. package/dist/authentication.esm.js +25 -0
  22. package/dist/authenticationManager-5M-fKzXx.esm.js +67 -0
  23. package/dist/authenticationManager-C83GNIhl.d.ts +66 -0
  24. package/dist/authenticationStateMachine-BMZqatiF.esm.js +139 -0
  25. package/dist/backCameraStream-DMdMeGk2.esm.js +346 -0
  26. package/dist/browserSimulation-gxD8cSpM.esm.js +20 -0
  27. package/dist/camera-DBSxa6ML.d.ts +4 -0
  28. package/dist/camera-PA2Ljri3.esm.js +22 -0
  29. package/dist/camera.d.ts +15 -0
  30. package/dist/camera.esm.js +5 -0
  31. package/dist/chunk-CRF6K_H_.esm.js +49 -0
  32. package/dist/consent.d.ts +398 -0
  33. package/dist/consent.esm.js +79 -0
  34. package/dist/consentStateMachine-CCT-B60O.esm.js +151 -0
  35. package/dist/cpf-PPz2Njto.esm.js +38 -0
  36. package/dist/cpf-ocr.d.ts +204 -0
  37. package/dist/cpf-ocr.esm.js +177 -0
  38. package/dist/cross-document-data-match.d.ts +34 -0
  39. package/dist/cross-document-data-match.esm.js +71 -0
  40. package/dist/curp-validation.d.ts +188 -0
  41. package/dist/curp-validation.esm.js +110 -0
  42. package/dist/curpValidationStateMachine-CitWLr2c.esm.js +595 -0
  43. package/dist/custom-fields.d.ts +115 -0
  44. package/dist/custom-fields.esm.js +177 -0
  45. package/dist/custom-watchlist.d.ts +66 -0
  46. package/dist/custom-watchlist.esm.js +86 -0
  47. package/dist/dateUtils-UoN5xswP.esm.js +23 -0
  48. package/dist/deepsightLoader-Cm4JIT_z.esm.js +52 -0
  49. package/dist/deepsightService-CEVxzehb.d.ts +412 -0
  50. package/dist/deepsightService-O74l4Y__.esm.js +489 -0
  51. package/dist/device.d.ts +46 -0
  52. package/dist/device.esm.js +106 -0
  53. package/dist/displayErrors-DqJ_IbsG.d.ts +39 -0
  54. package/dist/document-capture.d.ts +906 -0
  55. package/dist/document-capture.esm.js +156 -0
  56. package/dist/document-upload.d.ts +331 -0
  57. package/dist/document-upload.esm.js +203 -0
  58. package/dist/documentCaptureStateMachine-BqzTDy9k.esm.js +394 -0
  59. package/dist/dynamic-forms.d.ts +178 -0
  60. package/dist/dynamic-forms.esm.js +323 -0
  61. package/dist/ekyb.d.ts +148 -0
  62. package/dist/ekyb.esm.js +127 -0
  63. package/dist/ekybStateMachine-BR2let5f.esm.js +674 -0
  64. package/dist/ekyc.d.ts +164 -0
  65. package/dist/ekyc.esm.js +104 -0
  66. package/dist/ekycStateMachine-oeO0Iekd.esm.js +10626 -0
  67. package/dist/electronic-signature.d.ts +4 -0
  68. package/dist/electronic-signature.esm.js +7 -0
  69. package/dist/electronicSignatureManager-D9OHzTpG.esm.js +428 -0
  70. package/dist/email.d.ts +4 -0
  71. package/dist/email.esm.js +9 -0
  72. package/dist/emailManager-DIfnS5g1.d.ts +352 -0
  73. package/dist/emailManager-wAV0LE-H.esm.js +238 -0
  74. package/dist/emailStateMachine-DOf4j58N.esm.js +292 -0
  75. package/dist/endpoints-CnN3SyDa.esm.js +87 -0
  76. package/dist/events-D6-e4vok.esm.js +596 -0
  77. package/dist/events.d.ts +265 -0
  78. package/dist/events.esm.js +4 -0
  79. package/dist/extensibility.d.ts +122 -0
  80. package/dist/extensibility.esm.js +43 -0
  81. package/dist/face-match.d.ts +228 -0
  82. package/dist/face-match.esm.js +173 -0
  83. package/dist/faceCaptureManagerFactory-Dh2PdGlF.esm.js +290 -0
  84. package/dist/faceCaptureManagerFactory-yqtpxjnN.d.ts +690 -0
  85. package/dist/faceCaptureSetup-B3faSpYA.esm.js +873 -0
  86. package/dist/faceMatchStateMachine-DNFrxTFS.esm.js +127 -0
  87. package/dist/flow-events.d.ts +6 -0
  88. package/dist/flow-events.esm.js +0 -0
  89. package/dist/flow.d.ts +358 -0
  90. package/dist/flow.esm.js +825 -0
  91. package/dist/flowCompletionService-DhkT4SRY.d.ts +10 -0
  92. package/dist/flowCompletionService-P54yzGvA.esm.js +13 -0
  93. package/dist/flowServices-DG3IdWw6.esm.js +188 -0
  94. package/dist/geolocation.d.ts +127 -0
  95. package/dist/geolocation.esm.js +89 -0
  96. package/dist/geolocationStateMachine-asasuHY2.esm.js +105 -0
  97. package/dist/getBrowser-BSXUTWXw.esm.js +41 -0
  98. package/dist/getDeviceClass-BSntT9_j.esm.js +14 -0
  99. package/dist/government-validation.d.ts +67 -0
  100. package/dist/government-validation.esm.js +81 -0
  101. package/dist/governmentValidationStateMachine-BDDYrJTo.esm.js +271 -0
  102. package/dist/home.d.ts +99 -0
  103. package/dist/home.esm.js +61 -0
  104. package/dist/http.d.ts +68 -0
  105. package/dist/http.esm.js +3 -0
  106. package/dist/id-ocr.d.ts +635 -0
  107. package/dist/id-ocr.esm.js +86 -0
  108. package/dist/id-verification.d.ts +190 -0
  109. package/dist/id-verification.esm.js +43 -0
  110. package/dist/id.d.ts +24 -0
  111. package/dist/id.esm.js +164 -0
  112. package/dist/idCaptureManager-Fyd0eam-.d.ts +958 -0
  113. package/dist/idCaptureManager-ZPkD7Gjk.esm.js +581 -0
  114. package/dist/idCaptureStateMachine-BK0bPHoc.esm.js +2963 -0
  115. package/dist/idOcrStateMachine-YbjjC_Gg.esm.js +388 -0
  116. package/dist/idVerificationStateMachine-xbw9HP1Z.esm.js +71 -0
  117. package/dist/identity-reuse.d.ts +530 -0
  118. package/dist/identity-reuse.esm.js +274 -0
  119. package/dist/index-BcRG8rtJ.d.ts +97 -0
  120. package/dist/index-DZoqeAo9.d.ts +1177 -0
  121. package/dist/index.d.ts +3 -0
  122. package/dist/index.esm.js +12 -0
  123. package/dist/invokeOnCaptureCallback-rc6kBHo5.esm.js +30 -0
  124. package/dist/lib-BB0B_qQX.esm.js +12499 -0
  125. package/dist/mandatory-consent.d.ts +412 -0
  126. package/dist/mandatory-consent.esm.js +78 -0
  127. package/dist/mandatoryConsentStateMachine-Cnco1jvn.esm.js +126 -0
  128. package/dist/openviduLazy-Cm0XFh_v.esm.js +3 -0
  129. package/dist/openviduLazy-Cok70ZSg.esm.js +12 -0
  130. package/dist/permissionServices-D_i6nzEw.esm.js +50 -0
  131. package/dist/phone.d.ts +4 -0
  132. package/dist/phone.esm.js +9 -0
  133. package/dist/phoneManager-B6M30hKE.d.ts +397 -0
  134. package/dist/phoneManager-DAJbGhlY.esm.js +256 -0
  135. package/dist/phoneStateMachine-CuPARRaT.esm.js +351 -0
  136. package/dist/platform-CfrjKhmi.esm.js +83 -0
  137. package/dist/qe-signature-DFo_Cc-I.esm.js +12 -0
  138. package/dist/qe-signature.d.ts +25 -0
  139. package/dist/qe-signature.esm.js +8 -0
  140. package/dist/recordingService-Ig2UgbLv.esm.js +1003 -0
  141. package/dist/redirect-to-mobile.d.ts +107 -0
  142. package/dist/redirect-to-mobile.esm.js +102 -0
  143. package/dist/redirectToMobileStateMachine-BOEqe46A.esm.js +249 -0
  144. package/dist/runChildModule-CqqwqAkW.esm.js +219 -0
  145. package/dist/selfie.d.ts +26 -0
  146. package/dist/selfie.esm.js +146 -0
  147. package/dist/selfieManager-D0lSgd-J.d.ts +68 -0
  148. package/dist/selfieManager-Duisl7qN.esm.js +60 -0
  149. package/dist/selfieStateMachine-D76whWEf.esm.js +68 -0
  150. package/dist/session-CGtQJJzB.esm.js +3206 -0
  151. package/dist/session.d.ts +217 -0
  152. package/dist/session.esm.js +9 -0
  153. package/dist/setup-C5AITV8m.d.ts +254 -0
  154. package/dist/setup-DsM8IG7k.esm.js +887 -0
  155. package/dist/signature.d.ts +94 -0
  156. package/dist/signature.esm.js +66 -0
  157. package/dist/signatureStateMachine-B5-QVUve.esm.js +132 -0
  158. package/dist/stats-CIfiPzb1.esm.js +16 -0
  159. package/dist/stats.d.ts +16 -0
  160. package/dist/stats.esm.js +4 -0
  161. package/dist/trust-graph.d.ts +54 -0
  162. package/dist/trust-graph.esm.js +56 -0
  163. package/dist/types-B06Ypu2F.d.ts +49 -0
  164. package/dist/types-BP1m8VRw.d.ts +340 -0
  165. package/dist/types-CAD4va6a.d.ts +5 -0
  166. package/dist/types-CFV9G_7j.d.ts +24 -0
  167. package/dist/warmup-CEcppFiS.d.ts +63 -0
  168. package/dist/wasm.d.ts +15 -0
  169. package/dist/wasm.esm.js +12 -0
  170. package/dist/watchlist-for-business.d.ts +79 -0
  171. package/dist/watchlist-for-business.esm.js +148 -0
  172. package/dist/watchlist.d.ts +62 -0
  173. package/dist/watchlist.esm.js +86 -0
  174. package/dist/watchlistServices-DMbUhkBX.esm.js +12 -0
  175. package/dist/workflow.d.ts +907 -0
  176. package/dist/workflow.esm.js +702 -0
  177. package/dist/xstate.esm-B70JrNqo.esm.js +3404 -0
  178. package/package.json +1 -1
@@ -0,0 +1,412 @@
1
+ import { t as Manager } from "./Manager-C8PrhBOx.js";
2
+ import "./Actor-CI32dTbG.js";
3
+ import "./camera-DBSxa6ML.js";
4
+ import "./types-CFV9G_7j.js";
5
+ import { a as RegulationTypes } from "./types-BP1m8VRw.js";
6
+ import * as xstate381 from "xstate";
7
+
8
+ //#region src/modules/mandatory-consent/types.d.ts
9
+ type MandatoryConsentConfig = {
10
+ consentType: RegulationTypes;
11
+ };
12
+ type MandatoryConsent = {
13
+ id: string;
14
+ title: string;
15
+ text: string;
16
+ description?: string;
17
+ consentType: string;
18
+ };
19
+ type FetchMandatoryConsentResponse = {
20
+ consents: MandatoryConsent[];
21
+ };
22
+ //#endregion
23
+ //#region src/modules/mandatory-consent/mandatoryConsentStateMachine.d.ts
24
+ type MandatoryConsentContext = {
25
+ config: MandatoryConsentConfig;
26
+ consent: MandatoryConsent | undefined;
27
+ isSigned: boolean;
28
+ error: string | undefined;
29
+ };
30
+ type MandatoryConsentInput = {
31
+ config: MandatoryConsentConfig;
32
+ };
33
+ declare const mandatoryConsentMachine: xstate381.StateMachine<MandatoryConsentContext, {
34
+ type: "LOAD";
35
+ } | {
36
+ type: "TOGGLE";
37
+ } | {
38
+ type: "SUBMIT";
39
+ } | {
40
+ type: "CANCEL";
41
+ } | {
42
+ type: "RETRY";
43
+ } | {
44
+ type: "RESET";
45
+ }, {
46
+ [x: string]: xstate381.ActorRefFromLogic<xstate381.PromiseActorLogic<FetchMandatoryConsentResponse, {
47
+ config: MandatoryConsentConfig;
48
+ }, xstate381.EventObject>> | xstate381.ActorRefFromLogic<xstate381.PromiseActorLogic<void, {
49
+ consentId: string;
50
+ isSigned: boolean;
51
+ }, xstate381.EventObject>> | undefined;
52
+ }, xstate381.Values<{
53
+ fetchConsent: {
54
+ src: "fetchConsent";
55
+ logic: xstate381.PromiseActorLogic<FetchMandatoryConsentResponse, {
56
+ config: MandatoryConsentConfig;
57
+ }, xstate381.EventObject>;
58
+ id: string | undefined;
59
+ };
60
+ submitConsent: {
61
+ src: "submitConsent";
62
+ logic: xstate381.PromiseActorLogic<void, {
63
+ consentId: string;
64
+ isSigned: boolean;
65
+ }, xstate381.EventObject>;
66
+ id: string | undefined;
67
+ };
68
+ }>, xstate381.Values<{
69
+ setConsent: {
70
+ type: "setConsent";
71
+ params: xstate381.NonReducibleUnknown;
72
+ };
73
+ setError: {
74
+ type: "setError";
75
+ params: xstate381.NonReducibleUnknown;
76
+ };
77
+ clearError: {
78
+ type: "clearError";
79
+ params: xstate381.NonReducibleUnknown;
80
+ };
81
+ resetContext: {
82
+ type: "resetContext";
83
+ params: xstate381.NonReducibleUnknown;
84
+ };
85
+ toggleSigned: {
86
+ type: "toggleSigned";
87
+ params: xstate381.NonReducibleUnknown;
88
+ };
89
+ }>, {
90
+ type: "canSubmit";
91
+ params: unknown;
92
+ }, never, "error" | "idle" | "closed" | "finished" | "loading" | "display" | "submitting", string, MandatoryConsentInput, xstate381.NonReducibleUnknown, xstate381.EventObject, xstate381.MetaObject, {
93
+ readonly id: "mandatoryConsent";
94
+ readonly initial: "idle";
95
+ readonly context: ({
96
+ input
97
+ }: {
98
+ spawn: {
99
+ <TSrc extends "fetchConsent" | "submitConsent">(logic: TSrc, ...[options]: ({
100
+ src: "fetchConsent";
101
+ logic: xstate381.PromiseActorLogic<FetchMandatoryConsentResponse, {
102
+ config: MandatoryConsentConfig;
103
+ }, xstate381.EventObject>;
104
+ id: string | undefined;
105
+ } extends infer T ? T extends {
106
+ src: "fetchConsent";
107
+ logic: xstate381.PromiseActorLogic<FetchMandatoryConsentResponse, {
108
+ config: MandatoryConsentConfig;
109
+ }, xstate381.EventObject>;
110
+ id: string | undefined;
111
+ } ? T extends {
112
+ src: TSrc;
113
+ } ? xstate381.ConditionalRequired<[options?: ({
114
+ id?: T["id"] | undefined;
115
+ systemId?: string;
116
+ input?: xstate381.InputFrom<T["logic"]> | undefined;
117
+ syncSnapshot?: boolean;
118
+ } & { [K in xstate381.RequiredActorOptions<T>]: unknown }) | undefined], xstate381.IsNotNever<xstate381.RequiredActorOptions<T>>> : never : never : never) | ({
119
+ src: "submitConsent";
120
+ logic: xstate381.PromiseActorLogic<void, {
121
+ consentId: string;
122
+ isSigned: boolean;
123
+ }, xstate381.EventObject>;
124
+ id: string | undefined;
125
+ } extends infer T_1 ? T_1 extends {
126
+ src: "submitConsent";
127
+ logic: xstate381.PromiseActorLogic<void, {
128
+ consentId: string;
129
+ isSigned: boolean;
130
+ }, xstate381.EventObject>;
131
+ id: string | undefined;
132
+ } ? T_1 extends {
133
+ src: TSrc;
134
+ } ? xstate381.ConditionalRequired<[options?: ({
135
+ id?: T_1["id"] | undefined;
136
+ systemId?: string;
137
+ input?: xstate381.InputFrom<T_1["logic"]> | undefined;
138
+ syncSnapshot?: boolean;
139
+ } & { [K_1 in xstate381.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate381.IsNotNever<xstate381.RequiredActorOptions<T_1>>> : never : never : never)): xstate381.ActorRefFromLogic<xstate381.GetConcreteByKey<xstate381.Values<{
140
+ fetchConsent: {
141
+ src: "fetchConsent";
142
+ logic: xstate381.PromiseActorLogic<FetchMandatoryConsentResponse, {
143
+ config: MandatoryConsentConfig;
144
+ }, xstate381.EventObject>;
145
+ id: string | undefined;
146
+ };
147
+ submitConsent: {
148
+ src: "submitConsent";
149
+ logic: xstate381.PromiseActorLogic<void, {
150
+ consentId: string;
151
+ isSigned: boolean;
152
+ }, xstate381.EventObject>;
153
+ id: string | undefined;
154
+ };
155
+ }>, "src", TSrc>["logic"]>;
156
+ <TLogic extends xstate381.AnyActorLogic>(src: TLogic, ...[options]: xstate381.ConditionalRequired<[options?: ({
157
+ id?: never;
158
+ systemId?: string;
159
+ input?: xstate381.InputFrom<TLogic> | undefined;
160
+ syncSnapshot?: boolean;
161
+ } & { [K in xstate381.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate381.IsNotNever<xstate381.RequiredLogicInput<TLogic>>>): xstate381.ActorRefFromLogic<TLogic>;
162
+ };
163
+ input: MandatoryConsentInput;
164
+ self: xstate381.ActorRef<xstate381.MachineSnapshot<MandatoryConsentContext, {
165
+ type: "LOAD";
166
+ } | {
167
+ type: "TOGGLE";
168
+ } | {
169
+ type: "SUBMIT";
170
+ } | {
171
+ type: "CANCEL";
172
+ } | {
173
+ type: "RETRY";
174
+ } | {
175
+ type: "RESET";
176
+ }, Record<string, xstate381.AnyActorRef | undefined>, xstate381.StateValue, string, unknown, any, any>, {
177
+ type: "LOAD";
178
+ } | {
179
+ type: "TOGGLE";
180
+ } | {
181
+ type: "SUBMIT";
182
+ } | {
183
+ type: "CANCEL";
184
+ } | {
185
+ type: "RETRY";
186
+ } | {
187
+ type: "RESET";
188
+ }, xstate381.AnyEventObject>;
189
+ }) => {
190
+ config: MandatoryConsentConfig;
191
+ consent: undefined;
192
+ isSigned: false;
193
+ error: undefined;
194
+ };
195
+ readonly states: {
196
+ readonly idle: {
197
+ readonly on: {
198
+ readonly LOAD: {
199
+ readonly target: "loading";
200
+ readonly actions: "clearError";
201
+ };
202
+ };
203
+ };
204
+ readonly loading: {
205
+ readonly invoke: {
206
+ readonly id: "fetchConsent";
207
+ readonly src: "fetchConsent";
208
+ readonly input: ({
209
+ context
210
+ }: {
211
+ context: MandatoryConsentContext;
212
+ event: {
213
+ type: "LOAD";
214
+ } | {
215
+ type: "TOGGLE";
216
+ } | {
217
+ type: "SUBMIT";
218
+ } | {
219
+ type: "CANCEL";
220
+ } | {
221
+ type: "RETRY";
222
+ } | {
223
+ type: "RESET";
224
+ };
225
+ self: xstate381.ActorRef<xstate381.MachineSnapshot<MandatoryConsentContext, {
226
+ type: "LOAD";
227
+ } | {
228
+ type: "TOGGLE";
229
+ } | {
230
+ type: "SUBMIT";
231
+ } | {
232
+ type: "CANCEL";
233
+ } | {
234
+ type: "RETRY";
235
+ } | {
236
+ type: "RESET";
237
+ }, Record<string, xstate381.AnyActorRef>, xstate381.StateValue, string, unknown, any, any>, {
238
+ type: "LOAD";
239
+ } | {
240
+ type: "TOGGLE";
241
+ } | {
242
+ type: "SUBMIT";
243
+ } | {
244
+ type: "CANCEL";
245
+ } | {
246
+ type: "RETRY";
247
+ } | {
248
+ type: "RESET";
249
+ }, xstate381.AnyEventObject>;
250
+ }) => {
251
+ config: MandatoryConsentConfig;
252
+ };
253
+ readonly onDone: {
254
+ readonly target: "display";
255
+ readonly actions: "setConsent";
256
+ };
257
+ readonly onError: {
258
+ readonly target: "error";
259
+ readonly actions: "setError";
260
+ };
261
+ };
262
+ };
263
+ readonly display: {
264
+ readonly on: {
265
+ readonly TOGGLE: {
266
+ readonly actions: "toggleSigned";
267
+ };
268
+ readonly SUBMIT: {
269
+ readonly target: "submitting";
270
+ readonly guard: "canSubmit";
271
+ };
272
+ readonly CANCEL: {
273
+ readonly target: "closed";
274
+ };
275
+ readonly RETRY: {
276
+ readonly target: "loading";
277
+ readonly actions: "clearError";
278
+ };
279
+ };
280
+ };
281
+ readonly submitting: {
282
+ readonly invoke: {
283
+ readonly id: "submitConsent";
284
+ readonly src: "submitConsent";
285
+ readonly input: ({
286
+ context
287
+ }: {
288
+ context: MandatoryConsentContext;
289
+ event: {
290
+ type: "LOAD";
291
+ } | {
292
+ type: "TOGGLE";
293
+ } | {
294
+ type: "SUBMIT";
295
+ } | {
296
+ type: "CANCEL";
297
+ } | {
298
+ type: "RETRY";
299
+ } | {
300
+ type: "RESET";
301
+ };
302
+ self: xstate381.ActorRef<xstate381.MachineSnapshot<MandatoryConsentContext, {
303
+ type: "LOAD";
304
+ } | {
305
+ type: "TOGGLE";
306
+ } | {
307
+ type: "SUBMIT";
308
+ } | {
309
+ type: "CANCEL";
310
+ } | {
311
+ type: "RETRY";
312
+ } | {
313
+ type: "RESET";
314
+ }, Record<string, xstate381.AnyActorRef>, xstate381.StateValue, string, unknown, any, any>, {
315
+ type: "LOAD";
316
+ } | {
317
+ type: "TOGGLE";
318
+ } | {
319
+ type: "SUBMIT";
320
+ } | {
321
+ type: "CANCEL";
322
+ } | {
323
+ type: "RETRY";
324
+ } | {
325
+ type: "RESET";
326
+ }, xstate381.AnyEventObject>;
327
+ }) => {
328
+ consentId: string;
329
+ isSigned: boolean;
330
+ };
331
+ readonly onDone: {
332
+ readonly target: "finished";
333
+ };
334
+ readonly onError: {
335
+ readonly target: "display";
336
+ readonly actions: "setError";
337
+ };
338
+ };
339
+ };
340
+ readonly error: {
341
+ readonly on: {
342
+ readonly RETRY: {
343
+ readonly target: "loading";
344
+ readonly actions: "clearError";
345
+ };
346
+ readonly CANCEL: {
347
+ readonly target: "closed";
348
+ };
349
+ readonly RESET: {
350
+ readonly target: "idle";
351
+ readonly actions: "resetContext";
352
+ };
353
+ };
354
+ };
355
+ readonly finished: {
356
+ readonly type: "final";
357
+ };
358
+ readonly closed: {
359
+ readonly type: "final";
360
+ };
361
+ };
362
+ }>;
363
+ //#endregion
364
+ //#region src/modules/mandatory-consent/mandatoryConsentActor.d.ts
365
+ type CreateMandatoryConsentActorOptions = {
366
+ config: MandatoryConsentConfig;
367
+ };
368
+ //#endregion
369
+ //#region src/modules/mandatory-consent/mandatoryConsentManager.d.ts
370
+ type MandatoryConsentIdleState = {
371
+ status: 'idle';
372
+ };
373
+ type MandatoryConsentLoadingState = {
374
+ status: 'loading';
375
+ };
376
+ type MandatoryConsentDisplayState = {
377
+ status: 'display';
378
+ title: string;
379
+ text: string;
380
+ isSigned: boolean;
381
+ canSubmit: boolean;
382
+ error?: string;
383
+ };
384
+ type MandatoryConsentSubmittingState = {
385
+ status: 'submitting';
386
+ title: string;
387
+ text: string;
388
+ isSigned: boolean;
389
+ canSubmit: false;
390
+ };
391
+ type MandatoryConsentFinishedState = {
392
+ status: 'finished';
393
+ };
394
+ type MandatoryConsentClosedState = {
395
+ status: 'closed';
396
+ };
397
+ type MandatoryConsentErrorState = {
398
+ status: 'error';
399
+ error: string;
400
+ };
401
+ type MandatoryConsentState = MandatoryConsentIdleState | MandatoryConsentLoadingState | MandatoryConsentDisplayState | MandatoryConsentSubmittingState | MandatoryConsentFinishedState | MandatoryConsentClosedState | MandatoryConsentErrorState;
402
+ declare function createMandatoryConsentManager(options: CreateMandatoryConsentActorOptions): Manager<MandatoryConsentState> & {
403
+ load(): void;
404
+ toggle(): void;
405
+ submit(): void;
406
+ cancel(): void;
407
+ retry(): void;
408
+ reset(): void;
409
+ };
410
+ type MandatoryConsentManager = ReturnType<typeof createMandatoryConsentManager>;
411
+ //#endregion
412
+ export { type MandatoryConsentConfig, type MandatoryConsentManager, type MandatoryConsentState, createMandatoryConsentManager, mandatoryConsentMachine };
@@ -0,0 +1,78 @@
1
+ import "./api-CESGtpbH.esm.js";
2
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-D6-e4vok.esm.js";
3
+ import "./endpoints-CnN3SyDa.esm.js";
4
+ import { c as createManager, s as createActor } from "./xstate.esm-B70JrNqo.esm.js";
5
+ import { t as mandatoryConsentMachine } from "./mandatoryConsentStateMachine-Cnco1jvn.esm.js";
6
+
7
+ //#region src/modules/mandatory-consent/mandatoryConsentActor.ts
8
+ function createMandatoryConsentActor(options) {
9
+ return createActor(mandatoryConsentMachine, { input: { config: options.config } }).start();
10
+ }
11
+
12
+ //#endregion
13
+ //#region src/modules/mandatory-consent/mandatoryConsentManager.ts
14
+ function mapState(snapshot) {
15
+ const typedSnapshot = snapshot;
16
+ const { context } = typedSnapshot;
17
+ const canSubmit = Boolean(context.isSigned && context.consent?.id);
18
+ if (typedSnapshot.matches("idle")) return { status: "idle" };
19
+ if (typedSnapshot.matches("loading")) return { status: "loading" };
20
+ if (typedSnapshot.matches("display")) return {
21
+ status: "display",
22
+ title: context.consent?.title ?? "",
23
+ text: context.consent?.text ?? "",
24
+ isSigned: context.isSigned,
25
+ canSubmit,
26
+ error: context.error
27
+ };
28
+ if (typedSnapshot.matches("submitting")) return {
29
+ status: "submitting",
30
+ title: context.consent?.title ?? "",
31
+ text: context.consent?.text ?? "",
32
+ isSigned: context.isSigned,
33
+ canSubmit: false
34
+ };
35
+ if (typedSnapshot.matches("finished")) return { status: "finished" };
36
+ if (typedSnapshot.matches("closed")) return { status: "closed" };
37
+ if (typedSnapshot.matches("error")) return {
38
+ status: "error",
39
+ error: context.error ?? "Unknown error"
40
+ };
41
+ return { status: "idle" };
42
+ }
43
+ function createApi({ actor, trackElementClicked }) {
44
+ return {
45
+ load() {
46
+ actor.send({ type: "LOAD" });
47
+ },
48
+ toggle() {
49
+ actor.send({ type: "TOGGLE" });
50
+ },
51
+ submit() {
52
+ trackElementClicked?.("submit");
53
+ actor.send({ type: "SUBMIT" });
54
+ },
55
+ cancel() {
56
+ trackElementClicked?.("cancel");
57
+ actor.send({ type: "CANCEL" });
58
+ },
59
+ retry() {
60
+ trackElementClicked?.("retry");
61
+ actor.send({ type: "RETRY" });
62
+ },
63
+ reset() {
64
+ actor.send({ type: "RESET" });
65
+ }
66
+ };
67
+ }
68
+ function createMandatoryConsentManager(options) {
69
+ return createManager({
70
+ actor: createMandatoryConsentActor(options),
71
+ mapState,
72
+ createApi,
73
+ instrumentation: createManagerInstrumentation(eventModuleNames.mlConsent)
74
+ });
75
+ }
76
+
77
+ //#endregion
78
+ export { createMandatoryConsentManager, mandatoryConsentMachine };
@@ -0,0 +1,126 @@
1
+ import { t as api } from "./api-CESGtpbH.esm.js";
2
+ import { t as endpoints } from "./endpoints-CnN3SyDa.esm.js";
3
+ import { a as fromPromise, r as assign, t as setup } from "./xstate.esm-B70JrNqo.esm.js";
4
+
5
+ //#region src/modules/mandatory-consent/mandatoryConsentServices.ts
6
+ async function fetchMandatoryConsent(regulationType, signal) {
7
+ const res = await api.get(endpoints.getConsents, {
8
+ signal,
9
+ query: {
10
+ type: "MANDATORY",
11
+ language: "en",
12
+ regulationType
13
+ }
14
+ });
15
+ if (!res.ok) throw new Error(`GET ${endpoints.getConsents} failed: ${res.status} ${res.statusText}`);
16
+ return res.data;
17
+ }
18
+ async function submitMandatoryConsent(params, signal) {
19
+ const res = await api.post(endpoints.submitMlConsent, params, { signal });
20
+ if (!res.ok) throw new Error(`POST ${endpoints.submitMlConsent} failed: ${res.status} ${res.statusText}`);
21
+ }
22
+
23
+ //#endregion
24
+ //#region src/modules/mandatory-consent/mandatoryConsentStateMachine.ts
25
+ const mandatoryConsentMachine = setup({
26
+ types: {
27
+ context: {},
28
+ events: {},
29
+ input: {}
30
+ },
31
+ actors: {
32
+ fetchConsent: fromPromise(async ({ input, signal }) => fetchMandatoryConsent(input.config.consentType, signal)),
33
+ submitConsent: fromPromise(async ({ input, signal }) => submitMandatoryConsent({ consents: [{
34
+ id: input.consentId,
35
+ isSigned: input.isSigned
36
+ }] }, signal))
37
+ },
38
+ actions: {
39
+ setConsent: assign(({ event }) => {
40
+ return {
41
+ consent: event.output.consents[0],
42
+ isSigned: false,
43
+ error: void 0
44
+ };
45
+ }),
46
+ toggleSigned: assign(({ context }) => ({ isSigned: !context.isSigned })),
47
+ setError: assign(({ event }) => ({ error: String(event.error) })),
48
+ clearError: assign({ error: () => void 0 }),
49
+ resetContext: assign(({ context }) => ({
50
+ config: context.config,
51
+ consent: void 0,
52
+ isSigned: false,
53
+ error: void 0
54
+ }))
55
+ },
56
+ guards: { canSubmit: ({ context }) => Boolean(context.consent?.id) && context.isSigned }
57
+ }).createMachine({
58
+ id: "mandatoryConsent",
59
+ initial: "idle",
60
+ context: ({ input }) => ({
61
+ config: input.config,
62
+ consent: void 0,
63
+ isSigned: false,
64
+ error: void 0
65
+ }),
66
+ states: {
67
+ idle: { on: { LOAD: {
68
+ target: "loading",
69
+ actions: "clearError"
70
+ } } },
71
+ loading: { invoke: {
72
+ id: "fetchConsent",
73
+ src: "fetchConsent",
74
+ input: ({ context }) => ({ config: context.config }),
75
+ onDone: {
76
+ target: "display",
77
+ actions: "setConsent"
78
+ },
79
+ onError: {
80
+ target: "error",
81
+ actions: "setError"
82
+ }
83
+ } },
84
+ display: { on: {
85
+ TOGGLE: { actions: "toggleSigned" },
86
+ SUBMIT: {
87
+ target: "submitting",
88
+ guard: "canSubmit"
89
+ },
90
+ CANCEL: { target: "closed" },
91
+ RETRY: {
92
+ target: "loading",
93
+ actions: "clearError"
94
+ }
95
+ } },
96
+ submitting: { invoke: {
97
+ id: "submitConsent",
98
+ src: "submitConsent",
99
+ input: ({ context }) => ({
100
+ consentId: context.consent?.id ?? "",
101
+ isSigned: context.isSigned
102
+ }),
103
+ onDone: { target: "finished" },
104
+ onError: {
105
+ target: "display",
106
+ actions: "setError"
107
+ }
108
+ } },
109
+ error: { on: {
110
+ RETRY: {
111
+ target: "loading",
112
+ actions: "clearError"
113
+ },
114
+ CANCEL: { target: "closed" },
115
+ RESET: {
116
+ target: "idle",
117
+ actions: "resetContext"
118
+ }
119
+ } },
120
+ finished: { type: "final" },
121
+ closed: { type: "final" }
122
+ }
123
+ });
124
+
125
+ //#endregion
126
+ export { mandatoryConsentMachine as t };
@@ -0,0 +1,3 @@
1
+ import { t as loadOpenVidu } from "./openviduLazy-Cok70ZSg.esm.js";
2
+
3
+ export { loadOpenVidu };
@@ -0,0 +1,12 @@
1
+ import { a as __toDynamicImportESM } from "./chunk-CRF6K_H_.esm.js";
2
+
3
+ //#region ../infra/src/providers/browser/openviduLazy.ts
4
+ let openViduImport;
5
+ async function loadOpenVidu() {
6
+ if (openViduImport) return openViduImport;
7
+ openViduImport = import("./lib-BB0B_qQX.esm.js").then(__toDynamicImportESM(1));
8
+ return openViduImport;
9
+ }
10
+
11
+ //#endregion
12
+ export { loadOpenVidu as t };
@@ -0,0 +1,50 @@
1
+ import { i as stopCameraStream, r as requestCameraAccess } from "./camera-PA2Ljri3.esm.js";
2
+ import { t as MotionSensorProvider } from "./MotionSensorProvider-4v7xkqAp.esm.js";
3
+
4
+ //#region ../infra/src/media/permissions.ts
5
+ async function queryPermission(name) {
6
+ try {
7
+ if (typeof navigator === "undefined" || !navigator.permissions) return "prompt";
8
+ return (await navigator.permissions.query({ name })).state;
9
+ } catch {
10
+ return "prompt";
11
+ }
12
+ }
13
+ async function queryCameraPermission() {
14
+ return queryPermission("camera");
15
+ }
16
+
17
+ //#endregion
18
+ //#region src/internal/permissions/permissionServices.ts
19
+ async function checkPermission() {
20
+ const queryResult = await queryCameraPermission();
21
+ if (queryResult === "granted") return "granted";
22
+ if (queryResult === "denied") return "denied";
23
+ return "prompt";
24
+ }
25
+ /**
26
+ * Requests motion sensor permission. Must be called during a user gesture on iOS.
27
+ * Returns the permission result.
28
+ */
29
+ async function requestMotionPermission() {
30
+ return new MotionSensorProvider().requestPermission();
31
+ }
32
+ /**
33
+ * Requests camera permission by attempting to access the camera, then immediately
34
+ * stops the obtained stream. Also requests motion sensor permission (required on iOS
35
+ * to be called during a user gesture). This function does not keep or return the stream.
36
+ */
37
+ async function requestPermission(options = {}) {
38
+ try {
39
+ if (options.requestMotion) await requestMotionPermission();
40
+ stopCameraStream(await requestCameraAccess({ video: true }));
41
+ return "granted";
42
+ } catch (error) {
43
+ const name = error instanceof Error ? error.name : void 0;
44
+ if (name === "NotAllowedError" || name === "PermissionDeniedError") return "denied";
45
+ return "prompt";
46
+ }
47
+ }
48
+
49
+ //#endregion
50
+ export { requestPermission as n, checkPermission as t };
@@ -0,0 +1,4 @@
1
+ import "./Manager-C8PrhBOx.js";
2
+ import "./Actor-CI32dTbG.js";
3
+ import { a as phoneMachine, n as PhoneState, o as PhoneConfig, r as createPhoneManager, t as PhoneManager } from "./phoneManager-B6M30hKE.js";
4
+ export { type PhoneConfig, type PhoneManager, type PhoneState, createPhoneManager, phoneMachine };
@@ -0,0 +1,9 @@
1
+ import "./BrowserTimerProvider-DhNc_x02.esm.js";
2
+ import "./api-CESGtpbH.esm.js";
3
+ import "./events-D6-e4vok.esm.js";
4
+ import "./endpoints-CnN3SyDa.esm.js";
5
+ import "./xstate.esm-B70JrNqo.esm.js";
6
+ import { t as phoneMachine } from "./phoneStateMachine-CuPARRaT.esm.js";
7
+ import { t as createPhoneManager } from "./phoneManager-DAJbGhlY.esm.js";
8
+
9
+ export { createPhoneManager, phoneMachine };