@arthurzakharov/ui-kit 1.7.9 → 1.8.0

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 { jsxs as te, jsx as Y } from "react/jsx-runtime";
1
+ import { jsxs as te, jsx as V } from "react/jsx-runtime";
2
2
  import ze, { useRef as fe, useState as oe, useCallback as re, useEffect as de } from "react";
3
3
  import { useResizeObserver as Ne } from "usehooks-ts";
4
4
  import { RefreshCw as Fe, RotateCcw as qe, Check as Be } from "lucide-react";
@@ -40,15 +40,15 @@ var Te;
40
40
  function Ve() {
41
41
  if (Te) return I;
42
42
  Te = 1;
43
- var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, a = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, l = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, c = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, d = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, s = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, u = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, v = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, y = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, b = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, x = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, g = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, T = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, _ = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, W = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
43
+ var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, a = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, l = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, c = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, p = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, i = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, u = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, v = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, y = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, b = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, x = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, g = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, T = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, _ = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, z = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
44
44
  function R(f) {
45
45
  if (typeof f == "object" && f !== null) {
46
46
  var Z = f.$$typeof;
47
47
  switch (Z) {
48
48
  case n:
49
49
  switch (f = f.type, f) {
50
- case d:
51
- case s:
50
+ case p:
51
+ case i:
52
52
  case t:
53
53
  case o:
54
54
  case a:
@@ -72,10 +72,10 @@ function Ve() {
72
72
  }
73
73
  }
74
74
  function j(f) {
75
- return R(f) === s;
75
+ return R(f) === i;
76
76
  }
77
- return I.AsyncMode = d, I.ConcurrentMode = s, I.ContextConsumer = c, I.ContextProvider = l, I.Element = n, I.ForwardRef = u, I.Fragment = t, I.Lazy = x, I.Memo = b, I.Portal = r, I.Profiler = o, I.StrictMode = a, I.Suspense = v, I.isAsyncMode = function(f) {
78
- return j(f) || R(f) === d;
77
+ return I.AsyncMode = p, I.ConcurrentMode = i, I.ContextConsumer = c, I.ContextProvider = l, I.Element = n, I.ForwardRef = u, I.Fragment = t, I.Lazy = x, I.Memo = b, I.Portal = r, I.Profiler = o, I.StrictMode = a, I.Suspense = v, I.isAsyncMode = function(f) {
78
+ return j(f) || R(f) === p;
79
79
  }, I.isConcurrentMode = j, I.isContextConsumer = function(f) {
80
80
  return R(f) === c;
81
81
  }, I.isContextProvider = function(f) {
@@ -99,27 +99,27 @@ function Ve() {
99
99
  }, I.isSuspense = function(f) {
100
100
  return R(f) === v;
101
101
  }, I.isValidElementType = function(f) {
102
- return typeof f == "string" || typeof f == "function" || f === t || f === s || f === o || f === a || f === v || f === y || typeof f == "object" && f !== null && (f.$$typeof === x || f.$$typeof === b || f.$$typeof === l || f.$$typeof === c || f.$$typeof === u || f.$$typeof === T || f.$$typeof === _ || f.$$typeof === W || f.$$typeof === g);
102
+ return typeof f == "string" || typeof f == "function" || f === t || f === i || f === o || f === a || f === v || f === y || typeof f == "object" && f !== null && (f.$$typeof === x || f.$$typeof === b || f.$$typeof === l || f.$$typeof === c || f.$$typeof === u || f.$$typeof === T || f.$$typeof === _ || f.$$typeof === z || f.$$typeof === g);
103
103
  }, I.typeOf = R, I;
104
104
  }
105
105
  var L = {};
106
106
  var Se;
107
107
  function Xe() {
108
108
  return Se || (Se = 1, process.env.NODE_ENV !== "production" && (function() {
109
- var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, a = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, l = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, c = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, d = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, s = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, u = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, v = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, y = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, b = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, x = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, g = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, T = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, _ = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, W = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
110
- function R(p) {
111
- return typeof p == "string" || typeof p == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
112
- p === t || p === s || p === o || p === a || p === v || p === y || typeof p == "object" && p !== null && (p.$$typeof === x || p.$$typeof === b || p.$$typeof === l || p.$$typeof === c || p.$$typeof === u || p.$$typeof === T || p.$$typeof === _ || p.$$typeof === W || p.$$typeof === g);
109
+ var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, a = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, l = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, c = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, p = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, i = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, u = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, v = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, y = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, b = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, x = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, g = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, T = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, _ = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, z = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
110
+ function R(h) {
111
+ return typeof h == "string" || typeof h == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
112
+ h === t || h === i || h === o || h === a || h === v || h === y || typeof h == "object" && h !== null && (h.$$typeof === x || h.$$typeof === b || h.$$typeof === l || h.$$typeof === c || h.$$typeof === u || h.$$typeof === T || h.$$typeof === _ || h.$$typeof === z || h.$$typeof === g);
113
113
  }
114
- function j(p) {
115
- if (typeof p == "object" && p !== null) {
116
- var G = p.$$typeof;
114
+ function j(h) {
115
+ if (typeof h == "object" && h !== null) {
116
+ var G = h.$$typeof;
117
117
  switch (G) {
118
118
  case n:
119
- var ae = p.type;
119
+ var ae = h.type;
120
120
  switch (ae) {
121
- case d:
122
- case s:
121
+ case p:
122
+ case i:
123
123
  case t:
124
124
  case o:
125
125
  case a:
@@ -143,47 +143,47 @@ function Xe() {
143
143
  }
144
144
  }
145
145
  }
146
- var f = d, Z = s, Q = c, K = l, A = n, P = u, q = t, F = x, m = b, H = r, ee = o, z = a, V = v, B = !1;
147
- function J(p) {
148
- return B || (B = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), i(p) || j(p) === d;
146
+ var f = p, Z = i, Q = c, K = l, A = n, P = u, q = t, F = x, m = b, H = r, ee = o, $ = a, Y = v, B = !1;
147
+ function J(h) {
148
+ return B || (B = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), s(h) || j(h) === p;
149
149
  }
150
- function i(p) {
151
- return j(p) === s;
150
+ function s(h) {
151
+ return j(h) === i;
152
152
  }
153
- function h(p) {
154
- return j(p) === c;
153
+ function d(h) {
154
+ return j(h) === c;
155
155
  }
156
- function w(p) {
157
- return j(p) === l;
156
+ function w(h) {
157
+ return j(h) === l;
158
158
  }
159
- function O(p) {
160
- return typeof p == "object" && p !== null && p.$$typeof === n;
159
+ function O(h) {
160
+ return typeof h == "object" && h !== null && h.$$typeof === n;
161
161
  }
162
- function E(p) {
163
- return j(p) === u;
162
+ function E(h) {
163
+ return j(h) === u;
164
164
  }
165
- function M(p) {
166
- return j(p) === t;
165
+ function M(h) {
166
+ return j(h) === t;
167
167
  }
168
- function S(p) {
169
- return j(p) === x;
168
+ function S(h) {
169
+ return j(h) === x;
170
170
  }
171
- function C(p) {
172
- return j(p) === b;
171
+ function C(h) {
172
+ return j(h) === b;
173
173
  }
174
- function D(p) {
175
- return j(p) === r;
174
+ function D(h) {
175
+ return j(h) === r;
176
176
  }
177
- function $(p) {
178
- return j(p) === o;
177
+ function W(h) {
178
+ return j(h) === o;
179
179
  }
180
- function k(p) {
181
- return j(p) === a;
180
+ function k(h) {
181
+ return j(h) === a;
182
182
  }
183
- function X(p) {
184
- return j(p) === v;
183
+ function X(h) {
184
+ return j(h) === v;
185
185
  }
186
- L.AsyncMode = f, L.ConcurrentMode = Z, L.ContextConsumer = Q, L.ContextProvider = K, L.Element = A, L.ForwardRef = P, L.Fragment = q, L.Lazy = F, L.Memo = m, L.Portal = H, L.Profiler = ee, L.StrictMode = z, L.Suspense = V, L.isAsyncMode = J, L.isConcurrentMode = i, L.isContextConsumer = h, L.isContextProvider = w, L.isElement = O, L.isForwardRef = E, L.isFragment = M, L.isLazy = S, L.isMemo = C, L.isPortal = D, L.isProfiler = $, L.isStrictMode = k, L.isSuspense = X, L.isValidElementType = R, L.typeOf = j;
186
+ L.AsyncMode = f, L.ConcurrentMode = Z, L.ContextConsumer = Q, L.ContextProvider = K, L.Element = A, L.ForwardRef = P, L.Fragment = q, L.Lazy = F, L.Memo = m, L.Portal = H, L.Profiler = ee, L.StrictMode = $, L.Suspense = Y, L.isAsyncMode = J, L.isConcurrentMode = s, L.isContextConsumer = d, L.isContextProvider = w, L.isElement = O, L.isForwardRef = E, L.isFragment = M, L.isLazy = S, L.isMemo = C, L.isPortal = D, L.isProfiler = W, L.isStrictMode = k, L.isSuspense = X, L.isValidElementType = R, L.typeOf = j;
187
187
  })()), L;
188
188
  }
189
189
  var Oe;
@@ -209,31 +209,31 @@ function Je() {
209
209
  return !1;
210
210
  for (var l = {}, c = 0; c < 10; c++)
211
211
  l["_" + String.fromCharCode(c)] = c;
212
- var d = Object.getOwnPropertyNames(l).map(function(u) {
212
+ var p = Object.getOwnPropertyNames(l).map(function(u) {
213
213
  return l[u];
214
214
  });
215
- if (d.join("") !== "0123456789")
215
+ if (p.join("") !== "0123456789")
216
216
  return !1;
217
- var s = {};
217
+ var i = {};
218
218
  return "abcdefghijklmnopqrst".split("").forEach(function(u) {
219
- s[u] = u;
220
- }), Object.keys(Object.assign({}, s)).join("") === "abcdefghijklmnopqrst";
219
+ i[u] = u;
220
+ }), Object.keys(Object.assign({}, i)).join("") === "abcdefghijklmnopqrst";
221
221
  } catch {
222
222
  return !1;
223
223
  }
224
224
  }
225
225
  return pe = a() ? Object.assign : function(o, l) {
226
- for (var c, d = t(o), s, u = 1; u < arguments.length; u++) {
226
+ for (var c, p = t(o), i, u = 1; u < arguments.length; u++) {
227
227
  c = Object(arguments[u]);
228
228
  for (var v in c)
229
- n.call(c, v) && (d[v] = c[v]);
229
+ n.call(c, v) && (p[v] = c[v]);
230
230
  if (e) {
231
- s = e(c);
232
- for (var y = 0; y < s.length; y++)
233
- r.call(c, s[y]) && (d[s[y]] = c[s[y]]);
231
+ i = e(c);
232
+ for (var y = 0; y < i.length; y++)
233
+ r.call(c, i[y]) && (p[i[y]] = c[i[y]]);
234
234
  }
235
235
  }
236
- return d;
236
+ return p;
237
237
  }, pe;
238
238
  }
239
239
  var ve, Re;
@@ -264,7 +264,7 @@ function Ze() {
264
264
  }
265
265
  };
266
266
  }
267
- function a(o, l, c, d, s) {
267
+ function a(o, l, c, p, i) {
268
268
  if (process.env.NODE_ENV !== "production") {
269
269
  for (var u in o)
270
270
  if (t(o, u)) {
@@ -272,19 +272,19 @@ function Ze() {
272
272
  try {
273
273
  if (typeof o[u] != "function") {
274
274
  var y = Error(
275
- (d || "React class") + ": " + c + " type `" + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[u] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
275
+ (p || "React class") + ": " + c + " type `" + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[u] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
276
276
  );
277
277
  throw y.name = "Invariant Violation", y;
278
278
  }
279
- v = o[u](l, u, d, c, null, n);
279
+ v = o[u](l, u, p, c, null, n);
280
280
  } catch (x) {
281
281
  v = x;
282
282
  }
283
283
  if (v && !(v instanceof Error) && e(
284
- (d || "React class") + ": type specification of " + c + " `" + u + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof v + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
284
+ (p || "React class") + ": type specification of " + c + " `" + u + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof v + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
285
285
  ), v instanceof Error && !(v.message in r)) {
286
286
  r[v.message] = !0;
287
- var b = s ? s() : "";
287
+ var b = i ? i() : "";
288
288
  e(
289
289
  "Failed " + c + " type: " + v.message + (b ?? "")
290
290
  );
@@ -303,22 +303,22 @@ function Ge() {
303
303
  var e = $e(), n = Je(), r = /* @__PURE__ */ be(), t = /* @__PURE__ */ We(), a = /* @__PURE__ */ Ze(), o = function() {
304
304
  };
305
305
  process.env.NODE_ENV !== "production" && (o = function(c) {
306
- var d = "Warning: " + c;
307
- typeof console < "u" && console.error(d);
306
+ var p = "Warning: " + c;
307
+ typeof console < "u" && console.error(p);
308
308
  try {
309
- throw new Error(d);
309
+ throw new Error(p);
310
310
  } catch {
311
311
  }
312
312
  });
313
313
  function l() {
314
314
  return null;
315
315
  }
316
- return _e = function(c, d) {
317
- var s = typeof Symbol == "function" && Symbol.iterator, u = "@@iterator";
318
- function v(i) {
319
- var h = i && (s && i[s] || i[u]);
320
- if (typeof h == "function")
321
- return h;
316
+ return _e = function(c, p) {
317
+ var i = typeof Symbol == "function" && Symbol.iterator, u = "@@iterator";
318
+ function v(s) {
319
+ var d = s && (i && s[i] || s[u]);
320
+ if (typeof d == "function")
321
+ return d;
322
322
  }
323
323
  var y = "<<anonymous>>", b = {
324
324
  array: _("array"),
@@ -329,7 +329,7 @@ function Ge() {
329
329
  object: _("object"),
330
330
  string: _("string"),
331
331
  symbol: _("symbol"),
332
- any: W(),
332
+ any: z(),
333
333
  arrayOf: R,
334
334
  element: j(),
335
335
  elementType: f(),
@@ -341,227 +341,227 @@ function Ge() {
341
341
  shape: F,
342
342
  exact: m
343
343
  };
344
- function x(i, h) {
345
- return i === h ? i !== 0 || 1 / i === 1 / h : i !== i && h !== h;
344
+ function x(s, d) {
345
+ return s === d ? s !== 0 || 1 / s === 1 / d : s !== s && d !== d;
346
346
  }
347
- function g(i, h) {
348
- this.message = i, this.data = h && typeof h == "object" ? h : {}, this.stack = "";
347
+ function g(s, d) {
348
+ this.message = s, this.data = d && typeof d == "object" ? d : {}, this.stack = "";
349
349
  }
350
350
  g.prototype = Error.prototype;
351
- function T(i) {
351
+ function T(s) {
352
352
  if (process.env.NODE_ENV !== "production")
353
- var h = {}, w = 0;
354
- function O(M, S, C, D, $, k, X) {
353
+ var d = {}, w = 0;
354
+ function O(M, S, C, D, W, k, X) {
355
355
  if (D = D || y, k = k || C, X !== r) {
356
- if (d) {
357
- var p = new Error(
356
+ if (p) {
357
+ var h = new Error(
358
358
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
359
359
  );
360
- throw p.name = "Invariant Violation", p;
360
+ throw h.name = "Invariant Violation", h;
361
361
  } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
362
362
  var G = D + ":" + C;
363
- !h[G] && // Avoid spamming the console because they are often not actionable except for lib authors
363
+ !d[G] && // Avoid spamming the console because they are often not actionable except for lib authors
364
364
  w < 3 && (o(
365
365
  "You are manually calling a React.PropTypes validation function for the `" + k + "` prop on `" + D + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
366
- ), h[G] = !0, w++);
366
+ ), d[G] = !0, w++);
367
367
  }
368
368
  }
369
- return S[C] == null ? M ? S[C] === null ? new g("The " + $ + " `" + k + "` is marked as required " + ("in `" + D + "`, but its value is `null`.")) : new g("The " + $ + " `" + k + "` is marked as required in " + ("`" + D + "`, but its value is `undefined`.")) : null : i(S, C, D, $, k);
369
+ return S[C] == null ? M ? S[C] === null ? new g("The " + W + " `" + k + "` is marked as required " + ("in `" + D + "`, but its value is `null`.")) : new g("The " + W + " `" + k + "` is marked as required in " + ("`" + D + "`, but its value is `undefined`.")) : null : s(S, C, D, W, k);
370
370
  }
371
371
  var E = O.bind(null, !1);
372
372
  return E.isRequired = O.bind(null, !0), E;
373
373
  }
374
- function _(i) {
375
- function h(w, O, E, M, S, C) {
376
- var D = w[O], $ = z(D);
377
- if ($ !== i) {
378
- var k = V(D);
374
+ function _(s) {
375
+ function d(w, O, E, M, S, C) {
376
+ var D = w[O], W = $(D);
377
+ if (W !== s) {
378
+ var k = Y(D);
379
379
  return new g(
380
- "Invalid " + M + " `" + S + "` of type " + ("`" + k + "` supplied to `" + E + "`, expected ") + ("`" + i + "`."),
381
- { expectedType: i }
380
+ "Invalid " + M + " `" + S + "` of type " + ("`" + k + "` supplied to `" + E + "`, expected ") + ("`" + s + "`."),
381
+ { expectedType: s }
382
382
  );
383
383
  }
384
384
  return null;
385
385
  }
386
- return T(h);
386
+ return T(d);
387
387
  }
388
- function W() {
388
+ function z() {
389
389
  return T(l);
390
390
  }
391
- function R(i) {
392
- function h(w, O, E, M, S) {
393
- if (typeof i != "function")
391
+ function R(s) {
392
+ function d(w, O, E, M, S) {
393
+ if (typeof s != "function")
394
394
  return new g("Property `" + S + "` of component `" + E + "` has invalid PropType notation inside arrayOf.");
395
395
  var C = w[O];
396
396
  if (!Array.isArray(C)) {
397
- var D = z(C);
397
+ var D = $(C);
398
398
  return new g("Invalid " + M + " `" + S + "` of type " + ("`" + D + "` supplied to `" + E + "`, expected an array."));
399
399
  }
400
- for (var $ = 0; $ < C.length; $++) {
401
- var k = i(C, $, E, M, S + "[" + $ + "]", r);
400
+ for (var W = 0; W < C.length; W++) {
401
+ var k = s(C, W, E, M, S + "[" + W + "]", r);
402
402
  if (k instanceof Error)
403
403
  return k;
404
404
  }
405
405
  return null;
406
406
  }
407
- return T(h);
407
+ return T(d);
408
408
  }
409
409
  function j() {
410
- function i(h, w, O, E, M) {
411
- var S = h[w];
410
+ function s(d, w, O, E, M) {
411
+ var S = d[w];
412
412
  if (!c(S)) {
413
- var C = z(S);
413
+ var C = $(S);
414
414
  return new g("Invalid " + E + " `" + M + "` of type " + ("`" + C + "` supplied to `" + O + "`, expected a single ReactElement."));
415
415
  }
416
416
  return null;
417
417
  }
418
- return T(i);
418
+ return T(s);
419
419
  }
420
420
  function f() {
421
- function i(h, w, O, E, M) {
422
- var S = h[w];
421
+ function s(d, w, O, E, M) {
422
+ var S = d[w];
423
423
  if (!e.isValidElementType(S)) {
424
- var C = z(S);
424
+ var C = $(S);
425
425
  return new g("Invalid " + E + " `" + M + "` of type " + ("`" + C + "` supplied to `" + O + "`, expected a single ReactElement type."));
426
426
  }
427
427
  return null;
428
428
  }
429
- return T(i);
429
+ return T(s);
430
430
  }
431
- function Z(i) {
432
- function h(w, O, E, M, S) {
433
- if (!(w[O] instanceof i)) {
434
- var C = i.name || y, D = J(w[O]);
431
+ function Z(s) {
432
+ function d(w, O, E, M, S) {
433
+ if (!(w[O] instanceof s)) {
434
+ var C = s.name || y, D = J(w[O]);
435
435
  return new g("Invalid " + M + " `" + S + "` of type " + ("`" + D + "` supplied to `" + E + "`, expected ") + ("instance of `" + C + "`."));
436
436
  }
437
437
  return null;
438
438
  }
439
- return T(h);
439
+ return T(d);
440
440
  }
441
- function Q(i) {
442
- if (!Array.isArray(i))
441
+ function Q(s) {
442
+ if (!Array.isArray(s))
443
443
  return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
444
444
  "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
445
445
  ) : o("Invalid argument supplied to oneOf, expected an array.")), l;
446
- function h(w, O, E, M, S) {
447
- for (var C = w[O], D = 0; D < i.length; D++)
448
- if (x(C, i[D]))
446
+ function d(w, O, E, M, S) {
447
+ for (var C = w[O], D = 0; D < s.length; D++)
448
+ if (x(C, s[D]))
449
449
  return null;
450
- var $ = JSON.stringify(i, function(X, p) {
451
- var G = V(p);
452
- return G === "symbol" ? String(p) : p;
450
+ var W = JSON.stringify(s, function(X, h) {
451
+ var G = Y(h);
452
+ return G === "symbol" ? String(h) : h;
453
453
  });
454
- return new g("Invalid " + M + " `" + S + "` of value `" + String(C) + "` " + ("supplied to `" + E + "`, expected one of " + $ + "."));
454
+ return new g("Invalid " + M + " `" + S + "` of value `" + String(C) + "` " + ("supplied to `" + E + "`, expected one of " + W + "."));
455
455
  }
456
- return T(h);
456
+ return T(d);
457
457
  }
458
- function K(i) {
459
- function h(w, O, E, M, S) {
460
- if (typeof i != "function")
458
+ function K(s) {
459
+ function d(w, O, E, M, S) {
460
+ if (typeof s != "function")
461
461
  return new g("Property `" + S + "` of component `" + E + "` has invalid PropType notation inside objectOf.");
462
- var C = w[O], D = z(C);
462
+ var C = w[O], D = $(C);
463
463
  if (D !== "object")
464
464
  return new g("Invalid " + M + " `" + S + "` of type " + ("`" + D + "` supplied to `" + E + "`, expected an object."));
465
- for (var $ in C)
466
- if (t(C, $)) {
467
- var k = i(C, $, E, M, S + "." + $, r);
465
+ for (var W in C)
466
+ if (t(C, W)) {
467
+ var k = s(C, W, E, M, S + "." + W, r);
468
468
  if (k instanceof Error)
469
469
  return k;
470
470
  }
471
471
  return null;
472
472
  }
473
- return T(h);
473
+ return T(d);
474
474
  }
475
- function A(i) {
476
- if (!Array.isArray(i))
475
+ function A(s) {
476
+ if (!Array.isArray(s))
477
477
  return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), l;
478
- for (var h = 0; h < i.length; h++) {
479
- var w = i[h];
478
+ for (var d = 0; d < s.length; d++) {
479
+ var w = s[d];
480
480
  if (typeof w != "function")
481
481
  return o(
482
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + B(w) + " at index " + h + "."
482
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + B(w) + " at index " + d + "."
483
483
  ), l;
484
484
  }
485
485
  function O(E, M, S, C, D) {
486
- for (var $ = [], k = 0; k < i.length; k++) {
487
- var X = i[k], p = X(E, M, S, C, D, r);
488
- if (p == null)
486
+ for (var W = [], k = 0; k < s.length; k++) {
487
+ var X = s[k], h = X(E, M, S, C, D, r);
488
+ if (h == null)
489
489
  return null;
490
- p.data && t(p.data, "expectedType") && $.push(p.data.expectedType);
490
+ h.data && t(h.data, "expectedType") && W.push(h.data.expectedType);
491
491
  }
492
- var G = $.length > 0 ? ", expected one of type [" + $.join(", ") + "]" : "";
492
+ var G = W.length > 0 ? ", expected one of type [" + W.join(", ") + "]" : "";
493
493
  return new g("Invalid " + C + " `" + D + "` supplied to " + ("`" + S + "`" + G + "."));
494
494
  }
495
495
  return T(O);
496
496
  }
497
497
  function P() {
498
- function i(h, w, O, E, M) {
499
- return H(h[w]) ? null : new g("Invalid " + E + " `" + M + "` supplied to " + ("`" + O + "`, expected a ReactNode."));
498
+ function s(d, w, O, E, M) {
499
+ return H(d[w]) ? null : new g("Invalid " + E + " `" + M + "` supplied to " + ("`" + O + "`, expected a ReactNode."));
500
500
  }
501
- return T(i);
501
+ return T(s);
502
502
  }
503
- function q(i, h, w, O, E) {
503
+ function q(s, d, w, O, E) {
504
504
  return new g(
505
- (i || "React class") + ": " + h + " type `" + w + "." + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + E + "`."
505
+ (s || "React class") + ": " + d + " type `" + w + "." + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + E + "`."
506
506
  );
507
507
  }
508
- function F(i) {
509
- function h(w, O, E, M, S) {
510
- var C = w[O], D = z(C);
508
+ function F(s) {
509
+ function d(w, O, E, M, S) {
510
+ var C = w[O], D = $(C);
511
511
  if (D !== "object")
512
512
  return new g("Invalid " + M + " `" + S + "` of type `" + D + "` " + ("supplied to `" + E + "`, expected `object`."));
513
- for (var $ in i) {
514
- var k = i[$];
513
+ for (var W in s) {
514
+ var k = s[W];
515
515
  if (typeof k != "function")
516
- return q(E, M, S, $, V(k));
517
- var X = k(C, $, E, M, S + "." + $, r);
516
+ return q(E, M, S, W, Y(k));
517
+ var X = k(C, W, E, M, S + "." + W, r);
518
518
  if (X)
519
519
  return X;
520
520
  }
521
521
  return null;
522
522
  }
523
- return T(h);
523
+ return T(d);
524
524
  }
525
- function m(i) {
526
- function h(w, O, E, M, S) {
527
- var C = w[O], D = z(C);
525
+ function m(s) {
526
+ function d(w, O, E, M, S) {
527
+ var C = w[O], D = $(C);
528
528
  if (D !== "object")
529
529
  return new g("Invalid " + M + " `" + S + "` of type `" + D + "` " + ("supplied to `" + E + "`, expected `object`."));
530
- var $ = n({}, w[O], i);
531
- for (var k in $) {
532
- var X = i[k];
533
- if (t(i, k) && typeof X != "function")
534
- return q(E, M, S, k, V(X));
530
+ var W = n({}, w[O], s);
531
+ for (var k in W) {
532
+ var X = s[k];
533
+ if (t(s, k) && typeof X != "function")
534
+ return q(E, M, S, k, Y(X));
535
535
  if (!X)
536
536
  return new g(
537
537
  "Invalid " + M + " `" + S + "` key `" + k + "` supplied to `" + E + "`.\nBad object: " + JSON.stringify(w[O], null, " ") + `
538
- Valid keys: ` + JSON.stringify(Object.keys(i), null, " ")
538
+ Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
539
539
  );
540
- var p = X(C, k, E, M, S + "." + k, r);
541
- if (p)
542
- return p;
540
+ var h = X(C, k, E, M, S + "." + k, r);
541
+ if (h)
542
+ return h;
543
543
  }
544
544
  return null;
545
545
  }
546
- return T(h);
546
+ return T(d);
547
547
  }
548
- function H(i) {
549
- switch (typeof i) {
548
+ function H(s) {
549
+ switch (typeof s) {
550
550
  case "number":
551
551
  case "string":
552
552
  case "undefined":
553
553
  return !0;
554
554
  case "boolean":
555
- return !i;
555
+ return !s;
556
556
  case "object":
557
- if (Array.isArray(i))
558
- return i.every(H);
559
- if (i === null || c(i))
557
+ if (Array.isArray(s))
558
+ return s.every(H);
559
+ if (s === null || c(s))
560
560
  return !0;
561
- var h = v(i);
562
- if (h) {
563
- var w = h.call(i), O;
564
- if (h !== i.entries) {
561
+ var d = v(s);
562
+ if (d) {
563
+ var w = d.call(s), O;
564
+ if (d !== s.entries) {
565
565
  for (; !(O = w.next()).done; )
566
566
  if (!H(O.value))
567
567
  return !1;
@@ -578,41 +578,41 @@ Valid keys: ` + JSON.stringify(Object.keys(i), null, " ")
578
578
  return !1;
579
579
  }
580
580
  }
581
- function ee(i, h) {
582
- return i === "symbol" ? !0 : h ? h["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && h instanceof Symbol : !1;
581
+ function ee(s, d) {
582
+ return s === "symbol" ? !0 : d ? d["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && d instanceof Symbol : !1;
583
583
  }
584
- function z(i) {
585
- var h = typeof i;
586
- return Array.isArray(i) ? "array" : i instanceof RegExp ? "object" : ee(h, i) ? "symbol" : h;
584
+ function $(s) {
585
+ var d = typeof s;
586
+ return Array.isArray(s) ? "array" : s instanceof RegExp ? "object" : ee(d, s) ? "symbol" : d;
587
587
  }
588
- function V(i) {
589
- if (typeof i > "u" || i === null)
590
- return "" + i;
591
- var h = z(i);
592
- if (h === "object") {
593
- if (i instanceof Date)
588
+ function Y(s) {
589
+ if (typeof s > "u" || s === null)
590
+ return "" + s;
591
+ var d = $(s);
592
+ if (d === "object") {
593
+ if (s instanceof Date)
594
594
  return "date";
595
- if (i instanceof RegExp)
595
+ if (s instanceof RegExp)
596
596
  return "regexp";
597
597
  }
598
- return h;
598
+ return d;
599
599
  }
600
- function B(i) {
601
- var h = V(i);
602
- switch (h) {
600
+ function B(s) {
601
+ var d = Y(s);
602
+ switch (d) {
603
603
  case "array":
604
604
  case "object":
605
- return "an " + h;
605
+ return "an " + d;
606
606
  case "boolean":
607
607
  case "date":
608
608
  case "regexp":
609
- return "a " + h;
609
+ return "a " + d;
610
610
  default:
611
- return h;
611
+ return d;
612
612
  }
613
613
  }
614
- function J(i) {
615
- return !i.constructor || !i.constructor.name ? y : i.constructor.name;
614
+ function J(s) {
615
+ return !s.constructor || !s.constructor.name ? y : s.constructor.name;
616
616
  }
617
617
  return b.checkPropTypes = a, b.resetWarningCache = a.resetWarningCache, b.PropTypes = b, b;
618
618
  }, _e;
@@ -627,7 +627,7 @@ function Ke() {
627
627
  function r() {
628
628
  }
629
629
  return r.resetWarningCache = n, ge = function() {
630
- function t(l, c, d, s, u, v) {
630
+ function t(l, c, p, i, u, v) {
631
631
  if (v !== e) {
632
632
  var y = new Error(
633
633
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
@@ -694,8 +694,8 @@ xe.prototype.length = function() {
694
694
  for (var e = 10, n = 0, r = void 0, t = void 0, a = 0; a <= e; a += 1) {
695
695
  var o = a / e, l = this._point(o, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x), c = this._point(o, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y);
696
696
  if (a > 0) {
697
- var d = l - r, s = c - t;
698
- n += Math.sqrt(d * d + s * s);
697
+ var p = l - r, i = c - t;
698
+ n += Math.sqrt(p * p + i * i);
699
699
  }
700
700
  r = l, t = c;
701
701
  }
@@ -707,14 +707,14 @@ xe.prototype._point = function(e, n, r, t, a) {
707
707
  function et(e, n, r) {
708
708
  var t, a, o, l = null, c = 0;
709
709
  r || (r = {});
710
- var d = function() {
710
+ var p = function() {
711
711
  c = r.leading === !1 ? 0 : Date.now(), l = null, o = e.apply(t, a), l || (t = a = null);
712
712
  };
713
713
  return function() {
714
- var s = Date.now();
715
- !c && r.leading === !1 && (c = s);
716
- var u = n - (s - c);
717
- return t = this, a = arguments, u <= 0 || u > n ? (l && (clearTimeout(l), l = null), c = s, o = e.apply(t, a), l || (t = a = null)) : !l && r.trailing !== !1 && (l = setTimeout(d, u)), o;
714
+ var i = Date.now();
715
+ !c && r.leading === !1 && (c = i);
716
+ var u = n - (i - c);
717
+ return t = this, a = arguments, u <= 0 || u > n ? (l && (clearTimeout(l), l = null), c = i, o = e.apply(t, a), l || (t = a = null)) : !l && r.trailing !== !1 && (l = setTimeout(p, u)), o;
718
718
  };
719
719
  }
720
720
  function N(e, n) {
@@ -777,8 +777,8 @@ N.prototype._strokeBegin = function(e) {
777
777
  N.prototype._strokeUpdate = function(e) {
778
778
  var n = e.clientX, r = e.clientY, t = this._createPoint(n, r), a = this._data[this._data.length - 1], o = a && a[a.length - 1], l = o && t.distanceTo(o) < this.minDistance;
779
779
  if (!(o && l)) {
780
- var c = this._addPoint(t), d = c.curve, s = c.widths;
781
- d && s && this._drawCurve(d, s.start, s.end), this._data[this._data.length - 1].push({
780
+ var c = this._addPoint(t), p = c.curve, i = c.widths;
781
+ p && i && this._drawCurve(p, i.start, i.end), this._data[this._data.length - 1].push({
782
782
  x: t.x,
783
783
  y: t.y,
784
784
  time: t.time,
@@ -824,10 +824,10 @@ N.prototype._addPoint = function(e) {
824
824
  return {};
825
825
  };
826
826
  N.prototype._calculateCurveControlPoints = function(e, n, r) {
827
- var t = e.x - n.x, a = e.y - n.y, o = n.x - r.x, l = n.y - r.y, c = { x: (e.x + n.x) / 2, y: (e.y + n.y) / 2 }, d = { x: (n.x + r.x) / 2, y: (n.y + r.y) / 2 }, s = Math.sqrt(t * t + a * a), u = Math.sqrt(o * o + l * l), v = c.x - d.x, y = c.y - d.y, b = u / (s + u), x = { x: d.x + v * b, y: d.y + y * b }, g = n.x - x.x, T = n.y - x.y;
827
+ var t = e.x - n.x, a = e.y - n.y, o = n.x - r.x, l = n.y - r.y, c = { x: (e.x + n.x) / 2, y: (e.y + n.y) / 2 }, p = { x: (n.x + r.x) / 2, y: (n.y + r.y) / 2 }, i = Math.sqrt(t * t + a * a), u = Math.sqrt(o * o + l * l), v = c.x - p.x, y = c.y - p.y, b = u / (i + u), x = { x: p.x + v * b, y: p.y + y * b }, g = n.x - x.x, T = n.y - x.y;
828
828
  return {
829
829
  c1: new ne(c.x + g, c.y + T),
830
- c2: new ne(d.x + g, d.y + T)
830
+ c2: new ne(p.x + g, p.y + T)
831
831
  };
832
832
  };
833
833
  N.prototype._calculateCurveWidths = function(e) {
@@ -845,11 +845,11 @@ N.prototype._drawCurve = function(e, n, r) {
845
845
  var t = this._ctx, a = r - n, o = Math.floor(e.length());
846
846
  t.beginPath();
847
847
  for (var l = 0; l < o; l += 1) {
848
- var c = l / o, d = c * c, s = d * c, u = 1 - c, v = u * u, y = v * u, b = y * e.startPoint.x;
849
- b += 3 * v * c * e.control1.x, b += 3 * u * d * e.control2.x, b += s * e.endPoint.x;
848
+ var c = l / o, p = c * c, i = p * c, u = 1 - c, v = u * u, y = v * u, b = y * e.startPoint.x;
849
+ b += 3 * v * c * e.control1.x, b += 3 * u * p * e.control2.x, b += i * e.endPoint.x;
850
850
  var x = y * e.startPoint.y;
851
- x += 3 * v * c * e.control1.y, x += 3 * u * d * e.control2.y, x += s * e.endPoint.y;
852
- var g = n + s * a;
851
+ x += 3 * v * c * e.control1.y, x += 3 * u * p * e.control2.y, x += i * e.endPoint.y;
852
+ var g = n + i * a;
853
853
  this._drawPoint(b, x, g);
854
854
  }
855
855
  t.closePath(), t.fill();
@@ -863,12 +863,12 @@ N.prototype._fromData = function(e, n, r) {
863
863
  var a = e[t];
864
864
  if (a.length > 1)
865
865
  for (var o = 0; o < a.length; o += 1) {
866
- var l = a[o], c = new ne(l.x, l.y, l.time), d = l.color;
866
+ var l = a[o], c = new ne(l.x, l.y, l.time), p = l.color;
867
867
  if (o === 0)
868
- this.penColor = d, this._reset(), this._addPoint(c);
868
+ this.penColor = p, this._reset(), this._addPoint(c);
869
869
  else if (o !== a.length - 1) {
870
- var s = this._addPoint(c), u = s.curve, v = s.widths;
871
- u && v && n(u, v, d);
870
+ var i = this._addPoint(c), u = i.curve, v = i.widths;
871
+ u && v && n(u, v, p);
872
872
  }
873
873
  }
874
874
  else {
@@ -879,27 +879,27 @@ N.prototype._fromData = function(e, n, r) {
879
879
  }
880
880
  };
881
881
  N.prototype._toSVG = function() {
882
- var e = this, n = this._data, r = this._canvas, t = Math.max(window.devicePixelRatio || 1, 1), a = 0, o = 0, l = r.width / t, c = r.height / t, d = document.createElementNS("http://www.w3.org/2000/svg", "svg");
883
- d.setAttributeNS(null, "width", r.width), d.setAttributeNS(null, "height", r.height), this._fromData(n, function(_, W, R) {
882
+ var e = this, n = this._data, r = this._canvas, t = Math.max(window.devicePixelRatio || 1, 1), a = 0, o = 0, l = r.width / t, c = r.height / t, p = document.createElementNS("http://www.w3.org/2000/svg", "svg");
883
+ p.setAttributeNS(null, "width", r.width), p.setAttributeNS(null, "height", r.height), this._fromData(n, function(_, z, R) {
884
884
  var j = document.createElement("path");
885
885
  if (!isNaN(_.control1.x) && !isNaN(_.control1.y) && !isNaN(_.control2.x) && !isNaN(_.control2.y)) {
886
886
  var f = "M " + _.startPoint.x.toFixed(3) + "," + _.startPoint.y.toFixed(3) + " " + ("C " + _.control1.x.toFixed(3) + "," + _.control1.y.toFixed(3) + " ") + (_.control2.x.toFixed(3) + "," + _.control2.y.toFixed(3) + " ") + (_.endPoint.x.toFixed(3) + "," + _.endPoint.y.toFixed(3));
887
- j.setAttribute("d", f), j.setAttribute("stroke-width", (W.end * 2.25).toFixed(3)), j.setAttribute("stroke", R), j.setAttribute("fill", "none"), j.setAttribute("stroke-linecap", "round"), d.appendChild(j);
887
+ j.setAttribute("d", f), j.setAttribute("stroke-width", (z.end * 2.25).toFixed(3)), j.setAttribute("stroke", R), j.setAttribute("fill", "none"), j.setAttribute("stroke-linecap", "round"), p.appendChild(j);
888
888
  }
889
889
  }, function(_) {
890
- var W = document.createElement("circle"), R = typeof e.dotSize == "function" ? e.dotSize() : e.dotSize;
891
- W.setAttribute("r", R), W.setAttribute("cx", _.x), W.setAttribute("cy", _.y), W.setAttribute("fill", _.color), d.appendChild(W);
890
+ var z = document.createElement("circle"), R = typeof e.dotSize == "function" ? e.dotSize() : e.dotSize;
891
+ z.setAttribute("r", R), z.setAttribute("cx", _.x), z.setAttribute("cy", _.y), z.setAttribute("fill", _.color), p.appendChild(z);
892
892
  });
893
- var s = "data:image/svg+xml;base64,", u = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"' + (' viewBox="' + a + " " + o + " " + l + " " + c + '"') + (' width="' + l + '"') + (' height="' + c + '"') + ">", v = d.innerHTML;
893
+ var i = "data:image/svg+xml;base64,", u = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"' + (' viewBox="' + a + " " + o + " " + l + " " + c + '"') + (' width="' + l + '"') + (' height="' + c + '"') + ">", v = p.innerHTML;
894
894
  if (v === void 0) {
895
- var y = document.createElement("dummy"), b = d.childNodes;
895
+ var y = document.createElement("dummy"), b = p.childNodes;
896
896
  y.innerHTML = "";
897
897
  for (var x = 0; x < b.length; x += 1)
898
898
  y.appendChild(b[x].cloneNode(!0));
899
899
  v = y.innerHTML;
900
900
  }
901
901
  var g = "</svg>", T = u + v + g;
902
- return s + btoa(T);
902
+ return i + btoa(T);
903
903
  };
904
904
  N.prototype.fromData = function(e) {
905
905
  var n = this;
@@ -931,22 +931,22 @@ function at() {
931
931
  var a = {};
932
932
  return t.m = r, t.c = a, t.p = "", t(0);
933
933
  })([function(r, t) {
934
- function a(s) {
935
- var u = s.getContext("2d"), v = s.width, y = s.height, b = u.getImageData(0, 0, v, y).data, x = c(!0, v, y, b), g = c(!1, v, y, b), T = d(!0, v, y, b), _ = d(!1, v, y, b), W = _ - T + 1, R = g - x + 1, j = u.getImageData(T, x, W, R);
936
- return s.width = W, s.height = R, u.clearRect(0, 0, W, R), u.putImageData(j, 0, 0), s;
934
+ function a(i) {
935
+ var u = i.getContext("2d"), v = i.width, y = i.height, b = u.getImageData(0, 0, v, y).data, x = c(!0, v, y, b), g = c(!1, v, y, b), T = p(!0, v, y, b), _ = p(!1, v, y, b), z = _ - T + 1, R = g - x + 1, j = u.getImageData(T, x, z, R);
936
+ return i.width = z, i.height = R, u.clearRect(0, 0, z, R), u.putImageData(j, 0, 0), i;
937
937
  }
938
- function o(s, u, v, y) {
939
- return { red: y[4 * (v * u + s)], green: y[4 * (v * u + s) + 1], blue: y[4 * (v * u + s) + 2], alpha: y[4 * (v * u + s) + 3] };
938
+ function o(i, u, v, y) {
939
+ return { red: y[4 * (v * u + i)], green: y[4 * (v * u + i) + 1], blue: y[4 * (v * u + i) + 2], alpha: y[4 * (v * u + i) + 3] };
940
940
  }
941
- function l(s, u, v, y) {
942
- return o(s, u, v, y).alpha;
941
+ function l(i, u, v, y) {
942
+ return o(i, u, v, y).alpha;
943
943
  }
944
- function c(s, u, v, y) {
945
- for (var b = s ? 1 : -1, x = s ? 0 : v - 1, g = x; s ? g < v : g > -1; g += b) for (var T = 0; T < u; T++) if (l(T, g, u, y)) return g;
944
+ function c(i, u, v, y) {
945
+ for (var b = i ? 1 : -1, x = i ? 0 : v - 1, g = x; i ? g < v : g > -1; g += b) for (var T = 0; T < u; T++) if (l(T, g, u, y)) return g;
946
946
  return null;
947
947
  }
948
- function d(s, u, v, y) {
949
- for (var b = s ? 1 : -1, x = s ? 0 : u - 1, g = x; s ? g < u : g > -1; g += b) for (var T = 0; T < v; T++) if (l(g, T, u, y)) return g;
948
+ function p(i, u, v, y) {
949
+ for (var b = i ? 1 : -1, x = i ? 0 : u - 1, g = x; i ? g < u : g > -1; g += b) for (var T = 0; T < v; T++) if (l(g, T, u, y)) return g;
950
950
  return null;
951
951
  }
952
952
  Object.defineProperty(t, "__esModule", { value: !0 }), t.default = a;
@@ -961,15 +961,15 @@ function it() {
961
961
  e.exports = t(/* @__PURE__ */ Qe(), ze, rt, at());
962
962
  })(ot, function(r, t, a, o) {
963
963
  return (function(l) {
964
- function c(s) {
965
- if (d[s]) return d[s].exports;
966
- var u = d[s] = { exports: {}, id: s, loaded: !1 };
967
- return l[s].call(u.exports, u, u.exports, c), u.loaded = !0, u.exports;
964
+ function c(i) {
965
+ if (p[i]) return p[i].exports;
966
+ var u = p[i] = { exports: {}, id: i, loaded: !1 };
967
+ return l[i].call(u.exports, u, u.exports, c), u.loaded = !0, u.exports;
968
968
  }
969
- var d = {};
970
- return c.m = l, c.c = d, c.p = "", c(0);
971
- })([function(l, c, d) {
972
- function s(A) {
969
+ var p = {};
970
+ return c.m = l, c.c = p, c.p = "", c(0);
971
+ })([function(l, c, p) {
972
+ function i(A) {
973
973
  return A && A.__esModule ? A : { default: A };
974
974
  }
975
975
  function u(A, P) {
@@ -1005,12 +1005,12 @@ function it() {
1005
1005
  return function(P, q, F) {
1006
1006
  return q && A(P.prototype, q), F && A(P, F), P;
1007
1007
  };
1008
- })(), T = d(1), _ = s(T), W = d(2), R = s(W), j = d(3), f = s(j), Z = d(4), Q = s(Z), K = (function(A) {
1008
+ })(), T = p(1), _ = i(T), z = p(2), R = i(z), j = p(3), f = i(j), Z = p(4), Q = i(Z), K = (function(A) {
1009
1009
  function P() {
1010
1010
  var q, F, m, H;
1011
1011
  v(this, P);
1012
- for (var ee = arguments.length, z = Array(ee), V = 0; V < ee; V++) z[V] = arguments[V];
1013
- return F = m = y(this, (q = P.__proto__ || Object.getPrototypeOf(P)).call.apply(q, [this].concat(z))), m._sigPad = null, m._excludeOurProps = function() {
1012
+ for (var ee = arguments.length, $ = Array(ee), Y = 0; Y < ee; Y++) $[Y] = arguments[Y];
1013
+ return F = m = y(this, (q = P.__proto__ || Object.getPrototypeOf(P)).call.apply(q, [this].concat($))), m._sigPad = null, m._excludeOurProps = function() {
1014
1014
  var B = m.props, J = (B.canvasProps, B.clearOnResize, u(B, ["canvasProps", "clearOnResize"]));
1015
1015
  return J;
1016
1016
  }, m.getCanvas = function() {
@@ -1023,10 +1023,10 @@ function it() {
1023
1023
  }, m._checkClearOnResize = function() {
1024
1024
  m.props.clearOnResize && m._resizeCanvas();
1025
1025
  }, m._resizeCanvas = function() {
1026
- var B = m.props.canvasProps || {}, J = B.width, i = B.height;
1027
- if (!J || !i) {
1028
- var h = m._canvas, w = Math.max(window.devicePixelRatio || 1, 1);
1029
- J || (h.width = h.offsetWidth * w), i || (h.height = h.offsetHeight * w), h.getContext("2d").scale(w, w), m.clear();
1026
+ var B = m.props.canvasProps || {}, J = B.width, s = B.height;
1027
+ if (!J || !s) {
1028
+ var d = m._canvas, w = Math.max(window.devicePixelRatio || 1, 1);
1029
+ J || (d.width = d.offsetWidth * w), s || (d.height = d.offsetHeight * w), d.getContext("2d").scale(w, w), m.clear();
1030
1030
  }
1031
1031
  }, m.on = function() {
1032
1032
  return window.addEventListener("resize", m._checkClearOnResize), m._sigPad.on();
@@ -1058,7 +1058,7 @@ function it() {
1058
1058
  q._canvas = m;
1059
1059
  } }, F));
1060
1060
  } }]), P;
1061
- })(W.Component);
1061
+ })(z.Component);
1062
1062
  K.propTypes = { velocityFilterWeight: _.default.number, minWidth: _.default.number, maxWidth: _.default.number, minDistance: _.default.number, dotSize: _.default.oneOfType([_.default.number, _.default.func]), penColor: _.default.string, throttle: _.default.number, onEnd: _.default.func, onBegin: _.default.func, canvasProps: _.default.object, clearOnResize: _.default.bool }, K.defaultProps = { clearOnResize: !0 }, c.default = K;
1063
1063
  }, function(l, c) {
1064
1064
  l.exports = r;
@@ -1106,18 +1106,18 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
1106
1106
  // Base props
1107
1107
  ...l
1108
1108
  }) => {
1109
- const c = fe(null), d = fe(e), s = fe(!1), [u, v] = oe(null), [y, b] = oe(r ? "manual" : "auto"), [x, g] = oe(""), [T, _] = oe(!1), { width: W = 0, height: R = 0 } = Ne({ ref: c, box: "border-box" }), j = y === "auto" ? n ? "auto-generated" : "auto-loading" : x ? "manual-drawn" : r ? "manual-stored" : "manual-blank", f = n !== "" || T, Z = r || x, Q = re(
1110
- (z) => {
1111
- !u || !W || !R || !z || u.fromDataURL(z, {
1112
- width: +W.toFixed(),
1109
+ const c = fe(null), p = fe(e), i = fe(!1), [u, v] = oe(null), [y, b] = oe(r ? "manual" : "auto"), [x, g] = oe(""), [T, _] = oe(!1), { width: z = 0, height: R = 0 } = Ne({ ref: c, box: "border-box" }), j = y === "auto" ? n ? "auto-generated" : "auto-loading" : x ? "manual-drawn" : r ? "manual-stored" : "manual-blank", f = n !== "" || T, Z = r || x, Q = re(
1110
+ ($) => {
1111
+ !u || !z || !R || !$ || u.fromDataURL($, {
1112
+ width: +z.toFixed(),
1113
1113
  height: +R.toFixed()
1114
1114
  });
1115
1115
  },
1116
- [u, W, R]
1116
+ [u, z, R]
1117
1117
  ), K = re(() => {
1118
1118
  if (!u) return;
1119
- const z = u.getCanvas().toDataURL("image/png");
1120
- g(z), a(z);
1119
+ const $ = u.getCanvas().toDataURL("image/png");
1120
+ g($), a($);
1121
1121
  }, [u, a]), A = re(() => {
1122
1122
  u && (u.clear(), g(""), a(""));
1123
1123
  }, [u, a]), P = re(() => {
@@ -1128,27 +1128,38 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
1128
1128
  b("auto"), g(""), a("");
1129
1129
  }, [a]), m = re(() => {
1130
1130
  x && g("");
1131
- }, [x]), H = (z) => z.includes(j);
1131
+ }, [x]), H = ($) => $.includes(j);
1132
1132
  de(() => {
1133
- y === "manual" && x && W && R && Q(x);
1134
- }, [y, x, W, R, Q]), de(() => {
1135
- d.current !== e && (d.current = e, s.current = !1, _(!1), o(""));
1133
+ y === "manual" && x && z && R && Q(x);
1134
+ }, [y, x, z, R, Q]), de(() => {
1135
+ if (p.current !== e) {
1136
+ if (n) {
1137
+ i.current = !1;
1138
+ return;
1139
+ }
1140
+ i.current = !0, t().then(($) => {
1141
+ const Y = `data:image/png;base64,${$.signature}`;
1142
+ _(!1), o(Y);
1143
+ }).catch(() => {
1144
+ _(!0);
1145
+ });
1146
+ }
1136
1147
  }, [e, o]), de(() => {
1137
1148
  if (n) {
1138
- s.current = !1;
1149
+ i.current = !1;
1139
1150
  return;
1140
1151
  }
1141
- s.current || (s.current = !0, t().then((z) => {
1142
- const V = `data:image/png;base64,${z.signature}`;
1143
- _(!1), o(V);
1152
+ i.current || (i.current = !0, t().then(($) => {
1153
+ const Y = `data:image/png;base64,${$.signature}`;
1154
+ _(!1), o(Y);
1144
1155
  }).catch(() => {
1145
1156
  _(!0);
1146
1157
  }));
1147
1158
  }, [n, e, t, o]);
1148
1159
  const ee = re(() => {
1149
- _(!1), s.current = !0, t().then((z) => {
1150
- const V = `data:image/png;base64,${z.signature}`;
1151
- _(!1), o(V);
1160
+ _(!1), i.current = !0, t().then(($) => {
1161
+ const Y = `data:image/png;base64,${$.signature}`;
1162
+ _(!1), o(Y);
1152
1163
  }).catch(() => {
1153
1164
  _(!0);
1154
1165
  });
@@ -1166,26 +1177,26 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
1166
1177
  ref: c,
1167
1178
  children: [
1168
1179
  /* @__PURE__ */ te("div", { className: he(U.Header, H(["manual-drawn"]) ? U.HeaderManualDraw : U.HeaderNotManualDraw), children: [
1169
- H(["auto-generated", "auto-loading"]) && /* @__PURE__ */ Y("span", { className: U.HeaderTitle, children: "Wir haben eine digitale Signature Sie generiert." }),
1170
- H(["manual-blank", "manual-stored"]) && /* @__PURE__ */ Y("span", { className: U.HeaderTitle, children: "Ihre Signatur:" }),
1171
- H(["manual-drawn"]) && /* @__PURE__ */ Y(
1180
+ H(["auto-generated", "auto-loading"]) && /* @__PURE__ */ V("span", { className: U.HeaderTitle, children: "Wir haben eine digitale Signature Sie generiert." }),
1181
+ H(["manual-blank", "manual-stored"]) && /* @__PURE__ */ V("span", { className: U.HeaderTitle, children: "Ihre Signatur:" }),
1182
+ H(["manual-drawn"]) && /* @__PURE__ */ V(
1172
1183
  ie,
1173
1184
  {
1174
1185
  blurAfterClick: !0,
1175
1186
  text: "Neu starten",
1176
1187
  underlined: !0,
1177
- icon: /* @__PURE__ */ Y(Fe, {}),
1188
+ icon: /* @__PURE__ */ V(Fe, {}),
1178
1189
  className: U.HeaderReset,
1179
1190
  onClick: A
1180
1191
  }
1181
1192
  )
1182
1193
  ] }),
1183
1194
  H(["auto-generated", "auto-loading"]) ? /* @__PURE__ */ te("div", { className: U.AutoPanel, children: [
1184
- n !== "" && /* @__PURE__ */ Y("img", { className: U.AutoPanelImage, src: n, alt: "signature" }),
1185
- n === "" && !T && /* @__PURE__ */ Y(Ue, { size: "sm", color: "accent-primary", className: U.AutoPanelLoader }),
1195
+ n !== "" && /* @__PURE__ */ V("img", { className: U.AutoPanelImage, src: n, alt: "signature" }),
1196
+ n === "" && !T && /* @__PURE__ */ V(Ue, { size: "sm", color: "accent-primary", className: U.AutoPanelLoader }),
1186
1197
  n === "" && T && /* @__PURE__ */ te("div", { className: U.AutoPanelError, children: [
1187
- /* @__PURE__ */ Y("span", { className: U.AutoPanelErrorTitle, children: "Automatische Signatur konnte nicht geladen werden." }),
1188
- /* @__PURE__ */ Y(
1198
+ /* @__PURE__ */ V("span", { className: U.AutoPanelErrorTitle, children: "Automatische Signatur konnte nicht geladen werden." }),
1199
+ /* @__PURE__ */ V(
1189
1200
  ie,
1190
1201
  {
1191
1202
  blurAfterClick: !0,
@@ -1193,16 +1204,16 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
1193
1204
  text: "Erneut versuchen",
1194
1205
  size: "sm",
1195
1206
  iconPosition: "right",
1196
- icon: /* @__PURE__ */ Y(qe, {}),
1207
+ icon: /* @__PURE__ */ V(qe, {}),
1197
1208
  onClick: ee
1198
1209
  }
1199
1210
  )
1200
1211
  ] }),
1201
1212
  n !== "" && /* @__PURE__ */ te("div", { className: U.AutoPanelLabel, children: [
1202
- /* @__PURE__ */ Y(Be, { className: U.AutoPanelLabelIcon }),
1203
- /* @__PURE__ */ Y("span", { className: U.AutoPanelLabelText, children: "Diese Unterschrift ist ausreichend" })
1213
+ /* @__PURE__ */ V(Be, { className: U.AutoPanelLabelIcon }),
1214
+ /* @__PURE__ */ V("span", { className: U.AutoPanelLabelText, children: "Diese Unterschrift ist ausreichend" })
1204
1215
  ] }),
1205
- f && /* @__PURE__ */ Y(
1216
+ f && /* @__PURE__ */ V(
1206
1217
  ie,
1207
1218
  {
1208
1219
  blurAfterClick: !0,
@@ -1214,7 +1225,7 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
1214
1225
  }
1215
1226
  )
1216
1227
  ] }) : /* @__PURE__ */ te("div", { className: U.ManualPanel, children: [
1217
- H(["manual-stored"]) ? /* @__PURE__ */ Y("img", { width: W, height: R, alt: "signature", src: Z }) : /* @__PURE__ */ Y(
1228
+ H(["manual-stored"]) ? /* @__PURE__ */ V("img", { width: z, height: R, alt: "signature", src: Z }) : /* @__PURE__ */ V(
1218
1229
  ut,
1219
1230
  {
1220
1231
  penColor: "#262626",
@@ -1222,13 +1233,13 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
1222
1233
  minWidth: 0.25,
1223
1234
  maxWidth: 2.75,
1224
1235
  throttle: 12,
1225
- canvasProps: { width: +(W || 0).toFixed(), height: +(R || 0).toFixed() },
1226
- ref: (z) => v(z),
1236
+ canvasProps: { width: +(z || 0).toFixed(), height: +(R || 0).toFixed() },
1237
+ ref: ($) => v($),
1227
1238
  clearOnResize: !0,
1228
1239
  onEnd: K
1229
1240
  }
1230
1241
  ),
1231
- H(["manual-stored"]) && /* @__PURE__ */ Y(
1242
+ H(["manual-stored"]) && /* @__PURE__ */ V(
1232
1243
  ie,
1233
1244
  {
1234
1245
  blurAfterClick: !0,
@@ -1243,8 +1254,8 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
1243
1254
  }
1244
1255
  ),
1245
1256
  H(["manual-blank", "manual-drawn"]) && /* @__PURE__ */ te("div", { className: U.Footer, children: [
1246
- /* @__PURE__ */ Y(we, { fullWidth: !0, blurAfterClick: !0, text: "Abbrechen", color: "tertiary", onClick: P }),
1247
- /* @__PURE__ */ Y(
1257
+ /* @__PURE__ */ V(we, { fullWidth: !0, blurAfterClick: !0, text: "Abbrechen", color: "tertiary", onClick: P }),
1258
+ /* @__PURE__ */ V(
1248
1259
  we,
1249
1260
  {
1250
1261
  fullWidth: !0,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arthurzakharov/ui-kit",
3
3
  "private": false,
4
- "version": "1.7.9",
4
+ "version": "1.8.0",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",