@utk09/ui-observability 1.0.0 → 1.2.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 (298) hide show
  1. package/CHANGELOG.md +111 -219
  2. package/README.md +24 -26
  3. package/dist/{batch-CXmPmTse.js → batch-120Kc9jr.js} +3 -3
  4. package/dist/{batch-CXmPmTse.js.map → batch-120Kc9jr.js.map} +1 -1
  5. package/dist/{batch-mmPigCpi.cjs → batch-C3uNp5kU.cjs} +2 -2
  6. package/dist/{batch-mmPigCpi.cjs.map → batch-C3uNp5kU.cjs.map} +1 -1
  7. package/dist/bus/bus.d.cts +31 -2
  8. package/dist/bus/bus.d.ts +31 -2
  9. package/dist/bus-Dj8IEVcC.cjs +2 -0
  10. package/dist/bus-Dj8IEVcC.cjs.map +1 -0
  11. package/dist/{bus-C39wspFV.js → bus-DyNafxZN.js} +127 -104
  12. package/dist/bus-DyNafxZN.js.map +1 -0
  13. package/dist/capture/errors.d.cts +10 -0
  14. package/dist/capture/errors.d.ts +10 -0
  15. package/dist/capture/interactions.d.cts +35 -3
  16. package/dist/capture/interactions.d.ts +35 -3
  17. package/dist/capture/observed-windows.d.cts +51 -0
  18. package/dist/capture/observed-windows.d.ts +51 -0
  19. package/dist/capture/replay.d.cts +1 -1
  20. package/dist/capture/replay.d.ts +1 -1
  21. package/dist/capture/types.d.cts +5 -0
  22. package/dist/capture/types.d.ts +5 -0
  23. package/dist/capture/web-vitals.d.cts +1 -0
  24. package/dist/capture/web-vitals.d.ts +1 -0
  25. package/dist/{compression-tVtXwVjX.js → compression-BWkDWY3v.js} +2 -2
  26. package/dist/{compression-tVtXwVjX.js.map → compression-BWkDWY3v.js.map} +1 -1
  27. package/dist/{compression-CvED_Jel.cjs → compression-CEVe7NPX.cjs} +2 -2
  28. package/dist/{compression-CvED_Jel.cjs.map → compression-CEVe7NPX.cjs.map} +1 -1
  29. package/dist/config-C0PtemvC.cjs +2 -0
  30. package/dist/config-C0PtemvC.cjs.map +1 -0
  31. package/dist/config-DK1Zf7jn.js +556 -0
  32. package/dist/config-DK1Zf7jn.js.map +1 -0
  33. package/dist/{console-BGgGnjSi.js → console-CAyCQOpm.js} +5 -5
  34. package/dist/{console-BGgGnjSi.js.map → console-CAyCQOpm.js.map} +1 -1
  35. package/dist/{console-CSZ5_Vx5.cjs → console-Dk6GH4yj.cjs} +2 -2
  36. package/dist/{console-CSZ5_Vx5.cjs.map → console-Dk6GH4yj.cjs.map} +1 -1
  37. package/dist/{constants-CUyd9cTZ.js → constants-CEHN6KuY.js} +46 -25
  38. package/dist/constants-CEHN6KuY.js.map +1 -0
  39. package/dist/constants-NtiQDWL_.cjs +2 -0
  40. package/dist/constants-NtiQDWL_.cjs.map +1 -0
  41. package/dist/constants.d.cts +23 -0
  42. package/dist/constants.d.ts +23 -0
  43. package/dist/core/config.d.cts +9 -3
  44. package/dist/core/config.d.ts +9 -3
  45. package/dist/core/diagnostics.d.cts +1 -1
  46. package/dist/core/diagnostics.d.ts +1 -1
  47. package/dist/core/pipeline.d.cts +11 -0
  48. package/dist/core/pipeline.d.ts +11 -0
  49. package/dist/core/record.d.cts +2 -2
  50. package/dist/core/record.d.ts +2 -2
  51. package/dist/core/rotation.d.cts +26 -2
  52. package/dist/core/rotation.d.ts +26 -2
  53. package/dist/core/runtime.d.cts +9 -0
  54. package/dist/core/runtime.d.ts +9 -0
  55. package/dist/core/sender.d.cts +3 -2
  56. package/dist/core/sender.d.ts +3 -2
  57. package/dist/{debug-bundle-BXIlwDKM.cjs → debug-bundle-DMzUfiQc.cjs} +2 -2
  58. package/dist/{debug-bundle-BXIlwDKM.cjs.map → debug-bundle-DMzUfiQc.cjs.map} +1 -1
  59. package/dist/{debug-bundle-CRpYV_ui.js → debug-bundle-w78W46zr.js} +4 -4
  60. package/dist/{debug-bundle-CRpYV_ui.js.map → debug-bundle-w78W46zr.js.map} +1 -1
  61. package/dist/doctor.cjs +1 -1
  62. package/dist/doctor.js +36 -36
  63. package/dist/doctor.js.map +1 -1
  64. package/dist/errors-07pmZ7VY.cjs +3 -0
  65. package/dist/errors-07pmZ7VY.cjs.map +1 -0
  66. package/dist/{errors-BE_EZV7Q.js → errors-C-LYbqyB.js} +27 -24
  67. package/dist/errors-C-LYbqyB.js.map +1 -0
  68. package/dist/{factory-CTi0Is3F.js → factory-BHYrcSaU.js} +39 -28
  69. package/dist/factory-BHYrcSaU.js.map +1 -0
  70. package/dist/factory-DsaNdcXp.cjs +2 -0
  71. package/dist/factory-DsaNdcXp.cjs.map +1 -0
  72. package/dist/{identity-DdhKgrpk.js → identity-Byh3gCdT.js} +35 -24
  73. package/dist/identity-Byh3gCdT.js.map +1 -0
  74. package/dist/identity-BzAzdQyv.cjs +2 -0
  75. package/dist/identity-BzAzdQyv.cjs.map +1 -0
  76. package/dist/index.cjs +1 -1
  77. package/dist/index.cjs.map +1 -1
  78. package/dist/index.d.cts +1 -0
  79. package/dist/index.d.ts +1 -0
  80. package/dist/index.js +453 -417
  81. package/dist/index.js.map +1 -1
  82. package/dist/{indexeddb-storage-GHdl0t8A.js → indexeddb-storage-BYywz-v6.js} +17 -17
  83. package/dist/{indexeddb-storage-GHdl0t8A.js.map → indexeddb-storage-BYywz-v6.js.map} +1 -1
  84. package/dist/{indexeddb-storage-CL9uqBCy.cjs → indexeddb-storage-BfqGkLFe.cjs} +2 -2
  85. package/dist/{indexeddb-storage-CL9uqBCy.cjs.map → indexeddb-storage-BfqGkLFe.cjs.map} +1 -1
  86. package/dist/interactions-BXzEel4F.cjs +2 -0
  87. package/dist/interactions-BXzEel4F.cjs.map +1 -0
  88. package/dist/interactions-DdKPMWIN.js +207 -0
  89. package/dist/interactions-DdKPMWIN.js.map +1 -0
  90. package/dist/{journey-B4Adltjm.cjs → journey-BUmsrgaw.cjs} +2 -2
  91. package/dist/{journey-B4Adltjm.cjs.map → journey-BUmsrgaw.cjs.map} +1 -1
  92. package/dist/{journey-D2_sia57.js → journey-Nu655gEO.js} +14 -14
  93. package/dist/{journey-D2_sia57.js.map → journey-Nu655gEO.js.map} +1 -1
  94. package/dist/{library-console-CPW6bvZH.cjs → library-console-DdIlzzph.cjs} +2 -2
  95. package/dist/{library-console-CPW6bvZH.cjs.map → library-console-DdIlzzph.cjs.map} +1 -1
  96. package/dist/{library-console-Btrzt814.js → library-console-amePMnP8.js} +2 -2
  97. package/dist/{library-console-Btrzt814.js.map → library-console-amePMnP8.js.map} +1 -1
  98. package/dist/{library-request-BJ9PLRaD.js → library-request-Cv7C05jf.js} +2 -2
  99. package/dist/{library-request-BJ9PLRaD.js.map → library-request-Cv7C05jf.js.map} +1 -1
  100. package/dist/{library-request-D7OvTxZV.cjs → library-request-DO3Ec7KE.cjs} +2 -2
  101. package/dist/{library-request-D7OvTxZV.cjs.map → library-request-DO3Ec7KE.cjs.map} +1 -1
  102. package/dist/{lifecycle-IaAm1mOC.cjs → lifecycle-B5yfH5is.cjs} +2 -2
  103. package/dist/{lifecycle-IaAm1mOC.cjs.map → lifecycle-B5yfH5is.cjs.map} +1 -1
  104. package/dist/{lifecycle-22CUCrc9.js → lifecycle-CMHz2Zbs.js} +2 -2
  105. package/dist/{lifecycle-22CUCrc9.js.map → lifecycle-CMHz2Zbs.js.map} +1 -1
  106. package/dist/{log-record-BNiLfqtL.js → log-record-B_nSqxoe.js} +2 -2
  107. package/dist/{log-record-BNiLfqtL.js.map → log-record-B_nSqxoe.js.map} +1 -1
  108. package/dist/{log-record-CkivuiEl.cjs → log-record-Bdywwg0k.cjs} +2 -2
  109. package/dist/{log-record-CkivuiEl.cjs.map → log-record-Bdywwg0k.cjs.map} +1 -1
  110. package/dist/{long-frames-DNFaRnC3.js → long-frames-6NGl1-uN.js} +3 -3
  111. package/dist/{long-frames-DNFaRnC3.js.map → long-frames-6NGl1-uN.js.map} +1 -1
  112. package/dist/{long-frames-BUUbXd-B.cjs → long-frames-D9DfSWqv.cjs} +2 -2
  113. package/dist/{long-frames-BUUbXd-B.cjs.map → long-frames-D9DfSWqv.cjs.map} +1 -1
  114. package/dist/models/bus.d.cts +6 -1
  115. package/dist/models/bus.d.ts +6 -1
  116. package/dist/models/config.d.cts +27 -11
  117. package/dist/models/config.d.ts +27 -11
  118. package/dist/models/serializer.d.cts +3 -1
  119. package/dist/models/serializer.d.ts +3 -1
  120. package/dist/{network-CGMLQ-mA.cjs → network-BNHBI0Fc.cjs} +2 -2
  121. package/dist/{network-CGMLQ-mA.cjs.map → network-BNHBI0Fc.cjs.map} +1 -1
  122. package/dist/{network-on2zZT6H.js → network-Cc3tSB7e.js} +5 -5
  123. package/dist/{network-on2zZT6H.js.map → network-Cc3tSB7e.js.map} +1 -1
  124. package/dist/observed-windows-8JtCsIr1.js +64 -0
  125. package/dist/observed-windows-8JtCsIr1.js.map +1 -0
  126. package/dist/observed-windows-BlE25nrn.cjs +2 -0
  127. package/dist/observed-windows-BlE25nrn.cjs.map +1 -0
  128. package/dist/openfin-Bxelt0yg.js.map +1 -1
  129. package/dist/openfin-DtH2f7zX.cjs.map +1 -1
  130. package/dist/{otlp-DimfrRor.js → otlp-Btix3EBa.js} +7 -7
  131. package/dist/{otlp-DimfrRor.js.map → otlp-Btix3EBa.js.map} +1 -1
  132. package/dist/{otlp-BENHf3g9.cjs → otlp-CFSW-Dno.cjs} +2 -2
  133. package/dist/{otlp-BENHf3g9.cjs.map → otlp-CFSW-Dno.cjs.map} +1 -1
  134. package/dist/patch-DlcKzIi-.cjs +2 -0
  135. package/dist/patch-DlcKzIi-.cjs.map +1 -0
  136. package/dist/patch-Sr1wKg7W.js +9 -0
  137. package/dist/patch-Sr1wKg7W.js.map +1 -0
  138. package/dist/platform-BZjp9wp1.cjs +2 -0
  139. package/dist/platform-BZjp9wp1.cjs.map +1 -0
  140. package/dist/platform-Dba6R3Hp.js +75 -0
  141. package/dist/platform-Dba6R3Hp.js.map +1 -0
  142. package/dist/{profiler-BAZoh7A4.js → profiler-DNKcqu09.js} +60 -60
  143. package/dist/{profiler-BAZoh7A4.js.map → profiler-DNKcqu09.js.map} +1 -1
  144. package/dist/{profiler-D4tJpDRc.cjs → profiler-DpoPi1hH.cjs} +2 -2
  145. package/dist/{profiler-D4tJpDRc.cjs.map → profiler-DpoPi1hH.cjs.map} +1 -1
  146. package/dist/{profiler-frames-C4xr7KfH.cjs → profiler-frames-C9zJNd8_.cjs} +2 -2
  147. package/dist/{profiler-frames-C4xr7KfH.cjs.map → profiler-frames-C9zJNd8_.cjs.map} +1 -1
  148. package/dist/{profiler-frames-cJMx9wNM.js → profiler-frames-CGXZeZ_3.js} +16 -16
  149. package/dist/{profiler-frames-cJMx9wNM.js.map → profiler-frames-CGXZeZ_3.js.map} +1 -1
  150. package/dist/{remote-rules-Dz9MRAsB.js → remote-rules-DNK96vLa.js} +25 -25
  151. package/dist/{remote-rules-Dz9MRAsB.js.map → remote-rules-DNK96vLa.js.map} +1 -1
  152. package/dist/{remote-rules-_tY0zj5o.cjs → remote-rules-DuMFRlit.cjs} +2 -2
  153. package/dist/{remote-rules-_tY0zj5o.cjs.map → remote-rules-DuMFRlit.cjs.map} +1 -1
  154. package/dist/replay-Cab-lSit.cjs +2 -0
  155. package/dist/replay-Cab-lSit.cjs.map +1 -0
  156. package/dist/{replay-Ds-ANH34.js → replay-Dy6OiaOZ.js} +104 -77
  157. package/dist/replay-Dy6OiaOZ.js.map +1 -0
  158. package/dist/{reports-BDSe4dFH.cjs → reports-CGK9YQch.cjs} +2 -2
  159. package/dist/{reports-BDSe4dFH.cjs.map → reports-CGK9YQch.cjs.map} +1 -1
  160. package/dist/{reports-C-thq-bk.js → reports-CX57-S9s.js} +3 -3
  161. package/dist/{reports-C-thq-bk.js.map → reports-CX57-S9s.js.map} +1 -1
  162. package/dist/{resource-timing-eUl2dNgC.js → resource-timing-CWVDCbrY.js} +4 -4
  163. package/dist/{resource-timing-eUl2dNgC.js.map → resource-timing-CWVDCbrY.js.map} +1 -1
  164. package/dist/{resource-timing-C576gFIQ.cjs → resource-timing-DalulXiR.cjs} +2 -2
  165. package/dist/{resource-timing-C576gFIQ.cjs.map → resource-timing-DalulXiR.cjs.map} +1 -1
  166. package/dist/response-body-Cpz5__4g.cjs +3 -0
  167. package/dist/response-body-Cpz5__4g.cjs.map +1 -0
  168. package/dist/{response-body-eoSQpLiH.js → response-body-yi92Rpvo.js} +109 -109
  169. package/dist/response-body-yi92Rpvo.js.map +1 -0
  170. package/dist/{rotation-Cwct4ckk.js → rotation-ChBbNDE2.js} +27 -28
  171. package/dist/rotation-ChBbNDE2.js.map +1 -0
  172. package/dist/rotation-fTnNJcfH.cjs +2 -0
  173. package/dist/rotation-fTnNJcfH.cjs.map +1 -0
  174. package/dist/{sampling-BlrI8jor.js → sampling-DZTOD28D.js} +16 -16
  175. package/dist/{sampling-BlrI8jor.js.map → sampling-DZTOD28D.js.map} +1 -1
  176. package/dist/{sampling-mXt4dstx.cjs → sampling-wAVJIZXp.cjs} +2 -2
  177. package/dist/{sampling-mXt4dstx.cjs.map → sampling-wAVJIZXp.cjs.map} +1 -1
  178. package/dist/{sanitize-Ba0KqU06.js → sanitize-B2GKlSFp.js} +2 -2
  179. package/dist/{sanitize-Ba0KqU06.js.map → sanitize-B2GKlSFp.js.map} +1 -1
  180. package/dist/{sanitize-DQyiI_KY.cjs → sanitize-BZdhoghq.cjs} +2 -2
  181. package/dist/{sanitize-DQyiI_KY.cjs.map → sanitize-BZdhoghq.cjs.map} +1 -1
  182. package/dist/{sender-Dv8rAmpV.js → sender-BRSpc7R8.js} +192 -178
  183. package/dist/sender-BRSpc7R8.js.map +1 -0
  184. package/dist/sender-CFu98DAB.cjs +2 -0
  185. package/dist/sender-CFu98DAB.cjs.map +1 -0
  186. package/dist/storage/emergency-queue.d.cts +3 -1
  187. package/dist/storage/emergency-queue.d.ts +3 -1
  188. package/dist/storage/stored-context.d.cts +3 -2
  189. package/dist/storage/stored-context.d.ts +3 -2
  190. package/dist/stored-context-CPLlzgpm.cjs +2 -0
  191. package/dist/stored-context-CPLlzgpm.cjs.map +1 -0
  192. package/dist/{stored-context-B2EzVuYm.js → stored-context-df1dEnht.js} +12 -10
  193. package/dist/stored-context-df1dEnht.js.map +1 -0
  194. package/dist/{storm-DjKetLKZ.js → storm-U3_ek1nA.js} +2 -2
  195. package/dist/{storm-DjKetLKZ.js.map → storm-U3_ek1nA.js.map} +1 -1
  196. package/dist/{storm-C-zYSdDX.cjs → storm-qiE_AMC7.cjs} +2 -2
  197. package/dist/{storm-C-zYSdDX.cjs.map → storm-qiE_AMC7.cjs.map} +1 -1
  198. package/dist/transport/exit-flush.d.cts +23 -0
  199. package/dist/transport/exit-flush.d.ts +23 -0
  200. package/dist/transport/http-transport.d.cts +3 -2
  201. package/dist/transport/http-transport.d.ts +3 -2
  202. package/dist/transport/retry-engine.d.cts +11 -3
  203. package/dist/transport/retry-engine.d.ts +11 -3
  204. package/dist/types-BAerHgCq.js.map +1 -1
  205. package/dist/types-C7WNpnG1.cjs.map +1 -1
  206. package/dist/{unclean-exit-DQD1cT7c.js → unclean-exit-Bj6gYHeL.js} +2 -2
  207. package/dist/{unclean-exit-DQD1cT7c.js.map → unclean-exit-Bj6gYHeL.js.map} +1 -1
  208. package/dist/{unclean-exit-py99ApzT.cjs → unclean-exit-CuBh-ee5.cjs} +2 -2
  209. package/dist/{unclean-exit-py99ApzT.cjs.map → unclean-exit-CuBh-ee5.cjs.map} +1 -1
  210. package/dist/{user-timing-D6XTmpuM.cjs → user-timing-BWqzYF2Q.cjs} +2 -2
  211. package/dist/{user-timing-D6XTmpuM.cjs.map → user-timing-BWqzYF2Q.cjs.map} +1 -1
  212. package/dist/{user-timing-BePqb1uN.js → user-timing-Duz0d-OA.js} +2 -2
  213. package/dist/{user-timing-BePqb1uN.js.map → user-timing-Duz0d-OA.js.map} +1 -1
  214. package/dist/utils/identity.d.cts +5 -0
  215. package/dist/utils/identity.d.ts +5 -0
  216. package/dist/utils/lock.d.cts +3 -2
  217. package/dist/utils/lock.d.ts +3 -2
  218. package/dist/utils/openfin.d.cts +18 -6
  219. package/dist/utils/openfin.d.ts +18 -6
  220. package/dist/utils/patch.d.cts +1 -1
  221. package/dist/utils/patch.d.ts +1 -1
  222. package/dist/utils/platform.d.cts +6 -0
  223. package/dist/utils/platform.d.ts +6 -0
  224. package/dist/{web-socket-DSHgDiZ6.js → web-socket-CE_9Q22z.js} +5 -5
  225. package/dist/{web-socket-DSHgDiZ6.js.map → web-socket-CE_9Q22z.js.map} +1 -1
  226. package/dist/{web-socket-CoIUBM3C.cjs → web-socket-sm3rD-A_.cjs} +2 -2
  227. package/dist/{web-socket-CoIUBM3C.cjs.map → web-socket-sm3rD-A_.cjs.map} +1 -1
  228. package/dist/{web-vitals-4pWACwaR.js → web-vitals-CGwXGF-M.js} +4 -4
  229. package/dist/web-vitals-CGwXGF-M.js.map +1 -0
  230. package/dist/web-vitals-Df4Wsfx9.cjs +2 -0
  231. package/dist/web-vitals-Df4Wsfx9.cjs.map +1 -0
  232. package/dist/{worker-protocol-QbvqNazn.cjs → worker-protocol-D5VnCdWY.cjs} +2 -2
  233. package/dist/{worker-protocol-QbvqNazn.cjs.map → worker-protocol-D5VnCdWY.cjs.map} +1 -1
  234. package/dist/{worker-protocol-x074Rpet.js → worker-protocol-h4-tRWqy.js} +6 -6
  235. package/dist/{worker-protocol-x074Rpet.js.map → worker-protocol-h4-tRWqy.js.map} +1 -1
  236. package/dist/{worker-server-CFe4nvos.cjs → worker-server-CF1yatXq.cjs} +2 -2
  237. package/dist/{worker-server-CFe4nvos.cjs.map → worker-server-CF1yatXq.cjs.map} +1 -1
  238. package/dist/worker-server-FYfKHQhJ.js +94 -0
  239. package/dist/{worker-server-iUVSjH8L.js.map → worker-server-FYfKHQhJ.js.map} +1 -1
  240. package/dist/worker-transport-COgY4RX8.cjs +2 -0
  241. package/dist/worker-transport-COgY4RX8.cjs.map +1 -0
  242. package/dist/{worker-transport-Dy1KMA7t.js → worker-transport-jzX1IusG.js} +49 -45
  243. package/dist/worker-transport-jzX1IusG.js.map +1 -0
  244. package/llms.txt +14 -12
  245. package/package.json +13 -5
  246. package/dist/bus-C39wspFV.js.map +0 -1
  247. package/dist/bus-_EaOVPGq.cjs +0 -2
  248. package/dist/bus-_EaOVPGq.cjs.map +0 -1
  249. package/dist/config-DUs7uHHt.cjs +0 -2
  250. package/dist/config-DUs7uHHt.cjs.map +0 -1
  251. package/dist/config-SgQcCP1_.js +0 -560
  252. package/dist/config-SgQcCP1_.js.map +0 -1
  253. package/dist/constants-CUyd9cTZ.js.map +0 -1
  254. package/dist/constants-CqdJhTxH.cjs +0 -2
  255. package/dist/constants-CqdJhTxH.cjs.map +0 -1
  256. package/dist/errors-BE_EZV7Q.js.map +0 -1
  257. package/dist/errors-CNPbesMs.cjs +0 -3
  258. package/dist/errors-CNPbesMs.cjs.map +0 -1
  259. package/dist/factory-CTi0Is3F.js.map +0 -1
  260. package/dist/factory-hRrH32v5.cjs +0 -2
  261. package/dist/factory-hRrH32v5.cjs.map +0 -1
  262. package/dist/identity-DdhKgrpk.js.map +0 -1
  263. package/dist/identity-DlWRIuwy.cjs +0 -2
  264. package/dist/identity-DlWRIuwy.cjs.map +0 -1
  265. package/dist/interactions-CUkzK8sR.cjs +0 -2
  266. package/dist/interactions-CUkzK8sR.cjs.map +0 -1
  267. package/dist/interactions-DiFvCosX.js +0 -111
  268. package/dist/interactions-DiFvCosX.js.map +0 -1
  269. package/dist/patch-BX8KrPCT.cjs +0 -2
  270. package/dist/patch-BX8KrPCT.cjs.map +0 -1
  271. package/dist/patch-UdPz1ea8.js +0 -8
  272. package/dist/patch-UdPz1ea8.js.map +0 -1
  273. package/dist/platform-BaaFIPCU.js +0 -62
  274. package/dist/platform-BaaFIPCU.js.map +0 -1
  275. package/dist/platform-CfA3-7sJ.cjs +0 -2
  276. package/dist/platform-CfA3-7sJ.cjs.map +0 -1
  277. package/dist/replay-B3gFXIZd.cjs +0 -2
  278. package/dist/replay-B3gFXIZd.cjs.map +0 -1
  279. package/dist/replay-Ds-ANH34.js.map +0 -1
  280. package/dist/response-body-YdNl-HkR.cjs +0 -3
  281. package/dist/response-body-YdNl-HkR.cjs.map +0 -1
  282. package/dist/response-body-eoSQpLiH.js.map +0 -1
  283. package/dist/rotation-Cwct4ckk.js.map +0 -1
  284. package/dist/rotation-D4qUAHAu.cjs +0 -2
  285. package/dist/rotation-D4qUAHAu.cjs.map +0 -1
  286. package/dist/sender-BdRuNVhF.cjs +0 -2
  287. package/dist/sender-BdRuNVhF.cjs.map +0 -1
  288. package/dist/sender-Dv8rAmpV.js.map +0 -1
  289. package/dist/stored-context-B2EzVuYm.js.map +0 -1
  290. package/dist/stored-context-CXt7eHZL.cjs +0 -2
  291. package/dist/stored-context-CXt7eHZL.cjs.map +0 -1
  292. package/dist/web-vitals-4pWACwaR.js.map +0 -1
  293. package/dist/web-vitals-__X7t4pj.cjs +0 -2
  294. package/dist/web-vitals-__X7t4pj.cjs.map +0 -1
  295. package/dist/worker-server-iUVSjH8L.js +0 -94
  296. package/dist/worker-transport-CRAX-09c.cjs +0 -2
  297. package/dist/worker-transport-CRAX-09c.cjs.map +0 -1
  298. package/dist/worker-transport-Dy1KMA7t.js.map +0 -1
@@ -1,9 +1,9 @@
1
- import { A as e, M as t, Mn as n, N as r, O as i, Vn as a, it as o, k as s, un as c } from "./constants-CUyd9cTZ.js";
2
- import { r as l } from "./journey-D2_sia57.js";
3
- import { n as u, t as d } from "./remote-rules-Dz9MRAsB.js";
4
- import { n as f, t as p } from "./log-record-BNiLfqtL.js";
1
+ import { A as e, Gn as t, In as n, M as r, N as i, O as a, at as o, k as s, mn as c } from "./constants-CEHN6KuY.js";
2
+ import { r as l } from "./journey-Nu655gEO.js";
3
+ import { n as u, t as d } from "./remote-rules-DNK96vLa.js";
4
+ import { n as f, t as p } from "./log-record-B_nSqxoe.js";
5
5
  import { n as m } from "./guards-BlYGRK4l.js";
6
- import { i as h } from "./identity-DdhKgrpk.js";
6
+ import { i as h } from "./identity-Byh3gCdT.js";
7
7
  import { t as g } from "./openfin-Bxelt0yg.js";
8
8
  import { n as _, t as v } from "./fixed-window-Dq3MLUUv.js";
9
9
  import { t as y } from "./unref-DgHPQeWv.js";
@@ -16,21 +16,21 @@ var x = [
16
16
  ];
17
17
  function S(e) {
18
18
  if (typeof e != "object" || !e) return !1;
19
- let t = e;
20
- if (typeof t.from != "string" || !t.from || typeof t.t != "string") return !1;
21
- let n = (e) => typeof t[e] == "string";
22
- switch (t.t) {
23
- case r.hello:
24
- case r.tab: return n("tabId");
25
- case r.welcome: return n("to") && n("tabId") && (t.routingContextId === void 0 || n("routingContextId"));
26
- case r.journeyRequest:
27
- case r.samplingRequest: return !0;
28
- case r.securityContext: return n("id") && t.id !== "";
29
- case r.journey: return (t.to === void 0 || n("to")) && "journey" in t;
30
- case r.sampling: return n("to") && "rules" in t;
31
- case r.flushRequest: return n("id") && typeof t.timeoutMs == "number";
32
- case r.flushResult: return n("id") && "result" in t;
33
- case r.records: return Array.isArray(t.records) && (t.routingContextId === void 0 || n("routingContextId")) && t.records.every((e) => !f(e) || !p(e.severityText) ? !1 : !Array.isArray(e.attributes) && !Array.isArray(e.resource) && /^\d+$/.test(e.timeUnixNano) && (e.observedTimeUnixNano === void 0 || /^\d+$/.test(e.observedTimeUnixNano)) && typeof e.traceId == "string" && /^(?:[a-f\d]{32})?$/.test(e.traceId) && typeof e.spanId == "string" && /^(?:[a-f\d]{16})?$/.test(e.spanId) && Number.isInteger(e.traceFlags) && e.traceFlags >= 0 && e.traceFlags <= 255 && e.severityNumber === a[e.severityText]);
19
+ let n = e;
20
+ if (typeof n.from != "string" || !n.from || typeof n.t != "string") return !1;
21
+ let r = (e) => typeof n[e] == "string";
22
+ switch (n.t) {
23
+ case i.hello: return r("tabId");
24
+ case i.tab: return r("tabId") && (n.since === void 0 || Number.isFinite(n.since));
25
+ case i.welcome: return r("to") && r("tabId") && (n.routingContextId === void 0 || r("routingContextId"));
26
+ case i.journeyRequest:
27
+ case i.samplingRequest: return !0;
28
+ case i.securityContext: return r("id") && n.id !== "";
29
+ case i.journey: return (n.to === void 0 || r("to")) && "journey" in n;
30
+ case i.sampling: return r("to") && "rules" in n;
31
+ case i.flushRequest: return r("id") && typeof n.timeoutMs == "number";
32
+ case i.flushResult: return r("id") && "result" in n;
33
+ case i.records: return Array.isArray(n.records) && (n.routingContextId === void 0 || r("routingContextId")) && n.records.every((e) => !f(e) || !p(e.severityText) ? !1 : !Array.isArray(e.attributes) && !Array.isArray(e.resource) && /^\d+$/.test(e.timeUnixNano) && (e.observedTimeUnixNano === void 0 || /^\d+$/.test(e.observedTimeUnixNano)) && typeof e.traceId == "string" && /^(?:[a-f\d]{32})?$/.test(e.traceId) && typeof e.spanId == "string" && /^(?:[a-f\d]{16})?$/.test(e.spanId) && Number.isInteger(e.traceFlags) && e.traceFlags >= 0 && e.traceFlags <= 255 && e.severityNumber === t[e.severityText]);
34
34
  default: return !1;
35
35
  }
36
36
  }
@@ -55,7 +55,7 @@ function C(e) {
55
55
  // src/models/bus.ts
56
56
  function w(e) {
57
57
  return {
58
- p: t,
58
+ p: r,
59
59
  m: e
60
60
  };
61
61
  }
@@ -98,31 +98,31 @@ function N() {
98
98
  let e = globalThis.origin;
99
99
  return typeof e == "string" ? e : D;
100
100
  }
101
- function P(e, n) {
101
+ function P(e, t) {
102
102
  if (typeof window > "u" || window.parent === window) return null;
103
- let r;
103
+ let n;
104
104
  try {
105
- r = window.parent[E];
105
+ n = window.parent[E];
106
106
  } catch {
107
107
  return null;
108
108
  }
109
- if (typeof r?.busAccept != "function") return null;
110
- let i = r.protocol, a = r.busCanAccept, o = typeof a == "function", s = i === void 0 && o ? O : i;
109
+ if (typeof n?.busAccept != "function") return null;
110
+ let i = n.protocol, a = n.busCanAccept, o = typeof a == "function", s = i === void 0 && o ? O : i;
111
111
  if (s !== "ui-observability/2") {
112
112
  let e = typeof s == "string" ? s.slice(0, 48) : "none";
113
- return n.report("bus.protocol_mismatch", "The same-origin parent runtime uses another bus protocol. This context tries a message link instead of a direct call.", {
113
+ return t.report("bus.protocol_mismatch", "The same-origin parent runtime uses another bus protocol. This context tries a message link instead of a direct call.", {
114
114
  found: e,
115
- own: t
115
+ own: r
116
116
  }), null;
117
117
  }
118
118
  let c = N();
119
- if (o && !a.call(r, window, c)) return null;
120
- let l = r, u = !0;
119
+ if (o && !a.call(n, window, c)) return null;
120
+ let l = n, u = !0;
121
121
  return {
122
122
  kind: "direct",
123
- post(t) {
124
- u && n.guard("bus.send_failed", "The direct call into the parent runtime failed.", () => {
125
- l.busAccept(t, e, window);
123
+ post(n) {
124
+ u && t.guard("bus.send_failed", "The direct call into the parent runtime failed.", () => {
125
+ l.busAccept(n, e, window);
126
126
  });
127
127
  },
128
128
  close() {
@@ -238,39 +238,47 @@ function R(e, t, n, r) {
238
238
  let i = g()?.InterApplicationBus;
239
239
  if (!i) return null;
240
240
  if (!t) return r.report("openfin.unavailable", "OpenFin gives no application uuid. The InterApplicationBus link stays closed."), null;
241
- let a = `${e}.${t}`;
242
- return r.guardAsync("bus.send_failed", "The InterApplicationBus.subscribe call failed.", () => i.subscribe({ uuid: t }, a, (e, t, r) => {
241
+ let a = `${e}.${t}`, o = { uuid: t }, s = (e, t, r) => {
243
242
  let i = T(e);
244
243
  i && n(i, {
245
244
  link: "openfin",
246
245
  origin: "openfin",
247
246
  peer: t && r ? `${t}:${r}` : void 0
248
247
  });
249
- })), {
248
+ };
249
+ return r.guardAsync("bus.send_failed", "The InterApplicationBus.subscribe call failed.", () => i.subscribe(o, a, s)), {
250
250
  kind: "openfin",
251
251
  post(e) {
252
- r.guardAsync("bus.send_failed", "The InterApplicationBus.publish call failed.", () => i.publish(a, w(e)));
252
+ r.guardAsync("bus.send_failed", "The InterApplicationBus.send call failed.", () => i.send(o, a, w(e)));
253
253
  },
254
- close() {}
254
+ close() {
255
+ r.guardAsync("bus.send_failed", "The InterApplicationBus.unsubscribe call failed.", async () => {
256
+ await i.unsubscribe?.(o, a, s);
257
+ });
258
+ }
255
259
  };
256
260
  }
257
261
  function z(e, t) {
258
262
  let n = globalThis, r = n.postMessage;
259
- return n.WorkerGlobalScope === void 0 || !r ? null : (n.addEventListener?.("message", (t) => {
263
+ if (n.WorkerGlobalScope === void 0 || !r) return null;
264
+ let i = (t) => {
260
265
  let n = T(t.data);
261
266
  n && e(n, {
262
267
  link: "owner",
263
268
  origin: "same-origin"
264
269
  });
265
- }), {
270
+ };
271
+ return n.addEventListener?.("message", i), {
266
272
  kind: "owner",
267
273
  post(e) {
268
274
  t.guard("bus.send_failed", "The postMessage call of the worker failed.", () => {
269
275
  r(w(e));
270
276
  });
271
277
  },
272
- close() {}
273
- });
278
+ close() {
279
+ n.removeEventListener?.("message", i);
280
+ }
281
+ };
274
282
  }
275
283
  function B(e, t, n) {
276
284
  let r = (n) => {
@@ -304,7 +312,7 @@ var V = {
304
312
  ], U = class {
305
313
  mayPost(e, t) {
306
314
  let n = this.sources.get(t)?.permissions;
307
- return n ? e.t === r.journey ? n.includes("journey:read") : e.t === r.journeyRequest ? n.includes("journey:write") : e.t !== r.sampling || n.includes("sampling:read") : this.config.bus.sourcePolicy === "trusted-origin";
315
+ return n ? e.t === i.journey ? n.includes("journey:read") : e.t === i.journeyRequest ? n.includes("journey:write") : e.t !== i.sampling || n.includes("sampling:read") : this.config.bus.sourcePolicy === "trusted-origin";
308
316
  }
309
317
  registerFrame(e, t) {
310
318
  let n = typeof HTMLIFrameElement > "u" ? void 0 : HTMLIFrameElement, r = n && e instanceof n ? e.contentWindow : e;
@@ -325,9 +333,12 @@ var V = {
325
333
  rotateContext() {
326
334
  this.passContext(this.role === "sender");
327
335
  }
336
+ setTabId(e) {
337
+ this.tabId = e;
338
+ }
328
339
  passContext(e) {
329
340
  let t = {
330
- t: r.securityContext,
341
+ t: i.securityContext,
331
342
  from: this.contextId,
332
343
  id: this.config.securityContext.id
333
344
  };
@@ -351,10 +362,12 @@ var V = {
351
362
  this.directReplies.set(e, new WeakRef(t));
352
363
  }
353
364
  constructor(e, t, n, r, i, a, o = V) {
354
- b(this, "config", void 0), b(this, "diagnostics", void 0), b(this, "platform", void 0), b(this, "contextId", void 0), b(this, "tabId", void 0), b(this, "handlers", void 0), b(this, "handshakeOptions", void 0), b(this, "sources", /* @__PURE__ */ new Map()), b(this, "rates", /* @__PURE__ */ new WeakMap()), b(this, "channelRates", /* @__PURE__ */ new Map()), b(this, "directReplies", /* @__PURE__ */ new Map()), b(this, "role", "sender"), b(this, "upstream", null), b(this, "links", []), b(this, "openFinLink", null), b(this, "isOpenFinProvider", !1), b(this, "rulesPoll", void 0), b(this, "destroyed", !1), b(this, "ownerId", null), b(this, "ownerPeer", void 0), b(this, "awaitingWelcome", null), b(this, "flushAnswers", /* @__PURE__ */ new Map()), b(this, "flushQueue", []), b(this, "flushing", !1), b(this, "flushedAt", 0), b(this, "receive", (e, t) => {
365
+ b(this, "config", void 0), b(this, "diagnostics", void 0), b(this, "platform", void 0), b(this, "contextId", void 0), b(this, "tabId", void 0), b(this, "handlers", void 0), b(this, "handshakeOptions", void 0), b(this, "sources", /* @__PURE__ */ new Map()), b(this, "rates", /* @__PURE__ */ new WeakMap()), b(this, "channelRates", /* @__PURE__ */ new Map()), b(this, "directReplies", /* @__PURE__ */ new Map()), b(this, "role", "sender"), b(this, "upstream", null), b(this, "links", []), b(this, "openFinLink", null), b(this, "isOpenFinProvider", !1), b(this, "rulesPoll", void 0), b(this, "destroyed", !1), b(this, "ownerId", null), b(this, "ownerPeer", void 0), b(this, "handshakeLink", null), b(this, "awaitingWelcome", null), b(this, "flushAnswers", /* @__PURE__ */ new Map()), b(this, "flushQueue", []), b(this, "flushing", !1), b(this, "flushedAt", 0), b(this, "since", void 0), b(this, "receive", (e, t) => {
355
366
  let n = t.link === "children" || t.link === "worker";
356
367
  this.acceptsMessage(e, t, n) && this.routeMessage(e, t);
357
368
  }), this.config = e, this.diagnostics = t, this.platform = n, this.contextId = r, this.tabId = i, this.handlers = a, this.handshakeOptions = o;
369
+ let s = performance.timeOrigin;
370
+ this.since = Number.isFinite(s) ? s : void 0;
358
371
  }
359
372
  getRole() {
360
373
  return this.role;
@@ -371,19 +384,21 @@ var V = {
371
384
  }), this.announce(), this.role;
372
385
  let n = this.candidateUpstream();
373
386
  if (!n) return this.role = "sender", this.diagnostics.report("bus.role_resolved", "No owner exists. This context sends its own records.", { role: "sender" }), this.announce(), this.role;
374
- let r = this.orphanPolicy() === "retry" ? this.handshakeOptions.maxAttempts : 1, i = !1;
375
- for (let e = 0; e < r && !i; e++) i = await this.handshake(n);
376
- return this.role = i ? "forwarder" : "sender", this.upstream = i ? n : null, i || (n !== this.openFinLink && n.close(), this.diagnostics.report("bus.handshake_timeout", `No owner answered after ${String(r)} attempt(s) of ${String(this.handshakeOptions.timeoutMs)} ms. This context becomes the sender.`, {
387
+ let r = this.orphanPolicy() === "retry" ? this.handshakeOptions.maxAttempts : 1;
388
+ this.handshakeLink = n;
389
+ let i = !1;
390
+ for (let e = 0; e < r && !i && !this.destroyed; e++) i = await this.handshake(n);
391
+ return this.handshakeLink = null, this.destroyed || (this.role = i ? "forwarder" : "sender", this.upstream = i ? n : null, i || (n !== this.openFinLink && n.close(), this.diagnostics.report("bus.handshake_timeout", `No owner answered after ${String(r)} attempt(s) of ${String(this.handshakeOptions.timeoutMs)} ms. This context becomes the sender.`, {
377
392
  via: n.kind,
378
393
  crossOrigin: this.isCrossOriginFrame()
379
394
  })), this.diagnostics.report("bus.role_resolved", `The bus role is ${this.role}.`, {
380
395
  role: this.role,
381
396
  via: i ? n.kind : "none"
382
- }), this.announce(), this.role;
397
+ }), this.announce()), this.role;
383
398
  }
384
399
  sendRecords(e) {
385
- let { maxRecordsPerMessage: t, maxMessageBytes: n } = this.config.bus, i = new TextEncoder(), a = (e) => n === null ? 0 : i.encode(JSON.stringify(e)).length, o = (e) => ({
386
- t: r.records,
400
+ let { maxRecordsPerMessage: t, maxMessageBytes: n } = this.config.bus, r = new TextEncoder(), a = (e) => n === null ? 0 : r.encode(JSON.stringify(e)).length, o = (e) => ({
401
+ t: i.records,
387
402
  from: this.contextId,
388
403
  records: e,
389
404
  routingContextId: this.config.securityContext.id || void 0
@@ -402,37 +417,37 @@ var V = {
402
417
  async requestFlush(e, t) {
403
418
  let { upstream: n } = this;
404
419
  if (!n) return null;
405
- let i = h(this.diagnostics), a, o = new Promise((e) => {
420
+ let r = h(this.diagnostics), a, o = new Promise((e) => {
406
421
  a = e;
407
422
  });
408
- this.flushAnswers.set(i, a), n.post({
409
- t: r.flushRequest,
423
+ this.flushAnswers.set(r, a), n.post({
424
+ t: i.flushRequest,
410
425
  from: this.contextId,
411
- id: i,
426
+ id: r,
412
427
  timeoutMs: e
413
428
  });
414
429
  try {
415
430
  return await Promise.race([o, t.then(() => null)]);
416
431
  } finally {
417
- this.flushAnswers.delete(i);
432
+ this.flushAnswers.delete(r);
418
433
  }
419
434
  }
420
435
  acceptDirect(e, t, n) {
421
- let i = {
436
+ let r = {
422
437
  link: "direct",
423
438
  origin: "same-origin",
424
439
  peer: n
425
440
  }, a = {
426
- ...i,
441
+ ...r,
427
442
  reply: (e) => {
428
- t(e, i);
443
+ t(e, r);
429
444
  }
430
445
  };
431
- this.acceptsMessage(e, a, !0) && e.from !== this.contextId && (n && this.keepDirectReply(n, t), e.t === r.samplingRequest ? t(this.rulesAnswer(e.from), i) : (e.t === r.records && !this.awaitingWelcome && e.routingContextId !== this.config.securityContext.id && t({
432
- t: r.securityContext,
446
+ this.acceptsMessage(e, a, !0) && e.from !== this.contextId && (n && this.keepDirectReply(n, t), e.t === i.samplingRequest ? t(this.rulesAnswer(e.from), r) : (e.t === i.records && !this.awaitingWelcome && e.routingContextId !== this.config.securityContext.id && t({
447
+ t: i.securityContext,
433
448
  from: this.contextId,
434
449
  id: this.config.securityContext.id
435
- }, i), this.routeMessage(e, a)));
450
+ }, r), this.routeMessage(e, a)));
436
451
  }
437
452
  attachWorker(e, t = {}) {
438
453
  let n = {
@@ -461,7 +476,7 @@ var V = {
461
476
  }
462
477
  broadcastJourney(e) {
463
478
  this.postJourney({
464
- t: r.journey,
479
+ t: i.journey,
465
480
  from: this.contextId,
466
481
  journey: e
467
482
  });
@@ -469,7 +484,7 @@ var V = {
469
484
  destroy() {
470
485
  this.sources.clear(), this.directReplies.clear(), this.flushQueue = [], this.destroyed = !0, clearInterval(this.rulesPoll), this.rulesPoll = void 0;
471
486
  for (let e of this.allLinks()) e.close();
472
- this.links.length = 0, this.upstream = null, this.ownerId = null, this.openFinLink = null;
487
+ this.handshakeLink && this.handshakeLink !== this.openFinLink && this.handshakeLink.close(), this.awaitingWelcome?.settle(!1), this.links.length = 0, this.upstream = null, this.ownerId = null, this.openFinLink = null;
473
488
  }
474
489
  allLinks() {
475
490
  return !this.upstream || this.links.includes(this.upstream) ? this.links : [...this.links, this.upstream];
@@ -488,11 +503,11 @@ var V = {
488
503
  } catch {
489
504
  r = !1;
490
505
  }
491
- return r || this.diagnostics.count("bus.rejected_message"), r;
506
+ return r === "journey_denied" ? (this.diagnostics.count("bus.journey_denied"), !1) : (r || this.diagnostics.count("bus.rejected_message"), r);
492
507
  }
493
508
  passesChecks(e, t, n) {
494
- let { bus: i } = this.config, a = typeof t.peer == "object" ? this.sources.get(t.peer) : void 0;
495
- if (n && i.sourcePolicy === "registered" && !a) return !1;
509
+ let { bus: r } = this.config, a = typeof t.peer == "object" ? this.sources.get(t.peer) : void 0;
510
+ if (n && r.sourcePolicy === "registered" && !a) return !1;
496
511
  let o = typeof t.peer == "object" ? t.peer : void 0, s = typeof t.peer == "string" ? t.peer : t.link, c = Date.now(), l = (o ? this.rates.get(o) : this.channelRates.get(s)) ?? {
497
512
  start: c,
498
513
  count: 0
@@ -503,30 +518,30 @@ var V = {
503
518
  if (this.channelRates.size >= 256 && !this.channelRates.has(s)) return !1;
504
519
  this.channelRates.set(s, l);
505
520
  }
506
- if (!v(l, i.maxMessagesPerSecond ?? Infinity, 1e3)) return !1;
521
+ if (!v(l, r.maxMessagesPerSecond ?? Infinity, 1e3)) return !1;
507
522
  let u = JSON.stringify(e, (e, t) => {
508
523
  if (typeof t == "number" && !Number.isFinite(t)) throw Error("Non-finite value");
509
524
  return t;
510
525
  });
511
- if (i.maxMessageBytes !== null && new TextEncoder().encode(u).length > i.maxMessageBytes || !S(e) || e.t === r.records && i.maxRecordsPerMessage !== null && e.records.length > i.maxRecordsPerMessage) return !1;
526
+ if (r.maxMessageBytes !== null && new TextEncoder().encode(u).length > r.maxMessageBytes || !S(e) || e.t === i.records && r.maxRecordsPerMessage !== null && e.records.length > r.maxRecordsPerMessage) return !1;
512
527
  if (a) {
513
- let t = e.t === r.records || e.t === r.flushRequest ? "records" : e.t === r.journey ? "journey:write" : e.t === r.journeyRequest ? "journey:read" : e.t === r.samplingRequest ? "sampling:read" : void 0;
514
- if (t && !a.permissions?.includes(t)) return !1;
528
+ let t = e.t === i.records || e.t === i.flushRequest ? "records" : e.t === i.journey ? "journey:write" : e.t === i.journeyRequest ? "journey:read" : e.t === i.samplingRequest ? "sampling:read" : void 0;
529
+ if (t && !a.permissions?.includes(t)) return t === "journey:read" && "journey_denied";
515
530
  }
516
- return n && (e.t === r.sampling || e.t === r.securityContext || e.t === r.flushResult) || t.link === "broadcast" && e.t === r.flushRequest ? !1 : i.sourcePolicy !== "registered" || t.link !== "broadcast" || e.t !== r.records;
531
+ return n && (e.t === i.sampling || e.t === i.securityContext || e.t === i.flushResult) || t.link === "broadcast" && e.t === i.flushRequest ? !1 : r.sourcePolicy !== "registered" || t.link !== "broadcast" || e.t !== i.records;
517
532
  }
518
533
  routeMessage(e, t) {
519
534
  if (e.from !== this.contextId) switch (e.t) {
520
- case r.hello:
535
+ case i.hello:
521
536
  this.canOwn(t.link) && this.answer(t, {
522
- t: r.welcome,
537
+ t: i.welcome,
523
538
  from: this.contextId,
524
539
  to: e.from,
525
540
  tabId: this.tabId,
526
541
  routingContextId: this.awaitingWelcome ? void 0 : this.config.securityContext.id || void 0
527
542
  });
528
543
  break;
529
- case r.welcome:
544
+ case i.welcome:
530
545
  if (e.to !== this.contextId) break;
531
546
  if (this.awaitingWelcome?.link === t.link || this.upstream?.kind === t.link && this.ownerId === null) {
532
547
  this.ownerId = e.from, this.ownerPeer = t.peer;
@@ -535,47 +550,51 @@ var V = {
535
550
  this.config.securityContext.id !== n && this.passContext(!1), this.awaitingWelcome?.settle(!0);
536
551
  }
537
552
  break;
538
- case r.records:
553
+ case i.records:
539
554
  if (this.config.securityContext.isolation && this.config.securityContext.id && e.routingContextId !== this.config.securityContext.id) {
540
555
  this.diagnostics.count("security.context_mismatch");
541
556
  break;
542
557
  }
543
558
  this.role === "sender" || this.handlers.paused?.() && this.canRelay(t.link) ? this.handlers.onRecords(e.records) : this.upstream && this.canRelay(t.link) && this.upstream.post(e);
544
559
  break;
545
- case r.securityContext:
560
+ case i.securityContext:
546
561
  t.link === this.upstream?.kind && this.ownerId === e.from && this.ownerPeer === t.peer && this.handlers.onSecurityContext?.(e.id) !== !1 && this.rotateContext();
547
562
  break;
548
- case r.journey:
563
+ case i.journey:
549
564
  this.acceptsJourney(e, t) && this.applyJourney(e.journey);
550
565
  break;
551
- case r.journeyRequest: {
566
+ case i.journeyRequest: {
552
567
  let n = this.handlers.onJourneyRequest();
553
568
  n && this.journeyLink(t.link) && this.answer(t, {
554
- t: r.journey,
569
+ t: i.journey,
555
570
  from: this.contextId,
556
571
  to: e.from,
557
572
  journey: n
558
573
  });
559
574
  break;
560
575
  }
561
- case r.samplingRequest:
576
+ case i.samplingRequest:
562
577
  (this.role === "forwarder" ? t.link !== this.upstream?.kind : this.canOwn(t.link)) && this.answer(t, this.rulesAnswer(e.from));
563
578
  break;
564
- case r.sampling:
579
+ case i.sampling:
565
580
  this.acceptsRules(e.to, t) && this.applyRules(e.rules);
566
581
  break;
567
- case r.flushRequest:
582
+ case i.flushRequest:
568
583
  (this.role === "sender" || this.canRelay(t.link)) && this.queueFlush(e, t);
569
584
  break;
570
- case r.flushResult:
585
+ case i.flushResult:
571
586
  this.settleFlush(e, t);
572
587
  break;
573
- case r.tab: t.link === "broadcast" && e.tabId === this.tabId && this.contextId > e.from && this.handlers.onTabConflict();
588
+ case i.tab: t.link === "broadcast" && e.tabId === this.tabId && this.settleTabClaim(e);
574
589
  }
575
590
  }
591
+ settleTabClaim(e) {
592
+ let { since: t } = e;
593
+ t === void 0 || this.since === void 0 || t === this.since ? this.contextId > e.from && this.handlers.onTabConflict() : t < this.since ? this.handlers.onTabConflict() : this.postOver("broadcast", this.tabClaim());
594
+ }
576
595
  queueFlush(e, t) {
577
- let n = t.peer ?? t.link, i = this.flushQueue.filter((e) => e.source === n).length;
578
- if (this.flushQueue.length >= 100 || i >= 4) {
596
+ let n = t.peer ?? t.link, r = this.flushQueue.filter((e) => e.source === n).length;
597
+ if (this.flushQueue.length >= 100 || r >= 4) {
579
598
  this.diagnostics.count("bus.rejected_message");
580
599
  return;
581
600
  }
@@ -585,7 +604,7 @@ var V = {
585
604
  ends: Date.now() + a,
586
605
  answer: (n) => {
587
606
  this.answer(t, {
588
- t: r.flushResult,
607
+ t: i.flushResult,
589
608
  from: this.contextId,
590
609
  id: e.id,
591
610
  result: n
@@ -658,7 +677,7 @@ var V = {
658
677
  let e = (e) => {
659
678
  e && this.links.push(e);
660
679
  };
661
- this.platform.isWorker || this.ensureChildrenLink(), this.platform.isTopLevelDocument && e(L(i, this.receive, this.diagnostics)), (this.platform.platform === "openfin" || this.platform.platform === "openfin_web") && e(this.ensureOpenFinLink());
680
+ this.platform.isWorker || this.ensureChildrenLink(), this.platform.isTopLevelDocument && e(L(a, this.receive, this.diagnostics)), (this.platform.platform === "openfin" || this.platform.platform === "openfin_web") && e(this.ensureOpenFinLink());
662
681
  }
663
682
  ensureChildrenLink() {
664
683
  if (this.links.some((e) => e.kind === "children")) return;
@@ -674,38 +693,42 @@ var V = {
674
693
  e && this.links.push(e);
675
694
  }
676
695
  ensureOpenFinLink() {
677
- return this.openFinLink ??= R(i, this.platform.openfinUuid, this.receive, this.diagnostics), this.openFinLink;
696
+ return this.openFinLink ??= R(a, this.platform.openfinUuid, this.receive, this.diagnostics), this.openFinLink;
678
697
  }
679
698
  handshake(e) {
680
699
  return new Promise((t) => {
681
- let n = !1, i = (e) => {
700
+ let n = !1, r = (e) => {
682
701
  n || (n = !0, this.awaitingWelcome = null, clearTimeout(a), t(e));
683
702
  };
684
703
  this.awaitingWelcome = {
685
704
  link: e.kind,
686
- settle: i
705
+ settle: r
687
706
  };
688
707
  let a = setTimeout(() => {
689
- i(!1);
708
+ r(!1);
690
709
  }, this.handshakeOptions.timeoutMs);
691
710
  y(a), e.post({
692
- t: r.hello,
711
+ t: i.hello,
693
712
  from: this.contextId,
694
713
  tabId: this.tabId
695
714
  });
696
715
  });
697
716
  }
698
- announce() {
699
- this.postOver("broadcast", {
700
- t: r.tab,
717
+ tabClaim() {
718
+ return {
719
+ t: i.tab,
701
720
  from: this.contextId,
702
- tabId: this.tabId
703
- }), this.upstream && this.ownerId === null && this.upstream.post({
704
- t: r.hello,
721
+ tabId: this.tabId,
722
+ ...this.since === void 0 ? {} : { since: this.since }
723
+ };
724
+ }
725
+ announce() {
726
+ this.postOver("broadcast", this.tabClaim()), this.upstream && this.ownerId === null && this.upstream.post({
727
+ t: i.hello,
705
728
  from: this.contextId,
706
729
  tabId: this.tabId
707
730
  }), this.postJourney({
708
- t: r.journeyRequest,
731
+ t: i.journeyRequest,
709
732
  from: this.contextId
710
733
  }), this.pollRules(), this.passContext(!1);
711
734
  }
@@ -736,7 +759,7 @@ var V = {
736
759
  rulesAnswer(e) {
737
760
  let t = this.handlers.remote.sampling?.wire() ?? null;
738
761
  return {
739
- t: r.sampling,
762
+ t: i.sampling,
740
763
  from: this.contextId,
741
764
  to: e,
742
765
  rules: t
@@ -763,7 +786,7 @@ var V = {
763
786
  if (this.destroyed || this.role !== "forwarder" || !e) return;
764
787
  let t = () => {
765
788
  this.config.sampling.remote && e.post({
766
- t: r.samplingRequest,
789
+ t: i.samplingRequest,
767
790
  from: this.contextId
768
791
  });
769
792
  };
@@ -772,4 +795,4 @@ var V = {
772
795
  };
773
796
  export { U as Bus };
774
797
 
775
- //# sourceMappingURL=bus-C39wspFV.js.map
798
+ //# sourceMappingURL=bus-DyNafxZN.js.map