157 lines
6.7 KiB
JavaScript
157 lines
6.7 KiB
JavaScript
/*
|
|
* Extracted from browser-delivered Turbopack chunk: 939e07c76f4b30f0.294c1bf0d6.js
|
|
* Module id: 470257
|
|
* For reading/searching only; this factory depends on the original Turbopack runtime.
|
|
*/
|
|
|
|
const moduleFactory = (e, t, i) => {
|
|
"use strict";
|
|
function r(e) {
|
|
(e.languages.javascript = e.languages.extend("clike", {
|
|
"class-name": [
|
|
e.languages.clike["class-name"],
|
|
{
|
|
pattern:
|
|
/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
|
|
lookbehind: !0,
|
|
},
|
|
],
|
|
keyword: [
|
|
{ pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 },
|
|
{
|
|
pattern:
|
|
/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
|
|
lookbehind: !0,
|
|
},
|
|
],
|
|
function:
|
|
/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
|
|
number: {
|
|
pattern: RegExp(
|
|
/(^|[^\w$])/.source +
|
|
"(?:" +
|
|
(/NaN|Infinity/.source +
|
|
"|" +
|
|
/0[bB][01]+(?:_[01]+)*n?/.source +
|
|
"|" +
|
|
/0[oO][0-7]+(?:_[0-7]+)*n?/.source +
|
|
"|" +
|
|
/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source +
|
|
"|" +
|
|
/\d+(?:_\d+)*n/.source) +
|
|
"|" +
|
|
/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/
|
|
.source +
|
|
")" +
|
|
/(?![\w$])/.source,
|
|
),
|
|
lookbehind: !0,
|
|
},
|
|
operator:
|
|
/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/,
|
|
})),
|
|
(e.languages.javascript["class-name"][0].pattern =
|
|
/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/),
|
|
e.languages.insertBefore("javascript", "keyword", {
|
|
regex: {
|
|
pattern:
|
|
/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,
|
|
lookbehind: !0,
|
|
greedy: !0,
|
|
inside: {
|
|
"regex-source": {
|
|
pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
|
|
lookbehind: !0,
|
|
alias: "language-regex",
|
|
inside: e.languages.regex,
|
|
},
|
|
"regex-delimiter": /^\/|\/$/,
|
|
"regex-flags": /^[a-z]+$/,
|
|
},
|
|
},
|
|
"function-variable": {
|
|
pattern:
|
|
/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
|
|
alias: "function",
|
|
},
|
|
parameter: [
|
|
{
|
|
pattern:
|
|
/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
|
|
lookbehind: !0,
|
|
inside: e.languages.javascript,
|
|
},
|
|
{
|
|
pattern:
|
|
/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
|
|
lookbehind: !0,
|
|
inside: e.languages.javascript,
|
|
},
|
|
{
|
|
pattern:
|
|
/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
|
|
lookbehind: !0,
|
|
inside: e.languages.javascript,
|
|
},
|
|
{
|
|
pattern:
|
|
/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
|
|
lookbehind: !0,
|
|
inside: e.languages.javascript,
|
|
},
|
|
],
|
|
constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/,
|
|
}),
|
|
e.languages.insertBefore("javascript", "string", {
|
|
hashbang: { pattern: /^#!.*/, greedy: !0, alias: "comment" },
|
|
"template-string": {
|
|
pattern:
|
|
/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
|
|
greedy: !0,
|
|
inside: {
|
|
"template-punctuation": { pattern: /^`|`$/, alias: "string" },
|
|
interpolation: {
|
|
pattern:
|
|
/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
|
|
lookbehind: !0,
|
|
inside: {
|
|
"interpolation-punctuation": {
|
|
pattern: /^\$\{|\}$/,
|
|
alias: "punctuation",
|
|
},
|
|
rest: e.languages.javascript,
|
|
},
|
|
},
|
|
string: /[\s\S]+/,
|
|
},
|
|
},
|
|
"string-property": {
|
|
pattern:
|
|
/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
|
|
lookbehind: !0,
|
|
greedy: !0,
|
|
alias: "property",
|
|
},
|
|
}),
|
|
e.languages.insertBefore("javascript", "operator", {
|
|
"literal-property": {
|
|
pattern:
|
|
/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
|
|
lookbehind: !0,
|
|
alias: "property",
|
|
},
|
|
}),
|
|
e.languages.markup &&
|
|
(e.languages.markup.tag.addInlined("script", "javascript"),
|
|
e.languages.markup.tag.addAttribute(
|
|
/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/
|
|
.source,
|
|
"javascript",
|
|
)),
|
|
(e.languages.js = e.languages.javascript);
|
|
}
|
|
(t.exports = r), (r.displayName = "javascript"), (r.aliases = ["js"]);
|
|
};
|
|
|
|
export default moduleFactory;
|