@bcrumbs.net/inbox 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js CHANGED
@@ -2,10 +2,12 @@ import _styled from '@emotion/styled/base';
2
2
  import * as ReactJSXRuntime from 'react/jsx-runtime';
3
3
  import { Fragment as Fragment$1, jsx as jsx$1, jsxs as jsxs$1 } from 'react/jsx-runtime';
4
4
  import * as React$1 from 'react';
5
- import React__default, { forwardRef, useContext as useContext$1, createContext, useState, useRef, useEffect, useMemo, useLayoutEffect, useCallback, useDebugValue, createElement, Component, useReducer } from 'react';
5
+ import React__default, { forwardRef, useContext as useContext$1, useEffect, useMemo, useState, useRef, useLayoutEffect, useCallback, createContext, useDebugValue, createElement, Component, useReducer } from 'react';
6
6
  import { coreClient, botClient, ModelFieldsTypes, companyUsersQuery, dconfigClient } from '@bcrumbs.net/bc-api';
7
+ export { botClient, coreClient, dconfigClient, dqueryClient } from '@bcrumbs.net/bc-api';
7
8
  import { auth, LangService, BCRoutes } from '@bcrumbs.net/bc-shared';
8
9
  export { auth } from '@bcrumbs.net/bc-shared';
10
+ import { useTranslation } from 'react-i18next';
9
11
  import { usePolling, Color, BCText, TextSize, TextWeight, BCButton, ButtonSize, BCPopup, BCHorizontalLayout, FlexAlignItems, FlexJustifyContent, triggerErrorToast, BCDropList, BCLoading, BCValidationTypes, useBCForm, BCVerticalLayout, BCTextbox, BCSkeleton, TextAlign, BCIcons, BCInputWithSuggestions, BCTooltip, BCScrollArea, ScrollAreaSize } from '@bcrumbs.net/bc-ui';
10
12
  import { BlobServiceClient, AnonymousCredential } from '@azure/storage-blob';
11
13
  import { DataList, Spinner, DropdownMenu, Avatar, Flex, Badge, RadioGroup } from '@radix-ui/themes';
@@ -2728,14 +2730,14 @@ function getFallbackErrorMsg(message, messageArgs) {
2728
2730
  })));
2729
2731
  }
2730
2732
 
2731
- function _typeof$3(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$3(obj); }
2733
+ function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
2732
2734
 
2733
2735
  /**
2734
2736
  * Return true if `value` is object-like. A value is object-like if it's not
2735
2737
  * `null` and has a `typeof` result of "object".
2736
2738
  */
2737
2739
  function isObjectLike(value) {
2738
- return _typeof$3(value) == 'object' && value !== null;
2740
+ return _typeof$2(value) == 'object' && value !== null;
2739
2741
  }
2740
2742
 
2741
2743
  // In ES2015 (or a polyfilled) environment, this will be Symbol.iterator
@@ -2834,19 +2836,19 @@ function leftPad(len, str) {
2834
2836
  return whitespace$1(len - str.length) + str;
2835
2837
  }
2836
2838
 
2837
- function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
2839
+ function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
2838
2840
 
2839
- function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2841
+ function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2840
2842
 
2841
- function _defineProperties$4(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2843
+ function _defineProperties$3(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2842
2844
 
2843
- function _createClass$4(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$4(Constructor.prototype, protoProps); return Constructor; }
2845
+ function _createClass$3(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$3(Constructor.prototype, protoProps); return Constructor; }
2844
2846
 
2845
2847
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$1(subClass, superClass); }
2846
2848
 
2847
2849
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
2848
2850
 
2849
- function _possibleConstructorReturn(self, call) { if (call && (_typeof$2(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
2851
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof$1(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
2850
2852
 
2851
2853
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
2852
2854
 
@@ -2927,7 +2929,7 @@ var GraphQLError = /*#__PURE__*/function (_Error) {
2927
2929
 
2928
2930
  var _this;
2929
2931
 
2930
- _classCallCheck$2(this, GraphQLError);
2932
+ _classCallCheck$1(this, GraphQLError);
2931
2933
 
2932
2934
  _this = _super.call(this, message); // Compute list of blame nodes.
2933
2935
 
@@ -3060,7 +3062,7 @@ var GraphQLError = /*#__PURE__*/function (_Error) {
3060
3062
  return _this;
3061
3063
  }
3062
3064
 
3063
- _createClass$4(GraphQLError, [{
3065
+ _createClass$3(GraphQLError, [{
3064
3066
  key: "toString",
3065
3067
  value: function toString() {
3066
3068
  return printError(this);
@@ -3341,7 +3343,7 @@ var TokenKind = Object.freeze({
3341
3343
  * The enum type representing the token kinds values.
3342
3344
  */
3343
3345
 
3344
- function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
3346
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
3345
3347
  var MAX_ARRAY_LENGTH = 10;
3346
3348
  var MAX_RECURSIVE_DEPTH = 2;
3347
3349
  /**
@@ -3353,7 +3355,7 @@ function inspect(value) {
3353
3355
  }
3354
3356
 
3355
3357
  function formatValue(value, seenValues) {
3356
- switch (_typeof$1(value)) {
3358
+ switch (_typeof(value)) {
3357
3359
  case 'string':
3358
3360
  return JSON.stringify(value);
3359
3361
 
@@ -3499,9 +3501,9 @@ function instanceOf(value, constructor) {
3499
3501
  return false;
3500
3502
  };
3501
3503
 
3502
- function _defineProperties$3(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3504
+ function _defineProperties$2(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3503
3505
 
3504
- function _createClass$3(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$3(Constructor.prototype, protoProps); return Constructor; }
3506
+ function _createClass$2(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$2(Constructor.prototype, protoProps); return Constructor; }
3505
3507
 
3506
3508
  /**
3507
3509
  * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are
@@ -3526,7 +3528,7 @@ var Source = /*#__PURE__*/function () {
3526
3528
  } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
3527
3529
 
3528
3530
 
3529
- _createClass$3(Source, [{
3531
+ _createClass$2(Source, [{
3530
3532
  key: SYMBOL_TO_STRING_TAG,
3531
3533
  get: function get() {
3532
3534
  return 'Source';
@@ -6655,15 +6657,15 @@ function isNonEmptyArray$1(value) {
6655
6657
  return Array.isArray(value) && value.length > 0;
6656
6658
  }
6657
6659
 
6658
- function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike ) { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6660
+ function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike ) { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6659
6661
 
6660
- function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
6662
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6661
6663
 
6662
- function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
6664
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
6663
6665
 
6664
- function _defineProperties$2(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
6666
+ function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
6665
6667
 
6666
- function _createClass$2(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$2(Constructor.prototype, protoProps); if (staticProps) _defineProperties$2(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6668
+ function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6667
6669
 
6668
6670
  // === Symbol Support ===
6669
6671
  var hasSymbols$1 = function () {
@@ -6861,7 +6863,7 @@ var Subscription$2 = /*#__PURE__*/function () {
6861
6863
  }
6862
6864
  };
6863
6865
 
6864
- _createClass$2(Subscription, [{
6866
+ _createClass$1(Subscription, [{
6865
6867
  key: "closed",
6866
6868
  get: function () {
6867
6869
  return this._state === 'closed';
@@ -6890,7 +6892,7 @@ var SubscriptionObserver$1 = /*#__PURE__*/function () {
6890
6892
  onNotify$1(this._subscription, 'complete');
6891
6893
  };
6892
6894
 
6893
- _createClass$2(SubscriptionObserver, [{
6895
+ _createClass$1(SubscriptionObserver, [{
6894
6896
  key: "closed",
6895
6897
  get: function () {
6896
6898
  return this._subscription._state === 'closed';
@@ -7210,7 +7212,7 @@ var Observable$4 = /*#__PURE__*/function () {
7210
7212
  });
7211
7213
  };
7212
7214
 
7213
- _createClass$2(Observable, null, [{
7215
+ _createClass$1(Observable, null, [{
7214
7216
  key: SymbolSpecies$1,
7215
7217
  get: function () {
7216
7218
  return this;
@@ -9993,7 +9995,7 @@ let _$7 = t => t,
9993
9995
  _t66,
9994
9996
  _t67,
9995
9997
  _t68;
9996
- const defaultOptions$1 = {};
9998
+ const defaultOptions = {};
9997
9999
  const IntegrationType = {
9998
10000
  BCWEBCHAT: 'BCWEBCHAT',
9999
10001
  FACEBOOK: 'FACEBOOK',
@@ -10293,7 +10295,7 @@ const AddMessageDocument = gql(_t23 || (_t23 = _$7`
10293
10295
  * });
10294
10296
  */
10295
10297
  function useAddMessageMutation(baseOptions) {
10296
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
10298
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
10297
10299
  return useMutation$1(AddMessageDocument, options);
10298
10300
  }
10299
10301
  const AgentDocument = gql(_t24 || (_t24 = _$7`
@@ -10321,7 +10323,7 @@ const AgentDocument = gql(_t24 || (_t24 = _$7`
10321
10323
  * });
10322
10324
  */
10323
10325
  function useAgentQuery(baseOptions) {
10324
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
10326
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
10325
10327
  return useQuery$1(AgentDocument, options);
10326
10328
  }
10327
10329
  const AgentsDocument = gql(_t25 || (_t25 = _$7`
@@ -10356,7 +10358,7 @@ const AgentsDocument = gql(_t25 || (_t25 = _$7`
10356
10358
  * });
10357
10359
  */
10358
10360
  function useAgentsQuery(baseOptions) {
10359
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
10361
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
10360
10362
  return useQuery$1(AgentsDocument, options);
10361
10363
  }
10362
10364
  const AssignConvDocument = gql(_t26 || (_t26 = _$7`
@@ -10385,7 +10387,7 @@ const AssignConvDocument = gql(_t26 || (_t26 = _$7`
10385
10387
  * });
10386
10388
  */
10387
10389
  function useAssignConvMutation(baseOptions) {
10388
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
10390
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
10389
10391
  return useMutation$1(AssignConvDocument, options);
10390
10392
  }
10391
10393
  gql(_t27 || (_t27 = _$7`
@@ -10433,7 +10435,7 @@ const ClientsDocument = gql(_t30 || (_t30 = _$7`
10433
10435
  ${0}
10434
10436
  `), ClientFragmentDoc, PageInfoFragmentDoc);
10435
10437
  function useClientsLazyQuery(baseOptions) {
10436
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
10438
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
10437
10439
  return useLazyQuery(ClientsDocument, options);
10438
10440
  }
10439
10441
  const ConvsDocument = gql(_t31 || (_t31 = _$7`
@@ -10468,7 +10470,7 @@ const ConvsDocument = gql(_t31 || (_t31 = _$7`
10468
10470
  * });
10469
10471
  */
10470
10472
  function useConvsQuery(baseOptions) {
10471
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
10473
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
10472
10474
  return useQuery$1(ConvsDocument, options);
10473
10475
  }
10474
10476
  const CreateAgentDocument = gql(_t32 || (_t32 = _$7`
@@ -10497,7 +10499,7 @@ const CreateAgentDocument = gql(_t32 || (_t32 = _$7`
10497
10499
  * });
10498
10500
  */
10499
10501
  function useCreateAgentMutation(baseOptions) {
10500
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
10502
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
10501
10503
  return useMutation$1(CreateAgentDocument, options);
10502
10504
  }
10503
10505
  gql(_t33 || (_t33 = _$7`
@@ -10534,7 +10536,7 @@ const DeleteAgentDocument = gql(_t34 || (_t34 = _$7`
10534
10536
  * });
10535
10537
  */
10536
10538
  function useDeleteAgentMutation(baseOptions) {
10537
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
10539
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
10538
10540
  return useMutation$1(DeleteAgentDocument, options);
10539
10541
  }
10540
10542
  gql(_t35 || (_t35 = _$7`
@@ -10571,7 +10573,7 @@ const EndConvDocument = gql(_t36 || (_t36 = _$7`
10571
10573
  * });
10572
10574
  */
10573
10575
  function useEndConvMutation(baseOptions) {
10574
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
10576
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
10575
10577
  return useMutation$1(EndConvDocument, options);
10576
10578
  }
10577
10579
  gql(_t37 || (_t37 = _$7`
@@ -10597,7 +10599,7 @@ const MessagesDocument = gql(_t38 || (_t38 = _$7`
10597
10599
  ${0}
10598
10600
  `), MessageFragmentDoc, PageInfoFragmentDoc);
10599
10601
  function useMessagesLazyQuery(baseOptions) {
10600
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
10602
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
10601
10603
  return useLazyQuery(MessagesDocument, options);
10602
10604
  }
10603
10605
  const PatchAgentDocument = gql(_t39 || (_t39 = _$7`
@@ -10626,7 +10628,7 @@ const PatchAgentDocument = gql(_t39 || (_t39 = _$7`
10626
10628
  * });
10627
10629
  */
10628
10630
  function usePatchAgentMutation(baseOptions) {
10629
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
10631
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
10630
10632
  return useMutation$1(PatchAgentDocument, options);
10631
10633
  }
10632
10634
  gql(_t40 || (_t40 = _$7`
@@ -10671,7 +10673,7 @@ const PatchConvDocument = gql(_t42 || (_t42 = _$7`
10671
10673
  * });
10672
10674
  */
10673
10675
  function usePatchConvMutation(baseOptions) {
10674
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
10676
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
10675
10677
  return useMutation$1(PatchConvDocument, options);
10676
10678
  }
10677
10679
  const StartConvDocument = gql(_t43 || (_t43 = _$7`
@@ -10700,7 +10702,7 @@ const StartConvDocument = gql(_t43 || (_t43 = _$7`
10700
10702
  * });
10701
10703
  */
10702
10704
  function useStartConvMutation(baseOptions) {
10703
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
10705
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
10704
10706
  return useMutation$1(StartConvDocument, options);
10705
10707
  }
10706
10708
  gql(_t44 || (_t44 = _$7`
@@ -10746,7 +10748,7 @@ const TagsDocument = gql(_t46 || (_t46 = _$7`
10746
10748
  * });
10747
10749
  */
10748
10750
  function useTagsQuery(baseOptions) {
10749
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
10751
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
10750
10752
  return useQuery$1(TagsDocument, options);
10751
10753
  }
10752
10754
  gql(_t47 || (_t47 = _$7`
@@ -10776,7 +10778,7 @@ const WabaMessageTemplatesDocument = gql(_t49 || (_t49 = _$7`
10776
10778
  ${0}
10777
10779
  `), MessageTemplateFragmentDoc);
10778
10780
  function useWabaMessageTemplatesLazyQuery(baseOptions) {
10779
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
10781
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
10780
10782
  return useLazyQuery(WabaMessageTemplatesDocument, options);
10781
10783
  }
10782
10784
  gql(_t50 || (_t50 = _$7`
@@ -10814,7 +10816,7 @@ const AisDocument = gql(_t51 || (_t51 = _$7`
10814
10816
  * });
10815
10817
  */
10816
10818
  function useAisQuery(baseOptions) {
10817
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
10819
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
10818
10820
  return useQuery$1(AisDocument, options);
10819
10821
  }
10820
10822
  gql(_t52 || (_t52 = _$7`
@@ -10869,7 +10871,7 @@ const CreateIntegrationDocument = gql(_t55 || (_t55 = _$7`
10869
10871
  * });
10870
10872
  */
10871
10873
  function useCreateIntegrationMutation(baseOptions) {
10872
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
10874
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
10873
10875
  return useMutation$1(CreateIntegrationDocument, options);
10874
10876
  }
10875
10877
  const CreateTagDocument = gql(_t56 || (_t56 = _$7`
@@ -10898,7 +10900,7 @@ const CreateTagDocument = gql(_t56 || (_t56 = _$7`
10898
10900
  * });
10899
10901
  */
10900
10902
  function useCreateTagMutation(baseOptions) {
10901
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
10903
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
10902
10904
  return useMutation$1(CreateTagDocument, options);
10903
10905
  }
10904
10906
  gql(_t57 || (_t57 = _$7`
@@ -10951,7 +10953,7 @@ const DeleteIntegrationDocument = gql(_t60 || (_t60 = _$7`
10951
10953
  * });
10952
10954
  */
10953
10955
  function useDeleteIntegrationMutation(baseOptions) {
10954
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
10956
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
10955
10957
  return useMutation$1(DeleteIntegrationDocument, options);
10956
10958
  }
10957
10959
  const DeleteTagDocument = gql(_t61 || (_t61 = _$7`
@@ -10980,7 +10982,7 @@ const DeleteTagDocument = gql(_t61 || (_t61 = _$7`
10980
10982
  * });
10981
10983
  */
10982
10984
  function useDeleteTagMutation(baseOptions) {
10983
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
10985
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
10984
10986
  return useMutation$1(DeleteTagDocument, options);
10985
10987
  }
10986
10988
  gql(_t62 || (_t62 = _$7`
@@ -11024,7 +11026,7 @@ const IntegrationDocument = gql(_t64 || (_t64 = _$7`
11024
11026
  * });
11025
11027
  */
11026
11028
  function useIntegrationQuery(baseOptions) {
11027
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
11029
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
11028
11030
  return useQuery$1(IntegrationDocument, options);
11029
11031
  }
11030
11032
  const IntegrationsDocument = gql(_t65 || (_t65 = _$7`
@@ -11054,7 +11056,7 @@ const IntegrationsDocument = gql(_t65 || (_t65 = _$7`
11054
11056
  * });
11055
11057
  */
11056
11058
  function useIntegrationsQuery(baseOptions) {
11057
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
11059
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
11058
11060
  return useQuery$1(IntegrationsDocument, options);
11059
11061
  }
11060
11062
  gql(_t66 || (_t66 = _$7`
@@ -11091,7 +11093,7 @@ const PatchIntegrationDocument = gql(_t67 || (_t67 = _$7`
11091
11093
  * });
11092
11094
  */
11093
11095
  function usePatchIntegrationMutation(baseOptions) {
11094
- const options = Object.assign(Object.assign({}, defaultOptions$1), baseOptions);
11096
+ const options = Object.assign(Object.assign({}, defaultOptions), baseOptions);
11095
11097
  return useMutation$1(PatchIntegrationDocument, options);
11096
11098
  }
11097
11099
  gql(_t68 || (_t68 = _$7`
@@ -11105,388 +11107,6 @@ gql(_t68 || (_t68 = _$7`
11105
11107
  ${0}
11106
11108
  `), WebhookFragmentDoc);
11107
11109
 
11108
- function _objectWithoutPropertiesLoose(r, e) {
11109
- if (null == r) return {};
11110
- var t = {};
11111
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
11112
- if (e.includes(n)) continue;
11113
- t[n] = r[n];
11114
- }
11115
- return t;
11116
- }
11117
-
11118
- function _typeof(o) {
11119
- "@babel/helpers - typeof";
11120
-
11121
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
11122
- return typeof o;
11123
- } : function (o) {
11124
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
11125
- }, _typeof(o);
11126
- }
11127
-
11128
- function toPrimitive(t, r) {
11129
- if ("object" != _typeof(t) || !t) return t;
11130
- var e = t[Symbol.toPrimitive];
11131
- if (void 0 !== e) {
11132
- var i = e.call(t, r || "default");
11133
- if ("object" != _typeof(i)) return i;
11134
- throw new TypeError("@@toPrimitive must return a primitive value.");
11135
- }
11136
- return ("string" === r ? String : Number)(t);
11137
- }
11138
-
11139
- function toPropertyKey(t) {
11140
- var i = toPrimitive(t, "string");
11141
- return "symbol" == _typeof(i) ? i : i + "";
11142
- }
11143
-
11144
- function _defineProperty(e, r, t) {
11145
- return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
11146
- value: t,
11147
- enumerable: !0,
11148
- configurable: !0,
11149
- writable: !0
11150
- }) : e[r] = t, e;
11151
- }
11152
-
11153
- function _classCallCheck$1(a, n) {
11154
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
11155
- }
11156
-
11157
- function _defineProperties$1(e, r) {
11158
- for (var t = 0; t < r.length; t++) {
11159
- var o = r[t];
11160
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
11161
- }
11162
- }
11163
- function _createClass$1(e, r, t) {
11164
- return r && _defineProperties$1(e.prototype, r), Object.defineProperty(e, "prototype", {
11165
- writable: !1
11166
- }), e;
11167
- }
11168
-
11169
- var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
11170
- var htmlEntities = {
11171
- '&amp;': '&',
11172
- '&#38;': '&',
11173
- '&lt;': '<',
11174
- '&#60;': '<',
11175
- '&gt;': '>',
11176
- '&#62;': '>',
11177
- '&apos;': "'",
11178
- '&#39;': "'",
11179
- '&quot;': '"',
11180
- '&#34;': '"',
11181
- '&nbsp;': ' ',
11182
- '&#160;': ' ',
11183
- '&copy;': '©',
11184
- '&#169;': '©',
11185
- '&reg;': '®',
11186
- '&#174;': '®',
11187
- '&hellip;': '…',
11188
- '&#8230;': '…',
11189
- '&#x2F;': '/',
11190
- '&#47;': '/'
11191
- };
11192
-
11193
- var unescapeHtmlEntity = function unescapeHtmlEntity(m) {
11194
- return htmlEntities[m];
11195
- };
11196
-
11197
- var unescape = function unescape(text) {
11198
- return text.replace(matchHtmlEntity, unescapeHtmlEntity);
11199
- };
11200
-
11201
- var defaultOptions = {
11202
- bindI18n: 'languageChanged',
11203
- bindI18nStore: '',
11204
- transEmptyNodeValue: '',
11205
- transSupportBasicHtmlNodes: true,
11206
- transWrapTextNodes: '',
11207
- transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],
11208
- useSuspense: true,
11209
- unescape: unescape
11210
- };
11211
- var i18nInstance;
11212
- var I18nContext = createContext();
11213
- function getDefaults() {
11214
- return defaultOptions;
11215
- }
11216
- var ReportNamespaces = function () {
11217
- function ReportNamespaces() {
11218
- _classCallCheck$1(this, ReportNamespaces);
11219
-
11220
- this.usedNamespaces = {};
11221
- }
11222
-
11223
- _createClass$1(ReportNamespaces, [{
11224
- key: "addUsedNamespaces",
11225
- value: function addUsedNamespaces(namespaces) {
11226
- var _this = this;
11227
-
11228
- namespaces.forEach(function (ns) {
11229
- if (!_this.usedNamespaces[ns]) _this.usedNamespaces[ns] = true;
11230
- });
11231
- }
11232
- }, {
11233
- key: "getUsedNamespaces",
11234
- value: function getUsedNamespaces() {
11235
- return Object.keys(this.usedNamespaces);
11236
- }
11237
- }]);
11238
-
11239
- return ReportNamespaces;
11240
- }();
11241
- function getI18n() {
11242
- return i18nInstance;
11243
- }
11244
-
11245
- function warn() {
11246
- if (console && console.warn) {
11247
- var _console;
11248
-
11249
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
11250
- args[_key] = arguments[_key];
11251
- }
11252
-
11253
- if (typeof args[0] === 'string') args[0] = "react-i18next:: ".concat(args[0]);
11254
-
11255
- (_console = console).warn.apply(_console, args);
11256
- }
11257
- }
11258
- var alreadyWarned = {};
11259
- function warnOnce() {
11260
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
11261
- args[_key2] = arguments[_key2];
11262
- }
11263
-
11264
- if (typeof args[0] === 'string' && alreadyWarned[args[0]]) return;
11265
- if (typeof args[0] === 'string') alreadyWarned[args[0]] = new Date();
11266
- warn.apply(void 0, args);
11267
- }
11268
- function loadNamespaces(i18n, ns, cb) {
11269
- i18n.loadNamespaces(ns, function () {
11270
- if (i18n.isInitialized) {
11271
- cb();
11272
- } else {
11273
- var initialized = function initialized() {
11274
- setTimeout(function () {
11275
- i18n.off('initialized', initialized);
11276
- }, 0);
11277
- cb();
11278
- };
11279
-
11280
- i18n.on('initialized', initialized);
11281
- }
11282
- });
11283
- }
11284
-
11285
- function oldI18nextHasLoadedNamespace(ns, i18n) {
11286
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
11287
- var lng = i18n.languages[0];
11288
- var fallbackLng = i18n.options ? i18n.options.fallbackLng : false;
11289
- var lastLng = i18n.languages[i18n.languages.length - 1];
11290
- if (lng.toLowerCase() === 'cimode') return true;
11291
-
11292
- var loadNotPending = function loadNotPending(l, n) {
11293
- var loadState = i18n.services.backendConnector.state["".concat(l, "|").concat(n)];
11294
- return loadState === -1 || loadState === 2;
11295
- };
11296
-
11297
- if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18n.services.backendConnector.backend && i18n.isLanguageChangingTo && !loadNotPending(i18n.isLanguageChangingTo, ns)) return false;
11298
- if (i18n.hasResourceBundle(lng, ns)) return true;
11299
- if (!i18n.services.backendConnector.backend || i18n.options.resources && !i18n.options.partialBundledLanguages) return true;
11300
- if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;
11301
- return false;
11302
- }
11303
-
11304
- function hasLoadedNamespace(ns, i18n) {
11305
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
11306
-
11307
- if (!i18n.languages || !i18n.languages.length) {
11308
- warnOnce('i18n.languages were undefined or empty', i18n.languages);
11309
- return true;
11310
- }
11311
-
11312
- var isNewerI18next = i18n.options.ignoreJSONStructure !== undefined;
11313
-
11314
- if (!isNewerI18next) {
11315
- return oldI18nextHasLoadedNamespace(ns, i18n, options);
11316
- }
11317
-
11318
- return i18n.hasLoadedNamespace(ns, {
11319
- precheck: function precheck(i18nInstance, loadNotPending) {
11320
- if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18nInstance.services.backendConnector.backend && i18nInstance.isLanguageChangingTo && !loadNotPending(i18nInstance.isLanguageChangingTo, ns)) return false;
11321
- }
11322
- });
11323
- }
11324
-
11325
- function _arrayWithHoles(r) {
11326
- if (Array.isArray(r)) return r;
11327
- }
11328
-
11329
- function _iterableToArrayLimit(r, l) {
11330
- var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
11331
- if (null != t) {
11332
- var e,
11333
- n,
11334
- i,
11335
- u,
11336
- a = [],
11337
- f = !0,
11338
- o = !1;
11339
- try {
11340
- if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
11341
- } catch (r) {
11342
- o = !0, n = r;
11343
- } finally {
11344
- try {
11345
- if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
11346
- } finally {
11347
- if (o) throw n;
11348
- }
11349
- }
11350
- return a;
11351
- }
11352
- }
11353
-
11354
- function _arrayLikeToArray(r, a) {
11355
- (null == a || a > r.length) && (a = r.length);
11356
- for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
11357
- return n;
11358
- }
11359
-
11360
- function _unsupportedIterableToArray(r, a) {
11361
- if (r) {
11362
- if ("string" == typeof r) return _arrayLikeToArray(r, a);
11363
- var t = {}.toString.call(r).slice(8, -1);
11364
- return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
11365
- }
11366
- }
11367
-
11368
- function _nonIterableRest() {
11369
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11370
- }
11371
-
11372
- function _slicedToArray(r, e) {
11373
- return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
11374
- }
11375
-
11376
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
11377
-
11378
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
11379
-
11380
- var usePrevious = function usePrevious(value, ignore) {
11381
- var ref = useRef();
11382
- useEffect(function () {
11383
- ref.current = value;
11384
- }, [value, ignore]);
11385
- return ref.current;
11386
- };
11387
-
11388
- function useTranslation(ns) {
11389
- var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
11390
- var i18nFromProps = props.i18n;
11391
-
11392
- var _ref = useContext$1(I18nContext) || {},
11393
- i18nFromContext = _ref.i18n,
11394
- defaultNSFromContext = _ref.defaultNS;
11395
-
11396
- var i18n = i18nFromProps || i18nFromContext || getI18n();
11397
- if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
11398
-
11399
- if (!i18n) {
11400
- warnOnce('You will need to pass in an i18next instance by using initReactI18next');
11401
-
11402
- var notReadyT = function notReadyT(k) {
11403
- return Array.isArray(k) ? k[k.length - 1] : k;
11404
- };
11405
-
11406
- var retNotReady = [notReadyT, {}, false];
11407
- retNotReady.t = notReadyT;
11408
- retNotReady.i18n = {};
11409
- retNotReady.ready = false;
11410
- return retNotReady;
11411
- }
11412
-
11413
- if (i18n.options.react && i18n.options.react.wait !== undefined) warnOnce('It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.');
11414
-
11415
- var i18nOptions = _objectSpread(_objectSpread(_objectSpread({}, getDefaults()), i18n.options.react), props);
11416
-
11417
- var useSuspense = i18nOptions.useSuspense,
11418
- keyPrefix = i18nOptions.keyPrefix;
11419
- var namespaces = ns || defaultNSFromContext || i18n.options && i18n.options.defaultNS;
11420
- namespaces = typeof namespaces === 'string' ? [namespaces] : namespaces || ['translation'];
11421
- if (i18n.reportNamespaces.addUsedNamespaces) i18n.reportNamespaces.addUsedNamespaces(namespaces);
11422
- var ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(function (n) {
11423
- return hasLoadedNamespace(n, i18n, i18nOptions);
11424
- });
11425
-
11426
- function getT() {
11427
- return i18n.getFixedT(null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);
11428
- }
11429
-
11430
- var _useState = useState(getT),
11431
- _useState2 = _slicedToArray(_useState, 2),
11432
- t = _useState2[0],
11433
- setT = _useState2[1];
11434
-
11435
- var joinedNS = namespaces.join();
11436
- var previousJoinedNS = usePrevious(joinedNS);
11437
- var isMounted = useRef(true);
11438
- useEffect(function () {
11439
- var bindI18n = i18nOptions.bindI18n,
11440
- bindI18nStore = i18nOptions.bindI18nStore;
11441
- isMounted.current = true;
11442
-
11443
- if (!ready && !useSuspense) {
11444
- loadNamespaces(i18n, namespaces, function () {
11445
- if (isMounted.current) setT(getT);
11446
- });
11447
- }
11448
-
11449
- if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
11450
- setT(getT);
11451
- }
11452
-
11453
- function boundReset() {
11454
- if (isMounted.current) setT(getT);
11455
- }
11456
-
11457
- if (bindI18n && i18n) i18n.on(bindI18n, boundReset);
11458
- if (bindI18nStore && i18n) i18n.store.on(bindI18nStore, boundReset);
11459
- return function () {
11460
- isMounted.current = false;
11461
- if (bindI18n && i18n) bindI18n.split(' ').forEach(function (e) {
11462
- return i18n.off(e, boundReset);
11463
- });
11464
- if (bindI18nStore && i18n) bindI18nStore.split(' ').forEach(function (e) {
11465
- return i18n.store.off(e, boundReset);
11466
- });
11467
- };
11468
- }, [i18n, joinedNS]);
11469
- var isInitial = useRef(true);
11470
- useEffect(function () {
11471
- if (isMounted.current && !isInitial.current) {
11472
- setT(getT);
11473
- }
11474
-
11475
- isInitial.current = false;
11476
- }, [i18n, keyPrefix]);
11477
- var ret = [t, i18n, ready];
11478
- ret.t = t;
11479
- ret.i18n = i18n;
11480
- ret.ready = ready;
11481
- if (ready) return ret;
11482
- if (!ready && !useSuspense) return ret;
11483
- throw new Promise(function (resolve) {
11484
- loadNamespaces(i18n, namespaces, function () {
11485
- resolve();
11486
- });
11487
- });
11488
- }
11489
-
11490
11110
  function playRecMessageSound() {
11491
11111
  try {
11492
11112
  const audio = new Audio('https://cdn.bcrumbs.net/bc-assets/audio/message-rec.mp3');
@@ -11536,10 +11156,10 @@ function useConversationsPeriodicFetch(selectedConvId, onSelectedUpdate, notifyU
11536
11156
  Notification.requestPermission();
11537
11157
  }
11538
11158
  }, [notifyUser]);
11539
- // Polling for immediate fetch every 2 seconds
11159
+ // Polling for immediate fetch every 1.3 seconds
11540
11160
  usePolling({
11541
11161
  action: refetchConvs,
11542
- interval: 2000
11162
+ interval: 1500
11543
11163
  });
11544
11164
  useEffect(() => {
11545
11165
  var _a, _b, _c;
@@ -43001,6 +42621,16 @@ if (process.env.NODE_ENV === 'production') {
43001
42621
 
43002
42622
  var reactIsExports = reactIs.exports;
43003
42623
 
42624
+ function _objectWithoutPropertiesLoose(r, e) {
42625
+ if (null == r) return {};
42626
+ var t = {};
42627
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
42628
+ if (e.includes(n)) continue;
42629
+ t[n] = r[n];
42630
+ }
42631
+ return t;
42632
+ }
42633
+
43004
42634
  // TODO: Replace with React.createContext once we can assume React 16+
43005
42635
 
43006
42636
  var createNamedContext = function createNamedContext(name) {