@jskit-ai/assistant-core 0.1.166 → 0.1.167
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/examples/conversation/package.json +3 -3
- package/package.json +5 -5
- package/examples/conversation/dist/assets/index-CSTXm6q3.css +0 -1
- package/examples/conversation/dist/assets/index-DGgOLzoo.js +0 -30
- package/examples/conversation/dist/index.html +0 -4
- package/examples/conversation/node_modules/.vite/deps/@mdi_js.js +0 -7450
- package/examples/conversation/node_modules/.vite/deps/@mdi_js.js.map +0 -1
- package/examples/conversation/node_modules/.vite/deps/VTooltip-jIxO6ULs.js +0 -2311
- package/examples/conversation/node_modules/.vite/deps/VTooltip-jIxO6ULs.js.map +0 -1
- package/examples/conversation/node_modules/.vite/deps/_metadata.json +0 -70
- package/examples/conversation/node_modules/.vite/deps/defineComponent-DK6LSjDW.js +0 -710
- package/examples/conversation/node_modules/.vite/deps/defineComponent-DK6LSjDW.js.map +0 -1
- package/examples/conversation/node_modules/.vite/deps/hotkey-parsing-DnoZxtbW.js +0 -1214
- package/examples/conversation/node_modules/.vite/deps/hotkey-parsing-DnoZxtbW.js.map +0 -1
- package/examples/conversation/node_modules/.vite/deps/icons-ze2hmg7j.js +0 -98
- package/examples/conversation/node_modules/.vite/deps/icons-ze2hmg7j.js.map +0 -1
- package/examples/conversation/node_modules/.vite/deps/package.json +0 -3
- package/examples/conversation/node_modules/.vite/deps/theme-D78LVcJg.js +0 -1301
- package/examples/conversation/node_modules/.vite/deps/theme-D78LVcJg.js.map +0 -1
- package/examples/conversation/node_modules/.vite/deps/vue.js +0 -2
- package/examples/conversation/node_modules/.vite/deps/vue.runtime.esm-bundler-YcakWsDn.js +0 -8538
- package/examples/conversation/node_modules/.vite/deps/vue.runtime.esm-bundler-YcakWsDn.js.map +0 -1
- package/examples/conversation/node_modules/.vite/deps/vuetify.js +0 -413
- package/examples/conversation/node_modules/.vite/deps/vuetify.js.map +0 -1
- package/examples/conversation/node_modules/.vite/deps/vuetify_components.js +0 -25370
- package/examples/conversation/node_modules/.vite/deps/vuetify_components.js.map +0 -1
- package/examples/conversation/node_modules/.vite/deps/vuetify_directives.js +0 -132
- package/examples/conversation/node_modules/.vite/deps/vuetify_directives.js.map +0 -1
- package/examples/conversation/node_modules/.vite/deps/vuetify_iconsets_mdi-svg.js +0 -70
- package/examples/conversation/node_modules/.vite/deps/vuetify_iconsets_mdi-svg.js.map +0 -1
|
@@ -1,1301 +0,0 @@
|
|
|
1
|
-
import { $n as toRefs, Kn as ref, Mn as effectScope, Nn as getCurrentScope, Qn as toRef, U as computed, Ut as provide, Vn as onScopeDispose, Wn as reactive, Yn as shallowRef, Zn as toRaw, _n as watchEffect, gn as watch, xt as inject } from "./vue.runtime.esm-bundler-YcakWsDn.js";
|
|
2
|
-
import { I as getObjectValueByPath, R as has, Z as mergeDeep, _ as clamp, _t as consoleWarn, c as getCurrentInstance, ct as toKebabCase, g as chunk, gt as consoleError, ht as SUPPORTS_TOUCH, l as getCurrentInstanceName, mt as SUPPORTS_MATCH_MEDIA, tt as padEnd, u as propsFactory, ut as IN_BROWSER, vt as deprecate, y as createRange } from "./defineComponent-DK6LSjDW.js";
|
|
3
|
-
//#region ../../../../node_modules/vuetify/lib/util/color/APCA.js
|
|
4
|
-
/**
|
|
5
|
-
* WCAG 3.0 APCA perceptual contrast algorithm from https://github.com/Myndex/SAPC-APCA
|
|
6
|
-
* @licence https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
|
7
|
-
* @see https://www.w3.org/WAI/GL/task-forces/silver/wiki/Visual_Contrast_of_Text_Subgroup
|
|
8
|
-
*/
|
|
9
|
-
var mainTRC = 2.4;
|
|
10
|
-
var Rco = .2126729;
|
|
11
|
-
var Gco = .7151522;
|
|
12
|
-
var Bco = .072175;
|
|
13
|
-
var normBG = .55;
|
|
14
|
-
var normTXT = .58;
|
|
15
|
-
var revTXT = .57;
|
|
16
|
-
var revBG = .62;
|
|
17
|
-
var blkThrs = .03;
|
|
18
|
-
var blkClmp = 1.45;
|
|
19
|
-
var deltaYmin = 5e-4;
|
|
20
|
-
var scaleBoW = 1.25;
|
|
21
|
-
var scaleWoB = 1.25;
|
|
22
|
-
var loConThresh = .078;
|
|
23
|
-
var loConFactor = 12.82051282051282;
|
|
24
|
-
var loConOffset = .06;
|
|
25
|
-
var loClip = .001;
|
|
26
|
-
function APCAcontrast(text, background) {
|
|
27
|
-
const Rtxt = (text.r / 255) ** mainTRC;
|
|
28
|
-
const Gtxt = (text.g / 255) ** mainTRC;
|
|
29
|
-
const Btxt = (text.b / 255) ** mainTRC;
|
|
30
|
-
const Rbg = (background.r / 255) ** mainTRC;
|
|
31
|
-
const Gbg = (background.g / 255) ** mainTRC;
|
|
32
|
-
const Bbg = (background.b / 255) ** mainTRC;
|
|
33
|
-
let Ytxt = Rtxt * Rco + Gtxt * Gco + Btxt * Bco;
|
|
34
|
-
let Ybg = Rbg * Rco + Gbg * Gco + Bbg * Bco;
|
|
35
|
-
if (Ytxt <= blkThrs) Ytxt += (blkThrs - Ytxt) ** blkClmp;
|
|
36
|
-
if (Ybg <= blkThrs) Ybg += (blkThrs - Ybg) ** blkClmp;
|
|
37
|
-
if (Math.abs(Ybg - Ytxt) < deltaYmin) return 0;
|
|
38
|
-
let outputContrast;
|
|
39
|
-
if (Ybg > Ytxt) {
|
|
40
|
-
const SAPC = (Ybg ** normBG - Ytxt ** normTXT) * scaleBoW;
|
|
41
|
-
outputContrast = SAPC < loClip ? 0 : SAPC < loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC - loConOffset;
|
|
42
|
-
} else {
|
|
43
|
-
const SAPC = (Ybg ** revBG - Ytxt ** revTXT) * scaleWoB;
|
|
44
|
-
outputContrast = SAPC > -.001 ? 0 : SAPC > -.078 ? SAPC - SAPC * loConFactor * loConOffset : SAPC + loConOffset;
|
|
45
|
-
}
|
|
46
|
-
return outputContrast * 100;
|
|
47
|
-
}
|
|
48
|
-
//#endregion
|
|
49
|
-
//#region ../../../../node_modules/vuetify/lib/util/color/transformCIELAB.js
|
|
50
|
-
var delta = .20689655172413793;
|
|
51
|
-
var cielabForwardTransform = (t) => t > delta ** 3 ? Math.cbrt(t) : t / (3 * delta ** 2) + 4 / 29;
|
|
52
|
-
var cielabReverseTransform = (t) => t > delta ? t ** 3 : 3 * delta ** 2 * (t - 4 / 29);
|
|
53
|
-
function fromXYZ$1(xyz) {
|
|
54
|
-
const transform = cielabForwardTransform;
|
|
55
|
-
const transformedY = transform(xyz[1]);
|
|
56
|
-
return [
|
|
57
|
-
116 * transformedY - 16,
|
|
58
|
-
500 * (transform(xyz[0] / .95047) - transformedY),
|
|
59
|
-
200 * (transformedY - transform(xyz[2] / 1.08883))
|
|
60
|
-
];
|
|
61
|
-
}
|
|
62
|
-
function toXYZ$1(lab) {
|
|
63
|
-
const transform = cielabReverseTransform;
|
|
64
|
-
const Ln = (lab[0] + 16) / 116;
|
|
65
|
-
return [
|
|
66
|
-
transform(Ln + lab[1] / 500) * .95047,
|
|
67
|
-
transform(Ln),
|
|
68
|
-
transform(Ln - lab[2] / 200) * 1.08883
|
|
69
|
-
];
|
|
70
|
-
}
|
|
71
|
-
//#endregion
|
|
72
|
-
//#region ../../../../node_modules/vuetify/lib/util/color/transformSRGB.js
|
|
73
|
-
var srgbForwardMatrix = [
|
|
74
|
-
[
|
|
75
|
-
3.2406,
|
|
76
|
-
-1.5372,
|
|
77
|
-
-.4986
|
|
78
|
-
],
|
|
79
|
-
[
|
|
80
|
-
-.9689,
|
|
81
|
-
1.8758,
|
|
82
|
-
.0415
|
|
83
|
-
],
|
|
84
|
-
[
|
|
85
|
-
.0557,
|
|
86
|
-
-.204,
|
|
87
|
-
1.057
|
|
88
|
-
]
|
|
89
|
-
];
|
|
90
|
-
var srgbForwardTransform = (C) => C <= .0031308 ? C * 12.92 : 1.055 * C ** (1 / 2.4) - .055;
|
|
91
|
-
var srgbReverseMatrix = [
|
|
92
|
-
[
|
|
93
|
-
.4124,
|
|
94
|
-
.3576,
|
|
95
|
-
.1805
|
|
96
|
-
],
|
|
97
|
-
[
|
|
98
|
-
.2126,
|
|
99
|
-
.7152,
|
|
100
|
-
.0722
|
|
101
|
-
],
|
|
102
|
-
[
|
|
103
|
-
.0193,
|
|
104
|
-
.1192,
|
|
105
|
-
.9505
|
|
106
|
-
]
|
|
107
|
-
];
|
|
108
|
-
var srgbReverseTransform = (C) => C <= .04045 ? C / 12.92 : ((C + .055) / 1.055) ** 2.4;
|
|
109
|
-
function fromXYZ(xyz) {
|
|
110
|
-
const rgb = Array(3);
|
|
111
|
-
const transform = srgbForwardTransform;
|
|
112
|
-
const matrix = srgbForwardMatrix;
|
|
113
|
-
for (let i = 0; i < 3; ++i) rgb[i] = Math.round(clamp(transform(matrix[i][0] * xyz[0] + matrix[i][1] * xyz[1] + matrix[i][2] * xyz[2])) * 255);
|
|
114
|
-
return {
|
|
115
|
-
r: rgb[0],
|
|
116
|
-
g: rgb[1],
|
|
117
|
-
b: rgb[2]
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
function toXYZ({ r, g, b }) {
|
|
121
|
-
const xyz = [
|
|
122
|
-
0,
|
|
123
|
-
0,
|
|
124
|
-
0
|
|
125
|
-
];
|
|
126
|
-
const transform = srgbReverseTransform;
|
|
127
|
-
const matrix = srgbReverseMatrix;
|
|
128
|
-
r = transform(r / 255);
|
|
129
|
-
g = transform(g / 255);
|
|
130
|
-
b = transform(b / 255);
|
|
131
|
-
for (let i = 0; i < 3; ++i) xyz[i] = matrix[i][0] * r + matrix[i][1] * g + matrix[i][2] * b;
|
|
132
|
-
return xyz;
|
|
133
|
-
}
|
|
134
|
-
//#endregion
|
|
135
|
-
//#region ../../../../node_modules/vuetify/lib/util/colorUtils.js
|
|
136
|
-
function isCssColor(color) {
|
|
137
|
-
return !!color && /^(#|var\(--|(rgb|hsl)a?\()/.test(color);
|
|
138
|
-
}
|
|
139
|
-
function isParsableColor(color) {
|
|
140
|
-
return isCssColor(color) && !/^((rgb|hsl)a?\()?var\(--/.test(color);
|
|
141
|
-
}
|
|
142
|
-
var cssColorRe = /^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/;
|
|
143
|
-
var mappers = {
|
|
144
|
-
rgb: (r, g, b, a) => ({
|
|
145
|
-
r,
|
|
146
|
-
g,
|
|
147
|
-
b,
|
|
148
|
-
a
|
|
149
|
-
}),
|
|
150
|
-
rgba: (r, g, b, a) => ({
|
|
151
|
-
r,
|
|
152
|
-
g,
|
|
153
|
-
b,
|
|
154
|
-
a
|
|
155
|
-
}),
|
|
156
|
-
hsl: (h, s, l, a) => HSLtoRGB({
|
|
157
|
-
h,
|
|
158
|
-
s,
|
|
159
|
-
l,
|
|
160
|
-
a
|
|
161
|
-
}),
|
|
162
|
-
hsla: (h, s, l, a) => HSLtoRGB({
|
|
163
|
-
h,
|
|
164
|
-
s,
|
|
165
|
-
l,
|
|
166
|
-
a
|
|
167
|
-
}),
|
|
168
|
-
hsv: (h, s, v, a) => HSVtoRGB({
|
|
169
|
-
h,
|
|
170
|
-
s,
|
|
171
|
-
v,
|
|
172
|
-
a
|
|
173
|
-
}),
|
|
174
|
-
hsva: (h, s, v, a) => HSVtoRGB({
|
|
175
|
-
h,
|
|
176
|
-
s,
|
|
177
|
-
v,
|
|
178
|
-
a
|
|
179
|
-
})
|
|
180
|
-
};
|
|
181
|
-
function parseColor(color) {
|
|
182
|
-
if (typeof color === "number") {
|
|
183
|
-
if (isNaN(color) || color < 0 || color > 16777215) consoleWarn(`'${color}' is not a valid hex color`);
|
|
184
|
-
return {
|
|
185
|
-
r: (color & 16711680) >> 16,
|
|
186
|
-
g: (color & 65280) >> 8,
|
|
187
|
-
b: color & 255
|
|
188
|
-
};
|
|
189
|
-
} else if (typeof color === "string" && cssColorRe.test(color)) {
|
|
190
|
-
const { groups } = color.match(cssColorRe);
|
|
191
|
-
const { fn, values } = groups;
|
|
192
|
-
const realValues = values.split(/,\s*|\s*\/\s*|\s+/).map((v, i) => {
|
|
193
|
-
if (v.endsWith("%") || i > 0 && i < 3 && [
|
|
194
|
-
"hsl",
|
|
195
|
-
"hsla",
|
|
196
|
-
"hsv",
|
|
197
|
-
"hsva"
|
|
198
|
-
].includes(fn)) return parseFloat(v) / 100;
|
|
199
|
-
else return parseFloat(v);
|
|
200
|
-
});
|
|
201
|
-
return mappers[fn](...realValues);
|
|
202
|
-
} else if (typeof color === "string") {
|
|
203
|
-
let hex = color.startsWith("#") ? color.slice(1) : color;
|
|
204
|
-
if ([3, 4].includes(hex.length)) hex = hex.split("").map((char) => char + char).join("");
|
|
205
|
-
else if (![6, 8].includes(hex.length)) consoleWarn(`'${color}' is not a valid hex(a) color`);
|
|
206
|
-
const int = parseInt(hex, 16);
|
|
207
|
-
if (isNaN(int) || int < 0 || int > 4294967295) consoleWarn(`'${color}' is not a valid hex(a) color`);
|
|
208
|
-
return HexToRGB(hex);
|
|
209
|
-
} else if (typeof color === "object") {
|
|
210
|
-
if (has(color, [
|
|
211
|
-
"r",
|
|
212
|
-
"g",
|
|
213
|
-
"b"
|
|
214
|
-
])) return color;
|
|
215
|
-
else if (has(color, [
|
|
216
|
-
"h",
|
|
217
|
-
"s",
|
|
218
|
-
"l"
|
|
219
|
-
])) return HSVtoRGB(HSLtoHSV(color));
|
|
220
|
-
else if (has(color, [
|
|
221
|
-
"h",
|
|
222
|
-
"s",
|
|
223
|
-
"v"
|
|
224
|
-
])) return HSVtoRGB(color);
|
|
225
|
-
}
|
|
226
|
-
throw new TypeError(`Invalid color: ${color == null ? color : String(color) || color.constructor.name}\nExpected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`);
|
|
227
|
-
}
|
|
228
|
-
/** Converts HSVA to RGBA. Based on formula from https://en.wikipedia.org/wiki/HSL_and_HSV */
|
|
229
|
-
function HSVtoRGB(hsva) {
|
|
230
|
-
const { h, s, v, a } = hsva;
|
|
231
|
-
const f = (n) => {
|
|
232
|
-
const k = (n + h / 60) % 6;
|
|
233
|
-
return v - v * s * Math.max(Math.min(k, 4 - k, 1), 0);
|
|
234
|
-
};
|
|
235
|
-
const rgb = [
|
|
236
|
-
f(5),
|
|
237
|
-
f(3),
|
|
238
|
-
f(1)
|
|
239
|
-
].map((v) => Math.round(v * 255));
|
|
240
|
-
return {
|
|
241
|
-
r: rgb[0],
|
|
242
|
-
g: rgb[1],
|
|
243
|
-
b: rgb[2],
|
|
244
|
-
a
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
function HSLtoRGB(hsla) {
|
|
248
|
-
return HSVtoRGB(HSLtoHSV(hsla));
|
|
249
|
-
}
|
|
250
|
-
/** Converts RGBA to HSVA. Based on formula from https://en.wikipedia.org/wiki/HSL_and_HSV */
|
|
251
|
-
function RGBtoHSV(rgba) {
|
|
252
|
-
if (!rgba) return {
|
|
253
|
-
h: 0,
|
|
254
|
-
s: 1,
|
|
255
|
-
v: 1,
|
|
256
|
-
a: 1
|
|
257
|
-
};
|
|
258
|
-
const r = rgba.r / 255;
|
|
259
|
-
const g = rgba.g / 255;
|
|
260
|
-
const b = rgba.b / 255;
|
|
261
|
-
const max = Math.max(r, g, b);
|
|
262
|
-
const min = Math.min(r, g, b);
|
|
263
|
-
let h = 0;
|
|
264
|
-
if (max !== min) {
|
|
265
|
-
if (max === r) h = 60 * (0 + (g - b) / (max - min));
|
|
266
|
-
else if (max === g) h = 60 * (2 + (b - r) / (max - min));
|
|
267
|
-
else if (max === b) h = 60 * (4 + (r - g) / (max - min));
|
|
268
|
-
}
|
|
269
|
-
if (h < 0) h = h + 360;
|
|
270
|
-
const s = max === 0 ? 0 : (max - min) / max;
|
|
271
|
-
const hsv = [
|
|
272
|
-
h,
|
|
273
|
-
s,
|
|
274
|
-
max
|
|
275
|
-
];
|
|
276
|
-
return {
|
|
277
|
-
h: hsv[0],
|
|
278
|
-
s: hsv[1],
|
|
279
|
-
v: hsv[2],
|
|
280
|
-
a: rgba.a
|
|
281
|
-
};
|
|
282
|
-
}
|
|
283
|
-
function HSVtoHSL(hsva) {
|
|
284
|
-
const { h, s, v, a } = hsva;
|
|
285
|
-
const l = v - v * s / 2;
|
|
286
|
-
return {
|
|
287
|
-
h,
|
|
288
|
-
s: l === 1 || l === 0 ? 0 : (v - l) / Math.min(l, 1 - l),
|
|
289
|
-
l,
|
|
290
|
-
a
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
function HSLtoHSV(hsl) {
|
|
294
|
-
const { h, s, l, a } = hsl;
|
|
295
|
-
const v = l + s * Math.min(l, 1 - l);
|
|
296
|
-
return {
|
|
297
|
-
h,
|
|
298
|
-
s: v === 0 ? 0 : 2 - 2 * l / v,
|
|
299
|
-
v,
|
|
300
|
-
a
|
|
301
|
-
};
|
|
302
|
-
}
|
|
303
|
-
function RGBtoCSS({ r, g, b, a }) {
|
|
304
|
-
return a === void 0 ? `rgb(${r}, ${g}, ${b})` : `rgba(${r}, ${g}, ${b}, ${a})`;
|
|
305
|
-
}
|
|
306
|
-
function HSVtoCSS(hsva) {
|
|
307
|
-
return RGBtoCSS(HSVtoRGB(hsva));
|
|
308
|
-
}
|
|
309
|
-
function toHex(v) {
|
|
310
|
-
const h = Math.round(v).toString(16);
|
|
311
|
-
return ("00".substr(0, 2 - h.length) + h).toUpperCase();
|
|
312
|
-
}
|
|
313
|
-
function RGBtoHex({ r, g, b, a }) {
|
|
314
|
-
return `#${[
|
|
315
|
-
toHex(r),
|
|
316
|
-
toHex(g),
|
|
317
|
-
toHex(b),
|
|
318
|
-
a !== void 0 ? toHex(Math.round(a * 255)) : ""
|
|
319
|
-
].join("")}`;
|
|
320
|
-
}
|
|
321
|
-
function HexToRGB(hex) {
|
|
322
|
-
hex = parseHex(hex);
|
|
323
|
-
let [r, g, b, a] = chunk(hex, 2).map((c) => parseInt(c, 16));
|
|
324
|
-
a = a === void 0 ? a : a / 255;
|
|
325
|
-
return {
|
|
326
|
-
r,
|
|
327
|
-
g,
|
|
328
|
-
b,
|
|
329
|
-
a
|
|
330
|
-
};
|
|
331
|
-
}
|
|
332
|
-
function HexToHSV(hex) {
|
|
333
|
-
return RGBtoHSV(HexToRGB(hex));
|
|
334
|
-
}
|
|
335
|
-
function HSVtoHex(hsva) {
|
|
336
|
-
return RGBtoHex(HSVtoRGB(hsva));
|
|
337
|
-
}
|
|
338
|
-
function parseHex(hex) {
|
|
339
|
-
if (hex.startsWith("#")) hex = hex.slice(1);
|
|
340
|
-
hex = hex.replace(/([^0-9a-f])/gi, "F");
|
|
341
|
-
if (hex.length === 3 || hex.length === 4) hex = hex.split("").map((x) => x + x).join("");
|
|
342
|
-
if (hex.length !== 6) hex = padEnd(padEnd(hex, 6), 8, "F");
|
|
343
|
-
return hex;
|
|
344
|
-
}
|
|
345
|
-
function lighten(value, amount) {
|
|
346
|
-
const lab = fromXYZ$1(toXYZ(value));
|
|
347
|
-
lab[0] = lab[0] + amount * 10;
|
|
348
|
-
return fromXYZ(toXYZ$1(lab));
|
|
349
|
-
}
|
|
350
|
-
function darken(value, amount) {
|
|
351
|
-
const lab = fromXYZ$1(toXYZ(value));
|
|
352
|
-
lab[0] = lab[0] - amount * 10;
|
|
353
|
-
return fromXYZ(toXYZ$1(lab));
|
|
354
|
-
}
|
|
355
|
-
/**
|
|
356
|
-
* Calculate the relative luminance of a given color
|
|
357
|
-
* @see https://www.w3.org/TR/WCAG20/#relativeluminancedef
|
|
358
|
-
*/
|
|
359
|
-
function getLuma(color) {
|
|
360
|
-
return toXYZ(parseColor(color))[1];
|
|
361
|
-
}
|
|
362
|
-
/**
|
|
363
|
-
* Returns the contrast ratio (1-21) between two colors.
|
|
364
|
-
* @see https://www.w3.org/TR/WCAG20/#contrast-ratiodef
|
|
365
|
-
*/
|
|
366
|
-
function getContrast(first, second) {
|
|
367
|
-
const l1 = getLuma(first);
|
|
368
|
-
const l2 = getLuma(second);
|
|
369
|
-
const light = Math.max(l1, l2);
|
|
370
|
-
const dark = Math.min(l1, l2);
|
|
371
|
-
return (light + .05) / (dark + .05);
|
|
372
|
-
}
|
|
373
|
-
function hasLightForeground(color) {
|
|
374
|
-
const blackContrast = Math.abs(APCAcontrast(parseColor(0), parseColor(color)));
|
|
375
|
-
return Math.abs(APCAcontrast(parseColor(16777215), parseColor(color))) > Math.min(blackContrast, 50);
|
|
376
|
-
}
|
|
377
|
-
//#endregion
|
|
378
|
-
//#region ../../../../node_modules/vuetify/lib/util/easing.js
|
|
379
|
-
var standardEasing = "cubic-bezier(0.4, 0, 0.2, 1)";
|
|
380
|
-
var deceleratedEasing = "cubic-bezier(0.0, 0, 0.2, 1)";
|
|
381
|
-
var acceleratedEasing = "cubic-bezier(0.4, 0, 1, 1)";
|
|
382
|
-
var easingPatterns = {
|
|
383
|
-
linear: (t) => t,
|
|
384
|
-
easeInQuad: (t) => t ** 2,
|
|
385
|
-
easeOutQuad: (t) => t * (2 - t),
|
|
386
|
-
easeInOutQuad: (t) => t < .5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t,
|
|
387
|
-
easeInCubic: (t) => t ** 3,
|
|
388
|
-
easeOutCubic: (t) => --t ** 3 + 1,
|
|
389
|
-
easeInOutCubic: (t) => t < .5 ? 4 * t ** 3 : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1,
|
|
390
|
-
easeInQuart: (t) => t ** 4,
|
|
391
|
-
easeOutQuart: (t) => 1 - --t ** 4,
|
|
392
|
-
easeInOutQuart: (t) => t < .5 ? 8 * t ** 4 : 1 - 8 * --t ** 4,
|
|
393
|
-
easeInQuint: (t) => t ** 5,
|
|
394
|
-
easeOutQuint: (t) => 1 + --t ** 5,
|
|
395
|
-
easeInOutQuint: (t) => t < .5 ? 16 * t ** 5 : 1 + 16 * --t ** 5,
|
|
396
|
-
instant: (t) => 1
|
|
397
|
-
};
|
|
398
|
-
//#endregion
|
|
399
|
-
//#region ../../../../node_modules/vuetify/lib/composables/toggleScope.js
|
|
400
|
-
function useToggleScope(source, fn) {
|
|
401
|
-
let scope;
|
|
402
|
-
function start() {
|
|
403
|
-
scope = effectScope();
|
|
404
|
-
scope.run(() => fn.length ? fn(() => {
|
|
405
|
-
scope?.stop();
|
|
406
|
-
start();
|
|
407
|
-
}) : fn());
|
|
408
|
-
}
|
|
409
|
-
watch(source, (active) => {
|
|
410
|
-
if (active && !scope) start();
|
|
411
|
-
else if (!active) {
|
|
412
|
-
scope?.stop();
|
|
413
|
-
scope = void 0;
|
|
414
|
-
}
|
|
415
|
-
}, { immediate: true });
|
|
416
|
-
onScopeDispose(() => {
|
|
417
|
-
scope?.stop();
|
|
418
|
-
});
|
|
419
|
-
}
|
|
420
|
-
//#endregion
|
|
421
|
-
//#region ../../../../node_modules/vuetify/lib/composables/proxiedModel.js
|
|
422
|
-
function useProxiedModel(props, prop, defaultValue, transformIn = (v) => v, transformOut = (v) => v) {
|
|
423
|
-
const vm = getCurrentInstance("useProxiedModel");
|
|
424
|
-
const internal = ref(props[prop] !== void 0 ? props[prop] : defaultValue);
|
|
425
|
-
const kebabProp = toKebabCase(prop);
|
|
426
|
-
const isControlled = kebabProp !== prop ? computed(() => {
|
|
427
|
-
props[prop];
|
|
428
|
-
return !!((vm.vnode.props?.hasOwnProperty(prop) || vm.vnode.props?.hasOwnProperty(kebabProp)) && (vm.vnode.props?.hasOwnProperty(`onUpdate:${prop}`) || vm.vnode.props?.hasOwnProperty(`onUpdate:${kebabProp}`)));
|
|
429
|
-
}) : computed(() => {
|
|
430
|
-
props[prop];
|
|
431
|
-
return !!(vm.vnode.props?.hasOwnProperty(prop) && vm.vnode.props?.hasOwnProperty(`onUpdate:${prop}`));
|
|
432
|
-
});
|
|
433
|
-
useToggleScope(() => !isControlled.value, () => {
|
|
434
|
-
watch(() => props[prop], (val) => {
|
|
435
|
-
internal.value = val;
|
|
436
|
-
});
|
|
437
|
-
});
|
|
438
|
-
const model = computed({
|
|
439
|
-
get() {
|
|
440
|
-
const externalValue = props[prop];
|
|
441
|
-
return transformIn(isControlled.value ? externalValue : internal.value);
|
|
442
|
-
},
|
|
443
|
-
set(internalValue) {
|
|
444
|
-
const newValue = transformOut(internalValue);
|
|
445
|
-
const value = toRaw(isControlled.value ? props[prop] : internal.value);
|
|
446
|
-
if (value === newValue || transformIn(value) === internalValue) return;
|
|
447
|
-
internal.value = newValue;
|
|
448
|
-
vm?.emit(`update:${prop}`, newValue);
|
|
449
|
-
}
|
|
450
|
-
});
|
|
451
|
-
Object.defineProperty(model, "externalValue", { get: () => isControlled.value ? props[prop] : internal.value });
|
|
452
|
-
return model;
|
|
453
|
-
}
|
|
454
|
-
//#endregion
|
|
455
|
-
//#region ../../../../node_modules/vuetify/lib/locale/en.js
|
|
456
|
-
var en_default = {
|
|
457
|
-
badge: "Badge",
|
|
458
|
-
open: "Open",
|
|
459
|
-
close: "Close",
|
|
460
|
-
dismiss: "Dismiss",
|
|
461
|
-
confirmEdit: {
|
|
462
|
-
ok: "OK",
|
|
463
|
-
cancel: "Cancel"
|
|
464
|
-
},
|
|
465
|
-
dataIterator: {
|
|
466
|
-
noResultsText: "No matching records found",
|
|
467
|
-
loadingText: "Loading items..."
|
|
468
|
-
},
|
|
469
|
-
dataTable: {
|
|
470
|
-
itemsPerPageText: "Rows per page:",
|
|
471
|
-
ariaLabel: {
|
|
472
|
-
sortDescending: "Sorted descending.",
|
|
473
|
-
sortAscending: "Sorted ascending.",
|
|
474
|
-
sortNone: "Not sorted.",
|
|
475
|
-
activateNone: "Activate to remove sorting.",
|
|
476
|
-
activateDescending: "Activate to sort descending.",
|
|
477
|
-
activateAscending: "Activate to sort ascending."
|
|
478
|
-
},
|
|
479
|
-
sortBy: "Sort by"
|
|
480
|
-
},
|
|
481
|
-
dataFooter: {
|
|
482
|
-
itemsPerPageText: "Items per page:",
|
|
483
|
-
itemsPerPageAll: "All",
|
|
484
|
-
nextPage: "Next page",
|
|
485
|
-
prevPage: "Previous page",
|
|
486
|
-
firstPage: "First page",
|
|
487
|
-
lastPage: "Last page",
|
|
488
|
-
pageText: "{0}-{1} of {2}"
|
|
489
|
-
},
|
|
490
|
-
dateRangeInput: { divider: "to" },
|
|
491
|
-
datePicker: {
|
|
492
|
-
itemsSelected: "{0} selected",
|
|
493
|
-
range: {
|
|
494
|
-
title: "Select dates",
|
|
495
|
-
header: "Enter dates"
|
|
496
|
-
},
|
|
497
|
-
title: "Select date",
|
|
498
|
-
header: "Enter date",
|
|
499
|
-
input: { placeholder: "Enter date" },
|
|
500
|
-
ariaLabel: {
|
|
501
|
-
previousMonth: "Previous month",
|
|
502
|
-
nextMonth: "Next month",
|
|
503
|
-
selectYear: "Select year",
|
|
504
|
-
previousYear: "Previous year",
|
|
505
|
-
nextYear: "Next year",
|
|
506
|
-
selectMonth: "Select month",
|
|
507
|
-
selectDate: "{0}",
|
|
508
|
-
currentDate: "Today, {0}"
|
|
509
|
-
}
|
|
510
|
-
},
|
|
511
|
-
noDataText: "No data available",
|
|
512
|
-
carousel: {
|
|
513
|
-
prev: "Previous visual",
|
|
514
|
-
next: "Next visual",
|
|
515
|
-
ariaLabel: { delimiter: "Carousel slide {0} of {1}" }
|
|
516
|
-
},
|
|
517
|
-
calendar: {
|
|
518
|
-
moreEvents: "{0} more",
|
|
519
|
-
today: "Today"
|
|
520
|
-
},
|
|
521
|
-
input: {
|
|
522
|
-
clear: "Clear {0}",
|
|
523
|
-
prependAction: "{0} prepended action",
|
|
524
|
-
appendAction: "{0} appended action",
|
|
525
|
-
otp: "Please enter OTP character {0}"
|
|
526
|
-
},
|
|
527
|
-
fileInput: {
|
|
528
|
-
counter: "{0} files",
|
|
529
|
-
counterSize: "{0} files ({1} in total)"
|
|
530
|
-
},
|
|
531
|
-
fileUpload: {
|
|
532
|
-
title: "Drag and drop files here",
|
|
533
|
-
divider: "or",
|
|
534
|
-
browse: "Browse Files"
|
|
535
|
-
},
|
|
536
|
-
timePicker: {
|
|
537
|
-
am: "AM",
|
|
538
|
-
pm: "PM",
|
|
539
|
-
title: "Select Time",
|
|
540
|
-
hour: "Hour",
|
|
541
|
-
minute: "Minute",
|
|
542
|
-
second: "Second",
|
|
543
|
-
notAllowed: "Value is not allowed"
|
|
544
|
-
},
|
|
545
|
-
pagination: { ariaLabel: {
|
|
546
|
-
root: "Pagination Navigation",
|
|
547
|
-
next: "Next page",
|
|
548
|
-
previous: "Previous page",
|
|
549
|
-
page: "Go to page {0}",
|
|
550
|
-
currentPage: "Page {0}, Current page",
|
|
551
|
-
first: "First page",
|
|
552
|
-
last: "Last page"
|
|
553
|
-
} },
|
|
554
|
-
stepper: {
|
|
555
|
-
next: "Next",
|
|
556
|
-
prev: "Previous"
|
|
557
|
-
},
|
|
558
|
-
rating: { ariaLabel: { item: "Rating {0} of {1}" } },
|
|
559
|
-
loading: "Loading...",
|
|
560
|
-
infiniteScroll: {
|
|
561
|
-
loadMore: "Load more",
|
|
562
|
-
empty: "No more"
|
|
563
|
-
},
|
|
564
|
-
rules: {
|
|
565
|
-
required: "This field is required",
|
|
566
|
-
email: "Please enter a valid email",
|
|
567
|
-
number: "This field can only contain numbers",
|
|
568
|
-
integer: "This field can only contain integer values",
|
|
569
|
-
capital: "This field can only contain uppercase letters",
|
|
570
|
-
maxLength: "You must enter a maximum of {0} characters",
|
|
571
|
-
minLength: "You must enter a minimum of {0} characters",
|
|
572
|
-
strictLength: "The length of the entered field is invalid",
|
|
573
|
-
exclude: "The {0} character is not allowed",
|
|
574
|
-
notEmpty: "Please choose at least one value",
|
|
575
|
-
pattern: "Invalid format"
|
|
576
|
-
},
|
|
577
|
-
command: { search: "Type a command or search..." },
|
|
578
|
-
hotkey: {
|
|
579
|
-
then: "then",
|
|
580
|
-
ctrl: "Ctrl",
|
|
581
|
-
command: "Command",
|
|
582
|
-
space: "Space",
|
|
583
|
-
shift: "Shift",
|
|
584
|
-
alt: "Alt",
|
|
585
|
-
enter: "Enter",
|
|
586
|
-
escape: "Escape",
|
|
587
|
-
upArrow: "Up Arrow",
|
|
588
|
-
downArrow: "Down Arrow",
|
|
589
|
-
leftArrow: "Left Arrow",
|
|
590
|
-
rightArrow: "Right Arrow",
|
|
591
|
-
backspace: "Backspace",
|
|
592
|
-
option: "Option",
|
|
593
|
-
plus: "plus",
|
|
594
|
-
shortcut: "Keyboard shortcut: {0}",
|
|
595
|
-
or: "or"
|
|
596
|
-
},
|
|
597
|
-
video: {
|
|
598
|
-
play: "Play",
|
|
599
|
-
pause: "Pause",
|
|
600
|
-
seek: "Seek",
|
|
601
|
-
volume: "Volume",
|
|
602
|
-
showVolume: "Show volume control",
|
|
603
|
-
mute: "Mute",
|
|
604
|
-
unmute: "Unmute",
|
|
605
|
-
enterFullscreen: "Full screen",
|
|
606
|
-
exitFullscreen: "Exit full screen"
|
|
607
|
-
},
|
|
608
|
-
colorPicker: { ariaLabel: {
|
|
609
|
-
eyedropper: "Select color with eyedropper",
|
|
610
|
-
hueSlider: "Hue",
|
|
611
|
-
alphaSlider: "Alpha",
|
|
612
|
-
redInput: "Red value",
|
|
613
|
-
greenInput: "Green value",
|
|
614
|
-
blueInput: "Blue value",
|
|
615
|
-
alphaInput: "Alpha value",
|
|
616
|
-
hueInput: "Hue value",
|
|
617
|
-
saturationInput: "Saturation value",
|
|
618
|
-
lightnessInput: "Lightness value",
|
|
619
|
-
hexInput: "HEX value",
|
|
620
|
-
hexaInput: "HEX with alpha value",
|
|
621
|
-
changeFormat: "Change color format"
|
|
622
|
-
} }
|
|
623
|
-
};
|
|
624
|
-
//#endregion
|
|
625
|
-
//#region ../../../../node_modules/vuetify/lib/locale/adapters/vuetify.js
|
|
626
|
-
var LANG_PREFIX = "$vuetify.";
|
|
627
|
-
var replace = (str, params) => {
|
|
628
|
-
return str.replace(/\{(\d+)\}/g, (match, index) => {
|
|
629
|
-
return String(params[Number(index)]);
|
|
630
|
-
});
|
|
631
|
-
};
|
|
632
|
-
var createTranslateFunction = (current, fallback, messages) => {
|
|
633
|
-
return (key, ...params) => {
|
|
634
|
-
if (!key.startsWith(LANG_PREFIX)) return replace(key, params);
|
|
635
|
-
const shortKey = key.replace(LANG_PREFIX, "");
|
|
636
|
-
const currentLocale = current.value && messages.value[current.value];
|
|
637
|
-
const fallbackLocale = fallback.value && messages.value[fallback.value];
|
|
638
|
-
let str = getObjectValueByPath(currentLocale, shortKey, null);
|
|
639
|
-
if (!str) {
|
|
640
|
-
consoleWarn(`Translation key "${key}" not found in "${current.value}", trying fallback locale`);
|
|
641
|
-
str = getObjectValueByPath(fallbackLocale, shortKey, null);
|
|
642
|
-
}
|
|
643
|
-
if (!str) {
|
|
644
|
-
consoleError(`Translation key "${key}" not found in fallback`);
|
|
645
|
-
str = key;
|
|
646
|
-
}
|
|
647
|
-
if (typeof str !== "string") {
|
|
648
|
-
consoleError(`Translation key "${key}" has a non-string value`);
|
|
649
|
-
str = key;
|
|
650
|
-
}
|
|
651
|
-
return replace(str, params);
|
|
652
|
-
};
|
|
653
|
-
};
|
|
654
|
-
function createNumberFunction(current, fallback) {
|
|
655
|
-
return (value, options) => {
|
|
656
|
-
return new Intl.NumberFormat([current.value, fallback.value], options).format(value);
|
|
657
|
-
};
|
|
658
|
-
}
|
|
659
|
-
function inferDecimalSeparator(current, fallback) {
|
|
660
|
-
return createNumberFunction(current, fallback)(.1).includes(",") ? "," : ".";
|
|
661
|
-
}
|
|
662
|
-
function useProvided(props, prop, provided) {
|
|
663
|
-
const internal = useProxiedModel(props, prop, props[prop] ?? provided.value);
|
|
664
|
-
internal.value = props[prop] ?? provided.value;
|
|
665
|
-
watch(provided, (v) => {
|
|
666
|
-
if (props[prop] == null) internal.value = provided.value;
|
|
667
|
-
});
|
|
668
|
-
return internal;
|
|
669
|
-
}
|
|
670
|
-
function createProvideFunction(state) {
|
|
671
|
-
return (props) => {
|
|
672
|
-
const current = useProvided(props, "locale", state.current);
|
|
673
|
-
const fallback = useProvided(props, "fallback", state.fallback);
|
|
674
|
-
const messages = useProvided(props, "messages", state.messages);
|
|
675
|
-
return {
|
|
676
|
-
name: "vuetify",
|
|
677
|
-
current,
|
|
678
|
-
fallback,
|
|
679
|
-
messages,
|
|
680
|
-
decimalSeparator: toRef(() => inferDecimalSeparator(current, fallback)),
|
|
681
|
-
t: createTranslateFunction(current, fallback, messages),
|
|
682
|
-
n: createNumberFunction(current, fallback),
|
|
683
|
-
provide: createProvideFunction({
|
|
684
|
-
current,
|
|
685
|
-
fallback,
|
|
686
|
-
messages
|
|
687
|
-
})
|
|
688
|
-
};
|
|
689
|
-
};
|
|
690
|
-
}
|
|
691
|
-
function createVuetifyAdapter(options) {
|
|
692
|
-
const current = shallowRef(options?.locale ?? "en");
|
|
693
|
-
const fallback = shallowRef(options?.fallback ?? "en");
|
|
694
|
-
const messages = ref({
|
|
695
|
-
en: en_default,
|
|
696
|
-
...options?.messages
|
|
697
|
-
});
|
|
698
|
-
return {
|
|
699
|
-
name: "vuetify",
|
|
700
|
-
current,
|
|
701
|
-
fallback,
|
|
702
|
-
messages,
|
|
703
|
-
decimalSeparator: toRef(() => options?.decimalSeparator ?? inferDecimalSeparator(current, fallback)),
|
|
704
|
-
t: createTranslateFunction(current, fallback, messages),
|
|
705
|
-
n: createNumberFunction(current, fallback),
|
|
706
|
-
provide: createProvideFunction({
|
|
707
|
-
current,
|
|
708
|
-
fallback,
|
|
709
|
-
messages
|
|
710
|
-
})
|
|
711
|
-
};
|
|
712
|
-
}
|
|
713
|
-
//#endregion
|
|
714
|
-
//#region ../../../../node_modules/vuetify/lib/composables/locale.js
|
|
715
|
-
var LocaleSymbol = Symbol.for("vuetify:locale");
|
|
716
|
-
function isLocaleInstance(obj) {
|
|
717
|
-
return obj.name != null;
|
|
718
|
-
}
|
|
719
|
-
function createLocale(options) {
|
|
720
|
-
const i18n = options?.adapter && isLocaleInstance(options?.adapter) ? options?.adapter : createVuetifyAdapter(options);
|
|
721
|
-
const rtl = createRtl(i18n, options);
|
|
722
|
-
return {
|
|
723
|
-
...i18n,
|
|
724
|
-
...rtl
|
|
725
|
-
};
|
|
726
|
-
}
|
|
727
|
-
function useLocale() {
|
|
728
|
-
const locale = inject(LocaleSymbol);
|
|
729
|
-
if (!locale) throw new Error("[Vuetify] Could not find injected locale instance");
|
|
730
|
-
return locale;
|
|
731
|
-
}
|
|
732
|
-
function provideLocale(props) {
|
|
733
|
-
const locale = inject(LocaleSymbol);
|
|
734
|
-
if (!locale) throw new Error("[Vuetify] Could not find injected locale instance");
|
|
735
|
-
const i18n = locale.provide(props);
|
|
736
|
-
const rtl = provideRtl(i18n, locale.rtl, props);
|
|
737
|
-
const data = {
|
|
738
|
-
...i18n,
|
|
739
|
-
...rtl
|
|
740
|
-
};
|
|
741
|
-
provide(LocaleSymbol, data);
|
|
742
|
-
return data;
|
|
743
|
-
}
|
|
744
|
-
function genDefaults$1() {
|
|
745
|
-
return {
|
|
746
|
-
af: false,
|
|
747
|
-
ar: true,
|
|
748
|
-
bg: false,
|
|
749
|
-
ca: false,
|
|
750
|
-
ckb: false,
|
|
751
|
-
cs: false,
|
|
752
|
-
de: false,
|
|
753
|
-
el: false,
|
|
754
|
-
en: false,
|
|
755
|
-
es: false,
|
|
756
|
-
et: false,
|
|
757
|
-
fa: true,
|
|
758
|
-
fi: false,
|
|
759
|
-
fr: false,
|
|
760
|
-
hr: false,
|
|
761
|
-
hu: false,
|
|
762
|
-
he: true,
|
|
763
|
-
id: false,
|
|
764
|
-
it: false,
|
|
765
|
-
ja: false,
|
|
766
|
-
km: false,
|
|
767
|
-
ko: false,
|
|
768
|
-
lv: false,
|
|
769
|
-
lt: false,
|
|
770
|
-
nl: false,
|
|
771
|
-
no: false,
|
|
772
|
-
pl: false,
|
|
773
|
-
pt: false,
|
|
774
|
-
ro: false,
|
|
775
|
-
ru: false,
|
|
776
|
-
sk: false,
|
|
777
|
-
sl: false,
|
|
778
|
-
srCyrl: false,
|
|
779
|
-
srLatn: false,
|
|
780
|
-
sv: false,
|
|
781
|
-
th: false,
|
|
782
|
-
tr: false,
|
|
783
|
-
az: false,
|
|
784
|
-
uk: false,
|
|
785
|
-
vi: false,
|
|
786
|
-
zhHans: false,
|
|
787
|
-
zhHant: false
|
|
788
|
-
};
|
|
789
|
-
}
|
|
790
|
-
function createRtl(i18n, options) {
|
|
791
|
-
const rtl = ref(options?.rtl ?? genDefaults$1());
|
|
792
|
-
const isRtl = computed(() => rtl.value[i18n.current.value] ?? false);
|
|
793
|
-
return {
|
|
794
|
-
isRtl,
|
|
795
|
-
rtl,
|
|
796
|
-
rtlClasses: toRef(() => `v-locale--is-${isRtl.value ? "rtl" : "ltr"}`)
|
|
797
|
-
};
|
|
798
|
-
}
|
|
799
|
-
function provideRtl(locale, rtl, props) {
|
|
800
|
-
const isRtl = computed(() => props.rtl ?? rtl.value[locale.current.value] ?? false);
|
|
801
|
-
return {
|
|
802
|
-
isRtl,
|
|
803
|
-
rtl,
|
|
804
|
-
rtlClasses: toRef(() => `v-locale--is-${isRtl.value ? "rtl" : "ltr"}`)
|
|
805
|
-
};
|
|
806
|
-
}
|
|
807
|
-
function useRtl() {
|
|
808
|
-
const locale = inject(LocaleSymbol);
|
|
809
|
-
if (!locale) throw new Error("[Vuetify] Could not find injected rtl instance");
|
|
810
|
-
return {
|
|
811
|
-
isRtl: locale.isRtl,
|
|
812
|
-
rtlClasses: locale.rtlClasses
|
|
813
|
-
};
|
|
814
|
-
}
|
|
815
|
-
//#endregion
|
|
816
|
-
//#region ../../../../node_modules/vuetify/lib/composables/display.js
|
|
817
|
-
var breakpoints = [
|
|
818
|
-
"sm",
|
|
819
|
-
"md",
|
|
820
|
-
"lg",
|
|
821
|
-
"xl",
|
|
822
|
-
"xxl"
|
|
823
|
-
];
|
|
824
|
-
var DisplaySymbol = Symbol.for("vuetify:display");
|
|
825
|
-
var defaultDisplayOptions = {
|
|
826
|
-
mobileBreakpoint: "lg",
|
|
827
|
-
thresholds: {
|
|
828
|
-
xs: 0,
|
|
829
|
-
sm: 600,
|
|
830
|
-
md: 840,
|
|
831
|
-
lg: 1145,
|
|
832
|
-
xl: 1545,
|
|
833
|
-
xxl: 2138
|
|
834
|
-
}
|
|
835
|
-
};
|
|
836
|
-
var parseDisplayOptions = (options = defaultDisplayOptions) => {
|
|
837
|
-
return mergeDeep(defaultDisplayOptions, options);
|
|
838
|
-
};
|
|
839
|
-
function getClientWidth(ssr) {
|
|
840
|
-
return IN_BROWSER && !ssr ? window.innerWidth : typeof ssr === "object" && ssr.clientWidth || 0;
|
|
841
|
-
}
|
|
842
|
-
function getClientHeight(ssr) {
|
|
843
|
-
return IN_BROWSER && !ssr ? window.innerHeight : typeof ssr === "object" && ssr.clientHeight || 0;
|
|
844
|
-
}
|
|
845
|
-
function getPlatform(ssr) {
|
|
846
|
-
const userAgent = IN_BROWSER && !ssr ? window.navigator.userAgent : "ssr";
|
|
847
|
-
function match(regexp) {
|
|
848
|
-
return Boolean(userAgent.match(regexp));
|
|
849
|
-
}
|
|
850
|
-
return {
|
|
851
|
-
android: match(/android/i),
|
|
852
|
-
ios: match(/iphone|ipad|ipod/i),
|
|
853
|
-
cordova: match(/cordova/i),
|
|
854
|
-
electron: match(/electron/i),
|
|
855
|
-
chrome: match(/chrome/i),
|
|
856
|
-
edge: match(/edge/i),
|
|
857
|
-
firefox: match(/firefox/i),
|
|
858
|
-
opera: match(/opera/i),
|
|
859
|
-
win: match(/win/i),
|
|
860
|
-
mac: match(/mac/i),
|
|
861
|
-
linux: match(/linux/i),
|
|
862
|
-
touch: SUPPORTS_TOUCH,
|
|
863
|
-
ssr: userAgent === "ssr"
|
|
864
|
-
};
|
|
865
|
-
}
|
|
866
|
-
function createDisplay(options, ssr) {
|
|
867
|
-
const { thresholds, mobileBreakpoint } = parseDisplayOptions(options);
|
|
868
|
-
const height = shallowRef(getClientHeight(ssr));
|
|
869
|
-
const platform = shallowRef(getPlatform(ssr));
|
|
870
|
-
const state = reactive({});
|
|
871
|
-
const width = shallowRef(getClientWidth(ssr));
|
|
872
|
-
function updateSize() {
|
|
873
|
-
height.value = getClientHeight();
|
|
874
|
-
width.value = getClientWidth();
|
|
875
|
-
}
|
|
876
|
-
function update() {
|
|
877
|
-
updateSize();
|
|
878
|
-
platform.value = getPlatform();
|
|
879
|
-
}
|
|
880
|
-
watchEffect(() => {
|
|
881
|
-
const xs = width.value < thresholds.sm;
|
|
882
|
-
const sm = width.value < thresholds.md && !xs;
|
|
883
|
-
const md = width.value < thresholds.lg && !(sm || xs);
|
|
884
|
-
const lg = width.value < thresholds.xl && !(md || sm || xs);
|
|
885
|
-
const xl = width.value < thresholds.xxl && !(lg || md || sm || xs);
|
|
886
|
-
const xxl = width.value >= thresholds.xxl;
|
|
887
|
-
const name = xs ? "xs" : sm ? "sm" : md ? "md" : lg ? "lg" : xl ? "xl" : "xxl";
|
|
888
|
-
const breakpointValue = typeof mobileBreakpoint === "number" ? mobileBreakpoint : thresholds[mobileBreakpoint];
|
|
889
|
-
const mobile = width.value < breakpointValue;
|
|
890
|
-
state.xs = xs;
|
|
891
|
-
state.sm = sm;
|
|
892
|
-
state.md = md;
|
|
893
|
-
state.lg = lg;
|
|
894
|
-
state.xl = xl;
|
|
895
|
-
state.xxl = xxl;
|
|
896
|
-
state.smAndUp = !xs;
|
|
897
|
-
state.mdAndUp = !(xs || sm);
|
|
898
|
-
state.lgAndUp = !(xs || sm || md);
|
|
899
|
-
state.xlAndUp = !(xs || sm || md || lg);
|
|
900
|
-
state.smAndDown = !(md || lg || xl || xxl);
|
|
901
|
-
state.mdAndDown = !(lg || xl || xxl);
|
|
902
|
-
state.lgAndDown = !(xl || xxl);
|
|
903
|
-
state.xlAndDown = !xxl;
|
|
904
|
-
state.name = name;
|
|
905
|
-
state.height = height.value;
|
|
906
|
-
state.width = width.value;
|
|
907
|
-
state.mobile = mobile;
|
|
908
|
-
state.mobileBreakpoint = mobileBreakpoint;
|
|
909
|
-
state.platform = platform.value;
|
|
910
|
-
state.thresholds = thresholds;
|
|
911
|
-
});
|
|
912
|
-
if (IN_BROWSER) {
|
|
913
|
-
window.addEventListener("resize", updateSize, { passive: true });
|
|
914
|
-
onScopeDispose(() => {
|
|
915
|
-
window.removeEventListener("resize", updateSize);
|
|
916
|
-
}, true);
|
|
917
|
-
}
|
|
918
|
-
return {
|
|
919
|
-
...toRefs(state),
|
|
920
|
-
update,
|
|
921
|
-
ssr: !!ssr
|
|
922
|
-
};
|
|
923
|
-
}
|
|
924
|
-
var makeDisplayProps = propsFactory({
|
|
925
|
-
mobile: {
|
|
926
|
-
type: Boolean,
|
|
927
|
-
default: false
|
|
928
|
-
},
|
|
929
|
-
mobileBreakpoint: [Number, String]
|
|
930
|
-
}, "display");
|
|
931
|
-
function useDisplay(props = { mobile: null }, name = getCurrentInstanceName()) {
|
|
932
|
-
const display = inject(DisplaySymbol);
|
|
933
|
-
if (!display) throw new Error("Could not find Vuetify display injection");
|
|
934
|
-
const mobile = computed(() => {
|
|
935
|
-
if (props.mobile) return true;
|
|
936
|
-
else if (typeof props.mobileBreakpoint === "number") return display.width.value < props.mobileBreakpoint;
|
|
937
|
-
else if (props.mobileBreakpoint) return display.width.value < display.thresholds.value[props.mobileBreakpoint];
|
|
938
|
-
else if (props.mobile === null) return display.mobile.value;
|
|
939
|
-
else return false;
|
|
940
|
-
});
|
|
941
|
-
const displayClasses = toRef(() => {
|
|
942
|
-
if (!name) return {};
|
|
943
|
-
return { [`${name}--mobile`]: mobile.value };
|
|
944
|
-
});
|
|
945
|
-
return {
|
|
946
|
-
...display,
|
|
947
|
-
displayClasses,
|
|
948
|
-
mobile
|
|
949
|
-
};
|
|
950
|
-
}
|
|
951
|
-
//#endregion
|
|
952
|
-
//#region ../../../../node_modules/vuetify/lib/composables/theme.js
|
|
953
|
-
var ThemeSymbol = Symbol.for("vuetify:theme");
|
|
954
|
-
var makeThemeProps = propsFactory({ theme: String }, "theme");
|
|
955
|
-
function genDefaults() {
|
|
956
|
-
return {
|
|
957
|
-
defaultTheme: "system",
|
|
958
|
-
prefix: "v-",
|
|
959
|
-
variations: {
|
|
960
|
-
colors: [],
|
|
961
|
-
lighten: 0,
|
|
962
|
-
darken: 0
|
|
963
|
-
},
|
|
964
|
-
themes: {
|
|
965
|
-
light: {
|
|
966
|
-
dark: false,
|
|
967
|
-
colors: {
|
|
968
|
-
background: "#FFFFFF",
|
|
969
|
-
surface: "#FFFFFF",
|
|
970
|
-
"surface-bright": "#FFFFFF",
|
|
971
|
-
"surface-light": "#EEEEEE",
|
|
972
|
-
"surface-variant": "#424242",
|
|
973
|
-
"on-surface-variant": "#EEEEEE",
|
|
974
|
-
primary: "#1867C0",
|
|
975
|
-
"primary-darken-1": "#1F5592",
|
|
976
|
-
secondary: "#48A9A6",
|
|
977
|
-
"secondary-darken-1": "#018786",
|
|
978
|
-
error: "#B00020",
|
|
979
|
-
info: "#2196F3",
|
|
980
|
-
success: "#4CAF50",
|
|
981
|
-
warning: "#FB8C00"
|
|
982
|
-
},
|
|
983
|
-
variables: {
|
|
984
|
-
"border-color": "#000000",
|
|
985
|
-
"border-opacity": .12,
|
|
986
|
-
"shadow-color": "#000000",
|
|
987
|
-
"high-emphasis-opacity": .87,
|
|
988
|
-
"medium-emphasis-opacity": .6,
|
|
989
|
-
"disabled-opacity": .38,
|
|
990
|
-
"idle-opacity": .04,
|
|
991
|
-
"hover-opacity": .04,
|
|
992
|
-
"focus-opacity": .12,
|
|
993
|
-
"selected-opacity": .08,
|
|
994
|
-
"activated-opacity": .12,
|
|
995
|
-
"pressed-opacity": .12,
|
|
996
|
-
"dragged-opacity": .08,
|
|
997
|
-
"theme-kbd": "#EEEEEE",
|
|
998
|
-
"theme-on-kbd": "#000000",
|
|
999
|
-
"theme-code": "#F5F5F5",
|
|
1000
|
-
"theme-on-code": "#000000",
|
|
1001
|
-
"theme-on-dark": "#FFF",
|
|
1002
|
-
"theme-on-light": "#000",
|
|
1003
|
-
"elevation-overlay-color": "black",
|
|
1004
|
-
"elevation-overlay-opacity-step": "2%"
|
|
1005
|
-
}
|
|
1006
|
-
},
|
|
1007
|
-
dark: {
|
|
1008
|
-
dark: true,
|
|
1009
|
-
colors: {
|
|
1010
|
-
background: "#121212",
|
|
1011
|
-
surface: "#212121",
|
|
1012
|
-
"surface-bright": "#ccbfd6",
|
|
1013
|
-
"surface-light": "#424242",
|
|
1014
|
-
"surface-variant": "#c8c8c8",
|
|
1015
|
-
"on-surface-variant": "#000000",
|
|
1016
|
-
primary: "#2196F3",
|
|
1017
|
-
"primary-darken-1": "#277CC1",
|
|
1018
|
-
secondary: "#54B6B2",
|
|
1019
|
-
"secondary-darken-1": "#48A9A6",
|
|
1020
|
-
error: "#CF6679",
|
|
1021
|
-
info: "#2196F3",
|
|
1022
|
-
success: "#4CAF50",
|
|
1023
|
-
warning: "#FB8C00"
|
|
1024
|
-
},
|
|
1025
|
-
variables: {
|
|
1026
|
-
"border-color": "#FFFFFF",
|
|
1027
|
-
"border-opacity": .12,
|
|
1028
|
-
"shadow-color": "#000000",
|
|
1029
|
-
"high-emphasis-opacity": 1,
|
|
1030
|
-
"medium-emphasis-opacity": .7,
|
|
1031
|
-
"disabled-opacity": .5,
|
|
1032
|
-
"idle-opacity": .1,
|
|
1033
|
-
"hover-opacity": .04,
|
|
1034
|
-
"focus-opacity": .12,
|
|
1035
|
-
"selected-opacity": .08,
|
|
1036
|
-
"activated-opacity": .12,
|
|
1037
|
-
"pressed-opacity": .16,
|
|
1038
|
-
"dragged-opacity": .08,
|
|
1039
|
-
"theme-kbd": "#424242",
|
|
1040
|
-
"theme-on-kbd": "#FFFFFF",
|
|
1041
|
-
"theme-code": "#343434",
|
|
1042
|
-
"theme-on-code": "#CCCCCC",
|
|
1043
|
-
"theme-on-dark": "#FFF",
|
|
1044
|
-
"theme-on-light": "#000",
|
|
1045
|
-
"elevation-overlay-color": "white",
|
|
1046
|
-
"elevation-overlay-opacity-step": "2%"
|
|
1047
|
-
}
|
|
1048
|
-
}
|
|
1049
|
-
},
|
|
1050
|
-
stylesheetId: "vuetify-theme-stylesheet",
|
|
1051
|
-
scoped: false,
|
|
1052
|
-
utilities: true
|
|
1053
|
-
};
|
|
1054
|
-
}
|
|
1055
|
-
function parseThemeOptions(options = genDefaults()) {
|
|
1056
|
-
const defaults = genDefaults();
|
|
1057
|
-
if (!options) return {
|
|
1058
|
-
...defaults,
|
|
1059
|
-
isDisabled: true
|
|
1060
|
-
};
|
|
1061
|
-
return mergeDeep(defaults, options);
|
|
1062
|
-
}
|
|
1063
|
-
function createCssClass(lines, selector, content, scope) {
|
|
1064
|
-
lines.push(`${getScopedSelector(selector, scope)} {\n`, ...content.map((line) => ` ${line};\n`), "}\n");
|
|
1065
|
-
}
|
|
1066
|
-
function genCssVariables(theme, prefix) {
|
|
1067
|
-
const lightOverlay = theme.dark ? 2 : 1;
|
|
1068
|
-
const darkOverlay = theme.dark ? 1 : 2;
|
|
1069
|
-
const variables = [];
|
|
1070
|
-
for (const [key, value] of Object.entries(theme.colors)) {
|
|
1071
|
-
const rgb = parseColor(value);
|
|
1072
|
-
variables.push(`--${prefix}theme-${key}: ${rgb.r},${rgb.g},${rgb.b}` + (rgb.a == null ? "" : `,${rgb.a}`));
|
|
1073
|
-
if (!key.startsWith("on-")) variables.push(`--${prefix}theme-${key}-overlay-multiplier: ${getLuma(value) > .18 ? lightOverlay : darkOverlay}`);
|
|
1074
|
-
}
|
|
1075
|
-
for (const [key, value] of Object.entries(theme.variables)) {
|
|
1076
|
-
const color = typeof value === "string" && value.startsWith("#") ? parseColor(value) : void 0;
|
|
1077
|
-
const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : void 0;
|
|
1078
|
-
variables.push(`--${prefix}${key}: ${rgb ?? value}`);
|
|
1079
|
-
}
|
|
1080
|
-
return variables;
|
|
1081
|
-
}
|
|
1082
|
-
function genVariation(name, color, variations) {
|
|
1083
|
-
const object = {};
|
|
1084
|
-
if (variations) for (const variation of ["lighten", "darken"]) {
|
|
1085
|
-
const fn = variation === "lighten" ? lighten : darken;
|
|
1086
|
-
for (const amount of createRange(variations[variation], 1)) object[`${name}-${variation}-${amount}`] = RGBtoHex(fn(parseColor(color), amount));
|
|
1087
|
-
}
|
|
1088
|
-
return object;
|
|
1089
|
-
}
|
|
1090
|
-
function genVariations(colors, variations) {
|
|
1091
|
-
if (!variations) return {};
|
|
1092
|
-
let variationColors = {};
|
|
1093
|
-
for (const name of variations.colors) {
|
|
1094
|
-
const color = colors[name];
|
|
1095
|
-
if (!color) continue;
|
|
1096
|
-
variationColors = {
|
|
1097
|
-
...variationColors,
|
|
1098
|
-
...genVariation(name, color, variations)
|
|
1099
|
-
};
|
|
1100
|
-
}
|
|
1101
|
-
return variationColors;
|
|
1102
|
-
}
|
|
1103
|
-
function genOnColors(colors, variables) {
|
|
1104
|
-
const onColors = {};
|
|
1105
|
-
for (const color of Object.keys(colors)) {
|
|
1106
|
-
if (color.startsWith("on-") || colors[`on-${color}`]) continue;
|
|
1107
|
-
const onColor = `on-${color}`;
|
|
1108
|
-
onColors[onColor] = hasLightForeground(parseColor(colors[color])) ? variables["theme-on-dark"] : variables["theme-on-light"];
|
|
1109
|
-
}
|
|
1110
|
-
return onColors;
|
|
1111
|
-
}
|
|
1112
|
-
function getScopedSelector(selector, scope) {
|
|
1113
|
-
if (!scope) return selector;
|
|
1114
|
-
const scopeSelector = `:where(${scope})`;
|
|
1115
|
-
return selector === ":root" ? scopeSelector : `${scopeSelector} ${selector}`;
|
|
1116
|
-
}
|
|
1117
|
-
function upsertStyles(id, cspNonce, styles) {
|
|
1118
|
-
const styleEl = getOrCreateStyleElement(id, cspNonce);
|
|
1119
|
-
if (!styleEl) return;
|
|
1120
|
-
styleEl.innerHTML = styles;
|
|
1121
|
-
}
|
|
1122
|
-
function getOrCreateStyleElement(id, cspNonce) {
|
|
1123
|
-
if (!IN_BROWSER) return null;
|
|
1124
|
-
let style = document.getElementById(id);
|
|
1125
|
-
if (!style) {
|
|
1126
|
-
style = document.createElement("style");
|
|
1127
|
-
style.id = id;
|
|
1128
|
-
style.type = "text/css";
|
|
1129
|
-
if (cspNonce) style.setAttribute("nonce", cspNonce);
|
|
1130
|
-
document.head.appendChild(style);
|
|
1131
|
-
}
|
|
1132
|
-
return style;
|
|
1133
|
-
}
|
|
1134
|
-
function createTheme(options) {
|
|
1135
|
-
const parsedOptions = parseThemeOptions(options);
|
|
1136
|
-
const _name = shallowRef(parsedOptions.defaultTheme);
|
|
1137
|
-
const themes = ref(parsedOptions.themes);
|
|
1138
|
-
const systemName = shallowRef("light");
|
|
1139
|
-
const name = computed({
|
|
1140
|
-
get() {
|
|
1141
|
-
return _name.value === "system" ? systemName.value : _name.value;
|
|
1142
|
-
},
|
|
1143
|
-
set(val) {
|
|
1144
|
-
_name.value = val;
|
|
1145
|
-
}
|
|
1146
|
-
});
|
|
1147
|
-
const computedThemes = computed(() => {
|
|
1148
|
-
const acc = {};
|
|
1149
|
-
for (const [name, original] of Object.entries(themes.value)) {
|
|
1150
|
-
const defaultTheme = original.dark || name === "dark" ? themes.value.dark : themes.value.light;
|
|
1151
|
-
const merged = mergeDeep(defaultTheme, original);
|
|
1152
|
-
const colors = {
|
|
1153
|
-
...merged.colors,
|
|
1154
|
-
...genVariations(merged.colors, parsedOptions.variations)
|
|
1155
|
-
};
|
|
1156
|
-
acc[name] = {
|
|
1157
|
-
...merged,
|
|
1158
|
-
colors: {
|
|
1159
|
-
...colors,
|
|
1160
|
-
...genOnColors(colors, merged.variables)
|
|
1161
|
-
}
|
|
1162
|
-
};
|
|
1163
|
-
}
|
|
1164
|
-
return acc;
|
|
1165
|
-
});
|
|
1166
|
-
const current = toRef(() => computedThemes.value[name.value]);
|
|
1167
|
-
const isSystem = toRef(() => _name.value === "system");
|
|
1168
|
-
const styles = computed(() => {
|
|
1169
|
-
const lines = [];
|
|
1170
|
-
const scoped = parsedOptions.scoped ? parsedOptions.prefix : "";
|
|
1171
|
-
lines.push("@layer theme-base {\n");
|
|
1172
|
-
if (current.value?.dark) createCssClass(lines, ":root", ["color-scheme: dark"], parsedOptions.scope);
|
|
1173
|
-
createCssClass(lines, ":root", genCssVariables(current.value, parsedOptions.prefix), parsedOptions.scope);
|
|
1174
|
-
for (const [themeName, theme] of Object.entries(computedThemes.value)) createCssClass(lines, `.${parsedOptions.prefix}theme--${themeName}`, [`color-scheme: ${theme.dark ? "dark" : "normal"}`, ...genCssVariables(theme, parsedOptions.prefix)], parsedOptions.scope);
|
|
1175
|
-
lines.push("}\n");
|
|
1176
|
-
if (parsedOptions.utilities) {
|
|
1177
|
-
const bgLines = [];
|
|
1178
|
-
const fgLines = [];
|
|
1179
|
-
const colors = new Set(Object.values(computedThemes.value).flatMap((theme) => Object.keys(theme.colors)));
|
|
1180
|
-
for (const key of colors) if (key.startsWith("on-")) createCssClass(fgLines, `.${key}`, [`color: rgb(var(--${parsedOptions.prefix}theme-${key}))`], parsedOptions.scope);
|
|
1181
|
-
else {
|
|
1182
|
-
createCssClass(bgLines, `.${scoped}bg-${key}`, [
|
|
1183
|
-
`--${parsedOptions.prefix}theme-overlay-multiplier: var(--${parsedOptions.prefix}theme-${key}-overlay-multiplier)`,
|
|
1184
|
-
`background-color: rgb(var(--${parsedOptions.prefix}theme-${key}))`,
|
|
1185
|
-
`color: rgb(var(--${parsedOptions.prefix}theme-on-${key}))`
|
|
1186
|
-
], parsedOptions.scope);
|
|
1187
|
-
createCssClass(fgLines, `.${scoped}text-${key}`, [`color: rgb(var(--${parsedOptions.prefix}theme-${key}))`], parsedOptions.scope);
|
|
1188
|
-
createCssClass(fgLines, `.${scoped}border-${key}`, [`--${parsedOptions.prefix}border-color: var(--${parsedOptions.prefix}theme-${key})`], parsedOptions.scope);
|
|
1189
|
-
}
|
|
1190
|
-
lines.push("@layer theme-background {\n", ...bgLines.map((v) => ` ${v}`), "}\n", "@layer theme-foreground {\n", ...fgLines.map((v) => ` ${v}`), "}\n");
|
|
1191
|
-
}
|
|
1192
|
-
return "@layer vuetify-utilities {\n" + lines.map((v) => ` ${v}`).join("") + "\n}";
|
|
1193
|
-
});
|
|
1194
|
-
const themeClasses = toRef(() => parsedOptions.isDisabled ? void 0 : `${parsedOptions.prefix}theme--${name.value}`);
|
|
1195
|
-
const themeNames = toRef(() => Object.keys(computedThemes.value));
|
|
1196
|
-
if (SUPPORTS_MATCH_MEDIA) {
|
|
1197
|
-
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1198
|
-
function updateSystemName() {
|
|
1199
|
-
systemName.value = media.matches ? "dark" : "light";
|
|
1200
|
-
}
|
|
1201
|
-
updateSystemName();
|
|
1202
|
-
media.addEventListener("change", updateSystemName, { passive: true });
|
|
1203
|
-
if (getCurrentScope()) onScopeDispose(() => {
|
|
1204
|
-
media.removeEventListener("change", updateSystemName);
|
|
1205
|
-
});
|
|
1206
|
-
}
|
|
1207
|
-
function install(app) {
|
|
1208
|
-
if (parsedOptions.isDisabled) return;
|
|
1209
|
-
const head = app._context.provides.usehead;
|
|
1210
|
-
if (head) {
|
|
1211
|
-
function getHead() {
|
|
1212
|
-
return { style: [{
|
|
1213
|
-
textContent: styles.value,
|
|
1214
|
-
id: parsedOptions.stylesheetId,
|
|
1215
|
-
nonce: parsedOptions.cspNonce || false
|
|
1216
|
-
}] };
|
|
1217
|
-
}
|
|
1218
|
-
if (head.push) {
|
|
1219
|
-
const entry = head.push(getHead);
|
|
1220
|
-
if (IN_BROWSER) watch(styles, () => {
|
|
1221
|
-
entry.patch(getHead);
|
|
1222
|
-
});
|
|
1223
|
-
} else if (IN_BROWSER) {
|
|
1224
|
-
head.addHeadObjs(toRef(getHead));
|
|
1225
|
-
watchEffect(() => head.updateDOM());
|
|
1226
|
-
} else head.addHeadObjs(getHead());
|
|
1227
|
-
} else {
|
|
1228
|
-
if (IN_BROWSER) watch(styles, updateStyles, { immediate: true });
|
|
1229
|
-
else updateStyles();
|
|
1230
|
-
function updateStyles() {
|
|
1231
|
-
upsertStyles(parsedOptions.stylesheetId, parsedOptions.cspNonce, styles.value);
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
function change(themeName) {
|
|
1236
|
-
if (themeName !== "system" && !themeNames.value.includes(themeName)) {
|
|
1237
|
-
consoleWarn(`Theme "${themeName}" not found on the Vuetify theme instance`);
|
|
1238
|
-
return;
|
|
1239
|
-
}
|
|
1240
|
-
name.value = themeName;
|
|
1241
|
-
}
|
|
1242
|
-
function cycle(themeArray = themeNames.value) {
|
|
1243
|
-
const currentIndex = themeArray.indexOf(name.value);
|
|
1244
|
-
change(themeArray[currentIndex === -1 ? 0 : (currentIndex + 1) % themeArray.length]);
|
|
1245
|
-
}
|
|
1246
|
-
function toggle(themeArray = ["light", "dark"]) {
|
|
1247
|
-
cycle(themeArray);
|
|
1248
|
-
}
|
|
1249
|
-
const globalName = new Proxy(name, {
|
|
1250
|
-
get(target, prop) {
|
|
1251
|
-
return Reflect.get(target, prop);
|
|
1252
|
-
},
|
|
1253
|
-
set(target, prop, val) {
|
|
1254
|
-
if (prop === "value") deprecate(`theme.global.name.value = ${val}`, `theme.change('${val}')`);
|
|
1255
|
-
return Reflect.set(target, prop, val);
|
|
1256
|
-
}
|
|
1257
|
-
});
|
|
1258
|
-
return {
|
|
1259
|
-
install,
|
|
1260
|
-
change,
|
|
1261
|
-
cycle,
|
|
1262
|
-
toggle,
|
|
1263
|
-
isDisabled: parsedOptions.isDisabled,
|
|
1264
|
-
isSystem,
|
|
1265
|
-
name,
|
|
1266
|
-
themes,
|
|
1267
|
-
current,
|
|
1268
|
-
computedThemes,
|
|
1269
|
-
prefix: parsedOptions.prefix,
|
|
1270
|
-
themeClasses,
|
|
1271
|
-
styles,
|
|
1272
|
-
global: {
|
|
1273
|
-
name: globalName,
|
|
1274
|
-
current
|
|
1275
|
-
}
|
|
1276
|
-
};
|
|
1277
|
-
}
|
|
1278
|
-
function provideTheme(props) {
|
|
1279
|
-
getCurrentInstance("provideTheme");
|
|
1280
|
-
const theme = inject(ThemeSymbol, null);
|
|
1281
|
-
if (!theme) throw new Error("Could not find Vuetify theme injection");
|
|
1282
|
-
const name = toRef(() => props.theme ?? theme.name.value);
|
|
1283
|
-
const current = toRef(() => theme.themes.value[name.value]);
|
|
1284
|
-
const themeClasses = toRef(() => theme.isDisabled ? void 0 : `${theme.prefix}theme--${name.value}`);
|
|
1285
|
-
const newTheme = {
|
|
1286
|
-
...theme,
|
|
1287
|
-
name,
|
|
1288
|
-
current,
|
|
1289
|
-
themeClasses
|
|
1290
|
-
};
|
|
1291
|
-
provide(ThemeSymbol, newTheme);
|
|
1292
|
-
return newTheme;
|
|
1293
|
-
}
|
|
1294
|
-
function useTheme() {
|
|
1295
|
-
getCurrentInstance("useTheme");
|
|
1296
|
-
const theme = inject(ThemeSymbol, null);
|
|
1297
|
-
if (!theme) throw new Error("Could not find Vuetify theme injection");
|
|
1298
|
-
return theme;
|
|
1299
|
-
}
|
|
1300
|
-
//#endregion
|
|
1301
|
-
export { getContrast as A, HSVtoCSS as C, HexToHSV as D, HSVtoRGB as E, isCssColor as M, isParsableColor as N, RGBtoCSS as O, parseColor as P, HSLtoHSV as S, HSVtoHex as T, useToggleScope as _, useTheme as a, easingPatterns as b, createDisplay as c, LocaleSymbol as d, createLocale as f, useProxiedModel as g, useRtl as h, provideTheme as i, hasLightForeground as j, RGBtoHSV as k, makeDisplayProps as l, useLocale as m, createTheme as n, DisplaySymbol as o, provideLocale as p, makeThemeProps as r, breakpoints as s, ThemeSymbol as t, useDisplay as u, acceleratedEasing as v, HSVtoHSL as w, standardEasing as x, deceleratedEasing as y };
|