Your Name 1912bcd25b
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled
chore: sync all remaining local workspace changes
2026-05-08 11:26:57 +08:00

116 lines
3.7 KiB
JavaScript

/*
* Extracted from browser-delivered Turbopack chunk: 939e07c76f4b30f0.294c1bf0d6.js
* Module id: 867654
* For reading/searching only; this factory depends on the original Turbopack runtime.
*/
const moduleFactory = (e, t, i) => {
"use strict";
function r(e) {
var t, i;
(i = {
"quoted-string": { pattern: /"(?:[^"\\]|\\.)*"/, alias: "operator" },
"command-param-id": {
pattern: /(\s)\w+:/,
lookbehind: !0,
alias: "property",
},
"command-param-value": [
{ pattern: (t = /\{[^\r\n\[\]{}]*\}/), alias: "selector" },
{
pattern: /([\t ])\S+/,
lookbehind: !0,
greedy: !0,
alias: "operator",
},
{ pattern: /\S(?:.*\S)?/, alias: "operator" },
],
}),
(e.languages.naniscript = {
comment: { pattern: /^([\t ]*);.*/m, lookbehind: !0 },
define: {
pattern: /^>.+/m,
alias: "tag",
inside: {
value: {
pattern: /(^>\w+[\t ]+)(?!\s)[^{}\r\n]+/,
lookbehind: !0,
alias: "operator",
},
key: { pattern: /(^>)\w+/, lookbehind: !0 },
},
},
label: {
pattern: /^([\t ]*)#[\t ]*\w+[\t ]*$/m,
lookbehind: !0,
alias: "regex",
},
command: {
pattern: /^([\t ]*)@\w+(?=[\t ]|$).*/m,
lookbehind: !0,
alias: "function",
inside: {
"command-name": /^@\w+/,
expression: { pattern: t, greedy: !0, alias: "selector" },
"command-params": { pattern: /\s*\S[\s\S]*/, inside: i },
},
},
"generic-text": {
pattern: /(^[ \t]*)[^#@>;\s].*/m,
lookbehind: !0,
alias: "punctuation",
inside: {
"escaped-char": /\\[{}\[\]"]/,
expression: { pattern: t, greedy: !0, alias: "selector" },
"inline-command": {
pattern: /\[[\t ]*\w[^\r\n\[\]]*\]/,
greedy: !0,
alias: "function",
inside: {
"command-params": {
pattern: /(^\[[\t ]*\w+\b)[\s\S]+(?=\]$)/,
lookbehind: !0,
inside: i,
},
"command-param-name": {
pattern: /^(\[[\t ]*)\w+/,
lookbehind: !0,
alias: "name",
},
"start-stop-char": /[\[\]]/,
},
},
},
},
}),
(e.languages.nani = e.languages.naniscript),
e.hooks.add("after-tokenize", function (e) {
e.tokens.forEach(function (e) {
if ("string" != typeof e && "generic-text" === e.type) {
var t = (function e(t) {
return "string" == typeof t
? t
: Array.isArray(t)
? t.map(e).join("")
: e(t.content);
})(e);
!(function (e) {
for (var t = [], i = 0; i < e.length; i++) {
var r = e[i],
a = "[]{}".indexOf(r);
if (-1 !== a) {
if (a % 2 == 0) t.push(a + 1);
else if (t.pop() !== a) return !1;
}
}
return 0 === t.length;
})(t) && ((e.type = "bad-line"), (e.content = t));
}
});
});
}
(t.exports = r), (r.displayName = "naniscript"), (r.aliases = []);
};
export default moduleFactory;