@ada-support/embed2 1.1.8 → 1.1.9
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.
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
import type { StartOptions } from "@ada-support/embed-types";
|
|
2
|
-
import { h } from "preact";
|
|
2
|
+
import { Component, h } from "preact";
|
|
3
3
|
import type { MessageService } from "client/lib/message-service";
|
|
4
4
|
import type { StoreProxy } from "client/lib/store-proxy";
|
|
5
|
-
import type {
|
|
5
|
+
import type { FrameChannel } from "common/lib/fc";
|
|
6
|
+
import type { CreateNotificationPayload, MessagePayload } from "common/types/events";
|
|
7
|
+
import type { StoreState } from "common/types/store-state";
|
|
8
|
+
interface PropsFromState {
|
|
9
|
+
handle: StoreState["handle"];
|
|
10
|
+
domain: StoreState["domain"];
|
|
11
|
+
cluster: StoreState["cluster"];
|
|
12
|
+
isDrawerOpen: boolean;
|
|
13
|
+
greeting: StoreState["greeting"];
|
|
14
|
+
language: StoreState["language"];
|
|
15
|
+
wasIntroShown: boolean;
|
|
16
|
+
parentElement: StoreState["parentElement"];
|
|
17
|
+
privateMode: StoreState["privateMode"];
|
|
18
|
+
testMode: StoreState["testMode"];
|
|
19
|
+
client: StoreState["client"];
|
|
20
|
+
chatDimensions: StoreState["chatDimensions"];
|
|
21
|
+
drawerHasBeenOpened: StoreState["drawerHasBeenOpened"];
|
|
22
|
+
}
|
|
6
23
|
interface OwnProps {
|
|
7
|
-
name: Module;
|
|
8
24
|
adaSettings: StartOptions;
|
|
9
25
|
store: StoreProxy;
|
|
10
26
|
messageService: MessageService;
|
|
@@ -12,5 +28,54 @@ interface OwnProps {
|
|
|
12
28
|
resetChat: () => void;
|
|
13
29
|
skipGreeting: boolean;
|
|
14
30
|
}
|
|
31
|
+
interface PropsFromDispatch {
|
|
32
|
+
setConnectionState: (payload: MessagePayload) => Promise<StoreState>;
|
|
33
|
+
setState: (payload: Partial<StoreState>) => Promise<StoreState>;
|
|
34
|
+
toggleChat: () => Promise<StoreState>;
|
|
35
|
+
}
|
|
36
|
+
declare type ChatFrameProps = PropsFromState & OwnProps & PropsFromDispatch;
|
|
37
|
+
interface ChatFrameState {
|
|
38
|
+
isMounted: boolean;
|
|
39
|
+
closeTransitionTime: number;
|
|
40
|
+
}
|
|
41
|
+
export declare class ChatFrame extends Component<ChatFrameProps, ChatFrameState> {
|
|
42
|
+
iframeRef: import("preact").RefObject<any>;
|
|
43
|
+
pageYOffset: number;
|
|
44
|
+
documentBodyOverflow: string;
|
|
45
|
+
documentBodyPosition: string;
|
|
46
|
+
documentBodyTop: string;
|
|
47
|
+
documentBodyBottom: string;
|
|
48
|
+
documentBodyLeft: string;
|
|
49
|
+
documentBodyRight: string;
|
|
50
|
+
channel?: FrameChannel;
|
|
51
|
+
chatRenderTimeout?: number;
|
|
52
|
+
state: ChatFrameState;
|
|
53
|
+
componentDidMount(): void;
|
|
54
|
+
componentDidUpdate(prevProps: ChatFrameProps): void;
|
|
55
|
+
componentWillUnmount(): void;
|
|
56
|
+
get darkMode(): boolean;
|
|
57
|
+
getIframeSrc(): string;
|
|
58
|
+
get styles(): string;
|
|
59
|
+
get hasVisibleProactiveMessages(): boolean;
|
|
60
|
+
get visibleProactiveStyles(): string;
|
|
61
|
+
static get parentElementStyles(): string;
|
|
62
|
+
get chooseStyles(): string;
|
|
63
|
+
handleScrollLock(): void;
|
|
64
|
+
/**
|
|
65
|
+
* Lock the document body from scrolling. If we don't do this,
|
|
66
|
+
* there are SERIOUS issues on iOS.
|
|
67
|
+
*/
|
|
68
|
+
lockDocumentBodyFromScrolling(): void;
|
|
69
|
+
/**
|
|
70
|
+
* Set back initial values from client document body
|
|
71
|
+
*/
|
|
72
|
+
unlockDocumentBodyFromScrolling(): void;
|
|
73
|
+
notificationOnClickHandler(isChatOpen: boolean): void;
|
|
74
|
+
handleNotifications(payload: CreateNotificationPayload): void;
|
|
75
|
+
handleChatEvent(type: string, payload: unknown, id?: string): Promise<void>;
|
|
76
|
+
bindChatEventHandlers(): void;
|
|
77
|
+
frameLoaded(): void;
|
|
78
|
+
render(): h.JSX.Element;
|
|
79
|
+
}
|
|
15
80
|
declare const _default: (ownProps: OwnProps) => h.JSX.Element;
|
|
16
81
|
export default _default;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { h } from "preact";
|
|
2
2
|
import type { MessageService } from "client/lib/message-service";
|
|
3
3
|
import type { StoreProxy } from "client/lib/store-proxy";
|
|
4
|
-
import type { Module } from "common/types/modules";
|
|
5
4
|
interface OwnProps {
|
|
6
|
-
name:
|
|
5
|
+
name: "button" | "x-storage" | "intro" | "drawer-mask";
|
|
7
6
|
roleDescription?: string;
|
|
8
7
|
styles: string;
|
|
9
8
|
store: StoreProxy;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
interface GetEmbedUrlParams {
|
|
2
|
-
frameName:
|
|
2
|
+
frameName: "button" | "x-storage" | "intro" | "drawer-mask";
|
|
3
3
|
handle: string;
|
|
4
4
|
cluster?: string;
|
|
5
5
|
domain?: string;
|
|
6
6
|
}
|
|
7
7
|
export interface CSInterface {
|
|
8
|
-
name:
|
|
8
|
+
name: "api" | "chat";
|
|
9
9
|
handle: string;
|
|
10
10
|
cluster?: string;
|
|
11
11
|
domain?: string;
|
package/dist/npm-entry/index.js
CHANGED
|
@@ -8798,7 +8798,7 @@ var client = new error_tracker_BrowserClient({
|
|
|
8798
8798
|
return event;
|
|
8799
8799
|
},
|
|
8800
8800
|
environment: "production",
|
|
8801
|
-
release: "1.1.
|
|
8801
|
+
release: "1.1.9-c54a4e9",
|
|
8802
8802
|
sampleRate: 0.25,
|
|
8803
8803
|
autoSessionTracking: false,
|
|
8804
8804
|
// Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
|
|
@@ -9500,7 +9500,7 @@ function getEmbedURL(_ref) {
|
|
|
9500
9500
|
polyfillVersionString = "legacy";
|
|
9501
9501
|
}
|
|
9502
9502
|
|
|
9503
|
-
return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "
|
|
9503
|
+
return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "c54a4e9", "/index.html");
|
|
9504
9504
|
}
|
|
9505
9505
|
/**
|
|
9506
9506
|
* Generate the Chat / API URL
|
|
@@ -11604,7 +11604,6 @@ function ChatFrame_isNativeReflectConstruct() { if (typeof Reflect === "undefine
|
|
|
11604
11604
|
|
|
11605
11605
|
|
|
11606
11606
|
var documentBodyStyle = window.document.body.style;
|
|
11607
|
-
|
|
11608
11607
|
var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
11609
11608
|
(0,inherits/* default */.Z)(ChatFrame, _Component);
|
|
11610
11609
|
|
|
@@ -11639,8 +11638,6 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11639
11638
|
|
|
11640
11639
|
(0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), "documentBodyRight", documentBodyStyle.right);
|
|
11641
11640
|
|
|
11642
|
-
(0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), "url", _this.getURL);
|
|
11643
|
-
|
|
11644
11641
|
(0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), "channel", void 0);
|
|
11645
11642
|
|
|
11646
11643
|
(0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), "chatRenderTimeout", void 0);
|
|
@@ -11661,13 +11658,12 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11661
11658
|
var _this$props = this.props,
|
|
11662
11659
|
adaSettings = _this$props.adaSettings,
|
|
11663
11660
|
handle = _this$props.handle,
|
|
11664
|
-
name = _this$props.name,
|
|
11665
11661
|
setChatHasBeenRendered = _this$props.setChatHasBeenRendered,
|
|
11666
11662
|
messageService = _this$props.messageService,
|
|
11667
11663
|
store = _this$props.store;
|
|
11668
11664
|
setChatHasBeenRendered();
|
|
11669
|
-
this.channel = messageService.registerFrameChannel(
|
|
11670
|
-
store.addChannelListener(
|
|
11665
|
+
this.channel = messageService.registerFrameChannel("chat", this.iframeRef.current.contentWindow, this.iframeRef.current.src);
|
|
11666
|
+
store.addChannelListener("chat");
|
|
11671
11667
|
this.bindChatEventHandlers();
|
|
11672
11668
|
this.handleScrollLock(); // We use this log to track number of chat impressions (times when users see chat iFrame render first time).
|
|
11673
11669
|
|
|
@@ -11694,10 +11690,8 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11694
11690
|
}, {
|
|
11695
11691
|
key: "componentWillUnmount",
|
|
11696
11692
|
value: function componentWillUnmount() {
|
|
11697
|
-
var
|
|
11698
|
-
|
|
11699
|
-
name = _this$props2.name;
|
|
11700
|
-
messageService.unregisterChannel(name);
|
|
11693
|
+
var messageService = this.props.messageService;
|
|
11694
|
+
messageService.unregisterChannel("chat");
|
|
11701
11695
|
}
|
|
11702
11696
|
}, {
|
|
11703
11697
|
key: "darkMode",
|
|
@@ -11714,36 +11708,32 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11714
11708
|
var systemDarkMode = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
11715
11709
|
return theme === "dark" || theme === "auto" && systemDarkMode;
|
|
11716
11710
|
}
|
|
11717
|
-
/**
|
|
11718
|
-
* @override
|
|
11719
|
-
*/
|
|
11720
|
-
|
|
11721
11711
|
}, {
|
|
11722
|
-
key: "
|
|
11723
|
-
|
|
11724
|
-
var _this$
|
|
11725
|
-
|
|
11726
|
-
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
|
|
11731
|
-
|
|
11732
|
-
|
|
11733
|
-
|
|
11734
|
-
|
|
11735
|
-
adaSettings = _this$props3.adaSettings;
|
|
11712
|
+
key: "getIframeSrc",
|
|
11713
|
+
value: function getIframeSrc() {
|
|
11714
|
+
var _this$props2 = this.props,
|
|
11715
|
+
handle = _this$props2.handle,
|
|
11716
|
+
domain = _this$props2.domain,
|
|
11717
|
+
cluster = _this$props2.cluster,
|
|
11718
|
+
greeting = _this$props2.greeting,
|
|
11719
|
+
language = _this$props2.language,
|
|
11720
|
+
skipGreeting = _this$props2.skipGreeting,
|
|
11721
|
+
wasIntroShown = _this$props2.wasIntroShown,
|
|
11722
|
+
privateMode = _this$props2.privateMode,
|
|
11723
|
+
testMode = _this$props2.testMode,
|
|
11724
|
+
adaSettings = _this$props2.adaSettings;
|
|
11736
11725
|
|
|
11737
11726
|
if (!handle) {
|
|
11738
11727
|
throw new errors/* AdaEmbedError */.S("`handle` is not defined");
|
|
11739
11728
|
}
|
|
11740
11729
|
|
|
11741
11730
|
return getURL({
|
|
11742
|
-
name:
|
|
11731
|
+
name: "chat",
|
|
11743
11732
|
handle: handle,
|
|
11744
11733
|
cluster: cluster,
|
|
11745
11734
|
domain: domain,
|
|
11746
11735
|
qp: {
|
|
11736
|
+
embedVersion: slice_default()("c54a4e9").call("c54a4e9", 0, 7),
|
|
11747
11737
|
greeting: greeting,
|
|
11748
11738
|
language: language,
|
|
11749
11739
|
skipGreeting: skipGreeting,
|
|
@@ -11760,11 +11750,11 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11760
11750
|
get: function get() {
|
|
11761
11751
|
var _client$ui_settings2, _client$ui_settings2$, _context10, _context11, _context12, _context13, _context14;
|
|
11762
11752
|
|
|
11763
|
-
var _this$
|
|
11764
|
-
isDrawerOpen = _this$
|
|
11765
|
-
client = _this$
|
|
11766
|
-
testMode = _this$
|
|
11767
|
-
adaSettings = _this$
|
|
11753
|
+
var _this$props3 = this.props,
|
|
11754
|
+
isDrawerOpen = _this$props3.isDrawerOpen,
|
|
11755
|
+
client = _this$props3.client,
|
|
11756
|
+
testMode = _this$props3.testMode,
|
|
11757
|
+
adaSettings = _this$props3.adaSettings;
|
|
11768
11758
|
|
|
11769
11759
|
if (!client) {
|
|
11770
11760
|
return "";
|
|
@@ -11801,10 +11791,10 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11801
11791
|
get: function get() {
|
|
11802
11792
|
var _client$ui_settings3, _client$ui_settings3$, _context15, _context16, _context17;
|
|
11803
11793
|
|
|
11804
|
-
var _this$
|
|
11805
|
-
chatDimensions = _this$
|
|
11806
|
-
client = _this$
|
|
11807
|
-
adaSettings = _this$
|
|
11794
|
+
var _this$props4 = this.props,
|
|
11795
|
+
chatDimensions = _this$props4.chatDimensions,
|
|
11796
|
+
client = _this$props4.client,
|
|
11797
|
+
adaSettings = _this$props4.adaSettings;
|
|
11808
11798
|
|
|
11809
11799
|
if (!(client !== null && client !== void 0 && client.chat_button)) {
|
|
11810
11800
|
return "";
|
|
@@ -11820,11 +11810,11 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11820
11810
|
}, {
|
|
11821
11811
|
key: "chooseStyles",
|
|
11822
11812
|
get: function get() {
|
|
11823
|
-
var _this$
|
|
11824
|
-
parentElement = _this$
|
|
11825
|
-
client = _this$
|
|
11826
|
-
isDrawerOpen = _this$
|
|
11827
|
-
drawerHasBeenOpened = _this$
|
|
11813
|
+
var _this$props5 = this.props,
|
|
11814
|
+
parentElement = _this$props5.parentElement,
|
|
11815
|
+
client = _this$props5.client,
|
|
11816
|
+
isDrawerOpen = _this$props5.isDrawerOpen,
|
|
11817
|
+
drawerHasBeenOpened = _this$props5.drawerHasBeenOpened;
|
|
11828
11818
|
|
|
11829
11819
|
if (parentElement) {
|
|
11830
11820
|
return ChatFrame.parentElementStyles;
|
|
@@ -11853,9 +11843,9 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11853
11843
|
value: function handleScrollLock() {
|
|
11854
11844
|
var _this3 = this;
|
|
11855
11845
|
|
|
11856
|
-
var _this$
|
|
11857
|
-
isDrawerOpen = _this$
|
|
11858
|
-
parentElement = _this$
|
|
11846
|
+
var _this$props6 = this.props,
|
|
11847
|
+
isDrawerOpen = _this$props6.isDrawerOpen,
|
|
11848
|
+
parentElement = _this$props6.parentElement;
|
|
11859
11849
|
var closeTransitionTime = this.state.closeTransitionTime; // Lock scroll only on mobile
|
|
11860
11850
|
|
|
11861
11851
|
if (!isMobile) {
|
|
@@ -11945,9 +11935,9 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11945
11935
|
var title = payload.title,
|
|
11946
11936
|
body = payload.body,
|
|
11947
11937
|
icon = payload.icon;
|
|
11948
|
-
var _this$
|
|
11949
|
-
isDrawerOpen = _this$
|
|
11950
|
-
parentElement = _this$
|
|
11938
|
+
var _this$props7 = this.props,
|
|
11939
|
+
isDrawerOpen = _this$props7.isDrawerOpen,
|
|
11940
|
+
parentElement = _this$props7.parentElement;
|
|
11951
11941
|
var isChatOpen = isDrawerOpen || Boolean(parentElement);
|
|
11952
11942
|
var onClickHandler = this.notificationOnClickHandler.bind(this, isChatOpen);
|
|
11953
11943
|
createNotification(title, isChatOpen, onClickHandler, {
|
|
@@ -11961,13 +11951,13 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11961
11951
|
var _handleChatEvent = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/regenerator_default().mark(function _callee(type, payload, id) {
|
|
11962
11952
|
var _this4 = this;
|
|
11963
11953
|
|
|
11964
|
-
var _this$
|
|
11954
|
+
var _this$props8, adaSettings, setState, setConnectionState, _ref, eventKey, data, _ref2, analytics, analyticsCallback, client, _ref3, chatter, created, chatterTokenCallback, _client, _ref4, zdSessionId, zdPreviousTags, storage, _client2, _ref5, zdMessagingExternalUserId, zdMessagingChatterCreated, _client3, _ref6, inLiveChat, eventCallbacks, customJavascriptEvent, specificCallback, genericCallback, resetChat, zdChatterAuthCallback, conversationEndCallback;
|
|
11965
11955
|
|
|
11966
11956
|
return regenerator_default().wrap(function _callee$(_context22) {
|
|
11967
11957
|
while (1) {
|
|
11968
11958
|
switch (_context22.prev = _context22.next) {
|
|
11969
11959
|
case 0:
|
|
11970
|
-
_this$
|
|
11960
|
+
_this$props8 = this.props, adaSettings = _this$props8.adaSettings, setState = _this$props8.setState, setConnectionState = _this$props8.setConnectionState;
|
|
11971
11961
|
_context22.t0 = type;
|
|
11972
11962
|
_context22.next = _context22.t0 === GET_WINDOW_ORIGIN ? 4 : _context22.t0 === CHAT_STARTED ? 8 : _context22.t0 === CHAT_WEBSOCKET_CONNECTED ? 14 : _context22.t0 === PUBLISH_EVENT ? 16 : _context22.t0 === ANALYTICS_EVENT ? 19 : _context22.t0 === CHATTER_EVENT ? 23 : _context22.t0 === "ZD_SESSION" ? 33 : _context22.t0 === ZD_MESSAGING_HANDOFF ? 42 : _context22.t0 === CHATTER_LIVECHAT_EVENT ? 51 : _context22.t0 === CUSTOM_JAVASCRIPT_EVENT ? 59 : _context22.t0 === RESET_FROM_CHAT_EVENT ? 68 : _context22.t0 === ZD_JWT_AUTH_EVENT ? 71 : _context22.t0 === CREATE_NOTIFICATION_EVENT ? 89 : _context22.t0 === BROWSER_HAS_NOTIFICATIONS_EVENT ? 91 : _context22.t0 === REQUEST_NOTIFICATIONS_EVENT ? 95 : _context22.t0 === END_CONVERSATION_EVENT ? 97 : 100;
|
|
11973
11963
|
break;
|
|
@@ -12304,10 +12294,8 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
12304
12294
|
value: function bindChatEventHandlers() {
|
|
12305
12295
|
var _this5 = this;
|
|
12306
12296
|
|
|
12307
|
-
var
|
|
12308
|
-
|
|
12309
|
-
messageService = _this$props10.messageService;
|
|
12310
|
-
var channel = messageService.getChannel(name);
|
|
12297
|
+
var messageService = this.props.messageService;
|
|
12298
|
+
var channel = messageService.getChannel("chat");
|
|
12311
12299
|
|
|
12312
12300
|
if (!channel) {
|
|
12313
12301
|
throw new errors/* AdaEmbedError */.S("`channel` is not defined");
|
|
@@ -12322,9 +12310,9 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
12322
12310
|
value: function frameLoaded() {
|
|
12323
12311
|
var _this6 = this;
|
|
12324
12312
|
|
|
12325
|
-
var _this$
|
|
12326
|
-
handle = _this$
|
|
12327
|
-
adaSettings = _this$
|
|
12313
|
+
var _this$props9 = this.props,
|
|
12314
|
+
handle = _this$props9.handle,
|
|
12315
|
+
adaSettings = _this$props9.adaSettings; // SUP-1141- TODO: Remove chatFrameTimeoutCallback
|
|
12328
12316
|
|
|
12329
12317
|
var _ref7 = adaSettings,
|
|
12330
12318
|
chatFrameTimeoutCallback = _ref7.chatFrameTimeoutCallback;
|
|
@@ -12349,11 +12337,10 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
12349
12337
|
}, {
|
|
12350
12338
|
key: "render",
|
|
12351
12339
|
value: function render() {
|
|
12352
|
-
var _this$
|
|
12353
|
-
|
|
12354
|
-
|
|
12355
|
-
|
|
12356
|
-
var iFrameName = "ada-".concat(name, "-frame");
|
|
12340
|
+
var _this$props10 = this.props,
|
|
12341
|
+
client = _this$props10.client,
|
|
12342
|
+
isDrawerOpen = _this$props10.isDrawerOpen;
|
|
12343
|
+
var iFrameName = "ada-chat-frame";
|
|
12357
12344
|
|
|
12358
12345
|
var roleDescription = function roleDescription() {
|
|
12359
12346
|
var _context23;
|
|
@@ -12366,7 +12353,7 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
12366
12353
|
};
|
|
12367
12354
|
|
|
12368
12355
|
return v("iframe", {
|
|
12369
|
-
src: this.
|
|
12356
|
+
src: this.getIframeSrc(),
|
|
12370
12357
|
scrolling: "no",
|
|
12371
12358
|
style: this.chooseStyles,
|
|
12372
12359
|
frameBorder: "0",
|
|
@@ -13662,7 +13649,6 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
13662
13649
|
}, {
|
|
13663
13650
|
key: "renderChatFrame",
|
|
13664
13651
|
value: function renderChatFrame() {
|
|
13665
|
-
var name = CHAT_IFRAME;
|
|
13666
13652
|
var _this$props14 = this.props,
|
|
13667
13653
|
messageService = _this$props14.messageService,
|
|
13668
13654
|
store = _this$props14.store,
|
|
@@ -13673,7 +13659,6 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
13673
13659
|
|
|
13674
13660
|
if (this.shouldRenderChatFrame) {
|
|
13675
13661
|
return v(components_ChatFrame, {
|
|
13676
|
-
name: name,
|
|
13677
13662
|
setChatHasBeenRendered: this.setChatHasBeenRenderedBound,
|
|
13678
13663
|
adaSettings: adaSettings,
|
|
13679
13664
|
store: store,
|
|
@@ -14417,7 +14402,7 @@ window.__AdaEmbedConstructor = Embed;
|
|
|
14417
14402
|
/* harmony export */ });
|
|
14418
14403
|
var isModern = new RegExp("((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(15|(1[6-9]|[2-9]\\d|\\d{3,}))[_.]\\d+(?:[_.]\\d+)?)|((Chromium|Chrome)\\/(100|(10[1-9]|1[1-9]\\d|[2-9]\\d\\d|\\d{4,}))\\.\\d+(?:\\.\\d+)?)|(Version\\/(15|(1[6-9]|[2-9]\\d|\\d{3,}))\\.\\d+(?:\\.\\d+)? Safari\\/)|(Firefox\\/(99|([1-9]\\d\\d|\\d{4,}))\\.\\d+\\.\\d+)|(Firefox\\/(99|([1-9]\\d\\d|\\d{4,}))\\.\\d+(pre|[ab]\\d+[a-z]*)?)").test(navigator.userAgent);
|
|
14419
14404
|
var isProduction = "production" === "production";
|
|
14420
|
-
var embed2Version = "
|
|
14405
|
+
var embed2Version = "c54a4e9";
|
|
14421
14406
|
|
|
14422
14407
|
/***/ }),
|
|
14423
14408
|
|
|
@@ -14762,9 +14747,9 @@ function _log() {
|
|
|
14762
14747
|
service: "embed",
|
|
14763
14748
|
env: "production",
|
|
14764
14749
|
embedVersion: 2,
|
|
14765
|
-
version: "1.1.
|
|
14750
|
+
version: "1.1.9",
|
|
14766
14751
|
isNpm: true,
|
|
14767
|
-
commitHash: "
|
|
14752
|
+
commitHash: "c54a4e9"
|
|
14768
14753
|
}))
|
|
14769
14754
|
});
|
|
14770
14755
|
|
|
@@ -25705,7 +25690,7 @@ function _loadClientChunk() {
|
|
|
25705
25690
|
polyfillVersionString = "legacy";
|
|
25706
25691
|
}
|
|
25707
25692
|
|
|
25708
|
-
clientScriptSource = concat_default()(_context17 = concat_default()(_context18 = "".concat(host, "/embed/")).call(_context18, polyfillVersionString, "/client/")).call(_context17, "
|
|
25693
|
+
clientScriptSource = concat_default()(_context17 = concat_default()(_context18 = "".concat(host, "/embed/")).call(_context18, polyfillVersionString, "/client/")).call(_context17, "c54a4e9", "/index.js");
|
|
25709
25694
|
} // `window.__AdaEmbedConstructor` gets created in the "client" bundle
|
|
25710
25695
|
|
|
25711
25696
|
|
|
@@ -25810,14 +25795,22 @@ function createEmbedObject() {
|
|
|
25810
25795
|
return loadClientChunk(adaSettings);
|
|
25811
25796
|
|
|
25812
25797
|
case 5:
|
|
25813
|
-
if (
|
|
25798
|
+
if (window.__AdaEmbedConstructor) {
|
|
25814
25799
|
_context2.next = 7;
|
|
25815
25800
|
break;
|
|
25816
25801
|
}
|
|
25817
25802
|
|
|
25818
|
-
throw new
|
|
25803
|
+
throw new Error("`window.__AdaEmbedConstructor` is not defined");
|
|
25819
25804
|
|
|
25820
25805
|
case 7:
|
|
25806
|
+
if (!(adaSettings.customDomains && window.__AdaEmbedConstructor.embed2Version !== config_info/* embed2Version */.Mk)) {
|
|
25807
|
+
_context2.next = 9;
|
|
25808
|
+
break;
|
|
25809
|
+
}
|
|
25810
|
+
|
|
25811
|
+
throw new errors/* AdaEmbedError */.S("Entry script version does not match version specified in customDomains.");
|
|
25812
|
+
|
|
25813
|
+
case 9:
|
|
25821
25814
|
/**
|
|
25822
25815
|
* We bind the window.__AdaEmbed instead of importing the Embed class because entry is a
|
|
25823
25816
|
* separate bundle.
|
|
@@ -25838,7 +25831,7 @@ function createEmbedObject() {
|
|
|
25838
25831
|
});
|
|
25839
25832
|
return _context2.abrupt("return", embed.initialized);
|
|
25840
25833
|
|
|
25841
|
-
case
|
|
25834
|
+
case 13:
|
|
25842
25835
|
case "end":
|
|
25843
25836
|
return _context2.stop();
|
|
25844
25837
|
}
|