first commit

This commit is contained in:
2026-03-10 16:18:05 +00:00
commit 11f9c069b5
31635 changed files with 3187747 additions and 0 deletions

0
node_modules/structured-headers/dist/build generated vendored Normal file
View File

4
node_modules/structured-headers/dist/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
export * from './serializer';
export * from './parser';
export * from './types';
export { Token } from './token';

19
node_modules/structured-headers/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Token = void 0;
__exportStar(require("./serializer"), exports);
__exportStar(require("./parser"), exports);
__exportStar(require("./types"), exports);
var token_1 = require("./token");
Object.defineProperty(exports, "Token", { enumerable: true, get: function () { return token_1.Token; } });
//# sourceMappingURL=index.js.map

1
node_modules/structured-headers/dist/index.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,2CAAyB;AACzB,0CAAwB;AACxB,iCAAgC;AAAvB,8FAAA,KAAK,OAAA"}

38
node_modules/structured-headers/dist/parser.d.ts generated vendored Normal file
View File

@@ -0,0 +1,38 @@
import { Dictionary, List, Item } from './types';
export declare function parseDictionary(input: string): Dictionary;
export declare function parseList(input: string): List;
export declare function parseItem(input: string): Item;
export declare class ParseError extends Error {
constructor(position: number, message: string);
}
export default class Parser {
input: string;
pos: number;
constructor(input: string);
parseDictionary(): Dictionary;
parseList(): List;
parseItem(standaloneItem?: boolean): Item;
private parseItemOrInnerList;
private parseInnerList;
private parseBareItem;
private parseParameters;
private parseIntegerOrDecimal;
private parseString;
private parseToken;
private parseByteSequence;
private parseBoolean;
private parseKey;
/**
* Looks at the next character without advancing the cursor.
*/
private lookChar;
/**
* Checks if the next character is 'char', and fail otherwise.
*/
private expectChar;
private getChar;
private eof;
private skipOWS;
private skipWS;
private checkTrail;
}

343
node_modules/structured-headers/dist/parser.js generated vendored Normal file
View File

@@ -0,0 +1,343 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ParseError = exports.parseItem = exports.parseList = exports.parseDictionary = void 0;
const types_1 = require("./types");
const token_1 = require("./token");
const util_1 = require("./util");
function parseDictionary(input) {
const parser = new Parser(input);
return parser.parseDictionary();
}
exports.parseDictionary = parseDictionary;
function parseList(input) {
const parser = new Parser(input);
return parser.parseList();
}
exports.parseList = parseList;
function parseItem(input) {
const parser = new Parser(input);
return parser.parseItem();
}
exports.parseItem = parseItem;
class ParseError extends Error {
constructor(position, message) {
super(`Parse error: ${message} at offset ${position}`);
}
}
exports.ParseError = ParseError;
class Parser {
constructor(input) {
this.input = input;
this.pos = 0;
}
parseDictionary() {
this.skipWS();
const dictionary = new Map();
while (!this.eof()) {
const thisKey = this.parseKey();
let member;
if (this.lookChar() === '=') {
this.pos++;
member = this.parseItemOrInnerList();
}
else {
member = [true, this.parseParameters()];
}
dictionary.set(thisKey, member);
this.skipOWS();
if (this.eof()) {
return dictionary;
}
this.expectChar(',');
this.pos++;
this.skipOWS();
if (this.eof()) {
throw new ParseError(this.pos, 'Dictionary contained a trailing comma');
}
}
return dictionary;
}
parseList() {
this.skipWS();
const members = [];
while (!this.eof()) {
members.push(this.parseItemOrInnerList());
this.skipOWS();
if (this.eof()) {
return members;
}
this.expectChar(',');
this.pos++;
this.skipOWS();
if (this.eof()) {
throw new ParseError(this.pos, 'A list may not end with a trailing comma');
}
}
return members;
}
parseItem(standaloneItem = true) {
if (standaloneItem)
this.skipWS();
const result = [
this.parseBareItem(),
this.parseParameters()
];
if (standaloneItem)
this.checkTrail();
return result;
}
parseItemOrInnerList() {
if (this.lookChar() === '(') {
return this.parseInnerList();
}
else {
return this.parseItem(false);
}
}
parseInnerList() {
this.expectChar('(');
this.pos++;
const innerList = [];
while (!this.eof()) {
this.skipWS();
if (this.lookChar() === ')') {
this.pos++;
return [
innerList,
this.parseParameters()
];
}
innerList.push(this.parseItem(false));
const nextChar = this.lookChar();
if (nextChar !== ' ' && nextChar !== ')') {
throw new ParseError(this.pos, 'Expected a whitespace or ) after every item in an inner list');
}
}
throw new ParseError(this.pos, 'Could not find end of inner list');
}
parseBareItem() {
const char = this.lookChar();
if (char.match(/^[-0-9]/)) {
return this.parseIntegerOrDecimal();
}
if (char === '"') {
return this.parseString();
}
if (char.match(/^[A-Za-z*]/)) {
return this.parseToken();
}
if (char === ':') {
return this.parseByteSequence();
}
if (char === '?') {
return this.parseBoolean();
}
throw new ParseError(this.pos, 'Unexpected input');
}
parseParameters() {
const parameters = new Map();
while (!this.eof()) {
const char = this.lookChar();
if (char !== ';') {
break;
}
this.pos++;
this.skipWS();
const key = this.parseKey();
let value = true;
if (this.lookChar() === '=') {
this.pos++;
value = this.parseBareItem();
}
parameters.set(key, value);
}
return parameters;
}
parseIntegerOrDecimal() {
let type = 'integer';
let sign = 1;
let inputNumber = '';
if (this.lookChar() === '-') {
sign = -1;
this.pos++;
}
// The spec wants this check but it's unreachable code.
//if (this.eof()) {
// throw new ParseError(this.pos, 'Empty integer');
//}
if (!isDigit(this.lookChar())) {
throw new ParseError(this.pos, 'Expected a digit (0-9)');
}
while (!this.eof()) {
const char = this.getChar();
if (isDigit(char)) {
inputNumber += char;
}
else if (type === 'integer' && char === '.') {
if (inputNumber.length > 12) {
throw new ParseError(this.pos, 'Exceeded maximum decimal length');
}
inputNumber += '.';
type = 'decimal';
}
else {
// We need to 'prepend' the character, so it's just a rewind
this.pos--;
break;
}
if (type === 'integer' && inputNumber.length > 15) {
throw new ParseError(this.pos, 'Exceeded maximum integer length');
}
if (type === 'decimal' && inputNumber.length > 16) {
throw new ParseError(this.pos, 'Exceeded maximum decimal length');
}
}
if (type === 'integer') {
return parseInt(inputNumber, 10) * sign;
}
else {
if (inputNumber.endsWith('.')) {
throw new ParseError(this.pos, 'Decimal cannot end on a period');
}
if (inputNumber.split('.')[1].length > 3) {
throw new ParseError(this.pos, 'Number of digits after the decimal point cannot exceed 3');
}
return parseFloat(inputNumber) * sign;
}
}
parseString() {
let outputString = '';
this.expectChar('"');
this.pos++;
while (!this.eof()) {
const char = this.getChar();
if (char === '\\') {
if (this.eof()) {
throw new ParseError(this.pos, 'Unexpected end of input');
}
const nextChar = this.getChar();
if (nextChar !== '\\' && nextChar !== '"') {
throw new ParseError(this.pos, 'A backslash must be followed by another backslash or double quote');
}
outputString += nextChar;
}
else if (char === '"') {
return outputString;
}
else if (!util_1.isAscii(char)) {
throw new Error('Strings must be in the ASCII range');
}
else {
outputString += char;
}
}
throw new ParseError(this.pos, 'Unexpected end of input');
}
parseToken() {
// The specification wants this check, but it's an unreachable code block.
// if (!/^[A-Za-z*]/.test(this.lookChar())) {
// throw new ParseError(this.pos, 'A token must begin with an asterisk or letter (A-Z, a-z)');
//}
let outputString = '';
while (!this.eof()) {
const char = this.lookChar();
if (!/^[:/!#$%&'*+\-.^_`|~A-Za-z0-9]$/.test(char)) {
return new token_1.Token(outputString);
}
outputString += this.getChar();
}
return new token_1.Token(outputString);
}
parseByteSequence() {
this.expectChar(':');
this.pos++;
const endPos = this.input.indexOf(':', this.pos);
if (endPos === -1) {
throw new ParseError(this.pos, 'Could not find a closing ":" character to mark end of Byte Sequence');
}
const b64Content = this.input.substring(this.pos, endPos);
this.pos += b64Content.length + 1;
if (!/^[A-Za-z0-9+/=]*$/.test(b64Content)) {
throw new ParseError(this.pos, 'ByteSequence does not contain a valid base64 string');
}
return new types_1.ByteSequence(b64Content);
}
parseBoolean() {
this.expectChar('?');
this.pos++;
const char = this.getChar();
if (char === '1') {
return true;
}
if (char === '0') {
return false;
}
throw new ParseError(this.pos, 'Unexpected character. Expected a "1" or a "0"');
}
parseKey() {
if (!this.lookChar().match(/^[a-z*]/)) {
throw new ParseError(this.pos, 'A key must begin with an asterisk or letter (a-z)');
}
let outputString = '';
while (!this.eof()) {
const char = this.lookChar();
if (!/^[a-z0-9_\-.*]$/.test(char)) {
return outputString;
}
outputString += this.getChar();
}
return outputString;
}
/**
* Looks at the next character without advancing the cursor.
*/
lookChar() {
return this.input[this.pos];
}
/**
* Checks if the next character is 'char', and fail otherwise.
*/
expectChar(char) {
if (this.lookChar() !== char) {
throw new ParseError(this.pos, `Expected ${char}`);
}
}
getChar() {
return this.input[this.pos++];
}
eof() {
return this.pos >= this.input.length;
}
// Advances the pointer to skip all whitespace.
skipOWS() {
while (true) {
const c = this.input.substr(this.pos, 1);
if (c === ' ' || c === '\t') {
this.pos++;
}
else {
break;
}
}
}
// Advances the pointer to skip all spaces
skipWS() {
while (this.lookChar() === ' ') {
this.pos++;
}
}
// At the end of parsing, we need to make sure there are no bytes after the
// header except whitespace.
checkTrail() {
this.skipWS();
if (!this.eof()) {
throw new ParseError(this.pos, 'Unexpected characters at end of input');
}
}
}
exports.default = Parser;
const isDigitRegex = /^[0-9]$/;
function isDigit(char) {
return isDigitRegex.test(char);
}
//# sourceMappingURL=parser.js.map

1
node_modules/structured-headers/dist/parser.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

6
node_modules/structured-headers/dist/serializer.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
import { Dictionary, Item, List } from './types';
export declare class SerializeError extends Error {
}
export declare function serializeList(input: List): string;
export declare function serializeDictionary(input: Dictionary): string;
export declare function serializeItem(input: Item): string;

112
node_modules/structured-headers/dist/serializer.js generated vendored Normal file
View File

@@ -0,0 +1,112 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializeItem = exports.serializeDictionary = exports.serializeList = exports.SerializeError = void 0;
const types_1 = require("./types");
const token_1 = require("./token");
const util_1 = require("./util");
class SerializeError extends Error {
}
exports.SerializeError = SerializeError;
function serializeList(input) {
return input.map(value => {
if (util_1.isInnerList(value)) {
return serializeInnerList(value);
}
else {
return serializeItem(value);
}
}).join(', ');
}
exports.serializeList = serializeList;
function serializeDictionary(input) {
return Array.from(input.entries()).map(([key, value]) => {
let out = serializeKey(key);
if (value[0] === true) {
out += serializeParameters(value[1]);
}
else {
out += '=';
if (util_1.isInnerList(value)) {
out += serializeInnerList(value);
}
else {
out += serializeItem(value);
}
}
return out;
}).join(', ');
}
exports.serializeDictionary = serializeDictionary;
function serializeItem(input) {
return serializeBareItem(input[0]) + serializeParameters(input[1]);
}
exports.serializeItem = serializeItem;
function serializeInnerList(input) {
return `(${input[0].map(value => serializeItem(value)).join(' ')})${serializeParameters(input[1])}`;
}
function serializeBareItem(input) {
if (typeof input === 'number') {
if (Number.isInteger(input)) {
return serializeInteger(input);
}
return serializeDecimal(input);
}
if (typeof input === 'string') {
return serializeString(input);
}
if (input instanceof token_1.Token) {
return serializeToken(input);
}
if (input instanceof types_1.ByteSequence) {
return serializeByteSequence(input);
}
if (typeof input === 'boolean') {
return serializeBoolean(input);
}
throw new SerializeError(`Cannot serialize values of type ${typeof input}`);
}
function serializeInteger(input) {
if (input < -999999999999999 || input > 999999999999999) {
throw new SerializeError('Structured headers can only encode integers in the range range of -999,999,999,999,999 to 999,999,999,999,999 inclusive');
}
return input.toString();
}
function serializeDecimal(input) {
const out = input.toFixed(3).replace(/0+$/, '');
const signifantDigits = out.split('.')[0].replace('-', '').length;
if (signifantDigits > 12) {
throw new SerializeError('Fractional numbers are not allowed to have more than 12 significant digits before the decimal point');
}
return out;
}
function serializeString(input) {
if (!util_1.isAscii(input)) {
throw new SerializeError('Only ASCII strings may be serialized');
}
return `"${input.replace(/("|\\)/g, (v) => '\\' + v)}"`;
}
function serializeBoolean(input) {
return input ? '?1' : '?0';
}
function serializeByteSequence(input) {
return `:${input.toBase64()}:`;
}
function serializeToken(input) {
return input.toString();
}
function serializeParameters(input) {
return Array.from(input).map(([key, value]) => {
let out = ';' + serializeKey(key);
if (value !== true) {
out += '=' + serializeBareItem(value);
}
return out;
}).join('');
}
function serializeKey(input) {
if (!util_1.isValidKeyStr(input)) {
throw new SerializeError('Keys in dictionaries must only contain lowercase letter, numbers, _-*. and must start with a letter or *');
}
return input;
}
//# sourceMappingURL=serializer.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"serializer.js","sourceRoot":"","sources":["../src/serializer.ts"],"names":[],"mappings":";;;AAAA,mCAQiB;AAEjB,mCAAgC;AAEhC,iCAA6D;AAE7D,MAAa,cAAe,SAAQ,KAAK;CAAG;AAA5C,wCAA4C;AAE5C,SAAgB,aAAa,CAAC,KAAW;IAEvC,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;QAEvB,IAAI,kBAAW,CAAC,KAAK,CAAC,EAAE;YACtB,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;SAClC;aAAM;YACL,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;SAC7B;IAEH,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEhB,CAAC;AAZD,sCAYC;AAED,SAAgB,mBAAmB,CAAC,KAAiB;IAEnD,OAAO,KAAK,CAAC,IAAI,CACf,KAAK,CAAC,OAAO,EAAE,CAChB,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAErB,IAAI,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAI,KAAK,CAAC,CAAC,CAAC,KAAG,IAAI,EAAE;YACnB,GAAG,IAAI,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SACtC;aAAM;YACL,GAAG,IAAI,GAAG,CAAC;YACX,IAAI,kBAAW,CAAC,KAAK,CAAC,EAAE;gBACtB,GAAG,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAC;aAClC;iBAAM;gBACL,GAAG,IA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;IAE5C,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAE5C,IAAI,GAAG,GAAG,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,KAAK,KAAG,IAAI,EAAE;YAChB,GAAG,IAAE,GAAG,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;SACrC;QACD,OAAO,GAAG,CAAC;IAEb,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAEd,CAAC;AAED,SAAS,YAAY,CAAC,KAAa;IAEjC,IAAI,CAAC,oBAAa,CAAC,KAAK,CAAC,EAAE;QACzB,MAAM,IAAI,cAAc,CAAC,0GAA0G,CAAC,CAAC;KACtI;IACD,OAAO,KAAK,CAAC;AAEf,CAAC"}

5
node_modules/structured-headers/dist/token.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
export declare class Token {
private value;
constructor(value: string);
toString(): string;
}

17
node_modules/structured-headers/dist/token.js generated vendored Normal file
View File

@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Token = void 0;
const util_1 = require("./util");
class Token {
constructor(value) {
if (!util_1.isValidTokenStr(value)) {
throw new TypeError('Invalid character in Token string. Tokens must start with *, A-Z and the rest of the string may only contain a-z, A-Z, 0-9, :/!#$%&\'*+-.^_`|~');
}
this.value = value;
}
toString() {
return this.value;
}
}
exports.Token = Token;
//# sourceMappingURL=token.js.map

1
node_modules/structured-headers/dist/token.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"token.js","sourceRoot":"","sources":["../src/token.ts"],"names":[],"mappings":";;;AAAA,iCAAyC;AAEzC,MAAa,KAAK;IAGhB,YAAY,KAAa;QAEvB,IAAI,CAAC,sBAAe,CAAC,KAAK,CAAC,EAAE;YAC3B,MAAM,IAAI,SAAS,CAAC,gJAAgJ,CAAC,CAAC;SACvK;QACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IAErB,CAAC;IAED,QAAQ;QAEN,OAAO,IAAI,CAAC,KAAK,CAAC;IAEpB,CAAC;CAEF;AAlBD,sBAkBC"}

34
node_modules/structured-headers/dist/types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,34 @@
import { Token } from './token';
/**
* Lists are arrays of zero or more members, each of which can be an Item
* or an Inner List, both of which can be Parameterized
*/
export declare type List = (InnerList | Item)[];
/**
* An Inner List is an array of zero or more Items. Both the individual Items
* and the Inner List itself can be Parameterized.
*/
export declare type InnerList = [Item[], Parameters];
/**
* Parameters are an ordered map of key-value pairs that are associated with
* an Item or Inner List. The keys are unique within the scope of the
* Parameters they occur within, and the values are bare items (i.e., they
* themselves cannot be parameterized
*/
export declare type Parameters = Map<string, BareItem>;
/**
* Dictionaries are ordered maps of key-value pairs, where the keys are short
* textual strings and the values are Items or arrays of Items, both of which
* can be Parameterized.
*
* There can be zero or more members, and their keys are unique in the scope
* of the Dictionary they occur within.
*/
export declare type Dictionary = Map<string, Item | InnerList>;
export declare class ByteSequence {
base64Value: string;
constructor(base64Value: string);
toBase64(): string;
}
export declare type BareItem = number | string | Token | ByteSequence | boolean;
export declare type Item = [BareItem, Parameters];

13
node_modules/structured-headers/dist/types.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ByteSequence = void 0;
class ByteSequence {
constructor(base64Value) {
this.base64Value = base64Value;
}
toBase64() {
return this.base64Value;
}
}
exports.ByteSequence = ByteSequence;
//# sourceMappingURL=types.js.map

1
node_modules/structured-headers/dist/types.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAgCA,MAAa,YAAY;IAGvB,YAAY,WAAmB;QAE7B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IAEjC,CAAC;IAED,QAAQ;QAEN,OAAO,IAAI,CAAC,WAAW,CAAC;IAE1B,CAAC;CAEF;AAfD,oCAeC"}

5
node_modules/structured-headers/dist/util.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
import { Item, InnerList } from './types';
export declare function isAscii(str: string): boolean;
export declare function isValidTokenStr(str: string): boolean;
export declare function isValidKeyStr(str: string): boolean;
export declare function isInnerList(input: Item | InnerList): input is InnerList;

23
node_modules/structured-headers/dist/util.js generated vendored Normal file
View File

@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isInnerList = exports.isValidKeyStr = exports.isValidTokenStr = exports.isAscii = void 0;
const asciiRe = /^[\x20-\x7E]*$/;
const tokenRe = /^[a-zA-Z*][:/!#$%&'*+\-.^_`|~A-Za-z0-9]*$/;
const keyRe = /^[a-z*][*\-_.a-z0-9]*$/;
function isAscii(str) {
return asciiRe.test(str);
}
exports.isAscii = isAscii;
function isValidTokenStr(str) {
return tokenRe.test(str);
}
exports.isValidTokenStr = isValidTokenStr;
function isValidKeyStr(str) {
return keyRe.test(str);
}
exports.isValidKeyStr = isValidKeyStr;
function isInnerList(input) {
return Array.isArray(input[0]);
}
exports.isInnerList = isInnerList;
//# sourceMappingURL=util.js.map

1
node_modules/structured-headers/dist/util.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;AAEA,MAAM,OAAO,GAAG,gBAAgB,CAAC;AACjC,MAAM,OAAO,GAAG,2CAA2C,CAAC;AAC5D,MAAM,KAAK,GAAG,wBAAwB,CAAC;AAEvC,SAAgB,OAAO,CAAC,GAAW;IAEjC,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE3B,CAAC;AAJD,0BAIC;AAED,SAAgB,eAAe,CAAC,GAAW;IAEzC,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE3B,CAAC;AAJD,0CAIC;AAED,SAAgB,aAAa,CAAC,GAAW;IAEvC,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEzB,CAAC;AAJD,sCAIC;AAGD,SAAgB,WAAW,CAAC,KAAuB;IAEjD,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAEjC,CAAC;AAJD,kCAIC"}