meeting_memory/webui/dist/assets/naniscript-KbQ2pLfF.js

2 lines
2.3 KiB
JavaScript

import{g as m}from"./syntax-highlight-CQw1bBY6.js";function g(p,r){for(var n=0;n<r.length;n++){const a=r[n];if(typeof a!="string"&&!Array.isArray(a)){for(const i in a)if(i!=="default"&&!(i in p)){const o=Object.getOwnPropertyDescriptor(a,i);o&&Object.defineProperty(p,i,o.get?o:{enumerable:!0,get:()=>a[i]})}}}return Object.freeze(Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}))}var d=u;u.displayName="naniscript";u.aliases=[];function u(p){(function(r){var n=/\{[^\r\n\[\]{}]*\}/,a={"quoted-string":{pattern:/"(?:[^"\\]|\\.)*"/,alias:"operator"},"command-param-id":{pattern:/(\s)\w+:/,lookbehind:!0,alias:"property"},"command-param-value":[{pattern:n,alias:"selector"},{pattern:/([\t ])\S+/,lookbehind:!0,greedy:!0,alias:"operator"},{pattern:/\S(?:.*\S)?/,alias:"operator"}]};r.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:n,greedy:!0,alias:"selector"},"command-params":{pattern:/\s*\S[\s\S]*/,inside:a}}},"generic-text":{pattern:/(^[ \t]*)[^#@>;\s].*/m,lookbehind:!0,alias:"punctuation",inside:{"escaped-char":/\\[{}\[\]"]/,expression:{pattern:n,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:a},"command-param-name":{pattern:/^(\[[\t ]*)\w+/,lookbehind:!0,alias:"name"},"start-stop-char":/[\[\]]/}}}}},r.languages.nani=r.languages.naniscript,r.hooks.add("after-tokenize",function(e){var c=e.tokens;c.forEach(function(t){if(typeof t!="string"&&t.type==="generic-text"){var s=o(t);i(s)||(t.type="bad-line",t.content=s)}})});function i(e){for(var c="[]{}",t=[],s=0;s<e.length;s++){var f=e[s],l=c.indexOf(f);if(l!==-1){if(l%2===0)t.push(l+1);else if(t.pop()!==l)return!1}}return t.length===0}function o(e){return typeof e=="string"?e:Array.isArray(e)?e.map(o).join(""):o(e.content)}})(p)}const y=m(d),b=g({__proto__:null,default:y},[d]);export{b as n};