138 lines
6.2 KiB
JavaScript
138 lines
6.2 KiB
JavaScript
/*
|
|
* Extracted from browser-delivered Turbopack chunk: 939e07c76f4b30f0.294c1bf0d6.js
|
|
* Module id: 290329
|
|
* 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;
|
|
(e.languages.xquery = e.languages.extend("markup", {
|
|
"xquery-comment": {
|
|
pattern: /\(:[\s\S]*?:\)/,
|
|
greedy: !0,
|
|
alias: "comment",
|
|
},
|
|
string: { pattern: /(["'])(?:\1\1|(?!\1)[\s\S])*\1/, greedy: !0 },
|
|
extension: { pattern: /\(#.+?#\)/, alias: "symbol" },
|
|
variable: /\$[-\w:]+/,
|
|
axis: {
|
|
pattern:
|
|
/(^|[^-])(?:ancestor(?:-or-self)?|attribute|child|descendant(?:-or-self)?|following(?:-sibling)?|parent|preceding(?:-sibling)?|self)(?=::)/,
|
|
lookbehind: !0,
|
|
alias: "operator",
|
|
},
|
|
"keyword-operator": {
|
|
pattern:
|
|
/(^|[^:-])\b(?:and|castable as|div|eq|except|ge|gt|idiv|instance of|intersect|is|le|lt|mod|ne|or|union)\b(?=$|[^:-])/,
|
|
lookbehind: !0,
|
|
alias: "operator",
|
|
},
|
|
keyword: {
|
|
pattern:
|
|
/(^|[^:-])\b(?:as|ascending|at|base-uri|boundary-space|case|cast as|collation|construction|copy-namespaces|declare|default|descending|else|empty (?:greatest|least)|encoding|every|external|for|function|if|import|in|inherit|lax|let|map|module|namespace|no-inherit|no-preserve|option|order(?: by|ed|ing)?|preserve|return|satisfies|schema|some|stable|strict|strip|then|to|treat as|typeswitch|unordered|validate|variable|version|where|xquery)\b(?=$|[^:-])/,
|
|
lookbehind: !0,
|
|
},
|
|
function: /[\w-]+(?::[\w-]+)*(?=\s*\()/,
|
|
"xquery-element": {
|
|
pattern: /(element\s+)[\w-]+(?::[\w-]+)*/,
|
|
lookbehind: !0,
|
|
alias: "tag",
|
|
},
|
|
"xquery-attribute": {
|
|
pattern: /(attribute\s+)[\w-]+(?::[\w-]+)*/,
|
|
lookbehind: !0,
|
|
alias: "attr-name",
|
|
},
|
|
builtin: {
|
|
pattern:
|
|
/(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:ENTITIES|ENTITY|ID|IDREFS?|NCName|NMTOKENS?|NOTATION|Name|QName|anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|int|integer|language|long|negativeInteger|nonNegativeInteger|nonPositiveInteger|normalizedString|positiveInteger|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/,
|
|
lookbehind: !0,
|
|
},
|
|
number: /\b\d+(?:\.\d+)?(?:E[+-]?\d+)?/,
|
|
operator: [
|
|
/[+*=?|@]|\.\.?|:=|!=|<[=<]?|>[=>]?/,
|
|
{ pattern: /(\s)-(?=\s)/, lookbehind: !0 },
|
|
],
|
|
punctuation: /[[\](){},;:/]/,
|
|
})),
|
|
(e.languages.xquery.tag.pattern =
|
|
/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/),
|
|
(e.languages.xquery.tag.inside["attr-value"].pattern =
|
|
/=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/),
|
|
(e.languages.xquery.tag.inside["attr-value"].inside.punctuation =
|
|
/^="|"$/),
|
|
(e.languages.xquery.tag.inside["attr-value"].inside.expression = {
|
|
pattern: /\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}/,
|
|
inside: e.languages.xquery,
|
|
alias: "language-xquery",
|
|
}),
|
|
(t = function (e) {
|
|
return "string" == typeof e
|
|
? e
|
|
: "string" == typeof e.content
|
|
? e.content
|
|
: e.content.map(t).join("");
|
|
}),
|
|
(i = function (r) {
|
|
for (var a = [], n = 0; n < r.length; n++) {
|
|
var A = r[n],
|
|
s = !1;
|
|
if (
|
|
("string" != typeof A &&
|
|
("tag" === A.type && A.content[0] && "tag" === A.content[0].type
|
|
? "</" === A.content[0].content[0].content
|
|
? a.length > 0 &&
|
|
a[a.length - 1].tagName === t(A.content[0].content[1]) &&
|
|
a.pop()
|
|
: "/>" === A.content[A.content.length - 1].content ||
|
|
a.push({
|
|
tagName: t(A.content[0].content[1]),
|
|
openedBraces: 0,
|
|
})
|
|
: !(a.length > 0) ||
|
|
"punctuation" !== A.type ||
|
|
"{" !== A.content ||
|
|
(r[n + 1] &&
|
|
"punctuation" === r[n + 1].type &&
|
|
"{" === r[n + 1].content) ||
|
|
(r[n - 1] &&
|
|
"plain-text" === r[n - 1].type &&
|
|
"{" === r[n - 1].content)
|
|
? a.length > 0 &&
|
|
a[a.length - 1].openedBraces > 0 &&
|
|
"punctuation" === A.type &&
|
|
"}" === A.content
|
|
? a[a.length - 1].openedBraces--
|
|
: "comment" !== A.type && (s = !0)
|
|
: a[a.length - 1].openedBraces++),
|
|
(s || "string" == typeof A) &&
|
|
a.length > 0 &&
|
|
0 === a[a.length - 1].openedBraces)
|
|
) {
|
|
var o = t(A);
|
|
n < r.length - 1 &&
|
|
("string" == typeof r[n + 1] ||
|
|
"plain-text" === r[n + 1].type) &&
|
|
((o += t(r[n + 1])), r.splice(n + 1, 1)),
|
|
n > 0 &&
|
|
("string" == typeof r[n - 1] ||
|
|
"plain-text" === r[n - 1].type) &&
|
|
((o = t(r[n - 1]) + o), r.splice(n - 1, 1), n--),
|
|
/^\s+$/.test(o)
|
|
? (r[n] = o)
|
|
: (r[n] = new e.Token("plain-text", o, null, o));
|
|
}
|
|
A.content && "string" != typeof A.content && i(A.content);
|
|
}
|
|
}),
|
|
e.hooks.add("after-tokenize", function (e) {
|
|
"xquery" === e.language && i(e.tokens);
|
|
});
|
|
}
|
|
(t.exports = r), (r.displayName = "xquery"), (r.aliases = []);
|
|
};
|
|
|
|
export default moduleFactory;
|