/******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 3029: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: () => (/* binding */ createCache) }); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@emotion+sheet@1.2.2/node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.js /* Based off glamor's StyleSheet, thanks Sunil ❤️ high performance StyleSheet for css-in-js systems - uses multiple style tags behind the scenes for millions of rules - uses `insertRule` for appending in production for *much* faster performance // usage import { StyleSheet } from '@emotion/sheet' let styleSheet = new StyleSheet({ key: '', container: document.head }) styleSheet.insert('#box { border: 1px solid red; }') - appends a css rule into the stylesheet styleSheet.flush() - empties the stylesheet of all its contents */ // $FlowFixMe function sheetForTag(tag) { if (tag.sheet) { // $FlowFixMe return tag.sheet; } // this weirdness brought to you by firefox /* istanbul ignore next */ for (var i = 0; i < document.styleSheets.length; i++) { if (document.styleSheets[i].ownerNode === tag) { // $FlowFixMe return document.styleSheets[i]; } } } function createStyleElement(options) { var tag = document.createElement('style'); tag.setAttribute('data-emotion', options.key); if (options.nonce !== undefined) { tag.setAttribute('nonce', options.nonce); } tag.appendChild(document.createTextNode('')); tag.setAttribute('data-s', ''); return tag; } var StyleSheet = /*#__PURE__*/function () { // Using Node instead of HTMLElement since container may be a ShadowRoot function StyleSheet(options) { var _this = this; this._insertTag = function (tag) { var before; if (_this.tags.length === 0) { if (_this.insertionPoint) { before = _this.insertionPoint.nextSibling; } else if (_this.prepend) { before = _this.container.firstChild; } else { before = _this.before; } } else { before = _this.tags[_this.tags.length - 1].nextSibling; } _this.container.insertBefore(tag, before); _this.tags.push(tag); }; this.isSpeedy = options.speedy === undefined ? "production" === 'production' : options.speedy; this.tags = []; this.ctr = 0; this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets this.key = options.key; this.container = options.container; this.prepend = options.prepend; this.insertionPoint = options.insertionPoint; this.before = null; } var _proto = StyleSheet.prototype; _proto.hydrate = function hydrate(nodes) { nodes.forEach(this._insertTag); }; _proto.insert = function insert(rule) { // the max length is how many rules we have per style tag, it's 65000 in speedy mode // it's 1 in dev because we insert source maps that map a single rule to a location // and you can only have one source map per style tag if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) { this._insertTag(createStyleElement(this)); } var tag = this.tags[this.tags.length - 1]; if (false) { var isImportRule; } if (this.isSpeedy) { var sheet = sheetForTag(tag); try { // this is the ultrafast version, works across browsers // the big drawback is that the css won't be editable in devtools sheet.insertRule(rule, sheet.cssRules.length); } catch (e) { if (false) {} } } else { tag.appendChild(document.createTextNode(rule)); } this.ctr++; }; _proto.flush = function flush() { // $FlowFixMe this.tags.forEach(function (tag) { return tag.parentNode && tag.parentNode.removeChild(tag); }); this.tags = []; this.ctr = 0; if (false) {} }; return StyleSheet; }(); ;// CONCATENATED MODULE: ./node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Utility.js /** * @param {number} * @return {number} */ var abs = Math.abs; /** * @param {number} * @return {string} */ var Utility_from = String.fromCharCode; /** * @param {object} * @return {object} */ var Utility_assign = Object.assign; /** * @param {string} value * @param {number} length * @return {number} */ function hash(value, length) { return Utility_charat(value, 0) ^ 45 ? (((length << 2 ^ Utility_charat(value, 0)) << 2 ^ Utility_charat(value, 1)) << 2 ^ Utility_charat(value, 2)) << 2 ^ Utility_charat(value, 3) : 0; } /** * @param {string} value * @return {string} */ function trim(value) { return value.trim(); } /** * @param {string} value * @param {RegExp} pattern * @return {string?} */ function Utility_match(value, pattern) { return (value = pattern.exec(value)) ? value[0] : value; } /** * @param {string} value * @param {(string|RegExp)} pattern * @param {string} replacement * @return {string} */ function Utility_replace(value, pattern, replacement) { return value.replace(pattern, replacement); } /** * @param {string} value * @param {string} search * @return {number} */ function indexof(value, search) { return value.indexOf(search); } /** * @param {string} value * @param {number} index * @return {number} */ function Utility_charat(value, index) { return value.charCodeAt(index) | 0; } /** * @param {string} value * @param {number} begin * @param {number} end * @return {string} */ function Utility_substr(value, begin, end) { return value.slice(begin, end); } /** * @param {string} value * @return {number} */ function Utility_strlen(value) { return value.length; } /** * @param {any[]} value * @return {number} */ function Utility_sizeof(value) { return value.length; } /** * @param {any} value * @param {any[]} array * @return {any} */ function Utility_append(value, array) { return array.push(value), value; } /** * @param {string[]} array * @param {function} callback * @return {string} */ function Utility_combine(array, callback) { return array.map(callback).join(''); } ;// CONCATENATED MODULE: ./node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Tokenizer.js var line = 1; var column = 1; var Tokenizer_length = 0; var position = 0; var character = 0; var characters = ''; /** * @param {string} value * @param {object | null} root * @param {object | null} parent * @param {string} type * @param {string[] | string} props * @param {object[] | string} children * @param {number} length */ function node(value, root, parent, type, props, children, length) { return { value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: '' }; } /** * @param {object} root * @param {object} props * @return {object} */ function Tokenizer_copy(root, props) { return Utility_assign(node('', null, null, '', null, null, 0), root, { length: -root.length }, props); } /** * @return {number} */ function Tokenizer_char() { return character; } /** * @return {number} */ function prev() { character = position > 0 ? Utility_charat(characters, --position) : 0; if (column--, character === 10) column = 1, line--; return character; } /** * @return {number} */ function next() { character = position < Tokenizer_length ? Utility_charat(characters, position++) : 0; if (column++, character === 10) column = 1, line++; return character; } /** * @return {number} */ function peek() { return Utility_charat(characters, position); } /** * @return {number} */ function caret() { return position; } /** * @param {number} begin * @param {number} end * @return {string} */ function slice(begin, end) { return Utility_substr(characters, begin, end); } /** * @param {number} type * @return {number} */ function token(type) { switch (type) { // \0 \t \n \r \s whitespace token case 0: case 9: case 10: case 13: case 32: return 5; // ! + , / > @ ~ isolate token case 33: case 43: case 44: case 47: case 62: case 64: case 126: // ; { } breakpoint token case 59: case 123: case 125: return 4; // : accompanied token case 58: return 3; // " ' ( [ opening delimit token case 34: case 39: case 40: case 91: return 2; // ) ] closing delimit token case 41: case 93: return 1; } return 0; } /** * @param {string} value * @return {any[]} */ function alloc(value) { return line = column = 1, Tokenizer_length = Utility_strlen(characters = value), position = 0, []; } /** * @param {any} value * @return {any} */ function dealloc(value) { return characters = '', value; } /** * @param {number} type * @return {string} */ function delimit(type) { return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type))); } /** * @param {string} value * @return {string[]} */ function Tokenizer_tokenize(value) { return dealloc(tokenizer(alloc(value))); } /** * @param {number} type * @return {string} */ function whitespace(type) { while (character = peek()) if (character < 33) next();else break; return token(type) > 2 || token(character) > 3 ? '' : ' '; } /** * @param {string[]} children * @return {string[]} */ function tokenizer(children) { while (next()) switch (token(character)) { case 0: append(identifier(position - 1), children); break; case 2: append(delimit(character), children); break; default: append(from(character), children); } return children; } /** * @param {number} index * @param {number} count * @return {string} */ function escaping(index, count) { while (--count && next()) // not 0-9 A-F a-f if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97) break; return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32)); } /** * @param {number} type * @return {number} */ function delimiter(type) { while (next()) switch (character) { // ] ) " ' case type: return position; // " ' case 34: case 39: if (type !== 34 && type !== 39) delimiter(character); break; // ( case 40: if (type === 41) delimiter(type); break; // \ case 92: next(); break; } return position; } /** * @param {number} type * @param {number} index * @return {number} */ function commenter(type, index) { while (next()) // // if (type + character === 47 + 10) break; // /* else if (type + character === 42 + 42 && peek() === 47) break; return '/*' + slice(index, position - 1) + '*' + Utility_from(type === 47 ? type : next()); } /** * @param {number} index * @return {string} */ function identifier(index) { while (!token(peek())) next(); return slice(index, position); } ;// CONCATENATED MODULE: ./node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Enum.js var Enum_MS = '-ms-'; var Enum_MOZ = '-moz-'; var Enum_WEBKIT = '-webkit-'; var COMMENT = 'comm'; var Enum_RULESET = 'rule'; var Enum_DECLARATION = 'decl'; var PAGE = '@page'; var MEDIA = '@media'; var IMPORT = '@import'; var CHARSET = '@charset'; var VIEWPORT = '@viewport'; var SUPPORTS = '@supports'; var DOCUMENT = '@document'; var NAMESPACE = '@namespace'; var Enum_KEYFRAMES = '@keyframes'; var FONT_FACE = '@font-face'; var COUNTER_STYLE = '@counter-style'; var FONT_FEATURE_VALUES = '@font-feature-values'; var LAYER = '@layer'; ;// CONCATENATED MODULE: ./node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Serializer.js /** * @param {object[]} children * @param {function} callback * @return {string} */ function Serializer_serialize(children, callback) { var output = ''; var length = Utility_sizeof(children); for (var i = 0; i < length; i++) output += callback(children[i], i, children, callback) || ''; return output; } /** * @param {object} element * @param {number} index * @param {object[]} children * @param {function} callback * @return {string} */ function stringify(element, index, children, callback) { switch (element.type) { case LAYER: if (element.children.length) break; case IMPORT: case Enum_DECLARATION: return element.return = element.return || element.value; case COMMENT: return ''; case Enum_KEYFRAMES: return element.return = element.value + '{' + Serializer_serialize(element.children, callback) + '}'; case Enum_RULESET: element.value = element.props.join(','); } return Utility_strlen(children = Serializer_serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Middleware.js /** * @param {function[]} collection * @return {function} */ function middleware(collection) { var length = Utility_sizeof(collection); return function (element, index, children, callback) { var output = ''; for (var i = 0; i < length; i++) output += collection[i](element, index, children, callback) || ''; return output; }; } /** * @param {function} callback * @return {function} */ function rulesheet(callback) { return function (element) { if (!element.root) if (element = element.return) callback(element); }; } /** * @param {object} element * @param {number} index * @param {object[]} children * @param {function} callback */ function prefixer(element, index, children, callback) { if (element.length > -1) if (!element.return) switch (element.type) { case DECLARATION: element.return = prefix(element.value, element.length, children); return; case KEYFRAMES: return serialize([copy(element, { value: replace(element.value, '@', '@' + WEBKIT) })], callback); case RULESET: if (element.length) return combine(element.props, function (value) { switch (match(value, /(::plac\w+|:read-\w+)/)) { // :read-(only|write) case ':read-only': case ':read-write': return serialize([copy(element, { props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')] })], callback); // :placeholder case '::placeholder': return serialize([copy(element, { props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')] }), copy(element, { props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')] }), copy(element, { props: [replace(value, /:(plac\w+)/, MS + 'input-$1')] })], callback); } return ''; }); } } /** * @param {object} element * @param {number} index * @param {object[]} children */ function namespace(element) { switch (element.type) { case RULESET: element.props = element.props.map(function (value) { return combine(tokenize(value), function (value, index, children) { switch (charat(value, 0)) { // \f case 12: return substr(value, 1, strlen(value)); // \0 ( + > ~ case 0: case 40: case 43: case 62: case 126: return value; // : case 58: if (children[++index] === 'global') children[index] = '', children[++index] = '\f' + substr(children[index], index = 1, -1); // \s case 32: return index === 1 ? '' : value; default: switch (index) { case 0: element = value; return sizeof(children) > 1 ? '' : value; case index = sizeof(children) - 1: case 2: return index === 2 ? value + element + element : value + element; default: return value; } } }); }); } } ;// CONCATENATED MODULE: ./node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Parser.js /** * @param {string} value * @return {object[]} */ function compile(value) { return dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value)); } /** * @param {string} value * @param {object} root * @param {object?} parent * @param {string[]} rule * @param {string[]} rules * @param {string[]} rulesets * @param {number[]} pseudo * @param {number[]} points * @param {string[]} declarations * @return {object} */ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) { var index = 0; var offset = 0; var length = pseudo; var atrule = 0; var property = 0; var previous = 0; var variable = 1; var scanning = 1; var ampersand = 1; var character = 0; var type = ''; var props = rules; var children = rulesets; var reference = rule; var characters = type; while (scanning) switch (previous = character, character = next()) { // ( case 40: if (previous != 108 && Utility_charat(characters, length - 1) == 58) { if (indexof(characters += Utility_replace(delimit(character), '&', '&\f'), '&\f') != -1) ampersand = -1; break; } // " ' [ case 34: case 39: case 91: characters += delimit(character); break; // \t \n \r \s case 9: case 10: case 13: case 32: characters += whitespace(previous); break; // \ case 92: characters += escaping(caret() - 1, 7); continue; // / case 47: switch (peek()) { case 42: case 47: Utility_append(comment(commenter(next(), caret()), root, parent), declarations); break; default: characters += '/'; } break; // { case 123 * variable: points[index++] = Utility_strlen(characters) * ampersand; // } ; \0 case 125 * variable: case 59: case 0: switch (character) { // \0 } case 0: case 125: scanning = 0; // ; case 59 + offset: if (ampersand == -1) characters = Utility_replace(characters, /\f/g, ''); if (property > 0 && Utility_strlen(characters) - length) Utility_append(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(Utility_replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations); break; // @ ; case 59: characters += ';'; // { rule/at-rule default: Utility_append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets); if (character === 123) if (offset === 0) parse(characters, root, reference, reference, props, rulesets, length, points, children);else switch (atrule === 99 && Utility_charat(characters, 3) === 110 ? 100 : atrule) { // d l m s case 100: case 108: case 109: case 115: parse(value, reference, reference, rule && Utility_append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children); break; default: parse(characters, reference, reference, reference, [''], children, 0, points, children); } } index = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo; break; // : case 58: length = 1 + Utility_strlen(characters), property = previous; default: if (variable < 1) if (character == 123) --variable;else if (character == 125 && variable++ == 0 && prev() == 125) continue; switch (characters += Utility_from(character), character * variable) { // & case 38: ampersand = offset > 0 ? 1 : (characters += '\f', -1); break; // , case 44: points[index++] = (Utility_strlen(characters) - 1) * ampersand, ampersand = 1; break; // @ case 64: // - if (peek() === 45) characters += delimit(next()); atrule = peek(), offset = length = Utility_strlen(type = characters += identifier(caret())), character++; break; // - case 45: if (previous === 45 && Utility_strlen(characters) == 2) variable = 0; } } return rulesets; } /** * @param {string} value * @param {object} root * @param {object?} parent * @param {number} index * @param {number} offset * @param {string[]} rules * @param {number[]} points * @param {string} type * @param {string[]} props * @param {string[]} children * @param {number} length * @return {object} */ function ruleset(value, root, parent, index, offset, rules, points, type, props, children, length) { var post = offset - 1; var rule = offset === 0 ? rules : ['']; var size = Utility_sizeof(rule); for (var i = 0, j = 0, k = 0; i < index; ++i) for (var x = 0, y = Utility_substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x) if (z = trim(j > 0 ? rule[x] + ' ' + y : Utility_replace(y, /&\f/g, rule[x]))) props[k++] = z; return node(value, root, parent, offset === 0 ? Enum_RULESET : type, props, children, length); } /** * @param {number} value * @param {object} root * @param {object?} parent * @return {object} */ function comment(value, root, parent) { return node(value, root, parent, COMMENT, Utility_from(Tokenizer_char()), Utility_substr(value, 2, -2), 0); } /** * @param {string} value * @param {object} root * @param {object?} parent * @param {number} length * @return {object} */ function declaration(value, root, parent, length) { return node(value, root, parent, Enum_DECLARATION, Utility_substr(value, 0, length), Utility_substr(value, length + 1, -1), length); } ;// CONCATENATED MODULE: ./node_modules/.pnpm/@emotion+cache@11.11.0/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) { var previous = 0; var character = 0; while (true) { previous = character; character = peek(); // &\f if (previous === 38 && character === 12) { points[index] = 1; } if (token(character)) { break; } next(); } return slice(begin, position); }; var toRules = function toRules(parsed, points) { // pretend we've started with a comma var index = -1; var character = 44; do { switch (token(character)) { case 0: // &\f if (character === 38 && peek() === 12) { // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings // stylis inserts \f after & to know when & where it should replace this sequence with the context selector // and when it should just concatenate the outer and inner selectors // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here points[index] = 1; } parsed[index] += identifierWithPointTracking(position - 1, points, index); break; case 2: parsed[index] += delimit(character); break; case 4: // comma if (character === 44) { // colon parsed[++index] = peek() === 58 ? '&\f' : ''; points[index] = parsed[index].length; break; } // fallthrough default: parsed[index] += Utility_from(character); } } while (character = next()); return parsed; }; var getRules = function getRules(value, points) { return dealloc(toRules(alloc(value), points)); }; // WeakSet would be more appropriate, but only WeakMap is supported in IE11 var fixedElements = /* #__PURE__ */new WeakMap(); var compat = function compat(element) { if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo // negative .length indicates that this rule has been already prefixed element.length < 1) { return; } var value = element.value, parent = element.parent; var isImplicitRule = element.column === parent.column && element.line === parent.line; while (parent.type !== 'rule') { parent = parent.parent; if (!parent) return; } // short-circuit for the simplest case if (element.props.length === 1 && value.charCodeAt(0) !== 58 /* colon */ && !fixedElements.get(parent)) { return; } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level) // then the props has already been manipulated beforehand as they that array is shared between it and its "rule parent" if (isImplicitRule) { return; } fixedElements.set(element, true); var points = []; var rules = getRules(value, points); var parentRules = parent.props; for (var i = 0, k = 0; i < rules.length; i++) { for (var j = 0; j < parentRules.length; j++, k++) { element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i]; } } }; var removeLabel = function removeLabel(element) { if (element.type === 'decl') { var value = element.value; if ( // charcode for l value.charCodeAt(0) === 108 && // charcode for b value.charCodeAt(2) === 98) { // this ignores label element["return"] = ''; element.value = ''; } } }; var ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason'; var isIgnoringComment = function isIgnoringComment(element) { return element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1; }; var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) { return function (element, index, children) { if (element.type !== 'rule' || cache.compat) return; var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g); if (unsafePseudoClasses) { var isNested = !!element.parent; // in nested rules comments become children of the "auto-inserted" rule and that's always the `element.parent` // // considering this input: // .a { // .b /* comm */ {} // color: hotpink; // } // we get output corresponding to this: // .a { // & { // /* comm */ // color: hotpink; // } // .b {} // } var commentContainer = isNested ? element.parent.children : // global rule at the root level children; for (var i = commentContainer.length - 1; i >= 0; i--) { var node = commentContainer[i]; if (node.line < element.line) { break; } // it is quite weird but comments are *usually* put at `column: element.column - 1` // so we seek *from the end* for the node that is earlier than the rule's `element` and check that // this will also match inputs like this: // .a { // /* comm */ // .b {} // } // // but that is fine // // it would be the easiest to change the placement of the comment to be the first child of the rule: // .a { // .b { /* comm */ } // } // with such inputs we wouldn't have to search for the comment at all // TODO: consider changing this comment placement in the next major version if (node.column < element.column) { if (isIgnoringComment(node)) { return; } break; } } unsafePseudoClasses.forEach(function (unsafePseudoClass) { console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\"."); }); } }; }; var isImportRule = function isImportRule(element) { return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64; }; var isPrependedWithRegularRules = function isPrependedWithRegularRules(index, children) { for (var i = index - 1; i >= 0; i--) { if (!isImportRule(children[i])) { return true; } } return false; }; // use this to remove incorrect elements from further processing // so they don't get handed to the `sheet` (or anything else) // as that could potentially lead to additional logs which in turn could be overhelming to the user var nullifyElement = function nullifyElement(element) { element.type = ''; element.value = ''; element["return"] = ''; element.children = ''; element.props = ''; }; var incorrectImportAlarm = function incorrectImportAlarm(element, index, children) { if (!isImportRule(element)) { return; } if (element.parent) { console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."); nullifyElement(element); } else if (isPrependedWithRegularRules(index, children)) { console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."); nullifyElement(element); } }; /* eslint-disable no-fallthrough */ function emotion_cache_browser_esm_prefix(value, length) { switch (hash(value, length)) { // color-adjust case 5103: return Enum_WEBKIT + 'print-' + value + value; // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function) case 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break case 5572: case 6356: case 5844: case 3191: case 6645: case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite, case 6391: case 5879: case 5623: case 6135: case 4599: case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width) case 4215: case 6389: case 5109: case 5365: case 5621: case 3829: return Enum_WEBKIT + value + value; // appearance, user-select, transform, hyphens, text-size-adjust case 5349: case 4246: case 4810: case 6968: case 2756: return Enum_WEBKIT + value + Enum_MOZ + value + Enum_MS + value + value; // flex, flex-direction case 6828: case 4268: return Enum_WEBKIT + value + Enum_MS + value + value; // order case 6165: return Enum_WEBKIT + value + Enum_MS + 'flex-' + value + value; // align-items case 5187: return Enum_WEBKIT + value + Utility_replace(value, /(\w+).+(:[^]+)/, Enum_WEBKIT + 'box-$1$2' + Enum_MS + 'flex-$1$2') + value; // align-self case 5443: return Enum_WEBKIT + value + Enum_MS + 'flex-item-' + Utility_replace(value, /flex-|-self/, '') + value; // align-content case 4675: return Enum_WEBKIT + value + Enum_MS + 'flex-line-pack' + Utility_replace(value, /align-content|flex-|-self/, '') + value; // flex-shrink case 5548: return Enum_WEBKIT + value + Enum_MS + Utility_replace(value, 'shrink', 'negative') + value; // flex-basis case 5292: return Enum_WEBKIT + value + Enum_MS + Utility_replace(value, 'basis', 'preferred-size') + value; // flex-grow case 6060: return Enum_WEBKIT + 'box-' + Utility_replace(value, '-grow', '') + Enum_WEBKIT + value + Enum_MS + Utility_replace(value, 'grow', 'positive') + value; // transition case 4554: return Enum_WEBKIT + Utility_replace(value, /([^-])(transform)/g, '$1' + Enum_WEBKIT + '$2') + value; // cursor case 6187: return Utility_replace(Utility_replace(Utility_replace(value, /(zoom-|grab)/, Enum_WEBKIT + '$1'), /(image-set)/, Enum_WEBKIT + '$1'), value, '') + value; // background, background-image case 5495: case 3959: return Utility_replace(value, /(image-set\([^]*)/, Enum_WEBKIT + '$1' + '$`$1'); // justify-content case 4968: return Utility_replace(Utility_replace(value, /(.+:)(flex-)?(.*)/, Enum_WEBKIT + 'box-pack:$3' + Enum_MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + Enum_WEBKIT + value + value; // (margin|padding)-inline-(start|end) case 4095: case 3583: case 4068: case 2532: return Utility_replace(value, /(.+)-inline(.+)/, Enum_WEBKIT + '$1$2') + value; // (min|max)?(width|height|inline-size|block-size) case 8116: case 7059: case 5753: case 5535: case 5445: case 5701: case 4933: case 4677: case 5533: case 5789: case 5021: case 4765: // stretch, max-content, min-content, fill-available if (Utility_strlen(value) - 1 - length > 6) switch (Utility_charat(value, length + 1)) { // (m)ax-content, (m)in-content case 109: // - if (Utility_charat(value, length + 4) !== 45) break; // (f)ill-available, (f)it-content case 102: return Utility_replace(value, /(.+:)(.+)-([^]+)/, '$1' + Enum_WEBKIT + '$2-$3' + '$1' + Enum_MOZ + (Utility_charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value; // (s)tretch case 115: return ~indexof(value, 'stretch') ? emotion_cache_browser_esm_prefix(Utility_replace(value, 'stretch', 'fill-available'), length) + value : value; } break; // position: sticky case 4949: // (s)ticky? if (Utility_charat(value, length + 1) !== 115) break; // display: (flex|inline-flex) case 6444: switch (Utility_charat(value, Utility_strlen(value) - 3 - (~indexof(value, '!important') && 10))) { // stic(k)y case 107: return Utility_replace(value, ':', ':' + Enum_WEBKIT) + value; // (inline-)?fl(e)x case 101: return Utility_replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + Enum_WEBKIT + (Utility_charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + Enum_WEBKIT + '$2$3' + '$1' + Enum_MS + '$2box$3') + value; } break; // writing-mode case 5936: switch (Utility_charat(value, length + 11)) { // vertical-l(r) case 114: return Enum_WEBKIT + value + Enum_MS + Utility_replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value; // vertical-r(l) case 108: return Enum_WEBKIT + value + Enum_MS + Utility_replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value; // horizontal(-)tb case 45: return Enum_WEBKIT + value + Enum_MS + Utility_replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value; } return Enum_WEBKIT + value + Enum_MS + value + value; } return value; } var emotion_cache_browser_esm_prefixer = function prefixer(element, index, children, callback) { if (element.length > -1) if (!element["return"]) switch (element.type) { case Enum_DECLARATION: element["return"] = emotion_cache_browser_esm_prefix(element.value, element.length); break; case Enum_KEYFRAMES: return Serializer_serialize([Tokenizer_copy(element, { value: Utility_replace(element.value, '@', '@' + Enum_WEBKIT) })], callback); case Enum_RULESET: if (element.length) return Utility_combine(element.props, function (value) { switch (Utility_match(value, /(::plac\w+|:read-\w+)/)) { // :read-(only|write) case ':read-only': case ':read-write': return Serializer_serialize([Tokenizer_copy(element, { props: [Utility_replace(value, /:(read-\w+)/, ':' + Enum_MOZ + '$1')] })], callback); // :placeholder case '::placeholder': return Serializer_serialize([Tokenizer_copy(element, { props: [Utility_replace(value, /:(plac\w+)/, ':' + Enum_WEBKIT + 'input-$1')] }), Tokenizer_copy(element, { props: [Utility_replace(value, /:(plac\w+)/, ':' + Enum_MOZ + '$1')] }), Tokenizer_copy(element, { props: [Utility_replace(value, /:(plac\w+)/, Enum_MS + 'input-$1')] })], callback); } return ''; }); } }; var defaultStylisPlugins = [emotion_cache_browser_esm_prefixer]; var createCache = function createCache(options) { var key = options.key; if (false) {} if (key === 'css') { var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be) // note this very very intentionally targets all style elements regardless of the key to ensure // that creating a cache works inside of render of a React component Array.prototype.forEach.call(ssrStyles, function (node) { // we want to only move elements which have a space in the data-emotion attribute value // because that indicates that it is an Emotion 11 server-side rendered style elements // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes) // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles // will not result in the Emotion 10 styles being destroyed var dataEmotionAttribute = node.getAttribute('data-emotion'); if (dataEmotionAttribute.indexOf(' ') === -1) { return; } document.head.appendChild(node); node.setAttribute('data-s', ''); }); } var stylisPlugins = options.stylisPlugins || defaultStylisPlugins; if (false) {} var inserted = {}; var container; var nodesToHydrate = []; { container = options.container || document.head; Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which // means that the style elements we're looking at are only Emotion 11 server-rendered style elements document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node) { var attrib = node.getAttribute("data-emotion").split(' '); // $FlowFixMe for (var i = 1; i < attrib.length; i++) { inserted[attrib[i]] = true; } nodesToHydrate.push(node); }); } var _insert; var omnipresentPlugins = [compat, removeLabel]; if (false) {} { var currentSheet; var finalizingPlugins = [stringify, false ? 0 : rulesheet(function (rule) { currentSheet.insert(rule); })]; var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins)); var stylis = function stylis(styles) { return Serializer_serialize(compile(styles), serializer); }; _insert = function insert(selector, serialized, sheet, shouldCache) { currentSheet = sheet; if (false) {} stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles); if (shouldCache) { cache.inserted[serialized.name] = true; } }; } var cache = { key: key, sheet: new StyleSheet({ key: key, container: container, nonce: options.nonce, speedy: options.speedy, prepend: options.prepend, insertionPoint: options.insertionPoint }), nonce: options.nonce, inserted: inserted, registered: {}, insert: _insert }; cache.sheet.hydrate(nodesToHydrate); return cache; }; /***/ }), /***/ 7506: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ memoize) /* harmony export */ }); function memoize(fn) { var cache = Object.create(null); return function (arg) { if (cache[arg] === undefined) cache[arg] = fn(arg); return cache[arg]; }; } /***/ }), /***/ 2412: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ C: () => (/* binding */ CacheProvider), /* harmony export */ T: () => (/* binding */ ThemeContext), /* harmony export */ i: () => (/* binding */ isBrowser), /* harmony export */ w: () => (/* binding */ withEmotionCache) /* harmony export */ }); /* unused harmony exports E, _, a, b, c, h, u */ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7948); /* harmony import */ var _emotion_cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3029); /* harmony import */ var _emotion_serialize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7073); /* harmony import */ var _emotion_use_insertion_effect_with_fallbacks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(122); var isBrowser = "object" !== 'undefined'; var hasOwnProperty = {}.hasOwnProperty; var EmotionCacheContext = /* #__PURE__ */react__WEBPACK_IMPORTED_MODULE_0__.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case // because this module is primarily intended for the browser and node // but it's also required in react native and similar environments sometimes // and we could have a special build just for that // but this is much easier and the native packages // might use a different theme context in the future anyway typeof HTMLElement !== 'undefined' ? /* #__PURE__ */(0,_emotion_cache__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)({ key: 'css' }) : null); if (false) {} var CacheProvider = EmotionCacheContext.Provider; var __unsafe_useEmotionCache = function useEmotionCache() { return useContext(EmotionCacheContext); }; var withEmotionCache = function withEmotionCache(func) { // $FlowFixMe return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) { // the cache will never be null in the browser var cache = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(EmotionCacheContext); return func(props, cache, ref); }); }; if (!isBrowser) { withEmotionCache = function withEmotionCache(func) { return function (props) { var cache = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(EmotionCacheContext); if (cache === null) { // yes, we're potentially creating this on every render // it doesn't actually matter though since it's only on the server // so there will only every be a single render // that could change in the future because of suspense and etc. but for now, // this works and i don't want to optimise for a future thing that we aren't sure about cache = (0,_emotion_cache__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)({ key: 'css' }); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(EmotionCacheContext.Provider, { value: cache }, func(props, cache)); } else { return func(props, cache); } }; }; } var ThemeContext = /* #__PURE__ */react__WEBPACK_IMPORTED_MODULE_0__.createContext({}); if (false) {} var useTheme = function useTheme() { return React.useContext(ThemeContext); }; var getTheme = function getTheme(outerTheme, theme) { if (typeof theme === 'function') { var mergedTheme = theme(outerTheme); if (false) {} return mergedTheme; } if (false) {} return _extends({}, outerTheme, theme); }; var createCacheWithTheme = /* #__PURE__ */(/* unused pure expression or super */ null && (weakMemoize(function (outerTheme) { return weakMemoize(function (theme) { return getTheme(outerTheme, theme); }); }))); var ThemeProvider = function ThemeProvider(props) { var theme = React.useContext(ThemeContext); if (props.theme !== theme) { theme = createCacheWithTheme(theme)(props.theme); } return /*#__PURE__*/React.createElement(ThemeContext.Provider, { value: theme }, props.children); }; function withTheme(Component) { var componentName = Component.displayName || Component.name || 'Component'; var render = function render(props, ref) { var theme = React.useContext(ThemeContext); return /*#__PURE__*/React.createElement(Component, _extends({ theme: theme, ref: ref }, props)); }; // $FlowFixMe var WithTheme = /*#__PURE__*/React.forwardRef(render); WithTheme.displayName = "WithTheme(" + componentName + ")"; return hoistNonReactStatics(WithTheme, Component); } var getLastPart = function getLastPart(functionName) { // The match may be something like 'Object.createEmotionProps' or // 'Loader.prototype.render' var parts = functionName.split('.'); return parts[parts.length - 1]; }; var getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) { // V8 var match = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(line); if (match) return getLastPart(match[1]); // Safari / Firefox match = /^([A-Za-z0-9$.]+)@/.exec(line); if (match) return getLastPart(match[1]); return undefined; }; var internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS // identifiers, thus we only need to replace what is a valid character for JS, // but not for CSS. var sanitizeIdentifier = function sanitizeIdentifier(identifier) { return identifier.replace(/\$/g, '-'); }; var getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) { if (!stackTrace) return undefined; var lines = stackTrace.split('\n'); for (var i = 0; i < lines.length; i++) { var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just "Error" if (!functionName) continue; // If we reach one of these, we have gone too far and should quit if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an // uppercase letter if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName); } return undefined; }; var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__'; var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__'; var createEmotionProps = function createEmotionProps(type, props) { if (false) {} var newProps = {}; for (var key in props) { if (hasOwnProperty.call(props, key)) { newProps[key] = props[key]; } } newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when // the label hasn't already been computed if (false) { var label; } return newProps; }; var Insertion = function Insertion(_ref) { var cache = _ref.cache, serialized = _ref.serialized, isStringTag = _ref.isStringTag; registerStyles(cache, serialized, isStringTag); useInsertionEffectAlwaysWithSyncFallback(function () { return insertStyles(cache, serialized, isStringTag); }); return null; }; var Emotion = /* #__PURE__ */(/* unused pure expression or super */ null && (withEmotionCache(function (props, cache, ref) { var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works // not passing the registered cache to serializeStyles because it would // make certain babel optimisations not possible if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) { cssProp = cache.registered[cssProp]; } var WrappedComponent = props[typePropName]; var registeredStyles = [cssProp]; var className = ''; if (typeof props.className === 'string') { className = getRegisteredStyles(cache.registered, registeredStyles, props.className); } else if (props.className != null) { className = props.className + " "; } var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext)); if (false) { var labelFromStack; } className += cache.key + "-" + serialized.name; var newProps = {}; for (var key in props) { if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && ( true || 0)) { newProps[key] = props[key]; } } newProps.ref = ref; newProps.className = className; return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, { cache: cache, serialized: serialized, isStringTag: typeof WrappedComponent === 'string' }), /*#__PURE__*/React.createElement(WrappedComponent, newProps)); }))); if (false) {} var Emotion$1 = (/* unused pure expression or super */ null && (Emotion)); /***/ }), /***/ 2150: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ F4: () => (/* binding */ keyframes), /* harmony export */ iv: () => (/* binding */ css), /* harmony export */ xB: () => (/* binding */ Global) /* harmony export */ }); /* unused harmony exports ClassNames, createElement, jsx */ /* harmony import */ var _emotion_element_c39617d8_browser_esm_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2412); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7948); /* harmony import */ var _emotion_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1443); /* harmony import */ var _emotion_use_insertion_effect_with_fallbacks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(122); /* harmony import */ var _emotion_serialize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7073); /* harmony import */ var _emotion_cache__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3029); /* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9761); /* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4__); var pkg = { name: "@emotion/react", version: "11.11.1", main: "dist/emotion-react.cjs.js", module: "dist/emotion-react.esm.js", browser: { "./dist/emotion-react.esm.js": "./dist/emotion-react.browser.esm.js" }, exports: { ".": { module: { worker: "./dist/emotion-react.worker.esm.js", browser: "./dist/emotion-react.browser.esm.js", "default": "./dist/emotion-react.esm.js" }, "import": "./dist/emotion-react.cjs.mjs", "default": "./dist/emotion-react.cjs.js" }, "./jsx-runtime": { module: { worker: "./jsx-runtime/dist/emotion-react-jsx-runtime.worker.esm.js", browser: "./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js", "default": "./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js" }, "import": "./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.mjs", "default": "./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js" }, "./_isolated-hnrs": { module: { worker: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.esm.js", browser: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js", "default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js" }, "import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.mjs", "default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js" }, "./jsx-dev-runtime": { module: { worker: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.esm.js", browser: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js", "default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js" }, "import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.mjs", "default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js" }, "./package.json": "./package.json", "./types/css-prop": "./types/css-prop.d.ts", "./macro": { types: { "import": "./macro.d.mts", "default": "./macro.d.ts" }, "default": "./macro.js" } }, types: "types/index.d.ts", files: ["src", "dist", "jsx-runtime", "jsx-dev-runtime", "_isolated-hnrs", "types/*.d.ts", "macro.*"], sideEffects: false, author: "Emotion Contributors", license: "MIT", scripts: { "test:typescript": "dtslint types" }, dependencies: { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.11.0", "@emotion/cache": "^11.11.0", "@emotion/serialize": "^1.1.2", "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", "@emotion/utils": "^1.2.1", "@emotion/weak-memoize": "^0.3.1", "hoist-non-react-statics": "^3.3.1" }, peerDependencies: { react: ">=16.8.0" }, peerDependenciesMeta: { "@types/react": { optional: true } }, devDependencies: { "@definitelytyped/dtslint": "0.0.112", "@emotion/css": "11.11.0", "@emotion/css-prettifier": "1.1.3", "@emotion/server": "11.11.0", "@emotion/styled": "11.11.0", "html-tag-names": "^1.1.2", react: "16.14.0", "svg-tag-names": "^1.1.1", typescript: "^4.5.5" }, repository: "https://github.com/emotion-js/emotion/tree/main/packages/react", publishConfig: { access: "public" }, "umd:main": "dist/emotion-react.umd.min.js", preconstruct: { entrypoints: ["./index.js", "./jsx-runtime.js", "./jsx-dev-runtime.js", "./_isolated-hnrs.js"], umdName: "emotionReact", exports: { envConditions: ["browser", "worker"], extra: { "./types/css-prop": "./types/css-prop.d.ts", "./macro": { types: { "import": "./macro.d.mts", "default": "./macro.d.ts" }, "default": "./macro.js" } } } } }; var jsx = function jsx(type, props) { var args = arguments; if (props == null || !hasOwnProperty.call(props, 'css')) { // $FlowFixMe return React.createElement.apply(undefined, args); } var argsLength = args.length; var createElementArgArray = new Array(argsLength); createElementArgArray[0] = Emotion; createElementArgArray[1] = createEmotionProps(type, props); for (var i = 2; i < argsLength; i++) { createElementArgArray[i] = args[i]; } // $FlowFixMe return React.createElement.apply(null, createElementArgArray); }; var warnedAboutCssPropForGlobal = false; // maintain place over rerenders. // initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild // initial client-side render from SSR, use place of hydrating tag var Global = /* #__PURE__ */(0,_emotion_element_c39617d8_browser_esm_js__WEBPACK_IMPORTED_MODULE_5__.w)(function (props, cache) { if (false) {} var styles = props.styles; var serialized = (0,_emotion_serialize__WEBPACK_IMPORTED_MODULE_2__/* .serializeStyles */ .O)([styles], undefined, react__WEBPACK_IMPORTED_MODULE_0__.useContext(_emotion_element_c39617d8_browser_esm_js__WEBPACK_IMPORTED_MODULE_5__.T)); if (!_emotion_element_c39617d8_browser_esm_js__WEBPACK_IMPORTED_MODULE_5__.i) { var _ref; var serializedNames = serialized.name; var serializedStyles = serialized.styles; var next = serialized.next; while (next !== undefined) { serializedNames += ' ' + next.name; serializedStyles += next.styles; next = next.next; } var shouldCache = cache.compat === true; var rules = cache.insert("", { name: serializedNames, styles: serializedStyles }, cache.sheet, shouldCache); if (shouldCache) { return null; } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("style", (_ref = {}, _ref["data-emotion"] = cache.key + "-global " + serializedNames, _ref.dangerouslySetInnerHTML = { __html: rules }, _ref.nonce = cache.sheet.nonce, _ref)); } // yes, i know these hooks are used conditionally // but it is based on a constant that will never change at runtime // it's effectively like having two implementations and switching them out // so it's not actually breaking anything var sheetRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(); (0,_emotion_use_insertion_effect_with_fallbacks__WEBPACK_IMPORTED_MODULE_1__/* .useInsertionEffectWithLayoutFallback */ .j)(function () { var key = cache.key + "-global"; // use case of https://github.com/emotion-js/emotion/issues/2675 var sheet = new cache.sheet.constructor({ key: key, nonce: cache.sheet.nonce, container: cache.sheet.container, speedy: cache.sheet.isSpeedy }); var rehydrating = false; // $FlowFixMe var node = document.querySelector("style[data-emotion=\"" + key + " " + serialized.name + "\"]"); if (cache.sheet.tags.length) { sheet.before = cache.sheet.tags[0]; } if (node !== null) { rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other s node.setAttribute('data-emotion', key); sheet.hydrate([node]); } sheetRef.current = [sheet, rehydrating]; return function () { sheet.flush(); }; }, [cache]); (0,_emotion_use_insertion_effect_with_fallbacks__WEBPACK_IMPORTED_MODULE_1__/* .useInsertionEffectWithLayoutFallback */ .j)(function () { var sheetRefCurrent = sheetRef.current; var sheet = sheetRefCurrent[0], rehydrating = sheetRefCurrent[1]; if (rehydrating) { sheetRefCurrent[1] = false; return; } if (serialized.next !== undefined) { // insert keyframes (0,_emotion_utils__WEBPACK_IMPORTED_MODULE_6__/* .insertStyles */ .My)(cache, serialized.next, true); } if (sheet.tags.length) { // if this doesn't exist then it will be null so the style element will be appended var element = sheet.tags[sheet.tags.length - 1].nextElementSibling; sheet.before = element; sheet.flush(); } cache.insert("", serialized, sheet, false); }, [cache, serialized.name]); return null; }); if (false) {} function css() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return (0,_emotion_serialize__WEBPACK_IMPORTED_MODULE_2__/* .serializeStyles */ .O)(args); } var keyframes = function keyframes() { var insertable = css.apply(void 0, arguments); var name = "animation-" + insertable.name; // $FlowFixMe return { name: name, styles: "@keyframes " + name + "{" + insertable.styles + "}", anim: 1, toString: function toString() { return "_EMO_" + this.name + "_" + this.styles + "_EMO_"; } }; }; var classnames = function classnames(args) { var len = args.length; var i = 0; var cls = ''; for (; i < len; i++) { var arg = args[i]; if (arg == null) continue; var toAdd = void 0; switch (typeof arg) { case 'boolean': break; case 'object': { if (Array.isArray(arg)) { toAdd = classnames(arg); } else { if (false) {} toAdd = ''; for (var k in arg) { if (arg[k] && k) { toAdd && (toAdd += ' '); toAdd += k; } } } break; } default: { toAdd = arg; } } if (toAdd) { cls && (cls += ' '); cls += toAdd; } } return cls; }; function merge(registered, css, className) { var registeredStyles = []; var rawClassName = getRegisteredStyles(registered, registeredStyles, className); if (registeredStyles.length < 2) { return className; } return rawClassName + css(registeredStyles); } var Insertion = function Insertion(_ref) { var cache = _ref.cache, serializedArr = _ref.serializedArr; useInsertionEffectAlwaysWithSyncFallback(function () { for (var i = 0; i < serializedArr.length; i++) { insertStyles(cache, serializedArr[i], false); } }); return null; }; var ClassNames = /* #__PURE__ */(/* unused pure expression or super */ null && (withEmotionCache(function (props, cache) { var hasRendered = false; var serializedArr = []; var css = function css() { if (hasRendered && "production" !== 'production') {} for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var serialized = serializeStyles(args, cache.registered); serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx` registerStyles(cache, serialized, false); return cache.key + "-" + serialized.name; }; var cx = function cx() { if (hasRendered && "production" !== 'production') {} for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } return merge(cache.registered, css, classnames(args)); }; var content = { css: css, cx: cx, theme: React.useContext(ThemeContext) }; var ele = props.children(content); hasRendered = true; return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, { cache: cache, serializedArr: serializedArr }), ele); }))); if (false) {} if (false) { var globalKey, globalContext, isTestEnv, isBrowser; } /***/ }), /***/ 7073: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { O: () => (/* binding */ serializeStyles) }); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@emotion+hash@0.9.1/node_modules/@emotion/hash/dist/emotion-hash.esm.js /* eslint-disable */ // Inspired by https://github.com/garycourt/murmurhash-js // Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86 function murmur2(str) { // 'm' and 'r' are mixing constants generated offline. // They're not really 'magic', they just happen to work well. // const m = 0x5bd1e995; // const r = 24; // Initialize the hash var h = 0; // Mix 4 bytes at a time into the hash var k, i = 0, len = str.length; for (; len >= 4; ++i, len -= 4) { k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24; k = /* Math.imul(k, m): */ (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16); k ^= /* k >>> r: */ k >>> 24; h = /* Math.imul(k, m): */ (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^ /* Math.imul(h, m): */ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16); } // Handle the last few bytes of the input array switch (len) { case 3: h ^= (str.charCodeAt(i + 2) & 0xff) << 16; case 2: h ^= (str.charCodeAt(i + 1) & 0xff) << 8; case 1: h ^= str.charCodeAt(i) & 0xff; h = /* Math.imul(h, m): */ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16); } // Do a few final mixes of the hash to ensure the last few // bytes are well-incorporated. h ^= h >>> 13; h = /* Math.imul(h, m): */ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16); return ((h ^ h >>> 15) >>> 0).toString(36); } ;// CONCATENATED MODULE: ./node_modules/.pnpm/@emotion+unitless@0.8.1/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js var unitlessKeys = { animationIterationCount: 1, aspectRatio: 1, borderImageOutset: 1, borderImageSlice: 1, borderImageWidth: 1, boxFlex: 1, boxFlexGroup: 1, boxOrdinalGroup: 1, columnCount: 1, columns: 1, flex: 1, flexGrow: 1, flexPositive: 1, flexShrink: 1, flexNegative: 1, flexOrder: 1, gridRow: 1, gridRowEnd: 1, gridRowSpan: 1, gridRowStart: 1, gridColumn: 1, gridColumnEnd: 1, gridColumnSpan: 1, gridColumnStart: 1, msGridRow: 1, msGridRowSpan: 1, msGridColumn: 1, msGridColumnSpan: 1, fontWeight: 1, lineHeight: 1, opacity: 1, order: 1, orphans: 1, tabSize: 1, widows: 1, zIndex: 1, zoom: 1, WebkitLineClamp: 1, // SVG-related properties fillOpacity: 1, floodOpacity: 1, stopOpacity: 1, strokeDasharray: 1, strokeDashoffset: 1, strokeMiterlimit: 1, strokeOpacity: 1, strokeWidth: 1 }; // EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+memoize@0.8.1/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js var emotion_memoize_esm = __webpack_require__(7506); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@emotion+serialize@1.1.2/node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js var ILLEGAL_ESCAPE_SEQUENCE_ERROR = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences"; var UNDEFINED_AS_OBJECT_KEY_ERROR = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key)."; var hyphenateRegex = /[A-Z]|^ms/g; var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g; var isCustomProperty = function isCustomProperty(property) { return property.charCodeAt(1) === 45; }; var isProcessableValue = function isProcessableValue(value) { return value != null && typeof value !== 'boolean'; }; var processStyleName = /* #__PURE__ */(0,emotion_memoize_esm/* default */.Z)(function (styleName) { return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase(); }); var processStyleValue = function processStyleValue(key, value) { switch (key) { case 'animation': case 'animationName': { if (typeof value === 'string') { return value.replace(animationRegex, function (match, p1, p2) { cursor = { name: p1, styles: p2, next: cursor }; return p1; }); } } } if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) { return value + 'px'; } return value; }; if (false) { var hyphenatedCache, hyphenPattern, msPattern, oldProcessStyleValue, contentValues, contentValuePattern; } var noComponentSelectorMessage = (/* unused pure expression or super */ null && ('Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.')); function handleInterpolation(mergedProps, registered, interpolation) { if (interpolation == null) { return ''; } if (interpolation.__emotion_styles !== undefined) { if (false) {} return interpolation; } switch (typeof interpolation) { case 'boolean': { return ''; } case 'object': { if (interpolation.anim === 1) { cursor = { name: interpolation.name, styles: interpolation.styles, next: cursor }; return interpolation.name; } if (interpolation.styles !== undefined) { var next = interpolation.next; if (next !== undefined) { // not the most efficient thing ever but this is a pretty rare case // and there will be very few iterations of this generally while (next !== undefined) { cursor = { name: next.name, styles: next.styles, next: cursor }; next = next.next; } } var styles = interpolation.styles + ";"; if (false) {} return styles; } return createStringFromObject(mergedProps, registered, interpolation); } case 'function': { if (mergedProps !== undefined) { var previousCursor = cursor; var result = interpolation(mergedProps); cursor = previousCursor; return handleInterpolation(mergedProps, registered, result); } else if (false) {} break; } case 'string': if (false) { var replaced, matched; } break; } // finalize string values (regular strings and functions interpolated into css calls) if (registered == null) { return interpolation; } var cached = registered[interpolation]; return cached !== undefined ? cached : interpolation; } function createStringFromObject(mergedProps, registered, obj) { var string = ''; if (Array.isArray(obj)) { for (var i = 0; i < obj.length; i++) { string += handleInterpolation(mergedProps, registered, obj[i]) + ";"; } } else { for (var _key in obj) { var value = obj[_key]; if (typeof value !== 'object') { if (registered != null && registered[value] !== undefined) { string += _key + "{" + registered[value] + "}"; } else if (isProcessableValue(value)) { string += processStyleName(_key) + ":" + processStyleValue(_key, value) + ";"; } } else { if (_key === 'NO_COMPONENT_SELECTOR' && "production" !== 'production') {} if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) { for (var _i = 0; _i < value.length; _i++) { if (isProcessableValue(value[_i])) { string += processStyleName(_key) + ":" + processStyleValue(_key, value[_i]) + ";"; } } } else { var interpolated = handleInterpolation(mergedProps, registered, value); switch (_key) { case 'animation': case 'animationName': { string += processStyleName(_key) + ":" + interpolated + ";"; break; } default: { if (false) {} string += _key + "{" + interpolated + "}"; } } } } } } return string; } var labelPattern = /label:\s*([^\s;\n{]+)\s*(;|$)/g; var sourceMapPattern; if (false) {} // this is the cursor for keyframes // keyframes are stored on the SerializedStyles object as a linked list var cursor; var serializeStyles = function serializeStyles(args, registered, mergedProps) { if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) { return args[0]; } var stringMode = true; var styles = ''; cursor = undefined; var strings = args[0]; if (strings == null || strings.raw === undefined) { stringMode = false; styles += handleInterpolation(mergedProps, registered, strings); } else { if (false) {} styles += strings[0]; } // we start at 1 since we've already handled the first arg for (var i = 1; i < args.length; i++) { styles += handleInterpolation(mergedProps, registered, args[i]); if (stringMode) { if (false) {} styles += strings[i]; } } var sourceMap; if (false) {} // using a global regex with .exec is stateful so lastIndex has to be reset each time labelPattern.lastIndex = 0; var identifierName = ''; var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5 while ((match = labelPattern.exec(styles)) !== null) { identifierName += '-' + // $FlowFixMe we know it's not null match[1]; } var name = murmur2(styles) + identifierName; if (false) {} return { name: name, styles: styles, next: cursor }; }; /***/ }), /***/ 122: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; var react__WEBPACK_IMPORTED_MODULE_0___namespace_cache; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ L: () => (/* binding */ useInsertionEffectAlwaysWithSyncFallback), /* harmony export */ j: () => (/* binding */ useInsertionEffectWithLayoutFallback) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7948); var syncFallback = function syncFallback(create) { return create(); }; var useInsertionEffect = /*#__PURE__*/ (react__WEBPACK_IMPORTED_MODULE_0___namespace_cache || (react__WEBPACK_IMPORTED_MODULE_0___namespace_cache = __webpack_require__.t(react__WEBPACK_IMPORTED_MODULE_0__, 2)))['useInsertion' + 'Effect'] ? /*#__PURE__*/ (react__WEBPACK_IMPORTED_MODULE_0___namespace_cache || (react__WEBPACK_IMPORTED_MODULE_0___namespace_cache = __webpack_require__.t(react__WEBPACK_IMPORTED_MODULE_0__, 2)))['useInsertion' + 'Effect'] : false; var useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback; var useInsertionEffectWithLayoutFallback = useInsertionEffect || react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect; /***/ }), /***/ 1443: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ My: () => (/* binding */ insertStyles), /* harmony export */ fp: () => (/* binding */ getRegisteredStyles), /* harmony export */ hC: () => (/* binding */ registerStyles) /* harmony export */ }); var isBrowser = "object" !== 'undefined'; function getRegisteredStyles(registered, registeredStyles, classNames) { var rawClassName = ''; classNames.split(' ').forEach(function (className) { if (registered[className] !== undefined) { registeredStyles.push(registered[className] + ";"); } else { rawClassName += className + " "; } }); return rawClassName; } var registerStyles = function registerStyles(cache, serialized, isStringTag) { var className = cache.key + "-" + serialized.name; if ( // we only need to add the styles to the registered cache if the // class name could be used further down // the tree but if it's a string tag, we know it won't // so we don't have to add it to registered cache. // this improves memory usage since we can avoid storing the whole style string (isStringTag === false || // we need to always store it if we're in compat mode and // in node since emotion-server relies on whether a style is in // the registered cache to know whether a style is global or not // also, note that this check will be dead code eliminated in the browser isBrowser === false) && cache.registered[className] === undefined) { cache.registered[className] = serialized.styles; } }; var insertStyles = function insertStyles(cache, serialized, isStringTag) { registerStyles(cache, serialized, isStringTag); var className = cache.key + "-" + serialized.name; if (cache.inserted[serialized.name] === undefined) { var current = serialized; do { cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true); current = current.next; } while (current !== undefined); } }; /***/ }), /***/ 521: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z" }), 'Add'); /***/ }), /***/ 5962: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "m14 12-2 2-2-2 2-2zm-2-6 2.12 2.12 2.5-2.5L12 1 7.38 5.62l2.5 2.5zm-6 6 2.12-2.12-2.5-2.5L1 12l4.62 4.62 2.5-2.5zm12 0-2.12 2.12 2.5 2.5L23 12l-4.62-4.62-2.5 2.5zm-6 6-2.12-2.12-2.5 2.5L12 23l4.62-4.62-2.5-2.5z" }), 'Api'); /***/ }), /***/ 6970: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" }), 'Cancel'); /***/ }), /***/ 1285: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z" }), 'ClearAll'); /***/ }), /***/ 6409: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z" }), 'ContentCopy'); /***/ }), /***/ 7415: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1" }), 'DarkMode'); /***/ }), /***/ 2920: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z" }), 'Delete'); /***/ }), /***/ 7856: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "m16.24 11.51 1.57-1.57-3.75-3.75-1.57 1.57-4.14-4.13c-.78-.78-2.05-.78-2.83 0l-1.9 1.9c-.78.78-.78 2.05 0 2.83l4.13 4.13L3 17.25V21h3.75l4.76-4.76 4.13 4.13c.95.95 2.23.6 2.83 0l1.9-1.9c.78-.78.78-2.05 0-2.83zm-7.06-.44L5.04 6.94l1.89-1.9L8.2 6.31 7.02 7.5l1.41 1.41 1.19-1.19 1.45 1.45zm7.88 7.89-4.13-4.13 1.9-1.9 1.45 1.45-1.19 1.19 1.41 1.41 1.19-1.19 1.27 1.27zm3.65-11.92c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.47-.47-1.12-.29-1.41 0l-1.83 1.83 3.75 3.75z" }), 'DesignServices'); /***/ }), /***/ 9933: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" }), 'Edit'); /***/ }), /***/ 9779: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M17 10H7v2h10zm2-7h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V8h14zm-5-5H7v2h7z" }), 'EventNote'); /***/ }), /***/ 1683: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z" }), 'ExpandLess'); /***/ }), /***/ 5327: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), 'ExpandMore'); /***/ }), /***/ 6510: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "m12 21.35-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54z" }), 'Favorite'); /***/ }), /***/ 111: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3m-4.4 15.55-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05" }), 'FavoriteBorder'); /***/ }), /***/ 609: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z" }), 'FileDownload'); /***/ }), /***/ 292: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z" }), 'FileUpload'); /***/ }), /***/ 3701: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25" }), 'Help'); /***/ }), /***/ 8302: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z" }), 'Info'); /***/ }), /***/ 3801: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14c0-1.11-.9-2-2-2M11 16l4-4-4-4v3H1v2h10z" }), 'Input'); /***/ }), /***/ 1064: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7.53 12L9 10.5l1.4-1.41 2.07 2.08L17.6 6 19 7.41zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4z" }), 'LibraryAddCheck'); /***/ }), /***/ 4766: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z" }), 'LightMode'); /***/ }), /***/ 6134: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z" }), 'Menu'); /***/ }), /***/ 4057: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" }), 'Save'); /***/ }), /***/ 346: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M3 5h2V3c-1.1 0-2 .9-2 2m0 8h2v-2H3zm4 8h2v-2H7zM3 9h2V7H3zm10-6h-2v2h2zm6 0v2h2c0-1.1-.9-2-2-2M5 21v-2H3c0 1.1.9 2 2 2m-2-4h2v-2H3zM9 3H7v2h2zm2 18h2v-2h-2zm8-8h2v-2h-2zm0 8c1.1 0 2-.9 2-2h-2zm0-12h2V7h-2zm0 8h2v-2h-2zm-4 4h2v-2h-2zm0-16h2V3h-2zM7 17h10V7H7zm2-8h6v6H9z" }), 'SelectAll'); /***/ }), /***/ 1550: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6" }), 'Settings'); /***/ }), /***/ 4818: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92" }), 'Share'); /***/ }), /***/ 6412: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4z" }), 'Sync'); /***/ }), /***/ 1777: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; "use client"; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _createSvgIcon = _interopRequireDefault(__webpack_require__(1954)); var _jsxRuntime = __webpack_require__(7394); var _default = exports.Z = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77" }), 'VolumeUp'); /***/ }), /***/ 1954: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; 'use client'; Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "default", ({ enumerable: true, get: function () { return _utils.createSvgIcon; } })); var _utils = __webpack_require__(5101); /***/ }), /***/ 6582: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); const blue = { 50: '#e3f2fd', 100: '#bbdefb', 200: '#90caf9', 300: '#64b5f6', 400: '#42a5f5', 500: '#2196f3', 600: '#1e88e5', 700: '#1976d2', 800: '#1565c0', 900: '#0d47a1', A100: '#82b1ff', A200: '#448aff', A400: '#2979ff', A700: '#2962ff' }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (blue); /***/ }), /***/ 269: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); const common = { black: '#000', white: '#fff' }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (common); /***/ }), /***/ 8152: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); const green = { 50: '#e8f5e9', 100: '#c8e6c9', 200: '#a5d6a7', 300: '#81c784', 400: '#66bb6a', 500: '#4caf50', 600: '#43a047', 700: '#388e3c', 800: '#2e7d32', 900: '#1b5e20', A100: '#b9f6ca', A200: '#69f0ae', A400: '#00e676', A700: '#00c853' }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (green); /***/ }), /***/ 202: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); const grey = { 50: '#fafafa', 100: '#f5f5f5', 200: '#eeeeee', 300: '#e0e0e0', 400: '#bdbdbd', 500: '#9e9e9e', 600: '#757575', 700: '#616161', 800: '#424242', 900: '#212121', A100: '#f5f5f5', A200: '#eeeeee', A400: '#bdbdbd', A700: '#616161' }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (grey); /***/ }), /***/ 9239: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); const lightBlue = { 50: '#e1f5fe', 100: '#b3e5fc', 200: '#81d4fa', 300: '#4fc3f7', 400: '#29b6f6', 500: '#03a9f4', 600: '#039be5', 700: '#0288d1', 800: '#0277bd', 900: '#01579b', A100: '#80d8ff', A200: '#40c4ff', A400: '#00b0ff', A700: '#0091ea' }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (lightBlue); /***/ }), /***/ 4549: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); const orange = { 50: '#fff3e0', 100: '#ffe0b2', 200: '#ffcc80', 300: '#ffb74d', 400: '#ffa726', 500: '#ff9800', 600: '#fb8c00', 700: '#f57c00', 800: '#ef6c00', 900: '#e65100', A100: '#ffd180', A200: '#ffab40', A400: '#ff9100', A700: '#ff6d00' }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (orange); /***/ }), /***/ 761: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); const purple = { 50: '#f3e5f5', 100: '#e1bee7', 200: '#ce93d8', 300: '#ba68c8', 400: '#ab47bc', 500: '#9c27b0', 600: '#8e24aa', 700: '#7b1fa2', 800: '#6a1b9a', 900: '#4a148c', A100: '#ea80fc', A200: '#e040fb', A400: '#d500f9', A700: '#aa00ff' }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (purple); /***/ }), /***/ 6150: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); const red = { 50: '#ffebee', 100: '#ffcdd2', 200: '#ef9a9a', 300: '#e57373', 400: '#ef5350', 500: '#f44336', 600: '#e53935', 700: '#d32f2f', 800: '#c62828', 900: '#b71c1c', A100: '#ff8a80', A200: '#ff5252', A400: '#ff1744', A700: '#d50000' }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (red); /***/ }), /***/ 6288: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ createMixins) /* harmony export */ }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1010); function createMixins(breakpoints, mixins) { return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)({ toolbar: { minHeight: 56, [breakpoints.up('xs')]: { '@media (orientation: landscape)': { minHeight: 48 } }, [breakpoints.up('sm')]: { minHeight: 64 } } }, mixins); } /***/ }), /***/ 847: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ ZP: () => (/* binding */ createPalette) /* harmony export */ }); /* unused harmony exports light, dark */ /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(1010); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(3031); /* harmony import */ var _mui_utils_formatMuiErrorMessage__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(4451); /* harmony import */ var _mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(8836); /* harmony import */ var _mui_system_colorManipulator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2686); /* harmony import */ var _colors_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(269); /* harmony import */ var _colors_grey__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(202); /* harmony import */ var _colors_purple__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(761); /* harmony import */ var _colors_red__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6150); /* harmony import */ var _colors_orange__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(4549); /* harmony import */ var _colors_blue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6582); /* harmony import */ var _colors_lightBlue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9239); /* harmony import */ var _colors_green__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8152); const _excluded = ["mode", "contrastThreshold", "tonalOffset"]; const light = { // The colors used to style the text. text: { // The most important text. primary: 'rgba(0, 0, 0, 0.87)', // Secondary text. secondary: 'rgba(0, 0, 0, 0.6)', // Disabled text have even lower visual prominence. disabled: 'rgba(0, 0, 0, 0.38)' }, // The color used to divide different elements. divider: 'rgba(0, 0, 0, 0.12)', // The background colors used to style the surfaces. // Consistency between these values is important. background: { paper: _colors_common__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z.white, default: _colors_common__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z.white }, // The colors used to style the action elements. action: { // The color of an active action like an icon button. active: 'rgba(0, 0, 0, 0.54)', // The color of an hovered action. hover: 'rgba(0, 0, 0, 0.04)', hoverOpacity: 0.04, // The color of a selected action. selected: 'rgba(0, 0, 0, 0.08)', selectedOpacity: 0.08, // The color of a disabled action. disabled: 'rgba(0, 0, 0, 0.26)', // The background color of a disabled action. disabledBackground: 'rgba(0, 0, 0, 0.12)', disabledOpacity: 0.38, focus: 'rgba(0, 0, 0, 0.12)', focusOpacity: 0.12, activatedOpacity: 0.12 } }; const dark = { text: { primary: _colors_common__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z.white, secondary: 'rgba(255, 255, 255, 0.7)', disabled: 'rgba(255, 255, 255, 0.5)', icon: 'rgba(255, 255, 255, 0.5)' }, divider: 'rgba(255, 255, 255, 0.12)', background: { paper: '#121212', default: '#121212' }, action: { active: _colors_common__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z.white, hover: 'rgba(255, 255, 255, 0.08)', hoverOpacity: 0.08, selected: 'rgba(255, 255, 255, 0.16)', selectedOpacity: 0.16, disabled: 'rgba(255, 255, 255, 0.3)', disabledBackground: 'rgba(255, 255, 255, 0.12)', disabledOpacity: 0.38, focus: 'rgba(255, 255, 255, 0.12)', focusOpacity: 0.12, activatedOpacity: 0.24 } }; function addLightOrDark(intent, direction, shade, tonalOffset) { const tonalOffsetLight = tonalOffset.light || tonalOffset; const tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5; if (!intent[direction]) { if (intent.hasOwnProperty(shade)) { intent[direction] = intent[shade]; } else if (direction === 'light') { intent.light = (0,_mui_system_colorManipulator__WEBPACK_IMPORTED_MODULE_1__/* .lighten */ .$n)(intent.main, tonalOffsetLight); } else if (direction === 'dark') { intent.dark = (0,_mui_system_colorManipulator__WEBPACK_IMPORTED_MODULE_1__/* .darken */ ._j)(intent.main, tonalOffsetDark); } } } function getDefaultPrimary() { let mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'light'; if (mode === 'dark') { return { main: _colors_blue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z[200], light: _colors_blue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z[50], dark: _colors_blue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z[400] }; } return { main: _colors_blue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z[700], light: _colors_blue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z[400], dark: _colors_blue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z[800] }; } function getDefaultSecondary() { let mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'light'; if (mode === 'dark') { return { main: _colors_purple__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z[200], light: _colors_purple__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z[50], dark: _colors_purple__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z[400] }; } return { main: _colors_purple__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z[500], light: _colors_purple__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z[300], dark: _colors_purple__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z[700] }; } function getDefaultError() { let mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'light'; if (mode === 'dark') { return { main: _colors_red__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z[500], light: _colors_red__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z[300], dark: _colors_red__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z[700] }; } return { main: _colors_red__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z[700], light: _colors_red__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z[400], dark: _colors_red__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z[800] }; } function getDefaultInfo() { let mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'light'; if (mode === 'dark') { return { main: _colors_lightBlue__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z[400], light: _colors_lightBlue__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z[300], dark: _colors_lightBlue__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z[700] }; } return { main: _colors_lightBlue__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z[700], light: _colors_lightBlue__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z[500], dark: _colors_lightBlue__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z[900] }; } function getDefaultSuccess() { let mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'light'; if (mode === 'dark') { return { main: _colors_green__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z[400], light: _colors_green__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z[300], dark: _colors_green__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z[700] }; } return { main: _colors_green__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z[800], light: _colors_green__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z[500], dark: _colors_green__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z[900] }; } function getDefaultWarning() { let mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'light'; if (mode === 'dark') { return { main: _colors_orange__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z[400], light: _colors_orange__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z[300], dark: _colors_orange__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z[700] }; } return { main: '#ed6c02', // closest to orange[800] that pass 3:1. light: _colors_orange__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z[500], dark: _colors_orange__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z[900] }; } function createPalette(palette) { const { mode = 'light', contrastThreshold = 3, tonalOffset = 0.2 } = palette, other = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z)(palette, _excluded); const primary = palette.primary || getDefaultPrimary(mode); const secondary = palette.secondary || getDefaultSecondary(mode); const error = palette.error || getDefaultError(mode); const info = palette.info || getDefaultInfo(mode); const success = palette.success || getDefaultSuccess(mode); const warning = palette.warning || getDefaultWarning(mode); // Use the same logic as // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59 // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54 function getContrastText(background) { const contrastText = (0,_mui_system_colorManipulator__WEBPACK_IMPORTED_MODULE_1__/* .getContrastRatio */ .mi)(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary; if (false) {} return contrastText; } const augmentColor = _ref => { let { color, name, mainShade = 500, lightShade = 300, darkShade = 700 } = _ref; color = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z)({}, color); if (!color.main && color[mainShade]) { color.main = color[mainShade]; } if (!color.hasOwnProperty('main')) { throw new Error( false ? 0 : (0,_mui_utils_formatMuiErrorMessage__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z)(11, name ? " (".concat(name, ")") : '', mainShade)); } if (typeof color.main !== 'string') { throw new Error( false ? 0 : (0,_mui_utils_formatMuiErrorMessage__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z)(12, name ? " (".concat(name, ")") : '', JSON.stringify(color.main))); } addLightOrDark(color, 'light', lightShade, tonalOffset); addLightOrDark(color, 'dark', darkShade, tonalOffset); if (!color.contrastText) { color.contrastText = getContrastText(color.main); } return color; }; const modes = { dark, light }; if (false) {} const paletteOutput = (0,_mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z)({ // A collection of common colors. common: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z)({}, _colors_common__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z), // prevent mutable object. // The palette mode, can be light or dark. mode, // The colors used to represent primary interface elements for a user. primary: augmentColor({ color: primary, name: 'primary' }), // The colors used to represent secondary interface elements for a user. secondary: augmentColor({ color: secondary, name: 'secondary', mainShade: 'A400', lightShade: 'A200', darkShade: 'A700' }), // The colors used to represent interface elements that the user should be made aware of. error: augmentColor({ color: error, name: 'error' }), // The colors used to represent potentially dangerous actions or important messages. warning: augmentColor({ color: warning, name: 'warning' }), // The colors used to present information to the user that is neutral and not necessarily important. info: augmentColor({ color: info, name: 'info' }), // The colors used to indicate the successful completion of an action that user triggered. success: augmentColor({ color: success, name: 'success' }), // The grey colors. grey: _colors_grey__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, // Used by `getContrastText()` to maximize the contrast between // the background and the text. contrastThreshold, // Takes a background color and returns the text color that maximizes the contrast. getContrastText, // Generate a rich color object. augmentColor, // Used by the functions below to shift a color's luminance by approximately // two indexes within its tonal palette. // E.g., shift from Red 500 to Red 300 or Red 700. tonalOffset }, modes[mode]), other); return paletteOutput; } /***/ }), /***/ 4593: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* unused harmony export createMuiTheme */ /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(1010); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3031); /* harmony import */ var _mui_utils_formatMuiErrorMessage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4451); /* harmony import */ var _mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8836); /* harmony import */ var _mui_system_styleFunctionSx__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(1524); /* harmony import */ var _mui_system_styleFunctionSx__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(1048); /* harmony import */ var _mui_system_createTheme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3985); /* harmony import */ var _createMixins__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6288); /* harmony import */ var _createPalette__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(847); /* harmony import */ var _createTypography__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(2155); /* harmony import */ var _shadows__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5081); /* harmony import */ var _createTransitions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(3803); /* harmony import */ var _zIndex__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(430); const _excluded = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"]; function createTheme() { let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; const { mixins: mixinsInput = {}, palette: paletteInput = {}, transitions: transitionsInput = {}, typography: typographyInput = {} } = options, other = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(options, _excluded); if (options.vars) { throw new Error( false ? 0 : (0,_mui_utils_formatMuiErrorMessage__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(18)); } const palette = (0,_createPalette__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP)(paletteInput); const systemTheme = (0,_mui_system_createTheme__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(options); let muiTheme = (0,_mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(systemTheme, { mixins: (0,_createMixins__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(systemTheme.breakpoints, mixinsInput), palette, // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol. shadows: _shadows__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.slice(), typography: (0,_createTypography__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z)(palette, typographyInput), transitions: (0,_createTransitions__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .ZP)(transitionsInput), zIndex: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z)({}, _zIndex__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z) }); muiTheme = (0,_mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(muiTheme, other); for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } muiTheme = args.reduce((acc, argument) => (0,_mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(acc, argument), muiTheme); if (false) {} muiTheme.unstable_sxConfig = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z)({}, _mui_system_styleFunctionSx__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, other == null ? void 0 : other.unstable_sxConfig); muiTheme.unstable_sx = function sx(props) { return (0,_mui_system_styleFunctionSx__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z)({ sx: props, theme: this }); }; return muiTheme; } let warnedOnce = false; function createMuiTheme() { if (false) {} return createTheme(...arguments); } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createTheme); /***/ }), /***/ 3803: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ ZP: () => (/* binding */ createTransitions), /* harmony export */ x9: () => (/* binding */ duration) /* harmony export */ }); /* unused harmony export easing */ /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3031); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1010); const _excluded = ["duration", "easing", "delay"]; // Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves // to learn the context in which each easing should be used. const easing = { // This is the most common easing curve. easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)', // Objects enter the screen at full velocity from off-screen and // slowly decelerate to a resting point. easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)', // Objects leave the screen at full velocity. They do not decelerate when off-screen. easeIn: 'cubic-bezier(0.4, 0, 1, 1)', // The sharp curve is used by objects that may return to the screen at any time. sharp: 'cubic-bezier(0.4, 0, 0.6, 1)' }; // Follow https://m2.material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations // to learn when use what timing const duration = { shortest: 150, shorter: 200, short: 250, // most basic recommended timing standard: 300, // this is to be used in complex animations complex: 375, // recommended when something is entering screen enteringScreen: 225, // recommended when something is leaving screen leavingScreen: 195 }; function formatMs(milliseconds) { return "".concat(Math.round(milliseconds), "ms"); } function getAutoHeightDuration(height) { if (!height) { return 0; } const constant = height / 36; // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10 return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10); } function createTransitions(inputTransitions) { const mergedEasing = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)({}, easing, inputTransitions.easing); const mergedDuration = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)({}, duration, inputTransitions.duration); const create = function () { let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['all']; let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; const { duration: durationOption = mergedDuration.standard, easing: easingOption = mergedEasing.easeInOut, delay = 0 } = options, other = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(options, _excluded); if (false) {} return (Array.isArray(props) ? props : [props]).map(animatedProp => "".concat(animatedProp, " ").concat(typeof durationOption === 'string' ? durationOption : formatMs(durationOption), " ").concat(easingOption, " ").concat(typeof delay === 'string' ? delay : formatMs(delay))).join(','); }; return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)({ getAutoHeightDuration, create }, inputTransitions, { easing: mergedEasing, duration: mergedDuration }); } /***/ }), /***/ 2155: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ createTypography) /* harmony export */ }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1010); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3031); /* harmony import */ var _mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8836); const _excluded = ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"]; function round(value) { return Math.round(value * 1e5) / 1e5; } const caseAllCaps = { textTransform: 'uppercase' }; const defaultFontFamily = '"Roboto", "Helvetica", "Arial", sans-serif'; /** * @see @link{https://m2.material.io/design/typography/the-type-system.html} * @see @link{https://m2.material.io/design/typography/understanding-typography.html} */ function createTypography(palette, typography) { const _ref = typeof typography === 'function' ? typography(palette) : typography, { fontFamily = defaultFontFamily, // The default font size of the Material Specification. fontSize = 14, // px fontWeightLight = 300, fontWeightRegular = 400, fontWeightMedium = 500, fontWeightBold = 700, // Tell MUI what's the font-size on the html element. // 16px is the default font-size used by browsers. htmlFontSize = 16, // Apply the CSS properties to all the variants. allVariants, pxToRem: pxToRem2 } = _ref, other = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(_ref, _excluded); if (false) {} const coef = fontSize / 14; const pxToRem = pxToRem2 || (size => "".concat(size / htmlFontSize * coef, "rem")); const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)({ fontFamily, fontWeight, fontSize: pxToRem(size), // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/ lineHeight }, fontFamily === defaultFontFamily ? { letterSpacing: "".concat(round(letterSpacing / size), "em") } : {}, casing, allVariants); const variants = { h1: buildVariant(fontWeightLight, 96, 1.167, -1.5), h2: buildVariant(fontWeightLight, 60, 1.2, -0.5), h3: buildVariant(fontWeightRegular, 48, 1.167, 0), h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25), h5: buildVariant(fontWeightRegular, 24, 1.334, 0), h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15), subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15), subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1), body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15), body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15), button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps), caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4), overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps), // TODO v6: Remove handling of 'inherit' variant from the theme as it is already handled in Material UI's Typography component. Also, remember to remove the associated types. inherit: { fontFamily: 'inherit', fontWeight: 'inherit', fontSize: 'inherit', lineHeight: 'inherit', letterSpacing: 'inherit' } }; return (0,_mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)({ htmlFontSize, pxToRem, fontFamily, fontSize, fontWeightLight, fontWeightRegular, fontWeightMedium, fontWeightBold }, variants), other, { clone: false // No need to clone deep }); } /***/ }), /***/ 559: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _createTheme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4593); 'use client'; const defaultTheme = (0,_createTheme__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaultTheme); /***/ }), /***/ 6617: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ('$$material'); /***/ }), /***/ 512: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _slotShouldForwardProp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2378); const rootShouldForwardProp = prop => (0,_slotShouldForwardProp__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(prop) && prop !== 'classes'; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (rootShouldForwardProp); /***/ }), /***/ 5081: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); const shadowKeyUmbraOpacity = 0.2; const shadowKeyPenumbraOpacity = 0.14; const shadowAmbientShadowOpacity = 0.12; function createShadow() { return ["".concat(arguments.length <= 0 ? undefined : arguments[0], "px ").concat(arguments.length <= 1 ? undefined : arguments[1], "px ").concat(arguments.length <= 2 ? undefined : arguments[2], "px ").concat(arguments.length <= 3 ? undefined : arguments[3], "px rgba(0,0,0,").concat(shadowKeyUmbraOpacity, ")"), "".concat(arguments.length <= 4 ? undefined : arguments[4], "px ").concat(arguments.length <= 5 ? undefined : arguments[5], "px ").concat(arguments.length <= 6 ? undefined : arguments[6], "px ").concat(arguments.length <= 7 ? undefined : arguments[7], "px rgba(0,0,0,").concat(shadowKeyPenumbraOpacity, ")"), "".concat(arguments.length <= 8 ? undefined : arguments[8], "px ").concat(arguments.length <= 9 ? undefined : arguments[9], "px ").concat(arguments.length <= 10 ? undefined : arguments[10], "px ").concat(arguments.length <= 11 ? undefined : arguments[11], "px rgba(0,0,0,").concat(shadowAmbientShadowOpacity, ")")].join(','); } // Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss const shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)]; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (shadows); /***/ }), /***/ 2378: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); // copied from @mui/system/createStyled function slotShouldForwardProp(prop) { return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as'; } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (slotShouldForwardProp); /***/ }), /***/ 5807: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ ZP: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _mui_system_createStyled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3952); /* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(559); /* harmony import */ var _identifier__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6617); /* harmony import */ var _rootShouldForwardProp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(512); 'use client'; const styled = (0,_mui_system_createStyled__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)({ themeId: _identifier__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, defaultTheme: _defaultTheme__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, rootShouldForwardProp: _rootShouldForwardProp__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z }); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (styled); /***/ }), /***/ 3954: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ useThemeProps) /* harmony export */ }); /* harmony import */ var _mui_system_useThemeProps__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8251); /* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(559); /* harmony import */ var _identifier__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6617); 'use client'; function useThemeProps(_ref) { let { props, name } = _ref; return (0,_mui_system_useThemeProps__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)({ props, name, defaultTheme: _defaultTheme__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, themeId: _identifier__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z }); } /***/ }), /***/ 430: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); // We need to centralize the zIndex definitions as they work // like global values in the browser. const zIndex = { mobileStepper: 1000, fab: 1050, speedDial: 1050, appBar: 1100, drawer: 1200, modal: 1300, snackbar: 1400, tooltip: 1500 }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (zIndex); /***/ }), /***/ 5652: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _mui_utils_capitalize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4656); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_mui_utils_capitalize__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z); /***/ }), /***/ 9415: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _mui_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3444); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_mui_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z); /***/ }), /***/ 174: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: () => (/* binding */ createSvgIcon) }); // EXTERNAL MODULE: ./node_modules/.pnpm/@babel+runtime@7.24.4/node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(1010); // EXTERNAL MODULE: ./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js var react = __webpack_require__(7948); // EXTERNAL MODULE: ./node_modules/.pnpm/@babel+runtime@7.24.4/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js var objectWithoutPropertiesLoose = __webpack_require__(3031); // EXTERNAL MODULE: ./node_modules/.pnpm/clsx@2.1.0/node_modules/clsx/dist/clsx.mjs var clsx = __webpack_require__(7919); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/composeClasses/composeClasses.js var composeClasses = __webpack_require__(5923); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/capitalize.js var capitalize = __webpack_require__(5652); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/styles/useThemeProps.js var useThemeProps = __webpack_require__(3954); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/styles/styled.js var styled = __webpack_require__(5807); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/generateUtilityClasses/generateUtilityClasses.js var generateUtilityClasses = __webpack_require__(3453); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/generateUtilityClass/generateUtilityClass.js var generateUtilityClass = __webpack_require__(8092); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/SvgIcon/svgIconClasses.js function getSvgIconUtilityClass(slot) { return (0,generateUtilityClass/* default */.ZP)('MuiSvgIcon', slot); } const svgIconClasses = (0,generateUtilityClasses/* default */.Z)('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']); /* harmony default export */ const SvgIcon_svgIconClasses = ((/* unused pure expression or super */ null && (svgIconClasses))); // EXTERNAL MODULE: ./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js var jsx_runtime = __webpack_require__(7394); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/SvgIcon/SvgIcon.js 'use client'; const _excluded = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"]; const useUtilityClasses = ownerState => { const { color, fontSize, classes } = ownerState; const slots = { root: ['root', color !== 'inherit' && "color".concat((0,capitalize/* default */.Z)(color)), "fontSize".concat((0,capitalize/* default */.Z)(fontSize))] }; return (0,composeClasses/* default */.Z)(slots, getSvgIconUtilityClass, classes); }; const SvgIconRoot = (0,styled/* default */.ZP)('svg', { name: 'MuiSvgIcon', slot: 'Root', overridesResolver: (props, styles) => { const { ownerState } = props; return [styles.root, ownerState.color !== 'inherit' && styles["color".concat((0,capitalize/* default */.Z)(ownerState.color))], styles["fontSize".concat((0,capitalize/* default */.Z)(ownerState.fontSize))]]; } })(_ref => { let { theme, ownerState } = _ref; var _theme$transitions, _theme$transitions$cr, _theme$transitions2, _theme$typography, _theme$typography$pxT, _theme$typography2, _theme$typography2$px, _theme$typography3, _theme$typography3$px, _palette$ownerState$c, _palette, _palette2, _palette3; return { userSelect: 'none', width: '1em', height: '1em', display: 'inline-block', // the will define the property that has `currentColor` // for example heroicons uses fill="none" and stroke="currentColor" fill: ownerState.hasSvgAsChild ? undefined : 'currentColor', flexShrink: 0, transition: (_theme$transitions = theme.transitions) == null || (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', { duration: (_theme$transitions2 = theme.transitions) == null || (_theme$transitions2 = _theme$transitions2.duration) == null ? void 0 : _theme$transitions2.shorter }), fontSize: { inherit: 'inherit', small: ((_theme$typography = theme.typography) == null || (_theme$typography$pxT = _theme$typography.pxToRem) == null ? void 0 : _theme$typography$pxT.call(_theme$typography, 20)) || '1.25rem', medium: ((_theme$typography2 = theme.typography) == null || (_theme$typography2$px = _theme$typography2.pxToRem) == null ? void 0 : _theme$typography2$px.call(_theme$typography2, 24)) || '1.5rem', large: ((_theme$typography3 = theme.typography) == null || (_theme$typography3$px = _theme$typography3.pxToRem) == null ? void 0 : _theme$typography3$px.call(_theme$typography3, 35)) || '2.1875rem' }[ownerState.fontSize], // TODO v5 deprecate, v6 remove for sx color: (_palette$ownerState$c = (_palette = (theme.vars || theme).palette) == null || (_palette = _palette[ownerState.color]) == null ? void 0 : _palette.main) != null ? _palette$ownerState$c : { action: (_palette2 = (theme.vars || theme).palette) == null || (_palette2 = _palette2.action) == null ? void 0 : _palette2.active, disabled: (_palette3 = (theme.vars || theme).palette) == null || (_palette3 = _palette3.action) == null ? void 0 : _palette3.disabled, inherit: undefined }[ownerState.color] }; }); const SvgIcon = /*#__PURE__*/react.forwardRef(function SvgIcon(inProps, ref) { const props = (0,useThemeProps/* default */.Z)({ props: inProps, name: 'MuiSvgIcon' }); const { children, className, color = 'inherit', component = 'svg', fontSize = 'medium', htmlColor, inheritViewBox = false, titleAccess, viewBox = '0 0 24 24' } = props, other = (0,objectWithoutPropertiesLoose/* default */.Z)(props, _excluded); const hasSvgAsChild = /*#__PURE__*/react.isValidElement(children) && children.type === 'svg'; const ownerState = (0,esm_extends/* default */.Z)({}, props, { color, component, fontSize, instanceFontSize: inProps.fontSize, inheritViewBox, viewBox, hasSvgAsChild }); const more = {}; if (!inheritViewBox) { more.viewBox = viewBox; } const classes = useUtilityClasses(ownerState); return /*#__PURE__*/(0,jsx_runtime.jsxs)(SvgIconRoot, (0,esm_extends/* default */.Z)({ as: component, className: (0,clsx/* default */.Z)(classes.root, className), focusable: "false", color: htmlColor, "aria-hidden": titleAccess ? undefined : true, role: titleAccess ? 'img' : undefined, ref: ref }, more, other, hasSvgAsChild && children.props, { ownerState: ownerState, children: [hasSvgAsChild ? children.props.children : children, titleAccess ? /*#__PURE__*/(0,jsx_runtime.jsx)("title", { children: titleAccess }) : null] })); }); false ? 0 : void 0; SvgIcon.muiName = 'SvgIcon'; /* harmony default export */ const SvgIcon_SvgIcon = (SvgIcon); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/createSvgIcon.js 'use client'; /** * Private module reserved for @mui packages. */ function createSvgIcon(path, displayName) { function Component(props, ref) { return /*#__PURE__*/(0,jsx_runtime.jsx)(SvgIcon_SvgIcon, (0,esm_extends/* default */.Z)({ "data-testid": "".concat(displayName, "Icon"), ref: ref }, props, { children: path })); } if (false) {} Component.muiName = SvgIcon_SvgIcon.muiName; return /*#__PURE__*/react.memo( /*#__PURE__*/react.forwardRef(Component)); } /***/ }), /***/ 5692: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _mui_utils_debounce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9082); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_mui_utils_debounce__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z); /***/ }), /***/ 5101: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { capitalize: () => (/* reexport */ capitalize/* default */.Z), createChainedFunction: () => (/* reexport */ createChainedFunction/* default */.Z), createSvgIcon: () => (/* reexport */ createSvgIcon/* default */.Z), debounce: () => (/* reexport */ debounce/* default */.Z), deprecatedPropType: () => (/* reexport */ utils_deprecatedPropType), isMuiElement: () => (/* reexport */ isMuiElement/* default */.Z), ownerDocument: () => (/* reexport */ ownerDocument/* default */.Z), ownerWindow: () => (/* reexport */ ownerWindow/* default */.Z), requirePropFactory: () => (/* reexport */ utils_requirePropFactory), setRef: () => (/* reexport */ utils_setRef), unstable_ClassNameGenerator: () => (/* binding */ unstable_ClassNameGenerator), unstable_useEnhancedEffect: () => (/* reexport */ useEnhancedEffect/* default */.Z), unstable_useId: () => (/* reexport */ useId/* default */.Z), unsupportedProp: () => (/* reexport */ utils_unsupportedProp), useControlled: () => (/* reexport */ useControlled/* default */.Z), useEventCallback: () => (/* reexport */ useEventCallback/* default */.Z), useForkRef: () => (/* reexport */ useForkRef/* default */.Z), useIsFocusVisible: () => (/* reexport */ useIsFocusVisible/* default */.Z) }); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/ClassNameGenerator/ClassNameGenerator.js var ClassNameGenerator = __webpack_require__(3705); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/capitalize.js var capitalize = __webpack_require__(5652); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/createChainedFunction.js var createChainedFunction = __webpack_require__(9415); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/createSvgIcon.js + 2 modules var createSvgIcon = __webpack_require__(174); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/debounce.js var debounce = __webpack_require__(5692); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/deprecatedPropType/deprecatedPropType.js function deprecatedPropType(validator, reason) { if (true) { return () => null; } return (props, propName, componentName, location, propFullName) => { const componentNameSafe = componentName || '<>'; const propFullNameSafe = propFullName || propName; if (typeof props[propName] !== 'undefined') { return new Error("The ".concat(location, " `").concat(propFullNameSafe, "` of ") + "`".concat(componentNameSafe, "` is deprecated. ").concat(reason)); } return null; }; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/deprecatedPropType.js /* harmony default export */ const utils_deprecatedPropType = (deprecatedPropType); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/isMuiElement.js + 1 modules var isMuiElement = __webpack_require__(2829); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/ownerDocument.js var ownerDocument = __webpack_require__(9259); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/ownerWindow.js var ownerWindow = __webpack_require__(6879); // EXTERNAL MODULE: ./node_modules/.pnpm/@babel+runtime@7.24.4/node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(1010); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/requirePropFactory/requirePropFactory.js function requirePropFactory(componentNameInError, Component) { if (true) { return () => null; } // eslint-disable-next-line react/forbid-foreign-prop-types const prevPropTypes = Component ? (0,esm_extends/* default */.Z)({}, Component.propTypes) : null; const requireProp = requiredProp => function (props, propName, componentName, location, propFullName) { const propFullNameSafe = propFullName || propName; const defaultTypeChecker = prevPropTypes == null ? void 0 : prevPropTypes[propFullNameSafe]; if (defaultTypeChecker) { for (var _len = arguments.length, args = new Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) { args[_key - 5] = arguments[_key]; } const typeCheckerResult = defaultTypeChecker(props, propName, componentName, location, propFullName, ...args); if (typeCheckerResult) { return typeCheckerResult; } } if (typeof props[propName] !== 'undefined' && !props[requiredProp]) { return new Error("The prop `".concat(propFullNameSafe, "` of ") + "`".concat(componentNameInError, "` can only be used together with the `").concat(requiredProp, "` prop.")); } return null; }; return requireProp; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/requirePropFactory.js /* harmony default export */ const utils_requirePropFactory = (requirePropFactory); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/setRef/setRef.js var setRef = __webpack_require__(9109); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/setRef.js /* harmony default export */ const utils_setRef = (setRef/* default */.Z); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/useEnhancedEffect.js var useEnhancedEffect = __webpack_require__(2754); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/useId.js var useId = __webpack_require__(4204); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/unsupportedProp/unsupportedProp.js function unsupportedProp(props, propName, componentName, location, propFullName) { if (true) { return null; } const propFullNameSafe = propFullName || propName; if (typeof props[propName] !== 'undefined') { return new Error("The prop `".concat(propFullNameSafe, "` is not supported. Please remove it.")); } return null; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/unsupportedProp.js /* harmony default export */ const utils_unsupportedProp = (unsupportedProp); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/useControlled.js + 1 modules var useControlled = __webpack_require__(6559); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/useEventCallback.js var useEventCallback = __webpack_require__(1469); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/useForkRef.js var useForkRef = __webpack_require__(8689); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/useIsFocusVisible.js var useIsFocusVisible = __webpack_require__(7541); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/index.js 'use client'; // TODO: remove this export once ClassNameGenerator is stable // eslint-disable-next-line @typescript-eslint/naming-convention const unstable_ClassNameGenerator = { configure: generator => { if (false) {} ClassNameGenerator/* default */.Z.configure(generator); } }; /***/ }), /***/ 2829: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: () => (/* binding */ utils_isMuiElement) }); // EXTERNAL MODULE: ./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js var react = __webpack_require__(7948); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/isMuiElement/isMuiElement.js function isMuiElement(element, muiNames) { var _muiName, _element$type; return /*#__PURE__*/react.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45 // eslint-disable-next-line no-underscore-dangle (_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName) !== -1; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/isMuiElement.js /* harmony default export */ const utils_isMuiElement = (isMuiElement); /***/ }), /***/ 9259: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _mui_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1563); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_mui_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z); /***/ }), /***/ 6879: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _mui_utils_ownerWindow__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6029); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_mui_utils_ownerWindow__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z); /***/ }), /***/ 6559: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: () => (/* binding */ utils_useControlled) }); // EXTERNAL MODULE: ./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js var react = __webpack_require__(7948); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/useControlled/useControlled.js 'use client'; /* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */ function useControlled(_ref) { let { controlled, default: defaultProp, name, state = 'value' } = _ref; // isControlled is ignored in the hook dependency lists as it should never change. const { current: isControlled } = react.useRef(controlled !== undefined); const [valueState, setValue] = react.useState(defaultProp); const value = isControlled ? controlled : valueState; if (false) {} const setValueIfUncontrolled = react.useCallback(newValue => { if (!isControlled) { setValue(newValue); } }, []); return [value, setValueIfUncontrolled]; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+material@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotio_d9048b84de05bb23a91868a7ef37c0cc/node_modules/@mui/material/utils/useControlled.js 'use client'; /* harmony default export */ const utils_useControlled = (useControlled); /***/ }), /***/ 2754: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _mui_utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4536); 'use client'; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_mui_utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z); /***/ }), /***/ 1469: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _mui_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9210); 'use client'; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_mui_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z); /***/ }), /***/ 8689: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _mui_utils_useForkRef__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4114); 'use client'; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_mui_utils_useForkRef__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z); /***/ }), /***/ 4204: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _mui_utils_useId__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2179); 'use client'; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_mui_utils_useId__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z); /***/ }), /***/ 7541: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _mui_utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3185); 'use client'; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_mui_utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z); /***/ }), /***/ 9450: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ GlobalStyles) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7948); /* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2150); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7394); 'use client'; function isEmpty(obj) { return obj === undefined || obj === null || Object.keys(obj).length === 0; } function GlobalStyles(props) { const { styles, defaultTheme = {} } = props; const globalStyles = typeof styles === 'function' ? themeInput => styles(isEmpty(themeInput) ? defaultTheme : themeInput) : styles; return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_emotion_react__WEBPACK_IMPORTED_MODULE_2__/* .Global */ .xB, { styles: globalStyles }); } false ? 0 : void 0; /***/ }), /***/ 5190: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { GlobalStyles: () => (/* reexport */ GlobalStyles/* default */.Z), StyledEngineProvider: () => (/* reexport */ StyledEngineProvider), ThemeContext: () => (/* reexport */ emotion_element_c39617d8_browser_esm.T), css: () => (/* reexport */ emotion_react_browser_esm/* css */.iv), "default": () => (/* binding */ styled), internal_processStyles: () => (/* binding */ internal_processStyles), keyframes: () => (/* reexport */ emotion_react_browser_esm/* keyframes */.F4) }); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@babel+runtime@7.22.15/node_modules/@babel/runtime/helpers/esm/extends.js function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } // EXTERNAL MODULE: ./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js var react = __webpack_require__(7948); // EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+memoize@0.8.1/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js var emotion_memoize_esm = __webpack_require__(7506); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@emotion+is-prop-valid@1.2.1/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23 var isPropValid = /* #__PURE__ */(0,emotion_memoize_esm/* default */.Z)(function (prop) { return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 /* o */ && prop.charCodeAt(1) === 110 /* n */ && prop.charCodeAt(2) < 91; } /* Z+1 */); // EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0/node_modules/@emotion/react/dist/emotion-element-c39617d8.browser.esm.js var emotion_element_c39617d8_browser_esm = __webpack_require__(2412); // EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+utils@1.2.1/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js var emotion_utils_browser_esm = __webpack_require__(1443); // EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+serialize@1.1.2/node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js + 2 modules var emotion_serialize_browser_esm = __webpack_require__(7073); // EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+use-insertion-effect-with-fallbacks@1.0.1_react@18.2.0/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js var emotion_use_insertion_effect_with_fallbacks_browser_esm = __webpack_require__(122); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@emotion+styled@11.11.0_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@types+react@18.2.79_react@18.2.0/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js var testOmitPropsOnStringTag = isPropValid; var testOmitPropsOnComponent = function testOmitPropsOnComponent(key) { return key !== 'theme'; }; var getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) { return typeof tag === 'string' && // 96 is one less than the char code // for "a" so this is checking that // it's a lowercase character tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent; }; var composeShouldForwardProps = function composeShouldForwardProps(tag, options, isReal) { var shouldForwardProp; if (options) { var optionsShouldForwardProp = options.shouldForwardProp; shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName) { return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName); } : optionsShouldForwardProp; } if (typeof shouldForwardProp !== 'function' && isReal) { shouldForwardProp = tag.__emotion_forwardProp; } return shouldForwardProp; }; var ILLEGAL_ESCAPE_SEQUENCE_ERROR = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences"; var Insertion = function Insertion(_ref) { var cache = _ref.cache, serialized = _ref.serialized, isStringTag = _ref.isStringTag; (0,emotion_utils_browser_esm/* registerStyles */.hC)(cache, serialized, isStringTag); (0,emotion_use_insertion_effect_with_fallbacks_browser_esm/* useInsertionEffectAlwaysWithSyncFallback */.L)(function () { return (0,emotion_utils_browser_esm/* insertStyles */.My)(cache, serialized, isStringTag); }); return null; }; var createStyled = function createStyled(tag, options) { if (false) {} var isReal = tag.__emotion_real === tag; var baseTag = isReal && tag.__emotion_base || tag; var identifierName; var targetClassName; if (options !== undefined) { identifierName = options.label; targetClassName = options.target; } var shouldForwardProp = composeShouldForwardProps(tag, options, isReal); var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag); var shouldUseAs = !defaultShouldForwardProp('as'); return function () { var args = arguments; var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : []; if (identifierName !== undefined) { styles.push("label:" + identifierName + ";"); } if (args[0] == null || args[0].raw === undefined) { styles.push.apply(styles, args); } else { if (false) {} styles.push(args[0][0]); var len = args.length; var i = 1; for (; i < len; i++) { if (false) {} styles.push(args[i], args[0][i]); } } // $FlowFixMe: we need to cast StatelessFunctionalComponent to our PrivateStyledComponent class var Styled = (0,emotion_element_c39617d8_browser_esm.w)(function (props, cache, ref) { var FinalTag = shouldUseAs && props.as || baseTag; var className = ''; var classInterpolations = []; var mergedProps = props; if (props.theme == null) { mergedProps = {}; for (var key in props) { mergedProps[key] = props[key]; } mergedProps.theme = react.useContext(emotion_element_c39617d8_browser_esm.T); } if (typeof props.className === 'string') { className = (0,emotion_utils_browser_esm/* getRegisteredStyles */.fp)(cache.registered, classInterpolations, props.className); } else if (props.className != null) { className = props.className + " "; } var serialized = (0,emotion_serialize_browser_esm/* serializeStyles */.O)(styles.concat(classInterpolations), cache.registered, mergedProps); className += cache.key + "-" + serialized.name; if (targetClassName !== undefined) { className += " " + targetClassName; } var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp; var newProps = {}; for (var _key in props) { if (shouldUseAs && _key === 'as') continue; if ( // $FlowFixMe finalShouldForwardProp(_key)) { newProps[_key] = props[_key]; } } newProps.className = className; newProps.ref = ref; return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(Insertion, { cache: cache, serialized: serialized, isStringTag: typeof FinalTag === 'string' }), /*#__PURE__*/react.createElement(FinalTag, newProps)); }); Styled.displayName = identifierName !== undefined ? identifierName : "Styled(" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + ")"; Styled.defaultProps = tag.defaultProps; Styled.__emotion_real = Styled; Styled.__emotion_base = baseTag; Styled.__emotion_styles = styles; Styled.__emotion_forwardProp = shouldForwardProp; Object.defineProperty(Styled, 'toString', { value: function value() { if (targetClassName === undefined && "production" !== 'production') {} // $FlowFixMe: coerce undefined to string return "." + targetClassName; } }); Styled.withComponent = function (nextTag, nextOptions) { return createStyled(nextTag, _extends({}, options, nextOptions, { shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true) })).apply(void 0, styles); }; return Styled; }; }; ;// CONCATENATED MODULE: ./node_modules/.pnpm/@emotion+styled@11.11.0_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@types+react@18.2.79_react@18.2.0/node_modules/@emotion/styled/dist/emotion-styled.browser.esm.js var tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan']; var newStyled = createStyled.bind(); tags.forEach(function (tagName) { // $FlowFixMe: we can ignore this because its exposed type is defined by the CreateStyled type newStyled[tagName] = newStyled(tagName); }); // EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0/node_modules/@emotion/react/dist/emotion-react.browser.esm.js var emotion_react_browser_esm = __webpack_require__(2150); // EXTERNAL MODULE: ./node_modules/.pnpm/@emotion+cache@11.11.0/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js + 7 modules var emotion_cache_browser_esm = __webpack_require__(3029); // EXTERNAL MODULE: ./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js var jsx_runtime = __webpack_require__(7394); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+styled-engine@5.15.14_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@e_38b353972d011fd8524090cbc8c519bf/node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.js 'use client'; // prepend: true moves MUI styles to the top of the so they're loaded first. // It allows developers to easily override MUI styles with other styling solutions, like CSS modules. let cache; if (typeof document === 'object') { cache = (0,emotion_cache_browser_esm/* default */.Z)({ key: 'css', prepend: true }); } function StyledEngineProvider(props) { const { injectFirst, children } = props; return injectFirst && cache ? /*#__PURE__*/(0,jsx_runtime.jsx)(emotion_element_c39617d8_browser_esm.C, { value: cache, children: children }) : children; } false ? 0 : void 0; // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+styled-engine@5.15.14_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@e_38b353972d011fd8524090cbc8c519bf/node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles.js var GlobalStyles = __webpack_require__(9450); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+styled-engine@5.15.14_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@e_38b353972d011fd8524090cbc8c519bf/node_modules/@mui/styled-engine/index.js /** * @mui/styled-engine v5.15.14 * * @license MIT * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use client'; /* eslint-disable no-underscore-dangle */ function styled(tag, options) { const stylesFactory = newStyled(tag, options); if (false) {} return stylesFactory; } // eslint-disable-next-line @typescript-eslint/naming-convention const internal_processStyles = (tag, processor) => { // Emotion attaches all the styles as `__emotion_styles`. // Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186 if (Array.isArray(tag.__emotion_styles)) { tag.__emotion_styles = processor(tag.__emotion_styles); } }; /***/ }), /***/ 2686: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.Fq = alpha; __webpack_unused_export__ = blend; __webpack_unused_export__ = void 0; exports._j = darken; __webpack_unused_export__ = decomposeColor; exports._4 = emphasize; exports.mi = getContrastRatio; __webpack_unused_export__ = getLuminance; __webpack_unused_export__ = hexToRgb; __webpack_unused_export__ = hslToRgb; exports.$n = lighten; __webpack_unused_export__ = private_safeAlpha; __webpack_unused_export__ = void 0; __webpack_unused_export__ = private_safeDarken; __webpack_unused_export__ = private_safeEmphasize; __webpack_unused_export__ = private_safeLighten; __webpack_unused_export__ = recomposeColor; __webpack_unused_export__ = rgbToHex; var _formatMuiErrorMessage2 = _interopRequireDefault(__webpack_require__(3001)); var _clamp = _interopRequireDefault(__webpack_require__(5288)); /* eslint-disable @typescript-eslint/naming-convention */ /** * Returns a number whose value is limited to the given range. * @param {number} value The value to be clamped * @param {number} min The lower boundary of the output range * @param {number} max The upper boundary of the output range * @returns {number} A number in the range [min, max] */ function clampWrapper(value) { let min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; let max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; if (false) {} return (0, _clamp.default)(value, min, max); } /** * Converts a color from CSS hex format to CSS rgb format. * @param {string} color - Hex color, i.e. #nnn or #nnnnnn * @returns {string} A CSS rgb color string */ function hexToRgb(color) { color = color.slice(1); const re = new RegExp(".{1,".concat(color.length >= 6 ? 2 : 1, "}"), 'g'); let colors = color.match(re); if (colors && colors[0].length === 1) { colors = colors.map(n => n + n); } return colors ? "rgb".concat(colors.length === 4 ? 'a' : '', "(").concat(colors.map((n, index) => { return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000; }).join(', '), ")") : ''; } function intToHex(int) { const hex = int.toString(16); return hex.length === 1 ? "0".concat(hex) : hex; } /** * Returns an object with the type and values of a color. * * Note: Does not support rgb % values. * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color() * @returns {object} - A MUI color object: {type: string, values: number[]} */ function decomposeColor(color) { // Idempotent if (color.type) { return color; } if (color.charAt(0) === '#') { return decomposeColor(hexToRgb(color)); } const marker = color.indexOf('('); const type = color.substring(0, marker); if (['rgb', 'rgba', 'hsl', 'hsla', 'color'].indexOf(type) === -1) { throw new Error( false ? 0 : (0, _formatMuiErrorMessage2.default)(9, color)); } let values = color.substring(marker + 1, color.length - 1); let colorSpace; if (type === 'color') { values = values.split(' '); colorSpace = values.shift(); if (values.length === 4 && values[3].charAt(0) === '/') { values[3] = values[3].slice(1); } if (['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].indexOf(colorSpace) === -1) { throw new Error( false ? 0 : (0, _formatMuiErrorMessage2.default)(10, colorSpace)); } } else { values = values.split(','); } values = values.map(value => parseFloat(value)); return { type, values, colorSpace }; } /** * Returns a channel created from the input color. * * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color() * @returns {string} - The channel for the color, that can be used in rgba or hsla colors */ const colorChannel = color => { const decomposedColor = decomposeColor(color); return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.indexOf('hsl') !== -1 && idx !== 0 ? "".concat(val, "%") : val).join(' '); }; __webpack_unused_export__ = colorChannel; const private_safeColorChannel = (color, warning) => { try { return colorChannel(color); } catch (error) { if (warning && "production" !== 'production') {} return color; } }; /** * Converts a color object with type and values to a string. * @param {object} color - Decomposed color * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color' * @param {array} color.values - [n,n,n] or [n,n,n,n] * @returns {string} A CSS color string */ __webpack_unused_export__ = private_safeColorChannel; function recomposeColor(color) { const { type, colorSpace } = color; let { values } = color; if (type.indexOf('rgb') !== -1) { // Only convert the first 3 values to int (i.e. not alpha) values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n); } else if (type.indexOf('hsl') !== -1) { values[1] = "".concat(values[1], "%"); values[2] = "".concat(values[2], "%"); } if (type.indexOf('color') !== -1) { values = "".concat(colorSpace, " ").concat(values.join(' ')); } else { values = "".concat(values.join(', ')); } return "".concat(type, "(").concat(values, ")"); } /** * Converts a color from CSS rgb format to CSS hex format. * @param {string} color - RGB color, i.e. rgb(n, n, n) * @returns {string} A CSS rgb color string, i.e. #nnnnnn */ function rgbToHex(color) { // Idempotent if (color.indexOf('#') === 0) { return color; } const { values } = decomposeColor(color); return "#".concat(values.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join('')); } /** * Converts a color from hsl format to rgb format. * @param {string} color - HSL color values * @returns {string} rgb color values */ function hslToRgb(color) { color = decomposeColor(color); const { values } = color; const h = values[0]; const s = values[1] / 100; const l = values[2] / 100; const a = s * Math.min(l, 1 - l); const f = function (n) { let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (n + h / 30) % 12; return l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1); }; let type = 'rgb'; const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)]; if (color.type === 'hsla') { type += 'a'; rgb.push(values[3]); } return recomposeColor({ type, values: rgb }); } /** * The relative brightness of any point in a color space, * normalized to 0 for darkest black and 1 for lightest white. * * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color() * @returns {number} The relative brightness of the color in the range 0 - 1 */ function getLuminance(color) { color = decomposeColor(color); let rgb = color.type === 'hsl' || color.type === 'hsla' ? decomposeColor(hslToRgb(color)).values : color.values; rgb = rgb.map(val => { if (color.type !== 'color') { val /= 255; // normalized } return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4; }); // Truncate at 3 digits return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3)); } /** * Calculates the contrast ratio between two colors. * * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() * @returns {number} A contrast ratio value in the range 0 - 21. */ function getContrastRatio(foreground, background) { const lumA = getLuminance(foreground); const lumB = getLuminance(background); return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05); } /** * Sets the absolute transparency of a color. * Any existing alpha values are overwritten. * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color() * @param {number} value - value to set the alpha channel to in the range 0 - 1 * @returns {string} A CSS color string. Hex input values are returned as rgb */ function alpha(color, value) { color = decomposeColor(color); value = clampWrapper(value); if (color.type === 'rgb' || color.type === 'hsl') { color.type += 'a'; } if (color.type === 'color') { color.values[3] = "/".concat(value); } else { color.values[3] = value; } return recomposeColor(color); } function private_safeAlpha(color, value, warning) { try { return alpha(color, value); } catch (error) { if (warning && "production" !== 'production') {} return color; } } /** * Darkens a color. * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color() * @param {number} coefficient - multiplier in the range 0 - 1 * @returns {string} A CSS color string. Hex input values are returned as rgb */ function darken(color, coefficient) { color = decomposeColor(color); coefficient = clampWrapper(coefficient); if (color.type.indexOf('hsl') !== -1) { color.values[2] *= 1 - coefficient; } else if (color.type.indexOf('rgb') !== -1 || color.type.indexOf('color') !== -1) { for (let i = 0; i < 3; i += 1) { color.values[i] *= 1 - coefficient; } } return recomposeColor(color); } function private_safeDarken(color, coefficient, warning) { try { return darken(color, coefficient); } catch (error) { if (warning && "production" !== 'production') {} return color; } } /** * Lightens a color. * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color() * @param {number} coefficient - multiplier in the range 0 - 1 * @returns {string} A CSS color string. Hex input values are returned as rgb */ function lighten(color, coefficient) { color = decomposeColor(color); coefficient = clampWrapper(coefficient); if (color.type.indexOf('hsl') !== -1) { color.values[2] += (100 - color.values[2]) * coefficient; } else if (color.type.indexOf('rgb') !== -1) { for (let i = 0; i < 3; i += 1) { color.values[i] += (255 - color.values[i]) * coefficient; } } else if (color.type.indexOf('color') !== -1) { for (let i = 0; i < 3; i += 1) { color.values[i] += (1 - color.values[i]) * coefficient; } } return recomposeColor(color); } function private_safeLighten(color, coefficient, warning) { try { return lighten(color, coefficient); } catch (error) { if (warning && "production" !== 'production') {} return color; } } /** * Darken or lighten a color, depending on its luminance. * Light colors are darkened, dark colors are lightened. * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color() * @param {number} coefficient=0.15 - multiplier in the range 0 - 1 * @returns {string} A CSS color string. Hex input values are returned as rgb */ function emphasize(color) { let coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15; return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient); } function private_safeEmphasize(color, coefficient, warning) { try { return emphasize(color, coefficient); } catch (error) { if (warning && "production" !== 'production') {} return color; } } /** * Blend a transparent overlay color with a background color, resulting in a single * RGB color. * @param {string} background - CSS color * @param {string} overlay - CSS color * @param {number} opacity - Opacity multiplier in the range 0 - 1 * @param {number} [gamma=1.0] - Gamma correction factor. For gamma-correct blending, 2.2 is usual. */ function blend(background, overlay, opacity) { let gamma = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1.0; const blendChannel = (b, o) => Math.round((b ** (1 / gamma) * (1 - opacity) + o ** (1 / gamma) * opacity) ** gamma); const backgroundColor = decomposeColor(background); const overlayColor = decomposeColor(overlay); const rgb = [blendChannel(backgroundColor.values[0], overlayColor.values[0]), blendChannel(backgroundColor.values[1], overlayColor.values[1]), blendChannel(backgroundColor.values[2], overlayColor.values[2])]; return recomposeColor({ type: 'rgb', values: rgb }); } /***/ }), /***/ 3952: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; var _interopRequireDefault = __webpack_require__(3894); __webpack_unused_export__ = ({ value: true }); exports.ZP = createStyled; __webpack_unused_export__ = shouldForwardProp; __webpack_unused_export__ = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(4708)); var _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(3364)); var _styledEngine = _interopRequireWildcard(__webpack_require__(5190)); var _deepmerge = __webpack_require__(9499); var _capitalize = _interopRequireDefault(__webpack_require__(6814)); var _getDisplayName = _interopRequireDefault(__webpack_require__(8853)); var _createTheme = _interopRequireDefault(__webpack_require__(7553)); var _styleFunctionSx = _interopRequireDefault(__webpack_require__(7168)); const _excluded = ["ownerState"], _excluded2 = ["variants"], _excluded3 = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"]; /* eslint-disable no-underscore-dangle */ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } function isEmpty(obj) { return Object.keys(obj).length === 0; } // https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40 function isStringTag(tag) { return typeof tag === 'string' && // 96 is one less than the char code // for "a" so this is checking that // it's a lowercase character tag.charCodeAt(0) > 96; } // Update /system/styled/#api in case if this changes function shouldForwardProp(prop) { return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as'; } const systemDefaultTheme = __webpack_unused_export__ = (0, _createTheme.default)(); const lowercaseFirstLetter = string => { if (!string) { return string; } return string.charAt(0).toLowerCase() + string.slice(1); }; function resolveTheme(_ref2) { let { defaultTheme, theme, themeId } = _ref2; return isEmpty(theme) ? defaultTheme : theme[themeId] || theme; } function defaultOverridesResolver(slot) { if (!slot) { return null; } return (props, styles) => styles[slot]; } function processStyleArg(callableStyle, _ref) { let { ownerState } = _ref, props = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded); const resolvedStylesArg = typeof callableStyle === 'function' ? callableStyle((0, _extends2.default)({ ownerState }, props)) : callableStyle; if (Array.isArray(resolvedStylesArg)) { return resolvedStylesArg.flatMap(resolvedStyle => processStyleArg(resolvedStyle, (0, _extends2.default)({ ownerState }, props))); } if (!!resolvedStylesArg && typeof resolvedStylesArg === 'object' && Array.isArray(resolvedStylesArg.variants)) { const { variants = [] } = resolvedStylesArg, otherStyles = (0, _objectWithoutPropertiesLoose2.default)(resolvedStylesArg, _excluded2); let result = otherStyles; variants.forEach(variant => { let isMatch = true; if (typeof variant.props === 'function') { isMatch = variant.props((0, _extends2.default)({ ownerState }, props, ownerState)); } else { Object.keys(variant.props).forEach(key => { if ((ownerState == null ? void 0 : ownerState[key]) !== variant.props[key] && props[key] !== variant.props[key]) { isMatch = false; } }); } if (isMatch) { if (!Array.isArray(result)) { result = [result]; } result.push(typeof variant.style === 'function' ? variant.style((0, _extends2.default)({ ownerState }, props, ownerState)) : variant.style); } }); return result; } return resolvedStylesArg; } function createStyled() { let input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; const { themeId, defaultTheme = systemDefaultTheme, rootShouldForwardProp = shouldForwardProp, slotShouldForwardProp = shouldForwardProp } = input; const systemSx = props => { return (0, _styleFunctionSx.default)((0, _extends2.default)({}, props, { theme: resolveTheme((0, _extends2.default)({}, props, { defaultTheme, themeId })) })); }; systemSx.__mui_systemSx = true; return function (tag) { let inputOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; // Filter out the `sx` style function from the previous styled component to prevent unnecessary styles generated by the composite components. (0, _styledEngine.internal_processStyles)(tag, styles => styles.filter(style => !(style != null && style.__mui_systemSx))); const { name: componentName, slot: componentSlot, skipVariantsResolver: inputSkipVariantsResolver, skipSx: inputSkipSx, // TODO v6: remove `lowercaseFirstLetter()` in the next major release // For more details: https://github.com/mui/material-ui/pull/37908 overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot)) } = inputOptions, options = (0, _objectWithoutPropertiesLoose2.default)(inputOptions, _excluded3); // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots. const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver : // TODO v6: remove `Root` in the next major release // For more details: https://github.com/mui/material-ui/pull/37908 componentSlot && componentSlot !== 'Root' && componentSlot !== 'root' || false; const skipSx = inputSkipSx || false; let label; if (false) {} let shouldForwardPropOption = shouldForwardProp; // TODO v6: remove `Root` in the next major release // For more details: https://github.com/mui/material-ui/pull/37908 if (componentSlot === 'Root' || componentSlot === 'root') { shouldForwardPropOption = rootShouldForwardProp; } else if (componentSlot) { // any other slot specified shouldForwardPropOption = slotShouldForwardProp; } else if (isStringTag(tag)) { // for string (html) tag, preserve the behavior in emotion & styled-components. shouldForwardPropOption = undefined; } const defaultStyledResolver = (0, _styledEngine.default)(tag, (0, _extends2.default)({ shouldForwardProp: shouldForwardPropOption, label }, options)); const transformStyleArg = stylesArg => { // On the server Emotion doesn't use React.forwardRef for creating components, so the created // component stays as a function. This condition makes sure that we do not interpolate functions // which are basically components used as a selectors. if (typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg || (0, _deepmerge.isPlainObject)(stylesArg)) { return props => processStyleArg(stylesArg, (0, _extends2.default)({}, props, { theme: resolveTheme({ theme: props.theme, defaultTheme, themeId }) })); } return stylesArg; }; const muiStyledResolver = function (styleArg) { let transformedStyleArg = transformStyleArg(styleArg); for (var _len = arguments.length, expressions = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { expressions[_key - 1] = arguments[_key]; } const expressionsWithDefaultTheme = expressions ? expressions.map(transformStyleArg) : []; if (componentName && overridesResolver) { expressionsWithDefaultTheme.push(props => { const theme = resolveTheme((0, _extends2.default)({}, props, { defaultTheme, themeId })); if (!theme.components || !theme.components[componentName] || !theme.components[componentName].styleOverrides) { return null; } const styleOverrides = theme.components[componentName].styleOverrides; const resolvedStyleOverrides = {}; // TODO: v7 remove iteration and use `resolveStyleArg(styleOverrides[slot])` directly Object.entries(styleOverrides).forEach(_ref3 => { let [slotKey, slotStyle] = _ref3; resolvedStyleOverrides[slotKey] = processStyleArg(slotStyle, (0, _extends2.default)({}, props, { theme })); }); return overridesResolver(props, resolvedStyleOverrides); }); } if (componentName && !skipVariantsResolver) { expressionsWithDefaultTheme.push(props => { var _theme$components; const theme = resolveTheme((0, _extends2.default)({}, props, { defaultTheme, themeId })); const themeVariants = theme == null || (_theme$components = theme.components) == null || (_theme$components = _theme$components[componentName]) == null ? void 0 : _theme$components.variants; return processStyleArg({ variants: themeVariants }, (0, _extends2.default)({}, props, { theme })); }); } if (!skipSx) { expressionsWithDefaultTheme.push(systemSx); } const numOfCustomFnsApplied = expressionsWithDefaultTheme.length - expressions.length; if (Array.isArray(styleArg) && numOfCustomFnsApplied > 0) { const placeholders = new Array(numOfCustomFnsApplied).fill(''); // If the type is array, than we need to add placeholders in the template for the overrides, variants and the sx styles. transformedStyleArg = [...styleArg, ...placeholders]; transformedStyleArg.raw = [...styleArg.raw, ...placeholders]; } const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme); if (false) {} if (tag.muiName) { Component.muiName = tag.muiName; } return Component; }; if (defaultStyledResolver.withConfig) { muiStyledResolver.withConfig = defaultStyledResolver.withConfig; } return muiStyledResolver; }; } /***/ }), /***/ 9744: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ L7: () => (/* binding */ removeUnusedBreakpoints), /* harmony export */ P$: () => (/* binding */ resolveBreakpointValues), /* harmony export */ VO: () => (/* binding */ values), /* harmony export */ W8: () => (/* binding */ createEmptyBreakpointObject), /* harmony export */ dt: () => (/* binding */ mergeBreakpointsInOrder), /* harmony export */ k9: () => (/* binding */ handleBreakpoints) /* harmony export */ }); /* unused harmony export computeBreakpointsBase */ /* harmony import */ var _mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8836); // The breakpoint **start** at this value. // For instance with the first breakpoint xs: [xs, sm[. const values = { xs: 0, // phone sm: 600, // tablet md: 900, // small laptop lg: 1200, // desktop xl: 1536 // large screen }; const defaultBreakpoints = { // Sorted ASC by size. That's important. // It can't be configured as it's used statically for propTypes. keys: ['xs', 'sm', 'md', 'lg', 'xl'], up: key => "@media (min-width:".concat(values[key], "px)") }; function handleBreakpoints(props, propValue, styleFromPropValue) { const theme = props.theme || {}; if (Array.isArray(propValue)) { const themeBreakpoints = theme.breakpoints || defaultBreakpoints; return propValue.reduce((acc, item, index) => { acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]); return acc; }, {}); } if (typeof propValue === 'object') { const themeBreakpoints = theme.breakpoints || defaultBreakpoints; return Object.keys(propValue).reduce((acc, breakpoint) => { // key is breakpoint if (Object.keys(themeBreakpoints.values || values).indexOf(breakpoint) !== -1) { const mediaKey = themeBreakpoints.up(breakpoint); acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint); } else { const cssKey = breakpoint; acc[cssKey] = propValue[cssKey]; } return acc; }, {}); } const output = styleFromPropValue(propValue); return output; } function breakpoints(styleFunction) { // false positive // eslint-disable-next-line react/function-component-definition const newStyleFunction = props => { const theme = props.theme || {}; const base = styleFunction(props); const themeBreakpoints = theme.breakpoints || defaultBreakpoints; const extended = themeBreakpoints.keys.reduce((acc, key) => { if (props[key]) { acc = acc || {}; acc[themeBreakpoints.up(key)] = styleFunction(_extends({ theme }, props[key])); } return acc; }, null); return merge(base, extended); }; newStyleFunction.propTypes = false ? 0 : {}; newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl', ...styleFunction.filterProps]; return newStyleFunction; } function createEmptyBreakpointObject() { let breakpointsInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var _breakpointsInput$key; const breakpointsInOrder = (_breakpointsInput$key = breakpointsInput.keys) == null ? void 0 : _breakpointsInput$key.reduce((acc, key) => { const breakpointStyleKey = breakpointsInput.up(key); acc[breakpointStyleKey] = {}; return acc; }, {}); return breakpointsInOrder || {}; } function removeUnusedBreakpoints(breakpointKeys, style) { return breakpointKeys.reduce((acc, key) => { const breakpointOutput = acc[key]; const isBreakpointUnused = !breakpointOutput || Object.keys(breakpointOutput).length === 0; if (isBreakpointUnused) { delete acc[key]; } return acc; }, style); } function mergeBreakpointsInOrder(breakpointsInput) { const emptyBreakpoints = createEmptyBreakpointObject(breakpointsInput); for (var _len = arguments.length, styles = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { styles[_key - 1] = arguments[_key]; } const mergedOutput = [emptyBreakpoints, ...styles].reduce((prev, next) => (0,_mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(prev, next), {}); return removeUnusedBreakpoints(Object.keys(emptyBreakpoints), mergedOutput); } // compute base for responsive values; e.g., // [1,2,3] => {xs: true, sm: true, md: true} // {xs: 1, sm: 2, md: 3} => {xs: true, sm: true, md: true} function computeBreakpointsBase(breakpointValues, themeBreakpoints) { // fixed value if (typeof breakpointValues !== 'object') { return {}; } const base = {}; const breakpointsKeys = Object.keys(themeBreakpoints); if (Array.isArray(breakpointValues)) { breakpointsKeys.forEach((breakpoint, i) => { if (i < breakpointValues.length) { base[breakpoint] = true; } }); } else { breakpointsKeys.forEach(breakpoint => { if (breakpointValues[breakpoint] != null) { base[breakpoint] = true; } }); } return base; } function resolveBreakpointValues(_ref) { let { values: breakpointValues, breakpoints: themeBreakpoints, base: customBase } = _ref; const base = customBase || computeBreakpointsBase(breakpointValues, themeBreakpoints); const keys = Object.keys(base); if (keys.length === 0) { return breakpointValues; } let previous; return keys.reduce((acc, breakpoint, i) => { if (Array.isArray(breakpointValues)) { acc[breakpoint] = breakpointValues[i] != null ? breakpointValues[i] : breakpointValues[previous]; previous = i; } else if (typeof breakpointValues === 'object') { acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous]; previous = breakpoint; } else { acc[breakpoint] = breakpointValues; } return acc; }, {}); } /* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (breakpoints))); /***/ }), /***/ 1900: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ applyStyles) /* harmony export */ }); /** * A universal utility to style components with multiple color modes. Always use it from the theme object. * It works with: * - [Basic theme](https://mui.com/material-ui/customization/dark-mode/) * - [CSS theme variables](https://mui.com/material-ui/experimental-api/css-theme-variables/overview/) * - Zero-runtime engine * * Tips: Use an array over object spread and place `theme.applyStyles()` last. * * ✅ [{ background: '#e5e5e5' }, theme.applyStyles('dark', { background: '#1c1c1c' })] * * 🚫 { background: '#e5e5e5', ...theme.applyStyles('dark', { background: '#1c1c1c' })} * * @example * 1. using with `styled`: * ```jsx * const Component = styled('div')(({ theme }) => [ * { background: '#e5e5e5' }, * theme.applyStyles('dark', { * background: '#1c1c1c', * color: '#fff', * }), * ]); * ``` * * @example * 2. using with `sx` prop: * ```jsx * [ * { background: '#e5e5e5' }, * theme.applyStyles('dark', { * background: '#1c1c1c', * color: '#fff', * }), * ]} * /> * ``` * * @example * 3. theming a component: * ```jsx * extendTheme({ * components: { * MuiButton: { * styleOverrides: { * root: ({ theme }) => [ * { background: '#e5e5e5' }, * theme.applyStyles('dark', { * background: '#1c1c1c', * color: '#fff', * }), * ], * }, * } * } * }) *``` */ function applyStyles(key, styles) { // @ts-expect-error this is 'any' type const theme = this; if (theme.vars && typeof theme.getColorSchemeSelector === 'function') { // If CssVarsProvider is used as a provider, // returns '* :where([data-mui-color-scheme="light|dark"]) &' const selector = theme.getColorSchemeSelector(key).replace(/(\[[^\]]+\])/, '*:where($1)'); return { [selector]: styles }; } if (theme.palette.mode === key) { return styles; } return {}; } /***/ }), /***/ 3776: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ createBreakpoints) /* harmony export */ }); /* unused harmony export breakpointKeys */ /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3031); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1010); const _excluded = ["values", "unit", "step"]; // Sorted ASC by size. That's important. // It can't be configured as it's used statically for propTypes. const breakpointKeys = (/* unused pure expression or super */ null && (['xs', 'sm', 'md', 'lg', 'xl'])); const sortBreakpointsValues = values => { const breakpointsAsArray = Object.keys(values).map(key => ({ key, val: values[key] })) || []; // Sort in ascending order breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val); return breakpointsAsArray.reduce((acc, obj) => { return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)({}, acc, { [obj.key]: obj.val }); }, {}); }; // Keep in mind that @media is inclusive by the CSS specification. function createBreakpoints(breakpoints) { const { // The breakpoint **start** at this value. // For instance with the first breakpoint xs: [xs, sm). values = { xs: 0, // phone sm: 600, // tablet md: 900, // small laptop lg: 1200, // desktop xl: 1536 // large screen }, unit = 'px', step = 5 } = breakpoints, other = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(breakpoints, _excluded); const sortedValues = sortBreakpointsValues(values); const keys = Object.keys(sortedValues); function up(key) { const value = typeof values[key] === 'number' ? values[key] : key; return "@media (min-width:".concat(value).concat(unit, ")"); } function down(key) { const value = typeof values[key] === 'number' ? values[key] : key; return "@media (max-width:".concat(value - step / 100).concat(unit, ")"); } function between(start, end) { const endIndex = keys.indexOf(end); return "@media (min-width:".concat(typeof values[start] === 'number' ? values[start] : start).concat(unit, ") and ") + "(max-width:".concat((endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100).concat(unit, ")"); } function only(key) { if (keys.indexOf(key) + 1 < keys.length) { return between(key, keys[keys.indexOf(key) + 1]); } return up(key); } function not(key) { // handle first and last key separately, for better readability const keyIndex = keys.indexOf(key); if (keyIndex === 0) { return up(keys[1]); } if (keyIndex === keys.length - 1) { return down(keys[keyIndex]); } return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and'); } return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)({ keys, values: sortedValues, up, down, between, only, not, unit }, other); } /***/ }), /***/ 3985: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: () => (/* binding */ createTheme_createTheme) }); // EXTERNAL MODULE: ./node_modules/.pnpm/@babel+runtime@7.24.4/node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(1010); // EXTERNAL MODULE: ./node_modules/.pnpm/@babel+runtime@7.24.4/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js var objectWithoutPropertiesLoose = __webpack_require__(3031); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/deepmerge/deepmerge.js var deepmerge = __webpack_require__(8836); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/createTheme/createBreakpoints.js var createBreakpoints = __webpack_require__(3776); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/createTheme/shape.js const shape = { borderRadius: 4 }; /* harmony default export */ const createTheme_shape = (shape); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/spacing.js + 1 modules var esm_spacing = __webpack_require__(4275); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/createTheme/createSpacing.js // The different signatures imply different meaning for their arguments that can't be expressed structurally. // We express the difference with variable names. function createSpacing() { let spacingInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 8; // Already transformed. if (spacingInput.mui) { return spacingInput; } // Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout. // Smaller components, such as icons, can align to a 4dp grid. // https://m2.material.io/design/layout/understanding-layout.html const transform = (0,esm_spacing/* createUnarySpacing */.hB)({ spacing: spacingInput }); const spacing = function () { for (var _len = arguments.length, argsInput = new Array(_len), _key = 0; _key < _len; _key++) { argsInput[_key] = arguments[_key]; } if (false) {} const args = argsInput.length === 0 ? [1] : argsInput; return args.map(argument => { const output = transform(argument); return typeof output === 'number' ? "".concat(output, "px") : output; }).join(' '); }; spacing.mui = true; return spacing; } // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js var styleFunctionSx = __webpack_require__(1048); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js + 5 modules var defaultSxConfig = __webpack_require__(1524); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/createTheme/applyStyles.js var applyStyles = __webpack_require__(1900); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/createTheme/createTheme.js const _excluded = ["breakpoints", "palette", "spacing", "shape"]; function createTheme() { let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; const { breakpoints: breakpointsInput = {}, palette: paletteInput = {}, spacing: spacingInput, shape: shapeInput = {} } = options, other = (0,objectWithoutPropertiesLoose/* default */.Z)(options, _excluded); const breakpoints = (0,createBreakpoints/* default */.Z)(breakpointsInput); const spacing = createSpacing(spacingInput); let muiTheme = (0,deepmerge/* default */.Z)({ breakpoints, direction: 'ltr', components: {}, // Inject component definitions. palette: (0,esm_extends/* default */.Z)({ mode: 'light' }, paletteInput), spacing, shape: (0,esm_extends/* default */.Z)({}, createTheme_shape, shapeInput) }, other); muiTheme.applyStyles = applyStyles/* default */.Z; for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } muiTheme = args.reduce((acc, argument) => (0,deepmerge/* default */.Z)(acc, argument), muiTheme); muiTheme.unstable_sxConfig = (0,esm_extends/* default */.Z)({}, defaultSxConfig/* default */.Z, other == null ? void 0 : other.unstable_sxConfig); muiTheme.unstable_sx = function sx(props) { return (0,styleFunctionSx/* default */.Z)({ sx: props, theme: this }); }; return muiTheme; } /* harmony default export */ const createTheme_createTheme = (createTheme); /***/ }), /***/ 7553: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* reexport safe */ _createTheme__WEBPACK_IMPORTED_MODULE_0__.Z), /* harmony export */ private_createBreakpoints: () => (/* reexport safe */ _createBreakpoints__WEBPACK_IMPORTED_MODULE_1__.Z), /* harmony export */ unstable_applyStyles: () => (/* reexport safe */ _applyStyles__WEBPACK_IMPORTED_MODULE_2__.Z) /* harmony export */ }); /* harmony import */ var _createTheme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3985); /* harmony import */ var _createBreakpoints__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3776); /* harmony import */ var _applyStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1900); /***/ }), /***/ 3287: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8836); function merge(acc, item) { if (!item) { return acc; } return (0,_mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(acc, item, { clone: false // No need to clone deep, it's way faster. }); } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (merge); /***/ }), /***/ 4275: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { hB: () => (/* binding */ createUnarySpacing), eI: () => (/* binding */ createUnaryUnit), NA: () => (/* binding */ getValue), e6: () => (/* binding */ margin), o3: () => (/* binding */ padding) }); // UNUSED EXPORTS: default, getStyleFromPropValue, marginKeys, paddingKeys // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/breakpoints.js var breakpoints = __webpack_require__(9744); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/style.js var style = __webpack_require__(6634); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/merge.js var merge = __webpack_require__(3287); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/memoize.js function memoize(fn) { const cache = {}; return arg => { if (cache[arg] === undefined) { cache[arg] = fn(arg); } return cache[arg]; }; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/spacing.js const properties = { m: 'margin', p: 'padding' }; const directions = { t: 'Top', r: 'Right', b: 'Bottom', l: 'Left', x: ['Left', 'Right'], y: ['Top', 'Bottom'] }; const aliases = { marginX: 'mx', marginY: 'my', paddingX: 'px', paddingY: 'py' }; // memoize() impact: // From 300,000 ops/sec // To 350,000 ops/sec const getCssProperties = memoize(prop => { // It's not a shorthand notation. if (prop.length > 2) { if (aliases[prop]) { prop = aliases[prop]; } else { return [prop]; } } const [a, b] = prop.split(''); const property = properties[a]; const direction = directions[b] || ''; return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction]; }); const marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd']; const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd']; const spacingKeys = [...marginKeys, ...paddingKeys]; function createUnaryUnit(theme, themeKey, defaultValue, propName) { var _getPath; const themeSpacing = (_getPath = (0,style/* getPath */.DW)(theme, themeKey, false)) != null ? _getPath : defaultValue; if (typeof themeSpacing === 'number') { return abs => { if (typeof abs === 'string') { return abs; } if (false) {} return themeSpacing * abs; }; } if (Array.isArray(themeSpacing)) { return abs => { if (typeof abs === 'string') { return abs; } if (false) {} return themeSpacing[abs]; }; } if (typeof themeSpacing === 'function') { return themeSpacing; } if (false) {} return () => undefined; } function createUnarySpacing(theme) { return createUnaryUnit(theme, 'spacing', 8, 'spacing'); } function getValue(transformer, propValue) { if (typeof propValue === 'string' || propValue == null) { return propValue; } const abs = Math.abs(propValue); const transformed = transformer(abs); if (propValue >= 0) { return transformed; } if (typeof transformed === 'number') { return -transformed; } return "-".concat(transformed); } function getStyleFromPropValue(cssProperties, transformer) { return propValue => cssProperties.reduce((acc, cssProperty) => { acc[cssProperty] = getValue(transformer, propValue); return acc; }, {}); } function resolveCssProperty(props, keys, prop, transformer) { // Using a hash computation over an array iteration could be faster, but with only 28 items, // it's doesn't worth the bundle size. if (keys.indexOf(prop) === -1) { return null; } const cssProperties = getCssProperties(prop); const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer); const propValue = props[prop]; return (0,breakpoints/* handleBreakpoints */.k9)(props, propValue, styleFromPropValue); } function spacing_style(props, keys) { const transformer = createUnarySpacing(props.theme); return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(merge/* default */.Z, {}); } function margin(props) { return spacing_style(props, marginKeys); } margin.propTypes = false ? 0 : {}; margin.filterProps = marginKeys; function padding(props) { return spacing_style(props, paddingKeys); } padding.propTypes = false ? 0 : {}; padding.filterProps = paddingKeys; function spacing(props) { return spacing_style(props, spacingKeys); } spacing.propTypes = false ? 0 : {}; spacing.filterProps = spacingKeys; /* harmony default export */ const esm_spacing = ((/* unused pure expression or super */ null && (spacing))); /***/ }), /***/ 6634: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ DW: () => (/* binding */ getPath), /* harmony export */ Jq: () => (/* binding */ getStyleValue), /* harmony export */ ZP: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _mui_utils_capitalize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4656); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9744); function getPath(obj, path) { let checkVars = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; if (!path || typeof path !== 'string') { return null; } // Check if CSS variables are used if (obj && obj.vars && checkVars) { const val = "vars.".concat(path).split('.').reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj); if (val != null) { return val; } } return path.split('.').reduce((acc, item) => { if (acc && acc[item] != null) { return acc[item]; } return null; }, obj); } function getStyleValue(themeMapping, transform, propValueFinal) { let userValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : propValueFinal; let value; if (typeof themeMapping === 'function') { value = themeMapping(propValueFinal); } else if (Array.isArray(themeMapping)) { value = themeMapping[propValueFinal] || userValue; } else { value = getPath(themeMapping, propValueFinal) || userValue; } if (transform) { value = transform(value, userValue, themeMapping); } return value; } function style(options) { const { prop, cssProperty = options.prop, themeKey, transform } = options; // false positive // eslint-disable-next-line react/function-component-definition const fn = props => { if (props[prop] == null) { return null; } const propValue = props[prop]; const theme = props.theme; const themeMapping = getPath(theme, themeKey) || {}; const styleFromPropValue = propValueFinal => { let value = getStyleValue(themeMapping, transform, propValueFinal); if (propValueFinal === value && typeof propValueFinal === 'string') { // Haven't found value value = getStyleValue(themeMapping, transform, "".concat(prop).concat(propValueFinal === 'default' ? '' : (0,_mui_utils_capitalize__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(propValueFinal)), propValueFinal); } if (cssProperty === false) { return value; } return { [cssProperty]: value }; }; return (0,_breakpoints__WEBPACK_IMPORTED_MODULE_1__/* .handleBreakpoints */ .k9)(props, propValue, styleFromPropValue); }; fn.propTypes = false ? 0 : {}; fn.filterProps = [prop]; return fn; } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (style); /***/ }), /***/ 1524: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: () => (/* binding */ styleFunctionSx_defaultSxConfig) }); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/spacing.js + 1 modules var spacing = __webpack_require__(4275); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/style.js var style = __webpack_require__(6634); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/merge.js var merge = __webpack_require__(3287); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/compose.js function compose() { for (var _len = arguments.length, styles = new Array(_len), _key = 0; _key < _len; _key++) { styles[_key] = arguments[_key]; } const handlers = styles.reduce((acc, style) => { style.filterProps.forEach(prop => { acc[prop] = style; }); return acc; }, {}); // false positive // eslint-disable-next-line react/function-component-definition const fn = props => { return Object.keys(props).reduce((acc, prop) => { if (handlers[prop]) { return (0,merge/* default */.Z)(acc, handlers[prop](props)); } return acc; }, {}); }; fn.propTypes = false ? 0 : {}; fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []); return fn; } /* harmony default export */ const esm_compose = (compose); // EXTERNAL MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/breakpoints.js var breakpoints = __webpack_require__(9744); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/borders.js function borderTransform(value) { if (typeof value !== 'number') { return value; } return "".concat(value, "px solid"); } function createBorderStyle(prop, transform) { return (0,style/* default */.ZP)({ prop, themeKey: 'borders', transform }); } const border = createBorderStyle('border', borderTransform); const borderTop = createBorderStyle('borderTop', borderTransform); const borderRight = createBorderStyle('borderRight', borderTransform); const borderBottom = createBorderStyle('borderBottom', borderTransform); const borderLeft = createBorderStyle('borderLeft', borderTransform); const borderColor = createBorderStyle('borderColor'); const borderTopColor = createBorderStyle('borderTopColor'); const borderRightColor = createBorderStyle('borderRightColor'); const borderBottomColor = createBorderStyle('borderBottomColor'); const borderLeftColor = createBorderStyle('borderLeftColor'); const outline = createBorderStyle('outline', borderTransform); const outlineColor = createBorderStyle('outlineColor'); // false positive // eslint-disable-next-line react/function-component-definition const borderRadius = props => { if (props.borderRadius !== undefined && props.borderRadius !== null) { const transformer = (0,spacing/* createUnaryUnit */.eI)(props.theme, 'shape.borderRadius', 4, 'borderRadius'); const styleFromPropValue = propValue => ({ borderRadius: (0,spacing/* getValue */.NA)(transformer, propValue) }); return (0,breakpoints/* handleBreakpoints */.k9)(props, props.borderRadius, styleFromPropValue); } return null; }; borderRadius.propTypes = false ? 0 : {}; borderRadius.filterProps = ['borderRadius']; const borders = esm_compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius, outline, outlineColor); /* harmony default export */ const esm_borders = ((/* unused pure expression or super */ null && (borders))); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/cssGrid.js // false positive // eslint-disable-next-line react/function-component-definition const gap = props => { if (props.gap !== undefined && props.gap !== null) { const transformer = (0,spacing/* createUnaryUnit */.eI)(props.theme, 'spacing', 8, 'gap'); const styleFromPropValue = propValue => ({ gap: (0,spacing/* getValue */.NA)(transformer, propValue) }); return (0,breakpoints/* handleBreakpoints */.k9)(props, props.gap, styleFromPropValue); } return null; }; gap.propTypes = false ? 0 : {}; gap.filterProps = ['gap']; // false positive // eslint-disable-next-line react/function-component-definition const columnGap = props => { if (props.columnGap !== undefined && props.columnGap !== null) { const transformer = (0,spacing/* createUnaryUnit */.eI)(props.theme, 'spacing', 8, 'columnGap'); const styleFromPropValue = propValue => ({ columnGap: (0,spacing/* getValue */.NA)(transformer, propValue) }); return (0,breakpoints/* handleBreakpoints */.k9)(props, props.columnGap, styleFromPropValue); } return null; }; columnGap.propTypes = false ? 0 : {}; columnGap.filterProps = ['columnGap']; // false positive // eslint-disable-next-line react/function-component-definition const rowGap = props => { if (props.rowGap !== undefined && props.rowGap !== null) { const transformer = (0,spacing/* createUnaryUnit */.eI)(props.theme, 'spacing', 8, 'rowGap'); const styleFromPropValue = propValue => ({ rowGap: (0,spacing/* getValue */.NA)(transformer, propValue) }); return (0,breakpoints/* handleBreakpoints */.k9)(props, props.rowGap, styleFromPropValue); } return null; }; rowGap.propTypes = false ? 0 : {}; rowGap.filterProps = ['rowGap']; const gridColumn = (0,style/* default */.ZP)({ prop: 'gridColumn' }); const gridRow = (0,style/* default */.ZP)({ prop: 'gridRow' }); const gridAutoFlow = (0,style/* default */.ZP)({ prop: 'gridAutoFlow' }); const gridAutoColumns = (0,style/* default */.ZP)({ prop: 'gridAutoColumns' }); const gridAutoRows = (0,style/* default */.ZP)({ prop: 'gridAutoRows' }); const gridTemplateColumns = (0,style/* default */.ZP)({ prop: 'gridTemplateColumns' }); const gridTemplateRows = (0,style/* default */.ZP)({ prop: 'gridTemplateRows' }); const gridTemplateAreas = (0,style/* default */.ZP)({ prop: 'gridTemplateAreas' }); const gridArea = (0,style/* default */.ZP)({ prop: 'gridArea' }); const grid = esm_compose(gap, columnGap, rowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea); /* harmony default export */ const cssGrid = ((/* unused pure expression or super */ null && (grid))); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/palette.js function paletteTransform(value, userValue) { if (userValue === 'grey') { return userValue; } return value; } const color = (0,style/* default */.ZP)({ prop: 'color', themeKey: 'palette', transform: paletteTransform }); const bgcolor = (0,style/* default */.ZP)({ prop: 'bgcolor', cssProperty: 'backgroundColor', themeKey: 'palette', transform: paletteTransform }); const backgroundColor = (0,style/* default */.ZP)({ prop: 'backgroundColor', themeKey: 'palette', transform: paletteTransform }); const palette = esm_compose(color, bgcolor, backgroundColor); /* harmony default export */ const esm_palette = ((/* unused pure expression or super */ null && (palette))); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/sizing.js function sizingTransform(value) { return value <= 1 && value !== 0 ? "".concat(value * 100, "%") : value; } const width = (0,style/* default */.ZP)({ prop: 'width', transform: sizingTransform }); const maxWidth = props => { if (props.maxWidth !== undefined && props.maxWidth !== null) { const styleFromPropValue = propValue => { var _props$theme, _props$theme2; const breakpoint = ((_props$theme = props.theme) == null || (_props$theme = _props$theme.breakpoints) == null || (_props$theme = _props$theme.values) == null ? void 0 : _props$theme[propValue]) || breakpoints/* values */.VO[propValue]; if (!breakpoint) { return { maxWidth: sizingTransform(propValue) }; } if (((_props$theme2 = props.theme) == null || (_props$theme2 = _props$theme2.breakpoints) == null ? void 0 : _props$theme2.unit) !== 'px') { return { maxWidth: "".concat(breakpoint).concat(props.theme.breakpoints.unit) }; } return { maxWidth: breakpoint }; }; return (0,breakpoints/* handleBreakpoints */.k9)(props, props.maxWidth, styleFromPropValue); } return null; }; maxWidth.filterProps = ['maxWidth']; const minWidth = (0,style/* default */.ZP)({ prop: 'minWidth', transform: sizingTransform }); const height = (0,style/* default */.ZP)({ prop: 'height', transform: sizingTransform }); const maxHeight = (0,style/* default */.ZP)({ prop: 'maxHeight', transform: sizingTransform }); const minHeight = (0,style/* default */.ZP)({ prop: 'minHeight', transform: sizingTransform }); const sizeWidth = (0,style/* default */.ZP)({ prop: 'size', cssProperty: 'width', transform: sizingTransform }); const sizeHeight = (0,style/* default */.ZP)({ prop: 'size', cssProperty: 'height', transform: sizingTransform }); const boxSizing = (0,style/* default */.ZP)({ prop: 'boxSizing' }); const sizing = esm_compose(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing); /* harmony default export */ const esm_sizing = ((/* unused pure expression or super */ null && (sizing))); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+system@5.15.15_@emotion+react@11.11.1_@types+react@18.2.79_react@18.2.0__@emotion+_c57ab6d9ade3633fb3ee97c5c0a1d690/node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js const defaultSxConfig = { // borders border: { themeKey: 'borders', transform: borderTransform }, borderTop: { themeKey: 'borders', transform: borderTransform }, borderRight: { themeKey: 'borders', transform: borderTransform }, borderBottom: { themeKey: 'borders', transform: borderTransform }, borderLeft: { themeKey: 'borders', transform: borderTransform }, borderColor: { themeKey: 'palette' }, borderTopColor: { themeKey: 'palette' }, borderRightColor: { themeKey: 'palette' }, borderBottomColor: { themeKey: 'palette' }, borderLeftColor: { themeKey: 'palette' }, outline: { themeKey: 'borders', transform: borderTransform }, outlineColor: { themeKey: 'palette' }, borderRadius: { themeKey: 'shape.borderRadius', style: borderRadius }, // palette color: { themeKey: 'palette', transform: paletteTransform }, bgcolor: { themeKey: 'palette', cssProperty: 'backgroundColor', transform: paletteTransform }, backgroundColor: { themeKey: 'palette', transform: paletteTransform }, // spacing p: { style: spacing/* padding */.o3 }, pt: { style: spacing/* padding */.o3 }, pr: { style: spacing/* padding */.o3 }, pb: { style: spacing/* padding */.o3 }, pl: { style: spacing/* padding */.o3 }, px: { style: spacing/* padding */.o3 }, py: { style: spacing/* padding */.o3 }, padding: { style: spacing/* padding */.o3 }, paddingTop: { style: spacing/* padding */.o3 }, paddingRight: { style: spacing/* padding */.o3 }, paddingBottom: { style: spacing/* padding */.o3 }, paddingLeft: { style: spacing/* padding */.o3 }, paddingX: { style: spacing/* padding */.o3 }, paddingY: { style: spacing/* padding */.o3 }, paddingInline: { style: spacing/* padding */.o3 }, paddingInlineStart: { style: spacing/* padding */.o3 }, paddingInlineEnd: { style: spacing/* padding */.o3 }, paddingBlock: { style: spacing/* padding */.o3 }, paddingBlockStart: { style: spacing/* padding */.o3 }, paddingBlockEnd: { style: spacing/* padding */.o3 }, m: { style: spacing/* margin */.e6 }, mt: { style: spacing/* margin */.e6 }, mr: { style: spacing/* margin */.e6 }, mb: { style: spacing/* margin */.e6 }, ml: { style: spacing/* margin */.e6 }, mx: { style: spacing/* margin */.e6 }, my: { style: spacing/* margin */.e6 }, margin: { style: spacing/* margin */.e6 }, marginTop: { style: spacing/* margin */.e6 }, marginRight: { style: spacing/* margin */.e6 }, marginBottom: { style: spacing/* margin */.e6 }, marginLeft: { style: spacing/* margin */.e6 }, marginX: { style: spacing/* margin */.e6 }, marginY: { style: spacing/* margin */.e6 }, marginInline: { style: spacing/* margin */.e6 }, marginInlineStart: { style: spacing/* margin */.e6 }, marginInlineEnd: { style: spacing/* margin */.e6 }, marginBlock: { style: spacing/* margin */.e6 }, marginBlockStart: { style: spacing/* margin */.e6 }, marginBlockEnd: { style: spacing/* margin */.e6 }, // display displayPrint: { cssProperty: false, transform: value => ({ '@media print': { display: value } }) }, display: {}, overflow: {}, textOverflow: {}, visibility: {}, whiteSpace: {}, // flexbox flexBasis: {}, flexDirection: {}, flexWrap: {}, justifyContent: {}, alignItems: {}, alignContent: {}, order: {}, flex: {}, flexGrow: {}, flexShrink: {}, alignSelf: {}, justifyItems: {}, justifySelf: {}, // grid gap: { style: gap }, rowGap: { style: rowGap }, columnGap: { style: columnGap }, gridColumn: {}, gridRow: {}, gridAutoFlow: {}, gridAutoColumns: {}, gridAutoRows: {}, gridTemplateColumns: {}, gridTemplateRows: {}, gridTemplateAreas: {}, gridArea: {}, // positions position: {}, zIndex: { themeKey: 'zIndex' }, top: {}, right: {}, bottom: {}, left: {}, // shadows boxShadow: { themeKey: 'shadows' }, // sizing width: { transform: sizingTransform }, maxWidth: { style: maxWidth }, minWidth: { transform: sizingTransform }, height: { transform: sizingTransform }, maxHeight: { transform: sizingTransform }, minHeight: { transform: sizingTransform }, boxSizing: {}, // typography fontFamily: { themeKey: 'typography' }, fontSize: { themeKey: 'typography' }, fontStyle: { themeKey: 'typography' }, fontWeight: { themeKey: 'typography' }, letterSpacing: {}, textTransform: {}, lineHeight: {}, textAlign: {}, typography: { cssProperty: false, themeKey: 'typography' } }; /* harmony default export */ const styleFunctionSx_defaultSxConfig = (defaultSxConfig); /***/ }), /***/ 416: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ extendSxProp) /* harmony export */ }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1010); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3031); /* harmony import */ var _mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8836); /* harmony import */ var _defaultSxConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1524); const _excluded = ["sx"]; const splitProps = props => { var _props$theme$unstable, _props$theme; const result = { systemProps: {}, otherProps: {} }; const config = (_props$theme$unstable = props == null || (_props$theme = props.theme) == null ? void 0 : _props$theme.unstable_sxConfig) != null ? _props$theme$unstable : _defaultSxConfig__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z; Object.keys(props).forEach(prop => { if (config[prop]) { result.systemProps[prop] = props[prop]; } else { result.otherProps[prop] = props[prop]; } }); return result; }; function extendSxProp(props) { const { sx: inSx } = props, other = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(props, _excluded); const { systemProps, otherProps } = splitProps(other); let finalSx; if (Array.isArray(inSx)) { finalSx = [systemProps, ...inSx]; } else if (typeof inSx === 'function') { finalSx = function () { const result = inSx(...arguments); if (!(0,_mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_2__/* .isPlainObject */ .P)(result)) { return systemProps; } return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)({}, systemProps, result); }; } else { finalSx = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)({}, systemProps, inSx); } return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)({}, otherProps, { sx: finalSx }); } /***/ }), /***/ 7168: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* reexport safe */ _styleFunctionSx__WEBPACK_IMPORTED_MODULE_0__.Z), /* harmony export */ extendSxProp: () => (/* reexport safe */ _extendSxProp__WEBPACK_IMPORTED_MODULE_1__.Z), /* harmony export */ unstable_createStyleFunctionSx: () => (/* reexport safe */ _styleFunctionSx__WEBPACK_IMPORTED_MODULE_0__.n), /* harmony export */ unstable_defaultSxConfig: () => (/* reexport safe */ _defaultSxConfig__WEBPACK_IMPORTED_MODULE_2__.Z) /* harmony export */ }); /* harmony import */ var _styleFunctionSx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1048); /* harmony import */ var _extendSxProp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(416); /* harmony import */ var _defaultSxConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1524); /***/ }), /***/ 1048: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__), /* harmony export */ n: () => (/* binding */ unstable_createStyleFunctionSx) /* harmony export */ }); /* harmony import */ var _mui_utils_capitalize__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4656); /* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3287); /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6634); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9744); /* harmony import */ var _defaultSxConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1524); function objectsHaveSameKeys() { for (var _len = arguments.length, objects = new Array(_len), _key = 0; _key < _len; _key++) { objects[_key] = arguments[_key]; } const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []); const union = new Set(allKeys); return objects.every(object => union.size === Object.keys(object).length); } function callIfFn(maybeFn, arg) { return typeof maybeFn === 'function' ? maybeFn(arg) : maybeFn; } // eslint-disable-next-line @typescript-eslint/naming-convention function unstable_createStyleFunctionSx() { function getThemeValue(prop, val, theme, config) { const props = { [prop]: val, theme }; const options = config[prop]; if (!options) { return { [prop]: val }; } const { cssProperty = prop, themeKey, transform, style } = options; if (val == null) { return null; } // TODO v6: remove, see https://github.com/mui/material-ui/pull/38123 if (themeKey === 'typography' && val === 'inherit') { return { [prop]: val }; } const themeMapping = (0,_style__WEBPACK_IMPORTED_MODULE_0__/* .getPath */ .DW)(theme, themeKey) || {}; if (style) { return style(props); } const styleFromPropValue = propValueFinal => { let value = (0,_style__WEBPACK_IMPORTED_MODULE_0__/* .getStyleValue */ .Jq)(themeMapping, transform, propValueFinal); if (propValueFinal === value && typeof propValueFinal === 'string') { // Haven't found value value = (0,_style__WEBPACK_IMPORTED_MODULE_0__/* .getStyleValue */ .Jq)(themeMapping, transform, "".concat(prop).concat(propValueFinal === 'default' ? '' : (0,_mui_utils_capitalize__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(propValueFinal)), propValueFinal); } if (cssProperty === false) { return value; } return { [cssProperty]: value }; }; return (0,_breakpoints__WEBPACK_IMPORTED_MODULE_2__/* .handleBreakpoints */ .k9)(props, val, styleFromPropValue); } function styleFunctionSx(props) { var _theme$unstable_sxCon; const { sx, theme = {} } = props || {}; if (!sx) { return null; // Emotion & styled-components will neglect null } const config = (_theme$unstable_sxCon = theme.unstable_sxConfig) != null ? _theme$unstable_sxCon : _defaultSxConfig__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z; /* * Receive `sxInput` as object or callback * and then recursively check keys & values to create media query object styles. * (the result will be used in `styled`) */ function traverse(sxInput) { let sxObject = sxInput; if (typeof sxInput === 'function') { sxObject = sxInput(theme); } else if (typeof sxInput !== 'object') { // value return sxInput; } if (!sxObject) { return null; } const emptyBreakpoints = (0,_breakpoints__WEBPACK_IMPORTED_MODULE_2__/* .createEmptyBreakpointObject */ .W8)(theme.breakpoints); const breakpointsKeys = Object.keys(emptyBreakpoints); let css = emptyBreakpoints; Object.keys(sxObject).forEach(styleKey => { const value = callIfFn(sxObject[styleKey], theme); if (value !== null && value !== undefined) { if (typeof value === 'object') { if (config[styleKey]) { css = (0,_merge__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(css, getThemeValue(styleKey, value, theme, config)); } else { const breakpointsValues = (0,_breakpoints__WEBPACK_IMPORTED_MODULE_2__/* .handleBreakpoints */ .k9)({ theme }, value, x => ({ [styleKey]: x })); if (objectsHaveSameKeys(breakpointsValues, value)) { css[styleKey] = styleFunctionSx({ sx: value, theme }); } else { css = (0,_merge__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(css, breakpointsValues); } } } else { css = (0,_merge__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(css, getThemeValue(styleKey, value, theme, config)); } } }); return (0,_breakpoints__WEBPACK_IMPORTED_MODULE_2__/* .removeUnusedBreakpoints */ .L7)(breakpointsKeys, css); } return Array.isArray(sx) ? sx.map(traverse) : traverse(sx); } return styleFunctionSx; } const styleFunctionSx = unstable_createStyleFunctionSx(); styleFunctionSx.filterProps = ['sx']; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (styleFunctionSx); /***/ }), /***/ 1199: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* unused harmony export systemDefaultTheme */ /* harmony import */ var _createTheme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3985); /* harmony import */ var _useThemeWithoutDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5727); 'use client'; const systemDefaultTheme = (0,_createTheme__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(); function useTheme() { let defaultTheme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : systemDefaultTheme; return (0,_useThemeWithoutDefault__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(defaultTheme); } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useTheme); /***/ }), /***/ 929: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ getThemeProps) /* harmony export */ }); /* harmony import */ var _mui_utils_resolveProps__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3928); function getThemeProps(params) { const { theme, name, props } = params; if (!theme || !theme.components || !theme.components[name] || !theme.components[name].defaultProps) { return props; } return (0,_mui_utils_resolveProps__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(theme.components[name].defaultProps, props); } /***/ }), /***/ 8251: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ useThemeProps) /* harmony export */ }); /* harmony import */ var _getThemeProps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(929); /* harmony import */ var _useTheme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1199); 'use client'; function useThemeProps(_ref) { let { props, name, defaultTheme, themeId } = _ref; let theme = (0,_useTheme__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(defaultTheme); if (themeId) { theme = theme[themeId] || theme; } const mergedProps = (0,_getThemeProps__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)({ theme, name, props }); return mergedProps; } /***/ }), /***/ 5727: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7948); /* harmony import */ var _mui_styled_engine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2412); 'use client'; function isObjectEmpty(obj) { return Object.keys(obj).length === 0; } function useTheme() { let defaultTheme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; const contextTheme = react__WEBPACK_IMPORTED_MODULE_0__.useContext(_mui_styled_engine__WEBPACK_IMPORTED_MODULE_1__.T); return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme; } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useTheme); /***/ }), /***/ 3705: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); const defaultGenerator = componentName => componentName; const createClassNameGenerator = () => { let generate = defaultGenerator; return { configure(generator) { generate = generator; }, generate(componentName) { return generate(componentName); }, reset() { generate = defaultGenerator; } }; }; const ClassNameGenerator = createClassNameGenerator(); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ClassNameGenerator); /***/ }), /***/ 4656: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ capitalize) /* harmony export */ }); /* harmony import */ var _mui_utils_formatMuiErrorMessage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4451); // It should to be noted that this function isn't equivalent to `text-transform: capitalize`. // // A strict capitalization should uppercase the first letter of each word in the sentence. // We only handle the first word. function capitalize(string) { if (typeof string !== 'string') { throw new Error( false ? 0 : (0,_mui_utils_formatMuiErrorMessage__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(7)); } return string.charAt(0).toUpperCase() + string.slice(1); } /***/ }), /***/ 6814: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* reexport safe */ _capitalize__WEBPACK_IMPORTED_MODULE_0__.Z) /* harmony export */ }); /* harmony import */ var _capitalize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4656); /***/ }), /***/ 5288: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* reexport */ clamp_clamp) }); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/clamp/clamp.js function clamp(val) { let min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.MIN_SAFE_INTEGER; let max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Number.MAX_SAFE_INTEGER; return Math.max(min, Math.min(val, max)); } /* harmony default export */ const clamp_clamp = (clamp); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/clamp/index.js /***/ }), /***/ 5923: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ composeClasses) /* harmony export */ }); function composeClasses(slots, getUtilityClass) { let classes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; const output = {}; Object.keys(slots).forEach( // `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`. // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208 slot => { output[slot] = slots[slot].reduce((acc, key) => { if (key) { const utilityClass = getUtilityClass(key); if (utilityClass !== '') { acc.push(utilityClass); } if (classes && classes[key]) { acc.push(classes[key]); } } return acc; }, []).join(' '); }); return output; } /***/ }), /***/ 3444: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ createChainedFunction) /* harmony export */ }); /** * Safe chained function. * * Will only create a new function if needed, * otherwise will pass back existing functions or null. */ function createChainedFunction() { for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { funcs[_key] = arguments[_key]; } return funcs.reduce((acc, func) => { if (func == null) { return acc; } return function chainedFunction() { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } acc.apply(this, args); func.apply(this, args); }; }, () => {}); } /***/ }), /***/ 9082: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ debounce) /* harmony export */ }); // Corresponds to 10 frames at 60 Hz. // A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B. function debounce(func) { let wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 166; let timeout; function debounced() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } const later = () => { // @ts-ignore func.apply(this, args); }; clearTimeout(timeout); timeout = setTimeout(later, wait); } debounced.clear = () => { clearTimeout(timeout); }; return debounced; } /***/ }), /***/ 8836: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ P: () => (/* binding */ isPlainObject), /* harmony export */ Z: () => (/* binding */ deepmerge) /* harmony export */ }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1010); // https://github.com/sindresorhus/is-plain-obj/blob/main/index.js function isPlainObject(item) { if (typeof item !== 'object' || item === null) { return false; } const prototype = Object.getPrototypeOf(item); return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item); } function deepClone(source) { if (!isPlainObject(source)) { return source; } const output = {}; Object.keys(source).forEach(key => { output[key] = deepClone(source[key]); }); return output; } function deepmerge(target, source) { let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : { clone: true }; const output = options.clone ? (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)({}, target) : target; if (isPlainObject(target) && isPlainObject(source)) { Object.keys(source).forEach(key => { // Avoid prototype pollution if (key === '__proto__') { return; } if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) { // Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type. output[key] = deepmerge(target[key], source[key], options); } else if (options.clone) { output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key]; } else { output[key] = source[key]; } }); } return output; } /***/ }), /***/ 9499: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* reexport safe */ _deepmerge__WEBPACK_IMPORTED_MODULE_0__.Z), /* harmony export */ isPlainObject: () => (/* reexport safe */ _deepmerge__WEBPACK_IMPORTED_MODULE_0__.P) /* harmony export */ }); /* harmony import */ var _deepmerge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8836); /***/ }), /***/ 4451: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ formatMuiErrorMessage) /* harmony export */ }); /** * WARNING: Don't import this directly. * Use `MuiError` from `@mui/internal-babel-macros/MuiError.macro` instead. * @param {number} code */ function formatMuiErrorMessage(code) { // Apply babel-plugin-transform-template-literals in loose mode // loose mode is safe if we're concatenating primitives // see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose /* eslint-disable prefer-template */ let url = 'https://mui.com/production-error/?code=' + code; for (let i = 1; i < arguments.length; i += 1) { // rest params over-transpile for this case // eslint-disable-next-line prefer-rest-params url += '&args[]=' + encodeURIComponent(arguments[i]); } return 'Minified MUI error #' + code + '; visit ' + url + ' for the full message.'; /* eslint-enable prefer-template */ } /***/ }), /***/ 3001: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* reexport safe */ _formatMuiErrorMessage__WEBPACK_IMPORTED_MODULE_0__.Z) /* harmony export */ }); /* harmony import */ var _formatMuiErrorMessage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4451); /***/ }), /***/ 8092: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ ZP: () => (/* binding */ generateUtilityClass) /* harmony export */ }); /* unused harmony exports globalStateClasses, isGlobalState */ /* harmony import */ var _ClassNameGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3705); const globalStateClasses = { active: 'active', checked: 'checked', completed: 'completed', disabled: 'disabled', error: 'error', expanded: 'expanded', focused: 'focused', focusVisible: 'focusVisible', open: 'open', readOnly: 'readOnly', required: 'required', selected: 'selected' }; function generateUtilityClass(componentName, slot) { let globalStatePrefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Mui'; const globalStateClass = globalStateClasses[slot]; return globalStateClass ? "".concat(globalStatePrefix, "-").concat(globalStateClass) : "".concat(_ClassNameGenerator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z.generate(componentName), "-").concat(slot); } function isGlobalState(slot) { return globalStateClasses[slot] !== undefined; } /***/ }), /***/ 3453: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ generateUtilityClasses) /* harmony export */ }); /* harmony import */ var _generateUtilityClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8092); function generateUtilityClasses(componentName, slots) { let globalStatePrefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Mui'; const result = {}; slots.forEach(slot => { result[slot] = (0,_generateUtilityClass__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(componentName, slot, globalStatePrefix); }); return result; } /***/ }), /***/ 8853: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* reexport */ getDisplayName), getFunctionName: () => (/* reexport */ getFunctionName) }); // EXTERNAL MODULE: ./node_modules/.pnpm/react-is@18.2.0/node_modules/react-is/index.js var react_is = __webpack_require__(8890); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/getDisplayName/getDisplayName.js // Simplified polyfill for IE11 support // https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3 const fnNameMatchRegex = /^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/; function getFunctionName(fn) { const match = "".concat(fn).match(fnNameMatchRegex); const name = match && match[1]; return name || ''; } function getFunctionComponentName(Component) { let fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; return Component.displayName || Component.name || getFunctionName(Component) || fallback; } function getWrappedName(outerType, innerType, wrapperName) { const functionName = getFunctionComponentName(innerType); return outerType.displayName || (functionName !== '' ? "".concat(wrapperName, "(").concat(functionName, ")") : wrapperName); } /** * cherry-pick from * https://github.com/facebook/react/blob/769b1f270e1251d9dbdce0fcbd9e92e502d059b8/packages/shared/getComponentName.js * originally forked from recompose/getDisplayName with added IE11 support */ function getDisplayName(Component) { if (Component == null) { return undefined; } if (typeof Component === 'string') { return Component; } if (typeof Component === 'function') { return getFunctionComponentName(Component, 'Component'); } // TypeScript can't have components as objects but they exist in the form of `memo` or `Suspense` if (typeof Component === 'object') { switch (Component.$$typeof) { case react_is.ForwardRef: return getWrappedName(Component, Component.render, 'ForwardRef'); case react_is.Memo: return getWrappedName(Component, Component.type, 'memo'); default: return undefined; } } return undefined; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/@mui+utils@5.15.14_@types+react@18.2.79_react@18.2.0/node_modules/@mui/utils/getDisplayName/index.js /***/ }), /***/ 1563: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ ownerDocument) /* harmony export */ }); function ownerDocument(node) { return node && node.ownerDocument || document; } /***/ }), /***/ 6029: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ ownerWindow) /* harmony export */ }); /* harmony import */ var _ownerDocument__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1563); function ownerWindow(node) { const doc = (0,_ownerDocument__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(node); return doc.defaultView || window; } /***/ }), /***/ 3928: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ resolveProps) /* harmony export */ }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1010); /** * Add keys, values of `defaultProps` that does not exist in `props` * @param {object} defaultProps * @param {object} props * @returns {object} resolved props */ function resolveProps(defaultProps, props) { const output = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)({}, props); Object.keys(defaultProps).forEach(propName => { if (propName.toString().match(/^(components|slots)$/)) { output[propName] = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)({}, defaultProps[propName], output[propName]); } else if (propName.toString().match(/^(componentsProps|slotProps)$/)) { const defaultSlotProps = defaultProps[propName] || {}; const slotProps = props[propName]; output[propName] = {}; if (!slotProps || !Object.keys(slotProps)) { // Reduce the iteration if the slot props is empty output[propName] = defaultSlotProps; } else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) { // Reduce the iteration if the default slot props is empty output[propName] = slotProps; } else { output[propName] = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)({}, slotProps); Object.keys(defaultSlotProps).forEach(slotPropName => { output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]); }); } } else if (output[propName] === undefined) { output[propName] = defaultProps[propName]; } }); return output; } /***/ }), /***/ 9109: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ setRef) /* harmony export */ }); /** * TODO v5: consider making it private * * passes {value} to {ref} * * WARNING: Be sure to only call this inside a callback that is passed as a ref. * Otherwise, make sure to cleanup the previous {ref} if it changes. See * https://github.com/mui/material-ui/issues/13539 * * Useful if you want to expose the ref of an inner component to the public API * while still using it inside the component. * @param ref A ref callback or ref object. If anything falsy, this is a no-op. */ function setRef(ref, value) { if (typeof ref === 'function') { ref(value); } else if (ref) { ref.current = value; } } /***/ }), /***/ 4536: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7948); 'use client'; /** * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering. * This is useful for effects that are only needed for client-side rendering but not for SSR. * * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85 * and confirm it doesn't apply to your use-case. */ const useEnhancedEffect = typeof window !== 'undefined' ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : react__WEBPACK_IMPORTED_MODULE_0__.useEffect; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useEnhancedEffect); /***/ }), /***/ 9210: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7948); /* harmony import */ var _useEnhancedEffect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4536); 'use client'; /** * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892 * See RFC in https://github.com/reactjs/rfcs/pull/220 */ function useEventCallback(fn) { const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(fn); (0,_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(() => { ref.current = fn; }); return react__WEBPACK_IMPORTED_MODULE_0__.useRef(function () { return ( // @ts-expect-error hide `this` (0, ref.current)(...arguments) ); }).current; } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useEventCallback); /***/ }), /***/ 4114: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ useForkRef) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7948); /* harmony import */ var _setRef__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9109); 'use client'; function useForkRef() { for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) { refs[_key] = arguments[_key]; } /** * This will create a new function if the refs passed to this hook change and are all defined. * This means react will call the old forkRef with `null` and the new forkRef * with the ref. Cleanup naturally emerges from this behavior. */ return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => { if (refs.every(ref => ref == null)) { return null; } return instance => { refs.forEach(ref => { (0,_setRef__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(ref, instance); }); }; // eslint-disable-next-line react-hooks/exhaustive-deps }, refs); } /***/ }), /***/ 2179: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; var react__WEBPACK_IMPORTED_MODULE_0___namespace_cache; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ useId) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7948); 'use client'; let globalId = 0; function useGlobalId(idOverride) { const [defaultId, setDefaultId] = react__WEBPACK_IMPORTED_MODULE_0__.useState(idOverride); const id = idOverride || defaultId; react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { if (defaultId == null) { // Fallback to this default id when possible. // Use the incrementing value for client-side rendering only. // We can't use it server-side. // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem globalId += 1; setDefaultId("mui-".concat(globalId)); } }, [defaultId]); return id; } // downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814 const maybeReactUseId = /*#__PURE__*/ (react__WEBPACK_IMPORTED_MODULE_0___namespace_cache || (react__WEBPACK_IMPORTED_MODULE_0___namespace_cache = __webpack_require__.t(react__WEBPACK_IMPORTED_MODULE_0__, 2)))['useId'.toString()]; /** * * @example
* @param idOverride * @returns {string} */ function useId(idOverride) { if (maybeReactUseId !== undefined) { const reactId = maybeReactUseId(); return idOverride != null ? idOverride : reactId; } // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime. return useGlobalId(idOverride); } /***/ }), /***/ 3185: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ useIsFocusVisible) /* harmony export */ }); /* unused harmony export teardown */ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7948); /* harmony import */ var _useTimeout_useTimeout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5859); 'use client'; // based on https://github.com/WICG/focus-visible/blob/v4.1.5/src/focus-visible.js let hadKeyboardEvent = true; let hadFocusVisibleRecently = false; const hadFocusVisibleRecentlyTimeout = new _useTimeout_useTimeout__WEBPACK_IMPORTED_MODULE_1__/* .Timeout */ .V(); const inputTypesWhitelist = { text: true, search: true, url: true, tel: true, email: true, password: true, number: true, date: true, month: true, week: true, time: true, datetime: true, 'datetime-local': true }; /** * Computes whether the given element should automatically trigger the * `focus-visible` class being added, i.e. whether it should always match * `:focus-visible` when focused. * @param {Element} node * @returns {boolean} */ function focusTriggersKeyboardModality(node) { const { type, tagName } = node; if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) { return true; } if (tagName === 'TEXTAREA' && !node.readOnly) { return true; } if (node.isContentEditable) { return true; } return false; } /** * Keep track of our keyboard modality state with `hadKeyboardEvent`. * If the most recent user interaction was via the keyboard; * and the key press did not include a meta, alt/option, or control key; * then the modality is keyboard. Otherwise, the modality is not keyboard. * @param {KeyboardEvent} event */ function handleKeyDown(event) { if (event.metaKey || event.altKey || event.ctrlKey) { return; } hadKeyboardEvent = true; } /** * If at any point a user clicks with a pointing device, ensure that we change * the modality away from keyboard. * This avoids the situation where a user presses a key on an already focused * element, and then clicks on a different element, focusing it with a * pointing device, while we still think we're in keyboard modality. */ function handlePointerDown() { hadKeyboardEvent = false; } function handleVisibilityChange() { if (this.visibilityState === 'hidden') { // If the tab becomes active again, the browser will handle calling focus // on the element (Safari actually calls it twice). // If this tab change caused a blur on an element with focus-visible, // re-apply the class when the user switches back to the tab. if (hadFocusVisibleRecently) { hadKeyboardEvent = true; } } } function prepare(doc) { doc.addEventListener('keydown', handleKeyDown, true); doc.addEventListener('mousedown', handlePointerDown, true); doc.addEventListener('pointerdown', handlePointerDown, true); doc.addEventListener('touchstart', handlePointerDown, true); doc.addEventListener('visibilitychange', handleVisibilityChange, true); } function teardown(doc) { doc.removeEventListener('keydown', handleKeyDown, true); doc.removeEventListener('mousedown', handlePointerDown, true); doc.removeEventListener('pointerdown', handlePointerDown, true); doc.removeEventListener('touchstart', handlePointerDown, true); doc.removeEventListener('visibilitychange', handleVisibilityChange, true); } function isFocusVisible(event) { const { target } = event; try { return target.matches(':focus-visible'); } catch (error) { // Browsers not implementing :focus-visible will throw a SyntaxError. // We use our own heuristic for those browsers. // Rethrow might be better if it's not the expected error but do we really // want to crash if focus-visible malfunctioned? } // No need for validFocusTarget check. The user does that by attaching it to // focusable events only. return hadKeyboardEvent || focusTriggersKeyboardModality(target); } function useIsFocusVisible() { const ref = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(node => { if (node != null) { prepare(node.ownerDocument); } }, []); const isFocusVisibleRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false); /** * Should be called if a blur event is fired */ function handleBlurVisible() { // checking against potential state variable does not suffice if we focus and blur synchronously. // React wouldn't have time to trigger a re-render so `focusVisible` would be stale. // Ideally we would adjust `isFocusVisible(event)` to look at `relatedTarget` for blur events. // This doesn't work in IE11 due to https://github.com/facebook/react/issues/3751 // TODO: check again if React releases their internal changes to focus event handling (https://github.com/facebook/react/pull/19186). if (isFocusVisibleRef.current) { // To detect a tab/window switch, we look for a blur event followed // rapidly by a visibility change. // If we don't see a visibility change within 100ms, it's probably a // regular focus change. hadFocusVisibleRecently = true; hadFocusVisibleRecentlyTimeout.start(100, () => { hadFocusVisibleRecently = false; }); isFocusVisibleRef.current = false; return true; } return false; } /** * Should be called if a blur event is fired */ function handleFocusVisible(event) { if (isFocusVisible(event)) { isFocusVisibleRef.current = true; return true; } return false; } return { isFocusVisibleRef, onFocus: handleFocusVisible, onBlur: handleBlurVisible, ref }; } /***/ }), /***/ 5794: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ useLazyRef) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7948); 'use client'; const UNINITIALIZED = {}; /** * A React.useRef() that is initialized lazily with a function. Note that it accepts an optional * initialization argument, so the initialization function doesn't need to be an inline closure. * * @usage * const ref = useLazyRef(sortColumns, columns) */ function useLazyRef(init, initArg) { const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(UNINITIALIZED); if (ref.current === UNINITIALIZED) { ref.current = init(initArg); } return ref; } /***/ }), /***/ 2127: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ useOnMount) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7948); 'use client'; const EMPTY = []; /** * A React.useEffect equivalent that runs once, when the component is mounted. */ function useOnMount(fn) { /* eslint-disable react-hooks/exhaustive-deps */ react__WEBPACK_IMPORTED_MODULE_0__.useEffect(fn, EMPTY); /* eslint-enable react-hooks/exhaustive-deps */ } /***/ }), /***/ 5859: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ V: () => (/* binding */ Timeout), /* harmony export */ Z: () => (/* binding */ useTimeout) /* harmony export */ }); /* harmony import */ var _useLazyRef_useLazyRef__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5794); /* harmony import */ var _useOnMount_useOnMount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2127); 'use client'; class Timeout { constructor() { this.currentId = null; this.clear = () => { if (this.currentId !== null) { clearTimeout(this.currentId); this.currentId = null; } }; this.disposeEffect = () => { return this.clear; }; } static create() { return new Timeout(); } /** * Executes `fn` after `delay`, clearing any previously scheduled call. */ start(delay, fn) { this.clear(); this.currentId = setTimeout(() => { this.currentId = null; fn(); }, delay); } } function useTimeout() { const timeout = (0,_useLazyRef_useLazyRef__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(Timeout.create).current; (0,_useOnMount_useOnMount__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(timeout.disposeEffect); return timeout; } /***/ }), /***/ 6501: /***/ (function(__unused_webpack_module, exports) { (function (global, factory) { true ? factory(exports) : 0; })(this, function (exports) { 'use strict'; // This file was generated. Do not modify manually! var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; // This file was generated. Do not modify manually! var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; // This file was generated. Do not modify manually! var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65"; // This file was generated. Do not modify manually! var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; // These are a run-length and offset encoded representation of the // >0xffff code points that are a valid part of identifiers. The // offset starts at 0x10000, and each pair of numbers represents an // offset to the next range, and then a size of the range. // Reserved word lists for various dialects of the language var reservedWords = { 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", 5: "class enum extends super const export import", 6: "enum", strict: "implements interface let package private protected public static yield", strictBind: "eval arguments" }; // And the keywords var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; var keywords$1 = { 5: ecma5AndLessKeywords, "5module": ecma5AndLessKeywords + " export import", 6: ecma5AndLessKeywords + " const class extends export import super" }; var keywordRelationalOperator = /^in(stanceof)?$/; // ## Character categories var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); // This has a complexity linear to the value of the code. The // assumption is that looking up astral identifier characters is // rare. function isInAstralSet(code, set) { var pos = 0x10000; for (var i = 0; i < set.length; i += 2) { pos += set[i]; if (pos > code) { return false; } pos += set[i + 1]; if (pos >= code) { return true; } } return false; } // Test whether a given character code starts an identifier. function isIdentifierStart(code, astral) { if (code < 65) { return code === 36; } if (code < 91) { return true; } if (code < 97) { return code === 95; } if (code < 123) { return true; } if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); } if (astral === false) { return false; } return isInAstralSet(code, astralIdentifierStartCodes); } // Test whether a given character is part of an identifier. function isIdentifierChar(code, astral) { if (code < 48) { return code === 36; } if (code < 58) { return true; } if (code < 65) { return false; } if (code < 91) { return true; } if (code < 97) { return code === 95; } if (code < 123) { return true; } if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); } if (astral === false) { return false; } return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); } // ## Token types // The assignment of fine-grained, information-carrying type objects // allows the tokenizer to store the information it has about a // token in a way that is very cheap for the parser to look up. // All token type variables start with an underscore, to make them // easy to recognize. // The `beforeExpr` property is used to disambiguate between regular // expressions and divisions. It is set on all token types that can // be followed by an expression (thus, a slash after them would be a // regular expression). // // The `startsExpr` property is used to check if the token ends a // `yield` expression. It is set on all token types that either can // directly start an expression (like a quotation mark) or can // continue an expression (like the body of a string). // // `isLoop` marks a keyword as starting a loop, which is important // to know when parsing a label, in order to allow or disallow // continue jumps to that label. var TokenType = function TokenType(label, conf) { if (conf === void 0) conf = {}; this.label = label; this.keyword = conf.keyword; this.beforeExpr = !!conf.beforeExpr; this.startsExpr = !!conf.startsExpr; this.isLoop = !!conf.isLoop; this.isAssign = !!conf.isAssign; this.prefix = !!conf.prefix; this.postfix = !!conf.postfix; this.binop = conf.binop || null; this.updateContext = null; }; function binop(name, prec) { return new TokenType(name, { beforeExpr: true, binop: prec }); } var beforeExpr = { beforeExpr: true }, startsExpr = { startsExpr: true }; // Map keyword names to token types. var keywords = {}; // Succinct definitions of keyword token types function kw(name, options) { if (options === void 0) options = {}; options.keyword = name; return keywords[name] = new TokenType(name, options); } var types$1 = { num: new TokenType("num", startsExpr), regexp: new TokenType("regexp", startsExpr), string: new TokenType("string", startsExpr), name: new TokenType("name", startsExpr), privateId: new TokenType("privateId", startsExpr), eof: new TokenType("eof"), // Punctuation token types. bracketL: new TokenType("[", { beforeExpr: true, startsExpr: true }), bracketR: new TokenType("]"), braceL: new TokenType("{", { beforeExpr: true, startsExpr: true }), braceR: new TokenType("}"), parenL: new TokenType("(", { beforeExpr: true, startsExpr: true }), parenR: new TokenType(")"), comma: new TokenType(",", beforeExpr), semi: new TokenType(";", beforeExpr), colon: new TokenType(":", beforeExpr), dot: new TokenType("."), question: new TokenType("?", beforeExpr), questionDot: new TokenType("?."), arrow: new TokenType("=>", beforeExpr), template: new TokenType("template"), invalidTemplate: new TokenType("invalidTemplate"), ellipsis: new TokenType("...", beforeExpr), backQuote: new TokenType("`", startsExpr), dollarBraceL: new TokenType("${", { beforeExpr: true, startsExpr: true }), // Operators. These carry several kinds of properties to help the // parser use them properly (the presence of these properties is // what categorizes them as operators). // // `binop`, when present, specifies that this operator is a binary // operator, and will refer to its precedence. // // `prefix` and `postfix` mark the operator as a prefix or postfix // unary operator. // // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as // binary operators with a very low precedence, that should result // in AssignmentExpression nodes. eq: new TokenType("=", { beforeExpr: true, isAssign: true }), assign: new TokenType("_=", { beforeExpr: true, isAssign: true }), incDec: new TokenType("++/--", { prefix: true, postfix: true, startsExpr: true }), prefix: new TokenType("!/~", { beforeExpr: true, prefix: true, startsExpr: true }), logicalOR: binop("||", 1), logicalAND: binop("&&", 2), bitwiseOR: binop("|", 3), bitwiseXOR: binop("^", 4), bitwiseAND: binop("&", 5), equality: binop("==/!=/===/!==", 6), relational: binop("/<=/>=", 7), bitShift: binop("<>/>>>", 8), plusMin: new TokenType("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }), modulo: binop("%", 10), star: binop("*", 10), slash: binop("/", 10), starstar: new TokenType("**", { beforeExpr: true }), coalesce: binop("??", 1), // Keyword token types. _break: kw("break"), _case: kw("case", beforeExpr), _catch: kw("catch"), _continue: kw("continue"), _debugger: kw("debugger"), _default: kw("default", beforeExpr), _do: kw("do", { isLoop: true, beforeExpr: true }), _else: kw("else", beforeExpr), _finally: kw("finally"), _for: kw("for", { isLoop: true }), _function: kw("function", startsExpr), _if: kw("if"), _return: kw("return", beforeExpr), _switch: kw("switch"), _throw: kw("throw", beforeExpr), _try: kw("try"), _var: kw("var"), _const: kw("const"), _while: kw("while", { isLoop: true }), _with: kw("with"), _new: kw("new", { beforeExpr: true, startsExpr: true }), _this: kw("this", startsExpr), _super: kw("super", startsExpr), _class: kw("class", startsExpr), _extends: kw("extends", beforeExpr), _export: kw("export"), _import: kw("import", startsExpr), _null: kw("null", startsExpr), _true: kw("true", startsExpr), _false: kw("false", startsExpr), _in: kw("in", { beforeExpr: true, binop: 7 }), _instanceof: kw("instanceof", { beforeExpr: true, binop: 7 }), _typeof: kw("typeof", { beforeExpr: true, prefix: true, startsExpr: true }), _void: kw("void", { beforeExpr: true, prefix: true, startsExpr: true }), _delete: kw("delete", { beforeExpr: true, prefix: true, startsExpr: true }) }; // Matches a whole line break (where CRLF is considered a single // line break). Used to count lines. var lineBreak = /\r\n?|\n|\u2028|\u2029/; var lineBreakG = new RegExp(lineBreak.source, "g"); function isNewLine(code) { return code === 10 || code === 13 || code === 0x2028 || code === 0x2029; } function nextLineBreak(code, from, end) { if (end === void 0) end = code.length; for (var i = from; i < end; i++) { var next = code.charCodeAt(i); if (isNewLine(next)) { return i < end - 1 && next === 13 && code.charCodeAt(i + 1) === 10 ? i + 2 : i + 1; } } return -1; } var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/; var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; var ref = Object.prototype; var hasOwnProperty = ref.hasOwnProperty; var toString = ref.toString; var hasOwn = Object.hasOwn || function (obj, propName) { return hasOwnProperty.call(obj, propName); }; var isArray = Array.isArray || function (obj) { return toString.call(obj) === "[object Array]"; }; var regexpCache = Object.create(null); function wordsRegexp(words) { return regexpCache[words] || (regexpCache[words] = new RegExp("^(?:" + words.replace(/ /g, "|") + ")$")); } function codePointToString(code) { // UTF-16 Decoding if (code <= 0xFFFF) { return String.fromCharCode(code); } code -= 0x10000; return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00); } var loneSurrogate = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/; // These are used when `options.locations` is on, for the // `startLoc` and `endLoc` properties. var Position = function Position(line, col) { this.line = line; this.column = col; }; Position.prototype.offset = function offset(n) { return new Position(this.line, this.column + n); }; var SourceLocation = function SourceLocation(p, start, end) { this.start = start; this.end = end; if (p.sourceFile !== null) { this.source = p.sourceFile; } }; // The `getLineInfo` function is mostly useful when the // `locations` option is off (for performance reasons) and you // want to find the line/column position for a given character // offset. `input` should be the code string that the offset refers // into. function getLineInfo(input, offset) { for (var line = 1, cur = 0;;) { var nextBreak = nextLineBreak(input, cur, offset); if (nextBreak < 0) { return new Position(line, offset - cur); } ++line; cur = nextBreak; } } // A second argument must be given to configure the parser process. // These options are recognized (only `ecmaVersion` is required): var defaultOptions = { // `ecmaVersion` indicates the ECMAScript version to parse. Must be // either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 // (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` // (the latest version the library supports). This influences // support for strict mode, the set of reserved words, and support // for new syntax features. ecmaVersion: null, // `sourceType` indicates the mode the code should be parsed in. // Can be either `"script"` or `"module"`. This influences global // strict mode and parsing of `import` and `export` declarations. sourceType: "script", // `onInsertedSemicolon` can be a callback that will be called when // a semicolon is automatically inserted. It will be passed the // position of the inserted semicolon as an offset, and if // `locations` is enabled, it is given the location as a `{line, // column}` object as second argument. onInsertedSemicolon: null, // `onTrailingComma` is similar to `onInsertedSemicolon`, but for // trailing commas. onTrailingComma: null, // By default, reserved words are only enforced if ecmaVersion >= 5. // Set `allowReserved` to a boolean value to explicitly turn this on // an off. When this option has the value "never", reserved words // and keywords can also not be used as property names. allowReserved: null, // When enabled, a return at the top level is not considered an // error. allowReturnOutsideFunction: false, // When enabled, import/export statements are not constrained to // appearing at the top of the program, and an import.meta expression // in a script isn't considered an error. allowImportExportEverywhere: false, // By default, await identifiers are allowed to appear at the top-level scope only if ecmaVersion >= 2022. // When enabled, await identifiers are allowed to appear at the top-level scope, // but they are still not allowed in non-async functions. allowAwaitOutsideFunction: null, // When enabled, super identifiers are not constrained to // appearing in methods and do not raise an error when they appear elsewhere. allowSuperOutsideMethod: null, // When enabled, hashbang directive in the beginning of file is // allowed and treated as a line comment. Enabled by default when // `ecmaVersion` >= 2023. allowHashBang: false, // By default, the parser will verify that private properties are // only used in places where they are valid and have been declared. // Set this to false to turn such checks off. checkPrivateFields: true, // When `locations` is on, `loc` properties holding objects with // `start` and `end` properties in `{line, column}` form (with // line being 1-based and column 0-based) will be attached to the // nodes. locations: false, // A function can be passed as `onToken` option, which will // cause Acorn to call that function with object in the same // format as tokens returned from `tokenizer().getToken()`. Note // that you are not allowed to call the parser from the // callback—that will corrupt its internal state. onToken: null, // A function can be passed as `onComment` option, which will // cause Acorn to call that function with `(block, text, start, // end)` parameters whenever a comment is skipped. `block` is a // boolean indicating whether this is a block (`/* */`) comment, // `text` is the content of the comment, and `start` and `end` are // character offsets that denote the start and end of the comment. // When the `locations` option is on, two more parameters are // passed, the full `{line, column}` locations of the start and // end of the comments. Note that you are not allowed to call the // parser from the callback—that will corrupt its internal state. // When this option has an array as value, objects representing the // comments are pushed to it. onComment: null, // Nodes have their start and end characters offsets recorded in // `start` and `end` properties (directly on the node, rather than // the `loc` object, which holds line/column data. To also add a // [semi-standardized][range] `range` property holding a `[start, // end]` array with the same numbers, set the `ranges` option to // `true`. // // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 ranges: false, // It is possible to parse multiple files into a single AST by // passing the tree produced by parsing the first file as // `program` option in subsequent parses. This will add the // toplevel forms of the parsed file to the `Program` (top) node // of an existing parse tree. program: null, // When `locations` is on, you can pass this to record the source // file in every node's `loc` object. sourceFile: null, // This value, if given, is stored in every node, whether // `locations` is on or off. directSourceFile: null, // When enabled, parenthesized expressions are represented by // (non-standard) ParenthesizedExpression nodes preserveParens: false }; // Interpret and default an options object var warnedAboutEcmaVersion = false; function getOptions(opts) { var options = {}; for (var opt in defaultOptions) { options[opt] = opts && hasOwn(opts, opt) ? opts[opt] : defaultOptions[opt]; } if (options.ecmaVersion === "latest") { options.ecmaVersion = 1e8; } else if (options.ecmaVersion == null) { if (!warnedAboutEcmaVersion && typeof console === "object" && console.warn) { warnedAboutEcmaVersion = true; console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future."); } options.ecmaVersion = 11; } else if (options.ecmaVersion >= 2015) { options.ecmaVersion -= 2009; } if (options.allowReserved == null) { options.allowReserved = options.ecmaVersion < 5; } if (!opts || opts.allowHashBang == null) { options.allowHashBang = options.ecmaVersion >= 14; } if (isArray(options.onToken)) { var tokens = options.onToken; options.onToken = function (token) { return tokens.push(token); }; } if (isArray(options.onComment)) { options.onComment = pushComment(options, options.onComment); } return options; } function pushComment(options, array) { return function (block, text, start, end, startLoc, endLoc) { var comment = { type: block ? "Block" : "Line", value: text, start: start, end: end }; if (options.locations) { comment.loc = new SourceLocation(this, startLoc, endLoc); } if (options.ranges) { comment.range = [start, end]; } array.push(comment); }; } // Each scope gets a bitset that may contain these flags var SCOPE_TOP = 1, SCOPE_FUNCTION = 2, SCOPE_ASYNC = 4, SCOPE_GENERATOR = 8, SCOPE_ARROW = 16, SCOPE_SIMPLE_CATCH = 32, SCOPE_SUPER = 64, SCOPE_DIRECT_SUPER = 128, SCOPE_CLASS_STATIC_BLOCK = 256, SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK; function functionFlags(async, generator) { return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0); } // Used in checkLVal* and declareName to determine the type of a binding var BIND_NONE = 0, // Not a binding BIND_VAR = 1, // Var-style binding BIND_LEXICAL = 2, // Let- or const-style binding BIND_FUNCTION = 3, // Function declaration BIND_SIMPLE_CATCH = 4, // Simple (identifier pattern) catch binding BIND_OUTSIDE = 5; // Special case for function names as bound inside the function var Parser = function Parser(options, input, startPos) { this.options = options = getOptions(options); this.sourceFile = options.sourceFile; this.keywords = wordsRegexp(keywords$1[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]); var reserved = ""; if (options.allowReserved !== true) { reserved = reservedWords[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3]; if (options.sourceType === "module") { reserved += " await"; } } this.reservedWords = wordsRegexp(reserved); var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict; this.reservedWordsStrict = wordsRegexp(reservedStrict); this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind); this.input = String(input); // Used to signal to callers of `readWord1` whether the word // contained any escape sequences. This is needed because words with // escape sequences must not be interpreted as keywords. this.containsEsc = false; // Set up token state // The current position of the tokenizer in the input. if (startPos) { this.pos = startPos; this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; } else { this.pos = this.lineStart = 0; this.curLine = 1; } // Properties of the current token: // Its type this.type = types$1.eof; // For tokens that include more information than their type, the value this.value = null; // Its start and end offset this.start = this.end = this.pos; // And, if locations are used, the {line, column} object // corresponding to those offsets this.startLoc = this.endLoc = this.curPosition(); // Position information for the previous token this.lastTokEndLoc = this.lastTokStartLoc = null; this.lastTokStart = this.lastTokEnd = this.pos; // The context stack is used to superficially track syntactic // context to predict whether a regular expression is allowed in a // given position. this.context = this.initialContext(); this.exprAllowed = true; // Figure out if it's a module code. this.inModule = options.sourceType === "module"; this.strict = this.inModule || this.strictDirective(this.pos); // Used to signify the start of a potential arrow function this.potentialArrowAt = -1; this.potentialArrowInForAwait = false; // Positions to delayed-check that yield/await does not exist in default parameters. this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; // Labels in scope. this.labels = []; // Thus-far undefined exports. this.undefinedExports = Object.create(null); // If enabled, skip leading hashbang line. if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") { this.skipLineComment(2); } // Scope tracking for duplicate variable names (see scope.js) this.scopeStack = []; this.enterScope(SCOPE_TOP); // For RegExp validation this.regexpState = null; // The stack of private names. // Each element has two properties: 'declared' and 'used'. // When it exited from the outermost class definition, all used private names must be declared. this.privateNameStack = []; }; var prototypeAccessors = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, canAwait: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true }, allowNewDotTarget: { configurable: true }, inClassStaticBlock: { configurable: true } }; Parser.prototype.parse = function parse() { var node = this.options.program || this.startNode(); this.nextToken(); return this.parseTopLevel(node); }; prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0; }; prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 && !this.currentVarScope().inClassFieldInit; }; prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 && !this.currentVarScope().inClassFieldInit; }; prototypeAccessors.canAwait.get = function () { for (var i = this.scopeStack.length - 1; i >= 0; i--) { var scope = this.scopeStack[i]; if (scope.inClassFieldInit || scope.flags & SCOPE_CLASS_STATIC_BLOCK) { return false; } if (scope.flags & SCOPE_FUNCTION) { return (scope.flags & SCOPE_ASYNC) > 0; } } return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction; }; prototypeAccessors.allowSuper.get = function () { var ref = this.currentThisScope(); var flags = ref.flags; var inClassFieldInit = ref.inClassFieldInit; return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod; }; prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0; }; prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()); }; prototypeAccessors.allowNewDotTarget.get = function () { var ref = this.currentThisScope(); var flags = ref.flags; var inClassFieldInit = ref.inClassFieldInit; return (flags & (SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK)) > 0 || inClassFieldInit; }; prototypeAccessors.inClassStaticBlock.get = function () { return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0; }; Parser.extend = function extend() { var plugins = [], len = arguments.length; while (len--) plugins[len] = arguments[len]; var cls = this; for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); } return cls; }; Parser.parse = function parse(input, options) { return new this(options, input).parse(); }; Parser.parseExpressionAt = function parseExpressionAt(input, pos, options) { var parser = new this(options, input, pos); parser.nextToken(); return parser.parseExpression(); }; Parser.tokenizer = function tokenizer(input, options) { return new this(options, input); }; Object.defineProperties(Parser.prototype, prototypeAccessors); var pp$9 = Parser.prototype; // ## Parser utilities var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/; pp$9.strictDirective = function (start) { if (this.options.ecmaVersion < 5) { return false; } for (;;) { // Try to find string literal. skipWhiteSpace.lastIndex = start; start += skipWhiteSpace.exec(this.input)[0].length; var match = literal.exec(this.input.slice(start)); if (!match) { return false; } if ((match[1] || match[2]) === "use strict") { skipWhiteSpace.lastIndex = start + match[0].length; var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length; var next = this.input.charAt(end); return next === ";" || next === "}" || lineBreak.test(spaceAfter[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "="); } start += match[0].length; // Skip semicolon, if any. skipWhiteSpace.lastIndex = start; start += skipWhiteSpace.exec(this.input)[0].length; if (this.input[start] === ";") { start++; } } }; // Predicate that tests whether the next token is of the given // type, and if yes, consumes it as a side effect. pp$9.eat = function (type) { if (this.type === type) { this.next(); return true; } else { return false; } }; // Tests whether parsed token is a contextual keyword. pp$9.isContextual = function (name) { return this.type === types$1.name && this.value === name && !this.containsEsc; }; // Consumes contextual keyword if possible. pp$9.eatContextual = function (name) { if (!this.isContextual(name)) { return false; } this.next(); return true; }; // Asserts that following token is given contextual keyword. pp$9.expectContextual = function (name) { if (!this.eatContextual(name)) { this.unexpected(); } }; // Test whether a semicolon can be inserted at the current position. pp$9.canInsertSemicolon = function () { return this.type === types$1.eof || this.type === types$1.braceR || lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); }; pp$9.insertSemicolon = function () { if (this.canInsertSemicolon()) { if (this.options.onInsertedSemicolon) { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); } return true; } }; // Consume a semicolon, or, failing that, see if we are allowed to // pretend that there is a semicolon at this position. pp$9.semicolon = function () { if (!this.eat(types$1.semi) && !this.insertSemicolon()) { this.unexpected(); } }; pp$9.afterTrailingComma = function (tokType, notNext) { if (this.type === tokType) { if (this.options.onTrailingComma) { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); } if (!notNext) { this.next(); } return true; } }; // Expect a token of a given type. If found, consume it, otherwise, // raise an unexpected token error. pp$9.expect = function (type) { this.eat(type) || this.unexpected(); }; // Raise an unexpected token error. pp$9.unexpected = function (pos) { this.raise(pos != null ? pos : this.start, "Unexpected token"); }; var DestructuringErrors = function DestructuringErrors() { this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1; }; pp$9.checkPatternErrors = function (refDestructuringErrors, isAssign) { if (!refDestructuringErrors) { return; } if (refDestructuringErrors.trailingComma > -1) { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); } var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; if (parens > -1) { this.raiseRecoverable(parens, isAssign ? "Assigning to rvalue" : "Parenthesized pattern"); } }; pp$9.checkExpressionErrors = function (refDestructuringErrors, andThrow) { if (!refDestructuringErrors) { return false; } var shorthandAssign = refDestructuringErrors.shorthandAssign; var doubleProto = refDestructuringErrors.doubleProto; if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0; } if (shorthandAssign >= 0) { this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); } if (doubleProto >= 0) { this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); } }; pp$9.checkYieldAwaitInDefaultParams = function () { if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) { this.raise(this.yieldPos, "Yield expression cannot be a default value"); } if (this.awaitPos) { this.raise(this.awaitPos, "Await expression cannot be a default value"); } }; pp$9.isSimpleAssignTarget = function (expr) { if (expr.type === "ParenthesizedExpression") { return this.isSimpleAssignTarget(expr.expression); } return expr.type === "Identifier" || expr.type === "MemberExpression"; }; var pp$8 = Parser.prototype; // ### Statement parsing // Parse a program. Initializes the parser, reads any number of // statements, and wraps them in a Program node. Optionally takes a // `program` argument. If present, the statements will be appended // to its body instead of creating a new node. pp$8.parseTopLevel = function (node) { var exports = Object.create(null); if (!node.body) { node.body = []; } while (this.type !== types$1.eof) { var stmt = this.parseStatement(null, true, exports); node.body.push(stmt); } if (this.inModule) { for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1) { var name = list[i]; this.raiseRecoverable(this.undefinedExports[name].start, "Export '" + name + "' is not defined"); } } this.adaptDirectivePrologue(node.body); this.next(); node.sourceType = this.options.sourceType; return this.finishNode(node, "Program"); }; var loopLabel = { kind: "loop" }, switchLabel = { kind: "switch" }; pp$8.isLet = function (context) { if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false; } skipWhiteSpace.lastIndex = this.pos; var skip = skipWhiteSpace.exec(this.input); var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); // For ambiguous cases, determine if a LexicalDeclaration (or only a // Statement) is allowed here. If context is not empty then only a Statement // is allowed. However, `let [` is an explicit negative lookahead for // ExpressionStatement, so special-case it first. if (nextCh === 91 || nextCh === 92) { return true; } // '[', '/' if (context) { return false; } if (nextCh === 123 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true; } // '{', astral if (isIdentifierStart(nextCh, true)) { var pos = next + 1; while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) { ++pos; } if (nextCh === 92 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true; } var ident = this.input.slice(next, pos); if (!keywordRelationalOperator.test(ident)) { return true; } } return false; }; // check 'async [no LineTerminator here] function' // - 'async /*foo*/ function' is OK. // - 'async /*\n*/ function' is invalid. pp$8.isAsyncFunction = function () { if (this.options.ecmaVersion < 8 || !this.isContextual("async")) { return false; } skipWhiteSpace.lastIndex = this.pos; var skip = skipWhiteSpace.exec(this.input); var next = this.pos + skip[0].length, after; return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 0xd7ff && after < 0xdc00)); }; // Parse a single statement. // // If expecting a statement and finding a slash operator, parse a // regular expression literal. This is to handle cases like // `if (foo) /blah/.exec(foo)`, where looking at the previous token // does not help. pp$8.parseStatement = function (context, topLevel, exports) { var starttype = this.type, node = this.startNode(), kind; if (this.isLet(context)) { starttype = types$1._var; kind = "let"; } // Most types of statements are recognized by the keyword they // start with. Many are trivial to parse, some require a bit of // complexity. switch (starttype) { case types$1._break: case types$1._continue: return this.parseBreakContinueStatement(node, starttype.keyword); case types$1._debugger: return this.parseDebuggerStatement(node); case types$1._do: return this.parseDoStatement(node); case types$1._for: return this.parseForStatement(node); case types$1._function: // Function as sole body of either an if statement or a labeled statement // works, but not when it is part of a labeled statement that is the sole // body of an if statement. if (context && (this.strict || context !== "if" && context !== "label") && this.options.ecmaVersion >= 6) { this.unexpected(); } return this.parseFunctionStatement(node, false, !context); case types$1._class: if (context) { this.unexpected(); } return this.parseClass(node, true); case types$1._if: return this.parseIfStatement(node); case types$1._return: return this.parseReturnStatement(node); case types$1._switch: return this.parseSwitchStatement(node); case types$1._throw: return this.parseThrowStatement(node); case types$1._try: return this.parseTryStatement(node); case types$1._const: case types$1._var: kind = kind || this.value; if (context && kind !== "var") { this.unexpected(); } return this.parseVarStatement(node, kind); case types$1._while: return this.parseWhileStatement(node); case types$1._with: return this.parseWithStatement(node); case types$1.braceL: return this.parseBlock(true, node); case types$1.semi: return this.parseEmptyStatement(node); case types$1._export: case types$1._import: if (this.options.ecmaVersion > 10 && starttype === types$1._import) { skipWhiteSpace.lastIndex = this.pos; var skip = skipWhiteSpace.exec(this.input); var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); if (nextCh === 40 || nextCh === 46) // '(' or '.' { return this.parseExpressionStatement(node, this.parseExpression()); } } if (!this.options.allowImportExportEverywhere) { if (!topLevel) { this.raise(this.start, "'import' and 'export' may only appear at the top level"); } if (!this.inModule) { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); } } return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports); // If the statement does not start with a statement keyword or a // brace, it's an ExpressionStatement or LabeledStatement. We // simply start parsing an expression, and afterwards, if the // next token is a colon and the expression was a simple // Identifier node, we switch to interpreting it as a label. default: if (this.isAsyncFunction()) { if (context) { this.unexpected(); } this.next(); return this.parseFunctionStatement(node, true, !context); } var maybeName = this.value, expr = this.parseExpression(); if (starttype === types$1.name && expr.type === "Identifier" && this.eat(types$1.colon)) { return this.parseLabeledStatement(node, maybeName, expr, context); } else { return this.parseExpressionStatement(node, expr); } } }; pp$8.parseBreakContinueStatement = function (node, keyword) { var isBreak = keyword === "break"; this.next(); if (this.eat(types$1.semi) || this.insertSemicolon()) { node.label = null; } else if (this.type !== types$1.name) { this.unexpected(); } else { node.label = this.parseIdent(); this.semicolon(); } // Verify that there is an actual destination to break or // continue to. var i = 0; for (; i < this.labels.length; ++i) { var lab = this.labels[i]; if (node.label == null || lab.name === node.label.name) { if (lab.kind != null && (isBreak || lab.kind === "loop")) { break; } if (node.label && isBreak) { break; } } } if (i === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); } return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); }; pp$8.parseDebuggerStatement = function (node) { this.next(); this.semicolon(); return this.finishNode(node, "DebuggerStatement"); }; pp$8.parseDoStatement = function (node) { this.next(); this.labels.push(loopLabel); node.body = this.parseStatement("do"); this.labels.pop(); this.expect(types$1._while); node.test = this.parseParenExpression(); if (this.options.ecmaVersion >= 6) { this.eat(types$1.semi); } else { this.semicolon(); } return this.finishNode(node, "DoWhileStatement"); }; // Disambiguating between a `for` and a `for`/`in` or `for`/`of` // loop is non-trivial. Basically, we have to parse the init `var` // statement or expression, disallowing the `in` operator (see // the second parameter to `parseExpression`), and then check // whether the next token is `in` or `of`. When there is no init // part (semicolon immediately after the opening parenthesis), it // is a regular `for` loop. pp$8.parseForStatement = function (node) { this.next(); var awaitAt = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1; this.labels.push(loopLabel); this.enterScope(0); this.expect(types$1.parenL); if (this.type === types$1.semi) { if (awaitAt > -1) { this.unexpected(awaitAt); } return this.parseFor(node, null); } var isLet = this.isLet(); if (this.type === types$1._var || this.type === types$1._const || isLet) { var init$1 = this.startNode(), kind = isLet ? "let" : this.value; this.next(); this.parseVar(init$1, true, kind); this.finishNode(init$1, "VariableDeclaration"); if ((this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init$1.declarations.length === 1) { if (this.options.ecmaVersion >= 9) { if (this.type === types$1._in) { if (awaitAt > -1) { this.unexpected(awaitAt); } } else { node.await = awaitAt > -1; } } return this.parseForIn(node, init$1); } if (awaitAt > -1) { this.unexpected(awaitAt); } return this.parseFor(node, init$1); } var startsWithLet = this.isContextual("let"), isForOf = false; var refDestructuringErrors = new DestructuringErrors(); var init = this.parseExpression(awaitAt > -1 ? "await" : true, refDestructuringErrors); if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) { if (this.options.ecmaVersion >= 9) { if (this.type === types$1._in) { if (awaitAt > -1) { this.unexpected(awaitAt); } } else { node.await = awaitAt > -1; } } if (startsWithLet && isForOf) { this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'."); } this.toAssignable(init, false, refDestructuringErrors); this.checkLValPattern(init); return this.parseForIn(node, init); } else { this.checkExpressionErrors(refDestructuringErrors, true); } if (awaitAt > -1) { this.unexpected(awaitAt); } return this.parseFor(node, init); }; pp$8.parseFunctionStatement = function (node, isAsync, declarationPosition) { this.next(); return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync); }; pp$8.parseIfStatement = function (node) { this.next(); node.test = this.parseParenExpression(); // allow function declarations in branches, but only in non-strict mode node.consequent = this.parseStatement("if"); node.alternate = this.eat(types$1._else) ? this.parseStatement("if") : null; return this.finishNode(node, "IfStatement"); }; pp$8.parseReturnStatement = function (node) { if (!this.inFunction && !this.options.allowReturnOutsideFunction) { this.raise(this.start, "'return' outside of function"); } this.next(); // In `return` (and `break`/`continue`), the keywords with // optional arguments, we eagerly look for a semicolon or the // possibility to insert one. if (this.eat(types$1.semi) || this.insertSemicolon()) { node.argument = null; } else { node.argument = this.parseExpression(); this.semicolon(); } return this.finishNode(node, "ReturnStatement"); }; pp$8.parseSwitchStatement = function (node) { this.next(); node.discriminant = this.parseParenExpression(); node.cases = []; this.expect(types$1.braceL); this.labels.push(switchLabel); this.enterScope(0); // Statements under must be grouped (by label) in SwitchCase // nodes. `cur` is used to keep the node that we are currently // adding statements to. var cur; for (var sawDefault = false; this.type !== types$1.braceR;) { if (this.type === types$1._case || this.type === types$1._default) { var isCase = this.type === types$1._case; if (cur) { this.finishNode(cur, "SwitchCase"); } node.cases.push(cur = this.startNode()); cur.consequent = []; this.next(); if (isCase) { cur.test = this.parseExpression(); } else { if (sawDefault) { this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"); } sawDefault = true; cur.test = null; } this.expect(types$1.colon); } else { if (!cur) { this.unexpected(); } cur.consequent.push(this.parseStatement(null)); } } this.exitScope(); if (cur) { this.finishNode(cur, "SwitchCase"); } this.next(); // Closing brace this.labels.pop(); return this.finishNode(node, "SwitchStatement"); }; pp$8.parseThrowStatement = function (node) { this.next(); if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) { this.raise(this.lastTokEnd, "Illegal newline after throw"); } node.argument = this.parseExpression(); this.semicolon(); return this.finishNode(node, "ThrowStatement"); }; // Reused empty array added for node fields that are always empty. var empty$1 = []; pp$8.parseCatchClauseParam = function () { var param = this.parseBindingAtom(); var simple = param.type === "Identifier"; this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0); this.checkLValPattern(param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); this.expect(types$1.parenR); return param; }; pp$8.parseTryStatement = function (node) { this.next(); node.block = this.parseBlock(); node.handler = null; if (this.type === types$1._catch) { var clause = this.startNode(); this.next(); if (this.eat(types$1.parenL)) { clause.param = this.parseCatchClauseParam(); } else { if (this.options.ecmaVersion < 10) { this.unexpected(); } clause.param = null; this.enterScope(0); } clause.body = this.parseBlock(false); this.exitScope(); node.handler = this.finishNode(clause, "CatchClause"); } node.finalizer = this.eat(types$1._finally) ? this.parseBlock() : null; if (!node.handler && !node.finalizer) { this.raise(node.start, "Missing catch or finally clause"); } return this.finishNode(node, "TryStatement"); }; pp$8.parseVarStatement = function (node, kind, allowMissingInitializer) { this.next(); this.parseVar(node, false, kind, allowMissingInitializer); this.semicolon(); return this.finishNode(node, "VariableDeclaration"); }; pp$8.parseWhileStatement = function (node) { this.next(); node.test = this.parseParenExpression(); this.labels.push(loopLabel); node.body = this.parseStatement("while"); this.labels.pop(); return this.finishNode(node, "WhileStatement"); }; pp$8.parseWithStatement = function (node) { if (this.strict) { this.raise(this.start, "'with' in strict mode"); } this.next(); node.object = this.parseParenExpression(); node.body = this.parseStatement("with"); return this.finishNode(node, "WithStatement"); }; pp$8.parseEmptyStatement = function (node) { this.next(); return this.finishNode(node, "EmptyStatement"); }; pp$8.parseLabeledStatement = function (node, maybeName, expr, context) { for (var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1) { var label = list[i$1]; if (label.name === maybeName) { this.raise(expr.start, "Label '" + maybeName + "' is already declared"); } } var kind = this.type.isLoop ? "loop" : this.type === types$1._switch ? "switch" : null; for (var i = this.labels.length - 1; i >= 0; i--) { var label$1 = this.labels[i]; if (label$1.statementStart === node.start) { // Update information about previous labels on this node label$1.statementStart = this.start; label$1.kind = kind; } else { break; } } this.labels.push({ name: maybeName, kind: kind, statementStart: this.start }); node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); this.labels.pop(); node.label = expr; return this.finishNode(node, "LabeledStatement"); }; pp$8.parseExpressionStatement = function (node, expr) { node.expression = expr; this.semicolon(); return this.finishNode(node, "ExpressionStatement"); }; // Parse a semicolon-enclosed block of statements, handling `"use // strict"` declarations when `allowStrict` is true (used for // function bodies). pp$8.parseBlock = function (createNewLexicalScope, node, exitStrict) { if (createNewLexicalScope === void 0) createNewLexicalScope = true; if (node === void 0) node = this.startNode(); node.body = []; this.expect(types$1.braceL); if (createNewLexicalScope) { this.enterScope(0); } while (this.type !== types$1.braceR) { var stmt = this.parseStatement(null); node.body.push(stmt); } if (exitStrict) { this.strict = false; } this.next(); if (createNewLexicalScope) { this.exitScope(); } return this.finishNode(node, "BlockStatement"); }; // Parse a regular `for` loop. The disambiguation code in // `parseStatement` will already have parsed the init statement or // expression. pp$8.parseFor = function (node, init) { node.init = init; this.expect(types$1.semi); node.test = this.type === types$1.semi ? null : this.parseExpression(); this.expect(types$1.semi); node.update = this.type === types$1.parenR ? null : this.parseExpression(); this.expect(types$1.parenR); node.body = this.parseStatement("for"); this.exitScope(); this.labels.pop(); return this.finishNode(node, "ForStatement"); }; // Parse a `for`/`in` and `for`/`of` loop, which are almost // same from parser's perspective. pp$8.parseForIn = function (node, init) { var isForIn = this.type === types$1._in; this.next(); if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.options.ecmaVersion < 8 || this.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) { this.raise(init.start, (isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"); } node.left = init; node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(); this.expect(types$1.parenR); node.body = this.parseStatement("for"); this.exitScope(); this.labels.pop(); return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement"); }; // Parse a list of variable declarations. pp$8.parseVar = function (node, isFor, kind, allowMissingInitializer) { node.declarations = []; node.kind = kind; for (;;) { var decl = this.startNode(); this.parseVarId(decl, kind); if (this.eat(types$1.eq)) { decl.init = this.parseMaybeAssign(isFor); } else if (!allowMissingInitializer && kind === "const" && !(this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) { this.unexpected(); } else if (!allowMissingInitializer && decl.id.type !== "Identifier" && !(isFor && (this.type === types$1._in || this.isContextual("of")))) { this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); } else { decl.init = null; } node.declarations.push(this.finishNode(decl, "VariableDeclarator")); if (!this.eat(types$1.comma)) { break; } } return node; }; pp$8.parseVarId = function (decl, kind) { decl.id = this.parseBindingAtom(); this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); }; var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4; // Parse a function declaration or literal (depending on the // `statement & FUNC_STATEMENT`). // Remove `allowExpressionBody` for 7.0.0, as it is only called with false pp$8.parseFunction = function (node, statement, allowExpressionBody, isAsync, forInit) { this.initFunction(node); if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) { if (this.type === types$1.star && statement & FUNC_HANGING_STATEMENT) { this.unexpected(); } node.generator = this.eat(types$1.star); } if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } if (statement & FUNC_STATEMENT) { node.id = statement & FUNC_NULLABLE_ID && this.type !== types$1.name ? null : this.parseIdent(); if (node.id && !(statement & FUNC_HANGING_STATEMENT)) // If it is a regular function declaration in sloppy mode, then it is // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding // mode depends on properties of the current scope (see // treatFunctionsAsVar). { this.checkLValSimple(node.id, this.strict || node.generator || node.async ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); } } var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; this.yieldPos = 0; this.awaitPos = 0; this.awaitIdentPos = 0; this.enterScope(functionFlags(node.async, node.generator)); if (!(statement & FUNC_STATEMENT)) { node.id = this.type === types$1.name ? this.parseIdent() : null; } this.parseFunctionParams(node); this.parseFunctionBody(node, allowExpressionBody, false, forInit); this.yieldPos = oldYieldPos; this.awaitPos = oldAwaitPos; this.awaitIdentPos = oldAwaitIdentPos; return this.finishNode(node, statement & FUNC_STATEMENT ? "FunctionDeclaration" : "FunctionExpression"); }; pp$8.parseFunctionParams = function (node) { this.expect(types$1.parenL); node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8); this.checkYieldAwaitInDefaultParams(); }; // Parse a class declaration or literal (depending on the // `isStatement` parameter). pp$8.parseClass = function (node, isStatement) { this.next(); // ecma-262 14.6 Class Definitions // A class definition is always strict mode code. var oldStrict = this.strict; this.strict = true; this.parseClassId(node, isStatement); this.parseClassSuper(node); var privateNameMap = this.enterClassBody(); var classBody = this.startNode(); var hadConstructor = false; classBody.body = []; this.expect(types$1.braceL); while (this.type !== types$1.braceR) { var element = this.parseClassElement(node.superClass !== null); if (element) { classBody.body.push(element); if (element.type === "MethodDefinition" && element.kind === "constructor") { if (hadConstructor) { this.raiseRecoverable(element.start, "Duplicate constructor in the same class"); } hadConstructor = true; } else if (element.key && element.key.type === "PrivateIdentifier" && isPrivateNameConflicted(privateNameMap, element)) { this.raiseRecoverable(element.key.start, "Identifier '#" + element.key.name + "' has already been declared"); } } } this.strict = oldStrict; this.next(); node.body = this.finishNode(classBody, "ClassBody"); this.exitClassBody(); return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); }; pp$8.parseClassElement = function (constructorAllowsSuper) { if (this.eat(types$1.semi)) { return null; } var ecmaVersion = this.options.ecmaVersion; var node = this.startNode(); var keyName = ""; var isGenerator = false; var isAsync = false; var kind = "method"; var isStatic = false; if (this.eatContextual("static")) { // Parse static init block if (ecmaVersion >= 13 && this.eat(types$1.braceL)) { this.parseClassStaticBlock(node); return node; } if (this.isClassElementNameStart() || this.type === types$1.star) { isStatic = true; } else { keyName = "static"; } } node.static = isStatic; if (!keyName && ecmaVersion >= 8 && this.eatContextual("async")) { if ((this.isClassElementNameStart() || this.type === types$1.star) && !this.canInsertSemicolon()) { isAsync = true; } else { keyName = "async"; } } if (!keyName && (ecmaVersion >= 9 || !isAsync) && this.eat(types$1.star)) { isGenerator = true; } if (!keyName && !isAsync && !isGenerator) { var lastValue = this.value; if (this.eatContextual("get") || this.eatContextual("set")) { if (this.isClassElementNameStart()) { kind = lastValue; } else { keyName = lastValue; } } } // Parse element name if (keyName) { // 'async', 'get', 'set', or 'static' were not a keyword contextually. // The last token is any of those. Make it the element name. node.computed = false; node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc); node.key.name = keyName; this.finishNode(node.key, "Identifier"); } else { this.parseClassElementName(node); } // Parse element value if (ecmaVersion < 13 || this.type === types$1.parenL || kind !== "method" || isGenerator || isAsync) { var isConstructor = !node.static && checkKeyName(node, "constructor"); var allowsDirectSuper = isConstructor && constructorAllowsSuper; // Couldn't move this check into the 'parseClassMethod' method for backward compatibility. if (isConstructor && kind !== "method") { this.raise(node.key.start, "Constructor can't have get/set modifier"); } node.kind = isConstructor ? "constructor" : kind; this.parseClassMethod(node, isGenerator, isAsync, allowsDirectSuper); } else { this.parseClassField(node); } return node; }; pp$8.isClassElementNameStart = function () { return this.type === types$1.name || this.type === types$1.privateId || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword; }; pp$8.parseClassElementName = function (element) { if (this.type === types$1.privateId) { if (this.value === "constructor") { this.raise(this.start, "Classes can't have an element named '#constructor'"); } element.computed = false; element.key = this.parsePrivateIdent(); } else { this.parsePropertyName(element); } }; pp$8.parseClassMethod = function (method, isGenerator, isAsync, allowsDirectSuper) { // Check key and flags var key = method.key; if (method.kind === "constructor") { if (isGenerator) { this.raise(key.start, "Constructor can't be a generator"); } if (isAsync) { this.raise(key.start, "Constructor can't be an async method"); } } else if (method.static && checkKeyName(method, "prototype")) { this.raise(key.start, "Classes may not have a static property named prototype"); } // Parse value var value = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper); // Check value if (method.kind === "get" && value.params.length !== 0) { this.raiseRecoverable(value.start, "getter should have no params"); } if (method.kind === "set" && value.params.length !== 1) { this.raiseRecoverable(value.start, "setter should have exactly one param"); } if (method.kind === "set" && value.params[0].type === "RestElement") { this.raiseRecoverable(value.params[0].start, "Setter cannot use rest params"); } return this.finishNode(method, "MethodDefinition"); }; pp$8.parseClassField = function (field) { if (checkKeyName(field, "constructor")) { this.raise(field.key.start, "Classes can't have a field named 'constructor'"); } else if (field.static && checkKeyName(field, "prototype")) { this.raise(field.key.start, "Classes can't have a static field named 'prototype'"); } if (this.eat(types$1.eq)) { // To raise SyntaxError if 'arguments' exists in the initializer. var scope = this.currentThisScope(); var inClassFieldInit = scope.inClassFieldInit; scope.inClassFieldInit = true; field.value = this.parseMaybeAssign(); scope.inClassFieldInit = inClassFieldInit; } else { field.value = null; } this.semicolon(); return this.finishNode(field, "PropertyDefinition"); }; pp$8.parseClassStaticBlock = function (node) { node.body = []; var oldLabels = this.labels; this.labels = []; this.enterScope(SCOPE_CLASS_STATIC_BLOCK | SCOPE_SUPER); while (this.type !== types$1.braceR) { var stmt = this.parseStatement(null); node.body.push(stmt); } this.next(); this.exitScope(); this.labels = oldLabels; return this.finishNode(node, "StaticBlock"); }; pp$8.parseClassId = function (node, isStatement) { if (this.type === types$1.name) { node.id = this.parseIdent(); if (isStatement) { this.checkLValSimple(node.id, BIND_LEXICAL, false); } } else { if (isStatement === true) { this.unexpected(); } node.id = null; } }; pp$8.parseClassSuper = function (node) { node.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts(null, false) : null; }; pp$8.enterClassBody = function () { var element = { declared: Object.create(null), used: [] }; this.privateNameStack.push(element); return element.declared; }; pp$8.exitClassBody = function () { var ref = this.privateNameStack.pop(); var declared = ref.declared; var used = ref.used; if (!this.options.checkPrivateFields) { return; } var len = this.privateNameStack.length; var parent = len === 0 ? null : this.privateNameStack[len - 1]; for (var i = 0; i < used.length; ++i) { var id = used[i]; if (!hasOwn(declared, id.name)) { if (parent) { parent.used.push(id); } else { this.raiseRecoverable(id.start, "Private field '#" + id.name + "' must be declared in an enclosing class"); } } } }; function isPrivateNameConflicted(privateNameMap, element) { var name = element.key.name; var curr = privateNameMap[name]; var next = "true"; if (element.type === "MethodDefinition" && (element.kind === "get" || element.kind === "set")) { next = (element.static ? "s" : "i") + element.kind; } // `class { get #a(){}; static set #a(_){} }` is also conflict. if (curr === "iget" && next === "iset" || curr === "iset" && next === "iget" || curr === "sget" && next === "sset" || curr === "sset" && next === "sget") { privateNameMap[name] = "true"; return false; } else if (!curr) { privateNameMap[name] = next; return false; } else { return true; } } function checkKeyName(node, name) { var computed = node.computed; var key = node.key; return !computed && (key.type === "Identifier" && key.name === name || key.type === "Literal" && key.value === name); } // Parses module export declaration. pp$8.parseExportAllDeclaration = function (node, exports) { if (this.options.ecmaVersion >= 11) { if (this.eatContextual("as")) { node.exported = this.parseModuleExportName(); this.checkExport(exports, node.exported, this.lastTokStart); } else { node.exported = null; } } this.expectContextual("from"); if (this.type !== types$1.string) { this.unexpected(); } node.source = this.parseExprAtom(); this.semicolon(); return this.finishNode(node, "ExportAllDeclaration"); }; pp$8.parseExport = function (node, exports) { this.next(); // export * from '...' if (this.eat(types$1.star)) { return this.parseExportAllDeclaration(node, exports); } if (this.eat(types$1._default)) { // export default ... this.checkExport(exports, "default", this.lastTokStart); node.declaration = this.parseExportDefaultDeclaration(); return this.finishNode(node, "ExportDefaultDeclaration"); } // export var|const|let|function|class ... if (this.shouldParseExportStatement()) { node.declaration = this.parseExportDeclaration(node); if (node.declaration.type === "VariableDeclaration") { this.checkVariableExport(exports, node.declaration.declarations); } else { this.checkExport(exports, node.declaration.id, node.declaration.id.start); } node.specifiers = []; node.source = null; } else { // export { x, y as z } [from '...'] node.declaration = null; node.specifiers = this.parseExportSpecifiers(exports); if (this.eatContextual("from")) { if (this.type !== types$1.string) { this.unexpected(); } node.source = this.parseExprAtom(); } else { for (var i = 0, list = node.specifiers; i < list.length; i += 1) { // check for keywords used as local names var spec = list[i]; this.checkUnreserved(spec.local); // check if export is defined this.checkLocalExport(spec.local); if (spec.local.type === "Literal") { this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`."); } } node.source = null; } this.semicolon(); } return this.finishNode(node, "ExportNamedDeclaration"); }; pp$8.parseExportDeclaration = function (node) { return this.parseStatement(null); }; pp$8.parseExportDefaultDeclaration = function () { var isAsync; if (this.type === types$1._function || (isAsync = this.isAsyncFunction())) { var fNode = this.startNode(); this.next(); if (isAsync) { this.next(); } return this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync); } else if (this.type === types$1._class) { var cNode = this.startNode(); return this.parseClass(cNode, "nullableID"); } else { var declaration = this.parseMaybeAssign(); this.semicolon(); return declaration; } }; pp$8.checkExport = function (exports, name, pos) { if (!exports) { return; } if (typeof name !== "string") { name = name.type === "Identifier" ? name.name : name.value; } if (hasOwn(exports, name)) { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); } exports[name] = true; }; pp$8.checkPatternExport = function (exports, pat) { var type = pat.type; if (type === "Identifier") { this.checkExport(exports, pat, pat.start); } else if (type === "ObjectPattern") { for (var i = 0, list = pat.properties; i < list.length; i += 1) { var prop = list[i]; this.checkPatternExport(exports, prop); } } else if (type === "ArrayPattern") { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { var elt = list$1[i$1]; if (elt) { this.checkPatternExport(exports, elt); } } } else if (type === "Property") { this.checkPatternExport(exports, pat.value); } else if (type === "AssignmentPattern") { this.checkPatternExport(exports, pat.left); } else if (type === "RestElement") { this.checkPatternExport(exports, pat.argument); } }; pp$8.checkVariableExport = function (exports, decls) { if (!exports) { return; } for (var i = 0, list = decls; i < list.length; i += 1) { var decl = list[i]; this.checkPatternExport(exports, decl.id); } }; pp$8.shouldParseExportStatement = function () { return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction(); }; // Parses a comma-separated list of module exports. pp$8.parseExportSpecifier = function (exports) { var node = this.startNode(); node.local = this.parseModuleExportName(); node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local; this.checkExport(exports, node.exported, node.exported.start); return this.finishNode(node, "ExportSpecifier"); }; pp$8.parseExportSpecifiers = function (exports) { var nodes = [], first = true; // export { x, y as z } [from '...'] this.expect(types$1.braceL); while (!this.eat(types$1.braceR)) { if (!first) { this.expect(types$1.comma); if (this.afterTrailingComma(types$1.braceR)) { break; } } else { first = false; } nodes.push(this.parseExportSpecifier(exports)); } return nodes; }; // Parses import declaration. pp$8.parseImport = function (node) { this.next(); // import '...' if (this.type === types$1.string) { node.specifiers = empty$1; node.source = this.parseExprAtom(); } else { node.specifiers = this.parseImportSpecifiers(); this.expectContextual("from"); node.source = this.type === types$1.string ? this.parseExprAtom() : this.unexpected(); } this.semicolon(); return this.finishNode(node, "ImportDeclaration"); }; // Parses a comma-separated list of module imports. pp$8.parseImportSpecifier = function () { var node = this.startNode(); node.imported = this.parseModuleExportName(); if (this.eatContextual("as")) { node.local = this.parseIdent(); } else { this.checkUnreserved(node.imported); node.local = node.imported; } this.checkLValSimple(node.local, BIND_LEXICAL); return this.finishNode(node, "ImportSpecifier"); }; pp$8.parseImportDefaultSpecifier = function () { // import defaultObj, { x, y as z } from '...' var node = this.startNode(); node.local = this.parseIdent(); this.checkLValSimple(node.local, BIND_LEXICAL); return this.finishNode(node, "ImportDefaultSpecifier"); }; pp$8.parseImportNamespaceSpecifier = function () { var node = this.startNode(); this.next(); this.expectContextual("as"); node.local = this.parseIdent(); this.checkLValSimple(node.local, BIND_LEXICAL); return this.finishNode(node, "ImportNamespaceSpecifier"); }; pp$8.parseImportSpecifiers = function () { var nodes = [], first = true; if (this.type === types$1.name) { nodes.push(this.parseImportDefaultSpecifier()); if (!this.eat(types$1.comma)) { return nodes; } } if (this.type === types$1.star) { nodes.push(this.parseImportNamespaceSpecifier()); return nodes; } this.expect(types$1.braceL); while (!this.eat(types$1.braceR)) { if (!first) { this.expect(types$1.comma); if (this.afterTrailingComma(types$1.braceR)) { break; } } else { first = false; } nodes.push(this.parseImportSpecifier()); } return nodes; }; pp$8.parseModuleExportName = function () { if (this.options.ecmaVersion >= 13 && this.type === types$1.string) { var stringLiteral = this.parseLiteral(this.value); if (loneSurrogate.test(stringLiteral.value)) { this.raise(stringLiteral.start, "An export name cannot include a lone surrogate."); } return stringLiteral; } return this.parseIdent(true); }; // Set `ExpressionStatement#directive` property for directive prologues. pp$8.adaptDirectivePrologue = function (statements) { for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) { statements[i].directive = statements[i].expression.raw.slice(1, -1); } }; pp$8.isDirectiveCandidate = function (statement) { return this.options.ecmaVersion >= 5 && statement.type === "ExpressionStatement" && statement.expression.type === "Literal" && typeof statement.expression.value === "string" && ( // Reject parenthesized strings. this.input[statement.start] === "\"" || this.input[statement.start] === "'"); }; var pp$7 = Parser.prototype; // Convert existing expression atom to assignable pattern // if possible. pp$7.toAssignable = function (node, isBinding, refDestructuringErrors) { if (this.options.ecmaVersion >= 6 && node) { switch (node.type) { case "Identifier": if (this.inAsync && node.name === "await") { this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); } break; case "ObjectPattern": case "ArrayPattern": case "AssignmentPattern": case "RestElement": break; case "ObjectExpression": node.type = "ObjectPattern"; if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } for (var i = 0, list = node.properties; i < list.length; i += 1) { var prop = list[i]; this.toAssignable(prop, isBinding); // Early error: // AssignmentRestProperty[Yield, Await] : // `...` DestructuringAssignmentTarget[Yield, Await] // // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|. if (prop.type === "RestElement" && (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern")) { this.raise(prop.argument.start, "Unexpected token"); } } break; case "Property": // AssignmentProperty has type === "Property" if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); } this.toAssignable(node.value, isBinding); break; case "ArrayExpression": node.type = "ArrayPattern"; if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } this.toAssignableList(node.elements, isBinding); break; case "SpreadElement": node.type = "RestElement"; this.toAssignable(node.argument, isBinding); if (node.argument.type === "AssignmentPattern") { this.raise(node.argument.start, "Rest elements cannot have a default value"); } break; case "AssignmentExpression": if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); } node.type = "AssignmentPattern"; delete node.operator; this.toAssignable(node.left, isBinding); break; case "ParenthesizedExpression": this.toAssignable(node.expression, isBinding, refDestructuringErrors); break; case "ChainExpression": this.raiseRecoverable(node.start, "Optional chaining cannot appear in left-hand side"); break; case "MemberExpression": if (!isBinding) { break; } default: this.raise(node.start, "Assigning to rvalue"); } } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } return node; }; // Convert list of expression atoms to binding list. pp$7.toAssignableList = function (exprList, isBinding) { var end = exprList.length; for (var i = 0; i < end; i++) { var elt = exprList[i]; if (elt) { this.toAssignable(elt, isBinding); } } if (end) { var last = exprList[end - 1]; if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") { this.unexpected(last.argument.start); } } return exprList; }; // Parses spread element. pp$7.parseSpread = function (refDestructuringErrors) { var node = this.startNode(); this.next(); node.argument = this.parseMaybeAssign(false, refDestructuringErrors); return this.finishNode(node, "SpreadElement"); }; pp$7.parseRestBinding = function () { var node = this.startNode(); this.next(); // RestElement inside of a function parameter must be an identifier if (this.options.ecmaVersion === 6 && this.type !== types$1.name) { this.unexpected(); } node.argument = this.parseBindingAtom(); return this.finishNode(node, "RestElement"); }; // Parses lvalue (assignable) atom. pp$7.parseBindingAtom = function () { if (this.options.ecmaVersion >= 6) { switch (this.type) { case types$1.bracketL: var node = this.startNode(); this.next(); node.elements = this.parseBindingList(types$1.bracketR, true, true); return this.finishNode(node, "ArrayPattern"); case types$1.braceL: return this.parseObj(true); } } return this.parseIdent(); }; pp$7.parseBindingList = function (close, allowEmpty, allowTrailingComma, allowModifiers) { var elts = [], first = true; while (!this.eat(close)) { if (first) { first = false; } else { this.expect(types$1.comma); } if (allowEmpty && this.type === types$1.comma) { elts.push(null); } else if (allowTrailingComma && this.afterTrailingComma(close)) { break; } else if (this.type === types$1.ellipsis) { var rest = this.parseRestBinding(); this.parseBindingListItem(rest); elts.push(rest); if (this.type === types$1.comma) { this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"); } this.expect(close); break; } else { elts.push(this.parseAssignableListItem(allowModifiers)); } } return elts; }; pp$7.parseAssignableListItem = function (allowModifiers) { var elem = this.parseMaybeDefault(this.start, this.startLoc); this.parseBindingListItem(elem); return elem; }; pp$7.parseBindingListItem = function (param) { return param; }; // Parses assignment pattern around given atom if possible. pp$7.parseMaybeDefault = function (startPos, startLoc, left) { left = left || this.parseBindingAtom(); if (this.options.ecmaVersion < 6 || !this.eat(types$1.eq)) { return left; } var node = this.startNodeAt(startPos, startLoc); node.left = left; node.right = this.parseMaybeAssign(); return this.finishNode(node, "AssignmentPattern"); }; // The following three functions all verify that a node is an lvalue — // something that can be bound, or assigned to. In order to do so, they perform // a variety of checks: // // - Check that none of the bound/assigned-to identifiers are reserved words. // - Record name declarations for bindings in the appropriate scope. // - Check duplicate argument names, if checkClashes is set. // // If a complex binding pattern is encountered (e.g., object and array // destructuring), the entire pattern is recursively checked. // // There are three versions of checkLVal*() appropriate for different // circumstances: // // - checkLValSimple() shall be used if the syntactic construct supports // nothing other than identifiers and member expressions. Parenthesized // expressions are also correctly handled. This is generally appropriate for // constructs for which the spec says // // > It is a Syntax Error if AssignmentTargetType of [the production] is not // > simple. // // It is also appropriate for checking if an identifier is valid and not // defined elsewhere, like import declarations or function/class identifiers. // // Examples where this is used include: // a += …; // import a from '…'; // where a is the node to be checked. // // - checkLValPattern() shall be used if the syntactic construct supports // anything checkLValSimple() supports, as well as object and array // destructuring patterns. This is generally appropriate for constructs for // which the spec says // // > It is a Syntax Error if [the production] is neither an ObjectLiteral nor // > an ArrayLiteral and AssignmentTargetType of [the production] is not // > simple. // // Examples where this is used include: // (a = …); // const a = …; // try { … } catch (a) { … } // where a is the node to be checked. // // - checkLValInnerPattern() shall be used if the syntactic construct supports // anything checkLValPattern() supports, as well as default assignment // patterns, rest elements, and other constructs that may appear within an // object or array destructuring pattern. // // As a special case, function parameters also use checkLValInnerPattern(), // as they also support defaults and rest constructs. // // These functions deliberately support both assignment and binding constructs, // as the logic for both is exceedingly similar. If the node is the target of // an assignment, then bindingType should be set to BIND_NONE. Otherwise, it // should be set to the appropriate BIND_* constant, like BIND_VAR or // BIND_LEXICAL. // // If the function is called with a non-BIND_NONE bindingType, then // additionally a checkClashes object may be specified to allow checking for // duplicate argument names. checkClashes is ignored if the provided construct // is an assignment (i.e., bindingType is BIND_NONE). pp$7.checkLValSimple = function (expr, bindingType, checkClashes) { if (bindingType === void 0) bindingType = BIND_NONE; var isBind = bindingType !== BIND_NONE; switch (expr.type) { case "Identifier": if (this.strict && this.reservedWordsStrictBind.test(expr.name)) { this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } if (isBind) { if (bindingType === BIND_LEXICAL && expr.name === "let") { this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); } if (checkClashes) { if (hasOwn(checkClashes, expr.name)) { this.raiseRecoverable(expr.start, "Argument name clash"); } checkClashes[expr.name] = true; } if (bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } } break; case "ChainExpression": this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side"); break; case "MemberExpression": if (isBind) { this.raiseRecoverable(expr.start, "Binding member expression"); } break; case "ParenthesizedExpression": if (isBind) { this.raiseRecoverable(expr.start, "Binding parenthesized expression"); } return this.checkLValSimple(expr.expression, bindingType, checkClashes); default: this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue"); } }; pp$7.checkLValPattern = function (expr, bindingType, checkClashes) { if (bindingType === void 0) bindingType = BIND_NONE; switch (expr.type) { case "ObjectPattern": for (var i = 0, list = expr.properties; i < list.length; i += 1) { var prop = list[i]; this.checkLValInnerPattern(prop, bindingType, checkClashes); } break; case "ArrayPattern": for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { var elem = list$1[i$1]; if (elem) { this.checkLValInnerPattern(elem, bindingType, checkClashes); } } break; default: this.checkLValSimple(expr, bindingType, checkClashes); } }; pp$7.checkLValInnerPattern = function (expr, bindingType, checkClashes) { if (bindingType === void 0) bindingType = BIND_NONE; switch (expr.type) { case "Property": // AssignmentProperty has type === "Property" this.checkLValInnerPattern(expr.value, bindingType, checkClashes); break; case "AssignmentPattern": this.checkLValPattern(expr.left, bindingType, checkClashes); break; case "RestElement": this.checkLValPattern(expr.argument, bindingType, checkClashes); break; default: this.checkLValPattern(expr, bindingType, checkClashes); } }; // The algorithm used to determine whether a regexp can appear at a // given point in the program is loosely based on sweet.js' approach. // See https://github.com/mozilla/sweet.js/wiki/design var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) { this.token = token; this.isExpr = !!isExpr; this.preserveSpace = !!preserveSpace; this.override = override; this.generator = !!generator; }; var types = { b_stat: new TokContext("{", false), b_expr: new TokContext("{", true), b_tmpl: new TokContext("${", false), p_stat: new TokContext("(", false), p_expr: new TokContext("(", true), q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }), f_stat: new TokContext("function", false), f_expr: new TokContext("function", true), f_expr_gen: new TokContext("function", true, false, null, true), f_gen: new TokContext("function", false, false, null, true) }; var pp$6 = Parser.prototype; pp$6.initialContext = function () { return [types.b_stat]; }; pp$6.curContext = function () { return this.context[this.context.length - 1]; }; pp$6.braceIsBlock = function (prevType) { var parent = this.curContext(); if (parent === types.f_expr || parent === types.f_stat) { return true; } if (prevType === types$1.colon && (parent === types.b_stat || parent === types.b_expr)) { return !parent.isExpr; } // The check for `tt.name && exprAllowed` detects whether we are // after a `yield` or `of` construct. See the `updateContext` for // `tt.name`. if (prevType === types$1._return || prevType === types$1.name && this.exprAllowed) { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); } if (prevType === types$1._else || prevType === types$1.semi || prevType === types$1.eof || prevType === types$1.parenR || prevType === types$1.arrow) { return true; } if (prevType === types$1.braceL) { return parent === types.b_stat; } if (prevType === types$1._var || prevType === types$1._const || prevType === types$1.name) { return false; } return !this.exprAllowed; }; pp$6.inGeneratorContext = function () { for (var i = this.context.length - 1; i >= 1; i--) { var context = this.context[i]; if (context.token === "function") { return context.generator; } } return false; }; pp$6.updateContext = function (prevType) { var update, type = this.type; if (type.keyword && prevType === types$1.dot) { this.exprAllowed = false; } else if (update = type.updateContext) { update.call(this, prevType); } else { this.exprAllowed = type.beforeExpr; } }; // Used to handle edge cases when token context could not be inferred correctly during tokenization phase pp$6.overrideContext = function (tokenCtx) { if (this.curContext() !== tokenCtx) { this.context[this.context.length - 1] = tokenCtx; } }; // Token-specific context update code types$1.parenR.updateContext = types$1.braceR.updateContext = function () { if (this.context.length === 1) { this.exprAllowed = true; return; } var out = this.context.pop(); if (out === types.b_stat && this.curContext().token === "function") { out = this.context.pop(); } this.exprAllowed = !out.isExpr; }; types$1.braceL.updateContext = function (prevType) { this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr); this.exprAllowed = true; }; types$1.dollarBraceL.updateContext = function () { this.context.push(types.b_tmpl); this.exprAllowed = true; }; types$1.parenL.updateContext = function (prevType) { var statementParens = prevType === types$1._if || prevType === types$1._for || prevType === types$1._with || prevType === types$1._while; this.context.push(statementParens ? types.p_stat : types.p_expr); this.exprAllowed = true; }; types$1.incDec.updateContext = function () { // tokExprAllowed stays unchanged }; types$1._function.updateContext = types$1._class.updateContext = function (prevType) { if (prevType.beforeExpr && prevType !== types$1._else && !(prevType === types$1.semi && this.curContext() !== types.p_stat) && !(prevType === types$1._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && !((prevType === types$1.colon || prevType === types$1.braceL) && this.curContext() === types.b_stat)) { this.context.push(types.f_expr); } else { this.context.push(types.f_stat); } this.exprAllowed = false; }; types$1.colon.updateContext = function () { if (this.curContext().token === "function") { this.context.pop(); } this.exprAllowed = true; }; types$1.backQuote.updateContext = function () { if (this.curContext() === types.q_tmpl) { this.context.pop(); } else { this.context.push(types.q_tmpl); } this.exprAllowed = false; }; types$1.star.updateContext = function (prevType) { if (prevType === types$1._function) { var index = this.context.length - 1; if (this.context[index] === types.f_expr) { this.context[index] = types.f_expr_gen; } else { this.context[index] = types.f_gen; } } this.exprAllowed = true; }; types$1.name.updateContext = function (prevType) { var allowed = false; if (this.options.ecmaVersion >= 6 && prevType !== types$1.dot) { if (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) { allowed = true; } } this.exprAllowed = allowed; }; // A recursive descent parser operates by defining functions for all // syntactic elements, and recursively calling those, each function // advancing the input stream and returning an AST node. Precedence // of constructs (for example, the fact that `!x[1]` means `!(x[1])` // instead of `(!x)[1]` is handled by the fact that the parser // function that parses unary prefix operators is called first, and // in turn calls the function that parses `[]` subscripts — that // way, it'll receive the node for `x[1]` already parsed, and wraps // *that* in the unary operator node. // // Acorn uses an [operator precedence parser][opp] to handle binary // operator precedence, because it is much more compact than using // the technique outlined above, which uses different, nesting // functions to specify precedence, for all of the ten binary // precedence levels that JavaScript defines. // // [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser var pp$5 = Parser.prototype; // Check if property name clashes with already added. // Object/class getters and setters are not allowed to clash — // either with each other or with an init property — and in // strict mode, init properties are also not allowed to be repeated. pp$5.checkPropClash = function (prop, propHash, refDestructuringErrors) { if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") { return; } if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) { return; } var key = prop.key; var name; switch (key.type) { case "Identifier": name = key.name; break; case "Literal": name = String(key.value); break; default: return; } var kind = prop.kind; if (this.options.ecmaVersion >= 6) { if (name === "__proto__" && kind === "init") { if (propHash.proto) { if (refDestructuringErrors) { if (refDestructuringErrors.doubleProto < 0) { refDestructuringErrors.doubleProto = key.start; } } else { this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); } } propHash.proto = true; } return; } name = "$" + name; var other = propHash[name]; if (other) { var redefinition; if (kind === "init") { redefinition = this.strict && other.init || other.get || other.set; } else { redefinition = other.init || other[kind]; } if (redefinition) { this.raiseRecoverable(key.start, "Redefinition of property"); } } else { other = propHash[name] = { init: false, get: false, set: false }; } other[kind] = true; }; // ### Expression parsing // These nest, from the most general expression type at the top to // 'atomic', nondivisible expression types at the bottom. Most of // the functions will simply let the function(s) below them parse, // and, *if* the syntactic construct they handle is present, wrap // the AST node that the inner parser gave them in another node. // Parse a full expression. The optional arguments are used to // forbid the `in` operator (in for loops initalization expressions) // and provide reference for storing '=' operator inside shorthand // property assignment in contexts where both object expression // and object pattern might appear (so it's possible to raise // delayed syntax error at correct position). pp$5.parseExpression = function (forInit, refDestructuringErrors) { var startPos = this.start, startLoc = this.startLoc; var expr = this.parseMaybeAssign(forInit, refDestructuringErrors); if (this.type === types$1.comma) { var node = this.startNodeAt(startPos, startLoc); node.expressions = [expr]; while (this.eat(types$1.comma)) { node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors)); } return this.finishNode(node, "SequenceExpression"); } return expr; }; // Parse an assignment expression. This includes applications of // operators like `+=`. pp$5.parseMaybeAssign = function (forInit, refDestructuringErrors, afterLeftParse) { if (this.isContextual("yield")) { if (this.inGenerator) { return this.parseYield(forInit); } // The tokenizer will assume an expression is allowed after // `yield`, but this isn't that kind of yield else { this.exprAllowed = false; } } var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1; if (refDestructuringErrors) { oldParenAssign = refDestructuringErrors.parenthesizedAssign; oldTrailingComma = refDestructuringErrors.trailingComma; oldDoubleProto = refDestructuringErrors.doubleProto; refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1; } else { refDestructuringErrors = new DestructuringErrors(); ownDestructuringErrors = true; } var startPos = this.start, startLoc = this.startLoc; if (this.type === types$1.parenL || this.type === types$1.name) { this.potentialArrowAt = this.start; this.potentialArrowInForAwait = forInit === "await"; } var left = this.parseMaybeConditional(forInit, refDestructuringErrors); if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); } if (this.type.isAssign) { var node = this.startNodeAt(startPos, startLoc); node.operator = this.value; if (this.type === types$1.eq) { left = this.toAssignable(left, false, refDestructuringErrors); } if (!ownDestructuringErrors) { refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1; } if (refDestructuringErrors.shorthandAssign >= left.start) { refDestructuringErrors.shorthandAssign = -1; } // reset because shorthand default was used correctly if (this.type === types$1.eq) { this.checkLValPattern(left); } else { this.checkLValSimple(left); } node.left = left; this.next(); node.right = this.parseMaybeAssign(forInit); if (oldDoubleProto > -1) { refDestructuringErrors.doubleProto = oldDoubleProto; } return this.finishNode(node, "AssignmentExpression"); } else { if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); } } if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; } if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; } return left; }; // Parse a ternary conditional (`?:`) operator. pp$5.parseMaybeConditional = function (forInit, refDestructuringErrors) { var startPos = this.start, startLoc = this.startLoc; var expr = this.parseExprOps(forInit, refDestructuringErrors); if (this.checkExpressionErrors(refDestructuringErrors)) { return expr; } if (this.eat(types$1.question)) { var node = this.startNodeAt(startPos, startLoc); node.test = expr; node.consequent = this.parseMaybeAssign(); this.expect(types$1.colon); node.alternate = this.parseMaybeAssign(forInit); return this.finishNode(node, "ConditionalExpression"); } return expr; }; // Start the precedence parser. pp$5.parseExprOps = function (forInit, refDestructuringErrors) { var startPos = this.start, startLoc = this.startLoc; var expr = this.parseMaybeUnary(refDestructuringErrors, false, false, forInit); if (this.checkExpressionErrors(refDestructuringErrors)) { return expr; } return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit); }; // Parse binary operators with the operator precedence parsing // algorithm. `left` is the left-hand side of the operator. // `minPrec` provides context that allows the function to stop and // defer further parser to one of its callers when it encounters an // operator that has a lower precedence than the set it is parsing. pp$5.parseExprOp = function (left, leftStartPos, leftStartLoc, minPrec, forInit) { var prec = this.type.binop; if (prec != null && (!forInit || this.type !== types$1._in)) { if (prec > minPrec) { var logical = this.type === types$1.logicalOR || this.type === types$1.logicalAND; var coalesce = this.type === types$1.coalesce; if (coalesce) { // Handle the precedence of `tt.coalesce` as equal to the range of logical expressions. // In other words, `node.right` shouldn't contain logical expressions in order to check the mixed error. prec = types$1.logicalAND.binop; } var op = this.value; this.next(); var startPos = this.start, startLoc = this.startLoc; var right = this.parseExprOp(this.parseMaybeUnary(null, false, false, forInit), startPos, startLoc, prec, forInit); var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce); if (logical && this.type === types$1.coalesce || coalesce && (this.type === types$1.logicalOR || this.type === types$1.logicalAND)) { this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"); } return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit); } } return left; }; pp$5.buildBinary = function (startPos, startLoc, left, right, op, logical) { if (right.type === "PrivateIdentifier") { this.raise(right.start, "Private identifier can only be left side of binary expression"); } var node = this.startNodeAt(startPos, startLoc); node.left = left; node.operator = op; node.right = right; return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression"); }; // Parse unary operators, both prefix and postfix. pp$5.parseMaybeUnary = function (refDestructuringErrors, sawUnary, incDec, forInit) { var startPos = this.start, startLoc = this.startLoc, expr; if (this.isContextual("await") && this.canAwait) { expr = this.parseAwait(forInit); sawUnary = true; } else if (this.type.prefix) { var node = this.startNode(), update = this.type === types$1.incDec; node.operator = this.value; node.prefix = true; this.next(); node.argument = this.parseMaybeUnary(null, true, update, forInit); this.checkExpressionErrors(refDestructuringErrors, true); if (update) { this.checkLValSimple(node.argument); } else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); } else if (node.operator === "delete" && isPrivateFieldAccess(node.argument)) { this.raiseRecoverable(node.start, "Private fields can not be deleted"); } else { sawUnary = true; } expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); } else if (!sawUnary && this.type === types$1.privateId) { if ((forInit || this.privateNameStack.length === 0) && this.options.checkPrivateFields) { this.unexpected(); } expr = this.parsePrivateIdent(); // only could be private fields in 'in', such as #x in obj if (this.type !== types$1._in) { this.unexpected(); } } else { expr = this.parseExprSubscripts(refDestructuringErrors, forInit); if (this.checkExpressionErrors(refDestructuringErrors)) { return expr; } while (this.type.postfix && !this.canInsertSemicolon()) { var node$1 = this.startNodeAt(startPos, startLoc); node$1.operator = this.value; node$1.prefix = false; node$1.argument = expr; this.checkLValSimple(expr); this.next(); expr = this.finishNode(node$1, "UpdateExpression"); } } if (!incDec && this.eat(types$1.starstar)) { if (sawUnary) { this.unexpected(this.lastTokStart); } else { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false, false, forInit), "**", false); } } else { return expr; } }; function isPrivateFieldAccess(node) { return node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" || node.type === "ChainExpression" && isPrivateFieldAccess(node.expression); } // Parse call, dot, and `[]`-subscript expressions. pp$5.parseExprSubscripts = function (refDestructuringErrors, forInit) { var startPos = this.start, startLoc = this.startLoc; var expr = this.parseExprAtom(refDestructuringErrors, forInit); if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") { return expr; } var result = this.parseSubscripts(expr, startPos, startLoc, false, forInit); if (refDestructuringErrors && result.type === "MemberExpression") { if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; } if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; } if (refDestructuringErrors.trailingComma >= result.start) { refDestructuringErrors.trailingComma = -1; } } return result; }; pp$5.parseSubscripts = function (base, startPos, startLoc, noCalls, forInit) { var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && this.potentialArrowAt === base.start; var optionalChained = false; while (true) { var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit); if (element.optional) { optionalChained = true; } if (element === base || element.type === "ArrowFunctionExpression") { if (optionalChained) { var chainNode = this.startNodeAt(startPos, startLoc); chainNode.expression = element; element = this.finishNode(chainNode, "ChainExpression"); } return element; } base = element; } }; pp$5.shouldParseAsyncArrow = function () { return !this.canInsertSemicolon() && this.eat(types$1.arrow); }; pp$5.parseSubscriptAsyncArrow = function (startPos, startLoc, exprList, forInit) { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true, forInit); }; pp$5.parseSubscript = function (base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) { var optionalSupported = this.options.ecmaVersion >= 11; var optional = optionalSupported && this.eat(types$1.questionDot); if (noCalls && optional) { this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions"); } var computed = this.eat(types$1.bracketL); if (computed || optional && this.type !== types$1.parenL && this.type !== types$1.backQuote || this.eat(types$1.dot)) { var node = this.startNodeAt(startPos, startLoc); node.object = base; if (computed) { node.property = this.parseExpression(); this.expect(types$1.bracketR); } else if (this.type === types$1.privateId && base.type !== "Super") { node.property = this.parsePrivateIdent(); } else { node.property = this.parseIdent(this.options.allowReserved !== "never"); } node.computed = !!computed; if (optionalSupported) { node.optional = optional; } base = this.finishNode(node, "MemberExpression"); } else if (!noCalls && this.eat(types$1.parenL)) { var refDestructuringErrors = new DestructuringErrors(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; this.yieldPos = 0; this.awaitPos = 0; this.awaitIdentPos = 0; var exprList = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors); if (maybeAsyncArrow && !optional && this.shouldParseAsyncArrow()) { this.checkPatternErrors(refDestructuringErrors, false); this.checkYieldAwaitInDefaultParams(); if (this.awaitIdentPos > 0) { this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); } this.yieldPos = oldYieldPos; this.awaitPos = oldAwaitPos; this.awaitIdentPos = oldAwaitIdentPos; return this.parseSubscriptAsyncArrow(startPos, startLoc, exprList, forInit); } this.checkExpressionErrors(refDestructuringErrors, true); this.yieldPos = oldYieldPos || this.yieldPos; this.awaitPos = oldAwaitPos || this.awaitPos; this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; var node$1 = this.startNodeAt(startPos, startLoc); node$1.callee = base; node$1.arguments = exprList; if (optionalSupported) { node$1.optional = optional; } base = this.finishNode(node$1, "CallExpression"); } else if (this.type === types$1.backQuote) { if (optional || optionalChained) { this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions"); } var node$2 = this.startNodeAt(startPos, startLoc); node$2.tag = base; node$2.quasi = this.parseTemplate({ isTagged: true }); base = this.finishNode(node$2, "TaggedTemplateExpression"); } return base; }; // Parse an atomic expression — either a single token that is an // expression, an expression started by a keyword like `function` or // `new`, or an expression wrapped in punctuation like `()`, `[]`, // or `{}`. pp$5.parseExprAtom = function (refDestructuringErrors, forInit, forNew) { // If a division operator appears in an expression position, the // tokenizer got confused, and we force it to read a regexp instead. if (this.type === types$1.slash) { this.readRegexp(); } var node, canBeArrow = this.potentialArrowAt === this.start; switch (this.type) { case types$1._super: if (!this.allowSuper) { this.raise(this.start, "'super' keyword outside a method"); } node = this.startNode(); this.next(); if (this.type === types$1.parenL && !this.allowDirectSuper) { this.raise(node.start, "super() call outside constructor of a subclass"); } // The `super` keyword can appear at below: // SuperProperty: // super [ Expression ] // super . IdentifierName // SuperCall: // super ( Arguments ) if (this.type !== types$1.dot && this.type !== types$1.bracketL && this.type !== types$1.parenL) { this.unexpected(); } return this.finishNode(node, "Super"); case types$1._this: node = this.startNode(); this.next(); return this.finishNode(node, "ThisExpression"); case types$1.name: var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; var id = this.parseIdent(false); if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types$1._function)) { this.overrideContext(types.f_expr); return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true, forInit); } if (canBeArrow && !this.canInsertSemicolon()) { if (this.eat(types$1.arrow)) { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false, forInit); } if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types$1.name && !containsEsc && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) { id = this.parseIdent(false); if (this.canInsertSemicolon() || !this.eat(types$1.arrow)) { this.unexpected(); } return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true, forInit); } } return id; case types$1.regexp: var value = this.value; node = this.parseLiteral(value.value); node.regex = { pattern: value.pattern, flags: value.flags }; return node; case types$1.num: case types$1.string: return this.parseLiteral(this.value); case types$1._null: case types$1._true: case types$1._false: node = this.startNode(); node.value = this.type === types$1._null ? null : this.type === types$1._true; node.raw = this.type.keyword; this.next(); return this.finishNode(node, "Literal"); case types$1.parenL: var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit); if (refDestructuringErrors) { if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) { refDestructuringErrors.parenthesizedAssign = start; } if (refDestructuringErrors.parenthesizedBind < 0) { refDestructuringErrors.parenthesizedBind = start; } } return expr; case types$1.bracketL: node = this.startNode(); this.next(); node.elements = this.parseExprList(types$1.bracketR, true, true, refDestructuringErrors); return this.finishNode(node, "ArrayExpression"); case types$1.braceL: this.overrideContext(types.b_expr); return this.parseObj(false, refDestructuringErrors); case types$1._function: node = this.startNode(); this.next(); return this.parseFunction(node, 0); case types$1._class: return this.parseClass(this.startNode(), false); case types$1._new: return this.parseNew(); case types$1.backQuote: return this.parseTemplate(); case types$1._import: if (this.options.ecmaVersion >= 11) { return this.parseExprImport(forNew); } else { return this.unexpected(); } default: return this.parseExprAtomDefault(); } }; pp$5.parseExprAtomDefault = function () { this.unexpected(); }; pp$5.parseExprImport = function (forNew) { var node = this.startNode(); // Consume `import` as an identifier for `import.meta`. // Because `this.parseIdent(true)` doesn't check escape sequences, it needs the check of `this.containsEsc`. if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword import"); } this.next(); if (this.type === types$1.parenL && !forNew) { return this.parseDynamicImport(node); } else if (this.type === types$1.dot) { var meta = this.startNodeAt(node.start, node.loc && node.loc.start); meta.name = "import"; node.meta = this.finishNode(meta, "Identifier"); return this.parseImportMeta(node); } else { this.unexpected(); } }; pp$5.parseDynamicImport = function (node) { this.next(); // skip `(` // Parse node.source. node.source = this.parseMaybeAssign(); // Verify ending. if (!this.eat(types$1.parenR)) { var errorPos = this.start; if (this.eat(types$1.comma) && this.eat(types$1.parenR)) { this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()"); } else { this.unexpected(errorPos); } } return this.finishNode(node, "ImportExpression"); }; pp$5.parseImportMeta = function (node) { this.next(); // skip `.` var containsEsc = this.containsEsc; node.property = this.parseIdent(true); if (node.property.name !== "meta") { this.raiseRecoverable(node.property.start, "The only valid meta property for import is 'import.meta'"); } if (containsEsc) { this.raiseRecoverable(node.start, "'import.meta' must not contain escaped characters"); } if (this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere) { this.raiseRecoverable(node.start, "Cannot use 'import.meta' outside a module"); } return this.finishNode(node, "MetaProperty"); }; pp$5.parseLiteral = function (value) { var node = this.startNode(); node.value = value; node.raw = this.input.slice(this.start, this.end); if (node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1).replace(/_/g, ""); } this.next(); return this.finishNode(node, "Literal"); }; pp$5.parseParenExpression = function () { this.expect(types$1.parenL); var val = this.parseExpression(); this.expect(types$1.parenR); return val; }; pp$5.shouldParseArrow = function (exprList) { return !this.canInsertSemicolon(); }; pp$5.parseParenAndDistinguishExpression = function (canBeArrow, forInit) { var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; if (this.options.ecmaVersion >= 6) { this.next(); var innerStartPos = this.start, innerStartLoc = this.startLoc; var exprList = [], first = true, lastIsComma = false; var refDestructuringErrors = new DestructuringErrors(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; this.yieldPos = 0; this.awaitPos = 0; // Do not save awaitIdentPos to allow checking awaits nested in parameters while (this.type !== types$1.parenR) { first ? first = false : this.expect(types$1.comma); if (allowTrailingComma && this.afterTrailingComma(types$1.parenR, true)) { lastIsComma = true; break; } else if (this.type === types$1.ellipsis) { spreadStart = this.start; exprList.push(this.parseParenItem(this.parseRestBinding())); if (this.type === types$1.comma) { this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"); } break; } else { exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem)); } } var innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc; this.expect(types$1.parenR); if (canBeArrow && this.shouldParseArrow(exprList) && this.eat(types$1.arrow)) { this.checkPatternErrors(refDestructuringErrors, false); this.checkYieldAwaitInDefaultParams(); this.yieldPos = oldYieldPos; this.awaitPos = oldAwaitPos; return this.parseParenArrowList(startPos, startLoc, exprList, forInit); } if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); } if (spreadStart) { this.unexpected(spreadStart); } this.checkExpressionErrors(refDestructuringErrors, true); this.yieldPos = oldYieldPos || this.yieldPos; this.awaitPos = oldAwaitPos || this.awaitPos; if (exprList.length > 1) { val = this.startNodeAt(innerStartPos, innerStartLoc); val.expressions = exprList; this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); } else { val = exprList[0]; } } else { val = this.parseParenExpression(); } if (this.options.preserveParens) { var par = this.startNodeAt(startPos, startLoc); par.expression = val; return this.finishNode(par, "ParenthesizedExpression"); } else { return val; } }; pp$5.parseParenItem = function (item) { return item; }; pp$5.parseParenArrowList = function (startPos, startLoc, exprList, forInit) { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, false, forInit); }; // New's precedence is slightly tricky. It must allow its argument to // be a `[]` or dot subscript expression, but not a call — at least, // not without wrapping it in parentheses. Thus, it uses the noCalls // argument to parseSubscripts to prevent it from consuming the // argument list. var empty = []; pp$5.parseNew = function () { if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword new"); } var node = this.startNode(); this.next(); if (this.options.ecmaVersion >= 6 && this.type === types$1.dot) { var meta = this.startNodeAt(node.start, node.loc && node.loc.start); meta.name = "new"; node.meta = this.finishNode(meta, "Identifier"); this.next(); var containsEsc = this.containsEsc; node.property = this.parseIdent(true); if (node.property.name !== "target") { this.raiseRecoverable(node.property.start, "The only valid meta property for new is 'new.target'"); } if (containsEsc) { this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters"); } if (!this.allowNewDotTarget) { this.raiseRecoverable(node.start, "'new.target' can only be used in functions and class static block"); } return this.finishNode(node, "MetaProperty"); } var startPos = this.start, startLoc = this.startLoc; node.callee = this.parseSubscripts(this.parseExprAtom(null, false, true), startPos, startLoc, true, false); if (this.eat(types$1.parenL)) { node.arguments = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false); } else { node.arguments = empty; } return this.finishNode(node, "NewExpression"); }; // Parse template expression. pp$5.parseTemplateElement = function (ref) { var isTagged = ref.isTagged; var elem = this.startNode(); if (this.type === types$1.invalidTemplate) { if (!isTagged) { this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); } elem.value = { raw: this.value, cooked: null }; } else { elem.value = { raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), cooked: this.value }; } this.next(); elem.tail = this.type === types$1.backQuote; return this.finishNode(elem, "TemplateElement"); }; pp$5.parseTemplate = function (ref) { if (ref === void 0) ref = {}; var isTagged = ref.isTagged; if (isTagged === void 0) isTagged = false; var node = this.startNode(); this.next(); node.expressions = []; var curElt = this.parseTemplateElement({ isTagged: isTagged }); node.quasis = [curElt]; while (!curElt.tail) { if (this.type === types$1.eof) { this.raise(this.pos, "Unterminated template literal"); } this.expect(types$1.dollarBraceL); node.expressions.push(this.parseExpression()); this.expect(types$1.braceR); node.quasis.push(curElt = this.parseTemplateElement({ isTagged: isTagged })); } this.next(); return this.finishNode(node, "TemplateLiteral"); }; pp$5.isAsyncProp = function (prop) { return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.type === types$1.name || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === types$1.star) && !lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); }; // Parse an object literal or binding pattern. pp$5.parseObj = function (isPattern, refDestructuringErrors) { var node = this.startNode(), first = true, propHash = {}; node.properties = []; this.next(); while (!this.eat(types$1.braceR)) { if (!first) { this.expect(types$1.comma); if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types$1.braceR)) { break; } } else { first = false; } var prop = this.parseProperty(isPattern, refDestructuringErrors); if (!isPattern) { this.checkPropClash(prop, propHash, refDestructuringErrors); } node.properties.push(prop); } return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); }; pp$5.parseProperty = function (isPattern, refDestructuringErrors) { var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; if (this.options.ecmaVersion >= 9 && this.eat(types$1.ellipsis)) { if (isPattern) { prop.argument = this.parseIdent(false); if (this.type === types$1.comma) { this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"); } return this.finishNode(prop, "RestElement"); } // Parse argument. prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); // To disallow trailing comma via `this.toAssignable()`. if (this.type === types$1.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { refDestructuringErrors.trailingComma = this.start; } // Finish return this.finishNode(prop, "SpreadElement"); } if (this.options.ecmaVersion >= 6) { prop.method = false; prop.shorthand = false; if (isPattern || refDestructuringErrors) { startPos = this.start; startLoc = this.startLoc; } if (!isPattern) { isGenerator = this.eat(types$1.star); } } var containsEsc = this.containsEsc; this.parsePropertyName(prop); if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { isAsync = true; isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$1.star); this.parsePropertyName(prop); } else { isAsync = false; } this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); return this.finishNode(prop, "Property"); }; pp$5.parseGetterSetter = function (prop) { prop.kind = prop.key.name; this.parsePropertyName(prop); prop.value = this.parseMethod(false); var paramCount = prop.kind === "get" ? 0 : 1; if (prop.value.params.length !== paramCount) { var start = prop.value.start; if (prop.kind === "get") { this.raiseRecoverable(start, "getter should have no params"); } else { this.raiseRecoverable(start, "setter should have exactly one param"); } } else { if (prop.kind === "set" && prop.value.params[0].type === "RestElement") { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); } } }; pp$5.parsePropertyValue = function (prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { if ((isGenerator || isAsync) && this.type === types$1.colon) { this.unexpected(); } if (this.eat(types$1.colon)) { prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); prop.kind = "init"; } else if (this.options.ecmaVersion >= 6 && this.type === types$1.parenL) { if (isPattern) { this.unexpected(); } prop.kind = "init"; prop.method = true; prop.value = this.parseMethod(isGenerator, isAsync); } else if (!isPattern && !containsEsc && this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && this.type !== types$1.comma && this.type !== types$1.braceR && this.type !== types$1.eq) { if (isGenerator || isAsync) { this.unexpected(); } this.parseGetterSetter(prop); } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { if (isGenerator || isAsync) { this.unexpected(); } this.checkUnreserved(prop.key); if (prop.key.name === "await" && !this.awaitIdentPos) { this.awaitIdentPos = startPos; } prop.kind = "init"; if (isPattern) { prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)); } else if (this.type === types$1.eq && refDestructuringErrors) { if (refDestructuringErrors.shorthandAssign < 0) { refDestructuringErrors.shorthandAssign = this.start; } prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)); } else { prop.value = this.copyNode(prop.key); } prop.shorthand = true; } else { this.unexpected(); } }; pp$5.parsePropertyName = function (prop) { if (this.options.ecmaVersion >= 6) { if (this.eat(types$1.bracketL)) { prop.computed = true; prop.key = this.parseMaybeAssign(); this.expect(types$1.bracketR); return prop.key; } else { prop.computed = false; } } return prop.key = this.type === types$1.num || this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never"); }; // Initialize empty function node. pp$5.initFunction = function (node) { node.id = null; if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; } if (this.options.ecmaVersion >= 8) { node.async = false; } }; // Parse object or class method. pp$5.parseMethod = function (isGenerator, isAsync, allowDirectSuper) { var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; this.initFunction(node); if (this.options.ecmaVersion >= 6) { node.generator = isGenerator; } if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } this.yieldPos = 0; this.awaitPos = 0; this.awaitIdentPos = 0; this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); this.expect(types$1.parenL); node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8); this.checkYieldAwaitInDefaultParams(); this.parseFunctionBody(node, false, true, false); this.yieldPos = oldYieldPos; this.awaitPos = oldAwaitPos; this.awaitIdentPos = oldAwaitIdentPos; return this.finishNode(node, "FunctionExpression"); }; // Parse arrow function expression with given parameters. pp$5.parseArrowExpression = function (node, params, isAsync, forInit) { var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW); this.initFunction(node); if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } this.yieldPos = 0; this.awaitPos = 0; this.awaitIdentPos = 0; node.params = this.toAssignableList(params, true); this.parseFunctionBody(node, true, false, forInit); this.yieldPos = oldYieldPos; this.awaitPos = oldAwaitPos; this.awaitIdentPos = oldAwaitIdentPos; return this.finishNode(node, "ArrowFunctionExpression"); }; // Parse function body and check parameters. pp$5.parseFunctionBody = function (node, isArrowFunction, isMethod, forInit) { var isExpression = isArrowFunction && this.type !== types$1.braceL; var oldStrict = this.strict, useStrict = false; if (isExpression) { node.body = this.parseMaybeAssign(forInit); node.expression = true; this.checkParams(node, false); } else { var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params); if (!oldStrict || nonSimple) { useStrict = this.strictDirective(this.end); // If this is a strict mode function, verify that argument names // are not repeated, and it does not try to bind the words `eval` // or `arguments`. if (useStrict && nonSimple) { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); } } // Start a new scope with regard to labels and the `inFunction` // flag (restore them to their old value afterwards). var oldLabels = this.labels; this.labels = []; if (useStrict) { this.strict = true; } // Add the params to varDeclaredNames to ensure that an error is thrown // if a let/const declaration in the function clashes with one of the params. this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)); // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' if (this.strict && node.id) { this.checkLValSimple(node.id, BIND_OUTSIDE); } node.body = this.parseBlock(false, undefined, useStrict && !oldStrict); node.expression = false; this.adaptDirectivePrologue(node.body.body); this.labels = oldLabels; } this.exitScope(); }; pp$5.isSimpleParamList = function (params) { for (var i = 0, list = params; i < list.length; i += 1) { var param = list[i]; if (param.type !== "Identifier") { return false; } } return true; }; // Checks function params for various disallowed patterns such as using "eval" // or "arguments" and duplicate parameters. pp$5.checkParams = function (node, allowDuplicates) { var nameHash = Object.create(null); for (var i = 0, list = node.params; i < list.length; i += 1) { var param = list[i]; this.checkLValInnerPattern(param, BIND_VAR, allowDuplicates ? null : nameHash); } }; // Parses a comma-separated list of expressions, and returns them as // an array. `close` is the token type that ends the list, and // `allowEmpty` can be turned on to allow subsequent commas with // nothing in between them to be parsed as `null` (which is needed // for array literals). pp$5.parseExprList = function (close, allowTrailingComma, allowEmpty, refDestructuringErrors) { var elts = [], first = true; while (!this.eat(close)) { if (!first) { this.expect(types$1.comma); if (allowTrailingComma && this.afterTrailingComma(close)) { break; } } else { first = false; } var elt = void 0; if (allowEmpty && this.type === types$1.comma) { elt = null; } else if (this.type === types$1.ellipsis) { elt = this.parseSpread(refDestructuringErrors); if (refDestructuringErrors && this.type === types$1.comma && refDestructuringErrors.trailingComma < 0) { refDestructuringErrors.trailingComma = this.start; } } else { elt = this.parseMaybeAssign(false, refDestructuringErrors); } elts.push(elt); } return elts; }; pp$5.checkUnreserved = function (ref) { var start = ref.start; var end = ref.end; var name = ref.name; if (this.inGenerator && name === "yield") { this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); } if (this.inAsync && name === "await") { this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); } if (this.currentThisScope().inClassFieldInit && name === "arguments") { this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer"); } if (this.inClassStaticBlock && (name === "arguments" || name === "await")) { this.raise(start, "Cannot use " + name + " in class static initialization block"); } if (this.keywords.test(name)) { this.raise(start, "Unexpected keyword '" + name + "'"); } if (this.options.ecmaVersion < 6 && this.input.slice(start, end).indexOf("\\") !== -1) { return; } var re = this.strict ? this.reservedWordsStrict : this.reservedWords; if (re.test(name)) { if (!this.inAsync && name === "await") { this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); } this.raiseRecoverable(start, "The keyword '" + name + "' is reserved"); } }; // Parse the next token as an identifier. If `liberal` is true (used // when parsing properties), it will also convert keywords into // identifiers. pp$5.parseIdent = function (liberal) { var node = this.parseIdentNode(); this.next(!!liberal); this.finishNode(node, "Identifier"); if (!liberal) { this.checkUnreserved(node); if (node.name === "await" && !this.awaitIdentPos) { this.awaitIdentPos = node.start; } } return node; }; pp$5.parseIdentNode = function () { var node = this.startNode(); if (this.type === types$1.name) { node.name = this.value; } else if (this.type.keyword) { node.name = this.type.keyword; // To fix https://github.com/acornjs/acorn/issues/575 // `class` and `function` keywords push new context into this.context. // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name. // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword if ((node.name === "class" || node.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { this.context.pop(); } this.type = types$1.name; } else { this.unexpected(); } return node; }; pp$5.parsePrivateIdent = function () { var node = this.startNode(); if (this.type === types$1.privateId) { node.name = this.value; } else { this.unexpected(); } this.next(); this.finishNode(node, "PrivateIdentifier"); // For validating existence if (this.options.checkPrivateFields) { if (this.privateNameStack.length === 0) { this.raise(node.start, "Private field '#" + node.name + "' must be declared in an enclosing class"); } else { this.privateNameStack[this.privateNameStack.length - 1].used.push(node); } } return node; }; // Parses yield expression inside generator. pp$5.parseYield = function (forInit) { if (!this.yieldPos) { this.yieldPos = this.start; } var node = this.startNode(); this.next(); if (this.type === types$1.semi || this.canInsertSemicolon() || this.type !== types$1.star && !this.type.startsExpr) { node.delegate = false; node.argument = null; } else { node.delegate = this.eat(types$1.star); node.argument = this.parseMaybeAssign(forInit); } return this.finishNode(node, "YieldExpression"); }; pp$5.parseAwait = function (forInit) { if (!this.awaitPos) { this.awaitPos = this.start; } var node = this.startNode(); this.next(); node.argument = this.parseMaybeUnary(null, true, false, forInit); return this.finishNode(node, "AwaitExpression"); }; var pp$4 = Parser.prototype; // This function is used to raise exceptions on parse errors. It // takes an offset integer (into the current `input`) to indicate // the location of the error, attaches the position to the end // of the error message, and then raises a `SyntaxError` with that // message. pp$4.raise = function (pos, message) { var loc = getLineInfo(this.input, pos); message += " (" + loc.line + ":" + loc.column + ")"; var err = new SyntaxError(message); err.pos = pos; err.loc = loc; err.raisedAt = this.pos; throw err; }; pp$4.raiseRecoverable = pp$4.raise; pp$4.curPosition = function () { if (this.options.locations) { return new Position(this.curLine, this.pos - this.lineStart); } }; var pp$3 = Parser.prototype; var Scope = function Scope(flags) { this.flags = flags; // A list of var-declared names in the current lexical scope this.var = []; // A list of lexically-declared names in the current lexical scope this.lexical = []; // A list of lexically-declared FunctionDeclaration names in the current lexical scope this.functions = []; // A switch to disallow the identifier reference 'arguments' this.inClassFieldInit = false; }; // The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names. pp$3.enterScope = function (flags) { this.scopeStack.push(new Scope(flags)); }; pp$3.exitScope = function () { this.scopeStack.pop(); }; // The spec says: // > At the top level of a function, or script, function declarations are // > treated like var declarations rather than like lexical declarations. pp$3.treatFunctionsAsVarInScope = function (scope) { return scope.flags & SCOPE_FUNCTION || !this.inModule && scope.flags & SCOPE_TOP; }; pp$3.declareName = function (name, bindingType, pos) { var redeclared = false; if (bindingType === BIND_LEXICAL) { var scope = this.currentScope(); redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; scope.lexical.push(name); if (this.inModule && scope.flags & SCOPE_TOP) { delete this.undefinedExports[name]; } } else if (bindingType === BIND_SIMPLE_CATCH) { var scope$1 = this.currentScope(); scope$1.lexical.push(name); } else if (bindingType === BIND_FUNCTION) { var scope$2 = this.currentScope(); if (this.treatFunctionsAsVar) { redeclared = scope$2.lexical.indexOf(name) > -1; } else { redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; } scope$2.functions.push(name); } else { for (var i = this.scopeStack.length - 1; i >= 0; --i) { var scope$3 = this.scopeStack[i]; if (scope$3.lexical.indexOf(name) > -1 && !(scope$3.flags & SCOPE_SIMPLE_CATCH && scope$3.lexical[0] === name) || !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) { redeclared = true; break; } scope$3.var.push(name); if (this.inModule && scope$3.flags & SCOPE_TOP) { delete this.undefinedExports[name]; } if (scope$3.flags & SCOPE_VAR) { break; } } } if (redeclared) { this.raiseRecoverable(pos, "Identifier '" + name + "' has already been declared"); } }; pp$3.checkLocalExport = function (id) { // scope.functions must be empty as Module code is always strict. if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1) { this.undefinedExports[id.name] = id; } }; pp$3.currentScope = function () { return this.scopeStack[this.scopeStack.length - 1]; }; pp$3.currentVarScope = function () { for (var i = this.scopeStack.length - 1;; i--) { var scope = this.scopeStack[i]; if (scope.flags & SCOPE_VAR) { return scope; } } }; // Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`. pp$3.currentThisScope = function () { for (var i = this.scopeStack.length - 1;; i--) { var scope = this.scopeStack[i]; if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope; } } }; var Node = function Node(parser, pos, loc) { this.type = ""; this.start = pos; this.end = 0; if (parser.options.locations) { this.loc = new SourceLocation(parser, loc); } if (parser.options.directSourceFile) { this.sourceFile = parser.options.directSourceFile; } if (parser.options.ranges) { this.range = [pos, 0]; } }; // Start an AST node, attaching a start offset. var pp$2 = Parser.prototype; pp$2.startNode = function () { return new Node(this, this.start, this.startLoc); }; pp$2.startNodeAt = function (pos, loc) { return new Node(this, pos, loc); }; // Finish an AST node, adding `type` and `end` properties. function finishNodeAt(node, type, pos, loc) { node.type = type; node.end = pos; if (this.options.locations) { node.loc.end = loc; } if (this.options.ranges) { node.range[1] = pos; } return node; } pp$2.finishNode = function (node, type) { return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc); }; // Finish node at given position pp$2.finishNodeAt = function (node, type, pos, loc) { return finishNodeAt.call(this, node, type, pos, loc); }; pp$2.copyNode = function (node) { var newNode = new Node(this, node.start, this.startLoc); for (var prop in node) { newNode[prop] = node[prop]; } return newNode; }; // This file contains Unicode properties extracted from the ECMAScript specification. // The lists are extracted like so: // $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText) // #table-binary-unicode-properties var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS"; var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic"; var ecma11BinaryProperties = ecma10BinaryProperties; var ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict"; var ecma13BinaryProperties = ecma12BinaryProperties; var ecma14BinaryProperties = ecma13BinaryProperties; var unicodeBinaryProperties = { 9: ecma9BinaryProperties, 10: ecma10BinaryProperties, 11: ecma11BinaryProperties, 12: ecma12BinaryProperties, 13: ecma13BinaryProperties, 14: ecma14BinaryProperties }; // #table-binary-unicode-properties-of-strings var ecma14BinaryPropertiesOfStrings = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"; var unicodeBinaryPropertiesOfStrings = { 9: "", 10: "", 11: "", 12: "", 13: "", 14: ecma14BinaryPropertiesOfStrings }; // #table-unicode-general-category-values var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu"; // #table-unicode-script-values var ecma9ScriptValues = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb"; var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"; var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho"; var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi"; var ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith"; var ecma14ScriptValues = ecma13ScriptValues + " Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz"; var unicodeScriptValues = { 9: ecma9ScriptValues, 10: ecma10ScriptValues, 11: ecma11ScriptValues, 12: ecma12ScriptValues, 13: ecma13ScriptValues, 14: ecma14ScriptValues }; var data = {}; function buildUnicodeData(ecmaVersion) { var d = data[ecmaVersion] = { binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues), binaryOfStrings: wordsRegexp(unicodeBinaryPropertiesOfStrings[ecmaVersion]), nonBinary: { General_Category: wordsRegexp(unicodeGeneralCategoryValues), Script: wordsRegexp(unicodeScriptValues[ecmaVersion]) } }; d.nonBinary.Script_Extensions = d.nonBinary.Script; d.nonBinary.gc = d.nonBinary.General_Category; d.nonBinary.sc = d.nonBinary.Script; d.nonBinary.scx = d.nonBinary.Script_Extensions; } for (var i = 0, list = [9, 10, 11, 12, 13, 14]; i < list.length; i += 1) { var ecmaVersion = list[i]; buildUnicodeData(ecmaVersion); } var pp$1 = Parser.prototype; var RegExpValidationState = function RegExpValidationState(parser) { this.parser = parser; this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "") + (parser.options.ecmaVersion >= 15 ? "v" : ""); this.unicodeProperties = data[parser.options.ecmaVersion >= 14 ? 14 : parser.options.ecmaVersion]; this.source = ""; this.flags = ""; this.start = 0; this.switchU = false; this.switchV = false; this.switchN = false; this.pos = 0; this.lastIntValue = 0; this.lastStringValue = ""; this.lastAssertionIsQuantifiable = false; this.numCapturingParens = 0; this.maxBackReference = 0; this.groupNames = []; this.backReferenceNames = []; }; RegExpValidationState.prototype.reset = function reset(start, pattern, flags) { var unicodeSets = flags.indexOf("v") !== -1; var unicode = flags.indexOf("u") !== -1; this.start = start | 0; this.source = pattern + ""; this.flags = flags; if (unicodeSets && this.parser.options.ecmaVersion >= 15) { this.switchU = true; this.switchV = true; this.switchN = true; } else { this.switchU = unicode && this.parser.options.ecmaVersion >= 6; this.switchV = false; this.switchN = unicode && this.parser.options.ecmaVersion >= 9; } }; RegExpValidationState.prototype.raise = function raise(message) { this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + message); }; // If u flag is given, this returns the code point at the index (it combines a surrogate pair). // Otherwise, this returns the code unit of the index (can be a part of a surrogate pair). RegExpValidationState.prototype.at = function at(i, forceU) { if (forceU === void 0) forceU = false; var s = this.source; var l = s.length; if (i >= l) { return -1; } var c = s.charCodeAt(i); if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { return c; } var next = s.charCodeAt(i + 1); return next >= 0xDC00 && next <= 0xDFFF ? (c << 10) + next - 0x35FDC00 : c; }; RegExpValidationState.prototype.nextIndex = function nextIndex(i, forceU) { if (forceU === void 0) forceU = false; var s = this.source; var l = s.length; if (i >= l) { return l; } var c = s.charCodeAt(i), next; if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l || (next = s.charCodeAt(i + 1)) < 0xDC00 || next > 0xDFFF) { return i + 1; } return i + 2; }; RegExpValidationState.prototype.current = function current(forceU) { if (forceU === void 0) forceU = false; return this.at(this.pos, forceU); }; RegExpValidationState.prototype.lookahead = function lookahead(forceU) { if (forceU === void 0) forceU = false; return this.at(this.nextIndex(this.pos, forceU), forceU); }; RegExpValidationState.prototype.advance = function advance(forceU) { if (forceU === void 0) forceU = false; this.pos = this.nextIndex(this.pos, forceU); }; RegExpValidationState.prototype.eat = function eat(ch, forceU) { if (forceU === void 0) forceU = false; if (this.current(forceU) === ch) { this.advance(forceU); return true; } return false; }; RegExpValidationState.prototype.eatChars = function eatChars(chs, forceU) { if (forceU === void 0) forceU = false; var pos = this.pos; for (var i = 0, list = chs; i < list.length; i += 1) { var ch = list[i]; var current = this.at(pos, forceU); if (current === -1 || current !== ch) { return false; } pos = this.nextIndex(pos, forceU); } this.pos = pos; return true; }; /** * Validate the flags part of a given RegExpLiteral. * * @param {RegExpValidationState} state The state to validate RegExp. * @returns {void} */ pp$1.validateRegExpFlags = function (state) { var validFlags = state.validFlags; var flags = state.flags; var u = false; var v = false; for (var i = 0; i < flags.length; i++) { var flag = flags.charAt(i); if (validFlags.indexOf(flag) === -1) { this.raise(state.start, "Invalid regular expression flag"); } if (flags.indexOf(flag, i + 1) > -1) { this.raise(state.start, "Duplicate regular expression flag"); } if (flag === "u") { u = true; } if (flag === "v") { v = true; } } if (this.options.ecmaVersion >= 15 && u && v) { this.raise(state.start, "Invalid regular expression flag"); } }; /** * Validate the pattern part of a given RegExpLiteral. * * @param {RegExpValidationState} state The state to validate RegExp. * @returns {void} */ pp$1.validateRegExpPattern = function (state) { this.regexp_pattern(state); // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of // parsing contains a |GroupName|, reparse with the goal symbol // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError* // exception if _P_ did not conform to the grammar, if any elements of _P_ // were not matched by the parse, or if any Early Error conditions exist. if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) { state.switchN = true; this.regexp_pattern(state); } }; // https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern pp$1.regexp_pattern = function (state) { state.pos = 0; state.lastIntValue = 0; state.lastStringValue = ""; state.lastAssertionIsQuantifiable = false; state.numCapturingParens = 0; state.maxBackReference = 0; state.groupNames.length = 0; state.backReferenceNames.length = 0; this.regexp_disjunction(state); if (state.pos !== state.source.length) { // Make the same messages as V8. if (state.eat(0x29 /* ) */)) { state.raise("Unmatched ')'"); } if (state.eat(0x5D /* ] */) || state.eat(0x7D /* } */)) { state.raise("Lone quantifier brackets"); } } if (state.maxBackReference > state.numCapturingParens) { state.raise("Invalid escape"); } for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) { var name = list[i]; if (state.groupNames.indexOf(name) === -1) { state.raise("Invalid named capture referenced"); } } }; // https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction pp$1.regexp_disjunction = function (state) { this.regexp_alternative(state); while (state.eat(0x7C /* | */)) { this.regexp_alternative(state); } // Make the same message as V8. if (this.regexp_eatQuantifier(state, true)) { state.raise("Nothing to repeat"); } if (state.eat(0x7B /* { */)) { state.raise("Lone quantifier brackets"); } }; // https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative pp$1.regexp_alternative = function (state) { while (state.pos < state.source.length && this.regexp_eatTerm(state)) {} }; // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term pp$1.regexp_eatTerm = function (state) { if (this.regexp_eatAssertion(state)) { // Handle `QuantifiableAssertion Quantifier` alternative. // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion // is a QuantifiableAssertion. if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { // Make the same message as V8. if (state.switchU) { state.raise("Invalid quantifier"); } } return true; } if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { this.regexp_eatQuantifier(state); return true; } return false; }; // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion pp$1.regexp_eatAssertion = function (state) { var start = state.pos; state.lastAssertionIsQuantifiable = false; // ^, $ if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) { return true; } // \b \B if (state.eat(0x5C /* \ */)) { if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) { return true; } state.pos = start; } // Lookahead / Lookbehind if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) { var lookbehind = false; if (this.options.ecmaVersion >= 9) { lookbehind = state.eat(0x3C /* < */); } if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) { this.regexp_disjunction(state); if (!state.eat(0x29 /* ) */)) { state.raise("Unterminated group"); } state.lastAssertionIsQuantifiable = !lookbehind; return true; } } state.pos = start; return false; }; // https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier pp$1.regexp_eatQuantifier = function (state, noError) { if (noError === void 0) noError = false; if (this.regexp_eatQuantifierPrefix(state, noError)) { state.eat(0x3F /* ? */); return true; } return false; }; // https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix pp$1.regexp_eatQuantifierPrefix = function (state, noError) { return state.eat(0x2A /* * */) || state.eat(0x2B /* + */) || state.eat(0x3F /* ? */) || this.regexp_eatBracedQuantifier(state, noError); }; pp$1.regexp_eatBracedQuantifier = function (state, noError) { var start = state.pos; if (state.eat(0x7B /* { */)) { var min = 0, max = -1; if (this.regexp_eatDecimalDigits(state)) { min = state.lastIntValue; if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) { max = state.lastIntValue; } if (state.eat(0x7D /* } */)) { // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term if (max !== -1 && max < min && !noError) { state.raise("numbers out of order in {} quantifier"); } return true; } } if (state.switchU && !noError) { state.raise("Incomplete quantifier"); } state.pos = start; } return false; }; // https://www.ecma-international.org/ecma-262/8.0/#prod-Atom pp$1.regexp_eatAtom = function (state) { return this.regexp_eatPatternCharacters(state) || state.eat(0x2E /* . */) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state); }; pp$1.regexp_eatReverseSolidusAtomEscape = function (state) { var start = state.pos; if (state.eat(0x5C /* \ */)) { if (this.regexp_eatAtomEscape(state)) { return true; } state.pos = start; } return false; }; pp$1.regexp_eatUncapturingGroup = function (state) { var start = state.pos; if (state.eat(0x28 /* ( */)) { if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) { this.regexp_disjunction(state); if (state.eat(0x29 /* ) */)) { return true; } state.raise("Unterminated group"); } state.pos = start; } return false; }; pp$1.regexp_eatCapturingGroup = function (state) { if (state.eat(0x28 /* ( */)) { if (this.options.ecmaVersion >= 9) { this.regexp_groupSpecifier(state); } else if (state.current() === 0x3F /* ? */) { state.raise("Invalid group"); } this.regexp_disjunction(state); if (state.eat(0x29 /* ) */)) { state.numCapturingParens += 1; return true; } state.raise("Unterminated group"); } return false; }; // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom pp$1.regexp_eatExtendedAtom = function (state) { return state.eat(0x2E /* . */) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state) || this.regexp_eatInvalidBracedQuantifier(state) || this.regexp_eatExtendedPatternCharacter(state); }; // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier pp$1.regexp_eatInvalidBracedQuantifier = function (state) { if (this.regexp_eatBracedQuantifier(state, true)) { state.raise("Nothing to repeat"); } return false; }; // https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter pp$1.regexp_eatSyntaxCharacter = function (state) { var ch = state.current(); if (isSyntaxCharacter(ch)) { state.lastIntValue = ch; state.advance(); return true; } return false; }; function isSyntaxCharacter(ch) { return ch === 0x24 /* $ */ || ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ || ch === 0x2E /* . */ || ch === 0x3F /* ? */ || ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ || ch >= 0x7B /* { */ && ch <= 0x7D /* } */; } // https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter // But eat eager. pp$1.regexp_eatPatternCharacters = function (state) { var start = state.pos; var ch = 0; while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) { state.advance(); } return state.pos !== start; }; // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter pp$1.regexp_eatExtendedPatternCharacter = function (state) { var ch = state.current(); if (ch !== -1 && ch !== 0x24 /* $ */ && !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) && ch !== 0x2E /* . */ && ch !== 0x3F /* ? */ && ch !== 0x5B /* [ */ && ch !== 0x5E /* ^ */ && ch !== 0x7C /* | */) { state.advance(); return true; } return false; }; // GroupSpecifier :: // [empty] // `?` GroupName pp$1.regexp_groupSpecifier = function (state) { if (state.eat(0x3F /* ? */)) { if (this.regexp_eatGroupName(state)) { if (state.groupNames.indexOf(state.lastStringValue) !== -1) { state.raise("Duplicate capture group name"); } state.groupNames.push(state.lastStringValue); return; } state.raise("Invalid group"); } }; // GroupName :: // `<` RegExpIdentifierName `>` // Note: this updates `state.lastStringValue` property with the eaten name. pp$1.regexp_eatGroupName = function (state) { state.lastStringValue = ""; if (state.eat(0x3C /* < */)) { if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) { return true; } state.raise("Invalid capture group name"); } return false; }; // RegExpIdentifierName :: // RegExpIdentifierStart // RegExpIdentifierName RegExpIdentifierPart // Note: this updates `state.lastStringValue` property with the eaten name. pp$1.regexp_eatRegExpIdentifierName = function (state) { state.lastStringValue = ""; if (this.regexp_eatRegExpIdentifierStart(state)) { state.lastStringValue += codePointToString(state.lastIntValue); while (this.regexp_eatRegExpIdentifierPart(state)) { state.lastStringValue += codePointToString(state.lastIntValue); } return true; } return false; }; // RegExpIdentifierStart :: // UnicodeIDStart // `$` // `_` // `\` RegExpUnicodeEscapeSequence[+U] pp$1.regexp_eatRegExpIdentifierStart = function (state) { var start = state.pos; var forceU = this.options.ecmaVersion >= 11; var ch = state.current(forceU); state.advance(forceU); if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) { ch = state.lastIntValue; } if (isRegExpIdentifierStart(ch)) { state.lastIntValue = ch; return true; } state.pos = start; return false; }; function isRegExpIdentifierStart(ch) { return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F; /* _ */ } // RegExpIdentifierPart :: // UnicodeIDContinue // `$` // `_` // `\` RegExpUnicodeEscapeSequence[+U] // // pp$1.regexp_eatRegExpIdentifierPart = function (state) { var start = state.pos; var forceU = this.options.ecmaVersion >= 11; var ch = state.current(forceU); state.advance(forceU); if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) { ch = state.lastIntValue; } if (isRegExpIdentifierPart(ch)) { state.lastIntValue = ch; return true; } state.pos = start; return false; }; function isRegExpIdentifierPart(ch) { return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D; /* */ } // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape pp$1.regexp_eatAtomEscape = function (state) { if (this.regexp_eatBackReference(state) || this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state) || state.switchN && this.regexp_eatKGroupName(state)) { return true; } if (state.switchU) { // Make the same message as V8. if (state.current() === 0x63 /* c */) { state.raise("Invalid unicode escape"); } state.raise("Invalid escape"); } return false; }; pp$1.regexp_eatBackReference = function (state) { var start = state.pos; if (this.regexp_eatDecimalEscape(state)) { var n = state.lastIntValue; if (state.switchU) { // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape if (n > state.maxBackReference) { state.maxBackReference = n; } return true; } if (n <= state.numCapturingParens) { return true; } state.pos = start; } return false; }; pp$1.regexp_eatKGroupName = function (state) { if (state.eat(0x6B /* k */)) { if (this.regexp_eatGroupName(state)) { state.backReferenceNames.push(state.lastStringValue); return true; } state.raise("Invalid named reference"); } return false; }; // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape pp$1.regexp_eatCharacterEscape = function (state) { return this.regexp_eatControlEscape(state) || this.regexp_eatCControlLetter(state) || this.regexp_eatZero(state) || this.regexp_eatHexEscapeSequence(state) || this.regexp_eatRegExpUnicodeEscapeSequence(state, false) || !state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state) || this.regexp_eatIdentityEscape(state); }; pp$1.regexp_eatCControlLetter = function (state) { var start = state.pos; if (state.eat(0x63 /* c */)) { if (this.regexp_eatControlLetter(state)) { return true; } state.pos = start; } return false; }; pp$1.regexp_eatZero = function (state) { if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) { state.lastIntValue = 0; state.advance(); return true; } return false; }; // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape pp$1.regexp_eatControlEscape = function (state) { var ch = state.current(); if (ch === 0x74 /* t */) { state.lastIntValue = 0x09; /* \t */ state.advance(); return true; } if (ch === 0x6E /* n */) { state.lastIntValue = 0x0A; /* \n */ state.advance(); return true; } if (ch === 0x76 /* v */) { state.lastIntValue = 0x0B; /* \v */ state.advance(); return true; } if (ch === 0x66 /* f */) { state.lastIntValue = 0x0C; /* \f */ state.advance(); return true; } if (ch === 0x72 /* r */) { state.lastIntValue = 0x0D; /* \r */ state.advance(); return true; } return false; }; // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter pp$1.regexp_eatControlLetter = function (state) { var ch = state.current(); if (isControlLetter(ch)) { state.lastIntValue = ch % 0x20; state.advance(); return true; } return false; }; function isControlLetter(ch) { return ch >= 0x41 /* A */ && ch <= 0x5A /* Z */ || ch >= 0x61 /* a */ && ch <= 0x7A /* z */; } // https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence pp$1.regexp_eatRegExpUnicodeEscapeSequence = function (state, forceU) { if (forceU === void 0) forceU = false; var start = state.pos; var switchU = forceU || state.switchU; if (state.eat(0x75 /* u */)) { if (this.regexp_eatFixedHexDigits(state, 4)) { var lead = state.lastIntValue; if (switchU && lead >= 0xD800 && lead <= 0xDBFF) { var leadSurrogateEnd = state.pos; if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) { var trail = state.lastIntValue; if (trail >= 0xDC00 && trail <= 0xDFFF) { state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; return true; } } state.pos = leadSurrogateEnd; state.lastIntValue = lead; } return true; } if (switchU && state.eat(0x7B /* { */) && this.regexp_eatHexDigits(state) && state.eat(0x7D /* } */) && isValidUnicode(state.lastIntValue)) { return true; } if (switchU) { state.raise("Invalid unicode escape"); } state.pos = start; } return false; }; function isValidUnicode(ch) { return ch >= 0 && ch <= 0x10FFFF; } // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape pp$1.regexp_eatIdentityEscape = function (state) { if (state.switchU) { if (this.regexp_eatSyntaxCharacter(state)) { return true; } if (state.eat(0x2F /* / */)) { state.lastIntValue = 0x2F; /* / */ return true; } return false; } var ch = state.current(); if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) { state.lastIntValue = ch; state.advance(); return true; } return false; }; // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape pp$1.regexp_eatDecimalEscape = function (state) { state.lastIntValue = 0; var ch = state.current(); if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) { do { state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); state.advance(); } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */); return true; } return false; }; // Return values used by character set parsing methods, needed to // forbid negation of sets that can match strings. var CharSetNone = 0; // Nothing parsed var CharSetOk = 1; // Construct parsed, cannot contain strings var CharSetString = 2; // Construct parsed, can contain strings // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape pp$1.regexp_eatCharacterClassEscape = function (state) { var ch = state.current(); if (isCharacterClassEscape(ch)) { state.lastIntValue = -1; state.advance(); return CharSetOk; } var negate = false; if (state.switchU && this.options.ecmaVersion >= 9 && ((negate = ch === 0x50 /* P */) || ch === 0x70 /* p */)) { state.lastIntValue = -1; state.advance(); var result; if (state.eat(0x7B /* { */) && (result = this.regexp_eatUnicodePropertyValueExpression(state)) && state.eat(0x7D /* } */)) { if (negate && result === CharSetString) { state.raise("Invalid property name"); } return result; } state.raise("Invalid property name"); } return CharSetNone; }; function isCharacterClassEscape(ch) { return ch === 0x64 /* d */ || ch === 0x44 /* D */ || ch === 0x73 /* s */ || ch === 0x53 /* S */ || ch === 0x77 /* w */ || ch === 0x57 /* W */; } // UnicodePropertyValueExpression :: // UnicodePropertyName `=` UnicodePropertyValue // LoneUnicodePropertyNameOrValue pp$1.regexp_eatUnicodePropertyValueExpression = function (state) { var start = state.pos; // UnicodePropertyName `=` UnicodePropertyValue if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) { var name = state.lastStringValue; if (this.regexp_eatUnicodePropertyValue(state)) { var value = state.lastStringValue; this.regexp_validateUnicodePropertyNameAndValue(state, name, value); return CharSetOk; } } state.pos = start; // LoneUnicodePropertyNameOrValue if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { var nameOrValue = state.lastStringValue; return this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue); } return CharSetNone; }; pp$1.regexp_validateUnicodePropertyNameAndValue = function (state, name, value) { if (!hasOwn(state.unicodeProperties.nonBinary, name)) { state.raise("Invalid property name"); } if (!state.unicodeProperties.nonBinary[name].test(value)) { state.raise("Invalid property value"); } }; pp$1.regexp_validateUnicodePropertyNameOrValue = function (state, nameOrValue) { if (state.unicodeProperties.binary.test(nameOrValue)) { return CharSetOk; } if (state.switchV && state.unicodeProperties.binaryOfStrings.test(nameOrValue)) { return CharSetString; } state.raise("Invalid property name"); }; // UnicodePropertyName :: // UnicodePropertyNameCharacters pp$1.regexp_eatUnicodePropertyName = function (state) { var ch = 0; state.lastStringValue = ""; while (isUnicodePropertyNameCharacter(ch = state.current())) { state.lastStringValue += codePointToString(ch); state.advance(); } return state.lastStringValue !== ""; }; function isUnicodePropertyNameCharacter(ch) { return isControlLetter(ch) || ch === 0x5F; /* _ */ } // UnicodePropertyValue :: // UnicodePropertyValueCharacters pp$1.regexp_eatUnicodePropertyValue = function (state) { var ch = 0; state.lastStringValue = ""; while (isUnicodePropertyValueCharacter(ch = state.current())) { state.lastStringValue += codePointToString(ch); state.advance(); } return state.lastStringValue !== ""; }; function isUnicodePropertyValueCharacter(ch) { return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch); } // LoneUnicodePropertyNameOrValue :: // UnicodePropertyValueCharacters pp$1.regexp_eatLoneUnicodePropertyNameOrValue = function (state) { return this.regexp_eatUnicodePropertyValue(state); }; // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass pp$1.regexp_eatCharacterClass = function (state) { if (state.eat(0x5B /* [ */)) { var negate = state.eat(0x5E /* ^ */); var result = this.regexp_classContents(state); if (!state.eat(0x5D /* ] */)) { state.raise("Unterminated character class"); } if (negate && result === CharSetString) { state.raise("Negated character class may contain strings"); } return true; } return false; }; // https://tc39.es/ecma262/#prod-ClassContents // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges pp$1.regexp_classContents = function (state) { if (state.current() === 0x5D /* ] */) { return CharSetOk; } if (state.switchV) { return this.regexp_classSetExpression(state); } this.regexp_nonEmptyClassRanges(state); return CharSetOk; }; // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash pp$1.regexp_nonEmptyClassRanges = function (state) { while (this.regexp_eatClassAtom(state)) { var left = state.lastIntValue; if (state.eat(0x2D /* - */) && this.regexp_eatClassAtom(state)) { var right = state.lastIntValue; if (state.switchU && (left === -1 || right === -1)) { state.raise("Invalid character class"); } if (left !== -1 && right !== -1 && left > right) { state.raise("Range out of order in character class"); } } } }; // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash pp$1.regexp_eatClassAtom = function (state) { var start = state.pos; if (state.eat(0x5C /* \ */)) { if (this.regexp_eatClassEscape(state)) { return true; } if (state.switchU) { // Make the same message as V8. var ch$1 = state.current(); if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) { state.raise("Invalid class escape"); } state.raise("Invalid escape"); } state.pos = start; } var ch = state.current(); if (ch !== 0x5D /* ] */) { state.lastIntValue = ch; state.advance(); return true; } return false; }; // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape pp$1.regexp_eatClassEscape = function (state) { var start = state.pos; if (state.eat(0x62 /* b */)) { state.lastIntValue = 0x08; /* */ return true; } if (state.switchU && state.eat(0x2D /* - */)) { state.lastIntValue = 0x2D; /* - */ return true; } if (!state.switchU && state.eat(0x63 /* c */)) { if (this.regexp_eatClassControlLetter(state)) { return true; } state.pos = start; } return this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state); }; // https://tc39.es/ecma262/#prod-ClassSetExpression // https://tc39.es/ecma262/#prod-ClassUnion // https://tc39.es/ecma262/#prod-ClassIntersection // https://tc39.es/ecma262/#prod-ClassSubtraction pp$1.regexp_classSetExpression = function (state) { var result = CharSetOk, subResult; if (this.regexp_eatClassSetRange(state)) ;else if (subResult = this.regexp_eatClassSetOperand(state)) { if (subResult === CharSetString) { result = CharSetString; } // https://tc39.es/ecma262/#prod-ClassIntersection var start = state.pos; while (state.eatChars([0x26, 0x26] /* && */)) { if (state.current() !== 0x26 /* & */ && (subResult = this.regexp_eatClassSetOperand(state))) { if (subResult !== CharSetString) { result = CharSetOk; } continue; } state.raise("Invalid character in character class"); } if (start !== state.pos) { return result; } // https://tc39.es/ecma262/#prod-ClassSubtraction while (state.eatChars([0x2D, 0x2D] /* -- */)) { if (this.regexp_eatClassSetOperand(state)) { continue; } state.raise("Invalid character in character class"); } if (start !== state.pos) { return result; } } else { state.raise("Invalid character in character class"); } // https://tc39.es/ecma262/#prod-ClassUnion for (;;) { if (this.regexp_eatClassSetRange(state)) { continue; } subResult = this.regexp_eatClassSetOperand(state); if (!subResult) { return result; } if (subResult === CharSetString) { result = CharSetString; } } }; // https://tc39.es/ecma262/#prod-ClassSetRange pp$1.regexp_eatClassSetRange = function (state) { var start = state.pos; if (this.regexp_eatClassSetCharacter(state)) { var left = state.lastIntValue; if (state.eat(0x2D /* - */) && this.regexp_eatClassSetCharacter(state)) { var right = state.lastIntValue; if (left !== -1 && right !== -1 && left > right) { state.raise("Range out of order in character class"); } return true; } state.pos = start; } return false; }; // https://tc39.es/ecma262/#prod-ClassSetOperand pp$1.regexp_eatClassSetOperand = function (state) { if (this.regexp_eatClassSetCharacter(state)) { return CharSetOk; } return this.regexp_eatClassStringDisjunction(state) || this.regexp_eatNestedClass(state); }; // https://tc39.es/ecma262/#prod-NestedClass pp$1.regexp_eatNestedClass = function (state) { var start = state.pos; if (state.eat(0x5B /* [ */)) { var negate = state.eat(0x5E /* ^ */); var result = this.regexp_classContents(state); if (state.eat(0x5D /* ] */)) { if (negate && result === CharSetString) { state.raise("Negated character class may contain strings"); } return result; } state.pos = start; } if (state.eat(0x5C /* \ */)) { var result$1 = this.regexp_eatCharacterClassEscape(state); if (result$1) { return result$1; } state.pos = start; } return null; }; // https://tc39.es/ecma262/#prod-ClassStringDisjunction pp$1.regexp_eatClassStringDisjunction = function (state) { var start = state.pos; if (state.eatChars([0x5C, 0x71] /* \q */)) { if (state.eat(0x7B /* { */)) { var result = this.regexp_classStringDisjunctionContents(state); if (state.eat(0x7D /* } */)) { return result; } } else { // Make the same message as V8. state.raise("Invalid escape"); } state.pos = start; } return null; }; // https://tc39.es/ecma262/#prod-ClassStringDisjunctionContents pp$1.regexp_classStringDisjunctionContents = function (state) { var result = this.regexp_classString(state); while (state.eat(0x7C /* | */)) { if (this.regexp_classString(state) === CharSetString) { result = CharSetString; } } return result; }; // https://tc39.es/ecma262/#prod-ClassString // https://tc39.es/ecma262/#prod-NonEmptyClassString pp$1.regexp_classString = function (state) { var count = 0; while (this.regexp_eatClassSetCharacter(state)) { count++; } return count === 1 ? CharSetOk : CharSetString; }; // https://tc39.es/ecma262/#prod-ClassSetCharacter pp$1.regexp_eatClassSetCharacter = function (state) { var start = state.pos; if (state.eat(0x5C /* \ */)) { if (this.regexp_eatCharacterEscape(state) || this.regexp_eatClassSetReservedPunctuator(state)) { return true; } if (state.eat(0x62 /* b */)) { state.lastIntValue = 0x08; /* */ return true; } state.pos = start; return false; } var ch = state.current(); if (ch < 0 || ch === state.lookahead() && isClassSetReservedDoublePunctuatorCharacter(ch)) { return false; } if (isClassSetSyntaxCharacter(ch)) { return false; } state.advance(); state.lastIntValue = ch; return true; }; // https://tc39.es/ecma262/#prod-ClassSetReservedDoublePunctuator function isClassSetReservedDoublePunctuatorCharacter(ch) { return ch === 0x21 /* ! */ || ch >= 0x23 /* # */ && ch <= 0x26 /* & */ || ch >= 0x2A /* * */ && ch <= 0x2C /* , */ || ch === 0x2E /* . */ || ch >= 0x3A /* : */ && ch <= 0x40 /* @ */ || ch === 0x5E /* ^ */ || ch === 0x60 /* ` */ || ch === 0x7E /* ~ */; } // https://tc39.es/ecma262/#prod-ClassSetSyntaxCharacter function isClassSetSyntaxCharacter(ch) { return ch === 0x28 /* ( */ || ch === 0x29 /* ) */ || ch === 0x2D /* - */ || ch === 0x2F /* / */ || ch >= 0x5B /* [ */ && ch <= 0x5D /* ] */ || ch >= 0x7B /* { */ && ch <= 0x7D /* } */; } // https://tc39.es/ecma262/#prod-ClassSetReservedPunctuator pp$1.regexp_eatClassSetReservedPunctuator = function (state) { var ch = state.current(); if (isClassSetReservedPunctuator(ch)) { state.lastIntValue = ch; state.advance(); return true; } return false; }; // https://tc39.es/ecma262/#prod-ClassSetReservedPunctuator function isClassSetReservedPunctuator(ch) { return ch === 0x21 /* ! */ || ch === 0x23 /* # */ || ch === 0x25 /* % */ || ch === 0x26 /* & */ || ch === 0x2C /* , */ || ch === 0x2D /* - */ || ch >= 0x3A /* : */ && ch <= 0x3E /* > */ || ch === 0x40 /* @ */ || ch === 0x60 /* ` */ || ch === 0x7E /* ~ */; } // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter pp$1.regexp_eatClassControlLetter = function (state) { var ch = state.current(); if (isDecimalDigit(ch) || ch === 0x5F /* _ */) { state.lastIntValue = ch % 0x20; state.advance(); return true; } return false; }; // https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence pp$1.regexp_eatHexEscapeSequence = function (state) { var start = state.pos; if (state.eat(0x78 /* x */)) { if (this.regexp_eatFixedHexDigits(state, 2)) { return true; } if (state.switchU) { state.raise("Invalid escape"); } state.pos = start; } return false; }; // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits pp$1.regexp_eatDecimalDigits = function (state) { var start = state.pos; var ch = 0; state.lastIntValue = 0; while (isDecimalDigit(ch = state.current())) { state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); state.advance(); } return state.pos !== start; }; function isDecimalDigit(ch) { return ch >= 0x30 /* 0 */ && ch <= 0x39; /* 9 */ } // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits pp$1.regexp_eatHexDigits = function (state) { var start = state.pos; var ch = 0; state.lastIntValue = 0; while (isHexDigit(ch = state.current())) { state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); state.advance(); } return state.pos !== start; }; function isHexDigit(ch) { return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */ || ch >= 0x41 /* A */ && ch <= 0x46 /* F */ || ch >= 0x61 /* a */ && ch <= 0x66 /* f */; } function hexToInt(ch) { if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) { return 10 + (ch - 0x41 /* A */); } if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) { return 10 + (ch - 0x61 /* a */); } return ch - 0x30; /* 0 */ } // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence // Allows only 0-377(octal) i.e. 0-255(decimal). pp$1.regexp_eatLegacyOctalEscapeSequence = function (state) { if (this.regexp_eatOctalDigit(state)) { var n1 = state.lastIntValue; if (this.regexp_eatOctalDigit(state)) { var n2 = state.lastIntValue; if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; } else { state.lastIntValue = n1 * 8 + n2; } } else { state.lastIntValue = n1; } return true; } return false; }; // https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit pp$1.regexp_eatOctalDigit = function (state) { var ch = state.current(); if (isOctalDigit(ch)) { state.lastIntValue = ch - 0x30; /* 0 */ state.advance(); return true; } state.lastIntValue = 0; return false; }; function isOctalDigit(ch) { return ch >= 0x30 /* 0 */ && ch <= 0x37; /* 7 */ } // https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit // And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence pp$1.regexp_eatFixedHexDigits = function (state, length) { var start = state.pos; state.lastIntValue = 0; for (var i = 0; i < length; ++i) { var ch = state.current(); if (!isHexDigit(ch)) { state.pos = start; return false; } state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); state.advance(); } return true; }; // Object type used to represent tokens. Note that normally, tokens // simply exist as properties on the parser object. This is only // used for the onToken callback and the external tokenizer. var Token = function Token(p) { this.type = p.type; this.value = p.value; this.start = p.start; this.end = p.end; if (p.options.locations) { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); } if (p.options.ranges) { this.range = [p.start, p.end]; } }; // ## Tokenizer var pp = Parser.prototype; // Move to the next token pp.next = function (ignoreEscapeSequenceInKeyword) { if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword); } if (this.options.onToken) { this.options.onToken(new Token(this)); } this.lastTokEnd = this.end; this.lastTokStart = this.start; this.lastTokEndLoc = this.endLoc; this.lastTokStartLoc = this.startLoc; this.nextToken(); }; pp.getToken = function () { this.next(); return new Token(this); }; // If we're in an ES6 environment, make parsers iterable if (typeof Symbol !== "undefined") { pp[Symbol.iterator] = function () { var this$1$1 = this; return { next: function () { var token = this$1$1.getToken(); return { done: token.type === types$1.eof, value: token }; } }; }; } // Toggle strict mode. Re-reads the next number or string to please // pedantic tests (`"use strict"; 010;` should fail). // Read a single token, updating the parser object's token-related // properties. pp.nextToken = function () { var curContext = this.curContext(); if (!curContext || !curContext.preserveSpace) { this.skipSpace(); } this.start = this.pos; if (this.options.locations) { this.startLoc = this.curPosition(); } if (this.pos >= this.input.length) { return this.finishToken(types$1.eof); } if (curContext.override) { return curContext.override(this); } else { this.readToken(this.fullCharCodeAtPos()); } }; pp.readToken = function (code) { // Identifier or keyword. '\uXXXX' sequences are allowed in // identifiers, so '\' also dispatches to that. if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) { return this.readWord(); } return this.getTokenFromCode(code); }; pp.fullCharCodeAtPos = function () { var code = this.input.charCodeAt(this.pos); if (code <= 0xd7ff || code >= 0xdc00) { return code; } var next = this.input.charCodeAt(this.pos + 1); return next <= 0xdbff || next >= 0xe000 ? code : (code << 10) + next - 0x35fdc00; }; pp.skipBlockComment = function () { var startLoc = this.options.onComment && this.curPosition(); var start = this.pos, end = this.input.indexOf("*/", this.pos += 2); if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); } this.pos = end + 2; if (this.options.locations) { for (var nextBreak = void 0, pos = start; (nextBreak = nextLineBreak(this.input, pos, this.pos)) > -1;) { ++this.curLine; pos = this.lineStart = nextBreak; } } if (this.options.onComment) { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.curPosition()); } }; pp.skipLineComment = function (startSkip) { var start = this.pos; var startLoc = this.options.onComment && this.curPosition(); var ch = this.input.charCodeAt(this.pos += startSkip); while (this.pos < this.input.length && !isNewLine(ch)) { ch = this.input.charCodeAt(++this.pos); } if (this.options.onComment) { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.curPosition()); } }; // Called at the start of the parse and after every token. Skips // whitespace and comments, and. pp.skipSpace = function () { loop: while (this.pos < this.input.length) { var ch = this.input.charCodeAt(this.pos); switch (ch) { case 32: case 160: // ' ' ++this.pos; break; case 13: if (this.input.charCodeAt(this.pos + 1) === 10) { ++this.pos; } case 10: case 8232: case 8233: ++this.pos; if (this.options.locations) { ++this.curLine; this.lineStart = this.pos; } break; case 47: // '/' switch (this.input.charCodeAt(this.pos + 1)) { case 42: // '*' this.skipBlockComment(); break; case 47: this.skipLineComment(2); break; default: break loop; } break; default: if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { ++this.pos; } else { break loop; } } } }; // Called at the end of every token. Sets `end`, `val`, and // maintains `context` and `exprAllowed`, and skips the space after // the token, so that the next one's `start` will point at the // right position. pp.finishToken = function (type, val) { this.end = this.pos; if (this.options.locations) { this.endLoc = this.curPosition(); } var prevType = this.type; this.type = type; this.value = val; this.updateContext(prevType); }; // ### Token reading // This is the function that is called to fetch the next token. It // is somewhat obscure, because it works in character codes rather // than characters, and because operator parsing has been inlined // into it. // // All in the name of speed. // pp.readToken_dot = function () { var next = this.input.charCodeAt(this.pos + 1); if (next >= 48 && next <= 57) { return this.readNumber(true); } var next2 = this.input.charCodeAt(this.pos + 2); if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' this.pos += 3; return this.finishToken(types$1.ellipsis); } else { ++this.pos; return this.finishToken(types$1.dot); } }; pp.readToken_slash = function () { // '/' var next = this.input.charCodeAt(this.pos + 1); if (this.exprAllowed) { ++this.pos; return this.readRegexp(); } if (next === 61) { return this.finishOp(types$1.assign, 2); } return this.finishOp(types$1.slash, 1); }; pp.readToken_mult_modulo_exp = function (code) { // '%*' var next = this.input.charCodeAt(this.pos + 1); var size = 1; var tokentype = code === 42 ? types$1.star : types$1.modulo; // exponentiation operator ** and **= if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) { ++size; tokentype = types$1.starstar; next = this.input.charCodeAt(this.pos + 2); } if (next === 61) { return this.finishOp(types$1.assign, size + 1); } return this.finishOp(tokentype, size); }; pp.readToken_pipe_amp = function (code) { // '|&' var next = this.input.charCodeAt(this.pos + 1); if (next === code) { if (this.options.ecmaVersion >= 12) { var next2 = this.input.charCodeAt(this.pos + 2); if (next2 === 61) { return this.finishOp(types$1.assign, 3); } } return this.finishOp(code === 124 ? types$1.logicalOR : types$1.logicalAND, 2); } if (next === 61) { return this.finishOp(types$1.assign, 2); } return this.finishOp(code === 124 ? types$1.bitwiseOR : types$1.bitwiseAND, 1); }; pp.readToken_caret = function () { // '^' var next = this.input.charCodeAt(this.pos + 1); if (next === 61) { return this.finishOp(types$1.assign, 2); } return this.finishOp(types$1.bitwiseXOR, 1); }; pp.readToken_plus_min = function (code) { // '+-' var next = this.input.charCodeAt(this.pos + 1); if (next === code) { if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) { // A `-->` line comment this.skipLineComment(3); this.skipSpace(); return this.nextToken(); } return this.finishOp(types$1.incDec, 2); } if (next === 61) { return this.finishOp(types$1.assign, 2); } return this.finishOp(types$1.plusMin, 1); }; pp.readToken_lt_gt = function (code) { // '<>' var next = this.input.charCodeAt(this.pos + 1); var size = 1; if (next === code) { size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types$1.assign, size + 1); } return this.finishOp(types$1.bitShift, size); } if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45) { // ` * ^ * ``` * * @type {State} */ function open(code) { if (code === 33) { effects.consume(code); return declarationOpen; } if (code === 47) { effects.consume(code); closingTag = true; return tagCloseStart; } if (code === 63) { effects.consume(code); marker = 3; // To do: // tokenizer.concrete = true // To do: use `markdown-rs` style interrupt. // While we’re in an instruction instead of a declaration, we’re on a `?` // right now, so we do need to search for `>`, similar to declarations. return self.interrupt ? ok : continuationDeclarationInside; } // ASCII alphabetical. if (asciiAlpha(code)) { effects.consume(code); // @ts-expect-error: not null. buffer = String.fromCharCode(code); return tagName; } return nok(code); } /** * After ` | * ^ * > | * ^ * > | &<]]> * ^ * ``` * * @type {State} */ function declarationOpen(code) { if (code === 45) { effects.consume(code); marker = 2; return commentOpenInside; } if (code === 91) { effects.consume(code); marker = 5; index = 0; return cdataOpenInside; } // ASCII alphabetical. if (asciiAlpha(code)) { effects.consume(code); marker = 4; // // Do not form containers. // tokenizer.concrete = true return self.interrupt ? ok : continuationDeclarationInside; } return nok(code); } /** * After ` | * ^ * ``` * * @type {State} */ function commentOpenInside(code) { if (code === 45) { effects.consume(code); // // Do not form containers. // tokenizer.concrete = true return self.interrupt ? ok : continuationDeclarationInside; } return nok(code); } /** * After ` | &<]]> * ^^^^^^ * ``` * * @type {State} */ function cdataOpenInside(code) { const value = 'CDATA['; if (code === value.charCodeAt(index++)) { effects.consume(code); if (index === value.length) { // // Do not form containers. // tokenizer.concrete = true return self.interrupt ? ok : continuation; } return cdataOpenInside; } return nok(code); } /** * After ` | * ^ * ``` * * @type {State} */ function tagCloseStart(code) { if (asciiAlpha(code)) { effects.consume(code); // @ts-expect-error: not null. buffer = String.fromCharCode(code); return tagName; } return nok(code); } /** * In tag name. * * ```markdown * > | * ^^ * > | * ^^ * ``` * * @type {State} */ function tagName(code) { if (code === null || code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { const slash = code === 47; const name = buffer.toLowerCase(); if (!slash && !closingTag && htmlRawNames.includes(name)) { marker = 1; // // Do not form containers. // tokenizer.concrete = true return self.interrupt ? ok(code) : continuation(code); } if (htmlBlockNames.includes(buffer.toLowerCase())) { marker = 6; if (slash) { effects.consume(code); return basicSelfClosing; } // // Do not form containers. // tokenizer.concrete = true return self.interrupt ? ok(code) : continuation(code); } marker = 7; // Do not support complete HTML when interrupting. return self.interrupt && !self.parser.lazy[self.now().line] ? nok(code) : closingTag ? completeClosingTagAfter(code) : completeAttributeNameBefore(code); } // ASCII alphanumerical and `-`. if (code === 45 || asciiAlphanumeric(code)) { effects.consume(code); buffer += String.fromCharCode(code); return tagName; } return nok(code); } /** * After closing slash of a basic tag name. * * ```markdown * > |
* ^ * ``` * * @type {State} */ function basicSelfClosing(code) { if (code === 62) { effects.consume(code); // // Do not form containers. // tokenizer.concrete = true return self.interrupt ? ok : continuation; } return nok(code); } /** * After closing slash of a complete tag name. * * ```markdown * > | * ^ * ``` * * @type {State} */ function completeClosingTagAfter(code) { if (markdownSpace(code)) { effects.consume(code); return completeClosingTagAfter; } return completeEnd(code); } /** * At an attribute name. * * At first, this state is used after a complete tag name, after whitespace, * where it expects optional attributes or the end of the tag. * It is also reused after attributes, when expecting more optional * attributes. * * ```markdown * > | * ^ * > | * ^ * > | * ^ * > | * ^ * > | * ^ * ``` * * @type {State} */ function completeAttributeNameBefore(code) { if (code === 47) { effects.consume(code); return completeEnd; } // ASCII alphanumerical and `:` and `_`. if (code === 58 || code === 95 || asciiAlpha(code)) { effects.consume(code); return completeAttributeName; } if (markdownSpace(code)) { effects.consume(code); return completeAttributeNameBefore; } return completeEnd(code); } /** * In attribute name. * * ```markdown * > | * ^ * > | * ^ * > | * ^ * ``` * * @type {State} */ function completeAttributeName(code) { // ASCII alphanumerical and `-`, `.`, `:`, and `_`. if (code === 45 || code === 46 || code === 58 || code === 95 || asciiAlphanumeric(code)) { effects.consume(code); return completeAttributeName; } return completeAttributeNameAfter(code); } /** * After attribute name, at an optional initializer, the end of the tag, or * whitespace. * * ```markdown * > | * ^ * > | * ^ * ``` * * @type {State} */ function completeAttributeNameAfter(code) { if (code === 61) { effects.consume(code); return completeAttributeValueBefore; } if (markdownSpace(code)) { effects.consume(code); return completeAttributeNameAfter; } return completeAttributeNameBefore(code); } /** * Before unquoted, double quoted, or single quoted attribute value, allowing * whitespace. * * ```markdown * > | * ^ * > | * ^ * ``` * * @type {State} */ function completeAttributeValueBefore(code) { if (code === null || code === 60 || code === 61 || code === 62 || code === 96) { return nok(code); } if (code === 34 || code === 39) { effects.consume(code); markerB = code; return completeAttributeValueQuoted; } if (markdownSpace(code)) { effects.consume(code); return completeAttributeValueBefore; } return completeAttributeValueUnquoted(code); } /** * In double or single quoted attribute value. * * ```markdown * > | * ^ * > | * ^ * ``` * * @type {State} */ function completeAttributeValueQuoted(code) { if (code === markerB) { effects.consume(code); markerB = null; return completeAttributeValueQuotedAfter; } if (code === null || markdownLineEnding(code)) { return nok(code); } effects.consume(code); return completeAttributeValueQuoted; } /** * In unquoted attribute value. * * ```markdown * > | * ^ * ``` * * @type {State} */ function completeAttributeValueUnquoted(code) { if (code === null || code === 34 || code === 39 || code === 47 || code === 60 || code === 61 || code === 62 || code === 96 || markdownLineEndingOrSpace(code)) { return completeAttributeNameAfter(code); } effects.consume(code); return completeAttributeValueUnquoted; } /** * After double or single quoted attribute value, before whitespace or the * end of the tag. * * ```markdown * > | * ^ * ``` * * @type {State} */ function completeAttributeValueQuotedAfter(code) { if (code === 47 || code === 62 || markdownSpace(code)) { return completeAttributeNameBefore(code); } return nok(code); } /** * In certain circumstances of a complete tag where only an `>` is allowed. * * ```markdown * > | * ^ * ``` * * @type {State} */ function completeEnd(code) { if (code === 62) { effects.consume(code); return completeAfter; } return nok(code); } /** * After `>` in a complete tag. * * ```markdown * > | * ^ * ``` * * @type {State} */ function completeAfter(code) { if (code === null || markdownLineEnding(code)) { // // Do not form containers. // tokenizer.concrete = true return continuation(code); } if (markdownSpace(code)) { effects.consume(code); return completeAfter; } return nok(code); } /** * In continuation of any HTML kind. * * ```markdown * > | * ^ * ``` * * @type {State} */ function continuation(code) { if (code === 45 && marker === 2) { effects.consume(code); return continuationCommentInside; } if (code === 60 && marker === 1) { effects.consume(code); return continuationRawTagOpen; } if (code === 62 && marker === 4) { effects.consume(code); return continuationClose; } if (code === 63 && marker === 3) { effects.consume(code); return continuationDeclarationInside; } if (code === 93 && marker === 5) { effects.consume(code); return continuationCdataInside; } if (markdownLineEnding(code) && (marker === 6 || marker === 7)) { effects.exit('htmlFlowData'); return effects.check(blankLineBefore, continuationAfter, continuationStart)(code); } if (code === null || markdownLineEnding(code)) { effects.exit('htmlFlowData'); return continuationStart(code); } effects.consume(code); return continuation; } /** * In continuation, at eol. * * ```markdown * > | * ^ * | asd * ``` * * @type {State} */ function continuationStart(code) { return effects.check(nonLazyContinuationStart, continuationStartNonLazy, continuationAfter)(code); } /** * In continuation, at eol, before non-lazy content. * * ```markdown * > | * ^ * | asd * ``` * * @type {State} */ function continuationStartNonLazy(code) { effects.enter('lineEnding'); effects.consume(code); effects.exit('lineEnding'); return continuationBefore; } /** * In continuation, before non-lazy content. * * ```markdown * | * > | asd * ^ * ``` * * @type {State} */ function continuationBefore(code) { if (code === null || markdownLineEnding(code)) { return continuationStart(code); } effects.enter('htmlFlowData'); return continuation(code); } /** * In comment continuation, after one `-`, expecting another. * * ```markdown * > | * ^ * ``` * * @type {State} */ function continuationCommentInside(code) { if (code === 45) { effects.consume(code); return continuationDeclarationInside; } return continuation(code); } /** * In raw continuation, after `<`, at `/`. * * ```markdown * > | * ^ * ``` * * @type {State} */ function continuationRawTagOpen(code) { if (code === 47) { effects.consume(code); buffer = ''; return continuationRawEndTag; } return continuation(code); } /** * In raw continuation, after ` | * ^^^^^^ * ``` * * @type {State} */ function continuationRawEndTag(code) { if (code === 62) { const name = buffer.toLowerCase(); if (htmlRawNames.includes(name)) { effects.consume(code); return continuationClose; } return continuation(code); } if (asciiAlpha(code) && buffer.length < 8) { effects.consume(code); // @ts-expect-error: not null. buffer += String.fromCharCode(code); return continuationRawEndTag; } return continuation(code); } /** * In cdata continuation, after `]`, expecting `]>`. * * ```markdown * > | &<]]> * ^ * ``` * * @type {State} */ function continuationCdataInside(code) { if (code === 93) { effects.consume(code); return continuationDeclarationInside; } return continuation(code); } /** * In declaration or instruction continuation, at `>`. * * ```markdown * > | * ^ * > | * ^ * > | * ^ * > | * ^ * > | &<]]> * ^ * ``` * * @type {State} */ function continuationDeclarationInside(code) { if (code === 62) { effects.consume(code); return continuationClose; } // More dashes. if (code === 45 && marker === 2) { effects.consume(code); return continuationDeclarationInside; } return continuation(code); } /** * In closed continuation: everything we get until the eol/eof is part of it. * * ```markdown * > | * ^ * ``` * * @type {State} */ function continuationClose(code) { if (code === null || markdownLineEnding(code)) { effects.exit('htmlFlowData'); return continuationAfter(code); } effects.consume(code); return continuationClose; } /** * Done. * * ```markdown * > | * ^ * ``` * * @type {State} */ function continuationAfter(code) { effects.exit('htmlFlow'); // // Feel free to interrupt. // tokenizer.interrupt = false // // No longer concrete. // tokenizer.concrete = false return ok(code); } } /** * @this {TokenizeContext} * @type {Tokenizer} */ function tokenizeNonLazyContinuationStart(effects, ok, nok) { const self = this; return start; /** * At eol, before continuation. * * ```markdown * > | * ```js * ^ * | b * ``` * * @type {State} */ function start(code) { if (markdownLineEnding(code)) { effects.enter('lineEnding'); effects.consume(code); effects.exit('lineEnding'); return after; } return nok(code); } /** * A continuation. * * ```markdown * | * ```js * > | b * ^ * ``` * * @type {State} */ function after(code) { return self.parser.lazy[self.now().line] ? nok(code) : ok(code); } } /** * @this {TokenizeContext} * @type {Tokenizer} */ function tokenizeBlankLineBefore(effects, ok, nok) { return start; /** * Before eol, expecting blank line. * * ```markdown * > |
* ^ * | * ``` * * @type {State} */ function start(code) { effects.enter('lineEnding'); effects.consume(code); effects.exit('lineEnding'); return effects.attempt(blankLine, ok, nok); } } ;// CONCATENATED MODULE: ./node_modules/.pnpm/micromark-core-commonmark@1.1.0/node_modules/micromark-core-commonmark/lib/code-fenced.js /** * @typedef {import('micromark-util-types').Code} Code * @typedef {import('micromark-util-types').Construct} Construct * @typedef {import('micromark-util-types').State} State * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext * @typedef {import('micromark-util-types').Tokenizer} Tokenizer */ /** @type {Construct} */ const nonLazyContinuation = { tokenize: tokenizeNonLazyContinuation, partial: true }; /** @type {Construct} */ const codeFenced = { name: 'codeFenced', tokenize: tokenizeCodeFenced, concrete: true }; /** * @this {TokenizeContext} * @type {Tokenizer} */ function tokenizeCodeFenced(effects, ok, nok) { const self = this; /** @type {Construct} */ const closeStart = { tokenize: tokenizeCloseStart, partial: true }; let initialPrefix = 0; let sizeOpen = 0; /** @type {NonNullable} */ let marker; return start; /** * Start of code. * * ```markdown * > | ~~~js * ^ * | alert(1) * | ~~~ * ``` * * @type {State} */ function start(code) { // To do: parse whitespace like `markdown-rs`. return beforeSequenceOpen(code); } /** * In opening fence, after prefix, at sequence. * * ```markdown * > | ~~~js * ^ * | alert(1) * | ~~~ * ``` * * @type {State} */ function beforeSequenceOpen(code) { const tail = self.events[self.events.length - 1]; initialPrefix = tail && tail[1].type === 'linePrefix' ? tail[2].sliceSerialize(tail[1], true).length : 0; marker = code; effects.enter('codeFenced'); effects.enter('codeFencedFence'); effects.enter('codeFencedFenceSequence'); return sequenceOpen(code); } /** * In opening fence sequence. * * ```markdown * > | ~~~js * ^ * | alert(1) * | ~~~ * ``` * * @type {State} */ function sequenceOpen(code) { if (code === marker) { sizeOpen++; effects.consume(code); return sequenceOpen; } if (sizeOpen < 3) { return nok(code); } effects.exit('codeFencedFenceSequence'); return markdownSpace(code) ? factorySpace(effects, infoBefore, 'whitespace')(code) : infoBefore(code); } /** * In opening fence, after the sequence (and optional whitespace), before info. * * ```markdown * > | ~~~js * ^ * | alert(1) * | ~~~ * ``` * * @type {State} */ function infoBefore(code) { if (code === null || markdownLineEnding(code)) { effects.exit('codeFencedFence'); return self.interrupt ? ok(code) : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code); } effects.enter('codeFencedFenceInfo'); effects.enter('chunkString', { contentType: 'string' }); return info(code); } /** * In info. * * ```markdown * > | ~~~js * ^ * | alert(1) * | ~~~ * ``` * * @type {State} */ function info(code) { if (code === null || markdownLineEnding(code)) { effects.exit('chunkString'); effects.exit('codeFencedFenceInfo'); return infoBefore(code); } if (markdownSpace(code)) { effects.exit('chunkString'); effects.exit('codeFencedFenceInfo'); return factorySpace(effects, metaBefore, 'whitespace')(code); } if (code === 96 && code === marker) { return nok(code); } effects.consume(code); return info; } /** * In opening fence, after info and whitespace, before meta. * * ```markdown * > | ~~~js eval * ^ * | alert(1) * | ~~~ * ``` * * @type {State} */ function metaBefore(code) { if (code === null || markdownLineEnding(code)) { return infoBefore(code); } effects.enter('codeFencedFenceMeta'); effects.enter('chunkString', { contentType: 'string' }); return meta(code); } /** * In meta. * * ```markdown * > | ~~~js eval * ^ * | alert(1) * | ~~~ * ``` * * @type {State} */ function meta(code) { if (code === null || markdownLineEnding(code)) { effects.exit('chunkString'); effects.exit('codeFencedFenceMeta'); return infoBefore(code); } if (code === 96 && code === marker) { return nok(code); } effects.consume(code); return meta; } /** * At eol/eof in code, before a non-lazy closing fence or content. * * ```markdown * > | ~~~js * ^ * > | alert(1) * ^ * | ~~~ * ``` * * @type {State} */ function atNonLazyBreak(code) { return effects.attempt(closeStart, after, contentBefore)(code); } /** * Before code content, not a closing fence, at eol. * * ```markdown * | ~~~js * > | alert(1) * ^ * | ~~~ * ``` * * @type {State} */ function contentBefore(code) { effects.enter('lineEnding'); effects.consume(code); effects.exit('lineEnding'); return contentStart; } /** * Before code content, not a closing fence. * * ```markdown * | ~~~js * > | alert(1) * ^ * | ~~~ * ``` * * @type {State} */ function contentStart(code) { return initialPrefix > 0 && markdownSpace(code) ? factorySpace(effects, beforeContentChunk, 'linePrefix', initialPrefix + 1)(code) : beforeContentChunk(code); } /** * Before code content, after optional prefix. * * ```markdown * | ~~~js * > | alert(1) * ^ * | ~~~ * ``` * * @type {State} */ function beforeContentChunk(code) { if (code === null || markdownLineEnding(code)) { return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code); } effects.enter('codeFlowValue'); return contentChunk(code); } /** * In code content. * * ```markdown * | ~~~js * > | alert(1) * ^^^^^^^^ * | ~~~ * ``` * * @type {State} */ function contentChunk(code) { if (code === null || markdownLineEnding(code)) { effects.exit('codeFlowValue'); return beforeContentChunk(code); } effects.consume(code); return contentChunk; } /** * After code. * * ```markdown * | ~~~js * | alert(1) * > | ~~~ * ^ * ``` * * @type {State} */ function after(code) { effects.exit('codeFenced'); return ok(code); } /** * @this {TokenizeContext} * @type {Tokenizer} */ function tokenizeCloseStart(effects, ok, nok) { let size = 0; return startBefore; /** * * * @type {State} */ function startBefore(code) { effects.enter('lineEnding'); effects.consume(code); effects.exit('lineEnding'); return start; } /** * Before closing fence, at optional whitespace. * * ```markdown * | ~~~js * | alert(1) * > | ~~~ * ^ * ``` * * @type {State} */ function start(code) { // Always populated by defaults. // To do: `enter` here or in next state? effects.enter('codeFencedFence'); return markdownSpace(code) ? factorySpace(effects, beforeSequenceClose, 'linePrefix', self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4)(code) : beforeSequenceClose(code); } /** * In closing fence, after optional whitespace, at sequence. * * ```markdown * | ~~~js * | alert(1) * > | ~~~ * ^ * ``` * * @type {State} */ function beforeSequenceClose(code) { if (code === marker) { effects.enter('codeFencedFenceSequence'); return sequenceClose(code); } return nok(code); } /** * In closing fence sequence. * * ```markdown * | ~~~js * | alert(1) * > | ~~~ * ^ * ``` * * @type {State} */ function sequenceClose(code) { if (code === marker) { size++; effects.consume(code); return sequenceClose; } if (size >= sizeOpen) { effects.exit('codeFencedFenceSequence'); return markdownSpace(code) ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code) : sequenceCloseAfter(code); } return nok(code); } /** * After closing fence sequence, after optional whitespace. * * ```markdown * | ~~~js * | alert(1) * > | ~~~ * ^ * ``` * * @type {State} */ function sequenceCloseAfter(code) { if (code === null || markdownLineEnding(code)) { effects.exit('codeFencedFence'); return ok(code); } return nok(code); } } } /** * @this {TokenizeContext} * @type {Tokenizer} */ function tokenizeNonLazyContinuation(effects, ok, nok) { const self = this; return start; /** * * * @type {State} */ function start(code) { if (code === null) { return nok(code); } effects.enter('lineEnding'); effects.consume(code); effects.exit('lineEnding'); return lineStart; } /** * * * @type {State} */ function lineStart(code) { return self.parser.lazy[self.now().line] ? nok(code) : ok(code); } } ;// CONCATENATED MODULE: ./node_modules/.pnpm/decode-named-character-reference@1.0.2/node_modules/decode-named-character-reference/index.dom.js /// /* eslint-env browser */ const index_dom_element = document.createElement('i'); /** * @param {string} value * @returns {string|false} */ function decodeNamedCharacterReference(value) { const characterReference = '&' + value + ';'; index_dom_element.innerHTML = characterReference; const char = index_dom_element.textContent; // Some named character references do not require the closing semicolon // (`¬`, for instance), which leads to situations where parsing the assumed // named reference of `¬it;` will result in the string `¬it;`. // When we encounter a trailing semicolon after parsing, and the character // reference to decode was not a semicolon (`;`), we can assume that the // matching was not complete. // @ts-expect-error: TypeScript is wrong that `textContent` on elements can // yield `null`. if (char.charCodeAt(char.length - 1) === 59 /* `;` */ && value !== 'semi') { return false; } // If the decoded string is equal to the input, the character reference was // not valid. // @ts-expect-error: TypeScript is wrong that `textContent` on elements can // yield `null`. return char === characterReference ? false : char; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/micromark-core-commonmark@1.1.0/node_modules/micromark-core-commonmark/lib/character-reference.js /** * @typedef {import('micromark-util-types').Code} Code * @typedef {import('micromark-util-types').Construct} Construct * @typedef {import('micromark-util-types').State} State * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext * @typedef {import('micromark-util-types').Tokenizer} Tokenizer */ /** @type {Construct} */ const characterReference = { name: 'characterReference', tokenize: tokenizeCharacterReference }; /** * @this {TokenizeContext} * @type {Tokenizer} */ function tokenizeCharacterReference(effects, ok, nok) { const self = this; let size = 0; /** @type {number} */ let max; /** @type {(code: Code) => boolean} */ let test; return start; /** * Start of character reference. * * ```markdown * > | a&b * ^ * > | a{b * ^ * > | a b * ^ * ``` * * @type {State} */ function start(code) { effects.enter('characterReference'); effects.enter('characterReferenceMarker'); effects.consume(code); effects.exit('characterReferenceMarker'); return open; } /** * After `&`, at `#` for numeric references or alphanumeric for named * references. * * ```markdown * > | a&b * ^ * > | a{b * ^ * > | a b * ^ * ``` * * @type {State} */ function open(code) { if (code === 35) { effects.enter('characterReferenceMarkerNumeric'); effects.consume(code); effects.exit('characterReferenceMarkerNumeric'); return numeric; } effects.enter('characterReferenceValue'); max = 31; test = asciiAlphanumeric; return value(code); } /** * After `#`, at `x` for hexadecimals or digit for decimals. * * ```markdown * > | a{b * ^ * > | a b * ^ * ``` * * @type {State} */ function numeric(code) { if (code === 88 || code === 120) { effects.enter('characterReferenceMarkerHexadecimal'); effects.consume(code); effects.exit('characterReferenceMarkerHexadecimal'); effects.enter('characterReferenceValue'); max = 6; test = asciiHexDigit; return value; } effects.enter('characterReferenceValue'); max = 7; test = asciiDigit; return value(code); } /** * After markers (`&#x`, `&#`, or `&`), in value, before `;`. * * The character reference kind defines what and how many characters are * allowed. * * ```markdown * > | a&b * ^^^ * > | a{b * ^^^ * > | a b * ^ * ``` * * @type {State} */ function value(code) { if (code === 59 && size) { const token = effects.exit('characterReferenceValue'); if (test === asciiAlphanumeric && !decodeNamedCharacterReference(self.sliceSerialize(token))) { return nok(code); } // To do: `markdown-rs` uses a different name: // `CharacterReferenceMarkerSemi`. effects.enter('characterReferenceMarker'); effects.consume(code); effects.exit('characterReferenceMarker'); effects.exit('characterReference'); return ok; } if (test(code) && size++ < max) { effects.consume(code); return value; } return nok(code); } } ;// CONCATENATED MODULE: ./node_modules/.pnpm/micromark-core-commonmark@1.1.0/node_modules/micromark-core-commonmark/lib/character-escape.js /** * @typedef {import('micromark-util-types').Construct} Construct * @typedef {import('micromark-util-types').State} State * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext * @typedef {import('micromark-util-types').Tokenizer} Tokenizer */ /** @type {Construct} */ const characterEscape = { name: 'characterEscape', tokenize: tokenizeCharacterEscape }; /** * @this {TokenizeContext} * @type {Tokenizer} */ function tokenizeCharacterEscape(effects, ok, nok) { return start; /** * Start of character escape. * * ```markdown * > | a\*b * ^ * ``` * * @type {State} */ function start(code) { effects.enter('characterEscape'); effects.enter('escapeMarker'); effects.consume(code); effects.exit('escapeMarker'); return inside; } /** * After `\`, at punctuation. * * ```markdown * > | a\*b * ^ * ``` * * @type {State} */ function inside(code) { // ASCII punctuation. if (asciiPunctuation(code)) { effects.enter('characterEscapeValue'); effects.consume(code); effects.exit('characterEscapeValue'); effects.exit('characterEscape'); return ok; } return nok(code); } } ;// CONCATENATED MODULE: ./node_modules/.pnpm/micromark-core-commonmark@1.1.0/node_modules/micromark-core-commonmark/lib/line-ending.js /** * @typedef {import('micromark-util-types').Construct} Construct * @typedef {import('micromark-util-types').State} State * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext * @typedef {import('micromark-util-types').Tokenizer} Tokenizer */ /** @type {Construct} */ const lineEnding = { name: 'lineEnding', tokenize: tokenizeLineEnding }; /** * @this {TokenizeContext} * @type {Tokenizer} */ function tokenizeLineEnding(effects, ok) { return start; /** @type {State} */ function start(code) { effects.enter('lineEnding'); effects.consume(code); effects.exit('lineEnding'); return factorySpace(effects, ok, 'linePrefix'); } } ;// CONCATENATED MODULE: ./node_modules/.pnpm/micromark-core-commonmark@1.1.0/node_modules/micromark-core-commonmark/lib/label-end.js /** * @typedef {import('micromark-util-types').Construct} Construct * @typedef {import('micromark-util-types').Event} Event * @typedef {import('micromark-util-types').Resolver} Resolver * @typedef {import('micromark-util-types').State} State * @typedef {import('micromark-util-types').Token} Token * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext * @typedef {import('micromark-util-types').Tokenizer} Tokenizer */ /** @type {Construct} */ const labelEnd = { name: 'labelEnd', tokenize: tokenizeLabelEnd, resolveTo: resolveToLabelEnd, resolveAll: resolveAllLabelEnd }; /** @type {Construct} */ const resourceConstruct = { tokenize: tokenizeResource }; /** @type {Construct} */ const referenceFullConstruct = { tokenize: tokenizeReferenceFull }; /** @type {Construct} */ const referenceCollapsedConstruct = { tokenize: tokenizeReferenceCollapsed }; /** @type {Resolver} */ function resolveAllLabelEnd(events) { let index = -1; while (++index < events.length) { const token = events[index][1]; if (token.type === 'labelImage' || token.type === 'labelLink' || token.type === 'labelEnd') { // Remove the marker. events.splice(index + 1, token.type === 'labelImage' ? 4 : 2); token.type = 'data'; index++; } } return events; } /** @type {Resolver} */ function resolveToLabelEnd(events, context) { let index = events.length; let offset = 0; /** @type {Token} */ let token; /** @type {number | undefined} */ let open; /** @type {number | undefined} */ let close; /** @type {Array} */ let media; // Find an opening. while (index--) { token = events[index][1]; if (open) { // If we see another link, or inactive link label, we’ve been here before. if (token.type === 'link' || token.type === 'labelLink' && token._inactive) { break; } // Mark other link openings as inactive, as we can’t have links in // links. if (events[index][0] === 'enter' && token.type === 'labelLink') { token._inactive = true; } } else if (close) { if (events[index][0] === 'enter' && (token.type === 'labelImage' || token.type === 'labelLink') && !token._balanced) { open = index; if (token.type !== 'labelLink') { offset = 2; break; } } } else if (token.type === 'labelEnd') { close = index; } } const group = { type: events[open][1].type === 'labelLink' ? 'link' : 'image', start: Object.assign({}, events[open][1].start), end: Object.assign({}, events[events.length - 1][1].end) }; const label = { type: 'label', start: Object.assign({}, events[open][1].start), end: Object.assign({}, events[close][1].end) }; const text = { type: 'labelText', start: Object.assign({}, events[open + offset + 2][1].end), end: Object.assign({}, events[close - 2][1].start) }; media = [['enter', group, context], ['enter', label, context]]; // Opening marker. media = push(media, events.slice(open + 1, open + offset + 3)); // Text open. media = push(media, [['enter', text, context]]); // Always populated by defaults. // Between. media = push(media, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + offset + 4, close - 3), context)); // Text close, marker close, label close. media = push(media, [['exit', text, context], events[close - 2], events[close - 1], ['exit', label, context]]); // Reference, resource, or so. media = push(media, events.slice(close + 1)); // Media close. media = push(media, [['exit', group, context]]); splice(events, open, events.length, media); return events; } /** * @this {TokenizeContext} * @type {Tokenizer} */ function tokenizeLabelEnd(effects, ok, nok) { const self = this; let index = self.events.length; /** @type {Token} */ let labelStart; /** @type {boolean} */ let defined; // Find an opening. while (index--) { if ((self.events[index][1].type === 'labelImage' || self.events[index][1].type === 'labelLink') && !self.events[index][1]._balanced) { labelStart = self.events[index][1]; break; } } return start; /** * Start of label end. * * ```markdown * > | [a](b) c * ^ * > | [a][b] c * ^ * > | [a][] b * ^ * > | [a] b * ``` * * @type {State} */ function start(code) { // If there is not an okay opening. if (!labelStart) { return nok(code); } // If the corresponding label (link) start is marked as inactive, // it means we’d be wrapping a link, like this: // // ```markdown // > | a [b [c](d) e](f) g. // ^ // ``` // // We can’t have that, so it’s just balanced brackets. if (labelStart._inactive) { return labelEndNok(code); } defined = self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize({ start: labelStart.end, end: self.now() }))); effects.enter('labelEnd'); effects.enter('labelMarker'); effects.consume(code); effects.exit('labelMarker'); effects.exit('labelEnd'); return after; } /** * After `]`. * * ```markdown * > | [a](b) c * ^ * > | [a][b] c * ^ * > | [a][] b * ^ * > | [a] b * ^ * ``` * * @type {State} */ function after(code) { // Note: `markdown-rs` also parses GFM footnotes here, which for us is in // an extension. // Resource (`[asd](fgh)`)? if (code === 40) { return effects.attempt(resourceConstruct, labelEndOk, defined ? labelEndOk : labelEndNok)(code); } // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference? if (code === 91) { return effects.attempt(referenceFullConstruct, labelEndOk, defined ? referenceNotFull : labelEndNok)(code); } // Shortcut (`[asd]`) reference? return defined ? labelEndOk(code) : labelEndNok(code); } /** * After `]`, at `[`, but not at a full reference. * * > 👉 **Note**: we only get here if the label is defined. * * ```markdown * > | [a][] b * ^ * > | [a] b * ^ * ``` * * @type {State} */ function referenceNotFull(code) { return effects.attempt(referenceCollapsedConstruct, labelEndOk, labelEndNok)(code); } /** * Done, we found something. * * ```markdown * > | [a](b) c * ^ * > | [a][b] c * ^ * > | [a][] b * ^ * > | [a] b * ^ * ``` * * @type {State} */ function labelEndOk(code) { // Note: `markdown-rs` does a bunch of stuff here. return ok(code); } /** * Done, it’s nothing. * * There was an okay opening, but we didn’t match anything. * * ```markdown * > | [a](b c * ^ * > | [a][b c * ^ * > | [a] b * ^ * ``` * * @type {State} */ function labelEndNok(code) { labelStart._balanced = true; return nok(code); } } /** * @this {TokenizeContext} * @type {Tokenizer} */ function tokenizeResource(effects, ok, nok) { return resourceStart; /** * At a resource. * * ```markdown * > | [a](b) c * ^ * ``` * * @type {State} */ function resourceStart(code) { effects.enter('resource'); effects.enter('resourceMarker'); effects.consume(code); effects.exit('resourceMarker'); return resourceBefore; } /** * In resource, after `(`, at optional whitespace. * * ```markdown * > | [a](b) c * ^ * ``` * * @type {State} */ function resourceBefore(code) { return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceOpen)(code) : resourceOpen(code); } /** * In resource, after optional whitespace, at `)` or a destination. * * ```markdown * > | [a](b) c * ^ * ``` * * @type {State} */ function resourceOpen(code) { if (code === 41) { return resourceEnd(code); } return factoryDestination(effects, resourceDestinationAfter, resourceDestinationMissing, 'resourceDestination', 'resourceDestinationLiteral', 'resourceDestinationLiteralMarker', 'resourceDestinationRaw', 'resourceDestinationString', 32)(code); } /** * In resource, after destination, at optional whitespace. * * ```markdown * > | [a](b) c * ^ * ``` * * @type {State} */ function resourceDestinationAfter(code) { return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceBetween)(code) : resourceEnd(code); } /** * At invalid destination. * * ```markdown * > | [a](<<) b * ^ * ``` * * @type {State} */ function resourceDestinationMissing(code) { return nok(code); } /** * In resource, after destination and whitespace, at `(` or title. * * ```markdown * > | [a](b ) c * ^ * ``` * * @type {State} */ function resourceBetween(code) { if (code === 34 || code === 39 || code === 40) { return factoryTitle(effects, resourceTitleAfter, nok, 'resourceTitle', 'resourceTitleMarker', 'resourceTitleString')(code); } return resourceEnd(code); } /** * In resource, after title, at optional whitespace. * * ```markdown * > | [a](b "c") d * ^ * ``` * * @type {State} */ function resourceTitleAfter(code) { return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceEnd)(code) : resourceEnd(code); } /** * In resource, at `)`. * * ```markdown * > | [a](b) d * ^ * ``` * * @type {State} */ function resourceEnd(code) { if (code === 41) { effects.enter('resourceMarker'); effects.consume(code); effects.exit('resourceMarker'); effects.exit('resource'); return ok; } return nok(code); } } /** * @this {TokenizeContext} * @type {Tokenizer} */ function tokenizeReferenceFull(effects, ok, nok) { const self = this; return referenceFull; /** * In a reference (full), at the `[`. * * ```markdown * > | [a][b] d * ^ * ``` * * @type {State} */ function referenceFull(code) { return factoryLabel.call(self, effects, referenceFullAfter, referenceFullMissing, 'reference', 'referenceMarker', 'referenceString')(code); } /** * In a reference (full), after `]`. * * ```markdown * > | [a][b] d * ^ * ``` * * @type {State} */ function referenceFullAfter(code) { return self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1))) ? ok(code) : nok(code); } /** * In reference (full) that was missing. * * ```markdown * > | [a][b d * ^ * ``` * * @type {State} */ function referenceFullMissing(code) { return nok(code); } } /** * @this {TokenizeContext} * @type {Tokenizer} */ function tokenizeReferenceCollapsed(effects, ok, nok) { return referenceCollapsedStart; /** * In reference (collapsed), at `[`. * * > 👉 **Note**: we only get here if the label is defined. * * ```markdown * > | [a][] d * ^ * ``` * * @type {State} */ function referenceCollapsedStart(code) { // We only attempt a collapsed label if there’s a `[`. effects.enter('reference'); effects.enter('referenceMarker'); effects.consume(code); effects.exit('referenceMarker'); return referenceCollapsedOpen; } /** * In reference (collapsed), at `]`. * * > 👉 **Note**: we only get here if the label is defined. * * ```markdown * > | [a][] d * ^ * ``` * * @type {State} */ function referenceCollapsedOpen(code) { if (code === 93) { effects.enter('referenceMarker'); effects.consume(code); effects.exit('referenceMarker'); effects.exit('reference'); return ok; } return nok(code); } } ;// CONCATENATED MODULE: ./node_modules/.pnpm/micromark-core-commonmark@1.1.0/node_modules/micromark-core-commonmark/lib/label-start-image.js /** * @typedef {import('micromark-util-types').Construct} Construct * @typedef {import('micromark-util-types').State} State * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext * @typedef {import('micromark-util-types').Tokenizer} Tokenizer */ /** @type {Construct} */ const labelStartImage = { name: 'labelStartImage', tokenize: tokenizeLabelStartImage, resolveAll: labelEnd.resolveAll }; /** * @this {TokenizeContext} * @type {Tokenizer} */ function tokenizeLabelStartImage(effects, ok, nok) { const self = this; return start; /** * Start of label (image) start. * * ```markdown * > | a ![b] c * ^ * ``` * * @type {State} */ function start(code) { effects.enter('labelImage'); effects.enter('labelImageMarker'); effects.consume(code); effects.exit('labelImageMarker'); return open; } /** * After `!`, at `[`. * * ```markdown * > | a ![b] c * ^ * ``` * * @type {State} */ function open(code) { if (code === 91) { effects.enter('labelMarker'); effects.consume(code); effects.exit('labelMarker'); effects.exit('labelImage'); return after; } return nok(code); } /** * After `![`. * * ```markdown * > | a ![b] c * ^ * ``` * * This is needed in because, when GFM footnotes are enabled, images never * form when started with a `^`. * Instead, links form: * * ```markdown * ![^a](b) * * ![^a][b] * * [b]: c * ``` * * ```html *

!^a

*

!^a

* ``` * * @type {State} */ function after(code) { // To do: use a new field to do this, this is still needed for // `micromark-extension-gfm-footnote`, but the `label-start-link` // behavior isn’t. // Hidden footnotes hook. /* c8 ignore next 3 */ return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs ? nok(code) : ok(code); } } ;// CONCATENATED MODULE: ./node_modules/.pnpm/micromark-util-classify-character@1.1.0/node_modules/micromark-util-classify-character/index.js /** * @typedef {import('micromark-util-types').Code} Code */ /** * Classify whether a code represents whitespace, punctuation, or something * else. * * Used for attention (emphasis, strong), whose sequences can open or close * based on the class of surrounding characters. * * > 👉 **Note**: eof (`null`) is seen as whitespace. * * @param {Code} code * Code. * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined} * Group. */ function classifyCharacter(code) { if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) { return 1; } if (unicodePunctuation(code)) { return 2; } } ;// CONCATENATED MODULE: ./node_modules/.pnpm/micromark-core-commonmark@1.1.0/node_modules/micromark-core-commonmark/lib/attention.js /** * @typedef {import('micromark-util-types').Code} Code * @typedef {import('micromark-util-types').Construct} Construct * @typedef {import('micromark-util-types').Event} Event * @typedef {import('micromark-util-types').Point} Point * @typedef {import('micromark-util-types').Resolver} Resolver * @typedef {import('micromark-util-types').State} State * @typedef {import('micromark-util-types').Token} Token * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext * @typedef {import('micromark-util-types').Tokenizer} Tokenizer */ /** @type {Construct} */ const attention = { name: 'attention', tokenize: tokenizeAttention, resolveAll: resolveAllAttention }; /** * Take all events and resolve attention to emphasis or strong. * * @type {Resolver} */ function resolveAllAttention(events, context) { let index = -1; /** @type {number} */ let open; /** @type {Token} */ let group; /** @type {Token} */ let text; /** @type {Token} */ let openingSequence; /** @type {Token} */ let closingSequence; /** @type {number} */ let use; /** @type {Array} */ let nextEvents; /** @type {number} */ let offset; // Walk through all events. // // Note: performance of this is fine on an mb of normal markdown, but it’s // a bottleneck for malicious stuff. while (++index < events.length) { // Find a token that can close. if (events[index][0] === 'enter' && events[index][1].type === 'attentionSequence' && events[index][1]._close) { open = index; // Now walk back to find an opener. while (open--) { // Find a token that can open the closer. if (events[open][0] === 'exit' && events[open][1].type === 'attentionSequence' && events[open][1]._open && // If the markers are the same: context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index][1]).charCodeAt(0)) { // If the opening can close or the closing can open, // and the close size *is not* a multiple of three, // but the sum of the opening and closing size *is* multiple of three, // then don’t match. if ((events[open][1]._close || events[index][1]._open) && (events[index][1].end.offset - events[index][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index][1].end.offset - events[index][1].start.offset) % 3)) { continue; } // Number of markers to use from the sequence. use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index][1].end.offset - events[index][1].start.offset > 1 ? 2 : 1; const start = Object.assign({}, events[open][1].end); const end = Object.assign({}, events[index][1].start); movePoint(start, -use); movePoint(end, use); openingSequence = { type: use > 1 ? 'strongSequence' : 'emphasisSequence', start, end: Object.assign({}, events[open][1].end) }; closingSequence = { type: use > 1 ? 'strongSequence' : 'emphasisSequence', start: Object.assign({}, events[index][1].start), end }; text = { type: use > 1 ? 'strongText' : 'emphasisText', start: Object.assign({}, events[open][1].end), end: Object.assign({}, events[index][1].start) }; group = { type: use > 1 ? 'strong' : 'emphasis', start: Object.assign({}, openingSequence.start), end: Object.assign({}, closingSequence.end) }; events[open][1].end = Object.assign({}, openingSequence.start); events[index][1].start = Object.assign({}, closingSequence.end); nextEvents = []; // If there are more markers in the opening, add them before. if (events[open][1].end.offset - events[open][1].start.offset) { nextEvents = push(nextEvents, [['enter', events[open][1], context], ['exit', events[open][1], context]]); } // Opening. nextEvents = push(nextEvents, [['enter', group, context], ['enter', openingSequence, context], ['exit', openingSequence, context], ['enter', text, context]]); // Always populated by defaults. // Between. nextEvents = push(nextEvents, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + 1, index), context)); // Closing. nextEvents = push(nextEvents, [['exit', text, context], ['enter', closingSequence, context], ['exit', closingSequence, context], ['exit', group, context]]); // If there are more markers in the closing, add them after. if (events[index][1].end.offset - events[index][1].start.offset) { offset = 2; nextEvents = push(nextEvents, [['enter', events[index][1], context], ['exit', events[index][1], context]]); } else { offset = 0; } splice(events, open - 1, index - open + 3, nextEvents); index = open + nextEvents.length - offset - 2; break; } } } } // Remove remaining sequences. index = -1; while (++index < events.length) { if (events[index][1].type === 'attentionSequence') { events[index][1].type = 'data'; } } return events; } /** * @this {TokenizeContext} * @type {Tokenizer} */ function tokenizeAttention(effects, ok) { const attentionMarkers = this.parser.constructs.attentionMarkers.null; const previous = this.previous; const before = classifyCharacter(previous); /** @type {NonNullable} */ let marker; return start; /** * Before a sequence. * * ```markdown * > | ** * ^ * ``` * * @type {State} */ function start(code) { marker = code; effects.enter('attentionSequence'); return inside(code); } /** * In a sequence. * * ```markdown * > | ** * ^^ * ``` * * @type {State} */ function inside(code) { if (code === marker) { effects.consume(code); return inside; } const token = effects.exit('attentionSequence'); // To do: next major: move this to resolver, just like `markdown-rs`. const after = classifyCharacter(code); // Always populated by defaults. const open = !after || after === 2 && before || attentionMarkers.includes(code); const close = !before || before === 2 && after || attentionMarkers.includes(previous); token._open = Boolean(marker === 42 ? open : open && (before || !close)); token._close = Boolean(marker === 42 ? close : close && (after || !open)); return ok(code); } } /** * Move a point a bit. * * Note: `move` only works inside lines! It’s not possible to move past other * chunks (replacement characters, tabs, or line endings). * * @param {Point} point * @param {number} offset * @returns {void} */ function movePoint(point, offset) { point.column += offset; point.offset += offset; point._bufferIndex += offset; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/micromark-core-commonmark@1.1.0/node_modules/micromark-core-commonmark/lib/autolink.js /** * @typedef {import('micromark-util-types').Construct} Construct * @typedef {import('micromark-util-types').State} State * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext * @typedef {import('micromark-util-types').Tokenizer} Tokenizer */ /** @type {Construct} */ const autolink = { name: 'autolink', tokenize: tokenizeAutolink }; /** * @this {TokenizeContext} * @type {Tokenizer} */ function tokenizeAutolink(effects, ok, nok) { let size = 0; return start; /** * Start of an autolink. * * ```markdown * > | ab * ^ * > | ab * ^ * ``` * * @type {State} */ function start(code) { effects.enter('autolink'); effects.enter('autolinkMarker'); effects.consume(code); effects.exit('autolinkMarker'); effects.enter('autolinkProtocol'); return open; } /** * After `<`, at protocol or atext. * * ```markdown * > | ab * ^ * > | ab * ^ * ``` * * @type {State} */ function open(code) { if (asciiAlpha(code)) { effects.consume(code); return schemeOrEmailAtext; } return emailAtext(code); } /** * At second byte of protocol or atext. * * ```markdown * > | ab * ^ * > | ab * ^ * ``` * * @type {State} */ function schemeOrEmailAtext(code) { // ASCII alphanumeric and `+`, `-`, and `.`. if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) { // Count the previous alphabetical from `open` too. size = 1; return schemeInsideOrEmailAtext(code); } return emailAtext(code); } /** * In ambiguous protocol or atext. * * ```markdown * > | ab * ^ * > | ab * ^ * ``` * * @type {State} */ function schemeInsideOrEmailAtext(code) { if (code === 58) { effects.consume(code); size = 0; return urlInside; } // ASCII alphanumeric and `+`, `-`, and `.`. if ((code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && size++ < 32) { effects.consume(code); return schemeInsideOrEmailAtext; } size = 0; return emailAtext(code); } /** * After protocol, in URL. * * ```markdown * > | ab * ^ * ``` * * @type {State} */ function urlInside(code) { if (code === 62) { effects.exit('autolinkProtocol'); effects.enter('autolinkMarker'); effects.consume(code); effects.exit('autolinkMarker'); effects.exit('autolink'); return ok; } // ASCII control, space, or `<`. if (code === null || code === 32 || code === 60 || asciiControl(code)) { return nok(code); } effects.consume(code); return urlInside; } /** * In email atext. * * ```markdown * > | ab * ^ * ``` * * @type {State} */ function emailAtext(code) { if (code === 64) { effects.consume(code); return emailAtSignOrDot; } if (asciiAtext(code)) { effects.consume(code); return emailAtext; } return nok(code); } /** * In label, after at-sign or dot. * * ```markdown * > | ab * ^ ^ * ``` * * @type {State} */ function emailAtSignOrDot(code) { return asciiAlphanumeric(code) ? emailLabel(code) : nok(code); } /** * In label, where `.` and `>` are allowed. * * ```markdown * > | ab * ^ * ``` * * @type {State} */ function emailLabel(code) { if (code === 46) { effects.consume(code); size = 0; return emailAtSignOrDot; } if (code === 62) { // Exit, then change the token type. effects.exit('autolinkProtocol').type = 'autolinkEmail'; effects.enter('autolinkMarker'); effects.consume(code); effects.exit('autolinkMarker'); effects.exit('autolink'); return ok; } return emailValue(code); } /** * In label, where `.` and `>` are *not* allowed. * * Though, this is also used in `emailLabel` to parse other values. * * ```markdown * > | ab * ^ * ``` * * @type {State} */ function emailValue(code) { // ASCII alphanumeric or `-`. if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) { const next = code === 45 ? emailValue : emailLabel; effects.consume(code); return next; } return nok(code); } } ;// CONCATENATED MODULE: ./node_modules/.pnpm/micromark-core-commonmark@1.1.0/node_modules/micromark-core-commonmark/lib/html-text.js /** * @typedef {import('micromark-util-types').Code} Code * @typedef {import('micromark-util-types').Construct} Construct * @typedef {import('micromark-util-types').State} State * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext * @typedef {import('micromark-util-types').Tokenizer} Tokenizer */ /** @type {Construct} */ const htmlText = { name: 'htmlText', tokenize: tokenizeHtmlText }; /** * @this {TokenizeContext} * @type {Tokenizer} */ function tokenizeHtmlText(effects, ok, nok) { const self = this; /** @type {NonNullable | undefined} */ let marker; /** @type {number} */ let index; /** @type {State} */ let returnState; return start; /** * Start of HTML (text). * * ```markdown * > | a c * ^ * ``` * * @type {State} */ function start(code) { effects.enter('htmlText'); effects.enter('htmlTextData'); effects.consume(code); return open; } /** * After `<`, at tag name or other stuff. * * ```markdown * > | a c * ^ * > | a c * ^ * > | a c * ^ * ``` * * @type {State} */ function open(code) { if (code === 33) { effects.consume(code); return declarationOpen; } if (code === 47) { effects.consume(code); return tagCloseStart; } if (code === 63) { effects.consume(code); return instruction; } // ASCII alphabetical. if (asciiAlpha(code)) { effects.consume(code); return tagOpen; } return nok(code); } /** * After ` | a c * ^ * > | a c * ^ * > | a &<]]> c * ^ * ``` * * @type {State} */ function declarationOpen(code) { if (code === 45) { effects.consume(code); return commentOpenInside; } if (code === 91) { effects.consume(code); index = 0; return cdataOpenInside; } if (asciiAlpha(code)) { effects.consume(code); return declaration; } return nok(code); } /** * In a comment, after ` | a c * ^ * ``` * * @type {State} */ function commentOpenInside(code) { if (code === 45) { effects.consume(code); return commentEnd; } return nok(code); } /** * In comment. * * ```markdown * > | a c * ^ * ``` * * @type {State} */ function comment(code) { if (code === null) { return nok(code); } if (code === 45) { effects.consume(code); return commentClose; } if (markdownLineEnding(code)) { returnState = comment; return lineEndingBefore(code); } effects.consume(code); return comment; } /** * In comment, after `-`. * * ```markdown * > | a c * ^ * ``` * * @type {State} */ function commentClose(code) { if (code === 45) { effects.consume(code); return commentEnd; } return comment(code); } /** * In comment, after `--`. * * ```markdown * > | a c * ^ * ``` * * @type {State} */ function commentEnd(code) { return code === 62 ? end(code) : code === 45 ? commentClose(code) : comment(code); } /** * After ` | a &<]]> b * ^^^^^^ * ``` * * @type {State} */ function cdataOpenInside(code) { const value = 'CDATA['; if (code === value.charCodeAt(index++)) { effects.consume(code); return index === value.length ? cdata : cdataOpenInside; } return nok(code); } /** * In CDATA. * * ```markdown * > | a &<]]> b * ^^^ * ``` * * @type {State} */ function cdata(code) { if (code === null) { return nok(code); } if (code === 93) { effects.consume(code); return cdataClose; } if (markdownLineEnding(code)) { returnState = cdata; return lineEndingBefore(code); } effects.consume(code); return cdata; } /** * In CDATA, after `]`, at another `]`. * * ```markdown * > | a &<]]> b * ^ * ``` * * @type {State} */ function cdataClose(code) { if (code === 93) { effects.consume(code); return cdataEnd; } return cdata(code); } /** * In CDATA, after `]]`, at `>`. * * ```markdown * > | a &<]]> b * ^ * ``` * * @type {State} */ function cdataEnd(code) { if (code === 62) { return end(code); } if (code === 93) { effects.consume(code); return cdataEnd; } return cdata(code); } /** * In declaration. * * ```markdown * > | a c * ^ * ``` * * @type {State} */ function declaration(code) { if (code === null || code === 62) { return end(code); } if (markdownLineEnding(code)) { returnState = declaration; return lineEndingBefore(code); } effects.consume(code); return declaration; } /** * In instruction. * * ```markdown * > | a c * ^ * ``` * * @type {State} */ function instruction(code) { if (code === null) { return nok(code); } if (code === 63) { effects.consume(code); return instructionClose; } if (markdownLineEnding(code)) { returnState = instruction; return lineEndingBefore(code); } effects.consume(code); return instruction; } /** * In instruction, after `?`, at `>`. * * ```markdown * > | a c * ^ * ``` * * @type {State} */ function instructionClose(code) { return code === 62 ? end(code) : instruction(code); } /** * After ` | a c * ^ * ``` * * @type {State} */ function tagCloseStart(code) { // ASCII alphabetical. if (asciiAlpha(code)) { effects.consume(code); return tagClose; } return nok(code); } /** * After ` | a c * ^ * ``` * * @type {State} */ function tagClose(code) { // ASCII alphanumerical and `-`. if (code === 45 || asciiAlphanumeric(code)) { effects.consume(code); return tagClose; } return tagCloseBetween(code); } /** * In closing tag, after tag name. * * ```markdown * > | a c * ^ * ``` * * @type {State} */ function tagCloseBetween(code) { if (markdownLineEnding(code)) { returnState = tagCloseBetween; return lineEndingBefore(code); } if (markdownSpace(code)) { effects.consume(code); return tagCloseBetween; } return end(code); } /** * After ` | a c * ^ * ``` * * @type {State} */ function tagOpen(code) { // ASCII alphanumerical and `-`. if (code === 45 || asciiAlphanumeric(code)) { effects.consume(code); return tagOpen; } if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { return tagOpenBetween(code); } return nok(code); } /** * In opening tag, after tag name. * * ```markdown * > | a c * ^ * ``` * * @type {State} */ function tagOpenBetween(code) { if (code === 47) { effects.consume(code); return end; } // ASCII alphabetical and `:` and `_`. if (code === 58 || code === 95 || asciiAlpha(code)) { effects.consume(code); return tagOpenAttributeName; } if (markdownLineEnding(code)) { returnState = tagOpenBetween; return lineEndingBefore(code); } if (markdownSpace(code)) { effects.consume(code); return tagOpenBetween; } return end(code); } /** * In attribute name. * * ```markdown * > | a d * ^ * ``` * * @type {State} */ function tagOpenAttributeName(code) { // ASCII alphabetical and `-`, `.`, `:`, and `_`. if (code === 45 || code === 46 || code === 58 || code === 95 || asciiAlphanumeric(code)) { effects.consume(code); return tagOpenAttributeName; } return tagOpenAttributeNameAfter(code); } /** * After attribute name, before initializer, the end of the tag, or * whitespace. * * ```markdown * > | a d * ^ * ``` * * @type {State} */ function tagOpenAttributeNameAfter(code) { if (code === 61) { effects.consume(code); return tagOpenAttributeValueBefore; } if (markdownLineEnding(code)) { returnState = tagOpenAttributeNameAfter; return lineEndingBefore(code); } if (markdownSpace(code)) { effects.consume(code); return tagOpenAttributeNameAfter; } return tagOpenBetween(code); } /** * Before unquoted, double quoted, or single quoted attribute value, allowing * whitespace. * * ```markdown * > | a e * ^ * ``` * * @type {State} */ function tagOpenAttributeValueBefore(code) { if (code === null || code === 60 || code === 61 || code === 62 || code === 96) { return nok(code); } if (code === 34 || code === 39) { effects.consume(code); marker = code; return tagOpenAttributeValueQuoted; } if (markdownLineEnding(code)) { returnState = tagOpenAttributeValueBefore; return lineEndingBefore(code); } if (markdownSpace(code)) { effects.consume(code); return tagOpenAttributeValueBefore; } effects.consume(code); return tagOpenAttributeValueUnquoted; } /** * In double or single quoted attribute value. * * ```markdown * > | a e * ^ * ``` * * @type {State} */ function tagOpenAttributeValueQuoted(code) { if (code === marker) { effects.consume(code); marker = undefined; return tagOpenAttributeValueQuotedAfter; } if (code === null) { return nok(code); } if (markdownLineEnding(code)) { returnState = tagOpenAttributeValueQuoted; return lineEndingBefore(code); } effects.consume(code); return tagOpenAttributeValueQuoted; } /** * In unquoted attribute value. * * ```markdown * > | a e * ^ * ``` * * @type {State} */ function tagOpenAttributeValueUnquoted(code) { if (code === null || code === 34 || code === 39 || code === 60 || code === 61 || code === 96) { return nok(code); } if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { return tagOpenBetween(code); } effects.consume(code); return tagOpenAttributeValueUnquoted; } /** * After double or single quoted attribute value, before whitespace or the end * of the tag. * * ```markdown * > | a e * ^ * ``` * * @type {State} */ function tagOpenAttributeValueQuotedAfter(code) { if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { return tagOpenBetween(code); } return nok(code); } /** * In certain circumstances of a tag where only an `>` is allowed. * * ```markdown * > | a e * ^ * ``` * * @type {State} */ function end(code) { if (code === 62) { effects.consume(code); effects.exit('htmlTextData'); effects.exit('htmlText'); return ok; } return nok(code); } /** * At eol. * * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about * > empty tokens. * * ```markdown * > | a * ``` * * @type {State} */ function lineEndingBefore(code) { effects.exit('htmlTextData'); effects.enter('lineEnding'); effects.consume(code); effects.exit('lineEnding'); return lineEndingAfter; } /** * After eol, at optional whitespace. * * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about * > empty tokens. * * ```markdown * | a * ^ * ``` * * @type {State} */ function lineEndingAfter(code) { // Always populated by defaults. return markdownSpace(code) ? factorySpace(effects, lineEndingAfterPrefix, 'linePrefix', self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4)(code) : lineEndingAfterPrefix(code); } /** * After eol, after optional whitespace. * * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about * > empty tokens. * * ```markdown * | a * ^ * ``` * * @type {State} */ function lineEndingAfterPrefix(code) { effects.enter('htmlTextData'); return returnState(code); } } ;// CONCATENATED MODULE: ./node_modules/.pnpm/micromark-core-commonmark@1.1.0/node_modules/micromark-core-commonmark/lib/label-start-link.js /** * @typedef {import('micromark-util-types').Construct} Construct * @typedef {import('micromark-util-types').State} State * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext * @typedef {import('micromark-util-types').Tokenizer} Tokenizer */ /** @type {Construct} */ const labelStartLink = { name: 'labelStartLink', tokenize: tokenizeLabelStartLink, resolveAll: labelEnd.resolveAll }; /** * @this {TokenizeContext} * @type {Tokenizer} */ function tokenizeLabelStartLink(effects, ok, nok) { const self = this; return start; /** * Start of label (link) start. * * ```markdown * > | a [b] c * ^ * ``` * * @type {State} */ function start(code) { effects.enter('labelLink'); effects.enter('labelMarker'); effects.consume(code); effects.exit('labelMarker'); effects.exit('labelLink'); return after; } /** @type {State} */ function after(code) { // To do: this isn’t needed in `micromark-extension-gfm-footnote`, // remove. // Hidden footnotes hook. /* c8 ignore next 3 */ return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs ? nok(code) : ok(code); } } ;// CONCATENATED MODULE: ./node_modules/.pnpm/micromark-core-commonmark@1.1.0/node_modules/micromark-core-commonmark/lib/hard-break-escape.js /** * @typedef {import('micromark-util-types').Construct} Construct * @typedef {import('micromark-util-types').State} State * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext * @typedef {import('micromark-util-types').Tokenizer} Tokenizer */ /** @type {Construct} */ const hardBreakEscape = { name: 'hardBreakEscape', tokenize: tokenizeHardBreakEscape }; /** * @this {TokenizeContext} * @type {Tokenizer} */ function tokenizeHardBreakEscape(effects, ok, nok) { return start; /** * Start of a hard break (escape). * * ```markdown * > | a\ * ^ * | b * ``` * * @type {State} */ function start(code) { effects.enter('hardBreakEscape'); effects.consume(code); return after; } /** * After `\`, at eol. * * ```markdown * > | a\ * ^ * | b * ``` * * @type {State} */ function after(code) { if (markdownLineEnding(code)) { effects.exit('hardBreakEscape'); return ok(code); } return nok(code); } } ;// CONCATENATED MODULE: ./node_modules/.pnpm/micromark-core-commonmark@1.1.0/node_modules/micromark-core-commonmark/lib/code-text.js /** * @typedef {import('micromark-util-types').Construct} Construct * @typedef {import('micromark-util-types').Previous} Previous * @typedef {import('micromark-util-types').Resolver} Resolver * @typedef {import('micromark-util-types').State} State * @typedef {import('micromark-util-types').Token} Token * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext * @typedef {import('micromark-util-types').Tokenizer} Tokenizer */ /** @type {Construct} */ const codeText = { name: 'codeText', tokenize: tokenizeCodeText, resolve: resolveCodeText, previous }; // To do: next major: don’t resolve, like `markdown-rs`. /** @type {Resolver} */ function resolveCodeText(events) { let tailExitIndex = events.length - 4; let headEnterIndex = 3; /** @type {number} */ let index; /** @type {number | undefined} */ let enter; // If we start and end with an EOL or a space. if ((events[headEnterIndex][1].type === 'lineEnding' || events[headEnterIndex][1].type === 'space') && (events[tailExitIndex][1].type === 'lineEnding' || events[tailExitIndex][1].type === 'space')) { index = headEnterIndex; // And we have data. while (++index < tailExitIndex) { if (events[index][1].type === 'codeTextData') { // Then we have padding. events[headEnterIndex][1].type = 'codeTextPadding'; events[tailExitIndex][1].type = 'codeTextPadding'; headEnterIndex += 2; tailExitIndex -= 2; break; } } } // Merge adjacent spaces and data. index = headEnterIndex - 1; tailExitIndex++; while (++index <= tailExitIndex) { if (enter === undefined) { if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') { enter = index; } } else if (index === tailExitIndex || events[index][1].type === 'lineEnding') { events[enter][1].type = 'codeTextData'; if (index !== enter + 2) { events[enter][1].end = events[index - 1][1].end; events.splice(enter + 2, index - enter - 2); tailExitIndex -= index - enter - 2; index = enter + 2; } enter = undefined; } } return events; } /** * @this {TokenizeContext} * @type {Previous} */ function previous(code) { // If there is a previous code, there will always be a tail. return code !== 96 || this.events[this.events.length - 1][1].type === 'characterEscape'; } /** * @this {TokenizeContext} * @type {Tokenizer} */ function tokenizeCodeText(effects, ok, nok) { const self = this; let sizeOpen = 0; /** @type {number} */ let size; /** @type {Token} */ let token; return start; /** * Start of code (text). * * ```markdown * > | `a` * ^ * > | \`a` * ^ * ``` * * @type {State} */ function start(code) { effects.enter('codeText'); effects.enter('codeTextSequence'); return sequenceOpen(code); } /** * In opening sequence. * * ```markdown * > | `a` * ^ * ``` * * @type {State} */ function sequenceOpen(code) { if (code === 96) { effects.consume(code); sizeOpen++; return sequenceOpen; } effects.exit('codeTextSequence'); return between(code); } /** * Between something and something else. * * ```markdown * > | `a` * ^^ * ``` * * @type {State} */ function between(code) { // EOF. if (code === null) { return nok(code); } // To do: next major: don’t do spaces in resolve, but when compiling, // like `markdown-rs`. // Tabs don’t work, and virtual spaces don’t make sense. if (code === 32) { effects.enter('space'); effects.consume(code); effects.exit('space'); return between; } // Closing fence? Could also be data. if (code === 96) { token = effects.enter('codeTextSequence'); size = 0; return sequenceClose(code); } if (markdownLineEnding(code)) { effects.enter('lineEnding'); effects.consume(code); effects.exit('lineEnding'); return between; } // Data. effects.enter('codeTextData'); return data(code); } /** * In data. * * ```markdown * > | `a` * ^ * ``` * * @type {State} */ function data(code) { if (code === null || code === 32 || code === 96 || markdownLineEnding(code)) { effects.exit('codeTextData'); return between(code); } effects.consume(code); return data; } /** * In closing sequence. * * ```markdown * > | `a` * ^ * ``` * * @type {State} */ function sequenceClose(code) { // More. if (code === 96) { effects.consume(code); size++; return sequenceClose; } // Done! if (size === sizeOpen) { effects.exit('codeTextSequence'); effects.exit('codeText'); return ok(code); } // More or less accents: mark as data. token.type = 'codeTextData'; return data(code); } } ;// CONCATENATED MODULE: ./node_modules/.pnpm/micromark@3.2.0/node_modules/micromark/lib/constructs.js /** * @typedef {import('micromark-util-types').Extension} Extension */ /** @satisfies {Extension['document']} */ const constructs_document = { [42]: list, [43]: list, [45]: list, [48]: list, [49]: list, [50]: list, [51]: list, [52]: list, [53]: list, [54]: list, [55]: list, [56]: list, [57]: list, [62]: blockQuote }; /** @satisfies {Extension['contentInitial']} */ const contentInitial = { [91]: definition }; /** @satisfies {Extension['flowInitial']} */ const flowInitial = { [-2]: codeIndented, [-1]: codeIndented, [32]: codeIndented }; /** @satisfies {Extension['flow']} */ const constructs_flow = { [35]: headingAtx, [42]: thematicBreak, [45]: [setextUnderline, thematicBreak], [60]: htmlFlow, [61]: setextUnderline, [95]: thematicBreak, [96]: codeFenced, [126]: codeFenced }; /** @satisfies {Extension['string']} */ const constructs_string = { [38]: characterReference, [92]: characterEscape }; /** @satisfies {Extension['text']} */ const constructs_text = { [-5]: lineEnding, [-4]: lineEnding, [-3]: lineEnding, [33]: labelStartImage, [38]: characterReference, [42]: attention, [60]: [autolink, htmlText], [91]: labelStartLink, [92]: [hardBreakEscape, characterEscape], [93]: labelEnd, [95]: attention, [96]: codeText }; /** @satisfies {Extension['insideSpan']} */ const insideSpan = { null: [attention, resolver] }; /** @satisfies {Extension['attentionMarkers']} */ const attentionMarkers = { null: [42, 95] }; /** @satisfies {Extension['disable']} */ const disable = { null: [] }; ;// CONCATENATED MODULE: ./node_modules/.pnpm/micromark@3.2.0/node_modules/micromark/lib/parse.js /** * @typedef {import('micromark-util-types').Create} Create * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct * @typedef {import('micromark-util-types').ParseContext} ParseContext * @typedef {import('micromark-util-types').ParseOptions} ParseOptions */ /** * @param {ParseOptions | null | undefined} [options] * @returns {ParseContext} */ function parse(options) { const settings = options || {}; const constructs = /** @type {FullNormalizedExtension} */ combineExtensions([constructs_namespaceObject, ...(settings.extensions || [])]); /** @type {ParseContext} */ const parser = { defined: [], lazy: {}, constructs, content: create(content), document: create(document_document), flow: create(flow), string: create(string), text: create(text_text) }; return parser; /** * @param {InitialConstruct} initial */ function create(initial) { return creator; /** @type {Create} */ function creator(from) { return createTokenizer(parser, initial, from); } } } ;// CONCATENATED MODULE: ./node_modules/.pnpm/micromark@3.2.0/node_modules/micromark/lib/preprocess.js /** * @typedef {import('micromark-util-types').Chunk} Chunk * @typedef {import('micromark-util-types').Code} Code * @typedef {import('micromark-util-types').Encoding} Encoding * @typedef {import('micromark-util-types').Value} Value */ /** * @callback Preprocessor * @param {Value} value * @param {Encoding | null | undefined} [encoding] * @param {boolean | null | undefined} [end=false] * @returns {Array} */ const search = /[\0\t\n\r]/g; /** * @returns {Preprocessor} */ function preprocess() { let column = 1; let buffer = ''; /** @type {boolean | undefined} */ let start = true; /** @type {boolean | undefined} */ let atCarriageReturn; return preprocessor; /** @type {Preprocessor} */ function preprocessor(value, encoding, end) { /** @type {Array} */ const chunks = []; /** @type {RegExpMatchArray | null} */ let match; /** @type {number} */ let next; /** @type {number} */ let startPosition; /** @type {number} */ let endPosition; /** @type {Code} */ let code; // @ts-expect-error `Buffer` does allow an encoding. value = buffer + value.toString(encoding); startPosition = 0; buffer = ''; if (start) { // To do: `markdown-rs` actually parses BOMs (byte order mark). if (value.charCodeAt(0) === 65279) { startPosition++; } start = undefined; } while (startPosition < value.length) { search.lastIndex = startPosition; match = search.exec(value); endPosition = match && match.index !== undefined ? match.index : value.length; code = value.charCodeAt(endPosition); if (!match) { buffer = value.slice(startPosition); break; } if (code === 10 && startPosition === endPosition && atCarriageReturn) { chunks.push(-3); atCarriageReturn = undefined; } else { if (atCarriageReturn) { chunks.push(-5); atCarriageReturn = undefined; } if (startPosition < endPosition) { chunks.push(value.slice(startPosition, endPosition)); column += endPosition - startPosition; } switch (code) { case 0: { chunks.push(65533); column++; break; } case 9: { next = Math.ceil(column / 4) * 4; chunks.push(-2); while (column++ < next) chunks.push(-1); break; } case 10: { chunks.push(-4); column = 1; break; } default: { atCarriageReturn = true; column = 1; } } } startPosition = endPosition + 1; } if (end) { if (atCarriageReturn) chunks.push(-5); if (buffer) chunks.push(buffer); chunks.push(null); } return chunks; } } ;// CONCATENATED MODULE: ./node_modules/.pnpm/micromark@3.2.0/node_modules/micromark/lib/postprocess.js /** * @typedef {import('micromark-util-types').Event} Event */ /** * @param {Array} events * @returns {Array} */ function postprocess(events) { while (!subtokenize(events)) { // Empty } return events; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/micromark-util-decode-numeric-character-reference@1.1.0/node_modules/micromark-util-decode-numeric-character-reference/index.js /** * Turn the number (in string form as either hexa- or plain decimal) coming from * a numeric character reference into a character. * * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes * non-characters and control characters safe. * * @param {string} value * Value to decode. * @param {number} base * Numeric base. * @returns {string} * Character. */ function decodeNumericCharacterReference(value, base) { const code = Number.parseInt(value, base); if ( // C0 except for HT, LF, FF, CR, space. code < 9 || code === 11 || code > 13 && code < 32 || // Control character (DEL) of C0, and C1 controls. code > 126 && code < 160 || // Lone high surrogates and low surrogates. code > 55295 && code < 57344 || // Noncharacters. code > 64975 && code < 65008 /* eslint-disable no-bitwise */ || (code & 65535) === 65535 || (code & 65535) === 65534 /* eslint-enable no-bitwise */ || // Out of range code > 1114111) { return '\uFFFD'; } return String.fromCharCode(code); } ;// CONCATENATED MODULE: ./node_modules/.pnpm/micromark-util-decode-string@1.1.0/node_modules/micromark-util-decode-string/index.js const characterEscapeOrReference = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi; /** * Decode markdown strings (which occur in places such as fenced code info * strings, destinations, labels, and titles). * * The “string” content type allows character escapes and -references. * This decodes those. * * @param {string} value * Value to decode. * @returns {string} * Decoded value. */ function decodeString(value) { return value.replace(characterEscapeOrReference, decode); } /** * @param {string} $0 * @param {string} $1 * @param {string} $2 * @returns {string} */ function decode($0, $1, $2) { if ($1) { // Escape. return $1; } // Reference. const head = $2.charCodeAt(0); if (head === 35) { const head = $2.charCodeAt(1); const hex = head === 120 || head === 88; return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10); } return decodeNamedCharacterReference($2) || $0; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-from-markdown@1.3.1/node_modules/mdast-util-from-markdown/lib/index.js /** * @typedef {import('micromark-util-types').Encoding} Encoding * @typedef {import('micromark-util-types').Event} Event * @typedef {import('micromark-util-types').ParseOptions} ParseOptions * @typedef {import('micromark-util-types').Token} Token * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext * @typedef {import('micromark-util-types').Value} Value * * @typedef {import('unist').Parent} UnistParent * @typedef {import('unist').Point} Point * * @typedef {import('mdast').PhrasingContent} PhrasingContent * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent * @typedef {import('mdast').Content} Content * @typedef {import('mdast').Break} Break * @typedef {import('mdast').Blockquote} Blockquote * @typedef {import('mdast').Code} Code * @typedef {import('mdast').Definition} Definition * @typedef {import('mdast').Emphasis} Emphasis * @typedef {import('mdast').Heading} Heading * @typedef {import('mdast').HTML} HTML * @typedef {import('mdast').Image} Image * @typedef {import('mdast').ImageReference} ImageReference * @typedef {import('mdast').InlineCode} InlineCode * @typedef {import('mdast').Link} Link * @typedef {import('mdast').LinkReference} LinkReference * @typedef {import('mdast').List} List * @typedef {import('mdast').ListItem} ListItem * @typedef {import('mdast').Paragraph} Paragraph * @typedef {import('mdast').Root} Root * @typedef {import('mdast').Strong} Strong * @typedef {import('mdast').Text} Text * @typedef {import('mdast').ThematicBreak} ThematicBreak * @typedef {import('mdast').ReferenceType} ReferenceType * @typedef {import('../index.js').CompileData} CompileData */ /** * @typedef {Root | Content} Node * @typedef {Extract} Parent * * @typedef {Omit & {type: 'fragment', children: Array}} Fragment */ /** * @callback Transform * Extra transform, to change the AST afterwards. * @param {Root} tree * Tree to transform. * @returns {Root | undefined | null | void} * New tree or nothing (in which case the current tree is used). * * @callback Handle * Handle a token. * @param {CompileContext} this * Context. * @param {Token} token * Current token. * @returns {void} * Nothing. * * @typedef {Record} Handles * Token types mapping to handles * * @callback OnEnterError * Handle the case where the `right` token is open, but it is closed (by the * `left` token) or because we reached the end of the document. * @param {Omit} this * Context. * @param {Token | undefined} left * Left token. * @param {Token} right * Right token. * @returns {void} * Nothing. * * @callback OnExitError * Handle the case where the `right` token is open but it is closed by * exiting the `left` token. * @param {Omit} this * Context. * @param {Token} left * Left token. * @param {Token} right * Right token. * @returns {void} * Nothing. * * @typedef {[Token, OnEnterError | undefined]} TokenTuple * Open token on the stack, with an optional error handler for when * that token isn’t closed properly. */ /** * @typedef Config * Configuration. * * We have our defaults, but extensions will add more. * @property {Array} canContainEols * Token types where line endings are used. * @property {Handles} enter * Opening handles. * @property {Handles} exit * Closing handles. * @property {Array} transforms * Tree transforms. * * @typedef {Partial} Extension * Change how markdown tokens from micromark are turned into mdast. * * @typedef CompileContext * mdast compiler context. * @property {Array} stack * Stack of nodes. * @property {Array} tokenStack * Stack of tokens. * @property {(key: Key) => CompileData[Key]} getData * Get data from the key/value store. * @property {(key: Key, value?: CompileData[Key]) => void} setData * Set data into the key/value store. * @property {(this: CompileContext) => void} buffer * Capture some of the output data. * @property {(this: CompileContext) => string} resume * Stop capturing and access the output data. * @property {(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter * Enter a token. * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit * Exit a token. * @property {TokenizeContext['sliceSerialize']} sliceSerialize * Get the string value of a token. * @property {Config} config * Configuration. * * @typedef FromMarkdownOptions * Configuration for how to build mdast. * @property {Array> | null | undefined} [mdastExtensions] * Extensions for this utility to change how tokens are turned into a tree. * * @typedef {ParseOptions & FromMarkdownOptions} Options * Configuration. */ // To do: micromark: create a registry of tokens? // To do: next major: don’t return given `Node` from `enter`. // To do: next major: remove setter/getter. const lib_own = {}.hasOwnProperty; /** * @param value * Markdown to parse. * @param encoding * Character encoding for when `value` is `Buffer`. * @param options * Configuration. * @returns * mdast tree. */ const fromMarkdown = /** * @type {( * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & * ((value: Value, options?: Options | null | undefined) => Root) * )} */ /** * @param {Value} value * @param {Encoding | Options | null | undefined} [encoding] * @param {Options | null | undefined} [options] * @returns {Root} */ function (value, encoding, options) { if (typeof encoding !== 'string') { options = encoding; encoding = undefined; } return compiler(options)(postprocess(parse(options).document().write(preprocess()(value, encoding, true)))); }; /** * Note this compiler only understand complete buffering, not streaming. * * @param {Options | null | undefined} [options] */ function compiler(options) { /** @type {Config} */ const config = { transforms: [], canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'], enter: { autolink: opener(link), autolinkProtocol: onenterdata, autolinkEmail: onenterdata, atxHeading: opener(heading), blockQuote: opener(blockQuote), characterEscape: onenterdata, characterReference: onenterdata, codeFenced: opener(codeFlow), codeFencedFenceInfo: buffer, codeFencedFenceMeta: buffer, codeIndented: opener(codeFlow, buffer), codeText: opener(codeText, buffer), codeTextData: onenterdata, data: onenterdata, codeFlowValue: onenterdata, definition: opener(definition), definitionDestinationString: buffer, definitionLabelString: buffer, definitionTitleString: buffer, emphasis: opener(emphasis), hardBreakEscape: opener(hardBreak), hardBreakTrailing: opener(hardBreak), htmlFlow: opener(html, buffer), htmlFlowData: onenterdata, htmlText: opener(html, buffer), htmlTextData: onenterdata, image: opener(image), label: buffer, link: opener(link), listItem: opener(listItem), listItemValue: onenterlistitemvalue, listOrdered: opener(list, onenterlistordered), listUnordered: opener(list), paragraph: opener(paragraph), reference: onenterreference, referenceString: buffer, resourceDestinationString: buffer, resourceTitleString: buffer, setextHeading: opener(heading), strong: opener(strong), thematicBreak: opener(thematicBreak) }, exit: { atxHeading: closer(), atxHeadingSequence: onexitatxheadingsequence, autolink: closer(), autolinkEmail: onexitautolinkemail, autolinkProtocol: onexitautolinkprotocol, blockQuote: closer(), characterEscapeValue: onexitdata, characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, characterReferenceMarkerNumeric: onexitcharacterreferencemarker, characterReferenceValue: onexitcharacterreferencevalue, codeFenced: closer(onexitcodefenced), codeFencedFence: onexitcodefencedfence, codeFencedFenceInfo: onexitcodefencedfenceinfo, codeFencedFenceMeta: onexitcodefencedfencemeta, codeFlowValue: onexitdata, codeIndented: closer(onexitcodeindented), codeText: closer(onexitcodetext), codeTextData: onexitdata, data: onexitdata, definition: closer(), definitionDestinationString: onexitdefinitiondestinationstring, definitionLabelString: onexitdefinitionlabelstring, definitionTitleString: onexitdefinitiontitlestring, emphasis: closer(), hardBreakEscape: closer(onexithardbreak), hardBreakTrailing: closer(onexithardbreak), htmlFlow: closer(onexithtmlflow), htmlFlowData: onexitdata, htmlText: closer(onexithtmltext), htmlTextData: onexitdata, image: closer(onexitimage), label: onexitlabel, labelText: onexitlabeltext, lineEnding: onexitlineending, link: closer(onexitlink), listItem: closer(), listOrdered: closer(), listUnordered: closer(), paragraph: closer(), referenceString: onexitreferencestring, resourceDestinationString: onexitresourcedestinationstring, resourceTitleString: onexitresourcetitlestring, resource: onexitresource, setextHeading: closer(onexitsetextheading), setextHeadingLineSequence: onexitsetextheadinglinesequence, setextHeadingText: onexitsetextheadingtext, strong: closer(), thematicBreak: closer() } }; configure(config, (options || {}).mdastExtensions || []); /** @type {CompileData} */ const data = {}; return compile; /** * Turn micromark events into an mdast tree. * * @param {Array} events * Events. * @returns {Root} * mdast tree. */ function compile(events) { /** @type {Root} */ let tree = { type: 'root', children: [] }; /** @type {Omit} */ const context = { stack: [tree], tokenStack: [], config, enter, exit, buffer, resume, setData, getData }; /** @type {Array} */ const listStack = []; let index = -1; while (++index < events.length) { // We preprocess lists to add `listItem` tokens, and to infer whether // items the list itself are spread out. if (events[index][1].type === 'listOrdered' || events[index][1].type === 'listUnordered') { if (events[index][0] === 'enter') { listStack.push(index); } else { const tail = listStack.pop(); index = prepareList(events, tail, index); } } } index = -1; while (++index < events.length) { const handler = config[events[index][0]]; if (lib_own.call(handler, events[index][1].type)) { handler[events[index][1].type].call(Object.assign({ sliceSerialize: events[index][2].sliceSerialize }, context), events[index][1]); } } // Handle tokens still being open. if (context.tokenStack.length > 0) { const tail = context.tokenStack[context.tokenStack.length - 1]; const handler = tail[1] || defaultOnError; handler.call(context, undefined, tail[0]); } // Figure out `root` position. tree.position = { start: lib_point(events.length > 0 ? events[0][1].start : { line: 1, column: 1, offset: 0 }), end: lib_point(events.length > 0 ? events[events.length - 2][1].end : { line: 1, column: 1, offset: 0 }) }; // Call transforms. index = -1; while (++index < config.transforms.length) { tree = config.transforms[index](tree) || tree; } return tree; } /** * @param {Array} events * @param {number} start * @param {number} length * @returns {number} */ function prepareList(events, start, length) { let index = start - 1; let containerBalance = -1; let listSpread = false; /** @type {Token | undefined} */ let listItem; /** @type {number | undefined} */ let lineIndex; /** @type {number | undefined} */ let firstBlankLineIndex; /** @type {boolean | undefined} */ let atMarker; while (++index <= length) { const event = events[index]; if (event[1].type === 'listUnordered' || event[1].type === 'listOrdered' || event[1].type === 'blockQuote') { if (event[0] === 'enter') { containerBalance++; } else { containerBalance--; } atMarker = undefined; } else if (event[1].type === 'lineEndingBlank') { if (event[0] === 'enter') { if (listItem && !atMarker && !containerBalance && !firstBlankLineIndex) { firstBlankLineIndex = index; } atMarker = undefined; } } else if (event[1].type === 'linePrefix' || event[1].type === 'listItemValue' || event[1].type === 'listItemMarker' || event[1].type === 'listItemPrefix' || event[1].type === 'listItemPrefixWhitespace') { // Empty. } else { atMarker = undefined; } if (!containerBalance && event[0] === 'enter' && event[1].type === 'listItemPrefix' || containerBalance === -1 && event[0] === 'exit' && (event[1].type === 'listUnordered' || event[1].type === 'listOrdered')) { if (listItem) { let tailIndex = index; lineIndex = undefined; while (tailIndex--) { const tailEvent = events[tailIndex]; if (tailEvent[1].type === 'lineEnding' || tailEvent[1].type === 'lineEndingBlank') { if (tailEvent[0] === 'exit') continue; if (lineIndex) { events[lineIndex][1].type = 'lineEndingBlank'; listSpread = true; } tailEvent[1].type = 'lineEnding'; lineIndex = tailIndex; } else if (tailEvent[1].type === 'linePrefix' || tailEvent[1].type === 'blockQuotePrefix' || tailEvent[1].type === 'blockQuotePrefixWhitespace' || tailEvent[1].type === 'blockQuoteMarker' || tailEvent[1].type === 'listItemIndent') { // Empty } else { break; } } if (firstBlankLineIndex && (!lineIndex || firstBlankLineIndex < lineIndex)) { listItem._spread = true; } // Fix position. listItem.end = Object.assign({}, lineIndex ? events[lineIndex][1].start : event[1].end); events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]); index++; length++; } // Create a new list item. if (event[1].type === 'listItemPrefix') { listItem = { type: 'listItem', _spread: false, start: Object.assign({}, event[1].start), // @ts-expect-error: we’ll add `end` in a second. end: undefined }; // @ts-expect-error: `listItem` is most definitely defined, TS... events.splice(index, 0, ['enter', listItem, event[2]]); index++; length++; firstBlankLineIndex = undefined; atMarker = true; } } } events[start][1]._spread = listSpread; return length; } /** * Set data. * * @template {keyof CompileData} Key * Field type. * @param {Key} key * Key of field. * @param {CompileData[Key]} [value] * New value. * @returns {void} * Nothing. */ function setData(key, value) { data[key] = value; } /** * Get data. * * @template {keyof CompileData} Key * Field type. * @param {Key} key * Key of field. * @returns {CompileData[Key]} * Value. */ function getData(key) { return data[key]; } /** * Create an opener handle. * * @param {(token: Token) => Node} create * Create a node. * @param {Handle} [and] * Optional function to also run. * @returns {Handle} * Handle. */ function opener(create, and) { return open; /** * @this {CompileContext} * @param {Token} token * @returns {void} */ function open(token) { enter.call(this, create(token), token); if (and) and.call(this, token); } } /** * @this {CompileContext} * @returns {void} */ function buffer() { this.stack.push({ type: 'fragment', children: [] }); } /** * @template {Node} Kind * Node type. * @this {CompileContext} * Context. * @param {Kind} node * Node to enter. * @param {Token} token * Corresponding token. * @param {OnEnterError | undefined} [errorHandler] * Handle the case where this token is open, but it is closed by something else. * @returns {Kind} * The given node. */ function enter(node, token, errorHandler) { const parent = this.stack[this.stack.length - 1]; // @ts-expect-error: Assume `Node` can exist as a child of `parent`. parent.children.push(node); this.stack.push(node); this.tokenStack.push([token, errorHandler]); // @ts-expect-error: `end` will be patched later. node.position = { start: lib_point(token.start) }; return node; } /** * Create a closer handle. * * @param {Handle} [and] * Optional function to also run. * @returns {Handle} * Handle. */ function closer(and) { return close; /** * @this {CompileContext} * @param {Token} token * @returns {void} */ function close(token) { if (and) and.call(this, token); exit.call(this, token); } } /** * @this {CompileContext} * Context. * @param {Token} token * Corresponding token. * @param {OnExitError | undefined} [onExitError] * Handle the case where another token is open. * @returns {Node} * The closed node. */ function exit(token, onExitError) { const node = this.stack.pop(); const open = this.tokenStack.pop(); if (!open) { throw new Error('Cannot close `' + token.type + '` (' + stringifyPosition({ start: token.start, end: token.end }) + '): it’s not open'); } else if (open[0].type !== token.type) { if (onExitError) { onExitError.call(this, token, open[0]); } else { const handler = open[1] || defaultOnError; handler.call(this, token, open[0]); } } node.position.end = lib_point(token.end); return node; } /** * @this {CompileContext} * @returns {string} */ function resume() { return lib_toString(this.stack.pop()); } // // Handlers. // /** * @this {CompileContext} * @type {Handle} */ function onenterlistordered() { setData('expectingFirstListItemValue', true); } /** * @this {CompileContext} * @type {Handle} */ function onenterlistitemvalue(token) { if (getData('expectingFirstListItemValue')) { const ancestor = this.stack[this.stack.length - 2]; ancestor.start = Number.parseInt(this.sliceSerialize(token), 10); setData('expectingFirstListItemValue'); } } /** * @this {CompileContext} * @type {Handle} */ function onexitcodefencedfenceinfo() { const data = this.resume(); const node = this.stack[this.stack.length - 1]; node.lang = data; } /** * @this {CompileContext} * @type {Handle} */ function onexitcodefencedfencemeta() { const data = this.resume(); const node = this.stack[this.stack.length - 1]; node.meta = data; } /** * @this {CompileContext} * @type {Handle} */ function onexitcodefencedfence() { // Exit if this is the closing fence. if (getData('flowCodeInside')) return; this.buffer(); setData('flowCodeInside', true); } /** * @this {CompileContext} * @type {Handle} */ function onexitcodefenced() { const data = this.resume(); const node = this.stack[this.stack.length - 1]; node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ''); setData('flowCodeInside'); } /** * @this {CompileContext} * @type {Handle} */ function onexitcodeindented() { const data = this.resume(); const node = this.stack[this.stack.length - 1]; node.value = data.replace(/(\r?\n|\r)$/g, ''); } /** * @this {CompileContext} * @type {Handle} */ function onexitdefinitionlabelstring(token) { const label = this.resume(); const node = this.stack[this.stack.length - 1]; node.label = label; node.identifier = normalizeIdentifier(this.sliceSerialize(token)).toLowerCase(); } /** * @this {CompileContext} * @type {Handle} */ function onexitdefinitiontitlestring() { const data = this.resume(); const node = this.stack[this.stack.length - 1]; node.title = data; } /** * @this {CompileContext} * @type {Handle} */ function onexitdefinitiondestinationstring() { const data = this.resume(); const node = this.stack[this.stack.length - 1]; node.url = data; } /** * @this {CompileContext} * @type {Handle} */ function onexitatxheadingsequence(token) { const node = this.stack[this.stack.length - 1]; if (!node.depth) { const depth = this.sliceSerialize(token).length; node.depth = depth; } } /** * @this {CompileContext} * @type {Handle} */ function onexitsetextheadingtext() { setData('setextHeadingSlurpLineEnding', true); } /** * @this {CompileContext} * @type {Handle} */ function onexitsetextheadinglinesequence(token) { const node = this.stack[this.stack.length - 1]; node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2; } /** * @this {CompileContext} * @type {Handle} */ function onexitsetextheading() { setData('setextHeadingSlurpLineEnding'); } /** * @this {CompileContext} * @type {Handle} */ function onenterdata(token) { const node = this.stack[this.stack.length - 1]; let tail = node.children[node.children.length - 1]; if (!tail || tail.type !== 'text') { // Add a new text node. tail = text(); // @ts-expect-error: we’ll add `end` later. tail.position = { start: lib_point(token.start) }; // @ts-expect-error: Assume `parent` accepts `text`. node.children.push(tail); } this.stack.push(tail); } /** * @this {CompileContext} * @type {Handle} */ function onexitdata(token) { const tail = this.stack.pop(); tail.value += this.sliceSerialize(token); tail.position.end = lib_point(token.end); } /** * @this {CompileContext} * @type {Handle} */ function onexitlineending(token) { const context = this.stack[this.stack.length - 1]; // If we’re at a hard break, include the line ending in there. if (getData('atHardBreak')) { const tail = context.children[context.children.length - 1]; tail.position.end = lib_point(token.end); setData('atHardBreak'); return; } if (!getData('setextHeadingSlurpLineEnding') && config.canContainEols.includes(context.type)) { onenterdata.call(this, token); onexitdata.call(this, token); } } /** * @this {CompileContext} * @type {Handle} */ function onexithardbreak() { setData('atHardBreak', true); } /** * @this {CompileContext} * @type {Handle} */ function onexithtmlflow() { const data = this.resume(); const node = this.stack[this.stack.length - 1]; node.value = data; } /** * @this {CompileContext} * @type {Handle} */ function onexithtmltext() { const data = this.resume(); const node = this.stack[this.stack.length - 1]; node.value = data; } /** * @this {CompileContext} * @type {Handle} */ function onexitcodetext() { const data = this.resume(); const node = this.stack[this.stack.length - 1]; node.value = data; } /** * @this {CompileContext} * @type {Handle} */ function onexitlink() { const node = this.stack[this.stack.length - 1]; // Note: there are also `identifier` and `label` fields on this link node! // These are used / cleaned here. // To do: clean. if (getData('inReference')) { /** @type {ReferenceType} */ const referenceType = getData('referenceType') || 'shortcut'; node.type += 'Reference'; // @ts-expect-error: mutate. node.referenceType = referenceType; // @ts-expect-error: mutate. delete node.url; delete node.title; } else { // @ts-expect-error: mutate. delete node.identifier; // @ts-expect-error: mutate. delete node.label; } setData('referenceType'); } /** * @this {CompileContext} * @type {Handle} */ function onexitimage() { const node = this.stack[this.stack.length - 1]; // Note: there are also `identifier` and `label` fields on this link node! // These are used / cleaned here. // To do: clean. if (getData('inReference')) { /** @type {ReferenceType} */ const referenceType = getData('referenceType') || 'shortcut'; node.type += 'Reference'; // @ts-expect-error: mutate. node.referenceType = referenceType; // @ts-expect-error: mutate. delete node.url; delete node.title; } else { // @ts-expect-error: mutate. delete node.identifier; // @ts-expect-error: mutate. delete node.label; } setData('referenceType'); } /** * @this {CompileContext} * @type {Handle} */ function onexitlabeltext(token) { const string = this.sliceSerialize(token); const ancestor = this.stack[this.stack.length - 2]; // @ts-expect-error: stash this on the node, as it might become a reference // later. ancestor.label = decodeString(string); // @ts-expect-error: same as above. ancestor.identifier = normalizeIdentifier(string).toLowerCase(); } /** * @this {CompileContext} * @type {Handle} */ function onexitlabel() { const fragment = this.stack[this.stack.length - 1]; const value = this.resume(); const node = this.stack[this.stack.length - 1]; // Assume a reference. setData('inReference', true); if (node.type === 'link') { /** @type {Array} */ // @ts-expect-error: Assume static phrasing content. const children = fragment.children; node.children = children; } else { node.alt = value; } } /** * @this {CompileContext} * @type {Handle} */ function onexitresourcedestinationstring() { const data = this.resume(); const node = this.stack[this.stack.length - 1]; node.url = data; } /** * @this {CompileContext} * @type {Handle} */ function onexitresourcetitlestring() { const data = this.resume(); const node = this.stack[this.stack.length - 1]; node.title = data; } /** * @this {CompileContext} * @type {Handle} */ function onexitresource() { setData('inReference'); } /** * @this {CompileContext} * @type {Handle} */ function onenterreference() { setData('referenceType', 'collapsed'); } /** * @this {CompileContext} * @type {Handle} */ function onexitreferencestring(token) { const label = this.resume(); const node = this.stack[this.stack.length - 1]; // @ts-expect-error: stash this on the node, as it might become a reference // later. node.label = label; // @ts-expect-error: same as above. node.identifier = normalizeIdentifier(this.sliceSerialize(token)).toLowerCase(); setData('referenceType', 'full'); } /** * @this {CompileContext} * @type {Handle} */ function onexitcharacterreferencemarker(token) { setData('characterReferenceType', token.type); } /** * @this {CompileContext} * @type {Handle} */ function onexitcharacterreferencevalue(token) { const data = this.sliceSerialize(token); const type = getData('characterReferenceType'); /** @type {string} */ let value; if (type) { value = decodeNumericCharacterReference(data, type === 'characterReferenceMarkerNumeric' ? 10 : 16); setData('characterReferenceType'); } else { const result = decodeNamedCharacterReference(data); value = result; } const tail = this.stack.pop(); tail.value += value; tail.position.end = lib_point(token.end); } /** * @this {CompileContext} * @type {Handle} */ function onexitautolinkprotocol(token) { onexitdata.call(this, token); const node = this.stack[this.stack.length - 1]; node.url = this.sliceSerialize(token); } /** * @this {CompileContext} * @type {Handle} */ function onexitautolinkemail(token) { onexitdata.call(this, token); const node = this.stack[this.stack.length - 1]; node.url = 'mailto:' + this.sliceSerialize(token); } // // Creaters. // /** @returns {Blockquote} */ function blockQuote() { return { type: 'blockquote', children: [] }; } /** @returns {Code} */ function codeFlow() { return { type: 'code', lang: null, meta: null, value: '' }; } /** @returns {InlineCode} */ function codeText() { return { type: 'inlineCode', value: '' }; } /** @returns {Definition} */ function definition() { return { type: 'definition', identifier: '', label: null, title: null, url: '' }; } /** @returns {Emphasis} */ function emphasis() { return { type: 'emphasis', children: [] }; } /** @returns {Heading} */ function heading() { // @ts-expect-error `depth` will be set later. return { type: 'heading', depth: undefined, children: [] }; } /** @returns {Break} */ function hardBreak() { return { type: 'break' }; } /** @returns {HTML} */ function html() { return { type: 'html', value: '' }; } /** @returns {Image} */ function image() { return { type: 'image', title: null, url: '', alt: null }; } /** @returns {Link} */ function link() { return { type: 'link', title: null, url: '', children: [] }; } /** * @param {Token} token * @returns {List} */ function list(token) { return { type: 'list', ordered: token.type === 'listOrdered', start: null, spread: token._spread, children: [] }; } /** * @param {Token} token * @returns {ListItem} */ function listItem(token) { return { type: 'listItem', spread: token._spread, checked: null, children: [] }; } /** @returns {Paragraph} */ function paragraph() { return { type: 'paragraph', children: [] }; } /** @returns {Strong} */ function strong() { return { type: 'strong', children: [] }; } /** @returns {Text} */ function text() { return { type: 'text', value: '' }; } /** @returns {ThematicBreak} */ function thematicBreak() { return { type: 'thematicBreak' }; } } /** * Copy a point-like value. * * @param {Point} d * Point-like value. * @returns {Point} * unist point. */ function lib_point(d) { return { line: d.line, column: d.column, offset: d.offset }; } /** * @param {Config} combined * @param {Array>} extensions * @returns {void} */ function configure(combined, extensions) { let index = -1; while (++index < extensions.length) { const value = extensions[index]; if (Array.isArray(value)) { configure(combined, value); } else { extension(combined, value); } } } /** * @param {Config} combined * @param {Extension} extension * @returns {void} */ function extension(combined, extension) { /** @type {keyof Extension} */ let key; for (key in extension) { if (lib_own.call(extension, key)) { if (key === 'canContainEols') { const right = extension[key]; if (right) { combined[key].push(...right); } } else if (key === 'transforms') { const right = extension[key]; if (right) { combined[key].push(...right); } } else if (key === 'enter' || key === 'exit') { const right = extension[key]; if (right) { Object.assign(combined[key], right); } } } } } /** @type {OnEnterError} */ function defaultOnError(left, right) { if (left) { throw new Error('Cannot close `' + left.type + '` (' + stringifyPosition({ start: left.start, end: left.end }) + '): a different token (`' + right.type + '`, ' + stringifyPosition({ start: right.start, end: right.end }) + ') is open'); } else { throw new Error('Cannot close document, a token (`' + right.type + '`, ' + stringifyPosition({ start: right.start, end: right.end }) + ') is still open'); } } ;// CONCATENATED MODULE: ./node_modules/.pnpm/remark-parse@10.0.2/node_modules/remark-parse/lib/index.js /** * @typedef {import('mdast').Root} Root * @typedef {import('mdast-util-from-markdown').Options} Options */ /** * @this {import('unified').Processor} * @type {import('unified').Plugin<[Options?] | void[], string, Root>} */ function remarkParse(options) { /** @type {import('unified').ParserFunction} */ const parser = doc => { // Assume options. const settings = /** @type {Options} */this.data('settings'); return fromMarkdown(doc, Object.assign({}, settings, options, { // Note: these options are not in the readme. // The goal is for them to be set by plugins on `data` instead of being // passed by users. extensions: this.data('micromarkExtensions') || [], mdastExtensions: this.data('fromMarkdownExtensions') || [] })); }; Object.assign(this, { Parser: parser }); } ;// CONCATENATED MODULE: ./node_modules/.pnpm/micromark-util-sanitize-uri@1.2.0/node_modules/micromark-util-sanitize-uri/index.js /** * Make a value safe for injection as a URL. * * This encodes unsafe characters with percent-encoding and skips already * encoded sequences (see `normalizeUri`). * Further unsafe characters are encoded as character references (see * `micromark-util-encode`). * * A regex of allowed protocols can be given, in which case the URL is * sanitized. * For example, `/^(https?|ircs?|mailto|xmpp)$/i` can be used for `a[href]`, or * `/^https?$/i` for `img[src]` (this is what `github.com` allows). * If the URL includes an unknown protocol (one not matched by `protocol`, such * as a dangerous example, `javascript:`), the value is ignored. * * @param {string | undefined} url * URI to sanitize. * @param {RegExp | null | undefined} [protocol] * Allowed protocols. * @returns {string} * Sanitized URI. */ function sanitizeUri(url, protocol) { const value = encode(normalizeUri(url || '')); if (!protocol) { return value; } const colon = value.indexOf(':'); const questionMark = value.indexOf('?'); const numberSign = value.indexOf('#'); const slash = value.indexOf('/'); if ( // If there is no protocol, it’s relative. colon < 0 || // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol. slash > -1 && colon > slash || questionMark > -1 && colon > questionMark || numberSign > -1 && colon > numberSign || // It is a protocol, it should be allowed. protocol.test(value.slice(0, colon))) { return value; } return ''; } /** * Normalize a URL. * * Encode unsafe characters with percent-encoding, skipping already encoded * sequences. * * @param {string} value * URI to normalize. * @returns {string} * Normalized URI. */ function normalizeUri(value) { /** @type {Array} */ const result = []; let index = -1; let start = 0; let skip = 0; while (++index < value.length) { const code = value.charCodeAt(index); /** @type {string} */ let replace = ''; // A correct percent encoded value. if (code === 37 && asciiAlphanumeric(value.charCodeAt(index + 1)) && asciiAlphanumeric(value.charCodeAt(index + 2))) { skip = 2; } // ASCII. else if (code < 128) { if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code))) { replace = String.fromCharCode(code); } } // Astral. else if (code > 55295 && code < 57344) { const next = value.charCodeAt(index + 1); // A correct surrogate pair. if (code < 56320 && next > 56319 && next < 57344) { replace = String.fromCharCode(code, next); skip = 1; } // Lone surrogate. else { replace = '\uFFFD'; } } // Unicode. else { replace = String.fromCharCode(code); } if (replace) { result.push(value.slice(start, index), encodeURIComponent(replace)); start = index + skip + 1; replace = ''; } if (skip) { index += skip; skip = 0; } } return result.join('') + value.slice(start); } ;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/footer.js /** * @typedef {import('hast').Element} Element * @typedef {import('hast').ElementContent} ElementContent * * @typedef {import('./state.js').State} State */ /** * Generate a hast footer for called footnote definitions. * * @param {State} state * Info passed around. * @returns {Element | undefined} * `section` element or `undefined`. */ function footer(state) { /** @type {Array} */ const listItems = []; let index = -1; while (++index < state.footnoteOrder.length) { const def = state.footnoteById[state.footnoteOrder[index]]; if (!def) { continue; } const content = state.all(def); const id = String(def.identifier).toUpperCase(); const safeId = normalizeUri(id.toLowerCase()); let referenceIndex = 0; /** @type {Array} */ const backReferences = []; while (++referenceIndex <= state.footnoteCounts[id]) { /** @type {Element} */ const backReference = { type: 'element', tagName: 'a', properties: { href: '#' + state.clobberPrefix + 'fnref-' + safeId + (referenceIndex > 1 ? '-' + referenceIndex : ''), dataFootnoteBackref: true, className: ['data-footnote-backref'], ariaLabel: state.footnoteBackLabel }, children: [{ type: 'text', value: '↩' }] }; if (referenceIndex > 1) { backReference.children.push({ type: 'element', tagName: 'sup', children: [{ type: 'text', value: String(referenceIndex) }] }); } if (backReferences.length > 0) { backReferences.push({ type: 'text', value: ' ' }); } backReferences.push(backReference); } const tail = content[content.length - 1]; if (tail && tail.type === 'element' && tail.tagName === 'p') { const tailTail = tail.children[tail.children.length - 1]; if (tailTail && tailTail.type === 'text') { tailTail.value += ' '; } else { tail.children.push({ type: 'text', value: ' ' }); } tail.children.push(...backReferences); } else { content.push(...backReferences); } /** @type {Element} */ const listItem = { type: 'element', tagName: 'li', properties: { id: state.clobberPrefix + 'fn-' + safeId }, children: state.wrap(content, true) }; state.patch(def, listItem); listItems.push(listItem); } if (listItems.length === 0) { return; } return { type: 'element', tagName: 'section', properties: { dataFootnotes: true, className: ['footnotes'] }, children: [{ type: 'element', tagName: state.footnoteLabelTagName, properties: { // To do: use structured clone. ...JSON.parse(JSON.stringify(state.footnoteLabelProperties)), id: 'footnote-label' }, children: [{ type: 'text', value: state.footnoteLabel }] }, { type: 'text', value: '\n' }, { type: 'element', tagName: 'ol', properties: {}, children: state.wrap(listItems, true) }, { type: 'text', value: '\n' }] }; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/unist-util-is@5.2.1/node_modules/unist-util-is/lib/index.js /** * @typedef {import('unist').Node} Node * @typedef {import('unist').Parent} Parent */ /** * @typedef {Record} Props * @typedef {null | undefined | string | Props | TestFunctionAnything | Array} Test * Check for an arbitrary node, unaware of TypeScript inferral. * * @callback TestFunctionAnything * Check if a node passes a test, unaware of TypeScript inferral. * @param {unknown} this * The given context. * @param {Node} node * A node. * @param {number | null | undefined} [index] * The node’s position in its parent. * @param {Parent | null | undefined} [parent] * The node’s parent. * @returns {boolean | void} * Whether this node passes the test. */ /** * @template {Node} Kind * Node type. * @typedef {Kind['type'] | Partial | TestFunctionPredicate | Array | TestFunctionPredicate>} PredicateTest * Check for a node that can be inferred by TypeScript. */ /** * Check if a node passes a certain test. * * @template {Node} Kind * Node type. * @callback TestFunctionPredicate * Complex test function for a node that can be inferred by TypeScript. * @param {Node} node * A node. * @param {number | null | undefined} [index] * The node’s position in its parent. * @param {Parent | null | undefined} [parent] * The node’s parent. * @returns {node is Kind} * Whether this node passes the test. */ /** * @callback AssertAnything * Check that an arbitrary value is a node, unaware of TypeScript inferral. * @param {unknown} [node] * Anything (typically a node). * @param {number | null | undefined} [index] * The node’s position in its parent. * @param {Parent | null | undefined} [parent] * The node’s parent. * @returns {boolean} * Whether this is a node and passes a test. */ /** * Check if a node is a node and passes a certain node test. * * @template {Node} Kind * Node type. * @callback AssertPredicate * Check that an arbitrary value is a specific node, aware of TypeScript. * @param {unknown} [node] * Anything (typically a node). * @param {number | null | undefined} [index] * The node’s position in its parent. * @param {Parent | null | undefined} [parent] * The node’s parent. * @returns {node is Kind} * Whether this is a node and passes a test. */ /** * Check if `node` is a `Node` and whether it passes the given test. * * @param node * Thing to check, typically `Node`. * @param test * A check for a specific node. * @param index * The node’s position in its parent. * @param parent * The node’s parent. * @returns * Whether `node` is a node and passes a test. */ const is = /** * @type {( * (() => false) & * ((node: unknown, test: PredicateTest, index: number, parent: Parent, context?: unknown) => node is Kind) & * ((node: unknown, test: PredicateTest, index?: null | undefined, parent?: null | undefined, context?: unknown) => node is Kind) & * ((node: unknown, test: Test, index: number, parent: Parent, context?: unknown) => boolean) & * ((node: unknown, test?: Test, index?: null | undefined, parent?: null | undefined, context?: unknown) => boolean) * )} */ /** * @param {unknown} [node] * @param {Test} [test] * @param {number | null | undefined} [index] * @param {Parent | null | undefined} [parent] * @param {unknown} [context] * @returns {boolean} */ // eslint-disable-next-line max-params function is(node, test, index, parent, context) { const check = convert(test); if (index !== undefined && index !== null && (typeof index !== 'number' || index < 0 || index === Number.POSITIVE_INFINITY)) { throw new Error('Expected positive finite index'); } if (parent !== undefined && parent !== null && (!is(parent) || !parent.children)) { throw new Error('Expected parent node'); } if ((parent === undefined || parent === null) !== (index === undefined || index === null)) { throw new Error('Expected both parent and index'); } // @ts-expect-error Looks like a node. return node && node.type && typeof node.type === 'string' ? Boolean(check.call(context, node, index, parent)) : false; }; /** * Generate an assertion from a test. * * Useful if you’re going to test many nodes, for example when creating a * utility where something else passes a compatible test. * * The created function is a bit faster because it expects valid input only: * a `node`, `index`, and `parent`. * * @param test * * when nullish, checks if `node` is a `Node`. * * when `string`, works like passing `(node) => node.type === test`. * * when `function` checks if function passed the node is true. * * when `object`, checks that all keys in test are in node, and that they have (strictly) equal values. * * when `array`, checks if any one of the subtests pass. * @returns * An assertion. */ const convert = /** * @type {( * ((test: PredicateTest) => AssertPredicate) & * ((test?: Test) => AssertAnything) * )} */ /** * @param {Test} [test] * @returns {AssertAnything} */ function (test) { if (test === undefined || test === null) { return ok; } if (typeof test === 'string') { return typeFactory(test); } if (typeof test === 'object') { return Array.isArray(test) ? anyFactory(test) : propsFactory(test); } if (typeof test === 'function') { return castFactory(test); } throw new Error('Expected function, string, or object as test'); }; /** * @param {Array} tests * @returns {AssertAnything} */ function anyFactory(tests) { /** @type {Array} */ const checks = []; let index = -1; while (++index < tests.length) { checks[index] = convert(tests[index]); } return castFactory(any); /** * @this {unknown} * @param {Array} parameters * @returns {boolean} */ function any() { let index = -1; for (var _len = arguments.length, parameters = new Array(_len), _key = 0; _key < _len; _key++) { parameters[_key] = arguments[_key]; } while (++index < checks.length) { if (checks[index].call(this, ...parameters)) return true; } return false; } } /** * Turn an object into a test for a node with a certain fields. * * @param {Props} check * @returns {AssertAnything} */ function propsFactory(check) { return castFactory(all); /** * @param {Node} node * @returns {boolean} */ function all(node) { /** @type {string} */ let key; for (key in check) { // @ts-expect-error: hush, it sure works as an index. if (node[key] !== check[key]) return false; } return true; } } /** * Turn a string into a test for a node with a certain type. * * @param {string} check * @returns {AssertAnything} */ function typeFactory(check) { return castFactory(type); /** * @param {Node} node */ function type(node) { return node && node.type === check; } } /** * Turn a custom test into a test for a node that passes that test. * * @param {TestFunctionAnything} check * @returns {AssertAnything} */ function castFactory(check) { return assertion; /** * @this {unknown} * @param {unknown} node * @param {Array} parameters * @returns {boolean} */ function assertion(node) { for (var _len2 = arguments.length, parameters = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { parameters[_key2 - 1] = arguments[_key2]; } return Boolean(node && typeof node === 'object' && 'type' in node && // @ts-expect-error: fine. Boolean(check.call(this, node, ...parameters))); } } function ok() { return true; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/unist-util-visit-parents@5.1.3/node_modules/unist-util-visit-parents/lib/color.browser.js /** * @param {string} d * @returns {string} */ function color(d) { return d; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/unist-util-visit-parents@5.1.3/node_modules/unist-util-visit-parents/lib/index.js /** * @typedef {import('unist').Node} Node * @typedef {import('unist').Parent} Parent * @typedef {import('unist-util-is').Test} Test */ /** * @typedef {boolean | 'skip'} Action * Union of the action types. * * @typedef {number} Index * Move to the sibling at `index` next (after node itself is completely * traversed). * * Useful if mutating the tree, such as removing the node the visitor is * currently on, or any of its previous siblings. * Results less than 0 or greater than or equal to `children.length` stop * traversing the parent. * * @typedef {[(Action | null | undefined | void)?, (Index | null | undefined)?]} ActionTuple * List with one or two values, the first an action, the second an index. * * @typedef {Action | ActionTuple | Index | null | undefined | void} VisitorResult * Any value that can be returned from a visitor. */ /** * @template {Node} [Visited=Node] * Visited node type. * @template {Parent} [Ancestor=Parent] * Ancestor type. * @callback Visitor * Handle a node (matching `test`, if given). * * Visitors are free to transform `node`. * They can also transform the parent of node (the last of `ancestors`). * * Replacing `node` itself, if `SKIP` is not returned, still causes its * descendants to be walked (which is a bug). * * When adding or removing previous siblings of `node` (or next siblings, in * case of reverse), the `Visitor` should return a new `Index` to specify the * sibling to traverse after `node` is traversed. * Adding or removing next siblings of `node` (or previous siblings, in case * of reverse) is handled as expected without needing to return a new `Index`. * * Removing the children property of an ancestor still results in them being * traversed. * @param {Visited} node * Found node. * @param {Array} ancestors * Ancestors of `node`. * @returns {VisitorResult} * What to do next. * * An `Index` is treated as a tuple of `[CONTINUE, Index]`. * An `Action` is treated as a tuple of `[Action]`. * * Passing a tuple back only makes sense if the `Action` is `SKIP`. * When the `Action` is `EXIT`, that action can be returned. * When the `Action` is `CONTINUE`, `Index` can be returned. */ /** * @template {Node} [Tree=Node] * Tree type. * @template {Test} [Check=string] * Test type. * @typedef {Visitor, Check>, Extract, Parent>>} BuildVisitor * Build a typed `Visitor` function from a tree and a test. * * It will infer which values are passed as `node` and which as `parents`. */ /** * Continue traversing as normal. */ const CONTINUE = true; /** * Stop traversing immediately. */ const EXIT = false; /** * Do not traverse this node’s children. */ const SKIP = 'skip'; /** * Visit nodes, with ancestral information. * * This algorithm performs *depth-first* *tree traversal* in *preorder* * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**). * * You can choose for which nodes `visitor` is called by passing a `test`. * For complex tests, you should test yourself in `visitor`, as it will be * faster and will have improved type information. * * Walking the tree is an intensive task. * Make use of the return values of the visitor when possible. * Instead of walking a tree multiple times, walk it once, use `unist-util-is` * to check if a node matches, and then perform different operations. * * You can change the tree. * See `Visitor` for more info. * * @param tree * Tree to traverse. * @param test * `unist-util-is`-compatible test * @param visitor * Handle each node. * @param reverse * Traverse in reverse preorder (NRL) instead of the default preorder (NLR). * @returns * Nothing. */ const visitParents = /** * @type {( * ((tree: Tree, test: Check, visitor: BuildVisitor, reverse?: boolean | null | undefined) => void) & * ((tree: Tree, visitor: BuildVisitor, reverse?: boolean | null | undefined) => void) * )} */ /** * @param {Node} tree * @param {Test} test * @param {Visitor} visitor * @param {boolean | null | undefined} [reverse] * @returns {void} */ function (tree, test, visitor, reverse) { if (typeof test === 'function' && typeof visitor !== 'function') { reverse = visitor; // @ts-expect-error no visitor given, so `visitor` is test. visitor = test; test = null; } const is = convert(test); const step = reverse ? -1 : 1; factory(tree, undefined, [])(); /** * @param {Node} node * @param {number | undefined} index * @param {Array} parents */ function factory(node, index, parents) { /** @type {Record} */ // @ts-expect-error: hush const value = node && typeof node === 'object' ? node : {}; if (typeof value.type === 'string') { const name = // `hast` typeof value.tagName === 'string' ? value.tagName : // `xast` typeof value.name === 'string' ? value.name : undefined; Object.defineProperty(visit, 'name', { value: 'node (' + color(node.type + (name ? '<' + name + '>' : '')) + ')' }); } return visit; function visit() { /** @type {ActionTuple} */ let result = []; /** @type {ActionTuple} */ let subresult; /** @type {number} */ let offset; /** @type {Array} */ let grandparents; if (!test || is(node, index, parents[parents.length - 1] || null)) { result = toResult(visitor(node, parents)); if (result[0] === EXIT) { return result; } } // @ts-expect-error looks like a parent. if (node.children && result[0] !== SKIP) { // @ts-expect-error looks like a parent. offset = (reverse ? node.children.length : -1) + step; // @ts-expect-error looks like a parent. grandparents = parents.concat(node); // @ts-expect-error looks like a parent. while (offset > -1 && offset < node.children.length) { // @ts-expect-error looks like a parent. subresult = factory(node.children[offset], offset, grandparents)(); if (subresult[0] === EXIT) { return subresult; } offset = typeof subresult[1] === 'number' ? subresult[1] : offset + step; } } return result; } } }; /** * Turn a return value into a clean result. * * @param {VisitorResult} value * Valid return values from visitors. * @returns {ActionTuple} * Clean result. */ function toResult(value) { if (Array.isArray(value)) { return value; } if (typeof value === 'number') { return [CONTINUE, value]; } return [value]; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/unist-util-visit@4.1.2/node_modules/unist-util-visit/lib/index.js /** * @typedef {import('unist').Node} Node * @typedef {import('unist').Parent} Parent * @typedef {import('unist-util-is').Test} Test * @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult */ /** * Check if `Child` can be a child of `Ancestor`. * * Returns the ancestor when `Child` can be a child of `Ancestor`, or returns * `never`. * * @template {Node} Ancestor * Node type. * @template {Node} Child * Node type. * @typedef {( * Ancestor extends Parent * ? Child extends Ancestor['children'][number] * ? Ancestor * : never * : never * )} ParentsOf */ /** * @template {Node} [Visited=Node] * Visited node type. * @template {Parent} [Ancestor=Parent] * Ancestor type. * @callback Visitor * Handle a node (matching `test`, if given). * * Visitors are free to transform `node`. * They can also transform `parent`. * * Replacing `node` itself, if `SKIP` is not returned, still causes its * descendants to be walked (which is a bug). * * When adding or removing previous siblings of `node` (or next siblings, in * case of reverse), the `Visitor` should return a new `Index` to specify the * sibling to traverse after `node` is traversed. * Adding or removing next siblings of `node` (or previous siblings, in case * of reverse) is handled as expected without needing to return a new `Index`. * * Removing the children property of `parent` still results in them being * traversed. * @param {Visited} node * Found node. * @param {Visited extends Node ? number | null : never} index * Index of `node` in `parent`. * @param {Ancestor extends Node ? Ancestor | null : never} parent * Parent of `node`. * @returns {VisitorResult} * What to do next. * * An `Index` is treated as a tuple of `[CONTINUE, Index]`. * An `Action` is treated as a tuple of `[Action]`. * * Passing a tuple back only makes sense if the `Action` is `SKIP`. * When the `Action` is `EXIT`, that action can be returned. * When the `Action` is `CONTINUE`, `Index` can be returned. */ /** * Build a typed `Visitor` function from a node and all possible parents. * * It will infer which values are passed as `node` and which as `parent`. * * @template {Node} Visited * Node type. * @template {Parent} Ancestor * Parent type. * @typedef {Visitor>} BuildVisitorFromMatch */ /** * Build a typed `Visitor` function from a list of descendants and a test. * * It will infer which values are passed as `node` and which as `parent`. * * @template {Node} Descendant * Node type. * @template {Test} Check * Test type. * @typedef {( * BuildVisitorFromMatch< * import('unist-util-visit-parents/complex-types.js').Matches, * Extract * > * )} BuildVisitorFromDescendants */ /** * Build a typed `Visitor` function from a tree and a test. * * It will infer which values are passed as `node` and which as `parent`. * * @template {Node} [Tree=Node] * Node type. * @template {Test} [Check=string] * Test type. * @typedef {( * BuildVisitorFromDescendants< * import('unist-util-visit-parents/complex-types.js').InclusiveDescendant, * Check * > * )} BuildVisitor */ /** * Visit nodes. * * This algorithm performs *depth-first* *tree traversal* in *preorder* * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**). * * You can choose for which nodes `visitor` is called by passing a `test`. * For complex tests, you should test yourself in `visitor`, as it will be * faster and will have improved type information. * * Walking the tree is an intensive task. * Make use of the return values of the visitor when possible. * Instead of walking a tree multiple times, walk it once, use `unist-util-is` * to check if a node matches, and then perform different operations. * * You can change the tree. * See `Visitor` for more info. * * @param tree * Tree to traverse. * @param test * `unist-util-is`-compatible test * @param visitor * Handle each node. * @param reverse * Traverse in reverse preorder (NRL) instead of the default preorder (NLR). * @returns * Nothing. */ const visit = /** * @type {( * ((tree: Tree, test: Check, visitor: BuildVisitor, reverse?: boolean | null | undefined) => void) & * ((tree: Tree, visitor: BuildVisitor, reverse?: boolean | null | undefined) => void) * )} */ /** * @param {Node} tree * @param {Test} test * @param {Visitor} visitor * @param {boolean | null | undefined} [reverse] * @returns {void} */ function (tree, test, visitor, reverse) { if (typeof test === 'function' && typeof visitor !== 'function') { reverse = visitor; visitor = test; test = null; } visitParents(tree, test, overload, reverse); /** * @param {Node} node * @param {Array} parents */ function overload(node, parents) { const parent = parents[parents.length - 1]; return visitor(node, parent ? parent.children.indexOf(node) : null, parent); } }; ;// CONCATENATED MODULE: ./node_modules/.pnpm/unist-util-position@4.0.4/node_modules/unist-util-position/lib/index.js /** * @typedef {import('unist').Position} Position * @typedef {import('unist').Node} Node * @typedef {import('unist').Point} Point */ /** * @typedef NodeLike * @property {string} type * @property {PositionLike | null | undefined} [position] * * @typedef PositionLike * @property {PointLike | null | undefined} [start] * @property {PointLike | null | undefined} [end] * * @typedef PointLike * @property {number | null | undefined} [line] * @property {number | null | undefined} [column] * @property {number | null | undefined} [offset] */ /** * Get the starting point of `node`. * * @param node * Node. * @returns * Point. */ const pointStart = unist_util_position_lib_point('start'); /** * Get the ending point of `node`. * * @param node * Node. * @returns * Point. */ const pointEnd = unist_util_position_lib_point('end'); /** * Get the positional info of `node`. * * @param {NodeLike | Node | null | undefined} [node] * Node. * @returns {Position} * Position. */ function lib_position(node) { return { start: pointStart(node), end: pointEnd(node) }; } /** * Get the positional info of `node`. * * @param {'start' | 'end'} type * Side. * @returns * Getter. */ function unist_util_position_lib_point(type) { return point; /** * Get the point info of `node` at a bound side. * * @param {NodeLike | Node | null | undefined} [node] * @returns {Point} */ function point(node) { const point = node && node.position && node.position[type] || {}; // To do: next major: don’t return points when invalid. return { // @ts-expect-error: in practice, null is allowed. line: point.line || null, // @ts-expect-error: in practice, null is allowed. column: point.column || null, // @ts-expect-error: in practice, null is allowed. offset: point.offset > -1 ? point.offset : null }; } } ;// CONCATENATED MODULE: ./node_modules/.pnpm/unist-util-generated@2.0.1/node_modules/unist-util-generated/lib/index.js /** * @typedef PointLike * @property {number | null | undefined} [line] * @property {number | null | undefined} [column] * @property {number | null | undefined} [offset] * * @typedef PositionLike * @property {PointLike | null | undefined} [start] * @property {PointLike | null | undefined} [end] * * @typedef NodeLike * @property {PositionLike | null | undefined} [position] */ /** * Check if `node` is generated. * * @param {NodeLike | null | undefined} [node] * Node to check. * @returns {boolean} * Whether `node` is generated (does not have positional info). */ function generated(node) { return !node || !node.position || !node.position.start || !node.position.start.line || !node.position.start.column || !node.position.end || !node.position.end.line || !node.position.end.column; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-definitions@5.1.2/node_modules/mdast-util-definitions/lib/index.js /** * @typedef {import('mdast').Root} Root * @typedef {import('mdast').Content} Content * @typedef {import('mdast').Definition} Definition */ /** * @typedef {Root | Content} Node * * @callback GetDefinition * Get a definition by identifier. * @param {string | null | undefined} [identifier] * Identifier of definition. * @returns {Definition | null} * Definition corresponding to `identifier` or `null`. */ const mdast_util_definitions_lib_own = {}.hasOwnProperty; /** * Find definitions in `tree`. * * Uses CommonMark precedence, which means that earlier definitions are * preferred over duplicate later definitions. * * @param {Node} tree * Tree to check. * @returns {GetDefinition} * Getter. */ function definitions(tree) { /** @type {Record} */ const cache = Object.create(null); if (!tree || !tree.type) { throw new Error('mdast-util-definitions expected node'); } visit(tree, 'definition', definition => { const id = clean(definition.identifier); if (id && !mdast_util_definitions_lib_own.call(cache, id)) { cache[id] = definition; } }); return definition; /** @type {GetDefinition} */ function definition(identifier) { const id = clean(identifier); // To do: next major: return `undefined` when not found. return id && mdast_util_definitions_lib_own.call(cache, id) ? cache[id] : null; } } /** * @param {string | null | undefined} [value] * @returns {string} */ function clean(value) { return String(value || '').toUpperCase(); } ;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js /** * @typedef {import('hast').Element} Element * @typedef {import('mdast').Blockquote} Blockquote * @typedef {import('../state.js').State} State */ /** * Turn an mdast `blockquote` node into hast. * * @param {State} state * Info passed around. * @param {Blockquote} node * mdast node. * @returns {Element} * hast node. */ function blockquote(state, node) { /** @type {Element} */ const result = { type: 'element', tagName: 'blockquote', properties: {}, children: state.wrap(state.all(node), true) }; state.patch(node, result); return state.applyData(node, result); } ;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/break.js /** * @typedef {import('hast').Element} Element * @typedef {import('hast').Text} Text * @typedef {import('mdast').Break} Break * @typedef {import('../state.js').State} State */ /** * Turn an mdast `break` node into hast. * * @param {State} state * Info passed around. * @param {Break} node * mdast node. * @returns {Array} * hast element content. */ function hardBreak(state, node) { /** @type {Element} */ const result = { type: 'element', tagName: 'br', properties: {}, children: [] }; state.patch(node, result); return [state.applyData(node, result), { type: 'text', value: '\n' }]; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/code.js /** * @typedef {import('hast').Element} Element * @typedef {import('hast').Properties} Properties * @typedef {import('mdast').Code} Code * @typedef {import('../state.js').State} State */ /** * Turn an mdast `code` node into hast. * * @param {State} state * Info passed around. * @param {Code} node * mdast node. * @returns {Element} * hast node. */ function code(state, node) { const value = node.value ? node.value + '\n' : ''; // To do: next major, use `node.lang` w/o regex, the splitting’s been going // on for years in remark now. const lang = node.lang ? node.lang.match(/^[^ \t]+(?=[ \t]|$)/) : null; /** @type {Properties} */ const properties = {}; if (lang) { properties.className = ['language-' + lang]; } // Create ``. /** @type {Element} */ let result = { type: 'element', tagName: 'code', properties, children: [{ type: 'text', value }] }; if (node.meta) { result.data = { meta: node.meta }; } state.patch(node, result); result = state.applyData(node, result); // Create `
`.
  result = {
    type: 'element',
    tagName: 'pre',
    properties: {},
    children: [result]
  };
  state.patch(node, result);
  return result;
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/delete.js
/**
 * @typedef {import('hast').Element} Element
 * @typedef {import('mdast').Delete} Delete
 * @typedef {import('../state.js').State} State

 */

/**
 * Turn an mdast `delete` node into hast.
 *
 * @param {State} state
 *   Info passed around.
 * @param {Delete} node
 *   mdast node.
 * @returns {Element}
 *   hast node.
 */
function strikethrough(state, node) {
  /** @type {Element} */
  const result = {
    type: 'element',
    tagName: 'del',
    properties: {},
    children: state.all(node)
  };
  state.patch(node, result);
  return state.applyData(node, result);
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js
/**
 * @typedef {import('hast').Element} Element
 * @typedef {import('mdast').Emphasis} Emphasis
 * @typedef {import('../state.js').State} State
 */

/**
 * Turn an mdast `emphasis` node into hast.
 *
 * @param {State} state
 *   Info passed around.
 * @param {Emphasis} node
 *   mdast node.
 * @returns {Element}
 *   hast node.
 */
function emphasis(state, node) {
  /** @type {Element} */
  const result = {
    type: 'element',
    tagName: 'em',
    properties: {},
    children: state.all(node)
  };
  state.patch(node, result);
  return state.applyData(node, result);
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js
/**
 * @typedef {import('mdast').FootnoteReference} FootnoteReference
 * @typedef {import('hast').Element} Element
 * @typedef {import('../state.js').State} State
 */



/**
 * Turn an mdast `footnoteReference` node into hast.
 *
 * @param {State} state
 *   Info passed around.
 * @param {FootnoteReference} node
 *   mdast node.
 * @returns {Element}
 *   hast node.
 */
function footnoteReference(state, node) {
  const id = String(node.identifier).toUpperCase();
  const safeId = normalizeUri(id.toLowerCase());
  const index = state.footnoteOrder.indexOf(id);
  /** @type {number} */
  let counter;
  if (index === -1) {
    state.footnoteOrder.push(id);
    state.footnoteCounts[id] = 1;
    counter = state.footnoteOrder.length;
  } else {
    state.footnoteCounts[id]++;
    counter = index + 1;
  }
  const reuseCounter = state.footnoteCounts[id];

  /** @type {Element} */
  const link = {
    type: 'element',
    tagName: 'a',
    properties: {
      href: '#' + state.clobberPrefix + 'fn-' + safeId,
      id: state.clobberPrefix + 'fnref-' + safeId + (reuseCounter > 1 ? '-' + reuseCounter : ''),
      dataFootnoteRef: true,
      ariaDescribedBy: ['footnote-label']
    },
    children: [{
      type: 'text',
      value: String(counter)
    }]
  };
  state.patch(node, link);

  /** @type {Element} */
  const sup = {
    type: 'element',
    tagName: 'sup',
    properties: {},
    children: [link]
  };
  state.patch(node, sup);
  return state.applyData(node, sup);
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/footnote.js
/**
 * @typedef {import('hast').Element} Element
 * @typedef {import('mdast').Footnote} Footnote
 * @typedef {import('../state.js').State} State
 */



// To do: when both:
// * 
// * 
// …are archived, remove this (also from mdast).
// These inline notes are not used in GFM.

/**
 * Turn an mdast `footnote` node into hast.
 *
 * @param {State} state
 *   Info passed around.
 * @param {Footnote} node
 *   mdast node.
 * @returns {Element}
 *   hast node.
 */
function footnote(state, node) {
  const footnoteById = state.footnoteById;
  let no = 1;
  while (no in footnoteById) no++;
  const identifier = String(no);
  footnoteById[identifier] = {
    type: 'footnoteDefinition',
    identifier,
    children: [{
      type: 'paragraph',
      children: node.children
    }],
    position: node.position
  };
  return footnoteReference(state, {
    type: 'footnoteReference',
    identifier,
    position: node.position
  });
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/heading.js
/**
 * @typedef {import('hast').Element} Element
 * @typedef {import('mdast').Heading} Heading
 * @typedef {import('../state.js').State} State
 */

/**
 * Turn an mdast `heading` node into hast.
 *
 * @param {State} state
 *   Info passed around.
 * @param {Heading} node
 *   mdast node.
 * @returns {Element}
 *   hast node.
 */
function heading(state, node) {
  /** @type {Element} */
  const result = {
    type: 'element',
    tagName: 'h' + node.depth,
    properties: {},
    children: state.all(node)
  };
  state.patch(node, result);
  return state.applyData(node, result);
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/html.js
/**
 * @typedef {import('hast').Element} Element
 * @typedef {import('mdast').HTML} Html
 * @typedef {import('../state.js').State} State
 * @typedef {import('../../index.js').Raw} Raw
 */

/**
 * Turn an mdast `html` node into hast (`raw` node in dangerous mode, otherwise
 * nothing).
 *
 * @param {State} state
 *   Info passed around.
 * @param {Html} node
 *   mdast node.
 * @returns {Raw | Element | null}
 *   hast node.
 */
function html(state, node) {
  if (state.dangerous) {
    /** @type {Raw} */
    const result = {
      type: 'raw',
      value: node.value
    };
    state.patch(node, result);
    return state.applyData(node, result);
  }

  // To do: next major: return `undefined`.
  return null;
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/revert.js
/**
 * @typedef {import('hast').ElementContent} ElementContent
 *
 * @typedef {import('mdast').Content} Content
 * @typedef {import('mdast').Reference} Reference
 * @typedef {import('mdast').Root} Root
 *
 * @typedef {import('./state.js').State} State
 */

/**
 * @typedef {Root | Content} Nodes
 * @typedef {Extract} References
 */

// To do: next major: always return array.

/**
 * Return the content of a reference without definition as plain text.
 *
 * @param {State} state
 *   Info passed around.
 * @param {References} node
 *   Reference node (image, link).
 * @returns {ElementContent | Array}
 *   hast content.
 */
function revert(state, node) {
  const subtype = node.referenceType;
  let suffix = ']';
  if (subtype === 'collapsed') {
    suffix += '[]';
  } else if (subtype === 'full') {
    suffix += '[' + (node.label || node.identifier) + ']';
  }
  if (node.type === 'imageReference') {
    return {
      type: 'text',
      value: '![' + node.alt + suffix
    };
  }
  const contents = state.all(node);
  const head = contents[0];
  if (head && head.type === 'text') {
    head.value = '[' + head.value;
  } else {
    contents.unshift({
      type: 'text',
      value: '['
    });
  }
  const tail = contents[contents.length - 1];
  if (tail && tail.type === 'text') {
    tail.value += suffix;
  } else {
    contents.push({
      type: 'text',
      value: suffix
    });
  }
  return contents;
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js
/**
 * @typedef {import('hast').ElementContent} ElementContent
 * @typedef {import('hast').Element} Element
 * @typedef {import('hast').Properties} Properties
 * @typedef {import('mdast').ImageReference} ImageReference
 * @typedef {import('../state.js').State} State
 */




/**
 * Turn an mdast `imageReference` node into hast.
 *
 * @param {State} state
 *   Info passed around.
 * @param {ImageReference} node
 *   mdast node.
 * @returns {ElementContent | Array}
 *   hast node.
 */
function imageReference(state, node) {
  const def = state.definition(node.identifier);
  if (!def) {
    return revert(state, node);
  }

  /** @type {Properties} */
  const properties = {
    src: normalizeUri(def.url || ''),
    alt: node.alt
  };
  if (def.title !== null && def.title !== undefined) {
    properties.title = def.title;
  }

  /** @type {Element} */
  const result = {
    type: 'element',
    tagName: 'img',
    properties,
    children: []
  };
  state.patch(node, result);
  return state.applyData(node, result);
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/image.js
/**
 * @typedef {import('hast').Element} Element
 * @typedef {import('hast').Properties} Properties
 * @typedef {import('mdast').Image} Image
 * @typedef {import('../state.js').State} State
 */



/**
 * Turn an mdast `image` node into hast.
 *
 * @param {State} state
 *   Info passed around.
 * @param {Image} node
 *   mdast node.
 * @returns {Element}
 *   hast node.
 */
function image_image(state, node) {
  /** @type {Properties} */
  const properties = {
    src: normalizeUri(node.url)
  };
  if (node.alt !== null && node.alt !== undefined) {
    properties.alt = node.alt;
  }
  if (node.title !== null && node.title !== undefined) {
    properties.title = node.title;
  }

  /** @type {Element} */
  const result = {
    type: 'element',
    tagName: 'img',
    properties,
    children: []
  };
  state.patch(node, result);
  return state.applyData(node, result);
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js
/**
 * @typedef {import('hast').Element} Element
 * @typedef {import('hast').Text} Text
 * @typedef {import('mdast').InlineCode} InlineCode
 * @typedef {import('../state.js').State} State
 */

/**
 * Turn an mdast `inlineCode` node into hast.
 *
 * @param {State} state
 *   Info passed around.
 * @param {InlineCode} node
 *   mdast node.
 * @returns {Element}
 *   hast node.
 */
function inlineCode(state, node) {
  /** @type {Text} */
  const text = {
    type: 'text',
    value: node.value.replace(/\r?\n|\r/g, ' ')
  };
  state.patch(node, text);

  /** @type {Element} */
  const result = {
    type: 'element',
    tagName: 'code',
    properties: {},
    children: [text]
  };
  state.patch(node, result);
  return state.applyData(node, result);
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js
/**
 * @typedef {import('hast').Element} Element
 * @typedef {import('hast').ElementContent} ElementContent
 * @typedef {import('hast').Properties} Properties
 * @typedef {import('mdast').LinkReference} LinkReference
 * @typedef {import('../state.js').State} State
 */




/**
 * Turn an mdast `linkReference` node into hast.
 *
 * @param {State} state
 *   Info passed around.
 * @param {LinkReference} node
 *   mdast node.
 * @returns {ElementContent | Array}
 *   hast node.
 */
function linkReference(state, node) {
  const def = state.definition(node.identifier);
  if (!def) {
    return revert(state, node);
  }

  /** @type {Properties} */
  const properties = {
    href: normalizeUri(def.url || '')
  };
  if (def.title !== null && def.title !== undefined) {
    properties.title = def.title;
  }

  /** @type {Element} */
  const result = {
    type: 'element',
    tagName: 'a',
    properties,
    children: state.all(node)
  };
  state.patch(node, result);
  return state.applyData(node, result);
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/link.js
/**
 * @typedef {import('hast').Element} Element
 * @typedef {import('hast').Properties} Properties
 * @typedef {import('mdast').Link} Link
 * @typedef {import('../state.js').State} State
 */



/**
 * Turn an mdast `link` node into hast.
 *
 * @param {State} state
 *   Info passed around.
 * @param {Link} node
 *   mdast node.
 * @returns {Element}
 *   hast node.
 */
function link_link(state, node) {
  /** @type {Properties} */
  const properties = {
    href: normalizeUri(node.url)
  };
  if (node.title !== null && node.title !== undefined) {
    properties.title = node.title;
  }

  /** @type {Element} */
  const result = {
    type: 'element',
    tagName: 'a',
    properties,
    children: state.all(node)
  };
  state.patch(node, result);
  return state.applyData(node, result);
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/list-item.js
/**
 * @typedef {import('hast').Element} Element
 * @typedef {import('hast').ElementContent} ElementContent
 * @typedef {import('hast').Properties} Properties
 * @typedef {import('mdast').Content} Content
 * @typedef {import('mdast').ListItem} ListItem
 * @typedef {import('mdast').Parent} Parent
 * @typedef {import('mdast').Root} Root
 * @typedef {import('../state.js').State} State
 */

/**
 * @typedef {Root | Content} Nodes
 * @typedef {Extract} Parents
 */

/**
 * Turn an mdast `listItem` node into hast.
 *
 * @param {State} state
 *   Info passed around.
 * @param {ListItem} node
 *   mdast node.
 * @param {Parents | null | undefined} parent
 *   Parent of `node`.
 * @returns {Element}
 *   hast node.
 */
function listItem(state, node, parent) {
  const results = state.all(node);
  const loose = parent ? listLoose(parent) : listItemLoose(node);
  /** @type {Properties} */
  const properties = {};
  /** @type {Array} */
  const children = [];
  if (typeof node.checked === 'boolean') {
    const head = results[0];
    /** @type {Element} */
    let paragraph;
    if (head && head.type === 'element' && head.tagName === 'p') {
      paragraph = head;
    } else {
      paragraph = {
        type: 'element',
        tagName: 'p',
        properties: {},
        children: []
      };
      results.unshift(paragraph);
    }
    if (paragraph.children.length > 0) {
      paragraph.children.unshift({
        type: 'text',
        value: ' '
      });
    }
    paragraph.children.unshift({
      type: 'element',
      tagName: 'input',
      properties: {
        type: 'checkbox',
        checked: node.checked,
        disabled: true
      },
      children: []
    });

    // According to github-markdown-css, this class hides bullet.
    // See: .
    properties.className = ['task-list-item'];
  }
  let index = -1;
  while (++index < results.length) {
    const child = results[index];

    // Add eols before nodes, except if this is a loose, first paragraph.
    if (loose || index !== 0 || child.type !== 'element' || child.tagName !== 'p') {
      children.push({
        type: 'text',
        value: '\n'
      });
    }
    if (child.type === 'element' && child.tagName === 'p' && !loose) {
      children.push(...child.children);
    } else {
      children.push(child);
    }
  }
  const tail = results[results.length - 1];

  // Add a final eol.
  if (tail && (loose || tail.type !== 'element' || tail.tagName !== 'p')) {
    children.push({
      type: 'text',
      value: '\n'
    });
  }

  /** @type {Element} */
  const result = {
    type: 'element',
    tagName: 'li',
    properties,
    children
  };
  state.patch(node, result);
  return state.applyData(node, result);
}

/**
 * @param {Parents} node
 * @return {Boolean}
 */
function listLoose(node) {
  let loose = false;
  if (node.type === 'list') {
    loose = node.spread || false;
    const children = node.children;
    let index = -1;
    while (!loose && ++index < children.length) {
      loose = listItemLoose(children[index]);
    }
  }
  return loose;
}

/**
 * @param {ListItem} node
 * @return {Boolean}
 */
function listItemLoose(node) {
  const spread = node.spread;
  return spread === undefined || spread === null ? node.children.length > 1 : spread;
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/list.js
/**
 * @typedef {import('hast').Element} Element
 * @typedef {import('hast').Properties} Properties
 * @typedef {import('mdast').List} List
 * @typedef {import('../state.js').State} State
 */

/**
 * Turn an mdast `list` node into hast.
 *
 * @param {State} state
 *   Info passed around.
 * @param {List} node
 *   mdast node.
 * @returns {Element}
 *   hast node.
 */
function list_list(state, node) {
  /** @type {Properties} */
  const properties = {};
  const results = state.all(node);
  let index = -1;
  if (typeof node.start === 'number' && node.start !== 1) {
    properties.start = node.start;
  }

  // Like GitHub, add a class for custom styling.
  while (++index < results.length) {
    const child = results[index];
    if (child.type === 'element' && child.tagName === 'li' && child.properties && Array.isArray(child.properties.className) && child.properties.className.includes('task-list-item')) {
      properties.className = ['contains-task-list'];
      break;
    }
  }

  /** @type {Element} */
  const result = {
    type: 'element',
    tagName: node.ordered ? 'ol' : 'ul',
    properties,
    children: state.wrap(results, true)
  };
  state.patch(node, result);
  return state.applyData(node, result);
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js
/**
 * @typedef {import('hast').Element} Element
 * @typedef {import('mdast').Paragraph} Paragraph
 * @typedef {import('../state.js').State} State
 */

/**
 * Turn an mdast `paragraph` node into hast.
 *
 * @param {State} state
 *   Info passed around.
 * @param {Paragraph} node
 *   mdast node.
 * @returns {Element}
 *   hast node.
 */
function paragraph(state, node) {
  /** @type {Element} */
  const result = {
    type: 'element',
    tagName: 'p',
    properties: {},
    children: state.all(node)
  };
  state.patch(node, result);
  return state.applyData(node, result);
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/root.js
/**
 * @typedef {import('hast').Root} HastRoot
 * @typedef {import('hast').Element} HastElement
 * @typedef {import('mdast').Root} MdastRoot
 * @typedef {import('../state.js').State} State
 */

/**
 * Turn an mdast `root` node into hast.
 *
 * @param {State} state
 *   Info passed around.
 * @param {MdastRoot} node
 *   mdast node.
 * @returns {HastRoot | HastElement}
 *   hast node.
 */
function root(state, node) {
  /** @type {HastRoot} */
  const result = {
    type: 'root',
    children: state.wrap(state.all(node))
  };
  state.patch(node, result);
  return state.applyData(node, result);
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/strong.js
/**
 * @typedef {import('hast').Element} Element
 * @typedef {import('mdast').Strong} Strong
 * @typedef {import('../state.js').State} State
 */

/**
 * Turn an mdast `strong` node into hast.
 *
 * @param {State} state
 *   Info passed around.
 * @param {Strong} node
 *   mdast node.
 * @returns {Element}
 *   hast node.
 */
function strong(state, node) {
  /** @type {Element} */
  const result = {
    type: 'element',
    tagName: 'strong',
    properties: {},
    children: state.all(node)
  };
  state.patch(node, result);
  return state.applyData(node, result);
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/table.js
/**
 * @typedef {import('hast').Element} Element
 * @typedef {import('mdast').Table} Table
 * @typedef {import('../state.js').State} State
 */



/**
 * Turn an mdast `table` node into hast.
 *
 * @param {State} state
 *   Info passed around.
 * @param {Table} node
 *   mdast node.
 * @returns {Element}
 *   hast node.
 */
function table(state, node) {
  const rows = state.all(node);
  const firstRow = rows.shift();
  /** @type {Array} */
  const tableContent = [];
  if (firstRow) {
    /** @type {Element} */
    const head = {
      type: 'element',
      tagName: 'thead',
      properties: {},
      children: state.wrap([firstRow], true)
    };
    state.patch(node.children[0], head);
    tableContent.push(head);
  }
  if (rows.length > 0) {
    /** @type {Element} */
    const body = {
      type: 'element',
      tagName: 'tbody',
      properties: {},
      children: state.wrap(rows, true)
    };
    const start = pointStart(node.children[1]);
    const end = pointEnd(node.children[node.children.length - 1]);
    if (start.line && end.line) body.position = {
      start,
      end
    };
    tableContent.push(body);
  }

  /** @type {Element} */
  const result = {
    type: 'element',
    tagName: 'table',
    properties: {},
    children: state.wrap(tableContent, true)
  };
  state.patch(node, result);
  return state.applyData(node, result);
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/table-row.js
/**
 * @typedef {import('hast').Properties} Properties
 * @typedef {import('hast').Element} Element
 * @typedef {import('hast').ElementContent} ElementContent
 * @typedef {import('mdast').Content} Content
 * @typedef {import('mdast').Parent} Parent
 * @typedef {import('mdast').Root} Root
 * @typedef {import('mdast').TableRow} TableRow
 * @typedef {import('../state.js').State} State
 */

/**
 * @typedef {Root | Content} Nodes
 * @typedef {Extract} Parents
 */

/**
 * Turn an mdast `tableRow` node into hast.
 *
 * @param {State} state
 *   Info passed around.
 * @param {TableRow} node
 *   mdast node.
 * @param {Parents | null | undefined} parent
 *   Parent of `node`.
 * @returns {Element}
 *   hast node.
 */
function tableRow(state, node, parent) {
  const siblings = parent ? parent.children : undefined;
  // Generate a body row when without parent.
  const rowIndex = siblings ? siblings.indexOf(node) : 1;
  const tagName = rowIndex === 0 ? 'th' : 'td';
  const align = parent && parent.type === 'table' ? parent.align : undefined;
  const length = align ? align.length : node.children.length;
  let cellIndex = -1;
  /** @type {Array} */
  const cells = [];
  while (++cellIndex < length) {
    // Note: can also be undefined.
    const cell = node.children[cellIndex];
    /** @type {Properties} */
    const properties = {};
    const alignValue = align ? align[cellIndex] : undefined;
    if (alignValue) {
      properties.align = alignValue;
    }

    /** @type {Element} */
    let result = {
      type: 'element',
      tagName,
      properties,
      children: []
    };
    if (cell) {
      result.children = state.all(cell);
      state.patch(cell, result);
      result = state.applyData(node, result);
    }
    cells.push(result);
  }

  /** @type {Element} */
  const result = {
    type: 'element',
    tagName: 'tr',
    properties: {},
    children: state.wrap(cells, true)
  };
  state.patch(node, result);
  return state.applyData(node, result);
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js
/**
 * @typedef {import('hast').Element} Element
 * @typedef {import('mdast').TableCell} TableCell
 * @typedef {import('../state.js').State} State
 */

/**
 * Turn an mdast `tableCell` node into hast.
 *
 * @param {State} state
 *   Info passed around.
 * @param {TableCell} node
 *   mdast node.
 * @returns {Element}
 *   hast node.
 */
function tableCell(state, node) {
  // Note: this function is normally not called: see `table-row` for how rows
  // and their cells are compiled.
  /** @type {Element} */
  const result = {
    type: 'element',
    tagName: 'td',
    // Assume body cell.
    properties: {},
    children: state.all(node)
  };
  state.patch(node, result);
  return state.applyData(node, result);
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/trim-lines@3.0.1/node_modules/trim-lines/index.js
const tab = 9; /* `\t` */
const space = 32; /* ` ` */

/**
 * Remove initial and final spaces and tabs at the line breaks in `value`.
 * Does not trim initial and final spaces and tabs of the value itself.
 *
 * @param {string} value
 *   Value to trim.
 * @returns {string}
 *   Trimmed value.
 */
function trimLines(value) {
  const source = String(value);
  const search = /\r?\n|\r/g;
  let match = search.exec(source);
  let last = 0;
  /** @type {Array} */
  const lines = [];
  while (match) {
    lines.push(trimLine(source.slice(last, match.index), last > 0, true), match[0]);
    last = match.index + match[0].length;
    match = search.exec(source);
  }
  lines.push(trimLine(source.slice(last), last > 0, false));
  return lines.join('');
}

/**
 * @param {string} value
 *   Line to trim.
 * @param {boolean} start
 *   Whether to trim the start of the line.
 * @param {boolean} end
 *   Whether to trim the end of the line.
 * @returns {string}
 *   Trimmed line.
 */
function trimLine(value, start, end) {
  let startIndex = 0;
  let endIndex = value.length;
  if (start) {
    let code = value.codePointAt(startIndex);
    while (code === tab || code === space) {
      startIndex++;
      code = value.codePointAt(startIndex);
    }
  }
  if (end) {
    let code = value.codePointAt(endIndex - 1);
    while (code === tab || code === space) {
      endIndex--;
      code = value.codePointAt(endIndex - 1);
    }
  }
  return endIndex > startIndex ? value.slice(startIndex, endIndex) : '';
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/text.js
/**
 * @typedef {import('hast').Element} HastElement
 * @typedef {import('hast').Text} HastText
 * @typedef {import('mdast').Text} MdastText
 * @typedef {import('../state.js').State} State
 */



/**
 * Turn an mdast `text` node into hast.
 *
 * @param {State} state
 *   Info passed around.
 * @param {MdastText} node
 *   mdast node.
 * @returns {HastText | HastElement}
 *   hast node.
 */
function handlers_text_text(state, node) {
  /** @type {HastText} */
  const result = {
    type: 'text',
    value: trimLines(String(node.value))
  };
  state.patch(node, result);
  return state.applyData(node, result);
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js
/**
 * @typedef {import('hast').Element} Element
 * @typedef {import('mdast').ThematicBreak} ThematicBreak
 * @typedef {import('../state.js').State} State
 */

/**
 * Turn an mdast `thematicBreak` node into hast.
 *
 * @param {State} state
 *   Info passed around.
 * @param {ThematicBreak} node
 *   mdast node.
 * @returns {Element}
 *   hast node.
 */
function thematic_break_thematicBreak(state, node) {
  /** @type {Element} */
  const result = {
    type: 'element',
    tagName: 'hr',
    properties: {},
    children: []
  };
  state.patch(node, result);
  return state.applyData(node, result);
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/handlers/index.js

























/**
 * Default handlers for nodes.
 */
const handlers = {
  blockquote: blockquote,
  break: hardBreak,
  code: code,
  delete: strikethrough,
  emphasis: emphasis,
  footnoteReference: footnoteReference,
  footnote: footnote,
  heading: heading,
  html: html,
  imageReference: imageReference,
  image: image_image,
  inlineCode: inlineCode,
  linkReference: linkReference,
  link: link_link,
  listItem: listItem,
  list: list_list,
  paragraph: paragraph,
  root: root,
  strong: strong,
  table: table,
  tableCell: tableCell,
  tableRow: tableRow,
  text: handlers_text_text,
  thematicBreak: thematic_break_thematicBreak,
  toml: ignore,
  yaml: ignore,
  definition: ignore,
  footnoteDefinition: ignore
};

// Return nothing for nodes that are ignored.
function ignore() {
  // To do: next major: return `undefined`.
  return null;
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/state.js
/**
 * @typedef {import('hast').Content} HastContent
 * @typedef {import('hast').Element} HastElement
 * @typedef {import('hast').ElementContent} HastElementContent
 * @typedef {import('hast').Properties} HastProperties
 * @typedef {import('hast').Root} HastRoot
 * @typedef {import('hast').Text} HastText
 *
 * @typedef {import('mdast').Content} MdastContent
 * @typedef {import('mdast').Definition} MdastDefinition
 * @typedef {import('mdast').FootnoteDefinition} MdastFootnoteDefinition
 * @typedef {import('mdast').Parent} MdastParent
 * @typedef {import('mdast').Root} MdastRoot
 */

/**
 * @typedef {HastRoot | HastContent} HastNodes
 * @typedef {MdastRoot | MdastContent} MdastNodes
 * @typedef {Extract} MdastParents
 *
 * @typedef EmbeddedHastFields
 *   hast fields.
 * @property {string | null | undefined} [hName]
 *   Generate a specific element with this tag name instead.
 * @property {HastProperties | null | undefined} [hProperties]
 *   Generate an element with these properties instead.
 * @property {Array | null | undefined} [hChildren]
 *   Generate an element with this content instead.
 *
 * @typedef {Record & EmbeddedHastFields} MdastData
 *   mdast data with embedded hast fields.
 *
 * @typedef {MdastNodes & {data?: MdastData | null | undefined}} MdastNodeWithData
 *   mdast node with embedded hast data.
 *
 * @typedef PointLike
 *   Point-like value.
 * @property {number | null | undefined} [line]
 *   Line.
 * @property {number | null | undefined} [column]
 *   Column.
 * @property {number | null | undefined} [offset]
 *   Offset.
 *
 * @typedef PositionLike
 *   Position-like value.
 * @property {PointLike | null | undefined} [start]
 *   Point-like value.
 * @property {PointLike | null | undefined} [end]
 *   Point-like value.
 *
 * @callback Handler
 *   Handle a node.
 * @param {State} state
 *   Info passed around.
 * @param {any} node
 *   mdast node to handle.
 * @param {MdastParents | null | undefined} parent
 *   Parent of `node`.
 * @returns {HastElementContent | Array | null | undefined}
 *   hast node.
 *
 * @callback HFunctionProps
 *   Signature of `state` for when props are passed.
 * @param {MdastNodes | PositionLike | null | undefined} node
 *   mdast node or unist position.
 * @param {string} tagName
 *   HTML tag name.
 * @param {HastProperties} props
 *   Properties.
 * @param {Array | null | undefined} [children]
 *   hast content.
 * @returns {HastElement}
 *   Compiled element.
 *
 * @callback HFunctionNoProps
 *   Signature of `state` for when no props are passed.
 * @param {MdastNodes | PositionLike | null | undefined} node
 *   mdast node or unist position.
 * @param {string} tagName
 *   HTML tag name.
 * @param {Array | null | undefined} [children]
 *   hast content.
 * @returns {HastElement}
 *   Compiled element.
 *
 * @typedef HFields
 *   Info on `state`.
 * @property {boolean} dangerous
 *   Whether HTML is allowed.
 * @property {string} clobberPrefix
 *   Prefix to use to prevent DOM clobbering.
 * @property {string} footnoteLabel
 *   Label to use to introduce the footnote section.
 * @property {string} footnoteLabelTagName
 *   HTML used for the footnote label.
 * @property {HastProperties} footnoteLabelProperties
 *   Properties on the HTML tag used for the footnote label.
 * @property {string} footnoteBackLabel
 *   Label to use from backreferences back to their footnote call.
 * @property {(identifier: string) => MdastDefinition | null} definition
 *   Definition cache.
 * @property {Record} footnoteById
 *   Footnote definitions by their identifier.
 * @property {Array} footnoteOrder
 *   Identifiers of order when footnote calls first appear in tree order.
 * @property {Record} footnoteCounts
 *   Counts for how often the same footnote was called.
 * @property {Handlers} handlers
 *   Applied handlers.
 * @property {Handler} unknownHandler
 *   Handler for any none not in `passThrough` or otherwise handled.
 * @property {(from: MdastNodes, node: HastNodes) => void} patch
 *   Copy a node’s positional info.
 * @property {(from: MdastNodes, to: Type) => Type | HastElement} applyData
 *   Honor the `data` of `from`, and generate an element instead of `node`.
 * @property {(node: MdastNodes, parent: MdastParents | null | undefined) => HastElementContent | Array | null | undefined} one
 *   Transform an mdast node to hast.
 * @property {(node: MdastNodes) => Array} all
 *   Transform the children of an mdast parent to hast.
 * @property {(nodes: Array, loose?: boolean | null | undefined) => Array} wrap
 *   Wrap `nodes` with line endings between each node, adds initial/final line endings when `loose`.
 * @property {(left: MdastNodeWithData | PositionLike | null | undefined, right: HastElementContent) => HastElementContent} augment
 *   Like `state` but lower-level and usable on non-elements.
 *   Deprecated: use `patch` and `applyData`.
 * @property {Array} passThrough
 *   List of node types to pass through untouched (except for their children).
 *
 * @typedef Options
 *   Configuration (optional).
 * @property {boolean | null | undefined} [allowDangerousHtml=false]
 *   Whether to persist raw HTML in markdown in the hast tree.
 * @property {string | null | undefined} [clobberPrefix='user-content-']
 *   Prefix to use before the `id` attribute on footnotes to prevent it from
 *   *clobbering*.
 * @property {string | null | undefined} [footnoteBackLabel='Back to content']
 *   Label to use from backreferences back to their footnote call (affects
 *   screen readers).
 * @property {string | null | undefined} [footnoteLabel='Footnotes']
 *   Label to use for the footnotes section (affects screen readers).
 * @property {HastProperties | null | undefined} [footnoteLabelProperties={className: ['sr-only']}]
 *   Properties to use on the footnote label (note that `id: 'footnote-label'`
 *   is always added as footnote calls use it with `aria-describedby` to
 *   provide an accessible label).
 * @property {string | null | undefined} [footnoteLabelTagName='h2']
 *   Tag name to use for the footnote label.
 * @property {Handlers | null | undefined} [handlers]
 *   Extra handlers for nodes.
 * @property {Array | null | undefined} [passThrough]
 *   List of custom mdast node types to pass through (keep) in hast (note that
 *   the node itself is passed, but eventual children are transformed).
 * @property {Handler | null | undefined} [unknownHandler]
 *   Handler for all unknown nodes.
 *
 * @typedef {Record} Handlers
 *   Handle nodes.
 *
 * @typedef {HFunctionProps & HFunctionNoProps & HFields} State
 *   Info passed around.
 */






const state_own = {}.hasOwnProperty;

/**
 * Create `state` from an mdast tree.
 *
 * @param {MdastNodes} tree
 *   mdast node to transform.
 * @param {Options | null | undefined} [options]
 *   Configuration.
 * @returns {State}
 *   `state` function.
 */
function createState(tree, options) {
  const settings = options || {};
  const dangerous = settings.allowDangerousHtml || false;
  /** @type {Record} */
  const footnoteById = {};

  // To do: next major: add `options` to state, remove:
  // `dangerous`, `clobberPrefix`, `footnoteLabel`, `footnoteLabelTagName`,
  // `footnoteLabelProperties`, `footnoteBackLabel`, `passThrough`,
  // `unknownHandler`.

  // To do: next major: move to `state.options.allowDangerousHtml`.
  state.dangerous = dangerous;
  // To do: next major: move to `state.options`.
  state.clobberPrefix = settings.clobberPrefix === undefined || settings.clobberPrefix === null ? 'user-content-' : settings.clobberPrefix;
  // To do: next major: move to `state.options`.
  state.footnoteLabel = settings.footnoteLabel || 'Footnotes';
  // To do: next major: move to `state.options`.
  state.footnoteLabelTagName = settings.footnoteLabelTagName || 'h2';
  // To do: next major: move to `state.options`.
  state.footnoteLabelProperties = settings.footnoteLabelProperties || {
    className: ['sr-only']
  };
  // To do: next major: move to `state.options`.
  state.footnoteBackLabel = settings.footnoteBackLabel || 'Back to content';
  // To do: next major: move to `state.options`.
  state.unknownHandler = settings.unknownHandler;
  // To do: next major: move to `state.options`.
  state.passThrough = settings.passThrough;
  state.handlers = {
    ...handlers,
    ...settings.handlers
  };

  // To do: next major: replace utility with `definitionById` object, so we
  // only walk once (as we need footnotes too).
  state.definition = definitions(tree);
  state.footnoteById = footnoteById;
  /** @type {Array} */
  state.footnoteOrder = [];
  /** @type {Record} */
  state.footnoteCounts = {};
  state.patch = patch;
  state.applyData = applyData;
  state.one = oneBound;
  state.all = allBound;
  state.wrap = state_wrap;
  // To do: next major: remove `augment`.
  state.augment = augment;
  visit(tree, 'footnoteDefinition', definition => {
    const id = String(definition.identifier).toUpperCase();

    // Mimick CM behavior of link definitions.
    // See: .
    if (!state_own.call(footnoteById, id)) {
      footnoteById[id] = definition;
    }
  });

  // @ts-expect-error Hush, it’s fine!
  return state;

  /**
   * Finalise the created `right`, a hast node, from `left`, an mdast node.
   *
   * @param {MdastNodeWithData | PositionLike | null | undefined} left
   * @param {HastElementContent} right
   * @returns {HastElementContent}
   */
  /* c8 ignore start */
  // To do: next major: remove.
  function augment(left, right) {
    // Handle `data.hName`, `data.hProperties, `data.hChildren`.
    if (left && 'data' in left && left.data) {
      /** @type {MdastData} */
      const data = left.data;
      if (data.hName) {
        if (right.type !== 'element') {
          right = {
            type: 'element',
            tagName: '',
            properties: {},
            children: []
          };
        }
        right.tagName = data.hName;
      }
      if (right.type === 'element' && data.hProperties) {
        right.properties = {
          ...right.properties,
          ...data.hProperties
        };
      }
      if ('children' in right && right.children && data.hChildren) {
        right.children = data.hChildren;
      }
    }
    if (left) {
      const ctx = 'type' in left ? left : {
        position: left
      };
      if (!generated(ctx)) {
        // @ts-expect-error: fine.
        right.position = {
          start: pointStart(ctx),
          end: pointEnd(ctx)
        };
      }
    }
    return right;
  }
  /* c8 ignore stop */

  /**
   * Create an element for `node`.
   *
   * @type {HFunctionProps}
   */
  /* c8 ignore start */
  // To do: next major: remove.
  function state(node, tagName, props, children) {
    if (Array.isArray(props)) {
      children = props;
      props = {};
    }

    // @ts-expect-error augmenting an element yields an element.
    return augment(node, {
      type: 'element',
      tagName,
      properties: props || {},
      children: children || []
    });
  }
  /* c8 ignore stop */

  /**
   * Transform an mdast node into a hast node.
   *
   * @param {MdastNodes} node
   *   mdast node.
   * @param {MdastParents | null | undefined} [parent]
   *   Parent of `node`.
   * @returns {HastElementContent | Array | null | undefined}
   *   Resulting hast node.
   */
  function oneBound(node, parent) {
    // @ts-expect-error: that’s a state :)
    return state_one(state, node, parent);
  }

  /**
   * Transform the children of an mdast node into hast nodes.
   *
   * @param {MdastNodes} parent
   *   mdast node to compile
   * @returns {Array}
   *   Resulting hast nodes.
   */
  function allBound(parent) {
    // @ts-expect-error: that’s a state :)
    return state_all(state, parent);
  }
}

/**
 * Copy a node’s positional info.
 *
 * @param {MdastNodes} from
 *   mdast node to copy from.
 * @param {HastNodes} to
 *   hast node to copy into.
 * @returns {void}
 *   Nothing.
 */
function patch(from, to) {
  if (from.position) to.position = lib_position(from);
}

/**
 * Honor the `data` of `from` and maybe generate an element instead of `to`.
 *
 * @template {HastNodes} Type
 *   Node type.
 * @param {MdastNodes} from
 *   mdast node to use data from.
 * @param {Type} to
 *   hast node to change.
 * @returns {Type | HastElement}
 *   Nothing.
 */
function applyData(from, to) {
  /** @type {Type | HastElement} */
  let result = to;

  // Handle `data.hName`, `data.hProperties, `data.hChildren`.
  if (from && from.data) {
    const hName = from.data.hName;
    const hChildren = from.data.hChildren;
    const hProperties = from.data.hProperties;
    if (typeof hName === 'string') {
      // Transforming the node resulted in an element with a different name
      // than wanted:
      if (result.type === 'element') {
        result.tagName = hName;
      }
      // Transforming the node resulted in a non-element, which happens for
      // raw, text, and root nodes (unless custom handlers are passed).
      // The intent is likely to keep the content around (otherwise: pass
      // `hChildren`).
      else {
        result = {
          type: 'element',
          tagName: hName,
          properties: {},
          children: []
        };

        // To do: next major: take the children from the `root`, or inject the
        // raw/text/comment or so into the element?
        // if ('children' in node) {
        //   // @ts-expect-error: assume `children` are allowed in elements.
        //   result.children = node.children
        // } else {
        //   // @ts-expect-error: assume `node` is allowed in elements.
        //   result.children.push(node)
        // }
      }
    }

    if (result.type === 'element' && hProperties) {
      result.properties = {
        ...result.properties,
        ...hProperties
      };
    }
    if ('children' in result && result.children && hChildren !== null && hChildren !== undefined) {
      // @ts-expect-error: assume valid children are defined.
      result.children = hChildren;
    }
  }
  return result;
}

/**
 * Transform an mdast node into a hast node.
 *
 * @param {State} state
 *   Info passed around.
 * @param {MdastNodes} node
 *   mdast node.
 * @param {MdastParents | null | undefined} [parent]
 *   Parent of `node`.
 * @returns {HastElementContent | Array | null | undefined}
 *   Resulting hast node.
 */
// To do: next major: do not expose, keep bound.
function state_one(state, node, parent) {
  const type = node && node.type;

  // Fail on non-nodes.
  if (!type) {
    throw new Error('Expected node, got `' + node + '`');
  }
  if (state_own.call(state.handlers, type)) {
    return state.handlers[type](state, node, parent);
  }
  if (state.passThrough && state.passThrough.includes(type)) {
    // To do: next major: deep clone.
    // @ts-expect-error: types of passed through nodes are expected to be added manually.
    return 'children' in node ? {
      ...node,
      children: state_all(state, node)
    } : node;
  }
  if (state.unknownHandler) {
    return state.unknownHandler(state, node, parent);
  }
  return defaultUnknownHandler(state, node);
}

/**
 * Transform the children of an mdast node into hast nodes.
 *
 * @param {State} state
 *   Info passed around.
 * @param {MdastNodes} parent
 *   mdast node to compile
 * @returns {Array}
 *   Resulting hast nodes.
 */
// To do: next major: do not expose, keep bound.
function state_all(state, parent) {
  /** @type {Array} */
  const values = [];
  if ('children' in parent) {
    const nodes = parent.children;
    let index = -1;
    while (++index < nodes.length) {
      const result = state_one(state, nodes[index], parent);

      // To do: see if we van clean this? Can we merge texts?
      if (result) {
        if (index && nodes[index - 1].type === 'break') {
          if (!Array.isArray(result) && result.type === 'text') {
            result.value = result.value.replace(/^\s+/, '');
          }
          if (!Array.isArray(result) && result.type === 'element') {
            const head = result.children[0];
            if (head && head.type === 'text') {
              head.value = head.value.replace(/^\s+/, '');
            }
          }
        }
        if (Array.isArray(result)) {
          values.push(...result);
        } else {
          values.push(result);
        }
      }
    }
  }
  return values;
}

/**
 * Transform an unknown node.
 *
 * @param {State} state
 *   Info passed around.
 * @param {MdastNodes} node
 *   Unknown mdast node.
 * @returns {HastText | HastElement}
 *   Resulting hast node.
 */
function defaultUnknownHandler(state, node) {
  const data = node.data || {};
  /** @type {HastText | HastElement} */
  const result = 'value' in node && !(state_own.call(data, 'hProperties') || state_own.call(data, 'hChildren')) ? {
    type: 'text',
    value: node.value
  } : {
    type: 'element',
    tagName: 'div',
    properties: {},
    children: state_all(state, node)
  };
  state.patch(node, result);
  return state.applyData(node, result);
}

/**
 * Wrap `nodes` with line endings between each node.
 *
 * @template {HastContent} Type
 *   Node type.
 * @param {Array} nodes
 *   List of nodes to wrap.
 * @param {boolean | null | undefined} [loose=false]
 *   Whether to add line endings at start and end.
 * @returns {Array}
 *   Wrapped nodes.
 */
function state_wrap(nodes, loose) {
  /** @type {Array} */
  const result = [];
  let index = -1;
  if (loose) {
    result.push({
      type: 'text',
      value: '\n'
    });
  }
  while (++index < nodes.length) {
    if (index) result.push({
      type: 'text',
      value: '\n'
    });
    result.push(nodes[index]);
  }
  if (loose && nodes.length > 0) {
    result.push({
      type: 'text',
      value: '\n'
    });
  }
  return result;
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/mdast-util-to-hast@12.3.0/node_modules/mdast-util-to-hast/lib/index.js
/**
 * @typedef {import('hast').Content} HastContent
 * @typedef {import('hast').Root} HastRoot
 *
 * @typedef {import('mdast').Content} MdastContent
 * @typedef {import('mdast').Root} MdastRoot
 *
 * @typedef {import('./state.js').Options} Options
 */

/**
 * @typedef {HastRoot | HastContent} HastNodes
 * @typedef {MdastRoot | MdastContent} MdastNodes
 */




/**
 * Transform mdast to hast.
 *
 * ##### Notes
 *
 * ###### HTML
 *
 * Raw HTML is available in mdast as `html` nodes and can be embedded in hast
 * as semistandard `raw` nodes.
 * Most utilities ignore `raw` nodes but two notable ones don’t:
 *
 * *   `hast-util-to-html` also has an option `allowDangerousHtml` which will
 *     output the raw HTML.
 *     This is typically discouraged as noted by the option name but is useful
 *     if you completely trust authors
 * *   `hast-util-raw` can handle the raw embedded HTML strings by parsing them
 *     into standard hast nodes (`element`, `text`, etc).
 *     This is a heavy task as it needs a full HTML parser, but it is the only
 *     way to support untrusted content
 *
 * ###### Footnotes
 *
 * Many options supported here relate to footnotes.
 * Footnotes are not specified by CommonMark, which we follow by default.
 * They are supported by GitHub, so footnotes can be enabled in markdown with
 * `mdast-util-gfm`.
 *
 * The options `footnoteBackLabel` and `footnoteLabel` define natural language
 * that explains footnotes, which is hidden for sighted users but shown to
 * assistive technology.
 * When your page is not in English, you must define translated values.
 *
 * Back references use ARIA attributes, but the section label itself uses a
 * heading that is hidden with an `sr-only` class.
 * To show it to sighted users, define different attributes in
 * `footnoteLabelProperties`.
 *
 * ###### Clobbering
 *
 * Footnotes introduces a problem, as it links footnote calls to footnote
 * definitions on the page through `id` attributes generated from user content,
 * which results in DOM clobbering.
 *
 * DOM clobbering is this:
 *
 * ```html
 * 

* * ``` * * Elements by their ID are made available by browsers on the `window` object, * which is a security risk. * Using a prefix solves this problem. * * More information on how to handle clobbering and the prefix is explained in * Example: headings (DOM clobbering) in `rehype-sanitize`. * * ###### Unknown nodes * * Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`. * The default behavior for unknown nodes is: * * * when the node has a `value` (and doesn’t have `data.hName`, * `data.hProperties`, or `data.hChildren`, see later), create a hast `text` * node * * otherwise, create a `
` element (which could be changed with * `data.hName`), with its children mapped from mdast to hast as well * * This behavior can be changed by passing an `unknownHandler`. * * @param {MdastNodes} tree * mdast tree. * @param {Options | null | undefined} [options] * Configuration. * @returns {HastNodes | null | undefined} * hast tree. */ // To do: next major: always return a single `root`. function toHast(tree, options) { const state = createState(tree, options); const node = state.one(tree, null); const foot = footer(state); if (foot) { // @ts-expect-error If there’s a footer, there were definitions, meaning block // content. // So assume `node` is a parent node. node.children.push({ type: 'text', value: '\n' }, foot); } // To do: next major: always return root? return Array.isArray(node) ? { type: 'root', children: node } : node; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/remark-rehype@10.1.0/node_modules/remark-rehype/lib/index.js /** * @typedef {import('hast').Root} HastRoot * @typedef {import('mdast').Root} MdastRoot * @typedef {import('mdast-util-to-hast').Options} Options * @typedef {import('unified').Processor} Processor * * @typedef {import('mdast-util-to-hast')} DoNotTouchAsThisImportIncludesRawInTree */ // Note: the `` overload doesn’t seem to work :'( /** * Plugin that turns markdown into HTML to support rehype. * * * If a destination processor is given, that processor runs with a new HTML * (hast) tree (bridge-mode). * As the given processor runs with a hast tree, and rehype plugins support * hast, that means rehype plugins can be used with the given processor. * The hast tree is discarded in the end. * It’s highly unlikely that you want to do this. * * The common case is to not pass a destination processor, in which case the * current processor continues running with a new HTML (hast) tree * (mutate-mode). * As the current processor continues with a hast tree, and rehype plugins * support hast, that means rehype plugins can be used after * `remark-rehype`. * It’s likely that this is what you want to do. * * @param destination * Optional unified processor. * @param options * Options passed to `mdast-util-to-hast`. */ const remarkRehype = /** @type {(import('unified').Plugin<[Processor, Options?]|[null|undefined, Options?]|[Options]|[], MdastRoot>)} */ function (destination, options) { return destination && 'run' in destination ? bridge(destination, options) : mutate(destination || options); }; /* harmony default export */ const lib = (remarkRehype); /** * Bridge-mode. * Runs the destination with the new hast tree. * * @type {import('unified').Plugin<[Processor, Options?], MdastRoot>} */ function bridge(destination, options) { return (node, file, next) => { destination.run(toHast(node, options), file, error => { next(error); }); }; } /** * Mutate-mode. * Further plugins run on the hast tree. * * @type {import('unified').Plugin<[Options?]|void[], MdastRoot, HastRoot>} */ function mutate(options) { // @ts-expect-error: assume a corresponding node is returned by `toHast`. return node => toHast(node, options); } // EXTERNAL MODULE: ./node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js var prop_types = __webpack_require__(7897); ;// CONCATENATED MODULE: ./node_modules/.pnpm/property-information@6.3.0/node_modules/property-information/lib/util/schema.js /** * @typedef {import('./info.js').Info} Info * @typedef {Record} Properties * @typedef {Record} Normal */ class Schema { /** * @constructor * @param {Properties} property * @param {Normal} normal * @param {string} [space] */ constructor(property, normal, space) { this.property = property; this.normal = normal; if (space) { this.space = space; } } } /** @type {Properties} */ Schema.prototype.property = {}; /** @type {Normal} */ Schema.prototype.normal = {}; /** @type {string|null} */ Schema.prototype.space = null; ;// CONCATENATED MODULE: ./node_modules/.pnpm/property-information@6.3.0/node_modules/property-information/lib/util/merge.js /** * @typedef {import('./schema.js').Properties} Properties * @typedef {import('./schema.js').Normal} Normal */ /** * @param {Schema[]} definitions * @param {string} [space] * @returns {Schema} */ function merge(definitions, space) { /** @type {Properties} */ const property = {}; /** @type {Normal} */ const normal = {}; let index = -1; while (++index < definitions.length) { Object.assign(property, definitions[index].property); Object.assign(normal, definitions[index].normal); } return new Schema(property, normal, space); } ;// CONCATENATED MODULE: ./node_modules/.pnpm/property-information@6.3.0/node_modules/property-information/lib/normalize.js /** * @param {string} value * @returns {string} */ function normalize_normalize(value) { return value.toLowerCase(); } ;// CONCATENATED MODULE: ./node_modules/.pnpm/property-information@6.3.0/node_modules/property-information/lib/util/info.js class Info { /** * @constructor * @param {string} property * @param {string} attribute */ constructor(property, attribute) { /** @type {string} */ this.property = property; /** @type {string} */ this.attribute = attribute; } } /** @type {string|null} */ Info.prototype.space = null; Info.prototype.boolean = false; Info.prototype.booleanish = false; Info.prototype.overloadedBoolean = false; Info.prototype.number = false; Info.prototype.commaSeparated = false; Info.prototype.spaceSeparated = false; Info.prototype.commaOrSpaceSeparated = false; Info.prototype.mustUseProperty = false; Info.prototype.defined = false; ;// CONCATENATED MODULE: ./node_modules/.pnpm/property-information@6.3.0/node_modules/property-information/lib/util/types.js let powers = 0; const types_boolean = increment(); const booleanish = increment(); const overloadedBoolean = increment(); const number = increment(); const spaceSeparated = increment(); const commaSeparated = increment(); const commaOrSpaceSeparated = increment(); function increment() { return 2 ** ++powers; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/property-information@6.3.0/node_modules/property-information/lib/util/defined-info.js /** @type {Array} */ // @ts-expect-error: hush. const checks = Object.keys(types_namespaceObject); class DefinedInfo extends Info { /** * @constructor * @param {string} property * @param {string} attribute * @param {number|null} [mask] * @param {string} [space] */ constructor(property, attribute, mask, space) { let index = -1; super(property, attribute); mark(this, 'space', space); if (typeof mask === 'number') { while (++index < checks.length) { const check = checks[index]; mark(this, checks[index], (mask & types_namespaceObject[check]) === types_namespaceObject[check]); } } } } DefinedInfo.prototype.defined = true; /** * @param {DefinedInfo} values * @param {string} key * @param {unknown} value */ function mark(values, key, value) { if (value) { // @ts-expect-error: assume `value` matches the expected value of `key`. values[key] = value; } } ;// CONCATENATED MODULE: ./node_modules/.pnpm/property-information@6.3.0/node_modules/property-information/lib/util/create.js /** * @typedef {import('./schema.js').Properties} Properties * @typedef {import('./schema.js').Normal} Normal * * @typedef {Record} Attributes * * @typedef {Object} Definition * @property {Record} properties * @property {(attributes: Attributes, property: string) => string} transform * @property {string} [space] * @property {Attributes} [attributes] * @property {Array} [mustUseProperty] */ const create_own = {}.hasOwnProperty; /** * @param {Definition} definition * @returns {Schema} */ function create(definition) { /** @type {Properties} */ const property = {}; /** @type {Normal} */ const normal = {}; /** @type {string} */ let prop; for (prop in definition.properties) { if (create_own.call(definition.properties, prop)) { const value = definition.properties[prop]; const info = new DefinedInfo(prop, definition.transform(definition.attributes || {}, prop), value, definition.space); if (definition.mustUseProperty && definition.mustUseProperty.includes(prop)) { info.mustUseProperty = true; } property[prop] = info; normal[normalize_normalize(prop)] = prop; normal[normalize_normalize(info.attribute)] = prop; } } return new Schema(property, normal, definition.space); } ;// CONCATENATED MODULE: ./node_modules/.pnpm/property-information@6.3.0/node_modules/property-information/lib/xlink.js const xlink = create({ space: 'xlink', transform(_, prop) { return 'xlink:' + prop.slice(5).toLowerCase(); }, properties: { xLinkActuate: null, xLinkArcRole: null, xLinkHref: null, xLinkRole: null, xLinkShow: null, xLinkTitle: null, xLinkType: null } }); ;// CONCATENATED MODULE: ./node_modules/.pnpm/property-information@6.3.0/node_modules/property-information/lib/xml.js const xml = create({ space: 'xml', transform(_, prop) { return 'xml:' + prop.slice(3).toLowerCase(); }, properties: { xmlLang: null, xmlBase: null, xmlSpace: null } }); ;// CONCATENATED MODULE: ./node_modules/.pnpm/property-information@6.3.0/node_modules/property-information/lib/util/case-sensitive-transform.js /** * @param {Record} attributes * @param {string} attribute * @returns {string} */ function caseSensitiveTransform(attributes, attribute) { return attribute in attributes ? attributes[attribute] : attribute; } ;// CONCATENATED MODULE: ./node_modules/.pnpm/property-information@6.3.0/node_modules/property-information/lib/util/case-insensitive-transform.js /** * @param {Record} attributes * @param {string} property * @returns {string} */ function caseInsensitiveTransform(attributes, property) { return caseSensitiveTransform(attributes, property.toLowerCase()); } ;// CONCATENATED MODULE: ./node_modules/.pnpm/property-information@6.3.0/node_modules/property-information/lib/xmlns.js const xmlns = create({ space: 'xmlns', attributes: { xmlnsxlink: 'xmlns:xlink' }, transform: caseInsensitiveTransform, properties: { xmlns: null, xmlnsXLink: null } }); ;// CONCATENATED MODULE: ./node_modules/.pnpm/property-information@6.3.0/node_modules/property-information/lib/aria.js const aria = create({ transform(_, prop) { return prop === 'role' ? prop : 'aria-' + prop.slice(4).toLowerCase(); }, properties: { ariaActiveDescendant: null, ariaAtomic: booleanish, ariaAutoComplete: null, ariaBusy: booleanish, ariaChecked: booleanish, ariaColCount: number, ariaColIndex: number, ariaColSpan: number, ariaControls: spaceSeparated, ariaCurrent: null, ariaDescribedBy: spaceSeparated, ariaDetails: null, ariaDisabled: booleanish, ariaDropEffect: spaceSeparated, ariaErrorMessage: null, ariaExpanded: booleanish, ariaFlowTo: spaceSeparated, ariaGrabbed: booleanish, ariaHasPopup: null, ariaHidden: booleanish, ariaInvalid: null, ariaKeyShortcuts: null, ariaLabel: null, ariaLabelledBy: spaceSeparated, ariaLevel: number, ariaLive: null, ariaModal: booleanish, ariaMultiLine: booleanish, ariaMultiSelectable: booleanish, ariaOrientation: null, ariaOwns: spaceSeparated, ariaPlaceholder: null, ariaPosInSet: number, ariaPressed: booleanish, ariaReadOnly: booleanish, ariaRelevant: null, ariaRequired: booleanish, ariaRoleDescription: spaceSeparated, ariaRowCount: number, ariaRowIndex: number, ariaRowSpan: number, ariaSelected: booleanish, ariaSetSize: number, ariaSort: null, ariaValueMax: number, ariaValueMin: number, ariaValueNow: number, ariaValueText: null, role: null } }); ;// CONCATENATED MODULE: ./node_modules/.pnpm/property-information@6.3.0/node_modules/property-information/lib/html.js const html_html = create({ space: 'html', attributes: { acceptcharset: 'accept-charset', classname: 'class', htmlfor: 'for', httpequiv: 'http-equiv' }, transform: caseInsensitiveTransform, mustUseProperty: ['checked', 'multiple', 'muted', 'selected'], properties: { // Standard Properties. abbr: null, accept: commaSeparated, acceptCharset: spaceSeparated, accessKey: spaceSeparated, action: null, allow: null, allowFullScreen: types_boolean, allowPaymentRequest: types_boolean, allowUserMedia: types_boolean, alt: null, as: null, async: types_boolean, autoCapitalize: null, autoComplete: spaceSeparated, autoFocus: types_boolean, autoPlay: types_boolean, blocking: spaceSeparated, capture: types_boolean, charSet: null, checked: types_boolean, cite: null, className: spaceSeparated, cols: number, colSpan: null, content: null, contentEditable: booleanish, controls: types_boolean, controlsList: spaceSeparated, coords: number | commaSeparated, crossOrigin: null, data: null, dateTime: null, decoding: null, default: types_boolean, defer: types_boolean, dir: null, dirName: null, disabled: types_boolean, download: overloadedBoolean, draggable: booleanish, encType: null, enterKeyHint: null, fetchPriority: null, form: null, formAction: null, formEncType: null, formMethod: null, formNoValidate: types_boolean, formTarget: null, headers: spaceSeparated, height: number, hidden: types_boolean, high: number, href: null, hrefLang: null, htmlFor: spaceSeparated, httpEquiv: spaceSeparated, id: null, imageSizes: null, imageSrcSet: null, inert: types_boolean, inputMode: null, integrity: null, is: null, isMap: types_boolean, itemId: null, itemProp: spaceSeparated, itemRef: spaceSeparated, itemScope: types_boolean, itemType: spaceSeparated, kind: null, label: null, lang: null, language: null, list: null, loading: null, loop: types_boolean, low: number, manifest: null, max: null, maxLength: number, media: null, method: null, min: null, minLength: number, multiple: types_boolean, muted: types_boolean, name: null, nonce: null, noModule: types_boolean, noValidate: types_boolean, onAbort: null, onAfterPrint: null, onAuxClick: null, onBeforeMatch: null, onBeforePrint: null, onBeforeUnload: null, onBlur: null, onCancel: null, onCanPlay: null, onCanPlayThrough: null, onChange: null, onClick: null, onClose: null, onContextLost: null, onContextMenu: null, onContextRestored: null, onCopy: null, onCueChange: null, onCut: null, onDblClick: null, onDrag: null, onDragEnd: null, onDragEnter: null, onDragExit: null, onDragLeave: null, onDragOver: null, onDragStart: null, onDrop: null, onDurationChange: null, onEmptied: null, onEnded: null, onError: null, onFocus: null, onFormData: null, onHashChange: null, onInput: null, onInvalid: null, onKeyDown: null, onKeyPress: null, onKeyUp: null, onLanguageChange: null, onLoad: null, onLoadedData: null, onLoadedMetadata: null, onLoadEnd: null, onLoadStart: null, onMessage: null, onMessageError: null, onMouseDown: null, onMouseEnter: null, onMouseLeave: null, onMouseMove: null, onMouseOut: null, onMouseOver: null, onMouseUp: null, onOffline: null, onOnline: null, onPageHide: null, onPageShow: null, onPaste: null, onPause: null, onPlay: null, onPlaying: null, onPopState: null, onProgress: null, onRateChange: null, onRejectionHandled: null, onReset: null, onResize: null, onScroll: null, onScrollEnd: null, onSecurityPolicyViolation: null, onSeeked: null, onSeeking: null, onSelect: null, onSlotChange: null, onStalled: null, onStorage: null, onSubmit: null, onSuspend: null, onTimeUpdate: null, onToggle: null, onUnhandledRejection: null, onUnload: null, onVolumeChange: null, onWaiting: null, onWheel: null, open: types_boolean, optimum: number, pattern: null, ping: spaceSeparated, placeholder: null, playsInline: types_boolean, popover: null, popoverTarget: null, popoverTargetAction: null, poster: null, preload: null, readOnly: types_boolean, referrerPolicy: null, rel: spaceSeparated, required: types_boolean, reversed: types_boolean, rows: number, rowSpan: number, sandbox: spaceSeparated, scope: null, scoped: types_boolean, seamless: types_boolean, selected: types_boolean, shape: null, size: number, sizes: null, slot: null, span: number, spellCheck: booleanish, src: null, srcDoc: null, srcLang: null, srcSet: null, start: number, step: null, style: null, tabIndex: number, target: null, title: null, translate: null, type: null, typeMustMatch: types_boolean, useMap: null, value: booleanish, width: number, wrap: null, // Legacy. // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis align: null, // Several. Use CSS `text-align` instead, aLink: null, // ``. Use CSS `a:active {color}` instead archive: spaceSeparated, // ``. List of URIs to archives axis: null, // `` and ``. Use `scope` on `` background: null, // ``. Use CSS `background-image` instead bgColor: null, // `` and table elements. Use CSS `background-color` instead border: number, // ``. Use CSS `border-width` instead, borderColor: null, // `
`. Use CSS `border-color` instead, bottomMargin: number, // `` cellPadding: null, // `
` cellSpacing: null, // `
` char: null, // Several table elements. When `align=char`, sets the character to align on charOff: null, // Several table elements. When `char`, offsets the alignment classId: null, // `` clear: null, // `
`. Use CSS `clear` instead code: null, // `` codeBase: null, // `` codeType: null, // `` color: null, // `` and `
`. Use CSS instead compact: types_boolean, // Lists. Use CSS to reduce space between items instead declare: types_boolean, // `` event: null, // `