@cuemath/leap 3.0.22-aa1 → 3.0.22-aa2
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/dist/_virtual/_commonjsHelpers.js +4 -24
- package/dist/_virtual/_commonjsHelpers.js.map +1 -1
- package/dist/features/cue-canvas/sidebar/homework/homework.js +18 -47
- package/dist/features/cue-canvas/sidebar/homework/homework.js.map +1 -1
- package/package.json +1 -1
- package/dist/_virtual/___vite-browser-external.js +0 -7
- package/dist/_virtual/___vite-browser-external.js.map +0 -1
- package/dist/_virtual/__vite-browser-external.js +0 -5
- package/dist/_virtual/__vite-browser-external.js.map +0 -1
- package/dist/_virtual/index2.js +0 -5
- package/dist/_virtual/index2.js.map +0 -1
- package/dist/_virtual/picocolors.browser.js +0 -5
- package/dist/_virtual/picocolors.browser.js.map +0 -1
- package/dist/_virtual/symbols.js +0 -5
- package/dist/_virtual/symbols.js.map +0 -1
- package/dist/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +0 -53
- package/dist/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js.map +0 -1
- package/dist/node_modules/camelize/index.js +0 -44
- package/dist/node_modules/camelize/index.js.map +0 -1
- package/dist/node_modules/css-color-keywords/colors.json.js +0 -298
- package/dist/node_modules/css-color-keywords/colors.json.js.map +0 -1
- package/dist/node_modules/css-color-keywords/index.js +0 -6
- package/dist/node_modules/css-color-keywords/index.js.map +0 -1
- package/dist/node_modules/css-to-react-native/index.js +0 -397
- package/dist/node_modules/css-to-react-native/index.js.map +0 -1
- package/dist/node_modules/nanoid/non-secure/index.js +0 -16
- package/dist/node_modules/nanoid/non-secure/index.js.map +0 -1
- package/dist/node_modules/picocolors/picocolors.browser.js +0 -11
- package/dist/node_modules/picocolors/picocolors.browser.js.map +0 -1
- package/dist/node_modules/postcss/lib/at-rule.js +0 -20
- package/dist/node_modules/postcss/lib/at-rule.js.map +0 -1
- package/dist/node_modules/postcss/lib/comment.js +0 -13
- package/dist/node_modules/postcss/lib/comment.js.map +0 -1
- package/dist/node_modules/postcss/lib/container.js +0 -226
- package/dist/node_modules/postcss/lib/container.js.map +0 -1
- package/dist/node_modules/postcss/lib/css-syntax-error.js +0 -45
- package/dist/node_modules/postcss/lib/css-syntax-error.js.map +0 -1
- package/dist/node_modules/postcss/lib/declaration.js +0 -16
- package/dist/node_modules/postcss/lib/declaration.js.map +0 -1
- package/dist/node_modules/postcss/lib/document.js +0 -22
- package/dist/node_modules/postcss/lib/document.js.map +0 -1
- package/dist/node_modules/postcss/lib/fromJSON.js +0 -43
- package/dist/node_modules/postcss/lib/fromJSON.js.map +0 -1
- package/dist/node_modules/postcss/lib/input.js +0 -134
- package/dist/node_modules/postcss/lib/input.js.map +0 -1
- package/dist/node_modules/postcss/lib/lazy-result.js +0 -347
- package/dist/node_modules/postcss/lib/lazy-result.js.map +0 -1
- package/dist/node_modules/postcss/lib/list.js +0 -22
- package/dist/node_modules/postcss/lib/list.js.map +0 -1
- package/dist/node_modules/postcss/lib/map-generator.js +0 -167
- package/dist/node_modules/postcss/lib/map-generator.js.map +0 -1
- package/dist/node_modules/postcss/lib/no-work-result.js +0 -90
- package/dist/node_modules/postcss/lib/no-work-result.js.map +0 -1
- package/dist/node_modules/postcss/lib/node.js +0 -216
- package/dist/node_modules/postcss/lib/node.js.map +0 -1
- package/dist/node_modules/postcss/lib/parse.js +0 -23
- package/dist/node_modules/postcss/lib/parse.js.map +0 -1
- package/dist/node_modules/postcss/lib/parser.js +0 -318
- package/dist/node_modules/postcss/lib/parser.js.map +0 -1
- package/dist/node_modules/postcss/lib/postcss.js +0 -30
- package/dist/node_modules/postcss/lib/postcss.js.map +0 -1
- package/dist/node_modules/postcss/lib/postcss2.js +0 -76
- package/dist/node_modules/postcss/lib/postcss2.js.map +0 -1
- package/dist/node_modules/postcss/lib/previous-map.js +0 -89
- package/dist/node_modules/postcss/lib/previous-map.js.map +0 -1
- package/dist/node_modules/postcss/lib/processor.js +0 -42
- package/dist/node_modules/postcss/lib/processor.js.map +0 -1
- package/dist/node_modules/postcss/lib/result.js +0 -27
- package/dist/node_modules/postcss/lib/result.js.map +0 -1
- package/dist/node_modules/postcss/lib/root.js +0 -38
- package/dist/node_modules/postcss/lib/root.js.map +0 -1
- package/dist/node_modules/postcss/lib/rule.js +0 -22
- package/dist/node_modules/postcss/lib/rule.js.map +0 -1
- package/dist/node_modules/postcss/lib/stringifier.js +0 -193
- package/dist/node_modules/postcss/lib/stringifier.js.map +0 -1
- package/dist/node_modules/postcss/lib/stringify.js +0 -11
- package/dist/node_modules/postcss/lib/stringify.js.map +0 -1
- package/dist/node_modules/postcss/lib/symbols.js +0 -7
- package/dist/node_modules/postcss/lib/symbols.js.map +0 -1
- package/dist/node_modules/postcss/lib/tokenize.js +0 -110
- package/dist/node_modules/postcss/lib/tokenize.js.map +0 -1
- package/dist/node_modules/postcss/lib/warn-once.js +0 -8
- package/dist/node_modules/postcss/lib/warn-once.js.map +0 -1
- package/dist/node_modules/postcss/lib/warning.js +0 -22
- package/dist/node_modules/postcss/lib/warning.js.map +0 -1
- package/dist/node_modules/postcss-value-parser/lib/index.js +0 -22
- package/dist/node_modules/postcss-value-parser/lib/index.js.map +0 -1
- package/dist/node_modules/postcss-value-parser/lib/parse.js +0 -115
- package/dist/node_modules/postcss-value-parser/lib/parse.js.map +0 -1
- package/dist/node_modules/postcss-value-parser/lib/stringify.js +0 -18
- package/dist/node_modules/postcss-value-parser/lib/stringify.js.map +0 -1
- package/dist/node_modules/postcss-value-parser/lib/unit.js +0 -37
- package/dist/node_modules/postcss-value-parser/lib/unit.js.map +0 -1
- package/dist/node_modules/postcss-value-parser/lib/walk.js +0 -9
- package/dist/node_modules/postcss-value-parser/lib/walk.js.map +0 -1
- package/dist/node_modules/styled-components/native/dist/styled-components.native.esm.js +0 -473
- package/dist/node_modules/styled-components/native/dist/styled-components.native.esm.js.map +0 -1
- package/dist/node_modules/stylis/src/Enum.js +0 -13
- package/dist/node_modules/stylis/src/Enum.js.map +0 -1
- package/dist/node_modules/stylis/src/Middleware.js +0 -48
- package/dist/node_modules/stylis/src/Middleware.js.map +0 -1
- package/dist/node_modules/stylis/src/Parser.js +0 -115
- package/dist/node_modules/stylis/src/Parser.js.map +0 -1
- package/dist/node_modules/stylis/src/Prefixer.js +0 -151
- package/dist/node_modules/stylis/src/Prefixer.js.map +0 -1
- package/dist/node_modules/stylis/src/Serializer.js +0 -28
- package/dist/node_modules/stylis/src/Serializer.js.map +0 -1
- package/dist/node_modules/stylis/src/Tokenizer.js +0 -138
- package/dist/node_modules/stylis/src/Tokenizer.js.map +0 -1
- package/dist/node_modules/stylis/src/Utility.js +0 -57
- package/dist/node_modules/stylis/src/Utility.js.map +0 -1
- package/dist/node_modules/tslib/tslib.es6.js +0 -19
- package/dist/node_modules/tslib/tslib.es6.js.map +0 -1
@@ -1,226 +0,0 @@
|
|
1
|
-
import "./symbols.js";
|
2
|
-
import { d as g } from "./declaration.js";
|
3
|
-
import { c as v } from "./comment.js";
|
4
|
-
import { n as k } from "./node.js";
|
5
|
-
import { __exports as R } from "../../../_virtual/symbols.js";
|
6
|
-
let { isClean: y, my: h } = R, p = g, x = v, P = k, m, l, a, d;
|
7
|
-
function O(i) {
|
8
|
-
return i.map((e) => (e.nodes && (e.nodes = O(e.nodes)), delete e.source, e));
|
9
|
-
}
|
10
|
-
function w(i) {
|
11
|
-
if (i[y] = !1, i.proxyOf.nodes)
|
12
|
-
for (let e of i.proxyOf.nodes)
|
13
|
-
w(e);
|
14
|
-
}
|
15
|
-
class f extends P {
|
16
|
-
append(...e) {
|
17
|
-
for (let t of e) {
|
18
|
-
let r = this.normalize(t, this.last);
|
19
|
-
for (let s of r) this.proxyOf.nodes.push(s);
|
20
|
-
}
|
21
|
-
return this.markDirty(), this;
|
22
|
-
}
|
23
|
-
cleanRaws(e) {
|
24
|
-
if (super.cleanRaws(e), this.nodes)
|
25
|
-
for (let t of this.nodes) t.cleanRaws(e);
|
26
|
-
}
|
27
|
-
each(e) {
|
28
|
-
if (!this.proxyOf.nodes) return;
|
29
|
-
let t = this.getIterator(), r, s;
|
30
|
-
for (; this.indexes[t] < this.proxyOf.nodes.length && (r = this.indexes[t], s = e(this.proxyOf.nodes[r], r), s !== !1); )
|
31
|
-
this.indexes[t] += 1;
|
32
|
-
return delete this.indexes[t], s;
|
33
|
-
}
|
34
|
-
every(e) {
|
35
|
-
return this.nodes.every(e);
|
36
|
-
}
|
37
|
-
getIterator() {
|
38
|
-
this.lastEach || (this.lastEach = 0), this.indexes || (this.indexes = {}), this.lastEach += 1;
|
39
|
-
let e = this.lastEach;
|
40
|
-
return this.indexes[e] = 0, e;
|
41
|
-
}
|
42
|
-
getProxyProcessor() {
|
43
|
-
return {
|
44
|
-
get(e, t) {
|
45
|
-
return t === "proxyOf" ? e : e[t] ? t === "each" || typeof t == "string" && t.startsWith("walk") ? (...r) => e[t](
|
46
|
-
...r.map((s) => typeof s == "function" ? (n, o) => s(n.toProxy(), o) : s)
|
47
|
-
) : t === "every" || t === "some" ? (r) => e[t](
|
48
|
-
(s, ...n) => r(s.toProxy(), ...n)
|
49
|
-
) : t === "root" ? () => e.root().toProxy() : t === "nodes" ? e.nodes.map((r) => r.toProxy()) : t === "first" || t === "last" ? e[t].toProxy() : e[t] : e[t];
|
50
|
-
},
|
51
|
-
set(e, t, r) {
|
52
|
-
return e[t] === r || (e[t] = r, (t === "name" || t === "params" || t === "selector") && e.markDirty()), !0;
|
53
|
-
}
|
54
|
-
};
|
55
|
-
}
|
56
|
-
index(e) {
|
57
|
-
return typeof e == "number" ? e : (e.proxyOf && (e = e.proxyOf), this.proxyOf.nodes.indexOf(e));
|
58
|
-
}
|
59
|
-
insertAfter(e, t) {
|
60
|
-
let r = this.index(e), s = this.normalize(t, this.proxyOf.nodes[r]).reverse();
|
61
|
-
r = this.index(e);
|
62
|
-
for (let o of s) this.proxyOf.nodes.splice(r + 1, 0, o);
|
63
|
-
let n;
|
64
|
-
for (let o in this.indexes)
|
65
|
-
n = this.indexes[o], r < n && (this.indexes[o] = n + s.length);
|
66
|
-
return this.markDirty(), this;
|
67
|
-
}
|
68
|
-
insertBefore(e, t) {
|
69
|
-
let r = this.index(e), s = r === 0 ? "prepend" : !1, n = this.normalize(
|
70
|
-
t,
|
71
|
-
this.proxyOf.nodes[r],
|
72
|
-
s
|
73
|
-
).reverse();
|
74
|
-
r = this.index(e);
|
75
|
-
for (let u of n) this.proxyOf.nodes.splice(r, 0, u);
|
76
|
-
let o;
|
77
|
-
for (let u in this.indexes)
|
78
|
-
o = this.indexes[u], r <= o && (this.indexes[u] = o + n.length);
|
79
|
-
return this.markDirty(), this;
|
80
|
-
}
|
81
|
-
normalize(e, t) {
|
82
|
-
if (typeof e == "string")
|
83
|
-
e = O(m(e).nodes);
|
84
|
-
else if (typeof e > "u")
|
85
|
-
e = [];
|
86
|
-
else if (Array.isArray(e)) {
|
87
|
-
e = e.slice(0);
|
88
|
-
for (let s of e)
|
89
|
-
s.parent && s.parent.removeChild(s, "ignore");
|
90
|
-
} else if (e.type === "root" && this.type !== "document") {
|
91
|
-
e = e.nodes.slice(0);
|
92
|
-
for (let s of e)
|
93
|
-
s.parent && s.parent.removeChild(s, "ignore");
|
94
|
-
} else if (e.type)
|
95
|
-
e = [e];
|
96
|
-
else if (e.prop) {
|
97
|
-
if (typeof e.value > "u")
|
98
|
-
throw new Error("Value field is missed in node creation");
|
99
|
-
typeof e.value != "string" && (e.value = String(e.value)), e = [new p(e)];
|
100
|
-
} else if (e.selector || e.selectors)
|
101
|
-
e = [new l(e)];
|
102
|
-
else if (e.name)
|
103
|
-
e = [new a(e)];
|
104
|
-
else if (e.text)
|
105
|
-
e = [new x(e)];
|
106
|
-
else
|
107
|
-
throw new Error("Unknown node type in node creation");
|
108
|
-
return e.map((s) => (s[h] || f.rebuild(s), s = s.proxyOf, s.parent && s.parent.removeChild(s), s[y] && w(s), typeof s.raws.before > "u" && t && typeof t.raws.before < "u" && (s.raws.before = t.raws.before.replace(/\S/g, "")), s.parent = this.proxyOf, s));
|
109
|
-
}
|
110
|
-
prepend(...e) {
|
111
|
-
e = e.reverse();
|
112
|
-
for (let t of e) {
|
113
|
-
let r = this.normalize(t, this.first, "prepend").reverse();
|
114
|
-
for (let s of r) this.proxyOf.nodes.unshift(s);
|
115
|
-
for (let s in this.indexes)
|
116
|
-
this.indexes[s] = this.indexes[s] + r.length;
|
117
|
-
}
|
118
|
-
return this.markDirty(), this;
|
119
|
-
}
|
120
|
-
push(e) {
|
121
|
-
return e.parent = this, this.proxyOf.nodes.push(e), this;
|
122
|
-
}
|
123
|
-
removeAll() {
|
124
|
-
for (let e of this.proxyOf.nodes) e.parent = void 0;
|
125
|
-
return this.proxyOf.nodes = [], this.markDirty(), this;
|
126
|
-
}
|
127
|
-
removeChild(e) {
|
128
|
-
e = this.index(e), this.proxyOf.nodes[e].parent = void 0, this.proxyOf.nodes.splice(e, 1);
|
129
|
-
let t;
|
130
|
-
for (let r in this.indexes)
|
131
|
-
t = this.indexes[r], t >= e && (this.indexes[r] = t - 1);
|
132
|
-
return this.markDirty(), this;
|
133
|
-
}
|
134
|
-
replaceValues(e, t, r) {
|
135
|
-
return r || (r = t, t = {}), this.walkDecls((s) => {
|
136
|
-
t.props && !t.props.includes(s.prop) || t.fast && !s.value.includes(t.fast) || (s.value = s.value.replace(e, r));
|
137
|
-
}), this.markDirty(), this;
|
138
|
-
}
|
139
|
-
some(e) {
|
140
|
-
return this.nodes.some(e);
|
141
|
-
}
|
142
|
-
walk(e) {
|
143
|
-
return this.each((t, r) => {
|
144
|
-
let s;
|
145
|
-
try {
|
146
|
-
s = e(t, r);
|
147
|
-
} catch (n) {
|
148
|
-
throw t.addToError(n);
|
149
|
-
}
|
150
|
-
return s !== !1 && t.walk && (s = t.walk(e)), s;
|
151
|
-
});
|
152
|
-
}
|
153
|
-
walkAtRules(e, t) {
|
154
|
-
return t ? e instanceof RegExp ? this.walk((r, s) => {
|
155
|
-
if (r.type === "atrule" && e.test(r.name))
|
156
|
-
return t(r, s);
|
157
|
-
}) : this.walk((r, s) => {
|
158
|
-
if (r.type === "atrule" && r.name === e)
|
159
|
-
return t(r, s);
|
160
|
-
}) : (t = e, this.walk((r, s) => {
|
161
|
-
if (r.type === "atrule")
|
162
|
-
return t(r, s);
|
163
|
-
}));
|
164
|
-
}
|
165
|
-
walkComments(e) {
|
166
|
-
return this.walk((t, r) => {
|
167
|
-
if (t.type === "comment")
|
168
|
-
return e(t, r);
|
169
|
-
});
|
170
|
-
}
|
171
|
-
walkDecls(e, t) {
|
172
|
-
return t ? e instanceof RegExp ? this.walk((r, s) => {
|
173
|
-
if (r.type === "decl" && e.test(r.prop))
|
174
|
-
return t(r, s);
|
175
|
-
}) : this.walk((r, s) => {
|
176
|
-
if (r.type === "decl" && r.prop === e)
|
177
|
-
return t(r, s);
|
178
|
-
}) : (t = e, this.walk((r, s) => {
|
179
|
-
if (r.type === "decl")
|
180
|
-
return t(r, s);
|
181
|
-
}));
|
182
|
-
}
|
183
|
-
walkRules(e, t) {
|
184
|
-
return t ? e instanceof RegExp ? this.walk((r, s) => {
|
185
|
-
if (r.type === "rule" && e.test(r.selector))
|
186
|
-
return t(r, s);
|
187
|
-
}) : this.walk((r, s) => {
|
188
|
-
if (r.type === "rule" && r.selector === e)
|
189
|
-
return t(r, s);
|
190
|
-
}) : (t = e, this.walk((r, s) => {
|
191
|
-
if (r.type === "rule")
|
192
|
-
return t(r, s);
|
193
|
-
}));
|
194
|
-
}
|
195
|
-
get first() {
|
196
|
-
if (this.proxyOf.nodes)
|
197
|
-
return this.proxyOf.nodes[0];
|
198
|
-
}
|
199
|
-
get last() {
|
200
|
-
if (this.proxyOf.nodes)
|
201
|
-
return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
|
202
|
-
}
|
203
|
-
}
|
204
|
-
f.registerParse = (i) => {
|
205
|
-
m = i;
|
206
|
-
};
|
207
|
-
f.registerRule = (i) => {
|
208
|
-
l = i;
|
209
|
-
};
|
210
|
-
f.registerAtRule = (i) => {
|
211
|
-
a = i;
|
212
|
-
};
|
213
|
-
f.registerRoot = (i) => {
|
214
|
-
d = i;
|
215
|
-
};
|
216
|
-
var z = f;
|
217
|
-
f.default = f;
|
218
|
-
f.rebuild = (i) => {
|
219
|
-
i.type === "atrule" ? Object.setPrototypeOf(i, a.prototype) : i.type === "rule" ? Object.setPrototypeOf(i, l.prototype) : i.type === "decl" ? Object.setPrototypeOf(i, p.prototype) : i.type === "comment" ? Object.setPrototypeOf(i, x.prototype) : i.type === "root" && Object.setPrototypeOf(i, d.prototype), i[h] = !0, i.nodes && i.nodes.forEach((e) => {
|
220
|
-
f.rebuild(e);
|
221
|
-
});
|
222
|
-
};
|
223
|
-
export {
|
224
|
-
z as c
|
225
|
-
};
|
226
|
-
//# sourceMappingURL=container.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"container.js","sources":["../../../../node_modules/postcss/lib/container.js"],"sourcesContent":["'use strict'\n\nlet { isClean, my } = require('./symbols')\nlet Declaration = require('./declaration')\nlet Comment = require('./comment')\nlet Node = require('./node')\n\nlet parse, Rule, AtRule, Root\n\nfunction cleanSource(nodes) {\n return nodes.map(i => {\n if (i.nodes) i.nodes = cleanSource(i.nodes)\n delete i.source\n return i\n })\n}\n\nfunction markTreeDirty(node) {\n node[isClean] = false\n if (node.proxyOf.nodes) {\n for (let i of node.proxyOf.nodes) {\n markTreeDirty(i)\n }\n }\n}\n\nclass Container extends Node {\n append(...children) {\n for (let child of children) {\n let nodes = this.normalize(child, this.last)\n for (let node of nodes) this.proxyOf.nodes.push(node)\n }\n\n this.markDirty()\n\n return this\n }\n\n cleanRaws(keepBetween) {\n super.cleanRaws(keepBetween)\n if (this.nodes) {\n for (let node of this.nodes) node.cleanRaws(keepBetween)\n }\n }\n\n each(callback) {\n if (!this.proxyOf.nodes) return undefined\n let iterator = this.getIterator()\n\n let index, result\n while (this.indexes[iterator] < this.proxyOf.nodes.length) {\n index = this.indexes[iterator]\n result = callback(this.proxyOf.nodes[index], index)\n if (result === false) break\n\n this.indexes[iterator] += 1\n }\n\n delete this.indexes[iterator]\n return result\n }\n\n every(condition) {\n return this.nodes.every(condition)\n }\n\n getIterator() {\n if (!this.lastEach) this.lastEach = 0\n if (!this.indexes) this.indexes = {}\n\n this.lastEach += 1\n let iterator = this.lastEach\n this.indexes[iterator] = 0\n\n return iterator\n }\n\n getProxyProcessor() {\n return {\n get(node, prop) {\n if (prop === 'proxyOf') {\n return node\n } else if (!node[prop]) {\n return node[prop]\n } else if (\n prop === 'each' ||\n (typeof prop === 'string' && prop.startsWith('walk'))\n ) {\n return (...args) => {\n return node[prop](\n ...args.map(i => {\n if (typeof i === 'function') {\n return (child, index) => i(child.toProxy(), index)\n } else {\n return i\n }\n })\n )\n }\n } else if (prop === 'every' || prop === 'some') {\n return cb => {\n return node[prop]((child, ...other) =>\n cb(child.toProxy(), ...other)\n )\n }\n } else if (prop === 'root') {\n return () => node.root().toProxy()\n } else if (prop === 'nodes') {\n return node.nodes.map(i => i.toProxy())\n } else if (prop === 'first' || prop === 'last') {\n return node[prop].toProxy()\n } else {\n return node[prop]\n }\n },\n\n set(node, prop, value) {\n if (node[prop] === value) return true\n node[prop] = value\n if (prop === 'name' || prop === 'params' || prop === 'selector') {\n node.markDirty()\n }\n return true\n }\n }\n }\n\n index(child) {\n if (typeof child === 'number') return child\n if (child.proxyOf) child = child.proxyOf\n return this.proxyOf.nodes.indexOf(child)\n }\n\n insertAfter(exist, add) {\n let existIndex = this.index(exist)\n let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse()\n existIndex = this.index(exist)\n for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (existIndex < index) {\n this.indexes[id] = index + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n insertBefore(exist, add) {\n let existIndex = this.index(exist)\n let type = existIndex === 0 ? 'prepend' : false\n let nodes = this.normalize(\n add,\n this.proxyOf.nodes[existIndex],\n type\n ).reverse()\n existIndex = this.index(exist)\n for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (existIndex <= index) {\n this.indexes[id] = index + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n normalize(nodes, sample) {\n if (typeof nodes === 'string') {\n nodes = cleanSource(parse(nodes).nodes)\n } else if (typeof nodes === 'undefined') {\n nodes = []\n } else if (Array.isArray(nodes)) {\n nodes = nodes.slice(0)\n for (let i of nodes) {\n if (i.parent) i.parent.removeChild(i, 'ignore')\n }\n } else if (nodes.type === 'root' && this.type !== 'document') {\n nodes = nodes.nodes.slice(0)\n for (let i of nodes) {\n if (i.parent) i.parent.removeChild(i, 'ignore')\n }\n } else if (nodes.type) {\n nodes = [nodes]\n } else if (nodes.prop) {\n if (typeof nodes.value === 'undefined') {\n throw new Error('Value field is missed in node creation')\n } else if (typeof nodes.value !== 'string') {\n nodes.value = String(nodes.value)\n }\n nodes = [new Declaration(nodes)]\n } else if (nodes.selector || nodes.selectors) {\n nodes = [new Rule(nodes)]\n } else if (nodes.name) {\n nodes = [new AtRule(nodes)]\n } else if (nodes.text) {\n nodes = [new Comment(nodes)]\n } else {\n throw new Error('Unknown node type in node creation')\n }\n\n let processed = nodes.map(i => {\n /* c8 ignore next */\n if (!i[my]) Container.rebuild(i)\n i = i.proxyOf\n if (i.parent) i.parent.removeChild(i)\n if (i[isClean]) markTreeDirty(i)\n if (typeof i.raws.before === 'undefined') {\n if (sample && typeof sample.raws.before !== 'undefined') {\n i.raws.before = sample.raws.before.replace(/\\S/g, '')\n }\n }\n i.parent = this.proxyOf\n return i\n })\n\n return processed\n }\n\n prepend(...children) {\n children = children.reverse()\n for (let child of children) {\n let nodes = this.normalize(child, this.first, 'prepend').reverse()\n for (let node of nodes) this.proxyOf.nodes.unshift(node)\n for (let id in this.indexes) {\n this.indexes[id] = this.indexes[id] + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n push(child) {\n child.parent = this\n this.proxyOf.nodes.push(child)\n return this\n }\n\n removeAll() {\n for (let node of this.proxyOf.nodes) node.parent = undefined\n this.proxyOf.nodes = []\n\n this.markDirty()\n\n return this\n }\n\n removeChild(child) {\n child = this.index(child)\n this.proxyOf.nodes[child].parent = undefined\n this.proxyOf.nodes.splice(child, 1)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (index >= child) {\n this.indexes[id] = index - 1\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n replaceValues(pattern, opts, callback) {\n if (!callback) {\n callback = opts\n opts = {}\n }\n\n this.walkDecls(decl => {\n if (opts.props && !opts.props.includes(decl.prop)) return\n if (opts.fast && !decl.value.includes(opts.fast)) return\n\n decl.value = decl.value.replace(pattern, callback)\n })\n\n this.markDirty()\n\n return this\n }\n\n some(condition) {\n return this.nodes.some(condition)\n }\n\n walk(callback) {\n return this.each((child, i) => {\n let result\n try {\n result = callback(child, i)\n } catch (e) {\n throw child.addToError(e)\n }\n if (result !== false && child.walk) {\n result = child.walk(callback)\n }\n\n return result\n })\n }\n\n walkAtRules(name, callback) {\n if (!callback) {\n callback = name\n return this.walk((child, i) => {\n if (child.type === 'atrule') {\n return callback(child, i)\n }\n })\n }\n if (name instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'atrule' && name.test(child.name)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'atrule' && child.name === name) {\n return callback(child, i)\n }\n })\n }\n\n walkComments(callback) {\n return this.walk((child, i) => {\n if (child.type === 'comment') {\n return callback(child, i)\n }\n })\n }\n\n walkDecls(prop, callback) {\n if (!callback) {\n callback = prop\n return this.walk((child, i) => {\n if (child.type === 'decl') {\n return callback(child, i)\n }\n })\n }\n if (prop instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'decl' && prop.test(child.prop)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'decl' && child.prop === prop) {\n return callback(child, i)\n }\n })\n }\n\n walkRules(selector, callback) {\n if (!callback) {\n callback = selector\n\n return this.walk((child, i) => {\n if (child.type === 'rule') {\n return callback(child, i)\n }\n })\n }\n if (selector instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'rule' && selector.test(child.selector)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'rule' && child.selector === selector) {\n return callback(child, i)\n }\n })\n }\n\n get first() {\n if (!this.proxyOf.nodes) return undefined\n return this.proxyOf.nodes[0]\n }\n\n get last() {\n if (!this.proxyOf.nodes) return undefined\n return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]\n }\n}\n\nContainer.registerParse = dependant => {\n parse = dependant\n}\n\nContainer.registerRule = dependant => {\n Rule = dependant\n}\n\nContainer.registerAtRule = dependant => {\n AtRule = dependant\n}\n\nContainer.registerRoot = dependant => {\n Root = dependant\n}\n\nmodule.exports = Container\nContainer.default = Container\n\n/* c8 ignore start */\nContainer.rebuild = node => {\n if (node.type === 'atrule') {\n Object.setPrototypeOf(node, AtRule.prototype)\n } else if (node.type === 'rule') {\n Object.setPrototypeOf(node, Rule.prototype)\n } else if (node.type === 'decl') {\n Object.setPrototypeOf(node, Declaration.prototype)\n } else if (node.type === 'comment') {\n Object.setPrototypeOf(node, Comment.prototype)\n } else if (node.type === 'root') {\n Object.setPrototypeOf(node, Root.prototype)\n }\n\n node[my] = true\n\n if (node.nodes) {\n node.nodes.forEach(child => {\n Container.rebuild(child)\n })\n }\n}\n/* c8 ignore stop */\n"],"names":["isClean","my","require$$0","Declaration","require$$1","Comment","require$$2","Node","require$$3","parse","Rule","AtRule","Root","cleanSource","nodes","i","markTreeDirty","node","Container","children","child","keepBetween","callback","iterator","index","result","condition","prop","args","cb","other","value","exist","add","existIndex","id","type","sample","pattern","opts","decl","e","name","selector","dependant","container"],"mappings":";;;;;AAEA,IAAI,EAAE,SAAAA,GAAS,IAAAC,EAAE,IAAKC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AO,eAAeA,GAAMN,EAAO,SAAS,IACnCM,EAAK,SAAS,SACvB,OAAO,eAAeA,GAAMP,EAAK,SAAS,IACjCO,EAAK,SAAS,SACvB,OAAO,eAAeA,GAAMd,EAAY,SAAS,IACxCc,EAAK,SAAS,YACvB,OAAO,eAAeA,GAAMZ,EAAQ,SAAS,IACpCY,EAAK,SAAS,UACvB,OAAO,eAAeA,GAAML,EAAK,SAAS,GAG5CK,EAAKhB,CAAE,IAAI,IAEPgB,EAAK,SACPA,EAAK,MAAM,QAAQ,CAAAG,MAAS;AAC1B,IAAAF,EAAU,QAAQE,CAAK;AAAA,EAC7B,CAAK;AAEL;","x_google_ignoreList":[0]}
|
@@ -1,45 +0,0 @@
|
|
1
|
-
import { p as g } from "../../picocolors/picocolors.browser.js";
|
2
|
-
import S from "../../../_virtual/___vite-browser-external.js";
|
3
|
-
let p = g, m = S;
|
4
|
-
class o extends Error {
|
5
|
-
constructor(e, t, s, n, h, a) {
|
6
|
-
super(e), this.name = "CssSyntaxError", this.reason = e, h && (this.file = h), n && (this.source = n), a && (this.plugin = a), typeof t < "u" && typeof s < "u" && (typeof t == "number" ? (this.line = t, this.column = s) : (this.line = t.line, this.column = t.column, this.endLine = s.line, this.endColumn = s.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, o);
|
7
|
-
}
|
8
|
-
setMessage() {
|
9
|
-
this.message = this.plugin ? this.plugin + ": " : "", this.message += this.file ? this.file : "<css input>", typeof this.line < "u" && (this.message += ":" + this.line + ":" + this.column), this.message += ": " + this.reason;
|
10
|
-
}
|
11
|
-
showSourceCode(e) {
|
12
|
-
if (!this.source) return "";
|
13
|
-
let t = this.source;
|
14
|
-
e == null && (e = p.isColorSupported), m && e && (t = m(t));
|
15
|
-
let s = t.split(/\r?\n/), n = Math.max(this.line - 3, 0), h = Math.min(this.line + 2, s.length), a = String(h).length, u, l;
|
16
|
-
if (e) {
|
17
|
-
let { bold: i, gray: f, red: c } = p.createColors(!0);
|
18
|
-
u = (r) => i(c(r)), l = (r) => f(r);
|
19
|
-
} else
|
20
|
-
u = l = (i) => i;
|
21
|
-
return s.slice(n, h).map((i, f) => {
|
22
|
-
let c = n + 1 + f, r = " " + (" " + c).slice(-a) + " | ";
|
23
|
-
if (c === this.line) {
|
24
|
-
let d = l(r.replace(/\d/g, " ")) + i.slice(0, this.column - 1).replace(/[^\t]/g, " ");
|
25
|
-
return u(">") + l(r) + i + `
|
26
|
-
` + d + u("^");
|
27
|
-
}
|
28
|
-
return " " + l(r) + i;
|
29
|
-
}).join(`
|
30
|
-
`);
|
31
|
-
}
|
32
|
-
toString() {
|
33
|
-
let e = this.showSourceCode();
|
34
|
-
return e && (e = `
|
35
|
-
|
36
|
-
` + e + `
|
37
|
-
`), this.name + ": " + this.message + e;
|
38
|
-
}
|
39
|
-
}
|
40
|
-
var C = o;
|
41
|
-
o.default = o;
|
42
|
-
export {
|
43
|
-
C as c
|
44
|
-
};
|
45
|
-
//# sourceMappingURL=css-syntax-error.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"css-syntax-error.js","sources":["../../../../node_modules/postcss/lib/css-syntax-error.js"],"sourcesContent":["'use strict'\n\nlet pico = require('picocolors')\n\nlet terminalHighlight = require('./terminal-highlight')\n\nclass CssSyntaxError extends Error {\n constructor(message, line, column, source, file, plugin) {\n super(message)\n this.name = 'CssSyntaxError'\n this.reason = message\n\n if (file) {\n this.file = file\n }\n if (source) {\n this.source = source\n }\n if (plugin) {\n this.plugin = plugin\n }\n if (typeof line !== 'undefined' && typeof column !== 'undefined') {\n if (typeof line === 'number') {\n this.line = line\n this.column = column\n } else {\n this.line = line.line\n this.column = line.column\n this.endLine = column.line\n this.endColumn = column.column\n }\n }\n\n this.setMessage()\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, CssSyntaxError)\n }\n }\n\n setMessage() {\n this.message = this.plugin ? this.plugin + ': ' : ''\n this.message += this.file ? this.file : '<css input>'\n if (typeof this.line !== 'undefined') {\n this.message += ':' + this.line + ':' + this.column\n }\n this.message += ': ' + this.reason\n }\n\n showSourceCode(color) {\n if (!this.source) return ''\n\n let css = this.source\n if (color == null) color = pico.isColorSupported\n if (terminalHighlight) {\n if (color) css = terminalHighlight(css)\n }\n\n let lines = css.split(/\\r?\\n/)\n let start = Math.max(this.line - 3, 0)\n let end = Math.min(this.line + 2, lines.length)\n\n let maxWidth = String(end).length\n\n let mark, aside\n if (color) {\n let { bold, gray, red } = pico.createColors(true)\n mark = text => bold(red(text))\n aside = text => gray(text)\n } else {\n mark = aside = str => str\n }\n\n return lines\n .slice(start, end)\n .map((line, index) => {\n let number = start + 1 + index\n let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '\n if (number === this.line) {\n let spacing =\n aside(gutter.replace(/\\d/g, ' ')) +\n line.slice(0, this.column - 1).replace(/[^\\t]/g, ' ')\n return mark('>') + aside(gutter) + line + '\\n ' + spacing + mark('^')\n }\n return ' ' + aside(gutter) + line\n })\n .join('\\n')\n }\n\n toString() {\n let code = this.showSourceCode()\n if (code) {\n code = '\\n\\n' + code + '\\n'\n }\n return this.name + ': ' + this.message + code\n }\n}\n\nmodule.exports = CssSyntaxError\nCssSyntaxError.default = CssSyntaxError\n"],"names":["pico","require$$0","terminalHighlight","require$$1","CssSyntaxError","message","line","column","source","file","plugin","color","css","lines","start","end","maxWidth","mark","aside","bold","gray","red","text","str","index","number","gutter","spacing","code","cssSyntaxError"],"mappings":";;AAEA,IAAIA,IAAOC,GAEPC,IAAoBC;AAExB,MAAMC,UAAuB,MAAM;AAAA,EACjC,YAAYC,GAASC,GAAMC,GAAQC,GAAQC,GAAMC,GAAQ;AACvD,UAAML,CAAO,GACb,KAAK,OAAO,kBACZ,KAAK,SAASA,GAEVI,MACF,KAAK,OAAOA,IAEVD,MACF,KAAK,SAASA,IAEZE,MACF,KAAK,SAASA,IAEZ,OAAOJ,IAAS,OAAe,OAAOC,IAAW,QAC/C,OAAOD,KAAS,YAClB,KAAK,OAAOA,G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AK,MAAM;AACxB,YAAIE,IACFT,EAAMQ,EAAO,QAAQ,OAAO,GAAG,CAAC,IAChCpB,EAAK,MAAM,GAAG,KAAK,SAAS,CAAC,EAAE,QAAQ,UAAU,GAAG;AACtD,eAAOW,EAAK,GAAG,IAAIC,EAAMQ,CAAM,IAAIpB,IAAO;AAAA,KAAQqB,IAAUV,EAAK,GAAG;AAAA,MACrE;AACD,aAAO,MAAMC,EAAMQ,CAAM,IAAIpB;AAAA,IACrC,CAAO,EACA,KAAK;AAAA,CAAI;AAAA,EACb;AAAA,EAED,WAAW;AACT,QAAIsB,IAAO,KAAK,eAAgB;AAChC,WAAIA,MACFA,IAAO;AAAA;AAAA,IAASA,IAAO;AAAA,IAElB,KAAK,OAAO,OAAO,KAAK,UAAUA;AAAA,EAC1C;AACH;AAEA,IAAAC,IAAiBzB;AACjBA,EAAe,UAAUA;","x_google_ignoreList":[0]}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import { n as t } from "./node.js";
|
2
|
-
let o = t;
|
3
|
-
class r extends o {
|
4
|
-
constructor(e) {
|
5
|
-
e && typeof e.value < "u" && typeof e.value != "string" && (e = { ...e, value: String(e.value) }), super(e), this.type = "decl";
|
6
|
-
}
|
7
|
-
get variable() {
|
8
|
-
return this.prop.startsWith("--") || this.prop[0] === "$";
|
9
|
-
}
|
10
|
-
}
|
11
|
-
var a = r;
|
12
|
-
r.default = r;
|
13
|
-
export {
|
14
|
-
a as d
|
15
|
-
};
|
16
|
-
//# sourceMappingURL=declaration.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"declaration.js","sources":["../../../../node_modules/postcss/lib/declaration.js"],"sourcesContent":["'use strict'\n\nlet Node = require('./node')\n\nclass Declaration extends Node {\n constructor(defaults) {\n if (\n defaults &&\n typeof defaults.value !== 'undefined' &&\n typeof defaults.value !== 'string'\n ) {\n defaults = { ...defaults, value: String(defaults.value) }\n }\n super(defaults)\n this.type = 'decl'\n }\n\n get variable() {\n return this.prop.startsWith('--') || this.prop[0] === '$'\n }\n}\n\nmodule.exports = Declaration\nDeclaration.default = Declaration\n"],"names":["Node","require$$0","Declaration","defaults","declaration"],"mappings":";AAEA,IAAIA,IAAOC;AAEX,MAAMC,UAAoBF,EAAK;AAAA,EAC7B,YAAYG,GAAU;AACpB,IACEA,KACA,OAAOA,EAAS,QAAU,OAC1B,OAAOA,EAAS,SAAU,aAE1BA,IAAW,EAAE,GAAGA,GAAU,OAAO,OAAOA,EAAS,KAAK,EAAG,IAE3D,MAAMA,CAAQ,GACd,KAAK,OAAO;AAAA,EACb;AAAA,EAED,IAAI,WAAW;AACb,WAAO,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,KAAK,CAAC,MAAM;AAAA,EACvD;AACH;AAEA,IAAAC,IAAiBF;AACjBA,EAAY,UAAUA;","x_google_ignoreList":[0]}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
import { c as n } from "./container.js";
|
2
|
-
let a = n, r, o;
|
3
|
-
class e extends a {
|
4
|
-
constructor(s) {
|
5
|
-
super({ type: "document", ...s }), this.nodes || (this.nodes = []);
|
6
|
-
}
|
7
|
-
toResult(s = {}) {
|
8
|
-
return new r(new o(), this, s).stringify();
|
9
|
-
}
|
10
|
-
}
|
11
|
-
e.registerLazyResult = (t) => {
|
12
|
-
r = t;
|
13
|
-
};
|
14
|
-
e.registerProcessor = (t) => {
|
15
|
-
o = t;
|
16
|
-
};
|
17
|
-
var l = e;
|
18
|
-
e.default = e;
|
19
|
-
export {
|
20
|
-
l as d
|
21
|
-
};
|
22
|
-
//# sourceMappingURL=document.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"document.js","sources":["../../../../node_modules/postcss/lib/document.js"],"sourcesContent":["'use strict'\n\nlet Container = require('./container')\n\nlet LazyResult, Processor\n\nclass Document extends Container {\n constructor(defaults) {\n // type needs to be passed to super, otherwise child roots won't be normalized correctly\n super({ type: 'document', ...defaults })\n\n if (!this.nodes) {\n this.nodes = []\n }\n }\n\n toResult(opts = {}) {\n let lazy = new LazyResult(new Processor(), this, opts)\n\n return lazy.stringify()\n }\n}\n\nDocument.registerLazyResult = dependant => {\n LazyResult = dependant\n}\n\nDocument.registerProcessor = dependant => {\n Processor = dependant\n}\n\nmodule.exports = Document\nDocument.default = Document\n"],"names":["Container","require$$0","LazyResult","Processor","Document","defaults","opts","dependant","document"],"mappings":";AAEA,IAAIA,IAAYC,GAEZC,GAAYC;AAEhB,MAAMC,UAAiBJ,EAAU;AAAA,EAC/B,YAAYK,GAAU;AAEpB,UAAM,EAAE,MAAM,YAAY,GAAGA,EAAQ,CAAE,GAElC,KAAK,UACR,KAAK,QAAQ,CAAE;AAAA,EAElB;AAAA,EAED,SAASC,IAAO,IAAI;AAGlB,WAFW,IAAIJ,EAAW,IAAIC,EAAW,GAAE,MAAMG,CAAI,EAEzC,UAAW;AAAA,EACxB;AACH;AAEAF,EAAS,qBAAqB,CAAAG,MAAa;AACzC,EAAAL,IAAaK;AACf;AAEAH,EAAS,oBAAoB,CAAAG,MAAa;AACxC,EAAAJ,IAAYI;AACd;AAEA,IAAAC,IAAiBJ;AACjBA,EAAS,UAAUA;","x_google_ignoreList":[0]}
|
@@ -1,43 +0,0 @@
|
|
1
|
-
import { d as u } from "./declaration.js";
|
2
|
-
import { p as a } from "./previous-map.js";
|
3
|
-
import { c as i } from "./comment.js";
|
4
|
-
import { a as m } from "./at-rule.js";
|
5
|
-
import { i as f } from "./input.js";
|
6
|
-
import { r as s } from "./root.js";
|
7
|
-
import { r as c } from "./rule.js";
|
8
|
-
let d = u, y = a, w = i, _ = m, R = f, v = s, A = c;
|
9
|
-
function p(o, l) {
|
10
|
-
if (Array.isArray(o)) return o.map((r) => p(r));
|
11
|
-
let { inputs: n, ...e } = o;
|
12
|
-
if (n) {
|
13
|
-
l = [];
|
14
|
-
for (let r of n) {
|
15
|
-
let t = { ...r, __proto__: R.prototype };
|
16
|
-
t.map && (t.map = {
|
17
|
-
...t.map,
|
18
|
-
__proto__: y.prototype
|
19
|
-
}), l.push(t);
|
20
|
-
}
|
21
|
-
}
|
22
|
-
if (e.nodes && (e.nodes = o.nodes.map((r) => p(r, l))), e.source) {
|
23
|
-
let { inputId: r, ...t } = e.source;
|
24
|
-
e.source = t, r != null && (e.source.input = l[r]);
|
25
|
-
}
|
26
|
-
if (e.type === "root")
|
27
|
-
return new v(e);
|
28
|
-
if (e.type === "decl")
|
29
|
-
return new d(e);
|
30
|
-
if (e.type === "rule")
|
31
|
-
return new A(e);
|
32
|
-
if (e.type === "comment")
|
33
|
-
return new w(e);
|
34
|
-
if (e.type === "atrule")
|
35
|
-
return new _(e);
|
36
|
-
throw new Error("Unknown node type: " + o.type);
|
37
|
-
}
|
38
|
-
var k = p;
|
39
|
-
p.default = p;
|
40
|
-
export {
|
41
|
-
k as f
|
42
|
-
};
|
43
|
-
//# sourceMappingURL=fromJSON.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"fromJSON.js","sources":["../../../../node_modules/postcss/lib/fromJSON.js"],"sourcesContent":["'use strict'\n\nlet Declaration = require('./declaration')\nlet PreviousMap = require('./previous-map')\nlet Comment = require('./comment')\nlet AtRule = require('./at-rule')\nlet Input = require('./input')\nlet Root = require('./root')\nlet Rule = require('./rule')\n\nfunction fromJSON(json, inputs) {\n if (Array.isArray(json)) return json.map(n => fromJSON(n))\n\n let { inputs: ownInputs, ...defaults } = json\n if (ownInputs) {\n inputs = []\n for (let input of ownInputs) {\n let inputHydrated = { ...input, __proto__: Input.prototype }\n if (inputHydrated.map) {\n inputHydrated.map = {\n ...inputHydrated.map,\n __proto__: PreviousMap.prototype\n }\n }\n inputs.push(inputHydrated)\n }\n }\n if (defaults.nodes) {\n defaults.nodes = json.nodes.map(n => fromJSON(n, inputs))\n }\n if (defaults.source) {\n let { inputId, ...source } = defaults.source\n defaults.source = source\n if (inputId != null) {\n defaults.source.input = inputs[inputId]\n }\n }\n if (defaults.type === 'root') {\n return new Root(defaults)\n } else if (defaults.type === 'decl') {\n return new Declaration(defaults)\n } else if (defaults.type === 'rule') {\n return new Rule(defaults)\n } else if (defaults.type === 'comment') {\n return new Comment(defaults)\n } else if (defaults.type === 'atrule') {\n return new AtRule(defaults)\n } else {\n throw new Error('Unknown node type: ' + json.type)\n }\n}\n\nmodule.exports = fromJSON\nfromJSON.default = fromJSON\n"],"names":["Declaration","require$$0","PreviousMap","require$$1","Comment","require$$2","AtRule","require$$3","Input","require$$4","Root","require$$5","Rule","require$$6","fromJSON","json","inputs","n","ownInputs","defaults","input","inputHydrated","inputId","source","fromJSON_1"],"mappings":";;;;;;;AAEA,IAAIA,IAAcC,GACdC,IAAcC,GACdC,IAAUC,GACVC,IAASC,GACTC,IAAQC,GACRC,IAAOC,GACPC,IAAOC;AAEX,SAASC,EAASC,GAAMC,GAAQ;AAC9B,MAAI,MAAM,QAAQD,CAAI,EAAG,QAAOA,EAAK,IAAI,CAAAE,MAAKH,EAASG,CAAC,CAAC;AAEzD,MAAI,EAAE,QAAQC,GAAW,GAAGC,EAAU,IAAGJ;AACzC,MAAIG,GAAW;AACb,IAAAF,IAAS,CAAE;AACX,aAASI,KAASF,GAAW;AAC3B,UAAIG,IAAgB,EAAE,GAAGD,GAAO,WAAWZ,EAAM,UAAW;AAC5D,MAAIa,EAAc,QAChBA,EAAc,MAAM;AAAA,QAClB,GAAGA,EAAc;AAAA,QACjB,WAAWnB,EAAY;AAAA,MACxB,IAEHc,EAAO,KAAKK,CAAa;AAAA,IAC1B;AAAA,EACF;AAID,MAHIF,EAAS,UACXA,EAAS,QAAQJ,EAAK,MAAM,IAAI,CAAAE,MAAKH,EAASG,GAAGD,CAAM,CAAC,IAEtDG,EAAS,QAAQ;AACnB,QAAI,EAAE,SAAAG,GAAS,GAAGC,EAAQ,IAAGJ,EAAS;AACtC,IAAAA,EAAS,SAASI,GACdD,KAAW,SACbH,EAAS,OAAO,QAAQH,EAAOM,CAAO;AAAA,EAEzC;AACD,MAAIH,EAAS,SAAS;AACpB,WAAO,IAAIT,EAAKS,CAAQ;AACnB,MAAIA,EAAS,SAAS;AAC3B,WAAO,IAAInB,EAAYmB,CAAQ;AAC1B,MAAIA,EAAS,SAAS;AAC3B,WAAO,IAAIP,EAAKO,CAAQ;AACnB,MAAIA,EAAS,SAAS;AAC3B,WAAO,IAAIf,EAAQe,CAAQ;AACtB,MAAIA,EAAS,SAAS;AAC3B,WAAO,IAAIb,EAAOa,CAAQ;AAE1B,QAAM,IAAI,MAAM,wBAAwBJ,EAAK,IAAI;AAErD;AAEA,IAAAS,IAAiBV;AACjBA,EAAS,UAAUA;","x_google_ignoreList":[0]}
|
@@ -1,134 +0,0 @@
|
|
1
|
-
import c from "../../../_virtual/___vite-browser-external.js";
|
2
|
-
import { n as v } from "../../nanoid/non-secure/index.js";
|
3
|
-
import { c as F } from "./css-syntax-error.js";
|
4
|
-
import { p as y } from "./previous-map.js";
|
5
|
-
let { SourceMapConsumer: O, SourceMapGenerator: L } = c, { fileURLToPath: C, pathToFileURL: a } = c, { isAbsolute: g, resolve: S } = c, { nanoid: M } = v, p = c, b = F, x = y, d = Symbol("fromOffsetCache"), R = !!(O && L), w = !!(S && g);
|
6
|
-
class m {
|
7
|
-
constructor(t, i = {}) {
|
8
|
-
if (t === null || typeof t > "u" || typeof t == "object" && !t.toString)
|
9
|
-
throw new Error(`PostCSS received ${t} instead of CSS string`);
|
10
|
-
if (this.css = t.toString(), this.css[0] === "\uFEFF" || this.css[0] === "" ? (this.hasBOM = !0, this.css = this.css.slice(1)) : this.hasBOM = !1, i.from && (!w || /^\w+:\/\//.test(i.from) || g(i.from) ? this.file = i.from : this.file = S(i.from)), w && R) {
|
11
|
-
let e = new x(this.css, i);
|
12
|
-
if (e.text) {
|
13
|
-
this.map = e;
|
14
|
-
let o = e.consumer().file;
|
15
|
-
!this.file && o && (this.file = this.mapResolve(o));
|
16
|
-
}
|
17
|
-
}
|
18
|
-
this.file || (this.id = "<input css " + M(6) + ">"), this.map && (this.map.file = this.from);
|
19
|
-
}
|
20
|
-
error(t, i, e, o = {}) {
|
21
|
-
let l, s, n;
|
22
|
-
if (i && typeof i == "object") {
|
23
|
-
let f = i, u = e;
|
24
|
-
if (typeof f.offset == "number") {
|
25
|
-
let h = this.fromOffset(f.offset);
|
26
|
-
i = h.line, e = h.col;
|
27
|
-
} else
|
28
|
-
i = f.line, e = f.column;
|
29
|
-
if (typeof u.offset == "number") {
|
30
|
-
let h = this.fromOffset(u.offset);
|
31
|
-
s = h.line, n = h.col;
|
32
|
-
} else
|
33
|
-
s = u.line, n = u.column;
|
34
|
-
} else if (!e) {
|
35
|
-
let f = this.fromOffset(i);
|
36
|
-
i = f.line, e = f.col;
|
37
|
-
}
|
38
|
-
let r = this.origin(i, e, s, n);
|
39
|
-
return r ? l = new b(
|
40
|
-
t,
|
41
|
-
r.endLine === void 0 ? r.line : { column: r.column, line: r.line },
|
42
|
-
r.endLine === void 0 ? r.column : { column: r.endColumn, line: r.endLine },
|
43
|
-
r.source,
|
44
|
-
r.file,
|
45
|
-
o.plugin
|
46
|
-
) : l = new b(
|
47
|
-
t,
|
48
|
-
s === void 0 ? i : { column: e, line: i },
|
49
|
-
s === void 0 ? e : { column: n, line: s },
|
50
|
-
this.css,
|
51
|
-
this.file,
|
52
|
-
o.plugin
|
53
|
-
), l.input = { column: e, endColumn: n, endLine: s, line: i, source: this.css }, this.file && (a && (l.input.url = a(this.file).toString()), l.input.file = this.file), l;
|
54
|
-
}
|
55
|
-
fromOffset(t) {
|
56
|
-
let i, e;
|
57
|
-
if (this[d])
|
58
|
-
e = this[d];
|
59
|
-
else {
|
60
|
-
let l = this.css.split(`
|
61
|
-
`);
|
62
|
-
e = new Array(l.length);
|
63
|
-
let s = 0;
|
64
|
-
for (let n = 0, r = l.length; n < r; n++)
|
65
|
-
e[n] = s, s += l[n].length + 1;
|
66
|
-
this[d] = e;
|
67
|
-
}
|
68
|
-
i = e[e.length - 1];
|
69
|
-
let o = 0;
|
70
|
-
if (t >= i)
|
71
|
-
o = e.length - 1;
|
72
|
-
else {
|
73
|
-
let l = e.length - 2, s;
|
74
|
-
for (; o < l; )
|
75
|
-
if (s = o + (l - o >> 1), t < e[s])
|
76
|
-
l = s - 1;
|
77
|
-
else if (t >= e[s + 1])
|
78
|
-
o = s + 1;
|
79
|
-
else {
|
80
|
-
o = s;
|
81
|
-
break;
|
82
|
-
}
|
83
|
-
}
|
84
|
-
return {
|
85
|
-
col: t - e[o] + 1,
|
86
|
-
line: o + 1
|
87
|
-
};
|
88
|
-
}
|
89
|
-
mapResolve(t) {
|
90
|
-
return /^\w+:\/\//.test(t) ? t : S(this.map.consumer().sourceRoot || this.map.root || ".", t);
|
91
|
-
}
|
92
|
-
origin(t, i, e, o) {
|
93
|
-
if (!this.map) return !1;
|
94
|
-
let l = this.map.consumer(), s = l.originalPositionFor({ column: i, line: t });
|
95
|
-
if (!s.source) return !1;
|
96
|
-
let n;
|
97
|
-
typeof e == "number" && (n = l.originalPositionFor({ column: o, line: e }));
|
98
|
-
let r;
|
99
|
-
g(s.source) ? r = a(s.source) : r = new URL(
|
100
|
-
s.source,
|
101
|
-
this.map.consumer().sourceRoot || a(this.map.mapFile)
|
102
|
-
);
|
103
|
-
let f = {
|
104
|
-
column: s.column,
|
105
|
-
endColumn: n && n.column,
|
106
|
-
endLine: n && n.line,
|
107
|
-
line: s.line,
|
108
|
-
url: r.toString()
|
109
|
-
};
|
110
|
-
if (r.protocol === "file:")
|
111
|
-
if (C)
|
112
|
-
f.file = C(r);
|
113
|
-
else
|
114
|
-
throw new Error("file: protocol is not available in this PostCSS build");
|
115
|
-
let u = l.sourceContentFor(s.source);
|
116
|
-
return u && (f.source = u), f;
|
117
|
-
}
|
118
|
-
toJSON() {
|
119
|
-
let t = {};
|
120
|
-
for (let i of ["hasBOM", "css", "file", "id"])
|
121
|
-
this[i] != null && (t[i] = this[i]);
|
122
|
-
return this.map && (t.map = { ...this.map }, t.map.consumerCache && (t.map.consumerCache = void 0)), t;
|
123
|
-
}
|
124
|
-
get from() {
|
125
|
-
return this.file || this.id;
|
126
|
-
}
|
127
|
-
}
|
128
|
-
var U = m;
|
129
|
-
m.default = m;
|
130
|
-
p && p.registerInput && p.registerInput(m);
|
131
|
-
export {
|
132
|
-
U as i
|
133
|
-
};
|
134
|
-
//# sourceMappingURL=input.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"input.js","sources":["../../../../node_modules/postcss/lib/input.js"],"sourcesContent":["'use strict'\n\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\nlet { fileURLToPath, pathToFileURL } = require('url')\nlet { isAbsolute, resolve } = require('path')\nlet { nanoid } = require('nanoid/non-secure')\n\nlet terminalHighlight = require('./terminal-highlight')\nlet CssSyntaxError = require('./css-syntax-error')\nlet PreviousMap = require('./previous-map')\n\nlet fromOffsetCache = Symbol('fromOffsetCache')\n\nlet sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)\nlet pathAvailable = Boolean(resolve && isAbsolute)\n\nclass Input {\n constructor(css, opts = {}) {\n if (\n css === null ||\n typeof css === 'undefined' ||\n (typeof css === 'object' && !css.toString)\n ) {\n throw new Error(`PostCSS received ${css} instead of CSS string`)\n }\n\n this.css = css.toString()\n\n if (this.css[0] === '\\uFEFF' || this.css[0] === '\\uFFFE') {\n this.hasBOM = true\n this.css = this.css.slice(1)\n } else {\n this.hasBOM = false\n }\n\n if (opts.from) {\n if (\n !pathAvailable ||\n /^\\w+:\\/\\//.test(opts.from) ||\n isAbsolute(opts.from)\n ) {\n this.file = opts.from\n } else {\n this.file = resolve(opts.from)\n }\n }\n\n if (pathAvailable && sourceMapAvailable) {\n let map = new PreviousMap(this.css, opts)\n if (map.text) {\n this.map = map\n let file = map.consumer().file\n if (!this.file && file) this.file = this.mapResolve(file)\n }\n }\n\n if (!this.file) {\n this.id = '<input css ' + nanoid(6) + '>'\n }\n if (this.map) this.map.file = this.from\n }\n\n error(message, line, column, opts = {}) {\n let result, endLine, endColumn\n\n if (line && typeof line === 'object') {\n let start = line\n let end = column\n if (typeof start.offset === 'number') {\n let pos = this.fromOffset(start.offset)\n line = pos.line\n column = pos.col\n } else {\n line = start.line\n column = start.column\n }\n if (typeof end.offset === 'number') {\n let pos = this.fromOffset(end.offset)\n endLine = pos.line\n endColumn = pos.col\n } else {\n endLine = end.line\n endColumn = end.column\n }\n } else if (!column) {\n let pos = this.fromOffset(line)\n line = pos.line\n column = pos.col\n }\n\n let origin = this.origin(line, column, endLine, endColumn)\n if (origin) {\n result = new CssSyntaxError(\n message,\n origin.endLine === undefined\n ? origin.line\n : { column: origin.column, line: origin.line },\n origin.endLine === undefined\n ? origin.column\n : { column: origin.endColumn, line: origin.endLine },\n origin.source,\n origin.file,\n opts.plugin\n )\n } else {\n result = new CssSyntaxError(\n message,\n endLine === undefined ? line : { column, line },\n endLine === undefined ? column : { column: endColumn, line: endLine },\n this.css,\n this.file,\n opts.plugin\n )\n }\n\n result.input = { column, endColumn, endLine, line, source: this.css }\n if (this.file) {\n if (pathToFileURL) {\n result.input.url = pathToFileURL(this.file).toString()\n }\n result.input.file = this.file\n }\n\n return result\n }\n\n fromOffset(offset) {\n let lastLine, lineToIndex\n if (!this[fromOffsetCache]) {\n let lines = this.css.split('\\n')\n lineToIndex = new Array(lines.length)\n let prevIndex = 0\n\n for (let i = 0, l = lines.length; i < l; i++) {\n lineToIndex[i] = prevIndex\n prevIndex += lines[i].length + 1\n }\n\n this[fromOffsetCache] = lineToIndex\n } else {\n lineToIndex = this[fromOffsetCache]\n }\n lastLine = lineToIndex[lineToIndex.length - 1]\n\n let min = 0\n if (offset >= lastLine) {\n min = lineToIndex.length - 1\n } else {\n let max = lineToIndex.length - 2\n let mid\n while (min < max) {\n mid = min + ((max - min) >> 1)\n if (offset < lineToIndex[mid]) {\n max = mid - 1\n } else if (offset >= lineToIndex[mid + 1]) {\n min = mid + 1\n } else {\n min = mid\n break\n }\n }\n }\n return {\n col: offset - lineToIndex[min] + 1,\n line: min + 1\n }\n }\n\n mapResolve(file) {\n if (/^\\w+:\\/\\//.test(file)) {\n return file\n }\n return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file)\n }\n\n origin(line, column, endLine, endColumn) {\n if (!this.map) return false\n let consumer = this.map.consumer()\n\n let from = consumer.originalPositionFor({ column, line })\n if (!from.source) return false\n\n let to\n if (typeof endLine === 'number') {\n to = consumer.originalPositionFor({ column: endColumn, line: endLine })\n }\n\n let fromUrl\n\n if (isAbsolute(from.source)) {\n fromUrl = pathToFileURL(from.source)\n } else {\n fromUrl = new URL(\n from.source,\n this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)\n )\n }\n\n let result = {\n column: from.column,\n endColumn: to && to.column,\n endLine: to && to.line,\n line: from.line,\n url: fromUrl.toString()\n }\n\n if (fromUrl.protocol === 'file:') {\n if (fileURLToPath) {\n result.file = fileURLToPath(fromUrl)\n } else {\n /* c8 ignore next 2 */\n throw new Error(`file: protocol is not available in this PostCSS build`)\n }\n }\n\n let source = consumer.sourceContentFor(from.source)\n if (source) result.source = source\n\n return result\n }\n\n toJSON() {\n let json = {}\n for (let name of ['hasBOM', 'css', 'file', 'id']) {\n if (this[name] != null) {\n json[name] = this[name]\n }\n }\n if (this.map) {\n json.map = { ...this.map }\n if (json.map.consumerCache) {\n json.map.consumerCache = undefined\n }\n }\n return json\n }\n\n get from() {\n return this.file || this.id\n }\n}\n\nmodule.exports = Input\nInput.default = Input\n\nif (terminalHighlight && terminalHighlight.registerInput) {\n terminalHighlight.registerInput(Input)\n}\n"],"names":["SourceMapConsumer","SourceMapGenerator","require$$0","fileURLToPath","pathToFileURL","require$$1","isAbsolute","resolve","require$$2","nanoid","require$$3","terminalHighlight","require$$4","CssSyntaxError","require$$5","PreviousMap","require$$6","fromOffsetCache","sourceMapAvailable","pathAvailable","Input","css","opts","map","file","message","line","column","result","endLine","endColumn","start","end","pos","origin","offset","lastLine","lineToIndex","lines","prevIndex","i","l","min","max","mid","consumer","from","to","fromUrl","source","json","name","input"],"mappings":";;;;AAE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