@cloudcare/browser-rum 3.0.29 → 3.1.1

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 (399) hide show
  1. package/bundle/dataflux-rum.js +1 -1
  2. package/cjs/boot/buildEnv.js +3 -2
  3. package/cjs/boot/buildEnv.js.map +1 -0
  4. package/cjs/boot/recorderApi.js +30 -46
  5. package/cjs/boot/recorderApi.js.map +1 -0
  6. package/cjs/boot/rum.entry.js +2 -7
  7. package/cjs/boot/rum.entry.js.map +1 -0
  8. package/cjs/boot/rum.js +40 -43
  9. package/cjs/boot/rum.js.map +1 -0
  10. package/cjs/boot/rumPublicApi.js +3 -49
  11. package/cjs/boot/rumPublicApi.js.map +1 -0
  12. package/cjs/boot/startRecording.js +7 -11
  13. package/cjs/boot/startRecording.js.map +1 -0
  14. package/cjs/constants.js +8 -6
  15. package/cjs/constants.js.map +1 -0
  16. package/cjs/domain/assembly.js +8 -20
  17. package/cjs/domain/assembly.js.map +1 -0
  18. package/cjs/domain/configuration.js +15 -52
  19. package/cjs/domain/configuration.js.map +1 -0
  20. package/cjs/domain/contexts/commonContext.js +2 -2
  21. package/cjs/domain/contexts/commonContext.js.map +1 -0
  22. package/cjs/domain/contexts/displayContext.js +28 -0
  23. package/cjs/domain/contexts/displayContext.js.map +1 -0
  24. package/cjs/domain/contexts/foregroundContexts.js +4 -29
  25. package/cjs/domain/contexts/foregroundContexts.js.map +1 -0
  26. package/cjs/domain/contexts/internalContext.js +5 -4
  27. package/cjs/domain/contexts/internalContext.js.map +1 -0
  28. package/cjs/domain/contexts/pageStateHistory.js +105 -0
  29. package/cjs/domain/contexts/pageStateHistory.js.map +1 -0
  30. package/cjs/domain/contexts/urlContexts.js +3 -9
  31. package/cjs/domain/contexts/urlContexts.js.map +1 -0
  32. package/cjs/domain/contexts/viewContexts.js +2 -6
  33. package/cjs/domain/contexts/viewContexts.js.map +1 -0
  34. package/cjs/domain/domMutationCollection.js +6 -10
  35. package/cjs/domain/domMutationCollection.js.map +1 -0
  36. package/cjs/domain/initViewportObservable.js +4 -11
  37. package/cjs/domain/initViewportObservable.js.map +1 -0
  38. package/cjs/domain/locationChangeObservable.js +2 -11
  39. package/cjs/domain/locationChangeObservable.js.map +1 -0
  40. package/cjs/domain/performanceCollection.js +11 -39
  41. package/cjs/domain/performanceCollection.js.map +1 -0
  42. package/cjs/domain/replay/deflate/deflateEncoder.js +82 -0
  43. package/cjs/domain/replay/deflate/deflateEncoder.js.map +1 -0
  44. package/cjs/domain/replay/deflate/deflateWorker.js +142 -0
  45. package/cjs/domain/replay/deflate/deflateWorker.js.map +1 -0
  46. package/cjs/domain/replay/deflate/index.js +44 -0
  47. package/cjs/domain/replay/deflate/index.js.map +1 -0
  48. package/cjs/domain/replay/record/elementsScrollPositions.js +2 -3
  49. package/cjs/domain/replay/record/elementsScrollPositions.js.map +1 -0
  50. package/cjs/domain/replay/record/index.js +2 -4
  51. package/cjs/domain/replay/record/index.js.map +1 -0
  52. package/cjs/domain/replay/record/mutationBatch.js +4 -11
  53. package/cjs/domain/replay/record/mutationBatch.js.map +1 -0
  54. package/cjs/domain/replay/record/mutationObserver.js +27 -86
  55. package/cjs/domain/replay/record/mutationObserver.js.map +1 -0
  56. package/cjs/domain/replay/record/observers.js +15 -89
  57. package/cjs/domain/replay/record/observers.js.map +1 -0
  58. package/cjs/domain/replay/record/privacy.js +57 -75
  59. package/cjs/domain/replay/record/privacy.js.map +1 -0
  60. package/cjs/domain/replay/record/record.js +6 -29
  61. package/cjs/domain/replay/record/record.js.map +1 -0
  62. package/cjs/domain/replay/record/serializationUtils.js +8 -68
  63. package/cjs/domain/replay/record/serializationUtils.js.map +1 -0
  64. package/cjs/domain/replay/record/serialize.js +43 -118
  65. package/cjs/domain/replay/record/serialize.js.map +1 -0
  66. package/cjs/domain/replay/record/shadowRootsController.js +4 -11
  67. package/cjs/domain/replay/record/shadowRootsController.js.map +1 -0
  68. package/cjs/domain/replay/record/utils.js +4 -12
  69. package/cjs/domain/replay/record/utils.js.map +1 -0
  70. package/cjs/domain/replay/record/viewports.js +4 -42
  71. package/cjs/domain/replay/record/viewports.js.map +1 -0
  72. package/cjs/domain/replay/replayStats.js +2 -14
  73. package/cjs/domain/replay/replayStats.js.map +1 -0
  74. package/cjs/domain/replay/segmentCollection/buildReplayPayload.js +4 -9
  75. package/cjs/domain/replay/segmentCollection/buildReplayPayload.js.map +1 -0
  76. package/cjs/domain/replay/segmentCollection/index.js +1 -9
  77. package/cjs/domain/replay/segmentCollection/index.js.map +1 -0
  78. package/cjs/domain/replay/segmentCollection/segment.js +23 -87
  79. package/cjs/domain/replay/segmentCollection/segment.js.map +1 -0
  80. package/cjs/domain/replay/segmentCollection/segmentCollection.js +41 -64
  81. package/cjs/domain/replay/segmentCollection/segmentCollection.js.map +1 -0
  82. package/cjs/domain/requestCollection.js +2 -17
  83. package/cjs/domain/requestCollection.js.map +1 -0
  84. package/cjs/domain/rumEventsCollection/actions/actionCollection.js +12 -22
  85. package/cjs/domain/rumEventsCollection/actions/actionCollection.js.map +1 -0
  86. package/cjs/domain/rumEventsCollection/actions/clickChain.js +3 -14
  87. package/cjs/domain/rumEventsCollection/actions/clickChain.js.map +1 -0
  88. package/cjs/domain/rumEventsCollection/actions/computeFrustration.js +12 -20
  89. package/cjs/domain/rumEventsCollection/actions/computeFrustration.js.map +1 -0
  90. package/cjs/domain/rumEventsCollection/actions/getActionNameFromElement.js +22 -53
  91. package/cjs/domain/rumEventsCollection/actions/getActionNameFromElement.js.map +1 -0
  92. package/cjs/domain/rumEventsCollection/actions/getSelectorsFromElement.js +13 -45
  93. package/cjs/domain/rumEventsCollection/actions/getSelectorsFromElement.js.map +1 -0
  94. package/cjs/domain/rumEventsCollection/actions/listenActionEvents.js +4 -6
  95. package/cjs/domain/rumEventsCollection/actions/listenActionEvents.js.map +1 -0
  96. package/cjs/domain/rumEventsCollection/actions/trackClickActions.js +15 -45
  97. package/cjs/domain/rumEventsCollection/actions/trackClickActions.js.map +1 -0
  98. package/cjs/domain/rumEventsCollection/error/errorCollection.js +13 -23
  99. package/cjs/domain/rumEventsCollection/error/errorCollection.js.map +1 -0
  100. package/cjs/domain/rumEventsCollection/error/trackConsoleError.js +2 -3
  101. package/cjs/domain/rumEventsCollection/error/trackConsoleError.js.map +1 -0
  102. package/cjs/domain/rumEventsCollection/error/trackReportError.js +4 -5
  103. package/cjs/domain/rumEventsCollection/error/trackReportError.js.map +1 -0
  104. package/cjs/domain/rumEventsCollection/longTask/longTaskCollection.js +2 -7
  105. package/cjs/domain/rumEventsCollection/longTask/longTaskCollection.js.map +1 -0
  106. package/cjs/domain/rumEventsCollection/resource/matchRequestTiming.js +2 -13
  107. package/cjs/domain/rumEventsCollection/resource/matchRequestTiming.js.map +1 -0
  108. package/cjs/domain/rumEventsCollection/resource/resourceCollection.js +2 -18
  109. package/cjs/domain/rumEventsCollection/resource/resourceCollection.js.map +1 -0
  110. package/cjs/domain/rumEventsCollection/resource/resourceUtils.js +58 -69
  111. package/cjs/domain/rumEventsCollection/resource/resourceUtils.js.map +1 -0
  112. package/cjs/domain/rumEventsCollection/view/interactionCountPolyfill.js +55 -0
  113. package/cjs/domain/rumEventsCollection/view/interactionCountPolyfill.js.map +1 -0
  114. package/cjs/domain/rumEventsCollection/view/trackCommonViewMetrics.js +62 -0
  115. package/cjs/domain/rumEventsCollection/view/trackCommonViewMetrics.js.map +1 -0
  116. package/cjs/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js +74 -0
  117. package/cjs/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js.map +1 -0
  118. package/cjs/domain/rumEventsCollection/view/trackFirstContentfulPaint.js +26 -0
  119. package/cjs/domain/rumEventsCollection/view/trackFirstContentfulPaint.js.map +1 -0
  120. package/cjs/domain/rumEventsCollection/view/trackFirstHidden.js +2 -8
  121. package/cjs/domain/rumEventsCollection/view/trackFirstHidden.js.map +1 -0
  122. package/cjs/domain/rumEventsCollection/view/trackFirstInputTimings.js +38 -0
  123. package/cjs/domain/rumEventsCollection/view/trackFirstInputTimings.js.map +1 -0
  124. package/cjs/domain/rumEventsCollection/view/trackInitialViewTimings.js +26 -179
  125. package/cjs/domain/rumEventsCollection/view/trackInitialViewTimings.js.map +1 -0
  126. package/cjs/domain/rumEventsCollection/view/trackInteractionToNextPaint.js +120 -0
  127. package/cjs/domain/rumEventsCollection/view/trackInteractionToNextPaint.js.map +1 -0
  128. package/cjs/domain/rumEventsCollection/view/trackLargestContentfulPaint.js +49 -0
  129. package/cjs/domain/rumEventsCollection/view/trackLargestContentfulPaint.js.map +1 -0
  130. package/cjs/domain/rumEventsCollection/view/trackLoadingTime.js +39 -0
  131. package/cjs/domain/rumEventsCollection/view/trackLoadingTime.js.map +1 -0
  132. package/cjs/domain/rumEventsCollection/view/trackNavigationTimings.js +37 -0
  133. package/cjs/domain/rumEventsCollection/view/trackNavigationTimings.js.map +1 -0
  134. package/cjs/domain/rumEventsCollection/view/trackScrollMetrics.js +61 -0
  135. package/cjs/domain/rumEventsCollection/view/trackScrollMetrics.js.map +1 -0
  136. package/cjs/domain/rumEventsCollection/view/trackViewEventCounts.js +3 -6
  137. package/cjs/domain/rumEventsCollection/view/trackViewEventCounts.js.map +1 -0
  138. package/cjs/domain/rumEventsCollection/view/trackViews.js +26 -58
  139. package/cjs/domain/rumEventsCollection/view/trackViews.js.map +1 -0
  140. package/cjs/domain/rumEventsCollection/view/viewCollection.js +43 -48
  141. package/cjs/domain/rumEventsCollection/view/viewCollection.js.map +1 -0
  142. package/cjs/domain/rumSessionManager.js +3 -13
  143. package/cjs/domain/rumSessionManager.js.map +1 -0
  144. package/cjs/domain/tracing/ddtraceTracer.js +2 -4
  145. package/cjs/domain/tracing/ddtraceTracer.js.map +1 -0
  146. package/cjs/domain/tracing/getDocumentTraceId.js +5 -22
  147. package/cjs/domain/tracing/getDocumentTraceId.js.map +1 -0
  148. package/cjs/domain/tracing/jaegerTracer.js +2 -4
  149. package/cjs/domain/tracing/jaegerTracer.js.map +1 -0
  150. package/cjs/domain/tracing/skywalkingTracer.js +6 -13
  151. package/cjs/domain/tracing/skywalkingTracer.js.map +1 -0
  152. package/cjs/domain/tracing/traceIdentifier.js +2 -7
  153. package/cjs/domain/tracing/traceIdentifier.js.map +1 -0
  154. package/cjs/domain/tracing/tracer.js +5 -30
  155. package/cjs/domain/tracing/tracer.js.map +1 -0
  156. package/cjs/domain/tracing/w3cTraceParentTracer.js +2 -11
  157. package/cjs/domain/tracing/w3cTraceParentTracer.js.map +1 -0
  158. package/cjs/domain/tracing/zipkinMultiTracer.js +4 -6
  159. package/cjs/domain/tracing/zipkinMultiTracer.js.map +1 -0
  160. package/cjs/domain/tracing/zipkinSingleTracer.js +2 -4
  161. package/cjs/domain/tracing/zipkinSingleTracer.js.map +1 -0
  162. package/cjs/domain/trackEventCounts.js +2 -10
  163. package/cjs/domain/trackEventCounts.js.map +1 -0
  164. package/cjs/domain/usr/index.js +2 -7
  165. package/cjs/domain/usr/index.js.map +1 -0
  166. package/cjs/domain/waitPageActivityEnd.js +7 -23
  167. package/cjs/domain/waitPageActivityEnd.js.map +1 -0
  168. package/cjs/index.js +2 -2
  169. package/cjs/index.js.map +1 -0
  170. package/cjs/transport/startRumBatch.js +7 -8
  171. package/cjs/transport/startRumBatch.js.map +1 -0
  172. package/cjs/transport/startRumEventBridge.js +2 -3
  173. package/cjs/transport/startRumEventBridge.js.map +1 -0
  174. package/cjs/types/index.js +2 -3
  175. package/cjs/types/index.js.map +1 -0
  176. package/cjs/types/sessionReplayConstants.js +4 -3
  177. package/cjs/types/sessionReplayConstants.js.map +1 -0
  178. package/esm/boot/buildEnv.js +3 -2
  179. package/esm/boot/buildEnv.js.map +1 -0
  180. package/esm/boot/recorderApi.js +32 -42
  181. package/esm/boot/recorderApi.js.map +1 -0
  182. package/esm/boot/rum.entry.js +2 -1
  183. package/esm/boot/rum.entry.js.map +1 -0
  184. package/esm/boot/rum.js +41 -23
  185. package/esm/boot/rum.js.map +1 -0
  186. package/esm/boot/rumPublicApi.js +3 -43
  187. package/esm/boot/rumPublicApi.js.map +1 -0
  188. package/esm/boot/startRecording.js +8 -7
  189. package/esm/boot/startRecording.js.map +1 -0
  190. package/esm/constants.js +8 -4
  191. package/esm/constants.js.map +1 -0
  192. package/esm/domain/assembly.js +8 -17
  193. package/esm/domain/assembly.js.map +1 -0
  194. package/esm/domain/configuration.js +15 -38
  195. package/esm/domain/configuration.js.map +1 -0
  196. package/esm/domain/contexts/commonContext.js +2 -1
  197. package/esm/domain/contexts/commonContext.js.map +1 -0
  198. package/esm/domain/contexts/displayContext.js +21 -0
  199. package/esm/domain/contexts/displayContext.js.map +1 -0
  200. package/esm/domain/contexts/foregroundContexts.js +6 -25
  201. package/esm/domain/contexts/foregroundContexts.js.map +1 -0
  202. package/esm/domain/contexts/internalContext.js +5 -3
  203. package/esm/domain/contexts/internalContext.js.map +1 -0
  204. package/esm/domain/contexts/pageStateHistory.js +95 -0
  205. package/esm/domain/contexts/pageStateHistory.js.map +1 -0
  206. package/esm/domain/contexts/urlContexts.js +3 -6
  207. package/esm/domain/contexts/urlContexts.js.map +1 -0
  208. package/esm/domain/contexts/viewContexts.js +2 -3
  209. package/esm/domain/contexts/viewContexts.js.map +1 -0
  210. package/esm/domain/domMutationCollection.js +6 -7
  211. package/esm/domain/domMutationCollection.js.map +1 -0
  212. package/esm/domain/initViewportObservable.js +4 -6
  213. package/esm/domain/initViewportObservable.js.map +1 -0
  214. package/esm/domain/locationChangeObservable.js +2 -9
  215. package/esm/domain/locationChangeObservable.js.map +1 -0
  216. package/esm/domain/performanceCollection.js +11 -35
  217. package/esm/domain/performanceCollection.js.map +1 -0
  218. package/esm/domain/replay/deflate/deflateEncoder.js +74 -0
  219. package/esm/domain/replay/deflate/deflateEncoder.js.map +1 -0
  220. package/esm/domain/replay/deflate/deflateWorker.js +129 -0
  221. package/esm/domain/replay/deflate/deflateWorker.js.map +1 -0
  222. package/esm/domain/replay/deflate/index.js +3 -0
  223. package/esm/domain/replay/deflate/index.js.map +1 -0
  224. package/esm/domain/replay/record/elementsScrollPositions.js +2 -2
  225. package/esm/domain/replay/record/elementsScrollPositions.js.map +1 -0
  226. package/esm/domain/replay/record/index.js +2 -1
  227. package/esm/domain/replay/record/index.js.map +1 -0
  228. package/esm/domain/replay/record/mutationBatch.js +5 -9
  229. package/esm/domain/replay/record/mutationBatch.js.map +1 -0
  230. package/esm/domain/replay/record/mutationObserver.js +29 -80
  231. package/esm/domain/replay/record/mutationObserver.js.map +1 -0
  232. package/esm/domain/replay/record/observers.js +15 -72
  233. package/esm/domain/replay/record/observers.js.map +1 -0
  234. package/esm/domain/replay/record/privacy.js +57 -65
  235. package/esm/domain/replay/record/privacy.js.map +1 -0
  236. package/esm/domain/replay/record/record.js +6 -19
  237. package/esm/domain/replay/record/record.js.map +1 -0
  238. package/esm/domain/replay/record/serializationUtils.js +8 -46
  239. package/esm/domain/replay/record/serializationUtils.js.map +1 -0
  240. package/esm/domain/replay/record/serialize.js +45 -107
  241. package/esm/domain/replay/record/serialize.js.map +1 -0
  242. package/esm/domain/replay/record/shadowRootsController.js +4 -6
  243. package/esm/domain/replay/record/shadowRootsController.js.map +1 -0
  244. package/esm/domain/replay/record/utils.js +4 -6
  245. package/esm/domain/replay/record/utils.js.map +1 -0
  246. package/esm/domain/replay/record/viewports.js +3 -32
  247. package/esm/domain/replay/record/viewports.js.map +1 -0
  248. package/esm/domain/replay/replayStats.js +2 -8
  249. package/esm/domain/replay/replayStats.js.map +1 -0
  250. package/esm/domain/replay/segmentCollection/buildReplayPayload.js +4 -6
  251. package/esm/domain/replay/segmentCollection/buildReplayPayload.js.map +1 -0
  252. package/esm/domain/replay/segmentCollection/index.js +2 -2
  253. package/esm/domain/replay/segmentCollection/index.js.map +1 -0
  254. package/esm/domain/replay/segmentCollection/segment.js +21 -77
  255. package/esm/domain/replay/segmentCollection/segment.js.map +1 -0
  256. package/esm/domain/replay/segmentCollection/segmentCollection.js +40 -53
  257. package/esm/domain/replay/segmentCollection/segmentCollection.js.map +1 -0
  258. package/esm/domain/requestCollection.js +2 -10
  259. package/esm/domain/requestCollection.js.map +1 -0
  260. package/esm/domain/rumEventsCollection/actions/actionCollection.js +12 -19
  261. package/esm/domain/rumEventsCollection/actions/actionCollection.js.map +1 -0
  262. package/esm/domain/rumEventsCollection/actions/clickChain.js +3 -10
  263. package/esm/domain/rumEventsCollection/actions/clickChain.js.map +1 -0
  264. package/esm/domain/rumEventsCollection/actions/computeFrustration.js +12 -14
  265. package/esm/domain/rumEventsCollection/actions/computeFrustration.js.map +1 -0
  266. package/esm/domain/rumEventsCollection/actions/getActionNameFromElement.js +22 -50
  267. package/esm/domain/rumEventsCollection/actions/getActionNameFromElement.js.map +1 -0
  268. package/esm/domain/rumEventsCollection/actions/getSelectorsFromElement.js +12 -40
  269. package/esm/domain/rumEventsCollection/actions/getSelectorsFromElement.js.map +1 -0
  270. package/esm/domain/rumEventsCollection/actions/listenActionEvents.js +4 -4
  271. package/esm/domain/rumEventsCollection/actions/listenActionEvents.js.map +1 -0
  272. package/esm/domain/rumEventsCollection/actions/trackClickActions.js +18 -37
  273. package/esm/domain/rumEventsCollection/actions/trackClickActions.js.map +1 -0
  274. package/esm/domain/rumEventsCollection/error/errorCollection.js +14 -19
  275. package/esm/domain/rumEventsCollection/error/errorCollection.js.map +1 -0
  276. package/esm/domain/rumEventsCollection/error/trackConsoleError.js +2 -1
  277. package/esm/domain/rumEventsCollection/error/trackConsoleError.js.map +1 -0
  278. package/esm/domain/rumEventsCollection/error/trackReportError.js +4 -3
  279. package/esm/domain/rumEventsCollection/error/trackReportError.js.map +1 -0
  280. package/esm/domain/rumEventsCollection/longTask/longTaskCollection.js +2 -5
  281. package/esm/domain/rumEventsCollection/longTask/longTaskCollection.js.map +1 -0
  282. package/esm/domain/rumEventsCollection/resource/matchRequestTiming.js +3 -11
  283. package/esm/domain/rumEventsCollection/resource/matchRequestTiming.js.map +1 -0
  284. package/esm/domain/rumEventsCollection/resource/resourceCollection.js +2 -13
  285. package/esm/domain/rumEventsCollection/resource/resourceCollection.js.map +1 -0
  286. package/esm/domain/rumEventsCollection/resource/resourceUtils.js +58 -57
  287. package/esm/domain/rumEventsCollection/resource/resourceUtils.js.map +1 -0
  288. package/esm/domain/rumEventsCollection/view/interactionCountPolyfill.js +47 -0
  289. package/esm/domain/rumEventsCollection/view/interactionCountPolyfill.js.map +1 -0
  290. package/esm/domain/rumEventsCollection/view/trackCommonViewMetrics.js +56 -0
  291. package/esm/domain/rumEventsCollection/view/trackCommonViewMetrics.js.map +1 -0
  292. package/esm/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js +67 -0
  293. package/esm/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js.map +1 -0
  294. package/esm/domain/rumEventsCollection/view/trackFirstContentfulPaint.js +18 -0
  295. package/esm/domain/rumEventsCollection/view/trackFirstContentfulPaint.js.map +1 -0
  296. package/esm/domain/rumEventsCollection/view/trackFirstHidden.js +2 -4
  297. package/esm/domain/rumEventsCollection/view/trackFirstHidden.js.map +1 -0
  298. package/esm/domain/rumEventsCollection/view/trackFirstInputTimings.js +32 -0
  299. package/esm/domain/rumEventsCollection/view/trackFirstInputTimings.js.map +1 -0
  300. package/esm/domain/rumEventsCollection/view/trackInitialViewTimings.js +25 -164
  301. package/esm/domain/rumEventsCollection/view/trackInitialViewTimings.js.map +1 -0
  302. package/esm/domain/rumEventsCollection/view/trackInteractionToNextPaint.js +113 -0
  303. package/esm/domain/rumEventsCollection/view/trackInteractionToNextPaint.js.map +1 -0
  304. package/esm/domain/rumEventsCollection/view/trackLargestContentfulPaint.js +41 -0
  305. package/esm/domain/rumEventsCollection/view/trackLargestContentfulPaint.js.map +1 -0
  306. package/esm/domain/rumEventsCollection/view/trackLoadingTime.js +33 -0
  307. package/esm/domain/rumEventsCollection/view/trackLoadingTime.js.map +1 -0
  308. package/esm/domain/rumEventsCollection/view/trackNavigationTimings.js +31 -0
  309. package/esm/domain/rumEventsCollection/view/trackNavigationTimings.js.map +1 -0
  310. package/esm/domain/rumEventsCollection/view/trackScrollMetrics.js +53 -0
  311. package/esm/domain/rumEventsCollection/view/trackScrollMetrics.js.map +1 -0
  312. package/esm/domain/rumEventsCollection/view/trackViewEventCounts.js +5 -3
  313. package/esm/domain/rumEventsCollection/view/trackViewEventCounts.js.map +1 -0
  314. package/esm/domain/rumEventsCollection/view/trackViews.js +28 -54
  315. package/esm/domain/rumEventsCollection/view/trackViews.js.map +1 -0
  316. package/esm/domain/rumEventsCollection/view/viewCollection.js +43 -44
  317. package/esm/domain/rumEventsCollection/view/viewCollection.js.map +1 -0
  318. package/esm/domain/rumSessionManager.js +3 -9
  319. package/esm/domain/rumSessionManager.js.map +1 -0
  320. package/esm/domain/tracing/ddtraceTracer.js +2 -2
  321. package/esm/domain/tracing/ddtraceTracer.js.map +1 -0
  322. package/esm/domain/tracing/getDocumentTraceId.js +5 -15
  323. package/esm/domain/tracing/getDocumentTraceId.js.map +1 -0
  324. package/esm/domain/tracing/jaegerTracer.js +3 -2
  325. package/esm/domain/tracing/jaegerTracer.js.map +1 -0
  326. package/esm/domain/tracing/skywalkingTracer.js +8 -12
  327. package/esm/domain/tracing/skywalkingTracer.js.map +1 -0
  328. package/esm/domain/tracing/traceIdentifier.js +2 -4
  329. package/esm/domain/tracing/traceIdentifier.js.map +1 -0
  330. package/esm/domain/tracing/tracer.js +5 -19
  331. package/esm/domain/tracing/tracer.js.map +1 -0
  332. package/esm/domain/tracing/w3cTraceParentTracer.js +4 -8
  333. package/esm/domain/tracing/w3cTraceParentTracer.js.map +1 -0
  334. package/esm/domain/tracing/zipkinMultiTracer.js +5 -4
  335. package/esm/domain/tracing/zipkinMultiTracer.js.map +1 -0
  336. package/esm/domain/tracing/zipkinSingleTracer.js +3 -2
  337. package/esm/domain/tracing/zipkinSingleTracer.js.map +1 -0
  338. package/esm/domain/trackEventCounts.js +2 -8
  339. package/esm/domain/trackEventCounts.js.map +1 -0
  340. package/esm/domain/usr/index.js +2 -3
  341. package/esm/domain/usr/index.js.map +1 -0
  342. package/esm/domain/waitPageActivityEnd.js +9 -19
  343. package/esm/domain/waitPageActivityEnd.js.map +1 -0
  344. package/esm/index.js +2 -1
  345. package/esm/index.js.map +1 -0
  346. package/esm/transport/startRumBatch.js +7 -6
  347. package/esm/transport/startRumBatch.js.map +1 -0
  348. package/esm/transport/startRumEventBridge.js +2 -1
  349. package/esm/transport/startRumEventBridge.js.map +1 -0
  350. package/esm/types/index.js.map +1 -0
  351. package/esm/types/sessionReplayConstants.js +5 -3
  352. package/esm/types/sessionReplayConstants.js.map +1 -0
  353. package/package.json +6 -5
  354. package/src/boot/recorderApi.js +43 -32
  355. package/src/boot/rum.js +45 -10
  356. package/src/boot/startRecording.js +7 -3
  357. package/src/domain/assembly.js +5 -2
  358. package/src/domain/configuration.js +0 -1
  359. package/src/domain/contexts/displayContext.js +29 -0
  360. package/src/domain/contexts/internalContext.js +3 -1
  361. package/src/domain/contexts/pageStateHistory.js +138 -0
  362. package/src/domain/replay/deflate/deflateEncoder.js +88 -0
  363. package/src/domain/replay/{segmentCollection/startDeflateWorker.js → deflate/deflateWorker.js} +55 -32
  364. package/src/domain/replay/deflate/index.js +7 -0
  365. package/src/domain/replay/record/mutationObserver.js +2 -1
  366. package/src/domain/replay/record/observers.js +3 -3
  367. package/src/domain/replay/record/privacy.js +20 -23
  368. package/src/domain/replay/record/record.js +2 -2
  369. package/src/domain/replay/record/serializationUtils.js +4 -2
  370. package/src/domain/replay/record/serialize.js +11 -14
  371. package/src/domain/replay/record/shadowRootsController.js +0 -1
  372. package/src/domain/replay/record/viewports.js +0 -26
  373. package/src/domain/replay/segmentCollection/buildReplayPayload.js +1 -1
  374. package/src/domain/replay/segmentCollection/index.js +0 -1
  375. package/src/domain/replay/segmentCollection/segment.js +28 -83
  376. package/src/domain/replay/segmentCollection/segmentCollection.js +49 -55
  377. package/src/domain/rumEventsCollection/actions/actionCollection.js +12 -12
  378. package/src/domain/rumEventsCollection/actions/trackClickActions.js +8 -6
  379. package/src/domain/rumEventsCollection/error/errorCollection.js +20 -15
  380. package/src/domain/rumEventsCollection/error/trackReportError.js +22 -16
  381. package/src/domain/rumEventsCollection/view/interactionCountPolyfill.js +59 -0
  382. package/src/domain/rumEventsCollection/view/trackCommonViewMetrics.js +87 -0
  383. package/src/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js +73 -0
  384. package/src/domain/rumEventsCollection/view/trackFirstContentfulPaint.js +23 -0
  385. package/src/domain/rumEventsCollection/view/trackFirstInputTimings.js +40 -0
  386. package/src/domain/rumEventsCollection/view/trackInitialViewTimings.js +29 -199
  387. package/src/domain/rumEventsCollection/view/trackInteractionToNextPaint.js +144 -0
  388. package/src/domain/rumEventsCollection/view/trackLargestContentfulPaint.js +57 -0
  389. package/src/domain/rumEventsCollection/view/trackLoadingTime.js +50 -0
  390. package/src/domain/rumEventsCollection/view/trackNavigationTimings.js +35 -0
  391. package/src/domain/rumEventsCollection/view/trackScrollMetrics.js +74 -0
  392. package/src/domain/rumEventsCollection/view/trackViews.js +32 -37
  393. package/src/domain/rumEventsCollection/view/viewCollection.js +51 -22
  394. package/src/transport/startRumBatch.js +5 -1
  395. package/cjs/domain/replay/segmentCollection/startDeflateWorker.js +0 -145
  396. package/cjs/domain/rumEventsCollection/view/trackViewMetrics.js +0 -156
  397. package/esm/domain/replay/segmentCollection/startDeflateWorker.js +0 -128
  398. package/esm/domain/rumEventsCollection/view/trackViewMetrics.js +0 -146
  399. package/src/domain/rumEventsCollection/view/trackViewMetrics.js +0 -176
@@ -3,11 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.convertMouseEventToLayoutCoordinates = void 0;
7
- exports.getScrollX = getScrollX;
8
- exports.getScrollY = getScrollY;
9
- exports.getVisualViewport = void 0;
10
-
6
+ exports.getVisualViewport = exports.convertMouseEventToLayoutCoordinates = void 0;
11
7
  /**
12
8
  * Browsers have not standardized various dimension properties. Mobile devices typically report
13
9
  * dimensions in reference to the visual viewport, while desktop uses the layout viewport. For example,
@@ -18,19 +14,19 @@ exports.getVisualViewport = void 0;
18
14
  * which viewport is being measured. Therefore these exported functions will fallback to assuming that the layout
19
15
  * viewport is being measured by the browser
20
16
  */
17
+
21
18
  // Scrollbar widths vary across properties on different devices and browsers
22
19
  var TOLERANCE = 25;
20
+
23
21
  /**
24
22
  * Use the Visual Viewport API's properties to measure scrollX/Y in reference to the layout viewport
25
23
  * in order to determine if window.scrollX/Y is measuring the layout or visual viewport.
26
24
  * This finding corresponds to which viewport mouseEvent.clientX/Y and window.innerWidth/Height measures.
27
25
  */
28
-
29
26
  function isVisualViewportFactoredIn() {
30
27
  var visual = window.visualViewport;
31
28
  return Math.abs(visual.pageTop - visual.offsetTop - window.scrollY) > TOLERANCE || Math.abs(visual.pageLeft - visual.offsetLeft - window.scrollX) > TOLERANCE;
32
29
  }
33
-
34
30
  var convertMouseEventToLayoutCoordinates = function convertMouseEventToLayoutCoordinates(clientX, clientY) {
35
31
  var visual = window.visualViewport;
36
32
  var normalised = {
@@ -39,7 +35,6 @@ var convertMouseEventToLayoutCoordinates = function convertMouseEventToLayoutCoo
39
35
  visualViewportX: clientX,
40
36
  visualViewportY: clientY
41
37
  };
42
-
43
38
  if (!visual) {
44
39
  // On old browsers, we cannot normalise, so fallback to clientX/Y
45
40
  return normalised;
@@ -52,12 +47,9 @@ var convertMouseEventToLayoutCoordinates = function convertMouseEventToLayoutCoo
52
47
  normalised.visualViewportX = Math.round(clientX - visual.offsetLeft);
53
48
  normalised.visualViewportY = Math.round(clientY - visual.offsetTop);
54
49
  }
55
-
56
50
  return normalised;
57
51
  };
58
-
59
52
  exports.convertMouseEventToLayoutCoordinates = convertMouseEventToLayoutCoordinates;
60
-
61
53
  var getVisualViewport = function getVisualViewport() {
62
54
  var visual = window.visualViewport;
63
55
  return {
@@ -70,35 +62,5 @@ var getVisualViewport = function getVisualViewport() {
70
62
  width: visual.width
71
63
  };
72
64
  };
73
-
74
65
  exports.getVisualViewport = getVisualViewport;
75
-
76
- function getScrollX() {
77
- var scrollX;
78
- var visual = window.visualViewport;
79
-
80
- if (visual) {
81
- scrollX = visual.pageLeft - visual.offsetLeft;
82
- } else if (window.scrollX !== undefined) {
83
- scrollX = window.scrollX;
84
- } else {
85
- scrollX = window.pageXOffset || 0;
86
- }
87
-
88
- return Math.round(scrollX);
89
- }
90
-
91
- function getScrollY() {
92
- var scrollY;
93
- var visual = window.visualViewport;
94
-
95
- if (visual) {
96
- scrollY = visual.pageTop - visual.offsetTop;
97
- } else if (window.scrollY !== undefined) {
98
- scrollY = window.scrollY;
99
- } else {
100
- scrollY = window.pageYOffset || 0;
101
- }
102
-
103
- return Math.round(scrollY);
104
- }
66
+ //# sourceMappingURL=viewports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewports.js","names":["TOLERANCE","isVisualViewportFactoredIn","visual","window","visualViewport","Math","abs","pageTop","offsetTop","scrollY","pageLeft","offsetLeft","scrollX","convertMouseEventToLayoutCoordinates","clientX","clientY","normalised","layoutViewportX","layoutViewportY","visualViewportX","visualViewportY","round","exports","getVisualViewport","scale","height","width"],"sources":["../../../../src/domain/replay/record/viewports.js"],"sourcesContent":["/**\n * Browsers have not standardized various dimension properties. Mobile devices typically report\n * dimensions in reference to the visual viewport, while desktop uses the layout viewport. For example,\n * Mobile Chrome will change innerWidth when a pinch zoom takes place, while Chrome Desktop (mac) will not.\n *\n * With the new Viewport API, we now calculate and normalize dimension properties to the layout viewport.\n * If the VisualViewport API is not supported by a browser, it isn't reasonably possible to detect or normalize\n * which viewport is being measured. Therefore these exported functions will fallback to assuming that the layout\n * viewport is being measured by the browser\n */\n\n// Scrollbar widths vary across properties on different devices and browsers\nvar TOLERANCE = 25\n\n/**\n * Use the Visual Viewport API's properties to measure scrollX/Y in reference to the layout viewport\n * in order to determine if window.scrollX/Y is measuring the layout or visual viewport.\n * This finding corresponds to which viewport mouseEvent.clientX/Y and window.innerWidth/Height measures.\n */\nfunction isVisualViewportFactoredIn() {\n var visual = window.visualViewport\n return (\n Math.abs(visual.pageTop - visual.offsetTop - window.scrollY) > TOLERANCE ||\n Math.abs(visual.pageLeft - visual.offsetLeft - window.scrollX) > TOLERANCE\n )\n}\n\nexport var convertMouseEventToLayoutCoordinates = function (clientX, clientY) {\n var visual = window.visualViewport\n var normalised = {\n layoutViewportX: clientX,\n layoutViewportY: clientY,\n visualViewportX: clientX,\n visualViewportY: clientY\n }\n\n if (!visual) {\n // On old browsers, we cannot normalise, so fallback to clientX/Y\n return normalised\n } else if (isVisualViewportFactoredIn()) {\n // Typically Mobile Devices\n normalised.layoutViewportX = Math.round(clientX + visual.offsetLeft)\n normalised.layoutViewportY = Math.round(clientY + visual.offsetTop)\n } else {\n // Typically Desktop Devices\n normalised.visualViewportX = Math.round(clientX - visual.offsetLeft)\n normalised.visualViewportY = Math.round(clientY - visual.offsetTop)\n }\n return normalised\n}\n\nexport var getVisualViewport = function () {\n var visual = window.visualViewport\n return {\n scale: visual.scale,\n offsetLeft: visual.offsetLeft,\n offsetTop: visual.offsetTop,\n pageLeft: visual.pageLeft,\n pageTop: visual.pageTop,\n height: visual.height,\n width: visual.width\n }\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAIA,SAAS,GAAG,EAAE;;AAElB;AACA;AACA;AACA;AACA;AACA,SAASC,0BAA0BA,CAAA,EAAG;EACpC,IAAIC,MAAM,GAAGC,MAAM,CAACC,cAAc;EAClC,OACEC,IAAI,CAACC,GAAG,CAACJ,MAAM,CAACK,OAAO,GAAGL,MAAM,CAACM,SAAS,GAAGL,MAAM,CAACM,OAAO,CAAC,GAAGT,SAAS,IACxEK,IAAI,CAACC,GAAG,CAACJ,MAAM,CAACQ,QAAQ,GAAGR,MAAM,CAACS,UAAU,GAAGR,MAAM,CAACS,OAAO,CAAC,GAAGZ,SAAS;AAE9E;AAEO,IAAIa,oCAAoC,GAAG,SAAvCA,oCAAoC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AAA,CAAAC,iBAAA,GAAAA,iBAAA"}
@@ -13,38 +13,29 @@ exports.resetReplayStats = resetReplayStats;
13
13
  var MAX_STATS_HISTORY = 10;
14
14
  exports.MAX_STATS_HISTORY = MAX_STATS_HISTORY;
15
15
  var statsPerView;
16
-
17
16
  function getSegmentsCount(viewId) {
18
17
  return getOrCreateReplayStats(viewId).segments_count;
19
18
  }
20
-
21
19
  function addSegment(viewId) {
22
20
  getOrCreateReplayStats(viewId).segments_count += 1;
23
21
  }
24
-
25
22
  function addRecord(viewId) {
26
23
  getOrCreateReplayStats(viewId).records_count += 1;
27
24
  }
28
-
29
25
  function addWroteData(viewId, additionalBytesCount) {
30
26
  getOrCreateReplayStats(viewId).segments_total_raw_size += additionalBytesCount;
31
27
  }
32
-
33
28
  function getReplayStats(viewId) {
34
29
  return statsPerView && statsPerView.get(viewId);
35
30
  }
36
-
37
31
  function resetReplayStats() {
38
32
  statsPerView = undefined;
39
33
  }
40
-
41
34
  function getOrCreateReplayStats(viewId) {
42
35
  if (!statsPerView) {
43
36
  statsPerView = new Map();
44
37
  }
45
-
46
38
  var replayStats;
47
-
48
39
  if (statsPerView.has(viewId)) {
49
40
  replayStats = statsPerView.get(viewId);
50
41
  } else {
@@ -54,20 +45,16 @@ function getOrCreateReplayStats(viewId) {
54
45
  segments_total_raw_size: 0
55
46
  };
56
47
  statsPerView.set(viewId, replayStats);
57
-
58
48
  if (statsPerView.size > MAX_STATS_HISTORY) {
59
49
  deleteOldestStats();
60
50
  }
61
51
  }
62
-
63
52
  return replayStats;
64
53
  }
65
-
66
54
  function deleteOldestStats() {
67
55
  if (!statsPerView) {
68
56
  return;
69
57
  }
70
-
71
58
  if (statsPerView.keys) {
72
59
  statsPerView["delete"](statsPerView.keys().next().value);
73
60
  } else {
@@ -80,4 +67,5 @@ function deleteOldestStats() {
80
67
  }
81
68
  });
82
69
  }
83
- }
70
+ }
71
+ //# sourceMappingURL=replayStats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replayStats.js","names":["MAX_STATS_HISTORY","exports","statsPerView","getSegmentsCount","viewId","getOrCreateReplayStats","segments_count","addSegment","addRecord","records_count","addWroteData","additionalBytesCount","segments_total_raw_size","getReplayStats","get","resetReplayStats","undefined","Map","replayStats","has","set","size","deleteOldestStats","keys","next","value","isFirst","forEach","_value","key"],"sources":["../../../src/domain/replay/replayStats.js"],"sourcesContent":["export var MAX_STATS_HISTORY = 10\nvar statsPerView\n\nexport function getSegmentsCount(viewId) {\n return getOrCreateReplayStats(viewId).segments_count\n}\n\nexport function addSegment(viewId) {\n getOrCreateReplayStats(viewId).segments_count += 1\n}\n\nexport function addRecord(viewId) {\n getOrCreateReplayStats(viewId).records_count += 1\n}\n\nexport function addWroteData(viewId, additionalBytesCount) {\n getOrCreateReplayStats(viewId).segments_total_raw_size += additionalBytesCount\n}\n\nexport function getReplayStats(viewId) {\n return statsPerView && statsPerView.get(viewId)\n}\n\nexport function resetReplayStats() {\n statsPerView = undefined\n}\n\nfunction getOrCreateReplayStats(viewId) {\n if (!statsPerView) {\n statsPerView = new Map()\n }\n\n var replayStats\n if (statsPerView.has(viewId)) {\n replayStats = statsPerView.get(viewId)\n } else {\n replayStats = {\n records_count: 0,\n segments_count: 0,\n segments_total_raw_size: 0\n }\n statsPerView.set(viewId, replayStats)\n if (statsPerView.size > MAX_STATS_HISTORY) {\n deleteOldestStats()\n }\n }\n\n return replayStats\n}\n\nfunction deleteOldestStats() {\n if (!statsPerView) {\n return\n }\n if (statsPerView.keys) {\n statsPerView.delete(statsPerView.keys().next().value)\n } else {\n // IE11 doesn't support map.keys\n var isFirst = true\n statsPerView.forEach(function (_value, key) {\n if (isFirst) {\n statsPerView.delete(key)\n isFirst = false\n }\n })\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAO,IAAIA,iBAAiB,GAAG,EAAE;AAAAC,OAAA,CAAAD,iBAAA,GAAAA,iBAAA;AACjC,IAAIE,YAAY;AAET,SAASC,gBAAgBA,CAACC,MAAM,EAAE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rBrB,YAAY,UAAO,CAACA,YAAY,CAACqB,IAAI,CAAC,CAAC,CAACC,IAAI,CAAC,CAAC,CAACC,KAAK,CAAC;EACvD,CAAC,MAAM;IACL;IACA,IAAIC,OAAO,GAAG,IAAI;IAClBxB,YAAY,CAACyB,OAAO,CAAC,UAAUC,MAAM,EAAEC,GAAG,EAAE;MAC1C,IAAIH,OAAO,EAAE;QACXxB,YAAY,UAAO,CAAC2B,GAAG,CAAC;QACxBH,OAAO,GAAG,KAAK;MACjB;IACF,CAAC,CAAC;EACJ;AACF"}
@@ -5,11 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.buildReplayPayload = buildReplayPayload;
7
7
  exports.toFormEntries = toFormEntries;
8
-
9
8
  var _browserCore = require("@cloudcare/browser-core");
10
-
11
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
12
-
9
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
13
10
  function buildReplayPayload(data, metadata, rawSegmentBytesCount) {
14
11
  var formData = new FormData();
15
12
  formData.append('segment', new Blob([data], {
@@ -18,26 +15,24 @@ function buildReplayPayload(data, metadata, rawSegmentBytesCount) {
18
15
  toFormEntries(metadata, function (key, value) {
19
16
  formData.append(key, value);
20
17
  });
21
- formData.append('raw_segment_size', rawSegmentBytesCount.toString());
18
+ formData.append('raw_segment_size', rawSegmentBytesCount);
22
19
  return {
23
20
  data: formData,
24
21
  bytesCount: data.byteLength
25
22
  };
26
23
  }
27
-
28
24
  function toFormEntries(input, onEntry, prefix) {
29
25
  if (prefix === undefined) {
30
26
  prefix = '';
31
27
  }
32
-
33
28
  (0, _browserCore.each)((0, _browserCore.objectEntries)(input), function (item) {
34
29
  var value = item[1];
35
30
  var key = item[0];
36
-
37
31
  if (_typeof(value) === 'object' && value !== null) {
38
32
  toFormEntries(value, onEntry, '' + prefix + key + '_');
39
33
  } else {
40
34
  onEntry('' + prefix + key, String(value));
41
35
  }
42
36
  });
43
- }
37
+ }
38
+ //# sourceMappingURL=buildReplayPayload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildReplayPayload.js","names":["_browserCore","require","_typeof","obj","Symbol","iterator","constructor","prototype","buildReplayPayload","data","metadata","rawSegmentBytesCount","formData","FormData","append","Blob","type","session","id","start","toFormEntries","key","value","bytesCount","byteLength","input","onEntry","prefix","undefined","each","objectEntries","item","String"],"sources":["../../../../src/domain/replay/segmentCollection/buildReplayPayload.js"],"sourcesContent":["import { objectEntries, each } from '@cloudcare/browser-core'\n\nexport function buildReplayPayload(data, metadata, rawSegmentBytesCount) {\n var formData = new FormData()\n formData.append(\n 'segment',\n new Blob([data], {\n type: 'application/octet-stream'\n }),\n metadata.session.id + '-' + metadata.start\n )\n\n toFormEntries(metadata, function (key, value) {\n formData.append(key, value)\n })\n formData.append('raw_segment_size', rawSegmentBytesCount)\n\n return { data: formData, bytesCount: data.byteLength }\n}\n\nexport function toFormEntries(input, onEntry, prefix) {\n if (prefix === undefined) {\n prefix = ''\n }\n each(objectEntries(input), function (item) {\n var value = item[1]\n var key = item[0]\n if (typeof value === 'object' && value !== null) {\n toFormEntries(value, onEntry, '' + prefix + key + '_')\n } else {\n onEntry('' + prefix + key, String(value))\n }\n })\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAA6D,SAAAC,QAAAC,GAAA,sCAAAD,OAAA,wBAAAE,MAAA,uBAAAA,MAAA,CAAAC,QAAA,aAAAF,GAAA,kBAAAA,GAAA,gBAA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AAGC,MAAM,GAAGN,GAAG,GAAG,GAAG,CAAC;IACxD,CAAC,MAAM;MACLK,OAAO,CAAC,EAAE,GAAGC,MAAM,GAAGN,GAAG,EAAEW,MAAM,CAACV,KAAK,CAAC,CAAC;IAC3C;EACF,CAAC,CAAC;AACJ"}
@@ -15,19 +15,11 @@ Object.defineProperty(exports, "setSegmentBytesLimit", {
15
15
  return _segmentCollection.setSegmentBytesLimit;
16
16
  }
17
17
  });
18
- Object.defineProperty(exports, "startDeflateWorker", {
19
- enumerable: true,
20
- get: function get() {
21
- return _startDeflateWorker.startDeflateWorker;
22
- }
23
- });
24
18
  Object.defineProperty(exports, "startSegmentCollection", {
25
19
  enumerable: true,
26
20
  get: function get() {
27
21
  return _segmentCollection.startSegmentCollection;
28
22
  }
29
23
  });
30
-
31
24
  var _segmentCollection = require("./segmentCollection");
32
-
33
- var _startDeflateWorker = require("./startDeflateWorker");
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_segmentCollection","require"],"sources":["../../../../src/domain/replay/segmentCollection/index.js"],"sourcesContent":["export {\n startSegmentCollection,\n setSegmentBytesLimit\n} from './segmentCollection'\nexport { SEGMENT_BYTES_LIMIT } from './segmentCollection'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA"}
@@ -1,113 +1,49 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.Segment = Segment;
9
-
10
8
  var _browserCore = require("@cloudcare/browser-core");
11
-
12
9
  var _types = require("../../../types");
13
-
14
10
  var replayStats = _interopRequireWildcard(require("../replayStats"));
15
-
16
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
17
-
18
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
-
20
- var STREAM_ID = 1;
21
- var nextId = 0;
22
-
23
- function Segment(worker, context, creationReason, initialRecord, onWrote, onFlushed) {
24
- this.worker = worker;
25
- this.pendingWriteCount = 0;
26
- this.id = nextId++;
11
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
+ function Segment(encoder, context, creationReason) {
14
+ this.encoder = encoder;
27
15
  var viewId = context.view.id;
28
16
  this.metadata = (0, _browserCore.assign)({
29
- start: initialRecord.timestamp,
30
- end: initialRecord.timestamp,
17
+ start: Infinity,
18
+ end: -Infinity,
31
19
  creation_reason: creationReason,
32
- records_count: 1,
33
- has_full_snapshot: initialRecord.type === _types.RecordType.FullSnapshot,
20
+ records_count: 0,
21
+ has_full_snapshot: false,
34
22
  index_in_view: replayStats.getSegmentsCount(viewId),
35
23
  source: 'browser'
36
24
  }, context);
37
25
  replayStats.addSegment(viewId);
38
- replayStats.addRecord(viewId);
39
- var rawBytesCount = 0;
40
- var compressedBytesCount = 0;
41
- var compressedData = [];
42
-
43
- var _this = this;
44
-
45
- var wokerListener = (0, _browserCore.addEventListener)(worker, 'message', function (params) {
46
- var data = params.data;
47
-
48
- if (data.type !== 'wrote') {
49
- return;
50
- }
51
-
52
- if (data.id === _this.id) {
53
- _this.pendingWriteCount -= 1;
54
- replayStats.addWroteData(viewId, data.additionalBytesCount);
55
- rawBytesCount += data.additionalBytesCount;
56
- compressedBytesCount += data.result.length;
57
- compressedData.push(data.result);
58
-
59
- if (_this.flushReason && _this.pendingWriteCount === 0) {
60
- compressedData.push(data.trailer);
61
- onFlushed((0, _browserCore.concatBuffers)(compressedData), rawBytesCount);
62
- removeMessageListener();
63
- } else {
64
- onWrote(compressedBytesCount);
65
- }
66
- } else if (data.id > _this.id) {
67
- // Messages should be received in the same order as they are sent, so if we receive a
68
- // message with an id superior to this Segment instance id, we know that another, more
69
- // recent Segment instance is being used.
70
- //
71
- // In theory, a "flush" response should have been received at this point, so the listener
72
- // should already have been removed. But if something goes wrong and we didn't receive a
73
- // "flush" response, remove the listener to avoid any leak, and send a monitor message to
74
- // help investigate the issue.
75
- removeMessageListener();
76
- }
77
- });
78
- var removeMessageListener = wokerListener.stop; // worker.addEventListener('message', listener)
79
-
80
- this.write('{"records":[' + JSON.stringify(initialRecord));
81
26
  }
82
-
83
- Segment.prototype.addRecord = function (record) {
27
+ Segment.prototype.addRecord = function (record, callback) {
84
28
  this.metadata.start = Math.min(this.metadata.start, record.timestamp);
85
29
  this.metadata.end = Math.max(this.metadata.end, record.timestamp);
86
30
  this.metadata.records_count += 1;
87
- replayStats.addRecord(this.metadata.view.id);
88
-
89
31
  if (!this.metadata.has_full_snapshot) {
90
32
  this.metadata.has_full_snapshot = record.type === _types.RecordType.FullSnapshot;
91
33
  }
92
-
93
- this.write(',' + JSON.stringify(record));
34
+ replayStats.addRecord(this.metadata.view.id);
35
+ var prefix = this.metadata.records_count === 1 ? '{"records":[' : ',';
36
+ this.encoder.write(prefix + JSON.stringify(record), callback);
94
37
  };
95
-
96
- Segment.prototype.flush = function (reason) {
97
- this.write('],' + JSON.stringify(this.metadata).slice(1) + '\n');
98
- this.worker.postMessage({
99
- action: 'reset',
100
- streamId: STREAM_ID
38
+ Segment.prototype.flush = function (callback) {
39
+ if (this.metadata.records_count === 0) {
40
+ throw new Error('Empty segment flushed');
41
+ }
42
+ var _this = this;
43
+ this.encoder.write('],' + JSON.stringify(this.metadata).slice(1) + '\n', function () {
44
+ replayStats.addWroteData(_this.metadata.view.id, _this.encoder.getRawBytesCount());
45
+ callback(_this.metadata);
101
46
  });
102
- this.flushReason = reason;
47
+ this.encoder.reset();
103
48
  };
104
-
105
- Segment.prototype.write = function (data) {
106
- this.pendingWriteCount += 1;
107
- this.worker.postMessage({
108
- data: data,
109
- id: this.id,
110
- streamId: STREAM_ID,
111
- action: 'write'
112
- });
113
- };
49
+ //# sourceMappingURL=segment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segment.js","names":["_browserCore","require","_types","replayStats","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Segment","encoder","context","creationReason","viewId","view","id","metadata","assign","start","Infinity","end","creation_reason","records_count","has_full_snapshot","index_in_view","getSegmentsCount","source","addSegment","addRecord","record","callback","Math","min","timestamp","max","type","RecordType","FullSnapshot","prefix","write","JSON","stringify","flush","Error","_this","slice","addWroteData","getRawBytesCount","reset"],"sources":["../../../../src/domain/replay/segmentCollection/segment.js"],"sourcesContent":["import { assign } from '@cloudcare/browser-core'\nimport { RecordType } from '../../../types'\nimport * as replayStats from '../replayStats'\n\nexport function Segment(encoder, context, creationReason) {\n this.encoder = encoder\n var viewId = context.view.id\n\n this.metadata = assign(\n {\n start: Infinity,\n end: -Infinity,\n creation_reason: creationReason,\n records_count: 0,\n has_full_snapshot: false,\n index_in_view: replayStats.getSegmentsCount(viewId),\n source: 'browser'\n },\n context\n )\n replayStats.addSegment(viewId)\n}\nSegment.prototype.addRecord = function (record, callback) {\n this.metadata.start = Math.min(this.metadata.start, record.timestamp)\n this.metadata.end = Math.max(this.metadata.end, record.timestamp)\n this.metadata.records_count += 1\n if (!this.metadata.has_full_snapshot) {\n this.metadata.has_full_snapshot = record.type === RecordType.FullSnapshot\n }\n replayStats.addRecord(this.metadata.view.id)\n const prefix = this.metadata.records_count === 1 ? '{\"records\":[' : ','\n this.encoder.write(prefix + JSON.stringify(record), callback)\n}\nSegment.prototype.flush = function (callback) {\n if (this.metadata.records_count === 0) {\n throw new Error('Empty segment flushed')\n }\n var _this = this\n this.encoder.write(\n '],' + JSON.stringify(this.metadata).slice(1) + '\\n',\n function () {\n replayStats.addWroteData(\n _this.metadata.view.id,\n _this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Aa,KAAK,CAAC,GAAG,cAAc,GAAG,GAAG;EACvE,IAAI,CAACZ,OAAO,CAAC6B,KAAK,CAACD,MAAM,GAAGE,IAAI,CAACC,SAAS,CAACZ,MAAM,CAAC,EAAEC,QAAQ,CAAC;AAC/D,CAAC;AACDrB,OAAO,CAACL,SAAS,CAACsC,KAAK,GAAG,UAAUZ,QAAQ,EAAE;EAC5C,IAAI,IAAI,CAACd,QAAQ,CAACM,aAAa,KAAK,CAAC,EAAE;IACrC,MAAM,IAAIqB,KAAK,CAAC,uBAAuB,CAAC;EAC1C;EACA,IAAIC,KAAK,GAAG,IAAI;EAChB,IAAI,CAAClC,OAAO,CAAC6B,KAAK,CAChB,IAAI,GAAGC,IAAI,CAACC,SAAS,CAAC,IAAI,CAACzB,QAAQ,CAAC,CAAC6B,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,EACpD,YAAY;IACV5D,WAAW,CAAC6D,YAAY,CACtBF,KAAK,CAAC5B,QAAQ,CAACF,IAAI,CAACC,EAAE,EACtB6B,KAAK,CAAClC,OAAO,CAACqC,gBAAgB,CAAC,CACjC,CAAC;IACDjB,QAAQ,CAACc,KAAK,CAAC5B,QAAQ,CAAC;EAC1B,CACF,CAAC;EACD,IAAI,CAACN,OAAO,CAACsC,KAAK,CAAC,CAAC;AACtB,CAAC"}
@@ -8,21 +8,18 @@ exports.computeSegmentContext = computeSegmentContext;
8
8
  exports.doStartSegmentCollection = doStartSegmentCollection;
9
9
  exports.setSegmentBytesLimit = setSegmentBytesLimit;
10
10
  exports.startSegmentCollection = startSegmentCollection;
11
-
12
11
  var _browserCore = require("@cloudcare/browser-core");
13
-
14
12
  var _buildReplayPayload = require("./buildReplayPayload");
15
-
16
13
  var _segment = require("./segment");
17
-
18
14
  var SEGMENT_DURATION_LIMIT = 30 * _browserCore.ONE_SECOND;
19
15
  /**
20
16
  * beacon payload max queue size implementation is 64kb
21
17
  * ensure that we leave room for logs, rum and potential other users
22
18
  */
23
-
24
19
  exports.SEGMENT_DURATION_LIMIT = SEGMENT_DURATION_LIMIT;
25
- var SEGMENT_BYTES_LIMIT = 60000; // Segments are the main data structure for session replays. They contain context information used
20
+ var SEGMENT_BYTES_LIMIT = 60000;
21
+
22
+ // Segments are the main data structure for session replays. They contain context information used
26
23
  // for indexing or UI needs, and a list of records (RRWeb 'events', renamed to avoid confusing
27
24
  // namings). They are stored without any processing from the intake, and fetched one after the
28
25
  // other while a session is being replayed. Their encoding (deflate) are carefully crafted to allow
@@ -46,22 +43,18 @@ var SEGMENT_BYTES_LIMIT = 60000; // Segments are the main data structure for ses
46
43
  //
47
44
  // To help investigate session replays issues, each segment is created with a "creation reason",
48
45
  // indicating why the session has been created.
49
-
50
46
  exports.SEGMENT_BYTES_LIMIT = SEGMENT_BYTES_LIMIT;
51
-
52
- function startSegmentCollection(lifeCycle, configuration, sessionManager, viewContexts, httpRequest, worker) {
47
+ function startSegmentCollection(lifeCycle, configuration, sessionManager, viewContexts, httpRequest, encoder) {
53
48
  return doStartSegmentCollection(lifeCycle, function () {
54
49
  return computeSegmentContext(configuration, sessionManager, viewContexts);
55
- }, httpRequest, worker);
50
+ }, httpRequest, encoder);
56
51
  }
57
-
58
52
  var SegmentCollectionStatus = {
59
53
  WaitingForInitialRecord: 0,
60
54
  SegmentPending: 1,
61
55
  Stopped: 2
62
56
  };
63
-
64
- function doStartSegmentCollection(lifeCycle, getSegmentContext, httpRequest, worker) {
57
+ function doStartSegmentCollection(lifeCycle, getSegmentContext, httpRequest, encoder) {
65
58
  var state = {
66
59
  status: SegmentCollectionStatus.WaitingForInitialRecord,
67
60
  nextSegmentCreationReason: 'init'
@@ -74,13 +67,18 @@ function doStartSegmentCollection(lifeCycle, getSegmentContext, httpRequest, wor
74
67
  flushSegment(pageExitEvent.reason);
75
68
  });
76
69
  var unsubscribePageExited = subscribePageExited.unsubscribe;
77
-
78
70
  function flushSegment(flushReason) {
79
71
  if (state.status === SegmentCollectionStatus.SegmentPending) {
80
- state.segment.flush(flushReason);
72
+ state.segment.flush(function (metadata) {
73
+ var payload = (0, _buildReplayPayload.buildReplayPayload)(encoder.getEncodedBytes(), metadata, encoder.getRawBytesCount());
74
+ if ((0, _browserCore.isPageExitReason)(flushReason)) {
75
+ httpRequest.sendOnExit(payload);
76
+ } else {
77
+ httpRequest.send(payload);
78
+ }
79
+ });
81
80
  (0, _browserCore.clearTimeout)(state.expirationTimeoutId);
82
81
  }
83
-
84
82
  if (flushReason !== 'stop') {
85
83
  state = {
86
84
  status: SegmentCollectionStatus.WaitingForInitialRecord,
@@ -92,47 +90,32 @@ function doStartSegmentCollection(lifeCycle, getSegmentContext, httpRequest, wor
92
90
  };
93
91
  }
94
92
  }
95
-
96
- function createNewSegment(creationReason, initialRecord) {
97
- var context = getSegmentContext();
98
-
99
- if (!context) {
100
- return;
101
- }
102
-
103
- var segment = new _segment.Segment(worker, context, creationReason, initialRecord, function (compressedSegmentBytesCount) {
104
- if (!segment.flushReason && compressedSegmentBytesCount > SEGMENT_BYTES_LIMIT) {
105
- flushSegment('segment_bytes_limit');
106
- }
107
- }, function (data, rawSegmentBytesCount) {
108
- var payload = (0, _buildReplayPayload.buildReplayPayload)(data, segment.metadata, rawSegmentBytesCount);
109
-
110
- if ((0, _browserCore.isPageExitReason)(segment.flushReason)) {
111
- httpRequest.sendOnExit(payload);
112
- } else {
113
- httpRequest.send(payload);
114
- }
115
- });
116
- state = {
117
- status: SegmentCollectionStatus.SegmentPending,
118
- segment: segment,
119
- expirationTimeoutId: (0, _browserCore.setTimeout)(function () {
120
- flushSegment('segment_duration_limit');
121
- }, SEGMENT_DURATION_LIMIT)
122
- };
123
- }
124
-
125
93
  return {
126
94
  addRecord: function addRecord(record) {
127
- switch (state.status) {
128
- case SegmentCollectionStatus.WaitingForInitialRecord:
129
- createNewSegment(state.nextSegmentCreationReason, record);
130
- break;
131
-
132
- case SegmentCollectionStatus.SegmentPending:
133
- state.segment.addRecord(record);
134
- break;
95
+ if (state.status === SegmentCollectionStatus.Stopped) {
96
+ return;
97
+ }
98
+ if (state.status === SegmentCollectionStatus.WaitingForInitialRecord) {
99
+ var context = getSegmentContext();
100
+ if (!context) {
101
+ return;
102
+ }
103
+ state = {
104
+ status: SegmentCollectionStatus.SegmentPending,
105
+ segment: new _segment.Segment(encoder, context, state.nextSegmentCreationReason),
106
+ expirationTimeoutId: (0, _browserCore.setTimeout)(function () {
107
+ flushSegment('segment_duration_limit');
108
+ }, SEGMENT_DURATION_LIMIT)
109
+ };
135
110
  }
111
+ var segment = state.segment;
112
+ segment.addRecord(record, function () {
113
+ if (
114
+ // the written segment is still pending
115
+ state.status === SegmentCollectionStatus.SegmentPending && state.segment === segment && encoder.getEncodedBytesCount() > SEGMENT_BYTES_LIMIT) {
116
+ flushSegment('segment_bytes_limit');
117
+ }
118
+ });
136
119
  },
137
120
  stop: function stop() {
138
121
  flushSegment('stop');
@@ -141,15 +124,12 @@ function doStartSegmentCollection(lifeCycle, getSegmentContext, httpRequest, wor
141
124
  }
142
125
  };
143
126
  }
144
-
145
127
  function computeSegmentContext(configuration, sessionManager, viewContexts) {
146
128
  var session = sessionManager.findTrackedSession();
147
129
  var viewContext = viewContexts.findView();
148
-
149
130
  if (!session || !viewContext) {
150
131
  return undefined;
151
132
  }
152
-
153
133
  return {
154
134
  sdk: {
155
135
  name: configuration.sdkName,
@@ -169,11 +149,8 @@ function computeSegmentContext(configuration, sessionManager, viewContexts) {
169
149
  }
170
150
  };
171
151
  }
172
-
173
- function setSegmentBytesLimit(newSegmentBytesLimit) {
174
- if (newSegmentBytesLimit === undefined) {
175
- newSegmentBytesLimit = 60000;
176
- }
177
-
152
+ function setSegmentBytesLimit() {
153
+ var newSegmentBytesLimit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 60000;
178
154
  exports.SEGMENT_BYTES_LIMIT = SEGMENT_BYTES_LIMIT = newSegmentBytesLimit;
179
- }
155
+ }
156
+ //# sourceMappingURL=segmentCollection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segmentCollection.js","names":["_browserCore","require","_buildReplayPayload","_segment","SEGMENT_DURATION_LIMIT","ONE_SECOND","exports","SEGMENT_BYTES_LIMIT","startSegmentCollection","lifeCycle","configuration","sessionManager","viewContexts","httpRequest","encoder","doStartSegmentCollection","computeSegmentContext","SegmentCollectionStatus","WaitingForInitialRecord","SegmentPending","Stopped","getSegmentContext","state","status","nextSegmentCreationReason","subscribeViewCreated","subscribe","LifeCycleEventType","VIEW_CREATED","flushSegment","unsubscribeViewCreated","unsubscribe","subscribePageExited","PAGE_EXITED","pageExitEvent","reason","unsubscribePageExited","flushReason","segment","flush","metadata","payload","buildReplayPayload","getEncodedBytes","getRawBytesCount","isPageExitReason","sendOnExit","send","clearTimeout","expirationTimeoutId","addRecord","record","context","Segment","setTimeout","getEncodedBytesCount","stop","session","findTrackedSession","viewContext","findView","undefined","sdk","name","sdkName","version","sdkVersion","env","service","app","id","applicationId","view","setSegmentBytesLimit","newSegmentBytesLimit","arguments","length"],"sources":["../../../../src/domain/replay/segmentCollection/segmentCollection.js"],"sourcesContent":["import {\n ONE_SECOND,\n LifeCycleEventType,\n isPageExitReason,\n setTimeout,\n clearTimeout\n} from '@cloudcare/browser-core'\nimport { buildReplayPayload } from './buildReplayPayload'\nimport { Segment } from './segment'\n\nexport var SEGMENT_DURATION_LIMIT = 30 * ONE_SECOND\n/**\n * beacon payload max queue size implementation is 64kb\n * ensure that we leave room for logs, rum and potential other users\n */\nexport var SEGMENT_BYTES_LIMIT = 60000\n\n// Segments are the main data structure for session replays. They contain context information used\n// for indexing or UI needs, and a list of records (RRWeb 'events', renamed to avoid confusing\n// namings). They are stored without any processing from the intake, and fetched one after the\n// other while a session is being replayed. Their encoding (deflate) are carefully crafted to allow\n// concatenating multiple segments together. Segments have a size overhead (metadata), so our goal is to\n// build segments containing as many records as possible while complying with the various flush\n// strategies to guarantee a good replay quality.\n//\n// When the recording starts, a segment is initially created. The segment is flushed (finalized and\n// sent) based on various events (non-exhaustive list):\n//\n// * the page visibility change or becomes to unload\n// * the segment duration reaches a limit\n// * the encoded segment bytes count reaches a limit\n// * ...\n//\n// A segment cannot be created without its context. If the RUM session ends and no session id is\n// available when creating a new segment, records will be ignored, until the session is renewed and\n// a new session id is available.\n//\n// Empty segments (segments with no record) aren't useful and should be ignored.\n//\n// To help investigate session replays issues, each segment is created with a \"creation reason\",\n// indicating why the session has been created.\n\nexport function startSegmentCollection(\n lifeCycle,\n configuration,\n sessionManager,\n viewContexts,\n httpRequest,\n encoder\n) {\n return doStartSegmentCollection(\n lifeCycle,\n function () {\n return computeSegmentContext(configuration, sessionManager, viewContexts)\n },\n httpRequest,\n encoder\n )\n}\n\nvar SegmentCollectionStatus = {\n WaitingForInitialRecord: 0,\n SegmentPending: 1,\n Stopped: 2\n}\n\nexport function doStartSegmentCollection(\n lifeCycle,\n getSegmentContext,\n httpRequest,\n encoder\n) {\n var state = {\n status: SegmentCollectionStatus.WaitingForInitialRecord,\n nextSegmentCreationReason: 'init'\n }\n var subscribeViewCreated = lifeCycle.subscribe(\n LifeCycleEventType.VIEW_CREATED,\n function () {\n flushSegment('view_change')\n }\n )\n var unsubscribeViewCreated = subscribeViewCreated.unsubscribe\n var subscribePageExited = lifeCycle.subscribe(\n LifeCycleEventType.PAGE_EXITED,\n function (pageExitEvent) {\n flushSegment(pageExitEvent.reason)\n }\n )\n var unsubscribePageExited = subscribePageExited.unsubscribe\n\n function flushSegment(flushReason) {\n if (state.status === SegmentCollectionStatus.SegmentPending) {\n state.segment.flush(function (metadata) {\n var payload = buildReplayPayload(\n encoder.getEncodedBytes(),\n metadata,\n encoder.getRawBytesCount()\n )\n\n if (isPageExitReason(flushReason)) {\n httpRequest.sendOnExit(payload)\n } else {\n httpRequest.send(payload)\n }\n })\n clearTimeout(state.expirationTimeoutId)\n }\n\n if (flushReason !== 'stop') {\n state = {\n status: SegmentCollectionStatus.WaitingForInitialRecord,\n nextSegmentCreationReason: flushReason\n }\n } else {\n state = {\n status: SegmentCollectionStatus.Stopped\n }\n }\n }\n\n return {\n addRecord: function (record) {\n if (state.status === SegmentCollectionStatus.Stopped) {\n return\n }\n\n if (state.status === SegmentCollectionStatus.WaitingForInitialRecord) {\n var context = getSegmentContext()\n if (!context) {\n return\n }\n\n state = {\n status: SegmentCollectionStatus.SegmentPending,\n segment: new Segment(\n encoder,\n context,\n state.nextSegmentCreationReason\n ),\n expirationTimeoutId: setTimeout(function () {\n flushSegment('segment_duration_limit')\n }, SEGMENT_DURATION_LIMIT)\n }\n }\n\n var segment = state.segment\n\n segment.addRecord(record, function () {\n if (\n // the written segment is still pending\n state.status === SegmentCollectionStatus.SegmentPending &&\n state.segment === segment &&\n encoder.getEncodedBytesCount() > SEGMENT_BYTES_LIMIT\n ) {\n flushSegment('segment_bytes_limit')\n }\n })\n },\n\n stop: function () {\n flushSegment('stop')\n unsubscribeViewCreated()\n unsubscribePageExited()\n }\n }\n}\n\nexport function computeSegmentContext(\n configuration,\n sessionManager,\n viewContexts\n) {\n var session = sessionManager.findTrackedSession()\n var viewContext = viewContexts.findView()\n if (!session || !viewContext) {\n return undefined\n }\n return {\n sdk: {\n name: configuration.sdkName,\n version: configuration.sdkVersion\n },\n env: configuration.env || '',\n service: viewContext.service || configuration.service || 'browser',\n version: viewContext.version || configuration.version || '',\n app: {\n id: configuration.applicationId\n },\n session: {\n id: session.id\n },\n view: {\n id: viewContext.id\n }\n }\n}\n\nexport function setSegmentBytesLimit(newSegmentBytesLimit = 60_000) {\n SEGMENT_BYTES_LIMIT = newSegmentBytesLimit\n}\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAOA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAEO,IAAIG,sBAAsB,GAAG,EAAE,GAAGC,uBAAU;AACnD;AACA;AACA;AACA;AAHAC,OAAA,CAAAF,sBAAA,GAAAA,sBAAA;AAIO,IAAIG,mBAAmB,GAAG,KAAK;;AAEtC;AACA;AACA;AACA;AACA;AAC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