summaryrefslogtreecommitdiff
path: root/node_modules/@csstools/css-parser-algorithms/dist
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@csstools/css-parser-algorithms/dist')
-rw-r--r--node_modules/@csstools/css-parser-algorithms/dist/consume/consume-component-block-function.d.ts118
-rw-r--r--node_modules/@csstools/css-parser-algorithms/dist/index.cjs2
-rw-r--r--node_modules/@csstools/css-parser-algorithms/dist/index.d.ts259
-rw-r--r--node_modules/@csstools/css-parser-algorithms/dist/index.mjs2
-rw-r--r--node_modules/@csstools/css-parser-algorithms/dist/interfaces/context.d.ts4
-rw-r--r--node_modules/@csstools/css-parser-algorithms/dist/parse/parse-comma-separated-list-of-component-values.d.ts5
-rw-r--r--node_modules/@csstools/css-parser-algorithms/dist/parse/parse-component-value.d.ts4
-rw-r--r--node_modules/@csstools/css-parser-algorithms/dist/parse/parse-list-of-component-values.d.ts5
-rw-r--r--node_modules/@csstools/css-parser-algorithms/dist/util/component-value-type.d.ts7
-rw-r--r--node_modules/@csstools/css-parser-algorithms/dist/util/node-ancestry.d.ts7
-rw-r--r--node_modules/@csstools/css-parser-algorithms/dist/util/replace-component-values.d.ts2
-rw-r--r--node_modules/@csstools/css-parser-algorithms/dist/util/source-indices.d.ts9
-rw-r--r--node_modules/@csstools/css-parser-algorithms/dist/util/stringify.d.ts2
-rw-r--r--node_modules/@csstools/css-parser-algorithms/dist/util/type-predicates.d.ts6
14 files changed, 251 insertions, 181 deletions
diff --git a/node_modules/@csstools/css-parser-algorithms/dist/consume/consume-component-block-function.d.ts b/node_modules/@csstools/css-parser-algorithms/dist/consume/consume-component-block-function.d.ts
deleted file mode 100644
index 59cdf944..00000000
--- a/node_modules/@csstools/css-parser-algorithms/dist/consume/consume-component-block-function.d.ts
+++ /dev/null
@@ -1,118 +0,0 @@
-import { CSSToken, TokenFunction } from '@csstools/css-tokenizer';
-import { Context } from '../interfaces/context';
-import { ComponentValueType } from '../util/component-value-type';
-export type ContainerNode = FunctionNode | SimpleBlockNode;
-export type ComponentValue = FunctionNode | SimpleBlockNode | WhitespaceNode | CommentNode | TokenNode;
-export declare function consumeComponentValue(ctx: Context, tokens: Array<CSSToken>): {
- advance: number;
- node: ComponentValue;
-};
-export declare class FunctionNode {
- type: ComponentValueType;
- name: TokenFunction;
- endToken: CSSToken;
- value: Array<ComponentValue>;
- constructor(name: TokenFunction, endToken: CSSToken, value: Array<ComponentValue>);
- getName(): string;
- /**
- * Normalize the current Function:
- * - if the "endToken" is EOF, replace with a ")-token"
- */
- normalize(): void;
- tokens(): Array<CSSToken>;
- toString(): string;
- indexOf(item: ComponentValue): number | string;
- at(index: number | string): ComponentValue | undefined;
- walk<T extends Record<string, unknown>>(cb: (entry: {
- node: ComponentValue;
- parent: ContainerNode;
- state?: T;
- }, index: number | string) => boolean | void, state?: T): false | undefined;
- toJSON(): unknown;
- isFunctionNode(): this is FunctionNode;
- static isFunctionNode(x: unknown): x is FunctionNode;
-}
-export declare function consumeFunction(ctx: Context, tokens: Array<CSSToken>): {
- advance: number;
- node: FunctionNode;
-};
-export declare class SimpleBlockNode {
- type: ComponentValueType;
- startToken: CSSToken;
- endToken: CSSToken;
- value: Array<ComponentValue>;
- constructor(startToken: CSSToken, endToken: CSSToken, value: Array<ComponentValue>);
- /**
- * Normalize the current Simple Block:
- * - if the "endToken" is EOF, replace with the mirror token of the "startToken"
- */
- normalize(): void;
- tokens(): Array<CSSToken>;
- toString(): string;
- indexOf(item: ComponentValue): number | string;
- at(index: number | string): ComponentValue | undefined;
- walk<T extends Record<string, unknown>>(cb: (entry: {
- node: ComponentValue;
- parent: ContainerNode;
- state?: T;
- }, index: number | string) => boolean | void, state?: T): false | undefined;
- toJSON(): unknown;
- isSimpleBlockNode(): this is SimpleBlockNode;
- static isSimpleBlockNode(x: unknown): x is SimpleBlockNode;
-}
-/** https://www.w3.org/TR/css-syntax-3/#consume-simple-block */
-export declare function consumeSimpleBlock(ctx: Context, tokens: Array<CSSToken>): {
- advance: number;
- node: SimpleBlockNode;
-};
-export declare class WhitespaceNode {
- type: ComponentValueType;
- value: Array<CSSToken>;
- constructor(value: Array<CSSToken>);
- tokens(): Array<CSSToken>;
- toString(): string;
- toJSON(): {
- type: ComponentValueType;
- tokens: CSSToken[];
- };
- isWhitespaceNode(): this is WhitespaceNode;
- static isWhitespaceNode(x: unknown): x is WhitespaceNode;
-}
-export declare function consumeWhitespace(ctx: Context, tokens: Array<CSSToken>): {
- advance: number;
- node: WhitespaceNode;
-};
-export declare class CommentNode {
- type: ComponentValueType;
- value: CSSToken;
- constructor(value: CSSToken);
- tokens(): Array<CSSToken>;
- toString(): string;
- toJSON(): {
- type: ComponentValueType;
- tokens: CSSToken[];
- };
- isCommentNode(): this is CommentNode;
- static isCommentNode(x: unknown): x is CommentNode;
-}
-export declare function consumeComment(ctx: Context, tokens: Array<CSSToken>): {
- advance: number;
- node: CommentNode;
-};
-export declare function consumeAllCommentsAndWhitespace(ctx: Context, tokens: Array<CSSToken>): {
- advance: number;
- nodes: Array<WhitespaceNode | CommentNode>;
-};
-export declare class TokenNode {
- type: ComponentValueType;
- value: CSSToken;
- constructor(value: CSSToken);
- tokens(): Array<CSSToken>;
- toString(): string;
- toJSON(): {
- type: ComponentValueType;
- tokens: CSSToken[];
- };
- isTokenNode(): this is TokenNode;
- static isTokenNode(x: unknown): x is TokenNode;
-}
diff --git a/node_modules/@csstools/css-parser-algorithms/dist/index.cjs b/node_modules/@csstools/css-parser-algorithms/dist/index.cjs
index 4405dce4..eedf0293 100644
--- a/node_modules/@csstools/css-parser-algorithms/dist/index.cjs
+++ b/node_modules/@csstools/css-parser-algorithms/dist/index.cjs
@@ -1 +1 @@
-"use strict";var e,n=require("@csstools/css-tokenizer");function consumeComponentValue(e,o){const t=o[0];if(t[0]===n.TokenType.OpenParen||t[0]===n.TokenType.OpenCurly||t[0]===n.TokenType.OpenSquare){const n=consumeSimpleBlock(e,o);return{advance:n.advance,node:n.node}}if(t[0]===n.TokenType.Function){const n=consumeFunction(e,o);return{advance:n.advance,node:n.node}}if(t[0]===n.TokenType.Whitespace){const n=consumeWhitespace(e,o);return{advance:n.advance,node:n.node}}if(t[0]===n.TokenType.Comment){const n=consumeComment(e,o);return{advance:n.advance,node:n.node}}return{advance:1,node:new TokenNode(t)}}exports.ComponentValueType=void 0,(e=exports.ComponentValueType||(exports.ComponentValueType={})).Function="function",e.SimpleBlock="simple-block",e.Whitespace="whitespace",e.Comment="comment",e.Token="token";class FunctionNode{type=exports.ComponentValueType.Function;name;endToken;value;constructor(e,n,o){this.name=e,this.endToken=n,this.value=o}getName(){return this.name[4].value}normalize(){this.endToken[0]===n.TokenType.EOF&&(this.endToken=[n.TokenType.CloseParen,")",-1,-1,void 0])}tokens(){return this.endToken[0]===n.TokenType.EOF?[this.name,...this.value.flatMap((e=>e.tokens()))]:[this.name,...this.value.flatMap((e=>e.tokens())),this.endToken]}toString(){const e=this.value.map((e=>n.isToken(e)?n.stringify(e):e.toString())).join("");return n.stringify(this.name)+e+n.stringify(this.endToken)}indexOf(e){return this.value.indexOf(e)}at(e){if("number"==typeof e)return e<0&&(e=this.value.length+e),this.value[e]}walk(e,n){let o=!1;if(this.value.forEach(((t,s)=>{if(o)return;let i;n&&(i={...n}),!1!==e({node:t,parent:this,state:i},s)?"walk"in t&&!1===t.walk(e,i)&&(o=!0):o=!0})),o)return!1}toJSON(){return{type:this.type,name:this.getName(),tokens:this.tokens(),value:this.value.map((e=>e.toJSON()))}}isFunctionNode(){return FunctionNode.isFunctionNode(this)}static isFunctionNode(e){return!!e&&(e instanceof FunctionNode&&e.type===exports.ComponentValueType.Function)}}function consumeFunction(e,o){const t=[];let s=1;for(;;){const i=o[s];if(!i||i[0]===n.TokenType.EOF)return e.onParseError(new n.ParseError("Unexpected EOF while consuming a function.",o[0][2],o[o.length-1][3],["5.4.9. Consume a function","Unexpected EOF"])),{advance:o.length,node:new FunctionNode(o[0],i,t)};if(i[0]===n.TokenType.CloseParen)return{advance:s+1,node:new FunctionNode(o[0],i,t)};if(i[0]===n.TokenType.Comment||i[0]===n.TokenType.Whitespace){const n=consumeAllCommentsAndWhitespace(e,o.slice(s));s+=n.advance,t.push(...n.nodes);continue}const r=consumeComponentValue(e,o.slice(s));s+=r.advance,t.push(r.node)}}class SimpleBlockNode{type=exports.ComponentValueType.SimpleBlock;startToken;endToken;value;constructor(e,n,o){this.startToken=e,this.endToken=n,this.value=o}normalize(){if(this.endToken[0]===n.TokenType.EOF){const e=n.mirrorVariant(this.startToken);e&&(this.endToken=e)}}tokens(){return this.endToken[0]===n.TokenType.EOF?[this.startToken,...this.value.flatMap((e=>e.tokens()))]:[this.startToken,...this.value.flatMap((e=>e.tokens())),this.endToken]}toString(){const e=this.value.map((e=>n.isToken(e)?n.stringify(e):e.toString())).join("");return n.stringify(this.startToken)+e+n.stringify(this.endToken)}indexOf(e){return this.value.indexOf(e)}at(e){if("number"==typeof e)return e<0&&(e=this.value.length+e),this.value[e]}walk(e,n){let o=!1;if(this.value.forEach(((t,s)=>{if(o)return;let i;n&&(i={...n}),!1!==e({node:t,parent:this,state:i},s)?"walk"in t&&!1===t.walk(e,i)&&(o=!0):o=!0})),o)return!1}toJSON(){return{type:this.type,startToken:this.startToken,tokens:this.tokens(),value:this.value.map((e=>e.toJSON()))}}isSimpleBlockNode(){return SimpleBlockNode.isSimpleBlockNode(this)}static isSimpleBlockNode(e){return!!e&&(e instanceof SimpleBlockNode&&e.type===exports.ComponentValueType.SimpleBlock)}}function consumeSimpleBlock(e,o){const t=n.mirrorVariantType(o[0][0]);if(!t)throw new Error("Failed to parse, a mirror variant must exist for all block open tokens.");const s=[];let i=1;for(;;){const r=o[i];if(!r||r[0]===n.TokenType.EOF)return e.onParseError(new n.ParseError("Unexpected EOF while consuming a simple block.",o[0][2],o[o.length-1][3],["5.4.8. Consume a simple block","Unexpected EOF"])),{advance:o.length,node:new SimpleBlockNode(o[0],r,s)};if(r[0]===t)return{advance:i+1,node:new SimpleBlockNode(o[0],r,s)};if(r[0]===n.TokenType.Comment||r[0]===n.TokenType.Whitespace){const n=consumeAllCommentsAndWhitespace(e,o.slice(i));i+=n.advance,s.push(...n.nodes);continue}const a=consumeComponentValue(e,o.slice(i));i+=a.advance,s.push(a.node)}}class WhitespaceNode{type=exports.ComponentValueType.Whitespace;value;constructor(e){this.value=e}tokens(){return this.value}toString(){return n.stringify(...this.value)}toJSON(){return{type:this.type,tokens:this.tokens()}}isWhitespaceNode(){return WhitespaceNode.isWhitespaceNode(this)}static isWhitespaceNode(e){return!!e&&(e instanceof WhitespaceNode&&e.type===exports.ComponentValueType.Whitespace)}}function consumeWhitespace(e,o){let t=0;for(;;){if(o[t][0]!==n.TokenType.Whitespace)return{advance:t,node:new WhitespaceNode(o.slice(0,t))};t++}}class CommentNode{type=exports.ComponentValueType.Comment;value;constructor(e){this.value=e}tokens(){return[this.value]}toString(){return n.stringify(this.value)}toJSON(){return{type:this.type,tokens:this.tokens()}}isCommentNode(){return CommentNode.isCommentNode(this)}static isCommentNode(e){return!!e&&(e instanceof CommentNode&&e.type===exports.ComponentValueType.Comment)}}function consumeComment(e,n){return{advance:1,node:new CommentNode(n[0])}}function consumeAllCommentsAndWhitespace(e,o){const t=[];let s=0;for(;;)if(o[s][0]!==n.TokenType.Whitespace){if(o[s][0]!==n.TokenType.Comment)return{advance:s,nodes:t};t.push(new CommentNode(o[s])),s++}else{const e=consumeWhitespace(0,o.slice(s));s+=e.advance,t.push(e.node)}}class TokenNode{type=exports.ComponentValueType.Token;value;constructor(e){this.value=e}tokens(){return[this.value]}toString(){return n.stringify(this.value)}toJSON(){return{type:this.type,tokens:this.tokens()}}isTokenNode(){return TokenNode.isTokenNode(this)}static isTokenNode(e){return!!e&&(e instanceof TokenNode&&e.type===exports.ComponentValueType.Token)}}function isSimpleBlockNode(e){return SimpleBlockNode.isSimpleBlockNode(e)}function isFunctionNode(e){return FunctionNode.isFunctionNode(e)}exports.CommentNode=CommentNode,exports.FunctionNode=FunctionNode,exports.SimpleBlockNode=SimpleBlockNode,exports.TokenNode=TokenNode,exports.WhitespaceNode=WhitespaceNode,exports.consumeAllCommentsAndWhitespace=consumeAllCommentsAndWhitespace,exports.consumeComment=consumeComment,exports.consumeComponentValue=consumeComponentValue,exports.consumeFunction=consumeFunction,exports.consumeSimpleBlock=consumeSimpleBlock,exports.consumeWhitespace=consumeWhitespace,exports.gatherNodeAncestry=function gatherNodeAncestry(e){const n=new Map;return e.walk((e=>{Array.isArray(e.node)?e.node.forEach((o=>{n.set(o,e.parent)})):n.set(e.node,e.parent)})),n},exports.isCommentNode=function isCommentNode(e){return CommentNode.isCommentNode(e)},exports.isFunctionNode=isFunctionNode,exports.isSimpleBlockNode=isSimpleBlockNode,exports.isTokenNode=function isTokenNode(e){return TokenNode.isTokenNode(e)},exports.isWhitespaceNode=function isWhitespaceNode(e){return WhitespaceNode.isWhitespaceNode(e)},exports.parseCommaSeparatedListOfComponentValues=function parseCommaSeparatedListOfComponentValues(e,o){const t={onParseError:(null==o?void 0:o.onParseError)??(()=>{})},s=[...e];if(0===e.length)return[];s[s.length-1][0]!==n.TokenType.EOF&&s.push([n.TokenType.EOF,"",s[s.length-1][2],s[s.length-1][3],void 0]);const i=[];let r=[],a=0;for(;;){if(!s[a]||s[a][0]===n.TokenType.EOF)return r.length&&i.push(r),i;if(s[a][0]===n.TokenType.Comma){i.push(r),r=[],a++;continue}const o=consumeComponentValue(t,e.slice(a));r.push(o.node),a+=o.advance}},exports.parseComponentValue=function parseComponentValue(e,o){const t={onParseError:(null==o?void 0:o.onParseError)??(()=>{})},s=[...e];s[s.length-1][0]!==n.TokenType.EOF&&s.push([n.TokenType.EOF,"",s[s.length-1][2],s[s.length-1][3],void 0]);const i=consumeComponentValue(t,s);if(s[Math.min(i.advance,s.length-1)][0]===n.TokenType.EOF)return i.node;t.onParseError(new n.ParseError("Expected EOF after parsing a component value.",e[0][2],e[e.length-1][3],["5.3.9. Parse a component value","Expected EOF"]))},exports.parseListOfComponentValues=function parseListOfComponentValues(e,o){const t={onParseError:(null==o?void 0:o.onParseError)??(()=>{})},s=[...e];s[s.length-1][0]!==n.TokenType.EOF&&s.push([n.TokenType.EOF,"",s[s.length-1][2],s[s.length-1][3],void 0]);const i=[];let r=0;for(;;){if(!s[r]||s[r][0]===n.TokenType.EOF)return i;const e=consumeComponentValue(t,s.slice(r));i.push(e.node),r+=e.advance}},exports.replaceComponentValues=function replaceComponentValues(e,n){for(let o=0;o<e.length;o++){const t=e[o];for(let e=0;e<t.length;e++){const o=t[e];{const s=n(o);if(s){t.splice(e,1,s);continue}}(isSimpleBlockNode(o)||isFunctionNode(o))&&o.walk(((e,o)=>{if("number"!=typeof o)return;const t=e.node,s=n(t);s&&e.parent.value.splice(o,1,s)}))}}return e},exports.sourceIndices=function sourceIndices(e){if(Array.isArray(e)){const n=e[0];if(!n)return[0,0];const o=e[e.length-1]||n;return[sourceIndices(n)[0],sourceIndices(o)[1]]}const n=e.tokens(),o=n[0],t=n[n.length-1];return o&&t?[o[2],t[3]]:[0,0]},exports.stringify=function stringify(e){return e.map((e=>e.map((e=>n.stringify(...e.tokens()))).join(""))).join(",")};
+"use strict";var e,n=require("@csstools/css-tokenizer");function walkerIndexGenerator(e){let n=e.slice();return(e,o,t)=>{let s=-1;for(let i=n.indexOf(o);i<n.length&&(s=e.indexOf(n[i]),-1===s||s<t);i++);return-1===s||s===t&&o===e[t]&&(s++,s>=e.length)?-1:(n=e.slice(),s)}}function consumeComponentValue(e,o){const t=o[0];if(t[0]===n.TokenType.OpenParen||t[0]===n.TokenType.OpenCurly||t[0]===n.TokenType.OpenSquare){const n=consumeSimpleBlock(e,o);return{advance:n.advance,node:n.node}}if(t[0]===n.TokenType.Function){const n=consumeFunction(e,o);return{advance:n.advance,node:n.node}}if(t[0]===n.TokenType.Whitespace){const n=consumeWhitespace(e,o);return{advance:n.advance,node:n.node}}if(t[0]===n.TokenType.Comment){const n=consumeComment(e,o);return{advance:n.advance,node:n.node}}return{advance:1,node:new TokenNode(t)}}exports.ComponentValueType=void 0,(e=exports.ComponentValueType||(exports.ComponentValueType={})).Function="function",e.SimpleBlock="simple-block",e.Whitespace="whitespace",e.Comment="comment",e.Token="token";class ContainerNodeBaseClass{value=[];indexOf(e){return this.value.indexOf(e)}at(e){if("number"==typeof e)return e<0&&(e=this.value.length+e),this.value[e]}forEach(e,n){if(0===this.value.length)return;const o=walkerIndexGenerator(this.value);let t=0;for(;t<this.value.length;){const s=this.value[t];let i;if(n&&(i={...n}),!1===e({node:s,parent:this,state:i},t))return!1;if(t=o(this.value,s,t),-1===t)break}}walk(e,n){0!==this.value.length&&this.forEach(((n,o)=>!1!==e(n,o)&&((!("walk"in n.node)||!this.value.includes(n.node)||!1!==n.node.walk(e,n.state))&&void 0)),n)}}class FunctionNode extends ContainerNodeBaseClass{type=exports.ComponentValueType.Function;name;endToken;constructor(e,n,o){super(),this.name=e,this.endToken=n,this.value=o}getName(){return this.name[4].value}normalize(){this.endToken[0]===n.TokenType.EOF&&(this.endToken=[n.TokenType.CloseParen,")",-1,-1,void 0])}tokens(){return this.endToken[0]===n.TokenType.EOF?[this.name,...this.value.flatMap((e=>e.tokens()))]:[this.name,...this.value.flatMap((e=>e.tokens())),this.endToken]}toString(){const e=this.value.map((e=>n.isToken(e)?n.stringify(e):e.toString())).join("");return n.stringify(this.name)+e+n.stringify(this.endToken)}toJSON(){return{type:this.type,name:this.getName(),tokens:this.tokens(),value:this.value.map((e=>e.toJSON()))}}isFunctionNode(){return FunctionNode.isFunctionNode(this)}static isFunctionNode(e){return!!e&&(e instanceof FunctionNode&&e.type===exports.ComponentValueType.Function)}}function consumeFunction(e,o){const t=[];let s=1;for(;;){const i=o[s];if(!i||i[0]===n.TokenType.EOF)return e.onParseError(new n.ParseError("Unexpected EOF while consuming a function.",o[0][2],o[o.length-1][3],["5.4.9. Consume a function","Unexpected EOF"])),{advance:o.length,node:new FunctionNode(o[0],i,t)};if(i[0]===n.TokenType.CloseParen)return{advance:s+1,node:new FunctionNode(o[0],i,t)};if(i[0]===n.TokenType.Comment||i[0]===n.TokenType.Whitespace){const n=consumeAllCommentsAndWhitespace(e,o.slice(s));s+=n.advance,t.push(...n.nodes);continue}const r=consumeComponentValue(e,o.slice(s));s+=r.advance,t.push(r.node)}}class SimpleBlockNode extends ContainerNodeBaseClass{type=exports.ComponentValueType.SimpleBlock;startToken;endToken;constructor(e,n,o){super(),this.startToken=e,this.endToken=n,this.value=o}normalize(){if(this.endToken[0]===n.TokenType.EOF){const e=n.mirrorVariant(this.startToken);e&&(this.endToken=e)}}tokens(){return this.endToken[0]===n.TokenType.EOF?[this.startToken,...this.value.flatMap((e=>e.tokens()))]:[this.startToken,...this.value.flatMap((e=>e.tokens())),this.endToken]}toString(){const e=this.value.map((e=>n.isToken(e)?n.stringify(e):e.toString())).join("");return n.stringify(this.startToken)+e+n.stringify(this.endToken)}indexOf(e){return this.value.indexOf(e)}at(e){if("number"==typeof e)return e<0&&(e=this.value.length+e),this.value[e]}toJSON(){return{type:this.type,startToken:this.startToken,tokens:this.tokens(),value:this.value.map((e=>e.toJSON()))}}isSimpleBlockNode(){return SimpleBlockNode.isSimpleBlockNode(this)}static isSimpleBlockNode(e){return!!e&&(e instanceof SimpleBlockNode&&e.type===exports.ComponentValueType.SimpleBlock)}}function consumeSimpleBlock(e,o){const t=n.mirrorVariantType(o[0][0]);if(!t)throw new Error("Failed to parse, a mirror variant must exist for all block open tokens.");const s=[];let i=1;for(;;){const r=o[i];if(!r||r[0]===n.TokenType.EOF)return e.onParseError(new n.ParseError("Unexpected EOF while consuming a simple block.",o[0][2],o[o.length-1][3],["5.4.8. Consume a simple block","Unexpected EOF"])),{advance:o.length,node:new SimpleBlockNode(o[0],r,s)};if(r[0]===t)return{advance:i+1,node:new SimpleBlockNode(o[0],r,s)};if(r[0]===n.TokenType.Comment||r[0]===n.TokenType.Whitespace){const n=consumeAllCommentsAndWhitespace(e,o.slice(i));i+=n.advance,s.push(...n.nodes);continue}const a=consumeComponentValue(e,o.slice(i));i+=a.advance,s.push(a.node)}}class WhitespaceNode{type=exports.ComponentValueType.Whitespace;value;constructor(e){this.value=e}tokens(){return this.value}toString(){return n.stringify(...this.value)}toJSON(){return{type:this.type,tokens:this.tokens()}}isWhitespaceNode(){return WhitespaceNode.isWhitespaceNode(this)}static isWhitespaceNode(e){return!!e&&(e instanceof WhitespaceNode&&e.type===exports.ComponentValueType.Whitespace)}}function consumeWhitespace(e,o){let t=0;for(;;){if(o[t][0]!==n.TokenType.Whitespace)return{advance:t,node:new WhitespaceNode(o.slice(0,t))};t++}}class CommentNode{type=exports.ComponentValueType.Comment;value;constructor(e){this.value=e}tokens(){return[this.value]}toString(){return n.stringify(this.value)}toJSON(){return{type:this.type,tokens:this.tokens()}}isCommentNode(){return CommentNode.isCommentNode(this)}static isCommentNode(e){return!!e&&(e instanceof CommentNode&&e.type===exports.ComponentValueType.Comment)}}function consumeComment(e,n){return{advance:1,node:new CommentNode(n[0])}}function consumeAllCommentsAndWhitespace(e,o){const t=[];let s=0;for(;;)if(o[s][0]!==n.TokenType.Whitespace){if(o[s][0]!==n.TokenType.Comment)return{advance:s,nodes:t};t.push(new CommentNode(o[s])),s++}else{const e=consumeWhitespace(0,o.slice(s));s+=e.advance,t.push(e.node)}}class TokenNode{type=exports.ComponentValueType.Token;value;constructor(e){this.value=e}tokens(){return[this.value]}toString(){return n.stringify(this.value)}toJSON(){return{type:this.type,tokens:this.tokens()}}isTokenNode(){return TokenNode.isTokenNode(this)}static isTokenNode(e){return!!e&&(e instanceof TokenNode&&e.type===exports.ComponentValueType.Token)}}function isSimpleBlockNode(e){return SimpleBlockNode.isSimpleBlockNode(e)}function isFunctionNode(e){return FunctionNode.isFunctionNode(e)}exports.CommentNode=CommentNode,exports.ContainerNodeBaseClass=ContainerNodeBaseClass,exports.FunctionNode=FunctionNode,exports.SimpleBlockNode=SimpleBlockNode,exports.TokenNode=TokenNode,exports.WhitespaceNode=WhitespaceNode,exports.gatherNodeAncestry=function gatherNodeAncestry(e){const n=new Map;return e.walk((e=>{Array.isArray(e.node)?e.node.forEach((o=>{n.set(o,e.parent)})):n.set(e.node,e.parent)})),n},exports.isCommentNode=function isCommentNode(e){return CommentNode.isCommentNode(e)},exports.isFunctionNode=isFunctionNode,exports.isSimpleBlockNode=isSimpleBlockNode,exports.isTokenNode=function isTokenNode(e){return TokenNode.isTokenNode(e)},exports.isWhitespaceNode=function isWhitespaceNode(e){return WhitespaceNode.isWhitespaceNode(e)},exports.parseCommaSeparatedListOfComponentValues=function parseCommaSeparatedListOfComponentValues(e,o){const t={onParseError:o?.onParseError??(()=>{})},s=[...e];if(0===e.length)return[];s[s.length-1][0]!==n.TokenType.EOF&&s.push([n.TokenType.EOF,"",s[s.length-1][2],s[s.length-1][3],void 0]);const i=[];let r=[],a=0;for(;;){if(!s[a]||s[a][0]===n.TokenType.EOF)return r.length&&i.push(r),i;if(s[a][0]===n.TokenType.Comma){i.push(r),r=[],a++;continue}const o=consumeComponentValue(t,e.slice(a));r.push(o.node),a+=o.advance}},exports.parseComponentValue=function parseComponentValue(e,o){const t={onParseError:o?.onParseError??(()=>{})},s=[...e];s[s.length-1][0]!==n.TokenType.EOF&&s.push([n.TokenType.EOF,"",s[s.length-1][2],s[s.length-1][3],void 0]);const i=consumeComponentValue(t,s);if(s[Math.min(i.advance,s.length-1)][0]===n.TokenType.EOF)return i.node;t.onParseError(new n.ParseError("Expected EOF after parsing a component value.",e[0][2],e[e.length-1][3],["5.3.9. Parse a component value","Expected EOF"]))},exports.parseListOfComponentValues=function parseListOfComponentValues(e,o){const t={onParseError:o?.onParseError??(()=>{})},s=[...e];s[s.length-1][0]!==n.TokenType.EOF&&s.push([n.TokenType.EOF,"",s[s.length-1][2],s[s.length-1][3],void 0]);const i=[];let r=0;for(;;){if(!s[r]||s[r][0]===n.TokenType.EOF)return i;const e=consumeComponentValue(t,s.slice(r));i.push(e.node),r+=e.advance}},exports.replaceComponentValues=function replaceComponentValues(e,n){for(let o=0;o<e.length;o++){const t=e[o];for(let e=0;e<t.length;e++){const o=t[e];{const s=n(o);if(s){t.splice(e,1,s);continue}}(isSimpleBlockNode(o)||isFunctionNode(o))&&o.walk(((e,o)=>{if("number"!=typeof o)return;const t=e.node,s=n(t);s&&e.parent.value.splice(o,1,s)}))}}return e},exports.sourceIndices=function sourceIndices(e){if(Array.isArray(e)){const n=e[0];if(!n)return[0,0];const o=e[e.length-1]||n;return[sourceIndices(n)[0],sourceIndices(o)[1]]}const n=e.tokens(),o=n[0],t=n[n.length-1];return o&&t?[o[2],t[3]]:[0,0]},exports.stringify=function stringify(e){return e.map((e=>e.map((e=>n.stringify(...e.tokens()))).join(""))).join(",")},exports.walkerIndexGenerator=walkerIndexGenerator;
diff --git a/node_modules/@csstools/css-parser-algorithms/dist/index.d.ts b/node_modules/@csstools/css-parser-algorithms/dist/index.d.ts
index 47c3cec9..7df6e14c 100644
--- a/node_modules/@csstools/css-parser-algorithms/dist/index.d.ts
+++ b/node_modules/@csstools/css-parser-algorithms/dist/index.d.ts
@@ -1,10 +1,249 @@
-export * from './consume/consume-component-block-function';
-export { parseComponentValue } from './parse/parse-component-value';
-export { parseListOfComponentValues } from './parse/parse-list-of-component-values';
-export { parseCommaSeparatedListOfComponentValues } from './parse/parse-comma-separated-list-of-component-values';
-export { gatherNodeAncestry } from './util/node-ancestry';
-export { replaceComponentValues } from './util/replace-component-values';
-export { stringify } from './util/stringify';
-export { ComponentValueType } from './util/component-value-type';
-export { isCommentNode, isFunctionNode, isSimpleBlockNode, isTokenNode, isWhitespaceNode, } from './util/type-predicates';
-export { sourceIndices } from './util/source-indices';
+import { CSSToken } from '@csstools/css-tokenizer';
+import { ParseError } from '@csstools/css-tokenizer';
+import { TokenFunction } from '@csstools/css-tokenizer';
+
+export declare class CommentNode {
+ type: ComponentValueType;
+ value: CSSToken;
+ constructor(value: CSSToken);
+ tokens(): Array<CSSToken>;
+ toString(): string;
+ toJSON(): {
+ type: ComponentValueType;
+ tokens: CSSToken[];
+ };
+ isCommentNode(): this is CommentNode;
+ static isCommentNode(x: unknown): x is CommentNode;
+}
+
+export declare type ComponentValue = FunctionNode | SimpleBlockNode | WhitespaceNode | CommentNode | TokenNode;
+
+export declare enum ComponentValueType {
+ Function = "function",
+ SimpleBlock = "simple-block",
+ Whitespace = "whitespace",
+ Comment = "comment",
+ Token = "token"
+}
+
+export declare type ContainerNode = FunctionNode | SimpleBlockNode;
+
+export declare abstract class ContainerNodeBaseClass {
+ /**
+ * The contents of the `Function` or `Simple Block`.
+ * This is a list of component values.
+ */
+ value: Array<ComponentValue>;
+ /**
+ * Retrieve the index of the given item in the current node.
+ * For most node types this will be trivially implemented as `this.value.indexOf(item)`.
+ */
+ indexOf(item: ComponentValue): number | string;
+ /**
+ * Retrieve the item at the given index in the current node.
+ * For most node types this will be trivially implemented as `this.value[index]`.
+ */
+ at(index: number | string): ComponentValue | undefined;
+ /**
+ * Iterates over each item in the `value` array of the current node.
+ *
+ * @param cb - The callback function to execute for each item.
+ * The function receives an object containing the current node (`node`), its parent (`parent`),
+ * and an optional `state` object.
+ * A second parameter is the index of the current node.
+ * The function can return `false` to stop the iteration.
+ *
+ * @param state - An optional state object that can be used to pass additional information to the callback function.
+ * The state object is cloned for each iteration. This means that changes to the state object are not reflected in the next iteration.
+ *
+ * @returns `false` if the iteration was halted, `undefined` otherwise.
+ *
+ * @template T - The type of the `state` object.
+ * @template U - The type of the current node.
+ */
+ forEach<T extends Record<string, unknown>, U extends ContainerNode>(this: U, cb: (entry: {
+ node: ComponentValue;
+ parent: ContainerNode;
+ state?: T;
+ }, index: number | string) => boolean | void, state?: T): false | undefined;
+ /**
+ * Walks the current node and all its children.
+ *
+ * @param cb - The callback function to execute for each item.
+ * The function receives an object containing the current node (`node`), its parent (`parent`),
+ * and an optional `state` object.
+ * A second parameter is the index of the current node.
+ * The function can return `false` to stop the iteration.
+ *
+ * @param state - An optional state object that can be used to pass additional information to the callback function.
+ * The state object is cloned for each iteration. This means that changes to the state object are not reflected in the next iteration.
+ * However changes are passed down to child node iterations.
+ *
+ * @returns `false` if the iteration was halted, `undefined` otherwise.
+ *
+ * @template T - The type of the `state` object.
+ * @template U - The type of the current node.
+ */
+ walk<T extends Record<string, unknown>, U extends ContainerNode>(this: U, cb: (entry: {
+ node: ComponentValue;
+ parent: ContainerNode;
+ state?: T;
+ }, index: number | string) => boolean | void, state?: T): false | undefined;
+}
+
+export declare class FunctionNode extends ContainerNodeBaseClass {
+ /**
+ * The node type
+ * Always `ComponentValueType.Function`
+ */
+ type: ComponentValueType;
+ /**
+ * The token for the name of the function.
+ */
+ name: TokenFunction;
+ /**
+ * The token for the closing parenthesis of the function.
+ * If the function is unclosed, this will be an EOF token.
+ */
+ endToken: CSSToken;
+ constructor(name: TokenFunction, endToken: CSSToken, value: Array<ComponentValue>);
+ /**
+ * Retrieve the name of the current Function.
+ * This is the parsed and unescaped name of the function.
+ */
+ getName(): string;
+ /**
+ * Normalize the current Function:
+ * - if the "endToken" is EOF, replace with a ")-token"
+ */
+ normalize(): void;
+ /**
+ * Retrieve the tokens for the current Function.
+ * This is the inverse of parsing from a list of tokens.
+ */
+ tokens(): Array<CSSToken>;
+ /**
+ * Convert the current Function to a string.
+ * This is not a true serialization.
+ * It is purely a concatenation of the string representation of the tokens.
+ */
+ toString(): string;
+ /**
+ * A debug helper to convert the current object to a JSON representation.
+ * This is useful in asserts and to store large ASTs in files.
+ */
+ toJSON(): unknown;
+ /**
+ * Check if the current object is a FunctionNode.
+ * This is a type guard to help with type narrowing.
+ */
+ isFunctionNode(): this is FunctionNode;
+ /**
+ * Check if the given object is a FunctionNode.
+ * This is a type guard to help with type narrowing.
+ */
+ static isFunctionNode(x: unknown): x is FunctionNode;
+}
+
+export declare function gatherNodeAncestry(node: {
+ walk(cb: (entry: {
+ node: Array<unknown> | unknown;
+ parent: unknown;
+ }, index: number | string) => boolean | void): false | undefined;
+}): Map<unknown, unknown>;
+
+export declare function isCommentNode(x: unknown): x is CommentNode;
+
+export declare function isFunctionNode(x: unknown): x is FunctionNode;
+
+export declare function isSimpleBlockNode(x: unknown): x is SimpleBlockNode;
+
+export declare function isTokenNode(x: unknown): x is TokenNode;
+
+export declare function isWhitespaceNode(x: unknown): x is WhitespaceNode;
+
+export declare function parseCommaSeparatedListOfComponentValues(tokens: Array<CSSToken>, options?: {
+ onParseError?: (error: ParseError) => void;
+}): ComponentValue[][];
+
+export declare function parseComponentValue(tokens: Array<CSSToken>, options?: {
+ onParseError?: (error: ParseError) => void;
+}): ComponentValue | undefined;
+
+export declare function parseListOfComponentValues(tokens: Array<CSSToken>, options?: {
+ onParseError?: (error: ParseError) => void;
+}): ComponentValue[];
+
+export declare function replaceComponentValues(componentValuesList: Array<Array<ComponentValue>>, replaceWith: (componentValue: ComponentValue) => ComponentValue | void): ComponentValue[][];
+
+export declare class SimpleBlockNode extends ContainerNodeBaseClass {
+ type: ComponentValueType;
+ startToken: CSSToken;
+ endToken: CSSToken;
+ constructor(startToken: CSSToken, endToken: CSSToken, value: Array<ComponentValue>);
+ /**
+ * Normalize the current Simple Block:
+ * - if the "endToken" is EOF, replace with the mirror token of the "startToken"
+ */
+ normalize(): void;
+ tokens(): Array<CSSToken>;
+ toString(): string;
+ indexOf(item: ComponentValue): number | string;
+ at(index: number | string): ComponentValue | undefined;
+ toJSON(): unknown;
+ isSimpleBlockNode(): this is SimpleBlockNode;
+ static isSimpleBlockNode(x: unknown): x is SimpleBlockNode;
+}
+
+/**
+ * Returns the start and end index of a node in the CSS source string.
+ */
+export declare function sourceIndices(x: {
+ tokens(): Array<CSSToken>;
+} | Array<{
+ tokens(): Array<CSSToken>;
+}>): [number, number];
+
+export declare function stringify(componentValueLists: Array<Array<ComponentValue>>): string;
+
+export declare class TokenNode {
+ type: ComponentValueType;
+ value: CSSToken;
+ constructor(value: CSSToken);
+ tokens(): Array<CSSToken>;
+ toString(): string;
+ toJSON(): {
+ type: ComponentValueType;
+ tokens: CSSToken[];
+ };
+ isTokenNode(): this is TokenNode;
+ static isTokenNode(x: unknown): x is TokenNode;
+}
+
+/**
+ * Generate a function that finds the next element that should be visited when walking an AST.
+ * Rules :
+ * - the previous iteration is used as a reference, so any checks are relative to the start of the current iteration.
+ * - the next element always appears after the current index.
+ * - the next element always exists in the list.
+ * - replacing an element does not cause the replaced element to be visited.
+ * - removing an element does not cause elements to be skipped.
+ * - an element added later in the list will be visited.
+ */
+export declare function walkerIndexGenerator<T>(initialList: Array<T>): (list: Array<T>, child: T, index: number) => number;
+
+export declare class WhitespaceNode {
+ type: ComponentValueType;
+ value: Array<CSSToken>;
+ constructor(value: Array<CSSToken>);
+ tokens(): Array<CSSToken>;
+ toString(): string;
+ toJSON(): {
+ type: ComponentValueType;
+ tokens: CSSToken[];
+ };
+ isWhitespaceNode(): this is WhitespaceNode;
+ static isWhitespaceNode(x: unknown): x is WhitespaceNode;
+}
+
+export { }
diff --git a/node_modules/@csstools/css-parser-algorithms/dist/index.mjs b/node_modules/@csstools/css-parser-algorithms/dist/index.mjs
index cc63349e..63b5ace3 100644
--- a/node_modules/@csstools/css-parser-algorithms/dist/index.mjs
+++ b/node_modules/@csstools/css-parser-algorithms/dist/index.mjs
@@ -1 +1 @@
-import{TokenType as e,isToken as n,stringify as t,ParseError as o,mirrorVariant as s,mirrorVariantType as i}from"@csstools/css-tokenizer";var r;function consumeComponentValue(n,t){const o=t[0];if(o[0]===e.OpenParen||o[0]===e.OpenCurly||o[0]===e.OpenSquare){const e=consumeSimpleBlock(n,t);return{advance:e.advance,node:e.node}}if(o[0]===e.Function){const e=consumeFunction(n,t);return{advance:e.advance,node:e.node}}if(o[0]===e.Whitespace){const e=consumeWhitespace(n,t);return{advance:e.advance,node:e.node}}if(o[0]===e.Comment){const e=consumeComment(n,t);return{advance:e.advance,node:e.node}}return{advance:1,node:new TokenNode(o)}}!function(e){e.Function="function",e.SimpleBlock="simple-block",e.Whitespace="whitespace",e.Comment="comment",e.Token="token"}(r||(r={}));class FunctionNode{type=r.Function;name;endToken;value;constructor(e,n,t){this.name=e,this.endToken=n,this.value=t}getName(){return this.name[4].value}normalize(){this.endToken[0]===e.EOF&&(this.endToken=[e.CloseParen,")",-1,-1,void 0])}tokens(){return this.endToken[0]===e.EOF?[this.name,...this.value.flatMap((e=>e.tokens()))]:[this.name,...this.value.flatMap((e=>e.tokens())),this.endToken]}toString(){const e=this.value.map((e=>n(e)?t(e):e.toString())).join("");return t(this.name)+e+t(this.endToken)}indexOf(e){return this.value.indexOf(e)}at(e){if("number"==typeof e)return e<0&&(e=this.value.length+e),this.value[e]}walk(e,n){let t=!1;if(this.value.forEach(((o,s)=>{if(t)return;let i;n&&(i={...n}),!1!==e({node:o,parent:this,state:i},s)?"walk"in o&&!1===o.walk(e,i)&&(t=!0):t=!0})),t)return!1}toJSON(){return{type:this.type,name:this.getName(),tokens:this.tokens(),value:this.value.map((e=>e.toJSON()))}}isFunctionNode(){return FunctionNode.isFunctionNode(this)}static isFunctionNode(e){return!!e&&(e instanceof FunctionNode&&e.type===r.Function)}}function consumeFunction(n,t){const s=[];let i=1;for(;;){const r=t[i];if(!r||r[0]===e.EOF)return n.onParseError(new o("Unexpected EOF while consuming a function.",t[0][2],t[t.length-1][3],["5.4.9. Consume a function","Unexpected EOF"])),{advance:t.length,node:new FunctionNode(t[0],r,s)};if(r[0]===e.CloseParen)return{advance:i+1,node:new FunctionNode(t[0],r,s)};if(r[0]===e.Comment||r[0]===e.Whitespace){const e=consumeAllCommentsAndWhitespace(n,t.slice(i));i+=e.advance,s.push(...e.nodes);continue}const a=consumeComponentValue(n,t.slice(i));i+=a.advance,s.push(a.node)}}class SimpleBlockNode{type=r.SimpleBlock;startToken;endToken;value;constructor(e,n,t){this.startToken=e,this.endToken=n,this.value=t}normalize(){if(this.endToken[0]===e.EOF){const e=s(this.startToken);e&&(this.endToken=e)}}tokens(){return this.endToken[0]===e.EOF?[this.startToken,...this.value.flatMap((e=>e.tokens()))]:[this.startToken,...this.value.flatMap((e=>e.tokens())),this.endToken]}toString(){const e=this.value.map((e=>n(e)?t(e):e.toString())).join("");return t(this.startToken)+e+t(this.endToken)}indexOf(e){return this.value.indexOf(e)}at(e){if("number"==typeof e)return e<0&&(e=this.value.length+e),this.value[e]}walk(e,n){let t=!1;if(this.value.forEach(((o,s)=>{if(t)return;let i;n&&(i={...n}),!1!==e({node:o,parent:this,state:i},s)?"walk"in o&&!1===o.walk(e,i)&&(t=!0):t=!0})),t)return!1}toJSON(){return{type:this.type,startToken:this.startToken,tokens:this.tokens(),value:this.value.map((e=>e.toJSON()))}}isSimpleBlockNode(){return SimpleBlockNode.isSimpleBlockNode(this)}static isSimpleBlockNode(e){return!!e&&(e instanceof SimpleBlockNode&&e.type===r.SimpleBlock)}}function consumeSimpleBlock(n,t){const s=i(t[0][0]);if(!s)throw new Error("Failed to parse, a mirror variant must exist for all block open tokens.");const r=[];let a=1;for(;;){const i=t[a];if(!i||i[0]===e.EOF)return n.onParseError(new o("Unexpected EOF while consuming a simple block.",t[0][2],t[t.length-1][3],["5.4.8. Consume a simple block","Unexpected EOF"])),{advance:t.length,node:new SimpleBlockNode(t[0],i,r)};if(i[0]===s)return{advance:a+1,node:new SimpleBlockNode(t[0],i,r)};if(i[0]===e.Comment||i[0]===e.Whitespace){const e=consumeAllCommentsAndWhitespace(n,t.slice(a));a+=e.advance,r.push(...e.nodes);continue}const c=consumeComponentValue(n,t.slice(a));a+=c.advance,r.push(c.node)}}class WhitespaceNode{type=r.Whitespace;value;constructor(e){this.value=e}tokens(){return this.value}toString(){return t(...this.value)}toJSON(){return{type:this.type,tokens:this.tokens()}}isWhitespaceNode(){return WhitespaceNode.isWhitespaceNode(this)}static isWhitespaceNode(e){return!!e&&(e instanceof WhitespaceNode&&e.type===r.Whitespace)}}function consumeWhitespace(n,t){let o=0;for(;;){if(t[o][0]!==e.Whitespace)return{advance:o,node:new WhitespaceNode(t.slice(0,o))};o++}}class CommentNode{type=r.Comment;value;constructor(e){this.value=e}tokens(){return[this.value]}toString(){return t(this.value)}toJSON(){return{type:this.type,tokens:this.tokens()}}isCommentNode(){return CommentNode.isCommentNode(this)}static isCommentNode(e){return!!e&&(e instanceof CommentNode&&e.type===r.Comment)}}function consumeComment(e,n){return{advance:1,node:new CommentNode(n[0])}}function consumeAllCommentsAndWhitespace(n,t){const o=[];let s=0;for(;;)if(t[s][0]!==e.Whitespace){if(t[s][0]!==e.Comment)return{advance:s,nodes:o};o.push(new CommentNode(t[s])),s++}else{const e=consumeWhitespace(0,t.slice(s));s+=e.advance,o.push(e.node)}}class TokenNode{type=r.Token;value;constructor(e){this.value=e}tokens(){return[this.value]}toString(){return t(this.value)}toJSON(){return{type:this.type,tokens:this.tokens()}}isTokenNode(){return TokenNode.isTokenNode(this)}static isTokenNode(e){return!!e&&(e instanceof TokenNode&&e.type===r.Token)}}function parseComponentValue(n,t){const s={onParseError:(null==t?void 0:t.onParseError)??(()=>{})},i=[...n];i[i.length-1][0]!==e.EOF&&i.push([e.EOF,"",i[i.length-1][2],i[i.length-1][3],void 0]);const r=consumeComponentValue(s,i);if(i[Math.min(r.advance,i.length-1)][0]===e.EOF)return r.node;s.onParseError(new o("Expected EOF after parsing a component value.",n[0][2],n[n.length-1][3],["5.3.9. Parse a component value","Expected EOF"]))}function parseListOfComponentValues(n,t){const o={onParseError:(null==t?void 0:t.onParseError)??(()=>{})},s=[...n];s[s.length-1][0]!==e.EOF&&s.push([e.EOF,"",s[s.length-1][2],s[s.length-1][3],void 0]);const i=[];let r=0;for(;;){if(!s[r]||s[r][0]===e.EOF)return i;const n=consumeComponentValue(o,s.slice(r));i.push(n.node),r+=n.advance}}function parseCommaSeparatedListOfComponentValues(n,t){const o={onParseError:(null==t?void 0:t.onParseError)??(()=>{})},s=[...n];if(0===n.length)return[];s[s.length-1][0]!==e.EOF&&s.push([e.EOF,"",s[s.length-1][2],s[s.length-1][3],void 0]);const i=[];let r=[],a=0;for(;;){if(!s[a]||s[a][0]===e.EOF)return r.length&&i.push(r),i;if(s[a][0]===e.Comma){i.push(r),r=[],a++;continue}const t=consumeComponentValue(o,n.slice(a));r.push(t.node),a+=t.advance}}function gatherNodeAncestry(e){const n=new Map;return e.walk((e=>{Array.isArray(e.node)?e.node.forEach((t=>{n.set(t,e.parent)})):n.set(e.node,e.parent)})),n}function isSimpleBlockNode(e){return SimpleBlockNode.isSimpleBlockNode(e)}function isFunctionNode(e){return FunctionNode.isFunctionNode(e)}function isWhitespaceNode(e){return WhitespaceNode.isWhitespaceNode(e)}function isCommentNode(e){return CommentNode.isCommentNode(e)}function isTokenNode(e){return TokenNode.isTokenNode(e)}function replaceComponentValues(e,n){for(let t=0;t<e.length;t++){const o=e[t];for(let e=0;e<o.length;e++){const t=o[e];{const s=n(t);if(s){o.splice(e,1,s);continue}}(isSimpleBlockNode(t)||isFunctionNode(t))&&t.walk(((e,t)=>{if("number"!=typeof t)return;const o=e.node,s=n(o);s&&e.parent.value.splice(t,1,s)}))}}return e}function stringify(e){return e.map((e=>e.map((e=>t(...e.tokens()))).join(""))).join(",")}function sourceIndices(e){if(Array.isArray(e)){const n=e[0];if(!n)return[0,0];const t=e[e.length-1]||n;return[sourceIndices(n)[0],sourceIndices(t)[1]]}const n=e.tokens(),t=n[0],o=n[n.length-1];return t&&o?[t[2],o[3]]:[0,0]}export{CommentNode,r as ComponentValueType,FunctionNode,SimpleBlockNode,TokenNode,WhitespaceNode,consumeAllCommentsAndWhitespace,consumeComment,consumeComponentValue,consumeFunction,consumeSimpleBlock,consumeWhitespace,gatherNodeAncestry,isCommentNode,isFunctionNode,isSimpleBlockNode,isTokenNode,isWhitespaceNode,parseCommaSeparatedListOfComponentValues,parseComponentValue,parseListOfComponentValues,replaceComponentValues,sourceIndices,stringify};
+import{TokenType as e,isToken as n,stringify as t,mirrorVariant as o,ParseError as s,mirrorVariantType as i}from"@csstools/css-tokenizer";var r;function walkerIndexGenerator(e){let n=e.slice();return(e,t,o)=>{let s=-1;for(let i=n.indexOf(t);i<n.length&&(s=e.indexOf(n[i]),-1===s||s<o);i++);return-1===s||s===o&&t===e[o]&&(s++,s>=e.length)?-1:(n=e.slice(),s)}}function consumeComponentValue(n,t){const o=t[0];if(o[0]===e.OpenParen||o[0]===e.OpenCurly||o[0]===e.OpenSquare){const e=consumeSimpleBlock(n,t);return{advance:e.advance,node:e.node}}if(o[0]===e.Function){const e=consumeFunction(n,t);return{advance:e.advance,node:e.node}}if(o[0]===e.Whitespace){const e=consumeWhitespace(n,t);return{advance:e.advance,node:e.node}}if(o[0]===e.Comment){const e=consumeComment(n,t);return{advance:e.advance,node:e.node}}return{advance:1,node:new TokenNode(o)}}!function(e){e.Function="function",e.SimpleBlock="simple-block",e.Whitespace="whitespace",e.Comment="comment",e.Token="token"}(r||(r={}));class ContainerNodeBaseClass{value=[];indexOf(e){return this.value.indexOf(e)}at(e){if("number"==typeof e)return e<0&&(e=this.value.length+e),this.value[e]}forEach(e,n){if(0===this.value.length)return;const t=walkerIndexGenerator(this.value);let o=0;for(;o<this.value.length;){const s=this.value[o];let i;if(n&&(i={...n}),!1===e({node:s,parent:this,state:i},o))return!1;if(o=t(this.value,s,o),-1===o)break}}walk(e,n){0!==this.value.length&&this.forEach(((n,t)=>!1!==e(n,t)&&((!("walk"in n.node)||!this.value.includes(n.node)||!1!==n.node.walk(e,n.state))&&void 0)),n)}}class FunctionNode extends ContainerNodeBaseClass{type=r.Function;name;endToken;constructor(e,n,t){super(),this.name=e,this.endToken=n,this.value=t}getName(){return this.name[4].value}normalize(){this.endToken[0]===e.EOF&&(this.endToken=[e.CloseParen,")",-1,-1,void 0])}tokens(){return this.endToken[0]===e.EOF?[this.name,...this.value.flatMap((e=>e.tokens()))]:[this.name,...this.value.flatMap((e=>e.tokens())),this.endToken]}toString(){const e=this.value.map((e=>n(e)?t(e):e.toString())).join("");return t(this.name)+e+t(this.endToken)}toJSON(){return{type:this.type,name:this.getName(),tokens:this.tokens(),value:this.value.map((e=>e.toJSON()))}}isFunctionNode(){return FunctionNode.isFunctionNode(this)}static isFunctionNode(e){return!!e&&(e instanceof FunctionNode&&e.type===r.Function)}}function consumeFunction(n,t){const o=[];let i=1;for(;;){const r=t[i];if(!r||r[0]===e.EOF)return n.onParseError(new s("Unexpected EOF while consuming a function.",t[0][2],t[t.length-1][3],["5.4.9. Consume a function","Unexpected EOF"])),{advance:t.length,node:new FunctionNode(t[0],r,o)};if(r[0]===e.CloseParen)return{advance:i+1,node:new FunctionNode(t[0],r,o)};if(r[0]===e.Comment||r[0]===e.Whitespace){const e=consumeAllCommentsAndWhitespace(n,t.slice(i));i+=e.advance,o.push(...e.nodes);continue}const a=consumeComponentValue(n,t.slice(i));i+=a.advance,o.push(a.node)}}class SimpleBlockNode extends ContainerNodeBaseClass{type=r.SimpleBlock;startToken;endToken;constructor(e,n,t){super(),this.startToken=e,this.endToken=n,this.value=t}normalize(){if(this.endToken[0]===e.EOF){const e=o(this.startToken);e&&(this.endToken=e)}}tokens(){return this.endToken[0]===e.EOF?[this.startToken,...this.value.flatMap((e=>e.tokens()))]:[this.startToken,...this.value.flatMap((e=>e.tokens())),this.endToken]}toString(){const e=this.value.map((e=>n(e)?t(e):e.toString())).join("");return t(this.startToken)+e+t(this.endToken)}indexOf(e){return this.value.indexOf(e)}at(e){if("number"==typeof e)return e<0&&(e=this.value.length+e),this.value[e]}toJSON(){return{type:this.type,startToken:this.startToken,tokens:this.tokens(),value:this.value.map((e=>e.toJSON()))}}isSimpleBlockNode(){return SimpleBlockNode.isSimpleBlockNode(this)}static isSimpleBlockNode(e){return!!e&&(e instanceof SimpleBlockNode&&e.type===r.SimpleBlock)}}function consumeSimpleBlock(n,t){const o=i(t[0][0]);if(!o)throw new Error("Failed to parse, a mirror variant must exist for all block open tokens.");const r=[];let a=1;for(;;){const i=t[a];if(!i||i[0]===e.EOF)return n.onParseError(new s("Unexpected EOF while consuming a simple block.",t[0][2],t[t.length-1][3],["5.4.8. Consume a simple block","Unexpected EOF"])),{advance:t.length,node:new SimpleBlockNode(t[0],i,r)};if(i[0]===o)return{advance:a+1,node:new SimpleBlockNode(t[0],i,r)};if(i[0]===e.Comment||i[0]===e.Whitespace){const e=consumeAllCommentsAndWhitespace(n,t.slice(a));a+=e.advance,r.push(...e.nodes);continue}const c=consumeComponentValue(n,t.slice(a));a+=c.advance,r.push(c.node)}}class WhitespaceNode{type=r.Whitespace;value;constructor(e){this.value=e}tokens(){return this.value}toString(){return t(...this.value)}toJSON(){return{type:this.type,tokens:this.tokens()}}isWhitespaceNode(){return WhitespaceNode.isWhitespaceNode(this)}static isWhitespaceNode(e){return!!e&&(e instanceof WhitespaceNode&&e.type===r.Whitespace)}}function consumeWhitespace(n,t){let o=0;for(;;){if(t[o][0]!==e.Whitespace)return{advance:o,node:new WhitespaceNode(t.slice(0,o))};o++}}class CommentNode{type=r.Comment;value;constructor(e){this.value=e}tokens(){return[this.value]}toString(){return t(this.value)}toJSON(){return{type:this.type,tokens:this.tokens()}}isCommentNode(){return CommentNode.isCommentNode(this)}static isCommentNode(e){return!!e&&(e instanceof CommentNode&&e.type===r.Comment)}}function consumeComment(e,n){return{advance:1,node:new CommentNode(n[0])}}function consumeAllCommentsAndWhitespace(n,t){const o=[];let s=0;for(;;)if(t[s][0]!==e.Whitespace){if(t[s][0]!==e.Comment)return{advance:s,nodes:o};o.push(new CommentNode(t[s])),s++}else{const e=consumeWhitespace(0,t.slice(s));s+=e.advance,o.push(e.node)}}class TokenNode{type=r.Token;value;constructor(e){this.value=e}tokens(){return[this.value]}toString(){return t(this.value)}toJSON(){return{type:this.type,tokens:this.tokens()}}isTokenNode(){return TokenNode.isTokenNode(this)}static isTokenNode(e){return!!e&&(e instanceof TokenNode&&e.type===r.Token)}}function parseComponentValue(n,t){const o={onParseError:t?.onParseError??(()=>{})},i=[...n];i[i.length-1][0]!==e.EOF&&i.push([e.EOF,"",i[i.length-1][2],i[i.length-1][3],void 0]);const r=consumeComponentValue(o,i);if(i[Math.min(r.advance,i.length-1)][0]===e.EOF)return r.node;o.onParseError(new s("Expected EOF after parsing a component value.",n[0][2],n[n.length-1][3],["5.3.9. Parse a component value","Expected EOF"]))}function parseListOfComponentValues(n,t){const o={onParseError:t?.onParseError??(()=>{})},s=[...n];s[s.length-1][0]!==e.EOF&&s.push([e.EOF,"",s[s.length-1][2],s[s.length-1][3],void 0]);const i=[];let r=0;for(;;){if(!s[r]||s[r][0]===e.EOF)return i;const n=consumeComponentValue(o,s.slice(r));i.push(n.node),r+=n.advance}}function parseCommaSeparatedListOfComponentValues(n,t){const o={onParseError:t?.onParseError??(()=>{})},s=[...n];if(0===n.length)return[];s[s.length-1][0]!==e.EOF&&s.push([e.EOF,"",s[s.length-1][2],s[s.length-1][3],void 0]);const i=[];let r=[],a=0;for(;;){if(!s[a]||s[a][0]===e.EOF)return r.length&&i.push(r),i;if(s[a][0]===e.Comma){i.push(r),r=[],a++;continue}const t=consumeComponentValue(o,n.slice(a));r.push(t.node),a+=t.advance}}function gatherNodeAncestry(e){const n=new Map;return e.walk((e=>{Array.isArray(e.node)?e.node.forEach((t=>{n.set(t,e.parent)})):n.set(e.node,e.parent)})),n}function isSimpleBlockNode(e){return SimpleBlockNode.isSimpleBlockNode(e)}function isFunctionNode(e){return FunctionNode.isFunctionNode(e)}function isWhitespaceNode(e){return WhitespaceNode.isWhitespaceNode(e)}function isCommentNode(e){return CommentNode.isCommentNode(e)}function isTokenNode(e){return TokenNode.isTokenNode(e)}function replaceComponentValues(e,n){for(let t=0;t<e.length;t++){const o=e[t];for(let e=0;e<o.length;e++){const t=o[e];{const s=n(t);if(s){o.splice(e,1,s);continue}}(isSimpleBlockNode(t)||isFunctionNode(t))&&t.walk(((e,t)=>{if("number"!=typeof t)return;const o=e.node,s=n(o);s&&e.parent.value.splice(t,1,s)}))}}return e}function stringify(e){return e.map((e=>e.map((e=>t(...e.tokens()))).join(""))).join(",")}function sourceIndices(e){if(Array.isArray(e)){const n=e[0];if(!n)return[0,0];const t=e[e.length-1]||n;return[sourceIndices(n)[0],sourceIndices(t)[1]]}const n=e.tokens(),t=n[0],o=n[n.length-1];return t&&o?[t[2],o[3]]:[0,0]}export{CommentNode,r as ComponentValueType,ContainerNodeBaseClass,FunctionNode,SimpleBlockNode,TokenNode,WhitespaceNode,gatherNodeAncestry,isCommentNode,isFunctionNode,isSimpleBlockNode,isTokenNode,isWhitespaceNode,parseCommaSeparatedListOfComponentValues,parseComponentValue,parseListOfComponentValues,replaceComponentValues,sourceIndices,stringify,walkerIndexGenerator};
diff --git a/node_modules/@csstools/css-parser-algorithms/dist/interfaces/context.d.ts b/node_modules/@csstools/css-parser-algorithms/dist/interfaces/context.d.ts
deleted file mode 100644
index dc246e00..00000000
--- a/node_modules/@csstools/css-parser-algorithms/dist/interfaces/context.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { ParseError } from '@csstools/css-tokenizer';
-export type Context = {
- onParseError: (error: ParseError) => void;
-};
diff --git a/node_modules/@csstools/css-parser-algorithms/dist/parse/parse-comma-separated-list-of-component-values.d.ts b/node_modules/@csstools/css-parser-algorithms/dist/parse/parse-comma-separated-list-of-component-values.d.ts
deleted file mode 100644
index 67dff1d0..00000000
--- a/node_modules/@csstools/css-parser-algorithms/dist/parse/parse-comma-separated-list-of-component-values.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { CSSToken, ParseError } from '@csstools/css-tokenizer';
-import { ComponentValue } from '../consume/consume-component-block-function';
-export declare function parseCommaSeparatedListOfComponentValues(tokens: Array<CSSToken>, options?: {
- onParseError?: (error: ParseError) => void;
-}): ComponentValue[][];
diff --git a/node_modules/@csstools/css-parser-algorithms/dist/parse/parse-component-value.d.ts b/node_modules/@csstools/css-parser-algorithms/dist/parse/parse-component-value.d.ts
deleted file mode 100644
index 2961290f..00000000
--- a/node_modules/@csstools/css-parser-algorithms/dist/parse/parse-component-value.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { CSSToken, ParseError } from '@csstools/css-tokenizer';
-export declare function parseComponentValue(tokens: Array<CSSToken>, options?: {
- onParseError?: (error: ParseError) => void;
-}): import("../consume/consume-component-block-function").ComponentValue | undefined;
diff --git a/node_modules/@csstools/css-parser-algorithms/dist/parse/parse-list-of-component-values.d.ts b/node_modules/@csstools/css-parser-algorithms/dist/parse/parse-list-of-component-values.d.ts
deleted file mode 100644
index 737f554d..00000000
--- a/node_modules/@csstools/css-parser-algorithms/dist/parse/parse-list-of-component-values.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { CSSToken, ParseError } from '@csstools/css-tokenizer';
-import { ComponentValue } from '../consume/consume-component-block-function';
-export declare function parseListOfComponentValues(tokens: Array<CSSToken>, options?: {
- onParseError?: (error: ParseError) => void;
-}): ComponentValue[];
diff --git a/node_modules/@csstools/css-parser-algorithms/dist/util/component-value-type.d.ts b/node_modules/@csstools/css-parser-algorithms/dist/util/component-value-type.d.ts
deleted file mode 100644
index eda7ee93..00000000
--- a/node_modules/@csstools/css-parser-algorithms/dist/util/component-value-type.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export declare enum ComponentValueType {
- Function = "function",
- SimpleBlock = "simple-block",
- Whitespace = "whitespace",
- Comment = "comment",
- Token = "token"
-}
diff --git a/node_modules/@csstools/css-parser-algorithms/dist/util/node-ancestry.d.ts b/node_modules/@csstools/css-parser-algorithms/dist/util/node-ancestry.d.ts
deleted file mode 100644
index 219ea619..00000000
--- a/node_modules/@csstools/css-parser-algorithms/dist/util/node-ancestry.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export interface walkable {
- walk(cb: (entry: {
- node: Array<unknown> | unknown;
- parent: unknown;
- }, index: number | string) => boolean | void): false | undefined;
-}
-export declare function gatherNodeAncestry(node: walkable): Map<unknown, unknown>;
diff --git a/node_modules/@csstools/css-parser-algorithms/dist/util/replace-component-values.d.ts b/node_modules/@csstools/css-parser-algorithms/dist/util/replace-component-values.d.ts
deleted file mode 100644
index 774051c6..00000000
--- a/node_modules/@csstools/css-parser-algorithms/dist/util/replace-component-values.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import type { ComponentValue } from '../consume/consume-component-block-function';
-export declare function replaceComponentValues(componentValuesList: Array<Array<ComponentValue>>, replaceWith: (componentValue: ComponentValue) => ComponentValue | void): ComponentValue[][];
diff --git a/node_modules/@csstools/css-parser-algorithms/dist/util/source-indices.d.ts b/node_modules/@csstools/css-parser-algorithms/dist/util/source-indices.d.ts
deleted file mode 100644
index 92d124be..00000000
--- a/node_modules/@csstools/css-parser-algorithms/dist/util/source-indices.d.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { CSSToken } from '@csstools/css-tokenizer';
-interface TokenConvertible {
- tokens(): Array<CSSToken>;
-}
-/**
- * Returns the start and end index of a node in the CSS source string.
- */
-export declare function sourceIndices(x: TokenConvertible | Array<TokenConvertible>): [number, number];
-export {};
diff --git a/node_modules/@csstools/css-parser-algorithms/dist/util/stringify.d.ts b/node_modules/@csstools/css-parser-algorithms/dist/util/stringify.d.ts
deleted file mode 100644
index 6ab4140c..00000000
--- a/node_modules/@csstools/css-parser-algorithms/dist/util/stringify.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import type { ComponentValue } from '../consume/consume-component-block-function';
-export declare function stringify(componentValueLists: Array<Array<ComponentValue>>): string;
diff --git a/node_modules/@csstools/css-parser-algorithms/dist/util/type-predicates.d.ts b/node_modules/@csstools/css-parser-algorithms/dist/util/type-predicates.d.ts
deleted file mode 100644
index 896d3036..00000000
--- a/node_modules/@csstools/css-parser-algorithms/dist/util/type-predicates.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { CommentNode, FunctionNode, SimpleBlockNode, TokenNode, WhitespaceNode } from '../consume/consume-component-block-function';
-export declare function isSimpleBlockNode(x: unknown): x is SimpleBlockNode;
-export declare function isFunctionNode(x: unknown): x is FunctionNode;
-export declare function isWhitespaceNode(x: unknown): x is WhitespaceNode;
-export declare function isCommentNode(x: unknown): x is CommentNode;
-export declare function isTokenNode(x: unknown): x is TokenNode;