laif-ds
Version:
Design System di Laif con componenti React basati su principi di Atomic Design
31 lines (30 loc) • 1.26 kB
JavaScript
"use client";
import a from "./array.js";
import o from "./constant.js";
import d from "./curve/linear.js";
import { withPath as v } from "./path.js";
import { x as L, y as b } from "./point.js";
function j(t, u) {
var m = o(!0), i = null, l = d, r = null, h = v(e);
t = typeof t == "function" ? t : t === void 0 ? L : o(t), u = typeof u == "function" ? u : u === void 0 ? b : o(u);
function e(n) {
var f, s = (n = a(n)).length, p, c = !1, g;
for (i == null && (r = l(g = h())), f = 0; f <= s; ++f)
!(f < s && m(p = n[f], f, n)) === c && ((c = !c) ? r.lineStart() : r.lineEnd()), c && r.point(+t(p, f, n), +u(p, f, n));
if (g) return r = null, g + "" || null;
}
return e.x = function(n) {
return arguments.length ? (t = typeof n == "function" ? n : o(+n), e) : t;
}, e.y = function(n) {
return arguments.length ? (u = typeof n == "function" ? n : o(+n), e) : u;
}, e.defined = function(n) {
return arguments.length ? (m = typeof n == "function" ? n : o(!!n), e) : m;
}, e.curve = function(n) {
return arguments.length ? (l = n, i != null && (r = l(i)), e) : l;
}, e.context = function(n) {
return arguments.length ? (n == null ? i = r = null : r = l(i = n), e) : i;
}, e;
}
export {
j as default
};