@harperfast/harper 5.2.14 → 5.2.15

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 (179) hide show
  1. package/dist/resources/analytics/write.d.ts +3 -0
  2. package/dist/resources/analytics/write.js +39 -13
  3. package/dist/resources/analytics/write.js.map +1 -1
  4. package/dist/security/keys.js +258 -66
  5. package/dist/security/keys.js.map +1 -1
  6. package/dist/server/threads/threadServer.d.ts +3 -0
  7. package/dist/server/threads/threadServer.js +24 -6
  8. package/dist/server/threads/threadServer.js.map +1 -1
  9. package/npm-shrinkwrap.json +2 -2
  10. package/package.json +1 -1
  11. package/resources/analytics/write.ts +40 -14
  12. package/security/keys.ts +251 -66
  13. package/server/threads/threadServer.js +24 -6
  14. package/studio/web/assets/{Chat-C97PMlIn.js → Chat-CeEDA28S.js} +13 -13
  15. package/studio/web/assets/FloatingChat-J_P5KaR4.js +23 -0
  16. package/studio/web/assets/SearchDialog-BWMGseDd.js +1 -0
  17. package/studio/web/assets/{abnfDiagram-O67JEVCF-DpPZWMOf.js → abnfDiagram-O67JEVCF-raXE027J.js} +1 -1
  18. package/studio/web/assets/alertDialog-BbWD9Xxa.js +1 -0
  19. package/studio/web/assets/apiToken-BKot-xR5.js +1 -0
  20. package/studio/web/assets/applications-BlJChLsS.js +296 -0
  21. package/studio/web/assets/architecture-7GRP2DOG-DDmz3hpI.js +1 -0
  22. package/studio/web/assets/{architectureDiagram-NJMV4G6O-OmgLraID.js → architectureDiagram-NJMV4G6O-C8_Eet7w.js} +1 -1
  23. package/studio/web/assets/arrow-up-D2g_57vT.js +1 -0
  24. package/studio/web/assets/authStore-CJCaADw9.js +3 -0
  25. package/studio/web/assets/{blockDiagram-BEXU5L5S-Cv7CD3Ai.js → blockDiagram-BEXU5L5S-DR6S5-1D.js} +1 -1
  26. package/studio/web/assets/{button-MFP9n8Ck.js → button-DWwfgGWI.js} +2 -2
  27. package/studio/web/assets/{c4Diagram-YGBWAQC7-Ds1vKYnN.js → c4Diagram-YGBWAQC7-BAfZ1G01.js} +1 -1
  28. package/studio/web/assets/channel-D0AkPjJ8.js +1 -0
  29. package/studio/web/assets/{chevron-up-CFe8x5Bp.js → chevron-up-CFxbMGv2.js} +1 -1
  30. package/studio/web/assets/{chunk-3FUC2YCW-DpnBPH8B.js → chunk-3FUC2YCW-DuRp-j19.js} +1 -1
  31. package/studio/web/assets/{chunk-5DYCD2WN-LLLCQSzg.js → chunk-5DYCD2WN-BceBfIHT.js} +1 -1
  32. package/studio/web/assets/{chunk-742MDFTN-BL8J_pIO.js → chunk-742MDFTN-CIkt8ijt.js} +1 -1
  33. package/studio/web/assets/{chunk-7INBJB4K-C-hJHiiK.js → chunk-7INBJB4K-BpeAXyOi.js} +1 -1
  34. package/studio/web/assets/{chunk-7M6MHVWA-C6ZqkFbA.js → chunk-7M6MHVWA-h6WlaTzO.js} +1 -1
  35. package/studio/web/assets/{chunk-7PRAP22T-CUXM8BG6.js → chunk-7PRAP22T-KyqX6x3f.js} +1 -1
  36. package/studio/web/assets/{chunk-GTNCS2PH-DJ2BFvS1.js → chunk-GTNCS2PH-DGHLXyow.js} +1 -1
  37. package/studio/web/assets/{chunk-GWA4HPMP-C42bSqLL.js → chunk-GWA4HPMP-DsejB6gA.js} +1 -1
  38. package/studio/web/assets/{chunk-MBY4JIJT-C-5jz6Lo.js → chunk-MBY4JIJT-BwSGweQP.js} +1 -1
  39. package/studio/web/assets/{chunk-NETBCI7D-D-bzlN4r.js → chunk-NETBCI7D-C8UnOw_f.js} +1 -1
  40. package/studio/web/assets/{chunk-O7XYJQB3-ep14zA23.js → chunk-O7XYJQB3-CBS3nZYV.js} +1 -1
  41. package/studio/web/assets/{chunk-UA2S7LBM-BMRWRHED.js → chunk-UA2S7LBM-BHpEdH8D.js} +1 -1
  42. package/studio/web/assets/{chunk-WEXAMYUT-DdLYVdX1.js → chunk-WEXAMYUT-BAIhTwyh.js} +1 -1
  43. package/studio/web/assets/{chunk-Z7XXMR3K-BmKEDjcP.js → chunk-Z7XXMR3K-DSHbImdf.js} +1 -1
  44. package/studio/web/assets/{chunk-ZIGJFQKS-DLZgdNxA.js → chunk-ZIGJFQKS-Cs8fUn7y.js} +1 -1
  45. package/studio/web/assets/{classDiagram-v2-NBCMYWYE-DOI5vgKT.js → classDiagram-v2-NBCMYWYE-DmDPkt2u.js} +1 -1
  46. package/studio/web/assets/cn-6T8VranJ.js +1 -0
  47. package/studio/web/assets/{codicon-Brq4_Ui5.ttf → codicon-DF1abBS2.ttf} +0 -0
  48. package/studio/web/assets/{createLucideIcon-bziYxJli.js → createLucideIcon-fO5dL7D5.js} +1 -1
  49. package/studio/web/assets/{css.worker-l1psR_wG.js → css.worker-DoT-OOzx.js} +36 -36
  50. package/studio/web/assets/{cssMode-DyLZPMjo.js → cssMode-DjeA9Hx_.js} +1 -1
  51. package/studio/web/assets/{cynefin-OW5HDTMX-BSW-DB7S.js → cynefin-OW5HDTMX-DIvbXLSj.js} +1 -1
  52. package/studio/web/assets/{cynefinDiagram-VND7K2PF-CbAHEwxt.js → cynefinDiagram-VND7K2PF-BdtaXiCE.js} +1 -1
  53. package/studio/web/assets/{dagre-6A5THRUB-Csxewgs4.js → dagre-6A5THRUB-C7RUWHyz.js} +1 -1
  54. package/studio/web/assets/{diagram-22UHCM2B-a0rt8tY4.js → diagram-22UHCM2B-DJCvcaWP.js} +1 -1
  55. package/studio/web/assets/{diagram-3UASUU5V-lEj2SVNh.js → diagram-3UASUU5V-Du6VKWln.js} +1 -1
  56. package/studio/web/assets/{diagram-ATOU4E4O-HcrAeB-q.js → diagram-ATOU4E4O-dxRfeG4B.js} +1 -1
  57. package/studio/web/assets/{diagram-CDSNMT55-CYxiuyEx.js → diagram-CDSNMT55-l5Ga0u-W.js} +1 -1
  58. package/studio/web/assets/{diagram-MLGK6HIB-ChbCJTgJ.js → diagram-MLGK6HIB-CNQY47LA.js} +1 -1
  59. package/studio/web/assets/{diagram-MPIPVDR6-DaX9Y-N3.js → diagram-MPIPVDR6-7prveD1B.js} +1 -1
  60. package/studio/web/assets/{dist-Cz2Y6-6G.js → dist-BrRuMUzt.js} +1 -1
  61. package/studio/web/assets/{download-CtostjYn.js → download-Cn6tPG4L.js} +1 -1
  62. package/studio/web/assets/{ebnfDiagram-ZINNZB2B-CwAsENB1.js → ebnfDiagram-ZINNZB2B-5OnkTpfi.js} +1 -1
  63. package/studio/web/assets/{editor-CFQ5kbiT.js → editor-DKwRNgor.js} +1 -1
  64. package/studio/web/assets/editor.worker-Yd1NR0QT.js +33 -0
  65. package/studio/web/assets/{elk-276RUBZZ-Hexg9E4D.js → elk-276RUBZZ-DxDQPjQT.js} +1 -1
  66. package/studio/web/assets/{erDiagram-OPXOYQCR-CeC-wwO1.js → erDiagram-OPXOYQCR-CQlCX84D.js} +1 -1
  67. package/studio/web/assets/eventmodeling-NTZA5JFV-DONQf5aG.js +1 -0
  68. package/studio/web/assets/flowDiagram-KWPJA3E3-BoZ8_QR1.js +1 -0
  69. package/studio/web/assets/{ganttDiagram-FUAMR5RP-C2_Hhl1-.js → ganttDiagram-FUAMR5RP-bloX3Voy.js} +1 -1
  70. package/studio/web/assets/{getAnalytics-CjthMQqF.js → getAnalytics-C0FHjtdQ.js} +1 -1
  71. package/studio/web/assets/{gitGraph-4MIJSDKK-xIk5Vuew.js → gitGraph-4MIJSDKK-BrXWmJt2.js} +1 -1
  72. package/studio/web/assets/{gitGraphDiagram-X574FWY7-CMxJ34up.js → gitGraphDiagram-X574FWY7-C2KnnZeY.js} +1 -1
  73. package/studio/web/assets/{html-DdMBJEGu.js → html-KzEcNmGL.js} +1 -1
  74. package/studio/web/assets/{html.worker-DdwM4IrA.js → html.worker-B1dwY0Ay.js} +27 -27
  75. package/studio/web/assets/{htmlMode-DNtBx3OV.js → htmlMode-Bipij2Sy.js} +1 -1
  76. package/studio/web/assets/index-DMUQ34Jl.js +828 -0
  77. package/studio/web/assets/index-QLZw6xrU.css +1 -0
  78. package/studio/web/assets/index.lazy-D5_uqR4Q.js +2 -0
  79. package/studio/web/assets/{info-A6RAGUB7-o49TEbj-.js → info-A6RAGUB7-BhzBHe4U.js} +1 -1
  80. package/studio/web/assets/{infoDiagram-VRGFBTTK-Cjhh7yzZ.js → infoDiagram-VRGFBTTK-B0J1132p.js} +1 -1
  81. package/studio/web/assets/{ishikawaDiagram-OU5B5YK6-C63aXRmh.js → ishikawaDiagram-OU5B5YK6-BNk0tuQx.js} +1 -1
  82. package/studio/web/assets/{javascript-Dy6KbeHT.js → javascript-QytBwXUJ.js} +1 -1
  83. package/studio/web/assets/{journeyDiagram-ZHPQQLJL-D_o0P5Mu.js → journeyDiagram-ZHPQQLJL-Be79RMQM.js} +1 -1
  84. package/studio/web/assets/json.worker-BQqXGI3X.js +65 -0
  85. package/studio/web/assets/{jsonMode-BiuDVrzl.js → jsonMode-CIoh4zwS.js} +1 -1
  86. package/studio/web/assets/{kanban-definition-PNTS6WVX-CTI9SSxY.js → kanban-definition-PNTS6WVX-4uuoQP9W.js} +1 -1
  87. package/studio/web/assets/{languageServices-Dk8_6B25.js → languageServices-BvFCul4Y.js} +1 -1
  88. package/studio/web/assets/localStorageKeys-etzFY_xV.js +1 -0
  89. package/studio/web/assets/{lspLanguageFeatures-DwJKXzQa.js → lspLanguageFeatures-BvDuJHGH.js} +1 -1
  90. package/studio/web/assets/{mermaid-parser.core-C2lcH_jP.js → mermaid-parser.core-V1UYMeXV.js} +3 -3
  91. package/studio/web/assets/{mermaid.core-BG5bjfIG.js → mermaid.core-1PX6R49U.js} +4 -4
  92. package/studio/web/assets/{mindmap-definition-NLK3R4M7-BK7ho6JD.js → mindmap-definition-NLK3R4M7-C70Ctm0J.js} +1 -1
  93. package/studio/web/assets/notifications-C5EZskVd.js +1 -0
  94. package/studio/web/assets/notifications-jQfsyiVJ.js +1 -0
  95. package/studio/web/assets/{packet-AYTQ26CC-BHPy6KBV.js → packet-AYTQ26CC-DWbXHx5g.js} +1 -1
  96. package/studio/web/assets/{pegDiagram-GJSIUBJH-DzjwG3jO.js → pegDiagram-GJSIUBJH-d6z1cc7W.js} +1 -1
  97. package/studio/web/assets/{pie-WAS4IAKB-D0cP-DTU.js → pie-WAS4IAKB-DjoTm3yr.js} +1 -1
  98. package/studio/web/assets/{pieDiagram-5QR66LMP-C_hOP9Lv.js → pieDiagram-5QR66LMP-Dz3RHpDA.js} +1 -1
  99. package/studio/web/assets/profile-CkLzjQm2.js +1 -0
  100. package/studio/web/assets/{quadrantDiagram-O4NWA36T-CZW8PbV1.js → quadrantDiagram-O4NWA36T-CIF5Qkou.js} +1 -1
  101. package/studio/web/assets/{radar-RG4KPBEZ-C8fk0U81.js → radar-RG4KPBEZ-CVBgjCOj.js} +1 -1
  102. package/studio/web/assets/{railroad-74A4TZTK-B60FWm17.js → railroad-74A4TZTK-BdhXw10Q.js} +1 -1
  103. package/studio/web/assets/railroad-abnf-HS5TGJTU-BcoQPN39.js +1 -0
  104. package/studio/web/assets/railroad-ebnf-LZEXJU2U-B1Lke2JN.js +1 -0
  105. package/studio/web/assets/railroad-peg-WCYAUIDC-D-oJFkiV.js +1 -0
  106. package/studio/web/assets/{railroadDiagram-XR7U4H2S-DyyNmgbU.js → railroadDiagram-XR7U4H2S-y3Jv2U6N.js} +1 -1
  107. package/studio/web/assets/regions-b7HODz0P.js +1 -0
  108. package/studio/web/assets/register-DGmUOJc1.js +909 -0
  109. package/studio/web/assets/register-DjpsE8to.css +1 -0
  110. package/studio/web/assets/{requirementDiagram-PLB6GJNP-C4H-mLKu.js → requirementDiagram-PLB6GJNP-ChINZEmu.js} +1 -1
  111. package/studio/web/assets/restartGate-nHAFLDh-.js +1 -0
  112. package/studio/web/assets/{sankeyDiagram-IPEJSGJF-DHDyga4c.js → sankeyDiagram-IPEJSGJF-D9AyLce2.js} +1 -1
  113. package/studio/web/assets/{sequenceDiagram-PO4LG4MO-CdNcHXRI.js → sequenceDiagram-PO4LG4MO-hfk4aIEm.js} +1 -1
  114. package/studio/web/assets/{setComponentFile-BavlhfY0.js → setComponentFile-DlUcJ4Y0.js} +1 -1
  115. package/studio/web/assets/{setup-04yVzr2I.js → setup-D1jywSGk.js} +2 -2
  116. package/studio/web/assets/{stateDiagram-v2-GCMORJYK-CpKuXq15.js → stateDiagram-v2-GCMORJYK-Bs8RIb9K.js} +1 -1
  117. package/studio/web/assets/status-CjVoPieo.js +61 -0
  118. package/studio/web/assets/{swimlanes-2SLR337P-NRHa2D8I.js → swimlanes-2SLR337P-B52xrf6t.js} +1 -1
  119. package/studio/web/assets/swimlanesDiagram-TC7HE7FX-DfN7BAP5.js +8 -0
  120. package/studio/web/assets/tabs-BCTQzoQK.js +1 -0
  121. package/studio/web/assets/{timeline-definition-EJHVYXUP-D39Y-xpq.js → timeline-definition-EJHVYXUP-DJSITpQX.js} +1 -1
  122. package/studio/web/assets/toggleHighContrast-C9CKwOn9.js +51 -0
  123. package/studio/web/assets/toggleHighContrast-n7clI0si.css +1 -0
  124. package/studio/web/assets/{treeView-Q6P3EWNA-CRWR9OqD.js → treeView-Q6P3EWNA-C-epdxRo.js} +1 -1
  125. package/studio/web/assets/{treemap-WGGIJYW6-ZfXyJgLO.js → treemap-WGGIJYW6-DOVyp_zw.js} +1 -1
  126. package/studio/web/assets/{ts.worker-DDMUrpqh.js → ts.worker-Clm12uY6.js} +131 -131
  127. package/studio/web/assets/{tsMode-DGeWfx0W.js → tsMode-CRibSU_y.js} +1 -1
  128. package/studio/web/assets/{typescript-62_1FUbs.js → typescript-BRCpg8By.js} +1 -1
  129. package/studio/web/assets/{useEntityRestURL-DSVwev9J.js → useEntityRestURL-pPVmpjIi.js} +1 -1
  130. package/studio/web/assets/{usecaseDiagram-POWQR4AR-jf-zIDZ_.js → usecaseDiagram-POWQR4AR-B6252cbq.js} +1 -1
  131. package/studio/web/assets/{vendor-core-BdkdbUek.js → vendor-core-6LhfJlRC.js} +1 -1
  132. package/studio/web/assets/vendor-datadog-ozKf-pts.js +6 -0
  133. package/studio/web/assets/{vendor-react-izWchTRL.js → vendor-react-BOliS0BL.js} +1 -1
  134. package/studio/web/assets/vendor-tanstack-Bntfka-M.js +2 -0
  135. package/studio/web/assets/vendor-ui-9EYYDgoN.js +41 -0
  136. package/studio/web/assets/{vennDiagram-UO4OBE2U-BKYAZUh_.js → vennDiagram-UO4OBE2U-DZTsDA4k.js} +1 -1
  137. package/studio/web/assets/{wardley-WFR3VGLG-BO7f36ci.js → wardley-WFR3VGLG-Cfqoe6z4.js} +1 -1
  138. package/studio/web/assets/{wardleyDiagram-VNRHLVJA-Djb0JDQc.js → wardleyDiagram-VNRHLVJA-qu_f7Tvl.js} +1 -1
  139. package/studio/web/assets/{workers-Cs52GyHv.js → workers-BBDZZ4qw.js} +3 -3
  140. package/studio/web/assets/{xml-Co5ow_Ix.js → xml-tWNEwt7n.js} +1 -1
  141. package/studio/web/assets/{xychartDiagram-PMCCYNJV-BQh9ubvb.js → xychartDiagram-PMCCYNJV-UrOKRsmR.js} +1 -1
  142. package/studio/web/assets/{yaml-BcngpXye.js → yaml-BZgmBIf5.js} +1 -1
  143. package/studio/web/assets/{yaml.worker-DAK2o_H1.js → yaml.worker-D9JekGdp.js} +183 -183
  144. package/studio/web/index.html +15 -15
  145. package/studio/web/assets/FloatingChat-BUlsFGMV.js +0 -23
  146. package/studio/web/assets/alertDialog-UrbiMgQt.js +0 -1
  147. package/studio/web/assets/apiToken-CPhbc_zN.js +0 -1
  148. package/studio/web/assets/applications-D3Z6BVDl.js +0 -296
  149. package/studio/web/assets/architecture-7GRP2DOG-11l4Ny1l.js +0 -1
  150. package/studio/web/assets/authStore-5jSS5pTW.js +0 -3
  151. package/studio/web/assets/channel-BDtouPd6.js +0 -1
  152. package/studio/web/assets/dialog-DTepachC.js +0 -1
  153. package/studio/web/assets/editor.worker-CkkvdXvO.js +0 -33
  154. package/studio/web/assets/eventmodeling-NTZA5JFV-CFb03e0o.js +0 -1
  155. package/studio/web/assets/flowDiagram-KWPJA3E3-Cidi00_Y.js +0 -1
  156. package/studio/web/assets/index-CPoDzQTe.css +0 -1
  157. package/studio/web/assets/index-zZCxAIEb.js +0 -824
  158. package/studio/web/assets/index.lazy-CKbsHbSN.js +0 -2
  159. package/studio/web/assets/json.worker-CSi2hF-a.js +0 -65
  160. package/studio/web/assets/notifications-DJqAtWxD.js +0 -1
  161. package/studio/web/assets/notifications-DsDtb41c.js +0 -1
  162. package/studio/web/assets/profile-zTGUN51x.js +0 -1
  163. package/studio/web/assets/railroad-abnf-HS5TGJTU-CLMVZvH0.js +0 -1
  164. package/studio/web/assets/railroad-ebnf-LZEXJU2U--tlwFoVB.js +0 -1
  165. package/studio/web/assets/railroad-peg-WCYAUIDC-Dpuslblm.js +0 -1
  166. package/studio/web/assets/regions-SOtABPB9.js +0 -1
  167. package/studio/web/assets/register-7JezVakc.js +0 -848
  168. package/studio/web/assets/register-jjEx9u7D.css +0 -1
  169. package/studio/web/assets/setLocalStorage-D_kflv4U.js +0 -1
  170. package/studio/web/assets/status-g_mNYE7j.js +0 -61
  171. package/studio/web/assets/swimlanesDiagram-TC7HE7FX-BBk4t4hO.js +0 -8
  172. package/studio/web/assets/tabs-CnQ_zenf.js +0 -1
  173. package/studio/web/assets/toggleHighContrast--ixms01u.css +0 -1
  174. package/studio/web/assets/toggleHighContrast-i2FjCrzO.js +0 -49
  175. package/studio/web/assets/useLocalStorage-BYoZF60G.js +0 -1
  176. package/studio/web/assets/vendor-datadog-fCQhBHGk.js +0 -6
  177. package/studio/web/assets/vendor-tanstack-CQ1aRjVa.js +0 -2
  178. package/studio/web/assets/vendor-ui-aE1tHcW7.js +0 -41
  179. package/studio/web/assets/x-vYntCxm4.js +0 -1
@@ -1 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{a as t}from"./vendor-datadog-fCQhBHGk.js";import{r as n,t as r}from"./setLocalStorage-D_kflv4U.js";var i=e(t(),1);function a(e,t){let a=(0,i.useState)(n(e,t)),[o]=a;return(0,i.useEffect)(()=>r(e,o),[e,o]),a}export{a as t};
@@ -1,6 +0,0 @@
1
- import{i as e,n as t,t as n}from"./rolldown-runtime-Dd_uD5pT.js";var r=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function ee(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var te=ee.prototype=new b;te.constructor=ee,_(te,y.prototype),te.isPureReactComponent=!0;var x=Array.isArray;function ne(){}var S={H:null,A:null,T:null,S:null},re=Object.prototype.hasOwnProperty;function ie(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ae(e,t){return ie(e.type,t,e.props)}function oe(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function se(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ce=/\/+/g;function le(e,t){return typeof e==`object`&&e&&e.key!=null?se(``+e.key):t.toString(36)}function ue(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(ne,ne):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function de(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,de(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+le(e,0):a,x(o)?(i=``,c!=null&&(i=c.replace(ce,`$&/`)+`/`),de(o,r,i,``,function(e){return e})):o!=null&&(oe(o)&&(o=ae(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ce,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(x(e))for(var u=0;u<e.length;u++)a=e[u],s=l+le(a,u),c+=de(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+le(a,u++),c+=de(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return de(ue(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function fe(e,t,n){if(e==null)return e;var r=[],i=0;return de(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function pe(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var C=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function w(e){var t=S.T,n={};n.types=t===null?null:t.types,S.T=n;try{var r=e(),i=S.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(ne,C)}catch(e){C(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),S.T=t}}function T(e){var t=S.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else w(T.bind(null,e))}var me={map:fe,forEach:function(e,t,n){fe(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return fe(e,function(){t++}),t},toArray:function(e){return fe(e,function(e){return e})||[]},only:function(e){if(!oe(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=me,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=ee,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=S,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return S.H.useMemoCache(e)}},e.addTransitionType=T,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!re.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return ie(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)re.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return ie(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=oe,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:pe}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=w,e.unstable_useCacheRefresh=function(){return S.H.useCacheRefresh()},e.use=function(e){return S.H.use(e)},e.useActionState=function(e,t,n){return S.H.useActionState(e,t,n)},e.useCallback=function(e,t){return S.H.useCallback(e,t)},e.useContext=function(e){return S.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return S.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return S.H.useEffect(e,t)},e.useEffectEvent=function(e){return S.H.useEffectEvent(e)},e.useId=function(){return S.H.useId()},e.useImperativeHandle=function(e,t,n){return S.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return S.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return S.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return S.H.useMemo(e,t)},e.useOptimistic=function(e,t){return S.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return S.H.useReducer(e,t,n)},e.useRef=function(e){return S.H.useRef(e)},e.useState=function(e){return S.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return S.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return S.H.useTransition()},e.version=`19.3.0`})),i=n(((e,t)=>{t.exports=r()}));function a(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e}function o(e){return a(e)===`object`}function s(e){return typeof e==`number`&&e>=0&&e<=100}function c(e){return typeof e==`string`||e instanceof RegExp||typeof e==`function`}function l(e,t){return u(e,t,p())}function u(e,t,n){if(t===void 0)return e;if(typeof t!=`object`||!t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t.source,t.flags);if(n.hasAlreadyBeenSeen(t))return;if(Array.isArray(t)){let r=Array.isArray(e)?e:[];for(let e=0;e<t.length;++e)r[e]=u(r[e],t[e],n);return r}let r=a(e)===`object`?e:{};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&e!==`__proto__`&&(r[e]=u(r[e],t[e],n));return r}function d(e){return l(void 0,e)}function f(...e){let t;for(let n of e)n!=null&&(t=l(t,n));return t}function p(){let e=new WeakSet;return{hasAlreadyBeenSeen(t){let n=e.has(t);return n||e.add(t),n}}}var m=`https://docs.datadoghq.com`,h=`More details:`,g={log:`log`,debug:`debug`,info:`info`,warn:`warn`,error:`error`},_=console,v={log:_.log,debug:_.debug,info:_.info,warn:_.warn,error:_.error};function y(e){return{debug:v.debug.bind(_,e),log:v.log.bind(_,e),info:v.info.bind(_,e),warn:v.warn.bind(_,e),error:v.error.bind(_,e)}}var b=!1;function ee(e){b=e}function te(){return b}var x=globalThis,ne=`WorkerGlobalScope`in x;function S(e){return ae(e,x.document?.baseURI??x.location?.href).href}function re(e){try{return!!ae(e)}catch{return!1}}function ie(e){let t=ae(e).pathname;return t[0]===`/`?t:`/${t}`}function ae(e,t){let n=se();try{return t===void 0?new n(e):new n(e,t)}catch(e){throw Error(`Failed to construct URL: ${String(e)}`)}}var oe;function se(){if(!oe){let e=!1;try{e=new x.URL(`b`,`http://a`).href===`http://a/b`}catch{}oe=e?x.URL:le().URL}return oe}var ce;function le(){if(!ce){let e,t;try{e=document.createElement(`iframe`),e.style.display=`none`,document.body.appendChild(e),t=e.contentWindow??x}catch{t=x}ce={URL:t.URL},e?.remove()}return ce}function ue(e,t){function n(e,t,n){n.value=r(n.value)}function r(e){return function(...t){return i(e,this,t)}}function i(e,t,n){try{return e.apply(t,n)}catch(e){a(e)}}function a(n){let r=t=>{te()&&e.error(`[MONITOR]`,t)};r(n);try{t(n)}catch(e){r(e)}}return{monitored:n,monitor:r,callMonitored:i,monitorError:a}}var de=y(`Datadog SDK:`),fe,pe=ue(de,e=>fe?.(e)),C=pe.monitor,w=pe.callMonitored,T=pe.monitorError;function me(e){return!fe&&(fe=e,!0)}function he(e){let t=x.queueMicrotask;typeof t==`function`?t(C(e)):Promise.resolve().then(C(e))}var E=class{constructor(e){this.onFirstSubscribe=e,this.observers=[]}subscribe(e){return this.addObserver(e),{unsubscribe:()=>this.removeObserver(e)}}notify(e){this.observers.forEach(t=>t(e))}addObserver(e){this.observers.push(e),this.observers.length===1&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0)}removeObserver(e){this.observers=this.observers.filter(t=>e!==t),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}};function ge(...e){return new E(t=>{let n=e.map(e=>e.subscribe(e=>t.notify(e)));return()=>n.forEach(e=>e.unsubscribe())})}var _e=class extends E{constructor(e,t){super(),this.maxBufferSize=e,this.onDrop=t,this.buffer=[],this.droppedCount=0}notify(e){this.buffer.push(e),this.buffer.length>this.maxBufferSize&&(this.buffer.shift(),this.droppedCount++),super.notify(e)}subscribe(e){let t=!1;return he(()=>{for(let n of this.buffer){if(t)return;e(n)}t||this.addObserver(e)}),{unsubscribe:()=>{t=!0,this.removeObserver(e)}}}unbuffer(){he(()=>{this.droppedCount>0&&this.onDrop&&this.onDrop(this.droppedCount),this.maxBufferSize=this.buffer.length=0})}},ve={GRANTED:`granted`,NOT_GRANTED:`not-granted`};function ye(e){let t=new E;function n(){return e===ve.GRANTED}return{tryToInit(t){e||=t},onGrantedOnce(e){if(n())e();else{let r=t.subscribe(()=>{n()&&(e(),r.unsubscribe())})}},update(n){e=n,t.notify()},isGranted:n,observable:t}}var be=`datad0g.com`,xe=`datadoghq.com`,Se=`datadoghq.eu`,Ce=`ddog-gov.com`,we=`us2.ddog-gov.com`,Te=[`ddsource`,`dd-api-key`,`dd-request-id`];function Ee(e){return Te.every(t=>e.includes(t))}var D=1e3,De=60*D,Oe=60*De,ke=31536e6;function Ae(){return new Date().getTime()}function O(){return Ae()}function k(e,t){return t-e}function A(e){return typeof e==`number`?Math.round(e*1e6):e}function je(e,t){return e+t}function Me(){return performance.now()}function j(){return{relative:Me(),timeStamp:O()}}function Ne(){return{relative:0,timeStamp:Ve()}}function Pe(e){return{relative:e,timeStamp:He(e)}}function Fe(e){return{relative:Ie(e),timeStamp:e}}function Ie(e){return e-Ve()}function Le(e){return Math.round(je(Ve(),e))}function Re(e){return e<ke}function ze(){return Math.round(Ae()-je(Ve(),performance.now()))}var Be;function Ve(){return Be===void 0&&(Be=performance.timing?.navigationStart??performance.timeOrigin),Be}function He(e){let t=Ae()-performance.now();return t>Ve()?Math.round(je(t,e)):Le(e)}function Ue(e,t,n){return{build(r,i){return Ge({proxy:e.proxy,site:e.site,path:`/api/v2/${t}`,parameters:Ke(e,t,r,i,n)})},trackType:t}}function We({replica:e,proxy:t,source:n},r){if(e)return Ue({clientToken:e.clientToken,proxy:t,source:n,site:xe},r,r===`rum`?[`application.id=${e.applicationId}`]:void 0)}function Ge({proxy:e,site:t=xe,path:n,parameters:r=``,subdomain:i}){let a=n;if(r&&(a+=`?${r}`),typeof e==`string`){let t=`${S(e)}?ddforward=${encodeURIComponent(a)}`;return i&&(t+=`&ddforwardSubdomain=${i}`),t}if(typeof e==`function`)return e({path:n,parameters:r,subdomain:i});let o=t.split(`.`),s=o.pop(),c=`browser-intake-${o.join(`-`)}.${s}`;return i&&(c=`${i}.${c}`),`https://${c}${a}`}function Ke({clientToken:e,source:t=`browser`},n,r,{retry:i,encoding:a},o=[]){let s=[`ddsource=${t}`,`dd-api-key=${e}`,`dd-evp-origin-version=7.13.0`,`dd-evp-origin=browser`,`dd-request-id=${qe()}`].concat(o);return a&&s.push(`dd-evp-encoding=${a}`),n===`rum`&&(s.push(`batch_time=${O()}`,`_dd.api=${r}`),i&&s.push(`_dd.retry_count=${i.count}`,`_dd.retry_after=${i.lastFailureStatus}`)),s.join(`&`)}function qe(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,qe)}var Je={ALLOW:`allow`,MASK:`mask`,MASK_USER_INPUT:`mask-user-input`,MASK_UNLESS_ALLOWLISTED:`mask-unless-allowlisted`},Ye={ALL:`all`,SAMPLED:`sampled`},Xe={clientToken:{type:`string`,required:!0},service:{type:`string`},env:{type:`string`},version:{type:`string`},site:{type:`site`,default:xe},proxy:{type:`union`,variants:[{type:`string`},{type:`function`,signature:void 0}]},sessionSampleRate:{type:`percentage`,default:100},telemetrySampleRate:{type:`percentage`,default:20},telemetryConfigurationSampleRate:{type:`percentage`,default:5},telemetryUsageSampleRate:{type:`percentage`,default:5},silentMultipleInit:{type:`boolean`,default:!1,strict:!1},storeContextsAcrossPages:{type:`boolean`,default:!1,strict:!1},trackAnonymousUser:{type:`boolean`,default:!0,strict:!1},useSecureSessionCookie:{type:`boolean`,default:!1,strict:!1},usePartitionedCrossSiteSessionCookie:{type:`boolean`,default:!1,strict:!1},trackSessionAcrossSubdomains:{type:`boolean`,default:!1,strict:!1},allowedTrackingOrigins:{type:`match-option`,multiple:!0,strict:!1},trackingConsent:{type:`enum`,values:ve,default:ve.GRANTED},beforeSend:{type:`function`,signature:void 0},source:{type:`enum`,values:[`browser`,`flutter`,`unity`],default:`browser`,strict:!1},sessionPersistence:{type:`enum`,values:[`cookie`,`local-storage`,`memory`],multiple:!0,strict:!1},replica:{type:`schema`,schema:{clientToken:{type:`string`,required:!0},applicationId:{type:`string`}}},datacenter:{type:`string`},sdkVersion:{type:`string`},variant:{type:`string`}};function Ze(e){return{session_sample_rate:e.sessionSampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:e.telemetryUsageSampleRate,use_before_send:!!e.beforeSend,use_partitioned_cross_site_session_cookie:e.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:!!e.proxy,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_anonymous_user:e.trackAnonymousUser,session_persistence:Array.isArray(e.sessionPersistence)?e.sessionPersistence[0]:e.sessionPersistence,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents,tracking_consent:e.trackingConsent,use_allowed_tracking_origins:Array.isArray(e.allowedTrackingOrigins),source:e.source,sdk_version:e.sdkVersion,variant:e.variant}}function M(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,M)}var Qe=/(\S+?)\s*=\s*(.*?)(?:;|$)/g;function $e(e,t){for(Qe.lastIndex=0;;){let n=Qe.exec(e);if(n){if(n[1]===t)return n[2]}else break}}function et(e){let t=new Map;for(Qe.lastIndex=0;;){let n=Qe.exec(e);if(n){let e=n[1],r=n[2];t.has(e)?t.get(e).push(r):t.set(e,[r])}else break}return t}function tt(e){let t=new Map;for(Qe.lastIndex=0;;){let n=Qe.exec(e);if(n)t.set(n[1],n[2]);else break}return t}function nt(e,t,n=``){let r=e.charCodeAt(t-1),i=r>=55296&&r<=56319?t+1:t;return e.length<=i?e:`${e.slice(0,i)}${n}`}function rt(e,t){return t?`${e}-v${t.split(`.`)[0]}`:e}function it(...e){let t=e.filter(e=>!!e);return t.length>0?t:void 0}function at(e,t,n=0,r){let i=new Date;i.setTime(i.getTime()+n);let a=`expires=${i.toUTCString()}`,o=r?.crossSite?`none`:`strict`,s=r?.domain?`;domain=${r.domain}`:``,c=r?.secure?`;secure`:``,l=r?.partitioned?`;partitioned`:``;document.cookie=`${e}=${t};${a};path=/;samesite=${o}${s}${c}${l}`}function ot(e){let t=$e(document.cookie,e);if(t!==``)return t}function st(e){return et(document.cookie).get(e)||[]}var ct;function lt(e){return ct||=tt(document.cookie),ct.get(e)}function ut(e,t){at(e,``,0,t)}var dt;function ft(e=x.location?.hostname??``,t=typeof document<`u`?document.referrer:``){if(typeof document<`u`){if(dt===void 0){let n=pt(e,t);if(n){let e=`dd_site_test_${M()}`,t=n.split(`.`),r=t.pop();for(;t.length&&!ot(e);)r=`${t.pop()}.${r}`,at(e,`test`,D,{domain:r});ut(e,{domain:r}),dt=r}}return dt}}function pt(e,t){try{return e||ae(t).hostname}catch{}}function mt(e){let t={};if(t.secure=e.useSecureSessionCookie||e.usePartitionedCrossSiteSessionCookie,t.crossSite=e.usePartitionedCrossSiteSessionCookie,t.partitioned=e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains){let e=ft();if(!e)return;t.domain=e}return t}var N=y(`Datadog Browser SDK:`),ht=`${m}/real_user_monitoring/browser/troubleshooting`;function gt(e,t,n=!1){return e.some(e=>{try{if(typeof e==`function`)return e(t);if(e instanceof RegExp)return e.lastIndex=0,e.test(t);if(typeof e==`string`)return n?t.startsWith(e):e===t}catch(e){N.error(e)}return!1})}function P(e){return e}var _t=[`chrome-extension://`,`moz-extension://`];function vt(e){return _t.some(t=>e.includes(t))}function yt(e,t=``){return!vt(e)&&vt(t.split(`
2
- `).filter(e=>{let t=e.trim();return t.length&&/^at\s+|@/.test(t)})[1]||``)}var bt="Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided.",xt=`SDK initialized on a non-allowed domain.`;function St(e,t){let n=P(x.location),r=n?n.origin:``,i=e.allowedTrackingOrigins;if(!i)return!yt(r,t)||(N.error(bt),!1);let a=gt(i,r);return a||N.error(xt),a}var Ct=(e,t)=>e===`__proto__`?void 0:t;function wt(e){try{return JSON.parse(e,Ct)}catch{}}function Tt(e){return{...e}}function Et(e,t){return Object.keys(e).some(n=>e[n]===t)}function Dt(e){return Object.keys(e).length===0}function Ot(e,t){let n={};for(let r of Object.keys(e))n[r]=t(e[r]);return n}var kt=function(e){return e.SESSION_REPLAY_RECORD_CANVAS=`session_replay_record_canvas`,e.TRACK_INTAKE_REQUESTS=`track_intake_requests`,e.TRACK_WEBSOCKETS=`track_websockets`,e}({}),At=new Set;function jt(e){Array.isArray(e)&&Mt(e.filter(e=>Et(kt,e)))}function Mt(e){e.forEach(e=>{At.add(e)})}function Nt(e){return At.has(e)}function Pt(){return At}function Ft(e,t){let n=x,r;return n.Zone&&typeof n.Zone.__symbol__==`function`&&(r=e[n.Zone.__symbol__(t)]),r||=e[t],r}function F(e,t){return Ft(x,`setTimeout`)(C(e),t)}function I(e){Ft(x,`clearTimeout`)(e)}function It(e,t){return Ft(x,`setInterval`)(C(e),t)}function Lt(e){Ft(x,`clearInterval`)(e)}function Rt(e,t,n){let r=n?.leading===void 0||n.leading,i=n?.trailing===void 0||n.trailing,a=!1,o,s;return{throttled:(...n)=>{if(a){o=n;return}r?e(...n):o=n,a=!0,s=F(()=>{i&&o&&e(...o),a=!1,o=void 0},t)},cancel:()=>{I(s),a=!1,o=void 0}}}function L(){}var zt=`?`;function Bt(e){let t=[],n=$t(e,`stack`),r=String(e);if(n?.startsWith(r)&&(n=n.slice(r.length)),n&&n.split(`
3
- `).forEach(e=>{let n=Gt(e)||qt(e)||Yt(e)||Qt(e);n&&(!n.func&&n.line&&(n.func=zt),t.push(n))}),t.length>0&&on()&&e instanceof Error){let n=[],r=e;for(;(r=Object.getPrototypeOf(r))&&rn(r);){let e=r.constructor?.name||zt;n.push(e)}for(let e=n.length-1;e>=0&&t[0]?.func===n[e];e--)t.shift()}return{message:$t(e,`message`),name:$t(e,`name`),stack:t}}var Vt=`((?:blob|native|eval|<anonymous>|[a-zA-Z][a-zA-Z0-9+.-]*:\\/\\/|\\w+\\.|\\/).*?)`,Ht=`(?::(\\d+))`,Ut=RegExp(`^\\s*at (.*?) ?\\(${Vt}${Ht}?${Ht}?\\)?\\s*$`,`i`),Wt=RegExp(`\\((\\S*)${Ht}${Ht}\\)`);function Gt(e){let t=Ut.exec(e);if(!t)return;let n=t[2]?.indexOf(`native`)===0,r=t[2]?.indexOf(`eval`)===0,i=Wt.exec(t[2]);return r&&i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||zt,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}var Kt=RegExp(`^\\s*at\\s*(?:(.*)?(?: @))?\\s*${Vt}${Ht}?${Ht}??\\s*$`,`i`);function qt(e){let t=Kt.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||zt,line:t[3]?+t[3]:void 0,url:t[2]}}var Jt=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Yt(e){let t=Jt.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||zt,line:+t[3],url:t[2]}}var Xt=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,Zt=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Qt(e){let t=Xt.exec(e);if(!t)return;let n=t[3]&&t[3].indexOf(` > eval`)>-1,r=Zt.exec(t[3]);return n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0),{args:t[2]?t[2].split(`,`):[],column:t[5]?+t[5]:void 0,func:t[1]||zt,line:t[4]?+t[4]:void 0,url:t[3]}}function $t(e,t){return o(e)&&typeof e[t]==`string`?e[t]:void 0}function en(e,t,n,r){if(t===void 0)return;let{name:i,message:a}=nn(e);return{name:i,message:a,stack:[{url:t,column:r,line:n}]}}var tn=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function nn(e){let t,n;return{}.toString.call(e)===`[object String]`&&([,t,n]=tn.exec(e)),{name:t,message:n}}function rn(e){return String(e.constructor).startsWith(`class `)}var an;function on(){if(an!==void 0)return an;class e extends Error{constructor(){super(),this.name=`Error`}}let[t,n]=[e,Error].map(e=>new e);return an=rn(Object.getPrototypeOf(t))&&n.stack!==t.stack,an}function sn(e){let t=Error(e);t.name=`HandlingStack`;let n;return w(()=>{let e=Bt(t);e.stack=e.stack.slice(2),n=cn(e)}),n}function cn(e){let t=ln(e);return e.stack.forEach(e=>{let n=e.func===`?`?`<anonymous>`:e.func,r=e.args&&e.args.length>0?`(${e.args.join(`, `)})`:``,i=e.line?`:${e.line}`:``,a=e.line&&e.column?`:${e.column}`:``;t+=`\n at ${n}${r} @ ${e.url}${i}${a}`}),t}function ln(e){return`${e.name||`Error`}: ${e.message}`}function R(e,t,n,{computeHandlingStack:r}={}){let i=e[t];if(typeof i!=`function`){if(t in e&&typeof t==`string`&&t.startsWith(`on`))i=L;else return{stop:L}}let a=!1,{stop:o}=dn(e,t,i,function(){if(a)return i.apply(this,arguments);let e=Array.from(arguments);return fn(n,{target:this,parameters:e,handlingStack:r?sn(`instrumented method`):void 0},()=>i.apply(this,e))});return{stop:()=>{a=!0,o()}}}function un(e,t,n,{computeHandlingStack:r}={}){let i=e[t];if(typeof i!=`function`)return{stop:L};let a=!1,o=function(){if(!new.target)return Reflect.apply(i,this,Array.from(arguments));let e=new.target===o?i:new.target;if(a)return Reflect.construct(i,arguments,e);let t=Array.from(arguments);return fn(n,{parameters:t,handlingStack:r?sn(`instrumented constructor`):void 0},()=>Reflect.construct(i,t,e))},s=pn(o,i),{stop:c}=dn(e,t,i,o);return{stop:()=>{a=!0,s(),c()}}}function dn(e,t,n,r){return e[t]=r,{stop:()=>{e[t]===r&&(e[t]=n)}}}function fn(e,t,n){let r;w(e,null,[{...t,onPostCall:e=>{r=e}}]);let i=n();return r&&w(r,null,[i]),i}function pn(e,t){for(let n of[].concat(Object.getOwnPropertyNames(t),Object.getOwnPropertySymbols(t))){let r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r)}let{stop:n}=dn(t.prototype,`constructor`,t.prototype.constructor,e);return n}function mn(e,t,n){let r=Object.getOwnPropertyDescriptor(e,t);if(!r?.set||!r.configurable)return{stop:L};let i=L,a=(e,t)=>{F(()=>{a!==i&&n(e,t)},0)},o=function(e){r.set.call(this,e),a(this,e)};return Object.defineProperty(e,t,{set:o}),{stop:()=>{Object.getOwnPropertyDescriptor(e,t)?.set===o&&Object.defineProperty(e,t,r),a=i}}}var z=function(e){return e.BEFORE_UNLOAD=`beforeunload`,e.CLICK=`click`,e.DBL_CLICK=`dblclick`,e.KEY_DOWN=`keydown`,e.LOAD=`load`,e.POP_STATE=`popstate`,e.SCROLL=`scroll`,e.TOUCH_START=`touchstart`,e.TOUCH_END=`touchend`,e.TOUCH_MOVE=`touchmove`,e.VISIBILITY_CHANGE=`visibilitychange`,e.PAGE_SHOW=`pageshow`,e.FREEZE=`freeze`,e.RESUME=`resume`,e.DOM_CONTENT_LOADED=`DOMContentLoaded`,e.POINTER_DOWN=`pointerdown`,e.POINTER_UP=`pointerup`,e.POINTER_CANCEL=`pointercancel`,e.HASH_CHANGE=`hashchange`,e.PAGE_HIDE=`pagehide`,e.MOUSE_DOWN=`mousedown`,e.MOUSE_UP=`mouseup`,e.MOUSE_MOVE=`mousemove`,e.FOCUS=`focus`,e.BLUR=`blur`,e.CONTEXT_MENU=`contextmenu`,e.RESIZE=`resize`,e.CHANGE=`change`,e.INPUT=`input`,e.PLAY=`play`,e.PAUSE=`pause`,e.SECURITY_POLICY_VIOLATION=`securitypolicyviolation`,e.SELECTION_CHANGE=`selectionchange`,e.STORAGE=`storage`,e.UNHANDLED_REJECTION=`unhandledrejection`,e}({});function B(e,t,n,r){return hn(e,[t],n,r)}function hn(e,t,n,{once:r,capture:i,passive:a}={}){let o=C(e=>{(e.isTrusted||e.__ddIsTrusted||_n!==!1)&&(r&&u(),n(e))}),s=a?{capture:i,passive:a}:i,c=window.EventTarget&&e instanceof EventTarget?window.EventTarget.prototype:e,l=Ft(c,`addEventListener`);t.forEach(t=>l.call(e,t,o,s));function u(){let n=Ft(c,`removeEventListener`);t.forEach(t=>n.call(e,t,o,s))}return{stop:u}}function gn(e,t){if(!e)return!1;try{return B(e,t,L).stop(),!0}catch{return!1}}var _n;function vn(e){_n!==!0&&(_n=e??!1)}var yn=1024,bn=1024*yn,xn=/[^\u0000-\u007F]/;function Sn(e){return xn.test(e)?new TextEncoder().encode(e).length:e.length}function Cn(e){if(e.length===1)return e[0];let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function wn(e,t,n){if(typeof e!=`object`||!e)return JSON.stringify(e);let r=Tn(Object.prototype),i=Tn(Array.prototype),a=Tn(Object.getPrototypeOf(e)),o=Tn(e);try{return JSON.stringify(e,t,n)}catch{return`<error: unable to serialize object>`}finally{r(),i(),a(),o()}}function Tn(e){let t=e,n=t.toJSON;return n?(delete t.toJSON,()=>{t.toJSON=n}):L}var En=220*yn,Dn=`$`,On=3;function V(e,t=En){let n=Tn(Object.prototype),r=Tn(Array.prototype);try{let n=[],r=new WeakMap,i=kn(e,Dn,void 0,n,r),a=JSON.stringify(i),o=a?a.length:0;if(o>t){Pn(t,`discarded`,e);return}for(;n.length>0&&o<t;){let i=n.shift(),a=0;if(Array.isArray(i.source))for(let s=0;s<i.source.length;s++){let c=kn(i.source[s],i.path,s,n,r);if(o+=c===void 0?4:JSON.stringify(c).length,o+=a,a=1,o>t){Pn(t,`truncated`,e);break}i.target[s]=c}else for(let s in i.source)if(Object.prototype.hasOwnProperty.call(i.source,s)){let c=kn(i.source[s],i.path,s,n,r);if(c!==void 0&&(o+=JSON.stringify(c).length+a+s.length+On,a=1),o>t){Pn(t,`truncated`,e);break}i.target[s]=c}}return i}finally{n(),r()}}function kn(e,t,n,r,i){let a=Nn(e);if(!a||typeof a!=`object`)return An(a);let o=jn(a);if(o!==`[Object]`&&o!==`[Array]`&&o!==`[Error]`)return o;let s=e;if(i.has(s))return`[Reference seen at ${i.get(s)}]`;let c=n===void 0?t:`${t}.${n}`,l=Array.isArray(a)?[]:{};return i.set(s,c),r.push({source:a,target:l,path:c}),l}function An(e){return typeof e==`bigint`?`[BigInt] ${e.toString()}`:typeof e==`function`?`[Function] ${e.name||`unknown`}`:typeof e==`symbol`?`[Symbol] ${e.description||e.toString()}`:e}function jn(e){try{if(e instanceof Event)return Mn(e);if(e instanceof RegExp)return`[RegExp] ${e.toString()}`;let t=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(t?.[1])return`[${t[1]}]`}catch{}return`[Unserializable]`}function Mn(e){return{type:e.type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?jn(e.currentTarget):null,target:e.target?jn(e.target):null}}function Nn(e){if((typeof e!=`object`||!e)&&typeof e!=`function`)return e;let t=e;if(typeof t.toJSON==`function`)try{return t.toJSON()}catch{}return e}function Pn(e,t,n){N.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,n)}var Fn=`No stack, consider using an instance of Error`;function In(e){try{return e instanceof Error||Object.prototype.toString.call(e)===`[object Error]`}catch{return!1}}function Ln(e){let{env:t,service:n,version:r,datacenter:i,sdkVersion:a,variant:o}=e,s=[Rn(`sdk_version`,a??`7.13.0`)];return t&&s.push(Rn(`env`,t)),n&&s.push(Rn(`service`,n)),r&&s.push(Rn(`version`,r)),i&&s.push(Rn(`datacenter`,i)),o&&s.push(Rn(`variant`,o)),s}function Rn(e,t){let n=t?`${e}:${t}`:e;return(n.length>200||Bn(n))&&N.warn(`Tag ${n} doesn't meet tag requirements and will be sanitized. ${h} ${m}/getting_started/tagging/#defining-tags`),zn(n)}function zn(e){return e.replace(/,/g,`_`)}function Bn(e){return RegExp(`[^\\p{Ll}\\p{Lo}0-9_:./-]`,`u`).test(e)}function Vn(e,t){let n=x.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}var Hn={AGENT:`agent`,CONSOLE:`console`,CUSTOM:`custom`,LOGGER:`logger`,NETWORK:`network`,SOURCE:`source`,REPORT:`report`},Un=function(e){return e.UNCAUGHT=`Uncaught`,e.PROVIDED=`Provided`,e}({}),Wn=function(e){return e.HANDLED=`handled`,e.UNHANDLED=`unhandled`,e}({});function Gn(){let{navigator:e}=x;return{status:e?.onLine?`connected`:`not_connected`,interfaces:e?.connection?.type?[e.connection.type]:void 0,effective_type:e?.connection?.effectiveType}}function Kn(e,t){return Ft(x,`fetch`)(e,t)}function qn(e){return e>=500}function Jn(e){try{return e.clone()}catch{return}}var Yn=80*yn,Xn=20*bn,Zn=De,Qn=D;function $n(e,t,n,r,i,a){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?tr(e,t,n,a,{onSuccess:()=>nr(0,t,n,r,i,a),onFailure:()=>{t.queuedPayloads.enqueue(e)||a.notify({type:`queue-full`,bandwidth:t.bandwidthMonitor.stats(),payload:e}),er(t,n,r,i,a)}}):t.queuedPayloads.enqueue(e)||a.notify({type:`queue-full`,bandwidth:t.bandwidthMonitor.stats(),payload:e})}function er(e,t,n,r,i){e.transportStatus===2&&F(()=>{tr(e.queuedPayloads.first(),e,t,i,{onSuccess:()=>{e.queuedPayloads.dequeue(),e.currentBackoffTime=Qn,nr(1,e,t,n,r,i)},onFailure:()=>{e.currentBackoffTime=Math.min(Zn,e.currentBackoffTime*2),er(e,t,n,r,i)}})},e.currentBackoffTime)}function tr(e,t,n,r,{onSuccess:i,onFailure:a}){t.bandwidthMonitor.add(e),n(e,n=>{t.bandwidthMonitor.remove(e),rr(n)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:n.status},r.notify({type:`failure`,bandwidth:t.bandwidthMonitor.stats(),payload:e}),a()):(t.transportStatus=0,r.notify({type:`success`,bandwidth:t.bandwidthMonitor.stats(),payload:e}),i())})}function nr(e,t,n,r,i,a){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(i(`Reached max ${r} events size queued for upload: ${Xn/bn}MiB`),t.queueFullReported=!0);let o=t.queuedPayloads;for(t.queuedPayloads=ar();o.size()>0;)$n(o.dequeue(),t,n,r,i,a)}function rr(e){return e.type!==`opaque`&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||qn(e.status))}function ir(){return{transportStatus:0,currentBackoffTime:Qn,bandwidthMonitor:or(),queuedPayloads:ar(),queueFullReported:!1}}function ar(){let e=[];return{bytesCount:0,enqueue(t){return!this.isFull()&&(e.push(t),this.bytesCount+=t.bytesCount,!0)},first(){return e[0]},dequeue(){let t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size(){return e.length},isFull(){return this.bytesCount>=Xn}}}function or(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=Yn&&this.ongoingRequestCount<32},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){--this.ongoingRequestCount,this.ongoingByteCount-=e.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}}}var sr=16*yn;function cr(e,t,n=sr){let r=new E,i=ir();return{observable:r,send:n=>{for(let a of e)$n(n,i,(e,t)=>{fr(a,e,t)},a.trackType,t,r)},sendOnExit:t=>{for(let r of e)lr(r,n,t)}}}function lr(e,t,n){if(n.bytesCount<t)try{let t=e.build(`beacon`,n);if(navigator.sendBeacon(t,n.data))return}catch(e){dr(e)}fr(e,n)}var ur=!1;function dr(e){ur||(ur=!0,T(e))}function fr(e,t,n){Kn(e.build(`fetch`,t),{method:`POST`,body:t.data,mode:`cors`}).then(C(e=>n?.({status:e.status,type:e.type}))).catch(C(()=>n?.({status:0})))}var pr=function(e){return e.RECORDS=`records`,e.PROFILES=`profiles`,e}({});function mr(){let e=vr();if(e)return{getCapabilities(){return JSON.parse(e.getCapabilities?.()||`[]`)},getPrivacyLevel(){return e.getPrivacyLevel?.()},getIsTraceSampled(){return JSON.parse(e.getIsTraceSampled?.()||`null`)},getAllowedWebViewHosts(){return JSON.parse(e.getAllowedWebViewHosts())},send(t,n,r){let i=r?{id:r}:void 0;e.send(JSON.stringify({eventType:t,event:n,view:i}))}}}function hr(e){let t=mr();return!!t&&t.getCapabilities().includes(e)}function gr(e=x.location?.hostname){return mr()?.getAllowedWebViewHosts().some(t=>_r(e,t))??!1}function _r(e,t){if(!t.includes(`*`))return e===t||e.endsWith(`.${t}`);let n=t.split(`*`);if(n.length!==2)return N.error(`Invalid WebView host pattern "${t}": only one wildcard (*) is supported.`),!1;let[r,i]=n;return e.length>r.length+i.length&&e.startsWith(r)&&e.endsWith(i)}function vr(){return x.DatadogEventBridge}function yr(e,t){for(let n=e.length-1;n>=0;--n){let r=e[n];if(t(r,n,e))return r}}function br(e){return Object.values(e)}function xr(e){return Object.entries(e)}var Sr={HIDDEN:`visibility_hidden`,UNLOADING:`before_unload`,PAGEHIDE:`page_hide`,FROZEN:`page_frozen`};function Cr(){return new E(e=>{let t=x.window;if(!t)return;let{stop:n}=hn(t,[`visibilitychange`,`freeze`],t=>{t.type===`visibilitychange`&&document.visibilityState===`hidden`?e.notify({reason:Sr.HIDDEN}):t.type===`freeze`&&e.notify({reason:Sr.FROZEN})},{capture:!0}),r=B(t,`beforeunload`,()=>{e.notify({reason:Sr.UNLOADING})}).stop;return()=>{n(),r()}})}function wr(e){return br(Sr).includes(e)}function Tr(){let e=``,t=0;return{isAsync:!1,get isEmpty(){return!e},write(n,r){let i=Sn(n);t+=i,e+=n,r&&r(i)},finish(e){e(this.finishSync())},finishSync(){let n={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:``};return e=``,t=0,n},estimateEncodedBytesCount(e){return e.length}}}var Er=30*D,Dr=ne?1:50;function Or({pageMayExitObservable:e}){let t,n=new E,r=e.subscribe(e=>{t=e.reason;try{n.notify(e.reason)}finally{t=void 0}s(e.reason)}),i=new E(()=>()=>{r.unsubscribe()}),a=0,o=0;function s(e){if(o===0)return;let t=o,n=a;o=0,a=0,u(),i.notify({reason:e,messagesCount:t,bytesCount:n})}let c;function l(){c===void 0&&(c=F(()=>{s(`duration_limit`)},Er))}function u(){I(c),c=void 0}return{flushObservable:i,prepareUrgentFlushObservable:n,forceFlush:s,get messagesCount(){return o},notifyBeforeAddMessage(e){a+e>=sr&&s(t??`bytes_limit`),o+=1,a+=e,l()},notifyAfterAddMessage(e=0){a+=e,o>=Dr?s(t??`messages_limit`):a>=sr&&s(t??`bytes_limit`)}}}var kr=256*yn;function Ar({encoder:e=Tr(),endpoints:t,reportError:n}){let r=P(cr)(t,n),i=P(Cr)(),a=P(Or)({pageMayExitObservable:i}),o={},s=a.flushObservable.subscribe(e=>u(e));function c(t,n,r){if(r!==void 0){let i;o[r]===void 0?(a.notifyBeforeAddMessage(n),i=0):i=n-e.estimateEncodedBytesCount(o[r]),o[r]=t,a.notifyAfterAddMessage(i)}else a.notifyBeforeAddMessage(n),e.write(e.isEmpty?t:`\n${t}`,e=>{a.notifyAfterAddMessage(e-n)})}function l(t,n){let r=wn(t),i=e.estimateEncodedBytesCount(r);if(i>=kr){N.warn(`Discarded a message whose size was bigger than the maximum allowed size ${kr/yn}KiB. ${h} ${ht}/#technical-limitations`);return}c(r,i,n)}function u(t){let n=br(o).join(`
4
- `);o={};let i=wr(t.reason),a=i?r.sendOnExit:r.send;if(i&&e.isAsync){let t=e.finishSync();t.outputBytesCount&&a(jr(t));let r=[t.pendingData,n].filter(Boolean).join(`
5
- `);r&&a({data:r,bytesCount:Sn(r)})}else n&&e.write(e.isEmpty?n:`\n${n}`),e.finish(e=>{a(jr(e))})}return{get isEmpty(){return a.messagesCount===0},add:l,upsert:l,prepareUrgentFlushObservable:a.prepareUrgentFlushObservable,forceFlush:a.forceFlush,flushObservable:a.flushObservable,stop:s.unsubscribe}}function jr(e){let t;return t=typeof e.output==`string`?e.output:new Blob([e.output],{type:`text/plain`}),{data:t,bytesCount:e.outputBytesCount,encoding:e.encoding}}var Mr={LOG:`log`,CONFIGURATION:`configuration`,USAGE:`usage`};function Nr(){let e=[];return{register(t){return e.push(t),{unregister(){e=e.filter(e=>e!==t)}}},trigger(t){let n=[];for(let r of e){let e=r(t);if(e===`DISCARDED`)return Pr;e!==`SKIPPED`&&n.push(e)}return f(...n)}}}var Pr=`DISCARDED`,Fr=`SKIPPED`;function Ir(e){return e!==0&&Math.random()*100<=e}var Lr=[`https://www.datadoghq-browser-agent.com`,`https://www.datad0g-browser-agent.com`,`https://d3uc069fcn7uxw.cloudfront.net`,`https://d20xtzwzcl0ceb.cloudfront.net`,`http://localhost`,`<anonymous>`],Rr=function(e){return e.LOGS=`browser-logs-sdk`,e.RUM=`browser-rum-sdk`,e}({}),zr=function(e){return e.CUSTOMER_DATA_METRIC_NAME=`Customer data measures`,e.REMOTE_CONFIGURATION_METRIC_NAME=`remote configuration metrics`,e.RECORDER_INIT_METRICS_TELEMETRY_NAME=`Recorder init metrics`,e.SEGMENT_METRICS_TELEMETRY_NAME=`Segment network request metrics`,e.SESSION_MANAGER_INIT_METRICS_TELEMETRY_NAME=`Session manager init metrics`,e}({}),Br=1,Vr=[Ce,we],Hr=15,Ur;function Wr(){return Ur||=new _e(100),Ur}function Gr(e,t,n,r){let i=new E,{enabled:a,metricsEnabled:o}=Kr(e,t,n,i,r),{stop:s}=qr(t,i);return{stop:s,enabled:a,metricsEnabled:o}}function Kr(e,t,n,r,i,a=Br,o=Hr){let s={},c=!Vr.includes(t.site)&&Ir(t.telemetrySampleRate),l={[Mr.LOG]:c,[Mr.CONFIGURATION]:c&&Ir(t.telemetryConfigurationSampleRate),[Mr.USAGE]:c&&Ir(t.telemetryUsageSampleRate),metric:c&&Ir(a)},u=Jr(),d=Wr();return d.subscribe(({rawEvent:t,metricName:i})=>{if(i&&!l.metric||!l[t.type])return;let a=i||t.status||t.type,c=s[a];if(c||=s[a]=new Set,c.size>=o)return;let d=wn(t);if(c.has(d))return;let f=n.trigger({startTime:j().relative});if(f===`DISCARDED`)return;let m=p(f,e,t,u);r.notify(m),Vn(`telemetry`,m),c.add(d)}),d.unbuffer(),me(Zr),{enabled:c,metricsEnabled:l.metric};function p(e,n,r,a){return f({type:`telemetry`,date:j().timeStamp,service:n,version:`7.13.0`,source:`browser`,_dd:{format_version:2},telemetry:f(r,{runtime_env:a,connectivity:Gn(),sdk_setup:`npm`,sdk_name:i}),ddtags:Ln(t).join(`,`),experimental_features:Array.from(Pt())},e)}}function qr(e,t){let n=[];if(gr()){let e=mr(),r=t.subscribe(t=>e.send(`internal_telemetry`,t));n.push(r.unsubscribe)}else{let r=[Ue(e,`rum`)],i=We(e,`rum`);i&&Yr(e)&&r.push(i);let a=Ar({endpoints:r,reportError:L});n.push(a.stop);let o=t.subscribe(a.add);n.push(o.unsubscribe)}return{stop:()=>n.forEach(e=>e())}}function Jr(){return{is_local_file:x.location?.protocol===`file:`,is_worker:ne}}function Yr(e){return e.site===be}function Xr(e,t){te()&&N.debug(`[Telemetry]`,e,t),Wr().notify({rawEvent:{type:Mr.LOG,message:e,status:`debug`,...t}})}function Zr(e,t){Wr().notify({rawEvent:{type:Mr.LOG,status:`error`,...ei(e),...t}})}function Qr(e){Wr().notify({rawEvent:{type:Mr.CONFIGURATION,configuration:e}})}function $r(e,t){Wr().notify({rawEvent:{type:Mr.LOG,message:e,status:`debug`,...t},metricName:e})}function H(e){Wr().notify({rawEvent:{type:Mr.USAGE,usage:e}})}function ei(e){if(In(e)){let t=Bt(e);return{error:{kind:t.name,stack:cn(ti(t))},message:t.message}}return{error:{stack:Fn},message:`Uncaught ${wn(e)}`}}function ti(e){return e.stack=e.stack.filter(e=>!e.url||Lr.some(t=>e.url.startsWith(t))),e}var ni=new Map,ri=new Set,ii=!1;function ai(){let e=x.window?.DD_SOURCE_CODE_CONTEXT;if(!e)return;let t=!1,n=!1,r=!1;for(let[i,a]of Object.entries(e)){if(t||=a.ddDebugId!==void 0,n||=a.service!==void 0,r||=a.version!==void 0,ri.has(i))continue;ri.add(i);let e=Bt({stack:i}).stack[0]?.url;e&&!ni.has(e)&&ni.set(e,a)}ii||(ii=!0,H({feature:`source-code-context`,use_debug_id:t,use_service:n,use_version:r}))}function oi(e){ai();let t=new Set,n=[];for(let r of e){if(t.has(r))continue;t.add(r);let e=ni.get(r)?.ddDebugId;e!==void 0&&n.push({url:r,id:e})}return n.length?n:void 0}function si(e){return ai(),ni.get(e)}function ci({originalError:e,stackTrace:t,source:n,useFallbackStack:r=!0,nonErrorPrefix:i}){let a=In(e);return{source:n,type:t?t.name:void 0,message:pi(t,a,i,e),stack:t?cn(t):r?Fn:void 0}}function li(e){return e?.stack.map(e=>e.url).filter(e=>!!e)??[]}function ui(e,t){let n=t.flatMap(({stackTrace:e})=>li(e));return oi(li(e).concat(n))}function di(e){let t=[],n=e.cause;for(;n!=null&&t.length<10;){let e=In(n),r=e?Bt(n):void 0;t.push({originalError:n,stackTrace:r}),n=e?n.cause:void 0}return t}function fi({stackTrace:e,originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:a,useFallbackStack:o=!0,source:s,handling:c}){let l=e??(In(t)?Bt(t):void 0),u=In(t)?di(t):[],d=ci({originalError:t,stackTrace:l,source:s,useFallbackStack:o,nonErrorPrefix:a}),f=u.map(({originalError:e,stackTrace:t})=>ci({originalError:e,stackTrace:t,source:s,useFallbackStack:!1}));return{startClocks:i,handling:c,handlingStack:n,componentStack:r,originalError:t,...d,debugIds:ui(l,u),causes:f.length?f:void 0,fingerprint:mi(t),context:hi(t)}}function pi(e,t,n,r){return e?.message&&e?.name?e.message:t?`Empty message`:n?`${n} ${wn(V(r))}`:wn(V(r))}function mi(e){return In(e)&&`dd_fingerprint`in e?String(e.dd_fingerprint):void 0}function hi(e){if(o(e))return e.dd_context}function gi(){return new E(e=>{let t=(t,n)=>{let r=fi({stackTrace:n,originalError:t,startClocks:j(),nonErrorPrefix:`Uncaught`,source:Hn.SOURCE,handling:`unhandled`});e.notify(r)},{stop:n}=_i(t),{stop:r}=vi(t);return()=>{n(),r()}})}function _i(e){return R(x,`onerror`,({parameters:[t,n,r,i,a]})=>{let o;In(a)||(o=en(t,n,r,i)),e(a??t,o)})}function vi(e){return gn(x.window,`unhandledrejection`)?R(x,`onunhandledrejection`,({parameters:[t]})=>{e(t.reason||`Empty reason`)}):{stop:L}}function yi(e,t){return(...n)=>{try{return e(...n)}catch(e){N.error(t,e)}}}function bi(e){let t={version:`7.13.0`,onReady(e){e()},...e};return Object.defineProperty(t,"_setDebug",{get(){return ee},enumerable:!1}),t}function xi(e,t,n){let r=e[t];r&&!r.q&&r.version&&N.warn(`SDK is loaded more than once. This is unsupported and might have unexpected behavior.`),e[t]=n,r?.q&&r.q.forEach(e=>yi(e,`onReady callback threw an error:`)())}function Si(e,t){t.silentMultipleInit||N.error(`${e} is already initialized.`)}var Ci={intervention:`intervention`,deprecation:`deprecation`,cspViolation:`csp_violation`};function wi(e){let t=[];e.includes(Ci.cspViolation)&&t.push(Ei());let n=e.filter(e=>e!==Ci.cspViolation);return n.length&&t.push(Ti(n)),ge(...t)}function Ti(e){return new E(t=>{if(!window.ReportingObserver)return;let n=C((e,n)=>e.forEach(e=>t.notify(Di(e)))),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),()=>{r.disconnect()}})}function Ei(){return new E(e=>{if(!gn(document,`securitypolicyviolation`))return;let{stop:t}=B(document,`securitypolicyviolation`,t=>{e.notify(Oi(t))});return t})}function Di(e){let{type:t,body:n}=e;return ki({type:n.id,message:`${t}: ${n.message}`,originalError:e,stack:Ai(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber),debugIds:n.sourceFile?oi([n.sourceFile]):void 0})}function Oi(e){let t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return ki({type:e.effectiveDirective,message:`${Ci.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:Ai(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${nt(e.originalPolicy,100,`...`)}"`:`no policy`,e.sourceFile,e.lineNumber,e.columnNumber),debugIds:e.sourceFile?oi([e.sourceFile]):void 0})}function ki(e){return{startClocks:j(),source:Hn.REPORT,handling:`unhandled`,...e}}function Ai(e,t,n,r,i){return n?cn({name:e,message:t,stack:[{func:`?`,url:n,line:r??void 0,column:i??void 0}]}):void 0}function ji(e,t){let n=e.indexOf(t);n>=0&&e.splice(n,1)}function Mi(e){return Array.isArray(e)&&e.length>0}var Ni=1/0,Pi=De,Fi,Ii=new Set;function Li(){Ii.forEach(e=>e())}function Ri({expireDelay:e,maxEntries:t}){let n=[],r=()=>{if(!e)return;let t=Me()-e;for(;n.length>0&&n[n.length-1].endTime<t;)n.pop()};e&&(Fi||=It(()=>Li(),Pi),Ii.add(r));function i(e,r){let i={value:e,startTime:r,endTime:Ni,remove:()=>{ji(n,i)},close:e=>{i.endTime=e}};return t&&n.length>=t&&n.pop(),n.unshift(i),i}function a(e=Ni,t={returnInactive:!1}){for(let r of n)if(r.startTime<=e){if(t.returnInactive||e<=r.endTime)return r.value;break}}function o(e){let t=n[0];t?.endTime===Ni&&t.close(e)}function s(e=Ni,t=0){let r=je(e,t);return n.filter(t=>t.startTime<=r&&e<=t.endTime).map(e=>e.value)}function c(e=Ni,t=0){let r=je(e,t);return n.filter(t=>t.startTime<=r&&e<=t.endTime)}function l(e){return n.filter(t=>t.startTime===e)}function u(){n=[]}function d(){Ii.delete(r),Ii.size===0&&Fi&&(Lt(Fi),Fi=void 0)}return{add:i,find:a,closeActive:o,findAll:s,findAllEntries:c,getEntries:l,reset:u,stop:d}}function zi(e,t){return e*t/100}var Bi=new Map;function Vi(e,t){if(t===100)return!0;if(t===0)return!1;let n=Bi.get(t);if(e===n?.sessionId)return n.decision;let r=Hi(BigInt(`0x${e.split(`-`)[4]}`),t);return Bi.set(t,{sessionId:e,decision:r}),r}function Hi(e,t){let n=1n<<64n,r=e*1111111111111111111n%n;return Number(r)<=t/100*Number(n)}var Ui=4*Oe,Wi=15*De,Gi=ke,Ki={COOKIE:`cookie`,MEMORY:`memory`,LOCAL_STORAGE:`local-storage`},qi=`dd_cookie_test_`;async function Ji(e,t){let n=`${qi}${M()}`,r=`test`,i=e(n,t);try{return await i.getAllAndSet(()=>({value:r,expireDelay:De})),(await i.getAll()).includes(r)}catch(e){return N.error(e),!1}finally{try{await i.delete()}catch{}}}function Yi(e,t){let n=P(x.cookieStore),r=new E(()=>B(n,`change`,t=>{(t.changed.some(t=>t.name===e)||t.deleted.some(t=>t.name===e))&&r.notify()}).stop);return{async getAll(){return(await n.getAll(e)).map(e=>e.value)},delete(){return n.delete({name:e,domain:t.domain,path:`/`,partitioned:t.partitioned})},async getAllAndSet(r){let i=await n.getAll(e),{value:a,expireDelay:o}=r(i.map(e=>e.value));try{await n.set({name:e,value:a,expires:Ae()+o,path:`/`,sameSite:t.crossSite?`none`:`strict`,domain:t.domain,secure:t.secure,partitioned:t.partitioned})}catch(n){if(!e.startsWith(`dd_cookie_test_`)){let r=st(e);Xr(`Failed to set cookie using Cookie Store API`,{"error.message":n.message,newValue:a,cookieOptions:{...t},cookies:i.map(e=>({...e})),cookieCount:i.length,documentCookies:r})}}},observable:r}}var Xi=D;function Zi(e,t){let n=st(e),r=new E(()=>{let t=It(()=>{i(st(e))},Xi);return()=>{Lt(t)}});function i(e){String(e)!==String(n)&&(n=e,r.notify())}return{getAll(){return Promise.resolve(st(e))},async getAllAndSet(n){let{value:r,expireDelay:a}=n(st(e));at(e,r,a,t),await Promise.resolve(),i([r])},async delete(){ut(e,t),await Promise.resolve(),i([])},observable:r}}function Qi(){let e=P(x.cookieStore);return!!(e&&gn(e,`change`))}var $i=`_dd_s_v2`,ea=`_dd_s`,ta=`_DD_SESSION`;function na(){return{type:Ki.MEMORY}}function ra(){let e=x;e._DD_SESSION||(e[ta]={});let t=e[ta],n=new E,r=t.onChange;return t.onChange=e=>{r?.(e),n.notify(e)},{async setSessionState(e,n){let r=Tt(e(t.state??{}));t.state=r,await Promise.resolve(),t.onChange?.(r)},sessionObservable:n}}var ia=/^([a-zA-Z]+)=([a-z0-9-]+)$/;function aa(e){return!!e&&(e.indexOf(`&`)!==-1||ia.test(e))}function oa(e){return e.created?Number(e.created):void 0}function sa(e){let t=e.expire&&Number(e.expire),n=oa(e);if(t&&n)return Math.min(t,n+Ui)}function ca(e,t){let n={isExpired:`1`};return t.trackAnonymousUser&&e?.anonymousId&&(n.anonymousId=e?.anonymousId),n}function la(e){return Dt(e)}function ua(e){return e.isExpired!==void 0||!da(e)}function da(e){let t=sa(e);return t?Ae()<t:!1}function fa(e){e.expire=String(Ae()+Wi)}function pa(e){return xr(e).map(([e,t])=>e===`anonymousId`?`aid=${t}`:`${e}=${t}`).join(`&`)}function ma(e){let t={};return aa(e)&&e.split(`&`).forEach(e=>{let n=ia.exec(e);if(n!==null){let[,e,r]=n;e===`aid`?t.anonymousId=r:t[e]=r}}),t}function ha(e,t){return la(e)?(t.trackAnonymousUser&&(e.anonymousId=M()),ca(e,t)):e}function ga(e,t){if(la(e))return e;let n=e;return ua(e)&&(n=ca(e,t)),n.id||(n.id=M(),n.created=String(Ae())),t.trackAnonymousUser&&!n.anonymousId&&(n.anonymousId=M()),delete n.isExpired,fa(n),n}function _a(e){return ua(e)||la(e)||!e.id||fa(e),e}async function va(e){let t=mt(e);if(t){if(Qi()&&await Ji(Yi,t))return{type:Ki.COOKIE,cookieOptions:t,cookieApi:1};if(await Ji(Zi,t))return{type:Ki.COOKIE,cookieOptions:t,cookieApi:0}}}var ya;function ba(e,t){let{cookieOptions:n,cookieApi:r}=e,i=new E,a=!!t.trackAnonymousUser,o=Ta(n),s=P(Sa)(r,n),c=!0;s.observable.subscribe(()=>{s.getAll().then(e=>{i.notify(Ca(e,o))}).catch(e=>T(Error(`Error while reading session cookies on change: ${e}`)))});function l(e){return s.getAllAndSet(t=>{let r=Ca(t,o);return c&&Dt(r)&&(r=Ca(st(ea),o)),c=!1,{value:wa(e(r),n),expireDelay:a?Gi:Ui}})}return{async setSessionState(e,t){typeof navigator<`u`&&navigator.locks?await navigator.locks.request($i,()=>l(e)).catch(e=>{if(!xa(e))throw e}):(ya=(ya??Promise.resolve()).then(()=>l(e)),await ya)},sessionObservable:i}}function xa(e){return e instanceof Error?e.name===`AbortError`||e.message.includes(`no longer runnable`):!1}function Sa(e,t){return e===1?Yi($i,t):Zi($i,t)}function Ca(e,t){let n;for(let r of e.slice().reverse())if(n=ma(r),n.c===t)break;return delete n?.c,n??{}}function wa(e,t){return pa(Dt(e)?e:{...e,c:Ta(t)})}function Ta(e){let t=e.domain?e.domain.split(`.`).length-1:0,n=0;return n|=0,n|=t<<1,n|=+!!e.crossSite,n.toString(16)}var Ea=`_dd_test_`;function Da(){try{let e=M(),t=`${Ea}${e}`;localStorage.setItem(t,e);let n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:Ki.LOCAL_STORAGE}:void 0}catch{return}}function Oa(){let e=new E(e=>B(window,`storage`,t=>{t.key===`_dd_s_v2`&&t.storageArea===localStorage&&e.notify(ma(t.newValue))}).stop),t=!0;return{async setSessionState(n,r){let i=ma(localStorage.getItem($i));t&&la(i)&&(i=ma(localStorage.getItem(ea))),t=!1;let a=n(i);localStorage.setItem($i,pa(a)),await Promise.resolve(),e.notify(a)},sessionObservable:e}}async function ka(e){let t=Aa(e.sessionPersistence);for(let n of t){let t=await ja(n,e);if(t!==void 0)return t}}function Aa(e){return e===void 0?ne?[Ki.MEMORY]:[Ki.COOKIE]:e}function ja(e,t){switch(e){case Ki.COOKIE:return va(t);case Ki.LOCAL_STORAGE:return Da();case Ki.MEMORY:return na();default:N.error(`Invalid session persistence '${String(e)}'`);return}}function Ma(e,t){switch(e.type){case Ki.COOKIE:return ba(e,t);case Ki.LOCAL_STORAGE:return Oa();case Ki.MEMORY:return ra()}}var Na=De,Pa=1e3,Fa=Oe*12,Ia=[];async function La(e,t){let n=Me(),r=new E,i=new E,a=await P(ka)(e);if(!a){N.warn(`No storage available for session. We will not send any data.`);return}let o=P(Ma)(a,e),s=Ri({maxEntries:Pa});Ia.push(()=>s.stop());let c=!1,{throttled:l,cancel:u}=Rt(()=>{c=!1,o.setSessionState(t=>ga(t,e),`expandOrRenewOnActivity`).catch(T)},D);Ia.push(u);let d;Ia.push(()=>I(d));let f=!1;Ia.push(()=>{f=!0});let p=await m().catch(e=>T(Error(`Error while resolving initial session state: ${e}`)));if(!p||f)return;for(;!t.isGranted();)if(b(),await new Promise(e=>t.onGrantedOnce(e)),f||(p=await m().catch(T),!p||f))return;return s.add(ee(p),Ne().relative),g(p),h(),_(),$r(`Session manager init metrics`,{metrics:{duration:k(n,Me())}}),v();async function m(){let t={};return await o.setSessionState(n=>(t=ga(ha(n,e),e),t),`initialize`),t}function h(){let e=o.sessionObservable.subscribe(e=>{g(e),y(e)});Ia.push(()=>e.unsubscribe())}function g(n){I(d);let r=sa(n);r&&(d=F(()=>{o.setSessionState(n=>ua(n)?(t.isGranted()||delete n.anonymousId,ca(n,e)):n,`expireOnTimeout`).catch(T)},r-Ae()))}function _(){t.observable.subscribe(()=>{t.isGranted()?(c=!1,o.setSessionState(t=>ga(t,e),`expandOrRenewOnConsent`).catch(T)):b()}),ne||(za(()=>{t.isGranted()&&l()}),Ba(()=>{c||o.setSessionState(e=>_a(e),`expandOnVisibility`).catch(T)}),Va(()=>{o.setSessionState(t=>ha(t,e),`initializeOnResume`).catch(T)}))}function v(){return{findSession:(e,t)=>s.find(e,t),findTrackedSession:(t,{returnInactive:n=!1,maxAge:r=Fa}={})=>{let i=s.find(t,{returnInactive:n});if(i&&i.id!==`invalid`&&Vi(i.id,e.sessionSampleRate)&&!(Ae()-i.createdAt>r))return i},renewObservable:r,expireObservable:i,expire:b,updateSessionState:e=>{o.setSessionState(t=>({...t,...e}),`updateState`).catch(T)}}}function y(e){let t=s.find(),n=t?.id!==void 0,a=e.id!==void 0,o=n&&a&&t.id!==e.id;if(n&&(!a||o)&&(c=!0,i.notify(),s.closeActive(Me())),a&&(!n||o)){if(c)return;s.add(ee(e),Me()),r.notify()}else n&&a&&!o&&(t.isReplayForced=!!e.forcedReplay)}function b(){u();let n=ca(s.find(),e);t.isGranted()||delete n.anonymousId,y(n),o.setSessionState(n=>(t.isGranted()||delete n.anonymousId,ca(n,e)),`expire`).catch(T)}function ee(e){let t=oa(e)??O();return e.id?{id:e.id,isReplayForced:!!e.forcedReplay,anonymousId:e.anonymousId,createdAt:t}:{id:`invalid`,isReplayForced:!1,anonymousId:void 0,createdAt:t}}}function Ra(){let e={id:M(),isReplayForced:!1,anonymousId:void 0,createdAt:O()};return Promise.resolve({findSession:()=>e,findTrackedSession:()=>e,renewObservable:new E,expireObservable:new E,expire:L,updateSessionState:t=>{e={...e,...t}}})}function za(e){let{stop:t}=hn(window,[`click`,`touchstart`,`keydown`,`scroll`],e,{capture:!0,passive:!0});Ia.push(t)}function Ba(e){let t=()=>{document.visibilityState===`visible`&&e()},{stop:n}=B(document,`visibilitychange`,t);Ia.push(n);let r=It(t,Na);Ia.push(()=>{Lt(r)})}function Va(e){let{stop:t}=B(window,`resume`,e,{capture:!0});Ia.push(t)}var Ha=class{constructor(){this.callbacks={}}notify(e,t){let n=this.callbacks[e];n&&n.forEach(e=>e(t))}subscribe(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),{unsubscribe:()=>{this.callbacks[e]=this.callbacks[e].filter(e=>t!==e)}}}},Ua=3e3;function Wa(e,t,n=Ua){let r=0,i=!1;return{isLimitReached(){if(r===0&&F(()=>{r=0},De),r+=1,r<=n||i)return i=!1,!1;if(r===n+1){i=!0;try{t(`Reached max number of ${e}s by minute: ${n}`)}finally{i=!1}}return!0}}}function Ga(){return qa()===1}var Ka;function qa(){return Ka??=Ja()}function Ja(e=window){let t=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(t)?0:e.navigator.vendor?.indexOf(`Apple`)===0||/safari/i.test(t)&&!/chrome|android/i.test(t)?1:2}function Ya(e,t){return document.readyState===e||document.readyState===`complete`?(t(),{stop:L}):B(window,e===`complete`?`load`:`DOMContentLoaded`,t,{once:!0})}function Xa(e){return new Promise(t=>{Ya(e,t)})}var Za,Qa=new WeakMap;function $a(){return Za||=eo(),Za}function eo(){return`XMLHttpRequest`in x?new E(e=>{let{stop:t}=R(XMLHttpRequest.prototype,`open`,to),{stop:n}=R(XMLHttpRequest.prototype,`send`,t=>{no(t,e)},{computeHandlingStack:!0}),{stop:r}=R(XMLHttpRequest.prototype,`abort`,ro);return()=>{t(),n(),r()}}):new E}function to({target:e,parameters:[t,n]}){Qa.set(e,{state:`open`,method:String(t).toUpperCase(),url:S(String(n))})}function no({target:e,parameters:[t],handlingStack:n},r){let i=Qa.get(e);if(!i)return;let a=i;a.state=`start`,a.startClocks=j(),a.isAborted=!1,a.xhr=e,a.handlingStack=n,a.requestBody=t;let o=!1,{stop:s}=R(e,`onreadystatechange`,()=>{e.readyState===XMLHttpRequest.DONE&&c()}),c=()=>{if(l(),s(),o)return;o=!0;let t=i;t.duration=k(a.startClocks.timeStamp,O()),t.status=e.status,typeof e.response==`string`&&(t.responseBody=e.response),r.notify({...t,state:`complete`})},{stop:l}=B(e,`loadend`,c);r.notify(a)}function ro({target:e}){let t=Qa.get(e);t&&(t.isAborted=!0)}async function io(e){let t=e.getReader(),n=[];for(;;){let e=await t.read();if(e.done)break;n.push(e.value)}return t.cancel().catch(L),Cn(n)}var ao=function(e){return e[e.IGNORE=0]=`IGNORE`,e[e.COLLECT=1]=`COLLECT`,e}({}),oo,so=[];function co({responseBodyAction:e}={}){return e&&so.push(e),oo||=lo(),oo}function lo(){return new E(e=>{if(!x.fetch)return;let{stop:t}=R(x,`fetch`,t=>uo(t,e),{computeHandlingStack:!0});return t})}function uo({parameters:e,onPostCall:t,handlingStack:n},r){let[i,a]=e,o=a?.method;o===void 0&&i instanceof Request&&(o=i.method);let s=o===void 0?`GET`:String(o).toUpperCase(),c=i instanceof Request?i.url:S(String(i)),l={state:`start`,init:a,input:i,method:s,startClocks:j(),url:c,handlingStack:n,isAbortedOnStart:i instanceof Request&&i.signal?.aborted||a?.signal?.aborted||!1};r.notify(l),e[0]=l.input,e[1]=l.init,t(e=>{fo(r,e,l).catch(T)})}async function fo(e,t,n){let r=n,i;try{i=await t}catch(t){e.notify({...r,state:`resolve`,status:0,isAborted:r.init?.signal?.aborted||t instanceof DOMException&&t.code===DOMException.ABORT_ERR,error:t});return}if(r.response=i,r.status=i.status,r.responseType=i.type,r.isAborted=!1,so.reduce((e,t)=>Math.max(e,t(r)),0)===1){let e=Jn(i);if(e?.body)try{let t=await io(e.body);r.responseBody=new TextDecoder().decode(t)}catch{}}e.notify({...r,state:`resolve`})}function po(e){return typeof e.WebSocket==`function`}var mo;function ho(){return mo||=go(),mo}function go(){return new E(e=>{if(!po(x))return;let{stop:t}=un(x,`WebSocket`,({parameters:t,onPostCall:n})=>{let r=Array.isArray(t[1])?[].concat(t[1]):t[1],i=j();n(t=>{e.notify({state:`connecting`,instance:t,url:t.url,protocols:r,startClocks:i}),_o(t,e)})}),{stop:n}=R(x.WebSocket.prototype,`send`,({target:t,parameters:[n],onPostCall:r})=>{let i=vo(n),a=t.bufferedAmount;r(()=>{e.notify({state:`message-out`,instance:t,size:i,bufferedAmountPreSend:a,at:j()})})});return()=>{t(),n()}})}function _o(e,t){let{stop:n}=B(e,`open`,()=>{t.notify({state:`open`,instance:e,openClocks:j(),protocol:e.protocol||``}),n()}),{stop:r}=B(e,`message`,n=>{t.notify({state:`message-in`,instance:e,size:vo(n.data),at:j()})}),{stop:i}=B(e,`close`,n=>{t.notify({state:`closed`,instance:e,code:n.code,reason:n.reason,wasClean:n.wasClean,at:j()}),r(),i()})}function vo(e){return typeof e==`string`?Sn(e):e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:typeof Blob<`u`&&e instanceof Blob?e.size:0}function yo(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){let n=window.requestIdleCallback(C(e),t);return()=>window.cancelIdleCallback(n)}return bo(e)}function bo(e){let t=Ae(),n=F(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Ae()-t))})},0);return()=>I(n)}var xo=D;function So(){let e=[];function t(t){let r;if(!t||t.didTimeout){let e=performance.now();r=()=>30-(performance.now()-e)}else r=t.timeRemaining.bind(t);for(;r()>0&&e.length;)e.shift()();e.length&&n()}function n(){yo(t,{timeout:xo})}return{push(t){e.push(t)===1&&n()},stop(){e.length=0}}}function Co(e){return!!e&&typeof e.then==`function`}var wo={};function To(e){return ge(...e.map(e=>(wo[e]||(wo[e]=Eo(e)),wo[e])))}function Eo(e){return new E(t=>{let n=_[e];return _[e]=(...r)=>{n.apply(console,r);let i=sn(`console error`);w(()=>{t.notify(Do(r,e,i))})},()=>{_[e]=n}})}function Do(e,t,n){let r=e.map(e=>Oo(e)).join(` `);if(t===g.error){let i=fi({originalError:e.find(In),handlingStack:n,startClocks:j(),source:Hn.CONSOLE,handling:`handled`,nonErrorPrefix:`Provided`,useFallbackStack:!1});return i.message=r,{api:t,message:r,handlingStack:n,error:i}}return{api:t,message:r,error:void 0,handlingStack:n}}function Oo(e){return typeof e==`string`?V(e):In(e)?ln(Bt(e)):wn(V(e),void 0,2)}function ko(e){let t=a(e)===`object`;return t||N.error(`Unsupported context:`,e),t}function Ao(e,t,n){let r={...e};for(let[e,{required:i,type:a}]of Object.entries(t))a===`string`&&!jo(r[e])&&(r[e]=String(r[e])),i&&jo(r[e])&&N.warn(`The property ${e} of ${n} is required; context will not be sent to the intake.`);return r}function jo(e){return e==null||e===``}function Mo(e=``,{propertiesConfig:t={}}={}){let n={},r=new E,i={getContext:()=>d(n),setContext:a=>{ko(a)?n=V(Ao(a,t,e)):i.clearContext(),r.notify()},setContextProperty:(i,a)=>{n=V(Ao({...n,[i]:a},t,e)),r.notify()},removeContextProperty:i=>{delete n[i],Ao(n,t,e),r.notify()},clearContext:()=>{n={},r.notify()},changeObservable:r};return i}function U(e,t,n,r){return C((...i)=>(r&&H({feature:r}),e()[t][n](...i)))}function No(e,t,n){e.changeObservable.subscribe(()=>{let r=e.getContext();n.notify(e=>e[t].setContext(r))})}var Po=`_dd_c`,Fo=[];function Io(e,t,n){if(typeof window>`u`||typeof localStorage>`u`)return;let r=Lo(t,n);Fo.push(B(window,`storage`,({key:e})=>{r===e&&a()})),e.changeObservable.subscribe(o);let i=f(s(),e.getContext());Dt(i)||e.setContext(i);function a(){e.setContext(s())}function o(){localStorage.setItem(r,JSON.stringify(e.getContext()))}function s(){let e=localStorage.getItem(r);return e?wt(e)??{}:{}}}function Lo(e,t){return`${Po}_${e}_${t}`}var W={userContext:`userContext`,globalContext:`globalContext`,accountContext:`accountContext`},G={getContext:`getContext`,setContext:`setContext`,setContextProperty:`setContextProperty`,removeContextProperty:`removeContextProperty`,clearContext:`clearContext`};function Ro(e,t,n){let r=zo();return t.storeContextsAcrossPages&&Io(r,n,4),e.register(()=>{let e=r.getContext();return Dt(e)||!e.id?Fr:{account:e}}),r}function zo(){return Mo(`account`,{propertiesConfig:{id:{type:`string`,required:!0},name:{type:`string`}}})}var Bo=`_dd_tab_id`,Vo;function Ho(e){let t=Uo();e.register(()=>({tab:{id:t}}))}function Uo(){return Vo||=Wo()??M(),Vo}function Wo(){try{let e=sessionStorage.getItem(Bo);if(e)return e;let t=M();return sessionStorage.setItem(Bo,t),t}catch{return}}function Go(e,t,n,r){let i=Ko();return t.storeContextsAcrossPages&&Io(i,n,2),e.register(()=>{let e=i.getContext();return r?{context:e}:e}),i}function Ko(){return Mo(`global context`)}function qo(e,t,n,r){let i=Jo();return t.storeContextsAcrossPages&&Io(i,r,1),e.register(({eventType:e,startTime:r})=>{let a=i.getContext(),o=n.findTrackedSession(r);return o?.anonymousId&&!a.anonymous_id&&t.trackAnonymousUser&&(a.anonymous_id=o.anonymousId),Dt(a)?Fr:{type:e,usr:a}}),i}function Jo(){return Mo(`user`,{propertiesConfig:{id:{type:`string`},name:{type:`string`},email:{type:`string`}}})}var Yo=`datadog-synthetics-`,Xo=`${Yo}public-id`,Zo=`${Yo}result-id`,Qo=`${Yo}injects-rum`,$o=`${Yo}rum-context`;function es(){return!ne&&!!(x._DATADOG_SYNTHETICS_INJECTS_RUM||lt(Qo))}function ts(){let e=rs();return is(e)?e:void 0}function ns(){return!!ts()}function rs(){let e=x._DATADOG_SYNTHETICS_RUM_CONTEXT;if(e)return e;let t=lt($o);return t?wt(decodeURIComponent(t)):{test_id:window._DATADOG_SYNTHETICS_PUBLIC_ID||lt(Xo),result_id:window._DATADOG_SYNTHETICS_RESULT_ID||lt(Zo)}}function is(e){return typeof e==`object`&&!!e&&typeof e.test_id==`string`&&typeof e.result_id==`string`}var K={DOCUMENT:`document`,XHR:`xhr`,BEACON:`beacon`,FETCH:`fetch`,CSS:`css`,JS:`js`,IMAGE:`image`,FONT:`font`,MEDIA:`media`,WEBSOCKET:`websocket`,OTHER:`other`},as={FETCH:K.FETCH,XHR:K.XHR},os=500,ss=function(e){return e[e.RUNTIME_ERROR=0]=`RUNTIME_ERROR`,e[e.FETCH=1]=`FETCH`,e[e.XHR=2]=`XHR`,e[e.CONSOLE=3]=`CONSOLE`,e}({});function cs(){let e=new _e(os,e=>{Xr(`Early data collection dropped data on unbuffer`,{count:e})}),t=[];function n(n,r){t.push(r.subscribe(t=>{e.notify({type:n,data:t})}))}return n(0,P(gi)()),n(1,co()),n(2,$a()),n(3,To(Object.values(g))),{observable:e,stop:()=>t.forEach(e=>e.unsubscribe())}}function ls(){try{return new Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function us(e,t){return+e.toFixed(t)}function ds(e){return typeof e==`number`}var fs=function(e){return e[e.REPLAY=1]=`REPLAY`,e[e.RUM=2]=`RUM`,e[e.TELEMETRY=4]=`TELEMETRY`,e[e.PROFILING=6]=`PROFILING`,e}({});function ps(e,t,n){e.register(({startTime:e})=>{let r=t.findTrackedSession(e);return r?{session:{id:r.id},anonymous_id:r.anonymousId,...n}:Fr})}function ms(e,t){let n=0,r=[],i,a=!0,o=0,s=[],c=t,{stop:l}=B(e,`message`,({data:e})=>{if(e.type!==`wrote`||e.streamId!==c)return;let t=s[0];t&&(t.id===e.id?(s.shift(),n+=e.additionalBytesCount,r.push(e.result),i=e.trailer,t.writeCallback?t.writeCallback(e.result.byteLength):t.finishCallback&&t.finishCallback()):t.id<e.id&&l())});function u(){let e=r.length===0?new Uint8Array:Cn(r.concat(i)),t={rawBytesCount:n,output:e,outputBytesCount:e.byteLength,encoding:`deflate`};return n=0,r=[],t}function d(){a||=(e.postMessage({action:`reset`,streamId:t}),!0)}return{isAsync:!0,get isEmpty(){return a},write(n,r){e.postMessage({action:`write`,id:o,data:n,streamId:t}),s.push({id:o,writeCallback:r,data:n}),a=!1,o+=1},finish(e){d(),s.length?(s.forEach(e=>{delete e.writeCallback}),s[s.length-1].finishCallback=()=>e(u())):e(u())},finishSync(){d();let e=s.map(e=>e.data).join(``);return s.length=0,{...u(),pendingData:e}},estimateEncodedBytesCount(e){return e.length/8},stop(){l()}}}function hs({configuredUrl:e,error:t,source:n,scriptType:r}){if(N.error(`${n} failed to start: an error occurred while initializing the ${r}:`,t),t instanceof Event||t instanceof Error&&gs(t.message)){let t;t=e?`Please make sure the ${r} URL ${e} is correct and CSP is correctly configured.`:`Please make sure CSP is correctly configured.`,N.error(`${t} See documentation at ${m}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else r===`worker`&&Zr(t)}function gs(e){return e.includes(`Content Security Policy`)||e.includes(`requires 'TrustedScriptURL'`)}var _s=30*D;function vs(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob([`(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t?.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},D=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},M=!1,j=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},C=j,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),O=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},T={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=C,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=T[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?j(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);D(t,t.dyn_ltree,e-1),D(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=O(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var st=[new it(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var lt=function(t){var e,i=function(t){if(!t?.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){M||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),M=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},_t=function(t,e){var a,n;if(!t?.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra?.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=O(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t?.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(T[n]);if(t.header&&(e=this.strm,a=t.header,e?.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t?.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(T[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch{t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ct.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"7.13.0"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=(new TextEncoder).encode(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:vt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();`])))}var q={status:0};function ys(e,t,n){switch(q.status===0&&xs(e,t),q.status){case 1:return q.initializationFailureCallbacks.push(n),q.worker;case 3:return q.worker}}function bs(){return q.status}function xs(e,t){try{let n=P(vs)(e),{stop:r}=B(n,`error`,n=>{ws(e,t,n)}),{stop:i}=B(n,`message`,({data:n})=>{n.type===`errored`?ws(e,t,n.error,n.streamId):n.type===`initialized`&&Cs(n.version)});n.postMessage({action:`init`}),F(()=>Ss(t),_s),q={status:1,worker:n,stop:()=>{r(),i()},initializationFailureCallbacks:[]}}catch(n){ws(e,t,n)}}function Ss(e){q.status===1&&(N.error(`${e} failed to start: a timeout occurred while initializing the Worker`),q.initializationFailureCallbacks.forEach(e=>e()),q={status:2})}function Cs(e){q.status===1&&(q={status:3,worker:q.worker,stop:q.stop,version:e})}function ws(e,t,n,r){q.status===1||q.status===0?(hs({configuredUrl:e.workerUrl,error:n,source:t,scriptType:`worker`}),q.status===1&&q.initializationFailureCallbacks.forEach(e=>e()),q={status:2}):Zr(n,{worker_version:q.status===3&&q.version,stream_id:r})}var Ts;function Es(e){return js(e).segments_count}function Ds(e){js(e).segments_count+=1}function Os(e){js(e).records_count+=1}function ks(e,t){js(e).segments_total_raw_size+=t}function As(e){return Ts?.get(e)}function js(e){Ts||=new Map;let t;return Ts.has(e)?t=Ts.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},Ts.set(e,t),Ts.size>1e3&&Ms()),t}function Ms(){if(!Ts)return;let e=Ts.keys().next().value;e&&Ts.delete(e)}var J={ACTION:`action`,ERROR:`error`,LONG_TASK:`long_task`,VIEW:`view`,VIEW_UPDATE:`view_update`,RESOURCE:`resource`,VITAL:`vital`},Ns={LONG_TASK:`long-task`,LONG_ANIMATION_FRAME:`long-animation-frame`},Ps={INITIAL_LOAD:`initial_load`,ROUTE_CHANGE:`route_change`,SESSION_RENEWAL:`session_renewal`,BF_CACHE:`bf_cache`},Fs={CLICK:`click`,CUSTOM:`custom`,TAP:`tap`,SCROLL:`scroll`,SWIPE:`swipe`,APPLICATION_START:`application_start`,BACK:`back`},Is={RAGE_CLICK:`rage_click`,ERROR_CLICK:`error_click`,DEAD_CLICK:`dead_click`},Ls={DURATION:`duration`,OPERATION_STEP:`operation_step`};function Rs(e,t){t.lastIndex=0;let n=t.exec(e);if(!n)return;let[r,i]=n;return i||r}function zs(e){let t=[],n=0,r,i={quote:void 0,escapeSequence:void 0},a=``;for(let o of e){if(r=Ks[n].find(e=>Gs[e](o,i)),!r)return[];if(i.escapeSequence!==void 0&&r!==12){if(!Ys(i.escapeSequence))return[];a+=Zs(i.escapeSequence),i.escapeSequence=void 0}qs.includes(r)?a+=o:Js.includes(r)&&a!==``?(t.push(a),a=``):r===12?i.escapeSequence=i.escapeSequence?`${i.escapeSequence}${o}`:o:r===8?i.quote=o:r===9&&(i.quote=void 0),n=r}return Ks[n].includes(1)?(a!==``&&t.push(a),t):[]}var Bs=/[a-zA-Z_$]/,Vs=/[a-zA-Z0-9_$]/,Hs=/[0-9]/,Us=/[a-fA-F0-9]/,Ws=`'"`,Gs={0:()=>!1,1:()=>!1,2:e=>Bs.test(e),3:e=>Vs.test(e),4:e=>e===`.`,5:e=>e===`[`,6:e=>e===`]`,7:e=>Hs.test(e),8:e=>Ws.includes(e),9:(e,t)=>e===t.quote,10:()=>!0,11:e=>e===`\\`,12:(e,t)=>t.escapeSequence===void 0?`${t.quote}/\\bfnrtu`.includes(e):t.escapeSequence.startsWith(`u`)&&t.escapeSequence.length<5?Us.test(e):!1},Ks={0:[2,5],1:[],2:[3,4,5,1],3:[3,4,5,1],4:[2],5:[8,7],6:[4,5,1],7:[7,6],8:[11,9,10],9:[6],10:[11,9,10],11:[12],12:[12,11,9,10]},qs=[2,3,7,10],Js=[4,5,6];function Ys(e){return`"'/\\bfnrt`.includes(e)||e.startsWith(`u`)&&e.length===5}var Xs={'"':`"`,"'":`'`,"/":`/`,"\\":`\\`,b:`\b`,f:`\f`,n:`
6
- `,r:`\r`,t:` `};function Zs(e){return e.startsWith(`u`)?String.fromCharCode(parseInt(e.slice(1),16)):Xs[e]}var Qs=`dd_rc_`,$s={hit:`success`,miss:`missing`,error:`failure`};function ec(e){return`${Qs}${e}`}function tc(e){if(typeof e!=`object`||!e)return!1;let t=`version`in e&&e.version===3,n=`config`in e&&typeof e.config==`object`&&e.config!==null,r=`metadata`in e&&o(e.metadata)&&typeof e.metadata.syncId==`string`&&typeof e.metadata.lastSynced==`number`;return t&&n&&r}function nc(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}function rc({remoteConfigurationId:e}){let t=ec(e);return{read(){let e;try{e=localStorage.getItem(t)}catch{return{status:`error`}}if(e===null)return{status:`miss`};let n=wt(e);return n===void 0||!tc(n)?(this.remove(),{status:`error`}):{status:`hit`,config:n.config,metadata:n.metadata}},remove(){try{localStorage.removeItem(t)}catch{}},write(e,n){let r=this.read();(r.status!==`hit`||JSON.stringify(r.config)!==JSON.stringify(e))&&nc(t,{version:3,config:e,metadata:{lastModified:n,lastSynced:O(),syncId:M()}})},stampFirstApplied(e){if(e.metadata.firstApplied!==void 0)return e.metadata;let n={...e.metadata,firstApplied:O()};return nc(t,{version:3,config:e.config,metadata:n}),n}}}var ic=`v1`,ac=[`applicationId`,`service`,`env`,`version`,`sessionSampleRate`,`sessionReplaySampleRate`,`telemetrySampleRate`,`trackAnonymousUser`,`trackUserInteractions`,`trackResources`,`trackLongTasks`,`traceContextInjection`,`actionNameAttribute`,`defaultPrivacyLevel`,`enablePrivacyForActionName`,`traceSampleRate`,`trackSessionAcrossSubdomains`,`allowedTracingUrls`,`allowedTrackingOrigins`];async function oc(e,t){let n,r=cc(),i=await pc(e);return i.ok?(r.increment(`fetch`,`success`),n=sc(e,i.value,t,r)):(r.increment(`fetch`,`failure`),N.error(i.error)),$r(zr.REMOTE_CONFIGURATION_METRIC_NAME,{metrics:r.get()}),n}function sc(e,t,n,r){let i={...e};if(t.rum){let e=t.rum;ac.forEach(t=>{t in e&&(i[t]=a(e[t]))}),Object.keys(n).forEach(t=>{e[t]!==void 0&&s(n[t],e[t])})}return t.profiling?.sampleRate!==void 0&&(i.profilingSampleRate=t.profiling.sampleRate),i;function a(e){if(Array.isArray(e))return e.map(a);if(o(e)){if(lc(e)){let t=e.rcSerializedType;switch(t){case`string`:return e.value;case`regex`:return uc(e.value);case`dynamic`:return c(e);default:N.error(`Unsupported remote configuration: "rcSerializedType": "${t}"`);return}}return Ot(e,a)}return e}function s(e,t){t.forEach(({key:t,value:n})=>{e.setContextProperty(t,a(n))})}function c(e){let t=e.strategy,n;switch(t){case`cookie`:n=l(e);break;case`dom`:n=d(e);break;case`js`:n=p(e);break;case`localStorage`:n=u(e);break;default:N.error(`Unsupported remote configuration: "strategy": "${t}"`);return}let r=e.extractor;return r!==void 0&&typeof n==`string`?dc(r,n):n}function l({name:e}){let t=ot(e);return r.increment(`cookie`,t===void 0?`missing`:`success`),t}function u({key:e}){let t;try{t=localStorage.getItem(e)}catch{r.increment(`localStorage`,`failure`);return}return r.increment(`localStorage`,t===null?`missing`:`success`),t??void 0}function d({selector:e,attribute:t}){let n;try{n=document.querySelector(e)}catch{N.error(`Invalid selector in the remote configuration: '${e}'`),r.increment(`dom`,`failure`);return}if(!n){r.increment(`dom`,`missing`);return}if(f(n,t)){N.error(`Forbidden element selected by the remote configuration: '${e}'`),r.increment(`dom`,`failure`);return}let i=t===void 0?n.textContent:n.getAttribute(t);if(i===null){r.increment(`dom`,`missing`);return}return r.increment(`dom`,`success`),i}function f(e,t){return e.getAttribute(`type`)===`password`&&t===`value`}function p({path:e}){let t=window,n=zs(e);if(n.length===0){N.error(`Invalid JSON path in the remote configuration: '${e}'`),r.increment(`js`,`failure`);return}for(let i of n){if(!(i in t)){r.increment(`js`,`missing`);return}try{t=t[i]}catch(t){N.error(`Error accessing: '${e}'`,t),r.increment(`js`,`failure`);return}}return r.increment(`js`,`success`),t}}function cc(){let e={fetch:{}};return{get:()=>e,increment:(t,n)=>{e[t]||(e[t]={}),e[t][n]||(e[t][n]=0),e[t][n]=e[t][n]+1}}}function lc(e){return`rcSerializedType`in e}function uc(e){try{return new RegExp(e)}catch{N.error(`Invalid regex in the remote configuration: '${e}'`)}}function dc(e,t){let n=uc(e.value);if(n!==void 0)return Rs(t,n)}function fc(e){let t=e.headers?.get(`last-modified`);if(!t)return;let n=new Date(t).getTime();return isNaN(n)?void 0:n}async function pc(e){let t;try{t=await Kn(hc(e))}catch{t=void 0}if(!t?.ok)return{ok:!1,error:Error(`Error fetching the remote configuration.`)};let n=await t.json();return n.rum||n.profiling?{ok:!0,value:n,lastModified:fc(t)}:{ok:!1,error:Error(`No remote configuration for RUM.`)}}function mc(e){return e.remoteConfiguration?.id??e.remoteConfigurationId}function hc(e){if(e.remoteConfigurationProxy)return e.remoteConfigurationProxy;let t=mc(e);return Ge({site:e.site,path:`/${ic}/${encodeURIComponent(t)}.json`,subdomain:`sdk-configuration`})}function gc(e,t,n){pc(e).then(e=>{e.ok?(n.increment(`fetch`,`success`),t.write(e.value,e.lastModified)):(n.increment(`fetch`,`failure`),N.error(e.error))}).catch(T).finally(()=>{$r(zr.REMOTE_CONFIGURATION_METRIC_NAME,{metrics:n.get()})})}function _c(e,t){let n=rc({remoteConfigurationId:mc(e)}),r=cc(),i=n.read();if(r.increment(`cache`,$s[i.status]),gc(e,n,r),i.status===`hit`)return{metadata:n.stampFirstApplied(i),initConfiguration:sc(e,i.config,t,r)};if(!e.remoteConfiguration?.required)return{initConfiguration:e}}function vc(e,t){switch(t.type){case`string`:return`"${e}" must be a non-empty string`;case`number`:return t.min!==void 0&&t.max!==void 0?`"${e}" must be a number between ${t.min} and ${t.max}`:t.min===void 0?t.max===void 0?`"${e}" must be a finite number`:`"${e}" must be a number less than or equal to ${t.max}`:`"${e}" must be a number greater than or equal to ${t.min}`;case`percentage`:return`"${e}" must be a number between 0 and 100`;case`boolean`:return`"${e}" must be a boolean`;case`site`:return`"${e}" must be a valid Datadog site. ${h} ${m}/getting_started/site/.`;case`match-option`:return`"${e}" must be a string, RegExp, or function`;case`enum`:return`"${e}" must be one of: "${wc(t.values).join(`", "`)}"`;case`union`:return`"${e}" does not match any expected type`;case`schema`:return`"${e}" is not a valid object`;case`function`:return`"${e}" must be a function`}}function yc(e,t,n){if(!e||typeof e!=`object`){n.error(`Configuration must be an object`);return}return bc(t,e,n)}function bc(e,t,n){let r={};for(let[i,a]of Object.entries(e)){let e=t[i],o=a.multiple?xc(a,e,n):Cc(a,e,n);if(o===void 0){if(e!=null&&e!==``){if(n.error(vc(i,a)),a.required||a.strict!==!1)return}else if(a.required){n.error(`"${i}" is required`);return}r[i]=`default`in a?d(a.default):void 0}else r[i]=o}return r}function xc(e,t,n){if(t==null)return;if(e.type===`enum`&&e.allowAll&&t===`all`)return wc(e.values).slice();let r=Array.isArray(t)?t:[t],i=[];for(let t of r){let r=Cc(e,t,n);if(r===void 0){if(e.strict!==!1)return}else i.push(r)}if(!(e.strict===!1&&i.length===0&&r.length>0))return i}var Sc=/(datadog|ddog|datad0g|dd0g)/;function Cc(e,t,n){if(e.type===`schema`)return typeof t!=`object`||!t?void 0:bc(e.schema,t,n);if(e.type===`union`){if(t==null)return;for(let r of e.variants){let e=Cc(r,t,n);if(e!==void 0)return e}return}if(t!=null)switch(e.type){case`function`:return typeof t==`function`?t:void 0;case`string`:return typeof t==`string`&&t.length>0?t:void 0;case`number`:return typeof t==`number`&&Number.isFinite(t)&&(e.min===void 0||t>=e.min)&&(e.max===void 0||t<=e.max)?t:void 0;case`percentage`:return s(t)?t:void 0;case`boolean`:return typeof t==`boolean`?t:e.strict===!1?!!t:void 0;case`site`:return typeof t!=`string`||!Sc.test(t)?void 0:t;case`match-option`:return c(t)?t:void 0;case`enum`:return typeof t==`string`&&wc(e.values).includes(t)?t:void 0}}function wc(e){return Tc(e)?e:Object.values(e)}function Tc(e){return Array.isArray(e)}var Ec=[`tracecontext`,`datadog`],Dc=[`cache-control`,`etag`,`age`,`expires`,`content-type`,`content-encoding`,`vary`,`content-length`,`server-timing`,`x-cache`,`cf-cache-status`,`x-vercel-cache`],Oc={...Xe,applicationId:{type:`string`,required:!0},actionNameAttribute:{type:`string`},workerUrl:{type:`string`},subdomain:{type:`string`},sessionReplaySampleRate:{type:`percentage`,default:0},traceSampleRate:{type:`percentage`,default:100},profilingSampleRate:{type:`percentage`,default:0},compressIntakeRequests:{type:`boolean`,default:!1},trackUserInteractions:{type:`boolean`,default:!0,strict:!1},trackResources:{type:`boolean`,default:!0,strict:!1},trackLongTasks:{type:`boolean`,default:!0,strict:!1},trackViewsManually:{type:`boolean`,default:!1,strict:!1},betaEnableViewUpdates:{type:`boolean`},betaTrackWebSockets:{type:`boolean`,default:!1,strict:!1},enablePrivacyForActionName:{type:`boolean`,default:!0},propagateTraceBaggage:{type:`boolean`,default:!0},startSessionReplayRecordingManually:{type:`boolean`,default:!1,strict:!1},sessionReplayCanvasRecording:{type:`schema`,schema:{enable:{type:`boolean`,required:!0},maxFramesPerSecond:{type:`number`,min:0,max:5,default:1},hashingMaxDimension:{type:`number`,min:1,max:100,default:100},maxImageDimension:{type:`number`,min:1,max:1e3,default:1e3}}},defaultPrivacyLevel:{type:`enum`,values:Je,default:Je.MASK_USER_INPUT,strict:!1},traceContextInjection:{type:`enum`,values:Ye,default:Ye.SAMPLED,strict:!1},excludedActivityUrls:{type:`match-option`,multiple:!0,default:[]},allowedTracingUrls:{type:`union`,multiple:!0,strict:!1,default:[],variants:[{type:`match-option`},{type:`schema`,schema:{match:{type:`match-option`,required:!0},propagatorTypes:{type:`enum`,values:[`datadog`,`b3`,`b3multi`,`tracecontext`],multiple:!0,strict:!1,default:Ec}}}]},plugins:{type:`schema`,multiple:!0,strict:!1,default:[],schema:{name:{type:`string`,required:!0},getConfigurationTelemetry:{type:`function`,strict:!1,signature:void 0},onInit:{type:`function`,strict:!1,signature:void 0},onRumStart:{type:`function`,strict:!1,signature:void 0}}},trackFeatureFlagsForEvents:{type:`enum`,values:[`vital`,`action`,`long_task`,`resource`],multiple:!0,strict:!1,default:[]}};function kc(e,t,n){return gr()?!1:e??!1}function Ac(e,t){let n=yc(e,Oc,N);if(!n)return;let r=n.allowedTracingUrls.map(Mc).filter(Boolean);if(r.length>0&&!n.service){N.error(`Service needs to be configured when tracing is enabled`);return}let i=Nt(kt.SESSION_REPLAY_RECORD_CANVAS)?n.sessionReplayCanvasRecording:void 0;return{...n,service:n.service||n.applicationId,sessionReplayCanvasRecording:i,betaEnableViewUpdates:kc(n.betaEnableViewUpdates,n.proxy,t),allowedTracingUrls:r,beforeSend:n.beforeSend?yi(n.beforeSend,`beforeSend threw an error:`):void 0,rulePsr:ds(e.traceSampleRate)?e.traceSampleRate/100:void 0,trackResourceHeaders:Fc(e),allowedGraphQlUrls:Nc(e),remoteConfigurationId:mc(e)}}function jc(e){let t=new Set;return Mi(e.allowedTracingUrls)&&e.allowedTracingUrls.forEach(e=>{Mc(e)?.propagatorTypes.forEach(e=>t.add(e))}),Array.from(t)}function Mc(e){if(c(e))return{match:e,propagatorTypes:Ec};if(o(e)&&c(e.match)&&(e.propagatorTypes===null||e.propagatorTypes===void 0||Array.isArray(e.propagatorTypes)))return{match:e.match,propagatorTypes:e.propagatorTypes||Ec}}function Nc(e){if(!e.allowedGraphQlUrls)return[];if(!Array.isArray(e.allowedGraphQlUrls))return N.warn(`allowedGraphQlUrls should be an array`),[];let t=[];return e.allowedGraphQlUrls.forEach(e=>{c(e)?t.push({match:e,trackPayload:!1,trackResponseErrors:!1}):o(e)&&c(e.match)&&t.push({match:e.match,trackPayload:!!e.trackPayload,trackResponseErrors:!!e.trackResponseErrors})}),t}var Pc=[`request`,`response`,`any`];function Fc(e){let t=e.trackResourceHeaders;if(t===void 0||t===!1)return[];if(t===!0)return Dc.map(e=>({name:e}));if(!Array.isArray(t))return N.warn(`trackResourceHeaders should be true or an array of MatchHeader`),[];if(t.length===0)return N.warn(`trackResourceHeaders is an empty array, no headers will be captured`),[];let n=[];return t.forEach((e,t)=>{if(!o(e)){N.warn(`trackResourceHeaders[${t}] should be a MatchHeader object`);return}if(e.name!==void 0&&!c(e.name)){N.warn(`trackResourceHeaders[${t}].name should be a MatchOption`);return}if(e.url!==void 0&&!c(e.url)){N.warn(`trackResourceHeaders[${t}].url should be a MatchOption`);return}if(e.extractor!==void 0&&!(e.extractor instanceof RegExp)){N.warn(`trackResourceHeaders[${t}].extractor should be a RegExp`);return}if(e.location!==void 0&&(typeof e.location!=`string`||!Pc.includes(e.location))){N.warn(`trackResourceHeaders[${t}].location should be 'request', 'response', or 'any'`);return}let{name:r,...i}=e;n.push({...i,...r===void 0?{}:{name:typeof r==`string`?r.toLowerCase():r}})}),n}function Ic(e){return Mi(e)&&e.some(e=>o(e)&&e.trackPayload)}function Lc(e){return Mi(e)&&e.some(e=>o(e)&&e.trackResponseErrors)}function Rc(e){if(e===!0)return`default_headers`;if(Array.isArray(e))return`custom`}function zc(e,t,n){let r=Ze(e);return{session_replay_sample_rate:e.sessionReplaySampleRate,start_session_replay_recording_manually:e.startSessionReplayRecordingManually,trace_sample_rate:e.traceSampleRate,trace_context_injection:e.traceContextInjection,propagate_trace_baggage:e.propagateTraceBaggage,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_urls:Mi(e.allowedTracingUrls),use_allowed_graph_ql_urls:Mi(e.allowedGraphQlUrls),use_track_graph_ql_payload:Ic(e.allowedGraphQlUrls),use_track_graph_ql_response_errors:Lc(e.allowedGraphQlUrls),selected_tracing_propagators:jc(e),default_privacy_level:e.defaultPrivacyLevel,enable_privacy_for_action_name:e.enablePrivacyForActionName,use_excluded_activity_urls:Mi(e.excludedActivityUrls),use_worker_url:!!e.workerUrl,compress_intake_requests:e.compressIntakeRequests,track_views_manually:e.trackViewsManually,track_user_interactions:e.trackUserInteractions,track_resources:e.trackResources,track_long_task:e.trackLongTasks,plugins:e.plugins?.map(e=>({name:e.name,...e.getConfigurationTelemetry?.()})),track_feature_flags_for_events:e.trackFeatureFlagsForEvents,remote_configuration_id:mc(e),remote_configuration:n&&{last_modified:n.lastModified,last_synced:n.lastSynced,first_applied:n.firstApplied,sync_id:n.syncId},profiling_sample_rate:e.profilingSampleRate,use_remote_configuration_proxy:!!e.remoteConfigurationProxy,track_resource_headers:Rc(e.trackResourceHeaders),beta_enable_view_updates:kc(e.betaEnableViewUpdates,e.proxy,t),beta_track_web_sockets:e.betaTrackWebSockets,...r}}function Bc(){return{assembleEventDefaults:Nr(),assembleTelemetry:Nr(),assembleEvent:Nr()}}function Vc(){let e=Hc();return new E(t=>{let n=new e(C(e=>t.notify(e)));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()})}function Hc(){let e,t=window;return t.Zone&&(e=Ft(t,`MutationObserver`),t.MutationObserver&&e===t.MutationObserver&&(e=Ft(new t.MutationObserver(L),`originalInstance`)?.constructor)),e||=t.MutationObserver,e}var Y=function(e){return e[e.AUTO_ACTION_COMPLETED=0]=`AUTO_ACTION_COMPLETED`,e[e.BEFORE_VIEW_CREATED=1]=`BEFORE_VIEW_CREATED`,e[e.VIEW_CREATED=2]=`VIEW_CREATED`,e[e.BEFORE_VIEW_UPDATED=3]=`BEFORE_VIEW_UPDATED`,e[e.VIEW_UPDATED=4]=`VIEW_UPDATED`,e[e.VIEW_ENDED=5]=`VIEW_ENDED`,e[e.AFTER_VIEW_ENDED=6]=`AFTER_VIEW_ENDED`,e[e.REQUEST_STARTED=7]=`REQUEST_STARTED`,e[e.REQUEST_COMPLETED=8]=`REQUEST_COMPLETED`,e[e.WEBSOCKET_COMPLETED=9]=`WEBSOCKET_COMPLETED`,e[e.SESSION_EXPIRED=10]=`SESSION_EXPIRED`,e[e.SESSION_RENEWED=11]=`SESSION_RENEWED`,e[e.PREPARE_URGENT_FLUSH=12]=`PREPARE_URGENT_FLUSH`,e[e.RAW_RUM_EVENT_COLLECTED=13]=`RAW_RUM_EVENT_COLLECTED`,e[e.RUM_EVENT_COLLECTED=14]=`RUM_EVENT_COLLECTED`,e[e.RAW_ERROR_COLLECTED=15]=`RAW_ERROR_COLLECTED`,e[e.ACTION_STARTED=16]=`ACTION_STARTED`,e[e.DURATION_VITAL_STARTED=17]=`DURATION_VITAL_STARTED`,e}({}),Uc=Ha,Wc=Ui;function Gc(e){let t=Ri({expireDelay:Wc});e.subscribe(1,e=>{t.add(n(e),e.startClocks.relative)}),e.subscribe(6,({endClocks:e})=>{t.closeActive(e.relative)}),e.subscribe(3,e=>{let n=t.find(e.startClocks.relative);n&&(e.name&&(n.name=e.name),e.context&&(n.context=e.context),n.sessionIsActive=e.sessionIsActive)}),e.subscribe(11,()=>{t.reset()});function n(e){return{service:e.service,version:e.version,context:e.context,id:e.id,name:e.name,startClocks:e.startClocks}}return{findView:(e,n)=>t.find(e,n),stop:()=>{t.stop()}}}var Kc=[[K.DOCUMENT,e=>e===`navigation`],[K.XHR,e=>e===`xmlhttprequest`],[K.FETCH,e=>e===`fetch`],[K.BEACON,e=>e===`beacon`],[K.CSS,(e,t)=>/\.css$/i.test(t)],[K.JS,(e,t)=>/\.js$/i.test(t)],[K.IMAGE,(e,t)=>[`image`,`img`,`icon`].includes(e)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)!==null],[K.FONT,(e,t)=>/\.(woff|eot|woff2|ttf)$/i.exec(t)!==null],[K.MEDIA,(e,t)=>[`audio`,`video`].includes(e)||/\.(mp3|mp4)$/i.exec(t)!==null]];function qc(e){let t=e.name;if(!re(t))return K.OTHER;let n=ie(t);for(let[t,r]of Kc)if(r(e.initiatorType,n))return t;return K.OTHER}function Jc(...e){for(let t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function Yc(e){return e.initiatorType===`xmlhttprequest`||e.initiatorType===`fetch`}function Xc(e){let{duration:t,startTime:n,responseEnd:r}=e;return e.initiatorType===`navigation`||t===0&&n<r?k(n,r):t}function Zc(e){if(!$c(e))return;let{startTime:t,fetchStart:n,workerStart:r,redirectStart:i,redirectEnd:a,domainLookupStart:o,domainLookupEnd:s,connectStart:c,secureConnectionStart:l,connectEnd:u,requestStart:d,responseStart:f,responseEnd:p}=e,m={download:tl(t,f,p),first_byte:tl(t,d,f)};return 0<r&&r<n&&(m.worker=tl(t,r,n)),n<u&&(m.connect=tl(t,c,u),c<=l&&l<=u&&(m.ssl=tl(t,l,u))),n<s&&(m.dns=tl(t,o,s)),t<a&&(m.redirect=tl(t,i,a)),m}function Qc(e){return e.duration>=0}function $c(e){let t=Jc(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),n=!el(e)||Jc(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart);return t&&n}function el(e){return e.redirectEnd>e.startTime}function tl(e,t,n){if(e<=t&&t<=n)return{duration:A(k(t,n)),start:A(k(e,t))}}function nl(e){return e.nextHopProtocol===``?void 0:e.nextHopProtocol}function rl(e){return e.deliveryType===``?`other`:e.deliveryType}function il(e){if(e.startTime<e.responseStart){let{encodedBodySize:t,decodedBodySize:n,transferSize:r}=e;return{size:n,encoded_body_size:t,decoded_body_size:n,transfer_size:r}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function al(e){return e&&(!Ee(e)||Nt(kt.TRACK_INTAKE_REQUESTS))}var ol=/data:(.+)?(;base64)?,/g,sl=24e3;function cl(e,t=sl){if(e.length<=t||!e.startsWith(`data:`))return e;let n=e.substring(0,100).match(ol);return n?`${n[0]}[...]`:e}function ll(e){return e.nodeType===Node.TEXT_NODE}function ul(e){return e.nodeType===Node.COMMENT_NODE}function dl(e){return e.nodeType===Node.ELEMENT_NODE}function fl(e){return dl(e)&&!!e.shadowRoot}function pl(e){let t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&dl(t.host)}function ml(e,t){let n=e.firstChild;for(;n;)t(n),n=n.nextSibling;fl(e)&&t(e.shadowRoot)}function hl(e){return pl(e)?e.host:e.parentNode}function gl(e){if(e.parentElement)return e.parentElement;let t=e.parentNode;return t&&pl(t)?t.host:null}var _l=function(e){return e.EVENT=`event`,e.FIRST_INPUT=`first-input`,e.LARGEST_CONTENTFUL_PAINT=`largest-contentful-paint`,e.LAYOUT_SHIFT=`layout-shift`,e.LONG_TASK=`longtask`,e.LONG_ANIMATION_FRAME=`long-animation-frame`,e.NAVIGATION=`navigation`,e.PAINT=`paint`,e.RESOURCE=`resource`,e.VISIBILITY_STATE=`visibility-state`,e}({});function vl(e){return new E(t=>{let n=e=>{let n=Cl(e);n.length>0&&t.notify(n)},r,i=!0,a=new PerformanceObserver(C(e=>{i?r=F(()=>n(e.getEntries())):n(e.getEntries())}));return a.observe(e),i=!1,bl(),()=>{a.disconnect(),I(r)}})}var yl;function bl(){!yl&&xl()&&`addEventListener`in performance&&(yl=B(performance,`resourcetimingbufferfull`,()=>{performance.clearResourceTimings()}))}function xl(){return window.performance!==void 0&&`getEntries`in performance}function Sl(e){return PerformanceObserver.supportedEntryTypes.includes(e)}function Cl(e){return e.filter(e=>!wl(e))}function wl(e){return e.entryType===`resource`&&(!al(e.name)||!Qc(e))}var Tl=`data-dd-action-name`,El=`Masked Element`,Dl=`::shadow `,Ol=[Tl,`data-testid`,`data-test`,`data-qa`,`data-cy`,`data-test-id`,`data-qa-id`,`data-testing`,`data-component`,`data-element`,`data-source-file`],kl=[Rl,Fl],Al=[Rl,Il,Ll];function jl(e,t){if(!e.isConnected)return;let n=Ml(e),r=[];for(let{rootNode:e,target:i}of n){let n=Nl(i,e,t);if(!n)return;r.push(n)}return r.join(Dl)}function Ml(e){let t=[],n=e;for(;n;){let e=n.getRootNode();if(t.push({rootNode:e,target:n}),pl(e))n=e.host;else break}return t.reverse()}function Nl(e,t,n){let r,i=e;for(;i&&i.nodeName!==`HTML`;){let e=Hl(i,t,kl,Ul,n,r);if(e)return Gl(e,r);r=Gl(Hl(i,t,Al,Wl,n,r)||Bl(i),r),i=i.parentElement}return r}function Pl(e){return/[0-9]/.test(e)}function Fl(e){if(e.id&&!Pl(e.id))return`#${CSS.escape(e.id)}`}function Il(e){if(e.tagName===`BODY`)return;let t=e.classList;for(let n=0;n<t.length;n+=1){let r=t[n];if(!Pl(r))return`${CSS.escape(e.tagName)}.${CSS.escape(r)}`}}function Ll(e){return CSS.escape(e.tagName)}function Rl(e,t){if(t){let e=n(t);if(e)return e}for(let e of Ol){let t=n(e);if(t)return t}function n(t){if(e.hasAttribute(t))return`${CSS.escape(e.tagName)}${zl(t,e.getAttribute(t))}`}}function zl(e,t){return`[${e}="${CSS.escape(t)}"]`}function Bl(e){let t=Vl(e);return`${CSS.escape(e.tagName)}:nth-of-type(${t})`}function Vl(e){let t=e.parentNode.firstElementChild,n=1;for(;t&&t!==e;)t.tagName===e.tagName&&(n+=1),t=t.nextElementSibling;return n}function Hl(e,t,n,r,i,a){for(let o of n){let n=o(e,i);if(n&&r(e,t,n,a))return n}}function Ul(e,t,n,r){return t.querySelectorAll(Gl(n,r)).length===1}function Wl(e,t,n,r){let i;if(r===void 0)i=e=>e.matches(n);else{let e=Gl(`${n}:scope`,r);i=t=>t.querySelector(e)!==null}let a=e.previousElementSibling;for(;a;){if(i(a))return!1;a=a.previousElementSibling}for(a=e.nextElementSibling;a;){if(i(a))return!1;a=a.nextElementSibling}return!0}function Gl(e,t){return t?`${e}>${t}`:e}var X={IGNORE:`ignore`,HIDDEN:`hidden`,ALLOW:Je.ALLOW,MASK:Je.MASK,MASK_USER_INPUT:Je.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:Je.MASK_UNLESS_ALLOWLISTED},Kl=`data-dd-privacy`,ql=`hidden`,Jl=`dd-privacy-`,Yl=`data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==`,Xl={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0};function Zl(e){return`[${Kl}="${e}"], .${Jl}${e}`}function Ql(e,t,n){if(n?.has(e))return n.get(e);let r=hl(e),i=r?Ql(r,t,n):t,a=$l(eu(e),i);return n&&n.set(e,a),a}function $l(e,t){switch(t){case X.HIDDEN:case X.IGNORE:return t}switch(e){case X.ALLOW:case X.MASK:case X.MASK_USER_INPUT:case X.MASK_UNLESS_ALLOWLISTED:case X.HIDDEN:case X.IGNORE:return e;default:return t}}function eu(e){if(dl(e)){if(e.tagName===`BASE`)return X.ALLOW;if(e.tagName===`INPUT`){let t=e;if(t.type===`password`||t.type===`email`||t.type===`tel`||t.type===`hidden`)return X.MASK;let n=t.getAttribute(`autocomplete`);if(n&&(n.startsWith(`cc-`)||n.endsWith(`-password`)))return X.MASK}if(e.matches(Zl(X.HIDDEN)))return X.HIDDEN;if(e.matches(Zl(X.MASK)))return X.MASK;if(e.matches(Zl(X.MASK_UNLESS_ALLOWLISTED)))return X.MASK_UNLESS_ALLOWLISTED;if(e.matches(Zl(X.MASK_USER_INPUT)))return X.MASK_USER_INPUT;if(e.matches(Zl(X.ALLOW)))return X.ALLOW;if(ou(e))return X.IGNORE}}function tu(e,t){switch(t){case X.MASK:case X.HIDDEN:case X.IGNORE:return!0;case X.MASK_UNLESS_ALLOWLISTED:return ll(e)?ru(e.parentNode)?!0:!su(e.textContent||``):ru(e);case X.MASK_USER_INPUT:return ll(e)?ru(e.parentNode):ru(e);default:return!1}}function nu(e,t,n,r,i){if(r!==X.MASK&&r!==X.MASK_UNLESS_ALLOWLISTED||t===`data-dd-privacy`||Ol.includes(t)||t===i.actionNameAttribute)return!1;switch(t){case`title`:case`alt`:case`placeholder`:case`aria-label`:case`name`:return!0}return!!(e===`A`&&t===`href`||e===`IFRAME`&&t===`srcdoc`||n&&t.startsWith(`data-`)||(e===`IMG`||e===`SOURCE`)&&(t===`src`||t===`srcset`))}function ru(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;let t=e;if(t.tagName===`INPUT`)switch(t.type){case`button`:case`color`:case`reset`:case`submit`:return!1}return!!Xl[t.tagName]}function iu(e){return e.replace(/\S/g,`x`)}function au(e,t){let n=e.parentElement?.tagName,r=e.textContent||``,i=t;return n===`SCRIPT`||i===X.HIDDEN?r=`***`:tu(e,i)&&(n===`DATALIST`||n===`SELECT`||n===`OPTGROUP`||(r=n===`OPTION`?`***`:iu(r))),n===`HEAD`&&!r.trim()?``:r}function ou(e){if(e.nodeName===`SCRIPT`)return!0;if(e.nodeName===`LINK`){let e=t(`rel`);return/preload|prefetch/i.test(e)&&t(`as`)===`script`||e===`shortcut icon`||e===`icon`}if(e.nodeName===`META`){let n=t(`name`),r=t(`rel`),i=t(`property`);return/^msapplication-tile(image|color)$/.test(n)||n===`application-name`||r===`icon`||r===`apple-touch-icon`||r===`shortcut icon`||n===`keywords`||n===`description`||/^(og|twitter|fb):/.test(i)||/^(og|twitter):/.test(n)||n===`pinterest`||n===`robots`||n===`googlebot`||n===`bingbot`||e.hasAttribute(`http-equiv`)||n===`author`||n===`generator`||n===`framework`||n===`publisher`||n===`progid`||/^article:/.test(i)||/^product:/.test(i)||n===`google-site-verification`||n===`yandex-verification`||n===`csrf-token`||n===`p:domain_verify`||n===`verify-v1`||n===`verification`||n===`shopify-checkout-api-token`}function t(t){return(e.getAttribute(t)||``).toLowerCase()}return!1}function su(e){return!e?.trim()||window.$DD_ALLOW?.has(e.toLocaleLowerCase())||!1}function cu(e,t){return su(e)?e:t||iu(e)}function lu(){let e,t=window.visualViewport;return e=t?t.pageLeft-t.offsetLeft:window.scrollX===void 0?window.pageXOffset||0:window.scrollX,Math.round(e)}function uu(){let e,t=window.visualViewport;return e=t?t.pageTop-t.offsetTop:window.scrollY===void 0?window.pageYOffset||0:window.scrollY,Math.round(e)}var du;function fu(){return du||=pu(),du}function pu(){return new E(e=>{let{throttled:t}=Rt(()=>{e.notify(mu())},200);return B(window,z.RESIZE,t,{capture:!0,passive:!0}).stop})}function mu(){let e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}var hu=function(e){return e[e.OFF=0]=`OFF`,e[e.SAMPLED=1]=`SAMPLED`,e[e.FORCED=2]=`FORCED`,e}({});function gu(e,t){return gr()?+!!hr(pr.RECORDS):Vi(e.id,zi(t.sessionSampleRate,t.sessionReplaySampleRate))?1:e.isReplayForced?2:0}function _u(){let e=new E,{stop:t}=R(window,`open`,()=>e.notify());return{observable:e,stop:t}}function vu(e,t,n,r,i){return{get:a=>{let o=n.findView(a),s=i.findUrl(a),c=t.findTrackedSession(a);if(c&&o&&s){let t=r.findActionId(a);return{application_id:e,session_id:c.id,user_action:t?{id:t}:void 0,view:{id:o.id,name:o.name,referrer:s.referrer,url:s.url}}}}}}function yu(){return xu(64)}function bu(){return xu(63)}function xu(e){let t=crypto.getRandomValues(new Uint32Array(2)),n=BigInt(t[0])+(BigInt(t[1])<<32n);return e===63&&(n&=9223372036854775807n),n}function Su(e){return e.toString(16).padStart(16,`0`)}function Cu(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function wu(e,t,n,r){return{clearTracingIfNeeded:Cu,traceFetch:i=>Tu(e,i,t,n,r,e=>{if(i.input instanceof Request&&!i.init?.headers)i.input=new Request(i.input),Object.keys(e).forEach(t=>{i.input.headers.append(t,e[t])});else{i.init=Tt(i.init);let t=[];i.init.headers instanceof Headers?i.init.headers.forEach((e,n)=>{t.push([n,e])}):Array.isArray(i.init.headers)?i.init.headers.forEach(e=>{t.push(e)}):i.init.headers&&Object.keys(i.init.headers).forEach(e=>{t.push([e,i.init.headers[e]])}),i.init.headers=t.concat(xr(e))}}),traceXhr:(i,a)=>Tu(e,i,t,n,r,e=>{try{Object.keys(e).forEach(t=>{a.setRequestHeader(t,e[t])})}catch{}})}}function Tu(e,t,n,r,i,a){let o=n.findTrackedSession();if(!o)return;let s=e.allowedTracingUrls.find(e=>gt([e.match],t.url,!0));if(!s)return;let c=Vi(o.id,zi(e.sessionSampleRate,e.traceSampleRate)),l=gr()?mr()?.getIsTraceSampled()??c:c;(l||e.traceContextInjection===Ye.ALL)&&(t.traceSampled=l,t.traceId=yu(),t.spanId=bu(),a(Eu(t.traceId,t.spanId,t.traceSampled,o.id,s.propagatorTypes,r,i,e)))}function Eu(e,t,n,r,i,a,o,s){let c={};if(i.forEach(r=>{switch(r){case`datadog`:Object.assign(c,{"x-datadog-origin":`rum`,"x-datadog-parent-id":t.toString(),"x-datadog-sampling-priority":n?`1`:`0`,"x-datadog-trace-id":e.toString()});break;case`tracecontext`:Object.assign(c,{traceparent:`00-0000000000000000${Su(e)}-${Su(t)}-0${n?`1`:`0`}`,tracestate:`dd=s:${n?`1`:`0`};o:rum`});break;case`b3`:Object.assign(c,{b3:`${Su(e)}-${Su(t)}-${n?`1`:`0`}`});break;case`b3multi`:Object.assign(c,{"X-B3-TraceId":Su(e),"X-B3-SpanId":Su(t),"X-B3-Sampled":n?`1`:`0`})}}),s.propagateTraceBaggage){let e={"session.id":r},t=a.getContext().id;typeof t==`string`&&(e[`user.id`]=t);let n=o.getContext().id;typeof n==`string`&&(e[`account.id`]=n);let i=Object.entries(e).map(([e,t])=>`${e}=${encodeURIComponent(t)}`).join(`,`);i&&(c.baggage=i)}return c}var Du=32*yn;function Ou(e,t){let n=ju(e,t.trackPayload);if(n){if(t.trackResponseErrors&&e.responseBody){let t=ku(e.responseBody);t&&(n.error_count=t.length,n.errors=t)}return n}}function ku(e){let t=wt(e);if(!t||typeof t!=`object`)return;let n=t;if(Mi(n.errors))return n.errors.map(e=>({message:e.message,path:e.path,locations:e.locations,code:e.extensions?.code}))}function Au(e,t){return t.allowedGraphQlUrls.find(t=>gt([t.match],e))}function ju(e,t=!1){let n;if(e.method===`POST`?n=Mu(e.requestBody):e.method===`GET`&&(n=Nu(e.url)),n)return Pu(n,t)}function Mu(e){if(!e||typeof e!=`string`)return;let t=wt(e);if(t)return{query:t.query,operationName:t.operationName,variables:t.variables?JSON.stringify(t.variables):void 0,operationType:t.operationType}}function Nu(e){let t=ae(e).searchParams,n=t.get(`variables`),r=n&&wt(n)!==void 0?n:void 0;return{query:t.get(`query`)||void 0,operationName:t.get(`operationName`)||void 0,variables:r,operationType:t.get(`operationType`)||void 0}}function Pu(e,t){let n,r,i;if(e.query){let i=e.query.trim();n=Fu(i),t&&(r=nt(i,Du,`...`))}if(!n){let t=e.operationType;(t===`query`||t===`mutation`||t===`subscription`)&&(n=t)}return e.variables&&(i=e.variables),{operationType:n,operationName:e.operationName,variables:i,payload:r}}function Fu(e){return e.match(/^\s*(query|mutation|subscription)\b/i)?.[1]}var Iu=1;function Lu(e,t,n,r,i,a){let o=wu(t,n,r,i);Ru(e,o,a),zu(e,t,o,a)}function Ru(e,t,n){let r=[];return r.push($a().subscribe(e=>{e.state===`start`&&al(e.url)&&(t.traceXhr(e,e.xhr),Bu(e))})),r.push(n.subscribe(({data:n,type:r})=>{if(r!==ss.XHR)return;let i=n;if(al(i.url))switch(i.state){case`start`:Bu(i),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case`complete`:t.clearTracingIfNeeded(i),e.notify(8,{...i,type:as.XHR,isAbortedOnStart:!1})}})),{stop:()=>r.forEach(e=>e.unsubscribe())}}function zu(e,t,n,r){let i=[];return i.push(co({responseBodyAction:e=>Au(e.url,t)?.trackResponseErrors?ao.COLLECT:ao.IGNORE}).subscribe(e=>{e.state===`start`&&al(e.url)&&(n.traceFetch(e),Bu(e))})),i.push(r.subscribe(({data:t,type:r})=>{if(r!==ss.FETCH)return;let i=t;if(al(i.url))switch(i.state){case`start`:Bu(i),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case`resolve`:n.clearTracingIfNeeded(i),e.notify(8,{...i,duration:k(i.startClocks.timeStamp,O()),type:as.FETCH,requestBody:i.init?.body})}})),{stop:()=>i.forEach(e=>e.unsubscribe())}}function Bu(e){e.requestIndex||=Iu++}var Vu=`websocket-connecting`,Hu=`websocket-closed`;function Uu(e,t,n){let r=Wu(e,ho(),t,n),i=e.subscribe(10,({endClocks:e})=>{r.flushOpenConnections(`session_end`,e)});return{stop:()=>{i.unsubscribe(),r.flushOpenConnections(`session_end`),r.stop()}}}function Wu(e,t,n,r){let i=new Map;function a(t,i,a){let o=qu(t,i,a,n);e.notify(9,o),r({id:M(),name:Hu,type:Ls.DURATION,startClocks:o.endClocks,duration:0,context:V({url:o.url,connection_id:o.connectionId})})}let o=t.subscribe(e=>{switch(e.state){case`connecting`:{let t=M(),a=n.findView(e.startClocks.relative)?.id,o=Gu(e.url),s={webSocket:e.instance,connectionId:t,url:o,startClocks:e.startClocks,startViewId:a,messagesIn:{count:0,size:0},messagesOut:{count:0,size:0},longestInboundSilence:0,bufferedAmountMax:0};i.set(e.instance,s),r({id:M(),name:Vu,type:Ls.DURATION,startClocks:e.startClocks,duration:0,context:V({url:o,connection_id:t})});return}case`open`:{let t=i.get(e.instance);if(!t)return;t.openClocks=e.openClocks,t.protocol=e.protocol,t.setupDuration=k(t.startClocks.timeStamp,e.openClocks.timeStamp);return}case`message-in`:{let t=i.get(e.instance);if(!t)return;t.messagesIn.count+=1,t.messagesIn.size+=e.size,Ku(t,e.at,`in`);return}case`message-out`:{let t=i.get(e.instance);if(!t)return;e.bufferedAmountPreSend>t.bufferedAmountMax&&(t.bufferedAmountMax=e.bufferedAmountPreSend),t.messagesOut.count+=1,t.messagesOut.size+=e.size,Ku(t,e.at,`out`);return}case`closed`:{let t=i.get(e.instance);if(!t)return;i.delete(e.instance),a(t,e,`close_event`);return}}});return{flushOpenConnections:(e,t=j())=>{i.forEach(n=>{a(n,{at:t},e)}),i.clear()},stop:()=>{o.unsubscribe(),i.clear()}}}function Gu(e){let t=ae(e);return t.search=``,t.href}function Ku(e,t,n){if(e.openClocks===void 0)return;let r=k(e.openClocks.timeStamp,t.timeStamp);if(n===`in`&&e.firstMessageInOffset===void 0?e.firstMessageInOffset=r:n===`out`&&e.firstMessageOutOffset===void 0&&(e.firstMessageOutOffset=r),n===`in`){if(e.lastMessageInAt!==void 0){let n=k(e.lastMessageInAt,t.timeStamp);n>e.longestInboundSilence&&(e.longestInboundSilence=n)}e.lastMessageInAt=t.timeStamp}}function qu(e,t,n,r){let i=t.at,a=n===`session_end`?r.findView(i.relative,{returnInactive:!0})?.id:r.findView(i.relative)?.id,o=e.lastMessageInAt===void 0?void 0:k(e.lastMessageInAt,i.timeStamp),{openClocks:s,...c}=e;return{...c,endClocks:i,endViewId:a,inboundIdleDurationBeforeClose:o,trackingEndReason:n,handshakeSucceeded:s!==void 0,setupDuration:e.setupDuration??k(e.startClocks.timeStamp,i.timeStamp),closeCode:t.code,closeReason:t.reason,wasClean:t.wasClean}}function Ju(e){return ds(e)&&e<0?void 0:e}function Yu(e,t,n,r,i,a){let o=P(Xu)(e,t,n,r),s,c=!1,l=F(C(()=>p({hadActivity:!1})),100),u=a===void 0?void 0:F(C(()=>p({hadActivity:!0,end:O()})),a),d=o.subscribe(({isBusy:e})=>{I(l),I(s);let t=O();e||(s=F(C(()=>p({hadActivity:!0,end:t})),100))}),f=()=>{c=!0,I(l),I(s),I(u),d.unsubscribe()};function p(e){c||(f(),i(e))}return{stop:f}}function Xu(e,t,n,r){return new E(i=>{let a=[],o,s=0;return a.push(t.subscribe(e=>{e.every(Qu)||c()}),n.subscribe(c),vl({type:`resource`}).subscribe(e=>{e.some(e=>!Zu(r,e.name))&&c()}),e.subscribe(7,e=>{Zu(r,e.url)||(o===void 0&&(o=e.requestIndex),s+=1,c())}),e.subscribe(8,e=>{Zu(r,e.url)||o===void 0||e.requestIndex<o||(--s,c())})),()=>{a.forEach(e=>e.unsubscribe())};function c(){i.notify({isBusy:s>0})}})}function Zu(e,t){return gt(e.excludedActivityUrls,t)}function Qu(e){let t=e.type===`characterData`?e.target.parentElement:e.target;return!!(t&&dl(t)&&t.matches(`[data-dd-excluded-activity-mutations], [data-dd-excluded-activity-mutations] *`))}function $u({lifeCycle:e,isChildEvent:t,onChange:n=L}){let r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},i=e.subscribe(14,e=>{if(e.type!==`view`&&e.type!==`vital`&&t(e))switch(e.type){case J.ERROR:r.errorCount+=1,n();break;case J.ACTION:r.actionCount+=1,e.action.frustration&&(r.frustrationCount+=e.action.frustration.type.length),n();break;case J.LONG_TASK:r.longTaskCount+=1,n();break;case J.RESOURCE:e._dd?.discarded||(r.resourceCount+=1,n())}});return{stop:()=>{i.unsubscribe()},eventCounts:r}}var ed=5*De;function td(e){let t=Ri({expireDelay:ed}),n=new Map;function r(e){n.delete(e.key),e.eventCounts?.stop()}function i(){n.forEach(e=>{r(e)}),t.reset()}let a=e.subscribe(11,i);function o(i,a,o,s){let c=M(),l=t.add(c,a.relative),u=n.get(i);u&&r(u);let d={id:c,key:i,startClocks:a,data:o,historyEntry:l,eventCounts:s?.isChildEvent?$u({lifeCycle:e,isChildEvent:s.isChildEvent(c)}):void 0};return n.set(i,d),d}function s(e,t,i){let a=n.get(e);if(!a)return;let o=i?f(a.data,i):a.data;a.historyEntry.close(t.relative);let s=k(a.startClocks.timeStamp,t.timeStamp),c=a.eventCounts?.eventCounts;return r(a),{...o,id:a.id,startClocks:a.startClocks,duration:s,counts:c}}function c(e){let t=n.get(e);if(!t)return;let i=t.eventCounts?.eventCounts;return r(t),t.historyEntry.remove(),{...t.data,id:t.id,startClocks:t.startClocks,counts:i}}function l(e){return t.findAll(e)}function u(e){return n.get(e)?.eventCounts?.eventCounts}function d(){a.unsubscribe(),i(),t.stop()}return{start:o,stop:s,discard:c,getCounts:u,findId:l,stopAll:d}}var nd=[`HTML`,`BODY`],rd=2*yn,id=Ol.concat([`role`,`type`,`disabled`,`readonly`,`tabindex`,`draggable`,`target`,`rel`,`download`,`method`,`action`,`enctype`,`autocomplete`]);function ad(e,t){let n=e.filter(e=>e instanceof Element&&!nd.includes(e.tagName));if(n.length===0)return``;let r=t?[t].concat(id):id,i=``;for(let e of n){let t=od(e,r);if(i+=t,i.length>=rd)return nt(i,rd)}return i}function od(e,t){let n=Ll(e),r=Fl(e),i=sd(e),a=ld(e,t),o=cd(e);return`${n}${r||``}${a}${i}${o};`}function sd(e){return Array.from(e.classList).filter(e=>!Pl(e)).sort().map(e=>`.${CSS.escape(e)}`).join(``)}function cd(e){let t=Array.from(e.parentNode.children);if(t.length<=1)return``;let n=t.filter(t=>t.tagName===e.tagName),r=t.indexOf(e),i=Vl(e);return`:nth-child(${r+1})${n.length>1?`:nth-of-type(${i})`:``}`}function ld(e,t){let n=[],r=Array.from(e.attributes);for(let e of r)t.includes(e.name)&&n.push(zl(e.name,e.value));return n.sort().join(``)}var ud=`data-dd-ignore-frustration`,dd=`all`,fd=`rage-click`,pd=`dead-click`,md=`error-click`;function hd(e,t){return(e&t)!==0}function gd(e){let t=0,n=e;for(;n;){let e=n.getAttribute(ud);if(e!==null){let n=e.split(/\s+/);if(e.trim()===``||n.includes(dd))return 7;n.includes(fd)&&(t|=1),n.includes(pd)&&(t|=2),n.includes(md)&&(t|=4)}if(t===7)break;n=gl(n)}return t}var _d=D;function vd(e,t){let n=[],r=0,i;a(e);function a(e){e.stopObservable.subscribe(o),n.push(e),I(i),i=F(s,_d)}function o(){r===1&&n.every(e=>e.isStopped())&&(r=2,t(n))}function s(){I(i),r===0&&(r=1,o())}return{tryAppend:e=>r===0?n.length>0&&!yd(n[n.length-1],e)?(s(),!1):(a(e),!0):!1,stop:()=>{s()}}}function yd(e,t){return hd(e.ignore,1)===hd(t.ignore,1)&&e.event.target===t.event.target&&bd(e.event,t.event)<=100&&e.event.timeStamp-t.event.timeStamp<=_d}function bd(e,t){return Math.sqrt((e.clientX-t.clientX)**2+(e.clientY-t.clientY)**2)}function xd(e,t,n=X.ALLOW){let r=new Map,{actionNameAttribute:i}=t,a=Sd(e,`data-dd-action-name`)||i&&Sd(e,i);return a?{name:a,nameSource:`custom_attribute`}:n===X.MASK?{name:El,nameSource:`mask_placeholder`}:Dd(e,wd,t,r)||Dd(e,Td,t,r)||{name:``,nameSource:`blank`}}function Sd(e,t){let n=Cd(e,`[${t}]`);if(n)return kd(Od(n.getAttribute(t).trim()))}function Cd(e,t){let n=e;for(;n;){if(n.matches(t))return n;n=gl(n)}return null}var wd=[(e,t,n)=>{if(`labels`in e&&e.labels&&e.labels.length>0)return Md(e.labels[0],t,n)},e=>{if(e.nodeName===`INPUT`){let t=e,n=t.getAttribute(`type`);if(n===`button`||n===`submit`||n===`reset`)return{name:t.value,nameSource:`text_content`}}},(e,t,n)=>{if(e.nodeName===`BUTTON`||e.nodeName===`LABEL`||e.getAttribute(`role`)===`button`)return Md(e,t,n)},(e,t,n)=>jd(e,`aria-label`,t,n),(e,t,n)=>{let r=e.getAttribute(`aria-labelledby`);if(r)return{name:r.split(/\s+/).map(t=>Ad(e,t)).filter(e=>!!e).map(e=>Nd(e,t,n)).join(` `),nameSource:`text_content`}},(e,t,n)=>jd(e,`alt`,t,n),(e,t,n)=>jd(e,`name`,t,n),(e,t,n)=>jd(e,`title`,t,n),(e,t,n)=>jd(e,`placeholder`,t,n),(e,t,n)=>{if(`options`in e&&e.options.length>0)return Md(e.options[0],t,n)}],Td=[(e,t,n)=>Md(e,t,n)],Ed=10;function Dd(e,t,n,r){let i=e,a=0;for(;a<=Ed&&i&&i.nodeName!==`BODY`&&i.nodeName!==`HTML`&&i.nodeName!==`HEAD`;){for(let e of t){let t=e(i,n,r);if(t){let{name:e,nameSource:n}=t,r=e?.trim();if(r)return{name:kd(Od(r)),nameSource:n}}}if(i.nodeName===`FORM`)break;i=gl(i),a+=1}}function Od(e){return e.replace(/\s+/g,` `)}function kd(e){return e.length>100?`${nt(e,100)} [...]`:e}function Ad(e,t){let n=e.getRootNode();if(n instanceof ShadowRoot){let e=n.getElementById(t);if(e)return e}return e.ownerDocument?e.ownerDocument.getElementById(t):null}function jd(e,t,n,r){let{enablePrivacyForActionName:i,defaultPrivacyLevel:a}=n,o=e.getAttribute(t);if(o&&i){let i=Ql(e,a,r);nu(e.tagName,t,o,i,n)&&(o=cu(o,El))}else o||=``;return{name:o,nameSource:`standard_attribute`}}function Md(e,t,n){return{name:Nd(e,t,n)||``,nameSource:`text_content`}}function Nd(e,t,n){if(e.isContentEditable)return;let{enablePrivacyForActionName:r,actionNameAttribute:i,defaultPrivacyLevel:a}=t,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,c),s=``;for(;o.nextNode();){let e=o.currentNode;if(dl(e)){(e.nodeName===`BR`||e.nodeName===`P`||[`block`,`flex`,`grid`,`list-item`,`table`,`table-caption`].includes(getComputedStyle(e).display))&&(s+=` `);continue}s+=e.textContent||``}return s.replace(/\s+/g,` `).trim();function c(e){let t=Ql(e,a,n);if(r&&t&&tu(e,t))return NodeFilter.FILTER_REJECT;if(dl(e)){if(e.hasAttribute(`data-dd-action-name`)||i&&e.hasAttribute(i))return NodeFilter.FILTER_REJECT;let t=getComputedStyle(e);if(t.visibility!==`visible`||t.display===`none`||t.contentVisibility&&t.contentVisibility!==`visible`)return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT}}function Pd({onPointerDown:e,onPointerUp:t}){let n,r={selection:!1,input:!1,scroll:!1},i,a=[B(window,z.POINTER_DOWN,t=>{Id(t)&&(n=Fd(),r={selection:!1,input:!1,scroll:!1},i=e(t))},{capture:!0}),B(window,z.SELECTION_CHANGE,()=>{(!n||!Fd())&&(r.selection=!0)},{capture:!0}),B(window,z.SCROLL,()=>{r.scroll=!0},{capture:!0,passive:!0}),B(window,z.POINTER_UP,e=>{if(Id(e)&&i){let n=r;t(i,e,()=>n),i=void 0}},{capture:!0}),B(window,z.INPUT,()=>{r.input=!0},{capture:!0})];return{stop:()=>{a.forEach(e=>e.stop())}}}function Fd(){let e=window.getSelection();return!e||e.isCollapsed}function Id(e){return e.target instanceof Element&&e.isPrimary!==!1}var Ld=3;function Rd(e,t){if(zd(e))return t.addFrustration(Is.RAGE_CLICK),e.some(Vd)&&t.addFrustration(Is.DEAD_CLICK),t.hasError&&!hd(t.ignore,4)&&t.addFrustration(Is.ERROR_CLICK),{isRage:!0};let n=e.some(e=>e.getUserActivity().selection);return e.forEach(e=>{e.hasError&&!hd(e.ignore,4)&&e.addFrustration(Is.ERROR_CLICK),Vd(e)&&!n&&e.addFrustration(Is.DEAD_CLICK)}),{isRage:!1}}function zd(e){if(e.some(e=>hd(e.ignore,1)||e.getUserActivity().selection||e.getUserActivity().scroll))return!1;for(let t=0;t<e.length-2;t+=1)if(e[t+Ld-1].event.timeStamp-e[t].event.timeStamp<=1e3)return!0;return!1}var Bd=`input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *`;function Vd(e){if(hd(e.ignore,2)||e.hasPageActivity||e.getUserActivity().input||e.getUserActivity().scroll)return!1;let t=e.event.target;return t.tagName===`LABEL`&&t.hasAttribute(`for`)&&(t=document.getElementById(t.getAttribute(`for`))),!t?.matches(Bd)}var Hd=10*D,Ud=new Map;function Wd(e){let t=Ud.get(e);return Ud.delete(e),t}function Gd(e,t){Ud.set(e,t),Ud.forEach((e,t)=>{k(t,Me())>Hd&&Ud.delete(t)})}function Kd(e){return t=>t.action?.id?.includes(e)??!1}function qd(e,t,n,r){let i=td(e),a=new E,o;e.subscribe(5,l),e.subscribe(12,l);let{stop:s}=Pd({onPointerDown:i=>Jd(r,e,t,i,n),onPointerUp:({clickActionBase:o,ignore:s,hadActivityOnPointerDown:l},u,d)=>{Yd(r,e,t,n,i,a,c,o,s,u,d,l)}});return{stop:()=>{l(),a.notify(),s(),i.stopAll()},findActionId:i.findId};function c(e){if(!o?.tryAppend(e)){let t=e.clone(),n=vd(e,e=>{$d(e,t),o===n&&(o=void 0)});o=n}}function l(){o&&o.stop()}}function Jd(e,t,n,r,i){let a;if(a=e.enablePrivacyForActionName?Ql(Zd(r),e.defaultPrivacyLevel):X.ALLOW,a===X.HIDDEN)return;let o=Xd(r,a,e),s=!1;return Yu(t,n,i,e,e=>{s=e.hadActivity},100),{clickActionBase:o,ignore:gd(Zd(r)),hadActivityOnPointerDown:()=>s}}function Yd(e,t,n,r,i,a,o,s,c,l,u,d){let f=Qd(t,i,u,s,c,l);o(f);let p=s?.target?.selector;p&&Gd(l.timeStamp,p);let{stop:m}=Yu(t,n,r,e,e=>{e.hadActivity&&e.end<f.startClocks.timeStamp?f.discard():e.hadActivity?f.stop(e.end):d()?f.stop(f.startClocks.timeStamp):f.stop()},Hd),h=t.subscribe(5,({endClocks:e})=>{f.stop(e.timeStamp)}),g=t.subscribe(12,()=>{f.stop(O())}),_=a.subscribe(()=>{f.stop()});f.stopObservable.subscribe(()=>{g.unsubscribe(),h.unsubscribe(),m(),_.unsubscribe()})}function Xd(e,t,n){let r=Zd(e),i=r.getBoundingClientRect(),a=jl(r,n.actionNameAttribute),o=ad(e.composedPath(),n.actionNameAttribute);a&&Gd(e.timeStamp,a);let{name:s,nameSource:c}=xd(r,n,t);return{type:Fs.CLICK,target:{width:Math.round(i.width),height:Math.round(i.height),selector:a,composedPathSelector:o||void 0},position:{x:Math.round(e.clientX-i.left),y:Math.round(e.clientY-i.top)},name:s,nameSource:c}}function Zd(e){if(e.composed&&fl(e.target)&&typeof e.composedPath==`function`){let t=e.composedPath();if(t.length>0&&t[0]instanceof Element)return t[0]}return e.target}function Qd(e,t,n,r,i,a){let o=M(),s=Pe(a.timeStamp),c=t.start(o,s,r,{isChildEvent:Kd});e.notify(16,c);let l=0,u,d=[],f=new E;function p(e){l===0&&(l=1,u=e?t.stop(o,Fe(e)):t.discard(o),f.notify())}return{event:a,ignore:i,stop:p,stopObservable:f,get hasError(){let e=u?.counts??t.getCounts(o);return e?e.errorCount>0:!1},get hasPageActivity(){return u&&`duration`in u},getUserActivity:n,addFrustration:e=>{d.push(e)},get startClocks(){return s},isStopped:()=>l===1||l===2,clone:()=>Qd(e,t,n,r,i,a),validate:t=>{if(p(),l!==1||!u)return;let n={frustrationTypes:d,events:t??[a],event:a,...u,counts:u.counts};e.notify(0,n),l=2},discard:()=>{p(),l=2}}}function $d(e,t){let{isRage:n}=Rd(e,t);n?(e.forEach(e=>e.discard()),t.stop(O()),t.validate(e.map(e=>e.event))):(t.discard(),e.forEach(e=>e.validate()))}function ef(e,t){let n=td(e);function r(t,r={},i=j()){let a=r.actionKey??t,o=n.start(a,i,{name:t,...r},{isChildEvent:Kd});e.notify(16,o)}function i(e,r={},i=j()){let a=r.actionKey??e,o=n.stop(a,i,r);if(!o)return;let s=[];o.counts&&o.counts.errorCount>0&&s.push(Is.ERROR_CLICK),t({...o,type:o.type||Fs.CUSTOM,frustrationTypes:s})}function a(e){t({id:M(),frustrationTypes:[],...e})}return{addAction:a,startAction:r,stopAction:i,findActionId:n.findId,stop:n.stopAll}}function tf(e,t,n,r,i){let{unsubscribe:a}=e.subscribe(0,t=>{e.notify(13,nf(t))}),o=L,s;i.trackUserInteractions&&(s=qd(e,n,r,i));let c=ef(e,t=>{e.notify(13,nf(t))}),l={findActionId:e=>{let t=c.findActionId(e),n=s?.findActionId(e)??[];return t.concat(n)}};return t.assembleEventDefaults.register(({startTime:e,eventType:t})=>{if(t!==J.ERROR&&t!==J.RESOURCE&&t!==J.LONG_TASK)return Fr;let n=t===J.LONG_TASK?je(e,1):e,r=l.findActionId(n);return r.length?{type:t,action:{id:r}}:Fr}),t.assembleTelemetry.register(({startTime:e})=>({action:{id:l.findActionId(e)}})),{addAction:c.addAction,startAction:c.startAction,stopAction:c.stopAction,actionContexts:l,stop:()=>{a(),o(),c.stop(),s?.stop()}}}function nf(e){let t=rf(e),n=Ju(A(e.duration));return{rawRumEvent:{type:J.ACTION,date:e.startClocks.timeStamp,action:{id:e.id,target:{name:e.name},type:e.type,...n!==void 0&&{loading_time:n},...e.counts&&{error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},frustration:{type:e.frustrationTypes}},...t?{_dd:{action:{target:{selector:e.target?.selector||void 0,width:e.target?.width||void 0,height:e.target?.height||void 0,composed_path_selector:e.target?.composedPathSelector},position:e.position,name_source:e.nameSource}}}:{context:e.context}},duration:e.duration,startClocks:e.startClocks,domainContext:t?{events:e.events}:{handlingStack:e.handlingStack}}}function rf(e){return`events`in e}function af(e){let t=wi([Ci.cspViolation,Ci.intervention]).subscribe(t=>e.notify(t));return{stop:()=>{t.unsubscribe()}}}function of(e,t){let n=new E;return t.subscribe(({data:e,type:t})=>{t===ss.RUNTIME_ERROR?n.notify(e):t===ss.CONSOLE&&e.api===g.error&&n.notify(e.error)}),af(n),n.subscribe(t=>e.notify(15,{error:t})),sf(e)}function sf(e){return e.subscribe(15,({error:t})=>{e.notify(13,cf(t))}),{addError:({error:t,handlingStack:n,componentStack:r,startClocks:i,context:a})=>{let o=fi({originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:Un.PROVIDED,source:Hn.CUSTOM,handling:Wn.HANDLED});o.context=f(o.context,a),e.notify(15,{error:o})}}}function cf(e){let t={date:e.startClocks.timeStamp,error:{id:M(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,component_stack:e.componentStack,type:e.type,handling:e.handling,causes:e.causes,source_type:`browser`,fingerprint:e.fingerprint,csp:e.csp},_dd:{debug_ids:e.debugIds},type:J.ERROR,context:e.context},n={error:e.originalError,handlingStack:e.handlingStack};return{rawRumEvent:t,startClocks:e.startClocks,domainContext:n}}function lf(e){return!(e.loadEventEnd>0&&e.domComplete<=0)}function uf(){if(Sl(`navigation`)){let e=performance.getEntriesByType(`navigation`)[0];if(e&&lf(e))return e}let e=df(),t={entryType:`navigation`,initiatorType:`navigation`,name:window.location.href,startTime:0,duration:e.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...t,toJSON:void 0}),...e};return t}function df(){let e={},t=performance.timing;for(let n in t)if(ds(t[n])){let r=n,i=t[r];e[r]=i===0?0:Ie(i)}return e}function ff(e){return e.responseStart>=0&&e.responseStart<=Me()?e.responseStart:void 0}function pf(){if(Sl(`resource`))return performance.getEntriesByType(`resource`)}function mf(e,t){let n=pf();if(n)return yr(n,n=>n.name===e&&n.startTime<=t)}var hf=2*De;function gf(e){let t=_f(e)||vf(e);if(!(!t||t.traceTime<=Ve()-hf))return t.traceId}function _f(e){let t=e.querySelector(`meta[name=dd-trace-id]`),n=e.querySelector(`meta[name=dd-trace-time]`);return yf(t?.content,n?.content)}function vf(e){let t=bf(e);if(t)return yf($e(t,`trace-id`),$e(t,`trace-time`))}function yf(e,t){let n=t&&Number(t);if(e&&n)return{traceId:e,traceTime:n}}function bf(e){for(let t=0;t<e.childNodes.length;t+=1){let n=xf(e.childNodes[t]);if(n)return n}if(e.body)for(let t=e.body.childNodes.length-1;t>=0;--t){let n=e.body.childNodes[t],r=xf(n);if(r)return r;if(!ll(n))break}}function xf(e){if(e&&ul(e)){let t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function Sf(e){let t=new Set,n=e.subscribe(8,e=>{t.add(e),t.size>1e3&&t.delete(t.values().next().value)});return{getMatchingRequest(e){let n=1/0,r;for(let i of t){let t=e.startTime-i.startClocks.relative;0<=t&&t<n&&i.url===e.name&&(n=Math.abs(t),r=i)}return r&&t.delete(r),r},stop(){n.unsubscribe()}}}function Cf(e,t){function n(e,n={},r=j()){let i=n.resourceKey??e;t.start(i,r,{url:e,...n})}function r(n,r={},i=j()){let a=r.resourceKey??n,o=t.stop(a,i,{context:r.context,type:r.type});if(!o)return;let s=k(o.startClocks.relative,i.relative),c={date:o.startClocks.timeStamp,type:J.RESOURCE,resource:{id:o.id,type:o.type||K.OTHER,url:cl(o.url),duration:A(s),method:o.method,status_code:r.statusCode,size:r.size},_dd:{},context:o.context};e.notify(13,{rawRumEvent:c,startClocks:o.startClocks,duration:s,domainContext:{isManual:!0}})}return{startResource:n,stopResource:r}}function wf(e,t){let n=P(So)(),r=Sf(e);e.subscribe(9,n=>{let r=Tf(n,t);r&&e.notify(13,r)});let i=vl({type:`resource`,buffered:!0}).subscribe(n=>{for(let i of n)Yc(i)?F(()=>{let n=Ef(i,r.getMatchingRequest(i),t);n&&e.notify(13,n)},50):o(()=>Ef(i,void 0,t))}),{stop:a}=Ya(`interactive`,()=>{o(()=>Ef(uf(),void 0,t))});function o(t){n.push(()=>{let n=t();n&&e.notify(13,n)})}let s=td(e),c=Cf(e,s);return{startResource:c.startResource,stopResource:c.stopResource,stop:()=>{a(),n.stop(),i.unsubscribe(),s.stopAll()}}}function Tf(e,t){let n=k(e.startClocks.timeStamp,e.endClocks.timeStamp),r={date:e.startClocks.timeStamp,type:J.RESOURCE,resource:{id:M(),type:K.WEBSOCKET,url:e.url,duration:A(n),websocket:{connection_id:e.connectionId,handshake_succeeded:e.handshakeSucceeded,start_time:e.startClocks.timeStamp,end_time:e.endClocks.timeStamp,start_view_id:e.startViewId,end_view_id:e.endViewId,tracking_end_reason:e.trackingEndReason,close_code:e.closeCode,close_reason:e.closeReason,was_clean:e.wasClean,messages_in:e.messagesIn,messages_out:e.messagesOut,time_to_first_message_in:A(e.firstMessageInOffset),time_to_first_message_out:A(e.firstMessageOutOffset),last_message_in_at:e.lastMessageInAt,longest_inbound_silence:A(e.longestInboundSilence),inbound_idle_duration_before_close:A(e.inboundIdleDurationBeforeClose),buffered_amount_max:e.bufferedAmountMax,protocol:e.protocol,setup_duration:A(e.setupDuration)}},_dd:{discarded:!t.trackResources}};return{startClocks:e.startClocks,duration:n,rawRumEvent:r,domainContext:{isWebSocket:!0,isManual:!1,webSocket:e.webSocket}}}function Ef(e,t,n){let r=t?Af(t,n):jf(e,n);if(!n.trackResources&&!r)return;let i=Pe(e.startTime),a=Xc(e),o=Nf(t,n);return{startClocks:i,duration:a,rawRumEvent:f({date:i.timeStamp,resource:{id:M(),duration:A(a),type:qc(e),method:t?.method,status_code:t?t.status:Mf(e.responseStatus),url:t?cl(t.url):e.name,protocol:nl(e),delivery_type:rl(e),graphql:t&&Df(t,n),render_blocking_status:e.renderBlockingStatus,...il(e),...Zc(e)},type:J.RESOURCE,_dd:{discarded:!n.trackResources}},r,Of(e),o),domainContext:kf(e,t)}}function Df(e,t){let n=Au(e.url,t);if(n)return Ou(e,n)}function Of(e){let t=e.contentType;if(t)return{resource:{response:{headers:{"content-type":t}}}}}function kf(e,t){return{performanceEntry:e,isManual:!1,isAborted:t?t.isAborted:!1,isWebSocket:!1,handlingStack:t?.handlingStack,requestInit:t?.init,requestInput:t?.input,response:t?.response,error:t?.error,xhr:t?.xhr}}function Af(e,t){if(e.traceSampled&&e.traceId&&e.spanId)return{_dd:{span_id:e.spanId.toString(),trace_id:e.traceId.toString(),rule_psr:t.rulePsr}}}function jf(e,t){if(e.initiatorType!==`navigation`)return;let n=P(gf)(document);if(n)return{_dd:{trace_id:n,span_id:bu().toString(),rule_psr:t.rulePsr}}}function Mf(e){return e===0?void 0:e}function Nf(e,t){let n=t.trackResourceHeaders;if(n.length===0||!e)return;let r=n.filter(t=>t.url===void 0||gt([t.url],e.url,!0));if(r.length===0)return;let i=r.filter(e=>e.location===void 0||e.location===`any`||e.location===`response`),a=r.filter(e=>e.location===void 0||e.location===`any`||e.location===`request`),o=i.length>0?Pf(e,i):void 0,s=a.length>0?Ff(e,a):void 0;if(o||s)return{resource:{request:s?{headers:s}:void 0,response:o?{headers:o}:void 0}}}function Pf(e,t){if(e.type===as.FETCH&&e.response)return Bf(e.response.headers,t);if(e.type===as.XHR&&e.xhr){let n=e.xhr.getAllResponseHeaders();if(n)try{return Bf(new Headers(Vf(n)),t)}catch{}}}function Ff(e,t){if(e.type!==as.FETCH)return;let n;return e.init?.headers?n=new Headers(e.init.headers):e.input instanceof Request&&(n=e.input.headers),n?Bf(n,t):void 0}var If=/(token|cookie|secret|authorization|(api|secret|access|app).?key|(client|connecting|real).?ip|forwarded)/,Lf=100,Rf=128,zf=e=>Dc.includes(e);function Bf(e,t){let n={},r=0,i=!1;return e.forEach((e,a)=>{if(r>=Lf){i||=(N.warn(`Maximum number of headers (${Lf}) has been reached. Further headers are dropped.`),!0);return}let o=a.toLowerCase();if(If.test(o))return;let s=t.find(e=>gt([e.name??zf],o));if(!s)return;let{extractor:c}=s,l=c?Rs(e,c):e;l!==void 0&&(l.length>Rf&&N.warn(`Header "${o}" value was truncated from ${l.length} to ${Rf} characters.`),n[o]=nt(l,Rf),r++)}),r>0?n:void 0}function Vf(e){let t=[],n=e.trim().split(/\r\n/);for(let e of n){let n=e.indexOf(`:`);n>0&&t.push([e.substring(0,n).trim(),e.substring(n+1).trim()])}return t}function Hf(e,t,n){let{stop:r,eventCounts:i}=$u({lifeCycle:e,isChildEvent:e=>e.view.id===t,onChange:n});return{stop:r,eventCounts:i}}var Uf=10*De;function Wf(e,t){return{stop:vl({type:`paint`,buffered:!0}).subscribe(n=>{let r=n.find(t=>t.name===`first-contentful-paint`&&t.startTime<e.timeStamp&&t.startTime<Uf);r&&t(r.startTime)}).unsubscribe}}function Gf(e,t){requestAnimationFrame(()=>{requestAnimationFrame(()=>{t(k(e,Me()))})})}function Kf(e){return Yf(()=>{let t=P(uf)();Jf(t)||e(qf(t))})}function qf(e){return{domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:ff(e)}}function Jf(e){return e.loadEventEnd<=0}function Yf(e){let t,{stop:n}=Ya(`complete`,()=>{t=F(()=>e())});return{stop:()=>{n(),I(t)}}}var Xf=10*De;function Zf(e,t,n,r){let i=1/0,{stop:a}=hn(n,[z.POINTER_DOWN,z.KEY_DOWN],e=>{i=e.timeStamp},{capture:!0,once:!0}),o=0,s=vl({type:`largest-contentful-paint`,buffered:!0}).subscribe(n=>{let a=yr(n,e=>e.entryType===`largest-contentful-paint`&&e.startTime<i&&e.startTime<t.timeStamp&&e.startTime<Xf&&e.size>o);if(a){let t;a.element&&(t=jl(a.element,e.actionNameAttribute));let n=Qf(a),i=a.startTime,s=$f(n,i);r({value:i,targetSelector:t,resourceUrl:n,subParts:s}),o=a.size}});return{stop:()=>{a(),s.unsubscribe()}}}function Qf(e){return e.url===``?void 0:e.url}function $f(e,t){let n=ff(uf());if(n===void 0)return;let r=e?mf(e,t):void 0,i=r?Math.max(n,r.requestStart||r.startTime):n,a=Math.min(t,Math.max(i,r?.responseEnd||0));return{loadDelay:i-n,loadTime:a-i,renderDelay:t-a}}function ep(e,t=window){if(document.visibilityState===`hidden`)return{timeStamp:0,stop:L};if(Sl(`visibility-state`)){let t=performance.getEntriesByType(`visibility-state`).filter(e=>e.name===`hidden`).find(t=>t.startTime>=e.relative);if(t)return{timeStamp:t.startTime,stop:L}}let n=1/0,{stop:r}=hn(t,[z.PAGE_HIDE,z.VISIBILITY_CHANGE],e=>{(e.type===z.PAGE_HIDE||document.visibilityState===`hidden`)&&(n=e.timeStamp,r())},{capture:!0});return{get timeStamp(){return n},stop:r}}function tp(e,t,n,r){let i={},{stop:a}=Kf(e=>{n(e.loadEvent),i.navigationTimings=e,r()}),o=ep(t),{stop:s}=Wf(o,e=>{i.firstContentfulPaint=e,r()}),{stop:c}=Zf(e,o,window,e=>{i.largestContentfulPaint=e,r()});function l(){a(),s(),c(),o.stop()}return{stop:l,initialViewMetrics:i}}var np=(e,t)=>e*t,rp=(e,t)=>{let n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),i=Math.min(e.right,t.right),a=Math.min(e.bottom,t.bottom);return n>=i||r>=a?0:np(i-n,a-r)},ip=e=>{let t=np(e.previousRect.width,e.previousRect.height),n=np(e.currentRect.width,e.currentRect.height),r=rp(e.previousRect,e.currentRect);return t+n-r};function ap(e,t,n){if(!dp())return{stop:L};let r=0,i;n({value:0});let a=up(),o=vl({type:`layout-shift`,buffered:!0}).subscribe(o=>{for(let s of o){if(s.hadRecentInput||s.startTime<t)continue;let{cumulatedValue:o,isMaxValue:c}=a.update(s);if(c){let e=op(s.sources);i={target:e?.node?new WeakRef(e.node):void 0,time:k(t,s.startTime),previousRect:e?.previousRect,currentRect:e?.currentRect,devicePixelRatio:window.devicePixelRatio}}if(o>r){r=o;let t=i?.target?.deref();n({value:us(r,4),targetSelector:t&&jl(t,e.actionNameAttribute),time:i?.time,previousRect:i?.previousRect?sp(i.previousRect):void 0,currentRect:i?.currentRect?sp(i.currentRect):void 0,devicePixelRatio:i?.devicePixelRatio})}}});return{stop:()=>{o.unsubscribe()}}}function op(e){let t;for(let n of e)if(n.node&&dl(n.node)){let e=ip(n);(!t||ip(t)<e)&&(t=n)}return t}function sp({x:e,y:t,width:n,height:r}){return{x:e,y:t,width:n,height:r}}var cp=5*D,lp=D;function up(){let e=0,t,n,r=0;return{update:i=>{let a=t===void 0||i.startTime-n>=lp||i.startTime-t>=cp,o;return a?(t=n=i.startTime,r=e=i.value,o=!0):(e+=i.value,n=i.startTime,o=i.value>r,o&&(r=i.value)),{cumulatedValue:e,isMaxValue:o}}}}function dp(){return Sl(`layout-shift`)&&`WeakRef`in window}var fp,pp=0,mp=1/0,hp=0;function gp(){`interactionCount`in performance||fp||(fp=new window.PerformanceObserver(C(e=>{e.getEntries().forEach(e=>{let t=e;t.interactionId&&(mp=Math.min(mp,t.interactionId),hp=Math.max(hp,t.interactionId),pp=(hp-mp)/7+1)})})),fp.observe({type:`event`,buffered:!0,durationThreshold:0}))}var _p=()=>fp?pp:window.performance.interactionCount||0,vp=10,yp=1*De,bp=8;function xp(e,t,n){if(!Tp())return{getInteractionToNextPaint:()=>void 0,setViewEnd:L,stop:L};let r=1/0,i,{getViewInteractionCount:a,stopViewInteractionCount:o}=Cp(n),s=Sp(a),c=wp(s),l=vl({type:`first-input`,buffered:!0}).subscribe(d),u=vl({type:`event`,durationThreshold:40,buffered:!0}).subscribe(d);function d(e){for(let n of e)n.interactionId&&n.startTime>=t&&n.startTime<=r&&(s.process(n),c.process(n));c.pruneUntracked();let n=s.estimateP98Interaction();n&&f(n)}function f(n){let r=k(t,n.startTime);if(n.duration!==i?.duration||r!==i.startTime){let t=Wd(n.startTime);!t&&n.target&&dl(n.target)&&(t=jl(n.target,e.actionNameAttribute)),i={duration:n.duration,startTime:r,targetSelector:t}}i.subParts=c.computeSubParts(n,Ep(i.duration))}return{getInteractionToNextPaint:()=>{if(i)return{value:Ep(i.duration),targetSelector:i.targetSelector,time:i.startTime,subParts:i.subParts};if(a())return{value:0}},setViewEnd:e=>{r=e,o()},stop:()=>{u.unsubscribe(),l.unsubscribe(),c.stop()}}}function Sp(e){let t=[];function n(){t.sort((e,t)=>t.duration-e.duration).splice(vp)}return{process(e){let r=t.findIndex(t=>e.interactionId===t.interactionId),i=t[t.length-1];r===-1?(t.length<vp||e.duration>i.duration)&&(t.push(e),n()):e.duration>t[r].duration&&(t[r]=e,n())},estimateP98Interaction(){let n=Math.min(t.length-1,Math.floor(e()/50));return t[n]},isTracked(e){return t.some(t=>t.interactionId===e)}}}function Cp(e){gp();let t=e===Ps.INITIAL_LOAD?0:_p(),n={stopped:!1};function r(){return _p()-t}return{getViewInteractionCount:()=>n.stopped?n.interactionCount:r(),stopViewInteractionCount:()=>{n={stopped:!0,interactionCount:r()}}}}function wp(e){let t=new Map;function n(e,t){e.startTime=Math.min(t.startTime,e.startTime),e.processingStart=Math.min(t.processingStart,e.processingStart),e.processingEnd=Math.max(t.processingEnd,e.processingEnd)}return{process(e){if(e.interactionId===void 0||!e.processingStart||!e.processingEnd)return;let r=e.startTime+e.duration,i=t.get(e.interactionId);if(i){n(i,e);return}for(let[,i]of t.entries())if(Math.abs(r-i.referenceRenderTime)<=bp){n(i,e),t.set(e.interactionId,i);return}t.set(e.interactionId,{startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,referenceRenderTime:r})},pruneUntracked(){for(let[n]of t)e.isTracked(n)||t.delete(n)},computeSubParts(e,n){if(!e.processingStart||!e.processingEnd||e.interactionId===void 0)return;let r=t.get(e.interactionId);if(!r)return;let i=Math.max(r.startTime+n,r.processingStart),a=Math.min(r.processingEnd,i);return{inputDelay:k(r.startTime,r.processingStart),processingDuration:k(r.processingStart,a),presentationDelay:k(a,i)}},stop(){t.clear()}}}function Tp(){return Sl(`event`)&&window.PerformanceEventTiming&&`interactionId`in PerformanceEventTiming.prototype}function Ep(e){return Math.min(e,yp)}function Dp(e,t,n,r,i,a,o){let s=i===Ps.INITIAL_LOAD,c=!0,l=[],u=ep(a);function d(){if(!c&&!s&&l.length>0){let e=Math.max(...l);e<u.timeStamp-a.relative&&o(e)}}let{stop:f}=Yu(e,t,n,r,e=>{c&&(c=!1,e.hadActivity&&l.push(k(a.timeStamp,e.end)),d())});return{stop:()=>{f(),u.stop()},setLoadEvent:e=>{s&&(s=!1,l.push(e),d())}}}var Op=D;function kp(e,t,n=jp()){let r=0,i=0,a=0,o=n.subscribe(({scrollDepth:n,scrollTop:o,scrollHeight:s})=>{let c=!1;if(n>r&&(r=n,c=!0),s>i){i=s;let t=Me();a=k(e.relative,t),c=!0}c&&t({maxDepth:Math.min(r,i),maxDepthScrollTop:o,maxScrollHeight:i,maxScrollHeightTime:a})});return{stop:()=>o.unsubscribe()}}function Ap(){let e=uu(),{height:t}=mu();return{scrollHeight:Math.round((document.scrollingElement||document.documentElement).scrollHeight),scrollDepth:Math.round(t+e),scrollTop:e}}function jp(e=Op){return new E(t=>{function n(){t.notify(Ap())}let r=Rt(n,e,{leading:!1,trailing:!0}),i=document.scrollingElement||document.documentElement,a=new ResizeObserver(C(r.throttled));i&&a.observe(i);let o=B(window,z.SCROLL,r.throttled,{passive:!0});return()=>{r.cancel(),a.disconnect(),o.stop()}})}function Mp(e,t,n,r,i,a,o){let s={},c=!1,l=!1,{stop:u,setLoadEvent:d}=Dp(e,t,n,r,a,o,e=>{c||(s.loadingTime=e,i())}),{stop:f}=kp(o,e=>{s.scroll=e}),{stop:p}=ap(r,o.relative,e=>{s.cumulativeLayoutShift=e,i()}),{stop:m,getInteractionToNextPaint:h,setViewEnd:g}=xp(r,o.relative,a);return{stop:()=>{u(),p(),f()},stopINPTracking:m,setLoadEvent:d,setViewEnd:e=>{l=!0,g(e)},getCommonViewMetrics:()=>(s.interactionToNextPaint=h(),s),setLoadingTime:e=>{if(l)return;let t=k(o.timeStamp,e??O());c||u(),c=!0,s.loadingTime=t,i()}}}function Np(e){let{stop:t}=B(window,z.PAGE_SHOW,t=>{t.persisted&&e(t)},{capture:!0});return t}function Pp(e,t,n){Gf(e.relative,e=>{t.firstContentfulPaint=e,t.largestContentfulPaint={value:e},n()})}var Fp=3e3,Ip=5*De,Lp=5*De;function Rp(e,t,n,r,i,a,o){let s=new Set,c=d(Ps.INITIAL_LOAD,Ne(),o),l;f();let u;a&&(u=p(i),l=Np(e=>{c.end();let t=Pe(e.timeStamp);c=d(Ps.BF_CACHE,t,void 0)}));function d(i,a,o){let c=zp(e,t,n,r,i,a,o);return s.add(c),c.stopObservable.subscribe(()=>{s.delete(c)}),c}function f(){e.subscribe(11,()=>{c=d(Ps.SESSION_RENEWAL,void 0,{name:c.name,service:c.service,version:c.version,context:c.contextManager.getContext()})}),e.subscribe(10,({endClocks:e})=>{c.end({sessionIsActive:!1,endClocks:e})})}function p(e){return e.subscribe(({oldLocation:e,newLocation:t})=>{Vp(e,t)&&(c.end(),c=d(Ps.ROUTE_CHANGE))})}return{addTiming:(e,t=O())=>{c.addTiming(e,t)},setLoadingTime:e=>c.setLoadingTime(e),startView:(e,t)=>{c.end({endClocks:t}),c=d(Ps.ROUTE_CHANGE,t,e)},setViewContext:e=>{c.contextManager.setContext(e)},setViewContextProperty:(e,t)=>{c.contextManager.setContextProperty(e,t)},setViewName:e=>{c.setViewName(e)},getViewContext:()=>c.contextManager.getContext(),stop:()=>{u&&u.unsubscribe(),l&&l(),c.end(),s.forEach(e=>e.stop())}}}function zp(e,t,n,r,i,a=j(),o){let s=M(),c=new E,l={},u=0,d,f=Tt(P(window.location)),p=Mo(),m=!0,h=o?.name,g=o?.service||r.service,_=o?.version||r.version,v=o?.context,y=o?.handlingStack;v&&p.setContext(v);let b={id:s,name:h,startClocks:a,service:g,version:_,context:v,url:o?.url};e.notify(1,b),e.notify(2,b);let{throttled:ee,cancel:te}=Rt(C,Fp,{leading:!1}),{setLoadEvent:x,setViewEnd:ne,stop:S,stopINPTracking:re,getCommonViewMetrics:ie,setLoadingTime:ae}=Mp(e,t,n,r,pe,i,a),{stop:oe,initialViewMetrics:se}=i===Ps.INITIAL_LOAD?tp(r,a,x,pe):{stop:L,initialViewMetrics:{}};i===Ps.BF_CACHE&&Pp(a,se,pe);let{stop:ce,eventCounts:le}=Hf(e,s,pe),ue=It(C,Ip),de=e.subscribe(12,e=>{e===Sr.UNLOADING&&C()});C(),p.changeObservable.subscribe(pe);function fe(){e.notify(3,{id:s,name:h,context:p.getContext(),startClocks:a,sessionIsActive:m})}function pe(){fe(),ee()}function C(){te(),fe(),u+=1;let t=d===void 0?O():d.timeStamp;e.notify(4,{customTimings:l,documentVersion:u,id:s,name:h,service:g,version:_,context:p.getContext(),loadingType:i,location:f,handlingStack:y,startClocks:a,commonViewMetrics:ie(),initialViewMetrics:se,duration:k(a.timeStamp,t),isActive:d===void 0,sessionIsActive:m,eventCounts:le})}return{get name(){return h},service:g,version:_,contextManager:p,stopObservable:c,end(t={}){d||(d=t.endClocks??j(),m=t.sessionIsActive??!0,e.notify(5,{endClocks:d}),e.notify(6,{endClocks:d}),Lt(ue),ne(d.relative),S(),de.unsubscribe(),C(),F(()=>{this.stop()},Lp))},stop(){oe(),ce(),re(),c.notify()},addTiming(e,t){if(d)return;let n=Re(t)?t:k(a.timeStamp,t);l[Bp(e)]=n,pe()},setLoadingTime:ae,setViewName(e){h=e,C()}}}function Bp(e){let t=e.replace(/[^a-zA-Z0-9-_.@$]/g,`_`);return t!==e&&N.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}function Vp(e,t){return e.pathname!==t.pathname||!Hp(t.hash)&&Up(t.hash)!==Up(e.hash)}function Hp(e){let t=e.substring(1);return t!==``&&!!document.getElementById(t)}function Up(e){let t=e.indexOf(`?`);return t<0?e:e.slice(0,t)}function Wp(e,t,n,r,i,a,o,s,c){return e.subscribe(4,t=>e.notify(13,Gp(t,n,o))),t.assembleEventDefaults.register(({startTime:e,eventType:t})=>{let n=s.findView(e);return n?{type:t,service:n.service,version:n.version,context:n.context,view:{id:n.id,name:n.name}}:Pr}),t.assembleTelemetry.register(({startTime:e})=>({view:{id:s.findView(e)?.id}})),Rp(e,r,i,n,a,!n.trackViewsManually,c)}function Gp(e,t,n){let r=n.getReplayStats(e.id),i=e.commonViewMetrics?.cumulativeLayoutShift?.devicePixelRatio,a={_dd:{document_version:e.documentVersion,replay_stats:r,cls:i?{device_pixel_ratio:i}:void 0,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually,remote_configuration_id:t.remoteConfigurationId}},date:e.startClocks.timeStamp,type:J.VIEW,view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:e.commonViewMetrics.cumulativeLayoutShift?.value,cumulative_layout_shift_time:A(e.commonViewMetrics.cumulativeLayoutShift?.time),cumulative_layout_shift_target_selector:e.commonViewMetrics.cumulativeLayoutShift?.targetSelector,first_byte:A(e.initialViewMetrics.navigationTimings?.firstByte),dom_complete:A(e.initialViewMetrics.navigationTimings?.domComplete),dom_content_loaded:A(e.initialViewMetrics.navigationTimings?.domContentLoaded),dom_interactive:A(e.initialViewMetrics.navigationTimings?.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:A(e.initialViewMetrics.firstContentfulPaint),interaction_to_next_paint:A(e.commonViewMetrics.interactionToNextPaint?.value),interaction_to_next_paint_time:A(e.commonViewMetrics.interactionToNextPaint?.time),interaction_to_next_paint_target_selector:e.commonViewMetrics.interactionToNextPaint?.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:A(e.initialViewMetrics.largestContentfulPaint?.value),largest_contentful_paint_target_selector:e.initialViewMetrics.largestContentfulPaint?.targetSelector,load_event:A(e.initialViewMetrics.navigationTimings?.loadEvent),loading_time:Ju(A(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:Kp(e.commonViewMetrics,e.initialViewMetrics),resource:{count:e.eventCounts.resourceCount},time_spent:A(e.duration)},display:e.commonViewMetrics.scroll?{scroll:{max_depth:e.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:e.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:e.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:A(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:t.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:ls()}};return Dt(e.customTimings)||(a.view.custom_timings=Ot(e.customTimings,A)),{rawRumEvent:a,startClocks:e.startClocks,duration:e.duration,domainContext:{location:e.location,handlingStack:e.handlingStack}}}function Kp({cumulativeLayoutShift:e,interactionToNextPaint:t},{firstContentfulPaint:n,largestContentfulPaint:r}){return{cls:e&&{score:e.value,timestamp:A(e.time),target_selector:e.targetSelector,previous_rect:e.previousRect,current_rect:e.currentRect},fcp:n&&{timestamp:A(n)},inp:t&&{duration:A(t.value),timestamp:A(t.time),target_selector:t.targetSelector,sub_parts:t.subParts?{input_delay:A(t.subParts.inputDelay),processing_duration:A(t.subParts.processingDuration),presentation_delay:A(t.subParts.presentationDelay)}:void 0},lcp:r&&{timestamp:A(r.value),target_selector:r.targetSelector,resource_url:r.resourceUrl,sub_parts:r.subParts?{load_delay:A(r.subParts.loadDelay),load_time:A(r.subParts.loadTime),render_delay:A(r.subParts.renderDelay)}:void 0}}}function qp(e,t){if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return e===t;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,n)=>qp(e,t[n]));if(Array.isArray(e)||Array.isArray(t))return!1;let n=e,r=t,i=Object.keys(n),a=Object.keys(r);return i.length===a.length&&i.every(e=>a.includes(e)&&qp(n[e],r[e]))}function Jp(e,t,n){let r={},i=n?.replaceKeys??new Set,a=n?.appendKeys??new Set,s=n?.ignoreKeys??new Set;for(let n of Object.keys(e)){if(s.has(n))continue;let c=e[n],l=t[n];if(!i.has(n)&&o(c)&&o(l)){let e=Jp(c,l,{replaceKeys:Yp(i,n),appendKeys:Yp(a,n),ignoreKeys:Yp(s,n)});e&&(r[n]=e)}else a.has(n)&&Array.isArray(c)&&Array.isArray(l)?c.length>l.length&&(r[n]=c.slice(l.length)):qp(c,l)||(r[n]=c)}for(let n of Object.keys(t))n in e||(r[n]=null);return Object.keys(r).length>0?r:void 0}function Yp(e,t){let n=new Set;for(let r of e)r.startsWith(`${t}.`)&&n.add(r.slice(t.length+1));return n}function Xp(e,t){let n=Jp(e,t,{replaceKeys:new Set([`view.custom_timings`,`context`,`connectivity`,`usr`,`device`,`privacy`]),appendKeys:new Set([`_dd.page_states`]),ignoreKeys:new Set([`date`,`type`,`application`,`session`,`view.id`,`view.url`,`_dd.document_version`,`_dd.format_version`])});if(n)return f(n,{type:J.VIEW_UPDATE,date:e.date,application:e.application,session:e.session,view:{id:e.view.id,url:e.view.url},_dd:{document_version:e._dd.document_version,format_version:e._dd.format_version}})}function Zp(e,t){let n,r,i=!1,a=0,{unsubscribe:o}=e.flushObservable.subscribe(()=>{i=!1,r=n});return{dispatch:o=>{if(o.type!==J.VIEW){e.add(o);return}if(!t){e.upsert(o,o.view.id);return}let s=o.view.id;if(!o.view.is_active){s===n?.view.id&&(n=void 0,r=void 0,i=!1,a=0),e.upsert(o,s);return}if(s!==n?.view.id){a=0,e.upsert(o,s),n=o,i=!e.isEmpty;return}if(n=o,i){e.upsert(o,s);return}if(a+=1,a>=100){a=0,e.upsert(o,s),i=!e.isEmpty;return}if(r){let t=Xp(o,r);t&&(Vn(`rum`,t),e.upsert(t,s))}},stop:o}}function Qp(e,t,n,r,i){let a=[Ue(e,`rum`)],o=We(e,`rum`);o&&a.push(o);let s=Ar({encoder:i(fs.RUM),endpoints:a,reportError:n});r.subscribe(()=>s.forceFlush(`session_expire`));let{dispatch:c,stop:l}=Zp(s,e.betaEnableViewUpdates);t.subscribe(14,c);let u=s.stop.bind(s);return s.stop=()=>{l(),u()},s}function $p(e){let t=mr();e.subscribe(14,e=>{t.send(`rum`,e)})}var em=Ui;function tm(e,t,n){let r=Ri({expireDelay:em}),i;e.subscribe(1,({startClocks:e,url:t})=>{let n=P(x.location).href,a=t===void 0?n:ae(t,n).href;r.add(o({url:a,referrer:i||document.referrer}),e.relative),i=a}),e.subscribe(6,({endClocks:e})=>{r.closeActive(e.relative)});let a=n.subscribe(({newLocation:e})=>{let t=r.find();if(t){let n=Me();r.closeActive(n),r.add(o({url:e.href,referrer:t.referrer}),n)}});function o({url:e,referrer:t}){return{url:e,referrer:t}}return t.register(({startTime:e,eventType:t})=>{let n=r.find(e);return n?{type:t,view:{url:n.url,referrer:n.referrer}}:Pr}),{findUrl:e=>r.find(e),stop:()=>{a.unsubscribe(),r.stop()}}}function nm(){let e=Tt(rm());return new E(t=>{let{stop:n}=im(i),{stop:r}=am(i);function i(){if(e.href===rm().href)return;let n=Tt(rm());t.notify({newLocation:n,oldLocation:e}),e=n}return()=>{n(),r()}})}function rm(){return P(x.location)}function im(e){let{stop:t}=R(om(`pushState`),`pushState`,({onPostCall:t})=>{t(e)}),{stop:n}=R(om(`replaceState`),`replaceState`,({onPostCall:t})=>{t(e)}),{stop:r}=B(window,z.POP_STATE,e);return{stop:()=>{t(),n(),r()}}}function am(e){return B(window,z.HASH_CHANGE,e)}function om(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}var sm=Ui;function cm(e,t,n){let r=Ri({expireDelay:sm});return e.subscribe(1,({startClocks:e})=>{r.add({},e.relative)}),e.subscribe(6,({endClocks:e})=>{r.closeActive(e.relative)}),t.register(({startTime:e,eventType:t})=>{if(!n.trackFeatureFlagsForEvents.concat([J.VIEW,J.ERROR]).includes(t))return Fr;let i=r.find(e);return!i||Dt(i)?Fr:{type:t,feature_flags:i}}),{addFeatureFlagEvaluation:(e,t)=>{let n=r.find();n&&(n[e]=t)}}}var lm=10*D,um,dm;function fm(e,t,n){e.metricsEnabled&&(gm(),dm=!1,t.subscribe(14,()=>{dm=!0}),n.subscribe(({bytesCount:e,messagesCount:t})=>{dm&&(dm=!1,um.batchCount+=1,hm(um.batchBytesCount,e),hm(um.batchMessagesCount,t))}),It(pm,lm))}function pm(){um.batchCount!==0&&($r(zr.CUSTOMER_DATA_METRIC_NAME,um),gm())}function mm(){return{min:1/0,max:0,sum:0}}function hm(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function gm(){um={batchCount:0,batchBytesCount:mm(),batchMessagesCount:mm()}}var _m=4e3,vm=Ui;function ym(e,t=500){let n=Ri({expireDelay:vm,maxEntries:_m}),r;Sl(`visibility-state`)&&performance.getEntriesByType(`visibility-state`).forEach(e=>{a(e.name===`hidden`?`hidden`:`active`,e.startTime)}),a(Sm(),Me());let{stop:i}=hn(window,[z.PAGE_SHOW,z.FOCUS,z.BLUR,z.VISIBILITY_CHANGE,z.RESUME,z.FREEZE,z.PAGE_HIDE],e=>{a(xm(e),e.timeStamp)},{capture:!0});function a(e,t=Me()){e!==r&&(r=e,n.closeActive(t),n.add({state:r,startTime:t},t))}function o(e,t,r){return n.findAll(t,r).some(t=>t.state===e)}return e.register(({startTime:e,duration:r=0,eventType:i})=>i===J.VIEW?{type:i,_dd:{page_states:bm(n.findAll(e,r),e,t)}}:i===J.ACTION||i===J.ERROR?{type:i,view:{in_foreground:o(`active`,e,0)}}:Fr),{wasInPageStateDuringPeriod:o,addPageState:a,stop:()=>{i(),n.stop()}}}function bm(e,t,n){if(e.length!==0)return e.slice(-n).reverse().map(({state:e,startTime:n})=>({state:e,start:A(k(t,n))}))}function xm(e){return e.type===z.FREEZE?`frozen`:e.type===z.PAGE_HIDE?e.persisted?`frozen`:`terminated`:Sm()}function Sm(){return document.visibilityState===`hidden`?`hidden`:document.hasFocus()?`active`:`passive`}function Cm(e){let t,n=requestAnimationFrame(C(()=>{t=mu()})),r=fu().subscribe(e=>{t=e}).unsubscribe;return e.register(({eventType:e})=>({type:e,display:t?{viewport:t}:void 0})),{stop:()=>{r(),n&&cancelAnimationFrame(n)}}}function wm(e,t){let n=td(e);function r(e){return!t.wasInPageStateDuringPeriod(`frozen`,e.startClocks.relative,e.duration)}function i(t){r(t)&&e.notify(13,Tm(t))}function a(t,n,r,i){let{operationKey:a,context:o,description:s,handlingStack:c}=r||{},l={name:t,type:Ls.OPERATION_STEP,operationKey:a,failureReason:i,stepType:n,startClocks:j(),context:V(o),description:s,handlingStack:c};e.notify(13,Tm(l))}function o(t,r={},i=j()){let{id:a}=n.start(r.vitalKey??t,i,{name:t,...r});e.notify(17,{id:a,name:t,startClocks:i,...r})}function s(e,t={},r=j()){let a=n.stop(t.vitalKey??e,r,t);a&&i({type:Ls.DURATION,...a})}return{addOperationStepVital:a,addDurationVital:i,startDurationVital:o,stopDurationVital:s}}function Tm(e){let{startClocks:t,type:n,name:r,description:i,context:a,handlingStack:o}=e,s={id:(e.type===Ls.DURATION?e.id:void 0)??M(),type:n,name:r,description:i,...n===Ls.DURATION?{duration:A(e.duration)}:{step_type:e.stepType,operation_key:e.operationKey,failure_reason:e.failureReason}};return{rawRumEvent:{date:t.timeStamp,vital:s,type:J.VITAL,context:a},startClocks:t,duration:n===Ls.DURATION?e.duration:void 0,domainContext:o?{handlingStack:o}:{}}}function Em(e,t,n,r,i){e.register(({eventType:e,startTime:a})=>{let o=n.findTrackedSession(a),s=i.findView(a);if(!o||!s)return Pr;let c,l,u;return e===J.VIEW?(c=r.getReplayStats(s.id)?!0:void 0,l=gu(o,t)===1,u=s.sessionIsActive?void 0:!1):c=r.isRecording()?!0:void 0,{type:e,session:{id:o.id,type:`user`,has_replay:c,sampled_for_replay:l,is_active:u}}})}function Dm(e){let t=Qi()?Om():Am;return new E(n=>t(e,e=>n.notify(e)))}function Om(){return(e,t)=>B(x.cookieStore,z.CHANGE,n=>{let r=n.changed.find(t=>t.name===e)||n.deleted.find(t=>t.name===e);r&&t(r.value)}).stop}var km=D;function Am(e,t){let n=ot(e),r=It(()=>{let r=ot(e);r!==n&&(n=r,t(r))},km);return()=>{Lt(r)}}var jm=`datadog-ci-visibility-test-execution-id`;function Mm(e,t=Dm(jm)){let n=lt(`datadog-ci-visibility-test-execution-id`)||Nm(),r=t.subscribe(e=>{n=e});return e.register(({eventType:e})=>typeof n==`string`?{type:e,session:{type:`ci_test`},ci_test:{test_execution_id:n}}:Fr),{stop:()=>{r.unsubscribe()}}}function Nm(){let e=window.Cypress;if(e)try{return e.env(`traceId`)}catch{N.warn(`Failed to read Cypress test execution id via Cypress.env(). Upgrade dd-trace-js to >= 5.88.0 to keep RUM ↔ test correlation working.`);return}}function Pm(e,t){let n=vl({type:Sl(`long-animation-frame`)?`long-animation-frame`:`longtask`,buffered:!0}).subscribe(n=>{for(let r of n){if(!t.trackLongTasks)break;let n=Pe(r.startTime),i=Fm(r,n);e.notify(13,{rawRumEvent:i,startClocks:n,duration:r.duration,domainContext:{performanceEntry:r}})}});return{stop:()=>n.unsubscribe()}}function Fm(e,t){let n=M(),r=A(e.duration),i={date:t.timeStamp,type:J.LONG_TASK,_dd:{discarded:!1}};if(e.entryType===`longtask`)return{...i,long_task:{id:n,entry_type:Ns.LONG_TASK,duration:r}};let a=oi(e.scripts.map(e=>e.sourceURL).filter(e=>!!e));return{...i,_dd:{discarded:!1,debug_ids:a},long_task:{id:n,entry_type:Ns.LONG_ANIMATION_FRAME,duration:r,blocking_duration:A(e.blockingDuration),first_ui_event_timestamp:A(e.firstUIEventTimestamp),render_start:A(e.renderStart),style_and_layout_start:A(e.styleAndLayoutStart),start_time:A(e.startTime),scripts:e.scripts.map(e=>({duration:A(e.duration),pause_duration:A(e.pauseDuration),forced_style_and_layout_duration:A(e.forcedStyleAndLayoutDuration),start_time:A(e.startTime),execution_start:A(e.executionStart),source_url:e.sourceURL,source_function_name:e.sourceFunctionName,source_char_position:e.sourceCharPosition,invoker:e.invoker,invoker_type:e.invokerType,window_attribution:e.windowAttribution}))}}}function Im(e){e.register(({eventType:e})=>ns()?{type:e,session:{type:`synthetics`},synthetics:{...ts(),injected:es()}}:Fr)}function Lm(e,t,n){let r=d(e),i=n(r);return xr(t).forEach(([t,n])=>Rm(e,r,t.split(/\.|(?=\[\])/),n)),i}function Rm(e,t,n,r){let[i,...a]=n;if(i===`[]`){Array.isArray(e)&&Array.isArray(t)&&e.forEach((e,n)=>Rm(e,t[n],a,r));return}if(Bm(e)&&Bm(t)){if(a.length>0)return Rm(e[i],t[i],a,r);zm(e,i,t[i],r)}}function zm(e,t,n,r){if(e[t]===n)return;let i=a(n);i===r?e[t]=V(n):r===`object`&&(i===`undefined`||i===`null`)?e[t]={}:r===`array`&&(i===`undefined`||i===`null`)&&(e[t]=[])}function Bm(e){return a(e)===`object`}var Vm={"view.name":`string`,"view.url":`string`,"view.referrer":`string`,context:`object`,service:`string`,version:`string`},Hm={[J.VIEW]:{...Vm,"view.performance.lcp.resource_url":`string`},[J.ERROR]:{...Vm,"error.message":`string`,"error.stack":`string`,"error.handling_stack":`string`,"error.resource.url":`string`,"error.fingerprint":`string`,"_dd.debug_ids":`array`},[J.RESOURCE]:{...Vm,"resource.url":`string`,"resource.graphql.variables":`string`,"resource.request.headers":`object`,"resource.response.headers":`object`,"resource.websocket.close_reason":`string`,"resource.websocket.protocol":`string`},[J.ACTION]:{...Vm,"action.target.name":`string`},[J.LONG_TASK]:{...Vm,"long_task.scripts[].source_url":`string`,"long_task.scripts[].invoker":`string`,"_dd.debug_ids":`array`},[J.VITAL]:Vm};function Um(e,t,n,r,i){let a={[J.ERROR]:Wa(J.ERROR,r,i),[J.ACTION]:Wa(J.ACTION,r,i),[J.VITAL]:Wa(J.VITAL,r,i)};t.subscribe(13,({startClocks:r,duration:i,rawRumEvent:o,domainContext:s})=>{let c={eventType:o.type,rawRumEvent:o,domainContext:s,startTime:r.relative,duration:i},l=n.assembleEventDefaults.trigger(c);if(l===`DISCARDED`)return;let u=n.assembleEvent.trigger(c);if(u===`DISCARDED`)return;let d=f(l,o,u,{ddtags:Ln(e).join(`,`)});Wm(d,e.beforeSend,s,a)&&(Dt(d.context)&&delete d.context,t.notify(14,d))})}function Wm(e,t,n,r){if(t){let r=Lm(e,Hm[e.type],e=>t(e,n));if(r===!1&&e.type!==J.VIEW)return!1;r===!1&&N.warn(`Can't dismiss view events using beforeSend!`)}return!r[e.type]?.isLimitReached()}function Gm(e){e.register(({eventType:e})=>({type:e,connectivity:Gn()}))}function Km(e,t,n){e.register(({eventType:e})=>{let r=t.source;return{type:e,_dd:{format_version:2,drift:ze(),configuration:{session_sample_rate:us(t.sessionSampleRate,3),session_replay_sample_rate:us(t.sessionReplaySampleRate,3),profiling_sample_rate:us(t.profilingSampleRate,3),trace_sample_rate:us(t.traceSampleRate,3)},browser_sdk_version:gr()?`7.13.0`:void 0,sdk_name:n},application:{id:t.applicationId},date:O(),source:r}})}var qm=[J.ACTION,J.ERROR,J.LONG_TASK,J.RESOURCE,J.VITAL];function Jm(e){return{addEvent:(t,n,r,i)=>{qm.includes(n.type)&&e.notify(13,{startClocks:Pe(t),rawRumEvent:n,domainContext:r,duration:i})}}}function Ym(e){e.register(({domainContext:e,rawRumEvent:t})=>{let n=Xm(e,t);if(!n)return Fr;let r=si(n);return r?{type:t.type,service:r.service,version:r.version}:Fr})}function Xm(e,t){if(t.type===`long_task`&&t.long_task.entry_type===`long-animation-frame`)return t.long_task.scripts[0]?.source_url;let n;return`handlingStack`in e&&(n=e.handlingStack),t.type===`error`&&t.error.stack&&(n=t.error.stack),Bt({stack:n}).stack[0]?.url}function Zm(e,t,n,r,i,a,o,s,c,l){let u=[],d=new Uc;d.subscribe(14,e=>Vn(`rum`,e)),t.expireObservable.subscribe(()=>d.notify(10,{endClocks:j()})),t.renewObservable.subscribe(()=>d.notify(11));let f=e=>{d.notify(15,{error:{message:e,source:Hn.AGENT,startClocks:j()}}),Xr(`Error reported to customer`,{"error.message":e})};if(gr()){$p(d);let e=Cr().subscribe(e=>{d.notify(12,e.reason)});u.push(()=>e.unsubscribe())}else{let n=Qp(e,d,f,t.expireObservable,a),r=n.prepareUrgentFlushObservable.subscribe(e=>{d.notify(12,e)});u.push(()=>r.unsubscribe()),u.push(()=>n.stop()),fm(s,d,n.flushObservable)}let{stop:p,...m}=Qm(d,c,e,t,n,i,o,l,f);return u.push(p),o.unbuffer(),u.push(()=>r.stop()),{...m,lifeCycle:d,sessionManager:t,stopSession:()=>t.expire(),telemetry:s,stop:()=>{u.forEach(e=>e())},hooks:c}}function Qm(e,t,n,r,i,a,o,s,c){let l=[],u=Vc(),d=nm(),{observable:f,stop:p}=_u();l.push(p);let{assembleEventDefaults:m}=t;Km(m,n,s);let h=ym(m);l.push(()=>h.stop());let g=Gc(e);l.push(()=>g.stop());let _=tm(e,m,d);l.push(()=>_.stop());let v=cm(e,m,n);Em(m,n,r,i,g),Gm(m),Ho(m);let y=Go(m,n,`rum`,!0),b=qo(m,n,r,`rum`),ee=Ro(m,n,`rum`),te=tf(e,t,u,f,n);l.push(te.stop);let x=Jm(e),ne=Cm(m);l.push(ne.stop);let S=Mm(m);l.push(S.stop),Im(m),Um(n,e,t,c);let{addTiming:re,setLoadingTime:ie,startView:ae,setViewName:oe,setViewContext:se,setViewContextProperty:ce,getViewContext:le,stop:ue}=Wp(e,t,n,u,f,d,i,g,a);Ym(m),l.push(ue);let de=wf(e,n);l.push(de.stop);let{stop:fe}=Pm(e,n);l.push(fe);let{addError:pe}=of(e,o);Lu(e,n,r,b,ee,o);let C=wm(e,h);if(n.trackResources&&(n.betaTrackWebSockets||Nt(kt.TRACK_WEBSOCKETS))){let t=Uu(e,g,C.addDurationVital);l.push(t.stop)}let w=vu(n.applicationId,r,g,te.actionContexts,_);return{addAction:te.addAction,startAction:te.startAction,stopAction:te.stopAction,startResource:de.startResource,stopResource:de.stopResource,addEvent:x.addEvent,addError:pe,addTiming:re,setLoadingTime:ie,addFeatureFlagEvaluation:v.addFeatureFlagEvaluation,startView:ae,setViewContext:se,setViewContextProperty:ce,getViewContext:le,setViewName:oe,viewHistory:g,sessionManager:r,stopSession:()=>r.expire(),getInternalContext:w.get,startDurationVital:C.startDurationVital,stopDurationVital:C.stopDurationVital,addDurationVital:C.addDurationVital,addOperationStepVital:C.addOperationStepVital,globalContext:y,userContext:b,accountContext:ee,stop:()=>l.forEach(e=>e())}}function $m(e,t){if(!e)return!0;let n=e.map(e=>e.onInit?.(t));return n.some(Co)?Promise.all(n).then(e=>!e.includes(!1)):!n.includes(!1)}function eh(e,t){for(let n of e??[])n.onRumStart?.(t)}function th(e,t){e.register(()=>t.isGranted()?Fr:Pr)}function nh({ignoreInitIfSyntheticsWillInjectRum:e=!0,startDeflateWorker:t,sdkName:n},r,i){let a=new _e(500,e=>{Xr(`preStartRum buffer data lost`,{count:e})}),o=Ko();No(o,W.globalContext,a);let s=Jo();No(s,W.userContext,a);let c=zo();No(c,W.accountContext,a);let l,u,d,f,p,m,h=Bc(),g=r.observable.subscribe(y),_={},v=!1;function y(){if(v||!d||!f||!p||!m)return;g.unsubscribe();let e;if(f.trackViewsManually){if(!l)return;e=l.options}let t=f.trackViewsManually?l?.callback:void 0,n=i(f,p,u,e,m,h);v=!0,a.subscribe(e=>{e!==t&&e(n)}),a.unbuffer()}function b(e,i,a){let o=gr();if(o&&(e=rh(e)),d=e,f){Si(`DD_RUM`,e);return}let s=Ac(e,n);s&&St(s,i??``)&&(s.compressIntakeRequests&&!o&&t&&(u=t(s,`Datadog RUM`,L),!u)||(f=s,r.tryToInit(s.trackingConsent),r.onGrantedOnce(()=>{let{assembleTelemetry:t}=h;if(th(t,r),m=P(Gr)(Rr.RUM,s,t,n),ne){N.warn(`The RUM SDK is not supported in a web or service worker environment.`);return}(gr()?Ra():P(La)(s,r)).then(r=>{r&&(p=r,ps(t,p,{application:{id:s.applicationId}}),Qr(zc(e,n,a)),y())}).catch(T)})))}return{init(t,n,r){if(!t){N.error(`Missing configuration`);return}if(jt(t.enableExperimentalFeatures),vn(t.allowUntrustedEvents),d=t,e&&es())return;let i=$m(t.plugins,{initConfiguration:t,publicApi:n,registerAssembleEventHook:h.assembleEvent.register});typeof i==`boolean`?i&&a():i.then(e=>{e&&a()}).catch(T);function a(){if(mc(t)){let e={user:s,context:o};if(t.remoteConfigurationId||t.remoteConfiguration?.sync)oc(t,e).then(e=>{e&&b(e,r)}).catch(T);else{let n=_c(t,e);n&&b(n.initConfiguration,r,n.metadata)}}else b(t,r)}},get initConfiguration(){return d},getInternalContext:L,stopSession:L,addTiming(e,t=O()){a.notify(n=>n.addTiming(e,t))},setLoadingTime:(e=>{a.notify(t=>t.setLoadingTime(e))}),startView(e,t=j()){let n=n=>{n.startView(e,t)};a.notify(n),l||(l={options:e,callback:n},y())},setViewName(e){a.notify(t=>t.setViewName(e))},setViewContext(e){a.notify(t=>t.setViewContext(e))},setViewContextProperty(e,t){a.notify(n=>n.setViewContextProperty(e,t))},getViewContext:()=>_,globalContext:o,userContext:s,accountContext:c,addAction(e){a.notify(t=>t.addAction(e))},startAction(e,t){let n=j();a.notify(r=>r.startAction(e,t,n))},stopAction(e,t){let n=j();a.notify(r=>r.stopAction(e,t,n))},startResource(e,t){let n=j();a.notify(r=>r.startResource(e,t,n))},stopResource(e,t){let n=j();a.notify(r=>r.stopResource(e,t,n))},addError(e){a.notify(t=>t.addError(e))},addFeatureFlagEvaluation(e,t){a.notify(n=>n.addFeatureFlagEvaluation(e,t))},startDurationVital(e,t){let n=j();a.notify(r=>r.startDurationVital(e,t,n))},stopDurationVital(e,t){let n=j();a.notify(r=>r.stopDurationVital(e,t,n))},addDurationVital(e){a.notify(t=>t.addDurationVital(e))},addOperationStepVital:(e,t,n,r)=>{a.notify(i=>i.addOperationStepVital(V(e),t,V(n),V(r)))}}}function rh(e){return{...e,service:e.service||e.applicationId,applicationId:`00000000-aaaa-0000-aaaa-000000000000`,clientToken:`empty`,sessionSampleRate:100,defaultPrivacyLevel:e.defaultPrivacyLevel??mr()?.getPrivacyLevel()}}function ih(e,t,n={}){let r=ye(),i=cs(),a=nh(n,r,(r,o,s,c,l,u)=>{let d=s&&n.createDeflateEncoder?e=>n.createDeflateEncoder(s,e):Tr,f=P(Zm)(r,o,e,t,c,d,i.observable,l,u,n.sdkName);return e.onRumStart(f.lifeCycle,r,o,f.viewHistory,s,f.telemetry),t.onRumStart(f.lifeCycle,f.hooks,r,o,f.viewHistory,d),a=oh(a,f),eh(r.plugins,{addEvent:f.addEvent,addError:f.addError}),f}),o=()=>a,s=e=>{let t=sn(`view`);w(()=>{let n=typeof e==`object`?e:{name:e};a.startView({...n,name:ah(n.name,`view name`),service:ah(n.service,`view service`),version:ah(n.version,`view version`),handlingStack:t}),H({feature:`start-view`})})},c=(e,t)=>{let n=sn(`vital`);w(()=>{H({feature:`add-operation-step-vital`,action_type:`start`}),a.addOperationStepVital(e,`start`,{...t,handlingStack:n})})},l=C((e,t)=>{H({feature:`add-operation-step-vital`,action_type:`succeed`}),a.addOperationStepVital(e,`end`,t)}),u=C((e,t,n)=>{H({feature:`add-operation-step-vital`,action_type:`fail`}),a.addOperationStepVital(e,`end`,n,t)}),f=bi({init:e=>{let t=Error().stack;w(()=>a.init(e,f,t))},setTrackingConsent:C(e=>{r.update(e),H({feature:`set-tracking-consent`,tracking_consent:e})}),setViewName:C(e=>{a.setViewName(ah(e,`view name`)),H({feature:`set-view-name`})}),setViewContext:C(e=>{a.setViewContext(e),H({feature:`set-view-context`})}),setViewContextProperty:C((e,t)=>{a.setViewContextProperty(e,t),H({feature:`set-view-context-property`})}),getViewContext:C(()=>(H({feature:`set-view-context-property`}),a.getViewContext())),getInternalContext:C(e=>a.getInternalContext(e)),getInitConfiguration:C(()=>d(a.initConfiguration)),addAction:(e,t)=>{let n=sn(`action`);w(()=>{a.addAction({name:V(e),context:V(t),startClocks:j(),type:Fs.CUSTOM,handlingStack:n}),H({feature:`add-action`})})},startAction:C((e,t)=>{H({feature:`start-action`}),a.startAction(V(e),{type:V(t?.type),context:V(t?.context),actionKey:t?.actionKey})}),stopAction:C((e,t)=>{H({feature:`stop-action`}),a.stopAction(V(e),{type:V(t?.type),context:V(t?.context),actionKey:t?.actionKey})}),startResource:C((e,t)=>{H({feature:`start-resource`}),a.startResource(V(e),{type:V(t?.type),method:V(t?.method),context:V(t?.context),resourceKey:t?.resourceKey})}),stopResource:C((e,t)=>{H({feature:`stop-resource`}),a.stopResource(V(e),{type:V(t?.type),statusCode:t?.statusCode,size:t?.size,context:V(t?.context),resourceKey:t?.resourceKey})}),addError:(e,t)=>{let n=sn(`error`);w(()=>{a.addError({error:e,handlingStack:n,context:V(t),startClocks:j()}),H({feature:`add-error`})})},addTiming:C((e,t)=>{a.addTiming(V(e),t)}),setViewLoadingTime:C(()=>{let e=O();a.setLoadingTime(e),H({feature:`addViewLoadingTime`})}),setGlobalContext:U(o,W.globalContext,G.setContext,`set-global-context`),getGlobalContext:U(o,W.globalContext,G.getContext,`get-global-context`),setGlobalContextProperty:U(o,W.globalContext,G.setContextProperty,`set-global-context-property`),removeGlobalContextProperty:U(o,W.globalContext,G.removeContextProperty,`remove-global-context-property`),clearGlobalContext:U(o,W.globalContext,G.clearContext,`clear-global-context`),setUser:U(o,W.userContext,G.setContext,`set-user`),getUser:U(o,W.userContext,G.getContext,`get-user`),setUserProperty:U(o,W.userContext,G.setContextProperty,`set-user-property`),removeUserProperty:U(o,W.userContext,G.removeContextProperty,`remove-user-property`),clearUser:U(o,W.userContext,G.clearContext,`clear-user`),setAccount:U(o,W.accountContext,G.setContext,`set-account`),getAccount:U(o,W.accountContext,G.getContext,`get-account`),setAccountProperty:U(o,W.accountContext,G.setContextProperty,`set-account-property`),removeAccountProperty:U(o,W.accountContext,G.removeContextProperty,`remove-account-property`),clearAccount:U(o,W.accountContext,G.clearContext,`clear-account`),startView:s,stopSession:C(()=>{a.stopSession(),H({feature:`stop-session`})}),addFeatureFlagEvaluation:C((e,t)=>{a.addFeatureFlagEvaluation(V(e),V(t)),H({feature:`add-feature-flag-evaluation`})}),getSessionReplayLink:C(()=>e.getSessionReplayLink()),startSessionReplayRecording:C(t=>{e.start(t),H({feature:`start-session-replay-recording`,force:t?.force})}),stopSessionReplayRecording:C(()=>e.stop()),addDurationVital:(e,t)=>{let n=sn(`vital`);w(()=>{H({feature:`add-duration-vital`}),a.addDurationVital({id:M(),name:V(e),type:Ls.DURATION,startClocks:Fe(t.startTime),duration:t.duration,context:V(t?.context),description:V(t?.description),handlingStack:n})})},startDurationVital:(e,t)=>{let n=sn(`vital`);w(()=>{H({feature:`start-duration-vital`}),a.startDurationVital(V(e),{vitalKey:t?.vitalKey,context:V(t?.context),description:V(t?.description),handlingStack:n})})},stopDurationVital:C((e,t)=>{H({feature:`stop-duration-vital`}),a.stopDurationVital(V(e),{vitalKey:t?.vitalKey,context:V(t?.context),description:V(t?.description)})}),startOperation:c,succeedOperation:l,failOperation:u,startFeatureOperation:c,succeedFeatureOperation:l,failFeatureOperation:u,DEFAULT_TRACKED_RESOURCE_HEADERS:Dc});return f}function ah(e,t){if(e!==void 0){if(typeof e!=`string`){N.warn(`Invalid ${t} provided (expected a string, got ${typeof e}). Ignoring.`);return}return V(e)}}function oh(e,t){return{...e,init:e=>{Si(`DD_RUM`,e)},getInternalContext:t.getInternalContext,stopSession:t.stopSession,getViewContext:t.getViewContext,globalContext:t.globalContext,userContext:t.userContext,accountContext:t.accountContext}}function sh(e,{session:t,viewContext:n,errorType:r}){let i=t?t.id:`no-session-id`,a=[];return r!==void 0&&a.push(`error-type=${r}`),n&&(a.push(`seed=${n.id}`),a.push(`from=${n.startClocks.timeStamp}`)),`${ch(e)}${`/rum/replay/sessions/${i}`}?${a.join(`&`)}`}function ch(e){let t=e.site,n=e.subdomain||lh(e);return`https://${n?`${n}.`:``}${t}`}function lh(e){switch(e.site){case xe:case Se:return`app`;case be:return`dd`;default:return}}function uh(e,t,n,r){let i=cr([Ue(e,`profile`)],e=>{t.notify(15,{error:{message:e,source:Hn.AGENT,startClocks:j()}}),Xr(`Error reported to customer`,{"error.message":e})}),a=n(r);return{async send({event:e,...t}){let n=new FormData,r=wn(e);if(!r)throw Error(`Failed to serialize event`);n.append(`event`,new Blob([r],{type:`application/json`}),`event.json`);let o=r.length;for(let[e,r]of xr(t)){let t=wn(r);if(!t)throw Error(`Failed to serialize attachment`);let i=await dh(a,t);o+=i.outputBytesCount,n.append(e,new Blob([i.output]),e)}i.send({data:n,bytesCount:o})}}}function dh(e,t){return new Promise(n=>{e.write(t),e.finish(e=>{n(e)})})}function fh(e,t,n,r){let i=t.findTrackedSession(),a=ph(e,i,r);return sh(e,{viewContext:n.findView(),errorType:a,session:i})}function ph(e,t,n){if(!t)return`rum-not-tracked`;if(gu(t,e)===hu.OFF)return`incorrect-session-plan`;if(!n)return`replay-not-started`}function mh(e,t){if(!e.metricsEnabled)return{stop:L};let n,r,i,{unsubscribe:a}=t.subscribe(e=>{switch(e.type){case`start`:n={forced:e.forced,timestamp:O()},r=void 0,i=void 0;break;case`document-ready`:n&&(r=k(n.timestamp,O()));break;case`recorder-settled`:n&&(i=k(n.timestamp,O()));break;case`aborted`:case`deflate-encoder-load-failed`:case`recorder-load-failed`:case`succeeded`:a(),n&&$r(zr.RECORDER_INIT_METRICS_TELEMETRY_NAME,{metrics:hh(n.forced,i,k(n.timestamp,O()),e.type,r)})}});return{stop:a}}function hh(e,t,n,r,i){return{forced:e,loadRecorderModuleDuration:t,recorderInitDuration:n,result:r,waitForDocReadyDuration:i}}var gh=`modulepreload`,_h=function(e){return`/`+e},vh={},yh=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=_h(t,n),t=s(t),t in vh)return;vh[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:gh,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};async function bh(){try{return await P(xh)()}catch(e){hs({error:e,source:`Recorder`,scriptType:`module`})}}async function xh(){return(await yh(async()=>{let{startRecording:e}=await Promise.resolve().then(()=>_v);return{startRecording:e}},void 0)).startRecording}function Sh(e,t,n,r,i,a){let o=0,s;t.subscribe(Y.SESSION_EXPIRED,()=>{(o===2||o===3)&&(d(),o=1)}),t.subscribe(Y.SESSION_RENEWED,()=>{o===1&&u()});let c=new E;mh(a,c);let l=async l=>{c.notify({type:`start`,forced:l});let[u]=await Promise.all([Eh(c,{type:`recorder-settled`},bh()),Eh(c,{type:`document-ready`},Xa(`interactive`))]);if(o!==2){c.notify({type:`aborted`});return}if(!u){o=0,c.notify({type:`recorder-load-failed`});return}let d=i();if(!d){o=0,c.notify({type:`deflate-encoder-load-failed`});return}({stop:s}=u(t,e,n,r,d,a)),o=3,c.notify({type:`succeeded`})};function u(t){let r=n.findTrackedSession(),i=r?gu(r,e):void 0;if(!Ch(i,t)){o=1;return}if(wh(o))return;o=2;let a=Th(i,t)||!1;l(a).catch(T),a&&n.updateSessionState({forcedReplay:`1`})}function d(){o===3&&s?.(),o=0}return{start:u,stop:d,getSessionReplayLink(){return fh(e,n,r,o!==0)},isRecording:()=>o===3}}function Ch(e,t){return e!==void 0&&(e!==hu.OFF||t?.force)}function wh(e){return e===2||e===3}function Th(e,t){return t&&t.force&&e===hu.OFF}async function Eh(e,t,n){try{return await n}finally{e.notify(t)}}function Dh(){let e=0;return{strategy:{start(){e=1},stop(){e=2},isRecording:()=>!1,getSessionReplayLink:L},shouldStartImmediately(t){return e===1||e===0&&!t.startSessionReplayRecordingManually}}}function Oh(){if(gr()&&!hr(pr.RECORDS))return{start:L,stop:L,getReplayStats:()=>void 0,onRumStart:L,isRecording:()=>!1,getSessionReplayLink:()=>void 0};let{strategy:e,shouldStartImmediately:t}=Dh();return{start:t=>e.start(t),stop:()=>e.stop(),getSessionReplayLink:()=>e.getSessionReplayLink(),onRumStart:n,isRecording:()=>bs()===3&&e.isRecording(),getReplayStats:e=>bs()===3?As(e):void 0};function n(n,r,i,a,o,s){let c;function l(){return c||(o??=ys(r,`Datadog Session Replay`,()=>e.stop()),o&&(c=ms(o,fs.REPLAY))),c}e=Sh(r,n,i,a,l,s),t(r)&&e.start()}}function kh(){return x.Profiler!==void 0}function Ah(e){let t={status:`starting`};return e.assembleEventDefaults.register(({eventType:e})=>e!==J.VIEW&&e!==J.LONG_TASK&&e!==J.ACTION&&e!==J.VITAL?Fr:{type:e,_dd:{profiling:t}}),{get:()=>t,set:e=>{t=e}}}async function jh(){try{return await P(Mh)()}catch(e){hs({error:e,source:`Profiler`,scriptType:`module`})}}async function Mh(){return(await yh(async()=>{let{createRumProfiler:e}=await Promise.resolve().then(()=>zv);return{createRumProfiler:e}},void 0)).createRumProfiler}function Nh(){let e;function t(t,n,r,i,a,o){let s=i.findTrackedSession();if(!s||!Ph(r,s))return;let c=Ah(n);if(!P(kh)()){c.set({status:`error`,error_reason:`not-supported-by-browser`});return}P(jh)().then(n=>{if(!n){c.set({status:`error`,error_reason:`failed-to-lazy-load`});return}e=n(r,t,i,c,o,a,void 0),e.start()}).catch(T)}return{onRumStart:t,stop:()=>{e?.stop()}}}function Ph(e,t){return gr()?hr(pr.PROFILES):Vi(t.id,zi(e.sessionSampleRate,e.profilingSampleRate))}var Fh=ih(Oh(),Nh(),{startDeflateWorker:ys,createDeflateEncoder:ms,sdkName:`rum`});xi(x,`DD_RUM`,Fh);var Ih=e(i(),1),Lh,Rh,zh,Bh,Vh=[],Hh=[];function Uh(e={}){return{name:`react`,onInit({publicApi:t,initConfiguration:n}){Lh=t,Rh=e;for(let e of Vh)e(Rh,Lh);e.router&&(n.trackViewsManually=!0)},onRumStart({addError:e}){zh=e;for(let t of Hh)e&&t(e)},getConfigurationTelemetry(){let t=rt(`react`,Ih.version);return{router:!!e.router,integrations:it(t,e.router&&Bh)}}}}function Wh(e){zh?e(zh):Hh.push(e)}function Gh(e,t){let n=sn(`react error`),r=j();Wh(i=>{w(()=>{i({error:e,handlingStack:n,componentStack:t.componentStack??void 0,startClocks:r,context:{...typeof e==`object`&&e?e.dd_context:void 0,framework:`react`}})})})}var Kh={didCatch:!1,error:null};function qh(e,t=`ErrorBoundary`){let n=class extends Ih.Component{constructor(e){super(e),this.resetError=()=>{this.setState(Kh)},this.state=Kh}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}componentDidCatch(t,n){e(t,n)}render(){return this.state.didCatch?Ih.createElement(this.props.fallback,{error:this.state.error,resetError:this.resetError}):this.props.children}};return n.displayName=t,n}qh(Gh);function Jh(){let e=new Set,t=new WeakSet,n=new WeakMap;function r(e){let t=n.get(e);return t||(t={},n.set(e,t)),t}function i(e){let t=r(e),i=()=>n.get(e)===t;return{lastChangeHash:t.lastChangeHash,isCurrent:i,setLastChangeHash:e=>{i()&&(t.lastChangeHash=e)}}}function a(n){n.isConnected&&!t.has(n)&&e.add(n)}function o(t){e.delete(t)}function s(n){t.add(n),e.delete(n)}return{markCanvas:(e,t)=>{switch(t){case 1:a(e);return;case 0:o(e);return;case 2:s(e);return;default:return}},forgetCanvas:t=>{e.delete(t),n.delete(t)},resetCanvasBitmap:e=>{n.delete(e),a(e)},takeCapturableCanvases:()=>{let n=[];return e.forEach(r=>{r.isConnected?t.has(r)||(e.delete(r),n.push(r)):e.delete(r)}),n},startCaptureAttempt:i,reset:()=>{e.clear(),n=new WeakMap}}}var Yh={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9,Change:12},Z={AddString:0,AddNode:1,RemoveNode:2,Attribute:3,Text:4,Size:5,ScrollPosition:6,AddStyleSheet:7,AttachedStyleSheets:8,MediaPlaybackState:9,VisualViewport:10,AddRoleAnnotatedStrings:11,InputValue:12,InputSelection:13,ClearStrings:14,ImageContent:15},Q={Default:0,NodeName:1,AttributeName:2,AttributeValue:3,TextContent:4,FormInput:5,Css:6,Url:7,ResourceId:8},Xh={Selected:0,Deselected:1,Indeterminate:2},Zh={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},Qh={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},$h={Play:0,Pause:1},eg={V1:0,Change:1};function tg(e){return rg(void 0,void 0,e)}function ng(e,t,n){return rg(e,t,n)}function rg(e,t,n){let r={container:void 0,parentId:e,previousSiblingId:void 0,nextSiblingId:t},i=e=>r.previousSiblingId===e-1?0:r.nextSiblingId===void 0?r.parentId===void 0?null:e-r.parentId:r.nextSiblingId-e;return{advance(e){let t=n.getOrInsert(e),a=i(t);return r.previousSiblingId=t,{nodeId:t,insertionPoint:a}},ascend(){r.container&&(r=r.container)},descend(){r.previousSiblingId!==void 0&&(r={container:r,parentId:r.previousSiblingId,previousSiblingId:void 0,nextSiblingId:void 0})}}}function $(e,t){return{role:e,string:t}}function ig(e,t,n){return[$(Q.AttributeName,t),$(cg(e,t),n)]}function ag(e,t,n){let r=$(Q.AttributeName,t);return n===null?[r]:[r,$(cg(e,t),n)]}var og=new Set([`input`,`option`,`select`,`textarea`]),sg=new Set([`action`,`background`,`cite`,`data`,`formaction`,`href`,`longdesc`,`manifest`,`ping`,`poster`,`src`,`srcset`,`xlink:href`]);function cg(e,t){switch(t){case`value`:return og.has(e)?Q.FormInput:Q.AttributeValue;case`style`:return Q.Css;default:return sg.has(t)?Q.Url:Q.AttributeValue}}function lg(e){let t=[],n=ug(e),r=()=>{n.flushInto(t),n=ug(e)},i=()=>{r(),t.push([Z.ClearStrings]),e.clear()};return{add:(t,r)=>{n.add(t,r),e.size+n.pendingStringCount>=1e6&&i()},flush:()=>{r();let e=t;return t=[],e}}}function ug(e){let t={},n=new Map,r=[],i=0,a=!1,o=t=>{let r=e.get(t);if(r!==void 0)return r;a=!0;let o=n.get(t.role);o||(o={role:t.role,strings:new Map,references:0},n.set(t.role,o)),o.references++;let s=o.strings.get(t.string);if(s)return s;let c={literal:t,id:void 0};return o.strings.set(t.string,c),i++,c},s=e=>{for(let t=0,n=e.length;t<n;t++){let n=e[t];typeof n==`string`?e[t]=o($(Q.Default,n)):Array.isArray(n)?s(n):pg(n)&&(e[t]=o(n))}},c=()=>{if(n.size===0)return;let t=[Z.AddRoleAnnotatedStrings];for(let r of Array.from(n.values()).sort(fg)){let n=[r.role];for(let t of r.strings.values())t.id=e.getOrInsert(t.literal),n.push(t.literal.string);t.push(n)}return t};return{add:(e,n)=>{e in t||(t[e]=[e]),Array.isArray(n)&&(a=!1,s(n),a&&r.push(n)),t[e].push(n)},flushInto:e=>{let n=c();n&&e.push(n);for(let e of r)dg(e);[Z.AddNode,Z.RemoveNode,Z.Attribute,Z.Text,Z.InputValue,Z.InputSelection,Z.Size,Z.ScrollPosition,Z.AddStyleSheet,Z.AttachedStyleSheets,Z.MediaPlaybackState,Z.VisualViewport,Z.ImageContent].forEach(n=>{let r=t[n];r&&e.push(r)})},get pendingStringCount(){return i}}}function dg(e){for(let t=0,n=e.length;t<n;t++){let n=e[t];Array.isArray(n)?dg(n):mg(n)&&(e[t]=n.id)}}function fg(e,t){return t.references-e.references}function pg(e){return typeof e==`object`&&!!e&&`string`in e}function mg(e){return typeof e==`object`&&!!e&&`literal`in e}function hg(){return{cssText:{count:0,max:0,sum:0},serializationDuration:{count:0,max:0,sum:0}}}function gg(e,t,n){e[t].count+=1,e[t].max=Math.max(e[t].max,n),e[t].sum+=n}function _g(e,t){for(let n of[`cssText`,`serializationDuration`])e[n].count+=t[n].count,e[n].max=Math.max(e[n].max,t[n].max),e[n].sum+=t[n].sum}function vg(e,t,n,r,i,a){let o=lg(r.stringIds),s=hg(),c={addMetric(e,t){gg(s,e,t)},addNode(...e){o.add(Z.AddNode,e)},addStyleSheet(e,t,n){n?o.add(Z.AddStyleSheet,[e,t||[],n]):t?o.add(Z.AddStyleSheet,[e,t]):o.add(Z.AddStyleSheet,[e])},attachStyleSheets(e,t){let n=[e];for(let e of t)n.push(e);o.add(Z.AttachedStyleSheets,n)},removeNode(e){o.add(Z.RemoveNode,e)},setAttributes(e){o.add(Z.Attribute,e)},setInputSelection(e,t){let n=[e];for(let e of t)n.push(e);o.add(Z.InputSelection,n)},setInputValue(e,t){o.add(Z.InputValue,[e,t])},setMediaPlaybackState(e,t){o.add(Z.MediaPlaybackState,[e,t])},setScrollPosition(e,t,n){o.add(Z.ScrollPosition,[e,t,n])},setSize(e,t,n){o.add(Z.Size,[e,t,n])},setText(e,t){o.add(Z.Text,[e,t])},kind:e,scope:r},l=O();a(c),gg(s,`serializationDuration`,k(l,O()));let u=o.flush();u.length>0&&t(e===0||e===1?{data:u,format:eg.Change,type:Yh.FullSnapshot,timestamp:i}:{data:u,type:Yh.Change,timestamp:i}),n(s)}function yg(e,t){let n=e.tagName,r=e.value;if(tu(e,t)){let t=e.type;return n===`INPUT`&&(t===`button`||t===`submit`||t===`reset`)?r:!r||n===`OPTION`?void 0:`***`}if(n===`OPTION`||n===`SELECT`)return e.value;if(n===`INPUT`||n===`TEXTAREA`)return r}var bg=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,xg=/^[A-Za-z]+:|^\/\//,Sg=/^["']?data:.*,/i;function Cg(e,t){return e.replace(bg,(e,n,r,i,a,o)=>{let s=r||a||o;if(!t||!s||xg.test(s)||Sg.test(s))return e;let c=n||i||``;return`url(${c}${wg(s,t)}${c})`})}function wg(e,t){try{return ae(e,t).href}catch{return e}}function Tg(e){return e.tagName.toLowerCase()}function Eg(e,t){return`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${t}' style='background-color:silver'%3E%3C/svg%3E`}var Dg=[`width`,`height`];function Og(e){return dl(e)&&e.tagName===`CANVAS`}function kg(e){return Dg.includes(e.toLowerCase())}var Ag=1e6;function jg(e,t,n,r){if(t===X.HIDDEN)return null;let i=e.getAttribute(n),a=e.tagName;if(nu(a,n,i,t,r)){if(a===`IMG`){let t=e;if(t.naturalWidth>0)return Eg(t.naturalWidth,t.naturalHeight);let{width:n,height:r}=e.getBoundingClientRect();return n>0||r>0?Eg(n,r):Yl}return a===`SOURCE`?Yl:`***`}return i&&cl(i,Ag)}function Mg(e,t,n){if(t===X.HIDDEN)return[];let r=[],i=Tg(e);for(let a=0;a<e.attributes.length;a+=1){let o=e.attributes.item(a).name;o!==`value`&&o!==`selected`&&o!==`checked`&&Ng(r,e,i,o,t,n)}if(e.value&&(i===`textarea`||i===`select`||i===`option`||i===`input`)){let n=yg(e,t);n!==void 0&&r.push(ig(i,`value`,n))}else e.hasAttribute(`value`)&&Ng(r,e,i,`value`,t,n);i===`option`?e.selected&&!tu(e,t)&&r.push(ig(i,`selected`,``)):e.hasAttribute(`selected`)&&Ng(r,e,i,`selected`,t,n);let a=e;return i===`input`&&(a.type===`radio`||a.type===`checkbox`)?a.checked&&!tu(e,t)&&r.push(ig(i,`checked`,``)):e.hasAttribute(`checked`)&&Ng(r,e,i,`checked`,t,n),r}function Ng(e,t,n,r,i,a){let o=jg(t,i,r,a.scope.configuration);o!==null&&e.push(ig(n,r,o))}function Pg(e,t,n){if(t===X.HIDDEN)return{};let r={},i=Tg(e);if(i===`link`){let t=Fg(e.sheet);t&&(n.addMetric(`cssText`,t.length),r._cssText=t)}if(i===`style`&&e.sheet){let t=Fg(e.sheet);t&&(n.addMetric(`cssText`,t.length),r._cssText=t)}(i===`audio`||i===`video`)&&(r.rr_mediaState=e.paused?`paused`:`played`);let a,o;switch(n.kind){case 0:a=Math.round(e.scrollTop),o=Math.round(e.scrollLeft),(a||o)&&n.scope.elementsScrollPositions.set(e,{scrollTop:a,scrollLeft:o});break;case 1:n.scope.elementsScrollPositions.has(e)&&({scrollTop:a,scrollLeft:o}=n.scope.elementsScrollPositions.get(e))}return o&&(r.rr_scrollLeft=o),a&&(r.rr_scrollTop=a),r}function Fg(e){if(!e)return null;let t;try{t=e.rules||e.cssRules}catch{}return t?Cg(Array.from(t,Ga()?Ig:Lg).join(``),e.href):null}function Ig(e){return zg(e)&&e.selectorText.includes(`:`)?e.cssText.replace(/(\[[\w-]+[^\\])(:[^\]]+\])/g,`$1\\$2`):Lg(e)}function Lg(e){return Rg(e)&&Fg(e.styleSheet)||e.cssText}function Rg(e){return`styleSheet`in e}function zg(e){return`selectorText`in e}function Bg(e,t,n,r){if(t.parentNode?.nodeName===`STYLE`||n===X.HIDDEN||n===X.IGNORE)return;let i,a=eu(t);if(i=a?$l(a,n):n,i===X.HIDDEN){qg(e,t,r);return}if(i!==X.IGNORE){switch(t.nodeType){case t.CDATA_SECTION_NODE:Kg(e,t,r);break;case t.DOCUMENT_NODE:Vg(e,t,r);break;case t.DOCUMENT_FRAGMENT_NODE:Hg(e,t,r);break;case t.DOCUMENT_TYPE_NODE:Ug(e,t,r);break;case t.ELEMENT_NODE:Wg(e,t,i,r);break;case t.TEXT_NODE:Gg(e,t,i,r);break;default:return}switch(t.nodeType){case t.CDATA_SECTION_NODE:case t.DOCUMENT_TYPE_NODE:case t.TEXT_NODE:return}e.descend(),ml(t,t=>{Bg(e,t,i,r)}),e.ascend()}}function Vg(e,t,n){let{nodeId:r,insertionPoint:i}=e.advance(t);n.addNode(i,$(Q.NodeName,`#document`)),n.setScrollPosition(r,lu(),uu()),Jg(t.adoptedStyleSheets,r,n)}function Hg(e,t,n){let{nodeId:r,insertionPoint:i}=e.advance(t);if(!pl(t)){n.addNode(i,$(Q.NodeName,`#document-fragment`));return}n.addNode(i,$(Q.NodeName,`#shadow-root`)),n.scope.shadowRootsController.addShadowRoot(t,n.scope),Jg(t.adoptedStyleSheets,r,n)}function Ug(e,t,n){let{insertionPoint:r}=e.advance(t);n.addNode(r,$(Q.NodeName,`#doctype`),$(Q.AttributeValue,t.name),$(Q.AttributeValue,t.publicId),$(Q.Url,t.systemId))}function Wg(e,t,n,r){let{nodeId:i,insertionPoint:a}=e.advance(t),o=Mg(t,n,r);r.addNode(a,Xg(t),...o),Og(t)&&r.scope.canvasManager.markCanvas(t,1);let{_cssText:s,rr_mediaState:c,rr_scrollLeft:l,rr_scrollTop:u}=Pg(t,n,r),d=t;if(s!==void 0&&d.sheet){let e=r.scope.styleSheetIds.getOrInsert(d.sheet);r.addStyleSheet($(Q.Css,s)),r.attachStyleSheets(i,[e])}c===`played`?r.setMediaPlaybackState(i,$h.Play):c===`paused`&&r.setMediaPlaybackState(i,$h.Pause),(l!==void 0||u!==void 0)&&r.setScrollPosition(i,l||0,u||0)}function Gg(e,t,n,r){let{insertionPoint:i}=e.advance(t),a=au(t,n);r.addNode(i,$(Q.NodeName,`#text`),$(Q.TextContent,a))}function Kg(e,t,n){let{insertionPoint:r}=e.advance(t);n.addNode(r,$(Q.NodeName,`#cdata-section`))}function qg(e,t,n){if(!dl(t))return;let{nodeId:r,insertionPoint:i}=e.advance(t);n.addNode(i,Xg(t),ig(Tg(t),Kl,ql));let{width:a,height:o}=t.getBoundingClientRect();n.setSize(r,a,o)}function Jg(e,t,n){e&&e.length!==0&&n.attachStyleSheets(t,e.map(e=>Yg(e,n)))}function Yg(e,t){let n=Array.from(e.cssRules||e.rules,e=>$(Q.Css,e.cssText)),r=e.media.length>0?Array.from(e.media).map(e=>$(Q.Css,e)):void 0;return t.addMetric(`cssText`,n.reduce((e,t)=>e+t.string.length,0)),t.addStyleSheet(n,r,e.disabled),t.scope.styleSheetIds.getOrInsert(e)}function Xg(e){let t=e.nodeName;return Zg(e)?$(Q.NodeName,`svg>${t}`):$(Q.NodeName,t)}function Zg(e){return e.namespaceURI===`http://www.w3.org/2000/svg`}function Qg(e,t,n,r,i,a){a.resetIds(),vg(t,r,i,a,e,e=>{Bg(tg(a.nodeIds),n,a.configuration.defaultPrivacyLevel,e)})}function $g(e,t,n,r,i){vg(2,n,r,i,e,e=>e_(t,e))}function e_(e,t){let n=new Set,r=new Map,i=new Map,a=new Set;for(let t of e)switch(t.type){case`attributes`:{let e=t.target,n=r.get(e);n||(n=new Map,r.set(e,n));let i=t.attributeName;n.has(i)||n.set(i,t.oldValue);break}case`characterData`:i.has(t.target)||i.set(t.target,t.oldValue);break;case`childList`:for(let e=0;e<t.addedNodes.length;e++)n.add(t.addedNodes[e]);for(let e=0;e<t.removedNodes.length;e++)a.add(t.removedNodes[e])}let o=t.scope.nodeIds.nextId,s=new Map;t_(a,t),n_(n,s,t),r_(i,o,s,t),i_(r,o,s,t)}function t_(e,t){let n=t.scope.nodeIds;for(let r of e){let e=n.get(r);e!==void 0&&(o_(r,e=>{Og(e)&&t.scope.canvasManager.forgetCanvas(e),fl(e)&&t.scope.shadowRootsController.removeShadowRoot(e.shadowRoot),n.delete(e)}),t.removeNode(e))}}function n_(e,t,n){let r=n.scope.nodeIds;for(let i of e){if(!i.isConnected||r.get(i)!==void 0)continue;let e=hl(i);if(!e)continue;let a=r.get(e);if(a===void 0)continue;let o=Ql(e,n.scope.configuration.defaultPrivacyLevel,t);Bg(ng(a,a_(i,r),r),i,o,n)}}function r_(e,t,n,r){let i=r.scope.nodeIds;for(let[a,o]of e){if(a.textContent===o||!a.isConnected)continue;let e=i.get(a);if(e===void 0||e>=t)continue;let s=hl(a);if(!s)continue;let c=Ql(s,r.scope.configuration.defaultPrivacyLevel,n);if(c===X.HIDDEN||c===X.IGNORE)continue;let l=au(a,c);r.setText(e,$(Q.TextContent,l))}}function i_(e,t,n,r){let i=r.scope.nodeIds;for(let[a,o]of e){if(!a.isConnected)continue;let e=i.get(a);if(e===void 0||e>=t)continue;let s=Ql(a,r.scope.configuration.defaultPrivacyLevel,n);if(s===X.HIDDEN||s===X.IGNORE)continue;let c=Tg(a),l=[e];for(let[e,t]of o){if(Og(a)&&kg(e)&&r.scope.canvasManager.resetCanvasBitmap(a),a.getAttribute(e)===t)continue;if(e===`value`){let t=yg(a,s);t!==void 0&&l.push(ig(c,e,t));continue}let n=jg(a,s,e,r.scope.configuration);l.push(ag(c,e,n))}l.length>1&&r.setAttributes(l)}}function a_(e,t){let n=e.nextSibling;for(;n;){let e=t.get(n);if(e!==void 0)return e;n=n.nextSibling}}function o_(e,t){t(e),ml(e,e=>o_(e,t))}var s_=25;function c_(e){return Math.abs(e.pageTop-e.offsetTop-window.scrollY)>s_||Math.abs(e.pageLeft-e.offsetLeft-window.scrollX)>s_}var l_=(e,t)=>{let n=window.visualViewport,r={layoutViewportX:e,layoutViewportY:t,visualViewportX:e,visualViewportY:t};if(n)c_(n)?(r.layoutViewportX=Math.round(e+n.offsetLeft),r.layoutViewportY=Math.round(t+n.offsetTop)):(r.visualViewportX=Math.round(e-n.offsetLeft),r.visualViewportY=Math.round(t-n.offsetTop));else return r;return r},u_=e=>({scale:e.scale,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,pageLeft:e.pageLeft,pageTop:e.pageTop,height:e.height,width:e.width});function d_(e,t,n,r,i){f_(O(),0,t,n,i);let{unsubscribe:a}=e.subscribe(Y.VIEW_CREATED,e=>{r(),f_(e.startClocks.timeStamp,1,t,n,i)});return{stop:a}}function f_(e,t,n,r,i){let{width:a,height:o}=mu();n({data:{height:o,href:window.location.href,width:a},type:Yh.Meta,timestamp:e}),n({data:{has_focus:document.hasFocus()},type:Yh.Focus,timestamp:e}),Qg(e,t,document,n,r,i),window.visualViewport&&n({data:u_(window.visualViewport),type:Yh.VisualViewport,timestamp:e})}function p_(){let e=0,t=m_(),n=e=>t[e.role][e.string];return{clear(){e!==0&&(t=m_(),e=0)},get:n,getOrInsert(r){let i=n(r);return i===void 0&&(i=e++,t[r.role][r.string]=i),i},get size(){return e-0}}}function m_(){return{[Q.Default]:h_(),[Q.NodeName]:h_(),[Q.AttributeName]:h_(),[Q.AttributeValue]:h_(),[Q.TextContent]:h_(),[Q.FormInput]:h_(),[Q.Css]:h_(),[Q.Url]:h_(),[Q.ResourceId]:h_()}}function h_(){return Object.create(null)}function g_(){return y_(1)}function __(){return y_(0)}function v_(){return y_(0)}function y_(e){return b_(()=>new WeakMap,e)}function b_(e,t){let n=e(),r=t,i=e=>n.get(e);return{clear(){r!==t&&(n=e(),r=t)},delete(e){n.delete(e)},get:i,getOrInsert(e){let t=i(e);return t===void 0&&(t=r++,n.set(e,t)),t},get nextId(){return r},get size(){return r-t}}}function x_(e,t,n,r){let i={resetIds(){i.eventIds.clear(),i.nodeIds.clear(),i.stringIds.clear(),i.styleSheetIds.clear(),i.canvasManager.reset()},canvasManager:e,configuration:t,elementsScrollPositions:n,eventIds:g_(),nodeIds:__(),shadowRootsController:r,stringIds:p_(),styleSheetIds:v_()};return i}function S_(){let e=new WeakMap;return{set(t,n){(t!==document||document.scrollingElement)&&e.set(t===document?document.scrollingElement:t,n)},get(t){return e.get(t)},has(t){return e.has(t)}}}function C_(e){return!!e.changedTouches}function w_(e){return e.composed===!0&&fl(e.target)?e.composedPath()[0]:e.target}function T_(e,t,n=O()){return{data:{source:e,...t},type:Yh.IncrementalSnapshot,timestamp:n}}var E_=50;function D_(e,t){let{throttled:n,cancel:r}=Rt(n=>{let r=w_(n),i=t.nodeIds.get(r);if(i===void 0)return;let a=O_(n);if(!a)return;let o={id:i,timeOffset:0,x:a.x,y:a.y};e(T_(C_(n)?Zh.TouchMove:Zh.MouseMove,{positions:[o]}))},E_,{trailing:!1}),{stop:i}=hn(document,[z.MOUSE_MOVE,z.TOUCH_MOVE],n,{capture:!0,passive:!0});return{stop:()=>{i(),r()}}}function O_(e){let{clientX:t,clientY:n}=C_(e)?e.changedTouches[0]:e;if(window.visualViewport){let{visualViewportX:e,visualViewportY:r}=l_(t,n);t=e,n=r}if(Number.isFinite(t)&&Number.isFinite(n))return{x:t,y:n}}var k_={[z.POINTER_UP]:Qh.MouseUp,[z.MOUSE_DOWN]:Qh.MouseDown,[z.CLICK]:Qh.Click,[z.CONTEXT_MENU]:Qh.ContextMenu,[z.DBL_CLICK]:Qh.DblClick,[z.FOCUS]:Qh.Focus,[z.BLUR]:Qh.Blur,[z.TOUCH_START]:Qh.TouchStart,[z.TOUCH_END]:Qh.TouchEnd};function A_(e,t){return hn(document,Object.keys(k_),n=>{let r=w_(n),i=t.nodeIds.get(r);if(i===void 0||Ql(r,t.configuration.defaultPrivacyLevel)===X.HIDDEN)return;let a=k_[n.type],o;if(a!==Qh.Blur&&a!==Qh.Focus){let e=O_(n);if(!e)return;o={id:i,type:a,x:e.x,y:e.y}}else o={id:i,type:a};e({id:t.eventIds.getOrInsert(n),...T_(Zh.MouseInteraction,o)})},{capture:!0,passive:!0})}var j_=100;function M_(e,t,n){let{throttled:r,cancel:i}=Rt(e=>{let r=w_(e);if(!r)return;let i=n.nodeIds.get(r);if(i===void 0||Ql(r,n.configuration.defaultPrivacyLevel)===X.HIDDEN)return;let a=r===document?{scrollTop:uu(),scrollLeft:lu()}:{scrollTop:Math.round(r.scrollTop),scrollLeft:Math.round(r.scrollLeft)};n.elementsScrollPositions.set(r,a),t(T_(Zh.Scroll,{id:i,x:a.scrollLeft,y:a.scrollTop}))},j_),{stop:a}=B(e,z.SCROLL,r,{capture:!0,passive:!0});return{stop:()=>{a(),i()}}}var N_=200;function P_(e){let t=fu().subscribe(t=>{e(T_(Zh.ViewportResize,t))});return{stop:()=>{t.unsubscribe()}}}function F_(e){let t=window.visualViewport;if(!t)return{stop:L};let{throttled:n,cancel:r}=Rt(()=>{e({data:u_(t),type:Yh.VisualViewport,timestamp:O()})},N_,{trailing:!1}),{stop:i}=hn(t,[z.RESIZE,z.SCROLL],n,{capture:!0,passive:!0});return{stop:()=>{i(),r()}}}function I_(e,t){return hn(document,[z.PLAY,z.PAUSE],n=>{let r=w_(n);if(!r)return;let i=t.nodeIds.get(r);i!==void 0&&Ql(r,t.configuration.defaultPrivacyLevel)!==X.HIDDEN&&e(T_(Zh.MediaInteraction,{id:i,type:n.type===z.PLAY?$h.Play:$h.Pause}))},{capture:!0,passive:!0})}function L_(e,t){function n(e,n){if(!e?.ownerNode)return;let r=t.nodeIds.get(e.ownerNode);r!==void 0&&n(r)}let r=[R(CSSStyleSheet.prototype,`insertRule`,({target:t,parameters:[r,i]})=>{n(t,t=>e(T_(Zh.StyleSheetRule,{id:t,adds:[{rule:r,index:i}]})))}),R(CSSStyleSheet.prototype,`deleteRule`,({target:t,parameters:[r]})=>{n(t,t=>e(T_(Zh.StyleSheetRule,{id:t,removes:[{index:r}]})))})];typeof CSSGroupingRule<`u`?i(CSSGroupingRule):(i(CSSMediaRule),i(CSSSupportsRule));function i(t){r.push(R(t.prototype,`insertRule`,({target:t,parameters:[r,i]})=>{n(t.parentStyleSheet,n=>{let a=R_(t);a&&(a.push(i||0),e(T_(Zh.StyleSheetRule,{id:n,adds:[{rule:r,index:a}]})))})}),R(t.prototype,`deleteRule`,({target:t,parameters:[r]})=>{n(t.parentStyleSheet,n=>{let i=R_(t);i&&(i.push(r),e(T_(Zh.StyleSheetRule,{id:n,removes:[{index:i}]})))})}))}return{stop:()=>{r.forEach(e=>e.stop())}}}function R_(e){let t=[],n=e;for(;n.parentRule;){let e=Array.from(n.parentRule.cssRules).indexOf(n);t.unshift(e),n=n.parentRule}if(!n.parentStyleSheet)return;let r=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return t.unshift(r),t}function z_(e){return hn(window,[z.FOCUS,z.BLUR],()=>{e({data:{has_focus:document.hasFocus()},type:Yh.Focus,timestamp:O()})})}function B_(e,t,n){let r=e.subscribe(Y.VIEW_ENDED,()=>{n(),t({timestamp:O(),type:Yh.ViewEnd})});return{stop:()=>{r.unsubscribe()}}}var V_={type:1,selection:Xh.Deselected};function H_(e,t,n,r){let i=r.configuration.defaultPrivacyLevel,a=new WeakMap,o=e.nodeType!==e.DOCUMENT_NODE,s=(o?e.ownerDocument:e).defaultView;if(!s)return{stop:L};let{stop:c}=hn(e,o?[z.CHANGE]:[z.INPUT,z.CHANGE],e=>{let t=w_(e);(t instanceof s.HTMLInputElement||t instanceof s.HTMLTextAreaElement||t instanceof s.HTMLSelectElement)&&u(t)},{capture:!0,passive:!0}),l;if(o)l=L;else{let e=[mn(s.HTMLInputElement.prototype,`value`,u),mn(s.HTMLInputElement.prototype,`checked`,u),mn(s.HTMLSelectElement.prototype,`value`,u),mn(s.HTMLTextAreaElement.prototype,`value`,u),mn(s.HTMLSelectElement.prototype,`selectedIndex`,u)];l=()=>{e.forEach(e=>e.stop())}}return{stop:()=>{l(),c()}};function u(e){let o=Ql(e,i);if(o===X.HIDDEN)return;let s=e.type,c=e,l;if(s===`radio`||s===`checkbox`){if(tu(e,o))return;l={type:1,selection:W_(e)}}else if(U_(e)){if(tu(e,o))return;let t=e.options[e.selectedIndex];if(!t)return;c=t,l={type:1,selection:Xh.Selected}}else{let t=yg(e,o);if(t===void 0)return;l={type:0,value:t}}let u=d(c,l),f=[];if(s===`radio`&&e.checked&&G_(e,e=>{let t=d(e,V_);t!==void 0&&f.push(t)}),U_(e))for(let t=0;t<e.options.length;t++){let n=e.options[t];n!==c&&a.delete(n)}(u!==void 0||f.length!==0)&&vg(2,t,n,r,O(),e=>{u!==void 0&&(l.type===0?e.setInputValue(u,$(Q.FormInput,l.value)):e.setInputSelection(l.selection,[u])),f.length>0&&e.setInputSelection(Xh.Deselected,f)})}function d(e,t){let n=r.nodeIds.get(e);if(n===void 0)return;let i=a.get(e);if(!(i&&K_(i,t)))return a.set(e,t),n}}function U_(e){return e.tagName===`SELECT`}function W_(e){return e.checked?Xh.Selected:Xh.Deselected}function G_(e,t){e.name&&e.ownerDocument.querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`).forEach(n=>{let r=n;r!==e&&t(r)})}function K_(e,t){return e.type===0?t.type===0&&e.value===t.value:t.type===1&&e.selection===t.selection}var q_=100;function J_(e){let t=L,n=[];function r(){t(),e(n),n=[]}let{throttled:i,cancel:a}=Rt(r,16,{leading:!1});return{addMutations:e=>{n.length===0&&(t=yo(i,{timeout:q_}));for(let t of e)n.push(t)},flush:r,stop:()=>{t(),a()}}}function Y_(e,t,n,r){let i=Hc();if(!i)return{stop:L,flush:L};let a=J_(e=>{$g(O(),e.concat(o.takeRecords()),t,n,r)}),o=new i(C(a.addMutations));return o.observe(e,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:()=>{o.disconnect(),a.stop()},flush:()=>{a.flush()}}}var X_=[`clearRect`,`fillRect`,`strokeRect`,`fill`,`stroke`,`fillText`,`strokeText`,`drawImage`,`putImageData`,`drawFocusIfNeeded`,`reset`];function Z_(e){if(!e.configuration.sessionReplayCanvasRecording?.enable||e.configuration.sessionReplayCanvasRecording.maxFramesPerSecond===0||typeof CanvasRenderingContext2D>`u`)return{stop:L};let t=[];return X_.forEach(n=>{t.push(R(CanvasRenderingContext2D.prototype,n,({target:t,onPostCall:n})=>{n(()=>{e.nodeIds.get(t.canvas)!==void 0&&e.canvasManager.markCanvas(t.canvas,1)})}))}),{stop:()=>t.forEach(e=>e.stop())}}function Q_(e,t){let n=e.width,r=e.height,i=Math.min(1,t/Math.max(n,r)),a=Math.max(1,Math.round(n*i)),o=Math.max(1,Math.round(r*i)),s=document.createElement(`canvas`);s.width=a,s.height=o;let c=s.getContext(`2d`);if(c)return c.imageSmoothingQuality=`low`,c.drawImage(e,0,0,a,o),{canvasHeight:r,canvasWidth:n,source:s}}function $_(e){return new Promise(t=>{try{e.source.toBlob(e=>t(e??void 0),`image/png`)}catch{t(void 0)}})}function ev(e,t){let{height:n,width:r}=e.source,i=Math.min(1,t/Math.max(r,n)),a=Math.max(1,Math.round(r*i)),o=Math.max(1,Math.round(n*i)),s=document.createElement(`canvas`);s.width=a,s.height=o;let c=s.getContext(`2d`);if(!c)return Promise.resolve(void 0);c.imageSmoothingQuality=`low`,c.drawImage(e.source,0,0,a,o);let l=c.getImageData(0,0,a,o).data,u=P(x.crypto?.subtle);return u?u.digest(`SHA-256`,l).then(t=>nv(e.canvasWidth,e.canvasHeight,tv(t)),()=>nv(e.canvasWidth,e.canvasHeight,rv(l))):Promise.resolve(nv(e.canvasWidth,e.canvasHeight,rv(l)))}function tv(e){return Array.from(new Uint8Array(e),e=>e.toString(16).padStart(2,`0`)).join(``)}function nv(e,t,n){return`${e}x${t}:${n}`}function rv(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e[n],t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,`0`)}var iv=(e,t=L)=>{let n=e.canvasManager,r=e.configuration.sessionReplayCanvasRecording,i=r?.maxFramesPerSecond??0;if(!r?.enable||i===0)return{stop:L};let a=!1,o,s=D/i;function c(e){a||(o=F(()=>{l()},e))}async function l(){let e=performance.now();try{await u()}finally{let t=performance.now()-e;c(Math.max(s-t,s*.5))}}async function u(){let t=n.takeCapturableCanvases();if(!a)for(let r of t){let t=e.nodeIds.get(r);if(t===void 0){n.forgetCanvas(r);continue}if(Ql(r,e.configuration.defaultPrivacyLevel)!==X.ALLOW){n.markCanvas(r,1);continue}await f(r,t)}}function d(e,t){e.isCurrent()&&n.markCanvas(t,1)}async function f(e,i){let o=n.startCaptureAttempt(e),s=()=>a||!o.isCurrent();if(!s())try{let a=Q_(e,r?.maxImageDimension??1e3);if(!a){d(o,e);return}let c=await ev(a,r?.hashingMaxDimension??100);if(s())return;if(c===void 0){d(o,e);return}if(c===o.lastChangeHash)return;let l=await $_(a);if(s())return;if(!l){d(o,e);return}try{t({nodeId:i,changeHash:c,image:l})}catch{s()||n.markCanvas(e,1);return}o.setLastChangeHash(c)}catch(t){s()||n.markCanvas(e,av(t)?2:1)}}return c(s),{stop:()=>{a=!0,I(o)}}};function av(e){return e instanceof DOMException&&e.name===`SecurityError`}var ov=(e,t)=>{let n=new Map;return{addShadowRoot:(r,i)=>{if(n.has(r))return;let a=Y_(r,e,t,i),o=H_(r,e,t,i),s=M_(r,e,i);n.set(r,{flush:()=>a.flush(),stop:()=>{a.stop(),o.stop(),s.stop()}})},removeShadowRoot:e=>{let t=n.get(e);t&&(t.stop(),n.delete(e))},stop:()=>{n.forEach(({stop:e})=>e())},flush:()=>{n.forEach(({flush:e})=>e())}}};function sv(e){let{emitRecord:t,emitStats:n,configuration:r,lifeCycle:i}=e;if(!t||!n)throw Error(`emit functions are required`);let a=n=>{t(n),Vn(`record`,{record:n}),Os(e.viewHistory.findView().id)},o=Jh(),s=ov(a,n),c=x_(o,r,S_(),s),{stop:l}=d_(i,a,n,u,c);function u(){s.flush(),d.flush()}let d=Y_(document,a,n,c),f=[d,D_(a,c),A_(a,c),M_(document,a,c),P_(a),H_(document,a,n,c),I_(a,c),L_(a,c),z_(a),F_(a),B_(i,a,u),Z_(c),iv(c)];return{stop:()=>{s.stop(),f.forEach(e=>e.stop()),l()},flushMutations:u,shadowRootsController:s}}function cv(e,t,n,r){let i=new FormData;i.append(`segment`,new Blob([e],{type:`application/octet-stream`}),`${t.session.id}-${t.start}`);let a={raw_segment_size:r,compressed_segment_size:e.byteLength,...t},o=JSON.stringify(a);return i.append(`event`,new Blob([o],{type:`application/json`})),{data:i,bytesCount:e.byteLength,cssText:n.cssText,isFullSnapshot:t.index_in_view===0,rawSize:r,recordCount:t.records_count,serializationDuration:n.serializationDuration}}function lv({context:e,creationReason:t,encoder:n}){let r=0,i=e.view.id,a={start:1/0,end:-1/0,creation_reason:t,records_count:0,has_full_snapshot:!1,index_in_view:Es(i),source:`browser`,...e},o=hg();Ds(i);function s(e,t){a.start=Math.min(a.start,e.timestamp),a.end=Math.max(a.end,e.timestamp),a.records_count+=1,a.has_full_snapshot||=e.type===Yh.FullSnapshot||e.type===Yh.Change&&a.index_in_view===0;let i=n.isEmpty?`{"records":[`:`,`;n.write(i+JSON.stringify(e),e=>{r+=e,t(r)})}function c(e){_g(o,e)}function l(e){if(n.isEmpty)throw Error(`Empty segment flushed`);n.write(`],${JSON.stringify(a).slice(1)}\n`),n.finish(t=>{ks(a.view.id,t.rawBytesCount),e(a,o,t)})}return{addRecord:s,addStats:c,flush:l}}var uv=5*D;function dv(e,t,n,r,i,a){return fv(e,()=>pv(t.applicationId,n,r),i,a)}function fv(e,t,n,r){let i={status:0,nextSegmentCreationReason:`init`},{unsubscribe:a}=e.subscribe(Y.VIEW_CREATED,()=>{s(`view_change`)}),{unsubscribe:o}=e.subscribe(Y.PREPARE_URGENT_FLUSH,e=>{s(e)});function s(e){i.status===1&&(i.segment.flush((t,r,i)=>{let a=cv(i.output,t,r,i.rawBytesCount);wr(e)&&e!==Sr.HIDDEN?n.sendOnExit(a):n.send(a)}),I(i.expirationTimeoutId)),i=e===`stop`?{status:2}:{status:0,nextSegmentCreationReason:e}}return{addRecord:e=>{if(i.status!==2){if(i.status===0){let e=t();if(!e)return;i={status:1,segment:lv({encoder:r,context:e,creationReason:i.nextSegmentCreationReason}),expirationTimeoutId:F(()=>{s(`segment_duration_limit`)},uv)}}i.segment.addRecord(e,e=>{e>6e4&&s(`segment_bytes_limit`)})}},addStats:e=>{i.status===1&&i.segment.addStats(e)},stop:()=>{s(`stop`),a(),o()}}}function pv(e,t,n){let r=t.findTrackedSession(),i=n.findView();if(r&&i)return{application:{id:e},session:{id:r.id},view:{id:i.id}}}function mv(e,t){if(!e.metricsEnabled)return{stop:L};let{unsubscribe:n}=t.subscribe(e=>{if(e.type===`failure`||e.type===`queue-full`||e.type===`success`&&e.payload.isFullSnapshot){let t=hv(e.type,e.bandwidth,e.payload);$r(zr.SEGMENT_METRICS_TELEMETRY_NAME,{metrics:t})}});return{stop:n}}function hv(e,t,n){return{cssText:{count:n.cssText.count,max:n.cssText.max,sum:n.cssText.sum},encoding:{fullSnapshot:`change`,incrementalSnapshot:`change`},isFullSnapshot:n.isFullSnapshot,ongoingRequests:{count:t.ongoingRequestCount,totalSize:t.ongoingByteCount},recordCount:n.recordCount,result:e,serializationDuration:{count:n.serializationDuration.count,max:n.serializationDuration.max,sum:n.serializationDuration.sum},size:{compressed:n.bytesCount,raw:n.rawSize}}}function gv(e){let t=mr();return{addRecord:n=>{let r=e.findView();t.send(`record`,n,r.id)}}}var _v=t({startRecording:()=>vv});function vv(e,t,n,r,i,a,o){let s=[],c=o||cr([Ue(t,`replay`)],t=>{e.notify(Y.RAW_ERROR_COLLECTED,{error:{message:t,source:Hn.AGENT,startClocks:j()}}),Xr(`Error reported to customer`,{"error.message":t})},6e4),l,u;if(gr())({addRecord:l}=gv(r)),u=L;else{let o=dv(e,t,n,r,c,i);l=o.addRecord,u=o.addStats,s.push(o.stop);let d=mv(a,c.observable);s.push(d.stop)}let{stop:d}=sv({emitRecord:l,emitStats:u,configuration:t,lifeCycle:e,viewHistory:r});return s.push(d),{stop:()=>{s.forEach(e=>e())}}}function yv(){let e=mr();return t=>{e.send(`profile`,t)}}function bv(e,t,n){let r=uh(e,t,n,fs.PROFILING);return({profile:e,trace:t})=>{let n={event:e,"wall-time.json":t};r.send(n)}}var xv=/\/(?![vV]\d{1,2}\/)([^/\d?]*\d+[^/?]*)/g;function Sv(e){return e?e.replace(xv,`/?`):`/`}var Cv=(e,t)=>e||Sv(t);function wv(e,t,n){let r=Ln(t),i=Tv(e,t.applicationId,n),a=Ov(r);return{...i,attachments:[`wall-time.json`],start:new Date(e.startClocks.timeStamp).toISOString(),end:new Date(e.endClocks.timeStamp).toISOString(),family:`chrome`,runtime:`chrome`,format:`json`,version:4,tags_profiler:a.join(`,`),_dd:{clock_drift:ze()}}}function Tv(e,t,n){let{ids:r,names:i}=Ev(e.views),a=e.longTasks.map(e=>e.id).filter(e=>e!==void 0),o=e.actions?.map(e=>e.id).filter(e=>e!==void 0)??[],{ids:s,labels:c}=Dv(e.vitals),l={application:{id:t}};return n&&(l.session={id:n}),r.length&&(l.view={id:r,name:i}),a.length&&(l.long_task={id:a}),o.length&&(l.action={id:o,label:[]}),s.length&&(l.vital={id:s,label:c}),l}function Ev(e){let t={ids:[],names:[]};for(let n of e)t.ids.push(n.viewId),n.viewName&&t.names.push(n.viewName);return t.names=Array.from(new Set(t.names)),t}function Dv(e){let t={ids:[],labels:[]};if(!e)return t;for(let n of e)t.ids.push(n.id),t.labels.push(n.label);return t.labels=Array.from(new Set(t.labels)),t}function Ov(e){return e.concat([`language:javascript`,`runtime:chrome`,`family:chrome`,`host:browser`])}var kv=Ui;function Av(e){let t=Ri({expireDelay:kv});return e.subscribe(Y.RAW_RUM_EVENT_COLLECTED,({rawRumEvent:e,startClocks:n,duration:r})=>{e.type===`long_task`&&t.add({id:e.long_task.id,startClocks:n,duration:r,entryType:e.long_task.entry_type===Ns.LONG_TASK?_l.LONG_TASK:_l.LONG_ANIMATION_FRAME},n.relative).close(je(n.relative,r))}),t}var jv=Ui;function Mv(e){let t=Ri({expireDelay:jv});return e.subscribe(Y.ACTION_STARTED,e=>{t.add({id:e.id,label:``,startClocks:e.startClocks,duration:void 0},e.startClocks.relative)}),e.subscribe(Y.RAW_RUM_EVENT_COLLECTED,({rawRumEvent:e,startClocks:n,duration:r})=>{if(e.type===`action`){let i=t.getEntries(n.relative).find(t=>t.value.id===e.action.id),a=r??0;i?(i.value.duration=a,i.close(je(n.relative,a))):t.add({id:e.action.id,label:``,startClocks:n,duration:r},n.relative).close(je(n.relative,a))}}),t}var Nv=Ui;function Pv(e){let t=Ri({expireDelay:Nv});return e.subscribe(Y.DURATION_VITAL_STARTED,e=>{t.add({id:e.id,type:Ls.DURATION,startClocks:e.startClocks,duration:void 0,label:e.name},e.startClocks.relative)}),e.subscribe(Y.RAW_RUM_EVENT_COLLECTED,({rawRumEvent:e,startClocks:n,duration:r})=>{if(e.type!==`vital`)return;if(e.vital.type===Ls.OPERATION_STEP){if(e.vital.step_type===`start`)t.add({id:e.vital.id,type:e.vital.type,operationKey:e.vital.operation_key,startClocks:n,label:e.vital.name},n.relative);else if(e.vital.step_type===`end`){let r=t.findAllEntries().find(t=>t.value.type===Ls.OPERATION_STEP&&t.value.label===e.vital.name&&t.value.operationKey===e.vital.operation_key);if(!r)return;r.value.duration=k(r.value.startClocks.relative,n.relative),r.close(n.relative)}return}let i=t.getEntries(n.relative).find(t=>t.value.id===e.vital.id);if(i){i.value.duration=r,i.close(je(n.relative,r));return}t.add({id:e.vital.id,type:e.vital.type,operationKey:e.vital.operation_key,startClocks:n,duration:r,label:e.vital.name},n.relative).close(je(n.relative,r))}),t}function Fv(e,t){let n=e?.data?.attributes;if(!n||typeof n.admitted!=`boolean`||typeof n.reason!=`string`)return t;let r=n.reason===`backend_client_not_initialized`?`backend_unavailable`:n.reason;return{decision:n.admitted?`quota_ok`:`quota_ko`,reason:r}}function Iv(e,t){return Ge({proxy:e.proxy,site:e.site,path:`/api/v2/profiling/quota`,parameters:`session_id=${t}`,subdomain:`quota`})}function Lv(e,t,n=5e3){let r=Iv(e,t),i=new AbortController,a,o=Kn(r,{credentials:`omit`,signal:i.signal,headers:new Headers({"DD-CLIENT-TOKEN":e.clientToken})}).then(e=>{let t=e.status===429?{decision:`quota_ko`,reason:`quota_exceeded`}:{decision:`quota_ok`,reason:`api-error`};return e.json().then(e=>(I(a),Fv(e,t)),()=>(I(a),t))}).catch(()=>(I(a),{decision:`quota_ok`,reason:`api-error`})),s=new Promise(e=>{a=F(()=>{i.abort(),e({decision:`quota_ok`,reason:`timeout`})},n)});return Promise.race([o,s])}function Rv(e){let t=new Map(oi(e)?.map(e=>[e.url,e.id])),n=[];return e.forEach((e,r)=>{let i=t.get(e);i!==void 0&&n.push({resourceId:r,debugId:i})}),n.length?n:void 0}var zv=t({DEFAULT_RUM_PROFILER_CONFIGURATION:()=>Bv,createRumProfiler:()=>Vv}),Bv={sampleIntervalMs:10,collectIntervalMs:6e4,minProfileDurationMs:5e3};function Vv(e,t,n,r,i,a,o=Bv){let s=gr()?P(yv)():P(bv)(e,t,i),c,l=[],u=P(Av)(t),d=P(Mv)(t),f=P(Pv)(t),p={state:`stopped`,stateReason:`initializing`},m=0;t.subscribe(Y.SESSION_EXPIRED,()=>{v(`session-expired`)}),t.subscribe(Y.SESSION_RENEWED,()=>{if(p.state===`stopped`&&(p.stateReason===`session-expired`||p.stateReason===`quota_ko`)){let t=n.findTrackedSession();if(!t||!Vi(t.id,zi(e.sessionSampleRate,e.profilingSampleRate)))return;h()}});function h(){if(p.state===`running`)return;let e=a.findView();c=e?{startClocks:e.startClocks,viewId:e.id,viewName:Cv(e.name,document.location.pathname)}:void 0,l.push(B(window,z.VISIBILITY_CHANGE,ae).stop,B(window,z.BEFORE_UNLOAD,oe).stop),b(),g()}function g(){if(gr())return;let t=++m,r=n.findTrackedSession()?.id;r&&P(Lv)(e,r).then(e=>{t===m&&(p.state===`running`||p.state===`paused`)&&e.decision===`quota_ko`&&v(`quota_ko`,e.reason)}).catch(T)}function _(){v(`stopped-by-user`)}function v(e,t){te(e),l.forEach(e=>e()),l.length=0,r.set({status:`stopped`,error_reason:void 0,quota_reason:t})}function y(e){if(e.state===`running`)return{cleanupTasks:e.cleanupTasks};let n=[],r=t.subscribe(Y.VIEW_CREATED,e=>{let t={viewId:e.id,viewName:Cv(e.name,document.location.pathname),startClocks:e.startClocks};S(t),c=t});return n.push(r.unsubscribe),{cleanupTasks:n}}function b(){let e=x.Profiler;if(!e)throw r.set({status:`error`,error_reason:`not-supported-by-browser`}),Error(`RUM Profiler is not supported in this browser.`);p.state===`running`&&ee(p);let{cleanupTasks:t}=y(p),i;try{i=new e({sampleInterval:o.sampleIntervalMs,maxBufferSize:Math.round(o.collectIntervalMs*1.5/o.sampleIntervalMs)})}catch(e){e instanceof Error&&e.message.includes(`disabled by Document Policy`)?(N.warn("[DD_RUM] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.",e),r.set({status:`error`,error_reason:`missing-document-policy-header`})):r.set({status:`error`,error_reason:`unexpected-exception`});return}r.set({status:`running`,error_reason:void 0}),p={state:`running`,startClocks:j(),profiler:i,timeoutId:F(b,o.collectIntervalMs),views:[],cleanupTasks:t,longTasks:[],sessionId:n.findTrackedSession()?.id},S(c),i.addEventListener(`samplebufferfull`,ie)}function ee(e){I(e.timeoutId),e.profiler.removeEventListener(`samplebufferfull`,ie);let{startClocks:t,views:n,sessionId:r}=e;e.profiler.stop().then(e=>{let i=j(),a=k(t.relative,i.relative),s=u.findAll(t.relative,a),c=d.findAll(t.relative,a),l=f.findAll(t.relative,a).map(e=>({id:e.id,label:e.label,startClocks:e.startClocks,duration:e.duration})),p=a<o.minProfileDurationMs;s.length===0&&p||re(Object.assign({},e,{startClocks:t,endClocks:i,clocksOrigin:Ne(),longTasks:s,actions:c,vitals:l,views:n,sampleInterval:o.sampleIntervalMs,debugIds:Rv(e.resources)}),r)}).catch(T)}function te(e){if(p.state!==`running`){(p.state===`paused`||p.state===`stopped`&&e===`stopped-by-user`)&&(p={state:`stopped`,stateReason:e});return}let t=p;p={state:`stopped`,stateReason:e},t.cleanupTasks.forEach(e=>e()),e===`quota_ko`?(I(t.timeoutId),t.profiler.removeEventListener(`samplebufferfull`,ie),t.profiler.stop().catch(T)):ee(t)}function ne(){if(p.state!==`running`)return;let e=p;p={state:`paused`},e.cleanupTasks.forEach(e=>e()),ee(e)}function S(e){p.state===`running`&&e&&p.views.push(e)}function re(t,n){let r={profile:wv(t,e,n),trace:t};s(r)}function ie(){b()}function ae(){document.visibilityState===`hidden`&&p.state===`running`?ne():document.visibilityState===`visible`&&p.state===`paused`&&b()}function oe(){b()}function se(){return p.state===`stopped`}function ce(){return p.state===`running`}function le(){return p.state===`paused`}return{start:h,stop:_,isStopped:se,isRunning:ce,isPaused:le}}export{i as a,yh as i,Uh as n,Fh as r,Gh as t};