@arthurzakharov/ui-kit 1.8.2 → 1.8.4
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,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { useResizeObserver as
|
|
1
|
+
import { jsxs as Q, jsx as U } from "react/jsx-runtime";
|
|
2
|
+
import We, { useRef as ze, useState as oe, useCallback as ee, useEffect as xe } from "react";
|
|
3
|
+
import { useResizeObserver as Ne } from "usehooks-ts";
|
|
4
4
|
import { RefreshCw as Fe, RotateCcw as qe, Check as Be } from "lucide-react";
|
|
5
|
-
import
|
|
6
|
-
import { Button as
|
|
5
|
+
import fe from "clsx";
|
|
6
|
+
import { Button as Pe } from "../../controls/buttons/button/button.component.js";
|
|
7
7
|
import "../../controls/primitives/box/box.component.js";
|
|
8
|
-
import { baseProps as
|
|
8
|
+
import { baseProps as we } from "../../utils/functions/functions.util.js";
|
|
9
9
|
import { ButtonText as ie } from "../../controls/buttons/button-text/button-text.component.js";
|
|
10
10
|
import { Loader as Ue } from "../loader/loader.component.js";
|
|
11
11
|
import '../../assets/signature-CYVRZH6h.css';function He(e) {
|
|
@@ -13,21 +13,21 @@ import '../../assets/signature-CYVRZH6h.css';function He(e) {
|
|
|
13
13
|
}
|
|
14
14
|
function Ye(e) {
|
|
15
15
|
if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
|
|
16
|
-
var
|
|
17
|
-
if (typeof
|
|
16
|
+
var a = e.default;
|
|
17
|
+
if (typeof a == "function") {
|
|
18
18
|
var r = function t() {
|
|
19
|
-
var
|
|
19
|
+
var n = !1;
|
|
20
20
|
try {
|
|
21
|
-
|
|
21
|
+
n = this instanceof t;
|
|
22
22
|
} catch {
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return n ? Reflect.construct(a, arguments, this.constructor) : a.apply(this, arguments);
|
|
25
25
|
};
|
|
26
|
-
r.prototype =
|
|
26
|
+
r.prototype = a.prototype;
|
|
27
27
|
} else r = {};
|
|
28
28
|
return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(e).forEach(function(t) {
|
|
29
|
-
var
|
|
30
|
-
Object.defineProperty(r, t,
|
|
29
|
+
var n = Object.getOwnPropertyDescriptor(e, t);
|
|
30
|
+
Object.defineProperty(r, t, n.get ? n : {
|
|
31
31
|
enumerable: !0,
|
|
32
32
|
get: function() {
|
|
33
33
|
return e[t];
|
|
@@ -36,539 +36,539 @@ function Ye(e) {
|
|
|
36
36
|
}), r;
|
|
37
37
|
}
|
|
38
38
|
var ce = { exports: {} }, se = { exports: {} }, ue = { exports: {} }, I = {};
|
|
39
|
-
var
|
|
39
|
+
var Ee;
|
|
40
40
|
function Ve() {
|
|
41
|
-
if (
|
|
42
|
-
|
|
43
|
-
var e = typeof Symbol == "function" && Symbol.for,
|
|
44
|
-
function
|
|
41
|
+
if (Ee) return I;
|
|
42
|
+
Ee = 1;
|
|
43
|
+
var e = typeof Symbol == "function" && Symbol.for, a = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, n = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, i = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, c = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, o = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, v = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, u = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, l = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, d = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, m = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, b = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, P = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, _ = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, x = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, g = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, F = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
44
|
+
function $(f) {
|
|
45
45
|
if (typeof f == "object" && f !== null) {
|
|
46
|
-
var
|
|
47
|
-
switch (
|
|
48
|
-
case
|
|
46
|
+
var Z = f.$$typeof;
|
|
47
|
+
switch (Z) {
|
|
48
|
+
case a:
|
|
49
49
|
switch (f = f.type, f) {
|
|
50
|
-
case d:
|
|
51
|
-
case s:
|
|
52
|
-
case t:
|
|
53
|
-
case o:
|
|
54
|
-
case a:
|
|
55
50
|
case v:
|
|
51
|
+
case u:
|
|
52
|
+
case t:
|
|
53
|
+
case i:
|
|
54
|
+
case n:
|
|
55
|
+
case d:
|
|
56
56
|
return f;
|
|
57
57
|
default:
|
|
58
58
|
switch (f = f && f.$$typeof, f) {
|
|
59
|
-
case
|
|
60
|
-
case u:
|
|
61
|
-
case x:
|
|
62
|
-
case b:
|
|
59
|
+
case o:
|
|
63
60
|
case l:
|
|
61
|
+
case P:
|
|
62
|
+
case b:
|
|
63
|
+
case c:
|
|
64
64
|
return f;
|
|
65
65
|
default:
|
|
66
|
-
return
|
|
66
|
+
return Z;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
case r:
|
|
70
|
-
return
|
|
70
|
+
return Z;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
return
|
|
74
|
+
function A(f) {
|
|
75
|
+
return $(f) === u;
|
|
76
76
|
}
|
|
77
|
-
return I.AsyncMode =
|
|
78
|
-
return
|
|
79
|
-
}, I.isConcurrentMode =
|
|
80
|
-
return
|
|
77
|
+
return I.AsyncMode = v, I.ConcurrentMode = u, I.ContextConsumer = o, I.ContextProvider = c, I.Element = a, I.ForwardRef = l, I.Fragment = t, I.Lazy = P, I.Memo = b, I.Portal = r, I.Profiler = i, I.StrictMode = n, I.Suspense = d, I.isAsyncMode = function(f) {
|
|
78
|
+
return A(f) || $(f) === v;
|
|
79
|
+
}, I.isConcurrentMode = A, I.isContextConsumer = function(f) {
|
|
80
|
+
return $(f) === o;
|
|
81
81
|
}, I.isContextProvider = function(f) {
|
|
82
|
-
return
|
|
82
|
+
return $(f) === c;
|
|
83
83
|
}, I.isElement = function(f) {
|
|
84
|
-
return typeof f == "object" && f !== null && f.$$typeof ===
|
|
84
|
+
return typeof f == "object" && f !== null && f.$$typeof === a;
|
|
85
85
|
}, I.isForwardRef = function(f) {
|
|
86
|
-
return
|
|
86
|
+
return $(f) === l;
|
|
87
87
|
}, I.isFragment = function(f) {
|
|
88
|
-
return
|
|
88
|
+
return $(f) === t;
|
|
89
89
|
}, I.isLazy = function(f) {
|
|
90
|
-
return
|
|
90
|
+
return $(f) === P;
|
|
91
91
|
}, I.isMemo = function(f) {
|
|
92
|
-
return
|
|
92
|
+
return $(f) === b;
|
|
93
93
|
}, I.isPortal = function(f) {
|
|
94
|
-
return
|
|
94
|
+
return $(f) === r;
|
|
95
95
|
}, I.isProfiler = function(f) {
|
|
96
|
-
return
|
|
96
|
+
return $(f) === i;
|
|
97
97
|
}, I.isStrictMode = function(f) {
|
|
98
|
-
return
|
|
98
|
+
return $(f) === n;
|
|
99
99
|
}, I.isSuspense = function(f) {
|
|
100
|
-
return
|
|
100
|
+
return $(f) === d;
|
|
101
101
|
}, I.isValidElementType = function(f) {
|
|
102
|
-
return typeof f == "string" || typeof f == "function" || f === t || f ===
|
|
103
|
-
}, I.typeOf =
|
|
102
|
+
return typeof f == "string" || typeof f == "function" || f === t || f === u || f === i || f === n || f === d || f === m || typeof f == "object" && f !== null && (f.$$typeof === P || f.$$typeof === b || f.$$typeof === c || f.$$typeof === o || f.$$typeof === l || f.$$typeof === x || f.$$typeof === g || f.$$typeof === F || f.$$typeof === _);
|
|
103
|
+
}, I.typeOf = $, I;
|
|
104
104
|
}
|
|
105
105
|
var L = {};
|
|
106
|
-
var
|
|
106
|
+
var Te;
|
|
107
107
|
function Xe() {
|
|
108
|
-
return
|
|
109
|
-
var e = typeof Symbol == "function" && Symbol.for,
|
|
110
|
-
function
|
|
108
|
+
return Te || (Te = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
109
|
+
var e = typeof Symbol == "function" && Symbol.for, a = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, n = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, i = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, c = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, o = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, v = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, u = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, l = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, d = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, m = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, b = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, P = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, _ = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, x = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, g = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, F = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
110
|
+
function $(p) {
|
|
111
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 ===
|
|
112
|
+
p === t || p === u || p === i || p === n || p === d || p === m || typeof p == "object" && p !== null && (p.$$typeof === P || p.$$typeof === b || p.$$typeof === c || p.$$typeof === o || p.$$typeof === l || p.$$typeof === x || p.$$typeof === g || p.$$typeof === F || p.$$typeof === _);
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function A(p) {
|
|
115
115
|
if (typeof p == "object" && p !== null) {
|
|
116
|
-
var
|
|
117
|
-
switch (
|
|
118
|
-
case
|
|
116
|
+
var G = p.$$typeof;
|
|
117
|
+
switch (G) {
|
|
118
|
+
case a:
|
|
119
119
|
var ae = p.type;
|
|
120
120
|
switch (ae) {
|
|
121
|
-
case d:
|
|
122
|
-
case s:
|
|
123
|
-
case t:
|
|
124
|
-
case o:
|
|
125
|
-
case a:
|
|
126
121
|
case v:
|
|
122
|
+
case u:
|
|
123
|
+
case t:
|
|
124
|
+
case i:
|
|
125
|
+
case n:
|
|
126
|
+
case d:
|
|
127
127
|
return ae;
|
|
128
128
|
default:
|
|
129
|
-
var
|
|
130
|
-
switch (
|
|
131
|
-
case
|
|
132
|
-
case u:
|
|
133
|
-
case x:
|
|
134
|
-
case b:
|
|
129
|
+
var be = ae && ae.$$typeof;
|
|
130
|
+
switch (be) {
|
|
131
|
+
case o:
|
|
135
132
|
case l:
|
|
136
|
-
|
|
133
|
+
case P:
|
|
134
|
+
case b:
|
|
135
|
+
case c:
|
|
136
|
+
return be;
|
|
137
137
|
default:
|
|
138
|
-
return
|
|
138
|
+
return G;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
case r:
|
|
142
|
-
return
|
|
142
|
+
return G;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
var f =
|
|
146
|
+
var f = v, Z = u, te = o, K = c, R = a, w = l, M = t, N = P, y = b, Y = r, ne = i, V = n, X = d, q = !1;
|
|
147
147
|
function J(p) {
|
|
148
|
-
return
|
|
148
|
+
return q || (q = !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(p) || A(p) === v;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
151
|
-
return
|
|
150
|
+
function s(p) {
|
|
151
|
+
return A(p) === u;
|
|
152
152
|
}
|
|
153
153
|
function h(p) {
|
|
154
|
-
return
|
|
154
|
+
return A(p) === o;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
return
|
|
156
|
+
function E(p) {
|
|
157
|
+
return A(p) === c;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
return typeof p == "object" && p !== null && p.$$typeof ===
|
|
159
|
+
function C(p) {
|
|
160
|
+
return typeof p == "object" && p !== null && p.$$typeof === a;
|
|
161
161
|
}
|
|
162
|
-
function
|
|
163
|
-
return
|
|
162
|
+
function T(p) {
|
|
163
|
+
return A(p) === l;
|
|
164
164
|
}
|
|
165
|
-
function
|
|
166
|
-
return
|
|
165
|
+
function D(p) {
|
|
166
|
+
return A(p) === t;
|
|
167
167
|
}
|
|
168
168
|
function S(p) {
|
|
169
|
-
return
|
|
169
|
+
return A(p) === P;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
return
|
|
171
|
+
function O(p) {
|
|
172
|
+
return A(p) === b;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
return
|
|
174
|
+
function k(p) {
|
|
175
|
+
return A(p) === r;
|
|
176
176
|
}
|
|
177
177
|
function W(p) {
|
|
178
|
-
return
|
|
178
|
+
return A(p) === i;
|
|
179
179
|
}
|
|
180
|
-
function
|
|
181
|
-
return
|
|
180
|
+
function j(p) {
|
|
181
|
+
return A(p) === n;
|
|
182
182
|
}
|
|
183
|
-
function
|
|
184
|
-
return
|
|
183
|
+
function H(p) {
|
|
184
|
+
return A(p) === d;
|
|
185
185
|
}
|
|
186
|
-
L.AsyncMode = f, L.ConcurrentMode =
|
|
186
|
+
L.AsyncMode = f, L.ConcurrentMode = Z, L.ContextConsumer = te, L.ContextProvider = K, L.Element = R, L.ForwardRef = w, L.Fragment = M, L.Lazy = N, L.Memo = y, L.Portal = Y, L.Profiler = ne, L.StrictMode = V, L.Suspense = X, L.isAsyncMode = J, L.isConcurrentMode = s, L.isContextConsumer = h, L.isContextProvider = E, L.isElement = C, L.isForwardRef = T, L.isFragment = D, L.isLazy = S, L.isMemo = O, L.isPortal = k, L.isProfiler = W, L.isStrictMode = j, L.isSuspense = H, L.isValidElementType = $, L.typeOf = A;
|
|
187
187
|
})()), L;
|
|
188
188
|
}
|
|
189
|
-
var
|
|
190
|
-
function
|
|
191
|
-
return
|
|
189
|
+
var Se;
|
|
190
|
+
function Le() {
|
|
191
|
+
return Se || (Se = 1, process.env.NODE_ENV === "production" ? ue.exports = Ve() : ue.exports = Xe()), ue.exports;
|
|
192
192
|
}
|
|
193
|
-
var
|
|
193
|
+
var de, Ce;
|
|
194
194
|
function Je() {
|
|
195
|
-
if (Ce) return
|
|
195
|
+
if (Ce) return de;
|
|
196
196
|
Ce = 1;
|
|
197
|
-
var e = Object.getOwnPropertySymbols,
|
|
198
|
-
function t(
|
|
199
|
-
if (
|
|
197
|
+
var e = Object.getOwnPropertySymbols, a = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
|
|
198
|
+
function t(i) {
|
|
199
|
+
if (i == null)
|
|
200
200
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
201
|
-
return Object(
|
|
201
|
+
return Object(i);
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function n() {
|
|
204
204
|
try {
|
|
205
205
|
if (!Object.assign)
|
|
206
206
|
return !1;
|
|
207
|
-
var
|
|
208
|
-
if (
|
|
207
|
+
var i = new String("abc");
|
|
208
|
+
if (i[5] = "de", Object.getOwnPropertyNames(i)[0] === "5")
|
|
209
209
|
return !1;
|
|
210
|
-
for (var
|
|
211
|
-
|
|
212
|
-
var
|
|
213
|
-
return l
|
|
210
|
+
for (var c = {}, o = 0; o < 10; o++)
|
|
211
|
+
c["_" + String.fromCharCode(o)] = o;
|
|
212
|
+
var v = Object.getOwnPropertyNames(c).map(function(l) {
|
|
213
|
+
return c[l];
|
|
214
214
|
});
|
|
215
|
-
if (
|
|
215
|
+
if (v.join("") !== "0123456789")
|
|
216
216
|
return !1;
|
|
217
|
-
var
|
|
218
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
219
|
-
|
|
220
|
-
}), Object.keys(Object.assign({},
|
|
217
|
+
var u = {};
|
|
218
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(l) {
|
|
219
|
+
u[l] = l;
|
|
220
|
+
}), Object.keys(Object.assign({}, u)).join("") === "abcdefghijklmnopqrst";
|
|
221
221
|
} catch {
|
|
222
222
|
return !1;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
return
|
|
226
|
-
for (var
|
|
227
|
-
|
|
228
|
-
for (var
|
|
229
|
-
|
|
225
|
+
return de = n() ? Object.assign : function(i, c) {
|
|
226
|
+
for (var o, v = t(i), u, l = 1; l < arguments.length; l++) {
|
|
227
|
+
o = Object(arguments[l]);
|
|
228
|
+
for (var d in o)
|
|
229
|
+
a.call(o, d) && (v[d] = o[d]);
|
|
230
230
|
if (e) {
|
|
231
|
-
|
|
232
|
-
for (var
|
|
233
|
-
r.call(
|
|
231
|
+
u = e(o);
|
|
232
|
+
for (var m = 0; m < u.length; m++)
|
|
233
|
+
r.call(o, u[m]) && (v[u[m]] = o[u[m]]);
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
return
|
|
237
|
-
},
|
|
236
|
+
return v;
|
|
237
|
+
}, de;
|
|
238
238
|
}
|
|
239
|
-
var
|
|
240
|
-
function
|
|
241
|
-
if (
|
|
242
|
-
|
|
239
|
+
var he, Oe;
|
|
240
|
+
function _e() {
|
|
241
|
+
if (Oe) return he;
|
|
242
|
+
Oe = 1;
|
|
243
243
|
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
244
|
-
return
|
|
244
|
+
return he = e, he;
|
|
245
245
|
}
|
|
246
|
-
var
|
|
247
|
-
function
|
|
248
|
-
return Ae || (Ae = 1,
|
|
246
|
+
var pe, Ae;
|
|
247
|
+
function $e() {
|
|
248
|
+
return Ae || (Ae = 1, pe = Function.call.bind(Object.prototype.hasOwnProperty)), pe;
|
|
249
249
|
}
|
|
250
|
-
var
|
|
251
|
-
function
|
|
252
|
-
if (
|
|
253
|
-
|
|
250
|
+
var ve, Re;
|
|
251
|
+
function Ze() {
|
|
252
|
+
if (Re) return ve;
|
|
253
|
+
Re = 1;
|
|
254
254
|
var e = function() {
|
|
255
255
|
};
|
|
256
256
|
if (process.env.NODE_ENV !== "production") {
|
|
257
|
-
var
|
|
258
|
-
e = function(
|
|
259
|
-
var
|
|
260
|
-
typeof console < "u" && console.error(
|
|
257
|
+
var a = /* @__PURE__ */ _e(), r = {}, t = /* @__PURE__ */ $e();
|
|
258
|
+
e = function(i) {
|
|
259
|
+
var c = "Warning: " + i;
|
|
260
|
+
typeof console < "u" && console.error(c);
|
|
261
261
|
try {
|
|
262
|
-
throw new Error(
|
|
262
|
+
throw new Error(c);
|
|
263
263
|
} catch {
|
|
264
264
|
}
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function n(i, c, o, v, u) {
|
|
268
268
|
if (process.env.NODE_ENV !== "production") {
|
|
269
|
-
for (var
|
|
270
|
-
if (t(
|
|
271
|
-
var
|
|
269
|
+
for (var l in i)
|
|
270
|
+
if (t(i, l)) {
|
|
271
|
+
var d;
|
|
272
272
|
try {
|
|
273
|
-
if (typeof
|
|
274
|
-
var
|
|
275
|
-
(
|
|
273
|
+
if (typeof i[l] != "function") {
|
|
274
|
+
var m = Error(
|
|
275
|
+
(v || "React class") + ": " + o + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
276
276
|
);
|
|
277
|
-
throw
|
|
277
|
+
throw m.name = "Invariant Violation", m;
|
|
278
278
|
}
|
|
279
|
-
|
|
280
|
-
} catch (
|
|
281
|
-
|
|
279
|
+
d = i[l](c, l, v, o, null, a);
|
|
280
|
+
} catch (P) {
|
|
281
|
+
d = P;
|
|
282
282
|
}
|
|
283
|
-
if (
|
|
284
|
-
(
|
|
285
|
-
),
|
|
286
|
-
r[
|
|
287
|
-
var b =
|
|
283
|
+
if (d && !(d instanceof Error) && e(
|
|
284
|
+
(v || "React class") + ": type specification of " + o + " `" + l + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof d + ". 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
|
+
), d instanceof Error && !(d.message in r)) {
|
|
286
|
+
r[d.message] = !0;
|
|
287
|
+
var b = u ? u() : "";
|
|
288
288
|
e(
|
|
289
|
-
"Failed " +
|
|
289
|
+
"Failed " + o + " type: " + d.message + (b ?? "")
|
|
290
290
|
);
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
|
-
return
|
|
295
|
+
return n.resetWarningCache = function() {
|
|
296
296
|
process.env.NODE_ENV !== "production" && (r = {});
|
|
297
|
-
},
|
|
297
|
+
}, ve = n, ve;
|
|
298
298
|
}
|
|
299
|
-
var
|
|
300
|
-
function
|
|
301
|
-
if (
|
|
302
|
-
|
|
303
|
-
var e =
|
|
299
|
+
var ye, Me;
|
|
300
|
+
function Ge() {
|
|
301
|
+
if (Me) return ye;
|
|
302
|
+
Me = 1;
|
|
303
|
+
var e = Le(), a = Je(), r = /* @__PURE__ */ _e(), t = /* @__PURE__ */ $e(), n = /* @__PURE__ */ Ze(), i = function() {
|
|
304
304
|
};
|
|
305
|
-
process.env.NODE_ENV !== "production" && (
|
|
306
|
-
var
|
|
307
|
-
typeof console < "u" && console.error(
|
|
305
|
+
process.env.NODE_ENV !== "production" && (i = function(o) {
|
|
306
|
+
var v = "Warning: " + o;
|
|
307
|
+
typeof console < "u" && console.error(v);
|
|
308
308
|
try {
|
|
309
|
-
throw new Error(
|
|
309
|
+
throw new Error(v);
|
|
310
310
|
} catch {
|
|
311
311
|
}
|
|
312
312
|
});
|
|
313
|
-
function
|
|
313
|
+
function c() {
|
|
314
314
|
return null;
|
|
315
315
|
}
|
|
316
|
-
return
|
|
317
|
-
var
|
|
318
|
-
function
|
|
319
|
-
var h =
|
|
316
|
+
return ye = function(o, v) {
|
|
317
|
+
var u = typeof Symbol == "function" && Symbol.iterator, l = "@@iterator";
|
|
318
|
+
function d(s) {
|
|
319
|
+
var h = s && (u && s[u] || s[l]);
|
|
320
320
|
if (typeof h == "function")
|
|
321
321
|
return h;
|
|
322
322
|
}
|
|
323
|
-
var
|
|
324
|
-
array:
|
|
325
|
-
bigint:
|
|
326
|
-
bool:
|
|
327
|
-
func:
|
|
328
|
-
number:
|
|
329
|
-
object:
|
|
330
|
-
string:
|
|
331
|
-
symbol:
|
|
332
|
-
any:
|
|
333
|
-
arrayOf:
|
|
334
|
-
element:
|
|
323
|
+
var m = "<<anonymous>>", b = {
|
|
324
|
+
array: g("array"),
|
|
325
|
+
bigint: g("bigint"),
|
|
326
|
+
bool: g("boolean"),
|
|
327
|
+
func: g("function"),
|
|
328
|
+
number: g("number"),
|
|
329
|
+
object: g("object"),
|
|
330
|
+
string: g("string"),
|
|
331
|
+
symbol: g("symbol"),
|
|
332
|
+
any: F(),
|
|
333
|
+
arrayOf: $,
|
|
334
|
+
element: A(),
|
|
335
335
|
elementType: f(),
|
|
336
|
-
instanceOf:
|
|
337
|
-
node:
|
|
336
|
+
instanceOf: Z,
|
|
337
|
+
node: w(),
|
|
338
338
|
objectOf: K,
|
|
339
|
-
oneOf:
|
|
340
|
-
oneOfType:
|
|
341
|
-
shape:
|
|
342
|
-
exact:
|
|
339
|
+
oneOf: te,
|
|
340
|
+
oneOfType: R,
|
|
341
|
+
shape: N,
|
|
342
|
+
exact: y
|
|
343
343
|
};
|
|
344
|
-
function
|
|
345
|
-
return
|
|
344
|
+
function P(s, h) {
|
|
345
|
+
return s === h ? s !== 0 || 1 / s === 1 / h : s !== s && h !== h;
|
|
346
346
|
}
|
|
347
|
-
function
|
|
348
|
-
this.message =
|
|
347
|
+
function _(s, h) {
|
|
348
|
+
this.message = s, this.data = h && typeof h == "object" ? h : {}, this.stack = "";
|
|
349
349
|
}
|
|
350
|
-
|
|
351
|
-
function
|
|
350
|
+
_.prototype = Error.prototype;
|
|
351
|
+
function x(s) {
|
|
352
352
|
if (process.env.NODE_ENV !== "production")
|
|
353
|
-
var h = {},
|
|
354
|
-
function
|
|
355
|
-
if (
|
|
356
|
-
if (
|
|
353
|
+
var h = {}, E = 0;
|
|
354
|
+
function C(D, S, O, k, W, j, H) {
|
|
355
|
+
if (k = k || m, j = j || O, H !== r) {
|
|
356
|
+
if (v) {
|
|
357
357
|
var p = 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
360
|
throw p.name = "Invariant Violation", p;
|
|
361
361
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
362
|
-
var
|
|
363
|
-
!h[
|
|
364
|
-
|
|
365
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
366
|
-
), h[
|
|
362
|
+
var G = k + ":" + O;
|
|
363
|
+
!h[G] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
364
|
+
E < 3 && (i(
|
|
365
|
+
"You are manually calling a React.PropTypes validation function for the `" + j + "` prop on `" + k + "`. 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, E++);
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
return S[
|
|
369
|
+
return S[O] == null ? D ? S[O] === null ? new _("The " + W + " `" + j + "` is marked as required " + ("in `" + k + "`, but its value is `null`.")) : new _("The " + W + " `" + j + "` is marked as required in " + ("`" + k + "`, but its value is `undefined`.")) : null : s(S, O, k, W, j);
|
|
370
370
|
}
|
|
371
|
-
var
|
|
372
|
-
return
|
|
371
|
+
var T = C.bind(null, !1);
|
|
372
|
+
return T.isRequired = C.bind(null, !0), T;
|
|
373
373
|
}
|
|
374
|
-
function
|
|
375
|
-
function h(
|
|
376
|
-
var
|
|
377
|
-
if (W !==
|
|
378
|
-
var
|
|
379
|
-
return new
|
|
380
|
-
"Invalid " +
|
|
381
|
-
{ expectedType:
|
|
374
|
+
function g(s) {
|
|
375
|
+
function h(E, C, T, D, S, O) {
|
|
376
|
+
var k = E[C], W = V(k);
|
|
377
|
+
if (W !== s) {
|
|
378
|
+
var j = X(k);
|
|
379
|
+
return new _(
|
|
380
|
+
"Invalid " + D + " `" + S + "` of type " + ("`" + j + "` supplied to `" + T + "`, expected ") + ("`" + s + "`."),
|
|
381
|
+
{ expectedType: s }
|
|
382
382
|
);
|
|
383
383
|
}
|
|
384
384
|
return null;
|
|
385
385
|
}
|
|
386
|
-
return
|
|
386
|
+
return x(h);
|
|
387
387
|
}
|
|
388
|
-
function
|
|
389
|
-
return
|
|
388
|
+
function F() {
|
|
389
|
+
return x(c);
|
|
390
390
|
}
|
|
391
|
-
function
|
|
392
|
-
function h(
|
|
393
|
-
if (typeof
|
|
394
|
-
return new
|
|
395
|
-
var
|
|
396
|
-
if (!Array.isArray(
|
|
397
|
-
var
|
|
398
|
-
return new
|
|
391
|
+
function $(s) {
|
|
392
|
+
function h(E, C, T, D, S) {
|
|
393
|
+
if (typeof s != "function")
|
|
394
|
+
return new _("Property `" + S + "` of component `" + T + "` has invalid PropType notation inside arrayOf.");
|
|
395
|
+
var O = E[C];
|
|
396
|
+
if (!Array.isArray(O)) {
|
|
397
|
+
var k = V(O);
|
|
398
|
+
return new _("Invalid " + D + " `" + S + "` of type " + ("`" + k + "` supplied to `" + T + "`, expected an array."));
|
|
399
399
|
}
|
|
400
|
-
for (var W = 0; W <
|
|
401
|
-
var
|
|
402
|
-
if (
|
|
403
|
-
return
|
|
400
|
+
for (var W = 0; W < O.length; W++) {
|
|
401
|
+
var j = s(O, W, T, D, S + "[" + W + "]", r);
|
|
402
|
+
if (j instanceof Error)
|
|
403
|
+
return j;
|
|
404
404
|
}
|
|
405
405
|
return null;
|
|
406
406
|
}
|
|
407
|
-
return
|
|
407
|
+
return x(h);
|
|
408
408
|
}
|
|
409
|
-
function
|
|
410
|
-
function
|
|
411
|
-
var S = h[
|
|
412
|
-
if (!
|
|
413
|
-
var
|
|
414
|
-
return new
|
|
409
|
+
function A() {
|
|
410
|
+
function s(h, E, C, T, D) {
|
|
411
|
+
var S = h[E];
|
|
412
|
+
if (!o(S)) {
|
|
413
|
+
var O = V(S);
|
|
414
|
+
return new _("Invalid " + T + " `" + D + "` of type " + ("`" + O + "` supplied to `" + C + "`, expected a single ReactElement."));
|
|
415
415
|
}
|
|
416
416
|
return null;
|
|
417
417
|
}
|
|
418
|
-
return
|
|
418
|
+
return x(s);
|
|
419
419
|
}
|
|
420
420
|
function f() {
|
|
421
|
-
function
|
|
422
|
-
var S = h[
|
|
421
|
+
function s(h, E, C, T, D) {
|
|
422
|
+
var S = h[E];
|
|
423
423
|
if (!e.isValidElementType(S)) {
|
|
424
|
-
var
|
|
425
|
-
return new
|
|
424
|
+
var O = V(S);
|
|
425
|
+
return new _("Invalid " + T + " `" + D + "` of type " + ("`" + O + "` supplied to `" + C + "`, expected a single ReactElement type."));
|
|
426
426
|
}
|
|
427
427
|
return null;
|
|
428
428
|
}
|
|
429
|
-
return
|
|
429
|
+
return x(s);
|
|
430
430
|
}
|
|
431
|
-
function
|
|
432
|
-
function h(
|
|
433
|
-
if (!(
|
|
434
|
-
var
|
|
435
|
-
return new
|
|
431
|
+
function Z(s) {
|
|
432
|
+
function h(E, C, T, D, S) {
|
|
433
|
+
if (!(E[C] instanceof s)) {
|
|
434
|
+
var O = s.name || m, k = J(E[C]);
|
|
435
|
+
return new _("Invalid " + D + " `" + S + "` of type " + ("`" + k + "` supplied to `" + T + "`, expected ") + ("instance of `" + O + "`."));
|
|
436
436
|
}
|
|
437
437
|
return null;
|
|
438
438
|
}
|
|
439
|
-
return
|
|
439
|
+
return x(h);
|
|
440
440
|
}
|
|
441
|
-
function
|
|
442
|
-
if (!Array.isArray(
|
|
443
|
-
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ?
|
|
441
|
+
function te(s) {
|
|
442
|
+
if (!Array.isArray(s))
|
|
443
|
+
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
|
|
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
|
-
) :
|
|
446
|
-
function h(
|
|
447
|
-
for (var
|
|
448
|
-
if (
|
|
445
|
+
) : i("Invalid argument supplied to oneOf, expected an array.")), c;
|
|
446
|
+
function h(E, C, T, D, S) {
|
|
447
|
+
for (var O = E[C], k = 0; k < s.length; k++)
|
|
448
|
+
if (P(O, s[k]))
|
|
449
449
|
return null;
|
|
450
|
-
var W = JSON.stringify(
|
|
451
|
-
var
|
|
452
|
-
return
|
|
450
|
+
var W = JSON.stringify(s, function(H, p) {
|
|
451
|
+
var G = X(p);
|
|
452
|
+
return G === "symbol" ? String(p) : p;
|
|
453
453
|
});
|
|
454
|
-
return new
|
|
454
|
+
return new _("Invalid " + D + " `" + S + "` of value `" + String(O) + "` " + ("supplied to `" + T + "`, expected one of " + W + "."));
|
|
455
455
|
}
|
|
456
|
-
return
|
|
456
|
+
return x(h);
|
|
457
457
|
}
|
|
458
|
-
function K(
|
|
459
|
-
function h(
|
|
460
|
-
if (typeof
|
|
461
|
-
return new
|
|
462
|
-
var
|
|
463
|
-
if (
|
|
464
|
-
return new
|
|
465
|
-
for (var W in
|
|
466
|
-
if (t(
|
|
467
|
-
var
|
|
468
|
-
if (
|
|
469
|
-
return
|
|
458
|
+
function K(s) {
|
|
459
|
+
function h(E, C, T, D, S) {
|
|
460
|
+
if (typeof s != "function")
|
|
461
|
+
return new _("Property `" + S + "` of component `" + T + "` has invalid PropType notation inside objectOf.");
|
|
462
|
+
var O = E[C], k = V(O);
|
|
463
|
+
if (k !== "object")
|
|
464
|
+
return new _("Invalid " + D + " `" + S + "` of type " + ("`" + k + "` supplied to `" + T + "`, expected an object."));
|
|
465
|
+
for (var W in O)
|
|
466
|
+
if (t(O, W)) {
|
|
467
|
+
var j = s(O, W, T, D, S + "." + W, r);
|
|
468
|
+
if (j instanceof Error)
|
|
469
|
+
return j;
|
|
470
470
|
}
|
|
471
471
|
return null;
|
|
472
472
|
}
|
|
473
|
-
return
|
|
473
|
+
return x(h);
|
|
474
474
|
}
|
|
475
|
-
function
|
|
476
|
-
if (!Array.isArray(
|
|
477
|
-
return process.env.NODE_ENV !== "production" &&
|
|
478
|
-
for (var h = 0; h <
|
|
479
|
-
var
|
|
480
|
-
if (typeof
|
|
481
|
-
return
|
|
482
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " +
|
|
483
|
-
),
|
|
475
|
+
function R(s) {
|
|
476
|
+
if (!Array.isArray(s))
|
|
477
|
+
return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), c;
|
|
478
|
+
for (var h = 0; h < s.length; h++) {
|
|
479
|
+
var E = s[h];
|
|
480
|
+
if (typeof E != "function")
|
|
481
|
+
return i(
|
|
482
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + q(E) + " at index " + h + "."
|
|
483
|
+
), c;
|
|
484
484
|
}
|
|
485
|
-
function
|
|
486
|
-
for (var W = [],
|
|
487
|
-
var
|
|
485
|
+
function C(T, D, S, O, k) {
|
|
486
|
+
for (var W = [], j = 0; j < s.length; j++) {
|
|
487
|
+
var H = s[j], p = H(T, D, S, O, k, r);
|
|
488
488
|
if (p == null)
|
|
489
489
|
return null;
|
|
490
490
|
p.data && t(p.data, "expectedType") && W.push(p.data.expectedType);
|
|
491
491
|
}
|
|
492
|
-
var
|
|
493
|
-
return new
|
|
492
|
+
var G = W.length > 0 ? ", expected one of type [" + W.join(", ") + "]" : "";
|
|
493
|
+
return new _("Invalid " + O + " `" + k + "` supplied to " + ("`" + S + "`" + G + "."));
|
|
494
494
|
}
|
|
495
|
-
return
|
|
495
|
+
return x(C);
|
|
496
496
|
}
|
|
497
|
-
function
|
|
498
|
-
function
|
|
499
|
-
return
|
|
497
|
+
function w() {
|
|
498
|
+
function s(h, E, C, T, D) {
|
|
499
|
+
return Y(h[E]) ? null : new _("Invalid " + T + " `" + D + "` supplied to " + ("`" + C + "`, expected a ReactNode."));
|
|
500
500
|
}
|
|
501
|
-
return
|
|
501
|
+
return x(s);
|
|
502
502
|
}
|
|
503
|
-
function
|
|
504
|
-
return new
|
|
505
|
-
(
|
|
503
|
+
function M(s, h, E, C, T) {
|
|
504
|
+
return new _(
|
|
505
|
+
(s || "React class") + ": " + h + " type `" + E + "." + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + T + "`."
|
|
506
506
|
);
|
|
507
507
|
}
|
|
508
|
-
function
|
|
509
|
-
function h(
|
|
510
|
-
var
|
|
511
|
-
if (
|
|
512
|
-
return new
|
|
513
|
-
for (var W in
|
|
514
|
-
var
|
|
515
|
-
if (typeof
|
|
516
|
-
return
|
|
517
|
-
var
|
|
518
|
-
if (
|
|
519
|
-
return
|
|
508
|
+
function N(s) {
|
|
509
|
+
function h(E, C, T, D, S) {
|
|
510
|
+
var O = E[C], k = V(O);
|
|
511
|
+
if (k !== "object")
|
|
512
|
+
return new _("Invalid " + D + " `" + S + "` of type `" + k + "` " + ("supplied to `" + T + "`, expected `object`."));
|
|
513
|
+
for (var W in s) {
|
|
514
|
+
var j = s[W];
|
|
515
|
+
if (typeof j != "function")
|
|
516
|
+
return M(T, D, S, W, X(j));
|
|
517
|
+
var H = j(O, W, T, D, S + "." + W, r);
|
|
518
|
+
if (H)
|
|
519
|
+
return H;
|
|
520
520
|
}
|
|
521
521
|
return null;
|
|
522
522
|
}
|
|
523
|
-
return
|
|
523
|
+
return x(h);
|
|
524
524
|
}
|
|
525
|
-
function
|
|
526
|
-
function h(
|
|
527
|
-
var
|
|
528
|
-
if (
|
|
529
|
-
return new
|
|
530
|
-
var W =
|
|
531
|
-
for (var
|
|
532
|
-
var
|
|
533
|
-
if (t(
|
|
534
|
-
return
|
|
535
|
-
if (!
|
|
536
|
-
return new
|
|
537
|
-
"Invalid " +
|
|
538
|
-
Valid keys: ` + JSON.stringify(Object.keys(
|
|
525
|
+
function y(s) {
|
|
526
|
+
function h(E, C, T, D, S) {
|
|
527
|
+
var O = E[C], k = V(O);
|
|
528
|
+
if (k !== "object")
|
|
529
|
+
return new _("Invalid " + D + " `" + S + "` of type `" + k + "` " + ("supplied to `" + T + "`, expected `object`."));
|
|
530
|
+
var W = a({}, E[C], s);
|
|
531
|
+
for (var j in W) {
|
|
532
|
+
var H = s[j];
|
|
533
|
+
if (t(s, j) && typeof H != "function")
|
|
534
|
+
return M(T, D, S, j, X(H));
|
|
535
|
+
if (!H)
|
|
536
|
+
return new _(
|
|
537
|
+
"Invalid " + D + " `" + S + "` key `" + j + "` supplied to `" + T + "`.\nBad object: " + JSON.stringify(E[C], null, " ") + `
|
|
538
|
+
Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
|
|
539
539
|
);
|
|
540
|
-
var p =
|
|
540
|
+
var p = H(O, j, T, D, S + "." + j, r);
|
|
541
541
|
if (p)
|
|
542
542
|
return p;
|
|
543
543
|
}
|
|
544
544
|
return null;
|
|
545
545
|
}
|
|
546
|
-
return
|
|
546
|
+
return x(h);
|
|
547
547
|
}
|
|
548
|
-
function
|
|
549
|
-
switch (typeof
|
|
548
|
+
function Y(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 !
|
|
555
|
+
return !s;
|
|
556
556
|
case "object":
|
|
557
|
-
if (Array.isArray(
|
|
558
|
-
return
|
|
559
|
-
if (
|
|
557
|
+
if (Array.isArray(s))
|
|
558
|
+
return s.every(Y);
|
|
559
|
+
if (s === null || o(s))
|
|
560
560
|
return !0;
|
|
561
|
-
var h =
|
|
561
|
+
var h = d(s);
|
|
562
562
|
if (h) {
|
|
563
|
-
var
|
|
564
|
-
if (h !==
|
|
565
|
-
for (; !(
|
|
566
|
-
if (!
|
|
563
|
+
var E = h.call(s), C;
|
|
564
|
+
if (h !== s.entries) {
|
|
565
|
+
for (; !(C = E.next()).done; )
|
|
566
|
+
if (!Y(C.value))
|
|
567
567
|
return !1;
|
|
568
568
|
} else
|
|
569
|
-
for (; !(
|
|
570
|
-
var
|
|
571
|
-
if (
|
|
569
|
+
for (; !(C = E.next()).done; ) {
|
|
570
|
+
var T = C.value;
|
|
571
|
+
if (T && !Y(T[1]))
|
|
572
572
|
return !1;
|
|
573
573
|
}
|
|
574
574
|
} else
|
|
@@ -578,27 +578,27 @@ Valid keys: ` + JSON.stringify(Object.keys(i), null, " ")
|
|
|
578
578
|
return !1;
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
function
|
|
582
|
-
return
|
|
581
|
+
function ne(s, h) {
|
|
582
|
+
return s === "symbol" ? !0 : h ? h["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && h instanceof Symbol : !1;
|
|
583
583
|
}
|
|
584
|
-
function
|
|
585
|
-
var h = typeof
|
|
586
|
-
return Array.isArray(
|
|
584
|
+
function V(s) {
|
|
585
|
+
var h = typeof s;
|
|
586
|
+
return Array.isArray(s) ? "array" : s instanceof RegExp ? "object" : ne(h, s) ? "symbol" : h;
|
|
587
587
|
}
|
|
588
|
-
function
|
|
589
|
-
if (typeof
|
|
590
|
-
return "" +
|
|
591
|
-
var h =
|
|
588
|
+
function X(s) {
|
|
589
|
+
if (typeof s > "u" || s === null)
|
|
590
|
+
return "" + s;
|
|
591
|
+
var h = V(s);
|
|
592
592
|
if (h === "object") {
|
|
593
|
-
if (
|
|
593
|
+
if (s instanceof Date)
|
|
594
594
|
return "date";
|
|
595
|
-
if (
|
|
595
|
+
if (s instanceof RegExp)
|
|
596
596
|
return "regexp";
|
|
597
597
|
}
|
|
598
598
|
return h;
|
|
599
599
|
}
|
|
600
|
-
function
|
|
601
|
-
var h =
|
|
600
|
+
function q(s) {
|
|
601
|
+
var h = X(s);
|
|
602
602
|
switch (h) {
|
|
603
603
|
case "array":
|
|
604
604
|
case "object":
|
|
@@ -611,35 +611,35 @@ Valid keys: ` + JSON.stringify(Object.keys(i), null, " ")
|
|
|
611
611
|
return h;
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
-
function J(
|
|
615
|
-
return !
|
|
614
|
+
function J(s) {
|
|
615
|
+
return !s.constructor || !s.constructor.name ? m : s.constructor.name;
|
|
616
616
|
}
|
|
617
|
-
return b.checkPropTypes =
|
|
618
|
-
},
|
|
617
|
+
return b.checkPropTypes = n, b.resetWarningCache = n.resetWarningCache, b.PropTypes = b, b;
|
|
618
|
+
}, ye;
|
|
619
619
|
}
|
|
620
|
-
var
|
|
620
|
+
var me, De;
|
|
621
621
|
function Ke() {
|
|
622
|
-
if (
|
|
623
|
-
|
|
624
|
-
var e = /* @__PURE__ */
|
|
625
|
-
function
|
|
622
|
+
if (De) return me;
|
|
623
|
+
De = 1;
|
|
624
|
+
var e = /* @__PURE__ */ _e();
|
|
625
|
+
function a() {
|
|
626
626
|
}
|
|
627
627
|
function r() {
|
|
628
628
|
}
|
|
629
|
-
return r.resetWarningCache =
|
|
630
|
-
function t(
|
|
631
|
-
if (
|
|
632
|
-
var
|
|
629
|
+
return r.resetWarningCache = a, me = function() {
|
|
630
|
+
function t(c, o, v, u, l, d) {
|
|
631
|
+
if (d !== e) {
|
|
632
|
+
var m = 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"
|
|
634
634
|
);
|
|
635
|
-
throw
|
|
635
|
+
throw m.name = "Invariant Violation", m;
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
638
|
t.isRequired = t;
|
|
639
|
-
function
|
|
639
|
+
function n() {
|
|
640
640
|
return t;
|
|
641
641
|
}
|
|
642
|
-
var
|
|
642
|
+
var i = {
|
|
643
643
|
array: t,
|
|
644
644
|
bigint: t,
|
|
645
645
|
bool: t,
|
|
@@ -649,117 +649,117 @@ function Ke() {
|
|
|
649
649
|
string: t,
|
|
650
650
|
symbol: t,
|
|
651
651
|
any: t,
|
|
652
|
-
arrayOf:
|
|
652
|
+
arrayOf: n,
|
|
653
653
|
element: t,
|
|
654
654
|
elementType: t,
|
|
655
|
-
instanceOf:
|
|
655
|
+
instanceOf: n,
|
|
656
656
|
node: t,
|
|
657
|
-
objectOf:
|
|
658
|
-
oneOf:
|
|
659
|
-
oneOfType:
|
|
660
|
-
shape:
|
|
661
|
-
exact:
|
|
657
|
+
objectOf: n,
|
|
658
|
+
oneOf: n,
|
|
659
|
+
oneOfType: n,
|
|
660
|
+
shape: n,
|
|
661
|
+
exact: n,
|
|
662
662
|
checkPropTypes: r,
|
|
663
|
-
resetWarningCache:
|
|
663
|
+
resetWarningCache: a
|
|
664
664
|
};
|
|
665
|
-
return
|
|
666
|
-
},
|
|
665
|
+
return i.PropTypes = i, i;
|
|
666
|
+
}, me;
|
|
667
667
|
}
|
|
668
|
-
var
|
|
668
|
+
var ke;
|
|
669
669
|
function Qe() {
|
|
670
|
-
if (
|
|
671
|
-
if (
|
|
672
|
-
var e =
|
|
673
|
-
se.exports = /* @__PURE__ */
|
|
670
|
+
if (ke) return se.exports;
|
|
671
|
+
if (ke = 1, process.env.NODE_ENV !== "production") {
|
|
672
|
+
var e = Le(), a = !0;
|
|
673
|
+
se.exports = /* @__PURE__ */ Ge()(e.isElement, a);
|
|
674
674
|
} else
|
|
675
675
|
se.exports = /* @__PURE__ */ Ke()();
|
|
676
676
|
return se.exports;
|
|
677
677
|
}
|
|
678
|
-
function
|
|
679
|
-
this.x = e, this.y =
|
|
678
|
+
function re(e, a, r) {
|
|
679
|
+
this.x = e, this.y = a, this.time = r || (/* @__PURE__ */ new Date()).getTime();
|
|
680
680
|
}
|
|
681
|
-
|
|
681
|
+
re.prototype.velocityFrom = function(e) {
|
|
682
682
|
return this.time !== e.time ? this.distanceTo(e) / (this.time - e.time) : 1;
|
|
683
683
|
};
|
|
684
|
-
|
|
684
|
+
re.prototype.distanceTo = function(e) {
|
|
685
685
|
return Math.sqrt(Math.pow(this.x - e.x, 2) + Math.pow(this.y - e.y, 2));
|
|
686
686
|
};
|
|
687
|
-
|
|
687
|
+
re.prototype.equals = function(e) {
|
|
688
688
|
return this.x === e.x && this.y === e.y && this.time === e.time;
|
|
689
689
|
};
|
|
690
|
-
function
|
|
691
|
-
this.startPoint = e, this.control1 =
|
|
690
|
+
function ge(e, a, r, t) {
|
|
691
|
+
this.startPoint = e, this.control1 = a, this.control2 = r, this.endPoint = t;
|
|
692
692
|
}
|
|
693
|
-
|
|
694
|
-
for (var e = 10,
|
|
695
|
-
var
|
|
696
|
-
if (
|
|
697
|
-
var
|
|
698
|
-
|
|
693
|
+
ge.prototype.length = function() {
|
|
694
|
+
for (var e = 10, a = 0, r = void 0, t = void 0, n = 0; n <= e; n += 1) {
|
|
695
|
+
var i = n / e, c = this._point(i, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x), o = this._point(i, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y);
|
|
696
|
+
if (n > 0) {
|
|
697
|
+
var v = c - r, u = o - t;
|
|
698
|
+
a += Math.sqrt(v * v + u * u);
|
|
699
699
|
}
|
|
700
|
-
r =
|
|
700
|
+
r = c, t = o;
|
|
701
701
|
}
|
|
702
|
-
return
|
|
702
|
+
return a;
|
|
703
703
|
};
|
|
704
|
-
|
|
705
|
-
return
|
|
704
|
+
ge.prototype._point = function(e, a, r, t, n) {
|
|
705
|
+
return a * (1 - e) * (1 - e) * (1 - e) + 3 * r * (1 - e) * (1 - e) * e + 3 * t * (1 - e) * e * e + n * e * e * e;
|
|
706
706
|
};
|
|
707
|
-
function et(e,
|
|
708
|
-
var t,
|
|
707
|
+
function et(e, a, r) {
|
|
708
|
+
var t, n, i, c = null, o = 0;
|
|
709
709
|
r || (r = {});
|
|
710
|
-
var
|
|
711
|
-
|
|
710
|
+
var v = function() {
|
|
711
|
+
o = r.leading === !1 ? 0 : Date.now(), c = null, i = e.apply(t, n), c || (t = n = null);
|
|
712
712
|
};
|
|
713
713
|
return function() {
|
|
714
|
-
var
|
|
715
|
-
!
|
|
716
|
-
var
|
|
717
|
-
return t = this,
|
|
714
|
+
var u = Date.now();
|
|
715
|
+
!o && r.leading === !1 && (o = u);
|
|
716
|
+
var l = a - (u - o);
|
|
717
|
+
return t = this, n = arguments, l <= 0 || l > a ? (c && (clearTimeout(c), c = null), o = u, i = e.apply(t, n), c || (t = n = null)) : !c && r.trailing !== !1 && (c = setTimeout(v, l)), i;
|
|
718
718
|
};
|
|
719
719
|
}
|
|
720
|
-
function z(e,
|
|
721
|
-
var r = this, t =
|
|
720
|
+
function z(e, a) {
|
|
721
|
+
var r = this, t = a || {};
|
|
722
722
|
this.velocityFilterWeight = t.velocityFilterWeight || 0.7, this.minWidth = t.minWidth || 0.5, this.maxWidth = t.maxWidth || 2.5, this.throttle = "throttle" in t ? t.throttle : 16, this.minDistance = "minDistance" in t ? t.minDistance : 5, this.throttle ? this._strokeMoveUpdate = et(z.prototype._strokeUpdate, this.throttle) : this._strokeMoveUpdate = z.prototype._strokeUpdate, this.dotSize = t.dotSize || function() {
|
|
723
723
|
return (this.minWidth + this.maxWidth) / 2;
|
|
724
|
-
}, this.penColor = t.penColor || "black", this.backgroundColor = t.backgroundColor || "rgba(0,0,0,0)", this.onBegin = t.onBegin, this.onEnd = t.onEnd, this._canvas = e, this._ctx = e.getContext("2d"), this.clear(), this._handleMouseDown = function(
|
|
725
|
-
|
|
726
|
-
}, this._handleMouseMove = function(
|
|
727
|
-
r._mouseButtonDown && r._strokeMoveUpdate(
|
|
728
|
-
}, this._handleMouseUp = function(
|
|
729
|
-
|
|
730
|
-
}, this._handleTouchStart = function(
|
|
731
|
-
if (
|
|
732
|
-
var
|
|
733
|
-
r._strokeBegin(
|
|
724
|
+
}, this.penColor = t.penColor || "black", this.backgroundColor = t.backgroundColor || "rgba(0,0,0,0)", this.onBegin = t.onBegin, this.onEnd = t.onEnd, this._canvas = e, this._ctx = e.getContext("2d"), this.clear(), this._handleMouseDown = function(n) {
|
|
725
|
+
n.which === 1 && (r._mouseButtonDown = !0, r._strokeBegin(n));
|
|
726
|
+
}, this._handleMouseMove = function(n) {
|
|
727
|
+
r._mouseButtonDown && r._strokeMoveUpdate(n);
|
|
728
|
+
}, this._handleMouseUp = function(n) {
|
|
729
|
+
n.which === 1 && r._mouseButtonDown && (r._mouseButtonDown = !1, r._strokeEnd(n));
|
|
730
|
+
}, this._handleTouchStart = function(n) {
|
|
731
|
+
if (n.targetTouches.length === 1) {
|
|
732
|
+
var i = n.changedTouches[0];
|
|
733
|
+
r._strokeBegin(i);
|
|
734
734
|
}
|
|
735
|
-
}, this._handleTouchMove = function(
|
|
736
|
-
|
|
737
|
-
var
|
|
738
|
-
r._strokeMoveUpdate(
|
|
739
|
-
}, this._handleTouchEnd = function(
|
|
740
|
-
var
|
|
741
|
-
|
|
735
|
+
}, this._handleTouchMove = function(n) {
|
|
736
|
+
n.preventDefault();
|
|
737
|
+
var i = n.targetTouches[0];
|
|
738
|
+
r._strokeMoveUpdate(i);
|
|
739
|
+
}, this._handleTouchEnd = function(n) {
|
|
740
|
+
var i = n.target === r._canvas;
|
|
741
|
+
i && (n.preventDefault(), r._strokeEnd(n));
|
|
742
742
|
}, this.on();
|
|
743
743
|
}
|
|
744
744
|
z.prototype.clear = function() {
|
|
745
|
-
var e = this._ctx,
|
|
746
|
-
e.fillStyle = this.backgroundColor, e.clearRect(0, 0,
|
|
745
|
+
var e = this._ctx, a = this._canvas;
|
|
746
|
+
e.fillStyle = this.backgroundColor, e.clearRect(0, 0, a.width, a.height), e.fillRect(0, 0, a.width, a.height), this._data = [], this._reset(), this._isEmpty = !0;
|
|
747
747
|
};
|
|
748
748
|
z.prototype.fromDataURL = function(e) {
|
|
749
|
-
var
|
|
749
|
+
var a = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = new Image(), n = r.ratio || window.devicePixelRatio || 1, i = r.width || this._canvas.width / n, c = r.height || this._canvas.height / n;
|
|
750
750
|
this._reset(), t.src = e, t.onload = function() {
|
|
751
|
-
|
|
751
|
+
a._ctx.drawImage(t, 0, 0, i, c);
|
|
752
752
|
}, this._isEmpty = !1;
|
|
753
753
|
};
|
|
754
754
|
z.prototype.toDataURL = function(e) {
|
|
755
|
-
var
|
|
755
|
+
var a;
|
|
756
756
|
switch (e) {
|
|
757
757
|
case "image/svg+xml":
|
|
758
758
|
return this._toSVG();
|
|
759
759
|
default:
|
|
760
|
-
for (var r = arguments.length, t = Array(r > 1 ? r - 1 : 0),
|
|
761
|
-
t[
|
|
762
|
-
return (
|
|
760
|
+
for (var r = arguments.length, t = Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
761
|
+
t[n - 1] = arguments[n];
|
|
762
|
+
return (a = this._canvas).toDataURL.apply(a, [e].concat(t));
|
|
763
763
|
}
|
|
764
764
|
};
|
|
765
765
|
z.prototype.on = function() {
|
|
@@ -775,10 +775,10 @@ z.prototype._strokeBegin = function(e) {
|
|
|
775
775
|
this._data.push([]), this._reset(), this._strokeUpdate(e), typeof this.onBegin == "function" && this.onBegin(e);
|
|
776
776
|
};
|
|
777
777
|
z.prototype._strokeUpdate = function(e) {
|
|
778
|
-
var
|
|
779
|
-
if (!(
|
|
780
|
-
var
|
|
781
|
-
|
|
778
|
+
var a = e.clientX, r = e.clientY, t = this._createPoint(a, r), n = this._data[this._data.length - 1], i = n && n[n.length - 1], c = i && t.distanceTo(i) < this.minDistance;
|
|
779
|
+
if (!(i && c)) {
|
|
780
|
+
var o = this._addPoint(t), v = o.curve, u = o.widths;
|
|
781
|
+
v && u && this._drawCurve(v, u.start, u.end), this._data[this._data.length - 1].push({
|
|
782
782
|
x: t.x,
|
|
783
783
|
y: t.y,
|
|
784
784
|
time: t.time,
|
|
@@ -787,10 +787,10 @@ z.prototype._strokeUpdate = function(e) {
|
|
|
787
787
|
}
|
|
788
788
|
};
|
|
789
789
|
z.prototype._strokeEnd = function(e) {
|
|
790
|
-
var
|
|
791
|
-
if (!
|
|
792
|
-
var t = this._data[this._data.length - 1],
|
|
793
|
-
r.equals(
|
|
790
|
+
var a = this.points.length > 2, r = this.points[0];
|
|
791
|
+
if (!a && r && this._drawDot(r), r) {
|
|
792
|
+
var t = this._data[this._data.length - 1], n = t[t.length - 1];
|
|
793
|
+
r.equals(n) || t.push({
|
|
794
794
|
x: r.x,
|
|
795
795
|
y: r.y,
|
|
796
796
|
time: r.time,
|
|
@@ -808,105 +808,105 @@ z.prototype._handleTouchEvents = function() {
|
|
|
808
808
|
z.prototype._reset = function() {
|
|
809
809
|
this.points = [], this._lastVelocity = 0, this._lastWidth = (this.minWidth + this.maxWidth) / 2, this._ctx.fillStyle = this.penColor;
|
|
810
810
|
};
|
|
811
|
-
z.prototype._createPoint = function(e,
|
|
811
|
+
z.prototype._createPoint = function(e, a, r) {
|
|
812
812
|
var t = this._canvas.getBoundingClientRect();
|
|
813
|
-
return new
|
|
813
|
+
return new re(e - t.left, a - t.top, r || (/* @__PURE__ */ new Date()).getTime());
|
|
814
814
|
};
|
|
815
815
|
z.prototype._addPoint = function(e) {
|
|
816
|
-
var
|
|
817
|
-
if (
|
|
818
|
-
|
|
816
|
+
var a = this.points, r = void 0;
|
|
817
|
+
if (a.push(e), a.length > 2) {
|
|
818
|
+
a.length === 3 && a.unshift(a[0]), r = this._calculateCurveControlPoints(a[0], a[1], a[2]);
|
|
819
819
|
var t = r.c2;
|
|
820
|
-
r = this._calculateCurveControlPoints(
|
|
821
|
-
var
|
|
822
|
-
return
|
|
820
|
+
r = this._calculateCurveControlPoints(a[1], a[2], a[3]);
|
|
821
|
+
var n = r.c1, i = new ge(a[1], t, n, a[2]), c = this._calculateCurveWidths(i);
|
|
822
|
+
return a.shift(), { curve: i, widths: c };
|
|
823
823
|
}
|
|
824
824
|
return {};
|
|
825
825
|
};
|
|
826
|
-
z.prototype._calculateCurveControlPoints = function(e,
|
|
827
|
-
var t = e.x -
|
|
826
|
+
z.prototype._calculateCurveControlPoints = function(e, a, r) {
|
|
827
|
+
var t = e.x - a.x, n = e.y - a.y, i = a.x - r.x, c = a.y - r.y, o = { x: (e.x + a.x) / 2, y: (e.y + a.y) / 2 }, v = { x: (a.x + r.x) / 2, y: (a.y + r.y) / 2 }, u = Math.sqrt(t * t + n * n), l = Math.sqrt(i * i + c * c), d = o.x - v.x, m = o.y - v.y, b = l / (u + l), P = { x: v.x + d * b, y: v.y + m * b }, _ = a.x - P.x, x = a.y - P.y;
|
|
828
828
|
return {
|
|
829
|
-
c1: new
|
|
830
|
-
c2: new
|
|
829
|
+
c1: new re(o.x + _, o.y + x),
|
|
830
|
+
c2: new re(v.x + _, v.y + x)
|
|
831
831
|
};
|
|
832
832
|
};
|
|
833
833
|
z.prototype._calculateCurveWidths = function(e) {
|
|
834
|
-
var
|
|
835
|
-
return t.start = this._lastWidth, t.end =
|
|
834
|
+
var a = e.startPoint, r = e.endPoint, t = { start: null, end: null }, n = this.velocityFilterWeight * r.velocityFrom(a) + (1 - this.velocityFilterWeight) * this._lastVelocity, i = this._strokeWidth(n);
|
|
835
|
+
return t.start = this._lastWidth, t.end = i, this._lastVelocity = n, this._lastWidth = i, t;
|
|
836
836
|
};
|
|
837
837
|
z.prototype._strokeWidth = function(e) {
|
|
838
838
|
return Math.max(this.maxWidth / (e + 1), this.minWidth);
|
|
839
839
|
};
|
|
840
|
-
z.prototype._drawPoint = function(e,
|
|
840
|
+
z.prototype._drawPoint = function(e, a, r) {
|
|
841
841
|
var t = this._ctx;
|
|
842
|
-
t.moveTo(e,
|
|
842
|
+
t.moveTo(e, a), t.arc(e, a, r, 0, 2 * Math.PI, !1), this._isEmpty = !1;
|
|
843
843
|
};
|
|
844
|
-
z.prototype._drawCurve = function(e,
|
|
845
|
-
var t = this._ctx,
|
|
844
|
+
z.prototype._drawCurve = function(e, a, r) {
|
|
845
|
+
var t = this._ctx, n = r - a, i = Math.floor(e.length());
|
|
846
846
|
t.beginPath();
|
|
847
|
-
for (var
|
|
848
|
-
var
|
|
849
|
-
b += 3 *
|
|
850
|
-
var
|
|
851
|
-
|
|
852
|
-
var
|
|
853
|
-
this._drawPoint(b,
|
|
847
|
+
for (var c = 0; c < i; c += 1) {
|
|
848
|
+
var o = c / i, v = o * o, u = v * o, l = 1 - o, d = l * l, m = d * l, b = m * e.startPoint.x;
|
|
849
|
+
b += 3 * d * o * e.control1.x, b += 3 * l * v * e.control2.x, b += u * e.endPoint.x;
|
|
850
|
+
var P = m * e.startPoint.y;
|
|
851
|
+
P += 3 * d * o * e.control1.y, P += 3 * l * v * e.control2.y, P += u * e.endPoint.y;
|
|
852
|
+
var _ = a + u * n;
|
|
853
|
+
this._drawPoint(b, P, _);
|
|
854
854
|
}
|
|
855
855
|
t.closePath(), t.fill();
|
|
856
856
|
};
|
|
857
857
|
z.prototype._drawDot = function(e) {
|
|
858
|
-
var
|
|
859
|
-
|
|
858
|
+
var a = this._ctx, r = typeof this.dotSize == "function" ? this.dotSize() : this.dotSize;
|
|
859
|
+
a.beginPath(), this._drawPoint(e.x, e.y, r), a.closePath(), a.fill();
|
|
860
860
|
};
|
|
861
|
-
z.prototype._fromData = function(e,
|
|
861
|
+
z.prototype._fromData = function(e, a, r) {
|
|
862
862
|
for (var t = 0; t < e.length; t += 1) {
|
|
863
|
-
var
|
|
864
|
-
if (
|
|
865
|
-
for (var
|
|
866
|
-
var
|
|
867
|
-
if (
|
|
868
|
-
this.penColor =
|
|
869
|
-
else if (
|
|
870
|
-
var
|
|
871
|
-
|
|
863
|
+
var n = e[t];
|
|
864
|
+
if (n.length > 1)
|
|
865
|
+
for (var i = 0; i < n.length; i += 1) {
|
|
866
|
+
var c = n[i], o = new re(c.x, c.y, c.time), v = c.color;
|
|
867
|
+
if (i === 0)
|
|
868
|
+
this.penColor = v, this._reset(), this._addPoint(o);
|
|
869
|
+
else if (i !== n.length - 1) {
|
|
870
|
+
var u = this._addPoint(o), l = u.curve, d = u.widths;
|
|
871
|
+
l && d && a(l, d, v);
|
|
872
872
|
}
|
|
873
873
|
}
|
|
874
874
|
else {
|
|
875
875
|
this._reset();
|
|
876
|
-
var
|
|
877
|
-
r(
|
|
876
|
+
var m = n[0];
|
|
877
|
+
r(m);
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
880
|
};
|
|
881
881
|
z.prototype._toSVG = function() {
|
|
882
|
-
var e = this,
|
|
883
|
-
|
|
884
|
-
var
|
|
885
|
-
if (!isNaN(
|
|
886
|
-
var f = "M " +
|
|
887
|
-
|
|
882
|
+
var e = this, a = this._data, r = this._canvas, t = Math.max(window.devicePixelRatio || 1, 1), n = 0, i = 0, c = r.width / t, o = r.height / t, v = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
883
|
+
v.setAttributeNS(null, "width", r.width), v.setAttributeNS(null, "height", r.height), this._fromData(a, function(g, F, $) {
|
|
884
|
+
var A = document.createElement("path");
|
|
885
|
+
if (!isNaN(g.control1.x) && !isNaN(g.control1.y) && !isNaN(g.control2.x) && !isNaN(g.control2.y)) {
|
|
886
|
+
var f = "M " + g.startPoint.x.toFixed(3) + "," + g.startPoint.y.toFixed(3) + " " + ("C " + g.control1.x.toFixed(3) + "," + g.control1.y.toFixed(3) + " ") + (g.control2.x.toFixed(3) + "," + g.control2.y.toFixed(3) + " ") + (g.endPoint.x.toFixed(3) + "," + g.endPoint.y.toFixed(3));
|
|
887
|
+
A.setAttribute("d", f), A.setAttribute("stroke-width", (F.end * 2.25).toFixed(3)), A.setAttribute("stroke", $), A.setAttribute("fill", "none"), A.setAttribute("stroke-linecap", "round"), v.appendChild(A);
|
|
888
888
|
}
|
|
889
|
-
}, function(
|
|
890
|
-
var
|
|
891
|
-
|
|
889
|
+
}, function(g) {
|
|
890
|
+
var F = document.createElement("circle"), $ = typeof e.dotSize == "function" ? e.dotSize() : e.dotSize;
|
|
891
|
+
F.setAttribute("r", $), F.setAttribute("cx", g.x), F.setAttribute("cy", g.y), F.setAttribute("fill", g.color), v.appendChild(F);
|
|
892
892
|
});
|
|
893
|
-
var
|
|
894
|
-
if (
|
|
895
|
-
var
|
|
896
|
-
|
|
897
|
-
for (var
|
|
898
|
-
|
|
899
|
-
|
|
893
|
+
var u = "data:image/svg+xml;base64,", l = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"' + (' viewBox="' + n + " " + i + " " + c + " " + o + '"') + (' width="' + c + '"') + (' height="' + o + '"') + ">", d = v.innerHTML;
|
|
894
|
+
if (d === void 0) {
|
|
895
|
+
var m = document.createElement("dummy"), b = v.childNodes;
|
|
896
|
+
m.innerHTML = "";
|
|
897
|
+
for (var P = 0; P < b.length; P += 1)
|
|
898
|
+
m.appendChild(b[P].cloneNode(!0));
|
|
899
|
+
d = m.innerHTML;
|
|
900
900
|
}
|
|
901
|
-
var
|
|
902
|
-
return
|
|
901
|
+
var _ = "</svg>", x = l + d + _;
|
|
902
|
+
return u + btoa(x);
|
|
903
903
|
};
|
|
904
904
|
z.prototype.fromData = function(e) {
|
|
905
|
-
var
|
|
905
|
+
var a = this;
|
|
906
906
|
this.clear(), this._fromData(e, function(r, t) {
|
|
907
|
-
return
|
|
907
|
+
return a._drawCurve(r, t.start, t.end);
|
|
908
908
|
}, function(r) {
|
|
909
|
-
return
|
|
909
|
+
return a._drawDot(r);
|
|
910
910
|
}), this._data = e;
|
|
911
911
|
};
|
|
912
912
|
z.prototype.toData = function() {
|
|
@@ -916,164 +916,164 @@ const tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
916
916
|
__proto__: null,
|
|
917
917
|
default: z
|
|
918
918
|
}, Symbol.toStringTag, { value: "Module" })), rt = /* @__PURE__ */ Ye(tt);
|
|
919
|
-
var le = { exports: {} }, nt = le.exports,
|
|
919
|
+
var le = { exports: {} }, nt = le.exports, je;
|
|
920
920
|
function at() {
|
|
921
|
-
return
|
|
921
|
+
return je || (je = 1, (function(e, a) {
|
|
922
922
|
(function(r, t) {
|
|
923
923
|
e.exports = t();
|
|
924
924
|
})(nt, function() {
|
|
925
925
|
return (function(r) {
|
|
926
|
-
function t(
|
|
927
|
-
if (
|
|
928
|
-
var
|
|
929
|
-
return r[
|
|
926
|
+
function t(i) {
|
|
927
|
+
if (n[i]) return n[i].exports;
|
|
928
|
+
var c = n[i] = { exports: {}, id: i, loaded: !1 };
|
|
929
|
+
return r[i].call(c.exports, c, c.exports, t), c.loaded = !0, c.exports;
|
|
930
930
|
}
|
|
931
|
-
var
|
|
932
|
-
return t.m = r, t.c =
|
|
931
|
+
var n = {};
|
|
932
|
+
return t.m = r, t.c = n, t.p = "", t(0);
|
|
933
933
|
})([function(r, t) {
|
|
934
|
-
function
|
|
935
|
-
var
|
|
936
|
-
return
|
|
934
|
+
function n(u) {
|
|
935
|
+
var l = u.getContext("2d"), d = u.width, m = u.height, b = l.getImageData(0, 0, d, m).data, P = o(!0, d, m, b), _ = o(!1, d, m, b), x = v(!0, d, m, b), g = v(!1, d, m, b), F = g - x + 1, $ = _ - P + 1, A = l.getImageData(x, P, F, $);
|
|
936
|
+
return u.width = F, u.height = $, l.clearRect(0, 0, F, $), l.putImageData(A, 0, 0), u;
|
|
937
937
|
}
|
|
938
|
-
function
|
|
939
|
-
return { red:
|
|
938
|
+
function i(u, l, d, m) {
|
|
939
|
+
return { red: m[4 * (d * l + u)], green: m[4 * (d * l + u) + 1], blue: m[4 * (d * l + u) + 2], alpha: m[4 * (d * l + u) + 3] };
|
|
940
940
|
}
|
|
941
|
-
function
|
|
942
|
-
return
|
|
941
|
+
function c(u, l, d, m) {
|
|
942
|
+
return i(u, l, d, m).alpha;
|
|
943
943
|
}
|
|
944
|
-
function
|
|
945
|
-
for (var b =
|
|
944
|
+
function o(u, l, d, m) {
|
|
945
|
+
for (var b = u ? 1 : -1, P = u ? 0 : d - 1, _ = P; u ? _ < d : _ > -1; _ += b) for (var x = 0; x < l; x++) if (c(x, _, l, m)) return _;
|
|
946
946
|
return null;
|
|
947
947
|
}
|
|
948
|
-
function
|
|
949
|
-
for (var b =
|
|
948
|
+
function v(u, l, d, m) {
|
|
949
|
+
for (var b = u ? 1 : -1, P = u ? 0 : l - 1, _ = P; u ? _ < l : _ > -1; _ += b) for (var x = 0; x < d; x++) if (c(_, x, l, m)) return _;
|
|
950
950
|
return null;
|
|
951
951
|
}
|
|
952
|
-
Object.defineProperty(t, "__esModule", { value: !0 }), t.default =
|
|
952
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.default = n;
|
|
953
953
|
}]);
|
|
954
954
|
});
|
|
955
955
|
})(le)), le.exports;
|
|
956
956
|
}
|
|
957
|
-
var ot = ce.exports,
|
|
957
|
+
var ot = ce.exports, Ie;
|
|
958
958
|
function it() {
|
|
959
|
-
return
|
|
959
|
+
return Ie || (Ie = 1, (function(e, a) {
|
|
960
960
|
(function(r, t) {
|
|
961
|
-
e.exports = t(/* @__PURE__ */ Qe(),
|
|
962
|
-
})(ot, function(r, t,
|
|
963
|
-
return (function(
|
|
964
|
-
function
|
|
965
|
-
if (
|
|
966
|
-
var
|
|
967
|
-
return
|
|
961
|
+
e.exports = t(/* @__PURE__ */ Qe(), We, rt, at());
|
|
962
|
+
})(ot, function(r, t, n, i) {
|
|
963
|
+
return (function(c) {
|
|
964
|
+
function o(u) {
|
|
965
|
+
if (v[u]) return v[u].exports;
|
|
966
|
+
var l = v[u] = { exports: {}, id: u, loaded: !1 };
|
|
967
|
+
return c[u].call(l.exports, l, l.exports, o), l.loaded = !0, l.exports;
|
|
968
968
|
}
|
|
969
|
-
var
|
|
970
|
-
return
|
|
971
|
-
})([function(
|
|
972
|
-
function
|
|
973
|
-
return
|
|
969
|
+
var v = {};
|
|
970
|
+
return o.m = c, o.c = v, o.p = "", o(0);
|
|
971
|
+
})([function(c, o, v) {
|
|
972
|
+
function u(R) {
|
|
973
|
+
return R && R.__esModule ? R : { default: R };
|
|
974
974
|
}
|
|
975
|
-
function
|
|
976
|
-
var
|
|
977
|
-
for (var
|
|
978
|
-
return
|
|
975
|
+
function l(R, w) {
|
|
976
|
+
var M = {};
|
|
977
|
+
for (var N in R) w.indexOf(N) >= 0 || Object.prototype.hasOwnProperty.call(R, N) && (M[N] = R[N]);
|
|
978
|
+
return M;
|
|
979
979
|
}
|
|
980
|
-
function
|
|
981
|
-
if (!(
|
|
980
|
+
function d(R, w) {
|
|
981
|
+
if (!(R instanceof w)) throw new TypeError("Cannot call a class as a function");
|
|
982
982
|
}
|
|
983
|
-
function
|
|
984
|
-
if (!
|
|
985
|
-
return !
|
|
983
|
+
function m(R, w) {
|
|
984
|
+
if (!R) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
985
|
+
return !w || typeof w != "object" && typeof w != "function" ? R : w;
|
|
986
986
|
}
|
|
987
|
-
function b(
|
|
988
|
-
if (typeof
|
|
989
|
-
|
|
987
|
+
function b(R, w) {
|
|
988
|
+
if (typeof w != "function" && w !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof w);
|
|
989
|
+
R.prototype = Object.create(w && w.prototype, { constructor: { value: R, enumerable: !1, writable: !0, configurable: !0 } }), w && (Object.setPrototypeOf ? Object.setPrototypeOf(R, w) : R.__proto__ = w);
|
|
990
990
|
}
|
|
991
|
-
Object.defineProperty(
|
|
992
|
-
var
|
|
993
|
-
for (var
|
|
994
|
-
var
|
|
995
|
-
for (var
|
|
991
|
+
Object.defineProperty(o, "__esModule", { value: !0 });
|
|
992
|
+
var P = Object.assign || function(R) {
|
|
993
|
+
for (var w = 1; w < arguments.length; w++) {
|
|
994
|
+
var M = arguments[w];
|
|
995
|
+
for (var N in M) Object.prototype.hasOwnProperty.call(M, N) && (R[N] = M[N]);
|
|
996
996
|
}
|
|
997
|
-
return
|
|
998
|
-
},
|
|
999
|
-
function
|
|
1000
|
-
for (var
|
|
1001
|
-
var
|
|
1002
|
-
|
|
997
|
+
return R;
|
|
998
|
+
}, _ = /* @__PURE__ */ (function() {
|
|
999
|
+
function R(w, M) {
|
|
1000
|
+
for (var N = 0; N < M.length; N++) {
|
|
1001
|
+
var y = M[N];
|
|
1002
|
+
y.enumerable = y.enumerable || !1, y.configurable = !0, "value" in y && (y.writable = !0), Object.defineProperty(w, y.key, y);
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
|
-
return function(
|
|
1006
|
-
return
|
|
1005
|
+
return function(w, M, N) {
|
|
1006
|
+
return M && R(w.prototype, M), N && R(w, N), w;
|
|
1007
1007
|
};
|
|
1008
|
-
})(),
|
|
1009
|
-
function
|
|
1010
|
-
var
|
|
1011
|
-
|
|
1012
|
-
for (var
|
|
1013
|
-
return
|
|
1014
|
-
var
|
|
1008
|
+
})(), x = v(1), g = u(x), F = v(2), $ = u(F), A = v(3), f = u(A), Z = v(4), te = u(Z), K = (function(R) {
|
|
1009
|
+
function w() {
|
|
1010
|
+
var M, N, y, Y;
|
|
1011
|
+
d(this, w);
|
|
1012
|
+
for (var ne = arguments.length, V = Array(ne), X = 0; X < ne; X++) V[X] = arguments[X];
|
|
1013
|
+
return N = y = m(this, (M = w.__proto__ || Object.getPrototypeOf(w)).call.apply(M, [this].concat(V))), y._sigPad = null, y._excludeOurProps = function() {
|
|
1014
|
+
var q = y.props, J = (q.canvasProps, q.clearOnResize, l(q, ["canvasProps", "clearOnResize"]));
|
|
1015
1015
|
return J;
|
|
1016
|
-
},
|
|
1017
|
-
return
|
|
1018
|
-
},
|
|
1019
|
-
var
|
|
1020
|
-
return
|
|
1021
|
-
},
|
|
1022
|
-
return
|
|
1023
|
-
},
|
|
1024
|
-
|
|
1025
|
-
},
|
|
1026
|
-
var
|
|
1027
|
-
if (!J || !
|
|
1028
|
-
var h =
|
|
1029
|
-
J || (h.width = h.offsetWidth *
|
|
1016
|
+
}, y.getCanvas = function() {
|
|
1017
|
+
return y._canvas;
|
|
1018
|
+
}, y.getTrimmedCanvas = function() {
|
|
1019
|
+
var q = document.createElement("canvas");
|
|
1020
|
+
return q.width = y._canvas.width, q.height = y._canvas.height, q.getContext("2d").drawImage(y._canvas, 0, 0), (0, te.default)(q);
|
|
1021
|
+
}, y.getSignaturePad = function() {
|
|
1022
|
+
return y._sigPad;
|
|
1023
|
+
}, y._checkClearOnResize = function() {
|
|
1024
|
+
y.props.clearOnResize && y._resizeCanvas();
|
|
1025
|
+
}, y._resizeCanvas = function() {
|
|
1026
|
+
var q = y.props.canvasProps || {}, J = q.width, s = q.height;
|
|
1027
|
+
if (!J || !s) {
|
|
1028
|
+
var h = y._canvas, E = Math.max(window.devicePixelRatio || 1, 1);
|
|
1029
|
+
J || (h.width = h.offsetWidth * E), s || (h.height = h.offsetHeight * E), h.getContext("2d").scale(E, E), y.clear();
|
|
1030
1030
|
}
|
|
1031
|
-
},
|
|
1032
|
-
return window.addEventListener("resize",
|
|
1033
|
-
},
|
|
1034
|
-
return window.removeEventListener("resize",
|
|
1035
|
-
},
|
|
1036
|
-
return
|
|
1037
|
-
},
|
|
1038
|
-
return
|
|
1039
|
-
},
|
|
1040
|
-
return
|
|
1041
|
-
},
|
|
1042
|
-
return
|
|
1043
|
-
},
|
|
1044
|
-
return
|
|
1045
|
-
},
|
|
1046
|
-
return
|
|
1047
|
-
},
|
|
1031
|
+
}, y.on = function() {
|
|
1032
|
+
return window.addEventListener("resize", y._checkClearOnResize), y._sigPad.on();
|
|
1033
|
+
}, y.off = function() {
|
|
1034
|
+
return window.removeEventListener("resize", y._checkClearOnResize), y._sigPad.off();
|
|
1035
|
+
}, y.clear = function() {
|
|
1036
|
+
return y._sigPad.clear();
|
|
1037
|
+
}, y.isEmpty = function() {
|
|
1038
|
+
return y._sigPad.isEmpty();
|
|
1039
|
+
}, y.fromDataURL = function(q, J) {
|
|
1040
|
+
return y._sigPad.fromDataURL(q, J);
|
|
1041
|
+
}, y.toDataURL = function(q, J) {
|
|
1042
|
+
return y._sigPad.toDataURL(q, J);
|
|
1043
|
+
}, y.fromData = function(q) {
|
|
1044
|
+
return y._sigPad.fromData(q);
|
|
1045
|
+
}, y.toData = function() {
|
|
1046
|
+
return y._sigPad.toData();
|
|
1047
|
+
}, Y = N, m(y, Y);
|
|
1048
1048
|
}
|
|
1049
|
-
return b(
|
|
1049
|
+
return b(w, R), _(w, [{ key: "componentDidMount", value: function() {
|
|
1050
1050
|
this._sigPad = new f.default(this._canvas, this._excludeOurProps()), this._resizeCanvas(), this.on();
|
|
1051
1051
|
} }, { key: "componentWillUnmount", value: function() {
|
|
1052
1052
|
this.off();
|
|
1053
1053
|
} }, { key: "componentDidUpdate", value: function() {
|
|
1054
1054
|
Object.assign(this._sigPad, this._excludeOurProps());
|
|
1055
1055
|
} }, { key: "render", value: function() {
|
|
1056
|
-
var
|
|
1057
|
-
return
|
|
1058
|
-
|
|
1059
|
-
} },
|
|
1060
|
-
} }]),
|
|
1061
|
-
})(
|
|
1062
|
-
K.propTypes = { velocityFilterWeight:
|
|
1063
|
-
}, function(
|
|
1064
|
-
|
|
1065
|
-
}, function(
|
|
1066
|
-
|
|
1067
|
-
}, function(
|
|
1068
|
-
|
|
1069
|
-
}, function(
|
|
1070
|
-
|
|
1056
|
+
var M = this, N = this.props.canvasProps;
|
|
1057
|
+
return $.default.createElement("canvas", P({ ref: function(y) {
|
|
1058
|
+
M._canvas = y;
|
|
1059
|
+
} }, N));
|
|
1060
|
+
} }]), w;
|
|
1061
|
+
})(F.Component);
|
|
1062
|
+
K.propTypes = { velocityFilterWeight: g.default.number, minWidth: g.default.number, maxWidth: g.default.number, minDistance: g.default.number, dotSize: g.default.oneOfType([g.default.number, g.default.func]), penColor: g.default.string, throttle: g.default.number, onEnd: g.default.func, onBegin: g.default.func, canvasProps: g.default.object, clearOnResize: g.default.bool }, K.defaultProps = { clearOnResize: !0 }, o.default = K;
|
|
1063
|
+
}, function(c, o) {
|
|
1064
|
+
c.exports = r;
|
|
1065
|
+
}, function(c, o) {
|
|
1066
|
+
c.exports = t;
|
|
1067
|
+
}, function(c, o) {
|
|
1068
|
+
c.exports = n;
|
|
1069
|
+
}, function(c, o) {
|
|
1070
|
+
c.exports = i;
|
|
1071
1071
|
}]);
|
|
1072
1072
|
});
|
|
1073
1073
|
})(ce)), ce.exports;
|
|
1074
1074
|
}
|
|
1075
1075
|
var st = it();
|
|
1076
|
-
const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_7", ft = "_MainAuto_1sp4s_17", dt = "_MainManual_1sp4s_21", ht = "_Footer_1sp4s_27", pt = "_Header_1sp4s_37", vt = "_HeaderTitle_1sp4s_47", yt = "_HeaderManualDraw_1sp4s_52", mt = "_HeaderNotManualDraw_1sp4s_56", _t = "_HeaderReset_1sp4s_60", gt = "_ManualPanel_1sp4s_71", bt = "_ManualPanelButton_1sp4s_82", xt = "_AutoPanel_1sp4s_97", Pt = "_AutoPanelImage_1sp4s_104", wt = "_AutoPanelLoader_1sp4s_110", Et = "_AutoPanelButton_1sp4s_117", Tt = "_AutoPanelLabel_1sp4s_121", St = "_AutoPanelLabelIcon_1sp4s_129",
|
|
1076
|
+
const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_7", ft = "_MainAuto_1sp4s_17", dt = "_MainManual_1sp4s_21", ht = "_Footer_1sp4s_27", pt = "_Header_1sp4s_37", vt = "_HeaderTitle_1sp4s_47", yt = "_HeaderManualDraw_1sp4s_52", mt = "_HeaderNotManualDraw_1sp4s_56", _t = "_HeaderReset_1sp4s_60", gt = "_ManualPanel_1sp4s_71", bt = "_ManualPanelButton_1sp4s_82", xt = "_AutoPanel_1sp4s_97", Pt = "_AutoPanelImage_1sp4s_104", wt = "_AutoPanelLoader_1sp4s_110", Et = "_AutoPanelButton_1sp4s_117", Tt = "_AutoPanelLabel_1sp4s_121", St = "_AutoPanelLabelIcon_1sp4s_129", Ct = "_AutoPanelLabelText_1sp4s_135", Ot = "_AutoPanelError_1sp4s_142", At = "_AutoPanelErrorTitle_1sp4s_151", B = {
|
|
1077
1077
|
Signature: ct,
|
|
1078
1078
|
Main: lt,
|
|
1079
1079
|
MainAuto: ft,
|
|
@@ -1092,105 +1092,93 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
|
|
|
1092
1092
|
AutoPanelButton: Et,
|
|
1093
1093
|
AutoPanelLabel: Tt,
|
|
1094
1094
|
AutoPanelLabelIcon: St,
|
|
1095
|
-
AutoPanelLabelText:
|
|
1096
|
-
AutoPanelError:
|
|
1097
|
-
AutoPanelErrorTitle:
|
|
1098
|
-
},
|
|
1095
|
+
AutoPanelLabelText: Ct,
|
|
1096
|
+
AutoPanelError: Ot,
|
|
1097
|
+
AutoPanelErrorTitle: At
|
|
1098
|
+
}, Nt = ({
|
|
1099
1099
|
// Signature props
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
onChangeAuto: o,
|
|
1100
|
+
auto: e,
|
|
1101
|
+
manual: a,
|
|
1102
|
+
getSignature: r,
|
|
1103
|
+
onChangeManual: t,
|
|
1104
|
+
onChangeAuto: n,
|
|
1106
1105
|
// Base props
|
|
1107
|
-
...
|
|
1106
|
+
...i
|
|
1108
1107
|
}) => {
|
|
1109
|
-
const c =
|
|
1110
|
-
(
|
|
1111
|
-
!
|
|
1112
|
-
width: +
|
|
1113
|
-
height: +
|
|
1108
|
+
const c = ze(null), [o, v] = oe(null), [u, l] = oe(a ? "manual" : "auto"), [d, m] = oe(""), [b, P] = oe(!1), { width: _ = 0, height: x = 0 } = Ne({ ref: c, box: "border-box" }), g = u === "auto" ? e ? "auto-generated" : "auto-loading" : d ? "manual-drawn" : a ? "manual-stored" : "manual-blank", F = e !== "" || b, $ = a || d, A = ee(
|
|
1109
|
+
(y) => {
|
|
1110
|
+
!o || !_ || !x || !y || o.fromDataURL(y, {
|
|
1111
|
+
width: +_.toFixed(),
|
|
1112
|
+
height: +x.toFixed()
|
|
1114
1113
|
});
|
|
1115
1114
|
},
|
|
1116
|
-
[
|
|
1117
|
-
),
|
|
1118
|
-
if (!
|
|
1119
|
-
const
|
|
1120
|
-
|
|
1121
|
-
}, [
|
|
1122
|
-
|
|
1123
|
-
}, [
|
|
1124
|
-
|
|
1125
|
-
}, []),
|
|
1126
|
-
|
|
1127
|
-
}, []),
|
|
1128
|
-
|
|
1129
|
-
}, [
|
|
1130
|
-
|
|
1131
|
-
}, [
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
}, [
|
|
1135
|
-
|
|
1136
|
-
const Y = `data:image/png;base64,${
|
|
1137
|
-
|
|
1115
|
+
[o, _, x]
|
|
1116
|
+
), f = ee(() => {
|
|
1117
|
+
if (!o) return;
|
|
1118
|
+
const y = o.getCanvas().toDataURL("image/png");
|
|
1119
|
+
m(y), t(y);
|
|
1120
|
+
}, [o, t]), Z = ee(() => {
|
|
1121
|
+
o && (o.clear(), m(""), t(""));
|
|
1122
|
+
}, [o, t]), te = ee(() => {
|
|
1123
|
+
l("auto"), m("");
|
|
1124
|
+
}, []), K = ee(() => {
|
|
1125
|
+
l("manual");
|
|
1126
|
+
}, []), R = ee(() => {
|
|
1127
|
+
l("auto"), m(""), t("");
|
|
1128
|
+
}, [t]), w = ee(() => {
|
|
1129
|
+
d && m("");
|
|
1130
|
+
}, [d]), M = (y) => y.includes(g);
|
|
1131
|
+
xe(() => {
|
|
1132
|
+
u === "manual" && d && _ && x && A(d);
|
|
1133
|
+
}, [u, d, _, x, A]), xe(() => {
|
|
1134
|
+
r().then((y) => {
|
|
1135
|
+
const Y = `data:image/png;base64,${y.signature}`;
|
|
1136
|
+
P(!1), n(Y);
|
|
1138
1137
|
}).catch(() => {
|
|
1139
|
-
|
|
1140
|
-
})
|
|
1141
|
-
}, [
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
s.current || (s.current = !0, t().then(($) => {
|
|
1147
|
-
const Y = `data:image/png;base64,${$.signature}`;
|
|
1148
|
-
_(!1), o(Y);
|
|
1149
|
-
}).catch(() => {
|
|
1150
|
-
_(!0);
|
|
1151
|
-
}));
|
|
1152
|
-
}, [n, e, t, o]);
|
|
1153
|
-
const ee = re(() => {
|
|
1154
|
-
_(!1), s.current = !0, t().then(($) => {
|
|
1155
|
-
const Y = `data:image/png;base64,${$.signature}`;
|
|
1156
|
-
_(!1), o(Y);
|
|
1138
|
+
P(!0);
|
|
1139
|
+
});
|
|
1140
|
+
}, []);
|
|
1141
|
+
const N = ee(() => {
|
|
1142
|
+
P(!1), r().then((y) => {
|
|
1143
|
+
const Y = `data:image/png;base64,${y.signature}`;
|
|
1144
|
+
P(!1), n(Y);
|
|
1157
1145
|
}).catch(() => {
|
|
1158
|
-
|
|
1146
|
+
P(!0);
|
|
1159
1147
|
});
|
|
1160
|
-
}, [
|
|
1161
|
-
return /* @__PURE__ */
|
|
1148
|
+
}, [r, n]);
|
|
1149
|
+
return /* @__PURE__ */ Q(
|
|
1162
1150
|
"div",
|
|
1163
1151
|
{
|
|
1164
|
-
"data-testid":
|
|
1165
|
-
className:
|
|
1152
|
+
"data-testid": we(i, "data-testid", "signature"),
|
|
1153
|
+
className: fe(B.Signature, we(i, "className")),
|
|
1166
1154
|
children: [
|
|
1167
|
-
/* @__PURE__ */
|
|
1155
|
+
/* @__PURE__ */ Q(
|
|
1168
1156
|
"div",
|
|
1169
1157
|
{
|
|
1170
|
-
className:
|
|
1158
|
+
className: fe(B.Main, M(["auto-generated", "auto-loading"]) ? B.MainAuto : B.MainManual),
|
|
1171
1159
|
ref: c,
|
|
1172
1160
|
children: [
|
|
1173
|
-
/* @__PURE__ */
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1161
|
+
/* @__PURE__ */ Q("div", { className: fe(B.Header, M(["manual-drawn"]) ? B.HeaderManualDraw : B.HeaderNotManualDraw), children: [
|
|
1162
|
+
M(["auto-generated", "auto-loading"]) && /* @__PURE__ */ U("span", { className: B.HeaderTitle, children: "Wir haben eine digitale Signature Sie generiert." }),
|
|
1163
|
+
M(["manual-blank", "manual-stored"]) && /* @__PURE__ */ U("span", { className: B.HeaderTitle, children: "Ihre Signatur:" }),
|
|
1164
|
+
M(["manual-drawn"]) && /* @__PURE__ */ U(
|
|
1177
1165
|
ie,
|
|
1178
1166
|
{
|
|
1179
1167
|
blurAfterClick: !0,
|
|
1180
1168
|
text: "Neu starten",
|
|
1181
1169
|
underlined: !0,
|
|
1182
|
-
icon: /* @__PURE__ */
|
|
1183
|
-
className:
|
|
1184
|
-
onClick:
|
|
1170
|
+
icon: /* @__PURE__ */ U(Fe, {}),
|
|
1171
|
+
className: B.HeaderReset,
|
|
1172
|
+
onClick: Z
|
|
1185
1173
|
}
|
|
1186
1174
|
)
|
|
1187
1175
|
] }),
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
/* @__PURE__ */
|
|
1193
|
-
/* @__PURE__ */
|
|
1176
|
+
M(["auto-generated", "auto-loading"]) ? /* @__PURE__ */ Q("div", { className: B.AutoPanel, children: [
|
|
1177
|
+
e !== "" && /* @__PURE__ */ U("img", { className: B.AutoPanelImage, src: e, alt: "signature" }),
|
|
1178
|
+
e === "" && !b && /* @__PURE__ */ U(Ue, { size: "sm", color: "accent-primary", className: B.AutoPanelLoader }),
|
|
1179
|
+
e === "" && b && /* @__PURE__ */ Q("div", { className: B.AutoPanelError, children: [
|
|
1180
|
+
/* @__PURE__ */ U("span", { className: B.AutoPanelErrorTitle, children: "Automatische Signatur konnte nicht geladen werden." }),
|
|
1181
|
+
/* @__PURE__ */ U(
|
|
1194
1182
|
ie,
|
|
1195
1183
|
{
|
|
1196
1184
|
blurAfterClick: !0,
|
|
@@ -1198,28 +1186,28 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
|
|
|
1198
1186
|
text: "Erneut versuchen",
|
|
1199
1187
|
size: "sm",
|
|
1200
1188
|
iconPosition: "right",
|
|
1201
|
-
icon: /* @__PURE__ */
|
|
1202
|
-
onClick:
|
|
1189
|
+
icon: /* @__PURE__ */ U(qe, {}),
|
|
1190
|
+
onClick: N
|
|
1203
1191
|
}
|
|
1204
1192
|
)
|
|
1205
1193
|
] }),
|
|
1206
|
-
|
|
1207
|
-
/* @__PURE__ */
|
|
1208
|
-
/* @__PURE__ */
|
|
1194
|
+
e !== "" && /* @__PURE__ */ Q("div", { className: B.AutoPanelLabel, children: [
|
|
1195
|
+
/* @__PURE__ */ U(Be, { className: B.AutoPanelLabelIcon }),
|
|
1196
|
+
/* @__PURE__ */ U("span", { className: B.AutoPanelLabelText, children: "Diese Unterschrift ist ausreichend" })
|
|
1209
1197
|
] }),
|
|
1210
|
-
|
|
1198
|
+
F && /* @__PURE__ */ U(
|
|
1211
1199
|
ie,
|
|
1212
1200
|
{
|
|
1213
1201
|
blurAfterClick: !0,
|
|
1214
1202
|
color: "link",
|
|
1215
1203
|
text: "Per Hand/Maus unterschreiben",
|
|
1216
1204
|
underlined: !0,
|
|
1217
|
-
className:
|
|
1218
|
-
onClick:
|
|
1205
|
+
className: B.AutoPanelButton,
|
|
1206
|
+
onClick: K
|
|
1219
1207
|
}
|
|
1220
1208
|
)
|
|
1221
|
-
] }) : /* @__PURE__ */
|
|
1222
|
-
|
|
1209
|
+
] }) : /* @__PURE__ */ Q("div", { className: B.ManualPanel, children: [
|
|
1210
|
+
M(["manual-stored"]) ? /* @__PURE__ */ U("img", { width: _, height: x, alt: "signature", src: $ }) : /* @__PURE__ */ U(
|
|
1223
1211
|
ut,
|
|
1224
1212
|
{
|
|
1225
1213
|
penColor: "#262626",
|
|
@@ -1227,37 +1215,37 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
|
|
|
1227
1215
|
minWidth: 0.25,
|
|
1228
1216
|
maxWidth: 2.75,
|
|
1229
1217
|
throttle: 12,
|
|
1230
|
-
canvasProps: { width: +(
|
|
1231
|
-
ref: (
|
|
1218
|
+
canvasProps: { width: +(_ || 0).toFixed(), height: +(x || 0).toFixed() },
|
|
1219
|
+
ref: (y) => v(y),
|
|
1232
1220
|
clearOnResize: !0,
|
|
1233
|
-
onEnd:
|
|
1221
|
+
onEnd: f
|
|
1234
1222
|
}
|
|
1235
1223
|
),
|
|
1236
|
-
|
|
1224
|
+
M(["manual-stored"]) && /* @__PURE__ */ U(
|
|
1237
1225
|
ie,
|
|
1238
1226
|
{
|
|
1239
1227
|
blurAfterClick: !0,
|
|
1240
1228
|
underlined: !0,
|
|
1241
1229
|
text: "Zurücksetzen",
|
|
1242
|
-
className:
|
|
1243
|
-
onClick:
|
|
1230
|
+
className: B.ManualPanelButton,
|
|
1231
|
+
onClick: R
|
|
1244
1232
|
}
|
|
1245
1233
|
)
|
|
1246
1234
|
] })
|
|
1247
1235
|
]
|
|
1248
1236
|
}
|
|
1249
1237
|
),
|
|
1250
|
-
|
|
1251
|
-
/* @__PURE__ */
|
|
1252
|
-
/* @__PURE__ */
|
|
1253
|
-
|
|
1238
|
+
M(["manual-blank", "manual-drawn"]) && /* @__PURE__ */ Q("div", { className: B.Footer, children: [
|
|
1239
|
+
/* @__PURE__ */ U(Pe, { fullWidth: !0, blurAfterClick: !0, text: "Abbrechen", color: "tertiary", onClick: te }),
|
|
1240
|
+
/* @__PURE__ */ U(
|
|
1241
|
+
Pe,
|
|
1254
1242
|
{
|
|
1255
1243
|
fullWidth: !0,
|
|
1256
1244
|
blurAfterClick: !0,
|
|
1257
1245
|
text: "Speichern",
|
|
1258
1246
|
color: "primary",
|
|
1259
|
-
disabled: !
|
|
1260
|
-
onClick:
|
|
1247
|
+
disabled: !d,
|
|
1248
|
+
onClick: w
|
|
1261
1249
|
}
|
|
1262
1250
|
)
|
|
1263
1251
|
] })
|
|
@@ -1266,5 +1254,5 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
|
|
|
1266
1254
|
);
|
|
1267
1255
|
};
|
|
1268
1256
|
export {
|
|
1269
|
-
|
|
1257
|
+
Nt as Signature
|
|
1270
1258
|
};
|