vviinn-widgets 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/{www/build/app-globals-e387e916.js → dist/cjs/app-globals-fde3e8b7.js} +10 -832
  2. package/dist/cjs/cropper-handler_24.cjs.entry.js +3491 -0
  3. package/{www/build/imageSearch.store-5635032b.js → dist/cjs/imageSearch.store-4542616c.js} +5655 -7439
  4. package/dist/cjs/index-1e138ce4.js +1733 -0
  5. package/dist/cjs/index.cjs.js +2 -0
  6. package/dist/cjs/loader.cjs.js +23 -0
  7. package/dist/cjs/products.worker-8c8e2b8a.js +17 -0
  8. package/dist/cjs/products.worker-c3f8f567.js +1 -0
  9. package/dist/cjs/vpr-slider-f7db5adc.js +1137 -0
  10. package/dist/cjs/vpr-slider.cjs.entry.js +10 -0
  11. package/dist/cjs/vviinn-vpr-widget.cjs.entry.js +104 -0
  12. package/dist/cjs/vviinn-widgets.cjs.js +21 -0
  13. package/dist/collection/Image/error.js +18 -0
  14. package/dist/collection/Image/form.js +5 -0
  15. package/dist/collection/Image/fromFile.js +18 -0
  16. package/dist/collection/Image/renderPromise.js +6 -0
  17. package/dist/collection/Image/resizeImage.js +12 -0
  18. package/dist/{vviinn-widgets/toFile-e9b91c1b.js → collection/Image/toFile.js} +2 -4
  19. package/dist/collection/analytics/GAnalytics.js +32 -0
  20. package/dist/collection/analytics/GeneralAnalytics.js +9 -0
  21. package/dist/collection/analytics/GtagAnalytics.js +35 -0
  22. package/dist/collection/analytics/ProductAnalytics.js +1 -0
  23. package/dist/collection/campaign/Campaign.js +8 -0
  24. package/dist/collection/campaign/CampaignService.js +5 -0
  25. package/dist/collection/campaign/VCSCampaign.js +1 -0
  26. package/dist/collection/campaign/VCSCampaignResponse.js +1 -0
  27. package/dist/collection/campaign/VCSCampaignService.js +5 -0
  28. package/dist/collection/campaign/VPRCampaignResponse.js +1 -0
  29. package/dist/collection/campaign/VPRCampaignService.js +5 -0
  30. package/dist/collection/collection-manifest.json +37 -0
  31. package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.css +71 -0
  32. package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.js +25 -0
  33. package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.css +49 -0
  34. package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +64 -0
  35. package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.css +33 -0
  36. package/dist/{vviinn-widgets/image-cropper.entry.js → collection/components/image-search/image-view/image-cropper/image-cropper.js} +54 -30
  37. package/dist/collection/components/image-search/search-filters/search-filters.css +113 -0
  38. package/dist/collection/components/image-search/search-filters/search-filters.js +112 -0
  39. package/dist/collection/components/vpr-slider/products.worker.js +6 -0
  40. package/dist/collection/components/vpr-slider/vpr-slider.css +93 -0
  41. package/dist/collection/components/vpr-slider/vpr-slider.js +256 -0
  42. package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.css +7 -0
  43. package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +36 -0
  44. package/dist/collection/components/vviinn-error/vviinn-error.css +38 -0
  45. package/dist/collection/components/vviinn-error/vviinn-error.js +18 -0
  46. package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.css +3 -0
  47. package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.js +34 -0
  48. package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.css +3 -0
  49. package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js +34 -0
  50. package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.css +10 -0
  51. package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +123 -0
  52. package/dist/collection/components/vviinn-example-images/vviinn-example-images.css +21 -0
  53. package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +70 -0
  54. package/dist/collection/components/vviinn-icons/index.js +3 -0
  55. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.css +25 -0
  56. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +79 -0
  57. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +47 -0
  58. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +83 -0
  59. package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +31 -0
  60. package/{www/build/vviinn-image-view.entry.js → dist/collection/components/vviinn-image-view/vviinn-image-view.js} +28 -23
  61. package/dist/collection/components/vviinn-modal/vviinn-modal.css +99 -0
  62. package/dist/collection/components/vviinn-modal/vviinn-modal.js +98 -0
  63. package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.css +61 -0
  64. package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.js +40 -0
  65. package/dist/collection/components/vviinn-overlay/vviinn-overlay.css +33 -0
  66. package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +15 -0
  67. package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.css +29 -0
  68. package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +71 -0
  69. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +19 -0
  70. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +21 -0
  71. package/dist/collection/components/vviinn-product-card/render-helpers.js +28 -0
  72. package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +38 -0
  73. package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +358 -0
  74. package/dist/collection/components/vviinn-slider/arrow.js +11 -0
  75. package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.css +4 -0
  76. package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +15 -0
  77. package/dist/collection/components/vviinn-slider/vviinn-slider.css +109 -0
  78. package/dist/collection/components/vviinn-slider/vviinn-slider.js +181 -0
  79. package/dist/collection/components/vviinn-teaser/vviinn-teaser.css +14 -0
  80. package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +23 -0
  81. package/dist/collection/components/vviinn-vpr-widget/GridMode.js +1 -0
  82. package/dist/collection/components/vviinn-vpr-widget/token-helpers.js +11 -0
  83. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +303 -0
  84. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +37 -0
  85. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +16 -0
  86. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +102 -0
  87. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +378 -0
  88. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +237 -0
  89. package/dist/collection/cropper/Cropper.js +1 -0
  90. package/dist/collection/cropper/Handler.js +61 -0
  91. package/dist/collection/dom/index.js +3 -0
  92. package/dist/collection/error.js +14 -0
  93. package/dist/collection/geometry/Clip.js +14 -0
  94. package/dist/collection/geometry/Point.js +32 -0
  95. package/dist/collection/geometry/Rectangle.js +95 -0
  96. package/dist/collection/geometry/RectangleAlt.js +1 -0
  97. package/dist/collection/geometry/Sized.js +8 -0
  98. package/dist/collection/global.js +14 -0
  99. package/dist/collection/index.js +1 -0
  100. package/dist/collection/interfaces/generated.js +5 -0
  101. package/dist/collection/interfaces/recommendation.js +1 -0
  102. package/dist/collection/network/apiClient.js +9 -0
  103. package/dist/collection/network/ion/File.js +14 -0
  104. package/dist/collection/network/ion/Form.js +64 -0
  105. package/dist/collection/network/ion/Link.js +8 -0
  106. package/dist/collection/network/ion/ValueObject.js +23 -0
  107. package/dist/collection/network/request.js +19 -0
  108. package/dist/collection/network/utils.js +37 -0
  109. package/dist/collection/recommendation/recommendation.js +1 -0
  110. package/dist/collection/searchSession/searchSession.js +26 -0
  111. package/dist/collection/slider/GridMode.js +1 -0
  112. package/dist/collection/store/imageSearch.store.js +106 -0
  113. package/dist/collection/store/store.js +11 -0
  114. package/dist/collection/stories/image-selector.stories.js +6 -0
  115. package/dist/collection/stories/image-view.stories.js +6 -0
  116. package/dist/collection/stories/modal.stories.js +12 -0
  117. package/dist/collection/stories/onboarding.stories.js +11 -0
  118. package/dist/collection/stories/overlay.stories.js +5 -0
  119. package/dist/collection/stories/overlayedModal.stories.js +8 -0
  120. package/dist/collection/stories/privacy-badge.stories.js +11 -0
  121. package/dist/collection/stories/slider.stories.js +17 -0
  122. package/dist/collection/stories/teaser.stories.js +5 -0
  123. package/dist/collection/stories/vps-widget.stories.js +47 -0
  124. package/dist/collection/stories/vviinn-product.stories.js +19 -0
  125. package/dist/collection/utils/collections/collectionsUtils.js +5 -0
  126. package/dist/collection/utils/either.js +3 -0
  127. package/dist/collection/utils/enum/enumUtils.js +3 -0
  128. package/dist/collection/utils/event/Events.js +1 -0
  129. package/dist/collection/utils/option/option.js +4 -0
  130. package/dist/collection/utils/semigroup/semigroupDiff.js +6 -0
  131. package/dist/collection/utils/token/tokenUtils.js +9 -0
  132. package/dist/{vviinn-widgets/app-globals-e387e916.js → esm/app-globals-83a35761.js} +7 -831
  133. package/dist/{vviinn-widgets/vviinn-slider.entry.js → esm/cropper-handler_24.entry.js} +963 -15
  134. package/dist/{vviinn-widgets/imageSearch.store-5635032b.js → esm/imageSearch.store-f1924d7f.js} +5607 -7438
  135. package/dist/esm/index-5673a5e2.js +1702 -0
  136. package/dist/esm/index.js +1 -0
  137. package/dist/esm/loader.js +19 -0
  138. package/dist/esm/polyfills/core-js.js +11 -0
  139. package/dist/esm/polyfills/css-shim.js +1 -0
  140. package/dist/esm/polyfills/dom.js +79 -0
  141. package/dist/esm/polyfills/es5-html-element.js +1 -0
  142. package/dist/esm/polyfills/index.js +34 -0
  143. package/dist/esm/polyfills/system.js +6 -0
  144. package/dist/{vviinn-widgets/products.worker-8680c07e.js → esm/products.worker-7c653c0c.js} +3 -3
  145. package/dist/esm/products.worker-c3f8f567.js +1 -0
  146. package/dist/esm/vpr-slider-dbcf0125.js +1134 -0
  147. package/dist/esm/vpr-slider.entry.js +2 -0
  148. package/{www/build → dist/esm}/vviinn-vpr-widget.entry.js +2 -6
  149. package/dist/esm/vviinn-widgets.js +19 -0
  150. package/dist/index.cjs.js +1 -0
  151. package/dist/index.js +1 -0
  152. package/dist/loader/cdn.js +3 -0
  153. package/dist/loader/index.cjs.js +3 -0
  154. package/dist/loader/index.d.ts +12 -0
  155. package/dist/loader/index.es2017.js +3 -0
  156. package/dist/loader/index.js +4 -0
  157. package/dist/loader/package.json +10 -0
  158. package/dist/vviinn-widgets/index.esm.js +0 -1
  159. package/dist/vviinn-widgets/p-3fba7dcc.entry.js +1 -0
  160. package/dist/vviinn-widgets/p-4deac854.js +15 -0
  161. package/dist/vviinn-widgets/p-6483a3cc.entry.js +1 -0
  162. package/dist/vviinn-widgets/p-a2d4d778.js +1 -0
  163. package/dist/vviinn-widgets/p-b674aff3.js +1 -0
  164. package/dist/vviinn-widgets/p-c3f8f567.js +1 -0
  165. package/dist/vviinn-widgets/p-ea56aec8.js +1 -0
  166. package/dist/vviinn-widgets/p-fa8d84b4.js +1 -0
  167. package/dist/vviinn-widgets/p-fac70e19.entry.js +1 -0
  168. package/dist/vviinn-widgets/vviinn-widgets.css +1 -6
  169. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -125
  170. package/package.json +1 -1
  171. package/www/build/index.esm.js +0 -1
  172. package/www/build/p-3fba7dcc.entry.js +1 -0
  173. package/www/build/p-4deac854.js +15 -0
  174. package/www/build/p-6483a3cc.entry.js +1 -0
  175. package/www/build/p-a2d4d778.js +1 -0
  176. package/www/build/p-b674aff3.js +1 -0
  177. package/www/build/p-bd495d94.js +125 -0
  178. package/www/build/p-c3f8f567.js +1 -0
  179. package/www/build/p-e0153ae2.css +6 -0
  180. package/www/build/p-ea56aec8.js +1 -0
  181. package/www/build/p-fa8d84b4.js +1 -0
  182. package/www/build/p-fac70e19.entry.js +1 -0
  183. package/www/build/vviinn-widgets.css +1 -6
  184. package/www/build/vviinn-widgets.esm.js +1 -125
  185. package/www/index.html +2 -11
  186. package/dist/vviinn-widgets/Handler-54ea3110.js +0 -1428
  187. package/dist/vviinn-widgets/cropper-handler.entry.js +0 -23
  188. package/dist/vviinn-widgets/css-shim-f0027935.js +0 -4
  189. package/dist/vviinn-widgets/dom-db0073f0.js +0 -73
  190. package/dist/vviinn-widgets/highlight-box.entry.js +0 -39
  191. package/dist/vviinn-widgets/index-69a0f361.js +0 -3010
  192. package/dist/vviinn-widgets/number-1cb92f15.js +0 -128
  193. package/dist/vviinn-widgets/option-e6e673e5.js +0 -3379
  194. package/dist/vviinn-widgets/products.worker-ae9180fc.js +0 -7987
  195. package/dist/vviinn-widgets/search-filters.entry.js +0 -56
  196. package/dist/vviinn-widgets/shadow-css-c1fdfa9f.js +0 -389
  197. package/dist/vviinn-widgets/vpr-slider-457c407d.js +0 -7276
  198. package/dist/vviinn-widgets/vpr-slider.entry.js +0 -2
  199. package/dist/vviinn-widgets/vviinn-detected-object.entry.js +0 -50
  200. package/dist/vviinn-widgets/vviinn-empty-results.entry.js +0 -16
  201. package/dist/vviinn-widgets/vviinn-error.entry.js +0 -15
  202. package/dist/vviinn-widgets/vviinn-example-image.entry.js +0 -35
  203. package/dist/vviinn-widgets/vviinn-example-images.entry.js +0 -23
  204. package/dist/vviinn-widgets/vviinn-image-selector.entry.js +0 -5055
  205. package/dist/vviinn-widgets/vviinn-image-view.entry.js +0 -90
  206. package/dist/vviinn-widgets/vviinn-modal.entry.js +0 -30
  207. package/dist/vviinn-widgets/vviinn-onboarding.entry.js +0 -15
  208. package/dist/vviinn-widgets/vviinn-overlay.entry.js +0 -15
  209. package/dist/vviinn-widgets/vviinn-overlayed-modal.entry.js +0 -18
  210. package/dist/vviinn-widgets/vviinn-privacy-badge.entry.js +0 -15
  211. package/dist/vviinn-widgets/vviinn-product-card.entry.js +0 -159
  212. package/dist/vviinn-widgets/vviinn-server-error.entry.js +0 -16
  213. package/dist/vviinn-widgets/vviinn-slide.entry.js +0 -15
  214. package/dist/vviinn-widgets/vviinn-teaser.entry.js +0 -15
  215. package/dist/vviinn-widgets/vviinn-vpr-widget.entry.js +0 -104
  216. package/dist/vviinn-widgets/vviinn-vps-button.entry.js +0 -31
  217. package/dist/vviinn-widgets/vviinn-vps-widget.entry.js +0 -86
  218. package/dist/vviinn-widgets/vviinn-wrong-format.entry.js +0 -16
  219. package/www/build/Handler-54ea3110.js +0 -1428
  220. package/www/build/cropper-handler.entry.js +0 -23
  221. package/www/build/css-shim-f0027935.js +0 -4
  222. package/www/build/dom-db0073f0.js +0 -73
  223. package/www/build/highlight-box.entry.js +0 -39
  224. package/www/build/image-cropper.entry.js +0 -111
  225. package/www/build/index-69a0f361.js +0 -3010
  226. package/www/build/number-1cb92f15.js +0 -128
  227. package/www/build/option-e6e673e5.js +0 -3379
  228. package/www/build/products.worker-8680c07e.js +0 -12
  229. package/www/build/products.worker-ae9180fc.js +0 -7987
  230. package/www/build/search-filters.entry.js +0 -56
  231. package/www/build/shadow-css-c1fdfa9f.js +0 -389
  232. package/www/build/toFile-e9b91c1b.js +0 -19
  233. package/www/build/vpr-slider-457c407d.js +0 -7276
  234. package/www/build/vpr-slider.entry.js +0 -2
  235. package/www/build/vviinn-detected-object.entry.js +0 -50
  236. package/www/build/vviinn-empty-results.entry.js +0 -16
  237. package/www/build/vviinn-error.entry.js +0 -15
  238. package/www/build/vviinn-example-image.entry.js +0 -35
  239. package/www/build/vviinn-example-images.entry.js +0 -23
  240. package/www/build/vviinn-image-selector.entry.js +0 -5055
  241. package/www/build/vviinn-modal.entry.js +0 -30
  242. package/www/build/vviinn-onboarding.entry.js +0 -15
  243. package/www/build/vviinn-overlay.entry.js +0 -15
  244. package/www/build/vviinn-overlayed-modal.entry.js +0 -18
  245. package/www/build/vviinn-privacy-badge.entry.js +0 -15
  246. package/www/build/vviinn-product-card.entry.js +0 -159
  247. package/www/build/vviinn-server-error.entry.js +0 -16
  248. package/www/build/vviinn-slide.entry.js +0 -15
  249. package/www/build/vviinn-slider.entry.js +0 -2516
  250. package/www/build/vviinn-teaser.entry.js +0 -15
  251. package/www/build/vviinn-vps-button.entry.js +0 -31
  252. package/www/build/vviinn-vps-widget.entry.js +0 -86
  253. package/www/build/vviinn-wrong-format.entry.js +0 -16
@@ -1,3 +1,5 @@
1
+ 'use strict';
2
+
1
3
  /*! *****************************************************************************
2
4
  Copyright (c) Microsoft Corporation.
3
5
 
@@ -50,68 +52,6 @@ function __rest(s, e) {
50
52
  return t;
51
53
  }
52
54
 
53
- function __decorate(decorators, target, key, desc) {
54
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
55
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
56
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
57
- return c > 3 && r && Object.defineProperty(target, key, r), r;
58
- }
59
-
60
- function __param(paramIndex, decorator) {
61
- return function (target, key) { decorator(target, key, paramIndex); }
62
- }
63
-
64
- function __metadata(metadataKey, metadataValue) {
65
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
66
- }
67
-
68
- function __awaiter(thisArg, _arguments, P, generator) {
69
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
70
- return new (P || (P = Promise))(function (resolve, reject) {
71
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
72
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
73
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
74
- step((generator = generator.apply(thisArg, _arguments || [])).next());
75
- });
76
- }
77
-
78
- function __generator(thisArg, body) {
79
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
80
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
81
- function verb(n) { return function (v) { return step([n, v]); }; }
82
- function step(op) {
83
- if (f) throw new TypeError("Generator is already executing.");
84
- while (_) try {
85
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
86
- if (y = 0, t) op = [op[0] & 2, t.value];
87
- switch (op[0]) {
88
- case 0: case 1: t = op; break;
89
- case 4: _.label++; return { value: op[1], done: false };
90
- case 5: _.label++; y = op[1]; op = [0]; continue;
91
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
92
- default:
93
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
94
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
95
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
96
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
97
- if (t[2]) _.ops.pop();
98
- _.trys.pop(); continue;
99
- }
100
- op = body.call(thisArg, _);
101
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
102
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
103
- }
104
- }
105
-
106
- function __createBinding(o, m, k, k2) {
107
- if (k2 === undefined) k2 = k;
108
- o[k2] = m[k];
109
- }
110
-
111
- function __exportStar(m, exports) {
112
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
113
- }
114
-
115
55
  function __values(o) {
116
56
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
117
57
  if (m) return m.call(o);
@@ -145,91 +85,8 @@ function __spread() {
145
85
  for (var ar = [], i = 0; i < arguments.length; i++)
146
86
  ar = ar.concat(__read(arguments[i]));
147
87
  return ar;
148
- }
149
-
150
- function __spreadArrays() {
151
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
152
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
153
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
154
- r[k] = a[j];
155
- return r;
156
- };
157
-
158
- function __await(v) {
159
- return this instanceof __await ? (this.v = v, this) : new __await(v);
160
- }
161
-
162
- function __asyncGenerator(thisArg, _arguments, generator) {
163
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
164
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
165
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
166
- function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
167
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
168
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
169
- function fulfill(value) { resume("next", value); }
170
- function reject(value) { resume("throw", value); }
171
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
172
- }
173
-
174
- function __asyncDelegator(o) {
175
- var i, p;
176
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
177
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
178
- }
179
-
180
- function __asyncValues(o) {
181
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
182
- var m = o[Symbol.asyncIterator], i;
183
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
184
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
185
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
186
- }
187
-
188
- function __makeTemplateObject(cooked, raw) {
189
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
190
- return cooked;
191
- };
192
-
193
- function __importStar(mod) {
194
- if (mod && mod.__esModule) return mod;
195
- var result = {};
196
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
197
- result.default = mod;
198
- return result;
199
- }
200
-
201
- function __importDefault(mod) {
202
- return (mod && mod.__esModule) ? mod : { default: mod };
203
- }
204
-
205
- function __classPrivateFieldGet(receiver, privateMap) {
206
- if (!privateMap.has(receiver)) {
207
- throw new TypeError("attempted to get private field on non-instance");
208
- }
209
- return privateMap.get(receiver);
210
- }
211
-
212
- function __classPrivateFieldSet(receiver, privateMap, value) {
213
- if (!privateMap.has(receiver)) {
214
- throw new TypeError("attempted to set private field on non-instance");
215
- }
216
- privateMap.set(receiver, value);
217
- return value;
218
88
  }
219
89
 
220
- /** Console logging verbosity for the SDK. */
221
- var LogLevel;
222
- (function (LogLevel) {
223
- /** No logs will be generated. */
224
- LogLevel[LogLevel["None"] = 0] = "None";
225
- /** Only SDK internal errors will be logged. */
226
- LogLevel[LogLevel["Error"] = 1] = "Error";
227
- /** Information useful for debugging the SDK will be logged. */
228
- LogLevel[LogLevel["Debug"] = 2] = "Debug";
229
- /** All SDK actions will be logged. */
230
- LogLevel[LogLevel["Verbose"] = 3] = "Verbose";
231
- })(LogLevel || (LogLevel = {}));
232
-
233
90
  /**
234
91
  * Session Status
235
92
  */
@@ -806,44 +663,6 @@ function truncate(str, max) {
806
663
  }
807
664
  return str.length <= max ? str : str.substr(0, max) + "...";
808
665
  }
809
- /**
810
- * This is basically just `trim_line` from
811
- * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67
812
- *
813
- * @param str An object that contains serializable values
814
- * @param max Maximum number of characters in truncated string
815
- * @returns string Encoded
816
- */
817
- function snipLine(line, colno) {
818
- var newLine = line;
819
- var ll = newLine.length;
820
- if (ll <= 150) {
821
- return newLine;
822
- }
823
- if (colno > ll) {
824
- // eslint-disable-next-line no-param-reassign
825
- colno = ll;
826
- }
827
- var start = Math.max(colno - 60, 0);
828
- if (start < 5) {
829
- start = 0;
830
- }
831
- var end = Math.min(start + 140, ll);
832
- if (end > ll - 5) {
833
- end = ll;
834
- }
835
- if (end === ll) {
836
- start = Math.max(end - 140, 0);
837
- }
838
- newLine = newLine.slice(start, end);
839
- if (start > 0) {
840
- newLine = "'{snip} " + newLine;
841
- }
842
- if (end < ll) {
843
- newLine += ' {snip}';
844
- }
845
- return newLine;
846
- }
847
666
  /**
848
667
  * Join values in array
849
668
  * @param input array of values to be joined together
@@ -1054,25 +873,6 @@ function getLocationHref() {
1054
873
  return '';
1055
874
  }
1056
875
  }
1057
- // https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
1058
- var SEMVER_REGEXP = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
1059
- /**
1060
- * Parses input into a SemVer interface
1061
- * @param input string representation of a semver version
1062
- */
1063
- function parseSemver(input) {
1064
- var match = input.match(SEMVER_REGEXP) || [];
1065
- var major = parseInt(match[1], 10);
1066
- var minor = parseInt(match[2], 10);
1067
- var patch = parseInt(match[3], 10);
1068
- return {
1069
- buildmetadata: match[5],
1070
- major: isNaN(major) ? undefined : major,
1071
- minor: isNaN(minor) ? undefined : minor,
1072
- patch: isNaN(patch) ? undefined : patch,
1073
- prerelease: match[4],
1074
- };
1075
- }
1076
876
  var defaultRetryAfter = 60 * 1000; // 60 seconds
1077
877
  /**
1078
878
  * Extracts Retry-After value from the request header or returns default value
@@ -1093,36 +893,6 @@ function parseRetryAfterHeader(now, header) {
1093
893
  }
1094
894
  return defaultRetryAfter;
1095
895
  }
1096
- /**
1097
- * This function adds context (pre/post/line) lines to the provided frame
1098
- *
1099
- * @param lines string[] containing all lines
1100
- * @param frame StackFrame that will be mutated
1101
- * @param linesOfContext number of context lines we want to add pre/post
1102
- */
1103
- function addContextToFrame(lines, frame, linesOfContext) {
1104
- if (linesOfContext === void 0) { linesOfContext = 5; }
1105
- var lineno = frame.lineno || 0;
1106
- var maxLines = lines.length;
1107
- var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);
1108
- frame.pre_context = lines
1109
- .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)
1110
- .map(function (line) { return snipLine(line, 0); });
1111
- frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);
1112
- frame.post_context = lines
1113
- .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)
1114
- .map(function (line) { return snipLine(line, 0); });
1115
- }
1116
- /**
1117
- * Strip the query string and fragment off of a given URL or path (if present)
1118
- *
1119
- * @param urlPath Full URL or path, including possible query string and/or fragment
1120
- * @returns URL or path without query string or fragment
1121
- */
1122
- function stripUrlQueryAndFragment(urlPath) {
1123
- // eslint-disable-next-line no-useless-escape
1124
- return urlPath.split(/[\?#]/, 1)[0];
1125
- }
1126
896
 
1127
897
  /* eslint-disable @typescript-eslint/no-explicit-any */
1128
898
  // TODO: Implement different loggers for different environments
@@ -1590,54 +1360,6 @@ function dropUndefinedKeys(val) {
1590
1360
  return val;
1591
1361
  }
1592
1362
 
1593
- /**
1594
- * Tells whether current environment supports ErrorEvent objects
1595
- * {@link supportsErrorEvent}.
1596
- *
1597
- * @returns Answer to the given question.
1598
- */
1599
- function supportsErrorEvent() {
1600
- try {
1601
- new ErrorEvent('');
1602
- return true;
1603
- }
1604
- catch (e) {
1605
- return false;
1606
- }
1607
- }
1608
- /**
1609
- * Tells whether current environment supports DOMError objects
1610
- * {@link supportsDOMError}.
1611
- *
1612
- * @returns Answer to the given question.
1613
- */
1614
- function supportsDOMError() {
1615
- try {
1616
- // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':
1617
- // 1 argument required, but only 0 present.
1618
- // @ts-ignore It really needs 1 argument, not 0.
1619
- new DOMError('');
1620
- return true;
1621
- }
1622
- catch (e) {
1623
- return false;
1624
- }
1625
- }
1626
- /**
1627
- * Tells whether current environment supports DOMException objects
1628
- * {@link supportsDOMException}.
1629
- *
1630
- * @returns Answer to the given question.
1631
- */
1632
- function supportsDOMException() {
1633
- try {
1634
- new DOMException('');
1635
- return true;
1636
- }
1637
- catch (e) {
1638
- return false;
1639
- }
1640
- }
1641
1363
  /**
1642
1364
  * Tells whether current environment supports Fetch API
1643
1365
  * {@link supportsFetch}.
@@ -1703,15 +1425,6 @@ function supportsNativeFetch() {
1703
1425
  }
1704
1426
  return result;
1705
1427
  }
1706
- /**
1707
- * Tells whether current environment supports ReportingObserver API
1708
- * {@link supportsReportingObserver}.
1709
- *
1710
- * @returns Answer to the given question.
1711
- */
1712
- function supportsReportingObserver() {
1713
- return 'ReportingObserver' in getGlobalObject();
1714
- }
1715
1428
  /**
1716
1429
  * Tells whether current environment supports Referrer Policy API
1717
1430
  * {@link supportsReferrerPolicy}.
@@ -2291,168 +2004,6 @@ function instrumentUnhandledRejection() {
2291
2004
  };
2292
2005
  }
2293
2006
 
2294
- // Slightly modified (no IE8 support, ES6) and transcribed to TypeScript
2295
- // https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js
2296
- /** JSDoc */
2297
- function normalizeArray(parts, allowAboveRoot) {
2298
- // if the path tries to go above the root, `up` ends up > 0
2299
- var up = 0;
2300
- for (var i = parts.length - 1; i >= 0; i--) {
2301
- var last = parts[i];
2302
- if (last === '.') {
2303
- parts.splice(i, 1);
2304
- }
2305
- else if (last === '..') {
2306
- parts.splice(i, 1);
2307
- // eslint-disable-next-line no-plusplus
2308
- up++;
2309
- }
2310
- else if (up) {
2311
- parts.splice(i, 1);
2312
- // eslint-disable-next-line no-plusplus
2313
- up--;
2314
- }
2315
- }
2316
- // if the path is allowed to go above the root, restore leading ..s
2317
- if (allowAboveRoot) {
2318
- // eslint-disable-next-line no-plusplus
2319
- for (; up--; up) {
2320
- parts.unshift('..');
2321
- }
2322
- }
2323
- return parts;
2324
- }
2325
- // Split a filename into [root, dir, basename, ext], unix version
2326
- // 'root' is just a slash, or nothing.
2327
- var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;
2328
- /** JSDoc */
2329
- function splitPath(filename) {
2330
- var parts = splitPathRe.exec(filename);
2331
- return parts ? parts.slice(1) : [];
2332
- }
2333
- // path.resolve([from ...], to)
2334
- // posix version
2335
- /** JSDoc */
2336
- function resolve() {
2337
- var args = [];
2338
- for (var _i = 0; _i < arguments.length; _i++) {
2339
- args[_i] = arguments[_i];
2340
- }
2341
- var resolvedPath = '';
2342
- var resolvedAbsolute = false;
2343
- for (var i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {
2344
- var path = i >= 0 ? args[i] : '/';
2345
- // Skip empty entries
2346
- if (!path) {
2347
- continue;
2348
- }
2349
- resolvedPath = path + "/" + resolvedPath;
2350
- resolvedAbsolute = path.charAt(0) === '/';
2351
- }
2352
- // At this point the path should be resolved to a full absolute path, but
2353
- // handle relative paths to be safe (might happen when process.cwd() fails)
2354
- // Normalize the path
2355
- resolvedPath = normalizeArray(resolvedPath.split('/').filter(function (p) { return !!p; }), !resolvedAbsolute).join('/');
2356
- return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';
2357
- }
2358
- /** JSDoc */
2359
- function trim(arr) {
2360
- var start = 0;
2361
- for (; start < arr.length; start++) {
2362
- if (arr[start] !== '') {
2363
- break;
2364
- }
2365
- }
2366
- var end = arr.length - 1;
2367
- for (; end >= 0; end--) {
2368
- if (arr[end] !== '') {
2369
- break;
2370
- }
2371
- }
2372
- if (start > end) {
2373
- return [];
2374
- }
2375
- return arr.slice(start, end - start + 1);
2376
- }
2377
- // path.relative(from, to)
2378
- // posix version
2379
- /** JSDoc */
2380
- function relative(from, to) {
2381
- /* eslint-disable no-param-reassign */
2382
- from = resolve(from).substr(1);
2383
- to = resolve(to).substr(1);
2384
- /* eslint-enable no-param-reassign */
2385
- var fromParts = trim(from.split('/'));
2386
- var toParts = trim(to.split('/'));
2387
- var length = Math.min(fromParts.length, toParts.length);
2388
- var samePartsLength = length;
2389
- for (var i = 0; i < length; i++) {
2390
- if (fromParts[i] !== toParts[i]) {
2391
- samePartsLength = i;
2392
- break;
2393
- }
2394
- }
2395
- var outputParts = [];
2396
- for (var i = samePartsLength; i < fromParts.length; i++) {
2397
- outputParts.push('..');
2398
- }
2399
- outputParts = outputParts.concat(toParts.slice(samePartsLength));
2400
- return outputParts.join('/');
2401
- }
2402
- // path.normalize(path)
2403
- // posix version
2404
- /** JSDoc */
2405
- function normalizePath(path) {
2406
- var isPathAbsolute = isAbsolute(path);
2407
- var trailingSlash = path.substr(-1) === '/';
2408
- // Normalize the path
2409
- var normalizedPath = normalizeArray(path.split('/').filter(function (p) { return !!p; }), !isPathAbsolute).join('/');
2410
- if (!normalizedPath && !isPathAbsolute) {
2411
- normalizedPath = '.';
2412
- }
2413
- if (normalizedPath && trailingSlash) {
2414
- normalizedPath += '/';
2415
- }
2416
- return (isPathAbsolute ? '/' : '') + normalizedPath;
2417
- }
2418
- // posix version
2419
- /** JSDoc */
2420
- function isAbsolute(path) {
2421
- return path.charAt(0) === '/';
2422
- }
2423
- // posix version
2424
- /** JSDoc */
2425
- function join() {
2426
- var args = [];
2427
- for (var _i = 0; _i < arguments.length; _i++) {
2428
- args[_i] = arguments[_i];
2429
- }
2430
- return normalizePath(args.join('/'));
2431
- }
2432
- /** JSDoc */
2433
- function dirname(path) {
2434
- var result = splitPath(path);
2435
- var root = result[0];
2436
- var dir = result[1];
2437
- if (!root && !dir) {
2438
- // No dirname whatsoever
2439
- return '.';
2440
- }
2441
- if (dir) {
2442
- // It has a dirname, strip trailing slash
2443
- dir = dir.substr(0, dir.length - 1);
2444
- }
2445
- return root + dir;
2446
- }
2447
- /** JSDoc */
2448
- function basename(path, ext) {
2449
- var f = splitPath(path)[2];
2450
- if (ext && f.substr(ext.length * -1) === ext) {
2451
- f = f.substr(0, f.length - ext.length);
2452
- }
2453
- return f;
2454
- }
2455
-
2456
2007
  /* eslint-disable @typescript-eslint/explicit-function-return-type */
2457
2008
  /** SyncPromise internal states */
2458
2009
  var States;
@@ -2829,14 +2380,6 @@ var dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSo
2829
2380
  var timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource);
2830
2381
  // Re-exported with an old name for backwards-compatibility.
2831
2382
  var timestampWithMs = timestampInSeconds;
2832
- /**
2833
- * A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.
2834
- */
2835
- var usingPerformanceAPI = platformPerformance !== undefined;
2836
- /**
2837
- * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.
2838
- */
2839
- var _browserPerformanceTimeOriginMode;
2840
2383
  /**
2841
2384
  * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the
2842
2385
  * performance API is available.
@@ -2847,7 +2390,6 @@ var browserPerformanceTimeOrigin = (function () {
2847
2390
  // data as reliable if they are within a reasonable threshold of the current time.
2848
2391
  var performance = getGlobalObject().performance;
2849
2392
  if (!performance || !performance.now) {
2850
- _browserPerformanceTimeOriginMode = 'none';
2851
2393
  return undefined;
2852
2394
  }
2853
2395
  var threshold = 3600 * 1000;
@@ -2872,16 +2414,12 @@ var browserPerformanceTimeOrigin = (function () {
2872
2414
  if (timeOriginIsReliable || navigationStartIsReliable) {
2873
2415
  // Use the more reliable time origin
2874
2416
  if (timeOriginDelta <= navigationStartDelta) {
2875
- _browserPerformanceTimeOriginMode = 'timeOrigin';
2876
2417
  return performance.timeOrigin;
2877
2418
  }
2878
2419
  else {
2879
- _browserPerformanceTimeOriginMode = 'navigationStart';
2880
2420
  return navigationStart;
2881
2421
  }
2882
2422
  }
2883
- // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.
2884
- _browserPerformanceTimeOriginMode = 'dateNow';
2885
2423
  return dateNow;
2886
2424
  })();
2887
2425
 
@@ -3877,17 +3415,6 @@ function getCurrentHub() {
3877
3415
  // Return hub that lives on a global object
3878
3416
  return getHubFromCarrier(registry);
3879
3417
  }
3880
- /**
3881
- * Returns the active domain, if one exists
3882
- * @deprecated No longer used; remove in v7
3883
- * @returns The domain, or undefined if there is no active domain
3884
- */
3885
- // eslint-disable-next-line deprecation/deprecation
3886
- function getActiveDomain() {
3887
- logger.warn('Function `getActiveDomain` is deprecated and will be removed in a future version.');
3888
- var sentry = getMainCarrier().__SENTRY__;
3889
- return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;
3890
- }
3891
3418
  /**
3892
3419
  * Try to read the hub from an active domain, and fallback to the registry if one doesn't exist
3893
3420
  * @returns discovered hub
@@ -3947,106 +3474,6 @@ function setHubOnCarrier(carrier, hub) {
3947
3474
  return true;
3948
3475
  }
3949
3476
 
3950
- /**
3951
- * @inheritdoc
3952
- */
3953
- var SessionFlusher = /** @class */ (function () {
3954
- function SessionFlusher(transport, attrs) {
3955
- var _this = this;
3956
- this.flushTimeout = 60;
3957
- this._pendingAggregates = {};
3958
- this._isEnabled = true;
3959
- this._transport = transport;
3960
- // Call to setInterval, so that flush is called every 60 seconds
3961
- this._intervalId = setInterval(function () { return _this.flush(); }, this.flushTimeout * 1000);
3962
- this._sessionAttrs = attrs;
3963
- }
3964
- /** Sends session aggregates to Transport */
3965
- SessionFlusher.prototype.sendSessionAggregates = function (sessionAggregates) {
3966
- if (!this._transport.sendSession) {
3967
- logger.warn("Dropping session because custom transport doesn't implement sendSession");
3968
- return;
3969
- }
3970
- void this._transport.sendSession(sessionAggregates).then(null, function (reason) {
3971
- logger.error("Error while sending session: " + reason);
3972
- });
3973
- };
3974
- /** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSessions` */
3975
- SessionFlusher.prototype.flush = function () {
3976
- var sessionAggregates = this.getSessionAggregates();
3977
- if (sessionAggregates.aggregates.length === 0) {
3978
- return;
3979
- }
3980
- this._pendingAggregates = {};
3981
- this.sendSessionAggregates(sessionAggregates);
3982
- };
3983
- /** Massages the entries in `pendingAggregates` and returns aggregated sessions */
3984
- SessionFlusher.prototype.getSessionAggregates = function () {
3985
- var _this = this;
3986
- var aggregates = Object.keys(this._pendingAggregates).map(function (key) {
3987
- return _this._pendingAggregates[parseInt(key)];
3988
- });
3989
- var sessionAggregates = {
3990
- attrs: this._sessionAttrs,
3991
- aggregates: aggregates,
3992
- };
3993
- return dropUndefinedKeys(sessionAggregates);
3994
- };
3995
- /** JSDoc */
3996
- SessionFlusher.prototype.close = function () {
3997
- clearInterval(this._intervalId);
3998
- this._isEnabled = false;
3999
- this.flush();
4000
- };
4001
- /**
4002
- * Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then
4003
- * fetches the session status of the request from `Scope.getRequestSession().status` on the scope and passes them to
4004
- * `_incrementSessionStatusCount` along with the start date
4005
- */
4006
- SessionFlusher.prototype.incrementSessionStatusCount = function () {
4007
- var _a, _b;
4008
- if (!this._isEnabled) {
4009
- return;
4010
- }
4011
- var scope = getCurrentHub().getScope();
4012
- var requestSession = (_a = scope) === null || _a === void 0 ? void 0 : _a.getRequestSession();
4013
- if (requestSession && requestSession.status) {
4014
- this._incrementSessionStatusCount(requestSession.status, new Date());
4015
- // This is not entirely necessarily but is added as a safe guard to indicate the bounds of a request and so in
4016
- // case captureRequestSession is called more than once to prevent double count
4017
- (_b = scope) === null || _b === void 0 ? void 0 : _b.setRequestSession(undefined);
4018
- /* eslint-enable @typescript-eslint/no-unsafe-member-access */
4019
- }
4020
- };
4021
- /**
4022
- * Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of
4023
- * the session received
4024
- */
4025
- SessionFlusher.prototype._incrementSessionStatusCount = function (status, date) {
4026
- // Truncate minutes and seconds on Session Started attribute to have one minute bucket keys
4027
- var sessionStartedTrunc = new Date(date).setSeconds(0, 0);
4028
- this._pendingAggregates[sessionStartedTrunc] = this._pendingAggregates[sessionStartedTrunc] || {};
4029
- // corresponds to aggregated sessions in one specific minute bucket
4030
- // for example, {"started":"2021-03-16T08:00:00.000Z","exited":4, "errored": 1}
4031
- var aggregationCounts = this._pendingAggregates[sessionStartedTrunc];
4032
- if (!aggregationCounts.started) {
4033
- aggregationCounts.started = new Date(sessionStartedTrunc).toISOString();
4034
- }
4035
- switch (status) {
4036
- case RequestSessionStatus.Errored:
4037
- aggregationCounts.errored = (aggregationCounts.errored || 0) + 1;
4038
- return aggregationCounts.errored;
4039
- case RequestSessionStatus.Ok:
4040
- aggregationCounts.exited = (aggregationCounts.exited || 0) + 1;
4041
- return aggregationCounts.exited;
4042
- case RequestSessionStatus.Crashed:
4043
- aggregationCounts.crashed = (aggregationCounts.crashed || 0) + 1;
4044
- return aggregationCounts.crashed;
4045
- }
4046
- };
4047
- return SessionFlusher;
4048
- }());
4049
-
4050
3477
  /**
4051
3478
  * This calls a function on the current hub.
4052
3479
  * @param method function to call on hub.
@@ -4086,104 +3513,6 @@ function captureException(exception, captureContext) {
4086
3513
  syntheticException: syntheticException,
4087
3514
  });
4088
3515
  }
4089
- /**
4090
- * Captures a message event and sends it to Sentry.
4091
- *
4092
- * @param message The message to send to Sentry.
4093
- * @param level Define the level of the message.
4094
- * @returns The generated eventId.
4095
- */
4096
- function captureMessage(message, captureContext) {
4097
- var syntheticException;
4098
- try {
4099
- throw new Error(message);
4100
- }
4101
- catch (exception) {
4102
- syntheticException = exception;
4103
- }
4104
- // This is necessary to provide explicit scopes upgrade, without changing the original
4105
- // arity of the `captureMessage(message, level)` method.
4106
- var level = typeof captureContext === 'string' ? captureContext : undefined;
4107
- var context = typeof captureContext !== 'string' ? { captureContext: captureContext } : undefined;
4108
- return callOnHub('captureMessage', message, level, __assign({ originalException: message, syntheticException: syntheticException }, context));
4109
- }
4110
- /**
4111
- * Captures a manually created event and sends it to Sentry.
4112
- *
4113
- * @param event The event to send to Sentry.
4114
- * @returns The generated eventId.
4115
- */
4116
- function captureEvent(event) {
4117
- return callOnHub('captureEvent', event);
4118
- }
4119
- /**
4120
- * Callback to set context information onto the scope.
4121
- * @param callback Callback function that receives Scope.
4122
- */
4123
- function configureScope(callback) {
4124
- callOnHub('configureScope', callback);
4125
- }
4126
- /**
4127
- * Records a new breadcrumb which will be attached to future events.
4128
- *
4129
- * Breadcrumbs will be added to subsequent events to provide more context on
4130
- * user's actions prior to an error or crash.
4131
- *
4132
- * @param breadcrumb The breadcrumb to record.
4133
- */
4134
- function addBreadcrumb(breadcrumb) {
4135
- callOnHub('addBreadcrumb', breadcrumb);
4136
- }
4137
- /**
4138
- * Sets context data with the given name.
4139
- * @param name of the context
4140
- * @param context Any kind of data. This data will be normalized.
4141
- */
4142
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4143
- function setContext(name, context) {
4144
- callOnHub('setContext', name, context);
4145
- }
4146
- /**
4147
- * Set an object that will be merged sent as extra data with the event.
4148
- * @param extras Extras object to merge into current context.
4149
- */
4150
- function setExtras(extras) {
4151
- callOnHub('setExtras', extras);
4152
- }
4153
- /**
4154
- * Set an object that will be merged sent as tags data with the event.
4155
- * @param tags Tags context object to merge into current context.
4156
- */
4157
- function setTags(tags) {
4158
- callOnHub('setTags', tags);
4159
- }
4160
- /**
4161
- * Set key:value that will be sent as extra data with the event.
4162
- * @param key String of extra
4163
- * @param extra Any kind of data. This data will be normalized.
4164
- */
4165
- function setExtra(key, extra) {
4166
- callOnHub('setExtra', key, extra);
4167
- }
4168
- /**
4169
- * Set key:value that will be sent as tags data with the event.
4170
- *
4171
- * Can also be used to unset a tag, by passing `undefined`.
4172
- *
4173
- * @param key String key of tag
4174
- * @param value Value of tag
4175
- */
4176
- function setTag(key, value) {
4177
- callOnHub('setTag', key, value);
4178
- }
4179
- /**
4180
- * Updates user context information for future events.
4181
- *
4182
- * @param user User context object to be set in the current context. Pass `null` to unset the user.
4183
- */
4184
- function setUser(user) {
4185
- callOnHub('setUser', user);
4186
- }
4187
3516
  /**
4188
3517
  * Creates a new scope with and executes the given operation within.
4189
3518
  * The scope is automatically removed once the operation
@@ -4200,44 +3529,6 @@ function setUser(user) {
4200
3529
  function withScope(callback) {
4201
3530
  callOnHub('withScope', callback);
4202
3531
  }
4203
- /**
4204
- * Calls a function on the latest client. Use this with caution, it's meant as
4205
- * in "internal" helper so we don't need to expose every possible function in
4206
- * the shim. It is not guaranteed that the client actually implements the
4207
- * function.
4208
- *
4209
- * @param method The method to call on the client/client.
4210
- * @param args Arguments to pass to the client/fontend.
4211
- * @hidden
4212
- */
4213
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4214
- function _callOnClient(method) {
4215
- var args = [];
4216
- for (var _i = 1; _i < arguments.length; _i++) {
4217
- args[_i - 1] = arguments[_i];
4218
- }
4219
- callOnHub.apply(void 0, __spread(['_invokeClient', method], args));
4220
- }
4221
- /**
4222
- * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.
4223
- *
4224
- * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a
4225
- * new child span within the transaction or any span, call the respective `.startChild()` method.
4226
- *
4227
- * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.
4228
- *
4229
- * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its
4230
- * finished child spans will be sent to Sentry.
4231
- *
4232
- * @param context Properties of the new `Transaction`.
4233
- * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent
4234
- * default values). See {@link Options.tracesSampler}.
4235
- *
4236
- * @returns The transaction which was just started
4237
- */
4238
- function startTransaction(context, customSamplingContext) {
4239
- return callOnHub('startTransaction', __assign({}, context), customSamplingContext);
4240
- }
4241
3532
 
4242
3533
  var SENTRY_API_VERSION = '7';
4243
3534
  /**
@@ -5316,12 +4607,6 @@ var InboundFilters = /** @class */ (function () {
5316
4607
  return InboundFilters;
5317
4608
  }());
5318
4609
 
5319
- const CoreIntegrations = /*#__PURE__*/Object.freeze({
5320
- __proto__: null,
5321
- FunctionToString: FunctionToString,
5322
- InboundFilters: InboundFilters
5323
- });
5324
-
5325
4610
  /**
5326
4611
  * This was originally forked from https://github.com/occ/TraceKit, but has since been
5327
4612
  * largely modified and is now maintained as part of Sentry JS SDK.
@@ -6284,7 +5569,7 @@ function ignoreNextOnError() {
6284
5569
  * @returns The wrapped function.
6285
5570
  * @hidden
6286
5571
  */
6287
- function wrap$2(fn, options, before) {
5572
+ function wrap$1(fn, options, before) {
6288
5573
  if (options === void 0) { options = {}; }
6289
5574
  if (typeof fn !== 'function') {
6290
5575
  return fn;
@@ -6314,7 +5599,7 @@ function wrap$2(fn, options, before) {
6314
5599
  before.apply(this, arguments);
6315
5600
  }
6316
5601
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
6317
- var wrappedArguments = args.map(function (arg) { return wrap$2(arg, options); });
5602
+ var wrappedArguments = args.map(function (arg) { return wrap$1(arg, options); });
6318
5603
  if (fn.handleEvent) {
6319
5604
  // Attempt to invoke user-land function
6320
5605
  // NOTE: If you are a Sentry user, and you are seeing this stack frame, it
@@ -6688,7 +5973,7 @@ var TryCatch = /** @class */ (function () {
6688
5973
  args[_i] = arguments[_i];
6689
5974
  }
6690
5975
  var originalCallback = args[0];
6691
- args[0] = wrap$2(originalCallback, {
5976
+ args[0] = wrap$1(originalCallback, {
6692
5977
  mechanism: {
6693
5978
  data: { function: getFunctionName(original) },
6694
5979
  handled: true,
@@ -6704,7 +5989,7 @@ var TryCatch = /** @class */ (function () {
6704
5989
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6705
5990
  return function (callback) {
6706
5991
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
6707
- return original.call(this, wrap$2(callback, {
5992
+ return original.call(this, wrap$1(callback, {
6708
5993
  mechanism: {
6709
5994
  data: {
6710
5995
  function: 'requestAnimationFrame',
@@ -6730,7 +6015,7 @@ var TryCatch = /** @class */ (function () {
6730
6015
  return function (eventName, fn, options) {
6731
6016
  try {
6732
6017
  if (typeof fn.handleEvent === 'function') {
6733
- fn.handleEvent = wrap$2(fn.handleEvent.bind(fn), {
6018
+ fn.handleEvent = wrap$1(fn.handleEvent.bind(fn), {
6734
6019
  mechanism: {
6735
6020
  data: {
6736
6021
  function: 'handleEvent',
@@ -6748,7 +6033,7 @@ var TryCatch = /** @class */ (function () {
6748
6033
  }
6749
6034
  return original.call(this, eventName,
6750
6035
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6751
- wrap$2(fn, {
6036
+ wrap$1(fn, {
6752
6037
  mechanism: {
6753
6038
  data: {
6754
6039
  function: 'addEventListener',
@@ -6825,7 +6110,7 @@ var TryCatch = /** @class */ (function () {
6825
6110
  wrapOptions.mechanism.data.handler = getFunctionName(original.__sentry_original__);
6826
6111
  }
6827
6112
  // Otherwise wrap directly
6828
- return wrap$2(original, wrapOptions);
6113
+ return wrap$1(original, wrapOptions);
6829
6114
  });
6830
6115
  }
6831
6116
  });
@@ -7362,16 +6647,6 @@ var Dedupe = /** @class */ (function () {
7362
6647
  return Dedupe;
7363
6648
  }());
7364
6649
 
7365
- const BrowserIntegrations = /*#__PURE__*/Object.freeze({
7366
- __proto__: null,
7367
- GlobalHandlers: GlobalHandlers,
7368
- TryCatch: TryCatch,
7369
- Breadcrumbs: Breadcrumbs,
7370
- LinkedErrors: LinkedErrors,
7371
- UserAgent: UserAgent,
7372
- Dedupe: Dedupe
7373
- });
7374
-
7375
6650
  /**
7376
6651
  * The Sentry Browser SDK Client.
7377
6652
  *
@@ -7530,91 +6805,6 @@ function init(options) {
7530
6805
  startSessionTracking();
7531
6806
  }
7532
6807
  }
7533
- /**
7534
- * Present the user with a report dialog.
7535
- *
7536
- * @param options Everything is optional, we try to fetch all info need from the global scope.
7537
- */
7538
- function showReportDialog(options) {
7539
- if (options === void 0) { options = {}; }
7540
- var hub = getCurrentHub();
7541
- var scope = hub.getScope();
7542
- if (scope) {
7543
- options.user = __assign(__assign({}, scope.getUser()), options.user);
7544
- }
7545
- if (!options.eventId) {
7546
- options.eventId = hub.lastEventId();
7547
- }
7548
- var client = hub.getClient();
7549
- if (client) {
7550
- client.showReportDialog(options);
7551
- }
7552
- }
7553
- /**
7554
- * This is the getter for lastEventId.
7555
- *
7556
- * @returns The last event id of a captured event.
7557
- */
7558
- function lastEventId() {
7559
- return getCurrentHub().lastEventId();
7560
- }
7561
- /**
7562
- * This function is here to be API compatible with the loader.
7563
- * @hidden
7564
- */
7565
- function forceLoad() {
7566
- // Noop
7567
- }
7568
- /**
7569
- * This function is here to be API compatible with the loader.
7570
- * @hidden
7571
- */
7572
- function onLoad(callback) {
7573
- callback();
7574
- }
7575
- /**
7576
- * Call `flush()` on the current client, if there is one. See {@link Client.flush}.
7577
- *
7578
- * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause
7579
- * the client to wait until all events are sent before resolving the promise.
7580
- * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
7581
- * doesn't (or if there's no client defined).
7582
- */
7583
- function flush(timeout) {
7584
- var client = getCurrentHub().getClient();
7585
- if (client) {
7586
- return client.flush(timeout);
7587
- }
7588
- logger.warn('Cannot flush events. No client defined.');
7589
- return SyncPromise.resolve(false);
7590
- }
7591
- /**
7592
- * Call `close()` on the current client, if there is one. See {@link Client.close}.
7593
- *
7594
- * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this
7595
- * parameter will cause the client to wait until all events are sent before disabling itself.
7596
- * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
7597
- * doesn't (or if there's no client defined).
7598
- */
7599
- function close(timeout) {
7600
- var client = getCurrentHub().getClient();
7601
- if (client) {
7602
- return client.close(timeout);
7603
- }
7604
- logger.warn('Cannot flush events and disable SDK. No client defined.');
7605
- return SyncPromise.resolve(false);
7606
- }
7607
- /**
7608
- * Wrap code within a try/catch block so the SDK is able to capture errors.
7609
- *
7610
- * @param fn A function to wrap.
7611
- *
7612
- * @returns The result of wrapped function call.
7613
- */
7614
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
7615
- function wrap$1(fn) {
7616
- return wrap$2(fn)();
7617
- }
7618
6808
  /**
7619
6809
  * Enable automatic Session Tracking for the initial page load.
7620
6810
  */
@@ -7656,17 +6846,6 @@ function startSessionTracking() {
7656
6846
  });
7657
6847
  }
7658
6848
 
7659
- // TODO: Remove in the next major release and rely only on @sentry/core SDK_VERSION and SdkInfo metadata
7660
- var SDK_NAME = 'sentry.javascript.browser';
7661
-
7662
- var windowIntegrations = {};
7663
- // This block is needed to add compatibility with the integrations packages when used with a CDN
7664
- var _window = getGlobalObject();
7665
- if (_window.Sentry && _window.Sentry.Integrations) {
7666
- windowIntegrations = _window.Sentry.Integrations;
7667
- }
7668
- var INTEGRATIONS = __assign(__assign(__assign({}, windowIntegrations), CoreIntegrations), BrowserIntegrations);
7669
-
7670
6849
  /** The status of an Span. */
7671
6850
  // eslint-disable-next-line import/export
7672
6851
  var SpanStatus;
@@ -9162,7 +8341,6 @@ var MetricsInstrumentation = /** @class */ (function () {
9162
8341
  }
9163
8342
  break;
9164
8343
  }
9165
- default:
9166
8344
  // Ignore other entry types.
9167
8345
  }
9168
8346
  });
@@ -10256,4 +9434,4 @@ function appGlobalScript () {
10256
9434
 
10257
9435
  const globalScripts = appGlobalScript;
10258
9436
 
10259
- export { globalScripts as g };
9437
+ exports.globalScripts = globalScripts;