gd-measurements 0.4.1 → 0.4.2

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,10 +1,9 @@
1
- import require$$0, { useRef, useCallback, useEffect, useState, useMemo, Fragment, useId } from "react";
2
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
3
- function getDefaultExportFromCjs(x) {
4
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
1
+ import an, { useRef as Z, useCallback as kr, useEffect as Tr, useState as ae, useMemo as re, Fragment as sn, useId as ln } from "react";
2
+ var oe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3
+ function un(r) {
4
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
5
5
  }
6
- var jsxDevRuntime = { exports: {} };
7
- var reactJsxDevRuntime_production_min = {};
6
+ var fe = { exports: {} }, ce = {};
8
7
  /**
9
8
  * @license React
10
9
  * react-jsx-dev-runtime.production.min.js
@@ -14,16 +13,14 @@ var reactJsxDevRuntime_production_min = {};
14
13
  * This source code is licensed under the MIT license found in the
15
14
  * LICENSE file in the root directory of this source tree.
16
15
  */
17
- var hasRequiredReactJsxDevRuntime_production_min;
18
- function requireReactJsxDevRuntime_production_min() {
19
- if (hasRequiredReactJsxDevRuntime_production_min) return reactJsxDevRuntime_production_min;
20
- hasRequiredReactJsxDevRuntime_production_min = 1;
21
- var a = Symbol.for("react.fragment");
22
- reactJsxDevRuntime_production_min.Fragment = a;
23
- reactJsxDevRuntime_production_min.jsxDEV = void 0;
24
- return reactJsxDevRuntime_production_min;
16
+ var ur;
17
+ function on() {
18
+ if (ur) return ce;
19
+ ur = 1;
20
+ var r = Symbol.for("react.fragment");
21
+ return ce.Fragment = r, ce.jsxDEV = void 0, ce;
25
22
  }
26
- var reactJsxDevRuntime_development = {};
23
+ var de = {};
27
24
  /**
28
25
  * @license React
29
26
  * react-jsx-dev-runtime.development.js
@@ -33,1423 +30,981 @@ var reactJsxDevRuntime_development = {};
33
30
  * This source code is licensed under the MIT license found in the
34
31
  * LICENSE file in the root directory of this source tree.
35
32
  */
36
- var hasRequiredReactJsxDevRuntime_development;
37
- function requireReactJsxDevRuntime_development() {
38
- if (hasRequiredReactJsxDevRuntime_development) return reactJsxDevRuntime_development;
39
- hasRequiredReactJsxDevRuntime_development = 1;
40
- if (process.env.NODE_ENV !== "production") {
41
- (function() {
42
- var React = require$$0;
43
- var REACT_ELEMENT_TYPE = Symbol.for("react.element");
44
- var REACT_PORTAL_TYPE = Symbol.for("react.portal");
45
- var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
46
- var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
47
- var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
48
- var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
49
- var REACT_CONTEXT_TYPE = Symbol.for("react.context");
50
- var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
51
- var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
52
- var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
53
- var REACT_MEMO_TYPE = Symbol.for("react.memo");
54
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
55
- var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
56
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
57
- var FAUX_ITERATOR_SYMBOL = "@@iterator";
58
- function getIteratorFn(maybeIterable) {
59
- if (maybeIterable === null || typeof maybeIterable !== "object") {
60
- return null;
61
- }
62
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
63
- if (typeof maybeIterator === "function") {
64
- return maybeIterator;
65
- }
33
+ var or;
34
+ function fn() {
35
+ return or || (or = 1, process.env.NODE_ENV !== "production" && (function() {
36
+ var r = an, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), d = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), x = Symbol.iterator, j = "@@iterator";
37
+ function h(e) {
38
+ if (e === null || typeof e != "object")
66
39
  return null;
67
- }
68
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
69
- function error(format) {
70
- {
71
- {
72
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
73
- args[_key2 - 1] = arguments[_key2];
74
- }
75
- printWarning("error", format, args);
76
- }
77
- }
78
- }
79
- function printWarning(level, format, args) {
80
- {
81
- var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
82
- var stack = ReactDebugCurrentFrame2.getStackAddendum();
83
- if (stack !== "") {
84
- format += "%s";
85
- args = args.concat([stack]);
86
- }
87
- var argsWithFormat = args.map(function(item) {
88
- return String(item);
89
- });
90
- argsWithFormat.unshift("Warning: " + format);
91
- Function.prototype.apply.call(console[level], console, argsWithFormat);
92
- }
93
- }
94
- var enableScopeAPI = false;
95
- var enableCacheElement = false;
96
- var enableTransitionTracing = false;
97
- var enableLegacyHidden = false;
98
- var enableDebugTracing = false;
99
- var REACT_MODULE_REFERENCE;
40
+ var a = x && e[x] || e[j];
41
+ return typeof a == "function" ? a : null;
42
+ }
43
+ var T = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
44
+ function y(e) {
100
45
  {
101
- REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
46
+ for (var a = arguments.length, s = new Array(a > 1 ? a - 1 : 0), m = 1; m < a; m++)
47
+ s[m - 1] = arguments[m];
48
+ A("error", e, s);
102
49
  }
103
- function isValidElementType(type) {
104
- if (typeof type === "string" || typeof type === "function") {
105
- return true;
106
- }
107
- if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
108
- return true;
109
- }
110
- if (typeof type === "object" && type !== null) {
111
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
112
- // types supported by any Flight configuration anywhere since
113
- // we don't know which Flight build this will end up being used
114
- // with.
115
- type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
116
- return true;
117
- }
118
- }
119
- return false;
120
- }
121
- function getWrappedName(outerType, innerType, wrapperName) {
122
- var displayName = outerType.displayName;
123
- if (displayName) {
124
- return displayName;
125
- }
126
- var functionName = innerType.displayName || innerType.name || "";
127
- return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
50
+ }
51
+ function A(e, a, s) {
52
+ {
53
+ var m = T.ReactDebugCurrentFrame, p = m.getStackAddendum();
54
+ p !== "" && (a += "%s", s = s.concat([p]));
55
+ var E = s.map(function(b) {
56
+ return String(b);
57
+ });
58
+ E.unshift("Warning: " + a), Function.prototype.apply.call(console[e], console, E);
128
59
  }
129
- function getContextName(type) {
130
- return type.displayName || "Context";
60
+ }
61
+ var F = !1, $ = !1, q = !1, k = !1, _ = !1, M;
62
+ M = Symbol.for("react.module.reference");
63
+ function B(e) {
64
+ return !!(typeof e == "string" || typeof e == "function" || e === l || e === i || _ || e === o || e === c || e === D || k || e === C || F || $ || q || typeof e == "object" && e !== null && (e.$$typeof === S || e.$$typeof === R || e.$$typeof === f || e.$$typeof === d || e.$$typeof === g || // This needs to include all possible module reference object
65
+ // types supported by any Flight configuration anywhere since
66
+ // we don't know which Flight build this will end up being used
67
+ // with.
68
+ e.$$typeof === M || e.getModuleId !== void 0));
69
+ }
70
+ function w(e, a, s) {
71
+ var m = e.displayName;
72
+ if (m)
73
+ return m;
74
+ var p = a.displayName || a.name || "";
75
+ return p !== "" ? s + "(" + p + ")" : s;
76
+ }
77
+ function H(e) {
78
+ return e.displayName || "Context";
79
+ }
80
+ function N(e) {
81
+ if (e == null)
82
+ return null;
83
+ if (typeof e.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
84
+ return e.displayName || e.name || null;
85
+ if (typeof e == "string")
86
+ return e;
87
+ switch (e) {
88
+ case l:
89
+ return "Fragment";
90
+ case n:
91
+ return "Portal";
92
+ case i:
93
+ return "Profiler";
94
+ case o:
95
+ return "StrictMode";
96
+ case c:
97
+ return "Suspense";
98
+ case D:
99
+ return "SuspenseList";
131
100
  }
132
- function getComponentNameFromType(type) {
133
- if (type == null) {
134
- return null;
135
- }
136
- {
137
- if (typeof type.tag === "number") {
138
- error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
139
- }
140
- }
141
- if (typeof type === "function") {
142
- return type.displayName || type.name || null;
143
- }
144
- if (typeof type === "string") {
145
- return type;
146
- }
147
- switch (type) {
148
- case REACT_FRAGMENT_TYPE:
149
- return "Fragment";
150
- case REACT_PORTAL_TYPE:
151
- return "Portal";
152
- case REACT_PROFILER_TYPE:
153
- return "Profiler";
154
- case REACT_STRICT_MODE_TYPE:
155
- return "StrictMode";
156
- case REACT_SUSPENSE_TYPE:
157
- return "Suspense";
158
- case REACT_SUSPENSE_LIST_TYPE:
159
- return "SuspenseList";
160
- }
161
- if (typeof type === "object") {
162
- switch (type.$$typeof) {
163
- case REACT_CONTEXT_TYPE:
164
- var context = type;
165
- return getContextName(context) + ".Consumer";
166
- case REACT_PROVIDER_TYPE:
167
- var provider = type;
168
- return getContextName(provider._context) + ".Provider";
169
- case REACT_FORWARD_REF_TYPE:
170
- return getWrappedName(type, type.render, "ForwardRef");
171
- case REACT_MEMO_TYPE:
172
- var outerName = type.displayName || null;
173
- if (outerName !== null) {
174
- return outerName;
175
- }
176
- return getComponentNameFromType(type.type) || "Memo";
177
- case REACT_LAZY_TYPE: {
178
- var lazyComponent = type;
179
- var payload = lazyComponent._payload;
180
- var init = lazyComponent._init;
181
- try {
182
- return getComponentNameFromType(init(payload));
183
- } catch (x) {
184
- return null;
185
- }
101
+ if (typeof e == "object")
102
+ switch (e.$$typeof) {
103
+ case d:
104
+ var a = e;
105
+ return H(a) + ".Consumer";
106
+ case f:
107
+ var s = e;
108
+ return H(s._context) + ".Provider";
109
+ case g:
110
+ return w(e, e.render, "ForwardRef");
111
+ case R:
112
+ var m = e.displayName || null;
113
+ return m !== null ? m : N(e.type) || "Memo";
114
+ case S: {
115
+ var p = e, E = p._payload, b = p._init;
116
+ try {
117
+ return N(b(E));
118
+ } catch {
119
+ return null;
186
120
  }
187
121
  }
188
122
  }
189
- return null;
190
- }
191
- var assign = Object.assign;
192
- var disabledDepth = 0;
193
- var prevLog;
194
- var prevInfo;
195
- var prevWarn;
196
- var prevError;
197
- var prevGroup;
198
- var prevGroupCollapsed;
199
- var prevGroupEnd;
200
- function disabledLog() {
201
- }
202
- disabledLog.__reactDisabledLog = true;
203
- function disableLogs() {
204
- {
205
- if (disabledDepth === 0) {
206
- prevLog = console.log;
207
- prevInfo = console.info;
208
- prevWarn = console.warn;
209
- prevError = console.error;
210
- prevGroup = console.group;
211
- prevGroupCollapsed = console.groupCollapsed;
212
- prevGroupEnd = console.groupEnd;
213
- var props = {
214
- configurable: true,
215
- enumerable: true,
216
- value: disabledLog,
217
- writable: true
218
- };
219
- Object.defineProperties(console, {
220
- info: props,
221
- log: props,
222
- warn: props,
223
- error: props,
224
- group: props,
225
- groupCollapsed: props,
226
- groupEnd: props
227
- });
228
- }
229
- disabledDepth++;
123
+ return null;
124
+ }
125
+ var V = Object.assign, I = 0, K, qe, Ge, Me, We, Ye, He;
126
+ function Xe() {
127
+ }
128
+ Xe.__reactDisabledLog = !0;
129
+ function Vr() {
130
+ {
131
+ if (I === 0) {
132
+ K = console.log, qe = console.info, Ge = console.warn, Me = console.error, We = console.group, Ye = console.groupCollapsed, He = console.groupEnd;
133
+ var e = {
134
+ configurable: !0,
135
+ enumerable: !0,
136
+ value: Xe,
137
+ writable: !0
138
+ };
139
+ Object.defineProperties(console, {
140
+ info: e,
141
+ log: e,
142
+ warn: e,
143
+ error: e,
144
+ group: e,
145
+ groupCollapsed: e,
146
+ groupEnd: e
147
+ });
230
148
  }
149
+ I++;
231
150
  }
232
- function reenableLogs() {
233
- {
234
- disabledDepth--;
235
- if (disabledDepth === 0) {
236
- var props = {
237
- configurable: true,
238
- enumerable: true,
239
- writable: true
240
- };
241
- Object.defineProperties(console, {
242
- log: assign({}, props, {
243
- value: prevLog
244
- }),
245
- info: assign({}, props, {
246
- value: prevInfo
247
- }),
248
- warn: assign({}, props, {
249
- value: prevWarn
250
- }),
251
- error: assign({}, props, {
252
- value: prevError
253
- }),
254
- group: assign({}, props, {
255
- value: prevGroup
256
- }),
257
- groupCollapsed: assign({}, props, {
258
- value: prevGroupCollapsed
259
- }),
260
- groupEnd: assign({}, props, {
261
- value: prevGroupEnd
262
- })
263
- });
264
- }
265
- if (disabledDepth < 0) {
266
- error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
267
- }
151
+ }
152
+ function wr() {
153
+ {
154
+ if (I--, I === 0) {
155
+ var e = {
156
+ configurable: !0,
157
+ enumerable: !0,
158
+ writable: !0
159
+ };
160
+ Object.defineProperties(console, {
161
+ log: V({}, e, {
162
+ value: K
163
+ }),
164
+ info: V({}, e, {
165
+ value: qe
166
+ }),
167
+ warn: V({}, e, {
168
+ value: Ge
169
+ }),
170
+ error: V({}, e, {
171
+ value: Me
172
+ }),
173
+ group: V({}, e, {
174
+ value: We
175
+ }),
176
+ groupCollapsed: V({}, e, {
177
+ value: Ye
178
+ }),
179
+ groupEnd: V({}, e, {
180
+ value: He
181
+ })
182
+ });
268
183
  }
184
+ I < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
269
185
  }
270
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
271
- var prefix;
272
- function describeBuiltInComponentFrame(name, source, ownerFn) {
273
- {
274
- if (prefix === void 0) {
275
- try {
276
- throw Error();
277
- } catch (x) {
278
- var match = x.stack.trim().match(/\n( *(at )?)/);
279
- prefix = match && match[1] || "";
280
- }
186
+ }
187
+ var ge = T.ReactCurrentDispatcher, xe;
188
+ function ie(e, a, s) {
189
+ {
190
+ if (xe === void 0)
191
+ try {
192
+ throw Error();
193
+ } catch (p) {
194
+ var m = p.stack.trim().match(/\n( *(at )?)/);
195
+ xe = m && m[1] || "";
281
196
  }
282
- return "\n" + prefix + name;
283
- }
197
+ return `
198
+ ` + xe + e;
284
199
  }
285
- var reentry = false;
286
- var componentFrameCache;
200
+ }
201
+ var ve = !1, se;
202
+ {
203
+ var zr = typeof WeakMap == "function" ? WeakMap : Map;
204
+ se = new zr();
205
+ }
206
+ function Je(e, a) {
207
+ if (!e || ve)
208
+ return "";
287
209
  {
288
- var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
289
- componentFrameCache = new PossiblyWeakMap();
210
+ var s = se.get(e);
211
+ if (s !== void 0)
212
+ return s;
290
213
  }
291
- function describeNativeComponentFrame(fn, construct) {
292
- if (!fn || reentry) {
293
- return "";
294
- }
295
- {
296
- var frame = componentFrameCache.get(fn);
297
- if (frame !== void 0) {
298
- return frame;
299
- }
300
- }
301
- var control;
302
- reentry = true;
303
- var previousPrepareStackTrace = Error.prepareStackTrace;
304
- Error.prepareStackTrace = void 0;
305
- var previousDispatcher;
306
- {
307
- previousDispatcher = ReactCurrentDispatcher.current;
308
- ReactCurrentDispatcher.current = null;
309
- disableLogs();
310
- }
311
- try {
312
- if (construct) {
313
- var Fake = function() {
214
+ var m;
215
+ ve = !0;
216
+ var p = Error.prepareStackTrace;
217
+ Error.prepareStackTrace = void 0;
218
+ var E;
219
+ E = ge.current, ge.current = null, Vr();
220
+ try {
221
+ if (a) {
222
+ var b = function() {
223
+ throw Error();
224
+ };
225
+ if (Object.defineProperty(b.prototype, "props", {
226
+ set: function() {
314
227
  throw Error();
315
- };
316
- Object.defineProperty(Fake.prototype, "props", {
317
- set: function() {
318
- throw Error();
319
- }
320
- });
321
- if (typeof Reflect === "object" && Reflect.construct) {
322
- try {
323
- Reflect.construct(Fake, []);
324
- } catch (x) {
325
- control = x;
326
- }
327
- Reflect.construct(fn, [], Fake);
328
- } else {
329
- try {
330
- Fake.call();
331
- } catch (x) {
332
- control = x;
333
- }
334
- fn.call(Fake.prototype);
335
228
  }
336
- } else {
229
+ }), typeof Reflect == "object" && Reflect.construct) {
337
230
  try {
338
- throw Error();
339
- } catch (x) {
340
- control = x;
231
+ Reflect.construct(b, []);
232
+ } catch (P) {
233
+ m = P;
341
234
  }
342
- fn();
343
- }
344
- } catch (sample) {
345
- if (sample && control && typeof sample.stack === "string") {
346
- var sampleLines = sample.stack.split("\n");
347
- var controlLines = control.stack.split("\n");
348
- var s = sampleLines.length - 1;
349
- var c = controlLines.length - 1;
350
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
351
- c--;
352
- }
353
- for (; s >= 1 && c >= 0; s--, c--) {
354
- if (sampleLines[s] !== controlLines[c]) {
355
- if (s !== 1 || c !== 1) {
356
- do {
357
- s--;
358
- c--;
359
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
360
- var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
361
- if (fn.displayName && _frame.includes("<anonymous>")) {
362
- _frame = _frame.replace("<anonymous>", fn.displayName);
363
- }
364
- {
365
- if (typeof fn === "function") {
366
- componentFrameCache.set(fn, _frame);
367
- }
368
- }
369
- return _frame;
370
- }
371
- } while (s >= 1 && c >= 0);
372
- }
373
- break;
374
- }
235
+ Reflect.construct(e, [], b);
236
+ } else {
237
+ try {
238
+ b.call();
239
+ } catch (P) {
240
+ m = P;
375
241
  }
242
+ e.call(b.prototype);
376
243
  }
377
- } finally {
378
- reentry = false;
379
- {
380
- ReactCurrentDispatcher.current = previousDispatcher;
381
- reenableLogs();
382
- }
383
- Error.prepareStackTrace = previousPrepareStackTrace;
384
- }
385
- var name = fn ? fn.displayName || fn.name : "";
386
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
387
- {
388
- if (typeof fn === "function") {
389
- componentFrameCache.set(fn, syntheticFrame);
390
- }
391
- }
392
- return syntheticFrame;
393
- }
394
- function describeFunctionComponentFrame(fn, source, ownerFn) {
395
- {
396
- return describeNativeComponentFrame(fn, false);
397
- }
398
- }
399
- function shouldConstruct(Component) {
400
- var prototype = Component.prototype;
401
- return !!(prototype && prototype.isReactComponent);
402
- }
403
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
404
- if (type == null) {
405
- return "";
406
- }
407
- if (typeof type === "function") {
408
- {
409
- return describeNativeComponentFrame(type, shouldConstruct(type));
244
+ } else {
245
+ try {
246
+ throw Error();
247
+ } catch (P) {
248
+ m = P;
410
249
  }
250
+ e();
411
251
  }
412
- if (typeof type === "string") {
413
- return describeBuiltInComponentFrame(type);
414
- }
415
- switch (type) {
416
- case REACT_SUSPENSE_TYPE:
417
- return describeBuiltInComponentFrame("Suspense");
418
- case REACT_SUSPENSE_LIST_TYPE:
419
- return describeBuiltInComponentFrame("SuspenseList");
420
- }
421
- if (typeof type === "object") {
422
- switch (type.$$typeof) {
423
- case REACT_FORWARD_REF_TYPE:
424
- return describeFunctionComponentFrame(type.render);
425
- case REACT_MEMO_TYPE:
426
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
427
- case REACT_LAZY_TYPE: {
428
- var lazyComponent = type;
429
- var payload = lazyComponent._payload;
430
- var init = lazyComponent._init;
431
- try {
432
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
433
- } catch (x) {
434
- }
252
+ } catch (P) {
253
+ if (P && m && typeof P.stack == "string") {
254
+ for (var v = P.stack.split(`
255
+ `), z = m.stack.split(`
256
+ `), O = v.length - 1, U = z.length - 1; O >= 1 && U >= 0 && v[O] !== z[U]; )
257
+ U--;
258
+ for (; O >= 1 && U >= 0; O--, U--)
259
+ if (v[O] !== z[U]) {
260
+ if (O !== 1 || U !== 1)
261
+ do
262
+ if (O--, U--, U < 0 || v[O] !== z[U]) {
263
+ var L = `
264
+ ` + v[O].replace(" at new ", " at ");
265
+ return e.displayName && L.includes("<anonymous>") && (L = L.replace("<anonymous>", e.displayName)), typeof e == "function" && se.set(e, L), L;
266
+ }
267
+ while (O >= 1 && U >= 0);
268
+ break;
435
269
  }
436
- }
437
270
  }
271
+ } finally {
272
+ ve = !1, ge.current = E, wr(), Error.prepareStackTrace = p;
273
+ }
274
+ var J = e ? e.displayName || e.name : "", W = J ? ie(J) : "";
275
+ return typeof e == "function" && se.set(e, W), W;
276
+ }
277
+ function Pr(e, a, s) {
278
+ return Je(e, !1);
279
+ }
280
+ function Ar(e) {
281
+ var a = e.prototype;
282
+ return !!(a && a.isReactComponent);
283
+ }
284
+ function le(e, a, s) {
285
+ if (e == null)
438
286
  return "";
287
+ if (typeof e == "function")
288
+ return Je(e, Ar(e));
289
+ if (typeof e == "string")
290
+ return ie(e);
291
+ switch (e) {
292
+ case c:
293
+ return ie("Suspense");
294
+ case D:
295
+ return ie("SuspenseList");
439
296
  }
440
- var hasOwnProperty = Object.prototype.hasOwnProperty;
441
- var loggedTypeFailures = {};
442
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
443
- function setCurrentlyValidatingElement(element) {
444
- {
445
- if (element) {
446
- var owner = element._owner;
447
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
448
- ReactDebugCurrentFrame.setExtraStackFrame(stack);
449
- } else {
450
- ReactDebugCurrentFrame.setExtraStackFrame(null);
297
+ if (typeof e == "object")
298
+ switch (e.$$typeof) {
299
+ case g:
300
+ return Pr(e.render);
301
+ case R:
302
+ return le(e.type, a, s);
303
+ case S: {
304
+ var m = e, p = m._payload, E = m._init;
305
+ try {
306
+ return le(E(p), a, s);
307
+ } catch {
308
+ }
451
309
  }
452
310
  }
453
- }
454
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
455
- {
456
- var has = Function.call.bind(hasOwnProperty);
457
- for (var typeSpecName in typeSpecs) {
458
- if (has(typeSpecs, typeSpecName)) {
459
- var error$1 = void 0;
460
- try {
461
- if (typeof typeSpecs[typeSpecName] !== "function") {
462
- var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
463
- err.name = "Invariant Violation";
464
- throw err;
465
- }
466
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
467
- } catch (ex) {
468
- error$1 = ex;
469
- }
470
- if (error$1 && !(error$1 instanceof Error)) {
471
- setCurrentlyValidatingElement(element);
472
- error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
473
- setCurrentlyValidatingElement(null);
474
- }
475
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
476
- loggedTypeFailures[error$1.message] = true;
477
- setCurrentlyValidatingElement(element);
478
- error("Failed %s type: %s", location, error$1.message);
479
- setCurrentlyValidatingElement(null);
311
+ return "";
312
+ }
313
+ var Q = Object.prototype.hasOwnProperty, Ze = {}, Be = T.ReactDebugCurrentFrame;
314
+ function ue(e) {
315
+ if (e) {
316
+ var a = e._owner, s = le(e.type, e._source, a ? a.type : null);
317
+ Be.setExtraStackFrame(s);
318
+ } else
319
+ Be.setExtraStackFrame(null);
320
+ }
321
+ function Fr(e, a, s, m, p) {
322
+ {
323
+ var E = Function.call.bind(Q);
324
+ for (var b in e)
325
+ if (E(e, b)) {
326
+ var v = void 0;
327
+ try {
328
+ if (typeof e[b] != "function") {
329
+ var z = Error((m || "React class") + ": " + s + " type `" + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[b] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
330
+ throw z.name = "Invariant Violation", z;
480
331
  }
332
+ v = e[b](a, b, m, s, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
333
+ } catch (O) {
334
+ v = O;
481
335
  }
336
+ v && !(v instanceof Error) && (ue(p), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", m || "React class", s, b, typeof v), ue(null)), v instanceof Error && !(v.message in Ze) && (Ze[v.message] = !0, ue(p), y("Failed %s type: %s", s, v.message), ue(null));
482
337
  }
483
- }
484
- }
485
- var isArrayImpl = Array.isArray;
486
- function isArray(a) {
487
- return isArrayImpl(a);
488
338
  }
489
- function typeName(value) {
490
- {
491
- var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
492
- var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
493
- return type;
494
- }
495
- }
496
- function willCoercionThrow(value) {
497
- {
498
- try {
499
- testStringCoercion(value);
500
- return false;
501
- } catch (e) {
502
- return true;
503
- }
504
- }
505
- }
506
- function testStringCoercion(value) {
507
- return "" + value;
508
- }
509
- function checkKeyStringCoercion(value) {
510
- {
511
- if (willCoercionThrow(value)) {
512
- error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
513
- return testStringCoercion(value);
514
- }
515
- }
516
- }
517
- var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
518
- var RESERVED_PROPS = {
519
- key: true,
520
- ref: true,
521
- __self: true,
522
- __source: true
523
- };
524
- var specialPropKeyWarningShown;
525
- var specialPropRefWarningShown;
526
- var didWarnAboutStringRefs;
339
+ }
340
+ var Lr = Array.isArray;
341
+ function be(e) {
342
+ return Lr(e);
343
+ }
344
+ function Ir(e) {
527
345
  {
528
- didWarnAboutStringRefs = {};
346
+ var a = typeof Symbol == "function" && Symbol.toStringTag, s = a && e[Symbol.toStringTag] || e.constructor.name || "Object";
347
+ return s;
529
348
  }
530
- function hasValidRef(config) {
531
- {
532
- if (hasOwnProperty.call(config, "ref")) {
533
- var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
534
- if (getter && getter.isReactWarning) {
535
- return false;
536
- }
537
- }
538
- }
539
- return config.ref !== void 0;
349
+ }
350
+ function $r(e) {
351
+ try {
352
+ return Ke(e), !1;
353
+ } catch {
354
+ return !0;
540
355
  }
541
- function hasValidKey(config) {
542
- {
543
- if (hasOwnProperty.call(config, "key")) {
544
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
545
- if (getter && getter.isReactWarning) {
546
- return false;
547
- }
548
- }
549
- }
550
- return config.key !== void 0;
356
+ }
357
+ function Ke(e) {
358
+ return "" + e;
359
+ }
360
+ function Qe(e) {
361
+ if ($r(e))
362
+ return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ir(e)), Ke(e);
363
+ }
364
+ var ee = T.ReactCurrentOwner, qr = {
365
+ key: !0,
366
+ ref: !0,
367
+ __self: !0,
368
+ __source: !0
369
+ }, er, rr, he;
370
+ he = {};
371
+ function Gr(e) {
372
+ if (Q.call(e, "ref")) {
373
+ var a = Object.getOwnPropertyDescriptor(e, "ref").get;
374
+ if (a && a.isReactWarning)
375
+ return !1;
551
376
  }
552
- function warnIfStringRefCannotBeAutoConverted(config, self2) {
553
- {
554
- if (typeof config.ref === "string" && ReactCurrentOwner.current && self2 && ReactCurrentOwner.current.stateNode !== self2) {
555
- var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
556
- if (!didWarnAboutStringRefs[componentName]) {
557
- error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
558
- didWarnAboutStringRefs[componentName] = true;
559
- }
560
- }
561
- }
377
+ return e.ref !== void 0;
378
+ }
379
+ function Mr(e) {
380
+ if (Q.call(e, "key")) {
381
+ var a = Object.getOwnPropertyDescriptor(e, "key").get;
382
+ if (a && a.isReactWarning)
383
+ return !1;
562
384
  }
563
- function defineKeyPropWarningGetter(props, displayName) {
564
- {
565
- var warnAboutAccessingKey = function() {
566
- if (!specialPropKeyWarningShown) {
567
- specialPropKeyWarningShown = true;
568
- error("%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://reactjs.org/link/special-props)", displayName);
569
- }
570
- };
571
- warnAboutAccessingKey.isReactWarning = true;
572
- Object.defineProperty(props, "key", {
573
- get: warnAboutAccessingKey,
574
- configurable: true
575
- });
576
- }
385
+ return e.key !== void 0;
386
+ }
387
+ function Wr(e, a) {
388
+ if (typeof e.ref == "string" && ee.current && a && ee.current.stateNode !== a) {
389
+ var s = N(ee.current.type);
390
+ he[s] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', N(ee.current.type), e.ref), he[s] = !0);
577
391
  }
578
- function defineRefPropWarningGetter(props, displayName) {
579
- {
580
- var warnAboutAccessingRef = function() {
581
- if (!specialPropRefWarningShown) {
582
- specialPropRefWarningShown = true;
583
- error("%s: `ref` 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://reactjs.org/link/special-props)", displayName);
584
- }
585
- };
586
- warnAboutAccessingRef.isReactWarning = true;
587
- Object.defineProperty(props, "ref", {
588
- get: warnAboutAccessingRef,
589
- configurable: true
590
- });
591
- }
392
+ }
393
+ function Yr(e, a) {
394
+ {
395
+ var s = function() {
396
+ er || (er = !0, y("%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://reactjs.org/link/special-props)", a));
397
+ };
398
+ s.isReactWarning = !0, Object.defineProperty(e, "key", {
399
+ get: s,
400
+ configurable: !0
401
+ });
592
402
  }
593
- var ReactElement = function(type, key, ref, self2, source, owner, props) {
594
- var element = {
595
- // This tag allows us to uniquely identify this as a React Element
596
- $$typeof: REACT_ELEMENT_TYPE,
597
- // Built-in properties that belong on the element
598
- type,
599
- key,
600
- ref,
601
- props,
602
- // Record the component responsible for creating this element.
603
- _owner: owner
403
+ }
404
+ function Hr(e, a) {
405
+ {
406
+ var s = function() {
407
+ rr || (rr = !0, y("%s: `ref` 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://reactjs.org/link/special-props)", a));
604
408
  };
605
- {
606
- element._store = {};
607
- Object.defineProperty(element._store, "validated", {
608
- configurable: false,
609
- enumerable: false,
610
- writable: true,
611
- value: false
612
- });
613
- Object.defineProperty(element, "_self", {
614
- configurable: false,
615
- enumerable: false,
616
- writable: false,
617
- value: self2
618
- });
619
- Object.defineProperty(element, "_source", {
620
- configurable: false,
621
- enumerable: false,
622
- writable: false,
623
- value: source
624
- });
625
- if (Object.freeze) {
626
- Object.freeze(element.props);
627
- Object.freeze(element);
628
- }
629
- }
630
- return element;
409
+ s.isReactWarning = !0, Object.defineProperty(e, "ref", {
410
+ get: s,
411
+ configurable: !0
412
+ });
413
+ }
414
+ }
415
+ var Xr = function(e, a, s, m, p, E, b) {
416
+ var v = {
417
+ // This tag allows us to uniquely identify this as a React Element
418
+ $$typeof: t,
419
+ // Built-in properties that belong on the element
420
+ type: e,
421
+ key: a,
422
+ ref: s,
423
+ props: b,
424
+ // Record the component responsible for creating this element.
425
+ _owner: E
631
426
  };
632
- function jsxDEV(type, config, maybeKey, source, self2) {
633
- {
634
- var propName;
635
- var props = {};
636
- var key = null;
637
- var ref = null;
638
- if (maybeKey !== void 0) {
639
- {
640
- checkKeyStringCoercion(maybeKey);
641
- }
642
- key = "" + maybeKey;
643
- }
644
- if (hasValidKey(config)) {
645
- {
646
- checkKeyStringCoercion(config.key);
647
- }
648
- key = "" + config.key;
649
- }
650
- if (hasValidRef(config)) {
651
- ref = config.ref;
652
- warnIfStringRefCannotBeAutoConverted(config, self2);
653
- }
654
- for (propName in config) {
655
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
656
- props[propName] = config[propName];
657
- }
658
- }
659
- if (type && type.defaultProps) {
660
- var defaultProps = type.defaultProps;
661
- for (propName in defaultProps) {
662
- if (props[propName] === void 0) {
663
- props[propName] = defaultProps[propName];
664
- }
665
- }
666
- }
667
- if (key || ref) {
668
- var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
669
- if (key) {
670
- defineKeyPropWarningGetter(props, displayName);
671
- }
672
- if (ref) {
673
- defineRefPropWarningGetter(props, displayName);
674
- }
675
- }
676
- return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props);
427
+ return v._store = {}, Object.defineProperty(v._store, "validated", {
428
+ configurable: !1,
429
+ enumerable: !1,
430
+ writable: !0,
431
+ value: !1
432
+ }), Object.defineProperty(v, "_self", {
433
+ configurable: !1,
434
+ enumerable: !1,
435
+ writable: !1,
436
+ value: m
437
+ }), Object.defineProperty(v, "_source", {
438
+ configurable: !1,
439
+ enumerable: !1,
440
+ writable: !1,
441
+ value: p
442
+ }), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v;
443
+ };
444
+ function Jr(e, a, s, m, p) {
445
+ {
446
+ var E, b = {}, v = null, z = null;
447
+ s !== void 0 && (Qe(s), v = "" + s), Mr(a) && (Qe(a.key), v = "" + a.key), Gr(a) && (z = a.ref, Wr(a, p));
448
+ for (E in a)
449
+ Q.call(a, E) && !qr.hasOwnProperty(E) && (b[E] = a[E]);
450
+ if (e && e.defaultProps) {
451
+ var O = e.defaultProps;
452
+ for (E in O)
453
+ b[E] === void 0 && (b[E] = O[E]);
677
454
  }
678
- }
679
- var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
680
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
681
- function setCurrentlyValidatingElement$1(element) {
682
- {
683
- if (element) {
684
- var owner = element._owner;
685
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
686
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
687
- } else {
688
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
689
- }
455
+ if (v || z) {
456
+ var U = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
457
+ v && Yr(b, U), z && Hr(b, U);
690
458
  }
459
+ return Xr(e, v, z, p, m, ee.current, b);
691
460
  }
692
- var propTypesMisspellWarningShown;
461
+ }
462
+ var pe = T.ReactCurrentOwner, nr = T.ReactDebugCurrentFrame;
463
+ function X(e) {
464
+ if (e) {
465
+ var a = e._owner, s = le(e.type, e._source, a ? a.type : null);
466
+ nr.setExtraStackFrame(s);
467
+ } else
468
+ nr.setExtraStackFrame(null);
469
+ }
470
+ var ye;
471
+ ye = !1;
472
+ function Ne(e) {
473
+ return typeof e == "object" && e !== null && e.$$typeof === t;
474
+ }
475
+ function tr() {
693
476
  {
694
- propTypesMisspellWarningShown = false;
695
- }
696
- function isValidElement(object) {
697
- {
698
- return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
477
+ if (pe.current) {
478
+ var e = N(pe.current.type);
479
+ if (e)
480
+ return `
481
+
482
+ Check the render method of \`` + e + "`.";
699
483
  }
484
+ return "";
700
485
  }
701
- function getDeclarationErrorAddendum() {
702
- {
703
- if (ReactCurrentOwner$1.current) {
704
- var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
705
- if (name) {
706
- return "\n\nCheck the render method of `" + name + "`.";
707
- }
708
- }
709
- return "";
486
+ }
487
+ function Zr(e) {
488
+ {
489
+ if (e !== void 0) {
490
+ var a = e.fileName.replace(/^.*[\\\/]/, ""), s = e.lineNumber;
491
+ return `
492
+
493
+ Check your code at ` + a + ":" + s + ".";
710
494
  }
495
+ return "";
711
496
  }
712
- function getSourceInfoErrorAddendum(source) {
713
- {
714
- if (source !== void 0) {
715
- var fileName = source.fileName.replace(/^.*[\\\/]/, "");
716
- var lineNumber = source.lineNumber;
717
- return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
718
- }
719
- return "";
497
+ }
498
+ var ar = {};
499
+ function Br(e) {
500
+ {
501
+ var a = tr();
502
+ if (!a) {
503
+ var s = typeof e == "string" ? e : e.displayName || e.name;
504
+ s && (a = `
505
+
506
+ Check the top-level render call using <` + s + ">.");
720
507
  }
508
+ return a;
721
509
  }
722
- var ownerHasKeyUseWarning = {};
723
- function getCurrentComponentErrorInfo(parentType) {
724
- {
725
- var info = getDeclarationErrorAddendum();
726
- if (!info) {
727
- var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
728
- if (parentName) {
729
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
730
- }
731
- }
732
- return info;
733
- }
510
+ }
511
+ function ir(e, a) {
512
+ {
513
+ if (!e._store || e._store.validated || e.key != null)
514
+ return;
515
+ e._store.validated = !0;
516
+ var s = Br(a);
517
+ if (ar[s])
518
+ return;
519
+ ar[s] = !0;
520
+ var m = "";
521
+ e && e._owner && e._owner !== pe.current && (m = " It was passed a child from " + N(e._owner.type) + "."), X(e), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', s, m), X(null);
734
522
  }
735
- function validateExplicitKey(element, parentType) {
736
- {
737
- if (!element._store || element._store.validated || element.key != null) {
738
- return;
739
- }
740
- element._store.validated = true;
741
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
742
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
743
- return;
744
- }
745
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
746
- var childOwner = "";
747
- if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
748
- childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
523
+ }
524
+ function sr(e, a) {
525
+ {
526
+ if (typeof e != "object")
527
+ return;
528
+ if (be(e))
529
+ for (var s = 0; s < e.length; s++) {
530
+ var m = e[s];
531
+ Ne(m) && ir(m, a);
749
532
  }
750
- setCurrentlyValidatingElement$1(element);
751
- error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
752
- setCurrentlyValidatingElement$1(null);
533
+ else if (Ne(e))
534
+ e._store && (e._store.validated = !0);
535
+ else if (e) {
536
+ var p = h(e);
537
+ if (typeof p == "function" && p !== e.entries)
538
+ for (var E = p.call(e), b; !(b = E.next()).done; )
539
+ Ne(b.value) && ir(b.value, a);
753
540
  }
754
541
  }
755
- function validateChildKeys(node, parentType) {
756
- {
757
- if (typeof node !== "object") {
758
- return;
759
- }
760
- if (isArray(node)) {
761
- for (var i = 0; i < node.length; i++) {
762
- var child = node[i];
763
- if (isValidElement(child)) {
764
- validateExplicitKey(child, parentType);
765
- }
766
- }
767
- } else if (isValidElement(node)) {
768
- if (node._store) {
769
- node._store.validated = true;
770
- }
771
- } else if (node) {
772
- var iteratorFn = getIteratorFn(node);
773
- if (typeof iteratorFn === "function") {
774
- if (iteratorFn !== node.entries) {
775
- var iterator = iteratorFn.call(node);
776
- var step;
777
- while (!(step = iterator.next()).done) {
778
- if (isValidElement(step.value)) {
779
- validateExplicitKey(step.value, parentType);
780
- }
781
- }
782
- }
783
- }
784
- }
542
+ }
543
+ function Kr(e) {
544
+ {
545
+ var a = e.type;
546
+ if (a == null || typeof a == "string")
547
+ return;
548
+ var s;
549
+ if (typeof a == "function")
550
+ s = a.propTypes;
551
+ else if (typeof a == "object" && (a.$$typeof === g || // Note: Memo only checks outer props here.
552
+ // Inner props are checked in the reconciler.
553
+ a.$$typeof === R))
554
+ s = a.propTypes;
555
+ else
556
+ return;
557
+ if (s) {
558
+ var m = N(a);
559
+ Fr(s, e.props, "prop", m, e);
560
+ } else if (a.PropTypes !== void 0 && !ye) {
561
+ ye = !0;
562
+ var p = N(a);
563
+ y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", p || "Unknown");
785
564
  }
565
+ typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
786
566
  }
787
- function validatePropTypes(element) {
788
- {
789
- var type = element.type;
790
- if (type === null || type === void 0 || typeof type === "string") {
791
- return;
792
- }
793
- var propTypes;
794
- if (typeof type === "function") {
795
- propTypes = type.propTypes;
796
- } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
797
- // Inner props are checked in the reconciler.
798
- type.$$typeof === REACT_MEMO_TYPE)) {
799
- propTypes = type.propTypes;
800
- } else {
801
- return;
802
- }
803
- if (propTypes) {
804
- var name = getComponentNameFromType(type);
805
- checkPropTypes(propTypes, element.props, "prop", name, element);
806
- } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
807
- propTypesMisspellWarningShown = true;
808
- var _name = getComponentNameFromType(type);
809
- error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
810
- }
811
- if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
812
- error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
567
+ }
568
+ function Qr(e) {
569
+ {
570
+ for (var a = Object.keys(e.props), s = 0; s < a.length; s++) {
571
+ var m = a[s];
572
+ if (m !== "children" && m !== "key") {
573
+ X(e), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", m), X(null);
574
+ break;
813
575
  }
814
576
  }
577
+ e.ref !== null && (X(e), y("Invalid attribute `ref` supplied to `React.Fragment`."), X(null));
815
578
  }
816
- function validateFragmentProps(fragment) {
817
- {
818
- var keys = Object.keys(fragment.props);
819
- for (var i = 0; i < keys.length; i++) {
820
- var key = keys[i];
821
- if (key !== "children" && key !== "key") {
822
- setCurrentlyValidatingElement$1(fragment);
823
- error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
824
- setCurrentlyValidatingElement$1(null);
825
- break;
826
- }
827
- }
828
- if (fragment.ref !== null) {
829
- setCurrentlyValidatingElement$1(fragment);
830
- error("Invalid attribute `ref` supplied to `React.Fragment`.");
831
- setCurrentlyValidatingElement$1(null);
832
- }
579
+ }
580
+ var lr = {};
581
+ function en(e, a, s, m, p, E) {
582
+ {
583
+ var b = B(e);
584
+ if (!b) {
585
+ var v = "";
586
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (v += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
587
+ var z = Zr(p);
588
+ z ? v += z : v += tr();
589
+ var O;
590
+ e === null ? O = "null" : be(e) ? O = "array" : e !== void 0 && e.$$typeof === t ? (O = "<" + (N(e.type) || "Unknown") + " />", v = " Did you accidentally export a JSX literal instead of a component?") : O = typeof e, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", O, v);
833
591
  }
834
- }
835
- var didWarnAboutKeySpread = {};
836
- function jsxWithValidation(type, props, key, isStaticChildren, source, self2) {
837
- {
838
- var validType = isValidElementType(type);
839
- if (!validType) {
840
- var info = "";
841
- if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
842
- info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
843
- }
844
- var sourceInfo = getSourceInfoErrorAddendum(source);
845
- if (sourceInfo) {
846
- info += sourceInfo;
847
- } else {
848
- info += getDeclarationErrorAddendum();
849
- }
850
- var typeString;
851
- if (type === null) {
852
- typeString = "null";
853
- } else if (isArray(type)) {
854
- typeString = "array";
855
- } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
856
- typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
857
- info = " Did you accidentally export a JSX literal instead of a component?";
858
- } else {
859
- typeString = typeof type;
860
- }
861
- error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
862
- }
863
- var element = jsxDEV(type, props, key, source, self2);
864
- if (element == null) {
865
- return element;
866
- }
867
- if (validType) {
868
- var children = props.children;
869
- if (children !== void 0) {
870
- if (isStaticChildren) {
871
- if (isArray(children)) {
872
- for (var i = 0; i < children.length; i++) {
873
- validateChildKeys(children[i], type);
874
- }
875
- if (Object.freeze) {
876
- Object.freeze(children);
877
- }
878
- } else {
879
- error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
880
- }
881
- } else {
882
- validateChildKeys(children, type);
883
- }
884
- }
885
- }
886
- {
887
- if (hasOwnProperty.call(props, "key")) {
888
- var componentName = getComponentNameFromType(type);
889
- var keys = Object.keys(props).filter(function(k) {
890
- return k !== "key";
891
- });
892
- var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
893
- if (!didWarnAboutKeySpread[componentName + beforeExample]) {
894
- var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}";
895
- error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
896
- didWarnAboutKeySpread[componentName + beforeExample] = true;
897
- }
898
- }
899
- }
900
- if (type === REACT_FRAGMENT_TYPE) {
901
- validateFragmentProps(element);
902
- } else {
903
- validatePropTypes(element);
592
+ var U = Jr(e, a, s, p, E);
593
+ if (U == null)
594
+ return U;
595
+ if (b) {
596
+ var L = a.children;
597
+ if (L !== void 0)
598
+ if (m)
599
+ if (be(L)) {
600
+ for (var J = 0; J < L.length; J++)
601
+ sr(L[J], e);
602
+ Object.freeze && Object.freeze(L);
603
+ } else
604
+ y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
605
+ else
606
+ sr(L, e);
607
+ }
608
+ if (Q.call(a, "key")) {
609
+ var W = N(e), P = Object.keys(a).filter(function(tn) {
610
+ return tn !== "key";
611
+ }), Ee = P.length > 0 ? "{key: someKey, " + P.join(": ..., ") + ": ...}" : "{key: someKey}";
612
+ if (!lr[W + Ee]) {
613
+ var nn = P.length > 0 ? "{" + P.join(": ..., ") + ": ...}" : "{}";
614
+ y(`A props object containing a "key" prop is being spread into JSX:
615
+ let props = %s;
616
+ <%s {...props} />
617
+ React keys must be passed directly to JSX without using spread:
618
+ let props = %s;
619
+ <%s key={someKey} {...props} />`, Ee, W, nn, W), lr[W + Ee] = !0;
904
620
  }
905
- return element;
906
621
  }
622
+ return e === l ? Qr(U) : Kr(U), U;
907
623
  }
908
- var jsxDEV$1 = jsxWithValidation;
909
- reactJsxDevRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
910
- reactJsxDevRuntime_development.jsxDEV = jsxDEV$1;
911
- })();
912
- }
913
- return reactJsxDevRuntime_development;
624
+ }
625
+ var rn = en;
626
+ de.Fragment = l, de.jsxDEV = rn;
627
+ })()), de;
914
628
  }
915
- var hasRequiredJsxDevRuntime;
916
- function requireJsxDevRuntime() {
917
- if (hasRequiredJsxDevRuntime) return jsxDevRuntime.exports;
918
- hasRequiredJsxDevRuntime = 1;
919
- if (process.env.NODE_ENV === "production") {
920
- jsxDevRuntime.exports = requireReactJsxDevRuntime_production_min();
921
- } else {
922
- jsxDevRuntime.exports = requireReactJsxDevRuntime_development();
923
- }
924
- return jsxDevRuntime.exports;
629
+ var fr;
630
+ function cn() {
631
+ return fr || (fr = 1, process.env.NODE_ENV === "production" ? fe.exports = on() : fe.exports = fn()), fe.exports;
925
632
  }
926
- var jsxDevRuntimeExports = requireJsxDevRuntime();
927
- var isObject_1;
928
- var hasRequiredIsObject;
929
- function requireIsObject() {
930
- if (hasRequiredIsObject) return isObject_1;
931
- hasRequiredIsObject = 1;
932
- function isObject(value) {
933
- var type = typeof value;
934
- return value != null && (type == "object" || type == "function");
633
+ var u = cn(), _e, cr;
634
+ function Le() {
635
+ if (cr) return _e;
636
+ cr = 1;
637
+ function r(t) {
638
+ var n = typeof t;
639
+ return t != null && (n == "object" || n == "function");
935
640
  }
936
- isObject_1 = isObject;
937
- return isObject_1;
641
+ return _e = r, _e;
938
642
  }
939
- var _freeGlobal;
940
- var hasRequired_freeGlobal;
941
- function require_freeGlobal() {
942
- if (hasRequired_freeGlobal) return _freeGlobal;
943
- hasRequired_freeGlobal = 1;
944
- var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
945
- _freeGlobal = freeGlobal;
946
- return _freeGlobal;
643
+ var De, dr;
644
+ function dn() {
645
+ if (dr) return De;
646
+ dr = 1;
647
+ var r = typeof oe == "object" && oe && oe.Object === Object && oe;
648
+ return De = r, De;
947
649
  }
948
- var _root;
949
- var hasRequired_root;
950
- function require_root() {
951
- if (hasRequired_root) return _root;
952
- hasRequired_root = 1;
953
- var freeGlobal = require_freeGlobal();
954
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
955
- var root = freeGlobal || freeSelf || Function("return this")();
956
- _root = root;
957
- return _root;
650
+ var Re, mr;
651
+ function Or() {
652
+ if (mr) return Re;
653
+ mr = 1;
654
+ var r = dn(), t = typeof self == "object" && self && self.Object === Object && self, n = r || t || Function("return this")();
655
+ return Re = n, Re;
958
656
  }
959
- var now_1;
960
- var hasRequiredNow;
961
- function requireNow() {
962
- if (hasRequiredNow) return now_1;
963
- hasRequiredNow = 1;
964
- var root = require_root();
965
- var now = function() {
966
- return root.Date.now();
657
+ var je, gr;
658
+ function mn() {
659
+ if (gr) return je;
660
+ gr = 1;
661
+ var r = Or(), t = function() {
662
+ return r.Date.now();
967
663
  };
968
- now_1 = now;
969
- return now_1;
664
+ return je = t, je;
970
665
  }
971
- var _trimmedEndIndex;
972
- var hasRequired_trimmedEndIndex;
973
- function require_trimmedEndIndex() {
974
- if (hasRequired_trimmedEndIndex) return _trimmedEndIndex;
975
- hasRequired_trimmedEndIndex = 1;
976
- var reWhitespace = /\s/;
977
- function trimmedEndIndex(string) {
978
- var index = string.length;
979
- while (index-- && reWhitespace.test(string.charAt(index))) {
980
- }
981
- return index;
666
+ var ke, xr;
667
+ function gn() {
668
+ if (xr) return ke;
669
+ xr = 1;
670
+ var r = /\s/;
671
+ function t(n) {
672
+ for (var l = n.length; l-- && r.test(n.charAt(l)); )
673
+ ;
674
+ return l;
982
675
  }
983
- _trimmedEndIndex = trimmedEndIndex;
984
- return _trimmedEndIndex;
676
+ return ke = t, ke;
985
677
  }
986
- var _baseTrim;
987
- var hasRequired_baseTrim;
988
- function require_baseTrim() {
989
- if (hasRequired_baseTrim) return _baseTrim;
990
- hasRequired_baseTrim = 1;
991
- var trimmedEndIndex = require_trimmedEndIndex();
992
- var reTrimStart = /^\s+/;
993
- function baseTrim(string) {
994
- return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
678
+ var Te, vr;
679
+ function xn() {
680
+ if (vr) return Te;
681
+ vr = 1;
682
+ var r = gn(), t = /^\s+/;
683
+ function n(l) {
684
+ return l && l.slice(0, r(l) + 1).replace(t, "");
995
685
  }
996
- _baseTrim = baseTrim;
997
- return _baseTrim;
686
+ return Te = n, Te;
998
687
  }
999
- var _Symbol;
1000
- var hasRequired_Symbol;
1001
- function require_Symbol() {
1002
- if (hasRequired_Symbol) return _Symbol;
1003
- hasRequired_Symbol = 1;
1004
- var root = require_root();
1005
- var Symbol2 = root.Symbol;
1006
- _Symbol = Symbol2;
1007
- return _Symbol;
688
+ var Oe, br;
689
+ function Ur() {
690
+ if (br) return Oe;
691
+ br = 1;
692
+ var r = Or(), t = r.Symbol;
693
+ return Oe = t, Oe;
1008
694
  }
1009
- var _getRawTag;
1010
- var hasRequired_getRawTag;
1011
- function require_getRawTag() {
1012
- if (hasRequired_getRawTag) return _getRawTag;
1013
- hasRequired_getRawTag = 1;
1014
- var Symbol2 = require_Symbol();
1015
- var objectProto = Object.prototype;
1016
- var hasOwnProperty = objectProto.hasOwnProperty;
1017
- var nativeObjectToString = objectProto.toString;
1018
- var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
1019
- function getRawTag(value) {
1020
- var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
695
+ var Ue, hr;
696
+ function vn() {
697
+ if (hr) return Ue;
698
+ hr = 1;
699
+ var r = Ur(), t = Object.prototype, n = t.hasOwnProperty, l = t.toString, o = r ? r.toStringTag : void 0;
700
+ function i(f) {
701
+ var d = n.call(f, o), g = f[o];
1021
702
  try {
1022
- value[symToStringTag] = void 0;
1023
- var unmasked = true;
1024
- } catch (e) {
1025
- }
1026
- var result = nativeObjectToString.call(value);
1027
- if (unmasked) {
1028
- if (isOwn) {
1029
- value[symToStringTag] = tag;
1030
- } else {
1031
- delete value[symToStringTag];
1032
- }
703
+ f[o] = void 0;
704
+ var c = !0;
705
+ } catch {
1033
706
  }
1034
- return result;
707
+ var D = l.call(f);
708
+ return c && (d ? f[o] = g : delete f[o]), D;
1035
709
  }
1036
- _getRawTag = getRawTag;
1037
- return _getRawTag;
710
+ return Ue = i, Ue;
1038
711
  }
1039
- var _objectToString;
1040
- var hasRequired_objectToString;
1041
- function require_objectToString() {
1042
- if (hasRequired_objectToString) return _objectToString;
1043
- hasRequired_objectToString = 1;
1044
- var objectProto = Object.prototype;
1045
- var nativeObjectToString = objectProto.toString;
1046
- function objectToString(value) {
1047
- return nativeObjectToString.call(value);
712
+ var Se, pr;
713
+ function bn() {
714
+ if (pr) return Se;
715
+ pr = 1;
716
+ var r = Object.prototype, t = r.toString;
717
+ function n(l) {
718
+ return t.call(l);
1048
719
  }
1049
- _objectToString = objectToString;
1050
- return _objectToString;
720
+ return Se = n, Se;
1051
721
  }
1052
- var _baseGetTag;
1053
- var hasRequired_baseGetTag;
1054
- function require_baseGetTag() {
1055
- if (hasRequired_baseGetTag) return _baseGetTag;
1056
- hasRequired_baseGetTag = 1;
1057
- var Symbol2 = require_Symbol(), getRawTag = require_getRawTag(), objectToString = require_objectToString();
1058
- var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
1059
- var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
1060
- function baseGetTag(value) {
1061
- if (value == null) {
1062
- return value === void 0 ? undefinedTag : nullTag;
1063
- }
1064
- return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
722
+ var Ce, yr;
723
+ function hn() {
724
+ if (yr) return Ce;
725
+ yr = 1;
726
+ var r = Ur(), t = vn(), n = bn(), l = "[object Null]", o = "[object Undefined]", i = r ? r.toStringTag : void 0;
727
+ function f(d) {
728
+ return d == null ? d === void 0 ? o : l : i && i in Object(d) ? t(d) : n(d);
1065
729
  }
1066
- _baseGetTag = baseGetTag;
1067
- return _baseGetTag;
730
+ return Ce = f, Ce;
1068
731
  }
1069
- var isObjectLike_1;
1070
- var hasRequiredIsObjectLike;
1071
- function requireIsObjectLike() {
1072
- if (hasRequiredIsObjectLike) return isObjectLike_1;
1073
- hasRequiredIsObjectLike = 1;
1074
- function isObjectLike(value) {
1075
- return value != null && typeof value == "object";
732
+ var Ve, Nr;
733
+ function pn() {
734
+ if (Nr) return Ve;
735
+ Nr = 1;
736
+ function r(t) {
737
+ return t != null && typeof t == "object";
1076
738
  }
1077
- isObjectLike_1 = isObjectLike;
1078
- return isObjectLike_1;
739
+ return Ve = r, Ve;
1079
740
  }
1080
- var isSymbol_1;
1081
- var hasRequiredIsSymbol;
1082
- function requireIsSymbol() {
1083
- if (hasRequiredIsSymbol) return isSymbol_1;
1084
- hasRequiredIsSymbol = 1;
1085
- var baseGetTag = require_baseGetTag(), isObjectLike = requireIsObjectLike();
1086
- var symbolTag = "[object Symbol]";
1087
- function isSymbol(value) {
1088
- return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
741
+ var we, Er;
742
+ function yn() {
743
+ if (Er) return we;
744
+ Er = 1;
745
+ var r = hn(), t = pn(), n = "[object Symbol]";
746
+ function l(o) {
747
+ return typeof o == "symbol" || t(o) && r(o) == n;
1089
748
  }
1090
- isSymbol_1 = isSymbol;
1091
- return isSymbol_1;
749
+ return we = l, we;
1092
750
  }
1093
- var toNumber_1;
1094
- var hasRequiredToNumber;
1095
- function requireToNumber() {
1096
- if (hasRequiredToNumber) return toNumber_1;
1097
- hasRequiredToNumber = 1;
1098
- var baseTrim = require_baseTrim(), isObject = requireIsObject(), isSymbol = requireIsSymbol();
1099
- var NAN = 0 / 0;
1100
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
1101
- var reIsBinary = /^0b[01]+$/i;
1102
- var reIsOctal = /^0o[0-7]+$/i;
1103
- var freeParseInt = parseInt;
1104
- function toNumber(value) {
1105
- if (typeof value == "number") {
1106
- return value;
1107
- }
1108
- if (isSymbol(value)) {
1109
- return NAN;
1110
- }
1111
- if (isObject(value)) {
1112
- var other = typeof value.valueOf == "function" ? value.valueOf() : value;
1113
- value = isObject(other) ? other + "" : other;
751
+ var ze, _r;
752
+ function Nn() {
753
+ if (_r) return ze;
754
+ _r = 1;
755
+ var r = xn(), t = Le(), n = yn(), l = NaN, o = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, f = /^0o[0-7]+$/i, d = parseInt;
756
+ function g(c) {
757
+ if (typeof c == "number")
758
+ return c;
759
+ if (n(c))
760
+ return l;
761
+ if (t(c)) {
762
+ var D = typeof c.valueOf == "function" ? c.valueOf() : c;
763
+ c = t(D) ? D + "" : D;
1114
764
  }
1115
- if (typeof value != "string") {
1116
- return value === 0 ? value : +value;
1117
- }
1118
- value = baseTrim(value);
1119
- var isBinary = reIsBinary.test(value);
1120
- return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
765
+ if (typeof c != "string")
766
+ return c === 0 ? c : +c;
767
+ c = r(c);
768
+ var R = i.test(c);
769
+ return R || f.test(c) ? d(c.slice(2), R ? 2 : 8) : o.test(c) ? l : +c;
1121
770
  }
1122
- toNumber_1 = toNumber;
1123
- return toNumber_1;
771
+ return ze = g, ze;
1124
772
  }
1125
- var debounce_1;
1126
- var hasRequiredDebounce;
1127
- function requireDebounce() {
1128
- if (hasRequiredDebounce) return debounce_1;
1129
- hasRequiredDebounce = 1;
1130
- var isObject = requireIsObject(), now = requireNow(), toNumber = requireToNumber();
1131
- var FUNC_ERROR_TEXT = "Expected a function";
1132
- var nativeMax = Math.max, nativeMin = Math.min;
1133
- function debounce(func, wait, options) {
1134
- var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
1135
- if (typeof func != "function") {
1136
- throw new TypeError(FUNC_ERROR_TEXT);
773
+ var Pe, Dr;
774
+ function En() {
775
+ if (Dr) return Pe;
776
+ Dr = 1;
777
+ var r = Le(), t = mn(), n = Nn(), l = "Expected a function", o = Math.max, i = Math.min;
778
+ function f(d, g, c) {
779
+ var D, R, S, C, x, j, h = 0, T = !1, y = !1, A = !0;
780
+ if (typeof d != "function")
781
+ throw new TypeError(l);
782
+ g = n(g) || 0, r(c) && (T = !!c.leading, y = "maxWait" in c, S = y ? o(n(c.maxWait) || 0, g) : S, A = "trailing" in c ? !!c.trailing : A);
783
+ function F(N) {
784
+ var V = D, I = R;
785
+ return D = R = void 0, h = N, C = d.apply(I, V), C;
1137
786
  }
1138
- wait = toNumber(wait) || 0;
1139
- if (isObject(options)) {
1140
- leading = !!options.leading;
1141
- maxing = "maxWait" in options;
1142
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
1143
- trailing = "trailing" in options ? !!options.trailing : trailing;
787
+ function $(N) {
788
+ return h = N, x = setTimeout(_, g), T ? F(N) : C;
1144
789
  }
1145
- function invokeFunc(time) {
1146
- var args = lastArgs, thisArg = lastThis;
1147
- lastArgs = lastThis = void 0;
1148
- lastInvokeTime = time;
1149
- result = func.apply(thisArg, args);
1150
- return result;
790
+ function q(N) {
791
+ var V = N - j, I = N - h, K = g - V;
792
+ return y ? i(K, S - I) : K;
1151
793
  }
1152
- function leadingEdge(time) {
1153
- lastInvokeTime = time;
1154
- timerId = setTimeout(timerExpired, wait);
1155
- return leading ? invokeFunc(time) : result;
794
+ function k(N) {
795
+ var V = N - j, I = N - h;
796
+ return j === void 0 || V >= g || V < 0 || y && I >= S;
1156
797
  }
1157
- function remainingWait(time) {
1158
- var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
1159
- return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
798
+ function _() {
799
+ var N = t();
800
+ if (k(N))
801
+ return M(N);
802
+ x = setTimeout(_, q(N));
1160
803
  }
1161
- function shouldInvoke(time) {
1162
- var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
1163
- return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
804
+ function M(N) {
805
+ return x = void 0, A && D ? F(N) : (D = R = void 0, C);
1164
806
  }
1165
- function timerExpired() {
1166
- var time = now();
1167
- if (shouldInvoke(time)) {
1168
- return trailingEdge(time);
1169
- }
1170
- timerId = setTimeout(timerExpired, remainingWait(time));
807
+ function B() {
808
+ x !== void 0 && clearTimeout(x), h = 0, D = j = R = x = void 0;
1171
809
  }
1172
- function trailingEdge(time) {
1173
- timerId = void 0;
1174
- if (trailing && lastArgs) {
1175
- return invokeFunc(time);
1176
- }
1177
- lastArgs = lastThis = void 0;
1178
- return result;
810
+ function w() {
811
+ return x === void 0 ? C : M(t());
1179
812
  }
1180
- function cancel() {
1181
- if (timerId !== void 0) {
1182
- clearTimeout(timerId);
813
+ function H() {
814
+ var N = t(), V = k(N);
815
+ if (D = arguments, R = this, j = N, V) {
816
+ if (x === void 0)
817
+ return $(j);
818
+ if (y)
819
+ return clearTimeout(x), x = setTimeout(_, g), F(j);
1183
820
  }
1184
- lastInvokeTime = 0;
1185
- lastArgs = lastCallTime = lastThis = timerId = void 0;
1186
- }
1187
- function flush() {
1188
- return timerId === void 0 ? result : trailingEdge(now());
821
+ return x === void 0 && (x = setTimeout(_, g)), C;
1189
822
  }
1190
- function debounced() {
1191
- var time = now(), isInvoking = shouldInvoke(time);
1192
- lastArgs = arguments;
1193
- lastThis = this;
1194
- lastCallTime = time;
1195
- if (isInvoking) {
1196
- if (timerId === void 0) {
1197
- return leadingEdge(lastCallTime);
1198
- }
1199
- if (maxing) {
1200
- clearTimeout(timerId);
1201
- timerId = setTimeout(timerExpired, wait);
1202
- return invokeFunc(lastCallTime);
1203
- }
1204
- }
1205
- if (timerId === void 0) {
1206
- timerId = setTimeout(timerExpired, wait);
1207
- }
1208
- return result;
1209
- }
1210
- debounced.cancel = cancel;
1211
- debounced.flush = flush;
1212
- return debounced;
823
+ return H.cancel = B, H.flush = w, H;
1213
824
  }
1214
- debounce_1 = debounce;
1215
- return debounce_1;
825
+ return Pe = f, Pe;
1216
826
  }
1217
- var throttle_1;
1218
- var hasRequiredThrottle;
1219
- function requireThrottle() {
1220
- if (hasRequiredThrottle) return throttle_1;
1221
- hasRequiredThrottle = 1;
1222
- var debounce = requireDebounce(), isObject = requireIsObject();
1223
- var FUNC_ERROR_TEXT = "Expected a function";
1224
- function throttle2(func, wait, options) {
1225
- var leading = true, trailing = true;
1226
- if (typeof func != "function") {
1227
- throw new TypeError(FUNC_ERROR_TEXT);
1228
- }
1229
- if (isObject(options)) {
1230
- leading = "leading" in options ? !!options.leading : leading;
1231
- trailing = "trailing" in options ? !!options.trailing : trailing;
1232
- }
1233
- return debounce(func, wait, {
1234
- "leading": leading,
1235
- "maxWait": wait,
1236
- "trailing": trailing
827
+ var Ae, Rr;
828
+ function _n() {
829
+ if (Rr) return Ae;
830
+ Rr = 1;
831
+ var r = En(), t = Le(), n = "Expected a function";
832
+ function l(o, i, f) {
833
+ var d = !0, g = !0;
834
+ if (typeof o != "function")
835
+ throw new TypeError(n);
836
+ return t(f) && (d = "leading" in f ? !!f.leading : d, g = "trailing" in f ? !!f.trailing : g), r(o, i, {
837
+ leading: d,
838
+ maxWait: i,
839
+ trailing: g
1237
840
  });
1238
841
  }
1239
- throttle_1 = throttle2;
1240
- return throttle_1;
842
+ return Ae = l, Ae;
1241
843
  }
1242
- var throttleExports = requireThrottle();
1243
- const throttle = /* @__PURE__ */ getDefaultExportFromCjs(throttleExports);
1244
- const classNames = (...classes) => {
1245
- let out = "";
1246
- for (let i = 0; i < classes.length; i++) {
1247
- const c = classes[i];
1248
- if (Boolean(c)) {
1249
- if (i > 0) {
1250
- out += " ";
1251
- }
1252
- out += c;
1253
- }
844
+ var Dn = _n();
845
+ const Ie = /* @__PURE__ */ un(Dn), G = (...r) => {
846
+ let t = "";
847
+ for (let n = 0; n < r.length; n++) {
848
+ const l = r[n];
849
+ l && (n > 0 && (t += " "), t += l);
1254
850
  }
1255
- return out;
1256
- };
1257
- const HorizontalLine = ({ x, y, length, ...props }) => {
1258
- const x1 = x;
1259
- const x2 = x + length;
1260
- const y1 = y;
1261
- const y2 = y;
1262
- return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("line", { ...props, x1, y1, x2, y2 }, void 0, false, {
851
+ return t;
852
+ }, ne = ({ x: r, y: t, length: n, ...l }) => {
853
+ const o = r, i = r + n, f = t, d = t;
854
+ return /* @__PURE__ */ u.jsxDEV("line", { ...l, x1: o, y1: f, x2: i, y2: d }, void 0, !1, {
1263
855
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/svg/HorizontalLine.tsx",
1264
856
  lineNumber: 14,
1265
857
  columnNumber: 10
1266
858
  }, void 0);
1267
859
  };
1268
- function rectsEqual(rectA, rectB) {
1269
- if (!rectA || !rectB) return false;
1270
- return rectA.x === rectB.x && rectA.y === rectB.y && rectA.width === rectB.width && rectA.height === rectB.height;
860
+ function Rn(r, t) {
861
+ return !r || !t ? !1 : r.x === t.x && r.y === t.y && r.width === t.width && r.height === t.height;
1271
862
  }
1272
- const useResizeObserver = (elementRef, callback) => {
1273
- const rect = useRef(null);
1274
- const observerCallback = useCallback(() => {
1275
- if (elementRef?.current) {
1276
- const incoming = elementRef.current.getBoundingClientRect();
1277
- if (!rectsEqual(rect.current, incoming)) {
1278
- rect.current = DOMRect.fromRect(incoming);
1279
- callback(incoming);
1280
- }
863
+ const $e = (r, t) => {
864
+ const n = Z(null), l = kr(() => {
865
+ if (r?.current) {
866
+ const o = r.current.getBoundingClientRect();
867
+ Rn(n.current, o) || (n.current = DOMRect.fromRect(o), t(o));
1281
868
  }
1282
- }, [callback, elementRef]);
1283
- useEffect(() => {
1284
- if (!elementRef?.current) {
869
+ }, [t, r]);
870
+ Tr(() => {
871
+ if (!r?.current)
1285
872
  return;
1286
- }
1287
- const observer = new ResizeObserver(observerCallback);
1288
- observer.observe(elementRef.current);
1289
- return () => {
1290
- observer.disconnect();
873
+ const o = new ResizeObserver(l);
874
+ return o.observe(r.current), () => {
875
+ o.disconnect();
1291
876
  };
1292
- }, [elementRef, observerCallback]);
1293
- };
1294
- const AxisH = ({ position = "fixed", className }) => {
1295
- const ref = useRef(null);
1296
- const [width, setWidth] = useState(0);
1297
- const [y, setYPos] = useState(0);
1298
- const throttledResize = throttle((width2, height) => {
1299
- setWidth(width2);
1300
- setYPos(height / 2);
877
+ }, [r, l]);
878
+ }, Gn = ({ position: r = "fixed", className: t }) => {
879
+ const n = Z(null), [l, o] = ae(0), [i, f] = ae(0), d = Ie((g, c) => {
880
+ o(g), f(c / 2);
1301
881
  }, 250);
1302
- useResizeObserver(ref, (rect) => {
1303
- throttledResize(rect.width, rect.height);
1304
- });
1305
- return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("svg", { ref, className: classNames("AxisH", position, className), children: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(HorizontalLine, { length: width, x: 0, y }, void 0, false, {
882
+ return $e(n, (g) => {
883
+ d(g.width, g.height);
884
+ }), /* @__PURE__ */ u.jsxDEV("svg", { ref: n, className: G("AxisH", r, t), children: /* @__PURE__ */ u.jsxDEV(ne, { length: l, x: 0, y: i }, void 0, !1, {
1306
885
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/center/AxisH.tsx",
1307
886
  lineNumber: 24,
1308
887
  columnNumber: 7
1309
- }, void 0) }, void 0, false, {
888
+ }, void 0) }, void 0, !1, {
1310
889
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/center/AxisH.tsx",
1311
890
  lineNumber: 23,
1312
891
  columnNumber: 5
1313
892
  }, void 0);
1314
- };
1315
- const VerticalLine = ({ x, y, length, ...props }) => {
1316
- const x1 = x;
1317
- const x2 = x;
1318
- const y1 = y;
1319
- const y2 = y + length;
1320
- return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("line", { ...props, x1, y1, x2, y2 }, void 0, false, {
893
+ }, te = ({ x: r, y: t, length: n, ...l }) => {
894
+ const o = r, i = r, f = t, d = t + n;
895
+ return /* @__PURE__ */ u.jsxDEV("line", { ...l, x1: o, y1: f, x2: i, y2: d }, void 0, !1, {
1321
896
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/svg/VerticalLine.tsx",
1322
897
  lineNumber: 14,
1323
898
  columnNumber: 10
1324
899
  }, void 0);
1325
- };
1326
- const AxisV = ({ position = "fixed", className }) => {
1327
- const ref = useRef(null);
1328
- const [width, setHeight] = useState(0);
1329
- const [x, setXPos] = useState(0);
1330
- const throttledResize = throttle((width2, height) => {
1331
- setHeight(height);
1332
- setXPos(width2 / 2);
900
+ }, Mn = ({ position: r = "fixed", className: t }) => {
901
+ const n = Z(null), [l, o] = ae(0), [i, f] = ae(0), d = Ie((g, c) => {
902
+ o(c), f(g / 2);
1333
903
  }, 250);
1334
- useResizeObserver(ref, (rect) => {
1335
- throttledResize(rect.width, rect.height);
1336
- });
1337
- return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("svg", { ref, className: classNames("AxisV", position, className), children: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(VerticalLine, { length: width, x, y: 0 }, void 0, false, {
904
+ return $e(n, (g) => {
905
+ d(g.width, g.height);
906
+ }), /* @__PURE__ */ u.jsxDEV("svg", { ref: n, className: G("AxisV", r, t), children: /* @__PURE__ */ u.jsxDEV(te, { length: l, x: i, y: 0 }, void 0, !1, {
1338
907
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/center/AxisV.tsx",
1339
908
  lineNumber: 24,
1340
909
  columnNumber: 7
1341
- }, void 0) }, void 0, false, {
910
+ }, void 0) }, void 0, !1, {
1342
911
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/center/AxisV.tsx",
1343
912
  lineNumber: 23,
1344
913
  columnNumber: 5
1345
914
  }, void 0);
1346
- };
1347
- const getOffset = (point) => {
1348
- if (typeof point !== "number") {
1349
- return point;
1350
- }
1351
- return { x: point, y: point };
1352
- };
1353
- const Crosshair = ({
1354
- show,
1355
- size = 10
1356
- }) => {
1357
- return show && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("g", { className: "Crosshair", children: [
1358
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1359
- "line",
1360
- {
1361
- className: "Crosshair_horizontal",
1362
- x1: -size,
1363
- y1: 0,
1364
- x2: size,
1365
- y2: 0,
1366
- stroke: "red",
1367
- strokeWidth: 1
1368
- },
1369
- void 0,
1370
- false,
1371
- {
1372
- fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/debug/Crosshair.tsx",
1373
- lineNumber: 10,
1374
- columnNumber: 9
1375
- },
1376
- void 0
1377
- ),
1378
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1379
- "line",
1380
- {
1381
- className: "Crosshair_vertical",
1382
- x1: 0,
1383
- y1: -size,
1384
- x2: 0,
1385
- y2: size,
1386
- stroke: "green",
1387
- strokeWidth: 1
1388
- },
1389
- void 0,
1390
- false,
1391
- {
1392
- fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/debug/Crosshair.tsx",
1393
- lineNumber: 19,
1394
- columnNumber: 9
1395
- },
1396
- void 0
1397
- )
1398
- ] }, void 0, true, {
1399
- fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/debug/Crosshair.tsx",
1400
- lineNumber: 9,
1401
- columnNumber: 7
1402
- }, void 0);
1403
- };
1404
- const Label = ({
1405
- children,
1406
- className,
1407
- alignment = "baseline",
1408
- translate = { x: 0, y: 0 },
1409
- anchor = "start",
1410
- rotation = 0,
1411
- debug = false
1412
- }) => {
1413
- return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1414
- "g",
915
+ }, Y = (r) => typeof r != "number" ? r : { x: r, y: r }, Sr = ({
916
+ show: r,
917
+ size: t = 10
918
+ }) => r && /* @__PURE__ */ u.jsxDEV("g", { className: "Crosshair", children: [
919
+ /* @__PURE__ */ u.jsxDEV(
920
+ "line",
1415
921
  {
1416
- className: classNames("Label", className),
1417
- transform: `translate(${translate.x}, ${translate.y})`,
1418
- children: [
1419
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(Crosshair, { show: debug }, void 0, false, {
1420
- fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/labels/Label/Label.tsx",
1421
- lineNumber: 20,
1422
- columnNumber: 7
1423
- }, void 0),
1424
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("text", { className: "value-label", transform: `rotate(${rotation})`, children: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("tspan", { alignmentBaseline: alignment, textAnchor: anchor, children }, void 0, false, {
1425
- fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/labels/Label/Label.tsx",
1426
- lineNumber: 22,
1427
- columnNumber: 9
1428
- }, void 0) }, void 0, false, {
1429
- fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/labels/Label/Label.tsx",
1430
- lineNumber: 21,
1431
- columnNumber: 7
1432
- }, void 0)
1433
- ]
922
+ className: "Crosshair_horizontal",
923
+ x1: -t,
924
+ y1: 0,
925
+ x2: t,
926
+ y2: 0,
927
+ stroke: "red",
928
+ strokeWidth: 1
1434
929
  },
1435
930
  void 0,
1436
- true,
931
+ !1,
1437
932
  {
1438
- fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/labels/Label/Label.tsx",
1439
- lineNumber: 16,
1440
- columnNumber: 5
933
+ fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/debug/Crosshair.tsx",
934
+ lineNumber: 10,
935
+ columnNumber: 9
1441
936
  },
1442
937
  void 0
1443
- );
1444
- };
1445
- const ZERO_POINT$1 = {
938
+ ),
939
+ /* @__PURE__ */ u.jsxDEV(
940
+ "line",
941
+ {
942
+ className: "Crosshair_vertical",
943
+ x1: 0,
944
+ y1: -t,
945
+ x2: 0,
946
+ y2: t,
947
+ stroke: "green",
948
+ strokeWidth: 1
949
+ },
950
+ void 0,
951
+ !1,
952
+ {
953
+ fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/debug/Crosshair.tsx",
954
+ lineNumber: 19,
955
+ columnNumber: 9
956
+ },
957
+ void 0
958
+ )
959
+ ] }, void 0, !0, {
960
+ fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/debug/Crosshair.tsx",
961
+ lineNumber: 9,
962
+ columnNumber: 7
963
+ }, void 0), jn = ({
964
+ children: r,
965
+ className: t,
966
+ alignment: n = "baseline",
967
+ translate: l = { x: 0, y: 0 },
968
+ anchor: o = "start",
969
+ rotation: i = 0,
970
+ debug: f = !1
971
+ }) => /* @__PURE__ */ u.jsxDEV(
972
+ "g",
973
+ {
974
+ className: G("Label", t),
975
+ transform: `translate(${l.x}, ${l.y})`,
976
+ children: [
977
+ /* @__PURE__ */ u.jsxDEV(Sr, { show: f }, void 0, !1, {
978
+ fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/labels/Label/Label.tsx",
979
+ lineNumber: 20,
980
+ columnNumber: 7
981
+ }, void 0),
982
+ /* @__PURE__ */ u.jsxDEV("text", { className: "value-label", transform: `rotate(${i})`, children: /* @__PURE__ */ u.jsxDEV("tspan", { alignmentBaseline: n, textAnchor: o, children: r }, void 0, !1, {
983
+ fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/labels/Label/Label.tsx",
984
+ lineNumber: 22,
985
+ columnNumber: 9
986
+ }, void 0) }, void 0, !1, {
987
+ fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/labels/Label/Label.tsx",
988
+ lineNumber: 21,
989
+ columnNumber: 7
990
+ }, void 0)
991
+ ]
992
+ },
993
+ void 0,
994
+ !0,
995
+ {
996
+ fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/labels/Label/Label.tsx",
997
+ lineNumber: 16,
998
+ columnNumber: 5
999
+ },
1000
+ void 0
1001
+ ), kn = {
1446
1002
  x: 0,
1447
1003
  y: 0
1448
- };
1449
- const Arrow = ({ end, show, start = ZERO_POINT$1, color = "black" }) => {
1450
- const definition = useRef(null);
1451
- return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(jsxDevRuntimeExports.Fragment, { children: [
1452
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("defs", { ref: definition, children: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1004
+ }, Cr = ({ end: r, show: t, start: n = kn, color: l = "black" }) => {
1005
+ const o = Z(null);
1006
+ return /* @__PURE__ */ u.jsxDEV(u.Fragment, { children: [
1007
+ /* @__PURE__ */ u.jsxDEV("defs", { ref: o, children: /* @__PURE__ */ u.jsxDEV(
1453
1008
  "marker",
1454
1009
  {
1455
1010
  id: "arrow",
@@ -1458,105 +1013,88 @@ const Arrow = ({ end, show, start = ZERO_POINT$1, color = "black" }) => {
1458
1013
  refX: "10",
1459
1014
  refY: "2.5",
1460
1015
  orient: "auto",
1461
- children: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("polygon", { points: "0 0, 10 2.5, 0 5", fill: "context-stroke" }, void 0, false, {
1016
+ children: /* @__PURE__ */ u.jsxDEV("polygon", { points: "0 0, 10 2.5, 0 5", fill: "context-stroke" }, void 0, !1, {
1462
1017
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/debug/Arrow.tsx",
1463
1018
  lineNumber: 30,
1464
1019
  columnNumber: 11
1465
1020
  }, void 0)
1466
1021
  },
1467
1022
  void 0,
1468
- false,
1023
+ !1,
1469
1024
  {
1470
1025
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/debug/Arrow.tsx",
1471
1026
  lineNumber: 22,
1472
1027
  columnNumber: 9
1473
1028
  },
1474
1029
  void 0
1475
- ) }, void 0, false, {
1030
+ ) }, void 0, !1, {
1476
1031
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/debug/Arrow.tsx",
1477
1032
  lineNumber: 21,
1478
1033
  columnNumber: 7
1479
1034
  }, void 0),
1480
- show && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("g", { className: "Arrow", children: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1035
+ t && /* @__PURE__ */ u.jsxDEV("g", { className: "Arrow", children: /* @__PURE__ */ u.jsxDEV(
1481
1036
  "line",
1482
1037
  {
1483
- x1: start.x,
1484
- y1: start.y,
1485
- x2: end.x,
1486
- y2: end.y,
1487
- stroke: color,
1038
+ x1: n.x,
1039
+ y1: n.y,
1040
+ x2: r.x,
1041
+ y2: r.y,
1042
+ stroke: l,
1488
1043
  strokeWidth: "1",
1489
1044
  markerEnd: "url(#arrow)"
1490
1045
  },
1491
1046
  void 0,
1492
- false,
1047
+ !1,
1493
1048
  {
1494
1049
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/debug/Arrow.tsx",
1495
1050
  lineNumber: 35,
1496
1051
  columnNumber: 11
1497
1052
  },
1498
1053
  void 0
1499
- ) }, void 0, false, {
1054
+ ) }, void 0, !1, {
1500
1055
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/debug/Arrow.tsx",
1501
1056
  lineNumber: 34,
1502
1057
  columnNumber: 9
1503
1058
  }, void 0)
1504
- ] }, void 0, true, {
1059
+ ] }, void 0, !0, {
1505
1060
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/debug/Arrow.tsx",
1506
1061
  lineNumber: 20,
1507
1062
  columnNumber: 5
1508
1063
  }, void 0);
1509
1064
  };
1510
- function negatePoint(point) {
1511
- return { x: -1 * point.x, y: -1 * point.y };
1065
+ function Tn(r) {
1066
+ return { x: -1 * r.x, y: -1 * r.y };
1512
1067
  }
1513
- const ZERO_POINT = {
1068
+ const jr = {
1514
1069
  x: 0,
1515
1070
  y: 0
1516
- };
1517
- const defaultLabelConfig = {};
1518
- const defaultZeroLabelConfig = {
1071
+ }, On = {}, Un = {
1519
1072
  anchor: "end"
1520
- };
1521
- const generateLabels = (list = [], orientation, offset = 0, size, skipFirst, zero, debug, labelConfig, labelZeroConfig) => {
1522
- const length = list.length;
1523
- const posX = orientation === "horizontal" ? size : 0, posY = orientation === "vertical" ? size : 0, offsetX = getOffset(offset).x, offsetY = getOffset(offset).y;
1524
- const defaultConfig = (config, isZero) => {
1525
- const orientationConfig = {};
1526
- if (orientation === "vertical") {
1527
- orientationConfig.rotation = -90;
1528
- }
1529
- if (isZero) {
1530
- return Object.assign(orientationConfig, defaultZeroLabelConfig, config);
1531
- }
1532
- return Object.assign(orientationConfig, defaultLabelConfig, config);
1073
+ }, Sn = (r = [], t, n = 0, l, o, i, f, d, g) => {
1074
+ const c = r.length, D = t === "horizontal" ? l : 0, R = t === "vertical" ? l : 0, S = Y(n).x, C = Y(n).y, x = (j, h) => {
1075
+ const T = {};
1076
+ return t === "vertical" && (T.rotation = -90), h ? Object.assign(T, Un, j) : Object.assign(T, On, j);
1533
1077
  };
1534
- return list.map((_, index) => {
1535
- if (skipFirst && index === 0) return null;
1536
- const x = posX * index;
1537
- const y = posY * index;
1538
- let dx = offsetX + x;
1539
- let dy = offsetY + y;
1540
- if (index === 0 && zero) {
1541
- dx = getOffset(zero).x + x;
1542
- dy = getOffset(zero).y + y;
1543
- }
1544
- const label = (index * size).toString();
1545
- const config = defaultConfig(
1546
- index === 0 ? labelZeroConfig : labelConfig,
1547
- index === 0
1078
+ return r.map((j, h) => {
1079
+ if (o && h === 0) return null;
1080
+ const T = D * h, y = R * h;
1081
+ let A = S + T, F = C + y;
1082
+ h === 0 && i && (A = Y(i).x + T, F = Y(i).y + y);
1083
+ const $ = (h * l).toString(), q = x(
1084
+ h === 0 ? g : d,
1085
+ h === 0
1548
1086
  );
1549
- return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(Fragment, { children: [
1550
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1551
- Arrow,
1087
+ return /* @__PURE__ */ u.jsxDEV(sn, { children: [
1088
+ /* @__PURE__ */ u.jsxDEV(
1089
+ Cr,
1552
1090
  {
1553
- show: debug,
1554
- start: { x, y },
1555
- end: { x: dx, y: dy },
1091
+ show: f,
1092
+ start: { x: T, y },
1093
+ end: { x: A, y: F },
1556
1094
  color: "blue"
1557
1095
  },
1558
1096
  void 0,
1559
- false,
1097
+ !1,
1560
1098
  {
1561
1099
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/labels/Units/Units.tsx",
1562
1100
  lineNumber: 80,
@@ -1564,21 +1102,21 @@ const generateLabels = (list = [], orientation, offset = 0, size, skipFirst, zer
1564
1102
  },
1565
1103
  void 0
1566
1104
  ),
1567
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1568
- Label,
1105
+ /* @__PURE__ */ u.jsxDEV(
1106
+ jn,
1569
1107
  {
1570
- ...config,
1571
- debug,
1572
- translate: { x: dx, y: dy },
1573
- className: classNames(
1574
- orientation,
1575
- index === 0 && "first",
1576
- index === length - 1 && "last"
1108
+ ...q,
1109
+ debug: f,
1110
+ translate: { x: A, y: F },
1111
+ className: G(
1112
+ t,
1113
+ h === 0 && "first",
1114
+ h === c - 1 && "last"
1577
1115
  ),
1578
- children: label
1116
+ children: $
1579
1117
  },
1580
1118
  void 0,
1581
- false,
1119
+ !1,
1582
1120
  {
1583
1121
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/labels/Units/Units.tsx",
1584
1122
  lineNumber: 86,
@@ -1586,66 +1124,56 @@ const generateLabels = (list = [], orientation, offset = 0, size, skipFirst, zer
1586
1124
  },
1587
1125
  void 0
1588
1126
  )
1589
- ] }, `${dx},${dy},${label}`, true, {
1127
+ ] }, `${A},${F},${$}`, !0, {
1590
1128
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/labels/Units/Units.tsx",
1591
1129
  lineNumber: 79,
1592
1130
  columnNumber: 7
1593
1131
  }, void 0);
1594
1132
  });
1595
- };
1596
- const DEFAULT_V = { x: 0, y: 10 };
1597
- const DEFAULT_H = { x: 10, y: 0 };
1598
- const Units = ({
1599
- orientation,
1600
- svgRef,
1601
- className,
1602
- offset = ZERO_POINT,
1603
- translate = ZERO_POINT,
1604
- size,
1605
- zero,
1606
- skipZero = false,
1607
- debug = false,
1608
- labelConfig,
1609
- labelZeroConfig
1133
+ }, Cn = { x: 0, y: 10 }, Vn = { x: 10, y: 0 }, Fe = ({
1134
+ orientation: r,
1135
+ svgRef: t,
1136
+ className: n,
1137
+ offset: l = jr,
1138
+ translate: o = jr,
1139
+ size: i,
1140
+ zero: f,
1141
+ skipZero: d = !1,
1142
+ debug: g = !1,
1143
+ labelConfig: c,
1144
+ labelZeroConfig: D
1610
1145
  }) => {
1611
- const [length, setLength] = useState(0);
1612
- const resizeCallback = useCallback(
1613
- (width, height) => {
1614
- const newLength = Math.floor(
1615
- (orientation === "horizontal" ? width : height) / size
1146
+ const [R, S] = ae(0), C = kr(
1147
+ (h, T) => {
1148
+ const y = Math.floor(
1149
+ (r === "horizontal" ? h : T) / i
1616
1150
  );
1617
- setLength(newLength + 1);
1151
+ S(y + 1);
1618
1152
  },
1619
- [orientation, size]
1620
- );
1621
- const throttledResize = throttle(resizeCallback, 500);
1622
- useResizeObserver(svgRef, (rect) => {
1623
- throttledResize(rect.width, rect.height);
1624
- });
1625
- useEffect(() => {
1626
- if (offset && size && svgRef.current) {
1627
- throttledResize(svgRef.current.clientWidth, svgRef.current.clientHeight);
1628
- }
1629
- }, [throttledResize, size, svgRef, offset]);
1630
- const list = useMemo(() => {
1631
- return Array.from(Array(length)).map((_, index) => index);
1632
- }, [length]);
1633
- return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1153
+ [r, i]
1154
+ ), x = Ie(C, 500);
1155
+ $e(t, (h) => {
1156
+ x(h.width, h.height);
1157
+ }), Tr(() => {
1158
+ l && i && t.current && x(t.current.clientWidth, t.current.clientHeight);
1159
+ }, [x, i, t, l]);
1160
+ const j = re(() => Array.from(Array(R)).map((h, T) => T), [R]);
1161
+ return /* @__PURE__ */ u.jsxDEV(
1634
1162
  "g",
1635
1163
  {
1636
- className: classNames("Units", className),
1637
- transform: `translate(${translate.x}, ${translate.y})`,
1164
+ className: G("Units", n),
1165
+ transform: `translate(${o.x}, ${o.y})`,
1638
1166
  children: [
1639
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1640
- Arrow,
1167
+ /* @__PURE__ */ u.jsxDEV(
1168
+ Cr,
1641
1169
  {
1642
- show: debug,
1643
- start: negatePoint(translate),
1170
+ show: g,
1171
+ start: Tn(o),
1644
1172
  end: { x: 0, y: 0 },
1645
1173
  color: "blue"
1646
1174
  },
1647
1175
  void 0,
1648
- false,
1176
+ !1,
1649
1177
  {
1650
1178
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/labels/Units/Units.tsx",
1651
1179
  lineNumber: 157,
@@ -1653,26 +1181,26 @@ const Units = ({
1653
1181
  },
1654
1182
  void 0
1655
1183
  ),
1656
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(Crosshair, { show: debug, size: 20 }, void 0, false, {
1184
+ /* @__PURE__ */ u.jsxDEV(Sr, { show: g, size: 20 }, void 0, !1, {
1657
1185
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/labels/Units/Units.tsx",
1658
1186
  lineNumber: 163,
1659
1187
  columnNumber: 7
1660
1188
  }, void 0),
1661
- generateLabels(
1662
- list,
1663
- orientation,
1664
- offset,
1665
- size,
1666
- skipZero,
1667
- getOffset(zero ?? (orientation === "vertical" ? DEFAULT_V : DEFAULT_H)),
1668
- debug,
1669
- labelConfig,
1670
- labelZeroConfig
1189
+ Sn(
1190
+ j,
1191
+ r,
1192
+ l,
1193
+ i,
1194
+ d,
1195
+ Y(f ?? (r === "vertical" ? Cn : Vn)),
1196
+ g,
1197
+ c,
1198
+ D
1671
1199
  )
1672
1200
  ]
1673
1201
  },
1674
1202
  void 0,
1675
- true,
1203
+ !0,
1676
1204
  {
1677
1205
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/labels/Units/Units.tsx",
1678
1206
  lineNumber: 153,
@@ -1680,28 +1208,21 @@ const Units = ({
1680
1208
  },
1681
1209
  void 0
1682
1210
  );
1683
- };
1684
- const getPatternId = (grid) => {
1685
- return `grid-pattern-${grid.width}x${grid.height}`;
1686
- };
1687
- const getSubdivision = (grid) => {
1688
- const subdivision = grid.subdivision ?? 5;
1689
- const stepX = grid.width / subdivision;
1690
- const stepY = grid.height / subdivision;
1691
- const verticals = (() => {
1692
- const list = [];
1693
- for (let i = 1; i < subdivision; i++) {
1694
- list.push(
1695
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1696
- VerticalLine,
1211
+ }, wn = (r) => `grid-pattern-${r.width}x${r.height}`, zn = (r) => {
1212
+ const t = r.subdivision ?? 5, n = r.width / t, l = r.height / t, o = (() => {
1213
+ const f = [];
1214
+ for (let d = 1; d < t; d++)
1215
+ f.push(
1216
+ /* @__PURE__ */ u.jsxDEV(
1217
+ te,
1697
1218
  {
1698
- length: grid.height,
1699
- x: stepX * i,
1219
+ length: r.height,
1220
+ x: n * d,
1700
1221
  y: 0,
1701
1222
  strokeWidth: 1
1702
1223
  },
1703
- `vl-${i}-${stepX * 1}`,
1704
- false,
1224
+ `vl-${d}-${n * 1}`,
1225
+ !1,
1705
1226
  {
1706
1227
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
1707
1228
  lineNumber: 24,
@@ -1710,23 +1231,21 @@ const getSubdivision = (grid) => {
1710
1231
  void 0
1711
1232
  )
1712
1233
  );
1713
- }
1714
- return list;
1715
- })();
1716
- const horizontals = (() => {
1717
- const list = [];
1718
- for (let i = 1; i < subdivision; i++) {
1719
- list.push(
1720
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1721
- HorizontalLine,
1234
+ return f;
1235
+ })(), i = (() => {
1236
+ const f = [];
1237
+ for (let d = 1; d < t; d++)
1238
+ f.push(
1239
+ /* @__PURE__ */ u.jsxDEV(
1240
+ ne,
1722
1241
  {
1723
- length: grid.width,
1242
+ length: r.width,
1724
1243
  x: 0,
1725
- y: stepY * i,
1244
+ y: l * d,
1726
1245
  strokeWidth: 1
1727
1246
  },
1728
- `hl-${i}-${stepY * 1}`,
1729
- false,
1247
+ `hl-${d}-${l * 1}`,
1248
+ !1,
1730
1249
  {
1731
1250
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
1732
1251
  lineNumber: 41,
@@ -1735,99 +1254,90 @@ const getSubdivision = (grid) => {
1735
1254
  void 0
1736
1255
  )
1737
1256
  );
1738
- }
1739
- return list;
1257
+ return f;
1740
1258
  })();
1741
- return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("g", { className: "Grid_pattern_sub", children: [
1742
- verticals,
1743
- horizontals
1744
- ] }, void 0, true, {
1259
+ return /* @__PURE__ */ u.jsxDEV("g", { className: "Grid_pattern_sub", children: [
1260
+ o,
1261
+ i
1262
+ ] }, void 0, !0, {
1745
1263
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
1746
1264
  lineNumber: 55,
1747
1265
  columnNumber: 5
1748
1266
  }, void 0);
1749
- };
1750
- const getPattern1$1 = (id = `grid-pattern1`, grid = {
1267
+ }, Pn = (r = "grid-pattern1", t = {
1751
1268
  width: 50,
1752
1269
  height: 50
1753
- }) => {
1754
- return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1755
- "pattern",
1756
- {
1757
- className: "Grid_pattern",
1758
- id,
1759
- patternUnits: "userSpaceOnUse",
1760
- width: grid.width,
1761
- height: grid.height,
1762
- children: [
1763
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("g", { className: "Grid_pattern_main", children: [
1764
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("line", { x1: 0, y1: 0, x2: 0, y2: grid.height, strokeWidth: 2 }, void 0, false, {
1765
- fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
1766
- lineNumber: 79,
1767
- columnNumber: 9
1768
- }, void 0),
1769
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("line", { x1: 0, y1: 0, x2: grid.width, y2: 0, strokeWidth: 2 }, void 0, false, {
1770
- fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
1771
- lineNumber: 80,
1772
- columnNumber: 9
1773
- }, void 0)
1774
- ] }, void 0, true, {
1270
+ }) => /* @__PURE__ */ u.jsxDEV(
1271
+ "pattern",
1272
+ {
1273
+ className: "Grid_pattern",
1274
+ id: r,
1275
+ patternUnits: "userSpaceOnUse",
1276
+ width: t.width,
1277
+ height: t.height,
1278
+ children: [
1279
+ /* @__PURE__ */ u.jsxDEV("g", { className: "Grid_pattern_main", children: [
1280
+ /* @__PURE__ */ u.jsxDEV("line", { x1: 0, y1: 0, x2: 0, y2: t.height, strokeWidth: 2 }, void 0, !1, {
1775
1281
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
1776
- lineNumber: 78,
1777
- columnNumber: 7
1282
+ lineNumber: 79,
1283
+ columnNumber: 9
1778
1284
  }, void 0),
1779
- getSubdivision(grid)
1780
- ]
1781
- },
1782
- void 0,
1783
- true,
1784
- {
1785
- fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
1786
- lineNumber: 70,
1787
- columnNumber: 5
1788
- },
1789
- void 0
1790
- );
1791
- };
1792
- const DEFAULT_ZERO = { x: 12, y: 0 };
1793
- const DEFAULT_H_OFFSET = { x: 2, y: 0 };
1794
- const DEFAULT_V_OFFSET = { x: 0, y: -2 };
1795
- const Grid = ({
1796
- position = "fixed",
1797
- grid = { width: 50, height: 50 },
1798
- labels,
1799
- debug,
1800
- className
1285
+ /* @__PURE__ */ u.jsxDEV("line", { x1: 0, y1: 0, x2: t.width, y2: 0, strokeWidth: 2 }, void 0, !1, {
1286
+ fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
1287
+ lineNumber: 80,
1288
+ columnNumber: 9
1289
+ }, void 0)
1290
+ ] }, void 0, !0, {
1291
+ fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
1292
+ lineNumber: 78,
1293
+ columnNumber: 7
1294
+ }, void 0),
1295
+ zn(t)
1296
+ ]
1297
+ },
1298
+ void 0,
1299
+ !0,
1300
+ {
1301
+ fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
1302
+ lineNumber: 70,
1303
+ columnNumber: 5
1304
+ },
1305
+ void 0
1306
+ ), An = { x: 12, y: 0 }, Fn = { x: 2, y: 0 }, Ln = { x: 0, y: -2 }, Wn = ({
1307
+ position: r = "fixed",
1308
+ grid: t = { width: 50, height: 50 },
1309
+ labels: n,
1310
+ debug: l,
1311
+ className: o
1801
1312
  }) => {
1802
- const ref = useRef(null);
1803
- const patternId = getPatternId(grid);
1804
- return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("svg", { ref, className: classNames("Grid", position, className), children: [
1805
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("defs", { children: getPattern1$1(patternId, grid) }, void 0, false, {
1313
+ const i = Z(null), f = wn(t);
1314
+ return /* @__PURE__ */ u.jsxDEV("svg", { ref: i, className: G("Grid", r, o), children: [
1315
+ /* @__PURE__ */ u.jsxDEV("defs", { children: Pn(f, t) }, void 0, !1, {
1806
1316
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
1807
1317
  lineNumber: 103,
1808
1318
  columnNumber: 7
1809
1319
  }, void 0),
1810
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("rect", { fill: `url(#${patternId})`, width: "100%", height: "100%" }, void 0, false, {
1320
+ /* @__PURE__ */ u.jsxDEV("rect", { fill: `url(#${f})`, width: "100%", height: "100%" }, void 0, !1, {
1811
1321
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
1812
1322
  lineNumber: 104,
1813
1323
  columnNumber: 7
1814
1324
  }, void 0),
1815
- labels && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("g", { children: [
1816
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1817
- Units,
1325
+ n && /* @__PURE__ */ u.jsxDEV("g", { children: [
1326
+ /* @__PURE__ */ u.jsxDEV(
1327
+ Fe,
1818
1328
  {
1819
- debug,
1329
+ debug: l,
1820
1330
  className: "Grid_units",
1821
1331
  orientation: "horizontal",
1822
- svgRef: ref,
1823
- offset: typeof labels === "boolean" ? DEFAULT_H_OFFSET : labels.hOffset,
1824
- zero: typeof labels === "boolean" ? DEFAULT_ZERO : labels.zero,
1825
- size: typeof labels !== "boolean" && labels.size ? labels.size.width : grid.width,
1826
- labelConfig: typeof labels !== "boolean" && labels.hLabelConfig ? labels.hLabelConfig : void 0,
1827
- labelZeroConfig: typeof labels !== "boolean" && labels.labelZeroConfig ? labels.labelZeroConfig : void 0
1332
+ svgRef: i,
1333
+ offset: typeof n == "boolean" ? Fn : n.hOffset,
1334
+ zero: typeof n == "boolean" ? An : n.zero,
1335
+ size: typeof n != "boolean" && n.size ? n.size.width : t.width,
1336
+ labelConfig: typeof n != "boolean" && n.hLabelConfig ? n.hLabelConfig : void 0,
1337
+ labelZeroConfig: typeof n != "boolean" && n.labelZeroConfig ? n.labelZeroConfig : void 0
1828
1338
  },
1829
1339
  void 0,
1830
- false,
1340
+ !1,
1831
1341
  {
1832
1342
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
1833
1343
  lineNumber: 107,
@@ -1835,20 +1345,20 @@ const Grid = ({
1835
1345
  },
1836
1346
  void 0
1837
1347
  ),
1838
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1839
- Units,
1348
+ /* @__PURE__ */ u.jsxDEV(
1349
+ Fe,
1840
1350
  {
1841
- debug,
1351
+ debug: l,
1842
1352
  className: "Grid_units",
1843
1353
  orientation: "vertical",
1844
- svgRef: ref,
1845
- offset: typeof labels === "boolean" ? DEFAULT_V_OFFSET : labels.vOffset,
1846
- size: typeof labels !== "boolean" && labels.size ? labels.size.height : grid.height,
1847
- skipZero: true,
1848
- labelConfig: typeof labels !== "boolean" && labels.vLabelConfig ? labels.vLabelConfig : void 0
1354
+ svgRef: i,
1355
+ offset: typeof n == "boolean" ? Ln : n.vOffset,
1356
+ size: typeof n != "boolean" && n.size ? n.size.height : t.height,
1357
+ skipZero: !0,
1358
+ labelConfig: typeof n != "boolean" && n.vLabelConfig ? n.vLabelConfig : void 0
1849
1359
  },
1850
1360
  void 0,
1851
- false,
1361
+ !1,
1852
1362
  {
1853
1363
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
1854
1364
  lineNumber: 133,
@@ -1856,42 +1366,41 @@ const Grid = ({
1856
1366
  },
1857
1367
  void 0
1858
1368
  )
1859
- ] }, void 0, true, {
1369
+ ] }, void 0, !0, {
1860
1370
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
1861
1371
  lineNumber: 106,
1862
1372
  columnNumber: 9
1863
1373
  }, void 0)
1864
- ] }, void 0, true, {
1374
+ ] }, void 0, !0, {
1865
1375
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
1866
1376
  lineNumber: 102,
1867
1377
  columnNumber: 5
1868
1378
  }, void 0);
1869
- };
1870
- const getPattern1 = (id, orientation = "vertical", size = 100, subdivisions = 10, edge = 3, width = 25, tickWidth = 10, halfTickWidth = 20, showHalfTick = true, opposite = false, debug = false, mainTickWidth) => {
1871
- const step = size / subdivisions;
1872
- return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1379
+ }, In = (r, t = "vertical", n = 100, l = 10, o = 3, i = 25, f = 10, d = 20, g = !0, c = !1, D = !1, R) => {
1380
+ const S = n / l;
1381
+ return /* @__PURE__ */ u.jsxDEV(
1873
1382
  "pattern",
1874
1383
  {
1875
1384
  className: "Ruler_pattern",
1876
- id,
1385
+ id: r,
1877
1386
  patternUnits: "userSpaceOnUse",
1878
- width: orientation === "vertical" ? width : size,
1879
- height: orientation === "horizontal" ? width : size,
1387
+ width: t === "vertical" ? i : n,
1388
+ height: t === "horizontal" ? i : n,
1880
1389
  children: [
1881
- orientation === "horizontal" && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(jsxDevRuntimeExports.Fragment, { children: [
1882
- debug && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1390
+ t === "horizontal" && /* @__PURE__ */ u.jsxDEV(u.Fragment, { children: [
1391
+ D && /* @__PURE__ */ u.jsxDEV(
1883
1392
  "rect",
1884
1393
  {
1885
1394
  className: "Ruler_pattern_line-debug",
1886
1395
  x: 0,
1887
1396
  y: 0,
1888
- width: size,
1889
- height: width,
1397
+ width: n,
1398
+ height: i,
1890
1399
  stroke: "red",
1891
1400
  fill: "none"
1892
1401
  },
1893
1402
  void 0,
1894
- false,
1403
+ !1,
1895
1404
  {
1896
1405
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
1897
1406
  lineNumber: 38,
@@ -1899,18 +1408,18 @@ const getPattern1 = (id, orientation = "vertical", size = 100, subdivisions = 10
1899
1408
  },
1900
1409
  void 0
1901
1410
  ),
1902
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1411
+ /* @__PURE__ */ u.jsxDEV(
1903
1412
  "rect",
1904
1413
  {
1905
1414
  className: "Ruler_pattern_line",
1906
1415
  x: 0,
1907
- y: opposite ? width - Math.min(width, edge) : 0,
1908
- width: size,
1909
- height: edge,
1416
+ y: c ? i - Math.min(i, o) : 0,
1417
+ width: n,
1418
+ height: o,
1910
1419
  stroke: "none"
1911
1420
  },
1912
1421
  void 0,
1913
- false,
1422
+ !1,
1914
1423
  {
1915
1424
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
1916
1425
  lineNumber: 49,
@@ -1918,17 +1427,17 @@ const getPattern1 = (id, orientation = "vertical", size = 100, subdivisions = 10
1918
1427
  },
1919
1428
  void 0
1920
1429
  ),
1921
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("g", { className: "Ruler_pattern_main", children: [
1922
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1923
- VerticalLine,
1430
+ /* @__PURE__ */ u.jsxDEV("g", { className: "Ruler_pattern_main", children: [
1431
+ /* @__PURE__ */ u.jsxDEV(
1432
+ te,
1924
1433
  {
1925
- length: Math.min(mainTickWidth ?? width, width),
1434
+ length: Math.min(R ?? i, i),
1926
1435
  x: 0,
1927
- y: opposite ? width - Math.min(width, mainTickWidth ?? width) : 0,
1436
+ y: c ? i - Math.min(i, R ?? i) : 0,
1928
1437
  className: "Ruler_pattern_main_tick"
1929
1438
  },
1930
1439
  void 0,
1931
- false,
1440
+ !1,
1932
1441
  {
1933
1442
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
1934
1443
  lineNumber: 61,
@@ -1936,16 +1445,16 @@ const getPattern1 = (id, orientation = "vertical", size = 100, subdivisions = 10
1936
1445
  },
1937
1446
  void 0
1938
1447
  ),
1939
- showHalfTick && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1940
- VerticalLine,
1448
+ g && /* @__PURE__ */ u.jsxDEV(
1449
+ te,
1941
1450
  {
1942
1451
  className: "Ruler_pattern_main_halfTick",
1943
- length: halfTickWidth,
1944
- x: size / 2,
1945
- y: opposite ? width - Math.min(width, halfTickWidth) : 0
1452
+ length: d,
1453
+ x: n / 2,
1454
+ y: c ? i - Math.min(i, d) : 0
1946
1455
  },
1947
1456
  void 0,
1948
- false,
1457
+ !1,
1949
1458
  {
1950
1459
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
1951
1460
  lineNumber: 69,
@@ -1953,26 +1462,23 @@ const getPattern1 = (id, orientation = "vertical", size = 100, subdivisions = 10
1953
1462
  },
1954
1463
  void 0
1955
1464
  )
1956
- ] }, void 0, true, {
1465
+ ] }, void 0, !0, {
1957
1466
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
1958
1467
  lineNumber: 59,
1959
1468
  columnNumber: 11
1960
1469
  }, void 0),
1961
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("g", { className: "Ruler_pattern_sub", children: Array.from(Array(subdivisions - 1)).map((_, index) => {
1962
- const x = step * (index + 1);
1963
- if (showHalfTick && size / 2 === x) {
1964
- return null;
1965
- }
1966
- return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1967
- VerticalLine,
1470
+ /* @__PURE__ */ u.jsxDEV("g", { className: "Ruler_pattern_sub", children: Array.from(Array(l - 1)).map((C, x) => {
1471
+ const j = S * (x + 1);
1472
+ return g && n / 2 === j ? null : /* @__PURE__ */ u.jsxDEV(
1473
+ te,
1968
1474
  {
1969
- length: tickWidth,
1970
- x,
1971
- y: opposite ? width - Math.min(width, tickWidth) : 0,
1475
+ length: f,
1476
+ x: j,
1477
+ y: c ? i - Math.min(i, f) : 0,
1972
1478
  strokeWidth: 1
1973
1479
  },
1974
- `vl-${index}-${step}`,
1975
- false,
1480
+ `vl-${x}-${S}`,
1481
+ !1,
1976
1482
  {
1977
1483
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
1978
1484
  lineNumber: 86,
@@ -1980,30 +1486,30 @@ const getPattern1 = (id, orientation = "vertical", size = 100, subdivisions = 10
1980
1486
  },
1981
1487
  void 0
1982
1488
  );
1983
- }) }, void 0, false, {
1489
+ }) }, void 0, !1, {
1984
1490
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
1985
1491
  lineNumber: 78,
1986
1492
  columnNumber: 11
1987
1493
  }, void 0)
1988
- ] }, void 0, true, {
1494
+ ] }, void 0, !0, {
1989
1495
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
1990
1496
  lineNumber: 36,
1991
1497
  columnNumber: 9
1992
1498
  }, void 0),
1993
- orientation === "vertical" && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(jsxDevRuntimeExports.Fragment, { children: [
1994
- debug && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1499
+ t === "vertical" && /* @__PURE__ */ u.jsxDEV(u.Fragment, { children: [
1500
+ D && /* @__PURE__ */ u.jsxDEV(
1995
1501
  "rect",
1996
1502
  {
1997
1503
  className: "Ruler_pattern_line-debug",
1998
1504
  x: 0,
1999
1505
  y: 0,
2000
- width,
2001
- height: size,
1506
+ width: i,
1507
+ height: n,
2002
1508
  stroke: "red",
2003
1509
  fill: "none"
2004
1510
  },
2005
1511
  void 0,
2006
- false,
1512
+ !1,
2007
1513
  {
2008
1514
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
2009
1515
  lineNumber: 101,
@@ -2011,18 +1517,18 @@ const getPattern1 = (id, orientation = "vertical", size = 100, subdivisions = 10
2011
1517
  },
2012
1518
  void 0
2013
1519
  ),
2014
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1520
+ /* @__PURE__ */ u.jsxDEV(
2015
1521
  "rect",
2016
1522
  {
2017
1523
  className: "Ruler_pattern_line",
2018
- x: opposite ? width - Math.min(width, edge) : 0,
1524
+ x: c ? i - Math.min(i, o) : 0,
2019
1525
  y: 0,
2020
- width: edge,
2021
- height: size,
1526
+ width: o,
1527
+ height: n,
2022
1528
  stroke: "none"
2023
1529
  },
2024
1530
  void 0,
2025
- false,
1531
+ !1,
2026
1532
  {
2027
1533
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
2028
1534
  lineNumber: 112,
@@ -2030,17 +1536,17 @@ const getPattern1 = (id, orientation = "vertical", size = 100, subdivisions = 10
2030
1536
  },
2031
1537
  void 0
2032
1538
  ),
2033
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("g", { className: "Ruler_pattern_main", children: [
2034
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
2035
- HorizontalLine,
1539
+ /* @__PURE__ */ u.jsxDEV("g", { className: "Ruler_pattern_main", children: [
1540
+ /* @__PURE__ */ u.jsxDEV(
1541
+ ne,
2036
1542
  {
2037
- length: Math.min(mainTickWidth ?? width, width),
1543
+ length: Math.min(R ?? i, i),
2038
1544
  x: 0,
2039
1545
  y: 0,
2040
1546
  className: "Ruler_pattern_main_tick"
2041
1547
  },
2042
1548
  void 0,
2043
- false,
1549
+ !1,
2044
1550
  {
2045
1551
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
2046
1552
  lineNumber: 124,
@@ -2048,16 +1554,16 @@ const getPattern1 = (id, orientation = "vertical", size = 100, subdivisions = 10
2048
1554
  },
2049
1555
  void 0
2050
1556
  ),
2051
- showHalfTick && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
2052
- HorizontalLine,
1557
+ g && /* @__PURE__ */ u.jsxDEV(
1558
+ ne,
2053
1559
  {
2054
1560
  className: "Ruler_pattern_main_halfTick",
2055
- x: opposite ? width - Math.min(width, halfTickWidth) : 0,
2056
- y: size / 2,
2057
- length: halfTickWidth
1561
+ x: c ? i - Math.min(i, d) : 0,
1562
+ y: n / 2,
1563
+ length: d
2058
1564
  },
2059
1565
  void 0,
2060
- false,
1566
+ !1,
2061
1567
  {
2062
1568
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
2063
1569
  lineNumber: 131,
@@ -2065,26 +1571,23 @@ const getPattern1 = (id, orientation = "vertical", size = 100, subdivisions = 10
2065
1571
  },
2066
1572
  void 0
2067
1573
  )
2068
- ] }, void 0, true, {
1574
+ ] }, void 0, !0, {
2069
1575
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
2070
1576
  lineNumber: 122,
2071
1577
  columnNumber: 11
2072
1578
  }, void 0),
2073
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("g", { className: "Ruler_pattern_sub", children: Array.from(Array(subdivisions - 1)).map((_, index) => {
2074
- const y = step * (index + 1);
2075
- if (showHalfTick && size / 2 === y) {
2076
- return null;
2077
- }
2078
- return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
2079
- HorizontalLine,
1579
+ /* @__PURE__ */ u.jsxDEV("g", { className: "Ruler_pattern_sub", children: Array.from(Array(l - 1)).map((C, x) => {
1580
+ const j = S * (x + 1);
1581
+ return g && n / 2 === j ? null : /* @__PURE__ */ u.jsxDEV(
1582
+ ne,
2080
1583
  {
2081
- length: tickWidth,
2082
- x: opposite ? width - Math.min(width, tickWidth) : 0,
2083
- y,
1584
+ length: f,
1585
+ x: c ? i - Math.min(i, f) : 0,
1586
+ y: j,
2084
1587
  strokeWidth: 1
2085
1588
  },
2086
- `hl-${index}-${step}`,
2087
- false,
1589
+ `hl-${x}-${S}`,
1590
+ !1,
2088
1591
  {
2089
1592
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
2090
1593
  lineNumber: 149,
@@ -2092,12 +1595,12 @@ const getPattern1 = (id, orientation = "vertical", size = 100, subdivisions = 10
2092
1595
  },
2093
1596
  void 0
2094
1597
  );
2095
- }) }, void 0, false, {
1598
+ }) }, void 0, !1, {
2096
1599
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
2097
1600
  lineNumber: 141,
2098
1601
  columnNumber: 11
2099
1602
  }, void 0)
2100
- ] }, void 0, true, {
1603
+ ] }, void 0, !0, {
2101
1604
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
2102
1605
  lineNumber: 99,
2103
1606
  columnNumber: 9
@@ -2105,7 +1608,7 @@ const getPattern1 = (id, orientation = "vertical", size = 100, subdivisions = 10
2105
1608
  ]
2106
1609
  },
2107
1610
  void 0,
2108
- true,
1611
+ !0,
2109
1612
  {
2110
1613
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
2111
1614
  lineNumber: 28,
@@ -2113,195 +1616,113 @@ const getPattern1 = (id, orientation = "vertical", size = 100, subdivisions = 10
2113
1616
  },
2114
1617
  void 0
2115
1618
  );
2116
- };
2117
- const DEFAULT_OFFSET = { x: 2, y: 12 };
2118
- const getOrientation = (location) => {
2119
- if (location === "bottom" || location === "top") return "horizontal";
2120
- return "vertical";
2121
- };
2122
- const Ruler = ({
2123
- location = "left",
2124
- position = "fixed",
2125
- labels,
2126
- skipZero,
1619
+ }, me = { x: 2, y: 12 }, $n = (r) => r === "bottom" || r === "top" ? "horizontal" : "vertical", Yn = ({
1620
+ location: r = "left",
1621
+ position: t = "fixed",
1622
+ labels: n,
1623
+ skipZero: l,
2127
1624
  // ruler = {},
2128
- debug = false,
2129
- width = 25,
2130
- size = 100,
2131
- subdivisions = 10,
2132
- edge = 3,
2133
- tickWidth = 10,
2134
- halfTickWidth = 20,
2135
- showHalfTick = true,
2136
- mainTickWidth,
2137
- className
1625
+ debug: o = !1,
1626
+ width: i = 25,
1627
+ size: f = 100,
1628
+ subdivisions: d = 10,
1629
+ edge: g = 3,
1630
+ tickWidth: c = 10,
1631
+ halfTickWidth: D = 20,
1632
+ showHalfTick: R = !0,
1633
+ mainTickWidth: S,
1634
+ className: C
2138
1635
  }) => {
2139
- const orientation = getOrientation(location);
2140
- const ref = useRef(null);
2141
- const opposite = orientation === "horizontal" && location === "bottom" || orientation === "vertical" && location === "right";
2142
- const offset = useMemo(() => {
2143
- if (!labels) return void 0;
2144
- const natural = { x: 0, y: 0 };
2145
- let offset2 = DEFAULT_OFFSET;
2146
- if (typeof labels !== "boolean") {
2147
- offset2 = getOffset(labels.offset ?? DEFAULT_OFFSET);
2148
- }
2149
- if (location === "bottom") {
2150
- natural.x = offset2.x;
2151
- natural.y = -1 * offset2.y;
2152
- }
2153
- if (location === "top") {
2154
- natural.x = offset2.x;
2155
- natural.y = offset2.y;
2156
- }
2157
- if (location === "left") {
2158
- natural.x = offset2.y;
2159
- natural.y = -1 * offset2.x;
2160
- }
2161
- if (location === "right") {
2162
- natural.x = -1 * offset2.y;
2163
- natural.y = -1 * offset2.x;
2164
- }
2165
- const adjustOffset = (value) => {
2166
- if (location === "right") {
2167
- return {
2168
- x: width + value.x,
2169
- y: value.y
2170
- };
2171
- }
2172
- if (location === "bottom") {
2173
- return {
2174
- x: value.x,
2175
- y: width + value.y
2176
- };
2177
- }
2178
- return value;
2179
- };
2180
- const result = adjustOffset(natural);
2181
- return result;
2182
- }, [labels, location, width]);
2183
- const zero = useMemo(() => {
2184
- if (!labels) return void 0;
2185
- const natural = { x: 0, y: 0 };
2186
- let offset2 = DEFAULT_OFFSET;
2187
- if (typeof labels !== "boolean") {
2188
- offset2 = getOffset(labels.zero ?? DEFAULT_OFFSET);
2189
- }
2190
- if (location === "bottom") {
2191
- natural.x = offset2.x;
2192
- natural.y = -1 * offset2.y;
2193
- }
2194
- if (location === "top") {
2195
- natural.x = offset2.x;
2196
- natural.y = offset2.y;
2197
- }
2198
- if (location === "left") {
2199
- natural.x = offset2.y;
2200
- natural.y = offset2.x;
2201
- }
2202
- if (location === "right") {
2203
- natural.x = -1 * offset2.y;
2204
- natural.y = offset2.x;
2205
- }
2206
- const adjustOffset = (value) => {
2207
- if (location === "right") {
2208
- return {
2209
- x: width + value.x,
2210
- y: value.y
2211
- };
2212
- }
2213
- if (location === "bottom") {
2214
- return {
2215
- x: value.x,
2216
- y: width + value.y
2217
- };
2218
- }
2219
- return value;
2220
- };
2221
- const result = adjustOffset(natural);
2222
- return result;
2223
- }, [labels, location, width]);
2224
- const labelConfig = useMemo(() => {
2225
- if (labels) {
2226
- if (typeof labels === "boolean") {
2227
- return {
2228
- alignment: !opposite ? "text-before-edge" : "text-after-edge",
2229
- anchor: "start",
2230
- rotation: orientation === "vertical" ? -90 : 0
2231
- };
2232
- }
2233
- return labels.labelConfig;
2234
- }
2235
- return void 0;
2236
- }, [labels, opposite, orientation]);
2237
- const labelZeroConfig = useMemo(() => {
2238
- if (labels) {
2239
- if (typeof labels === "boolean") {
2240
- return {
2241
- alignment: !opposite ? "text-before-edge" : "text-after-edge",
2242
- anchor: orientation === "vertical" ? "end" : "start",
2243
- rotation: orientation === "vertical" ? -90 : 0
2244
- };
2245
- }
2246
- return labels.labelZeroConfig;
2247
- }
2248
- return void 0;
2249
- }, [labels, opposite, orientation]);
2250
- const id = useId();
2251
- const patternId = `ruler-pattern1-${orientation}-${opposite ? "normal" : "opposite"}-${id}`;
2252
- return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
1636
+ const x = $n(r), j = Z(null), h = x === "horizontal" && r === "bottom" || x === "vertical" && r === "right", T = re(() => {
1637
+ if (!n) return;
1638
+ const k = { x: 0, y: 0 };
1639
+ let _ = me;
1640
+ return typeof n != "boolean" && (_ = Y(n.offset ?? me)), r === "bottom" && (k.x = _.x, k.y = -1 * _.y), r === "top" && (k.x = _.x, k.y = _.y), r === "left" && (k.x = _.y, k.y = -1 * _.x), r === "right" && (k.x = -1 * _.y, k.y = -1 * _.x), ((w) => r === "right" ? {
1641
+ x: i + w.x,
1642
+ y: w.y
1643
+ } : r === "bottom" ? {
1644
+ x: w.x,
1645
+ y: i + w.y
1646
+ } : w)(k);
1647
+ }, [n, r, i]), y = re(() => {
1648
+ if (!n) return;
1649
+ const k = { x: 0, y: 0 };
1650
+ let _ = me;
1651
+ return typeof n != "boolean" && (_ = Y(n.zero ?? me)), r === "bottom" && (k.x = _.x, k.y = -1 * _.y), r === "top" && (k.x = _.x, k.y = _.y), r === "left" && (k.x = _.y, k.y = _.x), r === "right" && (k.x = -1 * _.y, k.y = _.x), ((w) => r === "right" ? {
1652
+ x: i + w.x,
1653
+ y: w.y
1654
+ } : r === "bottom" ? {
1655
+ x: w.x,
1656
+ y: i + w.y
1657
+ } : w)(k);
1658
+ }, [n, r, i]), A = re(() => {
1659
+ if (n)
1660
+ return typeof n == "boolean" ? {
1661
+ alignment: h ? "text-after-edge" : "text-before-edge",
1662
+ anchor: "start",
1663
+ rotation: x === "vertical" ? -90 : 0
1664
+ } : n.labelConfig;
1665
+ }, [n, h, x]), F = re(() => {
1666
+ if (n)
1667
+ return typeof n == "boolean" ? {
1668
+ alignment: h ? "text-after-edge" : "text-before-edge",
1669
+ anchor: x === "vertical" ? "end" : "start",
1670
+ rotation: x === "vertical" ? -90 : 0
1671
+ } : n.labelZeroConfig;
1672
+ }, [n, h, x]), $ = ln(), q = `ruler-pattern1-${x}-${h ? "normal" : "opposite"}-${$}`;
1673
+ return /* @__PURE__ */ u.jsxDEV(
2253
1674
  "svg",
2254
1675
  {
2255
- ref,
2256
- className: classNames(
1676
+ ref: j,
1677
+ className: G(
2257
1678
  "Ruler",
2258
- location,
2259
- position,
2260
- orientation,
2261
- className
1679
+ r,
1680
+ t,
1681
+ x,
1682
+ C
2262
1683
  ),
2263
- width: orientation === "vertical" ? width : "100%",
2264
- height: orientation === "horizontal" ? width : "100%",
1684
+ width: x === "vertical" ? i : "100%",
1685
+ height: x === "horizontal" ? i : "100%",
2265
1686
  children: [
2266
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("defs", { children: getPattern1(
2267
- patternId,
2268
- orientation,
2269
- size,
2270
- subdivisions,
2271
- edge,
2272
- width,
2273
- tickWidth,
2274
- halfTickWidth,
2275
- showHalfTick,
2276
- opposite,
2277
- debug,
2278
- mainTickWidth
2279
- ) }, void 0, false, {
1687
+ /* @__PURE__ */ u.jsxDEV("defs", { children: In(
1688
+ q,
1689
+ x,
1690
+ f,
1691
+ d,
1692
+ g,
1693
+ i,
1694
+ c,
1695
+ D,
1696
+ R,
1697
+ h,
1698
+ o,
1699
+ S
1700
+ ) }, void 0, !1, {
2280
1701
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
2281
1702
  lineNumber: 450,
2282
1703
  columnNumber: 7
2283
1704
  }, void 0),
2284
- /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("rect", { fill: `url(#${patternId})`, width: "100%", height: "100%" }, void 0, false, {
1705
+ /* @__PURE__ */ u.jsxDEV("rect", { fill: `url(#${q})`, width: "100%", height: "100%" }, void 0, !1, {
2285
1706
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
2286
1707
  lineNumber: 466,
2287
1708
  columnNumber: 7
2288
1709
  }, void 0),
2289
- labels && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
2290
- Units,
1710
+ n && /* @__PURE__ */ u.jsxDEV(
1711
+ Fe,
2291
1712
  {
2292
- debug,
2293
- className: classNames("Ruler_units", opposite && "opposite"),
2294
- orientation,
2295
- svgRef: ref,
2296
- offset,
2297
- zero,
2298
- size: typeof labels !== "boolean" && labels.size ? labels.size : size,
2299
- skipZero,
2300
- labelConfig,
2301
- labelZeroConfig
1713
+ debug: o,
1714
+ className: G("Ruler_units", h && "opposite"),
1715
+ orientation: x,
1716
+ svgRef: j,
1717
+ offset: T,
1718
+ zero: y,
1719
+ size: typeof n != "boolean" && n.size ? n.size : f,
1720
+ skipZero: l,
1721
+ labelConfig: A,
1722
+ labelZeroConfig: F
2302
1723
  },
2303
1724
  void 0,
2304
- false,
1725
+ !1,
2305
1726
  {
2306
1727
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
2307
1728
  lineNumber: 469,
@@ -2312,7 +1733,7 @@ const Ruler = ({
2312
1733
  ]
2313
1734
  },
2314
1735
  void 0,
2315
- true,
1736
+ !0,
2316
1737
  {
2317
1738
  fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
2318
1739
  lineNumber: 438,
@@ -2322,8 +1743,8 @@ const Ruler = ({
2322
1743
  );
2323
1744
  };
2324
1745
  export {
2325
- AxisH,
2326
- AxisV,
2327
- Grid,
2328
- Ruler
1746
+ Gn as AxisH,
1747
+ Mn as AxisV,
1748
+ Wn as Grid,
1749
+ Yn as Ruler
2329
1750
  };