@subiz/widget-v4 4.1.59 → 4.1.60

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 (59) hide show
  1. package/compiled_src/call/call.js +2 -2
  2. package/compiled_src/chatbox/ChatButton.js +20 -5
  3. package/compiled_src/chatbox/DropdownSelect.js +2 -2
  4. package/compiled_src/chatbox/ImageAttachments.js +2 -2
  5. package/compiled_src/chatbox/MessageInput.js +2 -2
  6. package/compiled_src/chatbox/Order.js +2 -2
  7. package/compiled_src/chatbox/Rating.js +2 -2
  8. package/compiled_src/chatbox/Widget.js +2 -2
  9. package/compiled_src/contact/contact.js +2 -2
  10. package/compiled_src/lib.js +2 -2
  11. package/compiled_src/notif/notif.js +2 -2
  12. package/compiled_src/order/address_picker.js +2 -2
  13. package/compiled_src/order/order.js +2 -2
  14. package/compiled_src/popup/countdown.js +2 -2
  15. package/compiled_src/popup/popup.js +2 -2
  16. package/compiled_src/store/api.js +2 -2
  17. package/compiled_src/store/api_fake.js +2 -2
  18. package/compiled_src/store/store.js +2 -2
  19. package/dist/{841.js → 132.js} +644 -653
  20. package/dist/178.js +1 -1
  21. package/dist/18a02a9c54e.132.js +1 -0
  22. package/dist/18a02a9c54e.178.js +1 -0
  23. package/dist/18a02a9c54e.213.js +1 -0
  24. package/dist/18a02a9c54e.335.js +1 -0
  25. package/dist/{18ca55e1708.362.js → 18a02a9c54e.362.js} +1 -1
  26. package/dist/18a02a9c54e.441.js +1 -0
  27. package/dist/18a02a9c54e.605.js +1 -0
  28. package/dist/{18ca55e1708.782.js → 18a02a9c54e.782.js} +1 -1
  29. package/dist/18a02a9c54e.app.js +1 -0
  30. package/dist/{18ca55e1708.index.html → 18a02a9c54e.index.html} +4 -4
  31. package/dist/{18ca55e1708.library.html → 18a02a9c54e.library.html} +4 -4
  32. package/dist/18a02a9c54e.library.js +1 -0
  33. package/dist/{18ca55e1708.preview.html → 18a02a9c54e.preview.html} +1 -1
  34. package/dist/18a02a9c54e.preview.js +1 -0
  35. package/dist/18a02a9c54e.screenshoot.js +1 -0
  36. package/dist/18a02a9c54e.webview.js +1 -0
  37. package/dist/213.js +106 -122
  38. package/dist/335.js +27 -27
  39. package/dist/362.js +1 -1
  40. package/dist/441.js +2855 -0
  41. package/dist/605.js +53 -52
  42. package/dist/782.js +1 -1
  43. package/dist/HASH +1 -1
  44. package/dist/malicious-app.js +3 -9
  45. package/dist/screenshoot.html +1 -1
  46. package/dist/screenshoot.js +622 -493
  47. package/package.json +1 -1
  48. package/src/chatbox/ChatButton.js +20 -5
  49. package/dist/18ca55e1708.178.js +0 -1
  50. package/dist/18ca55e1708.213.js +0 -1
  51. package/dist/18ca55e1708.335.js +0 -1
  52. package/dist/18ca55e1708.605.js +0 -1
  53. package/dist/18ca55e1708.841.js +0 -1
  54. package/dist/18ca55e1708.app.js +0 -1
  55. package/dist/18ca55e1708.library.js +0 -1
  56. package/dist/18ca55e1708.preview.js +0 -1
  57. package/dist/18ca55e1708.screenshoot.js +0 -1
  58. package/dist/18ca55e1708.webview.js +0 -1
  59. /package/dist/{18ca55e1708.678.js → 18a02a9c54e.678.js} +0 -0
package/dist/213.js CHANGED
@@ -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 */.Z.parseJSON(util/* default */.Z.stringify(obj));
1057
+ return util/* default.parseJSON */.Z.parseJSON(util/* default.stringify */.Z.stringify(obj));
1058
1058
  }
1059
1059
  return obj;
1060
1060
  };
@@ -1353,8 +1353,8 @@ var tick_view_flip_commonjs_default = /*#__PURE__*/__webpack_require__.n(tick_vi
1353
1353
  var preact_module = __webpack_require__(6400);
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
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
1357
- 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); }
1356
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
1357
+ 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); }
1358
1358
 
1359
1359
 
1360
1360
 
@@ -1367,7 +1367,7 @@ class Countdown extends common/* Com */.up {
1367
1367
  _defineProperty(this, "state", {
1368
1368
  flipKey: '43'
1369
1369
  });
1370
- this.timer = util/* default */.Z.setInterval(() => {
1370
+ this.timer = util/* default.setInterval */.Z.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 */.up {
1378
1378
  }, 500);
1379
1379
  }
1380
1380
  componentWillUnmount() {
1381
- util/* default */.Z.clearInterval(this.timer);
1381
+ util/* default.clearInterval */.Z.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 */.Z.Date();
1388
+ var start = new util/* default.Date */.Z.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 */.Z.Date().getDay();
1394
+ let todayweekday = new util/* default.Date */.Z.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 */.Z.Date().getDay();
1399
+ daytill = 7 - new util/* default.Date */.Z.Date().getDay();
1400
1400
  }
1401
1401
  } else {
1402
1402
  if (countdown.repeat_weekly_weekday === 'sunday') {
@@ -1406,16 +1406,16 @@ class Countdown extends common/* Com */.up {
1406
1406
  }
1407
1407
  }
1408
1408
  if (daytill < 0) delta = 0;else if (daytill == 0) {
1409
- var start = new util/* default */.Z.Date();
1409
+ var start = new util/* default.Date */.Z.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 */.Z.Date();
1413
+ var start = new util/* default.Date */.Z.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 */.Z.Date.now();
1418
+ let delta = dest - util/* default.Date.now */.Z.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 */.up {
1433
1433
  class: "countdown_electric_numbers"
1434
1434
  }, (0,preact_module.h)("div", {
1435
1435
  class: "countdown_electric_number",
1436
- style: util/* default */.Z.js2css({
1436
+ style: util/* default.js2css */.Z.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 */.Z.js2css({
1442
+ style: util/* default.js2css */.Z.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 */.up {
1451
1451
  class: "countdown_electric_numbers"
1452
1452
  }, (0,preact_module.h)("div", {
1453
1453
  class: "countdown_electric_number",
1454
- style: util/* default */.Z.js2css({
1454
+ style: util/* default.js2css */.Z.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 */.Z.js2css({
1460
+ style: util/* default.js2css */.Z.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 */.up {
1469
1469
  class: "countdown_electric_numbers"
1470
1470
  }, (0,preact_module.h)("div", {
1471
1471
  class: "countdown_electric_number",
1472
- style: util/* default */.Z.js2css({
1472
+ style: util/* default.js2css */.Z.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 */.Z.js2css({
1478
+ style: util/* default.js2css */.Z.js2css({
1479
1479
  font_size: fs,
1480
1480
  font_family: this.props.plugin.popup.font_family
1481
1481
  })
@@ -1586,7 +1586,7 @@ class Flip extends common/* Com */.up {
1586
1586
  "aria-hidden": "true"
1587
1587
  }, (0,preact_module.h)("span", {
1588
1588
  "data-view": "flip",
1589
- style: util/* default */.Z.js2css({
1589
+ style: util/* default.js2css */.Z.js2css({
1590
1590
  font_size: fs,
1591
1591
  font_family: this.props.plugin.popup.font_family
1592
1592
  })
@@ -1595,8 +1595,8 @@ class Flip extends common/* Com */.up {
1595
1595
  }
1596
1596
  ;// CONCATENATED MODULE: ./src/popup/popup.js
1597
1597
  function popup_defineProperty(obj, key, value) { key = popup_toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1598
- function popup_toPropertyKey(t) { var i = popup_toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
1599
- function popup_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); }
1598
+ function popup_toPropertyKey(arg) { var key = popup_toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
1599
+ function popup_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); }
1600
1600
 
1601
1601
 
1602
1602
 
@@ -1614,22 +1614,22 @@ class Popup extends common/* Com */.up {
1614
1614
  fontReady: false
1615
1615
  });
1616
1616
  this._formRef = (0,preact_module/* createRef */.Vf)();
1617
- util/* default */.Z.setTimeout(() => this.fillForm(), 1000);
1618
- util/* default */.Z.setTimeout(async () => {
1617
+ util/* default.setTimeout */.Z.setTimeout(() => this.fillForm(), 1000);
1618
+ util/* default.setTimeout */.Z.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 */.Z.get(impression, 'impression_token') || '';
1622
+ this.impressionToken = util/* default.get */.Z.get(impression, 'impression_token') || '';
1623
1623
  }, 10);
1624
- util/* default */.Z.setTimeout(() => {
1624
+ util/* default.setTimeout */.Z.setTimeout(() => {
1625
1625
  let fonts = {};
1626
1626
  fonts[this.props.plugin.popup.font_family] = true;
1627
1627
  let images = {};
1628
- util/* default */.Z.map(this.props.plugin.popup.pages, page => {
1628
+ util/* default.map */.Z.map(this.props.plugin.popup.pages, page => {
1629
1629
  if (!page) return;
1630
- util/* default */.Z.map(page.components, com => {
1631
- fonts[util/* default */.Z.get(com, 'style.font_family')] = true;
1632
- fonts[util/* default */.Z.get(com, 'mobile_style.font_family')] = true;
1630
+ util/* default.map */.Z.map(page.components, com => {
1631
+ fonts[util/* default.get */.Z.get(com, 'style.font_family')] = true;
1632
+ fonts[util/* default.get */.Z.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 */.up {
1638
1638
  delete fonts.undefined;
1639
1639
  delete fonts.null;
1640
1640
  delete fonts[''];
1641
- if (util/* default */.Z.size(images) == 0) this.setState({
1641
+ if (util/* default.size */.Z.size(images) == 0) this.setState({
1642
1642
  imageReady: true
1643
1643
  });
1644
- util/* default */.Z.map(images, (_, image) => util/* default */.Z.preloadImg(image, () => this.setState({
1644
+ util/* default.map */.Z.map(images, (_, image) => util/* default.preloadImg */.Z.preloadImg(image, () => this.setState({
1645
1645
  imageReady: true
1646
1646
  })));
1647
- util/* default */.Z.preloadWebfonts(Object.keys(fonts));
1648
- util/* default */.Z.setTimeout(async () => {
1647
+ util/* default.preloadWebfonts */.Z.preloadWebfonts(Object.keys(fonts));
1648
+ util/* default.setTimeout */.Z.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 */.up {
1654
1654
  });
1655
1655
  }
1656
1656
  async waitForFont(fonts) {
1657
- if (util/* default */.Z.size(fonts) == 0) return;
1657
+ if (util/* default.size */.Z.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 */.up {
1663
1663
  if (Object.keys(readycount) == fonts.length) return;
1664
1664
  } catch (e) {}
1665
1665
  }
1666
- await util/* default */.Z.sleep(200);
1666
+ await util/* default.sleep */.Z.sleep(200);
1667
1667
  }
1668
1668
  return;
1669
1669
  }
@@ -1677,11 +1677,11 @@ class Popup extends common/* Com */.up {
1677
1677
  return this.props.pageIndex;
1678
1678
  }
1679
1679
  isFormFilled() {
1680
- let page = util/* default */.Z.get(this.props.plugin.popup, `pages.${this.getPageIndex()}`);
1681
- let form = util/* default */.Z.find(page.components, com => com.type === 'form');
1680
+ let page = util/* default.get */.Z.get(this.props.plugin.popup, `pages.${this.getPageIndex()}`);
1681
+ let form = util/* default.find */.Z.find(page.components, com => com.type === 'form');
1682
1682
  if (!form || !form.form) return true;
1683
- let fields = util/* default */.Z.get(form, 'form.fields', []);
1684
- let wrong = util/* default */.Z.find(fields, field => {
1683
+ let fields = util/* default.get */.Z.get(form, 'form.fields', []);
1684
+ let wrong = util/* default.find */.Z.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,33 +1689,19 @@ class Popup extends common/* Com */.up {
1689
1689
  return !wrong;
1690
1690
  }
1691
1691
  fillForm() {
1692
- let page = util/* default */.Z.get(this.props.plugin.popup, `pages.${this.getPageIndex()}`);
1693
- let form = util/* default */.Z.find(page.components, com => com.type === 'form');
1692
+ let page = util/* default.get */.Z.get(this.props.plugin.popup, `pages.${this.getPageIndex()}`);
1693
+ let form = util/* default.find */.Z.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 */.Z.get(user, 'attributes');
1697
- let fields = util/* default */.Z.get(form, 'form.fields', []);
1698
- util/* default */.Z.each(fields, field => {
1696
+ let userAttributes = util/* default.get */.Z.get(user, 'attributes');
1697
+ let fields = util/* default.get */.Z.get(form, 'form.fields', []);
1698
+ util/* default.each */.Z.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
- if (fieldkey == 'emails') {
1704
- let text = util/* default */.Z.getUserAttr(user, 'related_email', 'text');
1705
- if (!text) return;
1706
- var input = this._formRef.current.elements[field.key];
1707
- if (!input) return;
1708
- input.value = text;
1709
- }
1710
- if (fieldkey == 'phones') {
1711
- let text = util/* default */.Z.getUserAttr(user, 'related_phone', 'text');
1712
- if (!text) return;
1713
- var input = this._formRef.current.elements[field.key];
1714
- if (!input) return;
1715
- input.value = text;
1716
- }
1717
- util/* default */.Z.map(userAttributes, attr => {
1718
- if (fieldkey !== attr.key || !attr.text) return;
1703
+ util/* default.map */.Z.map(userAttributes, attr => {
1704
+ if (fieldkey !== attr.key) return;
1719
1705
  var input = this._formRef.current.elements[field.key];
1720
1706
  if (!input) return;
1721
1707
  input.value = attr.text;
@@ -1728,10 +1714,10 @@ class Popup extends common/* Com */.up {
1728
1714
  var formData = new FormData(this._formRef.current);
1729
1715
  for (var pair of formData.entries()) {
1730
1716
  if (pair[0] !== key) continue;
1731
- if (validate === 'email') return util/* default */.Z.isEmail(pair[1]);
1732
- if (validate === 'phone') return util/* default */.Z.isPhone(pair[1]);
1733
- if (validate === 'url') return util/* default */.Z.isURL(pair[1]);
1734
- if (validate === 'number') return util/* default */.Z.isNumber(pair[1]);
1717
+ if (validate === 'email') return util/* default.isEmail */.Z.isEmail(pair[1]);
1718
+ if (validate === 'phone') return util/* default.isPhone */.Z.isPhone(pair[1]);
1719
+ if (validate === 'url') return util/* default.isURL */.Z.isURL(pair[1]);
1720
+ if (validate === 'number') return util/* default.isNumber */.Z.isNumber(pair[1]);
1735
1721
  return true;
1736
1722
  }
1737
1723
  return true;
@@ -1778,11 +1764,11 @@ class Popup extends common/* Com */.up {
1778
1764
  this.setState({
1779
1765
  closeAnimation: true
1780
1766
  });
1781
- util/* default */.Z.setTimeout(() => this.setState({
1767
+ util/* default.setTimeout */.Z.setTimeout(() => this.setState({
1782
1768
  close: true,
1783
1769
  closeAnimation: false
1784
1770
  }), 150);
1785
- if (this.props.plugin._dont_close) util/* default */.Z.setTimeout(() => {
1771
+ if (this.props.plugin._dont_close) util/* default.setTimeout */.Z.setTimeout(() => {
1786
1772
  this.lastoverflow = window.getComputedStyle(document.body).getPropertyValue('overflow');
1787
1773
  document.body.style.setProperty('overflow', 'hidden', 'important');
1788
1774
  this.setState({
@@ -1798,13 +1784,13 @@ class Popup extends common/* Com */.up {
1798
1784
  });
1799
1785
  }
1800
1786
  }
1801
- async onButtonClick(e, buttontype) {
1787
+ onButtonClick(e, buttontype) {
1802
1788
  e.stopPropagation();
1803
- let popup = util/* default */.Z.get(this.props.plugin, 'popup', {});
1804
- let page = util/* default */.Z.get(this.props.plugin.popup, `pages.${this.getPageIndex()}`);
1789
+ let popup = util/* default.get */.Z.get(this.props.plugin, 'popup', {});
1790
+ let page = util/* default.get */.Z.get(this.props.plugin.popup, `pages.${this.getPageIndex()}`);
1805
1791
  let actions = [];
1806
- let buttons = util/* default */.Z.find(page.components, com => com.type === 'buttons');
1807
- if (buttontype === 'background') actions = util/* default */.Z.get(page, 'background_click.actions') || [];
1792
+ let buttons = util/* default.find */.Z.find(page.components, com => com.type === 'buttons');
1793
+ if (buttontype === 'background') actions = util/* default.get */.Z.get(page, 'background_click.actions') || [];
1808
1794
  if (buttontype === 'primary' && buttons.buttons.primary_enabled) actions = buttons.buttons.primary_actions || [];
1809
1795
  if (buttontype === 'secondary' && buttons.buttons.secondary_enabled) actions = buttons.buttons.secondary_actions || [];
1810
1796
  let mustfillform = false;
@@ -1822,54 +1808,52 @@ class Popup extends common/* Com */.up {
1822
1808
  if (a.action === 'submit' || a.action === 'conversion') hasConversion = true;
1823
1809
  }
1824
1810
  if (hasConversion) {
1825
- if (this.isSubmitting) return;
1826
1811
  var formData = this._formRef.current ? new FormData(this._formRef.current) : new FormData();
1827
1812
  var summitFields = [];
1828
- let user = util/* default */.Z.cloneDeep(this.props.store.matchUser());
1813
+ let user = util/* default.cloneDeep */.Z.cloneDeep(this.props.store.matchUser());
1829
1814
  let is_lead = false;
1830
1815
  let modifiedPairs = {};
1831
1816
  for (var pair of formData.entries()) {
1832
1817
  if (modifiedPairs[pair[0]]) {
1833
- let currentValue = util/* default */.Z.get(modifiedPairs, `${pair[0]}.1`, '');
1818
+ let currentValue = util/* default.get */.Z.get(modifiedPairs, `${pair[0]}.1`, '');
1834
1819
  currentValue += `,${pair[1]}`;
1835
- util/* default */.Z.set(modifiedPairs, `${pair[0]}.1`, currentValue);
1820
+ util/* default.set */.Z.set(modifiedPairs, `${pair[0]}.1`, currentValue);
1836
1821
  } else {
1837
1822
  modifiedPairs[pair[0]] = [pair[0], pair[1]];
1838
1823
  }
1839
1824
  }
1840
1825
  for (const [_, pair] of Object.entries(modifiedPairs)) {
1841
- let page = util/* default */.Z.get(this.props.plugin.popup, `pages.${this.getPageIndex()}`);
1842
- let form = util/* default */.Z.find(page.components, com => com.type === 'form');
1843
- let fields = util/* default */.Z.get(form, 'form.fields', []);
1844
- let field = util/* default */.Z.find(fields, field => field.key === pair[0]) || {};
1826
+ let page = util/* default.get */.Z.get(this.props.plugin.popup, `pages.${this.getPageIndex()}`);
1827
+ let form = util/* default.find */.Z.find(page.components, com => com.type === 'form');
1828
+ let fields = util/* default.get */.Z.get(form, 'form.fields', []);
1829
+ let field = util/* default.find */.Z.find(fields, field => field.key === pair[0]) || {};
1845
1830
  if (!field.type) return;
1846
1831
  summitFields.push({
1847
1832
  key: pair[0],
1848
1833
  type: field.type,
1849
- value: util/* default */.Z.stringify(pair[1])
1834
+ value: util/* default.stringify */.Z.stringify(pair[1])
1850
1835
  });
1851
1836
  let key = pair[0];
1852
1837
  if (key === 'email') key = 'emails';
1853
1838
  if (key === 'phone') key = 'phones';
1854
1839
  is_lead = is_lead || key == 'emails' || key == 'phones';
1855
- util/* default */.Z.setUserAttr(user, {
1840
+ util/* default.setUserAttr */.Z.setUserAttr(user, {
1856
1841
  key: key,
1857
1842
  text: pair[1]
1858
1843
  });
1859
1844
  }
1860
- if (is_lead) util/* default */.Z.setUserAttr(user, {
1845
+ if (is_lead) util/* default.setUserAttr */.Z.setUserAttr(user, {
1861
1846
  key: 'lead_source',
1862
1847
  text: 'plugin.' + this.props.plugin.id
1863
1848
  });
1864
- this.isSubmitting = true;
1865
- await Promise.all([this.props.store.setUser(user), this.props.store.sendConversion(this.props.plugin.id, summitFields, this.impressionToken)]);
1866
- this.isSubmitting = false;
1849
+ this.props.store.sendConversion(this.props.plugin.id, summitFields, this.impressionToken);
1850
+ this.props.store.setUser(user);
1867
1851
  }
1868
1852
  for (let a of actions) {
1869
1853
  if (a.action === 'open_widget') this.props.showWidget('list');
1870
1854
  }
1871
1855
  for (let a of actions) {
1872
- if (a.action === 'close') util/* default */.Z.setTimeout(() => this.setClose(true), 100);
1856
+ if (a.action === 'close') util/* default.setTimeout */.Z.setTimeout(() => this.setClose(true), 100);
1873
1857
  if (a.action === 'next_page') this.props.nextPage();
1874
1858
  }
1875
1859
  for (let a of actions) {
@@ -1884,7 +1868,7 @@ class Popup extends common/* Com */.up {
1884
1868
  }
1885
1869
  }
1886
1870
  renderButtons(com, page) {
1887
- let popup = util/* default */.Z.get(this.props.plugin, 'popup', {});
1871
+ let popup = util/* default.get */.Z.get(this.props.plugin, 'popup', {});
1888
1872
  let buttonsstyle = com.style || {};
1889
1873
  let primarystyle = Object.assign({}, buttonsstyle);
1890
1874
  delete primarystyle.justify_content;
@@ -1903,8 +1887,8 @@ class Popup extends common/* Com */.up {
1903
1887
  let style = Object.assign({
1904
1888
  font_size: popup.font_size || '14px'
1905
1889
  }, page.primary_button);
1906
- if (util/* default */.Z.get(com, 'style.background')) style.background = com.style.background;
1907
- if (util/* default */.Z.get(com, 'style.color')) style.color = com.style.color;
1890
+ if (util/* default.get */.Z.get(com, 'style.background')) style.background = com.style.background;
1891
+ if (util/* default.get */.Z.get(com, 'style.color')) style.color = com.style.color;
1908
1892
  $primary = (0,preact_module.h)("div", {
1909
1893
  class: 'btn btn__primary ',
1910
1894
  style: this.js2css(primarystyle),
@@ -1941,7 +1925,7 @@ class Popup extends common/* Com */.up {
1941
1925
  }
1942
1926
  js2css(js, onlyProps) {
1943
1927
  let spacer = this.props.plugin.popup.spacer || 10;
1944
- return util/* default */.Z.js2css(js, onlyProps, {
1928
+ return util/* default.js2css */.Z.js2css(js, onlyProps, {
1945
1929
  '@font_size': this.props.plugin.popup.font_size,
1946
1930
  '@font_family': this.props.plugin.popup.font_family,
1947
1931
  '@text_color': this.props.plugin.popup.text_color,
@@ -1955,7 +1939,7 @@ class Popup extends common/* Com */.up {
1955
1939
  }
1956
1940
  renderSingleChoiceField(field) {
1957
1941
  var cls = 'form-control form-control__select ' + this.props.plugin.popup.theme;
1958
- let $options = util/* default */.Z.map(field.options, option => {
1942
+ let $options = util/* default.map */.Z.map(field.options, option => {
1959
1943
  return (0,preact_module.h)("label", {
1960
1944
  class: cls
1961
1945
  }, (0,preact_module.h)("input", {
@@ -1967,12 +1951,12 @@ class Popup extends common/* Com */.up {
1967
1951
  return (0,preact_module.h)(preact_module/* Fragment */.HY, null, $options);
1968
1952
  }
1969
1953
  renderDropdownField(field) {
1970
- let $options = util/* default */.Z.map(field.options, option => {
1954
+ let $options = util/* default.map */.Z.map(field.options, option => {
1971
1955
  return (0,preact_module.h)("option", {
1972
1956
  value: option.value
1973
1957
  }, option.value);
1974
1958
  });
1975
- let theme = util/* default */.Z.get(this.props.plugin, 'popup.theme');
1959
+ let theme = util/* default.get */.Z.get(this.props.plugin, 'popup.theme');
1976
1960
  var cls = 'form-control form-control__select ' + theme;
1977
1961
  if (theme === 'vintage') {
1978
1962
  return (0,preact_module.h)("div", {
@@ -1991,7 +1975,7 @@ class Popup extends common/* Com */.up {
1991
1975
  }
1992
1976
  renderMutiChoiceField(field) {
1993
1977
  var cls = 'form-control form-control__check ' + this.props.plugin.popup.theme;
1994
- let $options = util/* default */.Z.map(field.options, option => {
1978
+ let $options = util/* default.map */.Z.map(field.options, option => {
1995
1979
  return (0,preact_module.h)("label", {
1996
1980
  class: cls
1997
1981
  }, (0,preact_module.h)("input", {
@@ -2004,7 +1988,7 @@ class Popup extends common/* Com */.up {
2004
1988
  return (0,preact_module.h)(preact_module/* Fragment */.HY, null, $options);
2005
1989
  }
2006
1990
  renderTextField(field) {
2007
- let theme = util/* default */.Z.get(this.props.plugin, 'popup.theme');
1991
+ let theme = util/* default.get */.Z.get(this.props.plugin, 'popup.theme');
2008
1992
  var cls = 'form-control form-control__text ' + theme;
2009
1993
  if (theme === 'simple') {
2010
1994
  return (0,preact_module.h)("input", {
@@ -2037,7 +2021,7 @@ class Popup extends common/* Com */.up {
2037
2021
  });
2038
2022
  }
2039
2023
  renderMultilineTextField(field) {
2040
- let theme = util/* default */.Z.get(this.props.plugin, 'popup.theme');
2024
+ let theme = util/* default.get */.Z.get(this.props.plugin, 'popup.theme');
2041
2025
  var cls = 'form-control form-control__text ' + theme;
2042
2026
  if (theme === 'simple') {
2043
2027
  return (0,preact_module.h)("textarea", {
@@ -2085,8 +2069,8 @@ class Popup extends common/* Com */.up {
2085
2069
  });
2086
2070
  }
2087
2071
  renderFormComponent(com) {
2088
- let popup = util/* default */.Z.get(this.props.plugin, 'popup', {});
2089
- let $fields = util/* default */.Z.map(com.form.fields, field => {
2072
+ let popup = util/* default.get */.Z.get(this.props.plugin, 'popup', {});
2073
+ let $fields = util/* default.map */.Z.map(com.form.fields, field => {
2090
2074
  if (field.type === 'email') return this.renderTextField(field);
2091
2075
  if (field.type === 'single-choice') return this.renderSingleChoiceField(field);
2092
2076
  if (field.type === 'multiple-choice') return this.renderMutiChoiceField(field);
@@ -2095,8 +2079,8 @@ class Popup extends common/* Com */.up {
2095
2079
  if (field.type === 'dropdown') return this.renderDropdownField(field);
2096
2080
  return;
2097
2081
  });
2098
- let theme = util/* default */.Z.get(popup, 'theme');
2099
- $fields = util/* default */.Z.map($fields, ($field, i) => {
2082
+ let theme = util/* default.get */.Z.get(popup, 'theme');
2083
+ $fields = util/* default.map */.Z.map($fields, ($field, i) => {
2100
2084
  let $label = null;
2101
2085
  let field = com.form.fields[i];
2102
2086
  $label = (0,preact_module.h)("div", {
@@ -2144,11 +2128,11 @@ class Popup extends common/* Com */.up {
2144
2128
  }, $fields);
2145
2129
  }
2146
2130
  renderComponents(page) {
2147
- let buttons = util/* default */.Z.find(page.components, com => com.type === 'buttons');
2131
+ let buttons = util/* default.find */.Z.find(page.components, com => com.type === 'buttons');
2148
2132
  let $buttons = null;
2149
2133
  if (buttons) $buttons = this.renderButtons(buttons, page);
2150
2134
  let comIndexWithoutImg = 0;
2151
- return util/* default */.Z.map(page.components, (com, i) => {
2135
+ return util/* default.map */.Z.map(page.components, (com, i) => {
2152
2136
  if (com.type === 'image') return null;
2153
2137
  comIndexWithoutImg++;
2154
2138
  if (com.type === 'buttons') return $buttons;
@@ -2170,7 +2154,7 @@ class Popup extends common/* Com */.up {
2170
2154
  });
2171
2155
  }
2172
2156
  renderFollowFacebook(com) {
2173
- let fburl = util/* default */.Z.get(com, 'follow_facebook.url');
2157
+ let fburl = util/* default.get */.Z.get(com, 'follow_facebook.url');
2174
2158
  if (!fburl) return null;
2175
2159
  let style = this.props.mobile && com.mobile_style || com.style;
2176
2160
  let containerstyle = {
@@ -2199,7 +2183,7 @@ class Popup extends common/* Com */.up {
2199
2183
  }, this.props.t('follow_us_on_facebook'))));
2200
2184
  }
2201
2185
  renderSocialButtons(com) {
2202
- let fburl = util/* default */.Z.get(com, 'social_buttons.facebook');
2186
+ let fburl = util/* default.get */.Z.get(com, 'social_buttons.facebook');
2203
2187
  let $fb = null;
2204
2188
  if (fburl) {
2205
2189
  $fb = (0,preact_module.h)("a", {
@@ -2212,7 +2196,7 @@ class Popup extends common/* Com */.up {
2212
2196
  src: __webpack_require__(7435)
2213
2197
  }));
2214
2198
  }
2215
- let zlurl = util/* default */.Z.get(com, 'social_buttons.zalo');
2199
+ let zlurl = util/* default.get */.Z.get(com, 'social_buttons.zalo');
2216
2200
  let $zl = null;
2217
2201
  if (zlurl) {
2218
2202
  $zl = (0,preact_module.h)("a", {
@@ -2246,7 +2230,7 @@ class Popup extends common/* Com */.up {
2246
2230
  style: this.js2css({
2247
2231
  width: '100%',
2248
2232
  height: '100%',
2249
- background_image: `url("${encodeURI(util/* default */.Z.get(com, 'image.url'))}")`,
2233
+ background_image: `url("${encodeURI(util/* default.get */.Z.get(com, 'image.url'))}")`,
2250
2234
  background_size: style.background_size || 'cover',
2251
2235
  background_position: style.background_position || 'auto'
2252
2236
  })
@@ -2260,7 +2244,7 @@ class Popup extends common/* Com */.up {
2260
2244
  });
2261
2245
  }
2262
2246
  renderTextComponent(com, isFirst) {
2263
- let popup = util/* default */.Z.get(this.props.plugin, 'popup', {});
2247
+ let popup = util/* default.get */.Z.get(this.props.plugin, 'popup', {});
2264
2248
  let style = Object.assign({
2265
2249
  color: popup.text_color,
2266
2250
  font_family: popup.font_family,
@@ -2272,21 +2256,21 @@ class Popup extends common/* Com */.up {
2272
2256
  class: "text popup_component",
2273
2257
  style: this.js2css(style),
2274
2258
  onClick: e => e.stopPropagation()
2275
- }, this.props.t.i18n(util/* default */.Z.get(com, 'text.i18n_html')) || util/* default */.Z.get(com, 'text.html'));
2259
+ }, this.props.t.i18n(util/* default.get */.Z.get(com, 'text.i18n_html')) || util/* default.get */.Z.get(com, 'text.html'));
2276
2260
  }
2277
2261
  async refreshCSS() {
2278
2262
  let plugins = this.props.store.matchPlugin();
2279
- let found = util/* default */.Z.find(plugins, plugin => plugin.id === this.props.plugin.id);
2263
+ let found = util/* default.find */.Z.find(plugins, plugin => plugin.id === this.props.plugin.id);
2280
2264
  if (!found) return;
2281
2265
  let css = (await popupCSS).default.default.toString();
2282
- var outcss = util/* default */.Z.replaceCssVariablePlugin(css, this.props.plugin.popup);
2283
- let extra_css = util/* default */.Z.get(this.props.plugin, `popup.pages.0.extra_css`, []);
2284
- let extra_css_string = util/* default */.Z.map(extra_css, css => `#sbz92 ${css.selector} { ${this.js2css(css.style)}}`).join('\n');
2266
+ var outcss = util/* default.replaceCssVariablePlugin */.Z.replaceCssVariablePlugin(css, this.props.plugin.popup);
2267
+ let extra_css = util/* default.get */.Z.get(this.props.plugin, `popup.pages.0.extra_css`, []);
2268
+ let extra_css_string = util/* default.map */.Z.map(extra_css, css => `#sbz92 ${css.selector} { ${this.js2css(css.style)}}`).join('\n');
2285
2269
  outcss += extra_css_string;
2286
- util/* default */.Z.setCss(this.props.plugin.id, this.$cssStyleDiv, outcss);
2270
+ util/* default.setCss */.Z.setCss(this.props.plugin.id, this.$cssStyleDiv, outcss);
2287
2271
  }
2288
2272
  componentWillUnmount() {
2289
- util/* default */.Z.setCss(this.props.plugin.id, this.$cssStyleDiv, '');
2273
+ util/* default.setCss */.Z.setCss(this.props.plugin.id, this.$cssStyleDiv, '');
2290
2274
  }
2291
2275
  async componentDidMount() {
2292
2276
  this.$cssStyleDiv = document.getElementById('subiz-style-for-' + this.props.plugin.id);
@@ -2298,7 +2282,7 @@ class Popup extends common/* Com */.up {
2298
2282
  }
2299
2283
  this.props.store.onResetCSS(this, () => this.refreshCSS());
2300
2284
  await this.refreshCSS();
2301
- util/* default */.Z.setTimeout(() => {
2285
+ util/* default.setTimeout */.Z.setTimeout(() => {
2302
2286
  this.setState({
2303
2287
  cssready: true
2304
2288
  });
@@ -2314,7 +2298,7 @@ class Popup extends common/* Com */.up {
2314
2298
  max_height: '85%'
2315
2299
  });
2316
2300
  let containercss = {};
2317
- util/* default */.Z.map(['left', 'top', 'right', 'bottom', 'box_shadow', 'transform'], prop => {
2301
+ util/* default.map */.Z.map(['left', 'top', 'right', 'bottom', 'box_shadow', 'transform'], prop => {
2318
2302
  containercss[prop] = pagestyle[prop];
2319
2303
  });
2320
2304
  containercss.position = 'absolute';
@@ -2423,13 +2407,13 @@ class Popup extends common/* Com */.up {
2423
2407
  if (!this.state.imageReady) return null;
2424
2408
  if (!this.state.fontReady) return null;
2425
2409
  if (this.state.close) return null;
2426
- let popup = util/* default */.Z.get(this.props.plugin, 'popup', {});
2427
- let page = util/* default */.Z.get(popup, `pages.${this.getPageIndex()}`);
2410
+ let popup = util/* default.get */.Z.get(this.props.plugin, 'popup', {});
2411
+ let page = util/* default.get */.Z.get(popup, `pages.${this.getPageIndex()}`);
2428
2412
  if (!page) return null;
2429
2413
  let pagestyle = Object.assign({}, this.props.mobile && page.mobile_style || page.style);
2430
2414
  let containercss = this.calculateContainerCss(popup, page);
2431
2415
  let animation = '';
2432
- let pos = util/* default */.Z.get(this.props.plugin, 'popup.position', 'center');
2416
+ let pos = util/* default.get */.Z.get(this.props.plugin, 'popup.position', 'center');
2433
2417
  if (pos === 'center' || !pos) {
2434
2418
  animation = 'zoomInCenter';
2435
2419
  if (this.state.closeAnimation) animation = 'zoomOutCenter';
@@ -2440,8 +2424,8 @@ class Popup extends common/* Com */.up {
2440
2424
  if (pos === 'middle-left') animation = 'fadeInLeftBig';
2441
2425
  if (pos === 'middle-right') animation = 'fadeInRightBig';
2442
2426
  if (pos === 'bottom-center') animation = 'fadeInUpCenter';
2443
- let layout = util/* default */.Z.get(page, 'layout');
2444
- if (this.props.mobile) layout = util/* default */.Z.get(page, 'mobile_layout');
2427
+ let layout = util/* default.get */.Z.get(page, 'layout');
2428
+ if (this.props.mobile) layout = util/* default.get */.Z.get(page, 'mobile_layout');
2445
2429
  let formcss = {
2446
2430
  display: pagestyle.display,
2447
2431
  align_items: pagestyle.align_items,
@@ -2473,10 +2457,10 @@ class Popup extends common/* Com */.up {
2473
2457
  let overlaystyle = 'position: fixed !important;';
2474
2458
  if (this.props.plugin._preview) overlaystyle = 'position: absolute !important;';
2475
2459
  if (popup.overlay) overlaystyle += ' background: #000c !important;';
2476
- let $imgs = util/* default */.Z.map(page.components, (com, i) => {
2460
+ let $imgs = util/* default.map */.Z.map(page.components, (com, i) => {
2477
2461
  if (com.type === 'image') return this.renderImageComponent(com, i);
2478
2462
  });
2479
- let formComponents = util/* default */.Z.filter(page.components, com => com.type !== 'image');
2463
+ let formComponents = util/* default.filter */.Z.filter(page.components, com => com.type !== 'image');
2480
2464
  if (!formComponents.length) {
2481
2465
  formcss.background = 'transparent';
2482
2466
  formcss.padding_top = '0';