vviinn-widgets 2.6.0 → 2.7.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.
- package/dist/{vviinn-widgets/app-globals-26a61baa.js → cjs/app-globals-047a582c.js} +15 -925
- package/dist/cjs/cropper-handler_27.cjs.entry.js +1135 -0
- package/dist/{vviinn-widgets/customized-slots-fb9b3e5f.js → cjs/customized-slots-cb722e68.js} +6 -3
- package/dist/cjs/index-bd771524.js +1354 -0
- package/{www/build/imageSearch.store-15bda6de.js → dist/cjs/index-d07466b9.js} +11618 -8259
- package/dist/cjs/index-fcafbfe5.js +39 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +23 -0
- package/dist/cjs/vviinn-carousel_2.cjs.entry.js +1001 -0
- package/{www/build/vviinn-recommendations-sidebar.entry.js → dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js} +12 -8
- package/dist/{vviinn-widgets/vviinn-vpr-button.entry.js → cjs/vviinn-vpr-button.cjs.entry.js} +9 -5
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +43 -0
- package/dist/cjs/vviinn-widgets.cjs.js +21 -0
- package/dist/collection/Image/error.js +14 -0
- package/dist/collection/Image/form.js +5 -0
- package/dist/collection/Image/fromFile.js +18 -0
- package/dist/collection/Image/imageToB64.js +9 -0
- package/dist/collection/Image/index.js +0 -0
- package/dist/collection/Image/renderPromise.js +6 -0
- package/dist/collection/Image/resizeImage.js +28 -0
- package/dist/collection/Image/sizing.js +39 -0
- package/dist/collection/Image/toFile.js +17 -0
- package/dist/collection/analytics/GAnalytics.js +32 -0
- package/dist/collection/analytics/GeneralAnalytics.js +9 -0
- package/dist/collection/analytics/GtagAnalytics.js +35 -0
- package/dist/collection/analytics/ProductAnalytics.js +1 -0
- package/dist/collection/campaign/Campaign.js +8 -0
- package/dist/collection/campaign/CampaignService.js +5 -0
- package/dist/collection/campaign/VCSCampaign.js +1 -0
- package/dist/collection/campaign/VCSCampaignResponse.js +1 -0
- package/dist/collection/campaign/VCSCampaignService.js +7 -0
- package/dist/collection/campaign/VPRCampaignResponse.js +1 -0
- package/dist/collection/campaign/VPRCampaignService.js +7 -0
- package/dist/collection/collection-manifest.json +43 -0
- package/dist/collection/components/customized-slots.js +47 -0
- package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.css +71 -0
- package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.js +25 -0
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.css +49 -0
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +64 -0
- package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.css +33 -0
- package/{www/build/image-cropper.entry.js → dist/collection/components/image-search/image-view/image-cropper/image-cropper.js} +70 -33
- package/dist/collection/components/image-search/search-filters/search-filters.css +120 -0
- package/dist/collection/components/image-search/search-filters/search-filters.js +125 -0
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +142 -0
- package/{www/build/vviinn-carousel.entry.js → dist/collection/components/vviinn-carousel/vviinn-carousel.js} +113 -18
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.css +7 -0
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +36 -0
- package/dist/collection/components/vviinn-error/vviinn-error.css +38 -0
- package/dist/collection/components/vviinn-error/vviinn-error.js +18 -0
- package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.css +3 -0
- package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.js +34 -0
- package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.css +3 -0
- package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js +34 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.css +34 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +129 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.css +19 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +80 -0
- package/dist/{vviinn-widgets/index-533f9255.js → collection/components/vviinn-icons/index.js} +11 -14
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.css +25 -0
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +64 -0
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +47 -0
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +100 -0
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +31 -0
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +61 -0
- package/dist/collection/components/vviinn-modal/vviinn-modal.css +105 -0
- package/dist/collection/components/vviinn-modal/vviinn-modal.js +98 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/onboarding-card.css +41 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.js +26 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.js +26 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.js +26 -0
- package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.css +58 -0
- package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.js +28 -0
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.css +33 -0
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +15 -0
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.css +29 -0
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +71 -0
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.css +37 -0
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +20 -0
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +19 -0
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +27 -0
- package/dist/collection/components/vviinn-product-card/render-helpers.js +32 -0
- package/dist/collection/components/vviinn-product-card/stories/args.js +73 -0
- package/dist/collection/components/vviinn-product-card/stories/decorators.js +51 -0
- package/dist/collection/components/vviinn-product-card/stories/vviinn-product-card.stories.js +105 -0
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +95 -0
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +462 -0
- package/dist/collection/components/vviinn-slider/arrow.js +11 -0
- package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.css +4 -0
- package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +15 -0
- package/dist/collection/components/vviinn-slider/vviinn-slider.css +109 -0
- package/dist/collection/components/vviinn-slider/vviinn-slider.js +181 -0
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.css +14 -0
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +29 -0
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +238 -0
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +220 -0
- package/dist/collection/components/vviinn-vpr-button/stories/args.js +213 -0
- package/dist/collection/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.js +91 -0
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.css +35 -0
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +179 -0
- package/dist/collection/components/vviinn-vpr-widget/stories/args.js +197 -0
- package/dist/collection/components/vviinn-vpr-widget/stories/decorators.js +29 -0
- package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +211 -0
- package/dist/collection/components/vviinn-vpr-widget/token-helpers.js +11 -0
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +510 -0
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +79 -0
- package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +35 -0
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +3 -0
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +195 -0
- package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +37 -0
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +350 -0
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +375 -0
- package/dist/collection/cropper/Cropper.js +1 -0
- package/dist/collection/cropper/Handler.js +61 -0
- package/dist/collection/dom/index.js +3 -0
- package/dist/collection/error.js +14 -0
- package/dist/collection/file/index.js +4 -0
- package/dist/collection/geometry/Clip.js +14 -0
- package/dist/collection/geometry/Point.js +32 -0
- package/dist/collection/geometry/Rectangle.js +95 -0
- package/dist/collection/geometry/RectangleAlt.js +1 -0
- package/dist/collection/geometry/Sized.js +8 -0
- package/dist/collection/global.js +19 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/interfaces/generated.js +5 -0
- package/dist/collection/interfaces/recommendation.js +1 -0
- package/dist/collection/network/apiClient.js +9 -0
- package/dist/collection/network/ion/File.js +14 -0
- package/dist/collection/network/ion/Form.js +64 -0
- package/dist/collection/network/ion/Link.js +8 -0
- package/dist/collection/network/ion/ValueObject.js +23 -0
- package/dist/collection/network/request.js +19 -0
- package/dist/collection/network/utils.js +37 -0
- package/dist/collection/openApi/index.js +27 -0
- package/dist/collection/recommendation/events.js +1 -0
- package/dist/collection/recommendation/recommendation.js +1 -0
- package/dist/collection/searchSession/searchSession.js +31 -0
- package/dist/collection/sentry.js +14 -0
- package/dist/collection/slider/GridMode.js +1 -0
- package/dist/collection/store/file-processing.js +13 -0
- package/dist/collection/store/imageSearch.store.js +133 -0
- package/dist/collection/store/store.js +3 -0
- package/dist/collection/store/tracking.store.js +3 -0
- package/dist/collection/stories/Button.js +21 -0
- package/dist/collection/stories/Button.stories.js +42 -0
- package/dist/collection/stories/Header.js +45 -0
- package/dist/collection/stories/Header.stories.js +15 -0
- package/dist/collection/stories/Page.js +61 -0
- package/dist/collection/stories/Page.stories.js +19 -0
- package/dist/collection/stories/assets/code-brackets.svg +1 -0
- package/dist/collection/stories/assets/colors.svg +1 -0
- package/dist/collection/stories/assets/comments.svg +1 -0
- package/dist/collection/stories/assets/direction.svg +1 -0
- package/dist/collection/stories/assets/flow.svg +1 -0
- package/dist/collection/stories/assets/plugin.svg +1 -0
- package/dist/collection/stories/assets/repo.svg +1 -0
- package/dist/collection/stories/assets/stackalt.svg +1 -0
- package/dist/collection/stories/image-selector.stories.js +6 -0
- package/dist/collection/stories/image-view.stories.js +6 -0
- package/dist/collection/stories/modal.stories.js +12 -0
- package/dist/collection/stories/onboarding.stories.js +11 -0
- package/dist/collection/stories/overlay.stories.js +5 -0
- package/dist/collection/stories/overlayedModal.stories.js +8 -0
- package/dist/collection/stories/privacy-badge.stories.js +11 -0
- package/dist/collection/stories/slider.stories.js +17 -0
- package/dist/collection/stories/teaser.stories.js +5 -0
- package/dist/collection/stories/vps-widget.stories.js +47 -0
- package/dist/collection/stories/vviinn-product.stories.js +19 -0
- package/dist/collection/tracking/event.js +3 -0
- package/dist/collection/tracking/filter.js +5 -0
- package/dist/collection/tracking/index.js +13 -0
- package/dist/collection/tracking/models.js +6 -0
- package/dist/collection/tracking/product.js +18 -0
- package/dist/collection/tracking/search.js +5 -0
- package/dist/collection/tracking/widget.js +10 -0
- package/dist/collection/utils/collections/collectionsUtils.js +5 -0
- package/dist/collection/utils/either.js +3 -0
- package/dist/collection/utils/enum/enumUtils.js +3 -0
- package/dist/collection/utils/event/Events.js +1 -0
- package/dist/collection/utils/number/index.js +4 -0
- package/dist/collection/utils/option/option.js +4 -0
- package/dist/collection/utils/semigroup/semigroupDiff.js +6 -0
- package/dist/collection/utils/token/tokenUtils.js +9 -0
- package/{www/build/app-globals-26a61baa.js → dist/esm/app-globals-68b1d848.js} +10 -922
- package/dist/esm/cropper-handler_27.entry.js +1105 -0
- package/{www/build/customized-slots-fb9b3e5f.js → dist/esm/customized-slots-95a05ceb.js} +1 -1
- package/dist/{vviinn-widgets/imageSearch.store-15bda6de.js → esm/index-33fe5a25.js} +12038 -8729
- package/dist/esm/index-75a1f589.js +1323 -0
- package/{www/build/index-533f9255.js → dist/esm/index-f9df412f.js} +2 -4
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +19 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/vviinn-carousel_2.entry.js +996 -0
- package/dist/{vviinn-widgets → esm}/vviinn-recommendations-sidebar.entry.js +2 -2
- package/{www/build → dist/esm}/vviinn-vpr-button.entry.js +2 -2
- package/dist/{vviinn-widgets → esm}/vviinn-vps-button.entry.js +4 -4
- package/dist/esm/vviinn-widgets.js +19 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/loader/cdn.js +3 -0
- package/dist/loader/index.cjs.js +3 -0
- package/dist/loader/index.d.ts +12 -0
- package/dist/loader/index.es2017.js +3 -0
- package/dist/loader/index.js +4 -0
- package/dist/loader/package.json +10 -0
- package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +2 -0
- package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +2 -0
- package/dist/types/components.d.ts +16 -0
- package/dist/types/searchSession/searchSession.d.ts +2 -1
- package/dist/types/store/imageSearch.store.d.ts +7 -6
- package/dist/vviinn-widgets/index.esm.js +0 -1
- package/dist/vviinn-widgets/p-4e55513e.js +1 -0
- package/dist/vviinn-widgets/p-5358970c.entry.js +1 -0
- package/dist/vviinn-widgets/p-66015ad7.js +15 -0
- package/dist/vviinn-widgets/p-669a156c.entry.js +1 -0
- package/dist/vviinn-widgets/p-8080679b.entry.js +1 -0
- package/dist/vviinn-widgets/p-9de1b0e7.js +1 -0
- package/dist/vviinn-widgets/p-b254eee7.js +1 -0
- package/dist/vviinn-widgets/p-c1cd51ef.entry.js +1 -0
- package/dist/vviinn-widgets/p-e32c30d4.entry.js +1 -0
- package/dist/vviinn-widgets/p-f6e59cb2.js +1 -0
- package/dist/vviinn-widgets/vviinn-widgets.css +1 -6
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -125
- package/package.json +1 -1
- package/www/build/index.esm.js +0 -1
- package/www/build/p-4e55513e.js +1 -0
- package/www/build/p-5358970c.entry.js +1 -0
- package/www/build/p-66015ad7.js +15 -0
- package/www/build/p-669a156c.entry.js +1 -0
- package/www/build/p-8080679b.entry.js +1 -0
- package/www/build/p-9de1b0e7.js +1 -0
- package/www/build/p-a67898be.css +1 -0
- package/www/build/p-b254eee7.js +1 -0
- package/www/build/p-c1cd51ef.entry.js +1 -0
- package/www/build/p-e32c30d4.entry.js +1 -0
- package/www/build/p-eb8f77e4.js +1 -0
- package/www/build/p-f6e59cb2.js +1 -0
- package/www/build/vviinn-widgets.css +1 -6
- package/www/build/vviinn-widgets.esm.js +1 -125
- package/www/index.html +1 -10
- package/dist/vviinn-widgets/Array-bdfc75db.js +0 -4870
- package/dist/vviinn-widgets/Handler-edcb46f4.js +0 -1422
- package/dist/vviinn-widgets/NonEmptyArray-947ab7b3.js +0 -4411
- package/dist/vviinn-widgets/cropper-handler.entry.js +0 -23
- package/dist/vviinn-widgets/css-shim-f0027935.js +0 -4
- package/dist/vviinn-widgets/dom-db0073f0.js +0 -73
- package/dist/vviinn-widgets/highlight-box.entry.js +0 -41
- package/dist/vviinn-widgets/image-cropper.entry.js +0 -118
- package/dist/vviinn-widgets/index-6c6de682.js +0 -3857
- package/dist/vviinn-widgets/index-89051fa8.js +0 -3010
- package/dist/vviinn-widgets/number-171db649.js +0 -1499
- package/dist/vviinn-widgets/search-filters.entry.js +0 -76
- package/dist/vviinn-widgets/shadow-css-c1fdfa9f.js +0 -389
- package/dist/vviinn-widgets/vviinn-carousel.entry.js +0 -210
- package/dist/vviinn-widgets/vviinn-detected-object.entry.js +0 -54
- package/dist/vviinn-widgets/vviinn-empty-results.entry.js +0 -16
- package/dist/vviinn-widgets/vviinn-error.entry.js +0 -15
- package/dist/vviinn-widgets/vviinn-example-image.entry.js +0 -38
- package/dist/vviinn-widgets/vviinn-example-images.entry.js +0 -28
- package/dist/vviinn-widgets/vviinn-image-selector.entry.js +0 -31
- package/dist/vviinn-widgets/vviinn-image-view.entry.js +0 -55
- package/dist/vviinn-widgets/vviinn-modal.entry.js +0 -30
- package/dist/vviinn-widgets/vviinn-onboarding-card-1.entry.js +0 -21
- package/dist/vviinn-widgets/vviinn-onboarding-card-2.entry.js +0 -21
- package/dist/vviinn-widgets/vviinn-onboarding-card-3.entry.js +0 -21
- package/dist/vviinn-widgets/vviinn-onboarding.entry.js +0 -20
- package/dist/vviinn-widgets/vviinn-overlay.entry.js +0 -15
- package/dist/vviinn-widgets/vviinn-overlayed-modal.entry.js +0 -18
- package/dist/vviinn-widgets/vviinn-preloader.entry.js +0 -25
- package/dist/vviinn-widgets/vviinn-privacy-badge.entry.js +0 -20
- package/dist/vviinn-widgets/vviinn-product-card.entry.js +0 -184
- package/dist/vviinn-widgets/vviinn-server-error.entry.js +0 -16
- package/dist/vviinn-widgets/vviinn-slide.entry.js +0 -15
- package/dist/vviinn-widgets/vviinn-slider.entry.js +0 -120
- package/dist/vviinn-widgets/vviinn-teaser.entry.js +0 -20
- package/dist/vviinn-widgets/vviinn-vpr-widget.entry.js +0 -4588
- package/dist/vviinn-widgets/vviinn-vps-widget.entry.js +0 -166
- package/dist/vviinn-widgets/vviinn-wrong-format.entry.js +0 -16
- package/www/build/Array-bdfc75db.js +0 -4870
- package/www/build/Handler-edcb46f4.js +0 -1422
- package/www/build/NonEmptyArray-947ab7b3.js +0 -4411
- package/www/build/cropper-handler.entry.js +0 -23
- package/www/build/css-shim-f0027935.js +0 -4
- package/www/build/dom-db0073f0.js +0 -73
- package/www/build/highlight-box.entry.js +0 -41
- package/www/build/index-6c6de682.js +0 -3857
- package/www/build/index-89051fa8.js +0 -3010
- package/www/build/number-171db649.js +0 -1499
- package/www/build/search-filters.entry.js +0 -76
- package/www/build/shadow-css-c1fdfa9f.js +0 -389
- package/www/build/vviinn-detected-object.entry.js +0 -54
- package/www/build/vviinn-empty-results.entry.js +0 -16
- package/www/build/vviinn-error.entry.js +0 -15
- package/www/build/vviinn-example-image.entry.js +0 -38
- package/www/build/vviinn-example-images.entry.js +0 -28
- package/www/build/vviinn-image-selector.entry.js +0 -31
- package/www/build/vviinn-image-view.entry.js +0 -55
- package/www/build/vviinn-modal.entry.js +0 -30
- package/www/build/vviinn-onboarding-card-1.entry.js +0 -21
- package/www/build/vviinn-onboarding-card-2.entry.js +0 -21
- package/www/build/vviinn-onboarding-card-3.entry.js +0 -21
- package/www/build/vviinn-onboarding.entry.js +0 -20
- package/www/build/vviinn-overlay.entry.js +0 -15
- package/www/build/vviinn-overlayed-modal.entry.js +0 -18
- package/www/build/vviinn-preloader.entry.js +0 -25
- package/www/build/vviinn-privacy-badge.entry.js +0 -20
- package/www/build/vviinn-product-card.entry.js +0 -184
- package/www/build/vviinn-server-error.entry.js +0 -16
- package/www/build/vviinn-slide.entry.js +0 -15
- package/www/build/vviinn-slider.entry.js +0 -120
- package/www/build/vviinn-teaser.entry.js +0 -20
- package/www/build/vviinn-vpr-widget.entry.js +0 -4588
- package/www/build/vviinn-vps-button.entry.js +0 -39
- package/www/build/vviinn-vps-widget.entry.js +0 -166
- package/www/build/vviinn-wrong-format.entry.js +0 -16
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-bd771524.js');
|
|
2
4
|
|
|
3
5
|
/*! *****************************************************************************
|
|
4
6
|
Copyright (c) Microsoft Corporation.
|
|
@@ -52,68 +54,6 @@ function __rest(s, e) {
|
|
|
52
54
|
return t;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
function __decorate(decorators, target, key, desc) {
|
|
56
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
57
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
58
|
-
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;
|
|
59
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function __param(paramIndex, decorator) {
|
|
63
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function __metadata(metadataKey, metadataValue) {
|
|
67
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
71
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
72
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
73
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
74
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
75
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
76
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
function __generator(thisArg, body) {
|
|
81
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
82
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
83
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
84
|
-
function step(op) {
|
|
85
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
86
|
-
while (_) try {
|
|
87
|
-
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;
|
|
88
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
89
|
-
switch (op[0]) {
|
|
90
|
-
case 0: case 1: t = op; break;
|
|
91
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
92
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
93
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
94
|
-
default:
|
|
95
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
96
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
97
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
98
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
99
|
-
if (t[2]) _.ops.pop();
|
|
100
|
-
_.trys.pop(); continue;
|
|
101
|
-
}
|
|
102
|
-
op = body.call(thisArg, _);
|
|
103
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
104
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function __createBinding(o, m, k, k2) {
|
|
109
|
-
if (k2 === undefined) k2 = k;
|
|
110
|
-
o[k2] = m[k];
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function __exportStar(m, exports) {
|
|
114
|
-
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
115
|
-
}
|
|
116
|
-
|
|
117
57
|
function __values(o) {
|
|
118
58
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
119
59
|
if (m) return m.call(o);
|
|
@@ -147,91 +87,8 @@ function __spread() {
|
|
|
147
87
|
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
148
88
|
ar = ar.concat(__read(arguments[i]));
|
|
149
89
|
return ar;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
function __spreadArrays() {
|
|
153
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
154
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
155
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
156
|
-
r[k] = a[j];
|
|
157
|
-
return r;
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
function __await(v) {
|
|
161
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
165
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
166
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
167
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
168
|
-
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); }); }; }
|
|
169
|
-
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
170
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
171
|
-
function fulfill(value) { resume("next", value); }
|
|
172
|
-
function reject(value) { resume("throw", value); }
|
|
173
|
-
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
function __asyncDelegator(o) {
|
|
177
|
-
var i, p;
|
|
178
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
179
|
-
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; }
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
function __asyncValues(o) {
|
|
183
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
184
|
-
var m = o[Symbol.asyncIterator], i;
|
|
185
|
-
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);
|
|
186
|
-
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); }); }; }
|
|
187
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
function __makeTemplateObject(cooked, raw) {
|
|
191
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
192
|
-
return cooked;
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
function __importStar(mod) {
|
|
196
|
-
if (mod && mod.__esModule) return mod;
|
|
197
|
-
var result = {};
|
|
198
|
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
199
|
-
result.default = mod;
|
|
200
|
-
return result;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
function __importDefault(mod) {
|
|
204
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function __classPrivateFieldGet(receiver, privateMap) {
|
|
208
|
-
if (!privateMap.has(receiver)) {
|
|
209
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
210
|
-
}
|
|
211
|
-
return privateMap.get(receiver);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
215
|
-
if (!privateMap.has(receiver)) {
|
|
216
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
217
|
-
}
|
|
218
|
-
privateMap.set(receiver, value);
|
|
219
|
-
return value;
|
|
220
90
|
}
|
|
221
91
|
|
|
222
|
-
/** Console logging verbosity for the SDK. */
|
|
223
|
-
var LogLevel;
|
|
224
|
-
(function (LogLevel) {
|
|
225
|
-
/** No logs will be generated. */
|
|
226
|
-
LogLevel[LogLevel["None"] = 0] = "None";
|
|
227
|
-
/** Only SDK internal errors will be logged. */
|
|
228
|
-
LogLevel[LogLevel["Error"] = 1] = "Error";
|
|
229
|
-
/** Information useful for debugging the SDK will be logged. */
|
|
230
|
-
LogLevel[LogLevel["Debug"] = 2] = "Debug";
|
|
231
|
-
/** All SDK actions will be logged. */
|
|
232
|
-
LogLevel[LogLevel["Verbose"] = 3] = "Verbose";
|
|
233
|
-
})(LogLevel || (LogLevel = {}));
|
|
234
|
-
|
|
235
92
|
/**
|
|
236
93
|
* Session Status
|
|
237
94
|
*/
|
|
@@ -349,14 +206,6 @@ var Status;
|
|
|
349
206
|
Status.fromHttpCode = fromHttpCode;
|
|
350
207
|
})(Status || (Status = {}));
|
|
351
208
|
|
|
352
|
-
var TransactionSamplingMethod;
|
|
353
|
-
(function (TransactionSamplingMethod) {
|
|
354
|
-
TransactionSamplingMethod["Explicit"] = "explicitly_set";
|
|
355
|
-
TransactionSamplingMethod["Sampler"] = "client_sampler";
|
|
356
|
-
TransactionSamplingMethod["Rate"] = "client_rate";
|
|
357
|
-
TransactionSamplingMethod["Inheritance"] = "inheritance";
|
|
358
|
-
})(TransactionSamplingMethod || (TransactionSamplingMethod = {}));
|
|
359
|
-
|
|
360
209
|
var Outcome;
|
|
361
210
|
(function (Outcome) {
|
|
362
211
|
Outcome["BeforeSend"] = "before_send";
|
|
@@ -402,36 +251,6 @@ function dynamicRequire(mod, request) {
|
|
|
402
251
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
403
252
|
return mod.require(request);
|
|
404
253
|
}
|
|
405
|
-
/**
|
|
406
|
-
* Helper for dynamically loading module that should work with linked dependencies.
|
|
407
|
-
* The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`
|
|
408
|
-
* However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during
|
|
409
|
-
* build time. `require.resolve` is also not available in any other way, so we cannot create,
|
|
410
|
-
* a fake helper like we do with `dynamicRequire`.
|
|
411
|
-
*
|
|
412
|
-
* We always prefer to use local package, thus the value is not returned early from each `try/catch` block.
|
|
413
|
-
* That is to mimic the behavior of `require.resolve` exactly.
|
|
414
|
-
*
|
|
415
|
-
* @param moduleName module name to require
|
|
416
|
-
* @returns possibly required module
|
|
417
|
-
*/
|
|
418
|
-
function loadModule(moduleName) {
|
|
419
|
-
var mod;
|
|
420
|
-
try {
|
|
421
|
-
mod = dynamicRequire(module, moduleName);
|
|
422
|
-
}
|
|
423
|
-
catch (e) {
|
|
424
|
-
// no-empty
|
|
425
|
-
}
|
|
426
|
-
try {
|
|
427
|
-
var cwd = dynamicRequire(module, 'process').cwd;
|
|
428
|
-
mod = dynamicRequire(module, cwd() + "/node_modules/" + moduleName);
|
|
429
|
-
}
|
|
430
|
-
catch (e) {
|
|
431
|
-
// no-empty
|
|
432
|
-
}
|
|
433
|
-
return mod;
|
|
434
|
-
}
|
|
435
254
|
|
|
436
255
|
/**
|
|
437
256
|
* NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,
|
|
@@ -1009,44 +828,6 @@ function truncate(str, max) {
|
|
|
1009
828
|
}
|
|
1010
829
|
return str.length <= max ? str : str.substr(0, max) + "...";
|
|
1011
830
|
}
|
|
1012
|
-
/**
|
|
1013
|
-
* This is basically just `trim_line` from
|
|
1014
|
-
* https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67
|
|
1015
|
-
*
|
|
1016
|
-
* @param str An object that contains serializable values
|
|
1017
|
-
* @param max Maximum number of characters in truncated string
|
|
1018
|
-
* @returns string Encoded
|
|
1019
|
-
*/
|
|
1020
|
-
function snipLine(line, colno) {
|
|
1021
|
-
var newLine = line;
|
|
1022
|
-
var ll = newLine.length;
|
|
1023
|
-
if (ll <= 150) {
|
|
1024
|
-
return newLine;
|
|
1025
|
-
}
|
|
1026
|
-
if (colno > ll) {
|
|
1027
|
-
// eslint-disable-next-line no-param-reassign
|
|
1028
|
-
colno = ll;
|
|
1029
|
-
}
|
|
1030
|
-
var start = Math.max(colno - 60, 0);
|
|
1031
|
-
if (start < 5) {
|
|
1032
|
-
start = 0;
|
|
1033
|
-
}
|
|
1034
|
-
var end = Math.min(start + 140, ll);
|
|
1035
|
-
if (end > ll - 5) {
|
|
1036
|
-
end = ll;
|
|
1037
|
-
}
|
|
1038
|
-
if (end === ll) {
|
|
1039
|
-
start = Math.max(end - 140, 0);
|
|
1040
|
-
}
|
|
1041
|
-
newLine = newLine.slice(start, end);
|
|
1042
|
-
if (start > 0) {
|
|
1043
|
-
newLine = "'{snip} " + newLine;
|
|
1044
|
-
}
|
|
1045
|
-
if (end < ll) {
|
|
1046
|
-
newLine += ' {snip}';
|
|
1047
|
-
}
|
|
1048
|
-
return newLine;
|
|
1049
|
-
}
|
|
1050
831
|
/**
|
|
1051
832
|
* Join values in array
|
|
1052
833
|
* @param input array of values to be joined together
|
|
@@ -1088,22 +869,6 @@ function isMatchingPattern(value, pattern) {
|
|
|
1088
869
|
}
|
|
1089
870
|
return false;
|
|
1090
871
|
}
|
|
1091
|
-
/**
|
|
1092
|
-
* Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to
|
|
1093
|
-
* `new RegExp()`.
|
|
1094
|
-
*
|
|
1095
|
-
* Based on https://github.com/sindresorhus/escape-string-regexp. Vendored to a) reduce the size by skipping the runtime
|
|
1096
|
-
* type-checking, and b) ensure it gets down-compiled for old versions of Node (the published package only supports Node
|
|
1097
|
-
* 12+).
|
|
1098
|
-
*
|
|
1099
|
-
* @param regexString The string to escape
|
|
1100
|
-
* @returns An version of the string with all special regex characters escaped
|
|
1101
|
-
*/
|
|
1102
|
-
function escapeStringForRegex(regexString) {
|
|
1103
|
-
// escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems
|
|
1104
|
-
// discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20.
|
|
1105
|
-
return regexString.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d');
|
|
1106
|
-
}
|
|
1107
872
|
|
|
1108
873
|
/**
|
|
1109
874
|
* Replace a method in an object with a wrapped version of itself.
|
|
@@ -1435,88 +1200,7 @@ function dropUndefinedKeys(val) {
|
|
|
1435
1200
|
}
|
|
1436
1201
|
return val;
|
|
1437
1202
|
}
|
|
1438
|
-
/**
|
|
1439
|
-
* Ensure that something is an object.
|
|
1440
|
-
*
|
|
1441
|
-
* Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper
|
|
1442
|
-
* classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.
|
|
1443
|
-
*
|
|
1444
|
-
* @param wat The subject of the objectification
|
|
1445
|
-
* @returns A version of `wat` which can safely be used with `Object` class methods
|
|
1446
|
-
*/
|
|
1447
|
-
function objectify(wat) {
|
|
1448
|
-
var objectified;
|
|
1449
|
-
switch (true) {
|
|
1450
|
-
case wat === undefined || wat === null:
|
|
1451
|
-
objectified = new String(wat);
|
|
1452
|
-
break;
|
|
1453
|
-
// Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason
|
|
1454
|
-
// those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as
|
|
1455
|
-
// an object in order to wrap it.
|
|
1456
|
-
case typeof wat === 'symbol' || typeof wat === 'bigint':
|
|
1457
|
-
objectified = Object(wat);
|
|
1458
|
-
break;
|
|
1459
|
-
// this will catch the remaining primitives: `String`, `Number`, and `Boolean`
|
|
1460
|
-
case isPrimitive(wat):
|
|
1461
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1462
|
-
objectified = new wat.constructor(wat);
|
|
1463
|
-
break;
|
|
1464
|
-
// by process of elimination, at this point we know that `wat` must already be an object
|
|
1465
|
-
default:
|
|
1466
|
-
objectified = wat;
|
|
1467
|
-
break;
|
|
1468
|
-
}
|
|
1469
|
-
return objectified;
|
|
1470
|
-
}
|
|
1471
1203
|
|
|
1472
|
-
/**
|
|
1473
|
-
* Tells whether current environment supports ErrorEvent objects
|
|
1474
|
-
* {@link supportsErrorEvent}.
|
|
1475
|
-
*
|
|
1476
|
-
* @returns Answer to the given question.
|
|
1477
|
-
*/
|
|
1478
|
-
function supportsErrorEvent() {
|
|
1479
|
-
try {
|
|
1480
|
-
new ErrorEvent('');
|
|
1481
|
-
return true;
|
|
1482
|
-
}
|
|
1483
|
-
catch (e) {
|
|
1484
|
-
return false;
|
|
1485
|
-
}
|
|
1486
|
-
}
|
|
1487
|
-
/**
|
|
1488
|
-
* Tells whether current environment supports DOMError objects
|
|
1489
|
-
* {@link supportsDOMError}.
|
|
1490
|
-
*
|
|
1491
|
-
* @returns Answer to the given question.
|
|
1492
|
-
*/
|
|
1493
|
-
function supportsDOMError() {
|
|
1494
|
-
try {
|
|
1495
|
-
// Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':
|
|
1496
|
-
// 1 argument required, but only 0 present.
|
|
1497
|
-
// @ts-ignore It really needs 1 argument, not 0.
|
|
1498
|
-
new DOMError('');
|
|
1499
|
-
return true;
|
|
1500
|
-
}
|
|
1501
|
-
catch (e) {
|
|
1502
|
-
return false;
|
|
1503
|
-
}
|
|
1504
|
-
}
|
|
1505
|
-
/**
|
|
1506
|
-
* Tells whether current environment supports DOMException objects
|
|
1507
|
-
* {@link supportsDOMException}.
|
|
1508
|
-
*
|
|
1509
|
-
* @returns Answer to the given question.
|
|
1510
|
-
*/
|
|
1511
|
-
function supportsDOMException() {
|
|
1512
|
-
try {
|
|
1513
|
-
new DOMException('');
|
|
1514
|
-
return true;
|
|
1515
|
-
}
|
|
1516
|
-
catch (e) {
|
|
1517
|
-
return false;
|
|
1518
|
-
}
|
|
1519
|
-
}
|
|
1520
1204
|
/**
|
|
1521
1205
|
* Tells whether current environment supports Fetch API
|
|
1522
1206
|
* {@link supportsFetch}.
|
|
@@ -1582,15 +1266,6 @@ function supportsNativeFetch() {
|
|
|
1582
1266
|
}
|
|
1583
1267
|
return result;
|
|
1584
1268
|
}
|
|
1585
|
-
/**
|
|
1586
|
-
* Tells whether current environment supports ReportingObserver API
|
|
1587
|
-
* {@link supportsReportingObserver}.
|
|
1588
|
-
*
|
|
1589
|
-
* @returns Answer to the given question.
|
|
1590
|
-
*/
|
|
1591
|
-
function supportsReportingObserver() {
|
|
1592
|
-
return 'ReportingObserver' in getGlobalObject();
|
|
1593
|
-
}
|
|
1594
1269
|
/**
|
|
1595
1270
|
* Tells whether current environment supports Referrer Policy API
|
|
1596
1271
|
* {@link supportsReferrerPolicy}.
|
|
@@ -2283,25 +1958,6 @@ function addExceptionMechanism(event, newMechanism) {
|
|
|
2283
1958
|
exceptionValue0.mechanism.data = mergedData;
|
|
2284
1959
|
}
|
|
2285
1960
|
}
|
|
2286
|
-
// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
|
|
2287
|
-
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-]+)*))?$/;
|
|
2288
|
-
/**
|
|
2289
|
-
* Parses input into a SemVer interface
|
|
2290
|
-
* @param input string representation of a semver version
|
|
2291
|
-
*/
|
|
2292
|
-
function parseSemver(input) {
|
|
2293
|
-
var match = input.match(SEMVER_REGEXP) || [];
|
|
2294
|
-
var major = parseInt(match[1], 10);
|
|
2295
|
-
var minor = parseInt(match[2], 10);
|
|
2296
|
-
var patch = parseInt(match[3], 10);
|
|
2297
|
-
return {
|
|
2298
|
-
buildmetadata: match[5],
|
|
2299
|
-
major: isNaN(major) ? undefined : major,
|
|
2300
|
-
minor: isNaN(minor) ? undefined : minor,
|
|
2301
|
-
patch: isNaN(patch) ? undefined : patch,
|
|
2302
|
-
prerelease: match[4],
|
|
2303
|
-
};
|
|
2304
|
-
}
|
|
2305
1961
|
var defaultRetryAfter = 60 * 1000; // 60 seconds
|
|
2306
1962
|
/**
|
|
2307
1963
|
* Extracts Retry-After value from the request header or returns default value
|
|
@@ -2322,36 +1978,6 @@ function parseRetryAfterHeader(now, header) {
|
|
|
2322
1978
|
}
|
|
2323
1979
|
return defaultRetryAfter;
|
|
2324
1980
|
}
|
|
2325
|
-
/**
|
|
2326
|
-
* This function adds context (pre/post/line) lines to the provided frame
|
|
2327
|
-
*
|
|
2328
|
-
* @param lines string[] containing all lines
|
|
2329
|
-
* @param frame StackFrame that will be mutated
|
|
2330
|
-
* @param linesOfContext number of context lines we want to add pre/post
|
|
2331
|
-
*/
|
|
2332
|
-
function addContextToFrame(lines, frame, linesOfContext) {
|
|
2333
|
-
if (linesOfContext === void 0) { linesOfContext = 5; }
|
|
2334
|
-
var lineno = frame.lineno || 0;
|
|
2335
|
-
var maxLines = lines.length;
|
|
2336
|
-
var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);
|
|
2337
|
-
frame.pre_context = lines
|
|
2338
|
-
.slice(Math.max(0, sourceLine - linesOfContext), sourceLine)
|
|
2339
|
-
.map(function (line) { return snipLine(line, 0); });
|
|
2340
|
-
frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);
|
|
2341
|
-
frame.post_context = lines
|
|
2342
|
-
.slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)
|
|
2343
|
-
.map(function (line) { return snipLine(line, 0); });
|
|
2344
|
-
}
|
|
2345
|
-
/**
|
|
2346
|
-
* Strip the query string and fragment off of a given URL or path (if present)
|
|
2347
|
-
*
|
|
2348
|
-
* @param urlPath Full URL or path, including possible query string and/or fragment
|
|
2349
|
-
* @returns URL or path without query string or fragment
|
|
2350
|
-
*/
|
|
2351
|
-
function stripUrlQueryAndFragment(urlPath) {
|
|
2352
|
-
// eslint-disable-next-line no-useless-escape
|
|
2353
|
-
return urlPath.split(/[\?#]/, 1)[0];
|
|
2354
|
-
}
|
|
2355
1981
|
/**
|
|
2356
1982
|
* Checks whether or not we've already captured the given exception (note: not an identical exception - the very object
|
|
2357
1983
|
* in question), and marks it captured if not.
|
|
@@ -2392,168 +2018,6 @@ function checkOrSetAlreadyCaught(exception) {
|
|
|
2392
2018
|
return false;
|
|
2393
2019
|
}
|
|
2394
2020
|
|
|
2395
|
-
// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript
|
|
2396
|
-
// https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js
|
|
2397
|
-
/** JSDoc */
|
|
2398
|
-
function normalizeArray(parts, allowAboveRoot) {
|
|
2399
|
-
// if the path tries to go above the root, `up` ends up > 0
|
|
2400
|
-
var up = 0;
|
|
2401
|
-
for (var i = parts.length - 1; i >= 0; i--) {
|
|
2402
|
-
var last = parts[i];
|
|
2403
|
-
if (last === '.') {
|
|
2404
|
-
parts.splice(i, 1);
|
|
2405
|
-
}
|
|
2406
|
-
else if (last === '..') {
|
|
2407
|
-
parts.splice(i, 1);
|
|
2408
|
-
// eslint-disable-next-line no-plusplus
|
|
2409
|
-
up++;
|
|
2410
|
-
}
|
|
2411
|
-
else if (up) {
|
|
2412
|
-
parts.splice(i, 1);
|
|
2413
|
-
// eslint-disable-next-line no-plusplus
|
|
2414
|
-
up--;
|
|
2415
|
-
}
|
|
2416
|
-
}
|
|
2417
|
-
// if the path is allowed to go above the root, restore leading ..s
|
|
2418
|
-
if (allowAboveRoot) {
|
|
2419
|
-
// eslint-disable-next-line no-plusplus
|
|
2420
|
-
for (; up--; up) {
|
|
2421
|
-
parts.unshift('..');
|
|
2422
|
-
}
|
|
2423
|
-
}
|
|
2424
|
-
return parts;
|
|
2425
|
-
}
|
|
2426
|
-
// Split a filename into [root, dir, basename, ext], unix version
|
|
2427
|
-
// 'root' is just a slash, or nothing.
|
|
2428
|
-
var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;
|
|
2429
|
-
/** JSDoc */
|
|
2430
|
-
function splitPath(filename) {
|
|
2431
|
-
var parts = splitPathRe.exec(filename);
|
|
2432
|
-
return parts ? parts.slice(1) : [];
|
|
2433
|
-
}
|
|
2434
|
-
// path.resolve([from ...], to)
|
|
2435
|
-
// posix version
|
|
2436
|
-
/** JSDoc */
|
|
2437
|
-
function resolve() {
|
|
2438
|
-
var args = [];
|
|
2439
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2440
|
-
args[_i] = arguments[_i];
|
|
2441
|
-
}
|
|
2442
|
-
var resolvedPath = '';
|
|
2443
|
-
var resolvedAbsolute = false;
|
|
2444
|
-
for (var i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
2445
|
-
var path = i >= 0 ? args[i] : '/';
|
|
2446
|
-
// Skip empty entries
|
|
2447
|
-
if (!path) {
|
|
2448
|
-
continue;
|
|
2449
|
-
}
|
|
2450
|
-
resolvedPath = path + "/" + resolvedPath;
|
|
2451
|
-
resolvedAbsolute = path.charAt(0) === '/';
|
|
2452
|
-
}
|
|
2453
|
-
// At this point the path should be resolved to a full absolute path, but
|
|
2454
|
-
// handle relative paths to be safe (might happen when process.cwd() fails)
|
|
2455
|
-
// Normalize the path
|
|
2456
|
-
resolvedPath = normalizeArray(resolvedPath.split('/').filter(function (p) { return !!p; }), !resolvedAbsolute).join('/');
|
|
2457
|
-
return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';
|
|
2458
|
-
}
|
|
2459
|
-
/** JSDoc */
|
|
2460
|
-
function trim(arr) {
|
|
2461
|
-
var start = 0;
|
|
2462
|
-
for (; start < arr.length; start++) {
|
|
2463
|
-
if (arr[start] !== '') {
|
|
2464
|
-
break;
|
|
2465
|
-
}
|
|
2466
|
-
}
|
|
2467
|
-
var end = arr.length - 1;
|
|
2468
|
-
for (; end >= 0; end--) {
|
|
2469
|
-
if (arr[end] !== '') {
|
|
2470
|
-
break;
|
|
2471
|
-
}
|
|
2472
|
-
}
|
|
2473
|
-
if (start > end) {
|
|
2474
|
-
return [];
|
|
2475
|
-
}
|
|
2476
|
-
return arr.slice(start, end - start + 1);
|
|
2477
|
-
}
|
|
2478
|
-
// path.relative(from, to)
|
|
2479
|
-
// posix version
|
|
2480
|
-
/** JSDoc */
|
|
2481
|
-
function relative(from, to) {
|
|
2482
|
-
/* eslint-disable no-param-reassign */
|
|
2483
|
-
from = resolve(from).substr(1);
|
|
2484
|
-
to = resolve(to).substr(1);
|
|
2485
|
-
/* eslint-enable no-param-reassign */
|
|
2486
|
-
var fromParts = trim(from.split('/'));
|
|
2487
|
-
var toParts = trim(to.split('/'));
|
|
2488
|
-
var length = Math.min(fromParts.length, toParts.length);
|
|
2489
|
-
var samePartsLength = length;
|
|
2490
|
-
for (var i = 0; i < length; i++) {
|
|
2491
|
-
if (fromParts[i] !== toParts[i]) {
|
|
2492
|
-
samePartsLength = i;
|
|
2493
|
-
break;
|
|
2494
|
-
}
|
|
2495
|
-
}
|
|
2496
|
-
var outputParts = [];
|
|
2497
|
-
for (var i = samePartsLength; i < fromParts.length; i++) {
|
|
2498
|
-
outputParts.push('..');
|
|
2499
|
-
}
|
|
2500
|
-
outputParts = outputParts.concat(toParts.slice(samePartsLength));
|
|
2501
|
-
return outputParts.join('/');
|
|
2502
|
-
}
|
|
2503
|
-
// path.normalize(path)
|
|
2504
|
-
// posix version
|
|
2505
|
-
/** JSDoc */
|
|
2506
|
-
function normalizePath(path) {
|
|
2507
|
-
var isPathAbsolute = isAbsolute(path);
|
|
2508
|
-
var trailingSlash = path.substr(-1) === '/';
|
|
2509
|
-
// Normalize the path
|
|
2510
|
-
var normalizedPath = normalizeArray(path.split('/').filter(function (p) { return !!p; }), !isPathAbsolute).join('/');
|
|
2511
|
-
if (!normalizedPath && !isPathAbsolute) {
|
|
2512
|
-
normalizedPath = '.';
|
|
2513
|
-
}
|
|
2514
|
-
if (normalizedPath && trailingSlash) {
|
|
2515
|
-
normalizedPath += '/';
|
|
2516
|
-
}
|
|
2517
|
-
return (isPathAbsolute ? '/' : '') + normalizedPath;
|
|
2518
|
-
}
|
|
2519
|
-
// posix version
|
|
2520
|
-
/** JSDoc */
|
|
2521
|
-
function isAbsolute(path) {
|
|
2522
|
-
return path.charAt(0) === '/';
|
|
2523
|
-
}
|
|
2524
|
-
// posix version
|
|
2525
|
-
/** JSDoc */
|
|
2526
|
-
function join() {
|
|
2527
|
-
var args = [];
|
|
2528
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2529
|
-
args[_i] = arguments[_i];
|
|
2530
|
-
}
|
|
2531
|
-
return normalizePath(args.join('/'));
|
|
2532
|
-
}
|
|
2533
|
-
/** JSDoc */
|
|
2534
|
-
function dirname(path) {
|
|
2535
|
-
var result = splitPath(path);
|
|
2536
|
-
var root = result[0];
|
|
2537
|
-
var dir = result[1];
|
|
2538
|
-
if (!root && !dir) {
|
|
2539
|
-
// No dirname whatsoever
|
|
2540
|
-
return '.';
|
|
2541
|
-
}
|
|
2542
|
-
if (dir) {
|
|
2543
|
-
// It has a dirname, strip trailing slash
|
|
2544
|
-
dir = dir.substr(0, dir.length - 1);
|
|
2545
|
-
}
|
|
2546
|
-
return root + dir;
|
|
2547
|
-
}
|
|
2548
|
-
/** JSDoc */
|
|
2549
|
-
function basename(path, ext) {
|
|
2550
|
-
var f = splitPath(path)[2];
|
|
2551
|
-
if (ext && f.substr(ext.length * -1) === ext) {
|
|
2552
|
-
f = f.substr(0, f.length - ext.length);
|
|
2553
|
-
}
|
|
2554
|
-
return f;
|
|
2555
|
-
}
|
|
2556
|
-
|
|
2557
2021
|
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
2558
2022
|
/** SyncPromise internal states */
|
|
2559
2023
|
var States;
|
|
@@ -2928,27 +2392,16 @@ var dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSo
|
|
|
2928
2392
|
* See https://github.com/getsentry/sentry-javascript/issues/2590.
|
|
2929
2393
|
*/
|
|
2930
2394
|
var timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource);
|
|
2931
|
-
// Re-exported with an old name for backwards-compatibility.
|
|
2932
|
-
var timestampWithMs = timestampInSeconds;
|
|
2933
|
-
/**
|
|
2934
|
-
* A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.
|
|
2935
|
-
*/
|
|
2936
|
-
var usingPerformanceAPI = platformPerformance !== undefined;
|
|
2937
|
-
/**
|
|
2938
|
-
* Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.
|
|
2939
|
-
*/
|
|
2940
|
-
var _browserPerformanceTimeOriginMode;
|
|
2941
2395
|
/**
|
|
2942
2396
|
* The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the
|
|
2943
2397
|
* performance API is available.
|
|
2944
2398
|
*/
|
|
2945
|
-
|
|
2399
|
+
((function () {
|
|
2946
2400
|
// Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or
|
|
2947
2401
|
// performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin
|
|
2948
2402
|
// data as reliable if they are within a reasonable threshold of the current time.
|
|
2949
2403
|
var performance = getGlobalObject().performance;
|
|
2950
2404
|
if (!performance || !performance.now) {
|
|
2951
|
-
_browserPerformanceTimeOriginMode = 'none';
|
|
2952
2405
|
return undefined;
|
|
2953
2406
|
}
|
|
2954
2407
|
var threshold = 3600 * 1000;
|
|
@@ -2973,18 +2426,14 @@ var browserPerformanceTimeOrigin = (function () {
|
|
|
2973
2426
|
if (timeOriginIsReliable || navigationStartIsReliable) {
|
|
2974
2427
|
// Use the more reliable time origin
|
|
2975
2428
|
if (timeOriginDelta <= navigationStartDelta) {
|
|
2976
|
-
_browserPerformanceTimeOriginMode = 'timeOrigin';
|
|
2977
2429
|
return performance.timeOrigin;
|
|
2978
2430
|
}
|
|
2979
2431
|
else {
|
|
2980
|
-
_browserPerformanceTimeOriginMode = 'navigationStart';
|
|
2981
2432
|
return navigationStart;
|
|
2982
2433
|
}
|
|
2983
2434
|
}
|
|
2984
|
-
// Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.
|
|
2985
|
-
_browserPerformanceTimeOriginMode = 'dateNow';
|
|
2986
2435
|
return dateNow;
|
|
2987
|
-
})();
|
|
2436
|
+
}))();
|
|
2988
2437
|
|
|
2989
2438
|
/**
|
|
2990
2439
|
* Absolute maximum number of breadcrumbs added to an event.
|
|
@@ -3978,17 +3427,6 @@ function getCurrentHub() {
|
|
|
3978
3427
|
// Return hub that lives on a global object
|
|
3979
3428
|
return getHubFromCarrier(registry);
|
|
3980
3429
|
}
|
|
3981
|
-
/**
|
|
3982
|
-
* Returns the active domain, if one exists
|
|
3983
|
-
* @deprecated No longer used; remove in v7
|
|
3984
|
-
* @returns The domain, or undefined if there is no active domain
|
|
3985
|
-
*/
|
|
3986
|
-
// eslint-disable-next-line deprecation/deprecation
|
|
3987
|
-
function getActiveDomain() {
|
|
3988
|
-
logger.warn('Function `getActiveDomain` is deprecated and will be removed in a future version.');
|
|
3989
|
-
var sentry = getMainCarrier().__SENTRY__;
|
|
3990
|
-
return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;
|
|
3991
|
-
}
|
|
3992
3430
|
/**
|
|
3993
3431
|
* Try to read the hub from an active domain, and fallback to the registry if one doesn't exist
|
|
3994
3432
|
* @returns discovered hub
|
|
@@ -4048,106 +3486,6 @@ function setHubOnCarrier(carrier, hub) {
|
|
|
4048
3486
|
return true;
|
|
4049
3487
|
}
|
|
4050
3488
|
|
|
4051
|
-
/**
|
|
4052
|
-
* @inheritdoc
|
|
4053
|
-
*/
|
|
4054
|
-
var SessionFlusher = /** @class */ (function () {
|
|
4055
|
-
function SessionFlusher(transport, attrs) {
|
|
4056
|
-
var _this = this;
|
|
4057
|
-
this.flushTimeout = 60;
|
|
4058
|
-
this._pendingAggregates = {};
|
|
4059
|
-
this._isEnabled = true;
|
|
4060
|
-
this._transport = transport;
|
|
4061
|
-
// Call to setInterval, so that flush is called every 60 seconds
|
|
4062
|
-
this._intervalId = setInterval(function () { return _this.flush(); }, this.flushTimeout * 1000);
|
|
4063
|
-
this._sessionAttrs = attrs;
|
|
4064
|
-
}
|
|
4065
|
-
/** Sends session aggregates to Transport */
|
|
4066
|
-
SessionFlusher.prototype.sendSessionAggregates = function (sessionAggregates) {
|
|
4067
|
-
if (!this._transport.sendSession) {
|
|
4068
|
-
logger.warn("Dropping session because custom transport doesn't implement sendSession");
|
|
4069
|
-
return;
|
|
4070
|
-
}
|
|
4071
|
-
void this._transport.sendSession(sessionAggregates).then(null, function (reason) {
|
|
4072
|
-
logger.error("Error while sending session: " + reason);
|
|
4073
|
-
});
|
|
4074
|
-
};
|
|
4075
|
-
/** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSessions` */
|
|
4076
|
-
SessionFlusher.prototype.flush = function () {
|
|
4077
|
-
var sessionAggregates = this.getSessionAggregates();
|
|
4078
|
-
if (sessionAggregates.aggregates.length === 0) {
|
|
4079
|
-
return;
|
|
4080
|
-
}
|
|
4081
|
-
this._pendingAggregates = {};
|
|
4082
|
-
this.sendSessionAggregates(sessionAggregates);
|
|
4083
|
-
};
|
|
4084
|
-
/** Massages the entries in `pendingAggregates` and returns aggregated sessions */
|
|
4085
|
-
SessionFlusher.prototype.getSessionAggregates = function () {
|
|
4086
|
-
var _this = this;
|
|
4087
|
-
var aggregates = Object.keys(this._pendingAggregates).map(function (key) {
|
|
4088
|
-
return _this._pendingAggregates[parseInt(key)];
|
|
4089
|
-
});
|
|
4090
|
-
var sessionAggregates = {
|
|
4091
|
-
attrs: this._sessionAttrs,
|
|
4092
|
-
aggregates: aggregates,
|
|
4093
|
-
};
|
|
4094
|
-
return dropUndefinedKeys(sessionAggregates);
|
|
4095
|
-
};
|
|
4096
|
-
/** JSDoc */
|
|
4097
|
-
SessionFlusher.prototype.close = function () {
|
|
4098
|
-
clearInterval(this._intervalId);
|
|
4099
|
-
this._isEnabled = false;
|
|
4100
|
-
this.flush();
|
|
4101
|
-
};
|
|
4102
|
-
/**
|
|
4103
|
-
* Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then
|
|
4104
|
-
* fetches the session status of the request from `Scope.getRequestSession().status` on the scope and passes them to
|
|
4105
|
-
* `_incrementSessionStatusCount` along with the start date
|
|
4106
|
-
*/
|
|
4107
|
-
SessionFlusher.prototype.incrementSessionStatusCount = function () {
|
|
4108
|
-
var _a, _b;
|
|
4109
|
-
if (!this._isEnabled) {
|
|
4110
|
-
return;
|
|
4111
|
-
}
|
|
4112
|
-
var scope = getCurrentHub().getScope();
|
|
4113
|
-
var requestSession = (_a = scope) === null || _a === void 0 ? void 0 : _a.getRequestSession();
|
|
4114
|
-
if (requestSession && requestSession.status) {
|
|
4115
|
-
this._incrementSessionStatusCount(requestSession.status, new Date());
|
|
4116
|
-
// This is not entirely necessarily but is added as a safe guard to indicate the bounds of a request and so in
|
|
4117
|
-
// case captureRequestSession is called more than once to prevent double count
|
|
4118
|
-
(_b = scope) === null || _b === void 0 ? void 0 : _b.setRequestSession(undefined);
|
|
4119
|
-
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
|
4120
|
-
}
|
|
4121
|
-
};
|
|
4122
|
-
/**
|
|
4123
|
-
* Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of
|
|
4124
|
-
* the session received
|
|
4125
|
-
*/
|
|
4126
|
-
SessionFlusher.prototype._incrementSessionStatusCount = function (status, date) {
|
|
4127
|
-
// Truncate minutes and seconds on Session Started attribute to have one minute bucket keys
|
|
4128
|
-
var sessionStartedTrunc = new Date(date).setSeconds(0, 0);
|
|
4129
|
-
this._pendingAggregates[sessionStartedTrunc] = this._pendingAggregates[sessionStartedTrunc] || {};
|
|
4130
|
-
// corresponds to aggregated sessions in one specific minute bucket
|
|
4131
|
-
// for example, {"started":"2021-03-16T08:00:00.000Z","exited":4, "errored": 1}
|
|
4132
|
-
var aggregationCounts = this._pendingAggregates[sessionStartedTrunc];
|
|
4133
|
-
if (!aggregationCounts.started) {
|
|
4134
|
-
aggregationCounts.started = new Date(sessionStartedTrunc).toISOString();
|
|
4135
|
-
}
|
|
4136
|
-
switch (status) {
|
|
4137
|
-
case RequestSessionStatus.Errored:
|
|
4138
|
-
aggregationCounts.errored = (aggregationCounts.errored || 0) + 1;
|
|
4139
|
-
return aggregationCounts.errored;
|
|
4140
|
-
case RequestSessionStatus.Ok:
|
|
4141
|
-
aggregationCounts.exited = (aggregationCounts.exited || 0) + 1;
|
|
4142
|
-
return aggregationCounts.exited;
|
|
4143
|
-
case RequestSessionStatus.Crashed:
|
|
4144
|
-
aggregationCounts.crashed = (aggregationCounts.crashed || 0) + 1;
|
|
4145
|
-
return aggregationCounts.crashed;
|
|
4146
|
-
}
|
|
4147
|
-
};
|
|
4148
|
-
return SessionFlusher;
|
|
4149
|
-
}());
|
|
4150
|
-
|
|
4151
3489
|
/**
|
|
4152
3490
|
* This calls a function on the current hub.
|
|
4153
3491
|
* @param method function to call on hub.
|
|
@@ -4187,104 +3525,6 @@ function captureException(exception, captureContext) {
|
|
|
4187
3525
|
syntheticException: syntheticException,
|
|
4188
3526
|
});
|
|
4189
3527
|
}
|
|
4190
|
-
/**
|
|
4191
|
-
* Captures a message event and sends it to Sentry.
|
|
4192
|
-
*
|
|
4193
|
-
* @param message The message to send to Sentry.
|
|
4194
|
-
* @param level Define the level of the message.
|
|
4195
|
-
* @returns The generated eventId.
|
|
4196
|
-
*/
|
|
4197
|
-
function captureMessage(message, captureContext) {
|
|
4198
|
-
var syntheticException;
|
|
4199
|
-
try {
|
|
4200
|
-
throw new Error(message);
|
|
4201
|
-
}
|
|
4202
|
-
catch (exception) {
|
|
4203
|
-
syntheticException = exception;
|
|
4204
|
-
}
|
|
4205
|
-
// This is necessary to provide explicit scopes upgrade, without changing the original
|
|
4206
|
-
// arity of the `captureMessage(message, level)` method.
|
|
4207
|
-
var level = typeof captureContext === 'string' ? captureContext : undefined;
|
|
4208
|
-
var context = typeof captureContext !== 'string' ? { captureContext: captureContext } : undefined;
|
|
4209
|
-
return callOnHub('captureMessage', message, level, __assign({ originalException: message, syntheticException: syntheticException }, context));
|
|
4210
|
-
}
|
|
4211
|
-
/**
|
|
4212
|
-
* Captures a manually created event and sends it to Sentry.
|
|
4213
|
-
*
|
|
4214
|
-
* @param event The event to send to Sentry.
|
|
4215
|
-
* @returns The generated eventId.
|
|
4216
|
-
*/
|
|
4217
|
-
function captureEvent(event) {
|
|
4218
|
-
return callOnHub('captureEvent', event);
|
|
4219
|
-
}
|
|
4220
|
-
/**
|
|
4221
|
-
* Callback to set context information onto the scope.
|
|
4222
|
-
* @param callback Callback function that receives Scope.
|
|
4223
|
-
*/
|
|
4224
|
-
function configureScope(callback) {
|
|
4225
|
-
callOnHub('configureScope', callback);
|
|
4226
|
-
}
|
|
4227
|
-
/**
|
|
4228
|
-
* Records a new breadcrumb which will be attached to future events.
|
|
4229
|
-
*
|
|
4230
|
-
* Breadcrumbs will be added to subsequent events to provide more context on
|
|
4231
|
-
* user's actions prior to an error or crash.
|
|
4232
|
-
*
|
|
4233
|
-
* @param breadcrumb The breadcrumb to record.
|
|
4234
|
-
*/
|
|
4235
|
-
function addBreadcrumb(breadcrumb) {
|
|
4236
|
-
callOnHub('addBreadcrumb', breadcrumb);
|
|
4237
|
-
}
|
|
4238
|
-
/**
|
|
4239
|
-
* Sets context data with the given name.
|
|
4240
|
-
* @param name of the context
|
|
4241
|
-
* @param context Any kind of data. This data will be normalized.
|
|
4242
|
-
*/
|
|
4243
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4244
|
-
function setContext(name, context) {
|
|
4245
|
-
callOnHub('setContext', name, context);
|
|
4246
|
-
}
|
|
4247
|
-
/**
|
|
4248
|
-
* Set an object that will be merged sent as extra data with the event.
|
|
4249
|
-
* @param extras Extras object to merge into current context.
|
|
4250
|
-
*/
|
|
4251
|
-
function setExtras(extras) {
|
|
4252
|
-
callOnHub('setExtras', extras);
|
|
4253
|
-
}
|
|
4254
|
-
/**
|
|
4255
|
-
* Set an object that will be merged sent as tags data with the event.
|
|
4256
|
-
* @param tags Tags context object to merge into current context.
|
|
4257
|
-
*/
|
|
4258
|
-
function setTags(tags) {
|
|
4259
|
-
callOnHub('setTags', tags);
|
|
4260
|
-
}
|
|
4261
|
-
/**
|
|
4262
|
-
* Set key:value that will be sent as extra data with the event.
|
|
4263
|
-
* @param key String of extra
|
|
4264
|
-
* @param extra Any kind of data. This data will be normalized.
|
|
4265
|
-
*/
|
|
4266
|
-
function setExtra(key, extra) {
|
|
4267
|
-
callOnHub('setExtra', key, extra);
|
|
4268
|
-
}
|
|
4269
|
-
/**
|
|
4270
|
-
* Set key:value that will be sent as tags data with the event.
|
|
4271
|
-
*
|
|
4272
|
-
* Can also be used to unset a tag, by passing `undefined`.
|
|
4273
|
-
*
|
|
4274
|
-
* @param key String key of tag
|
|
4275
|
-
* @param value Value of tag
|
|
4276
|
-
*/
|
|
4277
|
-
function setTag(key, value) {
|
|
4278
|
-
callOnHub('setTag', key, value);
|
|
4279
|
-
}
|
|
4280
|
-
/**
|
|
4281
|
-
* Updates user context information for future events.
|
|
4282
|
-
*
|
|
4283
|
-
* @param user User context object to be set in the current context. Pass `null` to unset the user.
|
|
4284
|
-
*/
|
|
4285
|
-
function setUser(user) {
|
|
4286
|
-
callOnHub('setUser', user);
|
|
4287
|
-
}
|
|
4288
3528
|
/**
|
|
4289
3529
|
* Creates a new scope with and executes the given operation within.
|
|
4290
3530
|
* The scope is automatically removed once the operation
|
|
@@ -4301,44 +3541,6 @@ function setUser(user) {
|
|
|
4301
3541
|
function withScope(callback) {
|
|
4302
3542
|
callOnHub('withScope', callback);
|
|
4303
3543
|
}
|
|
4304
|
-
/**
|
|
4305
|
-
* Calls a function on the latest client. Use this with caution, it's meant as
|
|
4306
|
-
* in "internal" helper so we don't need to expose every possible function in
|
|
4307
|
-
* the shim. It is not guaranteed that the client actually implements the
|
|
4308
|
-
* function.
|
|
4309
|
-
*
|
|
4310
|
-
* @param method The method to call on the client/client.
|
|
4311
|
-
* @param args Arguments to pass to the client/fontend.
|
|
4312
|
-
* @hidden
|
|
4313
|
-
*/
|
|
4314
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4315
|
-
function _callOnClient(method) {
|
|
4316
|
-
var args = [];
|
|
4317
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
4318
|
-
args[_i - 1] = arguments[_i];
|
|
4319
|
-
}
|
|
4320
|
-
callOnHub.apply(void 0, __spread(['_invokeClient', method], args));
|
|
4321
|
-
}
|
|
4322
|
-
/**
|
|
4323
|
-
* Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.
|
|
4324
|
-
*
|
|
4325
|
-
* A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a
|
|
4326
|
-
* new child span within the transaction or any span, call the respective `.startChild()` method.
|
|
4327
|
-
*
|
|
4328
|
-
* Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.
|
|
4329
|
-
*
|
|
4330
|
-
* The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its
|
|
4331
|
-
* finished child spans will be sent to Sentry.
|
|
4332
|
-
*
|
|
4333
|
-
* @param context Properties of the new `Transaction`.
|
|
4334
|
-
* @param customSamplingContext Information given to the transaction sampling function (along with context-dependent
|
|
4335
|
-
* default values). See {@link Options.tracesSampler}.
|
|
4336
|
-
*
|
|
4337
|
-
* @returns The transaction which was just started
|
|
4338
|
-
*/
|
|
4339
|
-
function startTransaction(context, customSamplingContext) {
|
|
4340
|
-
return callOnHub('startTransaction', __assign({}, context), customSamplingContext);
|
|
4341
|
-
}
|
|
4342
3544
|
|
|
4343
3545
|
var SENTRY_API_VERSION = '7';
|
|
4344
3546
|
/**
|
|
@@ -5429,12 +4631,6 @@ var InboundFilters = /** @class */ (function () {
|
|
|
5429
4631
|
return InboundFilters;
|
|
5430
4632
|
}());
|
|
5431
4633
|
|
|
5432
|
-
const CoreIntegrations = /*#__PURE__*/Object.freeze({
|
|
5433
|
-
__proto__: null,
|
|
5434
|
-
FunctionToString: FunctionToString,
|
|
5435
|
-
InboundFilters: InboundFilters
|
|
5436
|
-
});
|
|
5437
|
-
|
|
5438
4634
|
/**
|
|
5439
4635
|
* This was originally forked from https://github.com/occ/TraceKit, but has since been
|
|
5440
4636
|
* largely modified and is now maintained as part of Sentry JS SDK.
|
|
@@ -6402,7 +5598,7 @@ function ignoreNextOnError() {
|
|
|
6402
5598
|
* @returns The wrapped function.
|
|
6403
5599
|
* @hidden
|
|
6404
5600
|
*/
|
|
6405
|
-
function wrap
|
|
5601
|
+
function wrap(fn, options, before) {
|
|
6406
5602
|
if (options === void 0) { options = {}; }
|
|
6407
5603
|
if (typeof fn !== 'function') {
|
|
6408
5604
|
return fn;
|
|
@@ -6432,7 +5628,7 @@ function wrap$1(fn, options, before) {
|
|
|
6432
5628
|
before.apply(this, arguments);
|
|
6433
5629
|
}
|
|
6434
5630
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
|
|
6435
|
-
var wrappedArguments = args.map(function (arg) { return wrap
|
|
5631
|
+
var wrappedArguments = args.map(function (arg) { return wrap(arg, options); });
|
|
6436
5632
|
if (fn.handleEvent) {
|
|
6437
5633
|
// Attempt to invoke user-land function
|
|
6438
5634
|
// NOTE: If you are a Sentry user, and you are seeing this stack frame, it
|
|
@@ -6806,7 +6002,7 @@ var TryCatch = /** @class */ (function () {
|
|
|
6806
6002
|
args[_i] = arguments[_i];
|
|
6807
6003
|
}
|
|
6808
6004
|
var originalCallback = args[0];
|
|
6809
|
-
args[0] = wrap
|
|
6005
|
+
args[0] = wrap(originalCallback, {
|
|
6810
6006
|
mechanism: {
|
|
6811
6007
|
data: { function: getFunctionName(original) },
|
|
6812
6008
|
handled: true,
|
|
@@ -6822,7 +6018,7 @@ var TryCatch = /** @class */ (function () {
|
|
|
6822
6018
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6823
6019
|
return function (callback) {
|
|
6824
6020
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
6825
|
-
return original.call(this, wrap
|
|
6021
|
+
return original.call(this, wrap(callback, {
|
|
6826
6022
|
mechanism: {
|
|
6827
6023
|
data: {
|
|
6828
6024
|
function: 'requestAnimationFrame',
|
|
@@ -6848,7 +6044,7 @@ var TryCatch = /** @class */ (function () {
|
|
|
6848
6044
|
return function (eventName, fn, options) {
|
|
6849
6045
|
try {
|
|
6850
6046
|
if (typeof fn.handleEvent === 'function') {
|
|
6851
|
-
fn.handleEvent = wrap
|
|
6047
|
+
fn.handleEvent = wrap(fn.handleEvent.bind(fn), {
|
|
6852
6048
|
mechanism: {
|
|
6853
6049
|
data: {
|
|
6854
6050
|
function: 'handleEvent',
|
|
@@ -6866,7 +6062,7 @@ var TryCatch = /** @class */ (function () {
|
|
|
6866
6062
|
}
|
|
6867
6063
|
return original.call(this, eventName,
|
|
6868
6064
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6869
|
-
wrap
|
|
6065
|
+
wrap(fn, {
|
|
6870
6066
|
mechanism: {
|
|
6871
6067
|
data: {
|
|
6872
6068
|
function: 'addEventListener',
|
|
@@ -6943,7 +6139,7 @@ var TryCatch = /** @class */ (function () {
|
|
|
6943
6139
|
wrapOptions.mechanism.data.handler = getFunctionName(original.__sentry_original__);
|
|
6944
6140
|
}
|
|
6945
6141
|
// Otherwise wrap directly
|
|
6946
|
-
return wrap
|
|
6142
|
+
return wrap(original, wrapOptions);
|
|
6947
6143
|
});
|
|
6948
6144
|
}
|
|
6949
6145
|
});
|
|
@@ -7480,16 +6676,6 @@ var Dedupe = /** @class */ (function () {
|
|
|
7480
6676
|
return Dedupe;
|
|
7481
6677
|
}());
|
|
7482
6678
|
|
|
7483
|
-
const BrowserIntegrations = /*#__PURE__*/Object.freeze({
|
|
7484
|
-
__proto__: null,
|
|
7485
|
-
GlobalHandlers: GlobalHandlers,
|
|
7486
|
-
TryCatch: TryCatch,
|
|
7487
|
-
Breadcrumbs: Breadcrumbs,
|
|
7488
|
-
LinkedErrors: LinkedErrors,
|
|
7489
|
-
UserAgent: UserAgent,
|
|
7490
|
-
Dedupe: Dedupe
|
|
7491
|
-
});
|
|
7492
|
-
|
|
7493
6679
|
/**
|
|
7494
6680
|
* The Sentry Browser SDK Client.
|
|
7495
6681
|
*
|
|
@@ -7648,91 +6834,6 @@ function init(options) {
|
|
|
7648
6834
|
startSessionTracking();
|
|
7649
6835
|
}
|
|
7650
6836
|
}
|
|
7651
|
-
/**
|
|
7652
|
-
* Present the user with a report dialog.
|
|
7653
|
-
*
|
|
7654
|
-
* @param options Everything is optional, we try to fetch all info need from the global scope.
|
|
7655
|
-
*/
|
|
7656
|
-
function showReportDialog(options) {
|
|
7657
|
-
if (options === void 0) { options = {}; }
|
|
7658
|
-
var hub = getCurrentHub();
|
|
7659
|
-
var scope = hub.getScope();
|
|
7660
|
-
if (scope) {
|
|
7661
|
-
options.user = __assign(__assign({}, scope.getUser()), options.user);
|
|
7662
|
-
}
|
|
7663
|
-
if (!options.eventId) {
|
|
7664
|
-
options.eventId = hub.lastEventId();
|
|
7665
|
-
}
|
|
7666
|
-
var client = hub.getClient();
|
|
7667
|
-
if (client) {
|
|
7668
|
-
client.showReportDialog(options);
|
|
7669
|
-
}
|
|
7670
|
-
}
|
|
7671
|
-
/**
|
|
7672
|
-
* This is the getter for lastEventId.
|
|
7673
|
-
*
|
|
7674
|
-
* @returns The last event id of a captured event.
|
|
7675
|
-
*/
|
|
7676
|
-
function lastEventId() {
|
|
7677
|
-
return getCurrentHub().lastEventId();
|
|
7678
|
-
}
|
|
7679
|
-
/**
|
|
7680
|
-
* This function is here to be API compatible with the loader.
|
|
7681
|
-
* @hidden
|
|
7682
|
-
*/
|
|
7683
|
-
function forceLoad() {
|
|
7684
|
-
// Noop
|
|
7685
|
-
}
|
|
7686
|
-
/**
|
|
7687
|
-
* This function is here to be API compatible with the loader.
|
|
7688
|
-
* @hidden
|
|
7689
|
-
*/
|
|
7690
|
-
function onLoad(callback) {
|
|
7691
|
-
callback();
|
|
7692
|
-
}
|
|
7693
|
-
/**
|
|
7694
|
-
* Call `flush()` on the current client, if there is one. See {@link Client.flush}.
|
|
7695
|
-
*
|
|
7696
|
-
* @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause
|
|
7697
|
-
* the client to wait until all events are sent before resolving the promise.
|
|
7698
|
-
* @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
|
|
7699
|
-
* doesn't (or if there's no client defined).
|
|
7700
|
-
*/
|
|
7701
|
-
function flush(timeout) {
|
|
7702
|
-
var client = getCurrentHub().getClient();
|
|
7703
|
-
if (client) {
|
|
7704
|
-
return client.flush(timeout);
|
|
7705
|
-
}
|
|
7706
|
-
logger.warn('Cannot flush events. No client defined.');
|
|
7707
|
-
return SyncPromise.resolve(false);
|
|
7708
|
-
}
|
|
7709
|
-
/**
|
|
7710
|
-
* Call `close()` on the current client, if there is one. See {@link Client.close}.
|
|
7711
|
-
*
|
|
7712
|
-
* @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this
|
|
7713
|
-
* parameter will cause the client to wait until all events are sent before disabling itself.
|
|
7714
|
-
* @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
|
|
7715
|
-
* doesn't (or if there's no client defined).
|
|
7716
|
-
*/
|
|
7717
|
-
function close(timeout) {
|
|
7718
|
-
var client = getCurrentHub().getClient();
|
|
7719
|
-
if (client) {
|
|
7720
|
-
return client.close(timeout);
|
|
7721
|
-
}
|
|
7722
|
-
logger.warn('Cannot flush events and disable SDK. No client defined.');
|
|
7723
|
-
return SyncPromise.resolve(false);
|
|
7724
|
-
}
|
|
7725
|
-
/**
|
|
7726
|
-
* Wrap code within a try/catch block so the SDK is able to capture errors.
|
|
7727
|
-
*
|
|
7728
|
-
* @param fn A function to wrap.
|
|
7729
|
-
*
|
|
7730
|
-
* @returns The result of wrapped function call.
|
|
7731
|
-
*/
|
|
7732
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7733
|
-
function wrap(fn) {
|
|
7734
|
-
return wrap$1(fn)();
|
|
7735
|
-
}
|
|
7736
6837
|
/**
|
|
7737
6838
|
* Enable automatic Session Tracking for the initial page load.
|
|
7738
6839
|
*/
|
|
@@ -7774,17 +6875,6 @@ function startSessionTracking() {
|
|
|
7774
6875
|
});
|
|
7775
6876
|
}
|
|
7776
6877
|
|
|
7777
|
-
// TODO: Remove in the next major release and rely only on @sentry/core SDK_VERSION and SdkInfo metadata
|
|
7778
|
-
var SDK_NAME = 'sentry.javascript.browser';
|
|
7779
|
-
|
|
7780
|
-
var windowIntegrations = {};
|
|
7781
|
-
// This block is needed to add compatibility with the integrations packages when used with a CDN
|
|
7782
|
-
var _window = getGlobalObject();
|
|
7783
|
-
if (_window.Sentry && _window.Sentry.Integrations) {
|
|
7784
|
-
windowIntegrations = _window.Sentry.Integrations;
|
|
7785
|
-
}
|
|
7786
|
-
var INTEGRATIONS = __assign(__assign(__assign({}, windowIntegrations), CoreIntegrations), BrowserIntegrations);
|
|
7787
|
-
|
|
7788
6878
|
const getExeptionValues = (event) => { var _a, _b; return (_b = (_a = event === null || event === void 0 ? void 0 : event.exception) === null || _a === void 0 ? void 0 : _a.values) !== null && _b !== void 0 ? _b : []; };
|
|
7789
6879
|
const getExeptionStackFrames = (exeption) => { var _a, _b; return (_b = (_a = exeption === null || exeption === void 0 ? void 0 : exeption.stacktrace) === null || _a === void 0 ? void 0 : _a.frames) !== null && _b !== void 0 ? _b : []; };
|
|
7790
6880
|
const filterStackFrameByFilename = (query) => (frame) => {
|
|
@@ -7803,8 +6893,8 @@ const filterInternalExeptions = (event) => {
|
|
|
7803
6893
|
const setupSentry = () => {
|
|
7804
6894
|
init({
|
|
7805
6895
|
dsn: "https://70bcf561598b44148bd3cabc7c142a6c@o1015876.ingest.sentry.io/5983034",
|
|
7806
|
-
release: `${Env.packageName}@${Env.packageVersion}`,
|
|
7807
|
-
environment: Env.environment,
|
|
6896
|
+
release: `${index.Env.packageName}@${index.Env.packageVersion}`,
|
|
6897
|
+
environment: index.Env.environment,
|
|
7808
6898
|
tracesSampleRate: 0.0,
|
|
7809
6899
|
maxBreadcrumbs: 4,
|
|
7810
6900
|
beforeSend: filterInternalExeptions,
|
|
@@ -7819,4 +6909,4 @@ function appGlobalScript () {
|
|
|
7819
6909
|
|
|
7820
6910
|
const globalScripts = appGlobalScript;
|
|
7821
6911
|
|
|
7822
|
-
|
|
6912
|
+
exports.globalScripts = globalScripts;
|