@subiz/widget-v4 4.1.101 → 4.1.103

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 (55) hide show
  1. package/assets/img/subiz-mono.svg +1 -1
  2. package/assets/less/form.less +44 -31
  3. package/assets/less/widget.less +18 -14
  4. package/assets/less/widget_header.less +1 -1
  5. package/compiled_src/chatbox/PoweredBy.js +2 -2
  6. package/compiled_src/chatbox/Widget.js +27 -19
  7. package/dist/132.js +6433 -2568
  8. package/dist/178.js +406 -0
  9. package/dist/18a02a9c54e.132.js +1 -0
  10. package/dist/18a02a9c54e.178.js +1 -0
  11. package/dist/18a02a9c54e.213.js +1 -0
  12. package/dist/18a02a9c54e.335.js +1 -0
  13. package/dist/18a02a9c54e.362.js +1 -0
  14. package/dist/18a02a9c54e.441.js +1 -0
  15. package/dist/18a02a9c54e.605.js +1 -0
  16. package/dist/18a02a9c54e.678.js +1 -0
  17. package/dist/18a02a9c54e.782.js +1 -0
  18. package/dist/18a02a9c54e.app.js +1 -0
  19. package/dist/{191a179639e.index.html → 18a02a9c54e.index.html} +4 -28
  20. package/dist/{191a179639e.library.html → 18a02a9c54e.library.html} +4 -28
  21. package/dist/18a02a9c54e.library.js +1 -0
  22. package/dist/{191a179639e.preview.html → 18a02a9c54e.preview.html} +1 -1
  23. package/dist/18a02a9c54e.preview.js +1 -0
  24. package/dist/18a02a9c54e.screenshoot.js +1 -0
  25. package/dist/18a02a9c54e.webview.js +1 -0
  26. package/dist/213.js +2780 -0
  27. package/dist/{74.js → 335.js} +35 -35
  28. package/dist/{459.js → 362.js} +7 -7
  29. package/dist/441.js +2855 -0
  30. package/dist/{490.js → 605.js} +82 -82
  31. package/dist/{997.js → 678.js} +6 -6
  32. package/dist/{27.js → 782.js} +7 -7
  33. package/dist/HASH +1 -1
  34. package/dist/malicious-app.js +4 -6
  35. package/dist/screenshoot.html +1 -1
  36. package/dist/screenshoot.js +2501 -6728
  37. package/package.json +3 -3
  38. package/src/chatbox/PoweredBy.js +1 -1
  39. package/src/chatbox/Widget.js +28 -19
  40. package/dist/127.js +0 -273
  41. package/dist/185.js +0 -1885
  42. package/dist/191a179639e.127.js +0 -1
  43. package/dist/191a179639e.132.js +0 -1
  44. package/dist/191a179639e.185.js +0 -1
  45. package/dist/191a179639e.27.js +0 -1
  46. package/dist/191a179639e.278.js +0 -1
  47. package/dist/191a179639e.459.js +0 -1
  48. package/dist/191a179639e.490.js +0 -1
  49. package/dist/191a179639e.74.js +0 -1
  50. package/dist/191a179639e.997.js +0 -1
  51. package/dist/191a179639e.app.js +0 -1
  52. package/dist/191a179639e.library.js +0 -1
  53. package/dist/191a179639e.preview.js +0 -1
  54. package/dist/191a179639e.webview.js +0 -1
  55. package/dist/278.js +0 -406
@@ -1,26 +1,24 @@
1
1
  "use strict";
2
- (self["webpackChunk_subiz_widget_v4"] = self["webpackChunk_subiz_widget_v4"] || []).push([[490],{
2
+ (self["webpackChunk_subiz_widget_v4"] = self["webpackChunk_subiz_widget_v4"] || []).push([[605],{
3
3
 
4
- /***/ 1490:
4
+ /***/ 9605:
5
5
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
6
 
7
7
  __webpack_require__.r(__webpack_exports__);
8
8
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9
9
  /* harmony export */ "default": () => (/* binding */ Notif)
10
10
  /* harmony export */ });
11
- /* harmony import */ var _util_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8150);
12
- /* harmony import */ var preact__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
13
- /* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2840);
14
- /* harmony import */ var _chatbox_block_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7072);
15
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
16
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
17
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
11
+ /* harmony import */ var _util_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4494);
12
+ /* harmony import */ var preact__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6400);
13
+ /* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2493);
14
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
16
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
18
17
 
19
18
 
20
19
 
21
-
22
- let notifCSS = (() => __webpack_require__.e(/* import() */ 459).then(__webpack_require__.bind(__webpack_require__, 5488)))();
23
- class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .Mw {
20
+ let notifCSS = (() => __webpack_require__.e(/* import() */ 362).then(__webpack_require__.bind(__webpack_require__, 362)))();
21
+ class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .up {
24
22
  constructor(props) {
25
23
  super(props);
26
24
  _defineProperty(this, "state", {
@@ -34,19 +32,19 @@ class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .Mw {
34
32
  title: '',
35
33
  last_show: 0
36
34
  });
37
- _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.setTimeout(async () => {
35
+ _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setTimeout */ .Z.setTimeout(async () => {
38
36
  let {
39
37
  body: impression
40
38
  } = await this.props.store.sendImpression(this.props.plugin.id);
41
- this.impressionToken = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.get(impression, 'impression_token') || '';
42
- let image = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.get(this.props, 'plugin.notification.background_url');
43
- _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.preloadImg(image, () => this.setState({
39
+ this.impressionToken = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(impression, 'impression_token') || '';
40
+ let image = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.background_url');
41
+ _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].preloadImg */ .Z.preloadImg(image, () => this.setState({
44
42
  imageReady: true
45
43
  }));
46
44
  });
47
45
  }
48
46
  setOver(over) {
49
- if (!over) this.mouse_leave = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.Date.now();else this.mouse_leave = 0;
47
+ if (!over) this.mouse_leave = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now();else this.mouse_leave = 0;
50
48
  }
51
49
  randomTimestampt() {
52
50
  let random = Math.floor(Math.random() * 5);
@@ -57,12 +55,13 @@ class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .Mw {
57
55
  return '4 ' + this.props.t('minutes_ago');
58
56
  }
59
57
  onClick(e) {
58
+ e.stopPropagation();
60
59
  if (this.props.plugin._dont_follow) return;
61
60
  this.props.store.sendConversion(this.props.plugin.id, null, this.impressionToken);
62
- let url = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.get(this.props, 'plugin.notification.url');
61
+ let url = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.url');
63
62
  if (!url) return;
64
63
  if (!url.startsWith('http://') && !url.startsWith('https://')) url = '//' + url;
65
- let new_tab = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.get(this.props, 'plugin.notification.new_tab', false);
64
+ let new_tab = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.new_tab', false);
66
65
  if (new_tab) return window.open(url);
67
66
  window.location.href = url;
68
67
  }
@@ -99,20 +98,24 @@ class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .Mw {
99
98
  }
100
99
  async waitForT() {
101
100
  if (this.props.t) return;
102
- await _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.sleep(100);
101
+ await _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].sleep */ .Z.sleep(100);
103
102
  return this.waitForT();
104
103
  }
105
104
  async setClose(close) {
106
105
  await this.waitForT();
107
106
  if (!this.props.t) return;
108
107
  if (!close) {
109
- _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.clearTimeout(this.lastCloseTimeout);
108
+ _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].clearTimeout */ .Z.clearTimeout(this.lastCloseTimeout);
110
109
  this.setState({
111
110
  closeAnimation: false
112
111
  });
113
112
  let timestamp = this.randomTimestampt();
114
- let profiles = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.get(this.props, 'plugin.notification.profiles', []);
115
- _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.map(_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.get(this.props.plugin, 'notification.custom_avatar_urls'), url => {
113
+ let profiles = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.profiles', []);
114
+ let user = profiles[Math.floor(Math.random() * _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].size */ .Z.size(profiles))] || {};
115
+ if (user.avatar_url && user.avatar_url.startsWith('http')) {
116
+ await _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].preloadImg */ .Z.preloadImg(user.avatar_url);
117
+ }
118
+ _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].map */ .Z.map(_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props.plugin, 'notification.custom_avatar_urls'), url => {
116
119
  profiles.push({
117
120
  type: 'person',
118
121
  fullname: randomName(),
@@ -123,63 +126,48 @@ class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .Mw {
123
126
  age: randomAge()
124
127
  });
125
128
  });
126
- if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.size(profiles) == 0) {
127
- profiles.push({
128
- type: 'person',
129
- fullname: randomName(),
130
- avatar_url: 'https://public-gcs.subiz-cdn.com/widget_assets/profile_images/VNF25.png',
131
- email: randomEmail(),
132
- address: randomAddress(),
133
- phone: ramdomPhone(),
134
- age: randomAge()
135
- });
136
- }
137
- let user = profiles[Math.floor(Math.random() * _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.size(profiles))] || {};
138
- if (user.avatar_url && user.avatar_url.startsWith('http')) {
139
- await _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.preloadImg(user.avatar_url);
140
- }
141
- let i18n_messages = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.get(this.props, 'plugin.notification.i18n_message_blocks', []);
142
- let i18n_message = i18n_messages[Math.floor(Math.random() * _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.size(i18n_messages))].i18n;
143
- let fallbackmsgs = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.get(this.props, 'plugin.notification.message_blocks', []);
144
- let fallbackmessage = fallbackmsgs[Math.floor(Math.random() * _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.size(fallbackmsgs))];
145
- let i18n_title = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.get(this.props, 'plugin.notification.i18n_title_block');
129
+ let i18n_messages = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.i18n_message_quill_deltas', []);
130
+ let i18n_message = i18n_messages[Math.floor(Math.random() * _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].size */ .Z.size(i18n_messages))];
131
+ let fallbackmsgs = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.message_quill_deltas', []);
132
+ let fallbackmessage = fallbackmsgs[Math.floor(Math.random() * _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].size */ .Z.size(fallbackmsgs))];
133
+ let i18n_title = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.i18n_title_quill_delta');
146
134
  return this.setState({
147
135
  close: false,
148
- last_show: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.Date.now(),
136
+ last_show: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now(),
149
137
  timestamp: timestamp,
150
138
  user: user,
151
- title: this.props.t.i18n(i18n_title) || _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.get(this.props, 'plugin.notification.title_block'),
139
+ title: this.props.t.i18n(i18n_title) || _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.title_quill_delta'),
152
140
  message: this.props.t.i18n(i18n_message) || fallbackmessage
153
141
  });
154
142
  }
155
143
  this.setState({
156
144
  closeAnimation: true
157
145
  });
158
- this.mouse_leave = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.Date.now();
159
- this.lastCloseTimeout = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.setTimeout(() => this.setState({
146
+ this.mouse_leave = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now();
147
+ this.lastCloseTimeout = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setTimeout */ .Z.setTimeout(() => this.setState({
160
148
  close: true,
161
149
  closeAnimation: false
162
150
  }), 150);
163
- if (this.props.plugin._dont_close) _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.setTimeout(() => this.setState({
151
+ if (this.props.plugin._dont_close) _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setTimeout */ .Z.setTimeout(() => this.setState({
164
152
  closeAnimation: false,
165
153
  close: false
166
154
  }), 1000);
167
155
  }
168
156
  async refreshCSS() {
169
157
  let plugins = this.props.store.matchPlugin();
170
- let found = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.find(plugins, plugin => plugin.id === this.props.plugin.id);
158
+ let found = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].find */ .Z.find(plugins, plugin => plugin.id === this.props.plugin.id);
171
159
  if (!found) return;
172
160
  let css = (await notifCSS).default.default.toString();
173
- _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.setCss(this.props.plugin.id, this.$cssStyleDiv, css);
161
+ _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setCss */ .Z.setCss(this.props.plugin.id, this.$cssStyleDiv, css);
174
162
  this.setClose(this.state.close);
175
163
  }
176
164
  componentWillUnmount() {
177
- _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.clearInterval(this.interval);
178
- _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.setCss(this.props.plugin.id, this.$cssStyleDiv, '');
165
+ _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].clearInterval */ .Z.clearInterval(this.interval);
166
+ _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setCss */ .Z.setCss(this.props.plugin.id, this.$cssStyleDiv, '');
179
167
  }
180
168
  async componentDidMount() {
181
169
  this.setState({
182
- last_show: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.Date.now()
170
+ last_show: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now()
183
171
  });
184
172
  this.$cssStyleDiv = document.getElementById('subiz-style-for-' + this.props.plugin.id);
185
173
  if (!this.$cssStyleDiv) {
@@ -190,37 +178,58 @@ class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .Mw {
190
178
  }
191
179
  this.props.store.onResetCSS(this, () => this.refreshCSS());
192
180
  await this.refreshCSS();
193
- this.interval = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.setInterval(() => {
181
+ this.interval = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setInterval */ .Z.setInterval(() => {
194
182
  if (this.props._destroy) return this.componentWillUnmount();
195
183
  let mouseleave = this.mouse_leave;
196
- if (mouseleave === 0) mouseleave = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.Date.now();
197
- if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.Date.now() - mouseleave < 1000) return;
184
+ if (mouseleave === 0) mouseleave = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now();
185
+ if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now() - mouseleave < 1000) return;
198
186
  if (!this.state.close && !this.props.plugin._dont_close) {
199
- if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.Date.now() - this.state.last_show > 8000) return this.setClose(true);
187
+ if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now() - this.state.last_show > 8000) return this.setClose(true);
200
188
  return;
201
189
  }
202
- if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.Date.now() - this.state.last_show > this.props.plugin.notification.interval_sec) {
190
+ if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now() - this.state.last_show > this.props.plugin.notification.interval_sec) {
203
191
  return this.setClose(false);
204
192
  }
205
193
  }, 1000);
206
- _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.setTimeout(() => {
194
+ _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setTimeout */ .Z.setTimeout(() => {
207
195
  this.setState({
208
196
  cssready: true
209
197
  });
210
198
  this.setClose(false);
211
199
  }, 50);
212
200
  }
201
+ renderTextFromQuillDelta(quilldelta, profile) {
202
+ let qd = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].parseJSON */ .Z.parseJSON(quilldelta);
203
+ if (!qd || !qd.ops) return null;
204
+ let out = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].map */ .Z.map(qd.ops, op => {
205
+ let out = null;
206
+ if (!op.insert) return null;
207
+ if (typeof op.insert == 'string') out = op.insert;
208
+ if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(op, 'insert.dynamicField')) {
209
+ let key = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(op, 'insert.dynamicField.key');
210
+ if (key === 'user.fullname') out = profile.fullname;
211
+ if (key === 'user.email') out = profile.email;
212
+ if (key === 'user.address') out = profile.address;
213
+ if (key === 'user.phone') out = profile.phone;
214
+ }
215
+ if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(op, 'attributes.bold')) out = (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("b", null, out);
216
+ if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(op, 'attributes.italic')) out = (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("b", null, out);
217
+ return out;
218
+ }).filter(a => a);
219
+ if (out.length == 1 && (out[0] == '\n' || out[0] == '')) return [];
220
+ return out;
221
+ }
213
222
  render() {
214
223
  if (!this.props.t) return null;
215
224
  if (!this.state.cssready) return null;
216
225
  if (!this.state.imageReady) return null;
217
226
  if (this.state.close) return null;
218
227
  if (!this.state.message) return null;
219
- let notif = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.get(this.props.plugin, 'notification', {});
228
+ let notif = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props.plugin, 'notification', {});
220
229
  if (!notif) return null;
221
230
  let animation = '';
222
- let pos = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.get(notif, 'position', 'bottom-left');
223
- if (this.props.mobile) pos = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.get(notif, 'mobile_position', pos);
231
+ let pos = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(notif, 'position', 'bottom-left');
232
+ if (this.props.mobile) pos = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(notif, 'mobile_position', pos);
224
233
  if (pos === 'top-left' || pos === 'top-right') animation = 'fadeInDown';else if (pos === 'top-center') animation = 'fadeInDownCenter';else if (pos === 'bottom-center') animation = 'fadeInUpCenter';else if (pos === 'bottom-right') {
225
234
  animation = 'fadeInUpBig';
226
235
  } else {
@@ -229,7 +238,7 @@ class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .Mw {
229
238
  }
230
239
  let user = this.state.user || {};
231
240
  let subtextStyle = notif.subtext_style || {};
232
- if (subtextStyle.color === undefined) subtextStyle.color = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.get(notif, 'message_style.color', 'black');
241
+ if (subtextStyle.color === undefined) subtextStyle.color = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(notif, 'message_style.color', 'black');
233
242
  let st = 'position: fixed !important; z-index: 1000000000 !important';
234
243
  if (this.props.plugin._preview) st = 'position: absolute !important;';
235
244
  if (this.state.closeAnimation) animation = 'fadeOut';
@@ -241,14 +250,11 @@ class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .Mw {
241
250
  });
242
251
  let $time = (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
243
252
  class: "notif_time",
244
- style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.js2css(notif.subtext_style)
253
+ style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].js2css */ .Z.js2css(notif.subtext_style)
245
254
  }, this.state.timestamp);
246
- let data = {
247
- 'user.fullname': user.fullname,
248
- 'user.email': user.email,
249
- 'user.address': user.address,
250
- 'user.phone': user.phone
251
- };
255
+ let $title = this.renderTextFromQuillDelta(this.state.title, user);
256
+ let $message = this.renderTextFromQuillDelta(this.state.message, user);
257
+ if (!_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].size */ .Z.size($title) && !_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].size */ .Z.size($message)) $time = null;
252
258
  return (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
253
259
  class: animation + ' notif' + ' notif__' + pos,
254
260
  onClick: e => this.onClick(e),
@@ -261,25 +267,19 @@ class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .Mw {
261
267
  alt: "notification background",
262
268
  class: "notif_bg",
263
269
  src: notif.background_url,
264
- style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.js2css(notif.background_style)
270
+ style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].js2css */ .Z.js2css(notif.background_style)
265
271
  }), this.renderCloseButton(), (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
266
272
  class: "notif_avatar",
267
- style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.js2css(notif.avatar_style)
273
+ style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].js2css */ .Z.js2css(notif.avatar_style)
268
274
  }, $avatar), (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
269
275
  class: "notif_body"
270
276
  }, (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
271
277
  class: "notif_title",
272
- style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.js2css(notif.title_style)
273
- }, (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)(_chatbox_block_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A, {
274
- block: this.state.title,
275
- data: data
276
- })), (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
278
+ style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].js2css */ .Z.js2css(notif.title_style)
279
+ }, $title), (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
277
280
  class: "notif_message",
278
- style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.js2css(notif.message_style)
279
- }, (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)(_chatbox_block_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A, {
280
- block: this.state.message,
281
- data: data
282
- })), $time)));
281
+ style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].js2css */ .Z.js2css(notif.message_style)
282
+ }, $message), $time)));
283
283
  }
284
284
  }
285
285
  function randomName() {
@@ -1,25 +1,25 @@
1
1
  "use strict";
2
- (self["webpackChunk_subiz_widget_v4"] = self["webpackChunk_subiz_widget_v4"] || []).push([[997],{
2
+ (self["webpackChunk_subiz_widget_v4"] = self["webpackChunk_subiz_widget_v4"] || []).push([[678],{
3
3
 
4
- /***/ 997:
4
+ /***/ 2678:
5
5
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
6
 
7
7
  __webpack_require__.r(__webpack_exports__);
8
8
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9
9
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
10
10
  /* harmony export */ });
11
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__webpack_require__(1938));
11
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__webpack_require__(3048));
12
12
 
13
13
  /***/ }),
14
14
 
15
- /***/ 1938:
15
+ /***/ 3048:
16
16
  /***/ ((module, __webpack_exports__, __webpack_require__) => {
17
17
 
18
18
  __webpack_require__.r(__webpack_exports__);
19
19
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
20
20
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
21
21
  /* harmony export */ });
22
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6314);
22
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3645);
23
23
  /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
24
24
  // Imports
25
25
 
@@ -32,7 +32,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, "/*\n#sbz92 * {\n\tall: unset !importan
32
32
 
33
33
  /***/ }),
34
34
 
35
- /***/ 6314:
35
+ /***/ 3645:
36
36
  /***/ ((module) => {
37
37
 
38
38