@qualified-salesforce/web 0.0.1-oidc-bootstrap
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/41842993ec71d6628e4949e9a22b146b.svg +3 -0
- package/7271f3433ed82fc7f56adcd9e30275f4.svg +17 -0
- package/LICENSE.txt +82 -0
- package/components/helpers/entriesStringValidations.js +69 -0
- package/components/helpers/languages.js +32 -0
- package/components/shared/assertUnreachable.js +5 -0
- package/components/shared/controls/imageCropperHelpers.js +43 -0
- package/components/shared/meetingLoadingProgressSpec.js +116 -0
- package/constants.generated.js +9883 -0
- package/css/widget/multimodal_v2/host.split-css.css +162 -0
- package/css/widget/multimodal_v2/index.split-css.panda.css +5240 -0
- package/css/widget/widget.split-css.css +100 -0
- package/fonts/inter/Inter-Black.woff +0 -0
- package/fonts/inter/Inter-Black.woff2 +0 -0
- package/fonts/inter/Inter-BlackItalic.woff +0 -0
- package/fonts/inter/Inter-BlackItalic.woff2 +0 -0
- package/fonts/inter/Inter-Bold.woff +0 -0
- package/fonts/inter/Inter-Bold.woff2 +0 -0
- package/fonts/inter/Inter-BoldItalic.woff +0 -0
- package/fonts/inter/Inter-BoldItalic.woff2 +0 -0
- package/fonts/inter/Inter-ExtraBold.woff +0 -0
- package/fonts/inter/Inter-ExtraBold.woff2 +0 -0
- package/fonts/inter/Inter-ExtraBoldItalic.woff +0 -0
- package/fonts/inter/Inter-ExtraBoldItalic.woff2 +0 -0
- package/fonts/inter/Inter-ExtraLight.woff +0 -0
- package/fonts/inter/Inter-ExtraLight.woff2 +0 -0
- package/fonts/inter/Inter-ExtraLightItalic.woff +0 -0
- package/fonts/inter/Inter-ExtraLightItalic.woff2 +0 -0
- package/fonts/inter/Inter-Italic.woff +0 -0
- package/fonts/inter/Inter-Italic.woff2 +0 -0
- package/fonts/inter/Inter-Light.woff +0 -0
- package/fonts/inter/Inter-Light.woff2 +0 -0
- package/fonts/inter/Inter-LightItalic.woff +0 -0
- package/fonts/inter/Inter-LightItalic.woff2 +0 -0
- package/fonts/inter/Inter-Medium.woff +0 -0
- package/fonts/inter/Inter-Medium.woff2 +0 -0
- package/fonts/inter/Inter-MediumItalic.woff +0 -0
- package/fonts/inter/Inter-MediumItalic.woff2 +0 -0
- package/fonts/inter/Inter-Regular.woff +0 -0
- package/fonts/inter/Inter-Regular.woff2 +0 -0
- package/fonts/inter/Inter-SemiBold.woff +0 -0
- package/fonts/inter/Inter-SemiBold.woff2 +0 -0
- package/fonts/inter/Inter-SemiBoldItalic.woff +0 -0
- package/fonts/inter/Inter-SemiBoldItalic.woff2 +0 -0
- package/fonts/inter/Inter-Thin.woff +0 -0
- package/fonts/inter/Inter-Thin.woff2 +0 -0
- package/fonts/inter/Inter-ThinItalic.woff +0 -0
- package/fonts/inter/Inter-ThinItalic.woff2 +0 -0
- package/fonts/inter/Inter-italic.var.woff2 +0 -0
- package/fonts/inter/Inter-roman.var.woff2 +0 -0
- package/images/close.js +63 -0
- package/images/logo.js +22 -0
- package/js/4101.js +19721 -0
- package/js/daily-esm.js +9948 -0
- package/js/date-fns.js +427 -0
- package/js/multimodal_v2.js +1653 -0
- package/js/runtime.js +109 -0
- package/media/Inter-Black.796be8d8bf.woff2 +0 -0
- package/media/Inter-Black.b254104c56.woff +0 -0
- package/media/Inter-BlackItalic.70306b0eae.woff +0 -0
- package/media/Inter-BlackItalic.752f1e0aaa.woff2 +0 -0
- package/media/Inter-Bold.579e0f95ca.woff2 +0 -0
- package/media/Inter-Bold.b1234477a5.woff +0 -0
- package/media/Inter-BoldItalic.3d0d804323.woff +0 -0
- package/media/Inter-BoldItalic.828a494e04.woff2 +0 -0
- package/media/Inter-ExtraBold.208a9e6c99.woff +0 -0
- package/media/Inter-ExtraBold.d65f028165.woff2 +0 -0
- package/media/Inter-ExtraBoldItalic.30429962ec.woff +0 -0
- package/media/Inter-ExtraBoldItalic.8c7eac5ce3.woff2 +0 -0
- package/media/Inter-ExtraLight.15c082a57d.woff +0 -0
- package/media/Inter-ExtraLight.6824177d1e.woff2 +0 -0
- package/media/Inter-ExtraLightItalic.05138dddf3.woff2 +0 -0
- package/media/Inter-ExtraLightItalic.3beee54f59.woff +0 -0
- package/media/Inter-Italic.9beab78452.woff +0 -0
- package/media/Inter-Italic.d593a8df79.woff2 +0 -0
- package/media/Inter-Light.27083fa637.woff2 +0 -0
- package/media/Inter-Light.91dfddd842.woff +0 -0
- package/media/Inter-LightItalic.0a783b89b3.woff2 +0 -0
- package/media/Inter-LightItalic.f8ccf2813f.woff +0 -0
- package/media/Inter-Medium.dc792b508e.woff2 +0 -0
- package/media/Inter-Medium.ec7dd2d9d8.woff +0 -0
- package/media/Inter-MediumItalic.17301e5b40.woff +0 -0
- package/media/Inter-MediumItalic.84d3493a9f.woff2 +0 -0
- package/media/Inter-Regular.f1f0c35b32.woff2 +0 -0
- package/media/Inter-Regular.f356e84aa0.woff +0 -0
- package/media/Inter-SemiBold.55027e4724.woff +0 -0
- package/media/Inter-SemiBold.fcb100c760.woff2 +0 -0
- package/media/Inter-SemiBoldItalic.ab9105ed3b.woff +0 -0
- package/media/Inter-SemiBoldItalic.d90f295d0c.woff2 +0 -0
- package/media/Inter-Thin.16325d9b0f.woff +0 -0
- package/media/Inter-Thin.dafaa44d99.woff2 +0 -0
- package/media/Inter-ThinItalic.4fc662b3cf.woff2 +0 -0
- package/media/Inter-ThinItalic.d3d8994788.woff +0 -0
- package/media/Inter-italic.var.958a0b9742.woff2 +0 -0
- package/media/Inter-roman.var.b2129c009c.woff2 +0 -0
- package/package.json +20 -0
- package/packs/widget/api/docking/docking_host.js +97 -0
- package/packs/widget/api/docking/index.js +294 -0
- package/packs/widget/api/docking/shared.js +164 -0
- package/packs/widget/api/docking/viewport_lock.js +488 -0
- package/packs/widget/api/docking/viewport_resize.js +1203 -0
- package/packs/widget/esm/fonts/Inter-Black.796be8d8bf.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Black.b254104c56.woff +0 -0
- package/packs/widget/esm/fonts/Inter-BlackItalic.70306b0eae.woff +0 -0
- package/packs/widget/esm/fonts/Inter-BlackItalic.752f1e0aaa.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Bold.579e0f95ca.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Bold.b1234477a5.woff +0 -0
- package/packs/widget/esm/fonts/Inter-BoldItalic.3d0d804323.woff +0 -0
- package/packs/widget/esm/fonts/Inter-BoldItalic.828a494e04.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraBold.208a9e6c99.woff +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraBold.d65f028165.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraBoldItalic.30429962ec.woff +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraBoldItalic.8c7eac5ce3.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraLight.15c082a57d.woff +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraLight.6824177d1e.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraLightItalic.05138dddf3.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraLightItalic.3beee54f59.woff +0 -0
- package/packs/widget/esm/fonts/Inter-Italic.9beab78452.woff +0 -0
- package/packs/widget/esm/fonts/Inter-Italic.d593a8df79.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Light.27083fa637.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Light.91dfddd842.woff +0 -0
- package/packs/widget/esm/fonts/Inter-LightItalic.0a783b89b3.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-LightItalic.f8ccf2813f.woff +0 -0
- package/packs/widget/esm/fonts/Inter-Medium.dc792b508e.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Medium.ec7dd2d9d8.woff +0 -0
- package/packs/widget/esm/fonts/Inter-MediumItalic.17301e5b40.woff +0 -0
- package/packs/widget/esm/fonts/Inter-MediumItalic.84d3493a9f.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Regular.f1f0c35b32.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Regular.f356e84aa0.woff +0 -0
- package/packs/widget/esm/fonts/Inter-SemiBold.55027e4724.woff +0 -0
- package/packs/widget/esm/fonts/Inter-SemiBold.fcb100c760.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-SemiBoldItalic.ab9105ed3b.woff +0 -0
- package/packs/widget/esm/fonts/Inter-SemiBoldItalic.d90f295d0c.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Thin.16325d9b0f.woff +0 -0
- package/packs/widget/esm/fonts/Inter-Thin.dafaa44d99.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ThinItalic.4fc662b3cf.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ThinItalic.d3d8994788.woff +0 -0
- package/packs/widget/esm/fonts/Inter-italic.var.958a0b9742.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-roman.var.b2129c009c.woff2 +0 -0
- package/packs/widget/esm/index.js +183 -0
- package/packs/widget/esm/qualified.css +5502 -0
- package/routes/app/offers/scripts/OfferMainScript.js +154 -0
- package/routes/app/offers/scripts/constants.js +71 -0
- package/routes/app/offers/scripts/main/ButtonManager.js +65 -0
- package/routes/app/offers/scripts/main/FormManager.js +325 -0
- package/routes/app/offers/scripts/main/MainContext.js +19 -0
- package/routes/app/offers/scripts/main/OfferManager.js +91 -0
- package/routes/app/offers/scripts/main/TriggerManager.js +125 -0
- package/routes/app/offers/scripts/rendering/ContentManager.js +53 -0
- package/routes/app/offers/scripts/rendering/LocationManager.js +83 -0
- package/routes/app/offers/scripts/rendering/RenderedOffer.js +188 -0
- package/routes/app/offers/scripts/rendering/Renderer.js +69 -0
- package/routes/app/offers/scripts/rendering/RenderingInitializer.js +62 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationManager.js +31 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationManagerFooter.js +81 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationManagerHeader.js +81 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationManagerModal.js +117 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationManagerSidebar.js +75 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationResult.js +43 -0
- package/routes/app/offers/scripts/rendering/animations/Animator.js +78 -0
- package/routes/app/offers/scripts/rendering/animations/BaseAnimationManager.js +25 -0
- package/routes/app/offers/scripts/rendering/lib/BaseComponent.js +106 -0
- package/routes/app/offers/scripts/rendering/lib/FormComponent.js +134 -0
- package/routes/app/offers/scripts/rendering/lib/OfferComponent.js +144 -0
- package/routes/app/offers/scripts/rendering/lib/ScrollbarWidth.js +27 -0
- package/routes/app/offers/scripts/rendering/lib/decorators.js +20 -0
- package/routes/app/offers/scripts/rendering/locations/CSSVarsManager.js +66 -0
- package/routes/app/offers/scripts/rendering/locations/ElementResizeObserver.js +49 -0
- package/routes/app/offers/scripts/rendering/locations/footer.js +53 -0
- package/routes/app/offers/scripts/rendering/locations/header/AsyncBatchProcessor.js +70 -0
- package/routes/app/offers/scripts/rendering/locations/header/CSSTransitionObserver.js +182 -0
- package/routes/app/offers/scripts/rendering/locations/header/ElementStyleChangeObserver.js +138 -0
- package/routes/app/offers/scripts/rendering/locations/header/ExternalStyleManager.js +110 -0
- package/routes/app/offers/scripts/rendering/locations/header/Header.js +353 -0
- package/routes/app/offers/scripts/rendering/locations/header/InlineStyleManager.js +105 -0
- package/routes/app/offers/scripts/rendering/locations/header/MatchingElementsObserver.js +107 -0
- package/routes/app/offers/scripts/rendering/locations/header/NewElementsObserver.js +129 -0
- package/routes/app/offers/scripts/rendering/locations/header/RuleWrapper.js +46 -0
- package/routes/app/offers/scripts/rendering/locations/header/SelectorObservable.js +23 -0
- package/routes/app/offers/scripts/rendering/locations/header/SelectorObserver.js +61 -0
- package/routes/app/offers/scripts/rendering/locations/header/ShiftedElementsManager.js +45 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleElementManager.js +37 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleElementWrapper.js +62 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleSelectorObserver/ObservedSelectorValue.js +45 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleSelectorObserver/ObservedSelectors.js +62 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleSelectorObserver/StyleSelectorObserver.js +294 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleSelectorObserver/constants.js +21 -0
- package/routes/app/offers/scripts/rendering/locations/header/WindowResizeObserver.js +43 -0
- package/routes/app/offers/scripts/rendering/locations/header/utils.js +25 -0
- package/routes/app/offers/scripts/rendering/locations/popup.js +66 -0
- package/routes/app/offers/scripts/rendering/locations/sidebar.js +21 -0
- package/routes/app/offers/scripts/rendering/variations/ButtonBanner.js +105 -0
- package/routes/app/offers/scripts/rendering/variations/ButtonModal.js +114 -0
- package/routes/app/offers/scripts/rendering/variations/FormBanner.js +214 -0
- package/routes/app/offers/scripts/rendering/variations/FormModal.js +325 -0
- package/routes/app/offers/scripts/rendering/variations/LinkBanner.js +105 -0
- package/routes/app/offers/scripts/rendering/variations/components/Body.js +29 -0
- package/routes/app/offers/scripts/rendering/variations/components/Button.js +128 -0
- package/routes/app/offers/scripts/rendering/variations/components/DismissButton.js +39 -0
- package/routes/app/offers/scripts/rendering/variations/components/ForegroundImageBanner.js +110 -0
- package/routes/app/offers/scripts/rendering/variations/components/ForegroundImageModal.js +128 -0
- package/routes/app/offers/scripts/rendering/variations/components/Headline.js +94 -0
- package/routes/app/offers/scripts/rendering/variations/components/MultiFieldForm.js +302 -0
- package/routes/app/offers/scripts/rendering/variations/components/Tooltip.js +74 -0
- package/routes/app/offers/scripts/rendering/variations/icons.js +15 -0
- package/routes/app/offers/scripts/utils.js +115 -0
- package/routes/app/offers/utils/HTMLUtils.js +10 -0
- package/routes/app/offers/utils/createTypeGuard.js +32 -0
- package/routes/app/offers/utils/promise-utils.js +22 -0
- package/routes/app/websiteBuilder/stores/storeHelpers.js +18 -0
- package/sounds/message-initial.mp3 +0 -0
- package/sounds/message-received.mp3 +0 -0
- package/sounds/message-sent.mp3 +0 -0
- package/src/arrays.js +15 -0
- package/src/audio.js +106 -0
- package/src/bounded-set.js +16 -0
- package/src/bounding_box_observer.js +129 -0
- package/src/decorators.js +29 -0
- package/src/dom.js +128 -0
- package/src/dom_roots.js +26 -0
- package/src/embedded_forms/EmbeddedForm.js +638 -0
- package/src/embedded_forms/QualifiedEmbeddedForm.js +51 -0
- package/src/embedded_forms/QualifiedFormField.js +137 -0
- package/src/embedded_forms/utils.js +17 -0
- package/src/graphql-types.js +1686 -0
- package/src/iframes.js +86 -0
- package/src/localstorage.js +43 -0
- package/src/mirror/Shipper.js +133 -0
- package/src/mirror/constants.generated.js +13 -0
- package/src/mirror/constants.js +238 -0
- package/src/mirror/shipper/ChangeQueue.js +155 -0
- package/src/mirror/shipper/DOMSerializer.js +392 -0
- package/src/mirror/shipper/observers.js +441 -0
- package/src/mirror/shipper/utils.js +98 -0
- package/src/mixins/disposable.js +125 -0
- package/src/mixins/injectable.js +37 -0
- package/src/personalizations/personalization-manager.js +110 -0
- package/src/personalizations/strategies/node-freezing-strategy.js +174 -0
- package/src/personalizations/utils.js +187 -0
- package/src/promises.js +107 -0
- package/src/proxy.js +144 -0
- package/src/qualified_root.js +35 -0
- package/src/query_params.js +55 -0
- package/src/shadow-dom-helper.js +63 -0
- package/src/singleton_host.js +39 -0
- package/src/smart_website/trigger.js +49 -0
- package/src/smart_website/utils.js +149 -0
- package/src/string.js +53 -0
- package/src/timezone.js +57 -0
- package/src/timing.js +49 -0
- package/src/type-utils.js +76 -0
- package/src/url-utils.js +102 -0
- package/src/url.js +50 -0
- package/src/utils.js +72 -0
- package/src/validation.js.js +29 -0
- package/src/validation_ts.js +6 -0
- package/vendor/actioncable/adapters.js +6 -0
- package/vendor/actioncable/connection.js +204 -0
- package/vendor/actioncable/connection_monitor.js +129 -0
- package/vendor/actioncable/consumer.js +91 -0
- package/vendor/actioncable/index.js +34 -0
- package/vendor/actioncable/internal.js +22 -0
- package/vendor/actioncable/logger.js +28 -0
- package/vendor/actioncable/subscription.js +93 -0
- package/vendor/actioncable/subscriptions.js +89 -0
- package/vendor/open-telemetry-idgenerator.js +43 -0
- package/widget/analytics/facebook_tracker.js +8 -0
- package/widget/analytics/google_analytics_tracker.js +83 -0
- package/widget/analytics/google_tag_manager_tracker.js +22 -0
- package/widget/analytics.js +58 -0
- package/widget/api_handler/api_handler.js +730 -0
- package/widget/api_handler/base_api_handler.js +249 -0
- package/widget/booker_intent_tracker.js +391 -0
- package/widget/booker_outcome_tracker.js +329 -0
- package/widget/capture_widget_exceptions.js +150 -0
- package/widget/channel.js +282 -0
- package/widget/composite_experience_adapter.js +101 -0
- package/widget/constants.generated.js +350 -0
- package/widget/constants.js +21 -0
- package/widget/container.js +193 -0
- package/widget/content_activity_emitter.js +36 -0
- package/widget/data360_visitor.js +67 -0
- package/widget/date_provider.js +11 -0
- package/widget/debug_mode_state.js +175 -0
- package/widget/dummy_module.js +9 -0
- package/widget/eloqua_visitor.js +17 -0
- package/widget/form_cta_booker_intent.js +246 -0
- package/widget/hubspot_visitor.js +39 -0
- package/widget/inline_meeting_booker_page.js +90 -0
- package/widget/local_state/abstract_local_state.js +38 -0
- package/widget/local_state/debug_state/abstract_debug_flow.js +29 -0
- package/widget/local_state/debug_state/custom_form_flow.js +14 -0
- package/widget/local_state/debug_state/hubspot_form_flow.js +19 -0
- package/widget/local_state/debug_state/hubspot_v4_form_flow.js +19 -0
- package/widget/local_state/debug_state/marketo_form_flow.js +20 -0
- package/widget/local_state/debug_state/pardot_form_flow.js +18 -0
- package/widget/local_state/debug_state.js +362 -0
- package/widget/local_state/trace_state.js +20 -0
- package/widget/location_provider.js +9 -0
- package/widget/marketo_visitor.js +39 -0
- package/widget/meetings/tracing/buttons_forms_triggering_tracer.js +124 -0
- package/widget/meetings/tracing/spans/button_spans.js +18 -0
- package/widget/meetings/tracing/spans/form_spans.js +11 -0
- package/widget/multimodal_v2/assets_preloader.js +97 -0
- package/widget/multimodal_v2/components/AppLayout.js +93 -0
- package/widget/multimodal_v2/components/CursorOverlay.js +93 -0
- package/widget/multimodal_v2/components/PointerRectOverlay.js +74 -0
- package/widget/multimodal_v2/components/app/Artifact.js +109 -0
- package/widget/multimodal_v2/components/app/Background.js +27 -0
- package/widget/multimodal_v2/components/app/CalendarLoadingContent.js +255 -0
- package/widget/multimodal_v2/components/app/Chat.js +39 -0
- package/widget/multimodal_v2/components/app/CookieConsentModal.js +149 -0
- package/widget/multimodal_v2/components/app/Foreground.js +48 -0
- package/widget/multimodal_v2/components/app/HiddenInput.js +41 -0
- package/widget/multimodal_v2/components/app/Input.js +72 -0
- package/widget/multimodal_v2/components/app/LightboxExperience.js +769 -0
- package/widget/multimodal_v2/components/app/LoadingOverlay.js +97 -0
- package/widget/multimodal_v2/components/app/Main.js +985 -0
- package/widget/multimodal_v2/components/app/MessengerButton.js +160 -0
- package/widget/multimodal_v2/components/app/Multimodal.js +17 -0
- package/widget/multimodal_v2/components/app/OverlayControls.js +79 -0
- package/widget/multimodal_v2/components/app/Preview.js +32 -0
- package/widget/multimodal_v2/components/app/PrivacyDisclosure.js +57 -0
- package/widget/multimodal_v2/components/app/RotateDeviceOverlay.js +70 -0
- package/widget/multimodal_v2/components/app/Toolbar.js +156 -0
- package/widget/multimodal_v2/components/chat/ChatComposer.js +129 -0
- package/widget/multimodal_v2/components/chat/ChatInputForm.js +398 -0
- package/widget/multimodal_v2/components/chat/ColdStartQuestions.js +354 -0
- package/widget/multimodal_v2/components/chat/ComposerErrorBanner.js +62 -0
- package/widget/multimodal_v2/components/chat/PostCallSurvey.js +359 -0
- package/widget/multimodal_v2/components/chat/preview/FieldRequestRenderer.js +41 -0
- package/widget/multimodal_v2/components/chat/preview/PreviewMessageRenderer.js +60 -0
- package/widget/multimodal_v2/components/chat/preview/SharedOfferRenderer.js +143 -0
- package/widget/multimodal_v2/components/chat/preview/TextRenderer.js +27 -0
- package/widget/multimodal_v2/components/chat/preview/TimelinePreview.js +254 -0
- package/widget/multimodal_v2/components/chat/timeline/CalendarEventOfferRenderer.js +103 -0
- package/widget/multimodal_v2/components/chat/timeline/CalendarEventPickRenderer.js +148 -0
- package/widget/multimodal_v2/components/chat/timeline/FieldEntryRenderer.js +84 -0
- package/widget/multimodal_v2/components/chat/timeline/FieldRequestRenderer.js +56 -0
- package/widget/multimodal_v2/components/chat/timeline/InlinePrivacyDisclosure.js +66 -0
- package/widget/multimodal_v2/components/chat/timeline/LinkPreviewCard.js +70 -0
- package/widget/multimodal_v2/components/chat/timeline/MessageEntry.js +88 -0
- package/widget/multimodal_v2/components/chat/timeline/PresentContentRenderer.js +30 -0
- package/widget/multimodal_v2/components/chat/timeline/PresentDeckRenderer.js +279 -0
- package/widget/multimodal_v2/components/chat/timeline/PresentVideoRenderer.js +131 -0
- package/widget/multimodal_v2/components/chat/timeline/ShareContentRenderer.js +59 -0
- package/widget/multimodal_v2/components/chat/timeline/SharedOfferRenderer.js +131 -0
- package/widget/multimodal_v2/components/chat/timeline/SystemRenderer.js +82 -0
- package/widget/multimodal_v2/components/chat/timeline/TextRenderer.js +66 -0
- package/widget/multimodal_v2/components/chat/timeline/Timeline.js +158 -0
- package/widget/multimodal_v2/components/debug/DebugMultimodalPanel.js +327 -0
- package/widget/multimodal_v2/components/decks/index.js +160 -0
- package/widget/multimodal_v2/components/field_request/BooleanField.js +77 -0
- package/widget/multimodal_v2/components/field_request/FieldComponents.js +69 -0
- package/widget/multimodal_v2/components/field_request/Form.js +87 -0
- package/widget/multimodal_v2/components/field_request/MultiPicklistField.js +240 -0
- package/widget/multimodal_v2/components/field_request/PicklistField.js +166 -0
- package/widget/multimodal_v2/components/field_request/SingleLineInputField.js +69 -0
- package/widget/multimodal_v2/components/field_request/TextField.js +37 -0
- package/widget/multimodal_v2/components/field_request/index.js +170 -0
- package/widget/multimodal_v2/components/helpers/AutoScroll.js +37 -0
- package/widget/multimodal_v2/components/helpers/ErrorBoundary.js +53 -0
- package/widget/multimodal_v2/components/helpers/FocusTrapDialog.js +26 -0
- package/widget/multimodal_v2/components/helpers/ImpressionTracker.js +94 -0
- package/widget/multimodal_v2/components/helpers/ListRenderer.js +37 -0
- package/widget/multimodal_v2/components/helpers/Localization.js +76 -0
- package/widget/multimodal_v2/components/helpers/Persisted.js +166 -0
- package/widget/multimodal_v2/components/helpers/RichText.js +358 -0
- package/widget/multimodal_v2/components/helpers/ScreenReaderHeading.js +17 -0
- package/widget/multimodal_v2/components/helpers/Thumbnail.js +190 -0
- package/widget/multimodal_v2/components/helpers/VisuallyHidden.js +41 -0
- package/widget/multimodal_v2/components/helpers/content_click_payloads.js +58 -0
- package/widget/multimodal_v2/components/helpers/useDraggable.js +103 -0
- package/widget/multimodal_v2/components/helpers/useTextOverflow.js +44 -0
- package/widget/multimodal_v2/components/lightbox_gather/index.js +741 -0
- package/widget/multimodal_v2/components/meetings/ArtifactEntryPoint.js +252 -0
- package/widget/multimodal_v2/components/meetings/MeetingAdditionalAttendees.js +325 -0
- package/widget/multimodal_v2/components/meetings/MeetingBookerEntry.js +100 -0
- package/widget/multimodal_v2/components/meetings/MeetingDetailsCard.js +99 -0
- package/widget/multimodal_v2/components/meetings/MeetingErrorBanner.js +62 -0
- package/widget/multimodal_v2/components/meetings/MeetingOfferEmailStep.js +239 -0
- package/widget/multimodal_v2/components/meetings/MeetingOfferFooter.js +104 -0
- package/widget/multimodal_v2/components/meetings/MeetingOfferSelectionStep.js +60 -0
- package/widget/multimodal_v2/components/meetings/MeetingRepHeader.js +222 -0
- package/widget/multimodal_v2/components/meetings/MeetingStepShell.js +92 -0
- package/widget/multimodal_v2/components/meetings/MeetingSummaryRail.js +515 -0
- package/widget/multimodal_v2/components/meetings/MeetingTimeSelector.js +603 -0
- package/widget/multimodal_v2/components/meetings/MonthDatePicker.js +422 -0
- package/widget/multimodal_v2/components/meetings/NavigationButtons.js +76 -0
- package/widget/multimodal_v2/components/meetings/TimeSlotHeader.js +357 -0
- package/widget/multimodal_v2/components/meetings/WeekViewHeader.js +20 -0
- package/widget/multimodal_v2/components/meetings/constants.js +7 -0
- package/widget/multimodal_v2/components/meetings/index.js +47 -0
- package/widget/multimodal_v2/components/meetings/utils.js +328 -0
- package/widget/multimodal_v2/components/multimodal/Audio.js +28 -0
- package/widget/multimodal_v2/components/multimodal/Controls.js +188 -0
- package/widget/multimodal_v2/components/multimodal/LiveVideo.js +63 -0
- package/widget/multimodal_v2/components/multimodal/MultiModalComponent.js +424 -0
- package/widget/multimodal_v2/components/multimodal/MultimodalAvatar.js +36 -0
- package/widget/multimodal_v2/components/multimodal/OrbAvatar.js +326 -0
- package/widget/multimodal_v2/components/multimodal/Status.js +220 -0
- package/widget/multimodal_v2/components/multimodal/VideoAvatar.js +24 -0
- package/widget/multimodal_v2/components/multimodal/VideoPreview.js +114 -0
- package/widget/multimodal_v2/components/multimodal/useAudioLevelMonitoring.js +96 -0
- package/widget/multimodal_v2/components/multimodal/useMultimodal.js +434 -0
- package/widget/multimodal_v2/components/presentations/index.js +372 -0
- package/widget/multimodal_v2/components/shared/Avatar.js +92 -0
- package/widget/multimodal_v2/components/shared/AvatarGroup.js +135 -0
- package/widget/multimodal_v2/components/shared/Button.js +245 -0
- package/widget/multimodal_v2/components/shared/ButtonGroup.js +133 -0
- package/widget/multimodal_v2/components/shared/ComposerForm.js +98 -0
- package/widget/multimodal_v2/components/shared/SpeakingIndicator.js +239 -0
- package/widget/multimodal_v2/components/shared/ThinkingAnimation.js +165 -0
- package/widget/multimodal_v2/components/shared/Tooltip.js +266 -0
- package/widget/multimodal_v2/components/shared/controls/Dropdown.js +79 -0
- package/widget/multimodal_v2/components/shared/controls/PillToggle.js +142 -0
- package/widget/multimodal_v2/components/shared/controls/TextArea.js +114 -0
- package/widget/multimodal_v2/components/shared/toolCallLabels.js +12 -0
- package/widget/multimodal_v2/components/slides/SlidesThumbnail.js +47 -0
- package/widget/multimodal_v2/components/slides/index.js +61 -0
- package/widget/multimodal_v2/constants.js +88 -0
- package/widget/multimodal_v2/host.split-css.js +2 -0
- package/widget/multimodal_v2/host.string.js +96 -0
- package/widget/multimodal_v2/images/icons.js +582 -0
- package/widget/multimodal_v2/images/posters/piper_low_res.jpg +0 -0
- package/widget/multimodal_v2/index.js +23 -0
- package/widget/multimodal_v2/index.panda.js +28 -0
- package/widget/multimodal_v2/index.split-css.panda.js +2 -0
- package/widget/multimodal_v2/inline_meeting_booker.js +182 -0
- package/widget/multimodal_v2/locales/cs.js +196 -0
- package/widget/multimodal_v2/locales/da.js +196 -0
- package/widget/multimodal_v2/locales/de.js +196 -0
- package/widget/multimodal_v2/locales/en.js +196 -0
- package/widget/multimodal_v2/locales/en_AU.js +197 -0
- package/widget/multimodal_v2/locales/en_GB.js +197 -0
- package/widget/multimodal_v2/locales/es.js +197 -0
- package/widget/multimodal_v2/locales/es_LA.js +196 -0
- package/widget/multimodal_v2/locales/fi.js +196 -0
- package/widget/multimodal_v2/locales/fr.js +197 -0
- package/widget/multimodal_v2/locales/fr_CA.js +196 -0
- package/widget/multimodal_v2/locales/id.js +196 -0
- package/widget/multimodal_v2/locales/index.js +48 -0
- package/widget/multimodal_v2/locales/it.js +196 -0
- package/widget/multimodal_v2/locales/ja.js +196 -0
- package/widget/multimodal_v2/locales/ko.js +196 -0
- package/widget/multimodal_v2/locales/nb.js +196 -0
- package/widget/multimodal_v2/locales/nl.js +196 -0
- package/widget/multimodal_v2/locales/pl.js +196 -0
- package/widget/multimodal_v2/locales/pt_BR.js +196 -0
- package/widget/multimodal_v2/locales/ru.js +196 -0
- package/widget/multimodal_v2/locales/sv.js +196 -0
- package/widget/multimodal_v2/locales/th.js +196 -0
- package/widget/multimodal_v2/locales/tr.js +196 -0
- package/widget/multimodal_v2/locales/vi.js +196 -0
- package/widget/multimodal_v2/locales/zh_CN.js +196 -0
- package/widget/multimodal_v2/locales/zh_TW.js +196 -0
- package/widget/multimodal_v2/multimodal.js +633 -0
- package/widget/multimodal_v2/multimodal_channel.js +195 -0
- package/widget/multimodal_v2/signals/active_conversation_signal.js +33 -0
- package/widget/multimodal_v2/signals/allowed_conversation_mode_signal.js +38 -0
- package/widget/multimodal_v2/signals/artifact_signal.js +22 -0
- package/widget/multimodal_v2/signals/layout_signal.js +98 -0
- package/widget/multimodal_v2/signals/messages_signal.js +207 -0
- package/widget/multimodal_v2/signals/ui_state_signal.js +128 -0
- package/widget/multimodal_v2/stable_bundle_src.js +44 -0
- package/widget/multimodal_v2/stores/ai_conversation_store.js +221 -0
- package/widget/multimodal_v2/stores/artifact_store.js +205 -0
- package/widget/multimodal_v2/stores/base_store.js +16 -0
- package/widget/multimodal_v2/stores/call_store.js +770 -0
- package/widget/multimodal_v2/stores/call_ui_adapter.js +225 -0
- package/widget/multimodal_v2/stores/debug_multimodal_scenario_store.js +471 -0
- package/widget/multimodal_v2/stores/decks_store.js +285 -0
- package/widget/multimodal_v2/stores/device_store.js +63 -0
- package/widget/multimodal_v2/stores/docking_store.js +62 -0
- package/widget/multimodal_v2/stores/field_request_store.js +326 -0
- package/widget/multimodal_v2/stores/meeting_store.js +477 -0
- package/widget/multimodal_v2/stores/participant_store.js +73 -0
- package/widget/multimodal_v2/stores/post_call_survey_store.js +160 -0
- package/widget/multimodal_v2/stores/pounce_tracking_store.js +163 -0
- package/widget/multimodal_v2/stores/pounce_tracking_store_v2.js +511 -0
- package/widget/multimodal_v2/stores/presentations_store.js +111 -0
- package/widget/multimodal_v2/stores/root_store.js +1919 -0
- package/widget/multimodal_v2/stores/screen_share_store.js +217 -0
- package/widget/multimodal_v2/stores/slides_store.js +21 -0
- package/widget/multimodal_v2/stores/translation_store.js +185 -0
- package/widget/multimodal_v2/stores/ui_store.js +496 -0
- package/widget/multimodal_v2/stores/waiting_store.js +159 -0
- package/widget/multimodal_v2/stores/website_navigation_store.js +767 -0
- package/widget/multimodal_v2/styled-system/css/conditions.js +34 -0
- package/widget/multimodal_v2/styled-system/css/css.js +48 -0
- package/widget/multimodal_v2/styled-system/css/cva.js +96 -0
- package/widget/multimodal_v2/styled-system/css/cx.js +13 -0
- package/widget/multimodal_v2/styled-system/css/index.js +15 -0
- package/widget/multimodal_v2/styled-system/css/sva.js +69 -0
- package/widget/multimodal_v2/styled-system/helpers.js +384 -0
- package/widget/multimodal_v2/styled-system/jsx/create-style-context.js +96 -0
- package/widget/multimodal_v2/styled-system/jsx/factory-helper.js +19 -0
- package/widget/multimodal_v2/styled-system/jsx/factory.js +111 -0
- package/widget/multimodal_v2/styled-system/jsx/index.js +12 -0
- package/widget/multimodal_v2/styled-system/jsx/is-valid-prop.js +22 -0
- package/widget/multimodal_v2/types.js +105 -0
- package/widget/multimodal_v2/utils/auto_scroller.js +157 -0
- package/widget/multimodal_v2/utils/flip_animation.js +124 -0
- package/widget/multimodal_v2/utils/focus_gate.js +237 -0
- package/widget/multimodal_v2/utils/locale.js +16 -0
- package/widget/multimodal_v2/utils/media_queries.js +30 -0
- package/widget/multimodal_v2/utils/multimodal_cache.js +19 -0
- package/widget/multimodal_v2/utils/mutation_effect.js +14 -0
- package/widget/multimodal_v2/utils/navigation_interceptor.js +205 -0
- package/widget/multimodal_v2/utils/navigation_strategies/dom_swap.js +393 -0
- package/widget/multimodal_v2/utils/navigation_strategies/index.js +12 -0
- package/widget/multimodal_v2/utils/navigation_strategies/lwr.js +61 -0
- package/widget/multimodal_v2/utils/navigation_strategies/navigation_utils.js +46 -0
- package/widget/multimodal_v2/utils/navigation_strategies/next_js.js +24 -0
- package/widget/multimodal_v2/utils/navigation_strategies/wouter_v3.js +15 -0
- package/widget/multimodal_v2/utils/objects_map.js +38 -0
- package/widget/multimodal_v2/utils/perceived_voice_turn_tracker.js +345 -0
- package/widget/multimodal_v2/utils/sanitize_html.js +132 -0
- package/widget/multimodal_v2/utils/signals.js +97 -0
- package/widget/multimodal_v2/utils/slide_zoom.js +114 -0
- package/widget/multimodal_v2/utils/theme_styles.js +137 -0
- package/widget/multimodal_v2/utils/url_observer.js +52 -0
- package/widget/multimodal_v2/utils/voice_onset_detector.js +127 -0
- package/widget/page_mirror.js +89 -0
- package/widget/page_view_activity_emitter.js +71 -0
- package/widget/pardot_visitor.js +137 -0
- package/widget/personalization_observer.js +96 -0
- package/widget/personalizations_config.js +160 -0
- package/widget/qualified_form/constants.js +23 -0
- package/widget/qualified_form/phone_utils.js +38 -0
- package/widget/qualified_form/qualified_form_action.js +91 -0
- package/widget/qualified_form/qualified_form_action_orchestrator.js +21 -0
- package/widget/qualified_form/qualified_form_api.js +471 -0
- package/widget/scroll_disabler.js +109 -0
- package/widget/server-logger.js +156 -0
- package/widget/smart_website_config.js +112 -0
- package/widget/telemetry/context.js +75 -0
- package/widget/telemetry/index.js +16 -0
- package/widget/telemetry/messenger_uptime.js +80 -0
- package/widget/telemetry/metrics.js +120 -0
- package/widget/telemetry/span.js +82 -0
- package/widget/telemetry/telemetry.js +180 -0
- package/widget/telemetry/tracer.js +41 -0
- package/widget/telemetry/tracing_store.js +310 -0
- package/widget/tracker.js +916 -0
- package/widget/utils/native_globals.js +129 -0
- package/widget/v1_adapter.js +50 -0
- package/widget/v2_adapter.js +368 -0
- package/widget/visitor/base_visitor_state.js +11 -0
- package/widget/visitor/cookie_visitor_state.js +128 -0
- package/widget/visitor/in_memory_visitor_state.js +29 -0
- package/widget/visitor/visitor_state.js +384 -0
- package/widget/visitor.js +356 -0
- package/widget/widget/linked_widget_v2.js +227 -0
- package/widget/widget/page_mirror_factory.js +22 -0
- package/widget/widget/sentry.js +130 -0
- package/widget/widget/widget.js +1698 -0
- package/widget/widget.split-css.js +2 -0
- package/widget/widget_bootstrap.js +97 -0
- package/widget/widget_object.js +73 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { BaseComponent } from "../../lib/BaseComponent.js";
|
|
2
|
+
import { _tagged_template_literal_loose } from "../../../../../../../js/4101.js";
|
|
3
|
+
import { escapeHtml } from "../../../../../../../src/embedded_forms/utils.js";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
function Tooltip_templateObject() {
|
|
7
|
+
const data = _tagged_template_literal_loose([
|
|
8
|
+
'\n <div class="',
|
|
9
|
+
'">\n ',
|
|
10
|
+
"\n ",
|
|
11
|
+
"\n </div>\n "
|
|
12
|
+
]);
|
|
13
|
+
Tooltip_templateObject = function _templateObject() {
|
|
14
|
+
return data;
|
|
15
|
+
};
|
|
16
|
+
return data;
|
|
17
|
+
}
|
|
18
|
+
function _templateObject1() {
|
|
19
|
+
const data = _tagged_template_literal_loose([
|
|
20
|
+
"\n <div\n ",
|
|
21
|
+
"\n ",
|
|
22
|
+
'\n role="tooltip"\n class="',
|
|
23
|
+
'"\n ',
|
|
24
|
+
"\n >\n ",
|
|
25
|
+
"\n </div>\n "
|
|
26
|
+
]);
|
|
27
|
+
_templateObject1 = function _templateObject() {
|
|
28
|
+
return data;
|
|
29
|
+
};
|
|
30
|
+
return data;
|
|
31
|
+
}
|
|
32
|
+
/* eslint-disable rulesdir/css-units */
|
|
33
|
+
|
|
34
|
+
class Tooltip extends BaseComponent {
|
|
35
|
+
get wrapper() {
|
|
36
|
+
var _this = this;
|
|
37
|
+
return function(raw) {
|
|
38
|
+
for(var _len = arguments.length, elements = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
39
|
+
elements[_key - 1] = arguments[_key];
|
|
40
|
+
}
|
|
41
|
+
return _this.html /* html */ (Tooltip_templateObject(), _this.cx.container, _this.html(raw, ...elements), _this.content);
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
get style() {
|
|
45
|
+
var _this_props_fontFamily, _this_props_fontFamily1, _this_props_offsetY, _this_props_offsetY1;
|
|
46
|
+
return /* css */ "\n ." + this.cx.container + " {\n display: flex;\n position: relative;\n " + (this.props.hasOffersFormBannerMobileImprovements && "flex-grow: 1;") + "\n }\n\n ." + this.cx.tooltip + " {\n position: absolute;\n display: none;\n padding: 10px;\n align-items: center;\n color: #FFF;\n font-family: " + ((_this_props_fontFamily = this.props.fontFamily) != null ? _this_props_fontFamily : "inherit") + ";\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n line-height: 18px;\n border-radius: 4px;\n background: #212D34;\n white-space: nowrap;\n /* Ensure tooltip is above caret */\n z-index: 2;\n }\n\n /* Ensure links have same font color and style as other tooltip text */\n ." + this.cx.tooltip + " a {\n color: #FFF;\n font-family: " + ((_this_props_fontFamily1 = this.props.fontFamily) != null ? _this_props_fontFamily1 : "inherit") + ";\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n text-decoration: underline;\n }\n\n ." + this.cx.tooltip + ":focus-within,\n ." + this.cx.tooltip + ":focus,\n ." + this.cx.tooltip + ":hover {\n display: flex;\n }\n\n " + this.focusCSS + "\n " + this.hoverCSS + "\n " + this.alwaysCSS + "\n\n ." + this.cx.tooltip + "[top] {\n left: 50%;\n transform: translateX(-50%) translateY(-100%);\n top: calc(-5px - " + ((_this_props_offsetY = this.props.offsetY) != null ? _this_props_offsetY : 0) + "px);\n }\n\n ." + this.cx.tooltip + "[bottom] {\n left: 50%;\n transform: translateX(-50%) translateY(100%);\n bottom: calc(-5px - " + ((_this_props_offsetY1 = this.props.offsetY) != null ? _this_props_offsetY1 : 0) + "px);\n }\n\n ." + this.cx.tooltip + '::after {\n content: "";\n position: absolute;\n background: #212D34;\n width: 12px;\n height: 12px;\n border-radius: 3px;\n transform: translateY(-65%) translateX(-50%) rotate(45deg);\n /* Ensure tooltip is above caret */\n z-index: 1;\n }\n\n .' + this.cx.tooltip + "[top]::after {\n left: 50%;\n top: 100%;\n transform: translateY(-65%) translateX(-50%) rotate(45deg);\n }\n\n ." + this.cx.tooltip + "[bottom]::after {\n left: 50%;\n bottom: 100%;\n transform: translateY(65%) translateX(-50%) rotate(45deg);\n }\n ";
|
|
47
|
+
}
|
|
48
|
+
get content() {
|
|
49
|
+
return this.html /* html */ (_templateObject1(), this.props.tooltipId && 'id="' + this.props.tooltipId + '"', this.props.ariaLabel && 'aria-label="' + escapeHtml(this.props.ariaLabel) + '"', this.cx.tooltip, this.props.placement, this.props.text);
|
|
50
|
+
}
|
|
51
|
+
get focusCSS() {
|
|
52
|
+
if (this.props.target.event === "focus") {
|
|
53
|
+
return /* css */ "\n " + this.props.target.selector + ":is(:focus, :focus-visible) + ." + this.cx.tooltip + " {\n display: flex;\n }\n ";
|
|
54
|
+
}
|
|
55
|
+
return "";
|
|
56
|
+
}
|
|
57
|
+
get hoverCSS() {
|
|
58
|
+
if (this.props.target.event === "hover") {
|
|
59
|
+
return /* css */ "\n " + this.props.target.selector + ":hover + ." + this.cx.tooltip + " {\n display: flex;\n }\n ";
|
|
60
|
+
}
|
|
61
|
+
return "";
|
|
62
|
+
}
|
|
63
|
+
get alwaysCSS() {
|
|
64
|
+
if (this.props.target.event === "always") {
|
|
65
|
+
return /* css */ "\n ." + this.cx.tooltip + " {\n display: flex;\n }\n ";
|
|
66
|
+
}
|
|
67
|
+
return "";
|
|
68
|
+
}
|
|
69
|
+
constructor(props){
|
|
70
|
+
super(props, null), this.displayName = "Tooltip";
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { Tooltip };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Alert icon copied from the design system
|
|
3
|
+
*/ const AlertIcon = /* html */ '\n <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="current">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M7.84314 2.71392C7.3572 3.32453 6.812 4.26225 6.02978 5.61336L3.33029 10.2761C2.54526 11.6321 2.00143 12.5754 1.71283 13.3034C1.4267 14.0252 1.47621 14.3295 1.59112 14.5288C1.70603 14.7281 1.94461 14.9235 2.71262 15.0375C3.48725 15.1525 4.57613 15.1545 6.14293 15.1545H11.5419C13.1087 15.1545 14.1976 15.1525 14.9722 15.0375C15.7402 14.9235 15.9788 14.7281 16.0937 14.5288C16.2086 14.3295 16.2581 14.0252 15.972 13.3034C15.6834 12.5754 15.1396 11.6321 14.3545 10.2761L11.6551 5.61336C10.8728 4.26225 10.3276 3.32453 9.84169 2.71392C9.36009 2.10878 9.07228 2 8.84241 2C8.61255 2 8.32473 2.10878 7.84314 2.71392ZM6.66945 1.77987C7.24567 1.05582 7.91918 0.5 8.84241 0.5C9.76565 0.5 10.4392 1.05582 11.0154 1.77987C11.579 2.48806 12.1787 3.52405 12.9204 4.80524L12.9205 4.80529L12.9205 4.80532L12.9532 4.86181L15.6527 9.52456L15.6854 9.58114C16.43 10.8671 17.0319 11.9067 17.3664 12.7506C17.7083 13.6131 17.8554 14.4763 17.3932 15.2781C16.931 16.0798 16.1102 16.385 15.1925 16.5212C14.2945 16.6545 13.0932 16.6545 11.6073 16.6545H11.5419H6.14293H6.07758C4.59161 16.6545 3.39034 16.6545 2.49235 16.5212C1.57461 16.385 0.753878 16.0798 0.291635 15.2781C-0.170608 14.4763 -0.0235085 13.6131 0.318404 12.7506C0.65296 11.9067 1.25486 10.8671 1.99941 9.58112L2.03215 9.52456L4.73164 4.86181L4.76434 4.80532C5.50607 3.52409 6.10584 2.48807 6.66945 1.77987ZM8.84239 5.5172C9.2566 5.5172 9.59239 5.85299 9.59239 6.2672V9.77167C9.59239 10.1859 9.2566 10.5217 8.84239 10.5217C8.42817 10.5217 8.09239 10.1859 8.09239 9.77167V6.2672C8.09239 5.85299 8.42817 5.5172 8.84239 5.5172ZM8.8424 13.2761C9.32627 13.2761 9.71852 12.8839 9.71852 12.4C9.71852 11.9162 9.32627 11.5239 8.8424 11.5239C8.35854 11.5239 7.96628 11.9162 7.96628 12.4C7.96628 12.8839 8.35854 13.2761 8.8424 13.2761Z" fill="#current"/>\n </svg>\n';
|
|
4
|
+
/**
|
|
5
|
+
* Circle icon copied from the design system
|
|
6
|
+
*/ const CircleIcon = /* html */ '\n <svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64" fill="current">\n <circle cx="32" cy="32" r="32" fill="#current"/>\n </svg>\n';
|
|
7
|
+
/**
|
|
8
|
+
* Check icon copied from the design system
|
|
9
|
+
*/ const CheckIcon = /* html */ '\n <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36" fill="current">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M31.3514 7.5257C32.1657 8.27209 32.2207 9.53722 31.4743 10.3515L14.9743 28.3515C14.6057 28.7536 14.0888 28.9877 13.5434 28.9995C12.9981 29.0114 12.4715 28.8 12.0858 28.4142L4.58579 20.9142C3.80474 20.1332 3.80474 18.8668 4.58579 18.0858C5.36683 17.3047 6.63317 17.3047 7.41421 18.0858L13.4372 24.1088L28.5257 7.64856C29.2721 6.83432 30.5372 6.77932 31.3514 7.5257Z" fill="current"/>\n </svg>\n';
|
|
10
|
+
const DownArrowIcon = /* html */ '\n <svg height="20" width="20" viewBox="0 0 20 20">\n <path d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"></path>\n </svg>\n';
|
|
11
|
+
const CHECKBOX_SVG_STRING = (color)=>/* html */ '\n <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M20.6757 5.26285C21.0828 5.63604 21.1103 6.26861 20.7372 6.67573L9.73715 18.6757C9.55285 18.8768 9.29441 18.9938 9.02172 18.9998C8.74903 19.0057 8.48576 18.9 8.29289 18.7071L3.29289 13.7071C2.90237 13.3166 2.90237 12.6834 3.29289 12.2929C3.68342 11.9024 4.31658 11.9024 4.70711 12.2929L8.96859 16.5544L19.2628 5.32428C19.636 4.91716 20.2686 4.88966 20.6757 5.26285Z"\n fill="' + color + '"\n />\n </svg>\n';
|
|
12
|
+
|
|
13
|
+
var icons_CheckIcon = /* unused export */ undefined;
|
|
14
|
+
var icons_CircleIcon = /* unused export */ undefined;
|
|
15
|
+
export { AlertIcon, CHECKBOX_SVG_STRING, DownArrowIcon, icons_CheckIcon as CheckIcon, icons_CircleIcon as CircleIcon };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import "./constants.js";
|
|
2
|
+
import { CtaTypeEnum, LocationEnum, ContentAnimationTypeEnum, ContentVariationTypeEnum } from "../../../../src/graphql-types.js";
|
|
3
|
+
import { _extends } from "../../../../js/4101.js";
|
|
4
|
+
import { createTypeGuard } from "../utils/createTypeGuard.js";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
// https://stackoverflow.com/a/11381730
|
|
11
|
+
function isMobile() {
|
|
12
|
+
let check = false;
|
|
13
|
+
(function(a) {
|
|
14
|
+
if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a) || // eslint-disable-next-line no-useless-escape
|
|
15
|
+
/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))) check = true;
|
|
16
|
+
})(navigator.userAgent || navigator.vendor || window.opera);
|
|
17
|
+
return check;
|
|
18
|
+
}
|
|
19
|
+
function isMobileResolution() {
|
|
20
|
+
return window.innerWidth <= (/* inlined export .MOBILE_THRESHOLD */540);
|
|
21
|
+
}
|
|
22
|
+
function toHTMLElement(str) {
|
|
23
|
+
const div = document.createElement("div");
|
|
24
|
+
div.innerHTML = str.trim();
|
|
25
|
+
if (div.children.length !== 1) {
|
|
26
|
+
throw new Error("Expected a single element");
|
|
27
|
+
}
|
|
28
|
+
return div.firstChild;
|
|
29
|
+
}
|
|
30
|
+
function toStyleElement(str) {
|
|
31
|
+
const style = document.createElement("style");
|
|
32
|
+
style.innerHTML = str.trim();
|
|
33
|
+
return style;
|
|
34
|
+
}
|
|
35
|
+
function getHeight(element) {
|
|
36
|
+
if (document.body.contains(element)) {
|
|
37
|
+
return element.offsetHeight;
|
|
38
|
+
}
|
|
39
|
+
const clone = element.cloneNode(true);
|
|
40
|
+
clone.style.visibility = "hidden";
|
|
41
|
+
clone.style.position = "absolute";
|
|
42
|
+
clone.style.top = "-9999px";
|
|
43
|
+
clone.style.left = "-9999px";
|
|
44
|
+
document.body.appendChild(clone);
|
|
45
|
+
const height = clone.offsetHeight;
|
|
46
|
+
clone.remove();
|
|
47
|
+
return height;
|
|
48
|
+
}
|
|
49
|
+
function generateElementId(name, offerId) {
|
|
50
|
+
return "_qualified-offer-" + name + "-" + offerId;
|
|
51
|
+
}
|
|
52
|
+
function getHostId(offerId) {
|
|
53
|
+
return generateElementId("host", offerId);
|
|
54
|
+
}
|
|
55
|
+
function getDismissButtonId(offerId) {
|
|
56
|
+
return generateElementId("dismiss-button", offerId);
|
|
57
|
+
}
|
|
58
|
+
function getFormId(offerId) {
|
|
59
|
+
return generateElementId("form", offerId);
|
|
60
|
+
}
|
|
61
|
+
function getRootId(offerId) {
|
|
62
|
+
return generateElementId("root", offerId);
|
|
63
|
+
}
|
|
64
|
+
function getCtaButtonId(offerId) {
|
|
65
|
+
return generateElementId("cta-button", offerId);
|
|
66
|
+
}
|
|
67
|
+
function getFormInputId(offerId) {
|
|
68
|
+
return generateElementId("form-input", offerId);
|
|
69
|
+
}
|
|
70
|
+
function getFollowupQuestionsOfferId(offerId) {
|
|
71
|
+
return generateElementId("followup-questions", offerId);
|
|
72
|
+
}
|
|
73
|
+
function getPrivacyDisclosureTooltipId(offerId) {
|
|
74
|
+
return generateElementId("privacy-disclosure-tooltip", offerId);
|
|
75
|
+
}
|
|
76
|
+
function getPrivacyDisclosureTooltipTargetId(offerId) {
|
|
77
|
+
return generateElementId("privacy-disclosure-tooltip-target", offerId);
|
|
78
|
+
}
|
|
79
|
+
function getHeadlineId(offerId) {
|
|
80
|
+
return generateElementId("headline", offerId);
|
|
81
|
+
}
|
|
82
|
+
function toFollowupQuestionsOffer(offer) {
|
|
83
|
+
if (offer.currentVersion.ctaType !== CtaTypeEnum.Form || offer.currentVersion.location !== LocationEnum.Header && offer.currentVersion.location !== LocationEnum.Footer) {
|
|
84
|
+
return offer;
|
|
85
|
+
}
|
|
86
|
+
return _extends({}, offer, {
|
|
87
|
+
currentVersion: _extends({}, offer.currentVersion, {
|
|
88
|
+
location: LocationEnum.Popup,
|
|
89
|
+
content: _extends({}, offer.currentVersion.content, {
|
|
90
|
+
variation: _extends({}, offer.currentVersion.content.variation, {
|
|
91
|
+
__typename: "ContentVariationHeadlineBodyForm",
|
|
92
|
+
type: ContentVariationTypeEnum.HeadlineBodyForm,
|
|
93
|
+
bodyStyle: offer.currentVersion.content.variation.headlineStyle
|
|
94
|
+
}),
|
|
95
|
+
animation: {
|
|
96
|
+
type: ContentAnimationTypeEnum.FadeIn
|
|
97
|
+
}
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
const { HeadlineButton: HeadlineButton, HeadlineLink: HeadlineLink, HeadlineBodyButton: HeadlineBodyButton, HeadlineForm: HeadlineForm, HeadlineBodyForm: HeadlineBodyForm } = ContentVariationTypeEnum;
|
|
103
|
+
const isHeadlineButton = createTypeGuard()(HeadlineButton);
|
|
104
|
+
const isHeadlineForm = createTypeGuard()(HeadlineForm);
|
|
105
|
+
const isHeadlineLink = createTypeGuard()(HeadlineLink);
|
|
106
|
+
const isHeadlineBodyButton = createTypeGuard()(HeadlineBodyButton);
|
|
107
|
+
const isHeadlineBodyForm = createTypeGuard()(HeadlineBodyForm);
|
|
108
|
+
|
|
109
|
+
var utils_generateElementId = /* unused export */ undefined;
|
|
110
|
+
var utils_getFollowupQuestionsOfferId = /* unused export */ undefined;
|
|
111
|
+
var utils_getFormInputId = /* unused export */ undefined;
|
|
112
|
+
var utils_getHeight = /* unused export */ undefined;
|
|
113
|
+
var utils_getRootId = /* unused export */ undefined;
|
|
114
|
+
var utils_toStyleElement = /* unused export */ undefined;
|
|
115
|
+
export { getCtaButtonId, getDismissButtonId, getFormId, getHeadlineId, getHostId, getPrivacyDisclosureTooltipId, getPrivacyDisclosureTooltipTargetId, isHeadlineBodyButton, isHeadlineBodyForm, isHeadlineButton, isHeadlineForm, isHeadlineLink, isMobile, isMobileResolution, toFollowupQuestionsOffer, toHTMLElement, utils_generateElementId as generateElementId, utils_getFollowupQuestionsOfferId as getFollowupQuestionsOfferId, utils_getFormInputId as getFormInputId, utils_getHeight as getHeight, utils_getRootId as getRootId, utils_toStyleElement as toStyleElement };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* Creates a typeguard function to discriminate a union type
|
|
4
|
+
*/ function createTypeGuard() {
|
|
5
|
+
return function(type) {
|
|
6
|
+
return function(value) {
|
|
7
|
+
return value.type === type;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function createTypedFactory() {
|
|
12
|
+
return function(factories) {
|
|
13
|
+
return function(type, from, themeStyles) {
|
|
14
|
+
if (from === void 0) from = {};
|
|
15
|
+
if (themeStyles === void 0) themeStyles = undefined;
|
|
16
|
+
const baseValue = factories.base(themeStyles);
|
|
17
|
+
const defaultValue = factories[type](themeStyles);
|
|
18
|
+
if (!defaultValue) {
|
|
19
|
+
return defaultValue;
|
|
20
|
+
}
|
|
21
|
+
const defaultType = defaultValue.type;
|
|
22
|
+
const defaultTypename = defaultType.__typename;
|
|
23
|
+
return _extends({}, baseValue, defaultValue, from, {
|
|
24
|
+
type: defaultType,
|
|
25
|
+
__typename: defaultTypename
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
var createTypeGuard_createTypedFactory = /* unused export */ undefined;
|
|
32
|
+
export { createTypeGuard, createTypeGuard_createTypedFactory as createTypedFactory };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function queue() {
|
|
2
|
+
for(var _len = arguments.length, tasks = new Array(_len), _key = 0; _key < _len; _key++){
|
|
3
|
+
tasks[_key] = arguments[_key];
|
|
4
|
+
}
|
|
5
|
+
let isCancelled = false;
|
|
6
|
+
const handle = {
|
|
7
|
+
cancel: ()=>isCancelled = true,
|
|
8
|
+
run: async ()=>{
|
|
9
|
+
for (const task of tasks){
|
|
10
|
+
if (isCancelled) return;
|
|
11
|
+
const result = task();
|
|
12
|
+
if (result instanceof Promise) {
|
|
13
|
+
// eslint-disable-next-line no-await-in-loop
|
|
14
|
+
await result;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
return handle;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { queue };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function getDefaultQualifiedFormConfig() {
|
|
2
|
+
return {
|
|
3
|
+
validateBusinessEmail: false,
|
|
4
|
+
emailField: getDefaultQualifiedFormEmailField(),
|
|
5
|
+
assetUrl: "",
|
|
6
|
+
additionalFields: []
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function getDefaultQualifiedFormEmailField() {
|
|
10
|
+
return {
|
|
11
|
+
type: "email",
|
|
12
|
+
label: "Email",
|
|
13
|
+
placeholder: "Business email"
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
var storeHelpers_getDefaultQualifiedFormEmailField = /* unused export */ undefined;
|
|
18
|
+
export { getDefaultQualifiedFormConfig, storeHelpers_getDefaultQualifiedFormEmailField as getDefaultQualifiedFormEmailField };
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/src/arrays.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Like Array.prototype.forEach, but wraps the callback in a try-catch and returns an array of any
|
|
2
|
+
// errors.
|
|
3
|
+
function forEachCatchErrors(array, callback) {
|
|
4
|
+
const errors = [];
|
|
5
|
+
for(let i = 0; i < array.length; i++){
|
|
6
|
+
try {
|
|
7
|
+
callback(array[i], i, array);
|
|
8
|
+
} catch (error) {
|
|
9
|
+
errors.push(error);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return errors;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { forEachCatchErrors };
|
package/src/audio.js
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { __webpack_require__ } from "../js/runtime.js";
|
|
2
|
+
import "../js/multimodal_v2.js";
|
|
3
|
+
import "./timing.js";
|
|
4
|
+
import { captureMessage } from "../js/4101.js";
|
|
5
|
+
|
|
6
|
+
__webpack_require__("72639");
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
const cache = new Map();
|
|
11
|
+
const playAudio = (sound, context)=>{
|
|
12
|
+
if (window.Audio) {
|
|
13
|
+
const handleError = (e)=>{
|
|
14
|
+
if (e instanceof DOMException) {
|
|
15
|
+
// Browser blocked autoplay — capture so we can measure how often this
|
|
16
|
+
// silently prevents notification sounds from reaching reps.
|
|
17
|
+
captureMessage("playAudio: autoplay blocked", {
|
|
18
|
+
level: "warning",
|
|
19
|
+
tags: {
|
|
20
|
+
"team.id": context == null ? void 0 : context.teamId,
|
|
21
|
+
error_name: e.name
|
|
22
|
+
},
|
|
23
|
+
extra: {
|
|
24
|
+
"user.id": context == null ? void 0 : context.userId,
|
|
25
|
+
sound
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
} else {
|
|
29
|
+
throw e;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
try {
|
|
33
|
+
var _audio_play;
|
|
34
|
+
let audio = cache.get(sound);
|
|
35
|
+
if (!audio) {
|
|
36
|
+
audio = new Audio(sound);
|
|
37
|
+
cache.set(sound, audio);
|
|
38
|
+
}
|
|
39
|
+
// Play returns undefined in IE11
|
|
40
|
+
audio.currentTime = 0;
|
|
41
|
+
(_audio_play = audio.play()) == null ? void 0 : _audio_play.catch(handleError);
|
|
42
|
+
} catch (e) {
|
|
43
|
+
handleError(e);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
// Chrome loads voices asynchronously when window.speechSynthesis is first referenced.
|
|
48
|
+
// This prevents the first utterance from being in the default voice.
|
|
49
|
+
window.speechSynthesis;
|
|
50
|
+
const utteranceQueue = (/* unused pure expression or super */ null && ([])), synth = window.speechSynthesis;
|
|
51
|
+
let voice = null, synthSpeaking = false;
|
|
52
|
+
// Runs through every utterance in the queue, speaks the utterance, and then
|
|
53
|
+
// cancels any hanging utterances in case any of them got stuck in a state
|
|
54
|
+
// where synthSpeaking equals true
|
|
55
|
+
const runUtteranceQueue = ()=>{
|
|
56
|
+
if (utteranceQueue.length && !synthSpeaking) {
|
|
57
|
+
const utterance = utteranceQueue.shift();
|
|
58
|
+
if (voice) {
|
|
59
|
+
// use Chrome-only voice if possible
|
|
60
|
+
utterance.voice = voice;
|
|
61
|
+
}
|
|
62
|
+
// There's a Chrome bug where non-native voices time out after 15 seconds.
|
|
63
|
+
// https://stackoverflow.com/questions/42875726/speechsynthesis-speak-in-web-speech-api-always-stops-after-a-few-seconds-in-go
|
|
64
|
+
// Periodically calling window.speechSynthesis.resume while the
|
|
65
|
+
// utterance is being spoken, seems to prevent it from timing out.
|
|
66
|
+
// https://stackoverflow.com/a/40508243
|
|
67
|
+
let resumeDisposer;
|
|
68
|
+
utterance.onstart = ()=>{
|
|
69
|
+
resumeDisposer = every(10000, ()=>{
|
|
70
|
+
synth.resume();
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
// cancelHangingUtterance is called either when the utterance is finished
|
|
74
|
+
// or when 30 seconds has elapsed, whichever event happens first
|
|
75
|
+
const cancelHangingUtterance = _once(()=>{
|
|
76
|
+
// If the utterance could not be spoken, then utterance.onstart will not
|
|
77
|
+
// get called, and resumeDisposer will be undefined
|
|
78
|
+
resumeDisposer == null ? void 0 : resumeDisposer();
|
|
79
|
+
synth.cancel();
|
|
80
|
+
synthSpeaking = false;
|
|
81
|
+
if (utteranceQueue.length) {
|
|
82
|
+
after(0, runUtteranceQueue);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
utterance.onend = cancelHangingUtterance;
|
|
86
|
+
after(30000, cancelHangingUtterance);
|
|
87
|
+
synthSpeaking = true;
|
|
88
|
+
synth.speak(utterance);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const playVoice = (text)=>{
|
|
92
|
+
if (synth && window.SpeechSynthesisUtterance && text) {
|
|
93
|
+
// Initialize voice the first time playVoice is called
|
|
94
|
+
if (voice === null) {
|
|
95
|
+
voice = synth.getVoices().find((v)=>v.name === "Google US English") || null;
|
|
96
|
+
}
|
|
97
|
+
const utterance = new SpeechSynthesisUtterance(text);
|
|
98
|
+
utteranceQueue.push(utterance);
|
|
99
|
+
if (utteranceQueue.length === 1) {
|
|
100
|
+
runUtteranceQueue();
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
var audio_playVoice = /* unused export */ undefined;
|
|
106
|
+
export { audio_playVoice as playVoice, playAudio };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
class BoundedSet extends Set {
|
|
2
|
+
add(value) {
|
|
3
|
+
if (!this.has(value) && this.maxSize > 0 && this.size >= this.maxSize) {
|
|
4
|
+
const oldestEntry = this.values().next().value;
|
|
5
|
+
if (oldestEntry !== undefined) {
|
|
6
|
+
this.delete(oldestEntry);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
return super.add(value);
|
|
10
|
+
}
|
|
11
|
+
constructor(maxSize){
|
|
12
|
+
super(), this.maxSize = maxSize;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { BoundedSet };
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { __webpack_require__ } from "../js/runtime.js";
|
|
2
|
+
import "../widget/utils/native_globals.js";
|
|
3
|
+
import { iterRoots } from "./dom_roots.js";
|
|
4
|
+
|
|
5
|
+
/* provided dependency */ var __nativeWindowAddEventListener = __webpack_require__(68034).zh;
|
|
6
|
+
/* provided dependency */ var __nativeWindowRemoveEventListener = __webpack_require__(68034).kZ;
|
|
7
|
+
/* provided dependency */ var cancelAnimationFrame = __webpack_require__(68034).pP;
|
|
8
|
+
/* provided dependency */ var requestAnimationFrame = __webpack_require__(68034).gj;
|
|
9
|
+
|
|
10
|
+
// Max gap (CSS px) tolerated when matching an element's edge to an ancestor's;
|
|
11
|
+
// sub-pixel rounding means flush edges rarely line up exactly.
|
|
12
|
+
const ALIGNMENT_TOLERANCE = 1;
|
|
13
|
+
/**
|
|
14
|
+
* Watches the first `selector` element and reports its `DOMRect` (or that of a
|
|
15
|
+
* flush valid ancestor) to `onBBoxChange` on resize/scroll/click/transition/
|
|
16
|
+
* animation. Validity is re-evaluated on every measure: when the observed
|
|
17
|
+
* element (or an aligned ancestor) is not currently accepted by `isValid`,
|
|
18
|
+
* `onBBoxChange(null)` is reported. Searches open shadow roots; `start()` is
|
|
19
|
+
* retryable and re-locates if the observed element has since been detached.
|
|
20
|
+
*/ class BoundingBoxObserver {
|
|
21
|
+
start() {
|
|
22
|
+
// Recover from the observed element being detached (e.g. an SPA unmounting
|
|
23
|
+
// and remounting the header): stop the stale watch so we can re-locate.
|
|
24
|
+
if (this.running) {
|
|
25
|
+
var _this_element;
|
|
26
|
+
if ((_this_element = this.element) == null ? void 0 : _this_element.isConnected) return;
|
|
27
|
+
this.stop();
|
|
28
|
+
}
|
|
29
|
+
const element = this.locate();
|
|
30
|
+
if (!element) return;
|
|
31
|
+
this.running = true;
|
|
32
|
+
this.element = element;
|
|
33
|
+
this.resizeObserver = new ResizeObserver(this.scheduleRecompute);
|
|
34
|
+
this.resizeObserver.observe(element);
|
|
35
|
+
__nativeWindowAddEventListener("resize", this.scheduleRecompute);
|
|
36
|
+
__nativeWindowAddEventListener("scroll", this.scheduleRecompute, {
|
|
37
|
+
capture: true,
|
|
38
|
+
passive: true
|
|
39
|
+
});
|
|
40
|
+
__nativeWindowAddEventListener("click", this.scheduleRecompute, {
|
|
41
|
+
capture: true,
|
|
42
|
+
passive: true
|
|
43
|
+
});
|
|
44
|
+
element.addEventListener("transitionend", this.scheduleRecompute);
|
|
45
|
+
element.addEventListener("animationend", this.scheduleRecompute);
|
|
46
|
+
this.recompute();
|
|
47
|
+
}
|
|
48
|
+
stop() {
|
|
49
|
+
var _this_resizeObserver, _this_element, _this_element1;
|
|
50
|
+
if (!this.running) return;
|
|
51
|
+
this.running = false;
|
|
52
|
+
(_this_resizeObserver = this.resizeObserver) == null ? void 0 : _this_resizeObserver.disconnect();
|
|
53
|
+
this.resizeObserver = null;
|
|
54
|
+
__nativeWindowRemoveEventListener("resize", this.scheduleRecompute);
|
|
55
|
+
__nativeWindowRemoveEventListener("scroll", this.scheduleRecompute, {
|
|
56
|
+
capture: true
|
|
57
|
+
});
|
|
58
|
+
__nativeWindowRemoveEventListener("click", this.scheduleRecompute, {
|
|
59
|
+
capture: true
|
|
60
|
+
});
|
|
61
|
+
(_this_element = this.element) == null ? void 0 : _this_element.removeEventListener("transitionend", this.scheduleRecompute);
|
|
62
|
+
(_this_element1 = this.element) == null ? void 0 : _this_element1.removeEventListener("animationend", this.scheduleRecompute);
|
|
63
|
+
if (this.rafId !== null) {
|
|
64
|
+
cancelAnimationFrame(this.rafId);
|
|
65
|
+
this.rafId = null;
|
|
66
|
+
}
|
|
67
|
+
this.element = null;
|
|
68
|
+
this.onBBoxChange(null);
|
|
69
|
+
}
|
|
70
|
+
// Locates the element to observe structurally (first `selector` match). Does
|
|
71
|
+
// NOT consult `isValid`: validity is a runtime property re-evaluated on every
|
|
72
|
+
// measure in `recompute`, not a fixed condition of which element to watch.
|
|
73
|
+
locate() {
|
|
74
|
+
for (const root of iterRoots(document, this.skipShadowRoot)){
|
|
75
|
+
const candidate = root.querySelector(this.selector);
|
|
76
|
+
if (candidate) return candidate;
|
|
77
|
+
}
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
// Returns `el` if valid, else the nearest valid ancestor sharing its observed
|
|
81
|
+
// edge (a static element wrapped in a valid container), or null.
|
|
82
|
+
resolveValidElement(el) {
|
|
83
|
+
if (this.isValid(el)) return el;
|
|
84
|
+
const value = el.getBoundingClientRect()[this.property];
|
|
85
|
+
for(let ancestor = el.parentElement; ancestor; ancestor = ancestor.parentElement){
|
|
86
|
+
if (this.isValid(ancestor) && Math.abs(ancestor.getBoundingClientRect()[this.property] - value) <= ALIGNMENT_TOLERANCE) {
|
|
87
|
+
return ancestor;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
constructor(options){
|
|
93
|
+
var _options_isValid;
|
|
94
|
+
this.running = false;
|
|
95
|
+
this.element = null;
|
|
96
|
+
this.resizeObserver = null;
|
|
97
|
+
this.rafId = null;
|
|
98
|
+
this.scheduleRecompute = ()=>{
|
|
99
|
+
if (this.rafId !== null) return;
|
|
100
|
+
this.rafId = requestAnimationFrame(this.recompute);
|
|
101
|
+
};
|
|
102
|
+
this.recompute = ()=>{
|
|
103
|
+
this.rafId = null;
|
|
104
|
+
if (!this.running || !this.element) return;
|
|
105
|
+
// The element was detached (e.g. header removed); clear and stop so a later
|
|
106
|
+
// start() can latch onto its replacement rather than reporting a stale box.
|
|
107
|
+
if (!this.element.isConnected) {
|
|
108
|
+
this.stop();
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
// Re-check validity every measure: `isValid` can be scroll-dependent (e.g. a
|
|
112
|
+
// sticky header only counts while pinned to the top), so an element valid at
|
|
113
|
+
// locate time may not be now. Report null when nothing valid resolves.
|
|
114
|
+
const resolved = this.resolveValidElement(this.element);
|
|
115
|
+
if (!resolved) {
|
|
116
|
+
this.onBBoxChange(null);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
this.onBBoxChange(resolved.getBoundingClientRect());
|
|
120
|
+
};
|
|
121
|
+
this.selector = options.selector;
|
|
122
|
+
this.property = options.property;
|
|
123
|
+
this.onBBoxChange = options.onBBoxChange;
|
|
124
|
+
this.isValid = (_options_isValid = options.isValid) != null ? _options_isValid : ()=>true;
|
|
125
|
+
this.skipShadowRoot = options.skipShadowRoot;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export { BoundingBoxObserver };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Create a property decorator that can accept options
|
|
2
|
+
//
|
|
3
|
+
// Provide a single callback that takes: options, target, property, descriptor
|
|
4
|
+
//
|
|
5
|
+
const createPropertyDecorator = (callback)=>function() {
|
|
6
|
+
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
7
|
+
args[_key] = arguments[_key];
|
|
8
|
+
}
|
|
9
|
+
// Support both usages:
|
|
10
|
+
// - @decorator on a class field/method (descriptor may be undefined under SWC legacy)
|
|
11
|
+
// - @decorator(options) on a class field/method
|
|
12
|
+
const isPropertyDecorator = args.length >= 2 && (typeof args[1] === "string" || typeof args[1] === "symbol");
|
|
13
|
+
if (isPropertyDecorator) {
|
|
14
|
+
const [target, property] = args;
|
|
15
|
+
let descriptor = args[2];
|
|
16
|
+
if (!descriptor) descriptor = {};
|
|
17
|
+
const result = callback(undefined, target, property, descriptor);
|
|
18
|
+
return result || descriptor;
|
|
19
|
+
}
|
|
20
|
+
// Options invocation: (options) -> (target, property, descriptor)
|
|
21
|
+
const [options] = args;
|
|
22
|
+
return (target, property, descriptor)=>{
|
|
23
|
+
if (!descriptor) descriptor = {};
|
|
24
|
+
const result = callback(options, target, property, descriptor);
|
|
25
|
+
return result || descriptor;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { createPropertyDecorator };
|