@inboxsdk/core 2.1.53 → 2.1.55

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 (24) hide show
  1. package/inboxsdk.js +280 -251
  2. package/inboxsdk.js.map +1 -1
  3. package/package.json +1 -1
  4. package/pageWorld.js +8 -80
  5. package/pageWorld.js.map +1 -1
  6. package/src/injected-js/setupCustomViewEventAssassin.d.ts.map +1 -1
  7. package/src/injected-js/setupInboxCustomViewLinkFixer.d.ts.map +1 -1
  8. package/src/platform-implementation-js/dom-driver/gmail/views/gmail-app-sidebar-view/primary/index.d.ts.map +1 -1
  9. package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/page-parser.d.ts.map +1 -1
  10. package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view.d.ts.map +1 -1
  11. package/src/platform-implementation-js/dom-driver/gmail/views/gmail-nav-item-view.d.ts +4 -1
  12. package/src/platform-implementation-js/dom-driver/gmail/views/gmail-nav-item-view.d.ts.map +1 -1
  13. package/src/platform-implementation-js/dom-driver/gmail/views/gmail-thread-view.d.ts +0 -44
  14. package/src/platform-implementation-js/dom-driver/gmail/views/gmail-thread-view.d.ts.map +1 -1
  15. package/src/platform-implementation-js/driver-common/sidebar/AppSidebar.d.ts +2 -1
  16. package/src/platform-implementation-js/driver-common/sidebar/AppSidebar.d.ts.map +1 -1
  17. package/src/platform-implementation-js/driver-common/sidebar/ContentPanelViewDriver.d.ts +18 -0
  18. package/src/platform-implementation-js/driver-common/sidebar/ContentPanelViewDriver.d.ts.map +1 -1
  19. package/src/platform-implementation-js/driver-interfaces/driver.d.ts +0 -2
  20. package/src/platform-implementation-js/driver-interfaces/driver.d.ts.map +1 -1
  21. package/src/platform-implementation-js/views/conversations/thread-view.d.ts +3 -2
  22. package/src/platform-implementation-js/views/conversations/thread-view.d.ts.map +1 -1
  23. package/src/platform-implementation-js/dom-driver/gmail/views/gmail-thread-view/width-manager.d.ts +0 -7
  24. package/src/platform-implementation-js/dom-driver/gmail/views/gmail-thread-view/width-manager.d.ts.map +0 -1
package/inboxsdk.js CHANGED
@@ -371,7 +371,7 @@ function isNotNil(value) {
371
371
 
372
372
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- SDK_VERSION is injected by webpack
373
373
  ///@ts-ignore
374
- const BUILD_VERSION = "2.1.53-1714159478442-63b2f992c29e0e62";
374
+ const BUILD_VERSION = "2.1.55-1716205678635-d6562cf5c54c7c73";
375
375
  if (false) {}
376
376
 
377
377
  /***/ }),
@@ -2186,7 +2186,7 @@ function makePageParserTree(driver, root) {
2186
2186
 
2187
2187
  /***/ }),
2188
2188
 
2189
- /***/ 470:
2189
+ /***/ 2893:
2190
2190
  /***/ ((module, __webpack_exports__, __webpack_require__) => {
2191
2191
 
2192
2192
  "use strict";
@@ -2207,9 +2207,6 @@ var kefir_stopper_js_default = /*#__PURE__*/__webpack_require__.n(kefir_stopper_
2207
2207
  // EXTERNAL MODULE: ./node_modules/lodash/findIndex.js
2208
2208
  var findIndex = __webpack_require__(9339);
2209
2209
  var findIndex_default = /*#__PURE__*/__webpack_require__.n(findIndex);
2210
- // EXTERNAL MODULE: ./node_modules/auto-html/js/index.js
2211
- var auto_html_js = __webpack_require__(1812);
2212
- var auto_html_js_default = /*#__PURE__*/__webpack_require__.n(auto_html_js);
2213
2210
  // EXTERNAL MODULE: ./node_modules/asap/browser-asap.js
2214
2211
  var browser_asap = __webpack_require__(4622);
2215
2212
  var browser_asap_default = /*#__PURE__*/__webpack_require__.n(browser_asap);
@@ -2517,6 +2514,7 @@ class Panel extends react.Component {
2517
2514
  appName,
2518
2515
  iconClass,
2519
2516
  iconUrl,
2517
+ iconLiga,
2520
2518
  el
2521
2519
  },
2522
2520
  showControls,
@@ -2550,7 +2548,7 @@ class Panel extends react.Component {
2550
2548
  className: (0,idMap/* default */.A)('app_sidebar_content_panel_title_icon_container')
2551
2549
  }, /*#__PURE__*/react.createElement("span", {
2552
2550
  className: classnames_default()((0,idMap/* default */.A)('app_sidebar_content_panel_title_icon'), iconClass)
2553
- }, iconUrl && /*#__PURE__*/react.createElement("img", {
2551
+ }, !!iconLiga && iconLiga, iconUrl && /*#__PURE__*/react.createElement("img", {
2554
2552
  src: iconUrl
2555
2553
  }))), /*#__PURE__*/react.createElement("span", {
2556
2554
  className: (0,idMap/* default */.A)('app_sidebar_content_panel_title_text')
@@ -2608,6 +2606,59 @@ const sidebarWaitingPlatformSelector = [cssGlobal, "inboxsdk__a0oshmeH6N_2vLtc3D
2608
2606
  * and the CSS local is only used for styling.
2609
2607
  */
2610
2608
  const sidebarWaitingPlatformClassName = classnames_default()(cssGlobal, "inboxsdk__a0oshmeH6N_2vLtc3DNT", "inboxsdk__BV_FA4qVT4qYxs3LbEU4", (0,idMap/* legacyIdMap */.r)('app_sidebar_waiting_platform'));
2609
+ // EXTERNAL MODULE: ./node_modules/lodash/escape.js
2610
+ var lodash_escape = __webpack_require__(3131);
2611
+ var escape_default = /*#__PURE__*/__webpack_require__.n(lodash_escape);
2612
+ // EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js
2613
+ var injectStylesIntoStyleTag = __webpack_require__(6186);
2614
+ var injectStylesIntoStyleTag_default = /*#__PURE__*/__webpack_require__.n(injectStylesIntoStyleTag);
2615
+ // EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/styleDomAPI.js
2616
+ var styleDomAPI = __webpack_require__(2155);
2617
+ var styleDomAPI_default = /*#__PURE__*/__webpack_require__.n(styleDomAPI);
2618
+ // EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js
2619
+ var setAttributesWithoutAttributes = __webpack_require__(8626);
2620
+ var setAttributesWithoutAttributes_default = /*#__PURE__*/__webpack_require__.n(setAttributesWithoutAttributes);
2621
+ // EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/insertStyleElement.js
2622
+ var insertStyleElement = __webpack_require__(8990);
2623
+ var insertStyleElement_default = /*#__PURE__*/__webpack_require__.n(insertStyleElement);
2624
+ // EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/styleTagTransform.js
2625
+ var styleTagTransform = __webpack_require__(9827);
2626
+ var styleTagTransform_default = /*#__PURE__*/__webpack_require__.n(styleTagTransform);
2627
+ // EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./node_modules/postcss-loader/dist/cjs.js!./src/platform-implementation-js/dom-driver/gmail/views/gmail-app-sidebar-view/primary/index.module.css
2628
+ var index_module = __webpack_require__(8855);
2629
+ ;// CONCATENATED MODULE: ./src/platform-implementation-js/dom-driver/gmail/views/gmail-app-sidebar-view/primary/index.module.css
2630
+
2631
+
2632
+
2633
+
2634
+
2635
+
2636
+
2637
+
2638
+
2639
+
2640
+
2641
+ var options = {};
2642
+
2643
+ options.styleTagTransform = (styleTagTransform_default());
2644
+ options.setAttributes = (setAttributesWithoutAttributes_default());
2645
+ options.insert = htmlElement => {
2646
+ htmlElement.setAttribute('data-inboxsdk-version',
2647
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
2648
+ ///@ts-ignore
2649
+ "2.1.55-1716205678635-d6562cf5c54c7c73");
2650
+ document.head.append(htmlElement);
2651
+ };
2652
+ options.domAPI = (styleDomAPI_default());
2653
+ options.insertStyleElement = (insertStyleElement_default());
2654
+
2655
+ var update = injectStylesIntoStyleTag_default()(index_module/* default */.A, options);
2656
+
2657
+
2658
+
2659
+
2660
+ /* harmony default export */ const primary_index_module = (index_module/* default */.A && index_module/* default */.A.locals ? index_module/* default */.A.locals : undefined);
2661
+
2611
2662
  ;// CONCATENATED MODULE: ./src/platform-implementation-js/dom-driver/gmail/views/gmail-app-sidebar-view/primary/index.tsx
2612
2663
 
2613
2664
 
@@ -2629,6 +2680,7 @@ const sidebarWaitingPlatformClassName = classnames_default()(cssGlobal, "inboxsd
2629
2680
 
2630
2681
 
2631
2682
 
2683
+
2632
2684
 
2633
2685
 
2634
2686
  const ACTIVE_ADD_ON_ICON_SELECTOR = '.aT5-aOt-I-KO';
@@ -2852,7 +2904,11 @@ class GmailAppSidebarPrimary {
2852
2904
  const instanceId = event.detail.instanceId;
2853
2905
  const iconUrl = isGlobal && event.detail.iconUrl ? event.detail.iconUrl : event.detail.appIconUrl;
2854
2906
  const appName = event.detail.appName;
2855
- const iconClass = event.detail.iconClass || '';
2907
+ const {
2908
+ iconClass = '',
2909
+ iconLiga
2910
+ } = event.detail;
2911
+
2856
2912
  // If there's an existing button for the app, then just increment its
2857
2913
  // data-count attribute instead of adding a new button.
2858
2914
  const existingButtonContainer = isGlobal ? this.#globalButtonContainers.get(appName) : this.#threadButtonContainers.get(appName);
@@ -2865,9 +2921,9 @@ class GmailAppSidebarPrimary {
2865
2921
  buttonContainer = document.createElement('div');
2866
2922
  buttonContainer.className = (0,idMap/* default */.A)('sidebar_button_container');
2867
2923
  buttonContainer.setAttribute('data-app-name', appName);
2868
- buttonContainer.innerHTML = auto_html_js_default()`
2869
- <button class="inboxsdk__button_icon ${iconClass}" type="button" data-tooltip="${appName}">
2870
- <img class="inboxsdk__button_iconImg" src="${iconUrl}">
2924
+ buttonContainer.innerHTML = `
2925
+ <button class="inboxsdk__button_icon ${escape_default()(iconClass)}" type="button" data-tooltip="${escape_default()(appName)}">
2926
+ ${iconLiga ? `<span class="${escape_default()(index_module/* iconLiga */.N)}">${escape_default()(iconLiga).trim()}</div>` : `<img class="inboxsdk__button_iconImg" src="${escape_default()(iconUrl)}">`}
2871
2927
  </button>
2872
2928
  <div class="inboxsdk__button_selectedIndicator"></div>
2873
2929
  `;
@@ -3084,6 +3140,7 @@ class GmailAppSidebarPrimary {
3084
3140
  instanceId: event.detail.instanceId,
3085
3141
  title: event.detail.title,
3086
3142
  iconClass: event.detail.iconClass,
3143
+ iconLiga: event.detail.iconLiga,
3087
3144
  iconUrl: event.detail.iconUrl,
3088
3145
  hideTitleBar: event.detail.hideTitleBar,
3089
3146
  el: event.target
@@ -3110,6 +3167,7 @@ class GmailAppSidebarPrimary {
3110
3167
  instanceId: event.detail.instanceId,
3111
3168
  title: event.detail.title,
3112
3169
  iconClass: event.detail.iconClass,
3170
+ iconLiga: event.detail.iconLiga,
3113
3171
  iconUrl: event.detail.iconUrl,
3114
3172
  hideTitleBar: event.detail.hideTitleBar,
3115
3173
  el: event.target
@@ -3174,10 +3232,15 @@ class GmailAppSidebarPrimary {
3174
3232
  kefir_esm.fromEvents(document.body, 'inboxsdkUpdateSidebarPanel').filter(e => e.detail.sidebarId === this.#instanceId && e.detail.isGlobal).takeUntilBy(this.#stopper).onValue(event => {
3175
3233
  const buttonContainer = this.#globalButtonContainers.get(event.detail.appName);
3176
3234
  if (!buttonContainer) return;
3177
- const iconClass = event.detail.iconClass || '';
3178
- const iconUrl = event.detail.iconUrl || event.detail.appIconUrl;
3179
- const imgElement = (0,querySelectorOrFail/* default */.A)(buttonContainer, 'img');
3180
- imgElement.setAttribute('src', iconUrl);
3235
+ const {
3236
+ iconClass = '',
3237
+ iconLiga,
3238
+ iconUrl = event.detail.appIconUrl
3239
+ } = event.detail;
3240
+ if (!iconLiga) {
3241
+ const imgElement = (0,querySelectorOrFail/* default */.A)(buttonContainer, 'img');
3242
+ imgElement.setAttribute('src', iconUrl);
3243
+ }
3181
3244
  const button = (0,querySelectorOrFail/* default */.A)(buttonContainer, 'button');
3182
3245
  button.setAttribute('class', `inboxsdk__button_icon ${iconClass}`);
3183
3246
  });
@@ -3296,6 +3359,7 @@ class ContentPanelViewDriver {
3296
3359
  const {
3297
3360
  el,
3298
3361
  iconUrl,
3362
+ iconLiga,
3299
3363
  iconClass,
3300
3364
  title,
3301
3365
  orderHint,
@@ -3320,6 +3384,7 @@ class ContentPanelViewDriver {
3320
3384
  appName,
3321
3385
  hideTitleBar: Boolean(hideTitleBar),
3322
3386
  iconClass,
3387
+ iconLiga,
3323
3388
  iconUrl,
3324
3389
  id: String(id || title),
3325
3390
  instanceId: this.#instanceId,
@@ -3601,9 +3666,6 @@ var browser_asap_default = /*#__PURE__*/__webpack_require__.n(browser_asap);
3601
3666
  var pdelay_js = __webpack_require__(8498);
3602
3667
  // EXTERNAL MODULE: ./node_modules/kefir/dist/kefir.esm.js
3603
3668
  var kefir_esm = __webpack_require__(7249);
3604
- // EXTERNAL MODULE: ./node_modules/closest-ng/js/index.js
3605
- var closest_ng_js = __webpack_require__(8104);
3606
- var closest_ng_js_default = /*#__PURE__*/__webpack_require__.n(closest_ng_js);
3607
3669
  // EXTERNAL MODULE: ./node_modules/kefir-bus/index.js
3608
3670
  var kefir_bus = __webpack_require__(8631);
3609
3671
  var kefir_bus_default = /*#__PURE__*/__webpack_require__.n(kefir_bus);
@@ -4070,7 +4132,6 @@ var censorHTMLtree = __webpack_require__(1443);
4070
4132
  ;// CONCATENATED MODULE: ./src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/page-parser.ts
4071
4133
 
4072
4134
 
4073
-
4074
4135
  function makePageParser(element, logger) {
4075
4136
  return new (page_parser_tree_js_default())(element, {
4076
4137
  logError(err, el) {
@@ -4174,7 +4235,7 @@ function getRecipientRowForType(element, addressType) {
4174
4235
  function getOldRecipientRowForType(element, addressType) {
4175
4236
  const input = element.querySelector(`.GS tr textarea.vO[name="${addressType}"], .GS tr input[name="${addressType}"]`);
4176
4237
  if (input) {
4177
- return closest_ng_js_default()(input, 'tr');
4238
+ return input.closest('tr');
4178
4239
  } else {
4179
4240
  return null;
4180
4241
  }
@@ -5175,7 +5236,6 @@ function setFromEmail(driver, gmailComposeView, email) {
5175
5236
 
5176
5237
 
5177
5238
 
5178
-
5179
5239
 
5180
5240
 
5181
5241
  let hasReportedMissingBody = false;
@@ -5907,7 +5967,7 @@ class GmailComposeView {
5907
5967
  }
5908
5968
  getFormattingToolbarToggleButton() {
5909
5969
  const innerElement = (0,querySelectorOrFail/* default */.A)(this.#element, '[role=button] .dv');
5910
- const btn = closest_ng_js_default()(innerElement, '[role=button]');
5970
+ const btn = innerElement.closest('[role=button]');
5911
5971
  if (!btn) throw new Error('failed to find button');
5912
5972
  return btn;
5913
5973
  }
@@ -10134,7 +10194,7 @@ options.insert = htmlElement => {
10134
10194
  htmlElement.setAttribute('data-inboxsdk-version',
10135
10195
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
10136
10196
  ///@ts-ignore
10137
- "2.1.53-1714159478442-63b2f992c29e0e62");
10197
+ "2.1.55-1716205678635-d6562cf5c54c7c73");
10138
10198
  document.head.append(htmlElement);
10139
10199
  };
10140
10200
  options.domAPI = (styleDomAPI_default());
@@ -11260,7 +11320,7 @@ if (!globalThis.__InboxSDKImpLoader) {
11260
11320
  await onready;
11261
11321
  const {
11262
11322
  makePlatformImplementation
11263
- } = await Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 464));
11323
+ } = await Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 7098));
11264
11324
  return makePlatformImplementation(appId, opts, {
11265
11325
  piMainStarted,
11266
11326
  piLoadStarted,
@@ -11407,7 +11467,7 @@ class Keyboard {
11407
11467
 
11408
11468
  /***/ }),
11409
11469
 
11410
- /***/ 464:
11470
+ /***/ 7098:
11411
11471
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
11412
11472
 
11413
11473
  "use strict";
@@ -13882,27 +13942,6 @@ class GmailToolbarView {
13882
13942
  }
13883
13943
  }
13884
13944
  /* harmony default export */ const gmail_toolbar_view = (GmailToolbarView);
13885
- ;// CONCATENATED MODULE: ./src/platform-implementation-js/dom-driver/gmail/views/gmail-thread-view/width-manager.ts
13886
-
13887
- class WidthManager {
13888
- constructor(contentContainerEl, addonSidebarContainerEl) {
13889
- this._contentContainerEl = contentContainerEl;
13890
- this._addonSidebarContainerEl = addonSidebarContainerEl;
13891
- }
13892
- fixWidths() {
13893
- // right now width manager really just cares about when
13894
- // there are no icons sdk or native and adds/removes some styling
13895
- // classes accordingly
13896
- const tabList = this._addonSidebarContainerEl.querySelector('[role=tablist]');
13897
- if (!tabList) return;
13898
- if (this._addonSidebarContainerEl.classList.contains((0,idMap/* default */.A)('app_sidebar_in_use'))) {
13899
- this._contentContainerEl.classList.remove((0,idMap/* default */.A)('container_app_sidebar_no_icons'));
13900
- return;
13901
- }
13902
- const noIconsVisible = ![...tabList.children].some(child => child.style.display !== 'none');
13903
- if (noIconsVisible) this._contentContainerEl.classList.add((0,idMap/* default */.A)('container_app_sidebar_no_icons'));else this._contentContainerEl.classList.remove((0,idMap/* default */.A)('container_app_sidebar_no_icons'));
13904
- }
13905
- }
13906
13945
  // EXTERNAL MODULE: ./src/platform-implementation-js/lib/isStreakAppId.ts
13907
13946
  var isStreakAppId = __webpack_require__(8579);
13908
13947
  // EXTERNAL MODULE: ./src/common/censorHTMLstring.ts
@@ -13926,24 +13965,36 @@ var censorHTMLstring = __webpack_require__(4158);
13926
13965
 
13927
13966
 
13928
13967
 
13929
-
13930
13968
  let hasLoggedAddonInfo = false;
13931
13969
  class GmailThreadView {
13932
- _stopper = js_default()();
13933
- _widthManager = null;
13934
- _customMessageViews = new Set();
13935
- _hiddenCustomMessageViews = new Set();
13970
+ #element;
13971
+ #routeViewDriver;
13972
+ #driver;
13973
+ #isPreviewedThread;
13974
+ #eventStream;
13975
+ #stopper = js_default()();
13976
+ #toolbarView;
13977
+ #messageViewDrivers;
13978
+ #newMessageMutationObserver;
13979
+ #readyStream;
13980
+ #threadID;
13981
+ #syncThreadID;
13982
+ #customMessageViews = new Set();
13983
+ #hiddenCustomMessageViews = new Set();
13984
+ #hiddenCustomMessageNoticeProvider;
13985
+ #hiddenCustomMessageNoticeElement;
13986
+ #resolveUnmountHiddenNoticePromise;
13936
13987
  constructor(element, routeViewDriver, driver) {
13937
13988
  let isPreviewedThread = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
13938
- this._element = element;
13939
- this._routeViewDriver = routeViewDriver;
13940
- this._driver = driver;
13941
- this._isPreviewedThread = isPreviewedThread;
13942
- this._eventStream = kefir_bus_default()();
13943
- this._messageViewDrivers = [];
13944
- this._logAddonElementInfo().catch(err => this._driver.getLogger().error(err));
13945
- const waitForSidebarReady = this._driver.waitForGlobalSidebarReady().merge(this._driver.delayToTimeAfterReady(15 * 1000).flatMap(() => kefir_esm.constantError(new Error('15 second timeout while waiting for sidebar fired')))).take(1).takeErrors(1).flatMapErrors(err => {
13946
- this._driver.getLogger().error(err);
13989
+ this.#element = element;
13990
+ this.#routeViewDriver = routeViewDriver;
13991
+ this.#driver = driver;
13992
+ this.#isPreviewedThread = isPreviewedThread;
13993
+ this.#eventStream = kefir_bus_default()();
13994
+ this.#messageViewDrivers = [];
13995
+ this.#logAddonElementInfo().catch(err => this.#driver.getLogger().error(err));
13996
+ const waitForSidebarReady = this.#driver.waitForGlobalSidebarReady().merge(this.#driver.delayToTimeAfterReady(15 * 1000).flatMap(() => kefir_esm.constantError(new Error('15 second timeout while waiting for sidebar fired')))).take(1).takeErrors(1).flatMapErrors(err => {
13997
+ this.#driver.getLogger().error(err);
13947
13998
  return kefir_esm.constant(null);
13948
13999
  }).toProperty();
13949
14000
  let combinedReadyStream;
@@ -13952,75 +14003,75 @@ class GmailThreadView {
13952
14003
  } else {
13953
14004
  combinedReadyStream = waitForSidebarReady;
13954
14005
  }
13955
- this._readyStream = combinedReadyStream.map(() => {
13956
- this._setupToolbarView();
13957
- this._setupMessageViewStream();
14006
+ this.#readyStream = combinedReadyStream.map(() => {
14007
+ this.#setupToolbarView();
14008
+ this.#setupMessageViewStream();
13958
14009
  return null;
13959
- }).takeUntilBy(this._stopper).toProperty();
13960
- this._listenToExpandCollapseAll();
13961
- this._stopper.take(1).onValue(() => {
13962
- if (this._resolveUnmountHiddenNoticePromise) {
13963
- this._resolveUnmountHiddenNoticePromise();
14010
+ }).takeUntilBy(this.#stopper).toProperty();
14011
+ this.#listenToExpandCollapseAll();
14012
+ this.#stopper.take(1).onValue(() => {
14013
+ if (this.#resolveUnmountHiddenNoticePromise) {
14014
+ this.#resolveUnmountHiddenNoticePromise();
13964
14015
  }
13965
14016
  });
13966
14017
  }
13967
14018
 
13968
14019
  // TODO use livesets eventually
13969
14020
  getMessageViewDriverStream() {
13970
- return kefir_esm.constant(this._messageViewDrivers).flatten().merge(this._eventStream.filter(event => event.type === 'internal' && event.eventName === 'messageCreated').map(event => event.view));
14021
+ return kefir_esm.constant(this.#messageViewDrivers).flatten().merge(this.#eventStream.filter(event => event.type === 'internal' && event.eventName === 'messageCreated').map(event => event.view));
13971
14022
  }
13972
14023
  isLoadingStub() {
13973
14024
  return false;
13974
14025
  }
13975
14026
  getStopper() {
13976
- return this._stopper;
14027
+ return this.#stopper;
13977
14028
  }
13978
14029
  getEventStream() {
13979
- return this._eventStream;
14030
+ return this.#eventStream;
13980
14031
  }
13981
14032
  getElement() {
13982
- return this._element;
14033
+ return this.#element;
13983
14034
  }
13984
14035
  getRouteViewDriver() {
13985
- return this._routeViewDriver;
14036
+ return this.#routeViewDriver;
13986
14037
  }
13987
14038
  getIsPreviewedThread() {
13988
- return this._isPreviewedThread;
14039
+ return this.#isPreviewedThread;
13989
14040
  }
13990
14041
  getToolbarView() {
13991
- return this._toolbarView;
14042
+ return this.#toolbarView;
13992
14043
  }
13993
14044
  getMessageViewDrivers() {
13994
- return this._messageViewDrivers;
14045
+ return this.#messageViewDrivers;
13995
14046
  }
13996
14047
  destroy() {
13997
- this._eventStream.end();
13998
- this._stopper.destroy();
13999
- if (this._toolbarView) this._toolbarView.destroy();
14000
- this._messageViewDrivers.forEach(messageView => {
14048
+ this.#eventStream.end();
14049
+ this.#stopper.destroy();
14050
+ if (this.#toolbarView) this.#toolbarView.destroy();
14051
+ this.#messageViewDrivers.forEach(messageView => {
14001
14052
  messageView.destroy();
14002
14053
  });
14003
- this._messageViewDrivers.length = 0;
14004
- if (this._newMessageMutationObserver) {
14005
- this._newMessageMutationObserver.disconnect();
14054
+ this.#messageViewDrivers.length = 0;
14055
+ if (this.#newMessageMutationObserver) {
14056
+ this.#newMessageMutationObserver.disconnect();
14006
14057
  }
14007
- for (const customMessageView of this._customMessageViews) {
14058
+ for (const customMessageView of this.#customMessageViews) {
14008
14059
  customMessageView.destroy();
14009
14060
  }
14010
14061
  }
14011
14062
  addSidebarContentPanel(descriptor) {
14012
- const sidebar = this._driver.getGlobalSidebar();
14063
+ const sidebar = this.#driver.getGlobalSidebar();
14013
14064
  return sidebar.addThreadSidebarContentPanel(descriptor, this);
14014
14065
  }
14015
- _subjectContainerSelectors = {
14066
+ #subjectContainerSelectors = {
14016
14067
  '2022_10_21': '.a98.iY > .nH',
14017
14068
  '2022_10_12': '.PeIF1d > .nH',
14018
14069
  [2018]: '.if > .nH'
14019
14070
  };
14020
- _subjectContainerSelectorsAfterNov162023 = {
14071
+ #subjectContainerSelectorsAfterNov162023 = {
14021
14072
  '2023_11_16': '* > .nH'
14022
14073
  };
14023
- _subjectAISuggestionsContainerSelectors = {
14074
+ #subjectAISuggestionsContainerSelectors = {
14024
14075
  '2024_04_26': '.nH > .einvLd'
14025
14076
  };
14026
14077
  addNoticeBar() {
@@ -14028,13 +14079,13 @@ class GmailThreadView {
14028
14079
  el.className = (0,idMap/* default */.A)('thread_noticeBar');
14029
14080
  let version;
14030
14081
  let subjectContainer;
14031
- let selectorsToTry = this._subjectContainerSelectors;
14032
- if (this._element.matches('.a98.iY')) {
14082
+ let selectorsToTry = this.#subjectContainerSelectors;
14083
+ if (this.#element.matches('.a98.iY')) {
14033
14084
  // thread view gmail update Nov 16, 2023
14034
- selectorsToTry = this._subjectContainerSelectorsAfterNov162023;
14085
+ selectorsToTry = this.#subjectContainerSelectorsAfterNov162023;
14035
14086
  }
14036
14087
  for (const [currentVersion, selector] of Object.entries(selectorsToTry)) {
14037
- const el = this._element.querySelector(selector);
14088
+ const el = this.#element.querySelector(selector);
14038
14089
  if (!el) {
14039
14090
  continue;
14040
14091
  }
@@ -14043,18 +14094,18 @@ class GmailThreadView {
14043
14094
  break;
14044
14095
  }
14045
14096
  if (!subjectContainer) throw new Error('Failed to find subject container');
14046
- this._driver.getLogger().eventSdkPassive('addNoticeBar subjectContainer', {
14097
+ this.#driver.getLogger().eventSdkPassive('addNoticeBar subjectContainer', {
14047
14098
  version
14048
14099
  });
14049
14100
 
14050
14101
  // AI suggestions container could be rendered after the subject container so
14051
14102
  // if present, we need to adjust spacing when inserting the notice bar in between subject and AI suggestions
14052
- for (const [currentVersion, selector] of Object.entries(this._subjectAISuggestionsContainerSelectors)) {
14053
- const hasAIButtonsSubjectContainer = !!this._element.querySelector(selector);
14103
+ for (const [currentVersion, selector] of Object.entries(this.#subjectAISuggestionsContainerSelectors)) {
14104
+ const hasAIButtonsSubjectContainer = !!this.#element.querySelector(selector);
14054
14105
  if (!hasAIButtonsSubjectContainer) {
14055
14106
  continue;
14056
14107
  }
14057
- this._driver.getLogger().eventSdkPassive('addNoticeBar AIButtonsSubjectContainer', {
14108
+ this.#driver.getLogger().eventSdkPassive('addNoticeBar AIButtonsSubjectContainer', {
14058
14109
  version: currentVersion
14059
14110
  });
14060
14111
 
@@ -14064,27 +14115,27 @@ class GmailThreadView {
14064
14115
  }
14065
14116
  subjectContainer.insertAdjacentElement('afterend', el);
14066
14117
  const view = new SimpleElementView/* default */.A(el);
14067
- this._stopper.takeUntilBy(kefir_esm.fromEvents(view, 'destroy')).onValue(() => view.destroy());
14118
+ this.#stopper.takeUntilBy(kefir_esm.fromEvents(view, 'destroy')).onValue(() => view.destroy());
14068
14119
  return view;
14069
14120
  }
14070
14121
  registerHiddenCustomMessageNoticeProvider(provider) {
14071
- this._hiddenCustomMessageNoticeProvider = provider;
14122
+ this.#hiddenCustomMessageNoticeProvider = provider;
14072
14123
  }
14073
14124
  addCustomMessage(descriptorStream) {
14074
- const parentElement = this._element.parentElement;
14125
+ const parentElement = this.#element.parentElement;
14075
14126
  if (!parentElement) throw new Error('missing parent element');
14076
14127
  const customMessageView = new CustomMessageView(descriptorStream, () => {
14077
- this._readyStream.onValue(async () => {
14078
- const messageContainer = this._element.querySelector('[role=list]');
14128
+ this.#readyStream.onValue(async () => {
14129
+ const messageContainer = this.#element.querySelector('[role=list]');
14079
14130
  if (!messageContainer) return;
14080
14131
  let mostRecentDate = Number.MIN_SAFE_INTEGER;
14081
14132
  let insertBeforeMessage;
14082
14133
  let isInHidden = false;
14083
- const messages = [...(await Promise.all(this._messageViewDrivers.map(async messageView => ({
14134
+ const messages = [...(await Promise.all(this.#messageViewDrivers.map(async messageView => ({
14084
14135
  sortDatetime: (await messageView.getDate()) || 0,
14085
14136
  isHidden: messageView.getViewState() === 'HIDDEN',
14086
14137
  element: messageView.getElement()
14087
- })))), ...Array.from(this._customMessageViews).filter(cmv => cmv !== customMessageView && cmv.getElement().parentElement
14138
+ })))), ...Array.from(this.#customMessageViews).filter(cmv => cmv !== customMessageView && cmv.getElement().parentElement
14088
14139
  /* it has been inserted into dom */).map(cmv => {
14089
14140
  const date = cmv.getSortDate();
14090
14141
  const datetime = date ? date.getTime() : null;
@@ -14106,30 +14157,30 @@ class GmailThreadView {
14106
14157
  }
14107
14158
  if (insertBeforeMessage) insertBeforeMessage.insertAdjacentElement('beforebegin', customMessageView.getElement());else messageContainer.insertAdjacentElement('beforeend', customMessageView.getElement());
14108
14159
  if (isInHidden) {
14109
- this._setupHiddenCustomMessage(customMessageView);
14160
+ this.#setupHiddenCustomMessage(customMessageView);
14110
14161
  }
14111
14162
  parentElement.classList.add('inboxsdk__thread_view_with_custom_view');
14112
14163
  });
14113
14164
  });
14114
- this._customMessageViews.add(customMessageView);
14165
+ this.#customMessageViews.add(customMessageView);
14115
14166
  customMessageView.on('destroy', () => {
14116
- this._customMessageViews.delete(customMessageView);
14117
- if (this._customMessageViews.size > 0) parentElement.classList.add('inboxsdk__thread_view_with_custom_view');else parentElement.classList.remove('inboxsdk__thread_view_with_custom_view');
14167
+ this.#customMessageViews.delete(customMessageView);
14168
+ if (this.#customMessageViews.size > 0) parentElement.classList.add('inboxsdk__thread_view_with_custom_view');else parentElement.classList.remove('inboxsdk__thread_view_with_custom_view');
14118
14169
  });
14119
14170
  return customMessageView;
14120
14171
  }
14121
- _setupHiddenCustomMessage(customMessageView) {
14122
- this._hiddenCustomMessageViews.add(customMessageView);
14172
+ #setupHiddenCustomMessage(customMessageView) {
14173
+ this.#hiddenCustomMessageViews.add(customMessageView);
14123
14174
 
14124
14175
  // hide the element
14125
14176
  customMessageView.getElement().classList.add('inboxsdk__custom_message_view_hidden');
14126
14177
 
14127
14178
  // get the message element that contains the hidden messages notice
14128
- let hiddenNoticeMessageElement = this._element.querySelector('.adv');
14179
+ let hiddenNoticeMessageElement = this.#element.querySelector('.adv');
14129
14180
  let nativeHiddenNoticePresent = true;
14130
14181
  if (!hiddenNoticeMessageElement) {
14131
14182
  nativeHiddenNoticePresent = false;
14132
- const superCollapsedMessageElements = Array.from(this._element.querySelectorAll('.kQ'));
14183
+ const superCollapsedMessageElements = Array.from(this.#element.querySelectorAll('.kQ'));
14133
14184
  if (superCollapsedMessageElements.length < 2) return;
14134
14185
  hiddenNoticeMessageElement = superCollapsedMessageElements[1];
14135
14186
  }
@@ -14138,30 +14189,30 @@ class GmailThreadView {
14138
14189
  (0,make_mutation_observer_chunked_stream/* default */.A)(hiddenNoticeMessageElement, {
14139
14190
  attributes: true,
14140
14191
  attributeFilter: ['class']
14141
- }).takeUntilBy(kefir_esm.merge([this._stopper, kefir_esm.fromEvents(customMessageView, 'destroy')])).filter(() => hiddenNoticeMessageElement && !hiddenNoticeMessageElement.classList.contains('kQ')) //when kQ is gone, message is visible
14192
+ }).takeUntilBy(kefir_esm.merge([this.#stopper, kefir_esm.fromEvents(customMessageView, 'destroy')])).filter(() => hiddenNoticeMessageElement && !hiddenNoticeMessageElement.classList.contains('kQ')) //when kQ is gone, message is visible
14142
14193
  .onValue(() => {
14143
14194
  customMessageView.getElement().classList.remove('inboxsdk__custom_message_view_hidden');
14144
- if (this._hiddenCustomMessageNoticeElement) this._hiddenCustomMessageNoticeElement.remove();
14145
- this._hiddenCustomMessageNoticeElement = null;
14195
+ if (this.#hiddenCustomMessageNoticeElement) this.#hiddenCustomMessageNoticeElement.remove();
14196
+ this.#hiddenCustomMessageNoticeElement = null;
14146
14197
  });
14147
- this._updateHiddenNotice(hiddenNoticeMessageElement, nativeHiddenNoticePresent);
14148
- kefir_esm.fromEvents(customMessageView, 'destroy').takeUntilBy(this._stopper).take(1).onValue(() => {
14149
- this._hiddenCustomMessageViews.delete(customMessageView);
14150
- if (hiddenNoticeMessageElement) this._updateHiddenNotice(hiddenNoticeMessageElement, nativeHiddenNoticePresent);
14198
+ this.#updateHiddenNotice(hiddenNoticeMessageElement, nativeHiddenNoticePresent);
14199
+ kefir_esm.fromEvents(customMessageView, 'destroy').takeUntilBy(this.#stopper).take(1).onValue(() => {
14200
+ this.#hiddenCustomMessageViews.delete(customMessageView);
14201
+ if (hiddenNoticeMessageElement) this.#updateHiddenNotice(hiddenNoticeMessageElement, nativeHiddenNoticePresent);
14151
14202
  });
14152
14203
  }
14153
- _updateHiddenNotice(hiddenNoticeMessageElement, nativeHiddenNoticePresent) {
14154
- const existingAppNoticeElement = this._hiddenCustomMessageNoticeElement;
14204
+ #updateHiddenNotice(hiddenNoticeMessageElement, nativeHiddenNoticePresent) {
14205
+ const existingAppNoticeElement = this.#hiddenCustomMessageNoticeElement;
14155
14206
  if (existingAppNoticeElement) {
14156
14207
  existingAppNoticeElement.remove();
14157
- this._hiddenCustomMessageNoticeElement = null;
14158
- if (this._resolveUnmountHiddenNoticePromise) this._resolveUnmountHiddenNoticePromise();
14208
+ this.#hiddenCustomMessageNoticeElement = null;
14209
+ if (this.#resolveUnmountHiddenNoticePromise) this.#resolveUnmountHiddenNoticePromise();
14159
14210
  }
14160
- const noticeProvider = this._hiddenCustomMessageNoticeProvider;
14211
+ const noticeProvider = this.#hiddenCustomMessageNoticeProvider;
14161
14212
  if (!noticeProvider) return;
14162
- const appNoticeContainerElement = this._hiddenCustomMessageNoticeElement = document.createElement('span');
14213
+ const appNoticeContainerElement = this.#hiddenCustomMessageNoticeElement = document.createElement('span');
14163
14214
  appNoticeContainerElement.classList.add('inboxsdk__custom_message_view_app_notice_content');
14164
- const numberCustomHiddenMessages = this._hiddenCustomMessageViews.size;
14215
+ const numberCustomHiddenMessages = this.#hiddenCustomMessageViews.size;
14165
14216
  let numberNativeHiddenMessages = null;
14166
14217
  if (nativeHiddenNoticePresent) {
14167
14218
  const nativeHiddenNoticeCountSpan = (0,querySelectorOrFail/* default */.A)(hiddenNoticeMessageElement, '.adx span');
@@ -14171,7 +14222,7 @@ class GmailThreadView {
14171
14222
  }
14172
14223
  }
14173
14224
  const appNoticeElement = noticeProvider(numberCustomHiddenMessages, numberNativeHiddenMessages, new Promise(resolve => {
14174
- this._resolveUnmountHiddenNoticePromise = resolve;
14225
+ this.#resolveUnmountHiddenNoticePromise = resolve;
14175
14226
  }));
14176
14227
  if (!appNoticeElement) {
14177
14228
  return;
@@ -14188,7 +14239,7 @@ class GmailThreadView {
14188
14239
  hiddenNoticeElement.appendChild(appNoticeContainerElement);
14189
14240
  }
14190
14241
  getSubject() {
14191
- var subjectElement = this._element.querySelector('.ha h2');
14242
+ var subjectElement = this.#element.querySelector('.ha h2');
14192
14243
  if (!subjectElement) {
14193
14244
  return '';
14194
14245
  }
@@ -14206,57 +14257,57 @@ class GmailThreadView {
14206
14257
  return subjectElement.textContent;
14207
14258
  }
14208
14259
  getInternalID() {
14209
- return this._syncThreadID || this.getThreadID();
14260
+ return this.#syncThreadID || this.getThreadID();
14210
14261
  }
14211
14262
 
14212
14263
  // Follows a similar structure to getThreadIDAsync, but gives up if async work is needed
14213
14264
  getThreadID() {
14214
- if (this._threadID) return this._threadID;
14265
+ if (this.#threadID) return this.#threadID;
14215
14266
  let threadID;
14216
- const idElement = this._element.querySelector('[data-thread-perm-id]');
14267
+ const idElement = this.#element.querySelector('[data-thread-perm-id]');
14217
14268
  if (!idElement) throw new Error('threadID element not found');
14218
- const syncThreadID = this._syncThreadID = idElement.getAttribute('data-thread-perm-id');
14269
+ const syncThreadID = this.#syncThreadID = idElement.getAttribute('data-thread-perm-id');
14219
14270
  if (!syncThreadID) throw new Error('syncThreadID attribute with no value');
14220
14271
  threadID = idElement.getAttribute('data-legacy-thread-id');
14221
14272
  if (!threadID) {
14222
14273
  const err = new Error('Failed to get id for thread: data-legacy-thread-id attribute missing');
14223
- this._driver.getLogger().error(err); // throw err;
14274
+ this.#driver.getLogger().error(err); // throw err;
14224
14275
  // Fall back to old behavior instead of throwing. Probably not super sensible, but
14225
14276
  // this is a deprecated method and preserving the current behavior is
14226
14277
  // probably an okay choice.
14227
14278
  }
14228
14279
 
14229
14280
  if (!threadID) {
14230
- if (this._isPreviewedThread) {
14231
- threadID = this._driver.getPageCommunicator().getCurrentThreadID(this._element, true);
14281
+ if (this.#isPreviewedThread) {
14282
+ threadID = this.#driver.getPageCommunicator().getCurrentThreadID(this.#element, true);
14232
14283
  } else {
14233
- const params = this._routeViewDriver ? this._routeViewDriver.getParams() : null;
14284
+ const params = this.#routeViewDriver ? this.#routeViewDriver.getParams() : null;
14234
14285
  if (params && params.threadID) {
14235
14286
  threadID = params.threadID;
14236
14287
  } else {
14237
14288
  const err = new Error('Failed to get id for thread');
14238
- this._driver.getLogger().error(err);
14289
+ this.#driver.getLogger().error(err);
14239
14290
  throw err;
14240
14291
  }
14241
14292
  }
14242
14293
  }
14243
- this._threadID = threadID;
14294
+ this.#threadID = threadID;
14244
14295
  return threadID;
14245
14296
  }
14246
14297
  async getThreadIDAsync() {
14247
14298
  let threadID;
14248
- const idElement = this._element.querySelector('[data-thread-perm-id]');
14299
+ const idElement = this.#element.querySelector('[data-thread-perm-id]');
14249
14300
  if (!idElement) throw new Error('threadID element not found');
14250
- const syncThreadID = this._syncThreadID = idElement.getAttribute('data-thread-perm-id');
14301
+ const syncThreadID = this.#syncThreadID = idElement.getAttribute('data-thread-perm-id');
14251
14302
  if (!syncThreadID) throw new Error('syncThreadID attribute with no value');
14252
- this._threadID = threadID = idElement.getAttribute('data-legacy-thread-id');
14303
+ this.#threadID = threadID = idElement.getAttribute('data-legacy-thread-id');
14253
14304
  if (!threadID) {
14254
- this._threadID = threadID = await this._driver.getOldGmailThreadIdFromSyncThreadId(syncThreadID);
14305
+ this.#threadID = threadID = await this.#driver.getOldGmailThreadIdFromSyncThreadId(syncThreadID);
14255
14306
  }
14256
- if (this._threadID) return this._threadID;else throw new Error('Failed to get id for thread');
14307
+ if (this.#threadID) return this.#threadID;else throw new Error('Failed to get id for thread');
14257
14308
  }
14258
14309
  addLabel() {
14259
- const labelContainer = this._element.querySelector('.ha .J-J5-Ji');
14310
+ const labelContainer = this.#element.querySelector('.ha .J-J5-Ji');
14260
14311
  if (!labelContainer) {
14261
14312
  throw new Error('Thread view label container not found');
14262
14313
  }
@@ -14273,14 +14324,14 @@ class GmailThreadView {
14273
14324
  observer.observe(labelContainer, {
14274
14325
  childList: true
14275
14326
  });
14276
- this._stopper.takeUntilBy(kefir_esm.fromEvents(view, 'destroy')).onValue(() => view.destroy());
14327
+ this.#stopper.takeUntilBy(kefir_esm.fromEvents(view, 'destroy')).onValue(() => view.destroy());
14277
14328
  kefir_esm.fromEvents(view, 'destroy').take(1).onValue(() => {
14278
14329
  observer.disconnect();
14279
14330
  });
14280
14331
  return view;
14281
14332
  }
14282
14333
  addSubjectButton(button) {
14283
- const subjectParent = this._element.querySelector('.V8djrc.byY');
14334
+ const subjectParent = this.#element.querySelector('.V8djrc.byY');
14284
14335
  if (!subjectParent) {
14285
14336
  throw new querySelectorOrFail/* SelectorError */.a('.V8djrc.byY', {
14286
14337
  cause: 'Subject wrapper element not found'
@@ -14312,7 +14363,7 @@ class GmailThreadView {
14312
14363
  childList: true,
14313
14364
  subtree: true
14314
14365
  });
14315
- this._stopper.takeUntilBy(kefir_esm.fromEvents(buttonElement, 'destroy')).onValue(() => buttonOptions.buttonView.destroy());
14366
+ this.#stopper.takeUntilBy(kefir_esm.fromEvents(buttonElement, 'destroy')).onValue(() => buttonOptions.buttonView.destroy());
14316
14367
  kefir_esm.fromEvents(buttonElement, 'destroy').take(1).onValue(() => {
14317
14368
  observer.disconnect();
14318
14369
  });
@@ -14320,10 +14371,10 @@ class GmailThreadView {
14320
14371
  }
14321
14372
  addFooterButton(button) {
14322
14373
  const messagesSelector = 'div.nH .aHU';
14323
- const messagesContainer = this._element.querySelector(messagesSelector);
14374
+ const messagesContainer = this.#element.querySelector(messagesSelector);
14324
14375
  if (!messagesContainer) {
14325
- this._driver.getLogger().eventSdkPassive('Footer button selector fail', {
14326
- html: (0,censorHTMLtree/* default */.A)(this._element)
14376
+ this.#driver.getLogger().eventSdkPassive('Footer button selector fail', {
14377
+ html: (0,censorHTMLtree/* default */.A)(this.#element)
14327
14378
  });
14328
14379
  throw new querySelectorOrFail/* SelectorError */.a(messagesSelector, {
14329
14380
  cause: 'Last message footer element not found'
@@ -14343,8 +14394,8 @@ class GmailThreadView {
14343
14394
  // Sometimes it is there right away
14344
14395
  const subjectToolbarElement = this.#findBottomReplyToolbarElement();
14345
14396
  if (subjectToolbarElement) {
14346
- const reactionButton = this._element.querySelector('.amn .wrsVRe');
14347
- if (reactionButton && !this._element.querySelector(`#${spacerID}`)) {
14397
+ const reactionButton = this.#element.querySelector('.amn .wrsVRe');
14398
+ if (reactionButton && !this.#element.querySelector(`#${spacerID}`)) {
14348
14399
  subjectToolbarElement.appendChild(spacer);
14349
14400
  }
14350
14401
  subjectToolbarElement.appendChild(buttonElement);
@@ -14355,8 +14406,8 @@ class GmailThreadView {
14355
14406
  if (mutationsList.some(mutation => mutation.type === 'childList')) {
14356
14407
  const subjectToolbarElement = this.#findBottomReplyToolbarElement();
14357
14408
  if (subjectToolbarElement && !subjectToolbarElement.contains(buttonElement)) {
14358
- const reactionButton = this._element.querySelector('.amn .wrsVRe');
14359
- if (reactionButton && !this._element.querySelector(`#${spacerID}`)) {
14409
+ const reactionButton = this.#element.querySelector('.amn .wrsVRe');
14410
+ if (reactionButton && !this.#element.querySelector(`#${spacerID}`)) {
14360
14411
  subjectToolbarElement.appendChild(spacer);
14361
14412
  }
14362
14413
  subjectToolbarElement.appendChild(buttonElement);
@@ -14367,30 +14418,30 @@ class GmailThreadView {
14367
14418
  childList: true,
14368
14419
  subtree: true
14369
14420
  });
14370
- this._stopper.takeUntilBy(kefir_esm.fromEvents(buttonElement, 'destroy')).onValue(() => buttonOptions.buttonView.destroy());
14421
+ this.#stopper.takeUntilBy(kefir_esm.fromEvents(buttonElement, 'destroy')).onValue(() => buttonOptions.buttonView.destroy());
14371
14422
  kefir_esm.fromEvents(buttonElement, 'destroy').take(1).onValue(() => {
14372
14423
  observer.disconnect();
14373
14424
  });
14374
14425
  return new basic_button_view_controller/* default */.A(buttonOptions);
14375
14426
  }
14376
- _setupToolbarView() {
14377
- const toolbarElement = this._findToolbarElement();
14427
+ #setupToolbarView() {
14428
+ const toolbarElement = this.#findToolbarElement();
14378
14429
  if (!toolbarElement) {
14379
- if ((0,isStreakAppId/* default */.A)(this._driver.getAppId())) {
14430
+ if ((0,isStreakAppId/* default */.A)(this.#driver.getAppId())) {
14380
14431
  const threadViewEl = document.querySelector('.nH.bkK');
14381
14432
  if (threadViewEl instanceof HTMLElement) {
14382
- this._driver.getLogger().error(new Error('Thread view toolbar cannot be found'), {
14433
+ this.#driver.getLogger().error(new Error('Thread view toolbar cannot be found'), {
14383
14434
  threadViewHtml: (0,censorHTMLstring/* default */.A)(threadViewEl.innerHTML)
14384
14435
  });
14385
14436
  } else {
14386
14437
  const pageHtml = document.querySelector('.nH');
14387
14438
  if (pageHtml instanceof HTMLElement) {
14388
- this._driver.getLogger().error(new Error('Thread view toolbar cannot be found'), {
14439
+ this.#driver.getLogger().error(new Error('Thread view toolbar cannot be found'), {
14389
14440
  threadViewHtml: '.nH.bkK cannot be found',
14390
14441
  pageHtml: (0,censorHTMLstring/* default */.A)(pageHtml.innerHTML)
14391
14442
  });
14392
14443
  } else {
14393
- this._driver.getLogger().error(new Error('Thread view toolbar cannot be found'), {
14444
+ this.#driver.getLogger().error(new Error('Thread view toolbar cannot be found'), {
14394
14445
  threadViewHtml: '.nH.bkK cannot be found',
14395
14446
  pageHtml: '.nH cannot be found'
14396
14447
  });
@@ -14401,111 +14452,98 @@ class GmailThreadView {
14401
14452
  }
14402
14453
  const toolbarParent = toolbarElement.parentElement;
14403
14454
  if (toolbarParent) toolbarParent.classList.add('inboxsdk__thread_toolbar_parent');
14404
- this._toolbarView = new gmail_toolbar_view(toolbarElement, this._driver, this._routeViewDriver, this);
14455
+ this.#toolbarView = new gmail_toolbar_view(toolbarElement, this.#driver, this.#routeViewDriver, this);
14405
14456
  }
14406
- _findToolbarElement() {
14457
+ #findToolbarElement() {
14407
14458
  var toolbarContainerElements = document.querySelectorAll('[gh=tm]');
14408
14459
  for (var ii = 0; ii < toolbarContainerElements.length; ii++) {
14409
- if (this._isToolbarContainerRelevant(toolbarContainerElements[ii])) {
14460
+ if (this.#isToolbarContainerRelevant(toolbarContainerElements[ii])) {
14410
14461
  return toolbarContainerElements[ii].querySelector('[gh=mtb]');
14411
14462
  }
14412
14463
  }
14413
14464
  return null;
14414
14465
  }
14415
14466
  #findSubjectToolbarElement() {
14416
- var toolbarContainerElement = this._element.querySelector('.bHJ');
14467
+ var toolbarContainerElement = this.#element.querySelector('.bHJ');
14417
14468
  return toolbarContainerElement;
14418
14469
  }
14419
14470
  #findBottomReplyToolbarElement() {
14420
- var toolbarContainerElements = this._element.querySelectorAll('table .amn');
14471
+ var toolbarContainerElements = this.#element.querySelectorAll('table .amn');
14421
14472
  return toolbarContainerElements[0];
14422
14473
  }
14423
- _isToolbarContainerRelevant(toolbarContainerElement) {
14424
- if (toolbarContainerElement.parentElement.parentElement === this._element.parentElement.parentElement) {
14474
+ #isToolbarContainerRelevant(toolbarContainerElement) {
14475
+ if (toolbarContainerElement.parentElement.parentElement === this.#element.parentElement.parentElement) {
14425
14476
  return true;
14426
14477
  }
14427
- if (toolbarContainerElement.parentElement.getAttribute('role') !== 'main' && this._element.parentElement.getAttribute('role') !== 'main') {
14478
+ if (toolbarContainerElement.parentElement.getAttribute('role') !== 'main' && this.#element.parentElement.getAttribute('role') !== 'main') {
14428
14479
  return true;
14429
14480
  }
14430
- if (toolbarContainerElement.parentElement.getAttribute('role') === 'main' && toolbarContainerElement.parentElement.querySelector('.if, .PeIF1d, .a98.iY') && (toolbarContainerElement.parentElement.querySelector('.if, .PeIF1d, .a98.iY').parentElement === this._element || toolbarContainerElement.parentElement.querySelector('.a98.iY') === this._element)) {
14481
+ if (toolbarContainerElement.parentElement.getAttribute('role') === 'main' && toolbarContainerElement.parentElement.querySelector('.if, .PeIF1d, .a98.iY') && (toolbarContainerElement.parentElement.querySelector('.if, .PeIF1d, .a98.iY').parentElement === this.#element || toolbarContainerElement.parentElement.querySelector('.a98.iY') === this.#element)) {
14431
14482
  let version = '2018';
14432
- if (this._element.matches('.a98.iY')) {
14483
+ if (this.#element.matches('.a98.iY')) {
14433
14484
  version = '2023-11-16';
14434
14485
  } else if (toolbarContainerElement.parentElement.querySelector('.a98.iY')) {
14435
14486
  version = '2022-10-20';
14436
14487
  } else if (toolbarContainerElement.parentElement.querySelector('.PeIF1d')) {
14437
14488
  version = '2022-10-12';
14438
14489
  }
14439
- this._driver.getLogger().eventSdkPassive('gmailThreadView_isToolbarContainerRelevant', {
14490
+ this.#driver.getLogger().eventSdkPassive('gmailThreadView_isToolbarContainerRelevant', {
14440
14491
  version
14441
14492
  });
14442
14493
  return true;
14443
14494
  }
14444
14495
  return false;
14445
14496
  }
14446
- _setupMessageViewStream() {
14447
- var openMessage = this._element.querySelector('.h7');
14497
+ #setupMessageViewStream() {
14498
+ var openMessage = this.#element.querySelector('.h7');
14448
14499
  if (!openMessage) {
14449
14500
  var self = this;
14450
14501
  setTimeout(function () {
14451
- if (self._element) {
14452
- self._setupMessageViewStream();
14502
+ if (self.#element) {
14503
+ self.#setupMessageViewStream();
14453
14504
  }
14454
14505
  }, 500);
14455
14506
  return;
14456
14507
  }
14457
14508
  var messageContainer = openMessage.parentElement;
14458
- this._initializeExistingMessages(messageContainer);
14459
- this._observeNewMessages(messageContainer);
14509
+ this.#initializeExistingMessages(messageContainer);
14510
+ this.#observeNewMessages(messageContainer);
14460
14511
  }
14461
- _initializeExistingMessages(messageContainer) {
14512
+ #initializeExistingMessages(messageContainer) {
14462
14513
  var self = this;
14463
14514
  var children = messageContainer.children;
14464
14515
  Array.prototype.forEach.call(children, function (childElement) {
14465
- self._createMessageView(childElement);
14516
+ self.#createMessageView(childElement);
14466
14517
  });
14467
14518
  }
14468
- _observeNewMessages(messageContainer) {
14469
- this._newMessageMutationObserver = new MutationObserver(this._handleNewMessageMutations.bind(this));
14470
- this._newMessageMutationObserver.observe(messageContainer, {
14519
+ #observeNewMessages(messageContainer) {
14520
+ this.#newMessageMutationObserver = new MutationObserver(this.#handleNewMessageMutations.bind(this));
14521
+ this.#newMessageMutationObserver.observe(messageContainer, {
14471
14522
  childList: true
14472
14523
  });
14473
14524
  }
14474
- _handleNewMessageMutations(mutations) {
14525
+ #handleNewMessageMutations(mutations) {
14475
14526
  var self = this;
14476
14527
  mutations.forEach(function (mutation) {
14477
14528
  Array.prototype.forEach.call(mutation.addedNodes, function (addedNode) {
14478
- if (!addedNode.classList.contains('inboxsdk__custom_message_view')) self._createMessageView(addedNode);
14529
+ if (!addedNode.classList.contains('inboxsdk__custom_message_view')) self.#createMessageView(addedNode);
14479
14530
  });
14480
14531
  });
14481
14532
  }
14482
- _createMessageView(messageElement) {
14483
- var messageView = new gmail_message_view(messageElement, this, this._driver);
14484
- this._eventStream.plug(messageView.getEventStream());
14485
- this._messageViewDrivers.push(messageView);
14486
- this._eventStream.emit({
14533
+ #createMessageView(messageElement) {
14534
+ var messageView = new gmail_message_view(messageElement, this, this.#driver);
14535
+ this.#eventStream.plug(messageView.getEventStream());
14536
+ this.#messageViewDrivers.push(messageView);
14537
+ this.#eventStream.emit({
14487
14538
  type: 'internal',
14488
14539
  eventName: 'messageCreated',
14489
14540
  view: messageView
14490
14541
  });
14491
14542
  }
14492
- _setupWidthManager() {
14493
- let widthManager = this._widthManager;
14494
- if (!widthManager) {
14495
- const addonSidebarElement = gmail_element_getter/* default */.A.getAddonSidebarContainerElement();
14496
- if (!addonSidebarElement) throw new Error('addonSidebarElement not found');
14497
- const mainContentBodyContainerElement = gmail_element_getter/* default */.A.getMainContentBodyContainerElement();
14498
- if (!mainContentBodyContainerElement) throw new Error('mainContentBodyContainerElement not found');
14499
- const contentContainer = mainContentBodyContainerElement.parentElement;
14500
- if (!contentContainer) throw new Error('mainContentBodyContainerElement has no parent element');
14501
- this._widthManager = widthManager = new WidthManager(contentContainer, addonSidebarElement);
14502
- }
14503
- return widthManager;
14504
- }
14505
14543
  getReadyStream() {
14506
- return this._readyStream;
14544
+ return this.#readyStream;
14507
14545
  }
14508
- async _logAddonElementInfo() {
14546
+ async #logAddonElementInfo() {
14509
14547
  if (hasLoggedAddonInfo) return;
14510
14548
  function readInfo() {
14511
14549
  const container = gmail_element_getter/* default */.A.getAddonSidebarContainerElement();
@@ -14531,22 +14569,22 @@ class GmailThreadView {
14531
14569
  eventData.time[0] = readInfo();
14532
14570
  await Promise.all([30, 5000].map(async time => {
14533
14571
  await (0,pdelay_js/* default */.A)(time);
14534
- if (this._stopper.stopped) return;
14572
+ if (this.#stopper.stopped) return;
14535
14573
  eventData.time[time] = readInfo();
14536
14574
  }));
14537
- if (this._stopper.stopped) return;
14538
- this._driver.getLogger().eventSdkPassive('gmailSidebarElementInfo', eventData);
14575
+ if (this.#stopper.stopped) return;
14576
+ this.#driver.getLogger().eventSdkPassive('gmailSidebarElementInfo', eventData);
14539
14577
  hasLoggedAddonInfo = true;
14540
14578
  }
14541
- _listenToExpandCollapseAll() {
14579
+ #listenToExpandCollapseAll() {
14542
14580
  //expand all
14543
- const expandAllElementImg = this._element.querySelector('img.gx');
14581
+ const expandAllElementImg = this.#element.querySelector('img.gx');
14544
14582
  if (expandAllElementImg) {
14545
14583
  const expandAllElement = findParent(expandAllElementImg, el => el.getAttribute('role') === 'button');
14546
14584
  if (expandAllElement) {
14547
14585
  kefir_esm.merge([kefir_esm.fromEvents(expandAllElement, 'click'), kefir_esm.fromEvents(expandAllElement, 'keydown').filter(e => e.which === 13
14548
- /* enter */)]).takeUntilBy(this._stopper).onValue(() => {
14549
- for (const customMessageView of this._customMessageViews) {
14586
+ /* enter */)]).takeUntilBy(this.#stopper).onValue(() => {
14587
+ for (const customMessageView of this.#customMessageViews) {
14550
14588
  customMessageView.expand();
14551
14589
  }
14552
14590
  });
@@ -14554,13 +14592,13 @@ class GmailThreadView {
14554
14592
  }
14555
14593
 
14556
14594
  //collapse all
14557
- const collapseAllElementImg = this._element.querySelector('img.gq');
14595
+ const collapseAllElementImg = this.#element.querySelector('img.gq');
14558
14596
  if (collapseAllElementImg) {
14559
14597
  const collapseAllElement = findParent(collapseAllElementImg, el => el.getAttribute('role') === 'button');
14560
14598
  if (collapseAllElement) {
14561
14599
  kefir_esm.merge([kefir_esm.fromEvents(collapseAllElement, 'click'), kefir_esm.fromEvents(collapseAllElement, 'keydown').filter(e => e.which === 13
14562
- /* enter */)]).takeUntilBy(this._stopper).onValue(() => {
14563
- for (const customMessageView of this._customMessageViews) {
14600
+ /* enter */)]).takeUntilBy(this.#stopper).onValue(() => {
14601
+ for (const customMessageView of this.#customMessageViews) {
14564
14602
  customMessageView.collapse();
14565
14603
  }
14566
14604
  });
@@ -14882,7 +14920,7 @@ options.insert = htmlElement => {
14882
14920
  htmlElement.setAttribute('data-inboxsdk-version',
14883
14921
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
14884
14922
  ///@ts-ignore
14885
- "2.1.53-1714159478442-63b2f992c29e0e62");
14923
+ "2.1.55-1716205678635-d6562cf5c54c7c73");
14886
14924
  document.head.append(htmlElement);
14887
14925
  };
14888
14926
  options.domAPI = (styleDomAPI_default());
@@ -19505,7 +19543,7 @@ mole_view_module_options.insert = htmlElement => {
19505
19543
  htmlElement.setAttribute('data-inboxsdk-version',
19506
19544
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- this is injected by webpack
19507
19545
  ///@ts-ignore
19508
- "2.1.53-1714159478442-63b2f992c29e0e62");
19546
+ "2.1.55-1716205678635-d6562cf5c54c7c73");
19509
19547
  document.head.append(htmlElement);
19510
19548
  };
19511
19549
  mole_view_module_options.domAPI = (styleDomAPI_default());
@@ -23318,8 +23356,8 @@ async function openComposeWindow(_gmailDriver) {
23318
23356
  if (!composeButton) throw new Error('Could not find compose button');
23319
23357
  (0,simulate_mouse_event/* simulateClick */.jp)(composeButton);
23320
23358
  }
23321
- // EXTERNAL MODULE: ./src/platform-implementation-js/dom-driver/gmail/views/gmail-app-sidebar-view/index.ts + 7 modules
23322
- var gmail_app_sidebar_view = __webpack_require__(470);
23359
+ // EXTERNAL MODULE: ./src/platform-implementation-js/dom-driver/gmail/views/gmail-app-sidebar-view/index.ts + 8 modules
23360
+ var gmail_app_sidebar_view = __webpack_require__(2893);
23323
23361
  ;// CONCATENATED MODULE: ./src/platform-implementation-js/dom-driver/gmail/gmail-driver/suppressAddon.ts
23324
23362
 
23325
23363
 
@@ -25290,6 +25328,31 @@ class DropdownView extends safe_event_emitter/* default */.A {
25290
25328
  }
25291
25329
  }
25292
25330
 
25331
+ /***/ }),
25332
+
25333
+ /***/ 8855:
25334
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
25335
+
25336
+ "use strict";
25337
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25338
+ /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__),
25339
+ /* harmony export */ N: () => (/* binding */ iconLiga)
25340
+ /* harmony export */ });
25341
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5516);
25342
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
25343
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1364);
25344
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
25345
+ // Imports
25346
+
25347
+
25348
+ var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
25349
+ // Module
25350
+ ___CSS_LOADER_EXPORT___.push([module.id, ".inboxsdk__GBPjAIsupt3H7foDtouM{font-size:20px;line-height:1;position:relative;z-index:1!important}", "",{"version":3,"sources":["webpack://./src/platform-implementation-js/dom-driver/gmail/views/gmail-app-sidebar-view/primary/index.module.css"],"names":[],"mappings":"AAAA,gCACE,cAAe,CACf,aAAc,CACd,iBAAkB,CAClB,mBACF","sourcesContent":[".iconLiga {\n font-size: 20px;\n line-height: 1;\n position: relative;\n z-index: 1 !important;\n}\n"],"sourceRoot":""}]);
25351
+ // Exports
25352
+ var iconLiga = "inboxsdk__GBPjAIsupt3H7foDtouM";
25353
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
25354
+
25355
+
25293
25356
  /***/ }),
25294
25357
 
25295
25358
  /***/ 9245:
@@ -31496,40 +31559,6 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
31496
31559
  }());
31497
31560
 
31498
31561
 
31499
- /***/ }),
31500
-
31501
- /***/ 8104:
31502
- /***/ ((module, exports, __webpack_require__) => {
31503
-
31504
- "use strict";
31505
-
31506
-
31507
- exports.__esModule = true;
31508
- exports["default"] = closest;
31509
-
31510
- var _matchesSelectorNg = _interopRequireDefault(__webpack_require__(9864));
31511
-
31512
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31513
-
31514
- var proto = __webpack_require__.g.Element && __webpack_require__.g.Element.prototype;
31515
- var vendor = proto && proto.closest;
31516
-
31517
- function closest(element, selector) {
31518
- if (vendor) return vendor.call(element, selector);
31519
- var parent = element;
31520
-
31521
- do {
31522
- if ((0, _matchesSelectorNg.default)(parent, selector)) return parent;
31523
- parent = parent.parentNode;
31524
- } while (parent && parent !== __webpack_require__.g.document);
31525
-
31526
- return null;
31527
- }
31528
-
31529
- module.exports = exports.default;
31530
- module.exports["default"] = exports.default;
31531
-
31532
-
31533
31562
  /***/ }),
31534
31563
 
31535
31564
  /***/ 6401: