@powerhousedao/connect 5.0.0-staging.9 → 5.0.1-staging.10
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/.env → .env} +4 -6
- package/README.md +3 -4
- package/assets/icon.icns +0 -0
- package/assets/icon.ico +0 -0
- package/assets/icon.png +0 -0
- package/assets/icons/Atlas-Logomark.svg +24 -0
- package/assets/icons/BBP-logo-hover-dark.svg +14 -0
- package/assets/icons/BBP-logo-hover-light.svg +14 -0
- package/assets/icons/BBP-logo-main.svg +14 -0
- package/assets/icons/collapse.svg +7 -0
- package/assets/icons/connect-small.svg +3 -0
- package/assets/icons/connect.svg +16 -0
- package/assets/icons/cross.svg +4 -0
- package/assets/icons/dark.svg +5 -0
- package/assets/icons/draft.svg +3 -0
- package/assets/icons/file.svg +3 -0
- package/assets/icons/file2.svg +10 -0
- package/assets/icons/folder.svg +3 -0
- package/assets/icons/light.svg +20 -0
- package/assets/icons/logo.svg +11 -0
- package/assets/icons/plus-circle.svg +5 -0
- package/assets/icons/refresh.svg +4 -0
- package/assets/icons/renown.svg +27 -0
- package/assets/icons/settings.svg +6 -0
- package/assets/icons/template.svg +3 -0
- package/assets/info.plist +85 -0
- package/dist/assets/AddDriveModal-_VEckfgs.js +1 -0
- package/dist/assets/ClearStorageModal-BIEumLFB.js +1 -0
- package/dist/assets/CookiesPolicyModal-DxXlDzMD.js +1 -0
- package/dist/assets/CreateDocumentModal-i8Mn-zHZ.js +1 -0
- package/dist/assets/DebugSettingsModal-B7_0MfyY.js +1 -0
- package/dist/assets/DeleteDriveModal-Z_QkBHwL.js +1 -0
- package/dist/assets/DeleteItemModal-PX5rpWQp.js +1 -0
- package/dist/assets/DisclaimerModal-DnyAi8SY.js +1 -0
- package/dist/assets/DriveSettingsModal-CKBxDPF4.js +1 -0
- package/dist/assets/ExportDocumentWithErrorsModal-PwfR0wZb.js +1 -0
- package/dist/assets/SettingsModal-CvlSE5u_.js +1 -0
- package/dist/assets/UpgradeDriveModal-C5OBv8od.js +1 -0
- package/dist/assets/config-CU-aFfVJ.js +1 -0
- package/dist/assets/design_system-wkSa2XkO.js +45 -0
- package/dist/assets/design_system_connect-KiHH4lsC.js +45 -0
- package/dist/assets/design_system_ui-yn9Bp8-M.js +1 -0
- package/dist/assets/document_drive-BEIKnuGM.js +305 -0
- package/dist/assets/document_engineering-DwkL4RC_.js +1 -0
- package/dist/assets/document_model-DXcLJEjZ.js +230 -0
- package/dist/assets/document_model_editor-Dzl0xzA_.js +23 -0
- package/dist/assets/drive_explorer-BXnew3vz.js +2 -0
- package/dist/assets/graphql-BS4Brs_E.js +75 -0
- package/dist/assets/graphql-editor-CYvFkX8-.js +73 -0
- package/dist/assets/graphql_request-9RNJ00DB.js +3 -0
- package/dist/assets/hmr-LMNkvzP7.js +1 -0
- package/dist/assets/hooks-D1J714hY.js +12 -0
- package/dist/assets/index-2InhLUpC.js +18 -0
- package/dist/assets/index-Br7E7qjt.css +1 -0
- package/dist/assets/json-editor-Meugtes8.js +1 -0
- package/dist/assets/react/jsx-runtime-DldvXD6N.js +1 -0
- package/dist/assets/react-DQSxOgtG.js +1 -0
- package/dist/assets/react-dom/client-BVPiT_FE.js +9 -0
- package/dist/assets/react-dom-D6zQJsh6.js +1 -0
- package/dist/assets/reactor_browser-CSyNHuU2.js +25 -0
- package/dist/assets/sentry_browser-B4YoBIIG.js +498 -0
- package/dist/assets/sentry_react-cODD7zWc.js +3 -0
- package/dist/assets/state-schemas-Dq1fQPOB.js +2 -0
- package/dist/assets/tailwind_merge-Dr4f9Rms.js +1 -0
- package/dist/assets/virtual_ph_external-packages-CM1tCR4L.js +1 -0
- package/dist/assets/zod-C6yxFxyo.js +1 -0
- package/dist/index.html +51 -75
- package/heroku/Dockerfile +98 -0
- package/heroku/Procfile +1 -0
- package/heroku/config/nginx.conf.template +77 -0
- package/heroku/heroku-entrypoint.sh +38 -0
- package/lib/cypress/e2e/navigation.cy.d.ts +2 -0
- package/lib/cypress/e2e/navigation.cy.d.ts.map +1 -0
- package/lib/cypress/e2e/navigation.cy.js +221 -0
- package/lib/cypress/e2e/navigation.cy.js.map +1 -0
- package/lib/cypress/e2e/utils/index.d.ts +15 -0
- package/lib/cypress/e2e/utils/index.d.ts.map +1 -0
- package/lib/cypress/e2e/utils/index.js +121 -0
- package/lib/cypress/e2e/utils/index.js.map +1 -0
- package/lib/cypress/support/commands.d.ts +2 -0
- package/lib/cypress/support/commands.d.ts.map +1 -0
- package/lib/cypress/support/commands.js +29 -0
- package/lib/cypress/support/commands.js.map +1 -0
- package/lib/cypress/support/e2e.d.ts +2 -0
- package/lib/cypress/support/e2e.d.ts.map +1 -0
- package/lib/cypress/support/e2e.js +19 -0
- package/lib/cypress/support/e2e.js.map +1 -0
- package/lib/cypress.config.d.ts +3 -0
- package/lib/cypress.config.d.ts.map +1 -0
- package/lib/cypress.config.js +15 -0
- package/lib/cypress.config.js.map +1 -0
- package/lib/package.copy.json +165 -0
- package/lib/scripts/render-skeleton.d.ts +2 -0
- package/lib/scripts/render-skeleton.d.ts.map +1 -0
- package/lib/scripts/render-skeleton.js +11 -0
- package/lib/scripts/render-skeleton.js.map +1 -0
- package/lib/src/components/analytics.d.ts +8 -0
- package/lib/src/components/analytics.d.ts.map +1 -0
- package/lib/src/components/analytics.js +30 -0
- package/lib/src/components/analytics.js.map +1 -0
- package/lib/src/components/app-loader.d.ts +7 -0
- package/lib/src/components/app-loader.d.ts.map +1 -0
- package/lib/src/components/app-loader.js +20 -0
- package/lib/src/components/app-loader.js.map +1 -0
- package/lib/src/components/app-skeleton.d.ts +3 -0
- package/lib/src/components/app-skeleton.d.ts.map +1 -0
- package/lib/src/components/app-skeleton.js +38 -0
- package/lib/src/components/app-skeleton.js.map +1 -0
- package/lib/src/components/app.d.ts +2 -0
- package/lib/src/components/app.d.ts.map +1 -0
- package/lib/src/components/app.js +18 -0
- package/lib/src/components/app.js.map +1 -0
- package/lib/src/components/button.d.ts +3 -0
- package/lib/src/components/button.d.ts.map +1 -0
- package/lib/src/components/button.js +7 -0
- package/lib/src/components/button.js.map +1 -0
- package/lib/src/components/cookie-banner.d.ts +2 -0
- package/lib/src/components/cookie-banner.d.ts.map +1 -0
- package/lib/src/components/cookie-banner.js +48 -0
- package/lib/src/components/cookie-banner.js.map +1 -0
- package/lib/src/components/document-editor-container.d.ts +2 -0
- package/lib/src/components/document-editor-container.d.ts.map +1 -0
- package/lib/src/components/document-editor-container.js +62 -0
- package/lib/src/components/document-editor-container.js.map +1 -0
- package/lib/src/components/dots-loader.d.ts +2 -0
- package/lib/src/components/dots-loader.d.ts.map +1 -0
- package/lib/src/components/dots-loader.js +15 -0
- package/lib/src/components/dots-loader.js.map +1 -0
- package/lib/src/components/drive-editor-container.d.ts +2 -0
- package/lib/src/components/drive-editor-container.d.ts.map +1 -0
- package/lib/src/components/drive-editor-container.js +25 -0
- package/lib/src/components/drive-editor-container.js.map +1 -0
- package/lib/src/components/drive-icon.d.ts +5 -0
- package/lib/src/components/drive-icon.d.ts.map +1 -0
- package/lib/src/components/drive-icon.js +15 -0
- package/lib/src/components/drive-icon.js.map +1 -0
- package/lib/src/components/editor-loader.d.ts +9 -0
- package/lib/src/components/editor-loader.d.ts.map +1 -0
- package/lib/src/components/editor-loader.js +19 -0
- package/lib/src/components/editor-loader.js.map +1 -0
- package/lib/src/components/editors.d.ts +10 -0
- package/lib/src/components/editors.d.ts.map +1 -0
- package/lib/src/components/editors.js +93 -0
- package/lib/src/components/editors.js.map +1 -0
- package/lib/src/components/footer.d.ts +2 -0
- package/lib/src/components/footer.d.ts.map +1 -0
- package/lib/src/components/footer.js +16 -0
- package/lib/src/components/footer.js.map +1 -0
- package/lib/src/components/index.d.ts +22 -0
- package/lib/src/components/index.d.ts.map +1 -0
- package/lib/src/components/index.js +22 -0
- package/lib/src/components/index.js.map +1 -0
- package/lib/src/components/login.d.ts +2 -0
- package/lib/src/components/login.d.ts.map +1 -0
- package/lib/src/components/login.js +12 -0
- package/lib/src/components/login.js.map +1 -0
- package/lib/src/components/modal/index.d.ts +19 -0
- package/lib/src/components/modal/index.d.ts.map +1 -0
- package/lib/src/components/modal/index.js +19 -0
- package/lib/src/components/modal/index.js.map +1 -0
- package/lib/src/components/modal/modals/AddDriveModal.d.ts +2 -0
- package/lib/src/components/modal/modals/AddDriveModal.d.ts.map +1 -0
- package/lib/src/components/modal/modals/AddDriveModal.js +113 -0
- package/lib/src/components/modal/modals/AddDriveModal.js.map +1 -0
- package/lib/src/components/modal/modals/ClearStorageModal.d.ts +2 -0
- package/lib/src/components/modal/modals/ClearStorageModal.d.ts.map +1 -0
- package/lib/src/components/modal/modals/ClearStorageModal.js +35 -0
- package/lib/src/components/modal/modals/ClearStorageModal.js.map +1 -0
- package/lib/src/components/modal/modals/CookiesPolicyModal.d.ts +2 -0
- package/lib/src/components/modal/modals/CookiesPolicyModal.d.ts.map +1 -0
- package/lib/src/components/modal/modals/CookiesPolicyModal.js +16 -0
- package/lib/src/components/modal/modals/CookiesPolicyModal.js.map +1 -0
- package/lib/src/components/modal/modals/CreateDocumentModal.d.ts +2 -0
- package/lib/src/components/modal/modals/CreateDocumentModal.d.ts.map +1 -0
- package/lib/src/components/modal/modals/CreateDocumentModal.js +24 -0
- package/lib/src/components/modal/modals/CreateDocumentModal.js.map +1 -0
- package/lib/src/components/modal/modals/DebugSettingsModal.d.ts +2 -0
- package/lib/src/components/modal/modals/DebugSettingsModal.d.ts.map +1 -0
- package/lib/src/components/modal/modals/DebugSettingsModal.js +108 -0
- package/lib/src/components/modal/modals/DebugSettingsModal.js.map +1 -0
- package/lib/src/components/modal/modals/DeleteDriveModal.d.ts +2 -0
- package/lib/src/components/modal/modals/DeleteDriveModal.d.ts.map +1 -0
- package/lib/src/components/modal/modals/DeleteDriveModal.js +32 -0
- package/lib/src/components/modal/modals/DeleteDriveModal.js.map +1 -0
- package/lib/src/components/modal/modals/DeleteItemModal.d.ts +3 -0
- package/lib/src/components/modal/modals/DeleteItemModal.d.ts.map +1 -0
- package/lib/src/components/modal/modals/DeleteItemModal.js +33 -0
- package/lib/src/components/modal/modals/DeleteItemModal.js.map +1 -0
- package/lib/src/components/modal/modals/DisclaimerModal.d.ts +3 -0
- package/lib/src/components/modal/modals/DisclaimerModal.d.ts.map +1 -0
- package/lib/src/components/modal/modals/DisclaimerModal.js +12 -0
- package/lib/src/components/modal/modals/DisclaimerModal.js.map +1 -0
- package/lib/src/components/modal/modals/DriveSettingsModal.d.ts +2 -0
- package/lib/src/components/modal/modals/DriveSettingsModal.d.ts.map +1 -0
- package/lib/src/components/modal/modals/DriveSettingsModal.js +28 -0
- package/lib/src/components/modal/modals/DriveSettingsModal.js.map +1 -0
- package/lib/src/components/modal/modals/ExportDocumentWithErrorsModal.d.ts +2 -0
- package/lib/src/components/modal/modals/ExportDocumentWithErrorsModal.d.ts.map +1 -0
- package/lib/src/components/modal/modals/ExportDocumentWithErrorsModal.js +30 -0
- package/lib/src/components/modal/modals/ExportDocumentWithErrorsModal.js.map +1 -0
- package/lib/src/components/modal/modals/SettingsModal.d.ts +3 -0
- package/lib/src/components/modal/modals/SettingsModal.d.ts.map +1 -0
- package/lib/src/components/modal/modals/SettingsModal.js +45 -0
- package/lib/src/components/modal/modals/SettingsModal.js.map +1 -0
- package/lib/src/components/modal/modals/UpgradeDriveModal.d.ts +3 -0
- package/lib/src/components/modal/modals/UpgradeDriveModal.d.ts.map +1 -0
- package/lib/src/components/modal/modals/UpgradeDriveModal.js +21 -0
- package/lib/src/components/modal/modals/UpgradeDriveModal.js.map +1 -0
- package/lib/src/components/modal/modals/settings/about.d.ts +2 -0
- package/lib/src/components/modal/modals/settings/about.d.ts.map +1 -0
- package/lib/src/components/modal/modals/settings/about.js +10 -0
- package/lib/src/components/modal/modals/settings/about.js.map +1 -0
- package/lib/src/components/modal/modals/settings/danger-zone.d.ts +2 -0
- package/lib/src/components/modal/modals/settings/danger-zone.d.ts.map +1 -0
- package/lib/src/components/modal/modals/settings/danger-zone.js +15 -0
- package/lib/src/components/modal/modals/settings/danger-zone.js.map +1 -0
- package/lib/src/components/modal/modals/settings/default-editor.d.ts +2 -0
- package/lib/src/components/modal/modals/settings/default-editor.d.ts.map +1 -0
- package/lib/src/components/modal/modals/settings/default-editor.js +18 -0
- package/lib/src/components/modal/modals/settings/default-editor.js.map +1 -0
- package/lib/src/components/modal/modals/settings/package-manager.d.ts +3 -0
- package/lib/src/components/modal/modals/settings/package-manager.d.ts.map +1 -0
- package/lib/src/components/modal/modals/settings/package-manager.js +87 -0
- package/lib/src/components/modal/modals/settings/package-manager.js.map +1 -0
- package/lib/src/components/modal/modals-container.d.ts +2 -0
- package/lib/src/components/modal/modals-container.d.ts.map +1 -0
- package/lib/src/components/modal/modals-container.js +62 -0
- package/lib/src/components/modal/modals-container.js.map +1 -0
- package/lib/src/components/modal/modals-error-boundary.d.ts +18 -0
- package/lib/src/components/modal/modals-error-boundary.d.ts.map +1 -0
- package/lib/src/components/modal/modals-error-boundary.js +22 -0
- package/lib/src/components/modal/modals-error-boundary.js.map +1 -0
- package/lib/src/components/ph-logo.d.ts +2 -0
- package/lib/src/components/ph-logo.d.ts.map +1 -0
- package/lib/src/components/ph-logo.js +7 -0
- package/lib/src/components/ph-logo.js.map +1 -0
- package/lib/src/components/reload-connect-toast.d.ts +2 -0
- package/lib/src/components/reload-connect-toast.d.ts.map +1 -0
- package/lib/src/components/reload-connect-toast.js +7 -0
- package/lib/src/components/reload-connect-toast.js.map +1 -0
- package/lib/src/components/root.d.ts +2 -0
- package/lib/src/components/root.d.ts.map +1 -0
- package/lib/src/components/root.js +8 -0
- package/lib/src/components/root.js.map +1 -0
- package/lib/src/components/router.d.ts +2 -0
- package/lib/src/components/router.d.ts.map +1 -0
- package/lib/src/components/router.js +41 -0
- package/lib/src/components/router.js.map +1 -0
- package/lib/src/components/search-bar.d.ts +2 -0
- package/lib/src/components/search-bar.d.ts.map +1 -0
- package/lib/src/components/search-bar.js +36 -0
- package/lib/src/components/search-bar.js.map +1 -0
- package/lib/src/components/sidebar.d.ts +2 -0
- package/lib/src/components/sidebar.d.ts.map +1 -0
- package/lib/src/components/sidebar.js +27 -0
- package/lib/src/components/sidebar.js.map +1 -0
- package/lib/src/connect.config.d.ts +113 -0
- package/lib/src/connect.config.d.ts.map +1 -0
- package/lib/src/connect.config.js +147 -0
- package/lib/src/connect.config.js.map +1 -0
- package/lib/src/context/index.d.ts +4 -0
- package/lib/src/context/index.d.ts.map +1 -0
- package/lib/src/context/index.js +4 -0
- package/lib/src/context/index.js.map +1 -0
- package/lib/src/context/processor-manager.d.ts +3 -0
- package/lib/src/context/processor-manager.d.ts.map +1 -0
- package/lib/src/context/processor-manager.js +189 -0
- package/lib/src/context/processor-manager.js.map +1 -0
- package/lib/src/context/read-mode.d.ts +2 -0
- package/lib/src/context/read-mode.d.ts.map +1 -0
- package/lib/src/context/read-mode.js +219 -0
- package/lib/src/context/read-mode.js.map +1 -0
- package/lib/src/context/sentry-provider.d.ts +6 -0
- package/lib/src/context/sentry-provider.d.ts.map +1 -0
- package/lib/src/context/sentry-provider.js +6 -0
- package/lib/src/context/sentry-provider.js.map +1 -0
- package/lib/src/feature-flags.d.ts +34 -0
- package/lib/src/feature-flags.d.ts.map +1 -0
- package/lib/src/feature-flags.js +124 -0
- package/lib/src/feature-flags.js.map +1 -0
- package/lib/src/globals.d.ts +9 -0
- package/lib/src/globals.d.ts.map +1 -0
- package/lib/src/globals.js +2 -0
- package/lib/src/globals.js.map +1 -0
- package/lib/src/hmr.d.ts +3 -0
- package/lib/src/hmr.d.ts.map +1 -0
- package/lib/src/hmr.js +2 -0
- package/lib/src/hmr.js.map +1 -0
- package/lib/src/hooks/index.d.ts +10 -0
- package/lib/src/hooks/index.d.ts.map +1 -0
- package/lib/src/hooks/index.js +10 -0
- package/lib/src/hooks/index.js.map +1 -0
- package/lib/src/hooks/useAcceptedCookies.d.ts +9 -0
- package/lib/src/hooks/useAcceptedCookies.d.ts.map +1 -0
- package/lib/src/hooks/useAcceptedCookies.js +34 -0
- package/lib/src/hooks/useAcceptedCookies.js.map +1 -0
- package/lib/src/hooks/useCheckLatestVersion.d.ts +2 -0
- package/lib/src/hooks/useCheckLatestVersion.d.ts.map +1 -0
- package/lib/src/hooks/useCheckLatestVersion.js +33 -0
- package/lib/src/hooks/useCheckLatestVersion.js.map +1 -0
- package/lib/src/hooks/useClientErrorHandler.d.ts +6 -0
- package/lib/src/hooks/useClientErrorHandler.d.ts.map +1 -0
- package/lib/src/hooks/useClientErrorHandler.js +120 -0
- package/lib/src/hooks/useClientErrorHandler.js.map +1 -0
- package/lib/src/hooks/useCookieBanner.d.ts +5 -0
- package/lib/src/hooks/useCookieBanner.d.ts.map +1 -0
- package/lib/src/hooks/useCookieBanner.js +32 -0
- package/lib/src/hooks/useCookieBanner.js.map +1 -0
- package/lib/src/hooks/useInitSentry.d.ts +2 -0
- package/lib/src/hooks/useInitSentry.d.ts.map +1 -0
- package/lib/src/hooks/useInitSentry.js +80 -0
- package/lib/src/hooks/useInitSentry.js.map +1 -0
- package/lib/src/hooks/useNodeActions.d.ts +6 -0
- package/lib/src/hooks/useNodeActions.d.ts.map +1 -0
- package/lib/src/hooks/useNodeActions.js +35 -0
- package/lib/src/hooks/useNodeActions.js.map +1 -0
- package/lib/src/hooks/useUndoRedoShortcuts.d.ts +8 -0
- package/lib/src/hooks/useUndoRedoShortcuts.d.ts.map +1 -0
- package/lib/src/hooks/useUndoRedoShortcuts.js +26 -0
- package/lib/src/hooks/useUndoRedoShortcuts.js.map +1 -0
- package/lib/src/hooks/useWindowSize.d.ts +5 -0
- package/lib/src/hooks/useWindowSize.d.ts.map +1 -0
- package/lib/src/hooks/useWindowSize.js +21 -0
- package/lib/src/hooks/useWindowSize.js.map +1 -0
- package/lib/src/hooks/utils.d.ts +7 -0
- package/lib/src/hooks/utils.d.ts.map +1 -0
- package/lib/src/hooks/utils.js +46 -0
- package/lib/src/hooks/utils.js.map +1 -0
- package/lib/src/i18n/index.d.ts +4 -0
- package/lib/src/i18n/index.d.ts.map +1 -0
- package/lib/src/i18n/index.js +26 -0
- package/lib/src/i18n/index.js.map +1 -0
- package/lib/src/i18n/locales/en.json +114 -0
- package/lib/src/index.d.ts +2 -0
- package/lib/src/index.d.ts.map +1 -0
- package/lib/src/index.js +2 -0
- package/lib/src/index.js.map +1 -0
- package/lib/src/main.d.ts +2 -0
- package/lib/src/main.d.ts.map +1 -0
- package/lib/src/main.js +5 -0
- package/lib/src/main.js.map +1 -0
- package/lib/src/pages/content.d.ts +2 -0
- package/lib/src/pages/content.d.ts.map +1 -0
- package/lib/src/pages/content.js +39 -0
- package/lib/src/pages/content.js.map +1 -0
- package/lib/src/pages/demo/atlas-import.d.ts +2 -0
- package/lib/src/pages/demo/atlas-import.d.ts.map +1 -0
- package/lib/src/pages/demo/atlas-import.js +122 -0
- package/lib/src/pages/demo/atlas-import.js.map +1 -0
- package/lib/src/pages/index.d.ts +4 -0
- package/lib/src/pages/index.d.ts.map +1 -0
- package/lib/src/pages/index.js +4 -0
- package/lib/src/pages/index.js.map +1 -0
- package/lib/src/pages/settings.d.ts +4 -0
- package/lib/src/pages/settings.d.ts.map +1 -0
- package/lib/src/pages/settings.js +9 -0
- package/lib/src/pages/settings.js.map +1 -0
- package/lib/src/service-worker.d.ts +2 -0
- package/lib/src/service-worker.d.ts.map +1 -0
- package/lib/src/service-worker.js +58 -0
- package/lib/src/service-worker.js.map +1 -0
- package/lib/src/services/hmr.d.ts +13 -0
- package/lib/src/services/hmr.d.ts.map +1 -0
- package/lib/src/services/hmr.js +85 -0
- package/lib/src/services/hmr.js.map +1 -0
- package/lib/src/services/index.d.ts +10 -0
- package/lib/src/services/index.d.ts.map +1 -0
- package/lib/src/services/index.js +9 -0
- package/lib/src/services/index.js.map +1 -0
- package/lib/src/services/logger.d.ts +2 -0
- package/lib/src/services/logger.d.ts.map +1 -0
- package/lib/src/services/logger.js +28 -0
- package/lib/src/services/logger.js.map +1 -0
- package/lib/src/services/renown/browser.d.ts +2 -0
- package/lib/src/services/renown/browser.d.ts.map +1 -0
- package/lib/src/services/renown/browser.js +6 -0
- package/lib/src/services/renown/browser.js.map +1 -0
- package/lib/src/services/renown/constants.d.ts +130 -0
- package/lib/src/services/renown/constants.d.ts.map +1 -0
- package/lib/src/services/renown/constants.js +41 -0
- package/lib/src/services/renown/constants.js.map +1 -0
- package/lib/src/services/renown/utils.d.ts +7 -0
- package/lib/src/services/renown/utils.d.ts.map +1 -0
- package/lib/src/services/renown/utils.js +20 -0
- package/lib/src/services/renown/utils.js.map +1 -0
- package/lib/src/services/storage/base-storage.d.ts +9 -0
- package/lib/src/services/storage/base-storage.d.ts.map +1 -0
- package/lib/src/services/storage/base-storage.js +21 -0
- package/lib/src/services/storage/base-storage.js.map +1 -0
- package/lib/src/services/storage/browser.d.ts +5 -0
- package/lib/src/services/storage/browser.d.ts.map +1 -0
- package/lib/src/services/storage/browser.js +25 -0
- package/lib/src/services/storage/browser.js.map +1 -0
- package/lib/src/services/storage/types.d.ts +6 -0
- package/lib/src/services/storage/types.d.ts.map +1 -0
- package/lib/src/services/storage/types.js +2 -0
- package/lib/src/services/storage/types.js.map +1 -0
- package/lib/src/services/toast.d.ts +8 -0
- package/lib/src/services/toast.d.ts.map +1 -0
- package/lib/src/services/toast.js +11 -0
- package/lib/src/services/toast.js.map +1 -0
- package/lib/src/store/document-model.d.ts +3 -0
- package/lib/src/store/document-model.d.ts.map +1 -0
- package/lib/src/store/document-model.js +79 -0
- package/lib/src/store/document-model.js.map +1 -0
- package/lib/src/store/editor.d.ts +5 -0
- package/lib/src/store/editor.d.ts.map +1 -0
- package/lib/src/store/editor.js +31 -0
- package/lib/src/store/editor.js.map +1 -0
- package/lib/src/store/external-packages.d.ts +4 -0
- package/lib/src/store/external-packages.d.ts.map +1 -0
- package/lib/src/store/external-packages.js +36 -0
- package/lib/src/store/external-packages.js.map +1 -0
- package/lib/src/store/index.d.ts +7 -0
- package/lib/src/store/index.d.ts.map +1 -0
- package/lib/src/store/index.js +7 -0
- package/lib/src/store/index.js.map +1 -0
- package/lib/src/store/reactor.d.ts +3 -0
- package/lib/src/store/reactor.d.ts.map +1 -0
- package/lib/src/store/reactor.js +177 -0
- package/lib/src/store/reactor.js.map +1 -0
- package/lib/src/store/user.d.ts +2 -0
- package/lib/src/store/user.d.ts.map +1 -0
- package/lib/src/store/user.js +16 -0
- package/lib/src/store/user.js.map +1 -0
- package/lib/src/store/utils.d.ts +2 -0
- package/lib/src/store/utils.d.ts.map +1 -0
- package/lib/src/store/utils.js +59 -0
- package/lib/src/store/utils.js.map +1 -0
- package/lib/src/utils/browser.d.ts +2 -0
- package/lib/src/utils/browser.d.ts.map +1 -0
- package/lib/src/utils/browser.js +9 -0
- package/lib/src/utils/browser.js.map +1 -0
- package/lib/src/utils/document-editor-debug-tools.d.ts +17 -0
- package/lib/src/utils/document-editor-debug-tools.d.ts.map +1 -0
- package/lib/src/utils/document-editor-debug-tools.js +55 -0
- package/lib/src/utils/document-editor-debug-tools.js.map +1 -0
- package/lib/src/utils/drive-preservation.d.ts +19 -0
- package/lib/src/utils/drive-preservation.d.ts.map +1 -0
- package/lib/src/utils/drive-preservation.js +51 -0
- package/lib/src/utils/drive-preservation.js.map +1 -0
- package/lib/src/utils/drive-sections.d.ts +31 -0
- package/lib/src/utils/drive-sections.d.ts.map +1 -0
- package/lib/src/utils/drive-sections.js +63 -0
- package/lib/src/utils/drive-sections.js.map +1 -0
- package/lib/src/utils/index.d.ts +12 -0
- package/lib/src/utils/index.d.ts.map +1 -0
- package/lib/src/utils/index.js +12 -0
- package/lib/src/utils/index.js.map +1 -0
- package/lib/src/utils/join.d.ts +2 -0
- package/lib/src/utils/join.d.ts.map +1 -0
- package/lib/src/utils/join.js +11 -0
- package/lib/src/utils/join.js.map +1 -0
- package/lib/src/utils/openUrl.d.ts +2 -0
- package/lib/src/utils/openUrl.d.ts.map +1 -0
- package/lib/src/utils/openUrl.js +3 -0
- package/lib/src/utils/openUrl.js.map +1 -0
- package/lib/src/utils/path.d.ts +4 -0
- package/lib/src/utils/path.d.ts.map +1 -0
- package/lib/src/utils/path.js +17 -0
- package/lib/src/utils/path.js.map +1 -0
- package/lib/src/utils/reactor.d.ts +6 -0
- package/lib/src/utils/reactor.d.ts.map +1 -0
- package/lib/src/utils/reactor.js +57 -0
- package/lib/src/utils/reactor.js.map +1 -0
- package/lib/src/utils/registerServiceWorker.d.ts +12 -0
- package/lib/src/utils/registerServiceWorker.d.ts.map +1 -0
- package/lib/src/utils/registerServiceWorker.js +97 -0
- package/lib/src/utils/registerServiceWorker.js.map +1 -0
- package/lib/src/utils/signature.d.ts +4 -0
- package/lib/src/utils/signature.d.ts.map +1 -0
- package/lib/src/utils/signature.js +36 -0
- package/lib/src/utils/signature.js.map +1 -0
- package/lib/src/utils/slug.d.ts +2 -0
- package/lib/src/utils/slug.d.ts.map +1 -0
- package/lib/src/utils/slug.js +4 -0
- package/lib/src/utils/slug.js.map +1 -0
- package/lib/src/workers/pglite-worker.d.ts +2 -0
- package/lib/src/workers/pglite-worker.d.ts.map +1 -0
- package/lib/src/workers/pglite-worker.js +32 -0
- package/lib/src/workers/pglite-worker.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/vite.config.d.ts +3 -0
- package/lib/vite.config.d.ts.map +1 -0
- package/lib/vite.config.js +55 -0
- package/lib/vite.config.js.map +1 -0
- package/package.copy.json +165 -0
- package/package.json +126 -66
- package/public/icon.ico +0 -0
- package/public/robots.txt +3 -0
- package/public/settings.png +0 -0
- package/scripts/render-skeleton.ts +8 -10
- package/src/index.css +4 -0
- package/dist/assets/AddDriveModal.CsX1V9k8.js +0 -2
- package/dist/assets/AddDriveModal.CsX1V9k8.js.map +0 -1
- package/dist/assets/AddLocalDriveModal.9wlqUaI7.js +0 -2
- package/dist/assets/AddLocalDriveModal.9wlqUaI7.js.map +0 -1
- package/dist/assets/AddRemoteDriveModal.BViKJcIG.js +0 -2
- package/dist/assets/AddRemoteDriveModal.BViKJcIG.js.map +0 -1
- package/dist/assets/ConfirmationModal.Cwd4p-FQ.js +0 -2
- package/dist/assets/ConfirmationModal.Cwd4p-FQ.js.map +0 -1
- package/dist/assets/CookiesPolicyModal.DBYakGYw.js +0 -2
- package/dist/assets/CookiesPolicyModal.DBYakGYw.js.map +0 -1
- package/dist/assets/CreateDocumentModal.BCLwbl_7.js +0 -2
- package/dist/assets/CreateDocumentModal.BCLwbl_7.js.map +0 -1
- package/dist/assets/DebugSettingsModal.C2JfEGKx.js +0 -7
- package/dist/assets/DebugSettingsModal.C2JfEGKx.js.map +0 -1
- package/dist/assets/DeleteDriveModal.ccJLuz-v.js +0 -2
- package/dist/assets/DeleteDriveModal.ccJLuz-v.js.map +0 -1
- package/dist/assets/DeleteItemModal.lxt16WLJ.js +0 -2
- package/dist/assets/DeleteItemModal.lxt16WLJ.js.map +0 -1
- package/dist/assets/DisclaimerModal.YKaHnRz1.js +0 -2
- package/dist/assets/DisclaimerModal.YKaHnRz1.js.map +0 -1
- package/dist/assets/DriveSettingsModal.DUtXh2J3.js +0 -2
- package/dist/assets/DriveSettingsModal.DUtXh2J3.js.map +0 -1
- package/dist/assets/SettingsModal.NCZyx-LZ.js +0 -2
- package/dist/assets/SettingsModal.NCZyx-LZ.js.map +0 -1
- package/dist/assets/UpgradeDriveModal.Bp1cbwzD.js +0 -2
- package/dist/assets/UpgradeDriveModal.Bp1cbwzD.js.map +0 -1
- package/dist/assets/app-form-input.DrsD0P0g.js +0 -2
- package/dist/assets/app-form-input.DrsD0P0g.js.map +0 -1
- package/dist/assets/atlas-import.S0zyqygI.js +0 -6
- package/dist/assets/atlas-import.S0zyqygI.js.map +0 -1
- package/dist/assets/ccip.DbzT2NeK.js +0 -2
- package/dist/assets/ccip.DbzT2NeK.js.map +0 -1
- package/dist/assets/confirmation-modal.BRg1WqhO.js +0 -2
- package/dist/assets/confirmation-modal.BRg1WqhO.js.map +0 -1
- package/dist/assets/content.BwwSwPoU.js +0 -11
- package/dist/assets/content.BwwSwPoU.js.map +0 -1
- package/dist/assets/creators.Beog8W4R.js +0 -2
- package/dist/assets/creators.Beog8W4R.js.map +0 -1
- package/dist/assets/crypto.DdbxIXEQ.js +0 -2
- package/dist/assets/crypto.DdbxIXEQ.js.map +0 -1
- package/dist/assets/disclosure.g6ojAjR7.js +0 -2
- package/dist/assets/disclosure.g6ojAjR7.js.map +0 -1
- package/dist/assets/document.CskU24Eo.js +0 -2
- package/dist/assets/document.CskU24Eo.js.map +0 -1
- package/dist/assets/documents.WANXuQQw.js +0 -2
- package/dist/assets/documents.WANXuQQw.js.map +0 -1
- package/dist/assets/drive-name.f6u15KL9.js +0 -2
- package/dist/assets/drive-name.f6u15KL9.js.map +0 -1
- package/dist/assets/drive.Bwke9qtc.js +0 -2
- package/dist/assets/drive.Bwke9qtc.js.map +0 -1
- package/dist/assets/drives.BT9_cNvB.js +0 -2
- package/dist/assets/drives.BT9_cNvB.js.map +0 -1
- package/dist/assets/drives.CnLEcvUe.js +0 -2
- package/dist/assets/drives.CnLEcvUe.js.map +0 -1
- package/dist/assets/dropdown-menu.CrltaMAi.js +0 -2
- package/dist/assets/dropdown-menu.CrltaMAi.js.map +0 -1
- package/dist/assets/form-input.CKWaNWHS.js +0 -2
- package/dist/assets/form-input.CKWaNWHS.js.map +0 -1
- package/dist/assets/index.B0KswTVc.js +0 -2
- package/dist/assets/index.B0KswTVc.js.map +0 -1
- package/dist/assets/index.B5Jahs6e.js +0 -210
- package/dist/assets/index.B5Jahs6e.js.map +0 -1
- package/dist/assets/index.B_w9kQDS.js +0 -2
- package/dist/assets/index.B_w9kQDS.js.map +0 -1
- package/dist/assets/index.CJhJIgr2.js +0 -5
- package/dist/assets/index.CJhJIgr2.js.map +0 -1
- package/dist/assets/index.CZGlv_DJ.js +0 -2
- package/dist/assets/index.CZGlv_DJ.js.map +0 -1
- package/dist/assets/index.Cy9Uih6l.js +0 -368
- package/dist/assets/index.Cy9Uih6l.js.map +0 -1
- package/dist/assets/index.DgMWNgC4.js +0 -2
- package/dist/assets/index.DgMWNgC4.js.map +0 -1
- package/dist/assets/index.DnmeBfoc.js +0 -2
- package/dist/assets/index.DnmeBfoc.js.map +0 -1
- package/dist/assets/index.LCmAGl8C.js +0 -114
- package/dist/assets/index.LCmAGl8C.js.map +0 -1
- package/dist/assets/index._iE_O567.js +0 -2
- package/dist/assets/index._iE_O567.js.map +0 -1
- package/dist/assets/index.esm.B0PnDknv.js +0 -2
- package/dist/assets/index.esm.B0PnDknv.js.map +0 -1
- package/dist/assets/index.jCXguwyn.js +0 -2
- package/dist/assets/index.jCXguwyn.js.map +0 -1
- package/dist/assets/index.rWEXHbK2.js +0 -2
- package/dist/assets/index.rWEXHbK2.js.map +0 -1
- package/dist/assets/index.rdGjBzAn.js +0 -2
- package/dist/assets/index.rdGjBzAn.js.map +0 -1
- package/dist/assets/location-info.CUOr58bf.js +0 -2
- package/dist/assets/location-info.CUOr58bf.js.map +0 -1
- package/dist/assets/main-BhSHpqSI.css +0 -1
- package/dist/assets/main.DaFo88Bw.js +0 -857
- package/dist/assets/main.DaFo88Bw.js.map +0 -1
- package/dist/assets/modal.oz3Jhm_k.js +0 -6
- package/dist/assets/modal.oz3Jhm_k.js.map +0 -1
- package/dist/assets/modals.Qs6mizxC.js +0 -2
- package/dist/assets/modals.Qs6mizxC.js.map +0 -1
- package/dist/assets/nodefs-CYAJKQhI.js +0 -2
- package/dist/assets/nodefs-CYAJKQhI.js.map +0 -1
- package/dist/assets/nodefs.DhjGeTvv.js +0 -2
- package/dist/assets/nodefs.DhjGeTvv.js.map +0 -1
- package/dist/assets/opfs-ahp-Br3qpBoL.js +0 -4
- package/dist/assets/opfs-ahp-Br3qpBoL.js.map +0 -1
- package/dist/assets/opfs-ahp.r3uiPDIk.js +0 -4
- package/dist/assets/opfs-ahp.r3uiPDIk.js.map +0 -1
- package/dist/assets/options.BWIJIz-I.js +0 -2
- package/dist/assets/options.BWIJIz-I.js.map +0 -1
- package/dist/assets/pglite-worker-DgAiCanq.js +0 -144
- package/dist/assets/pglite-worker-DgAiCanq.js.map +0 -1
- package/dist/assets/pglite-worker.BmajlV4J.js +0 -2
- package/dist/assets/pglite-worker.BmajlV4J.js.map +0 -1
- package/dist/assets/postgres-CkP7QCDB.data +0 -0
- package/dist/assets/postgres-CyuUVpXN.wasm +0 -0
- package/dist/assets/queue.CnIzwthA.js +0 -2
- package/dist/assets/queue.CnIzwthA.js.map +0 -1
- package/dist/assets/read-required-modal.DpPnKHjB.js +0 -2
- package/dist/assets/read-required-modal.DpPnKHjB.js.map +0 -1
- package/dist/assets/root.ZkWX3Xsc.js +0 -2
- package/dist/assets/root.ZkWX3Xsc.js.map +0 -1
- package/dist/assets/select.DJuJpI3A.js +0 -2
- package/dist/assets/select.DJuJpI3A.js.map +0 -1
- package/dist/assets/sharing-type-form-input.CUG75fNB.js +0 -2
- package/dist/assets/sharing-type-form-input.CUG75fNB.js.map +0 -1
- package/dist/assets/style-GxvX-8si.css +0 -1
- package/dist/assets/toggle.8B3GpI90.js +0 -2
- package/dist/assets/toggle.8B3GpI90.js.map +0 -1
- package/dist/assets/user.7iHZB6Al.js +0 -2
- package/dist/assets/user.7iHZB6Al.js.map +0 -1
- package/dist/assets/utils.BpWye9Xm.js +0 -2
- package/dist/assets/utils.BpWye9Xm.js.map +0 -1
- package/dist/external-packages.js +0 -1
- package/dist/fonts/Inter-Black.ttf +0 -0
- package/dist/fonts/Inter-Bold.ttf +0 -0
- package/dist/fonts/Inter-ExtraBold.ttf +0 -0
- package/dist/fonts/Inter-ExtraLight.ttf +0 -0
- package/dist/fonts/Inter-Light.ttf +0 -0
- package/dist/fonts/Inter-Medium.ttf +0 -0
- package/dist/fonts/Inter-Regular.ttf +0 -0
- package/dist/fonts/Inter-SemiBold.ttf +0 -0
- package/dist/fonts/Inter-Thin.ttf +0 -0
- package/dist/fonts/Inter-VariableFont_slnt,wght.ttf +0 -0
- package/dist/hmr.js +0 -2
- package/dist/hmr.js.map +0 -1
- package/dist/service-worker.js +0 -2
- package/dist/service-worker.js.map +0 -1
- package/dist/swEnv.js +0 -70
- package/dist/vite-envs.sh +0 -494
|
@@ -1,368 +0,0 @@
|
|
|
1
|
-
import{aw as Nl,cd as pn,ce as Dl,cf as Lt,cg as Ds,ch as m,ci as je,cj as W,ck as pa,cl as ie,cm as Ti,cn as ot,co as Pt,cp as ha,cq as Mt,cr as Ii,cs as Ls,ct as $t,cu as Ps,cv as Ie,cw as _r,cx as Ll,cy as Pl,cz as we,cA as k,cB as ma,cC as A,cD as ce,cE as $l,cF as $s,cG as yr,cH as Yt,cI as hn,cJ as Fl,cK as dt,cL as q,cM as at,cN as Bl,cO as Hl,cP as Zn,cQ as Sr,cR as ga,cS as Ul,cT as Wl,cU as zl,cV as jl,cW as ql,cX as wi,cY as Fs,cZ as ki,c_ as Bs,c$ as Hs,d0 as _a,d1 as Qn,d2 as Ri,d3 as Ue,d4 as Vt,d5 as Us,d6 as ae,d7 as ct,d8 as ya,d9 as Sa,da as ba,db as os,dc as Ea,dd as va,de as Gl,df as as,dg as Ft,dh as bn,di as Ws,dj as Ci,dk as Yl,dl as Ot,dm as zs,dn as Vl,dp as Kl,dq as Xl,dr as qe,ds as er,dt as br,du as Ta,dv as Jl,dw as xi,dx as Ai,dy as Zl,dz as cs,dA as Ql,dB as ed,dC as Mi,dD as td}from"./main.DaFo88Bw.js";import{dE as Hv,dF as Uv,dG as Wv,dH as zv,dI as jv,dJ as qv,dK as Gv,dL as Yv,dM as Vv,dN as Kv,dO as Xv,dP as Jv,dQ as Zv,dR as Qv,dS as eT,dT as tT,dU as nT}from"./main.DaFo88Bw.js";import*as ge from"react";import"react/jsx-runtime";import"react-dom/client";import"react-dom";var jr={exports:{}},U={};/** @license React v16.13.1
|
|
2
|
-
* react-is.production.min.js
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the MIT license found in the
|
|
7
|
-
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/var Oi;function nd(){if(Oi)return U;Oi=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,_=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function E(y){if(typeof y=="object"&&y!==null){var v=y.$$typeof;switch(v){case t:switch(y=y.type,y){case c:case u:case r:case i:case s:case d:return y;default:switch(y=y&&y.$$typeof,y){case a:case l:case h:case p:case o:return y;default:return v}}case n:return v}}}function T(y){return E(y)===u}return U.AsyncMode=c,U.ConcurrentMode=u,U.ContextConsumer=a,U.ContextProvider=o,U.Element=t,U.ForwardRef=l,U.Fragment=r,U.Lazy=h,U.Memo=p,U.Portal=n,U.Profiler=i,U.StrictMode=s,U.Suspense=d,U.isAsyncMode=function(y){return T(y)||E(y)===c},U.isConcurrentMode=T,U.isContextConsumer=function(y){return E(y)===a},U.isContextProvider=function(y){return E(y)===o},U.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},U.isForwardRef=function(y){return E(y)===l},U.isFragment=function(y){return E(y)===r},U.isLazy=function(y){return E(y)===h},U.isMemo=function(y){return E(y)===p},U.isPortal=function(y){return E(y)===n},U.isProfiler=function(y){return E(y)===i},U.isStrictMode=function(y){return E(y)===s},U.isSuspense=function(y){return E(y)===d},U.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===u||y===i||y===s||y===d||y===f||typeof y=="object"&&y!==null&&(y.$$typeof===h||y.$$typeof===p||y.$$typeof===o||y.$$typeof===a||y.$$typeof===l||y.$$typeof===b||y.$$typeof===g||y.$$typeof===S||y.$$typeof===_)},U.typeOf=E,U}var Ni;function rd(){return Ni||(Ni=1,jr.exports=nd()),jr.exports}var qr,Di;function sd(){if(Di)return qr;Di=1;var e=rd(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[e.ForwardRef]=r,i[e.Memo]=s;function o(h){return e.isMemo(h)?s:i[h.$$typeof]||t}var a=Object.defineProperty,c=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,l=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;function p(h,_,b){if(typeof _!="string"){if(f){var g=d(_);g&&g!==f&&p(h,g,b)}var S=c(_);u&&(S=S.concat(u(_)));for(var E=o(h),T=o(_),y=0;y<S.length;++y){var v=S[y];if(!n[v]&&!(b&&b[v])&&!(T&&T[v])&&!(E&&E[v])){var x=l(_,v);try{a(h,v,x)}catch{}}}}return h}return qr=p,qr}var id=sd();const Er=Nl(id);function Ia(e,t,n=250,r,s,i,o){if(!i.exception||!i.exception.values||!o||!pn(o.originalException,Error))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=od(us(e,t,s,o.originalException,r,i.exception.values,a,0),n))}function us(e,t,n,r,s,i,o,a){if(i.length>=n+1)return i;let c=[...i];if(pn(r[s],Error)){Li(o,a);const u=e(t,r[s]),l=c.length;Pi(u,s,l,a),c=us(e,t,n,r[s],s,[u,...c],u,l)}return Array.isArray(r.errors)&&r.errors.forEach((u,l)=>{if(pn(u,Error)){Li(o,a);const d=e(t,u),f=c.length;Pi(d,`errors[${l}]`,f,a),c=us(e,t,n,u,s,[d,...c],d,f)}}),c}function Li(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Pi(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function od(e,t){return e.map(n=>(n.value&&(n.value=Dl(n.value,t)),n))}const ad=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function cd(e){return e==="http"||e==="https"}function ft(e,t=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function wa(e){const t=ad.exec(e);if(!t){Lt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",i,o="",a]=t.slice(1);let c="",u=a;const l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){const d=u.match(/^\d+/);d&&(u=d[0])}return ka({host:i,pass:s,path:c,projectId:u,port:o,protocol:n,publicKey:r})}function ka(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function ud(e){if(!Ds)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(m.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?cd(r)?t&&isNaN(parseInt(t,10))?(m.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(m.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(m.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Ra(e){const t=typeof e=="string"?wa(e):ka(e);if(!(!t||!ud(t)))return t}class xe extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}const Yn={},$i={};function pt(e,t){Yn[e]=Yn[e]||[],Yn[e].push(t)}function ht(e,t){$i[e]||(t(),$i[e]=!0)}function Te(e,t){const n=e&&Yn[e];if(n)for(const r of n)try{r(t)}catch(s){Ds&&m.error(`Error while triggering instrumentation handler.
|
|
9
|
-
Type: ${e}
|
|
10
|
-
Name: ${je(r)}
|
|
11
|
-
Error:`,s)}}function Ca(e){const t="console";pt(t,e),ht(t,ld)}function ld(){"console"in W&&pa.forEach(function(e){e in W.console&&ie(W.console,e,function(t){return Ti[e]=t,function(...n){Te("console",{args:n,level:e});const s=Ti[e];s&&s.apply(W.console,n)}})})}const Et=W,dd=1e3;let Fi,ls,ds;function xa(e){pt("dom",e),ht("dom",fd)}function fd(){if(!Et.document)return;const e=Te.bind(null,"dom"),t=Bi(e,!0);Et.document.addEventListener("click",t,!1),Et.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=Et[n]&&Et[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(ie(r,"addEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},l=u[i]=u[i]||{refCount:0};if(!l.handler){const d=Bi(e);l.handler=d,s.call(this,i,d,a)}l.refCount++}catch{}return s.call(this,i,o,a)}}),ie(r,"removeEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__||{},l=u[i];l&&(l.refCount--,l.refCount<=0&&(s.call(this,i,l.handler,a),l.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return s.call(this,i,o,a)}}))})}function pd(e){if(e.type!==ls)return!1;try{if(!e.target||e.target._sentryId!==ds)return!1}catch{}return!0}function hd(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Bi(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=md(n);if(hd(n.type,r))return;ot(n,"_sentryCaptured",!0),r&&!r._sentryId&&ot(r,"_sentryId",Pt());const s=n.type==="keypress"?"input":n.type;pd(n)||(e({event:n,name:s,global:t}),ls=n.type,ds=r?r._sentryId:void 0),clearTimeout(Fi),Fi=Et.setTimeout(()=>{ds=void 0,ls=void 0},dd)}}function md(e){try{return e.target}catch{return null}}const tr=ha();function Aa(){if(!("fetch"in tr))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function fs(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Ma(){if(typeof EdgeRuntime=="string")return!0;if(!Aa())return!1;if(fs(tr.fetch))return!0;let e=!1;const t=tr.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=fs(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){Ds&&m.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function gd(){return"ReportingObserver"in tr}function vr(e){const t="fetch";pt(t,e),ht(t,_d)}function _d(){Ma()&&ie(W,"fetch",function(e){return function(...t){const{method:n,url:r}=yd(t),s={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return Te("fetch",{...s}),e.apply(W,t).then(i=>{const o={...s,endTimestamp:Date.now(),response:i};return Te("fetch",o),i},i=>{const o={...s,endTimestamp:Date.now(),error:i};throw Te("fetch",o),i})}})}function ps(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Hi(e){return typeof e=="string"?e:e?ps(e,"url")?e.url:e.toString?e.toString():"":""}function yd(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Hi(n),method:ps(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:Hi(t),method:ps(t,"method")?String(t.method).toUpperCase():"GET"}}let Nn=null;function Oa(e){const t="error";pt(t,e),ht(t,Sd)}function Sd(){Nn=W.onerror,W.onerror=function(e,t,n,r,s){return Te("error",{column:r,error:s,line:n,msg:e,url:t}),Nn&&!Nn.__SENTRY_LOADER__?Nn.apply(this,arguments):!1},W.onerror.__SENTRY_INSTRUMENTED__=!0}let Dn=null;function Na(e){const t="unhandledrejection";pt(t,e),ht(t,bd)}function bd(){Dn=W.onunhandledrejection,W.onunhandledrejection=function(e){return Te("unhandledrejection",e),Dn&&!Dn.__SENTRY_LOADER__?Dn.apply(this,arguments):!0},W.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Ln=ha();function Ed(){const e=Ln.chrome,t=e&&e.app&&e.app.runtime,n="history"in Ln&&!!Ln.history.pushState&&!!Ln.history.replaceState;return!t&&n}const tn=W;let Pn;function En(e){const t="history";pt(t,e),ht(t,vd)}function vd(){if(!Ed())return;const e=tn.onpopstate;tn.onpopstate=function(...n){const r=tn.location.href,s=Pn;if(Pn=r,Te("history",{from:s,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const s=r.length>2?r[2]:void 0;if(s){const i=Pn,o=String(s);Pn=o,Te("history",{from:i,to:o})}return n.apply(this,r)}}ie(tn.history,"pushState",t),ie(tn.history,"replaceState",t)}const Td=W,Oe="__sentry_xhr_v3__";function Tr(e){pt("xhr",e),ht("xhr",Id)}function Id(){if(!Td.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;ie(e,"open",function(t){return function(...n){const r=Date.now(),s=Mt(n[0])?n[0].toUpperCase():void 0,i=wd(n[1]);if(!s||!i)return t.apply(this,n);this[Oe]={method:s,url:i,request_headers:{}},s==="POST"&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const o=()=>{const a=this[Oe];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}const c={args:[s,i],endTimestamp:Date.now(),startTimestamp:r,xhr:this};Te("xhr",c)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?ie(this,"onreadystatechange",function(a){return function(...c){return o(),a.apply(this,c)}}):this.addEventListener("readystatechange",o),ie(this,"setRequestHeader",function(a){return function(...c){const[u,l]=c,d=this[Oe];return d&&Mt(u)&&Mt(l)&&(d.request_headers[u.toLowerCase()]=l),a.apply(this,c)}}),t.apply(this,n)}}),ie(e,"send",function(t){return function(...n){const r=this[Oe];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);const s={args:[r.method,r.url],startTimestamp:Date.now(),xhr:this};return Te("xhr",s),t.apply(this,n)}})}function wd(e){if(Mt(e))return e;try{return e.toString()}catch{}}function kd(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Rd(){return"npm"}function Cd(){return!kd()&&Object.prototype.toString.call(typeof Ii<"u"?Ii:0)==="[object process]"}function hs(){return typeof window<"u"&&(!Cd()||xd())}function xd(){return W.process!==void 0&&W.process.type==="renderer"}function Ad(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const s=e[r];s==="."?e.splice(r,1):s===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const Md=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Od(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=Md.exec(t);return n?n.slice(1):[]}function Ui(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const s=r>=0?e[r]:"/";s&&(t=`${s}/${t}`,n=s.charAt(0)==="/")}return t=Ad(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function Wi(e){let t=0;for(;t<e.length&&e[t]==="";t++);let n=e.length-1;for(;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function Nd(e,t){e=Ui(e).slice(1),t=Ui(t).slice(1);const n=Wi(e.split("/")),r=Wi(t.split("/")),s=Math.min(n.length,r.length);let i=s;for(let a=0;a<s;a++)if(n[a]!==r[a]){i=a;break}let o=[];for(let a=i;a<n.length;a++)o.push("..");return o=o.concat(r.slice(i)),o.join("/")}function Dd(e,t){return Od(e)[2]}function Ld(e){const t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]}function s(o){if(!n())return Ps(new xe("Not adding Promise because buffer limit was reached."));const a=o();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(o){return new Ls((a,c)=>{let u=t.length;if(!u)return a(!0);const l=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(d=>{$t(d).then(()=>{--u||(clearTimeout(l),a(!0))},c)})})}return{$:t,add:s,drain:i}}function tt(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Pd(e){return e.split(/[\?#]/,1)[0]}function zi(e){return e.split(/\\?\//).filter(t=>t.length>0&&t!==",").length}const $d=["fatal","error","warning","log","info","debug"];function Da(e){return e==="warn"?"warning":$d.includes(e)?e:"log"}function De(e,t=[]){return[e,t]}function Fd(e,t){const[n,r]=e;return[n,[...r,t]]}function Bt(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function Bd(e,t){return Bt(e,(n,r)=>t.includes(r))}function ms(e,t){return(t||new TextEncoder).encode(e)}function La(e,t){const[n,r]=e;let s=JSON.stringify(n);function i(o){typeof s=="string"?s=typeof o=="string"?s+o:[ms(s,t),o]:s.push(typeof o=="string"?ms(o,t):o)}for(const o of r){const[a,c]=o;if(i(`
|
|
12
|
-
${JSON.stringify(a)}
|
|
13
|
-
`),typeof c=="string"||c instanceof Uint8Array)i(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(_r(c))}i(u)}}return typeof s=="string"?s:Hd(s)}function Hd(e){const t=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function Ud(e,t,n){let r=typeof e=="string"?t.encode(e):e;function s(c){const u=r.subarray(0,c);return r=r.subarray(c+1),u}function i(){let c=r.indexOf(10);return c<0&&(c=r.length),JSON.parse(n.decode(s(c)))}const o=i(),a=[];for(;r.length;){const c=i(),u=typeof c.length=="number"?c.length:void 0;a.push([c,u?s(u):i()])}return[o,a]}function Wd(e,t){const n=typeof e.data=="string"?ms(e.data,t):e.data;return[Ie({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const zd={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function ji(e){return zd[e]}function js(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Pa(e,t,n,r){const s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:ft(r)},...s&&{trace:Ie({...s})}}}function jd(e,t,n){const r=[{type:"client_report"},{timestamp:Ll(),discarded_events:e}];return De(t?{dsn:t}:{},[r])}const qd=60*1e3;function $a(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?qd:r-t}function Gd(e,t){return e[t]||e.all||0}function Fa(e,t,n=Date.now()){return Gd(e,t)>n}function Ba(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(const a of i.trim().split(",")){const[c,u,,,l]=a.split(":",5),d=parseInt(c,10),f=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+f;else for(const p of u.split(";"))p==="metric_bucket"?(!l||l.split(";").includes("custom"))&&(s[p]=r+f):s[p]=r+f}else o?s.all=r+$a(o,r):t===429&&(s.all=r+60*1e3);return s}function Yd(e,t){return e(t.stack||"",1)}function Vd(e,t){const n={type:t.name||t.constructor.name,value:t.message},r=Yd(e,t);return r.length&&(n.stacktrace={frames:r}),n}function Kd(e,t){return e??t()}function Vn(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function Ne(e){return(e||we()).getScope().getTransaction()}const ZE=Pl;let qi=!1;function Xd(){qi||(qi=!0,Oa(gs),Na(gs))}function gs(){const e=Ne();if(e){const t="internal_error";k&&m.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}gs.tag="sentry_tracingErrorCallback";var Gi;(function(e){e.Ok="ok";const n="deadline_exceeded";e.DeadlineExceeded=n;const r="unauthenticated";e.Unauthenticated=r;const s="permission_denied";e.PermissionDenied=s;const i="not_found";e.NotFound=i;const o="resource_exhausted";e.ResourceExhausted=o;const a="invalid_argument";e.InvalidArgument=a;const c="unimplemented";e.Unimplemented=c;const u="unavailable";e.Unavailable=u;const l="internal_error";e.InternalError=l;const d="unknown_error";e.UnknownError=d;const f="cancelled";e.Cancelled=f;const p="already_exists";e.AlreadyExists=p;const h="failed_precondition";e.FailedPrecondition=h;const _="aborted";e.Aborted=_;const b="out_of_range";e.OutOfRange=b;const g="data_loss";e.DataLoss=g})(Gi||(Gi={}));function Ha(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}const QE=Ha;function qs(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);const n=Ha(t);n!=="unknown_error"&&e.setStatus(n)}function Gs(e,t,n=()=>{}){let r;try{r=e()}catch(s){throw t(s),n(),s}return Jd(r,t,n)}function Jd(e,t,n){return ma(e)?e.then(r=>(n(),r),r=>{throw t(r),n(),r}):(n(),e)}function Kt(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=A(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function ev(e,t,n=()=>{},r=()=>{}){const s=we(),i=ce(),o=i.getSpan(),a=wr(e),c=Ir(s,{parentSpan:o,spanContext:a,forceTransaction:!1,scope:i});return i.setSpan(c),Gs(()=>t(c),u=>{c&&c.setStatus("internal_error"),n(u,c)},()=>{c&&c.end(),i.setSpan(o),r()})}function tv(e,t){const n=wr(e);return $s(()=>dt(e.scope,r=>{const s=we(),i=r.getSpan(),a=e.onlyIfParent&&!i?void 0:Ir(s,{parentSpan:i,spanContext:n,forceTransaction:e.forceTransaction,scope:r});return Gs(()=>t(a),()=>{if(a){const{status:c}=q(a);(!c||c==="ok")&&a.setStatus("internal_error")}},()=>a&&a.end())}))}function nv(e,t){const n=wr(e);return $s(()=>dt(e.scope,r=>{const s=we(),i=r.getSpan(),a=e.onlyIfParent&&!i?void 0:Ir(s,{parentSpan:i,spanContext:n,forceTransaction:e.forceTransaction,scope:r});function c(){a&&a.end()}return Gs(()=>t(a,c),()=>{if(a&&a.isRecording()){const{status:u}=q(a);(!u||u==="ok")&&a.setStatus("internal_error")}})}))}function nt(e){if(!Kt())return;const t=wr(e),n=we(),r=e.scope?e.scope.getSpan():Xt();if(e.onlyIfParent&&!r)return;const o=(e.scope||ce()).clone();return Ir(n,{parentSpan:r,spanContext:t,forceTransaction:e.forceTransaction,scope:o})}function Xt(){return ce().getSpan()}const rv=({sentryTrace:e,baggage:t},n)=>{const r=ce(),{traceparentData:s,dynamicSamplingContext:i,propagationContext:o}=$l(e,t);r.setPropagationContext(o),k&&s&&m.log(`[Tracing] Continuing trace ${s.traceId}.`);const a={...s,metadata:Ie({dynamicSamplingContext:i})};return n?$s(()=>n(a)):a};function Ir(e,{parentSpan:t,spanContext:n,forceTransaction:r,scope:s}){if(!Kt())return;const i=Yt();let o;if(t&&!r)o=t.startChild(n);else if(t){const a=hn(t),{traceId:c,spanId:u}=t.spanContext(),l=Fl(t);o=e.startTransaction({traceId:c,parentSpanId:u,parentSampled:l,...n,metadata:{dynamicSamplingContext:a,...n.metadata}})}else{const{traceId:a,dsc:c,parentSpanId:u,sampled:l}={...i.getPropagationContext(),...s.getPropagationContext()};o=e.startTransaction({traceId:a,parentSpanId:u,parentSampled:l,...n,metadata:{dynamicSamplingContext:c,...n.metadata}})}return s.setSpan(o),Zd(o,s,i),o}function wr(e){if(e.startTime){const t={...e};return t.startTimestamp=yr(e.startTime),delete t.startTime,t}return e}const Ua="_sentryScope",Wa="_sentryIsolationScope";function Zd(e,t,n){e&&(ot(e,Wa,n),ot(e,Ua,t))}function Qd(e){return{scope:e[Ua],isolationScope:e[Wa]}}let sn;function za(e){return sn?sn.get(e):void 0}function ja(e){const t=za(e);if(!t)return;const n={};for(const[,[r,s]]of t)n[r]||(n[r]=[]),n[r].push(Ie(s));return n}function ef(e,t,n,r,s,i){const o=Xt();if(o){const a=za(o)||new Map,c=`${e}:${t}@${r}`,u=a.get(i);if(u){const[,l]=u;a.set(i,[c,{min:Math.min(l.min,n),max:Math.max(l.max,n),count:l.count+=1,sum:l.sum+=n,tags:l.tags}])}else a.set(i,[c,{min:n,max:n,count:1,sum:n,tags:s}]);sn||(sn=new WeakMap),sn.set(o,a)}}const te="sentry.source",It="sentry.sample_rate",ve="sentry.op",me="sentry.origin",tf="profile_id";class qa{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class kr{constructor(t={}){this._traceId=t.traceId||Pt(),this._spanId=t.spanId||Pt().substring(16),this._startTime=t.startTimestamp||at(),this.tags=t.tags?{...t.tags}:{},this.data=t.data?{...t.data}:{},this.instrumenter=t.instrumenter||"sentry",this._attributes={},this.setAttributes({[me]:t.origin||"manual",[ve]:t.op,...t.attributes}),this._name=t.name||t.description,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.status&&(this._status=t.status),t.endTimestamp&&(this._endTime=t.endTimestamp),t.exclusiveTime!==void 0&&(this._exclusiveTime=t.exclusiveTime),this._measurements=t.measurements?{...t.measurements}:{}}get name(){return this._name||""}set name(t){this.updateName(t)}get description(){return this._name}set description(t){this._name=t}get traceId(){return this._traceId}set traceId(t){this._traceId=t}get spanId(){return this._spanId}set spanId(t){this._spanId=t}set parentSpanId(t){this._parentSpanId=t}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(t){this._sampled=t}get attributes(){return this._attributes}set attributes(t){this._attributes=t}get startTimestamp(){return this._startTime}set startTimestamp(t){this._startTime=t}get endTimestamp(){return this._endTime}set endTimestamp(t){this._endTime=t}get status(){return this._status}set status(t){this._status=t}get op(){return this._attributes[ve]}set op(t){this.setAttribute(ve,t)}get origin(){return this._attributes[me]}set origin(t){this.setAttribute(me,t)}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Bl:Hl}}startChild(t){const n=new kr({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n);const r=Zn(this);if(n.transaction=r,k&&r){const s=t&&t.op||"< unknown op >",i=q(n).description||"< unknown name >",o=r.spanContext().spanId,a=`[Tracing] Starting '${s}' span on transaction '${i}' (${o}).`;m.log(a),this._logMessage=a}return n}setTag(t,n){return this.tags={...this.tags,[t]:n},this}setData(t,n){return this.data={...this.data,[t]:n},this}setAttribute(t,n){n===void 0?delete this._attributes[t]:this._attributes[t]=n}setAttributes(t){Object.keys(t).forEach(n=>this.setAttribute(n,t[n]))}setStatus(t){return this._status=t,this}setHttpStatus(t){return qs(this,t),this}setName(t){this.updateName(t)}updateName(t){return this._name=t,this}isSuccess(){return this._status==="ok"}finish(t){return this.end(t)}end(t){if(this._endTime)return;const n=Zn(this);if(k&&n&&n.spanContext().spanId!==this._spanId){const r=this._logMessage;r&&m.log(r.replace("Starting","Finishing"))}this._endTime=yr(t)}toTraceparent(){return Sr(this)}toContext(){return Ie({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(t){return this.data=t.data||{},this._name=t.name||t.description,this._endTime=t.endTimestamp,this.op=t.op,this._parentSpanId=t.parentSpanId,this._sampled=t.sampled,this._spanId=t.spanId||this._spanId,this._startTime=t.startTimestamp||this._startTime,this._status=t.status,this.tags=t.tags||{},this._traceId=t.traceId||this._traceId,this}getTraceContext(){return ga(this)}getSpanJSON(){return Ie({data:this._getData(),description:this._name,op:this._attributes[ve],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[me],_metrics_summary:ja(this),profile_id:this._attributes[tf],exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){const{data:t,_attributes:n}=this,r=Object.keys(t).length>0,s=Object.keys(n).length>0;if(!(!r&&!s))return r&&s?{...t,...n}:r?t:n}}class Ga extends kr{constructor(t,n){super(t),this._contexts={},this._hub=n||we(),this._name=t.name||"",this._metadata={...t.metadata},this._trimEnd=t.trimEnd,this.transaction=this;const r=this._metadata.dynamicSamplingContext;r&&(this._frozenDynamicSamplingContext={...r})}get name(){return this._name}set name(t){this.setName(t)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[te]&&{source:this._attributes[te]},...this._attributes[It]&&{sampleRate:this._attributes[It]}}}set metadata(t){this._metadata=t}setName(t,n="custom"){this._name=t,this.setAttribute(te,n)}updateName(t){return this._name=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new qa(t)),this.spanRecorder.add(this)}setContext(t,n){n===null?delete this._contexts[t]:this._contexts[t]=n}setMeasurement(t,n,r=""){this._measurements[t]={value:n,unit:r}}setMetadata(t){this._metadata={...this._metadata,...t}}end(t){const n=yr(t),r=this._finishTransaction(n);if(r)return this._hub.captureEvent(r)}toContext(){const t=super.toContext();return Ie({...t,name:this._name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this._name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){return hn(this)}setHub(t){this._hub=t}getProfileId(){if(this._contexts!==void 0&&this._contexts.profile!==void 0)return this._contexts.profile.profile_id}_finishTransaction(t){if(this._endTime!==void 0)return;this._name||(k&&m.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(t);const n=this._hub.getClient();if(n&&n.emit&&n.emit("finishTransaction",this),this._sampled!==!0){k&&m.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),n&&n.recordDroppedEvent("sample_rate","transaction");return}const r=this.spanRecorder?this.spanRecorder.spans.filter(l=>l!==this&&q(l).timestamp):[];if(this._trimEnd&&r.length>0){const l=r.map(d=>q(d).timestamp).filter(Boolean);this._endTime=l.reduce((d,f)=>d>f?d:f)}const{scope:s,isolationScope:i}=Qd(this),{metadata:o}=this,{source:a}=o,c={contexts:{...this._contexts,trace:ga(this)},spans:r,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...o,capturedSpanScope:s,capturedSpanIsolationScope:i,...Ie({dynamicSamplingContext:hn(this)})},_metrics_summary:ja(this),...a&&{transaction_info:{source:a}}};return Object.keys(this._measurements).length>0&&(k&&m.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),c.measurements=this._measurements),k&&m.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),c}}const on={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},nf="finishReason",yt=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class rf extends qa{constructor(t,n,r,s){super(s),this._pushActivity=t,this._popActivity=n,this.transactionSpanId=r}add(t){if(t.spanContext().spanId!==this.transactionSpanId){const n=t.end;t.end=(...r)=>(this._popActivity(t.spanContext().spanId),n.apply(t,r)),q(t).timestamp===void 0&&this._pushActivity(t.spanContext().spanId)}super.add(t)}}class sf extends Ga{constructor(t,n,r=on.idleTimeout,s=on.finalTimeout,i=on.heartbeatInterval,o=!1,a=!1){super(t,n),this._idleHub=n,this._idleTimeout=r,this._finalTimeout=s,this._heartbeatInterval=i,this._onScope=o,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=yt[4],this._autoFinishAllowed=!a,o&&(k&&m.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),n.getScope().setSpan(this)),a||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=yt[3],this.end())},this._finalTimeout)}end(t){const n=yr(t);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(nf,this._finishReason),this.spanRecorder){k&&m.log("[Tracing] finishing IdleTransaction",new Date(n*1e3).toISOString(),this.op);for(const r of this._beforeFinishCallbacks)r(this,n);this.spanRecorder.spans=this.spanRecorder.spans.filter(r=>{if(r.spanContext().spanId===this.spanContext().spanId)return!0;q(r).timestamp||(r.setStatus("cancelled"),r.end(n),k&&m.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(r,void 0,2)));const{start_timestamp:s,timestamp:i}=q(r),o=s&&s<n,a=(this._finalTimeout+this._idleTimeout)/1e3,c=i&&s&&i-s<a;if(k){const u=JSON.stringify(r,void 0,2);o?c||m.log("[Tracing] discarding Span since it finished after Transaction final timeout",u):m.log("[Tracing] discarding Span since it happened after Transaction was finished",u)}return o&&c}),k&&m.log("[Tracing] flushing IdleTransaction")}else k&&m.log("[Tracing] No active IdleTransaction");if(this._onScope){const r=this._idleHub.getScope();r.getTransaction()===this&&r.setSpan(void 0)}return super.end(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){if(!this.spanRecorder){const n=s=>{this._finished||this._pushActivity(s)},r=s=>{this._finished||this._popActivity(s)};this.spanRecorder=new rf(n,r,this.spanContext().spanId,t),k&&m.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:n}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=n===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=yt[5],this.end(t)))}setFinishReason(t){this._finishReason=t}sendAutoFinishSignal(){this._autoFinishAllowed||(k&&m.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=yt[1],this.end(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),k&&m.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,k&&m.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(k&&m.log(`[Tracing] popActivity ${t}`),delete this.activities[t],k&&m.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){const n=at();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=yt[5],this.end(n)):this._restartIdleTimeout(n+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?this._autoFinishAllowed&&(k&&m.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=yt[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){k&&m.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function Ya(e,t,n){if(!Kt(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setAttribute(It,Number(e.sampled)),e;let r;return typeof t.tracesSampler=="function"?(r=t.tracesSampler(n),e.setAttribute(It,Number(r))):n.parentSampled!==void 0?r=n.parentSampled:typeof t.tracesSampleRate<"u"?(r=t.tracesSampleRate,e.setAttribute(It,Number(r))):(r=1,e.setAttribute(It,r)),Va(r)?r?(e.sampled=Math.random()<r,e.sampled?(k&&m.log(`[Tracing] starting ${e.op} transaction - ${q(e).description}`),e):(k&&m.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),e)):(k&&m.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),e.sampled=!1,e):(k&&m.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e)}function Va(e){return Ul(e)||!(typeof e=="number"||typeof e=="boolean")?(k&&m.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e<0||e>1?(k&&m.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function of(){const t=this.getScope().getSpan();return t?{"sentry-trace":Sr(t)}:{}}function af(e,t){const n=this.getClient(),r=n&&n.getOptions()||{},s=r.instrumenter||"sentry",i=e.instrumenter||"sentry";s!==i&&(k&&m.error(`A transaction was started with instrumenter=\`${i}\`, but the SDK is configured with the \`${s}\` instrumenter.
|
|
14
|
-
The transaction will not be sampled. Please use the ${s} instrumentation to start transactions.`),e.sampled=!1);let o=new Ga(e,this);return o=Ya(o,r,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...t}),o.isRecording()&&o.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",o),o}function nr(e,t,n,r,s,i,o,a=!1){const c=e.getClient(),u=c&&c.getOptions()||{};let l=new sf(t,e,n,r,o,s,a);return l=Ya(l,u,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...i}),l.isRecording()&&l.initSpanRecorder(u._experiments&&u._experiments.maxSpans),c&&c.emit&&c.emit("startTransaction",l),l}function Ka(){const e=Wl();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=af),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=of),Xd())}function cf(e,t,n){const r=Ne();r&&r.setMeasurement(e,t,n)}function uf(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function lf(e,t,n,r){const s=js(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:ft(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return De(i,[o])}function Xa(e,t,n,r){const s=js(n),i=e.type&&e.type!=="replay_event"?e.type:"event";uf(e,n&&n.sdk);const o=Pa(e,s,r,t);return delete e.sdkProcessingMetadata,De(o,[[{type:i},e]])}const df="7";function Ja(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function ff(e){return`${Ja(e)}${e.projectId}/envelope/`}function pf(e,t){return zl({sentry_key:e.publicKey,sentry_version:df,...t&&{sentry_client:`${t.name}/${t.version}`}})}function Za(e,t={}){const n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${ff(e)}?${pf(e,r)}`}function hf(e,t){const n=Ra(e);if(!n)return"";const r=`${Ja(n)}embed/error-page/`;let s=`dsn=${ft(n)}`;for(const i in t)if(i!=="dsn"&&i!=="onClose")if(i==="user"){const o=t.user;if(!o)continue;o.name&&(s+=`&name=${encodeURIComponent(o.name)}`),o.email&&(s+=`&email=${encodeURIComponent(o.email)}`)}else s+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${r}?${s}`}const Yi=[];function mf(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.keys(t).map(n=>t[n])}function gf(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=jl(n(t)):r=t;const s=mf(r),i=yf(s,o=>o.name==="Debug");if(i!==-1){const[o]=s.splice(i,1);s.push(o)}return s}function _f(e,t){const n={};return t.forEach(r=>{r&&Qa(e,r,n)}),n}function Vi(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Qa(e,t,n){if(n[t.name]){k&&m.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Yi.indexOf(t.name)===-1&&(t.setupOnce(ql,we),Yi.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),e.on&&typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,i)=>r(s,i,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=(i,o)=>r(i,o,e);s.id=t.name,e.addEventProcessor(s)}k&&m.log(`Integration installed: ${t.name}`)}function sv(e){const t=A();if(!t||!t.addIntegration){k&&m.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function yf(e,t){for(let n=0;n<e.length;n++)if(t(e[n])===!0)return n;return-1}function Q(e,t){const n=function(...s){return t(...s)};return n.id=e,n}function Sf(e,t,n,r){const s=Object.entries(Ie(r)).sort((i,o)=>i[0].localeCompare(o[0]));return`${e}${t}${n}${s}`}function bf(e){let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t>>>0}function Ef(e){let t="";for(const n of e){const r=Object.entries(n.tags),s=r.length>0?`|#${r.map(([i,o])=>`${i}:${o}`).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${s}|T${n.timestamp}
|
|
15
|
-
`}return t}function vf(e){return e.replace(/[^\w]+/gi,"_")}function Tf(e){return e.replace(/[^\w\-.]+/gi,"_")}function If(e){return e.replace(/[^\w\-./]+/gi,"")}const wf=[[`
|
|
16
|
-
`,"\\n"],["\r","\\r"],[" ","\\t"],["\\","\\\\"],["|","\\u{7c}"],[",","\\u{2c}"]];function kf(e){for(const[t,n]of wf)if(e===t)return n;return e}function Rf(e){return[...e].reduce((t,n)=>t+kf(n),"")}function Cf(e){const t={};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const r=If(n);t[r]=Rf(String(e[n]))}return t}function xf(e,t,n,r){const s={sent_at:new Date().toISOString()};n&&n.sdk&&(s.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(s.dsn=ft(t));const i=Af(e);return De(s,[i])}function Af(e){const t=Ef(e);return[{type:"statsd",length:t.length},t]}const Ki="Not capturing exception because it's already been captured.";class Mf{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Ra(t.dsn):k&&m.warn("No DSN provided, client will not send events."),this._dsn){const n=Za(this._dsn,t);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){if(wi(t)){k&&m.log(Ki);return}let s=n&&n.event_id;return this._process(this.eventFromException(t,n).then(i=>this._captureEvent(i,n,r)).then(i=>{s=i})),s}captureMessage(t,n,r,s){let i=r&&r.event_id;const o=_a(t)?t:String(t),a=Fs(t)?this.eventFromMessage(o,n,r):this.eventFromException(t,r);return this._process(a.then(c=>this._captureEvent(c,r,s)).then(c=>{i=c})),i}captureEvent(t,n,r){if(n&&n.originalException&&wi(n.originalException)){k&&m.log(Ki);return}let s=n&&n.event_id;const o=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,n,o||r).then(a=>{s=a})),s}captureSession(t){typeof t.release!="string"?k&&m.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),ki(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s))):$t(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return k&&m.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){const n=this._integrations[t.name];Qa(this,t,this._integrations),n||Vi(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Xa(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=Fd(r,Wd(i,this._options.transportOptions&&this._options.transportOptions.textEncoder));const s=this._sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const n=lf(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const s=typeof r=="number"?r:1,i=`${t}:${n}`;k&&m.log(`Recording outcome: "${i}"${s>1?` (${s} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+s}}captureAggregateMetrics(t){k&&m.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const n=xf(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}on(t,n){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(n)}emit(t,...n){this._hooks[t]&&this._hooks[t].forEach(r=>r(...n))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=_f(this,t),Vi(this,t),this._integrationsInitialized=!0}_updateSessionFromEvent(t,n){let r=!1,s=!1;const i=n.exception&&n.exception.values;if(i){s=!0;for(const c of i){const u=c.mechanism;if(u&&u.handled===!1){r=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(ki(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Ls(n=>{let r=0;const s=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=s,t&&r>=t&&(clearInterval(i),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s=Yt()){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",t,n),Bs(i,t,n,r,this,s).then(a=>{if(a===null)return a;const c={...s.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(a.contexts&&a.contexts.trace)&&c){const{traceId:l,spanId:d,parentSpanId:f,dsc:p}=c;a.contexts={trace:{trace_id:l,span_id:d,parent_span_id:f},...a.contexts};const h=p||Hs(l,this,r);a.sdkProcessingMetadata={dynamicSamplingContext:h,...a.sdkProcessingMetadata}}return a})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(s=>s.event_id,s=>{if(k){const i=s;i.logLevel==="log"?m.log(i.message):m.warn(i)}})}_processEvent(t,n,r){const s=this.getOptions(),{sampleRate:i}=s,o=tc(t),a=ec(t),c=t.type||"error",u=`before send for type \`${c}\``;if(a&&typeof i=="number"&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",t),Ps(new xe(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const l=c==="replay_event"?"replay":c,f=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,f).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",l,t),new xe("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return p;const _=Nf(s,p,n);return Of(_,u)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",l,t),o){const g=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",g)}throw new xe(`${u} returned \`null\`, will not send event.`,"log")}const h=r&&r.getSession();if(!o&&h&&this._updateSessionFromEvent(h,p),o){const b=p.sdkProcessingMetadata&&p.sdkProcessingMetadata.spanCountBeforeProcessing||0,g=p.spans?p.spans.length:0,S=b-g;S>0&&this.recordDroppedEvent("before_send","span",S)}const _=p.transaction_info;if(o&&_&&p.transaction!==t.transaction){const b="custom";p.transaction_info={..._,source:b}}return this.sendEvent(p,n),p}).then(null,p=>{throw p instanceof xe?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),new xe(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
17
|
-
Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,n=>{k&&m.error("Error while sending event:",n)});k&&m.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(n=>{const[r,s]=n.split(":");return{reason:r,category:s,quantity:t[n]}})}}function Of(e,t){const n=`${t} must return \`null\` or a valid event.`;if(ma(e))return e.then(r=>{if(!Qn(r)&&r!==null)throw new xe(n);return r},r=>{throw new xe(`${t} rejected with ${r}`)});if(!Qn(e)&&e!==null)throw new xe(n);return e}function Nf(e,t,n){const{beforeSend:r,beforeSendTransaction:s}=e;if(ec(t)&&r)return r(t,n);if(tc(t)&&s){if(t.spans){const i=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:i}}return s(t,n)}return t}function ec(e){return e.type===void 0}function tc(e){return e.type==="transaction"}function Df(e){const t=A();!t||!t.addEventProcessor||t.addEventProcessor(e)}const nc="c",rc="g",Ys="s",sc="d",Lf=5e3;class Pf{constructor(t){this._value=t}get weight(){return 1}add(t){this._value+=t}toString(){return`${this._value}`}}class $f{constructor(t){this._last=t,this._min=t,this._max=t,this._sum=t,this._count=1}get weight(){return 5}add(t){this._last=t,t<this._min&&(this._min=t),t>this._max&&(this._max=t),this._sum+=t,this._count++}toString(){return`${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`}}class Ff{constructor(t){this._value=[t]}get weight(){return this._value.length}add(t){this._value.push(t)}toString(){return this._value.join(":")}}class Bf{constructor(t){this.first=t,this._value=new Set([t])}get weight(){return this._value.size}add(t){this._value.add(t)}toString(){return Array.from(this._value).map(t=>typeof t=="string"?bf(t):t).join(":")}}const Hf={[nc]:Pf,[rc]:$f,[sc]:Ff,[Ys]:Bf};function Uf(e,t){t.debug===!0&&(k?m.enable():Lt(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),ce().update(t.initialScope);const r=new e(t);Wf(r),zf(r)}function Wf(e){const n=we().getStackTop();n.client=e,n.scope.setClient(e)}function zf(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}const jf=30;function ic(e,t,n=Ld(e.bufferSize||jf)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(Bt(o,(d,f)=>{const p=ji(f);if(Fa(r,p)){const h=Xi(d,f);e.recordDroppedEvent("ratelimit_backoff",p,h)}else a.push(d)}),a.length===0)return $t();const c=De(o[0],a),u=d=>{Bt(c,(f,p)=>{const h=Xi(f,p);e.recordDroppedEvent(d,ji(p),h)})},l=()=>t({body:La(c,e.textEncoder)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&k&&m.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=Ba(r,d),d),d=>{throw u("network_error"),d});return n.add(l).then(d=>d,d=>{if(d instanceof xe)return k&&m.error("Skipped sending event because buffer is full."),u("queue_overflow"),$t();throw d})}return i.__sentry__baseTransport__=!0,{send:i,flush:s}}function Xi(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}const qf=100,Ji=5e3,Gf=36e5;function Gr(e,t){k&&m.info(`[Offline]: ${e}`,t)}function Yf(e){return t=>{const n=e(t),r=t.createStore?t.createStore(t):void 0;let s=Ji,i;function o(l,d,f){return Bd(l,["replay_event","replay_recording","client_report"])?!1:t.shouldStore?t.shouldStore(l,d,f):!0}function a(l){r&&(i&&clearTimeout(i),i=setTimeout(async()=>{i=void 0;const d=await r.pop();d&&(Gr("Attempting to send previously queued event"),u(d).catch(f=>{Gr("Failed to retry sending",f)}))},l),typeof i!="number"&&i.unref&&i.unref())}function c(){i||(a(s),s=Math.min(s*2,Gf))}async function u(l){try{const d=await n.send(l);let f=qf;if(d){if(d.headers&&d.headers["retry-after"])f=$a(d.headers["retry-after"]);else if((d.statusCode||0)>=400)return d}return a(f),s=Ji,d}catch(d){if(r&&await o(l,d,s))return await r.insert(l),c(),Gr("Error sending. Event queued",d),{};throw d}}return t.flushAtStartup&&c(),{send:u,flush:l=>n.flush(l)}}}function oc(e,t){let n;return Bt(e,(r,s)=>(t.includes(s)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function Vf(e,t){return n=>{const r=e(n);return{...r,send:async s=>{const i=oc(s,["event","transaction","profile","replay_event"]);return i&&(i.release=t),r.send(s)}}}}function Kf(e,t){return De(t?{...e[0],dsn:t}:e[0],e[1])}function iv(e,t){return n=>{const r=e(n),s=new Map;function i(c,u){const l=u?`${c}:${u}`:c;let d=s.get(l);if(!d){const f=wa(c);if(!f)return;const p=Za(f,n.tunnel);d=u?Vf(e,u)({...n,url:p}):e({...n,url:p}),s.set(l,d)}return[c,d]}async function o(c){function u(f){const p=f&&f.length?f:["event"];return oc(c,p)}const l=t({envelope:c,getEvent:u}).map(f=>typeof f=="string"?i(f,void 0):i(f.dsn,f.release)).filter(f=>!!f);return l.length===0&&l.push(["",r]),(await Promise.all(l.map(([f,p])=>p.send(Kf(c,f)))))[0]}async function a(c){const u=[await r.flush(c)];for(const[,l]of s)u.push(await l.flush(c));return u.every(l=>l)}return{send:o,flush:a}}}function Xf(e,t){const n={sent_at:new Date().toISOString()};t&&(n.dsn=ft(t));const r=e.map(Jf);return De(n,r)}function Jf(e){return[{type:"span"},e]}function ac(e,t){const n=t&&ep(t)?t.getClient():t,r=n&&n.getDsn(),s=n&&n.getOptions().tunnel;return Qf(e,r)||Zf(e,s)}function Zf(e,t){return t?Zi(e)===Zi(t):!1}function Qf(e,t){return t?e.includes(t.host):!1}function Zi(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function ep(e){return e.getClient!==void 0}function ov(e,...t){const n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}function cc(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:Ri})),version:Ri}),e._metadata=s}const uc=new Map,Qi=new Set;function tp(e){if(W._sentryModuleMetadata)for(const t of Object.keys(W._sentryModuleMetadata)){const n=W._sentryModuleMetadata[t];if(Qi.has(t))continue;Qi.add(t);const r=e(t);for(const s of r.reverse())if(s.filename){uc.set(s.filename,n);break}}}function np(e,t){return tp(e),uc.get(t)}function rp(e,t){try{t.exception.values.forEach(n=>{if(n.stacktrace)for(const r of n.stacktrace.frames||[]){if(!r.filename)continue;const s=np(e,r.filename);s&&(r.module_metadata=s)}})}catch{}}function sp(e){try{e.exception.values.forEach(t=>{if(t.stacktrace)for(const n of t.stacktrace.frames||[])delete n.module_metadata})}catch{}}const lc="ModuleMetadata",ip=(()=>({name:lc,setupOnce(){},setup(e){typeof e.on=="function"&&e.on("beforeEnvelope",t=>{Bt(t,(n,r)=>{if(r==="event"){const s=Array.isArray(n)?n[1]:void 0;s&&(sp(s),n[1]=s)}})})},processEvent(e,t,n){const r=n.getOptions().stackParser;return rp(r,e),e}})),op=ip,av=Q(lc,op),ap=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],cp=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],dc="InboundFilters",up=((e={})=>({name:dc,setupOnce(){},processEvent(t,n,r){const s=r.getOptions(),i=dp(e,s);return fp(t,i)?null:t}})),fc=up,lp=Q(dc,fc);function dp(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:ap],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:cp],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function fp(e,t){return t.ignoreInternal&&yp(e)?(k&&m.warn(`Event dropped due to being internal Sentry Error.
|
|
18
|
-
Event: ${Ue(e)}`),!0):pp(e,t.ignoreErrors)?(k&&m.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
19
|
-
Event: ${Ue(e)}`),!0):hp(e,t.ignoreTransactions)?(k&&m.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
20
|
-
Event: ${Ue(e)}`),!0):mp(e,t.denyUrls)?(k&&m.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
21
|
-
Event: ${Ue(e)}.
|
|
22
|
-
Url: ${rr(e)}`),!0):gp(e,t.allowUrls)?!1:(k&&m.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
23
|
-
Event: ${Ue(e)}.
|
|
24
|
-
Url: ${rr(e)}`),!0)}function pp(e,t){return e.type||!t||!t.length?!1:_p(e).some(n=>Vt(n,t))}function hp(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?Vt(n,t):!1}function mp(e,t){if(!t||!t.length)return!1;const n=rr(e);return n?Vt(n,t):!1}function gp(e,t){if(!t||!t.length)return!0;const n=rr(e);return n?Vt(n,t):!0}function _p(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),k&&t.length===0&&m.error(`Could not extract message for event ${Ue(e)}`),t}function yp(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function Sp(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function rr(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?Sp(t):null}catch{return k&&m.error(`Cannot extract url for event ${Ue(e)}`),null}}let eo;const pc="FunctionToString",to=new WeakMap,bp=(()=>({name:pc,setupOnce(){eo=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Us(this),n=to.has(A())&&t!==void 0?t:this;return eo.apply(n,e)}}catch{}},setup(e){to.set(e,!0)}})),hc=bp,Ep=Q(pc,hc),vp="cause",Tp=5,mc="LinkedErrors",Ip=((e={})=>{const t=e.limit||Tp,n=e.key||vp;return{name:mc,setupOnce(){},preprocessEvent(r,s,i){const o=i.getOptions();Ia(Vd,o.stackParser,o.maxValueLength,n,t,r,s)}}}),wp=Ip,kp=Q(mc,wp),Rp=Object.freeze(Object.defineProperty({__proto__:null,FunctionToString:Ep,InboundFilters:lp,LinkedErrors:kp},Symbol.toStringTag,{value:"Module"}));class Cp{constructor(t){this._client=t,this._buckets=new Map,this._interval=setInterval(()=>this.flush(),Lf)}add(t,n,r,s="none",i={},o=at()){const a=Math.floor(o),c=Tf(n),u=Cf(i),l=vf(s),d=Sf(t,c,l,u);let f=this._buckets.get(d);const p=f&&t===Ys?f.metric.weight:0;f?(f.metric.add(r),f.timestamp<a&&(f.timestamp=a)):(f={metric:new Hf[t](r),timestamp:a,metricType:t,name:c,unit:l,tags:u},this._buckets.set(d,f));const h=typeof r=="string"?f.metric.weight-p:r;ef(t,c,h,l,i,d)}flush(){if(this._buckets.size!==0){if(this._client.captureAggregateMetrics){const t=Array.from(this._buckets).map(([,n])=>n);this._client.captureAggregateMetrics(t)}this._buckets.clear()}}close(){clearInterval(this._interval),this.flush()}}const gc="MetricsAggregator",xp=(()=>({name:gc,setupOnce(){},setup(e){e.metricsAggregator=new Cp(e)}})),_c=xp,Ap=Q(gc,_c);function Rr(e,t,n,r={}){const s=A(),i=ce();if(s){if(!s.metricsAggregator){k&&m.warn("No metrics aggregator enabled. Please add the MetricsAggregator integration to use metrics APIs");return}const{unit:o,tags:a,timestamp:c}=r,{release:u,environment:l}=s.getOptions(),d=i.getTransaction(),f={};u&&(f.release=u),l&&(f.environment=l),d&&(f.transaction=q(d).description||""),k&&m.log(`Adding value of ${n} to ${e} metric ${t}`),s.metricsAggregator.add(e,t,n,o,{...f,...a},c)}}function Mp(e,t=1,n){Rr(nc,e,t,n)}function Op(e,t,n){Rr(sc,e,t,n)}function Np(e,t,n){Rr(Ys,e,t,n)}function Dp(e,t,n){Rr(rc,e,t,n)}const cv={increment:Mp,distribution:Op,set:Np,gauge:Dp,MetricsAggregator:Ap,metricsAggregatorIntegration:_c},Lp=Rp,L=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,R=W;function yc(){R.document?R.document.addEventListener("visibilitychange",()=>{const e=Ne();if(R.document.hidden&&e){const t="cancelled",{op:n,status:r}=q(e);L&&m.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${n}`),r||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.end()}}):L&&m.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const vn=(e,t,n)=>{let r,s;return i=>{t.value>=0&&(i||n)&&(s=t.value-(r||0),(s||r===void 0)&&(r=t.value,t.delta=s,e(t)))}},Pp=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,$p=()=>{const e=R.performance.timing,t=R.performance.navigation.type,n={entryType:"navigation",startTime:0,type:t==2?"back_forward":t===1?"reload":"navigate"};for(const r in e)r!=="navigationStart"&&r!=="toJSON"&&(n[r]=Math.max(e[r]-e.navigationStart,0));return n},Cr=()=>R.__WEB_VITALS_POLYFILL__?R.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||$p()):R.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Vs=()=>{const e=Cr();return e&&e.activationStart||0},Tn=(e,t)=>{const n=Cr();let r="navigate";return n&&(R.document&&R.document.prerendering||Vs()>0?r="prerender":r=n.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:Pp(),navigationType:r}},Jt=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{t(s.getEntries())});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},In=(e,t)=>{const n=r=>{(r.type==="pagehide"||R.document.visibilityState==="hidden")&&(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};R.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))},Fp=(e,t={})=>{const n=Tn("CLS",0);let r,s=0,i=[];const o=c=>{c.forEach(u=>{if(!u.hadRecentInput){const l=i[0],d=i[i.length-1];s&&i.length!==0&&u.startTime-d.startTime<1e3&&u.startTime-l.startTime<5e3?(s+=u.value,i.push(u)):(s=u.value,i=[u]),s>n.value&&(n.value=s,n.entries=i,r&&r())}})},a=Jt("layout-shift",o);if(a){r=vn(e,n,t.reportAllChanges);const c=()=>{o(a.takeRecords()),r(!0)};return In(c),c}};let sr=-1;const Bp=()=>{R.document&&R.document.visibilityState&&(sr=R.document.visibilityState==="hidden"&&!R.document.prerendering?0:1/0)},Hp=()=>{In(({timeStamp:e})=>{sr=e},!0)},Ks=()=>(sr<0&&(Bp(),Hp()),{get firstHiddenTime(){return sr}}),Up=e=>{const t=Ks(),n=Tn("FID");let r;const s=a=>{a.startTime<t.firstHiddenTime&&(n.value=a.processingStart-a.startTime,n.entries.push(a),r(!0))},i=a=>{a.forEach(s)},o=Jt("first-input",i);r=vn(e,n),o&&In(()=>{i(o.takeRecords()),o.disconnect()},!0)};let Sc=0,Yr=1/0,$n=0;const Wp=e=>{e.forEach(t=>{t.interactionId&&(Yr=Math.min(Yr,t.interactionId),$n=Math.max($n,t.interactionId),Sc=$n?($n-Yr)/7+1:0)})};let _s;const zp=()=>_s?Sc:performance.interactionCount||0,jp=()=>{"interactionCount"in performance||_s||(_s=Jt("event",Wp,{type:"event",buffered:!0,durationThreshold:0}))},bc=()=>zp(),no=10,Me=[],Vr={},ro=e=>{const t=Me[Me.length-1],n=Vr[e.interactionId];if(n||Me.length<no||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{const r={id:e.interactionId,latency:e.duration,entries:[e]};Vr[r.id]=r,Me.push(r)}Me.sort((r,s)=>s.latency-r.latency),Me.splice(no).forEach(r=>{delete Vr[r.id]})}},qp=()=>{const e=Math.min(Me.length-1,Math.floor(bc()/50));return Me[e]},Gp=(e,t)=>{t=t||{},jp();const n=Tn("INP");let r;const s=o=>{o.forEach(c=>{c.interactionId&&ro(c),c.entryType==="first-input"&&!Me.some(l=>l.entries.some(d=>c.duration===d.duration&&c.startTime===d.startTime))&&ro(c)});const a=qp();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())},i=Jt("event",s,{durationThreshold:t.durationThreshold||40});r=vn(e,n,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),In(()=>{s(i.takeRecords()),n.value<0&&bc()>0&&(n.value=0,n.entries=[]),r(!0)}))},so={},Yp=e=>{const t=Ks(),n=Tn("LCP");let r;const s=o=>{const a=o[o.length-1];if(a){const c=Math.max(a.startTime-Vs(),0);c<t.firstHiddenTime&&(n.value=c,n.entries=[a],r())}},i=Jt("largest-contentful-paint",s);if(i){r=vn(e,n);const o=()=>{so[n.id]||(s(i.takeRecords()),i.disconnect(),so[n.id]=!0,r(!0))};return["keydown","click"].forEach(a=>{R.document&&addEventListener(a,o,{once:!0,capture:!0})}),In(o,!0),o}},ys=e=>{R.document&&(R.document.prerendering?addEventListener("prerenderingchange",()=>ys(e),!0):R.document.readyState!=="complete"?addEventListener("load",()=>ys(e),!0):setTimeout(e,0))},Vp=(e,t)=>{t=t||{};const n=Tn("TTFB"),r=vn(e,n,t.reportAllChanges);ys(()=>{const s=Cr();if(s){if(n.value=Math.max(s.responseStart-Vs(),0),n.value<0||n.value>performance.now())return;n.entries=[s],r(!0)}})},an={},ir={};let Ec,vc,Tc,Ic,wc;function Kp(e,t=!1){return wn("cls",e,Qp,Ec,t)}function kc(e,t=!1){return wn("lcp",e,th,Tc,t)}function Xp(e){return wn("ttfb",e,nh,Ic)}function Jp(e){return wn("fid",e,eh,vc)}function Zp(e){return wn("inp",e,rh,wc)}function Ge(e,t){return Rc(e,t),ir[e]||(sh(e),ir[e]=!0),Cc(e,t)}function Zt(e,t){const n=an[e];if(!(!n||!n.length))for(const r of n)try{r(t)}catch(s){L&&m.error(`Error while triggering instrumentation handler.
|
|
25
|
-
Type: ${e}
|
|
26
|
-
Name: ${je(r)}
|
|
27
|
-
Error:`,s)}}function Qp(){return Fp(e=>{Zt("cls",{metric:e}),Ec=e},{reportAllChanges:!0})}function eh(){return Up(e=>{Zt("fid",{metric:e}),vc=e})}function th(){return Yp(e=>{Zt("lcp",{metric:e}),Tc=e})}function nh(){return Vp(e=>{Zt("ttfb",{metric:e}),Ic=e})}function rh(){return Gp(e=>{Zt("inp",{metric:e}),wc=e})}function wn(e,t,n,r,s=!1){Rc(e,t);let i;return ir[e]||(i=n(),ir[e]=!0),r&&t({metric:r}),Cc(e,t,s?i:void 0)}function sh(e){const t={};e==="event"&&(t.durationThreshold=0),Jt(e,n=>{Zt(e,{entries:n})},t)}function Rc(e,t){an[e]=an[e]||[],an[e].push(t)}function Cc(e,t,n){return()=>{n&&n();const r=an[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function Kr(e){return typeof e=="number"&&isFinite(e)}function Ht(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}const ih=2147483647;function se(e){return e/1e3}function Xs(){return R&&R.addEventListener&&R.performance}let io=0,Z={},Re,cn;function xc(){const e=Xs();if(e&&ae){e.mark&&R.performance.mark("sentry-tracing-init");const t=ch(),n=oh(),r=ah(),s=uh();return()=>{t(),n(),r(),s()}}return()=>{}}function Ac(){Ge("longtask",({entries:e})=>{for(const t of e){const n=Ne();if(!n)return;const r=se(ae+t.startTime),s=se(t.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+s})}})}function Mc(){Ge("event",({entries:e})=>{for(const t of e){const n=Ne();if(!n)return;if(t.name==="click"){const r=se(ae+t.startTime),s=se(t.duration),i={description:ct(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+s},o=ya(t.target);o&&(i.attributes={"ui.component_name":o}),n.startChild(i)}}})}function Oc(e,t){if(Xs()&&ae){const r=lh(e,t);return()=>{r()}}return()=>{}}function oh(){return Kp(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(L&&m.log("[Measurements] Adding CLS"),Z.cls={value:e.value,unit:""},cn=t)},!0)}function ah(){return kc(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(L&&m.log("[Measurements] Adding LCP"),Z.lcp={value:e.value,unit:"millisecond"},Re=t)},!0)}function ch(){return Jp(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=se(ae),r=se(t.startTime);L&&m.log("[Measurements] Adding FID"),Z.fid={value:e.value,unit:"millisecond"},Z["mark.fid"]={value:n+r,unit:"second"}})}function uh(){return Xp(({metric:e})=>{e.entries[e.entries.length-1]&&(L&&m.log("[Measurements] Adding TTFB"),Z.ttfb={value:e.value,unit:"millisecond"})})}const oo={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function lh(e,t){return Zp(({metric:n})=>{if(n.value===void 0)return;const r=n.entries.find(E=>E.duration===n.value&&oo[E.name]!==void 0),s=A();if(!r||!s)return;const i=oo[r.name],o=s.getOptions(),a=se(ae+r.startTime),c=se(n.value),u=r.interactionId!==void 0?e[r.interactionId]:void 0;if(u===void 0)return;const{routeName:l,parentContext:d,activeTransaction:f,user:p,replayId:h}=u,_=p!==void 0?p.email||p.id||p.ip_address:void 0,b=f!==void 0?f.getProfileId():void 0,g=new kr({startTimestamp:a,endTimestamp:a+c,op:`ui.interaction.${i}`,name:ct(r.target),attributes:{release:o.release,environment:o.environment,transaction:l,..._!==void 0&&_!==""?{user:_}:{},...b!==void 0?{profile_id:b}:{},...h!==void 0?{replay_id:h}:{}},exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:"millisecond"}}}),S=yh(d,o,t);if(S&&Math.random()<S){const E=g?Xf([g],s.getDsn()):void 0,T=s&&s.getTransport();T&&E&&T.send(E).then(null,y=>{L&&m.error("Error while sending interaction:",y)});return}})}function Nc(e){const t=Xs();if(!t||!R.performance.getEntries||!ae)return;L&&m.log("[Tracing] Adding & adjusting spans using Performance API");const n=se(ae),r=t.getEntries(),{op:s,start_timestamp:i}=q(e);if(r.slice(io).forEach(o=>{const a=se(o.startTime),c=se(o.duration);if(!(e.op==="navigation"&&i&&n+a<i))switch(o.entryType){case"navigation":{fh(e,o,n);break}case"mark":case"paint":case"measure":{dh(e,o,a,c,n);const u=Ks(),l=o.startTime<u.firstHiddenTime;o.name==="first-paint"&&l&&(L&&m.log("[Measurements] Adding FP"),Z.fp={value:o.startTime,unit:"millisecond"}),o.name==="first-contentful-paint"&&l&&(L&&m.log("[Measurements] Adding FCP"),Z.fcp={value:o.startTime,unit:"millisecond"});break}case"resource":{hh(e,o,o.name,a,c,n);break}}}),io=Math.max(r.length-1,0),mh(e),s==="pageload"){_h(Z),["fcp","fp","lcp"].forEach(a=>{if(!Z[a]||!i||n>=i)return;const c=Z[a].value,u=n+se(c),l=Math.abs((u-i)*1e3),d=l-c;L&&m.log(`[Measurements] Normalized ${a} from ${c} to ${l} (${d})`),Z[a].value=l});const o=Z["mark.fid"];o&&Z.fid&&(Ht(e,{description:"first input delay",endTimestamp:o.value+se(Z.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:o.value}),delete Z["mark.fid"]),"fcp"in Z||delete Z.cls,Object.keys(Z).forEach(a=>{cf(a,Z[a].value,Z[a].unit)}),gh(e)}Re=void 0,cn=void 0,Z={}}function dh(e,t,n,r,s){const i=s+n,o=i+r;return Ht(e,{description:t.name,endTimestamp:o,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i}),i}function fh(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Fn(e,t,r,n)}),Fn(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),Fn(e,t,"fetch",n,"cache","domainLookupStart"),Fn(e,t,"domainLookup",n,"DNS"),ph(e,t,n)}function Fn(e,t,n,r,s,i){const o=i?t[i]:t[`${n}End`],a=t[`${n}Start`];!a||!o||Ht(e,{op:"browser",origin:"auto.browser.browser.metrics",description:s||n,startTimestamp:r+se(a),endTimestamp:r+se(o)})}function ph(e,t,n){t.responseEnd&&(Ht(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+se(t.requestStart),endTimestamp:n+se(t.responseEnd)}),Ht(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+se(t.responseStart),endTimestamp:n+se(t.responseEnd)}))}function hh(e,t,n,r,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o=tt(n),a={};Xr(a,t,"transferSize","http.response_transfer_size"),Xr(a,t,"encodedBodySize","http.response_content_length"),Xr(a,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(a["resource.render_blocking_status"]=t.renderBlockingStatus),o.protocol&&(a["url.scheme"]=o.protocol.split(":").pop()),o.host&&(a["server.address"]=o.host),a["url.same_origin"]=n.includes(R.location.origin);const c=i+r,u=c+s;Ht(e,{description:n.replace(R.location.origin,""),endTimestamp:u,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:c,data:a})}function mh(e){const t=R.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),Kr(n.rtt)&&(Z["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Kr(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),Kr(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function gh(e){Re&&(L&&m.log("[Measurements] Adding LCP Data"),Re.element&&e.setTag("lcp.element",ct(Re.element)),Re.id&&e.setTag("lcp.id",Re.id),Re.url&&e.setTag("lcp.url",Re.url.trim().slice(0,200)),e.setTag("lcp.size",Re.size)),cn&&cn.sources&&(L&&m.log("[Measurements] Adding CLS Data"),cn.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,ct(t.node))))}function Xr(e,t,n,r){const s=t[n];s!=null&&s<ih&&(e[r]=s)}function _h(e){const t=Cr();if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(L&&m.log("[Measurements] Adding TTFB Request Time"),e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function yh(e,t,n){if(!Kt(t))return!1;let r;return e!==void 0&&typeof t.tracesSampler=="function"?r=t.tracesSampler({transactionContext:e,name:e.name,parentSampled:e.parentSampled,attributes:{...e.data,...e.attributes},location:R.location}):e!==void 0&&e.sampled!==void 0?r=e.sampled:typeof t.tracesSampleRate<"u"?r=t.tracesSampleRate:r=1,Va(r)?r===!0?n:r===!1?0:r*n:(L&&m.warn("[Tracing] Discarding interaction span because of invalid sample rate."),!1)}function Sh(e,t,n,r,s="auto.http.browser"){if(!Kt()||!e.fetchData)return;const i=t(e.fetchData.url);if(e.endTimestamp&&i){const p=e.fetchData.__span;if(!p)return;const h=r[p];h&&(vh(h,e),delete r[p]);return}const o=ce(),a=A(),{method:c,url:u}=e.fetchData,l=Eh(u),d=l?tt(l).host:void 0,f=i?nt({name:`${c} ${u}`,onlyIfParent:!0,attributes:{url:u,type:"fetch","http.method":c,"http.url":l,"server.address":d,[me]:s},op:"http.client"}):void 0;if(f&&(e.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f),n(e.fetchData.url)&&a){const p=e.args[0];e.args[1]=e.args[1]||{};const h=e.args[1];h.headers=bh(p,a,o,h,f)}return f}function bh(e,t,n,r,s){const i=s||n.getSpan(),o=Yt(),{traceId:a,spanId:c,sampled:u,dsc:l}={...o.getPropagationContext(),...n.getPropagationContext()},d=i?Sr(i):Sa(a,c,u),f=ba(l||(i?hn(i):Hs(a,t,n))),p=r.headers||(typeof Request<"u"&&pn(e,Request)?e.headers:void 0);if(p)if(typeof Headers<"u"&&pn(p,Headers)){const h=new Headers(p);return h.append("sentry-trace",d),f&&h.append(os,f),h}else if(Array.isArray(p)){const h=[...p,["sentry-trace",d]];return f&&h.push([os,f]),h}else{const h="baggage"in p?p.baggage:void 0,_=[];return Array.isArray(h)?_.push(...h):h&&_.push(h),f&&_.push(f),{...p,"sentry-trace":d,baggage:_.length>0?_.join(","):void 0}}else return{"sentry-trace":d,baggage:f}}function Eh(e){try{return new URL(e).href}catch{return}}function vh(e,t){if(t.response){qs(e,t.response.status);const n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus("internal_error");e.end()}const Ss=["localhost",/^\/(?!\/)/],or={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:Ss,tracePropagationTargets:Ss};function Dc(e){const{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o}={traceFetch:or.traceFetch,traceXHR:or.traceXHR,...e},a=typeof i=="function"?i:l=>!0,c=l=>kh(l,r||s),u={};t&&vr(l=>{const d=Sh(l,a,c,u);if(d){const f=Lc(l.fetchData.url),p=f?tt(f).host:void 0;d.setAttributes({"http.url":f,"server.address":p})}o&&d&&ao(d)}),n&&Tr(l=>{const d=Rh(l,a,c,u);o&&d&&ao(d)})}function Th(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function ao(e){const{url:t}=q(e).data||{};if(!t||typeof t!="string")return;const n=Ge("resource",({entries:r})=>{r.forEach(s=>{Th(s)&&s.name.endsWith(t)&&(wh(s).forEach(o=>e.setAttribute(...o)),setTimeout(n))})})}function Ih(e){let t="unknown",n="unknown",r="";for(const s of e){if(s==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:n}}function ke(e=0){return((ae||performance.timeOrigin)+e)/1e3}function wh(e){const{name:t,version:n}=Ih(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),ae?[...r,["http.request.redirect_start",ke(e.redirectStart)],["http.request.fetch_start",ke(e.fetchStart)],["http.request.domain_lookup_start",ke(e.domainLookupStart)],["http.request.domain_lookup_end",ke(e.domainLookupEnd)],["http.request.connect_start",ke(e.connectStart)],["http.request.secure_connection_start",ke(e.secureConnectionStart)],["http.request.connection_end",ke(e.connectEnd)],["http.request.request_start",ke(e.requestStart)],["http.request.response_start",ke(e.responseStart)],["http.request.response_end",ke(e.responseEnd)]]:r}function kh(e,t){return Vt(e,t||Ss)}function Rh(e,t,n,r){const s=e.xhr,i=s&&s[Oe];if(!Kt()||!s||s.__sentry_own_request__||!i)return;const o=t(i.url);if(e.endTimestamp&&o){const p=s.__sentry_xhr_span_id__;if(!p)return;const h=r[p];h&&i.status_code!==void 0&&(qs(h,i.status_code),h.end(),delete r[p]);return}const a=ce(),c=Yt(),u=Lc(i.url),l=u?tt(u).host:void 0,d=o?nt({name:`${i.method} ${i.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":i.method,"http.url":u,url:i.url,"server.address":l,[me]:"auto.http.browser"},op:"http.client"}):void 0;d&&(s.__sentry_xhr_span_id__=d.spanContext().spanId,r[s.__sentry_xhr_span_id__]=d);const f=A();if(s.setRequestHeader&&n(i.url)&&f){const{traceId:p,spanId:h,sampled:_,dsc:b}={...c.getPropagationContext(),...a.getPropagationContext()},g=d?Sr(d):Sa(p,h,_),S=ba(b||(d?hn(d):Hs(p,f,a)));Ch(s,g,S)}return d}function Ch(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(os,n)}catch{}}function Lc(e){try{return new URL(e,R.location.origin).href}catch{return}}function xh(e,t=!0,n=!0){if(!R||!R.location){L&&m.warn("Could not initialize routing instrumentation due to invalid location");return}let r=R.location.href,s;t&&(s=e({name:R.location.pathname,startTimestamp:ae?ae/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&En(({to:i,from:o})=>{if(o===void 0&&r&&r.indexOf(i)!==-1){r=void 0;return}o!==i&&(r=void 0,s&&(L&&m.log(`[Tracing] Finishing current transaction with op: ${s.op}`),s.end()),s=e({name:R.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}const Ah="BrowserTracing",Mh={...on,markBackgroundTransactions:!0,routingInstrumentation:xh,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...or},co=10;class uv{constructor(t){this.name=Ah,this._hasSetTracePropagationTargets=!1,Ka(),L&&(this._hasSetTracePropagationTargets=!!(t&&(t.tracePropagationTargets||t.tracingOrigins))),this.options={...Mh,...t},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=xc(),this._interactionIdToRouteNameMapping={},this.options.enableInp&&Oc(this._interactionIdToRouteNameMapping,this.options.interactionsSampleRate),this.options.enableLongTask&&Ac(),this.options._experiments.enableInteractions&&Mc(),this._latestRoute={name:void 0,context:void 0}}setupOnce(t,n){this._getCurrentHub=n;const s=n().getClient(),i=s&&s.getOptions(),{routingInstrumentation:o,startTransactionOnLocationChange:a,startTransactionOnPageLoad:c,markBackgroundTransactions:u,traceFetch:l,traceXHR:d,shouldCreateSpanForRequest:f,enableHTTPTimings:p,_experiments:h}=this.options,_=i&&i.tracePropagationTargets,b=_||this.options.tracePropagationTargets;L&&this._hasSetTracePropagationTargets&&_&&m.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),o(g=>{const S=this._createRouteTransaction(g);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(S,g,n),S},c,a),u&&yc(),h.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),Dc({traceFetch:l,traceXHR:d,tracePropagationTargets:b,shouldCreateSpanForRequest:f,enableHTTPTimings:p})}_createRouteTransaction(t){if(!this._getCurrentHub){L&&m.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`);return}const n=this._getCurrentHub(),{beforeNavigate:r,idleTimeout:s,finalTimeout:i,heartbeatInterval:o}=this.options,a=t.op==="pageload";let c;if(a){const p=a?uo("sentry-trace"):"",h=a?uo("baggage"):void 0,{traceId:_,dsc:b,parentSpanId:g,sampled:S}=Ea(p,h);c={traceId:_,parentSpanId:g,parentSampled:S,...t,metadata:{...t.metadata,dynamicSamplingContext:b},trimEnd:!0}}else c={trimEnd:!0,...t};const u=typeof r=="function"?r(c):c,l=u===void 0?{...c,sampled:!1}:u;l.metadata=l.name!==c.name?{...l.metadata,source:"custom"}:l.metadata,this._latestRoute.name=l.name,this._latestRoute.context=l,l.sampled===!1&&L&&m.log(`[Tracing] Will not send ${l.op} transaction because of beforeNavigate.`),L&&m.log(`[Tracing] Starting ${l.op} transaction on scope`);const{location:d}=R,f=nr(n,l,s,i,!0,{location:d},o,a);return a&&R.document&&(R.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(R.document.readyState)&&f.sendAutoFinishSignal()}),["interactive","complete"].includes(R.document.readyState)&&f.sendAutoFinishSignal()),f.registerBeforeFinishCallback(p=>{this._collectWebVitals(),Nc(p)}),f}_registerInteractionListener(){let t;const n=()=>{const{idleTimeout:r,finalTimeout:s,heartbeatInterval:i}=this.options,o="ui.action.click",a=Ne();if(a&&a.op&&["navigation","pageload"].includes(a.op)){L&&m.warn(`[Tracing] Did not create ${o} transaction because a pageload or navigation transaction is in progress.`);return}if(t&&(t.setFinishReason("interactionInterrupted"),t.end(),t=void 0),!this._getCurrentHub){L&&m.warn(`[Tracing] Did not create ${o} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRoute.name){L&&m.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`);return}const c=this._getCurrentHub(),{location:u}=R,l={name:this._latestRoute.name,op:o,trimEnd:!0,data:{[te]:this._latestRoute.context?Oh(this._latestRoute.context):"url"}};t=nr(c,l,r,s,!0,{location:u},i)};["click"].forEach(r=>{R.document&&addEventListener(r,n,{once:!1,capture:!0})})}_registerInpInteractionListener(){const t=({entries:n})=>{const r=A(),s=r!==void 0&&r.getIntegrationByName!==void 0?r.getIntegrationByName("Replay"):void 0,i=s!==void 0?s.getReplayId():void 0,o=Ne(),a=ce(),c=a!==void 0?a.getUser():void 0;n.forEach(u=>{if(Nh(u)){const l=u.interactionId;if(l===void 0)return;const d=this._interactionIdToRouteNameMapping[l],f=u.duration,p=u.startTime,h=Object.keys(this._interactionIdToRouteNameMapping),_=h.length>0?h.reduce((b,g)=>this._interactionIdToRouteNameMapping[b].duration<this._interactionIdToRouteNameMapping[g].duration?b:g):void 0;if(u.entryType==="first-input"&&h.map(g=>this._interactionIdToRouteNameMapping[g]).some(g=>g.duration===f&&g.startTime===p)||!l)return;if(d)d.duration=Math.max(d.duration,f);else if(h.length<co||_===void 0||f>this._interactionIdToRouteNameMapping[_].duration){const b=this._latestRoute.name,g=this._latestRoute.context;b&&g&&(_&&Object.keys(this._interactionIdToRouteNameMapping).length>=co&&delete this._interactionIdToRouteNameMapping[_],this._interactionIdToRouteNameMapping[l]={routeName:b,duration:f,parentContext:g,user:c,activeTransaction:o,replayId:i,startTime:p})}}})};Ge("event",t),Ge("first-input",t)}}function uo(e){const t=va(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function Oh(e){const t=e.attributes&&e.attributes[te],n=e.data&&e.data[te],r=e.metadata&&e.metadata.source;return t||n||r}function Nh(e){return"duration"in e}const Dh="BrowserTracing",Lh={...on,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...or},xr=((e={})=>{const t=L?!!(e.tracePropagationTargets||e.tracingOrigins):!1;Ka(),!e.tracePropagationTargets&&e.tracingOrigins&&(e.tracePropagationTargets=e.tracingOrigins);const n={...Lh,...e},r=xc(),s={};n.enableInp&&Oc(s,n.interactionsSampleRate),n.enableLongTask&&Ac(),n._experiments.enableInteractions&&Mc();const i={name:void 0,context:void 0};function o(a){const c=we(),{beforeStartSpan:u,idleTimeout:l,finalTimeout:d,heartbeatInterval:f}=n,p=a.op==="pageload";let h;if(p){const S=p?lo("sentry-trace"):"",E=p?lo("baggage"):void 0,{traceId:T,dsc:y,parentSpanId:v,sampled:x}=Ea(S,E);h={traceId:T,parentSpanId:v,parentSampled:x,...a,metadata:{...a.metadata,dynamicSamplingContext:y},trimEnd:!0}}else h={trimEnd:!0,...a};const _=u?u(h):h;_.metadata=_.name!==h.name?{..._.metadata,source:"custom"}:_.metadata,i.name=_.name,i.context=_,_.sampled===!1&&L&&m.log(`[Tracing] Will not send ${_.op} transaction because of beforeNavigate.`),L&&m.log(`[Tracing] Starting ${_.op} transaction on scope`);const{location:b}=R,g=nr(c,_,l,d,!0,{location:b},f,p);return p&&R.document&&(R.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(R.document.readyState)&&g.sendAutoFinishSignal()}),["interactive","complete"].includes(R.document.readyState)&&g.sendAutoFinishSignal()),g.registerBeforeFinishCallback(S=>{r(),Nc(S)}),g}return{name:Dh,setupOnce:()=>{},afterAllSetup(a){const c=a.getOptions(),{markBackgroundSpan:u,traceFetch:l,traceXHR:d,shouldCreateSpanForRequest:f,enableHTTPTimings:p,_experiments:h}=n,_=c&&c.tracePropagationTargets,b=_||n.tracePropagationTargets;L&&t&&_&&m.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.");let g,S=R.location&&R.location.href;if(a.on&&(a.on("startNavigationSpan",E=>{g&&(L&&m.log(`[Tracing] Finishing current transaction with op: ${q(g).op}`),g.end()),g=o({op:"navigation",...E})}),a.on("startPageLoadSpan",E=>{g&&(L&&m.log(`[Tracing] Finishing current transaction with op: ${q(g).op}`),g.end()),g=o({op:"pageload",...E})})),n.instrumentPageLoad&&a.emit&&R.location){const E={name:R.location.pathname,startTimestamp:ae?ae/1e3:void 0,origin:"auto.pageload.browser",attributes:{[te]:"url"}};kn(a,E)}n.instrumentNavigation&&a.emit&&R.location&&En(({to:E,from:T})=>{if(T===void 0&&S&&S.indexOf(E)!==-1){S=void 0;return}if(T!==E){S=void 0;const y={name:R.location.pathname,origin:"auto.navigation.browser",attributes:{[te]:"url"}};Rn(a,y)}}),u&&yc(),h.enableInteractions&&Ph(n,i),n.enableInp&&Fh(s,i),Dc({traceFetch:l,traceXHR:d,tracePropagationTargets:b,shouldCreateSpanForRequest:f,enableHTTPTimings:p})},options:n}});function kn(e,t){if(!e.emit)return;e.emit("startPageLoadSpan",t);const n=Xt();return(n&&q(n).op)==="pageload"?n:void 0}function Rn(e,t){if(!e.emit)return;e.emit("startNavigationSpan",t);const n=Xt();return(n&&q(n).op)==="navigation"?n:void 0}function lo(e){const t=va(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function Ph(e,t){let n;const r=()=>{const{idleTimeout:s,finalTimeout:i,heartbeatInterval:o}=e,a="ui.action.click",c=Ne();if(c&&c.op&&["navigation","pageload"].includes(c.op)){L&&m.warn(`[Tracing] Did not create ${a} transaction because a pageload or navigation transaction is in progress.`);return}if(n&&(n.setFinishReason("interactionInterrupted"),n.end(),n=void 0),!t.name){L&&m.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}const{location:u}=R,l={name:t.name,op:a,trimEnd:!0,data:{[te]:t.context?Bh(t.context):"url"}};n=nr(we(),l,s,i,!0,{location:u},o)};["click"].forEach(s=>{R.document&&addEventListener(s,r,{once:!1,capture:!0})})}function $h(e){return"duration"in e}const fo=10;function Fh(e,t){const n=({entries:r})=>{const s=A(),i=s!==void 0&&s.getIntegrationByName!==void 0?s.getIntegrationByName("Replay"):void 0,o=i!==void 0?i.getReplayId():void 0,a=Ne(),c=ce(),u=c!==void 0?c.getUser():void 0;r.forEach(l=>{if($h(l)){const d=l.interactionId;if(d===void 0)return;const f=e[d],p=l.duration,h=l.startTime,_=Object.keys(e),b=_.length>0?_.reduce((g,S)=>e[g].duration<e[S].duration?g:S):void 0;if(l.entryType==="first-input"&&_.map(S=>e[S]).some(S=>S.duration===p&&S.startTime===h)||!d)return;if(f)f.duration=Math.max(f.duration,p);else if(_.length<fo||b===void 0||p>e[b].duration){const g=t.name,S=t.context;g&&S&&(b&&Object.keys(e).length>=fo&&delete e[b],e[d]={routeName:g,duration:p,parentContext:S,user:u,activeTransaction:a,replayId:o,startTime:h})}}})};Ge("event",n),Ge("first-input",n)}function Bh(e){const t=e.attributes&&e.attributes[te],n=e.data&&e.data[te],r=e.metadata&&e.metadata.source;return t||n||r}const I=W;let bs=0;function Pc(){return bs>0}function Hh(){bs++,setTimeout(()=>{bs--})}function ut(e,t={},n){if(typeof e!="function")return e;try{const s=e.__sentry_wrapped__;if(s)return typeof s=="function"?s:e;if(Us(e))return e}catch{return e}const r=function(){const s=Array.prototype.slice.call(arguments);try{const i=s.map(o=>ut(o,t));return e.apply(this,i)}catch(i){throw Hh(),dt(o=>{o.addEventProcessor(a=>(t.mechanism&&(as(a,void 0),Ft(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),bn(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}Gl(r,e),ot(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const $=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function $c(e,t){const n=Js(e,t),r={type:t&&t.name,value:jh(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Uh(e,t,n,r){const s=A(),i=s&&s.getOptions().normalizeDepth,o={exception:{values:[{type:zs(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Yh(t,{isUnhandledRejection:r})}]},extra:{__serialized__:Vl(t,i)}};if(n){const a=Js(e,n);a.length&&(o.exception.values[0].stacktrace={frames:a})}return o}function Jr(e,t){return{exception:{values:[$c(e,t)]}}}function Js(e,t){const n=t.stacktrace||t.stack||"",r=zh(t);try{return e(n,r)}catch{}return[]}const Wh=/Minified React error #\d+;/i;function zh(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(Wh.test(e.message))return 1}return 0}function jh(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function qh(e,t,n,r){const s=n&&n.syntheticException||void 0,i=Zs(e,t,s,r);return Ft(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),$t(i)}function Gh(e,t,n="info",r,s){const i=r&&r.syntheticException||void 0,o=Es(e,t,i,s);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),$t(o)}function Zs(e,t,n,r,s){let i;if(Ws(t)&&t.error)return Jr(e,t.error);if(Ci(t)||Yl(t)){const o=t;if("stack"in t)i=Jr(e,t);else{const a=o.name||(Ci(o)?"DOMError":"DOMException"),c=o.message?`${a}: ${o.message}`:a;i=Es(e,c,n,r),as(i,c)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Ot(t)?Jr(e,t):Qn(t)||zs(t)?(i=Uh(e,t,n,s),Ft(i,{synthetic:!0}),i):(i=Es(e,t,n,r),as(i,`${t}`),Ft(i,{synthetic:!0}),i)}function Es(e,t,n,r){const s={};if(r&&n){const i=Js(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]})}if(_a(t)){const{__sentry_template_string__:i,__sentry_template_values__:o}=t;return s.logentry={message:i,params:o},s}return s.message=t,s}function Yh(e,{isUnhandledRejection:t}){const n=Kl(e),r=t?"promise rejection":"exception";return Ws(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:zs(e)?`Event \`${Vh(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Vh(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Kh(e,{metadata:t,tunnel:n,dsn:r}){const s={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:ft(r)}},i=Xh(e);return De(s,[i])}function Xh(e){return[{type:"user_report"},e]}class Jh extends Mf{constructor(t){const n=I.SENTRY_SDK_SOURCE||Rd();cc(t,"browser",["browser"],n),super(t),t.sendClientReports&&I.document&&I.document.addEventListener("visibilitychange",()=>{I.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return qh(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Gh(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){$&&m.warn("SDK not enabled, will not capture user feedback.");return}const n=Kh(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}_flushOutcomes(){const t=this._clearOutcomes();if(t.length===0){$&&m.log("No outcomes to send");return}if(!this._dsn){$&&m.log("No dsn provided, will not send outcomes");return}$&&m.log("Sending outcomes:",t);const n=jd(t,this._options.tunnel&&ft(this._dsn));this._sendEnvelope(n)}}let rn;function Zh(){if(rn)return rn;if(fs(I.fetch))return rn=I.fetch.bind(I);const e=I.document;let t=I.fetch;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){$&&m.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return rn=t.bind(I)}function Qh(){rn=void 0}function em(e,t=Zh()){let n=0,r=0;function s(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,a).then(c=>(n-=o,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return Qh(),n-=o,r--,Ps(c)}}return ic(e,s)}const tm=4;function nm(e){function t(n){return new Ls((r,s)=>{const i=new XMLHttpRequest;i.onerror=s,i.onreadystatechange=()=>{i.readyState===tm&&r({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url);for(const o in e.headers)Object.prototype.hasOwnProperty.call(e.headers,o)&&i.setRequestHeader(o,e.headers[o]);i.send(n.body)})}return ic(e,t)}const Qt="?",rm=10,sm=20,im=30,om=40,am=50;function Cn(e,t,n,r){const s={filename:e,function:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const cm=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,um=/\((\S*)(?::(\d+))(?::(\d+))\)/,lm=e=>{const t=cm.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){const i=um.exec(t[2]);i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3])}const[r,s]=Fc(t[1]||Qt,t[2]);return Cn(s,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},dm=[im,lm],fm=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,pm=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,hm=e=>{const t=fm.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=pm.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],s=t[1]||Qt;return[s,r]=Fc(s,r),Cn(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},mm=[am,hm],gm=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,_m=e=>{const t=gm.exec(e);return t?Cn(t[2],t[1]||Qt,+t[3],t[4]?+t[4]:void 0):void 0},ym=[om,_m],Sm=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,bm=e=>{const t=Sm.exec(e);return t?Cn(t[2],t[3]||Qt,+t[1]):void 0},lv=[rm,bm],Em=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,vm=e=>{const t=Em.exec(e);return t?Cn(t[5],t[3]||t[4]||Qt,+t[1],+t[2]):void 0},dv=[sm,vm],Tm=[dm,mm,ym],Im=Xl(...Tm),Fc=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Qt,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Bn=1024,Bc="Breadcrumbs",wm=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Bc,setupOnce(){},setup(n){t.console&&Ca(xm(n)),t.dom&&xa(Cm(n,t.dom)),t.xhr&&Tr(Am(n)),t.fetch&&vr(Mm(n)),t.history&&En(Om(n)),t.sentry&&n.on&&n.on("beforeSendEvent",Rm(n))}}}),Hc=wm,km=Q(Bc,Hc);function Rm(e){return function(n){A()===e&&qe({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Ue(n)},{event:n})}}function Cm(e,t){return function(r){if(A()!==e)return;let s,i,o=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Bn&&($&&m.warn(`\`dom.maxStringLength\` cannot exceed ${Bn}, but a value of ${a} was configured. Sentry will use ${Bn} instead.`),a=Bn),typeof o=="string"&&(o=[o]);try{const u=r.event,l=Nm(u)?u.target:u;s=ct(l,{keyAttrs:o,maxStringLength:a}),i=ya(l)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};i&&(c.data={"ui.component_name":i}),qe(c,{event:r.event,name:r.name,global:r.global})}}function xm(e){return function(n){if(A()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Da(n.level),message:er(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${er(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;qe(r,{input:n.args,level:n.level})}}function Am(e){return function(n){if(A()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[Oe];if(!r||!s||!i)return;const{method:o,url:a,status_code:c,body:u}=i,l={method:o,url:a,status_code:c},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s};qe({category:"xhr",data:l,type:"http"},d)}}function Mm(e){return function(n){if(A()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};qe({category:"fetch",data:i,level:"error",type:"http"},o)}else{const i=n.response,o={...n.fetchData,status_code:i&&i.status},a={input:n.args,response:i,startTimestamp:r,endTimestamp:s};qe({category:"fetch",data:o,type:"http"},a)}}}function Om(e){return function(n){if(A()!==e)return;let r=n.from,s=n.to;const i=tt(I.location.href);let o=r?tt(r):void 0;const a=tt(s);(!o||!o.path)&&(o=i),i.protocol===a.protocol&&i.host===a.host&&(s=a.relative),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),qe({category:"navigation",data:{from:r,to:s}})}}function Nm(e){return!!e&&!!e.target}const Uc="Dedupe",Dm=(()=>{let e;return{name:Uc,setupOnce(){},processEvent(t){if(t.type)return t;try{if(Pm(t,e))return $&&m.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),Wc=Dm,Lm=Q(Uc,Wc);function Pm(e,t){return t?!!($m(e,t)||Fm(e,t)):!1}function $m(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!jc(e,t)||!zc(e,t))}function Fm(e,t){const n=po(t),r=po(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!jc(e,t)||!zc(e,t))}function zc(e,t){let n=ho(e),r=ho(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function jc(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function po(e){return e.exception&&e.exception.values&&e.exception.values[0]}function ho(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}const qc="GlobalHandlers",Bm=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:qc,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Um(n),mo("onerror")),t.onunhandledrejection&&(Wm(n),mo("onunhandledrejection"))}}}),Gc=Bm,Hm=Q(qc,Gc);function Um(e){Oa(t=>{const{stackParser:n,attachStacktrace:r}=Vc();if(A()!==e||Pc())return;const{msg:s,url:i,line:o,column:a,error:c}=t,u=c===void 0&&Mt(s)?qm(s,i,o,a):Yc(Zs(n,c||s,void 0,r,!1),i,o,a);u.level="error",br(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function Wm(e){Na(t=>{const{stackParser:n,attachStacktrace:r}=Vc();if(A()!==e||Pc())return;const s=zm(t),i=Fs(s)?jm(s):Zs(n,s,void 0,r,!0);i.level="error",br(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function zm(e){if(Fs(e))return e;const t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return e}function jm(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function qm(e,t,n,r){const s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let i=Ws(e)?e.message:e,o="Error";const a=i.match(s);return a&&(o=a[1],i=a[2]),Yc({exception:{values:[{type:o,value:i}]}},t,n,r)}function Yc(e,t,n,r){const s=e.exception=e.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},a=o.stacktrace=o.stacktrace||{},c=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,d=Mt(t)&&t.length>0?t:Ta();return c.length===0&&c.push({colno:u,filename:d,function:"?",in_app:!0,lineno:l}),e}function mo(e){$&&m.log(`Global Handler attached: ${e}`)}function Vc(){const e=A();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Kc="HttpContext",Gm=(()=>({name:Kc,setupOnce(){},preprocessEvent(e){if(!I.navigator&&!I.location&&!I.document)return;const t=e.request&&e.request.url||I.location&&I.location.href,{referrer:n}=I.document||{},{userAgent:r}=I.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:s};e.request=i}})),Xc=Gm,Ym=Q(Kc,Xc),Vm="cause",Km=5,Jc="LinkedErrors",Xm=((e={})=>{const t=e.limit||Km,n=e.key||Vm;return{name:Jc,setupOnce(){},preprocessEvent(r,s,i){const o=i.getOptions();Ia($c,o.stackParser,o.maxValueLength,n,t,r,s)}}}),Zc=Xm,Jm=Q(Jc,Zc),Zm=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Qc="TryCatch",Qm=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Qc,setupOnce(){t.setTimeout&&ie(I,"setTimeout",go),t.setInterval&&ie(I,"setInterval",go),t.requestAnimationFrame&&ie(I,"requestAnimationFrame",tg),t.XMLHttpRequest&&"XMLHttpRequest"in I&&ie(XMLHttpRequest.prototype,"send",ng);const n=t.eventTarget;n&&(Array.isArray(n)?n:Zm).forEach(rg)}}}),eu=Qm,eg=Q(Qc,eu);function go(e){return function(...t){const n=t[0];return t[0]=ut(n,{mechanism:{data:{function:je(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function tg(e){return function(t){return e.apply(this,[ut(t,{mechanism:{data:{function:"requestAnimationFrame",handler:je(e)},handled:!1,type:"instrument"}})])}}function ng(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&ie(n,s,function(i){const o={mechanism:{data:{function:s,handler:je(i)},handled:!1,type:"instrument"}},a=Us(i);return a&&(o.mechanism.data.handler=je(a)),ut(i,o)})}),e.apply(this,t)}}function rg(e){const t=I,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(ie(n,"addEventListener",function(r){return function(s,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=ut(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:je(i),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,ut(i,{mechanism:{data:{function:"addEventListener",handler:je(i),target:e},handled:!1,type:"instrument"}}),o])}}),ie(n,"removeEventListener",function(r){return function(s,i,o){const a=i;try{const c=a&&a.__sentry_wrapped__;c&&r.call(this,s,c,o)}catch{}return r.call(this,s,a,o)}}))}const sg=[fc(),hc(),eu(),Hc(),Gc(),Zc(),Wc(),Xc()];function ig(e){return[...sg]}function og(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=ig()),e.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(e.release=__SENTRY_RELEASE__),I.SENTRY_RELEASE&&I.SENTRY_RELEASE.id&&(e.release=I.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0);const t={...e,stackParser:Jl(e.stackParser||Im),integrations:gf(e),transport:e.transport||(Aa()?em:nm)};Uf(Jh,t),e.autoSessionTracking&&ag()}const _o=(e={},t=we())=>{if(!I.document){$&&m.error("Global document not defined in showReportDialog call");return}const{client:n,scope:r}=t.getStackTop(),s=e.dsn||n&&n.getDsn();if(!s){$&&m.error("DSN not configured for showReportDialog call");return}r&&(e.user={...r.getUser(),...e.user}),e.eventId||(e.eventId=t.lastEventId());const i=I.document.createElement("script");i.async=!0,i.crossOrigin="anonymous",i.src=hf(s,e),e.onLoad&&(i.onload=e.onLoad);const{onClose:o}=e;if(o){const c=u=>{if(u.data==="__sentry_reportdialog_closed__")try{o()}finally{I.removeEventListener("message",c)}};I.addEventListener("message",c)}const a=I.document.head||I.document.body;a?a.appendChild(i):$&&m.error("Not injecting report dialog. No injection point found in HTML")};function fv(){}function pv(e){e()}function hv(e){return ut(e)()}function ag(){if(typeof I.document>"u"){$&&m.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}xi({ignoreDuration:!0}),Ai(),En(({from:e,to:t})=>{e!==void 0&&e!==t&&(xi({ignoreDuration:!0}),Ai())})}function mv(e){const t=A();t&&t.captureUserFeedback(e)}const cg=Object.freeze(Object.defineProperty({__proto__:null,Breadcrumbs:km,Dedupe:Lm,GlobalHandlers:Hm,HttpContext:Ym,LinkedErrors:Jm,TryCatch:eg},Symbol.toStringTag,{value:"Module"})),Y=W,Qs="sentryReplaySession",ug="replay_event",ei="Unable to send Replay",lg=3e5,dg=9e5,fg=5e3,pg=5500,hg=6e4,mg=5e3,gg=3,yo=15e4,Hn=5e3,_g=3e3,yg=300,ti=2e7,Sg=4999,bg=15e3,So=36e5;function Eg(e,t){return e??t()}function ar(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}var re;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(re||(re={}));function vg(e){return e.nodeType===e.ELEMENT_NODE}function un(e){const t=ar([e,"optionalAccess",n=>n.host]);return ar([t,"optionalAccess",n=>n.shadowRoot])===e}function ln(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Tg(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function Ig(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function cr(e){try{const t=e.rules||e.cssRules;return t?Tg(Array.from(t,tu).join("")):null}catch{return null}}function tu(e){let t;if(kg(e))try{t=cr(e.styleSheet)||Ig(e)}catch{}else if(Rg(e)&&e.selectorText.includes(":"))return wg(e.cssText);return t||e.cssText}function wg(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function kg(e){return"styleSheet"in e}function Rg(e){return"selectorText"in e}class nu{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const n=ar([this,"access",r=>r.getMeta,"call",r=>r(t),"optionalAccess",r=>r.id]);return Eg(n,()=>-1)}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Cg(){return new nu}function Ar({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function mn({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function Ut(e){return e.toLowerCase()}function vs(e){return e.toUpperCase()}const bo="__rrweb_original__";function xg(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let s=0;s<e.height;s+=n){const i=t.getImageData,o=bo in i?i[bo]:i;if(new Uint32Array(o.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(c=>c!==0))return!1}return!0}function ni(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ut(t):null}function ur(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}let Ag=1;const Mg=new RegExp("[^a-z0-9-_:]"),gn=-2;function ri(){return Ag++}function Og(e){if(e instanceof HTMLFormElement)return"form";const t=Ut(e.tagName);return Mg.test(t)?"div":t}function Ng(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let St,Eo;const Dg=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Lg=/^(?:[a-z+]+:)?\/\//i,Pg=/^www\..*/i,$g=/^(data:)([^,]*),(.*)/i;function lr(e,t){return(e||"").replace(Dg,(n,r,s,i,o,a)=>{const c=s||o||a,u=r||i||"";if(!c)return n;if(Lg.test(c)||Pg.test(c))return`url(${u}${c}${u})`;if($g.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${Ng(t)+c}${u})`;const l=t.split("/"),d=c.split("/");l.pop();for(const f of d)f!=="."&&(f===".."?l.pop():l.push(f));return`url(${u}${l.join("/")}${u})`})}const Fg=/^[^ \t\n\r\u000c]+/,Bg=/^[, \t\n\r\u000c]+/;function Hg(e,t){if(t.trim()==="")return t;let n=0;function r(i){let o;const a=i.exec(t.substring(n));return a?(o=a[0],n+=o.length,o):""}const s=[];for(;r(Bg),!(n>=t.length);){let i=r(Fg);if(i.slice(-1)===",")i=wt(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=wt(e,i);let a=!1;for(;;){const c=t.charAt(n);if(c===""){s.push((i+o).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,s.push((i+o).trim());break}else c==="("&&(a=!0);o+=c,n+=1}}}return s.join(", ")}function wt(e,t){if(!t||t.trim()==="")return t;const n=e.createElement("a");return n.href=t,n.href}function Ug(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function si(){const e=document.createElement("a");return e.href="",e.href}function ru(e,t,n,r,s,i){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?wt(e,r):n==="srcset"?Hg(e,r):n==="style"?lr(r,si()):t==="object"&&n==="data"?wt(e,r):typeof i=="function"?i(n,r,s):r)}function su(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function Wg(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}function zg(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Qe(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Qe(e.parentNode,t,n,r+1)}function kt(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(zg(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Wt(e,t,n,r,s,i){try{const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){const u=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(i){if(c=Qe(o,kt(r,s)),c<0)return!0;a=Qe(o,kt(t,n),c>=0?c:1/0)}else{if(a=Qe(o,kt(t,n)),a<0)return!1;c=Qe(o,kt(r,s),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!i}catch{}return!!i}function jg(e,t,n){const r=e.contentWindow;if(!r)return;let s=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const a=setTimeout(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{clearTimeout(a),s=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function qg(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const i=setTimeout(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{clearTimeout(i),r=!0,t()})}function Gg(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:h={},maskTextFn:_,maskInputFn:b,dataURLOptions:g={},inlineImages:S,recordCanvas:E,keepIframeSrcFn:T,newlyAddedElement:y=!1}=t,v=Yg(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:re.Document,childNodes:[],compatMode:e.compatMode}:{type:re.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:re.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};case e.ELEMENT_NODE:return Kg(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:h,maskInputFn:b,dataURLOptions:g,inlineImages:S,recordCanvas:E,keepIframeSrcFn:T,newlyAddedElement:y,rootId:v,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f});case e.TEXT_NODE:return Vg(e,{maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:_,maskInputOptions:h,maskInputFn:b,rootId:v});case e.CDATA_SECTION_NODE:return{type:re.CDATA,textContent:"",rootId:v};case e.COMMENT_NODE:return{type:re.Comment,textContent:e.textContent||"",rootId:v};default:return!1}}function Yg(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function Vg(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=t,d=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const p=d==="STYLE"?!0:void 0,h=d==="SCRIPT"?!0:void 0,_=d==="TEXTAREA"?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||ar([e,"access",g=>g.parentNode,"access",g=>g.sheet,"optionalAccess",g=>g.cssRules])&&(f=cr(e.parentNode.sheet))}catch(g){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${g}`,e)}f=lr(f,si())}h&&(f="SCRIPT_PLACEHOLDER");const b=Wt(e,r,i,s,o,n);if(!p&&!h&&!_&&f&&b&&(f=a?a(f,e.parentElement):f.replace(/[\S]/g,"*")),_&&f&&(c.textarea||b)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){const g=Ar({type:null,tagName:d,maskInputOptions:c});f=mn({isMasked:Wt(e,r,i,s,o,g),element:e,value:f,maskInputFn:u})}return{type:re.Text,textContent:f||"",isStyle:p,rootId:l}}function Kg(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:_,maskTextClass:b,unmaskTextClass:g,maskTextSelector:S,unmaskTextSelector:E}=t,T=Wg(e,r,s,i),y=Og(e);let v={};const x=e.attributes.length;for(let w=0;w<x;w++){const C=e.attributes[w];C.name&&!su(y,C.name)&&(v[C.name]=ru(n,y,Ut(C.name),C.value,e,c))}if(y==="link"&&o){const w=Array.from(n.styleSheets).find(D=>D.href===e.href);let C=null;w&&(C=cr(w)),C&&(delete v.rel,delete v.href,v._cssText=lr(C,w.href))}if(y==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const w=cr(e.sheet);w&&(v._cssText=lr(w,si()))}if(y==="input"||y==="textarea"||y==="select"||y==="option"){const w=e,C=ni(w),D=ur(w,vs(y),C),V=w.checked;if(C!=="submit"&&C!=="button"&&D){const ne=Wt(w,b,S,g,E,Ar({type:C,tagName:vs(y),maskInputOptions:a}));v.value=mn({isMasked:ne,element:w,value:D,maskInputFn:u})}V&&(v.checked=V)}if(y==="option"&&(e.selected&&!a.select?v.selected=!0:delete v.selected),y==="canvas"&&f){if(e.__context==="2d")xg(e)||(v.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const w=e.toDataURL(l.type,l.quality),C=document.createElement("canvas");C.width=e.width,C.height=e.height;const D=C.toDataURL(l.type,l.quality);w!==D&&(v.rr_dataURL=w)}}if(y==="img"&&d){St||(St=n.createElement("canvas"),Eo=St.getContext("2d"));const w=e,C=w.crossOrigin;w.crossOrigin="anonymous";const D=()=>{w.removeEventListener("load",D);try{St.width=w.naturalWidth,St.height=w.naturalHeight,Eo.drawImage(w,0,0),v.rr_dataURL=St.toDataURL(l.type,l.quality)}catch(V){console.warn(`Cannot inline img src=${w.currentSrc}! Error: ${V}`)}C?v.crossOrigin=C:w.removeAttribute("crossorigin")};w.complete&&w.naturalWidth!==0?D():w.addEventListener("load",D)}if((y==="audio"||y==="video")&&(v.rr_mediaState=e.paused?"paused":"played",v.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(v.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(v.rr_scrollTop=e.scrollTop)),T){const{width:w,height:C}=e.getBoundingClientRect();v={class:v.class,rr_width:`${w}px`,rr_height:`${C}px`}}y==="iframe"&&!p(v.src)&&(e.contentDocument||(v.rr_src=v.src),delete v.src);let M;try{customElements.get(y)&&(M=!0)}catch{}return{type:re.Element,tagName:y,attributes:v,childNodes:[],isSVG:Ug(e)||void 0,needBlock:T,rootId:_,isCustom:M}}function G(e){return e==null?"":e.toLowerCase()}function Xg(e,t){if(t.comment&&e.type===re.Comment)return!0;if(e.type===re.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(G(e.attributes.name).match(/^msapplication-tile(image|color)$/)||G(e.attributes.name)==="application-name"||G(e.attributes.rel)==="icon"||G(e.attributes.rel)==="apple-touch-icon"||G(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&G(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(G(e.attributes.property).match(/^(og|twitter|fb):/)||G(e.attributes.name).match(/^(og|twitter):/)||G(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(G(e.attributes.name)==="robots"||G(e.attributes.name)==="googlebot"||G(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(G(e.attributes.name)==="author"||G(e.attributes.name)==="generator"||G(e.attributes.name)==="framework"||G(e.attributes.name)==="publisher"||G(e.attributes.name)==="progid"||G(e.attributes.property).match(/^article:/)||G(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(G(e.attributes.name)==="google-site-verification"||G(e.attributes.name)==="yandex-verification"||G(e.attributes.name)==="csrf-token"||G(e.attributes.name)==="p:domain_verify"||G(e.attributes.name)==="verify-v1"||G(e.attributes.name)==="verification"||G(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Rt(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:h={},maskAttributeFn:_,maskTextFn:b,maskInputFn:g,slimDOMOptions:S,dataURLOptions:E={},inlineImages:T=!1,recordCanvas:y=!1,onSerialize:v,onIframeLoad:x,iframeLoadTimeout:M=5e3,onStylesheetLoad:w,stylesheetLoadTimeout:C=5e3,keepIframeSrcFn:D=()=>!1,newlyAddedElement:V=!1}=t;let{preserveWhiteSpace:ne=!0}=t;const oe=Gg(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:_,maskTextFn:b,maskInputFn:g,dataURLOptions:E,inlineImages:T,recordCanvas:y,keepIframeSrcFn:D,newlyAddedElement:V});if(!oe)return console.warn(e,"not serialized"),null;let pe;r.hasNode(e)?pe=r.getId(e):Xg(oe,S)||!ne&&oe.type===re.Text&&!oe.isStyle&&!oe.textContent.replace(/^\s+|\s+$/gm,"").length?pe=gn:pe=ri();const z=Object.assign(oe,{id:pe});if(r.add(e,z),pe===gn)return null;v&&v(e);let _e=!f;if(z.type===re.Element){_e=_e&&!z.needBlock,delete z.needBlock;const ee=e.shadowRoot;ee&&ln(ee)&&(z.isShadowHost=!0)}if((z.type===re.Document||z.type===re.Element)&&_e){S.headWhitespace&&z.type===re.Element&&z.tagName==="head"&&(ne=!1);const ee={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:_,maskTextFn:b,maskInputFn:g,slimDOMOptions:S,dataURLOptions:E,inlineImages:T,recordCanvas:y,preserveWhiteSpace:ne,onSerialize:v,onIframeLoad:x,iframeLoadTimeout:M,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:D};for(const fe of Array.from(e.childNodes)){const ye=Rt(fe,ee);ye&&z.childNodes.push(ye)}if(vg(e)&&e.shadowRoot)for(const fe of Array.from(e.shadowRoot.childNodes)){const ye=Rt(fe,ee);ye&&(ln(e.shadowRoot)&&(ye.isShadow=!0),z.childNodes.push(ye))}}return e.parentNode&&un(e.parentNode)&&ln(e.parentNode)&&(z.isShadow=!0),z.type===re.Element&&z.tagName==="iframe"&&jg(e,()=>{const ee=e.contentDocument;if(ee&&x){const fe=Rt(ee,{doc:ee,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:_,maskTextFn:b,maskInputFn:g,slimDOMOptions:S,dataURLOptions:E,inlineImages:T,recordCanvas:y,preserveWhiteSpace:ne,onSerialize:v,onIframeLoad:x,iframeLoadTimeout:M,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:D});fe&&x(e,fe)}},M),z.type===re.Element&&z.tagName==="link"&&z.attributes.rel==="stylesheet"&&qg(e,()=>{if(w){const ee=Rt(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:_,maskTextFn:b,maskInputFn:g,slimDOMOptions:S,dataURLOptions:E,inlineImages:T,recordCanvas:y,preserveWhiteSpace:ne,onSerialize:v,onIframeLoad:x,iframeLoadTimeout:M,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:D});ee&&w(e,ee)}},C),z}function Jg(e,t){const{mirror:n=new nu,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:h=!1,maskAttributeFn:_,maskTextFn:b,maskInputFn:g,slimDOM:S=!1,dataURLOptions:E,preserveWhiteSpace:T,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:x,onStylesheetLoad:M,stylesheetLoadTimeout:w,keepIframeSrcFn:C=()=>!1}=t||{};return Rt(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:h===!1?{}:h,maskAttributeFn:_,maskTextFn:b,maskInputFn:g,slimDOMOptions:S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:S==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:S===!1?{}:S,dataURLOptions:E,inlineImages:f,recordCanvas:p,preserveWhiteSpace:T,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:x,onStylesheetLoad:M,stylesheetLoadTimeout:w,keepIframeSrcFn:C,newlyAddedElement:!1})}function $e(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function de(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const vt=`Please stop import mirror directly. Instead of that,\r
|
|
28
|
-
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
29
|
-
or you can use record.mirror to access the mirror instance during recording.`;let vo={map:{},getId(){return console.error(vt),-1},getNode(){return console.error(vt),null},removeNodeFromMap(){console.error(vt)},has(){return console.error(vt),!1},reset(){console.error(vt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(vo=new Proxy(vo,{get(e,t,n){return t==="map"&&console.error(vt),Reflect.get(e,t,n)}}));function _n(e,t,n={}){let r=null,s=0;return function(...i){const o=Date.now();!s&&n.leading===!1&&(s=o);const a=t-(o-s),c=this;a<=0||a>t?(r&&(s_(r),r=null),s=o,e.apply(c,i)):!r&&n.trailing!==!1&&(r=Mr(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(c,i)},a))}}function iu(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){Mr(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>iu(e,t,i||{},!0)}function ii(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}let dr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(dr=()=>new Date().getTime());function ou(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:$e([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||$e([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||$e([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:$e([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||$e([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||$e([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function au(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function cu(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function uu(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function Ee(e,t,n,r,s){if(!e)return!1;const i=uu(e);if(!i)return!1;const o=kt(t,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const a=Qe(i,o);let c=-1;return a<0?!1:(r&&(c=Qe(i,kt(null,r))),a>-1&&c<0?!0:a<c)}function Zg(e,t){return t.getId(e)!==-1}function Zr(e,t){return t.getId(e)===gn}function lu(e,t){if(un(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?lu(e.parentNode,t):!0:!0}function Ts(e){return!!e.changedTouches}function Qg(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function du(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function fu(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Is(e){return!!$e([e,"optionalAccess",t=>t.shadowRoot])}class e_{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return Kd(this.styleIDMap.get(t),()=>-1)}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function pu(e){let t=null;return $e([e,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function t_(e){let t=e,n;for(;n=pu(t);)t=n;return t}function n_(e){const t=e.ownerDocument;if(!t)return!1;const n=t_(e);return t.contains(n)}function hu(e){const t=e.ownerDocument;return t?t.contains(e)||n_(e):!1}const To={};function oi(e){const t=To[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return To[e]=r.bind(window)}function r_(...e){return oi("requestAnimationFrame")(...e)}function Mr(...e){return oi("setTimeout")(...e)}function s_(...e){return oi("clearTimeout")(...e)}var O=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(O||{}),N=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(N||{}),ue=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(ue||{}),Pe=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Pe||{});function i_(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function Io(e){return"__ln"in e}class o_{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=i_([n,"optionalAccess",s=>s.next])||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Io(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Io(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const wo=(e,t)=>`${e}@${t}`;class a_{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new o_,s=c=>{let u=c,l=gn;for(;l===gn;)u=u&&u.nextSibling,l=u&&this.mirror.getId(u);return l},i=c=>{if(!c.parentNode||!hu(c))return;const u=un(c.parentNode)?this.mirror.getId(pu(c)):this.mirror.getId(c.parentNode),l=s(c);if(u===-1||l===-1)return r.addNode(c);const d=Rt(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{du(f,this.mirror)&&this.iframeManager.addIframe(f),fu(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),Is(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{this.iframeManager.attachIframe(f,p),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,p)=>{this.stylesheetManager.attachLinkElement(f,p)}});d&&(t.push({parentId:u,nextId:l,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)ko(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||i(c);for(const c of this.addedSet)!Ro(this.droppedSet,c)&&!ko(this.removes,c,this.mirror)||Ro(this.movedSet,c)?i(c):this.droppedSet.add(c);let o=null;for(;r.length;){let c=null;if(o){const u=this.mirror.getId(o.value.parentNode),l=s(o.value);u!==-1&&l!==-1&&(c=o)}if(!c){let u=r.tail;for(;u;){const l=u;if(u=u.previous,l){const d=this.mirror.getId(l.value.parentNode);if(s(l.value)===-1)continue;if(d!==-1){c=l;break}else{const p=l.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=p.parentNode.host;if(this.mirror.getId(h)!==-1){c=l;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}o=c.previous,r.removeNode(c.value),i(c.value)}const a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:u}=c;if(typeof u.style=="string"){const l=JSON.stringify(c.styleDiff),d=JSON.stringify(c._unchangedStyles);l.length<u.style.length&&(l+d).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!Zr(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Ee(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Wt(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,uu(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,s=t.target.getAttribute(r);if(r==="value"){const o=ni(n),a=n.tagName;s=ur(n,a,o);const c=Ar({maskInputOptions:this.maskInputOptions,tagName:a,type:o}),u=Wt(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);s=mn({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(Ee(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===t.oldValue)return;let i=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!n.contentDocument)r="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!su(n.tagName,r)&&(i.attributes[r]=ru(this.doc,Ut(n.tagName),Ut(r),s,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==o.style.getPropertyValue(a)||u!==o.style.getPropertyPriority(a)?u===""?i.styleDiff[a]=c:i.styleDiff[a]=[c,u]:i._unchangedStyles[a]=[c,u]}for(const a of Array.from(o.style))n.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if(Ee(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=un(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Ee(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Zr(n,this.mirror)||!Zg(n,this.mirror)||(this.addedSet.has(n)?(ws(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||lu(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[wo(r,s)]?ws(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:un(t.target)&&ln(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Zr(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[wo(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Ee(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),Is(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function ws(e,t){e.delete(t),t.childNodes.forEach(n=>ws(e,n))}function ko(e,t,n){return e.length===0?!1:mu(e,t,n)}function mu(e,t,n){const{parentNode:r}=t;if(!r)return!1;const s=n.getId(r);return e.some(i=>i.id===s)?!0:mu(e,r,n)}function Ro(e,t){return e.size===0?!1:gu(e,t)}function gu(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:gu(e,n):!1}let dn;function c_(e){dn=e}function u_(){dn=void 0}const P=e=>dn?((...n)=>{try{return e(...n)}catch(r){if(dn&&dn(r)===!0)return()=>{};throw r}}):e;function Ce(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}const Ct=[];function xn(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function _u(e,t){const n=new a_;Ct.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=Ce([window,"optionalAccess",o=>o.Zone,"optionalAccess",o=>o.__symbol__,"optionalCall",o=>o("MutationObserver")]);s&&window[s]&&(r=window[s]);const i=new r(P(o=>{e.onMutation&&e.onMutation(o)===!1||n.processMutations.bind(n)(o)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function l_({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],a;const c=_n(P(d=>{const f=Date.now()-a;e(o.map(p=>(p.timeOffset-=f,p)),d),o=[],a=null}),i),u=P(_n(P(d=>{const f=xn(d),{clientX:p,clientY:h}=Ts(d)?d.changedTouches[0]:d;a||(a=dr()),o.push({x:p,y:h,id:r.getId(f),timeOffset:dr()-a}),c(typeof DragEvent<"u"&&d instanceof DragEvent?N.Drag:d instanceof MouseEvent?N.MouseMove:N.TouchMove)}),s,{trailing:!1})),l=[de("mousemove",u,n),de("touchmove",u,n),de("drag",u,n)];return P(()=>{l.forEach(d=>d())})}function d_({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[];let u=null;const l=d=>f=>{const p=xn(f);if(Ee(p,r,s,i,!0))return;let h=null,_=d;if("pointerType"in f){switch(f.pointerType){case"mouse":h=Pe.Mouse;break;case"touch":h=Pe.Touch;break;case"pen":h=Pe.Pen;break}h===Pe.Touch&&(ue[d]===ue.MouseDown?_="TouchStart":ue[d]===ue.MouseUp&&(_="TouchEnd"))}else Ts(f)&&(h=Pe.Touch);h!==null?(u=h,(_.startsWith("Touch")&&h===Pe.Touch||_.startsWith("Mouse")&&h===Pe.Mouse)&&(h=null)):ue[d]===ue.Click&&(h=u,u=null);const b=Ts(f)?f.changedTouches[0]:f;if(!b)return;const g=n.getId(p),{clientX:S,clientY:E}=b;P(e)({type:ue[_],id:g,x:S,y:E,...h!==null&&{pointerType:h}})};return Object.keys(ue).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let f=Ut(d);const p=l(d);if(window.PointerEvent)switch(ue[d]){case ue.MouseDown:case ue.MouseUp:f=f.replace("mouse","pointer");break;case ue.TouchStart:case ue.TouchEnd:return}c.push(de(f,p,t))}),P(()=>{c.forEach(d=>d())})}function yu({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const a=P(_n(P(c=>{const u=xn(c);if(!u||Ee(u,r,s,i,!0))return;const l=n.getId(u);if(u===t&&t.defaultView){const d=ou(t.defaultView);e({id:l,x:d.left,y:d.top})}else e({id:l,x:u.scrollLeft,y:u.scrollTop})}),o.scroll||100));return de("scroll",a,t)}function f_({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=P(_n(P(()=>{const i=au(),o=cu();(n!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return de("resize",s,t)}const p_=["INPUT","TEXTAREA","SELECT"],Co=new WeakMap;function h_({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:_}){function b(x){let M=xn(x);const w=x.isTrusted,C=M&&vs(M.tagName);if(C==="OPTION"&&(M=M.parentElement),!M||!C||p_.indexOf(C)<0||Ee(M,r,s,i,!0))return;const D=M;if(D.classList.contains(o)||a&&D.matches(a))return;const V=ni(M);let ne=ur(D,C,V),oe=!1;const pe=Ar({maskInputOptions:c,tagName:C,type:V}),z=Wt(M,f,h,p,_,pe);(V==="radio"||V==="checkbox")&&(oe=M.checked),ne=mn({isMasked:z,element:M,value:ne,maskInputFn:u}),g(M,d?{text:ne,isChecked:oe,userTriggered:w}:{text:ne,isChecked:oe});const _e=M.name;V==="radio"&&_e&&oe&&t.querySelectorAll(`input[type="radio"][name="${_e}"]`).forEach(ee=>{if(ee!==M){const fe=mn({isMasked:z,element:ee,value:ur(ee,C,V),maskInputFn:u});g(ee,d?{text:fe,isChecked:!oe,userTriggered:!1}:{text:fe,isChecked:!oe})}})}function g(x,M){const w=Co.get(x);if(!w||w.text!==M.text||w.isChecked!==M.isChecked){Co.set(x,M);const C=n.getId(x);P(e)({...M,id:C})}}const E=(l.input==="last"?["change"]:["input","change"]).map(x=>de(x,P(b),t)),T=t.defaultView;if(!T)return()=>{E.forEach(x=>x())};const y=T.Object.getOwnPropertyDescriptor(T.HTMLInputElement.prototype,"value"),v=[[T.HTMLInputElement.prototype,"value"],[T.HTMLInputElement.prototype,"checked"],[T.HTMLSelectElement.prototype,"value"],[T.HTMLTextAreaElement.prototype,"value"],[T.HTMLSelectElement.prototype,"selectedIndex"],[T.HTMLOptionElement.prototype,"selected"]];return y&&y.set&&E.push(...v.map(x=>iu(x[0],x[1],{set(){P(b)({target:this,isTrusted:!1})}},!1,T))),P(()=>{E.forEach(x=>x())})}function fr(e){const t=[];function n(r,s){if(Un("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Un("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Un("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Un("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(o)}return s}return n(e,t)}function Fe(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function m_({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:P((l,d,f)=>{const[p,h]=f,{id:_,styleId:b}=Fe(d,t,n.styleMirror);return(_&&_!==-1||b&&b!==-1)&&e({id:_,styleId:b,adds:[{rule:p,index:h}]}),l.apply(d,f)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:P((l,d,f)=>{const[p]=f,{id:h,styleId:_}=Fe(d,t,n.styleMirror);return(h&&h!==-1||_&&_!==-1)&&e({id:h,styleId:_,removes:[{index:p}]}),l.apply(d,f)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:P((l,d,f)=>{const[p]=f,{id:h,styleId:_}=Fe(d,t,n.styleMirror);return(h&&h!==-1||_&&_!==-1)&&e({id:h,styleId:_,replace:p}),l.apply(d,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:P((l,d,f)=>{const[p]=f,{id:h,styleId:_}=Fe(d,t,n.styleMirror);return(h&&h!==-1||_&&_!==-1)&&e({id:h,styleId:_,replaceSync:p}),l.apply(d,f)})}));const c={};Wn("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Wn("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Wn("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Wn("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([l,d])=>{u[l]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(u[l].insertRule,{apply:P((f,p,h)=>{const[_,b]=h,{id:g,styleId:S}=Fe(p.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||S&&S!==-1)&&e({id:g,styleId:S,adds:[{rule:_,index:[...fr(p),b||0]}]}),f.apply(p,h)})}),d.prototype.deleteRule=new Proxy(u[l].deleteRule,{apply:P((f,p,h)=>{const[_]=h,{id:b,styleId:g}=Fe(p.parentStyleSheet,t,n.styleMirror);return(b&&b!==-1||g&&g!==-1)&&e({id:b,styleId:g,removes:[{index:[...fr(p),_]}]}),f.apply(p,h)})})}),P(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([l,d])=>{d.prototype.insertRule=u[l].insertRule,d.prototype.deleteRule=u[l].deleteRule})})}function Su({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const s=n.nodeName==="#document"?Ce([n,"access",o=>o.defaultView,"optionalAccess",o=>o.Document]):Ce([n,"access",o=>o.ownerDocument,"optionalAccess",o=>o.defaultView,"optionalAccess",o=>o.ShadowRoot]),i=Ce([s,"optionalAccess",o=>o.prototype])?Object.getOwnPropertyDescriptor(Ce([s,"optionalAccess",o=>o.prototype]),"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return Ce([i,"access",o=>o.get,"optionalAccess",o=>o.call,"call",o=>o(this)])},set(o){const a=Ce([i,"access",c=>c.set,"optionalAccess",c=>c.call,"call",c=>c(this,o)]);if(r!==null&&r!==-1)try{t.adoptStyleSheets(o,r)}catch{}return a}}),P(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function g_({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:P((a,c,u)=>{const[l,d,f]=u;if(n.has(l))return i.apply(c,[l,d,f]);const{id:p,styleId:h}=Fe(Ce([c,"access",_=>_.parentRule,"optionalAccess",_=>_.parentStyleSheet]),t,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,set:{property:l,value:d,priority:f},index:fr(c.parentRule)}),a.apply(c,u)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:P((a,c,u)=>{const[l]=u;if(n.has(l))return o.apply(c,[l]);const{id:d,styleId:f}=Fe(Ce([c,"access",p=>p.parentRule,"optionalAccess",p=>p.parentStyleSheet]),t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,remove:{property:l},index:fr(c.parentRule)}),a.apply(c,u)})}),P(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function __({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const a=P(u=>_n(P(l=>{const d=xn(l);if(!d||Ee(d,t,n,r,!0))return;const{currentTime:f,volume:p,muted:h,playbackRate:_}=d;e({type:u,id:s.getId(d),currentTime:f,volume:p,muted:h,playbackRate:_})}),i.media||500)),c=[de("play",a(0),o),de("pause",a(1),o),de("seeked",a(2),o),de("volumechange",a(3),o),de("ratechange",a(4),o)];return P(()=>{c.forEach(u=>u())})}function y_({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(c,u,l){const d=new i(c,u,l);return s.set(d,{family:c,buffer:typeof u!="string",descriptors:l,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};const o=ii(t.fonts,"add",function(a){return function(c){return Mr(P(()=>{const u=s.get(c);u&&(e(u),s.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=i}),r.push(o),P(()=>{r.forEach(a=>a())})}function S_(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=e;let a=!0;const c=P(()=>{const u=t.getSelection();if(!u||a&&Ce([u,"optionalAccess",f=>f.isCollapsed]))return;a=u.isCollapsed||!1;const l=[],d=u.rangeCount||0;for(let f=0;f<d;f++){const p=u.getRangeAt(f),{startContainer:h,startOffset:_,endContainer:b,endOffset:g}=p;Ee(h,r,s,i,!0)||Ee(b,r,s,i,!0)||l.push({start:n.getId(h),startOffset:_,end:n.getId(b),endOffset:g})}o({ranges:l})});return c(),de("selectionchange",c)}function b_({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:ii(n.customElements,"define",function(s){return function(i,o,a){try{t({define:{name:i}})}catch{}return s.apply(this,[i,o,a])}})}function E_(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};const r=_u(e,e.doc),s=l_(e),i=d_(e),o=yu(e),a=f_(e,{win:n}),c=h_(e),u=__(e),l=m_(e,{win:n}),d=Su(e,e.doc),f=g_(e,{win:n}),p=e.collectFonts?y_(e):()=>{},h=S_(e),_=b_(e),b=[];for(const g of e.plugins)b.push(g.observer(g.callback,n,g.options));return P(()=>{Ct.forEach(g=>g.reset()),r.disconnect(),s(),i(),o(),a(),c(),u(),l(),d(),f(),p(),h(),_(),b.forEach(g=>g())})}function Un(e){return typeof window[e]<"u"}function Wn(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class ks{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){const i=r||this.getIdToRemoteIdMap(t),o=s||this.getRemoteIdToIdMap(t);let a=i.get(n);return a||(a=this.generateIdFn(),i.set(n,a),o.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,s))}getRemoteId(t,n,r){const s=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const i=s.get(n);return i||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getRemoteId(t,s,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}function xo(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}class v_{constructor(){this.crossOriginIframeMirror=new ks(ri),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class T_{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new ks(ri),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ks(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),xo([this,"access",r=>r.loadListener,"optionalCall",r=>r(t)]),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const i=this.transformCrossOriginEvent(s,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case O.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:O.IncrementalSnapshot,data:{source:N.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case O.Meta:case O.Load:case O.DomContentLoaded:return!1;case O.Plugin:return n;case O.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case O.IncrementalSnapshot:switch(n.data.source){case N.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(r.node,s)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case N.Drag:case N.TouchMove:case N.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case N.ViewportResize:return!1;case N.MediaInteraction:case N.MouseInteraction:case N.Scroll:case N.CanvasMutation:case N.Input:return this.replaceIds(n.data,t,["id"]),n;case N.StyleSheetRule:case N.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case N.Font:return n;case N.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case N.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),xo([n,"access",r=>r.data,"access",r=>r.styles,"optionalAccess",r=>r.forEach,"call",r=>r(s=>{this.replaceStyleIds(s,t,["styleId"])})]),n}}return!1}replace(t,n,r,s){for(const i of s)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==re.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class I_{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class w_{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!ln(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const r=_u({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(yu({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Mr(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Su({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(ii(t.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&hu(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class Ao{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}}class k_{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new e_,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},s=[];for(const i of t){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),s.push({styleId:o,rules:Array.from(i.rules||CSSRule,(a,c)=>({rule:tu(a),index:c}))})),r.styleIds.push(o)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class R_{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){r_(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(s=>s!==n)}add(t,n){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}let J,pr;const be=Cg();function We(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:i=null,unblockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:l="rr-mask",unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:h=!0,maskAllInputs:_,maskInputOptions:b,slimDOMOptions:g,maskAttributeFn:S,maskInputFn:E,maskTextFn:T,maxCanvasSize:y=null,packFn:v,sampling:x={},dataURLOptions:M={},mousemoveWait:w,recordCanvas:C=!1,recordCrossOriginIframes:D=!1,recordAfter:V=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:ne=!1,collectFonts:oe=!1,inlineImages:pe=!1,plugins:z,keepIframeSrcFn:_e=()=>!1,ignoreCSSAttributes:ee=new Set([]),errorHandler:fe,onMutation:ye,getCanvasManager:Br}=e;c_(fe);const gt=D?window.parent===window:!0;let Le=!1;if(!gt)try{window.parent.document&&(Le=!1)}catch{Le=!0}if(gt&&!t)throw new Error("emit function is required");w!==void 0&&x.mousemove===void 0&&(x.mousemove=w),be.reset();const _t=_===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:b!==void 0?b:{},en=g===!0||g==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:g==="all",headMetaDescKeywords:g==="all"}:g||{};Qg();let Hr,Ur=0;const bi=B=>{for(const Se of z||[])Se.eventProcessor&&(B=Se.eventProcessor(B));return v&&!Le&&(B=v(B)),B};J=(B,Se)=>{const F=B;if(F.timestamp=dr(),Vn([Ct,"access",X=>X[0],"optionalAccess",X=>X.isFrozen,"call",X=>X()])&&F.type!==O.FullSnapshot&&!(F.type===O.IncrementalSnapshot&&F.data.source===N.Mutation)&&Ct.forEach(X=>X.unfreeze()),gt)Vn([t,"optionalCall",X=>X(bi(F),Se)]);else if(Le){const X={type:"rrweb",event:bi(F),origin:window.location.origin,isCheckout:Se};window.parent.postMessage(X,"*")}if(F.type===O.FullSnapshot)Hr=F,Ur=0;else if(F.type===O.IncrementalSnapshot){if(F.data.source===N.Mutation&&F.data.isAttachIframe)return;Ur++;const X=r&&Ur>=r,H=n&&Hr&&F.timestamp-Hr.timestamp>n;(X||H)&&zr(!0)}};const Mn=B=>{J({type:O.IncrementalSnapshot,data:{source:N.Mutation,...B}})},Ei=B=>J({type:O.IncrementalSnapshot,data:{source:N.Scroll,...B}}),Al=B=>J({type:O.IncrementalSnapshot,data:{source:N.CanvasMutation,...B}}),Ml=B=>J({type:O.IncrementalSnapshot,data:{source:N.AdoptedStyleSheet,...B}}),Ye=new k_({mutationCb:Mn,adoptedStyleSheetCb:Ml}),Ve=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new v_:new T_({mirror:be,mutationCb:Mn,stylesheetManager:Ye,recordCrossOriginIframes:D,wrappedEmit:J});for(const B of z||[])B.getMirror&&B.getMirror({nodeMirror:be,crossOriginIframeMirror:Ve.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ve.crossOriginIframeStyleMirror});const Wr=new R_,vi=x_(Br,{mirror:be,win:window,mutationCb:B=>J({type:O.IncrementalSnapshot,data:{source:N.CanvasMutation,...B}}),recordCanvas:C,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:y,sampling:x.canvas,dataURLOptions:M,errorHandler:fe}),On=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new I_:new w_({mutationCb:Mn,scrollCb:Ei,bypassOptions:{onMutation:ye,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:_t,dataURLOptions:M,maskAttributeFn:S,maskTextFn:T,maskInputFn:E,recordCanvas:C,inlineImages:pe,sampling:x,slimDOMOptions:en,iframeManager:Ve,stylesheetManager:Ye,canvasManager:vi,keepIframeSrcFn:_e,processedNodeManager:Wr},mirror:be}),zr=(B=!1)=>{J({type:O.Meta,data:{href:window.location.href,width:cu(),height:au()}},B),Ye.reset(),On.init(),Ct.forEach(F=>F.lock());const Se=Jg(document,{mirror:be,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskAllInputs:_t,maskAttributeFn:S,maskInputFn:E,maskTextFn:T,slimDOM:en,dataURLOptions:M,recordCanvas:C,inlineImages:pe,onSerialize:F=>{du(F,be)&&Ve.addIframe(F),fu(F,be)&&Ye.trackLinkElement(F),Is(F)&&On.addShadowRoot(F.shadowRoot,document)},onIframeLoad:(F,X)=>{Ve.attachIframe(F,X),On.observeAttachShadow(F)},onStylesheetLoad:(F,X)=>{Ye.attachLinkElement(F,X)},keepIframeSrcFn:_e});if(!Se)return console.warn("Failed to snapshot the document");J({type:O.FullSnapshot,data:{node:Se,initialOffset:ou(window)}}),Ct.forEach(F=>F.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ye.adoptStyleSheets(document.adoptedStyleSheets,be.getId(document))};pr=zr;try{const B=[],Se=X=>P(E_)({onMutation:ye,mutationCb:Mn,mousemoveCb:(H,Ke)=>J({type:O.IncrementalSnapshot,data:{source:Ke,positions:H}}),mouseInteractionCb:H=>J({type:O.IncrementalSnapshot,data:{source:N.MouseInteraction,...H}}),scrollCb:Ei,viewportResizeCb:H=>J({type:O.IncrementalSnapshot,data:{source:N.ViewportResize,...H}}),inputCb:H=>J({type:O.IncrementalSnapshot,data:{source:N.Input,...H}}),mediaInteractionCb:H=>J({type:O.IncrementalSnapshot,data:{source:N.MediaInteraction,...H}}),styleSheetRuleCb:H=>J({type:O.IncrementalSnapshot,data:{source:N.StyleSheetRule,...H}}),styleDeclarationCb:H=>J({type:O.IncrementalSnapshot,data:{source:N.StyleDeclaration,...H}}),canvasMutationCb:Al,fontCb:H=>J({type:O.IncrementalSnapshot,data:{source:N.Font,...H}}),selectionCb:H=>{J({type:O.IncrementalSnapshot,data:{source:N.Selection,...H}})},customElementCb:H=>{J({type:O.IncrementalSnapshot,data:{source:N.CustomElement,...H}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:_t,inlineStylesheet:h,sampling:x,recordCanvas:C,inlineImages:pe,userTriggeredOnInput:ne,collectFonts:oe,doc:X,maskAttributeFn:S,maskInputFn:E,maskTextFn:T,keepIframeSrcFn:_e,blockSelector:i,unblockSelector:o,slimDOMOptions:en,dataURLOptions:M,mirror:be,iframeManager:Ve,stylesheetManager:Ye,shadowDomManager:On,processedNodeManager:Wr,canvasManager:vi,ignoreCSSAttributes:ee,plugins:Vn([z,"optionalAccess",H=>H.filter,"call",H=>H(Ke=>Ke.observer),"optionalAccess",H=>H.map,"call",H=>H(Ke=>({observer:Ke.observer,options:Ke.options,callback:Ol=>J({type:O.Plugin,data:{plugin:Ke.name,payload:Ol}})}))])||[]},{});Ve.addLoadListener(X=>{try{B.push(Se(X.contentDocument))}catch(H){console.warn(H)}});const F=()=>{zr(),B.push(Se(document))};return document.readyState==="interactive"||document.readyState==="complete"?F():(B.push(de("DOMContentLoaded",()=>{J({type:O.DomContentLoaded,data:{}}),V==="DOMContentLoaded"&&F()})),B.push(de("load",()=>{J({type:O.Load,data:{}}),V==="load"&&F()},window))),()=>{B.forEach(X=>X()),Wr.destroy(),pr=void 0,u_()}}catch(B){console.warn(B)}}function C_(e){if(!pr)throw new Error("please take full snapshot after start recording");pr(e)}We.mirror=be;We.takeFullSnapshot=C_;function x_(e,t){try{return e?e(t):new Ao}catch{return console.warn("Unable to initialize CanvasManager"),new Ao}}const A_=3,M_=5;function ai(e){return e>9999999999?e:e*1e3}function Qr(e){return e>9999999999?e/1e3:e}function An(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:O.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:_r(t,10,1e3)}}),t.category==="console")))}const O_="button,a";function bu(e){return e.closest(O_)||e}function Eu(e){const t=vu(e);return!t||!(t instanceof Element)?t:bu(t)}function vu(e){return N_(e)?e.target:e}function N_(e){return typeof e=="object"&&!!e&&"target"in e}let Be;function D_(e){return Be||(Be=[],L_()),Be.push(e),()=>{const t=Be?Be.indexOf(e):-1;t>-1&&Be.splice(t,1)}}function L_(){ie(Y,"open",function(e){return function(...t){if(Be)try{Be.forEach(n=>n())}catch{}return e.apply(Y,t)}})}function P_(e,t,n){e.handleClick(t,n)}class $_{constructor(t,n,r=An){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=D_(()=>{this._lastMutation=Mo()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(B_(n,this._ignoreSelector)||!H_(t))return;const r={timestamp:Qr(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(s=>s.node===r.node&&Math.abs(s.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Qr(t)}registerScroll(t=Date.now()){this._lastScroll=Qr(t)}registerClick(t){const n=bu(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=Mo();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!s,{clickCount:o,clickBreadcrumb:a}=t;if(i){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:Y.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:o||1}};this._addBreadcrumbEvent(n,l);return}if(o>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:Y.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}}const F_=["A","BUTTON","INPUT"];function B_(e,t){return!!(!F_.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function H_(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function Mo(){return Date.now()/1e3}function U_(e,t){try{if(!W_(t))return;const{source:n}=t.data;if(n===N.Mutation&&e.registerMutation(t.timestamp),n===N.Scroll&&e.registerScroll(t.timestamp),z_(t)){const{type:r,id:s}=t.data,i=We.mirror.getNode(s);i instanceof HTMLElement&&r===ue.Click&&e.registerClick(i)}}catch{}}function W_(e){return e.type===A_}function z_(e){return e.data.source===N.MouseInteraction}function Ae(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var hr;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(hr||(hr={}));const j_=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function q_(e){const t={};for(const n in e)if(j_.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const G_=e=>t=>{if(!e.isEnabled())return;const n=Y_(t);if(!n)return;const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&P_(e.clickDetector,n,Eu(t.event)),An(e,n)};function Tu(e,t){const n=We.mirror.getId(e),r=n&&We.mirror.getNode(n),s=r&&We.mirror.getMeta(r),i=s&&K_(s)?s:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(o=>o.type===hr.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:q_(i.attributes)}}:{}}}function Y_(e){const{target:t,message:n}=V_(e);return Ae({category:`ui.${e.name}`,...Tu(t,n)})}function V_(e){const t=e.name==="click";let n,r=null;try{r=t?Eu(e.event):vu(e.event),n=ct(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function K_(e){return e.type===hr.Element}function X_(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=J_(t);n&&An(e,n)}function J_(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=e;if(!o||Z_(o)||!i)return null;const a=t||r||s,c=i.length===1;if(!a&&c)return null;const u=ct(o,{maxStringLength:200})||"<unknown>",l=Tu(o,u);return Ae({category:"ui.keyDown",message:u,data:{...l.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function Z_(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const Oo={resource:ry,paint:ty,navigation:ny};function Q_(e){return e.map(ey).filter(Boolean)}function ey(e){return Oo[e.entryType]?Oo[e.entryType](e):null}function zt(e){return((ae||Y.performance.timeOrigin)+e)/1e3}function ty(e){const{duration:t,entryType:n,name:r,startTime:s}=e,i=zt(s);return{type:n,name:r,start:i,end:i+t,data:void 0}}function ny(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:h,type:_}=e;return s===0?null:{type:`${t}.${_}`,start:zt(p),end:zt(i),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:d,domComplete:i,redirectCount:f}}}function ry(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:zt(i),end:zt(s),name:r,data:{size:u,statusCode:c,decodedBodySize:o,encodedBodySize:a}}}function sy(e){const t=e.entries,n=t[t.length-1],r=n?n.element:void 0,s=e.value,i=zt(s);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:i,end:i,data:{value:s,size:s,nodeId:r?We.mirror.getId(r):void 0}}}function iy(e){function t(s){e.performanceEntries.includes(s)||e.performanceEntries.push(s)}function n({entries:s}){s.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(s=>{r.push(Ge(s,n))}),r.push(kc(({metric:s})=>{e.replayPerformanceEntries.push(sy(s))})),()=>{r.forEach(s=>s())}}const j=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,oy='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(G)return G.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r<e;r++)n+=t[r].length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function ay(){const e=new Blob([oy]);return URL.createObjectURL(e)}function le(e,t){j&&(m.info(e),t&&Iu(e))}function Nt(e,t){j&&(m.info(e),t&&setTimeout(()=>{Iu(e)},0))}function Iu(e){qe({category:"console",data:{logger:"replay"},level:"info",message:e},{level:"info"})}class ci extends Error{constructor(){super(`Event buffer exceeded maximum size of ${ti}.`)}}class wu{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>ti)throw new ci;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?ai(t):null}}class cy{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){le("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((s,i)=>{const o=({data:a})=>{const c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",o),!c.success){j&&m.error("[Replay]",c.response),i(new Error("Error in compression worker"));return}s(c.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class uy{constructor(t){this._worker=new cy(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=ai(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>ti?Promise.reject(new ci):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{j&&m.warn('[Replay] Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class ly{constructor(t){this._fallback=new wu,this._compression=new uy(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch{le("[Replay] Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n}=this._fallback,r=[];for(const s of t)r.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._used=this._compression;try{await Promise.all(r)}catch(s){j&&m.warn("[Replay] Failed to add events when switching buffers.",s)}}}function dy({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=fy(t);if(n)return n}return le("[Replay] Using simple buffer"),new wu}function fy(e){try{const t=e||py();if(!t)return;le(`[Replay] Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new ly(n)}catch{le("[Replay] Failed to create compression worker")}}function py(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?ay():""}function ui(){try{return"sessionStorage"in Y&&!!Y.sessionStorage}catch{return!1}}function hy(e){my(),e.session=void 0}function my(){if(ui())try{Y.sessionStorage.removeItem(Qs)}catch{}}function ku(e){return e===void 0?!1:Math.random()<e}function Ru(e){const t=Date.now(),n=e.id||Pt(),r=e.started||t,s=e.lastActivity||t,i=e.segmentId||0,o=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:o,previousSessionId:a}}function li(e){if(ui())try{Y.sessionStorage.setItem(Qs,JSON.stringify(e))}catch{}}function gy(e,t){return ku(e)?"session":t?"buffer":!1}function No({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=gy(e,t),i=Ru({sampled:s,previousSessionId:r});return n&&li(i),i}function _y(e){if(!ui())return null;try{const t=Y.sessionStorage.getItem(Qs);if(!t)return null;const n=JSON.parse(t);return Nt("[Replay] Loading existing session",e),Ru(n)}catch{return null}}function Rs(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function Cu(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Rs(e.started,t,r)||Rs(e.lastActivity,n,r)}function xu(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!Cu(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function es({traceInternals:e,sessionIdleExpire:t,maxReplayDuration:n,previousSessionId:r},s){const i=s.stickySession&&_y(e);return i?xu(i,{sessionIdleExpire:t,maxReplayDuration:n})?(Nt("[Replay] Session in sessionStorage is expired, creating new one..."),No(s,{previousSessionId:i.id})):i:(Nt("[Replay] Creating new session",e),No(s,{previousSessionId:r}))}function yy(e){return e.type===O.Custom}function di(e,t,n){return Mu(e,t)?(Au(e,t,n),!0):!1}function Sy(e,t,n){return Mu(e,t)?Au(e,t,n):Promise.resolve(null)}async function Au(e,t,n){if(!e.eventBuffer)return null;try{n&&e.recordingMode==="buffer"&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);const r=e.getOptions(),s=by(t,r.beforeAddRecordingEvent);return s?await e.eventBuffer.addEvent(s):void 0}catch(r){const s=r&&r instanceof ci?"addEventSizeExceeded":"addEvent";j&&m.error(r),await e.stop({reason:s});const i=A();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function Mu(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=ai(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(le(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1):!0}function by(e,t){try{if(typeof t=="function"&&yy(e))return t(e)}catch(n){return j&&m.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",n),null}return e}function fi(e){return!e.type}function Cs(e){return e.type==="transaction"}function Ey(e){return e.type==="replay_event"}function Do(e){return e.type==="feedback"}function Ou(e){const t=Iy();return(n,r)=>{if(!e.isEnabled()||!fi(n)&&!Cs(n))return;const s=r&&r.statusCode;if(!(t&&(!s||s<200||s>=300))){if(Cs(n)){vy(e,n);return}Ty(e,n)}}}function vy(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function Ty(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||setTimeout(()=>{e.sendBufferedReplayOrFlush()})}function Iy(){const e=A();if(!e)return!1;const t=e.getTransport();return t&&t.send.__sentry__baseTransport__||!1}function wy(e){return t=>{!e.isEnabled()||!fi(t)||ky(e,t)}}function ky(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0].value;if(typeof n=="string"&&(n.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=Ae({category:"replay.hydrate-error"});An(e,r)}}function Ry(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function Cy(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:O.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function xy(e,t){return e.recordingMode!=="buffer"||t.message===ei||!t.exception||t.type?!1:ku(e.getOptions().errorSampleRate)}function Ay(e,t=!1){const n=t?Ou(e):void 0;return Object.assign((r,s)=>e.isEnabled()?Ey(r)?(delete r.breadcrumbs,r):!fi(r)&&!Cs(r)&&!Do(r)||!e.checkAndHandleExpiredSession()?r:Do(r)?(e.flush(),r.contexts.feedback.replay_id=e.getSessionId(),Cy(e,r),r):Ry(r,s)&&!e.getOptions()._experiments.captureExceptions?(j&&m.log("[Replay] Ignoring error from rrweb internals",r),null):((xy(e,r)||e.recordingMode==="session")&&(r.tags={...r.tags,replayId:e.getSessionId()}),n&&n(r,{statusCode:200}),r):r,{id:"Replay"})}function Or(e,t){return t.map(({type:n,start:r,end:s,name:i,data:o})=>{const a=e.throttledAddEvent({type:O.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:s,data:o}}});return typeof a=="string"?Promise.resolve(null):a})}function My(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function Oy(e){return t=>{if(!e.isEnabled())return;const n=My(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Or(e,[n]),!1)))}}function Ny(e,t){return j&&e.getOptions()._experiments.traceInternals?!1:ac(t,A())}function Nr(e,t){e.isEnabled()&&t!==null&&(Ny(e,t.name)||e.addUpdate(()=>(Or(e,[t]),!0)))}function Dy(e){const{startTimestamp:t,endTimestamp:n,fetchData:r,response:s}=e;if(!n)return null;const{method:i,url:o}=r;return{type:"resource.fetch",start:t/1e3,end:n/1e3,name:o,data:{method:i,statusCode:s?s.status:void 0}}}function Ly(e){return t=>{if(!e.isEnabled())return;const n=Dy(t);Nr(e,n)}}function Py(e){const{startTimestamp:t,endTimestamp:n,xhr:r}=e,s=r[Oe];if(!t||!n||!s)return null;const{method:i,url:o,status_code:a}=s;return o===void 0?null:{type:"resource.xhr",name:o,start:t/1e3,end:n/1e3,data:{method:i,statusCode:a}}}function $y(e){return t=>{if(!e.isEnabled())return;const n=Py(t);Nr(e,n)}}function Dr(e,t){if(e)try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=Pu(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Nu(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Du(e){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Pu(e)];if(!e)return[void 0]}catch{return j&&m.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return j&&m.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function mr(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function Lu(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:Ie({method:i,statusCode:o,request:a,response:c})}}function yn(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function ze(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:i}=Fy(n);return r.body=s,i&&i.length>0&&(r._meta={warnings:i}),r}function xs(e,t){return Object.keys(e).reduce((n,r)=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=e[r]),n},{})}function Pu(e){return new URLSearchParams(e).toString()}function Fy(e){if(!e||typeof e!="string")return{body:e};const t=e.length>yo,n=By(e);if(t){const r=e.slice(0,yo);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function By(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function gr(e,t){const n=Hy(e);return Vt(n,t)}function Hy(e,t=Y.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Y.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function Uy(e,t,n){try{const r=await zy(e,t,n),s=Lu("resource.fetch",r);Nr(n.replay,s)}catch(r){j&&m.error("[Replay] Failed to capture fetch breadcrumb",r)}}function Wy(e,t,n){const{input:r,response:s}=t,i=r?$u(r):void 0,o=Dr(i,n.textEncoder),a=s?Nu(s.headers.get("content-length")):void 0;o!==void 0&&(e.data.request_body_size=o),a!==void 0&&(e.data.response_body_size=a)}async function zy(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=t,{url:o,method:a,status_code:c=0,request_body_size:u,response_body_size:l}=e.data,d=gr(o,n.networkDetailAllowUrls)&&!gr(o,n.networkDetailDenyUrls),f=d?jy(n,t.input,u):yn(u),p=await qy(d,n,t.response,l);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:c,request:f,response:p}}function jy({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?Vy(n,t):{};if(!e)return ze(s,r,void 0);const i=$u(n),[o,a]=Du(i),c=ze(s,r,o);return a?mr(c,a):c}async function qy(e,{networkCaptureBodies:t,textEncoder:n,networkResponseHeaders:r},s,i){if(!e&&i!==void 0)return yn(i);const o=s?Fu(s.headers,r):{};if(!s||!t&&i!==void 0)return ze(o,i,void 0);const[a,c]=await Yy(s),u=Gy(a,{networkCaptureBodies:t,textEncoder:n,responseBodySize:i,captureDetails:e,headers:o});return c?mr(u,c):u}function Gy(e,{networkCaptureBodies:t,textEncoder:n,responseBodySize:r,captureDetails:s,headers:i}){try{const o=e&&e.length&&r===void 0?Dr(e,n):r;return s?t?ze(i,o,e):ze(i,o,void 0):yn(o)}catch(o){return j&&m.warn("[Replay] Failed to serialize response body",o),ze(i,r,void 0)}}async function Yy(e){const t=Ky(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await Xy(t)]}catch(n){return j&&m.warn("[Replay] Failed to get text body from response",n),[void 0,"BODY_PARSE_ERROR"]}}function $u(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function Fu(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function Vy(e,t){return e.length===1&&typeof e[0]!="string"?Lo(e[0],t):e.length===2?Lo(e[1],t):{}}function Lo(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?Fu(n,t):Array.isArray(n)?{}:xs(n,t):{}}function Ky(e){try{return e.clone()}catch(t){j&&m.warn("[Replay] Failed to clone response body",t)}}function Xy(e){return new Promise((t,n)=>{const r=setTimeout(()=>n(new Error("Timeout while trying to read response body")),500);Jy(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function Jy(e){return await e.text()}async function Zy(e,t,n){try{const r=eS(e,t,n),s=Lu("resource.xhr",r);Nr(n.replay,s)}catch(r){j&&m.error("[Replay] Failed to capture xhr breadcrumb",r)}}function Qy(e,t,n){const{xhr:r,input:s}=t;if(!r)return;const i=Dr(s,n.textEncoder),o=r.getResponseHeader("content-length")?Nu(r.getResponseHeader("content-length")):sS(r.response,r.responseType,n.textEncoder);i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}function eS(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:a}=t,{url:c,method:u,status_code:l=0,request_body_size:d,response_body_size:f}=e.data;if(!c)return null;if(!a||!gr(c,n.networkDetailAllowUrls)||gr(c,n.networkDetailDenyUrls)){const v=yn(d),x=yn(f);return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:l,request:v,response:x}}const p=a[Oe],h=p?xs(p.request_headers,n.networkRequestHeaders):{},_=xs(tS(a),n.networkResponseHeaders),[b,g]=n.networkCaptureBodies?Du(o):[void 0],[S,E]=n.networkCaptureBodies?nS(a):[void 0],T=ze(h,d,b),y=ze(_,f,S);return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:l,request:g?mr(T,g):T,response:E?mr(y,E):y}}function tS(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
30
|
-
`).reduce((n,r)=>{const[s,i]=r.split(": ");return n[s.toLowerCase()]=i,n},{}):{}}function nS(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return rS(e.response,e.responseType)}catch(n){t.push(n)}return j&&m.warn("[Replay] Failed to get xhr response body",...t),[void 0]}function rS(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch{return j&&m.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return j&&m.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function sS(e,t,n){try{const r=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Dr(r,n)}catch{return}}function iS(e){const t=A();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:a}=e.getOptions(),c={replay:e,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:a};t&&t.on?t.on("beforeAddBreadcrumb",(u,l)=>oS(c,u,l)):(vr(Ly(e)),Tr($y(e)))}catch{}}function oS(e,t,n){if(t.data)try{aS(t)&&uS(n)&&(Qy(t,n,e),Zy(t,n,e)),cS(t)&&lS(n)&&(Wy(t,n,e),Uy(t,n,e))}catch{j&&m.warn("Error when enriching network breadcrumb")}}function aS(e){return e.category==="xhr"}function cS(e){return e.category==="fetch"}function uS(e){return e&&e.xhr}function lS(e){return e&&e.response}let Po=null;function dS(e){return!!e.category}const fS=e=>t=>{if(!e.isEnabled())return;const n=pS(t);n&&An(e,n)};function pS(e){const t=e.getLastBreadcrumb&&e.getLastBreadcrumb();return Po===t||!t||(Po=t,!dS(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))?null:t.category==="console"?hS(t):Ae(t)}function hS(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return Ae(e);let n=!1;const r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>Hn?(n=!0,`${s.slice(0,Hn)}…`):s;if(typeof s=="object")try{const i=_r(s,7);return JSON.stringify(i).length>Hn?(n=!0,`${JSON.stringify(i,null,2).slice(0,Hn)}…`):i}catch{}return s});return Ae({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function mS(e){const t=ce(),n=A();t.addScopeListener(fS(e)),xa(G_(e)),En(Oy(e)),iS(e);const r=Ay(e,!$o(n));n&&n.addEventProcessor?n.addEventProcessor(r):Df(r),$o(n)&&(n.on("beforeSendEvent",wy(e)),n.on("afterSendEvent",Ou(e)),n.on("createDsc",s=>{const i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(s.replay_id=i)}),n.on("startTransaction",s=>{e.lastTransaction=s}),n.on("finishTransaction",s=>{e.lastTransaction=s}),n.on("beforeSendFeedback",(s,i)=>{const o=e.getSessionId();i&&i.includeReplay&&e.isEnabled()&&o&&s.contexts&&s.contexts.feedback&&(s.contexts.feedback.replay_id=o)}))}function $o(e){return!!(e&&e.on)}async function gS(e){try{return Promise.all(Or(e,[_S(Y.performance.memory)]))}catch{return[]}}function _S(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function yS(e,t,n){let r,s,i;const o=n&&n.maxWait?Math.max(n.maxWait,t):0;function a(){return c(),r=e(),r}function c(){s!==void 0&&clearTimeout(s),i!==void 0&&clearTimeout(i),s=i=void 0}function u(){return s!==void 0||i!==void 0?a():r}function l(){return s&&clearTimeout(s),s=setTimeout(a,t),o&&i===void 0&&(i=setTimeout(a,o)),r}return l.cancel=c,l.flush=u,l}function SS(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){j&&m.warn("[Replay] Received replay event after session expired.");return}const s=r||!t;t=!0,e.clickDetector&&U_(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!di(e,n,s))return!0;if(!s)return!1;if(ES(e,s),e.session&&e.session.previousSessionId)return!0;if(e.recordingMode==="buffer"&&e.session&&e.eventBuffer){const i=e.eventBuffer.getEarliestTimestamp();i&&(le(`[Replay] Updating session start time to earliest event in buffer to ${new Date(i)}`,e.getOptions()._experiments.traceInternals),e.session.started=i,e.getOptions().stickySession&&li(e.session))}return e.recordingMode==="session"&&e.flush(),!0})}}function bS(e){const t=e.getOptions();return{type:O.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function ES(e,t){!t||!e.session||e.session.segmentId!==0||di(e,bS(e),!1)}function vS(e,t,n,r){return De(Pa(e,js(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function TS({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
|
|
31
|
-
`;if(typeof e=="string")n=`${r}${e}`;else{const i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}async function IS({client:e,scope:t,replayId:n,event:r}){const s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:n,integrations:s};e.emit&&e.emit("preprocessEvent",r,i);const o=await Bs(e.getOptions(),r,i,t,e,Yt());if(!o)return null;o.platform=o.platform||"javascript";const a=e.getSdkMetadata&&e.getSdkMetadata(),{name:c,version:u}=a&&a.sdk||{};return o.sdk={...o.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0"},o}async function wS({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=TS({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:l}=r,d=A(),f=ce(),p=d&&d.getTransport(),h=d&&d.getDsn();if(!d||!p||!h||!i.sampled)return;const _={type:ug,replay_start_timestamp:l/1e3,timestamp:s/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:i.sampled},b=await IS({scope:f,client:d,replayId:t,event:_});if(!b){d.recordDroppedEvent("event_processor","replay",_),le("An event processor returned `null`, will not send event.");return}delete b.sdkProcessingMetadata;const g=vS(b,o,h,d.getOptions().tunnel);let S;try{S=await p.send(g)}catch(T){const y=new Error(ei);try{y.cause=T}catch{}throw y}if(!S)return S;if(typeof S.statusCode=="number"&&(S.statusCode<200||S.statusCode>=300))throw new Bu(S.statusCode);const E=Ba({},S);if(Fa(E,"replay"))throw new Hu(E);return S}class Bu extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Hu extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function Uu(e,t={count:0,interval:mg}){const{recordingData:n,options:r}=e;if(n.length)try{return await wS(e),!0}catch(s){if(s instanceof Bu||s instanceof Hu)throw s;if(Zl("Replays",{_retryCount:t.count}),j&&r._experiments&&r._experiments.captureExceptions&&bn(s),t.count>=gg){const i=new Error(`${ei} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,o)=>{setTimeout(async()=>{try{await Uu(e,t),i(!0)}catch(a){o(a)}},t.interval)})}}const Wu="__THROTTLED",kS="__SKIPPED";function RS(e,t,n){const r=new Map,s=a=>{const c=a-n;r.forEach((u,l)=>{l<c&&r.delete(l)})},i=()=>[...r.values()].reduce((a,c)=>a+c,0);let o=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(s(c),i()>=t){const l=o;return o=!0,l?kS:Wu}o=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class He{constructor({options:t,recordingOptions:n}){He.prototype.__init.call(this),He.prototype.__init2.call(this),He.prototype.__init3.call(this),He.prototype.__init4.call(this),He.prototype.__init5.call(this),He.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:lg,sessionIdleExpire:dg},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=yS(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=RS((o,a)=>Sy(this,o,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(_g,r),timeout:r,scrollTimeout:yg,ignoreSelector:s?s.join(","):""}:void 0;i&&(this.clickDetector=new $_(this,i))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options;if(!(n<=0&&r<=0)){if(this._initializeSessionForSampling(t),!this.session){this._handleException(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",Nt(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session")throw new Error("Replay recording is already in progress");if(this._isEnabled&&this.recordingMode==="buffer")throw new Error("Replay buffering is in progress, call `flush()` to save the replay");Nt("[Replay] Starting replay in session mode",this._options._experiments.traceInternals),this._updateUserActivity();const t=es({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");Nt("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const t=es({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=We({...this._recordingOptions,...this.recordingMode==="buffer"&&{checkoutEveryNms:hg},emit:SS(this),onMutation:this._onMutationHandler,...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this._handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this._handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1;try{le(`[Replay] Stopping Replay${n?` triggered by ${n}`:""}`,this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,hy(this)}catch(r){this._handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),le("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),le("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();le("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Rs(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${Y.location.pathname}${Y.location.hash}${Y.location.search}`,n=`${Y.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===Wu){const s=Ae({category:"replay.throttled"});this.addUpdate(()=>!di(this,{type:M_,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastTransaction||ce().getTransaction(),r=(t&&q(t).data||{})[te];if(!(!t||!r||!["route","custom"].includes(r)))return q(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=dy({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(t){j&&m.error("[Replay]",t),j&&this._options._experiments&&this._options._experiments.captureExceptions&&bn(t)}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=es({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return xu(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{Y.document.addEventListener("visibilitychange",this._handleVisibilityChange),Y.addEventListener("blur",this._handleWindowBlur),Y.addEventListener("focus",this._handleWindowFocus),Y.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(mS(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}this._performanceCleanupCallback=iy(this)}_removeListeners(){try{Y.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Y.removeEventListener("blur",this._handleWindowBlur),Y.removeEventListener("focus",this._handleWindowFocus),Y.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this._handleException(t)}}__init(){this._handleVisibilityChange=()=>{Y.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const t=Ae({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=Ae({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{X_(this,t)}}_doChangeToBackgroundTasks(t){!this.session||Cu(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){le("[Replay] Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:O.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){const t=Q_(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(Or(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){j&&m.error("[Replay] No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await gS(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await Uu({replayId:t,recordingData:i,segmentId:s,eventContext:r,session:this.session,options:this.getOptions(),timestamp:n})}catch(n){this._handleException(n),this.stop({reason:"sendReplay"});const r=A();r&&r.recordDroppedEvent("send_error","replay")}}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){j&&m.error("[Replay] Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();const i=s<this._options.minReplayDuration,o=s>this._options.maxReplayDuration+5e3;if(i||o){le(`[Replay] Session duration (${Math.floor(s/1e3)}s) is too ${i?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),i&&this._debouncedFlush();return}const a=this.eventBuffer;if(a&&this.session.segmentId===0&&!a.hasCheckout&&le("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock){this._flushLock=this._runFlush(),await this._flushLock,this._flushLock=void 0;return}try{await this._flushLock}catch(c){j&&m.error(c)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&li(this.session)}__init6(){this._onMutationHandler=t=>{const n=t.length,r=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=r&&n>r;if(n>s||i){const o=Ae({category:"replay.mutations",data:{count:n,limit:i}});this._createCustomBreadcrumb(o)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}}function nn(e,t,n,r){const s=typeof r=="string"?r.split(","):[],i=[...e,...s,...t];return typeof n<"u"&&(typeof n=="string"&&i.push(`.${n}`),Lt(()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")})),i.join(",")}function CS({mask:e,unmask:t,block:n,unblock:r,ignore:s,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:c,ignoreClass:u}){const l=['base[href="/"]'],d=nn(e,[".sentry-mask","[data-sentry-mask]"],a,c),f=nn(t,[".sentry-unmask","[data-sentry-unmask]"]),p={maskTextSelector:d,unmaskTextSelector:f,blockSelector:nn(n,[".sentry-block","[data-sentry-block]",...l],i,o),unblockSelector:nn(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:nn(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],u)};return i instanceof RegExp&&(p.blockClass=i),a instanceof RegExp&&(p.maskTextClass=a),p}function xS({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:i}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?i:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}const Fo='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',AS=["content-length","content-type","accept"];let Bo=!1;const gv=(e=>new Lr(e));class Lr{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=fg,flushMaxDelay:n=pg,minReplayDuration:r=Sg,maxReplayDuration:s=So,stickySession:i=!0,useCompression:o=!0,workerUrl:a,_experiments:c={},sessionSampleRate:u,errorSampleRate:l,maskAllText:d=!0,maskAllInputs:f=!0,blockAllMedia:p=!0,mutationBreadcrumbLimit:h=750,mutationLimit:_=1e4,slowClickTimeout:b=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:S=[],networkDetailDenyUrls:E=[],networkCaptureBodies:T=!0,networkRequestHeaders:y=[],networkResponseHeaders:v=[],mask:x=[],maskAttributes:M=["title","placeholder"],unmask:w=[],block:C=[],unblock:D=[],ignore:V=[],maskFn:ne,beforeAddRecordingEvent:oe,beforeErrorSampling:pe,blockClass:z,blockSelector:_e,maskInputOptions:ee,maskTextClass:fe,maskTextSelector:ye,ignoreClass:Br}={}){this.name=Lr.id;const gt=CS({mask:x,unmask:w,block:C,unblock:D,ignore:V,blockClass:z,blockSelector:_e,maskTextClass:fe,maskTextSelector:ye,ignoreClass:Br});if(this._recordingOptions={maskAllInputs:f,maskAllText:d,maskInputOptions:{...ee||{},password:!0},maskTextFn:ne,maskInputFn:ne,maskAttributeFn:(Le,_t,en)=>xS({maskAttributes:M,maskAllText:d,privacyOptions:gt,key:Le,value:_t,el:en}),...gt,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:Le=>{try{Le.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,bg),maxReplayDuration:Math.min(s,So),stickySession:i,sessionSampleRate:u,errorSampleRate:l,useCompression:o,workerUrl:a,blockAllMedia:p,maskAllInputs:f,maskAllText:d,mutationBreadcrumbLimit:h,mutationLimit:_,slowClickTimeout:b,slowClickIgnoreSelectors:g,networkDetailAllowUrls:S,networkDetailDenyUrls:E,networkCaptureBodies:T,networkRequestHeaders:Ho(y),networkResponseHeaders:Ho(v),beforeAddRecordingEvent:oe,beforeErrorSampling:pe,_experiments:c},typeof u=="number"&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.
|
|
32
|
-
This option is deprecated and will be removed soon.
|
|
33
|
-
Instead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:
|
|
34
|
-
Sentry.init({ replaysSessionSampleRate: ${u} })`),this._initialOptions.sessionSampleRate=u),typeof l=="number"&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.
|
|
35
|
-
This option is deprecated and will be removed soon.
|
|
36
|
-
Instead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:
|
|
37
|
-
Sentry.init({ replaysOnErrorSampleRate: ${l} })`),this._initialOptions.errorSampleRate=l),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Fo}`:Fo),this._isInitialized&&hs())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Bo}set _isInitialized(t){Bo=t}setupOnce(){hs()&&(this._setup(),setTimeout(()=>this._initialize()))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return!this._replay||!this._replay.isEnabled()?Promise.resolve():this._replay.sendBufferedReplayOrFlush(t)}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){const t=MS(this._initialOptions);this._replay=new He({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{const n=A().getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}Lr.__initStatic();function MS(e){const t=A(),n=t&&t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...Ie(e)};return n?(e.sessionSampleRate==null&&e.errorSampleRate==null&&n.replaysSessionSampleRate==null&&n.replaysOnErrorSampleRate==null&&Lt(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),typeof n.replaysSessionSampleRate=="number"&&(r.sessionSampleRate=n.replaysSessionSampleRate),typeof n.replaysOnErrorSampleRate=="number"&&(r.errorSampleRate=n.replaysOnErrorSampleRate),r):(Lt(()=>{console.warn("SDK client is not available.")}),r)}function Ho(e){return[...AS,...e.map(t=>t.toLowerCase())]}function _v(){const e=A();return e&&e.getIntegrationByName&&e.getIntegrationByName("Replay")}var Uo;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(Uo||(Uo={}));function OS(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function As(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:As(e.parentNode,t,n,r+1)}function Wo(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(OS(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const Tt=`Please stop import mirror directly. Instead of that,\r
|
|
38
|
-
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
39
|
-
or you can use record.mirror to access the mirror instance during recording.`;let zo={map:{},getId(){return console.error(Tt),-1},getNode(){return console.error(Tt),null},removeNodeFromMap(){console.error(Tt)},has(){return console.error(Tt),!1},reset(){console.error(Tt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(zo=new Proxy(zo,{get(e,t,n){return t==="map"&&console.error(Tt),Reflect.get(e,t,n)}}));function pi(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){ju(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>pi(e,t,i||{},!0)}function hi(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}/[1-9][0-9]{12}/.test(Date.now().toString());function NS(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function Pr(e,t,n,r,s){if(!e)return!1;const i=NS(e);if(!i)return!1;const o=Wo(t,n),a=As(i,o);let c=-1;return a<0?!1:(r&&(c=As(i,Wo(null,r))),a>-1&&c<0?!0:a<c)}const jo={};function zu(e){const t=jo[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return jo[e]=r.bind(window)}function Xe(...e){return zu("requestAnimationFrame")(...e)}function ju(...e){return zu("setTimeout")(...e)}var jt=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(jt||{});let Kn;function DS(e){Kn=e}const qo=e=>Kn?((...n)=>{try{return e(...n)}catch(r){if(Kn&&Kn(r)===!0)return()=>{};throw r}}):e;var xt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",LS=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var zn=0;zn<xt.length;zn++)LS[xt.charCodeAt(zn)]=zn;var PS=function(e){var t=new Uint8Array(e),n,r=t.length,s="";for(n=0;n<r;n+=3)s+=xt[t[n]>>2],s+=xt[(t[n]&3)<<4|t[n+1]>>4],s+=xt[(t[n+1]&15)<<2|t[n+2]>>6],s+=xt[t[n+2]&63];return r%3===2?s=s.substring(0,s.length-1)+"=":r%3===1&&(s=s.substring(0,s.length-2)+"=="),s};const Go=new Map;function $S(e,t){let n=Go.get(e);return n||(n=new Map,Go.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const qu=(e,t,n)=>{if(!e||!(Yu(e,t)||typeof e=="object"))return;const r=e.constructor.name,s=$S(n,r);let i=s.indexOf(e);return i===-1&&(i=s.length,s.push(e)),i};function Xn(e,t,n){if(e instanceof Array)return e.map(r=>Xn(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,s=PS(e);return{rr_type:r,base64:s}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Xn(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:s}=e;return{rr_type:r,src:s}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",s=e.toDataURL();return{rr_type:r,src:s}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Xn(e.data,t,n),e.width,e.height]};if(Yu(e,t)||typeof e=="object"){const r=e.constructor.name,s=qu(e,t,n);return{rr_type:r,index:s}}}}return e}const Gu=(e,t,n)=>e.map(r=>Xn(r,t,n)),Yu=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof t[s]=="function").find(s=>e instanceof t[s]);function FS(e,t,n,r,s){const i=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of o)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=hi(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...l){return Pr(this.canvas,n,r,s)||ju(()=>{const d=Gu(l,t,this);e(this.canvas,{type:jt["2D"],property:a,args:d})},0),u.apply(this,l)}});i.push(c)}catch{const u=pi(t.CanvasRenderingContext2D.prototype,a,{set(l){e(this.canvas,{type:jt["2D"],property:a,args:[l],setter:!0})}});i.push(u)}return()=>{i.forEach(a=>a())}}function BS(e){return e==="experimental-webgl"?"webgl":e}function Yo(e,t,n,r,s){const i=[];try{const o=hi(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!Pr(this,t,n,r)){const l=BS(c);if("__context"in this||(this.__context=l),s&&["webgl","webgl2"].includes(l))if(u[0]&&typeof u[0]=="object"){const d=u[0];d.preserveDrawingBuffer||(d.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});i.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function Vo(e,t,n,r,s,i,o,a){const c=[],u=Object.getOwnPropertyNames(e);for(const l of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof e[l]!="function")continue;const d=hi(e,l,function(f){return function(...p){const h=f.apply(this,p);if(qu(h,a,this),"tagName"in this.canvas&&!Pr(this.canvas,r,s,i)){const _=Gu(p,a,this),b={type:t,property:l,args:_};n(this.canvas,b)}return h}});c.push(d)}catch{const f=pi(e,l,{set(p){n(this.canvas,{type:t,property:l,args:[p],setter:!0})}});c.push(f)}return c}function HS(e,t,n,r,s,i){const o=[];return o.push(...Vo(t.WebGLRenderingContext.prototype,jt.WebGL,e,n,r,s,i,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...Vo(t.WebGL2RenderingContext.prototype,jt.WebGL2,e,n,r,s,i,t)),()=>{o.forEach(a=>a())}}var US='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function WS(){const e=new Blob([US]);return URL.createObjectURL(e)}class zS{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(d,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(d)||this.pendingCanvasMutations.set(d,[]),this.pendingCanvasMutations.get(d).push(f)};const{sampling:n="all",win:r,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:a,recordCanvas:c,dataURLOptions:u,errorHandler:l}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,l&&DS(l),!t.enableManualSnapshot&&qo(()=>{c&&n==="all"&&this.initCanvasMutationObserver(r,s,i,o),c&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,s,i,o,a,{dataURLOptions:u})})()}initCanvasFPSObserver(t,n,r,s,i,o,a){const c=Yo(n,r,s,i,!0),u=this.takeSnapshot(!1,t,n,r,s,i,o,a.dataURLOptions);this.resetObservers=()=>{c(),cancelAnimationFrame(u)}}initCanvasMutationObserver(t,n,r,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Yo(t,n,r,s,!1),o=FS(this.processMutation.bind(this),t,n,r,s),a=HS(this.processMutation.bind(this),t,n,r,s,this.mirror);this.resetObservers=()=>{i(),o(),a()}}snapshot(t){const{options:n}=this,r=this.takeSnapshot(!0,n.sampling==="all"?2:n.sampling||2,n.win,n.blockClass,n.blockSelector,n.unblockSelector,n.maxCanvasSize,n.dataURLOptions,t);this.resetObservers=()=>{cancelAnimationFrame(r)}}takeSnapshot(t,n,r,s,i,o,a,c,u){const l=new Map,d=new Worker(WS());d.onmessage=g=>{const S=g.data,{id:E}=S;if(l.set(E,!1),!("base64"in S))return;const{base64:T,type:y,width:v,height:x}=S;this.mutationCb({id:E,type:jt["2D"],commands:[{property:"clearRect",args:[0,0,v,x]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:T}],type:y}]},0,0,v,x]}]})};const f=1e3/n;let p=0,h;const _=g=>{if(g)return[g];const S=[];return r.document.querySelectorAll("canvas").forEach(E=>{Pr(E,s,i,o)||S.push(E)}),S},b=g=>{if(p&&g-p<f){h=Xe(b);return}p=g,_(u).forEach(S=>{const E=this.mirror.getId(S);if(!l.get(E)&&!(!S.width||!S.height)){if(l.set(E,!0),!t&&["webgl","webgl2"].includes(S.__context)){const T=S.getContext(S.__context);Vn([T,"optionalAccess",y=>y.getContextAttributes,"call",y=>y(),"optionalAccess",y=>y.preserveDrawingBuffer])===!1&&T.clear(T.COLOR_BUFFER_BIT)}createImageBitmap(S).then(T=>{d.postMessage({id:E,bitmap:T,width:S.width,height:S.height,dataURLOptions:c,maxCanvasSize:a},[T])}).catch(T=>{qo(()=>{throw T})()})}}),h=Xe(b)};return h=Xe(b),h}startPendingCanvasMutationFlusher(){Xe(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,Xe(t)};Xe(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),Xe(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const s=r.map(o=>{const{type:a,...c}=o;return c}),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:s}),this.pendingCanvasMutations.delete(t)}}const Ko={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},Vu="ReplayCanvas",jn=1280,jS=((e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,jn):jn,n?Math.min(n,jn):jn]};let s;const i=new Promise(o=>s=o);return{name:Vu,setupOnce(){},getOptions(){const{quality:o,enableManualSnapshot:a,maxCanvasSize:c}=r;return{enableManualSnapshot:a,recordCanvas:!0,getCanvasManager:u=>{const l=new zS({...u,enableManualSnapshot:a,maxCanvasSize:c,errorHandler:d=>{try{typeof d=="object"&&(d.__rrweb__=!0)}catch{}}});return s(l),l},...Ko[o]||Ko.medium}},async snapshot(o){(await i).snapshot(o)}}}),qS=jS,yv=Q(Vu,qS),mt=W,ts="#ffffff",Xo="inherit",ns="rgba(108, 95, 199, 1)",Jo={fontFamily:"system-ui, 'Helvetica Neue', Arial, sans-serif",fontSize:"14px",background:ts,backgroundHover:"#f6f6f7",foreground:"#2b2233",border:"1.5px solid rgba(41, 35, 47, 0.13)",borderRadius:"25px",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",success:"#268d75",error:"#df3338",submitBackground:"rgba(88, 74, 192, 1)",submitBackgroundHover:ns,submitBorder:ns,submitOutlineFocus:"#29232f",submitForeground:ts,submitForegroundHover:ts,cancelBackground:"transparent",cancelBackgroundHover:"var(--background-hover)",cancelBorder:"var(--border)",cancelOutlineFocus:"var(--input-outline-focus)",cancelForeground:"var(--foreground)",cancelForegroundHover:"var(--foreground)",inputBackground:Xo,inputForeground:Xo,inputBorder:"var(--border)",inputOutlineFocus:ns,formBorderRadius:"20px",formContentBorderRadius:"6px"},Zo={light:Jo,dark:{...Jo,background:"#29232f",backgroundHover:"#352f3b",foreground:"#ebe6ef",border:"1.5px solid rgba(235, 230, 239, 0.15)",success:"#2da98c",error:"#f55459"}},GS="Report a Bug",YS="Cancel",VS="Send Bug Report",KS="Report a Bug",XS="your.email@example.org",JS="Email",ZS="What's the bug? What did you expect?",QS="Description",eb="Your Name",tb="Name",nb="(required)",rb="Thank you for your report!",Ku="widget",Xu="api";async function sb({client:e,scope:t,event:n}){const r={};e.emit&&e.emit("preprocessEvent",n,r);const s=await Bs(e.getOptions(),n,r,t,e,Yt());return s===null?(e.recordDroppedEvent("event_processor","feedback",n),null):(s.platform=s.platform||"javascript",s)}async function ib({feedback:{message:e,email:t,name:n,source:r,url:s}},{includeReplay:i=!0}={}){const o=A(),a=o&&o.getTransport(),c=o&&o.getDsn();if(!o||!a||!c)return;const u={contexts:{feedback:{contact_email:t,name:n,message:e,url:s,source:r}},type:"feedback"};return dt(async l=>{l.clearBreadcrumbs(),[Xu,Ku].includes(String(r))&&l.setLevel("info");const d=await sb({scope:l,client:o,event:u});if(!d)return;o.emit&&o.emit("beforeSendFeedback",d,{includeReplay:!!i});const f=Xa(d,c,o.getOptions()._metadata,o.getOptions().tunnel);let p;try{p=await a.send(f)}catch(h){const _=new Error("Unable to send Feedback");try{_.cause=h}catch{}throw _}if(p){if(typeof p.statusCode=="number"&&(p.statusCode<200||p.statusCode>=300))throw new Error("Unable to send Feedback");return p}})}function ob({name:e,email:t,message:n,source:r=Xu,url:s=Ta()},i={}){if(!n)throw new Error("Unable to submit feedback with empty message");return ib({feedback:{name:e,email:t,message:n,url:s,source:r}},i)}const Je=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Qo(e,t){return{...e,...t,themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function ab(e){const t=e.createElement("style");return t.textContent=`
|
|
40
|
-
.widget__actor {
|
|
41
|
-
position: fixed;
|
|
42
|
-
left: var(--left);
|
|
43
|
-
right: var(--right);
|
|
44
|
-
bottom: var(--bottom);
|
|
45
|
-
top: var(--top);
|
|
46
|
-
z-index: var(--z-index);
|
|
47
|
-
|
|
48
|
-
line-height: 16px;
|
|
49
|
-
|
|
50
|
-
display: flex;
|
|
51
|
-
align-items: center;
|
|
52
|
-
gap: 8px;
|
|
53
|
-
|
|
54
|
-
border-radius: var(--border-radius);
|
|
55
|
-
cursor: pointer;
|
|
56
|
-
font-family: inherit;
|
|
57
|
-
font-size: var(--font-size);
|
|
58
|
-
font-weight: 600;
|
|
59
|
-
padding: 16px;
|
|
60
|
-
text-decoration: none;
|
|
61
|
-
z-index: 9000;
|
|
62
|
-
|
|
63
|
-
color: var(--foreground);
|
|
64
|
-
background-color: var(--background);
|
|
65
|
-
border: var(--border);
|
|
66
|
-
box-shadow: var(--box-shadow);
|
|
67
|
-
opacity: 1;
|
|
68
|
-
transition: opacity 0.1s ease-in-out;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.widget__actor:hover {
|
|
72
|
-
background-color: var(--background-hover);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.widget__actor svg {
|
|
76
|
-
width: 16px;
|
|
77
|
-
height: 16px;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.widget__actor--hidden {
|
|
81
|
-
opacity: 0;
|
|
82
|
-
pointer-events: none;
|
|
83
|
-
visibility: hidden;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.widget__actor__text {
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
@media (max-width: 600px) {
|
|
90
|
-
.widget__actor__text {
|
|
91
|
-
display: none;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.feedback-icon path {
|
|
96
|
-
fill: var(--foreground);
|
|
97
|
-
}
|
|
98
|
-
`,t}function cb(e){const t=e.createElement("style");return t.textContent=`
|
|
99
|
-
.dialog {
|
|
100
|
-
line-height: 25px;
|
|
101
|
-
background-color: rgba(0, 0, 0, 0.05);
|
|
102
|
-
border: none;
|
|
103
|
-
position: fixed;
|
|
104
|
-
inset: 0;
|
|
105
|
-
z-index: 10000;
|
|
106
|
-
width: 100vw;
|
|
107
|
-
height: 100vh;
|
|
108
|
-
display: flex;
|
|
109
|
-
align-items: center;
|
|
110
|
-
justify-content: center;
|
|
111
|
-
opacity: 1;
|
|
112
|
-
transition: opacity 0.2s ease-in-out;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.dialog:not([open]) {
|
|
116
|
-
opacity: 0;
|
|
117
|
-
pointer-events: none;
|
|
118
|
-
visibility: hidden;
|
|
119
|
-
}
|
|
120
|
-
.dialog:not([open]) .dialog__content {
|
|
121
|
-
transform: translate(0, -16px) scale(0.98);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.dialog__content {
|
|
125
|
-
position: fixed;
|
|
126
|
-
left: var(--left);
|
|
127
|
-
right: var(--right);
|
|
128
|
-
bottom: var(--bottom);
|
|
129
|
-
top: var(--top);
|
|
130
|
-
|
|
131
|
-
border: var(--border);
|
|
132
|
-
border-radius: var(--form-border-radius);
|
|
133
|
-
background-color: var(--background);
|
|
134
|
-
color: var(--foreground);
|
|
135
|
-
|
|
136
|
-
width: 320px;
|
|
137
|
-
max-width: 100%;
|
|
138
|
-
max-height: calc(100% - 2rem);
|
|
139
|
-
display: flex;
|
|
140
|
-
flex-direction: column;
|
|
141
|
-
box-shadow: var(--box-shadow);
|
|
142
|
-
transition: transform 0.2s ease-in-out;
|
|
143
|
-
transform: translate(0, 0) scale(1);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.dialog__header {
|
|
147
|
-
display: flex;
|
|
148
|
-
align-items: center;
|
|
149
|
-
justify-content: space-between;
|
|
150
|
-
font-size: 20px;
|
|
151
|
-
font-weight: 600;
|
|
152
|
-
padding: 24px 24px 0 24px;
|
|
153
|
-
margin: 0;
|
|
154
|
-
margin-bottom: 16px;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.brand-link {
|
|
158
|
-
display: inline-flex;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.error {
|
|
162
|
-
color: var(--error);
|
|
163
|
-
margin-bottom: 16px;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.form {
|
|
167
|
-
display: grid;
|
|
168
|
-
overflow: auto;
|
|
169
|
-
flex-direction: column;
|
|
170
|
-
gap: 16px;
|
|
171
|
-
padding: 0 24px 24px;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.form__error-container {
|
|
175
|
-
color: var(--error);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.form__error-container--hidden {
|
|
179
|
-
display: none;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.form__label {
|
|
183
|
-
display: flex;
|
|
184
|
-
flex-direction: column;
|
|
185
|
-
gap: 4px;
|
|
186
|
-
margin: 0px;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.form__label__text {
|
|
190
|
-
display: grid;
|
|
191
|
-
gap: 4px;
|
|
192
|
-
align-items: center;
|
|
193
|
-
grid-auto-flow: column;
|
|
194
|
-
grid-auto-columns: max-content;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.form__label__text--required {
|
|
198
|
-
font-size: 0.85em;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.form__input {
|
|
202
|
-
line-height: inherit;
|
|
203
|
-
background-color: var(--input-background);
|
|
204
|
-
box-sizing: border-box;
|
|
205
|
-
border: var(--input-border);
|
|
206
|
-
border-radius: var(--form-content-border-radius);
|
|
207
|
-
color: var(--input-foreground);
|
|
208
|
-
font-family: inherit;
|
|
209
|
-
font-size: var(--font-size);
|
|
210
|
-
font-weight: 500;
|
|
211
|
-
padding: 6px 12px;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.form__input::placeholder {
|
|
215
|
-
color: var(--input-foreground);
|
|
216
|
-
opacity: 0.65;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.form__input:focus-visible {
|
|
220
|
-
outline: 1px auto var(--input-outline-focus);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.form__input--textarea {
|
|
224
|
-
font-family: inherit;
|
|
225
|
-
resize: vertical;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
.btn-group {
|
|
229
|
-
display: grid;
|
|
230
|
-
gap: 8px;
|
|
231
|
-
margin-top: 8px;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.btn {
|
|
235
|
-
line-height: inherit;
|
|
236
|
-
border: var(--cancel-border);
|
|
237
|
-
border-radius: var(--form-content-border-radius);
|
|
238
|
-
cursor: pointer;
|
|
239
|
-
font-family: inherit;
|
|
240
|
-
font-size: var(--font-size);
|
|
241
|
-
font-weight: 600;
|
|
242
|
-
padding: 6px 16px;
|
|
243
|
-
}
|
|
244
|
-
.btn[disabled] {
|
|
245
|
-
opacity: 0.6;
|
|
246
|
-
pointer-events: none;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.btn--primary {
|
|
250
|
-
background-color: var(--submit-background);
|
|
251
|
-
border-color: var(--submit-border);
|
|
252
|
-
color: var(--submit-foreground);
|
|
253
|
-
}
|
|
254
|
-
.btn--primary:hover {
|
|
255
|
-
background-color: var(--submit-background-hover);
|
|
256
|
-
color: var(--submit-foreground-hover);
|
|
257
|
-
}
|
|
258
|
-
.btn--primary:focus-visible {
|
|
259
|
-
outline: 1px auto var(--submit-outline-focus);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.btn--default {
|
|
263
|
-
background-color: var(--cancel-background);
|
|
264
|
-
color: var(--cancel-foreground);
|
|
265
|
-
font-weight: 500;
|
|
266
|
-
}
|
|
267
|
-
.btn--default:hover {
|
|
268
|
-
background-color: var(--cancel-background-hover);
|
|
269
|
-
color: var(--cancel-foreground-hover);
|
|
270
|
-
}
|
|
271
|
-
.btn--default:focus-visible {
|
|
272
|
-
outline: 1px auto var(--cancel-outline-focus);
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
.success-message {
|
|
276
|
-
background-color: var(--background);
|
|
277
|
-
border: var(--border);
|
|
278
|
-
border-radius: var(--border-radius);
|
|
279
|
-
box-shadow: var(--box-shadow);
|
|
280
|
-
font-weight: 600;
|
|
281
|
-
color: var(--success);
|
|
282
|
-
padding: 12px 24px;
|
|
283
|
-
line-height: 25px;
|
|
284
|
-
display: grid;
|
|
285
|
-
align-items: center;
|
|
286
|
-
grid-auto-flow: column;
|
|
287
|
-
gap: 6px;
|
|
288
|
-
cursor: default;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.success-icon path {
|
|
292
|
-
fill: var(--success);
|
|
293
|
-
}
|
|
294
|
-
`,t}function ea(e){return`
|
|
295
|
-
--background: ${e.background};
|
|
296
|
-
--background-hover: ${e.backgroundHover};
|
|
297
|
-
--foreground: ${e.foreground};
|
|
298
|
-
--error: ${e.error};
|
|
299
|
-
--success: ${e.success};
|
|
300
|
-
--border: ${e.border};
|
|
301
|
-
--border-radius: ${e.borderRadius};
|
|
302
|
-
--box-shadow: ${e.boxShadow};
|
|
303
|
-
|
|
304
|
-
--submit-background: ${e.submitBackground};
|
|
305
|
-
--submit-background-hover: ${e.submitBackgroundHover};
|
|
306
|
-
--submit-border: ${e.submitBorder};
|
|
307
|
-
--submit-outline-focus: ${e.submitOutlineFocus};
|
|
308
|
-
--submit-foreground: ${e.submitForeground};
|
|
309
|
-
--submit-foreground-hover: ${e.submitForegroundHover};
|
|
310
|
-
|
|
311
|
-
--cancel-background: ${e.cancelBackground};
|
|
312
|
-
--cancel-background-hover: ${e.cancelBackgroundHover};
|
|
313
|
-
--cancel-border: ${e.cancelBorder};
|
|
314
|
-
--cancel-outline-focus: ${e.cancelOutlineFocus};
|
|
315
|
-
--cancel-foreground: ${e.cancelForeground};
|
|
316
|
-
--cancel-foreground-hover: ${e.cancelForegroundHover};
|
|
317
|
-
|
|
318
|
-
--input-background: ${e.inputBackground};
|
|
319
|
-
--input-foreground: ${e.inputForeground};
|
|
320
|
-
--input-border: ${e.inputBorder};
|
|
321
|
-
--input-outline-focus: ${e.inputOutlineFocus};
|
|
322
|
-
|
|
323
|
-
--form-border-radius: ${e.formBorderRadius};
|
|
324
|
-
--form-content-border-radius: ${e.formContentBorderRadius};
|
|
325
|
-
`}function ub(e,t,n){const r=e.createElement("style");return r.textContent=`
|
|
326
|
-
:host {
|
|
327
|
-
--bottom: 1rem;
|
|
328
|
-
--right: 1rem;
|
|
329
|
-
--top: auto;
|
|
330
|
-
--left: auto;
|
|
331
|
-
--z-index: 100000;
|
|
332
|
-
--font-family: ${n.light.fontFamily};
|
|
333
|
-
--font-size: ${n.light.fontSize};
|
|
334
|
-
|
|
335
|
-
position: fixed;
|
|
336
|
-
left: var(--left);
|
|
337
|
-
right: var(--right);
|
|
338
|
-
bottom: var(--bottom);
|
|
339
|
-
top: var(--top);
|
|
340
|
-
z-index: var(--z-index);
|
|
341
|
-
|
|
342
|
-
font-family: var(--font-family);
|
|
343
|
-
font-size: var(--font-size);
|
|
344
|
-
|
|
345
|
-
${ea(t==="dark"?n.dark:n.light)}
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
${t==="system"?`
|
|
349
|
-
@media (prefers-color-scheme: dark) {
|
|
350
|
-
:host {
|
|
351
|
-
${ea(n.dark)}
|
|
352
|
-
}
|
|
353
|
-
}`:""}
|
|
354
|
-
}`,r}function lb({id:e,colorScheme:t,themeDark:n,themeLight:r}){try{const s=mt.document,i=s.createElement("div");i.id=e;const o=i.attachShadow({mode:"open"});return o.appendChild(ub(s,t,{dark:n,light:r})),o.appendChild(cb(s)),{shadow:o,host:i}}catch{throw m.warn("[Feedback] Browser does not support shadow DOM API"),new Error("Browser does not support shadow DOM API.")}}async function db(e,t,n){if(!e)return;const r=()=>{e&&e.showError("There was a problem submitting feedback, please wait and try again.")};e.hideError();try{return await ob({...t,source:Ku},n)}catch(s){Je&&m.error(s),r()}}function he(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const bt=20,fb="http://www.w3.org/2000/svg";function pb(){const e=a=>mt.document.createElementNS(fb,a),t=he(e("svg"),{class:"feedback-icon",width:`${bt}`,height:`${bt}`,viewBox:`0 0 ${bt} ${bt}`,fill:"none"}),n=he(e("g"),{clipPath:"url(#clip0_57_80)"}),r=he(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const s=e("defs"),i=he(e("clipPath"),{id:"clip0_57_80"}),o=he(e("rect"),{width:`${bt}`,height:`${bt}`,fill:"white"});return i.appendChild(o),s.appendChild(i),t.appendChild(s).appendChild(i).appendChild(o),{get el(){return t}}}function K(e,t,...n){const s=mt.document.createElement(e);t&&Object.entries(t).forEach(([i,o])=>{i==="className"&&typeof o=="string"?s.setAttribute("class",o):typeof o=="boolean"&&o?s.setAttribute(i,""):typeof o=="string"?s.setAttribute(i,o):i.startsWith("on")&&typeof o=="function"&&s.addEventListener(i.substring(2).toLowerCase(),o)});for(const i of n)Ju(s,i);return s}function Ju(e,t){const n=mt.document;if(!(typeof t>"u"||t===null))if(Array.isArray(t))for(const r of t)Ju(e,r);else t===!1||(typeof t=="string"?e.appendChild(n.createTextNode(t)):t instanceof Node?e.appendChild(t):e.appendChild(n.createTextNode(String(t))))}function hb({buttonLabel:e,onClick:t}){function n(s){t&&t(s)}const r=K("button",{type:"button",className:"widget__actor","aria-label":e,"aria-hidden":"false"},pb().el,e?K("span",{className:"widget__actor__text"},e):null);return r.addEventListener("click",n),{get el(){return r},show:()=>{r.classList.remove("widget__actor--hidden"),r.setAttribute("aria-hidden","false")},hide:()=>{r.classList.add("widget__actor--hidden"),r.setAttribute("aria-hidden","true")}}}function mb({label:e}){return{el:K("button",{type:"submit",className:"btn btn--primary","aria-label":e},e)}}function rs(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function gb({nameLabel:e,namePlaceholder:t,emailLabel:n,emailPlaceholder:r,messageLabel:s,messagePlaceholder:i,isRequiredLabel:o,cancelButtonLabel:a,submitButtonLabel:c,showName:u,showEmail:l,isNameRequired:d,isEmailRequired:f,defaultName:p,defaultEmail:h,onCancel:_,onSubmit:b}){const{el:g}=mb({label:c});function S(D){if(D.preventDefault(),D.target instanceof HTMLFormElement)try{if(b){const V=new FormData(D.target),ne={name:rs(V,"name"),email:rs(V,"email"),message:rs(V,"message")};b(ne)}}catch{}}const E=K("div",{className:"form__error-container form__error-container--hidden","aria-hidden":"true"});function T(D){E.textContent=D,E.classList.remove("form__error-container--hidden"),E.setAttribute("aria-hidden","false")}function y(){E.textContent="",E.classList.add("form__error-container--hidden"),E.setAttribute("aria-hidden","true")}const v=K("input",{id:"name",type:u?"text":"hidden","aria-hidden":u?"false":"true",name:"name",required:d,className:"form__input",placeholder:t,value:p}),x=K("input",{id:"email",type:l?"text":"hidden","aria-hidden":l?"false":"true",name:"email",required:f,className:"form__input",placeholder:r,value:h}),M=K("textarea",{id:"message",autoFocus:"true",rows:"5",name:"message",required:!0,className:"form__input form__input--textarea",placeholder:i}),w=K("button",{type:"button",className:"btn btn--default","aria-label":a,onClick:D=>{_&&_(D)}},a),C=K("form",{className:"form",onSubmit:S},[E,u&&K("label",{htmlFor:"name",className:"form__label"},[K("span",{className:"form__label__text"},e,d&&K("span",{className:"form__label__text--required"},` ${o}`)),v]),!u&&v,l&&K("label",{htmlFor:"email",className:"form__label"},[K("span",{className:"form__label__text"},n,f&&K("span",{className:"form__label__text--required"},` ${o}`)),x]),!l&&x,K("label",{htmlFor:"message",className:"form__label"},[K("span",{className:"form__label__text"},s,K("span",{className:"form__label__text--required"},` ${o}`)),M]),K("div",{className:"btn-group"},[g,w])]);return{get el(){return C},showError:T,hideError:y}}const _b="http://www.w3.org/2000/svg";function yb({colorScheme:e}){const t=o=>mt.document.createElementNS(_b,o),n=he(t("svg"),{class:"sentry-logo",width:"32",height:"30",viewBox:"0 0 72 66",fill:"none"}),r=he(t("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});n.append(r);const s=t("defs"),i=t("style");return i.textContent=`
|
|
355
|
-
path {
|
|
356
|
-
fill: ${e==="dark"?"#fff":"#362d59"};
|
|
357
|
-
}`,e==="system"&&(i.textContent+=`
|
|
358
|
-
@media (prefers-color-scheme: dark) {
|
|
359
|
-
path: {
|
|
360
|
-
fill: '#fff';
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
`),s.append(i),n.append(s),{get el(){return n}}}function Sb({formTitle:e,showBranding:t,showName:n,showEmail:r,isNameRequired:s,isEmailRequired:i,colorScheme:o,defaultName:a,defaultEmail:c,onClosed:u,onCancel:l,onSubmit:d,...f}){let p=null;function h(){_(),u&&u()}function _(){p&&(p.open=!1)}function b(){p&&(p.open=!0)}function g(){return p&&p.open===!0||!1}const{el:S,showError:E,hideError:T}=gb({showEmail:r,showName:n,isEmailRequired:i,isNameRequired:s,defaultName:a,defaultEmail:c,onSubmit:d,onCancel:l,...f});return p=K("dialog",{className:"dialog",open:!0,onClick:h},K("div",{className:"dialog__content",onClick:y=>{y.stopPropagation()}},K("h2",{className:"dialog__header"},e,t&&K("a",{className:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer"},yb({colorScheme:o}).el)),S)),{get el(){return p},showError:E,hideError:T,open:b,close:_,checkIsOpen:g}}const qn=16,ta=17,bb="http://www.w3.org/2000/svg";function Eb(){const e=c=>mt.document.createElementNS(bb,c),t=he(e("svg"),{class:"success-icon",width:`${qn}`,height:`${ta}`,viewBox:`0 0 ${qn} ${ta}`,fill:"none"}),n=he(e("g"),{clipPath:"url(#clip0_57_156)"}),r=he(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),s=he(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(s,r);const i=e("defs"),o=he(e("clipPath"),{id:"clip0_57_156"}),a=he(e("rect"),{width:`${qn}`,height:`${qn}`,fill:"white",transform:"translate(0 0.5)"});return o.appendChild(a),i.appendChild(o),t.appendChild(i).appendChild(o).appendChild(a),{get el(){return t}}}function vb({message:e,onRemove:t}){function n(){r&&(r.remove(),t&&t())}const r=K("div",{className:"success-message",onClick:n},Eb().el,e);return{el:r,remove:n}}function na({shadow:e,options:{shouldCreateActor:t=!0,...n},attachTo:r}){let s,i,o=!1;function a(){if(e)try{const g=vb({message:n.successMessageText,onRemove:()=>{S&&clearTimeout(S),l()}});if(!g.el)throw new Error("Unable to show success message");e.appendChild(g.el);const S=setTimeout(()=>{g&&g.remove()},5e3)}catch(g){m.error(g)}}async function c(g){if(!i)return;const S=[];if(n.isNameRequired&&!g.name&&S.push(n.nameLabel),n.isEmailRequired&&!g.email&&S.push(n.emailLabel),g.message||S.push(n.messageLabel),S.length>0){i.showError(`Please enter in the following required fields: ${S.join(", ")}`);return}if(!await db(i,g)){n.onSubmitError&&n.onSubmitError();return}_(),a(),n.onSubmitSuccess&&n.onSubmitSuccess()}function u(){const g=A(),S=g&&g.getIntegrationByName&&g.getIntegrationByName("Replay");S&&S.flush().catch(E=>{Je&&m.error(E)})}function l(){s&&s.show()}function d(){s&&s.hide()}function f(){s&&s.el&&s.el.remove()}function p(){try{if(i){i.open(),o=!0,n.onFormOpen&&n.onFormOpen(),u();return}const g=n.useSentryUser,S=ce(),E=S&&S.getUser();if(i=Sb({colorScheme:n.colorScheme,showBranding:n.showBranding,showName:n.showName||n.isNameRequired,showEmail:n.showEmail||n.isEmailRequired,isNameRequired:n.isNameRequired,isEmailRequired:n.isEmailRequired,formTitle:n.formTitle,cancelButtonLabel:n.cancelButtonLabel,submitButtonLabel:n.submitButtonLabel,emailLabel:n.emailLabel,emailPlaceholder:n.emailPlaceholder,messageLabel:n.messageLabel,messagePlaceholder:n.messagePlaceholder,nameLabel:n.nameLabel,namePlaceholder:n.namePlaceholder,isRequiredLabel:n.isRequiredLabel,defaultName:g&&E&&E[g.name]||"",defaultEmail:g&&E&&E[g.email]||"",onClosed:()=>{l(),o=!1,n.onFormClose&&n.onFormClose()},onCancel:()=>{h(),l()},onSubmit:c}),!i.el)throw new Error("Unable to open Feedback dialog");e.appendChild(i.el),d(),n.onFormOpen&&n.onFormOpen(),u()}catch(g){m.error(g)}}function h(){i&&(i.close(),o=!1,n.onFormClose&&n.onFormClose())}function _(){if(i){h();const g=i.el;g&&g.remove(),i=void 0}}function b(){o||p(),d()}return r?r.addEventListener("click",b):t&&(s=hb({buttonLabel:n.buttonLabel,onClick:b}),s.el&&e.appendChild(s.el)),{get actor(){return s},get dialog(){return i},showActor:l,hideActor:d,removeActor:f,openDialog:p,closeDialog:h,removeDialog:_}}const Gn=mt.document,Sv=(e=>new $r(e));class $r{static __initStatic(){this.id="Feedback"}constructor({autoInject:t=!0,id:n="sentry-feedback",isEmailRequired:r=!1,isNameRequired:s=!1,showBranding:i=!0,showEmail:o=!0,showName:a=!0,useSentryUser:c={email:"email",name:"username"},themeDark:u,themeLight:l,colorScheme:d="system",buttonLabel:f=GS,cancelButtonLabel:p=YS,submitButtonLabel:h=VS,formTitle:_=KS,emailPlaceholder:b=XS,emailLabel:g=JS,messagePlaceholder:S=ZS,messageLabel:E=QS,namePlaceholder:T=eb,nameLabel:y=tb,isRequiredLabel:v=nb,successMessageText:x=rb,onFormClose:M,onFormOpen:w,onSubmitError:C,onSubmitSuccess:D}={}){this.name=$r.id,this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1,this.options={autoInject:t,showBranding:i,id:n,isEmailRequired:r,isNameRequired:s,showEmail:o,showName:a,useSentryUser:c,colorScheme:d,themeDark:{...Zo.dark,...u},themeLight:{...Zo.light,...l},buttonLabel:f,cancelButtonLabel:p,submitButtonLabel:h,formTitle:_,emailLabel:g,emailPlaceholder:b,messageLabel:E,messagePlaceholder:S,nameLabel:y,namePlaceholder:T,isRequiredLabel:v,successMessageText:x,onFormClose:M,onFormOpen:w,onSubmitError:C,onSubmitSuccess:D}}setupOnce(){if(hs())try{this._cleanupWidgetIfExists();const{autoInject:t}=this.options;if(!t)return;this._createWidget(this.options)}catch(t){Je&&m.error(t)}}openDialog(){this._widget||this._createWidget({...this.options,shouldCreateActor:!1}),this._widget&&this._widget.openDialog()}closeDialog(){this._widget&&this._widget.closeDialog()}attachTo(t,n){try{const r=Qo(this.options,n||{});return this._ensureShadowHost(r,({shadow:s})=>{const i=typeof t=="string"?Gn.querySelector(t):typeof t.addEventListener=="function"?t:null;if(!i)return Je&&m.error("[Feedback] Unable to attach to target element"),null;const o=na({shadow:s,options:r,attachTo:i});return this._widgets.add(o),this._widget||(this._widget=o),o})}catch(r){return Je&&m.error(r),null}}createWidget(t){try{return this._createWidget(Qo(this.options,t||{}))}catch(n){return Je&&m.error(n),null}}removeWidget(t){if(!t)return!1;try{if(this._widgets.has(t))return t.removeActor(),t.removeDialog(),this._widgets.delete(t),this._widget===t&&(this._widget=null),!0}catch(n){Je&&m.error(n)}return!1}getWidget(){return this._widget}remove(){this._host&&this._host.remove(),this._initialize()}_initialize(){this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1}_cleanupWidgetIfExists(){this._host&&this.remove();const t=Gn.querySelector(`#${this.options.id}`);t&&t.remove()}_createWidget(t){return this._ensureShadowHost(t,({shadow:n})=>{const r=na({shadow:n,options:t});return!this._hasInsertedActorStyles&&r.actor&&(n.appendChild(ab(Gn)),this._hasInsertedActorStyles=!0),this._widgets.add(r),this._widget||(this._widget=r),r})}_ensureShadowHost(t,n){let r=!1;if(!this._shadow||!this._host){const{id:i,colorScheme:o,themeLight:a,themeDark:c}=t,{shadow:u,host:l}=lb({id:i,colorScheme:o,themeLight:a,themeDark:c});this._shadow=u,this._host=l,r=!0}this._host.dataset.sentryFeedbackColorscheme=t.colorScheme;const s=n({shadow:this._shadow,host:this._host});return r&&Gn.body.appendChild(this._host),s}}$r.__initStatic();const Zu="CaptureConsole",Tb=((e={})=>{const t=e.levels||pa;return{name:Zu,setupOnce(){},setup(n){"console"in W&&Ca(({args:r,level:s})=>{A()!==n||!t.includes(s)||wb(r,s)})}}}),Ib=Tb;Q(Zu,Ib);function wb(e,t){const n={level:Da(t),extra:{arguments:e}};dt(r=>{if(r.addEventProcessor(o=>(o.logger="console",Ft(o,{handled:!1,type:"console"}),o)),t==="assert"&&e[0]===!1){const o=`Assertion failed: ${er(e.slice(1)," ")||"console.assert"}`;r.setExtra("arguments",e.slice(1)),cs(o,n);return}const s=e.find(o=>o instanceof Error);if(t==="error"&&s){bn(s,n);return}const i=er(e," ");cs(i,n)})}const Qu="Debug",kb=((e={})=>{const t={debugger:!1,stringify:!1,...e};return{name:Qu,setupOnce(){},setup(n){n.on&&n.on("beforeSendEvent",(r,s)=>{if(t.debugger)debugger;Lt(()=>{t.stringify?(console.log(JSON.stringify(r,null,2)),s&&Object.keys(s).length&&console.log(JSON.stringify(s,null,2))):(console.log(r),s&&Object.keys(s).length&&console.log(s))})})}}}),Rb=kb;Q(Qu,Rb);const qt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,el="Dedupe",Cb=(()=>{let e;return{name:el,setupOnce(){},processEvent(t){if(t.type)return t;try{if(Ab(t,e))return qt&&m.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),xb=Cb;Q(el,xb);function Ab(e,t){return t?!!(Mb(e,t)||Ob(e,t)):!1}function Mb(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!nl(e,t)||!tl(e,t))}function Ob(e,t){const n=ra(t),r=ra(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!nl(e,t)||!tl(e,t))}function tl(e,t){let n=sa(e),r=sa(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function nl(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function ra(e){return e.exception&&e.exception.values&&e.exception.values[0]}function sa(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}const rl="ExtraErrorData",Nb=((e={})=>{const t=e.depth||3,n=e.captureErrorCause||!1;return{name:rl,setupOnce(){},processEvent(r,s){return Lb(r,s,t,n)}}}),Db=Nb;Q(rl,Db);function Lb(e,t={},n,r){if(!t.originalException||!Ot(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,i=Pb(t.originalException,r);if(i){const o={...e.contexts},a=_r(i,n);return Qn(a)&&(ot(a,"__sentry_skip_normalization__",!0),o[s]=a),{...e,contexts:o}}return e}function Pb(e,t){try{const n=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],r={};for(const s of Object.keys(e)){if(n.indexOf(s)!==-1)continue;const i=e[s];r[s]=Ot(i)?i.toString():i}if(t&&e.cause!==void 0&&(r.cause=Ot(e.cause)?e.cause.toString():e.cause),typeof e.toJSON=="function"){const s=e.toJSON();for(const i of Object.keys(s)){const o=s[i];r[i]=Ot(o)?o.toString():o}}return r}catch(n){qt&&m.error("Unable to extract extra data from the Error object:",n)}return null}const $b=W,sl="ReportingObserver",ia=new WeakMap,Fb=((e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(ia.has(A()))for(const s of r)dt(i=>{i.setExtra("url",s.url);const o=`ReportingObserver [${s.type}]`;let a="No details available";if(s.body){const c={};for(const u in s.body)c[u]=s.body[u];if(i.setExtra("body",c),s.type==="crash"){const u=s.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=s.body.message||a}cs(`${o}: ${a}`)})}return{name:sl,setupOnce(){if(!gd())return;new $b.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){ia.set(r,!0)}}}),Bb=Fb;Q(sl,Bb);const il="RewriteFrames",Hb=((e={})=>{const t=e.root,n=e.prefix||"app:///",r=e.iteratee||(o=>{if(!o.filename)return o;const a=/^[a-zA-Z]:\\/.test(o.filename)||o.filename.includes("\\")&&!o.filename.includes("/"),c=/^\//.test(o.filename);if(a||c){const u=a?o.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):o.filename,l=t?Nd(t,u):Dd(u);o.filename=`${n}${l}`}return o});function s(o){try{return{...o,exception:{...o.exception,values:o.exception.values.map(a=>({...a,...a.stacktrace&&{stacktrace:i(a.stacktrace)}}))}}}catch{return o}}function i(o){return{...o,frames:o&&o.frames&&o.frames.map(a=>r(a))}}return{name:il,setupOnce(){},processEvent(o){let a=o;return o.exception&&Array.isArray(o.exception.values)&&(a=s(a)),a}}}),Ub=Hb;Q(il,Ub);const ol="SessionTiming",Wb=(()=>{const e=Date.now();return{name:ol,setupOnce(){},processEvent(t){const n=Date.now();return{...t,extra:{...t.extra,"session:start":e,"session:duration":n-e,"session:end":n}}}}}),zb=Wb;Q(ol,zb);const al="HttpClient",jb=((e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:al,setupOnce(){},setup(n){Qb(n,t),eE(n,t)}}}),qb=jb;Q(al,qb);function Gb(e,t,n,r){if(ul(e,n.status,n.url)){const s=tE(t,r);let i,o,a,c;dl()&&([{headers:i,cookies:a},{headers:o,cookies:c}]=[{cookieHeader:"Cookie",obj:s},{cookieHeader:"Set-Cookie",obj:n}].map(({cookieHeader:l,obj:d})=>{const f=Kb(d.headers);let p;try{const h=f[l]||f[l.toLowerCase()]||void 0;h&&(p=cl(h))}catch{qt&&m.log(`Could not extract cookies from header ${l}`)}return{headers:f,cookies:p}}));const u=ll({url:s.url,method:s.method,status:n.status,requestHeaders:i,responseHeaders:o,requestCookies:a,responseCookies:c});br(u)}}function Yb(e,t,n,r){if(ul(e,t.status,t.responseURL)){let s,i,o;if(dl()){try{const c=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;c&&(i=cl(c))}catch{qt&&m.log("Could not extract cookies from response headers")}try{o=Xb(t)}catch{qt&&m.log("Could not extract headers from response")}s=r}const a=ll({url:t.responseURL,method:n,status:t.status,requestHeaders:s,responseHeaders:o,responseCookies:i});br(a)}}function Vb(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function cl(e){return e.split("; ").reduce((t,n)=>{const[r,s]=n.split("=");return t[r]=s,t},{})}function Kb(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function Xb(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
364
|
-
`).reduce((n,r)=>{const[s,i]=r.split(": ");return n[s]=i,n},{}):{}}function Jb(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function Zb(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function Qb(e,t){Ma()&&vr(n=>{if(A()!==e)return;const{response:r,args:s}=n,[i,o]=s;r&&Gb(t,i,r,o)})}function eE(e,t){"XMLHttpRequest"in W&&Tr(n=>{if(A()!==e)return;const r=n.xhr,s=r[Oe];if(!s)return;const{method:i,request_headers:o}=s;try{Yb(t,r,i,o)}catch(a){qt&&m.warn("Error while extracting response event form XHR response",a)}})}function ul(e,t,n){return Zb(e.failedRequestStatusCodes,t)&&Jb(e.failedRequestTargets,n)&&!ac(n,A())}function ll(e){const t=`HTTP Client Error with status code: ${e.status}`,n={message:t,exception:{values:[{type:"Error",value:t}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:Vb(e.responseHeaders)}}};return Ft(n,{type:"http.client",handled:!1}),n}function tE(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function dl(){const e=A();return e?!!e.getOptions().sendDefaultPii:!1}const ss=W,nE=7,fl="ContextLines",rE=((e={})=>{const t=e.frameContextLines!=null?e.frameContextLines:nE;return{name:fl,setupOnce(){},processEvent(n){return iE(n,t)}}}),sE=rE;Q(fl,sE);function iE(e,t){const n=ss.document,r=ss.location&&Pd(ss.location.href);if(!n||!r)return e;const s=e.exception&&e.exception.values;if(!s||!s.length)return e;const i=n.documentElement.innerHTML;if(!i)return e;const o=["<!DOCTYPE html>","<html>",...i.split(`
|
|
365
|
-
`),"</html>"];return s.forEach(a=>{const c=a.stacktrace;c&&c.frames&&(c.frames=c.frames.map(u=>oE(u,o,r,t)))}),e}function oE(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||Ql(t,e,r),e}function Sn(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function aE(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Sn(n);return s=>r.then(i=>s(i.transaction(t,"readwrite").objectStore(t)))}function pl(e){return Sn(e.getAllKeys())}function cE(e,t,n){return e(r=>pl(r).then(s=>{if(!(s.length>=n))return r.put(t,Math.max(...s,0)+1),Sn(r.transaction)}))}function uE(e){return e(t=>pl(t).then(n=>{if(n.length!==0)return Sn(t.get(n[0])).then(r=>(t.delete(n[0]),Sn(t.transaction).then(()=>r)))}))}function lE(e){let t;function n(){return t==null&&(t=aE(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{insert:async r=>{try{const s=await La(r,e.textEncoder);await cE(n(),s,e.maxQueueSize||30)}catch{}},pop:async()=>{try{const r=await uE(n());if(r)return Ud(r,e.textEncoder||new TextEncoder,e.textDecoder||new TextDecoder)}catch{}}}}function dE(e){return t=>e({...t,createStore:lE})}function bv(e){return dE(Yf(e))}const oa=1e6,Jn=String(0),fE="main";let hl="",ml="",gl="",Ms=I.navigator&&I.navigator.userAgent||"",_l="";const pE=I.navigator&&I.navigator.language||I.navigator&&I.navigator.languages&&I.navigator.languages[0]||"";function hE(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const aa=I.navigator&&I.navigator.userAgentData;hE(aa)&&aa.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(hl=e.platform||"",gl=e.architecture||"",_l=e.model||"",ml=e.platformVersion||"",e.fullVersionList&&e.fullVersionList.length>0){const t=e.fullVersionList[e.fullVersionList.length-1];Ms=`${t.brand} ${t.version}`}}).catch(e=>{});function mE(e){return!("thread_metadata"in e)}function gE(e){return mE(e)?SE(e):e}function _E(e){const t=e&&e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id;return typeof t=="string"&&t.length!==32&&$&&m.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function yE(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const s=_E(r),i=gE(n),o=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:Date.now()),a=typeof r.timestamp=="number"?r.timestamp*1e3:Date.now();return{event_id:e,timestamp:new Date(o).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||ed,runtime:{name:"javascript",version:I.navigator.userAgent},os:{name:hl,version:ml,build_number:Ms},device:{locale:pE,model:_l,manufacturer:Ms,architecture:gl,is_emulator:!1},debug_meta:{images:vE(n.resources)},profile:i,transactions:[{name:r.transaction||"",id:r.event_id||Pt(),trace_id:s,active_thread_id:Jn,relative_start_ns:"0",relative_end_ns:((a-o)*1e6).toFixed(0)}]}}function yl(e){return e.op==="pageload"}function SE(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Jn]:{name:fE}}};if(!e.samples.length)return r;const s=e.samples[0].timestamp,i=typeof performance.timeOrigin=="number"?performance.timeOrigin:ae||0,o=i-(ae||i);for(let a=0;a<e.samples.length;a++){const c=e.samples[a];if(c.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[a]={elapsed_since_start_ns:((c.timestamp+o-s)*oa).toFixed(0),stack_id:t,thread_id:Jn};continue}let u=e.stacks[c.stackId];const l=[];for(;u;){l.push(u.frameId);const f=e.frames[u.frameId];r.frames[u.frameId]===void 0&&(r.frames[u.frameId]={function:f.name,abs_path:typeof f.resourceId=="number"?e.resources[f.resourceId]:void 0,lineno:f.line,colno:f.column}),u=u.parentId===void 0?void 0:e.stacks[u.parentId]}const d={elapsed_since_start_ns:((c.timestamp+o-s)*oa).toFixed(0),stack_id:n,thread_id:Jn};r.stacks[n]=l,r.samples[a]=d,n++}return r}function bE(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function EE(e){const t=[];return Bt(e,(n,r)=>{if(r==="transaction")for(let s=1;s<n.length;s++){const i=n[s];i&&i.contexts&&i.contexts.profile&&i.contexts.profile.profile_id&&t.push(n[s])}}),t}const ca=new WeakMap;function vE(e){const t=W._sentryDebugIds;if(!t)return[];const n=A(),r=n&&n.getOptions(),s=r&&r.stackParser;if(!s)return[];let i;const o=ca.get(s);o?i=o:(i=new Map,ca.set(s,i));const a=Object.keys(t).reduce((u,l)=>{let d;const f=i.get(l);f?d=f:(d=s(l),i.set(l,d));for(let p=d.length-1;p>=0;p--){const h=d[p],_=h&&h.filename;if(h&&_){u[_]=t[l];break}}return u},{}),c=[];for(const u of e)u&&a[u]&&c.push({type:"sourcemap",code_file:u,debug_id:a[u]});return c}function TE(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?($&&m.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?($&&m.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function IE(e){return e.samples.length<2?($&&m.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:($&&m.log("[Profiling] Discarding profile because it contains no frames"),!1)}let Sl=!1;const bl=3e4;function wE(e){return typeof e=="function"}function kE(){const e=I.Profiler;if(!wE(e)){$&&m.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(bl/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{$&&(m.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),m.log("[Profiling] Disabling profiling for current user session.")),Sl=!0}}function Os(e){if(Sl)return $&&m.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return $&&m.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const t=A(),n=t&&t.getOptions();if(!n)return $&&m.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return TE(r)?r?(r===!0?!0:Math.random()<r)?!0:($&&m.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):($&&m.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):($&&m.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function RE(e,t,n,r){return IE(n)?yE(e,t,n,r):null}const et=new Map;function CE(){return et.size}function xE(e){const t=et.get(e);return t&&et.delete(e),t}function AE(e,t){if(et.set(e,t),et.size>30){const n=et.keys().next().value;et.delete(n)}}function Ev(e){return e?Os(e)?Ns(e):e:($&&m.log("[Profiling] Transaction is undefined, skipping profiling"),e)}function Ns(e){let t;yl(e)&&(t=at()*1e3);const n=kE();if(!n)return e;$&&m.log(`[Profiling] started profiling transaction: ${q(e).description}`);const r=Pt();async function s(){return!e||!n?null:n.stop().then(c=>(i&&(I.clearTimeout(i),i=void 0),$&&m.log(`[Profiling] stopped profiling of transaction: ${q(e).description}`),c?(AE(r,c),null):($&&m.log(`[Profiling] profiler returned null profile for: ${q(e).description}`,"this may indicate an overlapping transaction or a call to stopProfiling with a profile title that was never started"),null))).catch(c=>($&&m.log("[Profiling] error while stopping profiler:",c),null))}let i=I.setTimeout(()=>{$&&m.log("[Profiling] max profile duration elapsed, stopping profiling for:",q(e).description),s()},bl);const o=e.end.bind(e);function a(){return e?(s().then(()=>{e.setContext("profile",{profile_id:r,start_timestamp:t}),o()},()=>{o()}),e):o()}return e.end=a,e}const El="BrowserProfiling",ME=(()=>({name:El,setupOnce(){},setup(e){const n=ce().getTransaction();if(n&&yl(n)&&Os(n)&&Ns(n),typeof e.on!="function"){m.warn("[Profiling] Client does not support hooks, profiling will be disabled");return}e.on("startTransaction",r=>{Os(r)&&Ns(r)}),e.on("beforeEnvelope",r=>{if(!CE())return;const s=EE(r);if(!s.length)return;const i=[];for(const o of s){const a=o&&o.contexts,c=a&&a.profile&&a.profile.profile_id,u=a&&a.profile&&a.profile.start_timestamp;if(typeof c!="string"){$&&m.log("[Profiling] cannot find profile for a transaction without a profile context");continue}if(!c){$&&m.log("[Profiling] cannot find profile for a transaction without a profile context");continue}a&&a.profile&&delete a.profile;const l=xE(c);if(!l){$&&m.log(`[Profiling] Could not retrieve profile for transaction: ${c}`);continue}const d=RE(c,u,l,o);d&&i.push(d)}bE(r,i)})}})),OE=ME,vv=Q(El,OE);let vl={};I.Sentry&&I.Sentry.Integrations&&(vl=I.Sentry.Integrations);const Tv={...vl,...Lp,...cg};function Iv(e){const t={...e};cc(t,"react"),og(t)}const Tl="ui.react.render",NE="ui.react.update",Il="ui.react.mount",ua="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/profiler.tsx",DE="unknown";class wl extends ge.Component{static __initStatic(){this.defaultProps={disabled:!1,includeRender:!0,includeUpdates:!0}}constructor(t){super(t);const{name:n,disabled:r=!1}=this.props;r||(this._mountSpan=nt({name:`<${n}>`,onlyIfParent:!0,op:Il,origin:"auto.ui.react.profiler",attributes:{"ui.component_name":n}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:t,includeUpdates:n=!0}){if(n&&this._mountSpan&&t!==this.props.updateProps){const r=Object.keys(t).filter(s=>t[s]!==this.props.updateProps[s]);if(r.length>0){const s=at();this._updateSpan=Mi(this._mountSpan,()=>nt({name:`<${this.props.name}>`,onlyIfParent:!0,op:NE,origin:"auto.ui.react.profiler",startTimestamp:s,attributes:{"ui.component_name":this.props.name,"ui.react.changed_props":r}}))}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.end(),this._updateSpan=void 0)}componentWillUnmount(){const t=at(),{name:n,includeRender:r=!0}=this.props;if(this._mountSpan&&r){const s=q(this._mountSpan).timestamp;Mi(this._mountSpan,()=>{const i=nt({onlyIfParent:!0,name:`<${n}>`,op:Tl,origin:"auto.ui.react.profiler",startTimestamp:s,attributes:{"ui.component_name":n}});i&&i.end(t)})}}render(){return this.props.children}}wl.__initStatic();function wv(e,t){const n=t&&t.name||e.displayName||e.name||DE,r=s=>ge.createElement(wl,{...t,name:n,updateProps:s,__self:this,__source:{fileName:ua,lineNumber:159}},ge.createElement(e,{...s,__self:this,__source:{fileName:ua,lineNumber:160}}));return r.displayName=`profiler(${n})`,Er(r,e),r}function kv(e,t={disabled:!1,hasRenderSpan:!0}){const[n]=ge.useState(()=>{if(!(t&&t.disabled))return nt({name:`<${e}>`,onlyIfParent:!0,op:Il,origin:"auto.ui.react.profiler",attributes:{"ui.component_name":e}})});ge.useEffect(()=>(n&&n.end(),()=>{if(n&&t.hasRenderSpan){const r=q(n).timestamp,s=at(),i=nt({name:`<${e}>`,onlyIfParent:!0,op:Tl,origin:"auto.ui.react.profiler",startTimestamp:r,attributes:{"ui.component_name":e}});i&&i.end(s)}}),[])}const mi=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,la="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/errorboundary.tsx";function LE(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}const PE="unknown",da={componentStack:null,error:null,eventId:null};function $E(e,t){const n=new WeakMap;function r(s,i){if(!n.has(s)){if(s.cause)return n.set(s,!0),r(s.cause,i);s.cause=i}}r(e,t)}class gi extends ge.Component{constructor(t){super(t),gi.prototype.__init.call(this),this.state=da,this._openFallbackReportDialog=!0;const n=A();n&&n.on&&t.showDialog&&(this._openFallbackReportDialog=!1,n.on("afterSendEvent",r=>{!r.type&&r.event_id===this._lastEventId&&_o({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:n}){const{beforeCapture:r,onError:s,showDialog:i,dialogOptions:o}=this.props;dt(a=>{if(LE(ge.version)&&Ot(t)){const u=new Error(t.message);u.name=`React ErrorBoundary ${t.name}`,u.stack=n,$E(t,u)}r&&r(a,t,n);const c=bn(t,{captureContext:{contexts:{react:{componentStack:n}}},mechanism:{handled:!!this.props.fallback}});s&&s(t,n,c),i&&(this._lastEventId=c,this._openFallbackReportDialog&&_o({...o,eventId:c})),this.setState({error:t,componentStack:n,eventId:c})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:r}=this.state,{onUnmount:s}=this.props;s&&s(t,n,r)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:n,componentStack:r,eventId:s}=this.state;t&&t(n,r,s),this.setState(da)}}render(){const{fallback:t,children:n}=this.props,r=this.state;if(r.error){let s;return typeof t=="function"?s=t({error:r.error,componentStack:r.componentStack,resetError:this.resetErrorBoundary,eventId:r.eventId}):s=t,ge.isValidElement(s)?s:(t&&mi&&m.warn("fallback did not produce a valid ReactElement"),null)}return typeof n=="function"?n():n}}function Rv(e,t){const n=e.displayName||e.name||PE,r=s=>ge.createElement(gi,{...t,__self:this,__source:{fileName:la,lineNumber:240}},ge.createElement(e,{...s,__self:this,__source:{fileName:la,lineNumber:241}}));return r.displayName=`errorBoundary(${n})`,Er(r,e),r}const FE="redux.action",BE="info",HE={attachReduxState:!0,actionTransformer:e=>e,stateTransformer:e=>e||null};function Cv(e){const t={...HE,...e};return n=>(r,s)=>(t.attachReduxState&&td().addEventProcessor((o,a)=>{try{o.type===void 0&&o.contexts.state.state.type==="redux"&&(a.attachments=[...a.attachments||[],{filename:"redux_state.json",data:JSON.stringify(o.contexts.state.state.value)}])}catch{}return o}),n((o,a)=>{const c=r(o,a),u=ce(),l=t.actionTransformer(a);typeof l<"u"&&l!==null&&u.addBreadcrumb({category:FE,data:l,type:BE});const d=t.stateTransformer(c);if(typeof d<"u"&&d!==null){const p=A(),h=p&&p.getOptions(),_=h&&h.normalizeDepth||3,b={state:{type:"redux",value:d}};ot(b,"__sentry_override_normalization_depth__",3+_),u.setContext("state",b)}else u.setContext("state",null);const{configureScopeWithState:f}=t;return typeof f=="function"&&f(u,c),c},s))}function xv(e){const t=xr({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,match:s,instrumentPageLoad:i=!0,instrumentNavigation:o=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a);const c=d=>{kn(a,d)},u=d=>{Rn(a,d)},l=UE(n,r,s);l(c,i,!1),l(u,!1,o)}}}function UE(e,t,n){return(r,s=!0,i=!0)=>{let o,a;s&&I&&I.location&&fa(t,I.location,n,(c,u="url")=>{a=c,o=r({name:a,attributes:{[ve]:"pageload",[me]:"auto.pageload.react.reactrouter_v3",[te]:u}})}),i&&e.listen&&e.listen(c=>{(c.action==="PUSH"||c.action==="POP")&&(o&&o.end(),fa(t,c,n,(u,l="url")=>{a=u;const d={[ve]:"navigation",[me]:"auto.navigation.react.reactrouter_v3",[te]:l};o=r({name:a,attributes:d})}))})}}function fa(e,t,n,r){let s=t.pathname;n({location:t,routes:e},(i,o,a)=>{if(i||!a)return r(s);const c=WE(a.routes||[]);return c.length===0||c==="/*"?r(s):(s=c,r(s,"route"))})}function WE(e){if(!Array.isArray(e)||e.length===0)return"";const t=e.filter(r=>!!r.path);let n=-1;for(let r=t.length-1;r>=0;r--){const s=t[r];if(s.path&&s.path.startsWith("/")){n=r;break}}return t.slice(n).filter(({path:r})=>!!r).map(({path:r})=>r).join("")}const zE="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/reactrouter.tsx";let At;function Av(e){const t=xr({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:s,instrumentPageLoad:i=!0,instrumentNavigation:o=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a);const c=d=>{kn(a,d)},u=d=>{Rn(a,d)},l=jE(n,r,s);l(c,i,!1),l(u,!1,o)}}}function Mv(e){const t=xr({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:s}=e;return{...t,afterAllSetup(i){t.afterAllSetup(i);const o=u=>{kn(i,u)},a=u=>{Rn(i,u)},c=qE(n,r,s);c(o,e.instrumentPageLoad,!1),c(a,!1,e.instrumentNavigation)}}}function jE(e,t,n){return kl(e,"reactrouter_v4",t,n)}function qE(e,t,n){return kl(e,"reactrouter_v5",t,n)}function kl(e,t,n=[],r){function s(){if(e&&e.location)return e.location.pathname;if(I&&I.location)return I.location.pathname}function i(o){if(n.length===0||!r)return[o,"url"];const a=Rl(n,o,r);for(let c=0;c<a.length;c++)if(a[c].match.isExact)return[a[c].match.path,"route"];return[o,"url"]}return(o,a=!0,c=!0)=>{const u=s();if(a&&u){const[l,d]=i(u);At=o({name:l,attributes:{[ve]:"pageload",[me]:`auto.pageload.react.${t}`,[te]:d}})}c&&e.listen&&e.listen((l,d)=>{if(d&&(d==="PUSH"||d==="POP")){At&&At.end();const[f,p]=i(l.pathname);At=o({name:f,attributes:{[ve]:"navigation",[me]:`auto.navigation.react.${t}`,[te]:p}})}})}}function Rl(e,t,n,r=[]){return e.some(s=>{const i=s.path?n(t,s):r.length?r[r.length-1].match:GE(t);return i&&(r.push({route:s,match:i}),s.routes&&Rl(s.routes,t,n,r)),!!i}),r}function GE(e){return{path:"/",url:"/",params:{},isExact:e==="/"}}function Ov(e){const t=e.displayName||e.name,n=r=>{if(r&&r.computedMatch&&r.computedMatch.isExact){const s=r.computedMatch.path,i=YE();i&&(i.updateName(s),i.setAttribute(te,"route"))}return ge.createElement(e,{...r,__self:this,__source:{fileName:zE,lineNumber:279}})};return n.displayName=`sentryRoute(${t})`,Er(n,e),n}function YE(){if(At)return At;const e=Xt(),t=e?Zn(e):void 0;if(!t)return;const n=q(t).op;return n==="navigation"||n==="pageload"?t:void 0}const Cl="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/reactrouterv6.tsx";let Dt,rt,st,it,fn,lt,Gt,Fr,Ze=!1;function Nv(e){const t=xr({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:n,useLocation:r,useNavigationType:s,createRoutesFromChildren:i,matchRoutes:o,stripBasename:a,instrumentPageLoad:c=!0,instrumentNavigation:u=!0}=e;return{...t,afterAllSetup(l){t.afterAllSetup(l);const d=p=>{Rn(l,p)},f=I&&I.location&&I.location.pathname;c&&f&&kn(l,{name:f,attributes:{[te]:"url",[ve]:"pageload",[me]:"auto.pageload.react.reactrouter_v6"}}),rt=n,st=r,it=s,lt=o,fn=i,Ze=a||!1,Gt=d,Fr=u}}}function Dv(e,t,n,r,s,i){return(o,a=!0,c=!0)=>{const u=I&&I.location&&I.location.pathname;a&&u&&(Dt=o({name:u,attributes:{[te]:"url",[ve]:"pageload",[me]:"auto.pageload.react.reactrouter_v6"}})),rt=e,st=t,it=n,lt=s,fn=r,Ze=i||!1,Gt=o,Fr=c}}function is(e,t){if(!t||t==="/"||!e.toLowerCase().startsWith(t.toLowerCase()))return e;const n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?e:e.slice(n)||"/"}function xl(e,t,n,r=""){if(!e||e.length===0)return[Ze?is(t.pathname,r):t.pathname,"url"];let s="";if(n)for(let i=0;i<n.length;i++){const o=n[i],a=o.route;if(a){if(a.index)return[Ze?is(o.pathname,r):o.pathname,"route"];const c=a.path;if(c){const u=c[0]==="/"||s[s.length-1]==="/"?c:`/${c}`;if(s+=u,r+o.pathname===t.pathname)return zi(s)!==zi(o.pathname)&&s.slice(-2)!=="/*"?[(Ze?"":r)+u,"route"]:[(Ze?"":r)+s,"route"]}}}return[Ze?is(t.pathname,r):t.pathname,"url"]}function _i(e,t,n,r,s){const i=Array.isArray(r)?r:lt(n,t,s);if(e&&i){const[o,a]=xl(n,t,i,s);e.updateName(o),e.setAttribute(te,a)}}function yi(e,t,n,r,s){const i=Array.isArray(r)?r:lt(t,e,s);if(Fr&&(n==="PUSH"||n==="POP")&&i){Dt&&Dt.end();const[o,a]=xl(t,e,i,s);Dt=Gt({name:o,attributes:{[te]:a,[ve]:"navigation",[me]:"auto.navigation.react.reactrouter_v6"}})}}function Lv(e){if(!rt||!st||!it||!fn||!lt||!Gt)return mi&&m.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.
|
|
366
|
-
useEffect: ${rt}. useLocation: ${st}. useNavigationType: ${it}.
|
|
367
|
-
createRoutesFromChildren: ${fn}. matchRoutes: ${lt}. customStartTransaction: ${Gt}.`),e;let t=!0;const n=r=>{const s=st(),i=it();return rt(()=>{const o=fn(r.children);t?(_i(Si(),s,o),t=!1):yi(s,o,i)},[s,i]),ge.createElement(e,{...r,__self:this,__source:{fileName:Cl,lineNumber:329}})};return Er(n,e),n}function Pv(e){if(!rt||!st||!it||!lt||!Gt)return mi&&m.warn("reactRouterV6Instrumentation was unable to wrap `useRoutes` because of one or more missing parameters."),e;let t=!0;const n=r=>{const{routes:s,locationArg:i}=r,o=e(s,i),a=st(),c=it(),u=typeof i=="string"||i&&i.pathname?i:a;return rt(()=>{const l=typeof u=="string"?{pathname:u}:u;t?(_i(Si(),l,s),t=!1):yi(l,s,c)},[c,u]),o};return(r,s)=>ge.createElement(n,{routes:r,locationArg:s,__self:this,__source:{fileName:Cl,lineNumber:386}})}function $v(e){return function(t,n){const r=e(t,n),s=n&&n.basename,i=Si();return r.state.historyAction==="POP"&&i&&_i(i,r.state.location,t,void 0,s),r.subscribe(o=>{const a=o.location;Fr&&(o.historyAction==="PUSH"||o.historyAction==="POP")&&yi(a,t,o.historyAction,void 0,s)}),r}}function Si(){if(Dt)return Dt;const e=Xt(),t=e?Zn(e):void 0;if(!t)return;const n=q(t).op;return n==="navigation"||n==="pageload"?t:void 0}export{km as Breadcrumbs,Jh as BrowserClient,vv as BrowserProfilingIntegration,uv as BrowserTracing,Lm as Dedupe,gi as ErrorBoundary,$r as Feedback,Ep as FunctionToString,Hm as GlobalHandlers,Ym as HttpContext,Hv as Hub,lp as InboundFilters,Tv as Integrations,Jm as LinkedErrors,av as ModuleMetadata,wl as Profiler,Lr as Replay,yv as ReplayCanvas,Ri as SDK_VERSION,ve as SEMANTIC_ATTRIBUTE_SENTRY_OP,me as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,It as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,te as SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,Uv as Scope,eg as TryCatch,I as WINDOW,qe as addBreadcrumb,Df as addEventProcessor,ql as addGlobalEventProcessor,sv as addIntegration,Ka as addTracingExtensions,Hc as breadcrumbsIntegration,eu as browserApiErrorsIntegration,OE as browserProfilingIntegration,xr as browserTracingIntegration,Ib as captureConsoleIntegration,br as captureEvent,bn as captureException,cs as captureMessage,Ai as captureSession,mv as captureUserFeedback,dm as chromeStackLineParser,Wv as close,zv as configureScope,sE as contextLinesIntegration,rv as continueTrace,Cv as createReduxEnhancer,ic as createTransport,Kh as createUserFeedbackEnvelope,Rb as debugIntegration,xb as dedupeIntegration,sg as defaultIntegrations,or as defaultRequestInstrumentationOptions,Tm as defaultStackLineParsers,Im as defaultStackParser,jv as endSession,qh as eventFromException,Gh as eventFromMessage,$c as exceptionFromError,Db as extraErrorDataIntegration,ZE as extractTraceparentData,Sv as feedbackIntegration,qv as flush,fv as forceLoad,hc as functionToStringIntegration,mm as geckoStackLineParser,Xt as getActiveSpan,Ne as getActiveTransaction,A as getClient,we as getCurrentHub,ce as getCurrentScope,ig as getDefaultIntegrations,Gv as getHubFromCarrier,_v as getReplay,Ha as getSpanStatusFromHttpCode,Gc as globalHandlersIntegration,qb as httpClientIntegration,Xc as httpContextIntegration,fc as inboundFiltersIntegration,Iv as init,Dc as instrumentOutgoingRequests,Yv as isInitialized,Vv as lastEventId,Zc as linkedErrorsIntegration,bv as makeBrowserOfflineTransport,em as makeFetchTransport,Kv as makeMain,iv as makeMultiplexedTransport,nm as makeXHRTransport,cv as metrics,op as moduleMetadataIntegration,pv as onLoad,Ev as onProfilingStartRouteTransaction,lv as opera10StackLineParser,dv as opera11StackLineParser,ov as parameterize,xv as reactRouterV3BrowserTracingIntegration,UE as reactRouterV3Instrumentation,Av as reactRouterV4BrowserTracingIntegration,jE as reactRouterV4Instrumentation,Mv as reactRouterV5BrowserTracingIntegration,qE as reactRouterV5Instrumentation,Nv as reactRouterV6BrowserTracingIntegration,Dv as reactRouterV6Instrumentation,qS as replayCanvasIntegration,gv as replayIntegration,Bb as reportingObserverIntegration,Ub as rewriteFramesIntegration,ob as sendFeedback,zb as sessionTimingIntegration,Zl as setContext,Wf as setCurrentClient,Xv as setExtra,Jv as setExtras,qs as setHttpStatus,cf as setMeasurement,Zv as setTag,Qv as setTags,eT as setUser,_o as showReportDialog,QE as spanStatusfromHttpCode,Rn as startBrowserTracingNavigationSpan,kn as startBrowserTracingPageLoadSpan,nt as startInactiveSpan,xi as startSession,tv as startSpan,nv as startSpanManual,tT as startTransaction,ev as trace,kv as useProfiler,ym as winjsStackLineParser,Mi as withActiveSpan,Rv as withErrorBoundary,nT as withIsolationScope,wv as withProfiler,dt as withScope,Lv as withSentryReactRouterV6Routing,Ov as withSentryRouting,hv as wrap,$v as wrapCreateBrowserRouter,Pv as wrapUseRoutes};
|
|
368
|
-
//# sourceMappingURL=index.Cy9Uih6l.js.map
|