@angular/material
Version:
Angular Material
1,474 lines (1,449 loc) • 236 kB
JavaScript
"use strict";
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __objRest = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
target[prop] = source[prop];
}
return target;
};
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
// src/material/schematics/ng-update/data/attribute-selectors.js
var require_attribute_selectors = __commonJS({
"src/material/schematics/ng-update/data/attribute-selectors.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.attributeSelectors = void 0;
exports2.attributeSelectors = {};
}
});
// src/material/schematics/ng-update/data/class-names.js
var require_class_names = __commonJS({
"src/material/schematics/ng-update/data/class-names.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.classNames = void 0;
exports2.classNames = {};
}
});
// src/material/schematics/ng-update/data/constructor-checks.js
var require_constructor_checks = __commonJS({
"src/material/schematics/ng-update/data/constructor-checks.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.constructorChecks = void 0;
exports2.constructorChecks = {};
}
});
// src/material/schematics/ng-update/data/css-selectors.js
var require_css_selectors = __commonJS({
"src/material/schematics/ng-update/data/css-selectors.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.cssSelectors = void 0;
exports2.cssSelectors = {};
}
});
// src/material/schematics/ng-update/data/css-tokens.js
var require_css_tokens = __commonJS({
"src/material/schematics/ng-update/data/css-tokens.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.cssTokens = void 0;
exports2.cssTokens = {};
}
});
// src/material/schematics/ng-update/data/element-selectors.js
var require_element_selectors = __commonJS({
"src/material/schematics/ng-update/data/element-selectors.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.elementSelectors = void 0;
exports2.elementSelectors = {};
}
});
// src/material/schematics/ng-update/data/input-names.js
var require_input_names = __commonJS({
"src/material/schematics/ng-update/data/input-names.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.inputNames = void 0;
exports2.inputNames = {};
}
});
// src/material/schematics/ng-update/data/method-call-checks.js
var require_method_call_checks = __commonJS({
"src/material/schematics/ng-update/data/method-call-checks.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.methodCallChecks = void 0;
exports2.methodCallChecks = {};
}
});
// src/material/schematics/ng-update/data/output-names.js
var require_output_names = __commonJS({
"src/material/schematics/ng-update/data/output-names.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.outputNames = void 0;
exports2.outputNames = {};
}
});
// src/material/schematics/ng-update/data/property-names.js
var require_property_names = __commonJS({
"src/material/schematics/ng-update/data/property-names.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.propertyNames = void 0;
exports2.propertyNames = {};
}
});
// src/material/schematics/ng-update/data/symbol-removal.js
var require_symbol_removal = __commonJS({
"src/material/schematics/ng-update/data/symbol-removal.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.symbolRemoval = void 0;
exports2.symbolRemoval = {};
}
});
// src/material/schematics/ng-update/data/index.js
var require_data = __commonJS({
"src/material/schematics/ng-update/data/index.js"(exports2) {
"use strict";
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p);
};
Object.defineProperty(exports2, "__esModule", { value: true });
__exportStar(require_attribute_selectors(), exports2);
__exportStar(require_class_names(), exports2);
__exportStar(require_constructor_checks(), exports2);
__exportStar(require_css_selectors(), exports2);
__exportStar(require_css_tokens(), exports2);
__exportStar(require_element_selectors(), exports2);
__exportStar(require_input_names(), exports2);
__exportStar(require_method_call_checks(), exports2);
__exportStar(require_output_names(), exports2);
__exportStar(require_property_names(), exports2);
__exportStar(require_symbol_removal(), exports2);
}
});
// src/material/schematics/ng-update/upgrade-data.js
var require_upgrade_data = __commonJS({
"src/material/schematics/ng-update/upgrade-data.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.materialUpgradeData = void 0;
var data_1 = require_data();
exports2.materialUpgradeData = {
attributeSelectors: data_1.attributeSelectors,
classNames: data_1.classNames,
constructorChecks: data_1.constructorChecks,
cssSelectors: data_1.cssSelectors,
cssTokens: data_1.cssTokens,
elementSelectors: data_1.elementSelectors,
inputNames: data_1.inputNames,
methodCallChecks: data_1.methodCallChecks,
outputNames: data_1.outputNames,
propertyNames: data_1.propertyNames,
symbolRemoval: data_1.symbolRemoval
};
}
});
// node_modules/.aspect_rules_js/picocolors@1.1.1/node_modules/picocolors/picocolors.js
var require_picocolors = __commonJS({
"node_modules/.aspect_rules_js/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports2, module2) {
var p = process || {};
var argv = p.argv || [];
var env = p.env || {};
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
var formatter = (open, close, replace = open) => (input) => {
let string = "" + input, index = string.indexOf(close, open.length);
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
};
var replaceClose = (string, close, replace, index) => {
let result = "", cursor = 0;
do {
result += string.substring(cursor, index) + replace;
cursor = index + close.length;
index = string.indexOf(close, cursor);
} while (~index);
return result + string.substring(cursor);
};
var createColors = (enabled = isColorSupported) => {
let f = enabled ? formatter : () => String;
return {
isColorSupported: enabled,
reset: f("\x1B[0m", "\x1B[0m"),
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
italic: f("\x1B[3m", "\x1B[23m"),
underline: f("\x1B[4m", "\x1B[24m"),
inverse: f("\x1B[7m", "\x1B[27m"),
hidden: f("\x1B[8m", "\x1B[28m"),
strikethrough: f("\x1B[9m", "\x1B[29m"),
black: f("\x1B[30m", "\x1B[39m"),
red: f("\x1B[31m", "\x1B[39m"),
green: f("\x1B[32m", "\x1B[39m"),
yellow: f("\x1B[33m", "\x1B[39m"),
blue: f("\x1B[34m", "\x1B[39m"),
magenta: f("\x1B[35m", "\x1B[39m"),
cyan: f("\x1B[36m", "\x1B[39m"),
white: f("\x1B[37m", "\x1B[39m"),
gray: f("\x1B[90m", "\x1B[39m"),
bgBlack: f("\x1B[40m", "\x1B[49m"),
bgRed: f("\x1B[41m", "\x1B[49m"),
bgGreen: f("\x1B[42m", "\x1B[49m"),
bgYellow: f("\x1B[43m", "\x1B[49m"),
bgBlue: f("\x1B[44m", "\x1B[49m"),
bgMagenta: f("\x1B[45m", "\x1B[49m"),
bgCyan: f("\x1B[46m", "\x1B[49m"),
bgWhite: f("\x1B[47m", "\x1B[49m"),
blackBright: f("\x1B[90m", "\x1B[39m"),
redBright: f("\x1B[91m", "\x1B[39m"),
greenBright: f("\x1B[92m", "\x1B[39m"),
yellowBright: f("\x1B[93m", "\x1B[39m"),
blueBright: f("\x1B[94m", "\x1B[39m"),
magentaBright: f("\x1B[95m", "\x1B[39m"),
cyanBright: f("\x1B[96m", "\x1B[39m"),
whiteBright: f("\x1B[97m", "\x1B[39m"),
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
bgRedBright: f("\x1B[101m", "\x1B[49m"),
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
};
};
module2.exports = createColors();
module2.exports.createColors = createColors;
}
});
// node_modules/.aspect_rules_js/postcss@8.5.3/node_modules/postcss/lib/tokenize.js
var require_tokenize = __commonJS({
"node_modules/.aspect_rules_js/postcss@8.5.3/node_modules/postcss/lib/tokenize.js"(exports2, module2) {
"use strict";
var SINGLE_QUOTE = "'".charCodeAt(0);
var DOUBLE_QUOTE = '"'.charCodeAt(0);
var BACKSLASH = "\\".charCodeAt(0);
var SLASH = "/".charCodeAt(0);
var NEWLINE = "\n".charCodeAt(0);
var SPACE = " ".charCodeAt(0);
var FEED = "\f".charCodeAt(0);
var TAB = " ".charCodeAt(0);
var CR = "\r".charCodeAt(0);
var OPEN_SQUARE = "[".charCodeAt(0);
var CLOSE_SQUARE = "]".charCodeAt(0);
var OPEN_PARENTHESES = "(".charCodeAt(0);
var CLOSE_PARENTHESES = ")".charCodeAt(0);
var OPEN_CURLY = "{".charCodeAt(0);
var CLOSE_CURLY = "}".charCodeAt(0);
var SEMICOLON = ";".charCodeAt(0);
var ASTERISK = "*".charCodeAt(0);
var COLON = ":".charCodeAt(0);
var AT = "@".charCodeAt(0);
var RE_AT_END = /[\t\n\f\r "#'()/;[\\\]{}]/g;
var RE_WORD_END = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g;
var RE_BAD_BRACKET = /.[\r\n"'(/\\]/;
var RE_HEX_ESCAPE = /[\da-f]/i;
module2.exports = function tokenizer(input, options = {}) {
let css = input.css.valueOf();
let ignore = options.ignoreErrors;
let code, content, escape, next, quote;
let currentToken, escaped, escapePos, n, prev;
let length = css.length;
let pos = 0;
let buffer = [];
let returned = [];
function position() {
return pos;
}
function unclosed(what) {
throw input.error("Unclosed " + what, pos);
}
function endOfFile() {
return returned.length === 0 && pos >= length;
}
function nextToken(opts) {
if (returned.length) return returned.pop();
if (pos >= length) return;
let ignoreUnclosed = opts ? opts.ignoreUnclosed : false;
code = css.charCodeAt(pos);
switch (code) {
case NEWLINE:
case SPACE:
case TAB:
case CR:
case FEED: {
next = pos;
do {
next += 1;
code = css.charCodeAt(next);
} while (code === SPACE || code === NEWLINE || code === TAB || code === CR || code === FEED);
currentToken = ["space", css.slice(pos, next)];
pos = next - 1;
break;
}
case OPEN_SQUARE:
case CLOSE_SQUARE:
case OPEN_CURLY:
case CLOSE_CURLY:
case COLON:
case SEMICOLON:
case CLOSE_PARENTHESES: {
let controlChar = String.fromCharCode(code);
currentToken = [controlChar, controlChar, pos];
break;
}
case OPEN_PARENTHESES: {
prev = buffer.length ? buffer.pop()[1] : "";
n = css.charCodeAt(pos + 1);
if (prev === "url" && n !== SINGLE_QUOTE && n !== DOUBLE_QUOTE && n !== SPACE && n !== NEWLINE && n !== TAB && n !== FEED && n !== CR) {
next = pos;
do {
escaped = false;
next = css.indexOf(")", next + 1);
if (next === -1) {
if (ignore || ignoreUnclosed) {
next = pos;
break;
} else {
unclosed("bracket");
}
}
escapePos = next;
while (css.charCodeAt(escapePos - 1) === BACKSLASH) {
escapePos -= 1;
escaped = !escaped;
}
} while (escaped);
currentToken = ["brackets", css.slice(pos, next + 1), pos, next];
pos = next;
} else {
next = css.indexOf(")", pos + 1);
content = css.slice(pos, next + 1);
if (next === -1 || RE_BAD_BRACKET.test(content)) {
currentToken = ["(", "(", pos];
} else {
currentToken = ["brackets", content, pos, next];
pos = next;
}
}
break;
}
case SINGLE_QUOTE:
case DOUBLE_QUOTE: {
quote = code === SINGLE_QUOTE ? "'" : '"';
next = pos;
do {
escaped = false;
next = css.indexOf(quote, next + 1);
if (next === -1) {
if (ignore || ignoreUnclosed) {
next = pos + 1;
break;
} else {
unclosed("string");
}
}
escapePos = next;
while (css.charCodeAt(escapePos - 1) === BACKSLASH) {
escapePos -= 1;
escaped = !escaped;
}
} while (escaped);
currentToken = ["string", css.slice(pos, next + 1), pos, next];
pos = next;
break;
}
case AT: {
RE_AT_END.lastIndex = pos + 1;
RE_AT_END.test(css);
if (RE_AT_END.lastIndex === 0) {
next = css.length - 1;
} else {
next = RE_AT_END.lastIndex - 2;
}
currentToken = ["at-word", css.slice(pos, next + 1), pos, next];
pos = next;
break;
}
case BACKSLASH: {
next = pos;
escape = true;
while (css.charCodeAt(next + 1) === BACKSLASH) {
next += 1;
escape = !escape;
}
code = css.charCodeAt(next + 1);
if (escape && code !== SLASH && code !== SPACE && code !== NEWLINE && code !== TAB && code !== CR && code !== FEED) {
next += 1;
if (RE_HEX_ESCAPE.test(css.charAt(next))) {
while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) {
next += 1;
}
if (css.charCodeAt(next + 1) === SPACE) {
next += 1;
}
}
}
currentToken = ["word", css.slice(pos, next + 1), pos, next];
pos = next;
break;
}
default: {
if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) {
next = css.indexOf("*/", pos + 2) + 1;
if (next === 0) {
if (ignore || ignoreUnclosed) {
next = css.length;
} else {
unclosed("comment");
}
}
currentToken = ["comment", css.slice(pos, next + 1), pos, next];
pos = next;
} else {
RE_WORD_END.lastIndex = pos + 1;
RE_WORD_END.test(css);
if (RE_WORD_END.lastIndex === 0) {
next = css.length - 1;
} else {
next = RE_WORD_END.lastIndex - 2;
}
currentToken = ["word", css.slice(pos, next + 1), pos, next];
buffer.push(currentToken);
pos = next;
}
break;
}
}
pos++;
return currentToken;
}
function back(token) {
returned.push(token);
}
return {
back,
endOfFile,
nextToken,
position
};
};
}
});
// node_modules/.aspect_rules_js/postcss@8.5.3/node_modules/postcss/lib/terminal-highlight.js
var require_terminal_highlight = __commonJS({
"node_modules/.aspect_rules_js/postcss@8.5.3/node_modules/postcss/lib/terminal-highlight.js"(exports2, module2) {
"use strict";
var pico = require_picocolors();
var tokenizer = require_tokenize();
var Input;
function registerInput(dependant) {
Input = dependant;
}
var HIGHLIGHT_THEME = {
";": pico.yellow,
":": pico.yellow,
"(": pico.cyan,
")": pico.cyan,
"[": pico.yellow,
"]": pico.yellow,
"{": pico.yellow,
"}": pico.yellow,
"at-word": pico.cyan,
"brackets": pico.cyan,
"call": pico.cyan,
"class": pico.yellow,
"comment": pico.gray,
"hash": pico.magenta,
"string": pico.green
};
function getTokenType([type, value], processor) {
if (type === "word") {
if (value[0] === ".") {
return "class";
}
if (value[0] === "#") {
return "hash";
}
}
if (!processor.endOfFile()) {
let next = processor.nextToken();
processor.back(next);
if (next[0] === "brackets" || next[0] === "(") return "call";
}
return type;
}
function terminalHighlight(css) {
let processor = tokenizer(new Input(css), { ignoreErrors: true });
let result = "";
while (!processor.endOfFile()) {
let token = processor.nextToken();
let color = HIGHLIGHT_THEME[getTokenType(token, processor)];
if (color) {
result += token[1].split(/\r?\n/).map((i) => color(i)).join("\n");
} else {
result += token[1];
}
}
return result;
}
terminalHighlight.registerInput = registerInput;
module2.exports = terminalHighlight;
}
});
// node_modules/.aspect_rules_js/postcss@8.5.3/node_modules/postcss/lib/css-syntax-error.js
var require_css_syntax_error = __commonJS({
"node_modules/.aspect_rules_js/postcss@8.5.3/node_modules/postcss/lib/css-syntax-error.js"(exports2, module2) {
"use strict";
var pico = require_picocolors();
var terminalHighlight = require_terminal_highlight();
var CssSyntaxError = class _CssSyntaxError extends Error {
constructor(message, line, column, source, file, plugin) {
super(message);
this.name = "CssSyntaxError";
this.reason = message;
if (file) {
this.file = file;
}
if (source) {
this.source = source;
}
if (plugin) {
this.plugin = plugin;
}
if (typeof line !== "undefined" && typeof column !== "undefined") {
if (typeof line === "number") {
this.line = line;
this.column = column;
} else {
this.line = line.line;
this.column = line.column;
this.endLine = column.line;
this.endColumn = column.column;
}
}
this.setMessage();
if (Error.captureStackTrace) {
Error.captureStackTrace(this, _CssSyntaxError);
}
}
setMessage() {
this.message = this.plugin ? this.plugin + ": " : "";
this.message += this.file ? this.file : "<css input>";
if (typeof this.line !== "undefined") {
this.message += ":" + this.line + ":" + this.column;
}
this.message += ": " + this.reason;
}
showSourceCode(color) {
if (!this.source) return "";
let css = this.source;
if (color == null) color = pico.isColorSupported;
let aside = (text) => text;
let mark = (text) => text;
let highlight = (text) => text;
if (color) {
let { bold, gray, red } = pico.createColors(true);
mark = (text) => bold(red(text));
aside = (text) => gray(text);
if (terminalHighlight) {
highlight = (text) => terminalHighlight(text);
}
}
let lines = css.split(/\r?\n/);
let start = Math.max(this.line - 3, 0);
let end = Math.min(this.line + 2, lines.length);
let maxWidth = String(end).length;
return lines.slice(start, end).map((line, index) => {
let number = start + 1 + index;
let gutter = " " + (" " + number).slice(-maxWidth) + " | ";
if (number === this.line) {
if (line.length > 160) {
let padding = 20;
let subLineStart = Math.max(0, this.column - padding);
let subLineEnd = Math.max(
this.column + padding,
this.endColumn + padding
);
let subLine = line.slice(subLineStart, subLineEnd);
let spacing2 = aside(gutter.replace(/\d/g, " ")) + line.slice(0, Math.min(this.column - 1, padding - 1)).replace(/[^\t]/g, " ");
return mark(">") + aside(gutter) + highlight(subLine) + "\n " + spacing2 + mark("^");
}
let spacing = aside(gutter.replace(/\d/g, " ")) + line.slice(0, this.column - 1).replace(/[^\t]/g, " ");
return mark(">") + aside(gutter) + highlight(line) + "\n " + spacing + mark("^");
}
return " " + aside(gutter) + highlight(line);
}).join("\n");
}
toString() {
let code = this.showSourceCode();
if (code) {
code = "\n\n" + code + "\n";
}
return this.name + ": " + this.message + code;
}
};
module2.exports = CssSyntaxError;
CssSyntaxError.default = CssSyntaxError;
}
});
// node_modules/.aspect_rules_js/postcss@8.5.3/node_modules/postcss/lib/stringifier.js
var require_stringifier = __commonJS({
"node_modules/.aspect_rules_js/postcss@8.5.3/node_modules/postcss/lib/stringifier.js"(exports2, module2) {
"use strict";
var DEFAULT_RAW = {
after: "\n",
beforeClose: "\n",
beforeComment: "\n",
beforeDecl: "\n",
beforeOpen: " ",
beforeRule: "\n",
colon: ": ",
commentLeft: " ",
commentRight: " ",
emptyBody: "",
indent: " ",
semicolon: false
};
function capitalize(str) {
return str[0].toUpperCase() + str.slice(1);
}
var Stringifier = class {
constructor(builder) {
this.builder = builder;
}
atrule(node, semicolon) {
let name = "@" + node.name;
let params = node.params ? this.rawValue(node, "params") : "";
if (typeof node.raws.afterName !== "undefined") {
name += node.raws.afterName;
} else if (params) {
name += " ";
}
if (node.nodes) {
this.block(node, name + params);
} else {
let end = (node.raws.between || "") + (semicolon ? ";" : "");
this.builder(name + params + end, node);
}
}
beforeAfter(node, detect) {
let value;
if (node.type === "decl") {
value = this.raw(node, null, "beforeDecl");
} else if (node.type === "comment") {
value = this.raw(node, null, "beforeComment");
} else if (detect === "before") {
value = this.raw(node, null, "beforeRule");
} else {
value = this.raw(node, null, "beforeClose");
}
let buf = node.parent;
let depth = 0;
while (buf && buf.type !== "root") {
depth += 1;
buf = buf.parent;
}
if (value.includes("\n")) {
let indent = this.raw(node, null, "indent");
if (indent.length) {
for (let step = 0; step < depth; step++) value += indent;
}
}
return value;
}
block(node, start) {
let between = this.raw(node, "between", "beforeOpen");
this.builder(start + between + "{", node, "start");
let after;
if (node.nodes && node.nodes.length) {
this.body(node);
after = this.raw(node, "after");
} else {
after = this.raw(node, "after", "emptyBody");
}
if (after) this.builder(after);
this.builder("}", node, "end");
}
body(node) {
let last = node.nodes.length - 1;
while (last > 0) {
if (node.nodes[last].type !== "comment") break;
last -= 1;
}
let semicolon = this.raw(node, "semicolon");
for (let i = 0; i < node.nodes.length; i++) {
let child = node.nodes[i];
let before = this.raw(child, "before");
if (before) this.builder(before);
this.stringify(child, last !== i || semicolon);
}
}
comment(node) {
let left = this.raw(node, "left", "commentLeft");
let right = this.raw(node, "right", "commentRight");
this.builder("/*" + left + node.text + right + "*/", node);
}
decl(node, semicolon) {
let between = this.raw(node, "between", "colon");
let string = node.prop + between + this.rawValue(node, "value");
if (node.important) {
string += node.raws.important || " !important";
}
if (semicolon) string += ";";
this.builder(string, node);
}
document(node) {
this.body(node);
}
raw(node, own, detect) {
let value;
if (!detect) detect = own;
if (own) {
value = node.raws[own];
if (typeof value !== "undefined") return value;
}
let parent = node.parent;
if (detect === "before") {
if (!parent || parent.type === "root" && parent.first === node) {
return "";
}
if (parent && parent.type === "document") {
return "";
}
}
if (!parent) return DEFAULT_RAW[detect];
let root = node.root();
if (!root.rawCache) root.rawCache = {};
if (typeof root.rawCache[detect] !== "undefined") {
return root.rawCache[detect];
}
if (detect === "before" || detect === "after") {
return this.beforeAfter(node, detect);
} else {
let method = "raw" + capitalize(detect);
if (this[method]) {
value = this[method](root, node);
} else {
root.walk((i) => {
value = i.raws[own];
if (typeof value !== "undefined") return false;
});
}
}
if (typeof value === "undefined") value = DEFAULT_RAW[detect];
root.rawCache[detect] = value;
return value;
}
rawBeforeClose(root) {
let value;
root.walk((i) => {
if (i.nodes && i.nodes.length > 0) {
if (typeof i.raws.after !== "undefined") {
value = i.raws.after;
if (value.includes("\n")) {
value = value.replace(/[^\n]+$/, "");
}
return false;
}
}
});
if (value) value = value.replace(/\S/g, "");
return value;
}
rawBeforeComment(root, node) {
let value;
root.walkComments((i) => {
if (typeof i.raws.before !== "undefined") {
value = i.raws.before;
if (value.includes("\n")) {
value = value.replace(/[^\n]+$/, "");
}
return false;
}
});
if (typeof value === "undefined") {
value = this.raw(node, null, "beforeDecl");
} else if (value) {
value = value.replace(/\S/g, "");
}
return value;
}
rawBeforeDecl(root, node) {
let value;
root.walkDecls((i) => {
if (typeof i.raws.before !== "undefined") {
value = i.raws.before;
if (value.includes("\n")) {
value = value.replace(/[^\n]+$/, "");
}
return false;
}
});
if (typeof value === "undefined") {
value = this.raw(node, null, "beforeRule");
} else if (value) {
value = value.replace(/\S/g, "");
}
return value;
}
rawBeforeOpen(root) {
let value;
root.walk((i) => {
if (i.type !== "decl") {
value = i.raws.between;
if (typeof value !== "undefined") return false;
}
});
return value;
}
rawBeforeRule(root) {
let value;
root.walk((i) => {
if (i.nodes && (i.parent !== root || root.first !== i)) {
if (typeof i.raws.before !== "undefined") {
value = i.raws.before;
if (value.includes("\n")) {
value = value.replace(/[^\n]+$/, "");
}
return false;
}
}
});
if (value) value = value.replace(/\S/g, "");
return value;
}
rawColon(root) {
let value;
root.walkDecls((i) => {
if (typeof i.raws.between !== "undefined") {
value = i.raws.between.replace(/[^\s:]/g, "");
return false;
}
});
return value;
}
rawEmptyBody(root) {
let value;
root.walk((i) => {
if (i.nodes && i.nodes.length === 0) {
value = i.raws.after;
if (typeof value !== "undefined") return false;
}
});
return value;
}
rawIndent(root) {
if (root.raws.indent) return root.raws.indent;
let value;
root.walk((i) => {
let p = i.parent;
if (p && p !== root && p.parent && p.parent === root) {
if (typeof i.raws.before !== "undefined") {
let parts = i.raws.before.split("\n");
value = parts[parts.length - 1];
value = value.replace(/\S/g, "");
return false;
}
}
});
return value;
}
rawSemicolon(root) {
let value;
root.walk((i) => {
if (i.nodes && i.nodes.length && i.last.type === "decl") {
value = i.raws.semicolon;
if (typeof value !== "undefined") return false;
}
});
return value;
}
rawValue(node, prop) {
let value = node[prop];
let raw = node.raws[prop];
if (raw && raw.value === value) {
return raw.raw;
}
return value;
}
root(node) {
this.body(node);
if (node.raws.after) this.builder(node.raws.after);
}
rule(node) {
this.block(node, this.rawValue(node, "selector"));
if (node.raws.ownSemicolon) {
this.builder(node.raws.ownSemicolon, node, "end");
}
}
stringify(node, semicolon) {
if (!this[node.type]) {
throw new Error(
"Unknown AST node type " + node.type + ". Maybe you need to change PostCSS stringifier."
);
}
this[node.type](node, semicolon);
}
};
module2.exports = Stringifier;
Stringifier.default = Stringifier;
}
});
// node_modules/.aspect_rules_js/postcss@8.5.3/node_modules/postcss/lib/stringify.js
var require_stringify = __commonJS({
"node_modules/.aspect_rules_js/postcss@8.5.3/node_modules/postcss/lib/stringify.js"(exports2, module2) {
"use strict";
var Stringifier = require_stringifier();
function stringify(node, builder) {
let str = new Stringifier(builder);
str.stringify(node);
}
module2.exports = stringify;
stringify.default = stringify;
}
});
// node_modules/.aspect_rules_js/postcss@8.5.3/node_modules/postcss/lib/symbols.js
var require_symbols = __commonJS({
"node_modules/.aspect_rules_js/postcss@8.5.3/node_modules/postcss/lib/symbols.js"(exports2, module2) {
"use strict";
module2.exports.isClean = Symbol("isClean");
module2.exports.my = Symbol("my");
}
});
// node_modules/.aspect_rules_js/postcss@8.5.3/node_modules/postcss/lib/node.js
var require_node = __commonJS({
"node_modules/.aspect_rules_js/postcss@8.5.3/node_modules/postcss/lib/node.js"(exports2, module2) {
"use strict";
var CssSyntaxError = require_css_syntax_error();
var Stringifier = require_stringifier();
var stringify = require_stringify();
var { isClean, my } = require_symbols();
function cloneNode(obj, parent) {
let cloned = new obj.constructor();
for (let i in obj) {
if (!Object.prototype.hasOwnProperty.call(obj, i)) {
continue;
}
if (i === "proxyCache") continue;
let value = obj[i];
let type = typeof value;
if (i === "parent" && type === "object") {
if (parent) cloned[i] = parent;
} else if (i === "source") {
cloned[i] = value;
} else if (Array.isArray(value)) {
cloned[i] = value.map((j) => cloneNode(j, cloned));
} else {
if (type === "object" && value !== null) value = cloneNode(value);
cloned[i] = value;
}
}
return cloned;
}
function sourceOffset(inputCSS, position) {
if (position && typeof position.offset !== "undefined") {
return position.offset;
}
let column = 1;
let line = 1;
let offset = 0;
for (let i = 0; i < inputCSS.length; i++) {
if (line === position.line && column === position.column) {
offset = i;
break;
}
if (inputCSS[i] === "\n") {
column = 1;
line += 1;
} else {
column += 1;
}
}
return offset;
}
var Node = class {
get proxyOf() {
return this;
}
constructor(defaults = {}) {
this.raws = {};
this[isClean] = false;
this[my] = true;
for (let name in defaults) {
if (name === "nodes") {
this.nodes = [];
for (let node of defaults[name]) {
if (typeof node.clone === "function") {
this.append(node.clone());
} else {
this.append(node);
}
}
} else {
this[name] = defaults[name];
}
}
}
addToError(error) {
error.postcssNode = this;
if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) {
let s = this.source;
error.stack = error.stack.replace(
/\n\s{4}at /,
`$&${s.input.from}:${s.start.line}:${s.start.column}$&`
);
}
return error;
}
after(add) {
this.parent.insertAfter(this, add);
return this;
}
assign(overrides = {}) {
for (let name in overrides) {
this[name] = overrides[name];
}
return this;
}
before(add) {
this.parent.insertBefore(this, add);
return this;
}
cleanRaws(keepBetween) {
delete this.raws.before;
delete this.raws.after;
if (!keepBetween) delete this.raws.between;
}
clone(overrides = {}) {
let cloned = cloneNode(this);
for (let name in overrides) {
cloned[name] = overrides[name];
}
return cloned;
}
cloneAfter(overrides = {}) {
let cloned = this.clone(overrides);
this.parent.insertAfter(this, cloned);
return cloned;
}
cloneBefore(overrides = {}) {
let cloned = this.clone(overrides);
this.parent.insertBefore(this, cloned);
return cloned;
}
error(message, opts = {}) {
if (this.source) {
let { end, start } = this.rangeBy(opts);
return this.source.input.error(
message,
{ column: start.column, line: start.line },
{ column: end.column, line: end.line },
opts
);
}
return new CssSyntaxError(message);
}
getProxyProcessor() {
return {
get(node, prop) {
if (prop === "proxyOf") {
return node;
} else if (prop === "root") {
return () => node.root().toProxy();
} else {
return node[prop];
}
},
set(node, prop, value) {
if (node[prop] === value) return true;
node[prop] = value;
if (prop === "prop" || prop === "value" || prop === "name" || prop === "params" || prop === "important" || /* c8 ignore next */
prop === "text") {
node.markDirty();
}
return true;
}
};
}
/* c8 ignore next 3 */
markClean() {
this[isClean] = true;
}
markDirty() {
if (this[isClean]) {
this[isClean] = false;
let next = this;
while (next = next.parent) {
next[isClean] = false;
}
}
}
next() {
if (!this.parent) return void 0;
let index = this.parent.index(this);
return this.parent.nodes[index + 1];
}
positionBy(opts) {
let pos = this.source.start;
if (opts.index) {
pos = this.positionInside(opts.index);
} else if (opts.word) {
let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
let stringRepresentation = inputString.slice(
sourceOffset(inputString, this.source.start),
sourceOffset(inputString, this.source.end)
);
let index = stringRepresentation.indexOf(opts.word);
if (index !== -1) pos = this.positionInside(index);
}
return pos;
}
positionInside(index) {
let column = this.source.start.column;
let line = this.source.start.line;
let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
let offset = sourceOffset(inputString, this.source.start);
let end = offset + index;
for (let i = offset; i < end; i++) {
if (inputString[i] === "\n") {
column = 1;
line += 1;
} else {
column += 1;
}
}
return { column, line };
}
prev() {
if (!this.parent) return void 0;
let index = this.parent.index(this);
return this.parent.nodes[index - 1];
}
rangeBy(opts) {
let start = {
column: this.source.start.column,
line: this.source.start.line
};
let end = this.source.end ? {
column: this.source.end.column + 1,
line: this.source.end.line
} : {
column: start.column + 1,
line: start.line
};
if (opts.word) {
let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
let stringRepresentation = inputString.slice(
sourceOffset(inputString, this.source.start),
sourceOffset(inputString, this.source.end)
);
let index = stringRepresentation.indexOf(opts.word);
if (index !== -1) {
start = this.positionInside(index);
end = this.positionInside(
index + opts.word.length
);
}
} else {
if (opts.start) {
start = {
column: opts.start.column,
line: opts.start.line
};
} else if (opts.index) {
start = this.positionInside(opts.index);
}
if (opts.end) {
end = {
column: opts.end.column,
line: opts.end.line
};
} else if (typeof opts.endIndex === "number") {
end = this.positionInside(opts.endIndex);
} else if (opts.index) {
end = this.positionInside(opts.index + 1);
}
}
if (end.line < start.line || end.line === start.line && end.column <= start.column) {
end = { column: start.column + 1, line: start.line };
}
return { end, start };
}
raw(prop, defaultType) {
let str = new Stringifier();
return str.raw(this, prop, defaultType);
}
remove() {
if (this.parent) {
this.parent.removeChild(this);
}
this.parent = void 0;
return this;
}
replaceWith(...nodes) {
if (this.parent) {
let bookmark = this;
let foundSelf = false;
for (let node of nodes) {
if (node === this) {
foundSelf = true;
} else if (foundSelf) {
this.parent.insertAfter(bookmark, node);
bookmark = node;
} else {
this.parent.insertBefore(bookmark, node);
}
}
if (!foundSelf) {
this.remove();
}
}
return this;
}
root() {
let result = this;
while (result.parent && result.parent.type !== "document") {
result = result.parent;
}
return result;
}
toJSON(_, inputs) {
let fixed = {};
let emitInputs = inputs == null;
inputs = inputs || /* @__PURE__ */ new Map();
let inputsNextIndex = 0;
for (let name in this) {
if (!Object.prototype.hasOwnProperty.call(this, name)) {
continue;
}
if (name === "parent" || name === "proxyCache") continue;
let value = this[name];
if (Array.isArray(value)) {
fixed[name] = value.map((i) => {
if (typeof i === "object" && i.toJSON) {
return i.toJSON(null, inputs);
} else {
return i;
}
});
} else if (typeof value === "object" && value.toJSON) {
fixed[name] = value.toJSON(null, inputs);
} else if (name === "source") {
let inputId = inputs.get(value.input);
if (inputId == null) {
inputId = inputsNextIndex;
inputs.set(value.input, inputsNextIndex);
inputsNextIndex++;
}
fixed[name] = {
end: value.end,
inputId,
start: value.start
};
} else {
fixed[name] = value;
}
}
if (emitInputs) {
fixed.inputs = [...inputs.keys()].map((input) => input.toJSON());
}
return fixed;
}
toProxy() {
if (!this.proxyCache) {
this.proxyCache = new Proxy(this, this.getProxyProcessor());
}
return this.proxyCache;
}
toString(stringifier = stringify) {
if (stringifier.stringify) stringifier = stringifier.stringify;
let result = "";
stringifier(this, (i) => {
result += i;
});
return result;
}
warn(result, text, opts) {
let data = { node: this };
for (let i in opts) data[i] = opts[i];
return result.warn(text, data);
}
};
module2.exports = Node;
Node.default = Node;
}
});
// node_modules/.aspect_rules_js/postcss@8.5.3/node_modules/postcss/lib/comment.js
var require_comment = __commonJS({
"node_modules/.aspect_rules_js/postcss@8.5.3/node_modules/postcss/lib/comment.js"(exports2, module2) {
"use strict";
var Node = require_node();
var Comment = class extends Node {
constructor(defaults) {
super(defaults);
this.type = "comment";
}
};
module2.exports = Comment;
Comment.default = Comment;
}
});
// node_modules/.aspect_rules_js/postcss@8.5.3/node_modules/postcss/lib/declaration.js
var require_declaration = __commonJS({
"node_modules/.aspect_rules_js/postcss@8.5.3/node_modules/postcss/lib/declaration.js"(exports2, module2) {
"use strict";
var Node = require_node();
var Declaration = class extends Node {
get variable() {
return this.prop.startsWith("--") || this.prop[0] === "$";
}
constructor(defaults) {
if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") {
defaults = __spreadProps(__spreadValues({}, defaults), { value: String(defaults.value) });
}
super(defaults);
this.type = "decl";
}
};
module2.exports = Declaration;
Declaration.default = Declaration;
}
});
// node_modules/.aspect_rules_js/postcss@8.5.3/node_modules/postcss/lib/container.js
var require_container = __commonJS({
"node_modules/.aspect_rules_js/postcss@8.5.3/node_modules/postcss/lib/container.js"(exports2, module2) {
"use strict";
var Comment = require_comment();
var Declaration = require_declaration();
var Node = require_node();
var { isClean, my } = require_symbols();
var AtRule;
var parse;
var Root;
var Rule;
function cleanSource(nodes) {
return nodes.map((i) => {
if (i.nodes) i.nodes = cleanSource(i.nodes);
delete i.source;
return i;
});
}
function markTreeDirty(node) {
node[isClean] = false;
if (node.proxyOf.nodes) {
for (let i of node.proxyOf.nodes) {
markTreeDirty(i);
}
}
}
var Container = class _Container extends Node {
get first() {
if (!this.proxyOf.nodes) return void 0;
return this.proxyOf.nodes[0];
}
get last() {
if (!this.proxyOf.nodes) return void 0;
return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
}
append(...children) {
for (let child of children) {
let nodes = this.normalize(child, this.last);
for (let node of nodes) this.proxyOf.nodes.push(node);
}
this.markDirty();
return this;
}
cleanRaws(keepBetween) {
super.cleanRaws(keepBetween);
if (this.nodes) {
for (let node of this.nodes) node.cleanRaws(keepBetween);
}
}
each(callback) {
if (!this.proxyOf.nodes) return void 0;
let iterator = this.getIterator();
let index, result;
while (this.indexes[iterator] < this.proxyOf.nodes.length) {
index = this.indexes[iterator];
result = callback(this.proxyOf.nodes[index], index);
if (result === false) break;
this.indexes[iterator] += 1;
}
delete this.indexes[iterator];
return result;
}
every(condition) {
return this.nodes.every(condition);
}
getIterator() {
if (!this.lastEach) this.lastEach = 0;
if (!this.indexes) this.indexes = {};
this.lastEach += 1;
let iterator = this.lastEach;
this.indexes[iterator] = 0;