@incodetech/core 2.1.1 → 2.2.0-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 (328) hide show
  1. package/dist/{3dAvatarProvider-BwOmTMOy.esm.js → 3dAvatarProvider-g02DTFqT.esm.js} +811 -880
  2. package/dist/Actor-iTq7YY48.d.ts +1 -0
  3. package/dist/BrowserDiagnosticsCryptoProvider-CriIh1Gt.esm.js +95 -0
  4. package/dist/BrowserLazyImportProvider-BhoA957O.esm.js +114 -0
  5. package/dist/{BrowserStorageProvider-CBHBhKQN.esm.js → BrowserStorageProvider-k-FDkC4W.esm.js} +2 -4
  6. package/dist/{BrowserTimerProvider-CHloo0eQ.esm.js → BrowserTimerProvider-BXhgNxLt.esm.js} +1 -2
  7. package/dist/{BrowserVisibilityObserverProvider-GBS6XSii.esm.js → BrowserVisibilityObserverProvider-BX1BiLDK.esm.js} +1 -2
  8. package/dist/Face2DProvider-UUQt_vRC.esm.js +437 -0
  9. package/dist/{createFaceAvatar-CpdYp9Iy.d.ts → FaceDetectionProvider-Mh6q3EbA.d.ts} +107 -159
  10. package/dist/IBrowserEnvironmentCapability-DEaRRk-R.esm.js +9 -0
  11. package/dist/IFaceAvatarCapability-BrL19G0s.d.ts +23 -0
  12. package/dist/IFeatureManagementCapability-DdEUp6tB.d.ts +1125 -0
  13. package/dist/IIdCaptureCapability-DHTT3FC2.d.ts +237 -0
  14. package/dist/IStorageCapability-ORkQfK3F.d.ts +242 -0
  15. package/dist/{ITimerCapability-DJ73P4RK.esm.js → ITimerCapability-DgdDzp8G.esm.js} +1 -2
  16. package/dist/{Manager-goNPc_h_.d.ts → Manager-CQQ99QOI.d.ts} +1 -0
  17. package/dist/{MotionSensorProvider-BHuHoYvJ.esm.js → MotionSensorProvider-DGiV77J_.esm.js} +2 -37
  18. package/dist/{OpenViduRecordingProvider-CK6A5kiU.esm.js → OpenViduRecordingProvider-Du98qevC.esm.js} +2 -4
  19. package/dist/PrivacyLensProvider-D8PS7AJa.esm.js +405 -0
  20. package/dist/StateMachine-EDpYWy0i.d.ts +6 -0
  21. package/dist/{StreamCanvasCapture-CAqUdVkM.esm.js → StreamCanvasCapture-D2XcXCZ4.esm.js} +2 -4
  22. package/dist/{addressSearch-D7msRieq.esm.js → addressSearch-DQyrvDQj.esm.js} +10 -21
  23. package/dist/ae-signature.d.ts +4 -6
  24. package/dist/ae-signature.esm.js +10 -11
  25. package/dist/antifraud.d.ts +1 -6
  26. package/dist/antifraud.esm.js +3 -8
  27. package/dist/{antifraudManager-5KA84wtF.esm.js → antifraudManager-B8Plzf7a.esm.js} +11 -8
  28. package/dist/{antifraudManager-DCiNI6np.d.ts → antifraudManager-BY36bS12.d.ts} +3 -3
  29. package/dist/{antifraudStateMachine-BQVw46N5.esm.js → antifraudStateMachine-r4VxSBS4.esm.js} +5 -7
  30. package/dist/api-Bx3gKW_y.esm.js +129 -0
  31. package/dist/{apiError-DkOXfFBu.esm.js → apiError-DZfAyExM.esm.js} +25 -3
  32. package/dist/authentication.d.ts +3 -19
  33. package/dist/authentication.esm.js +3 -35
  34. package/dist/{authenticationManager-BeT6tNZm.d.ts → authenticationManager-BBMGTcwW.d.ts} +3 -4
  35. package/dist/{authenticationManager-BryLnSaF.esm.js → authenticationManager-DscbQwIl.esm.js} +7 -10
  36. package/dist/{authenticationStateMachine-DbdxfGHx.esm.js → authenticationStateMachine-SyuM00Fa.esm.js} +11 -15
  37. package/dist/avatar.d.ts +2 -2
  38. package/dist/avatar.esm.js +2 -3
  39. package/dist/avatar2dWarm-DqucNFX4.esm.js +1330 -0
  40. package/dist/avatarStats-CdUOb3VD.esm.js +136 -0
  41. package/dist/{backCameraStream-ChrMTJv-.esm.js → backCameraStream-CUeYm5eu.esm.js} +20 -8
  42. package/dist/browser-DlFgHpoC-DnyrCR8r.esm.js +1513 -0
  43. package/dist/callback-645_omgz.d.ts +133 -0
  44. package/dist/camera-_2sXMXiF.esm.js +140 -0
  45. package/dist/camera.d.ts +19 -2
  46. package/dist/camera.esm.js +2 -6
  47. package/dist/{canvas-Pi10hG_l.esm.js → canvas-E1zGkel4.esm.js} +1 -2
  48. package/dist/certificate-issuance.d.ts +34 -39
  49. package/dist/certificate-issuance.esm.js +4 -11
  50. package/dist/{certificateIssuanceStateMachine-DlZQT1_u.esm.js → certificateIssuanceStateMachine-COd7_l2T.esm.js} +7 -11
  51. package/dist/consent.d.ts +1 -4
  52. package/dist/consent.esm.js +3 -8
  53. package/dist/{consentManager-BwNu-uC-.esm.js → consentManager-BApTlfA0.esm.js} +5 -7
  54. package/dist/{consentManager-B4PMGXW-.d.ts → consentManager-uhDPdU6i.d.ts} +55 -61
  55. package/dist/{consentStateMachine-BOkVFiU7.esm.js → consentStateMachine-WD-S-Yhs.esm.js} +5 -7
  56. package/dist/{cpf-16m_cGAM.esm.js → cpf-BIADjddF.esm.js} +1 -2
  57. package/dist/createFaceAvatar-BEj18KXi.d.ts +50 -0
  58. package/dist/createFaceAvatar-DQKaRise.esm.js +103 -0
  59. package/dist/cross-document-data-match.d.ts +2 -26
  60. package/dist/cross-document-data-match.esm.js +2 -71
  61. package/dist/crossDocumentDataMatchManager-Dq8Z3SOg.d.ts +41 -0
  62. package/dist/crossDocumentDataMatchManager-OmYvyung.esm.js +84 -0
  63. package/dist/curp-validation.d.ts +1 -11
  64. package/dist/curp-validation.esm.js +3 -8
  65. package/dist/{curpValidationManager-CoqODZx5.d.ts → curpValidationManager-DVGr7Fq7.d.ts} +4 -6
  66. package/dist/{curpValidationManager-Cbji2inV.esm.js → curpValidationManager-UZxcrsrz.esm.js} +11 -7
  67. package/dist/{curpValidationStateMachine-Dlw4qfFb.esm.js → curpValidationStateMachine-9KwnqeoB.esm.js} +22 -14
  68. package/dist/custom-fields.d.ts +2 -5
  69. package/dist/custom-fields.esm.js +24 -11
  70. package/dist/custom-watchlist.d.ts +1 -3
  71. package/dist/custom-watchlist.esm.js +11 -10
  72. package/dist/{customWatchlistStateMachine-D8w0mNxm.esm.js → customWatchlistStateMachine-B_ey3TFj.esm.js} +5 -7
  73. package/dist/{dateUtils-BW6mBV6p.esm.js → dateUtils-CvG0FvK8.esm.js} +1 -2
  74. package/dist/{deepsightService-CViys6T4.esm.js → deepsightLoader-DcWjMC6A.esm.js} +68 -14
  75. package/dist/{deepsightService-BuTOFTr8.d.ts → deepsightService-DLVQS_RH.d.ts} +41 -2
  76. package/dist/device.d.ts +10 -2
  77. package/dist/device.esm.js +21 -21
  78. package/dist/document-capture.d.ts +3 -1816
  79. package/dist/document-capture.esm.js +3 -245
  80. package/dist/document-upload.d.ts +48 -55
  81. package/dist/document-upload.esm.js +8 -14
  82. package/dist/documentCaptureManager-B4Kivr8_.d.ts +2062 -0
  83. package/dist/documentCaptureManager-DszmcU-l.esm.js +296 -0
  84. package/dist/{documentCaptureStateMachine-BkTvU3yq.esm.js → documentCaptureStateMachine-D2jBwwVb.esm.js} +66 -40
  85. package/dist/dynamic-forms.d.ts +2 -4
  86. package/dist/dynamic-forms.esm.js +3 -9
  87. package/dist/{dynamicFormsManager-CHXUBNs4.esm.js → dynamicFormsManager-BoZ2-OUI.esm.js} +48 -9
  88. package/dist/{dynamicFormsManager-CKZkE7Wo.d.ts → dynamicFormsManager-fhK0yINk.d.ts} +22 -46
  89. package/dist/{dynamicFormsStateMachine-DJ1HGZff.esm.js → dynamicFormsStateMachine-D0RzkoEV.esm.js} +161 -34
  90. package/dist/ekyb.d.ts +5 -137
  91. package/dist/ekyb.esm.js +4 -179
  92. package/dist/ekybManager-DTvfxAOZ.esm.js +178 -0
  93. package/dist/ekybManager-Dzswb_b8.d.ts +114 -0
  94. package/dist/{ekybStateMachine-D9GzA4MW.esm.js → ekybStateMachine-BlTIozb6.esm.js} +16 -193
  95. package/dist/ekyc.d.ts +2 -79
  96. package/dist/ekyc.esm.js +4 -154
  97. package/dist/ekycManager-BFpHbBoT.d.ts +97 -0
  98. package/dist/ekycManager-oTstTJuL.esm.js +156 -0
  99. package/dist/{ekycStateMachine-DnVRiu3s.esm.js → ekycStateMachine-DHvksnrr.esm.js} +141 -423
  100. package/dist/ekycUtils-Dew1rBG0.esm.js +223 -0
  101. package/dist/electronic-signature.d.ts +3 -5
  102. package/dist/electronic-signature.esm.js +2 -10
  103. package/dist/{index-36QX_21w.d.ts → electronicSignatureManager-CcUXQZS7.d.ts} +220 -251
  104. package/dist/{electronicSignatureManager-DESRgObX.esm.js → electronicSignatureManager-DRYlHPjT.esm.js} +47 -33
  105. package/dist/email.d.ts +1 -5
  106. package/dist/email.esm.js +3 -10
  107. package/dist/{emailManager-CMS4q_r6.d.ts → emailManager-CADXW_9X.d.ts} +4 -7
  108. package/dist/{emailManager-B9Vrv3Ma.esm.js → emailManager-tE-YvNtS.esm.js} +76 -12
  109. package/dist/{emailStateMachine-CbmKFVSi.esm.js → emailStateMachine-Bm894MHB.esm.js} +7 -9
  110. package/dist/{endpoints-CwrFQfW7.esm.js → endpoints-CCzL3XD_.esm.js} +55 -6
  111. package/dist/{events-1wxZ97yf.esm.js → events-CxfNJVZW.esm.js} +43 -176
  112. package/dist/events.d.ts +28 -10
  113. package/dist/events.esm.js +2 -4
  114. package/dist/extensibility.d.ts +37 -37
  115. package/dist/extensibility.esm.js +31 -80
  116. package/dist/{externalFetch-hvmz_npP.esm.js → externalFetch-BKBThAUC.esm.js} +2 -4
  117. package/dist/face-match.d.ts +2 -225
  118. package/dist/face-match.esm.js +3 -173
  119. package/dist/{faceCaptureManagerFactory-C9TiGbkA.esm.js → faceCaptureManagerFactory-BDAsBCkh.esm.js} +52 -31
  120. package/dist/{faceCaptureManagerFactory-DiJ64oem.d.ts → faceCaptureManagerFactory-BxWPpxyd.d.ts} +63 -24
  121. package/dist/{faceCaptureSetup-BqhqfFHL.esm.js → faceCaptureSetup-C7Qv79fA.esm.js} +57 -36
  122. package/dist/faceMatchManager-BXp2WUT-.esm.js +201 -0
  123. package/dist/faceMatchManager-BnvrZM2F.d.ts +268 -0
  124. package/dist/{faceMatchStateMachine-MDb30gCm.esm.js → faceMatchStateMachine-CJiO2yLO.esm.js} +14 -10
  125. package/dist/feature-management-DS_Nj5Gg.esm.js +615 -0
  126. package/dist/feature-management.d.ts +173 -0
  127. package/dist/feature-management.esm.js +2 -0
  128. package/dist/field-comparison.d.ts +1 -4
  129. package/dist/field-comparison.esm.js +2 -7
  130. package/dist/{fieldComparisonManager-OLKVsG2Z.d.ts → fieldComparisonManager-CBvEGxFx.d.ts} +3 -5
  131. package/dist/{fieldComparisonManager-Cw4uzD7S.esm.js → fieldComparisonManager-DhnYdYZ2.esm.js} +6 -11
  132. package/dist/fiscal-qr.d.ts +1 -6
  133. package/dist/fiscal-qr.esm.js +14 -29
  134. package/dist/flow-events.d.ts +2 -9
  135. package/dist/flow.d.ts +59 -21
  136. package/dist/flow.esm.js +132 -49
  137. package/dist/{flowCompletionService-B6P6_EF3.esm.js → flowCompletionService-BSe3p7pg.esm.js} +4 -6
  138. package/dist/flowServices-unhF9V9F.esm.js +620 -0
  139. package/dist/geolocation.d.ts +1 -4
  140. package/dist/geolocation.esm.js +3 -9
  141. package/dist/{geolocationManager-CF6-NizA.esm.js → geolocationManager-Bv9MSVNr.esm.js} +44 -16
  142. package/dist/geolocationManager-Cz744E5S.d.ts +506 -0
  143. package/dist/{geolocationStateMachine-CD2XJs1b.esm.js → geolocationStateMachine-BxD6JK1M.esm.js} +53 -28
  144. package/dist/{getBrowser-1yNcfFZR.esm.js → getBrowser-Cb8Zgrgp.esm.js} +1 -2
  145. package/dist/getBrowser-DNrQeL4T.esm.js +16 -0
  146. package/dist/getDeviceClass-9y-kbVDw.esm.js +19 -0
  147. package/dist/{getDeviceClass-C-Dg6IsJ.esm.js → getDeviceClass-CeBiEayS.esm.js} +1 -2
  148. package/dist/getParsedUserAgent-pJjATANs.esm.js +1622 -0
  149. package/dist/government-validation.d.ts +3 -6
  150. package/dist/government-validation.esm.js +7 -13
  151. package/dist/{governmentValidationStateMachine-BE5wiQ7Y.esm.js → governmentValidationStateMachine-BYKYUdza.esm.js} +8 -11
  152. package/dist/home.d.ts +14 -22
  153. package/dist/home.esm.js +3 -8
  154. package/dist/http.d.ts +0 -1
  155. package/dist/http.esm.js +2 -4
  156. package/dist/id-ocr.d.ts +8 -7
  157. package/dist/id-ocr.esm.js +20 -9
  158. package/dist/id-selfie-flow.d.ts +179 -0
  159. package/dist/id-selfie-flow.esm.js +917 -0
  160. package/dist/id-verification.d.ts +2 -191
  161. package/dist/id-verification.esm.js +3 -43
  162. package/dist/id.d.ts +7 -18
  163. package/dist/id.esm.js +47 -53
  164. package/dist/{idCaptureDefaults-CZajItdO.esm.js → idCaptureDefaults-WeHbQM7W.esm.js} +54 -17
  165. package/dist/idCaptureManager-BjU-Wyow.d.ts +429 -0
  166. package/dist/{idCaptureManager-DASPUMtC.esm.js → idCaptureManager-BjiBSrHm.esm.js} +173 -34
  167. package/dist/idCaptureServices-CFDwqTtQ.esm.js +396 -0
  168. package/dist/{idCaptureStateMachine-DZ2ZTSxu.esm.js → idCaptureStateMachine-CRwQh8jc.esm.js} +438 -585
  169. package/dist/{idOcrManager-Tm4LzKR0.esm.js → idOcrManager-CvJZhmBR.esm.js} +4 -7
  170. package/dist/{idOcrManager-DLfAjDZn.d.ts → idOcrManager-DXc_xRN7.d.ts} +62 -229
  171. package/dist/{idOcrStateMachine-BJxZCxwS.esm.js → idOcrStateMachine-Bq_e3l4E.esm.js} +15 -20
  172. package/dist/idVerificationManager-BB4Pj_N6.d.ts +197 -0
  173. package/dist/idVerificationManager-CduNXhWd.esm.js +51 -0
  174. package/dist/{idVerificationStateMachine-DXN9WcdM.esm.js → idVerificationStateMachine-GEQWUPU2.esm.js} +5 -7
  175. package/dist/identity-reuse.d.ts +1 -4
  176. package/dist/identity-reuse.esm.js +3 -8
  177. package/dist/{identityReuseManager-LjkPvSQN.esm.js → identityReuseManager-D5vXknnJ.esm.js} +24 -7
  178. package/dist/{identityReuseManager-CLVOYxcp.d.ts → identityReuseManager-v2TH5g7e.d.ts} +38 -43
  179. package/dist/{identityReuseStateMachine-Bp-zONoV.esm.js → identityReuseStateMachine-AubRPhIi.esm.js} +6 -8
  180. package/dist/index-B8weJxmL.d.ts +1 -0
  181. package/dist/index-BKOWUhxG.d.ts +258 -0
  182. package/dist/{index-DrpWp15Z.d.ts → index-CLMF0QLQ.d.ts} +3 -3
  183. package/dist/index.d.ts +1 -3
  184. package/dist/index.esm.js +2 -15
  185. package/dist/{invokeOnCaptureCallback-CCS2Ruzi.esm.js → invokeOnCaptureCallback-1m1VJ3Q4.esm.js} +2 -4
  186. package/dist/{lib-Bjd6nOLG.esm.js → lib-DAyUtOTj.esm.js} +1510 -1589
  187. package/dist/mandatory-consent.d.ts +2 -10
  188. package/dist/mandatory-consent.esm.js +3 -8
  189. package/dist/{mandatoryConsentManager-DeBmOHcQ.d.ts → mandatoryConsentManager-B29kR0XA.d.ts} +60 -85
  190. package/dist/{mandatoryConsentManager-DZ26sg4B.esm.js → mandatoryConsentManager-BeELm1zS.esm.js} +4 -7
  191. package/dist/{mandatoryConsentStateMachine-_44ZoDSh.esm.js → mandatoryConsentStateMachine-zroQGzwb.esm.js} +5 -7
  192. package/dist/manualReviewService-D4IkipnN.esm.js +15 -0
  193. package/dist/{mediaRecorderOptions-CClCKAiF.esm.js → mediaRecorderOptions-dALSV8af.esm.js} +2 -4
  194. package/dist/{mediapipeShared-Bcmkzs3x.esm.js → mediapipeShared-B6oNoXEQ.esm.js} +21 -9
  195. package/dist/{onDeviceFaceResults-DILtthks.esm.js → onDeviceFaceResults-f81FVdQs.esm.js} +30 -87
  196. package/dist/openviduLazy-CCDpFWg1.esm.js +10 -0
  197. package/dist/{otp-B1YeyRXu.d.ts → otp-CEWfTj9v.d.ts} +0 -1
  198. package/dist/{otp-uaXiKt_R.esm.js → otp-D2k3PeSL.esm.js} +3 -14
  199. package/dist/{permissionGuards-BNOe4Tnu.esm.js → permissionGuards-KINpmKtI.esm.js} +2 -4
  200. package/dist/{permissionServices-C_kxhNeo.esm.js → permissionServices-UvUcOSRb.esm.js} +35 -28
  201. package/dist/personhood.d.ts +13 -20
  202. package/dist/personhood.esm.js +153 -85
  203. package/dist/phone.d.ts +1 -5
  204. package/dist/phone.esm.js +3 -10
  205. package/dist/{phoneManager-_KtitbUA.d.ts → phoneManager-BBU8Lq0O.d.ts} +4 -7
  206. package/dist/{phoneManager-CRblfdcI.esm.js → phoneManager-Cpiai2IM.esm.js} +82 -12
  207. package/dist/{phoneStateMachine-DjFGWMjQ.esm.js → phoneStateMachine-E1fUUcNM.esm.js} +7 -9
  208. package/dist/{platform-0Ot-bF_a.esm.js → platform-BJrm5nzZ.esm.js} +31 -11
  209. package/dist/privacyLensWorker-DI-Rg83h.esm.js +355 -0
  210. package/dist/qe-signature.d.ts +4 -6
  211. package/dist/qe-signature.esm.js +10 -11
  212. package/dist/{recordingService-CxaYkITO.esm.js → recordingService-CFpfdXSS.esm.js} +13 -31
  213. package/dist/redirect-to-mobile.d.ts +2 -6
  214. package/dist/redirect-to-mobile.esm.js +3 -10
  215. package/dist/{redirectToMobileManager-dv29o_LS.d.ts → redirectToMobileManager-BD2PvT5B.d.ts} +8 -44
  216. package/dist/{redirectToMobileManager-DbuNUlru.esm.js → redirectToMobileManager-C0dfc7f6.esm.js} +28 -8
  217. package/dist/{redirectToMobileStateMachine-BRaIJWOM.esm.js → redirectToMobileStateMachine-C9SYCJcH.esm.js} +74 -18
  218. package/dist/rolldown-runtime-FZ4Itg2g.esm.js +42 -0
  219. package/dist/{runChildModule-kojSv3MH.esm.js → runChildModule-DpvgAGFA.esm.js} +10 -9
  220. package/dist/{WasmUtilProvider-BgzcXBdl.esm.js → safeStorage-Ep56I-f_.esm.js} +98 -473
  221. package/dist/selfie.d.ts +8 -21
  222. package/dist/selfie.esm.js +40 -47
  223. package/dist/selfieErrorUtils-C2PYBVsp.esm.js +90 -0
  224. package/dist/{selfieManager-B1Px3GGa.esm.js → selfieManager-Br4onIMy.esm.js} +7 -10
  225. package/dist/{selfieManager-4juKfrHG.d.ts → selfieManager-DwlCppg0.d.ts} +3 -4
  226. package/dist/{selfieStateMachine-D0TS93Tu.esm.js → selfieStateMachine-CNGs8vFK.esm.js} +14 -29
  227. package/dist/{session-CLsU2Jnb.esm.js → session-CX2H3tmI.esm.js} +16 -7
  228. package/dist/session.d.ts +12 -10
  229. package/dist/session.esm.js +5 -15
  230. package/dist/sessionInitializer-CV6Rj_dn.esm.js +1865 -0
  231. package/dist/{setup-CfNsYAeB.esm.js → setup-CYdVacqv.esm.js} +319 -137
  232. package/dist/{setup-CmA2apmN.d.ts → setup-DywQeePQ.d.ts} +186 -4
  233. package/dist/signature.d.ts +2 -96
  234. package/dist/signature.esm.js +3 -108
  235. package/dist/signatureManager-DGBSWz2_.d.ts +106 -0
  236. package/dist/signatureManager-DdPgcmou.esm.js +113 -0
  237. package/dist/{signatureStateMachine-CdhlMih-.esm.js → signatureStateMachine-Cf73DGWO.esm.js} +5 -7
  238. package/dist/spawn-D9jgw9pW.d.ts +1441 -0
  239. package/dist/src-0Jurt29N.esm.js +4482 -0
  240. package/dist/{stats-BVy52wLy.esm.js → stats-B0nFKawG.esm.js} +3 -5
  241. package/dist/stats.esm.js +2 -5
  242. package/dist/topLevelStateName-B5i2avbh.esm.js +41 -0
  243. package/dist/{tri-CFAPtAUM.esm.js → tri-4RsGrIt6.esm.js} +3 -119
  244. package/dist/tri.d.ts +2 -2
  245. package/dist/tri.esm-BIjHhBJ2.esm.js +2620 -0
  246. package/dist/tri.esm.js +2 -4
  247. package/dist/trueSight-B8G85W4z.esm.js +1 -0
  248. package/dist/trueSightService-6dTpiaTh.esm.js +1894 -0
  249. package/dist/trust-graph.d.ts +4 -5
  250. package/dist/trust-graph.esm.js +13 -9
  251. package/dist/types-BEwVKkLJ.d.ts +15 -0
  252. package/dist/{types-BKLb3C42.esm.js → types-BN5RPPIZ.esm.js} +1 -2
  253. package/dist/types-BSBzhHRH.d.ts +57 -0
  254. package/dist/types-BX_XkMsQ2.d.ts +21 -0
  255. package/dist/types-BfHiko5D.d.ts +48 -0
  256. package/dist/{types-D8Cl1N2Z.d.ts → types-BfgmV7s72.d.ts} +2 -2
  257. package/dist/types-CJ7Yl9K-2.d.ts +164 -0
  258. package/dist/types-DPIDuhut.d.ts +40 -0
  259. package/dist/types-DVmXIdzW.d.ts +82 -0
  260. package/dist/types-DelMqZLe.d.ts +105 -0
  261. package/dist/types-EELWyWpd.d.ts +6 -0
  262. package/dist/{types-fO6KIdol.d.ts → types-Hmd7U0JA.d.ts} +80 -6
  263. package/dist/{types-BUgeB2X6.d.ts → types-KPvmag_B.d.ts} +7 -7
  264. package/dist/types-M6eb82ra2.d.ts +589 -0
  265. package/dist/{types-DV3wkhQ4.d.ts → types-Vb4P9ovf.d.ts} +1 -3
  266. package/dist/{urlUtils-CpiYwn7w.esm.js → urlUtils-D6phjq1-.esm.js} +1 -2
  267. package/dist/{video-ZY92rkel.esm.js → video-BtSWtHy1.esm.js} +1 -2
  268. package/dist/video-selfie.d.ts +71 -117
  269. package/dist/video-selfie.esm.js +575 -643
  270. package/dist/videoSelfieCameraWarmer-h_VUk5Vu.esm.js +651 -0
  271. package/dist/videoSelfieStepDetector-D3oo2ofo.d.ts +123 -0
  272. package/dist/wasm.d.ts +2 -4
  273. package/dist/wasm.esm.js +4 -15
  274. package/dist/wasmDefaults-DTUrftxR.esm.js +125 -0
  275. package/dist/{wasmDsFlagSync-Ch0mFJNT.esm.js → wasmDsFlagSync-BqUCwLY8.esm.js} +2 -4
  276. package/dist/wasmWebClient-DM8lkb0z.esm.js +407 -0
  277. package/dist/watchlist-for-business.d.ts +1 -3
  278. package/dist/watchlist-for-business.esm.js +9 -9
  279. package/dist/watchlist.d.ts +1 -52
  280. package/dist/watchlist.esm.js +3 -70
  281. package/dist/{watchlistForBusinessStateMachine-R1Yp1g5A.esm.js → watchlistForBusinessStateMachine-BcBMkMvV.esm.js} +5 -7
  282. package/dist/watchlistManager-CjSMmbyq.esm.js +83 -0
  283. package/dist/watchlistManager-DLXef90v.d.ts +68 -0
  284. package/dist/{watchlistStateMachine-D07UVq1m.esm.js → watchlistStateMachine-Bl7Wy9Cm.esm.js} +5 -7
  285. package/dist/workflow.d.ts +239 -203
  286. package/dist/workflow.esm.js +156 -101
  287. package/dist/xstate-actors.esm-CtI5S0f4.esm.js +310 -0
  288. package/dist/{xstate.esm-nY3M5UYm.esm.js → xstate.esm-Cf4e0Cfd.esm.js} +136 -610
  289. package/package.json +14 -9
  290. package/dist/Actor-BwgmOPkb.d.ts +0 -2
  291. package/dist/Face2DProvider-CZU11g6r.esm.js +0 -824
  292. package/dist/FaceDetectionProvider-CPWg-PAH.d.ts +0 -119
  293. package/dist/IWasmUtilCapability-DaSNxgA8.d.ts +0 -150
  294. package/dist/PrivacyLensProvider-B_zrV25p.esm.js +0 -339
  295. package/dist/StateMachine-D5WO6lHS.d.ts +0 -2
  296. package/dist/StreamCanvasCapture-DHaWferF.d.ts +0 -42
  297. package/dist/ae-signature-Pp4oCAHD.esm.js +0 -12
  298. package/dist/api-DsbUi7TO.esm.js +0 -72
  299. package/dist/browser-DlFgHpoC-Br3G10gw.esm.js +0 -1425
  300. package/dist/browserSimulation-DZwEy9bu.esm.js +0 -2804
  301. package/dist/camera-CxxXV0VN.esm.js +0 -79
  302. package/dist/canvas-90BqS0NF.d.ts +0 -112
  303. package/dist/chunk-CIKcdghV.esm.js +0 -49
  304. package/dist/clientLifecycle-VyzRfALg.esm.js +0 -534
  305. package/dist/cpf-ocr.d.ts +0 -10
  306. package/dist/cpf-ocr.esm.js +0 -8
  307. package/dist/cpfOcrManager-9eM4z4o7.esm.js +0 -190
  308. package/dist/cpfOcrManager-C5U9E0hf.d.ts +0 -216
  309. package/dist/createFaceAvatar-BZSg2MNo.esm.js +0 -46
  310. package/dist/deepsightLoader-CU_tiLMx.esm.js +0 -62
  311. package/dist/flowServices-DkQmOkLV.esm.js +0 -208
  312. package/dist/geolocationManager-DaHYFkVO.d.ts +0 -156
  313. package/dist/getDeviceClass-DIjnTPjR.esm.js +0 -14
  314. package/dist/http-CnsKEaJY.esm.js +0 -0
  315. package/dist/idCaptureManager-CwuXtVu6.d.ts +0 -1013
  316. package/dist/index-BAyZ8_iI.d.ts +0 -93
  317. package/dist/openviduLazy-jPgABwrt.esm.js +0 -3
  318. package/dist/openviduLazy-wEojM41w.esm.js +0 -12
  319. package/dist/qe-signature-BnWIpR-O.esm.js +0 -12
  320. package/dist/sessionInitializer-Dj7-aJaP.esm.js +0 -547
  321. package/dist/tri.esm-DDJ1zOqG.esm.js +0 -2593
  322. package/dist/types-BcF-fii5.d.ts +0 -5
  323. package/dist/videoSelfieSteps-Djpv7cjb.esm.js +0 -58
  324. /package/dist/{IVisibilityObserverCapability-BZ1rE7ly.d.ts → IVisibilityObserverCapability-D4tvIB5v.d.ts} +0 -0
  325. /package/dist/{camera-CKU96nwJ.d.ts → camera-9wWD-pwg.d.ts} +0 -0
  326. /package/dist/{flowCompletionService-BOSTlAWo.d.ts → flowCompletionService-BlAHsKyv.d.ts} +0 -0
  327. /package/dist/{types-BgjMAEXl.d.ts → types-Bk_6dmDa.d.ts} +0 -0
  328. /package/dist/{warmup-Dd0iq6KF.d.ts → warmup-Dv2alr2-.d.ts} +0 -0
@@ -1,2593 +0,0 @@
1
- //#region ../../node_modules/.pnpm/@incodetech+tri-sdk@0.5.1/node_modules/@incodetech/tri-sdk/dist/tri.esm.js
2
- var t = class t {
3
- constructor() {
4
- this.t = !1;
5
- }
6
- static get instance() {
7
- return t.i || (t.i = new t()), t.i;
8
- }
9
- get DEBUG() {
10
- return this.t;
11
- }
12
- set DEBUG(t$1) {
13
- this.t = t$1;
14
- }
15
- warn(t$1, n$1, ...e$1) {
16
- this.t && this.o("warn", t$1, n$1, ...e$1);
17
- }
18
- error(t$1, n$1, ...e$1) {
19
- this.t && this.o("error", t$1, n$1, ...e$1);
20
- }
21
- info(t$1, n$1, ...e$1) {
22
- this.t && this.o("info", t$1, n$1, ...e$1);
23
- }
24
- fatal(t$1, n$1, e$1, ...i$1) {
25
- this.o(t$1, n$1, e$1, ...i$1);
26
- }
27
- o(t$1, n$1, e$1, ...i$1) {
28
- const o$1 = n$1 ? `[${n$1}]` : "", r$1 = console?.[t$1];
29
- r$1 && r$1(`[IncodeTRI]${o$1} ${e$1}`, ...i$1);
30
- }
31
- };
32
- const n = t.instance;
33
- function e(t$1, n$1, e$1) {
34
- let i$1 = t$1, o$1 = n$1;
35
- if ("devicepixelratiochange" === n$1) {
36
- const t$2 = window.devicePixelRatio;
37
- i$1 = window.matchMedia(`(resolution: ${t$2}dppx)`), o$1 = "change";
38
- }
39
- i$1.addEventListener(o$1, e$1, {
40
- capture: !0,
41
- passive: !0
42
- });
43
- }
44
- function i(t$1, n$1, e$1) {
45
- let i$1 = t$1, o$1 = n$1;
46
- if ("devicepixelratiochange" === n$1) {
47
- const t$2 = window.devicePixelRatio;
48
- i$1 = window.matchMedia(`(resolution: ${t$2}dppx)`), o$1 = "change";
49
- }
50
- i$1.removeEventListener(o$1, e$1, { capture: !0 });
51
- }
52
- const o = globalThis.setTimeout.bind(globalThis), r = globalThis.clearTimeout.bind(globalThis);
53
- function s(t$1, e$1) {
54
- try {
55
- return t$1();
56
- } catch (t$2) {
57
- n.warn("utils", "safeSync swallowed error:", t$2);
58
- }
59
- }
60
- async function c(t$1) {
61
- try {
62
- return await t$1();
63
- } catch (t$2) {
64
- n.warn("utils", "safeAsync swallowed error:", t$2);
65
- }
66
- }
67
- function a(t$1) {
68
- return (n$1) => s(() => t$1(n$1));
69
- }
70
- function l(t$1) {
71
- return (...e$1) => {
72
- try {
73
- t$1(...e$1);
74
- } catch (t$2) {
75
- n.warn("utils", "safeTimer swallowed error:", t$2);
76
- }
77
- };
78
- }
79
- function u(t$1, n$1) {
80
- return o(l(t$1), n$1);
81
- }
82
- function d(t$1) {
83
- if (null !== t$1) try {
84
- r(t$1);
85
- } catch (t$2) {
86
- n.warn("utils", "safeClearTimeout swallowed error:", t$2);
87
- }
88
- }
89
- const h = new Set([
90
- "xmlhttprequest",
91
- "fetch",
92
- "beacon",
93
- "navigation",
94
- "script",
95
- "link",
96
- "css",
97
- "img",
98
- "iframe",
99
- "video",
100
- "audio"
101
- ]), f = new Set([
102
- "xmlhttprequest",
103
- "fetch",
104
- "beacon"
105
- ]);
106
- function p(t$1, n$1) {
107
- return n$1 ? t$1 : null;
108
- }
109
- function m(t$1, n$1) {
110
- const e$1 = t$1, i$1 = t$1.responseStart > 0, o$1 = p(t$1.domainLookupEnd - t$1.domainLookupStart, i$1), r$1 = p(t$1.connectEnd - t$1.connectStart, i$1), s$1 = p(t$1.connectEnd > 0 && t$1.secureConnectionStart > 0 ? t$1.connectEnd - t$1.secureConnectionStart : 0, i$1), c$1 = p(t$1.responseStart - t$1.requestStart, i$1), a$1 = p(t$1.responseEnd - t$1.responseStart, i$1), l$1 = i$1 ? t$1.transferSize : null, u$1 = i$1 ? t$1.encodedBodySize : null, d$1 = i$1 ? t$1.decodedBodySize : null, f$1 = i$1 && t$1.nextHopProtocol || null, m$1 = i$1 && void 0 !== e$1.deliveryType ? e$1.deliveryType : null, w$1 = e$1.responseStatus, y$1 = void 0 !== w$1 && 0 !== w$1 ? w$1 : null;
111
- return {
112
- name: "network_request",
113
- timestamp: Date.now(),
114
- performanceTime: t$1.startTime + t$1.duration,
115
- url: n$1(t$1.name),
116
- initiatorType: (v$1 = t$1.initiatorType, h.has(v$1) ? v$1 : "other"),
117
- startTime: t$1.startTime,
118
- durationMs: t$1.duration,
119
- dnsLookupMs: o$1,
120
- tcpConnectMs: r$1,
121
- tlsHandshakeMs: s$1,
122
- ttfbMs: c$1,
123
- responseDownloadMs: a$1,
124
- transferSize: l$1,
125
- encodedBodySize: u$1,
126
- decodedBodySize: d$1,
127
- nextHopProtocol: f$1,
128
- deliveryType: m$1,
129
- responseStatus: y$1
130
- };
131
- var v$1;
132
- }
133
- function w() {}
134
- const y = 2e3;
135
- function v(t$1) {
136
- return !!t$1 && t$1.nodeType === Node.TEXT_NODE;
137
- }
138
- function b(t$1, n$1) {
139
- return t$1.tagName?.toLowerCase() === n$1.toLowerCase();
140
- }
141
- function g(t$1) {
142
- return !!t$1 && t$1.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
143
- }
144
- function k(t$1) {
145
- return !!t$1 && t$1.hasAttribute("data-tri-ignore");
146
- }
147
- function T(t$1) {
148
- return !!t$1 && t$1.hasAttribute("data-tri-redact");
149
- }
150
- function _(t$1, n$1) {
151
- return n$1?.includes(t$1.toLowerCase()) ?? !1;
152
- }
153
- function I(t$1) {
154
- try {
155
- return new URL(t$1).origin !== window.location.origin;
156
- } catch {
157
- return !1;
158
- }
159
- }
160
- function x(t$1, n$1) {
161
- return !t$1 || (t$1[n$1]?.enabled ?? !1);
162
- }
163
- function S() {
164
- const t$1 = document.activeElement;
165
- if (t$1 instanceof HTMLInputElement || t$1 instanceof HTMLTextAreaElement) {
166
- const n$2 = t$1.selectionStart, e$1 = t$1.selectionEnd;
167
- return null == n$2 || null == e$1 || n$2 === e$1 ? null : t$1.value.substring(n$2, e$1);
168
- }
169
- const n$1 = window.getSelection();
170
- return !n$1 || n$1.isCollapsed ? null : n$1.toString() || null;
171
- }
172
- function E(t$1, n$1) {
173
- return "off" !== n$1 && !k(t$1) && !T(t$1);
174
- }
175
- function A(t$1) {
176
- const n$1 = document.activeElement;
177
- if (n$1 instanceof HTMLInputElement || n$1 instanceof HTMLTextAreaElement) return n$1;
178
- const e$1 = window.getSelection();
179
- return (i$1 = ("start" === t$1 ? e$1?.anchorNode : e$1?.focusNode) ?? null) ? v(i$1) ? i$1.parentElement : i$1 instanceof Element ? i$1 : null : null;
180
- var i$1;
181
- }
182
- function M() {
183
- const t$1 = window, n$1 = "__fpjs_p_l_b", e$1 = t$1[n$1];
184
- if (function(t$2, n$2) {
185
- var e$2;
186
- const i$1 = null === (e$2 = Object.getOwnPropertyDescriptor) || void 0 === e$2 ? void 0 : e$2.call(Object, t$2, n$2);
187
- (null == i$1 ? void 0 : i$1.configurable) ? delete t$2[n$2] : i$1 && !i$1.writable || (t$2[n$2] = void 0);
188
- }(t$1, n$1), "function" != typeof (null == e$1 ? void 0 : e$1.load)) throw new Error($);
189
- return e$1;
190
- }
191
- const D = "Blocked by CSP", C = "The endpoint parameter is not a valid URL";
192
- function P(t$1) {
193
- return function(t$2, n$1) {
194
- const e$1 = document, i$1 = "securitypolicyviolation";
195
- let o$1;
196
- const r$1 = (n$2) => {
197
- const e$2 = new URL(t$2, location.href), { blockedURI: i$2 } = n$2;
198
- i$2 !== e$2.href && i$2 !== e$2.protocol.slice(0, -1) && i$2 !== e$2.origin || (o$1 = n$2, s$1());
199
- };
200
- e$1.addEventListener(i$1, r$1);
201
- const s$1 = () => e$1.removeEventListener(i$1, r$1);
202
- return Promise.resolve().then(n$1).then((t$3) => (s$1(), t$3), (t$3) => new Promise((t$4) => {
203
- const n$2 = new MessageChannel();
204
- n$2.port1.onmessage = () => t$4(), n$2.port2.postMessage(null);
205
- }).then(() => {
206
- if (s$1(), o$1) return (() => {
207
- throw new Error(D);
208
- })();
209
- throw t$3;
210
- }));
211
- }(t$1, () => function(t$2) {
212
- return new Promise((n$1, e$1) => {
213
- if (function(t$3) {
214
- if (URL.prototype) try {
215
- return new URL(t$3, location.href), !1;
216
- } catch (t$4) {
217
- if (t$4 instanceof Error && "TypeError" === t$4.name) return !0;
218
- throw t$4;
219
- }
220
- }(t$2)) throw new Error(C);
221
- const i$1 = document.createElement("script"), o$1 = () => {
222
- var t$3;
223
- return null === (t$3 = i$1.parentNode) || void 0 === t$3 ? void 0 : t$3.removeChild(i$1);
224
- }, r$1 = document.head || document.getElementsByTagName("head")[0];
225
- i$1.onload = () => {
226
- o$1(), n$1();
227
- }, i$1.onerror = () => {
228
- o$1(), e$1(new Error(R));
229
- }, i$1.async = !0, i$1.src = t$2, r$1.appendChild(i$1);
230
- });
231
- }(t$1)).then(M);
232
- }
233
- const z = "API key required";
234
- var L = "3.12.9";
235
- const R = "Failed to load the JS script of the agent", $ = "9319", U = { scriptUrl: "https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js" };
236
- function B(t$1) {
237
- function n$1() {
238
- return globalThis.window && globalThis.window[t$1] && void 0 !== globalThis.window[t$1];
239
- }
240
- return {
241
- get: function(e$1) {
242
- if (!n$1()) return null;
243
- try {
244
- const n$2 = window[t$1].getItem(e$1) ?? "null";
245
- return "null" === n$2 ? null : JSON.parse(n$2);
246
- } catch {
247
- return null;
248
- }
249
- },
250
- set: function(e$1, i$1) {
251
- n$1() && s(() => window[t$1].setItem(e$1, JSON.stringify(i$1)));
252
- },
253
- remove: function(e$1) {
254
- n$1() && s(() => window[t$1].removeItem(e$1));
255
- },
256
- key: function(e$1) {
257
- return n$1() ? window[t$1].key(e$1) : null;
258
- },
259
- get length() {
260
- return n$1() ? window[t$1].length : 0;
261
- }
262
- };
263
- }
264
- const O = B("localStorage"), q = B("sessionStorage"), j = "__tri_fingerprint";
265
- let H = null, N = null;
266
- async function F(t$1) {
267
- try {
268
- const e$1 = await (await function(t$2) {
269
- return H || (H = function(t$3) {
270
- var n$1, e$2;
271
- const { picked: i$2, rest: o$1 } = function(t$4, n$2) {
272
- const e$3 = {}, i$3 = {};
273
- for (const [o$2, r$2] of Object.entries(t$4)) n$2.includes(o$2) ? e$3[o$2] = r$2 : i$3[o$2] = r$2;
274
- return {
275
- picked: e$3,
276
- rest: i$3
277
- };
278
- }(t$3, [
279
- "scriptUrlPattern",
280
- "token",
281
- "apiKey"
282
- ]), r$1 = null !== (n$1 = i$2.apiKey) && void 0 !== n$1 ? n$1 : i$2.token, s$1 = null !== (e$2 = function(t$4, n$2) {
283
- return function(t$5, n$3) {
284
- return Object.prototype.hasOwnProperty.call(t$5, n$3);
285
- }(t$4, n$2) ? t$4[n$2] : void 0;
286
- }(t$3, "scriptUrlPattern")) && void 0 !== e$2 ? e$2 : U.scriptUrl, [c$1, a$1] = function() {
287
- const t$4 = [], n$2 = () => {
288
- t$4.push({
289
- time: /* @__PURE__ */ new Date(),
290
- state: document.visibilityState
291
- });
292
- }, e$3 = ((i$3 = document).addEventListener("visibilitychange", o$2 = n$2, r$2), () => i$3.removeEventListener("visibilitychange", o$2, r$2));
293
- var i$3, o$2, r$2;
294
- return n$2(), [t$4, e$3];
295
- }();
296
- return Promise.resolve().then(() => {
297
- if (!r$1 || "string" != typeof r$1) throw new Error(z);
298
- return function(t$4, n$2) {
299
- const e$3 = [], [i$3, o$2] = function(t$5) {
300
- const n$3 = function(t$6) {
301
- const n$4 = [...t$6];
302
- return {
303
- current: () => n$4[0],
304
- postpone() {
305
- const t$7 = n$4.shift();
306
- void 0 !== t$7 && n$4.push(t$7);
307
- },
308
- exclude() {
309
- n$4.shift();
310
- }
311
- };
312
- }(t$5), e$4 = function() {
313
- let t$6 = 0;
314
- return () => Math.random() * Math.min(3e3, 100 * Math.pow(2, t$6++));
315
- }(), i$4 = /* @__PURE__ */ new Set();
316
- return [n$3.current(), (t$6, o$3) => {
317
- let r$3;
318
- const s$3 = o$3 instanceof Error ? o$3.message : "";
319
- if (s$3 === D || s$3 === C) n$3.exclude(), r$3 = 0;
320
- else if (s$3 === $) n$3.exclude();
321
- else if (s$3 === R) {
322
- const e$5 = Date.now() - t$6.getTime() < 50, o$4 = n$3.current();
323
- o$4 && e$5 && !i$4.has(o$4) && (i$4.add(o$4), r$3 = 0), n$3.postpone();
324
- } else n$3.postpone();
325
- const c$2 = n$3.current();
326
- return void 0 === c$2 ? void 0 : [c$2, null != r$3 ? r$3 : t$6.getTime() + e$4() - Date.now()];
327
- }];
328
- }(t$4);
329
- let r$2;
330
- if (void 0 === i$3) return Promise.reject(/* @__PURE__ */ new TypeError("The list of script URL patterns is empty"));
331
- const s$2 = (t$5) => {
332
- const i$4 = /* @__PURE__ */ new Date(), c$2 = (n$3) => e$3.push({
333
- url: t$5,
334
- startedAt: i$4,
335
- finishedAt: /* @__PURE__ */ new Date(),
336
- error: n$3
337
- }), a$2 = n$2(t$5);
338
- return a$2.then(() => c$2(), c$2), a$2.catch((t$6) => {
339
- if (r$2 ??= t$6, e$3.length >= 5) throw r$2;
340
- const n$3 = o$2(i$4, t$6);
341
- if (!n$3) throw r$2;
342
- const [c$3, a$3] = n$3;
343
- return (l$1 = a$3, new Promise((t$7) => setTimeout(t$7, l$1))).then(() => s$2(c$3));
344
- var l$1;
345
- });
346
- };
347
- return s$2(i$3).then((t$5) => [t$5, e$3]);
348
- }(function(t$4, n$2) {
349
- return (Array.isArray(t$4) ? t$4 : [t$4]).map((t$5) => function(t$6, n$3) {
350
- const e$3 = encodeURIComponent;
351
- return t$6.replace(/<[^<>]+>/g, (t$7) => "<version>" === t$7 ? "3" : "<apiKey>" === t$7 ? e$3(n$3) : "<loaderVersion>" === t$7 ? e$3(L) : t$7);
352
- }(String(t$5), n$2));
353
- }(s$1, r$1), P);
354
- }).catch((t$4) => {
355
- throw a$1(), function(t$5) {
356
- return t$5 instanceof Error && t$5.message === $ ? new Error(R) : t$5;
357
- }(t$4);
358
- }).then(([t$4, n$2]) => (a$1(), t$4.load({
359
- ...o$1,
360
- ldi: {
361
- attempts: n$2,
362
- visibilityStates: c$1
363
- }
364
- })));
365
- }({
366
- apiKey: t$2.apiKey,
367
- region: t$2.region,
368
- endpoint: t$2.endpoint,
369
- scriptUrlPattern: t$2.scriptUrlPattern
370
- }).catch((t$3) => {
371
- throw H = null, t$3;
372
- }), H);
373
- }(t$1)).get({
374
- timeout: t$1.timeoutMs,
375
- extendedResult: !0
376
- });
377
- if (!e$1.visitorId) return null;
378
- const i$1 = t$1.cacheTtlMs ?? 2592e6;
379
- return i$1 > 0 && function(t$2, n$1, e$2) {
380
- const i$2 = {
381
- visitorId: t$2,
382
- requestId: n$1,
383
- expiresAt: Date.now() + e$2
384
- };
385
- O.set(j, i$2);
386
- }(e$1.visitorId, e$1.requestId, i$1), {
387
- visitorId: e$1.visitorId,
388
- requestId: e$1.requestId
389
- };
390
- } catch {
391
- return null;
392
- }
393
- }
394
- const X = {
395
- apiKey: "5uYRiI0XM6p8k4124ELX",
396
- endpoint: "https://fingerprint.incodesmile.com",
397
- scriptUrlPattern: "https://fingerprint.incodesmile.com/web/v<version>/<apiKey>/loader_v<loaderVersion>.js"
398
- }, K = {
399
- focusin: "in",
400
- focusout: "out"
401
- };
402
- function V(t$1) {
403
- return t$1 instanceof HTMLInputElement || t$1 instanceof HTMLTextAreaElement || t$1 instanceof HTMLSelectElement;
404
- }
405
- const Y = new Set([
406
- "Shift",
407
- "Control",
408
- "Alt",
409
- "Meta",
410
- "Backspace",
411
- "Delete",
412
- "Enter",
413
- "Tab",
414
- "CapsLock",
415
- "ArrowUp",
416
- "ArrowDown",
417
- "ArrowLeft",
418
- "ArrowRight"
419
- ]), J = {
420
- mouse: "mouse",
421
- touch: "touch",
422
- pen: "pen"
423
- }, G = {
424
- pointerdown: "down",
425
- pointerup: "up",
426
- click: "click",
427
- dblclick: "dblclick",
428
- contextmenu: "contextmenu"
429
- };
430
- function Z(t$1, n$1, e$1, i$1, o$1) {
431
- return {
432
- name: "navigation",
433
- timestamp: Date.now(),
434
- phase: t$1,
435
- type: n$1,
436
- from: e$1.from,
437
- to: e$1.to,
438
- timeOrigin: i$1,
439
- timing: o$1
440
- };
441
- }
442
- const Q = {
443
- fingerprint: {
444
- create: function(t$1) {
445
- let n$1 = !1;
446
- return c(async () => {
447
- const e$1 = await async function(t$2) {
448
- const n$2 = function() {
449
- const t$3 = O.get(j);
450
- return t$3 ? "string" != typeof t$3.visitorId || "number" != typeof t$3.expiresAt || t$3.expiresAt <= Date.now() ? (O.remove(j), null) : {
451
- visitorId: t$3.visitorId,
452
- requestId: "string" == typeof t$3.requestId ? t$3.requestId : ""
453
- } : null;
454
- }();
455
- return n$2 ? {
456
- visitorId: n$2.visitorId,
457
- requestId: n$2.requestId || null
458
- } : N || (N = F(t$2).finally(() => {
459
- N = null;
460
- }), N);
461
- }(X);
462
- !n$1 && e$1 && t$1.push({
463
- name: "fingerprint",
464
- deviceId: e$1.visitorId,
465
- requestId: e$1.requestId,
466
- timestamp: Date.now()
467
- });
468
- }), () => {
469
- n$1 = !0;
470
- };
471
- },
472
- layer: "device-fingerprinting"
473
- },
474
- pointer: {
475
- create: function(t$1, n$1, o$1) {
476
- const r$1 = a((n$2) => {
477
- const e$1 = function(n$3) {
478
- const e$2 = n$3, i$1 = function(t$2) {
479
- if ("mouse" === t$2.pointerType) return {
480
- button: t$2.button,
481
- buttons: t$2.buttons
482
- };
483
- const n$4 = {
484
- force: t$2.pressure,
485
- contact: Math.min(t$2.width, t$2.height)
486
- };
487
- return "pen" === t$2.pointerType && (n$4.tiltX = t$2.tiltX, n$4.tiltY = t$2.tiltY, n$4.twist = t$2.twist), n$4;
488
- }(e$2);
489
- return {
490
- id: e$2.pointerId,
491
- name: "pointer",
492
- timestamp: Date.now(),
493
- type: J[e$2.pointerType] ?? "unknown",
494
- phase: G[n$3.type],
495
- isTrusted: e$2.isTrusted,
496
- element: t$1.resolveElement(e$2.target),
497
- isPrimary: e$2.isPrimary,
498
- modifiers: {
499
- shift: e$2.shiftKey,
500
- ctrl: e$2.ctrlKey,
501
- alt: e$2.altKey,
502
- meta: e$2.metaKey
503
- },
504
- coordinates: {
505
- x: e$2.clientX,
506
- y: e$2.clientY
507
- },
508
- ...i$1
509
- };
510
- }(n$2);
511
- t$1.push(e$1);
512
- });
513
- return x(o$1, "pointer") && (e(document, "pointerdown", r$1), e(document, "pointerup", r$1)), x(o$1, "click") && e(document, "click", r$1), x(o$1, "dblclick") && e(document, "dblclick", r$1), x(o$1, "contextmenu") && e(document, "contextmenu", r$1), () => {
514
- i(document, "pointerdown", r$1), i(document, "pointerup", r$1), i(document, "click", r$1), i(document, "dblclick", r$1), i(document, "contextmenu", r$1);
515
- };
516
- },
517
- layer: "behavioral",
518
- events: [
519
- "pointer",
520
- "click",
521
- "dblclick",
522
- "contextmenu"
523
- ]
524
- },
525
- pointermove: {
526
- create: function(t$1) {
527
- let n$1 = null, o$1 = null;
528
- const r$1 = a((e$1) => {
529
- const i$1 = e$1;
530
- n$1 && n$1.id !== i$1.pointerId && (t$1.push(n$1), n$1 = null), n$1 ? n$1.samples.ts.length >= 50 ? (t$1.push(n$1), n$1 = s$1(i$1), c$1(t$1)) : (n$1.samples.x.push(i$1.clientX), n$1.samples.y.push(i$1.clientY), n$1.samples.ts.push(i$1.timeStamp), "pen" === i$1.pointerType && (n$1.samples.tiltX?.push(i$1.tiltX), n$1.samples.tiltY?.push(i$1.tiltY)), "mouse" !== i$1.pointerType && (n$1.samples.force?.push(i$1.pressure), n$1.samples.radius?.push(Math.max(i$1.width, i$1.height))), c$1(t$1)) : (n$1 = s$1(i$1), c$1(t$1));
531
- });
532
- function s$1(t$2) {
533
- const n$2 = function(t$3) {
534
- if ("mouse" === t$3.pointerType) return null;
535
- const n$3 = {
536
- force: [t$3.pressure],
537
- radius: [Math.max(t$3.width, t$3.height)]
538
- };
539
- return "pen" === t$3.pointerType && (n$3.tiltX = [t$3.tiltX], n$3.tiltY = [t$3.tiltY]), n$3;
540
- }(t$2);
541
- return {
542
- name: "pointer",
543
- timestamp: Date.now(),
544
- id: t$2.pointerId,
545
- type: t$2.pointerType,
546
- phase: "move",
547
- isTrusted: t$2.isTrusted,
548
- isPrimary: t$2.isPrimary,
549
- samples: {
550
- x: [t$2.clientX],
551
- y: [t$2.clientY],
552
- ts: [t$2.timeStamp],
553
- ...n$2 ?? {}
554
- }
555
- };
556
- }
557
- function c$1(t$2) {
558
- o$1 && clearTimeout(o$1), o$1 = setTimeout(() => {
559
- n$1 && (t$2.push(n$1), n$1 = null), o$1 = null;
560
- }, y);
561
- }
562
- return e(document, "pointermove", r$1), () => {
563
- i(document, "pointermove", r$1), o$1 && (clearTimeout(o$1), o$1 = null), n$1 && (t$1.push(n$1), n$1 = null);
564
- };
565
- },
566
- layer: "behavioral"
567
- },
568
- focus: {
569
- create: function(t$1) {
570
- const n$1 = a((n$2) => {
571
- const e$1 = function(n$3) {
572
- const e$2 = n$3;
573
- return {
574
- name: "focus",
575
- type: K[n$3.type] ?? "unknown",
576
- timestamp: Date.now(),
577
- isTrusted: e$2.isTrusted,
578
- element: t$1.resolveElement(e$2.target),
579
- relatedTarget: t$1.resolveElement(e$2.relatedTarget)
580
- };
581
- }(n$2);
582
- t$1.push(e$1);
583
- });
584
- return e(document, "focusin", n$1), e(document, "focusout", n$1), () => {
585
- i(document, "focusin", n$1), i(document, "focusout", n$1);
586
- };
587
- },
588
- layer: "behavioral"
589
- },
590
- input: {
591
- create: function(t$1) {
592
- const n$1 = a((n$2) => {
593
- const e$1 = n$2;
594
- t$1.push(function(n$3) {
595
- return {
596
- name: "keystroke",
597
- type: "input",
598
- timestamp: Date.now(),
599
- isTrusted: n$3.isTrusted,
600
- element: t$1.resolveElement(n$3.target),
601
- inputType: n$3.inputType ?? "",
602
- isComposing: n$3.isComposing ?? !1,
603
- length: (e$2 = n$3.target, e$2 instanceof HTMLInputElement || e$2 instanceof HTMLTextAreaElement || e$2 instanceof HTMLSelectElement ? e$2.value.length : 0)
604
- };
605
- var e$2;
606
- }(e$1)), function(t$2) {
607
- if ("insertReplacementText" === t$2.inputType) return !0;
608
- const n$3 = t$2.target;
609
- return !!V(n$3) && function(t$3) {
610
- try {
611
- return t$3.matches(":-webkit-autofill");
612
- } catch {
613
- return !1;
614
- }
615
- }(n$3);
616
- }(e$1) && t$1.push(function(t$2, n$3) {
617
- const e$2 = t$2.target;
618
- let i$1 = 0;
619
- return V(e$2) && (i$1 = e$2.value.length), {
620
- name: "autofill",
621
- timestamp: Date.now(),
622
- element: n$3.resolveElement(e$2),
623
- length: i$1
624
- };
625
- }(e$1, t$1));
626
- });
627
- return e(document, "input", n$1), function() {
628
- i(document, "input", n$1);
629
- };
630
- },
631
- layer: "behavioral"
632
- },
633
- keystroke: {
634
- create: function(t$1) {
635
- const { resolve: n$1, reset: o$1 } = function() {
636
- let t$2 = 0;
637
- const n$2 = /* @__PURE__ */ new Map();
638
- return {
639
- resolve: function(e$1, i$1) {
640
- if ("keydown" === i$1) {
641
- const i$2 = n$2.get(e$1);
642
- if (void 0 !== i$2) return i$2;
643
- const o$3 = ++t$2;
644
- if (n$2.size >= 32) {
645
- const t$3 = n$2.keys().next().value;
646
- void 0 !== t$3 && n$2.delete(t$3);
647
- }
648
- return n$2.set(e$1, o$3), o$3;
649
- }
650
- const o$2 = n$2.get(e$1);
651
- return void 0 !== o$2 ? (n$2.delete(e$1), o$2) : ++t$2;
652
- },
653
- reset: function() {
654
- n$2.clear();
655
- }
656
- };
657
- }(), r$1 = a((e$1) => {
658
- const i$1 = function(t$2) {
659
- const e$2 = t$2, i$2 = t$2.type;
660
- return {
661
- name: "keystroke",
662
- type: i$2,
663
- id: n$1(e$2.code, i$2),
664
- timestamp: Date.now(),
665
- isTrusted: e$2.isTrusted,
666
- keys: Y.has(e$2.key) ? [e$2.key] : []
667
- };
668
- }(e$1);
669
- t$1.push(i$1);
670
- }), s$1 = a(() => {
671
- o$1();
672
- });
673
- return e(document, "keydown", r$1), e(document, "keyup", r$1), e(window, "blur", s$1), () => {
674
- i(document, "keydown", r$1), i(document, "keyup", r$1), i(window, "blur", s$1);
675
- };
676
- },
677
- layer: "behavioral"
678
- },
679
- clipboard: {
680
- create: function(t$1, n$1 = "on", o$1) {
681
- const r$1 = a((e$1) => {
682
- const i$1 = function(e$2) {
683
- const i$2 = e$2, o$2 = e$2.type, r$2 = ("paste" === e$2.type ? i$2.clipboardData?.getData("text/plain") : S()) ?? null, s$1 = E(i$2.target, n$1);
684
- return {
685
- name: "clipboard",
686
- type: o$2,
687
- timestamp: Date.now(),
688
- isTrusted: i$2.isTrusted,
689
- element: t$1.resolveElement(i$2.target),
690
- length: r$2?.length ?? 0,
691
- ...s$1 && r$2 ? { content: r$2 } : {}
692
- };
693
- }(e$1);
694
- t$1.push(i$1);
695
- });
696
- return x(o$1, "paste") && e(document, "paste", r$1), x(o$1, "cut") && e(document, "cut", r$1), x(o$1, "copy") && e(document, "copy", r$1), () => {
697
- i(document, "paste", r$1), i(document, "cut", r$1), i(document, "copy", r$1);
698
- };
699
- },
700
- layer: "behavioral",
701
- events: [
702
- "paste",
703
- "cut",
704
- "copy"
705
- ]
706
- },
707
- form: {
708
- create: function(t$1, n$1, o$1) {
709
- const r$1 = a((n$2) => {
710
- const e$1 = {
711
- name: "form",
712
- type: (i$1 = n$2).type,
713
- timestamp: Date.now(),
714
- isTrusted: i$1.isTrusted,
715
- element: t$1.resolveElement(i$1.target)
716
- };
717
- var i$1;
718
- t$1.push(e$1);
719
- });
720
- return x(o$1, "submit") && e(document, "submit", r$1), x(o$1, "invalid") && e(document, "invalid", r$1), () => {
721
- i(document, "submit", r$1), i(document, "invalid", r$1);
722
- };
723
- },
724
- layer: "behavioral",
725
- events: ["submit", "invalid"]
726
- },
727
- change: {
728
- create: function(t$1) {
729
- const n$1 = a((n$2) => {
730
- const e$1 = (i$1 = n$2, {
731
- name: "change",
732
- timestamp: Date.now(),
733
- isTrusted: i$1.isTrusted,
734
- element: t$1.resolveElement(i$1.target)
735
- });
736
- var i$1;
737
- t$1.push(e$1);
738
- });
739
- return e(document, "change", n$1), () => {
740
- i(document, "change", n$1);
741
- };
742
- },
743
- layer: "behavioral"
744
- },
745
- selection: {
746
- create: function(t$1, n$1) {
747
- let o$1 = !1, r$1 = 0, s$1 = null, c$1 = !1, l$1 = !1;
748
- function u$1() {
749
- s$1 && (clearTimeout(s$1), s$1 = null);
750
- }
751
- function d$1() {
752
- u$1(), c$1 || l$1 || (s$1 = setTimeout(() => {
753
- s$1 = null, o$1 && h$1("timeout");
754
- }, 250));
755
- }
756
- function h$1(e$1) {
757
- o$1 && (o$1 = !1, u$1(), function(e$2) {
758
- const i$1 = A("end"), o$2 = i$1 && E(i$1, n$1), r$2 = S();
759
- t$1.push({
760
- name: "selection",
761
- phase: "end",
762
- timestamp: Date.now(),
763
- trigger: e$2,
764
- isTrusted: !0,
765
- element: t$1.resolveElement(i$1),
766
- length: r$2?.length ?? 0,
767
- ...o$2 && r$2 ? { content: r$2 } : {}
768
- });
769
- }(e$1));
770
- }
771
- const f$1 = a(() => {
772
- const n$2 = function() {
773
- const t$2 = document.getSelection();
774
- return !t$2 || t$2.isCollapsed || 0 === t$2.rangeCount;
775
- }();
776
- if (!o$1 && !n$2) return o$1 = !0, r$1 = Date.now(), t$1.push({
777
- name: "selection",
778
- phase: "start",
779
- timestamp: r$1,
780
- element: t$1.resolveElement(A("start"))
781
- }), void d$1();
782
- o$1 && n$2 ? h$1("collapse") : o$1 && d$1();
783
- }), p$1 = a((t$2) => {
784
- 0 === t$2.button && (c$1 = !0, u$1());
785
- }), m$1 = a((t$2) => {
786
- 0 === t$2.button && (c$1 = !1, o$1 && h$1("pointer"));
787
- }), w$1 = a((t$2) => {
788
- "Shift" === t$2.key && (l$1 = !0, u$1());
789
- }), y$1 = a((t$2) => {
790
- "Shift" === t$2.key && (l$1 = !1, o$1 && h$1("keyboard"));
791
- }), v$1 = a(() => {
792
- c$1 = !1;
793
- }), b$1 = a(() => {
794
- "hidden" === document.visibilityState && (c$1 = !1, l$1 = !1, o$1 && h$1("timeout"));
795
- }), g$1 = a(() => {
796
- c$1 = !1, o$1 && h$1("pointer");
797
- });
798
- return e(document, "selectionchange", f$1), e(document, "pointerdown", p$1), e(document, "pointerup", m$1), e(document, "keydown", w$1), e(document, "keyup", y$1), e(document, "contextmenu", v$1), e(document, "visibilitychange", b$1), e(document, "dragend", g$1), () => {
799
- u$1(), i(document, "selectionchange", f$1), i(document, "pointerdown", p$1), i(document, "pointerup", m$1), i(document, "keydown", w$1), i(document, "keyup", y$1), i(document, "contextmenu", v$1), i(document, "visibilitychange", b$1), i(document, "dragend", g$1);
800
- };
801
- },
802
- layer: "behavioral"
803
- },
804
- tab: {
805
- create: () => () => {},
806
- layer: "session",
807
- events: ["state", "count"]
808
- },
809
- visibility: {
810
- create: function(t$1) {
811
- const n$1 = a((n$2) => {
812
- const e$1 = document.visibilityState;
813
- if ("visible" !== e$1 && "hidden" !== e$1) return;
814
- const i$1 = {
815
- name: "visibility",
816
- type: e$1,
817
- timestamp: Date.now(),
818
- isTrusted: n$2.isTrusted
819
- };
820
- t$1.push(i$1);
821
- });
822
- return e(document, "visibilitychange", n$1), () => {
823
- i(document, "visibilitychange", n$1);
824
- };
825
- },
826
- layer: "session"
827
- },
828
- navigation: {
829
- create: function(t$1) {
830
- let n$1 = t$1.sanitizeUrl(document.referrer || "");
831
- function o$1(e$1) {
832
- t$1.push(e$1), n$1 = e$1.to ?? "";
833
- }
834
- const r$1 = a(() => {
835
- const [n$2] = performance.getEntriesByType("navigation");
836
- var e$1;
837
- o$1(Z("load", n$2?.type ?? "navigate", {
838
- from: document.referrer ? t$1.sanitizeUrl(document.referrer) : null,
839
- to: t$1.sanitizeUrl(location.href)
840
- }, performance.timeOrigin, n$2 ? {
841
- fetchStart: (e$1 = n$2).fetchStart,
842
- domainLookupStart: e$1.domainLookupStart,
843
- domainLookupEnd: e$1.domainLookupEnd,
844
- connectStart: e$1.connectStart,
845
- connectEnd: e$1.connectEnd,
846
- requestStart: e$1.requestStart,
847
- responseStart: e$1.responseStart,
848
- responseEnd: e$1.responseEnd,
849
- domInteractive: e$1.domInteractive,
850
- domContentLoadedEventStart: e$1.domContentLoadedEventStart,
851
- domContentLoadedEventEnd: e$1.domContentLoadedEventEnd,
852
- domComplete: e$1.domComplete,
853
- loadEventStart: e$1.loadEventStart,
854
- loadEventEnd: e$1.loadEventEnd,
855
- redirectCount: e$1.redirectCount,
856
- transferSize: e$1.transferSize,
857
- encodedBodySize: e$1.encodedBodySize,
858
- decodedBodySize: e$1.decodedBodySize
859
- } : void 0));
860
- }), c$1 = a((e$1) => {
861
- const i$1 = e$1;
862
- if (null === i$1.navigationType) return;
863
- const r$2 = t$1.sanitizeUrl(location.href);
864
- r$2 !== n$1 && o$1(Z("change", i$1.navigationType, {
865
- from: n$1,
866
- to: r$2
867
- }, performance.timeOrigin));
868
- }), l$1 = a(() => d$1("traverse")), u$1 = a(() => d$1("hashchange"));
869
- function d$1(e$1) {
870
- const i$1 = t$1.sanitizeUrl(location.href);
871
- "hashchange" === e$1 && i$1 === n$1 || o$1(Z("change", e$1, {
872
- from: n$1,
873
- to: i$1
874
- }, performance.timeOrigin));
875
- }
876
- const h$1 = history.pushState, f$1 = history.replaceState, p$1 = function(...t$2) {
877
- const n$2 = h$1.apply(this, t$2);
878
- return s(() => d$1("push")), n$2;
879
- }, m$1 = function(...t$2) {
880
- const n$2 = f$1.apply(this, t$2);
881
- return s(() => d$1("replace")), n$2;
882
- };
883
- return window.navigation ? e(window.navigation, "currententrychange", c$1) : (history.pushState = p$1, history.replaceState = m$1, e(window, "popstate", l$1), e(window, "hashchange", u$1)), "complete" === document.readyState ? r$1(new Event("load")) : e(window, "load", r$1), () => {
884
- window.navigation ? i(window.navigation, "currententrychange", c$1) : (history.pushState === p$1 && (history.pushState = h$1), history.replaceState === m$1 && (history.replaceState = f$1), i(window, "popstate", l$1), i(window, "hashchange", u$1)), i(window, "load", r$1);
885
- };
886
- },
887
- layer: "session"
888
- },
889
- networkconnection: {
890
- create: function(t$1) {
891
- const n$1 = a(() => {
892
- const n$2 = {
893
- name: "network",
894
- type: "connection",
895
- state: navigator.onLine ? "online" : "offline",
896
- timestamp: Date.now()
897
- };
898
- t$1.push(n$2);
899
- });
900
- return e(window, "online", n$1), e(window, "offline", n$1), () => {
901
- i(window, "online", n$1), i(window, "offline", n$1);
902
- };
903
- },
904
- layer: "session"
905
- },
906
- scroll: {
907
- create: function(t$1) {
908
- let n$1 = null, o$1 = null;
909
- const r$1 = a((e$1) => n$1 ? n$1.samples.ts.length >= 50 ? (t$1.push(n$1), n$1 = s$1(e$1), void c$1(t$1)) : (n$1.samples.x.push(window.scrollX), n$1.samples.y.push(window.scrollY), n$1.samples.ts.push(e$1.timeStamp), void c$1(t$1)) : (n$1 = s$1(e$1), void c$1(t$1)));
910
- function s$1(t$2) {
911
- return {
912
- name: "scroll",
913
- timestamp: Date.now(),
914
- samples: {
915
- x: [window.scrollX],
916
- y: [window.scrollY],
917
- ts: [t$2.timeStamp]
918
- },
919
- height: window.innerHeight,
920
- width: window.innerWidth,
921
- scrollX: window.scrollX,
922
- scrollY: window.scrollY,
923
- pageX: window.pageXOffset,
924
- pageY: window.pageYOffset
925
- };
926
- }
927
- function c$1(t$2) {
928
- o$1 && clearTimeout(o$1), o$1 = setTimeout(() => {
929
- n$1 && (t$2.push(n$1), n$1 = null), o$1 = null;
930
- }, y);
931
- }
932
- return e(window, "scroll", r$1), () => {
933
- i(window, "scroll", r$1), o$1 && (clearTimeout(o$1), o$1 = null), n$1 && (t$1.push(n$1), n$1 = null);
934
- };
935
- },
936
- layer: "behavioral"
937
- },
938
- viewportresize: {
939
- create: function(t$1) {
940
- let n$1 = null, o$1 = null;
941
- const r$1 = a((e$1) => n$1 ? n$1.samples.ts.length >= 50 ? (t$1.push(n$1), n$1 = s$1(e$1), void c$1(t$1)) : (n$1.samples.height.push(window.innerHeight), n$1.samples.width.push(window.innerWidth), n$1.samples.ts.push(e$1.timeStamp), n$1.samples.scrollX.push(window.scrollX), n$1.samples.scrollY.push(window.scrollY), n$1.samples.dpr.push(window.devicePixelRatio), void c$1(t$1)) : (n$1 = s$1(e$1), void c$1(t$1)));
942
- function s$1(t$2) {
943
- return {
944
- name: "viewport",
945
- type: "resize",
946
- timestamp: Date.now(),
947
- samples: {
948
- height: [window.innerHeight],
949
- width: [window.innerWidth],
950
- ts: [t$2.timeStamp],
951
- scrollX: [window.scrollX],
952
- scrollY: [window.scrollY],
953
- dpr: [window.devicePixelRatio]
954
- }
955
- };
956
- }
957
- function c$1(t$2) {
958
- o$1 && clearTimeout(o$1), o$1 = setTimeout(() => {
959
- n$1 && (t$2.push(n$1), n$1 = null), o$1 = null;
960
- }, y);
961
- }
962
- return e(window, "resize", r$1), () => {
963
- i(window, "resize", r$1), o$1 && (clearTimeout(o$1), o$1 = null), n$1 && (t$1.push(n$1), n$1 = null);
964
- };
965
- },
966
- layer: "behavioral"
967
- },
968
- viewport: {
969
- create: function(t$1, n$1, o$1) {
970
- const r$1 = a((n$2) => {
971
- const e$1 = c$1(n$2, "orientation");
972
- t$1.push(e$1);
973
- }), s$1 = a((n$2) => {
974
- const e$1 = c$1(n$2, "ratiochange");
975
- t$1.push(e$1);
976
- });
977
- function c$1(t$2, n$2) {
978
- return {
979
- name: "viewport",
980
- type: n$2,
981
- timestamp: Date.now(),
982
- isTrusted: t$2.isTrusted,
983
- height: window.innerHeight,
984
- width: window.innerWidth,
985
- scrollX: window.scrollX,
986
- scrollY: window.scrollY,
987
- dpr: window.devicePixelRatio
988
- };
989
- }
990
- return x(o$1, "orientationchange") && e(window, "orientationchange", r$1), x(o$1, "devicepixelratiochange") && e(window, "devicepixelratiochange", s$1), () => {
991
- i(window, "orientationchange", r$1), i(window, "devicepixelratiochange", s$1);
992
- };
993
- },
994
- layer: "behavioral",
995
- events: ["orientationchange", "devicepixelratiochange"]
996
- },
997
- sensors: {
998
- create: function(t$1, n$1, o$1) {
999
- let r$1 = null, s$1 = null, c$1 = null, u$1 = null, h$1 = !1;
1000
- function f$1() {
1001
- u$1 && d(u$1), u$1 = setTimeout(l(() => {
1002
- p$1(), u$1 = null;
1003
- }), y);
1004
- }
1005
- function p$1() {
1006
- r$1 && (t$1.push(r$1), r$1 = null), s$1 && (t$1.push(s$1), s$1 = null), c$1 && (t$1.push(c$1), c$1 = null);
1007
- }
1008
- const m$1 = a((n$2) => {
1009
- const e$1 = n$2, i$1 = e$1.timeStamp, o$2 = e$1.acceleration, s$2 = e$1.accelerationIncludingGravity, c$2 = e$1.rotationRate;
1010
- if (!o$2 && !s$2 && !c$2 || null === o$2?.x && null === o$2?.y && null === o$2?.z && null === s$2?.x && null === s$2?.y && null === s$2?.z && null === c$2?.alpha && null === c$2?.beta && null === c$2?.gamma) return;
1011
- if (!r$1) return r$1 = {
1012
- name: "sensors",
1013
- type: "motion",
1014
- timestamp: Date.now(),
1015
- interval: e$1.interval ?? null,
1016
- samples: {
1017
- ax: [o$2?.x ?? 0],
1018
- ay: [o$2?.y ?? 0],
1019
- az: [o$2?.z ?? 0],
1020
- agx: [s$2?.x ?? 0],
1021
- agy: [s$2?.y ?? 0],
1022
- agz: [s$2?.z ?? 0],
1023
- rrAlpha: [c$2?.alpha ?? 0],
1024
- rrBeta: [c$2?.beta ?? 0],
1025
- rrGamma: [c$2?.gamma ?? 0],
1026
- ts: [i$1]
1027
- }
1028
- }, void f$1();
1029
- if (r$1.samples.ts.length >= 50) return t$1.push(r$1), r$1 = {
1030
- name: "sensors",
1031
- type: "motion",
1032
- timestamp: Date.now(),
1033
- interval: e$1.interval ?? null,
1034
- samples: {
1035
- ax: [o$2?.x ?? 0],
1036
- ay: [o$2?.y ?? 0],
1037
- az: [o$2?.z ?? 0],
1038
- agx: [s$2?.x ?? 0],
1039
- agy: [s$2?.y ?? 0],
1040
- agz: [s$2?.z ?? 0],
1041
- rrAlpha: [c$2?.alpha ?? 0],
1042
- rrBeta: [c$2?.beta ?? 0],
1043
- rrGamma: [c$2?.gamma ?? 0],
1044
- ts: [i$1]
1045
- }
1046
- }, void f$1();
1047
- const a$1 = r$1.samples;
1048
- a$1.ax.push(o$2?.x ?? 0), a$1.ay.push(o$2?.y ?? 0), a$1.az.push(o$2?.z ?? 0), a$1.agx.push(s$2?.x ?? 0), a$1.agy.push(s$2?.y ?? 0), a$1.agz.push(s$2?.z ?? 0), a$1.rrAlpha.push(c$2?.alpha ?? 0), a$1.rrBeta.push(c$2?.beta ?? 0), a$1.rrGamma.push(c$2?.gamma ?? 0), a$1.ts.push(i$1), f$1();
1049
- }), w$1 = a((n$2) => {
1050
- const e$1 = n$2;
1051
- if (null == e$1.alpha && null == e$1.beta && null == e$1.gamma) return;
1052
- const i$1 = e$1.timeStamp, o$2 = e$1.webkitCompassHeading ?? 0;
1053
- if (!s$1) return s$1 = {
1054
- name: "sensors",
1055
- type: "orientation",
1056
- timestamp: Date.now(),
1057
- absolute: h$1 || e$1.absolute,
1058
- samples: {
1059
- alpha: [e$1.alpha ?? 0],
1060
- beta: [e$1.beta ?? 0],
1061
- gamma: [e$1.gamma ?? 0],
1062
- compassHeading: [o$2],
1063
- ts: [i$1]
1064
- }
1065
- }, void f$1();
1066
- if (s$1.samples.ts.length >= 50) return t$1.push(s$1), s$1 = {
1067
- name: "sensors",
1068
- type: "orientation",
1069
- timestamp: Date.now(),
1070
- absolute: h$1 || e$1.absolute,
1071
- samples: {
1072
- alpha: [e$1.alpha ?? 0],
1073
- beta: [e$1.beta ?? 0],
1074
- gamma: [e$1.gamma ?? 0],
1075
- compassHeading: [o$2],
1076
- ts: [i$1]
1077
- }
1078
- }, void f$1();
1079
- const r$2 = s$1.samples;
1080
- r$2.alpha.push(e$1.alpha ?? 0), r$2.beta.push(e$1.beta ?? 0), r$2.gamma.push(e$1.gamma ?? 0), r$2.compassHeading.push(o$2), r$2.ts.push(i$1), f$1();
1081
- }), v$1 = a((n$2) => {
1082
- const e$1 = n$2.value;
1083
- if (null == e$1) return;
1084
- const i$1 = n$2.timeStamp;
1085
- c$1 ? c$1.samples.ts.length >= 50 ? (t$1.push(c$1), c$1 = {
1086
- name: "sensors",
1087
- type: "light",
1088
- timestamp: Date.now(),
1089
- samples: {
1090
- lux: [e$1],
1091
- ts: [i$1]
1092
- }
1093
- }, f$1()) : (c$1.samples.lux.push(e$1), c$1.samples.ts.push(i$1), f$1()) : (c$1 = {
1094
- name: "sensors",
1095
- type: "light",
1096
- timestamp: Date.now(),
1097
- samples: {
1098
- lux: [e$1],
1099
- ts: [i$1]
1100
- }
1101
- }, f$1());
1102
- });
1103
- return x(o$1, "motion") && e(window, "devicemotion", m$1), x(o$1, "orientation") && ("ondeviceorientationabsolute" in window ? (h$1 = !0, e(window, "deviceorientationabsolute", w$1)) : e(window, "deviceorientation", w$1)), x(o$1, "light") && e(window, "devicelight", v$1), function() {
1104
- i(window, "devicemotion", m$1), i(window, h$1 ? "deviceorientationabsolute" : "deviceorientation", w$1), i(window, "devicelight", v$1), u$1 && (d(u$1), u$1 = null), p$1();
1105
- };
1106
- },
1107
- layer: "behavioral",
1108
- events: [
1109
- "motion",
1110
- "orientation",
1111
- "light"
1112
- ]
1113
- },
1114
- "network-request": {
1115
- create: function(t$1) {
1116
- var e$1;
1117
- const i$1 = function(t$2, e$2, i$2, o$1 = f) {
1118
- if ("undefined" == typeof PerformanceObserver) return w;
1119
- let r$1 = null;
1120
- try {
1121
- r$1 = new PerformanceObserver((n$1) => {
1122
- for (const r$2 of n$1.getEntries()) {
1123
- const n$2 = r$2;
1124
- o$1.has(n$2.initiatorType) && (e$2(n$2.name) || t$2(m(n$2, i$2)));
1125
- }
1126
- }), r$1.observe({
1127
- type: "resource",
1128
- buffered: !0
1129
- });
1130
- } catch {
1131
- return n.warn("network-request", "PerformanceObserver failed to start"), w;
1132
- }
1133
- return function() {
1134
- r$1?.disconnect(), r$1 = null;
1135
- };
1136
- }(function(n$1) {
1137
- s(() => t$1.push(n$1));
1138
- }, (e$1 = t$1.ignoredOrigins, function(t$2) {
1139
- try {
1140
- return e$1.has(new URL(t$2).origin);
1141
- } catch {
1142
- return !1;
1143
- }
1144
- }), t$1.sanitizeUrl);
1145
- return function() {
1146
- i$1();
1147
- };
1148
- },
1149
- layer: "session"
1150
- },
1151
- screen: {
1152
- create: function(t$1) {
1153
- const n$1 = s(() => function() {
1154
- const t$2 = window.screen;
1155
- return {
1156
- name: "screen",
1157
- timestamp: Date.now(),
1158
- availWidth: t$2.availWidth,
1159
- availHeight: t$2.availHeight,
1160
- width: t$2.width,
1161
- height: t$2.height,
1162
- colorDepth: t$2.colorDepth,
1163
- pixelDepth: t$2.pixelDepth,
1164
- availLeft: t$2.availLeft ?? 0,
1165
- availTop: t$2.availTop ?? 0,
1166
- orientation: t$2.orientation ? {
1167
- type: t$2.orientation.type,
1168
- angle: t$2.orientation.angle
1169
- } : null,
1170
- isExtended: t$2.isExtended ?? !1,
1171
- viewport: {
1172
- height: window.innerHeight,
1173
- width: window.innerWidth,
1174
- scrollX: window.scrollX,
1175
- scrollY: window.scrollY,
1176
- dpr: window.devicePixelRatio
1177
- }
1178
- };
1179
- }());
1180
- return n$1 && t$1.push(n$1), () => {};
1181
- },
1182
- layer: "session"
1183
- }
1184
- }, W = Object.keys(Q), tt = [
1185
- /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,
1186
- /^0b[01]+$/i,
1187
- /^0o[0-7]+$/i,
1188
- /^0x[0-9a-f]+$/i,
1189
- /^[a-z][a-z0-9]{1,12}:[A-Za-z0-9+/=_-]{6,}$/i,
1190
- /^[a-z]{2,8}_(?=.*\d)[A-Za-z0-9]{3,}$/,
1191
- /^\d{4,}$/,
1192
- /@/,
1193
- /^[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{10,}$/,
1194
- /^[A-Za-z0-9_-]{20,}={0,2}$/,
1195
- /^[0-9a-f]{7,}$/i
1196
- ];
1197
- function nt(t$1) {
1198
- try {
1199
- const n$1 = new URL(t$1, location.href);
1200
- n$1.username = "", n$1.password = "", n$1.hash = "";
1201
- const e$1 = [...n$1.searchParams.keys()], i$1 = e$1.length > 0 ? "?" + e$1.map((t$2) => `${encodeURIComponent(t$2)}=<redacted>`).join("&") : "";
1202
- n$1.search = "", n$1.pathname = n$1.pathname.split("/").map((t$2) => "" !== t$2 && function(t$3) {
1203
- for (const n$2 of tt) if (n$2.test(t$3)) return !0;
1204
- return !1;
1205
- }(t$2) ? ":param" : t$2).join("/");
1206
- const o$1 = n$1.origin + n$1.pathname + i$1;
1207
- return o$1.length > 2048 ? o$1.slice(0, 2048) : o$1;
1208
- } catch {
1209
- return "";
1210
- }
1211
- }
1212
- const et = "idle", it = "ready", ot = "started", rt = "collection-disabled", st = "init-failed", ct = {
1213
- flush: {
1214
- intervalMs: 2e3,
1215
- maxIntervalMs: 3e4,
1216
- size: 50,
1217
- backoffFailureThreshold: 2
1218
- },
1219
- queue: { size: 100 }
1220
- };
1221
- function at() {
1222
- const t$1 = {};
1223
- for (const n$1 of W) t$1[n$1] = dt(n$1, void 0, !0);
1224
- return t$1;
1225
- }
1226
- function lt(t$1) {
1227
- const n$1 = {};
1228
- for (const e$1 of W) n$1[e$1] = dt(e$1, void 0, t$1[Q[e$1].layer] ?? !1);
1229
- return n$1;
1230
- }
1231
- function ut(t$1) {
1232
- const n$1 = {};
1233
- for (const e$1 of W) {
1234
- const i$1 = t$1[e$1];
1235
- n$1[e$1] = dt(e$1, i$1, i$1?.enabled ?? !1);
1236
- }
1237
- return n$1;
1238
- }
1239
- function dt(t$1, n$1, e$1) {
1240
- const i$1 = Q[t$1]?.events ?? [];
1241
- if (0 === i$1.length) return { enabled: e$1 };
1242
- const o$1 = n$1?.events, r$1 = {};
1243
- for (const t$2 of i$1) r$1[t$2] = { enabled: o$1?.[t$2] ?? !0 };
1244
- return {
1245
- enabled: e$1,
1246
- events: r$1
1247
- };
1248
- }
1249
- function ht(t$1) {
1250
- if (!t$1) return null;
1251
- const n$1 = t$1.split(".")[1], e$1 = atob(n$1.replace(/-/g, "+").replace(/_/g, "/"));
1252
- return JSON.parse(e$1);
1253
- }
1254
- const ft = function(t$1, n$1 = 30) {
1255
- if (!t$1) return !0;
1256
- const e$1 = ht(t$1);
1257
- return !e$1 || "number" != typeof e$1.exp || 1e3 * e$1.exp <= Date.now() + 1e3 * n$1;
1258
- };
1259
- async function pt(t$1, n$1) {
1260
- return globalThis.navigator && "locks" in globalThis.navigator && "request" in globalThis.navigator.locks && "query" in globalThis.navigator.locks ? navigator.locks.request(t$1, { mode: "exclusive" }, async () => c(n$1)) : c(n$1);
1261
- }
1262
- const mt = "__tri", wt = `${mt}_activity_token`, yt = `${mt}_activity_id`, vt = `${mt}_activity_status`, bt = "__tri_activity_lock";
1263
- var gt = class {
1264
- constructor(t$1) {
1265
- this.context = t$1, this.l = null, this.u = null, this.h = null, this.p = null, this.m = !1;
1266
- }
1267
- getToken() {
1268
- return this.l;
1269
- }
1270
- getActivityId() {
1271
- return this.u ?? "";
1272
- }
1273
- isActive() {
1274
- return "ACTIVE" === this.h && null !== this.l;
1275
- }
1276
- async start() {
1277
- return this.m = !0, this.p || (this.p = this.v()), this.p;
1278
- }
1279
- async stop() {
1280
- this.m = !1, this.k(null), this.p = null, this.l && await this.context.stopActivity(), this.T(null);
1281
- }
1282
- async refresh() {
1283
- if (!this.m) return;
1284
- const t$1 = this.l;
1285
- await pt(bt, async () => {
1286
- if (this.l && this.l !== t$1 && !ft(this.l) && "ACTIVE" === this.h) return;
1287
- const n$1 = this._();
1288
- n$1 && n$1.token !== t$1 && !ft(n$1.token) && "ACTIVE" === n$1.activityStatus ? this.T(n$1) : (this.I(), await this.S());
1289
- });
1290
- }
1291
- async v() {
1292
- try {
1293
- if (this.l && !ft(this.l)) return;
1294
- await pt(bt, async () => {
1295
- await this.S();
1296
- });
1297
- } finally {
1298
- this.p = null;
1299
- }
1300
- }
1301
- async S() {
1302
- const t$1 = this._();
1303
- if (t$1 && !ft(t$1.token) && "ACTIVE" === t$1.activityStatus) return void this.T(t$1);
1304
- t$1 && this.I();
1305
- const n$1 = await this.context.startActivity();
1306
- if (!n$1.ok) return;
1307
- if (!n$1.data.token) return;
1308
- const e$1 = n$1.data;
1309
- this.T(e$1), this.A(e$1);
1310
- }
1311
- _() {
1312
- const [t$1, n$1, e$1] = [
1313
- O.get(wt),
1314
- O.get(yt),
1315
- O.get(vt)
1316
- ];
1317
- return t$1 && n$1 && e$1 ? {
1318
- token: t$1,
1319
- activityId: n$1,
1320
- activityStatus: e$1
1321
- } : ((t$1 || n$1 || e$1) && this.I(), null);
1322
- }
1323
- A(t$1) {
1324
- O.set(wt, t$1.token), O.set(yt, t$1.activityId), O.set(vt, t$1.activityStatus);
1325
- }
1326
- I() {
1327
- this.k(null), this.T(null);
1328
- }
1329
- k(t$1) {
1330
- if (!t$1) return O.remove(wt), O.remove(yt), void O.remove(vt);
1331
- O.set(wt, t$1.token), O.set(yt, t$1.activityId), O.set(vt, t$1.activityStatus);
1332
- }
1333
- T(t$1) {
1334
- if (!t$1) return this.l = null, this.u = null, void (this.h = null);
1335
- this.l = t$1.token, this.u = t$1.activityId, this.h = t$1.activityStatus;
1336
- }
1337
- };
1338
- const kt = [
1339
- 401,
1340
- 403,
1341
- 409
1342
- ], Tt = Object.freeze({
1343
- tab: 80,
1344
- navigation: 80,
1345
- visibility: 80,
1346
- network: 80,
1347
- screen: 80,
1348
- fingerprint: 80,
1349
- pointer: 60,
1350
- keystroke: 60,
1351
- autofill: 60,
1352
- change: 60,
1353
- form: 60,
1354
- clipboard: 60,
1355
- selection: 60,
1356
- focus: 60,
1357
- viewport: 60,
1358
- network_request: 60,
1359
- scroll: 40,
1360
- sensors: 40
1361
- });
1362
- function _t(t$1) {
1363
- return "pointer" === t$1.name && "move" === t$1.phase || "viewport" === t$1.name && "resize" === t$1.type ? 40 : Tt[t$1.name];
1364
- }
1365
- const It = new Array(256);
1366
- for (let t$1 = 0; t$1 < 256; t$1++) It[t$1] = (t$1 + 256).toString(16).slice(1);
1367
- const xt = new Uint8Array(16);
1368
- function St(t$1) {
1369
- return It[t$1[0]] + It[t$1[1]] + It[t$1[2]] + It[t$1[3]] + "-" + It[t$1[4]] + It[t$1[5]] + "-" + It[t$1[6]] + It[t$1[7]] + "-" + It[t$1[8]] + It[t$1[9]] + "-" + It[t$1[10]] + It[t$1[11]] + It[t$1[12]] + It[t$1[13]] + It[t$1[14]] + It[t$1[15]];
1370
- }
1371
- function Et() {
1372
- return crypto.randomUUID();
1373
- }
1374
- function At() {
1375
- return crypto.getRandomValues(xt), xt[6] = 15 & xt[6] | 64, xt[8] = 63 & xt[8] | 128, St(xt);
1376
- }
1377
- function Mt() {
1378
- for (let t$1 = 0; t$1 < 16; t$1++) xt[t$1] = 256 * Math.random() | 0;
1379
- return xt[6] = 15 & xt[6] | 64, xt[8] = 63 & xt[8] | 128, St(xt);
1380
- }
1381
- const Dt = function() {
1382
- if ("undefined" != typeof crypto) {
1383
- if ("function" == typeof crypto.randomUUID) return Et;
1384
- if ("function" == typeof crypto.getRandomValues) return At;
1385
- }
1386
- return Mt;
1387
- }();
1388
- function Ct() {
1389
- return Dt();
1390
- }
1391
- var Pt = class {
1392
- constructor(t$1, n$1) {
1393
- this.M = t$1, this.D = n$1, this.C = [], this.P = null, this.L = [], this.R = null, this.m = !1, this.$ = !0, this.U = 0, this.B = 0, this.O = t$1.flush.intervalMs;
1394
- }
1395
- push(t$1) {
1396
- if (this.m) {
1397
- if (this.C.length < this.q() ? this.C.push(t$1) : this.j(t$1), this.$) return this.C.length >= this.M.flush.size ? (d(this.P), this.P = null, void this.flush("capacity")) : void this.H();
1398
- } else n.warn("Transport", "push() called before start() — event dropped");
1399
- }
1400
- flush(t$1) {
1401
- if (this.m && this.D.isActivityActive()) try {
1402
- if ("lifecycle" === t$1) return void this.N();
1403
- if (0 === this.C.length) return;
1404
- const e$1 = this.F(t$1);
1405
- this.D.ingest(e$1, !1).then((t$2) => this.X(t$2, e$1)).catch(() => {
1406
- n.warn("Transport", "ingest threw unexpectedly — batch dropped");
1407
- }), this.C.length > 0 && this.H();
1408
- } catch (t$2) {
1409
- n.warn("Transport", "flush() threw unexpectedly:", t$2);
1410
- }
1411
- }
1412
- start() {
1413
- this.m || (this.m = !0, this.$ = "undefined" == typeof navigator || navigator.onLine);
1414
- }
1415
- stop() {
1416
- if (!this.m) return Promise.resolve();
1417
- d(this.P), this.P = null, d(this.R), this.R = null;
1418
- const t$1 = this.N();
1419
- return this.m = !1, t$1;
1420
- }
1421
- onConnectionChange() {
1422
- const t$1 = "undefined" == typeof navigator || navigator.onLine;
1423
- if (t$1 !== this.$) {
1424
- if (this.$ = t$1, !this.$) return d(this.P), this.P = null, d(this.R), void (this.R = null);
1425
- this.C.length > 0 && this.H(), this.L.length > 0 && this.K();
1426
- }
1427
- }
1428
- H() {
1429
- this.m && this.$ && null === this.P && (this.P = u(() => {
1430
- this.P = null, this.flush("interval");
1431
- }, this.O));
1432
- }
1433
- K() {
1434
- this.m && this.$ && null === this.R && (this.R = u(() => {
1435
- this.R = null, this.V();
1436
- }, this.O));
1437
- }
1438
- V() {
1439
- if (!this.m || !this.$ || 0 === this.L.length || !this.D.isActivityActive()) return;
1440
- const t$1 = this.L.shift();
1441
- this.D.ingest(t$1.batch, !1).then((n$1) => this.Y(n$1, t$1)).catch(() => {
1442
- n.warn("Transport", "retry drain ingest threw unexpectedly — batch dropped"), this.L.length > 0 && this.K();
1443
- });
1444
- }
1445
- J(t$1, e$1) {
1446
- this.L.length >= 5 && (this.L.shift(), n.warn("Transport", "retry queue full — oldest batch evicted")), this.L.push({
1447
- batch: t$1,
1448
- attempts: e$1
1449
- }), this.K();
1450
- }
1451
- X(t$1, n$1) {
1452
- t$1.ok ? this.G() : this.Z(t$1) && this.J(n$1, 1);
1453
- }
1454
- Y(t$1, e$1) {
1455
- if (t$1.ok) return this.G(), void (this.L.length > 0 && this.K());
1456
- if (this.Z(t$1)) {
1457
- if (e$1.attempts >= 3) return this.W(), n.warn("Transport", "batch dropped after MAX_RETRY_ATTEMPTS", e$1.batch.batchId), void (this.L.length > 0 && this.K());
1458
- this.W(), this.J(e$1.batch, e$1.attempts + 1);
1459
- } else this.L.length > 0 && this.K();
1460
- }
1461
- W() {
1462
- this.U++, this.U % this.M.flush.backoffFailureThreshold === 0 && (this.O = Math.min(2 * this.O, this.M.flush.maxIntervalMs));
1463
- }
1464
- G() {
1465
- this.U = 0, this.O = this.M.flush.intervalMs;
1466
- }
1467
- q() {
1468
- return this.M.queue.size * (this.$ ? 1 : 2);
1469
- }
1470
- async N() {
1471
- if (!this.D.isActivityActive()) return Promise.resolve();
1472
- const t$1 = [];
1473
- for (const e$1 of this.L) t$1.push(this.D.ingest(e$1.batch, !0).catch(() => {
1474
- n.warn("Transport", "lifecycle retry ingest threw — batch dropped");
1475
- }));
1476
- if (this.L = [], this.C.length > 0) {
1477
- const e$1 = this.F("lifecycle");
1478
- t$1.push(this.D.ingest(e$1, !0).catch(() => {
1479
- n.warn("Transport", "lifecycle ingest threw — batch dropped");
1480
- }));
1481
- }
1482
- return Promise.allSettled(t$1).then(() => {});
1483
- }
1484
- j(t$1) {
1485
- const n$1 = _t(t$1);
1486
- for (let e$1 = 0; e$1 < this.C.length; e$1++) if (_t(this.C[e$1]) < n$1) {
1487
- for (let t$2 = e$1; t$2 < this.C.length - 1; t$2++) this.C[t$2] = this.C[t$2 + 1];
1488
- this.C.length -= 1, this.C.push(t$1);
1489
- return;
1490
- }
1491
- }
1492
- F(t$1) {
1493
- const n$1 = "lifecycle" === t$1 ? this.C.splice(-this.M.flush.size) : this.C.splice(0, this.M.flush.size);
1494
- return {
1495
- activityId: "",
1496
- batchId: Ct(),
1497
- batchSequence: this.B++,
1498
- clientTimestamp: Date.now(),
1499
- schemaVersion: "0.1.0",
1500
- sdkVersion: "0.5.1",
1501
- sdkPlatform: "web",
1502
- tabId: this.D.getTabId(),
1503
- events: n$1
1504
- };
1505
- }
1506
- Z(t$1) {
1507
- if (t$1.ok) return !1;
1508
- switch (t$1.kind) {
1509
- case "timeout":
1510
- case "server":
1511
- case "rate_limited": return !0;
1512
- default: return !1;
1513
- }
1514
- }
1515
- };
1516
- const zt = "tri:bcast:";
1517
- const Lt = "function" == typeof BroadcastChannel ? BroadcastChannel : function() {
1518
- if ("undefined" == typeof Storage || "undefined" == typeof window) return !1;
1519
- try {
1520
- const t$1 = "__tri_bcast_probe__";
1521
- localStorage.setItem(t$1, "1");
1522
- const n$1 = "1" === localStorage.getItem(t$1);
1523
- return localStorage.removeItem(t$1), n$1;
1524
- } catch {
1525
- return !1;
1526
- }
1527
- }() ? class {
1528
- constructor(t$1) {
1529
- this.seq = 0, this.closed = !1, this.listeners = /* @__PURE__ */ new Set(), this.onStorageEvent = (t$2) => {
1530
- if (this.closed) return;
1531
- if (!t$2.key || !t$2.key.startsWith(`${zt}${this.channelName}:`)) return;
1532
- if (null === t$2.newValue) return;
1533
- let n$1;
1534
- s(() => O.remove(t$2.key));
1535
- try {
1536
- n$1 = JSON.parse(t$2.newValue);
1537
- } catch {
1538
- return;
1539
- }
1540
- const e$1 = { data: n$1 };
1541
- for (const t$3 of this.listeners) s(() => t$3(e$1));
1542
- }, this.channelName = t$1, this.senderId = Ct(), window.addEventListener("storage", this.onStorageEvent);
1543
- }
1544
- postMessage(t$1) {
1545
- if (this.closed) return;
1546
- const n$1 = `${zt}${this.channelName}:${this.senderId}:${this.seq++}`;
1547
- s(() => {
1548
- O.set(n$1, t$1), O.remove(n$1);
1549
- });
1550
- }
1551
- addEventListener(t$1, n$1) {
1552
- this.listeners.add(n$1);
1553
- }
1554
- removeEventListener(t$1, n$1) {
1555
- this.listeners.delete(n$1);
1556
- }
1557
- close() {
1558
- this.closed || (this.closed = !0, window.removeEventListener("storage", this.onStorageEvent), this.listeners.clear());
1559
- }
1560
- } : class {
1561
- constructor(t$1) {
1562
- n.warn("BroadcastChannel", "BroadcastChannel is unavailable and localStorage is not writable in this context. Cross-tab discovery is disabled; tab count will always be reported as 1.");
1563
- }
1564
- postMessage(t$1) {}
1565
- addEventListener(t$1, n$1) {}
1566
- removeEventListener(t$1, n$1) {}
1567
- close() {}
1568
- }, Rt = "__tri_tabId";
1569
- var $t = class {
1570
- constructor(t$1) {
1571
- this.context = t$1, this.tt = "", this.m = !1, this.nt = null, this.et = null, this.it = null, this.ot = /* @__PURE__ */ new Map(), this.rt = -1, this.st = null;
1572
- }
1573
- async start() {
1574
- this.m || (this.m = !0, this.tt = this.ct(), this.lt(), this.ut({
1575
- type: "hello",
1576
- tabId: this.tt,
1577
- ts: Date.now()
1578
- }), this.dt(), this.ht("active"), this.ft());
1579
- }
1580
- stop() {
1581
- this.m && (this.m = !1, this.ht("inactive"), this.ut({
1582
- type: "bye",
1583
- tabId: this.tt,
1584
- ts: Date.now()
1585
- }), this.wt(this.yt()), this.vt(), this.bt(), this.gt());
1586
- }
1587
- getTabId() {
1588
- return this.tt;
1589
- }
1590
- queryTabsNumber() {
1591
- return this.ot.size + 1;
1592
- }
1593
- lt() {
1594
- try {
1595
- this.nt = new Lt("__tri_tab_channel"), this.st = this.kt.bind(this), this.nt.addEventListener("message", this.st);
1596
- } catch (t$1) {
1597
- n.warn("TabManager", "failed to open broadcast channel:", t$1);
1598
- }
1599
- }
1600
- gt() {
1601
- try {
1602
- if (!this.nt) return;
1603
- this.st && this.nt.removeEventListener("message", this.st), this.nt.close();
1604
- } catch {} finally {
1605
- this.nt = null, this.st = null;
1606
- }
1607
- }
1608
- dt() {
1609
- this.et = setInterval(() => {
1610
- const t$1 = Date.now();
1611
- this.ut({
1612
- type: "heartbeat",
1613
- tabId: this.tt,
1614
- ts: t$1
1615
- });
1616
- }, 1e3);
1617
- }
1618
- vt() {
1619
- null != this.et && (clearInterval(this.et), this.et = null);
1620
- }
1621
- ft() {
1622
- null != this.it && clearTimeout(this.it), this.it = setTimeout(() => {
1623
- this.it = null;
1624
- const t$1 = this.yt() + 1;
1625
- t$1 !== this.rt && (this.rt = t$1, this.wt(t$1));
1626
- }, 1e3);
1627
- }
1628
- bt() {
1629
- null != this.it && (clearTimeout(this.it), this.it = null);
1630
- }
1631
- ut(t$1) {
1632
- try {
1633
- if (!this.nt) return;
1634
- this.nt.postMessage(t$1);
1635
- } catch {
1636
- n.warn("TabManager", "failed to broadcast message:", t$1);
1637
- }
1638
- }
1639
- kt(t$1) {
1640
- const { type: n$1, tabId: e$1 } = t$1.data;
1641
- if (e$1 === this.tt) return;
1642
- const i$1 = Date.now();
1643
- "hello" === n$1 ? (this.ut({
1644
- type: "ack",
1645
- tabId: this.tt,
1646
- ts: i$1,
1647
- to: e$1
1648
- }), this.ot.set(e$1, i$1)) : "heartbeat" === n$1 || "ack" === n$1 ? this.ot.set(e$1, i$1) : "bye" === n$1 && this.ot.delete(e$1);
1649
- }
1650
- wt(t$1) {
1651
- this.context.events.count && this.context.push({
1652
- name: "tab",
1653
- type: "count",
1654
- tabId: this.tt,
1655
- timestamp: Date.now(),
1656
- value: t$1
1657
- });
1658
- }
1659
- ht(t$1) {
1660
- this.context.events.state && this.context.push({
1661
- name: "tab",
1662
- type: "state",
1663
- tabId: this.tt,
1664
- timestamp: Date.now(),
1665
- value: t$1
1666
- });
1667
- }
1668
- ct() {
1669
- const t$1 = q.get(Rt);
1670
- if (t$1) return t$1;
1671
- const n$1 = Ct();
1672
- return q.set(Rt, n$1), n$1;
1673
- }
1674
- yt(t$1 = Date.now()) {
1675
- let n$1 = 0;
1676
- for (const [e$1, i$1] of this.ot.entries()) t$1 - i$1 >= 3e3 ? this.ot.delete(e$1) : n$1++;
1677
- return n$1;
1678
- }
1679
- };
1680
- const Ut = globalThis.CompressionStream, Bt = globalThis.Response, Ot = globalThis.Blob, qt = new TextEncoder();
1681
- let jt = null;
1682
- async function Ht(t$1) {
1683
- const e$1 = await async function(t$2) {
1684
- if ("function" != typeof Ut) return null;
1685
- try {
1686
- return await new Bt(new Ot([qt.encode(t$2)]).stream().pipeThrough(new Ut("gzip"))).arrayBuffer();
1687
- } catch (t$3) {
1688
- return n.warn("compression", "Native gzip failed:", t$3), null;
1689
- }
1690
- }(t$1);
1691
- return null !== e$1 ? e$1 : async function(t$2) {
1692
- try {
1693
- const e$2 = await function() {
1694
- if (null === jt) {
1695
- const t$3 = function(t$4, e$3 = 1e4) {
1696
- let i$2 = null;
1697
- const o$2 = new Promise((t$5) => {
1698
- i$2 = u(() => {
1699
- n.warn("import", `Import timed out after ${e$3}ms`), t$5(null);
1700
- }, e$3);
1701
- }), r$1 = Promise.resolve().then(t$4).catch((t$5) => (n.warn("import", "Import failed:", t$5), null));
1702
- return Promise.race([r$1, o$2]).finally(() => {
1703
- d(i$2);
1704
- });
1705
- }(() => import("./browser-DlFgHpoC-Br3G10gw.esm.js"), 1e4);
1706
- jt = t$3, t$3.then((n$1) => {
1707
- null === n$1 && u(() => {
1708
- jt === t$3 && (jt = null);
1709
- }, 1e4);
1710
- });
1711
- }
1712
- return jt;
1713
- }();
1714
- if (null === e$2) return null;
1715
- const { gzipSync: i$1 } = e$2, o$1 = i$1(qt.encode(t$2));
1716
- return o$1.buffer.slice(o$1.byteOffset, o$1.byteOffset + o$1.byteLength);
1717
- } catch (t$3) {
1718
- return n.warn("compression", "fflate gzip failed:", t$3), null;
1719
- }
1720
- }(t$1);
1721
- }
1722
- function Nt(t$1) {
1723
- const n$1 = { Accept: "application/json" };
1724
- return t$1?.hasBody && ("json" === t$1.contentType ? n$1["Content-Type"] = "application/json" : "ndjson" === t$1.contentType && (n$1["Content-Type"] = "application/x-ndjson"), "gzip" === t$1.contentEncoding && (n$1["Content-Encoding"] = "gzip")), t$1?.token && (n$1.Authorization = `Bearer ${t$1.token}`), t$1?.profileId && (n$1["x-profile-id"] = t$1.profileId), t$1?.api?.version && (n$1["x-api-version"] = t$1.api.version), t$1?.customHeaders && Object.entries(t$1.customHeaders).forEach(([t$2, e$1]) => {
1725
- n$1[t$2] = e$1;
1726
- }), n$1;
1727
- }
1728
- const Ft = "function" == typeof globalThis.fetch ? globalThis.fetch.bind(globalThis) : void 0;
1729
- var Xt = class {
1730
- constructor(t$1) {
1731
- this.context = t$1;
1732
- }
1733
- stop() {}
1734
- async report(t$1, e$1) {
1735
- const i$1 = {
1736
- name: t$1,
1737
- metadata: e$1,
1738
- timestamp: Date.now(),
1739
- activityId: this.context.getActivityId() ?? ""
1740
- };
1741
- try {
1742
- const o$1 = await this.context.reportEvent(i$1);
1743
- if (o$1.ok) return o$1;
1744
- n.warn("EventReport", "Failed to report event:", t$1, e$1, "with result:", o$1);
1745
- } catch (i$2) {
1746
- n.warn("EventReport", "Failed to report event:", t$1, e$1, "with error:", i$2);
1747
- }
1748
- }
1749
- };
1750
- const Kt = new Set([
1751
- "A",
1752
- "BUTTON",
1753
- "INPUT",
1754
- "SELECT",
1755
- "TEXTAREA",
1756
- "SUMMARY",
1757
- "DETAILS",
1758
- "LABEL",
1759
- "OPTION",
1760
- "FIELDSET"
1761
- ]), Vt = new Set([
1762
- "button",
1763
- "link",
1764
- "tab",
1765
- "menuitem",
1766
- "menuitemcheckbox",
1767
- "menuitemradio",
1768
- "checkbox",
1769
- "radio",
1770
- "switch",
1771
- "slider",
1772
- "spinbutton",
1773
- "combobox",
1774
- "listbox",
1775
- "option",
1776
- "searchbox",
1777
- "textbox",
1778
- "treeitem"
1779
- ]), Yt = 255;
1780
- function Jt(t$1, n$1, e$1, i$1 = nt) {
1781
- const o$1 = t$1.tagName.toLowerCase(), r$1 = function(t$2) {
1782
- const n$2 = t$2.parentElement?.children ?? [], e$2 = Math.min(n$2.length, 1e3);
1783
- let i$2 = e$2 - 1, o$2 = 0, r$2 = 0;
1784
- for (let i$3 = 0; i$3 < e$2; i$3++) {
1785
- r$2++;
1786
- const e$3 = n$2[i$3];
1787
- if (b(e$3, t$2.tagName) && o$2++, e$3 === t$2) break;
1788
- }
1789
- return {
1790
- siblings: i$2,
1791
- ofType: o$2,
1792
- child: r$2
1793
- };
1794
- }(t$1), s$1 = function(t$2, n$2, e$2) {
1795
- const i$2 = function(t$3) {
1796
- if (!t$3) return null;
1797
- const n$3 = t$3.getAttribute("data-tri-redact-attrs");
1798
- return n$3 ? n$3.split(",").map((t$4) => t$4.trim().toLowerCase()) : null;
1799
- }(t$2), o$2 = {}, r$2 = t$2.id;
1800
- r$2 && !_("id", i$2) && (o$2.id = r$2);
1801
- const s$2 = t$2.getAttribute("autocomplete");
1802
- s$2 && !_("autocomplete", i$2) && (o$2.autocomplete = s$2);
1803
- const c$1 = t$2.getAttribute("aria-invalid");
1804
- c$1 && !_("aria-invalid", i$2) && (o$2.ariaInvalid = c$1);
1805
- const a$1 = t$2.getAttribute("tabindex");
1806
- a$1 && !_("tabindex", i$2) && (o$2.tabIndex = parseInt(a$1, 10));
1807
- const l$1 = function(t$3) {
1808
- return t$3.getAttribute("data-testid") ?? t$3.getAttribute("data-cy") ?? null;
1809
- }(t$2);
1810
- l$1 && !_("data-testid", i$2) && (o$2.testId = l$1);
1811
- const u$1 = t$2.hasAttribute("readonly");
1812
- u$1 && !_("readonly", i$2) && (o$2.readOnly = u$1);
1813
- const d$1 = t$2.hasAttribute("required");
1814
- d$1 && !_("required", i$2) && (o$2.required = d$1);
1815
- const h$1 = t$2.getAttribute("contenteditable");
1816
- h$1 && !_("contenteditable", i$2) && (o$2.contentEditable = "true" === h$1 || "" === h$1);
1817
- const f$1 = t$2.getAttribute("href");
1818
- f$1 && !_("href", i$2) && (o$2.href = {
1819
- ...n$2 ? {} : { url: e$2(f$1) },
1820
- external: I(f$1)
1821
- });
1822
- const p$1 = t$2.getAttribute("role");
1823
- p$1 && !_("role", i$2) && (o$2.role = p$1);
1824
- const m$1 = t$2.getAttribute("type");
1825
- m$1 && !_("type", i$2) && (o$2.type = m$1);
1826
- const w$1 = t$2.getAttribute("name");
1827
- w$1 && !_("name", i$2) && (o$2.name = w$1);
1828
- const y$1 = t$2.getAttribute("placeholder");
1829
- !y$1 || n$2 || _("placeholder", i$2) || (o$2.placeholder = y$1);
1830
- const v$1 = Array.from(t$2.classList).slice(0, 5);
1831
- v$1.length > 0 && !_("class", i$2) && (o$2.classes = v$1);
1832
- const b$1 = t$2.getAttribute("alt");
1833
- return !b$1 || n$2 || _("alt", i$2) || (o$2.alt = b$1), Object.keys(o$2).length ? o$2 : null;
1834
- }(t$1, n$1, i$1);
1835
- return {
1836
- tagName: o$1,
1837
- frame: e$1,
1838
- ...s$1 ? { attributes: s$1 } : {},
1839
- ...r$1 ? { nth: r$1 } : {}
1840
- };
1841
- }
1842
- function Gt(t$1, n$1) {
1843
- let e$1 = 0;
1844
- const i$1 = [];
1845
- return function(t$2) {
1846
- return Kt.has(t$2.tagName);
1847
- }(t$1) && (e$1 += 40, i$1.push("native")), function(t$2) {
1848
- return t$2.hasAttribute("data-tri-interactive");
1849
- }(t$1) && (e$1 += 40, i$1.push("tri-interactive")), function(t$2) {
1850
- return b(t$2, "a") && t$2.hasAttribute("href");
1851
- }(t$1) && (e$1 += 15, i$1.push("has-href")), function(t$2) {
1852
- const n$2 = t$2.getAttribute("role");
1853
- return null !== n$2 && Vt.has(n$2);
1854
- }(t$1) && (e$1 += 30, i$1.push("role")), function(t$2) {
1855
- return t$2.hasAttribute("onclick") || t$2.hasAttribute("ng-click") || t$2.hasAttribute("data-action") || t$2.hasAttribute("@click");
1856
- }(t$1) && (e$1 += 20, i$1.push("click-handler")), function(t$2) {
1857
- const n$2 = t$2.getAttribute("tabindex");
1858
- if (null === n$2) return !1;
1859
- const e$2 = parseInt(n$2, 10);
1860
- return null !== e$2 && e$2 >= 0;
1861
- }(t$1) && (e$1 += 10, i$1.push("tabindex")), (t$1.id || t$1.getAttribute("data-testid")) && (e$1 += 5, i$1.push("has-id")), n$1 > 0 && (e$1 += Math.round(15 / n$1), i$1.push("depth")), {
1862
- score: e$1,
1863
- reasons: i$1
1864
- };
1865
- }
1866
- function Zt(t$1) {
1867
- return t$1 >= 20;
1868
- }
1869
- function Qt(t$1) {
1870
- return null !== t$1 && t$1.width > 0 && t$1.height > 0 && t$1.y < window.innerHeight && t$1.y + t$1.height > 0 && t$1.x < window.innerWidth && t$1.x + t$1.width > 0;
1871
- }
1872
- function Wt(t$1) {
1873
- return !0 === t$1.disabled || "true" === t$1.getAttribute("aria-disabled");
1874
- }
1875
- function tn(t$1, n$1 = !1) {
1876
- if (n$1) return null;
1877
- const e$1 = en(t$1, "labelledby");
1878
- if (e$1) return {
1879
- text: rn(e$1),
1880
- resolutionMethod: "aria-labelledby",
1881
- confidence: "high"
1882
- };
1883
- const i$1 = on(t$1);
1884
- if (i$1) return {
1885
- text: rn(i$1),
1886
- resolutionMethod: "aria-label",
1887
- confidence: "high"
1888
- };
1889
- const o$1 = function(t$2) {
1890
- if (!t$2.id) return null;
1891
- const n$2 = document.querySelector(`label[for="${CSS.escape(t$2.id)}"]`);
1892
- return n$2 ? nn(n$2) : null;
1893
- }(t$1);
1894
- if (o$1) return {
1895
- text: rn(o$1),
1896
- resolutionMethod: "html-for",
1897
- confidence: "high"
1898
- };
1899
- const r$1 = function(t$2) {
1900
- const n$2 = t$2.closest("label");
1901
- return n$2 ? nn(n$2) : null;
1902
- }(t$1);
1903
- if (r$1) return {
1904
- text: rn(r$1),
1905
- resolutionMethod: "wrapping-label",
1906
- confidence: "high"
1907
- };
1908
- const s$1 = function(t$2) {
1909
- return t$2.getAttribute("placeholder")?.trim() ?? null;
1910
- }(t$1);
1911
- if (s$1) return {
1912
- text: rn(s$1),
1913
- resolutionMethod: "placeholder",
1914
- confidence: "low"
1915
- };
1916
- const c$1 = function(t$2) {
1917
- return t$2.getAttribute("title")?.trim() ?? null;
1918
- }(t$1);
1919
- if (c$1) return {
1920
- text: rn(c$1),
1921
- resolutionMethod: "title",
1922
- confidence: "low"
1923
- };
1924
- const a$1 = en(t$1, "describedby");
1925
- if (a$1) return {
1926
- text: rn(a$1),
1927
- resolutionMethod: "aria-describedby",
1928
- confidence: "low"
1929
- };
1930
- const l$1 = nn(t$1);
1931
- return l$1 ? {
1932
- text: l$1,
1933
- resolutionMethod: "text-content",
1934
- confidence: "low"
1935
- } : null;
1936
- }
1937
- function nn(t$1, n$1 = 0) {
1938
- if (n$1 > 8) return "";
1939
- if (v(t$1)) return function(t$2) {
1940
- return t$2 ? t$2.trim().split(/(\s+)/).join("").replace(/[\r\n]/g, " ").replace(/[ ]+/g, " ").substring(0, Yt) : null;
1941
- }(t$1.textContent) ?? "";
1942
- if (!t$1.childNodes?.length) return "";
1943
- let e$1 = "";
1944
- for (const i$1 of t$1.childNodes) {
1945
- const t$2 = nn(i$1, n$1 + 1);
1946
- if (t$2 && (e$1 = e$1 ? `${e$1} ${t$2}` : t$2, e$1.length >= Yt)) break;
1947
- }
1948
- return rn(e$1);
1949
- }
1950
- function en(t$1, n$1) {
1951
- const e$1 = "labelledby" === n$1 ? "aria-labelledby" : "aria-describedby", i$1 = t$1?.getAttribute(e$1);
1952
- if (!i$1) return null;
1953
- const o$1 = i$1.split(/\s+/), r$1 = [];
1954
- for (const t$2 of o$1) {
1955
- const n$2 = document.getElementById(t$2);
1956
- if (!n$2) continue;
1957
- const e$2 = on(n$2) ?? nn(n$2);
1958
- e$2.length && r$1.push(e$2);
1959
- }
1960
- return r$1.length ? r$1.join(" ") : null;
1961
- }
1962
- function on(t$1) {
1963
- return t$1?.getAttribute("aria-label")?.trim() ?? null;
1964
- }
1965
- function rn(t$1) {
1966
- return t$1.length > Yt ? t$1.slice(0, Yt) + "..." : t$1;
1967
- }
1968
- function sn(t$1) {
1969
- const n$1 = t$1.getBoundingClientRect();
1970
- return {
1971
- x: n$1.x,
1972
- y: n$1.y,
1973
- width: n$1.width,
1974
- height: n$1.height
1975
- };
1976
- }
1977
- var cn = class {
1978
- constructor(t$1) {
1979
- this.capacity = t$1, this.cache = /* @__PURE__ */ new Map();
1980
- }
1981
- get(t$1) {
1982
- return this.cache.get(t$1);
1983
- }
1984
- set(t$1, n$1) {
1985
- if (this.cache.has(t$1)) this.cache.delete(t$1);
1986
- else if (this.cache.size >= this.capacity) {
1987
- const t$2 = this.cache.keys().next().value;
1988
- t$2 && this.cache.delete(t$2);
1989
- }
1990
- this.cache.set(t$1, n$1);
1991
- }
1992
- delete(t$1) {
1993
- this.cache.delete(t$1);
1994
- }
1995
- clear() {
1996
- this.cache.clear();
1997
- }
1998
- size() {
1999
- return this.cache.size;
2000
- }
2001
- };
2002
- async function an(t$1, o$1) {
2003
- const { collectors: r$1, sdk: s$1 } = t$1;
2004
- let c$1 = null, l$1 = null, h$1 = null, f$1 = null;
2005
- try {
2006
- c$1 = function(t$3) {
2007
- "undefined" != typeof document && "function" == typeof globalThis.fetch || n.warn("FalconService", "createFalconServiceManager called in a non-browser environment — all requests will resolve with { ok: false, kind: 'network' }.");
2008
- const e$1 = function(t$4) {
2009
- const n$1 = t$4?.timeout, e$2 = t$4?.baseUrl ?? "", i$2 = t$4?.api;
2010
- async function o$3(t$5, o$4, r$2) {
2011
- if (void 0 === Ft) return {
2012
- ok: !1,
2013
- kind: "network"
2014
- };
2015
- const s$2 = e$2 ? `${e$2}${o$4}` : o$4, c$2 = new AbortController();
2016
- let a$1 = null, l$2 = !1;
2017
- a$1 = u(() => {
2018
- l$2 = !0, c$2.abort();
2019
- }, n$1);
2020
- const h$2 = r$2?.signal;
2021
- let f$2, p$2 = () => {};
2022
- if (h$2) if (h$2.aborted) c$2.abort();
2023
- else {
2024
- const t$6 = () => c$2.abort();
2025
- h$2.addEventListener("abort", t$6, { once: !0 }), p$2 = () => h$2.removeEventListener("abort", t$6);
2026
- }
2027
- if (null != r$2 && "body" in r$2 && null != r$2.body) {
2028
- const t$6 = function(t$7) {
2029
- if (null == t$7) return {
2030
- ok: !0,
2031
- body: void 0
2032
- };
2033
- if ("string" == typeof t$7 || t$7 instanceof ArrayBuffer || ArrayBuffer.isView(t$7) || t$7 instanceof Blob || t$7 instanceof FormData || t$7 instanceof URLSearchParams || t$7 instanceof ReadableStream) return {
2034
- ok: !0,
2035
- body: t$7
2036
- };
2037
- try {
2038
- return {
2039
- ok: !0,
2040
- body: JSON.stringify(t$7)
2041
- };
2042
- } catch {
2043
- return { ok: !1 };
2044
- }
2045
- }(r$2.body);
2046
- if (!t$6.ok) return d(a$1), p$2(), {
2047
- ok: !1,
2048
- kind: "serialize"
2049
- };
2050
- f$2 = t$6.body;
2051
- }
2052
- try {
2053
- const n$2 = await Ft(s$2, {
2054
- method: t$5,
2055
- headers: Nt({
2056
- token: r$2?.token,
2057
- profileId: r$2?.profileId,
2058
- contentType: r$2?.contentType,
2059
- contentEncoding: r$2?.contentEncoding,
2060
- api: i$2,
2061
- hasBody: void 0 !== f$2,
2062
- customHeaders: r$2?.customHeaders
2063
- }),
2064
- body: f$2,
2065
- signal: c$2.signal,
2066
- keepalive: r$2?.keepalive
2067
- });
2068
- if (!n$2.ok) return 429 === (m$2 = n$2.status) ? {
2069
- ok: !1,
2070
- kind: "rate_limited",
2071
- status: m$2
2072
- } : m$2 >= 400 && m$2 < 500 ? {
2073
- ok: !1,
2074
- kind: "client",
2075
- status: m$2
2076
- } : {
2077
- ok: !1,
2078
- kind: "server",
2079
- status: m$2
2080
- };
2081
- if (204 === n$2.status) return {
2082
- ok: !0,
2083
- data: void 0,
2084
- status: 204
2085
- };
2086
- try {
2087
- return {
2088
- ok: !0,
2089
- data: await n$2.json(),
2090
- status: n$2.status
2091
- };
2092
- } catch {
2093
- return c$2.signal.aborted ? l$2 ? {
2094
- ok: !1,
2095
- kind: "timeout"
2096
- } : {
2097
- ok: !1,
2098
- kind: "abort"
2099
- } : {
2100
- ok: !1,
2101
- kind: "parse",
2102
- status: n$2.status
2103
- };
2104
- }
2105
- } catch {
2106
- return l$2 ? {
2107
- ok: !1,
2108
- kind: "timeout"
2109
- } : c$2.signal.aborted ? {
2110
- ok: !1,
2111
- kind: "abort"
2112
- } : {
2113
- ok: !1,
2114
- kind: "network"
2115
- };
2116
- } finally {
2117
- d(a$1), p$2();
2118
- }
2119
- var m$2;
2120
- }
2121
- return {
2122
- post: async function(t$5, n$2) {
2123
- return o$3("POST", t$5, n$2);
2124
- },
2125
- get: async function(t$5, n$2) {
2126
- return o$3("GET", t$5, n$2);
2127
- }
2128
- };
2129
- }({
2130
- baseUrl: `${t$3.api.url}/api/v1`,
2131
- timeout: 1e4,
2132
- api: { version: t$3.api.version }
2133
- }), i$1 = function(t$4) {
2134
- const { getToken: e$2, refresh: i$2 } = t$4;
2135
- let o$3 = null;
2136
- return { withAuth: async function(t$5, r$2) {
2137
- if (o$3) {
2138
- const n$1 = await o$3;
2139
- if (n$1) return t$5(n$1);
2140
- }
2141
- const s$2 = e$2() ?? "", c$2 = await t$5(s$2);
2142
- if ((a$1 = c$2).ok || "client" !== a$1.kind || !kt.includes(a$1.status) || !1 === r$2?.refreshable) return c$2;
2143
- var a$1;
2144
- const l$2 = await (o$3 || (o$3 = async function() {
2145
- try {
2146
- return await i$2(), e$2();
2147
- } catch (t$6) {
2148
- return n.warn("AuthMiddleware", "auth refresh failed", t$6), null;
2149
- }
2150
- }().finally(() => {
2151
- o$3 = null;
2152
- }), o$3));
2153
- return l$2 && l$2 !== s$2 ? t$5(l$2) : c$2;
2154
- } };
2155
- }(t$3), o$2 = () => ({ profileId: t$3.getProfileId() ?? void 0 });
2156
- return { api: {
2157
- ingest: async function(n$1, r$2) {
2158
- return i$1.withAuth(async (i$2) => {
2159
- const { events: s$2, ...c$2 } = n$1, a$1 = {
2160
- ...c$2,
2161
- activityId: t$3.getActivityId()
2162
- };
2163
- let l$2;
2164
- try {
2165
- l$2 = await async function(t$4, n$2) {
2166
- const e$2 = function(t$5, n$3) {
2167
- const e$3 = [JSON.stringify(t$5)];
2168
- for (let t$6 = 0; t$6 < n$3.length; t$6++) try {
2169
- e$3.push(JSON.stringify(n$3[t$6]));
2170
- } catch {}
2171
- return e$3.join("\n");
2172
- }(t$4, n$2), i$3 = await Ht(e$2);
2173
- return i$3 ? {
2174
- type: "gzip",
2175
- body: i$3
2176
- } : {
2177
- type: "ndjson",
2178
- body: e$2
2179
- };
2180
- }(a$1, s$2);
2181
- } catch {
2182
- return {
2183
- ok: !1,
2184
- kind: "serialize"
2185
- };
2186
- }
2187
- return e$1.post("/events/capture", {
2188
- body: l$2.body,
2189
- token: i$2,
2190
- keepalive: r$2,
2191
- contentType: "ndjson",
2192
- contentEncoding: "gzip" === l$2.type ? "gzip" : void 0,
2193
- ...o$2()
2194
- });
2195
- }, { refreshable: !r$2 });
2196
- },
2197
- reportEvent: async function(t$4) {
2198
- return i$1.withAuth((n$1) => e$1.post("/events/report-event", {
2199
- body: t$4,
2200
- token: n$1,
2201
- contentType: "json",
2202
- ...o$2()
2203
- }));
2204
- },
2205
- startActivity: async function() {
2206
- return e$1.post("/events/start-activity", {
2207
- token: t$3.getSdkToken(),
2208
- ...o$2()
2209
- });
2210
- },
2211
- stopActivity: async function() {
2212
- return i$1.withAuth((t$4) => e$1.post("/events/end-activity", {
2213
- token: t$4,
2214
- keepalive: !0,
2215
- ...o$2()
2216
- }), { refreshable: !1 });
2217
- },
2218
- collectionStatus: async function() {
2219
- return e$1.get("/sdk/collection-status", {
2220
- token: t$3.getSdkToken(),
2221
- ...o$2()
2222
- });
2223
- },
2224
- linkInterview: async function(t$4) {
2225
- return i$1.withAuth((n$1) => e$1.post("/events/link-interview", {
2226
- token: n$1,
2227
- contentType: "json",
2228
- ...o$2(),
2229
- customHeaders: { "X-Incode-Hardware-Id": t$4 }
2230
- }));
2231
- }
2232
- } };
2233
- }({
2234
- api: {
2235
- version: s$1.api.version,
2236
- url: s$1.api.url
2237
- },
2238
- getSdkToken: () => s$1.token,
2239
- getProfileId: () => o$1.getProfileId(),
2240
- getToken: () => l$1?.getToken() ?? null,
2241
- refresh: async () => l$1?.refresh() ?? Promise.resolve(),
2242
- getActivityId: () => l$1?.getActivityId() ?? ""
2243
- });
2244
- const t$2 = await c$1.api.collectionStatus();
2245
- if (!t$2.ok || !0 !== t$2.data.eventsCollectionEnabled) return { status: "collection-disabled" };
2246
- l$1 = new gt({
2247
- startActivity: () => c$1.api.startActivity(),
2248
- stopActivity: () => c$1.api.stopActivity()
2249
- }), h$1 = new Pt(ct, {
2250
- ingest: (t$3, n$1) => c$1.api.ingest(t$3, n$1),
2251
- getTabId: () => f$1?.getTabId() ?? "unknown",
2252
- isActivityActive: () => l$1?.isActive() ?? !1
2253
- });
2254
- const p$1 = r$1.tab;
2255
- f$1 = new $t({
2256
- push: (t$3) => h$1?.push(t$3),
2257
- events: {
2258
- state: p$1.enabled && p$1.events.state.enabled,
2259
- count: p$1.enabled && p$1.events.count.enabled
2260
- }
2261
- });
2262
- const m$1 = function(t$3) {
2263
- function n$1(n$2) {
2264
- "hidden" === document.visibilityState && t$3.flush();
2265
- }
2266
- function o$2(n$2) {
2267
- t$3.flush(), t$3.stopTab(), t$3.getShouldSkipStopActivity() || t$3.stopActivity();
2268
- }
2269
- const r$2 = a(() => t$3.onConnectionChange());
2270
- return {
2271
- start: function() {
2272
- e(document, "visibilitychange", n$1), e(window, "pagehide", o$2), e(window, "online", r$2), e(window, "offline", r$2);
2273
- },
2274
- stop: function() {
2275
- i(document, "visibilitychange", n$1), i(window, "pagehide", o$2), i(window, "online", r$2), i(window, "offline", r$2);
2276
- }
2277
- };
2278
- }({
2279
- flush: () => h$1?.flush("lifecycle"),
2280
- stopActivity: async () => l$1?.stop(),
2281
- stopTab: () => f$1?.stop(),
2282
- getShouldSkipStopActivity: () => (f$1?.queryTabsNumber() ?? 0) > 1,
2283
- onConnectionChange: () => h$1?.onConnectionChange()
2284
- }), w$1 = function(t$3 = {}) {
2285
- const { elementLevel: n$1, sanitizeUrl: e$1 = nt } = t$3, i$1 = n$1 || "redact", o$2 = new cn(6), r$2 = new cn(6);
2286
- return { resolve: function(t$4) {
2287
- if (!t$4 || k(t$4) || "off" === i$1) return null;
2288
- let n$2 = o$2.get(t$4);
2289
- if (n$2 || (n$2 = function(t$5) {
2290
- if (!t$5 || k(t$5)) return {
2291
- chain: [],
2292
- redaction: {
2293
- level: "ignore",
2294
- index: -1
2295
- }
2296
- };
2297
- const n$3 = [];
2298
- let e$2 = t$5, i$2 = -1;
2299
- for (; e$2;) {
2300
- if (k(e$2)) return {
2301
- chain: [],
2302
- redaction: {
2303
- level: "ignore",
2304
- index: -1
2305
- }
2306
- };
2307
- T(e$2) && (i$2 = n$3.length), n$3.push(e$2);
2308
- const t$6 = e$2.parentNode;
2309
- if (!t$6 || b(e$2, "body")) break;
2310
- if (g(t$6)) e$2 = t$6.host;
2311
- else {
2312
- if (t$6.nodeType !== Node.ELEMENT_NODE) break;
2313
- e$2 = t$6;
2314
- }
2315
- }
2316
- return {
2317
- chain: n$3,
2318
- redaction: {
2319
- level: -1 === i$2 ? "full" : "redact",
2320
- index: i$2
2321
- }
2322
- };
2323
- }(t$4.parentElement), o$2.set(t$4, n$2)), "ignore" === n$2.redaction.level) return null;
2324
- const s$2 = "redact" === n$2.redaction.level || "redact" === i$1 || T(t$4);
2325
- let c$2 = r$2.get(t$4);
2326
- return c$2 || (c$2 = function(t$5, n$3, i$2, o$3) {
2327
- const r$3 = getComputedStyle(t$5), s$3 = sn(t$5), c$3 = function(t$6, n$4, e$2 = !1, i$3 = nt) {
2328
- const o$4 = [], r$4 = [];
2329
- for (let s$4 = t$6.length - 1; s$4 >= 0; s$4--) {
2330
- const c$4 = t$6[s$4], a$2 = e$2 || s$4 <= n$4, l$3 = s$4 + 1, u$2 = Jt(c$4, a$2, sn(c$4), i$3), { score: d$1, reasons: h$2 } = Gt(c$4, l$3);
2331
- if (o$4.push(u$2), !Zt(d$1)) continue;
2332
- const f$2 = tn(c$4, a$2);
2333
- r$4.push({
2334
- ...u$2,
2335
- ...f$2 ? { label: f$2 } : {},
2336
- depth: l$3,
2337
- score: d$1,
2338
- reasons: h$2
2339
- });
2340
- }
2341
- return {
2342
- ancestors: o$4,
2343
- interactiveCandidates: r$4.reverse()
2344
- };
2345
- }(n$3, o$3, i$2, e$1), a$1 = Jt(t$5, i$2, s$3, e$1), l$2 = function(t$6, n$4, e$2) {
2346
- const { score: i$3, reasons: o$4 } = Gt(t$6, 0);
2347
- return {
2348
- interactive: Zt(i$3),
2349
- ...o$4.length > 0 ? { reasons: o$4 } : {},
2350
- disabled: Wt(t$6),
2351
- rendered: "none" !== n$4?.display,
2352
- visible: "hidden" !== n$4?.visibility,
2353
- inViewport: Qt(e$2),
2354
- acceptsPointer: "none" !== n$4?.pointerEvents,
2355
- opacity: parseFloat(n$4?.opacity || "1")
2356
- };
2357
- }(t$5, r$3, s$3);
2358
- let u$1 = null;
2359
- return i$2 || (u$1 = l$2.interactive ? tn(t$5) : null), {
2360
- tagName: a$1.tagName,
2361
- frame: a$1.frame,
2362
- viewport: {
2363
- height: window.innerHeight,
2364
- width: window.innerWidth,
2365
- scrollX: window.scrollX,
2366
- scrollY: window.scrollY,
2367
- dpr: window.devicePixelRatio
2368
- },
2369
- attributes: a$1.attributes,
2370
- nth: a$1.nth,
2371
- ...u$1 ? { label: u$1 } : {},
2372
- ancestors: c$3.ancestors,
2373
- interactiveCandidates: c$3.interactiveCandidates,
2374
- interactivity: l$2
2375
- };
2376
- }(t$4, n$2.chain, s$2, n$2.redaction.index), r$2.set(t$4, c$2)), c$2;
2377
- } };
2378
- }({
2379
- elementLevel: s$1.capture?.element,
2380
- sanitizeUrl: s$1.sanitizeUrl
2381
- }), y$1 = /* @__PURE__ */ new Set();
2382
- try {
2383
- y$1.add(new URL(s$1.api.url).origin);
2384
- } catch {}
2385
- const v$1 = function(t$3, n$1, e$1 = "on") {
2386
- const i$1 = /* @__PURE__ */ new Map();
2387
- function o$2(o$3) {
2388
- if (i$1.has(o$3)) return;
2389
- const r$2 = Q[o$3];
2390
- if (!r$2 || !function(t$4, n$2) {
2391
- return n$2[t$4]?.enabled ?? !1;
2392
- }(o$3, n$1)) return;
2393
- const s$2 = n$1[o$3], c$2 = r$2.create(t$3, e$1, s$2 && "events" in s$2 ? s$2.events : void 0);
2394
- i$1.set(o$3, c$2);
2395
- }
2396
- return {
2397
- start: o$2,
2398
- stopCollector: function(t$4) {
2399
- const n$2 = i$1.get(t$4);
2400
- n$2 && (n$2(), i$1.delete(t$4));
2401
- },
2402
- stop: function() {
2403
- for (const [, t$4] of i$1) t$4();
2404
- i$1.clear();
2405
- },
2406
- isRunning: function(t$4) {
2407
- return i$1.has(t$4);
2408
- },
2409
- autocapture: function() {
2410
- for (const t$4 of W) o$2(t$4);
2411
- }
2412
- };
2413
- }({
2414
- push: (t$3) => h$1?.push(t$3),
2415
- resolveElement: (t$3) => w$1.resolve(t$3),
2416
- sanitizeUrl: s$1.sanitizeUrl,
2417
- ignoredOrigins: y$1
2418
- }, r$1, s$1.capture?.content), _$1 = new Xt({
2419
- getActivityId: () => l$1?.getActivityId() ?? "",
2420
- reportEvent: (t$3) => c$1.api.reportEvent(t$3)
2421
- });
2422
- return {
2423
- status: "ready",
2424
- managers: {
2425
- falconServiceManager: c$1,
2426
- activityManager: l$1,
2427
- transportManager: h$1,
2428
- tabManager: f$1,
2429
- lifecycleManager: m$1,
2430
- collectorManager: v$1,
2431
- eventReportManager: _$1
2432
- }
2433
- };
2434
- } catch (t$2) {
2435
- return n.warn("IncodeTRI", "setup() failed during construction:", t$2), { status: "init-failed" };
2436
- }
2437
- }
2438
- let ln = class t$1 {
2439
- constructor() {
2440
- this.Tt = 0, this._t = null, this.It = et;
2441
- }
2442
- static get instance() {
2443
- return t$1.i || (t$1.i = new t$1()), t$1.i;
2444
- }
2445
- async setup(t$2) {
2446
- if (this.It !== et) return n.fatal("error", "setup()", `cannot set up from state '${this.It}' — call reset() (or reload) first. Ignoring.`), st;
2447
- try {
2448
- const e$1 = function(t$3) {
2449
- if ("undefined" == typeof document) return n.fatal("error", "IncodeTRI", "TRI is not available in a non-browser environment."), null;
2450
- if (!t$3?.token) return n.fatal("error", "SDK", "token is required."), null;
2451
- if (!t$3.apiURL) return n.fatal("error", "SDK", "Couldn't initialise SDK — apiURL isn't provided."), null;
2452
- const { element: e$2, content: i$2 } = t$3.capture ?? {}, o$1 = {
2453
- token: t$3.token,
2454
- capture: {
2455
- element: e$2 ?? "redact",
2456
- content: i$2 ?? "off"
2457
- },
2458
- api: {
2459
- version: t$3.apiVersion ?? "1.0",
2460
- url: t$3.apiURL
2461
- },
2462
- sanitizeUrl: (r$1 = t$3.sanitizeUrl, r$1 ? function(t$4) {
2463
- return s(() => r$1(t$4, nt)) ?? nt(t$4);
2464
- } : nt),
2465
- DEBUG: t$3.DEBUG ?? !1
2466
- };
2467
- var r$1;
2468
- return void 0 === t$3.collectors && void 0 === t$3.layers ? {
2469
- sdk: o$1,
2470
- collectors: at()
2471
- } : void 0 !== t$3.collectors ? {
2472
- sdk: o$1,
2473
- collectors: ut(t$3.collectors)
2474
- } : {
2475
- sdk: o$1,
2476
- collectors: lt(t$3.layers)
2477
- };
2478
- }(t$2);
2479
- if (!e$1) return this.It = st, st;
2480
- n.DEBUG = e$1.sdk.DEBUG;
2481
- const i$1 = await an(e$1, { getProfileId: () => null });
2482
- return "collection-disabled" === i$1.status ? (n.fatal("warn", "setup()", "Collection is disabled for the provided API Key."), this.It = rt, rt) : "init-failed" === i$1.status ? (this.It = st, st) : (this._t = i$1.managers, this.It = it, !1 !== t$2.autostart ? this.start() : it);
2483
- } catch (t$3) {
2484
- return n.warn("setup()", "failed:", t$3), this.It = st, st;
2485
- }
2486
- }
2487
- async start() {
2488
- if (this.It === et) return n.warn("start()", "start() requires a prior successful setup() — ignoring."), this.It;
2489
- if (this.It !== it) return n.fatal("warn", "start()", "TRI is either already started or isn't ready — ignoring."), this.It;
2490
- this.It = "starting";
2491
- const t$2 = ++this.Tt;
2492
- return await this.v(t$2), this.It;
2493
- }
2494
- async stop() {
2495
- n.warn("stop()", "called");
2496
- const t$2 = this._t;
2497
- return t$2 ? (++this.Tt, t$2.lifecycleManager.stop(), t$2.collectorManager.stop(), t$2.tabManager.stop(), t$2.eventReportManager.stop(), this.It = it, this.xt(t$2)) : Promise.resolve(this.It);
2498
- }
2499
- async reset() {
2500
- const t$2 = this.stop();
2501
- return this.It = et, this._t = null, t$2.then(() => this.It);
2502
- }
2503
- async xt(t$2) {
2504
- return await function(t$3) {
2505
- let n$1 = null;
2506
- const e$1 = new Promise((t$4) => {
2507
- n$1 = u(t$4, 2e3);
2508
- });
2509
- return Promise.race([t$3.finally(() => d(n$1)), e$1]);
2510
- }(Promise.resolve(t$2.transportManager.stop())), await t$2.activityManager.stop(), this.It;
2511
- }
2512
- async v(t$2) {
2513
- const e$1 = this._t;
2514
- if (e$1) {
2515
- try {
2516
- if (await e$1.activityManager.start(), t$2 !== this.Tt) return;
2517
- if (e$1.transportManager.start(), await e$1.tabManager.start(), t$2 !== this.Tt) return;
2518
- e$1.lifecycleManager.start(), e$1.collectorManager.autocapture();
2519
- } catch (e$2) {
2520
- n.warn("start()", "failed during monitoring start:", e$2), t$2 === this.Tt && (this.It = it);
2521
- return;
2522
- }
2523
- t$2 === this.Tt && (this.It = ot);
2524
- }
2525
- }
2526
- async linkInterview(t$2) {
2527
- if (this.It !== ot || !this._t) return n.warn("linkInterview()", "linkInterview() called before start() completed — ignoring."), !1;
2528
- if (!t$2) return n.warn("linkInterview()", "linkInterview() called without sessionToken — ignoring."), !1;
2529
- try {
2530
- return (await this._t.falconServiceManager.api.linkInterview(t$2)).ok;
2531
- } catch (t$3) {
2532
- return n.warn("linkInterview()", "failed:", t$3), !1;
2533
- }
2534
- }
2535
- };
2536
- async function un(t$1, n$1) {
2537
- const e$1 = n$1?.apiURL ?? "https://falcon-ingest-k8s.stage.incodetest.com", i$1 = n$1?.timeout ?? 1e4, o$1 = new AbortController();
2538
- let r$1 = null, s$1 = !1, c$1 = () => {};
2539
- i$1 && (r$1 = u(() => {
2540
- s$1 = !0, o$1.abort();
2541
- }, i$1));
2542
- const a$1 = n$1?.signal;
2543
- if (a$1) if (a$1.aborted) o$1.abort();
2544
- else {
2545
- const t$2 = () => o$1.abort();
2546
- a$1.addEventListener("abort", t$2, { once: !0 }), c$1 = () => a$1.removeEventListener("abort", t$2);
2547
- }
2548
- try {
2549
- const n$2 = await fetch(`${e$1}/api/v1/sdk/init`, {
2550
- method: "POST",
2551
- headers: {
2552
- "content-type": "application/json",
2553
- "x-api-key": t$1,
2554
- "x-api-version": "1.0"
2555
- },
2556
- signal: o$1.signal
2557
- });
2558
- if (!n$2.ok) {
2559
- let t$2 = n$2.statusText;
2560
- try {
2561
- const e$2 = await n$2.json();
2562
- e$2.errorMessage && (t$2 = e$2.errorMessage);
2563
- } catch {}
2564
- return {
2565
- token: null,
2566
- expiresAt: null,
2567
- tokenType: null,
2568
- eventsCollectionEnabled: !1,
2569
- error: {
2570
- status: n$2.status,
2571
- message: t$2
2572
- }
2573
- };
2574
- }
2575
- const i$2 = await n$2.json();
2576
- return {
2577
- token: i$2.token,
2578
- expiresAt: i$2.expiresAt,
2579
- tokenType: i$2.tokenType,
2580
- eventsCollectionEnabled: !0,
2581
- error: null
2582
- };
2583
- } catch (t$2) {
2584
- throw new Error((s$1 ? "[TRI] createSession timed out" : "[TRI] Failed to create session:") + " " + t$2.message);
2585
- } finally {
2586
- d(r$1), c$1();
2587
- }
2588
- }
2589
- ln.i = null;
2590
- const dn = ln.instance;
2591
-
2592
- //#endregion
2593
- export { un as createSession, dn as default };