gd-measurements 0.4.2 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +85 -1
- package/dist/gd-measurements.css +1 -1
- package/dist/gd-measurements.js +458 -1586
- package/dist/utils/getOffset.d.ts +11 -0
- package/dist/utils/number/index.d.ts +1 -0
- package/dist/utils/number/number.d.ts +17 -0
- package/dist/utils/throttle/index.d.ts +1 -0
- package/dist/utils/throttle/throttle.d.ts +23 -0
- package/package.json +55 -2
package/dist/gd-measurements.js
CHANGED
|
@@ -1,1750 +1,622 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* @license React
|
|
9
|
-
* react-jsx-dev-runtime.production.min.js
|
|
10
|
-
*
|
|
11
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
|
-
*
|
|
13
|
-
* This source code is licensed under the MIT license found in the
|
|
14
|
-
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/
|
|
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;
|
|
22
|
-
}
|
|
23
|
-
var de = {};
|
|
24
|
-
/**
|
|
25
|
-
* @license React
|
|
26
|
-
* react-jsx-dev-runtime.development.js
|
|
27
|
-
*
|
|
28
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the MIT license found in the
|
|
31
|
-
* LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/
|
|
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")
|
|
39
|
-
return null;
|
|
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) {
|
|
45
|
-
{
|
|
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);
|
|
49
|
-
}
|
|
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);
|
|
59
|
-
}
|
|
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";
|
|
100
|
-
}
|
|
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;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
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
|
-
});
|
|
148
|
-
}
|
|
149
|
-
I++;
|
|
150
|
-
}
|
|
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
|
-
});
|
|
183
|
-
}
|
|
184
|
-
I < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
185
|
-
}
|
|
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] || "";
|
|
196
|
-
}
|
|
197
|
-
return `
|
|
198
|
-
` + xe + e;
|
|
199
|
-
}
|
|
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 "";
|
|
209
|
-
{
|
|
210
|
-
var s = se.get(e);
|
|
211
|
-
if (s !== void 0)
|
|
212
|
-
return s;
|
|
213
|
-
}
|
|
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() {
|
|
227
|
-
throw Error();
|
|
228
|
-
}
|
|
229
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
230
|
-
try {
|
|
231
|
-
Reflect.construct(b, []);
|
|
232
|
-
} catch (P) {
|
|
233
|
-
m = P;
|
|
234
|
-
}
|
|
235
|
-
Reflect.construct(e, [], b);
|
|
236
|
-
} else {
|
|
237
|
-
try {
|
|
238
|
-
b.call();
|
|
239
|
-
} catch (P) {
|
|
240
|
-
m = P;
|
|
241
|
-
}
|
|
242
|
-
e.call(b.prototype);
|
|
243
|
-
}
|
|
244
|
-
} else {
|
|
245
|
-
try {
|
|
246
|
-
throw Error();
|
|
247
|
-
} catch (P) {
|
|
248
|
-
m = P;
|
|
249
|
-
}
|
|
250
|
-
e();
|
|
251
|
-
}
|
|
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;
|
|
269
|
-
}
|
|
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)
|
|
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");
|
|
296
|
-
}
|
|
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
|
-
}
|
|
309
|
-
}
|
|
310
|
-
}
|
|
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;
|
|
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;
|
|
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));
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
var Lr = Array.isArray;
|
|
341
|
-
function be(e) {
|
|
342
|
-
return Lr(e);
|
|
343
|
-
}
|
|
344
|
-
function Ir(e) {
|
|
345
|
-
{
|
|
346
|
-
var a = typeof Symbol == "function" && Symbol.toStringTag, s = a && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
347
|
-
return s;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
function $r(e) {
|
|
351
|
-
try {
|
|
352
|
-
return Ke(e), !1;
|
|
353
|
-
} catch {
|
|
354
|
-
return !0;
|
|
355
|
-
}
|
|
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;
|
|
376
|
-
}
|
|
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;
|
|
384
|
-
}
|
|
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);
|
|
391
|
-
}
|
|
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
|
-
});
|
|
402
|
-
}
|
|
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));
|
|
408
|
-
};
|
|
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
|
|
426
|
-
};
|
|
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]);
|
|
454
|
-
}
|
|
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);
|
|
458
|
-
}
|
|
459
|
-
return Xr(e, v, z, p, m, ee.current, b);
|
|
460
|
-
}
|
|
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() {
|
|
476
|
-
{
|
|
477
|
-
if (pe.current) {
|
|
478
|
-
var e = N(pe.current.type);
|
|
479
|
-
if (e)
|
|
480
|
-
return `
|
|
481
|
-
|
|
482
|
-
Check the render method of \`` + e + "`.";
|
|
483
|
-
}
|
|
484
|
-
return "";
|
|
485
|
-
}
|
|
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 + ".";
|
|
494
|
-
}
|
|
495
|
-
return "";
|
|
496
|
-
}
|
|
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 + ">.");
|
|
507
|
-
}
|
|
508
|
-
return a;
|
|
509
|
-
}
|
|
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);
|
|
522
|
-
}
|
|
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);
|
|
532
|
-
}
|
|
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);
|
|
540
|
-
}
|
|
541
|
-
}
|
|
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");
|
|
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.");
|
|
566
|
-
}
|
|
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;
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
e.ref !== null && (X(e), y("Invalid attribute `ref` supplied to `React.Fragment`."), X(null));
|
|
578
|
-
}
|
|
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);
|
|
591
|
-
}
|
|
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;
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
return e === l ? Qr(U) : Kr(U), U;
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
var rn = en;
|
|
626
|
-
de.Fragment = l, de.jsxDEV = rn;
|
|
627
|
-
})()), de;
|
|
628
|
-
}
|
|
629
|
-
var fr;
|
|
630
|
-
function cn() {
|
|
631
|
-
return fr || (fr = 1, process.env.NODE_ENV === "production" ? fe.exports = on() : fe.exports = fn()), fe.exports;
|
|
632
|
-
}
|
|
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");
|
|
1
|
+
import { jsx as a, jsxs as y, Fragment as Z } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as O, useCallback as V, useEffect as M, useState as E, useMemo as $, useId as W, Fragment as tt } from "react";
|
|
3
|
+
const C = (...e) => {
|
|
4
|
+
let r = "";
|
|
5
|
+
for (let t = 0; t < e.length; t++) {
|
|
6
|
+
const o = e[t];
|
|
7
|
+
o && (t > 0 && (r += " "), r += o);
|
|
640
8
|
}
|
|
641
|
-
return
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
return Re = n, Re;
|
|
656
|
-
}
|
|
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();
|
|
663
|
-
};
|
|
664
|
-
return je = t, je;
|
|
665
|
-
}
|
|
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;
|
|
675
|
-
}
|
|
676
|
-
return ke = t, ke;
|
|
677
|
-
}
|
|
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, "");
|
|
685
|
-
}
|
|
686
|
-
return Te = n, Te;
|
|
687
|
-
}
|
|
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;
|
|
694
|
-
}
|
|
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];
|
|
702
|
-
try {
|
|
703
|
-
f[o] = void 0;
|
|
704
|
-
var c = !0;
|
|
705
|
-
} catch {
|
|
706
|
-
}
|
|
707
|
-
var D = l.call(f);
|
|
708
|
-
return c && (d ? f[o] = g : delete f[o]), D;
|
|
709
|
-
}
|
|
710
|
-
return Ue = i, Ue;
|
|
711
|
-
}
|
|
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);
|
|
719
|
-
}
|
|
720
|
-
return Se = n, Se;
|
|
721
|
-
}
|
|
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);
|
|
729
|
-
}
|
|
730
|
-
return Ce = f, Ce;
|
|
731
|
-
}
|
|
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";
|
|
738
|
-
}
|
|
739
|
-
return Ve = r, Ve;
|
|
740
|
-
}
|
|
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;
|
|
748
|
-
}
|
|
749
|
-
return we = l, we;
|
|
750
|
-
}
|
|
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;
|
|
764
|
-
}
|
|
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;
|
|
770
|
-
}
|
|
771
|
-
return ze = g, ze;
|
|
772
|
-
}
|
|
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;
|
|
786
|
-
}
|
|
787
|
-
function $(N) {
|
|
788
|
-
return h = N, x = setTimeout(_, g), T ? F(N) : C;
|
|
789
|
-
}
|
|
790
|
-
function q(N) {
|
|
791
|
-
var V = N - j, I = N - h, K = g - V;
|
|
792
|
-
return y ? i(K, S - I) : K;
|
|
793
|
-
}
|
|
794
|
-
function k(N) {
|
|
795
|
-
var V = N - j, I = N - h;
|
|
796
|
-
return j === void 0 || V >= g || V < 0 || y && I >= S;
|
|
797
|
-
}
|
|
798
|
-
function _() {
|
|
799
|
-
var N = t();
|
|
800
|
-
if (k(N))
|
|
801
|
-
return M(N);
|
|
802
|
-
x = setTimeout(_, q(N));
|
|
803
|
-
}
|
|
804
|
-
function M(N) {
|
|
805
|
-
return x = void 0, A && D ? F(N) : (D = R = void 0, C);
|
|
806
|
-
}
|
|
807
|
-
function B() {
|
|
808
|
-
x !== void 0 && clearTimeout(x), h = 0, D = j = R = x = void 0;
|
|
809
|
-
}
|
|
810
|
-
function w() {
|
|
811
|
-
return x === void 0 ? C : M(t());
|
|
812
|
-
}
|
|
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);
|
|
820
|
-
}
|
|
821
|
-
return x === void 0 && (x = setTimeout(_, g)), C;
|
|
9
|
+
return r;
|
|
10
|
+
}, S = (e, r = 0) => {
|
|
11
|
+
let t = null, o = 0, s = null;
|
|
12
|
+
const n = () => {
|
|
13
|
+
if (!s)
|
|
14
|
+
return;
|
|
15
|
+
const i = s;
|
|
16
|
+
s = null, o = Date.now(), e(...i);
|
|
17
|
+
}, l = ((...i) => {
|
|
18
|
+
s = i;
|
|
19
|
+
const c = r - (Date.now() - o);
|
|
20
|
+
if (c <= 0) {
|
|
21
|
+
t && (clearTimeout(t), t = null), n();
|
|
22
|
+
return;
|
|
822
23
|
}
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
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
|
|
840
|
-
});
|
|
841
|
-
}
|
|
842
|
-
return Ae = l, Ae;
|
|
843
|
-
}
|
|
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);
|
|
850
|
-
}
|
|
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, {
|
|
855
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/svg/HorizontalLine.tsx",
|
|
856
|
-
lineNumber: 14,
|
|
857
|
-
columnNumber: 10
|
|
858
|
-
}, void 0);
|
|
24
|
+
t || (t = setTimeout(() => {
|
|
25
|
+
t = null, n();
|
|
26
|
+
}, c));
|
|
27
|
+
});
|
|
28
|
+
return l.cancel = () => {
|
|
29
|
+
t && (clearTimeout(t), t = null), s = null, o = 0;
|
|
30
|
+
}, l.flush = () => {
|
|
31
|
+
t && (clearTimeout(t), t = null, n());
|
|
32
|
+
}, l;
|
|
33
|
+
}, A = ({ x: e, y: r, length: t, ...o }) => {
|
|
34
|
+
const s = e, n = e + t;
|
|
35
|
+
return /* @__PURE__ */ a("line", { ...o, x1: s, y1: r, x2: n, y2: r });
|
|
859
36
|
};
|
|
860
|
-
function
|
|
861
|
-
return !
|
|
37
|
+
function et(e, r) {
|
|
38
|
+
return !e || !r ? !1 : e.x === r.x && e.y === r.y && e.width === r.width && e.height === r.height;
|
|
862
39
|
}
|
|
863
|
-
const
|
|
864
|
-
const
|
|
865
|
-
if (
|
|
866
|
-
const
|
|
867
|
-
|
|
868
|
-
}
|
|
869
|
-
}, [
|
|
870
|
-
|
|
871
|
-
if (!
|
|
40
|
+
const G = (e, r) => {
|
|
41
|
+
const t = O(null), o = V(() => {
|
|
42
|
+
if (e?.current) {
|
|
43
|
+
const s = e.current.getBoundingClientRect();
|
|
44
|
+
et(t.current, s) || (t.current = DOMRect.fromRect(s), r(s));
|
|
45
|
+
}
|
|
46
|
+
}, [r, e]);
|
|
47
|
+
M(() => {
|
|
48
|
+
if (!e?.current || typeof ResizeObserver > "u")
|
|
872
49
|
return;
|
|
873
|
-
const
|
|
874
|
-
return
|
|
875
|
-
|
|
50
|
+
const s = new ResizeObserver(o);
|
|
51
|
+
return s.observe(e.current), () => {
|
|
52
|
+
s.disconnect();
|
|
876
53
|
};
|
|
877
|
-
}, [
|
|
878
|
-
},
|
|
879
|
-
const
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
54
|
+
}, [e, o]);
|
|
55
|
+
}, pt = ({ position: e = "fixed", className: r }) => {
|
|
56
|
+
const t = O(null), [o, s] = E(0), [n, l] = E(0), i = $(
|
|
57
|
+
() => S((c, u) => {
|
|
58
|
+
s(c), l(u / 2);
|
|
59
|
+
}, 250),
|
|
60
|
+
[]
|
|
61
|
+
);
|
|
62
|
+
return M(() => () => i.cancel(), [i]), G(t, (c) => {
|
|
63
|
+
i(c.width, c.height);
|
|
64
|
+
}), /* @__PURE__ */ a(
|
|
65
|
+
"svg",
|
|
66
|
+
{
|
|
67
|
+
ref: t,
|
|
68
|
+
className: C("AxisH", e, r),
|
|
69
|
+
"aria-hidden": "true",
|
|
70
|
+
children: /* @__PURE__ */ a(A, { length: o, x: 0, y: n })
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}, F = ({ x: e, y: r, length: t, ...o }) => {
|
|
74
|
+
const s = e, n = e, l = r, i = r + t;
|
|
75
|
+
return /* @__PURE__ */ a("line", { ...o, x1: s, y1: l, x2: n, y2: i });
|
|
76
|
+
}, vt = ({ position: e = "fixed", className: r }) => {
|
|
77
|
+
const t = O(null), [o, s] = E(0), [n, l] = E(0), i = $(
|
|
78
|
+
() => S((c, u) => {
|
|
79
|
+
s(u), l(c / 2);
|
|
80
|
+
}, 250),
|
|
81
|
+
[]
|
|
82
|
+
);
|
|
83
|
+
return M(() => () => i.cancel(), [i]), G(t, (c) => {
|
|
84
|
+
i(c.width, c.height);
|
|
85
|
+
}), /* @__PURE__ */ a(
|
|
86
|
+
"svg",
|
|
87
|
+
{
|
|
88
|
+
ref: t,
|
|
89
|
+
className: C("AxisV", e, r),
|
|
90
|
+
"aria-hidden": "true",
|
|
91
|
+
children: /* @__PURE__ */ a(F, { length: o, x: n, y: 0 })
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
}, _ = (e, r, t) => typeof e != "number" || !Number.isFinite(e) ? r : Math.max(e, t), X = (e, r, t = 1) => Math.floor(_(e, r, t)), U = (e) => typeof e == "number" && Number.isFinite(e), T = (e) => {
|
|
95
|
+
if (U(e))
|
|
96
|
+
return { x: e, y: e };
|
|
97
|
+
if (typeof e != "object" || e === null)
|
|
98
|
+
return { x: 0, y: 0 };
|
|
99
|
+
const { x: r, y: t } = e;
|
|
100
|
+
return {
|
|
101
|
+
x: U(r) ? r : 0,
|
|
102
|
+
y: U(t) ? t : 0
|
|
103
|
+
};
|
|
104
|
+
}, P = ({
|
|
105
|
+
show: e,
|
|
106
|
+
size: r = 10
|
|
107
|
+
}) => e && /* @__PURE__ */ y("g", { className: "Crosshair", children: [
|
|
108
|
+
/* @__PURE__ */ a(
|
|
920
109
|
"line",
|
|
921
110
|
{
|
|
922
111
|
className: "Crosshair_horizontal",
|
|
923
|
-
x1: -
|
|
112
|
+
x1: -r,
|
|
924
113
|
y1: 0,
|
|
925
|
-
x2:
|
|
114
|
+
x2: r,
|
|
926
115
|
y2: 0,
|
|
927
116
|
stroke: "red",
|
|
928
117
|
strokeWidth: 1
|
|
929
|
-
}
|
|
930
|
-
void 0,
|
|
931
|
-
!1,
|
|
932
|
-
{
|
|
933
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/debug/Crosshair.tsx",
|
|
934
|
-
lineNumber: 10,
|
|
935
|
-
columnNumber: 9
|
|
936
|
-
},
|
|
937
|
-
void 0
|
|
118
|
+
}
|
|
938
119
|
),
|
|
939
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ a(
|
|
940
121
|
"line",
|
|
941
122
|
{
|
|
942
123
|
className: "Crosshair_vertical",
|
|
943
124
|
x1: 0,
|
|
944
|
-
y1: -
|
|
125
|
+
y1: -r,
|
|
945
126
|
x2: 0,
|
|
946
|
-
y2:
|
|
127
|
+
y2: r,
|
|
947
128
|
stroke: "green",
|
|
948
129
|
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
|
|
130
|
+
}
|
|
958
131
|
)
|
|
959
|
-
] },
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
anchor: o = "start",
|
|
969
|
-
rotation: i = 0,
|
|
970
|
-
debug: f = !1
|
|
971
|
-
}) => /* @__PURE__ */ u.jsxDEV(
|
|
132
|
+
] }), rt = ({
|
|
133
|
+
children: e,
|
|
134
|
+
className: r,
|
|
135
|
+
alignment: t = "baseline",
|
|
136
|
+
translate: o = { x: 0, y: 0 },
|
|
137
|
+
anchor: s = "start",
|
|
138
|
+
rotation: n = 0,
|
|
139
|
+
debug: l = !1
|
|
140
|
+
}) => /* @__PURE__ */ y(
|
|
972
141
|
"g",
|
|
973
142
|
{
|
|
974
|
-
className:
|
|
975
|
-
transform: `translate(${
|
|
143
|
+
className: C("Label", r),
|
|
144
|
+
transform: `translate(${o.x}, ${o.y})`,
|
|
976
145
|
children: [
|
|
977
|
-
/* @__PURE__ */
|
|
978
|
-
|
|
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)
|
|
146
|
+
/* @__PURE__ */ a(P, { show: l }),
|
|
147
|
+
/* @__PURE__ */ a("text", { className: "value-label", transform: `rotate(${n})`, children: /* @__PURE__ */ a("tspan", { alignmentBaseline: t, textAnchor: s, children: e }) })
|
|
991
148
|
]
|
|
992
|
-
}
|
|
993
|
-
|
|
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 = {
|
|
149
|
+
}
|
|
150
|
+
), nt = {
|
|
1002
151
|
x: 0,
|
|
1003
152
|
y: 0
|
|
1004
|
-
},
|
|
1005
|
-
const
|
|
1006
|
-
return /* @__PURE__ */
|
|
1007
|
-
/* @__PURE__ */
|
|
153
|
+
}, q = ({ end: e, show: r, start: t = nt, color: o = "black" }) => {
|
|
154
|
+
const s = O(null), n = `arrow-${W()}`;
|
|
155
|
+
return /* @__PURE__ */ y(Z, { children: [
|
|
156
|
+
/* @__PURE__ */ a("defs", { ref: s, children: /* @__PURE__ */ a(
|
|
1008
157
|
"marker",
|
|
1009
158
|
{
|
|
1010
|
-
id:
|
|
159
|
+
id: n,
|
|
1011
160
|
markerWidth: "10",
|
|
1012
161
|
markerHeight: "10",
|
|
1013
162
|
refX: "10",
|
|
1014
163
|
refY: "2.5",
|
|
1015
164
|
orient: "auto",
|
|
1016
|
-
children: /* @__PURE__ */
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
}, void 0)
|
|
1021
|
-
},
|
|
1022
|
-
void 0,
|
|
1023
|
-
!1,
|
|
1024
|
-
{
|
|
1025
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/debug/Arrow.tsx",
|
|
1026
|
-
lineNumber: 22,
|
|
1027
|
-
columnNumber: 9
|
|
1028
|
-
},
|
|
1029
|
-
void 0
|
|
1030
|
-
) }, void 0, !1, {
|
|
1031
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/debug/Arrow.tsx",
|
|
1032
|
-
lineNumber: 21,
|
|
1033
|
-
columnNumber: 7
|
|
1034
|
-
}, void 0),
|
|
1035
|
-
t && /* @__PURE__ */ u.jsxDEV("g", { className: "Arrow", children: /* @__PURE__ */ u.jsxDEV(
|
|
165
|
+
children: /* @__PURE__ */ a("polygon", { points: "0 0, 10 2.5, 0 5", fill: "context-stroke" })
|
|
166
|
+
}
|
|
167
|
+
) }),
|
|
168
|
+
r && /* @__PURE__ */ a("g", { className: "Arrow", children: /* @__PURE__ */ a(
|
|
1036
169
|
"line",
|
|
1037
170
|
{
|
|
1038
|
-
x1:
|
|
1039
|
-
y1:
|
|
1040
|
-
x2:
|
|
1041
|
-
y2:
|
|
1042
|
-
stroke:
|
|
171
|
+
x1: t.x,
|
|
172
|
+
y1: t.y,
|
|
173
|
+
x2: e.x,
|
|
174
|
+
y2: e.y,
|
|
175
|
+
stroke: o,
|
|
1043
176
|
strokeWidth: "1",
|
|
1044
|
-
markerEnd:
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
{
|
|
1049
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/debug/Arrow.tsx",
|
|
1050
|
-
lineNumber: 35,
|
|
1051
|
-
columnNumber: 11
|
|
1052
|
-
},
|
|
1053
|
-
void 0
|
|
1054
|
-
) }, void 0, !1, {
|
|
1055
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/debug/Arrow.tsx",
|
|
1056
|
-
lineNumber: 34,
|
|
1057
|
-
columnNumber: 9
|
|
1058
|
-
}, void 0)
|
|
1059
|
-
] }, void 0, !0, {
|
|
1060
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/utils/debug/Arrow.tsx",
|
|
1061
|
-
lineNumber: 20,
|
|
1062
|
-
columnNumber: 5
|
|
1063
|
-
}, void 0);
|
|
177
|
+
markerEnd: `url(#${n})`
|
|
178
|
+
}
|
|
179
|
+
) })
|
|
180
|
+
] });
|
|
1064
181
|
};
|
|
1065
|
-
function
|
|
1066
|
-
return { x: -1 *
|
|
182
|
+
function ot(e) {
|
|
183
|
+
return { x: -1 * e.x, y: -1 * e.y };
|
|
1067
184
|
}
|
|
1068
|
-
const
|
|
185
|
+
const Y = {
|
|
1069
186
|
x: 0,
|
|
1070
187
|
y: 0
|
|
1071
|
-
},
|
|
188
|
+
}, st = {}, it = {
|
|
1072
189
|
anchor: "end"
|
|
1073
|
-
},
|
|
1074
|
-
const
|
|
1075
|
-
const
|
|
1076
|
-
return
|
|
190
|
+
}, at = (e = [], r, t = 0, o, s, n, l, i, c) => {
|
|
191
|
+
const u = e.length, N = r === "horizontal" ? o : 0, x = r === "vertical" ? o : 0, { x: p, y: k } = T(t), g = n ? T(n) : void 0, m = (R, f) => {
|
|
192
|
+
const d = {};
|
|
193
|
+
return r === "vertical" && (d.rotation = -90), f ? Object.assign(d, it, R) : Object.assign(d, st, R);
|
|
1077
194
|
};
|
|
1078
|
-
return
|
|
1079
|
-
if (
|
|
1080
|
-
const
|
|
1081
|
-
let
|
|
1082
|
-
|
|
1083
|
-
const
|
|
1084
|
-
|
|
1085
|
-
|
|
195
|
+
return e.map((R, f) => {
|
|
196
|
+
if (s && f === 0) return null;
|
|
197
|
+
const d = N * f, L = x * f;
|
|
198
|
+
let z = p + d, h = k + L;
|
|
199
|
+
f === 0 && g && (z = g.x + d, h = g.y + L);
|
|
200
|
+
const b = (f * o).toString(), v = m(
|
|
201
|
+
f === 0 ? c : i,
|
|
202
|
+
f === 0
|
|
1086
203
|
);
|
|
1087
|
-
return /* @__PURE__ */
|
|
1088
|
-
/* @__PURE__ */
|
|
1089
|
-
|
|
204
|
+
return /* @__PURE__ */ y(tt, { children: [
|
|
205
|
+
/* @__PURE__ */ a(
|
|
206
|
+
q,
|
|
1090
207
|
{
|
|
1091
|
-
show:
|
|
1092
|
-
start: { x:
|
|
1093
|
-
end: { x:
|
|
208
|
+
show: l,
|
|
209
|
+
start: { x: d, y: L },
|
|
210
|
+
end: { x: z, y: h },
|
|
1094
211
|
color: "blue"
|
|
1095
|
-
}
|
|
1096
|
-
void 0,
|
|
1097
|
-
!1,
|
|
1098
|
-
{
|
|
1099
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/labels/Units/Units.tsx",
|
|
1100
|
-
lineNumber: 80,
|
|
1101
|
-
columnNumber: 9
|
|
1102
|
-
},
|
|
1103
|
-
void 0
|
|
212
|
+
}
|
|
1104
213
|
),
|
|
1105
|
-
/* @__PURE__ */
|
|
1106
|
-
|
|
214
|
+
/* @__PURE__ */ a(
|
|
215
|
+
rt,
|
|
1107
216
|
{
|
|
1108
|
-
...
|
|
1109
|
-
debug:
|
|
1110
|
-
translate: { x:
|
|
1111
|
-
className:
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
217
|
+
...v,
|
|
218
|
+
debug: l,
|
|
219
|
+
translate: { x: z, y: h },
|
|
220
|
+
className: C(
|
|
221
|
+
r,
|
|
222
|
+
f === 0 && "first",
|
|
223
|
+
f === u - 1 && "last"
|
|
1115
224
|
),
|
|
1116
|
-
children:
|
|
1117
|
-
}
|
|
1118
|
-
void 0,
|
|
1119
|
-
!1,
|
|
1120
|
-
{
|
|
1121
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/labels/Units/Units.tsx",
|
|
1122
|
-
lineNumber: 86,
|
|
1123
|
-
columnNumber: 9
|
|
1124
|
-
},
|
|
1125
|
-
void 0
|
|
225
|
+
children: b
|
|
226
|
+
}
|
|
1126
227
|
)
|
|
1127
|
-
] }, `${
|
|
1128
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/labels/Units/Units.tsx",
|
|
1129
|
-
lineNumber: 79,
|
|
1130
|
-
columnNumber: 7
|
|
1131
|
-
}, void 0);
|
|
228
|
+
] }, `${z},${h},${b}`);
|
|
1132
229
|
});
|
|
1133
|
-
},
|
|
1134
|
-
orientation:
|
|
1135
|
-
svgRef:
|
|
1136
|
-
className:
|
|
1137
|
-
offset:
|
|
1138
|
-
translate:
|
|
1139
|
-
size:
|
|
1140
|
-
zero:
|
|
1141
|
-
skipZero:
|
|
1142
|
-
debug:
|
|
1143
|
-
labelConfig:
|
|
1144
|
-
labelZeroConfig:
|
|
230
|
+
}, ct = { x: 0, y: 10 }, lt = { x: 10, y: 0 }, D = ({
|
|
231
|
+
orientation: e,
|
|
232
|
+
svgRef: r,
|
|
233
|
+
className: t,
|
|
234
|
+
offset: o = Y,
|
|
235
|
+
translate: s = Y,
|
|
236
|
+
size: n,
|
|
237
|
+
zero: l,
|
|
238
|
+
skipZero: i = !1,
|
|
239
|
+
debug: c = !1,
|
|
240
|
+
labelConfig: u,
|
|
241
|
+
labelZeroConfig: N
|
|
1145
242
|
}) => {
|
|
1146
|
-
const [
|
|
1147
|
-
(
|
|
1148
|
-
const
|
|
1149
|
-
(
|
|
243
|
+
const x = _(n, 100, 1), [p, k] = E(0), g = V(
|
|
244
|
+
(f, d) => {
|
|
245
|
+
const L = Math.floor(
|
|
246
|
+
(e === "horizontal" ? f : d) / x
|
|
1150
247
|
);
|
|
1151
|
-
|
|
248
|
+
k(L + 1);
|
|
1152
249
|
},
|
|
1153
|
-
[
|
|
1154
|
-
),
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
250
|
+
[e, x]
|
|
251
|
+
), m = $(
|
|
252
|
+
() => S(g, 500),
|
|
253
|
+
[g]
|
|
254
|
+
);
|
|
255
|
+
M(() => () => m.cancel(), [m]), G(r, (f) => {
|
|
256
|
+
m(f.width, f.height);
|
|
257
|
+
}), M(() => {
|
|
258
|
+
o && x && r.current && m(r.current.clientWidth, r.current.clientHeight);
|
|
259
|
+
}, [m, x, r, o]);
|
|
260
|
+
const R = $(() => Array.from(Array(Math.max(0, Math.floor(p)))).map(
|
|
261
|
+
(f, d) => d
|
|
262
|
+
), [p]);
|
|
263
|
+
return /* @__PURE__ */ y(
|
|
1162
264
|
"g",
|
|
1163
265
|
{
|
|
1164
|
-
className:
|
|
1165
|
-
transform: `translate(${
|
|
266
|
+
className: C("Units", t),
|
|
267
|
+
transform: `translate(${s.x}, ${s.y})`,
|
|
1166
268
|
children: [
|
|
1167
|
-
/* @__PURE__ */
|
|
1168
|
-
|
|
269
|
+
/* @__PURE__ */ a(
|
|
270
|
+
q,
|
|
1169
271
|
{
|
|
1170
|
-
show:
|
|
1171
|
-
start:
|
|
272
|
+
show: c,
|
|
273
|
+
start: ot(s),
|
|
1172
274
|
end: { x: 0, y: 0 },
|
|
1173
275
|
color: "blue"
|
|
1174
|
-
}
|
|
1175
|
-
void 0,
|
|
1176
|
-
!1,
|
|
1177
|
-
{
|
|
1178
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/labels/Units/Units.tsx",
|
|
1179
|
-
lineNumber: 157,
|
|
1180
|
-
columnNumber: 7
|
|
1181
|
-
},
|
|
1182
|
-
void 0
|
|
276
|
+
}
|
|
1183
277
|
),
|
|
1184
|
-
/* @__PURE__ */
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
j,
|
|
1191
|
-
r,
|
|
1192
|
-
l,
|
|
278
|
+
/* @__PURE__ */ a(P, { show: c, size: 20 }),
|
|
279
|
+
at(
|
|
280
|
+
R,
|
|
281
|
+
e,
|
|
282
|
+
o,
|
|
283
|
+
x,
|
|
1193
284
|
i,
|
|
1194
|
-
|
|
1195
|
-
Y(f ?? (r === "vertical" ? Cn : Vn)),
|
|
1196
|
-
g,
|
|
285
|
+
T(l ?? (e === "vertical" ? ct : lt)),
|
|
1197
286
|
c,
|
|
1198
|
-
|
|
287
|
+
u,
|
|
288
|
+
N
|
|
1199
289
|
)
|
|
1200
290
|
]
|
|
1201
|
-
}
|
|
1202
|
-
void 0,
|
|
1203
|
-
!0,
|
|
1204
|
-
{
|
|
1205
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/labels/Units/Units.tsx",
|
|
1206
|
-
lineNumber: 153,
|
|
1207
|
-
columnNumber: 5
|
|
1208
|
-
},
|
|
1209
|
-
void 0
|
|
291
|
+
}
|
|
1210
292
|
);
|
|
1211
|
-
},
|
|
1212
|
-
const
|
|
1213
|
-
const
|
|
1214
|
-
for (let
|
|
1215
|
-
|
|
1216
|
-
/* @__PURE__ */
|
|
1217
|
-
|
|
293
|
+
}, ut = (e, r, t) => {
|
|
294
|
+
const o = r / e, s = t / e, n = (() => {
|
|
295
|
+
const i = [];
|
|
296
|
+
for (let c = 1; c < e; c++)
|
|
297
|
+
i.push(
|
|
298
|
+
/* @__PURE__ */ a(
|
|
299
|
+
F,
|
|
1218
300
|
{
|
|
1219
|
-
length:
|
|
1220
|
-
x:
|
|
301
|
+
length: t,
|
|
302
|
+
x: o * c,
|
|
1221
303
|
y: 0,
|
|
1222
304
|
strokeWidth: 1
|
|
1223
305
|
},
|
|
1224
|
-
`vl-${
|
|
1225
|
-
!1,
|
|
1226
|
-
{
|
|
1227
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
|
|
1228
|
-
lineNumber: 24,
|
|
1229
|
-
columnNumber: 9
|
|
1230
|
-
},
|
|
1231
|
-
void 0
|
|
306
|
+
`vl-${c}-${o * 1}`
|
|
1232
307
|
)
|
|
1233
308
|
);
|
|
1234
|
-
return
|
|
1235
|
-
})(),
|
|
1236
|
-
const
|
|
1237
|
-
for (let
|
|
1238
|
-
|
|
1239
|
-
/* @__PURE__ */
|
|
1240
|
-
|
|
309
|
+
return i;
|
|
310
|
+
})(), l = (() => {
|
|
311
|
+
const i = [];
|
|
312
|
+
for (let c = 1; c < e; c++)
|
|
313
|
+
i.push(
|
|
314
|
+
/* @__PURE__ */ a(
|
|
315
|
+
A,
|
|
1241
316
|
{
|
|
1242
|
-
length: r
|
|
317
|
+
length: r,
|
|
1243
318
|
x: 0,
|
|
1244
|
-
y:
|
|
319
|
+
y: s * c,
|
|
1245
320
|
strokeWidth: 1
|
|
1246
321
|
},
|
|
1247
|
-
`hl-${
|
|
1248
|
-
!1,
|
|
1249
|
-
{
|
|
1250
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
|
|
1251
|
-
lineNumber: 41,
|
|
1252
|
-
columnNumber: 9
|
|
1253
|
-
},
|
|
1254
|
-
void 0
|
|
322
|
+
`hl-${c}-${s * 1}`
|
|
1255
323
|
)
|
|
1256
324
|
);
|
|
1257
|
-
return
|
|
325
|
+
return i;
|
|
1258
326
|
})();
|
|
1259
|
-
return /* @__PURE__ */
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
] }
|
|
1263
|
-
|
|
1264
|
-
lineNumber: 55,
|
|
1265
|
-
columnNumber: 5
|
|
1266
|
-
}, void 0);
|
|
1267
|
-
}, Pn = (r = "grid-pattern1", t = {
|
|
1268
|
-
width: 50,
|
|
1269
|
-
height: 50
|
|
1270
|
-
}) => /* @__PURE__ */ u.jsxDEV(
|
|
327
|
+
return /* @__PURE__ */ y("g", { className: "Grid_pattern_sub", children: [
|
|
328
|
+
n,
|
|
329
|
+
l
|
|
330
|
+
] });
|
|
331
|
+
}, ft = (e, r, t, o) => /* @__PURE__ */ y(
|
|
1271
332
|
"pattern",
|
|
1272
333
|
{
|
|
1273
334
|
className: "Grid_pattern",
|
|
1274
|
-
id:
|
|
335
|
+
id: e,
|
|
1275
336
|
patternUnits: "userSpaceOnUse",
|
|
1276
|
-
width: t
|
|
1277
|
-
height:
|
|
337
|
+
width: t,
|
|
338
|
+
height: o,
|
|
1278
339
|
children: [
|
|
1279
|
-
/* @__PURE__ */
|
|
1280
|
-
/* @__PURE__ */
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
}, void 0),
|
|
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)
|
|
340
|
+
/* @__PURE__ */ y("g", { className: "Grid_pattern_main", children: [
|
|
341
|
+
/* @__PURE__ */ a("line", { x1: 0, y1: 0, x2: 0, y2: o, strokeWidth: 2 }),
|
|
342
|
+
/* @__PURE__ */ a("line", { x1: 0, y1: 0, x2: t, y2: 0, strokeWidth: 2 })
|
|
343
|
+
] }),
|
|
344
|
+
ut(r, t, o)
|
|
1296
345
|
]
|
|
1297
|
-
}
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
{
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
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
|
|
346
|
+
}
|
|
347
|
+
), ht = { x: 12, y: 0 }, gt = { x: 2, y: 0 }, mt = { x: 0, y: -2 }, Nt = ({
|
|
348
|
+
position: e = "fixed",
|
|
349
|
+
grid: r = { width: 50, height: 50 },
|
|
350
|
+
labels: t,
|
|
351
|
+
debug: o,
|
|
352
|
+
className: s
|
|
1312
353
|
}) => {
|
|
1313
|
-
const
|
|
1314
|
-
return /* @__PURE__ */
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
labelConfig: typeof n != "boolean" && n.vLabelConfig ? n.vLabelConfig : void 0
|
|
1359
|
-
},
|
|
1360
|
-
void 0,
|
|
1361
|
-
!1,
|
|
1362
|
-
{
|
|
1363
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
|
|
1364
|
-
lineNumber: 133,
|
|
1365
|
-
columnNumber: 11
|
|
1366
|
-
},
|
|
1367
|
-
void 0
|
|
1368
|
-
)
|
|
1369
|
-
] }, void 0, !0, {
|
|
1370
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
|
|
1371
|
-
lineNumber: 106,
|
|
1372
|
-
columnNumber: 9
|
|
1373
|
-
}, void 0)
|
|
1374
|
-
] }, void 0, !0, {
|
|
1375
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/grid/Grid.tsx",
|
|
1376
|
-
lineNumber: 102,
|
|
1377
|
-
columnNumber: 5
|
|
1378
|
-
}, void 0);
|
|
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(
|
|
354
|
+
const n = O(null), l = `grid-pattern1-${W()}`, i = _(r.width, 50, 1), c = _(r.height, 50, 1), u = X(r.subdivision, 5, 1);
|
|
355
|
+
return /* @__PURE__ */ y(
|
|
356
|
+
"svg",
|
|
357
|
+
{
|
|
358
|
+
ref: n,
|
|
359
|
+
className: C("Grid", e, s),
|
|
360
|
+
"aria-hidden": "true",
|
|
361
|
+
children: [
|
|
362
|
+
/* @__PURE__ */ a("defs", { children: ft(l, u, i, c) }),
|
|
363
|
+
/* @__PURE__ */ a("rect", { fill: `url(#${l})`, width: "100%", height: "100%" }),
|
|
364
|
+
t && /* @__PURE__ */ y("g", { children: [
|
|
365
|
+
/* @__PURE__ */ a(
|
|
366
|
+
D,
|
|
367
|
+
{
|
|
368
|
+
debug: o,
|
|
369
|
+
className: "Grid_units",
|
|
370
|
+
orientation: "horizontal",
|
|
371
|
+
svgRef: n,
|
|
372
|
+
offset: typeof t == "boolean" ? gt : t.hOffset,
|
|
373
|
+
zero: typeof t == "boolean" ? ht : t.zero,
|
|
374
|
+
size: typeof t != "boolean" && t.size ? _(t.size.width, i, 1) : i,
|
|
375
|
+
labelConfig: typeof t != "boolean" && t.hLabelConfig ? t.hLabelConfig : void 0,
|
|
376
|
+
labelZeroConfig: typeof t != "boolean" && t.labelZeroConfig ? t.labelZeroConfig : void 0
|
|
377
|
+
}
|
|
378
|
+
),
|
|
379
|
+
/* @__PURE__ */ a(
|
|
380
|
+
D,
|
|
381
|
+
{
|
|
382
|
+
debug: o,
|
|
383
|
+
className: "Grid_units",
|
|
384
|
+
orientation: "vertical",
|
|
385
|
+
svgRef: n,
|
|
386
|
+
offset: typeof t == "boolean" ? mt : t.vOffset,
|
|
387
|
+
size: typeof t != "boolean" && t.size ? _(t.size.height, c, 1) : c,
|
|
388
|
+
skipZero: !0,
|
|
389
|
+
labelConfig: typeof t != "boolean" && t.vLabelConfig ? t.vLabelConfig : void 0
|
|
390
|
+
}
|
|
391
|
+
)
|
|
392
|
+
] })
|
|
393
|
+
]
|
|
394
|
+
}
|
|
395
|
+
);
|
|
396
|
+
}, yt = (e, r = "vertical", t = 100, o = 10, s = 3, n = 25, l = 10, i = 20, c = !0, u = !1, N = !1, x) => {
|
|
397
|
+
const p = t / o;
|
|
398
|
+
return /* @__PURE__ */ y(
|
|
1382
399
|
"pattern",
|
|
1383
400
|
{
|
|
1384
401
|
className: "Ruler_pattern",
|
|
1385
|
-
id:
|
|
402
|
+
id: e,
|
|
1386
403
|
patternUnits: "userSpaceOnUse",
|
|
1387
|
-
width:
|
|
1388
|
-
height:
|
|
404
|
+
width: r === "vertical" ? n : t,
|
|
405
|
+
height: r === "horizontal" ? n : t,
|
|
1389
406
|
children: [
|
|
1390
|
-
|
|
1391
|
-
|
|
407
|
+
r === "horizontal" && /* @__PURE__ */ y(Z, { children: [
|
|
408
|
+
N && /* @__PURE__ */ a(
|
|
1392
409
|
"rect",
|
|
1393
410
|
{
|
|
1394
411
|
className: "Ruler_pattern_line-debug",
|
|
1395
412
|
x: 0,
|
|
1396
413
|
y: 0,
|
|
1397
|
-
width:
|
|
1398
|
-
height:
|
|
414
|
+
width: t,
|
|
415
|
+
height: n,
|
|
1399
416
|
stroke: "red",
|
|
1400
417
|
fill: "none"
|
|
1401
|
-
}
|
|
1402
|
-
void 0,
|
|
1403
|
-
!1,
|
|
1404
|
-
{
|
|
1405
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
|
|
1406
|
-
lineNumber: 38,
|
|
1407
|
-
columnNumber: 13
|
|
1408
|
-
},
|
|
1409
|
-
void 0
|
|
418
|
+
}
|
|
1410
419
|
),
|
|
1411
|
-
/* @__PURE__ */
|
|
420
|
+
/* @__PURE__ */ a(
|
|
1412
421
|
"rect",
|
|
1413
422
|
{
|
|
1414
423
|
className: "Ruler_pattern_line",
|
|
1415
424
|
x: 0,
|
|
1416
|
-
y:
|
|
1417
|
-
width:
|
|
1418
|
-
height:
|
|
425
|
+
y: u ? n - Math.min(n, s) : 0,
|
|
426
|
+
width: t,
|
|
427
|
+
height: s,
|
|
1419
428
|
stroke: "none"
|
|
1420
|
-
}
|
|
1421
|
-
void 0,
|
|
1422
|
-
!1,
|
|
1423
|
-
{
|
|
1424
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
|
|
1425
|
-
lineNumber: 49,
|
|
1426
|
-
columnNumber: 11
|
|
1427
|
-
},
|
|
1428
|
-
void 0
|
|
429
|
+
}
|
|
1429
430
|
),
|
|
1430
|
-
/* @__PURE__ */
|
|
1431
|
-
/* @__PURE__ */
|
|
1432
|
-
|
|
431
|
+
/* @__PURE__ */ y("g", { className: "Ruler_pattern_main", children: [
|
|
432
|
+
/* @__PURE__ */ a(
|
|
433
|
+
F,
|
|
1433
434
|
{
|
|
1434
|
-
length: Math.min(
|
|
435
|
+
length: Math.min(x ?? n, n),
|
|
1435
436
|
x: 0,
|
|
1436
|
-
y:
|
|
437
|
+
y: u ? n - Math.min(n, x ?? n) : 0,
|
|
1437
438
|
className: "Ruler_pattern_main_tick"
|
|
1438
|
-
}
|
|
1439
|
-
void 0,
|
|
1440
|
-
!1,
|
|
1441
|
-
{
|
|
1442
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
|
|
1443
|
-
lineNumber: 61,
|
|
1444
|
-
columnNumber: 13
|
|
1445
|
-
},
|
|
1446
|
-
void 0
|
|
439
|
+
}
|
|
1447
440
|
),
|
|
1448
|
-
|
|
1449
|
-
|
|
441
|
+
c && /* @__PURE__ */ a(
|
|
442
|
+
F,
|
|
1450
443
|
{
|
|
1451
444
|
className: "Ruler_pattern_main_halfTick",
|
|
1452
|
-
length:
|
|
1453
|
-
x:
|
|
1454
|
-
y:
|
|
1455
|
-
}
|
|
1456
|
-
void 0,
|
|
1457
|
-
!1,
|
|
1458
|
-
{
|
|
1459
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
|
|
1460
|
-
lineNumber: 69,
|
|
1461
|
-
columnNumber: 15
|
|
1462
|
-
},
|
|
1463
|
-
void 0
|
|
445
|
+
length: i,
|
|
446
|
+
x: t / 2,
|
|
447
|
+
y: u ? n - Math.min(n, i) : 0
|
|
448
|
+
}
|
|
1464
449
|
)
|
|
1465
|
-
] },
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
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,
|
|
450
|
+
] }),
|
|
451
|
+
/* @__PURE__ */ a("g", { className: "Ruler_pattern_sub", children: Array.from(Array(o - 1)).map((k, g) => {
|
|
452
|
+
const m = p * (g + 1);
|
|
453
|
+
return c && t / 2 === m ? null : /* @__PURE__ */ a(
|
|
454
|
+
F,
|
|
1474
455
|
{
|
|
1475
|
-
length:
|
|
1476
|
-
x:
|
|
1477
|
-
y:
|
|
456
|
+
length: l,
|
|
457
|
+
x: m,
|
|
458
|
+
y: u ? n - Math.min(n, l) : 0,
|
|
1478
459
|
strokeWidth: 1
|
|
1479
460
|
},
|
|
1480
|
-
`vl-${
|
|
1481
|
-
!1,
|
|
1482
|
-
{
|
|
1483
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
|
|
1484
|
-
lineNumber: 86,
|
|
1485
|
-
columnNumber: 17
|
|
1486
|
-
},
|
|
1487
|
-
void 0
|
|
461
|
+
`vl-${g}-${p}`
|
|
1488
462
|
);
|
|
1489
|
-
}) }
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
}, void 0)
|
|
1494
|
-
] }, void 0, !0, {
|
|
1495
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
|
|
1496
|
-
lineNumber: 36,
|
|
1497
|
-
columnNumber: 9
|
|
1498
|
-
}, void 0),
|
|
1499
|
-
t === "vertical" && /* @__PURE__ */ u.jsxDEV(u.Fragment, { children: [
|
|
1500
|
-
D && /* @__PURE__ */ u.jsxDEV(
|
|
463
|
+
}) })
|
|
464
|
+
] }),
|
|
465
|
+
r === "vertical" && /* @__PURE__ */ y(Z, { children: [
|
|
466
|
+
N && /* @__PURE__ */ a(
|
|
1501
467
|
"rect",
|
|
1502
468
|
{
|
|
1503
469
|
className: "Ruler_pattern_line-debug",
|
|
1504
470
|
x: 0,
|
|
1505
471
|
y: 0,
|
|
1506
|
-
width:
|
|
1507
|
-
height:
|
|
472
|
+
width: n,
|
|
473
|
+
height: t,
|
|
1508
474
|
stroke: "red",
|
|
1509
475
|
fill: "none"
|
|
1510
|
-
}
|
|
1511
|
-
void 0,
|
|
1512
|
-
!1,
|
|
1513
|
-
{
|
|
1514
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
|
|
1515
|
-
lineNumber: 101,
|
|
1516
|
-
columnNumber: 13
|
|
1517
|
-
},
|
|
1518
|
-
void 0
|
|
476
|
+
}
|
|
1519
477
|
),
|
|
1520
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ a(
|
|
1521
479
|
"rect",
|
|
1522
480
|
{
|
|
1523
481
|
className: "Ruler_pattern_line",
|
|
1524
|
-
x:
|
|
482
|
+
x: u ? n - Math.min(n, s) : 0,
|
|
1525
483
|
y: 0,
|
|
1526
|
-
width:
|
|
1527
|
-
height:
|
|
484
|
+
width: s,
|
|
485
|
+
height: t,
|
|
1528
486
|
stroke: "none"
|
|
1529
|
-
}
|
|
1530
|
-
void 0,
|
|
1531
|
-
!1,
|
|
1532
|
-
{
|
|
1533
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
|
|
1534
|
-
lineNumber: 112,
|
|
1535
|
-
columnNumber: 11
|
|
1536
|
-
},
|
|
1537
|
-
void 0
|
|
487
|
+
}
|
|
1538
488
|
),
|
|
1539
|
-
/* @__PURE__ */
|
|
1540
|
-
/* @__PURE__ */
|
|
1541
|
-
|
|
489
|
+
/* @__PURE__ */ y("g", { className: "Ruler_pattern_main", children: [
|
|
490
|
+
/* @__PURE__ */ a(
|
|
491
|
+
A,
|
|
1542
492
|
{
|
|
1543
|
-
length: Math.min(
|
|
493
|
+
length: Math.min(x ?? n, n),
|
|
1544
494
|
x: 0,
|
|
1545
495
|
y: 0,
|
|
1546
496
|
className: "Ruler_pattern_main_tick"
|
|
1547
|
-
}
|
|
1548
|
-
void 0,
|
|
1549
|
-
!1,
|
|
1550
|
-
{
|
|
1551
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
|
|
1552
|
-
lineNumber: 124,
|
|
1553
|
-
columnNumber: 13
|
|
1554
|
-
},
|
|
1555
|
-
void 0
|
|
497
|
+
}
|
|
1556
498
|
),
|
|
1557
|
-
|
|
1558
|
-
|
|
499
|
+
c && /* @__PURE__ */ a(
|
|
500
|
+
A,
|
|
1559
501
|
{
|
|
1560
502
|
className: "Ruler_pattern_main_halfTick",
|
|
1561
|
-
x:
|
|
1562
|
-
y:
|
|
1563
|
-
length:
|
|
1564
|
-
}
|
|
1565
|
-
void 0,
|
|
1566
|
-
!1,
|
|
1567
|
-
{
|
|
1568
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
|
|
1569
|
-
lineNumber: 131,
|
|
1570
|
-
columnNumber: 15
|
|
1571
|
-
},
|
|
1572
|
-
void 0
|
|
503
|
+
x: u ? n - Math.min(n, i) : 0,
|
|
504
|
+
y: t / 2,
|
|
505
|
+
length: i
|
|
506
|
+
}
|
|
1573
507
|
)
|
|
1574
|
-
] },
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
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,
|
|
508
|
+
] }),
|
|
509
|
+
/* @__PURE__ */ a("g", { className: "Ruler_pattern_sub", children: Array.from(Array(o - 1)).map((k, g) => {
|
|
510
|
+
const m = p * (g + 1);
|
|
511
|
+
return c && t / 2 === m ? null : /* @__PURE__ */ a(
|
|
512
|
+
A,
|
|
1583
513
|
{
|
|
1584
|
-
length:
|
|
1585
|
-
x:
|
|
1586
|
-
y:
|
|
514
|
+
length: l,
|
|
515
|
+
x: u ? n - Math.min(n, l) : 0,
|
|
516
|
+
y: m,
|
|
1587
517
|
strokeWidth: 1
|
|
1588
518
|
},
|
|
1589
|
-
`hl-${
|
|
1590
|
-
!1,
|
|
1591
|
-
{
|
|
1592
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
|
|
1593
|
-
lineNumber: 149,
|
|
1594
|
-
columnNumber: 17
|
|
1595
|
-
},
|
|
1596
|
-
void 0
|
|
519
|
+
`hl-${g}-${p}`
|
|
1597
520
|
);
|
|
1598
|
-
}) }
|
|
1599
|
-
|
|
1600
|
-
lineNumber: 141,
|
|
1601
|
-
columnNumber: 11
|
|
1602
|
-
}, void 0)
|
|
1603
|
-
] }, void 0, !0, {
|
|
1604
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
|
|
1605
|
-
lineNumber: 99,
|
|
1606
|
-
columnNumber: 9
|
|
1607
|
-
}, void 0)
|
|
521
|
+
}) })
|
|
522
|
+
] })
|
|
1608
523
|
]
|
|
1609
|
-
}
|
|
1610
|
-
void 0,
|
|
1611
|
-
!0,
|
|
1612
|
-
{
|
|
1613
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
|
|
1614
|
-
lineNumber: 28,
|
|
1615
|
-
columnNumber: 5
|
|
1616
|
-
},
|
|
1617
|
-
void 0
|
|
524
|
+
}
|
|
1618
525
|
);
|
|
1619
|
-
},
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
526
|
+
}, j = { x: 2, y: 12 }, H = (e, r, t, o) => {
|
|
527
|
+
const s = _(o, 25, 1), n = typeof e == "boolean" ? j : T(e[r] ?? j), l = r === "offset";
|
|
528
|
+
let i;
|
|
529
|
+
return t === "bottom" ? i = { x: n.x, y: -1 * n.y } : t === "top" ? i = { x: n.x, y: n.y } : t === "left" ? i = { x: n.y, y: l ? -1 * n.x : n.x } : i = { x: -1 * n.y, y: l ? -1 * n.x : n.x }, t === "right" ? { x: s + i.x, y: i.y } : t === "bottom" ? { x: i.x, y: s + i.y } : i;
|
|
530
|
+
}, xt = (e) => e === "bottom" || e === "top" ? "horizontal" : "vertical", $t = ({
|
|
531
|
+
location: e = "left",
|
|
532
|
+
position: r = "fixed",
|
|
533
|
+
labels: t,
|
|
534
|
+
skipZero: o,
|
|
1624
535
|
// ruler = {},
|
|
1625
|
-
debug:
|
|
1626
|
-
width:
|
|
1627
|
-
size:
|
|
1628
|
-
subdivisions:
|
|
1629
|
-
edge:
|
|
1630
|
-
tickWidth:
|
|
1631
|
-
halfTickWidth:
|
|
1632
|
-
showHalfTick:
|
|
1633
|
-
mainTickWidth:
|
|
1634
|
-
className:
|
|
536
|
+
debug: s = !1,
|
|
537
|
+
width: n = 25,
|
|
538
|
+
size: l = 100,
|
|
539
|
+
subdivisions: i = 10,
|
|
540
|
+
edge: c = 3,
|
|
541
|
+
tickWidth: u = 10,
|
|
542
|
+
halfTickWidth: N = 20,
|
|
543
|
+
showHalfTick: x = !0,
|
|
544
|
+
mainTickWidth: p,
|
|
545
|
+
className: k
|
|
1635
546
|
}) => {
|
|
1636
|
-
const
|
|
1637
|
-
if (
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
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",
|
|
547
|
+
const g = _(n, 25, 1), m = _(l, 100, 1), R = X(i, 10, 1), f = _(c, 3, 0), d = _(u, 10, 0), L = _(N, 20, 0), z = p === void 0 ? void 0 : _(p, g, 0), h = xt(e), b = O(null), v = h === "horizontal" && e === "bottom" || h === "vertical" && e === "right", w = $(() => {
|
|
548
|
+
if (t)
|
|
549
|
+
return H(t, "offset", e, n);
|
|
550
|
+
}, [t, e, n]), J = $(() => {
|
|
551
|
+
if (t)
|
|
552
|
+
return H(t, "zero", e, n);
|
|
553
|
+
}, [t, e, n]), K = $(() => {
|
|
554
|
+
if (t)
|
|
555
|
+
return typeof t == "boolean" ? {
|
|
556
|
+
alignment: v ? "text-after-edge" : "text-before-edge",
|
|
1662
557
|
anchor: "start",
|
|
1663
|
-
rotation:
|
|
1664
|
-
} :
|
|
1665
|
-
}, [
|
|
1666
|
-
if (
|
|
1667
|
-
return typeof
|
|
1668
|
-
alignment:
|
|
1669
|
-
anchor:
|
|
1670
|
-
rotation:
|
|
1671
|
-
} :
|
|
1672
|
-
}, [
|
|
1673
|
-
return /* @__PURE__ */
|
|
558
|
+
rotation: h === "vertical" ? -90 : 0
|
|
559
|
+
} : t.labelConfig;
|
|
560
|
+
}, [t, v, h]), Q = $(() => {
|
|
561
|
+
if (t)
|
|
562
|
+
return typeof t == "boolean" ? {
|
|
563
|
+
alignment: v ? "text-after-edge" : "text-before-edge",
|
|
564
|
+
anchor: h === "vertical" ? "end" : "start",
|
|
565
|
+
rotation: h === "vertical" ? -90 : 0
|
|
566
|
+
} : t.labelZeroConfig;
|
|
567
|
+
}, [t, v, h]), B = W(), I = `ruler-pattern1-${h}-${v ? "normal" : "opposite"}-${B}`;
|
|
568
|
+
return /* @__PURE__ */ y(
|
|
1674
569
|
"svg",
|
|
1675
570
|
{
|
|
1676
|
-
ref:
|
|
1677
|
-
className:
|
|
571
|
+
ref: b,
|
|
572
|
+
className: C(
|
|
1678
573
|
"Ruler",
|
|
574
|
+
e,
|
|
1679
575
|
r,
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
C
|
|
576
|
+
h,
|
|
577
|
+
k
|
|
1683
578
|
),
|
|
1684
|
-
width:
|
|
1685
|
-
height:
|
|
579
|
+
width: h === "vertical" ? g : "100%",
|
|
580
|
+
height: h === "horizontal" ? g : "100%",
|
|
581
|
+
"aria-hidden": "true",
|
|
1686
582
|
children: [
|
|
1687
|
-
/* @__PURE__ */
|
|
1688
|
-
|
|
1689
|
-
|
|
583
|
+
/* @__PURE__ */ a("defs", { children: yt(
|
|
584
|
+
I,
|
|
585
|
+
h,
|
|
586
|
+
m,
|
|
587
|
+
R,
|
|
1690
588
|
f,
|
|
1691
|
-
d,
|
|
1692
589
|
g,
|
|
1693
|
-
|
|
1694
|
-
|
|
590
|
+
d,
|
|
591
|
+
L,
|
|
592
|
+
x,
|
|
593
|
+
v,
|
|
594
|
+
s,
|
|
595
|
+
z
|
|
596
|
+
) }),
|
|
597
|
+
/* @__PURE__ */ a("rect", { fill: `url(#${I})`, width: "100%", height: "100%" }),
|
|
598
|
+
t && /* @__PURE__ */ a(
|
|
1695
599
|
D,
|
|
1696
|
-
R,
|
|
1697
|
-
h,
|
|
1698
|
-
o,
|
|
1699
|
-
S
|
|
1700
|
-
) }, void 0, !1, {
|
|
1701
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
|
|
1702
|
-
lineNumber: 450,
|
|
1703
|
-
columnNumber: 7
|
|
1704
|
-
}, void 0),
|
|
1705
|
-
/* @__PURE__ */ u.jsxDEV("rect", { fill: `url(#${q})`, width: "100%", height: "100%" }, void 0, !1, {
|
|
1706
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
|
|
1707
|
-
lineNumber: 466,
|
|
1708
|
-
columnNumber: 7
|
|
1709
|
-
}, void 0),
|
|
1710
|
-
n && /* @__PURE__ */ u.jsxDEV(
|
|
1711
|
-
Fe,
|
|
1712
|
-
{
|
|
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
|
|
1723
|
-
},
|
|
1724
|
-
void 0,
|
|
1725
|
-
!1,
|
|
1726
600
|
{
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
601
|
+
debug: s,
|
|
602
|
+
className: C("Ruler_units", v && "opposite"),
|
|
603
|
+
orientation: h,
|
|
604
|
+
svgRef: b,
|
|
605
|
+
offset: w,
|
|
606
|
+
zero: J,
|
|
607
|
+
size: typeof t != "boolean" && t.size ? t.size : m,
|
|
608
|
+
skipZero: o,
|
|
609
|
+
labelConfig: K,
|
|
610
|
+
labelZeroConfig: Q
|
|
611
|
+
}
|
|
1732
612
|
)
|
|
1733
613
|
]
|
|
1734
|
-
}
|
|
1735
|
-
void 0,
|
|
1736
|
-
!0,
|
|
1737
|
-
{
|
|
1738
|
-
fileName: "/Users/lukaszgrela/Development/xxx-greladesign/gd-measurements/lib/ruler/Ruler.tsx",
|
|
1739
|
-
lineNumber: 438,
|
|
1740
|
-
columnNumber: 5
|
|
1741
|
-
},
|
|
1742
|
-
void 0
|
|
614
|
+
}
|
|
1743
615
|
);
|
|
1744
616
|
};
|
|
1745
617
|
export {
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
618
|
+
pt as AxisH,
|
|
619
|
+
vt as AxisV,
|
|
620
|
+
Nt as Grid,
|
|
621
|
+
$t as Ruler
|
|
1750
622
|
};
|