meeting_memory/webui/dist/assets/xquery-CtB5kpfj.js

2 lines
4.3 KiB
JavaScript

import{g as p}from"./syntax-highlight-CQw1bBY6.js";function d(l,r){for(var i=0;i<r.length;i++){const o=r[i];if(typeof o!="string"&&!Array.isArray(o)){for(const e in o)if(e!=="default"&&!(e in l)){const n=Object.getOwnPropertyDescriptor(o,e);n&&Object.defineProperty(l,e,n.get?n:{enumerable:!0,get:()=>o[e]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}var c=u;u.displayName="xquery";u.aliases=[];function u(l){(function(r){r.languages.xquery=r.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:/[[\](){},;:/]/}),r.languages.xquery.tag.pattern=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,r.languages.xquery.tag.inside["attr-value"].pattern=/=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/,r.languages.xquery.tag.inside["attr-value"].inside.punctuation=/^="|"$/,r.languages.xquery.tag.inside["attr-value"].inside.expression={pattern:/\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}/,inside:r.languages.xquery,alias:"language-xquery"};var i=function(e){return typeof e=="string"?e:typeof e.content=="string"?e.content:e.content.map(i).join("")},o=function(e){for(var n=[],t=0;t<e.length;t++){var a=e[t],g=!1;if(typeof a!="string"&&(a.type==="tag"&&a.content[0]&&a.content[0].type==="tag"?a.content[0].content[0].content==="</"?n.length>0&&n[n.length-1].tagName===i(a.content[0].content[1])&&n.pop():a.content[a.content.length-1].content==="/>"||n.push({tagName:i(a.content[0].content[1]),openedBraces:0}):n.length>0&&a.type==="punctuation"&&a.content==="{"&&(!e[t+1]||e[t+1].type!=="punctuation"||e[t+1].content!=="{")&&(!e[t-1]||e[t-1].type!=="plain-text"||e[t-1].content!=="{")?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&a.type==="punctuation"&&a.content==="}"?n[n.length-1].openedBraces--:a.type!=="comment"&&(g=!0)),(g||typeof a=="string")&&n.length>0&&n[n.length-1].openedBraces===0){var s=i(a);t<e.length-1&&(typeof e[t+1]=="string"||e[t+1].type==="plain-text")&&(s+=i(e[t+1]),e.splice(t+1,1)),t>0&&(typeof e[t-1]=="string"||e[t-1].type==="plain-text")&&(s=i(e[t-1])+s,e.splice(t-1,1),t--),/^\s+$/.test(s)?e[t]=s:e[t]=new r.Token("plain-text",s,null,s)}a.content&&typeof a.content!="string"&&o(a.content)}};r.hooks.add("after-tokenize",function(e){e.language==="xquery"&&o(e.tokens)})})(l)}const y=p(c),b=d({__proto__:null,default:y},[c]);export{b as x};