@seamly/web-ui 20.8.0-alpha.1 → 20.8.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/build/dist/lib/index.debug.js +48 -48
  2. package/build/dist/lib/index.debug.min.js +1 -1
  3. package/build/dist/lib/index.debug.min.js.LICENSE.txt +1 -1
  4. package/build/dist/lib/index.js +364 -284
  5. package/build/dist/lib/index.min.js +1 -1
  6. package/build/dist/lib/standalone.js +551 -274
  7. package/build/dist/lib/standalone.min.js +1 -1
  8. package/build/dist/lib/style-guide.js +166 -85
  9. package/build/dist/lib/style-guide.min.js +1 -1
  10. package/build/dist/lib/styles.css +1 -1
  11. package/package.json +1 -1
  12. package/src/javascripts/config.types.ts +1 -0
  13. package/src/javascripts/domains/app/actions.ts +45 -41
  14. package/src/javascripts/domains/config/slice.ts +2 -0
  15. package/src/javascripts/domains/i18n/slice.ts +0 -3
  16. package/src/javascripts/domains/store/slice.ts +23 -15
  17. package/src/javascripts/domains/store/store.types.ts +12 -1
  18. package/src/javascripts/domains/translations/hooks.ts +54 -48
  19. package/src/javascripts/domains/translations/selectors.ts +12 -0
  20. package/src/javascripts/domains/translations/slice.ts +70 -23
  21. package/src/javascripts/domains/translations/translations.types.ts +8 -1
  22. package/src/javascripts/schema.ts +3 -10
  23. package/src/javascripts/style-guide/components/app.js +2 -2
  24. package/src/javascripts/style-guide/states.js +61 -3
  25. package/src/javascripts/ui/components/conversation/conversation.js +7 -3
  26. package/src/javascripts/ui/components/conversation/event/card-message.js +1 -1
  27. package/src/javascripts/ui/components/conversation/event/carousel-message/index.js +1 -1
  28. package/src/javascripts/ui/components/conversation/event/choice-prompt.js +1 -1
  29. package/src/javascripts/ui/components/conversation/event/conversation-suggestions.js +9 -2
  30. package/src/javascripts/ui/components/conversation/event/cta.js +1 -1
  31. package/src/javascripts/ui/components/conversation/event/divider/variants/new-translation.js +39 -3
  32. package/src/javascripts/ui/components/conversation/event/image.js +1 -1
  33. package/src/javascripts/ui/components/conversation/event/participant.js +1 -1
  34. package/src/javascripts/ui/components/conversation/event/splash.js +1 -1
  35. package/src/javascripts/ui/components/conversation/event/text.js +1 -1
  36. package/src/javascripts/ui/components/conversation/event/translation.js +1 -1
  37. package/src/javascripts/ui/components/conversation/event/upload.js +1 -1
  38. package/src/javascripts/ui/components/conversation/event/video.js +1 -1
  39. package/src/javascripts/ui/components/conversation/message-container.js +1 -23
  40. package/src/javascripts/ui/components/core/seamly-event-subscriber.js +3 -2
  41. package/src/javascripts/ui/components/faq/faq.js +3 -1
  42. package/src/javascripts/ui/components/options/options-button.js +3 -1
  43. package/src/javascripts/ui/components/suggestions/index.js +5 -2
  44. package/src/javascripts/ui/hooks/seamly-state-hooks.js +6 -0
  45. package/src/javascripts/ui/hooks/use-seamly-chat.js +3 -9
  46. package/src/stylesheets/5-components/_message-carousel.scss +10 -8
  47. package/CHANGELOG.md +0 -987
  48. package/src/javascripts/domains/translations/selectors.js +0 -11
@@ -6830,7 +6830,9 @@ const seamly_unavailable_error_1 = __importDefault(__webpack_require__(9060));
6830
6830
 
6831
6831
  const actions_1 = __webpack_require__(60915);
6832
6832
 
6833
- const actions_2 = __webpack_require__(65234);
6833
+ const actions_2 = __webpack_require__(30059);
6834
+
6835
+ const actions_3 = __webpack_require__(65234);
6834
6836
 
6835
6837
  const seamly_utils_1 = __webpack_require__(45740);
6836
6838
 
@@ -6840,7 +6842,8 @@ exports.initializeApp = (0, toolkit_1.createAsyncThunk)('initializeApp', (_, _re
6840
6842
  api,
6841
6843
  config
6842
6844
  },
6843
- rejectWithValue
6845
+ rejectWithValue,
6846
+ dispatch
6844
6847
  } = _ref;
6845
6848
  return __awaiter(void 0, void 0, void 0, function* () {
6846
6849
  var _a, _b, _c, _d;
@@ -6880,6 +6883,7 @@ exports.initializeApp = (0, toolkit_1.createAsyncThunk)('initializeApp', (_, _re
6880
6883
  });
6881
6884
  }
6882
6885
 
6886
+ dispatch((0, actions_2.setLocale)(locale));
6883
6887
  return {
6884
6888
  initialState: undefined,
6885
6889
  locale,
@@ -6920,7 +6924,7 @@ exports.resetApp = (0, toolkit_1.createAsyncThunk)('resetApp', (_, _ref2) => {
6920
6924
  dispatch((0, actions_1.resetConfig)());
6921
6925
  yield dispatch((0, actions_1.initializeConfig)());
6922
6926
  yield dispatch((0, exports.initializeApp)());
6923
- dispatch((0, actions_2.initializeVisibility)());
6927
+ dispatch((0, actions_3.initializeVisibility)());
6924
6928
  });
6925
6929
  });
6926
6930
 
@@ -7261,13 +7265,14 @@ exports.initialConfigState = _Object$assign(_Object$assign({}, config_1.defaultC
7261
7265
  connectWhenInView: true,
7262
7266
  showDisclaimer: false,
7263
7267
  showFaq: false,
7268
+ showSuggestions: true,
7264
7269
  customComponents: {},
7265
7270
  defaults: {
7266
7271
  visible: null
7267
7272
  },
7268
7273
  preChatEvents: []
7269
7274
  });
7270
- const configKeys = ['hideOnNoUserResponse', 'connectWhenInView', 'showDisclaimer', 'showFaq', 'namespace', 'customComponents', 'defaults', 'layoutMode', 'api', 'zIndex', 'context', 'appContainerClassNames', 'messages', 'visible', 'visibilityCallback', 'errorCallback', 'agentParticipant', 'userParticipant', 'startChatIcon'];
7275
+ const configKeys = ['hideOnNoUserResponse', 'connectWhenInView', 'showDisclaimer', 'showFaq', 'showSuggestions', 'namespace', 'customComponents', 'defaults', 'layoutMode', 'api', 'zIndex', 'context', 'appContainerClassNames', 'messages', 'visible', 'visibilityCallback', 'errorCallback', 'agentParticipant', 'userParticipant', 'startChatIcon'];
7271
7276
 
7272
7277
  const updateState = (state, config) => {
7273
7278
  const _a = (0, general_utils_1.pick)(config, configKeys),
@@ -8016,11 +8021,9 @@ exports.setTranslations = exports.setInitialLocale = exports.i18nSlice = void 0;
8016
8021
 
8017
8022
  const toolkit_1 = __webpack_require__(40575);
8018
8023
 
8019
- const actions_1 = __webpack_require__(64134);
8020
-
8021
- const actions_2 = __webpack_require__(60915);
8024
+ const actions_1 = __webpack_require__(60915);
8022
8025
 
8023
- const actions_3 = __webpack_require__(30059);
8026
+ const actions_2 = __webpack_require__(30059);
8024
8027
 
8025
8028
  const initialState = {
8026
8029
  translations: {
@@ -8059,22 +8062,17 @@ exports.i18nSlice = (0, toolkit_1.createSlice)({
8059
8062
  },
8060
8063
  extraReducers: builder => {
8061
8064
  // Add reducers for additional action types here, and handle loading state as needed
8062
- builder.addCase(actions_2.initializeConfig.fulfilled, (state, _ref2) => {
8065
+ builder.addCase(actions_1.initializeConfig.fulfilled, (state, _ref2) => {
8063
8066
  let {
8064
8067
  payload
8065
8068
  } = _ref2;
8066
8069
  state.initialLocale = payload.locale;
8067
- }).addCase(actions_1.initializeApp.fulfilled, (state, _ref3) => {
8068
- let {
8069
- payload
8070
- } = _ref3;
8071
- state.locale = payload.locale;
8072
- }).addCase(actions_3.setLocale.fulfilled, (state, _ref4) => {
8070
+ }).addCase(actions_2.setLocale.fulfilled, (state, _ref3) => {
8073
8071
  var _context, _context2;
8074
8072
 
8075
8073
  let {
8076
8074
  payload
8077
- } = _ref4;
8075
+ } = _ref3;
8078
8076
 
8079
8077
  if (!(payload === null || payload === void 0 ? void 0 : payload.translations)) {
8080
8078
  state.isLoading = false;
@@ -8478,7 +8476,7 @@ _Object$defineProperty(exports, "__esModule", {
8478
8476
  value: true
8479
8477
  });
8480
8478
 
8481
- exports.stopIdleDetachCountdownCounter = exports.showOption = exports.setUserSelectedOptions = exports.setUserSelectedOption = exports.setUserEntryType = exports.setUploadProgress = exports.setUploadError = exports.setUploadComplete = exports.setServiceEntryMetadata = exports.setServiceDataItem = exports.setSeamlyContainerElement = exports.setParticipant = exports.setLoadedImageEventIds = exports.setIsLoading = exports.setInitialState = exports.setHistory = exports.setHeaderTitle = exports.setHeaderSubTitle = exports.setFeatures = exports.setFeatureEnabledState = exports.setEventsRead = exports.setBlockAutoEntrySwitch = exports.setActiveService = exports.setActiveEntryType = exports.resetHistoryLoadedFlag = exports.registerUpload = exports.initResumeConversationPrompt = exports.initIdleDetachCountdown = exports.hideOption = exports.decrementIdleDetachCountdownCounter = exports.clearResumeConversationPrompt = exports.clearIdleDetachCountdown = exports.clearFeatures = exports.clearEvents = exports.clearAllUploads = exports.addEvent = exports.ackEvent = exports.storeSlice = exports.initialStoreState = exports.mergeHistory = exports.isUnreadMessage = void 0;
8479
+ exports.stopIdleDetachCountdownCounter = exports.showOption = exports.setUserSelectedOptions = exports.setUserSelectedOption = exports.setUserEntryType = exports.setUploadProgress = exports.setUploadError = exports.setUploadComplete = exports.setServiceEntryMetadata = exports.setServiceDataItem = exports.setSeamlyContainerElement = exports.setParticipant = exports.setLoadedImageEventIds = exports.setIsLoading = exports.setInitialState = exports.setHistory = exports.setHeaderTitle = exports.setHeaderSubTitle = exports.setFeatures = exports.setFeatureEnabledState = exports.setEventsRead = exports.setBlockAutoEntrySwitch = exports.setActiveService = exports.setActiveEntryType = exports.resetHistoryLoadedFlag = exports.registerUpload = exports.initResumeConversationPrompt = exports.initIdleDetachCountdown = exports.hideOption = exports.decrementIdleDetachCountdownCounter = exports.clearResumeConversationPrompt = exports.clearIdleDetachCountdown = exports.clearFeatures = exports.clearEvents = exports.clearAllUploads = exports.addEvent = exports.ackEvent = exports.storeSlice = exports.initialStoreState = exports.mergeHistory = exports.orderHistory = exports.isUnreadMessage = void 0;
8482
8480
 
8483
8481
  const toolkit_1 = __webpack_require__(40575);
8484
8482
 
@@ -8518,6 +8516,8 @@ const orderHistory = events => {
8518
8516
  });
8519
8517
  };
8520
8518
 
8519
+ exports.orderHistory = orderHistory;
8520
+
8521
8521
  const mergeHistory = (stateEvents, historyEvents) => {
8522
8522
  var _context;
8523
8523
 
@@ -8532,7 +8532,7 @@ const mergeHistory = (stateEvents, historyEvents) => {
8532
8532
  // the normal merging logic there is no added effect.
8533
8533
  ).call(_context);
8534
8534
 
8535
- return orderHistory([...newHistoryEvents, ...newStateEvents]);
8535
+ return (0, exports.orderHistory)([...newHistoryEvents, ...newStateEvents]);
8536
8536
  };
8537
8537
 
8538
8538
  exports.mergeHistory = mergeHistory;
@@ -8734,7 +8734,8 @@ exports.storeSlice = (0, toolkit_1.createSlice)({
8734
8734
  if (matchedEvent) {
8735
8735
  var _context4;
8736
8736
 
8737
- state.events = orderHistory(_mapInstanceProperty(_context4 = state.events).call(_context4, m => m.payload.id === matchedEvent.payload.id ? _Object$assign(_Object$assign({}, m), {
8737
+ state.events = (0, exports.orderHistory)( //@ts-ignore
8738
+ _mapInstanceProperty(_context4 = state.events).call(_context4, m => m.payload.id === matchedEvent.payload.id ? _Object$assign(_Object$assign({}, m), {
8738
8739
  payload: _Object$assign(_Object$assign({}, m.payload), {
8739
8740
  id,
8740
8741
  occurredAt
@@ -8806,9 +8807,11 @@ exports.storeSlice = (0, toolkit_1.createSlice)({
8806
8807
  }
8807
8808
 
8808
8809
  const {
8809
- entry,
8810
- uploads
8810
+ entry
8811
8811
  } = activeServiceSettings;
8812
+ const {
8813
+ upload
8814
+ } = entry.options;
8812
8815
  const historyNewEntryMeta = calculateNewEntryMeta(_Object$assign(_Object$assign(_Object$assign({}, state.entryMeta), entry), {
8813
8816
  active: entry.default || seamly_utils_1.payloadTypes.text,
8814
8817
  options: _Object$assign({}, entry && entry.options ? entry.options : {})
@@ -8818,14 +8821,14 @@ exports.storeSlice = (0, toolkit_1.createSlice)({
8818
8821
 
8819
8822
  const newFeaturesHasUpload = newFeatures.hasOwnProperty(seamly_utils_1.featureKeys.uploads); // Only set uploads if it was initialised by the account config.
8820
8823
 
8821
- if (newFeaturesHasUpload && lastParticipantEvent.type === 'message') {
8824
+ if (newFeaturesHasUpload && (lastParticipantEvent === null || lastParticipantEvent === void 0 ? void 0 : lastParticipantEvent.type) === 'message') {
8822
8825
  const {
8823
8826
  payload: lastParticipantEventPayload
8824
8827
  } = lastParticipantEvent;
8825
8828
  const entryType = ((_a = lastParticipantEventPayload === null || lastParticipantEventPayload === void 0 ? void 0 : lastParticipantEventPayload.entry) === null || _a === void 0 ? void 0 : _a.type) || {};
8826
8829
  newFeatures = _Object$assign(_Object$assign({}, newFeatures), {
8827
8830
  uploads: {
8828
- enabled: !!(uploads && uploads.enabled),
8831
+ enabled: !!(upload && upload.enabled),
8829
8832
  enabledFromEntry: entryType === seamly_utils_1.entryTypes.upload
8830
8833
  }
8831
8834
  });
@@ -8842,7 +8845,7 @@ exports.storeSlice = (0, toolkit_1.createSlice)({
8842
8845
  state.serviceInfo = _Object$assign(_Object$assign({}, state.serviceInfo), {
8843
8846
  activeServiceSessionId
8844
8847
  });
8845
- state.serviceData = serviceData || {};
8848
+ state.serviceData = _Object$assign(_Object$assign({}, state.serviceData), serviceData);
8846
8849
  state.options = _Object$assign(_Object$assign({}, state.options), {
8847
8850
  features: newFeatures || {}
8848
8851
  });
@@ -8918,8 +8921,8 @@ exports.storeSlice = (0, toolkit_1.createSlice)({
8918
8921
  payload
8919
8922
  } = _ref11;
8920
8923
 
8921
- if (state.serviceInfo.activeServiceSessionId !== payload.activeServiceSessionId) {
8922
- state.serviceInfo.activeServiceSessionId = payload.activeServiceSessionId;
8924
+ if (state.serviceInfo.activeServiceSessionId !== payload) {
8925
+ state.serviceInfo.activeServiceSessionId = payload;
8923
8926
  }
8924
8927
  },
8925
8928
  setHeaderTitle: (state, _ref12) => {
@@ -9145,7 +9148,7 @@ _Object$defineProperty(exports, "__esModule", {
9145
9148
 
9146
9149
  exports.useLocaleNativeName = exports.useTranslationsContainer = exports.useTranslatedEventData = exports.useTranslations = void 0;
9147
9150
 
9148
- const selectors_1 = __webpack_require__(85238);
9151
+ const selectors_1 = __webpack_require__(86787);
9149
9152
 
9150
9153
  const slice_1 = __webpack_require__(90841);
9151
9154
 
@@ -9162,7 +9165,7 @@ function useTranslations() {
9162
9165
  sendAction
9163
9166
  } = (0, seamly_hooks_1.useSeamlyCommands)();
9164
9167
  const dispatch = (0, react_redux_1.useDispatch)();
9165
- const enableTranslations = (0, seamly_hooks_1.useStableCallback)(locale => {
9168
+ const enableTranslations = (0, hooks_1.useCallback)(locale => {
9166
9169
  sendAction({
9167
9170
  type: seamly_utils_1.actionTypes.setTranslation,
9168
9171
  body: {
@@ -9171,18 +9174,15 @@ function useTranslations() {
9171
9174
  }
9172
9175
  });
9173
9176
  dispatch((0, slice_1.enableTranslation)(locale));
9174
- }, // eslint-disable-next-line @typescript-eslint/ban-ts-comment
9175
- // @ts-ignore
9176
- [sendAction, dispatch]);
9177
- const disableTranslations = (0, seamly_hooks_1.useStableCallback)(() => {
9177
+ }, [sendAction, dispatch]);
9178
+ const disableTranslations = (0, hooks_1.useCallback)(() => {
9178
9179
  sendAction({
9179
9180
  type: seamly_utils_1.actionTypes.setTranslation,
9180
9181
  body: {
9181
9182
  enabled: false
9182
9183
  }
9183
9184
  });
9184
- dispatch((0, slice_1.disableTranslation)()); // eslint-disable-next-line @typescript-eslint/ban-ts-comment
9185
- // @ts-ignore
9185
+ dispatch((0, slice_1.disableTranslation)());
9186
9186
  }, [sendAction, dispatch]);
9187
9187
  const {
9188
9188
  languages,
@@ -9207,54 +9207,49 @@ function useTranslations() {
9207
9207
 
9208
9208
  exports.useTranslations = useTranslations;
9209
9209
 
9210
- function useTranslatedEventData(_ref2) {
9211
- let {
9212
- payload
9213
- } = _ref2;
9214
- const payloadId = payload === null || payload === void 0 ? void 0 : payload.id;
9215
- let body;
9216
- let translatedBody;
9217
-
9218
- switch (payload === null || payload === void 0 ? void 0 : payload.type) {
9219
- case 'participant':
9220
- body = payload.participant.introduction;
9221
- translatedBody = payload.participant.translatedIntroduction;
9222
- break;
9210
+ function useTranslatedEventData(channelEvent) {
9211
+ const getTranslations = () => {
9212
+ var _a, _b, _c;
9223
9213
 
9224
- default:
9225
- body = payload === null || payload === void 0 ? void 0 : payload.body;
9226
- translatedBody = payload === null || payload === void 0 ? void 0 : payload.translatedBody;
9227
- }
9214
+ if (!channelEvent.payload) return {
9215
+ body: undefined,
9216
+ translatedBody: undefined
9217
+ };
9228
9218
 
9229
- const hasTranslation = !!translatedBody;
9230
- const isTranslated = (0, react_redux_1.useSelector)(store => // @ts-ignore
9231
- (0, selectors_1.getIsPayloadTranslated)(store, payloadId));
9232
- const dispatch = (0, react_redux_1.useDispatch)();
9233
- const toggleTranslation = (0, seamly_hooks_1.useStableCallback)(() => {
9234
- if (isTranslated) {
9235
- dispatch((0, slice_1.disableEvent)(payloadId));
9236
- } else {
9237
- dispatch((0, slice_1.enableEvent)(payloadId));
9238
- } // eslint-disable-next-line @typescript-eslint/ban-ts-comment
9239
- // @ts-ignore
9219
+ if (channelEvent.type === 'participant') {
9220
+ return {
9221
+ body: (_a = channelEvent.payload) === null || _a === void 0 ? void 0 : _a.participant.introduction,
9222
+ translatedBody: (_c = (_b = channelEvent.payload) === null || _b === void 0 ? void 0 : _b.participant) === null || _c === void 0 ? void 0 : _c.translatedIntroduction
9223
+ };
9224
+ }
9240
9225
 
9241
- }, [isTranslated, payloadId, dispatch]);
9242
- return [hasTranslation && isTranslated ? translatedBody === null || translatedBody === void 0 ? void 0 : translatedBody.data : body, {
9226
+ return {
9227
+ body: channelEvent.payload.body,
9228
+ translatedBody: channelEvent.payload.translatedBody
9229
+ };
9230
+ };
9231
+
9232
+ const {
9233
+ translatedBody,
9234
+ body
9235
+ } = getTranslations();
9236
+ const hasTranslation = !!translatedBody;
9237
+ const isTranslated = (0, react_redux_1.useSelector)((0, selectors_1.selectIsTranslated)(channelEvent));
9238
+ return {
9239
+ body: hasTranslation && isTranslated ? translatedBody === null || translatedBody === void 0 ? void 0 : translatedBody.data : body,
9243
9240
  hasTranslation,
9244
9241
  isTranslated: isTranslated && hasTranslation,
9245
- toggleTranslation,
9246
- translatedBy: translatedBody === null || translatedBody === void 0 ? void 0 : translatedBody.translatedBy,
9247
9242
  locale: translatedBody === null || translatedBody === void 0 ? void 0 : translatedBody.locale
9248
- }];
9243
+ };
9249
9244
  }
9250
9245
 
9251
9246
  exports.useTranslatedEventData = useTranslatedEventData;
9252
9247
 
9253
9248
  function useTranslationsContainer() {
9254
- const id = (0, react_redux_1.useSelector)(_ref3 => {
9249
+ const id = (0, react_redux_1.useSelector)(_ref2 => {
9255
9250
  let {
9256
9251
  translations
9257
- } = _ref3;
9252
+ } = _ref2;
9258
9253
  return translations.containerId;
9259
9254
  });
9260
9255
  const focusContainer = (0, seamly_hooks_1.useElementFocusingById)(id);
@@ -9281,7 +9276,7 @@ exports.useLocaleNativeName = useLocaleNativeName;
9281
9276
 
9282
9277
  /***/ }),
9283
9278
 
9284
- /***/ 90841:
9279
+ /***/ 86787:
9285
9280
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
9286
9281
 
9287
9282
  "use strict";
@@ -9289,8 +9284,50 @@ exports.useLocaleNativeName = useLocaleNativeName;
9289
9284
 
9290
9285
  var _Object$defineProperty = __webpack_require__(96718);
9291
9286
 
9287
+ var _everyInstanceProperty = __webpack_require__(2250);
9288
+
9289
+ var _Object$values = __webpack_require__(3665);
9290
+
9292
9291
  var _includesInstanceProperty = __webpack_require__(58118);
9293
9292
 
9293
+ _Object$defineProperty(exports, "__esModule", {
9294
+ value: true
9295
+ });
9296
+
9297
+ exports.selectIsTranslated = void 0;
9298
+
9299
+ const toolkit_1 = __webpack_require__(40575);
9300
+
9301
+ const selectIsTranslated = channelEvent => (0, toolkit_1.createSelector)(store => store.translations.translatedEventGroups, translatedEventGroups => {
9302
+ var _context;
9303
+
9304
+ return _everyInstanceProperty(_context = _Object$values(translatedEventGroups)).call(_context, value => {
9305
+ var _a;
9306
+
9307
+ return !_includesInstanceProperty(value).call(value, (_a = channelEvent === null || channelEvent === void 0 ? void 0 : channelEvent.payload) === null || _a === void 0 ? void 0 : _a.id);
9308
+ });
9309
+ });
9310
+
9311
+ exports.selectIsTranslated = selectIsTranslated;
9312
+
9313
+ /***/ }),
9314
+
9315
+ /***/ 90841:
9316
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
9317
+
9318
+ "use strict";
9319
+
9320
+
9321
+ var _Object$defineProperty = __webpack_require__(96718);
9322
+
9323
+ var _reduceInstanceProperty = __webpack_require__(24282);
9324
+
9325
+ var _spliceInstanceProperty = __webpack_require__(39940);
9326
+
9327
+ var _Object$entries = __webpack_require__(2018);
9328
+
9329
+ var _mapInstanceProperty = __webpack_require__(97606);
9330
+
9294
9331
  var _filterInstanceProperty = __webpack_require__(14418);
9295
9332
 
9296
9333
  var _a;
@@ -9299,30 +9336,75 @@ _Object$defineProperty(exports, "__esModule", {
9299
9336
  value: true
9300
9337
  });
9301
9338
 
9302
- exports.disableEvent = exports.enableEvent = exports.disableTranslation = exports.enableTranslation = exports.translationSlice = exports.translationsInitialState = void 0;
9339
+ exports.disableEventsTranslation = exports.enableEventsTranslation = exports.disableTranslation = exports.enableTranslation = exports.translationSlice = exports.translationsInitialState = void 0;
9303
9340
 
9304
9341
  const toolkit_1 = __webpack_require__(40575);
9305
9342
 
9306
- const actions_1 = __webpack_require__(64134);
9343
+ const actions_1 = __webpack_require__(60915);
9307
9344
 
9308
- const actions_2 = __webpack_require__(60915);
9345
+ const slice_1 = __webpack_require__(11153);
9309
9346
 
9310
9347
  exports.translationsInitialState = {
9311
9348
  isActive: false,
9312
9349
  currentLocale: undefined,
9313
9350
  isAvailable: false,
9314
9351
  languages: [],
9315
- originalPayloadIds: [],
9316
- containerId: (0, toolkit_1.nanoid)()
9352
+ containerId: (0, toolkit_1.nanoid)(),
9353
+ translatedEventGroups: {}
9317
9354
  };
9355
+
9356
+ const getLastGroupId = (events, id) => {
9357
+ var _context, _context2;
9358
+
9359
+ const eventGroup = _reduceInstanceProperty(_context = [...events]).call(_context, (acc, _ref, _index, arr) => {
9360
+ let {
9361
+ payload
9362
+ } = _ref;
9363
+
9364
+ var _a;
9365
+
9366
+ if (acc[id]) {
9367
+ // Splice to break early (make the reducer think we are done)
9368
+ // This is needed to avoid events of other groups from being added to the array.
9369
+ // @ts-ignore
9370
+ if ((payload === null || payload === void 0 ? void 0 : payload.type) === 'divider' && ((_a = payload === null || payload === void 0 ? void 0 : payload.body) === null || _a === void 0 ? void 0 : _a.translationEnabled)) {
9371
+ _spliceInstanceProperty(arr).call(arr, 0);
9372
+
9373
+ return acc;
9374
+ }
9375
+
9376
+ acc[id].push(payload.id);
9377
+ }
9378
+
9379
+ if (payload.id === id) acc[id] = [];
9380
+ return acc;
9381
+ }, {});
9382
+
9383
+ const [[groupId, eventIds]] = _Object$entries(eventGroup);
9384
+
9385
+ const lastGroupId = _mapInstanceProperty(_context2 = _filterInstanceProperty(events //@ts-ignore
9386
+ ).call(events //@ts-ignore
9387
+ , event => {
9388
+ var _a;
9389
+
9390
+ return ((_a = event.payload) === null || _a === void 0 ? void 0 : _a.type) === 'divider';
9391
+ })).call(_context2, event => event.payload.id).at(-1);
9392
+
9393
+ return {
9394
+ lastGroupId,
9395
+ groupId,
9396
+ eventIds
9397
+ };
9398
+ };
9399
+
9318
9400
  exports.translationSlice = (0, toolkit_1.createSlice)({
9319
9401
  name: 'translation',
9320
9402
  initialState: exports.translationsInitialState,
9321
9403
  reducers: {
9322
- enableTranslation: (state, _ref) => {
9404
+ enableTranslation: (state, _ref2) => {
9323
9405
  let {
9324
9406
  payload
9325
- } = _ref;
9407
+ } = _ref2;
9326
9408
  state.isActive = true;
9327
9409
  state.currentLocale = payload;
9328
9410
  },
@@ -9330,45 +9412,37 @@ exports.translationSlice = (0, toolkit_1.createSlice)({
9330
9412
  state.isActive = false;
9331
9413
  state.currentLocale = undefined;
9332
9414
  },
9333
- enableEvent: (state, _ref2) => {
9334
- var _context, _context2;
9335
-
9415
+ enableEventsTranslation: (state, _ref3) => {
9336
9416
  let {
9337
- payload
9338
- } = _ref2;
9339
-
9340
- if (!_includesInstanceProperty(_context = state.originalPayloadIds).call(_context, payload)) {
9341
- return;
9342
- }
9343
-
9344
- state.originalPayloadIds = _filterInstanceProperty(_context2 = state.originalPayloadIds).call(_context2, id => id !== payload);
9417
+ payload: {
9418
+ events,
9419
+ id
9420
+ }
9421
+ } = _ref3;
9422
+ delete state.translatedEventGroups[id];
9423
+ const {
9424
+ lastGroupId
9425
+ } = getLastGroupId(events, id);
9426
+ state.lastGroupId = lastGroupId;
9345
9427
  },
9346
- disableEvent: (state, _ref3) => {
9347
- var _context3;
9348
-
9428
+ disableEventsTranslation: (state, _ref4) => {
9349
9429
  let {
9350
- payload
9351
- } = _ref3;
9352
-
9353
- if (_includesInstanceProperty(_context3 = state.originalPayloadIds).call(_context3, payload)) {
9354
- return;
9355
- }
9356
-
9357
- state.originalPayloadIds.push(payload);
9430
+ payload: {
9431
+ events,
9432
+ id
9433
+ }
9434
+ } = _ref4;
9435
+ const {
9436
+ lastGroupId,
9437
+ groupId,
9438
+ eventIds
9439
+ } = getLastGroupId(events, id);
9440
+ state.lastGroupId = lastGroupId;
9441
+ state.translatedEventGroups[groupId] = eventIds;
9358
9442
  }
9359
9443
  },
9360
9444
  extraReducers: builder => {
9361
- builder.addCase(actions_1.initializeApp.fulfilled, (state, _ref4) => {
9362
- let {
9363
- payload
9364
- } = _ref4;
9365
-
9366
- var _a, _b;
9367
-
9368
- if (!((_b = (_a = payload.config) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.translationLocale)) return;
9369
- state.isActive = true;
9370
- state.currentLocale = payload.locale;
9371
- }).addCase(actions_2.initializeConfig.fulfilled, (state, _ref5) => {
9445
+ builder.addCase(actions_1.initializeConfig.fulfilled, (state, _ref5) => {
9372
9446
  let {
9373
9447
  payload
9374
9448
  } = _ref5;
@@ -9379,10 +9453,18 @@ exports.translationSlice = (0, toolkit_1.createSlice)({
9379
9453
  if (!feature) return;
9380
9454
  state.isAvailable = feature.enabled === true;
9381
9455
  state.languages = feature.languages;
9456
+ }).addCase(slice_1.addEvent, (state, _ref6) => {
9457
+ let {
9458
+ payload
9459
+ } = _ref6;
9460
+
9461
+ if (state.translatedEventGroups[state.lastGroupId]) {
9462
+ state.translatedEventGroups[state.lastGroupId].push(payload.payload.id);
9463
+ }
9382
9464
  });
9383
9465
  }
9384
9466
  });
9385
- _a = exports.translationSlice.actions, exports.enableTranslation = _a.enableTranslation, exports.disableTranslation = _a.disableTranslation, exports.enableEvent = _a.enableEvent, exports.disableEvent = _a.disableEvent;
9467
+ _a = exports.translationSlice.actions, exports.enableTranslation = _a.enableTranslation, exports.disableTranslation = _a.disableTranslation, exports.enableEventsTranslation = _a.enableEventsTranslation, exports.disableEventsTranslation = _a.disableEventsTranslation;
9386
9468
  exports["default"] = exports.translationSlice.reducer;
9387
9469
 
9388
9470
  /***/ }),
@@ -12566,7 +12648,7 @@ class API {
12566
12648
  return {
12567
12649
  clientName: "@seamly/web-ui",
12568
12650
  clientVariant: this.layoutMode,
12569
- clientVersion: "20.8.0-alpha.1",
12651
+ clientVersion: "20.7.0",
12570
12652
  currentUrl: window.location.toString(),
12571
12653
  screenResolution: `${window.screen.width}x${window.screen.height}`,
12572
12654
  timezone: getTimeZone(),
@@ -12809,35 +12891,6 @@ function createI18nMiddleware(_ref) {
12809
12891
 
12810
12892
  /***/ }),
12811
12893
 
12812
- /***/ 85238:
12813
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
12814
-
12815
- "use strict";
12816
- __webpack_require__.r(__webpack_exports__);
12817
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12818
- /* harmony export */ "getIsPayloadTranslated": function() { return /* binding */ getIsPayloadTranslated; },
12819
- /* harmony export */ "getOriginalPayloadIds": function() { return /* binding */ getOriginalPayloadIds; }
12820
- /* harmony export */ });
12821
- /* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(58118);
12822
- /* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_0__);
12823
- /* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20573);
12824
-
12825
-
12826
- const getOriginalPayloadIds = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.createSelector)(_ref => {
12827
- let {
12828
- translations
12829
- } = _ref;
12830
- return translations;
12831
- }, _ref2 => {
12832
- let {
12833
- originalPayloadIds
12834
- } = _ref2;
12835
- return originalPayloadIds;
12836
- });
12837
- const getIsPayloadTranslated = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.createSelector)([getOriginalPayloadIds, (_, payloadId) => payloadId], (payloadIds, payloadId) => !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_0___default()(payloadIds).call(payloadIds, payloadId));
12838
-
12839
- /***/ }),
12840
-
12841
12894
  /***/ 12629:
12842
12895
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
12843
12896
 
@@ -13282,12 +13335,14 @@ const SeamlyEventSubscriber = _ref => {
13282
13335
  eventPayload = (0,objectWithoutProperties/* default */.Z)(payload, _excluded);
13283
13336
 
13284
13337
  const {
13285
- uploads,
13286
13338
  entry
13287
13339
  } = serviceSettings;
13340
+ const {
13341
+ upload
13342
+ } = entry.options;
13288
13343
  dispatch((0,store_slice.setFeatureEnabledState)({
13289
13344
  key: seamly_utils.featureKeys.uploads,
13290
- enabled: !!(uploads && uploads.enabled)
13345
+ enabled: !!(upload && upload.enabled)
13291
13346
  }));
13292
13347
  dispatch((0,store_slice.setServiceEntryMetadata)(entry));
13293
13348
  dispatch((0,store_slice.setActiveService)(payload.serviceSessionId));
@@ -16184,7 +16239,9 @@ const Image = _ref => {
16184
16239
  } = _ref,
16185
16240
  props = (0,objectWithoutProperties/* default */.Z)(_ref, _excluded);
16186
16241
 
16187
- const [body] = (0,translations_hooks.useTranslatedEventData)(event);
16242
+ const {
16243
+ body
16244
+ } = (0,translations_hooks.useTranslatedEventData)(event);
16188
16245
  const {
16189
16246
  description,
16190
16247
  url,
@@ -16246,7 +16303,9 @@ const Video = _ref => {
16246
16303
  } = _ref,
16247
16304
  props = (0,objectWithoutProperties/* default */.Z)(_ref, video_excluded);
16248
16305
 
16249
- const [body] = (0,translations_hooks.useTranslatedEventData)(event);
16306
+ const {
16307
+ body
16308
+ } = (0,translations_hooks.useTranslatedEventData)(event);
16250
16309
  const {
16251
16310
  description,
16252
16311
  url
@@ -16305,6 +16364,8 @@ const Divider = _ref => {
16305
16364
  };
16306
16365
 
16307
16366
  /* harmony default export */ var variants_default = (Divider);
16367
+ // EXTERNAL MODULE: ./src/javascripts/domains/translations/slice.ts
16368
+ var translations_slice = __webpack_require__(90841);
16308
16369
  ;// CONCATENATED MODULE: ./src/javascripts/ui/components/conversation/event/divider/variants/new-translation.js
16309
16370
 
16310
16371
 
@@ -16313,6 +16374,11 @@ const Divider = _ref => {
16313
16374
 
16314
16375
 
16315
16376
 
16377
+
16378
+
16379
+
16380
+
16381
+
16316
16382
  const NewTranslationDivider = _ref => {
16317
16383
  let {
16318
16384
  event
@@ -16320,15 +16386,35 @@ const NewTranslationDivider = _ref => {
16320
16386
  const {
16321
16387
  t
16322
16388
  } = (0,i18n_hooks.useI18n)();
16389
+ const events = (0,seamly_hooks.useEvents)();
16323
16390
  const {
16324
- translationEnabled,
16325
- translationLocale,
16326
- text
16327
- } = event.payload.body;
16391
+ body: {
16392
+ translationEnabled,
16393
+ translationLocale,
16394
+ text
16395
+ },
16396
+ id
16397
+ } = event.payload;
16328
16398
  const {
16329
16399
  enableTranslations
16330
16400
  } = (0,translations_hooks.useTranslations)();
16331
16401
  const localeNativeName = (0,translations_hooks.useLocaleNativeName)(translationLocale);
16402
+ const translatedEventGroups = (0,es.useSelector)(state => state.translations.translatedEventGroups);
16403
+ const dispatch = (0,es.useDispatch)();
16404
+ const toggleTranslations = (0,hooks_module.useCallback)(() => {
16405
+ if (!translatedEventGroups[id]) {
16406
+ dispatch((0,translations_slice.disableEventsTranslation)({
16407
+ events,
16408
+ id
16409
+ }));
16410
+ return;
16411
+ }
16412
+
16413
+ dispatch((0,translations_slice.enableEventsTranslation)({
16414
+ events,
16415
+ id
16416
+ }));
16417
+ }, [dispatch, events, id, translatedEventGroups]);
16332
16418
 
16333
16419
  const handleRestartButtonclick = () => {
16334
16420
  enableTranslations(translationLocale);
@@ -16342,10 +16428,17 @@ const NewTranslationDivider = _ref => {
16342
16428
  children: t(translationEnabled ? 'translations.divider.startText' : 'translations.divider.stopText', {
16343
16429
  language: localeNativeName
16344
16430
  })
16345
- }), translationEnabled ? (0,jsxRuntime_module.jsx)("p", {
16346
- children: text
16431
+ }), translationEnabled ? (0,jsxRuntime_module.jsxs)(jsxRuntime_module.Fragment, {
16432
+ children: [(0,jsxRuntime_module.jsx)("p", {
16433
+ children: text
16434
+ }), (0,jsxRuntime_module.jsx)("button", {
16435
+ className: (0,css.className)('button', 'button--secondary'),
16436
+ onClick: toggleTranslations,
16437
+ children: t(!translatedEventGroups[id] ? 'translations.toggle.hideTranslationsButtonText' : 'translations.toggle.showTranslationsButtonText')
16438
+ })]
16347
16439
  }) : (0,jsxRuntime_module.jsx)("button", {
16348
16440
  className: (0,css.className)('button', 'button--secondary'),
16441
+ "data-testid": "restartTranslationButton",
16349
16442
  onClick: handleRestartButtonclick,
16350
16443
  children: t('translations.divider.restartButtonText')
16351
16444
  })]
@@ -16423,7 +16516,9 @@ const Translation = _ref => {
16423
16516
  const {
16424
16517
  t
16425
16518
  } = (0,i18n_hooks.useI18n)();
16426
- const [body] = (0,translations_hooks.useTranslatedEventData)(event);
16519
+ const {
16520
+ body
16521
+ } = (0,translations_hooks.useTranslatedEventData)(event);
16427
16522
  return (0,jsxRuntime_module.jsx)(message_container["default"], translation_objectSpread(translation_objectSpread({
16428
16523
  type: "text",
16429
16524
  event: event
@@ -16445,7 +16540,9 @@ const Participant = _ref => {
16445
16540
  const {
16446
16541
  participant
16447
16542
  } = event.payload;
16448
- const [introduction] = (0,translations_hooks.useTranslatedEventData)(event);
16543
+ const {
16544
+ body: introduction
16545
+ } = (0,translations_hooks.useTranslatedEventData)(event);
16449
16546
 
16450
16547
  if (!introduction) {
16451
16548
  return null;
@@ -16494,7 +16591,9 @@ const Splash = _ref => {
16494
16591
  const {
16495
16592
  payload
16496
16593
  } = event;
16497
- const [body] = (0,translations_hooks.useTranslatedEventData)(event);
16594
+ const {
16595
+ body
16596
+ } = (0,translations_hooks.useTranslatedEventData)(event);
16498
16597
  const eventClick = (0,use_event_link_click_handler/* default */.Z)(payload.id);
16499
16598
  return (0,jsxRuntime_module.jsx)(message_container["default"], splash_objectSpread(splash_objectSpread({
16500
16599
  type: "splash",
@@ -16563,7 +16662,9 @@ const Upload = _ref2 => {
16563
16662
  const {
16564
16663
  t
16565
16664
  } = (0,i18n_hooks.useI18n)();
16566
- const [body] = (0,translations_hooks.useTranslatedEventData)(event);
16665
+ const {
16666
+ body
16667
+ } = (0,translations_hooks.useTranslatedEventData)(event);
16567
16668
  const {
16568
16669
  fromClient
16569
16670
  } = event.payload;
@@ -16614,7 +16715,9 @@ const Cta = _ref => {
16614
16715
  let {
16615
16716
  event
16616
16717
  } = _ref;
16617
- const [body] = (0,translations_hooks.useTranslatedEventData)(event);
16718
+ const {
16719
+ body
16720
+ } = (0,translations_hooks.useTranslatedEventData)(event);
16618
16721
  const eventClick = (0,use_event_link_click_handler/* default */.Z)(event.payload.id);
16619
16722
  const {
16620
16723
  emitEvent
@@ -17040,7 +17143,9 @@ const CarouselMessage = _ref => {
17040
17143
  let {
17041
17144
  event
17042
17145
  } = _ref;
17043
- const [body] = (0,translations_hooks.useTranslatedEventData)(event);
17146
+ const {
17147
+ body
17148
+ } = (0,translations_hooks.useTranslatedEventData)(event);
17044
17149
  const slides = body.cards;
17045
17150
  return (0,jsxRuntime_module.jsx)(message_container["default"], {
17046
17151
  event: event,
@@ -17080,7 +17185,9 @@ const CardMessage = _ref => {
17080
17185
  let {
17081
17186
  event
17082
17187
  } = _ref;
17083
- const [body] = (0,translations_hooks.useTranslatedEventData)(event);
17188
+ const {
17189
+ body
17190
+ } = (0,translations_hooks.useTranslatedEventData)(event);
17084
17191
  const descriptionId = (0,seamly_hooks.useGeneratedId)();
17085
17192
  return (0,jsxRuntime_module.jsx)(message_container["default"], {
17086
17193
  type: "card",
@@ -17130,13 +17237,16 @@ function conversation_suggestions_objectSpread(target) { for (var i = 1; i < arg
17130
17237
 
17131
17238
 
17132
17239
 
17240
+
17133
17241
 
17134
17242
 
17135
17243
  const useSuggestions = event => {
17136
17244
  const {
17137
17245
  payload
17138
17246
  } = event;
17139
- const [suggestions] = (0,translations_hooks.useTranslatedEventData)(event);
17247
+ const {
17248
+ body: suggestions
17249
+ } = (0,translations_hooks.useTranslatedEventData)(event);
17140
17250
  return {
17141
17251
  suggestions,
17142
17252
  payload
@@ -17160,6 +17270,9 @@ const ConversationSuggestions = _ref => {
17160
17270
  suggestions,
17161
17271
  payload
17162
17272
  } = useSuggestions(event);
17273
+ const {
17274
+ showSuggestions
17275
+ } = (0,hooks.useConfig)();
17163
17276
  const events = (0,seamly_hooks.useEvents)();
17164
17277
  const {
17165
17278
  t
@@ -17196,7 +17309,7 @@ const ConversationSuggestions = _ref => {
17196
17309
  addMessageBubble(question);
17197
17310
  }, [dispatch, sendAction, payload.id, addMessageBubble]);
17198
17311
 
17199
- if (!isExpanded || userHasResponded || !hasLastTransactionEvent) {
17312
+ if (!isExpanded || userHasResponded || !hasLastTransactionEvent || !showSuggestions) {
17200
17313
  return null;
17201
17314
  }
17202
17315
 
@@ -17370,6 +17483,8 @@ const PrivacyDisclaimer = () => {
17370
17483
  };
17371
17484
 
17372
17485
  /* harmony default export */ var privacy_disclaimer = (PrivacyDisclaimer);
17486
+ // EXTERNAL MODULE: ./src/javascripts/ui/hooks/focus-helper-hooks.js
17487
+ var focus_helper_hooks = __webpack_require__(68956);
17373
17488
  // EXTERNAL MODULE: ./src/javascripts/ui/hooks/seamly-hooks.js + 2 modules
17374
17489
  var seamly_hooks = __webpack_require__(82849);
17375
17490
  // EXTERNAL MODULE: ./src/javascripts/ui/hooks/seamly-state-hooks.js
@@ -17484,6 +17599,7 @@ const Loader = () => {
17484
17599
 
17485
17600
 
17486
17601
 
17602
+
17487
17603
  const Events = () => {
17488
17604
  const events = (0,seamly_state_hooks.useEvents)();
17489
17605
  let prevParticipant = null;
@@ -17528,11 +17644,15 @@ const Conversation = () => {
17528
17644
  const skiplinkTargetId = (0,seamly_hooks.useSkiplink)();
17529
17645
  const focusSkiplinkTarget = (0,seamly_hooks.useSkiplinkTargetFocusing)();
17530
17646
  const loadedImageEventIds = (0,seamly_state_hooks.useLoadedImageEventIds)();
17531
- (0,hooks_module.useEffect)(() => {
17647
+ (0,hooks_module.useLayoutEffect)(() => {
17532
17648
  const containerElement = chatBodyContainer.current;
17533
17649
 
17534
17650
  if (containerElement) {
17535
- containerElement.scrollTop = containerElement.scrollHeight;
17651
+ requestAnimationFrame(async () => {
17652
+ await (0,focus_helper_hooks/* timeout */.Vs)(30); // Wait for next frame tick
17653
+
17654
+ containerElement.scrollTop = containerElement.scrollHeight;
17655
+ });
17536
17656
  }
17537
17657
  }, [events, isLoading, isOpen, loadedImageEventIds]);
17538
17658
 
@@ -17739,7 +17859,9 @@ const useChoicePrompt = event => {
17739
17859
  activeServiceSessionId
17740
17860
  } = (0,ui_hooks_seamly_hooks__WEBPACK_IMPORTED_MODULE_13__.useSeamlyServiceInfo)();
17741
17861
  const lastEventId = (0,ui_hooks_seamly_hooks__WEBPACK_IMPORTED_MODULE_13__.useLastMessageEventId)();
17742
- const [body] = (0,domains_translations_hooks__WEBPACK_IMPORTED_MODULE_18__.useTranslatedEventData)(event);
17862
+ const {
17863
+ body
17864
+ } = (0,domains_translations_hooks__WEBPACK_IMPORTED_MODULE_18__.useTranslatedEventData)(event);
17743
17865
  const {
17744
17866
  service
17745
17867
  } = payload;
@@ -18162,7 +18284,9 @@ const Text = _ref => {
18162
18284
  } = _ref,
18163
18285
  props = (0,_babel_runtime_corejs3_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z)(_ref, _excluded);
18164
18286
 
18165
- const [body] = (0,domains_translations_hooks__WEBPACK_IMPORTED_MODULE_12__.useTranslatedEventData)(event);
18287
+ const {
18288
+ body
18289
+ } = (0,domains_translations_hooks__WEBPACK_IMPORTED_MODULE_12__.useTranslatedEventData)(event);
18166
18290
  const eventClick = (0,_hooks_use_event_link_click_handler__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z)(event.payload.id);
18167
18291
  const containerProps = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_10__.useMemo)(() => {
18168
18292
  if (event.payload.optimisticallyInjected) {
@@ -18219,13 +18343,11 @@ __webpack_require__.r(__webpack_exports__);
18219
18343
  /* harmony import */ var ui_hooks_component_helper_hooks__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(53357);
18220
18344
  /* harmony import */ var domains_translations_hooks__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(32108);
18221
18345
  /* harmony import */ var domains_translations_hooks__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(domains_translations_hooks__WEBPACK_IMPORTED_MODULE_12__);
18222
- /* harmony import */ var domains_i18n_hooks__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(50546);
18223
- /* harmony import */ var domains_i18n_hooks__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(domains_i18n_hooks__WEBPACK_IMPORTED_MODULE_13__);
18224
- /* harmony import */ var _event_event_participant__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(37409);
18225
- /* harmony import */ var preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(16584);
18346
+ /* harmony import */ var _event_event_participant__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(37409);
18347
+ /* harmony import */ var preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(16584);
18226
18348
 
18227
18349
 
18228
- const _excluded = ["showParticipant", "showTranslationToggle", "event", "type", "modifiers", "children", "bodyProps", "info"];
18350
+ const _excluded = ["showParticipant", "event", "type", "modifiers", "children", "bodyProps", "info"];
18229
18351
 
18230
18352
  function ownKeys(object, enumerableOnly) { var keys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_2___default()(object); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_3___default())) { var symbols = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_3___default()(object); enumerableOnly && (symbols = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default()(symbols).call(symbols, function (sym) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_5___default()(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
18231
18353
 
@@ -18247,11 +18369,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
18247
18369
 
18248
18370
 
18249
18371
 
18250
-
18251
18372
  function MessageContainer(_ref) {
18252
18373
  let {
18253
18374
  showParticipant = true,
18254
- showTranslationToggle = true,
18255
18375
  event,
18256
18376
  type,
18257
18377
  modifiers,
@@ -18263,14 +18383,10 @@ function MessageContainer(_ref) {
18263
18383
 
18264
18384
  const classNames = (0,ui_hooks_component_helper_hooks__WEBPACK_IMPORTED_MODULE_11__/* .useSeamlyMessageContainerClassNames */ .j)(event);
18265
18385
  const {
18266
- t
18267
- } = (0,domains_i18n_hooks__WEBPACK_IMPORTED_MODULE_13__.useI18n)();
18268
- const [, {
18269
18386
  hasTranslation,
18270
18387
  isTranslated,
18271
- toggleTranslation,
18272
18388
  locale
18273
- }] = (0,domains_translations_hooks__WEBPACK_IMPORTED_MODULE_12__.useTranslatedEventData)(event);
18389
+ } = (0,domains_translations_hooks__WEBPACK_IMPORTED_MODULE_12__.useTranslatedEventData)(event);
18274
18390
 
18275
18391
  if (type) {
18276
18392
  classNames.push(`message--type-${type}`);
@@ -18304,27 +18420,20 @@ function MessageContainer(_ref) {
18304
18420
  });
18305
18421
  }
18306
18422
 
18307
- return (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_15__.jsx)(preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_15__.Fragment, {
18308
- children: (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_15__.jsxs)("div", _objectSpread(_objectSpread({
18423
+ return (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.Fragment, {
18424
+ children: (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)("div", _objectSpread(_objectSpread({
18309
18425
  className: (0,lib_css__WEBPACK_IMPORTED_MODULE_10__.className)(classNames)
18310
18426
  }, props), {}, {
18311
- children: [showParticipant && (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_15__.jsx)(_event_event_participant__WEBPACK_IMPORTED_MODULE_14__["default"], {
18427
+ children: [showParticipant && (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_event_event_participant__WEBPACK_IMPORTED_MODULE_13__["default"], {
18312
18428
  eventPayload: event.payload
18313
- }), (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_15__.jsx)("div", _objectSpread(_objectSpread({
18429
+ }), (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("div", _objectSpread(_objectSpread({
18314
18430
  className: (0,lib_css__WEBPACK_IMPORTED_MODULE_10__.className)('message__body')
18315
18431
  }, bodyProps), {}, {
18316
18432
  children: children
18317
- })), info && (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_15__.jsx)("div", {
18433
+ })), info && (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("div", {
18318
18434
  "aria-hidden": "true",
18319
18435
  className: (0,lib_css__WEBPACK_IMPORTED_MODULE_10__.className)('message__info'),
18320
18436
  children: info
18321
- }), showTranslationToggle && hasTranslation && (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_15__.jsx)("div", {
18322
- className: (0,lib_css__WEBPACK_IMPORTED_MODULE_10__.className)('message__translation-info'),
18323
- children: (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_15__.jsx)("button", {
18324
- className: (0,lib_css__WEBPACK_IMPORTED_MODULE_10__.className)('message__translation-toggle', 'button', 'button--secondary'),
18325
- onClick: toggleTranslation,
18326
- children: t(isTranslated ? 'translations.toggle.hideButtonText' : 'translations.toggle.showButtonText')
18327
- })
18328
18437
  })]
18329
18438
  }))
18330
18439
  });
@@ -20475,7 +20584,7 @@ const OptionsButton = () => {
20475
20584
  (0,hooks_module.useEffect)(() => {
20476
20585
  if (menuIsOpen && !prevMenuIsOpen.current) {
20477
20586
  requestAnimationFrame(async () => {
20478
- await (0,focus_helper_hooks/* timeout */.Vs)(180); // Wait for next 3 frame ticks
20587
+ await (0,focus_helper_hooks/* timeout */.Vs)(60); // Wait for next frame tick
20479
20588
 
20480
20589
  const firstActiveOptionIndex = find_index_default()(menuOptions).call(menuOptions, option => option.available);
20481
20590
 
@@ -21547,30 +21656,33 @@ const Interrupt = _ref => {
21547
21656
  /* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87198);
21548
21657
  /* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_0__);
21549
21658
  /* harmony import */ var domains_app_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(79279);
21550
- /* harmony import */ var domains_i18n_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50546);
21551
- /* harmony import */ var domains_i18n_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(domains_i18n_hooks__WEBPACK_IMPORTED_MODULE_2__);
21552
- /* harmony import */ var domains_interrupt_hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(88877);
21553
- /* harmony import */ var domains_interrupt_hooks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(domains_interrupt_hooks__WEBPACK_IMPORTED_MODULE_3__);
21554
- /* harmony import */ var domains_translations_hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(32108);
21555
- /* harmony import */ var domains_translations_hooks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(domains_translations_hooks__WEBPACK_IMPORTED_MODULE_4__);
21556
- /* harmony import */ var domains_visibility_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(12629);
21557
- /* harmony import */ var domains_visibility_hooks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(33742);
21558
- /* harmony import */ var domains_visibility_hooks__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(domains_visibility_hooks__WEBPACK_IMPORTED_MODULE_6__);
21559
- /* harmony import */ var lib_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(35567);
21560
- /* harmony import */ var preact_hooks__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(30396);
21561
- /* harmony import */ var ui_components_suggestions_suggestions_list__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(32841);
21562
- /* harmony import */ var ui_components_widgets_in_out_transition__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(21433);
21563
- /* harmony import */ var ui_hooks_focus_helper_hooks__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(68956);
21564
- /* harmony import */ var ui_hooks_live_region_hooks__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(26639);
21565
- /* harmony import */ var ui_hooks_seamly_state_hooks__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(14809);
21566
- /* harmony import */ var ui_hooks_use_seamly_commands__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(4431);
21567
- /* harmony import */ var ui_hooks_use_seamly_idle_detach_countdown__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(21154);
21568
- /* harmony import */ var ui_hooks_use_seamly_resume_conversation_prompt__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(61256);
21569
- /* harmony import */ var ui_hooks_utility_hooks__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(25029);
21570
- /* harmony import */ var ui_utils_general_utils__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(64959);
21571
- /* harmony import */ var ui_utils_seamly_utils__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(45740);
21572
- /* harmony import */ var ui_utils_seamly_utils__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(ui_utils_seamly_utils__WEBPACK_IMPORTED_MODULE_19__);
21573
- /* harmony import */ var preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(16584);
21659
+ /* harmony import */ var domains_config_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(26065);
21660
+ /* harmony import */ var domains_config_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(domains_config_hooks__WEBPACK_IMPORTED_MODULE_2__);
21661
+ /* harmony import */ var domains_i18n_hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(50546);
21662
+ /* harmony import */ var domains_i18n_hooks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(domains_i18n_hooks__WEBPACK_IMPORTED_MODULE_3__);
21663
+ /* harmony import */ var domains_interrupt_hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(88877);
21664
+ /* harmony import */ var domains_interrupt_hooks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(domains_interrupt_hooks__WEBPACK_IMPORTED_MODULE_4__);
21665
+ /* harmony import */ var domains_translations_hooks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(32108);
21666
+ /* harmony import */ var domains_translations_hooks__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(domains_translations_hooks__WEBPACK_IMPORTED_MODULE_5__);
21667
+ /* harmony import */ var domains_visibility_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(12629);
21668
+ /* harmony import */ var domains_visibility_hooks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(33742);
21669
+ /* harmony import */ var domains_visibility_hooks__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(domains_visibility_hooks__WEBPACK_IMPORTED_MODULE_7__);
21670
+ /* harmony import */ var lib_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(35567);
21671
+ /* harmony import */ var preact_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(30396);
21672
+ /* harmony import */ var ui_components_suggestions_suggestions_list__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(32841);
21673
+ /* harmony import */ var ui_components_widgets_in_out_transition__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(21433);
21674
+ /* harmony import */ var ui_hooks_focus_helper_hooks__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(68956);
21675
+ /* harmony import */ var ui_hooks_live_region_hooks__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(26639);
21676
+ /* harmony import */ var ui_hooks_seamly_state_hooks__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(14809);
21677
+ /* harmony import */ var ui_hooks_use_seamly_commands__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(4431);
21678
+ /* harmony import */ var ui_hooks_use_seamly_idle_detach_countdown__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(21154);
21679
+ /* harmony import */ var ui_hooks_use_seamly_resume_conversation_prompt__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(61256);
21680
+ /* harmony import */ var ui_hooks_utility_hooks__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(25029);
21681
+ /* harmony import */ var ui_utils_general_utils__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(64959);
21682
+ /* harmony import */ var ui_utils_seamly_utils__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(45740);
21683
+ /* harmony import */ var ui_utils_seamly_utils__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(ui_utils_seamly_utils__WEBPACK_IMPORTED_MODULE_20__);
21684
+ /* harmony import */ var preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(16584);
21685
+
21574
21686
 
21575
21687
 
21576
21688
 
@@ -21601,64 +21713,69 @@ const Suggestions = _ref => {
21601
21713
  // generic hooks
21602
21714
  const {
21603
21715
  isInline
21604
- } = (0,ui_hooks_seamly_state_hooks__WEBPACK_IMPORTED_MODULE_13__.useSeamlyLayoutMode)();
21716
+ } = (0,ui_hooks_seamly_state_hooks__WEBPACK_IMPORTED_MODULE_14__.useSeamlyLayoutMode)();
21605
21717
  const {
21606
21718
  t
21607
- } = (0,domains_i18n_hooks__WEBPACK_IMPORTED_MODULE_2__.useI18n)();
21719
+ } = (0,domains_i18n_hooks__WEBPACK_IMPORTED_MODULE_3__.useI18n)();
21608
21720
  const {
21609
21721
  sendAction,
21610
21722
  addMessageBubble
21611
- } = (0,ui_hooks_use_seamly_commands__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z)();
21723
+ } = (0,ui_hooks_use_seamly_commands__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z)();
21612
21724
  const {
21613
21725
  isOpen,
21614
21726
  setVisibility
21615
- } = (0,domains_visibility_hooks__WEBPACK_IMPORTED_MODULE_6__.useVisibility)(); // a11y hooks
21727
+ } = (0,domains_visibility_hooks__WEBPACK_IMPORTED_MODULE_7__.useVisibility)();
21728
+ const {
21729
+ showSuggestions
21730
+ } = (0,domains_config_hooks__WEBPACK_IMPORTED_MODULE_2__.useConfig)(); // a11y hooks
21616
21731
 
21617
- const sectionId = (0,ui_hooks_utility_hooks__WEBPACK_IMPORTED_MODULE_17__/* .useGeneratedId */ .I8)();
21618
- const focusSkiplinkTarget = (0,ui_hooks_focus_helper_hooks__WEBPACK_IMPORTED_MODULE_11__/* .useSkiplinkTargetFocusing */ .MI)();
21619
- const containerRef = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_8__.useRef)(null);
21732
+ const sectionId = (0,ui_hooks_utility_hooks__WEBPACK_IMPORTED_MODULE_18__/* .useGeneratedId */ .I8)();
21733
+ const focusSkiplinkTarget = (0,ui_hooks_focus_helper_hooks__WEBPACK_IMPORTED_MODULE_12__/* .useSkiplinkTargetFocusing */ .MI)();
21734
+ const containerRef = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_9__.useRef)(null);
21620
21735
  const {
21621
21736
  sendPolite
21622
- } = (0,ui_hooks_live_region_hooks__WEBPACK_IMPORTED_MODULE_12__/* .useLiveRegion */ .t)(); // interrupt & countdown hooks
21737
+ } = (0,ui_hooks_live_region_hooks__WEBPACK_IMPORTED_MODULE_13__/* .useLiveRegion */ .t)(); // interrupt & countdown hooks
21623
21738
 
21624
21739
  const {
21625
21740
  hasInterrupt
21626
- } = (0,domains_interrupt_hooks__WEBPACK_IMPORTED_MODULE_3__.useInterrupt)();
21741
+ } = (0,domains_interrupt_hooks__WEBPACK_IMPORTED_MODULE_4__.useInterrupt)();
21627
21742
  const {
21628
21743
  hasCountdown,
21629
21744
  endCountdown
21630
- } = (0,ui_hooks_use_seamly_idle_detach_countdown__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z)();
21745
+ } = (0,ui_hooks_use_seamly_idle_detach_countdown__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .Z)();
21631
21746
  const {
21632
21747
  hasPrompt,
21633
21748
  continueChat
21634
- } = (0,ui_hooks_use_seamly_resume_conversation_prompt__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .Z)(); // data hooks
21749
+ } = (0,ui_hooks_use_seamly_resume_conversation_prompt__WEBPACK_IMPORTED_MODULE_17__/* ["default"] */ .Z)(); // data hooks
21635
21750
 
21636
21751
  const userHasResponded = (0,domains_app_hooks__WEBPACK_IMPORTED_MODULE_1__/* .useUserHasResponded */ .h)();
21637
- const payload = (0,ui_hooks_seamly_state_hooks__WEBPACK_IMPORTED_MODULE_13__.useSeamlyServiceData)('suggestion');
21638
- const [eventBody] = (0,domains_translations_hooks__WEBPACK_IMPORTED_MODULE_4__.useTranslatedEventData)({
21752
+ const payload = (0,ui_hooks_seamly_state_hooks__WEBPACK_IMPORTED_MODULE_14__.useSeamlyServiceData)('suggestion');
21753
+ const {
21754
+ body: eventBody
21755
+ } = (0,domains_translations_hooks__WEBPACK_IMPORTED_MODULE_5__.useTranslatedEventData)({
21639
21756
  payload
21640
21757
  });
21641
- const suggestions = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_8__.useMemo)(() => payload && !hasInterrupt ? eventBody : [], [payload, hasInterrupt, eventBody]);
21642
- const prevSuggestions = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_8__.useRef)(null);
21643
- const prevHasSuggestions = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_8__.useRef)(false);
21644
- const previousRenderedSuggestions = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_8__.useRef)([]);
21758
+ const suggestions = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_9__.useMemo)(() => payload && !hasInterrupt ? eventBody : [], [payload, hasInterrupt, eventBody]);
21759
+ const prevSuggestions = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_9__.useRef)(null);
21760
+ const prevHasSuggestions = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_9__.useRef)(false);
21761
+ const previousRenderedSuggestions = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_9__.useRef)([]);
21645
21762
  const hasSuggestions = !!suggestions.length;
21646
21763
  const hideSuggestions = isInline ? (userHasResponded || isOpen) && !isAside : userHasResponded;
21647
- const prevHideSuggestions = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_8__.useRef)(hideSuggestions);
21648
- const showSuggestionsContainer = hasSuggestions && !hideSuggestions;
21764
+ const prevHideSuggestions = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_9__.useRef)(hideSuggestions);
21765
+ const showSuggestionsContainer = hasSuggestions && !hideSuggestions && showSuggestions;
21649
21766
  const renderedSuggestions = hasSuggestions ? suggestions : previousRenderedSuggestions.current;
21650
21767
  previousRenderedSuggestions.current = renderedSuggestions;
21651
- const suggestionsClassNames = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_8__.useMemo)(() => {
21768
+ const suggestionsClassNames = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_9__.useMemo)(() => {
21652
21769
  const classNames = ['suggestions'];
21653
21770
 
21654
21771
  if (isAside) {
21655
21772
  classNames.push('suggestions--aside');
21656
21773
  }
21657
21774
 
21658
- return (0,lib_css__WEBPACK_IMPORTED_MODULE_7__.className)(classNames);
21775
+ return (0,lib_css__WEBPACK_IMPORTED_MODULE_8__.className)(classNames);
21659
21776
  }, [isAside]); // click handler
21660
21777
 
21661
- const handleClick = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_8__.useCallback)(_ref2 => {
21778
+ const handleClick = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_9__.useCallback)(_ref2 => {
21662
21779
  let {
21663
21780
  id,
21664
21781
  question
@@ -21674,7 +21791,7 @@ const Suggestions = _ref => {
21674
21791
 
21675
21792
 
21676
21793
  sendAction({
21677
- type: ui_utils_seamly_utils__WEBPACK_IMPORTED_MODULE_19__.actionTypes.custom,
21794
+ type: ui_utils_seamly_utils__WEBPACK_IMPORTED_MODULE_20__.actionTypes.custom,
21678
21795
  originMessage: payload.id,
21679
21796
  body: {
21680
21797
  type: 'faqclick',
@@ -21687,12 +21804,12 @@ const Suggestions = _ref => {
21687
21804
  addMessageBubble(question);
21688
21805
 
21689
21806
  if (!isOpen) {
21690
- setVisibility(domains_visibility_constants__WEBPACK_IMPORTED_MODULE_5__.visibilityStates.open);
21807
+ setVisibility(domains_visibility_constants__WEBPACK_IMPORTED_MODULE_6__.visibilityStates.open);
21691
21808
  }
21692
21809
 
21693
21810
  focusSkiplinkTarget();
21694
21811
  }, [addMessageBubble, continueChat, endCountdown, focusSkiplinkTarget, hasCountdown, hasPrompt, payload, sendAction, setVisibility, isOpen]);
21695
- (0,preact_hooks__WEBPACK_IMPORTED_MODULE_8__.useEffect)(() => {
21812
+ (0,preact_hooks__WEBPACK_IMPORTED_MODULE_9__.useEffect)(() => {
21696
21813
  if (prevSuggestions.current !== suggestions && !hideSuggestions) {
21697
21814
  if (hasSuggestions) {
21698
21815
  const politeText = prevHasSuggestions.current ? t('suggestions.srUpdatedText') : t('suggestions.srAvailableText');
@@ -21708,10 +21825,10 @@ const Suggestions = _ref => {
21708
21825
  }
21709
21826
 
21710
21827
  if (!prevHideSuggestions.current && hideSuggestions) {
21711
- (0,ui_utils_general_utils__WEBPACK_IMPORTED_MODULE_18__.runIfElementContainsOrHasFocus)(containerRef.current, focusSkiplinkTarget);
21828
+ (0,ui_utils_general_utils__WEBPACK_IMPORTED_MODULE_19__.runIfElementContainsOrHasFocus)(containerRef.current, focusSkiplinkTarget);
21712
21829
  sendPolite(t('suggestions.srUnavailableText'));
21713
21830
  } else if (!hasSuggestions && prevHasSuggestions.current) {
21714
- (0,ui_utils_general_utils__WEBPACK_IMPORTED_MODULE_18__.runIfElementContainsOrHasFocus)(containerRef.current, focusSkiplinkTarget);
21831
+ (0,ui_utils_general_utils__WEBPACK_IMPORTED_MODULE_19__.runIfElementContainsOrHasFocus)(containerRef.current, focusSkiplinkTarget);
21715
21832
  }
21716
21833
 
21717
21834
  prevHasSuggestions.current = hasSuggestions;
@@ -21720,22 +21837,22 @@ const Suggestions = _ref => {
21720
21837
  const headingText = t('suggestions.headingText');
21721
21838
  const footerText = t('suggestions.footerText');
21722
21839
  const ContainerElement = headingText ? 'section' : 'div';
21723
- return (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsx)(ui_components_widgets_in_out_transition__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
21840
+ return (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_21__.jsx)(ui_components_widgets_in_out_transition__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, {
21724
21841
  isActive: showSuggestionsContainer,
21725
- transitionStartState: ui_components_widgets_in_out_transition__WEBPACK_IMPORTED_MODULE_10__/* .transitionStartStates.notRendered */ .I.notRendered,
21726
- children: (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsxs)(ContainerElement, {
21842
+ transitionStartState: ui_components_widgets_in_out_transition__WEBPACK_IMPORTED_MODULE_11__/* .transitionStartStates.notRendered */ .I.notRendered,
21843
+ children: (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_21__.jsxs)(ContainerElement, {
21727
21844
  className: suggestionsClassNames,
21728
21845
  "aria-labelledby": headingText ? sectionId : null,
21729
21846
  ref: containerRef,
21730
- children: [headingText && (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsx)("p", {
21847
+ children: [headingText && (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_21__.jsx)("p", {
21731
21848
  id: sectionId,
21732
- className: (0,lib_css__WEBPACK_IMPORTED_MODULE_7__.className)('suggestions__heading'),
21849
+ className: (0,lib_css__WEBPACK_IMPORTED_MODULE_8__.className)('suggestions__heading'),
21733
21850
  children: headingText
21734
- }), !!renderedSuggestions.length && (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsx)(ui_components_suggestions_suggestions_list__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z, {
21851
+ }), !!renderedSuggestions.length && (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_21__.jsx)(ui_components_suggestions_suggestions_list__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
21735
21852
  suggestions: renderedSuggestions,
21736
21853
  onClickSuggestion: handleClick
21737
- }), footerText && !isOpen && (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsx)("p", {
21738
- className: (0,lib_css__WEBPACK_IMPORTED_MODULE_7__.className)('suggestions__footer'),
21854
+ }), footerText && !isOpen && (0,preact_jsx_runtime__WEBPACK_IMPORTED_MODULE_21__.jsx)("p", {
21855
+ className: (0,lib_css__WEBPACK_IMPORTED_MODULE_8__.className)('suggestions__footer'),
21739
21856
  children: footerText
21740
21857
  })]
21741
21858
  })
@@ -22028,7 +22145,9 @@ const Faq = () => {
22028
22145
  continueChat
22029
22146
  } = (0,use_seamly_resume_conversation_prompt/* default */.Z)();
22030
22147
  const lastFaqEventPayload = (0,seamly_state_hooks.useSeamlyServiceData)('suggestion');
22031
- const [eventBody] = (0,translations_hooks.useTranslatedEventData)({
22148
+ const {
22149
+ body: eventBody
22150
+ } = (0,translations_hooks.useTranslatedEventData)({
22032
22151
  payload: lastFaqEventPayload
22033
22152
  });
22034
22153
  const faqs = (0,hooks_module.useMemo)(() => {
@@ -23475,11 +23594,13 @@ const useSeamlyEventStream = (nextFn, filterFn) => {
23475
23594
  "use strict";
23476
23595
  __webpack_require__.r(__webpack_exports__);
23477
23596
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23597
+ /* harmony export */ "selectEventIds": function() { return /* binding */ selectEventIds; },
23478
23598
  /* harmony export */ "selectEvents": function() { return /* binding */ selectEvents; },
23479
23599
  /* harmony export */ "selectEventsWithSuggestion": function() { return /* binding */ selectEventsWithSuggestion; },
23480
23600
  /* harmony export */ "selectState": function() { return /* binding */ selectState; },
23481
23601
  /* harmony export */ "useEntryTextLimit": function() { return /* binding */ useEntryTextLimit; },
23482
23602
  /* harmony export */ "useEvents": function() { return /* binding */ useEvents; },
23603
+ /* harmony export */ "useEventsIds": function() { return /* binding */ useEventsIds; },
23483
23604
  /* harmony export */ "useLastMessageEventId": function() { return /* binding */ useLastMessageEventId; },
23484
23605
  /* harmony export */ "useLoadedImageEventIds": function() { return /* binding */ useLoadedImageEventIds; },
23485
23606
  /* harmony export */ "useSeamlyCurrentAgent": function() { return /* binding */ useSeamlyCurrentAgent; },
@@ -23509,17 +23630,19 @@ __webpack_require__.r(__webpack_exports__);
23509
23630
  /* harmony import */ var _babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(44845);
23510
23631
  /* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(86);
23511
23632
  /* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8__);
23633
+ /* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(97606);
23634
+ /* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_9__);
23512
23635
  /* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(14418);
23513
23636
  /* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7__);
23514
- /* harmony import */ var domains_config_selectors__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(84788);
23515
- /* harmony import */ var domains_config_selectors__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(domains_config_selectors__WEBPACK_IMPORTED_MODULE_9__);
23516
- /* harmony import */ var ui_utils_general_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(64959);
23517
- /* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(20573);
23518
- /* harmony import */ var domains_app_selectors__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(25865);
23519
- /* harmony import */ var domains_app_selectors__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(domains_app_selectors__WEBPACK_IMPORTED_MODULE_11__);
23520
- /* harmony import */ var domains_config_hooks__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(26065);
23521
- /* harmony import */ var domains_config_hooks__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(domains_config_hooks__WEBPACK_IMPORTED_MODULE_12__);
23522
- /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(36113);
23637
+ /* harmony import */ var domains_config_selectors__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(84788);
23638
+ /* harmony import */ var domains_config_selectors__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(domains_config_selectors__WEBPACK_IMPORTED_MODULE_10__);
23639
+ /* harmony import */ var ui_utils_general_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(64959);
23640
+ /* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(20573);
23641
+ /* harmony import */ var domains_app_selectors__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(25865);
23642
+ /* harmony import */ var domains_app_selectors__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(domains_app_selectors__WEBPACK_IMPORTED_MODULE_12__);
23643
+ /* harmony import */ var domains_config_hooks__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(26065);
23644
+ /* harmony import */ var domains_config_hooks__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(domains_config_hooks__WEBPACK_IMPORTED_MODULE_13__);
23645
+ /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(36113);
23523
23646
 
23524
23647
 
23525
23648
 
@@ -23540,14 +23663,15 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
23540
23663
 
23541
23664
 
23542
23665
 
23666
+
23543
23667
  const selectState = _ref => {
23544
23668
  let {
23545
23669
  state
23546
23670
  } = _ref;
23547
23671
  return state;
23548
23672
  };
23549
- const useSeamlyStateContext = () => (0,react_redux__WEBPACK_IMPORTED_MODULE_13__.useSelector)(selectState);
23550
- const selectEventsWithSuggestion = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_14__.createSelector)(selectState, domains_config_selectors__WEBPACK_IMPORTED_MODULE_9__.selectConfig, domains_app_selectors__WEBPACK_IMPORTED_MODULE_11__.selectUserHasResponded, (_ref2, config, hasUserResponded) => {
23673
+ const useSeamlyStateContext = () => (0,react_redux__WEBPACK_IMPORTED_MODULE_14__.useSelector)(selectState);
23674
+ const selectEventsWithSuggestion = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_15__.createSelector)(selectState, domains_config_selectors__WEBPACK_IMPORTED_MODULE_10__.selectConfig, domains_app_selectors__WEBPACK_IMPORTED_MODULE_12__.selectUserHasResponded, (_ref2, config, hasUserResponded) => {
23551
23675
  var _serviceData$suggesti;
23552
23676
 
23553
23677
  let {
@@ -23565,7 +23689,7 @@ const selectEventsWithSuggestion = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_
23565
23689
  };
23566
23690
  return [...events, suggestionsEvent];
23567
23691
  });
23568
- const selectEvents = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_14__.createSelector)(selectEventsWithSuggestion, domains_config_selectors__WEBPACK_IMPORTED_MODULE_9__.selectConfig, (events, config) => {
23692
+ const selectEvents = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_15__.createSelector)(selectEventsWithSuggestion, domains_config_selectors__WEBPACK_IMPORTED_MODULE_10__.selectConfig, (events, config) => {
23569
23693
  var _config$messages;
23570
23694
 
23571
23695
  const {
@@ -23587,7 +23711,7 @@ const selectEvents = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_14__.createSel
23587
23711
  timeIndicator: event.payload.occurredAt
23588
23712
  })); // else check if diff is greater than threshold
23589
23713
  } else {
23590
- const timeIndicator = previousEvent && (0,ui_utils_general_utils__WEBPACK_IMPORTED_MODULE_10__.microsecondsToMilliseconds)(event.payload.occurredAt - previousEvent.payload.occurredAt) >= threshold ? event.payload.occurredAt : undefined;
23714
+ const timeIndicator = previousEvent && (0,ui_utils_general_utils__WEBPACK_IMPORTED_MODULE_11__.microsecondsToMilliseconds)(event.payload.occurredAt - previousEvent.payload.occurredAt) >= threshold ? event.payload.occurredAt : undefined;
23591
23715
  mappedEvents.push(_objectSpread(_objectSpread({}, event), {}, {
23592
23716
  timeIndicator
23593
23717
  }));
@@ -23598,7 +23722,11 @@ const selectEvents = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_14__.createSel
23598
23722
 
23599
23723
  return mappedEvents;
23600
23724
  });
23601
- const useEvents = () => (0,react_redux__WEBPACK_IMPORTED_MODULE_13__.useSelector)(selectEvents);
23725
+ const useEvents = () => (0,react_redux__WEBPACK_IMPORTED_MODULE_14__.useSelector)(selectEvents);
23726
+ const selectEventIds = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_15__.createSelector)(selectEvents, events => {
23727
+ return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_9___default()(events).call(events, event => event.payload.id);
23728
+ });
23729
+ const useEventsIds = () => (0,react_redux__WEBPACK_IMPORTED_MODULE_14__.useSelector)(selectEventIds);
23602
23730
  const useSeamlyIsLoading = () => useSeamlyStateContext().isLoading;
23603
23731
  const useSeamlyHeaderData = () => useSeamlyStateContext().headerTitles;
23604
23732
  const useSeamlyUnreadCount = () => useSeamlyStateContext().unreadEvents;
@@ -23606,14 +23734,14 @@ const useLoadedImageEventIds = () => useSeamlyStateContext().loadedImageEventIds
23606
23734
  const useSkiplink = () => useSeamlyStateContext().skiplinkTargetId;
23607
23735
  const useSeamlyParticipant = participantId => useSeamlyStateContext().participantInfo.participants[participantId];
23608
23736
  const useSeamlyServiceInfo = () => useSeamlyStateContext().serviceInfo;
23609
- const selectLastMessageEventId = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_14__.createSelector)(selectEvents, events => {
23737
+ const selectLastMessageEventId = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_15__.createSelector)(selectEvents, events => {
23610
23738
  var _filteredEvents;
23611
23739
 
23612
23740
  const filteredEvents = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(events).call(events, event => event.type === 'message');
23613
23741
 
23614
23742
  return (_filteredEvents = filteredEvents[filteredEvents.length - 1]) === null || _filteredEvents === void 0 ? void 0 : _filteredEvents.payload.id;
23615
23743
  });
23616
- const useLastMessageEventId = () => (0,react_redux__WEBPACK_IMPORTED_MODULE_13__.useSelector)(selectLastMessageEventId);
23744
+ const useLastMessageEventId = () => (0,react_redux__WEBPACK_IMPORTED_MODULE_14__.useSelector)(selectLastMessageEventId);
23617
23745
  const useSeamlyIsHistoryLoaded = () => useSeamlyStateContext().historyLoaded;
23618
23746
  const useSeamlyCurrentAgent = () => {
23619
23747
  const {
@@ -23649,7 +23777,7 @@ const useEntryTextLimit = () => {
23649
23777
  const useSeamlyLayoutMode = () => {
23650
23778
  const {
23651
23779
  layoutMode
23652
- } = (0,domains_config_hooks__WEBPACK_IMPORTED_MODULE_12__.useConfig)();
23780
+ } = (0,domains_config_hooks__WEBPACK_IMPORTED_MODULE_13__.useConfig)();
23653
23781
  return {
23654
23782
  isInline: layoutMode === 'inline',
23655
23783
  isWindow: layoutMode === 'window',
@@ -23751,7 +23879,6 @@ const useSeamlyChat = () => {
23751
23879
  } = (0,domains_visibility_hooks__WEBPACK_IMPORTED_MODULE_4__.useVisibility)();
23752
23880
  const showInlineView = (0,react_redux__WEBPACK_IMPORTED_MODULE_6__.useSelector)(_domains_visibility_selectors__WEBPACK_IMPORTED_MODULE_7__.selectShowInlineView);
23753
23881
  const dispatch = (0,react_redux__WEBPACK_IMPORTED_MODULE_6__.useDispatch)();
23754
- const events = (0,_seamly_state_hooks__WEBPACK_IMPORTED_MODULE_10__.useEvents)();
23755
23882
  const spinnerTimeout = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_5__.useRef)(null);
23756
23883
  const {
23757
23884
  start,
@@ -23766,7 +23893,6 @@ const useSeamlyChat = () => {
23766
23893
  const {
23767
23894
  sendAssertive
23768
23895
  } = (0,_live_region_hooks__WEBPACK_IMPORTED_MODULE_8__/* .useLiveRegion */ .t)();
23769
- const hasEvents = events.length > 0;
23770
23896
  (0,preact_hooks__WEBPACK_IMPORTED_MODULE_5__.useEffect)(() => {
23771
23897
  if (isVisible) {
23772
23898
  // Wait for the live containers to stabilise in the DOM before injecting
@@ -23800,13 +23926,10 @@ const useSeamlyChat = () => {
23800
23926
  spinnerTimeout.current = _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_0___default()(() => {
23801
23927
  dispatch((0,domains_store_slice__WEBPACK_IMPORTED_MODULE_2__.setIsLoading)(true));
23802
23928
  }, 500);
23803
- }, [dispatch]);
23804
- (0,preact_hooks__WEBPACK_IMPORTED_MODULE_5__.useEffect)(() => {
23805
- if (hasEvents) {
23929
+ return () => {
23806
23930
  clearTimeout(spinnerTimeout.current);
23807
- dispatch((0,domains_store_slice__WEBPACK_IMPORTED_MODULE_2__.setIsLoading)(false));
23808
- }
23809
- }, [hasEvents, dispatch]);
23931
+ };
23932
+ }, [dispatch]);
23810
23933
  (0,preact_hooks__WEBPACK_IMPORTED_MODULE_5__.useEffect)(() => {
23811
23934
  // This is needed to reset the ref to allow connect and start to happen again.
23812
23935
  // Mostly due to Interrupt situations and a reset being called.
@@ -25281,6 +25404,17 @@ var entryVirtual = __webpack_require__(35703);
25281
25404
  module.exports = entryVirtual('Array').sort;
25282
25405
 
25283
25406
 
25407
+ /***/ }),
25408
+
25409
+ /***/ 78209:
25410
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
25411
+
25412
+ __webpack_require__(98611);
25413
+ var entryVirtual = __webpack_require__(35703);
25414
+
25415
+ module.exports = entryVirtual('Array').splice;
25416
+
25417
+
25284
25418
  /***/ }),
25285
25419
 
25286
25420
  /***/ 81103:
@@ -25576,6 +25710,22 @@ module.exports = function (it) {
25576
25710
  };
25577
25711
 
25578
25712
 
25713
+ /***/ }),
25714
+
25715
+ /***/ 18339:
25716
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
25717
+
25718
+ var isPrototypeOf = __webpack_require__(7046);
25719
+ var method = __webpack_require__(78209);
25720
+
25721
+ var ArrayPrototype = Array.prototype;
25722
+
25723
+ module.exports = function (it) {
25724
+ var own = it.splice;
25725
+ return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.splice) ? method : own;
25726
+ };
25727
+
25728
+
25579
25729
  /***/ }),
25580
25730
 
25581
25731
  /***/ 62774:
@@ -26429,6 +26579,41 @@ module.exports = {
26429
26579
  };
26430
26580
 
26431
26581
 
26582
+ /***/ }),
26583
+
26584
+ /***/ 89779:
26585
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
26586
+
26587
+ "use strict";
26588
+
26589
+ var DESCRIPTORS = __webpack_require__(55746);
26590
+ var isArray = __webpack_require__(1052);
26591
+
26592
+ var $TypeError = TypeError;
26593
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
26594
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
26595
+
26596
+ // Safari < 13 does not throw an error in this case
26597
+ var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {
26598
+ // makes no sense without proper strict mode support
26599
+ if (this !== undefined) return true;
26600
+ try {
26601
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
26602
+ Object.defineProperty([], 'length', { writable: false }).length = 1;
26603
+ } catch (error) {
26604
+ return error instanceof TypeError;
26605
+ }
26606
+ }();
26607
+
26608
+ module.exports = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
26609
+ if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
26610
+ throw $TypeError('Cannot set read only .length');
26611
+ } return O.length = length;
26612
+ } : function (O, length) {
26613
+ return O.length = length;
26614
+ };
26615
+
26616
+
26432
26617
  /***/ }),
26433
26618
 
26434
26619
  /***/ 15790:
@@ -31180,6 +31365,81 @@ $({ target: 'Array', proto: true, forced: FORCED }, {
31180
31365
  });
31181
31366
 
31182
31367
 
31368
+ /***/ }),
31369
+
31370
+ /***/ 98611:
31371
+ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
31372
+
31373
+ "use strict";
31374
+
31375
+ var $ = __webpack_require__(76887);
31376
+ var toObject = __webpack_require__(89678);
31377
+ var toAbsoluteIndex = __webpack_require__(59413);
31378
+ var toIntegerOrInfinity = __webpack_require__(62435);
31379
+ var lengthOfArrayLike = __webpack_require__(10623);
31380
+ var setArrayLength = __webpack_require__(89779);
31381
+ var doesNotExceedSafeInteger = __webpack_require__(66796);
31382
+ var arraySpeciesCreate = __webpack_require__(64692);
31383
+ var createProperty = __webpack_require__(55449);
31384
+ var deletePropertyOrThrow = __webpack_require__(15863);
31385
+ var arrayMethodHasSpeciesSupport = __webpack_require__(50568);
31386
+
31387
+ var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
31388
+
31389
+ var max = Math.max;
31390
+ var min = Math.min;
31391
+
31392
+ // `Array.prototype.splice` method
31393
+ // https://tc39.es/ecma262/#sec-array.prototype.splice
31394
+ // with adding support of @@species
31395
+ $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
31396
+ splice: function splice(start, deleteCount /* , ...items */) {
31397
+ var O = toObject(this);
31398
+ var len = lengthOfArrayLike(O);
31399
+ var actualStart = toAbsoluteIndex(start, len);
31400
+ var argumentsLength = arguments.length;
31401
+ var insertCount, actualDeleteCount, A, k, from, to;
31402
+ if (argumentsLength === 0) {
31403
+ insertCount = actualDeleteCount = 0;
31404
+ } else if (argumentsLength === 1) {
31405
+ insertCount = 0;
31406
+ actualDeleteCount = len - actualStart;
31407
+ } else {
31408
+ insertCount = argumentsLength - 2;
31409
+ actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
31410
+ }
31411
+ doesNotExceedSafeInteger(len + insertCount - actualDeleteCount);
31412
+ A = arraySpeciesCreate(O, actualDeleteCount);
31413
+ for (k = 0; k < actualDeleteCount; k++) {
31414
+ from = actualStart + k;
31415
+ if (from in O) createProperty(A, k, O[from]);
31416
+ }
31417
+ A.length = actualDeleteCount;
31418
+ if (insertCount < actualDeleteCount) {
31419
+ for (k = actualStart; k < len - actualDeleteCount; k++) {
31420
+ from = k + actualDeleteCount;
31421
+ to = k + insertCount;
31422
+ if (from in O) O[to] = O[from];
31423
+ else deletePropertyOrThrow(O, to);
31424
+ }
31425
+ for (k = len; k > len - actualDeleteCount + insertCount; k--) deletePropertyOrThrow(O, k - 1);
31426
+ } else if (insertCount > actualDeleteCount) {
31427
+ for (k = len - actualDeleteCount; k > actualStart; k--) {
31428
+ from = k + actualDeleteCount - 1;
31429
+ to = k + insertCount - 1;
31430
+ if (from in O) O[to] = O[from];
31431
+ else deletePropertyOrThrow(O, to);
31432
+ }
31433
+ }
31434
+ for (k = 0; k < insertCount; k++) {
31435
+ O[k + actualStart] = arguments[k + 2];
31436
+ }
31437
+ setArrayLength(O, len - actualDeleteCount + insertCount);
31438
+ return A;
31439
+ }
31440
+ });
31441
+
31442
+
31183
31443
  /***/ }),
31184
31444
 
31185
31445
  /***/ 1107:
@@ -33164,6 +33424,16 @@ var parent = __webpack_require__(69355);
33164
33424
  module.exports = parent;
33165
33425
 
33166
33426
 
33427
+ /***/ }),
33428
+
33429
+ /***/ 2348:
33430
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
33431
+
33432
+ var parent = __webpack_require__(18339);
33433
+
33434
+ module.exports = parent;
33435
+
33436
+
33167
33437
  /***/ }),
33168
33438
 
33169
33439
  /***/ 76361:
@@ -39042,6 +39312,13 @@ module.exports = __webpack_require__(62856);
39042
39312
 
39043
39313
  /***/ }),
39044
39314
 
39315
+ /***/ 39940:
39316
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39317
+
39318
+ module.exports = __webpack_require__(2348);
39319
+
39320
+ /***/ }),
39321
+
39045
39322
  /***/ 81607:
39046
39323
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
39047
39324