@carandesign/drawui 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/drawui.es.js CHANGED
@@ -1,30 +1,30 @@
1
- import st, { createContext as nt, useContext as rt, useRef as O, useState as Y, useEffect as R } from "react";
2
- var ce = { exports: {} }, Z = {};
1
+ import st, { createContext as nt, useContext as rt, useRef as O, useState as Q, useEffect as R } from "react";
2
+ var ce = { exports: {} }, B = {};
3
3
  var je;
4
4
  function ot() {
5
- if (je) return Z;
5
+ if (je) return B;
6
6
  je = 1;
7
7
  var o = /* @__PURE__ */ Symbol.for("react.transitional.element"), e = /* @__PURE__ */ Symbol.for("react.fragment");
8
8
  function s(t, n, r) {
9
- var i = null;
10
- if (r !== void 0 && (i = "" + r), n.key !== void 0 && (i = "" + n.key), "key" in n) {
9
+ var a = null;
10
+ if (r !== void 0 && (a = "" + r), n.key !== void 0 && (a = "" + n.key), "key" in n) {
11
11
  r = {};
12
- for (var a in n)
13
- a !== "key" && (r[a] = n[a]);
12
+ for (var i in n)
13
+ i !== "key" && (r[i] = n[i]);
14
14
  } else r = n;
15
15
  return n = r.ref, {
16
16
  $$typeof: o,
17
17
  type: t,
18
- key: i,
18
+ key: a,
19
19
  ref: n !== void 0 ? n : null,
20
20
  props: r
21
21
  };
22
22
  }
23
- return Z.Fragment = e, Z.jsx = s, Z.jsxs = s, Z;
23
+ return B.Fragment = e, B.jsx = s, B.jsxs = s, B;
24
24
  }
25
- var X = {};
25
+ var Z = {};
26
26
  var $e;
27
- function at() {
27
+ function it() {
28
28
  return $e || ($e = 1, process.env.NODE_ENV !== "production" && (function() {
29
29
  function o(p) {
30
30
  if (p == null) return null;
@@ -32,7 +32,7 @@ function at() {
32
32
  return p.$$typeof === re ? null : p.displayName || p.name || null;
33
33
  if (typeof p == "string") return p;
34
34
  switch (p) {
35
- case b:
35
+ case k:
36
36
  return "Fragment";
37
37
  case y:
38
38
  return "Profiler";
@@ -51,16 +51,16 @@ function at() {
51
51
  ), p.$$typeof) {
52
52
  case m:
53
53
  return "Portal";
54
- case z:
54
+ case H:
55
55
  return p.displayName || "Context";
56
- case C:
56
+ case D:
57
57
  return (p._context.displayName || "Context") + ".Consumer";
58
- case N:
58
+ case F:
59
59
  var w = p.render;
60
60
  return p = p.displayName, p || (p = w.displayName || w.name || "", p = p !== "" ? "ForwardRef(" + p + ")" : "ForwardRef"), p;
61
61
  case se:
62
62
  return w = p.displayName || null, w !== null ? w : o(p.type) || "Memo";
63
- case D:
63
+ case $:
64
64
  w = p._payload, p = p._init;
65
65
  try {
66
66
  return o(p(w));
@@ -90,8 +90,8 @@ function at() {
90
90
  }
91
91
  }
92
92
  function t(p) {
93
- if (p === b) return "<>";
94
- if (typeof p == "object" && p !== null && p.$$typeof === D)
93
+ if (p === k) return "<>";
94
+ if (typeof p == "object" && p !== null && p.$$typeof === $)
95
95
  return "<...>";
96
96
  try {
97
97
  var w = o(p);
@@ -107,16 +107,16 @@ function at() {
107
107
  function r() {
108
108
  return Error("react-stack-top-frame");
109
109
  }
110
- function i(p) {
110
+ function a(p) {
111
111
  if (S.call(p, "key")) {
112
112
  var w = Object.getOwnPropertyDescriptor(p, "key").get;
113
113
  if (w && w.isReactWarning) return !1;
114
114
  }
115
115
  return p.key !== void 0;
116
116
  }
117
- function a(p, w) {
117
+ function i(p, w) {
118
118
  function _() {
119
- I || (I = !0, console.error(
119
+ z || (z = !0, console.error(
120
120
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
121
121
  w
122
122
  ));
@@ -132,7 +132,7 @@ function at() {
132
132
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
133
133
  )), p = this.props.ref, p !== void 0 ? p : null;
134
134
  }
135
- function u(p, w, _, P, ie, Me) {
135
+ function u(p, w, _, P, ae, Me) {
136
136
  var T = _.ref;
137
137
  return p = {
138
138
  $$typeof: g,
@@ -157,7 +157,7 @@ function at() {
157
157
  configurable: !1,
158
158
  enumerable: !1,
159
159
  writable: !0,
160
- value: ie
160
+ value: ae
161
161
  }), Object.defineProperty(p, "_debugTask", {
162
162
  configurable: !1,
163
163
  enumerable: !1,
@@ -165,11 +165,11 @@ function at() {
165
165
  value: Me
166
166
  }), Object.freeze && (Object.freeze(p.props), Object.freeze(p)), p;
167
167
  }
168
- function l(p, w, _, P, ie, Me) {
168
+ function l(p, w, _, P, ae, Me) {
169
169
  var T = w.children;
170
170
  if (T !== void 0)
171
171
  if (P)
172
- if ($(T)) {
172
+ if (j(T)) {
173
173
  for (P = 0; P < T.length; P++)
174
174
  h(T[P]);
175
175
  Object.freeze && Object.freeze(T);
@@ -183,7 +183,7 @@ function at() {
183
183
  var G = Object.keys(w).filter(function(tt) {
184
184
  return tt !== "key";
185
185
  });
186
- P = 0 < G.length ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}", B[T + P] || (G = 0 < G.length ? "{" + G.join(": ..., ") + ": ...}" : "{}", console.error(
186
+ P = 0 < G.length ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}", Y[T + P] || (G = 0 < G.length ? "{" + G.join(": ..., ") + ": ...}" : "{}", console.error(
187
187
  `A props object containing a "key" prop is being spread into JSX:
188
188
  let props = %s;
189
189
  <%s {...props} />
@@ -194,14 +194,14 @@ React keys must be passed directly to JSX without using spread:
194
194
  T,
195
195
  G,
196
196
  T
197
- ), B[T + P] = !0);
197
+ ), Y[T + P] = !0);
198
198
  }
199
- if (T = null, _ !== void 0 && (s(_), T = "" + _), i(w) && (s(w.key), T = "" + w.key), "key" in w) {
199
+ if (T = null, _ !== void 0 && (s(_), T = "" + _), a(w) && (s(w.key), T = "" + w.key), "key" in w) {
200
200
  _ = {};
201
201
  for (var ye in w)
202
202
  ye !== "key" && (_[ye] = w[ye]);
203
203
  } else _ = w;
204
- return T && a(
204
+ return T && i(
205
205
  _,
206
206
  typeof p == "function" ? p.displayName || p.name || "Unknown" : p
207
207
  ), u(
@@ -209,17 +209,17 @@ React keys must be passed directly to JSX without using spread:
209
209
  T,
210
210
  _,
211
211
  n(),
212
- ie,
212
+ ae,
213
213
  Me
214
214
  );
215
215
  }
216
216
  function h(p) {
217
- f(p) ? p._store && (p._store.validated = 1) : typeof p == "object" && p !== null && p.$$typeof === D && (p._payload.status === "fulfilled" ? f(p._payload.value) && p._payload.value._store && (p._payload.value._store.validated = 1) : p._store && (p._store.validated = 1));
217
+ f(p) ? p._store && (p._store.validated = 1) : typeof p == "object" && p !== null && p.$$typeof === $ && (p._payload.status === "fulfilled" ? f(p._payload.value) && p._payload.value._store && (p._payload.value._store.validated = 1) : p._store && (p._store.validated = 1));
218
218
  }
219
219
  function f(p) {
220
220
  return typeof p == "object" && p !== null && p.$$typeof === g;
221
221
  }
222
- var d = st, g = /* @__PURE__ */ Symbol.for("react.transitional.element"), m = /* @__PURE__ */ Symbol.for("react.portal"), b = /* @__PURE__ */ Symbol.for("react.fragment"), v = /* @__PURE__ */ Symbol.for("react.strict_mode"), y = /* @__PURE__ */ Symbol.for("react.profiler"), C = /* @__PURE__ */ Symbol.for("react.consumer"), z = /* @__PURE__ */ Symbol.for("react.context"), N = /* @__PURE__ */ Symbol.for("react.forward_ref"), ee = /* @__PURE__ */ Symbol.for("react.suspense"), te = /* @__PURE__ */ Symbol.for("react.suspense_list"), se = /* @__PURE__ */ Symbol.for("react.memo"), D = /* @__PURE__ */ Symbol.for("react.lazy"), ne = /* @__PURE__ */ Symbol.for("react.activity"), re = /* @__PURE__ */ Symbol.for("react.client.reference"), x = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, S = Object.prototype.hasOwnProperty, $ = Array.isArray, W = console.createTask ? console.createTask : function() {
222
+ var d = st, g = /* @__PURE__ */ Symbol.for("react.transitional.element"), m = /* @__PURE__ */ Symbol.for("react.portal"), k = /* @__PURE__ */ Symbol.for("react.fragment"), v = /* @__PURE__ */ Symbol.for("react.strict_mode"), y = /* @__PURE__ */ Symbol.for("react.profiler"), D = /* @__PURE__ */ Symbol.for("react.consumer"), H = /* @__PURE__ */ Symbol.for("react.context"), F = /* @__PURE__ */ Symbol.for("react.forward_ref"), ee = /* @__PURE__ */ Symbol.for("react.suspense"), te = /* @__PURE__ */ Symbol.for("react.suspense_list"), se = /* @__PURE__ */ Symbol.for("react.memo"), $ = /* @__PURE__ */ Symbol.for("react.lazy"), ne = /* @__PURE__ */ Symbol.for("react.activity"), re = /* @__PURE__ */ Symbol.for("react.client.reference"), x = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, S = Object.prototype.hasOwnProperty, j = Array.isArray, I = console.createTask ? console.createTask : function() {
223
223
  return null;
224
224
  };
225
225
  d = {
@@ -227,11 +227,11 @@ React keys must be passed directly to JSX without using spread:
227
227
  return p();
228
228
  }
229
229
  };
230
- var I, q = {}, oe = d.react_stack_bottom_frame.bind(
230
+ var z, q = {}, oe = d.react_stack_bottom_frame.bind(
231
231
  d,
232
232
  r
233
- )(), ae = W(t(r)), B = {};
234
- X.Fragment = b, X.jsx = function(p, w, _) {
233
+ )(), ie = I(t(r)), Y = {};
234
+ Z.Fragment = k, Z.jsx = function(p, w, _) {
235
235
  var P = 1e4 > x.recentlyCreatedOwnerStacks++;
236
236
  return l(
237
237
  p,
@@ -239,9 +239,9 @@ React keys must be passed directly to JSX without using spread:
239
239
  _,
240
240
  !1,
241
241
  P ? Error("react-stack-top-frame") : oe,
242
- P ? W(t(p)) : ae
242
+ P ? I(t(p)) : ie
243
243
  );
244
- }, X.jsxs = function(p, w, _) {
244
+ }, Z.jsxs = function(p, w, _) {
245
245
  var P = 1e4 > x.recentlyCreatedOwnerStacks++;
246
246
  return l(
247
247
  p,
@@ -249,22 +249,22 @@ React keys must be passed directly to JSX without using spread:
249
249
  _,
250
250
  !0,
251
251
  P ? Error("react-stack-top-frame") : oe,
252
- P ? W(t(p)) : ae
252
+ P ? I(t(p)) : ie
253
253
  );
254
254
  };
255
- })()), X;
255
+ })()), Z;
256
256
  }
257
- var ze;
258
- function it() {
259
- return ze || (ze = 1, process.env.NODE_ENV === "production" ? ce.exports = ot() : ce.exports = at()), ce.exports;
257
+ var De;
258
+ function at() {
259
+ return De || (De = 1, process.env.NODE_ENV === "production" ? ce.exports = ot() : ce.exports = it()), ce.exports;
260
260
  }
261
- var M = it();
261
+ var M = at();
262
262
  function Te(o, e, s) {
263
263
  if (o && o.length) {
264
- const [t, n] = e, r = Math.PI / 180 * s, i = Math.cos(r), a = Math.sin(r);
264
+ const [t, n] = e, r = Math.PI / 180 * s, a = Math.cos(r), i = Math.sin(r);
265
265
  for (const c of o) {
266
266
  const [u, l] = c;
267
- c[0] = (u - t) * i - (l - n) * a + t, c[1] = (u - t) * a + (l - n) * i + n;
267
+ c[0] = (u - t) * a - (l - n) * i + t, c[1] = (u - t) * i + (l - n) * a + n;
268
268
  }
269
269
  }
270
270
  }
@@ -276,15 +276,15 @@ function lt(o, e) {
276
276
  return o[0] === e[0] && o[1] === e[1];
277
277
  }
278
278
  function ut(o, e, s, t = 1) {
279
- const n = s, r = Math.max(e, 0.1), i = o[0] && o[0][0] && typeof o[0][0] == "number" ? [o] : o, a = [0, 0];
279
+ const n = s, r = Math.max(e, 0.1), a = o[0] && o[0][0] && typeof o[0][0] == "number" ? [o] : o, i = [0, 0];
280
280
  if (n)
281
- for (const u of i)
282
- Te(u, a, n);
283
- const c = ht(i, r, t);
281
+ for (const u of a)
282
+ Te(u, i, n);
283
+ const c = ht(a, r, t);
284
284
  if (n) {
285
- for (const u of i)
286
- Te(u, a, -n);
287
- ct(c, a, -n);
285
+ for (const u of a)
286
+ Te(u, i, -n);
287
+ ct(c, i, -n);
288
288
  }
289
289
  return c;
290
290
  }
@@ -312,28 +312,28 @@ function ht(o, e, s) {
312
312
  }
313
313
  if (r.sort((u, l) => u.ymin < l.ymin ? -1 : u.ymin > l.ymin ? 1 : u.x < l.x ? -1 : u.x > l.x ? 1 : u.ymax === l.ymax ? 0 : (u.ymax - l.ymax) / Math.abs(u.ymax - l.ymax)), !r.length)
314
314
  return n;
315
- let i = [], a = r[0].ymin, c = 0;
316
- for (; i.length || r.length; ) {
315
+ let a = [], i = r[0].ymin, c = 0;
316
+ for (; a.length || r.length; ) {
317
317
  if (r.length) {
318
318
  let u = -1;
319
- for (let h = 0; h < r.length && !(r[h].ymin > a); h++)
319
+ for (let h = 0; h < r.length && !(r[h].ymin > i); h++)
320
320
  u = h;
321
321
  r.splice(0, u + 1).forEach((h) => {
322
- i.push({ s: a, edge: h });
322
+ a.push({ s: i, edge: h });
323
323
  });
324
324
  }
325
- if (i = i.filter((u) => !(u.edge.ymax <= a)), i.sort((u, l) => u.edge.x === l.edge.x ? 0 : (u.edge.x - l.edge.x) / Math.abs(u.edge.x - l.edge.x)), (s !== 1 || c % e === 0) && i.length > 1)
326
- for (let u = 0; u < i.length; u = u + 2) {
325
+ if (a = a.filter((u) => !(u.edge.ymax <= i)), a.sort((u, l) => u.edge.x === l.edge.x ? 0 : (u.edge.x - l.edge.x) / Math.abs(u.edge.x - l.edge.x)), (s !== 1 || c % e === 0) && a.length > 1)
326
+ for (let u = 0; u < a.length; u = u + 2) {
327
327
  const l = u + 1;
328
- if (l >= i.length)
328
+ if (l >= a.length)
329
329
  break;
330
- const h = i[u].edge, f = i[l].edge;
330
+ const h = a[u].edge, f = a[l].edge;
331
331
  n.push([
332
- [Math.round(h.x), a],
333
- [Math.round(f.x), a]
332
+ [Math.round(h.x), i],
333
+ [Math.round(f.x), i]
334
334
  ]);
335
335
  }
336
- a += s, i.forEach((u) => {
336
+ i += s, a.forEach((u) => {
337
337
  u.edge.x = u.edge.x + s * u.edge.islope;
338
338
  }), c++;
339
339
  }
@@ -373,16 +373,16 @@ class ft extends Le {
373
373
  fillPolygons(e, s) {
374
374
  let t = s.hachureGap;
375
375
  t < 0 && (t = s.strokeWidth * 4), t = Math.max(t, 0.1);
376
- const n = Object.assign({}, s, { hachureGap: t }), r = J(e, n), i = Math.PI / 180 * s.hachureAngle, a = [], c = t * 0.5 * Math.cos(i), u = t * 0.5 * Math.sin(i);
376
+ const n = Object.assign({}, s, { hachureGap: t }), r = J(e, n), a = Math.PI / 180 * s.hachureAngle, i = [], c = t * 0.5 * Math.cos(a), u = t * 0.5 * Math.sin(a);
377
377
  for (const [h, f] of r)
378
- we([h, f]) && a.push([
378
+ we([h, f]) && i.push([
379
379
  [h[0] - c, h[1] + u],
380
380
  [...f]
381
381
  ], [
382
382
  [h[0] + c, h[1] - u],
383
383
  [...f]
384
384
  ]);
385
- return { type: "fillSketch", ops: this.renderLines(a, s) };
385
+ return { type: "fillSketch", ops: this.renderLines(i, s) };
386
386
  }
387
387
  }
388
388
  class dt extends Le {
@@ -406,11 +406,11 @@ class pt {
406
406
  n < 0 && (n = s.strokeWidth * 4), n = Math.max(n, 0.1);
407
407
  let r = s.fillWeight;
408
408
  r < 0 && (r = s.strokeWidth / 2);
409
- const i = n / 4;
410
- for (const a of e) {
411
- const c = we(a), u = c / n, l = Math.ceil(u) - 1, h = c - l * n, f = (a[0][0] + a[1][0]) / 2 - n / 4, d = Math.min(a[0][1], a[1][1]);
409
+ const a = n / 4;
410
+ for (const i of e) {
411
+ const c = we(i), u = c / n, l = Math.ceil(u) - 1, h = c - l * n, f = (i[0][0] + i[1][0]) / 2 - n / 4, d = Math.min(i[0][1], i[1][1]);
412
412
  for (let g = 0; g < l; g++) {
413
- const m = d + h + g * n, b = f - i + Math.random() * 2 * i, v = m - i + Math.random() * 2 * i, y = this.helper.ellipse(b, v, r, r, s);
413
+ const m = d + h + g * n, k = f - a + Math.random() * 2 * a, v = m - a + Math.random() * 2 * a, y = this.helper.ellipse(k, v, r, r, s);
414
414
  t.push(...y.ops);
415
415
  }
416
416
  }
@@ -427,14 +427,14 @@ class gt {
427
427
  }
428
428
  dashedLine(e, s) {
429
429
  const t = s.dashOffset < 0 ? s.hachureGap < 0 ? s.strokeWidth * 4 : s.hachureGap : s.dashOffset, n = s.dashGap < 0 ? s.hachureGap < 0 ? s.strokeWidth * 4 : s.hachureGap : s.dashGap, r = [];
430
- return e.forEach((i) => {
431
- const a = we(i), c = Math.floor(a / (t + n)), u = (a + n - c * (t + n)) / 2;
432
- let l = i[0], h = i[1];
433
- l[0] > h[0] && (l = i[1], h = i[0]);
430
+ return e.forEach((a) => {
431
+ const i = we(a), c = Math.floor(i / (t + n)), u = (i + n - c * (t + n)) / 2;
432
+ let l = a[0], h = a[1];
433
+ l[0] > h[0] && (l = a[1], h = a[0]);
434
434
  const f = Math.atan((h[1] - l[1]) / (h[0] - l[0]));
435
435
  for (let d = 0; d < c; d++) {
436
- const g = d * (t + n), m = g + t, b = [l[0] + g * Math.cos(f) + u * Math.cos(f), l[1] + g * Math.sin(f) + u * Math.sin(f)], v = [l[0] + m * Math.cos(f) + u * Math.cos(f), l[1] + m * Math.sin(f) + u * Math.sin(f)];
437
- r.push(...this.helper.doubleLineOps(b[0], b[1], v[0], v[1], s));
436
+ const g = d * (t + n), m = g + t, k = [l[0] + g * Math.cos(f) + u * Math.cos(f), l[1] + g * Math.sin(f) + u * Math.sin(f)], v = [l[0] + m * Math.cos(f) + u * Math.cos(f), l[1] + m * Math.sin(f) + u * Math.sin(f)];
437
+ r.push(...this.helper.doubleLineOps(k[0], k[1], v[0], v[1], s));
438
438
  }
439
439
  }), r;
440
440
  }
@@ -452,13 +452,13 @@ class mt {
452
452
  zigzagLines(e, s, t) {
453
453
  const n = [];
454
454
  return e.forEach((r) => {
455
- const i = we(r), a = Math.round(i / (2 * s));
455
+ const a = we(r), i = Math.round(a / (2 * s));
456
456
  let c = r[0], u = r[1];
457
457
  c[0] > u[0] && (c = r[1], u = r[0]);
458
458
  const l = Math.atan((u[1] - c[1]) / (u[0] - c[0]));
459
- for (let h = 0; h < a; h++) {
460
- const f = h * 2 * s, d = (h + 1) * 2 * s, g = Math.sqrt(2 * Math.pow(s, 2)), m = [c[0] + f * Math.cos(l), c[1] + f * Math.sin(l)], b = [c[0] + d * Math.cos(l), c[1] + d * Math.sin(l)], v = [m[0] + g * Math.cos(l + Math.PI / 4), m[1] + g * Math.sin(l + Math.PI / 4)];
461
- n.push(...this.helper.doubleLineOps(m[0], m[1], v[0], v[1], t), ...this.helper.doubleLineOps(v[0], v[1], b[0], b[1], t));
459
+ for (let h = 0; h < i; h++) {
460
+ const f = h * 2 * s, d = (h + 1) * 2 * s, g = Math.sqrt(2 * Math.pow(s, 2)), m = [c[0] + f * Math.cos(l), c[1] + f * Math.sin(l)], k = [c[0] + d * Math.cos(l), c[1] + d * Math.sin(l)], v = [m[0] + g * Math.cos(l + Math.PI / 4), m[1] + g * Math.sin(l + Math.PI / 4)];
461
+ n.push(...this.helper.doubleLineOps(m[0], m[1], v[0], v[1], t), ...this.helper.doubleLineOps(v[0], v[1], k[0], k[1], t));
462
462
  }
463
463
  }), n;
464
464
  }
@@ -521,25 +521,25 @@ function Ae(o) {
521
521
  const e = [], s = Mt(o);
522
522
  let t = "BOD", n = 0, r = s[n];
523
523
  for (; !_e(r, Be); ) {
524
- let i = 0;
525
- const a = [];
524
+ let a = 0;
525
+ const i = [];
526
526
  if (t === "BOD")
527
527
  if (r.text === "M" || r.text === "m")
528
- n++, i = le[r.text], t = r.text;
528
+ n++, a = le[r.text], t = r.text;
529
529
  else
530
530
  return Ae("M0,0" + o);
531
- else _e(r, xe) ? i = le[t] : (n++, i = le[r.text], t = r.text);
532
- if (n + i < s.length) {
533
- for (let c = n; c < n + i; c++) {
531
+ else _e(r, xe) ? a = le[t] : (n++, a = le[r.text], t = r.text);
532
+ if (n + a < s.length) {
533
+ for (let c = n; c < n + a; c++) {
534
534
  const u = s[c];
535
535
  if (_e(u, xe))
536
- a[a.length] = +u.text;
536
+ i[i.length] = +u.text;
537
537
  else
538
538
  throw new Error("Param not a number: " + t + "," + u.text);
539
539
  }
540
540
  if (typeof le[t] == "number") {
541
- const c = { key: t, data: a };
542
- e.push(c), n += i, r = s[n], t === "M" && (t = "L"), t === "m" && (t = "l");
541
+ const c = { key: t, data: i };
542
+ e.push(c), n += a, r = s[n], t === "M" && (t = "L"), t === "m" && (t = "l");
543
543
  } else
544
544
  throw new Error("Bad segment: " + t);
545
545
  } else
@@ -550,67 +550,67 @@ function Ae(o) {
550
550
  function Ze(o) {
551
551
  let e = 0, s = 0, t = 0, n = 0;
552
552
  const r = [];
553
- for (const { key: i, data: a } of o)
554
- switch (i) {
553
+ for (const { key: a, data: i } of o)
554
+ switch (a) {
555
555
  case "M":
556
- r.push({ key: "M", data: [...a] }), [e, s] = a, [t, n] = a;
556
+ r.push({ key: "M", data: [...i] }), [e, s] = i, [t, n] = i;
557
557
  break;
558
558
  case "m":
559
- e += a[0], s += a[1], r.push({ key: "M", data: [e, s] }), t = e, n = s;
559
+ e += i[0], s += i[1], r.push({ key: "M", data: [e, s] }), t = e, n = s;
560
560
  break;
561
561
  case "L":
562
- r.push({ key: "L", data: [...a] }), [e, s] = a;
562
+ r.push({ key: "L", data: [...i] }), [e, s] = i;
563
563
  break;
564
564
  case "l":
565
- e += a[0], s += a[1], r.push({ key: "L", data: [e, s] });
565
+ e += i[0], s += i[1], r.push({ key: "L", data: [e, s] });
566
566
  break;
567
567
  case "C":
568
- r.push({ key: "C", data: [...a] }), e = a[4], s = a[5];
568
+ r.push({ key: "C", data: [...i] }), e = i[4], s = i[5];
569
569
  break;
570
570
  case "c": {
571
- const c = a.map((u, l) => l % 2 ? u + s : u + e);
571
+ const c = i.map((u, l) => l % 2 ? u + s : u + e);
572
572
  r.push({ key: "C", data: c }), e = c[4], s = c[5];
573
573
  break;
574
574
  }
575
575
  case "Q":
576
- r.push({ key: "Q", data: [...a] }), e = a[2], s = a[3];
576
+ r.push({ key: "Q", data: [...i] }), e = i[2], s = i[3];
577
577
  break;
578
578
  case "q": {
579
- const c = a.map((u, l) => l % 2 ? u + s : u + e);
579
+ const c = i.map((u, l) => l % 2 ? u + s : u + e);
580
580
  r.push({ key: "Q", data: c }), e = c[2], s = c[3];
581
581
  break;
582
582
  }
583
583
  case "A":
584
- r.push({ key: "A", data: [...a] }), e = a[5], s = a[6];
584
+ r.push({ key: "A", data: [...i] }), e = i[5], s = i[6];
585
585
  break;
586
586
  case "a":
587
- e += a[5], s += a[6], r.push({ key: "A", data: [a[0], a[1], a[2], a[3], a[4], e, s] });
587
+ e += i[5], s += i[6], r.push({ key: "A", data: [i[0], i[1], i[2], i[3], i[4], e, s] });
588
588
  break;
589
589
  case "H":
590
- r.push({ key: "H", data: [...a] }), e = a[0];
590
+ r.push({ key: "H", data: [...i] }), e = i[0];
591
591
  break;
592
592
  case "h":
593
- e += a[0], r.push({ key: "H", data: [e] });
593
+ e += i[0], r.push({ key: "H", data: [e] });
594
594
  break;
595
595
  case "V":
596
- r.push({ key: "V", data: [...a] }), s = a[0];
596
+ r.push({ key: "V", data: [...i] }), s = i[0];
597
597
  break;
598
598
  case "v":
599
- s += a[0], r.push({ key: "V", data: [s] });
599
+ s += i[0], r.push({ key: "V", data: [s] });
600
600
  break;
601
601
  case "S":
602
- r.push({ key: "S", data: [...a] }), e = a[2], s = a[3];
602
+ r.push({ key: "S", data: [...i] }), e = i[2], s = i[3];
603
603
  break;
604
604
  case "s": {
605
- const c = a.map((u, l) => l % 2 ? u + s : u + e);
605
+ const c = i.map((u, l) => l % 2 ? u + s : u + e);
606
606
  r.push({ key: "S", data: c }), e = c[2], s = c[3];
607
607
  break;
608
608
  }
609
609
  case "T":
610
- r.push({ key: "T", data: [...a] }), e = a[0], s = a[1];
610
+ r.push({ key: "T", data: [...i] }), e = i[0], s = i[1];
611
611
  break;
612
612
  case "t":
613
- e += a[0], s += a[1], r.push({ key: "T", data: [e, s] });
613
+ e += i[0], s += i[1], r.push({ key: "T", data: [e, s] });
614
614
  break;
615
615
  case "Z":
616
616
  case "z":
@@ -621,14 +621,14 @@ function Ze(o) {
621
621
  }
622
622
  function Xe(o) {
623
623
  const e = [];
624
- let s = "", t = 0, n = 0, r = 0, i = 0, a = 0, c = 0;
624
+ let s = "", t = 0, n = 0, r = 0, a = 0, i = 0, c = 0;
625
625
  for (const { key: u, data: l } of o) {
626
626
  switch (u) {
627
627
  case "M":
628
- e.push({ key: "M", data: [...l] }), [t, n] = l, [r, i] = l;
628
+ e.push({ key: "M", data: [...l] }), [t, n] = l, [r, a] = l;
629
629
  break;
630
630
  case "C":
631
- e.push({ key: "C", data: [...l] }), t = l[4], n = l[5], a = l[2], c = l[3];
631
+ e.push({ key: "C", data: [...l] }), t = l[4], n = l[5], i = l[2], c = l[3];
632
632
  break;
633
633
  case "L":
634
634
  e.push({ key: "L", data: [...l] }), [t, n] = l;
@@ -641,31 +641,31 @@ function Xe(o) {
641
641
  break;
642
642
  case "S": {
643
643
  let h = 0, f = 0;
644
- s === "C" || s === "S" ? (h = t + (t - a), f = n + (n - c)) : (h = t, f = n), e.push({ key: "C", data: [h, f, ...l] }), a = l[0], c = l[1], t = l[2], n = l[3];
644
+ s === "C" || s === "S" ? (h = t + (t - i), f = n + (n - c)) : (h = t, f = n), e.push({ key: "C", data: [h, f, ...l] }), i = l[0], c = l[1], t = l[2], n = l[3];
645
645
  break;
646
646
  }
647
647
  case "T": {
648
648
  const [h, f] = l;
649
649
  let d = 0, g = 0;
650
- s === "Q" || s === "T" ? (d = t + (t - a), g = n + (n - c)) : (d = t, g = n);
651
- const m = t + 2 * (d - t) / 3, b = n + 2 * (g - n) / 3, v = h + 2 * (d - h) / 3, y = f + 2 * (g - f) / 3;
652
- e.push({ key: "C", data: [m, b, v, y, h, f] }), a = d, c = g, t = h, n = f;
650
+ s === "Q" || s === "T" ? (d = t + (t - i), g = n + (n - c)) : (d = t, g = n);
651
+ const m = t + 2 * (d - t) / 3, k = n + 2 * (g - n) / 3, v = h + 2 * (d - h) / 3, y = f + 2 * (g - f) / 3;
652
+ e.push({ key: "C", data: [m, k, v, y, h, f] }), i = d, c = g, t = h, n = f;
653
653
  break;
654
654
  }
655
655
  case "Q": {
656
- const [h, f, d, g] = l, m = t + 2 * (h - t) / 3, b = n + 2 * (f - n) / 3, v = d + 2 * (h - d) / 3, y = g + 2 * (f - g) / 3;
657
- e.push({ key: "C", data: [m, b, v, y, d, g] }), a = h, c = f, t = d, n = g;
656
+ const [h, f, d, g] = l, m = t + 2 * (h - t) / 3, k = n + 2 * (f - n) / 3, v = d + 2 * (h - d) / 3, y = g + 2 * (f - g) / 3;
657
+ e.push({ key: "C", data: [m, k, v, y, d, g] }), i = h, c = f, t = d, n = g;
658
658
  break;
659
659
  }
660
660
  case "A": {
661
- const h = Math.abs(l[0]), f = Math.abs(l[1]), d = l[2], g = l[3], m = l[4], b = l[5], v = l[6];
662
- h === 0 || f === 0 ? (e.push({ key: "C", data: [t, n, b, v, b, v] }), t = b, n = v) : (t !== b || n !== v) && (Ue(t, n, b, v, h, f, d, g, m).forEach(function(C) {
663
- e.push({ key: "C", data: C });
664
- }), t = b, n = v);
661
+ const h = Math.abs(l[0]), f = Math.abs(l[1]), d = l[2], g = l[3], m = l[4], k = l[5], v = l[6];
662
+ h === 0 || f === 0 ? (e.push({ key: "C", data: [t, n, k, v, k, v] }), t = k, n = v) : (t !== k || n !== v) && (Ue(t, n, k, v, h, f, d, g, m).forEach(function(D) {
663
+ e.push({ key: "C", data: D });
664
+ }), t = k, n = v);
665
665
  break;
666
666
  }
667
667
  case "Z":
668
- e.push({ key: "Z", data: [] }), t = r, n = i;
668
+ e.push({ key: "Z", data: [] }), t = r, n = a;
669
669
  break;
670
670
  }
671
671
  s = u;
@@ -675,58 +675,58 @@ function Xe(o) {
675
675
  function yt(o) {
676
676
  return Math.PI * o / 180;
677
677
  }
678
- function U(o, e, s) {
678
+ function X(o, e, s) {
679
679
  const t = o * Math.cos(s) - e * Math.sin(s), n = o * Math.sin(s) + e * Math.cos(s);
680
680
  return [t, n];
681
681
  }
682
- function Ue(o, e, s, t, n, r, i, a, c, u) {
683
- const l = yt(i);
682
+ function Ue(o, e, s, t, n, r, a, i, c, u) {
683
+ const l = yt(a);
684
684
  let h = [], f = 0, d = 0, g = 0, m = 0;
685
685
  if (u)
686
686
  [f, d, g, m] = u;
687
687
  else {
688
- [o, e] = U(o, e, -l), [s, t] = U(s, t, -l);
688
+ [o, e] = X(o, e, -l), [s, t] = X(s, t, -l);
689
689
  const x = (o - s) / 2, S = (e - t) / 2;
690
- let $ = x * x / (n * n) + S * S / (r * r);
691
- $ > 1 && ($ = Math.sqrt($), n = $ * n, r = $ * r);
692
- const W = a === c ? -1 : 1, I = n * n, q = r * r, oe = I * q - I * S * S - q * x * x, ae = I * S * S + q * x * x, B = W * Math.sqrt(Math.abs(oe / ae));
693
- g = B * n * S / r + (o + s) / 2, m = B * -r * x / n + (e + t) / 2, f = Math.asin(parseFloat(((e - m) / r).toFixed(9))), d = Math.asin(parseFloat(((t - m) / r).toFixed(9))), o < g && (f = Math.PI - f), s < g && (d = Math.PI - d), f < 0 && (f = Math.PI * 2 + f), d < 0 && (d = Math.PI * 2 + d), c && f > d && (f = f - Math.PI * 2), !c && d > f && (d = d - Math.PI * 2);
694
- }
695
- let b = d - f;
696
- if (Math.abs(b) > Math.PI * 120 / 180) {
697
- const x = d, S = s, $ = t;
698
- c && d > f ? d = f + Math.PI * 120 / 180 * 1 : d = f + Math.PI * 120 / 180 * -1, s = g + n * Math.cos(d), t = m + r * Math.sin(d), h = Ue(s, t, S, $, n, r, i, 0, c, [d, x, g, m]);
699
- }
700
- b = d - f;
701
- const v = Math.cos(f), y = Math.sin(f), C = Math.cos(d), z = Math.sin(d), N = Math.tan(b / 4), ee = 4 / 3 * n * N, te = 4 / 3 * r * N, se = [o, e], D = [o + ee * y, e - te * v], ne = [s + ee * z, t - te * C], re = [s, t];
702
- if (D[0] = 2 * se[0] - D[0], D[1] = 2 * se[1] - D[1], u)
703
- return [D, ne, re].concat(h);
690
+ let j = x * x / (n * n) + S * S / (r * r);
691
+ j > 1 && (j = Math.sqrt(j), n = j * n, r = j * r);
692
+ const I = i === c ? -1 : 1, z = n * n, q = r * r, oe = z * q - z * S * S - q * x * x, ie = z * S * S + q * x * x, Y = I * Math.sqrt(Math.abs(oe / ie));
693
+ g = Y * n * S / r + (o + s) / 2, m = Y * -r * x / n + (e + t) / 2, f = Math.asin(parseFloat(((e - m) / r).toFixed(9))), d = Math.asin(parseFloat(((t - m) / r).toFixed(9))), o < g && (f = Math.PI - f), s < g && (d = Math.PI - d), f < 0 && (f = Math.PI * 2 + f), d < 0 && (d = Math.PI * 2 + d), c && f > d && (f = f - Math.PI * 2), !c && d > f && (d = d - Math.PI * 2);
694
+ }
695
+ let k = d - f;
696
+ if (Math.abs(k) > Math.PI * 120 / 180) {
697
+ const x = d, S = s, j = t;
698
+ c && d > f ? d = f + Math.PI * 120 / 180 * 1 : d = f + Math.PI * 120 / 180 * -1, s = g + n * Math.cos(d), t = m + r * Math.sin(d), h = Ue(s, t, S, j, n, r, a, 0, c, [d, x, g, m]);
699
+ }
700
+ k = d - f;
701
+ const v = Math.cos(f), y = Math.sin(f), D = Math.cos(d), H = Math.sin(d), F = Math.tan(k / 4), ee = 4 / 3 * n * F, te = 4 / 3 * r * F, se = [o, e], $ = [o + ee * y, e - te * v], ne = [s + ee * H, t - te * D], re = [s, t];
702
+ if ($[0] = 2 * se[0] - $[0], $[1] = 2 * se[1] - $[1], u)
703
+ return [$, ne, re].concat(h);
704
704
  {
705
- h = [D, ne, re].concat(h);
705
+ h = [$, ne, re].concat(h);
706
706
  const x = [];
707
707
  for (let S = 0; S < h.length; S += 3) {
708
- const $ = U(h[S][0], h[S][1], l), W = U(h[S + 1][0], h[S + 1][1], l), I = U(h[S + 2][0], h[S + 2][1], l);
709
- x.push([$[0], $[1], W[0], W[1], I[0], I[1]]);
708
+ const j = X(h[S][0], h[S][1], l), I = X(h[S + 1][0], h[S + 1][1], l), z = X(h[S + 2][0], h[S + 2][1], l);
709
+ x.push([j[0], j[1], I[0], I[1], z[0], z[1]]);
710
710
  }
711
711
  return x;
712
712
  }
713
713
  }
714
714
  const _t = {
715
715
  randOffset: Ot,
716
- randOffsetWithRange: Et,
716
+ randOffsetWithRange: Rt,
717
717
  ellipse: Tt,
718
- doubleLineOps: Rt
718
+ doubleLineOps: Et
719
719
  };
720
720
  function Qe(o, e, s, t, n) {
721
- return { type: "path", ops: H(o, e, s, t, n) };
721
+ return { type: "path", ops: N(o, e, s, t, n) };
722
722
  }
723
723
  function de(o, e, s) {
724
724
  const t = (o || []).length;
725
725
  if (t > 2) {
726
726
  const n = [];
727
727
  for (let r = 0; r < t - 1; r++)
728
- n.push(...H(o[r][0], o[r][1], o[r + 1][0], o[r + 1][1], s));
729
- return e && n.push(...H(o[t - 1][0], o[t - 1][1], o[0][0], o[0][1], s)), { type: "path", ops: n };
728
+ n.push(...N(o[r][0], o[r][1], o[r + 1][0], o[r + 1][1], s));
729
+ return e && n.push(...N(o[t - 1][0], o[t - 1][1], o[0][0], o[0][1], s)), { type: "path", ops: n };
730
730
  } else if (t === 2)
731
731
  return Qe(o[0][0], o[0][1], o[1][0], o[1][1], s);
732
732
  return { type: "path", ops: [] };
@@ -743,13 +743,13 @@ function Pt(o, e, s, t, n) {
743
743
  ];
744
744
  return St(r, n);
745
745
  }
746
- function De(o, e) {
746
+ function ze(o, e) {
747
747
  if (o.length) {
748
748
  const t = typeof o[0][0] == "number" ? [o] : o, n = ue(t[0], 1 * (1 + e.roughness * 0.2), e), r = e.disableMultiStroke ? [] : ue(t[0], 1.5 * (1 + e.roughness * 0.22), We(e));
749
- for (let i = 1; i < t.length; i++) {
750
- const a = t[i];
751
- if (a.length) {
752
- const c = ue(a, 1 * (1 + e.roughness * 0.2), e), u = e.disableMultiStroke ? [] : ue(a, 1.5 * (1 + e.roughness * 0.22), We(e));
749
+ for (let a = 1; a < t.length; a++) {
750
+ const i = t[a];
751
+ if (i.length) {
752
+ const c = ue(i, 1 * (1 + e.roughness * 0.2), e), u = e.disableMultiStroke ? [] : ue(i, 1.5 * (1 + e.roughness * 0.22), We(e));
753
753
  for (const l of c)
754
754
  l.op !== "move" && n.push(l);
755
755
  for (const l of u)
@@ -766,56 +766,56 @@ function Tt(o, e, s, t, n) {
766
766
  }
767
767
  function Je(o, e, s) {
768
768
  const t = Math.sqrt(Math.PI * 2 * Math.sqrt((Math.pow(o / 2, 2) + Math.pow(e / 2, 2)) / 2)), n = Math.ceil(Math.max(s.curveStepCount, s.curveStepCount / Math.sqrt(200) * t)), r = Math.PI * 2 / n;
769
- let i = Math.abs(o / 2), a = Math.abs(e / 2);
769
+ let a = Math.abs(o / 2), i = Math.abs(e / 2);
770
770
  const c = 1 - s.curveFitting;
771
- return i += k(i * c, s), a += k(a * c, s), { increment: r, rx: i, ry: a };
771
+ return a += b(a * c, s), i += b(i * c, s), { increment: r, rx: a, ry: i };
772
772
  }
773
773
  function Oe(o, e, s, t) {
774
774
  const [n, r] = He(t.increment, o, e, t.rx, t.ry, 1, t.increment * me(0.1, me(0.4, 1, s), s), s);
775
- let i = ke(n, null, s);
775
+ let a = ke(n, null, s);
776
776
  if (!s.disableMultiStroke && s.roughness !== 0) {
777
- const [a] = He(t.increment, o, e, t.rx, t.ry, 1.5, 0, s), c = ke(a, null, s);
778
- i = i.concat(c);
777
+ const [i] = He(t.increment, o, e, t.rx, t.ry, 1.5, 0, s), c = ke(i, null, s);
778
+ a = a.concat(c);
779
779
  }
780
780
  return {
781
781
  estimatedPoints: r,
782
- opset: { type: "path", ops: i }
782
+ opset: { type: "path", ops: a }
783
783
  };
784
784
  }
785
- function Ie(o, e, s, t, n, r, i, a, c) {
785
+ function Ie(o, e, s, t, n, r, a, i, c) {
786
786
  const u = o, l = e;
787
787
  let h = Math.abs(s / 2), f = Math.abs(t / 2);
788
- h += k(h * 0.01, c), f += k(f * 0.01, c);
788
+ h += b(h * 0.01, c), f += b(f * 0.01, c);
789
789
  let d = n, g = r;
790
790
  for (; d < 0; )
791
791
  d += Math.PI * 2, g += Math.PI * 2;
792
792
  g - d > Math.PI * 2 && (d = 0, g = Math.PI * 2);
793
- const m = Math.PI * 2 / c.curveStepCount, b = Math.min(m / 2, (g - d) / 2), v = Fe(b, u, l, h, f, d, g, 1, c);
793
+ const m = Math.PI * 2 / c.curveStepCount, k = Math.min(m / 2, (g - d) / 2), v = Fe(k, u, l, h, f, d, g, 1, c);
794
794
  if (!c.disableMultiStroke) {
795
- const y = Fe(b, u, l, h, f, d, g, 1.5, c);
795
+ const y = Fe(k, u, l, h, f, d, g, 1.5, c);
796
796
  v.push(...y);
797
797
  }
798
- return i && (a ? v.push(...H(u, l, u + h * Math.cos(d), l + f * Math.sin(d), c), ...H(u, l, u + h * Math.cos(g), l + f * Math.sin(g), c)) : v.push({ op: "lineTo", data: [u, l] }, { op: "lineTo", data: [u + h * Math.cos(d), l + f * Math.sin(d)] })), { type: "path", ops: v };
798
+ return a && (i ? v.push(...N(u, l, u + h * Math.cos(d), l + f * Math.sin(d), c), ...N(u, l, u + h * Math.cos(g), l + f * Math.sin(g), c)) : v.push({ op: "lineTo", data: [u, l] }, { op: "lineTo", data: [u + h * Math.cos(d), l + f * Math.sin(d)] })), { type: "path", ops: v };
799
799
  }
800
800
  function Ne(o, e) {
801
801
  const s = Xe(Ze(Ae(o))), t = [];
802
802
  let n = [0, 0], r = [0, 0];
803
- for (const { key: i, data: a } of s)
804
- switch (i) {
803
+ for (const { key: a, data: i } of s)
804
+ switch (a) {
805
805
  case "M": {
806
- r = [a[0], a[1]], n = [a[0], a[1]];
806
+ r = [i[0], i[1]], n = [i[0], i[1]];
807
807
  break;
808
808
  }
809
809
  case "L":
810
- t.push(...H(r[0], r[1], a[0], a[1], e)), r = [a[0], a[1]];
810
+ t.push(...N(r[0], r[1], i[0], i[1], e)), r = [i[0], i[1]];
811
811
  break;
812
812
  case "C": {
813
- const [c, u, l, h, f, d] = a;
813
+ const [c, u, l, h, f, d] = i;
814
814
  t.push(...Ct(c, u, l, h, f, d, r, e)), r = [f, d];
815
815
  break;
816
816
  }
817
817
  case "Z":
818
- t.push(...H(r[0], r[1], n[0], n[1], e)), r = [n[0], n[1]];
818
+ t.push(...N(r[0], r[1], n[0], n[1], e)), r = [n[0], n[1]];
819
819
  break;
820
820
  }
821
821
  return { type: "path", ops: t };
@@ -826,9 +826,9 @@ function Se(o, e) {
826
826
  if (t.length) {
827
827
  const n = e.maxRandomnessOffset || 0, r = t.length;
828
828
  if (r > 2) {
829
- s.push({ op: "move", data: [t[0][0] + k(n, e), t[0][1] + k(n, e)] });
830
- for (let i = 1; i < r; i++)
831
- s.push({ op: "lineTo", data: [t[i][0] + k(n, e), t[i][1] + k(n, e)] });
829
+ s.push({ op: "move", data: [t[0][0] + b(n, e), t[0][1] + b(n, e)] });
830
+ for (let a = 1; a < r; a++)
831
+ s.push({ op: "lineTo", data: [t[a][0] + b(n, e), t[a][1] + b(n, e)] });
832
832
  }
833
833
  }
834
834
  return { type: "fillPath", ops: s };
@@ -836,27 +836,27 @@ function Se(o, e) {
836
836
  function V(o, e) {
837
837
  return kt(e, _t).fillPolygons(o, e);
838
838
  }
839
- function xt(o, e, s, t, n, r, i) {
840
- const a = o, c = e;
839
+ function xt(o, e, s, t, n, r, a) {
840
+ const i = o, c = e;
841
841
  let u = Math.abs(s / 2), l = Math.abs(t / 2);
842
- u += k(u * 0.01, i), l += k(l * 0.01, i);
842
+ u += b(u * 0.01, a), l += b(l * 0.01, a);
843
843
  let h = n, f = r;
844
844
  for (; h < 0; )
845
845
  h += Math.PI * 2, f += Math.PI * 2;
846
846
  f - h > Math.PI * 2 && (h = 0, f = Math.PI * 2);
847
- const d = (f - h) / i.curveStepCount, g = [];
847
+ const d = (f - h) / a.curveStepCount, g = [];
848
848
  for (let m = h; m <= f; m = m + d)
849
- g.push([a + u * Math.cos(m), c + l * Math.sin(m)]);
850
- return g.push([a + u * Math.cos(f), c + l * Math.sin(f)]), g.push([a, c]), V([g], i);
849
+ g.push([i + u * Math.cos(m), c + l * Math.sin(m)]);
850
+ return g.push([i + u * Math.cos(f), c + l * Math.sin(f)]), g.push([i, c]), V([g], a);
851
851
  }
852
852
  function Ot(o, e) {
853
- return k(o, e);
853
+ return b(o, e);
854
854
  }
855
- function Et(o, e, s) {
855
+ function Rt(o, e, s) {
856
856
  return me(o, e, s);
857
857
  }
858
- function Rt(o, e, s, t, n) {
859
- return H(o, e, s, t, n, !0);
858
+ function Et(o, e, s, t, n) {
859
+ return N(o, e, s, t, n, !0);
860
860
  }
861
861
  function We(o) {
862
862
  const e = Object.assign({}, o);
@@ -868,47 +868,47 @@ function Ke(o) {
868
868
  function me(o, e, s, t = 1) {
869
869
  return s.roughness * t * (Ke(s) * (e - o) + o);
870
870
  }
871
- function k(o, e, s = 1) {
871
+ function b(o, e, s = 1) {
872
872
  return me(-o, o, e, s);
873
873
  }
874
- function H(o, e, s, t, n, r = !1) {
875
- const i = r ? n.disableMultiStrokeFill : n.disableMultiStroke, a = Ee(o, e, s, t, n, !0, !1);
876
- if (i)
877
- return a;
878
- const c = Ee(o, e, s, t, n, !0, !0);
879
- return a.concat(c);
874
+ function N(o, e, s, t, n, r = !1) {
875
+ const a = r ? n.disableMultiStrokeFill : n.disableMultiStroke, i = Re(o, e, s, t, n, !0, !1);
876
+ if (a)
877
+ return i;
878
+ const c = Re(o, e, s, t, n, !0, !0);
879
+ return i.concat(c);
880
880
  }
881
- function Ee(o, e, s, t, n, r, i) {
882
- const a = Math.pow(o - s, 2) + Math.pow(e - t, 2), c = Math.sqrt(a);
881
+ function Re(o, e, s, t, n, r, a) {
882
+ const i = Math.pow(o - s, 2) + Math.pow(e - t, 2), c = Math.sqrt(i);
883
883
  let u = 1;
884
884
  c < 200 ? u = 1 : c > 500 ? u = 0.4 : u = -16668e-7 * c + 1.233334;
885
885
  let l = n.maxRandomnessOffset || 0;
886
- l * l * 100 > a && (l = c / 10);
886
+ l * l * 100 > i && (l = c / 10);
887
887
  const h = l / 2, f = 0.2 + Ke(n) * 0.2;
888
888
  let d = n.bowing * n.maxRandomnessOffset * (t - e) / 200, g = n.bowing * n.maxRandomnessOffset * (o - s) / 200;
889
- d = k(d, n, u), g = k(g, n, u);
890
- const m = [], b = () => k(h, n, u), v = () => k(l, n, u), y = n.preserveVertices;
891
- return i ? m.push({
889
+ d = b(d, n, u), g = b(g, n, u);
890
+ const m = [], k = () => b(h, n, u), v = () => b(l, n, u), y = n.preserveVertices;
891
+ return a ? m.push({
892
892
  op: "move",
893
893
  data: [
894
- o + (y ? 0 : b()),
895
- e + (y ? 0 : b())
894
+ o + (y ? 0 : k()),
895
+ e + (y ? 0 : k())
896
896
  ]
897
897
  }) : m.push({
898
898
  op: "move",
899
899
  data: [
900
- o + (y ? 0 : k(l, n, u)),
901
- e + (y ? 0 : k(l, n, u))
900
+ o + (y ? 0 : b(l, n, u)),
901
+ e + (y ? 0 : b(l, n, u))
902
902
  ]
903
- }), i ? m.push({
903
+ }), a ? m.push({
904
904
  op: "bcurveTo",
905
905
  data: [
906
- d + o + (s - o) * f + b(),
907
- g + e + (t - e) * f + b(),
908
- d + o + 2 * (s - o) * f + b(),
909
- g + e + 2 * (t - e) * f + b(),
910
- s + (y ? 0 : b()),
911
- t + (y ? 0 : b())
906
+ d + o + (s - o) * f + k(),
907
+ g + e + (t - e) * f + k(),
908
+ d + o + 2 * (s - o) * f + k(),
909
+ g + e + 2 * (t - e) * f + k(),
910
+ s + (y ? 0 : k()),
911
+ t + (y ? 0 : k())
912
912
  ]
913
913
  }) : m.push({
914
914
  op: "bcurveTo",
@@ -927,30 +927,30 @@ function ue(o, e, s) {
927
927
  return [];
928
928
  const t = [];
929
929
  t.push([
930
- o[0][0] + k(e, s),
931
- o[0][1] + k(e, s)
930
+ o[0][0] + b(e, s),
931
+ o[0][1] + b(e, s)
932
932
  ]), t.push([
933
- o[0][0] + k(e, s),
934
- o[0][1] + k(e, s)
933
+ o[0][0] + b(e, s),
934
+ o[0][1] + b(e, s)
935
935
  ]);
936
936
  for (let n = 1; n < o.length; n++)
937
937
  t.push([
938
- o[n][0] + k(e, s),
939
- o[n][1] + k(e, s)
938
+ o[n][0] + b(e, s),
939
+ o[n][1] + b(e, s)
940
940
  ]), n === o.length - 1 && t.push([
941
- o[n][0] + k(e, s),
942
- o[n][1] + k(e, s)
941
+ o[n][0] + b(e, s),
942
+ o[n][1] + b(e, s)
943
943
  ]);
944
944
  return ke(t, null, s);
945
945
  }
946
946
  function ke(o, e, s) {
947
947
  const t = o.length, n = [];
948
948
  if (t > 3) {
949
- const r = [], i = 1 - s.curveTightness;
949
+ const r = [], a = 1 - s.curveTightness;
950
950
  n.push({ op: "move", data: [o[1][0], o[1][1]] });
951
- for (let a = 1; a + 2 < t; a++) {
952
- const c = o[a];
953
- r[0] = [c[0], c[1]], r[1] = [c[0] + (i * o[a + 1][0] - i * o[a - 1][0]) / 6, c[1] + (i * o[a + 1][1] - i * o[a - 1][1]) / 6], r[2] = [o[a + 1][0] + (i * o[a][0] - i * o[a + 2][0]) / 6, o[a + 1][1] + (i * o[a][1] - i * o[a + 2][1]) / 6], r[3] = [o[a + 1][0], o[a + 1][1]], n.push({ op: "bcurveTo", data: [r[1][0], r[1][1], r[2][0], r[2][1], r[3][0], r[3][1]] });
951
+ for (let i = 1; i + 2 < t; i++) {
952
+ const c = o[i];
953
+ r[0] = [c[0], c[1]], r[1] = [c[0] + (a * o[i + 1][0] - a * o[i - 1][0]) / 6, c[1] + (a * o[i + 1][1] - a * o[i - 1][1]) / 6], r[2] = [o[i + 1][0] + (a * o[i][0] - a * o[i + 2][0]) / 6, o[i + 1][1] + (a * o[i][1] - a * o[i + 2][1]) / 6], r[3] = [o[i + 1][0], o[i + 1][1]], n.push({ op: "bcurveTo", data: [r[1][0], r[1][1], r[2][0], r[2][1], r[3][0], r[3][1]] });
954
954
  }
955
955
  } else t === 3 ? (n.push({ op: "move", data: [o[1][0], o[1][1]] }), n.push({
956
956
  op: "bcurveTo",
@@ -962,11 +962,11 @@ function ke(o, e, s) {
962
962
  o[2][0],
963
963
  o[2][1]
964
964
  ]
965
- })) : t === 2 && n.push(...Ee(o[0][0], o[0][1], o[1][0], o[1][1], s, !0, !0));
965
+ })) : t === 2 && n.push(...Re(o[0][0], o[0][1], o[1][0], o[1][1], s, !0, !0));
966
966
  return n;
967
967
  }
968
- function He(o, e, s, t, n, r, i, a) {
969
- const c = a.roughness === 0, u = [], l = [];
968
+ function He(o, e, s, t, n, r, a, i) {
969
+ const c = i.roughness === 0, u = [], l = [];
970
970
  if (c) {
971
971
  o = o / 4, l.push([
972
972
  e + t * Math.cos(-o),
@@ -987,70 +987,70 @@ function He(o, e, s, t, n, r, i, a) {
987
987
  s + n * Math.sin(o)
988
988
  ]);
989
989
  } else {
990
- const h = k(0.5, a) - Math.PI / 2;
990
+ const h = b(0.5, i) - Math.PI / 2;
991
991
  l.push([
992
- k(r, a) + e + 0.9 * t * Math.cos(h - o),
993
- k(r, a) + s + 0.9 * n * Math.sin(h - o)
992
+ b(r, i) + e + 0.9 * t * Math.cos(h - o),
993
+ b(r, i) + s + 0.9 * n * Math.sin(h - o)
994
994
  ]);
995
995
  const f = Math.PI * 2 + h - 0.01;
996
996
  for (let d = h; d < f; d = d + o) {
997
997
  const g = [
998
- k(r, a) + e + t * Math.cos(d),
999
- k(r, a) + s + n * Math.sin(d)
998
+ b(r, i) + e + t * Math.cos(d),
999
+ b(r, i) + s + n * Math.sin(d)
1000
1000
  ];
1001
1001
  u.push(g), l.push(g);
1002
1002
  }
1003
1003
  l.push([
1004
- k(r, a) + e + t * Math.cos(h + Math.PI * 2 + i * 0.5),
1005
- k(r, a) + s + n * Math.sin(h + Math.PI * 2 + i * 0.5)
1004
+ b(r, i) + e + t * Math.cos(h + Math.PI * 2 + a * 0.5),
1005
+ b(r, i) + s + n * Math.sin(h + Math.PI * 2 + a * 0.5)
1006
1006
  ]), l.push([
1007
- k(r, a) + e + 0.98 * t * Math.cos(h + i),
1008
- k(r, a) + s + 0.98 * n * Math.sin(h + i)
1007
+ b(r, i) + e + 0.98 * t * Math.cos(h + a),
1008
+ b(r, i) + s + 0.98 * n * Math.sin(h + a)
1009
1009
  ]), l.push([
1010
- k(r, a) + e + 0.9 * t * Math.cos(h + i * 0.5),
1011
- k(r, a) + s + 0.9 * n * Math.sin(h + i * 0.5)
1010
+ b(r, i) + e + 0.9 * t * Math.cos(h + a * 0.5),
1011
+ b(r, i) + s + 0.9 * n * Math.sin(h + a * 0.5)
1012
1012
  ]);
1013
1013
  }
1014
1014
  return [l, u];
1015
1015
  }
1016
- function Fe(o, e, s, t, n, r, i, a, c) {
1017
- const u = r + k(0.1, c), l = [];
1016
+ function Fe(o, e, s, t, n, r, a, i, c) {
1017
+ const u = r + b(0.1, c), l = [];
1018
1018
  l.push([
1019
- k(a, c) + e + 0.9 * t * Math.cos(u - o),
1020
- k(a, c) + s + 0.9 * n * Math.sin(u - o)
1019
+ b(i, c) + e + 0.9 * t * Math.cos(u - o),
1020
+ b(i, c) + s + 0.9 * n * Math.sin(u - o)
1021
1021
  ]);
1022
- for (let h = u; h <= i; h = h + o)
1022
+ for (let h = u; h <= a; h = h + o)
1023
1023
  l.push([
1024
- k(a, c) + e + t * Math.cos(h),
1025
- k(a, c) + s + n * Math.sin(h)
1024
+ b(i, c) + e + t * Math.cos(h),
1025
+ b(i, c) + s + n * Math.sin(h)
1026
1026
  ]);
1027
1027
  return l.push([
1028
- e + t * Math.cos(i),
1029
- s + n * Math.sin(i)
1028
+ e + t * Math.cos(a),
1029
+ s + n * Math.sin(a)
1030
1030
  ]), l.push([
1031
- e + t * Math.cos(i),
1032
- s + n * Math.sin(i)
1031
+ e + t * Math.cos(a),
1032
+ s + n * Math.sin(a)
1033
1033
  ]), ke(l, null, c);
1034
1034
  }
1035
- function Ct(o, e, s, t, n, r, i, a) {
1036
- const c = [], u = [a.maxRandomnessOffset || 1, (a.maxRandomnessOffset || 1) + 0.3];
1035
+ function Ct(o, e, s, t, n, r, a, i) {
1036
+ const c = [], u = [i.maxRandomnessOffset || 1, (i.maxRandomnessOffset || 1) + 0.3];
1037
1037
  let l = [0, 0];
1038
- const h = a.disableMultiStroke ? 1 : 2, f = a.preserveVertices;
1038
+ const h = i.disableMultiStroke ? 1 : 2, f = i.preserveVertices;
1039
1039
  for (let d = 0; d < h; d++)
1040
- d === 0 ? c.push({ op: "move", data: [i[0], i[1]] }) : c.push({ op: "move", data: [i[0] + (f ? 0 : k(u[0], a)), i[1] + (f ? 0 : k(u[0], a))] }), l = f ? [n, r] : [n + k(u[d], a), r + k(u[d], a)], c.push({
1040
+ d === 0 ? c.push({ op: "move", data: [a[0], a[1]] }) : c.push({ op: "move", data: [a[0] + (f ? 0 : b(u[0], i)), a[1] + (f ? 0 : b(u[0], i))] }), l = f ? [n, r] : [n + b(u[d], i), r + b(u[d], i)], c.push({
1041
1041
  op: "bcurveTo",
1042
1042
  data: [
1043
- o + k(u[d], a),
1044
- e + k(u[d], a),
1045
- s + k(u[d], a),
1046
- t + k(u[d], a),
1043
+ o + b(u[d], i),
1044
+ e + b(u[d], i),
1045
+ s + b(u[d], i),
1046
+ t + b(u[d], i),
1047
1047
  l[0],
1048
1048
  l[1]
1049
1049
  ]
1050
1050
  });
1051
1051
  return c;
1052
1052
  }
1053
- function Q(o) {
1053
+ function U(o) {
1054
1054
  return [...o];
1055
1055
  }
1056
1056
  function qe(o, e = 0) {
@@ -1059,17 +1059,17 @@ function qe(o, e = 0) {
1059
1059
  throw new Error("A curve must have at least three points.");
1060
1060
  const t = [];
1061
1061
  if (s === 3)
1062
- t.push(Q(o[0]), Q(o[1]), Q(o[2]), Q(o[2]));
1062
+ t.push(U(o[0]), U(o[1]), U(o[2]), U(o[2]));
1063
1063
  else {
1064
1064
  const n = [];
1065
1065
  n.push(o[0], o[0]);
1066
- for (let a = 1; a < o.length; a++)
1067
- n.push(o[a]), a === o.length - 1 && n.push(o[a]);
1068
- const r = [], i = 1 - e;
1069
- t.push(Q(n[0]));
1070
- for (let a = 1; a + 2 < n.length; a++) {
1071
- const c = n[a];
1072
- r[0] = [c[0], c[1]], r[1] = [c[0] + (i * n[a + 1][0] - i * n[a - 1][0]) / 6, c[1] + (i * n[a + 1][1] - i * n[a - 1][1]) / 6], r[2] = [n[a + 1][0] + (i * n[a][0] - i * n[a + 2][0]) / 6, n[a + 1][1] + (i * n[a][1] - i * n[a + 2][1]) / 6], r[3] = [n[a + 1][0], n[a + 1][1]], t.push(r[1], r[2], r[3]);
1066
+ for (let i = 1; i < o.length; i++)
1067
+ n.push(o[i]), i === o.length - 1 && n.push(o[i]);
1068
+ const r = [], a = 1 - e;
1069
+ t.push(U(n[0]));
1070
+ for (let i = 1; i + 2 < n.length; i++) {
1071
+ const c = n[i];
1072
+ r[0] = [c[0], c[1]], r[1] = [c[0] + (a * n[i + 1][0] - a * n[i - 1][0]) / 6, c[1] + (a * n[i + 1][1] - a * n[i - 1][1]) / 6], r[2] = [n[i + 1][0] + (a * n[i][0] - a * n[i + 2][0]) / 6, n[i + 1][1] + (a * n[i][1] - a * n[i + 2][1]) / 6], r[3] = [n[i + 1][0], n[i + 1][1]], t.push(r[1], r[2], r[3]);
1073
1073
  }
1074
1074
  }
1075
1075
  return t;
@@ -1085,9 +1085,9 @@ function At(o, e, s) {
1085
1085
  if (t === 0)
1086
1086
  return pe(o, e);
1087
1087
  let n = ((o[0] - e[0]) * (s[0] - e[0]) + (o[1] - e[1]) * (s[1] - e[1])) / t;
1088
- return n = Math.max(0, Math.min(1, n)), pe(o, F(e, s, n));
1088
+ return n = Math.max(0, Math.min(1, n)), pe(o, W(e, s, n));
1089
1089
  }
1090
- function F(o, e, s) {
1090
+ function W(o, e, s) {
1091
1091
  return [
1092
1092
  o[0] + (e[0] - o[0]) * s,
1093
1093
  o[1] + (e[1] - o[1]) * s
@@ -1095,23 +1095,23 @@ function F(o, e, s) {
1095
1095
  }
1096
1096
  function jt(o, e) {
1097
1097
  const s = o[e + 0], t = o[e + 1], n = o[e + 2], r = o[e + 3];
1098
- let i = 3 * t[0] - 2 * s[0] - r[0];
1099
- i *= i;
1100
- let a = 3 * t[1] - 2 * s[1] - r[1];
1098
+ let a = 3 * t[0] - 2 * s[0] - r[0];
1101
1099
  a *= a;
1100
+ let i = 3 * t[1] - 2 * s[1] - r[1];
1101
+ i *= i;
1102
1102
  let c = 3 * n[0] - 2 * r[0] - s[0];
1103
1103
  c *= c;
1104
1104
  let u = 3 * n[1] - 2 * r[1] - s[1];
1105
- return u *= u, i < c && (i = c), a < u && (a = u), i + a;
1105
+ return u *= u, a < c && (a = c), i < u && (i = u), a + i;
1106
1106
  }
1107
- function Re(o, e, s, t) {
1107
+ function Ee(o, e, s, t) {
1108
1108
  const n = t || [];
1109
1109
  if (jt(o, e) < s) {
1110
1110
  const r = o[e + 0];
1111
1111
  n.length ? Lt(n[n.length - 1], r) > 1 && n.push(r) : n.push(r), n.push(o[e + 3]);
1112
1112
  } else {
1113
- const i = o[e + 0], a = o[e + 1], c = o[e + 2], u = o[e + 3], l = F(i, a, 0.5), h = F(a, c, 0.5), f = F(c, u, 0.5), d = F(l, h, 0.5), g = F(h, f, 0.5), m = F(d, g, 0.5);
1114
- Re([i, l, d, m], 0, s, n), Re([m, g, f, u], 0, s, n);
1113
+ const a = o[e + 0], i = o[e + 1], c = o[e + 2], u = o[e + 3], l = W(a, i, 0.5), h = W(i, c, 0.5), f = W(c, u, 0.5), d = W(l, h, 0.5), g = W(h, f, 0.5), m = W(d, g, 0.5);
1114
+ Ee([a, l, d, m], 0, s, n), Ee([m, g, f, u], 0, s, n);
1115
1115
  }
1116
1116
  return n;
1117
1117
  }
@@ -1119,47 +1119,47 @@ function $t(o, e) {
1119
1119
  return be(o, 0, o.length, e);
1120
1120
  }
1121
1121
  function be(o, e, s, t, n) {
1122
- const r = n || [], i = o[e], a = o[s - 1];
1122
+ const r = n || [], a = o[e], i = o[s - 1];
1123
1123
  let c = 0, u = 1;
1124
1124
  for (let l = e + 1; l < s - 1; ++l) {
1125
- const h = At(o[l], i, a);
1125
+ const h = At(o[l], a, i);
1126
1126
  h > c && (c = h, u = l);
1127
1127
  }
1128
- return Math.sqrt(c) > t ? (be(o, e, u + 1, t, r), be(o, u, s, t, r)) : (r.length || r.push(i), r.push(a)), r;
1128
+ return Math.sqrt(c) > t ? (be(o, e, u + 1, t, r), be(o, u, s, t, r)) : (r.length || r.push(a), r.push(i)), r;
1129
1129
  }
1130
1130
  function Ce(o, e = 0.15, s) {
1131
1131
  const t = [], n = (o.length - 1) / 3;
1132
1132
  for (let r = 0; r < n; r++) {
1133
- const i = r * 3;
1134
- Re(o, i, e, t);
1133
+ const a = r * 3;
1134
+ Ee(o, a, e, t);
1135
1135
  }
1136
1136
  return s && s > 0 ? be(t, 0, t.length, s) : t;
1137
1137
  }
1138
- function zt(o, e, s) {
1138
+ function Dt(o, e, s) {
1139
1139
  const t = Ae(o), n = Xe(Ze(t)), r = [];
1140
- let i = [], a = [0, 0], c = [];
1140
+ let a = [], i = [0, 0], c = [];
1141
1141
  const u = () => {
1142
- c.length >= 4 && i.push(...Ce(c, e)), c = [];
1142
+ c.length >= 4 && a.push(...Ce(c, e)), c = [];
1143
1143
  }, l = () => {
1144
- u(), i.length && (r.push(i), i = []);
1144
+ u(), a.length && (r.push(a), a = []);
1145
1145
  };
1146
1146
  for (const { key: f, data: d } of n)
1147
1147
  switch (f) {
1148
1148
  case "M":
1149
- l(), a = [d[0], d[1]], i.push(a);
1149
+ l(), i = [d[0], d[1]], a.push(i);
1150
1150
  break;
1151
1151
  case "L":
1152
- u(), i.push([d[0], d[1]]);
1152
+ u(), a.push([d[0], d[1]]);
1153
1153
  break;
1154
1154
  case "C":
1155
1155
  if (!c.length) {
1156
- const g = i.length ? i[i.length - 1] : a;
1156
+ const g = a.length ? a[a.length - 1] : i;
1157
1157
  c.push([g[0], g[1]]);
1158
1158
  }
1159
1159
  c.push([d[0], d[1]]), c.push([d[2], d[3]]), c.push([d[4], d[5]]);
1160
1160
  break;
1161
1161
  case "Z":
1162
- u(), i.push([a[0], a[1]]);
1162
+ u(), a.push([i[0], i[1]]);
1163
1163
  break;
1164
1164
  }
1165
1165
  if (l(), !s)
@@ -1171,7 +1171,7 @@ function zt(o, e, s) {
1171
1171
  }
1172
1172
  return h;
1173
1173
  }
1174
- const L = "none";
1174
+ const A = "none";
1175
1175
  class ve {
1176
1176
  constructor(e) {
1177
1177
  this.defaultOptions = {
@@ -1207,26 +1207,26 @@ class ve {
1207
1207
  return { shape: e, sets: s || [], options: t || this.defaultOptions };
1208
1208
  }
1209
1209
  line(e, s, t, n, r) {
1210
- const i = this._o(r);
1211
- return this._d("line", [Qe(e, s, t, n, i)], i);
1210
+ const a = this._o(r);
1211
+ return this._d("line", [Qe(e, s, t, n, a)], a);
1212
1212
  }
1213
1213
  rectangle(e, s, t, n, r) {
1214
- const i = this._o(r), a = [], c = Pt(e, s, t, n, i);
1215
- if (i.fill) {
1214
+ const a = this._o(r), i = [], c = Pt(e, s, t, n, a);
1215
+ if (a.fill) {
1216
1216
  const u = [[e, s], [e + t, s], [e + t, s + n], [e, s + n]];
1217
- i.fillStyle === "solid" ? a.push(Se([u], i)) : a.push(V([u], i));
1217
+ a.fillStyle === "solid" ? i.push(Se([u], a)) : i.push(V([u], a));
1218
1218
  }
1219
- return i.stroke !== L && a.push(c), this._d("rectangle", a, i);
1219
+ return a.stroke !== A && i.push(c), this._d("rectangle", i, a);
1220
1220
  }
1221
1221
  ellipse(e, s, t, n, r) {
1222
- const i = this._o(r), a = [], c = Je(t, n, i), u = Oe(e, s, i, c);
1223
- if (i.fill)
1224
- if (i.fillStyle === "solid") {
1225
- const l = Oe(e, s, i, c).opset;
1226
- l.type = "fillPath", a.push(l);
1222
+ const a = this._o(r), i = [], c = Je(t, n, a), u = Oe(e, s, a, c);
1223
+ if (a.fill)
1224
+ if (a.fillStyle === "solid") {
1225
+ const l = Oe(e, s, a, c).opset;
1226
+ l.type = "fillPath", i.push(l);
1227
1227
  } else
1228
- a.push(V([u.estimatedPoints], i));
1229
- return i.stroke !== L && a.push(u.opset), this._d("ellipse", a, i);
1228
+ i.push(V([u.estimatedPoints], a));
1229
+ return a.stroke !== A && i.push(u.opset), this._d("ellipse", i, a);
1230
1230
  }
1231
1231
  circle(e, s, t, n) {
1232
1232
  const r = this.ellipse(e, s, t, t, n);
@@ -1236,53 +1236,53 @@ class ve {
1236
1236
  const t = this._o(s);
1237
1237
  return this._d("linearPath", [de(e, !1, t)], t);
1238
1238
  }
1239
- arc(e, s, t, n, r, i, a = !1, c) {
1240
- const u = this._o(c), l = [], h = Ie(e, s, t, n, r, i, a, !0, u);
1241
- if (a && u.fill)
1239
+ arc(e, s, t, n, r, a, i = !1, c) {
1240
+ const u = this._o(c), l = [], h = Ie(e, s, t, n, r, a, i, !0, u);
1241
+ if (i && u.fill)
1242
1242
  if (u.fillStyle === "solid") {
1243
1243
  const f = Object.assign({}, u);
1244
1244
  f.disableMultiStroke = !0;
1245
- const d = Ie(e, s, t, n, r, i, !0, !1, f);
1245
+ const d = Ie(e, s, t, n, r, a, !0, !1, f);
1246
1246
  d.type = "fillPath", l.push(d);
1247
1247
  } else
1248
- l.push(xt(e, s, t, n, r, i, u));
1249
- return u.stroke !== L && l.push(h), this._d("arc", l, u);
1248
+ l.push(xt(e, s, t, n, r, a, u));
1249
+ return u.stroke !== A && l.push(h), this._d("arc", l, u);
1250
1250
  }
1251
1251
  curve(e, s) {
1252
- const t = this._o(s), n = [], r = De(e, t);
1253
- if (t.fill && t.fill !== L)
1252
+ const t = this._o(s), n = [], r = ze(e, t);
1253
+ if (t.fill && t.fill !== A)
1254
1254
  if (t.fillStyle === "solid") {
1255
- const i = De(e, Object.assign(Object.assign({}, t), { disableMultiStroke: !0, roughness: t.roughness ? t.roughness + t.fillShapeRoughnessGain : 0 }));
1255
+ const a = ze(e, Object.assign(Object.assign({}, t), { disableMultiStroke: !0, roughness: t.roughness ? t.roughness + t.fillShapeRoughnessGain : 0 }));
1256
1256
  n.push({
1257
1257
  type: "fillPath",
1258
- ops: this._mergedShape(i.ops)
1258
+ ops: this._mergedShape(a.ops)
1259
1259
  });
1260
1260
  } else {
1261
- const i = [], a = e;
1262
- if (a.length) {
1263
- const u = typeof a[0][0] == "number" ? [a] : a;
1261
+ const a = [], i = e;
1262
+ if (i.length) {
1263
+ const u = typeof i[0][0] == "number" ? [i] : i;
1264
1264
  for (const l of u)
1265
- l.length < 3 ? i.push(...l) : l.length === 3 ? i.push(...Ce(qe([
1265
+ l.length < 3 ? a.push(...l) : l.length === 3 ? a.push(...Ce(qe([
1266
1266
  l[0],
1267
1267
  l[0],
1268
1268
  l[1],
1269
1269
  l[2]
1270
- ]), 10, (1 + t.roughness) / 2)) : i.push(...Ce(qe(l), 10, (1 + t.roughness) / 2));
1270
+ ]), 10, (1 + t.roughness) / 2)) : a.push(...Ce(qe(l), 10, (1 + t.roughness) / 2));
1271
1271
  }
1272
- i.length && n.push(V([i], t));
1272
+ a.length && n.push(V([a], t));
1273
1273
  }
1274
- return t.stroke !== L && n.push(r), this._d("curve", n, t);
1274
+ return t.stroke !== A && n.push(r), this._d("curve", n, t);
1275
1275
  }
1276
1276
  polygon(e, s) {
1277
1277
  const t = this._o(s), n = [], r = de(e, !0, t);
1278
- return t.fill && (t.fillStyle === "solid" ? n.push(Se([e], t)) : n.push(V([e], t))), t.stroke !== L && n.push(r), this._d("polygon", n, t);
1278
+ return t.fill && (t.fillStyle === "solid" ? n.push(Se([e], t)) : n.push(V([e], t))), t.stroke !== A && n.push(r), this._d("polygon", n, t);
1279
1279
  }
1280
1280
  path(e, s) {
1281
1281
  const t = this._o(s), n = [];
1282
1282
  if (!e)
1283
1283
  return this._d("path", n, t);
1284
1284
  e = (e || "").replace(/\n/g, " ").replace(/(-\s)/g, "-").replace("/(ss)/g", " ");
1285
- const r = t.fill && t.fill !== "transparent" && t.fill !== L, i = t.stroke !== L, a = !!(t.simplification && t.simplification < 1), c = a ? 4 - 4 * (t.simplification || 1) : (1 + t.roughness) / 2, u = zt(e, 1, c), l = Ne(e, t);
1285
+ const r = t.fill && t.fill !== "transparent" && t.fill !== A, a = t.stroke !== A, i = !!(t.simplification && t.simplification < 1), c = i ? 4 - 4 * (t.simplification || 1) : (1 + t.roughness) / 2, u = Dt(e, 1, c), l = Ne(e, t);
1286
1286
  if (r)
1287
1287
  if (t.fillStyle === "solid")
1288
1288
  if (u.length === 1) {
@@ -1295,14 +1295,14 @@ class ve {
1295
1295
  n.push(Se(u, t));
1296
1296
  else
1297
1297
  n.push(V(u, t));
1298
- return i && (a ? u.forEach((h) => {
1298
+ return a && (i ? u.forEach((h) => {
1299
1299
  n.push(de(h, !1, t));
1300
1300
  }) : n.push(l)), this._d("path", n, t);
1301
1301
  }
1302
1302
  opsToPath(e, s) {
1303
1303
  let t = "";
1304
1304
  for (const n of e.ops) {
1305
- const r = typeof s == "number" && s >= 0 ? n.data.map((i) => +i.toFixed(s)) : n.data;
1305
+ const r = typeof s == "number" && s >= 0 ? n.data.map((a) => +a.toFixed(s)) : n.data;
1306
1306
  switch (n.op) {
1307
1307
  case "move":
1308
1308
  t += `M${r[0]} ${r[1]} `;
@@ -1320,29 +1320,29 @@ class ve {
1320
1320
  toPaths(e) {
1321
1321
  const s = e.sets || [], t = e.options || this.defaultOptions, n = [];
1322
1322
  for (const r of s) {
1323
- let i = null;
1323
+ let a = null;
1324
1324
  switch (r.type) {
1325
1325
  case "path":
1326
- i = {
1326
+ a = {
1327
1327
  d: this.opsToPath(r),
1328
1328
  stroke: t.stroke,
1329
1329
  strokeWidth: t.strokeWidth,
1330
- fill: L
1330
+ fill: A
1331
1331
  };
1332
1332
  break;
1333
1333
  case "fillPath":
1334
- i = {
1334
+ a = {
1335
1335
  d: this.opsToPath(r),
1336
- stroke: L,
1336
+ stroke: A,
1337
1337
  strokeWidth: 0,
1338
- fill: t.fill || L
1338
+ fill: t.fill || A
1339
1339
  };
1340
1340
  break;
1341
1341
  case "fillSketch":
1342
- i = this.fillSketch(r, t);
1342
+ a = this.fillSketch(r, t);
1343
1343
  break;
1344
1344
  }
1345
- i && n.push(i);
1345
+ a && n.push(a);
1346
1346
  }
1347
1347
  return n;
1348
1348
  }
@@ -1350,34 +1350,34 @@ class ve {
1350
1350
  let t = s.fillWeight;
1351
1351
  return t < 0 && (t = s.strokeWidth / 2), {
1352
1352
  d: this.opsToPath(e),
1353
- stroke: s.fill || L,
1353
+ stroke: s.fill || A,
1354
1354
  strokeWidth: t,
1355
- fill: L
1355
+ fill: A
1356
1356
  };
1357
1357
  }
1358
1358
  _mergedShape(e) {
1359
1359
  return e.filter((s, t) => t === 0 ? !0 : s.op !== "move");
1360
1360
  }
1361
1361
  }
1362
- class Dt {
1362
+ class zt {
1363
1363
  constructor(e, s) {
1364
1364
  this.canvas = e, this.ctx = this.canvas.getContext("2d"), this.gen = new ve(s);
1365
1365
  }
1366
1366
  draw(e) {
1367
1367
  const s = e.sets || [], t = e.options || this.getDefaultOptions(), n = this.ctx, r = e.options.fixedDecimalPlaceDigits;
1368
- for (const i of s)
1369
- switch (i.type) {
1368
+ for (const a of s)
1369
+ switch (a.type) {
1370
1370
  case "path":
1371
- n.save(), n.strokeStyle = t.stroke === "none" ? "transparent" : t.stroke, n.lineWidth = t.strokeWidth, t.strokeLineDash && n.setLineDash(t.strokeLineDash), t.strokeLineDashOffset && (n.lineDashOffset = t.strokeLineDashOffset), this._drawToContext(n, i, r), n.restore();
1371
+ n.save(), n.strokeStyle = t.stroke === "none" ? "transparent" : t.stroke, n.lineWidth = t.strokeWidth, t.strokeLineDash && n.setLineDash(t.strokeLineDash), t.strokeLineDashOffset && (n.lineDashOffset = t.strokeLineDashOffset), this._drawToContext(n, a, r), n.restore();
1372
1372
  break;
1373
1373
  case "fillPath": {
1374
1374
  n.save(), n.fillStyle = t.fill || "";
1375
- const a = e.shape === "curve" || e.shape === "polygon" || e.shape === "path" ? "evenodd" : "nonzero";
1376
- this._drawToContext(n, i, r, a), n.restore();
1375
+ const i = e.shape === "curve" || e.shape === "polygon" || e.shape === "path" ? "evenodd" : "nonzero";
1376
+ this._drawToContext(n, a, r, i), n.restore();
1377
1377
  break;
1378
1378
  }
1379
1379
  case "fillSketch":
1380
- this.fillSketch(n, i, t);
1380
+ this.fillSketch(n, a, t);
1381
1381
  break;
1382
1382
  }
1383
1383
  }
@@ -1388,16 +1388,16 @@ class Dt {
1388
1388
  _drawToContext(e, s, t, n = "nonzero") {
1389
1389
  e.beginPath();
1390
1390
  for (const r of s.ops) {
1391
- const i = typeof t == "number" && t >= 0 ? r.data.map((a) => +a.toFixed(t)) : r.data;
1391
+ const a = typeof t == "number" && t >= 0 ? r.data.map((i) => +i.toFixed(t)) : r.data;
1392
1392
  switch (r.op) {
1393
1393
  case "move":
1394
- e.moveTo(i[0], i[1]);
1394
+ e.moveTo(a[0], a[1]);
1395
1395
  break;
1396
1396
  case "bcurveTo":
1397
- e.bezierCurveTo(i[0], i[1], i[2], i[3], i[4], i[5]);
1397
+ e.bezierCurveTo(a[0], a[1], a[2], a[3], a[4], a[5]);
1398
1398
  break;
1399
1399
  case "lineTo":
1400
- e.lineTo(i[0], i[1]);
1400
+ e.lineTo(a[0], a[1]);
1401
1401
  break;
1402
1402
  }
1403
1403
  }
@@ -1410,16 +1410,16 @@ class Dt {
1410
1410
  return this.gen.defaultOptions;
1411
1411
  }
1412
1412
  line(e, s, t, n, r) {
1413
- const i = this.gen.line(e, s, t, n, r);
1414
- return this.draw(i), i;
1413
+ const a = this.gen.line(e, s, t, n, r);
1414
+ return this.draw(a), a;
1415
1415
  }
1416
1416
  rectangle(e, s, t, n, r) {
1417
- const i = this.gen.rectangle(e, s, t, n, r);
1418
- return this.draw(i), i;
1417
+ const a = this.gen.rectangle(e, s, t, n, r);
1418
+ return this.draw(a), a;
1419
1419
  }
1420
1420
  ellipse(e, s, t, n, r) {
1421
- const i = this.gen.ellipse(e, s, t, n, r);
1422
- return this.draw(i), i;
1421
+ const a = this.gen.ellipse(e, s, t, n, r);
1422
+ return this.draw(a), a;
1423
1423
  }
1424
1424
  circle(e, s, t, n) {
1425
1425
  const r = this.gen.circle(e, s, t, n);
@@ -1433,8 +1433,8 @@ class Dt {
1433
1433
  const t = this.gen.polygon(e, s);
1434
1434
  return this.draw(t), t;
1435
1435
  }
1436
- arc(e, s, t, n, r, i, a = !1, c) {
1437
- const u = this.gen.arc(e, s, t, n, r, i, a, c);
1436
+ arc(e, s, t, n, r, a, i = !1, c) {
1437
+ const u = this.gen.arc(e, s, t, n, r, a, i, c);
1438
1438
  return this.draw(u), u;
1439
1439
  }
1440
1440
  curve(e, s) {
@@ -1452,20 +1452,20 @@ class It {
1452
1452
  this.svg = e, this.gen = new ve(s);
1453
1453
  }
1454
1454
  draw(e) {
1455
- const s = e.sets || [], t = e.options || this.getDefaultOptions(), n = this.svg.ownerDocument || window.document, r = n.createElementNS(he, "g"), i = e.options.fixedDecimalPlaceDigits;
1456
- for (const a of s) {
1455
+ const s = e.sets || [], t = e.options || this.getDefaultOptions(), n = this.svg.ownerDocument || window.document, r = n.createElementNS(he, "g"), a = e.options.fixedDecimalPlaceDigits;
1456
+ for (const i of s) {
1457
1457
  let c = null;
1458
- switch (a.type) {
1458
+ switch (i.type) {
1459
1459
  case "path": {
1460
- c = n.createElementNS(he, "path"), c.setAttribute("d", this.opsToPath(a, i)), c.setAttribute("stroke", t.stroke), c.setAttribute("stroke-width", t.strokeWidth + ""), c.setAttribute("fill", "none"), t.strokeLineDash && c.setAttribute("stroke-dasharray", t.strokeLineDash.join(" ").trim()), t.strokeLineDashOffset && c.setAttribute("stroke-dashoffset", `${t.strokeLineDashOffset}`);
1460
+ c = n.createElementNS(he, "path"), c.setAttribute("d", this.opsToPath(i, a)), c.setAttribute("stroke", t.stroke), c.setAttribute("stroke-width", t.strokeWidth + ""), c.setAttribute("fill", "none"), t.strokeLineDash && c.setAttribute("stroke-dasharray", t.strokeLineDash.join(" ").trim()), t.strokeLineDashOffset && c.setAttribute("stroke-dashoffset", `${t.strokeLineDashOffset}`);
1461
1461
  break;
1462
1462
  }
1463
1463
  case "fillPath": {
1464
- c = n.createElementNS(he, "path"), c.setAttribute("d", this.opsToPath(a, i)), c.setAttribute("stroke", "none"), c.setAttribute("stroke-width", "0"), c.setAttribute("fill", t.fill || ""), (e.shape === "curve" || e.shape === "polygon") && c.setAttribute("fill-rule", "evenodd");
1464
+ c = n.createElementNS(he, "path"), c.setAttribute("d", this.opsToPath(i, a)), c.setAttribute("stroke", "none"), c.setAttribute("stroke-width", "0"), c.setAttribute("fill", t.fill || ""), (e.shape === "curve" || e.shape === "polygon") && c.setAttribute("fill-rule", "evenodd");
1465
1465
  break;
1466
1466
  }
1467
1467
  case "fillSketch": {
1468
- c = this.fillSketch(n, a, t);
1468
+ c = this.fillSketch(n, i, t);
1469
1469
  break;
1470
1470
  }
1471
1471
  }
@@ -1489,16 +1489,16 @@ class It {
1489
1489
  return this.gen.opsToPath(e, s);
1490
1490
  }
1491
1491
  line(e, s, t, n, r) {
1492
- const i = this.gen.line(e, s, t, n, r);
1493
- return this.draw(i);
1492
+ const a = this.gen.line(e, s, t, n, r);
1493
+ return this.draw(a);
1494
1494
  }
1495
1495
  rectangle(e, s, t, n, r) {
1496
- const i = this.gen.rectangle(e, s, t, n, r);
1497
- return this.draw(i);
1496
+ const a = this.gen.rectangle(e, s, t, n, r);
1497
+ return this.draw(a);
1498
1498
  }
1499
1499
  ellipse(e, s, t, n, r) {
1500
- const i = this.gen.ellipse(e, s, t, n, r);
1501
- return this.draw(i);
1500
+ const a = this.gen.ellipse(e, s, t, n, r);
1501
+ return this.draw(a);
1502
1502
  }
1503
1503
  circle(e, s, t, n) {
1504
1504
  const r = this.gen.circle(e, s, t, n);
@@ -1512,8 +1512,8 @@ class It {
1512
1512
  const t = this.gen.polygon(e, s);
1513
1513
  return this.draw(t);
1514
1514
  }
1515
- arc(e, s, t, n, r, i, a = !1, c) {
1516
- const u = this.gen.arc(e, s, t, n, r, i, a, c);
1515
+ arc(e, s, t, n, r, a, i = !1, c) {
1516
+ const u = this.gen.arc(e, s, t, n, r, a, i, c);
1517
1517
  return this.draw(u);
1518
1518
  }
1519
1519
  curve(e, s) {
@@ -1525,9 +1525,9 @@ class It {
1525
1525
  return this.draw(t);
1526
1526
  }
1527
1527
  }
1528
- const A = {
1528
+ const C = {
1529
1529
  canvas(o, e) {
1530
- return new Dt(o, e);
1530
+ return new zt(o, e);
1531
1531
  },
1532
1532
  svg(o, e) {
1533
1533
  return new It(o, e);
@@ -1636,39 +1636,39 @@ const A = {
1636
1636
  }
1637
1637
  };
1638
1638
  return /* @__PURE__ */ M.jsx(et.Provider, { value: s, children: e });
1639
- }, j = () => rt(et), Vt = ({
1639
+ }, L = () => rt(et), Vt = ({
1640
1640
  strokeWeight: o = "medium",
1641
1641
  radius: e = "md",
1642
1642
  size: s = "sm",
1643
1643
  backgroundColor: t,
1644
1644
  children: n,
1645
1645
  fillStyle: r,
1646
- ...i
1646
+ ...a
1647
1647
  }) => {
1648
- const a = j(), c = O(null), [u, l] = Y(!1), h = a.buttonSize[s].width, f = a.buttonSize[s].height, d = a.buttonSize[s].fontSize;
1648
+ const i = L(), c = O(null), [u, l] = Q(!1), h = i.buttonSize[s].width, f = i.buttonSize[s].height, d = i.buttonSize[s].fontSize;
1649
1649
  return R(() => {
1650
1650
  if (!c.current) return;
1651
- const g = A.svg(c.current);
1651
+ const g = C.svg(c.current);
1652
1652
  c.current.innerHTML = "";
1653
- const m = a.stroke[o], b = g.path(
1654
- K(0, 0, h, f, a.radius[e]),
1653
+ const m = i.stroke[o], k = g.path(
1654
+ K(0, 0, h, f, i.radius[e]),
1655
1655
  {
1656
1656
  stroke: m.color,
1657
1657
  strokeWidth: m.width,
1658
- fill: t ?? a.fill.background,
1658
+ fill: t ?? i.fill.background,
1659
1659
  fillStyle: r,
1660
- roughness: u ? a.roughness.roughness + 1 : a.roughness.roughness,
1661
- bowing: a.roughness.bowing
1660
+ roughness: u ? i.roughness.roughness + 1 : i.roughness.roughness,
1661
+ bowing: i.roughness.bowing
1662
1662
  }
1663
1663
  );
1664
- c.current.appendChild(b);
1665
- }, [u, o, e, a]), /* @__PURE__ */ M.jsxs(
1664
+ c.current.appendChild(k);
1665
+ }, [u, o, e, i]), /* @__PURE__ */ M.jsxs(
1666
1666
  "button",
1667
1667
  {
1668
- ...i,
1668
+ ...a,
1669
1669
  onMouseEnter: () => l(!0),
1670
1670
  onMouseLeave: () => l(!1),
1671
- className: `${Nt["drawui-button"]} ${i.className ?? ""}`,
1671
+ className: `${Nt["drawui-button"]} ${a.className ?? ""}`,
1672
1672
  style: {
1673
1673
  position: "relative",
1674
1674
  width: h,
@@ -1717,28 +1717,28 @@ const A = {
1717
1717
  className: t,
1718
1718
  fillStyle: n
1719
1719
  }) => {
1720
- const r = j(), i = O(null);
1720
+ const r = L(), a = O(null);
1721
1721
  return R(() => {
1722
- if (!i.current) return;
1723
- i.current.innerHTML = "";
1724
- const a = A.svg(i.current), c = r.stroke[o];
1722
+ if (!a.current) return;
1723
+ a.current.innerHTML = "";
1724
+ const i = C.svg(a.current), c = r.stroke[o];
1725
1725
  if (s) {
1726
- const u = typeof e == "number" ? e : 100, l = a.line(0, 0, 0, u, {
1726
+ const u = typeof e == "number" ? e : 100, l = i.line(0, 0, 0, u, {
1727
1727
  stroke: c.color,
1728
1728
  strokeWidth: c.width,
1729
1729
  roughness: r.roughness.roughness,
1730
1730
  bowing: r.roughness.bowing
1731
1731
  });
1732
- i.current.appendChild(l);
1732
+ a.current.appendChild(l);
1733
1733
  } else {
1734
- const u = typeof e == "number" ? e : 300, l = a.line(0, 0, u, 0, {
1734
+ const u = typeof e == "number" ? e : 300, l = i.line(0, 0, u, 0, {
1735
1735
  stroke: c.color,
1736
1736
  strokeWidth: c.width,
1737
1737
  roughness: r.roughness.roughness,
1738
1738
  bowing: r.roughness.bowing,
1739
1739
  fillStyle: n
1740
1740
  });
1741
- i.current.appendChild(l);
1741
+ a.current.appendChild(l);
1742
1742
  }
1743
1743
  }, [r, o, e, s]), /* @__PURE__ */ M.jsx(
1744
1744
  "div",
@@ -1748,7 +1748,7 @@ const A = {
1748
1748
  children: /* @__PURE__ */ M.jsx(
1749
1749
  "svg",
1750
1750
  {
1751
- ref: i,
1751
+ ref: a,
1752
1752
  width: s ? 2 : e,
1753
1753
  height: s ? e : 2,
1754
1754
  style: { display: "block" }
@@ -1764,59 +1764,56 @@ const A = {
1764
1764
  //optional, card adjust height itself by content
1765
1765
  backgroundColor: n,
1766
1766
  header: r,
1767
- footer: i,
1768
- fillStyle: a,
1767
+ footer: a,
1768
+ fillStyle: i,
1769
1769
  children: c,
1770
1770
  ...u
1771
1771
  }) => {
1772
- const l = j(), h = O(null), f = O(null), [d, g] = Y(!1), [m, b] = Y(t ?? 200);
1772
+ const l = L(), h = O(null), f = O(null), [d, g] = Q(t ?? 200);
1773
1773
  R(() => {
1774
1774
  if (!f.current || t) return;
1775
- const y = () => {
1775
+ const k = () => {
1776
1776
  if (f.current) {
1777
- const z = f.current.scrollHeight;
1778
- b(z);
1777
+ const y = f.current.scrollHeight;
1778
+ g(y);
1779
1779
  }
1780
1780
  };
1781
- y();
1782
- const C = new ResizeObserver(y);
1783
- return C.observe(f.current), () => C.disconnect();
1784
- }, [c, r, i, t]), R(() => {
1781
+ k();
1782
+ const v = new ResizeObserver(k);
1783
+ return v.observe(f.current), () => v.disconnect();
1784
+ }, [c, r, a, t]), R(() => {
1785
1785
  if (!h.current) return;
1786
- const y = A.svg(h.current);
1786
+ const k = C.svg(h.current);
1787
1787
  h.current.innerHTML = "";
1788
- const C = l.stroke[o], z = t ?? m, N = y.path(
1789
- K(0, 0, s, z, l.radius[e]),
1788
+ const v = l.stroke[o], y = t ?? d, D = k.path(
1789
+ K(0, 0, s, y, l.radius[e]),
1790
1790
  {
1791
- stroke: C.color,
1792
- strokeWidth: C.width,
1791
+ stroke: v.color,
1792
+ strokeWidth: v.width,
1793
1793
  fill: n ?? l.fill.background,
1794
- roughness: d ? l.roughness.roughness + 1 : l.roughness.roughness,
1794
+ roughness: l.roughness.roughness,
1795
1795
  bowing: l.roughness.bowing,
1796
- fillStyle: a
1796
+ fillStyle: i
1797
1797
  }
1798
1798
  );
1799
- h.current.appendChild(N);
1799
+ h.current.appendChild(D);
1800
1800
  }, [
1801
1801
  o,
1802
1802
  e,
1803
1803
  s,
1804
- m,
1804
+ d,
1805
1805
  t,
1806
1806
  n,
1807
1807
  l,
1808
- d,
1809
- a
1808
+ i
1810
1809
  ]);
1811
- const v = t ?? m;
1810
+ const m = t ?? d;
1812
1811
  return /* @__PURE__ */ M.jsxs(
1813
1812
  "div",
1814
1813
  {
1815
1814
  ...u,
1816
1815
  ref: f,
1817
1816
  className: `${fe["drawui-card"]} ${u.className ?? ""}`,
1818
- onMouseEnter: () => g(!0),
1819
- onMouseLeave: () => g(!1),
1820
1817
  style: {
1821
1818
  position: "relative",
1822
1819
  width: s,
@@ -1833,7 +1830,7 @@ const A = {
1833
1830
  {
1834
1831
  ref: h,
1835
1832
  width: s,
1836
- height: v,
1833
+ height: m,
1837
1834
  style: { position: "absolute", inset: 0, pointerEvents: "none" }
1838
1835
  }
1839
1836
  ),
@@ -1856,14 +1853,14 @@ const A = {
1856
1853
  children: c
1857
1854
  }
1858
1855
  ),
1859
- i && /* @__PURE__ */ M.jsxs(M.Fragment, { children: [
1856
+ a && /* @__PURE__ */ M.jsxs(M.Fragment, { children: [
1860
1857
  /* @__PURE__ */ M.jsx(Ge, { width: s, strokeWeight: "thick" }),
1861
1858
  /* @__PURE__ */ M.jsx(
1862
1859
  "div",
1863
1860
  {
1864
1861
  className: fe["drawui-card-footer"],
1865
1862
  style: { position: "relative", zIndex: 1 },
1866
- children: i
1863
+ children: a
1867
1864
  }
1868
1865
  )
1869
1866
  ] })
@@ -1880,26 +1877,26 @@ const A = {
1880
1877
  radius: t = "md",
1881
1878
  width: n = 300,
1882
1879
  fillStyle: r,
1883
- className: i
1880
+ className: a
1884
1881
  }) => {
1885
- const a = j(), c = O(null);
1882
+ const i = L(), c = O(null);
1886
1883
  return R(() => {
1887
1884
  if (!c.current) return;
1888
- const u = A.svg(c.current);
1885
+ const u = C.svg(c.current);
1889
1886
  c.current.innerHTML = "";
1890
- const l = a.stroke[s], h = u.path(
1891
- K(0, 0, n, 40, a.radius[t]),
1887
+ const l = i.stroke[s], h = u.path(
1888
+ K(0, 0, n, 40, i.radius[t]),
1892
1889
  {
1893
1890
  stroke: l.color,
1894
1891
  strokeWidth: l.width,
1895
1892
  fill: "transparent",
1896
- roughness: a.roughness.roughness,
1897
- bowing: a.roughness.bowing,
1893
+ roughness: i.roughness.roughness,
1894
+ bowing: i.roughness.bowing,
1898
1895
  fillStyle: r
1899
1896
  }
1900
1897
  );
1901
1898
  c.current.appendChild(h);
1902
- }, [a, s, t, n]), /* @__PURE__ */ M.jsx("div", { className: `${Ve["drawui-collapse"]} ${i ?? ""}`, style: { width: n }, children: /* @__PURE__ */ M.jsxs("details", { children: [
1899
+ }, [i, s, t, n]), /* @__PURE__ */ M.jsx("div", { className: `${Ve["drawui-collapse"]} ${a ?? ""}`, style: { width: n }, children: /* @__PURE__ */ M.jsxs("details", { children: [
1903
1900
  /* @__PURE__ */ M.jsxs("summary", { style: { position: "relative" }, children: [
1904
1901
  /* @__PURE__ */ M.jsx(
1905
1902
  "svg",
@@ -1921,32 +1918,32 @@ const A = {
1921
1918
  icon: t,
1922
1919
  fillStyle: n,
1923
1920
  backgroundColor: r,
1924
- ...i
1921
+ ...a
1925
1922
  }) => {
1926
- const a = j(), c = O(null), [u, l] = Y(!1), h = a.buttonSize[s].height;
1923
+ const i = L(), c = O(null), [u, l] = Q(!1), h = i.buttonSize[s].height;
1927
1924
  return R(() => {
1928
1925
  if (!c.current) return;
1929
- const f = A.svg(c.current);
1926
+ const f = C.svg(c.current);
1930
1927
  c.current.innerHTML = "";
1931
- const d = a.stroke[o], g = f.path(
1932
- K(0, 0, h, h, a.radius[e]),
1928
+ const d = i.stroke[o], g = f.path(
1929
+ K(0, 0, h, h, i.radius[e]),
1933
1930
  {
1934
1931
  stroke: d.color,
1935
1932
  strokeWidth: d.width,
1936
- fill: r ?? a.fill.background,
1937
- roughness: u ? a.roughness.roughness + 1 : a.roughness.roughness,
1938
- bowing: a.roughness.bowing,
1933
+ fill: r ?? i.fill.background,
1934
+ roughness: u ? i.roughness.roughness + 1 : i.roughness.roughness,
1935
+ bowing: i.roughness.bowing,
1939
1936
  fillStyle: n
1940
1937
  }
1941
1938
  );
1942
1939
  c.current.appendChild(g);
1943
- }, [u, o, e, a, h, r]), /* @__PURE__ */ M.jsxs(
1940
+ }, [u, o, e, i, h, r]), /* @__PURE__ */ M.jsxs(
1944
1941
  "button",
1945
1942
  {
1946
- ...i,
1943
+ ...a,
1947
1944
  onMouseEnter: () => l(!0),
1948
1945
  onMouseLeave: () => l(!1),
1949
- className: `${Ft["drawui-button"]} ${i.className ?? ""}`,
1946
+ className: `${Ft["drawui-button"]} ${a.className ?? ""}`,
1950
1947
  style: {
1951
1948
  position: "relative",
1952
1949
  width: h,
@@ -2000,32 +1997,32 @@ const A = {
2000
1997
  inputSize: t = "md",
2001
1998
  className: n,
2002
1999
  fillStyle: r,
2003
- style: i,
2004
- ...a
2000
+ style: a,
2001
+ ...i
2005
2002
  }) => {
2006
- const c = j(), u = O(null), l = O(null), [h, f] = Y(!1), [d, g] = Y(!1), m = c.inputSize[t].height, b = c.inputSize[t].fontSize, v = c.inputSize[t].paddingX;
2003
+ const c = L(), u = O(null), l = O(null), [h, f] = Q(!1), [d, g] = Q(!1), m = c.inputSize[t].height, k = c.inputSize[t].fontSize, v = c.inputSize[t].paddingX;
2007
2004
  return R(() => {
2008
2005
  if (!u.current || !l.current) return;
2009
- const y = l.current.offsetWidth, C = A.svg(u.current);
2006
+ const y = l.current.offsetWidth, D = C.svg(u.current);
2010
2007
  u.current.innerHTML = "";
2011
- const z = c.stroke[o], N = C.path(
2008
+ const H = c.stroke[o], F = D.path(
2012
2009
  K(0, 0, y, m, c.radius[s]),
2013
2010
  {
2014
- stroke: z.color,
2015
- strokeWidth: z.width,
2011
+ stroke: H.color,
2012
+ strokeWidth: H.width,
2016
2013
  fill: e ?? c.fill.background,
2017
2014
  roughness: h ? c.roughness.roughness + 1 : c.roughness.roughness,
2018
2015
  bowing: c.roughness.bowing,
2019
2016
  fillStyle: r
2020
2017
  }
2021
2018
  );
2022
- u.current.appendChild(N);
2019
+ u.current.appendChild(F);
2023
2020
  }, [h, d, o, s, t, c, e]), /* @__PURE__ */ M.jsxs(
2024
2021
  "div",
2025
2022
  {
2026
2023
  ref: l,
2027
2024
  className: `${Ye["drawui-input"]} ${n ?? ""}`,
2028
- style: { height: m, ...i },
2025
+ style: { height: m, ...a },
2029
2026
  onMouseEnter: () => g(!0),
2030
2027
  onMouseLeave: () => g(!1),
2031
2028
  children: [
@@ -2041,19 +2038,19 @@ const A = {
2041
2038
  /* @__PURE__ */ M.jsx(
2042
2039
  "input",
2043
2040
  {
2044
- ...a,
2041
+ ...i,
2045
2042
  className: Ye["drawui-input-field"],
2046
2043
  style: {
2047
2044
  height: m,
2048
- fontSize: b,
2045
+ fontSize: k,
2049
2046
  paddingLeft: v,
2050
2047
  paddingRight: v
2051
2048
  },
2052
2049
  onFocus: (y) => {
2053
- f(!0), a.onFocus?.(y);
2050
+ f(!0), i.onFocus?.(y);
2054
2051
  },
2055
2052
  onBlur: (y) => {
2056
- f(!1), a.onBlur?.(y);
2053
+ f(!1), i.onBlur?.(y);
2057
2054
  }
2058
2055
  }
2059
2056
  )
@@ -2066,25 +2063,25 @@ const A = {
2066
2063
  color: s,
2067
2064
  className: t
2068
2065
  }) => {
2069
- const n = j(), r = O(null);
2066
+ const n = L(), r = O(null);
2070
2067
  return R(() => {
2071
2068
  if (!r.current) return;
2072
- const i = A.svg(r.current);
2069
+ const a = C.svg(r.current);
2073
2070
  r.current.innerHTML = "";
2074
- const a = n.stroke[e], c = s ?? a.color, u = i.path(
2071
+ const i = n.stroke[e], c = s ?? i.color, u = a.path(
2075
2072
  "M6 18 H18 L16 12 A6 6 0 0 0 8 12 Z",
2076
2073
  {
2077
2074
  stroke: c,
2078
- strokeWidth: a.width,
2075
+ strokeWidth: i.width,
2079
2076
  roughness: n.roughness.roughness,
2080
2077
  bowing: n.roughness.bowing,
2081
2078
  fill: "transparent"
2082
2079
  }
2083
2080
  );
2084
2081
  r.current.appendChild(u);
2085
- const l = i.circle(12, 18, 2, {
2082
+ const l = a.circle(12, 18, 2, {
2086
2083
  stroke: c,
2087
- strokeWidth: a.width,
2084
+ strokeWidth: i.width,
2088
2085
  roughness: n.roughness.roughness,
2089
2086
  bowing: n.roughness.bowing,
2090
2087
  fill: "transparent"
@@ -2097,16 +2094,16 @@ const A = {
2097
2094
  color: s,
2098
2095
  className: t
2099
2096
  }) => {
2100
- const n = j(), r = O(null);
2097
+ const n = L(), r = O(null);
2101
2098
  return R(() => {
2102
2099
  if (!r.current) return;
2103
- const i = A.svg(r.current);
2100
+ const a = C.svg(r.current);
2104
2101
  r.current.innerHTML = "";
2105
- const a = n.stroke[e], c = s ?? a.color, u = i.path(
2102
+ const i = n.stroke[e], c = s ?? i.color, u = a.path(
2106
2103
  "M2 12 L12 2 L22 12 V22 H2 Z",
2107
2104
  {
2108
2105
  stroke: c,
2109
- strokeWidth: a.width,
2106
+ strokeWidth: i.width,
2110
2107
  roughness: n.roughness.roughness,
2111
2108
  bowing: n.roughness.bowing,
2112
2109
  fill: "transparent"
@@ -2129,14 +2126,14 @@ const A = {
2129
2126
  color: s,
2130
2127
  className: t
2131
2128
  }) => {
2132
- const n = j(), r = O(null);
2129
+ const n = L(), r = O(null);
2133
2130
  return R(() => {
2134
2131
  if (!r.current) return;
2135
- const i = A.svg(r.current);
2132
+ const a = C.svg(r.current);
2136
2133
  r.current.innerHTML = "";
2137
- const a = n.stroke[e], c = s ?? a.color, u = i.line(4, 12, 20, 12, {
2134
+ const i = n.stroke[e], c = s ?? i.color, u = a.line(4, 12, 20, 12, {
2138
2135
  stroke: c,
2139
- strokeWidth: a.width,
2136
+ strokeWidth: i.width,
2140
2137
  roughness: n.roughness.roughness,
2141
2138
  bowing: n.roughness.bowing
2142
2139
  });
@@ -2148,19 +2145,19 @@ const A = {
2148
2145
  color: s,
2149
2146
  className: t
2150
2147
  }) => {
2151
- const n = j(), r = O(null);
2148
+ const n = L(), r = O(null);
2152
2149
  return R(() => {
2153
2150
  if (!r.current) return;
2154
- const i = A.svg(r.current);
2151
+ const a = C.svg(r.current);
2155
2152
  r.current.innerHTML = "";
2156
- const a = n.stroke[e], c = s ?? a.color, u = i.line(12, 4, 12, 20, {
2153
+ const i = n.stroke[e], c = s ?? i.color, u = a.line(12, 4, 12, 20, {
2157
2154
  stroke: c,
2158
- strokeWidth: a.width,
2155
+ strokeWidth: i.width,
2159
2156
  roughness: n.roughness.roughness,
2160
2157
  bowing: n.roughness.bowing
2161
- }), l = i.line(4, 12, 20, 12, {
2158
+ }), l = a.line(4, 12, 20, 12, {
2162
2159
  stroke: c,
2163
- strokeWidth: a.width,
2160
+ strokeWidth: i.width,
2164
2161
  roughness: n.roughness.roughness,
2165
2162
  bowing: n.roughness.bowing
2166
2163
  });
@@ -2172,20 +2169,20 @@ const A = {
2172
2169
  color: s,
2173
2170
  className: t
2174
2171
  }) => {
2175
- const n = j(), r = O(null);
2172
+ const n = L(), r = O(null);
2176
2173
  return R(() => {
2177
2174
  if (!r.current) return;
2178
- const i = A.svg(r.current);
2175
+ const a = C.svg(r.current);
2179
2176
  r.current.innerHTML = "";
2180
- const a = n.stroke[e], c = s ?? a.color, u = i.circle(10, 10, 14, {
2177
+ const i = n.stroke[e], c = s ?? i.color, u = a.circle(10, 10, 14, {
2181
2178
  stroke: c,
2182
- strokeWidth: a.width,
2179
+ strokeWidth: i.width,
2183
2180
  roughness: n.roughness.roughness,
2184
2181
  bowing: n.roughness.bowing,
2185
2182
  fill: "transparent"
2186
- }), l = i.line(16, 16, 22, 22, {
2183
+ }), l = a.line(16, 16, 22, 22, {
2187
2184
  stroke: c,
2188
- strokeWidth: a.width,
2185
+ strokeWidth: i.width,
2189
2186
  roughness: n.roughness.roughness,
2190
2187
  bowing: n.roughness.bowing
2191
2188
  });
@@ -2206,27 +2203,27 @@ const A = {
2206
2203
  color: s,
2207
2204
  className: t
2208
2205
  }) => {
2209
- const n = j(), r = O(null);
2206
+ const n = L(), r = O(null);
2210
2207
  return R(() => {
2211
2208
  if (!r.current) return;
2212
- const i = A.svg(r.current);
2209
+ const a = C.svg(r.current);
2213
2210
  r.current.innerHTML = "";
2214
- const a = n.stroke[e], c = s ?? a.color, u = i.circle(12, 12, 14, {
2211
+ const i = n.stroke[e], c = s ?? i.color, u = a.circle(12, 12, 14, {
2215
2212
  stroke: c,
2216
- strokeWidth: a.width,
2213
+ strokeWidth: i.width,
2217
2214
  roughness: n.roughness.roughness,
2218
2215
  bowing: n.roughness.bowing,
2219
2216
  fill: "transparent"
2220
2217
  });
2221
2218
  r.current.appendChild(u);
2222
2219
  for (let l = 0; l < 8; l++) {
2223
- const h = l * Math.PI * 2 / 8, f = 12 + 7 * Math.cos(h), d = 12 + 7 * Math.sin(h), g = 12 + 10 * Math.cos(h), m = 12 + 10 * Math.sin(h), b = i.line(f, d, g, m, {
2220
+ const h = l * Math.PI * 2 / 8, f = 12 + 7 * Math.cos(h), d = 12 + 7 * Math.sin(h), g = 12 + 10 * Math.cos(h), m = 12 + 10 * Math.sin(h), k = a.line(f, d, g, m, {
2224
2221
  stroke: c,
2225
- strokeWidth: a.width,
2222
+ strokeWidth: i.width,
2226
2223
  roughness: n.roughness.roughness,
2227
2224
  bowing: n.roughness.bowing
2228
2225
  });
2229
- r.current.appendChild(b);
2226
+ r.current.appendChild(k);
2230
2227
  }
2231
2228
  }, [n, e, s]), /* @__PURE__ */ M.jsx("svg", { ref: r, width: o, height: o, viewBox: "0 0 24 24", className: t });
2232
2229
  }, ss = ({
@@ -2235,24 +2232,24 @@ const A = {
2235
2232
  color: s,
2236
2233
  className: t
2237
2234
  }) => {
2238
- const n = j(), r = O(null);
2235
+ const n = L(), r = O(null);
2239
2236
  return R(() => {
2240
2237
  if (!r.current) return;
2241
- const i = A.svg(r.current);
2238
+ const a = C.svg(r.current);
2242
2239
  r.current.innerHTML = "";
2243
- const a = n.stroke[e], c = s ?? a.color, u = i.circle(12, 8, 6, {
2240
+ const i = n.stroke[e], c = s ?? i.color, u = a.circle(12, 8, 6, {
2244
2241
  stroke: c,
2245
- strokeWidth: a.width,
2242
+ strokeWidth: i.width,
2246
2243
  roughness: n.roughness.roughness,
2247
2244
  bowing: n.roughness.bowing,
2248
2245
  fill: "transparent"
2249
2246
  });
2250
2247
  r.current.appendChild(u);
2251
- const l = i.path(
2248
+ const l = a.path(
2252
2249
  "M4 20 Q12 16 20 20",
2253
2250
  {
2254
2251
  stroke: c,
2255
- strokeWidth: a.width,
2252
+ strokeWidth: i.width,
2256
2253
  roughness: n.roughness.roughness,
2257
2254
  bowing: n.roughness.bowing,
2258
2255
  fill: "transparent"
@@ -2260,6 +2257,40 @@ const A = {
2260
2257
  );
2261
2258
  r.current.appendChild(l);
2262
2259
  }, [n, e, s]), /* @__PURE__ */ M.jsx("svg", { ref: r, width: o, height: o, viewBox: "0 0 24 24", className: t });
2260
+ }, ns = ({
2261
+ size: o = 24,
2262
+ strokeWeight: e = "medium",
2263
+ color: s,
2264
+ className: t
2265
+ }) => {
2266
+ const n = L(), r = O(null);
2267
+ return R(() => {
2268
+ if (!r.current) return;
2269
+ const a = C.svg(r.current);
2270
+ r.current.innerHTML = "";
2271
+ const i = n.stroke[e], u = {
2272
+ stroke: s ?? i.color,
2273
+ strokeWidth: i.width,
2274
+ roughness: n.roughness.roughness,
2275
+ bowing: n.roughness.bowing
2276
+ };
2277
+ r.current.appendChild(
2278
+ a.line(4, 7, 20, 7, u)
2279
+ ), r.current.appendChild(
2280
+ a.line(4, 12, 20, 12, u)
2281
+ ), r.current.appendChild(
2282
+ a.line(4, 17, 20, 17, u)
2283
+ );
2284
+ }, [n, e, s]), /* @__PURE__ */ M.jsx(
2285
+ "svg",
2286
+ {
2287
+ ref: r,
2288
+ width: o,
2289
+ height: o,
2290
+ viewBox: "0 0 24 24",
2291
+ className: t
2292
+ }
2293
+ );
2263
2294
  };
2264
2295
  export {
2265
2296
  Vt as DrawuiButton,
@@ -2270,11 +2301,12 @@ export {
2270
2301
  Xt as DrawuiInput,
2271
2302
  Gt as DrawuiThemeProvider,
2272
2303
  Ut as IconBell,
2304
+ ns as IconHamburger,
2273
2305
  Qt as IconHome,
2274
2306
  Jt as IconMinus,
2275
2307
  Kt as IconPlus,
2276
2308
  es as IconSearch,
2277
2309
  ts as IconSettings,
2278
2310
  ss as IconUser,
2279
- j as useDrawuiTheme
2311
+ L as useDrawuiTheme
2280
2312
  };