ghost 5.36.1 → 5.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/components/tryghost-adapter-cache-memory-ttl-5.37.0.tgz +0 -0
  2. package/components/tryghost-adapter-cache-redis-5.37.0.tgz +0 -0
  3. package/components/tryghost-adapter-manager-5.37.0.tgz +0 -0
  4. package/components/tryghost-api-framework-5.37.0.tgz +0 -0
  5. package/components/tryghost-api-version-compatibility-service-5.37.0.tgz +0 -0
  6. package/components/tryghost-audience-feedback-5.37.0.tgz +0 -0
  7. package/components/tryghost-bootstrap-socket-5.37.0.tgz +0 -0
  8. package/components/tryghost-constants-5.37.0.tgz +0 -0
  9. package/components/{tryghost-custom-theme-settings-service-5.36.1.tgz → tryghost-custom-theme-settings-service-5.37.0.tgz} +0 -0
  10. package/components/tryghost-data-generator-5.37.0.tgz +0 -0
  11. package/components/tryghost-domain-events-5.37.0.tgz +0 -0
  12. package/components/tryghost-dynamic-routing-events-5.37.0.tgz +0 -0
  13. package/components/tryghost-email-analytics-provider-mailgun-5.37.0.tgz +0 -0
  14. package/components/tryghost-email-analytics-service-5.37.0.tgz +0 -0
  15. package/components/tryghost-email-content-generator-5.37.0.tgz +0 -0
  16. package/components/tryghost-email-events-5.37.0.tgz +0 -0
  17. package/components/{tryghost-email-service-5.36.1.tgz → tryghost-email-service-5.37.0.tgz} +0 -0
  18. package/components/tryghost-email-suppression-list-5.37.0.tgz +0 -0
  19. package/components/tryghost-event-aware-cache-wrapper-5.37.0.tgz +0 -0
  20. package/components/{tryghost-express-dynamic-redirects-5.36.1.tgz → tryghost-express-dynamic-redirects-5.37.0.tgz} +0 -0
  21. package/components/tryghost-external-media-inliner-5.37.0.tgz +0 -0
  22. package/components/tryghost-extract-api-key-5.37.0.tgz +0 -0
  23. package/components/tryghost-html-to-plaintext-5.37.0.tgz +0 -0
  24. package/components/tryghost-i18n-5.37.0.tgz +0 -0
  25. package/components/tryghost-importer-handler-content-files-5.37.0.tgz +0 -0
  26. package/components/tryghost-importer-revue-5.37.0.tgz +0 -0
  27. package/components/{tryghost-job-manager-5.36.1.tgz → tryghost-job-manager-5.37.0.tgz} +0 -0
  28. package/components/tryghost-link-redirects-5.37.0.tgz +0 -0
  29. package/components/tryghost-link-replacer-5.37.0.tgz +0 -0
  30. package/components/tryghost-link-tracking-5.37.0.tgz +0 -0
  31. package/components/tryghost-magic-link-5.37.0.tgz +0 -0
  32. package/components/tryghost-mailgun-client-5.37.0.tgz +0 -0
  33. package/components/{tryghost-member-attribution-5.36.1.tgz → tryghost-member-attribution-5.37.0.tgz} +0 -0
  34. package/components/tryghost-member-events-5.37.0.tgz +0 -0
  35. package/components/tryghost-members-api-5.37.0.tgz +0 -0
  36. package/components/tryghost-members-csv-5.37.0.tgz +0 -0
  37. package/components/{tryghost-members-events-service-5.36.1.tgz → tryghost-members-events-service-5.37.0.tgz} +0 -0
  38. package/components/tryghost-members-importer-5.37.0.tgz +0 -0
  39. package/components/{tryghost-members-offers-5.36.1.tgz → tryghost-members-offers-5.37.0.tgz} +0 -0
  40. package/components/tryghost-members-payments-5.37.0.tgz +0 -0
  41. package/components/{tryghost-members-ssr-5.36.1.tgz → tryghost-members-ssr-5.37.0.tgz} +0 -0
  42. package/components/tryghost-members-stripe-service-5.37.0.tgz +0 -0
  43. package/components/tryghost-milestones-5.37.0.tgz +0 -0
  44. package/components/tryghost-minifier-5.37.0.tgz +0 -0
  45. package/components/tryghost-mw-api-version-mismatch-5.37.0.tgz +0 -0
  46. package/components/tryghost-mw-cache-control-5.37.0.tgz +0 -0
  47. package/components/tryghost-mw-error-handler-5.37.0.tgz +0 -0
  48. package/components/tryghost-mw-session-from-token-5.37.0.tgz +0 -0
  49. package/components/tryghost-mw-update-user-last-seen-5.37.0.tgz +0 -0
  50. package/components/tryghost-mw-version-match-5.37.0.tgz +0 -0
  51. package/components/tryghost-mw-vhost-5.37.0.tgz +0 -0
  52. package/components/tryghost-oembed-service-5.37.0.tgz +0 -0
  53. package/components/tryghost-package-json-5.37.0.tgz +0 -0
  54. package/components/tryghost-referrers-5.37.0.tgz +0 -0
  55. package/components/tryghost-security-5.37.0.tgz +0 -0
  56. package/components/tryghost-session-service-5.37.0.tgz +0 -0
  57. package/components/tryghost-settings-path-manager-5.37.0.tgz +0 -0
  58. package/components/tryghost-slack-notifications-5.37.0.tgz +0 -0
  59. package/components/{tryghost-staff-service-5.36.1.tgz → tryghost-staff-service-5.37.0.tgz} +0 -0
  60. package/components/tryghost-stats-service-5.37.0.tgz +0 -0
  61. package/components/tryghost-tiers-5.37.0.tgz +0 -0
  62. package/components/tryghost-update-check-service-5.37.0.tgz +0 -0
  63. package/components/tryghost-verification-trigger-5.37.0.tgz +0 -0
  64. package/components/tryghost-version-notifications-data-service-5.37.0.tgz +0 -0
  65. package/components/tryghost-webmentions-5.37.0.tgz +0 -0
  66. package/content/themes/casper/assets/built/screen.css +1 -1
  67. package/content/themes/casper/assets/built/screen.css.map +1 -1
  68. package/content/themes/casper/assets/css/screen.css +44 -30
  69. package/content/themes/casper/default.hbs +2 -2
  70. package/content/themes/casper/error.hbs +2 -2
  71. package/content/themes/casper/package.json +1 -1
  72. package/core/boot.js +4 -2
  73. package/core/built/admin/assets/chunk.143.27cd10a38f877e715b35.js +49 -0
  74. package/core/built/admin/assets/chunk.178.dd6cf17fb0986acf19d6.js +10 -0
  75. package/core/built/admin/assets/{chunk.502.800e1515996bcc900013.js → chunk.652.bb618bc5abf23bed4e87.js} +855 -784
  76. package/core/built/admin/assets/{chunk.79.53e8aa9671b2d5dae8ba.js → chunk.79.4a959c324df25480b90e.js} +191 -184
  77. package/core/built/admin/assets/{ghost-b828e9e3c161aae92909c2e163656bb1.js → ghost-2948791640be026b987b88f89034bc85.js} +260 -238
  78. package/core/built/admin/assets/ghost-dark-6ea4b338f17a43c204b7c1e207b90cd7.css +1 -0
  79. package/core/built/admin/assets/ghost-efbe4dcc249d119a955b038aae5c980d.css +1 -0
  80. package/core/built/admin/assets/{vendor-c4684647d4f5213e5dbb6763de430e7e.js → vendor-b982e3bf1020bff77b2a3c44d5f59e55.js} +176 -191
  81. package/core/built/admin/index.html +6 -6
  82. package/core/frontend/apps/amp/lib/helpers/amp_content.js +1 -5
  83. package/core/frontend/meta/asset-url.js +9 -0
  84. package/core/server/api/endpoints/db.js +17 -0
  85. package/core/server/api/endpoints/mentions.js +2 -1
  86. package/core/server/api/endpoints/utils/serializers/output/posts.js +2 -2
  87. package/core/server/data/db/backup.js +13 -13
  88. package/core/server/data/importer/handlers/image.js +2 -2
  89. package/core/server/data/importer/import-manager.js +56 -4
  90. package/core/server/data/importer/importers/ContentFileImporter.js +128 -0
  91. package/core/server/data/schema/commands.js +21 -10
  92. package/core/server/models/mention.js +13 -0
  93. package/core/server/run-update-check.js +3 -1
  94. package/core/server/services/media-inliner/index.js +1 -0
  95. package/core/server/services/media-inliner/service.js +16 -0
  96. package/core/server/services/members/stats/members-stats.js +13 -9
  97. package/core/server/services/mentions/BookshelfMentionRepository.js +12 -1
  98. package/core/server/services/mentions/MentionController.js +7 -1
  99. package/core/server/services/mentions/WebmentionMetadata.js +3 -2
  100. package/core/server/services/mentions/service.js +1 -4
  101. package/core/server/{analytics-events.js → services/segment/index.js} +4 -3
  102. package/core/server/services/stripe/config.js +4 -0
  103. package/core/server/update-check.js +5 -3
  104. package/core/server/web/api/endpoints/admin/app.js +5 -4
  105. package/core/server/web/api/endpoints/admin/routes.js +6 -0
  106. package/core/server/web/api/middleware/index.js +1 -2
  107. package/core/shared/config/overrides.json +34 -0
  108. package/core/shared/labs.js +3 -2
  109. package/package.json +153 -148
  110. package/yarn.lock +765 -820
  111. package/components/tryghost-adapter-cache-memory-ttl-5.36.1.tgz +0 -0
  112. package/components/tryghost-adapter-cache-redis-5.36.1.tgz +0 -0
  113. package/components/tryghost-adapter-manager-5.36.1.tgz +0 -0
  114. package/components/tryghost-api-framework-5.36.1.tgz +0 -0
  115. package/components/tryghost-api-version-compatibility-service-5.36.1.tgz +0 -0
  116. package/components/tryghost-audience-feedback-5.36.1.tgz +0 -0
  117. package/components/tryghost-bootstrap-socket-5.36.1.tgz +0 -0
  118. package/components/tryghost-constants-5.36.1.tgz +0 -0
  119. package/components/tryghost-data-generator-5.36.1.tgz +0 -0
  120. package/components/tryghost-domain-events-5.36.1.tgz +0 -0
  121. package/components/tryghost-dynamic-routing-events-5.36.1.tgz +0 -0
  122. package/components/tryghost-email-analytics-provider-mailgun-5.36.1.tgz +0 -0
  123. package/components/tryghost-email-analytics-service-5.36.1.tgz +0 -0
  124. package/components/tryghost-email-content-generator-5.36.1.tgz +0 -0
  125. package/components/tryghost-email-events-5.36.1.tgz +0 -0
  126. package/components/tryghost-email-suppression-list-5.36.1.tgz +0 -0
  127. package/components/tryghost-event-aware-cache-wrapper-5.36.1.tgz +0 -0
  128. package/components/tryghost-extract-api-key-5.36.1.tgz +0 -0
  129. package/components/tryghost-html-to-plaintext-5.36.1.tgz +0 -0
  130. package/components/tryghost-i18n-5.36.1.tgz +0 -0
  131. package/components/tryghost-importer-revue-5.36.1.tgz +0 -0
  132. package/components/tryghost-link-redirects-5.36.1.tgz +0 -0
  133. package/components/tryghost-link-replacer-5.36.1.tgz +0 -0
  134. package/components/tryghost-link-tracking-5.36.1.tgz +0 -0
  135. package/components/tryghost-magic-link-5.36.1.tgz +0 -0
  136. package/components/tryghost-mailgun-client-5.36.1.tgz +0 -0
  137. package/components/tryghost-member-events-5.36.1.tgz +0 -0
  138. package/components/tryghost-members-api-5.36.1.tgz +0 -0
  139. package/components/tryghost-members-csv-5.36.1.tgz +0 -0
  140. package/components/tryghost-members-importer-5.36.1.tgz +0 -0
  141. package/components/tryghost-members-payments-5.36.1.tgz +0 -0
  142. package/components/tryghost-members-stripe-service-5.36.1.tgz +0 -0
  143. package/components/tryghost-milestones-5.36.1.tgz +0 -0
  144. package/components/tryghost-minifier-5.36.1.tgz +0 -0
  145. package/components/tryghost-mw-api-version-mismatch-5.36.1.tgz +0 -0
  146. package/components/tryghost-mw-cache-control-5.36.1.tgz +0 -0
  147. package/components/tryghost-mw-error-handler-5.36.1.tgz +0 -0
  148. package/components/tryghost-mw-session-from-token-5.36.1.tgz +0 -0
  149. package/components/tryghost-mw-update-user-last-seen-5.36.1.tgz +0 -0
  150. package/components/tryghost-mw-vhost-5.36.1.tgz +0 -0
  151. package/components/tryghost-oembed-service-5.36.1.tgz +0 -0
  152. package/components/tryghost-package-json-5.36.1.tgz +0 -0
  153. package/components/tryghost-referrers-5.36.1.tgz +0 -0
  154. package/components/tryghost-security-5.36.1.tgz +0 -0
  155. package/components/tryghost-session-service-5.36.1.tgz +0 -0
  156. package/components/tryghost-settings-path-manager-5.36.1.tgz +0 -0
  157. package/components/tryghost-slack-notifications-5.36.1.tgz +0 -0
  158. package/components/tryghost-stats-service-5.36.1.tgz +0 -0
  159. package/components/tryghost-tiers-5.36.1.tgz +0 -0
  160. package/components/tryghost-update-check-service-5.36.1.tgz +0 -0
  161. package/components/tryghost-verification-trigger-5.36.1.tgz +0 -0
  162. package/components/tryghost-version-notifications-data-service-5.36.1.tgz +0 -0
  163. package/components/tryghost-webmentions-5.36.1.tgz +0 -0
  164. package/core/built/admin/assets/chunk.143.26ea9f26571d656653f0.js +0 -49
  165. package/core/built/admin/assets/chunk.178.dd71b3a764b73facc400.js +0 -11
  166. package/core/built/admin/assets/ghost-7ecf5c7934d90798485ee5ac2956f7fe.css +0 -1
  167. package/core/built/admin/assets/ghost-dark-e50717df8e57d3e7fee67a0bcea895ad.css +0 -1
  168. package/core/frontend/src/cards/css/before-after.css +0 -81
  169. package/core/frontend/src/cards/js/before-after.js +0 -36
  170. package/core/server/data/importer/importers/image.js +0 -76
  171. package/core/server/data/schema/clients/index.js +0 -7
  172. package/core/server/data/schema/clients/mysql.js +0 -34
  173. package/core/server/data/schema/clients/sqlite3.js +0 -39
  174. package/core/server/services/mentions/WebmentionRequest.js +0 -20
  175. package/core/server/web/admin/middleware.js +0 -17
  176. package/core/server/web/api/middleware/version-match.js +0 -31
  177. /package/core/built/admin/assets/{chunk.502.800e1515996bcc900013.js.LICENSE.txt → chunk.652.bb618bc5abf23bed4e87.js.LICENSE.txt} +0 -0
@@ -1,247 +1,255 @@
1
- "use strict";(globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]).push([[79],{38285:(t,e,n)=>{n.d(e,{ro:()=>g,lb:()=>m})
2
- var i=n(8651),a=n(88521),s=n(16140),r=n(30180),o=n(8142),c=n(48206)
3
- function _(){const t=(0,c.x1)()
4
- if(t){const e="internal_error";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`[Tracing] Transaction: ${e} -> Global error occured`),t.setStatus(e)}}var d=n(27448),p=n(21535)
5
- function l(){const t=this.getScope()
1
+ "use strict";(globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]).push([[79],{12058:(t,e,n)=>{n.d(e,{z:()=>s})
2
+ var i=n(8651)
3
+ function s(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1
4
+ const e=(0,i.Gd)().getClient(),n=t||e&&e.getOptions()
5
+ return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}},38285:(t,e,n)=>{n.d(e,{ro:()=>f,lb:()=>m})
6
+ var i=n(12058),s=n(8651),a=n(88521),r=n(16140),o=n(30180),c=n(8142),_=n(48206)
7
+ function d(){const t=(0,_.x1)()
8
+ if(t){const e="internal_error";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`[Tracing] Transaction: ${e} -> Global error occured`),t.setStatus(e)}}var l=n(27448),p=n(21535)
9
+ function u(){const t=this.getScope()
6
10
  if(t){const e=t.getSpan()
7
- if(e)return{"sentry-trace":e.toTraceparent()}}return{}}function u(t,e,n){if(!(0,c.zu)(e))return t.sampled=!1,t
11
+ if(e)return{"sentry-trace":e.toTraceparent()}}return{}}function h(t,e,n){if(!(0,i.z)(e))return t.sampled=!1,t
8
12
  if(void 0!==t.sampled)return t.setMetadata({sampleRate:Number(t.sampled)}),t
9
- let i
10
- return"function"==typeof e.tracesSampler?(i=e.tracesSampler(n),t.setMetadata({sampleRate:Number(i)})):void 0!==n.parentSampled?i=n.parentSampled:(i=e.tracesSampleRate,t.setMetadata({sampleRate:Number(i)})),r=i,((0,s.i2)(r)||"number"!=typeof r&&"boolean"!=typeof r?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(r)} of type ${JSON.stringify(typeof r)}.`),0):!(r<0||r>1)||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${r}.`),0))?i?(t.sampled=Math.random()<i,t.sampled?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`[Tracing] starting ${t.op} transaction - ${t.name}`),t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),t)):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),t.sampled=!1,t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)
11
- var r}function h(t,e){const n=this.getClient(),i=n&&n.getOptions()||{},s=i.instrumenter||"sentry",r=t.instrumenter||"sentry"
13
+ let s
14
+ return"function"==typeof e.tracesSampler?(s=e.tracesSampler(n),t.setMetadata({sampleRate:Number(s)})):void 0!==n.parentSampled?s=n.parentSampled:void 0!==e.tracesSampleRate?(s=e.tracesSampleRate,t.setMetadata({sampleRate:Number(s)})):(s=1,t.setMetadata({sampleRate:s})),o=s,((0,r.i2)(o)||"number"!=typeof o&&"boolean"!=typeof o?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),0):!(o<0||o>1)||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${o}.`),0))?s?(t.sampled=Math.random()<s,t.sampled?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`[Tracing] starting ${t.op} transaction - ${t.name}`),t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),t)):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),t.sampled=!1,t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)
15
+ var o}function g(t,e){const n=this.getClient(),i=n&&n.getOptions()||{},s=i.instrumenter||"sentry",r=t.instrumenter||"sentry"
12
16
  s!==r&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.error(`A transaction was started with instrumenter=\`${r}\`, but the SDK is configured with the \`${s}\` instrumenter.\nThe transaction will not be sampled. Please use the ${s} instrumentation to start transactions.`),t.sampled=!1)
13
17
  let o=new p.Y(t,this)
14
- return o=u(o,i,{parentSampled:t.parentSampled,transactionContext:t,...e}),o.sampled&&o.initSpanRecorder(i._experiments&&i._experiments.maxSpans),o}function m(t,e,n,i,a,s,r){const o=t.getClient(),c=o&&o.getOptions()||{}
15
- let _=new d.io(e,t,n,i,r,a)
16
- return _=u(_,c,{parentSampled:e.parentSampled,transactionContext:e,...s}),_.sampled&&_.initSpanRecorder(c._experiments&&c._experiments.maxSpans),_}function g(){!function(){const t=(0,i.cu)()
17
- t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=h),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=l))}(),(0,r.KV)()&&function(){const e=(0,i.cu)()
18
+ return o=h(o,i,{parentSampled:t.parentSampled,transactionContext:t,...e}),o.sampled&&o.initSpanRecorder(i._experiments&&i._experiments.maxSpans),o}function m(t,e,n,i,s,a,r){const o=t.getClient(),c=o&&o.getOptions()||{}
19
+ let _=new l.io(e,t,n,i,r,s)
20
+ return _=h(_,c,{parentSampled:e.parentSampled,transactionContext:e,...a}),_.sampled&&_.initSpanRecorder(c._experiments&&c._experiments.maxSpans),_}function f(){!function(){const t=(0,s.cu)()
21
+ t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=g),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=u))}(),(0,o.KV)()&&function(){const e=(0,s.cu)()
18
22
  if(!e.__SENTRY__)return
19
- const n={mongodb:()=>new((0,r.l$)(t,"./integrations/node/mongo").Mongo),mongoose:()=>new((0,r.l$)(t,"./integrations/node/mongo").Mongo)({mongoose:!0}),mysql:()=>new((0,r.l$)(t,"./integrations/node/mysql").Mysql),pg:()=>new((0,r.l$)(t,"./integrations/node/postgres").Postgres)},a=Object.keys(n).filter((t=>!!(0,r.$y)(t))).map((t=>{try{return n[t]()}catch(t){return}})).filter((t=>t))
20
- a.length>0&&(e.__SENTRY__.integrations=[...e.__SENTRY__.integrations||[],...a])}(),(0,o.o)("error",_),(0,o.o)("unhandledrejection",_)}t=n.hmd(t)},27448:(t,e,n)=>{n.d(e,{hd:()=>_,io:()=>p,mg:()=>c,nT:()=>o})
21
- var i=n(88468),a=n(88521),s=n(20484),r=n(21535)
23
+ const n={mongodb:()=>new((0,o.l$)(t,"./integrations/node/mongo").Mongo),mongoose:()=>new((0,o.l$)(t,"./integrations/node/mongo").Mongo)({mongoose:!0}),mysql:()=>new((0,o.l$)(t,"./integrations/node/mysql").Mysql),pg:()=>new((0,o.l$)(t,"./integrations/node/postgres").Postgres)},i=Object.keys(n).filter((t=>!!(0,o.$y)(t))).map((t=>{try{return n[t]()}catch(t){return}})).filter((t=>t))
24
+ i.length>0&&(e.__SENTRY__.integrations=[...e.__SENTRY__.integrations||[],...i])}(),(0,c.o)("error",d),(0,c.o)("unhandledrejection",d)}t=n.hmd(t)},27448:(t,e,n)=>{n.d(e,{hd:()=>_,io:()=>l,mg:()=>c,nT:()=>o})
25
+ var i=n(88468),s=n(88521),a=n(20484),r=n(21535)
22
26
  const o=1e3,c=3e4,_=5e3
23
- class d extends s.gB{constructor(t,e,n,i){super(i),this._pushActivity=t,this._popActivity=e,this.transactionSpanId=n}add(t){t.spanId!==this.transactionSpanId&&(t.finish=e=>{t.endTimestamp="number"==typeof e?e:(0,i._I)(),this._popActivity(t.spanId)},void 0===t.endTimestamp&&this._pushActivity(t.spanId)),super.add(t)}}class p extends r.Y{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._beforeFinishCallbacks=[]}constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:c,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:_,r=arguments.length>5&&void 0!==arguments[5]&&arguments[5]
24
- super(t,e),this._idleHub=e,this._idleTimeout=n,this._finalTimeout=i,this._heartbeatInterval=s,this._onScope=r,p.prototype.__init.call(this),p.prototype.__init2.call(this),p.prototype.__init3.call(this),p.prototype.__init4.call(this),r&&(l(e),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),e.configureScope((t=>t.setSpan(this)))),this._startIdleTimeout(),setTimeout((()=>{this._finished||(this.setStatus("deadline_exceeded"),this.finish())}),this._finalTimeout)}finish(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i._I)()
25
- if(this._finished=!0,this.activities={},this.spanRecorder){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] finishing IdleTransaction",new Date(1e3*t).toISOString(),this.op)
27
+ class d extends a.gB{constructor(t,e,n,i){super(i),this._pushActivity=t,this._popActivity=e,this.transactionSpanId=n}add(t){t.spanId!==this.transactionSpanId&&(t.finish=e=>{t.endTimestamp="number"==typeof e?e:(0,i._I)(),this._popActivity(t.spanId)},void 0===t.endTimestamp&&this._pushActivity(t.spanId)),super.add(t)}}class l extends r.Y{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._beforeFinishCallbacks=[]}constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:c,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:_,r=arguments.length>5&&void 0!==arguments[5]&&arguments[5]
28
+ super(t,e),this._idleHub=e,this._idleTimeout=n,this._finalTimeout=i,this._heartbeatInterval=a,this._onScope=r,l.prototype.__init.call(this),l.prototype.__init2.call(this),l.prototype.__init3.call(this),l.prototype.__init4.call(this),r&&(p(e),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),e.configureScope((t=>t.setSpan(this)))),this._startIdleTimeout(),setTimeout((()=>{this._finished||(this.setStatus("deadline_exceeded"),this.finish())}),this._finalTimeout)}finish(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i._I)()
29
+ if(this._finished=!0,this.activities={},this.spanRecorder){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Tracing] finishing IdleTransaction",new Date(1e3*t).toISOString(),this.op)
26
30
  for(const e of this._beforeFinishCallbacks)e(this,t)
27
31
  this.spanRecorder.spans=this.spanRecorder.spans.filter((e=>{if(e.spanId===this.spanId)return!0
28
- e.endTimestamp||(e.endTimestamp=t,e.setStatus("cancelled"),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(e,void 0,2)))
32
+ e.endTimestamp||(e.endTimestamp=t,e.setStatus("cancelled"),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(e,void 0,2)))
29
33
  const n=e.startTimestamp<t
30
- return n||("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] discarding Span since it happened after Transaction was finished",JSON.stringify(e,void 0,2)),n})),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] flushing IdleTransaction")}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] No active IdleTransaction")
31
- return this._onScope&&l(this._idleHub),super.finish(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){if(!this.spanRecorder){const e=t=>{this._finished||this._pushActivity(t)},n=t=>{this._finished||this._popActivity(t)}
32
- this.spanRecorder=new d(e,n,this.spanId,t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}_cancelIdleTimeout(){this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0)}_startIdleTimeout(t){this._cancelIdleTimeout(),this._idleTimeoutID=setTimeout((()=>{this._finished||0!==Object.keys(this.activities).length||this.finish(t)}),this._idleTimeout)}_pushActivity(t){this._cancelIdleTimeout(),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`[Tracing] popActivity ${t}`),delete this.activities[t],("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const t=(0,i._I)()+this._idleTimeout/1e3
34
+ return n||("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Tracing] discarding Span since it happened after Transaction was finished",JSON.stringify(e,void 0,2)),n})),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Tracing] flushing IdleTransaction")}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Tracing] No active IdleTransaction")
35
+ return this._onScope&&p(this._idleHub),super.finish(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){if(!this.spanRecorder){const e=t=>{this._finished||this._pushActivity(t)},n=t=>{this._finished||this._popActivity(t)}
36
+ this.spanRecorder=new d(e,n,this.spanId,t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}_cancelIdleTimeout(){this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0)}_startIdleTimeout(t){this._cancelIdleTimeout(),this._idleTimeoutID=setTimeout((()=>{this._finished||0!==Object.keys(this.activities).length||this.finish(t)}),this._idleTimeout)}_pushActivity(t){this._cancelIdleTimeout(),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(`[Tracing] popActivity ${t}`),delete this.activities[t],("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const t=(0,i._I)()+this._idleTimeout/1e3
33
37
  this._startIdleTimeout(t)}}_beat(){if(this._finished)return
34
38
  const t=Object.keys(this.activities).join("")
35
- t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this.finish()):this._pingHeartbeat()}_pingHeartbeat(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout((()=>{this._beat()}),this._heartbeatInterval)}}function l(t){const e=t.getScope()
36
- e&&e.getTransaction()&&e.setSpan(void 0)}},98079:(t,e,n)=>{n.r(e),n.d(e,{BROWSER_TRACING_INTEGRATION_ID:()=>tt,BrowserTracing:()=>nt,IdleTransaction:()=>B.io,Integrations:()=>i,Span:()=>st.Dr,SpanStatus:()=>at,TRACEPARENT_REGEXP:()=>b.K,Transaction:()=>rt.Y,addExtensionMethods:()=>a.ro,defaultRequestInstrumentationOptions:()=>K,extractTraceparentData:()=>b.q,getActiveTransaction:()=>k.x1,hasTracingEnabled:()=>k.zu,instrumentOutgoingRequests:()=>V,spanStatusfromHttpCode:()=>st.Zd,startIdleTransaction:()=>a.lb,stripUrlQueryAndFragment:()=>o.rt})
39
+ t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this.finish()):this._pingHeartbeat()}_pingHeartbeat(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout((()=>{this._beat()}),this._heartbeatInterval)}}function p(t){const e=t.getScope()
40
+ e&&e.getTransaction()&&e.setSpan(void 0)}},98079:(t,e,n)=>{n.r(e),n.d(e,{BROWSER_TRACING_INTEGRATION_ID:()=>nt,BrowserTracing:()=>st,IdleTransaction:()=>B.io,Integrations:()=>i,Span:()=>ot.Dr,SpanStatus:()=>rt,TRACEPARENT_REGEXP:()=>b.K,Transaction:()=>ct.Y,addExtensionMethods:()=>s.ro,defaultRequestInstrumentationOptions:()=>tt,extractTraceparentData:()=>b.q,getActiveTransaction:()=>G.x1,hasTracingEnabled:()=>G.zu,instrumentOutgoingRequests:()=>et,spanStatusfromHttpCode:()=>ot.Zd,startIdleTransaction:()=>s.lb,stripUrlQueryAndFragment:()=>o.rt})
37
41
  var i={}
38
- n.r(i),n.d(i,{Apollo:()=>R,BrowserTracing:()=>nt,Express:()=>p,GraphQL:()=>y,Mongo:()=>E,Mysql:()=>g,Postgres:()=>m,Prisma:()=>S})
39
- var a=n(38285)
40
- function s(t){let e,n=t[0],i=1
41
- for(;i<t.length;){const a=t[i],s=t[i+1]
42
- if(i+=2,("optionalAccess"===a||"optionalCall"===a)&&null==n)return
43
- "access"===a||"optionalAccess"===a?(e=n,n=s(n)):"call"!==a&&"optionalCall"!==a||(n=s((function(){for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a]
42
+ n.r(i),n.d(i,{Apollo:()=>R,BrowserTracing:()=>st,Express:()=>l,GraphQL:()=>y,Mongo:()=>E,Mysql:()=>m,Postgres:()=>g,Prisma:()=>S})
43
+ var s=n(38285)
44
+ function a(t){let e,n=t[0],i=1
45
+ for(;i<t.length;){const s=t[i],a=t[i+1]
46
+ if(i+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return
47
+ "access"===s||"optionalAccess"===s?(e=n,n=a(n)):"call"!==s&&"optionalCall"!==s||(n=a((function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s]
44
48
  return n.call(e,...i)})),e=void 0)}return n}var r=n(88521),o=n(72702),c=n(14205),_=n(16140)
45
- function d(t){const e=s([t,"call",t=>t(),"access",t=>t.getClient,"call",t=>t(),"optionalAccess",t=>t.getOptions,"call",t=>t()])
46
- return"sentry"!==(s([e,"optionalAccess",t=>t.instrumenter])||"sentry")}class p{static __initStatic(){this.id="Express"}__init(){this.name=p.id}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
47
- p.prototype.__init.call(this),this._router=t.router||t.app,this._methods=(Array.isArray(t.methods)?t.methods:[]).concat("use")}setupOnce(t,e){this._router?d(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Express Integration is skipped because of instrumenter configuration."):(function(t){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).forEach((e=>function(t,e){const n=t[e]
48
- return t[e]=function(){for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a]
49
- return n.call(this,...function(t,e){return t.map((t=>"function"==typeof t?l(t,e):Array.isArray(t)?t.map((t=>"function"==typeof t?l(t,e):t)):t))}(i,e))},t}(t,e)))}(this._router,this._methods),function(t){const e="settings"in t
49
+ function d(t){const e=a([t,"call",t=>t(),"access",t=>t.getClient,"call",t=>t(),"optionalAccess",t=>t.getOptions,"call",t=>t()])
50
+ return"sentry"!==(a([e,"optionalAccess",t=>t.instrumenter])||"sentry")}class l{static __initStatic(){this.id="Express"}__init(){this.name=l.id}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
51
+ l.prototype.__init.call(this),this._router=t.router||t.app,this._methods=(Array.isArray(t.methods)?t.methods:[]).concat("use")}setupOnce(t,e){this._router?d(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Express Integration is skipped because of instrumenter configuration."):(function(t){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).forEach((e=>function(t,e){const n=t[e]
52
+ return t[e]=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s]
53
+ return n.call(this,...function(t,e){return t.map((t=>"function"==typeof t?p(t,e):Array.isArray(t)?t.map((t=>"function"==typeof t?p(t,e):t)):t))}(i,e))},t}(t,e)))}(this._router,this._methods),function(t){const e="settings"in t
50
54
  e&&void 0===t._router&&t.lazyrouter&&t.lazyrouter()
51
55
  const n=e?t._router:t
52
56
  if(!n)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.debug("Cannot instrument router for URL Parameterization (did not find a valid router)."),void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.debug("Routing instrumentation is currently only supported in Express 4."))
53
- const i=Object.getPrototypeOf(n),a=i.process_params
57
+ const i=Object.getPrototypeOf(n),s=i.process_params
54
58
  i.process_params=function(t,e,n,i,r){n._reconstructedRoute||(n._reconstructedRoute="")
55
- const{layerRoutePath:d,isRegex:p,isArray:l,numExtraSegments:u}=function(t){const e=s([t,"access",t=>t.route,"optionalAccess",t=>t.path]),n=(0,_.Kj)(e),i=Array.isArray(e)
59
+ const{layerRoutePath:d,isRegex:l,isArray:p,numExtraSegments:u}=function(t){const e=a([t,"access",t=>t.route,"optionalAccess",t=>t.path]),n=(0,_.Kj)(e),i=Array.isArray(e)
56
60
  if(!e)return{isRegex:n,isArray:i,numExtraSegments:0}
57
- const a=i?Math.max(e.reduce(((t,e)=>t+(0,o.$A)(e.toString())),0)-(0,o.$A)(t.path||""),0):0,r=function(t,e){return t?e.map((t=>t.toString())).join(","):e&&e.toString()}(i,e)
58
- return{layerRoutePath:r,isRegex:n,isArray:i,numExtraSegments:a}}(t);(d||p||l)&&(n._hasParameters=!0)
59
- const h=(d||t.path||"").split("/").filter((t=>t.length>0&&(p||l||!t.includes("*")))).join("/")
60
- if(h&&h.length>0&&(n._reconstructedRoute+=`/${h}${p?"/":""}`),(0,o.$A)(n.originalUrl||"")+u===(0,o.$A)(n._reconstructedRoute)){n._hasParameters||n._reconstructedRoute!==n.originalUrl&&(n._reconstructedRoute=n.originalUrl)
61
+ const s=i?Math.max(e.reduce(((t,e)=>t+(0,o.$A)(e.toString())),0)-(0,o.$A)(t.path||""),0):0,r=function(t,e){return t?e.map((t=>t.toString())).join(","):e&&e.toString()}(i,e)
62
+ return{layerRoutePath:r,isRegex:n,isArray:i,numExtraSegments:s}}(t);(d||l||p)&&(n._hasParameters=!0)
63
+ const h=(d||t.path||"").split("/").filter((t=>t.length>0&&(l||p||!t.includes("*")))).join("/")
64
+ if(h&&h.length>0&&(n._reconstructedRoute+=`/${h}${l?"/":""}`),(0,o.$A)(n.originalUrl||"")+u===(0,o.$A)(n._reconstructedRoute)){n._hasParameters||n._reconstructedRoute!==n.originalUrl&&(n._reconstructedRoute=n.originalUrl)
61
65
  const t=i.__sentry_transaction
62
66
  if(t&&"custom"!==t.metadata.source){const e=n._reconstructedRoute||"/"
63
- t.setName(...(0,c.oA)(n,{path:!0,method:!0,customRoute:e}))}}return a.call(this,t,e,n,i,r)}}(this._router)):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("ExpressIntegration is missing an Express instance")}}function l(t,e){const n=t.length
64
- switch(n){case 2:return function(n,i){const a=i.__sentry_transaction
65
- if(a){const n=a.startChild({description:t.name,op:`middleware.express.${e}`})
67
+ t.setName(...(0,c.oA)(n,{path:!0,method:!0,customRoute:e}))}}return s.call(this,t,e,n,i,r)}}(this._router)):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("ExpressIntegration is missing an Express instance")}}function p(t,e){const n=t.length
68
+ switch(n){case 2:return function(n,i){const s=i.__sentry_transaction
69
+ if(s){const n=s.startChild({description:t.name,op:`middleware.express.${e}`})
66
70
  i.once("finish",(()=>{n.finish()}))}return t.call(this,n,i)}
67
- case 3:return function(n,i,a){const r=s([i.__sentry_transaction,"optionalAccess",t=>t.startChild,"call",n=>n({description:t.name,op:`middleware.express.${e}`})])
68
- t.call(this,n,i,(function(){s([r,"optionalAccess",t=>t.finish,"call",t=>t()])
71
+ case 3:return function(n,i,s){const r=a([i.__sentry_transaction,"optionalAccess",t=>t.startChild,"call",n=>n({description:t.name,op:`middleware.express.${e}`})])
72
+ t.call(this,n,i,(function(){a([r,"optionalAccess",t=>t.finish,"call",t=>t()])
69
73
  for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n]
70
- a.call(this,...e)}))}
71
- case 4:return function(n,i,a,r){const o=s([a.__sentry_transaction,"optionalAccess",t=>t.startChild,"call",n=>n({description:t.name,op:`middleware.express.${e}`})])
72
- t.call(this,n,i,a,(function(){s([o,"optionalAccess",t=>t.finish,"call",t=>t()])
74
+ s.call(this,...e)}))}
75
+ case 4:return function(n,i,s,r){const o=a([s.__sentry_transaction,"optionalAccess",t=>t.startChild,"call",n=>n({description:t.name,op:`middleware.express.${e}`})])
76
+ t.call(this,n,i,s,(function(){a([o,"optionalAccess",t=>t.finish,"call",t=>t()])
73
77
  for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n]
74
78
  r.call(this,...e)}))}
75
- default:throw new Error(`Express middleware takes 2-4 arguments. Got: ${n}`)}}p.__initStatic()
79
+ default:throw new Error(`Express middleware takes 2-4 arguments. Got: ${n}`)}}l.__initStatic()
76
80
  var u=n(30180),h=n(15834)
77
- class m{static __initStatic(){this.id="Postgres"}__init(){this.name=m.id}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
78
- m.prototype.__init.call(this),this._usePgNative=!!t.usePgNative}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Postgres Integration is skipped because of instrumenter configuration."))
81
+ class g{static __initStatic(){this.id="Postgres"}__init(){this.name=g.id}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
82
+ g.prototype.__init.call(this),this._usePgNative=!!t.usePgNative}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Postgres Integration is skipped because of instrumenter configuration."))
79
83
  const n=(0,u.$y)("pg")
80
84
  if(!n)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Postgres Integration was unable to require `pg` package."))
81
- if(this._usePgNative&&!s([n,"access",t=>t.native,"optionalAccess",t=>t.Client]))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Postgres Integration was unable to access 'pg-native' bindings."))
82
- const{Client:i}=this._usePgNative?n.native:n;(0,h.hl)(i.prototype,"query",(function(t){return function(n,i,a){const r=s([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),o=s([r,"optionalAccess",t=>t.startChild,"call",t=>t({description:"string"==typeof n?n:n.text,op:"db"})])
83
- if("function"==typeof a)return t.call(this,n,i,(function(t,e){s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),a(t,e)}))
84
- if("function"==typeof i)return t.call(this,n,(function(t,e){s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e)}))
85
+ if(this._usePgNative&&!a([n,"access",t=>t.native,"optionalAccess",t=>t.Client]))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Postgres Integration was unable to access 'pg-native' bindings."))
86
+ const{Client:i}=this._usePgNative?n.native:n;(0,h.hl)(i.prototype,"query",(function(t){return function(n,i,s){const r=a([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),o=a([r,"optionalAccess",t=>t.startChild,"call",t=>t({description:"string"==typeof n?n:n.text,op:"db"})])
87
+ if("function"==typeof s)return t.call(this,n,i,(function(t,e){a([o,"optionalAccess",t=>t.finish,"call",t=>t()]),s(t,e)}))
88
+ if("function"==typeof i)return t.call(this,n,(function(t,e){a([o,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e)}))
85
89
  const c=void 0!==i?t.call(this,n,i):t.call(this,n)
86
- return(0,_.J8)(c)?c.then((t=>(s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),t))):(s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),c)}}))}}m.__initStatic()
87
- class g{constructor(){g.prototype.__init.call(this)}static __initStatic(){this.id="Mysql"}__init(){this.name=g.id}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Mysql Integration is skipped because of instrumenter configuration."))
90
+ return(0,_.J8)(c)?c.then((t=>(a([o,"optionalAccess",t=>t.finish,"call",t=>t()]),t))):(a([o,"optionalAccess",t=>t.finish,"call",t=>t()]),c)}}))}}g.__initStatic()
91
+ class m{constructor(){m.prototype.__init.call(this)}static __initStatic(){this.id="Mysql"}__init(){this.name=m.id}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Mysql Integration is skipped because of instrumenter configuration."))
88
92
  const n=(0,u.$y)("mysql/lib/Connection.js")
89
- n?(0,h.hl)(n,"createQuery",(function(t){return function(n,i,a){const r=s([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),o=s([r,"optionalAccess",t=>t.startChild,"call",t=>t({description:"string"==typeof n?n:n.sql,op:"db"})])
90
- return"function"==typeof a?t.call(this,n,i,(function(t,e,n){s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),a(t,e,n)})):"function"==typeof i?t.call(this,n,(function(t,e,n){s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e,n)})):t.call(this,n,i,a)}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Mysql Integration was unable to require `mysql` package.")}}g.__initStatic()
93
+ n?(0,h.hl)(n,"createQuery",(function(t){return function(n,i,s){const r=a([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),o=a([r,"optionalAccess",t=>t.startChild,"call",t=>t({description:"string"==typeof n?n:n.sql,op:"db"})])
94
+ return"function"==typeof s?t.call(this,n,i,(function(t,e,n){a([o,"optionalAccess",t=>t.finish,"call",t=>t()]),s(t,e,n)})):"function"==typeof i?t.call(this,n,(function(t,e,n){a([o,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e,n)})):t.call(this,n,i,s)}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Mysql Integration was unable to require `mysql` package.")}}m.__initStatic()
91
95
  const f=["aggregate","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","drop","dropIndex","dropIndexes","estimatedDocumentCount","find","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexes","indexExists","indexInformation","initializeOrderedBulkOp","insertMany","insertOne","isCapped","mapReduce","options","parallelCollectionScan","rename","replaceOne","stats","updateMany","updateOne"],T={bulkWrite:["operations"],countDocuments:["query"],createIndex:["fieldOrSpec"],createIndexes:["indexSpecs"],deleteMany:["filter"],deleteOne:["filter"],distinct:["key","query"],dropIndex:["indexName"],find:["query"],findOne:["query"],findOneAndDelete:["filter"],findOneAndReplace:["filter","replacement"],findOneAndUpdate:["filter","update"],indexExists:["indexes"],insertMany:["docs"],insertOne:["doc"],mapReduce:["map","reduce"],rename:["newName"],replaceOne:["filter","doc"],updateMany:["filter","update"],updateOne:["filter","update"]}
92
96
  class E{static __initStatic(){this.id="Mongo"}__init(){this.name=E.id}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
93
97
  E.prototype.__init.call(this),this._operations=Array.isArray(t.operations)?t.operations:f,this._describeOperations=!("describeOperations"in t)||t.describeOperations,this._useMongoose=!!t.useMongoose}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Mongo Integration is skipped because of instrumenter configuration."))
94
98
  const n=this._useMongoose?"mongoose":"mongodb",i=(0,u.$y)(n)
95
99
  i?this._instrumentOperations(i.Collection,this._operations,e):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error(`Mongo Integration was unable to require \`${n}\` package.`)}_instrumentOperations(t,e,n){e.forEach((e=>this._patchOperation(t,e,n)))}_patchOperation(t,e,n){if(!(e in t.prototype))return
96
- const i=this._getSpanContextFromOperationArguments.bind(this);(0,h.hl)(t.prototype,e,(function(t){return function(){for(var a=arguments.length,r=new Array(a),o=0;o<a;o++)r[o]=arguments[o]
97
- const c=r[r.length-1],d=s([n().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()])
98
- if("function"!=typeof c||"mapReduce"===e&&2===r.length){const n=s([d,"optionalAccess",t=>t.startChild,"call",t=>t(i(this,e,r))]),a=t.call(this,...r)
99
- if((0,_.J8)(a))return a.then((t=>(s([n,"optionalAccess",t=>t.finish,"call",t=>t()]),t)))
100
- if((p=a)&&"object"==typeof p&&p.once&&"function"==typeof p.once){const e=a
101
- try{e.once("close",(()=>{s([n,"optionalAccess",t=>t.finish,"call",t=>t()])}))}catch(t){s([n,"optionalAccess",t=>t.finish,"call",t=>t()])}return e}return s([n,"optionalAccess",t=>t.finish,"call",t=>t()]),a}var p
102
- const l=s([d,"optionalAccess",t=>t.startChild,"call",t=>t(i(this,e,r.slice(0,-1)))])
103
- return t.call(this,...r.slice(0,-1),(function(t,e){s([l,"optionalAccess",t=>t.finish,"call",t=>t()]),c(t,e)}))}}))}_getSpanContextFromOperationArguments(t,e,n){const i={collectionName:t.collectionName,dbName:t.dbName,namespace:t.namespace},a={op:"db",description:e,data:i},s=T[e],r=Array.isArray(this._describeOperations)?this._describeOperations.includes(e):this._describeOperations
104
- if(!s||!r)return a
100
+ const i=this._getSpanContextFromOperationArguments.bind(this);(0,h.hl)(t.prototype,e,(function(t){return function(){for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o]
101
+ const c=r[r.length-1],d=a([n().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()])
102
+ if("function"!=typeof c||"mapReduce"===e&&2===r.length){const n=a([d,"optionalAccess",t=>t.startChild,"call",t=>t(i(this,e,r))]),s=t.call(this,...r)
103
+ if((0,_.J8)(s))return s.then((t=>(a([n,"optionalAccess",t=>t.finish,"call",t=>t()]),t)))
104
+ if((l=s)&&"object"==typeof l&&l.once&&"function"==typeof l.once){const e=s
105
+ try{e.once("close",(()=>{a([n,"optionalAccess",t=>t.finish,"call",t=>t()])}))}catch(t){a([n,"optionalAccess",t=>t.finish,"call",t=>t()])}return e}return a([n,"optionalAccess",t=>t.finish,"call",t=>t()]),s}var l
106
+ const p=a([d,"optionalAccess",t=>t.startChild,"call",t=>t(i(this,e,r.slice(0,-1)))])
107
+ return t.call(this,...r.slice(0,-1),(function(t,e){a([p,"optionalAccess",t=>t.finish,"call",t=>t()]),c(t,e)}))}}))}_getSpanContextFromOperationArguments(t,e,n){const i={collectionName:t.collectionName,dbName:t.dbName,namespace:t.namespace},s={op:"db",description:e,data:i},a=T[e],r=Array.isArray(this._describeOperations)?this._describeOperations.includes(e):this._describeOperations
108
+ if(!a||!r)return s
105
109
  try{if("mapReduce"===e){const[t,e]=n
106
- i[s[0]]="string"==typeof t?t:t.name||"<anonymous>",i[s[1]]="string"==typeof e?e:e.name||"<anonymous>"}else for(let t=0;t<s.length;t++)i[s[t]]=JSON.stringify(n[t])}catch(t){}return a}}E.__initStatic()
110
+ i[a[0]]="string"==typeof t?t:t.name||"<anonymous>",i[a[1]]="string"==typeof e?e:e.name||"<anonymous>"}else for(let t=0;t<a.length;t++)i[a[t]]=JSON.stringify(n[t])}catch(t){}return s}}E.__initStatic()
107
111
  class S{static __initStatic(){this.id="Prisma"}__init(){this.name=S.id}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
108
112
  var e
109
- S.prototype.__init.call(this),(e=t.client)&&e.$use?this._client=t.client:("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`Unsupported Prisma client provided to PrismaIntegration. Provided client: ${JSON.stringify(t.client)}`)}setupOnce(t,e){this._client?d(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Prisma Integration is skipped because of instrumenter configuration."):this._client.$use(((t,n)=>{const i=s([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=t.action,r=t.model,o=s([i,"optionalAccess",t=>t.startChild,"call",t=>t({description:r?`${r} ${a}`:a,op:"db.sql.prisma"})]),c=n(t)
110
- return(0,_.J8)(c)?c.then((t=>(s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),t))):(s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),c)})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("PrismaIntegration is missing a Prisma Client Instance")}}S.__initStatic()
113
+ S.prototype.__init.call(this),(e=t.client)&&e.$use?this._client=t.client:("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`Unsupported Prisma client provided to PrismaIntegration. Provided client: ${JSON.stringify(t.client)}`)}setupOnce(t,e){this._client?d(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Prisma Integration is skipped because of instrumenter configuration."):this._client.$use(((t,n)=>{const i=a([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),s=t.action,r=t.model,o=a([i,"optionalAccess",t=>t.startChild,"call",t=>t({description:r?`${r} ${s}`:s,op:"db.sql.prisma"})]),c=n(t)
114
+ return(0,_.J8)(c)?c.then((t=>(a([o,"optionalAccess",t=>t.finish,"call",t=>t()]),t))):(a([o,"optionalAccess",t=>t.finish,"call",t=>t()]),c)})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("PrismaIntegration is missing a Prisma Client Instance")}}S.__initStatic()
111
115
  class y{constructor(){y.prototype.__init.call(this)}static __initStatic(){this.id="GraphQL"}__init(){this.name=y.id}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("GraphQL Integration is skipped because of instrumenter configuration."))
112
116
  const n=(0,u.$y)("graphql/execution/execute.js")
113
- n?(0,h.hl)(n,"execute",(function(t){return function(){const n=e().getScope(),i=s([n,"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=s([i,"optionalAccess",t=>t.startChild,"call",t=>t({description:"execute",op:"graphql.execute"})])
114
- s([n,"optionalAccess",t=>t.setSpan,"call",t=>t(a)])
117
+ n?(0,h.hl)(n,"execute",(function(t){return function(){const n=e().getScope(),i=a([n,"optionalAccess",t=>t.getSpan,"call",t=>t()]),s=a([i,"optionalAccess",t=>t.startChild,"call",t=>t({description:"execute",op:"graphql.execute"})])
118
+ a([n,"optionalAccess",t=>t.setSpan,"call",t=>t(s)])
115
119
  for(var r=arguments.length,o=new Array(r),c=0;c<r;c++)o[c]=arguments[c]
116
120
  const d=t.call(this,...o)
117
- return(0,_.J8)(d)?d.then((t=>(s([a,"optionalAccess",t=>t.finish,"call",t=>t()]),s([n,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),t))):(s([a,"optionalAccess",t=>t.finish,"call",t=>t()]),s([n,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),d)}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("GraphQL Integration was unable to require graphql/execution package.")}}y.__initStatic()
121
+ return(0,_.J8)(d)?d.then((t=>(a([s,"optionalAccess",t=>t.finish,"call",t=>t()]),a([n,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),t))):(a([s,"optionalAccess",t=>t.finish,"call",t=>t()]),a([n,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),d)}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("GraphQL Integration was unable to require graphql/execution package.")}}y.__initStatic()
118
122
  var v=n(7209)
119
- class R{constructor(){R.prototype.__init.call(this)}static __initStatic(){this.id="Apollo"}__init(){this.name=R.id}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Apollo Integration is skipped because of instrumenter configuration."))
120
- const n=(0,u.$y)("apollo-server-core")
121
- n?(0,h.hl)(n.ApolloServerBase.prototype,"constructSchema",(function(t){return function(){if(!this.config.resolvers)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(this.config.schema?r.kg.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property."):this.config.modules&&r.kg.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property."),r.kg.error("Skipping tracing as no resolvers found on the `ApolloServer` instance.")),t.call(this)
123
+ class R{static __initStatic(){this.id="Apollo"}__init(){this.name=R.id}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{useNestjs:!1}
124
+ R.prototype.__init.call(this),this._useNest=!!t.useNestjs}setupOnce(t,e){if(d(e))("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Apollo Integration is skipped because of instrumenter configuration.")
125
+ else if(this._useNest){const t=(0,u.$y)("@nestjs/graphql")
126
+ if(!t)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Apollo-NestJS Integration was unable to require @nestjs/graphql package."));(0,h.hl)(t.GraphQLFactory.prototype,"mergeWithSchema",(function(t){return function(){(0,h.hl)(this.resolversExplorerService,"explore",(function(t){return function(){return N((0,v.lE)(t.call(this)),e)}}))
127
+ for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s]
128
+ return t.call(this,...i)}}))}else{const t=(0,u.$y)("apollo-server-core")
129
+ if(!t)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Apollo Integration was unable to require apollo-server-core package."));(0,h.hl)(t.ApolloServerBase.prototype,"constructSchema",(function(t){return function(){if(!this.config.resolvers)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(this.config.schema?(r.kg.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property.If you are using NestJS with Apollo, please use `Sentry.Integrations.Apollo({ useNestjs: true })` instead."),r.kg.warn()):this.config.modules&&r.kg.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property."),r.kg.error("Skipping tracing as no resolvers found on the `ApolloServer` instance.")),t.call(this)
122
130
  const n=(0,v.lE)(this.config.resolvers)
123
- return this.config.resolvers=n.map((t=>(Object.keys(t).forEach((n=>{Object.keys(t[n]).forEach((i=>{"function"==typeof t[n][i]&&function(t,e,n,i){(0,h.hl)(t[e],n,(function(t){return function(){const a=s([i().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),r=s([a,"optionalAccess",t=>t.startChild,"call",t=>t({description:`${e}.${n}`,op:"graphql.resolve"})])
131
+ return this.config.resolvers=N(n,e),t.call(this)}}))}}}function N(t,e){return t.map((t=>(Object.keys(t).forEach((n=>{Object.keys(t[n]).forEach((i=>{"function"==typeof t[n][i]&&function(t,e,n,i){(0,h.hl)(t[e],n,(function(t){return function(){const s=a([i().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),r=a([s,"optionalAccess",t=>t.startChild,"call",t=>t({description:`${e}.${n}`,op:"graphql.resolve"})])
124
132
  for(var o=arguments.length,c=new Array(o),d=0;d<o;d++)c[d]=arguments[d]
125
- const p=t.call(this,...c)
126
- return(0,_.J8)(p)?p.then((t=>(s([r,"optionalAccess",t=>t.finish,"call",t=>t()]),t))):(s([r,"optionalAccess",t=>t.finish,"call",t=>t()]),p)}}))}(t,n,i,e)}))})),t))),t.call(this)}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Apollo Integration was unable to require apollo-server-core package.")}}R.__initStatic()
127
- var b=n(75492),D=n(22850),N=n(68256),B=n(27448),k=n(48206)
128
- const G=n(27083).n2
133
+ const l=t.call(this,...c)
134
+ return(0,_.J8)(l)?l.then((t=>(a([r,"optionalAccess",t=>t.finish,"call",t=>t()]),t))):(a([r,"optionalAccess",t=>t.finish,"call",t=>t()]),l)}}))}(t,n,i,e)}))})),t)))}R.__initStatic()
135
+ var b=n(75492),D=n(22850),k=n(68256),B=n(27448),G=n(48206)
136
+ const Y=n(27083).n2
129
137
  var U=n(88468)
130
- const Y=(t,e,n)=>{let i,a
131
- return s=>{e.value>=0&&(s||n)&&(a=e.value-(i||0),(a||void 0===i)&&(i=e.value,e.delta=a,t(e)))}},x=()=>G.__WEB_VITALS_POLYFILL__?G.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const t=G.performance.timing,e=G.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==e?"back_forward":1===e?"reload":"navigate"}
138
+ const x=(t,e,n)=>{let i,s
139
+ return a=>{e.value>=0&&(a||n)&&(s=e.value-(i||0),(s||void 0===i)&&(i=e.value,e.delta=s,t(e)))}},I=()=>Y.__WEB_VITALS_POLYFILL__?Y.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const t=Y.performance.timing,e=Y.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==e?"back_forward":1===e?"reload":"navigate"}
132
140
  for(const i in t)"navigationStart"!==i&&"toJSON"!==i&&(n[i]=Math.max(t[i]-t.navigationStart,0))
133
- return n})()):G.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],I=()=>{const t=x()
134
- return t&&t.activationStart||0},A=(t,e)=>{const n=x()
141
+ return n})()):Y.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],A=()=>{const t=I()
142
+ return t&&t.activationStart||0},C=(t,e)=>{const n=I()
135
143
  let i="navigate"
136
- return n&&(i=G.document.prerendering||I()>0?"prerender":n.type.replace(/_/g,"-")),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:i}},C=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const i=new PerformanceObserver((t=>{e(t.getEntries())}))
137
- return i.observe(Object.assign({type:t,buffered:!0},n||{})),i}}catch(t){}},O=(t,e)=>{const n=i=>{"pagehide"!==i.type&&"hidden"!==G.document.visibilityState||(t(i),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))}
144
+ return n&&(i=Y.document.prerendering||A()>0?"prerender":n.type.replace(/_/g,"-")),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:i}},O=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const i=new PerformanceObserver((t=>{e(t.getEntries())}))
145
+ return i.observe(Object.assign({type:t,buffered:!0},n||{})),i}}catch(t){}},w=(t,e)=>{const n=i=>{"pagehide"!==i.type&&"hidden"!==Y.document.visibilityState||(t(i),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))}
138
146
  addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)}
139
- let w=-1
140
- const $=()=>(w<0&&(w="hidden"!==G.document.visibilityState||G.document.prerendering?1/0:0,O((t=>{let{timeStamp:e}=t
141
- w=e}),!0)),{get firstHiddenTime(){return w}}),L={}
142
- function M(t){return"number"==typeof t&&isFinite(t)}function P(t,e){let{startTimestamp:n,...i}=e
143
- return n&&t.startTimestamp>n&&(t.startTimestamp=n),t.startChild({startTimestamp:n,...i})}function q(){return G&&G.addEventListener&&G.performance}let H,F,j=0,z={}
144
- function X(t,e,n,i,a,s){const r=s?e[s]:e[`${n}End`],o=e[`${n}Start`]
145
- o&&r&&P(t,{op:"browser",description:a||n,startTimestamp:i+(0,k.XL)(o),endTimestamp:i+(0,k.XL)(r)})}var J=n(8651),Q=n(8142),W=n(98902)
146
- const Z=["localhost",/^\//],K={traceFetch:!0,traceXHR:!0,tracingOrigins:Z,tracePropagationTargets:Z}
147
- function V(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:i,tracingOrigins:a,shouldCreateSpanForRequest:s}={traceFetch:K.traceFetch,traceXHR:K.traceXHR,...t},r="function"==typeof s?s:t=>!0,o=t=>function(t,e){return(0,W.U0)(t,e||Z)}(t,i||a),c={}
148
- e&&(0,Q.o)("fetch",(t=>{!function(t,e,n,i){if(!(0,k.zu)()||!t.fetchData||!e(t.fetchData.url))return
147
+ let $=-1
148
+ const L=()=>($<0&&($="hidden"!==Y.document.visibilityState||Y.document.prerendering?1/0:0,w((t=>{let{timeStamp:e}=t
149
+ $=e}),!0)),{get firstHiddenTime(){return $}}),M={}
150
+ function P(t){return"number"==typeof t&&isFinite(t)}function q(t,e){let{startTimestamp:n,...i}=e
151
+ return n&&t.startTimestamp>n&&(t.startTimestamp=n),t.startChild({startTimestamp:n,...i})}function H(){return Y&&Y.addEventListener&&Y.performance}let j,F,z=0,X={}
152
+ function J(t,e,n,i,s,a){const r=a?e[a]:e[`${n}End`],o=e[`${n}Start`]
153
+ o&&r&&q(t,{op:"browser",description:s||n,startTimestamp:i+(0,G.XL)(o),endTimestamp:i+(0,G.XL)(r)})}var Q=n(12058),W=n(8651),Z=n(8142),K=n(98902)
154
+ const V=["localhost",/^\//],tt={traceFetch:!0,traceXHR:!0,tracingOrigins:V,tracePropagationTargets:V}
155
+ function et(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:i,tracingOrigins:s,shouldCreateSpanForRequest:a}={traceFetch:tt.traceFetch,traceXHR:tt.traceXHR,...t},r="function"==typeof a?a:t=>!0,o=t=>function(t,e){return(0,K.U0)(t,e||V)}(t,i||s),c={}
156
+ e&&(0,Z.o)("fetch",(t=>{!function(t,e,n,i){if(!(0,Q.z)()||!t.fetchData||!e(t.fetchData.url))return
149
157
  if(t.endTimestamp){const e=t.fetchData.__span
150
158
  if(!e)return
151
159
  const n=i[e]
152
- return void(n&&(t.response?n.setHttpStatus(t.response.status):t.error&&n.setStatus("internal_error"),n.finish(),delete i[e]))}const a=(0,J.Gd)().getScope(),s=a&&a.getSpan(),r=s&&s.transaction
153
- if(s&&r){const e=s.startChild({data:{...t.fetchData,type:"fetch"},description:`${t.fetchData.method} ${t.fetchData.url}`,op:"http.client"})
160
+ return void(n&&(t.response?n.setHttpStatus(t.response.status):t.error&&n.setStatus("internal_error"),n.finish(),delete i[e]))}const s=(0,W.Gd)().getScope(),a=s&&s.getSpan(),r=a&&a.transaction
161
+ if(a&&r){const e=a.startChild({data:{...t.fetchData,type:"fetch"},description:`${t.fetchData.method} ${t.fetchData.url}`,op:"http.client"})
154
162
  t.fetchData.__span=e.spanId,i[e.spanId]=e
155
- const a=t.args[0]
163
+ const s=t.args[0]
156
164
  t.args[1]=t.args[1]||{}
157
165
  const o=t.args[1]
158
- n(t.fetchData.url)&&(o.headers=function(t,e,n,i){const a=(0,D.IQ)(e),s=n.toTraceparent(),r="undefined"!=typeof Request&&(0,_.V9)(t,Request)?t.headers:i.headers
166
+ n(t.fetchData.url)&&(o.headers=function(t,e,n,i){const s=(0,D.IQ)(e),a=n.toTraceparent(),r="undefined"!=typeof Request&&(0,_.V9)(t,Request)?t.headers:i.headers
159
167
  if(r){if("undefined"!=typeof Headers&&(0,_.V9)(r,Headers)){const t=new Headers(r)
160
- return t.append("sentry-trace",s),a&&t.append(D.bU,a),t}if(Array.isArray(r)){const t=[...r,["sentry-trace",s]]
161
- return a&&t.push([D.bU,a]),t}{const t="baggage"in r?r.baggage:void 0,e=[]
162
- return Array.isArray(t)?e.push(...t):t&&e.push(t),a&&e.push(a),{...r,"sentry-trace":s,baggage:e.length>0?e.join(","):void 0}}}return{"sentry-trace":s,baggage:a}}(a,r.getDynamicSamplingContext(),e,o),r.metadata.propagations++)}}(t,r,o,c)})),n&&(0,Q.o)("xhr",(t=>{!function(t,e,n,i){if(!(0,k.zu)()||t.xhr&&t.xhr.__sentry_own_request__||!(t.xhr&&t.xhr.__sentry_xhr__&&e(t.xhr.__sentry_xhr__.url)))return
163
- const a=t.xhr.__sentry_xhr__
168
+ return t.append("sentry-trace",a),s&&t.append(D.bU,s),t}if(Array.isArray(r)){const t=[...r,["sentry-trace",a]]
169
+ return s&&t.push([D.bU,s]),t}{const t="baggage"in r?r.baggage:void 0,e=[]
170
+ return Array.isArray(t)?e.push(...t):t&&e.push(t),s&&e.push(s),{...r,"sentry-trace":a,baggage:e.length>0?e.join(","):void 0}}}return{"sentry-trace":a,baggage:s}}(s,r.getDynamicSamplingContext(),e,o))}}(t,r,o,c)})),n&&(0,Z.o)("xhr",(t=>{!function(t,e,n,i){if(!(0,Q.z)()||t.xhr&&t.xhr.__sentry_own_request__||!(t.xhr&&t.xhr.__sentry_xhr__&&e(t.xhr.__sentry_xhr__.url)))return
171
+ const s=t.xhr.__sentry_xhr__
164
172
  if(t.endTimestamp){const e=t.xhr.__sentry_xhr_span_id__
165
173
  if(!e)return
166
174
  const n=i[e]
167
- return void(n&&(n.setHttpStatus(a.status_code),n.finish(),delete i[e]))}const s=(0,J.Gd)().getScope(),r=s&&s.getSpan(),o=r&&r.transaction
168
- if(r&&o){const e=r.startChild({data:{...a.data,type:"xhr",method:a.method,url:a.url},description:`${a.method} ${a.url}`,op:"http.client"})
175
+ return void(n&&(n.setHttpStatus(s.status_code),n.finish(),delete i[e]))}const a=(0,W.Gd)().getScope(),r=a&&a.getSpan(),o=r&&r.transaction
176
+ if(r&&o){const e=r.startChild({data:{...s.data,type:"xhr",method:s.method,url:s.url},description:`${s.method} ${s.url}`,op:"http.client"})
169
177
  if(t.xhr.__sentry_xhr_span_id__=e.spanId,i[t.xhr.__sentry_xhr_span_id__]=e,t.xhr.setRequestHeader&&n(t.xhr.__sentry_xhr__.url))try{t.xhr.setRequestHeader("sentry-trace",e.toTraceparent())
170
178
  const n=o.getDynamicSamplingContext(),i=(0,D.IQ)(n)
171
- i&&t.xhr.setRequestHeader(D.bU,i),o.metadata.propagations++}catch(t){}}}(t,r,o,c)}))}const tt="BrowserTracing",et={idleTimeout:B.nT,finalTimeout:B.mg,heartbeatInterval:B.hd,markBackgroundTransactions:!0,routingInstrumentation:function(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2]
172
- if(!G||!G.location)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn("Could not initialize routing instrumentation due to invalid location"))
173
- let i,a=G.location.href
174
- e&&(i=t({name:G.location.pathname,op:"pageload",metadata:{source:"url"}})),n&&(0,Q.o)("history",(e=>{let{to:n,from:s}=e
175
- void 0===s&&a&&-1!==a.indexOf(n)?a=void 0:s!==n&&(a=void 0,i&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.finish()),i=t({name:G.location.pathname,op:"navigation",metadata:{source:"url"}}))}))},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...K}
176
- class nt{__init(){this.name=tt}constructor(t){nt.prototype.__init.call(this),this.options={...et,...t},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),function(){const t=q()
177
- t&&U.Z1&&(t.mark&&G.performance.mark("sentry-tracing-init"),(t=>{const e=A("CLS",0)
178
- let n,i=0,a=[]
179
- const s=t=>{t.forEach((t=>{if(!t.hadRecentInput){const s=a[0],r=a[a.length-1]
180
- i&&0!==a.length&&t.startTime-r.startTime<1e3&&t.startTime-s.startTime<5e3?(i+=t.value,a.push(t)):(i=t.value,a=[t]),i>e.value&&(e.value=i,e.entries=a,n&&n())}}))},r=C("layout-shift",s)
181
- r&&(n=Y(t,e),O((()=>{s(r.takeRecords()),n(!0)})))})((t=>{const e=t.entries.pop()
182
- e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding CLS"),z.cls={value:t.value,unit:""},F=e)})),(t=>{const e=$(),n=A("LCP")
179
+ i&&t.xhr.setRequestHeader(D.bU,i)}catch(t){}}}(t,r,o,c)}))}const nt="BrowserTracing",it={idleTimeout:B.nT,finalTimeout:B.mg,heartbeatInterval:B.hd,markBackgroundTransactions:!0,routingInstrumentation:function(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2]
180
+ if(!Y||!Y.location)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn("Could not initialize routing instrumentation due to invalid location"))
181
+ let i,s=Y.location.href
182
+ e&&(i=t({name:Y.location.pathname,op:"pageload",metadata:{source:"url"}})),n&&(0,Z.o)("history",(e=>{let{to:n,from:a}=e
183
+ void 0===a&&s&&-1!==s.indexOf(n)?s=void 0:a!==n&&(s=void 0,i&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.finish()),i=t({name:Y.location.pathname,op:"navigation",metadata:{source:"url"}}))}))},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...tt}
184
+ class st{__init(){this.name=nt}constructor(t){st.prototype.__init.call(this),this.options={...it,...t},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),function(){const t=H()
185
+ t&&U.Z1&&(t.mark&&Y.performance.mark("sentry-tracing-init"),(t=>{const e=C("CLS",0)
186
+ let n,i=0,s=[]
187
+ const a=t=>{t.forEach((t=>{if(!t.hadRecentInput){const a=s[0],r=s[s.length-1]
188
+ i&&0!==s.length&&t.startTime-r.startTime<1e3&&t.startTime-a.startTime<5e3?(i+=t.value,s.push(t)):(i=t.value,s=[t]),i>e.value&&(e.value=i,e.entries=s,n&&n())}}))},r=O("layout-shift",a)
189
+ r&&(n=x(t,e),w((()=>{a(r.takeRecords()),n(!0)})))})((t=>{const e=t.entries.pop()
190
+ e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding CLS"),X.cls={value:t.value,unit:""},F=e)})),(t=>{const e=L(),n=C("LCP")
183
191
  let i
184
- const a=t=>{const a=t[t.length-1]
185
- if(a){const t=Math.max(a.startTime-I(),0)
186
- t<e.firstHiddenTime&&(n.value=t,n.entries=[a],i())}},s=C("largest-contentful-paint",a)
187
- if(s){i=Y(t,n)
188
- const e=()=>{L[n.id]||(a(s.takeRecords()),s.disconnect(),L[n.id]=!0,i(!0))};["keydown","click"].forEach((t=>{addEventListener(t,e,{once:!0,capture:!0})})),O(e,!0)}})((t=>{const e=t.entries.pop()
189
- e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding LCP"),z.lcp={value:t.value,unit:"millisecond"},H=e)})),(t=>{const e=$(),n=A("FID")
192
+ const s=t=>{const s=t[t.length-1]
193
+ if(s){const t=Math.max(s.startTime-A(),0)
194
+ t<e.firstHiddenTime&&(n.value=t,n.entries=[s],i())}},a=O("largest-contentful-paint",s)
195
+ if(a){i=x(t,n)
196
+ const e=()=>{M[n.id]||(s(a.takeRecords()),a.disconnect(),M[n.id]=!0,i(!0))};["keydown","click"].forEach((t=>{addEventListener(t,e,{once:!0,capture:!0})})),w(e,!0)}})((t=>{const e=t.entries.pop()
197
+ e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding LCP"),X.lcp={value:t.value,unit:"millisecond"},j=e)})),(t=>{const e=L(),n=C("FID")
190
198
  let i
191
- const a=t=>{t.startTime<e.firstHiddenTime&&(n.value=t.processingStart-t.startTime,n.entries.push(t),i(!0))},s=t=>{t.forEach(a)},r=C("first-input",s)
192
- i=Y(t,n),r&&O((()=>{s(r.takeRecords()),r.disconnect()}),!0)})((t=>{const e=t.entries.pop()
199
+ const s=t=>{t.startTime<e.firstHiddenTime&&(n.value=t.processingStart-t.startTime,n.entries.push(t),i(!0))},a=t=>{t.forEach(s)},r=O("first-input",a)
200
+ i=x(t,n),r&&w((()=>{a(r.takeRecords()),r.disconnect()}),!0)})((t=>{const e=t.entries.pop()
193
201
  if(!e)return
194
- const n=(0,k.XL)(U.Z1),i=(0,k.XL)(e.startTime);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding FID"),z.fid={value:t.value,unit:"millisecond"},z["mark.fid"]={value:n+i,unit:"second"}})))}(),this.options.enableLongTask&&C("longtask",(t=>{for(const e of t){const t=(0,k.x1)()
202
+ const n=(0,G.XL)(U.Z1),i=(0,G.XL)(e.startTime);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding FID"),X.fid={value:t.value,unit:"millisecond"},X["mark.fid"]={value:n+i,unit:"second"}})))}(),this.options.enableLongTask&&O("longtask",(t=>{for(const e of t){const t=(0,G.x1)()
195
203
  if(!t)return
196
- const n=(0,k.XL)(U.Z1+e.startTime),i=(0,k.XL)(e.duration)
204
+ const n=(0,G.XL)(U.Z1+e.startTime),i=(0,G.XL)(e.duration)
197
205
  t.startChild({description:"Main UI thread blocked",op:"ui.long-task",startTimestamp:n,endTimestamp:n+i})}}))}setupOnce(t,e){this._getCurrentHub=e
198
- const{routingInstrumentation:n,startTransactionOnLocationChange:i,startTransactionOnPageLoad:a,markBackgroundTransactions:s,traceFetch:o,traceXHR:c,tracePropagationTargets:_,shouldCreateSpanForRequest:d,_experiments:p}=this.options
199
- n((t=>this._createRouteTransaction(t)),a,i),s&&(G&&G.document?G.document.addEventListener("visibilitychange",(()=>{const t=(0,k.x1)()
200
- if(G.document.hidden&&t){const e="cancelled";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${t.op}`),t.status||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.finish()}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn("[Tracing] Could not set up background tab detection due to lack of global document")),p.enableInteractions&&this._registerInteractionListener(),V({traceFetch:o,traceXHR:c,tracePropagationTargets:_,shouldCreateSpanForRequest:d})}_createRouteTransaction(t){if(!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`))
201
- const{beforeNavigate:e,idleTimeout:n,finalTimeout:i,heartbeatInterval:s}=this.options,o="pageload"===t.op,c=o?it("sentry-trace"):null,_=o?it("baggage"):null,d=c?(0,b.q)(c):void 0,p=_?(0,D.EN)(_):void 0,l={...t,...d,metadata:{...t.metadata,dynamicSamplingContext:d&&!p?{}:p},trimEnd:!0},u="function"==typeof e?e(l):l,h=void 0===u?{...l,sampled:!1}:u
202
- h.metadata=h.name!==l.name?{...h.metadata,source:"custom"}:h.metadata,this._latestRouteName=h.name,this._latestRouteSource=h.metadata&&h.metadata.source,!1===h.sampled&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Will not send ${h.op} transaction because of beforeNavigate.`),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Starting ${h.op} transaction on scope`)
203
- const m=this._getCurrentHub(),{location:g}=G,f=(0,a.lb)(m,h,n,i,!0,{location:g},s)
204
- return f.registerBeforeFinishCallback((t=>{!function(t){const e=q()
205
- if(!e||!G.performance.getEntries||!U.Z1)return;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Tracing] Adding & adjusting spans using Performance API")
206
- const n=(0,k.XL)(U.Z1),i=e.getEntries()
207
- let a,s
208
- if(i.slice(j).forEach((e=>{const i=(0,k.XL)(e.startTime),o=(0,k.XL)(e.duration)
209
- if(!("navigation"===t.op&&n+i<t.startTimestamp))switch(e.entryType){case"navigation":!function(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach((i=>{X(t,e,i,n)})),X(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),X(t,e,"fetch",n,"cache","domainLookupStart"),X(t,e,"domainLookup",n,"DNS"),function(t,e,n){P(t,{op:"browser",description:"request",startTimestamp:n+(0,k.XL)(e.requestStart),endTimestamp:n+(0,k.XL)(e.responseEnd)}),P(t,{op:"browser",description:"response",startTimestamp:n+(0,k.XL)(e.responseStart),endTimestamp:n+(0,k.XL)(e.responseEnd)})}(t,e,n)}(t,e,n),a=n+(0,k.XL)(e.responseStart),s=n+(0,k.XL)(e.requestStart)
206
+ const{routingInstrumentation:n,startTransactionOnLocationChange:i,startTransactionOnPageLoad:s,markBackgroundTransactions:a,traceFetch:o,traceXHR:c,tracePropagationTargets:_,shouldCreateSpanForRequest:d,_experiments:l}=this.options
207
+ n((t=>this._createRouteTransaction(t)),s,i),a&&(Y&&Y.document?Y.document.addEventListener("visibilitychange",(()=>{const t=(0,G.x1)()
208
+ if(Y.document.hidden&&t){const e="cancelled";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${t.op}`),t.status||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.finish()}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn("[Tracing] Could not set up background tab detection due to lack of global document")),l.enableInteractions&&this._registerInteractionListener(),et({traceFetch:o,traceXHR:c,tracePropagationTargets:_,shouldCreateSpanForRequest:d})}_createRouteTransaction(t){if(!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`))
209
+ const{beforeNavigate:e,idleTimeout:n,finalTimeout:i,heartbeatInterval:a}=this.options,o="pageload"===t.op,c=o?at("sentry-trace"):null,_=o?at("baggage"):null,d=c?(0,b.q)(c):void 0,l=_?(0,D.EN)(_):void 0,p={...t,...d,metadata:{...t.metadata,dynamicSamplingContext:d&&!l?{}:l},trimEnd:!0},u="function"==typeof e?e(p):p,h=void 0===u?{...p,sampled:!1}:u
210
+ h.metadata=h.name!==p.name?{...h.metadata,source:"custom"}:h.metadata,this._latestRouteName=h.name,this._latestRouteSource=h.metadata&&h.metadata.source,!1===h.sampled&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Will not send ${h.op} transaction because of beforeNavigate.`),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Starting ${h.op} transaction on scope`)
211
+ const g=this._getCurrentHub(),{location:m}=Y,f=(0,s.lb)(g,h,n,i,!0,{location:m},a)
212
+ return f.registerBeforeFinishCallback((t=>{!function(t){const e=H()
213
+ if(!e||!Y.performance.getEntries||!U.Z1)return;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Tracing] Adding & adjusting spans using Performance API")
214
+ const n=(0,G.XL)(U.Z1),i=e.getEntries()
215
+ let s,a
216
+ if(i.slice(z).forEach((e=>{const i=(0,G.XL)(e.startTime),o=(0,G.XL)(e.duration)
217
+ if(!("navigation"===t.op&&n+i<t.startTimestamp))switch(e.entryType){case"navigation":!function(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach((i=>{J(t,e,i,n)})),J(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),J(t,e,"fetch",n,"cache","domainLookupStart"),J(t,e,"domainLookup",n,"DNS"),function(t,e,n){q(t,{op:"browser",description:"request",startTimestamp:n+(0,G.XL)(e.requestStart),endTimestamp:n+(0,G.XL)(e.responseEnd)}),q(t,{op:"browser",description:"response",startTimestamp:n+(0,G.XL)(e.responseStart),endTimestamp:n+(0,G.XL)(e.responseEnd)})}(t,e,n)}(t,e,n),s=n+(0,G.XL)(e.responseStart),a=n+(0,G.XL)(e.requestStart)
210
218
  break
211
- case"mark":case"paint":case"measure":{!function(t,e,n,i,a){const s=a+n,r=s+i
212
- P(t,{description:e.name,endTimestamp:r,op:e.entryType,startTimestamp:s})}(t,e,i,o,n)
213
- const a=$(),s=e.startTime<a.firstHiddenTime
214
- "first-paint"===e.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding FP"),z.fp={value:e.startTime,unit:"millisecond"}),"first-contentful-paint"===e.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding FCP"),z.fcp={value:e.startTime,unit:"millisecond"})
215
- break}case"resource":{const a=e.name.replace(G.location.origin,"")
216
- !function(t,e,n,i,a,s){if("xmlhttprequest"===e.initiatorType||"fetch"===e.initiatorType)return
219
+ case"mark":case"paint":case"measure":{!function(t,e,n,i,s){const a=s+n,r=a+i
220
+ q(t,{description:e.name,endTimestamp:r,op:e.entryType,startTimestamp:a})}(t,e,i,o,n)
221
+ const s=L(),a=e.startTime<s.firstHiddenTime
222
+ "first-paint"===e.name&&a&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding FP"),X.fp={value:e.startTime,unit:"millisecond"}),"first-contentful-paint"===e.name&&a&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding FCP"),X.fcp={value:e.startTime,unit:"millisecond"})
223
+ break}case"resource":{const s=e.name.replace(Y.location.origin,"")
224
+ !function(t,e,n,i,s,a){if("xmlhttprequest"===e.initiatorType||"fetch"===e.initiatorType)return
217
225
  const r={}
218
- "transferSize"in e&&(r["Transfer Size"]=e.transferSize),"encodedBodySize"in e&&(r["Encoded Body Size"]=e.encodedBodySize),"decodedBodySize"in e&&(r["Decoded Body Size"]=e.decodedBodySize)
219
- const o=s+i
220
- P(t,{description:n,endTimestamp:o+a,op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",startTimestamp:o,data:r})}(t,e,a,i,o,n)
221
- break}}})),j=Math.max(i.length-1,0),function(t){const e=G.navigator
226
+ "transferSize"in e&&(r["Transfer Size"]=e.transferSize),"encodedBodySize"in e&&(r["Encoded Body Size"]=e.encodedBodySize),"decodedBodySize"in e&&(r["Decoded Body Size"]=e.decodedBodySize),"renderBlockingStatus"in e&&(r["resource.render_blocking_status"]=e.renderBlockingStatus)
227
+ const o=a+i
228
+ q(t,{description:n,endTimestamp:o+s,op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",startTimestamp:o,data:r})}(t,e,s,i,o,n)
229
+ break}}})),z=Math.max(i.length-1,0),function(t){const e=Y.navigator
222
230
  if(!e)return
223
231
  const n=e.connection
224
- n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),M(n.rtt)&&(z["connection.rtt"]={value:n.rtt,unit:"millisecond"})),M(e.deviceMemory)&&t.setTag("deviceMemory",`${e.deviceMemory} GB`),M(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}(t),"pageload"===t.op){"number"==typeof a&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding TTFB"),z.ttfb={value:1e3*(a-t.startTimestamp),unit:"millisecond"},"number"==typeof s&&s<=a&&(z["ttfb.requestTime"]={value:1e3*(a-s),unit:"millisecond"})),["fcp","fp","lcp"].forEach((e=>{if(!z[e]||n>=t.startTimestamp)return
225
- const i=z[e].value,a=n+(0,k.XL)(i),s=Math.abs(1e3*(a-t.startTimestamp)),o=s-i;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Measurements] Normalized ${e} from ${i} to ${s} (${o})`),z[e].value=s}))
226
- const e=z["mark.fid"]
227
- e&&z.fid&&(P(t,{description:"first input delay",endTimestamp:e.value+(0,k.XL)(z.fid.value),op:"ui.action",startTimestamp:e.value}),delete z["mark.fid"]),"fcp"in z||delete z.cls,Object.keys(z).forEach((e=>{t.setMeasurement(e,z[e].value,z[e].unit)})),function(t){H&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding LCP Data"),H.element&&t.setTag("lcp.element",(0,N.Rt)(H.element)),H.id&&t.setTag("lcp.id",H.id),H.url&&t.setTag("lcp.url",H.url.trim().slice(0,200)),t.setTag("lcp.size",H.size)),F&&F.sources&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding CLS Data"),F.sources.forEach(((e,n)=>t.setTag(`cls.source.${n+1}`,(0,N.Rt)(e.node)))))}(t)}H=void 0,F=void 0,z={}}(t)})),f}_registerInteractionListener(){let t
228
- const e=()=>{const{idleTimeout:e,finalTimeout:n,heartbeatInterval:i}=this.options,s="ui.action.click"
229
- if(t&&(t.finish(),t=void 0),!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`[Tracing] Did not create ${s} transaction because _getCurrentHub is invalid.`))
230
- if(!this._latestRouteName)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`[Tracing] Did not create ${s} transaction because _latestRouteName is missing.`))
231
- const o=this._getCurrentHub(),{location:c}=G,_={name:this._latestRouteName,op:s,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}}
232
- t=(0,a.lb)(o,_,e,n,!0,{location:c},i)};["click"].forEach((t=>{addEventListener(t,e,{once:!1,capture:!0})}))}}function it(t){const e=(0,N.qT)(`meta[name=${t}]`)
233
- return e?e.getAttribute("content"):null}var at,st=n(20484)
234
- !function(t){t.Ok="ok",t.DeadlineExceeded="deadline_exceeded",t.Unauthenticated="unauthenticated",t.PermissionDenied="permission_denied",t.NotFound="not_found",t.ResourceExhausted="resource_exhausted",t.InvalidArgument="invalid_argument",t.Unimplemented="unimplemented",t.Unavailable="unavailable",t.InternalError="internal_error",t.UnknownError="unknown_error",t.Cancelled="cancelled",t.AlreadyExists="already_exists",t.FailedPrecondition="failed_precondition",t.Aborted="aborted",t.OutOfRange="out_of_range",t.DataLoss="data_loss"}(at||(at={}))
235
- var rt=n(21535);("undefined"==typeof __SENTRY_TRACING__||__SENTRY_TRACING__)&&(0,a.ro)()},20484:(t,e,n)=>{n.d(e,{Dr:()=>c,Zd:()=>_,gB:()=>o})
236
- var i=n(7209),a=n(88468),s=n(88521),r=n(15834)
232
+ n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),P(n.rtt)&&(X["connection.rtt"]={value:n.rtt,unit:"millisecond"})),P(e.deviceMemory)&&t.setTag("deviceMemory",`${e.deviceMemory} GB`),P(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}(t),"pageload"===t.op){"number"==typeof s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding TTFB"),X.ttfb={value:1e3*(s-t.startTimestamp),unit:"millisecond"},"number"==typeof a&&a<=s&&(X["ttfb.requestTime"]={value:1e3*(s-a),unit:"millisecond"})),["fcp","fp","lcp"].forEach((e=>{if(!X[e]||n>=t.startTimestamp)return
233
+ const i=X[e].value,s=n+(0,G.XL)(i),a=Math.abs(1e3*(s-t.startTimestamp)),o=a-i;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Measurements] Normalized ${e} from ${i} to ${a} (${o})`),X[e].value=a}))
234
+ const e=X["mark.fid"]
235
+ e&&X.fid&&(q(t,{description:"first input delay",endTimestamp:e.value+(0,G.XL)(X.fid.value),op:"ui.action",startTimestamp:e.value}),delete X["mark.fid"]),"fcp"in X||delete X.cls,Object.keys(X).forEach((e=>{t.setMeasurement(e,X[e].value,X[e].unit)})),function(t){j&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding LCP Data"),j.element&&t.setTag("lcp.element",(0,k.Rt)(j.element)),j.id&&t.setTag("lcp.id",j.id),j.url&&t.setTag("lcp.url",j.url.trim().slice(0,200)),t.setTag("lcp.size",j.size)),F&&F.sources&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding CLS Data"),F.sources.forEach(((e,n)=>t.setTag(`cls.source.${n+1}`,(0,k.Rt)(e.node)))))}(t)}j=void 0,F=void 0,X={}}(t)})),f}_registerInteractionListener(){let t
236
+ const e=()=>{const{idleTimeout:e,finalTimeout:n,heartbeatInterval:i}=this.options,a="ui.action.click"
237
+ if(t&&(t.finish(),t=void 0),!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`[Tracing] Did not create ${a} transaction because _getCurrentHub is invalid.`))
238
+ if(!this._latestRouteName)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`))
239
+ const o=this._getCurrentHub(),{location:c}=Y,_={name:this._latestRouteName,op:a,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}}
240
+ t=(0,s.lb)(o,_,e,n,!0,{location:c},i)};["click"].forEach((t=>{addEventListener(t,e,{once:!1,capture:!0})}))}}function at(t){const e=(0,k.qT)(`meta[name=${t}]`)
241
+ return e?e.getAttribute("content"):null}var rt,ot=n(20484)
242
+ !function(t){t.Ok="ok",t.DeadlineExceeded="deadline_exceeded",t.Unauthenticated="unauthenticated",t.PermissionDenied="permission_denied",t.NotFound="not_found",t.ResourceExhausted="resource_exhausted",t.InvalidArgument="invalid_argument",t.Unimplemented="unimplemented",t.Unavailable="unavailable",t.InternalError="internal_error",t.UnknownError="unknown_error",t.Cancelled="cancelled",t.AlreadyExists="already_exists",t.FailedPrecondition="failed_precondition",t.Aborted="aborted",t.OutOfRange="out_of_range",t.DataLoss="data_loss"}(rt||(rt={}))
243
+ var ct=n(21535);("undefined"==typeof __SENTRY_TRACING__||__SENTRY_TRACING__)&&(0,s.ro)()},20484:(t,e,n)=>{n.d(e,{Dr:()=>c,Zd:()=>_,gB:()=>o})
244
+ var i=n(7209),s=n(88468),a=n(88521),r=n(15834)
237
245
  class o{__init(){this.spans=[]}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3
238
- o.prototype.__init.call(this),this._maxlen=t}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class c{__init2(){this.traceId=(0,i.DM)()}__init3(){this.spanId=(0,i.DM)().substring(16)}__init4(){this.startTimestamp=(0,a._I)()}__init5(){this.tags={}}__init6(){this.data={}}__init7(){this.instrumenter="sentry"}constructor(t){if(c.prototype.__init2.call(this),c.prototype.__init3.call(this),c.prototype.__init4.call(this),c.prototype.__init5.call(this),c.prototype.__init6.call(this),c.prototype.__init7.call(this),!t)return this
246
+ o.prototype.__init.call(this),this._maxlen=t}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class c{__init2(){this.traceId=(0,i.DM)()}__init3(){this.spanId=(0,i.DM)().substring(16)}__init4(){this.startTimestamp=(0,s._I)()}__init5(){this.tags={}}__init6(){this.data={}}__init7(){this.instrumenter="sentry"}constructor(t){if(c.prototype.__init2.call(this),c.prototype.__init3.call(this),c.prototype.__init4.call(this),c.prototype.__init5.call(this),c.prototype.__init6.call(this),c.prototype.__init7.call(this),!t)return this
239
247
  t.traceId&&(this.traceId=t.traceId),t.spanId&&(this.spanId=t.spanId),t.parentSpanId&&(this.parentSpanId=t.parentSpanId),"sampled"in t&&(this.sampled=t.sampled),t.op&&(this.op=t.op),t.description&&(this.description=t.description),t.data&&(this.data=t.data),t.tags&&(this.tags=t.tags),t.status&&(this.status=t.status),t.startTimestamp&&(this.startTimestamp=t.startTimestamp),t.endTimestamp&&(this.endTimestamp=t.endTimestamp),t.instrumenter&&(this.instrumenter=t.instrumenter)}startChild(t){const e=new c({...t,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId})
240
248
  if(e.spanRecorder=this.spanRecorder,e.spanRecorder&&e.spanRecorder.add(e),e.transaction=this.transaction,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&e.transaction){const n=`[Tracing] Starting '${t&&t.op||"< unknown op >"}' span on transaction '${e.transaction.name||"< unknown name >"}' (${e.transaction.spanId}).`
241
- e.transaction.metadata.spanMetadata[e.spanId]={logMessage:n},s.kg.log(n)}return e}setTag(t,e){return this.tags={...this.tags,[t]:e},this}setData(t,e){return this.data={...this.data,[t]:e},this}setStatus(t){return this.status=t,this}setHttpStatus(t){this.setTag("http.status_code",String(t))
249
+ e.transaction.metadata.spanMetadata[e.spanId]={logMessage:n},a.kg.log(n)}return e}setTag(t,e){return this.tags={...this.tags,[t]:e},this}setData(t,e){return this.data={...this.data,[t]:e},this}setStatus(t){return this.status=t,this}setHttpStatus(t){this.setTag("http.status_code",String(t))
242
250
  const e=_(t)
243
251
  return"unknown_error"!==e&&this.setStatus(e),this}isSuccess(){return"ok"===this.status}finish(t){if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){const{logMessage:t}=this.transaction.metadata.spanMetadata[this.spanId]
244
- t&&s.kg.log(t.replace("Starting","Finishing"))}this.endTimestamp="number"==typeof t?t:(0,a._I)()}toTraceparent(){let t=""
252
+ t&&a.kg.log(t.replace("Starting","Finishing"))}this.endTimestamp="number"==typeof t?t:(0,s._I)()}toTraceparent(){let t=""
245
253
  return void 0!==this.sampled&&(t=this.sampled?"-1":"-0"),`${this.traceId}-${this.spanId}${t}`}toContext(){return(0,r.Jr)({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(t){return this.data=t.data||{},this.description=t.description,this.endTimestamp=t.endTimestamp,this.op=t.op,this.parentSpanId=t.parentSpanId,this.sampled=t.sampled,this.spanId=t.spanId||this.spanId,this.startTimestamp=t.startTimestamp||this.startTimestamp,this.status=t.status,this.tags=t.tags||{},this.traceId=t.traceId||this.traceId,this}getTraceContext(){return(0,r.Jr)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return(0,r.Jr)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})}}function _(t){if(t<400&&t>=100)return"ok"
246
254
  if(t>=400&&t<500)switch(t){case 401:return"unauthenticated"
247
255
  case 403:return"permission_denied"
@@ -252,28 +260,27 @@ case 429:return"resource_exhausted"
252
260
  default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented"
253
261
  case 503:return"unavailable"
254
262
  case 504:return"deadline_exceeded"
255
- default:return"internal_error"}return"unknown_error"}},21535:(t,e,n)=>{n.d(e,{Y:()=>c})
256
- var i=n(8651),a=n(88468),s=n(88521),r=n(15834),o=n(20484)
257
- class c extends o.Dr{__init(){this._measurements={}}__init2(){this._contexts={}}__init3(){this._frozenDynamicSamplingContext=void 0}constructor(t,e){super(t),c.prototype.__init.call(this),c.prototype.__init2.call(this),c.prototype.__init3.call(this),this._hub=e||(0,i.Gd)(),this._name=t.name||"",this.metadata={source:"custom",...t.metadata,spanMetadata:{},changes:[],propagations:0},this._trimEnd=t.trimEnd,this.transaction=this
263
+ default:return"internal_error"}return"unknown_error"}},21535:(t,e,n)=>{n.d(e,{Y:()=>o})
264
+ var i=n(8651),s=n(88521),a=n(15834),r=n(20484)
265
+ class o extends r.Dr{__init(){this._measurements={}}__init2(){this._contexts={}}__init3(){this._frozenDynamicSamplingContext=void 0}constructor(t,e){super(t),o.prototype.__init.call(this),o.prototype.__init2.call(this),o.prototype.__init3.call(this),this._hub=e||(0,i.Gd)(),this._name=t.name||"",this.metadata={source:"custom",...t.metadata,spanMetadata:{}},this._trimEnd=t.trimEnd,this.transaction=this
258
266
  const n=this.metadata.dynamicSamplingContext
259
267
  n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(t){this.setName(t)}setName(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"custom"
260
- t===this.name&&e===this.metadata.source||this.metadata.changes.push({source:this.metadata.source,timestamp:(0,a.ph)(),propagations:this.metadata.propagations}),this._name=t,this.metadata.source=e}initSpanRecorder(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3
261
- this.spanRecorder||(this.spanRecorder=new o.gB(t)),this.spanRecorder.add(this)}setContext(t,e){null===e?delete this._contexts[t]:this._contexts[t]=e}setMeasurement(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:""
268
+ this._name=t,this.metadata.source=e}initSpanRecorder(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3
269
+ this.spanRecorder||(this.spanRecorder=new r.gB(t)),this.spanRecorder.add(this)}setContext(t,e){null===e?delete this._contexts[t]:this._contexts[t]=e}setMeasurement(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:""
262
270
  this._measurements[t]={value:e,unit:n}}setMetadata(t){this.metadata={...this.metadata,...t}}finish(t){if(void 0!==this.endTimestamp)return
263
271
  if(this.name||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(t),!0!==this.sampled){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled.")
264
272
  const t=this._hub.getClient()
265
273
  return void(t&&t.recordDroppedEvent("sample_rate","transaction"))}const e=this.spanRecorder?this.spanRecorder.spans.filter((t=>t!==this&&t.endTimestamp)):[]
266
274
  this._trimEnd&&e.length>0&&(this.endTimestamp=e.reduce(((t,e)=>t.endTimestamp&&e.endTimestamp?t.endTimestamp>e.endTimestamp?t:e:t)).endTimestamp)
267
- const n=this.metadata,i={contexts:{...this._contexts,trace:this.getTraceContext()},spans:e,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...n,dynamicSamplingContext:this.getDynamicSamplingContext()},...n.source&&{transaction_info:{source:n.source,changes:n.changes,propagations:n.propagations}}}
275
+ const n=this.metadata,i={contexts:{...this._contexts,trace:this.getTraceContext()},spans:e,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...n,dynamicSamplingContext:this.getDynamicSamplingContext()},...n.source&&{transaction_info:{source:n.source}}}
268
276
  return Object.keys(this._measurements).length>0&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),i.measurements=this._measurements),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),this._hub.captureEvent(i)}toContext(){const t=super.toContext()
269
- return(0,r.Jr)({...t,name:this.name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this.name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext
277
+ return(0,a.Jr)({...t,name:this.name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this.name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext
270
278
  const t=this._hub||(0,i.Gd)(),e=t&&t.getClient()
271
279
  if(!e)return{}
272
- const{environment:n,release:a}=e.getOptions()||{},{publicKey:s}=e.getDsn()||{},o=this.metadata.sampleRate,c=void 0!==o?o.toString():void 0,_=t.getScope(),{segment:d}=_&&_.getUser()||{},p=this.metadata.source,l=p&&"url"!==p?this.name:void 0
273
- return(0,r.Jr)({environment:n,release:a,transaction:l,user_segment:d,public_key:s,trace_id:this.traceId,sample_rate:c})}}},48206:(t,e,n)=>{n.d(e,{XL:()=>r,x1:()=>s,zu:()=>a})
274
- var i=n(8651)
275
- function a(t){const e=(0,i.Gd)().getClient(),n=t||e&&e.getOptions()
276
- return!!n&&("tracesSampleRate"in n||"tracesSampler"in n)}function s(t){const e=(t||(0,i.Gd)()).getScope()
277
- return e&&e.getTransaction()}function r(t){return t/1e3}}}])
280
+ const{environment:n,release:s}=e.getOptions()||{},{publicKey:r}=e.getDsn()||{},o=this.metadata.sampleRate,c=void 0!==o?o.toString():void 0,_=t.getScope(),{segment:d}=_&&_.getUser()||{},l=this.metadata.source,p=l&&"url"!==l?this.name:void 0
281
+ return(0,a.Jr)({environment:n,release:s,transaction:p,user_segment:d,public_key:r,trace_id:this.traceId,sample_rate:c})}}},48206:(t,e,n)=>{n.d(e,{XL:()=>o,x1:()=>r,zu:()=>a})
282
+ var i=n(12058),s=n(8651)
283
+ function a(t){return(0,i.z)(t)}function r(t){const e=(t||(0,s.Gd)()).getScope()
284
+ return e&&e.getTransaction()}function o(t){return t/1e3}}}])
278
285
 
279
- //# sourceMappingURL=chunk.79.53e8aa9671b2d5dae8ba.map
286
+ //# sourceMappingURL=chunk.79.4a959c324df25480b90e.map