@gradient-ui/core 0.2.1 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/README.md +58 -2
  2. package/dist/GLoading.vue_vue_type_style_index_0_lang-Bv3dWEq8.cjs +1 -0
  3. package/dist/GLoading.vue_vue_type_style_index_0_lang-CBB_GocW.js +466 -0
  4. package/dist/GSwitch.vue_vue_type_script_setup_true_lang-BS6bb1XY.cjs +1 -0
  5. package/dist/GSwitch.vue_vue_type_script_setup_true_lang-UTBNFP5X.js +7015 -0
  6. package/dist/{default-585QCoXx.js → camelToKebabCase-6qY6WHvl.js} +987 -1194
  7. package/dist/camelToKebabCase-BQDotaQm.cjs +316 -0
  8. package/dist/components.cjs +1 -1
  9. package/dist/components.mjs +55 -51
  10. package/dist/default-BhuY-A3o.cjs +4 -0
  11. package/dist/default-OTmCd0Aq.js +131 -0
  12. package/dist/directives.cjs +1 -1
  13. package/dist/directives.mjs +6 -5
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.mjs +184 -110
  16. package/dist/mask-BbofdFd4.cjs +1 -0
  17. package/dist/mask-CZX-I_iy.js +936 -0
  18. package/dist/material-Ca7ZZAiO.cjs +194 -0
  19. package/dist/material-okvXHenb.js +1162 -0
  20. package/dist/materialSurface-BBrP9ltj.js +591 -0
  21. package/dist/materialSurface-CK8LN_dU.cjs +1 -0
  22. package/dist/services.cjs +1 -1
  23. package/dist/services.mjs +1 -1
  24. package/dist/style.css +1 -1
  25. package/dist/surface-8z3gR7vF.cjs +1 -0
  26. package/dist/surface-BKu4KfkY.js +288 -0
  27. package/dist/theme.cjs +1 -1
  28. package/dist/theme.mjs +55 -9
  29. package/dist/types/components/index.d.ts +5 -1
  30. package/dist/types/components/ui/BaseOverlay/BaseOverlay.vue.d.ts +1 -1
  31. package/dist/types/components/ui/GAlert/GAlert.vue.d.ts +675 -9
  32. package/dist/types/components/ui/GAlert/types.d.ts +352 -4
  33. package/dist/types/components/ui/GAside/GAside.vue.d.ts +7 -5
  34. package/dist/types/components/ui/GAside/types.d.ts +17 -6
  35. package/dist/types/components/ui/GBadge/GBadge.vue.d.ts +679 -13
  36. package/dist/types/components/ui/GBadge/types.d.ts +350 -3
  37. package/dist/types/components/ui/GButton/GButton.vue.d.ts +357 -27
  38. package/dist/types/components/ui/GButton/types.d.ts +230 -49
  39. package/dist/types/components/ui/GCheckControl/GCheckControl.vue.d.ts +24 -24
  40. package/dist/types/components/ui/GCheckControl/GCheckGroup.vue.d.ts +24 -24
  41. package/dist/types/components/ui/GCheckbox/GCheckbox.vue.d.ts +24 -24
  42. package/dist/types/components/ui/GChip/GChip.vue.d.ts +295 -25
  43. package/dist/types/components/ui/GChip/types.d.ts +188 -43
  44. package/dist/types/components/ui/GDrawer/GDrawer.vue.d.ts +1 -1
  45. package/dist/types/components/ui/GExpansion/GExpansion.vue.d.ts +47 -13
  46. package/dist/types/components/ui/GExpansion/types.d.ts +284 -22
  47. package/dist/types/components/ui/GFAB/GFAB.vue.d.ts +220 -7
  48. package/dist/types/components/ui/GFAB/types.d.ts +122 -3
  49. package/dist/types/components/ui/GFieldBase/GFieldBase.vue.d.ts +15 -15
  50. package/dist/types/components/ui/GFieldBase/props.d.ts +10 -10
  51. package/dist/types/components/ui/GForm/GForm.vue.d.ts +156 -0
  52. package/dist/types/components/ui/GForm/index.d.ts +2 -0
  53. package/dist/types/components/ui/GForm/types.d.ts +107 -0
  54. package/dist/types/components/ui/GGradient/GGradient.vue.d.ts +165 -66
  55. package/dist/types/components/ui/GGradient/GGradientBorderLayer.vue.d.ts +11 -0
  56. package/dist/types/components/ui/GGradient/index.d.ts +1 -0
  57. package/dist/types/components/ui/GGradient/types.d.ts +10 -1
  58. package/dist/types/components/ui/GGradientMaterial/GGradientMaterial.vue.d.ts +257 -0
  59. package/dist/types/components/ui/GGradientMaterial/index.d.ts +2 -0
  60. package/dist/types/components/ui/GGradientMaterial/types.d.ts +140 -0
  61. package/dist/types/components/ui/GInput/GInput.vue.d.ts +15 -15
  62. package/dist/types/components/ui/GLoading/GLoading.vue.d.ts +5 -5
  63. package/dist/types/components/ui/GLoading/types.d.ts +3 -2
  64. package/dist/types/components/ui/GMenu/GSubmenu.vue.d.ts +14 -14
  65. package/dist/types/components/ui/GMenuItem/GMenuItem.vue.d.ts +11 -11
  66. package/dist/types/components/ui/GMenuItem/types.d.ts +4 -4
  67. package/dist/types/components/ui/GModal/GModal.vue.d.ts +1 -1
  68. package/dist/types/components/ui/GNavList/GNavList.vue.d.ts +7 -5
  69. package/dist/types/components/ui/GNavList/types.d.ts +17 -6
  70. package/dist/types/components/ui/GNavbar/GNavbar.vue.d.ts +4 -4
  71. package/dist/types/components/ui/GNavbar/GNavbarItem.vue.d.ts +3 -3
  72. package/dist/types/components/ui/GNavbar/GNavbarMenu.vue.d.ts +3 -3
  73. package/dist/types/components/ui/GNavbar/types.d.ts +6 -6
  74. package/dist/types/components/ui/GProgress/GProgress.vue.d.ts +41 -20
  75. package/dist/types/components/ui/GProgress/types.d.ts +23 -10
  76. package/dist/types/components/ui/GQuickActions/GQuickActions.vue.d.ts +1 -1
  77. package/dist/types/components/ui/GSelectItem.vue.d.ts +5 -3
  78. package/dist/types/components/ui/GSnackbar/GSnackbar.vue.d.ts +681 -15
  79. package/dist/types/components/ui/GSnackbar/types.d.ts +350 -3
  80. package/dist/types/components/ui/GSquircle/GSquircle.vue.d.ts +2 -2
  81. package/dist/types/components/ui/GSquircle/types.d.ts +8 -2
  82. package/dist/types/components/ui/GSwitch/GSwitch.vue.d.ts +24 -24
  83. package/dist/types/components/ui/GTable/GTable.vue.d.ts +191 -0
  84. package/dist/types/components/ui/GTable/GTableBody.vue.d.ts +69 -0
  85. package/dist/types/components/ui/GTable/GTableCell.vue.d.ts +35 -0
  86. package/dist/types/components/ui/GTable/GTableExpandedRow.vue.d.ts +25 -0
  87. package/dist/types/components/ui/GTable/GTableHead.vue.d.ts +30 -0
  88. package/dist/types/components/ui/GTable/GTableRow.vue.d.ts +40 -0
  89. package/dist/types/components/ui/GTable/context.d.ts +25 -0
  90. package/dist/types/components/ui/GTable/index.d.ts +3 -0
  91. package/dist/types/components/ui/GTable/types.d.ts +666 -0
  92. package/dist/types/components/ui/GTable/useTable.d.ts +22 -0
  93. package/dist/types/components/ui/GTable/useTableExpansion.d.ts +17 -0
  94. package/dist/types/components/ui/GTable/useTableSpans.d.ts +12 -0
  95. package/dist/types/components/ui/GTabs/GTabs.vue.d.ts +4 -4
  96. package/dist/types/components/ui/GTabs/types.d.ts +6 -6
  97. package/dist/types/components/ui/GTextarea/GTextarea.vue.d.ts +15 -15
  98. package/dist/types/components/ui/GToggleButton/GToggleButton.vue.d.ts +490 -16
  99. package/dist/types/components/ui/GToggleButton/types.d.ts +284 -32
  100. package/dist/types/directives/index.d.ts +2 -0
  101. package/dist/types/directives/ripple.d.ts +1 -1
  102. package/dist/types/directives/specular.d.ts +34 -0
  103. package/dist/types/theme/color.d.ts +11 -0
  104. package/dist/types/theme/colorSeeds.d.ts +21 -20
  105. package/dist/types/theme/colorSystem.d.ts +12 -0
  106. package/dist/types/theme/cssTokens.d.ts +7 -0
  107. package/dist/types/theme/default.d.ts +26 -80
  108. package/dist/types/theme/gradient/animation/css.d.ts +12 -0
  109. package/dist/types/theme/gradient/animation/index.d.ts +1 -0
  110. package/dist/types/theme/gradient/colorMath.d.ts +3 -0
  111. package/dist/types/theme/gradient/constants.d.ts +3 -0
  112. package/dist/types/theme/gradient/core.d.ts +1 -0
  113. package/dist/types/theme/gradient/effects/index.d.ts +1 -0
  114. package/dist/types/theme/gradient/effects/morph.d.ts +5 -0
  115. package/dist/types/theme/gradient/effects/shadow.d.ts +3 -0
  116. package/dist/types/theme/gradient/formatters/canvas.d.ts +2 -0
  117. package/dist/types/theme/gradient/formatters/css.d.ts +3 -0
  118. package/dist/types/theme/gradient/formatters/index.d.ts +1 -0
  119. package/dist/types/theme/gradient/formatters/svg.d.ts +5 -0
  120. package/dist/types/theme/gradient/index.d.ts +1 -0
  121. package/dist/types/theme/gradient/material.d.ts +1 -0
  122. package/dist/types/theme/gradient/model.d.ts +5 -0
  123. package/dist/types/theme/gradient/presets.d.ts +158 -0
  124. package/dist/types/theme/gradient/recipes.d.ts +14 -0
  125. package/dist/types/theme/gradient/tokens.d.ts +72 -0
  126. package/dist/types/theme/gradient/types.d.ts +117 -0
  127. package/dist/types/theme/gradient/utils.d.ts +10 -0
  128. package/dist/types/theme/gradient.d.ts +1 -0
  129. package/dist/types/theme/index.d.ts +12 -1
  130. package/dist/types/theme/palette.d.ts +13 -0
  131. package/dist/types/theme/scheme.d.ts +2 -0
  132. package/dist/types/theme/types.d.ts +11 -0
  133. package/dist/types/use/actionSurface.d.ts +1742 -20
  134. package/dist/types/use/check/booleanControl.d.ts +9 -9
  135. package/dist/types/use/check/optionGroup.d.ts +9 -7
  136. package/dist/types/use/check/types.d.ts +26 -26
  137. package/dist/types/use/color.d.ts +2 -2
  138. package/dist/types/use/colorResolver.d.ts +15 -5
  139. package/dist/types/use/form/context.d.ts +8 -0
  140. package/dist/types/use/form/control.d.ts +4 -0
  141. package/dist/types/use/form/props.d.ts +4 -4
  142. package/dist/types/use/form/textFieldControl.d.ts +1 -1
  143. package/dist/types/use/glass.d.ts +24 -0
  144. package/dist/types/use/gradient.d.ts +1759 -43
  145. package/dist/types/use/gradientGlow.d.ts +4 -4
  146. package/dist/types/use/gradientMaterial.d.ts +21 -0
  147. package/dist/types/use/gradientRuntime.d.ts +11 -0
  148. package/dist/types/use/gradientRuntimeRegistry.d.ts +8 -0
  149. package/dist/types/use/gradientSurface.d.ts +31 -4
  150. package/dist/types/use/index.d.ts +9 -0
  151. package/dist/types/use/input/props.d.ts +11 -11
  152. package/dist/types/use/material.d.ts +112 -0
  153. package/dist/types/use/materialSurface.d.ts +376 -0
  154. package/dist/types/use/surface.d.ts +67 -19
  155. package/dist/types/use/surfaceColor.d.ts +1 -1
  156. package/dist/types/use/tagName.d.ts +47 -0
  157. package/dist/types/use/textarea/props.d.ts +11 -11
  158. package/dist/types/use/variant.d.ts +1 -1
  159. package/dist/use.cjs +1 -1
  160. package/dist/use.mjs +42 -19
  161. package/dist/useSnackbar-BHQshEZ8.cjs +1 -0
  162. package/dist/useSnackbar-DeNHZH8v.js +908 -0
  163. package/package.json +11 -4
  164. package/dist/GLoading.vue_vue_type_style_index_0_lang-CqbeZChH.cjs +0 -1
  165. package/dist/GLoading.vue_vue_type_style_index_0_lang-DDqJEYGf.js +0 -691
  166. package/dist/GSwitch.vue_vue_type_script_setup_true_lang-DVKJZfcV.cjs +0 -4
  167. package/dist/GSwitch.vue_vue_type_script_setup_true_lang-hL_S3ZHD.js +0 -5633
  168. package/dist/camelToKebabCase-BAESShJ1.cjs +0 -1
  169. package/dist/camelToKebabCase-KgkZ7-1F.js +0 -28
  170. package/dist/default-BcPApP1Q.cjs +0 -318
  171. package/dist/icon-0-mbYGMr.cjs +0 -1
  172. package/dist/icon-BrFRYYf3.js +0 -66
  173. package/dist/mask-BgaDaVWU.js +0 -816
  174. package/dist/mask-pzGv8apS.cjs +0 -1
  175. package/dist/types/theme/changeTone.d.ts +0 -1
  176. package/dist/types/theme/colorPallete.d.ts +0 -2
  177. package/dist/types/theme/generateColors.d.ts +0 -1
  178. package/dist/types/theme/generateGradient.d.ts +0 -9
  179. package/dist/types/theme/getComplementaryColor.d.ts +0 -1
  180. package/dist/types/utils/color.d.ts +0 -3
  181. package/dist/types/utils/colors/normaliseColor.d.ts +0 -5
  182. package/dist/useSnackbar-CFrWSpt4.cjs +0 -1
  183. package/dist/useSnackbar-lGrTDbl-.js +0 -763
@@ -1,5 +1,64 @@
1
- import { M as Ee, c as yt } from "./camelToKebabCase-KgkZ7-1F.js";
2
- import { ref as je, shallowRef as Pt, provide as kt, inject as bt } from "vue";
1
+ const Pr = {
2
+ red: "#F44336",
3
+ pink: "#E91E63",
4
+ purple: "#9C27B0",
5
+ deepPurple: "#673AB7",
6
+ indigo: "#3F51B5",
7
+ blue: "#2196F3",
8
+ lightBlue: "#03A9F4",
9
+ cyan: "#00BCD4",
10
+ teal: "#009688",
11
+ green: "#4CAF50",
12
+ lightGreen: "#8BC34A",
13
+ lime: "#CDDC39",
14
+ yellow: "#FFEB3B",
15
+ amber: "#FFC107",
16
+ orange: "#FF9800",
17
+ deepOrange: "#FF5722",
18
+ brown: "#795548",
19
+ grey: "#9E9E9E",
20
+ blueGrey: "#607D8B"
21
+ }, de = (a, e = 0, r = 1) => Math.min(r, Math.max(e, a)), pe = (a) => {
22
+ const e = a / 255;
23
+ return e <= 0.04045 ? e / 12.92 : ((e + 0.055) / 1.055) ** 2.4;
24
+ }, _e = (a) => {
25
+ const e = a.slice(1), r = e.length === 3 || e.length === 4 ? e.slice(0, 3).split("").map((t) => t.repeat(2)).join("") : e.slice(0, 6);
26
+ return r.length !== 6 || !/^[\da-f]{6}$/i.test(r) ? null : {
27
+ r: parseInt(r.slice(0, 2), 16),
28
+ g: parseInt(r.slice(2, 4), 16),
29
+ b: parseInt(r.slice(4, 6), 16)
30
+ };
31
+ }, He = (a) => {
32
+ const e = a.match(
33
+ /^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*[\d.]+%?)?\s*\)$/i
34
+ );
35
+ return e ? {
36
+ r: de(Number(e[1]), 0, 255),
37
+ g: de(Number(e[2]), 0, 255),
38
+ b: de(Number(e[3]), 0, 255)
39
+ } : null;
40
+ }, me = (a) => {
41
+ if (typeof a == "number") {
42
+ const r = a & 16777215;
43
+ return {
44
+ r: r >> 16 & 255,
45
+ g: r >> 8 & 255,
46
+ b: r & 255
47
+ };
48
+ }
49
+ const e = a.trim();
50
+ return e.startsWith("#") ? _e(e) : e.toLowerCase().startsWith("rgb") ? He(e) : null;
51
+ }, Ue = ({ r: a, g: e, b: r }) => `#${[a, e, r].map((t) => Math.round(t).toString(16).padStart(2, "0")).join("")}`, kr = ({ r: a, g: e, b: r }) => `${Math.round(a)}, ${Math.round(e)}, ${Math.round(r)}`, Ye = (a, e) => {
52
+ const r = me(a) ?? me(e);
53
+ if (!r)
54
+ throw new Error(`Invalid fallback color: ${e}`);
55
+ return Ue(r);
56
+ }, ze = (a) => 0.2126 * pe(a.r) + 0.7152 * pe(a.g) + 0.0722 * pe(a.b), Cr = (a) => {
57
+ const e = me(a);
58
+ if (!e) return "#ffffff";
59
+ const r = ze(e), t = 1.05 / (r + 0.05), n = (r + 0.05) / 0.055;
60
+ return t >= n ? "#ffffff" : "#0d0d12";
61
+ };
3
62
  /**
4
63
  * @license
5
64
  * Copyright 2021 Google LLC
@@ -16,30 +75,30 @@ import { ref as je, shallowRef as Pt, provide as kt, inject as bt } from "vue";
16
75
  * See the License for the specific language governing permissions and
17
76
  * limitations under the License.
18
77
  */
19
- function j(r) {
20
- return r < 0 ? -1 : r === 0 ? 0 : 1;
78
+ function z(a) {
79
+ return a < 0 ? -1 : a === 0 ? 0 : 1;
21
80
  }
22
- function fe(r, e, t) {
23
- return (1 - t) * r + t * e;
81
+ function ne(a, e, r) {
82
+ return (1 - r) * a + r * e;
24
83
  }
25
- function St(r, e, t) {
26
- return t < r ? r : t > e ? e : t;
84
+ function Ke(a, e, r) {
85
+ return r < a ? a : r > e ? e : r;
27
86
  }
28
- function U(r, e, t) {
29
- return t < r ? r : t > e ? e : t;
87
+ function H(a, e, r) {
88
+ return r < a ? a : r > e ? e : r;
30
89
  }
31
- function be(r) {
32
- return r = r % 360, r < 0 && (r = r + 360), r;
90
+ function ce(a) {
91
+ return a = a % 360, a < 0 && (a = a + 360), a;
33
92
  }
34
- function Ct(r, e) {
35
- return be(e - r) <= 180 ? 1 : -1;
93
+ function je(a, e) {
94
+ return ce(e - a) <= 180 ? 1 : -1;
36
95
  }
37
- function Tt(r, e) {
38
- return 180 - Math.abs(Math.abs(r - e) - 180);
96
+ function qe(a, e) {
97
+ return 180 - Math.abs(Math.abs(a - e) - 180);
39
98
  }
40
- function Le(r, e) {
41
- const t = r[0] * e[0][0] + r[1] * e[0][1] + r[2] * e[0][2], n = r[0] * e[1][0] + r[1] * e[1][1] + r[2] * e[1][2], a = r[0] * e[2][0] + r[1] * e[2][1] + r[2] * e[2][2];
42
- return [t, n, a];
99
+ function ye(a, e) {
100
+ const r = a[0] * e[0][0] + a[1] * e[0][1] + a[2] * e[0][2], t = a[0] * e[1][0] + a[1] * e[1][1] + a[2] * e[1][2], n = a[0] * e[2][0] + a[1] * e[2][1] + a[2] * e[2][2];
101
+ return [r, t, n];
43
102
  }
44
103
  /**
45
104
  * @license
@@ -57,11 +116,11 @@ function Le(r, e) {
57
116
  * See the License for the specific language governing permissions and
58
117
  * limitations under the License.
59
118
  */
60
- const vt = [
119
+ const $e = [
61
120
  [0.41233895, 0.35762064, 0.18051042],
62
121
  [0.2126, 0.7152, 0.0722],
63
122
  [0.01932141, 0.11916382, 0.95034478]
64
- ], Dt = [
123
+ ], Xe = [
65
124
  [
66
125
  3.2413774792388685,
67
126
  -1.5376652402851851,
@@ -77,64 +136,64 @@ const vt = [
77
136
  -0.20395524564742123,
78
137
  1.0571799111220335
79
138
  ]
80
- ], wt = [95.047, 100, 108.883];
81
- function Se(r, e, t) {
82
- return (255 << 24 | (r & 255) << 16 | (e & 255) << 8 | t & 255) >>> 0;
139
+ ], Ge = [95.047, 100, 108.883];
140
+ function ke(a, e, r) {
141
+ return (255 << 24 | (a & 255) << 16 | (e & 255) << 8 | r & 255) >>> 0;
83
142
  }
84
- function Ke(r) {
85
- const e = ie(r[0]), t = ie(r[1]), n = ie(r[2]);
86
- return Se(e, t, n);
143
+ function Fe(a) {
144
+ const e = Q(a[0]), r = Q(a[1]), t = Q(a[2]);
145
+ return ke(e, r, t);
87
146
  }
88
- function at(r) {
89
- return r >> 16 & 255;
147
+ function xe(a) {
148
+ return a >> 16 & 255;
90
149
  }
91
- function ot(r) {
92
- return r >> 8 & 255;
150
+ function Be(a) {
151
+ return a >> 8 & 255;
93
152
  }
94
- function it(r) {
95
- return r & 255;
153
+ function ve(a) {
154
+ return a & 255;
96
155
  }
97
- function Ft(r, e, t) {
98
- const n = Dt, a = n[0][0] * r + n[0][1] * e + n[0][2] * t, o = n[1][0] * r + n[1][1] * e + n[1][2] * t, i = n[2][0] * r + n[2][1] * e + n[2][2] * t, u = ie(a), l = ie(o), h = ie(i);
99
- return Se(u, l, h);
156
+ function Je(a, e, r) {
157
+ const t = Xe, n = t[0][0] * a + t[0][1] * e + t[0][2] * r, s = t[1][0] * a + t[1][1] * e + t[1][2] * r, i = t[2][0] * a + t[2][1] * e + t[2][2] * r, u = Q(n), l = Q(s), h = Q(i);
158
+ return ke(u, l, h);
100
159
  }
101
- function xt(r) {
102
- const e = le(at(r)), t = le(ot(r)), n = le(it(r));
103
- return Le([e, t, n], vt);
160
+ function We(a) {
161
+ const e = te(xe(a)), r = te(Be(a)), t = te(ve(a));
162
+ return ye([e, r, t], $e);
104
163
  }
105
- function Mt(r) {
106
- const e = ae(r), t = ie(e);
107
- return Se(t, t, t);
164
+ function Ze(a) {
165
+ const e = Z(a), r = Q(e);
166
+ return ke(r, r, r);
108
167
  }
109
- function Oe(r) {
110
- const e = xt(r)[1];
111
- return 116 * st(e / 100) - 16;
168
+ function ge(a) {
169
+ const e = We(a)[1];
170
+ return 116 * Ae(e / 100) - 16;
112
171
  }
113
- function ae(r) {
114
- return 100 * At((r + 16) / 116);
172
+ function Z(a) {
173
+ return 100 * er((a + 16) / 116);
115
174
  }
116
- function Re(r) {
117
- return st(r / 100) * 116 - 16;
175
+ function Pe(a) {
176
+ return Ae(a / 100) * 116 - 16;
118
177
  }
119
- function le(r) {
120
- const e = r / 255;
178
+ function te(a) {
179
+ const e = a / 255;
121
180
  return e <= 0.040449936 ? e / 12.92 * 100 : Math.pow((e + 0.055) / 1.055, 2.4) * 100;
122
181
  }
123
- function ie(r) {
124
- const e = r / 100;
125
- let t = 0;
126
- return e <= 31308e-7 ? t = e * 12.92 : t = 1.055 * Math.pow(e, 1 / 2.4) - 0.055, St(0, 255, Math.round(t * 255));
182
+ function Q(a) {
183
+ const e = a / 100;
184
+ let r = 0;
185
+ return e <= 31308e-7 ? r = e * 12.92 : r = 1.055 * Math.pow(e, 1 / 2.4) - 0.055, Ke(0, 255, Math.round(r * 255));
127
186
  }
128
- function Bt() {
129
- return wt;
187
+ function Qe() {
188
+ return Ge;
130
189
  }
131
- function st(r) {
132
- const e = 0.008856451679035631, t = 24389 / 27;
133
- return r > e ? Math.pow(r, 1 / 3) : (t * r + 16) / 116;
190
+ function Ae(a) {
191
+ const e = 0.008856451679035631, r = 24389 / 27;
192
+ return a > e ? Math.pow(a, 1 / 3) : (r * a + 16) / 116;
134
193
  }
135
- function At(r) {
136
- const e = 0.008856451679035631, t = 24389 / 27, n = r * r * r;
137
- return n > e ? n : (116 * r - 16) / t;
194
+ function er(a) {
195
+ const e = 0.008856451679035631, r = 24389 / 27, t = a * a * a;
196
+ return t > e ? t : (116 * a - 16) / r;
138
197
  }
139
198
  /**
140
199
  * @license
@@ -152,7 +211,7 @@ function At(r) {
152
211
  * See the License for the specific language governing permissions and
153
212
  * limitations under the License.
154
213
  */
155
- class J {
214
+ class j {
156
215
  /**
157
216
  * Create ViewingConditions from a simple, physically relevant, set of
158
217
  * parameters.
@@ -175,24 +234,24 @@ class J {
175
234
  * default = false, the eye does not perform this process on
176
235
  * self-luminous objects like displays.
177
236
  */
178
- static make(e = Bt(), t = 200 / Math.PI * ae(50) / 100, n = 50, a = 2, o = !1) {
179
- const i = e, u = i[0] * 0.401288 + i[1] * 0.650173 + i[2] * -0.051461, l = i[0] * -0.250268 + i[1] * 1.204414 + i[2] * 0.045854, h = i[0] * -2079e-6 + i[1] * 0.048952 + i[2] * 0.953127, f = 0.8 + a / 10, g = f >= 0.9 ? fe(0.59, 0.69, (f - 0.9) * 10) : fe(0.525, 0.59, (f - 0.8) * 10);
180
- let p = o ? 1 : f * (1 - 1 / 3.6 * Math.exp((-t - 42) / 92));
237
+ static make(e = Qe(), r = 200 / Math.PI * Z(50) / 100, t = 50, n = 2, s = !1) {
238
+ const i = e, u = i[0] * 0.401288 + i[1] * 0.650173 + i[2] * -0.051461, l = i[0] * -0.250268 + i[1] * 1.204414 + i[2] * 0.045854, h = i[0] * -2079e-6 + i[1] * 0.048952 + i[2] * 0.953127, d = 0.8 + n / 10, C = d >= 0.9 ? ne(0.59, 0.69, (d - 0.9) * 10) : ne(0.525, 0.59, (d - 0.8) * 10);
239
+ let p = s ? 1 : d * (1 - 1 / 3.6 * Math.exp((-r - 42) / 92));
181
240
  p = p > 1 ? 1 : p < 0 ? 0 : p;
182
- const v = f, m = [
241
+ const D = d, m = [
183
242
  p * (100 / u) + 1 - p,
184
243
  p * (100 / l) + 1 - p,
185
244
  p * (100 / h) + 1 - p
186
- ], P = 1 / (5 * t + 1), k = P * P * P * P, B = 1 - k, x = k * t + 0.1 * B * B * Math.cbrt(5 * t), O = ae(n) / e[1], R = 1.48 + Math.sqrt(O), V = 0.725 / Math.pow(O, 0.2), I = V, F = [
187
- Math.pow(x * m[0] * u / 100, 0.42),
188
- Math.pow(x * m[1] * l / 100, 0.42),
189
- Math.pow(x * m[2] * h / 100, 0.42)
245
+ ], g = 1 / (5 * r + 1), P = g * g * g * g, A = 1 - P, B = P * r + 0.1 * A * A * Math.cbrt(5 * r), O = Z(t) / e[1], R = 1.48 + Math.sqrt(O), V = 0.725 / Math.pow(O, 0.2), I = V, x = [
246
+ Math.pow(B * m[0] * u / 100, 0.42),
247
+ Math.pow(B * m[1] * l / 100, 0.42),
248
+ Math.pow(B * m[2] * h / 100, 0.42)
190
249
  ], L = [
191
- 400 * F[0] / (F[0] + 27.13),
192
- 400 * F[1] / (F[1] + 27.13),
193
- 400 * F[2] / (F[2] + 27.13)
194
- ], z = (2 * L[0] + L[1] + 0.05 * L[2]) * V;
195
- return new J(O, z, V, I, g, v, m, x, Math.pow(x, 0.25), R);
250
+ 400 * x[0] / (x[0] + 27.13),
251
+ 400 * x[1] / (x[1] + 27.13),
252
+ 400 * x[2] / (x[2] + 27.13)
253
+ ], _ = (2 * L[0] + L[1] + 0.05 * L[2]) * V;
254
+ return new j(O, _, V, I, C, D, m, B, Math.pow(B, 0.25), R);
196
255
  }
197
256
  /**
198
257
  * Parameters are intermediate values of the CAM16 conversion process. Their
@@ -201,11 +260,11 @@ class J {
201
260
  * is available in the CAM16 specification, and a complete overview requires
202
261
  * a color science textbook, such as Fairchild's Color Appearance Models.
203
262
  */
204
- constructor(e, t, n, a, o, i, u, l, h, f) {
205
- this.n = e, this.aw = t, this.nbb = n, this.ncb = a, this.c = o, this.nc = i, this.rgbD = u, this.fl = l, this.fLRoot = h, this.z = f;
263
+ constructor(e, r, t, n, s, i, u, l, h, d) {
264
+ this.n = e, this.aw = r, this.nbb = t, this.ncb = n, this.c = s, this.nc = i, this.rgbD = u, this.fl = l, this.fLRoot = h, this.z = d;
206
265
  }
207
266
  }
208
- J.DEFAULT = J.make();
267
+ j.DEFAULT = j.make();
209
268
  /**
210
269
  * @license
211
270
  * Copyright 2021 Google LLC
@@ -222,7 +281,7 @@ J.DEFAULT = J.make();
222
281
  * See the License for the specific language governing permissions and
223
282
  * limitations under the License.
224
283
  */
225
- class H {
284
+ class N {
226
285
  /**
227
286
  * All of the CAM16 dimensions can be calculated from 3 of the dimensions, in
228
287
  * the following combinations:
@@ -243,8 +302,8 @@ class H {
243
302
  * @param astar CAM16-UCS a coordinate
244
303
  * @param bstar CAM16-UCS b coordinate
245
304
  */
246
- constructor(e, t, n, a, o, i, u, l, h) {
247
- this.hue = e, this.chroma = t, this.j = n, this.q = a, this.m = o, this.s = i, this.jstar = u, this.astar = l, this.bstar = h;
305
+ constructor(e, r, t, n, s, i, u, l, h) {
306
+ this.hue = e, this.chroma = r, this.j = t, this.q = n, this.m = s, this.s = i, this.jstar = u, this.astar = l, this.bstar = h;
248
307
  }
249
308
  /**
250
309
  * CAM16 instances also have coordinates in the CAM16-UCS space, called J*,
@@ -252,8 +311,8 @@ class H {
252
311
  * specification, and is used to measure distances between colors.
253
312
  */
254
313
  distance(e) {
255
- const t = this.jstar - e.jstar, n = this.astar - e.astar, a = this.bstar - e.bstar, o = Math.sqrt(t * t + n * n + a * a);
256
- return 1.41 * Math.pow(o, 0.63);
314
+ const r = this.jstar - e.jstar, t = this.astar - e.astar, n = this.bstar - e.bstar, s = Math.sqrt(r * r + t * t + n * n);
315
+ return 1.41 * Math.pow(s, 0.63);
257
316
  }
258
317
  /**
259
318
  * @param argb ARGB representation of a color.
@@ -261,7 +320,7 @@ class H {
261
320
  * conditions.
262
321
  */
263
322
  static fromInt(e) {
264
- return H.fromIntInViewingConditions(e, J.DEFAULT);
323
+ return N.fromIntInViewingConditions(e, j.DEFAULT);
265
324
  }
266
325
  /**
267
326
  * @param argb ARGB representation of a color.
@@ -269,17 +328,17 @@ class H {
269
328
  * was observed.
270
329
  * @return CAM16 color.
271
330
  */
272
- static fromIntInViewingConditions(e, t) {
273
- const n = (e & 16711680) >> 16, a = (e & 65280) >> 8, o = e & 255, i = le(n), u = le(a), l = le(o), h = 0.41233895 * i + 0.35762064 * u + 0.18051042 * l, f = 0.2126 * i + 0.7152 * u + 0.0722 * l, g = 0.01932141 * i + 0.11916382 * u + 0.95034478 * l, p = 0.401288 * h + 0.650173 * f - 0.051461 * g, v = -0.250268 * h + 1.204414 * f + 0.045854 * g, m = -2079e-6 * h + 0.048952 * f + 0.953127 * g, P = t.rgbD[0] * p, k = t.rgbD[1] * v, B = t.rgbD[2] * m, x = Math.pow(t.fl * Math.abs(P) / 100, 0.42), O = Math.pow(t.fl * Math.abs(k) / 100, 0.42), R = Math.pow(t.fl * Math.abs(B) / 100, 0.42), V = j(P) * 400 * x / (x + 27.13), I = j(k) * 400 * O / (O + 27.13), F = j(B) * 400 * R / (R + 27.13), L = (11 * V + -12 * I + F) / 11, z = (V + I - 2 * F) / 9, E = (20 * V + 20 * I + 21 * F) / 20, W = (40 * V + 20 * I + F) / 20, ce = Math.atan2(z, L) * 180 / Math.PI, q = be(ce), me = q * Math.PI / 180, ge = W * t.nbb, re = 100 * Math.pow(ge / t.aw, t.c * t.z), ye = 4 / t.c * Math.sqrt(re / 100) * (t.aw + 4) * t.fLRoot, Te = q < 20.14 ? q + 360 : q, ve = 0.25 * (Math.cos(Te * Math.PI / 180 + 2) + 3.8), we = 5e4 / 13 * ve * t.nc * t.ncb * Math.sqrt(L * L + z * z) / (E + 0.305), Pe = Math.pow(we, 0.9) * Math.pow(1.64 - Math.pow(0.29, t.n), 0.73), Ue = Pe * Math.sqrt(re / 100), $e = Ue * t.fLRoot, dt = 50 * Math.sqrt(Pe * t.c / (t.aw + 4)), pt = (1 + 100 * 7e-3) * re / (1 + 7e-3 * re), Ye = 1 / 0.0228 * Math.log(1 + 0.0228 * $e), mt = Ye * Math.cos(me), gt = Ye * Math.sin(me);
274
- return new H(q, Ue, re, ye, $e, dt, pt, mt, gt);
331
+ static fromIntInViewingConditions(e, r) {
332
+ const t = (e & 16711680) >> 16, n = (e & 65280) >> 8, s = e & 255, i = te(t), u = te(n), l = te(s), h = 0.41233895 * i + 0.35762064 * u + 0.18051042 * l, d = 0.2126 * i + 0.7152 * u + 0.0722 * l, C = 0.01932141 * i + 0.11916382 * u + 0.95034478 * l, p = 0.401288 * h + 0.650173 * d - 0.051461 * C, D = -0.250268 * h + 1.204414 * d + 0.045854 * C, m = -2079e-6 * h + 0.048952 * d + 0.953127 * C, g = r.rgbD[0] * p, P = r.rgbD[1] * D, A = r.rgbD[2] * m, B = Math.pow(r.fl * Math.abs(g) / 100, 0.42), O = Math.pow(r.fl * Math.abs(P) / 100, 0.42), R = Math.pow(r.fl * Math.abs(A) / 100, 0.42), V = z(g) * 400 * B / (B + 27.13), I = z(P) * 400 * O / (O + 27.13), x = z(A) * 400 * R / (R + 27.13), L = (11 * V + -12 * I + x) / 11, _ = (V + I - 2 * x) / 9, E = (20 * V + 20 * I + 21 * x) / 20, q = (40 * V + 20 * I + x) / 20, ee = Math.atan2(_, L) * 180 / Math.PI, K = ce(ee), ae = K * Math.PI / 180, oe = q * r.nbb, J = 100 * Math.pow(oe / r.aw, r.c * r.z), ie = 4 / r.c * Math.sqrt(J / 100) * (r.aw + 4) * r.fLRoot, ue = K < 20.14 ? K + 360 : K, le = 0.25 * (Math.cos(ue * Math.PI / 180 + 2) + 3.8), he = 5e4 / 13 * le * r.nc * r.ncb * Math.sqrt(L * L + _ * _) / (E + 0.305), se = Math.pow(he, 0.9) * Math.pow(1.64 - Math.pow(0.29, r.n), 0.73), be = se * Math.sqrt(J / 100), Te = be * r.fLRoot, Oe = 50 * Math.sqrt(se * r.c / (r.aw + 4)), Re = (1 + 100 * 7e-3) * J / (1 + 7e-3 * J), De = 1 / 0.0228 * Math.log(1 + 0.0228 * Te), Ve = De * Math.cos(ae), Ne = De * Math.sin(ae);
333
+ return new N(K, be, J, ie, Te, Oe, Re, Ve, Ne);
275
334
  }
276
335
  /**
277
336
  * @param j CAM16 lightness
278
337
  * @param c CAM16 chroma
279
338
  * @param h CAM16 hue
280
339
  */
281
- static fromJch(e, t, n) {
282
- return H.fromJchInViewingConditions(e, t, n, J.DEFAULT);
340
+ static fromJch(e, r, t) {
341
+ return N.fromJchInViewingConditions(e, r, t, j.DEFAULT);
283
342
  }
284
343
  /**
285
344
  * @param j CAM16 lightness
@@ -288,9 +347,9 @@ class H {
288
347
  * @param viewingConditions Information about the environment where the color
289
348
  * was observed.
290
349
  */
291
- static fromJchInViewingConditions(e, t, n, a) {
292
- const o = 4 / a.c * Math.sqrt(e / 100) * (a.aw + 4) * a.fLRoot, i = t * a.fLRoot, u = t / Math.sqrt(e / 100), l = 50 * Math.sqrt(u * a.c / (a.aw + 4)), h = n * Math.PI / 180, f = (1 + 100 * 7e-3) * e / (1 + 7e-3 * e), g = 1 / 0.0228 * Math.log(1 + 0.0228 * i), p = g * Math.cos(h), v = g * Math.sin(h);
293
- return new H(n, t, e, o, i, l, f, p, v);
350
+ static fromJchInViewingConditions(e, r, t, n) {
351
+ const s = 4 / n.c * Math.sqrt(e / 100) * (n.aw + 4) * n.fLRoot, i = r * n.fLRoot, u = r / Math.sqrt(e / 100), l = 50 * Math.sqrt(u * n.c / (n.aw + 4)), h = t * Math.PI / 180, d = (1 + 100 * 7e-3) * e / (1 + 7e-3 * e), C = 1 / 0.0228 * Math.log(1 + 0.0228 * i), p = C * Math.cos(h), D = C * Math.sin(h);
352
+ return new N(t, r, e, s, i, l, d, p, D);
294
353
  }
295
354
  /**
296
355
  * @param jstar CAM16-UCS lightness.
@@ -299,8 +358,8 @@ class H {
299
358
  * @param bstar CAM16-UCS b dimension. Like a* in L*a*b*, it is a Cartesian
300
359
  * coordinate on the X axis.
301
360
  */
302
- static fromUcs(e, t, n) {
303
- return H.fromUcsInViewingConditions(e, t, n, J.DEFAULT);
361
+ static fromUcs(e, r, t) {
362
+ return N.fromUcsInViewingConditions(e, r, t, j.DEFAULT);
304
363
  }
305
364
  /**
306
365
  * @param jstar CAM16-UCS lightness.
@@ -311,12 +370,12 @@ class H {
311
370
  * @param viewingConditions Information about the environment where the color
312
371
  * was observed.
313
372
  */
314
- static fromUcsInViewingConditions(e, t, n, a) {
315
- const o = t, i = n, u = Math.sqrt(o * o + i * i), h = (Math.exp(u * 0.0228) - 1) / 0.0228 / a.fLRoot;
316
- let f = Math.atan2(i, o) * (180 / Math.PI);
317
- f < 0 && (f += 360);
318
- const g = e / (1 - (e - 100) * 7e-3);
319
- return H.fromJchInViewingConditions(g, h, f, a);
373
+ static fromUcsInViewingConditions(e, r, t, n) {
374
+ const s = r, i = t, u = Math.sqrt(s * s + i * i), h = (Math.exp(u * 0.0228) - 1) / 0.0228 / n.fLRoot;
375
+ let d = Math.atan2(i, s) * (180 / Math.PI);
376
+ d < 0 && (d += 360);
377
+ const C = e / (1 - (e - 100) * 7e-3);
378
+ return N.fromJchInViewingConditions(C, h, d, n);
320
379
  }
321
380
  /**
322
381
  * @return ARGB representation of color, assuming the color was viewed in
@@ -324,7 +383,7 @@ class H {
324
383
  * viewing conditions for sRGB.
325
384
  */
326
385
  toInt() {
327
- return this.viewed(J.DEFAULT);
386
+ return this.viewed(j.DEFAULT);
328
387
  }
329
388
  /**
330
389
  * @param viewingConditions Information about the environment where the color
@@ -332,19 +391,19 @@ class H {
332
391
  * @return ARGB representation of color
333
392
  */
334
393
  viewed(e) {
335
- const t = this.chroma === 0 || this.j === 0 ? 0 : this.chroma / Math.sqrt(this.j / 100), n = Math.pow(t / Math.pow(1.64 - Math.pow(0.29, e.n), 0.73), 1 / 0.9), a = this.hue * Math.PI / 180, o = 0.25 * (Math.cos(a + 2) + 3.8), i = e.aw * Math.pow(this.j / 100, 1 / e.c / e.z), u = o * (5e4 / 13) * e.nc * e.ncb, l = i / e.nbb, h = Math.sin(a), f = Math.cos(a), g = 23 * (l + 0.305) * n / (23 * u + 11 * n * f + 108 * n * h), p = g * f, v = g * h, m = (460 * l + 451 * p + 288 * v) / 1403, P = (460 * l - 891 * p - 261 * v) / 1403, k = (460 * l - 220 * p - 6300 * v) / 1403, B = Math.max(0, 27.13 * Math.abs(m) / (400 - Math.abs(m))), x = j(m) * (100 / e.fl) * Math.pow(B, 1 / 0.42), O = Math.max(0, 27.13 * Math.abs(P) / (400 - Math.abs(P))), R = j(P) * (100 / e.fl) * Math.pow(O, 1 / 0.42), V = Math.max(0, 27.13 * Math.abs(k) / (400 - Math.abs(k))), I = j(k) * (100 / e.fl) * Math.pow(V, 1 / 0.42), F = x / e.rgbD[0], L = R / e.rgbD[1], z = I / e.rgbD[2], E = 1.86206786 * F - 1.01125463 * L + 0.14918677 * z, W = 0.38752654 * F + 0.62144744 * L - 897398e-8 * z, te = -0.0158415 * F - 0.03412294 * L + 1.04996444 * z;
336
- return Ft(E, W, te);
394
+ const r = this.chroma === 0 || this.j === 0 ? 0 : this.chroma / Math.sqrt(this.j / 100), t = Math.pow(r / Math.pow(1.64 - Math.pow(0.29, e.n), 0.73), 1 / 0.9), n = this.hue * Math.PI / 180, s = 0.25 * (Math.cos(n + 2) + 3.8), i = e.aw * Math.pow(this.j / 100, 1 / e.c / e.z), u = s * (5e4 / 13) * e.nc * e.ncb, l = i / e.nbb, h = Math.sin(n), d = Math.cos(n), C = 23 * (l + 0.305) * t / (23 * u + 11 * t * d + 108 * t * h), p = C * d, D = C * h, m = (460 * l + 451 * p + 288 * D) / 1403, g = (460 * l - 891 * p - 261 * D) / 1403, P = (460 * l - 220 * p - 6300 * D) / 1403, A = Math.max(0, 27.13 * Math.abs(m) / (400 - Math.abs(m))), B = z(m) * (100 / e.fl) * Math.pow(A, 1 / 0.42), O = Math.max(0, 27.13 * Math.abs(g) / (400 - Math.abs(g))), R = z(g) * (100 / e.fl) * Math.pow(O, 1 / 0.42), V = Math.max(0, 27.13 * Math.abs(P) / (400 - Math.abs(P))), I = z(P) * (100 / e.fl) * Math.pow(V, 1 / 0.42), x = B / e.rgbD[0], L = R / e.rgbD[1], _ = I / e.rgbD[2], E = 1.86206786 * x - 1.01125463 * L + 0.14918677 * _, q = 0.38752654 * x + 0.62144744 * L - 897398e-8 * _, G = -0.0158415 * x - 0.03412294 * L + 1.04996444 * _;
395
+ return Je(E, q, G);
337
396
  }
338
397
  /// Given color expressed in XYZ and viewed in [viewingConditions], convert to
339
398
  /// CAM16.
340
- static fromXyzInViewingConditions(e, t, n, a) {
341
- const o = 0.401288 * e + 0.650173 * t - 0.051461 * n, i = -0.250268 * e + 1.204414 * t + 0.045854 * n, u = -2079e-6 * e + 0.048952 * t + 0.953127 * n, l = a.rgbD[0] * o, h = a.rgbD[1] * i, f = a.rgbD[2] * u, g = Math.pow(a.fl * Math.abs(l) / 100, 0.42), p = Math.pow(a.fl * Math.abs(h) / 100, 0.42), v = Math.pow(a.fl * Math.abs(f) / 100, 0.42), m = j(l) * 400 * g / (g + 27.13), P = j(h) * 400 * p / (p + 27.13), k = j(f) * 400 * v / (v + 27.13), B = (11 * m + -12 * P + k) / 11, x = (m + P - 2 * k) / 9, O = (20 * m + 20 * P + 21 * k) / 20, R = (40 * m + 20 * P + k) / 20, I = Math.atan2(x, B) * 180 / Math.PI, F = I < 0 ? I + 360 : I >= 360 ? I - 360 : I, L = F * Math.PI / 180, z = R * a.nbb, E = 100 * Math.pow(z / a.aw, a.c * a.z), W = 4 / a.c * Math.sqrt(E / 100) * (a.aw + 4) * a.fLRoot, te = F < 20.14 ? F + 360 : F, ce = 1 / 4 * (Math.cos(te * Math.PI / 180 + 2) + 3.8), me = 5e4 / 13 * ce * a.nc * a.ncb * Math.sqrt(B * B + x * x) / (O + 0.305), ge = Math.pow(me, 0.9) * Math.pow(1.64 - Math.pow(0.29, a.n), 0.73), re = ge * Math.sqrt(E / 100), ye = re * a.fLRoot, Te = 50 * Math.sqrt(ge * a.c / (a.aw + 4)), ve = (1 + 100 * 7e-3) * E / (1 + 7e-3 * E), De = Math.log(1 + 0.0228 * ye) / 0.0228, we = De * Math.cos(L), Pe = De * Math.sin(L);
342
- return new H(F, re, E, W, ye, Te, ve, we, Pe);
399
+ static fromXyzInViewingConditions(e, r, t, n) {
400
+ const s = 0.401288 * e + 0.650173 * r - 0.051461 * t, i = -0.250268 * e + 1.204414 * r + 0.045854 * t, u = -2079e-6 * e + 0.048952 * r + 0.953127 * t, l = n.rgbD[0] * s, h = n.rgbD[1] * i, d = n.rgbD[2] * u, C = Math.pow(n.fl * Math.abs(l) / 100, 0.42), p = Math.pow(n.fl * Math.abs(h) / 100, 0.42), D = Math.pow(n.fl * Math.abs(d) / 100, 0.42), m = z(l) * 400 * C / (C + 27.13), g = z(h) * 400 * p / (p + 27.13), P = z(d) * 400 * D / (D + 27.13), A = (11 * m + -12 * g + P) / 11, B = (m + g - 2 * P) / 9, O = (20 * m + 20 * g + 21 * P) / 20, R = (40 * m + 20 * g + P) / 20, I = Math.atan2(B, A) * 180 / Math.PI, x = I < 0 ? I + 360 : I >= 360 ? I - 360 : I, L = x * Math.PI / 180, _ = R * n.nbb, E = 100 * Math.pow(_ / n.aw, n.c * n.z), q = 4 / n.c * Math.sqrt(E / 100) * (n.aw + 4) * n.fLRoot, G = x < 20.14 ? x + 360 : x, ee = 1 / 4 * (Math.cos(G * Math.PI / 180 + 2) + 3.8), ae = 5e4 / 13 * ee * n.nc * n.ncb * Math.sqrt(A * A + B * B) / (O + 0.305), oe = Math.pow(ae, 0.9) * Math.pow(1.64 - Math.pow(0.29, n.n), 0.73), J = oe * Math.sqrt(E / 100), ie = J * n.fLRoot, ue = 50 * Math.sqrt(oe * n.c / (n.aw + 4)), le = (1 + 100 * 7e-3) * E / (1 + 7e-3 * E), fe = Math.log(1 + 0.0228 * ie) / 0.0228, he = fe * Math.cos(L), se = fe * Math.sin(L);
401
+ return new N(x, J, E, q, ie, ue, le, he, se);
343
402
  }
344
403
  /// XYZ representation of CAM16 seen in [viewingConditions].
345
404
  xyzInViewingConditions(e) {
346
- const t = this.chroma === 0 || this.j === 0 ? 0 : this.chroma / Math.sqrt(this.j / 100), n = Math.pow(t / Math.pow(1.64 - Math.pow(0.29, e.n), 0.73), 1 / 0.9), a = this.hue * Math.PI / 180, o = 0.25 * (Math.cos(a + 2) + 3.8), i = e.aw * Math.pow(this.j / 100, 1 / e.c / e.z), u = o * (5e4 / 13) * e.nc * e.ncb, l = i / e.nbb, h = Math.sin(a), f = Math.cos(a), g = 23 * (l + 0.305) * n / (23 * u + 11 * n * f + 108 * n * h), p = g * f, v = g * h, m = (460 * l + 451 * p + 288 * v) / 1403, P = (460 * l - 891 * p - 261 * v) / 1403, k = (460 * l - 220 * p - 6300 * v) / 1403, B = Math.max(0, 27.13 * Math.abs(m) / (400 - Math.abs(m))), x = j(m) * (100 / e.fl) * Math.pow(B, 1 / 0.42), O = Math.max(0, 27.13 * Math.abs(P) / (400 - Math.abs(P))), R = j(P) * (100 / e.fl) * Math.pow(O, 1 / 0.42), V = Math.max(0, 27.13 * Math.abs(k) / (400 - Math.abs(k))), I = j(k) * (100 / e.fl) * Math.pow(V, 1 / 0.42), F = x / e.rgbD[0], L = R / e.rgbD[1], z = I / e.rgbD[2], E = 1.86206786 * F - 1.01125463 * L + 0.14918677 * z, W = 0.38752654 * F + 0.62144744 * L - 897398e-8 * z, te = -0.0158415 * F - 0.03412294 * L + 1.04996444 * z;
347
- return [E, W, te];
405
+ const r = this.chroma === 0 || this.j === 0 ? 0 : this.chroma / Math.sqrt(this.j / 100), t = Math.pow(r / Math.pow(1.64 - Math.pow(0.29, e.n), 0.73), 1 / 0.9), n = this.hue * Math.PI / 180, s = 0.25 * (Math.cos(n + 2) + 3.8), i = e.aw * Math.pow(this.j / 100, 1 / e.c / e.z), u = s * (5e4 / 13) * e.nc * e.ncb, l = i / e.nbb, h = Math.sin(n), d = Math.cos(n), C = 23 * (l + 0.305) * t / (23 * u + 11 * t * d + 108 * t * h), p = C * d, D = C * h, m = (460 * l + 451 * p + 288 * D) / 1403, g = (460 * l - 891 * p - 261 * D) / 1403, P = (460 * l - 220 * p - 6300 * D) / 1403, A = Math.max(0, 27.13 * Math.abs(m) / (400 - Math.abs(m))), B = z(m) * (100 / e.fl) * Math.pow(A, 1 / 0.42), O = Math.max(0, 27.13 * Math.abs(g) / (400 - Math.abs(g))), R = z(g) * (100 / e.fl) * Math.pow(O, 1 / 0.42), V = Math.max(0, 27.13 * Math.abs(P) / (400 - Math.abs(P))), I = z(P) * (100 / e.fl) * Math.pow(V, 1 / 0.42), x = B / e.rgbD[0], L = R / e.rgbD[1], _ = I / e.rgbD[2], E = 1.86206786 * x - 1.01125463 * L + 0.14918677 * _, q = 0.38752654 * x + 0.62144744 * L - 897398e-8 * _, G = -0.0158415 * x - 0.03412294 * L + 1.04996444 * _;
406
+ return [E, q, G];
348
407
  }
349
408
  }
350
409
  /**
@@ -384,13 +443,13 @@ class S {
384
443
  * regular RGB space
385
444
  */
386
445
  static trueDelinearized(e) {
387
- const t = e / 100;
388
- let n = 0;
389
- return t <= 31308e-7 ? n = t * 12.92 : n = 1.055 * Math.pow(t, 1 / 2.4) - 0.055, n * 255;
446
+ const r = e / 100;
447
+ let t = 0;
448
+ return r <= 31308e-7 ? t = r * 12.92 : t = 1.055 * Math.pow(r, 1 / 2.4) - 0.055, t * 255;
390
449
  }
391
450
  static chromaticAdaptation(e) {
392
- const t = Math.pow(Math.abs(e), 0.42);
393
- return j(e) * 400 * t / (t + 27.13);
451
+ const r = Math.pow(Math.abs(e), 0.42);
452
+ return z(e) * 400 * r / (r + 27.13);
394
453
  }
395
454
  /**
396
455
  * Returns the hue of a linear RGB color in CAM16.
@@ -399,12 +458,12 @@ class S {
399
458
  * @return The hue of the color in CAM16, in radians.
400
459
  */
401
460
  static hueOf(e) {
402
- const t = Le(e, S.SCALED_DISCOUNT_FROM_LINRGB), n = S.chromaticAdaptation(t[0]), a = S.chromaticAdaptation(t[1]), o = S.chromaticAdaptation(t[2]), i = (11 * n + -12 * a + o) / 11, u = (n + a - 2 * o) / 9;
461
+ const r = ye(e, S.SCALED_DISCOUNT_FROM_LINRGB), t = S.chromaticAdaptation(r[0]), n = S.chromaticAdaptation(r[1]), s = S.chromaticAdaptation(r[2]), i = (11 * t + -12 * n + s) / 11, u = (t + n - 2 * s) / 9;
403
462
  return Math.atan2(u, i);
404
463
  }
405
- static areInCyclicOrder(e, t, n) {
406
- const a = S.sanitizeRadians(t - e), o = S.sanitizeRadians(n - e);
407
- return a < o;
464
+ static areInCyclicOrder(e, r, t) {
465
+ const n = S.sanitizeRadians(r - e), s = S.sanitizeRadians(t - e);
466
+ return n < s;
408
467
  }
409
468
  /**
410
469
  * Solves the lerp equation.
@@ -414,14 +473,14 @@ class S {
414
473
  * @param target The ending number.
415
474
  * @return A number t such that lerp(source, target, t) = mid.
416
475
  */
417
- static intercept(e, t, n) {
418
- return (t - e) / (n - e);
476
+ static intercept(e, r, t) {
477
+ return (r - e) / (t - e);
419
478
  }
420
- static lerpPoint(e, t, n) {
479
+ static lerpPoint(e, r, t) {
421
480
  return [
422
- e[0] + (n[0] - e[0]) * t,
423
- e[1] + (n[1] - e[1]) * t,
424
- e[2] + (n[2] - e[2]) * t
481
+ e[0] + (t[0] - e[0]) * r,
482
+ e[1] + (t[1] - e[1]) * r,
483
+ e[2] + (t[2] - e[2]) * r
425
484
  ];
426
485
  }
427
486
  /**
@@ -435,9 +494,9 @@ class S {
435
494
  * @return The intersection point of the segment AB with the plane
436
495
  * R=coordinate, G=coordinate, or B=coordinate
437
496
  */
438
- static setCoordinate(e, t, n, a) {
439
- const o = S.intercept(e[a], t, n[a]);
440
- return S.lerpPoint(e, o, n);
497
+ static setCoordinate(e, r, t, n) {
498
+ const s = S.intercept(e[n], r, t[n]);
499
+ return S.lerpPoint(e, s, t);
441
500
  }
442
501
  static isBounded(e) {
443
502
  return 0 <= e && e <= 100;
@@ -452,17 +511,17 @@ class S {
452
511
  * it exists. If this possible vertex lies outside of the cube,
453
512
  * [-1.0, -1.0, -1.0] is returned.
454
513
  */
455
- static nthVertex(e, t) {
456
- const n = S.Y_FROM_LINRGB[0], a = S.Y_FROM_LINRGB[1], o = S.Y_FROM_LINRGB[2], i = t % 4 <= 1 ? 0 : 100, u = t % 2 === 0 ? 0 : 100;
457
- if (t < 4) {
458
- const l = i, h = u, f = (e - l * a - h * o) / n;
459
- return S.isBounded(f) ? [f, l, h] : [-1, -1, -1];
460
- } else if (t < 8) {
461
- const l = i, h = u, f = (e - h * n - l * o) / a;
462
- return S.isBounded(f) ? [h, f, l] : [-1, -1, -1];
514
+ static nthVertex(e, r) {
515
+ const t = S.Y_FROM_LINRGB[0], n = S.Y_FROM_LINRGB[1], s = S.Y_FROM_LINRGB[2], i = r % 4 <= 1 ? 0 : 100, u = r % 2 === 0 ? 0 : 100;
516
+ if (r < 4) {
517
+ const l = i, h = u, d = (e - l * n - h * s) / t;
518
+ return S.isBounded(d) ? [d, l, h] : [-1, -1, -1];
519
+ } else if (r < 8) {
520
+ const l = i, h = u, d = (e - h * t - l * s) / n;
521
+ return S.isBounded(d) ? [h, d, l] : [-1, -1, -1];
463
522
  } else {
464
- const l = i, h = u, f = (e - l * n - h * a) / o;
465
- return S.isBounded(f) ? [l, h, f] : [-1, -1, -1];
523
+ const l = i, h = u, d = (e - l * t - h * n) / s;
524
+ return S.isBounded(d) ? [l, h, d] : [-1, -1, -1];
466
525
  }
467
526
  }
468
527
  /**
@@ -474,26 +533,26 @@ class S {
474
533
  * corresponding to an endpoint of the segment containing the
475
534
  * desired color.
476
535
  */
477
- static bisectToSegment(e, t) {
478
- let n = [-1, -1, -1], a = n, o = 0, i = 0, u = !1, l = !0;
536
+ static bisectToSegment(e, r) {
537
+ let t = [-1, -1, -1], n = t, s = 0, i = 0, u = !1, l = !0;
479
538
  for (let h = 0; h < 12; h++) {
480
- const f = S.nthVertex(e, h);
481
- if (f[0] < 0)
539
+ const d = S.nthVertex(e, h);
540
+ if (d[0] < 0)
482
541
  continue;
483
- const g = S.hueOf(f);
542
+ const C = S.hueOf(d);
484
543
  if (!u) {
485
- n = f, a = f, o = g, i = g, u = !0;
544
+ t = d, n = d, s = C, i = C, u = !0;
486
545
  continue;
487
546
  }
488
- (l || S.areInCyclicOrder(o, g, i)) && (l = !1, S.areInCyclicOrder(o, t, g) ? (a = f, i = g) : (n = f, o = g));
547
+ (l || S.areInCyclicOrder(s, C, i)) && (l = !1, S.areInCyclicOrder(s, r, C) ? (n = d, i = C) : (t = d, s = C));
489
548
  }
490
- return [n, a];
549
+ return [t, n];
491
550
  }
492
- static midpoint(e, t) {
551
+ static midpoint(e, r) {
493
552
  return [
494
- (e[0] + t[0]) / 2,
495
- (e[1] + t[1]) / 2,
496
- (e[2] + t[2]) / 2
553
+ (e[0] + r[0]) / 2,
554
+ (e[1] + r[1]) / 2,
555
+ (e[2] + r[2]) / 2
497
556
  ];
498
557
  }
499
558
  static criticalPlaneBelow(e) {
@@ -510,23 +569,23 @@ class S {
510
569
  * @param targetHue The hue of the color.
511
570
  * @return The desired color, in linear RGB coordinates.
512
571
  */
513
- static bisectToLimit(e, t) {
514
- const n = S.bisectToSegment(e, t);
515
- let a = n[0], o = S.hueOf(a), i = n[1];
572
+ static bisectToLimit(e, r) {
573
+ const t = S.bisectToSegment(e, r);
574
+ let n = t[0], s = S.hueOf(n), i = t[1];
516
575
  for (let u = 0; u < 3; u++)
517
- if (a[u] !== i[u]) {
576
+ if (n[u] !== i[u]) {
518
577
  let l = -1, h = 255;
519
- a[u] < i[u] ? (l = S.criticalPlaneBelow(S.trueDelinearized(a[u])), h = S.criticalPlaneAbove(S.trueDelinearized(i[u]))) : (l = S.criticalPlaneAbove(S.trueDelinearized(a[u])), h = S.criticalPlaneBelow(S.trueDelinearized(i[u])));
520
- for (let f = 0; f < 8 && !(Math.abs(h - l) <= 1); f++) {
521
- const g = Math.floor((l + h) / 2), p = S.CRITICAL_PLANES[g], v = S.setCoordinate(a, p, i, u), m = S.hueOf(v);
522
- S.areInCyclicOrder(o, t, m) ? (i = v, h = g) : (a = v, o = m, l = g);
578
+ n[u] < i[u] ? (l = S.criticalPlaneBelow(S.trueDelinearized(n[u])), h = S.criticalPlaneAbove(S.trueDelinearized(i[u]))) : (l = S.criticalPlaneAbove(S.trueDelinearized(n[u])), h = S.criticalPlaneBelow(S.trueDelinearized(i[u])));
579
+ for (let d = 0; d < 8 && !(Math.abs(h - l) <= 1); d++) {
580
+ const C = Math.floor((l + h) / 2), p = S.CRITICAL_PLANES[C], D = S.setCoordinate(n, p, i, u), m = S.hueOf(D);
581
+ S.areInCyclicOrder(s, r, m) ? (i = D, h = C) : (n = D, s = m, l = C);
523
582
  }
524
583
  }
525
- return S.midpoint(a, i);
584
+ return S.midpoint(n, i);
526
585
  }
527
586
  static inverseChromaticAdaptation(e) {
528
- const t = Math.abs(e), n = Math.max(0, 27.13 * t / (400 - t));
529
- return j(e) * Math.pow(n, 1 / 0.42);
587
+ const r = Math.abs(e), t = Math.max(0, 27.13 * r / (400 - r));
588
+ return z(e) * Math.pow(t, 1 / 0.42);
530
589
  }
531
590
  /**
532
591
  * Finds a color with the given hue, chroma, and Y.
@@ -537,19 +596,19 @@ class S {
537
596
  * @return The desired color as a hexadecimal integer, if found; 0
538
597
  * otherwise.
539
598
  */
540
- static findResultByJ(e, t, n) {
541
- let a = Math.sqrt(n) * 11;
542
- const o = J.DEFAULT, i = 1 / Math.pow(1.64 - Math.pow(0.29, o.n), 0.73), l = 0.25 * (Math.cos(e + 2) + 3.8) * (5e4 / 13) * o.nc * o.ncb, h = Math.sin(e), f = Math.cos(e);
543
- for (let g = 0; g < 5; g++) {
544
- const p = a / 100, v = t === 0 || a === 0 ? 0 : t / Math.sqrt(p), m = Math.pow(v * i, 1 / 0.9), k = o.aw * Math.pow(p, 1 / o.c / o.z) / o.nbb, B = 23 * (k + 0.305) * m / (23 * l + 11 * m * f + 108 * m * h), x = B * f, O = B * h, R = (460 * k + 451 * x + 288 * O) / 1403, V = (460 * k - 891 * x - 261 * O) / 1403, I = (460 * k - 220 * x - 6300 * O) / 1403, F = S.inverseChromaticAdaptation(R), L = S.inverseChromaticAdaptation(V), z = S.inverseChromaticAdaptation(I), E = Le([F, L, z], S.LINRGB_FROM_SCALED_DISCOUNT);
599
+ static findResultByJ(e, r, t) {
600
+ let n = Math.sqrt(t) * 11;
601
+ const s = j.DEFAULT, i = 1 / Math.pow(1.64 - Math.pow(0.29, s.n), 0.73), l = 0.25 * (Math.cos(e + 2) + 3.8) * (5e4 / 13) * s.nc * s.ncb, h = Math.sin(e), d = Math.cos(e);
602
+ for (let C = 0; C < 5; C++) {
603
+ const p = n / 100, D = r === 0 || n === 0 ? 0 : r / Math.sqrt(p), m = Math.pow(D * i, 1 / 0.9), P = s.aw * Math.pow(p, 1 / s.c / s.z) / s.nbb, A = 23 * (P + 0.305) * m / (23 * l + 11 * m * d + 108 * m * h), B = A * d, O = A * h, R = (460 * P + 451 * B + 288 * O) / 1403, V = (460 * P - 891 * B - 261 * O) / 1403, I = (460 * P - 220 * B - 6300 * O) / 1403, x = S.inverseChromaticAdaptation(R), L = S.inverseChromaticAdaptation(V), _ = S.inverseChromaticAdaptation(I), E = ye([x, L, _], S.LINRGB_FROM_SCALED_DISCOUNT);
545
604
  if (E[0] < 0 || E[1] < 0 || E[2] < 0)
546
605
  return 0;
547
- const W = S.Y_FROM_LINRGB[0], te = S.Y_FROM_LINRGB[1], ce = S.Y_FROM_LINRGB[2], q = W * E[0] + te * E[1] + ce * E[2];
548
- if (q <= 0)
606
+ const q = S.Y_FROM_LINRGB[0], G = S.Y_FROM_LINRGB[1], ee = S.Y_FROM_LINRGB[2], K = q * E[0] + G * E[1] + ee * E[2];
607
+ if (K <= 0)
549
608
  return 0;
550
- if (g === 4 || Math.abs(q - n) < 2e-3)
551
- return E[0] > 100.01 || E[1] > 100.01 || E[2] > 100.01 ? 0 : Ke(E);
552
- a = a - (q - n) * a / (2 * q);
609
+ if (C === 4 || Math.abs(K - t) < 2e-3)
610
+ return E[0] > 100.01 || E[1] > 100.01 || E[2] > 100.01 ? 0 : Fe(E);
611
+ n = n - (K - t) * n / (2 * K);
553
612
  }
554
613
  return 0;
555
614
  }
@@ -565,15 +624,15 @@ class S {
565
624
  * values, if possible; otherwise, the hue and L* will be
566
625
  * sufficiently close, and chroma will be maximized.
567
626
  */
568
- static solveToInt(e, t, n) {
569
- if (t < 1e-4 || n < 1e-4 || n > 99.9999)
570
- return Mt(n);
571
- e = be(e);
572
- const a = e / 180 * Math.PI, o = ae(n), i = S.findResultByJ(a, t, o);
627
+ static solveToInt(e, r, t) {
628
+ if (r < 1e-4 || t < 1e-4 || t > 99.9999)
629
+ return Ze(t);
630
+ e = ce(e);
631
+ const n = e / 180 * Math.PI, s = Z(t), i = S.findResultByJ(n, r, s);
573
632
  if (i !== 0)
574
633
  return i;
575
- const u = S.bisectToLimit(o, a);
576
- return Ke(u);
634
+ const u = S.bisectToLimit(s, n);
635
+ return Fe(u);
577
636
  }
578
637
  /**
579
638
  * Finds an sRGB color with the given hue, chroma, and L*, if
@@ -587,8 +646,8 @@ class S {
587
646
  * values, if possible; otherwise, the hue and L* will be
588
647
  * sufficiently close, and chroma will be maximized.
589
648
  */
590
- static solveToCam(e, t, n) {
591
- return H.fromInt(S.solveToInt(e, t, n));
649
+ static solveToCam(e, r, t) {
650
+ return N.fromInt(S.solveToInt(e, r, t));
592
651
  }
593
652
  }
594
653
  S.SCALED_DISCOUNT_FROM_LINRGB = [
@@ -899,16 +958,16 @@ S.CRITICAL_PLANES = [
899
958
  * See the License for the specific language governing permissions and
900
959
  * limitations under the License.
901
960
  */
902
- class C {
903
- static from(e, t, n) {
904
- return new C(S.solveToInt(e, t, n));
961
+ class T {
962
+ static from(e, r, t) {
963
+ return new T(S.solveToInt(e, r, t));
905
964
  }
906
965
  /**
907
966
  * @param argb ARGB representation of a color.
908
967
  * @return HCT representation of a color in default viewing conditions
909
968
  */
910
969
  static fromInt(e) {
911
- return new C(e);
970
+ return new T(e);
912
971
  }
913
972
  toInt() {
914
973
  return this.argb;
@@ -952,8 +1011,8 @@ class C {
952
1011
  this.setInternalState(S.solveToInt(this.internalHue, this.internalChroma, e));
953
1012
  }
954
1013
  /** Sets a property of the Hct object. */
955
- setValue(e, t) {
956
- this[e] = t;
1014
+ setValue(e, r) {
1015
+ this[e] = r;
957
1016
  }
958
1017
  toString() {
959
1018
  return `HCT(${this.hue.toFixed(0)}, ${this.chroma.toFixed(0)}, ${this.tone.toFixed(0)})`;
@@ -969,12 +1028,12 @@ class C {
969
1028
  }
970
1029
  constructor(e) {
971
1030
  this.argb = e;
972
- const t = H.fromInt(e);
973
- this.internalHue = t.hue, this.internalChroma = t.chroma, this.internalTone = Oe(e), this.argb = e;
1031
+ const r = N.fromInt(e);
1032
+ this.internalHue = r.hue, this.internalChroma = r.chroma, this.internalTone = ge(e), this.argb = e;
974
1033
  }
975
1034
  setInternalState(e) {
976
- const t = H.fromInt(e);
977
- this.internalHue = t.hue, this.internalChroma = t.chroma, this.internalTone = Oe(e), this.argb = e;
1035
+ const r = N.fromInt(e);
1036
+ this.internalHue = r.hue, this.internalChroma = r.chroma, this.internalTone = ge(e), this.argb = e;
978
1037
  }
979
1038
  /**
980
1039
  * Translates a color into different [ViewingConditions].
@@ -991,8 +1050,8 @@ class C {
991
1050
  * See [ViewingConditions.make] for parameters affecting color appearance.
992
1051
  */
993
1052
  inViewingConditions(e) {
994
- const n = H.fromInt(this.toInt()).xyzInViewingConditions(e), a = H.fromXyzInViewingConditions(n[0], n[1], n[2], J.make());
995
- return C.from(a.hue, a.chroma, Re(n[1]));
1053
+ const t = N.fromInt(this.toInt()).xyzInViewingConditions(e), n = N.fromXyzInViewingConditions(t[0], t[1], t[2], j.make());
1054
+ return T.from(n.hue, n.chroma, Pe(t[1]));
996
1055
  }
997
1056
  }
998
1057
  /**
@@ -1011,7 +1070,7 @@ class C {
1011
1070
  * See the License for the specific language governing permissions and
1012
1071
  * limitations under the License.
1013
1072
  */
1014
- class Ve {
1073
+ class Ce {
1015
1074
  /**
1016
1075
  * Blend the design color's HCT hue towards the key color's HCT
1017
1076
  * hue, in a way that leaves the original color recognizable and
@@ -1023,9 +1082,9 @@ class Ve {
1023
1082
  * system's color, a slightly warmer/cooler variant of the design
1024
1083
  * color's hue.
1025
1084
  */
1026
- static harmonize(e, t) {
1027
- const n = C.fromInt(e), a = C.fromInt(t), o = Tt(n.hue, a.hue), i = Math.min(o * 0.5, 15), u = be(n.hue + i * Ct(n.hue, a.hue));
1028
- return C.from(u, n.chroma, n.tone).toInt();
1085
+ static harmonize(e, r) {
1086
+ const t = T.fromInt(e), n = T.fromInt(r), s = qe(t.hue, n.hue), i = Math.min(s * 0.5, 15), u = ce(t.hue + i * je(t.hue, n.hue));
1087
+ return T.from(u, t.chroma, t.tone).toInt();
1029
1088
  }
1030
1089
  /**
1031
1090
  * Blends hue from one color into another. The chroma and tone of
@@ -1037,9 +1096,9 @@ class Ve {
1037
1096
  * @return from, with a hue blended towards to. Chroma and tone
1038
1097
  * are constant.
1039
1098
  */
1040
- static hctHue(e, t, n) {
1041
- const a = Ve.cam16Ucs(e, t, n), o = H.fromInt(a), i = H.fromInt(e);
1042
- return C.from(o.hue, i.chroma, Oe(e)).toInt();
1099
+ static hctHue(e, r, t) {
1100
+ const n = Ce.cam16Ucs(e, r, t), s = N.fromInt(n), i = N.fromInt(e);
1101
+ return T.from(s.hue, i.chroma, ge(e)).toInt();
1043
1102
  }
1044
1103
  /**
1045
1104
  * Blend in CAM16-UCS space.
@@ -1050,9 +1109,9 @@ class Ve {
1050
1109
  * @return from, blended towards to. Hue, chroma, and tone will
1051
1110
  * change.
1052
1111
  */
1053
- static cam16Ucs(e, t, n) {
1054
- const a = H.fromInt(e), o = H.fromInt(t), i = a.jstar, u = a.astar, l = a.bstar, h = o.jstar, f = o.astar, g = o.bstar, p = i + (h - i) * n, v = u + (f - u) * n, m = l + (g - l) * n;
1055
- return H.fromUcs(p, v, m).toInt();
1112
+ static cam16Ucs(e, r, t) {
1113
+ const n = N.fromInt(e), s = N.fromInt(r), i = n.jstar, u = n.astar, l = n.bstar, h = s.jstar, d = s.astar, C = s.bstar, p = i + (h - i) * t, D = u + (d - u) * t, m = l + (C - l) * t;
1114
+ return N.fromUcs(p, D, m).toInt();
1056
1115
  }
1057
1116
  }
1058
1117
  /**
@@ -1071,19 +1130,19 @@ class Ve {
1071
1130
  * See the License for the specific language governing permissions and
1072
1131
  * limitations under the License.
1073
1132
  */
1074
- class M {
1133
+ class v {
1075
1134
  /**
1076
1135
  * Returns a contrast ratio, which ranges from 1 to 21.
1077
1136
  *
1078
1137
  * @param toneA Tone between 0 and 100. Values outside will be clamped.
1079
1138
  * @param toneB Tone between 0 and 100. Values outside will be clamped.
1080
1139
  */
1081
- static ratioOfTones(e, t) {
1082
- return e = U(0, 100, e), t = U(0, 100, t), M.ratioOfYs(ae(e), ae(t));
1140
+ static ratioOfTones(e, r) {
1141
+ return e = H(0, 100, e), r = H(0, 100, r), v.ratioOfYs(Z(e), Z(r));
1083
1142
  }
1084
- static ratioOfYs(e, t) {
1085
- const n = e > t ? e : t, a = n === t ? e : t;
1086
- return (n + 5) / (a + 5);
1143
+ static ratioOfYs(e, r) {
1144
+ const t = e > r ? e : r, n = t === r ? e : r;
1145
+ return (t + 5) / (n + 5);
1087
1146
  }
1088
1147
  /**
1089
1148
  * Returns a tone >= tone parameter that ensures ratio parameter.
@@ -1095,13 +1154,13 @@ class M {
1095
1154
  * @param ratio Contrast ratio of return value and tone.
1096
1155
  * Range is 1 to 21, invalid values have undefined behavior.
1097
1156
  */
1098
- static lighter(e, t) {
1157
+ static lighter(e, r) {
1099
1158
  if (e < 0 || e > 100)
1100
1159
  return -1;
1101
- const n = ae(e), a = t * (n + 5) - 5, o = M.ratioOfYs(a, n), i = Math.abs(o - t);
1102
- if (o < t && i > 0.04)
1160
+ const t = Z(e), n = r * (t + 5) - 5, s = v.ratioOfYs(n, t), i = Math.abs(s - r);
1161
+ if (s < r && i > 0.04)
1103
1162
  return -1;
1104
- const u = Re(a) + 0.4;
1163
+ const u = Pe(n) + 0.4;
1105
1164
  return u < 0 || u > 100 ? -1 : u;
1106
1165
  }
1107
1166
  /**
@@ -1114,13 +1173,13 @@ class M {
1114
1173
  * @param ratio Contrast ratio of return value and tone.
1115
1174
  * Range is 1 to 21, invalid values have undefined behavior.
1116
1175
  */
1117
- static darker(e, t) {
1176
+ static darker(e, r) {
1118
1177
  if (e < 0 || e > 100)
1119
1178
  return -1;
1120
- const n = ae(e), a = (n + 5) / t - 5, o = M.ratioOfYs(n, a), i = Math.abs(o - t);
1121
- if (o < t && i > 0.04)
1179
+ const t = Z(e), n = (t + 5) / r - 5, s = v.ratioOfYs(t, n), i = Math.abs(s - r);
1180
+ if (s < r && i > 0.04)
1122
1181
  return -1;
1123
- const u = Re(a) - 0.4;
1182
+ const u = Pe(n) - 0.4;
1124
1183
  return u < 0 || u > 100 ? -1 : u;
1125
1184
  }
1126
1185
  /**
@@ -1137,9 +1196,9 @@ class M {
1137
1196
  * @param ratio Desired contrast ratio of return value and tone parameter.
1138
1197
  * Range is 1 to 21, invalid values have undefined behavior.
1139
1198
  */
1140
- static lighterUnsafe(e, t) {
1141
- const n = M.lighter(e, t);
1142
- return n < 0 ? 100 : n;
1199
+ static lighterUnsafe(e, r) {
1200
+ const t = v.lighter(e, r);
1201
+ return t < 0 ? 100 : t;
1143
1202
  }
1144
1203
  /**
1145
1204
  * Returns a tone >= tone parameter that ensures ratio parameter.
@@ -1155,9 +1214,9 @@ class M {
1155
1214
  * @param ratio Desired contrast ratio of return value and tone parameter.
1156
1215
  * Range is 1 to 21, invalid values have undefined behavior.
1157
1216
  */
1158
- static darkerUnsafe(e, t) {
1159
- const n = M.darker(e, t);
1160
- return n < 0 ? 0 : n;
1217
+ static darkerUnsafe(e, r) {
1218
+ const t = v.darker(e, r);
1219
+ return t < 0 ? 0 : t;
1161
1220
  }
1162
1221
  }
1163
1222
  /**
@@ -1176,7 +1235,7 @@ class M {
1176
1235
  * See the License for the specific language governing permissions and
1177
1236
  * limitations under the License.
1178
1237
  */
1179
- class Ne {
1238
+ class Se {
1180
1239
  /**
1181
1240
  * Returns true if a color is disliked.
1182
1241
  *
@@ -1186,8 +1245,8 @@ class Ne {
1186
1245
  * Disliked is defined as a dark yellow-green that is not neutral.
1187
1246
  */
1188
1247
  static isDisliked(e) {
1189
- const t = Math.round(e.hue) >= 90 && Math.round(e.hue) <= 111, n = Math.round(e.chroma) > 16, a = Math.round(e.tone) < 65;
1190
- return t && n && a;
1248
+ const r = Math.round(e.hue) >= 90 && Math.round(e.hue) <= 111, t = Math.round(e.chroma) > 16, n = Math.round(e.tone) < 65;
1249
+ return r && t && n;
1191
1250
  }
1192
1251
  /**
1193
1252
  * If a color is disliked, lighten it to make it likable.
@@ -1197,7 +1256,7 @@ class Ne {
1197
1256
  * color if it is acceptable.
1198
1257
  */
1199
1258
  static fixIfDisliked(e) {
1200
- return Ne.isDisliked(e) ? C.from(e.hue, e.chroma, 70) : e;
1259
+ return Se.isDisliked(e) ? T.from(e.hue, e.chroma, 70) : e;
1201
1260
  }
1202
1261
  }
1203
1262
  /**
@@ -1216,37 +1275,37 @@ class Ne {
1216
1275
  * See the License for the specific language governing permissions and
1217
1276
  * limitations under the License.
1218
1277
  */
1219
- function It(r, e, t) {
1220
- if (r.name !== t.name)
1221
- throw new Error(`Attempting to extend color ${r.name} with color ${t.name} of different name for spec version ${e}.`);
1222
- if (r.isBackground !== t.isBackground)
1223
- throw new Error(`Attempting to extend color ${r.name} as a ${r.isBackground ? "background" : "foreground"} with color ${t.name} as a ${t.isBackground ? "background" : "foreground"} for spec version ${e}.`);
1224
- }
1225
- function T(r, e, t) {
1226
- return It(r, e, t), c.fromPalette({
1227
- name: r.name,
1228
- palette: (n) => n.specVersion === e ? t.palette(n) : r.palette(n),
1229
- tone: (n) => n.specVersion === e ? t.tone(n) : r.tone(n),
1230
- isBackground: r.isBackground,
1231
- chromaMultiplier: (n) => {
1232
- const a = n.specVersion === e ? t.chromaMultiplier : r.chromaMultiplier;
1233
- return a !== void 0 ? a(n) : 1;
1278
+ function rr(a, e, r) {
1279
+ if (a.name !== r.name)
1280
+ throw new Error(`Attempting to extend color ${a.name} with color ${r.name} of different name for spec version ${e}.`);
1281
+ if (a.isBackground !== r.isBackground)
1282
+ throw new Error(`Attempting to extend color ${a.name} as a ${a.isBackground ? "background" : "foreground"} with color ${r.name} as a ${r.isBackground ? "background" : "foreground"} for spec version ${e}.`);
1283
+ }
1284
+ function b(a, e, r) {
1285
+ return rr(a, e, r), c.fromPalette({
1286
+ name: a.name,
1287
+ palette: (t) => t.specVersion === e ? r.palette(t) : a.palette(t),
1288
+ tone: (t) => t.specVersion === e ? r.tone(t) : a.tone(t),
1289
+ isBackground: a.isBackground,
1290
+ chromaMultiplier: (t) => {
1291
+ const n = t.specVersion === e ? r.chromaMultiplier : a.chromaMultiplier;
1292
+ return n !== void 0 ? n(t) : 1;
1234
1293
  },
1235
- background: (n) => {
1236
- const a = n.specVersion === e ? t.background : r.background;
1237
- return a !== void 0 ? a(n) : void 0;
1294
+ background: (t) => {
1295
+ const n = t.specVersion === e ? r.background : a.background;
1296
+ return n !== void 0 ? n(t) : void 0;
1238
1297
  },
1239
- secondBackground: (n) => {
1240
- const a = n.specVersion === e ? t.secondBackground : r.secondBackground;
1241
- return a !== void 0 ? a(n) : void 0;
1298
+ secondBackground: (t) => {
1299
+ const n = t.specVersion === e ? r.secondBackground : a.secondBackground;
1300
+ return n !== void 0 ? n(t) : void 0;
1242
1301
  },
1243
- contrastCurve: (n) => {
1244
- const a = n.specVersion === e ? t.contrastCurve : r.contrastCurve;
1245
- return a !== void 0 ? a(n) : void 0;
1302
+ contrastCurve: (t) => {
1303
+ const n = t.specVersion === e ? r.contrastCurve : a.contrastCurve;
1304
+ return n !== void 0 ? n(t) : void 0;
1246
1305
  },
1247
- toneDeltaPair: (n) => {
1248
- const a = n.specVersion === e ? t.toneDeltaPair : r.toneDeltaPair;
1249
- return a !== void 0 ? a(n) : void 0;
1306
+ toneDeltaPair: (t) => {
1307
+ const n = t.specVersion === e ? r.toneDeltaPair : a.toneDeltaPair;
1308
+ return n !== void 0 ? n(t) : void 0;
1250
1309
  }
1251
1310
  });
1252
1311
  }
@@ -1261,7 +1320,7 @@ class c {
1261
1320
  return new c(e.name ?? "", e.palette, e.tone ?? c.getInitialToneFromBackground(e.background), e.isBackground ?? !1, e.chromaMultiplier, e.background, e.secondBackground, e.contrastCurve, e.toneDeltaPair);
1262
1321
  }
1263
1322
  static getInitialToneFromBackground(e) {
1264
- return e === void 0 ? (t) => 50 : (t) => e(t) ? e(t).getTone(t) : 50;
1323
+ return e === void 0 ? (r) => 50 : (r) => e(r) ? e(r).getTone(r) : 50;
1265
1324
  }
1266
1325
  /**
1267
1326
  * The base constructor for DynamicColor.
@@ -1296,8 +1355,8 @@ class c {
1296
1355
  * constraint between two colors. One of them must be the color being
1297
1356
  * constructed.
1298
1357
  */
1299
- constructor(e, t, n, a, o, i, u, l, h) {
1300
- if (this.name = e, this.palette = t, this.tone = n, this.isBackground = a, this.chromaMultiplier = o, this.background = i, this.secondBackground = u, this.contrastCurve = l, this.toneDeltaPair = h, this.hctCache = /* @__PURE__ */ new Map(), !i && u)
1358
+ constructor(e, r, t, n, s, i, u, l, h) {
1359
+ if (this.name = e, this.palette = r, this.tone = t, this.isBackground = n, this.chromaMultiplier = s, this.background = i, this.secondBackground = u, this.contrastCurve = l, this.toneDeltaPair = h, this.hctCache = /* @__PURE__ */ new Map(), !i && u)
1301
1360
  throw new Error(`Color ${e} has secondBackgrounddefined, but background is not defined.`);
1302
1361
  if (!i && l)
1303
1362
  throw new Error(`Color ${e} has contrastCurvedefined, but background is not defined.`);
@@ -1346,11 +1405,11 @@ class c {
1346
1405
  * contrast level is.
1347
1406
  */
1348
1407
  getHct(e) {
1349
- const t = this.hctCache.get(e);
1350
- if (t != null)
1351
- return t;
1352
- const n = qe(e.specVersion).getHct(e, this);
1353
- return this.hctCache.size > 4 && this.hctCache.clear(), this.hctCache.set(e, n), n;
1408
+ const r = this.hctCache.get(e);
1409
+ if (r != null)
1410
+ return r;
1411
+ const t = we(e.specVersion).getHct(e, this);
1412
+ return this.hctCache.size > 4 && this.hctCache.clear(), this.hctCache.set(e, t), t;
1354
1413
  }
1355
1414
  /**
1356
1415
  * Returns a tone, T in the HCT color space, that this DynamicColor is under
@@ -1361,7 +1420,7 @@ class c {
1361
1420
  * contrast level is.
1362
1421
  */
1363
1422
  getTone(e) {
1364
- return qe(e.specVersion).getTone(e, this);
1423
+ return we(e.specVersion).getTone(e, this);
1365
1424
  }
1366
1425
  /**
1367
1426
  * Given a background tone, finds a foreground tone, while ensuring they reach
@@ -1372,13 +1431,13 @@ class c {
1372
1431
  * @param ratio The contrast ratio desired between bgTone and the return
1373
1432
  * value.
1374
1433
  */
1375
- static foregroundTone(e, t) {
1376
- const n = M.lighterUnsafe(e, t), a = M.darkerUnsafe(e, t), o = M.ratioOfTones(n, e), i = M.ratioOfTones(a, e);
1434
+ static foregroundTone(e, r) {
1435
+ const t = v.lighterUnsafe(e, r), n = v.darkerUnsafe(e, r), s = v.ratioOfTones(t, e), i = v.ratioOfTones(n, e);
1377
1436
  if (c.tonePrefersLightForeground(e)) {
1378
- const l = Math.abs(o - i) < 0.1 && o < t && i < t;
1379
- return o >= t || o >= i || l ? n : a;
1437
+ const l = Math.abs(s - i) < 0.1 && s < r && i < r;
1438
+ return s >= r || s >= i || l ? t : n;
1380
1439
  } else
1381
- return i >= t || i >= o ? a : n;
1440
+ return i >= r || i >= s ? n : t;
1382
1441
  }
1383
1442
  /**
1384
1443
  * Returns whether [tone] prefers a light foreground.
@@ -1409,76 +1468,76 @@ class c {
1409
1468
  return c.tonePrefersLightForeground(e) && !c.toneAllowsLightForeground(e) ? 49 : e;
1410
1469
  }
1411
1470
  }
1412
- class Et {
1413
- getHct(e, t) {
1414
- const n = t.getTone(e);
1415
- return t.palette(e).getHct(n);
1416
- }
1417
- getTone(e, t) {
1418
- const n = e.contrastLevel < 0, a = t.toneDeltaPair ? t.toneDeltaPair(e) : void 0;
1419
- if (a) {
1420
- const o = a.roleA, i = a.roleB, u = a.delta, l = a.polarity, h = a.stayTogether, f = l === "nearer" || l === "lighter" && !e.isDark || l === "darker" && e.isDark, g = f ? o : i, p = f ? i : o, v = t.name === g.name, m = e.isDark ? 1 : -1;
1421
- let P = g.tone(e), k = p.tone(e);
1422
- if (t.background && g.contrastCurve && p.contrastCurve) {
1423
- const B = t.background(e), x = g.contrastCurve(e), O = p.contrastCurve(e);
1424
- if (B && x && O) {
1425
- const R = B.getTone(e), V = x.get(e.contrastLevel), I = O.get(e.contrastLevel);
1426
- M.ratioOfTones(R, P) < V && (P = c.foregroundTone(R, V)), M.ratioOfTones(R, k) < I && (k = c.foregroundTone(R, I)), n && (P = c.foregroundTone(R, V), k = c.foregroundTone(R, I));
1471
+ class tr {
1472
+ getHct(e, r) {
1473
+ const t = r.getTone(e);
1474
+ return r.palette(e).getHct(t);
1475
+ }
1476
+ getTone(e, r) {
1477
+ const t = e.contrastLevel < 0, n = r.toneDeltaPair ? r.toneDeltaPair(e) : void 0;
1478
+ if (n) {
1479
+ const s = n.roleA, i = n.roleB, u = n.delta, l = n.polarity, h = n.stayTogether, d = l === "nearer" || l === "lighter" && !e.isDark || l === "darker" && e.isDark, C = d ? s : i, p = d ? i : s, D = r.name === C.name, m = e.isDark ? 1 : -1;
1480
+ let g = C.tone(e), P = p.tone(e);
1481
+ if (r.background && C.contrastCurve && p.contrastCurve) {
1482
+ const A = r.background(e), B = C.contrastCurve(e), O = p.contrastCurve(e);
1483
+ if (A && B && O) {
1484
+ const R = A.getTone(e), V = B.get(e.contrastLevel), I = O.get(e.contrastLevel);
1485
+ v.ratioOfTones(R, g) < V && (g = c.foregroundTone(R, V)), v.ratioOfTones(R, P) < I && (P = c.foregroundTone(R, I)), t && (g = c.foregroundTone(R, V), P = c.foregroundTone(R, I));
1427
1486
  }
1428
1487
  }
1429
- return (k - P) * m < u && (k = U(0, 100, P + u * m), (k - P) * m >= u || (P = U(0, 100, k - u * m))), 50 <= P && P < 60 ? m > 0 ? (P = 60, k = Math.max(k, P + u * m)) : (P = 49, k = Math.min(k, P + u * m)) : 50 <= k && k < 60 && (h ? m > 0 ? (P = 60, k = Math.max(k, P + u * m)) : (P = 49, k = Math.min(k, P + u * m)) : m > 0 ? k = 60 : k = 49), v ? P : k;
1488
+ return (P - g) * m < u && (P = H(0, 100, g + u * m), (P - g) * m >= u || (g = H(0, 100, P - u * m))), 50 <= g && g < 60 ? m > 0 ? (g = 60, P = Math.max(P, g + u * m)) : (g = 49, P = Math.min(P, g + u * m)) : 50 <= P && P < 60 && (h ? m > 0 ? (g = 60, P = Math.max(P, g + u * m)) : (g = 49, P = Math.min(P, g + u * m)) : m > 0 ? P = 60 : P = 49), D ? g : P;
1430
1489
  } else {
1431
- let o = t.tone(e);
1432
- if (t.background == null || t.background(e) === void 0 || t.contrastCurve == null || t.contrastCurve(e) === void 0)
1433
- return o;
1434
- const i = t.background(e).getTone(e), u = t.contrastCurve(e).get(e.contrastLevel);
1435
- if (M.ratioOfTones(i, o) >= u || (o = c.foregroundTone(i, u)), n && (o = c.foregroundTone(i, u)), t.isBackground && 50 <= o && o < 60 && (M.ratioOfTones(49, i) >= u ? o = 49 : o = 60), t.secondBackground == null || t.secondBackground(e) === void 0)
1436
- return o;
1437
- const [l, h] = [t.background, t.secondBackground], [f, g] = [l(e).getTone(e), h(e).getTone(e)], [p, v] = [Math.max(f, g), Math.min(f, g)];
1438
- if (M.ratioOfTones(p, o) >= u && M.ratioOfTones(v, o) >= u)
1439
- return o;
1440
- const m = M.lighter(p, u), P = M.darker(v, u), k = [];
1441
- return m !== -1 && k.push(m), P !== -1 && k.push(P), c.tonePrefersLightForeground(f) || c.tonePrefersLightForeground(g) ? m < 0 ? 100 : m : k.length === 1 ? k[0] : P < 0 ? 0 : P;
1490
+ let s = r.tone(e);
1491
+ if (r.background == null || r.background(e) === void 0 || r.contrastCurve == null || r.contrastCurve(e) === void 0)
1492
+ return s;
1493
+ const i = r.background(e).getTone(e), u = r.contrastCurve(e).get(e.contrastLevel);
1494
+ if (v.ratioOfTones(i, s) >= u || (s = c.foregroundTone(i, u)), t && (s = c.foregroundTone(i, u)), r.isBackground && 50 <= s && s < 60 && (v.ratioOfTones(49, i) >= u ? s = 49 : s = 60), r.secondBackground == null || r.secondBackground(e) === void 0)
1495
+ return s;
1496
+ const [l, h] = [r.background, r.secondBackground], [d, C] = [l(e).getTone(e), h(e).getTone(e)], [p, D] = [Math.max(d, C), Math.min(d, C)];
1497
+ if (v.ratioOfTones(p, s) >= u && v.ratioOfTones(D, s) >= u)
1498
+ return s;
1499
+ const m = v.lighter(p, u), g = v.darker(D, u), P = [];
1500
+ return m !== -1 && P.push(m), g !== -1 && P.push(g), c.tonePrefersLightForeground(d) || c.tonePrefersLightForeground(C) ? m < 0 ? 100 : m : P.length === 1 ? P[0] : g < 0 ? 0 : g;
1442
1501
  }
1443
1502
  }
1444
1503
  }
1445
- class Lt {
1446
- getHct(e, t) {
1447
- const n = t.palette(e), a = t.getTone(e), o = n.hue, i = n.chroma * (t.chromaMultiplier ? t.chromaMultiplier(e) : 1);
1448
- return C.from(o, i, a);
1504
+ class nr {
1505
+ getHct(e, r) {
1506
+ const t = r.palette(e), n = r.getTone(e), s = t.hue, i = t.chroma * (r.chromaMultiplier ? r.chromaMultiplier(e) : 1);
1507
+ return T.from(s, i, n);
1449
1508
  }
1450
- getTone(e, t) {
1451
- const n = t.toneDeltaPair ? t.toneDeltaPair(e) : void 0;
1452
- if (n) {
1453
- const a = n.roleA, o = n.roleB, i = n.polarity, u = n.constraint, l = i === "darker" || i === "relative_lighter" && e.isDark || i === "relative_darker" && !e.isDark ? -n.delta : n.delta, h = t.name === a.name, f = h ? a : o, g = h ? o : a;
1454
- let p = f.tone(e), v = g.getTone(e);
1509
+ getTone(e, r) {
1510
+ const t = r.toneDeltaPair ? r.toneDeltaPair(e) : void 0;
1511
+ if (t) {
1512
+ const n = t.roleA, s = t.roleB, i = t.polarity, u = t.constraint, l = i === "darker" || i === "relative_lighter" && e.isDark || i === "relative_darker" && !e.isDark ? -t.delta : t.delta, h = r.name === n.name, d = h ? n : s, C = h ? s : n;
1513
+ let p = d.tone(e), D = C.getTone(e);
1455
1514
  const m = l * (h ? 1 : -1);
1456
- if (u === "exact" ? p = U(0, 100, v + m) : u === "nearer" ? m > 0 ? p = U(0, 100, U(v, v + m, p)) : p = U(0, 100, U(v + m, v, p)) : u === "farther" && (m > 0 ? p = U(v + m, 100, p) : p = U(0, v + m, p)), t.background && t.contrastCurve) {
1457
- const P = t.background(e), k = t.contrastCurve(e);
1458
- if (P && k) {
1459
- const B = P.getTone(e), x = k.get(e.contrastLevel);
1460
- p = M.ratioOfTones(B, p) >= x && e.contrastLevel >= 0 ? p : c.foregroundTone(B, x);
1515
+ if (u === "exact" ? p = H(0, 100, D + m) : u === "nearer" ? m > 0 ? p = H(0, 100, H(D, D + m, p)) : p = H(0, 100, H(D + m, D, p)) : u === "farther" && (m > 0 ? p = H(D + m, 100, p) : p = H(0, D + m, p)), r.background && r.contrastCurve) {
1516
+ const g = r.background(e), P = r.contrastCurve(e);
1517
+ if (g && P) {
1518
+ const A = g.getTone(e), B = P.get(e.contrastLevel);
1519
+ p = v.ratioOfTones(A, p) >= B && e.contrastLevel >= 0 ? p : c.foregroundTone(A, B);
1461
1520
  }
1462
1521
  }
1463
- return t.isBackground && !t.name.endsWith("_fixed_dim") && (p >= 57 ? p = U(65, 100, p) : p = U(0, 49, p)), p;
1522
+ return r.isBackground && !r.name.endsWith("_fixed_dim") && (p >= 57 ? p = H(65, 100, p) : p = H(0, 49, p)), p;
1464
1523
  } else {
1465
- let a = t.tone(e);
1466
- if (t.background == null || t.background(e) === void 0 || t.contrastCurve == null || t.contrastCurve(e) === void 0)
1467
- return a;
1468
- const o = t.background(e).getTone(e), i = t.contrastCurve(e).get(e.contrastLevel);
1469
- if (a = M.ratioOfTones(o, a) >= i && e.contrastLevel >= 0 ? a : c.foregroundTone(o, i), t.isBackground && !t.name.endsWith("_fixed_dim") && (a >= 57 ? a = U(65, 100, a) : a = U(0, 49, a)), t.secondBackground == null || t.secondBackground(e) === void 0)
1470
- return a;
1471
- const [u, l] = [t.background, t.secondBackground], [h, f] = [u(e).getTone(e), l(e).getTone(e)], [g, p] = [Math.max(h, f), Math.min(h, f)];
1472
- if (M.ratioOfTones(g, a) >= i && M.ratioOfTones(p, a) >= i)
1473
- return a;
1474
- const v = M.lighter(g, i), m = M.darker(p, i), P = [];
1475
- return v !== -1 && P.push(v), m !== -1 && P.push(m), c.tonePrefersLightForeground(h) || c.tonePrefersLightForeground(f) ? v < 0 ? 100 : v : P.length === 1 ? P[0] : m < 0 ? 0 : m;
1524
+ let n = r.tone(e);
1525
+ if (r.background == null || r.background(e) === void 0 || r.contrastCurve == null || r.contrastCurve(e) === void 0)
1526
+ return n;
1527
+ const s = r.background(e).getTone(e), i = r.contrastCurve(e).get(e.contrastLevel);
1528
+ if (n = v.ratioOfTones(s, n) >= i && e.contrastLevel >= 0 ? n : c.foregroundTone(s, i), r.isBackground && !r.name.endsWith("_fixed_dim") && (n >= 57 ? n = H(65, 100, n) : n = H(0, 49, n)), r.secondBackground == null || r.secondBackground(e) === void 0)
1529
+ return n;
1530
+ const [u, l] = [r.background, r.secondBackground], [h, d] = [u(e).getTone(e), l(e).getTone(e)], [C, p] = [Math.max(h, d), Math.min(h, d)];
1531
+ if (v.ratioOfTones(C, n) >= i && v.ratioOfTones(p, n) >= i)
1532
+ return n;
1533
+ const D = v.lighter(C, i), m = v.darker(p, i), g = [];
1534
+ return D !== -1 && g.push(D), m !== -1 && g.push(m), c.tonePrefersLightForeground(h) || c.tonePrefersLightForeground(d) ? D < 0 ? 100 : D : g.length === 1 ? g[0] : m < 0 ? 0 : m;
1476
1535
  }
1477
1536
  }
1478
1537
  }
1479
- const Ot = new Et(), Rt = new Lt();
1480
- function qe(r) {
1481
- return r === "2025" ? Rt : Ot;
1538
+ const ar = new tr(), or = new nr();
1539
+ function we(a) {
1540
+ return a === "2025" ? or : ar;
1482
1541
  }
1483
1542
  /**
1484
1543
  * @license
@@ -1502,8 +1561,8 @@ class Y {
1502
1561
  * @return Tones matching that color's hue and chroma.
1503
1562
  */
1504
1563
  static fromInt(e) {
1505
- const t = C.fromInt(e);
1506
- return Y.fromHct(t);
1564
+ const r = T.fromInt(e);
1565
+ return Y.fromHct(r);
1507
1566
  }
1508
1567
  /**
1509
1568
  * @param hct Hct
@@ -1517,36 +1576,36 @@ class Y {
1517
1576
  * @param chroma HCT chroma
1518
1577
  * @return Tones matching hue and chroma.
1519
1578
  */
1520
- static fromHueAndChroma(e, t) {
1521
- const n = new Vt(e, t).create();
1522
- return new Y(e, t, n);
1579
+ static fromHueAndChroma(e, r) {
1580
+ const t = new ir(e, r).create();
1581
+ return new Y(e, r, t);
1523
1582
  }
1524
- constructor(e, t, n) {
1525
- this.hue = e, this.chroma = t, this.keyColor = n, this.cache = /* @__PURE__ */ new Map();
1583
+ constructor(e, r, t) {
1584
+ this.hue = e, this.chroma = r, this.keyColor = t, this.cache = /* @__PURE__ */ new Map();
1526
1585
  }
1527
1586
  /**
1528
1587
  * @param tone HCT tone, measured from 0 to 100.
1529
1588
  * @return ARGB representation of a color with that tone.
1530
1589
  */
1531
1590
  tone(e) {
1532
- let t = this.cache.get(e);
1533
- return t === void 0 && (e == 99 && C.isYellow(this.hue) ? t = this.averageArgb(this.tone(98), this.tone(100)) : t = C.from(this.hue, this.chroma, e).toInt(), this.cache.set(e, t)), t;
1591
+ let r = this.cache.get(e);
1592
+ return r === void 0 && (e == 99 && T.isYellow(this.hue) ? r = this.averageArgb(this.tone(98), this.tone(100)) : r = T.from(this.hue, this.chroma, e).toInt(), this.cache.set(e, r)), r;
1534
1593
  }
1535
1594
  /**
1536
1595
  * @param tone HCT tone.
1537
1596
  * @return HCT representation of a color with that tone.
1538
1597
  */
1539
1598
  getHct(e) {
1540
- return C.fromInt(this.tone(e));
1599
+ return T.fromInt(this.tone(e));
1541
1600
  }
1542
- averageArgb(e, t) {
1543
- const n = e >>> 16 & 255, a = e >>> 8 & 255, o = e & 255, i = t >>> 16 & 255, u = t >>> 8 & 255, l = t & 255, h = Math.round((n + i) / 2), f = Math.round((a + u) / 2), g = Math.round((o + l) / 2);
1544
- return (255 << 24 | (h & 255) << 16 | (f & 255) << 8 | g & 255) >>> 0;
1601
+ averageArgb(e, r) {
1602
+ const t = e >>> 16 & 255, n = e >>> 8 & 255, s = e & 255, i = r >>> 16 & 255, u = r >>> 8 & 255, l = r & 255, h = Math.round((t + i) / 2), d = Math.round((n + u) / 2), C = Math.round((s + l) / 2);
1603
+ return (255 << 24 | (h & 255) << 16 | (d & 255) << 8 | C & 255) >>> 0;
1545
1604
  }
1546
1605
  }
1547
- class Vt {
1548
- constructor(e, t) {
1549
- this.hue = e, this.requestedChroma = t, this.chromaCache = /* @__PURE__ */ new Map(), this.maxChromaValue = 200;
1606
+ class ir {
1607
+ constructor(e, r) {
1608
+ this.hue = e, this.requestedChroma = r, this.chromaCache = /* @__PURE__ */ new Map(), this.maxChromaValue = 200;
1550
1609
  }
1551
1610
  /**
1552
1611
  * Creates a key color from a [hue] and a [chroma].
@@ -1556,28 +1615,28 @@ class Vt {
1556
1615
  * @return Key color [Hct]
1557
1616
  */
1558
1617
  create() {
1559
- let a = 0, o = 100;
1560
- for (; a < o; ) {
1561
- const i = Math.floor((a + o) / 2), u = this.maxChroma(i) < this.maxChroma(i + 1);
1618
+ let n = 0, s = 100;
1619
+ for (; n < s; ) {
1620
+ const i = Math.floor((n + s) / 2), u = this.maxChroma(i) < this.maxChroma(i + 1);
1562
1621
  if (this.maxChroma(i) >= this.requestedChroma - 0.01)
1563
- if (Math.abs(a - 50) < Math.abs(o - 50))
1564
- o = i;
1622
+ if (Math.abs(n - 50) < Math.abs(s - 50))
1623
+ s = i;
1565
1624
  else {
1566
- if (a === i)
1567
- return C.from(this.hue, this.requestedChroma, a);
1568
- a = i;
1625
+ if (n === i)
1626
+ return T.from(this.hue, this.requestedChroma, n);
1627
+ n = i;
1569
1628
  }
1570
1629
  else
1571
- u ? a = i + 1 : o = i;
1630
+ u ? n = i + 1 : s = i;
1572
1631
  }
1573
- return C.from(this.hue, this.requestedChroma, a);
1632
+ return T.from(this.hue, this.requestedChroma, n);
1574
1633
  }
1575
1634
  // Find the maximum chroma for a given tone
1576
1635
  maxChroma(e) {
1577
1636
  if (this.chromaCache.has(e))
1578
1637
  return this.chromaCache.get(e);
1579
- const t = C.from(this.hue, this.maxChromaValue, e).chroma;
1580
- return this.chromaCache.set(e, t), t;
1638
+ const r = T.from(this.hue, this.maxChromaValue, e).chroma;
1639
+ return this.chromaCache.set(e, r), r;
1581
1640
  }
1582
1641
  }
1583
1642
  /**
@@ -1605,8 +1664,8 @@ class y {
1605
1664
  * @param medium Value for contrast level 0.5
1606
1665
  * @param high Value for contrast level 1.0
1607
1666
  */
1608
- constructor(e, t, n, a) {
1609
- this.low = e, this.normal = t, this.medium = n, this.high = a;
1667
+ constructor(e, r, t, n) {
1668
+ this.low = e, this.normal = r, this.medium = t, this.high = n;
1610
1669
  }
1611
1670
  /**
1612
1671
  * Returns the value at a given contrast level.
@@ -1616,7 +1675,7 @@ class y {
1616
1675
  * @return The value. For contrast ratios, a number between 1.0 and 21.0.
1617
1676
  */
1618
1677
  get(e) {
1619
- return e <= -1 ? this.low : e < 0 ? fe(this.low, this.normal, (e - -1) / 1) : e < 0.5 ? fe(this.normal, this.medium, (e - 0) / 0.5) : e < 1 ? fe(this.medium, this.high, (e - 0.5) / 0.5) : this.high;
1678
+ return e <= -1 ? this.low : e < 0 ? ne(this.low, this.normal, (e - -1) / 1) : e < 0.5 ? ne(this.normal, this.medium, (e - 0) / 0.5) : e < 1 ? ne(this.medium, this.high, (e - 0.5) / 0.5) : this.high;
1620
1679
  }
1621
1680
  }
1622
1681
  /**
@@ -1661,8 +1720,8 @@ class w {
1661
1720
  * of the "awkward zone" (T50-59). This is necessary for certain cases where
1662
1721
  * one role has two backgrounds.
1663
1722
  */
1664
- constructor(e, t, n, a, o, i) {
1665
- this.roleA = e, this.roleB = t, this.delta = n, this.polarity = a, this.stayTogether = o, this.constraint = i, this.constraint = i ?? "exact";
1723
+ constructor(e, r, t, n, s, i) {
1724
+ this.roleA = e, this.roleB = r, this.delta = t, this.polarity = n, this.stayTogether = s, this.constraint = i, this.constraint = i ?? "exact";
1666
1725
  }
1667
1726
  }
1668
1727
  /**
@@ -1681,10 +1740,10 @@ class w {
1681
1740
  * See the License for the specific language governing permissions and
1682
1741
  * limitations under the License.
1683
1742
  */
1684
- var d;
1685
- (function(r) {
1686
- r[r.MONOCHROME = 0] = "MONOCHROME", r[r.NEUTRAL = 1] = "NEUTRAL", r[r.TONAL_SPOT = 2] = "TONAL_SPOT", r[r.VIBRANT = 3] = "VIBRANT", r[r.EXPRESSIVE = 4] = "EXPRESSIVE", r[r.FIDELITY = 5] = "FIDELITY", r[r.CONTENT = 6] = "CONTENT", r[r.RAINBOW = 7] = "RAINBOW", r[r.FRUIT_SALAD = 8] = "FRUIT_SALAD";
1687
- })(d || (d = {}));
1743
+ var f;
1744
+ (function(a) {
1745
+ a[a.MONOCHROME = 0] = "MONOCHROME", a[a.NEUTRAL = 1] = "NEUTRAL", a[a.TONAL_SPOT = 2] = "TONAL_SPOT", a[a.VIBRANT = 3] = "VIBRANT", a[a.EXPRESSIVE = 4] = "EXPRESSIVE", a[a.FIDELITY = 5] = "FIDELITY", a[a.CONTENT = 6] = "CONTENT", a[a.RAINBOW = 7] = "RAINBOW", a[a.FRUIT_SALAD = 8] = "FRUIT_SALAD";
1746
+ })(f || (f = {}));
1688
1747
  /**
1689
1748
  * @license
1690
1749
  * Copyright 2025 Google LLC
@@ -1701,28 +1760,28 @@ var d;
1701
1760
  * See the License for the specific language governing permissions and
1702
1761
  * limitations under the License.
1703
1762
  */
1704
- function ue(r) {
1705
- return r.variant === d.FIDELITY || r.variant === d.CONTENT;
1706
- }
1707
- function A(r) {
1708
- return r.variant === d.MONOCHROME;
1709
- }
1710
- function Nt(r, e, t, n) {
1711
- let a = t, o = C.from(r, e, t);
1712
- if (o.chroma < e) {
1713
- let i = o.chroma;
1714
- for (; o.chroma < e; ) {
1715
- a += n ? -1 : 1;
1716
- const u = C.from(r, e, a);
1763
+ function re(a) {
1764
+ return a.variant === f.FIDELITY || a.variant === f.CONTENT;
1765
+ }
1766
+ function M(a) {
1767
+ return a.variant === f.MONOCHROME;
1768
+ }
1769
+ function sr(a, e, r, t) {
1770
+ let n = r, s = T.from(a, e, r);
1771
+ if (s.chroma < e) {
1772
+ let i = s.chroma;
1773
+ for (; s.chroma < e; ) {
1774
+ n += t ? -1 : 1;
1775
+ const u = T.from(a, e, n);
1717
1776
  if (i > u.chroma || Math.abs(u.chroma - e) < 0.4)
1718
1777
  break;
1719
- const l = Math.abs(u.chroma - e), h = Math.abs(o.chroma - e);
1720
- l < h && (o = u), i = Math.max(i, u.chroma);
1778
+ const l = Math.abs(u.chroma - e), h = Math.abs(s.chroma - e);
1779
+ l < h && (s = u), i = Math.max(i, u.chroma);
1721
1780
  }
1722
1781
  }
1723
- return a;
1782
+ return n;
1724
1783
  }
1725
- class _t {
1784
+ class cr {
1726
1785
  ////////////////////////////////////////////////////////////////
1727
1786
  // Main Palettes //
1728
1787
  ////////////////////////////////////////////////////////////////
@@ -1942,7 +2001,7 @@ class _t {
1942
2001
  return c.fromPalette({
1943
2002
  name: "primary",
1944
2003
  palette: (e) => e.primaryPalette,
1945
- tone: (e) => A(e) ? e.isDark ? 100 : 0 : e.isDark ? 80 : 40,
2004
+ tone: (e) => M(e) ? e.isDark ? 100 : 0 : e.isDark ? 80 : 40,
1946
2005
  isBackground: !0,
1947
2006
  background: (e) => this.highestSurface(e),
1948
2007
  contrastCurve: (e) => new y(3, 4.5, 7, 7),
@@ -1955,7 +2014,7 @@ class _t {
1955
2014
  return c.fromPalette({
1956
2015
  name: "on_primary",
1957
2016
  palette: (e) => e.primaryPalette,
1958
- tone: (e) => A(e) ? e.isDark ? 10 : 90 : e.isDark ? 20 : 100,
2017
+ tone: (e) => M(e) ? e.isDark ? 10 : 90 : e.isDark ? 20 : 100,
1959
2018
  background: (e) => this.primary(),
1960
2019
  contrastCurve: (e) => new y(4.5, 7, 11, 21)
1961
2020
  });
@@ -1964,7 +2023,7 @@ class _t {
1964
2023
  return c.fromPalette({
1965
2024
  name: "primary_container",
1966
2025
  palette: (e) => e.primaryPalette,
1967
- tone: (e) => ue(e) ? e.sourceColorHct.tone : A(e) ? e.isDark ? 85 : 25 : e.isDark ? 30 : 90,
2026
+ tone: (e) => re(e) ? e.sourceColorHct.tone : M(e) ? e.isDark ? 85 : 25 : e.isDark ? 30 : 90,
1968
2027
  isBackground: !0,
1969
2028
  background: (e) => this.highestSurface(e),
1970
2029
  contrastCurve: (e) => new y(1, 1, 3, 4.5),
@@ -1975,7 +2034,7 @@ class _t {
1975
2034
  return c.fromPalette({
1976
2035
  name: "on_primary_container",
1977
2036
  palette: (e) => e.primaryPalette,
1978
- tone: (e) => ue(e) ? c.foregroundTone(this.primaryContainer().tone(e), 4.5) : A(e) ? e.isDark ? 0 : 100 : e.isDark ? 90 : 30,
2037
+ tone: (e) => re(e) ? c.foregroundTone(this.primaryContainer().tone(e), 4.5) : M(e) ? e.isDark ? 0 : 100 : e.isDark ? 90 : 30,
1979
2038
  background: (e) => this.primaryContainer(),
1980
2039
  contrastCurve: (e) => new y(3, 4.5, 7, 11)
1981
2040
  });
@@ -2009,7 +2068,7 @@ class _t {
2009
2068
  return c.fromPalette({
2010
2069
  name: "on_secondary",
2011
2070
  palette: (e) => e.secondaryPalette,
2012
- tone: (e) => A(e) ? e.isDark ? 10 : 100 : e.isDark ? 20 : 100,
2071
+ tone: (e) => M(e) ? e.isDark ? 10 : 100 : e.isDark ? 20 : 100,
2013
2072
  background: (e) => this.secondary(),
2014
2073
  contrastCurve: (e) => new y(4.5, 7, 11, 21)
2015
2074
  });
@@ -2019,8 +2078,8 @@ class _t {
2019
2078
  name: "secondary_container",
2020
2079
  palette: (e) => e.secondaryPalette,
2021
2080
  tone: (e) => {
2022
- const t = e.isDark ? 30 : 90;
2023
- return A(e) ? e.isDark ? 30 : 85 : ue(e) ? Nt(e.secondaryPalette.hue, e.secondaryPalette.chroma, t, !e.isDark) : t;
2081
+ const r = e.isDark ? 30 : 90;
2082
+ return M(e) ? e.isDark ? 30 : 85 : re(e) ? sr(e.secondaryPalette.hue, e.secondaryPalette.chroma, r, !e.isDark) : r;
2024
2083
  },
2025
2084
  isBackground: !0,
2026
2085
  background: (e) => this.highestSurface(e),
@@ -2032,7 +2091,7 @@ class _t {
2032
2091
  return c.fromPalette({
2033
2092
  name: "on_secondary_container",
2034
2093
  palette: (e) => e.secondaryPalette,
2035
- tone: (e) => A(e) ? e.isDark ? 90 : 10 : ue(e) ? c.foregroundTone(this.secondaryContainer().tone(e), 4.5) : e.isDark ? 90 : 30,
2094
+ tone: (e) => M(e) ? e.isDark ? 90 : 10 : re(e) ? c.foregroundTone(this.secondaryContainer().tone(e), 4.5) : e.isDark ? 90 : 30,
2036
2095
  background: (e) => this.secondaryContainer(),
2037
2096
  contrastCurve: (e) => new y(3, 4.5, 7, 11)
2038
2097
  });
@@ -2044,7 +2103,7 @@ class _t {
2044
2103
  return c.fromPalette({
2045
2104
  name: "tertiary",
2046
2105
  palette: (e) => e.tertiaryPalette,
2047
- tone: (e) => A(e) ? e.isDark ? 90 : 25 : e.isDark ? 80 : 40,
2106
+ tone: (e) => M(e) ? e.isDark ? 90 : 25 : e.isDark ? 80 : 40,
2048
2107
  isBackground: !0,
2049
2108
  background: (e) => this.highestSurface(e),
2050
2109
  contrastCurve: (e) => new y(3, 4.5, 7, 7),
@@ -2057,7 +2116,7 @@ class _t {
2057
2116
  return c.fromPalette({
2058
2117
  name: "on_tertiary",
2059
2118
  palette: (e) => e.tertiaryPalette,
2060
- tone: (e) => A(e) ? e.isDark ? 10 : 90 : e.isDark ? 20 : 100,
2119
+ tone: (e) => M(e) ? e.isDark ? 10 : 90 : e.isDark ? 20 : 100,
2061
2120
  background: (e) => this.tertiary(),
2062
2121
  contrastCurve: (e) => new y(4.5, 7, 11, 21)
2063
2122
  });
@@ -2067,12 +2126,12 @@ class _t {
2067
2126
  name: "tertiary_container",
2068
2127
  palette: (e) => e.tertiaryPalette,
2069
2128
  tone: (e) => {
2070
- if (A(e))
2129
+ if (M(e))
2071
2130
  return e.isDark ? 60 : 49;
2072
- if (!ue(e))
2131
+ if (!re(e))
2073
2132
  return e.isDark ? 30 : 90;
2074
- const t = e.tertiaryPalette.getHct(e.sourceColorHct.tone);
2075
- return Ne.fixIfDisliked(t).tone;
2133
+ const r = e.tertiaryPalette.getHct(e.sourceColorHct.tone);
2134
+ return Se.fixIfDisliked(r).tone;
2076
2135
  },
2077
2136
  isBackground: !0,
2078
2137
  background: (e) => this.highestSurface(e),
@@ -2084,7 +2143,7 @@ class _t {
2084
2143
  return c.fromPalette({
2085
2144
  name: "on_tertiary_container",
2086
2145
  palette: (e) => e.tertiaryPalette,
2087
- tone: (e) => A(e) ? e.isDark ? 0 : 100 : ue(e) ? c.foregroundTone(this.tertiaryContainer().tone(e), 4.5) : e.isDark ? 90 : 30,
2146
+ tone: (e) => M(e) ? e.isDark ? 0 : 100 : re(e) ? c.foregroundTone(this.tertiaryContainer().tone(e), 4.5) : e.isDark ? 90 : 30,
2088
2147
  background: (e) => this.tertiaryContainer(),
2089
2148
  contrastCurve: (e) => new y(3, 4.5, 7, 11)
2090
2149
  });
@@ -2129,7 +2188,7 @@ class _t {
2129
2188
  return c.fromPalette({
2130
2189
  name: "on_error_container",
2131
2190
  palette: (e) => e.errorPalette,
2132
- tone: (e) => A(e) ? e.isDark ? 90 : 10 : e.isDark ? 90 : 30,
2191
+ tone: (e) => M(e) ? e.isDark ? 90 : 10 : e.isDark ? 90 : 30,
2133
2192
  background: (e) => this.errorContainer(),
2134
2193
  contrastCurve: (e) => new y(3, 4.5, 7, 11)
2135
2194
  });
@@ -2141,7 +2200,7 @@ class _t {
2141
2200
  return c.fromPalette({
2142
2201
  name: "primary_fixed",
2143
2202
  palette: (e) => e.primaryPalette,
2144
- tone: (e) => A(e) ? 40 : 90,
2203
+ tone: (e) => M(e) ? 40 : 90,
2145
2204
  isBackground: !0,
2146
2205
  background: (e) => this.highestSurface(e),
2147
2206
  contrastCurve: (e) => new y(1, 1, 3, 4.5),
@@ -2152,7 +2211,7 @@ class _t {
2152
2211
  return c.fromPalette({
2153
2212
  name: "primary_fixed_dim",
2154
2213
  palette: (e) => e.primaryPalette,
2155
- tone: (e) => A(e) ? 30 : 80,
2214
+ tone: (e) => M(e) ? 30 : 80,
2156
2215
  isBackground: !0,
2157
2216
  background: (e) => this.highestSurface(e),
2158
2217
  contrastCurve: (e) => new y(1, 1, 3, 4.5),
@@ -2163,7 +2222,7 @@ class _t {
2163
2222
  return c.fromPalette({
2164
2223
  name: "on_primary_fixed",
2165
2224
  palette: (e) => e.primaryPalette,
2166
- tone: (e) => A(e) ? 100 : 10,
2225
+ tone: (e) => M(e) ? 100 : 10,
2167
2226
  background: (e) => this.primaryFixedDim(),
2168
2227
  secondBackground: (e) => this.primaryFixed(),
2169
2228
  contrastCurve: (e) => new y(4.5, 7, 11, 21)
@@ -2173,7 +2232,7 @@ class _t {
2173
2232
  return c.fromPalette({
2174
2233
  name: "on_primary_fixed_variant",
2175
2234
  palette: (e) => e.primaryPalette,
2176
- tone: (e) => A(e) ? 90 : 30,
2235
+ tone: (e) => M(e) ? 90 : 30,
2177
2236
  background: (e) => this.primaryFixedDim(),
2178
2237
  secondBackground: (e) => this.primaryFixed(),
2179
2238
  contrastCurve: (e) => new y(3, 4.5, 7, 11)
@@ -2186,7 +2245,7 @@ class _t {
2186
2245
  return c.fromPalette({
2187
2246
  name: "secondary_fixed",
2188
2247
  palette: (e) => e.secondaryPalette,
2189
- tone: (e) => A(e) ? 80 : 90,
2248
+ tone: (e) => M(e) ? 80 : 90,
2190
2249
  isBackground: !0,
2191
2250
  background: (e) => this.highestSurface(e),
2192
2251
  contrastCurve: (e) => new y(1, 1, 3, 4.5),
@@ -2197,7 +2256,7 @@ class _t {
2197
2256
  return c.fromPalette({
2198
2257
  name: "secondary_fixed_dim",
2199
2258
  palette: (e) => e.secondaryPalette,
2200
- tone: (e) => A(e) ? 70 : 80,
2259
+ tone: (e) => M(e) ? 70 : 80,
2201
2260
  isBackground: !0,
2202
2261
  background: (e) => this.highestSurface(e),
2203
2262
  contrastCurve: (e) => new y(1, 1, 3, 4.5),
@@ -2218,7 +2277,7 @@ class _t {
2218
2277
  return c.fromPalette({
2219
2278
  name: "on_secondary_fixed_variant",
2220
2279
  palette: (e) => e.secondaryPalette,
2221
- tone: (e) => A(e) ? 25 : 30,
2280
+ tone: (e) => M(e) ? 25 : 30,
2222
2281
  background: (e) => this.secondaryFixedDim(),
2223
2282
  secondBackground: (e) => this.secondaryFixed(),
2224
2283
  contrastCurve: (e) => new y(3, 4.5, 7, 11)
@@ -2231,7 +2290,7 @@ class _t {
2231
2290
  return c.fromPalette({
2232
2291
  name: "tertiary_fixed",
2233
2292
  palette: (e) => e.tertiaryPalette,
2234
- tone: (e) => A(e) ? 40 : 90,
2293
+ tone: (e) => M(e) ? 40 : 90,
2235
2294
  isBackground: !0,
2236
2295
  background: (e) => this.highestSurface(e),
2237
2296
  contrastCurve: (e) => new y(1, 1, 3, 4.5),
@@ -2242,7 +2301,7 @@ class _t {
2242
2301
  return c.fromPalette({
2243
2302
  name: "tertiary_fixed_dim",
2244
2303
  palette: (e) => e.tertiaryPalette,
2245
- tone: (e) => A(e) ? 30 : 80,
2304
+ tone: (e) => M(e) ? 30 : 80,
2246
2305
  isBackground: !0,
2247
2306
  background: (e) => this.highestSurface(e),
2248
2307
  contrastCurve: (e) => new y(1, 1, 3, 4.5),
@@ -2253,7 +2312,7 @@ class _t {
2253
2312
  return c.fromPalette({
2254
2313
  name: "on_tertiary_fixed",
2255
2314
  palette: (e) => e.tertiaryPalette,
2256
- tone: (e) => A(e) ? 100 : 10,
2315
+ tone: (e) => M(e) ? 100 : 10,
2257
2316
  background: (e) => this.tertiaryFixedDim(),
2258
2317
  secondBackground: (e) => this.tertiaryFixed(),
2259
2318
  contrastCurve: (e) => new y(4.5, 7, 11, 21)
@@ -2263,7 +2322,7 @@ class _t {
2263
2322
  return c.fromPalette({
2264
2323
  name: "on_tertiary_fixed_variant",
2265
2324
  palette: (e) => e.tertiaryPalette,
2266
- tone: (e) => A(e) ? 90 : 30,
2325
+ tone: (e) => M(e) ? 90 : 30,
2267
2326
  background: (e) => this.tertiaryFixedDim(),
2268
2327
  secondBackground: (e) => this.tertiaryFixed(),
2269
2328
  contrastCurve: (e) => new y(3, 4.5, 7, 11)
@@ -2292,266 +2351,266 @@ class _t {
2292
2351
  * See the License for the specific language governing permissions and
2293
2352
  * limitations under the License.
2294
2353
  */
2295
- function D(r, e = 0, t = 100, n = 1) {
2296
- let a = ct(r.hue, r.chroma * n, 100, !0);
2297
- return U(e, t, a);
2354
+ function F(a, e = 0, r = 100, t = 1) {
2355
+ let n = Me(a.hue, a.chroma * t, 100, !0);
2356
+ return H(e, r, n);
2298
2357
  }
2299
- function ne(r, e = 0, t = 100) {
2300
- let n = ct(r.hue, r.chroma, 0, !1);
2301
- return U(e, t, n);
2358
+ function W(a, e = 0, r = 100) {
2359
+ let t = Me(a.hue, a.chroma, 0, !1);
2360
+ return H(e, r, t);
2302
2361
  }
2303
- function ct(r, e, t, n) {
2304
- let a = t, o = C.from(r, e, a);
2305
- for (; o.chroma < e && !(t < 0 || t > 100); ) {
2306
- t += n ? -1 : 1;
2307
- const i = C.from(r, e, t);
2308
- o.chroma < i.chroma && (o = i, a = t);
2309
- }
2310
- return a;
2362
+ function Me(a, e, r, t) {
2363
+ let n = r, s = T.from(a, e, n);
2364
+ for (; s.chroma < e && !(r < 0 || r > 100); ) {
2365
+ r += t ? -1 : 1;
2366
+ const i = T.from(a, e, r);
2367
+ s.chroma < i.chroma && (s = i, n = r);
2368
+ }
2369
+ return n;
2311
2370
  }
2312
- function b(r) {
2313
- return r === 1.5 ? new y(1.5, 1.5, 3, 5.5) : r === 3 ? new y(3, 3, 4.5, 7) : r === 4.5 ? new y(4.5, 4.5, 7, 11) : r === 6 ? new y(6, 6, 7, 11) : r === 7 ? new y(7, 7, 11, 21) : r === 9 ? new y(9, 9, 11, 21) : r === 11 ? new y(11, 11, 21, 21) : r === 21 ? new y(21, 21, 21, 21) : new y(r, r, 7, 21);
2371
+ function k(a) {
2372
+ return a === 1.5 ? new y(1.5, 1.5, 3, 5.5) : a === 3 ? new y(3, 3, 4.5, 7) : a === 4.5 ? new y(4.5, 4.5, 7, 11) : a === 6 ? new y(6, 6, 7, 11) : a === 7 ? new y(7, 7, 11, 21) : a === 9 ? new y(9, 9, 11, 21) : a === 11 ? new y(11, 11, 21, 21) : a === 21 ? new y(21, 21, 21, 21) : new y(a, a, 7, 21);
2314
2373
  }
2315
- class Ht extends _t {
2374
+ class ur extends cr {
2316
2375
  ////////////////////////////////////////////////////////////////
2317
2376
  // Surfaces [S] //
2318
2377
  ////////////////////////////////////////////////////////////////
2319
2378
  surface() {
2320
2379
  const e = c.fromPalette({
2321
2380
  name: "surface",
2322
- palette: (t) => t.neutralPalette,
2323
- tone: (t) => (super.surface().tone(t), t.platform === "phone" ? t.isDark ? 4 : C.isYellow(t.neutralPalette.hue) ? 99 : t.variant === d.VIBRANT ? 97 : 98 : 0),
2381
+ palette: (r) => r.neutralPalette,
2382
+ tone: (r) => (super.surface().tone(r), r.platform === "phone" ? r.isDark ? 4 : T.isYellow(r.neutralPalette.hue) ? 99 : r.variant === f.VIBRANT ? 97 : 98 : 0),
2324
2383
  isBackground: !0
2325
2384
  });
2326
- return T(super.surface(), "2025", e);
2385
+ return b(super.surface(), "2025", e);
2327
2386
  }
2328
2387
  surfaceDim() {
2329
2388
  const e = c.fromPalette({
2330
2389
  name: "surface_dim",
2331
- palette: (t) => t.neutralPalette,
2332
- tone: (t) => t.isDark ? 4 : C.isYellow(t.neutralPalette.hue) ? 90 : t.variant === d.VIBRANT ? 85 : 87,
2390
+ palette: (r) => r.neutralPalette,
2391
+ tone: (r) => r.isDark ? 4 : T.isYellow(r.neutralPalette.hue) ? 90 : r.variant === f.VIBRANT ? 85 : 87,
2333
2392
  isBackground: !0,
2334
- chromaMultiplier: (t) => {
2335
- if (!t.isDark) {
2336
- if (t.variant === d.NEUTRAL)
2393
+ chromaMultiplier: (r) => {
2394
+ if (!r.isDark) {
2395
+ if (r.variant === f.NEUTRAL)
2337
2396
  return 2.5;
2338
- if (t.variant === d.TONAL_SPOT)
2397
+ if (r.variant === f.TONAL_SPOT)
2339
2398
  return 1.7;
2340
- if (t.variant === d.EXPRESSIVE)
2341
- return C.isYellow(t.neutralPalette.hue) ? 2.7 : 1.75;
2342
- if (t.variant === d.VIBRANT)
2399
+ if (r.variant === f.EXPRESSIVE)
2400
+ return T.isYellow(r.neutralPalette.hue) ? 2.7 : 1.75;
2401
+ if (r.variant === f.VIBRANT)
2343
2402
  return 1.36;
2344
2403
  }
2345
2404
  return 1;
2346
2405
  }
2347
2406
  });
2348
- return T(super.surfaceDim(), "2025", e);
2407
+ return b(super.surfaceDim(), "2025", e);
2349
2408
  }
2350
2409
  surfaceBright() {
2351
2410
  const e = c.fromPalette({
2352
2411
  name: "surface_bright",
2353
- palette: (t) => t.neutralPalette,
2354
- tone: (t) => t.isDark ? 18 : C.isYellow(t.neutralPalette.hue) ? 99 : t.variant === d.VIBRANT ? 97 : 98,
2412
+ palette: (r) => r.neutralPalette,
2413
+ tone: (r) => r.isDark ? 18 : T.isYellow(r.neutralPalette.hue) ? 99 : r.variant === f.VIBRANT ? 97 : 98,
2355
2414
  isBackground: !0,
2356
- chromaMultiplier: (t) => {
2357
- if (t.isDark) {
2358
- if (t.variant === d.NEUTRAL)
2415
+ chromaMultiplier: (r) => {
2416
+ if (r.isDark) {
2417
+ if (r.variant === f.NEUTRAL)
2359
2418
  return 2.5;
2360
- if (t.variant === d.TONAL_SPOT)
2419
+ if (r.variant === f.TONAL_SPOT)
2361
2420
  return 1.7;
2362
- if (t.variant === d.EXPRESSIVE)
2363
- return C.isYellow(t.neutralPalette.hue) ? 2.7 : 1.75;
2364
- if (t.variant === d.VIBRANT)
2421
+ if (r.variant === f.EXPRESSIVE)
2422
+ return T.isYellow(r.neutralPalette.hue) ? 2.7 : 1.75;
2423
+ if (r.variant === f.VIBRANT)
2365
2424
  return 1.36;
2366
2425
  }
2367
2426
  return 1;
2368
2427
  }
2369
2428
  });
2370
- return T(super.surfaceBright(), "2025", e);
2429
+ return b(super.surfaceBright(), "2025", e);
2371
2430
  }
2372
2431
  surfaceContainerLowest() {
2373
2432
  const e = c.fromPalette({
2374
2433
  name: "surface_container_lowest",
2375
- palette: (t) => t.neutralPalette,
2376
- tone: (t) => t.isDark ? 0 : 100,
2434
+ palette: (r) => r.neutralPalette,
2435
+ tone: (r) => r.isDark ? 0 : 100,
2377
2436
  isBackground: !0
2378
2437
  });
2379
- return T(super.surfaceContainerLowest(), "2025", e);
2438
+ return b(super.surfaceContainerLowest(), "2025", e);
2380
2439
  }
2381
2440
  surfaceContainerLow() {
2382
2441
  const e = c.fromPalette({
2383
2442
  name: "surface_container_low",
2384
- palette: (t) => t.neutralPalette,
2385
- tone: (t) => t.platform === "phone" ? t.isDark ? 6 : C.isYellow(t.neutralPalette.hue) ? 98 : t.variant === d.VIBRANT ? 95 : 96 : 15,
2443
+ palette: (r) => r.neutralPalette,
2444
+ tone: (r) => r.platform === "phone" ? r.isDark ? 6 : T.isYellow(r.neutralPalette.hue) ? 98 : r.variant === f.VIBRANT ? 95 : 96 : 15,
2386
2445
  isBackground: !0,
2387
- chromaMultiplier: (t) => {
2388
- if (t.platform === "phone") {
2389
- if (t.variant === d.NEUTRAL)
2446
+ chromaMultiplier: (r) => {
2447
+ if (r.platform === "phone") {
2448
+ if (r.variant === f.NEUTRAL)
2390
2449
  return 1.3;
2391
- if (t.variant === d.TONAL_SPOT)
2450
+ if (r.variant === f.TONAL_SPOT)
2392
2451
  return 1.25;
2393
- if (t.variant === d.EXPRESSIVE)
2394
- return C.isYellow(t.neutralPalette.hue) ? 1.3 : 1.15;
2395
- if (t.variant === d.VIBRANT)
2452
+ if (r.variant === f.EXPRESSIVE)
2453
+ return T.isYellow(r.neutralPalette.hue) ? 1.3 : 1.15;
2454
+ if (r.variant === f.VIBRANT)
2396
2455
  return 1.08;
2397
2456
  }
2398
2457
  return 1;
2399
2458
  }
2400
2459
  });
2401
- return T(super.surfaceContainerLow(), "2025", e);
2460
+ return b(super.surfaceContainerLow(), "2025", e);
2402
2461
  }
2403
2462
  surfaceContainer() {
2404
2463
  const e = c.fromPalette({
2405
2464
  name: "surface_container",
2406
- palette: (t) => t.neutralPalette,
2407
- tone: (t) => t.platform === "phone" ? t.isDark ? 9 : C.isYellow(t.neutralPalette.hue) ? 96 : t.variant === d.VIBRANT ? 92 : 94 : 20,
2465
+ palette: (r) => r.neutralPalette,
2466
+ tone: (r) => r.platform === "phone" ? r.isDark ? 9 : T.isYellow(r.neutralPalette.hue) ? 96 : r.variant === f.VIBRANT ? 92 : 94 : 20,
2408
2467
  isBackground: !0,
2409
- chromaMultiplier: (t) => {
2410
- if (t.platform === "phone") {
2411
- if (t.variant === d.NEUTRAL)
2468
+ chromaMultiplier: (r) => {
2469
+ if (r.platform === "phone") {
2470
+ if (r.variant === f.NEUTRAL)
2412
2471
  return 1.6;
2413
- if (t.variant === d.TONAL_SPOT)
2472
+ if (r.variant === f.TONAL_SPOT)
2414
2473
  return 1.4;
2415
- if (t.variant === d.EXPRESSIVE)
2416
- return C.isYellow(t.neutralPalette.hue) ? 1.6 : 1.3;
2417
- if (t.variant === d.VIBRANT)
2474
+ if (r.variant === f.EXPRESSIVE)
2475
+ return T.isYellow(r.neutralPalette.hue) ? 1.6 : 1.3;
2476
+ if (r.variant === f.VIBRANT)
2418
2477
  return 1.15;
2419
2478
  }
2420
2479
  return 1;
2421
2480
  }
2422
2481
  });
2423
- return T(super.surfaceContainer(), "2025", e);
2482
+ return b(super.surfaceContainer(), "2025", e);
2424
2483
  }
2425
2484
  surfaceContainerHigh() {
2426
2485
  const e = c.fromPalette({
2427
2486
  name: "surface_container_high",
2428
- palette: (t) => t.neutralPalette,
2429
- tone: (t) => t.platform === "phone" ? t.isDark ? 12 : C.isYellow(t.neutralPalette.hue) ? 94 : t.variant === d.VIBRANT ? 90 : 92 : 25,
2487
+ palette: (r) => r.neutralPalette,
2488
+ tone: (r) => r.platform === "phone" ? r.isDark ? 12 : T.isYellow(r.neutralPalette.hue) ? 94 : r.variant === f.VIBRANT ? 90 : 92 : 25,
2430
2489
  isBackground: !0,
2431
- chromaMultiplier: (t) => {
2432
- if (t.platform === "phone") {
2433
- if (t.variant === d.NEUTRAL)
2490
+ chromaMultiplier: (r) => {
2491
+ if (r.platform === "phone") {
2492
+ if (r.variant === f.NEUTRAL)
2434
2493
  return 1.9;
2435
- if (t.variant === d.TONAL_SPOT)
2494
+ if (r.variant === f.TONAL_SPOT)
2436
2495
  return 1.5;
2437
- if (t.variant === d.EXPRESSIVE)
2438
- return C.isYellow(t.neutralPalette.hue) ? 1.95 : 1.45;
2439
- if (t.variant === d.VIBRANT)
2496
+ if (r.variant === f.EXPRESSIVE)
2497
+ return T.isYellow(r.neutralPalette.hue) ? 1.95 : 1.45;
2498
+ if (r.variant === f.VIBRANT)
2440
2499
  return 1.22;
2441
2500
  }
2442
2501
  return 1;
2443
2502
  }
2444
2503
  });
2445
- return T(super.surfaceContainerHigh(), "2025", e);
2504
+ return b(super.surfaceContainerHigh(), "2025", e);
2446
2505
  }
2447
2506
  surfaceContainerHighest() {
2448
2507
  const e = c.fromPalette({
2449
2508
  name: "surface_container_highest",
2450
- palette: (t) => t.neutralPalette,
2451
- tone: (t) => t.isDark ? 15 : C.isYellow(t.neutralPalette.hue) ? 92 : t.variant === d.VIBRANT ? 88 : 90,
2509
+ palette: (r) => r.neutralPalette,
2510
+ tone: (r) => r.isDark ? 15 : T.isYellow(r.neutralPalette.hue) ? 92 : r.variant === f.VIBRANT ? 88 : 90,
2452
2511
  isBackground: !0,
2453
- chromaMultiplier: (t) => t.variant === d.NEUTRAL ? 2.2 : t.variant === d.TONAL_SPOT ? 1.7 : t.variant === d.EXPRESSIVE ? C.isYellow(t.neutralPalette.hue) ? 2.3 : 1.6 : t.variant === d.VIBRANT ? 1.29 : 1
2512
+ chromaMultiplier: (r) => r.variant === f.NEUTRAL ? 2.2 : r.variant === f.TONAL_SPOT ? 1.7 : r.variant === f.EXPRESSIVE ? T.isYellow(r.neutralPalette.hue) ? 2.3 : 1.6 : r.variant === f.VIBRANT ? 1.29 : 1
2454
2513
  });
2455
- return T(super.surfaceContainerHighest(), "2025", e);
2514
+ return b(super.surfaceContainerHighest(), "2025", e);
2456
2515
  }
2457
2516
  onSurface() {
2458
2517
  const e = c.fromPalette({
2459
2518
  name: "on_surface",
2460
- palette: (t) => t.neutralPalette,
2461
- tone: (t) => t.variant === d.VIBRANT ? D(t.neutralPalette, 0, 100, 1.1) : c.getInitialToneFromBackground((n) => n.platform === "phone" ? this.highestSurface(n) : this.surfaceContainerHigh())(t),
2462
- chromaMultiplier: (t) => {
2463
- if (t.platform === "phone") {
2464
- if (t.variant === d.NEUTRAL)
2519
+ palette: (r) => r.neutralPalette,
2520
+ tone: (r) => r.variant === f.VIBRANT ? F(r.neutralPalette, 0, 100, 1.1) : c.getInitialToneFromBackground((t) => t.platform === "phone" ? this.highestSurface(t) : this.surfaceContainerHigh())(r),
2521
+ chromaMultiplier: (r) => {
2522
+ if (r.platform === "phone") {
2523
+ if (r.variant === f.NEUTRAL)
2465
2524
  return 2.2;
2466
- if (t.variant === d.TONAL_SPOT)
2525
+ if (r.variant === f.TONAL_SPOT)
2467
2526
  return 1.7;
2468
- if (t.variant === d.EXPRESSIVE)
2469
- return C.isYellow(t.neutralPalette.hue) ? t.isDark ? 3 : 2.3 : 1.6;
2527
+ if (r.variant === f.EXPRESSIVE)
2528
+ return T.isYellow(r.neutralPalette.hue) ? r.isDark ? 3 : 2.3 : 1.6;
2470
2529
  }
2471
2530
  return 1;
2472
2531
  },
2473
- background: (t) => t.platform === "phone" ? this.highestSurface(t) : this.surfaceContainerHigh(),
2474
- contrastCurve: (t) => t.isDark && t.platform === "phone" ? b(11) : b(9)
2532
+ background: (r) => r.platform === "phone" ? this.highestSurface(r) : this.surfaceContainerHigh(),
2533
+ contrastCurve: (r) => r.isDark && r.platform === "phone" ? k(11) : k(9)
2475
2534
  });
2476
- return T(super.onSurface(), "2025", e);
2535
+ return b(super.onSurface(), "2025", e);
2477
2536
  }
2478
2537
  onSurfaceVariant() {
2479
2538
  const e = c.fromPalette({
2480
2539
  name: "on_surface_variant",
2481
- palette: (t) => t.neutralPalette,
2482
- chromaMultiplier: (t) => {
2483
- if (t.platform === "phone") {
2484
- if (t.variant === d.NEUTRAL)
2540
+ palette: (r) => r.neutralPalette,
2541
+ chromaMultiplier: (r) => {
2542
+ if (r.platform === "phone") {
2543
+ if (r.variant === f.NEUTRAL)
2485
2544
  return 2.2;
2486
- if (t.variant === d.TONAL_SPOT)
2545
+ if (r.variant === f.TONAL_SPOT)
2487
2546
  return 1.7;
2488
- if (t.variant === d.EXPRESSIVE)
2489
- return C.isYellow(t.neutralPalette.hue) ? t.isDark ? 3 : 2.3 : 1.6;
2547
+ if (r.variant === f.EXPRESSIVE)
2548
+ return T.isYellow(r.neutralPalette.hue) ? r.isDark ? 3 : 2.3 : 1.6;
2490
2549
  }
2491
2550
  return 1;
2492
2551
  },
2493
- background: (t) => t.platform === "phone" ? this.highestSurface(t) : this.surfaceContainerHigh(),
2494
- contrastCurve: (t) => t.platform === "phone" ? t.isDark ? b(6) : b(4.5) : b(7)
2552
+ background: (r) => r.platform === "phone" ? this.highestSurface(r) : this.surfaceContainerHigh(),
2553
+ contrastCurve: (r) => r.platform === "phone" ? r.isDark ? k(6) : k(4.5) : k(7)
2495
2554
  });
2496
- return T(super.onSurfaceVariant(), "2025", e);
2555
+ return b(super.onSurfaceVariant(), "2025", e);
2497
2556
  }
2498
2557
  outline() {
2499
2558
  const e = c.fromPalette({
2500
2559
  name: "outline",
2501
- palette: (t) => t.neutralPalette,
2502
- chromaMultiplier: (t) => {
2503
- if (t.platform === "phone") {
2504
- if (t.variant === d.NEUTRAL)
2560
+ palette: (r) => r.neutralPalette,
2561
+ chromaMultiplier: (r) => {
2562
+ if (r.platform === "phone") {
2563
+ if (r.variant === f.NEUTRAL)
2505
2564
  return 2.2;
2506
- if (t.variant === d.TONAL_SPOT)
2565
+ if (r.variant === f.TONAL_SPOT)
2507
2566
  return 1.7;
2508
- if (t.variant === d.EXPRESSIVE)
2509
- return C.isYellow(t.neutralPalette.hue) ? t.isDark ? 3 : 2.3 : 1.6;
2567
+ if (r.variant === f.EXPRESSIVE)
2568
+ return T.isYellow(r.neutralPalette.hue) ? r.isDark ? 3 : 2.3 : 1.6;
2510
2569
  }
2511
2570
  return 1;
2512
2571
  },
2513
- background: (t) => t.platform === "phone" ? this.highestSurface(t) : this.surfaceContainerHigh(),
2514
- contrastCurve: (t) => t.platform === "phone" ? b(3) : b(4.5)
2572
+ background: (r) => r.platform === "phone" ? this.highestSurface(r) : this.surfaceContainerHigh(),
2573
+ contrastCurve: (r) => r.platform === "phone" ? k(3) : k(4.5)
2515
2574
  });
2516
- return T(super.outline(), "2025", e);
2575
+ return b(super.outline(), "2025", e);
2517
2576
  }
2518
2577
  outlineVariant() {
2519
2578
  const e = c.fromPalette({
2520
2579
  name: "outline_variant",
2521
- palette: (t) => t.neutralPalette,
2522
- chromaMultiplier: (t) => {
2523
- if (t.platform === "phone") {
2524
- if (t.variant === d.NEUTRAL)
2580
+ palette: (r) => r.neutralPalette,
2581
+ chromaMultiplier: (r) => {
2582
+ if (r.platform === "phone") {
2583
+ if (r.variant === f.NEUTRAL)
2525
2584
  return 2.2;
2526
- if (t.variant === d.TONAL_SPOT)
2585
+ if (r.variant === f.TONAL_SPOT)
2527
2586
  return 1.7;
2528
- if (t.variant === d.EXPRESSIVE)
2529
- return C.isYellow(t.neutralPalette.hue) ? t.isDark ? 3 : 2.3 : 1.6;
2587
+ if (r.variant === f.EXPRESSIVE)
2588
+ return T.isYellow(r.neutralPalette.hue) ? r.isDark ? 3 : 2.3 : 1.6;
2530
2589
  }
2531
2590
  return 1;
2532
2591
  },
2533
- background: (t) => t.platform === "phone" ? this.highestSurface(t) : this.surfaceContainerHigh(),
2534
- contrastCurve: (t) => t.platform === "phone" ? b(1.5) : b(3)
2592
+ background: (r) => r.platform === "phone" ? this.highestSurface(r) : this.surfaceContainerHigh(),
2593
+ contrastCurve: (r) => r.platform === "phone" ? k(1.5) : k(3)
2535
2594
  });
2536
- return T(super.outlineVariant(), "2025", e);
2595
+ return b(super.outlineVariant(), "2025", e);
2537
2596
  }
2538
2597
  inverseSurface() {
2539
2598
  const e = c.fromPalette({
2540
2599
  name: "inverse_surface",
2541
- palette: (t) => t.neutralPalette,
2542
- tone: (t) => t.isDark ? 98 : 4,
2600
+ palette: (r) => r.neutralPalette,
2601
+ tone: (r) => r.isDark ? 98 : 4,
2543
2602
  isBackground: !0
2544
2603
  });
2545
- return T(super.inverseSurface(), "2025", e);
2604
+ return b(super.inverseSurface(), "2025", e);
2546
2605
  }
2547
2606
  inverseOnSurface() {
2548
2607
  const e = c.fromPalette({
2549
2608
  name: "inverse_on_surface",
2550
- palette: (t) => t.neutralPalette,
2551
- background: (t) => this.inverseSurface(),
2552
- contrastCurve: (t) => b(7)
2609
+ palette: (r) => r.neutralPalette,
2610
+ background: (r) => this.inverseSurface(),
2611
+ contrastCurve: (r) => k(7)
2553
2612
  });
2554
- return T(super.inverseOnSurface(), "2025", e);
2613
+ return b(super.inverseOnSurface(), "2025", e);
2555
2614
  }
2556
2615
  ////////////////////////////////////////////////////////////////
2557
2616
  // Primaries [P] //
@@ -2559,107 +2618,107 @@ class Ht extends _t {
2559
2618
  primary() {
2560
2619
  const e = c.fromPalette({
2561
2620
  name: "primary",
2562
- palette: (t) => t.primaryPalette,
2563
- tone: (t) => t.variant === d.NEUTRAL ? t.platform === "phone" ? t.isDark ? 80 : 40 : 90 : t.variant === d.TONAL_SPOT ? t.platform === "phone" ? t.isDark ? 80 : D(t.primaryPalette) : D(t.primaryPalette, 0, 90) : t.variant === d.EXPRESSIVE ? t.platform === "phone" ? D(t.primaryPalette, 0, C.isYellow(t.primaryPalette.hue) ? 25 : C.isCyan(t.primaryPalette.hue) ? 88 : 98) : D(t.primaryPalette) : t.platform === "phone" ? D(t.primaryPalette, 0, C.isCyan(t.primaryPalette.hue) ? 88 : 98) : D(t.primaryPalette),
2621
+ palette: (r) => r.primaryPalette,
2622
+ tone: (r) => r.variant === f.NEUTRAL ? r.platform === "phone" ? r.isDark ? 80 : 40 : 90 : r.variant === f.TONAL_SPOT ? r.platform === "phone" ? r.isDark ? 80 : F(r.primaryPalette) : F(r.primaryPalette, 0, 90) : r.variant === f.EXPRESSIVE ? r.platform === "phone" ? F(r.primaryPalette, 0, T.isYellow(r.primaryPalette.hue) ? 25 : T.isCyan(r.primaryPalette.hue) ? 88 : 98) : F(r.primaryPalette) : r.platform === "phone" ? F(r.primaryPalette, 0, T.isCyan(r.primaryPalette.hue) ? 88 : 98) : F(r.primaryPalette),
2564
2623
  isBackground: !0,
2565
- background: (t) => t.platform === "phone" ? this.highestSurface(t) : this.surfaceContainerHigh(),
2566
- contrastCurve: (t) => t.platform === "phone" ? b(4.5) : b(7),
2567
- toneDeltaPair: (t) => t.platform === "phone" ? new w(this.primaryContainer(), this.primary(), 5, "relative_lighter", !0, "farther") : void 0
2624
+ background: (r) => r.platform === "phone" ? this.highestSurface(r) : this.surfaceContainerHigh(),
2625
+ contrastCurve: (r) => r.platform === "phone" ? k(4.5) : k(7),
2626
+ toneDeltaPair: (r) => r.platform === "phone" ? new w(this.primaryContainer(), this.primary(), 5, "relative_lighter", !0, "farther") : void 0
2568
2627
  });
2569
- return T(super.primary(), "2025", e);
2628
+ return b(super.primary(), "2025", e);
2570
2629
  }
2571
2630
  primaryDim() {
2572
2631
  return c.fromPalette({
2573
2632
  name: "primary_dim",
2574
2633
  palette: (e) => e.primaryPalette,
2575
- tone: (e) => e.variant === d.NEUTRAL ? 85 : e.variant === d.TONAL_SPOT ? D(e.primaryPalette, 0, 90) : D(e.primaryPalette),
2634
+ tone: (e) => e.variant === f.NEUTRAL ? 85 : e.variant === f.TONAL_SPOT ? F(e.primaryPalette, 0, 90) : F(e.primaryPalette),
2576
2635
  isBackground: !0,
2577
2636
  background: (e) => this.surfaceContainerHigh(),
2578
- contrastCurve: (e) => b(4.5),
2637
+ contrastCurve: (e) => k(4.5),
2579
2638
  toneDeltaPair: (e) => new w(this.primaryDim(), this.primary(), 5, "darker", !0, "farther")
2580
2639
  });
2581
2640
  }
2582
2641
  onPrimary() {
2583
2642
  const e = c.fromPalette({
2584
2643
  name: "on_primary",
2585
- palette: (t) => t.primaryPalette,
2586
- background: (t) => t.platform === "phone" ? this.primary() : this.primaryDim(),
2587
- contrastCurve: (t) => t.platform === "phone" ? b(6) : b(7)
2644
+ palette: (r) => r.primaryPalette,
2645
+ background: (r) => r.platform === "phone" ? this.primary() : this.primaryDim(),
2646
+ contrastCurve: (r) => r.platform === "phone" ? k(6) : k(7)
2588
2647
  });
2589
- return T(super.onPrimary(), "2025", e);
2648
+ return b(super.onPrimary(), "2025", e);
2590
2649
  }
2591
2650
  primaryContainer() {
2592
2651
  const e = c.fromPalette({
2593
2652
  name: "primary_container",
2594
- palette: (t) => t.primaryPalette,
2595
- tone: (t) => t.platform === "watch" ? 30 : t.variant === d.NEUTRAL ? t.isDark ? 30 : 90 : t.variant === d.TONAL_SPOT ? t.isDark ? ne(t.primaryPalette, 35, 93) : D(t.primaryPalette, 0, 90) : t.variant === d.EXPRESSIVE ? t.isDark ? D(t.primaryPalette, 30, 93) : D(t.primaryPalette, 78, C.isCyan(t.primaryPalette.hue) ? 88 : 90) : t.isDark ? ne(t.primaryPalette, 66, 93) : D(t.primaryPalette, 66, C.isCyan(t.primaryPalette.hue) ? 88 : 93),
2653
+ palette: (r) => r.primaryPalette,
2654
+ tone: (r) => r.platform === "watch" ? 30 : r.variant === f.NEUTRAL ? r.isDark ? 30 : 90 : r.variant === f.TONAL_SPOT ? r.isDark ? W(r.primaryPalette, 35, 93) : F(r.primaryPalette, 0, 90) : r.variant === f.EXPRESSIVE ? r.isDark ? F(r.primaryPalette, 30, 93) : F(r.primaryPalette, 78, T.isCyan(r.primaryPalette.hue) ? 88 : 90) : r.isDark ? W(r.primaryPalette, 66, 93) : F(r.primaryPalette, 66, T.isCyan(r.primaryPalette.hue) ? 88 : 93),
2596
2655
  isBackground: !0,
2597
- background: (t) => t.platform === "phone" ? this.highestSurface(t) : void 0,
2598
- toneDeltaPair: (t) => t.platform === "phone" ? void 0 : new w(this.primaryContainer(), this.primaryDim(), 10, "darker", !0, "farther"),
2599
- contrastCurve: (t) => t.platform === "phone" && t.contrastLevel > 0 ? b(1.5) : void 0
2656
+ background: (r) => r.platform === "phone" ? this.highestSurface(r) : void 0,
2657
+ toneDeltaPair: (r) => r.platform === "phone" ? void 0 : new w(this.primaryContainer(), this.primaryDim(), 10, "darker", !0, "farther"),
2658
+ contrastCurve: (r) => r.platform === "phone" && r.contrastLevel > 0 ? k(1.5) : void 0
2600
2659
  });
2601
- return T(super.primaryContainer(), "2025", e);
2660
+ return b(super.primaryContainer(), "2025", e);
2602
2661
  }
2603
2662
  onPrimaryContainer() {
2604
2663
  const e = c.fromPalette({
2605
2664
  name: "on_primary_container",
2606
- palette: (t) => t.primaryPalette,
2607
- background: (t) => this.primaryContainer(),
2608
- contrastCurve: (t) => t.platform === "phone" ? b(6) : b(7)
2665
+ palette: (r) => r.primaryPalette,
2666
+ background: (r) => this.primaryContainer(),
2667
+ contrastCurve: (r) => r.platform === "phone" ? k(6) : k(7)
2609
2668
  });
2610
- return T(super.onPrimaryContainer(), "2025", e);
2669
+ return b(super.onPrimaryContainer(), "2025", e);
2611
2670
  }
2612
2671
  primaryFixed() {
2613
2672
  const e = c.fromPalette({
2614
2673
  name: "primary_fixed",
2615
- palette: (t) => t.primaryPalette,
2616
- tone: (t) => {
2617
- let n = Object.assign({}, t, { isDark: !1, contrastLevel: 0 });
2618
- return this.primaryContainer().getTone(n);
2674
+ palette: (r) => r.primaryPalette,
2675
+ tone: (r) => {
2676
+ let t = Object.assign({}, r, { isDark: !1, contrastLevel: 0 });
2677
+ return this.primaryContainer().getTone(t);
2619
2678
  },
2620
2679
  isBackground: !0,
2621
- background: (t) => t.platform === "phone" ? this.highestSurface(t) : void 0,
2622
- contrastCurve: (t) => t.platform === "phone" && t.contrastLevel > 0 ? b(1.5) : void 0
2680
+ background: (r) => r.platform === "phone" ? this.highestSurface(r) : void 0,
2681
+ contrastCurve: (r) => r.platform === "phone" && r.contrastLevel > 0 ? k(1.5) : void 0
2623
2682
  });
2624
- return T(super.primaryFixed(), "2025", e);
2683
+ return b(super.primaryFixed(), "2025", e);
2625
2684
  }
2626
2685
  primaryFixedDim() {
2627
2686
  const e = c.fromPalette({
2628
2687
  name: "primary_fixed_dim",
2629
- palette: (t) => t.primaryPalette,
2630
- tone: (t) => this.primaryFixed().getTone(t),
2688
+ palette: (r) => r.primaryPalette,
2689
+ tone: (r) => this.primaryFixed().getTone(r),
2631
2690
  isBackground: !0,
2632
- toneDeltaPair: (t) => new w(this.primaryFixedDim(), this.primaryFixed(), 5, "darker", !0, "exact")
2691
+ toneDeltaPair: (r) => new w(this.primaryFixedDim(), this.primaryFixed(), 5, "darker", !0, "exact")
2633
2692
  });
2634
- return T(super.primaryFixedDim(), "2025", e);
2693
+ return b(super.primaryFixedDim(), "2025", e);
2635
2694
  }
2636
2695
  onPrimaryFixed() {
2637
2696
  const e = c.fromPalette({
2638
2697
  name: "on_primary_fixed",
2639
- palette: (t) => t.primaryPalette,
2640
- background: (t) => this.primaryFixedDim(),
2641
- contrastCurve: (t) => b(7)
2698
+ palette: (r) => r.primaryPalette,
2699
+ background: (r) => this.primaryFixedDim(),
2700
+ contrastCurve: (r) => k(7)
2642
2701
  });
2643
- return T(super.onPrimaryFixed(), "2025", e);
2702
+ return b(super.onPrimaryFixed(), "2025", e);
2644
2703
  }
2645
2704
  onPrimaryFixedVariant() {
2646
2705
  const e = c.fromPalette({
2647
2706
  name: "on_primary_fixed_variant",
2648
- palette: (t) => t.primaryPalette,
2649
- background: (t) => this.primaryFixedDim(),
2650
- contrastCurve: (t) => b(4.5)
2707
+ palette: (r) => r.primaryPalette,
2708
+ background: (r) => this.primaryFixedDim(),
2709
+ contrastCurve: (r) => k(4.5)
2651
2710
  });
2652
- return T(super.onPrimaryFixedVariant(), "2025", e);
2711
+ return b(super.onPrimaryFixedVariant(), "2025", e);
2653
2712
  }
2654
2713
  inversePrimary() {
2655
2714
  const e = c.fromPalette({
2656
2715
  name: "inverse_primary",
2657
- palette: (t) => t.primaryPalette,
2658
- tone: (t) => D(t.primaryPalette),
2659
- background: (t) => this.inverseSurface(),
2660
- contrastCurve: (t) => t.platform === "phone" ? b(6) : b(7)
2716
+ palette: (r) => r.primaryPalette,
2717
+ tone: (r) => F(r.primaryPalette),
2718
+ background: (r) => this.inverseSurface(),
2719
+ contrastCurve: (r) => r.platform === "phone" ? k(6) : k(7)
2661
2720
  });
2662
- return T(super.inversePrimary(), "2025", e);
2721
+ return b(super.inversePrimary(), "2025", e);
2663
2722
  }
2664
2723
  ////////////////////////////////////////////////////////////////
2665
2724
  // Secondaries [Q] //
@@ -2667,97 +2726,97 @@ class Ht extends _t {
2667
2726
  secondary() {
2668
2727
  const e = c.fromPalette({
2669
2728
  name: "secondary",
2670
- palette: (t) => t.secondaryPalette,
2671
- tone: (t) => t.platform === "watch" ? t.variant === d.NEUTRAL ? 90 : D(t.secondaryPalette, 0, 90) : t.variant === d.NEUTRAL ? t.isDark ? ne(t.secondaryPalette, 0, 98) : D(t.secondaryPalette) : t.variant === d.VIBRANT ? D(t.secondaryPalette, 0, t.isDark ? 90 : 98) : t.isDark ? 80 : D(t.secondaryPalette),
2729
+ palette: (r) => r.secondaryPalette,
2730
+ tone: (r) => r.platform === "watch" ? r.variant === f.NEUTRAL ? 90 : F(r.secondaryPalette, 0, 90) : r.variant === f.NEUTRAL ? r.isDark ? W(r.secondaryPalette, 0, 98) : F(r.secondaryPalette) : r.variant === f.VIBRANT ? F(r.secondaryPalette, 0, r.isDark ? 90 : 98) : r.isDark ? 80 : F(r.secondaryPalette),
2672
2731
  isBackground: !0,
2673
- background: (t) => t.platform === "phone" ? this.highestSurface(t) : this.surfaceContainerHigh(),
2674
- contrastCurve: (t) => t.platform === "phone" ? b(4.5) : b(7),
2675
- toneDeltaPair: (t) => t.platform === "phone" ? new w(this.secondaryContainer(), this.secondary(), 5, "relative_lighter", !0, "farther") : void 0
2732
+ background: (r) => r.platform === "phone" ? this.highestSurface(r) : this.surfaceContainerHigh(),
2733
+ contrastCurve: (r) => r.platform === "phone" ? k(4.5) : k(7),
2734
+ toneDeltaPair: (r) => r.platform === "phone" ? new w(this.secondaryContainer(), this.secondary(), 5, "relative_lighter", !0, "farther") : void 0
2676
2735
  });
2677
- return T(super.secondary(), "2025", e);
2736
+ return b(super.secondary(), "2025", e);
2678
2737
  }
2679
2738
  secondaryDim() {
2680
2739
  return c.fromPalette({
2681
2740
  name: "secondary_dim",
2682
2741
  palette: (e) => e.secondaryPalette,
2683
- tone: (e) => e.variant === d.NEUTRAL ? 85 : D(e.secondaryPalette, 0, 90),
2742
+ tone: (e) => e.variant === f.NEUTRAL ? 85 : F(e.secondaryPalette, 0, 90),
2684
2743
  isBackground: !0,
2685
2744
  background: (e) => this.surfaceContainerHigh(),
2686
- contrastCurve: (e) => b(4.5),
2745
+ contrastCurve: (e) => k(4.5),
2687
2746
  toneDeltaPair: (e) => new w(this.secondaryDim(), this.secondary(), 5, "darker", !0, "farther")
2688
2747
  });
2689
2748
  }
2690
2749
  onSecondary() {
2691
2750
  const e = c.fromPalette({
2692
2751
  name: "on_secondary",
2693
- palette: (t) => t.secondaryPalette,
2694
- background: (t) => t.platform === "phone" ? this.secondary() : this.secondaryDim(),
2695
- contrastCurve: (t) => t.platform === "phone" ? b(6) : b(7)
2752
+ palette: (r) => r.secondaryPalette,
2753
+ background: (r) => r.platform === "phone" ? this.secondary() : this.secondaryDim(),
2754
+ contrastCurve: (r) => r.platform === "phone" ? k(6) : k(7)
2696
2755
  });
2697
- return T(super.onSecondary(), "2025", e);
2756
+ return b(super.onSecondary(), "2025", e);
2698
2757
  }
2699
2758
  secondaryContainer() {
2700
2759
  const e = c.fromPalette({
2701
2760
  name: "secondary_container",
2702
- palette: (t) => t.secondaryPalette,
2703
- tone: (t) => t.platform === "watch" ? 30 : t.variant === d.VIBRANT ? t.isDark ? ne(t.secondaryPalette, 30, 40) : D(t.secondaryPalette, 84, 90) : t.variant === d.EXPRESSIVE ? t.isDark ? 15 : D(t.secondaryPalette, 90, 95) : t.isDark ? 25 : 90,
2761
+ palette: (r) => r.secondaryPalette,
2762
+ tone: (r) => r.platform === "watch" ? 30 : r.variant === f.VIBRANT ? r.isDark ? W(r.secondaryPalette, 30, 40) : F(r.secondaryPalette, 84, 90) : r.variant === f.EXPRESSIVE ? r.isDark ? 15 : F(r.secondaryPalette, 90, 95) : r.isDark ? 25 : 90,
2704
2763
  isBackground: !0,
2705
- background: (t) => t.platform === "phone" ? this.highestSurface(t) : void 0,
2706
- toneDeltaPair: (t) => t.platform === "watch" ? new w(this.secondaryContainer(), this.secondaryDim(), 10, "darker", !0, "farther") : void 0,
2707
- contrastCurve: (t) => t.platform === "phone" && t.contrastLevel > 0 ? b(1.5) : void 0
2764
+ background: (r) => r.platform === "phone" ? this.highestSurface(r) : void 0,
2765
+ toneDeltaPair: (r) => r.platform === "watch" ? new w(this.secondaryContainer(), this.secondaryDim(), 10, "darker", !0, "farther") : void 0,
2766
+ contrastCurve: (r) => r.platform === "phone" && r.contrastLevel > 0 ? k(1.5) : void 0
2708
2767
  });
2709
- return T(super.secondaryContainer(), "2025", e);
2768
+ return b(super.secondaryContainer(), "2025", e);
2710
2769
  }
2711
2770
  onSecondaryContainer() {
2712
2771
  const e = c.fromPalette({
2713
2772
  name: "on_secondary_container",
2714
- palette: (t) => t.secondaryPalette,
2715
- background: (t) => this.secondaryContainer(),
2716
- contrastCurve: (t) => t.platform === "phone" ? b(6) : b(7)
2773
+ palette: (r) => r.secondaryPalette,
2774
+ background: (r) => this.secondaryContainer(),
2775
+ contrastCurve: (r) => r.platform === "phone" ? k(6) : k(7)
2717
2776
  });
2718
- return T(super.onSecondaryContainer(), "2025", e);
2777
+ return b(super.onSecondaryContainer(), "2025", e);
2719
2778
  }
2720
2779
  secondaryFixed() {
2721
2780
  const e = c.fromPalette({
2722
2781
  name: "secondary_fixed",
2723
- palette: (t) => t.secondaryPalette,
2724
- tone: (t) => {
2725
- let n = Object.assign({}, t, { isDark: !1, contrastLevel: 0 });
2726
- return this.secondaryContainer().getTone(n);
2782
+ palette: (r) => r.secondaryPalette,
2783
+ tone: (r) => {
2784
+ let t = Object.assign({}, r, { isDark: !1, contrastLevel: 0 });
2785
+ return this.secondaryContainer().getTone(t);
2727
2786
  },
2728
2787
  isBackground: !0,
2729
- background: (t) => t.platform === "phone" ? this.highestSurface(t) : void 0,
2730
- contrastCurve: (t) => t.platform === "phone" && t.contrastLevel > 0 ? b(1.5) : void 0
2788
+ background: (r) => r.platform === "phone" ? this.highestSurface(r) : void 0,
2789
+ contrastCurve: (r) => r.platform === "phone" && r.contrastLevel > 0 ? k(1.5) : void 0
2731
2790
  });
2732
- return T(super.secondaryFixed(), "2025", e);
2791
+ return b(super.secondaryFixed(), "2025", e);
2733
2792
  }
2734
2793
  secondaryFixedDim() {
2735
2794
  const e = c.fromPalette({
2736
2795
  name: "secondary_fixed_dim",
2737
- palette: (t) => t.secondaryPalette,
2738
- tone: (t) => this.secondaryFixed().getTone(t),
2796
+ palette: (r) => r.secondaryPalette,
2797
+ tone: (r) => this.secondaryFixed().getTone(r),
2739
2798
  isBackground: !0,
2740
- toneDeltaPair: (t) => new w(this.secondaryFixedDim(), this.secondaryFixed(), 5, "darker", !0, "exact")
2799
+ toneDeltaPair: (r) => new w(this.secondaryFixedDim(), this.secondaryFixed(), 5, "darker", !0, "exact")
2741
2800
  });
2742
- return T(super.secondaryFixedDim(), "2025", e);
2801
+ return b(super.secondaryFixedDim(), "2025", e);
2743
2802
  }
2744
2803
  onSecondaryFixed() {
2745
2804
  const e = c.fromPalette({
2746
2805
  name: "on_secondary_fixed",
2747
- palette: (t) => t.secondaryPalette,
2748
- background: (t) => this.secondaryFixedDim(),
2749
- contrastCurve: (t) => b(7)
2806
+ palette: (r) => r.secondaryPalette,
2807
+ background: (r) => this.secondaryFixedDim(),
2808
+ contrastCurve: (r) => k(7)
2750
2809
  });
2751
- return T(super.onSecondaryFixed(), "2025", e);
2810
+ return b(super.onSecondaryFixed(), "2025", e);
2752
2811
  }
2753
2812
  onSecondaryFixedVariant() {
2754
2813
  const e = c.fromPalette({
2755
2814
  name: "on_secondary_fixed_variant",
2756
- palette: (t) => t.secondaryPalette,
2757
- background: (t) => this.secondaryFixedDim(),
2758
- contrastCurve: (t) => b(4.5)
2815
+ palette: (r) => r.secondaryPalette,
2816
+ background: (r) => this.secondaryFixedDim(),
2817
+ contrastCurve: (r) => k(4.5)
2759
2818
  });
2760
- return T(super.onSecondaryFixedVariant(), "2025", e);
2819
+ return b(super.onSecondaryFixedVariant(), "2025", e);
2761
2820
  }
2762
2821
  ////////////////////////////////////////////////////////////////
2763
2822
  // Tertiaries [T] //
@@ -2765,97 +2824,97 @@ class Ht extends _t {
2765
2824
  tertiary() {
2766
2825
  const e = c.fromPalette({
2767
2826
  name: "tertiary",
2768
- palette: (t) => t.tertiaryPalette,
2769
- tone: (t) => t.platform === "watch" ? t.variant === d.TONAL_SPOT ? D(t.tertiaryPalette, 0, 90) : D(t.tertiaryPalette) : t.variant === d.EXPRESSIVE || t.variant === d.VIBRANT ? D(t.tertiaryPalette, 0, C.isCyan(t.tertiaryPalette.hue) ? 88 : t.isDark ? 98 : 100) : t.isDark ? D(t.tertiaryPalette, 0, 98) : D(t.tertiaryPalette),
2827
+ palette: (r) => r.tertiaryPalette,
2828
+ tone: (r) => r.platform === "watch" ? r.variant === f.TONAL_SPOT ? F(r.tertiaryPalette, 0, 90) : F(r.tertiaryPalette) : r.variant === f.EXPRESSIVE || r.variant === f.VIBRANT ? F(r.tertiaryPalette, 0, T.isCyan(r.tertiaryPalette.hue) ? 88 : r.isDark ? 98 : 100) : r.isDark ? F(r.tertiaryPalette, 0, 98) : F(r.tertiaryPalette),
2770
2829
  isBackground: !0,
2771
- background: (t) => t.platform === "phone" ? this.highestSurface(t) : this.surfaceContainerHigh(),
2772
- contrastCurve: (t) => t.platform === "phone" ? b(4.5) : b(7),
2773
- toneDeltaPair: (t) => t.platform === "phone" ? new w(this.tertiaryContainer(), this.tertiary(), 5, "relative_lighter", !0, "farther") : void 0
2830
+ background: (r) => r.platform === "phone" ? this.highestSurface(r) : this.surfaceContainerHigh(),
2831
+ contrastCurve: (r) => r.platform === "phone" ? k(4.5) : k(7),
2832
+ toneDeltaPair: (r) => r.platform === "phone" ? new w(this.tertiaryContainer(), this.tertiary(), 5, "relative_lighter", !0, "farther") : void 0
2774
2833
  });
2775
- return T(super.tertiary(), "2025", e);
2834
+ return b(super.tertiary(), "2025", e);
2776
2835
  }
2777
2836
  tertiaryDim() {
2778
2837
  return c.fromPalette({
2779
2838
  name: "tertiary_dim",
2780
2839
  palette: (e) => e.tertiaryPalette,
2781
- tone: (e) => e.variant === d.TONAL_SPOT ? D(e.tertiaryPalette, 0, 90) : D(e.tertiaryPalette),
2840
+ tone: (e) => e.variant === f.TONAL_SPOT ? F(e.tertiaryPalette, 0, 90) : F(e.tertiaryPalette),
2782
2841
  isBackground: !0,
2783
2842
  background: (e) => this.surfaceContainerHigh(),
2784
- contrastCurve: (e) => b(4.5),
2843
+ contrastCurve: (e) => k(4.5),
2785
2844
  toneDeltaPair: (e) => new w(this.tertiaryDim(), this.tertiary(), 5, "darker", !0, "farther")
2786
2845
  });
2787
2846
  }
2788
2847
  onTertiary() {
2789
2848
  const e = c.fromPalette({
2790
2849
  name: "on_tertiary",
2791
- palette: (t) => t.tertiaryPalette,
2792
- background: (t) => t.platform === "phone" ? this.tertiary() : this.tertiaryDim(),
2793
- contrastCurve: (t) => t.platform === "phone" ? b(6) : b(7)
2850
+ palette: (r) => r.tertiaryPalette,
2851
+ background: (r) => r.platform === "phone" ? this.tertiary() : this.tertiaryDim(),
2852
+ contrastCurve: (r) => r.platform === "phone" ? k(6) : k(7)
2794
2853
  });
2795
- return T(super.onTertiary(), "2025", e);
2854
+ return b(super.onTertiary(), "2025", e);
2796
2855
  }
2797
2856
  tertiaryContainer() {
2798
2857
  const e = c.fromPalette({
2799
2858
  name: "tertiary_container",
2800
- palette: (t) => t.tertiaryPalette,
2801
- tone: (t) => t.platform === "watch" ? t.variant === d.TONAL_SPOT ? D(t.tertiaryPalette, 0, 90) : D(t.tertiaryPalette) : t.variant === d.NEUTRAL ? t.isDark ? D(t.tertiaryPalette, 0, 93) : D(t.tertiaryPalette, 0, 96) : t.variant === d.TONAL_SPOT ? D(t.tertiaryPalette, 0, t.isDark ? 93 : 100) : t.variant === d.EXPRESSIVE ? D(t.tertiaryPalette, 75, C.isCyan(t.tertiaryPalette.hue) ? 88 : t.isDark ? 93 : 100) : t.isDark ? D(t.tertiaryPalette, 0, 93) : D(t.tertiaryPalette, 72, 100),
2859
+ palette: (r) => r.tertiaryPalette,
2860
+ tone: (r) => r.platform === "watch" ? r.variant === f.TONAL_SPOT ? F(r.tertiaryPalette, 0, 90) : F(r.tertiaryPalette) : r.variant === f.NEUTRAL ? r.isDark ? F(r.tertiaryPalette, 0, 93) : F(r.tertiaryPalette, 0, 96) : r.variant === f.TONAL_SPOT ? F(r.tertiaryPalette, 0, r.isDark ? 93 : 100) : r.variant === f.EXPRESSIVE ? F(r.tertiaryPalette, 75, T.isCyan(r.tertiaryPalette.hue) ? 88 : r.isDark ? 93 : 100) : r.isDark ? F(r.tertiaryPalette, 0, 93) : F(r.tertiaryPalette, 72, 100),
2802
2861
  isBackground: !0,
2803
- background: (t) => t.platform === "phone" ? this.highestSurface(t) : void 0,
2804
- toneDeltaPair: (t) => t.platform === "watch" ? new w(this.tertiaryContainer(), this.tertiaryDim(), 10, "darker", !0, "farther") : void 0,
2805
- contrastCurve: (t) => t.platform === "phone" && t.contrastLevel > 0 ? b(1.5) : void 0
2862
+ background: (r) => r.platform === "phone" ? this.highestSurface(r) : void 0,
2863
+ toneDeltaPair: (r) => r.platform === "watch" ? new w(this.tertiaryContainer(), this.tertiaryDim(), 10, "darker", !0, "farther") : void 0,
2864
+ contrastCurve: (r) => r.platform === "phone" && r.contrastLevel > 0 ? k(1.5) : void 0
2806
2865
  });
2807
- return T(super.tertiaryContainer(), "2025", e);
2866
+ return b(super.tertiaryContainer(), "2025", e);
2808
2867
  }
2809
2868
  onTertiaryContainer() {
2810
2869
  const e = c.fromPalette({
2811
2870
  name: "on_tertiary_container",
2812
- palette: (t) => t.tertiaryPalette,
2813
- background: (t) => this.tertiaryContainer(),
2814
- contrastCurve: (t) => t.platform === "phone" ? b(6) : b(7)
2871
+ palette: (r) => r.tertiaryPalette,
2872
+ background: (r) => this.tertiaryContainer(),
2873
+ contrastCurve: (r) => r.platform === "phone" ? k(6) : k(7)
2815
2874
  });
2816
- return T(super.onTertiaryContainer(), "2025", e);
2875
+ return b(super.onTertiaryContainer(), "2025", e);
2817
2876
  }
2818
2877
  tertiaryFixed() {
2819
2878
  const e = c.fromPalette({
2820
2879
  name: "tertiary_fixed",
2821
- palette: (t) => t.tertiaryPalette,
2822
- tone: (t) => {
2823
- let n = Object.assign({}, t, { isDark: !1, contrastLevel: 0 });
2824
- return this.tertiaryContainer().getTone(n);
2880
+ palette: (r) => r.tertiaryPalette,
2881
+ tone: (r) => {
2882
+ let t = Object.assign({}, r, { isDark: !1, contrastLevel: 0 });
2883
+ return this.tertiaryContainer().getTone(t);
2825
2884
  },
2826
2885
  isBackground: !0,
2827
- background: (t) => t.platform === "phone" ? this.highestSurface(t) : void 0,
2828
- contrastCurve: (t) => t.platform === "phone" && t.contrastLevel > 0 ? b(1.5) : void 0
2886
+ background: (r) => r.platform === "phone" ? this.highestSurface(r) : void 0,
2887
+ contrastCurve: (r) => r.platform === "phone" && r.contrastLevel > 0 ? k(1.5) : void 0
2829
2888
  });
2830
- return T(super.tertiaryFixed(), "2025", e);
2889
+ return b(super.tertiaryFixed(), "2025", e);
2831
2890
  }
2832
2891
  tertiaryFixedDim() {
2833
2892
  const e = c.fromPalette({
2834
2893
  name: "tertiary_fixed_dim",
2835
- palette: (t) => t.tertiaryPalette,
2836
- tone: (t) => this.tertiaryFixed().getTone(t),
2894
+ palette: (r) => r.tertiaryPalette,
2895
+ tone: (r) => this.tertiaryFixed().getTone(r),
2837
2896
  isBackground: !0,
2838
- toneDeltaPair: (t) => new w(this.tertiaryFixedDim(), this.tertiaryFixed(), 5, "darker", !0, "exact")
2897
+ toneDeltaPair: (r) => new w(this.tertiaryFixedDim(), this.tertiaryFixed(), 5, "darker", !0, "exact")
2839
2898
  });
2840
- return T(super.tertiaryFixedDim(), "2025", e);
2899
+ return b(super.tertiaryFixedDim(), "2025", e);
2841
2900
  }
2842
2901
  onTertiaryFixed() {
2843
2902
  const e = c.fromPalette({
2844
2903
  name: "on_tertiary_fixed",
2845
- palette: (t) => t.tertiaryPalette,
2846
- background: (t) => this.tertiaryFixedDim(),
2847
- contrastCurve: (t) => b(7)
2904
+ palette: (r) => r.tertiaryPalette,
2905
+ background: (r) => this.tertiaryFixedDim(),
2906
+ contrastCurve: (r) => k(7)
2848
2907
  });
2849
- return T(super.onTertiaryFixed(), "2025", e);
2908
+ return b(super.onTertiaryFixed(), "2025", e);
2850
2909
  }
2851
2910
  onTertiaryFixedVariant() {
2852
2911
  const e = c.fromPalette({
2853
2912
  name: "on_tertiary_fixed_variant",
2854
- palette: (t) => t.tertiaryPalette,
2855
- background: (t) => this.tertiaryFixedDim(),
2856
- contrastCurve: (t) => b(4.5)
2913
+ palette: (r) => r.tertiaryPalette,
2914
+ background: (r) => this.tertiaryFixedDim(),
2915
+ contrastCurve: (r) => k(4.5)
2857
2916
  });
2858
- return T(super.onTertiaryFixedVariant(), "2025", e);
2917
+ return b(super.onTertiaryFixedVariant(), "2025", e);
2859
2918
  }
2860
2919
  ////////////////////////////////////////////////////////////////
2861
2920
  // Errors [E] //
@@ -2863,77 +2922,77 @@ class Ht extends _t {
2863
2922
  error() {
2864
2923
  const e = c.fromPalette({
2865
2924
  name: "error",
2866
- palette: (t) => t.errorPalette,
2867
- tone: (t) => t.platform === "phone" ? t.isDark ? ne(t.errorPalette, 0, 98) : D(t.errorPalette) : ne(t.errorPalette),
2925
+ palette: (r) => r.errorPalette,
2926
+ tone: (r) => r.platform === "phone" ? r.isDark ? W(r.errorPalette, 0, 98) : F(r.errorPalette) : W(r.errorPalette),
2868
2927
  isBackground: !0,
2869
- background: (t) => t.platform === "phone" ? this.highestSurface(t) : this.surfaceContainerHigh(),
2870
- contrastCurve: (t) => t.platform === "phone" ? b(4.5) : b(7),
2871
- toneDeltaPair: (t) => t.platform === "phone" ? new w(this.errorContainer(), this.error(), 5, "relative_lighter", !0, "farther") : void 0
2928
+ background: (r) => r.platform === "phone" ? this.highestSurface(r) : this.surfaceContainerHigh(),
2929
+ contrastCurve: (r) => r.platform === "phone" ? k(4.5) : k(7),
2930
+ toneDeltaPair: (r) => r.platform === "phone" ? new w(this.errorContainer(), this.error(), 5, "relative_lighter", !0, "farther") : void 0
2872
2931
  });
2873
- return T(super.error(), "2025", e);
2932
+ return b(super.error(), "2025", e);
2874
2933
  }
2875
2934
  errorDim() {
2876
2935
  return c.fromPalette({
2877
2936
  name: "error_dim",
2878
2937
  palette: (e) => e.errorPalette,
2879
- tone: (e) => ne(e.errorPalette),
2938
+ tone: (e) => W(e.errorPalette),
2880
2939
  isBackground: !0,
2881
2940
  background: (e) => this.surfaceContainerHigh(),
2882
- contrastCurve: (e) => b(4.5),
2941
+ contrastCurve: (e) => k(4.5),
2883
2942
  toneDeltaPair: (e) => new w(this.errorDim(), this.error(), 5, "darker", !0, "farther")
2884
2943
  });
2885
2944
  }
2886
2945
  onError() {
2887
2946
  const e = c.fromPalette({
2888
2947
  name: "on_error",
2889
- palette: (t) => t.errorPalette,
2890
- background: (t) => t.platform === "phone" ? this.error() : this.errorDim(),
2891
- contrastCurve: (t) => t.platform === "phone" ? b(6) : b(7)
2948
+ palette: (r) => r.errorPalette,
2949
+ background: (r) => r.platform === "phone" ? this.error() : this.errorDim(),
2950
+ contrastCurve: (r) => r.platform === "phone" ? k(6) : k(7)
2892
2951
  });
2893
- return T(super.onError(), "2025", e);
2952
+ return b(super.onError(), "2025", e);
2894
2953
  }
2895
2954
  errorContainer() {
2896
2955
  const e = c.fromPalette({
2897
2956
  name: "error_container",
2898
- palette: (t) => t.errorPalette,
2899
- tone: (t) => t.platform === "watch" ? 30 : t.isDark ? ne(t.errorPalette, 30, 93) : D(t.errorPalette, 0, 90),
2957
+ palette: (r) => r.errorPalette,
2958
+ tone: (r) => r.platform === "watch" ? 30 : r.isDark ? W(r.errorPalette, 30, 93) : F(r.errorPalette, 0, 90),
2900
2959
  isBackground: !0,
2901
- background: (t) => t.platform === "phone" ? this.highestSurface(t) : void 0,
2902
- toneDeltaPair: (t) => t.platform === "watch" ? new w(this.errorContainer(), this.errorDim(), 10, "darker", !0, "farther") : void 0,
2903
- contrastCurve: (t) => t.platform === "phone" && t.contrastLevel > 0 ? b(1.5) : void 0
2960
+ background: (r) => r.platform === "phone" ? this.highestSurface(r) : void 0,
2961
+ toneDeltaPair: (r) => r.platform === "watch" ? new w(this.errorContainer(), this.errorDim(), 10, "darker", !0, "farther") : void 0,
2962
+ contrastCurve: (r) => r.platform === "phone" && r.contrastLevel > 0 ? k(1.5) : void 0
2904
2963
  });
2905
- return T(super.errorContainer(), "2025", e);
2964
+ return b(super.errorContainer(), "2025", e);
2906
2965
  }
2907
2966
  onErrorContainer() {
2908
2967
  const e = c.fromPalette({
2909
2968
  name: "on_error_container",
2910
- palette: (t) => t.errorPalette,
2911
- background: (t) => this.errorContainer(),
2912
- contrastCurve: (t) => t.platform === "phone" ? b(4.5) : b(7)
2969
+ palette: (r) => r.errorPalette,
2970
+ background: (r) => this.errorContainer(),
2971
+ contrastCurve: (r) => r.platform === "phone" ? k(4.5) : k(7)
2913
2972
  });
2914
- return T(super.onErrorContainer(), "2025", e);
2973
+ return b(super.onErrorContainer(), "2025", e);
2915
2974
  }
2916
2975
  /////////////////////////////////////////////////////////////////
2917
2976
  // Remapped Colors //
2918
2977
  /////////////////////////////////////////////////////////////////
2919
2978
  surfaceVariant() {
2920
2979
  const e = Object.assign(this.surfaceContainerHighest().clone(), { name: "surface_variant" });
2921
- return T(super.surfaceVariant(), "2025", e);
2980
+ return b(super.surfaceVariant(), "2025", e);
2922
2981
  }
2923
2982
  surfaceTint() {
2924
2983
  const e = Object.assign(this.primary().clone(), { name: "surface_tint" });
2925
- return T(super.surfaceTint(), "2025", e);
2984
+ return b(super.surfaceTint(), "2025", e);
2926
2985
  }
2927
2986
  background() {
2928
2987
  const e = Object.assign(this.surface().clone(), { name: "background" });
2929
- return T(super.background(), "2025", e);
2988
+ return b(super.background(), "2025", e);
2930
2989
  }
2931
2990
  onBackground() {
2932
2991
  const e = Object.assign(this.onSurface().clone(), {
2933
2992
  name: "on_background",
2934
- tone: (t) => t.platform === "watch" ? 100 : this.onSurface().getTone(t)
2993
+ tone: (r) => r.platform === "watch" ? 100 : this.onSurface().getTone(r)
2935
2994
  });
2936
- return T(super.onBackground(), "2025", e);
2995
+ return b(super.onBackground(), "2025", e);
2937
2996
  }
2938
2997
  }
2939
2998
  /**
@@ -2952,7 +3011,7 @@ class Ht extends _t {
2952
3011
  * See the License for the specific language governing permissions and
2953
3012
  * limitations under the License.
2954
3013
  */
2955
- class s {
3014
+ class o {
2956
3015
  constructor() {
2957
3016
  this.allColors = [
2958
3017
  this.background(),
@@ -3007,275 +3066,275 @@ class s {
3007
3066
  ].filter((e) => e !== void 0);
3008
3067
  }
3009
3068
  highestSurface(e) {
3010
- return s.colorSpec.highestSurface(e);
3069
+ return o.colorSpec.highestSurface(e);
3011
3070
  }
3012
3071
  ////////////////////////////////////////////////////////////////
3013
3072
  // Main Palettes //
3014
3073
  ////////////////////////////////////////////////////////////////
3015
3074
  primaryPaletteKeyColor() {
3016
- return s.colorSpec.primaryPaletteKeyColor();
3075
+ return o.colorSpec.primaryPaletteKeyColor();
3017
3076
  }
3018
3077
  secondaryPaletteKeyColor() {
3019
- return s.colorSpec.secondaryPaletteKeyColor();
3078
+ return o.colorSpec.secondaryPaletteKeyColor();
3020
3079
  }
3021
3080
  tertiaryPaletteKeyColor() {
3022
- return s.colorSpec.tertiaryPaletteKeyColor();
3081
+ return o.colorSpec.tertiaryPaletteKeyColor();
3023
3082
  }
3024
3083
  neutralPaletteKeyColor() {
3025
- return s.colorSpec.neutralPaletteKeyColor();
3084
+ return o.colorSpec.neutralPaletteKeyColor();
3026
3085
  }
3027
3086
  neutralVariantPaletteKeyColor() {
3028
- return s.colorSpec.neutralVariantPaletteKeyColor();
3087
+ return o.colorSpec.neutralVariantPaletteKeyColor();
3029
3088
  }
3030
3089
  errorPaletteKeyColor() {
3031
- return s.colorSpec.errorPaletteKeyColor();
3090
+ return o.colorSpec.errorPaletteKeyColor();
3032
3091
  }
3033
3092
  ////////////////////////////////////////////////////////////////
3034
3093
  // Surfaces [S] //
3035
3094
  ////////////////////////////////////////////////////////////////
3036
3095
  background() {
3037
- return s.colorSpec.background();
3096
+ return o.colorSpec.background();
3038
3097
  }
3039
3098
  onBackground() {
3040
- return s.colorSpec.onBackground();
3099
+ return o.colorSpec.onBackground();
3041
3100
  }
3042
3101
  surface() {
3043
- return s.colorSpec.surface();
3102
+ return o.colorSpec.surface();
3044
3103
  }
3045
3104
  surfaceDim() {
3046
- return s.colorSpec.surfaceDim();
3105
+ return o.colorSpec.surfaceDim();
3047
3106
  }
3048
3107
  surfaceBright() {
3049
- return s.colorSpec.surfaceBright();
3108
+ return o.colorSpec.surfaceBright();
3050
3109
  }
3051
3110
  surfaceContainerLowest() {
3052
- return s.colorSpec.surfaceContainerLowest();
3111
+ return o.colorSpec.surfaceContainerLowest();
3053
3112
  }
3054
3113
  surfaceContainerLow() {
3055
- return s.colorSpec.surfaceContainerLow();
3114
+ return o.colorSpec.surfaceContainerLow();
3056
3115
  }
3057
3116
  surfaceContainer() {
3058
- return s.colorSpec.surfaceContainer();
3117
+ return o.colorSpec.surfaceContainer();
3059
3118
  }
3060
3119
  surfaceContainerHigh() {
3061
- return s.colorSpec.surfaceContainerHigh();
3120
+ return o.colorSpec.surfaceContainerHigh();
3062
3121
  }
3063
3122
  surfaceContainerHighest() {
3064
- return s.colorSpec.surfaceContainerHighest();
3123
+ return o.colorSpec.surfaceContainerHighest();
3065
3124
  }
3066
3125
  onSurface() {
3067
- return s.colorSpec.onSurface();
3126
+ return o.colorSpec.onSurface();
3068
3127
  }
3069
3128
  surfaceVariant() {
3070
- return s.colorSpec.surfaceVariant();
3129
+ return o.colorSpec.surfaceVariant();
3071
3130
  }
3072
3131
  onSurfaceVariant() {
3073
- return s.colorSpec.onSurfaceVariant();
3132
+ return o.colorSpec.onSurfaceVariant();
3074
3133
  }
3075
3134
  outline() {
3076
- return s.colorSpec.outline();
3135
+ return o.colorSpec.outline();
3077
3136
  }
3078
3137
  outlineVariant() {
3079
- return s.colorSpec.outlineVariant();
3138
+ return o.colorSpec.outlineVariant();
3080
3139
  }
3081
3140
  inverseSurface() {
3082
- return s.colorSpec.inverseSurface();
3141
+ return o.colorSpec.inverseSurface();
3083
3142
  }
3084
3143
  inverseOnSurface() {
3085
- return s.colorSpec.inverseOnSurface();
3144
+ return o.colorSpec.inverseOnSurface();
3086
3145
  }
3087
3146
  shadow() {
3088
- return s.colorSpec.shadow();
3147
+ return o.colorSpec.shadow();
3089
3148
  }
3090
3149
  scrim() {
3091
- return s.colorSpec.scrim();
3150
+ return o.colorSpec.scrim();
3092
3151
  }
3093
3152
  surfaceTint() {
3094
- return s.colorSpec.surfaceTint();
3153
+ return o.colorSpec.surfaceTint();
3095
3154
  }
3096
3155
  ////////////////////////////////////////////////////////////////
3097
3156
  // Primaries [P] //
3098
3157
  ////////////////////////////////////////////////////////////////
3099
3158
  primary() {
3100
- return s.colorSpec.primary();
3159
+ return o.colorSpec.primary();
3101
3160
  }
3102
3161
  primaryDim() {
3103
- return s.colorSpec.primaryDim();
3162
+ return o.colorSpec.primaryDim();
3104
3163
  }
3105
3164
  onPrimary() {
3106
- return s.colorSpec.onPrimary();
3165
+ return o.colorSpec.onPrimary();
3107
3166
  }
3108
3167
  primaryContainer() {
3109
- return s.colorSpec.primaryContainer();
3168
+ return o.colorSpec.primaryContainer();
3110
3169
  }
3111
3170
  onPrimaryContainer() {
3112
- return s.colorSpec.onPrimaryContainer();
3171
+ return o.colorSpec.onPrimaryContainer();
3113
3172
  }
3114
3173
  inversePrimary() {
3115
- return s.colorSpec.inversePrimary();
3174
+ return o.colorSpec.inversePrimary();
3116
3175
  }
3117
3176
  /////////////////////////////////////////////////////////////////
3118
3177
  // Primary Fixed [PF] //
3119
3178
  /////////////////////////////////////////////////////////////////
3120
3179
  primaryFixed() {
3121
- return s.colorSpec.primaryFixed();
3180
+ return o.colorSpec.primaryFixed();
3122
3181
  }
3123
3182
  primaryFixedDim() {
3124
- return s.colorSpec.primaryFixedDim();
3183
+ return o.colorSpec.primaryFixedDim();
3125
3184
  }
3126
3185
  onPrimaryFixed() {
3127
- return s.colorSpec.onPrimaryFixed();
3186
+ return o.colorSpec.onPrimaryFixed();
3128
3187
  }
3129
3188
  onPrimaryFixedVariant() {
3130
- return s.colorSpec.onPrimaryFixedVariant();
3189
+ return o.colorSpec.onPrimaryFixedVariant();
3131
3190
  }
3132
3191
  ////////////////////////////////////////////////////////////////
3133
3192
  // Secondaries [Q] //
3134
3193
  ////////////////////////////////////////////////////////////////
3135
3194
  secondary() {
3136
- return s.colorSpec.secondary();
3195
+ return o.colorSpec.secondary();
3137
3196
  }
3138
3197
  secondaryDim() {
3139
- return s.colorSpec.secondaryDim();
3198
+ return o.colorSpec.secondaryDim();
3140
3199
  }
3141
3200
  onSecondary() {
3142
- return s.colorSpec.onSecondary();
3201
+ return o.colorSpec.onSecondary();
3143
3202
  }
3144
3203
  secondaryContainer() {
3145
- return s.colorSpec.secondaryContainer();
3204
+ return o.colorSpec.secondaryContainer();
3146
3205
  }
3147
3206
  onSecondaryContainer() {
3148
- return s.colorSpec.onSecondaryContainer();
3207
+ return o.colorSpec.onSecondaryContainer();
3149
3208
  }
3150
3209
  /////////////////////////////////////////////////////////////////
3151
3210
  // Secondary Fixed [QF] //
3152
3211
  /////////////////////////////////////////////////////////////////
3153
3212
  secondaryFixed() {
3154
- return s.colorSpec.secondaryFixed();
3213
+ return o.colorSpec.secondaryFixed();
3155
3214
  }
3156
3215
  secondaryFixedDim() {
3157
- return s.colorSpec.secondaryFixedDim();
3216
+ return o.colorSpec.secondaryFixedDim();
3158
3217
  }
3159
3218
  onSecondaryFixed() {
3160
- return s.colorSpec.onSecondaryFixed();
3219
+ return o.colorSpec.onSecondaryFixed();
3161
3220
  }
3162
3221
  onSecondaryFixedVariant() {
3163
- return s.colorSpec.onSecondaryFixedVariant();
3222
+ return o.colorSpec.onSecondaryFixedVariant();
3164
3223
  }
3165
3224
  ////////////////////////////////////////////////////////////////
3166
3225
  // Tertiaries [T] //
3167
3226
  ////////////////////////////////////////////////////////////////
3168
3227
  tertiary() {
3169
- return s.colorSpec.tertiary();
3228
+ return o.colorSpec.tertiary();
3170
3229
  }
3171
3230
  tertiaryDim() {
3172
- return s.colorSpec.tertiaryDim();
3231
+ return o.colorSpec.tertiaryDim();
3173
3232
  }
3174
3233
  onTertiary() {
3175
- return s.colorSpec.onTertiary();
3234
+ return o.colorSpec.onTertiary();
3176
3235
  }
3177
3236
  tertiaryContainer() {
3178
- return s.colorSpec.tertiaryContainer();
3237
+ return o.colorSpec.tertiaryContainer();
3179
3238
  }
3180
3239
  onTertiaryContainer() {
3181
- return s.colorSpec.onTertiaryContainer();
3240
+ return o.colorSpec.onTertiaryContainer();
3182
3241
  }
3183
3242
  /////////////////////////////////////////////////////////////////
3184
3243
  // Tertiary Fixed [TF] //
3185
3244
  /////////////////////////////////////////////////////////////////
3186
3245
  tertiaryFixed() {
3187
- return s.colorSpec.tertiaryFixed();
3246
+ return o.colorSpec.tertiaryFixed();
3188
3247
  }
3189
3248
  tertiaryFixedDim() {
3190
- return s.colorSpec.tertiaryFixedDim();
3249
+ return o.colorSpec.tertiaryFixedDim();
3191
3250
  }
3192
3251
  onTertiaryFixed() {
3193
- return s.colorSpec.onTertiaryFixed();
3252
+ return o.colorSpec.onTertiaryFixed();
3194
3253
  }
3195
3254
  onTertiaryFixedVariant() {
3196
- return s.colorSpec.onTertiaryFixedVariant();
3255
+ return o.colorSpec.onTertiaryFixedVariant();
3197
3256
  }
3198
3257
  ////////////////////////////////////////////////////////////////
3199
3258
  // Errors [E] //
3200
3259
  ////////////////////////////////////////////////////////////////
3201
3260
  error() {
3202
- return s.colorSpec.error();
3261
+ return o.colorSpec.error();
3203
3262
  }
3204
3263
  errorDim() {
3205
- return s.colorSpec.errorDim();
3264
+ return o.colorSpec.errorDim();
3206
3265
  }
3207
3266
  onError() {
3208
- return s.colorSpec.onError();
3267
+ return o.colorSpec.onError();
3209
3268
  }
3210
3269
  errorContainer() {
3211
- return s.colorSpec.errorContainer();
3270
+ return o.colorSpec.errorContainer();
3212
3271
  }
3213
3272
  onErrorContainer() {
3214
- return s.colorSpec.onErrorContainer();
3273
+ return o.colorSpec.onErrorContainer();
3215
3274
  }
3216
3275
  // Static variables are deprecated. Use the instance methods to get correct
3217
3276
  // specs based on request.
3218
3277
  /** @deprecated Use highestSurface() instead. */
3219
3278
  static highestSurface(e) {
3220
- return s.colorSpec.highestSurface(e);
3221
- }
3222
- }
3223
- s.contentAccentToneDelta = 15;
3224
- s.colorSpec = new Ht();
3225
- s.primaryPaletteKeyColor = s.colorSpec.primaryPaletteKeyColor();
3226
- s.secondaryPaletteKeyColor = s.colorSpec.secondaryPaletteKeyColor();
3227
- s.tertiaryPaletteKeyColor = s.colorSpec.tertiaryPaletteKeyColor();
3228
- s.neutralPaletteKeyColor = s.colorSpec.neutralPaletteKeyColor();
3229
- s.neutralVariantPaletteKeyColor = s.colorSpec.neutralVariantPaletteKeyColor();
3230
- s.background = s.colorSpec.background();
3231
- s.onBackground = s.colorSpec.onBackground();
3232
- s.surface = s.colorSpec.surface();
3233
- s.surfaceDim = s.colorSpec.surfaceDim();
3234
- s.surfaceBright = s.colorSpec.surfaceBright();
3235
- s.surfaceContainerLowest = s.colorSpec.surfaceContainerLowest();
3236
- s.surfaceContainerLow = s.colorSpec.surfaceContainerLow();
3237
- s.surfaceContainer = s.colorSpec.surfaceContainer();
3238
- s.surfaceContainerHigh = s.colorSpec.surfaceContainerHigh();
3239
- s.surfaceContainerHighest = s.colorSpec.surfaceContainerHighest();
3240
- s.onSurface = s.colorSpec.onSurface();
3241
- s.surfaceVariant = s.colorSpec.surfaceVariant();
3242
- s.onSurfaceVariant = s.colorSpec.onSurfaceVariant();
3243
- s.inverseSurface = s.colorSpec.inverseSurface();
3244
- s.inverseOnSurface = s.colorSpec.inverseOnSurface();
3245
- s.outline = s.colorSpec.outline();
3246
- s.outlineVariant = s.colorSpec.outlineVariant();
3247
- s.shadow = s.colorSpec.shadow();
3248
- s.scrim = s.colorSpec.scrim();
3249
- s.surfaceTint = s.colorSpec.surfaceTint();
3250
- s.primary = s.colorSpec.primary();
3251
- s.onPrimary = s.colorSpec.onPrimary();
3252
- s.primaryContainer = s.colorSpec.primaryContainer();
3253
- s.onPrimaryContainer = s.colorSpec.onPrimaryContainer();
3254
- s.inversePrimary = s.colorSpec.inversePrimary();
3255
- s.secondary = s.colorSpec.secondary();
3256
- s.onSecondary = s.colorSpec.onSecondary();
3257
- s.secondaryContainer = s.colorSpec.secondaryContainer();
3258
- s.onSecondaryContainer = s.colorSpec.onSecondaryContainer();
3259
- s.tertiary = s.colorSpec.tertiary();
3260
- s.onTertiary = s.colorSpec.onTertiary();
3261
- s.tertiaryContainer = s.colorSpec.tertiaryContainer();
3262
- s.onTertiaryContainer = s.colorSpec.onTertiaryContainer();
3263
- s.error = s.colorSpec.error();
3264
- s.onError = s.colorSpec.onError();
3265
- s.errorContainer = s.colorSpec.errorContainer();
3266
- s.onErrorContainer = s.colorSpec.onErrorContainer();
3267
- s.primaryFixed = s.colorSpec.primaryFixed();
3268
- s.primaryFixedDim = s.colorSpec.primaryFixedDim();
3269
- s.onPrimaryFixed = s.colorSpec.onPrimaryFixed();
3270
- s.onPrimaryFixedVariant = s.colorSpec.onPrimaryFixedVariant();
3271
- s.secondaryFixed = s.colorSpec.secondaryFixed();
3272
- s.secondaryFixedDim = s.colorSpec.secondaryFixedDim();
3273
- s.onSecondaryFixed = s.colorSpec.onSecondaryFixed();
3274
- s.onSecondaryFixedVariant = s.colorSpec.onSecondaryFixedVariant();
3275
- s.tertiaryFixed = s.colorSpec.tertiaryFixed();
3276
- s.tertiaryFixedDim = s.colorSpec.tertiaryFixedDim();
3277
- s.onTertiaryFixed = s.colorSpec.onTertiaryFixed();
3278
- s.onTertiaryFixedVariant = s.colorSpec.onTertiaryFixedVariant();
3279
+ return o.colorSpec.highestSurface(e);
3280
+ }
3281
+ }
3282
+ o.contentAccentToneDelta = 15;
3283
+ o.colorSpec = new ur();
3284
+ o.primaryPaletteKeyColor = o.colorSpec.primaryPaletteKeyColor();
3285
+ o.secondaryPaletteKeyColor = o.colorSpec.secondaryPaletteKeyColor();
3286
+ o.tertiaryPaletteKeyColor = o.colorSpec.tertiaryPaletteKeyColor();
3287
+ o.neutralPaletteKeyColor = o.colorSpec.neutralPaletteKeyColor();
3288
+ o.neutralVariantPaletteKeyColor = o.colorSpec.neutralVariantPaletteKeyColor();
3289
+ o.background = o.colorSpec.background();
3290
+ o.onBackground = o.colorSpec.onBackground();
3291
+ o.surface = o.colorSpec.surface();
3292
+ o.surfaceDim = o.colorSpec.surfaceDim();
3293
+ o.surfaceBright = o.colorSpec.surfaceBright();
3294
+ o.surfaceContainerLowest = o.colorSpec.surfaceContainerLowest();
3295
+ o.surfaceContainerLow = o.colorSpec.surfaceContainerLow();
3296
+ o.surfaceContainer = o.colorSpec.surfaceContainer();
3297
+ o.surfaceContainerHigh = o.colorSpec.surfaceContainerHigh();
3298
+ o.surfaceContainerHighest = o.colorSpec.surfaceContainerHighest();
3299
+ o.onSurface = o.colorSpec.onSurface();
3300
+ o.surfaceVariant = o.colorSpec.surfaceVariant();
3301
+ o.onSurfaceVariant = o.colorSpec.onSurfaceVariant();
3302
+ o.inverseSurface = o.colorSpec.inverseSurface();
3303
+ o.inverseOnSurface = o.colorSpec.inverseOnSurface();
3304
+ o.outline = o.colorSpec.outline();
3305
+ o.outlineVariant = o.colorSpec.outlineVariant();
3306
+ o.shadow = o.colorSpec.shadow();
3307
+ o.scrim = o.colorSpec.scrim();
3308
+ o.surfaceTint = o.colorSpec.surfaceTint();
3309
+ o.primary = o.colorSpec.primary();
3310
+ o.onPrimary = o.colorSpec.onPrimary();
3311
+ o.primaryContainer = o.colorSpec.primaryContainer();
3312
+ o.onPrimaryContainer = o.colorSpec.onPrimaryContainer();
3313
+ o.inversePrimary = o.colorSpec.inversePrimary();
3314
+ o.secondary = o.colorSpec.secondary();
3315
+ o.onSecondary = o.colorSpec.onSecondary();
3316
+ o.secondaryContainer = o.colorSpec.secondaryContainer();
3317
+ o.onSecondaryContainer = o.colorSpec.onSecondaryContainer();
3318
+ o.tertiary = o.colorSpec.tertiary();
3319
+ o.onTertiary = o.colorSpec.onTertiary();
3320
+ o.tertiaryContainer = o.colorSpec.tertiaryContainer();
3321
+ o.onTertiaryContainer = o.colorSpec.onTertiaryContainer();
3322
+ o.error = o.colorSpec.error();
3323
+ o.onError = o.colorSpec.onError();
3324
+ o.errorContainer = o.colorSpec.errorContainer();
3325
+ o.onErrorContainer = o.colorSpec.onErrorContainer();
3326
+ o.primaryFixed = o.colorSpec.primaryFixed();
3327
+ o.primaryFixedDim = o.colorSpec.primaryFixedDim();
3328
+ o.onPrimaryFixed = o.colorSpec.onPrimaryFixed();
3329
+ o.onPrimaryFixedVariant = o.colorSpec.onPrimaryFixedVariant();
3330
+ o.secondaryFixed = o.colorSpec.secondaryFixed();
3331
+ o.secondaryFixedDim = o.colorSpec.secondaryFixedDim();
3332
+ o.onSecondaryFixed = o.colorSpec.onSecondaryFixed();
3333
+ o.onSecondaryFixedVariant = o.colorSpec.onSecondaryFixedVariant();
3334
+ o.tertiaryFixed = o.colorSpec.tertiaryFixed();
3335
+ o.tertiaryFixedDim = o.colorSpec.tertiaryFixedDim();
3336
+ o.onTertiaryFixed = o.colorSpec.onTertiaryFixed();
3337
+ o.onTertiaryFixedVariant = o.colorSpec.onTertiaryFixedVariant();
3279
3338
  /**
3280
3339
  * @license
3281
3340
  * Copyright 2021 Google LLC
@@ -3292,7 +3351,7 @@ s.onTertiaryFixedVariant = s.colorSpec.onTertiaryFixedVariant();
3292
3351
  * See the License for the specific language governing permissions and
3293
3352
  * limitations under the License.
3294
3353
  */
3295
- class $ {
3354
+ class U {
3296
3355
  /**
3297
3356
  * @param argb ARGB representation of a color
3298
3357
  *
@@ -3300,7 +3359,7 @@ class $ {
3300
3359
  * Use {@link CorePalettes} for core palettes container class.
3301
3360
  */
3302
3361
  static of(e) {
3303
- return new $(e, !1);
3362
+ return new U(e, !1);
3304
3363
  }
3305
3364
  /**
3306
3365
  * @param argb ARGB representation of a color
@@ -3309,7 +3368,7 @@ class $ {
3309
3368
  * Use {@link CorePalettes} for core palettes container class.
3310
3369
  */
3311
3370
  static contentOf(e) {
3312
- return new $(e, !0);
3371
+ return new U(e, !0);
3313
3372
  }
3314
3373
  /**
3315
3374
  * Create a [CorePalette] from a set of colors
@@ -3318,7 +3377,7 @@ class $ {
3318
3377
  * Use {@link CorePalettes} for core palettes container class.
3319
3378
  */
3320
3379
  static fromColors(e) {
3321
- return $.createPaletteFromColors(!1, e);
3380
+ return U.createPaletteFromColors(!1, e);
3322
3381
  }
3323
3382
  /**
3324
3383
  * Create a content [CorePalette] from a set of colors
@@ -3327,35 +3386,35 @@ class $ {
3327
3386
  * Use {@link CorePalettes} for core palettes container class.
3328
3387
  */
3329
3388
  static contentFromColors(e) {
3330
- return $.createPaletteFromColors(!0, e);
3389
+ return U.createPaletteFromColors(!0, e);
3331
3390
  }
3332
- static createPaletteFromColors(e, t) {
3333
- const n = new $(t.primary, e);
3334
- if (t.secondary) {
3335
- const a = new $(t.secondary, e);
3336
- n.a2 = a.a1;
3391
+ static createPaletteFromColors(e, r) {
3392
+ const t = new U(r.primary, e);
3393
+ if (r.secondary) {
3394
+ const n = new U(r.secondary, e);
3395
+ t.a2 = n.a1;
3337
3396
  }
3338
- if (t.tertiary) {
3339
- const a = new $(t.tertiary, e);
3340
- n.a3 = a.a1;
3397
+ if (r.tertiary) {
3398
+ const n = new U(r.tertiary, e);
3399
+ t.a3 = n.a1;
3341
3400
  }
3342
- if (t.error) {
3343
- const a = new $(t.error, e);
3344
- n.error = a.a1;
3401
+ if (r.error) {
3402
+ const n = new U(r.error, e);
3403
+ t.error = n.a1;
3345
3404
  }
3346
- if (t.neutral) {
3347
- const a = new $(t.neutral, e);
3348
- n.n1 = a.n1;
3405
+ if (r.neutral) {
3406
+ const n = new U(r.neutral, e);
3407
+ t.n1 = n.n1;
3349
3408
  }
3350
- if (t.neutralVariant) {
3351
- const a = new $(t.neutralVariant, e);
3352
- n.n2 = a.n2;
3409
+ if (r.neutralVariant) {
3410
+ const n = new U(r.neutralVariant, e);
3411
+ t.n2 = n.n2;
3353
3412
  }
3354
- return n;
3413
+ return t;
3355
3414
  }
3356
- constructor(e, t) {
3357
- const n = C.fromInt(e), a = n.hue, o = n.chroma;
3358
- t ? (this.a1 = Y.fromHueAndChroma(a, o), this.a2 = Y.fromHueAndChroma(a, o / 3), this.a3 = Y.fromHueAndChroma(a + 60, o / 2), this.n1 = Y.fromHueAndChroma(a, Math.min(o / 12, 4)), this.n2 = Y.fromHueAndChroma(a, Math.min(o / 6, 8))) : (this.a1 = Y.fromHueAndChroma(a, Math.max(48, o)), this.a2 = Y.fromHueAndChroma(a, 16), this.a3 = Y.fromHueAndChroma(a + 60, 24), this.n1 = Y.fromHueAndChroma(a, 4), this.n2 = Y.fromHueAndChroma(a, 8)), this.error = Y.fromHueAndChroma(25, 84);
3415
+ constructor(e, r) {
3416
+ const t = T.fromInt(e), n = t.hue, s = t.chroma;
3417
+ r ? (this.a1 = Y.fromHueAndChroma(n, s), this.a2 = Y.fromHueAndChroma(n, s / 3), this.a3 = Y.fromHueAndChroma(n + 60, s / 2), this.n1 = Y.fromHueAndChroma(n, Math.min(s / 12, 4)), this.n2 = Y.fromHueAndChroma(n, Math.min(s / 6, 8))) : (this.a1 = Y.fromHueAndChroma(n, Math.max(48, s)), this.a2 = Y.fromHueAndChroma(n, 16), this.a3 = Y.fromHueAndChroma(n + 60, 24), this.n1 = Y.fromHueAndChroma(n, 4), this.n2 = Y.fromHueAndChroma(n, 8)), this.error = Y.fromHueAndChroma(25, 84);
3359
3418
  }
3360
3419
  }
3361
3420
  /**
@@ -3374,7 +3433,7 @@ class $ {
3374
3433
  * See the License for the specific language governing permissions and
3375
3434
  * limitations under the License.
3376
3435
  */
3377
- class ee {
3436
+ class X {
3378
3437
  get primary() {
3379
3438
  return this.props.primary;
3380
3439
  }
@@ -3467,34 +3526,34 @@ class ee {
3467
3526
  * @return Light Material color scheme, based on the color's hue.
3468
3527
  */
3469
3528
  static light(e) {
3470
- return ee.lightFromCorePalette($.of(e));
3529
+ return X.lightFromCorePalette(U.of(e));
3471
3530
  }
3472
3531
  /**
3473
3532
  * @param argb ARGB representation of a color.
3474
3533
  * @return Dark Material color scheme, based on the color's hue.
3475
3534
  */
3476
3535
  static dark(e) {
3477
- return ee.darkFromCorePalette($.of(e));
3536
+ return X.darkFromCorePalette(U.of(e));
3478
3537
  }
3479
3538
  /**
3480
3539
  * @param argb ARGB representation of a color.
3481
3540
  * @return Light Material content color scheme, based on the color's hue.
3482
3541
  */
3483
3542
  static lightContent(e) {
3484
- return ee.lightFromCorePalette($.contentOf(e));
3543
+ return X.lightFromCorePalette(U.contentOf(e));
3485
3544
  }
3486
3545
  /**
3487
3546
  * @param argb ARGB representation of a color.
3488
3547
  * @return Dark Material content color scheme, based on the color's hue.
3489
3548
  */
3490
3549
  static darkContent(e) {
3491
- return ee.darkFromCorePalette($.contentOf(e));
3550
+ return X.darkFromCorePalette(U.contentOf(e));
3492
3551
  }
3493
3552
  /**
3494
3553
  * Light scheme from core palette
3495
3554
  */
3496
3555
  static lightFromCorePalette(e) {
3497
- return new ee({
3556
+ return new X({
3498
3557
  primary: e.a1.tone(40),
3499
3558
  onPrimary: e.a1.tone(100),
3500
3559
  primaryContainer: e.a1.tone(90),
@@ -3530,7 +3589,7 @@ class ee {
3530
3589
  * Dark scheme from core palette
3531
3590
  */
3532
3591
  static darkFromCorePalette(e) {
3533
- return new ee({
3592
+ return new X({
3534
3593
  primary: e.a1.tone(80),
3535
3594
  onPrimary: e.a1.tone(20),
3536
3595
  primaryContainer: e.a1.tone(30),
@@ -3587,22 +3646,22 @@ class ee {
3587
3646
  * See the License for the specific language governing permissions and
3588
3647
  * limitations under the License.
3589
3648
  */
3590
- function N(r) {
3591
- const e = at(r), t = ot(r), n = it(r), a = [e.toString(16), t.toString(16), n.toString(16)];
3592
- for (const [o, i] of a.entries())
3593
- i.length === 1 && (a[o] = "0" + i);
3594
- return "#" + a.join("");
3595
- }
3596
- function Ce(r) {
3597
- r = r.replace("#", "");
3598
- const e = r.length === 3, t = r.length === 6, n = r.length === 8;
3599
- if (!e && !t && !n)
3600
- throw new Error("unexpected hex " + r);
3601
- let a = 0, o = 0, i = 0;
3602
- return e ? (a = Z(r.slice(0, 1).repeat(2)), o = Z(r.slice(1, 2).repeat(2)), i = Z(r.slice(2, 3).repeat(2))) : t ? (a = Z(r.slice(0, 2)), o = Z(r.slice(2, 4)), i = Z(r.slice(4, 6))) : n && (a = Z(r.slice(2, 4)), o = Z(r.slice(4, 6)), i = Z(r.slice(6, 8))), (255 << 24 | (a & 255) << 16 | (o & 255) << 8 | i & 255) >>> 0;
3603
- }
3604
- function Z(r) {
3605
- return parseInt(r, 16);
3649
+ function lr(a) {
3650
+ const e = xe(a), r = Be(a), t = ve(a), n = [e.toString(16), r.toString(16), t.toString(16)];
3651
+ for (const [s, i] of n.entries())
3652
+ i.length === 1 && (n[s] = "0" + i);
3653
+ return "#" + n.join("");
3654
+ }
3655
+ function fr(a) {
3656
+ a = a.replace("#", "");
3657
+ const e = a.length === 3, r = a.length === 6, t = a.length === 8;
3658
+ if (!e && !r && !t)
3659
+ throw new Error("unexpected hex " + a);
3660
+ let n = 0, s = 0, i = 0;
3661
+ return e ? (n = $(a.slice(0, 1).repeat(2)), s = $(a.slice(1, 2).repeat(2)), i = $(a.slice(2, 3).repeat(2))) : r ? (n = $(a.slice(0, 2)), s = $(a.slice(2, 4)), i = $(a.slice(4, 6))) : t && (n = $(a.slice(2, 4)), s = $(a.slice(4, 6)), i = $(a.slice(6, 8))), (255 << 24 | (n & 255) << 16 | (s & 255) << 8 | i & 255) >>> 0;
3662
+ }
3663
+ function $(a) {
3664
+ return parseInt(a, 16);
3606
3665
  }
3607
3666
  /**
3608
3667
  * @license
@@ -3620,33 +3679,33 @@ function Z(r) {
3620
3679
  * See the License for the specific language governing permissions and
3621
3680
  * limitations under the License.
3622
3681
  */
3623
- function oe(r, e = []) {
3624
- const t = $.of(r);
3682
+ function hr(a, e = []) {
3683
+ const r = U.of(a);
3625
3684
  return {
3626
- source: r,
3685
+ source: a,
3627
3686
  schemes: {
3628
- light: ee.light(r),
3629
- dark: ee.dark(r)
3687
+ light: X.light(a),
3688
+ dark: X.dark(a)
3630
3689
  },
3631
3690
  palettes: {
3632
- primary: t.a1,
3633
- secondary: t.a2,
3634
- tertiary: t.a3,
3635
- neutral: t.n1,
3636
- neutralVariant: t.n2,
3637
- error: t.error
3691
+ primary: r.a1,
3692
+ secondary: r.a2,
3693
+ tertiary: r.a3,
3694
+ neutral: r.n1,
3695
+ neutralVariant: r.n2,
3696
+ error: r.error
3638
3697
  },
3639
- customColors: e.map((n) => zt(r, n))
3698
+ customColors: e.map((t) => dr(a, t))
3640
3699
  };
3641
3700
  }
3642
- function zt(r, e) {
3643
- let t = e.value;
3644
- const n = t, a = r;
3645
- e.blend && (t = Ve.harmonize(n, a));
3646
- const i = $.of(t).a1;
3701
+ function dr(a, e) {
3702
+ let r = e.value;
3703
+ const t = r, n = a;
3704
+ e.blend && (r = Ce.harmonize(t, n));
3705
+ const i = U.of(r).a1;
3647
3706
  return {
3648
3707
  color: e,
3649
- value: t,
3708
+ value: r,
3650
3709
  light: {
3651
3710
  color: i.tone(40),
3652
3711
  onColor: i.tone(100),
@@ -3661,330 +3720,64 @@ function zt(r, e) {
3661
3720
  }
3662
3721
  };
3663
3722
  }
3664
- function Fe(r, e) {
3665
- const t = C.fromInt(Ce(r)), n = C.from(t.hue, t.chroma, e);
3666
- return N(n.toInt());
3667
- }
3668
- function Ut(r) {
3669
- const e = C.fromInt(Ce(r)), t = (e.hue + 110) % 360, n = Math.min(e.chroma * 1.2, 100), a = e.tone < 50 ? 65 : Math.min(e.tone + 10, 75);
3670
- return N(C.from(t, n, a).toInt());
3671
- }
3672
- function $t(r) {
3673
- const e = Ut(r);
3674
- return {
3675
- 0: Fe(e, 95),
3676
- 25: e,
3677
- 50: r,
3678
- 75: Fe(r, 80),
3679
- 100: Fe(r, 20)
3680
- };
3681
- }
3682
- function he(r, e) {
3683
- const t = $t(r);
3684
- let n = `linear-gradient(${e}deg, `;
3685
- for (const a of Object.keys(t))
3686
- n += `${t[a]} ${a}%, `;
3687
- return n.slice(0, -2) + ")";
3688
- }
3689
- function Yt(r, e = 135) {
3690
- const t = {};
3691
- return Xe(t, "source", r, e), Object.entries(Ee).forEach(([n, a]) => {
3692
- Xe(t, n, a, e);
3693
- }), t;
3694
- }
3695
- function Xe(r, e, t, n) {
3696
- const o = oe(Ce(t)).palettes.primary;
3697
- for (let i = 10; i <= 100; i += 10) {
3698
- const u = N(o.tone(i));
3699
- r[`${e}${i}`] = he(u, n);
3700
- }
3701
- }
3702
- function X(r) {
3703
- const e = parseInt(r.slice(1, 3), 16), t = parseInt(r.slice(3, 5), 16), n = parseInt(r.slice(5, 7), 16);
3704
- return `${e}, ${t}, ${n}`;
3705
- }
3706
- function jt(r) {
3707
- const e = {};
3708
- return Ge(e, "source", r), Object.entries(Ee).forEach(([t]) => {
3709
- Ge(e, t, Ee[t]);
3710
- }), e;
3711
- }
3712
- function Ge(r, e, t) {
3713
- const a = oe(Ce(t)).palettes.primary;
3714
- for (let o = 10; o <= 100; o += 10) {
3715
- const i = N(a.tone(o)), u = o >= 60 ? 10 : 100, l = N(a.tone(u)), h = X(i), f = X(l);
3716
- r[`${e}${o}`] = h, r[`on${Kt(e)}${o}`] = f;
3717
- }
3718
- }
3719
- function Kt(r) {
3720
- return r.charAt(0).toUpperCase() + r.slice(1);
3721
- }
3722
- var qt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, Q = function(r) {
3723
- return typeof r == "string" ? r.length > 0 : typeof r == "number";
3724
- }, _ = function(r, e, t) {
3725
- return e === void 0 && (e = 0), t === void 0 && (t = Math.pow(10, e)), Math.round(t * r) / t + 0;
3726
- }, K = function(r, e, t) {
3727
- return e === void 0 && (e = 0), t === void 0 && (t = 1), r > t ? t : r > e ? r : e;
3728
- }, ut = function(r) {
3729
- return (r = isFinite(r) ? r % 360 : 0) > 0 ? r : r + 360;
3730
- }, Je = function(r) {
3731
- return { r: K(r.r, 0, 255), g: K(r.g, 0, 255), b: K(r.b, 0, 255), a: K(r.a) };
3732
- }, xe = function(r) {
3733
- return { r: _(r.r), g: _(r.g), b: _(r.b), a: _(r.a, 3) };
3734
- }, Xt = /^#([0-9a-f]{3,8})$/i, ke = function(r) {
3735
- var e = r.toString(16);
3736
- return e.length < 2 ? "0" + e : e;
3737
- }, lt = function(r) {
3738
- var e = r.r, t = r.g, n = r.b, a = r.a, o = Math.max(e, t, n), i = o - Math.min(e, t, n), u = i ? o === e ? (t - n) / i : o === t ? 2 + (n - e) / i : 4 + (e - t) / i : 0;
3739
- return { h: 60 * (u < 0 ? u + 6 : u), s: o ? i / o * 100 : 0, v: o / 255 * 100, a };
3740
- }, ht = function(r) {
3741
- var e = r.h, t = r.s, n = r.v, a = r.a;
3742
- e = e / 360 * 6, t /= 100, n /= 100;
3743
- var o = Math.floor(e), i = n * (1 - t), u = n * (1 - (e - o) * t), l = n * (1 - (1 - e + o) * t), h = o % 6;
3744
- return { r: 255 * [n, u, i, i, l, n][h], g: 255 * [l, n, n, u, i, i][h], b: 255 * [i, i, l, n, n, u][h], a };
3745
- }, We = function(r) {
3746
- return { h: ut(r.h), s: K(r.s, 0, 100), l: K(r.l, 0, 100), a: K(r.a) };
3747
- }, Ze = function(r) {
3748
- return { h: _(r.h), s: _(r.s), l: _(r.l), a: _(r.a, 3) };
3749
- }, Qe = function(r) {
3750
- return ht((t = (e = r).s, { h: e.h, s: (t *= ((n = e.l) < 50 ? n : 100 - n) / 100) > 0 ? 2 * t / (n + t) * 100 : 0, v: n + t, a: e.a }));
3751
- var e, t, n;
3752
- }, de = function(r) {
3753
- return { h: (e = lt(r)).h, s: (a = (200 - (t = e.s)) * (n = e.v) / 100) > 0 && a < 200 ? t * n / 100 / (a <= 100 ? a : 200 - a) * 100 : 0, l: a / 2, a: e.a };
3754
- var e, t, n, a;
3755
- }, Gt = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Jt = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Wt = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Zt = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, et = { string: [[function(r) {
3756
- var e = Xt.exec(r);
3757
- return e ? (r = e[1]).length <= 4 ? { r: parseInt(r[0] + r[0], 16), g: parseInt(r[1] + r[1], 16), b: parseInt(r[2] + r[2], 16), a: r.length === 4 ? _(parseInt(r[3] + r[3], 16) / 255, 2) : 1 } : r.length === 6 || r.length === 8 ? { r: parseInt(r.substr(0, 2), 16), g: parseInt(r.substr(2, 2), 16), b: parseInt(r.substr(4, 2), 16), a: r.length === 8 ? _(parseInt(r.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
3758
- }, "hex"], [function(r) {
3759
- var e = Wt.exec(r) || Zt.exec(r);
3760
- return e ? e[2] !== e[4] || e[4] !== e[6] ? null : Je({ r: Number(e[1]) / (e[2] ? 100 / 255 : 1), g: Number(e[3]) / (e[4] ? 100 / 255 : 1), b: Number(e[5]) / (e[6] ? 100 / 255 : 1), a: e[7] === void 0 ? 1 : Number(e[7]) / (e[8] ? 100 : 1) }) : null;
3761
- }, "rgb"], [function(r) {
3762
- var e = Gt.exec(r) || Jt.exec(r);
3763
- if (!e) return null;
3764
- var t, n, a = We({ h: (t = e[1], n = e[2], n === void 0 && (n = "deg"), Number(t) * (qt[n] || 1)), s: Number(e[3]), l: Number(e[4]), a: e[5] === void 0 ? 1 : Number(e[5]) / (e[6] ? 100 : 1) });
3765
- return Qe(a);
3766
- }, "hsl"]], object: [[function(r) {
3767
- var e = r.r, t = r.g, n = r.b, a = r.a, o = a === void 0 ? 1 : a;
3768
- return Q(e) && Q(t) && Q(n) ? Je({ r: Number(e), g: Number(t), b: Number(n), a: Number(o) }) : null;
3769
- }, "rgb"], [function(r) {
3770
- var e = r.h, t = r.s, n = r.l, a = r.a, o = a === void 0 ? 1 : a;
3771
- if (!Q(e) || !Q(t) || !Q(n)) return null;
3772
- var i = We({ h: Number(e), s: Number(t), l: Number(n), a: Number(o) });
3773
- return Qe(i);
3774
- }, "hsl"], [function(r) {
3775
- var e = r.h, t = r.s, n = r.v, a = r.a, o = a === void 0 ? 1 : a;
3776
- if (!Q(e) || !Q(t) || !Q(n)) return null;
3777
- var i = function(u) {
3778
- return { h: ut(u.h), s: K(u.s, 0, 100), v: K(u.v, 0, 100), a: K(u.a) };
3779
- }({ h: Number(e), s: Number(t), v: Number(n), a: Number(o) });
3780
- return ht(i);
3781
- }, "hsv"]] }, tt = function(r, e) {
3782
- for (var t = 0; t < e.length; t++) {
3783
- var n = e[t][0](r);
3784
- if (n) return [n, e[t][1]];
3785
- }
3786
- return [null, void 0];
3787
- }, Qt = function(r) {
3788
- return typeof r == "string" ? tt(r.trim(), et.string) : typeof r == "object" && r !== null ? tt(r, et.object) : [null, void 0];
3789
- }, Me = function(r, e) {
3790
- var t = de(r);
3791
- return { h: t.h, s: K(t.s + 100 * e, 0, 100), l: t.l, a: t.a };
3792
- }, Be = function(r) {
3793
- return (299 * r.r + 587 * r.g + 114 * r.b) / 1e3 / 255;
3794
- }, rt = function(r, e) {
3795
- var t = de(r);
3796
- return { h: t.h, s: t.s, l: K(t.l + 100 * e, 0, 100), a: t.a };
3797
- }, nt = function() {
3798
- function r(e) {
3799
- this.parsed = Qt(e)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
3800
- }
3801
- return r.prototype.isValid = function() {
3802
- return this.parsed !== null;
3803
- }, r.prototype.brightness = function() {
3804
- return _(Be(this.rgba), 2);
3805
- }, r.prototype.isDark = function() {
3806
- return Be(this.rgba) < 0.5;
3807
- }, r.prototype.isLight = function() {
3808
- return Be(this.rgba) >= 0.5;
3809
- }, r.prototype.toHex = function() {
3810
- return e = xe(this.rgba), t = e.r, n = e.g, a = e.b, i = (o = e.a) < 1 ? ke(_(255 * o)) : "", "#" + ke(t) + ke(n) + ke(a) + i;
3811
- var e, t, n, a, o, i;
3812
- }, r.prototype.toRgb = function() {
3813
- return xe(this.rgba);
3814
- }, r.prototype.toRgbString = function() {
3815
- return e = xe(this.rgba), t = e.r, n = e.g, a = e.b, (o = e.a) < 1 ? "rgba(" + t + ", " + n + ", " + a + ", " + o + ")" : "rgb(" + t + ", " + n + ", " + a + ")";
3816
- var e, t, n, a, o;
3817
- }, r.prototype.toHsl = function() {
3818
- return Ze(de(this.rgba));
3819
- }, r.prototype.toHslString = function() {
3820
- return e = Ze(de(this.rgba)), t = e.h, n = e.s, a = e.l, (o = e.a) < 1 ? "hsla(" + t + ", " + n + "%, " + a + "%, " + o + ")" : "hsl(" + t + ", " + n + "%, " + a + "%)";
3821
- var e, t, n, a, o;
3822
- }, r.prototype.toHsv = function() {
3823
- return e = lt(this.rgba), { h: _(e.h), s: _(e.s), v: _(e.v), a: _(e.a, 3) };
3824
- var e;
3825
- }, r.prototype.invert = function() {
3826
- return G({ r: 255 - (e = this.rgba).r, g: 255 - e.g, b: 255 - e.b, a: e.a });
3827
- var e;
3828
- }, r.prototype.saturate = function(e) {
3829
- return e === void 0 && (e = 0.1), G(Me(this.rgba, e));
3830
- }, r.prototype.desaturate = function(e) {
3831
- return e === void 0 && (e = 0.1), G(Me(this.rgba, -e));
3832
- }, r.prototype.grayscale = function() {
3833
- return G(Me(this.rgba, -1));
3834
- }, r.prototype.lighten = function(e) {
3835
- return e === void 0 && (e = 0.1), G(rt(this.rgba, e));
3836
- }, r.prototype.darken = function(e) {
3837
- return e === void 0 && (e = 0.1), G(rt(this.rgba, -e));
3838
- }, r.prototype.rotate = function(e) {
3839
- return e === void 0 && (e = 15), this.hue(this.hue() + e);
3840
- }, r.prototype.alpha = function(e) {
3841
- return typeof e == "number" ? G({ r: (t = this.rgba).r, g: t.g, b: t.b, a: e }) : _(this.rgba.a, 3);
3842
- var t;
3843
- }, r.prototype.hue = function(e) {
3844
- var t = de(this.rgba);
3845
- return typeof e == "number" ? G({ h: e, s: t.s, l: t.l, a: t.a }) : _(t.h);
3846
- }, r.prototype.isEqual = function(e) {
3847
- return this.toHex() === G(e).toHex();
3848
- }, r;
3849
- }(), G = function(r) {
3850
- return r instanceof nt ? r : new nt(r);
3851
- };
3852
- function se(r, e) {
3853
- if (typeof r == "number")
3854
- return r > 16777215 ? r : 4278190080 | r;
3855
- const t = r.trim();
3856
- if (t === "currentColor")
3857
- return null;
3858
- if (t.startsWith("var("))
3859
- return t.slice(4, -1).trim(), null;
3860
- const n = G(t);
3861
- if (n.isValid()) {
3862
- const { r: a, g: o, b: i } = n.toRgb();
3863
- return Se(a, o, i);
3864
- }
3865
- return null;
3866
- }
3867
- const pe = "#4e51ff", ft = "g-theme--material", Ae = "g-theme--", _e = Symbol("gradient-theme");
3868
- function er(r) {
3869
- const e = se("#FFC107"), t = se("#4CAF50");
3870
- if (e == null || t == null)
3871
- throw new Error("Failed to normalize semantic seed color.");
3872
- const n = r === "dark" ? "dark" : "light", a = oe(e).schemes[n].toJSON(), o = oe(t).schemes[n].toJSON();
3873
- return {
3874
- warning: X(N(a.primary)),
3875
- onWarning: X(N(a.onPrimary)),
3876
- warningContainer: X(
3877
- N(a.primaryContainer)
3878
- ),
3879
- onWarningContainer: X(
3880
- N(a.onPrimaryContainer)
3881
- ),
3882
- success: X(N(o.primary)),
3883
- onSuccess: X(N(o.onPrimary)),
3884
- successContainer: X(
3885
- N(o.primaryContainer)
3886
- ),
3887
- onSuccessContainer: X(
3888
- N(o.onPrimaryContainer)
3889
- )
3890
- };
3891
- }
3892
- function tr(r, e) {
3893
- const t = He(r), n = se(t);
3894
- if (n == null)
3895
- throw new Error("Failed to normalize seed color.");
3896
- const a = oe(n), o = e === "dark" ? "dark" : "light", i = a.schemes[o].toJSON(), u = {};
3897
- return Object.entries(i).forEach(([l, h]) => {
3898
- const f = N(h), g = X(f);
3899
- u[l] = g;
3900
- }), {
3901
- ...u,
3902
- ...er(e)
3903
- };
3904
- }
3905
- function rr(r) {
3906
- const e = He(r), t = se(e), n = se("#FFC107"), a = se("#4CAF50");
3907
- if (t == null || n == null || a == null)
3908
- throw new Error("Failed to normalize gradient seed color.");
3909
- const o = oe(t), i = oe(n), u = oe(a), l = o.schemes.light.toJSON(), h = i.schemes.light.toJSON(), f = u.schemes.light.toJSON(), g = N(l.error), p = N(h.primary), v = N(f.primary);
3910
- return {
3911
- ...Yt(e, 135),
3912
- main: he(e, 135),
3913
- error: he(g, 135),
3914
- warning: he(p, 135),
3915
- success: he(v, 135)
3916
- };
3917
- }
3918
- function He(r) {
3919
- const e = se(r);
3920
- return e == null ? pe : N(e);
3921
- }
3922
- function Ie(r, e) {
3923
- let t = `.${ft} {
3924
- `;
3925
- for (const [a, o] of Object.entries(r))
3926
- t += ` --g-${e}-${yt(a)}: ${o};
3927
- `;
3928
- t += "}";
3929
- let n = document.getElementById(
3930
- `g-${e}-style`
3723
+ const Ie = [
3724
+ 50,
3725
+ 100,
3726
+ 200,
3727
+ 300,
3728
+ 400,
3729
+ 500,
3730
+ 600,
3731
+ 700,
3732
+ 800,
3733
+ 900
3734
+ ], Ee = {
3735
+ 50: 90,
3736
+ 100: 80,
3737
+ 200: 70,
3738
+ 300: 60,
3739
+ 400: 50,
3740
+ 500: 40,
3741
+ 600: 35,
3742
+ 700: 30,
3743
+ 800: 20,
3744
+ 900: 10
3745
+ }, pr = Object.fromEntries(
3746
+ Ie.map((a) => [a, Ee[a] >= 60 ? 10 : 100])
3747
+ ), mr = (a) => {
3748
+ const e = Ye(a, "#000000");
3749
+ return hr(fr(e)).palettes.primary;
3750
+ }, Le = (a, e) => {
3751
+ const r = mr(a);
3752
+ return Object.fromEntries(
3753
+ Ie.map((t) => [
3754
+ t,
3755
+ lr(r.tone(e[t]))
3756
+ ])
3931
3757
  );
3932
- return n || (n = document.createElement("style"), n.id = `g-${e}-style`, document.head.appendChild(n)), n.textContent = t, n;
3933
- }
3934
- function ir(r = pe) {
3935
- return ze(r, "light");
3936
- }
3937
- function sr(r = pe) {
3938
- return ze(r, "dark");
3939
- }
3940
- function ze(r = pe, e = "light") {
3941
- const t = document.documentElement;
3942
- t.classList.add(ft), t.classList.remove(
3943
- `${Ae}light`,
3944
- `${Ae}dark`
3945
- ), t.classList.add(`${Ae}${e}`);
3946
- const n = He(r), a = {
3947
- theme: tr(n, e),
3948
- colors: jt(n),
3949
- gradient: rr(n)
3950
- };
3951
- return {
3952
- tokens: a,
3953
- themeCSS: Ie(a.theme, "theme"),
3954
- colorsCSS: Ie(a.colors, "color"),
3955
- gradientCSS: Ie(a.gradient, "gradient")
3956
- };
3957
- }
3958
- function nr(r = {}) {
3959
- const e = je(r.seed ?? pe), t = je(r.mode ?? "light"), n = Pt(
3960
- null
3961
- ), a = () => typeof window > "u" ? null : (n.value = ze(e.value, t.value), n.value), o = (l) => (e.value = l, a()), i = (l) => (t.value = l, a()), u = () => (t.value = t.value === "dark" ? "light" : "dark", a());
3962
- return r.autoApply !== !1 && a(), {
3963
- seed: e,
3964
- mode: t,
3965
- result: n,
3966
- apply: a,
3967
- setSeed: o,
3968
- setMode: i,
3969
- toggleMode: u
3970
- };
3971
- }
3972
- function cr(r = nr()) {
3973
- return kt(_e, r), r;
3974
- }
3975
- function ur(r, e) {
3976
- r.provide(_e, e);
3977
- }
3978
- function lr() {
3979
- return bt(_e, null);
3758
+ }, yr = (a) => Le(a, Ee), gr = (a) => Le(a, pr), Sr = (a) => ({
3759
+ colors: yr(a),
3760
+ onColors: gr(a)
3761
+ });
3762
+ function br(a) {
3763
+ return a.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/([a-zA-Z])(\d+)/g, "$1-$2");
3980
3764
  }
3981
3765
  export {
3982
- pe as D,
3983
- ir as a,
3984
- ze as b,
3985
- sr as c,
3986
- nr as d,
3987
- ur as i,
3988
- cr as p,
3989
- lr as u
3766
+ Ie as C,
3767
+ T as H,
3768
+ pr as O,
3769
+ Ee as S,
3770
+ gr as a,
3771
+ yr as b,
3772
+ Ye as c,
3773
+ Sr as d,
3774
+ Ue as e,
3775
+ Pr as f,
3776
+ Cr as g,
3777
+ br as h,
3778
+ fr as i,
3779
+ lr as j,
3780
+ me as p,
3781
+ kr as r,
3782
+ hr as t
3990
3783
  };