@ledgerhq/lumen-ui-react-visualization 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dist/lib/Components/CartesianChart/CartesianChart.d.ts +3 -0
  2. package/dist/lib/Components/CartesianChart/CartesianChart.d.ts.map +1 -0
  3. package/dist/lib/Components/CartesianChart/CartesianChart.js +70 -0
  4. package/dist/lib/Components/CartesianChart/context/cartesianChartContext.d.ts +8 -0
  5. package/dist/lib/Components/CartesianChart/context/cartesianChartContext.d.ts.map +1 -0
  6. package/dist/lib/Components/CartesianChart/context/cartesianChartContext.js +9 -0
  7. package/dist/lib/Components/CartesianChart/context/index.d.ts +3 -0
  8. package/dist/lib/Components/CartesianChart/context/index.d.ts.map +1 -0
  9. package/dist/lib/Components/CartesianChart/context/useBuildChartContext.d.ts +23 -0
  10. package/dist/lib/Components/CartesianChart/context/useBuildChartContext.d.ts.map +1 -0
  11. package/dist/lib/Components/CartesianChart/context/useBuildChartContext.js +61 -0
  12. package/dist/lib/Components/CartesianChart/index.d.ts +4 -0
  13. package/dist/lib/Components/CartesianChart/index.d.ts.map +1 -0
  14. package/dist/lib/Components/CartesianChart/types.d.ts +48 -0
  15. package/dist/lib/Components/CartesianChart/types.d.ts.map +1 -0
  16. package/dist/lib/Components/Line/Line.d.ts +3 -0
  17. package/dist/lib/Components/Line/Line.d.ts.map +1 -0
  18. package/dist/lib/Components/Line/Line.js +53 -0
  19. package/dist/lib/Components/Line/index.d.ts +3 -0
  20. package/dist/lib/Components/Line/index.d.ts.map +1 -0
  21. package/dist/lib/Components/Line/types.d.ts +24 -0
  22. package/dist/lib/Components/Line/types.d.ts.map +1 -0
  23. package/dist/lib/Components/Line/utils.d.ts +19 -0
  24. package/dist/lib/Components/Line/utils.d.ts.map +1 -0
  25. package/dist/lib/Components/Line/utils.js +22 -0
  26. package/dist/lib/Components/LineChart/LineChart.d.ts +2 -8
  27. package/dist/lib/Components/LineChart/LineChart.d.ts.map +1 -1
  28. package/dist/lib/Components/LineChart/LineChart.js +78 -23
  29. package/dist/lib/Components/LineChart/index.d.ts +1 -0
  30. package/dist/lib/Components/LineChart/index.d.ts.map +1 -1
  31. package/dist/lib/Components/LineChart/types.d.ts +61 -0
  32. package/dist/lib/Components/LineChart/types.d.ts.map +1 -0
  33. package/dist/lib/Components/XAxis/XAxis.d.ts +4 -0
  34. package/dist/lib/Components/XAxis/XAxis.d.ts.map +1 -0
  35. package/dist/lib/Components/XAxis/XAxis.js +79 -0
  36. package/dist/lib/Components/XAxis/index.d.ts +3 -0
  37. package/dist/lib/Components/XAxis/index.d.ts.map +1 -0
  38. package/dist/lib/Components/XAxis/types.d.ts +3 -0
  39. package/dist/lib/Components/XAxis/types.d.ts.map +1 -0
  40. package/dist/lib/Components/YAxis/YAxis.d.ts +4 -0
  41. package/dist/lib/Components/YAxis/YAxis.d.ts.map +1 -0
  42. package/dist/lib/Components/YAxis/YAxis.js +79 -0
  43. package/dist/lib/Components/YAxis/index.d.ts +3 -0
  44. package/dist/lib/Components/YAxis/index.d.ts.map +1 -0
  45. package/dist/lib/Components/YAxis/types.d.ts +3 -0
  46. package/dist/lib/Components/YAxis/types.d.ts.map +1 -0
  47. package/dist/lib/utils/domain/domain.d.ts +17 -0
  48. package/dist/lib/utils/domain/domain.d.ts.map +1 -0
  49. package/dist/lib/utils/domain/domain.js +38 -0
  50. package/dist/lib/utils/index.d.ts +1 -1
  51. package/dist/lib/utils/index.d.ts.map +1 -1
  52. package/dist/lib/utils/scales/scales.d.ts +24 -0
  53. package/dist/lib/utils/scales/scales.d.ts.map +1 -0
  54. package/dist/lib/utils/scales/scales.js +25 -0
  55. package/dist/lib/utils/ticks/ticks.d.ts +27 -0
  56. package/dist/lib/utils/ticks/ticks.d.ts.map +1 -0
  57. package/dist/lib/utils/ticks/ticks.js +23 -0
  58. package/dist/lib/utils/types.d.ts +132 -6
  59. package/dist/lib/utils/types.d.ts.map +1 -1
  60. package/dist/libs/utils-shared/dist/index.js +35 -0
  61. package/dist/node_modules/d3-array/src/ascending.js +6 -0
  62. package/dist/node_modules/d3-array/src/bisect.js +9 -0
  63. package/dist/node_modules/d3-array/src/bisector.js +37 -0
  64. package/dist/node_modules/d3-array/src/descending.js +6 -0
  65. package/dist/node_modules/d3-array/src/number.js +6 -0
  66. package/dist/node_modules/d3-array/src/range.js +9 -0
  67. package/dist/node_modules/d3-array/src/ticks.js +32 -0
  68. package/dist/node_modules/d3-color/src/color.js +305 -0
  69. package/dist/node_modules/d3-color/src/define.js +12 -0
  70. package/dist/node_modules/d3-format/src/defaultLocale.js +15 -0
  71. package/dist/node_modules/d3-format/src/exponent.js +7 -0
  72. package/dist/node_modules/d3-format/src/formatDecimal.js +15 -0
  73. package/dist/node_modules/d3-format/src/formatGroup.js +10 -0
  74. package/dist/node_modules/d3-format/src/formatNumerals.js +10 -0
  75. package/dist/node_modules/d3-format/src/formatPrefixAuto.js +12 -0
  76. package/dist/node_modules/d3-format/src/formatRounded.js +10 -0
  77. package/dist/node_modules/d3-format/src/formatSpecifier.js +28 -0
  78. package/dist/node_modules/d3-format/src/formatTrim.js +19 -0
  79. package/dist/node_modules/d3-format/src/formatTypes.js +21 -0
  80. package/dist/node_modules/d3-format/src/identity.js +6 -0
  81. package/dist/node_modules/d3-format/src/locale.js +68 -0
  82. package/dist/node_modules/d3-format/src/precisionFixed.js +7 -0
  83. package/dist/node_modules/d3-format/src/precisionPrefix.js +7 -0
  84. package/dist/node_modules/d3-format/src/precisionRound.js +7 -0
  85. package/dist/node_modules/d3-interpolate/src/array.js +13 -0
  86. package/dist/node_modules/d3-interpolate/src/color.js +24 -0
  87. package/dist/node_modules/d3-interpolate/src/constant.js +4 -0
  88. package/dist/node_modules/d3-interpolate/src/date.js +9 -0
  89. package/dist/node_modules/d3-interpolate/src/number.js +8 -0
  90. package/dist/node_modules/d3-interpolate/src/numberArray.js +15 -0
  91. package/dist/node_modules/d3-interpolate/src/object.js +14 -0
  92. package/dist/node_modules/d3-interpolate/src/rgb.js +15 -0
  93. package/dist/node_modules/d3-interpolate/src/round.js +8 -0
  94. package/dist/node_modules/d3-interpolate/src/string.js +24 -0
  95. package/dist/node_modules/d3-interpolate/src/value.js +16 -0
  96. package/dist/node_modules/d3-path/src/path.js +64 -0
  97. package/dist/node_modules/d3-scale/src/band.js +41 -0
  98. package/dist/node_modules/d3-scale/src/constant.js +8 -0
  99. package/dist/node_modules/d3-scale/src/continuous.js +75 -0
  100. package/dist/node_modules/d3-scale/src/init.js +16 -0
  101. package/dist/node_modules/d3-scale/src/linear.js +39 -0
  102. package/dist/node_modules/d3-scale/src/log.js +86 -0
  103. package/dist/node_modules/d3-scale/src/nice.js +8 -0
  104. package/dist/node_modules/d3-scale/src/number.js +6 -0
  105. package/dist/node_modules/d3-scale/src/ordinal.js +31 -0
  106. package/dist/node_modules/d3-scale/src/tickFormat.js +32 -0
  107. package/dist/node_modules/d3-shape/src/area.js +56 -0
  108. package/dist/node_modules/d3-shape/src/array.js +6 -0
  109. package/dist/node_modules/d3-shape/src/constant.js +8 -0
  110. package/dist/node_modules/d3-shape/src/curve/bump.js +39 -0
  111. package/dist/node_modules/d3-shape/src/curve/linear.js +36 -0
  112. package/dist/node_modules/d3-shape/src/line.js +29 -0
  113. package/dist/node_modules/d3-shape/src/path.js +18 -0
  114. package/dist/node_modules/d3-shape/src/point.js +10 -0
  115. package/dist/node_modules/internmap/src/index.js +35 -0
  116. package/dist/package.json +14 -2
  117. package/package.json +14 -2
  118. package/dist/lib/utils/math/index.d.ts +0 -1
  119. package/dist/lib/utils/math/index.d.ts.map +0 -1
@@ -0,0 +1,32 @@
1
+ const w = Math.sqrt(50), q = Math.sqrt(10), m = Math.sqrt(2);
2
+ function k(i, r, f) {
3
+ const c = (r - i) / Math.max(0, f), M = Math.floor(Math.log10(c)), d = c / Math.pow(10, M), l = d >= w ? 10 : d >= q ? 5 : d >= m ? 2 : 1;
4
+ let n, h, e;
5
+ return M < 0 ? (e = Math.pow(10, -M) / l, n = Math.round(i * e), h = Math.round(r * e), n / e < i && ++n, h / e > r && --h, e = -e) : (e = Math.pow(10, M) * l, n = Math.round(i / e), h = Math.round(r / e), n * e < i && ++n, h * e > r && --h), h < n && 0.5 <= f && f < 2 ? k(i, r, f * 2) : [n, h, e];
6
+ }
7
+ function v(i, r, f) {
8
+ if (r = +r, i = +i, f = +f, !(f > 0)) return [];
9
+ if (i === r) return [i];
10
+ const c = r < i, [M, d, l] = c ? k(r, i, f) : k(i, r, f);
11
+ if (!(d >= M)) return [];
12
+ const n = d - M + 1, h = new Array(n);
13
+ if (c)
14
+ if (l < 0) for (let e = 0; e < n; ++e) h[e] = (d - e) / -l;
15
+ else for (let e = 0; e < n; ++e) h[e] = (d - e) * l;
16
+ else if (l < 0) for (let e = 0; e < n; ++e) h[e] = (M + e) / -l;
17
+ else for (let e = 0; e < n; ++e) h[e] = (M + e) * l;
18
+ return h;
19
+ }
20
+ function u(i, r, f) {
21
+ return r = +r, i = +i, f = +f, k(i, r, f)[2];
22
+ }
23
+ function x(i, r, f) {
24
+ r = +r, i = +i, f = +f;
25
+ const c = r < i, M = c ? u(r, i, f) : u(i, r, f);
26
+ return (c ? -1 : 1) * (M < 0 ? 1 / -M : M);
27
+ }
28
+ export {
29
+ v as default,
30
+ u as tickIncrement,
31
+ x as tickStep
32
+ };
@@ -0,0 +1,305 @@
1
+ import k, { extend as I } from "./define.js";
2
+ function u() {
3
+ }
4
+ var b = 0.7, y = 1 / b, o = "\\s*([+-]?\\d+)\\s*", g = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", n = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", j = /^#([0-9a-f]{3,8})$/, O = new RegExp(`^rgb\\(${o},${o},${o}\\)$`), z = new RegExp(`^rgb\\(${n},${n},${n}\\)$`), L = new RegExp(`^rgba\\(${o},${o},${o},${g}\\)$`), A = new RegExp(`^rgba\\(${n},${n},${n},${g}\\)$`), B = new RegExp(`^hsl\\(${g},${n},${n}\\)$`), D = new RegExp(`^hsla\\(${g},${n},${n},${g}\\)$`), v = {
5
+ aliceblue: 15792383,
6
+ antiquewhite: 16444375,
7
+ aqua: 65535,
8
+ aquamarine: 8388564,
9
+ azure: 15794175,
10
+ beige: 16119260,
11
+ bisque: 16770244,
12
+ black: 0,
13
+ blanchedalmond: 16772045,
14
+ blue: 255,
15
+ blueviolet: 9055202,
16
+ brown: 10824234,
17
+ burlywood: 14596231,
18
+ cadetblue: 6266528,
19
+ chartreuse: 8388352,
20
+ chocolate: 13789470,
21
+ coral: 16744272,
22
+ cornflowerblue: 6591981,
23
+ cornsilk: 16775388,
24
+ crimson: 14423100,
25
+ cyan: 65535,
26
+ darkblue: 139,
27
+ darkcyan: 35723,
28
+ darkgoldenrod: 12092939,
29
+ darkgray: 11119017,
30
+ darkgreen: 25600,
31
+ darkgrey: 11119017,
32
+ darkkhaki: 12433259,
33
+ darkmagenta: 9109643,
34
+ darkolivegreen: 5597999,
35
+ darkorange: 16747520,
36
+ darkorchid: 10040012,
37
+ darkred: 9109504,
38
+ darksalmon: 15308410,
39
+ darkseagreen: 9419919,
40
+ darkslateblue: 4734347,
41
+ darkslategray: 3100495,
42
+ darkslategrey: 3100495,
43
+ darkturquoise: 52945,
44
+ darkviolet: 9699539,
45
+ deeppink: 16716947,
46
+ deepskyblue: 49151,
47
+ dimgray: 6908265,
48
+ dimgrey: 6908265,
49
+ dodgerblue: 2003199,
50
+ firebrick: 11674146,
51
+ floralwhite: 16775920,
52
+ forestgreen: 2263842,
53
+ fuchsia: 16711935,
54
+ gainsboro: 14474460,
55
+ ghostwhite: 16316671,
56
+ gold: 16766720,
57
+ goldenrod: 14329120,
58
+ gray: 8421504,
59
+ green: 32768,
60
+ greenyellow: 11403055,
61
+ grey: 8421504,
62
+ honeydew: 15794160,
63
+ hotpink: 16738740,
64
+ indianred: 13458524,
65
+ indigo: 4915330,
66
+ ivory: 16777200,
67
+ khaki: 15787660,
68
+ lavender: 15132410,
69
+ lavenderblush: 16773365,
70
+ lawngreen: 8190976,
71
+ lemonchiffon: 16775885,
72
+ lightblue: 11393254,
73
+ lightcoral: 15761536,
74
+ lightcyan: 14745599,
75
+ lightgoldenrodyellow: 16448210,
76
+ lightgray: 13882323,
77
+ lightgreen: 9498256,
78
+ lightgrey: 13882323,
79
+ lightpink: 16758465,
80
+ lightsalmon: 16752762,
81
+ lightseagreen: 2142890,
82
+ lightskyblue: 8900346,
83
+ lightslategray: 7833753,
84
+ lightslategrey: 7833753,
85
+ lightsteelblue: 11584734,
86
+ lightyellow: 16777184,
87
+ lime: 65280,
88
+ limegreen: 3329330,
89
+ linen: 16445670,
90
+ magenta: 16711935,
91
+ maroon: 8388608,
92
+ mediumaquamarine: 6737322,
93
+ mediumblue: 205,
94
+ mediumorchid: 12211667,
95
+ mediumpurple: 9662683,
96
+ mediumseagreen: 3978097,
97
+ mediumslateblue: 8087790,
98
+ mediumspringgreen: 64154,
99
+ mediumturquoise: 4772300,
100
+ mediumvioletred: 13047173,
101
+ midnightblue: 1644912,
102
+ mintcream: 16121850,
103
+ mistyrose: 16770273,
104
+ moccasin: 16770229,
105
+ navajowhite: 16768685,
106
+ navy: 128,
107
+ oldlace: 16643558,
108
+ olive: 8421376,
109
+ olivedrab: 7048739,
110
+ orange: 16753920,
111
+ orangered: 16729344,
112
+ orchid: 14315734,
113
+ palegoldenrod: 15657130,
114
+ palegreen: 10025880,
115
+ paleturquoise: 11529966,
116
+ palevioletred: 14381203,
117
+ papayawhip: 16773077,
118
+ peachpuff: 16767673,
119
+ peru: 13468991,
120
+ pink: 16761035,
121
+ plum: 14524637,
122
+ powderblue: 11591910,
123
+ purple: 8388736,
124
+ rebeccapurple: 6697881,
125
+ red: 16711680,
126
+ rosybrown: 12357519,
127
+ royalblue: 4286945,
128
+ saddlebrown: 9127187,
129
+ salmon: 16416882,
130
+ sandybrown: 16032864,
131
+ seagreen: 3050327,
132
+ seashell: 16774638,
133
+ sienna: 10506797,
134
+ silver: 12632256,
135
+ skyblue: 8900331,
136
+ slateblue: 6970061,
137
+ slategray: 7372944,
138
+ slategrey: 7372944,
139
+ snow: 16775930,
140
+ springgreen: 65407,
141
+ steelblue: 4620980,
142
+ tan: 13808780,
143
+ teal: 32896,
144
+ thistle: 14204888,
145
+ tomato: 16737095,
146
+ turquoise: 4251856,
147
+ violet: 15631086,
148
+ wheat: 16113331,
149
+ white: 16777215,
150
+ whitesmoke: 16119285,
151
+ yellow: 16776960,
152
+ yellowgreen: 10145074
153
+ };
154
+ k(u, H, {
155
+ copy(e) {
156
+ return Object.assign(new this.constructor(), this, e);
157
+ },
158
+ displayable() {
159
+ return this.rgb().displayable();
160
+ },
161
+ hex: R,
162
+ // Deprecated! Use color.formatHex.
163
+ formatHex: R,
164
+ formatHex8: F,
165
+ formatHsl: G,
166
+ formatRgb: M,
167
+ toString: M
168
+ });
169
+ function R() {
170
+ return this.rgb().formatHex();
171
+ }
172
+ function F() {
173
+ return this.rgb().formatHex8();
174
+ }
175
+ function G() {
176
+ return S(this).formatHsl();
177
+ }
178
+ function M() {
179
+ return this.rgb().formatRgb();
180
+ }
181
+ function H(e) {
182
+ var r, t;
183
+ return e = (e + "").trim().toLowerCase(), (r = j.exec(e)) ? (t = r[1].length, r = parseInt(r[1], 16), t === 6 ? q(r) : t === 3 ? new a(r >> 8 & 15 | r >> 4 & 240, r >> 4 & 15 | r & 240, (r & 15) << 4 | r & 15, 1) : t === 8 ? m(r >> 24 & 255, r >> 16 & 255, r >> 8 & 255, (r & 255) / 255) : t === 4 ? m(r >> 12 & 15 | r >> 8 & 240, r >> 8 & 15 | r >> 4 & 240, r >> 4 & 15 | r & 240, ((r & 15) << 4 | r & 15) / 255) : null) : (r = O.exec(e)) ? new a(r[1], r[2], r[3], 1) : (r = z.exec(e)) ? new a(r[1] * 255 / 100, r[2] * 255 / 100, r[3] * 255 / 100, 1) : (r = L.exec(e)) ? m(r[1], r[2], r[3], r[4]) : (r = A.exec(e)) ? m(r[1] * 255 / 100, r[2] * 255 / 100, r[3] * 255 / 100, r[4]) : (r = B.exec(e)) ? P(r[1], r[2] / 100, r[3] / 100, 1) : (r = D.exec(e)) ? P(r[1], r[2] / 100, r[3] / 100, r[4]) : v.hasOwnProperty(e) ? q(v[e]) : e === "transparent" ? new a(NaN, NaN, NaN, 0) : null;
184
+ }
185
+ function q(e) {
186
+ return new a(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
187
+ }
188
+ function m(e, r, t, f) {
189
+ return f <= 0 && (e = r = t = NaN), new a(e, r, t, f);
190
+ }
191
+ function J(e) {
192
+ return e instanceof u || (e = H(e)), e ? (e = e.rgb(), new a(e.r, e.g, e.b, e.opacity)) : new a();
193
+ }
194
+ function K(e, r, t, f) {
195
+ return arguments.length === 1 ? J(e) : new a(e, r, t, f ?? 1);
196
+ }
197
+ function a(e, r, t, f) {
198
+ this.r = +e, this.g = +r, this.b = +t, this.opacity = +f;
199
+ }
200
+ k(a, K, I(u, {
201
+ brighter(e) {
202
+ return e = e == null ? y : Math.pow(y, e), new a(this.r * e, this.g * e, this.b * e, this.opacity);
203
+ },
204
+ darker(e) {
205
+ return e = e == null ? b : Math.pow(b, e), new a(this.r * e, this.g * e, this.b * e, this.opacity);
206
+ },
207
+ rgb() {
208
+ return this;
209
+ },
210
+ clamp() {
211
+ return new a(h(this.r), h(this.g), h(this.b), $(this.opacity));
212
+ },
213
+ displayable() {
214
+ return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
215
+ },
216
+ hex: E,
217
+ // Deprecated! Use color.formatHex.
218
+ formatHex: E,
219
+ formatHex8: Q,
220
+ formatRgb: _,
221
+ toString: _
222
+ }));
223
+ function E() {
224
+ return `#${l(this.r)}${l(this.g)}${l(this.b)}`;
225
+ }
226
+ function Q() {
227
+ return `#${l(this.r)}${l(this.g)}${l(this.b)}${l((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
228
+ }
229
+ function _() {
230
+ const e = $(this.opacity);
231
+ return `${e === 1 ? "rgb(" : "rgba("}${h(this.r)}, ${h(this.g)}, ${h(this.b)}${e === 1 ? ")" : `, ${e})`}`;
232
+ }
233
+ function $(e) {
234
+ return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
235
+ }
236
+ function h(e) {
237
+ return Math.max(0, Math.min(255, Math.round(e) || 0));
238
+ }
239
+ function l(e) {
240
+ return e = h(e), (e < 16 ? "0" : "") + e.toString(16);
241
+ }
242
+ function P(e, r, t, f) {
243
+ return f <= 0 ? e = r = t = NaN : t <= 0 || t >= 1 ? e = r = NaN : r <= 0 && (e = NaN), new i(e, r, t, f);
244
+ }
245
+ function S(e) {
246
+ if (e instanceof i) return new i(e.h, e.s, e.l, e.opacity);
247
+ if (e instanceof u || (e = H(e)), !e) return new i();
248
+ if (e instanceof i) return e;
249
+ e = e.rgb();
250
+ var r = e.r / 255, t = e.g / 255, f = e.b / 255, x = Math.min(r, t, f), d = Math.max(r, t, f), c = NaN, s = d - x, p = (d + x) / 2;
251
+ return s ? (r === d ? c = (t - f) / s + (t < f) * 6 : t === d ? c = (f - r) / s + 2 : c = (r - t) / s + 4, s /= p < 0.5 ? d + x : 2 - d - x, c *= 60) : s = p > 0 && p < 1 ? 0 : c, new i(c, s, p, e.opacity);
252
+ }
253
+ function T(e, r, t, f) {
254
+ return arguments.length === 1 ? S(e) : new i(e, r, t, f ?? 1);
255
+ }
256
+ function i(e, r, t, f) {
257
+ this.h = +e, this.s = +r, this.l = +t, this.opacity = +f;
258
+ }
259
+ k(i, T, I(u, {
260
+ brighter(e) {
261
+ return e = e == null ? y : Math.pow(y, e), new i(this.h, this.s, this.l * e, this.opacity);
262
+ },
263
+ darker(e) {
264
+ return e = e == null ? b : Math.pow(b, e), new i(this.h, this.s, this.l * e, this.opacity);
265
+ },
266
+ rgb() {
267
+ var e = this.h % 360 + (this.h < 0) * 360, r = isNaN(e) || isNaN(this.s) ? 0 : this.s, t = this.l, f = t + (t < 0.5 ? t : 1 - t) * r, x = 2 * t - f;
268
+ return new a(
269
+ N(e >= 240 ? e - 240 : e + 120, x, f),
270
+ N(e, x, f),
271
+ N(e < 120 ? e + 240 : e - 120, x, f),
272
+ this.opacity
273
+ );
274
+ },
275
+ clamp() {
276
+ return new i(C(this.h), w(this.s), w(this.l), $(this.opacity));
277
+ },
278
+ displayable() {
279
+ return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
280
+ },
281
+ formatHsl() {
282
+ const e = $(this.opacity);
283
+ return `${e === 1 ? "hsl(" : "hsla("}${C(this.h)}, ${w(this.s) * 100}%, ${w(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
284
+ }
285
+ }));
286
+ function C(e) {
287
+ return e = (e || 0) % 360, e < 0 ? e + 360 : e;
288
+ }
289
+ function w(e) {
290
+ return Math.max(0, Math.min(1, e || 0));
291
+ }
292
+ function N(e, r, t) {
293
+ return (e < 60 ? r + (t - r) * e / 60 : e < 180 ? t : e < 240 ? r + (t - r) * (240 - e) / 60 : r) * 255;
294
+ }
295
+ export {
296
+ u as Color,
297
+ a as Rgb,
298
+ y as brighter,
299
+ b as darker,
300
+ H as default,
301
+ T as hsl,
302
+ S as hslConvert,
303
+ K as rgb,
304
+ J as rgbConvert
305
+ };
@@ -0,0 +1,12 @@
1
+ function p(e, r, t) {
2
+ e.prototype = r.prototype = t, t.constructor = e;
3
+ }
4
+ function n(e, r) {
5
+ var t = Object.create(e.prototype);
6
+ for (var o in r) t[o] = r[o];
7
+ return t;
8
+ }
9
+ export {
10
+ p as default,
11
+ n as extend
12
+ };
@@ -0,0 +1,15 @@
1
+ import o from "./locale.js";
2
+ var r, t, f;
3
+ e({
4
+ thousands: ",",
5
+ grouping: [3],
6
+ currency: ["$", ""]
7
+ });
8
+ function e(a) {
9
+ return r = o(a), t = r.format, f = r.formatPrefix, r;
10
+ }
11
+ export {
12
+ e as default,
13
+ t as format,
14
+ f as formatPrefix
15
+ };
@@ -0,0 +1,7 @@
1
+ import { formatDecimalParts as a } from "./formatDecimal.js";
2
+ function e(t) {
3
+ return t = a(Math.abs(t)), t ? t[1] : NaN;
4
+ }
5
+ export {
6
+ e as default
7
+ };
@@ -0,0 +1,15 @@
1
+ function a(e) {
2
+ return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
3
+ }
4
+ function r(e, n) {
5
+ if (!isFinite(e) || e === 0) return null;
6
+ var i = (e = n ? e.toExponential(n - 1) : e.toExponential()).indexOf("e"), t = e.slice(0, i);
7
+ return [
8
+ t.length > 1 ? t[0] + t.slice(2) : t,
9
+ +e.slice(i + 1)
10
+ ];
11
+ }
12
+ export {
13
+ a as default,
14
+ r as formatDecimalParts
15
+ };
@@ -0,0 +1,10 @@
1
+ function i(t, h) {
2
+ return function(f, r) {
3
+ for (var n = f.length, s = [], u = 0, e = t[0], a = 0; n > 0 && e > 0 && (a + e + 1 > r && (e = Math.max(1, r - a)), s.push(f.substring(n -= e, n + e)), !((a += e + 1) > r)); )
4
+ e = t[u = (u + 1) % t.length];
5
+ return s.reverse().join(h);
6
+ };
7
+ }
8
+ export {
9
+ i as default
10
+ };
@@ -0,0 +1,10 @@
1
+ function e(r) {
2
+ return function(n) {
3
+ return n.replace(/[0-9]/g, function(t) {
4
+ return r[+t];
5
+ });
6
+ };
7
+ }
8
+ export {
9
+ e as default
10
+ };
@@ -0,0 +1,12 @@
1
+ import { formatDecimalParts as f } from "./formatDecimal.js";
2
+ var m;
3
+ function l(n, t) {
4
+ var a = f(n, t);
5
+ if (!a) return m = void 0, n.toPrecision(t);
6
+ var e = a[0], o = a[1], r = o - (m = Math.max(-8, Math.min(8, Math.floor(o / 3))) * 3) + 1, i = e.length;
7
+ return r === i ? e : r > i ? e + new Array(r - i + 1).join("0") : r > 0 ? e.slice(0, r) + "." + e.slice(r) : "0." + new Array(1 - r).join("0") + f(n, Math.max(0, t + r - 1))[0];
8
+ }
9
+ export {
10
+ l as default,
11
+ m as prefixExponent
12
+ };
@@ -0,0 +1,10 @@
1
+ import { formatDecimalParts as a } from "./formatDecimal.js";
2
+ function f(t, o) {
3
+ var n = a(t, o);
4
+ if (!n) return t + "";
5
+ var e = n[0], r = n[1];
6
+ return r < 0 ? "0." + new Array(-r).join("0") + e : e.length > r + 1 ? e.slice(0, r + 1) + "." + e.slice(r + 1) : e + new Array(r - e.length + 2).join("0");
7
+ }
8
+ export {
9
+ f as default
10
+ };
@@ -0,0 +1,28 @@
1
+ var o = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
2
+ function d(t) {
3
+ if (!(n = o.exec(t))) throw new Error("invalid format: " + t);
4
+ var n;
5
+ return new i({
6
+ fill: n[1],
7
+ align: n[2],
8
+ sign: n[3],
9
+ symbol: n[4],
10
+ zero: n[5],
11
+ width: n[6],
12
+ comma: n[7],
13
+ precision: n[8] && n[8].slice(1),
14
+ trim: n[9],
15
+ type: n[10]
16
+ });
17
+ }
18
+ d.prototype = i.prototype;
19
+ function i(t) {
20
+ this.fill = t.fill === void 0 ? " " : t.fill + "", this.align = t.align === void 0 ? ">" : t.align + "", this.sign = t.sign === void 0 ? "-" : t.sign + "", this.symbol = t.symbol === void 0 ? "" : t.symbol + "", this.zero = !!t.zero, this.width = t.width === void 0 ? void 0 : +t.width, this.comma = !!t.comma, this.precision = t.precision === void 0 ? void 0 : +t.precision, this.trim = !!t.trim, this.type = t.type === void 0 ? "" : t.type + "";
21
+ }
22
+ i.prototype.toString = function() {
23
+ return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
24
+ };
25
+ export {
26
+ i as FormatSpecifier,
27
+ d as default
28
+ };
@@ -0,0 +1,19 @@
1
+ function c(r) {
2
+ e: for (var t = r.length, e = 1, a = -1, f; e < t; ++e)
3
+ switch (r[e]) {
4
+ case ".":
5
+ a = f = e;
6
+ break;
7
+ case "0":
8
+ a === 0 && (a = e), f = e;
9
+ break;
10
+ default:
11
+ if (!+r[e]) break e;
12
+ a > 0 && (a = 0);
13
+ break;
14
+ }
15
+ return a > 0 ? r.slice(0, a) + r.slice(f + 1) : r;
16
+ }
17
+ export {
18
+ c as default
19
+ };
@@ -0,0 +1,21 @@
1
+ import i from "./formatDecimal.js";
2
+ import a from "./formatPrefixAuto.js";
3
+ import r from "./formatRounded.js";
4
+ const d = {
5
+ "%": (o, t) => (o * 100).toFixed(t),
6
+ b: (o) => Math.round(o).toString(2),
7
+ c: (o) => o + "",
8
+ d: i,
9
+ e: (o, t) => o.toExponential(t),
10
+ f: (o, t) => o.toFixed(t),
11
+ g: (o, t) => o.toPrecision(t),
12
+ o: (o) => Math.round(o).toString(8),
13
+ p: (o, t) => r(o * 100, t),
14
+ r,
15
+ s: a,
16
+ X: (o) => Math.round(o).toString(16).toUpperCase(),
17
+ x: (o) => Math.round(o).toString(16)
18
+ };
19
+ export {
20
+ d as default
21
+ };
@@ -0,0 +1,6 @@
1
+ function e(t) {
2
+ return t;
3
+ }
4
+ export {
5
+ e as default
6
+ };
@@ -0,0 +1,68 @@
1
+ import J from "./exponent.js";
2
+ import K from "./formatGroup.js";
3
+ import O from "./formatNumerals.js";
4
+ import z from "./formatSpecifier.js";
5
+ import Q from "./formatTrim.js";
6
+ import A from "./formatTypes.js";
7
+ import { prefixExponent as C } from "./formatPrefixAuto.js";
8
+ import E from "./identity.js";
9
+ var G = Array.prototype.map, I = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
10
+ function rn(r) {
11
+ var w = r.grouping === void 0 || r.thousands === void 0 ? E : K(G.call(r.grouping, Number), r.thousands + ""), L = r.currency === void 0 ? "" : r.currency[0] + "", $ = r.currency === void 0 ? "" : r.currency[1] + "", j = r.decimal === void 0 ? "." : r.decimal + "", F = r.numerals === void 0 ? E : O(G.call(r.numerals, String)), X = r.percent === void 0 ? "%" : r.percent + "", Y = r.minus === void 0 ? "−" : r.minus + "", Z = r.nan === void 0 ? "NaN" : r.nan + "";
12
+ function k(t, e) {
13
+ t = z(t);
14
+ var u = t.fill, h = t.align, m = t.sign, x = t.symbol, g = t.zero, b = t.width, M = t.comma, o = t.precision, S = t.trim, f = t.type;
15
+ f === "n" ? (M = !0, f = "g") : A[f] || (o === void 0 && (o = 12), S = !0, f = "g"), (g || u === "0" && h === "=") && (g = !0, u = "0", h = "=");
16
+ var B = (e && e.prefix !== void 0 ? e.prefix : "") + (x === "$" ? L : x === "#" && /[boxX]/.test(f) ? "0" + f.toLowerCase() : ""), D = (x === "$" ? $ : /[%p]/.test(f) ? X : "") + (e && e.suffix !== void 0 ? e.suffix : ""), N = A[f], H = /[defgprs%]/.test(f);
17
+ o = o === void 0 ? 6 : /[gprs]/.test(f) ? Math.max(1, Math.min(21, o)) : Math.max(0, Math.min(20, o));
18
+ function P(n) {
19
+ var s = B, i = D, a, T, p;
20
+ if (f === "c")
21
+ i = N(n) + i, n = "";
22
+ else {
23
+ n = +n;
24
+ var y = n < 0 || 1 / n < 0;
25
+ if (n = isNaN(n) ? Z : N(Math.abs(n), o), S && (n = Q(n)), y && +n == 0 && m !== "+" && (y = !1), s = (y ? m === "(" ? m : Y : m === "-" || m === "(" ? "" : m) + s, i = (f === "s" && !isNaN(n) && C !== void 0 ? I[8 + C / 3] : "") + i + (y && m === "(" ? ")" : ""), H) {
26
+ for (a = -1, T = n.length; ++a < T; )
27
+ if (p = n.charCodeAt(a), 48 > p || p > 57) {
28
+ i = (p === 46 ? j + n.slice(a + 1) : n.slice(a)) + i, n = n.slice(0, a);
29
+ break;
30
+ }
31
+ }
32
+ }
33
+ M && !g && (n = w(n, 1 / 0));
34
+ var c = s.length + n.length + i.length, d = c < b ? new Array(b - c + 1).join(u) : "";
35
+ switch (M && g && (n = w(d + n, d.length ? b - i.length : 1 / 0), d = ""), h) {
36
+ case "<":
37
+ n = s + n + i + d;
38
+ break;
39
+ case "=":
40
+ n = s + d + n + i;
41
+ break;
42
+ case "^":
43
+ n = d.slice(0, c = d.length >> 1) + s + n + i + d.slice(c);
44
+ break;
45
+ default:
46
+ n = d + s + n + i;
47
+ break;
48
+ }
49
+ return F(n);
50
+ }
51
+ return P.toString = function() {
52
+ return t + "";
53
+ }, P;
54
+ }
55
+ function q(t, e) {
56
+ var u = Math.max(-8, Math.min(8, Math.floor(J(e) / 3))) * 3, h = Math.pow(10, -u), m = k((t = z(t), t.type = "f", t), { suffix: I[8 + u / 3] });
57
+ return function(x) {
58
+ return m(h * x);
59
+ };
60
+ }
61
+ return {
62
+ format: k,
63
+ formatPrefix: q
64
+ };
65
+ }
66
+ export {
67
+ rn as default
68
+ };
@@ -0,0 +1,7 @@
1
+ import e from "./exponent.js";
2
+ function n(t) {
3
+ return Math.max(0, -e(Math.abs(t)));
4
+ }
5
+ export {
6
+ n as default
7
+ };
@@ -0,0 +1,7 @@
1
+ import t from "./exponent.js";
2
+ function e(a, o) {
3
+ return Math.max(0, Math.max(-8, Math.min(8, Math.floor(t(o) / 3))) * 3 - t(Math.abs(a)));
4
+ }
5
+ export {
6
+ e as default
7
+ };
@@ -0,0 +1,7 @@
1
+ import a from "./exponent.js";
2
+ function t(n, o) {
3
+ return n = Math.abs(n), o = Math.abs(o) - n, Math.max(0, a(o) - a(n)) + 1;
4
+ }
5
+ export {
6
+ t as default
7
+ };
@@ -0,0 +1,13 @@
1
+ import c from "./value.js";
2
+ function g(e, n) {
3
+ var t = n ? n.length : 0, o = e ? Math.min(t, e.length) : 0, f = new Array(o), i = new Array(t), r;
4
+ for (r = 0; r < o; ++r) f[r] = c(e[r], n[r]);
5
+ for (; r < t; ++r) i[r] = n[r];
6
+ return function(a) {
7
+ for (r = 0; r < o; ++r) i[r] = f[r](a);
8
+ return i;
9
+ };
10
+ }
11
+ export {
12
+ g as genericArray
13
+ };
@@ -0,0 +1,24 @@
1
+ import o from "./constant.js";
2
+ function e(n, r) {
3
+ return function(t) {
4
+ return n + t * r;
5
+ };
6
+ }
7
+ function i(n, r, t) {
8
+ return n = Math.pow(n, t), r = Math.pow(r, t) - n, t = 1 / t, function(u) {
9
+ return Math.pow(n + u * r, t);
10
+ };
11
+ }
12
+ function a(n) {
13
+ return (n = +n) == 1 ? f : function(r, t) {
14
+ return t - r ? i(r, t, n) : o(isNaN(r) ? t : r);
15
+ };
16
+ }
17
+ function f(n, r) {
18
+ var t = r - n;
19
+ return t ? e(n, t) : o(isNaN(n) ? r : n);
20
+ }
21
+ export {
22
+ f as default,
23
+ a as gamma
24
+ };
@@ -0,0 +1,4 @@
1
+ const a = (t) => () => t;
2
+ export {
3
+ a as default
4
+ };
@@ -0,0 +1,9 @@
1
+ function u(e, t) {
2
+ var n = /* @__PURE__ */ new Date();
3
+ return e = +e, t = +t, function(r) {
4
+ return n.setTime(e * (1 - r) + t * r), n;
5
+ };
6
+ }
7
+ export {
8
+ u as default
9
+ };
@@ -0,0 +1,8 @@
1
+ function t(e, n) {
2
+ return e = +e, n = +n, function(r) {
3
+ return e * (1 - r) + n * r;
4
+ };
5
+ }
6
+ export {
7
+ t as default
8
+ };