@m3ui-vue/m3ui-vue 1.1.2 → 1.1.4
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 +1 -1
- package/dist/API.md +202 -10
- package/dist/{MIcon-DLOkQduI.js → MIcon-Bxh9j135.js} +15 -8
- package/dist/MIcon-Bxh9j135.js.map +1 -0
- package/dist/{MMenuItem-DVxKEv1W.js → MMenuItem-BfjqwcYP.js} +85 -64
- package/dist/MMenuItem-BfjqwcYP.js.map +1 -0
- package/dist/MSlider-JflHJ70q.js +1525 -0
- package/dist/MSlider-JflHJ70q.js.map +1 -0
- package/dist/{MTextField-rML9jnXs.js → MTextField-NaIB6RbM.js} +68 -66
- package/dist/MTextField-NaIB6RbM.js.map +1 -0
- package/dist/api.json +1 -1
- package/dist/code-editor.js +2 -2
- package/dist/components/MAnimatedNumber.vue.d.ts +29 -0
- package/dist/components/MButton.vue.d.ts +2 -0
- package/dist/components/MContainerTransform.vue.d.ts +59 -0
- package/dist/components/MDialog.vue.d.ts +8 -5
- package/dist/components/MFlex.vue.d.ts +1 -1
- package/dist/components/MIcon.vue.d.ts +2 -0
- package/dist/components/MIconButton.vue.d.ts +2 -0
- package/dist/components/MListGroup.vue.d.ts +23 -0
- package/dist/components/MListItem.vue.d.ts +5 -5
- package/dist/components/MNavigationRail.vue.d.ts +1 -1
- package/dist/components/MScheduler.vue.d.ts +2 -2
- package/dist/components/MScheme.vue.d.ts +60 -0
- package/dist/components/MSparkline.vue.d.ts +41 -0
- package/dist/components/MSplitter.vue.d.ts +1 -1
- package/dist/components/MStack.vue.d.ts +1 -1
- package/dist/components/MToolbar.vue.d.ts +32 -5
- package/dist/components/MWindow.vue.d.ts +2 -2
- package/dist/components/_MDrawerItemList.vue.d.ts +2 -0
- package/dist/components/_MToolbarFab.vue.d.ts +16 -0
- package/dist/composables/_containerTransform.d.ts +48 -0
- package/dist/composables/_useSegmentRuns.d.ts +8 -0
- package/dist/composables/dynamicColor.d.ts +11 -0
- package/dist/composables/useColorPalette.d.ts +3 -1
- package/dist/composables/useConfetti.d.ts +32 -0
- package/dist/composables/useContainerTransform.d.ts +30 -0
- package/dist/composables/useLocale.d.ts +9 -0
- package/dist/index.d.ts +10 -1
- package/dist/locales/index.js +35 -0
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +16844 -15530
- package/dist/m3ui.js.map +1 -1
- package/dist/map.js +55 -55
- package/dist/{material-color-utilities-Cktu8DBU.js → material-color-utilities-C_iikgRm.js} +928 -603
- package/dist/material-color-utilities-C_iikgRm.js.map +1 -0
- package/dist/rich-text-editor.js +11 -11
- package/dist/styles.css +1 -1
- package/dist/terminal.js +1 -1
- package/dist/{useLocale-CqQrhWFl.js → useLocale-CXibICQA.js} +6 -1
- package/dist/useLocale-CXibICQA.js.map +1 -0
- package/package.json +2 -1
- package/src/__tests__/MAnimatedNumber.test.ts +128 -0
- package/src/__tests__/MContainerTransform.test.ts +279 -0
- package/src/__tests__/MDialog.test.ts +27 -0
- package/src/__tests__/MIcon.test.ts +19 -0
- package/src/__tests__/MListItemExpandable.test.ts +48 -0
- package/src/__tests__/MListItemShape.test.ts +42 -5
- package/src/__tests__/MListKeyboard.test.ts +90 -0
- package/src/__tests__/MMapTools.test.ts +2 -1
- package/src/__tests__/MNavigationRail.test.ts +33 -0
- package/src/__tests__/MScheme.test.ts +107 -0
- package/src/__tests__/MSlider.test.ts +161 -0
- package/src/__tests__/MSparkline.test.ts +96 -0
- package/src/__tests__/MToolbar.test.ts +157 -0
- package/src/__tests__/attrsFallthrough.test.ts +6 -0
- package/src/__tests__/hydration.test.ts +25 -0
- package/src/__tests__/iconButtonNames.test.ts +124 -0
- package/src/__tests__/ssr.test.ts +1 -0
- package/src/__tests__/useConfetti.test.ts +81 -0
- package/src/components/MAnimatedNumber.vue +327 -0
- package/src/components/MAutocomplete.vue +34 -4
- package/src/components/MBottomSheet.vue +1 -0
- package/src/components/MButton.vue +4 -2
- package/src/components/MContainerTransform.vue +321 -0
- package/src/components/MDataTable.vue +1 -1
- package/src/components/MDialog.vue +31 -6
- package/src/components/MFab.vue +10 -5
- package/src/components/MIcon.vue +11 -4
- package/src/components/MIconButton.vue +3 -1
- package/src/components/MList.vue +33 -31
- package/src/components/MListGroup.vue +66 -0
- package/src/components/MListItem.vue +138 -84
- package/src/components/MMaskField.vue +3 -0
- package/src/components/MMultiAutocomplete.vue +5 -1
- package/src/components/MMultiSelect.vue +19 -9
- package/src/components/MNavigationRail.vue +40 -10
- package/src/components/MScheme.vue +162 -0
- package/src/components/MSearchBar.vue +2 -0
- package/src/components/MSelect.vue +44 -10
- package/src/components/MSideSheet.vue +3 -0
- package/src/components/MSimpleCarousel.vue +6 -0
- package/src/components/MSlider.vue +161 -42
- package/src/components/MSparkline.vue +250 -0
- package/src/components/MSplitButton.vue +3 -0
- package/src/components/MSpotlightSearch.vue +1 -0
- package/src/components/MTable.vue +1 -0
- package/src/components/MTagInput.vue +4 -0
- package/src/components/MTextField.vue +3 -0
- package/src/components/MToolbar.vue +256 -15
- package/src/components/MTour.vue +1 -0
- package/src/components/MTreeTable.vue +1 -0
- package/src/components/_MToolbarFab.vue +14 -0
- package/src/components/_MTreeNode.vue +3 -0
- package/src/composables/_containerTransform.ts +179 -0
- package/src/composables/_useEscapeStack.ts +2 -0
- package/src/composables/_useSegmentRuns.ts +39 -0
- package/src/composables/dynamicColor.ts +66 -0
- package/src/composables/useColorPalette.ts +2 -2
- package/src/composables/useConfetti.ts +204 -0
- package/src/composables/useContainerTransform.ts +59 -0
- package/src/composables/useLocale.ts +14 -0
- package/src/index.ts +10 -1
- package/src/locales/de.ts +5 -0
- package/src/locales/es.ts +5 -0
- package/src/locales/fr.ts +5 -0
- package/src/locales/ja.ts +5 -0
- package/src/locales/ko.ts +5 -0
- package/src/locales/pt.ts +5 -0
- package/src/locales/zh.ts +5 -0
- package/dist/MIcon-DLOkQduI.js.map +0 -1
- package/dist/MMenuItem-DVxKEv1W.js.map +0 -1
- package/dist/MSlider-BXsBv0ox.js +0 -1402
- package/dist/MSlider-BXsBv0ox.js.map +0 -1
- package/dist/MTextField-rML9jnXs.js.map +0 -1
- package/dist/material-color-utilities-Cktu8DBU.js.map +0 -1
- package/dist/useLocale-CqQrhWFl.js.map +0 -1
|
@@ -18,6 +18,9 @@ function a(e) {
|
|
|
18
18
|
return e %= 360, e < 0 && (e += 360), e;
|
|
19
19
|
}
|
|
20
20
|
function o(e, t) {
|
|
21
|
+
return 180 - Math.abs(Math.abs(e - t) - 180);
|
|
22
|
+
}
|
|
23
|
+
function s(e, t) {
|
|
21
24
|
return [
|
|
22
25
|
e[0] * t[0][0] + e[1] * t[0][1] + e[2] * t[0][2],
|
|
23
26
|
e[0] * t[1][0] + e[1] * t[1][1] + e[2] * t[1][2],
|
|
@@ -26,7 +29,7 @@ function o(e, t) {
|
|
|
26
29
|
}
|
|
27
30
|
//#endregion
|
|
28
31
|
//#region node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/utils/color_utils.js
|
|
29
|
-
var
|
|
32
|
+
var c = [
|
|
30
33
|
[
|
|
31
34
|
.41233895,
|
|
32
35
|
.35762064,
|
|
@@ -42,7 +45,7 @@ var s = [
|
|
|
42
45
|
.11916382,
|
|
43
46
|
.95034478
|
|
44
47
|
]
|
|
45
|
-
],
|
|
48
|
+
], l = [
|
|
46
49
|
[
|
|
47
50
|
3.2413774792388685,
|
|
48
51
|
-1.5376652402851851,
|
|
@@ -58,106 +61,113 @@ var s = [
|
|
|
58
61
|
-.20395524564742123,
|
|
59
62
|
1.0571799111220335
|
|
60
63
|
]
|
|
61
|
-
],
|
|
64
|
+
], u = [
|
|
62
65
|
95.047,
|
|
63
66
|
100,
|
|
64
67
|
108.883
|
|
65
68
|
];
|
|
66
|
-
function
|
|
69
|
+
function d(e, t, n) {
|
|
67
70
|
return (255 << 24 | (e & 255) << 16 | (t & 255) << 8 | n & 255) >>> 0;
|
|
68
71
|
}
|
|
69
|
-
function d(e) {
|
|
70
|
-
return u(C(e[0]), C(e[1]), C(e[2]));
|
|
71
|
-
}
|
|
72
72
|
function f(e) {
|
|
73
|
-
return e
|
|
73
|
+
return d(E(e[0]), E(e[1]), E(e[2]));
|
|
74
74
|
}
|
|
75
75
|
function p(e) {
|
|
76
|
-
return e >>
|
|
76
|
+
return e >> 24 & 255;
|
|
77
77
|
}
|
|
78
78
|
function m(e) {
|
|
79
|
-
return e & 255;
|
|
79
|
+
return e >> 16 & 255;
|
|
80
80
|
}
|
|
81
|
-
function h(e
|
|
82
|
-
|
|
83
|
-
return u(C(i), C(a), C(o));
|
|
81
|
+
function h(e) {
|
|
82
|
+
return e >> 8 & 255;
|
|
84
83
|
}
|
|
85
84
|
function g(e) {
|
|
86
|
-
return
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
return e & 255;
|
|
86
|
+
}
|
|
87
|
+
function _(e, t, n) {
|
|
88
|
+
let r = l, i = r[0][0] * e + r[0][1] * t + r[0][2] * n, a = r[1][0] * e + r[1][1] * t + r[1][2] * n, o = r[2][0] * e + r[2][1] * t + r[2][2] * n;
|
|
89
|
+
return d(E(i), E(a), E(o));
|
|
90
|
+
}
|
|
91
|
+
function v(e) {
|
|
92
|
+
return s([
|
|
93
|
+
T(m(e)),
|
|
94
|
+
T(h(e)),
|
|
95
|
+
T(g(e))
|
|
96
|
+
], c);
|
|
97
|
+
}
|
|
98
|
+
function y(e, t, n) {
|
|
99
|
+
let r = u, i = (e + 16) / 116, a = t / 500 + i, o = i - n / 200, s = k(a), c = k(i), l = k(o);
|
|
100
|
+
return _(s * r[0], c * r[1], l * r[2]);
|
|
91
101
|
}
|
|
92
|
-
function
|
|
93
|
-
let t =
|
|
102
|
+
function b(e) {
|
|
103
|
+
let t = T(m(e)), n = T(h(e)), r = T(g(e)), i = c, a = i[0][0] * t + i[0][1] * n + i[0][2] * r, o = i[1][0] * t + i[1][1] * n + i[1][2] * r, s = i[2][0] * t + i[2][1] * n + i[2][2] * r, l = u, d = a / l[0], f = o / l[1], p = s / l[2], _ = O(d), v = O(f), y = O(p);
|
|
94
104
|
return [
|
|
95
105
|
116 * v - 16,
|
|
96
106
|
500 * (_ - v),
|
|
97
107
|
200 * (v - y)
|
|
98
108
|
];
|
|
99
109
|
}
|
|
100
|
-
function
|
|
101
|
-
let t = C(
|
|
102
|
-
return
|
|
110
|
+
function x(e) {
|
|
111
|
+
let t = E(C(e));
|
|
112
|
+
return d(t, t, t);
|
|
103
113
|
}
|
|
104
|
-
function
|
|
105
|
-
let t =
|
|
106
|
-
return 116 *
|
|
114
|
+
function S(e) {
|
|
115
|
+
let t = v(e)[1];
|
|
116
|
+
return 116 * O(t / 100) - 16;
|
|
107
117
|
}
|
|
108
|
-
function
|
|
109
|
-
return 100 *
|
|
118
|
+
function C(e) {
|
|
119
|
+
return 100 * k((e + 16) / 116);
|
|
110
120
|
}
|
|
111
|
-
function
|
|
112
|
-
return
|
|
121
|
+
function w(e) {
|
|
122
|
+
return O(e / 100) * 116 - 16;
|
|
113
123
|
}
|
|
114
|
-
function
|
|
124
|
+
function T(e) {
|
|
115
125
|
let t = e / 255;
|
|
116
126
|
return t <= .040449936 ? t / 12.92 * 100 : ((t + .055) / 1.055) ** 2.4 * 100;
|
|
117
127
|
}
|
|
118
|
-
function
|
|
128
|
+
function E(e) {
|
|
119
129
|
let t = e / 100, r = 0;
|
|
120
130
|
return r = t <= .0031308 ? t * 12.92 : 1.055 * t ** (1 / 2.4) - .055, n(0, 255, Math.round(r * 255));
|
|
121
131
|
}
|
|
122
|
-
function
|
|
123
|
-
return
|
|
132
|
+
function D() {
|
|
133
|
+
return u;
|
|
124
134
|
}
|
|
125
|
-
function
|
|
135
|
+
function O(e) {
|
|
126
136
|
return e > .008856451679035631 ? e ** (1 / 3) : (903.2962962962963 * e + 16) / 116;
|
|
127
137
|
}
|
|
128
|
-
function
|
|
138
|
+
function k(e) {
|
|
129
139
|
let t = e * e * e;
|
|
130
140
|
return t > .008856451679035631 ? t : (116 * e - 16) / 903.2962962962963;
|
|
131
141
|
}
|
|
132
142
|
//#endregion
|
|
133
143
|
//#region node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/hct/viewing_conditions.js
|
|
134
|
-
var
|
|
135
|
-
static make(n =
|
|
144
|
+
var A = class e {
|
|
145
|
+
static make(n = D(), r = 200 / Math.PI * C(50) / 100, i = 50, a = 2, o = !1) {
|
|
136
146
|
let s = n, c = s[0] * .401288 + s[1] * .650173 + s[2] * -.051461, l = s[0] * -.250268 + s[1] * 1.204414 + s[2] * .045854, u = s[0] * -.002079 + s[1] * .048952 + s[2] * .953127, d = .8 + a / 10, f = d >= .9 ? t(.59, .69, (d - .9) * 10) : t(.525, .59, (d - .8) * 10), p = o ? 1 : d * (1 - 1 / 3.6 * Math.exp((-r - 42) / 92));
|
|
137
147
|
p = p > 1 ? 1 : p < 0 ? 0 : p;
|
|
138
148
|
let m = d, h = [
|
|
139
149
|
100 / c * p + 1 - p,
|
|
140
150
|
100 / l * p + 1 - p,
|
|
141
151
|
100 / u * p + 1 - p
|
|
142
|
-
], g = 1 / (5 * r + 1), _ = g * g * g * g, v = 1 - _, y = _ * r + .1 * v * v * Math.cbrt(5 * r),
|
|
152
|
+
], g = 1 / (5 * r + 1), _ = g * g * g * g, v = 1 - _, y = _ * r + .1 * v * v * Math.cbrt(5 * r), b = C(i) / n[1], x = 1.48 + Math.sqrt(b), S = .725 / b ** .2, w = S, T = [
|
|
143
153
|
(y * h[0] * c / 100) ** .42,
|
|
144
154
|
(y * h[1] * l / 100) ** .42,
|
|
145
155
|
(y * h[2] * u / 100) ** .42
|
|
146
|
-
],
|
|
147
|
-
400 *
|
|
148
|
-
400 *
|
|
149
|
-
400 *
|
|
150
|
-
], O = (2 *
|
|
151
|
-
return new e(
|
|
156
|
+
], E = [
|
|
157
|
+
400 * T[0] / (T[0] + 27.13),
|
|
158
|
+
400 * T[1] / (T[1] + 27.13),
|
|
159
|
+
400 * T[2] / (T[2] + 27.13)
|
|
160
|
+
], O = (2 * E[0] + E[1] + .05 * E[2]) * S;
|
|
161
|
+
return new e(b, O, S, w, f, m, h, y, y ** .25, x);
|
|
152
162
|
}
|
|
153
163
|
constructor(e, t, n, r, i, a, o, s, c, l) {
|
|
154
164
|
this.n = e, this.aw = t, this.nbb = n, this.ncb = r, this.c = i, this.nc = a, this.rgbD = o, this.fl = s, this.fLRoot = c, this.z = l;
|
|
155
165
|
}
|
|
156
166
|
};
|
|
157
|
-
|
|
167
|
+
A.DEFAULT = A.make();
|
|
158
168
|
//#endregion
|
|
159
169
|
//#region node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/hct/cam16.js
|
|
160
|
-
var
|
|
170
|
+
var j = class t {
|
|
161
171
|
constructor(e, t, n, r, i, a, o, s, c) {
|
|
162
172
|
this.hue = e, this.chroma = t, this.j = n, this.q = r, this.m = i, this.s = a, this.jstar = o, this.astar = s, this.bstar = c;
|
|
163
173
|
}
|
|
@@ -166,21 +176,21 @@ var O = class t {
|
|
|
166
176
|
return 1.41 * Math.sqrt(t * t + n * n + r * r) ** .63;
|
|
167
177
|
}
|
|
168
178
|
static fromInt(e) {
|
|
169
|
-
return t.fromIntInViewingConditions(e,
|
|
179
|
+
return t.fromIntInViewingConditions(e, A.DEFAULT);
|
|
170
180
|
}
|
|
171
181
|
static fromIntInViewingConditions(n, r) {
|
|
172
|
-
let i = (n & 16711680) >> 16, o = (n & 65280) >> 8, s = n & 255, c =
|
|
173
|
-
return new t(j,
|
|
182
|
+
let i = (n & 16711680) >> 16, o = (n & 65280) >> 8, s = n & 255, c = T(i), l = T(o), u = T(s), d = .41233895 * c + .35762064 * l + .18051042 * u, f = .2126 * c + .7152 * l + .0722 * u, p = .01932141 * c + .11916382 * l + .95034478 * u, m = .401288 * d + .650173 * f - .051461 * p, h = -.250268 * d + 1.204414 * f + .045854 * p, g = -.002079 * d + .048952 * f + .953127 * p, _ = r.rgbD[0] * m, v = r.rgbD[1] * h, y = r.rgbD[2] * g, b = (r.fl * Math.abs(_) / 100) ** .42, x = (r.fl * Math.abs(v) / 100) ** .42, S = (r.fl * Math.abs(y) / 100) ** .42, C = e(_) * 400 * b / (b + 27.13), w = e(v) * 400 * x / (x + 27.13), E = e(y) * 400 * S / (S + 27.13), D = (11 * C + -12 * w + E) / 11, O = (C + w - 2 * E) / 9, k = (20 * C + 20 * w + 21 * E) / 20, A = (40 * C + 20 * w + E) / 20, j = a(Math.atan2(O, D) * 180 / Math.PI), M = j * Math.PI / 180, N = 100 * (A * r.nbb / r.aw) ** +(r.c * r.z), P = 4 / r.c * Math.sqrt(N / 100) * (r.aw + 4) * r.fLRoot, F = j < 20.14 ? j + 360 : j, ee = (5e4 / 13 * (.25 * (Math.cos(F * Math.PI / 180 + 2) + 3.8)) * r.nc * r.ncb * Math.sqrt(D * D + O * O) / (k + .305)) ** .9 * (1.64 - .29 ** r.n) ** .73, I = ee * Math.sqrt(N / 100), L = I * r.fLRoot, te = 50 * Math.sqrt(ee * r.c / (r.aw + 4)), ne = (1 + 100 * .007) * N / (1 + .007 * N), re = 1 / .0228 * Math.log(1 + .0228 * L), ie = re * Math.cos(M), ae = re * Math.sin(M);
|
|
183
|
+
return new t(j, I, N, P, L, te, ne, ie, ae);
|
|
174
184
|
}
|
|
175
185
|
static fromJch(e, n, r) {
|
|
176
|
-
return t.fromJchInViewingConditions(e, n, r,
|
|
186
|
+
return t.fromJchInViewingConditions(e, n, r, A.DEFAULT);
|
|
177
187
|
}
|
|
178
188
|
static fromJchInViewingConditions(e, n, r, i) {
|
|
179
189
|
let a = 4 / i.c * Math.sqrt(e / 100) * (i.aw + 4) * i.fLRoot, o = n * i.fLRoot, s = n / Math.sqrt(e / 100), c = 50 * Math.sqrt(s * i.c / (i.aw + 4)), l = r * Math.PI / 180, u = (1 + 100 * .007) * e / (1 + .007 * e), d = 1 / .0228 * Math.log(1 + .0228 * o), f = d * Math.cos(l), p = d * Math.sin(l);
|
|
180
190
|
return new t(r, n, e, a, o, c, u, f, p);
|
|
181
191
|
}
|
|
182
192
|
static fromUcs(e, n, r) {
|
|
183
|
-
return t.fromUcsInViewingConditions(e, n, r,
|
|
193
|
+
return t.fromUcsInViewingConditions(e, n, r, A.DEFAULT);
|
|
184
194
|
}
|
|
185
195
|
static fromUcsInViewingConditions(e, n, r, i) {
|
|
186
196
|
let a = n, o = r, s = Math.sqrt(a * a + o * o), c = (Math.exp(s * .0228) - 1) / .0228 / i.fLRoot, l = 180 / Math.PI * Math.atan2(o, a);
|
|
@@ -189,11 +199,11 @@ var O = class t {
|
|
|
189
199
|
return t.fromJchInViewingConditions(u, c, l, i);
|
|
190
200
|
}
|
|
191
201
|
toInt() {
|
|
192
|
-
return this.viewed(
|
|
202
|
+
return this.viewed(A.DEFAULT);
|
|
193
203
|
}
|
|
194
204
|
viewed(t) {
|
|
195
|
-
let n = ((this.chroma === 0 || this.j === 0 ? 0 : this.chroma / Math.sqrt(this.j / 100)) / (1.64 - .29 ** t.n) ** .73) ** (1 / .9), r = this.hue * Math.PI / 180, i = .25 * (Math.cos(r + 2) + 3.8), a = t.aw * (this.j / 100) ** (1 / t.c / t.z), o = 5e4 / 13 * i * t.nc * t.ncb, s = a / t.nbb, c = Math.sin(r), l = Math.cos(r), u = 23 * (s + .305) * n / (23 * o + 11 * n * l + 108 * n * c), d = u * l, f = u * c, p = (460 * s + 451 * d + 288 * f) / 1403, m = (460 * s - 891 * d - 261 * f) / 1403,
|
|
196
|
-
return
|
|
205
|
+
let n = ((this.chroma === 0 || this.j === 0 ? 0 : this.chroma / Math.sqrt(this.j / 100)) / (1.64 - .29 ** t.n) ** .73) ** (1 / .9), r = this.hue * Math.PI / 180, i = .25 * (Math.cos(r + 2) + 3.8), a = t.aw * (this.j / 100) ** (1 / t.c / t.z), o = 5e4 / 13 * i * t.nc * t.ncb, s = a / t.nbb, c = Math.sin(r), l = Math.cos(r), u = 23 * (s + .305) * n / (23 * o + 11 * n * l + 108 * n * c), d = u * l, f = u * c, p = (460 * s + 451 * d + 288 * f) / 1403, m = (460 * s - 891 * d - 261 * f) / 1403, h = (460 * s - 220 * d - 6300 * f) / 1403, g = Math.max(0, 27.13 * Math.abs(p) / (400 - Math.abs(p))), v = e(p) * (100 / t.fl) * g ** (1 / .42), y = Math.max(0, 27.13 * Math.abs(m) / (400 - Math.abs(m))), b = e(m) * (100 / t.fl) * y ** (1 / .42), x = Math.max(0, 27.13 * Math.abs(h) / (400 - Math.abs(h))), S = e(h) * (100 / t.fl) * x ** (1 / .42), C = v / t.rgbD[0], w = b / t.rgbD[1], T = S / t.rgbD[2];
|
|
206
|
+
return _(1.86206786 * C - 1.01125463 * w + .14918677 * T, .38752654 * C + .62144744 * w - .00897398 * T, -.0158415 * C - .03412294 * w + 1.04996444 * T);
|
|
197
207
|
}
|
|
198
208
|
static fromXyzInViewingConditions(n, r, i, a) {
|
|
199
209
|
let o = .401288 * n + .650173 * r - .051461 * i, s = -.250268 * n + 1.204414 * r + .045854 * i, c = -.002079 * n + .048952 * r + .953127 * i, l = a.rgbD[0] * o, u = a.rgbD[1] * s, d = a.rgbD[2] * c, f = (a.fl * Math.abs(l) / 100) ** .42, p = (a.fl * Math.abs(u) / 100) ** .42, m = (a.fl * Math.abs(d) / 100) ** .42, h = e(l) * 400 * f / (f + 27.13), g = e(u) * 400 * p / (p + 27.13), _ = e(d) * 400 * m / (m + 27.13), v = (11 * h + -12 * g + _) / 11, y = (h + g - 2 * _) / 9, b = (20 * h + 20 * g + 21 * _) / 20, x = (40 * h + 20 * g + _) / 20, S = Math.atan2(y, v) * 180 / Math.PI, C = S < 0 ? S + 360 : S >= 360 ? S - 360 : S, w = C * Math.PI / 180, T = 100 * (x * a.nbb / a.aw) ** +(a.c * a.z), E = 4 / a.c * Math.sqrt(T / 100) * (a.aw + 4) * a.fLRoot, D = C < 20.14 ? C + 360 : C, O = (5e4 / 13 * (1 / 4 * (Math.cos(D * Math.PI / 180 + 2) + 3.8)) * a.nc * a.ncb * Math.sqrt(v * v + y * y) / (b + .305)) ** .9 * (1.64 - .29 ** a.n) ** .73, k = O * Math.sqrt(T / 100), A = k * a.fLRoot, j = 50 * Math.sqrt(O * a.c / (a.aw + 4)), M = (1 + 100 * .007) * T / (1 + .007 * T), N = Math.log(1 + .0228 * A) / .0228, P = N * Math.cos(w), F = N * Math.sin(w);
|
|
@@ -207,7 +217,7 @@ var O = class t {
|
|
|
207
217
|
-.0158415 * S - .03412294 * C + 1.04996444 * w
|
|
208
218
|
];
|
|
209
219
|
}
|
|
210
|
-
},
|
|
220
|
+
}, M = class t {
|
|
211
221
|
static sanitizeRadians(e) {
|
|
212
222
|
return (e + Math.PI * 8) % (Math.PI * 2);
|
|
213
223
|
}
|
|
@@ -220,8 +230,8 @@ var O = class t {
|
|
|
220
230
|
return e(t) * 400 * n / (n + 27.13);
|
|
221
231
|
}
|
|
222
232
|
static hueOf(e) {
|
|
223
|
-
let n =
|
|
224
|
-
return Math.atan2(c,
|
|
233
|
+
let n = s(e, t.SCALED_DISCOUNT_FROM_LINRGB), r = t.chromaticAdaptation(n[0]), i = t.chromaticAdaptation(n[1]), a = t.chromaticAdaptation(n[2]), o = (11 * r + -12 * i + a) / 11, c = (r + i - 2 * a) / 9;
|
|
234
|
+
return Math.atan2(c, o);
|
|
225
235
|
}
|
|
226
236
|
static areInCyclicOrder(e, n, r) {
|
|
227
237
|
return t.sanitizeRadians(n - e) < t.sanitizeRadians(r - e);
|
|
@@ -330,9 +340,9 @@ var O = class t {
|
|
|
330
340
|
return e(t) * r ** (1 / .42);
|
|
331
341
|
}
|
|
332
342
|
static findResultByJ(e, n, r) {
|
|
333
|
-
let i = Math.sqrt(r) * 11, a =
|
|
343
|
+
let i = Math.sqrt(r) * 11, a = A.DEFAULT, o = 1 / (1.64 - .29 ** a.n) ** .73, c = .25 * (Math.cos(e + 2) + 3.8) * (5e4 / 13) * a.nc * a.ncb, l = Math.sin(e), u = Math.cos(e);
|
|
334
344
|
for (let e = 0; e < 5; e++) {
|
|
335
|
-
let
|
|
345
|
+
let d = i / 100, p = ((n === 0 || i === 0 ? 0 : n / Math.sqrt(d)) * o) ** (1 / .9), m = a.aw * d ** (1 / a.c / a.z) / a.nbb, h = 23 * (m + .305) * p / (23 * c + 11 * p * u + 108 * p * l), g = h * u, _ = h * l, v = (460 * m + 451 * g + 288 * _) / 1403, y = (460 * m - 891 * g - 261 * _) / 1403, b = (460 * m - 220 * g - 6300 * _) / 1403, x = s([
|
|
336
346
|
t.inverseChromaticAdaptation(v),
|
|
337
347
|
t.inverseChromaticAdaptation(y),
|
|
338
348
|
t.inverseChromaticAdaptation(b)
|
|
@@ -340,22 +350,22 @@ var O = class t {
|
|
|
340
350
|
if (x[0] < 0 || x[1] < 0 || x[2] < 0) return 0;
|
|
341
351
|
let S = t.Y_FROM_LINRGB[0], C = t.Y_FROM_LINRGB[1], w = t.Y_FROM_LINRGB[2], T = S * x[0] + C * x[1] + w * x[2];
|
|
342
352
|
if (T <= 0) return 0;
|
|
343
|
-
if (e === 4 || Math.abs(T - r) < .002) return x[0] > 100.01 || x[1] > 100.01 || x[2] > 100.01 ? 0 :
|
|
353
|
+
if (e === 4 || Math.abs(T - r) < .002) return x[0] > 100.01 || x[1] > 100.01 || x[2] > 100.01 ? 0 : f(x);
|
|
344
354
|
i -= (T - r) * i / (2 * T);
|
|
345
355
|
}
|
|
346
356
|
return 0;
|
|
347
357
|
}
|
|
348
358
|
static solveToInt(e, n, r) {
|
|
349
|
-
if (n < 1e-4 || r < 1e-4 || r > 99.9999) return
|
|
359
|
+
if (n < 1e-4 || r < 1e-4 || r > 99.9999) return x(r);
|
|
350
360
|
e = a(e);
|
|
351
|
-
let i = e / 180 * Math.PI, o =
|
|
352
|
-
return s === 0 ?
|
|
361
|
+
let i = e / 180 * Math.PI, o = C(r), s = t.findResultByJ(i, n, o);
|
|
362
|
+
return s === 0 ? f(t.bisectToLimit(o, i)) : s;
|
|
353
363
|
}
|
|
354
364
|
static solveToCam(e, n, r) {
|
|
355
|
-
return
|
|
365
|
+
return j.fromInt(t.solveToInt(e, n, r));
|
|
356
366
|
}
|
|
357
367
|
};
|
|
358
|
-
|
|
368
|
+
M.SCALED_DISCOUNT_FROM_LINRGB = [
|
|
359
369
|
[
|
|
360
370
|
.001200833568784504,
|
|
361
371
|
.002389694492170889,
|
|
@@ -371,7 +381,7 @@ k.SCALED_DISCOUNT_FROM_LINRGB = [
|
|
|
371
381
|
.0005364214359186694,
|
|
372
382
|
.0032979401770712076
|
|
373
383
|
]
|
|
374
|
-
],
|
|
384
|
+
], M.LINRGB_FROM_SCALED_DISCOUNT = [
|
|
375
385
|
[
|
|
376
386
|
1373.2198709594231,
|
|
377
387
|
-1100.4251190754821,
|
|
@@ -387,11 +397,11 @@ k.SCALED_DISCOUNT_FROM_LINRGB = [
|
|
|
387
397
|
-57.173814538844006,
|
|
388
398
|
308.7233197812385
|
|
389
399
|
]
|
|
390
|
-
],
|
|
400
|
+
], M.Y_FROM_LINRGB = [
|
|
391
401
|
.2126,
|
|
392
402
|
.7152,
|
|
393
403
|
.0722
|
|
394
|
-
],
|
|
404
|
+
], M.CRITICAL_PLANES = [
|
|
395
405
|
.015176349177441876,
|
|
396
406
|
.045529047532325624,
|
|
397
407
|
.07588174588720938,
|
|
@@ -650,9 +660,9 @@ k.SCALED_DISCOUNT_FROM_LINRGB = [
|
|
|
650
660
|
];
|
|
651
661
|
//#endregion
|
|
652
662
|
//#region node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/hct/hct.js
|
|
653
|
-
var
|
|
663
|
+
var N = class e {
|
|
654
664
|
static from(t, n, r) {
|
|
655
|
-
return new e(
|
|
665
|
+
return new e(M.solveToInt(t, n, r));
|
|
656
666
|
}
|
|
657
667
|
static fromInt(t) {
|
|
658
668
|
return new e(t);
|
|
@@ -664,19 +674,19 @@ var A = class e {
|
|
|
664
674
|
return this.internalHue;
|
|
665
675
|
}
|
|
666
676
|
set hue(e) {
|
|
667
|
-
this.setInternalState(
|
|
677
|
+
this.setInternalState(M.solveToInt(e, this.internalChroma, this.internalTone));
|
|
668
678
|
}
|
|
669
679
|
get chroma() {
|
|
670
680
|
return this.internalChroma;
|
|
671
681
|
}
|
|
672
682
|
set chroma(e) {
|
|
673
|
-
this.setInternalState(
|
|
683
|
+
this.setInternalState(M.solveToInt(this.internalHue, e, this.internalTone));
|
|
674
684
|
}
|
|
675
685
|
get tone() {
|
|
676
686
|
return this.internalTone;
|
|
677
687
|
}
|
|
678
688
|
set tone(e) {
|
|
679
|
-
this.setInternalState(
|
|
689
|
+
this.setInternalState(M.solveToInt(this.internalHue, this.internalChroma, e));
|
|
680
690
|
}
|
|
681
691
|
setValue(e, t) {
|
|
682
692
|
this[e] = t;
|
|
@@ -695,20 +705,20 @@ var A = class e {
|
|
|
695
705
|
}
|
|
696
706
|
constructor(e) {
|
|
697
707
|
this.argb = e;
|
|
698
|
-
let t =
|
|
699
|
-
this.internalHue = t.hue, this.internalChroma = t.chroma, this.internalTone =
|
|
708
|
+
let t = j.fromInt(e);
|
|
709
|
+
this.internalHue = t.hue, this.internalChroma = t.chroma, this.internalTone = S(e), this.argb = e;
|
|
700
710
|
}
|
|
701
711
|
setInternalState(e) {
|
|
702
|
-
let t =
|
|
703
|
-
this.internalHue = t.hue, this.internalChroma = t.chroma, this.internalTone =
|
|
712
|
+
let t = j.fromInt(e);
|
|
713
|
+
this.internalHue = t.hue, this.internalChroma = t.chroma, this.internalTone = S(e), this.argb = e;
|
|
704
714
|
}
|
|
705
715
|
inViewingConditions(t) {
|
|
706
|
-
let n =
|
|
707
|
-
return e.from(r.hue, r.chroma,
|
|
716
|
+
let n = j.fromInt(this.toInt()).xyzInViewingConditions(t), r = j.fromXyzInViewingConditions(n[0], n[1], n[2], A.make());
|
|
717
|
+
return e.from(r.hue, r.chroma, w(n[1]));
|
|
708
718
|
}
|
|
709
|
-
},
|
|
719
|
+
}, P = class e {
|
|
710
720
|
static ratioOfTones(t, n) {
|
|
711
|
-
return t = r(0, 100, t), n = r(0, 100, n), e.ratioOfYs(
|
|
721
|
+
return t = r(0, 100, t), n = r(0, 100, n), e.ratioOfYs(C(t), C(n));
|
|
712
722
|
}
|
|
713
723
|
static ratioOfYs(e, t) {
|
|
714
724
|
let n = e > t ? e : t, r = n === t ? e : t;
|
|
@@ -716,16 +726,16 @@ var A = class e {
|
|
|
716
726
|
}
|
|
717
727
|
static lighter(t, n) {
|
|
718
728
|
if (t < 0 || t > 100) return -1;
|
|
719
|
-
let r =
|
|
729
|
+
let r = C(t), i = n * (r + 5) - 5, a = e.ratioOfYs(i, r), o = Math.abs(a - n);
|
|
720
730
|
if (a < n && o > .04) return -1;
|
|
721
|
-
let s =
|
|
731
|
+
let s = w(i) + .4;
|
|
722
732
|
return s < 0 || s > 100 ? -1 : s;
|
|
723
733
|
}
|
|
724
734
|
static darker(t, n) {
|
|
725
735
|
if (t < 0 || t > 100) return -1;
|
|
726
|
-
let r =
|
|
736
|
+
let r = C(t), i = (r + 5) / n - 5, a = e.ratioOfYs(r, i), o = Math.abs(a - n);
|
|
727
737
|
if (a < n && o > .04) return -1;
|
|
728
|
-
let s =
|
|
738
|
+
let s = w(i) - .4;
|
|
729
739
|
return s < 0 || s > 100 ? -1 : s;
|
|
730
740
|
}
|
|
731
741
|
static lighterUnsafe(t, n) {
|
|
@@ -736,23 +746,23 @@ var A = class e {
|
|
|
736
746
|
let r = e.darker(t, n);
|
|
737
747
|
return r < 0 ? 0 : r;
|
|
738
748
|
}
|
|
739
|
-
},
|
|
749
|
+
}, F = class e {
|
|
740
750
|
static isDisliked(e) {
|
|
741
751
|
let t = Math.round(e.hue) >= 90 && Math.round(e.hue) <= 111, n = Math.round(e.chroma) > 16, r = Math.round(e.tone) < 65;
|
|
742
752
|
return t && n && r;
|
|
743
753
|
}
|
|
744
754
|
static fixIfDisliked(t) {
|
|
745
|
-
return e.isDisliked(t) ?
|
|
755
|
+
return e.isDisliked(t) ? N.from(t.hue, t.chroma, 70) : t;
|
|
746
756
|
}
|
|
747
757
|
};
|
|
748
758
|
//#endregion
|
|
749
759
|
//#region node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/dynamiccolor/dynamic_color.js
|
|
750
|
-
function
|
|
760
|
+
function ee(e, t, n) {
|
|
751
761
|
if (e.name !== n.name) throw Error(`Attempting to extend color ${e.name} with color ${n.name} of different name for spec version ${t}.`);
|
|
752
762
|
if (e.isBackground !== n.isBackground) throw Error(`Attempting to extend color ${e.name} as a ${e.isBackground ? "background" : "foreground"} with color ${n.name} as a ${n.isBackground ? "background" : "foreground"} for spec version ${t}.`);
|
|
753
763
|
}
|
|
754
|
-
function
|
|
755
|
-
return
|
|
764
|
+
function I(e, t, n) {
|
|
765
|
+
return ee(e, t, n), L.fromPalette({
|
|
756
766
|
name: e.name,
|
|
757
767
|
palette: (r) => r.specVersion === t ? n.palette(r) : e.palette(r),
|
|
758
768
|
tone: (r) => r.specVersion === t ? n.tone(r) : e.tone(r),
|
|
@@ -779,7 +789,7 @@ function P(e, t, n) {
|
|
|
779
789
|
}
|
|
780
790
|
});
|
|
781
791
|
}
|
|
782
|
-
var
|
|
792
|
+
var L = class e {
|
|
783
793
|
static fromPalette(t) {
|
|
784
794
|
return new e(t.name ?? "", t.palette, t.tone ?? e.getInitialToneFromBackground(t.background), t.isBackground ?? !1, t.chromaMultiplier, t.background, t.secondBackground, t.contrastCurve, t.toneDeltaPair);
|
|
785
795
|
}
|
|
@@ -813,14 +823,14 @@ var F = class e {
|
|
|
813
823
|
getHct(e) {
|
|
814
824
|
let t = this.hctCache.get(e);
|
|
815
825
|
if (t != null) return t;
|
|
816
|
-
let n =
|
|
826
|
+
let n = ae(e.specVersion).getHct(e, this);
|
|
817
827
|
return this.hctCache.size > 4 && this.hctCache.clear(), this.hctCache.set(e, n), n;
|
|
818
828
|
}
|
|
819
829
|
getTone(e) {
|
|
820
|
-
return
|
|
830
|
+
return ae(e.specVersion).getTone(e, this);
|
|
821
831
|
}
|
|
822
832
|
static foregroundTone(t, n) {
|
|
823
|
-
let r =
|
|
833
|
+
let r = P.lighterUnsafe(t, n), i = P.darkerUnsafe(t, n), a = P.ratioOfTones(r, t), o = P.ratioOfTones(i, t);
|
|
824
834
|
if (e.tonePrefersLightForeground(t)) {
|
|
825
835
|
let e = Math.abs(a - o) < .1 && a < n && o < n;
|
|
826
836
|
return a >= n || a >= o || e ? r : i;
|
|
@@ -836,7 +846,7 @@ var F = class e {
|
|
|
836
846
|
static enableLightForeground(t) {
|
|
837
847
|
return e.tonePrefersLightForeground(t) && !e.toneAllowsLightForeground(t) ? 49 : t;
|
|
838
848
|
}
|
|
839
|
-
},
|
|
849
|
+
}, te = class {
|
|
840
850
|
getHct(e, t) {
|
|
841
851
|
let n = t.getTone(e);
|
|
842
852
|
return t.palette(e).getHct(n);
|
|
@@ -849,7 +859,7 @@ var F = class e {
|
|
|
849
859
|
let r = t.background(e), i = d.contrastCurve(e), a = f.contrastCurve(e);
|
|
850
860
|
if (r && i && a) {
|
|
851
861
|
let t = r.getTone(e), o = i.get(e.contrastLevel), s = a.get(e.contrastLevel);
|
|
852
|
-
|
|
862
|
+
P.ratioOfTones(t, h) < o && (h = L.foregroundTone(t, o)), P.ratioOfTones(t, g) < s && (g = L.foregroundTone(t, s)), n && (h = L.foregroundTone(t, o), g = L.foregroundTone(t, s));
|
|
853
863
|
}
|
|
854
864
|
}
|
|
855
865
|
return (g - h) * m < s && (g = r(0, 100, h + s * m), (g - h) * m >= s || (h = r(0, 100, g - s * m))), 50 <= h && h < 60 ? m > 0 ? (h = 60, g = Math.max(g, h + s * m)) : (h = 49, g = Math.min(g, h + s * m)) : 50 <= g && g < 60 && (l ? m > 0 ? (h = 60, g = Math.max(g, h + s * m)) : (h = 49, g = Math.min(g, h + s * m)) : g = m > 0 ? 60 : 49), p ? h : g;
|
|
@@ -858,17 +868,17 @@ var F = class e {
|
|
|
858
868
|
let r = t.tone(e);
|
|
859
869
|
if (t.background == null || t.background(e) === void 0 || t.contrastCurve == null || t.contrastCurve(e) === void 0) return r;
|
|
860
870
|
let i = t.background(e).getTone(e), a = t.contrastCurve(e).get(e.contrastLevel);
|
|
861
|
-
if (
|
|
871
|
+
if (P.ratioOfTones(i, r) >= a || (r = L.foregroundTone(i, a)), n && (r = L.foregroundTone(i, a)), t.isBackground && 50 <= r && r < 60 && (r = P.ratioOfTones(49, i) >= a ? 49 : 60), t.secondBackground == null || t.secondBackground(e) === void 0) return r;
|
|
862
872
|
let [o, s] = [t.background, t.secondBackground], [c, l] = [o(e).getTone(e), s(e).getTone(e)], [u, d] = [Math.max(c, l), Math.min(c, l)];
|
|
863
|
-
if (
|
|
864
|
-
let f =
|
|
865
|
-
return f !== -1 && m.push(f), p !== -1 && m.push(p),
|
|
873
|
+
if (P.ratioOfTones(u, r) >= a && P.ratioOfTones(d, r) >= a) return r;
|
|
874
|
+
let f = P.lighter(u, a), p = P.darker(d, a), m = [];
|
|
875
|
+
return f !== -1 && m.push(f), p !== -1 && m.push(p), L.tonePrefersLightForeground(c) || L.tonePrefersLightForeground(l) ? f < 0 ? 100 : f : m.length === 1 ? m[0] : p < 0 ? 0 : p;
|
|
866
876
|
}
|
|
867
877
|
}
|
|
868
|
-
},
|
|
878
|
+
}, ne = class {
|
|
869
879
|
getHct(e, t) {
|
|
870
880
|
let n = t.palette(e), r = t.getTone(e), i = n.hue, a = n.chroma * (t.chromaMultiplier ? t.chromaMultiplier(e) : 1);
|
|
871
|
-
return
|
|
881
|
+
return N.from(i, a, r);
|
|
872
882
|
}
|
|
873
883
|
getTone(e, t) {
|
|
874
884
|
let n = t.toneDeltaPair ? t.toneDeltaPair(e) : void 0;
|
|
@@ -878,7 +888,7 @@ var F = class e {
|
|
|
878
888
|
let n = t.background(e), r = t.contrastCurve(e);
|
|
879
889
|
if (n && r) {
|
|
880
890
|
let t = n.getTone(e), i = r.get(e.contrastLevel);
|
|
881
|
-
f =
|
|
891
|
+
f = P.ratioOfTones(t, f) >= i && e.contrastLevel >= 0 ? f : L.foregroundTone(t, i);
|
|
882
892
|
}
|
|
883
893
|
}
|
|
884
894
|
return t.isBackground && !t.name.endsWith("_fixed_dim") && (f = f >= 57 ? r(65, 100, f) : r(0, 49, f)), f;
|
|
@@ -887,29 +897,29 @@ var F = class e {
|
|
|
887
897
|
let n = t.tone(e);
|
|
888
898
|
if (t.background == null || t.background(e) === void 0 || t.contrastCurve == null || t.contrastCurve(e) === void 0) return n;
|
|
889
899
|
let i = t.background(e).getTone(e), a = t.contrastCurve(e).get(e.contrastLevel);
|
|
890
|
-
if (n =
|
|
900
|
+
if (n = P.ratioOfTones(i, n) >= a && e.contrastLevel >= 0 ? n : L.foregroundTone(i, a), t.isBackground && !t.name.endsWith("_fixed_dim") && (n = n >= 57 ? r(65, 100, n) : r(0, 49, n)), t.secondBackground == null || t.secondBackground(e) === void 0) return n;
|
|
891
901
|
let [o, s] = [t.background, t.secondBackground], [c, l] = [o(e).getTone(e), s(e).getTone(e)], [u, d] = [Math.max(c, l), Math.min(c, l)];
|
|
892
|
-
if (
|
|
893
|
-
let f =
|
|
894
|
-
return f !== -1 && m.push(f), p !== -1 && m.push(p),
|
|
902
|
+
if (P.ratioOfTones(u, n) >= a && P.ratioOfTones(d, n) >= a) return n;
|
|
903
|
+
let f = P.lighter(u, a), p = P.darker(d, a), m = [];
|
|
904
|
+
return f !== -1 && m.push(f), p !== -1 && m.push(p), L.tonePrefersLightForeground(c) || L.tonePrefersLightForeground(l) ? f < 0 ? 100 : f : m.length === 1 ? m[0] : p < 0 ? 0 : p;
|
|
895
905
|
}
|
|
896
906
|
}
|
|
897
|
-
},
|
|
898
|
-
function
|
|
899
|
-
return e === "2025" ?
|
|
907
|
+
}, re = new te(), ie = new ne();
|
|
908
|
+
function ae(e) {
|
|
909
|
+
return e === "2025" ? ie : re;
|
|
900
910
|
}
|
|
901
911
|
//#endregion
|
|
902
912
|
//#region node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/palettes/tonal_palette.js
|
|
903
|
-
var
|
|
913
|
+
var R = class e {
|
|
904
914
|
static fromInt(t) {
|
|
905
|
-
let n =
|
|
915
|
+
let n = N.fromInt(t);
|
|
906
916
|
return e.fromHct(n);
|
|
907
917
|
}
|
|
908
918
|
static fromHct(t) {
|
|
909
919
|
return new e(t.hue, t.chroma, t);
|
|
910
920
|
}
|
|
911
921
|
static fromHueAndChroma(t, n) {
|
|
912
|
-
let r = new
|
|
922
|
+
let r = new oe(t, n).create();
|
|
913
923
|
return new e(t, n, r);
|
|
914
924
|
}
|
|
915
925
|
constructor(e, t, n) {
|
|
@@ -917,16 +927,16 @@ var B = class e {
|
|
|
917
927
|
}
|
|
918
928
|
tone(e) {
|
|
919
929
|
let t = this.cache.get(e);
|
|
920
|
-
return t === void 0 && (t = e == 99 &&
|
|
930
|
+
return t === void 0 && (t = e == 99 && N.isYellow(this.hue) ? this.averageArgb(this.tone(98), this.tone(100)) : N.from(this.hue, this.chroma, e).toInt(), this.cache.set(e, t)), t;
|
|
921
931
|
}
|
|
922
932
|
getHct(e) {
|
|
923
|
-
return
|
|
933
|
+
return N.fromInt(this.tone(e));
|
|
924
934
|
}
|
|
925
935
|
averageArgb(e, t) {
|
|
926
936
|
let n = e >>> 16 & 255, r = e >>> 8 & 255, i = e & 255, a = t >>> 16 & 255, o = t >>> 8 & 255, s = t & 255, c = Math.round((n + a) / 2), l = Math.round((r + o) / 2), u = Math.round((i + s) / 2);
|
|
927
937
|
return (255 << 24 | (c & 255) << 16 | (l & 255) << 8 | u & 255) >>> 0;
|
|
928
938
|
}
|
|
929
|
-
},
|
|
939
|
+
}, oe = class {
|
|
930
940
|
constructor(e, t) {
|
|
931
941
|
this.hue = e, this.requestedChroma = t, this.chromaCache = /* @__PURE__ */ new Map(), this.maxChromaValue = 200;
|
|
932
942
|
}
|
|
@@ -937,19 +947,19 @@ var B = class e {
|
|
|
937
947
|
if (this.maxChroma(n) >= this.requestedChroma - .01) {
|
|
938
948
|
if (Math.abs(e - 50) < Math.abs(t - 50)) t = n;
|
|
939
949
|
else {
|
|
940
|
-
if (e === n) return
|
|
950
|
+
if (e === n) return N.from(this.hue, this.requestedChroma, e);
|
|
941
951
|
e = n;
|
|
942
952
|
}
|
|
943
953
|
} else r ? e = n + 1 : t = n;
|
|
944
954
|
}
|
|
945
|
-
return
|
|
955
|
+
return N.from(this.hue, this.requestedChroma, e);
|
|
946
956
|
}
|
|
947
957
|
maxChroma(e) {
|
|
948
958
|
if (this.chromaCache.has(e)) return this.chromaCache.get(e);
|
|
949
|
-
let t =
|
|
959
|
+
let t = N.from(this.hue, this.maxChromaValue, e).chroma;
|
|
950
960
|
return this.chromaCache.set(e, t), t;
|
|
951
961
|
}
|
|
952
|
-
},
|
|
962
|
+
}, se = class e {
|
|
953
963
|
constructor(e) {
|
|
954
964
|
this.input = e, this.hctsByTempCache = [], this.hctsByHueCache = [], this.tempsByHctCache = /* @__PURE__ */ new Map(), this.inputRelativeTemperatureCache = -1, this.complementCache = null;
|
|
955
965
|
}
|
|
@@ -1027,7 +1037,7 @@ var B = class e {
|
|
|
1027
1037
|
if (this.hctsByHueCache.length > 0) return this.hctsByHueCache;
|
|
1028
1038
|
let e = [];
|
|
1029
1039
|
for (let t = 0; t <= 360; t += 1) {
|
|
1030
|
-
let n =
|
|
1040
|
+
let n = N.from(t, this.input.chroma, this.input.tone);
|
|
1031
1041
|
e.push(n);
|
|
1032
1042
|
}
|
|
1033
1043
|
return this.hctsByHueCache = e, this.hctsByHueCache;
|
|
@@ -1036,90 +1046,90 @@ var B = class e {
|
|
|
1036
1046
|
return t < n ? t <= e && e <= n : t <= e || e <= n;
|
|
1037
1047
|
}
|
|
1038
1048
|
static rawTemperature(e) {
|
|
1039
|
-
let t =
|
|
1049
|
+
let t = b(e.toInt()), n = a(Math.atan2(t[2], t[1]) * 180 / Math.PI);
|
|
1040
1050
|
return -.5 + .02 * Math.sqrt(t[1] * t[1] + t[2] * t[2]) ** 1.07 * Math.cos(a(n - 50) * Math.PI / 180);
|
|
1041
1051
|
}
|
|
1042
|
-
},
|
|
1052
|
+
}, z = class {
|
|
1043
1053
|
constructor(e, t, n, r) {
|
|
1044
1054
|
this.low = e, this.normal = t, this.medium = n, this.high = r;
|
|
1045
1055
|
}
|
|
1046
1056
|
get(e) {
|
|
1047
1057
|
return e <= -1 ? this.low : e < 0 ? t(this.low, this.normal, (e - -1) / 1) : e < .5 ? t(this.normal, this.medium, (e - 0) / .5) : e < 1 ? t(this.medium, this.high, (e - .5) / .5) : this.high;
|
|
1048
1058
|
}
|
|
1049
|
-
},
|
|
1059
|
+
}, B = class {
|
|
1050
1060
|
constructor(e, t, n, r, i, a) {
|
|
1051
1061
|
this.roleA = e, this.roleB = t, this.delta = n, this.polarity = r, this.stayTogether = i, this.constraint = a, this.constraint = a ?? "exact";
|
|
1052
1062
|
}
|
|
1053
|
-
},
|
|
1063
|
+
}, V;
|
|
1054
1064
|
(function(e) {
|
|
1055
1065
|
e[e.MONOCHROME = 0] = "MONOCHROME", e[e.NEUTRAL = 1] = "NEUTRAL", e[e.TONAL_SPOT = 2] = "TONAL_SPOT", e[e.VIBRANT = 3] = "VIBRANT", e[e.EXPRESSIVE = 4] = "EXPRESSIVE", e[e.FIDELITY = 5] = "FIDELITY", e[e.CONTENT = 6] = "CONTENT", e[e.RAINBOW = 7] = "RAINBOW", e[e.FRUIT_SALAD = 8] = "FRUIT_SALAD";
|
|
1056
|
-
})(
|
|
1066
|
+
})(V ||= {});
|
|
1057
1067
|
//#endregion
|
|
1058
1068
|
//#region node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/dynamiccolor/color_spec_2021.js
|
|
1059
|
-
function
|
|
1060
|
-
return e.variant ===
|
|
1069
|
+
function H(e) {
|
|
1070
|
+
return e.variant === V.FIDELITY || e.variant === V.CONTENT;
|
|
1061
1071
|
}
|
|
1062
|
-
function
|
|
1063
|
-
return e.variant ===
|
|
1072
|
+
function U(e) {
|
|
1073
|
+
return e.variant === V.MONOCHROME;
|
|
1064
1074
|
}
|
|
1065
|
-
function
|
|
1066
|
-
let i = n, a =
|
|
1075
|
+
function ce(e, t, n, r) {
|
|
1076
|
+
let i = n, a = N.from(e, t, n);
|
|
1067
1077
|
if (a.chroma < t) {
|
|
1068
1078
|
let n = a.chroma;
|
|
1069
1079
|
for (; a.chroma < t;) {
|
|
1070
1080
|
i += r ? -1 : 1;
|
|
1071
|
-
let o =
|
|
1081
|
+
let o = N.from(e, t, i);
|
|
1072
1082
|
if (n > o.chroma || Math.abs(o.chroma - t) < .4) break;
|
|
1073
1083
|
Math.abs(o.chroma - t) < Math.abs(a.chroma - t) && (a = o), n = Math.max(n, o.chroma);
|
|
1074
1084
|
}
|
|
1075
1085
|
}
|
|
1076
1086
|
return i;
|
|
1077
1087
|
}
|
|
1078
|
-
var
|
|
1088
|
+
var le = class {
|
|
1079
1089
|
primaryPaletteKeyColor() {
|
|
1080
|
-
return
|
|
1090
|
+
return L.fromPalette({
|
|
1081
1091
|
name: "primary_palette_key_color",
|
|
1082
1092
|
palette: (e) => e.primaryPalette,
|
|
1083
1093
|
tone: (e) => e.primaryPalette.keyColor.tone
|
|
1084
1094
|
});
|
|
1085
1095
|
}
|
|
1086
1096
|
secondaryPaletteKeyColor() {
|
|
1087
|
-
return
|
|
1097
|
+
return L.fromPalette({
|
|
1088
1098
|
name: "secondary_palette_key_color",
|
|
1089
1099
|
palette: (e) => e.secondaryPalette,
|
|
1090
1100
|
tone: (e) => e.secondaryPalette.keyColor.tone
|
|
1091
1101
|
});
|
|
1092
1102
|
}
|
|
1093
1103
|
tertiaryPaletteKeyColor() {
|
|
1094
|
-
return
|
|
1104
|
+
return L.fromPalette({
|
|
1095
1105
|
name: "tertiary_palette_key_color",
|
|
1096
1106
|
palette: (e) => e.tertiaryPalette,
|
|
1097
1107
|
tone: (e) => e.tertiaryPalette.keyColor.tone
|
|
1098
1108
|
});
|
|
1099
1109
|
}
|
|
1100
1110
|
neutralPaletteKeyColor() {
|
|
1101
|
-
return
|
|
1111
|
+
return L.fromPalette({
|
|
1102
1112
|
name: "neutral_palette_key_color",
|
|
1103
1113
|
palette: (e) => e.neutralPalette,
|
|
1104
1114
|
tone: (e) => e.neutralPalette.keyColor.tone
|
|
1105
1115
|
});
|
|
1106
1116
|
}
|
|
1107
1117
|
neutralVariantPaletteKeyColor() {
|
|
1108
|
-
return
|
|
1118
|
+
return L.fromPalette({
|
|
1109
1119
|
name: "neutral_variant_palette_key_color",
|
|
1110
1120
|
palette: (e) => e.neutralVariantPalette,
|
|
1111
1121
|
tone: (e) => e.neutralVariantPalette.keyColor.tone
|
|
1112
1122
|
});
|
|
1113
1123
|
}
|
|
1114
1124
|
errorPaletteKeyColor() {
|
|
1115
|
-
return
|
|
1125
|
+
return L.fromPalette({
|
|
1116
1126
|
name: "error_palette_key_color",
|
|
1117
1127
|
palette: (e) => e.errorPalette,
|
|
1118
1128
|
tone: (e) => e.errorPalette.keyColor.tone
|
|
1119
1129
|
});
|
|
1120
1130
|
}
|
|
1121
1131
|
background() {
|
|
1122
|
-
return
|
|
1132
|
+
return L.fromPalette({
|
|
1123
1133
|
name: "background",
|
|
1124
1134
|
palette: (e) => e.neutralPalette,
|
|
1125
1135
|
tone: (e) => e.isDark ? 6 : 98,
|
|
@@ -1127,16 +1137,16 @@ var re = class {
|
|
|
1127
1137
|
});
|
|
1128
1138
|
}
|
|
1129
1139
|
onBackground() {
|
|
1130
|
-
return
|
|
1140
|
+
return L.fromPalette({
|
|
1131
1141
|
name: "on_background",
|
|
1132
1142
|
palette: (e) => e.neutralPalette,
|
|
1133
1143
|
tone: (e) => e.isDark ? 90 : 10,
|
|
1134
1144
|
background: (e) => this.background(),
|
|
1135
|
-
contrastCurve: (e) => new
|
|
1145
|
+
contrastCurve: (e) => new z(3, 3, 4.5, 7)
|
|
1136
1146
|
});
|
|
1137
1147
|
}
|
|
1138
1148
|
surface() {
|
|
1139
|
-
return
|
|
1149
|
+
return L.fromPalette({
|
|
1140
1150
|
name: "surface",
|
|
1141
1151
|
palette: (e) => e.neutralPalette,
|
|
1142
1152
|
tone: (e) => e.isDark ? 6 : 98,
|
|
@@ -1144,72 +1154,72 @@ var re = class {
|
|
|
1144
1154
|
});
|
|
1145
1155
|
}
|
|
1146
1156
|
surfaceDim() {
|
|
1147
|
-
return
|
|
1157
|
+
return L.fromPalette({
|
|
1148
1158
|
name: "surface_dim",
|
|
1149
1159
|
palette: (e) => e.neutralPalette,
|
|
1150
|
-
tone: (e) => e.isDark ? 6 : new
|
|
1160
|
+
tone: (e) => e.isDark ? 6 : new z(87, 87, 80, 75).get(e.contrastLevel),
|
|
1151
1161
|
isBackground: !0
|
|
1152
1162
|
});
|
|
1153
1163
|
}
|
|
1154
1164
|
surfaceBright() {
|
|
1155
|
-
return
|
|
1165
|
+
return L.fromPalette({
|
|
1156
1166
|
name: "surface_bright",
|
|
1157
1167
|
palette: (e) => e.neutralPalette,
|
|
1158
|
-
tone: (e) => e.isDark ? new
|
|
1168
|
+
tone: (e) => e.isDark ? new z(24, 24, 29, 34).get(e.contrastLevel) : 98,
|
|
1159
1169
|
isBackground: !0
|
|
1160
1170
|
});
|
|
1161
1171
|
}
|
|
1162
1172
|
surfaceContainerLowest() {
|
|
1163
|
-
return
|
|
1173
|
+
return L.fromPalette({
|
|
1164
1174
|
name: "surface_container_lowest",
|
|
1165
1175
|
palette: (e) => e.neutralPalette,
|
|
1166
|
-
tone: (e) => e.isDark ? new
|
|
1176
|
+
tone: (e) => e.isDark ? new z(4, 4, 2, 0).get(e.contrastLevel) : 100,
|
|
1167
1177
|
isBackground: !0
|
|
1168
1178
|
});
|
|
1169
1179
|
}
|
|
1170
1180
|
surfaceContainerLow() {
|
|
1171
|
-
return
|
|
1181
|
+
return L.fromPalette({
|
|
1172
1182
|
name: "surface_container_low",
|
|
1173
1183
|
palette: (e) => e.neutralPalette,
|
|
1174
|
-
tone: (e) => e.isDark ? new
|
|
1184
|
+
tone: (e) => e.isDark ? new z(10, 10, 11, 12).get(e.contrastLevel) : new z(96, 96, 96, 95).get(e.contrastLevel),
|
|
1175
1185
|
isBackground: !0
|
|
1176
1186
|
});
|
|
1177
1187
|
}
|
|
1178
1188
|
surfaceContainer() {
|
|
1179
|
-
return
|
|
1189
|
+
return L.fromPalette({
|
|
1180
1190
|
name: "surface_container",
|
|
1181
1191
|
palette: (e) => e.neutralPalette,
|
|
1182
|
-
tone: (e) => e.isDark ? new
|
|
1192
|
+
tone: (e) => e.isDark ? new z(12, 12, 16, 20).get(e.contrastLevel) : new z(94, 94, 92, 90).get(e.contrastLevel),
|
|
1183
1193
|
isBackground: !0
|
|
1184
1194
|
});
|
|
1185
1195
|
}
|
|
1186
1196
|
surfaceContainerHigh() {
|
|
1187
|
-
return
|
|
1197
|
+
return L.fromPalette({
|
|
1188
1198
|
name: "surface_container_high",
|
|
1189
1199
|
palette: (e) => e.neutralPalette,
|
|
1190
|
-
tone: (e) => e.isDark ? new
|
|
1200
|
+
tone: (e) => e.isDark ? new z(17, 17, 21, 25).get(e.contrastLevel) : new z(92, 92, 88, 85).get(e.contrastLevel),
|
|
1191
1201
|
isBackground: !0
|
|
1192
1202
|
});
|
|
1193
1203
|
}
|
|
1194
1204
|
surfaceContainerHighest() {
|
|
1195
|
-
return
|
|
1205
|
+
return L.fromPalette({
|
|
1196
1206
|
name: "surface_container_highest",
|
|
1197
1207
|
palette: (e) => e.neutralPalette,
|
|
1198
|
-
tone: (e) => e.isDark ? new
|
|
1208
|
+
tone: (e) => e.isDark ? new z(22, 22, 26, 30).get(e.contrastLevel) : new z(90, 90, 84, 80).get(e.contrastLevel),
|
|
1199
1209
|
isBackground: !0
|
|
1200
1210
|
});
|
|
1201
1211
|
}
|
|
1202
1212
|
onSurface() {
|
|
1203
|
-
return
|
|
1213
|
+
return L.fromPalette({
|
|
1204
1214
|
name: "on_surface",
|
|
1205
1215
|
palette: (e) => e.neutralPalette,
|
|
1206
1216
|
tone: (e) => e.isDark ? 90 : 10,
|
|
1207
1217
|
background: (e) => this.highestSurface(e),
|
|
1208
|
-
contrastCurve: (e) => new
|
|
1218
|
+
contrastCurve: (e) => new z(4.5, 7, 11, 21)
|
|
1209
1219
|
});
|
|
1210
1220
|
}
|
|
1211
1221
|
surfaceVariant() {
|
|
1212
|
-
return
|
|
1222
|
+
return L.fromPalette({
|
|
1213
1223
|
name: "surface_variant",
|
|
1214
1224
|
palette: (e) => e.neutralVariantPalette,
|
|
1215
1225
|
tone: (e) => e.isDark ? 30 : 90,
|
|
@@ -1217,16 +1227,16 @@ var re = class {
|
|
|
1217
1227
|
});
|
|
1218
1228
|
}
|
|
1219
1229
|
onSurfaceVariant() {
|
|
1220
|
-
return
|
|
1230
|
+
return L.fromPalette({
|
|
1221
1231
|
name: "on_surface_variant",
|
|
1222
1232
|
palette: (e) => e.neutralVariantPalette,
|
|
1223
1233
|
tone: (e) => e.isDark ? 80 : 30,
|
|
1224
1234
|
background: (e) => this.highestSurface(e),
|
|
1225
|
-
contrastCurve: (e) => new
|
|
1235
|
+
contrastCurve: (e) => new z(3, 4.5, 7, 11)
|
|
1226
1236
|
});
|
|
1227
1237
|
}
|
|
1228
1238
|
inverseSurface() {
|
|
1229
|
-
return
|
|
1239
|
+
return L.fromPalette({
|
|
1230
1240
|
name: "inverse_surface",
|
|
1231
1241
|
palette: (e) => e.neutralPalette,
|
|
1232
1242
|
tone: (e) => e.isDark ? 90 : 20,
|
|
@@ -1234,48 +1244,48 @@ var re = class {
|
|
|
1234
1244
|
});
|
|
1235
1245
|
}
|
|
1236
1246
|
inverseOnSurface() {
|
|
1237
|
-
return
|
|
1247
|
+
return L.fromPalette({
|
|
1238
1248
|
name: "inverse_on_surface",
|
|
1239
1249
|
palette: (e) => e.neutralPalette,
|
|
1240
1250
|
tone: (e) => e.isDark ? 20 : 95,
|
|
1241
1251
|
background: (e) => this.inverseSurface(),
|
|
1242
|
-
contrastCurve: (e) => new
|
|
1252
|
+
contrastCurve: (e) => new z(4.5, 7, 11, 21)
|
|
1243
1253
|
});
|
|
1244
1254
|
}
|
|
1245
1255
|
outline() {
|
|
1246
|
-
return
|
|
1256
|
+
return L.fromPalette({
|
|
1247
1257
|
name: "outline",
|
|
1248
1258
|
palette: (e) => e.neutralVariantPalette,
|
|
1249
1259
|
tone: (e) => e.isDark ? 60 : 50,
|
|
1250
1260
|
background: (e) => this.highestSurface(e),
|
|
1251
|
-
contrastCurve: (e) => new
|
|
1261
|
+
contrastCurve: (e) => new z(1.5, 3, 4.5, 7)
|
|
1252
1262
|
});
|
|
1253
1263
|
}
|
|
1254
1264
|
outlineVariant() {
|
|
1255
|
-
return
|
|
1265
|
+
return L.fromPalette({
|
|
1256
1266
|
name: "outline_variant",
|
|
1257
1267
|
palette: (e) => e.neutralVariantPalette,
|
|
1258
1268
|
tone: (e) => e.isDark ? 30 : 80,
|
|
1259
1269
|
background: (e) => this.highestSurface(e),
|
|
1260
|
-
contrastCurve: (e) => new
|
|
1270
|
+
contrastCurve: (e) => new z(1, 1, 3, 4.5)
|
|
1261
1271
|
});
|
|
1262
1272
|
}
|
|
1263
1273
|
shadow() {
|
|
1264
|
-
return
|
|
1274
|
+
return L.fromPalette({
|
|
1265
1275
|
name: "shadow",
|
|
1266
1276
|
palette: (e) => e.neutralPalette,
|
|
1267
1277
|
tone: (e) => 0
|
|
1268
1278
|
});
|
|
1269
1279
|
}
|
|
1270
1280
|
scrim() {
|
|
1271
|
-
return
|
|
1281
|
+
return L.fromPalette({
|
|
1272
1282
|
name: "scrim",
|
|
1273
1283
|
palette: (e) => e.neutralPalette,
|
|
1274
1284
|
tone: (e) => 0
|
|
1275
1285
|
});
|
|
1276
1286
|
}
|
|
1277
1287
|
surfaceTint() {
|
|
1278
|
-
return
|
|
1288
|
+
return L.fromPalette({
|
|
1279
1289
|
name: "surface_tint",
|
|
1280
1290
|
palette: (e) => e.primaryPalette,
|
|
1281
1291
|
tone: (e) => e.isDark ? 80 : 40,
|
|
@@ -1283,310 +1293,310 @@ var re = class {
|
|
|
1283
1293
|
});
|
|
1284
1294
|
}
|
|
1285
1295
|
primary() {
|
|
1286
|
-
return
|
|
1296
|
+
return L.fromPalette({
|
|
1287
1297
|
name: "primary",
|
|
1288
1298
|
palette: (e) => e.primaryPalette,
|
|
1289
|
-
tone: (e) =>
|
|
1299
|
+
tone: (e) => U(e) ? e.isDark ? 100 : 0 : e.isDark ? 80 : 40,
|
|
1290
1300
|
isBackground: !0,
|
|
1291
1301
|
background: (e) => this.highestSurface(e),
|
|
1292
|
-
contrastCurve: (e) => new
|
|
1293
|
-
toneDeltaPair: (e) => new
|
|
1302
|
+
contrastCurve: (e) => new z(3, 4.5, 7, 7),
|
|
1303
|
+
toneDeltaPair: (e) => new B(this.primaryContainer(), this.primary(), 10, "nearer", !1)
|
|
1294
1304
|
});
|
|
1295
1305
|
}
|
|
1296
1306
|
primaryDim() {}
|
|
1297
1307
|
onPrimary() {
|
|
1298
|
-
return
|
|
1308
|
+
return L.fromPalette({
|
|
1299
1309
|
name: "on_primary",
|
|
1300
1310
|
palette: (e) => e.primaryPalette,
|
|
1301
|
-
tone: (e) =>
|
|
1311
|
+
tone: (e) => U(e) ? e.isDark ? 10 : 90 : e.isDark ? 20 : 100,
|
|
1302
1312
|
background: (e) => this.primary(),
|
|
1303
|
-
contrastCurve: (e) => new
|
|
1313
|
+
contrastCurve: (e) => new z(4.5, 7, 11, 21)
|
|
1304
1314
|
});
|
|
1305
1315
|
}
|
|
1306
1316
|
primaryContainer() {
|
|
1307
|
-
return
|
|
1317
|
+
return L.fromPalette({
|
|
1308
1318
|
name: "primary_container",
|
|
1309
1319
|
palette: (e) => e.primaryPalette,
|
|
1310
|
-
tone: (e) =>
|
|
1320
|
+
tone: (e) => H(e) ? e.sourceColorHct.tone : U(e) ? e.isDark ? 85 : 25 : e.isDark ? 30 : 90,
|
|
1311
1321
|
isBackground: !0,
|
|
1312
1322
|
background: (e) => this.highestSurface(e),
|
|
1313
|
-
contrastCurve: (e) => new
|
|
1314
|
-
toneDeltaPair: (e) => new
|
|
1323
|
+
contrastCurve: (e) => new z(1, 1, 3, 4.5),
|
|
1324
|
+
toneDeltaPair: (e) => new B(this.primaryContainer(), this.primary(), 10, "nearer", !1)
|
|
1315
1325
|
});
|
|
1316
1326
|
}
|
|
1317
1327
|
onPrimaryContainer() {
|
|
1318
|
-
return
|
|
1328
|
+
return L.fromPalette({
|
|
1319
1329
|
name: "on_primary_container",
|
|
1320
1330
|
palette: (e) => e.primaryPalette,
|
|
1321
|
-
tone: (e) =>
|
|
1331
|
+
tone: (e) => H(e) ? L.foregroundTone(this.primaryContainer().tone(e), 4.5) : U(e) ? e.isDark ? 0 : 100 : e.isDark ? 90 : 30,
|
|
1322
1332
|
background: (e) => this.primaryContainer(),
|
|
1323
|
-
contrastCurve: (e) => new
|
|
1333
|
+
contrastCurve: (e) => new z(3, 4.5, 7, 11)
|
|
1324
1334
|
});
|
|
1325
1335
|
}
|
|
1326
1336
|
inversePrimary() {
|
|
1327
|
-
return
|
|
1337
|
+
return L.fromPalette({
|
|
1328
1338
|
name: "inverse_primary",
|
|
1329
1339
|
palette: (e) => e.primaryPalette,
|
|
1330
1340
|
tone: (e) => e.isDark ? 40 : 80,
|
|
1331
1341
|
background: (e) => this.inverseSurface(),
|
|
1332
|
-
contrastCurve: (e) => new
|
|
1342
|
+
contrastCurve: (e) => new z(3, 4.5, 7, 7)
|
|
1333
1343
|
});
|
|
1334
1344
|
}
|
|
1335
1345
|
secondary() {
|
|
1336
|
-
return
|
|
1346
|
+
return L.fromPalette({
|
|
1337
1347
|
name: "secondary",
|
|
1338
1348
|
palette: (e) => e.secondaryPalette,
|
|
1339
1349
|
tone: (e) => e.isDark ? 80 : 40,
|
|
1340
1350
|
isBackground: !0,
|
|
1341
1351
|
background: (e) => this.highestSurface(e),
|
|
1342
|
-
contrastCurve: (e) => new
|
|
1343
|
-
toneDeltaPair: (e) => new
|
|
1352
|
+
contrastCurve: (e) => new z(3, 4.5, 7, 7),
|
|
1353
|
+
toneDeltaPair: (e) => new B(this.secondaryContainer(), this.secondary(), 10, "nearer", !1)
|
|
1344
1354
|
});
|
|
1345
1355
|
}
|
|
1346
1356
|
secondaryDim() {}
|
|
1347
1357
|
onSecondary() {
|
|
1348
|
-
return
|
|
1358
|
+
return L.fromPalette({
|
|
1349
1359
|
name: "on_secondary",
|
|
1350
1360
|
palette: (e) => e.secondaryPalette,
|
|
1351
|
-
tone: (e) =>
|
|
1361
|
+
tone: (e) => U(e) ? e.isDark ? 10 : 100 : e.isDark ? 20 : 100,
|
|
1352
1362
|
background: (e) => this.secondary(),
|
|
1353
|
-
contrastCurve: (e) => new
|
|
1363
|
+
contrastCurve: (e) => new z(4.5, 7, 11, 21)
|
|
1354
1364
|
});
|
|
1355
1365
|
}
|
|
1356
1366
|
secondaryContainer() {
|
|
1357
|
-
return
|
|
1367
|
+
return L.fromPalette({
|
|
1358
1368
|
name: "secondary_container",
|
|
1359
1369
|
palette: (e) => e.secondaryPalette,
|
|
1360
1370
|
tone: (e) => {
|
|
1361
1371
|
let t = e.isDark ? 30 : 90;
|
|
1362
|
-
return
|
|
1372
|
+
return U(e) ? e.isDark ? 30 : 85 : H(e) ? ce(e.secondaryPalette.hue, e.secondaryPalette.chroma, t, !e.isDark) : t;
|
|
1363
1373
|
},
|
|
1364
1374
|
isBackground: !0,
|
|
1365
1375
|
background: (e) => this.highestSurface(e),
|
|
1366
|
-
contrastCurve: (e) => new
|
|
1367
|
-
toneDeltaPair: (e) => new
|
|
1376
|
+
contrastCurve: (e) => new z(1, 1, 3, 4.5),
|
|
1377
|
+
toneDeltaPair: (e) => new B(this.secondaryContainer(), this.secondary(), 10, "nearer", !1)
|
|
1368
1378
|
});
|
|
1369
1379
|
}
|
|
1370
1380
|
onSecondaryContainer() {
|
|
1371
|
-
return
|
|
1381
|
+
return L.fromPalette({
|
|
1372
1382
|
name: "on_secondary_container",
|
|
1373
1383
|
palette: (e) => e.secondaryPalette,
|
|
1374
|
-
tone: (e) =>
|
|
1384
|
+
tone: (e) => U(e) ? e.isDark ? 90 : 10 : H(e) ? L.foregroundTone(this.secondaryContainer().tone(e), 4.5) : e.isDark ? 90 : 30,
|
|
1375
1385
|
background: (e) => this.secondaryContainer(),
|
|
1376
|
-
contrastCurve: (e) => new
|
|
1386
|
+
contrastCurve: (e) => new z(3, 4.5, 7, 11)
|
|
1377
1387
|
});
|
|
1378
1388
|
}
|
|
1379
1389
|
tertiary() {
|
|
1380
|
-
return
|
|
1390
|
+
return L.fromPalette({
|
|
1381
1391
|
name: "tertiary",
|
|
1382
1392
|
palette: (e) => e.tertiaryPalette,
|
|
1383
|
-
tone: (e) =>
|
|
1393
|
+
tone: (e) => U(e) ? e.isDark ? 90 : 25 : e.isDark ? 80 : 40,
|
|
1384
1394
|
isBackground: !0,
|
|
1385
1395
|
background: (e) => this.highestSurface(e),
|
|
1386
|
-
contrastCurve: (e) => new
|
|
1387
|
-
toneDeltaPair: (e) => new
|
|
1396
|
+
contrastCurve: (e) => new z(3, 4.5, 7, 7),
|
|
1397
|
+
toneDeltaPair: (e) => new B(this.tertiaryContainer(), this.tertiary(), 10, "nearer", !1)
|
|
1388
1398
|
});
|
|
1389
1399
|
}
|
|
1390
1400
|
tertiaryDim() {}
|
|
1391
1401
|
onTertiary() {
|
|
1392
|
-
return
|
|
1402
|
+
return L.fromPalette({
|
|
1393
1403
|
name: "on_tertiary",
|
|
1394
1404
|
palette: (e) => e.tertiaryPalette,
|
|
1395
|
-
tone: (e) =>
|
|
1405
|
+
tone: (e) => U(e) ? e.isDark ? 10 : 90 : e.isDark ? 20 : 100,
|
|
1396
1406
|
background: (e) => this.tertiary(),
|
|
1397
|
-
contrastCurve: (e) => new
|
|
1407
|
+
contrastCurve: (e) => new z(4.5, 7, 11, 21)
|
|
1398
1408
|
});
|
|
1399
1409
|
}
|
|
1400
1410
|
tertiaryContainer() {
|
|
1401
|
-
return
|
|
1411
|
+
return L.fromPalette({
|
|
1402
1412
|
name: "tertiary_container",
|
|
1403
1413
|
palette: (e) => e.tertiaryPalette,
|
|
1404
1414
|
tone: (e) => {
|
|
1405
|
-
if (
|
|
1406
|
-
if (!
|
|
1415
|
+
if (U(e)) return e.isDark ? 60 : 49;
|
|
1416
|
+
if (!H(e)) return e.isDark ? 30 : 90;
|
|
1407
1417
|
let t = e.tertiaryPalette.getHct(e.sourceColorHct.tone);
|
|
1408
|
-
return
|
|
1418
|
+
return F.fixIfDisliked(t).tone;
|
|
1409
1419
|
},
|
|
1410
1420
|
isBackground: !0,
|
|
1411
1421
|
background: (e) => this.highestSurface(e),
|
|
1412
|
-
contrastCurve: (e) => new
|
|
1413
|
-
toneDeltaPair: (e) => new
|
|
1422
|
+
contrastCurve: (e) => new z(1, 1, 3, 4.5),
|
|
1423
|
+
toneDeltaPair: (e) => new B(this.tertiaryContainer(), this.tertiary(), 10, "nearer", !1)
|
|
1414
1424
|
});
|
|
1415
1425
|
}
|
|
1416
1426
|
onTertiaryContainer() {
|
|
1417
|
-
return
|
|
1427
|
+
return L.fromPalette({
|
|
1418
1428
|
name: "on_tertiary_container",
|
|
1419
1429
|
palette: (e) => e.tertiaryPalette,
|
|
1420
|
-
tone: (e) =>
|
|
1430
|
+
tone: (e) => U(e) ? e.isDark ? 0 : 100 : H(e) ? L.foregroundTone(this.tertiaryContainer().tone(e), 4.5) : e.isDark ? 90 : 30,
|
|
1421
1431
|
background: (e) => this.tertiaryContainer(),
|
|
1422
|
-
contrastCurve: (e) => new
|
|
1432
|
+
contrastCurve: (e) => new z(3, 4.5, 7, 11)
|
|
1423
1433
|
});
|
|
1424
1434
|
}
|
|
1425
1435
|
error() {
|
|
1426
|
-
return
|
|
1436
|
+
return L.fromPalette({
|
|
1427
1437
|
name: "error",
|
|
1428
1438
|
palette: (e) => e.errorPalette,
|
|
1429
1439
|
tone: (e) => e.isDark ? 80 : 40,
|
|
1430
1440
|
isBackground: !0,
|
|
1431
1441
|
background: (e) => this.highestSurface(e),
|
|
1432
|
-
contrastCurve: (e) => new
|
|
1433
|
-
toneDeltaPair: (e) => new
|
|
1442
|
+
contrastCurve: (e) => new z(3, 4.5, 7, 7),
|
|
1443
|
+
toneDeltaPair: (e) => new B(this.errorContainer(), this.error(), 10, "nearer", !1)
|
|
1434
1444
|
});
|
|
1435
1445
|
}
|
|
1436
1446
|
errorDim() {}
|
|
1437
1447
|
onError() {
|
|
1438
|
-
return
|
|
1448
|
+
return L.fromPalette({
|
|
1439
1449
|
name: "on_error",
|
|
1440
1450
|
palette: (e) => e.errorPalette,
|
|
1441
1451
|
tone: (e) => e.isDark ? 20 : 100,
|
|
1442
1452
|
background: (e) => this.error(),
|
|
1443
|
-
contrastCurve: (e) => new
|
|
1453
|
+
contrastCurve: (e) => new z(4.5, 7, 11, 21)
|
|
1444
1454
|
});
|
|
1445
1455
|
}
|
|
1446
1456
|
errorContainer() {
|
|
1447
|
-
return
|
|
1457
|
+
return L.fromPalette({
|
|
1448
1458
|
name: "error_container",
|
|
1449
1459
|
palette: (e) => e.errorPalette,
|
|
1450
1460
|
tone: (e) => e.isDark ? 30 : 90,
|
|
1451
1461
|
isBackground: !0,
|
|
1452
1462
|
background: (e) => this.highestSurface(e),
|
|
1453
|
-
contrastCurve: (e) => new
|
|
1454
|
-
toneDeltaPair: (e) => new
|
|
1463
|
+
contrastCurve: (e) => new z(1, 1, 3, 4.5),
|
|
1464
|
+
toneDeltaPair: (e) => new B(this.errorContainer(), this.error(), 10, "nearer", !1)
|
|
1455
1465
|
});
|
|
1456
1466
|
}
|
|
1457
1467
|
onErrorContainer() {
|
|
1458
|
-
return
|
|
1468
|
+
return L.fromPalette({
|
|
1459
1469
|
name: "on_error_container",
|
|
1460
1470
|
palette: (e) => e.errorPalette,
|
|
1461
|
-
tone: (e) =>
|
|
1471
|
+
tone: (e) => U(e) ? e.isDark ? 90 : 10 : e.isDark ? 90 : 30,
|
|
1462
1472
|
background: (e) => this.errorContainer(),
|
|
1463
|
-
contrastCurve: (e) => new
|
|
1473
|
+
contrastCurve: (e) => new z(3, 4.5, 7, 11)
|
|
1464
1474
|
});
|
|
1465
1475
|
}
|
|
1466
1476
|
primaryFixed() {
|
|
1467
|
-
return
|
|
1477
|
+
return L.fromPalette({
|
|
1468
1478
|
name: "primary_fixed",
|
|
1469
1479
|
palette: (e) => e.primaryPalette,
|
|
1470
|
-
tone: (e) =>
|
|
1480
|
+
tone: (e) => U(e) ? 40 : 90,
|
|
1471
1481
|
isBackground: !0,
|
|
1472
1482
|
background: (e) => this.highestSurface(e),
|
|
1473
|
-
contrastCurve: (e) => new
|
|
1474
|
-
toneDeltaPair: (e) => new
|
|
1483
|
+
contrastCurve: (e) => new z(1, 1, 3, 4.5),
|
|
1484
|
+
toneDeltaPair: (e) => new B(this.primaryFixed(), this.primaryFixedDim(), 10, "lighter", !0)
|
|
1475
1485
|
});
|
|
1476
1486
|
}
|
|
1477
1487
|
primaryFixedDim() {
|
|
1478
|
-
return
|
|
1488
|
+
return L.fromPalette({
|
|
1479
1489
|
name: "primary_fixed_dim",
|
|
1480
1490
|
palette: (e) => e.primaryPalette,
|
|
1481
|
-
tone: (e) =>
|
|
1491
|
+
tone: (e) => U(e) ? 30 : 80,
|
|
1482
1492
|
isBackground: !0,
|
|
1483
1493
|
background: (e) => this.highestSurface(e),
|
|
1484
|
-
contrastCurve: (e) => new
|
|
1485
|
-
toneDeltaPair: (e) => new
|
|
1494
|
+
contrastCurve: (e) => new z(1, 1, 3, 4.5),
|
|
1495
|
+
toneDeltaPair: (e) => new B(this.primaryFixed(), this.primaryFixedDim(), 10, "lighter", !0)
|
|
1486
1496
|
});
|
|
1487
1497
|
}
|
|
1488
1498
|
onPrimaryFixed() {
|
|
1489
|
-
return
|
|
1499
|
+
return L.fromPalette({
|
|
1490
1500
|
name: "on_primary_fixed",
|
|
1491
1501
|
palette: (e) => e.primaryPalette,
|
|
1492
|
-
tone: (e) =>
|
|
1502
|
+
tone: (e) => U(e) ? 100 : 10,
|
|
1493
1503
|
background: (e) => this.primaryFixedDim(),
|
|
1494
1504
|
secondBackground: (e) => this.primaryFixed(),
|
|
1495
|
-
contrastCurve: (e) => new
|
|
1505
|
+
contrastCurve: (e) => new z(4.5, 7, 11, 21)
|
|
1496
1506
|
});
|
|
1497
1507
|
}
|
|
1498
1508
|
onPrimaryFixedVariant() {
|
|
1499
|
-
return
|
|
1509
|
+
return L.fromPalette({
|
|
1500
1510
|
name: "on_primary_fixed_variant",
|
|
1501
1511
|
palette: (e) => e.primaryPalette,
|
|
1502
|
-
tone: (e) =>
|
|
1512
|
+
tone: (e) => U(e) ? 90 : 30,
|
|
1503
1513
|
background: (e) => this.primaryFixedDim(),
|
|
1504
1514
|
secondBackground: (e) => this.primaryFixed(),
|
|
1505
|
-
contrastCurve: (e) => new
|
|
1515
|
+
contrastCurve: (e) => new z(3, 4.5, 7, 11)
|
|
1506
1516
|
});
|
|
1507
1517
|
}
|
|
1508
1518
|
secondaryFixed() {
|
|
1509
|
-
return
|
|
1519
|
+
return L.fromPalette({
|
|
1510
1520
|
name: "secondary_fixed",
|
|
1511
1521
|
palette: (e) => e.secondaryPalette,
|
|
1512
|
-
tone: (e) =>
|
|
1522
|
+
tone: (e) => U(e) ? 80 : 90,
|
|
1513
1523
|
isBackground: !0,
|
|
1514
1524
|
background: (e) => this.highestSurface(e),
|
|
1515
|
-
contrastCurve: (e) => new
|
|
1516
|
-
toneDeltaPair: (e) => new
|
|
1525
|
+
contrastCurve: (e) => new z(1, 1, 3, 4.5),
|
|
1526
|
+
toneDeltaPair: (e) => new B(this.secondaryFixed(), this.secondaryFixedDim(), 10, "lighter", !0)
|
|
1517
1527
|
});
|
|
1518
1528
|
}
|
|
1519
1529
|
secondaryFixedDim() {
|
|
1520
|
-
return
|
|
1530
|
+
return L.fromPalette({
|
|
1521
1531
|
name: "secondary_fixed_dim",
|
|
1522
1532
|
palette: (e) => e.secondaryPalette,
|
|
1523
|
-
tone: (e) =>
|
|
1533
|
+
tone: (e) => U(e) ? 70 : 80,
|
|
1524
1534
|
isBackground: !0,
|
|
1525
1535
|
background: (e) => this.highestSurface(e),
|
|
1526
|
-
contrastCurve: (e) => new
|
|
1527
|
-
toneDeltaPair: (e) => new
|
|
1536
|
+
contrastCurve: (e) => new z(1, 1, 3, 4.5),
|
|
1537
|
+
toneDeltaPair: (e) => new B(this.secondaryFixed(), this.secondaryFixedDim(), 10, "lighter", !0)
|
|
1528
1538
|
});
|
|
1529
1539
|
}
|
|
1530
1540
|
onSecondaryFixed() {
|
|
1531
|
-
return
|
|
1541
|
+
return L.fromPalette({
|
|
1532
1542
|
name: "on_secondary_fixed",
|
|
1533
1543
|
palette: (e) => e.secondaryPalette,
|
|
1534
1544
|
tone: (e) => 10,
|
|
1535
1545
|
background: (e) => this.secondaryFixedDim(),
|
|
1536
1546
|
secondBackground: (e) => this.secondaryFixed(),
|
|
1537
|
-
contrastCurve: (e) => new
|
|
1547
|
+
contrastCurve: (e) => new z(4.5, 7, 11, 21)
|
|
1538
1548
|
});
|
|
1539
1549
|
}
|
|
1540
1550
|
onSecondaryFixedVariant() {
|
|
1541
|
-
return
|
|
1551
|
+
return L.fromPalette({
|
|
1542
1552
|
name: "on_secondary_fixed_variant",
|
|
1543
1553
|
palette: (e) => e.secondaryPalette,
|
|
1544
|
-
tone: (e) =>
|
|
1554
|
+
tone: (e) => U(e) ? 25 : 30,
|
|
1545
1555
|
background: (e) => this.secondaryFixedDim(),
|
|
1546
1556
|
secondBackground: (e) => this.secondaryFixed(),
|
|
1547
|
-
contrastCurve: (e) => new
|
|
1557
|
+
contrastCurve: (e) => new z(3, 4.5, 7, 11)
|
|
1548
1558
|
});
|
|
1549
1559
|
}
|
|
1550
1560
|
tertiaryFixed() {
|
|
1551
|
-
return
|
|
1561
|
+
return L.fromPalette({
|
|
1552
1562
|
name: "tertiary_fixed",
|
|
1553
1563
|
palette: (e) => e.tertiaryPalette,
|
|
1554
|
-
tone: (e) =>
|
|
1564
|
+
tone: (e) => U(e) ? 40 : 90,
|
|
1555
1565
|
isBackground: !0,
|
|
1556
1566
|
background: (e) => this.highestSurface(e),
|
|
1557
|
-
contrastCurve: (e) => new
|
|
1558
|
-
toneDeltaPair: (e) => new
|
|
1567
|
+
contrastCurve: (e) => new z(1, 1, 3, 4.5),
|
|
1568
|
+
toneDeltaPair: (e) => new B(this.tertiaryFixed(), this.tertiaryFixedDim(), 10, "lighter", !0)
|
|
1559
1569
|
});
|
|
1560
1570
|
}
|
|
1561
1571
|
tertiaryFixedDim() {
|
|
1562
|
-
return
|
|
1572
|
+
return L.fromPalette({
|
|
1563
1573
|
name: "tertiary_fixed_dim",
|
|
1564
1574
|
palette: (e) => e.tertiaryPalette,
|
|
1565
|
-
tone: (e) =>
|
|
1575
|
+
tone: (e) => U(e) ? 30 : 80,
|
|
1566
1576
|
isBackground: !0,
|
|
1567
1577
|
background: (e) => this.highestSurface(e),
|
|
1568
|
-
contrastCurve: (e) => new
|
|
1569
|
-
toneDeltaPair: (e) => new
|
|
1578
|
+
contrastCurve: (e) => new z(1, 1, 3, 4.5),
|
|
1579
|
+
toneDeltaPair: (e) => new B(this.tertiaryFixed(), this.tertiaryFixedDim(), 10, "lighter", !0)
|
|
1570
1580
|
});
|
|
1571
1581
|
}
|
|
1572
1582
|
onTertiaryFixed() {
|
|
1573
|
-
return
|
|
1583
|
+
return L.fromPalette({
|
|
1574
1584
|
name: "on_tertiary_fixed",
|
|
1575
1585
|
palette: (e) => e.tertiaryPalette,
|
|
1576
|
-
tone: (e) =>
|
|
1586
|
+
tone: (e) => U(e) ? 100 : 10,
|
|
1577
1587
|
background: (e) => this.tertiaryFixedDim(),
|
|
1578
1588
|
secondBackground: (e) => this.tertiaryFixed(),
|
|
1579
|
-
contrastCurve: (e) => new
|
|
1589
|
+
contrastCurve: (e) => new z(4.5, 7, 11, 21)
|
|
1580
1590
|
});
|
|
1581
1591
|
}
|
|
1582
1592
|
onTertiaryFixedVariant() {
|
|
1583
|
-
return
|
|
1593
|
+
return L.fromPalette({
|
|
1584
1594
|
name: "on_tertiary_fixed_variant",
|
|
1585
1595
|
palette: (e) => e.tertiaryPalette,
|
|
1586
|
-
tone: (e) =>
|
|
1596
|
+
tone: (e) => U(e) ? 90 : 30,
|
|
1587
1597
|
background: (e) => this.tertiaryFixedDim(),
|
|
1588
1598
|
secondBackground: (e) => this.tertiaryFixed(),
|
|
1589
|
-
contrastCurve: (e) => new
|
|
1599
|
+
contrastCurve: (e) => new z(3, 4.5, 7, 11)
|
|
1590
1600
|
});
|
|
1591
1601
|
}
|
|
1592
1602
|
highestSurface(e) {
|
|
@@ -1595,285 +1605,285 @@ var re = class {
|
|
|
1595
1605
|
};
|
|
1596
1606
|
//#endregion
|
|
1597
1607
|
//#region node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/dynamiccolor/color_spec_2025.js
|
|
1598
|
-
function
|
|
1599
|
-
return r(t, n,
|
|
1608
|
+
function W(e, t = 0, n = 100, i = 1) {
|
|
1609
|
+
return r(t, n, ue(e.hue, e.chroma * i, 100, !0));
|
|
1600
1610
|
}
|
|
1601
|
-
function
|
|
1602
|
-
return r(t, n,
|
|
1611
|
+
function G(e, t = 0, n = 100) {
|
|
1612
|
+
return r(t, n, ue(e.hue, e.chroma, 0, !1));
|
|
1603
1613
|
}
|
|
1604
|
-
function
|
|
1605
|
-
let i = n, a =
|
|
1614
|
+
function ue(e, t, n, r) {
|
|
1615
|
+
let i = n, a = N.from(e, t, i);
|
|
1606
1616
|
for (; a.chroma < t && !(n < 0 || n > 100);) {
|
|
1607
1617
|
n += r ? -1 : 1;
|
|
1608
|
-
let o =
|
|
1618
|
+
let o = N.from(e, t, n);
|
|
1609
1619
|
a.chroma < o.chroma && (a = o, i = n);
|
|
1610
1620
|
}
|
|
1611
1621
|
return i;
|
|
1612
1622
|
}
|
|
1613
|
-
function
|
|
1614
|
-
return e === 1.5 ? new
|
|
1623
|
+
function K(e) {
|
|
1624
|
+
return e === 1.5 ? new z(1.5, 1.5, 3, 5.5) : e === 3 ? new z(3, 3, 4.5, 7) : e === 4.5 ? new z(4.5, 4.5, 7, 11) : e === 6 ? new z(6, 6, 7, 11) : e === 7 ? new z(7, 7, 11, 21) : e === 9 ? new z(9, 9, 11, 21) : e === 11 ? new z(11, 11, 21, 21) : e === 21 ? new z(21, 21, 21, 21) : new z(e, e, 7, 21);
|
|
1615
1625
|
}
|
|
1616
|
-
var
|
|
1626
|
+
var de = class extends le {
|
|
1617
1627
|
surface() {
|
|
1618
|
-
let e =
|
|
1628
|
+
let e = L.fromPalette({
|
|
1619
1629
|
name: "surface",
|
|
1620
1630
|
palette: (e) => e.neutralPalette,
|
|
1621
|
-
tone: (e) => (super.surface().tone(e), e.platform === "phone" ? e.isDark ? 4 :
|
|
1631
|
+
tone: (e) => (super.surface().tone(e), e.platform === "phone" ? e.isDark ? 4 : N.isYellow(e.neutralPalette.hue) ? 99 : e.variant === V.VIBRANT ? 97 : 98 : 0),
|
|
1622
1632
|
isBackground: !0
|
|
1623
1633
|
});
|
|
1624
|
-
return
|
|
1634
|
+
return I(super.surface(), "2025", e);
|
|
1625
1635
|
}
|
|
1626
1636
|
surfaceDim() {
|
|
1627
|
-
let e =
|
|
1637
|
+
let e = L.fromPalette({
|
|
1628
1638
|
name: "surface_dim",
|
|
1629
1639
|
palette: (e) => e.neutralPalette,
|
|
1630
|
-
tone: (e) => e.isDark ? 4 :
|
|
1640
|
+
tone: (e) => e.isDark ? 4 : N.isYellow(e.neutralPalette.hue) ? 90 : e.variant === V.VIBRANT ? 85 : 87,
|
|
1631
1641
|
isBackground: !0,
|
|
1632
1642
|
chromaMultiplier: (e) => {
|
|
1633
1643
|
if (!e.isDark) {
|
|
1634
|
-
if (e.variant ===
|
|
1635
|
-
if (e.variant ===
|
|
1636
|
-
if (e.variant ===
|
|
1637
|
-
if (e.variant ===
|
|
1644
|
+
if (e.variant === V.NEUTRAL) return 2.5;
|
|
1645
|
+
if (e.variant === V.TONAL_SPOT) return 1.7;
|
|
1646
|
+
if (e.variant === V.EXPRESSIVE) return N.isYellow(e.neutralPalette.hue) ? 2.7 : 1.75;
|
|
1647
|
+
if (e.variant === V.VIBRANT) return 1.36;
|
|
1638
1648
|
}
|
|
1639
1649
|
return 1;
|
|
1640
1650
|
}
|
|
1641
1651
|
});
|
|
1642
|
-
return
|
|
1652
|
+
return I(super.surfaceDim(), "2025", e);
|
|
1643
1653
|
}
|
|
1644
1654
|
surfaceBright() {
|
|
1645
|
-
let e =
|
|
1655
|
+
let e = L.fromPalette({
|
|
1646
1656
|
name: "surface_bright",
|
|
1647
1657
|
palette: (e) => e.neutralPalette,
|
|
1648
|
-
tone: (e) => e.isDark ? 18 :
|
|
1658
|
+
tone: (e) => e.isDark ? 18 : N.isYellow(e.neutralPalette.hue) ? 99 : e.variant === V.VIBRANT ? 97 : 98,
|
|
1649
1659
|
isBackground: !0,
|
|
1650
1660
|
chromaMultiplier: (e) => {
|
|
1651
1661
|
if (e.isDark) {
|
|
1652
|
-
if (e.variant ===
|
|
1653
|
-
if (e.variant ===
|
|
1654
|
-
if (e.variant ===
|
|
1655
|
-
if (e.variant ===
|
|
1662
|
+
if (e.variant === V.NEUTRAL) return 2.5;
|
|
1663
|
+
if (e.variant === V.TONAL_SPOT) return 1.7;
|
|
1664
|
+
if (e.variant === V.EXPRESSIVE) return N.isYellow(e.neutralPalette.hue) ? 2.7 : 1.75;
|
|
1665
|
+
if (e.variant === V.VIBRANT) return 1.36;
|
|
1656
1666
|
}
|
|
1657
1667
|
return 1;
|
|
1658
1668
|
}
|
|
1659
1669
|
});
|
|
1660
|
-
return
|
|
1670
|
+
return I(super.surfaceBright(), "2025", e);
|
|
1661
1671
|
}
|
|
1662
1672
|
surfaceContainerLowest() {
|
|
1663
|
-
let e =
|
|
1673
|
+
let e = L.fromPalette({
|
|
1664
1674
|
name: "surface_container_lowest",
|
|
1665
1675
|
palette: (e) => e.neutralPalette,
|
|
1666
1676
|
tone: (e) => e.isDark ? 0 : 100,
|
|
1667
1677
|
isBackground: !0
|
|
1668
1678
|
});
|
|
1669
|
-
return
|
|
1679
|
+
return I(super.surfaceContainerLowest(), "2025", e);
|
|
1670
1680
|
}
|
|
1671
1681
|
surfaceContainerLow() {
|
|
1672
|
-
let e =
|
|
1682
|
+
let e = L.fromPalette({
|
|
1673
1683
|
name: "surface_container_low",
|
|
1674
1684
|
palette: (e) => e.neutralPalette,
|
|
1675
|
-
tone: (e) => e.platform === "phone" ? e.isDark ? 6 :
|
|
1685
|
+
tone: (e) => e.platform === "phone" ? e.isDark ? 6 : N.isYellow(e.neutralPalette.hue) ? 98 : e.variant === V.VIBRANT ? 95 : 96 : 15,
|
|
1676
1686
|
isBackground: !0,
|
|
1677
1687
|
chromaMultiplier: (e) => {
|
|
1678
1688
|
if (e.platform === "phone") {
|
|
1679
|
-
if (e.variant ===
|
|
1680
|
-
if (e.variant ===
|
|
1681
|
-
if (e.variant ===
|
|
1682
|
-
if (e.variant ===
|
|
1689
|
+
if (e.variant === V.NEUTRAL) return 1.3;
|
|
1690
|
+
if (e.variant === V.TONAL_SPOT) return 1.25;
|
|
1691
|
+
if (e.variant === V.EXPRESSIVE) return N.isYellow(e.neutralPalette.hue) ? 1.3 : 1.15;
|
|
1692
|
+
if (e.variant === V.VIBRANT) return 1.08;
|
|
1683
1693
|
}
|
|
1684
1694
|
return 1;
|
|
1685
1695
|
}
|
|
1686
1696
|
});
|
|
1687
|
-
return
|
|
1697
|
+
return I(super.surfaceContainerLow(), "2025", e);
|
|
1688
1698
|
}
|
|
1689
1699
|
surfaceContainer() {
|
|
1690
|
-
let e =
|
|
1700
|
+
let e = L.fromPalette({
|
|
1691
1701
|
name: "surface_container",
|
|
1692
1702
|
palette: (e) => e.neutralPalette,
|
|
1693
|
-
tone: (e) => e.platform === "phone" ? e.isDark ? 9 :
|
|
1703
|
+
tone: (e) => e.platform === "phone" ? e.isDark ? 9 : N.isYellow(e.neutralPalette.hue) ? 96 : e.variant === V.VIBRANT ? 92 : 94 : 20,
|
|
1694
1704
|
isBackground: !0,
|
|
1695
1705
|
chromaMultiplier: (e) => {
|
|
1696
1706
|
if (e.platform === "phone") {
|
|
1697
|
-
if (e.variant ===
|
|
1698
|
-
if (e.variant ===
|
|
1699
|
-
if (e.variant ===
|
|
1700
|
-
if (e.variant ===
|
|
1707
|
+
if (e.variant === V.NEUTRAL) return 1.6;
|
|
1708
|
+
if (e.variant === V.TONAL_SPOT) return 1.4;
|
|
1709
|
+
if (e.variant === V.EXPRESSIVE) return N.isYellow(e.neutralPalette.hue) ? 1.6 : 1.3;
|
|
1710
|
+
if (e.variant === V.VIBRANT) return 1.15;
|
|
1701
1711
|
}
|
|
1702
1712
|
return 1;
|
|
1703
1713
|
}
|
|
1704
1714
|
});
|
|
1705
|
-
return
|
|
1715
|
+
return I(super.surfaceContainer(), "2025", e);
|
|
1706
1716
|
}
|
|
1707
1717
|
surfaceContainerHigh() {
|
|
1708
|
-
let e =
|
|
1718
|
+
let e = L.fromPalette({
|
|
1709
1719
|
name: "surface_container_high",
|
|
1710
1720
|
palette: (e) => e.neutralPalette,
|
|
1711
|
-
tone: (e) => e.platform === "phone" ? e.isDark ? 12 :
|
|
1721
|
+
tone: (e) => e.platform === "phone" ? e.isDark ? 12 : N.isYellow(e.neutralPalette.hue) ? 94 : e.variant === V.VIBRANT ? 90 : 92 : 25,
|
|
1712
1722
|
isBackground: !0,
|
|
1713
1723
|
chromaMultiplier: (e) => {
|
|
1714
1724
|
if (e.platform === "phone") {
|
|
1715
|
-
if (e.variant ===
|
|
1716
|
-
if (e.variant ===
|
|
1717
|
-
if (e.variant ===
|
|
1718
|
-
if (e.variant ===
|
|
1725
|
+
if (e.variant === V.NEUTRAL) return 1.9;
|
|
1726
|
+
if (e.variant === V.TONAL_SPOT) return 1.5;
|
|
1727
|
+
if (e.variant === V.EXPRESSIVE) return N.isYellow(e.neutralPalette.hue) ? 1.95 : 1.45;
|
|
1728
|
+
if (e.variant === V.VIBRANT) return 1.22;
|
|
1719
1729
|
}
|
|
1720
1730
|
return 1;
|
|
1721
1731
|
}
|
|
1722
1732
|
});
|
|
1723
|
-
return
|
|
1733
|
+
return I(super.surfaceContainerHigh(), "2025", e);
|
|
1724
1734
|
}
|
|
1725
1735
|
surfaceContainerHighest() {
|
|
1726
|
-
let e =
|
|
1736
|
+
let e = L.fromPalette({
|
|
1727
1737
|
name: "surface_container_highest",
|
|
1728
1738
|
palette: (e) => e.neutralPalette,
|
|
1729
|
-
tone: (e) => e.isDark ? 15 :
|
|
1739
|
+
tone: (e) => e.isDark ? 15 : N.isYellow(e.neutralPalette.hue) ? 92 : e.variant === V.VIBRANT ? 88 : 90,
|
|
1730
1740
|
isBackground: !0,
|
|
1731
|
-
chromaMultiplier: (e) => e.variant ===
|
|
1741
|
+
chromaMultiplier: (e) => e.variant === V.NEUTRAL ? 2.2 : e.variant === V.TONAL_SPOT ? 1.7 : e.variant === V.EXPRESSIVE ? N.isYellow(e.neutralPalette.hue) ? 2.3 : 1.6 : e.variant === V.VIBRANT ? 1.29 : 1
|
|
1732
1742
|
});
|
|
1733
|
-
return
|
|
1743
|
+
return I(super.surfaceContainerHighest(), "2025", e);
|
|
1734
1744
|
}
|
|
1735
1745
|
onSurface() {
|
|
1736
|
-
let e =
|
|
1746
|
+
let e = L.fromPalette({
|
|
1737
1747
|
name: "on_surface",
|
|
1738
1748
|
palette: (e) => e.neutralPalette,
|
|
1739
|
-
tone: (e) => e.variant ===
|
|
1749
|
+
tone: (e) => e.variant === V.VIBRANT ? W(e.neutralPalette, 0, 100, 1.1) : L.getInitialToneFromBackground((e) => e.platform === "phone" ? this.highestSurface(e) : this.surfaceContainerHigh())(e),
|
|
1740
1750
|
chromaMultiplier: (e) => {
|
|
1741
1751
|
if (e.platform === "phone") {
|
|
1742
|
-
if (e.variant ===
|
|
1743
|
-
if (e.variant ===
|
|
1744
|
-
if (e.variant ===
|
|
1752
|
+
if (e.variant === V.NEUTRAL) return 2.2;
|
|
1753
|
+
if (e.variant === V.TONAL_SPOT) return 1.7;
|
|
1754
|
+
if (e.variant === V.EXPRESSIVE) return N.isYellow(e.neutralPalette.hue) ? e.isDark ? 3 : 2.3 : 1.6;
|
|
1745
1755
|
}
|
|
1746
1756
|
return 1;
|
|
1747
1757
|
},
|
|
1748
1758
|
background: (e) => e.platform === "phone" ? this.highestSurface(e) : this.surfaceContainerHigh(),
|
|
1749
|
-
contrastCurve: (e) => e.isDark && e.platform === "phone" ?
|
|
1759
|
+
contrastCurve: (e) => e.isDark && e.platform === "phone" ? K(11) : K(9)
|
|
1750
1760
|
});
|
|
1751
|
-
return
|
|
1761
|
+
return I(super.onSurface(), "2025", e);
|
|
1752
1762
|
}
|
|
1753
1763
|
onSurfaceVariant() {
|
|
1754
|
-
let e =
|
|
1764
|
+
let e = L.fromPalette({
|
|
1755
1765
|
name: "on_surface_variant",
|
|
1756
1766
|
palette: (e) => e.neutralPalette,
|
|
1757
1767
|
chromaMultiplier: (e) => {
|
|
1758
1768
|
if (e.platform === "phone") {
|
|
1759
|
-
if (e.variant ===
|
|
1760
|
-
if (e.variant ===
|
|
1761
|
-
if (e.variant ===
|
|
1769
|
+
if (e.variant === V.NEUTRAL) return 2.2;
|
|
1770
|
+
if (e.variant === V.TONAL_SPOT) return 1.7;
|
|
1771
|
+
if (e.variant === V.EXPRESSIVE) return N.isYellow(e.neutralPalette.hue) ? e.isDark ? 3 : 2.3 : 1.6;
|
|
1762
1772
|
}
|
|
1763
1773
|
return 1;
|
|
1764
1774
|
},
|
|
1765
1775
|
background: (e) => e.platform === "phone" ? this.highestSurface(e) : this.surfaceContainerHigh(),
|
|
1766
|
-
contrastCurve: (e) => e.platform === "phone" ? e.isDark ?
|
|
1776
|
+
contrastCurve: (e) => e.platform === "phone" ? e.isDark ? K(6) : K(4.5) : K(7)
|
|
1767
1777
|
});
|
|
1768
|
-
return
|
|
1778
|
+
return I(super.onSurfaceVariant(), "2025", e);
|
|
1769
1779
|
}
|
|
1770
1780
|
outline() {
|
|
1771
|
-
let e =
|
|
1781
|
+
let e = L.fromPalette({
|
|
1772
1782
|
name: "outline",
|
|
1773
1783
|
palette: (e) => e.neutralPalette,
|
|
1774
1784
|
chromaMultiplier: (e) => {
|
|
1775
1785
|
if (e.platform === "phone") {
|
|
1776
|
-
if (e.variant ===
|
|
1777
|
-
if (e.variant ===
|
|
1778
|
-
if (e.variant ===
|
|
1786
|
+
if (e.variant === V.NEUTRAL) return 2.2;
|
|
1787
|
+
if (e.variant === V.TONAL_SPOT) return 1.7;
|
|
1788
|
+
if (e.variant === V.EXPRESSIVE) return N.isYellow(e.neutralPalette.hue) ? e.isDark ? 3 : 2.3 : 1.6;
|
|
1779
1789
|
}
|
|
1780
1790
|
return 1;
|
|
1781
1791
|
},
|
|
1782
1792
|
background: (e) => e.platform === "phone" ? this.highestSurface(e) : this.surfaceContainerHigh(),
|
|
1783
|
-
contrastCurve: (e) => e.platform === "phone" ?
|
|
1793
|
+
contrastCurve: (e) => e.platform === "phone" ? K(3) : K(4.5)
|
|
1784
1794
|
});
|
|
1785
|
-
return
|
|
1795
|
+
return I(super.outline(), "2025", e);
|
|
1786
1796
|
}
|
|
1787
1797
|
outlineVariant() {
|
|
1788
|
-
let e =
|
|
1798
|
+
let e = L.fromPalette({
|
|
1789
1799
|
name: "outline_variant",
|
|
1790
1800
|
palette: (e) => e.neutralPalette,
|
|
1791
1801
|
chromaMultiplier: (e) => {
|
|
1792
1802
|
if (e.platform === "phone") {
|
|
1793
|
-
if (e.variant ===
|
|
1794
|
-
if (e.variant ===
|
|
1795
|
-
if (e.variant ===
|
|
1803
|
+
if (e.variant === V.NEUTRAL) return 2.2;
|
|
1804
|
+
if (e.variant === V.TONAL_SPOT) return 1.7;
|
|
1805
|
+
if (e.variant === V.EXPRESSIVE) return N.isYellow(e.neutralPalette.hue) ? e.isDark ? 3 : 2.3 : 1.6;
|
|
1796
1806
|
}
|
|
1797
1807
|
return 1;
|
|
1798
1808
|
},
|
|
1799
1809
|
background: (e) => e.platform === "phone" ? this.highestSurface(e) : this.surfaceContainerHigh(),
|
|
1800
|
-
contrastCurve: (e) => e.platform === "phone" ?
|
|
1810
|
+
contrastCurve: (e) => e.platform === "phone" ? K(1.5) : K(3)
|
|
1801
1811
|
});
|
|
1802
|
-
return
|
|
1812
|
+
return I(super.outlineVariant(), "2025", e);
|
|
1803
1813
|
}
|
|
1804
1814
|
inverseSurface() {
|
|
1805
|
-
let e =
|
|
1815
|
+
let e = L.fromPalette({
|
|
1806
1816
|
name: "inverse_surface",
|
|
1807
1817
|
palette: (e) => e.neutralPalette,
|
|
1808
1818
|
tone: (e) => e.isDark ? 98 : 4,
|
|
1809
1819
|
isBackground: !0
|
|
1810
1820
|
});
|
|
1811
|
-
return
|
|
1821
|
+
return I(super.inverseSurface(), "2025", e);
|
|
1812
1822
|
}
|
|
1813
1823
|
inverseOnSurface() {
|
|
1814
|
-
let e =
|
|
1824
|
+
let e = L.fromPalette({
|
|
1815
1825
|
name: "inverse_on_surface",
|
|
1816
1826
|
palette: (e) => e.neutralPalette,
|
|
1817
1827
|
background: (e) => this.inverseSurface(),
|
|
1818
|
-
contrastCurve: (e) =>
|
|
1828
|
+
contrastCurve: (e) => K(7)
|
|
1819
1829
|
});
|
|
1820
|
-
return
|
|
1830
|
+
return I(super.inverseOnSurface(), "2025", e);
|
|
1821
1831
|
}
|
|
1822
1832
|
primary() {
|
|
1823
|
-
let e =
|
|
1833
|
+
let e = L.fromPalette({
|
|
1824
1834
|
name: "primary",
|
|
1825
1835
|
palette: (e) => e.primaryPalette,
|
|
1826
|
-
tone: (e) => e.variant ===
|
|
1836
|
+
tone: (e) => e.variant === V.NEUTRAL ? e.platform === "phone" ? e.isDark ? 80 : 40 : 90 : e.variant === V.TONAL_SPOT ? e.platform === "phone" ? e.isDark ? 80 : W(e.primaryPalette) : W(e.primaryPalette, 0, 90) : e.variant === V.EXPRESSIVE ? e.platform === "phone" ? W(e.primaryPalette, 0, N.isYellow(e.primaryPalette.hue) ? 25 : N.isCyan(e.primaryPalette.hue) ? 88 : 98) : W(e.primaryPalette) : e.platform === "phone" ? W(e.primaryPalette, 0, N.isCyan(e.primaryPalette.hue) ? 88 : 98) : W(e.primaryPalette),
|
|
1827
1837
|
isBackground: !0,
|
|
1828
1838
|
background: (e) => e.platform === "phone" ? this.highestSurface(e) : this.surfaceContainerHigh(),
|
|
1829
|
-
contrastCurve: (e) => e.platform === "phone" ?
|
|
1830
|
-
toneDeltaPair: (e) => e.platform === "phone" ? new
|
|
1839
|
+
contrastCurve: (e) => e.platform === "phone" ? K(4.5) : K(7),
|
|
1840
|
+
toneDeltaPair: (e) => e.platform === "phone" ? new B(this.primaryContainer(), this.primary(), 5, "relative_lighter", !0, "farther") : void 0
|
|
1831
1841
|
});
|
|
1832
|
-
return
|
|
1842
|
+
return I(super.primary(), "2025", e);
|
|
1833
1843
|
}
|
|
1834
1844
|
primaryDim() {
|
|
1835
|
-
return
|
|
1845
|
+
return L.fromPalette({
|
|
1836
1846
|
name: "primary_dim",
|
|
1837
1847
|
palette: (e) => e.primaryPalette,
|
|
1838
|
-
tone: (e) => e.variant ===
|
|
1848
|
+
tone: (e) => e.variant === V.NEUTRAL ? 85 : e.variant === V.TONAL_SPOT ? W(e.primaryPalette, 0, 90) : W(e.primaryPalette),
|
|
1839
1849
|
isBackground: !0,
|
|
1840
1850
|
background: (e) => this.surfaceContainerHigh(),
|
|
1841
|
-
contrastCurve: (e) =>
|
|
1842
|
-
toneDeltaPair: (e) => new
|
|
1851
|
+
contrastCurve: (e) => K(4.5),
|
|
1852
|
+
toneDeltaPair: (e) => new B(this.primaryDim(), this.primary(), 5, "darker", !0, "farther")
|
|
1843
1853
|
});
|
|
1844
1854
|
}
|
|
1845
1855
|
onPrimary() {
|
|
1846
|
-
let e =
|
|
1856
|
+
let e = L.fromPalette({
|
|
1847
1857
|
name: "on_primary",
|
|
1848
1858
|
palette: (e) => e.primaryPalette,
|
|
1849
1859
|
background: (e) => e.platform === "phone" ? this.primary() : this.primaryDim(),
|
|
1850
|
-
contrastCurve: (e) => e.platform === "phone" ?
|
|
1860
|
+
contrastCurve: (e) => e.platform === "phone" ? K(6) : K(7)
|
|
1851
1861
|
});
|
|
1852
|
-
return
|
|
1862
|
+
return I(super.onPrimary(), "2025", e);
|
|
1853
1863
|
}
|
|
1854
1864
|
primaryContainer() {
|
|
1855
|
-
let e =
|
|
1865
|
+
let e = L.fromPalette({
|
|
1856
1866
|
name: "primary_container",
|
|
1857
1867
|
palette: (e) => e.primaryPalette,
|
|
1858
|
-
tone: (e) => e.platform === "watch" ? 30 : e.variant ===
|
|
1868
|
+
tone: (e) => e.platform === "watch" ? 30 : e.variant === V.NEUTRAL ? e.isDark ? 30 : 90 : e.variant === V.TONAL_SPOT ? e.isDark ? G(e.primaryPalette, 35, 93) : W(e.primaryPalette, 0, 90) : e.variant === V.EXPRESSIVE ? e.isDark ? W(e.primaryPalette, 30, 93) : W(e.primaryPalette, 78, N.isCyan(e.primaryPalette.hue) ? 88 : 90) : e.isDark ? G(e.primaryPalette, 66, 93) : W(e.primaryPalette, 66, N.isCyan(e.primaryPalette.hue) ? 88 : 93),
|
|
1859
1869
|
isBackground: !0,
|
|
1860
1870
|
background: (e) => e.platform === "phone" ? this.highestSurface(e) : void 0,
|
|
1861
|
-
toneDeltaPair: (e) => e.platform === "phone" ? void 0 : new
|
|
1862
|
-
contrastCurve: (e) => e.platform === "phone" && e.contrastLevel > 0 ?
|
|
1871
|
+
toneDeltaPair: (e) => e.platform === "phone" ? void 0 : new B(this.primaryContainer(), this.primaryDim(), 10, "darker", !0, "farther"),
|
|
1872
|
+
contrastCurve: (e) => e.platform === "phone" && e.contrastLevel > 0 ? K(1.5) : void 0
|
|
1863
1873
|
});
|
|
1864
|
-
return
|
|
1874
|
+
return I(super.primaryContainer(), "2025", e);
|
|
1865
1875
|
}
|
|
1866
1876
|
onPrimaryContainer() {
|
|
1867
|
-
let e =
|
|
1877
|
+
let e = L.fromPalette({
|
|
1868
1878
|
name: "on_primary_container",
|
|
1869
1879
|
palette: (e) => e.primaryPalette,
|
|
1870
1880
|
background: (e) => this.primaryContainer(),
|
|
1871
|
-
contrastCurve: (e) => e.platform === "phone" ?
|
|
1881
|
+
contrastCurve: (e) => e.platform === "phone" ? K(6) : K(7)
|
|
1872
1882
|
});
|
|
1873
|
-
return
|
|
1883
|
+
return I(super.onPrimaryContainer(), "2025", e);
|
|
1874
1884
|
}
|
|
1875
1885
|
primaryFixed() {
|
|
1876
|
-
let e =
|
|
1886
|
+
let e = L.fromPalette({
|
|
1877
1887
|
name: "primary_fixed",
|
|
1878
1888
|
palette: (e) => e.primaryPalette,
|
|
1879
1889
|
tone: (e) => {
|
|
@@ -1885,103 +1895,103 @@ var ae = class extends re {
|
|
|
1885
1895
|
},
|
|
1886
1896
|
isBackground: !0,
|
|
1887
1897
|
background: (e) => e.platform === "phone" ? this.highestSurface(e) : void 0,
|
|
1888
|
-
contrastCurve: (e) => e.platform === "phone" && e.contrastLevel > 0 ?
|
|
1898
|
+
contrastCurve: (e) => e.platform === "phone" && e.contrastLevel > 0 ? K(1.5) : void 0
|
|
1889
1899
|
});
|
|
1890
|
-
return
|
|
1900
|
+
return I(super.primaryFixed(), "2025", e);
|
|
1891
1901
|
}
|
|
1892
1902
|
primaryFixedDim() {
|
|
1893
|
-
let e =
|
|
1903
|
+
let e = L.fromPalette({
|
|
1894
1904
|
name: "primary_fixed_dim",
|
|
1895
1905
|
palette: (e) => e.primaryPalette,
|
|
1896
1906
|
tone: (e) => this.primaryFixed().getTone(e),
|
|
1897
1907
|
isBackground: !0,
|
|
1898
|
-
toneDeltaPair: (e) => new
|
|
1908
|
+
toneDeltaPair: (e) => new B(this.primaryFixedDim(), this.primaryFixed(), 5, "darker", !0, "exact")
|
|
1899
1909
|
});
|
|
1900
|
-
return
|
|
1910
|
+
return I(super.primaryFixedDim(), "2025", e);
|
|
1901
1911
|
}
|
|
1902
1912
|
onPrimaryFixed() {
|
|
1903
|
-
let e =
|
|
1913
|
+
let e = L.fromPalette({
|
|
1904
1914
|
name: "on_primary_fixed",
|
|
1905
1915
|
palette: (e) => e.primaryPalette,
|
|
1906
1916
|
background: (e) => this.primaryFixedDim(),
|
|
1907
|
-
contrastCurve: (e) =>
|
|
1917
|
+
contrastCurve: (e) => K(7)
|
|
1908
1918
|
});
|
|
1909
|
-
return
|
|
1919
|
+
return I(super.onPrimaryFixed(), "2025", e);
|
|
1910
1920
|
}
|
|
1911
1921
|
onPrimaryFixedVariant() {
|
|
1912
|
-
let e =
|
|
1922
|
+
let e = L.fromPalette({
|
|
1913
1923
|
name: "on_primary_fixed_variant",
|
|
1914
1924
|
palette: (e) => e.primaryPalette,
|
|
1915
1925
|
background: (e) => this.primaryFixedDim(),
|
|
1916
|
-
contrastCurve: (e) =>
|
|
1926
|
+
contrastCurve: (e) => K(4.5)
|
|
1917
1927
|
});
|
|
1918
|
-
return
|
|
1928
|
+
return I(super.onPrimaryFixedVariant(), "2025", e);
|
|
1919
1929
|
}
|
|
1920
1930
|
inversePrimary() {
|
|
1921
|
-
let e =
|
|
1931
|
+
let e = L.fromPalette({
|
|
1922
1932
|
name: "inverse_primary",
|
|
1923
1933
|
palette: (e) => e.primaryPalette,
|
|
1924
|
-
tone: (e) =>
|
|
1934
|
+
tone: (e) => W(e.primaryPalette),
|
|
1925
1935
|
background: (e) => this.inverseSurface(),
|
|
1926
|
-
contrastCurve: (e) => e.platform === "phone" ?
|
|
1936
|
+
contrastCurve: (e) => e.platform === "phone" ? K(6) : K(7)
|
|
1927
1937
|
});
|
|
1928
|
-
return
|
|
1938
|
+
return I(super.inversePrimary(), "2025", e);
|
|
1929
1939
|
}
|
|
1930
1940
|
secondary() {
|
|
1931
|
-
let e =
|
|
1941
|
+
let e = L.fromPalette({
|
|
1932
1942
|
name: "secondary",
|
|
1933
1943
|
palette: (e) => e.secondaryPalette,
|
|
1934
|
-
tone: (e) => e.platform === "watch" ? e.variant ===
|
|
1944
|
+
tone: (e) => e.platform === "watch" ? e.variant === V.NEUTRAL ? 90 : W(e.secondaryPalette, 0, 90) : e.variant === V.NEUTRAL ? e.isDark ? G(e.secondaryPalette, 0, 98) : W(e.secondaryPalette) : e.variant === V.VIBRANT ? W(e.secondaryPalette, 0, e.isDark ? 90 : 98) : e.isDark ? 80 : W(e.secondaryPalette),
|
|
1935
1945
|
isBackground: !0,
|
|
1936
1946
|
background: (e) => e.platform === "phone" ? this.highestSurface(e) : this.surfaceContainerHigh(),
|
|
1937
|
-
contrastCurve: (e) => e.platform === "phone" ?
|
|
1938
|
-
toneDeltaPair: (e) => e.platform === "phone" ? new
|
|
1947
|
+
contrastCurve: (e) => e.platform === "phone" ? K(4.5) : K(7),
|
|
1948
|
+
toneDeltaPair: (e) => e.platform === "phone" ? new B(this.secondaryContainer(), this.secondary(), 5, "relative_lighter", !0, "farther") : void 0
|
|
1939
1949
|
});
|
|
1940
|
-
return
|
|
1950
|
+
return I(super.secondary(), "2025", e);
|
|
1941
1951
|
}
|
|
1942
1952
|
secondaryDim() {
|
|
1943
|
-
return
|
|
1953
|
+
return L.fromPalette({
|
|
1944
1954
|
name: "secondary_dim",
|
|
1945
1955
|
palette: (e) => e.secondaryPalette,
|
|
1946
|
-
tone: (e) => e.variant ===
|
|
1956
|
+
tone: (e) => e.variant === V.NEUTRAL ? 85 : W(e.secondaryPalette, 0, 90),
|
|
1947
1957
|
isBackground: !0,
|
|
1948
1958
|
background: (e) => this.surfaceContainerHigh(),
|
|
1949
|
-
contrastCurve: (e) =>
|
|
1950
|
-
toneDeltaPair: (e) => new
|
|
1959
|
+
contrastCurve: (e) => K(4.5),
|
|
1960
|
+
toneDeltaPair: (e) => new B(this.secondaryDim(), this.secondary(), 5, "darker", !0, "farther")
|
|
1951
1961
|
});
|
|
1952
1962
|
}
|
|
1953
1963
|
onSecondary() {
|
|
1954
|
-
let e =
|
|
1964
|
+
let e = L.fromPalette({
|
|
1955
1965
|
name: "on_secondary",
|
|
1956
1966
|
palette: (e) => e.secondaryPalette,
|
|
1957
1967
|
background: (e) => e.platform === "phone" ? this.secondary() : this.secondaryDim(),
|
|
1958
|
-
contrastCurve: (e) => e.platform === "phone" ?
|
|
1968
|
+
contrastCurve: (e) => e.platform === "phone" ? K(6) : K(7)
|
|
1959
1969
|
});
|
|
1960
|
-
return
|
|
1970
|
+
return I(super.onSecondary(), "2025", e);
|
|
1961
1971
|
}
|
|
1962
1972
|
secondaryContainer() {
|
|
1963
|
-
let e =
|
|
1973
|
+
let e = L.fromPalette({
|
|
1964
1974
|
name: "secondary_container",
|
|
1965
1975
|
palette: (e) => e.secondaryPalette,
|
|
1966
|
-
tone: (e) => e.platform === "watch" ? 30 : e.variant ===
|
|
1976
|
+
tone: (e) => e.platform === "watch" ? 30 : e.variant === V.VIBRANT ? e.isDark ? G(e.secondaryPalette, 30, 40) : W(e.secondaryPalette, 84, 90) : e.variant === V.EXPRESSIVE ? e.isDark ? 15 : W(e.secondaryPalette, 90, 95) : e.isDark ? 25 : 90,
|
|
1967
1977
|
isBackground: !0,
|
|
1968
1978
|
background: (e) => e.platform === "phone" ? this.highestSurface(e) : void 0,
|
|
1969
|
-
toneDeltaPair: (e) => e.platform === "watch" ? new
|
|
1970
|
-
contrastCurve: (e) => e.platform === "phone" && e.contrastLevel > 0 ?
|
|
1979
|
+
toneDeltaPair: (e) => e.platform === "watch" ? new B(this.secondaryContainer(), this.secondaryDim(), 10, "darker", !0, "farther") : void 0,
|
|
1980
|
+
contrastCurve: (e) => e.platform === "phone" && e.contrastLevel > 0 ? K(1.5) : void 0
|
|
1971
1981
|
});
|
|
1972
|
-
return
|
|
1982
|
+
return I(super.secondaryContainer(), "2025", e);
|
|
1973
1983
|
}
|
|
1974
1984
|
onSecondaryContainer() {
|
|
1975
|
-
let e =
|
|
1985
|
+
let e = L.fromPalette({
|
|
1976
1986
|
name: "on_secondary_container",
|
|
1977
1987
|
palette: (e) => e.secondaryPalette,
|
|
1978
1988
|
background: (e) => this.secondaryContainer(),
|
|
1979
|
-
contrastCurve: (e) => e.platform === "phone" ?
|
|
1989
|
+
contrastCurve: (e) => e.platform === "phone" ? K(6) : K(7)
|
|
1980
1990
|
});
|
|
1981
|
-
return
|
|
1991
|
+
return I(super.onSecondaryContainer(), "2025", e);
|
|
1982
1992
|
}
|
|
1983
1993
|
secondaryFixed() {
|
|
1984
|
-
let e =
|
|
1994
|
+
let e = L.fromPalette({
|
|
1985
1995
|
name: "secondary_fixed",
|
|
1986
1996
|
palette: (e) => e.secondaryPalette,
|
|
1987
1997
|
tone: (e) => {
|
|
@@ -1993,93 +2003,93 @@ var ae = class extends re {
|
|
|
1993
2003
|
},
|
|
1994
2004
|
isBackground: !0,
|
|
1995
2005
|
background: (e) => e.platform === "phone" ? this.highestSurface(e) : void 0,
|
|
1996
|
-
contrastCurve: (e) => e.platform === "phone" && e.contrastLevel > 0 ?
|
|
2006
|
+
contrastCurve: (e) => e.platform === "phone" && e.contrastLevel > 0 ? K(1.5) : void 0
|
|
1997
2007
|
});
|
|
1998
|
-
return
|
|
2008
|
+
return I(super.secondaryFixed(), "2025", e);
|
|
1999
2009
|
}
|
|
2000
2010
|
secondaryFixedDim() {
|
|
2001
|
-
let e =
|
|
2011
|
+
let e = L.fromPalette({
|
|
2002
2012
|
name: "secondary_fixed_dim",
|
|
2003
2013
|
palette: (e) => e.secondaryPalette,
|
|
2004
2014
|
tone: (e) => this.secondaryFixed().getTone(e),
|
|
2005
2015
|
isBackground: !0,
|
|
2006
|
-
toneDeltaPair: (e) => new
|
|
2016
|
+
toneDeltaPair: (e) => new B(this.secondaryFixedDim(), this.secondaryFixed(), 5, "darker", !0, "exact")
|
|
2007
2017
|
});
|
|
2008
|
-
return
|
|
2018
|
+
return I(super.secondaryFixedDim(), "2025", e);
|
|
2009
2019
|
}
|
|
2010
2020
|
onSecondaryFixed() {
|
|
2011
|
-
let e =
|
|
2021
|
+
let e = L.fromPalette({
|
|
2012
2022
|
name: "on_secondary_fixed",
|
|
2013
2023
|
palette: (e) => e.secondaryPalette,
|
|
2014
2024
|
background: (e) => this.secondaryFixedDim(),
|
|
2015
|
-
contrastCurve: (e) =>
|
|
2025
|
+
contrastCurve: (e) => K(7)
|
|
2016
2026
|
});
|
|
2017
|
-
return
|
|
2027
|
+
return I(super.onSecondaryFixed(), "2025", e);
|
|
2018
2028
|
}
|
|
2019
2029
|
onSecondaryFixedVariant() {
|
|
2020
|
-
let e =
|
|
2030
|
+
let e = L.fromPalette({
|
|
2021
2031
|
name: "on_secondary_fixed_variant",
|
|
2022
2032
|
palette: (e) => e.secondaryPalette,
|
|
2023
2033
|
background: (e) => this.secondaryFixedDim(),
|
|
2024
|
-
contrastCurve: (e) =>
|
|
2034
|
+
contrastCurve: (e) => K(4.5)
|
|
2025
2035
|
});
|
|
2026
|
-
return
|
|
2036
|
+
return I(super.onSecondaryFixedVariant(), "2025", e);
|
|
2027
2037
|
}
|
|
2028
2038
|
tertiary() {
|
|
2029
|
-
let e =
|
|
2039
|
+
let e = L.fromPalette({
|
|
2030
2040
|
name: "tertiary",
|
|
2031
2041
|
palette: (e) => e.tertiaryPalette,
|
|
2032
|
-
tone: (e) => e.platform === "watch" ? e.variant ===
|
|
2042
|
+
tone: (e) => e.platform === "watch" ? e.variant === V.TONAL_SPOT ? W(e.tertiaryPalette, 0, 90) : W(e.tertiaryPalette) : e.variant === V.EXPRESSIVE || e.variant === V.VIBRANT ? W(e.tertiaryPalette, 0, N.isCyan(e.tertiaryPalette.hue) ? 88 : e.isDark ? 98 : 100) : e.isDark ? W(e.tertiaryPalette, 0, 98) : W(e.tertiaryPalette),
|
|
2033
2043
|
isBackground: !0,
|
|
2034
2044
|
background: (e) => e.platform === "phone" ? this.highestSurface(e) : this.surfaceContainerHigh(),
|
|
2035
|
-
contrastCurve: (e) => e.platform === "phone" ?
|
|
2036
|
-
toneDeltaPair: (e) => e.platform === "phone" ? new
|
|
2045
|
+
contrastCurve: (e) => e.platform === "phone" ? K(4.5) : K(7),
|
|
2046
|
+
toneDeltaPair: (e) => e.platform === "phone" ? new B(this.tertiaryContainer(), this.tertiary(), 5, "relative_lighter", !0, "farther") : void 0
|
|
2037
2047
|
});
|
|
2038
|
-
return
|
|
2048
|
+
return I(super.tertiary(), "2025", e);
|
|
2039
2049
|
}
|
|
2040
2050
|
tertiaryDim() {
|
|
2041
|
-
return
|
|
2051
|
+
return L.fromPalette({
|
|
2042
2052
|
name: "tertiary_dim",
|
|
2043
2053
|
palette: (e) => e.tertiaryPalette,
|
|
2044
|
-
tone: (e) => e.variant ===
|
|
2054
|
+
tone: (e) => e.variant === V.TONAL_SPOT ? W(e.tertiaryPalette, 0, 90) : W(e.tertiaryPalette),
|
|
2045
2055
|
isBackground: !0,
|
|
2046
2056
|
background: (e) => this.surfaceContainerHigh(),
|
|
2047
|
-
contrastCurve: (e) =>
|
|
2048
|
-
toneDeltaPair: (e) => new
|
|
2057
|
+
contrastCurve: (e) => K(4.5),
|
|
2058
|
+
toneDeltaPair: (e) => new B(this.tertiaryDim(), this.tertiary(), 5, "darker", !0, "farther")
|
|
2049
2059
|
});
|
|
2050
2060
|
}
|
|
2051
2061
|
onTertiary() {
|
|
2052
|
-
let e =
|
|
2062
|
+
let e = L.fromPalette({
|
|
2053
2063
|
name: "on_tertiary",
|
|
2054
2064
|
palette: (e) => e.tertiaryPalette,
|
|
2055
2065
|
background: (e) => e.platform === "phone" ? this.tertiary() : this.tertiaryDim(),
|
|
2056
|
-
contrastCurve: (e) => e.platform === "phone" ?
|
|
2066
|
+
contrastCurve: (e) => e.platform === "phone" ? K(6) : K(7)
|
|
2057
2067
|
});
|
|
2058
|
-
return
|
|
2068
|
+
return I(super.onTertiary(), "2025", e);
|
|
2059
2069
|
}
|
|
2060
2070
|
tertiaryContainer() {
|
|
2061
|
-
let e =
|
|
2071
|
+
let e = L.fromPalette({
|
|
2062
2072
|
name: "tertiary_container",
|
|
2063
2073
|
palette: (e) => e.tertiaryPalette,
|
|
2064
|
-
tone: (e) => e.platform === "watch" ? e.variant ===
|
|
2074
|
+
tone: (e) => e.platform === "watch" ? e.variant === V.TONAL_SPOT ? W(e.tertiaryPalette, 0, 90) : W(e.tertiaryPalette) : e.variant === V.NEUTRAL ? e.isDark ? W(e.tertiaryPalette, 0, 93) : W(e.tertiaryPalette, 0, 96) : e.variant === V.TONAL_SPOT ? W(e.tertiaryPalette, 0, e.isDark ? 93 : 100) : e.variant === V.EXPRESSIVE ? W(e.tertiaryPalette, 75, N.isCyan(e.tertiaryPalette.hue) ? 88 : e.isDark ? 93 : 100) : e.isDark ? W(e.tertiaryPalette, 0, 93) : W(e.tertiaryPalette, 72, 100),
|
|
2065
2075
|
isBackground: !0,
|
|
2066
2076
|
background: (e) => e.platform === "phone" ? this.highestSurface(e) : void 0,
|
|
2067
|
-
toneDeltaPair: (e) => e.platform === "watch" ? new
|
|
2068
|
-
contrastCurve: (e) => e.platform === "phone" && e.contrastLevel > 0 ?
|
|
2077
|
+
toneDeltaPair: (e) => e.platform === "watch" ? new B(this.tertiaryContainer(), this.tertiaryDim(), 10, "darker", !0, "farther") : void 0,
|
|
2078
|
+
contrastCurve: (e) => e.platform === "phone" && e.contrastLevel > 0 ? K(1.5) : void 0
|
|
2069
2079
|
});
|
|
2070
|
-
return
|
|
2080
|
+
return I(super.tertiaryContainer(), "2025", e);
|
|
2071
2081
|
}
|
|
2072
2082
|
onTertiaryContainer() {
|
|
2073
|
-
let e =
|
|
2083
|
+
let e = L.fromPalette({
|
|
2074
2084
|
name: "on_tertiary_container",
|
|
2075
2085
|
palette: (e) => e.tertiaryPalette,
|
|
2076
2086
|
background: (e) => this.tertiaryContainer(),
|
|
2077
|
-
contrastCurve: (e) => e.platform === "phone" ?
|
|
2087
|
+
contrastCurve: (e) => e.platform === "phone" ? K(6) : K(7)
|
|
2078
2088
|
});
|
|
2079
|
-
return
|
|
2089
|
+
return I(super.onTertiaryContainer(), "2025", e);
|
|
2080
2090
|
}
|
|
2081
2091
|
tertiaryFixed() {
|
|
2082
|
-
let e =
|
|
2092
|
+
let e = L.fromPalette({
|
|
2083
2093
|
name: "tertiary_fixed",
|
|
2084
2094
|
palette: (e) => e.tertiaryPalette,
|
|
2085
2095
|
tone: (e) => {
|
|
@@ -2091,111 +2101,111 @@ var ae = class extends re {
|
|
|
2091
2101
|
},
|
|
2092
2102
|
isBackground: !0,
|
|
2093
2103
|
background: (e) => e.platform === "phone" ? this.highestSurface(e) : void 0,
|
|
2094
|
-
contrastCurve: (e) => e.platform === "phone" && e.contrastLevel > 0 ?
|
|
2104
|
+
contrastCurve: (e) => e.platform === "phone" && e.contrastLevel > 0 ? K(1.5) : void 0
|
|
2095
2105
|
});
|
|
2096
|
-
return
|
|
2106
|
+
return I(super.tertiaryFixed(), "2025", e);
|
|
2097
2107
|
}
|
|
2098
2108
|
tertiaryFixedDim() {
|
|
2099
|
-
let e =
|
|
2109
|
+
let e = L.fromPalette({
|
|
2100
2110
|
name: "tertiary_fixed_dim",
|
|
2101
2111
|
palette: (e) => e.tertiaryPalette,
|
|
2102
2112
|
tone: (e) => this.tertiaryFixed().getTone(e),
|
|
2103
2113
|
isBackground: !0,
|
|
2104
|
-
toneDeltaPair: (e) => new
|
|
2114
|
+
toneDeltaPair: (e) => new B(this.tertiaryFixedDim(), this.tertiaryFixed(), 5, "darker", !0, "exact")
|
|
2105
2115
|
});
|
|
2106
|
-
return
|
|
2116
|
+
return I(super.tertiaryFixedDim(), "2025", e);
|
|
2107
2117
|
}
|
|
2108
2118
|
onTertiaryFixed() {
|
|
2109
|
-
let e =
|
|
2119
|
+
let e = L.fromPalette({
|
|
2110
2120
|
name: "on_tertiary_fixed",
|
|
2111
2121
|
palette: (e) => e.tertiaryPalette,
|
|
2112
2122
|
background: (e) => this.tertiaryFixedDim(),
|
|
2113
|
-
contrastCurve: (e) =>
|
|
2123
|
+
contrastCurve: (e) => K(7)
|
|
2114
2124
|
});
|
|
2115
|
-
return
|
|
2125
|
+
return I(super.onTertiaryFixed(), "2025", e);
|
|
2116
2126
|
}
|
|
2117
2127
|
onTertiaryFixedVariant() {
|
|
2118
|
-
let e =
|
|
2128
|
+
let e = L.fromPalette({
|
|
2119
2129
|
name: "on_tertiary_fixed_variant",
|
|
2120
2130
|
palette: (e) => e.tertiaryPalette,
|
|
2121
2131
|
background: (e) => this.tertiaryFixedDim(),
|
|
2122
|
-
contrastCurve: (e) =>
|
|
2132
|
+
contrastCurve: (e) => K(4.5)
|
|
2123
2133
|
});
|
|
2124
|
-
return
|
|
2134
|
+
return I(super.onTertiaryFixedVariant(), "2025", e);
|
|
2125
2135
|
}
|
|
2126
2136
|
error() {
|
|
2127
|
-
let e =
|
|
2137
|
+
let e = L.fromPalette({
|
|
2128
2138
|
name: "error",
|
|
2129
2139
|
palette: (e) => e.errorPalette,
|
|
2130
|
-
tone: (e) => e.platform === "phone" ? e.isDark ?
|
|
2140
|
+
tone: (e) => e.platform === "phone" ? e.isDark ? G(e.errorPalette, 0, 98) : W(e.errorPalette) : G(e.errorPalette),
|
|
2131
2141
|
isBackground: !0,
|
|
2132
2142
|
background: (e) => e.platform === "phone" ? this.highestSurface(e) : this.surfaceContainerHigh(),
|
|
2133
|
-
contrastCurve: (e) => e.platform === "phone" ?
|
|
2134
|
-
toneDeltaPair: (e) => e.platform === "phone" ? new
|
|
2143
|
+
contrastCurve: (e) => e.platform === "phone" ? K(4.5) : K(7),
|
|
2144
|
+
toneDeltaPair: (e) => e.platform === "phone" ? new B(this.errorContainer(), this.error(), 5, "relative_lighter", !0, "farther") : void 0
|
|
2135
2145
|
});
|
|
2136
|
-
return
|
|
2146
|
+
return I(super.error(), "2025", e);
|
|
2137
2147
|
}
|
|
2138
2148
|
errorDim() {
|
|
2139
|
-
return
|
|
2149
|
+
return L.fromPalette({
|
|
2140
2150
|
name: "error_dim",
|
|
2141
2151
|
palette: (e) => e.errorPalette,
|
|
2142
|
-
tone: (e) =>
|
|
2152
|
+
tone: (e) => G(e.errorPalette),
|
|
2143
2153
|
isBackground: !0,
|
|
2144
2154
|
background: (e) => this.surfaceContainerHigh(),
|
|
2145
|
-
contrastCurve: (e) =>
|
|
2146
|
-
toneDeltaPair: (e) => new
|
|
2155
|
+
contrastCurve: (e) => K(4.5),
|
|
2156
|
+
toneDeltaPair: (e) => new B(this.errorDim(), this.error(), 5, "darker", !0, "farther")
|
|
2147
2157
|
});
|
|
2148
2158
|
}
|
|
2149
2159
|
onError() {
|
|
2150
|
-
let e =
|
|
2160
|
+
let e = L.fromPalette({
|
|
2151
2161
|
name: "on_error",
|
|
2152
2162
|
palette: (e) => e.errorPalette,
|
|
2153
2163
|
background: (e) => e.platform === "phone" ? this.error() : this.errorDim(),
|
|
2154
|
-
contrastCurve: (e) => e.platform === "phone" ?
|
|
2164
|
+
contrastCurve: (e) => e.platform === "phone" ? K(6) : K(7)
|
|
2155
2165
|
});
|
|
2156
|
-
return
|
|
2166
|
+
return I(super.onError(), "2025", e);
|
|
2157
2167
|
}
|
|
2158
2168
|
errorContainer() {
|
|
2159
|
-
let e =
|
|
2169
|
+
let e = L.fromPalette({
|
|
2160
2170
|
name: "error_container",
|
|
2161
2171
|
palette: (e) => e.errorPalette,
|
|
2162
|
-
tone: (e) => e.platform === "watch" ? 30 : e.isDark ?
|
|
2172
|
+
tone: (e) => e.platform === "watch" ? 30 : e.isDark ? G(e.errorPalette, 30, 93) : W(e.errorPalette, 0, 90),
|
|
2163
2173
|
isBackground: !0,
|
|
2164
2174
|
background: (e) => e.platform === "phone" ? this.highestSurface(e) : void 0,
|
|
2165
|
-
toneDeltaPair: (e) => e.platform === "watch" ? new
|
|
2166
|
-
contrastCurve: (e) => e.platform === "phone" && e.contrastLevel > 0 ?
|
|
2175
|
+
toneDeltaPair: (e) => e.platform === "watch" ? new B(this.errorContainer(), this.errorDim(), 10, "darker", !0, "farther") : void 0,
|
|
2176
|
+
contrastCurve: (e) => e.platform === "phone" && e.contrastLevel > 0 ? K(1.5) : void 0
|
|
2167
2177
|
});
|
|
2168
|
-
return
|
|
2178
|
+
return I(super.errorContainer(), "2025", e);
|
|
2169
2179
|
}
|
|
2170
2180
|
onErrorContainer() {
|
|
2171
|
-
let e =
|
|
2181
|
+
let e = L.fromPalette({
|
|
2172
2182
|
name: "on_error_container",
|
|
2173
2183
|
palette: (e) => e.errorPalette,
|
|
2174
2184
|
background: (e) => this.errorContainer(),
|
|
2175
|
-
contrastCurve: (e) => e.platform === "phone" ?
|
|
2185
|
+
contrastCurve: (e) => e.platform === "phone" ? K(4.5) : K(7)
|
|
2176
2186
|
});
|
|
2177
|
-
return
|
|
2187
|
+
return I(super.onErrorContainer(), "2025", e);
|
|
2178
2188
|
}
|
|
2179
2189
|
surfaceVariant() {
|
|
2180
2190
|
let e = Object.assign(this.surfaceContainerHighest().clone(), { name: "surface_variant" });
|
|
2181
|
-
return
|
|
2191
|
+
return I(super.surfaceVariant(), "2025", e);
|
|
2182
2192
|
}
|
|
2183
2193
|
surfaceTint() {
|
|
2184
2194
|
let e = Object.assign(this.primary().clone(), { name: "surface_tint" });
|
|
2185
|
-
return
|
|
2195
|
+
return I(super.surfaceTint(), "2025", e);
|
|
2186
2196
|
}
|
|
2187
2197
|
background() {
|
|
2188
2198
|
let e = Object.assign(this.surface().clone(), { name: "background" });
|
|
2189
|
-
return
|
|
2199
|
+
return I(super.background(), "2025", e);
|
|
2190
2200
|
}
|
|
2191
2201
|
onBackground() {
|
|
2192
2202
|
let e = Object.assign(this.onSurface().clone(), {
|
|
2193
2203
|
name: "on_background",
|
|
2194
2204
|
tone: (e) => e.platform === "watch" ? 100 : this.onSurface().getTone(e)
|
|
2195
2205
|
});
|
|
2196
|
-
return
|
|
2206
|
+
return I(super.onBackground(), "2025", e);
|
|
2197
2207
|
}
|
|
2198
|
-
},
|
|
2208
|
+
}, q = class e {
|
|
2199
2209
|
constructor() {
|
|
2200
2210
|
this.allColors = [
|
|
2201
2211
|
this.background(),
|
|
@@ -2433,24 +2443,24 @@ var ae = class extends re {
|
|
|
2433
2443
|
return e.colorSpec.highestSurface(t);
|
|
2434
2444
|
}
|
|
2435
2445
|
};
|
|
2436
|
-
|
|
2446
|
+
q.contentAccentToneDelta = 15, q.colorSpec = new de(), q.primaryPaletteKeyColor = q.colorSpec.primaryPaletteKeyColor(), q.secondaryPaletteKeyColor = q.colorSpec.secondaryPaletteKeyColor(), q.tertiaryPaletteKeyColor = q.colorSpec.tertiaryPaletteKeyColor(), q.neutralPaletteKeyColor = q.colorSpec.neutralPaletteKeyColor(), q.neutralVariantPaletteKeyColor = q.colorSpec.neutralVariantPaletteKeyColor(), q.background = q.colorSpec.background(), q.onBackground = q.colorSpec.onBackground(), q.surface = q.colorSpec.surface(), q.surfaceDim = q.colorSpec.surfaceDim(), q.surfaceBright = q.colorSpec.surfaceBright(), q.surfaceContainerLowest = q.colorSpec.surfaceContainerLowest(), q.surfaceContainerLow = q.colorSpec.surfaceContainerLow(), q.surfaceContainer = q.colorSpec.surfaceContainer(), q.surfaceContainerHigh = q.colorSpec.surfaceContainerHigh(), q.surfaceContainerHighest = q.colorSpec.surfaceContainerHighest(), q.onSurface = q.colorSpec.onSurface(), q.surfaceVariant = q.colorSpec.surfaceVariant(), q.onSurfaceVariant = q.colorSpec.onSurfaceVariant(), q.inverseSurface = q.colorSpec.inverseSurface(), q.inverseOnSurface = q.colorSpec.inverseOnSurface(), q.outline = q.colorSpec.outline(), q.outlineVariant = q.colorSpec.outlineVariant(), q.shadow = q.colorSpec.shadow(), q.scrim = q.colorSpec.scrim(), q.surfaceTint = q.colorSpec.surfaceTint(), q.primary = q.colorSpec.primary(), q.onPrimary = q.colorSpec.onPrimary(), q.primaryContainer = q.colorSpec.primaryContainer(), q.onPrimaryContainer = q.colorSpec.onPrimaryContainer(), q.inversePrimary = q.colorSpec.inversePrimary(), q.secondary = q.colorSpec.secondary(), q.onSecondary = q.colorSpec.onSecondary(), q.secondaryContainer = q.colorSpec.secondaryContainer(), q.onSecondaryContainer = q.colorSpec.onSecondaryContainer(), q.tertiary = q.colorSpec.tertiary(), q.onTertiary = q.colorSpec.onTertiary(), q.tertiaryContainer = q.colorSpec.tertiaryContainer(), q.onTertiaryContainer = q.colorSpec.onTertiaryContainer(), q.error = q.colorSpec.error(), q.onError = q.colorSpec.onError(), q.errorContainer = q.colorSpec.errorContainer(), q.onErrorContainer = q.colorSpec.onErrorContainer(), q.primaryFixed = q.colorSpec.primaryFixed(), q.primaryFixedDim = q.colorSpec.primaryFixedDim(), q.onPrimaryFixed = q.colorSpec.onPrimaryFixed(), q.onPrimaryFixedVariant = q.colorSpec.onPrimaryFixedVariant(), q.secondaryFixed = q.colorSpec.secondaryFixed(), q.secondaryFixedDim = q.colorSpec.secondaryFixedDim(), q.onSecondaryFixed = q.colorSpec.onSecondaryFixed(), q.onSecondaryFixedVariant = q.colorSpec.onSecondaryFixedVariant(), q.tertiaryFixed = q.colorSpec.tertiaryFixed(), q.tertiaryFixedDim = q.colorSpec.tertiaryFixedDim(), q.onTertiaryFixed = q.colorSpec.onTertiaryFixed(), q.onTertiaryFixedVariant = q.colorSpec.onTertiaryFixedVariant();
|
|
2437
2447
|
//#endregion
|
|
2438
2448
|
//#region node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/dynamiccolor/dynamic_scheme.js
|
|
2439
|
-
var
|
|
2449
|
+
var J = class e {
|
|
2440
2450
|
static maybeFallbackSpecVersion(e, t) {
|
|
2441
2451
|
switch (t) {
|
|
2442
|
-
case
|
|
2443
|
-
case
|
|
2444
|
-
case
|
|
2445
|
-
case
|
|
2452
|
+
case V.EXPRESSIVE:
|
|
2453
|
+
case V.VIBRANT:
|
|
2454
|
+
case V.TONAL_SPOT:
|
|
2455
|
+
case V.NEUTRAL: return e;
|
|
2446
2456
|
default: return "2021";
|
|
2447
2457
|
}
|
|
2448
2458
|
}
|
|
2449
2459
|
constructor(t) {
|
|
2450
|
-
this.sourceColorArgb = t.sourceColorHct.toInt(), this.variant = t.variant, this.contrastLevel = t.contrastLevel, this.isDark = t.isDark, this.platform = t.platform ?? "phone", this.specVersion = e.maybeFallbackSpecVersion(t.specVersion ?? "2021", this.variant), this.sourceColorHct = t.sourceColorHct, this.primaryPalette = t.primaryPalette ??
|
|
2460
|
+
this.sourceColorArgb = t.sourceColorHct.toInt(), this.variant = t.variant, this.contrastLevel = t.contrastLevel, this.isDark = t.isDark, this.platform = t.platform ?? "phone", this.specVersion = e.maybeFallbackSpecVersion(t.specVersion ?? "2021", this.variant), this.sourceColorHct = t.sourceColorHct, this.primaryPalette = t.primaryPalette ?? Y(this.specVersion).getPrimaryPalette(this.variant, t.sourceColorHct, this.isDark, this.platform, this.contrastLevel), this.secondaryPalette = t.secondaryPalette ?? Y(this.specVersion).getSecondaryPalette(this.variant, t.sourceColorHct, this.isDark, this.platform, this.contrastLevel), this.tertiaryPalette = t.tertiaryPalette ?? Y(this.specVersion).getTertiaryPalette(this.variant, t.sourceColorHct, this.isDark, this.platform, this.contrastLevel), this.neutralPalette = t.neutralPalette ?? Y(this.specVersion).getNeutralPalette(this.variant, t.sourceColorHct, this.isDark, this.platform, this.contrastLevel), this.neutralVariantPalette = t.neutralVariantPalette ?? Y(this.specVersion).getNeutralVariantPalette(this.variant, t.sourceColorHct, this.isDark, this.platform, this.contrastLevel), this.errorPalette = t.errorPalette ?? Y(this.specVersion).getErrorPalette(this.variant, t.sourceColorHct, this.isDark, this.platform, this.contrastLevel) ?? R.fromHueAndChroma(25, 84), this.colors = new q();
|
|
2451
2461
|
}
|
|
2452
2462
|
toString() {
|
|
2453
|
-
return `Scheme: variant=${
|
|
2463
|
+
return `Scheme: variant=${V[this.variant]}, mode=${this.isDark ? "dark" : "light"}, platform=${this.platform}, contrastLevel=${this.contrastLevel.toFixed(1)}, seed=${this.sourceColorHct.toString()}, specVersion=${this.specVersion}`;
|
|
2454
2464
|
}
|
|
2455
2465
|
static getPiecewiseHue(e, t, n) {
|
|
2456
2466
|
let r = Math.min(t.length - 1, n.length), i = e.hue;
|
|
@@ -2653,32 +2663,32 @@ var Z = class e {
|
|
|
2653
2663
|
return this.getArgb(this.colors.onErrorContainer());
|
|
2654
2664
|
}
|
|
2655
2665
|
};
|
|
2656
|
-
|
|
2657
|
-
var
|
|
2666
|
+
J.DEFAULT_SPEC_VERSION = "2021", J.DEFAULT_PLATFORM = "phone";
|
|
2667
|
+
var fe = class {
|
|
2658
2668
|
getPrimaryPalette(e, t, n, r, i) {
|
|
2659
2669
|
switch (e) {
|
|
2660
|
-
case
|
|
2661
|
-
case
|
|
2662
|
-
case
|
|
2663
|
-
case
|
|
2664
|
-
case
|
|
2665
|
-
case
|
|
2666
|
-
case
|
|
2667
|
-
case
|
|
2668
|
-
case
|
|
2670
|
+
case V.CONTENT:
|
|
2671
|
+
case V.FIDELITY: return R.fromHueAndChroma(t.hue, t.chroma);
|
|
2672
|
+
case V.FRUIT_SALAD: return R.fromHueAndChroma(a(t.hue - 50), 48);
|
|
2673
|
+
case V.MONOCHROME: return R.fromHueAndChroma(t.hue, 0);
|
|
2674
|
+
case V.NEUTRAL: return R.fromHueAndChroma(t.hue, 12);
|
|
2675
|
+
case V.RAINBOW: return R.fromHueAndChroma(t.hue, 48);
|
|
2676
|
+
case V.TONAL_SPOT: return R.fromHueAndChroma(t.hue, 36);
|
|
2677
|
+
case V.EXPRESSIVE: return R.fromHueAndChroma(a(t.hue + 240), 40);
|
|
2678
|
+
case V.VIBRANT: return R.fromHueAndChroma(t.hue, 200);
|
|
2669
2679
|
default: throw Error(`Unsupported variant: ${e}`);
|
|
2670
2680
|
}
|
|
2671
2681
|
}
|
|
2672
2682
|
getSecondaryPalette(e, t, n, r, i) {
|
|
2673
2683
|
switch (e) {
|
|
2674
|
-
case
|
|
2675
|
-
case
|
|
2676
|
-
case
|
|
2677
|
-
case
|
|
2678
|
-
case
|
|
2679
|
-
case
|
|
2680
|
-
case
|
|
2681
|
-
case
|
|
2684
|
+
case V.CONTENT:
|
|
2685
|
+
case V.FIDELITY: return R.fromHueAndChroma(t.hue, Math.max(t.chroma - 32, t.chroma * .5));
|
|
2686
|
+
case V.FRUIT_SALAD: return R.fromHueAndChroma(a(t.hue - 50), 36);
|
|
2687
|
+
case V.MONOCHROME: return R.fromHueAndChroma(t.hue, 0);
|
|
2688
|
+
case V.NEUTRAL: return R.fromHueAndChroma(t.hue, 8);
|
|
2689
|
+
case V.RAINBOW: return R.fromHueAndChroma(t.hue, 16);
|
|
2690
|
+
case V.TONAL_SPOT: return R.fromHueAndChroma(t.hue, 16);
|
|
2691
|
+
case V.EXPRESSIVE: return R.fromHueAndChroma(J.getRotatedHue(t, [
|
|
2682
2692
|
0,
|
|
2683
2693
|
21,
|
|
2684
2694
|
51,
|
|
@@ -2699,7 +2709,7 @@ var oe = class {
|
|
|
2699
2709
|
45,
|
|
2700
2710
|
45
|
|
2701
2711
|
]), 24);
|
|
2702
|
-
case
|
|
2712
|
+
case V.VIBRANT: return R.fromHueAndChroma(J.getRotatedHue(t, [
|
|
2703
2713
|
0,
|
|
2704
2714
|
41,
|
|
2705
2715
|
61,
|
|
@@ -2725,14 +2735,14 @@ var oe = class {
|
|
|
2725
2735
|
}
|
|
2726
2736
|
getTertiaryPalette(e, t, n, r, i) {
|
|
2727
2737
|
switch (e) {
|
|
2728
|
-
case
|
|
2729
|
-
case
|
|
2730
|
-
case
|
|
2731
|
-
case
|
|
2732
|
-
case
|
|
2733
|
-
case
|
|
2734
|
-
case
|
|
2735
|
-
case
|
|
2738
|
+
case V.CONTENT: return R.fromHct(F.fixIfDisliked(new se(t).analogous(3, 6)[2]));
|
|
2739
|
+
case V.FIDELITY: return R.fromHct(F.fixIfDisliked(new se(t).complement));
|
|
2740
|
+
case V.FRUIT_SALAD: return R.fromHueAndChroma(t.hue, 36);
|
|
2741
|
+
case V.MONOCHROME: return R.fromHueAndChroma(t.hue, 0);
|
|
2742
|
+
case V.NEUTRAL: return R.fromHueAndChroma(t.hue, 16);
|
|
2743
|
+
case V.RAINBOW:
|
|
2744
|
+
case V.TONAL_SPOT: return R.fromHueAndChroma(a(t.hue + 60), 24);
|
|
2745
|
+
case V.EXPRESSIVE: return R.fromHueAndChroma(J.getRotatedHue(t, [
|
|
2736
2746
|
0,
|
|
2737
2747
|
21,
|
|
2738
2748
|
51,
|
|
@@ -2753,7 +2763,7 @@ var oe = class {
|
|
|
2753
2763
|
120,
|
|
2754
2764
|
120
|
|
2755
2765
|
]), 32);
|
|
2756
|
-
case
|
|
2766
|
+
case V.VIBRANT: return R.fromHueAndChroma(J.getRotatedHue(t, [
|
|
2757
2767
|
0,
|
|
2758
2768
|
41,
|
|
2759
2769
|
61,
|
|
@@ -2779,48 +2789,48 @@ var oe = class {
|
|
|
2779
2789
|
}
|
|
2780
2790
|
getNeutralPalette(e, t, n, r, i) {
|
|
2781
2791
|
switch (e) {
|
|
2782
|
-
case
|
|
2783
|
-
case
|
|
2784
|
-
case
|
|
2785
|
-
case
|
|
2786
|
-
case
|
|
2787
|
-
case
|
|
2788
|
-
case
|
|
2789
|
-
case
|
|
2790
|
-
case
|
|
2792
|
+
case V.CONTENT:
|
|
2793
|
+
case V.FIDELITY: return R.fromHueAndChroma(t.hue, t.chroma / 8);
|
|
2794
|
+
case V.FRUIT_SALAD: return R.fromHueAndChroma(t.hue, 10);
|
|
2795
|
+
case V.MONOCHROME: return R.fromHueAndChroma(t.hue, 0);
|
|
2796
|
+
case V.NEUTRAL: return R.fromHueAndChroma(t.hue, 2);
|
|
2797
|
+
case V.RAINBOW: return R.fromHueAndChroma(t.hue, 0);
|
|
2798
|
+
case V.TONAL_SPOT: return R.fromHueAndChroma(t.hue, 6);
|
|
2799
|
+
case V.EXPRESSIVE: return R.fromHueAndChroma(a(t.hue + 15), 8);
|
|
2800
|
+
case V.VIBRANT: return R.fromHueAndChroma(t.hue, 10);
|
|
2791
2801
|
default: throw Error(`Unsupported variant: ${e}`);
|
|
2792
2802
|
}
|
|
2793
2803
|
}
|
|
2794
2804
|
getNeutralVariantPalette(e, t, n, r, i) {
|
|
2795
2805
|
switch (e) {
|
|
2796
|
-
case
|
|
2797
|
-
case
|
|
2798
|
-
case
|
|
2799
|
-
case
|
|
2800
|
-
case
|
|
2801
|
-
case
|
|
2802
|
-
case
|
|
2803
|
-
case
|
|
2804
|
-
case
|
|
2806
|
+
case V.CONTENT: return R.fromHueAndChroma(t.hue, t.chroma / 8 + 4);
|
|
2807
|
+
case V.FIDELITY: return R.fromHueAndChroma(t.hue, t.chroma / 8 + 4);
|
|
2808
|
+
case V.FRUIT_SALAD: return R.fromHueAndChroma(t.hue, 16);
|
|
2809
|
+
case V.MONOCHROME: return R.fromHueAndChroma(t.hue, 0);
|
|
2810
|
+
case V.NEUTRAL: return R.fromHueAndChroma(t.hue, 2);
|
|
2811
|
+
case V.RAINBOW: return R.fromHueAndChroma(t.hue, 0);
|
|
2812
|
+
case V.TONAL_SPOT: return R.fromHueAndChroma(t.hue, 8);
|
|
2813
|
+
case V.EXPRESSIVE: return R.fromHueAndChroma(a(t.hue + 15), 12);
|
|
2814
|
+
case V.VIBRANT: return R.fromHueAndChroma(t.hue, 12);
|
|
2805
2815
|
default: throw Error(`Unsupported variant: ${e}`);
|
|
2806
2816
|
}
|
|
2807
2817
|
}
|
|
2808
2818
|
getErrorPalette(e, t, n, r, i) {}
|
|
2809
|
-
},
|
|
2819
|
+
}, pe = class e extends fe {
|
|
2810
2820
|
getPrimaryPalette(e, t, n, r, i) {
|
|
2811
2821
|
switch (e) {
|
|
2812
|
-
case
|
|
2813
|
-
case
|
|
2814
|
-
case
|
|
2815
|
-
case
|
|
2822
|
+
case V.NEUTRAL: return R.fromHueAndChroma(t.hue, r === "phone" ? N.isBlue(t.hue) ? 12 : 8 : N.isBlue(t.hue) ? 16 : 12);
|
|
2823
|
+
case V.TONAL_SPOT: return R.fromHueAndChroma(t.hue, r === "phone" && n ? 26 : 32);
|
|
2824
|
+
case V.EXPRESSIVE: return R.fromHueAndChroma(t.hue, r === "phone" ? n ? 36 : 48 : 40);
|
|
2825
|
+
case V.VIBRANT: return R.fromHueAndChroma(t.hue, r === "phone" ? 74 : 56);
|
|
2816
2826
|
default: return super.getPrimaryPalette(e, t, n, r, i);
|
|
2817
2827
|
}
|
|
2818
2828
|
}
|
|
2819
2829
|
getSecondaryPalette(e, t, n, r, i) {
|
|
2820
2830
|
switch (e) {
|
|
2821
|
-
case
|
|
2822
|
-
case
|
|
2823
|
-
case
|
|
2831
|
+
case V.NEUTRAL: return R.fromHueAndChroma(t.hue, r === "phone" ? N.isBlue(t.hue) ? 6 : 4 : N.isBlue(t.hue) ? 10 : 6);
|
|
2832
|
+
case V.TONAL_SPOT: return R.fromHueAndChroma(t.hue, 16);
|
|
2833
|
+
case V.EXPRESSIVE: return R.fromHueAndChroma(J.getRotatedHue(t, [
|
|
2824
2834
|
0,
|
|
2825
2835
|
105,
|
|
2826
2836
|
140,
|
|
@@ -2840,7 +2850,7 @@ var oe = class {
|
|
|
2840
2850
|
-165,
|
|
2841
2851
|
-160
|
|
2842
2852
|
]), r === "phone" && n ? 16 : 24);
|
|
2843
|
-
case
|
|
2853
|
+
case V.VIBRANT: return R.fromHueAndChroma(J.getRotatedHue(t, [
|
|
2844
2854
|
0,
|
|
2845
2855
|
38,
|
|
2846
2856
|
105,
|
|
@@ -2859,7 +2869,7 @@ var oe = class {
|
|
|
2859
2869
|
}
|
|
2860
2870
|
getTertiaryPalette(e, t, n, r, i) {
|
|
2861
2871
|
switch (e) {
|
|
2862
|
-
case
|
|
2872
|
+
case V.NEUTRAL: return R.fromHueAndChroma(J.getRotatedHue(t, [
|
|
2863
2873
|
0,
|
|
2864
2874
|
38,
|
|
2865
2875
|
105,
|
|
@@ -2877,7 +2887,7 @@ var oe = class {
|
|
|
2877
2887
|
-15,
|
|
2878
2888
|
-32
|
|
2879
2889
|
]), r === "phone" ? 20 : 36);
|
|
2880
|
-
case
|
|
2890
|
+
case V.TONAL_SPOT: return R.fromHueAndChroma(J.getRotatedHue(t, [
|
|
2881
2891
|
0,
|
|
2882
2892
|
20,
|
|
2883
2893
|
71,
|
|
@@ -2891,7 +2901,7 @@ var oe = class {
|
|
|
2891
2901
|
40,
|
|
2892
2902
|
-32
|
|
2893
2903
|
]), r === "phone" ? 28 : 32);
|
|
2894
|
-
case
|
|
2904
|
+
case V.EXPRESSIVE: return R.fromHueAndChroma(J.getRotatedHue(t, [
|
|
2895
2905
|
0,
|
|
2896
2906
|
105,
|
|
2897
2907
|
140,
|
|
@@ -2911,7 +2921,7 @@ var oe = class {
|
|
|
2911
2921
|
-170,
|
|
2912
2922
|
-165
|
|
2913
2923
|
]), 48);
|
|
2914
|
-
case
|
|
2924
|
+
case V.VIBRANT: return R.fromHueAndChroma(J.getRotatedHue(t, [
|
|
2915
2925
|
0,
|
|
2916
2926
|
38,
|
|
2917
2927
|
71,
|
|
@@ -2935,7 +2945,7 @@ var oe = class {
|
|
|
2935
2945
|
}
|
|
2936
2946
|
}
|
|
2937
2947
|
static getExpressiveNeutralHue(e) {
|
|
2938
|
-
return
|
|
2948
|
+
return J.getRotatedHue(e, [
|
|
2939
2949
|
0,
|
|
2940
2950
|
71,
|
|
2941
2951
|
124,
|
|
@@ -2954,10 +2964,10 @@ var oe = class {
|
|
|
2954
2964
|
}
|
|
2955
2965
|
static getExpressiveNeutralChroma(t, n, r) {
|
|
2956
2966
|
let i = e.getExpressiveNeutralHue(t);
|
|
2957
|
-
return r === "phone" ? n ?
|
|
2967
|
+
return r === "phone" ? n ? N.isYellow(i) ? 6 : 14 : 18 : 12;
|
|
2958
2968
|
}
|
|
2959
2969
|
static getVibrantNeutralHue(e) {
|
|
2960
|
-
return
|
|
2970
|
+
return J.getRotatedHue(e, [
|
|
2961
2971
|
0,
|
|
2962
2972
|
38,
|
|
2963
2973
|
105,
|
|
@@ -2974,32 +2984,32 @@ var oe = class {
|
|
|
2974
2984
|
}
|
|
2975
2985
|
static getVibrantNeutralChroma(t, n) {
|
|
2976
2986
|
let r = e.getVibrantNeutralHue(t);
|
|
2977
|
-
return n === "phone" ||
|
|
2987
|
+
return n === "phone" || N.isBlue(r) ? 28 : 20;
|
|
2978
2988
|
}
|
|
2979
2989
|
getNeutralPalette(t, n, r, i, a) {
|
|
2980
2990
|
switch (t) {
|
|
2981
|
-
case
|
|
2982
|
-
case
|
|
2983
|
-
case
|
|
2984
|
-
case
|
|
2991
|
+
case V.NEUTRAL: return R.fromHueAndChroma(n.hue, i === "phone" ? 1.4 : 6);
|
|
2992
|
+
case V.TONAL_SPOT: return R.fromHueAndChroma(n.hue, i === "phone" ? 5 : 10);
|
|
2993
|
+
case V.EXPRESSIVE: return R.fromHueAndChroma(e.getExpressiveNeutralHue(n), e.getExpressiveNeutralChroma(n, r, i));
|
|
2994
|
+
case V.VIBRANT: return R.fromHueAndChroma(e.getVibrantNeutralHue(n), e.getVibrantNeutralChroma(n, i));
|
|
2985
2995
|
default: return super.getNeutralPalette(t, n, r, i, a);
|
|
2986
2996
|
}
|
|
2987
2997
|
}
|
|
2988
2998
|
getNeutralVariantPalette(t, n, r, i, a) {
|
|
2989
2999
|
switch (t) {
|
|
2990
|
-
case
|
|
2991
|
-
case
|
|
2992
|
-
case
|
|
3000
|
+
case V.NEUTRAL: return R.fromHueAndChroma(n.hue, (i === "phone" ? 1.4 : 6) * 2.2);
|
|
3001
|
+
case V.TONAL_SPOT: return R.fromHueAndChroma(n.hue, (i === "phone" ? 5 : 10) * 1.7);
|
|
3002
|
+
case V.EXPRESSIVE:
|
|
2993
3003
|
let o = e.getExpressiveNeutralHue(n), s = e.getExpressiveNeutralChroma(n, r, i);
|
|
2994
|
-
return
|
|
2995
|
-
case
|
|
3004
|
+
return R.fromHueAndChroma(o, s * (o >= 105 && o < 125 ? 1.6 : 2.3));
|
|
3005
|
+
case V.VIBRANT:
|
|
2996
3006
|
let c = e.getVibrantNeutralHue(n), l = e.getVibrantNeutralChroma(n, i);
|
|
2997
|
-
return
|
|
3007
|
+
return R.fromHueAndChroma(c, l * 1.29);
|
|
2998
3008
|
default: return super.getNeutralVariantPalette(t, n, r, i, a);
|
|
2999
3009
|
}
|
|
3000
3010
|
}
|
|
3001
3011
|
getErrorPalette(e, t, n, r, i) {
|
|
3002
|
-
let a =
|
|
3012
|
+
let a = J.getPiecewiseHue(t, [
|
|
3003
3013
|
0,
|
|
3004
3014
|
3,
|
|
3005
3015
|
13,
|
|
@@ -3020,123 +3030,425 @@ var oe = class {
|
|
|
3020
3030
|
12
|
|
3021
3031
|
]);
|
|
3022
3032
|
switch (e) {
|
|
3023
|
-
case
|
|
3024
|
-
case
|
|
3025
|
-
case
|
|
3026
|
-
case
|
|
3033
|
+
case V.NEUTRAL: return R.fromHueAndChroma(a, r === "phone" ? 50 : 40);
|
|
3034
|
+
case V.TONAL_SPOT: return R.fromHueAndChroma(a, r === "phone" ? 60 : 48);
|
|
3035
|
+
case V.EXPRESSIVE: return R.fromHueAndChroma(a, r === "phone" ? 64 : 48);
|
|
3036
|
+
case V.VIBRANT: return R.fromHueAndChroma(a, r === "phone" ? 80 : 60);
|
|
3027
3037
|
default: return super.getErrorPalette(e, t, n, r, i);
|
|
3028
3038
|
}
|
|
3029
3039
|
}
|
|
3030
|
-
},
|
|
3031
|
-
function
|
|
3032
|
-
return e === "2025" ?
|
|
3040
|
+
}, me = new fe(), he = new pe();
|
|
3041
|
+
function Y(e) {
|
|
3042
|
+
return e === "2025" ? he : me;
|
|
3033
3043
|
}
|
|
3034
3044
|
//#endregion
|
|
3035
|
-
//#region node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/
|
|
3036
|
-
var
|
|
3037
|
-
|
|
3045
|
+
//#region node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/quantize/lab_point_provider.js
|
|
3046
|
+
var ge = class {
|
|
3047
|
+
fromInt(e) {
|
|
3048
|
+
return b(e);
|
|
3049
|
+
}
|
|
3050
|
+
toInt(e) {
|
|
3051
|
+
return y(e[0], e[1], e[2]);
|
|
3052
|
+
}
|
|
3053
|
+
distance(e, t) {
|
|
3054
|
+
let n = e[0] - t[0], r = e[1] - t[1], i = e[2] - t[2];
|
|
3055
|
+
return n * n + r * r + i * i;
|
|
3056
|
+
}
|
|
3057
|
+
}, _e = 10, ve = 3, ye = class {
|
|
3058
|
+
static quantize(e, t, n) {
|
|
3059
|
+
let r = /* @__PURE__ */ new Map(), i = [], a = [], o = new ge(), s = 0;
|
|
3060
|
+
for (let t = 0; t < e.length; t++) {
|
|
3061
|
+
let n = e[t], c = r.get(n);
|
|
3062
|
+
c === void 0 ? (s++, i.push(o.fromInt(n)), a.push(n), r.set(n, 1)) : r.set(n, c + 1);
|
|
3063
|
+
}
|
|
3064
|
+
let c = [];
|
|
3065
|
+
for (let e = 0; e < s; e++) {
|
|
3066
|
+
let t = a[e], n = r.get(t);
|
|
3067
|
+
n !== void 0 && (c[e] = n);
|
|
3068
|
+
}
|
|
3069
|
+
let l = Math.min(n, s);
|
|
3070
|
+
t.length > 0 && (l = Math.min(l, t.length));
|
|
3071
|
+
let u = [];
|
|
3072
|
+
for (let e = 0; e < t.length; e++) u.push(o.fromInt(t[e]));
|
|
3073
|
+
let d = l - u.length;
|
|
3074
|
+
if (t.length === 0 && d > 0) for (let e = 0; e < d; e++) {
|
|
3075
|
+
let e = Math.random() * 100, t = Math.random() * 201 + -100, n = Math.random() * 201 + -100;
|
|
3076
|
+
u.push([
|
|
3077
|
+
e,
|
|
3078
|
+
t,
|
|
3079
|
+
n
|
|
3080
|
+
]);
|
|
3081
|
+
}
|
|
3082
|
+
let f = [];
|
|
3083
|
+
for (let e = 0; e < s; e++) f.push(Math.floor(Math.random() * l));
|
|
3084
|
+
let p = [];
|
|
3085
|
+
for (let e = 0; e < l; e++) {
|
|
3086
|
+
p.push([]);
|
|
3087
|
+
for (let t = 0; t < l; t++) p[e].push(0);
|
|
3088
|
+
}
|
|
3089
|
+
let m = [];
|
|
3090
|
+
for (let e = 0; e < l; e++) {
|
|
3091
|
+
m.push([]);
|
|
3092
|
+
for (let t = 0; t < l; t++) m[e].push(new be());
|
|
3093
|
+
}
|
|
3094
|
+
let h = [];
|
|
3095
|
+
for (let e = 0; e < l; e++) h.push(0);
|
|
3096
|
+
for (let e = 0; e < _e; e++) {
|
|
3097
|
+
for (let e = 0; e < l; e++) {
|
|
3098
|
+
for (let t = e + 1; t < l; t++) {
|
|
3099
|
+
let n = o.distance(u[e], u[t]);
|
|
3100
|
+
m[t][e].distance = n, m[t][e].index = e, m[e][t].distance = n, m[e][t].index = t;
|
|
3101
|
+
}
|
|
3102
|
+
m[e].sort();
|
|
3103
|
+
for (let t = 0; t < l; t++) p[e][t] = m[e][t].index;
|
|
3104
|
+
}
|
|
3105
|
+
let t = 0;
|
|
3106
|
+
for (let e = 0; e < s; e++) {
|
|
3107
|
+
let n = i[e], r = f[e], a = u[r], s = o.distance(n, a), c = s, d = -1;
|
|
3108
|
+
for (let e = 0; e < l; e++) {
|
|
3109
|
+
if (m[r][e].distance >= 4 * s) continue;
|
|
3110
|
+
let t = o.distance(n, u[e]);
|
|
3111
|
+
t < c && (c = t, d = e);
|
|
3112
|
+
}
|
|
3113
|
+
d !== -1 && Math.abs(Math.sqrt(c) - Math.sqrt(s)) > ve && (t++, f[e] = d);
|
|
3114
|
+
}
|
|
3115
|
+
if (t === 0 && e !== 0) break;
|
|
3116
|
+
let n = Array(l).fill(0), r = Array(l).fill(0), a = Array(l).fill(0);
|
|
3117
|
+
for (let e = 0; e < l; e++) h[e] = 0;
|
|
3118
|
+
for (let e = 0; e < s; e++) {
|
|
3119
|
+
let t = f[e], o = i[e], s = c[e];
|
|
3120
|
+
h[t] += s, n[t] += o[0] * s, r[t] += o[1] * s, a[t] += o[2] * s;
|
|
3121
|
+
}
|
|
3122
|
+
for (let e = 0; e < l; e++) {
|
|
3123
|
+
let t = h[e];
|
|
3124
|
+
if (t === 0) {
|
|
3125
|
+
u[e] = [
|
|
3126
|
+
0,
|
|
3127
|
+
0,
|
|
3128
|
+
0
|
|
3129
|
+
];
|
|
3130
|
+
continue;
|
|
3131
|
+
}
|
|
3132
|
+
let i = n[e] / t, o = r[e] / t, s = a[e] / t;
|
|
3133
|
+
u[e] = [
|
|
3134
|
+
i,
|
|
3135
|
+
o,
|
|
3136
|
+
s
|
|
3137
|
+
];
|
|
3138
|
+
}
|
|
3139
|
+
}
|
|
3140
|
+
let g = /* @__PURE__ */ new Map();
|
|
3141
|
+
for (let e = 0; e < l; e++) {
|
|
3142
|
+
let t = h[e];
|
|
3143
|
+
if (t === 0) continue;
|
|
3144
|
+
let n = o.toInt(u[e]);
|
|
3145
|
+
g.has(n) || g.set(n, t);
|
|
3146
|
+
}
|
|
3147
|
+
return g;
|
|
3148
|
+
}
|
|
3149
|
+
}, be = class {
|
|
3150
|
+
constructor() {
|
|
3151
|
+
this.distance = -1, this.index = -1;
|
|
3152
|
+
}
|
|
3153
|
+
}, xe = class {
|
|
3154
|
+
static quantize(e) {
|
|
3155
|
+
let t = /* @__PURE__ */ new Map();
|
|
3156
|
+
for (let n = 0; n < e.length; n++) {
|
|
3157
|
+
let r = e[n];
|
|
3158
|
+
p(r) < 255 || t.set(r, (t.get(r) ?? 0) + 1);
|
|
3159
|
+
}
|
|
3160
|
+
return t;
|
|
3161
|
+
}
|
|
3162
|
+
}, Se = 5, X = 33, Ce = 35937, Z = {
|
|
3163
|
+
RED: "red",
|
|
3164
|
+
GREEN: "green",
|
|
3165
|
+
BLUE: "blue"
|
|
3166
|
+
}, we = class {
|
|
3167
|
+
constructor(e = [], t = [], n = [], r = [], i = [], a = []) {
|
|
3168
|
+
this.weights = e, this.momentsR = t, this.momentsG = n, this.momentsB = r, this.moments = i, this.cubes = a;
|
|
3169
|
+
}
|
|
3170
|
+
quantize(e, t) {
|
|
3171
|
+
this.constructHistogram(e), this.computeMoments();
|
|
3172
|
+
let n = this.createBoxes(t);
|
|
3173
|
+
return this.createResult(n.resultCount);
|
|
3174
|
+
}
|
|
3175
|
+
constructHistogram(e) {
|
|
3176
|
+
this.weights = Array.from({ length: Ce }).fill(0), this.momentsR = Array.from({ length: Ce }).fill(0), this.momentsG = Array.from({ length: Ce }).fill(0), this.momentsB = Array.from({ length: Ce }).fill(0), this.moments = Array.from({ length: Ce }).fill(0);
|
|
3177
|
+
let t = xe.quantize(e);
|
|
3178
|
+
for (let [e, n] of t.entries()) {
|
|
3179
|
+
let t = m(e), r = h(e), i = g(e), a = (t >> 3) + 1, o = (r >> 3) + 1, s = (i >> 3) + 1, c = this.getIndex(a, o, s);
|
|
3180
|
+
this.weights[c] = (this.weights[c] ?? 0) + n, this.momentsR[c] += n * t, this.momentsG[c] += n * r, this.momentsB[c] += n * i, this.moments[c] += n * (t * t + r * r + i * i);
|
|
3181
|
+
}
|
|
3182
|
+
}
|
|
3183
|
+
computeMoments() {
|
|
3184
|
+
for (let e = 1; e < X; e++) {
|
|
3185
|
+
let t = Array.from({ length: X }).fill(0), n = Array.from({ length: X }).fill(0), r = Array.from({ length: X }).fill(0), i = Array.from({ length: X }).fill(0), a = Array.from({ length: X }).fill(0);
|
|
3186
|
+
for (let o = 1; o < X; o++) {
|
|
3187
|
+
let s = 0, c = 0, l = 0, u = 0, d = 0;
|
|
3188
|
+
for (let f = 1; f < X; f++) {
|
|
3189
|
+
let p = this.getIndex(e, o, f);
|
|
3190
|
+
s += this.weights[p], c += this.momentsR[p], l += this.momentsG[p], u += this.momentsB[p], d += this.moments[p], t[f] += s, n[f] += c, r[f] += l, i[f] += u, a[f] += d;
|
|
3191
|
+
let m = this.getIndex(e - 1, o, f);
|
|
3192
|
+
this.weights[p] = this.weights[m] + t[f], this.momentsR[p] = this.momentsR[m] + n[f], this.momentsG[p] = this.momentsG[m] + r[f], this.momentsB[p] = this.momentsB[m] + i[f], this.moments[p] = this.moments[m] + a[f];
|
|
3193
|
+
}
|
|
3194
|
+
}
|
|
3195
|
+
}
|
|
3196
|
+
}
|
|
3197
|
+
createBoxes(e) {
|
|
3198
|
+
this.cubes = Array.from({ length: e }).fill(0).map(() => new Te());
|
|
3199
|
+
let t = Array.from({ length: e }).fill(0);
|
|
3200
|
+
this.cubes[0].r0 = 0, this.cubes[0].g0 = 0, this.cubes[0].b0 = 0, this.cubes[0].r1 = 32, this.cubes[0].g1 = 32, this.cubes[0].b1 = 32;
|
|
3201
|
+
let n = e, r = 0;
|
|
3202
|
+
for (let i = 1; i < e; i++) {
|
|
3203
|
+
this.cut(this.cubes[r], this.cubes[i]) ? (t[r] = this.cubes[r].vol > 1 ? this.variance(this.cubes[r]) : 0, t[i] = this.cubes[i].vol > 1 ? this.variance(this.cubes[i]) : 0) : (t[r] = 0, i--), r = 0;
|
|
3204
|
+
let e = t[0];
|
|
3205
|
+
for (let n = 1; n <= i; n++) t[n] > e && (e = t[n], r = n);
|
|
3206
|
+
if (e <= 0) {
|
|
3207
|
+
n = i + 1;
|
|
3208
|
+
break;
|
|
3209
|
+
}
|
|
3210
|
+
}
|
|
3211
|
+
return new Ee(e, n);
|
|
3212
|
+
}
|
|
3213
|
+
createResult(e) {
|
|
3214
|
+
let t = [];
|
|
3215
|
+
for (let n = 0; n < e; ++n) {
|
|
3216
|
+
let e = this.cubes[n], r = this.volume(e, this.weights);
|
|
3217
|
+
if (r > 0) {
|
|
3218
|
+
let n = Math.round(this.volume(e, this.momentsR) / r), i = Math.round(this.volume(e, this.momentsG) / r), a = Math.round(this.volume(e, this.momentsB) / r), o = 255 << 24 | (n & 255) << 16 | (i & 255) << 8 | a & 255;
|
|
3219
|
+
t.push(o);
|
|
3220
|
+
}
|
|
3221
|
+
}
|
|
3222
|
+
return t;
|
|
3223
|
+
}
|
|
3224
|
+
variance(e) {
|
|
3225
|
+
let t = this.volume(e, this.momentsR), n = this.volume(e, this.momentsG), r = this.volume(e, this.momentsB);
|
|
3226
|
+
return this.moments[this.getIndex(e.r1, e.g1, e.b1)] - this.moments[this.getIndex(e.r1, e.g1, e.b0)] - this.moments[this.getIndex(e.r1, e.g0, e.b1)] + this.moments[this.getIndex(e.r1, e.g0, e.b0)] - this.moments[this.getIndex(e.r0, e.g1, e.b1)] + this.moments[this.getIndex(e.r0, e.g1, e.b0)] + this.moments[this.getIndex(e.r0, e.g0, e.b1)] - this.moments[this.getIndex(e.r0, e.g0, e.b0)] - (t * t + n * n + r * r) / this.volume(e, this.weights);
|
|
3227
|
+
}
|
|
3228
|
+
cut(e, t) {
|
|
3229
|
+
let n = this.volume(e, this.momentsR), r = this.volume(e, this.momentsG), i = this.volume(e, this.momentsB), a = this.volume(e, this.weights), o = this.maximize(e, Z.RED, e.r0 + 1, e.r1, n, r, i, a), s = this.maximize(e, Z.GREEN, e.g0 + 1, e.g1, n, r, i, a), c = this.maximize(e, Z.BLUE, e.b0 + 1, e.b1, n, r, i, a), l, u = o.maximum, d = s.maximum, f = c.maximum;
|
|
3230
|
+
if (u >= d && u >= f) {
|
|
3231
|
+
if (o.cutLocation < 0) return !1;
|
|
3232
|
+
l = Z.RED;
|
|
3233
|
+
} else l = d >= u && d >= f ? Z.GREEN : Z.BLUE;
|
|
3234
|
+
switch (t.r1 = e.r1, t.g1 = e.g1, t.b1 = e.b1, l) {
|
|
3235
|
+
case Z.RED:
|
|
3236
|
+
e.r1 = o.cutLocation, t.r0 = e.r1, t.g0 = e.g0, t.b0 = e.b0;
|
|
3237
|
+
break;
|
|
3238
|
+
case Z.GREEN:
|
|
3239
|
+
e.g1 = s.cutLocation, t.r0 = e.r0, t.g0 = e.g1, t.b0 = e.b0;
|
|
3240
|
+
break;
|
|
3241
|
+
case Z.BLUE:
|
|
3242
|
+
e.b1 = c.cutLocation, t.r0 = e.r0, t.g0 = e.g0, t.b0 = e.b1;
|
|
3243
|
+
break;
|
|
3244
|
+
default: throw Error("unexpected direction " + l);
|
|
3245
|
+
}
|
|
3246
|
+
return e.vol = (e.r1 - e.r0) * (e.g1 - e.g0) * (e.b1 - e.b0), t.vol = (t.r1 - t.r0) * (t.g1 - t.g0) * (t.b1 - t.b0), !0;
|
|
3247
|
+
}
|
|
3248
|
+
maximize(e, t, n, r, i, a, o, s) {
|
|
3249
|
+
let c = this.bottom(e, t, this.momentsR), l = this.bottom(e, t, this.momentsG), u = this.bottom(e, t, this.momentsB), d = this.bottom(e, t, this.weights), f = 0, p = -1, m = 0, h = 0, g = 0, _ = 0;
|
|
3250
|
+
for (let v = n; v < r; v++) {
|
|
3251
|
+
if (m = c + this.top(e, t, v, this.momentsR), h = l + this.top(e, t, v, this.momentsG), g = u + this.top(e, t, v, this.momentsB), _ = d + this.top(e, t, v, this.weights), _ === 0) continue;
|
|
3252
|
+
let n = (m * m + h * h + g * g) * 1, r = _ * 1, y = n / r;
|
|
3253
|
+
m = i - m, h = a - h, g = o - g, _ = s - _, _ !== 0 && (n = (m * m + h * h + g * g) * 1, r = _ * 1, y += n / r, y > f && (f = y, p = v));
|
|
3254
|
+
}
|
|
3255
|
+
return new De(p, f);
|
|
3256
|
+
}
|
|
3257
|
+
volume(e, t) {
|
|
3258
|
+
return t[this.getIndex(e.r1, e.g1, e.b1)] - t[this.getIndex(e.r1, e.g1, e.b0)] - t[this.getIndex(e.r1, e.g0, e.b1)] + t[this.getIndex(e.r1, e.g0, e.b0)] - t[this.getIndex(e.r0, e.g1, e.b1)] + t[this.getIndex(e.r0, e.g1, e.b0)] + t[this.getIndex(e.r0, e.g0, e.b1)] - t[this.getIndex(e.r0, e.g0, e.b0)];
|
|
3259
|
+
}
|
|
3260
|
+
bottom(e, t, n) {
|
|
3261
|
+
switch (t) {
|
|
3262
|
+
case Z.RED: return -n[this.getIndex(e.r0, e.g1, e.b1)] + n[this.getIndex(e.r0, e.g1, e.b0)] + n[this.getIndex(e.r0, e.g0, e.b1)] - n[this.getIndex(e.r0, e.g0, e.b0)];
|
|
3263
|
+
case Z.GREEN: return -n[this.getIndex(e.r1, e.g0, e.b1)] + n[this.getIndex(e.r1, e.g0, e.b0)] + n[this.getIndex(e.r0, e.g0, e.b1)] - n[this.getIndex(e.r0, e.g0, e.b0)];
|
|
3264
|
+
case Z.BLUE: return -n[this.getIndex(e.r1, e.g1, e.b0)] + n[this.getIndex(e.r1, e.g0, e.b0)] + n[this.getIndex(e.r0, e.g1, e.b0)] - n[this.getIndex(e.r0, e.g0, e.b0)];
|
|
3265
|
+
default: throw Error("unexpected direction $direction");
|
|
3266
|
+
}
|
|
3267
|
+
}
|
|
3268
|
+
top(e, t, n, r) {
|
|
3269
|
+
switch (t) {
|
|
3270
|
+
case Z.RED: return r[this.getIndex(n, e.g1, e.b1)] - r[this.getIndex(n, e.g1, e.b0)] - r[this.getIndex(n, e.g0, e.b1)] + r[this.getIndex(n, e.g0, e.b0)];
|
|
3271
|
+
case Z.GREEN: return r[this.getIndex(e.r1, n, e.b1)] - r[this.getIndex(e.r1, n, e.b0)] - r[this.getIndex(e.r0, n, e.b1)] + r[this.getIndex(e.r0, n, e.b0)];
|
|
3272
|
+
case Z.BLUE: return r[this.getIndex(e.r1, e.g1, n)] - r[this.getIndex(e.r1, e.g0, n)] - r[this.getIndex(e.r0, e.g1, n)] + r[this.getIndex(e.r0, e.g0, n)];
|
|
3273
|
+
default: throw Error("unexpected direction $direction");
|
|
3274
|
+
}
|
|
3275
|
+
}
|
|
3276
|
+
getIndex(e, t, n) {
|
|
3277
|
+
return (e << 10) + (e << 6) + e + (t << Se) + t + n;
|
|
3278
|
+
}
|
|
3279
|
+
}, Te = class {
|
|
3280
|
+
constructor(e = 0, t = 0, n = 0, r = 0, i = 0, a = 0, o = 0) {
|
|
3281
|
+
this.r0 = e, this.r1 = t, this.g0 = n, this.g1 = r, this.b0 = i, this.b1 = a, this.vol = o;
|
|
3282
|
+
}
|
|
3283
|
+
}, Ee = class {
|
|
3284
|
+
constructor(e, t) {
|
|
3285
|
+
this.requestedCount = e, this.resultCount = t;
|
|
3286
|
+
}
|
|
3287
|
+
}, De = class {
|
|
3288
|
+
constructor(e, t) {
|
|
3289
|
+
this.cutLocation = e, this.maximum = t;
|
|
3290
|
+
}
|
|
3291
|
+
}, Oe = class {
|
|
3292
|
+
static quantize(e, t) {
|
|
3293
|
+
let n = new we().quantize(e, t);
|
|
3294
|
+
return ye.quantize(e, n, t);
|
|
3295
|
+
}
|
|
3296
|
+
}, ke = class extends J {
|
|
3297
|
+
constructor(e, t, n, r = J.DEFAULT_SPEC_VERSION, i = J.DEFAULT_PLATFORM) {
|
|
3038
3298
|
super({
|
|
3039
3299
|
sourceColorHct: e,
|
|
3040
|
-
variant:
|
|
3300
|
+
variant: V.CONTENT,
|
|
3041
3301
|
contrastLevel: n,
|
|
3042
3302
|
isDark: t,
|
|
3043
3303
|
platform: i,
|
|
3044
3304
|
specVersion: r
|
|
3045
3305
|
});
|
|
3046
3306
|
}
|
|
3047
|
-
},
|
|
3048
|
-
constructor(e, t, n, r =
|
|
3307
|
+
}, Ae = class extends J {
|
|
3308
|
+
constructor(e, t, n, r = J.DEFAULT_SPEC_VERSION, i = J.DEFAULT_PLATFORM) {
|
|
3049
3309
|
super({
|
|
3050
3310
|
sourceColorHct: e,
|
|
3051
|
-
variant:
|
|
3311
|
+
variant: V.EXPRESSIVE,
|
|
3052
3312
|
contrastLevel: n,
|
|
3053
3313
|
isDark: t,
|
|
3054
3314
|
platform: i,
|
|
3055
3315
|
specVersion: r
|
|
3056
3316
|
});
|
|
3057
3317
|
}
|
|
3058
|
-
},
|
|
3059
|
-
constructor(e, t, n, r =
|
|
3318
|
+
}, je = class extends J {
|
|
3319
|
+
constructor(e, t, n, r = J.DEFAULT_SPEC_VERSION, i = J.DEFAULT_PLATFORM) {
|
|
3060
3320
|
super({
|
|
3061
3321
|
sourceColorHct: e,
|
|
3062
|
-
variant:
|
|
3322
|
+
variant: V.FIDELITY,
|
|
3063
3323
|
contrastLevel: n,
|
|
3064
3324
|
isDark: t,
|
|
3065
3325
|
platform: i,
|
|
3066
3326
|
specVersion: r
|
|
3067
3327
|
});
|
|
3068
3328
|
}
|
|
3069
|
-
},
|
|
3070
|
-
constructor(e, t, n, r =
|
|
3329
|
+
}, Me = class extends J {
|
|
3330
|
+
constructor(e, t, n, r = J.DEFAULT_SPEC_VERSION, i = J.DEFAULT_PLATFORM) {
|
|
3071
3331
|
super({
|
|
3072
3332
|
sourceColorHct: e,
|
|
3073
|
-
variant:
|
|
3333
|
+
variant: V.FRUIT_SALAD,
|
|
3074
3334
|
contrastLevel: n,
|
|
3075
3335
|
isDark: t,
|
|
3076
3336
|
platform: i,
|
|
3077
3337
|
specVersion: r
|
|
3078
3338
|
});
|
|
3079
3339
|
}
|
|
3080
|
-
},
|
|
3081
|
-
constructor(e, t, n, r =
|
|
3340
|
+
}, Ne = class extends J {
|
|
3341
|
+
constructor(e, t, n, r = J.DEFAULT_SPEC_VERSION, i = J.DEFAULT_PLATFORM) {
|
|
3082
3342
|
super({
|
|
3083
3343
|
sourceColorHct: e,
|
|
3084
|
-
variant:
|
|
3344
|
+
variant: V.MONOCHROME,
|
|
3085
3345
|
contrastLevel: n,
|
|
3086
3346
|
isDark: t,
|
|
3087
3347
|
platform: i,
|
|
3088
3348
|
specVersion: r
|
|
3089
3349
|
});
|
|
3090
3350
|
}
|
|
3091
|
-
},
|
|
3092
|
-
constructor(e, t, n, r =
|
|
3351
|
+
}, Pe = class extends J {
|
|
3352
|
+
constructor(e, t, n, r = J.DEFAULT_SPEC_VERSION, i = J.DEFAULT_PLATFORM) {
|
|
3093
3353
|
super({
|
|
3094
3354
|
sourceColorHct: e,
|
|
3095
|
-
variant:
|
|
3355
|
+
variant: V.NEUTRAL,
|
|
3096
3356
|
contrastLevel: n,
|
|
3097
3357
|
isDark: t,
|
|
3098
3358
|
platform: i,
|
|
3099
3359
|
specVersion: r
|
|
3100
3360
|
});
|
|
3101
3361
|
}
|
|
3102
|
-
},
|
|
3103
|
-
constructor(e, t, n, r =
|
|
3362
|
+
}, Fe = class extends J {
|
|
3363
|
+
constructor(e, t, n, r = J.DEFAULT_SPEC_VERSION, i = J.DEFAULT_PLATFORM) {
|
|
3104
3364
|
super({
|
|
3105
3365
|
sourceColorHct: e,
|
|
3106
|
-
variant:
|
|
3366
|
+
variant: V.RAINBOW,
|
|
3107
3367
|
contrastLevel: n,
|
|
3108
3368
|
isDark: t,
|
|
3109
3369
|
platform: i,
|
|
3110
3370
|
specVersion: r
|
|
3111
3371
|
});
|
|
3112
3372
|
}
|
|
3113
|
-
},
|
|
3114
|
-
constructor(e, t, n, r =
|
|
3373
|
+
}, Ie = class extends J {
|
|
3374
|
+
constructor(e, t, n, r = J.DEFAULT_SPEC_VERSION, i = J.DEFAULT_PLATFORM) {
|
|
3115
3375
|
super({
|
|
3116
3376
|
sourceColorHct: e,
|
|
3117
|
-
variant:
|
|
3377
|
+
variant: V.TONAL_SPOT,
|
|
3118
3378
|
contrastLevel: n,
|
|
3119
3379
|
isDark: t,
|
|
3120
3380
|
platform: i,
|
|
3121
3381
|
specVersion: r
|
|
3122
3382
|
});
|
|
3123
3383
|
}
|
|
3124
|
-
},
|
|
3125
|
-
constructor(e, t, n, r =
|
|
3384
|
+
}, Le = class extends J {
|
|
3385
|
+
constructor(e, t, n, r = J.DEFAULT_SPEC_VERSION, i = J.DEFAULT_PLATFORM) {
|
|
3126
3386
|
super({
|
|
3127
3387
|
sourceColorHct: e,
|
|
3128
|
-
variant:
|
|
3388
|
+
variant: V.VIBRANT,
|
|
3129
3389
|
contrastLevel: n,
|
|
3130
3390
|
isDark: t,
|
|
3131
3391
|
platform: i,
|
|
3132
3392
|
specVersion: r
|
|
3133
3393
|
});
|
|
3134
3394
|
}
|
|
3395
|
+
}, Re = {
|
|
3396
|
+
desired: 4,
|
|
3397
|
+
fallbackColorARGB: 4282549748,
|
|
3398
|
+
filter: !0
|
|
3135
3399
|
};
|
|
3400
|
+
function ze(e, t) {
|
|
3401
|
+
return e.score > t.score ? -1 : +(e.score < t.score);
|
|
3402
|
+
}
|
|
3403
|
+
var Q = class e {
|
|
3404
|
+
constructor() {}
|
|
3405
|
+
static score(t, n) {
|
|
3406
|
+
let { desired: r, fallbackColorARGB: a, filter: s } = {
|
|
3407
|
+
...Re,
|
|
3408
|
+
...n
|
|
3409
|
+
}, c = [], l = Array(360).fill(0), u = 0;
|
|
3410
|
+
for (let [e, n] of t.entries()) {
|
|
3411
|
+
let t = N.fromInt(e);
|
|
3412
|
+
c.push(t);
|
|
3413
|
+
let r = Math.floor(t.hue);
|
|
3414
|
+
l[r] += n, u += n;
|
|
3415
|
+
}
|
|
3416
|
+
let d = Array(360).fill(0);
|
|
3417
|
+
for (let e = 0; e < 360; e++) {
|
|
3418
|
+
let t = l[e] / u;
|
|
3419
|
+
for (let n = e - 14; n < e + 16; n++) {
|
|
3420
|
+
let e = i(n);
|
|
3421
|
+
d[e] += t;
|
|
3422
|
+
}
|
|
3423
|
+
}
|
|
3424
|
+
let f = [];
|
|
3425
|
+
for (let t of c) {
|
|
3426
|
+
let n = d[i(Math.round(t.hue))];
|
|
3427
|
+
if (s && (t.chroma < e.CUTOFF_CHROMA || n <= e.CUTOFF_EXCITED_PROPORTION)) continue;
|
|
3428
|
+
let r = n * 100 * e.WEIGHT_PROPORTION, a = t.chroma < e.TARGET_CHROMA ? e.WEIGHT_CHROMA_BELOW : e.WEIGHT_CHROMA_ABOVE, o = r + (t.chroma - e.TARGET_CHROMA) * a;
|
|
3429
|
+
f.push({
|
|
3430
|
+
hct: t,
|
|
3431
|
+
score: o
|
|
3432
|
+
});
|
|
3433
|
+
}
|
|
3434
|
+
f.sort(ze);
|
|
3435
|
+
let p = [];
|
|
3436
|
+
for (let e = 90; e >= 15; e--) {
|
|
3437
|
+
p.length = 0;
|
|
3438
|
+
for (let { hct: t } of f) if (p.find((n) => o(t.hue, n.hue) < e) || p.push(t), p.length >= r) break;
|
|
3439
|
+
if (p.length >= r) break;
|
|
3440
|
+
}
|
|
3441
|
+
let m = [];
|
|
3442
|
+
p.length === 0 && m.push(a);
|
|
3443
|
+
for (let e of p) m.push(e.toInt());
|
|
3444
|
+
return m;
|
|
3445
|
+
}
|
|
3446
|
+
};
|
|
3447
|
+
Q.TARGET_CHROMA = 48, Q.WEIGHT_PROPORTION = .7, Q.WEIGHT_CHROMA_ABOVE = .3, Q.WEIGHT_CHROMA_BELOW = .1, Q.CUTOFF_CHROMA = 5, Q.CUTOFF_EXCITED_PROPORTION = .01;
|
|
3136
3448
|
//#endregion
|
|
3137
3449
|
//#region node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/utils/string_utils.js
|
|
3138
|
-
function
|
|
3139
|
-
let t =
|
|
3450
|
+
function Be(e) {
|
|
3451
|
+
let t = m(e), n = h(e), r = g(e), i = [
|
|
3140
3452
|
t.toString(16),
|
|
3141
3453
|
n.toString(16),
|
|
3142
3454
|
r.toString(16)
|
|
@@ -3144,7 +3456,7 @@ function ye(e) {
|
|
|
3144
3456
|
for (let [e, t] of i.entries()) t.length === 1 && (i[e] = "0" + t);
|
|
3145
3457
|
return "#" + i.join("");
|
|
3146
3458
|
}
|
|
3147
|
-
function
|
|
3459
|
+
function Ve(e) {
|
|
3148
3460
|
e = e.replace("#", "");
|
|
3149
3461
|
let t = e.length === 3, n = e.length === 6, r = e.length === 8;
|
|
3150
3462
|
if (!t && !n && !r) throw Error("unexpected hex " + e);
|
|
@@ -3155,6 +3467,19 @@ function $(e) {
|
|
|
3155
3467
|
return parseInt(e, 16);
|
|
3156
3468
|
}
|
|
3157
3469
|
//#endregion
|
|
3158
|
-
|
|
3470
|
+
//#region node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/utils/image_utils.js
|
|
3471
|
+
function He(e) {
|
|
3472
|
+
let t = [];
|
|
3473
|
+
for (let n = 0; n < e.length; n += 4) {
|
|
3474
|
+
let r = e[n], i = e[n + 1], a = e[n + 2];
|
|
3475
|
+
if (e[n + 3] < 255) continue;
|
|
3476
|
+
let o = d(r, i, a);
|
|
3477
|
+
t.push(o);
|
|
3478
|
+
}
|
|
3479
|
+
let n = Oe.quantize(t, 128);
|
|
3480
|
+
return Q.score(n)[0];
|
|
3481
|
+
}
|
|
3482
|
+
//#endregion
|
|
3483
|
+
export { N as Hct, q as MaterialDynamicColors, ke as SchemeContent, Ae as SchemeExpressive, je as SchemeFidelity, Me as SchemeFruitSalad, Ne as SchemeMonochrome, Pe as SchemeNeutral, Fe as SchemeRainbow, Ie as SchemeTonalSpot, Le as SchemeVibrant, Ve as argbFromHex, Be as hexFromArgb, He as sourceColorFromImageBytes };
|
|
3159
3484
|
|
|
3160
|
-
//# sourceMappingURL=material-color-utilities-
|
|
3485
|
+
//# sourceMappingURL=material-color-utilities-C_iikgRm.js.map
|