@utk09/ui-observability 0.11.0 → 0.12.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 (383) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/README.md +273 -102
  3. package/bin/uiobs.mjs +1 -1
  4. package/dist/{batch-CL9uWYY3.js → batch-BjQUwjA6.js} +4 -4
  5. package/dist/batch-BjQUwjA6.js.map +1 -0
  6. package/dist/{batch-C8OcWR2L.cjs → batch-D5LlU4Q9.cjs} +2 -2
  7. package/dist/batch-D5LlU4Q9.cjs.map +1 -0
  8. package/dist/bus/bus.d.ts +48 -47
  9. package/dist/bus/links.d.ts +4 -4
  10. package/dist/bus/validation.d.ts +1 -1
  11. package/dist/bus-D_7pd7RN.cjs +2 -0
  12. package/dist/bus-D_7pd7RN.cjs.map +1 -0
  13. package/dist/{bus-BZ0GldpT.js → bus-ecxUNTja.js} +91 -91
  14. package/dist/bus-ecxUNTja.js.map +1 -0
  15. package/dist/capture/console.d.ts +10 -10
  16. package/dist/capture/errors.d.ts +6 -6
  17. package/dist/capture/interactions.d.ts +14 -14
  18. package/dist/capture/lifecycle.d.ts +3 -3
  19. package/dist/capture/long-frames.d.ts +6 -6
  20. package/dist/capture/network.d.ts +17 -17
  21. package/dist/capture/profiler-frames.d.ts +44 -0
  22. package/dist/capture/replay-buffer.d.ts +46 -0
  23. package/dist/capture/replay-upload.d.ts +74 -0
  24. package/dist/capture/replay.d.ts +114 -0
  25. package/dist/capture/reports.d.ts +2 -2
  26. package/dist/capture/resource-timing.d.ts +1 -1
  27. package/dist/capture/server-timing.d.ts +3 -3
  28. package/dist/capture/storm.d.ts +3 -3
  29. package/dist/capture/types.d.ts +45 -33
  30. package/dist/capture/unclean-exit.d.ts +8 -8
  31. package/dist/capture/user-timing.d.ts +3 -3
  32. package/dist/capture/web-socket.d.ts +11 -11
  33. package/dist/capture/web-vitals.d.ts +20 -7
  34. package/dist/compression-AJJCMBOa.js +11 -0
  35. package/dist/compression-AJJCMBOa.js.map +1 -0
  36. package/dist/compression-lD9abCcO.cjs +2 -0
  37. package/dist/compression-lD9abCcO.cjs.map +1 -0
  38. package/dist/{console-BPZCuSLc.cjs → console-CLz_PvFn.cjs} +2 -2
  39. package/dist/console-CLz_PvFn.cjs.map +1 -0
  40. package/dist/{console-BeCF7n59.js → console-cwgHKXvM.js} +4 -4
  41. package/dist/console-cwgHKXvM.js.map +1 -0
  42. package/dist/constants-Bwl_YtQi.js +349 -0
  43. package/dist/constants-Bwl_YtQi.js.map +1 -0
  44. package/dist/constants-DakMxVB2.cjs +2 -0
  45. package/dist/constants-DakMxVB2.cjs.map +1 -0
  46. package/dist/constants.d.ts +150 -103
  47. package/dist/context-storage-BjzeBSxH.cjs.map +1 -1
  48. package/dist/context-storage-BzkoHzkQ.js.map +1 -1
  49. package/dist/core/breadcrumbs.d.ts +16 -15
  50. package/dist/core/config.d.ts +3 -3
  51. package/dist/core/context.d.ts +7 -7
  52. package/dist/core/debug-buffer.d.ts +10 -10
  53. package/dist/core/debug-bundle.d.ts +3 -3
  54. package/dist/core/deferred.d.ts +2 -2
  55. package/dist/core/diagnostics.d.ts +24 -21
  56. package/dist/core/drops.d.ts +7 -7
  57. package/dist/core/hold-buffer.d.ts +1 -1
  58. package/dist/core/journey.d.ts +22 -23
  59. package/dist/core/logger.d.ts +22 -21
  60. package/dist/core/measure.d.ts +7 -7
  61. package/dist/core/meter.d.ts +25 -21
  62. package/dist/core/pipeline.d.ts +42 -41
  63. package/dist/core/profile-buckets.d.ts +31 -0
  64. package/dist/core/profiler.d.ts +218 -0
  65. package/dist/core/record.d.ts +23 -23
  66. package/dist/core/remote-rules.d.ts +4 -4
  67. package/dist/core/remote-sampling.d.ts +21 -20
  68. package/dist/core/runtime.d.ts +206 -137
  69. package/dist/core/sampling.d.ts +18 -18
  70. package/dist/core/sender.d.ts +22 -20
  71. package/dist/core/spans.d.ts +5 -5
  72. package/dist/{deadline-BOjOxNHj.js → deadline-C4ccAuk5.js} +3 -6
  73. package/dist/deadline-C4ccAuk5.js.map +1 -0
  74. package/dist/deadline-CUGbto-y.cjs +2 -0
  75. package/dist/deadline-CUGbto-y.cjs.map +1 -0
  76. package/dist/{debug-bundle-C7UkHZ-q.js → debug-bundle-BOdYmCeV.js} +10 -3
  77. package/dist/debug-bundle-BOdYmCeV.js.map +1 -0
  78. package/dist/debug-bundle-Ex4L_LSP.cjs +2 -0
  79. package/dist/debug-bundle-Ex4L_LSP.cjs.map +1 -0
  80. package/dist/doctor.cjs +1 -1
  81. package/dist/doctor.cjs.map +1 -1
  82. package/dist/doctor.d.ts +16 -6
  83. package/dist/doctor.js +147 -52
  84. package/dist/doctor.js.map +1 -1
  85. package/dist/{emergency-queue-Zy6lNafo.js → emergency-queue-B9WZxanZ.js} +4 -4
  86. package/dist/emergency-queue-B9WZxanZ.js.map +1 -0
  87. package/dist/{emergency-queue-CNTRui5t.cjs → emergency-queue-HBpL5r3V.cjs} +2 -2
  88. package/dist/emergency-queue-HBpL5r3V.cjs.map +1 -0
  89. package/dist/error-like-B11pB4aL.js.map +1 -1
  90. package/dist/error-like-gGRx2s36.cjs.map +1 -1
  91. package/dist/{errors-Dh7kef0i.js → errors-D6bwgJtO.js} +3 -3
  92. package/dist/errors-D6bwgJtO.js.map +1 -0
  93. package/dist/{errors-tfEr48bS.cjs → errors-DCOCRdSi.cjs} +2 -2
  94. package/dist/errors-DCOCRdSi.cjs.map +1 -0
  95. package/dist/{factory-CJXVYp0R.cjs → factory-DLFDjdLv.cjs} +2 -2
  96. package/dist/factory-DLFDjdLv.cjs.map +1 -0
  97. package/dist/{factory-BonqI3NL.js → factory-e9Qo3K0z.js} +13 -13
  98. package/dist/factory-e9Qo3K0z.js.map +1 -0
  99. package/dist/fixed-window-CvESpFYV.cjs.map +1 -1
  100. package/dist/fixed-window-Dq3MLUUv.js.map +1 -1
  101. package/dist/global-scope-BN-Io_yv.cjs.map +1 -1
  102. package/dist/global-scope-D9I8s-oN.js.map +1 -1
  103. package/dist/guards-Cidk71ME.js.map +1 -1
  104. package/dist/guards-nJ70syPt.cjs.map +1 -1
  105. package/dist/{identity-Cxgj6pZX.cjs → identity-BlvlgjrU.cjs} +2 -2
  106. package/dist/identity-BlvlgjrU.cjs.map +1 -0
  107. package/dist/{identity-DT5VmvXy.js → identity-BrQp_5J5.js} +19 -19
  108. package/dist/identity-BrQp_5J5.js.map +1 -0
  109. package/dist/index.cjs +1 -1
  110. package/dist/index.cjs.map +1 -1
  111. package/dist/index.d.ts +112 -79
  112. package/dist/index.js +783 -635
  113. package/dist/index.js.map +1 -1
  114. package/dist/{indexeddb-storage-CIoW21Xd.cjs → indexeddb-storage-CtLvZH1r.cjs} +2 -2
  115. package/dist/indexeddb-storage-CtLvZH1r.cjs.map +1 -0
  116. package/dist/{indexeddb-storage-BJVtiQKm.js → indexeddb-storage-DLXQzAGh.js} +4 -4
  117. package/dist/indexeddb-storage-DLXQzAGh.js.map +1 -0
  118. package/dist/{interactions-DTgKy_6K.js → interactions-B6z2I4tU.js} +3 -3
  119. package/dist/interactions-B6z2I4tU.js.map +1 -0
  120. package/dist/{interactions-fEN6FbVo.cjs → interactions-P6pz08Jn.cjs} +2 -2
  121. package/dist/interactions-P6pz08Jn.cjs.map +1 -0
  122. package/dist/{journey-CuJrHzEg.js → journey-35yCMNFo.js} +20 -19
  123. package/dist/journey-35yCMNFo.js.map +1 -0
  124. package/dist/journey-DAGh5h9k.cjs +2 -0
  125. package/dist/journey-DAGh5h9k.cjs.map +1 -0
  126. package/dist/keys-BHhw_0Wh.cjs.map +1 -1
  127. package/dist/keys-BU9j5YqW.js.map +1 -1
  128. package/dist/{library-console-D2GY9Or6.cjs → library-console-BFWEuQsl.cjs} +2 -2
  129. package/dist/library-console-BFWEuQsl.cjs.map +1 -0
  130. package/dist/{library-console-C1m6g1BR.js → library-console-Dl_Ly6DQ.js} +2 -2
  131. package/dist/library-console-Dl_Ly6DQ.js.map +1 -0
  132. package/dist/{library-request-1BX_UlaX.cjs → library-request-Da-CHKzT.cjs} +2 -2
  133. package/dist/library-request-Da-CHKzT.cjs.map +1 -0
  134. package/dist/{library-request-BQBT9N9Q.js → library-request-nI6pvI6I.js} +2 -2
  135. package/dist/library-request-nI6pvI6I.js.map +1 -0
  136. package/dist/{lifecycle-2EtUaRpo.cjs → lifecycle-BGGOcN4N.cjs} +2 -2
  137. package/dist/lifecycle-BGGOcN4N.cjs.map +1 -0
  138. package/dist/{lifecycle-BaKx_-32.js → lifecycle-CZ6RRXc6.js} +2 -2
  139. package/dist/lifecycle-CZ6RRXc6.js.map +1 -0
  140. package/dist/{log-record-i9zOTkpQ.cjs → log-record-D7bA1RPb.cjs} +2 -2
  141. package/dist/log-record-D7bA1RPb.cjs.map +1 -0
  142. package/dist/{log-record-CAoGBBf3.js → log-record-DIA6McNr.js} +2 -2
  143. package/dist/log-record-DIA6McNr.js.map +1 -0
  144. package/dist/{long-frames-Czk7IupC.js → long-frames-430_85Da.js} +8 -6
  145. package/dist/long-frames-430_85Da.js.map +1 -0
  146. package/dist/long-frames-Dd8tsi2U.cjs +2 -0
  147. package/dist/long-frames-Dd8tsi2U.cjs.map +1 -0
  148. package/dist/models/batch.d.ts +14 -15
  149. package/dist/models/bus.d.ts +24 -24
  150. package/dist/models/config.d.ts +402 -216
  151. package/dist/models/drop.d.ts +13 -11
  152. package/dist/models/health.d.ts +13 -13
  153. package/dist/models/log-record.d.ts +13 -14
  154. package/dist/models/metric.d.ts +82 -17
  155. package/dist/models/plugin.d.ts +13 -13
  156. package/dist/models/replay.d.ts +60 -0
  157. package/dist/models/serializer.d.ts +2 -3
  158. package/dist/models/stats.d.ts +2 -2
  159. package/dist/models/storage.d.ts +12 -11
  160. package/dist/{network-DBNwApoF.js → network-C7SkLf4v.js} +12 -12
  161. package/dist/network-C7SkLf4v.js.map +1 -0
  162. package/dist/{network-xbbuvG_6.cjs → network-pEX3PAJv.cjs} +2 -2
  163. package/dist/network-pEX3PAJv.cjs.map +1 -0
  164. package/dist/openfin-Bxelt0yg.js.map +1 -1
  165. package/dist/openfin-DtH2f7zX.cjs.map +1 -1
  166. package/dist/otlp-2MCrC3kd.cjs +2 -0
  167. package/dist/otlp-2MCrC3kd.cjs.map +1 -0
  168. package/dist/{otlp-BTJdIa6F.js → otlp-COq033e3.js} +25 -32
  169. package/dist/otlp-COq033e3.js.map +1 -0
  170. package/dist/patch-BX8KrPCT.cjs.map +1 -1
  171. package/dist/patch-UdPz1ea8.js.map +1 -1
  172. package/dist/{platform-C2Ez5kDc.cjs → platform-12uR7kBQ.cjs} +2 -2
  173. package/dist/platform-12uR7kBQ.cjs.map +1 -0
  174. package/dist/{platform-DkcuXwe-.js → platform-CVewe4wQ.js} +7 -7
  175. package/dist/platform-CVewe4wQ.js.map +1 -0
  176. package/dist/profiler-BVWIOgnq.js +310 -0
  177. package/dist/profiler-BVWIOgnq.js.map +1 -0
  178. package/dist/profiler-eVCknCzS.cjs +2 -0
  179. package/dist/profiler-eVCknCzS.cjs.map +1 -0
  180. package/dist/profiler-frames-CLXlT_xL.js +86 -0
  181. package/dist/profiler-frames-CLXlT_xL.js.map +1 -0
  182. package/dist/profiler-frames-Dg2OebB2.cjs +2 -0
  183. package/dist/profiler-frames-Dg2OebB2.cjs.map +1 -0
  184. package/dist/{remote-rules-Cfb4K-Nl.js → remote-rules-BJGDJGwA.js} +27 -27
  185. package/dist/remote-rules-BJGDJGwA.js.map +1 -0
  186. package/dist/{remote-rules-vzvk7aKf.cjs → remote-rules-CJD3ToVk.cjs} +2 -2
  187. package/dist/remote-rules-CJD3ToVk.cjs.map +1 -0
  188. package/dist/replay-0zAJv9T3.js +338 -0
  189. package/dist/replay-0zAJv9T3.js.map +1 -0
  190. package/dist/replay-DomJpXqW.cjs +2 -0
  191. package/dist/replay-DomJpXqW.cjs.map +1 -0
  192. package/dist/{reports-Dk2YhKIh.cjs → reports-BsbqmP8h.cjs} +2 -2
  193. package/dist/reports-BsbqmP8h.cjs.map +1 -0
  194. package/dist/{reports-TA-zInnq.js → reports-BuXekPOS.js} +3 -3
  195. package/dist/reports-BuXekPOS.js.map +1 -0
  196. package/dist/{resource-timing-BLv3EA2A.js → resource-timing-CXGHwFRD.js} +4 -4
  197. package/dist/resource-timing-CXGHwFRD.js.map +1 -0
  198. package/dist/{resource-timing-Cysw1S1f.cjs → resource-timing-DkycFGDa.cjs} +2 -2
  199. package/dist/resource-timing-DkycFGDa.cjs.map +1 -0
  200. package/dist/{sampling-Ckh2yW9k.cjs → sampling-Dd0wllyq.cjs} +2 -2
  201. package/dist/sampling-Dd0wllyq.cjs.map +1 -0
  202. package/dist/{sampling-C4VV-1MS.js → sampling-UUDbi3K0.js} +9 -9
  203. package/dist/sampling-UUDbi3K0.js.map +1 -0
  204. package/dist/{sanitize-6ymPlVvP.js → sanitize-CNmsD9r3.js} +2 -2
  205. package/dist/sanitize-CNmsD9r3.js.map +1 -0
  206. package/dist/{sanitize-BAWzkZt0.cjs → sanitize-ChLn97Ch.cjs} +2 -2
  207. package/dist/sanitize-ChLn97Ch.cjs.map +1 -0
  208. package/dist/{select-ZF4by-lF.cjs → select-CTk-K5mG.cjs} +3 -3
  209. package/dist/select-CTk-K5mG.cjs.map +1 -0
  210. package/dist/{select-xtQaenIi.js → select-DPv_j6wq.js} +61 -61
  211. package/dist/select-DPv_j6wq.js.map +1 -0
  212. package/dist/{sender-CiMHC9YG.js → sender-15zEsZpr.js} +61 -60
  213. package/dist/sender-15zEsZpr.js.map +1 -0
  214. package/dist/sender-Bfpv9tad.cjs +2 -0
  215. package/dist/sender-Bfpv9tad.cjs.map +1 -0
  216. package/dist/storage/context-storage.d.ts +34 -33
  217. package/dist/storage/emergency-queue.d.ts +9 -9
  218. package/dist/storage/eviction.d.ts +12 -12
  219. package/dist/storage/factory.d.ts +8 -7
  220. package/dist/storage/gap.d.ts +6 -6
  221. package/dist/storage/idb-driver.d.ts +31 -32
  222. package/dist/storage/indexeddb-storage.d.ts +26 -27
  223. package/dist/storage/keys.d.ts +7 -7
  224. package/dist/storage/local-storage.d.ts +38 -38
  225. package/dist/storage/memory-storage.d.ts +21 -22
  226. package/dist/storage/persistence.d.ts +1 -1
  227. package/dist/storage-BA9RqRO-.cjs.map +1 -1
  228. package/dist/storage-DZwed89z.js.map +1 -1
  229. package/dist/{storm-VR024_QN.js → storm-BTSNTIWI.js} +2 -2
  230. package/dist/storm-BTSNTIWI.js.map +1 -0
  231. package/dist/{storm-CYi9Swpx.cjs → storm-D0_qZOEg.cjs} +2 -2
  232. package/dist/storm-D0_qZOEg.cjs.map +1 -0
  233. package/dist/transport/compression.d.ts +2 -2
  234. package/dist/transport/errors.d.ts +7 -7
  235. package/dist/transport/exit-flush.d.ts +39 -39
  236. package/dist/transport/headers.d.ts +2 -2
  237. package/dist/transport/http-transport.d.ts +28 -27
  238. package/dist/transport/memory-transport.d.ts +6 -6
  239. package/dist/transport/retry-engine.d.ts +35 -34
  240. package/dist/transport/serializers/ecs.d.ts +1 -1
  241. package/dist/transport/serializers/otlp-metrics.d.ts +1 -1
  242. package/dist/transport/serializers/otlp-traces.d.ts +1 -1
  243. package/dist/transport/serializers/otlp.d.ts +16 -16
  244. package/dist/transport/serializers/select.d.ts +7 -7
  245. package/dist/transport/status-transport.d.ts +20 -20
  246. package/dist/transport/worker-protocol.d.ts +3 -3
  247. package/dist/types-BAerHgCq.js.map +1 -1
  248. package/dist/types-C7WNpnG1.cjs.map +1 -1
  249. package/dist/{unclean-exit-DFUN57wY.cjs → unclean-exit-ClGzrc2A.cjs} +2 -2
  250. package/dist/unclean-exit-ClGzrc2A.cjs.map +1 -0
  251. package/dist/{unclean-exit-CwcUhFOn.js → unclean-exit-Cob_jyTv.js} +2 -2
  252. package/dist/unclean-exit-Cob_jyTv.js.map +1 -0
  253. package/dist/unref-CU9Nyz_9.cjs +2 -0
  254. package/dist/unref-CU9Nyz_9.cjs.map +1 -0
  255. package/dist/unref-DgHPQeWv.js +7 -0
  256. package/dist/unref-DgHPQeWv.js.map +1 -0
  257. package/dist/user-timing-CdYqx3PF.cjs +2 -0
  258. package/dist/user-timing-CdYqx3PF.cjs.map +1 -0
  259. package/dist/{user-timing-_jZIhDKI.js → user-timing-DgHubxCI.js} +5 -3
  260. package/dist/user-timing-DgHubxCI.js.map +1 -0
  261. package/dist/utils/console.d.ts +2 -2
  262. package/dist/utils/deadline.d.ts +4 -4
  263. package/dist/utils/error-like.d.ts +7 -7
  264. package/dist/utils/fixed-window.d.ts +9 -8
  265. package/dist/utils/global-scope.d.ts +8 -8
  266. package/dist/utils/guards.d.ts +2 -2
  267. package/dist/utils/identity.d.ts +17 -17
  268. package/dist/utils/library-console.d.ts +4 -4
  269. package/dist/utils/library-request.d.ts +10 -10
  270. package/dist/utils/lock.d.ts +10 -9
  271. package/dist/utils/openfin.d.ts +5 -5
  272. package/dist/utils/patch.d.ts +6 -6
  273. package/dist/utils/platform.d.ts +13 -11
  274. package/dist/utils/sanitize.d.ts +4 -4
  275. package/dist/utils/timer.d.ts +1 -1
  276. package/dist/utils/tracing.d.ts +38 -38
  277. package/dist/utils/unref.d.ts +3 -3
  278. package/dist/{web-socket-BWUoqBh8.cjs → web-socket-BTuvYoJI.cjs} +2 -2
  279. package/dist/web-socket-BTuvYoJI.cjs.map +1 -0
  280. package/dist/{web-socket-CV7yIMnm.js → web-socket-DthJuSAg.js} +4 -4
  281. package/dist/web-socket-DthJuSAg.js.map +1 -0
  282. package/dist/web-vitals-Ch5BpDmo.cjs +2 -0
  283. package/dist/web-vitals-Ch5BpDmo.cjs.map +1 -0
  284. package/dist/web-vitals-CsGCWnUr.js +77 -0
  285. package/dist/web-vitals-CsGCWnUr.js.map +1 -0
  286. package/dist/{worker-protocol-CrsdSDLn.js → worker-protocol-B0_8rWy5.js} +4 -4
  287. package/dist/worker-protocol-B0_8rWy5.js.map +1 -0
  288. package/dist/{worker-protocol-Bai7GAIA.cjs → worker-protocol-BjzFORfq.cjs} +2 -2
  289. package/dist/worker-protocol-BjzFORfq.cjs.map +1 -0
  290. package/dist/worker-server-4en-Lt-3.cjs +2 -0
  291. package/dist/worker-server-4en-Lt-3.cjs.map +1 -0
  292. package/dist/{worker-server-Dp5HYm4b.js → worker-server-Cne9MX9I.js} +8 -8
  293. package/dist/{worker-server-Dp5HYm4b.js.map → worker-server-Cne9MX9I.js.map} +1 -1
  294. package/dist/worker-transport-B-GF4Aqn.cjs +2 -0
  295. package/dist/worker-transport-B-GF4Aqn.cjs.map +1 -0
  296. package/dist/{worker-transport-D6jtgpqN.js → worker-transport-C3SjJAEC.js} +62 -61
  297. package/dist/worker-transport-C3SjJAEC.js.map +1 -0
  298. package/package.json +8 -2
  299. package/dist/batch-C8OcWR2L.cjs.map +0 -1
  300. package/dist/batch-CL9uWYY3.js.map +0 -1
  301. package/dist/bus-BZ0GldpT.js.map +0 -1
  302. package/dist/bus-VWlmM5xs.cjs +0 -2
  303. package/dist/bus-VWlmM5xs.cjs.map +0 -1
  304. package/dist/console-BPZCuSLc.cjs.map +0 -1
  305. package/dist/console-BeCF7n59.js.map +0 -1
  306. package/dist/constants-DqKJH_MP.cjs +0 -2
  307. package/dist/constants-DqKJH_MP.cjs.map +0 -1
  308. package/dist/constants-zyrqveN4.js +0 -304
  309. package/dist/constants-zyrqveN4.js.map +0 -1
  310. package/dist/deadline-BOjOxNHj.js.map +0 -1
  311. package/dist/deadline-XSnm95pg.cjs +0 -2
  312. package/dist/deadline-XSnm95pg.cjs.map +0 -1
  313. package/dist/debug-bundle-BzJNpbF0.cjs +0 -2
  314. package/dist/debug-bundle-BzJNpbF0.cjs.map +0 -1
  315. package/dist/debug-bundle-C7UkHZ-q.js.map +0 -1
  316. package/dist/emergency-queue-CNTRui5t.cjs.map +0 -1
  317. package/dist/emergency-queue-Zy6lNafo.js.map +0 -1
  318. package/dist/errors-Dh7kef0i.js.map +0 -1
  319. package/dist/errors-tfEr48bS.cjs.map +0 -1
  320. package/dist/factory-BonqI3NL.js.map +0 -1
  321. package/dist/factory-CJXVYp0R.cjs.map +0 -1
  322. package/dist/identity-Cxgj6pZX.cjs.map +0 -1
  323. package/dist/identity-DT5VmvXy.js.map +0 -1
  324. package/dist/indexeddb-storage-BJVtiQKm.js.map +0 -1
  325. package/dist/indexeddb-storage-CIoW21Xd.cjs.map +0 -1
  326. package/dist/interactions-DTgKy_6K.js.map +0 -1
  327. package/dist/interactions-fEN6FbVo.cjs.map +0 -1
  328. package/dist/journey-CuJrHzEg.js.map +0 -1
  329. package/dist/journey-pffMVMfa.cjs +0 -2
  330. package/dist/journey-pffMVMfa.cjs.map +0 -1
  331. package/dist/library-console-C1m6g1BR.js.map +0 -1
  332. package/dist/library-console-D2GY9Or6.cjs.map +0 -1
  333. package/dist/library-request-1BX_UlaX.cjs.map +0 -1
  334. package/dist/library-request-BQBT9N9Q.js.map +0 -1
  335. package/dist/lifecycle-2EtUaRpo.cjs.map +0 -1
  336. package/dist/lifecycle-BaKx_-32.js.map +0 -1
  337. package/dist/log-record-CAoGBBf3.js.map +0 -1
  338. package/dist/log-record-i9zOTkpQ.cjs.map +0 -1
  339. package/dist/long-frames-BVg4i5SC.cjs +0 -2
  340. package/dist/long-frames-BVg4i5SC.cjs.map +0 -1
  341. package/dist/long-frames-Czk7IupC.js.map +0 -1
  342. package/dist/network-DBNwApoF.js.map +0 -1
  343. package/dist/network-xbbuvG_6.cjs.map +0 -1
  344. package/dist/otlp-BDvFrLnc.cjs +0 -2
  345. package/dist/otlp-BDvFrLnc.cjs.map +0 -1
  346. package/dist/otlp-BTJdIa6F.js.map +0 -1
  347. package/dist/platform-C2Ez5kDc.cjs.map +0 -1
  348. package/dist/platform-DkcuXwe-.js.map +0 -1
  349. package/dist/remote-rules-Cfb4K-Nl.js.map +0 -1
  350. package/dist/remote-rules-vzvk7aKf.cjs.map +0 -1
  351. package/dist/reports-Dk2YhKIh.cjs.map +0 -1
  352. package/dist/reports-TA-zInnq.js.map +0 -1
  353. package/dist/resource-timing-BLv3EA2A.js.map +0 -1
  354. package/dist/resource-timing-Cysw1S1f.cjs.map +0 -1
  355. package/dist/sampling-C4VV-1MS.js.map +0 -1
  356. package/dist/sampling-Ckh2yW9k.cjs.map +0 -1
  357. package/dist/sanitize-6ymPlVvP.js.map +0 -1
  358. package/dist/sanitize-BAWzkZt0.cjs.map +0 -1
  359. package/dist/select-ZF4by-lF.cjs.map +0 -1
  360. package/dist/select-xtQaenIi.js.map +0 -1
  361. package/dist/sender-CiMHC9YG.js.map +0 -1
  362. package/dist/sender-D5wBoXA8.cjs +0 -2
  363. package/dist/sender-D5wBoXA8.cjs.map +0 -1
  364. package/dist/storm-CYi9Swpx.cjs.map +0 -1
  365. package/dist/storm-VR024_QN.js.map +0 -1
  366. package/dist/unclean-exit-CwcUhFOn.js.map +0 -1
  367. package/dist/unclean-exit-DFUN57wY.cjs.map +0 -1
  368. package/dist/user-timing-C9kfRq3J.cjs +0 -2
  369. package/dist/user-timing-C9kfRq3J.cjs.map +0 -1
  370. package/dist/user-timing-_jZIhDKI.js.map +0 -1
  371. package/dist/web-socket-BWUoqBh8.cjs.map +0 -1
  372. package/dist/web-socket-CV7yIMnm.js.map +0 -1
  373. package/dist/web-vitals-Bq4WFHQo.js +0 -52
  374. package/dist/web-vitals-Bq4WFHQo.js.map +0 -1
  375. package/dist/web-vitals-DFuoTQbZ.cjs +0 -2
  376. package/dist/web-vitals-DFuoTQbZ.cjs.map +0 -1
  377. package/dist/worker-protocol-Bai7GAIA.cjs.map +0 -1
  378. package/dist/worker-protocol-CrsdSDLn.js.map +0 -1
  379. package/dist/worker-server-BrIYkfoa.cjs +0 -2
  380. package/dist/worker-server-BrIYkfoa.cjs.map +0 -1
  381. package/dist/worker-transport-Bwej4N2e.cjs +0 -2
  382. package/dist/worker-transport-Bwej4N2e.cjs.map +0 -1
  383. package/dist/worker-transport-D6jtgpqN.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,79 +1,80 @@
1
- import { $t as e, Bn as t, Ct as n, D as r, Et as i, F as a, Fn as o, G as s, Hn as c, I as l, In as u, J as d, K as f, Kt as p, L as m, Mn as h, Mt as g, N as _, Nn as v, Nt as y, Pn as ee, Pt as te, Qt as ne, U as re, Un as ie, W as ae, Wn as oe, X as se, Zt as ce, _ as le, a as ue, an as de, bn as fe, c as b, cn as pe, d as me, dn as he, en as ge, f as x, fn as _e, g as ve, h as ye, in as be, jn as xe, ln as Se, m as Ce, mn as S, nn as we, o as Te, on as Ee, p as De, q as Oe, qt as ke, rn as Ae, s as je, sn as Me, tn as Ne, u as Pe, un as Fe, v as C, wn as Ie, wt as w, xn as T, y as Le, zn as Re } from "./constants-zyrqveN4.js";
2
- import { n as ze, r as Be, t as Ve } from "./log-record-CAoGBBf3.js";
3
- import { n as He, r as Ue, t as We } from "./error-like-B11pB4aL.js";
4
- import { t as E } from "./guards-Cidk71ME.js";
5
- import { r as Ge } from "./deadline-BOjOxNHj.js";
6
- import { i as D, n as Ke, t as qe } from "./platform-DkcuXwe-.js";
7
- import { n as O, t as Je } from "./library-console-C1m6g1BR.js";
8
- import { i as Ye, n as Xe, r as k } from "./sanitize-6ymPlVvP.js";
9
- import { a as Ze, i as A, n as Qe, o as $e, r as et, s as tt, t as nt } from "./identity-DT5VmvXy.js";
10
- import { r as rt } from "./library-request-BQBT9N9Q.js";
11
- import { r as it, t as at } from "./batch-CL9uWYY3.js";
12
- import { n as ot, t as st } from "./journey-CuJrHzEg.js";
13
- import { a as ct, i as lt, n as ut, o as dt } from "./sampling-C4VV-1MS.js";
1
+ import { Cn as e, D as t, Dt as n, En as r, F as i, Ft as a, G as o, Gn as s, Gt as c, I as l, In as u, J as d, Jn as f, K as p, Kn as m, L as h, Mn as ee, N as g, Nn as _, Nt as v, Pt as y, Qn as te, Sn as ne, Tt as b, U as re, Un as ie, W as ae, Wn as oe, X as se, Zn as ce, _ as le, _n as ue, _t as de, a as fe, bn as pe, c as x, d as me, dn as he, er as ge, f as S, fn as _e, g as ve, gn as ye, h as be, hn as xe, ln as Se, m as Ce, mn as we, nn as Te, nr as Ee, o as De, p as Oe, pn as ke, q as Ae, qn as je, s as Me, tn as Ne, tr as Pe, u as Fe, un as Ie, v as Le, vn as Re, wn as ze, wt as Be, xn as Ve, y as He, yn as Ue } from "./constants-Bwl_YtQi.js";
2
+ import { n as We, r as Ge, t as Ke } from "./log-record-DIA6McNr.js";
3
+ import { n as qe, r as Je, t as Ye } from "./error-like-B11pB4aL.js";
4
+ import { t as C } from "./guards-Cidk71ME.js";
5
+ import { t as Xe } from "./unref-DgHPQeWv.js";
6
+ import { i as w, n as Ze, t as Qe } from "./platform-CVewe4wQ.js";
7
+ import { t as T } from "./profiler-BVWIOgnq.js";
8
+ import { n as E, t as $e } from "./library-console-Dl_Ly6DQ.js";
9
+ import { i as et, n as tt, r as D } from "./sanitize-CNmsD9r3.js";
10
+ import { a as nt, i as O, n as rt, o as it, r as at, s as ot, t as st } from "./identity-BrQp_5J5.js";
11
+ import { r as ct } from "./library-request-nI6pvI6I.js";
12
+ import { r as lt, t as ut } from "./batch-BjQUwjA6.js";
13
+ import { n as dt, t as ft } from "./journey-35yCMNFo.js";
14
+ import { a as pt, i as mt, n as ht, o as gt } from "./sampling-UUDbi3K0.js";
14
15
  // src/utils/timer.ts
15
- function ft(e) {
16
+ function _t(e) {
16
17
  return Math.round((performance.now() - e) * se) / se;
17
18
  }
18
- function pt(e, t, n, r, i) {
19
+ function vt(e, t, n, r, i) {
19
20
  e.logMetric(`${t}.duration`, n, "ms", "histogram", {
20
21
  status: r,
21
22
  ...i
22
23
  });
23
24
  }
24
- function mt(e, t, n, r, i) {
25
- let a = ft(n);
25
+ function yt(e, t, n, r, i) {
26
+ let a = _t(n);
26
27
  e.error(`${t} failed`, r, {
27
28
  "action.duration_ms": a,
28
29
  status: "FAILURE",
29
30
  ...i
30
- }), pt(e, t, a, "FAILURE", i);
31
+ }), vt(e, t, a, "FAILURE", i);
31
32
  }
32
- function ht(e, t, n, r) {
33
+ function bt(e, t, n, r) {
33
34
  let i = performance.now();
34
35
  try {
35
36
  let a = n();
36
- return pt(e, t, ft(i), "SUCCESS", r), a;
37
+ return vt(e, t, _t(i), "SUCCESS", r), a;
37
38
  } catch (n) {
38
- throw mt(e, t, i, n, r), n;
39
+ throw yt(e, t, i, n, r), n;
39
40
  }
40
41
  }
41
- async function gt(e, t, n, r) {
42
+ async function xt(e, t, n, r) {
42
43
  let i = performance.now();
43
44
  try {
44
45
  let a = await n();
45
- return pt(e, t, ft(i), "SUCCESS", r), a;
46
+ return vt(e, t, _t(i), "SUCCESS", r), a;
46
47
  } catch (n) {
47
- throw mt(e, t, i, n, r), n;
48
+ throw yt(e, t, i, n, r), n;
48
49
  }
49
50
  }
50
51
  // src/core/deferred.ts
51
- var j = /* @__PURE__ */ new WeakMap();
52
- function _t(e) {
52
+ var k = /* @__PURE__ */ new WeakMap();
53
+ function St(e) {
53
54
  let t = e.idle;
54
55
  t !== void 0 && (e.diagnostics.guard("pipeline.crashed", "The idle callback could not be cancelled.", () => {
55
56
  cancelIdleCallback(t);
56
57
  }), e.idle = void 0), clearTimeout(e.timer), e.timer = void 0;
57
58
  }
58
- function vt(e, t) {
59
+ function Ct(e, t) {
59
60
  typeof requestIdleCallback == "function" && typeof cancelIdleCallback == "function" && (t.idle = t.diagnostics.guard("pipeline.crashed", "The idle callback could not be scheduled.", () => requestIdleCallback((n) => {
60
- M(e, t, n);
61
- }, { timeout: s })), t.idle !== void 0) || (t.timer = setTimeout(() => {
62
- M(e, t);
63
- }, 0), Ge(t.timer));
64
- }
65
- function M(e, t, n) {
66
- if (j.get(e) !== t || t.draining) return;
67
- _t(t), t.draining = !0;
61
+ A(e, t, n);
62
+ }, { timeout: o })), t.idle !== void 0) || (t.timer = setTimeout(() => {
63
+ A(e, t);
64
+ }, 0), Xe(t.timer));
65
+ }
66
+ function A(e, t, n) {
67
+ if (k.get(e) !== t || t.draining) return;
68
+ St(t), t.draining = !0;
68
69
  let r = t.work;
69
70
  t.work = [];
70
71
  let i = 0;
71
- for (; i < r.length && (!n || n.didTimeout && i === 0 || n.timeRemaining() > 0);) if (t.diagnostics.guard("pipeline.crashed", "The library could not build a deferred record.", r[i]), i++, j.get(e) !== t) return;
72
- t.work = [...r.slice(i), ...t.work], t.draining = !1, t.work.length > 0 ? vt(e, t) : j.delete(e);
72
+ for (; i < r.length && (!n || n.didTimeout && i === 0 || n.timeRemaining() > 0);) if (t.diagnostics.guard("pipeline.crashed", "The library could not build a deferred record.", r[i]), i++, k.get(e) !== t) return;
73
+ t.work = [...r.slice(i), ...t.work], t.draining = !1, t.work.length > 0 ? Ct(e, t) : k.delete(e);
73
74
  }
74
- function yt(e, t, n, r) {
75
- let i = j.get(e), a = r > 0 ? Math.min(r, f) : f;
76
- if (i && i.work.length >= a && !i.draining && (M(e, i), i = j.get(e)), i) {
75
+ function wt(e, t, n, r) {
76
+ let i = k.get(e), a = r > 0 ? Math.min(r, p) : p;
77
+ if (i && i.work.length >= a && !i.draining && (A(e, i), i = k.get(e)), i) {
77
78
  if (i.work.length >= a) {
78
79
  n.count("record.dropped_by_ceiling");
79
80
  return;
@@ -83,29 +84,29 @@ function yt(e, t, n, r) {
83
84
  work: [t],
84
85
  diagnostics: n,
85
86
  draining: !1
86
- }, j.set(e, i), vt(e, i);
87
+ }, k.set(e, i), Ct(e, i);
87
88
  }
88
- function N(e) {
89
- let t = j.get(e);
90
- t && M(e, t);
89
+ function j(e) {
90
+ let t = k.get(e);
91
+ t && A(e, t);
91
92
  }
92
- function bt(e) {
93
- let t = j.get(e);
93
+ function Tt(e) {
94
+ let t = k.get(e);
94
95
  if (t) {
95
- _t(t), j.delete(e);
96
+ St(t), k.delete(e);
96
97
  for (let e of t.work) t.diagnostics.count("record.dropped_by_ceiling");
97
98
  t.work = [];
98
99
  }
99
100
  }
100
101
  // src/core/logger.ts
101
- var xt = [
102
- _,
103
- Ie,
104
- Oe
102
+ var Et = [
103
+ g,
104
+ u,
105
+ Ae
105
106
  ];
106
- function St(e, t) {
107
+ function Dt(e, t) {
107
108
  let n = t.guard("record.sanitize_failed", "The library could not read the error reason.", () => {
108
- if (!(e instanceof Error) && !Ue(e)) return;
109
+ if (!(e instanceof Error) && !Je(e)) return;
109
110
  let t = Error(e.message);
110
111
  return t.name = e.name, t.stack = e.stack, t;
111
112
  });
@@ -113,38 +114,38 @@ function St(e, t) {
113
114
  let r = t.guard("record.sanitize_failed", "The library could not convert the error reason to text.", () => String(e));
114
115
  return Error(r ?? typeof e);
115
116
  }
116
- function Ct(e, t, n) {
117
+ function Ot(e, t, n) {
117
118
  return n.guard("record.sanitize_failed", "The library could not read the error reason.", () => e instanceof Error ? e : t) ?? t;
118
119
  }
119
- function wt(e, t) {
120
+ function kt(e, t) {
120
121
  if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" || typeof e == "symbol") return e;
121
122
  if (typeof e == "object" && e) return t.guard("record.sanitize_failed", "The library could not read the properties of the error reason.", () => {
122
- let t = e, n = Ue(e), r = {}, i = 0;
123
+ let t = e, n = Je(e), r = {}, i = 0;
123
124
  for (let e of Object.keys(t)) {
124
125
  let a = t[e];
125
- n && We.has(e) || !He(a) || (r[e] = a, i++);
126
+ n && Ye.has(e) || !qe(a) || (r[e] = a, i++);
126
127
  }
127
128
  return i === 0 ? void 0 : r;
128
129
  });
129
130
  }
130
- function Tt(e) {
131
- if (!E(e) || e instanceof Error) return !1;
131
+ function At(e) {
132
+ if (!C(e) || e instanceof Error) return !1;
132
133
  let t = Object.getPrototypeOf(e);
133
134
  return t === null || Object.getPrototypeOf(t) === null;
134
135
  }
135
- function Et(e) {
136
- return xt.some((t) => e === t || e.startsWith(`${t}.`)) ? "system" : "log";
136
+ function jt(e) {
137
+ return Et.some((t) => e === t || e.startsWith(`${t}.`)) ? "system" : "log";
137
138
  }
138
- function P(e, t) {
139
+ function M(e, t) {
139
140
  return e === void 0 ? {} : t.guard("record.sanitize_failed", "The library could not read the payload.", () => ({ ...e })) ?? { "uiobs.sanitize_failed": !0 };
140
141
  }
141
- var F = class e {
142
+ var N = class e {
142
143
  bind;
143
144
  namespace;
144
145
  options;
145
146
  levelType;
146
147
  constructor(e, t, n = {}) {
147
- this.bind = e, this.namespace = t, this.options = n, this.levelType = Et(t);
148
+ this.bind = e, this.namespace = t, this.options = n, this.levelType = jt(t);
148
149
  }
149
150
  child(t, n = {}) {
150
151
  return new e(this.bind, `${this.namespace}.${t}`, { scopedContext: {
@@ -183,7 +184,7 @@ var F = class e {
183
184
  }
184
185
  let a = this.bind();
185
186
  this.submit(a, "INFO", "metric", (o) => {
186
- let s = P(i, a.diagnostics), c = {
187
+ let s = M(i, a.diagnostics), c = {
187
188
  ...s,
188
189
  "metric.name": e,
189
190
  "metric.value": t,
@@ -194,8 +195,8 @@ var F = class e {
194
195
  this.writeNow(a, "INFO", "metric", e, c, !0, o);
195
196
  });
196
197
  };
197
- timeSync = (e, t, n) => ht(this, e, t, n);
198
- timeAsync = (e, t, n) => gt(this, e, t, n);
198
+ timeSync = (e, t, n) => bt(this, e, t, n);
199
+ timeAsync = (e, t, n) => xt(this, e, t, n);
199
200
  write(e, t, n, r) {
200
201
  let i = this.bind();
201
202
  this.submit(i, e, t, (a) => {
@@ -208,13 +209,13 @@ var F = class e {
208
209
  else if (e.config.payloadMode === "defer" && e.config.enabled && !e.config.debugBuffer.enabled && this.namespace !== "uiobs.diagnostics") {
209
210
  if (!e.builder.isEnabled(t, this.namespace, n) && !this.mirrors(e, t)) return;
210
211
  let i = e.journey.current(), a = {
211
- timeUnixNano: Be(),
212
+ timeUnixNano: Ge(),
212
213
  trace: e.tracing.resolve(),
213
214
  journey: i ? { ...i } : null,
214
215
  context: e.context.getAll(),
215
- url: qe(e.diagnostics)
216
+ url: Qe(e.diagnostics)
216
217
  };
217
- yt(e, () => {
218
+ wt(e, () => {
218
219
  r(a);
219
220
  }, e.diagnostics, e.config.buffering.maxPendingRecords);
220
221
  } else r();
@@ -232,7 +233,7 @@ var F = class e {
232
233
  body: r,
233
234
  namespace: this.namespace,
234
235
  scoped: this.options.scopedContext,
235
- payload: a ? i : P(i, e.diagnostics)
236
+ payload: a ? i : M(i, e.diagnostics)
236
237
  }, { record: c, dropped: l } = e.builder.build(s), u = !!e.config.redact || e.config.processors.length > 0, d = n !== "metric" && e.config.capturePolicy.breadcrumbs > 0, f = l === "sampling" && u && d ? e.builder.build(s, !0) : void 0, p = c ?? f?.record ?? null, m = p ? p.body : l === "sampling" && !u ? r : void 0;
237
238
  d && m !== void 0 && e.breadcrumbs.push({
238
239
  t: o ? Number(o.timeUnixNano.slice(0, -6)) : Date.now(),
@@ -249,12 +250,12 @@ var F = class e {
249
250
  writeErrorNow(e, t, n, r, i, a) {
250
251
  let o = e.builder.isEnabled(t, this.namespace);
251
252
  if (!o && !this.mirrors(e, t)) return;
252
- let s = i === void 0 && (e.diagnostics.guard("record.sanitize_failed", "The library could not read the error slot.", () => Tt(r)) ?? !1), c = s ? r : i, l = s ? void 0 : r, u = l === void 0 ? void 0 : St(l, e.diagnostics), d = u === void 0 ? void 0 : Ct(l, u, e.diagnostics);
253
+ let s = i === void 0 && (e.diagnostics.guard("record.sanitize_failed", "The library could not read the error slot.", () => At(r)) ?? !1), c = s ? r : i, l = s ? void 0 : r, u = l === void 0 ? void 0 : Dt(l, e.diagnostics), d = u === void 0 ? void 0 : Ot(l, u, e.diagnostics);
253
254
  if (!o) {
254
255
  this.print(e, t, n, c, d, null, void 0, a);
255
256
  return;
256
257
  }
257
- let f = u ? wt(l, e.diagnostics) : void 0, { record: p, dropped: m } = e.builder.build({
258
+ let f = u ? kt(l, e.diagnostics) : void 0, { record: p, dropped: m } = e.builder.build({
258
259
  snapshot: a,
259
260
  level: t,
260
261
  type: this.levelType,
@@ -262,14 +263,14 @@ var F = class e {
262
263
  namespace: this.namespace,
263
264
  scoped: this.options.scopedContext,
264
265
  payload: {
265
- ...P(c, e.diagnostics),
266
+ ...M(c, e.diagnostics),
266
267
  ...u ? {
267
268
  "error.type": u.name,
268
269
  "error.message": u.message,
269
270
  "error.stack_trace": u.stack
270
271
  } : {},
271
272
  ...f === void 0 ? {} : { [me]: f },
272
- [b]: e.breadcrumbs.snapshot()
273
+ [x]: e.breadcrumbs.snapshot()
273
274
  }
274
275
  });
275
276
  this.print(e, t, n, c, d, p, m, a), e.emit(p);
@@ -292,7 +293,7 @@ var F = class e {
292
293
  namespace: this.namespace,
293
294
  scoped: this.options.scopedContext,
294
295
  payload: {
295
- ...P(r, e.diagnostics),
296
+ ...M(r, e.diagnostics),
296
297
  ...i ? {
297
298
  "error.type": i.name,
298
299
  "error.message": i.message,
@@ -305,33 +306,33 @@ var F = class e {
305
306
  mirrors(e, t) {
306
307
  return e.config.enabled && e.console.accepts(t);
307
308
  }
308
- }, Dt = "overflow", Ot = /* @__PURE__ */ new Set([
309
+ }, Mt = "overflow", Nt = /* @__PURE__ */ new Set([
309
310
  ve,
310
- ye,
311
- ue,
312
- C,
313
- x,
314
- De,
311
+ be,
312
+ fe,
313
+ Le,
314
+ S,
315
+ Oe,
315
316
  Ce
316
317
  ]);
317
- function kt(e = {}) {
318
+ function Pt(e = {}) {
318
319
  let t = {};
319
320
  for (let n of Object.keys(e).sort()) {
320
- if (n.startsWith("metric.") || Ot.has(n)) continue;
321
+ if (n.startsWith("metric.") || Nt.has(n)) continue;
321
322
  let r = e[n];
322
323
  (typeof r == "string" || typeof r == "boolean" || typeof r == "number" && Number.isFinite(r)) && (t[n] = r);
323
324
  }
324
325
  return t;
325
326
  }
326
- function At(e, t) {
327
+ function Ft(e, t) {
327
328
  if (!Array.isArray(e)) return null;
328
329
  let n = t === 0 ? e.length : Math.min(e.length, t + 1);
329
330
  return Array.from({ length: n }, (t, n) => e[n]);
330
331
  }
331
- function jt(e, t) {
332
+ function It(e, t) {
332
333
  return Array.isArray(e) && (t === 0 || e.length <= t) && e.every((t, n) => typeof t == "number" && Number.isFinite(t) && (n === 0 || t > e[n - 1]));
333
334
  }
334
- function Mt(e, t, n) {
335
+ function Lt(e, t, n) {
335
336
  let r = {
336
337
  "metric.name": e.name,
337
338
  "metric.unit": e.unit,
@@ -349,29 +350,42 @@ function Mt(e, t, n) {
349
350
  [y.buckets]: t.buckets
350
351
  };
351
352
  }
352
- function Nt(e, t, n) {
353
- let r = {
353
+ function Rt(e, t) {
354
+ try {
355
+ return {
356
+ unit: e.unit,
357
+ boundaries: e.boundaries
358
+ };
359
+ } catch (e) {
360
+ return t(e), {
361
+ unit: void 0,
362
+ boundaries: void 0
363
+ };
364
+ }
365
+ }
366
+ function zt(e, t, n, r) {
367
+ let i = {
354
368
  name: e,
355
369
  kind: "counter",
356
- unit: t.unit ?? "count",
370
+ unit: Rt(t, r).unit ?? "count",
357
371
  boundaries: []
358
372
  };
359
373
  return { add: (e, t) => {
360
- n(r, e, t);
374
+ n(i, e, t);
361
375
  } };
362
376
  }
363
- function Pt(e, t, n) {
364
- let r = {
377
+ function Bt(e, t, n, r) {
378
+ let { unit: i, boundaries: a } = Rt(t, r), o = {
365
379
  name: e,
366
380
  kind: "histogram",
367
- unit: t.unit ?? "count",
368
- boundaries: t.boundaries ?? g
381
+ unit: i ?? "count",
382
+ boundaries: a ?? v
369
383
  };
370
384
  return { record: (e, t) => {
371
- n(r, e, t);
385
+ n(o, e, t);
372
386
  } };
373
387
  }
374
- var Ft = class {
388
+ var Vt = class {
375
389
  intervalMs;
376
390
  emit;
377
391
  diagnostics;
@@ -389,25 +403,25 @@ var Ft = class {
389
403
  record(e, t, n) {
390
404
  !Number.isFinite(t) || e.kind === "counter" && t < 0 ? this.diagnostics.report("record.dropped_malformed", `The value of the metric ${e.name} is not valid. The library dropped it.`, { "metric.name": e.name }) : this.diagnostics.guard("record.sanitize_failed", `The library could not read the attributes of the metric ${e.name}.`, () => {
391
405
  let r = this.instrumentOf(e);
392
- r && (this.add(r, t, kt(n)), this.arm());
406
+ r && (this.add(r, t, Pt(n)), this.arm());
393
407
  });
394
408
  }
395
409
  collect() {
396
410
  this.timer !== null && (clearTimeout(this.timer), this.timer = null);
397
411
  let e = `${String(this.startedAt)}000000`, t = [...this.instruments.values()];
398
412
  this.instruments.clear();
399
- for (let { def: n, series: r } of t) for (let t of r.values()) this.emit(n.name, t.attributes, Mt(n, t, e));
413
+ for (let { def: n, series: r } of t) for (let t of r.values()) this.emit(n.name, t.attributes, Lt(n, t, e));
400
414
  }
401
415
  instrumentOf(e) {
402
416
  let t = this.instruments.get(e.name);
403
417
  if (t) return t.def.kind === e.kind ? t : (this.diagnostics.report("record.dropped_malformed", `The metric ${e.name} is a counter and a histogram. The library dropped the value.`, { "metric.name": e.name }), null);
404
418
  if (this.policy.maxInstruments && this.instruments.size >= this.policy.maxInstruments) return this.diagnostics.count("record.dropped_by_ceiling"), null;
405
- let n = At(e.boundaries, this.policy.maxHistogramBoundaries), r = jt(n, this.policy.maxHistogramBoundaries);
419
+ let n = Ft(e.boundaries, this.policy.maxHistogramBoundaries), r = It(n, this.policy.maxHistogramBoundaries);
406
420
  e.kind === "histogram" && !r && this.diagnostics.report("config.invalid", `The boundaries of the metric ${e.name} must meet metrics.maxHistogramBoundaries and contain finite numbers in ascending order. The library uses the default boundaries.`);
407
421
  let i = {
408
422
  def: {
409
423
  ...e,
410
- boundaries: r ? n : [...g]
424
+ boundaries: r ? n : [...v]
411
425
  },
412
426
  series: /* @__PURE__ */ new Map()
413
427
  };
@@ -415,7 +429,7 @@ var Ft = class {
415
429
  }
416
430
  add(e, t, n) {
417
431
  let r = JSON.stringify(n), i = e.series.get(r), a = n;
418
- if (!i && this.policy.maxSeries > 0 && e.series.size >= this.policy.maxSeries && (r = Dt, i = e.series.get(r), a = { [le]: !0 }), !i) {
432
+ if (!i && this.policy.maxSeries > 0 && e.series.size >= this.policy.maxSeries && (r = Mt, i = e.series.get(r), a = { [le]: !0 }), !i) {
419
433
  let n = e.def.kind === "histogram" ? e.def.boundaries.length + 1 : 0, o = Array(n).fill(0);
420
434
  i = {
421
435
  attributes: a,
@@ -434,81 +448,81 @@ var Ft = class {
434
448
  arm() {
435
449
  this.timer === null && (this.startedAt = Date.now(), this.timer = setTimeout(() => {
436
450
  this.collect();
437
- }, this.intervalMs()), Ge(this.timer));
451
+ }, this.intervalMs()), Xe(this.timer));
438
452
  }
439
- }, It = {
453
+ }, Ht = {
440
454
  TRACE: "debug",
441
455
  DEBUG: "debug",
442
456
  INFO: "info",
443
457
  WARN: "warn",
444
458
  ERROR: "error",
445
459
  FATAL: "error"
446
- }, Lt = class {
460
+ }, Ut = class {
447
461
  settings;
448
462
  diagnostics;
449
463
  limits;
450
- constructor(e, t, n = p) {
464
+ constructor(e, t, n = Ne) {
451
465
  this.settings = e, this.diagnostics = t, this.limits = n;
452
466
  }
453
467
  update(e) {
454
468
  this.settings = e;
455
469
  }
456
470
  accepts(e) {
457
- return this.settings.level === null || !Object.hasOwn(w, this.settings.level) ? !1 : w[e] >= w[this.settings.level];
471
+ return this.settings.level === null || !Object.hasOwn(b, this.settings.level) ? !1 : b[e] >= b[this.settings.level];
458
472
  }
459
473
  write(e, t, n, r, i) {
460
- if (!this.accepts(t) || typeof console > "u" || Je()) return;
461
- let a = `%c[%s]%c[${t}]%c`, { styles: o } = this.settings, s = It[t];
474
+ if (!this.accepts(t) || typeof console > "u" || $e()) return;
475
+ let a = `%c[%s]%c[${t}]%c`, { styles: o } = this.settings, s = Ht[t];
462
476
  this.diagnostics.guard("handler.threw", `The library could not print to console.${s}.`, () => {
463
477
  let c = [];
464
- i !== void 0 && c.push(i), r !== void 0 && c.push(Xe(r, this.limits, this.diagnostics)), O(() => {
478
+ i !== void 0 && c.push(i), r !== void 0 && c.push(tt(r, this.limits, this.diagnostics)), E(() => {
465
479
  console[s](a, o.namespace, e, o[t], "", n, ...c);
466
480
  });
467
481
  });
468
482
  }
469
- }, Rt = class {
483
+ }, Wt = class {
470
484
  value = 0;
471
485
  next() {
472
486
  return ++this.value;
473
487
  }
474
- }, zt = /^[0-9a-f]{32}$/, Bt = /^[0-9a-f]{16}$/, Vt = /[1-9a-f]/;
475
- function Ht(e) {
476
- return zt.test(e.traceId) && Vt.test(e.traceId) && Bt.test(e.spanId) && Vt.test(e.spanId);
488
+ }, Gt = /^[0-9a-f]{32}$/, Kt = /^[0-9a-f]{16}$/, qt = /[1-9a-f]/;
489
+ function Jt(e) {
490
+ return Gt.test(e.traceId) && qt.test(e.traceId) && Kt.test(e.spanId) && qt.test(e.spanId);
477
491
  }
478
- function Ut() {
479
- return $e(16);
492
+ function Yt() {
493
+ return it(16);
480
494
  }
481
- function Wt() {
482
- return $e(8);
495
+ function Xt() {
496
+ return it(8);
483
497
  }
484
- function Gt(e) {
498
+ function Zt(e) {
485
499
  return {
486
- traceId: Ut(),
487
- spanId: Wt(),
500
+ traceId: Yt(),
501
+ spanId: Xt(),
488
502
  traceFlags: 1,
489
503
  startedAt: Date.now(),
490
504
  reason: e,
491
505
  ended: !1
492
506
  };
493
507
  }
494
- function Kt(e, t, n) {
508
+ function Qt(e, t, n) {
495
509
  return `00-${e}-${t}-${(n & 255).toString(16).padStart(2, "0")}`;
496
510
  }
497
- function qt(e) {
511
+ function $t(e) {
498
512
  return {
499
513
  traceId: e.traceId,
500
514
  spanId: e.spanId,
501
515
  traceFlags: e.traceFlags
502
516
  };
503
517
  }
504
- var Jt = class {
518
+ var en = class {
505
519
  diagnostics;
506
520
  maxAgeMs;
507
521
  load;
508
522
  spans;
509
- ambient = Gt("start");
523
+ ambient = Zt("start");
510
524
  otel;
511
- constructor(e, t = o, n, r) {
525
+ constructor(e, t = je, n, r) {
512
526
  this.diagnostics = e, this.maxAgeMs = t, this.load = n, this.spans = r;
513
527
  }
514
528
  async loadOtel() {
@@ -522,7 +536,7 @@ var Jt = class {
522
536
  return this.activeSpanContext() ?? this.ambientContext();
523
537
  }
524
538
  ambientContext() {
525
- return Date.now() - this.ambient.startedAt > this.maxAgeMs && this.rotate("maxAge"), qt(this.ambient);
539
+ return Date.now() - this.ambient.startedAt > this.maxAgeMs && this.rotate("maxAge"), $t(this.ambient);
526
540
  }
527
541
  activeSpanContext() {
528
542
  let e = this.otel;
@@ -530,7 +544,7 @@ var Jt = class {
530
544
  let t = e.trace.getActiveSpan();
531
545
  if (t === void 0) return;
532
546
  let n = t.spanContext();
533
- if (Ht(n)) return {
547
+ if (Jt(n)) return {
534
548
  traceId: n.traceId,
535
549
  spanId: n.spanId,
536
550
  traceFlags: n.traceFlags
@@ -539,8 +553,8 @@ var Jt = class {
539
553
  }
540
554
  rotate(e) {
541
555
  let t = this.ambient;
542
- this.ambient = Gt(e);
543
- let n = qt(this.ambient);
556
+ this.ambient = Zt(e);
557
+ let n = $t(this.ambient);
544
558
  return this.finish(t), n;
545
559
  }
546
560
  end() {
@@ -567,9 +581,9 @@ var Jt = class {
567
581
  n.propagation.inject(n.context.active(), t);
568
582
  }), t.traceparent) return { headers: t };
569
583
  let r = this.activeSpanContext(), i = r ?? this.ambientContext(), a = r ? void 0 : this.spans;
570
- if (!a?.enabled()) return t[ee] = Kt(i.traceId, i.spanId, i.traceFlags), { headers: t };
571
- let o = a.keeps(i.traceId), s = o ? i.traceFlags : i.traceFlags & -2, c = e ? Wt() : i.spanId;
572
- return t[ee] = Kt(i.traceId, c, s), !e || !o ? { headers: t } : {
584
+ if (!a?.enabled()) return t[m] = Qt(i.traceId, i.spanId, i.traceFlags), { headers: t };
585
+ let o = a.keeps(i.traceId), s = o ? i.traceFlags : i.traceFlags & -2, c = e ? Xt() : i.spanId;
586
+ return t[m] = Qt(i.traceId, c, s), !e || !o ? { headers: t } : {
573
587
  headers: t,
574
588
  span: {
575
589
  traceId: i.traceId,
@@ -578,7 +592,7 @@ var Jt = class {
578
592
  }
579
593
  };
580
594
  }
581
- }, Yt = class {
595
+ }, tn = class {
582
596
  buffer;
583
597
  pointer = 0;
584
598
  filled = !1;
@@ -599,45 +613,45 @@ var Jt = class {
599
613
  snapshot() {
600
614
  return (this.filled ? [...this.buffer.slice(this.pointer), ...this.buffer.slice(0, this.pointer)] : this.buffer.slice(0, this.pointer)).filter((e) => e !== void 0);
601
615
  }
602
- }, Xt = Object.keys(w), Zt = ["gzip", "none"], Qt = [
616
+ }, nn = Object.keys(b), rn = ["gzip", "none"], an = [
603
617
  "omit",
604
618
  "same-origin",
605
619
  "include"
606
- ], $t = [
620
+ ], on = [
607
621
  "auto",
608
622
  "indexeddb",
609
623
  "localstorage",
610
624
  "memory",
611
625
  "none"
612
- ], en = ["storage", "memory"], tn = [
626
+ ], sn = ["storage", "memory"], cn = [
613
627
  "auto",
614
628
  "sender",
615
629
  "forwarder",
616
630
  "off"
617
- ], nn = [
631
+ ], ln = [
618
632
  "auto",
619
633
  "provider",
620
634
  "client"
621
- ], rn = [
635
+ ], un = [
622
636
  "auto",
623
637
  "context",
624
638
  "tab",
625
639
  "origin"
626
- ], an = [
640
+ ], dn = [
627
641
  "error",
628
642
  "warn",
629
643
  "info",
630
644
  "log"
631
- ], on = ["limited", "until-delivered"], sn = {
645
+ ], fn = ["limited", "until-delivered"], pn = {
632
646
  logFlushIntervalMs: [100, 6e4],
633
647
  logBatchSize: [1, 1e3],
634
648
  metricFlushIntervalMs: [100, 6e4],
635
649
  metricBatchSize: [1, 1e3]
636
- }, cn = {
650
+ }, mn = {
637
651
  maxBatches: [1, 5e3],
638
652
  maxAgeMs: [6e4, 6048e5],
639
653
  maxAttempts: [1, 20]
640
- }, ln = {
654
+ }, hn = {
641
655
  maxBodyChars: [256, 65536],
642
656
  maxAttributeChars: [256, 65536],
643
657
  maxAttributeCount: [1, 1024],
@@ -645,42 +659,46 @@ var Jt = class {
645
659
  maxDepth: [1, 16],
646
660
  maxArrayLength: [1, 1e4],
647
661
  maxNodes: [100, 1e5],
648
- maxRecordBytes: [1024, r]
649
- }, un = [6e4, 864e5], I = [0, 2147483647], L = [0, 2 ** 53 - 1], dn = [1, 2 ** 53 - 1], fn = [100, 1e4], pn = {
662
+ maxRecordBytes: [1024, t]
663
+ }, gn = [6e4, 864e5], P = [0, 2147483647], F = [0, 2 ** 53 - 1], _n = [1, 2 ** 53 - 1], vn = [100, 1e4], yn = (e) => Array.isArray(e) && e.every((e) => typeof e == "string"), bn = (e) => Array.isArray(e) && e.every((e) => typeof e == "function"), xn = (e) => e === null || typeof e == "function", Sn = (e) => xn(e) || Cn(e) && Object.values(e).every((e) => typeof e == "string"), Cn = (e) => typeof e == "object" && !!e && !Array.isArray(e);
664
+ function I(e, t) {
665
+ return (n, r, i, a) => r === void 0 ? i : e(r) ? r : (R(a, n, t, r, "the current value"), i);
666
+ }
667
+ var wn = {
650
668
  capturePolicy: { ranges: {
651
669
  breadcrumbs: [0, 1e6],
652
- errorDedupeMs: I,
653
- maxErrorSignatures: L,
654
- errorsPerWindow: L,
655
- consolePerWindow: L,
656
- longFramesPerWindow: L,
657
- webSocketPerWindow: L,
658
- reportsPerWindow: L,
659
- resourcesPerWindow: L,
660
- lifecyclePerWindow: L,
661
- windowMs: I,
662
- errorCeiling: L
670
+ errorDedupeMs: P,
671
+ maxErrorSignatures: F,
672
+ errorsPerWindow: F,
673
+ consolePerWindow: F,
674
+ longFramesPerWindow: F,
675
+ webSocketPerWindow: F,
676
+ reportsPerWindow: F,
677
+ resourcesPerWindow: F,
678
+ lifecyclePerWindow: F,
679
+ windowMs: P,
680
+ errorCeiling: F
663
681
  } },
664
682
  metadata: { ranges: {} },
665
683
  persistence: { ranges: {} },
666
684
  diagnostics: {
667
- ranges: { throttleMs: I },
668
- custom: { records: jn }
685
+ ranges: { throttleMs: P },
686
+ custom: { records: Hn }
669
687
  },
670
688
  correlation: { ranges: {
671
- sessionIdleMs: I,
672
- sessionTouchMs: I,
673
- traceMaxAgeMs: I
689
+ sessionIdleMs: P,
690
+ sessionTouchMs: P,
691
+ traceMaxAgeMs: P
674
692
  } },
675
693
  metrics: { ranges: {
676
- maxSeries: L,
677
- maxInstruments: L,
678
- maxHistogramBoundaries: L
694
+ maxSeries: F,
695
+ maxInstruments: F,
696
+ maxHistogramBoundaries: F
679
697
  } },
680
698
  buffering: {
681
699
  ranges: {
682
- maxPendingRecords: L,
683
- maxPendingBytes: L
700
+ maxPendingRecords: F,
701
+ maxPendingBytes: F
684
702
  },
685
703
  choices: { overflow: [
686
704
  "drop-oldest",
@@ -690,12 +708,12 @@ var Jt = class {
690
708
  },
691
709
  delivery: {
692
710
  ranges: {
693
- requestTimeoutMs: [1, I[1]],
694
- maxConcurrentRequests: dn,
695
- retryBaseDelayMs: I,
696
- retryMaxDelayMs: I,
697
- retryIdleDelayMs: I,
698
- batchesPerDrain: dn
711
+ requestTimeoutMs: [1, P[1]],
712
+ maxConcurrentRequests: _n,
713
+ retryBaseDelayMs: P,
714
+ retryMaxDelayMs: P,
715
+ retryIdleDelayMs: P,
716
+ batchesPerDrain: _n
699
717
  },
700
718
  choices: { priority: [
701
719
  "low",
@@ -705,9 +723,36 @@ var Jt = class {
705
723
  },
706
724
  debugBuffer: { ranges: {
707
725
  maxRecords: [1, 1e4],
708
- maxAgeMs: I
709
- } }
710
- }, mn = [
726
+ maxAgeMs: P
727
+ } },
728
+ profiler: { ranges: {
729
+ flushIntervalMs: [1e3, 6e5],
730
+ maxProbes: [1, c]
731
+ } },
732
+ replay: {
733
+ ranges: {
734
+ bufferMs: [5e3, 6e5],
735
+ maxBufferBytes: [1e5, 2e8],
736
+ afterErrorMs: [0, 6e5],
737
+ uploadsPerWindow: F,
738
+ batchSize: [1, 1e4],
739
+ batchBytes: [1e4, 1e7],
740
+ flushIntervalMs: [100, 6e4],
741
+ maxQueueBytes: [1e5, 2e8],
742
+ maxAttempts: [1, 10]
743
+ },
744
+ choices: { mode: ["onError"] },
745
+ custom: {
746
+ maskSelectors: I(yn, "a list of strings"),
747
+ blockSelectors: I(yn, "a list of strings"),
748
+ loader: I(xn, "a function or null"),
749
+ onSegment: I(xn, "a function or null"),
750
+ headers: I(Sn, "an object of strings, a function or null"),
751
+ plugins: I(bn, "a list of functions"),
752
+ recordOptions: I(Cn, "an object")
753
+ }
754
+ }
755
+ }, Tn = [
711
756
  "errors",
712
757
  "rejections",
713
758
  "resourceErrors",
@@ -724,123 +769,123 @@ var Jt = class {
724
769
  "serverTiming",
725
770
  "reports",
726
771
  "lifecycle"
727
- ], hn = "null", R = `a level name: ${Sn(Xt)}`, gn = `true, false or a list of ${Sn(an)}`, _n = "a list of strings and RegExp patterns", vn = "a list of origin URLs such as \"https://api.example\" and RegExp patterns", yn = "a list of origin URLs such as \"https://app.example\". For a sandboxed frame, set bus.mode: \"sender\" in the frame", bn = "a list of strings", xn = "true, false or a list of diagnostic codes";
728
- function Sn(e) {
772
+ ], En = "null", L = `a level name: ${Nn(nn)}`, Dn = `true, false or a list of ${Nn(dn)}`, On = "a list of strings and RegExp patterns", kn = "a list of origin URLs such as \"https://api.example\" and RegExp patterns", An = "a list of origin URLs such as \"https://app.example\". For a sandboxed frame, set bus.mode: \"sender\" in the frame", jn = "a list of strings", Mn = "true, false or a list of diagnostic codes";
773
+ function Nn(e) {
729
774
  let t = e.map((e) => `"${e}"`);
730
775
  return `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
731
776
  }
732
- function Cn(e) {
777
+ function Pn(e) {
733
778
  return typeof e == "string" ? `"${e}"` : typeof e == "function" ? "a function" : typeof e == "object" && e ? "an object" : String(e);
734
779
  }
735
- function z(e, t, n, r, i) {
736
- e.report("config.invalid", `${t} must be ${n}. The value is ${Cn(r)}. The library keeps ${i}.`);
780
+ function R(e, t, n, r, i) {
781
+ e.report("config.invalid", `${t} must be ${n}. The value is ${Pn(r)}. The library keeps ${i}.`);
737
782
  }
738
- function B(e, t, n, r, i) {
783
+ function z(e, t, n, r, i) {
739
784
  if (t === void 0) return r;
740
785
  let a = n.find((e) => e === t);
741
- return a === void 0 ? (z(i, e, Sn(n), t, `"${r}"`), r) : a;
786
+ return a === void 0 ? (R(i, e, Nn(n), t, `"${r}"`), r) : a;
742
787
  }
743
- function V(e, t, n, r) {
744
- return t === void 0 ? n : typeof t == "boolean" ? t : (z(r, e, "true or false", t, String(n)), n);
788
+ function B(e, t, n, r) {
789
+ return t === void 0 ? n : typeof t == "boolean" ? t : (R(r, e, "true or false", t, String(n)), n);
745
790
  }
746
- function wn(e, t, n, r) {
747
- return t === void 0 ? n : typeof t == "number" && Number.isFinite(t) && t >= 0 ? t : (z(r, e, "a finite number of 0 or more", t, String(n)), n);
791
+ function Fn(e, t, n, r) {
792
+ return t === void 0 ? n : typeof t == "number" && Number.isFinite(t) && t >= 0 ? t : (R(r, e, "a finite number of 0 or more", t, String(n)), n);
748
793
  }
749
- function H(e, t, n, r, i) {
794
+ function V(e, t, n, r, i) {
750
795
  if (t === void 0) return r;
751
796
  let [a, o] = n;
752
- return typeof t == "number" && Number.isInteger(t) && t >= a && t <= o ? t : (z(i, e, `an integer from ${String(a)} to ${String(o)}`, t, String(r)), r);
797
+ return typeof t == "number" && Number.isInteger(t) && t >= a && t <= o ? t : (R(i, e, `an integer from ${String(a)} to ${String(o)}`, t, String(r)), r);
753
798
  }
754
- function Tn(e, t, n) {
755
- return e === void 0 ? t : e === null ? null : typeof e == "number" && Number.isSafeInteger(e) && e >= 0 ? e : (z(n, "loggerCache.maxEntries", "a nonnegative safe integer or null", e, String(t)), t);
799
+ function In(e, t, n) {
800
+ return e === void 0 ? t : e === null ? null : typeof e == "number" && Number.isSafeInteger(e) && e >= 0 ? e : (R(n, "loggerCache.maxEntries", "a nonnegative safe integer or null", e, String(t)), t);
756
801
  }
757
- function En(e, t, n, r, i) {
802
+ function Ln(e, t, n, r, i) {
758
803
  let a = t ?? {}, o = Object.keys(r);
759
- return Object.fromEntries(o.map((t) => [t, H(`${e}.${t}`, a[t], r[t], n[t], i)]));
804
+ return Object.fromEntries(o.map((t) => [t, V(`${e}.${t}`, a[t], r[t], n[t], i)]));
760
805
  }
761
- function U(e) {
806
+ function H(e) {
762
807
  if (typeof e != "string") return;
763
808
  let t = e.toUpperCase();
764
- return Xt.find((e) => e === t);
809
+ return nn.find((e) => e === t);
765
810
  }
766
- function Dn(e, t, n, r) {
811
+ function Rn(e, t, n, r) {
767
812
  if (t === void 0) return n;
768
- let i = U(t);
769
- return i === void 0 ? (z(r, e, R, t, `"${n}"`), n) : i;
813
+ let i = H(t);
814
+ return i === void 0 ? (R(r, e, L, t, `"${n}"`), n) : i;
770
815
  }
771
- function On(e, t, n) {
816
+ function zn(e, t, n) {
772
817
  if (e === void 0) return t;
773
- if (!E(e)) return z(n, "minLevels", "an object of level names", e, "the value in force"), t;
818
+ if (!C(e)) return R(n, "minLevels", "an object of level names", e, "the current value"), t;
774
819
  let r = [];
775
820
  for (let [t, i] of Object.entries(e)) {
776
- let e = U(i);
777
- t !== "" && e !== void 0 ? r.push([t, e]) : z(n, `minLevels["${t}"]`, R, i, "minLevel for it");
821
+ let e = H(i);
822
+ t !== "" && e !== void 0 ? r.push([t, e]) : R(n, `minLevels["${t}"]`, L, i, "minLevel for it");
778
823
  }
779
824
  return Object.fromEntries(r);
780
825
  }
781
- function W(e, t, n, r, i, a) {
826
+ function U(e, t, n, r, i, a) {
782
827
  if (t === void 0) return n;
783
- if (!Array.isArray(t)) return z(a, e, r, t, "the list in force"), n;
828
+ if (!Array.isArray(t)) return R(a, e, r, t, "the current list"), n;
784
829
  let o = [], s = t;
785
830
  for (let t of s) {
786
831
  let n = i(t);
787
- n === void 0 ? a.report("config.invalid", `The library ignores the ${e} entry ${Cn(t)}. ${e} must be ${r}.`) : o.push(n);
832
+ n === void 0 ? a.report("config.invalid", `The library ignores the ${e} entry ${Pn(t)}. ${e} must be ${r}.`) : o.push(n);
788
833
  }
789
834
  return o;
790
835
  }
791
- function kn(e) {
836
+ function Bn(e) {
792
837
  return typeof e == "function" ? e : void 0;
793
838
  }
794
- function An(e) {
795
- return E(e) && typeof e.name == "string" && e.name !== "" && typeof e.install == "function" && typeof e.uninstall == "function" ? e : void 0;
839
+ function Vn(e) {
840
+ return C(e) && typeof e.name == "string" && e.name !== "" && typeof e.install == "function" && typeof e.uninstall == "function" ? e : void 0;
796
841
  }
797
- function jn(e, t, n, r) {
798
- return t === void 0 || typeof t == "boolean" ? t ?? n : Array.isArray(t) ? W(e, t, [], xn, Mn, r) : (z(r, e, xn, t, "the value in force"), n);
842
+ function Hn(e, t, n, r) {
843
+ return t === void 0 || typeof t == "boolean" ? t ?? n : Array.isArray(t) ? U(e, t, [], Mn, Un, r) : (R(r, e, Mn, t, "the current value"), n);
799
844
  }
800
- function Mn(e) {
845
+ function Un(e) {
801
846
  return typeof e == "string" ? e : void 0;
802
847
  }
803
- function Nn(e) {
848
+ function Wn(e) {
804
849
  return typeof e == "string" || e instanceof RegExp ? e : void 0;
805
850
  }
806
- function Pn(e) {
807
- return an.find((t) => t === e);
851
+ function Gn(e) {
852
+ return dn.find((t) => t === e);
808
853
  }
809
- function Fn(e) {
854
+ function Kn(e) {
810
855
  if (typeof e == "string") try {
811
856
  let { origin: t } = new URL(e);
812
- return t === hn ? void 0 : t;
857
+ return t === En ? void 0 : t;
813
858
  } catch {
814
859
  return;
815
860
  }
816
861
  }
817
- function In(e) {
818
- return e instanceof RegExp ? e : Fn(e);
862
+ function qn(e) {
863
+ return e instanceof RegExp ? e : Kn(e);
819
864
  }
820
- function Ln(e) {
821
- return E(e) ? Object.values(e).every((e) => typeof e == "string") : !1;
865
+ function Jn(e) {
866
+ return C(e) ? Object.values(e).every((e) => typeof e == "string") : !1;
822
867
  }
823
- function Rn(e, t, n) {
824
- if (e !== void 0) return typeof e == "function" || Ln(e) ? e : (n.report("config.invalid", "headers must be an object of strings or a function. The library keeps the headers in force."), t);
868
+ function Yn(e, t, n) {
869
+ if (e !== void 0) return typeof e == "function" || Jn(e) ? e : (n.report("config.invalid", "headers must be an object of strings or a function. The library keeps the current headers."), t);
825
870
  }
826
- function zn(e) {
871
+ function Xn(e) {
827
872
  return typeof e != "object" || !e ? !1 : typeof Reflect.get(e, "serialize") == "function";
828
873
  }
829
- function Bn(e, t, n) {
830
- return e === void 0 ? t ?? "otlp" : e === "otlp" || e === "ecs" || zn(e) ? e : (n.report("config.invalid", `serializer must be "${S}", "ecs" or an implementation. The library uses "${S}".`), S);
874
+ function Zn(e, t, n) {
875
+ return e === void 0 ? t ?? "otlp" : e === "otlp" || e === "ecs" || Xn(e) ? e : (n.report("config.invalid", `serializer must be "${r}", "ecs" or an implementation. The library uses "${r}".`), r);
831
876
  }
832
- var Vn = new Set(Object.keys(m));
833
- function Hn(e, t) {
877
+ var Qn = new Set(Object.keys(h));
878
+ function $n(e, t) {
834
879
  let n = {}, r = Object.entries(e ?? {});
835
- for (let [e, i] of r) Vn.has(e) ? typeof i == "string" ? n[e] = i : t.report("config.invalid", `console.styles.${e} must be a string. The library keeps the style in force.`) : t.report("config.invalid", `The library ignores the unknown console.styles key "${e}". Check the spelling.`);
880
+ for (let [e, i] of r) Qn.has(e) ? typeof i == "string" ? n[e] = i : t.report("config.invalid", `console.styles.${e} must be a string. The library keeps the current style.`) : t.report("config.invalid", `The library ignores the unknown console.styles key "${e}". Check the spelling.`);
836
881
  return n;
837
882
  }
838
- function Un(e, t, n) {
883
+ function er(e, t, n) {
839
884
  if (e === void 0) return t ?? "DEBUG";
840
- let r = U(e);
841
- return r === void 0 ? (z(n, "console.level", R, e, "the console level in force"), t) : r;
885
+ let r = H(e);
886
+ return r === void 0 ? (R(n, "console.level", L, e, "the current console level"), t) : r;
842
887
  }
843
- function Wn(e, t, n) {
888
+ function tr(e, t, n) {
844
889
  if (e === void 0) return t;
845
890
  if (e === !1) return {
846
891
  level: null,
@@ -851,21 +896,21 @@ function Wn(e, t, n) {
851
896
  styles: t.styles
852
897
  };
853
898
  if (typeof e == "string") {
854
- let r = U(e);
855
- return r === void 0 ? (z(n, "console", R, e, "the console level in force"), t) : {
899
+ let r = H(e);
900
+ return r === void 0 ? (R(n, "console", L, e, "the current console level"), t) : {
856
901
  level: r,
857
902
  styles: t.styles
858
903
  };
859
904
  }
860
- return typeof e != "object" || !e ? (n.report("config.invalid", "console must be a boolean, a level or an object. The console settings in force stay."), t) : {
861
- level: Un(e.level, t.level, n),
905
+ return typeof e != "object" || !e ? (n.report("config.invalid", "console must be a boolean, a level or an object. The current console settings stay."), t) : {
906
+ level: er(e.level, t.level, n),
862
907
  styles: {
863
908
  ...t.styles,
864
- ...Hn(e.styles, n)
909
+ ...$n(e.styles, n)
865
910
  }
866
911
  };
867
912
  }
868
- function Gn(e, t, n) {
913
+ function nr(e, t, n) {
869
914
  let r = e ?? {};
870
915
  return {
871
916
  ...t,
@@ -874,66 +919,66 @@ function Gn(e, t, n) {
874
919
  ...t.rates,
875
920
  ...r.rates
876
921
  },
877
- alwaysSampleTypes: W("sampling.alwaysSampleTypes", r.alwaysSampleTypes, t.alwaysSampleTypes, bn, Mn, n),
878
- alwaysSampleFrom: Dn("sampling.alwaysSampleFrom", r.alwaysSampleFrom, t.alwaysSampleFrom, n),
879
- remote: V("sampling.remote", r.remote, t.remote, n)
922
+ alwaysSampleTypes: U("sampling.alwaysSampleTypes", r.alwaysSampleTypes, t.alwaysSampleTypes, jn, Un, n),
923
+ alwaysSampleFrom: Rn("sampling.alwaysSampleFrom", r.alwaysSampleFrom, t.alwaysSampleFrom, n),
924
+ remote: B("sampling.remote", r.remote, t.remote, n)
880
925
  };
881
926
  }
882
- function Kn(e, t, n) {
927
+ function rr(e, t, n) {
883
928
  let r = e ?? {};
884
929
  return {
885
- maxTrackedSources: H("bus.maxTrackedSources", r.maxTrackedSources, [0, 2 ** 53 - 1], t.maxTrackedSources, n),
886
- sourcePolicy: B("bus.sourcePolicy", r.sourcePolicy, ["registered", "trusted-origin"], t.sourcePolicy, n),
887
- validation: B("bus.validation", r.validation, ["strict", "envelope"], t.validation, n),
888
- maxMessageBytes: H("bus.maxMessageBytes", r.maxMessageBytes, [0, 2 ** 53 - 1], t.maxMessageBytes, n),
889
- maxRecordsPerMessage: H("bus.maxRecordsPerMessage", r.maxRecordsPerMessage, [0, 2 ** 53 - 1], t.maxRecordsPerMessage, n),
890
- maxMessagesPerSecond: H("bus.maxMessagesPerSecond", r.maxMessagesPerSecond, [0, 2 ** 53 - 1], t.maxMessagesPerSecond, n),
891
- mode: B("bus.mode", r.mode, tn, t.mode, n),
892
- trustedOrigins: W("bus.trustedOrigins", r.trustedOrigins, t.trustedOrigins, yn, Fn, n),
893
- openFinRole: B("bus.openFinRole", r.openFinRole, nn, t.openFinRole, n)
930
+ maxTrackedSources: V("bus.maxTrackedSources", r.maxTrackedSources, [0, 2 ** 53 - 1], t.maxTrackedSources, n),
931
+ sourcePolicy: z("bus.sourcePolicy", r.sourcePolicy, ["registered", "trusted-origin"], t.sourcePolicy, n),
932
+ validation: z("bus.validation", r.validation, ["strict", "envelope"], t.validation, n),
933
+ maxMessageBytes: V("bus.maxMessageBytes", r.maxMessageBytes, [0, 2 ** 53 - 1], t.maxMessageBytes, n),
934
+ maxRecordsPerMessage: V("bus.maxRecordsPerMessage", r.maxRecordsPerMessage, [0, 2 ** 53 - 1], t.maxRecordsPerMessage, n),
935
+ maxMessagesPerSecond: V("bus.maxMessagesPerSecond", r.maxMessagesPerSecond, [0, 2 ** 53 - 1], t.maxMessagesPerSecond, n),
936
+ mode: z("bus.mode", r.mode, cn, t.mode, n),
937
+ trustedOrigins: U("bus.trustedOrigins", r.trustedOrigins, t.trustedOrigins, An, Kn, n),
938
+ openFinRole: z("bus.openFinRole", r.openFinRole, ln, t.openFinRole, n)
894
939
  };
895
940
  }
896
- function qn(e, t, n) {
941
+ function ir(e, t, n) {
897
942
  let r = e ?? {};
898
943
  return {
899
- scope: B("journey.scope", r.scope, rn, t.scope, n),
900
- maxAgeMs: H("journey.maxAgeMs", r.maxAgeMs, un, t.maxAgeMs, n)
944
+ scope: z("journey.scope", r.scope, un, t.scope, n),
945
+ maxAgeMs: V("journey.maxAgeMs", r.maxAgeMs, gn, t.maxAgeMs, n)
901
946
  };
902
947
  }
903
- function Jn(e, t, n) {
948
+ function ar(e, t, n) {
904
949
  let r = e ?? {};
905
950
  return {
906
- mode: B("retention.mode", r.mode, on, t.mode, n),
907
- ...En("retention", r, t, cn, n)
951
+ mode: z("retention.mode", r.mode, fn, t.mode, n),
952
+ ...Ln("retention", r, t, mn, n)
908
953
  };
909
954
  }
910
- function Yn(e, t, n) {
911
- return e === void 0 ? t : typeof e == "boolean" ? e : Array.isArray(e) ? W("capture.console", e, [], gn, Pn, n) : (z(n, "capture.console", gn, e, "the value in force"), t);
955
+ function or(e, t, n) {
956
+ return e === void 0 ? t : typeof e == "boolean" ? e : Array.isArray(e) ? U("capture.console", e, [], Dn, Gn, n) : (R(n, "capture.console", Dn, e, "the current value"), t);
912
957
  }
913
- function Xn(e, t, n) {
958
+ function sr(e, t, n) {
914
959
  let r = e ?? {}, i = {
915
960
  ...t,
916
961
  ...r,
917
- remoteToggles: W("capture.remoteToggles", r.remoteToggles, t.remoteToggles, "a list of capture switch names without privacy controls", (e) => ke.find((t) => t === e), n),
918
- resourceTiming: Zn(r.resourceTiming, t.resourceTiming, n),
919
- interactions: Qn(r.interactions, t.interactions, n),
920
- console: Yn(r.console, t.console, n),
921
- longFrameThresholdMs: wn("capture.longFrameThresholdMs", r.longFrameThresholdMs, t.longFrameThresholdMs, n),
922
- ignoreUrls: W("capture.ignoreUrls", r.ignoreUrls, t.ignoreUrls, _n, Nn, n),
923
- userTimingInclude: W("capture.userTimingInclude", r.userTimingInclude, t.userTimingInclude, _n, Nn, n),
924
- propagateTraceHeaderTo: W("capture.propagateTraceHeaderTo", r.propagateTraceHeaderTo, t.propagateTraceHeaderTo, vn, In, n),
925
- plugins: W("capture.plugins", r.plugins, t.plugins, "a list of objects with a name, install() and uninstall()", An, n)
962
+ remoteToggles: U("capture.remoteToggles", r.remoteToggles, t.remoteToggles, "a list of capture switch names without privacy controls", (e) => Te.find((t) => t === e), n),
963
+ resourceTiming: cr(r.resourceTiming, t.resourceTiming, n),
964
+ interactions: lr(r.interactions, t.interactions, n),
965
+ console: or(r.console, t.console, n),
966
+ longFrameMs: Fn("capture.longFrameMs", r.longFrameMs, t.longFrameMs, n),
967
+ ignoreUrls: U("capture.ignoreUrls", r.ignoreUrls, t.ignoreUrls, On, Wn, n),
968
+ userTimingInclude: U("capture.userTimingInclude", r.userTimingInclude, t.userTimingInclude, On, Wn, n),
969
+ propagateTraceHeaderTo: U("capture.propagateTraceHeaderTo", r.propagateTraceHeaderTo, t.propagateTraceHeaderTo, kn, qn, n),
970
+ plugins: U("capture.plugins", r.plugins, t.plugins, "a list of objects with a name, install() and uninstall()", Vn, n)
926
971
  };
927
- for (let e of mn) i[e] = V(`capture.${e}`, r[e], t[e], n);
972
+ for (let e of Tn) i[e] = B(`capture.${e}`, r[e], t[e], n);
928
973
  return i;
929
974
  }
930
- function Zn(e, t, n) {
931
- return e === void 0 ? t : typeof e == "boolean" ? e : E(e) ? { slowMs: wn("capture.resourceTiming.slowMs", e.slowMs, typeof t == "object" ? t.slowMs ?? 1e3 : Ee, n) } : (n.report("config.invalid", "capture.resourceTiming must be a boolean or an options object."), t);
975
+ function cr(e, t, n) {
976
+ return e === void 0 ? t : typeof e == "boolean" ? e : C(e) ? { slowMs: Fn("capture.resourceTiming.slowMs", e.slowMs, typeof t == "object" ? t.slowMs ?? 1e3 : Re, n) } : (n.report("config.invalid", "capture.resourceTiming must be a boolean or an options object."), t);
932
977
  }
933
- function Qn(e, t, n) {
978
+ function lr(e, t, n) {
934
979
  if (e === void 0) return t;
935
980
  if (typeof e == "boolean") return e;
936
- if (!E(e)) return n.report("config.invalid", "capture.interactions must be a boolean or an options object."), t;
981
+ if (!C(e)) return n.report("config.invalid", "capture.interactions must be a boolean or an options object."), t;
937
982
  let r = typeof t == "object" ? t : {}, i = e.ignoreSelector, a = i === void 0 ? r.ignoreSelector : i;
938
983
  if (a != null) try {
939
984
  if (typeof a != "string") throw Error("Invalid selector");
@@ -942,112 +987,113 @@ function Qn(e, t, n) {
942
987
  n.report("config.invalid", "capture.interactions.ignoreSelector must be a valid CSS selector or null."), a = r.ignoreSelector;
943
988
  }
944
989
  let o = r.actionAttribute ?? "data-observability-action";
945
- return e.actionAttribute !== void 0 && (typeof e.actionAttribute == "string" && /^[a-z][\w-]*$/i.test(e.actionAttribute) ? o = e.actionAttribute : z(n, "capture.interactions.actionAttribute", "an attribute name of letters, digits, hyphens and underscores", e.actionAttribute, `"${o}"`)), {
990
+ return e.actionAttribute !== void 0 && (typeof e.actionAttribute == "string" && /^[a-z][\w-]*$/i.test(e.actionAttribute) ? o = e.actionAttribute : R(n, "capture.interactions.actionAttribute", "an attribute name of letters, digits, hyphens and underscores", e.actionAttribute, `"${o}"`)), {
946
991
  actionAttribute: o,
947
- text: V("capture.interactions.text", e.text, r.text ?? !1, n),
948
- selector: V("capture.interactions.selector", e.selector, r.selector ?? !1, n),
992
+ text: B("capture.interactions.text", e.text, r.text ?? !1, n),
993
+ selector: B("capture.interactions.selector", e.selector, r.selector ?? !1, n),
949
994
  ignoreSelector: typeof a == "string" || a === null ? a : void 0,
950
- maxTextChars: H("capture.interactions.maxTextChars", e.maxTextChars, [0, 2 ** 53 - 1], r.maxTextChars ?? 50, n),
951
- rageClicks: V("capture.interactions.rageClicks", e.rageClicks, r.rageClicks ?? !1, n),
952
- rageClickCount: H("capture.interactions.rageClickCount", e.rageClickCount, [2, 20], r.rageClickCount ?? 3, n),
953
- rageClickWindowMs: H("capture.interactions.rageClickWindowMs", e.rageClickWindowMs, fn, r.rageClickWindowMs ?? 1e3, n),
954
- deadClicks: V("capture.interactions.deadClicks", e.deadClicks, r.deadClicks ?? !1, n),
955
- deadClickMs: H("capture.interactions.deadClickMs", e.deadClickMs, fn, r.deadClickMs ?? 1e3, n)
995
+ maxTextChars: V("capture.interactions.maxTextChars", e.maxTextChars, [0, 2 ** 53 - 1], r.maxTextChars ?? 50, n),
996
+ rageClicks: B("capture.interactions.rageClicks", e.rageClicks, r.rageClicks ?? !1, n),
997
+ rageClickCount: V("capture.interactions.rageClickCount", e.rageClickCount, [2, 20], r.rageClickCount ?? 3, n),
998
+ rageClickWindowMs: V("capture.interactions.rageClickWindowMs", e.rageClickWindowMs, vn, r.rageClickWindowMs ?? 1e3, n),
999
+ deadClicks: B("capture.interactions.deadClicks", e.deadClicks, r.deadClicks ?? !1, n),
1000
+ deadClickMs: V("capture.interactions.deadClickMs", e.deadClickMs, vn, r.deadClickMs ?? 1e3, n)
956
1001
  };
957
1002
  }
958
- var $n = {
1003
+ var ur = {
959
1004
  metricsEndpoint: "The library sends metric records as log records.",
960
1005
  tracesEndpoint: "The library sends no span."
961
1006
  };
962
- function er(e, t, n, r, i) {
963
- let a = n;
1007
+ function dr(e, t, n, i, a) {
1008
+ let o = n;
964
1009
  if (typeof t == "string" && t !== "") try {
965
- new URL(t), a = t;
1010
+ new URL(t), o = t;
966
1011
  } catch (n) {
967
- i.report("config.invalid", `${e} is not a valid absolute URL: ${D(t, !1)}. The library keeps the value in force.`, void 0, n);
1012
+ a.report("config.invalid", `${e} is not a valid absolute URL: ${w(t, !1)}. The library keeps the current value.`, void 0, n);
968
1013
  }
969
- else t === "" ? a = "" : t !== void 0 && z(i, e, "a URL string", t, "the value in force");
970
- return a !== "" && r !== "otlp" ? (i.report("config.invalid", `${e} needs serializer "${S}". ${$n[e]}`), "") : a;
1014
+ else t === "" ? o = "" : t !== void 0 && R(a, e, "a URL string", t, "the current value");
1015
+ return o !== "" && i !== "otlp" ? (a.report("config.invalid", `${e} needs serializer "${r}". ${ur[e]}`), "") : o;
971
1016
  }
972
- function tr(e, t, n, r, i) {
1017
+ function fr(e, t, n, r, i) {
973
1018
  let a = { ...n };
974
1019
  for (let o of Object.keys(n)) {
975
1020
  let s = t?.[o], c = n[o], l = r.ranges[o], u = r.choices?.[o], d = r.custom?.[o], f = c;
976
- d ? f = d(`${e}.${o}`, s, c, i) : typeof c == "number" && l ? f = H(`${e}.${o}`, s, l, c, i) : typeof c == "boolean" ? f = V(`${e}.${o}`, s, c, i) : u ? f = B(`${e}.${o}`, s, u, String(c), i) : s === void 0 || typeof s == "string" ? f = s ?? c : z(i, `${e}.${o}`, "a string", s, String(c)), Object.assign(a, { [o]: f });
1021
+ d ? f = d(`${e}.${o}`, s, c, i) : typeof c == "number" && l ? f = V(`${e}.${o}`, s, l, c, i) : typeof c == "boolean" ? f = B(`${e}.${o}`, s, c, i) : u ? f = z(`${e}.${o}`, s, u, String(c), i) : s === void 0 || typeof s == "string" ? f = s ?? c : R(i, `${e}.${o}`, "a string", s, String(c)), Object.assign(a, { [o]: f });
977
1022
  }
978
1023
  return a;
979
1024
  }
980
- function G(e, t, n) {
981
- let r = n ?? re, i = Object.fromEntries(Object.keys(pn).map((n) => [n, tr(n, e[n], r[n], pn[n], t)])), a = {
1025
+ function W(e, t, n) {
1026
+ let r = n ?? re, i = Object.fromEntries(Object.keys(wn).map((n) => [n, fr(n, e[n], r[n], wn[n], t)])), a = {
982
1027
  ...r,
983
1028
  ...e,
984
1029
  ...i,
985
- lockConfiguration: V("lockConfiguration", e.lockConfiguration, r.lockConfiguration, t),
986
- loggerCache: { maxEntries: Tn(e.loggerCache?.maxEntries, r.loggerCache.maxEntries, t) },
1030
+ lockConfiguration: B("lockConfiguration", e.lockConfiguration, r.lockConfiguration, t),
1031
+ loggerCache: { maxEntries: In(e.loggerCache?.maxEntries, r.loggerCache.maxEntries, t) },
987
1032
  securityContext: {
988
1033
  id: typeof e.securityContext?.id == "string" && e.securityContext.id || r.securityContext.id,
989
- isolation: V("securityContext.isolation", e.securityContext?.isolation, r.securityContext.isolation, t)
1034
+ isolation: B("securityContext.isolation", e.securityContext?.isolation, r.securityContext.isolation, t)
990
1035
  },
991
1036
  endpoint: e.endpoint === void 0 ? r.endpoint : e.endpoint,
992
- enabled: V("enabled", e.enabled, r.enabled, t),
993
- payloadMode: B("payloadMode", e.payloadMode, ["copy", "defer"], r.payloadMode, t),
994
- minLevel: Dn("minLevel", e.minLevel, r.minLevel, t),
995
- minLevels: On(e.minLevels, r.minLevels, t),
996
- processors: W("processors", e.processors, r.processors, "a list of functions", kn, t),
997
- compression: B("compression", e.compression, Zt, r.compression, t),
998
- credentials: B("credentials", e.credentials, Qt, r.credentials, t),
999
- headers: "headers" in e ? Rn(e.headers, r.headers, t) : r.headers,
1000
- storage: B("storage", e.storage, $t, r.storage, t),
1001
- identity: B("identity", e.identity, en, r.identity, t),
1002
- serializer: Bn(e.serializer, n?.serializer, t),
1003
- console: Wn(e.console, r.console, t),
1004
- sampling: Gn(e.sampling, r.sampling, t),
1005
- bus: Kn(e.bus, r.bus, t),
1006
- batching: En("batching", e.batching, r.batching, sn, t),
1007
- retention: Jn(e.retention, r.retention, t),
1008
- limits: En("limits", e.limits, r.limits, ln, t),
1009
- journey: qn(e.journey, r.journey, t),
1010
- capture: Xn(e.capture, r.capture, t)
1037
+ enabled: B("enabled", e.enabled, r.enabled, t),
1038
+ payloadMode: z("payloadMode", e.payloadMode, ["copy", "defer"], r.payloadMode, t),
1039
+ minLevel: Rn("minLevel", e.minLevel, r.minLevel, t),
1040
+ minLevels: zn(e.minLevels, r.minLevels, t),
1041
+ processors: U("processors", e.processors, r.processors, "a list of functions", Bn, t),
1042
+ compression: z("compression", e.compression, rn, r.compression, t),
1043
+ credentials: z("credentials", e.credentials, an, r.credentials, t),
1044
+ headers: "headers" in e ? Yn(e.headers, r.headers, t) : r.headers,
1045
+ storage: z("storage", e.storage, on, r.storage, t),
1046
+ identity: z("identity", e.identity, sn, r.identity, t),
1047
+ serializer: Zn(e.serializer, n?.serializer, t),
1048
+ console: tr(e.console, r.console, t),
1049
+ sampling: nr(e.sampling, r.sampling, t),
1050
+ bus: rr(e.bus, r.bus, t),
1051
+ batching: Ln("batching", e.batching, r.batching, pn, t),
1052
+ retention: ar(e.retention, r.retention, t),
1053
+ limits: Ln("limits", e.limits, r.limits, hn, t),
1054
+ journey: ir(e.journey, r.journey, t),
1055
+ capture: sr(e.capture, r.capture, t)
1011
1056
  };
1012
- for (let n of ["metricsEndpoint", "tracesEndpoint"]) a[n] = er(n, e[n], r[n], a.serializer, t);
1013
- if (a.transport !== void 0 && typeof a.transport != "function" && (t.report("config.invalid", "transport must be a function. The library ignores the value."), a.transport = r.transport), a.onDrop !== void 0 && typeof a.onDrop != "function" && (t.report("config.invalid", "onDrop must be a function. The library ignores the value."), a.onDrop = r.onDrop), a.contextProvider !== void 0 && typeof a.contextProvider != "function" && (t.report("config.invalid", "contextProvider must be a function. The library ignores the value."), a.contextProvider = r.contextProvider), a.transportWorker !== void 0 && typeof a.transportWorker != "function" && (t.report("config.invalid", "transportWorker must be a function. The library keeps the value in force."), a.transportWorker = r.transportWorker), a.transportOnExit !== void 0 && typeof a.transportOnExit != "function" && (t.report("config.invalid", "transportOnExit must be a function. The library ignores the value."), a.transportOnExit = r.transportOnExit), a.endpoint === "") a.transport === void 0 && t.report("config.invalid", "endpoint is missing. The library drops each record. Set endpoint: null for console-only mode.");
1057
+ for (let n of ["metricsEndpoint", "tracesEndpoint"]) a[n] = dr(n, e[n], r[n], a.serializer, t);
1058
+ if (a.transport !== void 0 && typeof a.transport != "function" && (t.report("config.invalid", "transport must be a function. The library ignores the value."), a.transport = r.transport), a.onDrop !== void 0 && typeof a.onDrop != "function" && (t.report("config.invalid", "onDrop must be a function. The library ignores the value."), a.onDrop = r.onDrop), a.contextProvider !== void 0 && typeof a.contextProvider != "function" && (t.report("config.invalid", "contextProvider must be a function. The library ignores the value."), a.contextProvider = r.contextProvider), a.transportWorker !== void 0 && typeof a.transportWorker != "function" && (t.report("config.invalid", "transportWorker must be a function. The library keeps the current value."), a.transportWorker = r.transportWorker), a.transportOnExit !== void 0 && typeof a.transportOnExit != "function" && (t.report("config.invalid", "transportOnExit must be a function. The library ignores the value."), a.transportOnExit = r.transportOnExit), a.endpoint === "") a.transport === void 0 && t.report("config.invalid", "endpoint is missing. The library drops each record. Set endpoint: null for console-only mode.");
1014
1059
  else if (a.endpoint !== null) try {
1015
1060
  new URL(a.endpoint);
1016
1061
  } catch (e) {
1017
- t.report("config.invalid", `endpoint is not a valid absolute URL: ${D(a.endpoint, !1)}.`, void 0, e);
1062
+ t.report("config.invalid", `endpoint is not a valid absolute URL: ${w(a.endpoint, !1)}.`, void 0, e);
1018
1063
  }
1019
1064
  for (let e of ["metricsEndpoint", "tracesEndpoint"]) a[e] !== "" && a.endpoint === null && !a.transport && t.report("config.invalid", `${e} needs endpoint or transport. The library sends nothing to ${e}.`);
1020
- a.serviceName ||= (t.report("config.invalid", `serviceName is missing. Every record reports service.name as '${oe}'.`), oe);
1065
+ a.serviceName ||= (t.report("config.invalid", `serviceName is missing. Every record reports service.name as '${Ee}'.`), Ee);
1021
1066
  let o = a.sampling.defaultRate;
1022
1067
  (typeof o != "number" || o < 0 || o > 1) && (t.report("config.invalid", `sampling.defaultRate must be 0..1. The value is ${String(o)}. The library uses 1.`), a.sampling.defaultRate = 1);
1023
1068
  let s = a.sampling.remoteMaxRate;
1024
1069
  typeof s == "number" && s >= 0 && s <= 1 || (t.report("config.invalid", `sampling.remoteMaxRate must be 0..1. The value is ${String(s)}. The library uses 1.`), a.sampling.remoteMaxRate = 1);
1025
1070
  let c = Object.entries(a.sampling.rates);
1026
1071
  for (let [e, n] of c) (typeof n != "number" || n < 0 || n > 1) && (t.report("config.invalid", `sampling.rates["${e}"] must be 0..1. The value is ${String(n)}. The library uses 1.`), a.sampling.rates[e] = 1);
1027
- a.capture.ignoreUrls = a.capture.ignoreUrls.filter((e) => e !== n?.endpoint && e !== n?.metricsEndpoint && e !== n?.tracesEndpoint);
1072
+ a.capture.ignoreUrls = a.capture.ignoreUrls.filter((e) => e !== n?.endpoint && e !== n?.metricsEndpoint && e !== n?.tracesEndpoint && e !== n?.replay.endpoint);
1028
1073
  for (let e of [
1029
1074
  a.endpoint,
1030
1075
  a.metricsEndpoint,
1031
- a.tracesEndpoint
1076
+ a.tracesEndpoint,
1077
+ a.replay.endpoint
1032
1078
  ]) e && !a.capture.ignoreUrls.includes(e) && (a.capture.ignoreUrls = [...a.capture.ignoreUrls, e]);
1033
- return a.delivery.retryMaxDelayMs < a.delivery.retryBaseDelayMs && (t.report("config.invalid", "delivery.retryMaxDelayMs must be at least retryBaseDelayMs."), a.delivery.retryBaseDelayMs = r.delivery.retryBaseDelayMs, a.delivery.retryMaxDelayMs = r.delivery.retryMaxDelayMs), a.capture.urlTransform !== void 0 && typeof a.capture.urlTransform != "function" && (t.report("config.invalid", "capture.urlTransform must be a function."), a.capture.urlTransform = r.capture.urlTransform), nr(e, t), a;
1079
+ return a.delivery.retryMaxDelayMs < a.delivery.retryBaseDelayMs && (t.report("config.invalid", "delivery.retryMaxDelayMs must be at least retryBaseDelayMs."), a.delivery.retryBaseDelayMs = r.delivery.retryBaseDelayMs, a.delivery.retryMaxDelayMs = r.delivery.retryMaxDelayMs), a.capture.urlTransform !== void 0 && typeof a.capture.urlTransform != "function" && (t.report("config.invalid", "capture.urlTransform must be a function."), a.capture.urlTransform = r.capture.urlTransform), pr(e, t), a;
1034
1080
  }
1035
- function nr(e, t) {
1036
- let n = /* @__PURE__ */ new Set([...Object.keys(re), ...c]);
1081
+ function pr(e, t) {
1082
+ let n = /* @__PURE__ */ new Set([...Object.keys(re), ...ge]);
1037
1083
  for (let r of Object.keys(e)) n.has(r) || t.report("config.invalid", `The library ignores the unknown config key "${r}". Check the spelling.`);
1038
- for (let n of a) {
1084
+ for (let n of i) {
1039
1085
  let r = e[n];
1040
1086
  if (typeof r != "object" || !r) continue;
1041
- let i = /* @__PURE__ */ new Set([...Object.keys(re[n]), ...ie[n]]);
1087
+ let i = /* @__PURE__ */ new Set([...Object.keys(re[n]), ...Pe[n]]);
1042
1088
  for (let e of Object.keys(r)) i.has(e) || t.report("config.invalid", `The library ignores the unknown config key "${n}.${e}". Check the spelling.`);
1043
1089
  }
1044
1090
  }
1045
- function rr(e, t) {
1046
- for (let n of Object.keys(t)) a.includes(n) || Object.assign(e, { [n]: t[n] });
1047
- for (let n of a) Object.assign(e[n], t[n]);
1091
+ function mr(e, t) {
1092
+ for (let n of Object.keys(t)) i.includes(n) || Object.assign(e, { [n]: t[n] });
1093
+ for (let n of i) Object.assign(e[n], t[n]);
1048
1094
  }
1049
1095
  // src/core/context.ts
1050
- var ir = class {
1096
+ var hr = class {
1051
1097
  map = /* @__PURE__ */ new Map();
1052
1098
  set(e, t) {
1053
1099
  this.map.set(e, t);
@@ -1064,7 +1110,7 @@ var ir = class {
1064
1110
  getAll() {
1065
1111
  return Object.fromEntries(this.map);
1066
1112
  }
1067
- }, ar = class {
1113
+ }, gr = class {
1068
1114
  policy;
1069
1115
  kept = [];
1070
1116
  constructor(e) {
@@ -1083,7 +1129,7 @@ var ir = class {
1083
1129
  ...e,
1084
1130
  attributes: {
1085
1131
  ...e.attributes,
1086
- [Pe]: !0
1132
+ [Fe]: !0
1087
1133
  }
1088
1134
  }));
1089
1135
  }
@@ -1099,7 +1145,7 @@ var ir = class {
1099
1145
  clear() {
1100
1146
  this.kept = [];
1101
1147
  }
1102
- }, or = class {
1148
+ }, _r = class {
1103
1149
  handler;
1104
1150
  throttleMs;
1105
1151
  consoleFallback;
@@ -1118,27 +1164,29 @@ var ir = class {
1118
1164
  let n = (this.counters.get(e) ?? 0) + t;
1119
1165
  return this.counters.set(e, n), n;
1120
1166
  }
1121
- report(e, t, n, r) {
1167
+ report(e, t, r, i) {
1122
1168
  let a = this.count(e), o = Date.now();
1123
- if (o - (this.lastEmitted.get(e) ?? 0) < this.throttleMs) return;
1169
+ if (o - (this.lastEmitted.get(e) ?? 0) < this.throttleMs) return !1;
1124
1170
  this.lastEmitted.set(e, o);
1125
1171
  let s = {
1126
1172
  code: e,
1127
1173
  message: t,
1128
- detail: n,
1129
- cause: r,
1174
+ detail: r,
1175
+ cause: i,
1130
1176
  at: o,
1131
1177
  count: a
1132
1178
  }, { handler: c } = this;
1133
- if (c) try {
1134
- O(() => {
1179
+ if (!c) return !0;
1180
+ try {
1181
+ E(() => {
1135
1182
  c(s);
1136
1183
  });
1137
1184
  } catch {
1138
- this.count("handler.threw"), this.consoleFallback && typeof console < "u" && O(() => {
1139
- console.warn(`${i} The onDiagnostic handler threw an error.`);
1185
+ this.count("handler.threw"), this.consoleFallback && typeof console < "u" && E(() => {
1186
+ console.warn(`${n} The onDiagnostic handler threw an error.`);
1140
1187
  });
1141
1188
  }
1189
+ return !0;
1142
1190
  }
1143
1191
  guard(e, t, n) {
1144
1192
  try {
@@ -1161,10 +1209,10 @@ var ir = class {
1161
1209
  }
1162
1210
  };
1163
1211
  // src/core/drops.ts
1164
- function sr(e, t) {
1212
+ function vr(e, t) {
1165
1213
  e.length < 20 && !e.includes(t) && e.push(t);
1166
1214
  }
1167
- var cr = class {
1215
+ var yr = class {
1168
1216
  config;
1169
1217
  diagnostics;
1170
1218
  pending = /* @__PURE__ */ new Map();
@@ -1183,12 +1231,12 @@ var cr = class {
1183
1231
  journeyIds: [],
1184
1232
  actions: []
1185
1233
  }, this.pending.set(e, r)), r.records += t.length;
1186
- for (let e of n) sr(r.batchIds, e);
1234
+ for (let e of n) vr(r.batchIds, e);
1187
1235
  for (let e of t) {
1188
- let t = at(e, x);
1189
- typeof t == "string" && sr(r.journeyIds, t);
1190
- let n = it(e) ? e.body : void 0;
1191
- typeof n == "string" && sr(r.actions, n);
1236
+ let t = ut(e, S);
1237
+ typeof t == "string" && vr(r.journeyIds, t);
1238
+ let n = lt(e) ? e.body : void 0;
1239
+ typeof n == "string" && vr(r.actions, n);
1192
1240
  }
1193
1241
  this.scheduled || (this.scheduled = !0, queueMicrotask(() => {
1194
1242
  this.flush();
@@ -1202,8 +1250,8 @@ var cr = class {
1202
1250
  if (t) {
1203
1251
  this.reporting = !0;
1204
1252
  for (let n of e) this.diagnostics.guard("handler.threw", "The onDrop hook threw an error.", () => {
1205
- rt(() => {
1206
- O(() => {
1253
+ ct(() => {
1254
+ E(() => {
1207
1255
  t(n);
1208
1256
  });
1209
1257
  });
@@ -1211,7 +1259,7 @@ var cr = class {
1211
1259
  this.reporting = !1;
1212
1260
  }
1213
1261
  }
1214
- }, lr = class {
1262
+ }, br = class {
1215
1263
  onDrop;
1216
1264
  held = [];
1217
1265
  actions = 0;
@@ -1225,10 +1273,10 @@ var cr = class {
1225
1273
  return this.held.length;
1226
1274
  }
1227
1275
  push(e) {
1228
- let t = it(e);
1276
+ let t = lt(e);
1229
1277
  if ((t ? this.actions : this.held.length - this.actions) < (t ? 2e3 : 500)) this.actions += +!!t;
1230
1278
  else {
1231
- let e = this.held.findIndex((e) => it(e) === t), [n] = this.held.splice(e, 1);
1279
+ let e = this.held.findIndex((e) => lt(e) === t), [n] = this.held.splice(e, 1);
1232
1280
  this.onDrop(n);
1233
1281
  }
1234
1282
  this.held.push(e);
@@ -1237,20 +1285,20 @@ var cr = class {
1237
1285
  let e = this.held;
1238
1286
  return this.held = [], this.actions = 0, e;
1239
1287
  }
1240
- }, ur = {
1288
+ }, xr = {
1241
1289
  name: "ui.measure.duration",
1242
1290
  kind: "histogram",
1243
1291
  unit: "ms",
1244
- boundaries: g
1245
- }, dr = {
1292
+ boundaries: v
1293
+ }, Sr = {
1246
1294
  name: "ui.measure.phase.duration",
1247
1295
  kind: "histogram",
1248
1296
  unit: "ms",
1249
- boundaries: g
1297
+ boundaries: v
1250
1298
  };
1251
- function fr(e, t, n, r) {
1299
+ function Cr(e, t, n, r) {
1252
1300
  let i = String(e), a = Date.now(), o = performance.now(), s, c = !1, l = (e) => a + e - o, u = (e, a) => {
1253
- s &&= (r.metric(dr, e - s.at, {
1301
+ s &&= (r.metric(Sr, e - s.at, {
1254
1302
  ...t,
1255
1303
  "measure.name": i,
1256
1304
  "measure.phase": s.name
@@ -1258,7 +1306,7 @@ function fr(e, t, n, r) {
1258
1306
  name: s.name,
1259
1307
  kind: "internal",
1260
1308
  traceId: n.traceId,
1261
- spanId: Wt(),
1309
+ spanId: Xt(),
1262
1310
  parentSpanId: n.spanId,
1263
1311
  startMs: l(s.at),
1264
1312
  endMs: l(e),
@@ -1284,7 +1332,7 @@ function fr(e, t, n, r) {
1284
1332
  ...t,
1285
1333
  "measure.outcome": e
1286
1334
  };
1287
- r.metric(ur, s - o, {
1335
+ r.metric(xr, s - o, {
1288
1336
  ...f,
1289
1337
  "measure.name": i
1290
1338
  }), n && r.span({
@@ -1300,11 +1348,11 @@ function fr(e, t, n, r) {
1300
1348
  };
1301
1349
  }
1302
1350
  // src/core/record.ts
1303
- var pr = "error.", mr = [
1304
- C,
1305
- x,
1306
- De
1307
- ], hr = {
1351
+ var wr = "error.", Tr = [
1352
+ Le,
1353
+ S,
1354
+ Oe
1355
+ ], Er = {
1308
1356
  processor: {
1309
1357
  label: "A processor",
1310
1358
  code: "record.dropped_by_processor"
@@ -1313,21 +1361,21 @@ var pr = "error.", mr = [
1313
1361
  label: "The redact hook",
1314
1362
  code: "record.dropped_by_redact"
1315
1363
  }
1316
- }, gr = [
1364
+ }, Dr = [
1317
1365
  "metric.name",
1318
1366
  "metric.unit",
1319
1367
  "metric.type",
1320
1368
  "metric.value",
1321
1369
  ...Object.values(y),
1322
- ...Object.values(T)
1370
+ ...Object.values(_)
1323
1371
  ];
1324
- function _r(e) {
1325
- return Object.fromEntries(gr.filter((t) => t in e).map((t) => [t, e[t]]));
1372
+ function Or(e) {
1373
+ return Object.fromEntries(Dr.filter((t) => t in e).map((t) => [t, e[t]]));
1326
1374
  }
1327
- function K(e) {
1375
+ function G(e) {
1328
1376
  return e;
1329
1377
  }
1330
- var vr = class {
1378
+ var kr = class {
1331
1379
  deps;
1332
1380
  resourceCache = null;
1333
1381
  constructor(e) {
@@ -1336,12 +1384,12 @@ var vr = class {
1336
1384
  invalidateResource() {
1337
1385
  this.resourceCache = null;
1338
1386
  }
1339
- isEnabled(e, t, r) {
1340
- let { config: i } = this.deps;
1341
- if (!i.enabled) return !1;
1342
- if (r !== void 0 && n.includes(r)) return !0;
1343
- let a = this.deps.remote.sampling?.minLevelFor(t) ?? ut(t, i);
1344
- return w[e] >= w[a];
1387
+ isEnabled(e, t, n) {
1388
+ let { config: r } = this.deps;
1389
+ if (!r.enabled) return !1;
1390
+ if (n !== void 0 && Be.includes(n)) return !0;
1391
+ let i = this.deps.remote.sampling?.minLevelFor(t) ?? ht(t, r);
1392
+ return b[e] >= b[i];
1345
1393
  }
1346
1394
  keepForDebug(e) {
1347
1395
  let { config: t, debug: n } = this.deps;
@@ -1355,7 +1403,7 @@ var vr = class {
1355
1403
  record: null,
1356
1404
  dropped: "level"
1357
1405
  };
1358
- let l = e.trace ?? e.snapshot?.trace ?? i.resolve(), u = e.snapshot ? e.snapshot.journey : a.current(), d = dt({
1406
+ let l = e.trace ?? e.snapshot?.trace ?? i.resolve(), u = e.snapshot ? e.snapshot.journey : a.current(), d = gt({
1359
1407
  level: e.level,
1360
1408
  type: e.type,
1361
1409
  namespace: e.namespace,
@@ -1367,27 +1415,27 @@ var vr = class {
1367
1415
  record: null,
1368
1416
  dropped: "sampling"
1369
1417
  };
1370
- let f = o.next(), p = e.snapshot?.url ?? qe(r), m = n.metadata.pageUrl ? D(p, n.capture.fullUrls, n.capture.urlTransform, r) : "", h, g = 0;
1418
+ let f = o.next(), p = e.snapshot?.url ?? Qe(r), m = n.metadata.pageUrl ? w(p, n.capture.fullUrls, n.capture.urlTransform, r) : "", h, g = 0;
1371
1419
  try {
1372
- let t = k(e.snapshot?.context ?? this.deps.context.getAll(), s, r), n = k(this.provided(), s, r), i = k(e.scoped ?? {}, s, r), a = k(e.payload ?? {}, s, r);
1420
+ let t = D(e.snapshot?.context ?? this.deps.context.getAll(), s, r), n = D(this.provided(), s, r), i = D(e.scoped ?? {}, s, r), a = D(e.payload ?? {}, s, r);
1373
1421
  g = t.bytes + n.bytes + i.bytes + a.bytes, h = {
1374
- ...K(t.value),
1375
- ...K(n.value),
1376
- ...K(i.value),
1377
- ...K(a.value)
1422
+ ...G(t.value),
1423
+ ...G(n.value),
1424
+ ...G(i.value),
1425
+ ...G(a.value)
1378
1426
  };
1379
1427
  } catch (e) {
1380
- r.report("record.sanitize_failed", "The library could not sanitize the attributes.", void 0, e), h = { [Le]: !0 };
1428
+ r.report("record.sanitize_failed", "The library could not sanitize the attributes.", void 0, e), h = { [He]: !0 };
1381
1429
  }
1382
- Object.assign(h, e.fixed), h[ve] = e.type, h[ye] = f, h[ue] = e.namespace, h[C] = m, u && (h[x] = u.id, h[De] = u.name, u.parentId !== void 0 && (h[Ce] = u.parentId));
1383
- let _ = Ye(e.body, s.maxBodyChars);
1430
+ Object.assign(h, e.fixed), h[ve] = e.type, h[be] = f, h[fe] = e.namespace, h[Le] = m, u && (h[S] = u.id, h[Oe] = u.name, u.parentId !== void 0 && (h[Ce] = u.parentId));
1431
+ let _ = et(e.body, s.maxBodyChars);
1384
1432
  _ !== e.body && r.count("record.truncated");
1385
1433
  let v = {
1386
- timeUnixNano: e.snapshot?.timeUnixNano ?? Be(),
1434
+ timeUnixNano: e.snapshot?.timeUnixNano ?? Ge(),
1387
1435
  traceId: l.traceId,
1388
1436
  spanId: l.spanId,
1389
1437
  traceFlags: l.traceFlags,
1390
- severityNumber: fe[e.level],
1438
+ severityNumber: ee[e.level],
1391
1439
  severityText: e.level,
1392
1440
  body: _,
1393
1441
  attributes: h,
@@ -1408,19 +1456,19 @@ var vr = class {
1408
1456
  });
1409
1457
  let t = {
1410
1458
  [ve]: e.type,
1411
- [ye]: f,
1412
- [ue]: e.namespace,
1413
- [je]: !0,
1414
- [Te]: g
1459
+ [be]: f,
1460
+ [fe]: e.namespace,
1461
+ [Me]: !0,
1462
+ [De]: g
1415
1463
  };
1416
- for (let e of mr) e in v.attributes && (t[e] = v.attributes[e]);
1417
- for (let [e, n] of Object.entries(v.attributes)) e.startsWith(pr) && (t[e] = n);
1418
- let n = k(t, s, r).bytes;
1419
- n > s.maxRecordBytes && "error.data" in t && (Reflect.deleteProperty(t, me), n = k(t, s, r).bytes);
1420
- let i = v.attributes[b];
1464
+ for (let e of Tr) e in v.attributes && (t[e] = v.attributes[e]);
1465
+ for (let [e, n] of Object.entries(v.attributes)) e.startsWith(wr) && (t[e] = n);
1466
+ let n = D(t, s, r).bytes;
1467
+ n > s.maxRecordBytes && "error.data" in t && (Reflect.deleteProperty(t, me), n = D(t, s, r).bytes);
1468
+ let i = v.attributes[x];
1421
1469
  if (i !== void 0) {
1422
- let e = k(i, s, r).bytes;
1423
- n + e <= s.maxRecordBytes && (t[b] = i);
1470
+ let e = D(i, s, r).bytes;
1471
+ n + e <= s.maxRecordBytes && (t[x] = i);
1424
1472
  }
1425
1473
  Object.assign(t, e.fixed), v.attributes = t;
1426
1474
  }
@@ -1429,7 +1477,7 @@ var vr = class {
1429
1477
  redactForwarded(e) {
1430
1478
  let { redact: t } = this.deps.config;
1431
1479
  if (!t) return e;
1432
- let n = [[t, "redact"]], r = this.applyHooks(e, n, _r(e.attributes));
1480
+ let n = [[t, "redact"]], r = this.applyHooks(e, n, Or(e.attributes));
1433
1481
  return typeof r == "string" ? null : r.record;
1434
1482
  }
1435
1483
  applyHooks(e, t, n) {
@@ -1439,7 +1487,7 @@ var vr = class {
1439
1487
  if (typeof t == "string") return t;
1440
1488
  r = t;
1441
1489
  }
1442
- let { diagnostics: i, limits: a } = this.deps, o = k(r.attributes, a, i), s = K(o.value);
1490
+ let { diagnostics: i, limits: a } = this.deps, o = D(r.attributes, a, i), s = G(o.value);
1443
1491
  return Object.assign(s, n), {
1444
1492
  record: {
1445
1493
  ...r,
@@ -1449,7 +1497,7 @@ var vr = class {
1449
1497
  };
1450
1498
  }
1451
1499
  runHook(e, t, n) {
1452
- let { diagnostics: r } = this.deps, { label: i, code: a } = hr[t], o;
1500
+ let { diagnostics: r } = this.deps, { label: i, code: a } = Er[t], o;
1453
1501
  try {
1454
1502
  o = e(n);
1455
1503
  } catch (e) {
@@ -1457,9 +1505,9 @@ var vr = class {
1457
1505
  }
1458
1506
  if (o === null) return r.count(a), t;
1459
1507
  let s = o ?? n;
1460
- return ze(s) ? Ve(s.severityText) ? {
1508
+ return We(s) ? Ke(s.severityText) ? {
1461
1509
  ...s,
1462
- severityNumber: fe[s.severityText]
1510
+ severityNumber: ee[s.severityText]
1463
1511
  } : (r.report("record.dropped_malformed", `${i} set a severityText that is not a log level. The library dropped the record.`), "malformed") : s === n ? (r.report("record.dropped_malformed", `${i} changed the record to a shape that is not a record. The library dropped it.`), "malformed") : (r.report(a, `${i} returned a value that is not a record. The library dropped the record.`), t);
1464
1512
  }
1465
1513
  provided() {
@@ -1467,42 +1515,42 @@ var vr = class {
1467
1515
  if (!e) return {};
1468
1516
  let { diagnostics: t } = this.deps, n = t.guard("handler.threw", "The contextProvider threw an error. The record has no attributes from it.", () => {
1469
1517
  let t = e();
1470
- return t === void 0 ? {} : E(t) && typeof t.then != "function" ? t : null;
1518
+ return t === void 0 ? {} : C(t) && typeof t.then != "function" ? t : null;
1471
1519
  });
1472
1520
  return n === null && t.report("config.invalid", "contextProvider must return an object of attributes. The library ignores the value."), n ?? {};
1473
1521
  }
1474
1522
  resource() {
1475
1523
  if (this.resourceCache) return this.resourceCache;
1476
- let { config: t, identity: n, platform: r } = this.deps;
1524
+ let { config: e, identity: t, platform: n } = this.deps;
1477
1525
  return this.resourceCache = {
1478
- [Ae]: t.serviceName,
1479
- [be]: t.serviceVersion,
1480
- [e]: t.environment,
1481
- [Se]: h,
1482
- [Fe]: v,
1483
- [pe]: xe,
1484
- [ge]: r.platform,
1485
- [de]: n.sessionId,
1486
- [Me]: n.tabId,
1487
- [ne]: n.contextId,
1488
- ...t.metadata.userAgent ? { [ce]: r.userAgent } : {},
1489
- ...!t.metadata.openfin || r.openfinUuid === void 0 ? {} : { [we]: r.openfinUuid },
1490
- ...!t.metadata.openfin || r.openfinName === void 0 ? {} : { [Ne]: r.openfinName }
1526
+ [xe]: e.serviceName,
1527
+ [ye]: e.serviceVersion,
1528
+ [he]: e.environment,
1529
+ [Ve]: oe,
1530
+ [ne]: s,
1531
+ [pe]: ie,
1532
+ [_e]: n.platform,
1533
+ [ue]: t.sessionId,
1534
+ [Ue]: t.tabId,
1535
+ [Ie]: t.contextId,
1536
+ ...e.metadata.userAgent ? { [Se]: n.userAgent } : {},
1537
+ ...!e.metadata.openfin || n.openfinUuid === void 0 ? {} : { [we]: n.openfinUuid },
1538
+ ...!e.metadata.openfin || n.openfinName === void 0 ? {} : { [ke]: n.openfinName }
1491
1539
  }, this.resourceCache;
1492
1540
  }
1493
- }, yr = 1e3, br = {
1541
+ }, Ar = 1e3, jr = {
1494
1542
  start: "ui.start",
1495
1543
  interaction: "ui.interaction",
1496
1544
  navigation: "ui.navigation",
1497
1545
  explicit: "ui.trace",
1498
1546
  maxAge: "ui.trace"
1499
1547
  };
1500
- function xr(e) {
1501
- return `${String(Math.round(e * yr))}000`;
1548
+ function Mr(e) {
1549
+ return `${String(Math.round(e * Ar))}000`;
1502
1550
  }
1503
- function Sr(e) {
1551
+ function Nr(e) {
1504
1552
  return {
1505
- name: br[e.reason],
1553
+ name: jr[e.reason],
1506
1554
  kind: "internal",
1507
1555
  traceId: e.traceId,
1508
1556
  spanId: e.spanId,
@@ -1513,38 +1561,41 @@ function Sr(e) {
1513
1561
  attributes: {}
1514
1562
  };
1515
1563
  }
1516
- function Cr(e) {
1564
+ function Pr(e) {
1517
1565
  return {
1518
- [T.kind]: e.kind,
1519
- [T.parentId]: e.parentSpanId,
1520
- [T.start]: xr(e.startMs),
1521
- [T.end]: xr(e.endMs),
1522
- [T.status]: e.error ? "error" : "unset",
1566
+ [_.kind]: e.kind,
1567
+ [_.parentId]: e.parentSpanId,
1568
+ [_.start]: Mr(e.startMs),
1569
+ [_.end]: Mr(e.endMs),
1570
+ [_.status]: e.error ? "error" : "unset",
1523
1571
  ...e.link ? {
1524
- [T.linkTraceId]: e.link.traceId,
1525
- [T.linkSpanId]: e.link.spanId
1572
+ [_.linkTraceId]: e.link.traceId,
1573
+ [_.linkSpanId]: e.link.spanId
1526
1574
  } : {}
1527
1575
  };
1528
1576
  }
1529
1577
  // src/core/runtime.ts
1530
- var wr = {
1531
- errors: async () => (await import("./errors-Dh7kef0i.js")).ErrorCapture,
1532
- network: async () => (await import("./network-DBNwApoF.js")).NetworkCapture,
1533
- interactions: async () => (await import("./interactions-DTgKy_6K.js")).InteractionCapture,
1534
- webVitals: async () => (await import("./web-vitals-Bq4WFHQo.js")).WebVitalsCapture,
1535
- longFrames: async () => (await import("./long-frames-Czk7IupC.js")).LongFrameCapture,
1536
- console: async () => (await import("./console-BeCF7n59.js")).ConsoleCapture,
1537
- uncleanExit: async () => (await import("./unclean-exit-CwcUhFOn.js")).UncleanExitCapture,
1538
- userTiming: async () => (await import("./user-timing-_jZIhDKI.js")).UserTimingCapture,
1539
- reports: async () => (await import("./reports-TA-zInnq.js")).ReportCapture,
1540
- resourceTiming: async () => (await import("./resource-timing-BLv3EA2A.js")).ResourceTimingCapture,
1541
- lifecycle: async () => (await import("./lifecycle-BaKx_-32.js")).LifecycleCapture
1542
- }, Tr = /* @__PURE__ */ new WeakMap(), Er = 0;
1543
- function Dr(e) {
1544
- let t = Tr.get(e);
1545
- return t === void 0 && (t = ++Er, Tr.set(e, t)), t;
1546
- }
1547
- var Or = Symbol.for(he), kr = Symbol.for(_e), Ar = ["batching", "retention"], jr = {
1578
+ var Fr = {
1579
+ errors: async () => (await import("./errors-D6bwgJtO.js")).ErrorCapture,
1580
+ network: async () => (await import("./network-C7SkLf4v.js")).NetworkCapture,
1581
+ interactions: async () => (await import("./interactions-B6z2I4tU.js")).InteractionCapture,
1582
+ webVitals: async () => (await import("./web-vitals-CsGCWnUr.js")).WebVitalsCapture,
1583
+ longFrames: async () => (await import("./long-frames-430_85Da.js")).LongFrameCapture,
1584
+ console: async () => (await import("./console-cwgHKXvM.js")).ConsoleCapture,
1585
+ uncleanExit: async () => (await import("./unclean-exit-Cob_jyTv.js")).UncleanExitCapture,
1586
+ userTiming: async () => (await import("./user-timing-DgHubxCI.js")).UserTimingCapture,
1587
+ reports: async () => (await import("./reports-BuXekPOS.js")).ReportCapture,
1588
+ resourceTiming: async () => (await import("./resource-timing-CXGHwFRD.js")).ResourceTimingCapture,
1589
+ lifecycle: async () => (await import("./lifecycle-CZ6RRXc6.js")).LifecycleCapture,
1590
+ framePhases: async () => (await import("./profiler-frames-CLXlT_xL.js")).FramePhasesCapture,
1591
+ framePacing: async () => (await import("./profiler-frames-CLXlT_xL.js")).FramePacingCapture,
1592
+ replay: async () => (await import("./replay-0zAJv9T3.js")).ReplayCapture
1593
+ }, Ir = /* @__PURE__ */ new WeakMap(), Lr = 0;
1594
+ function K(e) {
1595
+ let t = Ir.get(e);
1596
+ return t === void 0 && (t = ++Lr, Ir.set(e, t)), t;
1597
+ }
1598
+ var Rr = Symbol.for(e), zr = Symbol.for(ze), Br = ["batching", "retention"], Vr = {
1548
1599
  endpoint: null,
1549
1600
  metricsEndpoint: "",
1550
1601
  tracesEndpoint: "",
@@ -1553,34 +1604,34 @@ var Or = Symbol.for(he), kr = Symbol.for(_e), Ar = ["batching", "retention"], jr
1553
1604
  transport: void 0,
1554
1605
  transportOnExit: void 0,
1555
1606
  transportWorker: void 0
1556
- }, Mr = Object.keys(jr), Nr = /* @__PURE__ */ new Set([
1607
+ }, Hr = Object.keys(Vr), Ur = /* @__PURE__ */ new Set([
1557
1608
  "bus.role_resolved",
1558
1609
  "config.reconfigured",
1559
1610
  "security.rotated",
1560
1611
  "journey.adopted",
1561
1612
  "journey.expired"
1562
1613
  ]);
1563
- function Pr(e) {
1614
+ function Wr(e) {
1564
1615
  return JSON.stringify({
1565
1616
  ...e,
1566
- urlTransform: e.urlTransform ? Dr(e.urlTransform) : void 0,
1617
+ urlTransform: e.urlTransform ? K(e.urlTransform) : void 0,
1567
1618
  webVitalsLoader: e.webVitalsLoader !== void 0,
1568
1619
  ignoreUrls: e.ignoreUrls.map(String),
1569
1620
  propagateTraceHeaderTo: e.propagateTraceHeaderTo.map(String),
1570
1621
  userTimingInclude: e.userTimingInclude.map(String),
1571
- plugins: e.plugins.map(Dr)
1622
+ plugins: e.plugins.map(K)
1572
1623
  });
1573
1624
  }
1574
- function Fr(e) {
1575
- if (!E(e)) return e;
1625
+ function Gr(e) {
1626
+ if (!C(e)) return e;
1576
1627
  let t = { ...e };
1577
1628
  for (let e of ["url", "endpoint"]) {
1578
1629
  let n = t[e];
1579
- typeof n == "string" && (t[e] = D(n, !1));
1630
+ typeof n == "string" && (t[e] = w(n, !1));
1580
1631
  }
1581
1632
  return t;
1582
1633
  }
1583
- function Ir(e) {
1634
+ function Kr(e) {
1584
1635
  return {
1585
1636
  ...e,
1586
1637
  endpoint: null,
@@ -1595,14 +1646,15 @@ function Ir(e) {
1595
1646
  }
1596
1647
  };
1597
1648
  }
1598
- function Lr(e) {
1649
+ function qr(e) {
1599
1650
  return !!e.endpoint || !!e.metricsEndpoint || !!e.tracesEndpoint || e.transport !== void 0 || e.transportWorker !== void 0;
1600
1651
  }
1601
- function Rr(e) {
1602
- return e.sdkVersion === v;
1652
+ function Jr(e) {
1653
+ return e.sdkVersion === s;
1603
1654
  }
1604
1655
  var q = class e {
1605
1656
  rotating = !1;
1657
+ profilerOn = !1;
1606
1658
  closingContext = !1;
1607
1659
  mismatchVersion = null;
1608
1660
  contextMismatch = !1;
@@ -1610,8 +1662,8 @@ var q = class e {
1610
1662
  memoryStorage;
1611
1663
  storagePersistence = "off";
1612
1664
  recordingDiagnostic = !1;
1613
- diagnosticLogger = new F(() => this, Oe);
1614
- debugBuffer = new ar(() => this.config.debugBuffer);
1665
+ diagnosticLogger = new N(() => this, Ae);
1666
+ debugBuffer = new gr(() => this.config.debugBuffer);
1615
1667
  explicitSecurityContext;
1616
1668
  ownerAdopted = !1;
1617
1669
  isRotating() {
@@ -1621,7 +1673,7 @@ var q = class e {
1621
1673
  typeof e == "boolean" && (this.config.lockConfiguration = e);
1622
1674
  }
1623
1675
  static local = null;
1624
- sdkVersion = v;
1676
+ sdkVersion = s;
1625
1677
  diagnostics;
1626
1678
  config;
1627
1679
  platform;
@@ -1629,10 +1681,10 @@ var q = class e {
1629
1681
  stores;
1630
1682
  identityBuiltAs;
1631
1683
  sessionTouch;
1632
- context = new ir();
1684
+ context = new hr();
1633
1685
  breadcrumbs;
1634
1686
  tracing;
1635
- sequence = new Rt();
1687
+ sequence = new Wt();
1636
1688
  journey;
1637
1689
  builder;
1638
1690
  remote = {
@@ -1642,8 +1694,12 @@ var q = class e {
1642
1694
  }
1643
1695
  };
1644
1696
  identityEpoch = 0;
1697
+ errorHook;
1698
+ replayConsent;
1699
+ replay;
1645
1700
  remoteCaptureTimer;
1646
1701
  installedCaptureKey = "";
1702
+ replayBuiltKey = "";
1647
1703
  console;
1648
1704
  drops;
1649
1705
  meter;
@@ -1653,7 +1709,7 @@ var q = class e {
1653
1709
  storageBuiltAs;
1654
1710
  sender;
1655
1711
  senderLoad;
1656
- pendingRecords = new lr((e) => {
1712
+ pendingRecords = new br((e) => {
1657
1713
  this.dropHeld(e);
1658
1714
  });
1659
1715
  captures = [];
@@ -1665,7 +1721,7 @@ var q = class e {
1665
1721
  uncleanExit: !1,
1666
1722
  userTiming: !1
1667
1723
  };
1668
- bootBuffer = new lr((e) => {
1724
+ bootBuffer = new br((e) => {
1669
1725
  this.dropHeld(e);
1670
1726
  });
1671
1727
  forwardBuffer = [];
@@ -1681,23 +1737,23 @@ var q = class e {
1681
1737
  degraded;
1682
1738
  serverReported = !1;
1683
1739
  onPageHide = () => {
1684
- N(this), this.role() === "forwarder" && (this.tracing.end(), this.sendForwarded());
1740
+ j(this), this.role() === "forwarder" && (this.tracing.end(), this.sendForwarded());
1685
1741
  };
1686
1742
  constructor(e, t = !1) {
1687
- this.diagnostics = new or(e.onDiagnostic), this.platform = Ke(this.diagnostics), this.degraded = t || this.onServer(), this.config = G(this.allowed(e), this.diagnostics), this.explicitSecurityContext = !!e.securityContext?.id, this.config.securityContext.id ||= A(this.diagnostics), this.diagnostics.setPolicy(this.config.diagnostics.throttleMs, this.config.diagnostics.consoleFallback), this.identityBuiltAs = this.config.identity, this.stores = this.identityBuiltAs === "memory" || this.onServer() ? et() : nt, this.identity = tt(this.diagnostics, this.stores, this.config.correlation.sessionIdleMs), this.sessionTouch = new Qe(this.diagnostics, this.stores, this.config.correlation.sessionTouchMs, this.config.correlation.sessionIdleMs), this.breadcrumbs = new Yt(this.config.capturePolicy.breadcrumbs);
1688
- let n = (e) => lt(e, this.config.sampling.defaultRate);
1689
- this.tracing = new Jt(this.diagnostics, this.config.correlation.traceMaxAgeMs || Infinity, this.config.otelLoader, {
1743
+ this.diagnostics = new _r(e.onDiagnostic), this.platform = Ze(this.diagnostics), this.degraded = t || this.onServer(), this.config = W(this.allowed(e), this.diagnostics), this.explicitSecurityContext = !!e.securityContext?.id, this.config.securityContext.id ||= O(this.diagnostics), this.diagnostics.setPolicy(this.config.diagnostics.throttleMs, this.config.diagnostics.consoleFallback), this.identityBuiltAs = this.config.identity, this.stores = this.identityBuiltAs === "memory" || this.onServer() ? at() : st, this.identity = ot(this.diagnostics, this.stores, this.config.correlation.sessionIdleMs), this.sessionTouch = new rt(this.diagnostics, this.stores, this.config.correlation.sessionTouchMs, this.config.correlation.sessionIdleMs), this.breadcrumbs = new tn(this.config.capturePolicy.breadcrumbs);
1744
+ let n = (e) => mt(e, this.config.sampling.defaultRate);
1745
+ this.tracing = new en(this.diagnostics, this.config.correlation.traceMaxAgeMs || Infinity, this.config.otelLoader, {
1690
1746
  enabled: () => this.config.tracesEndpoint !== "",
1691
1747
  keeps: n,
1692
1748
  onEnd: (e) => {
1693
- n(e.traceId) && this.recordSpan(Sr(e));
1749
+ n(e.traceId) && this.recordSpan(Nr(e));
1694
1750
  }
1695
- }), this.tracing.loadOtel(), this.limits = { ...this.config.limits }, this.console = new Lt(this.config.console, this.diagnostics, this.limits), this.drops = new cr(this.config, this.diagnostics), this.journeyOptions = {
1696
- ...st,
1751
+ }), this.tracing.loadOtel(), this.limits = { ...this.config.limits }, this.console = new Ut(this.config.console, this.diagnostics, this.limits), this.drops = new yr(this.config, this.diagnostics), this.journeyOptions = {
1752
+ ...ft,
1697
1753
  maxAgeMs: this.config.journey.maxAgeMs
1698
- }, this.journey = new ot(this.journeyOptions, this.diagnostics, this.identity.contextId, (e) => {
1754
+ }, this.journey = new dt(this.journeyOptions, this.diagnostics, this.identity.contextId, (e) => {
1699
1755
  this.bus?.broadcastJourney(e);
1700
- }, this.stores), this.builder = new vr({
1756
+ }, this.stores), this.builder = new kr({
1701
1757
  remote: this.remote,
1702
1758
  config: this.config,
1703
1759
  limits: this.limits,
@@ -1709,9 +1765,9 @@ var q = class e {
1709
1765
  identity: this.identity,
1710
1766
  platform: this.platform,
1711
1767
  debug: this.debugBuffer
1712
- }), this.meter = new Ft(() => this.config.batching.metricFlushIntervalMs, (e, t, n) => {
1768
+ }), this.meter = new Vt(() => this.config.batching.metricFlushIntervalMs, (e, t, n) => {
1713
1769
  this.emitPoint(e, t, n);
1714
- }, this.diagnostics, this.config.metrics), this.diagnostics.setHandler(this.diagnosticHandler());
1770
+ }, this.diagnostics, this.config.metrics), this.diagnostics.setHandler(this.diagnosticHandler()), this.syncProfiler();
1715
1771
  }
1716
1772
  diagnosticHandler() {
1717
1773
  return this.config.diagnostics.records === !1 ? this.config.onDiagnostic : (e) => {
@@ -1723,10 +1779,10 @@ var q = class e {
1723
1779
  if ((t === !0 || t !== !1 && t.includes(e.code)) && !this.recordingDiagnostic) {
1724
1780
  this.recordingDiagnostic = !0;
1725
1781
  try {
1726
- (Nr.has(e.code) ? this.diagnosticLogger.info : this.diagnosticLogger.warn)(e.message, {
1782
+ (Ur.has(e.code) ? this.diagnosticLogger.info : this.diagnosticLogger.warn)(e.message, {
1727
1783
  "diagnostic.code": e.code,
1728
1784
  "diagnostic.count": e.count,
1729
- "diagnostic.detail": Fr(e.detail)
1785
+ "diagnostic.detail": Gr(e.detail)
1730
1786
  });
1731
1787
  } finally {
1732
1788
  this.recordingDiagnostic = !1;
@@ -1738,11 +1794,11 @@ var q = class e {
1738
1794
  let n = {
1739
1795
  t: Date.now(),
1740
1796
  category: "custom",
1741
- message: Ye(String(e), this.limits.maxBodyChars)
1797
+ message: et(String(e), this.limits.maxBodyChars)
1742
1798
  };
1743
1799
  if (t !== void 0) {
1744
- let e = Xe(t, this.limits, this.diagnostics);
1745
- n.data = E(e) ? e : { value: e };
1800
+ let e = tt(t, this.limits, this.diagnostics);
1801
+ n.data = C(e) ? e : { value: e };
1746
1802
  }
1747
1803
  this.breadcrumbs.push(n);
1748
1804
  });
@@ -1751,8 +1807,8 @@ var q = class e {
1751
1807
  !this.destroyed && !this.rotating && this.meter.record(e, t, n);
1752
1808
  }
1753
1809
  startMeasure(e, t) {
1754
- let n = this.identityEpoch, r = () => !this.destroyed && !this.rotating && (!this.config.securityContext.isolation || this.identityEpoch === n);
1755
- return fr(e, this.diagnostics.guard("record.sanitize_failed", "The library could not read the attributes of the measure.", () => ({ ...t })) ?? {}, this.tracing.request().span, {
1810
+ let n = this.identityEpoch, r = () => !this.destroyed && !this.rotating && (!this.config.securityContext.isolation || this.identityEpoch === n), i = this.diagnostics.guard("record.sanitize_failed", "The library could not read the attributes of the measure.", () => ({ ...t }));
1811
+ return Cr(this.diagnostics.guard("record.sanitize_failed", "The library could not read the name of the measure.", () => `${e}`) ?? "", i ?? {}, this.tracing.request().span, {
1756
1812
  metric: (e, t, n) => {
1757
1813
  r() && this.recordMetric(e, t, n);
1758
1814
  },
@@ -1767,9 +1823,9 @@ var q = class e {
1767
1823
  level: "INFO",
1768
1824
  type: "span",
1769
1825
  body: e.name,
1770
- namespace: u,
1826
+ namespace: f,
1771
1827
  payload: e.attributes,
1772
- fixed: Cr(e),
1828
+ fixed: Pr(e),
1773
1829
  trace: {
1774
1830
  traceId: e.traceId,
1775
1831
  spanId: e.spanId,
@@ -1783,13 +1839,49 @@ var q = class e {
1783
1839
  level: "INFO",
1784
1840
  type: "metric",
1785
1841
  body: e,
1786
- namespace: te,
1842
+ namespace: a,
1787
1843
  payload: t,
1788
1844
  fixed: n,
1789
1845
  aggregated: !0
1790
1846
  });
1791
1847
  this.emit(r);
1792
1848
  }
1849
+ syncProfiler() {
1850
+ let { enabled: e } = this.config.profiler;
1851
+ if (e === this.profilerOn) return;
1852
+ this.profilerOn = e;
1853
+ let t = T();
1854
+ if (!e) {
1855
+ t.collect(!1), t.detach();
1856
+ return;
1857
+ }
1858
+ let n = {
1859
+ capacity: this.config.profiler.maxProbes,
1860
+ intervalMs: () => this.config.profiler.flushIntervalMs,
1861
+ emit: (e, t, n) => {
1862
+ this.emitPoint(e, t, n);
1863
+ },
1864
+ diagnostics: this.diagnostics,
1865
+ ready: () => !this.rotating || this.closingContext,
1866
+ outlier: (e, t) => {
1867
+ this.breadcrumbs.push({
1868
+ t: Date.now(),
1869
+ category: "profile",
1870
+ message: `${e} ${String(Math.round(t))} ms`
1871
+ });
1872
+ }
1873
+ };
1874
+ t.attach(n);
1875
+ }
1876
+ setReplay(e) {
1877
+ this.replayConsent = e, e ? this.replay?.start() : this.replay?.stop();
1878
+ }
1879
+ collectPoints() {
1880
+ this.meter.collect(), this.profilerOn && T().collect(!1);
1881
+ }
1882
+ advanceIdentity() {
1883
+ this.identityEpoch++, this.profilerOn && this.config.securityContext.isolation && T().reset();
1884
+ }
1793
1885
  busCanAccept = (e, t) => this.bus?.isRegistered(e, t) ?? !1;
1794
1886
  busAccept = (e, t, n) => {
1795
1887
  this.destroyed || this.ensureBus().then((r) => {
@@ -1799,19 +1891,19 @@ var q = class e {
1799
1891
  });
1800
1892
  };
1801
1893
  static pinned() {
1802
- return globalThis[Or] ?? null;
1894
+ return globalThis[Rr] ?? null;
1803
1895
  }
1804
1896
  static current() {
1805
1897
  let t = e.local;
1806
1898
  if (t) return t.destroyed ? null : t;
1807
1899
  let n = e.pinned();
1808
- return n && Rr(n) ? n : null;
1900
+ return n && Jr(n) ? n : null;
1809
1901
  }
1810
1902
  static stopped() {
1811
1903
  let t = e.local;
1812
1904
  if (t?.destroyed) return t;
1813
- let n = globalThis[kr];
1814
- return n && Rr(n) ? n : null;
1905
+ let n = globalThis[zr];
1906
+ return n && Jr(n) ? n : null;
1815
1907
  }
1816
1908
  isDestroyed() {
1817
1909
  return this.destroyed;
@@ -1822,19 +1914,19 @@ var q = class e {
1822
1914
  e.local = null;
1823
1915
  let i = e.pinned();
1824
1916
  if (i) {
1825
- if (!Rr(i)) return e.startDegraded(t, i.sdkVersion);
1917
+ if (!Jr(i)) return e.startDegraded(t, i.sdkVersion);
1826
1918
  if (!i.destroyed) return i.reconfigure(t), i;
1827
1919
  }
1828
1920
  let a = new e(t);
1829
- return a.tunablesLocked = !n, globalThis[Or] = a, Reflect.deleteProperty(globalThis, kr), a.init(), a;
1921
+ return a.tunablesLocked = !n, globalThis[Rr] = a, Reflect.deleteProperty(globalThis, zr), a.init(), a;
1830
1922
  }
1831
1923
  static startDegraded(t, n) {
1832
1924
  let r = new e(t, !0);
1833
1925
  e.local = r;
1834
1926
  let i = typeof n == "string" ? n : "before 0.9.0";
1835
- return r.mismatchVersion = i, r.diagnostics.report("runtime.version_mismatch", `Another copy of the library, version ${i}, owns the page runtime. This copy, version ${v}, runs in console-only mode and installs no capture. Load one version of the library on the page.`, {
1927
+ return r.mismatchVersion = i, r.diagnostics.report("runtime.version_mismatch", `Another copy of the library, version ${i}, owns the page runtime. This copy, version ${s}, runs in console-only mode and installs no capture. Load one version of the library on the page.`, {
1836
1928
  found: i,
1837
- own: v
1929
+ own: s
1838
1930
  }), r.init(), r;
1839
1931
  }
1840
1932
  reconfigure(e) {
@@ -1843,34 +1935,34 @@ var q = class e {
1843
1935
  return;
1844
1936
  }
1845
1937
  if (this.config.lockConfiguration) {
1846
- let t = G(e, this.diagnostics, this.config);
1938
+ let t = W(e, this.diagnostics, this.config);
1847
1939
  J(this.config, t) || this.diagnostics.report("config.locked", "Runtime configuration is locked. Use setConfigurationLocked(false) to unlock it explicitly.");
1848
1940
  return;
1849
1941
  }
1850
- N(this);
1942
+ j(this);
1851
1943
  let t = this.keepDestination(this.keepRouting(this.allowed(e)));
1852
1944
  !this.tunablesLocked && t.securityContext?.id && (this.explicitSecurityContext = !0);
1853
1945
  for (let e of ["correlation", "persistence"]) (e !== "persistence" || this.tunablesLocked || this.senderLoad !== void 0) && t[e] && !J({
1854
1946
  ...this.config[e],
1855
1947
  ...t[e]
1856
1948
  }, this.config[e]) && (this.diagnostics.report("config.invalid", `${e} cannot change after startup.`), Object.assign(t, { [e]: this.config[e] }));
1857
- let n = G(t, this.diagnostics, this.config);
1949
+ let n = W(t, this.diagnostics, this.config);
1858
1950
  this.keepStartupTunables(n);
1859
1951
  let { redact: r, processors: i } = this.config;
1860
- rr(this.config, n), (this.config.redact !== r || this.config.processors !== i) && this.debugBuffer.clear(), this.breadcrumbs.resize(this.config.capturePolicy.breadcrumbs), this.diagnostics.setHandler(this.diagnosticHandler()), this.diagnostics.setPolicy(this.config.diagnostics.throttleMs, this.config.diagnostics.consoleFallback), this.builder.invalidateResource(), this.console.update(this.config.console), this.keepBuiltStorage(), this.keepBuiltIdentity(), this.refreshCaptures(), this.roleResolved && this.syncSender(), this.diagnostics.report("config.reconfigured", "A later configure() call updated the runtime.");
1952
+ mr(this.config, n), (this.config.redact !== r || this.config.processors !== i) && this.debugBuffer.clear(), this.breadcrumbs.resize(this.config.capturePolicy.breadcrumbs), this.diagnostics.setHandler(this.diagnosticHandler()), this.diagnostics.setPolicy(this.config.diagnostics.throttleMs, this.config.diagnostics.consoleFallback), this.builder.invalidateResource(), this.console.update(this.config.console), this.keepBuiltStorage(), this.keepBuiltIdentity(), this.syncProfiler(), this.refreshCaptures(), this.roleResolved && this.syncSender(), this.diagnostics.report("config.reconfigured", "A later configure() call updated the runtime.");
1861
1953
  }
1862
1954
  onServer() {
1863
1955
  return this.platform.platform === "node";
1864
1956
  }
1865
1957
  allowed(e) {
1866
- return this.degraded ? (this.onServer() && !this.serverReported && Lr(e) && (this.serverReported = !0, this.diagnostics.report("config.invalid", "The library runs console-only on Node. It sends no record and installs no capture. It ignores endpoint, metricsEndpoint, tracesEndpoint, transport and transportWorker.")), Ir(e)) : e;
1958
+ return this.degraded ? (this.onServer() && !this.serverReported && qr(e) && (this.serverReported = !0, this.diagnostics.report("config.invalid", "The library runs console-only on Node. It sends no record and installs no capture. It ignores endpoint, metricsEndpoint, tracesEndpoint, transport and transportWorker.")), Kr(e)) : e;
1867
1959
  }
1868
1960
  keepRouting(e) {
1869
1961
  if (!this.tunablesLocked || this.degraded || !this.config.securityContext.isolation) return e;
1870
- let t = G(e, new or(), this.config), n = Mr.filter((e) => !J(t[e], this.config[e]));
1962
+ let t = W(e, new _r(), this.config), n = Hr.filter((e) => !J(t[e], this.config[e]));
1871
1963
  if (t.securityContext.id !== this.config.securityContext.id && n.push("securityContext.id"), n.length === 0) return e;
1872
1964
  let r = { ...e };
1873
- for (let e of Mr) n.includes(e) && Reflect.deleteProperty(r, e);
1965
+ for (let e of Hr) n.includes(e) && Reflect.deleteProperty(r, e);
1874
1966
  if (n.includes("securityContext.id")) {
1875
1967
  let t = { ...e.securityContext };
1876
1968
  Reflect.deleteProperty(t, "id"), r.securityContext = t;
@@ -1878,16 +1970,18 @@ var q = class e {
1878
1970
  return this.diagnostics.report("config.invalid", `Isolation refuses changes to ${n.join(", ")}. Use rotateSecurityContext() for these changes. To permit them, set securityContext.isolation: false in a separate configure() call. The other settings apply.`), r;
1879
1971
  }
1880
1972
  keepStartupTunables(e) {
1881
- if (this.senderLoad !== void 0 && this.keepSections(e, Ar), !this.tunablesLocked) {
1973
+ if (this.senderLoad !== void 0 && this.keepSections(e, Br), !this.tunablesLocked) {
1882
1974
  this.tunablesLocked = !0, Object.assign(this.limits, e.limits), this.journeyOptions.maxAgeMs = e.journey.maxAgeMs;
1883
1975
  return;
1884
1976
  }
1885
1977
  this.keepSections(e, ["limits"]);
1886
1978
  let { maxAgeMs: t } = this.config.journey;
1887
1979
  e.journey.maxAgeMs !== t && (this.diagnostics.report("config.invalid", `journey.maxAgeMs cannot change after startup. It stays ${String(t)}.`, { requested: e.journey.maxAgeMs }), e.journey.maxAgeMs = t);
1980
+ let { maxProbes: n } = this.config.profiler;
1981
+ e.profiler.maxProbes !== n && (this.diagnostics.report("config.invalid", `profiler.maxProbes cannot change after startup. It stays ${String(n)}.`, { requested: e.profiler.maxProbes }), e.profiler.maxProbes = n);
1888
1982
  }
1889
1983
  keepSections(e, t) {
1890
- for (let n of t) J(e[n], this.config[n]) || (this.diagnostics.report("config.invalid", `${n} cannot change after startup. The values in force stay.`, { requested: e[n] }), Object.assign(e, { [n]: this.config[n] }));
1984
+ for (let n of t) J(e[n], this.config[n]) || (this.diagnostics.report("config.invalid", `${n} cannot change after startup. The current values stay.`, { requested: e[n] }), Object.assign(e, { [n]: this.config[n] }));
1891
1985
  }
1892
1986
  keepBuiltStorage() {
1893
1987
  let e = this.storageBuiltAs;
@@ -1896,8 +1990,8 @@ var q = class e {
1896
1990
  keepDestination(e) {
1897
1991
  if (this.senderLoad === void 0) return e;
1898
1992
  let t = e;
1899
- for (let n of ["transport", "transportWorker"]) n in e && e[n] === void 0 != (this.config[n] === void 0) && (this.diagnostics.report("config.invalid", `You cannot add or remove ${n} after the delivery stack loads. The transport in force stays.`), t = { ...t }, Reflect.deleteProperty(t, n));
1900
- return (t.endpoint === null || t.endpoint === "") && this.config.transport === void 0 && (this.diagnostics.report("config.invalid", "You cannot remove the endpoint after the delivery stack loads. The endpoint in force stays."), t = {
1993
+ for (let n of ["transport", "transportWorker"]) n in e && e[n] === void 0 != (this.config[n] === void 0) && (this.diagnostics.report("config.invalid", `You cannot add or remove ${n} after the delivery stack loads. The current transport stays.`), t = { ...t }, Reflect.deleteProperty(t, n));
1994
+ return (t.endpoint === null || t.endpoint === "") && this.config.transport === void 0 && (this.diagnostics.report("config.invalid", "You cannot remove the endpoint after the delivery stack loads. The current endpoint stays."), t = {
1901
1995
  ...t,
1902
1996
  endpoint: void 0
1903
1997
  }), t;
@@ -1938,22 +2032,22 @@ var q = class e {
1938
2032
  }
1939
2033
  async buildBus() {
1940
2034
  try {
1941
- let { Bus: e } = await import("./bus-BZ0GldpT.js");
2035
+ let { Bus: e } = await import("./bus-ecxUNTja.js");
1942
2036
  if (this.destroyed) return null;
1943
2037
  let t = new e(this.config, this.diagnostics, this.platform, this.identity.contextId, this.identity.tabId, {
1944
2038
  onSecurityContext: (e) => {
1945
2039
  if (this.explicitSecurityContext && this.config.securityContext.id !== e) return this.contextMismatch = !0, this.diagnostics.report("security.context_mismatch", "The configured security context differs from the upstream owner."), !1;
1946
2040
  if (this.contextMismatch = !1, this.config.securityContext.id !== e) {
1947
2041
  if (this.ownerAdopted) {
1948
- N(this), this.drops.add("security_context", [
2042
+ j(this), this.drops.add("security_context", [
1949
2043
  ...this.bootBuffer.take(),
1950
2044
  ...this.pendingRecords.take(),
1951
2045
  ...this.forwardBuffer
1952
2046
  ]), this.forwardBuffer = [], this.context.clear(), this.breadcrumbs.clear();
1953
2047
  let e = this.rotating;
1954
- this.rotating = !0, this.meter.collect();
2048
+ this.rotating = !0, this.collectPoints(), this.profilerOn && T().reset();
1955
2049
  let t = this.sessionTouch.stored();
1956
- this.resetSession(t !== void 0 && t !== this.identity.sessionId ? t : A(this.diagnostics)), this.rotating = e, this.identityEpoch++, this.remote.sampling = null, this.refreshCaptures();
2050
+ this.resetSession(t !== void 0 && t !== this.identity.sessionId ? t : O(this.diagnostics)), this.rotating = e, this.advanceIdentity(), this.remote.sampling = null, this.refreshCaptures();
1957
2051
  }
1958
2052
  this.config.securityContext.id = e;
1959
2053
  }
@@ -1991,7 +2085,7 @@ var q = class e {
1991
2085
  async buildSender() {
1992
2086
  this.storageBuiltAs = this.config.storage;
1993
2087
  try {
1994
- let { Sender: e } = await import("./sender-CiMHC9YG.js"), t = this.destroyed ? null : await e.create({
2088
+ let { Sender: e } = await import("./sender-15zEsZpr.js"), t = this.destroyed ? null : await e.create({
1995
2089
  storage: this.memoryStorage,
1996
2090
  onStorage: (e) => {
1997
2091
  e.name === "memory" && (this.memoryStorage = e);
@@ -2005,7 +2099,7 @@ var q = class e {
2005
2099
  onLoss: this.reportLoss,
2006
2100
  remote: this.remote,
2007
2101
  beforeExit: () => {
2008
- N(this), this.meter.collect(), this.tracing.end();
2102
+ j(this), this.collectPoints(), this.tracing.end();
2009
2103
  }
2010
2104
  });
2011
2105
  if (!t || this.destroyed) {
@@ -2023,11 +2117,35 @@ var q = class e {
2023
2117
  let e = this.remote.sampling?.wire();
2024
2118
  e && (this.remoteCaptureTimer = setTimeout(() => {
2025
2119
  this.refreshCaptures();
2026
- }, e.ttlMs), Ge(this.remoteCaptureTimer)), Pr(this.effectiveCapture()) !== this.installedCaptureKey && this.installCaptures();
2120
+ }, e.ttlMs), Xe(this.remoteCaptureTimer)), this.captureState(this.effectiveCapture()) !== this.installedCaptureKey && this.installCaptures();
2121
+ }
2122
+ captureState(e) {
2123
+ let { enabled: t, framePhases: n, framePacing: r } = this.config.profiler;
2124
+ return `${Wr(e)}${String(t && n)}${String(t && r)}${this.replayState(e)}`;
2125
+ }
2126
+ replayState(e) {
2127
+ let { replay: t } = this.config;
2128
+ return t.enabled ? JSON.stringify([
2129
+ t.loader && K(t.loader),
2130
+ t.onSegment && K(t.onSegment),
2131
+ K(t.recordOptions),
2132
+ t.endpoint,
2133
+ t.requireConsent,
2134
+ t.mode,
2135
+ t.maskText,
2136
+ t.maskInputs,
2137
+ t.maskSelectors,
2138
+ t.blockSelectors,
2139
+ t.recordCanvas,
2140
+ t.bufferMs,
2141
+ t.plugins.map(K),
2142
+ e.fullUrls,
2143
+ e.ignoreUrls.map(String)
2144
+ ]) : "";
2027
2145
  }
2028
2146
  effectiveCapture() {
2029
2147
  let e = { ...this.config.capture }, t = this.remote.sampling?.current()?.capture;
2030
- for (let n of ke) {
2148
+ for (let n of Te) {
2031
2149
  let r = t?.[n];
2032
2150
  if (e.remoteToggles.includes(n) && r !== void 0) {
2033
2151
  if (r && typeof e[n] == "object") continue;
@@ -2039,19 +2157,21 @@ var q = class e {
2039
2157
  async installCaptures() {
2040
2158
  if (this.degraded) return;
2041
2159
  let e = ++this.captureGeneration, t = this.effectiveCapture();
2042
- this.installedCaptureKey = Pr(t);
2043
- let n = [];
2044
- (t.errors || t.rejections || t.resourceErrors) && n.push("errors"), (t.fetch || t.xhr) && n.push("network"), (t.interactions || t.navigation) && n.push("interactions"), t.webVitals && n.push("webVitals"), t.longFrames && n.push("longFrames"), (Array.isArray(t.console) ? t.console.length > 0 : t.console) && n.push("console"), t.uncleanExit && n.push("uncleanExit"), t.userTiming && n.push("userTiming"), t.reports && n.push("reports"), t.resourceTiming && n.push("resourceTiming"), t.lifecycle && n.push("lifecycle");
2045
- let [r, i] = await Promise.all([Promise.all(n.map((e) => this.loadCapture(e))), t.webSocket ? this.loadWebSocket() : void 0]);
2160
+ this.installedCaptureKey = this.captureState(t);
2161
+ let n = this.replayState(t);
2162
+ n !== this.replayBuiltKey && (this.replayBuiltKey = "");
2163
+ let r = n !== "" && n === this.replayBuiltKey ? this.replay : void 0, i = [], { profiler: a } = this.config;
2164
+ (t.errors || t.rejections || t.resourceErrors) && i.push("errors"), (t.fetch || t.xhr) && i.push("network"), (t.interactions || t.navigation) && i.push("interactions"), t.webVitals && i.push("webVitals"), t.longFrames && i.push("longFrames"), (Array.isArray(t.console) ? t.console.length > 0 : t.console) && i.push("console"), t.uncleanExit && i.push("uncleanExit"), t.userTiming && i.push("userTiming"), t.reports && i.push("reports"), t.resourceTiming && i.push("resourceTiming"), t.lifecycle && i.push("lifecycle"), a.enabled && a.framePhases && i.push("framePhases"), a.enabled && a.framePacing && i.push("framePacing"), this.config.replay.enabled && !r && i.push("replay");
2165
+ let [o, s] = await Promise.all([Promise.all(i.map((e) => this.loadCapture(e))), t.webSocket ? this.loadWebSocket() : void 0]);
2046
2166
  if (e !== this.captureGeneration || this.destroyed) return;
2047
- this.uninstallCaptures();
2048
- let a = {
2167
+ this.uninstallCaptures(r);
2168
+ let c = {
2049
2169
  isActive: () => !this.destroyed && !this.rotating,
2050
2170
  config: Object.assign(Object.create(this.config), { capture: t }),
2051
2171
  diagnostics: this.diagnostics,
2052
2172
  breadcrumbs: this.breadcrumbs,
2053
2173
  tracing: this.tracing,
2054
- logger: new F(() => this, _),
2174
+ logger: new N(() => this, g),
2055
2175
  once: this.captureOnce,
2056
2176
  recordMetric: (e, t, n) => {
2057
2177
  this.recordMetric(e, t, n);
@@ -2059,40 +2179,54 @@ var q = class e {
2059
2179
  recordSpan: (e) => {
2060
2180
  this.recordSpan(e);
2061
2181
  },
2062
- sessionId: () => this.identity.sessionId
2182
+ sessionId: () => this.identity.sessionId,
2183
+ onError: (e) => {
2184
+ this.errorHook = e;
2185
+ },
2186
+ setContext: (e, t) => {
2187
+ t === void 0 ? this.context.remove(e) : this.context.set(e, t);
2188
+ },
2189
+ replayConsent: () => this.replayConsent
2063
2190
  };
2064
- for (let e of r) e && this.captures.push(new e(a));
2065
- let o = i ? [...t.plugins, new i(this.diagnostics, a.config)] : t.plugins;
2066
- for (let e of o) this.captures.push(this.pluginCapture(e));
2191
+ o.forEach((e, t) => {
2192
+ if (e) {
2193
+ let r = new e(c);
2194
+ this.captures.push(r), i[t] === "replay" && (this.replay = r, this.replayBuiltKey = n);
2195
+ }
2196
+ });
2197
+ let l = s ? [...t.plugins, new s(this.diagnostics, c.config)] : t.plugins;
2198
+ for (let e of l) this.captures.push(this.pluginCapture(e));
2067
2199
  for (let e of this.captures) this.diagnostics.guard("capture.install_failed", `The library could not install the ${e.name} capture.`, () => {
2068
2200
  e.install();
2069
2201
  });
2070
2202
  }
2071
- uninstallCaptures() {
2072
- for (let e of this.captures) this.diagnostics.guard("capture.install_failed", `The library could not uninstall the ${e.name} capture.`, () => {
2073
- e.uninstall();
2203
+ uninstallCaptures(e) {
2204
+ for (let t of this.captures) t !== e && this.diagnostics.guard("capture.install_failed", `The library could not uninstall the ${t.name} capture.`, () => {
2205
+ t.uninstall();
2074
2206
  });
2075
- this.captures.length = 0;
2207
+ this.captures.length = 0, this.replay = e, e && this.captures.push(e);
2076
2208
  }
2077
2209
  loadWebSocket() {
2078
- return this.diagnostics.guardAsync("capture.install_failed", "The library could not load the webSocket capture.", async () => (await import("./web-socket-CV7yIMnm.js")).WebSocketCapture);
2210
+ return this.diagnostics.guardAsync("capture.install_failed", "The library could not load the webSocket capture.", async () => (await import("./web-socket-DthJuSAg.js")).WebSocketCapture);
2079
2211
  }
2080
2212
  pluginCapture(e) {
2081
2213
  let { name: t } = e, n = (e, t, n) => {
2082
2214
  this.recordMetric(e, t, n);
2083
- }, r = {
2084
- logger: new F(() => this, `${_}.${t}`),
2085
- counter: (e, t = {}) => Nt(e, t, n),
2086
- histogram: (e, t = {}) => Pt(e, t, n),
2215
+ }, r = (e) => {
2216
+ this.diagnostics.report("config.invalid", de, void 0, e);
2217
+ }, i = {
2218
+ logger: new N(() => this, `${g}.${t}`),
2219
+ counter: (e, t = {}) => zt(e, t, n, r),
2220
+ histogram: (e, t = {}) => Bt(e, t, n, r),
2087
2221
  addBreadcrumb: (e, t) => {
2088
2222
  this.addBreadcrumb(e, t);
2089
2223
  },
2090
- ownRequest: rt
2224
+ ownRequest: ct
2091
2225
  };
2092
2226
  return {
2093
2227
  name: t,
2094
2228
  install: () => {
2095
- e.install(r);
2229
+ e.install(i);
2096
2230
  },
2097
2231
  uninstall: () => {
2098
2232
  e.uninstall();
@@ -2100,7 +2234,7 @@ var q = class e {
2100
2234
  };
2101
2235
  }
2102
2236
  loadCapture(e) {
2103
- return this.diagnostics.guardAsync("capture.install_failed", `The library could not load the ${e} capture.`, wr[e]);
2237
+ return this.diagnostics.guardAsync("capture.install_failed", `The library could not load the ${e} capture.`, Fr[e]);
2104
2238
  }
2105
2239
  registerWorker(e, t = {}) {
2106
2240
  let n = !1, r;
@@ -2122,15 +2256,16 @@ var q = class e {
2122
2256
  }
2123
2257
  async destroy() {
2124
2258
  if (this.destroyed) return;
2125
- N(this), this.meter.collect(), this.tracing.end(), this.destroyed = !0, bt(this), clearTimeout(this.remoteCaptureTimer), this.remoteCaptureTimer = void 0, this.degraded || removeEventListener("pagehide", this.onPageHide), this.uninstallCaptures();
2259
+ j(this), this.collectPoints(), this.profilerOn && (this.profilerOn = !1, T().detach()), this.tracing.end(), this.destroyed = !0, Tt(this), clearTimeout(this.remoteCaptureTimer), this.remoteCaptureTimer = void 0, this.degraded || removeEventListener("pagehide", this.onPageHide), this.uninstallCaptures();
2126
2260
  let t = this.sender?.destroy();
2127
- this.journey.destroy(), this.sendForwarded(), this.bus?.destroy(), this.drops.add("load_failed", this.pendingRecords.take()), await t, await this.senderLoad, await this.rotation?.catch(() => void 0), await this.memoryStorage?.close(), e.pinned() === this && (Reflect.deleteProperty(globalThis, Or), globalThis[kr] = this);
2261
+ this.journey.destroy(), this.sendForwarded(), this.bus?.destroy(), this.drops.add("load_failed", this.pendingRecords.take()), await t, await this.senderLoad, await this.rotation?.catch(() => void 0), await this.memoryStorage?.close(), e.pinned() === this && (Reflect.deleteProperty(globalThis, Rr), globalThis[zr] = this);
2128
2262
  }
2129
2263
  emit(e) {
2130
2264
  if (!e || this.destroyed || this.rotating && !this.closingContext) return;
2131
2265
  this.sessionTouch.touch(this.identity.sessionId);
2132
- let t = e.severityText === "ERROR" || e.severityText === "FATAL" ? [...this.debugBuffer.drain(), e] : [e];
2133
- for (let e of t) this.ready ? this.route(e) : this.bootBuffer.push(e);
2266
+ let t = e.severityText === "ERROR" || e.severityText === "FATAL", n = t ? [...this.debugBuffer.drain(), e] : [e];
2267
+ t && this.errorHook?.(e);
2268
+ for (let e of n) this.ready ? this.route(e) : this.bootBuffer.push(e);
2134
2269
  }
2135
2270
  route(e) {
2136
2271
  this.role() === "forwarder" ? this.forward(e) : this.deliver(e);
@@ -2158,11 +2293,11 @@ var q = class e {
2158
2293
  }
2159
2294
  let t = [];
2160
2295
  for (let n of e) {
2161
- if (!ze(n)) {
2296
+ if (!We(n)) {
2162
2297
  this.diagnostics.count("record.dropped_malformed");
2163
2298
  continue;
2164
2299
  }
2165
- if (n.attributes["uiobs.debug_buffer"] !== !0 && !ct(n, this.config, this.remote.sampling?.current() ?? null)) {
2300
+ if (n.attributes["uiobs.debug_buffer"] !== !0 && !pt(n, this.config, this.remote.sampling?.current() ?? null)) {
2166
2301
  this.diagnostics.count("record.dropped_by_sampling");
2167
2302
  continue;
2168
2303
  }
@@ -2182,51 +2317,51 @@ var q = class e {
2182
2317
  reportGap = (e, t) => {
2183
2318
  this.drops.add(e.reason, t.flatMap((e) => e.records), t.map((e) => e.id));
2184
2319
  let n = Date.now();
2185
- n - this.lastGapAt < 6e4 || (this.lastGapAt = n, new F(() => this, Ie).warn("stored records were dropped before delivery", {
2320
+ n - this.lastGapAt < 6e4 || (this.lastGapAt = n, new N(() => this, u).warn("stored records were dropped before delivery", {
2186
2321
  "gap.batches": e.batches,
2187
2322
  "gap.records": e.records,
2188
2323
  "gap.reason": e.reason
2189
2324
  }));
2190
2325
  };
2191
2326
  regenerateTabId() {
2192
- let e = A(this.diagnostics);
2327
+ let e = O(this.diagnostics);
2193
2328
  this.diagnostics.report("bus.role_resolved", "Another context uses this tab id. A duplicated tab is the usual cause. The library makes a new tab id.", {
2194
2329
  was: this.identity.tabId,
2195
2330
  now: e
2196
- }), this.identity.tabId = e, Ze(e, this.diagnostics, this.stores), this.builder.invalidateResource();
2331
+ }), this.identity.tabId = e, nt(e, this.diagnostics, this.stores), this.builder.invalidateResource();
2197
2332
  }
2198
2333
  newSession() {
2199
- this.destroyed || (N(this), this.resetSession(A(this.diagnostics)));
2334
+ this.destroyed || (j(this), this.resetSession(O(this.diagnostics)));
2200
2335
  }
2201
2336
  resetSession(e) {
2202
- this.meter.collect(), this.tracing.rotate("explicit"), this.journey.end(), this.breadcrumbs.clear(), this.debugBuffer.clear(), this.identity.sessionId = e, this.sessionTouch.restart(e), this.builder.invalidateResource();
2337
+ this.collectPoints(), this.tracing.rotate("explicit"), this.journey.end(), this.breadcrumbs.clear(), this.debugBuffer.clear(), this.replay?.reset(), this.identity.sessionId = e, this.sessionTouch.restart(e), this.builder.invalidateResource();
2203
2338
  }
2204
2339
  rotateSecurityContext(e, t = {}) {
2205
2340
  if (this.rotation) return Promise.reject(/* @__PURE__ */ Error("A security-context rotation is already running."));
2206
2341
  let n = t.pending ?? "discard", r = t.timeoutMs ?? 5e3;
2207
- return !E(e) || !E(e.delivery) || ![
2342
+ return !C(e) || !C(e.delivery) || ![
2208
2343
  "discard",
2209
2344
  "flush",
2210
2345
  "retain",
2211
2346
  "carry"
2212
- ].includes(n) || !Number.isFinite(r) || r < 0 || e.id !== void 0 && (typeof e.id != "string" || e.id.length === 0) ? Promise.reject(/* @__PURE__ */ Error("Invalid security-context rotation options.")) : this.destroyed ? Promise.reject(/* @__PURE__ */ Error("The runtime has stopped.")) : (N(this), this.rotating = !0, this.rotation = this.rotateContext(e, n, r).finally(() => {
2347
+ ].includes(n) || !Number.isFinite(r) || r < 0 || e.id !== void 0 && (typeof e.id != "string" || e.id.length === 0) ? Promise.reject(/* @__PURE__ */ Error("Invalid security-context rotation options.")) : this.destroyed ? Promise.reject(/* @__PURE__ */ Error("The runtime has stopped.")) : (j(this), this.rotating = !0, this.rotation = this.rotateContext(e, n, r).finally(() => {
2213
2348
  this.rotating = !1, this.rotation = void 0;
2214
2349
  }), this.rotation);
2215
2350
  }
2216
2351
  async rotateContext(e, t, n) {
2217
2352
  if (await this.started, this.role() === "forwarder") throw Error("Rotate the security context on the upstream owner, or use bus.mode: sender for an independent identity.");
2218
2353
  await this.senderLoad;
2219
- let r = this.config.securityContext.id, i = e.id ?? A(this.diagnostics);
2354
+ let r = this.config.securityContext.id, i = e.id ?? O(this.diagnostics);
2220
2355
  if (i === r) throw Error("A rotation requires a different security-context id.");
2221
2356
  let a = {
2222
- ...jr,
2357
+ ...Vr,
2223
2358
  ...e.delivery
2224
- }, o = this.diagnostics.snapshot()["config.invalid"] ?? 0, s = G(this.allowed({
2359
+ }, o = this.diagnostics.snapshot()["config.invalid"] ?? 0, s = W(this.allowed({
2225
2360
  ...a,
2226
2361
  securityContext: { id: i }
2227
2362
  }), this.diagnostics, {
2228
2363
  ...this.config,
2229
- ...jr
2364
+ ...Vr
2230
2365
  });
2231
2366
  if ((this.diagnostics.snapshot()["config.invalid"] ?? 0) !== o) throw Error("Invalid delivery settings for the next security context.");
2232
2367
  let c = e.context ? Object.fromEntries(Object.entries(e.context)) : void 0, l = /* @__PURE__ */ new Set([
@@ -2240,7 +2375,7 @@ var q = class e {
2240
2375
  ]);
2241
2376
  s.capture.ignoreUrls = s.capture.ignoreUrls.filter((e) => !l.has(e) || u.has(e)), this.closingContext = !0;
2242
2377
  try {
2243
- this.meter.collect(), this.tracing.end(), this.journey.end();
2378
+ this.collectPoints(), this.tracing.end(), this.journey.end();
2244
2379
  } finally {
2245
2380
  this.closingContext = !1;
2246
2381
  }
@@ -2258,20 +2393,20 @@ var q = class e {
2258
2393
  };
2259
2394
  if (this.destroyed) return;
2260
2395
  let m = [...d, ...p.buffered], h = p.stored.flatMap((e) => e.records);
2261
- t !== "retain" && t !== "carry" && this.drops.add("security_context", [...m, ...h]), s.lockConfiguration = this.config.lockConfiguration, rr(this.config, s), this.identityEpoch++, this.remote.sampling = null, this.refreshCaptures(), this.context.clear(), c && this.context.setMany(c), this.breadcrumbs.clear(), this.newSession(), this.builder.invalidateResource(), await this.syncSender(), this.bus?.rotateContext(), this.rotating = !1, t === "carry" && await this.carry(m, p.stored), this.diagnostics.report("security.rotated", "The runtime rotated its security context.", { pending: t });
2396
+ t !== "retain" && t !== "carry" && this.drops.add("security_context", [...m, ...h]), s.lockConfiguration = this.config.lockConfiguration, mr(this.config, s), this.advanceIdentity(), this.remote.sampling = null, this.refreshCaptures(), this.context.clear(), c && this.context.setMany(c), this.breadcrumbs.clear(), this.newSession(), this.builder.invalidateResource(), await this.syncSender(), this.bus?.rotateContext(), this.rotating = !1, t === "carry" && await this.carry(m, p.stored), this.diagnostics.report("security.rotated", "The runtime rotated its security context.", { pending: t });
2262
2397
  }
2263
2398
  async carry(e, t) {
2264
2399
  for (let t of e) this.route(t);
2265
2400
  this.sender && await this.sender.adopt(t, this.config.securityContext.id);
2266
2401
  }
2267
2402
  async debugBundle(e) {
2268
- let { configSummary: t } = await import("./debug-bundle-C7UkHZ-q.js"), { record: n } = this.builder.build({
2403
+ let { configSummary: t } = await import("./debug-bundle-BOdYmCeV.js"), { record: n } = this.builder.build({
2269
2404
  level: "INFO",
2270
2405
  type: "system",
2271
2406
  body: "debug bundle",
2272
- namespace: Oe,
2273
- payload: { [b]: this.breadcrumbs.snapshot() }
2274
- }, !0), r = n?.attributes ?? {}, i = r[b], a = r[C];
2407
+ namespace: Ae,
2408
+ payload: { [x]: this.breadcrumbs.snapshot() }
2409
+ }, !0), r = n?.attributes ?? {}, i = r[x], a = r[Le];
2275
2410
  return {
2276
2411
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
2277
2412
  sdkVersion: this.sdkVersion,
@@ -2333,10 +2468,10 @@ var q = class e {
2333
2468
  return;
2334
2469
  }
2335
2470
  let [{ createStorage: t, storageName: n }, { ContextStorage: r }, { storageLimits: i }, { clearEmergencyContext: a }] = await Promise.all([
2336
- import("./factory-BonqI3NL.js"),
2471
+ import("./factory-e9Qo3K0z.js"),
2337
2472
  import("./context-storage-BzkoHzkQ.js"),
2338
2473
  import("./storage-DZwed89z.js"),
2339
- import("./emergency-queue-Zy6lNafo.js")
2474
+ import("./emergency-queue-B9WZxanZ.js")
2340
2475
  ]), o = this.config.persistence.namespace, s = this.memoryStorage ?? await t(this.config.storage, n(o), i(this.config.retention), this.diagnostics, void 0, o), c = new r(s, this.config.securityContext, o);
2341
2476
  try {
2342
2477
  e === "namespace" ? await c.clearNamespace() : await c.clear(), a(this.config.securityContext.id, this.diagnostics, o, e === "namespace");
@@ -2348,7 +2483,7 @@ var q = class e {
2348
2483
  return await this.senderLoad, await this.sender?.queueDepth() ?? 0;
2349
2484
  }
2350
2485
  async flush() {
2351
- N(this), this.meter.collect(), this.ready || await this.started, this.role() === "forwarder" ? this.sendForwarded() : (await this.senderLoad, await this.sender?.flush());
2486
+ j(this), this.collectPoints(), this.ready || await this.started, this.role() === "forwarder" ? this.sendForwarded() : (await this.senderLoad, await this.sender?.flush());
2352
2487
  }
2353
2488
  };
2354
2489
  function J(e, t, n = /* @__PURE__ */ new WeakMap()) {
@@ -2362,34 +2497,34 @@ function J(e, t, n = /* @__PURE__ */ new WeakMap()) {
2362
2497
  }
2363
2498
  // src/transport/worker-entry.ts
2364
2499
  var Y;
2365
- function zr(e = {}) {
2500
+ function Yr(e = {}) {
2366
2501
  if (Y) return Y;
2367
- let n = new or(e.onDiagnostic);
2368
- if (typeof document < "u" || typeof addEventListener != "function") return n.report("config.invalid", "Call serveTransportWorker() in a dedicated worker."), () => void 0;
2369
- let r = !1, i, a, o = (e) => {
2370
- n.guard("transport.http_error", "The transport worker could not read its connection.", () => {
2371
- let o = e.data;
2372
- if (!E(o) || o.p !== "ui-observability.transport/1" || o.t !== t.connect || e.ports.length === 0) return;
2373
- let s = e.ports[0];
2374
- i || o.v !== "0.11.0" ? (s.postMessage(Re), s.close()) : (i = s, import("./worker-server-Dp5HYm4b.js").then((e) => {
2375
- r || (a = e.serveWorkerPort(s, n));
2502
+ let t = new _r(e.onDiagnostic);
2503
+ if (typeof document < "u" || typeof addEventListener != "function") return t.report("config.invalid", "Call serveTransportWorker() in a dedicated worker."), () => void 0;
2504
+ let n = !1, r, i, a = (e) => {
2505
+ t.guard("transport.http_error", "The transport worker could not read its connection.", () => {
2506
+ let a = e.data;
2507
+ if (!C(a) || a.p !== "ui-observability.transport/1" || a.t !== te.connect || e.ports.length === 0) return;
2508
+ let o = e.ports[0];
2509
+ r || a.v !== "0.12.0" ? (o.postMessage(ce), o.close()) : (r = o, import("./worker-server-Cne9MX9I.js").then((e) => {
2510
+ n || (i = e.serveWorkerPort(o, t));
2376
2511
  }).catch((e) => {
2377
- n.report("transport.http_error", "The transport worker delivery module could not load.", void 0, e), n.guard("transport.http_error", "The failed transport port could not be closed.", () => {
2378
- s.postMessage(Re), s.close();
2512
+ t.report("transport.http_error", "The transport worker delivery module could not load.", void 0, e), t.guard("transport.http_error", "The failed transport port could not be closed.", () => {
2513
+ o.postMessage(ce), o.close();
2379
2514
  });
2380
2515
  }));
2381
2516
  });
2382
- }, s = () => {
2383
- r || (r = !0, Y = void 0, removeEventListener("message", o), a?.(), n.guard("transport.http_error", "The transport service could not close its port.", () => {
2384
- i?.postMessage(Re);
2385
- }), n.guard("transport.http_error", "The transport port could not close.", () => {
2386
- i?.close();
2517
+ }, o = () => {
2518
+ n || (n = !0, Y = void 0, removeEventListener("message", a), i?.(), t.guard("transport.http_error", "The transport service could not close its port.", () => {
2519
+ r?.postMessage(ce);
2520
+ }), t.guard("transport.http_error", "The transport port could not close.", () => {
2521
+ r?.close();
2387
2522
  }));
2388
2523
  };
2389
- return addEventListener("message", o), Y = s, s;
2524
+ return addEventListener("message", a), Y = o, o;
2390
2525
  }
2391
2526
  // src/transport/memory-transport.ts
2392
- function Br() {
2527
+ function Xr() {
2393
2528
  let e = [], t = [], n = { status: 200 };
2394
2529
  return {
2395
2530
  transport: (r) => (e.push(r), n.status >= 200 && n.status < 300 && t.push(r), Promise.resolve({ ...n })),
@@ -2411,19 +2546,19 @@ var X = /* @__PURE__ */ new Map();
2411
2546
  function Z() {
2412
2547
  return (q.current() ?? q.stopped()) || q.configure({}, !0);
2413
2548
  }
2414
- function Vr(e = "context") {
2549
+ function Zr(e = "context") {
2415
2550
  return ["context", "namespace"].includes(e) ? Z().clearPersisted(e) : Promise.reject(/* @__PURE__ */ Error("Invalid persistence scope."));
2416
2551
  }
2417
- function Hr(e) {
2552
+ function Qr(e) {
2418
2553
  q.configure(e), Q();
2419
2554
  }
2420
- function Ur(e) {
2555
+ function $r(e) {
2421
2556
  Z().setConfigurationLocked(e);
2422
2557
  }
2423
- function Wr(e, t) {
2558
+ function ei(e, t) {
2424
2559
  return Z().rotateSecurityContext(e, t);
2425
2560
  }
2426
- async function Gr() {
2561
+ async function ti() {
2427
2562
  let e = Z();
2428
2563
  return Q(), {
2429
2564
  ...await e.health(),
@@ -2433,8 +2568,8 @@ async function Gr() {
2433
2568
  }
2434
2569
  };
2435
2570
  }
2436
- async function Kr() {
2437
- let e = await Gr();
2571
+ async function ni() {
2572
+ let e = await ti();
2438
2573
  return Z().debugBundle(e);
2439
2574
  }
2440
2575
  function Q() {
@@ -2445,118 +2580,131 @@ function Q() {
2445
2580
  }
2446
2581
  return t;
2447
2582
  }
2448
- function qr(e, t) {
2583
+ function ri(e, t) {
2449
2584
  let n = Q();
2450
- if (t || n === 0) return new F(Z, e, t);
2585
+ if (t || n === 0) return new N(Z, e, t);
2451
2586
  let r = X.get(e);
2452
- return r ??= new F(Z, e), X.delete(e), X.set(e, r), Q(), r;
2587
+ return r ??= new N(Z, e), X.delete(e), X.set(e, r), Q(), r;
2453
2588
  }
2454
2589
  function $() {
2455
- return qr("app");
2590
+ return ri("app");
2456
2591
  }
2457
- function Jr(e, t) {
2592
+ function ii(e, t) {
2458
2593
  $().trace(e, t);
2459
2594
  }
2460
- function Yr(e, t) {
2595
+ function ai(e, t) {
2461
2596
  $().debug(e, t);
2462
2597
  }
2463
- function Xr(e, t) {
2598
+ function oi(e, t) {
2464
2599
  $().info(e, t);
2465
2600
  }
2466
- function Zr(e, t) {
2601
+ function si(e, t) {
2467
2602
  $().warn(e, t);
2468
2603
  }
2469
- function Qr(e, t, n) {
2604
+ function ci(e, t, n) {
2470
2605
  $().error(e, t, n);
2471
2606
  }
2472
- function $r(e, t, n) {
2607
+ function li(e, t, n) {
2473
2608
  $().fatal(e, t, n);
2474
2609
  }
2475
- function ei(e, t) {
2610
+ function ui(e, t) {
2476
2611
  $().logAction(e, t);
2477
2612
  }
2478
- function ti(e, t) {
2613
+ function di(e, t) {
2479
2614
  $().logEvent(e, t);
2480
2615
  }
2481
- function ni(e, t, n, r, i) {
2616
+ function fi(e, t, n, r, i) {
2482
2617
  $().logMetric(e, t, n, r, i);
2483
2618
  }
2484
- function ri(e, t = {}) {
2485
- return Nt(e, t, (e, t, n) => {
2619
+ function pi(e) {
2620
+ q.current()?.diagnostics.report("config.invalid", de, void 0, e);
2621
+ }
2622
+ function mi(e, t = {}) {
2623
+ return zt(e, t, (e, t, n) => {
2486
2624
  Z().recordMetric(e, t, n);
2487
- });
2625
+ }, pi);
2488
2626
  }
2489
- function ii(e, t = {}) {
2490
- return Pt(e, t, (e, t, n) => {
2627
+ function hi(e, t = {}) {
2628
+ return Bt(e, t, (e, t, n) => {
2491
2629
  Z().recordMetric(e, t, n);
2492
- });
2630
+ }, pi);
2493
2631
  }
2494
- function ai(e, t) {
2632
+ function gi(e, t) {
2495
2633
  return Z().startMeasure(e, t);
2496
2634
  }
2497
- function oi(e, t, n) {
2635
+ function _i() {
2636
+ Z().setReplay(!0);
2637
+ }
2638
+ function vi() {
2639
+ Z().setReplay(!1);
2640
+ }
2641
+ var yi = {
2642
+ probe: (e, t) => T().probe(e, t, q.current()?.diagnostics),
2643
+ time: (e, t) => T().time(e, t, q.current()?.diagnostics)
2644
+ };
2645
+ function bi(e, t, n) {
2498
2646
  return $().timeSync(e, t, n);
2499
2647
  }
2500
- function si(e, t, n) {
2648
+ function xi(e, t, n) {
2501
2649
  return $().timeAsync(e, t, n);
2502
2650
  }
2503
- function ci(e, t) {
2651
+ function Si(e, t) {
2504
2652
  Z().addBreadcrumb(e, t);
2505
2653
  }
2506
- function li(e, t) {
2654
+ function Ci(e, t) {
2507
2655
  Z().context.set(e, t);
2508
2656
  }
2509
- function ui(e) {
2657
+ function wi(e) {
2510
2658
  Z().context.setMany(e);
2511
2659
  }
2512
- function di(e) {
2660
+ function Ti(e) {
2513
2661
  Z().context.remove(e);
2514
2662
  }
2515
- function fi(e, t) {
2663
+ function Ei(e, t) {
2516
2664
  return Z().journey.start(e, t);
2517
2665
  }
2518
- function pi() {
2666
+ function Di() {
2519
2667
  Z().journey.end();
2520
2668
  }
2521
- function mi() {
2669
+ function Oi() {
2522
2670
  return Z().journey.current();
2523
2671
  }
2524
- function hi() {
2672
+ function ki() {
2525
2673
  return Z().journey.getToken();
2526
2674
  }
2527
- function gi(e) {
2675
+ function Ai(e) {
2528
2676
  return Z().journey.adopt(e, "manual", !0);
2529
2677
  }
2530
- function _i(e, t) {
2678
+ function ji(e, t) {
2531
2679
  return Z().registerWorker(e, t);
2532
2680
  }
2533
- function vi(e, t) {
2681
+ function Mi(e, t) {
2534
2682
  return Z().registerFrame(e, t);
2535
2683
  }
2536
- function yi() {
2684
+ function Ni() {
2537
2685
  Z().tracing.rotate("explicit");
2538
2686
  }
2539
- function bi() {
2687
+ function Pi() {
2540
2688
  return Z().tracing.headers();
2541
2689
  }
2542
- function xi() {
2690
+ function Fi() {
2543
2691
  return Z().flush();
2544
2692
  }
2545
- function Si() {
2693
+ function Ii() {
2546
2694
  return Z().queueDepth();
2547
2695
  }
2548
- function Ci() {
2696
+ function Li() {
2549
2697
  return Z().stats();
2550
2698
  }
2551
- function wi() {
2699
+ function Ri() {
2552
2700
  Z().newSession();
2553
2701
  }
2554
- function Ti() {
2702
+ function zi() {
2555
2703
  return Z().diagnostics.snapshot();
2556
2704
  }
2557
- async function Ei() {
2705
+ async function Bi() {
2558
2706
  await q.current()?.destroy();
2559
2707
  }
2560
- export { F as OneLogger, ci as addBreadcrumb, gi as adoptJourney, Vr as clearPersistedLogs, Kr as collectDebugBundle, Hr as configure, ri as counter, Br as createMemoryTransport, mi as currentJourney, Yr as debug, pi as endJourney, Qr as error, $r as fatal, xi as flush, Ti as getDiagnosticCounters, Gr as getHealth, hi as getJourneyToken, qr as getLogger, Si as getQueueDepth, Ci as getStats, bi as getTraceHeaders, ii as histogram, Xr as info, ei as logAction, ti as logEvent, ni as logMetric, wi as newSession, vi as registerFrame, _i as registerWorker, di as removeContext, Wr as rotateSecurityContext, zr as serveTransportWorker, Ur as setConfigurationLocked, li as setContext, ui as setContextMap, Ei as shutdown, fi as startJourney, ai as startMeasure, yi as startTrace, si as timeAsync, oi as timeSync, Jr as trace, Zr as warn };
2708
+ export { N as OneLogger, Si as addBreadcrumb, Ai as adoptJourney, Zr as clearPersistedLogs, ni as collectDebugBundle, Qr as configure, mi as counter, Xr as createMemoryTransport, Oi as currentJourney, ai as debug, Di as endJourney, ci as error, li as fatal, Fi as flush, zi as getDiagnosticCounters, ti as getHealth, ki as getJourneyToken, ri as getLogger, Ii as getQueueDepth, Li as getStats, Pi as getTraceHeaders, hi as histogram, oi as info, ui as logAction, di as logEvent, fi as logMetric, Ri as newSession, yi as profiler, Mi as registerFrame, ji as registerWorker, Ti as removeContext, ei as rotateSecurityContext, Yr as serveTransportWorker, $r as setConfigurationLocked, Ci as setContext, wi as setContextMap, Bi as shutdown, Ei as startJourney, gi as startMeasure, _i as startReplay, Ni as startTrace, vi as stopReplay, xi as timeAsync, bi as timeSync, ii as trace, si as warn };
2561
2709
 
2562
2710
  //# sourceMappingURL=index.js.map