@encatch/web-sdk 0.0.35-beta.1 → 0.0.35-beta.3

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.
@@ -1,4 +1,4 @@
1
- import { l as Xs, x as ov, k as vh, t as sv, u as Ss } from "./module-7fG0W-i9.js";
1
+ import { l as Xs, x as ov, k as vh, t as sv, u as Ss } from "./module-uAk9qJKf.js";
2
2
  var Bo, Lt, ac, Uu, Go = 0, bh = [], jt = Xs, Zu = jt.__b, qu = jt.__r, Hu = jt.diffed, Bu = jt.__c, Gu = jt.unmount, Wu = jt.__;
3
3
  function Ml(e, t) {
4
4
  jt.__h && jt.__h(Lt, e, Go || t), Go = 0;
@@ -1,91 +1,91 @@
1
- var $, p, te, ue, F, Q, ne, ie, se, K, z, j, I = {}, oe = [], de = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, W = Array.isArray;
1
+ var O, d, ne, ie, F, X, se, oe, re, V, z, H, I = {}, _e = [], he = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, W = Array.isArray;
2
2
  function k(t, e) {
3
3
  for (var n in e) t[n] = e[n];
4
4
  return t;
5
5
  }
6
- function V(t) {
6
+ function q(t) {
7
7
  t && t.parentNode && t.parentNode.removeChild(t);
8
8
  }
9
- function he(t, e, n) {
9
+ function R(t, e, n) {
10
10
  var i, r, s, _ = {};
11
11
  for (s in e) s == "key" ? i = e[s] : s == "ref" ? r = e[s] : _[s] = e[s];
12
- if (arguments.length > 2 && (_.children = arguments.length > 3 ? $.call(arguments, 2) : n), typeof t == "function" && t.defaultProps != null) for (s in t.defaultProps) _[s] === void 0 && (_[s] = t.defaultProps[s]);
13
- return T(t, _, i, r, null);
12
+ if (arguments.length > 2 && (_.children = arguments.length > 3 ? O.call(arguments, 2) : n), typeof t == "function" && t.defaultProps != null) for (s in t.defaultProps) _[s] === void 0 && (_[s] = t.defaultProps[s]);
13
+ return A(t, _, i, r, null);
14
14
  }
15
- function T(t, e, n, i, r) {
16
- var s = { type: t, props: e, key: n, ref: i, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: r ?? ++te, __i: -1, __u: 0 };
17
- return r == null && p.vnode != null && p.vnode(s), s;
15
+ function A(t, e, n, i, r) {
16
+ var s = { type: t, props: e, key: n, ref: i, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: r ?? ++ne, __i: -1, __u: 0 };
17
+ return r == null && d.vnode != null && d.vnode(s), s;
18
18
  }
19
- function H(t) {
19
+ function L(t) {
20
20
  return t.children;
21
21
  }
22
- function B(t, e) {
22
+ function D(t, e) {
23
23
  this.props = t, this.context = e;
24
24
  }
25
- function P(t, e) {
26
- if (e == null) return t.__ ? P(t.__, t.__i + 1) : null;
25
+ function C(t, e) {
26
+ if (e == null) return t.__ ? C(t.__, t.__i + 1) : null;
27
27
  for (var n; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) return n.__e;
28
- return typeof t.type == "function" ? P(t) : null;
28
+ return typeof t.type == "function" ? C(t) : null;
29
29
  }
30
- function re(t) {
30
+ function ce(t) {
31
31
  var e, n;
32
32
  if ((t = t.__) != null && t.__c != null) {
33
33
  for (t.__e = t.__c.base = null, e = 0; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) {
34
34
  t.__e = t.__c.base = n.__e;
35
35
  break;
36
36
  }
37
- return re(t);
37
+ return ce(t);
38
38
  }
39
39
  }
40
- function X(t) {
41
- (!t.__d && (t.__d = !0) && F.push(t) && !A.__r++ || Q != p.debounceRendering) && ((Q = p.debounceRendering) || ne)(A);
40
+ function Y(t) {
41
+ (!t.__d && (t.__d = !0) && F.push(t) && !N.__r++ || X != d.debounceRendering) && ((X = d.debounceRendering) || se)(N);
42
42
  }
43
- function A() {
44
- for (var t, e, n, i, r, s, _, a = 1; F.length; ) F.length > a && F.sort(ie), t = F.shift(), a = F.length, t.__d && (n = void 0, i = void 0, r = (i = (e = t).__v).__e, s = [], _ = [], e.__P && ((n = k({}, i)).__v = i.__v + 1, p.vnode && p.vnode(n), q(e.__P, n, i, e.__n, e.__P.namespaceURI, 32 & i.__u ? [r] : null, s, r ?? P(i), !!(32 & i.__u), _), n.__v = i.__v, n.__.__k[n.__i] = n, ae(s, n, _), i.__e = i.__ = null, n.__e != r && re(n)));
45
- A.__r = 0;
43
+ function N() {
44
+ for (var t, e, n, i, r, s, _, l = 1; F.length; ) F.length > l && F.sort(oe), t = F.shift(), l = F.length, t.__d && (n = void 0, i = void 0, r = (i = (e = t).__v).__e, s = [], _ = [], e.__P && ((n = k({}, i)).__v = i.__v + 1, d.vnode && d.vnode(n), G(e.__P, n, i, e.__n, e.__P.namespaceURI, 32 & i.__u ? [r] : null, s, r ?? C(i), !!(32 & i.__u), _), n.__v = i.__v, n.__.__k[n.__i] = n, ue(s, n, _), i.__e = i.__ = null, n.__e != r && ce(n)));
45
+ N.__r = 0;
46
46
  }
47
- function _e(t, e, n, i, r, s, _, a, f, c, u) {
48
- var o, m, l, g, y, v, d, h = i && i.__k || oe, S = e.length;
49
- for (f = pe(n, e, h, f, S), o = 0; o < S; o++) (l = n.__k[o]) != null && (m = l.__i == -1 ? I : h[l.__i] || I, l.__i = o, v = q(t, l, m, r, s, _, a, f, c, u), g = l.__e, l.ref && m.ref != l.ref && (m.ref && G(m.ref, null, l), u.push(l.ref, l.__c || g, l)), y == null && g != null && (y = g), (d = !!(4 & l.__u)) || m.__k === l.__k ? f = ce(l, f, t, d) : typeof l.type == "function" && v !== void 0 ? f = v : g && (f = g.nextSibling), l.__u &= -7);
50
- return n.__e = y, f;
47
+ function le(t, e, n, i, r, s, _, l, u, c, f) {
48
+ var o, m, a, g, v, y, h, p = i && i.__k || _e, S = e.length;
49
+ for (u = pe(n, e, p, u, S), o = 0; o < S; o++) (a = n.__k[o]) != null && (m = a.__i == -1 ? I : p[a.__i] || I, a.__i = o, y = G(t, a, m, r, s, _, l, u, c, f), g = a.__e, a.ref && m.ref != a.ref && (m.ref && J(m.ref, null, a), f.push(a.ref, a.__c || g, a)), v == null && g != null && (v = g), (h = !!(4 & a.__u)) || m.__k === a.__k ? u = ae(a, u, t, h) : typeof a.type == "function" && y !== void 0 ? u = y : g && (u = g.nextSibling), a.__u &= -7);
50
+ return n.__e = v, u;
51
51
  }
52
52
  function pe(t, e, n, i, r) {
53
- var s, _, a, f, c, u = n.length, o = u, m = 0;
54
- for (t.__k = new Array(r), s = 0; s < r; s++) (_ = e[s]) != null && typeof _ != "boolean" && typeof _ != "function" ? (f = s + m, (_ = t.__k[s] = typeof _ == "string" || typeof _ == "number" || typeof _ == "bigint" || _.constructor == String ? T(null, _, null, null, null) : W(_) ? T(H, { children: _ }, null, null, null) : _.constructor == null && _.__b > 0 ? T(_.type, _.props, _.key, _.ref ? _.ref : null, _.__v) : _).__ = t, _.__b = t.__b + 1, a = null, (c = _.__i = me(_, n, f, o)) != -1 && (o--, (a = n[c]) && (a.__u |= 2)), a == null || a.__v == null ? (c == -1 && (r > u ? m-- : r < u && m++), typeof _.type != "function" && (_.__u |= 4)) : c != f && (c == f - 1 ? m-- : c == f + 1 ? m++ : (c > f ? m-- : m++, _.__u |= 4))) : t.__k[s] = null;
55
- if (o) for (s = 0; s < u; s++) (a = n[s]) != null && (2 & a.__u) == 0 && (a.__e == i && (i = P(a)), fe(a, a));
53
+ var s, _, l, u, c, f = n.length, o = f, m = 0;
54
+ for (t.__k = new Array(r), s = 0; s < r; s++) (_ = e[s]) != null && typeof _ != "boolean" && typeof _ != "function" ? (u = s + m, (_ = t.__k[s] = typeof _ == "string" || typeof _ == "number" || typeof _ == "bigint" || _.constructor == String ? A(null, _, null, null, null) : W(_) ? A(L, { children: _ }, null, null, null) : _.constructor == null && _.__b > 0 ? A(_.type, _.props, _.key, _.ref ? _.ref : null, _.__v) : _).__ = t, _.__b = t.__b + 1, l = null, (c = _.__i = me(_, n, u, o)) != -1 && (o--, (l = n[c]) && (l.__u |= 2)), l == null || l.__v == null ? (c == -1 && (r > f ? m-- : r < f && m++), typeof _.type != "function" && (_.__u |= 4)) : c != u && (c == u - 1 ? m-- : c == u + 1 ? m++ : (c > u ? m-- : m++, _.__u |= 4))) : t.__k[s] = null;
55
+ if (o) for (s = 0; s < f; s++) (l = n[s]) != null && (2 & l.__u) == 0 && (l.__e == i && (i = C(l)), de(l, l));
56
56
  return i;
57
57
  }
58
- function ce(t, e, n, i) {
58
+ function ae(t, e, n, i) {
59
59
  var r, s;
60
60
  if (typeof t.type == "function") {
61
- for (r = t.__k, s = 0; r && s < r.length; s++) r[s] && (r[s].__ = t, e = ce(r[s], e, n, i));
61
+ for (r = t.__k, s = 0; r && s < r.length; s++) r[s] && (r[s].__ = t, e = ae(r[s], e, n, i));
62
62
  return e;
63
63
  }
64
- t.__e != e && (i && (e && t.type && !e.parentNode && (e = P(t)), n.insertBefore(t.__e, e || null)), e = t.__e);
64
+ t.__e != e && (i && (e && t.type && !e.parentNode && (e = C(t)), n.insertBefore(t.__e, e || null)), e = t.__e);
65
65
  do
66
66
  e = e && e.nextSibling;
67
67
  while (e != null && e.nodeType == 8);
68
68
  return e;
69
69
  }
70
70
  function me(t, e, n, i) {
71
- var r, s, _, a = t.key, f = t.type, c = e[n], u = c != null && (2 & c.__u) == 0;
72
- if (c === null && t.key == null || u && a == c.key && f == c.type) return n;
73
- if (i > (u ? 1 : 0)) {
74
- for (r = n - 1, s = n + 1; r >= 0 || s < e.length; ) if ((c = e[_ = r >= 0 ? r-- : s++]) != null && (2 & c.__u) == 0 && a == c.key && f == c.type) return _;
71
+ var r, s, _, l = t.key, u = t.type, c = e[n], f = c != null && (2 & c.__u) == 0;
72
+ if (c === null && t.key == null || f && l == c.key && u == c.type) return n;
73
+ if (i > (f ? 1 : 0)) {
74
+ for (r = n - 1, s = n + 1; r >= 0 || s < e.length; ) if ((c = e[_ = r >= 0 ? r-- : s++]) != null && (2 & c.__u) == 0 && l == c.key && u == c.type) return _;
75
75
  }
76
76
  return -1;
77
77
  }
78
- function Y(t, e, n) {
79
- e[0] == "-" ? t.setProperty(e, n ?? "") : t[e] = n == null ? "" : typeof n != "number" || de.test(e) ? n : n + "px";
78
+ function Z(t, e, n) {
79
+ e[0] == "-" ? t.setProperty(e, n ?? "") : t[e] = n == null ? "" : typeof n != "number" || he.test(e) ? n : n + "px";
80
80
  }
81
- function U(t, e, n, i, r) {
81
+ function B(t, e, n, i, r) {
82
82
  var s, _;
83
83
  e: if (e == "style") if (typeof n == "string") t.style.cssText = n;
84
84
  else {
85
- if (typeof i == "string" && (t.style.cssText = i = ""), i) for (e in i) n && e in n || Y(t.style, e, "");
86
- if (n) for (e in n) i && n[e] == i[e] || Y(t.style, e, n[e]);
85
+ if (typeof i == "string" && (t.style.cssText = i = ""), i) for (e in i) n && e in n || Z(t.style, e, "");
86
+ if (n) for (e in n) i && n[e] == i[e] || Z(t.style, e, n[e]);
87
87
  }
88
- else if (e[0] == "o" && e[1] == "n") s = e != (e = e.replace(se, "$1")), _ = e.toLowerCase(), e = _ in t || e == "onFocusOut" || e == "onFocusIn" ? _.slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + s] = n, n ? i ? n.u = i.u : (n.u = K, t.addEventListener(e, s ? j : z, s)) : t.removeEventListener(e, s ? j : z, s);
88
+ else if (e[0] == "o" && e[1] == "n") s = e != (e = e.replace(re, "$1")), _ = e.toLowerCase(), e = _ in t || e == "onFocusOut" || e == "onFocusIn" ? _.slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + s] = n, n ? i ? n.u = i.u : (n.u = V, t.addEventListener(e, s ? H : z, s)) : t.removeEventListener(e, s ? H : z, s);
89
89
  else {
90
90
  if (r == "http://www.w3.org/2000/svg") e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
91
91
  else if (e != "width" && e != "height" && e != "href" && e != "list" && e != "form" && e != "tabIndex" && e != "download" && e != "rowSpan" && e != "colSpan" && e != "role" && e != "popover" && e in t) try {
@@ -96,159 +96,173 @@ function U(t, e, n, i, r) {
96
96
  typeof n == "function" || (n == null || n === !1 && e[4] != "-" ? t.removeAttribute(e) : t.setAttribute(e, e == "popover" && n == 1 ? "" : n));
97
97
  }
98
98
  }
99
- function Z(t) {
99
+ function ee(t) {
100
100
  return function(e) {
101
101
  if (this.l) {
102
102
  var n = this.l[e.type + t];
103
- if (e.t == null) e.t = K++;
103
+ if (e.t == null) e.t = V++;
104
104
  else if (e.t < n.u) return;
105
- return n(p.event ? p.event(e) : e);
105
+ return n(d.event ? d.event(e) : e);
106
106
  }
107
107
  };
108
108
  }
109
- function q(t, e, n, i, r, s, _, a, f, c) {
110
- var u, o, m, l, g, y, v, d, h, S, w, M, x, J, L, D, O, b = e.type;
109
+ function G(t, e, n, i, r, s, _, l, u, c) {
110
+ var f, o, m, a, g, v, y, h, p, S, w, U, x, Q, T, M, j, b = e.type;
111
111
  if (e.constructor != null) return null;
112
- 128 & n.__u && (f = !!(32 & n.__u), s = [a = e.__e = n.__e]), (u = p.__b) && u(e);
112
+ 128 & n.__u && (u = !!(32 & n.__u), s = [l = e.__e = n.__e]), (f = d.__b) && f(e);
113
113
  e: if (typeof b == "function") try {
114
- if (d = e.props, h = "prototype" in b && b.prototype.render, S = (u = b.contextType) && i[u.__c], w = u ? S ? S.props.value : u.__ : i, n.__c ? v = (o = e.__c = n.__c).__ = o.__E : (h ? e.__c = o = new b(d, w) : (e.__c = o = new B(d, w), o.constructor = b, o.render = ve), S && S.sub(o), o.props = d, o.state || (o.state = {}), o.context = w, o.__n = i, m = o.__d = !0, o.__h = [], o._sb = []), h && o.__s == null && (o.__s = o.state), h && b.getDerivedStateFromProps != null && (o.__s == o.state && (o.__s = k({}, o.__s)), k(o.__s, b.getDerivedStateFromProps(d, o.__s))), l = o.props, g = o.state, o.__v = e, m) h && b.getDerivedStateFromProps == null && o.componentWillMount != null && o.componentWillMount(), h && o.componentDidMount != null && o.__h.push(o.componentDidMount);
114
+ if (h = e.props, p = "prototype" in b && b.prototype.render, S = (f = b.contextType) && i[f.__c], w = f ? S ? S.props.value : f.__ : i, n.__c ? y = (o = e.__c = n.__c).__ = o.__E : (p ? e.__c = o = new b(h, w) : (e.__c = o = new D(h, w), o.constructor = b, o.render = ye), S && S.sub(o), o.props = h, o.state || (o.state = {}), o.context = w, o.__n = i, m = o.__d = !0, o.__h = [], o._sb = []), p && o.__s == null && (o.__s = o.state), p && b.getDerivedStateFromProps != null && (o.__s == o.state && (o.__s = k({}, o.__s)), k(o.__s, b.getDerivedStateFromProps(h, o.__s))), a = o.props, g = o.state, o.__v = e, m) p && b.getDerivedStateFromProps == null && o.componentWillMount != null && o.componentWillMount(), p && o.componentDidMount != null && o.__h.push(o.componentDidMount);
115
115
  else {
116
- if (h && b.getDerivedStateFromProps == null && d !== l && o.componentWillReceiveProps != null && o.componentWillReceiveProps(d, w), !o.__e && o.shouldComponentUpdate != null && o.shouldComponentUpdate(d, o.__s, w) === !1 || e.__v == n.__v) {
117
- for (e.__v != n.__v && (o.props = d, o.state = o.__s, o.__d = !1), e.__e = n.__e, e.__k = n.__k, e.__k.some(function(C) {
118
- C && (C.__ = e);
119
- }), M = 0; M < o._sb.length; M++) o.__h.push(o._sb[M]);
116
+ if (p && b.getDerivedStateFromProps == null && h !== a && o.componentWillReceiveProps != null && o.componentWillReceiveProps(h, w), !o.__e && o.shouldComponentUpdate != null && o.shouldComponentUpdate(h, o.__s, w) === !1 || e.__v == n.__v) {
117
+ for (e.__v != n.__v && (o.props = h, o.state = o.__s, o.__d = !1), e.__e = n.__e, e.__k = n.__k, e.__k.some(function(P) {
118
+ P && (P.__ = e);
119
+ }), U = 0; U < o._sb.length; U++) o.__h.push(o._sb[U]);
120
120
  o._sb = [], o.__h.length && _.push(o);
121
121
  break e;
122
122
  }
123
- o.componentWillUpdate != null && o.componentWillUpdate(d, o.__s, w), h && o.componentDidUpdate != null && o.__h.push(function() {
124
- o.componentDidUpdate(l, g, y);
123
+ o.componentWillUpdate != null && o.componentWillUpdate(h, o.__s, w), p && o.componentDidUpdate != null && o.__h.push(function() {
124
+ o.componentDidUpdate(a, g, v);
125
125
  });
126
126
  }
127
- if (o.context = w, o.props = d, o.__P = t, o.__e = !1, x = p.__r, J = 0, h) {
128
- for (o.state = o.__s, o.__d = !1, x && x(e), u = o.render(o.props, o.state, o.context), L = 0; L < o._sb.length; L++) o.__h.push(o._sb[L]);
127
+ if (o.context = w, o.props = h, o.__P = t, o.__e = !1, x = d.__r, Q = 0, p) {
128
+ for (o.state = o.__s, o.__d = !1, x && x(e), f = o.render(o.props, o.state, o.context), T = 0; T < o._sb.length; T++) o.__h.push(o._sb[T]);
129
129
  o._sb = [];
130
130
  } else do
131
- o.__d = !1, x && x(e), u = o.render(o.props, o.state, o.context), o.state = o.__s;
132
- while (o.__d && ++J < 25);
133
- o.state = o.__s, o.getChildContext != null && (i = k(k({}, i), o.getChildContext())), h && !m && o.getSnapshotBeforeUpdate != null && (y = o.getSnapshotBeforeUpdate(l, g)), D = u, u != null && u.type === H && u.key == null && (D = le(u.props.children)), a = _e(t, W(D) ? D : [D], e, n, i, r, s, _, a, f, c), o.base = e.__e, e.__u &= -161, o.__h.length && _.push(o), v && (o.__E = o.__ = null);
134
- } catch (C) {
135
- if (e.__v = null, f || s != null) if (C.then) {
136
- for (e.__u |= f ? 160 : 128; a && a.nodeType == 8 && a.nextSibling; ) a = a.nextSibling;
137
- s[s.indexOf(a)] = null, e.__e = a;
131
+ o.__d = !1, x && x(e), f = o.render(o.props, o.state, o.context), o.state = o.__s;
132
+ while (o.__d && ++Q < 25);
133
+ o.state = o.__s, o.getChildContext != null && (i = k(k({}, i), o.getChildContext())), p && !m && o.getSnapshotBeforeUpdate != null && (v = o.getSnapshotBeforeUpdate(a, g)), M = f, f != null && f.type === L && f.key == null && (M = fe(f.props.children)), l = le(t, W(M) ? M : [M], e, n, i, r, s, _, l, u, c), o.base = e.__e, e.__u &= -161, o.__h.length && _.push(o), y && (o.__E = o.__ = null);
134
+ } catch (P) {
135
+ if (e.__v = null, u || s != null) if (P.then) {
136
+ for (e.__u |= u ? 160 : 128; l && l.nodeType == 8 && l.nextSibling; ) l = l.nextSibling;
137
+ s[s.indexOf(l)] = null, e.__e = l;
138
138
  } else {
139
- for (O = s.length; O--; ) V(s[O]);
140
- R(e);
139
+ for (j = s.length; j--; ) q(s[j]);
140
+ K(e);
141
141
  }
142
- else e.__e = n.__e, e.__k = n.__k, C.then || R(e);
143
- p.__e(C, e, n);
142
+ else e.__e = n.__e, e.__k = n.__k, P.then || K(e);
143
+ d.__e(P, e, n);
144
144
  }
145
- else s == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : a = e.__e = ge(n.__e, e, n, i, r, s, _, f, c);
146
- return (u = p.diffed) && u(e), 128 & e.__u ? void 0 : a;
145
+ else s == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : l = e.__e = ge(n.__e, e, n, i, r, s, _, u, c);
146
+ return (f = d.diffed) && f(e), 128 & e.__u ? void 0 : l;
147
147
  }
148
- function R(t) {
149
- t && t.__c && (t.__c.__e = !0), t && t.__k && t.__k.forEach(R);
148
+ function K(t) {
149
+ t && t.__c && (t.__c.__e = !0), t && t.__k && t.__k.forEach(K);
150
150
  }
151
- function ae(t, e, n) {
152
- for (var i = 0; i < n.length; i++) G(n[i], n[++i], n[++i]);
153
- p.__c && p.__c(e, t), t.some(function(r) {
151
+ function ue(t, e, n) {
152
+ for (var i = 0; i < n.length; i++) J(n[i], n[++i], n[++i]);
153
+ d.__c && d.__c(e, t), t.some(function(r) {
154
154
  try {
155
155
  t = r.__h, r.__h = [], t.some(function(s) {
156
156
  s.call(r);
157
157
  });
158
158
  } catch (s) {
159
- p.__e(s, r.__v);
159
+ d.__e(s, r.__v);
160
160
  }
161
161
  });
162
162
  }
163
- function le(t) {
164
- return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : W(t) ? t.map(le) : k({}, t);
163
+ function fe(t) {
164
+ return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : W(t) ? t.map(fe) : k({}, t);
165
165
  }
166
- function ge(t, e, n, i, r, s, _, a, f) {
167
- var c, u, o, m, l, g, y, v = n.props, d = e.props, h = e.type;
168
- if (h == "svg" ? r = "http://www.w3.org/2000/svg" : h == "math" ? r = "http://www.w3.org/1998/Math/MathML" : r || (r = "http://www.w3.org/1999/xhtml"), s != null) {
169
- for (c = 0; c < s.length; c++) if ((l = s[c]) && "setAttribute" in l == !!h && (h ? l.localName == h : l.nodeType == 3)) {
170
- t = l, s[c] = null;
166
+ function ge(t, e, n, i, r, s, _, l, u) {
167
+ var c, f, o, m, a, g, v, y = n.props, h = e.props, p = e.type;
168
+ if (p == "svg" ? r = "http://www.w3.org/2000/svg" : p == "math" ? r = "http://www.w3.org/1998/Math/MathML" : r || (r = "http://www.w3.org/1999/xhtml"), s != null) {
169
+ for (c = 0; c < s.length; c++) if ((a = s[c]) && "setAttribute" in a == !!p && (p ? a.localName == p : a.nodeType == 3)) {
170
+ t = a, s[c] = null;
171
171
  break;
172
172
  }
173
173
  }
174
174
  if (t == null) {
175
- if (h == null) return document.createTextNode(d);
176
- t = document.createElementNS(r, h, d.is && d), a && (p.__m && p.__m(e, s), a = !1), s = null;
175
+ if (p == null) return document.createTextNode(h);
176
+ t = document.createElementNS(r, p, h.is && h), l && (d.__m && d.__m(e, s), l = !1), s = null;
177
177
  }
178
- if (h == null) v === d || a && t.data == d || (t.data = d);
178
+ if (p == null) y === h || l && t.data == h || (t.data = h);
179
179
  else {
180
- if (s = s && $.call(t.childNodes), v = n.props || I, !a && s != null) for (v = {}, c = 0; c < t.attributes.length; c++) v[(l = t.attributes[c]).name] = l.value;
181
- for (c in v) if (l = v[c], c != "children") {
182
- if (c == "dangerouslySetInnerHTML") o = l;
183
- else if (!(c in d)) {
184
- if (c == "value" && "defaultValue" in d || c == "checked" && "defaultChecked" in d) continue;
185
- U(t, c, null, l, r);
180
+ if (s = s && O.call(t.childNodes), y = n.props || I, !l && s != null) for (y = {}, c = 0; c < t.attributes.length; c++) y[(a = t.attributes[c]).name] = a.value;
181
+ for (c in y) if (a = y[c], c != "children") {
182
+ if (c == "dangerouslySetInnerHTML") o = a;
183
+ else if (!(c in h)) {
184
+ if (c == "value" && "defaultValue" in h || c == "checked" && "defaultChecked" in h) continue;
185
+ B(t, c, null, a, r);
186
186
  }
187
187
  }
188
- for (c in d) l = d[c], c == "children" ? m = l : c == "dangerouslySetInnerHTML" ? u = l : c == "value" ? g = l : c == "checked" ? y = l : a && typeof l != "function" || v[c] === l || U(t, c, l, v[c], r);
189
- if (u) a || o && (u.__html == o.__html || u.__html == t.innerHTML) || (t.innerHTML = u.__html), e.__k = [];
190
- else if (o && (t.innerHTML = ""), _e(e.type == "template" ? t.content : t, W(m) ? m : [m], e, n, i, h == "foreignObject" ? "http://www.w3.org/1999/xhtml" : r, s, _, s ? s[0] : n.__k && P(n, 0), a, f), s != null) for (c = s.length; c--; ) V(s[c]);
191
- a || (c = "value", h == "progress" && g == null ? t.removeAttribute("value") : g != null && (g !== t[c] || h == "progress" && !g || h == "option" && g != v[c]) && U(t, c, g, v[c], r), c = "checked", y != null && y != t[c] && U(t, c, y, v[c], r));
188
+ for (c in h) a = h[c], c == "children" ? m = a : c == "dangerouslySetInnerHTML" ? f = a : c == "value" ? g = a : c == "checked" ? v = a : l && typeof a != "function" || y[c] === a || B(t, c, a, y[c], r);
189
+ if (f) l || o && (f.__html == o.__html || f.__html == t.innerHTML) || (t.innerHTML = f.__html), e.__k = [];
190
+ else if (o && (t.innerHTML = ""), le(e.type == "template" ? t.content : t, W(m) ? m : [m], e, n, i, p == "foreignObject" ? "http://www.w3.org/1999/xhtml" : r, s, _, s ? s[0] : n.__k && C(n, 0), l, u), s != null) for (c = s.length; c--; ) q(s[c]);
191
+ l || (c = "value", p == "progress" && g == null ? t.removeAttribute("value") : g != null && (g !== t[c] || p == "progress" && !g || p == "option" && g != y[c]) && B(t, c, g, y[c], r), c = "checked", v != null && v != t[c] && B(t, c, v, y[c], r));
192
192
  }
193
193
  return t;
194
194
  }
195
- function G(t, e, n) {
195
+ function J(t, e, n) {
196
196
  try {
197
197
  if (typeof t == "function") {
198
198
  var i = typeof t.__u == "function";
199
199
  i && t.__u(), i && e == null || (t.__u = t(e));
200
200
  } else t.current = e;
201
201
  } catch (r) {
202
- p.__e(r, n);
202
+ d.__e(r, n);
203
203
  }
204
204
  }
205
- function fe(t, e, n) {
205
+ function de(t, e, n) {
206
206
  var i, r;
207
- if (p.unmount && p.unmount(t), (i = t.ref) && (i.current && i.current != t.__e || G(i, null, e)), (i = t.__c) != null) {
207
+ if (d.unmount && d.unmount(t), (i = t.ref) && (i.current && i.current != t.__e || J(i, null, e)), (i = t.__c) != null) {
208
208
  if (i.componentWillUnmount) try {
209
209
  i.componentWillUnmount();
210
210
  } catch (s) {
211
- p.__e(s, e);
211
+ d.__e(s, e);
212
212
  }
213
213
  i.base = i.__P = null;
214
214
  }
215
- if (i = t.__k) for (r = 0; r < i.length; r++) i[r] && fe(i[r], e, n || typeof t.type != "function");
216
- n || V(t.__e), t.__c = t.__ = t.__e = void 0;
215
+ if (i = t.__k) for (r = 0; r < i.length; r++) i[r] && de(i[r], e, n || typeof t.type != "function");
216
+ n || q(t.__e), t.__c = t.__ = t.__e = void 0;
217
217
  }
218
- function ve(t, e, n) {
218
+ function ye(t, e, n) {
219
219
  return this.constructor(t, n);
220
220
  }
221
- function ye(t, e, n) {
221
+ function ve(t, e, n) {
222
222
  var i, r, s, _;
223
- e == document && (e = document.documentElement), p.__ && p.__(t, e), r = (i = !1) ? null : e.__k, s = [], _ = [], q(e, t = e.__k = he(H, null, [t]), r || I, I, e.namespaceURI, r ? null : e.firstChild ? $.call(e.childNodes) : null, s, r ? r.__e : e.firstChild, i, _), ae(s, t, _);
223
+ e == document && (e = document.documentElement), d.__ && d.__(t, e), r = (i = typeof n == "function") ? null : n && n.__k || e.__k, s = [], _ = [], G(e, t = (!i && n || e).__k = R(L, null, [t]), r || I, I, e.namespaceURI, !i && n ? [n] : r ? null : e.firstChild ? O.call(e.childNodes) : null, s, !i && n ? n : r ? r.__e : e.firstChild, i, _), ue(s, t, _);
224
224
  }
225
- $ = oe.slice, p = { __e: function(t, e, n, i) {
225
+ O = _e.slice, d = { __e: function(t, e, n, i) {
226
226
  for (var r, s, _; e = e.__; ) if ((r = e.__c) && !r.__) try {
227
227
  if ((s = r.constructor) && s.getDerivedStateFromError != null && (r.setState(s.getDerivedStateFromError(t)), _ = r.__d), r.componentDidCatch != null && (r.componentDidCatch(t, i || {}), _ = r.__d), _) return r.__E = r;
228
- } catch (a) {
229
- t = a;
228
+ } catch (l) {
229
+ t = l;
230
230
  }
231
231
  throw t;
232
- } }, te = 0, ue = function(t) {
232
+ } }, ne = 0, ie = function(t) {
233
233
  return t != null && t.constructor == null;
234
- }, B.prototype.setState = function(t, e) {
234
+ }, D.prototype.setState = function(t, e) {
235
235
  var n;
236
- n = this.__s != null && this.__s != this.state ? this.__s : this.__s = k({}, this.state), typeof t == "function" && (t = t(k({}, n), this.props)), t && k(n, t), t != null && this.__v && (e && this._sb.push(e), X(this));
237
- }, B.prototype.forceUpdate = function(t) {
238
- this.__v && (this.__e = !0, t && this.__h.push(t), X(this));
239
- }, B.prototype.render = H, F = [], ne = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, ie = function(t, e) {
236
+ n = this.__s != null && this.__s != this.state ? this.__s : this.__s = k({}, this.state), typeof t == "function" && (t = t(k({}, n), this.props)), t && k(n, t), t != null && this.__v && (e && this._sb.push(e), Y(this));
237
+ }, D.prototype.forceUpdate = function(t) {
238
+ this.__v && (this.__e = !0, t && this.__h.push(t), Y(this));
239
+ }, D.prototype.render = L, F = [], se = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, oe = function(t, e) {
240
240
  return t.__v.__b - e.__v.__b;
241
- }, A.__r = 0, se = /(PointerCapture)$|Capture$/i, K = 0, z = Z(!1), j = Z(!0);
242
- var be = 0;
243
- function ke(t, e, n, i, r, s) {
241
+ }, N.__r = 0, re = /(PointerCapture)$|Capture$/i, V = 0, z = ee(!1), H = ee(!0);
242
+ const be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
243
+ __proto__: null,
244
+ Component: D,
245
+ Fragment: L,
246
+ createElement: R,
247
+ h: R,
248
+ get isValidElement() {
249
+ return ie;
250
+ },
251
+ get options() {
252
+ return d;
253
+ },
254
+ render: ve
255
+ }, Symbol.toStringTag, { value: "Module" }));
256
+ var ke = 0;
257
+ function Se(t, e, n, i, r, s) {
244
258
  e || (e = {});
245
- var _, a, f = e;
246
- if ("ref" in f) for (a in f = {}, e) a == "ref" ? _ = e[a] : f[a] = e[a];
247
- var c = { type: t, props: f, key: n, ref: _, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --be, __i: -1, __u: 0, __source: r, __self: s };
248
- if (typeof t == "function" && (_ = t.defaultProps)) for (a in _) f[a] === void 0 && (f[a] = _[a]);
249
- return p.vnode && p.vnode(c), c;
259
+ var _, l, u = e;
260
+ if ("ref" in u) for (l in u = {}, e) l == "ref" ? _ = e[l] : u[l] = e[l];
261
+ var c = { type: t, props: u, key: n, ref: _, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --ke, __i: -1, __u: 0, __source: r, __self: s };
262
+ if (typeof t == "function" && (_ = t.defaultProps)) for (l in _) u[l] === void 0 && (u[l] = _[l]);
263
+ return d.vnode && d.vnode(c), c;
250
264
  }
251
- function Se() {
265
+ function we() {
252
266
  const t = {
253
267
  _i: [],
254
268
  apiKey: "",
@@ -268,10 +282,10 @@ function Se() {
268
282
  r && !r.startsWith("/") && (r = "/" + r), r = r.replace(/\/+$/, "");
269
283
  const s = `${t.config.host}${r}/encatch-web-sdk.js`, _ = document.createElement("script");
270
284
  _.src = s, _.type = "module", _.async = !0;
271
- const a = document.head.firstChild;
272
- a ? document.head.insertBefore(_, a) : document.head.appendChild(_);
273
- const f = document.createElement("div");
274
- f.id = "enisght-root", document.body.appendChild(f);
285
+ const l = document.head.firstChild;
286
+ l ? document.head.insertBefore(_, l) : document.head.appendChild(_);
287
+ const u = document.createElement("div");
288
+ u.id = "enisght-root", document.body.appendChild(u);
275
289
  }
276
290
  }
277
291
  }, e = [
@@ -300,24 +314,24 @@ function Se() {
300
314
  });
301
315
  }), t;
302
316
  }
303
- let ee = !1;
304
- async function we() {
305
- if (!(ee || typeof window > "u" || typeof document > "u")) {
306
- ee = !0;
317
+ let te = !1;
318
+ async function Ee() {
319
+ if (!(te || typeof window > "u" || typeof document > "u")) {
320
+ te = !0;
307
321
  try {
308
- const t = (await import("./core-wrapper-DnkpWu-Q.js")).default;
322
+ const { render: t } = await Promise.resolve().then(() => be), e = (await import("./core-wrapper-t4w56N6H.js")).default;
309
323
  if (typeof document > "u") return;
310
- let e = document.getElementById("enisght-root");
311
- !e && document.body && (e = document.createElement("div"), e.id = "enisght-root", document.body.appendChild(e)), e && ye(/* @__PURE__ */ ke(t, {}), e);
324
+ let n = document.getElementById("enisght-root");
325
+ !n && document.body && (n = document.createElement("div"), n.id = "enisght-root", document.body.appendChild(n)), n && t(/* @__PURE__ */ Se(e, {}), n);
312
326
  } catch (t) {
313
327
  console.error("Failed to load Encatch core:", t);
314
328
  }
315
329
  }
316
330
  }
317
331
  let E = null;
318
- class N {
332
+ class $ {
319
333
  constructor() {
320
- if (this.instance = Se(), typeof window < "u" && (window.encatch || (window.encatch = this.instance)), typeof window < "u" && typeof document < "u" && !document.getElementById("enisght-root")) {
334
+ if (this.instance = we(), typeof window < "u" && (window.encatch || (window.encatch = this.instance)), typeof window < "u" && typeof document < "u" && !document.getElementById("enisght-root")) {
321
335
  const e = document.createElement("div");
322
336
  e.id = "enisght-root", document.body ? document.body.appendChild(e) : document.readyState === "loading" && document.addEventListener("DOMContentLoaded", () => {
323
337
  !document.getElementById("enisght-root") && document.body && document.body.appendChild(e);
@@ -329,13 +343,13 @@ class N {
329
343
  * This provides a convenient API: Encatch.init(apiKey, options)
330
344
  */
331
345
  static init(e, n) {
332
- return E || (E = new N()), E.init(e, n), E;
346
+ return E || (E = new $()), E.init(e, n), E;
333
347
  }
334
348
  /**
335
349
  * Get the default singleton instance
336
350
  */
337
351
  static getInstance() {
338
- return E || (E = new N()), E;
352
+ return E || (E = new $()), E;
339
353
  }
340
354
  /**
341
355
  * Initialize the Encatch SDK
@@ -346,7 +360,7 @@ class N {
346
360
  this.instance.apiKey = e, n && Object.assign(this.instance.config, n);
347
361
  return;
348
362
  }
349
- this.instance.initialized || (this.instance.apiKey = e, this.instance.config.host = n?.host || "https://app.encatch.com", n?.autoStartSessionDisabled !== void 0 && (this.instance.config.autoStartSessionDisabled = n.autoStartSessionDisabled), n?.processAfterIdentitySet !== void 0 ? this.instance.config.processAfterIdentitySet = n.processAfterIdentitySet : this.instance.config.processAfterIdentitySet = !1, n?.autoStartEnabled !== void 0 && (this.instance.config.autoStartEnabled = n.autoStartEnabled), n?.themeMode ? this.instance.config.themeMode = n.themeMode : this.instance.config.themeMode = "light", n?.language ? this.instance.config.language = n.language : this.instance.config.language = "en", n?.customCssLink && (this.instance.config.customCssLink = n.customCssLink), n?.setUser && (this.instance.config.setUser = n.setUser), n?.onFormEvent && (this.instance.config.onFormEvent = n.onFormEvent), n?.customProperties && (this.instance.config.customProperties = n.customProperties), n?.onSessionDisabled && (this.instance.config.onSessionDisabled = n.onSessionDisabled), this.instance.initialized = !0, typeof window < "u" && (window.encatch = this.instance), we());
363
+ this.instance.initialized || (this.instance.apiKey = e, this.instance.config.host = n?.host || "https://app.encatch.com", n?.autoStartSessionDisabled !== void 0 && (this.instance.config.autoStartSessionDisabled = n.autoStartSessionDisabled), n?.processAfterIdentitySet !== void 0 ? this.instance.config.processAfterIdentitySet = n.processAfterIdentitySet : this.instance.config.processAfterIdentitySet = !1, n?.autoStartEnabled !== void 0 && (this.instance.config.autoStartEnabled = n.autoStartEnabled), n?.themeMode ? this.instance.config.themeMode = n.themeMode : this.instance.config.themeMode = "light", n?.language ? this.instance.config.language = n.language : this.instance.config.language = "en", n?.customCssLink && (this.instance.config.customCssLink = n.customCssLink), n?.setUser && (this.instance.config.setUser = n.setUser), n?.onFormEvent && (this.instance.config.onFormEvent = n.onFormEvent), n?.customProperties && (this.instance.config.customProperties = n.customProperties), n?.onSessionDisabled && (this.instance.config.onSessionDisabled = n.onSessionDisabled), this.instance.initialized = !0, typeof window < "u" && (window.encatch = this.instance), Ee());
350
364
  }
351
365
  /**
352
366
  * Track a custom event
@@ -469,13 +483,13 @@ class N {
469
483
  return this.instance;
470
484
  }
471
485
  }
472
- const Ee = typeof window < "u" ? new N() : null;
486
+ const Fe = typeof window < "u" ? new $() : null;
473
487
  export {
474
- N as E,
475
- Ee as e,
476
- H as k,
477
- p as l,
478
- ue as t,
479
- ke as u,
480
- B as x
488
+ $ as E,
489
+ Fe as e,
490
+ L as k,
491
+ d as l,
492
+ ie as t,
493
+ Se as u,
494
+ D as x
481
495
  };
@@ -1,4 +1,4 @@
1
- import { E as e, e as t } from "./module-7fG0W-i9.js";
1
+ import { E as e, e as t } from "./module-uAk9qJKf.js";
2
2
  export {
3
3
  e as Encatch,
4
4
  t as encatch
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@encatch/web-sdk",
3
- "version": "0.0.35-beta.1",
3
+ "version": "0.0.35-beta.3",
4
4
  "description": "A powerful, lightweight JavaScript SDK for collecting user feedback and running surveys on web applications",
5
5
  "type": "module",
6
6
  "main": "dist-sdk/plugin/sdk/module.js",
@@ -49,9 +49,9 @@
49
49
  "preact": "^10.27.2",
50
50
  "preact-iso": "^2.11.0",
51
51
  "ua-parser-js": "^2.0.6",
52
- "@encatch/event-publisher": "0.0.2-beta.0",
53
- "@encatch/api-sdk": "0.0.11-beta.1",
54
- "@encatch/schema": "0.1.38-beta.3"
52
+ "@encatch/api-sdk": "0.0.11-beta.2",
53
+ "@encatch/schema": "0.1.38-beta.4",
54
+ "@encatch/event-publisher": "0.0.2-beta.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@preact/preset-vite": "^2.10.2",
package/src/module.tsx CHANGED
@@ -15,8 +15,6 @@
15
15
 
16
16
  import { createEncatchInstance } from "./encatch-instance";
17
17
  import { EncatchConfig, FormEventType, FormEventPayload } from "./@types/encatch-type";
18
- // Import render statically to avoid dynamic/static import conflict with preact
19
- import { render } from "preact";
20
18
 
21
19
  let coreLoaded = false;
22
20
 
@@ -30,7 +28,8 @@ async function loadCore() {
30
28
  coreLoaded = true;
31
29
 
32
30
  try {
33
- // Dynamically import the core wrapper (preact render is already imported statically)
31
+ // Dynamically import and render the core wrapper
32
+ const { render } = await import("preact");
34
33
  const CoreWrapper = (await import("./core-wrapper")).default;
35
34
 
36
35
  // Ensure root exists (SSR-safe)