@subiz/widget-v4 4.1.62 → 4.1.65

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 (51) hide show
  1. package/README.md +10 -0
  2. package/assets/less/widget.less +19 -7
  3. package/compiled_src/chatbox/Widget.js +57 -28
  4. package/compiled_src/store/api.js +17 -0
  5. package/compiled_src/store/api_fake.js +1 -0
  6. package/compiled_src/store/store.js +5 -30
  7. package/dist/{792.js → 132.js} +121 -121
  8. package/dist/18dd22fb422.132.js +1 -0
  9. package/dist/18dd22fb422.27.js +1 -0
  10. package/dist/18dd22fb422.278.js +1 -0
  11. package/dist/{18d7db7ca8c.756.js → 18dd22fb422.459.js} +1 -1
  12. package/dist/18dd22fb422.490.js +1 -0
  13. package/dist/18dd22fb422.497.js +1 -0
  14. package/dist/18dd22fb422.74.js +1 -0
  15. package/dist/18dd22fb422.997.js +1 -0
  16. package/dist/18dd22fb422.app.js +1 -0
  17. package/dist/{18d7db7ca8c.index.html → 18dd22fb422.index.html} +1 -1
  18. package/dist/{18d7db7ca8c.library.html → 18dd22fb422.library.html} +1 -1
  19. package/dist/18dd22fb422.library.js +1 -0
  20. package/dist/{18d7db7ca8c.preview.html → 18dd22fb422.preview.html} +1 -1
  21. package/dist/18dd22fb422.preview.js +1 -0
  22. package/dist/18dd22fb422.screenshoot.js +1 -0
  23. package/dist/18dd22fb422.webview.js +1 -0
  24. package/dist/{444.js → 27.js} +6 -6
  25. package/dist/{176.js → 278.js} +54 -54
  26. package/dist/{756.js → 459.js} +6 -6
  27. package/dist/{104.js → 490.js} +57 -57
  28. package/dist/{928.js → 497.js} +676 -676
  29. package/dist/{508.js → 74.js} +30 -30
  30. package/dist/{672.js → 997.js} +6 -6
  31. package/dist/HASH +1 -1
  32. package/dist/malicious-app.js +4 -8
  33. package/dist/screenshoot.html +1 -1
  34. package/dist/screenshoot.js +292 -292
  35. package/package.json +2 -2
  36. package/src/chatbox/Widget.js +53 -32
  37. package/src/store/api.js +17 -0
  38. package/src/store/api_fake.js +3 -0
  39. package/src/store/store.js +16 -50
  40. package/dist/18d7db7ca8c.104.js +0 -1
  41. package/dist/18d7db7ca8c.176.js +0 -1
  42. package/dist/18d7db7ca8c.444.js +0 -1
  43. package/dist/18d7db7ca8c.508.js +0 -1
  44. package/dist/18d7db7ca8c.672.js +0 -1
  45. package/dist/18d7db7ca8c.792.js +0 -1
  46. package/dist/18d7db7ca8c.928.js +0 -1
  47. package/dist/18d7db7ca8c.app.js +0 -1
  48. package/dist/18d7db7ca8c.library.js +0 -1
  49. package/dist/18d7db7ca8c.preview.js +0 -1
  50. package/dist/18d7db7ca8c.screenshoot.js +0 -1
  51. package/dist/18d7db7ca8c.webview.js +0 -1
@@ -1,6 +1,6 @@
1
- (self["webpackChunk_subiz_widget_v4"] = self["webpackChunk_subiz_widget_v4"] || []).push([[792],{
1
+ (self["webpackChunk_subiz_widget_v4"] = self["webpackChunk_subiz_widget_v4"] || []).push([[132],{
2
2
 
3
- /***/ 9792:
3
+ /***/ 132:
4
4
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
5
5
 
6
6
  "use strict";
@@ -13,9 +13,9 @@ __webpack_require__.d(__webpack_exports__, {
13
13
  });
14
14
 
15
15
  // EXTERNAL MODULE: ./src/util/index.js + 3 modules
16
- var util = __webpack_require__(5780);
16
+ var util = __webpack_require__(1405);
17
17
  // EXTERNAL MODULE: ./src/common.js
18
- var common = __webpack_require__(6304);
18
+ var common = __webpack_require__(2840);
19
19
  ;// CONCATENATED MODULE: ./src/popup/tick.core.commonjs.js
20
20
 
21
21
  let obj = function () {
@@ -1054,7 +1054,7 @@ let obj = function () {
1054
1054
  };
1055
1055
  var clone = function clone(obj) {
1056
1056
  if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null) {
1057
- return util/* default */.c.parseJSON(util/* default */.c.stringify(obj));
1057
+ return util/* default */.A.parseJSON(util/* default */.A.stringify(obj));
1058
1058
  }
1059
1059
  return obj;
1060
1060
  };
@@ -1347,10 +1347,10 @@ let obj = function () {
1347
1347
  }();
1348
1348
  /* harmony default export */ const tick_core_commonjs = (obj);
1349
1349
  // EXTERNAL MODULE: ./src/popup/tick.view.flip.commonjs.js
1350
- var tick_view_flip_commonjs = __webpack_require__(1092);
1350
+ var tick_view_flip_commonjs = __webpack_require__(9459);
1351
1351
  var tick_view_flip_commonjs_default = /*#__PURE__*/__webpack_require__.n(tick_view_flip_commonjs);
1352
1352
  // EXTERNAL MODULE: ./node_modules/preact/dist/preact.module.js
1353
- var preact_module = __webpack_require__(4284);
1353
+ var preact_module = __webpack_require__(172);
1354
1354
  ;// CONCATENATED MODULE: ./src/popup/countdown.js
1355
1355
  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; }
1356
1356
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
@@ -1361,13 +1361,13 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
1361
1361
 
1362
1362
  tick_core_commonjs.plugin.add((tick_view_flip_commonjs_default()));
1363
1363
 
1364
- class Countdown extends common/* Com */.Sq {
1364
+ class Countdown extends common/* Com */.Mw {
1365
1365
  constructor(props) {
1366
1366
  super(props);
1367
1367
  _defineProperty(this, "state", {
1368
1368
  flipKey: '43'
1369
1369
  });
1370
- this.timer = util/* default */.c.setInterval(() => {
1370
+ this.timer = util/* default */.A.setInterval(() => {
1371
1371
  if (this.props._destroy) return this.componentWillUnmount();
1372
1372
  let cd = this.props.com.countdown || {};
1373
1373
  let newFlipKey = 'cd' + ':' + cd.skin + ':' + cd.size + ':' + this.props.plugin.popup.font_family + ':';
@@ -1378,25 +1378,25 @@ class Countdown extends common/* Com */.Sq {
1378
1378
  }, 500);
1379
1379
  }
1380
1380
  componentWillUnmount() {
1381
- util/* default */.c.clearInterval(this.timer);
1381
+ util/* default */.A.clearInterval(this.timer);
1382
1382
  }
1383
1383
  getCountDownDeltaSec(countdown) {
1384
1384
  let dest;
1385
1385
  if (countdown.expire_time_type === 'fixed_time') dest = countdown.fixed_time;
1386
1386
  if (countdown.expire_time_type === 'visit_time') dest = this.props.store.pageLoaded() + countdown.visit_time * 60000;
1387
1387
  if (countdown.expire_time_type === 'repeat_daily') {
1388
- var start = new util/* default */.c.Date();
1388
+ var start = new util/* default */.A.Date();
1389
1389
  start.setHours(0, 0, 0, 0);
1390
1390
  dest = start.getTime() + countdown.repeat_daily * 60000;
1391
1391
  }
1392
1392
  if (countdown.expire_time_type === 'repeat_weekly') {
1393
1393
  let daytill = 0;
1394
- let todayweekday = new util/* default */.c.Date().getDay();
1394
+ let todayweekday = new util/* default */.A.Date().getDay();
1395
1395
  if (todayweekday === 0) {
1396
1396
  if (countdown.repeat_weekly_weekday === 'sunday') {
1397
1397
  daytill = 0;
1398
1398
  } else {
1399
- daytill = 7 - new util/* default */.c.Date().getDay();
1399
+ daytill = 7 - new util/* default */.A.Date().getDay();
1400
1400
  }
1401
1401
  } else {
1402
1402
  if (countdown.repeat_weekly_weekday === 'sunday') {
@@ -1406,16 +1406,16 @@ class Countdown extends common/* Com */.Sq {
1406
1406
  }
1407
1407
  }
1408
1408
  if (daytill < 0) delta = 0;else if (daytill == 0) {
1409
- var start = new util/* default */.c.Date();
1409
+ var start = new util/* default */.A.Date();
1410
1410
  start.setHours(0, 0, 0, 0);
1411
1411
  dest = start.getTime() + countdown.repeat_weekly_min * 60000;
1412
1412
  } else {
1413
- var start = new util/* default */.c.Date();
1413
+ var start = new util/* default */.A.Date();
1414
1414
  start.setHours(0, 0, 0, 0);
1415
1415
  dest = start.getTime() + countdown.repeat_weekly_min * 60000 + daytill * 86400000;
1416
1416
  }
1417
1417
  }
1418
- let delta = dest - util/* default */.c.Date.now();
1418
+ let delta = dest - util/* default */.A.Date.now();
1419
1419
  if (delta < 0) delta = 0;
1420
1420
  return Math.floor(delta / 1000) || 0;
1421
1421
  }
@@ -1433,13 +1433,13 @@ class Countdown extends common/* Com */.Sq {
1433
1433
  class: "countdown_electric_numbers"
1434
1434
  }, (0,preact_module.h)("div", {
1435
1435
  class: "countdown_electric_number",
1436
- style: util/* default */.c.js2css({
1436
+ style: util/* default */.A.js2css({
1437
1437
  font_size: fs,
1438
1438
  font_family: this.props.plugin.popup.font_family
1439
1439
  })
1440
1440
  }, hour0), (0,preact_module.h)("div", {
1441
1441
  class: "countdown_electric_number",
1442
- style: util/* default */.c.js2css({
1442
+ style: util/* default */.A.js2css({
1443
1443
  font_size: fs,
1444
1444
  font_family: this.props.plugin.popup.font_family
1445
1445
  })
@@ -1451,13 +1451,13 @@ class Countdown extends common/* Com */.Sq {
1451
1451
  class: "countdown_electric_numbers"
1452
1452
  }, (0,preact_module.h)("div", {
1453
1453
  class: "countdown_electric_number",
1454
- style: util/* default */.c.js2css({
1454
+ style: util/* default */.A.js2css({
1455
1455
  font_size: fs,
1456
1456
  font_family: this.props.plugin.popup.font_family
1457
1457
  })
1458
1458
  }, min0), (0,preact_module.h)("div", {
1459
1459
  class: "countdown_electric_number",
1460
- style: util/* default */.c.js2css({
1460
+ style: util/* default */.A.js2css({
1461
1461
  font_size: fs,
1462
1462
  font_family: this.props.plugin.popup.font_family
1463
1463
  })
@@ -1469,13 +1469,13 @@ class Countdown extends common/* Com */.Sq {
1469
1469
  class: "countdown_electric_numbers"
1470
1470
  }, (0,preact_module.h)("div", {
1471
1471
  class: "countdown_electric_number",
1472
- style: util/* default */.c.js2css({
1472
+ style: util/* default */.A.js2css({
1473
1473
  font_size: fs,
1474
1474
  font_family: this.props.plugin.popup.font_family
1475
1475
  })
1476
1476
  }, sec0), (0,preact_module.h)("div", {
1477
1477
  class: "countdown_electric_number",
1478
- style: util/* default */.c.js2css({
1478
+ style: util/* default */.A.js2css({
1479
1479
  font_size: fs,
1480
1480
  font_family: this.props.plugin.popup.font_family
1481
1481
  })
@@ -1556,10 +1556,10 @@ const WEEKDAY_INDEX = {
1556
1556
  friday: 5,
1557
1557
  saturday: 6
1558
1558
  };
1559
- class Flip extends common/* Com */.Sq {
1559
+ class Flip extends common/* Com */.Mw {
1560
1560
  constructor(props) {
1561
1561
  super(props);
1562
- this._tickRef = (0,preact_module/* createRef */.Yn)();
1562
+ this._tickRef = (0,preact_module/* createRef */._3)();
1563
1563
  }
1564
1564
  componentDidMount() {
1565
1565
  this._tickInstance = tick_core_commonjs.DOM.create(this._tickRef.current, {
@@ -1586,7 +1586,7 @@ class Flip extends common/* Com */.Sq {
1586
1586
  "aria-hidden": "true"
1587
1587
  }, (0,preact_module.h)("span", {
1588
1588
  "data-view": "flip",
1589
- style: util/* default */.c.js2css({
1589
+ style: util/* default */.A.js2css({
1590
1590
  font_size: fs,
1591
1591
  font_family: this.props.plugin.popup.font_family
1592
1592
  })
@@ -1601,8 +1601,8 @@ function popup_toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var
1601
1601
 
1602
1602
 
1603
1603
 
1604
- let popupCSS = (() => __webpack_require__.e(/* import() */ 444).then(__webpack_require__.bind(__webpack_require__, 6444)))();
1605
- class Popup extends common/* Com */.Sq {
1604
+ let popupCSS = (() => __webpack_require__.e(/* import() */ 27).then(__webpack_require__.bind(__webpack_require__, 8027)))();
1605
+ class Popup extends common/* Com */.Mw {
1606
1606
  constructor(props) {
1607
1607
  super(props);
1608
1608
  popup_defineProperty(this, "state", {
@@ -1613,23 +1613,23 @@ class Popup extends common/* Com */.Sq {
1613
1613
  imageReady: false,
1614
1614
  fontReady: false
1615
1615
  });
1616
- this._formRef = (0,preact_module/* createRef */.Yn)();
1617
- util/* default */.c.setTimeout(() => this.fillForm(), 1000);
1618
- util/* default */.c.setTimeout(async () => {
1616
+ this._formRef = (0,preact_module/* createRef */._3)();
1617
+ util/* default */.A.setTimeout(() => this.fillForm(), 1000);
1618
+ util/* default */.A.setTimeout(async () => {
1619
1619
  let {
1620
1620
  body: impression
1621
1621
  } = await this.props.store.sendImpression(this.props.plugin.id);
1622
- this.impressionToken = util/* default */.c.get(impression, 'impression_token') || '';
1622
+ this.impressionToken = util/* default */.A.get(impression, 'impression_token') || '';
1623
1623
  }, 10);
1624
- util/* default */.c.setTimeout(() => {
1624
+ util/* default */.A.setTimeout(() => {
1625
1625
  let fonts = {};
1626
1626
  fonts[this.props.plugin.popup.font_family] = true;
1627
1627
  let images = {};
1628
- util/* default */.c.map(this.props.plugin.popup.pages, page => {
1628
+ util/* default */.A.map(this.props.plugin.popup.pages, page => {
1629
1629
  if (!page) return;
1630
- util/* default */.c.map(page.components, com => {
1631
- fonts[util/* default */.c.get(com, 'style.font_family')] = true;
1632
- fonts[util/* default */.c.get(com, 'mobile_style.font_family')] = true;
1630
+ util/* default */.A.map(page.components, com => {
1631
+ fonts[util/* default */.A.get(com, 'style.font_family')] = true;
1632
+ fonts[util/* default */.A.get(com, 'mobile_style.font_family')] = true;
1633
1633
  if (com.type === 'image' && com.image && com.image.url && com.image.url.startsWith('http')) {
1634
1634
  images[com.image.url] = true;
1635
1635
  }
@@ -1638,14 +1638,14 @@ class Popup extends common/* Com */.Sq {
1638
1638
  delete fonts.undefined;
1639
1639
  delete fonts.null;
1640
1640
  delete fonts[''];
1641
- if (util/* default */.c.size(images) == 0) this.setState({
1641
+ if (util/* default */.A.size(images) == 0) this.setState({
1642
1642
  imageReady: true
1643
1643
  });
1644
- util/* default */.c.map(images, (_, image) => util/* default */.c.preloadImg(image, () => this.setState({
1644
+ util/* default */.A.map(images, (_, image) => util/* default */.A.preloadImg(image, () => this.setState({
1645
1645
  imageReady: true
1646
1646
  })));
1647
- util/* default */.c.preloadWebfonts(Object.keys(fonts));
1648
- util/* default */.c.setTimeout(async () => {
1647
+ util/* default */.A.preloadWebfonts(Object.keys(fonts));
1648
+ util/* default */.A.setTimeout(async () => {
1649
1649
  await this.waitForFont(Object.keys(fonts));
1650
1650
  this.setState({
1651
1651
  fontReady: true
@@ -1654,7 +1654,7 @@ class Popup extends common/* Com */.Sq {
1654
1654
  });
1655
1655
  }
1656
1656
  async waitForFont(fonts) {
1657
- if (util/* default */.c.size(fonts) == 0) return;
1657
+ if (util/* default */.A.size(fonts) == 0) return;
1658
1658
  let ready = {};
1659
1659
  for (var t = 0; t < 10; t++) {
1660
1660
  for (var i = 0; i < fonts.length; i++) {
@@ -1663,7 +1663,7 @@ class Popup extends common/* Com */.Sq {
1663
1663
  if (Object.keys(readycount) == fonts.length) return;
1664
1664
  } catch (e) {}
1665
1665
  }
1666
- await util/* default */.c.sleep(200);
1666
+ await util/* default */.A.sleep(200);
1667
1667
  }
1668
1668
  return;
1669
1669
  }
@@ -1677,11 +1677,11 @@ class Popup extends common/* Com */.Sq {
1677
1677
  return this.props.pageIndex;
1678
1678
  }
1679
1679
  isFormFilled() {
1680
- let page = util/* default */.c.get(this.props.plugin.popup, `pages.${this.getPageIndex()}`);
1681
- let form = util/* default */.c.find(page.components, com => com.type === 'form');
1680
+ let page = util/* default */.A.get(this.props.plugin.popup, `pages.${this.getPageIndex()}`);
1681
+ let form = util/* default */.A.find(page.components, com => com.type === 'form');
1682
1682
  if (!form || !form.form) return true;
1683
- let fields = util/* default */.c.get(form, 'form.fields', []);
1684
- let wrong = util/* default */.c.find(fields, field => {
1683
+ let fields = util/* default */.A.get(form, 'form.fields', []);
1684
+ let wrong = util/* default */.A.find(fields, field => {
1685
1685
  if (!field.is_required) return false;
1686
1686
  if (!this.isFieldValid(field.key, field.validate)) return true;
1687
1687
  return this.isFieldEmpty(field.key);
@@ -1689,32 +1689,32 @@ class Popup extends common/* Com */.Sq {
1689
1689
  return !wrong;
1690
1690
  }
1691
1691
  fillForm() {
1692
- let page = util/* default */.c.get(this.props.plugin.popup, `pages.${this.getPageIndex()}`);
1693
- let form = util/* default */.c.find(page.components, com => com.type === 'form');
1692
+ let page = util/* default */.A.get(this.props.plugin.popup, `pages.${this.getPageIndex()}`);
1693
+ let form = util/* default */.A.find(page.components, com => com.type === 'form');
1694
1694
  if (!form) return;
1695
1695
  let user = this.props.store.matchUser();
1696
- let userAttributes = util/* default */.c.get(user, 'attributes');
1697
- let fields = util/* default */.c.get(form, 'form.fields', []);
1698
- util/* default */.c.each(fields, field => {
1696
+ let userAttributes = util/* default */.A.get(user, 'attributes');
1697
+ let fields = util/* default */.A.get(form, 'form.fields', []);
1698
+ util/* default */.A.each(fields, field => {
1699
1699
  let fieldkey = field.key;
1700
1700
  if (fieldkey === 'email') fieldkey = 'emails';
1701
1701
  if (fieldkey === 'phone') fieldkey = 'phones';
1702
1702
  if (fieldkey !== 'emails' || fieldkey != 'phones' || fieldkey !== 'fullname') return;
1703
1703
  if (fieldkey == 'emails') {
1704
- let text = util/* default */.c.getUserAttr(user, 'related_email', 'text');
1704
+ let text = util/* default */.A.getUserAttr(user, 'related_email', 'text');
1705
1705
  if (!text) return;
1706
1706
  var input = this._formRef.current.elements[field.key];
1707
1707
  if (!input) return;
1708
1708
  input.value = text;
1709
1709
  }
1710
1710
  if (fieldkey == 'phones') {
1711
- let text = util/* default */.c.getUserAttr(user, 'related_phone', 'text');
1711
+ let text = util/* default */.A.getUserAttr(user, 'related_phone', 'text');
1712
1712
  if (!text) return;
1713
1713
  var input = this._formRef.current.elements[field.key];
1714
1714
  if (!input) return;
1715
1715
  input.value = text;
1716
1716
  }
1717
- util/* default */.c.map(userAttributes, attr => {
1717
+ util/* default */.A.map(userAttributes, attr => {
1718
1718
  if (fieldkey !== attr.key || !attr.text) return;
1719
1719
  var input = this._formRef.current.elements[field.key];
1720
1720
  if (!input) return;
@@ -1728,10 +1728,10 @@ class Popup extends common/* Com */.Sq {
1728
1728
  var formData = new FormData(this._formRef.current);
1729
1729
  for (var pair of formData.entries()) {
1730
1730
  if (pair[0] !== key) continue;
1731
- if (validate === 'email') return util/* default */.c.isEmail(pair[1]);
1732
- if (validate === 'phone') return util/* default */.c.isPhone(pair[1]);
1733
- if (validate === 'url') return util/* default */.c.isURL(pair[1]);
1734
- if (validate === 'number') return util/* default */.c.isNumber(pair[1]);
1731
+ if (validate === 'email') return util/* default */.A.isEmail(pair[1]);
1732
+ if (validate === 'phone') return util/* default */.A.isPhone(pair[1]);
1733
+ if (validate === 'url') return util/* default */.A.isURL(pair[1]);
1734
+ if (validate === 'number') return util/* default */.A.isNumber(pair[1]);
1735
1735
  return true;
1736
1736
  }
1737
1737
  return true;
@@ -1778,11 +1778,11 @@ class Popup extends common/* Com */.Sq {
1778
1778
  this.setState({
1779
1779
  closeAnimation: true
1780
1780
  });
1781
- util/* default */.c.setTimeout(() => this.setState({
1781
+ util/* default */.A.setTimeout(() => this.setState({
1782
1782
  close: true,
1783
1783
  closeAnimation: false
1784
1784
  }), 150);
1785
- if (this.props.plugin._dont_close) util/* default */.c.setTimeout(() => {
1785
+ if (this.props.plugin._dont_close) util/* default */.A.setTimeout(() => {
1786
1786
  this.lastoverflow = window.getComputedStyle(document.body).getPropertyValue('overflow');
1787
1787
  document.body.style.setProperty('overflow', 'hidden', 'important');
1788
1788
  this.setState({
@@ -1800,11 +1800,11 @@ class Popup extends common/* Com */.Sq {
1800
1800
  }
1801
1801
  async onButtonClick(e, buttontype) {
1802
1802
  e.stopPropagation();
1803
- let popup = util/* default */.c.get(this.props.plugin, 'popup', {});
1804
- let page = util/* default */.c.get(this.props.plugin.popup, `pages.${this.getPageIndex()}`);
1803
+ let popup = util/* default */.A.get(this.props.plugin, 'popup', {});
1804
+ let page = util/* default */.A.get(this.props.plugin.popup, `pages.${this.getPageIndex()}`);
1805
1805
  let actions = [];
1806
- let buttons = util/* default */.c.find(page.components, com => com.type === 'buttons');
1807
- if (buttontype === 'background') actions = util/* default */.c.get(page, 'background_click.actions') || [];
1806
+ let buttons = util/* default */.A.find(page.components, com => com.type === 'buttons');
1807
+ if (buttontype === 'background') actions = util/* default */.A.get(page, 'background_click.actions') || [];
1808
1808
  if (buttontype === 'primary' && buttons.buttons.primary_enabled) actions = buttons.buttons.primary_actions || [];
1809
1809
  if (buttontype === 'secondary' && buttons.buttons.secondary_enabled) actions = buttons.buttons.secondary_actions || [];
1810
1810
  let mustfillform = false;
@@ -1825,39 +1825,39 @@ class Popup extends common/* Com */.Sq {
1825
1825
  if (this.isSubmitting) return;
1826
1826
  var formData = this._formRef.current ? new FormData(this._formRef.current) : new FormData();
1827
1827
  var summitFields = [];
1828
- let user = util/* default */.c.cloneDeep(this.props.store.matchUser());
1828
+ let user = util/* default */.A.cloneDeep(this.props.store.matchUser());
1829
1829
  let is_lead = false;
1830
1830
  let modifiedPairs = {};
1831
1831
  for (var pair of formData.entries()) {
1832
1832
  if (modifiedPairs[pair[0]]) {
1833
- let currentValue = util/* default */.c.get(modifiedPairs, `${pair[0]}.1`, '');
1833
+ let currentValue = util/* default */.A.get(modifiedPairs, `${pair[0]}.1`, '');
1834
1834
  currentValue += `,${pair[1]}`;
1835
- util/* default */.c.set(modifiedPairs, `${pair[0]}.1`, currentValue);
1835
+ util/* default */.A.set(modifiedPairs, `${pair[0]}.1`, currentValue);
1836
1836
  } else {
1837
1837
  modifiedPairs[pair[0]] = [pair[0], pair[1]];
1838
1838
  }
1839
1839
  }
1840
1840
  for (const [_, pair] of Object.entries(modifiedPairs)) {
1841
- let page = util/* default */.c.get(this.props.plugin.popup, `pages.${this.getPageIndex()}`);
1842
- let form = util/* default */.c.find(page.components, com => com.type === 'form');
1843
- let fields = util/* default */.c.get(form, 'form.fields', []);
1844
- let field = util/* default */.c.find(fields, field => field.key === pair[0]) || {};
1841
+ let page = util/* default */.A.get(this.props.plugin.popup, `pages.${this.getPageIndex()}`);
1842
+ let form = util/* default */.A.find(page.components, com => com.type === 'form');
1843
+ let fields = util/* default */.A.get(form, 'form.fields', []);
1844
+ let field = util/* default */.A.find(fields, field => field.key === pair[0]) || {};
1845
1845
  if (!field.type) return;
1846
1846
  summitFields.push({
1847
1847
  key: pair[0],
1848
1848
  type: field.type,
1849
- value: util/* default */.c.stringify(pair[1])
1849
+ value: util/* default */.A.stringify(pair[1])
1850
1850
  });
1851
1851
  let key = pair[0];
1852
1852
  if (key === 'email') key = 'emails';
1853
1853
  if (key === 'phone') key = 'phones';
1854
1854
  is_lead = is_lead || key == 'emails' || key == 'phones';
1855
- util/* default */.c.setUserAttr(user, {
1855
+ util/* default */.A.setUserAttr(user, {
1856
1856
  key: key,
1857
1857
  text: pair[1]
1858
1858
  });
1859
1859
  }
1860
- if (is_lead) util/* default */.c.setUserAttr(user, {
1860
+ if (is_lead) util/* default */.A.setUserAttr(user, {
1861
1861
  key: 'lead_source',
1862
1862
  text: 'plugin.' + this.props.plugin.id
1863
1863
  });
@@ -1869,7 +1869,7 @@ class Popup extends common/* Com */.Sq {
1869
1869
  if (a.action === 'open_widget') this.props.showWidget('list');
1870
1870
  }
1871
1871
  for (let a of actions) {
1872
- if (a.action === 'close') util/* default */.c.setTimeout(() => this.setClose(true), 100);
1872
+ if (a.action === 'close') util/* default */.A.setTimeout(() => this.setClose(true), 100);
1873
1873
  if (a.action === 'next_page') this.props.nextPage();
1874
1874
  }
1875
1875
  for (let a of actions) {
@@ -1884,7 +1884,7 @@ class Popup extends common/* Com */.Sq {
1884
1884
  }
1885
1885
  }
1886
1886
  renderButtons(com, page) {
1887
- let popup = util/* default */.c.get(this.props.plugin, 'popup', {});
1887
+ let popup = util/* default */.A.get(this.props.plugin, 'popup', {});
1888
1888
  let buttonsstyle = com.style || {};
1889
1889
  let primarystyle = Object.assign({}, buttonsstyle);
1890
1890
  delete primarystyle.justify_content;
@@ -1903,8 +1903,8 @@ class Popup extends common/* Com */.Sq {
1903
1903
  let style = Object.assign({
1904
1904
  font_size: popup.font_size || '14px'
1905
1905
  }, page.primary_button);
1906
- if (util/* default */.c.get(com, 'style.background')) style.background = com.style.background;
1907
- if (util/* default */.c.get(com, 'style.color')) style.color = com.style.color;
1906
+ if (util/* default */.A.get(com, 'style.background')) style.background = com.style.background;
1907
+ if (util/* default */.A.get(com, 'style.color')) style.color = com.style.color;
1908
1908
  $primary = (0,preact_module.h)("div", {
1909
1909
  class: 'btn btn__primary ',
1910
1910
  style: this.js2css(primarystyle),
@@ -1941,7 +1941,7 @@ class Popup extends common/* Com */.Sq {
1941
1941
  }
1942
1942
  js2css(js, onlyProps) {
1943
1943
  let spacer = this.props.plugin.popup.spacer || 10;
1944
- return util/* default */.c.js2css(js, onlyProps, {
1944
+ return util/* default */.A.js2css(js, onlyProps, {
1945
1945
  '@font_size': this.props.plugin.popup.font_size,
1946
1946
  '@font_family': this.props.plugin.popup.font_family,
1947
1947
  '@text_color': this.props.plugin.popup.text_color,
@@ -1955,7 +1955,7 @@ class Popup extends common/* Com */.Sq {
1955
1955
  }
1956
1956
  renderSingleChoiceField(field) {
1957
1957
  var cls = 'form-control form-control__select ' + this.props.plugin.popup.theme;
1958
- let $options = util/* default */.c.map(field.options, option => {
1958
+ let $options = util/* default */.A.map(field.options, option => {
1959
1959
  return (0,preact_module.h)("label", {
1960
1960
  class: cls
1961
1961
  }, (0,preact_module.h)("input", {
@@ -1964,15 +1964,15 @@ class Popup extends common/* Com */.Sq {
1964
1964
  value: option.value
1965
1965
  }), (0,preact_module.h)("span", null, this.props.t.i18n(option.i18n_label) || option.label));
1966
1966
  });
1967
- return (0,preact_module.h)(preact_module/* Fragment */.ae, null, $options);
1967
+ return (0,preact_module.h)(preact_module/* Fragment */.FK, null, $options);
1968
1968
  }
1969
1969
  renderDropdownField(field) {
1970
- let $options = util/* default */.c.map(field.options, option => {
1970
+ let $options = util/* default */.A.map(field.options, option => {
1971
1971
  return (0,preact_module.h)("option", {
1972
1972
  value: option.value
1973
1973
  }, option.value);
1974
1974
  });
1975
- let theme = util/* default */.c.get(this.props.plugin, 'popup.theme');
1975
+ let theme = util/* default */.A.get(this.props.plugin, 'popup.theme');
1976
1976
  var cls = 'form-control form-control__select ' + theme;
1977
1977
  if (theme === 'vintage') {
1978
1978
  return (0,preact_module.h)("div", {
@@ -1991,7 +1991,7 @@ class Popup extends common/* Com */.Sq {
1991
1991
  }
1992
1992
  renderMutiChoiceField(field) {
1993
1993
  var cls = 'form-control form-control__check ' + this.props.plugin.popup.theme;
1994
- let $options = util/* default */.c.map(field.options, option => {
1994
+ let $options = util/* default */.A.map(field.options, option => {
1995
1995
  return (0,preact_module.h)("label", {
1996
1996
  class: cls
1997
1997
  }, (0,preact_module.h)("input", {
@@ -2001,10 +2001,10 @@ class Popup extends common/* Com */.Sq {
2001
2001
  value: option.value
2002
2002
  }), (0,preact_module.h)("span", null, this.props.t.i18n(option.i18n_label) || option.label));
2003
2003
  });
2004
- return (0,preact_module.h)(preact_module/* Fragment */.ae, null, $options);
2004
+ return (0,preact_module.h)(preact_module/* Fragment */.FK, null, $options);
2005
2005
  }
2006
2006
  renderTextField(field) {
2007
- let theme = util/* default */.c.get(this.props.plugin, 'popup.theme');
2007
+ let theme = util/* default */.A.get(this.props.plugin, 'popup.theme');
2008
2008
  var cls = 'form-control form-control__text ' + theme;
2009
2009
  if (theme === 'simple') {
2010
2010
  return (0,preact_module.h)("input", {
@@ -2037,7 +2037,7 @@ class Popup extends common/* Com */.Sq {
2037
2037
  });
2038
2038
  }
2039
2039
  renderMultilineTextField(field) {
2040
- let theme = util/* default */.c.get(this.props.plugin, 'popup.theme');
2040
+ let theme = util/* default */.A.get(this.props.plugin, 'popup.theme');
2041
2041
  var cls = 'form-control form-control__text ' + theme;
2042
2042
  if (theme === 'simple') {
2043
2043
  return (0,preact_module.h)("textarea", {
@@ -2085,8 +2085,8 @@ class Popup extends common/* Com */.Sq {
2085
2085
  });
2086
2086
  }
2087
2087
  renderFormComponent(com) {
2088
- let popup = util/* default */.c.get(this.props.plugin, 'popup', {});
2089
- let $fields = util/* default */.c.map(com.form.fields, field => {
2088
+ let popup = util/* default */.A.get(this.props.plugin, 'popup', {});
2089
+ let $fields = util/* default */.A.map(com.form.fields, field => {
2090
2090
  if (field.type === 'email') return this.renderTextField(field);
2091
2091
  if (field.type === 'single-choice') return this.renderSingleChoiceField(field);
2092
2092
  if (field.type === 'multiple-choice') return this.renderMutiChoiceField(field);
@@ -2095,8 +2095,8 @@ class Popup extends common/* Com */.Sq {
2095
2095
  if (field.type === 'dropdown') return this.renderDropdownField(field);
2096
2096
  return;
2097
2097
  });
2098
- let theme = util/* default */.c.get(popup, 'theme');
2099
- $fields = util/* default */.c.map($fields, ($field, i) => {
2098
+ let theme = util/* default */.A.get(popup, 'theme');
2099
+ $fields = util/* default */.A.map($fields, ($field, i) => {
2100
2100
  let $label = null;
2101
2101
  let field = com.form.fields[i];
2102
2102
  $label = (0,preact_module.h)("div", {
@@ -2144,11 +2144,11 @@ class Popup extends common/* Com */.Sq {
2144
2144
  }, $fields);
2145
2145
  }
2146
2146
  renderComponents(page) {
2147
- let buttons = util/* default */.c.find(page.components, com => com.type === 'buttons');
2147
+ let buttons = util/* default */.A.find(page.components, com => com.type === 'buttons');
2148
2148
  let $buttons = null;
2149
2149
  if (buttons) $buttons = this.renderButtons(buttons, page);
2150
2150
  let comIndexWithoutImg = 0;
2151
- return util/* default */.c.map(page.components, (com, i) => {
2151
+ return util/* default */.A.map(page.components, (com, i) => {
2152
2152
  if (com.type === 'image') return null;
2153
2153
  comIndexWithoutImg++;
2154
2154
  if (com.type === 'buttons') return $buttons;
@@ -2170,7 +2170,7 @@ class Popup extends common/* Com */.Sq {
2170
2170
  });
2171
2171
  }
2172
2172
  renderFollowFacebook(com) {
2173
- let fburl = util/* default */.c.get(com, 'follow_facebook.url');
2173
+ let fburl = util/* default */.A.get(com, 'follow_facebook.url');
2174
2174
  if (!fburl) return null;
2175
2175
  let style = this.props.mobile && com.mobile_style || com.style;
2176
2176
  let containerstyle = {
@@ -2189,7 +2189,7 @@ class Popup extends common/* Com */.Sq {
2189
2189
  }, (0,preact_module.h)("img", {
2190
2190
  alt: "follow",
2191
2191
  class: "follow_fb_btn__img",
2192
- src: __webpack_require__(2984)
2192
+ src: __webpack_require__(8271)
2193
2193
  }), (0,preact_module.h)("span", {
2194
2194
  style: this.js2css(Object.assign({
2195
2195
  white_space: 'nowrap',
@@ -2199,7 +2199,7 @@ class Popup extends common/* Com */.Sq {
2199
2199
  }, this.props.t('follow_us_on_facebook'))));
2200
2200
  }
2201
2201
  renderSocialButtons(com) {
2202
- let fburl = util/* default */.c.get(com, 'social_buttons.facebook');
2202
+ let fburl = util/* default */.A.get(com, 'social_buttons.facebook');
2203
2203
  let $fb = null;
2204
2204
  if (fburl) {
2205
2205
  $fb = (0,preact_module.h)("a", {
@@ -2209,10 +2209,10 @@ class Popup extends common/* Com */.Sq {
2209
2209
  }, (0,preact_module.h)("img", {
2210
2210
  alt: "facebook",
2211
2211
  class: "social_button__img",
2212
- src: __webpack_require__(8824)
2212
+ src: __webpack_require__(4707)
2213
2213
  }));
2214
2214
  }
2215
- let zlurl = util/* default */.c.get(com, 'social_buttons.zalo');
2215
+ let zlurl = util/* default */.A.get(com, 'social_buttons.zalo');
2216
2216
  let $zl = null;
2217
2217
  if (zlurl) {
2218
2218
  $zl = (0,preact_module.h)("a", {
@@ -2222,7 +2222,7 @@ class Popup extends common/* Com */.Sq {
2222
2222
  }, (0,preact_module.h)("img", {
2223
2223
  alt: "zalo",
2224
2224
  class: "social_button__img",
2225
- src: __webpack_require__(8724)
2225
+ src: __webpack_require__(2931)
2226
2226
  }));
2227
2227
  }
2228
2228
  let style = this.props.mobile && com.mobile_style || com.style;
@@ -2246,7 +2246,7 @@ class Popup extends common/* Com */.Sq {
2246
2246
  style: this.js2css({
2247
2247
  width: '100%',
2248
2248
  height: '100%',
2249
- background_image: `url("${encodeURI(util/* default */.c.get(com, 'image.url'))}")`,
2249
+ background_image: `url("${encodeURI(util/* default */.A.get(com, 'image.url'))}")`,
2250
2250
  background_size: style.background_size || 'cover',
2251
2251
  background_position: style.background_position || 'auto'
2252
2252
  })
@@ -2260,7 +2260,7 @@ class Popup extends common/* Com */.Sq {
2260
2260
  });
2261
2261
  }
2262
2262
  renderTextComponent(com, isFirst) {
2263
- let popup = util/* default */.c.get(this.props.plugin, 'popup', {});
2263
+ let popup = util/* default */.A.get(this.props.plugin, 'popup', {});
2264
2264
  let style = Object.assign({
2265
2265
  color: popup.text_color,
2266
2266
  font_family: popup.font_family,
@@ -2272,21 +2272,21 @@ class Popup extends common/* Com */.Sq {
2272
2272
  class: "text popup_component",
2273
2273
  style: this.js2css(style),
2274
2274
  onClick: e => e.stopPropagation()
2275
- }, this.props.t.i18n(util/* default */.c.get(com, 'text.i18n_html')) || util/* default */.c.get(com, 'text.html'));
2275
+ }, this.props.t.i18n(util/* default */.A.get(com, 'text.i18n_html')) || util/* default */.A.get(com, 'text.html'));
2276
2276
  }
2277
2277
  async refreshCSS() {
2278
2278
  let plugins = this.props.store.matchPlugin();
2279
- let found = util/* default */.c.find(plugins, plugin => plugin.id === this.props.plugin.id);
2279
+ let found = util/* default */.A.find(plugins, plugin => plugin.id === this.props.plugin.id);
2280
2280
  if (!found) return;
2281
2281
  let css = (await popupCSS).default.default.toString();
2282
- var outcss = util/* default */.c.replaceCssVariablePlugin(css, this.props.plugin.popup);
2283
- let extra_css = util/* default */.c.get(this.props.plugin, `popup.pages.0.extra_css`, []);
2284
- let extra_css_string = util/* default */.c.map(extra_css, css => `#sbz92 ${css.selector} { ${this.js2css(css.style)}}`).join('\n');
2282
+ var outcss = util/* default */.A.replaceCssVariablePlugin(css, this.props.plugin.popup);
2283
+ let extra_css = util/* default */.A.get(this.props.plugin, `popup.pages.0.extra_css`, []);
2284
+ let extra_css_string = util/* default */.A.map(extra_css, css => `#sbz92 ${css.selector} { ${this.js2css(css.style)}}`).join('\n');
2285
2285
  outcss += extra_css_string;
2286
- util/* default */.c.setCss(this.props.plugin.id, this.$cssStyleDiv, outcss);
2286
+ util/* default */.A.setCss(this.props.plugin.id, this.$cssStyleDiv, outcss);
2287
2287
  }
2288
2288
  componentWillUnmount() {
2289
- util/* default */.c.setCss(this.props.plugin.id, this.$cssStyleDiv, '');
2289
+ util/* default */.A.setCss(this.props.plugin.id, this.$cssStyleDiv, '');
2290
2290
  }
2291
2291
  async componentDidMount() {
2292
2292
  this.$cssStyleDiv = document.getElementById('subiz-style-for-' + this.props.plugin.id);
@@ -2298,7 +2298,7 @@ class Popup extends common/* Com */.Sq {
2298
2298
  }
2299
2299
  this.props.store.onResetCSS(this, () => this.refreshCSS());
2300
2300
  await this.refreshCSS();
2301
- util/* default */.c.setTimeout(() => {
2301
+ util/* default */.A.setTimeout(() => {
2302
2302
  this.setState({
2303
2303
  cssready: true
2304
2304
  });
@@ -2314,7 +2314,7 @@ class Popup extends common/* Com */.Sq {
2314
2314
  max_height: '85%'
2315
2315
  });
2316
2316
  let containercss = {};
2317
- util/* default */.c.map(['left', 'top', 'right', 'bottom', 'box_shadow', 'transform'], prop => {
2317
+ util/* default */.A.map(['left', 'top', 'right', 'bottom', 'box_shadow', 'transform'], prop => {
2318
2318
  containercss[prop] = pagestyle[prop];
2319
2319
  });
2320
2320
  containercss.position = 'absolute';
@@ -2423,13 +2423,13 @@ class Popup extends common/* Com */.Sq {
2423
2423
  if (!this.state.imageReady) return null;
2424
2424
  if (!this.state.fontReady) return null;
2425
2425
  if (this.state.close) return null;
2426
- let popup = util/* default */.c.get(this.props.plugin, 'popup', {});
2427
- let page = util/* default */.c.get(popup, `pages.${this.getPageIndex()}`);
2426
+ let popup = util/* default */.A.get(this.props.plugin, 'popup', {});
2427
+ let page = util/* default */.A.get(popup, `pages.${this.getPageIndex()}`);
2428
2428
  if (!page) return null;
2429
2429
  let pagestyle = Object.assign({}, this.props.mobile && page.mobile_style || page.style);
2430
2430
  let containercss = this.calculateContainerCss(popup, page);
2431
2431
  let animation = '';
2432
- let pos = util/* default */.c.get(this.props.plugin, 'popup.position', 'center');
2432
+ let pos = util/* default */.A.get(this.props.plugin, 'popup.position', 'center');
2433
2433
  if (pos === 'center' || !pos) {
2434
2434
  animation = 'zoomInCenter';
2435
2435
  if (this.state.closeAnimation) animation = 'zoomOutCenter';
@@ -2440,8 +2440,8 @@ class Popup extends common/* Com */.Sq {
2440
2440
  if (pos === 'middle-left') animation = 'fadeInLeftBig';
2441
2441
  if (pos === 'middle-right') animation = 'fadeInRightBig';
2442
2442
  if (pos === 'bottom-center') animation = 'fadeInUpCenter';
2443
- let layout = util/* default */.c.get(page, 'layout');
2444
- if (this.props.mobile) layout = util/* default */.c.get(page, 'mobile_layout');
2443
+ let layout = util/* default */.A.get(page, 'layout');
2444
+ if (this.props.mobile) layout = util/* default */.A.get(page, 'mobile_layout');
2445
2445
  let formcss = {
2446
2446
  display: pagestyle.display,
2447
2447
  align_items: pagestyle.align_items,
@@ -2473,10 +2473,10 @@ class Popup extends common/* Com */.Sq {
2473
2473
  let overlaystyle = 'position: fixed !important;';
2474
2474
  if (this.props.plugin._preview) overlaystyle = 'position: absolute !important;';
2475
2475
  if (popup.overlay) overlaystyle += ' background: #000c !important;';
2476
- let $imgs = util/* default */.c.map(page.components, (com, i) => {
2476
+ let $imgs = util/* default */.A.map(page.components, (com, i) => {
2477
2477
  if (com.type === 'image') return this.renderImageComponent(com, i);
2478
2478
  });
2479
- let formComponents = util/* default */.c.filter(page.components, com => com.type !== 'image');
2479
+ let formComponents = util/* default */.A.filter(page.components, com => com.type !== 'image');
2480
2480
  if (!formComponents.length) {
2481
2481
  formcss.background = 'transparent';
2482
2482
  formcss.padding_top = '0';
@@ -2503,7 +2503,7 @@ class Popup extends common/* Com */.Sq {
2503
2503
 
2504
2504
  /***/ }),
2505
2505
 
2506
- /***/ 1092:
2506
+ /***/ 9459:
2507
2507
  /***/ ((module) => {
2508
2508
 
2509
2509
  module.exports = function () {
@@ -2772,21 +2772,21 @@ module.exports = function () {
2772
2772
 
2773
2773
  /***/ }),
2774
2774
 
2775
- /***/ 8824:
2775
+ /***/ 4707:
2776
2776
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2777
2777
 
2778
2778
  module.exports = __webpack_require__.p + "assets/img/Facebook.64607ec.png";
2779
2779
 
2780
2780
  /***/ }),
2781
2781
 
2782
- /***/ 8724:
2782
+ /***/ 2931:
2783
2783
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2784
2784
 
2785
2785
  module.exports = __webpack_require__.p + "assets/img/Zalo.6845707.png";
2786
2786
 
2787
2787
  /***/ }),
2788
2788
 
2789
- /***/ 2984:
2789
+ /***/ 8271:
2790
2790
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2791
2791
 
2792
2792
  module.exports = __webpack_require__.p + "assets/img/fb_inverse_circle.36c2cfc.png";