@opengis/bi 1.2.10 → 1.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bi.js CHANGED
@@ -1,4 +1,4 @@
1
- import { k as o, R as t, U as V, V as e, s as i, v as P, n as d, q as g, l, r as n, p, o as B, t as E } from "./import-file-B5MQcuRd.js";
1
+ import { k as o, R as t, U as V, V as e, s as i, v as P, n as d, q as g, l, r as n, p, o as B, t as E } from "./import-file--MEHKIZN.js";
2
2
  import "vue";
3
3
  export {
4
4
  o as EditorRootPage,
package/dist/bi.umd.cjs CHANGED
@@ -246,7 +246,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),z=I,B=O),P===void 0&&(
246
246
  `,1;if(zu>1e5&&zu>ge.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ke+=Re,Re.length}const Se=T(I);if(!Se)throw co(i.replace("{}",I)),new Error('Unknown language: "'+I+'"');const Be=Rj(Se);let Ye="",de=B||Be;const ut={},je=new s.__emitter(s);ae();let ke="",ra=0,mr=0,zu=0,Ha=!1;try{if(Se.__emitTokens)Se.__emitTokens(O,je);else{for(de.matcher.considerAll();;){zu++,Ha?Ha=!1:de.matcher.considerAll(),de.matcher.lastIndex=mr;const ne=de.matcher.exec(O);if(!ne)break;const ge=O.substring(mr,ne.index),Re=ye(ge,ne);mr=ne.index+Re}ye(O.substring(mr))}return je.finalize(),Ye=je.toHTML(),{language:I,value:Ye,relevance:ra,illegal:!1,_emitter:je,_top:de}}catch(ne){if(ne.message&&ne.message.includes("Illegal"))return{language:I,value:v_(O),illegal:!0,relevance:0,_illegalBy:{message:ne.message,index:mr,context:O.slice(mr-100,mr+100),mode:ne.mode,resultSoFar:Ye},_emitter:je};if(a)return{language:I,value:v_(O),illegal:!1,relevance:0,errorRaised:ne,_emitter:je,_top:de};throw ne}}function h(I){const O={value:v_(I),illegal:!1,relevance:0,_top:o,_emitter:new s.__emitter(s)};return O._emitter.addText(I),O}function d(I,O){O=O||s.languages||Object.keys(e);const P=h(I),B=O.filter(T).filter(D).map(Z=>f(Z,I,!1));B.unshift(P);const z=B.sort((Z,ee)=>{if(Z.relevance!==ee.relevance)return ee.relevance-Z.relevance;if(Z.language&&ee.language){if(T(Z.language).supersetOf===ee.language)return 1;if(T(ee.language).supersetOf===Z.language)return-1}return 0}),[$,U]=z,j=$;return j.secondBest=U,j}function p(I,O,P){const B=O&&t[O]||P;I.classList.add("hljs"),I.classList.add(`language-${B}`)}function v(I){let O=null;const P=u(I);if(l(P))return;if(L("before:highlightElement",{el:I,language:P}),I.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",I);return}if(I.children.length>0&&(s.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(I)),s.throwUnescapedHTML))throw new Bj("One of your code blocks includes unescaped HTML.",I.innerHTML);O=I;const B=O.textContent,z=P?c(B,{language:P,ignoreIllegals:!0}):d(B);I.innerHTML=z.value,I.dataset.highlighted="yes",p(I,P,z.language),I.result={language:z.language,re:z.relevance,relevance:z.relevance},z.secondBest&&(I.secondBest={language:z.secondBest.language,relevance:z.secondBest.relevance}),L("after:highlightElement",{el:I,result:z,text:B})}function g(I){s=a2(s,I)}const m=()=>{x(),As("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function y(){x(),As("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let _=!1;function x(){function I(){x()}if(document.readyState==="loading"){_||window.addEventListener("DOMContentLoaded",I,!1),_=!0;return}document.querySelectorAll(s.cssSelector).forEach(v)}function w(I,O){let P=null;try{P=O(r)}catch(B){if(co("Language definition for '{}' could not be registered.".replace("{}",I)),a)co(B);else throw B;P=o}P.name||(P.name=I),e[I]=P,P.rawDefinition=O.bind(null,r),P.aliases&&C(P.aliases,{languageName:I})}function S(I){delete e[I];for(const O of Object.keys(t))t[O]===I&&delete t[O]}function E(){return Object.keys(e)}function T(I){return I=(I||"").toLowerCase(),e[I]||e[t[I]]}function C(I,{languageName:O}){typeof I=="string"&&(I=[I]),I.forEach(P=>{t[P.toLowerCase()]=O})}function D(I){const O=T(I);return O&&!O.disableAutodetect}function M(I){I["before:highlightBlock"]&&!I["before:highlightElement"]&&(I["before:highlightElement"]=O=>{I["before:highlightBlock"](Object.assign({block:O.el},O))}),I["after:highlightBlock"]&&!I["after:highlightElement"]&&(I["after:highlightElement"]=O=>{I["after:highlightBlock"](Object.assign({block:O.el},O))})}function k(I){M(I),n.push(I)}function N(I){const O=n.indexOf(I);O!==-1&&n.splice(O,1)}function L(I,O){const P=I;n.forEach(function(B){B[P]&&B[P](O)})}function R(I){return As("10.7.0","highlightBlock will be removed entirely in v12.0"),As("10.7.0","Please use highlightElement now."),v(I)}Object.assign(r,{highlight:c,highlightAuto:d,highlightAll:x,highlightElement:v,highlightBlock:R,configure:g,initHighlighting:m,initHighlightingOnLoad:y,registerLanguage:w,unregisterLanguage:S,listLanguages:E,getLanguage:T,registerAliases:C,autoDetection:D,inherit:a2,addPlugin:k,removePlugin:N}),r.debugMode=function(){a=!1},r.safeMode=function(){a=!0},r.versionString=Pj,r.regex={concat:uo,lookahead:ZL,either:h_,optional:JQ,anyNumberOfTimes:jQ};for(const I in hd)typeof hd[I]=="object"&&GL(hd[I]);return Object.assign(r,hd),r},Ms=o2({});Ms.newInstance=()=>o2({});var s2=Ms;Ms.HighlightJS=Ms,Ms.default=Ms;const g_=ZQ(s2);var m_,l2;function zj(){if(l2)return m_;l2=1;function r(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),a=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},s=e.inherit(o,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),u=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:a,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,u,l,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,s,u,l]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[u]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:c}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}return m_=r,m_}var y_,u2;function Fj(){if(u2)return y_;u2=1;function r(e){const t=e.regex,n={},a={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},a]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),s={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},l={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(l);const u={match:/\\"/},c={className:"string",begin:/'/,end:/'/},f={match:/\\'/},h={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},d=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=e.SHEBANG({binary:`(${d.join("|")})`,relevance:10}),v={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},g=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],m=["true","false"],y={match:/(\/[a-z._-]+)+/},_=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],x=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],w=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],S=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:g,literal:m,built_in:[..._,...x,"set","shopt",...w,...S]},contains:[p,e.SHEBANG(),v,h,o,s,y,l,u,c,f,n]}}return y_=r,y_}var __,c2;function $j(){if(c2)return __;c2=1;function r(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",s="("+a+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},f={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},p=t.optional(i)+e.IDENT_RE+"\\s*\\(",m={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},y=[h,l,n,e.C_BLOCK_COMMENT_MODE,f,c],_={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:m,contains:y.concat([{begin:/\(/,end:/\)/,keywords:m,contains:y.concat(["self"]),relevance:0}]),relevance:0},x={begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:m,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:m,relevance:0},{begin:p,returnBegin:!0,contains:[e.inherit(d,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,f,l,{begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,f,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C",aliases:["h"],keywords:m,disableAutodetect:!0,illegal:"</",contains:[].concat(_,x,y,[h,{begin:e.IDENT_RE+"::",keywords:m},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:h,strings:c,keywords:m}}}return __=r,__}var b_,f2;function Gj(){if(f2)return b_;f2=1;function r(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",s="(?!struct)("+a+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},f={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},p=t.optional(i)+e.IDENT_RE+"\\s*\\(",v=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],g=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],m=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],w={type:g,keyword:v,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:m},S={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},E=[S,h,l,n,e.C_BLOCK_COMMENT_MODE,f,c],T={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:w,contains:E.concat([{begin:/\(/,end:/\)/,keywords:w,contains:E.concat(["self"]),relevance:0}]),relevance:0},C={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:w,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:w,relevance:0},{begin:p,returnBegin:!0,contains:[d],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,f]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,f,l,{begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,f,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:w,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(T,C,S,E,[h,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:w,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:w},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return b_=r,b_}var x_,h2;function Hj(){if(h2)return x_;h2=1;function r(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],a=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],o=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],s={keyword:i.concat(o),built_in:t,literal:a},l=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),u={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},f={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},h=e.inherit(f,{illegal:/\n/}),d={className:"subst",begin:/\{/,end:/\}/,keywords:s},p=e.inherit(d,{illegal:/\n/}),v={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,p]},g={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},d]},m=e.inherit(g,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});d.contains=[g,v,f,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,e.C_BLOCK_COMMENT_MODE],p.contains=[m,v,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const y={variants:[c,g,v,f,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},_={begin:"<",end:">",contains:[{beginKeywords:"in out"},l]},x=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",w={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:s,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},y,u,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},l,_,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,_,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+x+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:s,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,_],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,relevance:0,contains:[y,u,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},w]}}return x_=r,x_}var w_,d2;function Uj(){if(d2)return w_;d2=1;const r=u=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:u.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[u.APOS_STRING_MODE,u.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:u.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],t=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],n=[...e,...t],a=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),o=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),s=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function l(u){const c=u.regex,f=r(u),h={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},d="and or not only",p=/@-?\w[\w]*(-\w+)*/,v="[a-zA-Z-][a-zA-Z0-9_-]*",g=[u.APOS_STRING_MODE,u.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[f.BLOCK_COMMENT,h,f.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+v,relevance:0},f.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+i.join("|")+")"},{begin:":(:)?("+o.join("|")+")"}]},f.CSS_VARIABLE,{className:"attribute",begin:"\\b("+s.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[f.BLOCK_COMMENT,f.HEXCOLOR,f.IMPORTANT,f.CSS_NUMBER_MODE,...g,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...g,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},f.FUNCTION_DISPATCH]},{begin:c.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:p},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:d,attribute:a.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...g,f.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+n.join("|")+")\\b"}]}}return w_=l,w_}var S_,p2;function Wj(){if(p2)return S_;p2=1;function r(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},a={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},s={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},l=/[A-Za-z][A-Za-z0-9+.-]*/,u={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,l,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},c={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},f={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},h=e.inherit(c,{contains:[]}),d=e.inherit(f,{contains:[]});c.contains.push(d),f.contains.push(h);let p=[n,u];return[c,f,h,d].forEach(y=>{y.contains=y.contains.concat(p)}),p=p.concat(c,f),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},n,o,c,f,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},i,a,u,s,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return S_=r,S_}var E_,v2;function Yj(){if(v2)return E_;v2=1;function r(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}return E_=r,E_}var T_,g2;function Zj(){if(g2)return T_;g2=1;function r(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",a=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(a,/(::\w+)*/),s={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},l={className:"doctag",begin:"@[A-Za-z]+"},u={begin:"#<",end:">"},c=[e.COMMENT("#","$",{contains:[l]}),e.COMMENT("^=begin","^=end",{contains:[l],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],f={className:"subst",begin:/#\{/,end:/\}/,keywords:s},h={className:"string",contains:[e.BACKSLASH_ESCAPE,f],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,f]})]}]},d="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",v={className:"number",relevance:0,variants:[{begin:`\\b(${d})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},g={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:s}]},E=[h,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:s},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:s},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[g]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[h,{begin:n}],relevance:0},v,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:s},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,f],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(u,c),relevance:0}].concat(u,c);f.contains=E,g.contains=E;const M=[{begin:/^\s*=>/,starts:{end:"$",contains:E}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:s,contains:E}}];return c.unshift(u),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:s,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(M).concat(c).concat(E)}}return T_=r,T_}var C_,m2;function qj(){if(m2)return C_;m2=1;function r(e){const o={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:o,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:o,illegal:/["']/}]}]}}return C_=r,C_}var D_,y2;function Xj(){if(y2)return D_;y2=1;function r(e){const t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}return D_=r,D_}var A_,_2;function Kj(){if(_2)return A_;_2=1;function r(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},a=e.COMMENT();a.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},s={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},l={begin:/\[/,end:/\]/,contains:[a,o,i,s,n,"self"],relevance:0},u=/[A-Za-z0-9_-]+/,c=/"(\\"|[^"])*"/,f=/'[^']*'/,h=t.either(u,c,f),d=t.concat(h,"(\\s*\\.\\s*",h,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[a,{className:"section",begin:/\[+/,end:/\]+/},{begin:d,className:"attr",starts:{end:/$/,contains:[a,l,o,i,s,n]}}]}}return A_=r,A_}var M_,b2;function Qj(){if(b2)return M_;b2=1;var r="[0-9](_*[0-9])*",e=`\\.(${r})`,t="[0-9a-fA-F](_*[0-9a-fA-F])*",n={className:"number",variants:[{begin:`(\\b(${r})((${e})|\\.)?|(${e}))[eE][+-]?(${r})[fFdD]?\\b`},{begin:`\\b(${r})((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${e})[fFdD]?\\b`},{begin:`\\b(${r})[fFdD]\\b`},{begin:`\\b0[xX]((${t})\\.?|(${t})?\\.(${t}))[pP][+-]?(${r})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${t})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function a(o,s,l){return l===-1?"":o.replace(s,u=>a(o,s,l-1))}function i(o){const s=o.regex,l="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",u=l+a("(?:<"+l+"~~~(?:\\s*,\\s*"+l+"~~~)*>)?",/~~~/g,2),p={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},v={className:"meta",begin:"@"+l,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},g={className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[o.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:p,illegal:/<\/|#/,contains:[o.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},o.C_LINE_COMMENT_MODE,o.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[o.BACKSLASH_ESCAPE]},o.APOS_STRING_MODE,o.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,l],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[s.concat(/(?!else)/,l),/\s+/,l,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,l],className:{1:"keyword",3:"title.class"},contains:[g,o.C_LINE_COMMENT_MODE,o.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+u+"\\s+)",o.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:p,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[v,o.APOS_STRING_MODE,o.QUOTE_STRING_MODE,n,o.C_BLOCK_COMMENT_MODE]},o.C_LINE_COMMENT_MODE,o.C_BLOCK_COMMENT_MODE]},n,v]}}return M_=i,M_}var k_,x2;function jj(){if(x2)return k_;x2=1;const r="[A-Za-z$_][0-9A-Za-z$_]*",e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],t=["true","false","null","undefined","NaN","Infinity"],n=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],a=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],o=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],s=[].concat(i,n,a);function l(u){const c=u.regex,f=(Ee,{after:re})=>{const J="</"+Ee[0].slice(1);return Ee.input.indexOf(J,re)!==-1},h=r,d={begin:"<>",end:"</>"},p=/<[A-Za-z0-9\\._:-]+\s*\/>/,v={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Ee,re)=>{const J=Ee[0].length+Ee.index,ue=Ee.input[J];if(ue==="<"||ue===","){re.ignoreMatch();return}ue===">"&&(f(Ee,{after:J})||re.ignoreMatch());let q;const ae=Ee.input.substring(J);if(q=ae.match(/^\s*=/)){re.ignoreMatch();return}if((q=ae.match(/^\s+extends\s+/))&&q.index===0){re.ignoreMatch();return}}},g={$pattern:r,keyword:e,literal:t,built_in:s,"variable.language":o},m="[0-9](_?[0-9])*",y=`\\.(${m})`,_="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",x={className:"number",variants:[{begin:`(\\b(${_})((${y})|\\.)?|(${y}))[eE][+-]?(${m})\\b`},{begin:`\\b(${_})\\b((${y})\\b|\\.)?|(${y})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},w={className:"subst",begin:"\\$\\{",end:"\\}",keywords:g,contains:[]},S={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[u.BACKSLASH_ESCAPE,w],subLanguage:"xml"}},E={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[u.BACKSLASH_ESCAPE,w],subLanguage:"css"}},T={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[u.BACKSLASH_ESCAPE,w],subLanguage:"graphql"}},C={className:"string",begin:"`",end:"`",contains:[u.BACKSLASH_ESCAPE,w]},M={className:"comment",variants:[u.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:h+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),u.C_BLOCK_COMMENT_MODE,u.C_LINE_COMMENT_MODE]},k=[u.APOS_STRING_MODE,u.QUOTE_STRING_MODE,S,E,T,C,{match:/\$\d+/},x];w.contains=k.concat({begin:/\{/,end:/\}/,keywords:g,contains:["self"].concat(k)});const N=[].concat(M,w.contains),L=N.concat([{begin:/(\s*)\(/,end:/\)/,keywords:g,contains:["self"].concat(N)}]),R={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:g,contains:L},I={variants:[{match:[/class/,/\s+/,h,/\s+/,/extends/,/\s+/,c.concat(h,"(",c.concat(/\./,h),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,h],scope:{1:"keyword",3:"title.class"}}]},O={relevance:0,match:c.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...n,...a]}},P={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},B={variants:[{match:[/function/,/\s+/,h,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[R],illegal:/%/},z={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function $(Ee){return c.concat("(?!",Ee.join("|"),")")}const U={match:c.concat(/\b/,$([...i,"super","import"].map(Ee=>`${Ee}\\s*\\(`)),h,c.lookahead(/\s*\(/)),className:"title.function",relevance:0},j={begin:c.concat(/\./,c.lookahead(c.concat(h,/(?![0-9A-Za-z$_(])/))),end:h,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Z={match:[/get|set/,/\s+/,h,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},R]},ee="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+u.UNDERSCORE_IDENT_RE+")\\s*=>",he={match:[/const|var|let/,/\s+/,h,/\s*/,/=\s*/,/(async\s*)?/,c.lookahead(ee)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[R]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:g,exports:{PARAMS_CONTAINS:L,CLASS_REFERENCE:O},illegal:/#(?![$_A-z])/,contains:[u.SHEBANG({label:"shebang",binary:"node",relevance:5}),P,u.APOS_STRING_MODE,u.QUOTE_STRING_MODE,S,E,T,C,M,{match:/\$\d+/},x,O,{scope:"attr",match:h+c.lookahead(":"),relevance:0},he,{begin:"("+u.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[M,u.REGEXP_MODE,{className:"function",begin:ee,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:u.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:g,contains:L}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:d.begin,end:d.end},{match:p},{begin:v.begin,"on:begin":v.isTrulyOpeningTag,end:v.end}],subLanguage:"xml",contains:[{begin:v.begin,end:v.end,skip:!0,contains:["self"]}]}]},B,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+u.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[R,u.inherit(u.TITLE_MODE,{begin:h,className:"title.function"})]},{match:/\.\.\./,relevance:0},j,{match:"\\$"+h,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[R]},U,z,I,Z,{match:/\$[(.]/}]}}return k_=l,k_}var N_,w2;function Jj(){if(w2)return N_;w2=1;function r(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},a=["true","false","null"],i={scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:a},contains:[t,n,e.QUOTE_STRING_MODE,i,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}return N_=r,N_}var I_,S2;function eJ(){if(S2)return I_;S2=1;var r="[0-9](_*[0-9])*",e=`\\.(${r})`,t="[0-9a-fA-F](_*[0-9a-fA-F])*",n={className:"number",variants:[{begin:`(\\b(${r})((${e})|\\.)?|(${e}))[eE][+-]?(${r})[fFdD]?\\b`},{begin:`\\b(${r})((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${e})[fFdD]?\\b`},{begin:`\\b(${r})[fFdD]\\b`},{begin:`\\b0[xX]((${t})\\.?|(${t})?\\.(${t}))[pP][+-]?(${r})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${t})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function a(i){const o={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},s={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},l={className:"symbol",begin:i.UNDERSCORE_IDENT_RE+"@"},u={className:"subst",begin:/\$\{/,end:/\}/,contains:[i.C_NUMBER_MODE]},c={className:"variable",begin:"\\$"+i.UNDERSCORE_IDENT_RE},f={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[c,u]},{begin:"'",end:"'",illegal:/\n/,contains:[i.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[i.BACKSLASH_ESCAPE,c,u]}]};u.contains.push(f);const h={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+i.UNDERSCORE_IDENT_RE+")?"},d={className:"meta",begin:"@"+i.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[i.inherit(f,{className:"string"}),"self"]}]},p=n,v=i.COMMENT("/\\*","\\*/",{contains:[i.C_BLOCK_COMMENT_MODE]}),g={variants:[{className:"type",begin:i.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},m=g;return m.variants[1].contains=[g],g.variants[1].contains=[m],{name:"Kotlin",aliases:["kt","kts"],keywords:o,contains:[i.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),i.C_LINE_COMMENT_MODE,v,s,l,h,d,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:o,relevance:5,contains:[{begin:i.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[i.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:o,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[g,i.C_LINE_COMMENT_MODE,v],relevance:0},i.C_LINE_COMMENT_MODE,v,h,d,f,i.C_NUMBER_MODE]},v]},{begin:[/class|interface|trait/,/\s+/,i.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},i.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},h,d]},f,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
247
247
  `},p]}}return I_=a,I_}var L_,E2;function tJ(){if(E2)return L_;E2=1;const r=c=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:c.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:c.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],t=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],n=[...e,...t],a=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),o=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),s=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),l=i.concat(o).sort().reverse();function u(c){const f=r(c),h=l,d="and or not only",p="[\\w-]+",v="("+p+"|@\\{"+p+"\\})",g=[],m=[],y=function(N){return{className:"string",begin:"~?"+N+".*?"+N}},_=function(N,L,R){return{className:N,begin:L,relevance:R}},x={$pattern:/[a-z-]+/,keyword:d,attribute:a.join(" ")},w={begin:"\\(",end:"\\)",contains:m,keywords:x,relevance:0};m.push(c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,y("'"),y('"'),f.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},f.HEXCOLOR,w,_("variable","@@?"+p,10),_("variable","@\\{"+p+"\\}"),_("built_in","~?`[^`]*?`"),{className:"attribute",begin:p+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},f.IMPORTANT,{beginKeywords:"and not"},f.FUNCTION_DISPATCH);const S=m.concat({begin:/\{/,end:/\}/,contains:g}),E={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(m)},T={begin:v+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},f.CSS_VARIABLE,{className:"attribute",begin:"\\b("+s.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:m}}]},C={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:x,returnEnd:!0,contains:m,relevance:0}},D={className:"variable",variants:[{begin:"@"+p+"\\s*:",relevance:15},{begin:"@"+p}],starts:{end:"[;}]",returnEnd:!0,contains:S}},M={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:v,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,E,_("keyword","all\\b"),_("variable","@\\{"+p+"\\}"),{begin:"\\b("+n.join("|")+")\\b",className:"selector-tag"},f.CSS_NUMBER_MODE,_("selector-tag",v,0),_("selector-id","#"+v),_("selector-class","\\."+v,0),_("selector-tag","&",0),f.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+o.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:S},{begin:"!important"},f.FUNCTION_DISPATCH]},k={begin:p+`:(:)?(${h.join("|")})`,returnBegin:!0,contains:[M]};return g.push(c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,C,D,k,T,M,E,f.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:g}}return L_=u,L_}var R_,T2;function rJ(){if(T2)return R_;T2=1;function r(e){const t="\\[=*\\[",n="\\]=*\\]",a={begin:t,end:n,contains:["self"]},i=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[a],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[a],relevance:5}])}}return R_=r,R_}var O_,C2;function nJ(){if(C2)return O_;C2=1;function r(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},a={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},i={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},s={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,a,i,o,s]}}return O_=r,O_}var P_,D2;function aJ(){if(D2)return P_;D2=1;function r(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],a=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},s={begin:/->\{/,end:/\}/},l={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},u={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[l]},c={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},f=[e.BACKSLASH_ESCAPE,o,u],h=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],d=(g,m,y="\\1")=>{const _=y==="\\1"?y:t.concat(y,m);return t.concat(t.concat("(?:",g,")"),m,/(?:\\.|[^\\\/])*?/,_,/(?:\\.|[^\\\/])*?/,y,a)},p=(g,m,y)=>t.concat(t.concat("(?:",g,")"),m,/(?:\\.|[^\\\/])*?/,y,a),v=[u,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),s,{className:"string",contains:f,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},c,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:d("s|tr|y",t.either(...h,{capture:!0}))},{begin:d("s|tr|y","\\(","\\)")},{begin:d("s|tr|y","\\[","\\]")},{begin:d("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",t.either(...h,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l,c]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=v,s.contains=v,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:v}}return P_=r,P_}var B_,A2;function iJ(){if(A2)return B_;A2=1;function r(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,l={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},u={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:l,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+u.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:u,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}return B_=r,B_}var V_,M2;function oJ(){if(M2)return V_;M2=1;function r(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,a=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o=t.concat(/[A-Z]+/,n),s={scope:"variable",match:"\\$+"+a},l={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},u={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},c=e.inherit(e.APOS_STRING_MODE,{illegal:null}),f=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(u)}),h={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(u),"on:begin":(R,I)=>{I.data._beginMatch=R[1]||R[2]},"on:end":(R,I)=>{I.data._beginMatch!==R[1]&&I.ignoreMatch()}},d=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[
248
248
  ]`,v={scope:"string",variants:[f,c,h,d]},g={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},m=["false","null","true"],y=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],_=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],w={keyword:y,literal:(R=>{const I=[];return R.forEach(O=>{I.push(O),O.toLowerCase()===O?I.push(O.toUpperCase()):I.push(O.toLowerCase())}),I})(m),built_in:_},S=R=>R.map(I=>I.replace(/\|\d+$/,"")),E={variants:[{match:[/new/,t.concat(p,"+"),t.concat("(?!",S(_).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},T=t.concat(a,"\\b(?!\\()"),C={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),T],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),T],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},D={scope:"attr",match:t.concat(a,t.lookahead(":"),t.lookahead(/(?!::)/))},M={relevance:0,begin:/\(/,end:/\)/,keywords:w,contains:[D,s,C,e.C_BLOCK_COMMENT_MODE,v,g,E]},k={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",S(y).join("\\b|"),"|",S(_).join("\\b|"),"\\b)"),a,t.concat(p,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[M]};M.contains.push(k);const N=[D,C,e.C_BLOCK_COMMENT_MODE,v,g,E],L={begin:t.concat(/#\[\s*\\?/,t.either(i,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:m,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:m,keyword:["new","array"]},contains:["self",...N]},...N,{scope:"meta",variants:[{match:i},{match:o}]}]};return{case_insensitive:!1,keywords:w,contains:[L,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},l,{scope:"variable.language",match:/\$this\b/},s,k,C,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},E,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:w,contains:["self",L,s,C,e.C_BLOCK_COMMENT_MODE,v,g]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},v,g]}}return V_=r,V_}var z_,k2;function sJ(){if(k2)return z_;k2=1;function r(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}return z_=r,z_}var F_,N2;function lJ(){if(N2)return F_;N2=1;function r(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return F_=r,F_}var $_,I2;function uJ(){if(I2)return $_;I2=1;function r(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),a=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],l={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:a,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},u={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:l,illegal:/#/},f={begin:/\{\{/,relevance:0},h={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,u],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,u],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,u,f,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,u,f,c]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,f,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,f,c]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},d="[0-9](_?[0-9])*",p=`(\\b(${d}))?\\.(${d})|\\b(${d})\\.`,v=`\\b|${a.join("|")}`,g={className:"number",relevance:0,variants:[{begin:`(\\b(${d})|(${p}))[eE][+-]?(${d})[jJ]?(?=${v})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${v})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${v})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${v})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${v})`},{begin:`\\b(${d})[jJ](?=${v})`}]},m={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:l,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},y={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:["self",u,g,h,e.HASH_COMMENT_MODE]}]};return c.contains=[h,g,u],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:l,illegal:/(<\/|\?)|=>/,contains:[u,g,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},h,m,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[y]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[g,y,h]}]}}return $_=r,$_}var G_,L2;function cJ(){if(L2)return G_;L2=1;function r(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return G_=r,G_}var H_,R2;function fJ(){if(R2)return H_;R2=1;function r(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,a=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,a]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,a]},{scope:{1:"punctuation",2:"number"},match:[o,a]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,a]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}return H_=r,H_}var U_,O2;function hJ(){if(O2)return U_;O2=1;function r(e){const t=e.regex,n=/(r#)?/,a=t.concat(n,e.UNDERSCORE_IDENT_RE),i=t.concat(n,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,t.lookahead(/\s*\(/))},s="([ui](8|16|32|64|128|size)|f(32|64))?",l=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],u=["true","false","Some","None","Ok","Err"],c=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],f=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:f,keyword:l,literal:u,built_in:c},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+s},{begin:"\\b0o([0-7_]+)"+s},{begin:"\\b0x([A-Fa-f0-9_]+)"+s},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+s}],relevance:0},{begin:[/fn/,/\s+/,a],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,a],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,a,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:c,type:f}},{className:"punctuation",begin:"->"},o]}}return U_=r,U_}var W_,P2;function dJ(){if(P2)return W_;P2=1;const r=u=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:u.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[u.APOS_STRING_MODE,u.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:u.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],t=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],n=[...e,...t],a=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),o=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),s=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function l(u){const c=r(u),f=o,h=i,d="@[a-z-]+",p="and or not only",g={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[u.C_LINE_COMMENT_MODE,u.C_BLOCK_COMMENT_MODE,c.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},c.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+n.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+h.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+f.join("|")+")"},g,{begin:/\(/,end:/\)/,contains:[c.CSS_NUMBER_MODE]},c.CSS_VARIABLE,{className:"attribute",begin:"\\b("+s.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[c.BLOCK_COMMENT,g,c.HEXCOLOR,c.CSS_NUMBER_MODE,u.QUOTE_STRING_MODE,u.APOS_STRING_MODE,c.IMPORTANT,c.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:d,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:p,attribute:a.join(" ")},contains:[{begin:d,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},g,u.QUOTE_STRING_MODE,u.APOS_STRING_MODE,c.HEXCOLOR,c.CSS_NUMBER_MODE]},c.FUNCTION_DISPATCH]}}return W_=l,W_}var Y_,B2;function pJ(){if(B2)return Y_;B2=1;function r(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}return Y_=r,Y_}var Z_,V2;function vJ(){if(V2)return Z_;V2=1;function r(e){const t=e.regex,n=e.COMMENT("--","$"),a={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],s=["double precision","large object","with timezone","without timezone"],l=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],u=["add","asc","collation","desc","final","first","last","view"],c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],f=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],h=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],d=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=f,v=[...c,...u].filter(S=>!f.includes(S)),g={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},m={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},y={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function _(S){return t.concat(/\b/,t.either(...S.map(E=>E.replace(/\s+/,"\\s+"))),/\b/)}const x={scope:"keyword",match:_(d),relevance:0};function w(S,{exceptions:E,when:T}={}){const C=T;return E=E||[],S.map(D=>D.match(/\|\d+$/)||E.includes(D)?D:C(D)?`${D}|0`:D)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:w(v,{when:S=>S.length<3}),literal:o,type:l,built_in:h},contains:[{scope:"type",match:_(s)},x,y,g,a,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,m]}}return Z_=r,Z_}var q_,z2;function gJ(){if(z2)return q_;z2=1;function r(T){return T?typeof T=="string"?T:T.source:null}function e(T){return t("(?=",T,")")}function t(...T){return T.map(D=>r(D)).join("")}function n(T){const C=T[T.length-1];return typeof C=="object"&&C.constructor===Object?(T.splice(T.length-1,1),C):{}}function a(...T){return"("+(n(T).capture?"":"?:")+T.map(M=>r(M)).join("|")+")"}const i=T=>t(/\b/,T,/\w$/.test(T)?/\b/:/\B/),o=["Protocol","Type"].map(i),s=["init","self"].map(i),l=["Any","Self"],u=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],c=["false","nil","true"],f=["assignment","associativity","higherThan","left","lowerThan","none","right"],h=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],d=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],p=a(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),v=a(p,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),g=t(p,v,"*"),m=a(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),y=a(m,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),_=t(m,y,"*"),x=t(/[A-Z]/,y,"*"),w=["attached","autoclosure",t(/convention\(/,a("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",t(/objc\(/,_,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],S=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function E(T){const C={match:/\s+/,relevance:0},D=T.COMMENT("/\\*","\\*/",{contains:["self"]}),M=[T.C_LINE_COMMENT_MODE,D],k={match:[/\./,a(...o,...s)],className:{2:"keyword"}},N={match:t(/\./,a(...u)),relevance:0},L=u.filter(it=>typeof it=="string").concat(["_|0"]),R=u.filter(it=>typeof it!="string").concat(l).map(i),I={variants:[{className:"keyword",match:a(...R,...s)}]},O={$pattern:a(/\b\w+/,/#\w+/),keyword:L.concat(h),literal:c},P=[k,N,I],B={match:t(/\./,a(...d)),relevance:0},z={className:"built_in",match:t(/\b/,a(...d),/(?=\()/)},$=[B,z],U={match:/->/,relevance:0},j={className:"operator",relevance:0,variants:[{match:g},{match:`\\.(\\.|${v})+`}]},Z=[U,j],ee="([0-9]_*)+",he="([0-9a-fA-F]_*)+",Ee={className:"number",relevance:0,variants:[{match:`\\b(${ee})(\\.(${ee}))?([eE][+-]?(${ee}))?\\b`},{match:`\\b0x(${he})(\\.(${he}))?([pP][+-]?(${ee}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},re=(it="")=>({className:"subst",variants:[{match:t(/\\/,it,/[0\\tnr"']/)},{match:t(/\\/,it,/u\{[0-9a-fA-F]{1,8}\}/)}]}),J=(it="")=>({className:"subst",match:t(/\\/,it,/[\t ]*(?:[\r\n]|\r\n)/)}),ue=(it="")=>({className:"subst",label:"interpol",begin:t(/\\/,it,/\(/),end:/\)/}),q=(it="")=>({begin:t(it,/"""/),end:t(/"""/,it),contains:[re(it),J(it),ue(it)]}),ae=(it="")=>({begin:t(it,/"/),end:t(/"/,it),contains:[re(it),ue(it)]}),Y={className:"string",variants:[q(),q("#"),q("##"),q("###"),ae(),ae("#"),ae("##"),ae("###")]},ye=[T.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[T.BACKSLASH_ESCAPE]}],Se={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:ye},Be=it=>{const md=t(it,/\//),Fu=t(/\//,it);return{begin:md,end:Fu,contains:[...ye,{scope:"comment",begin:`#(?!.*${Fu})`,end:/$/}]}},Ye={scope:"regexp",variants:[Be("###"),Be("##"),Be("#"),Se]},de={match:t(/`/,_,/`/)},ut={className:"variable",match:/\$\d+/},je={className:"variable",match:`\\$${y}+`},ke=[de,ut,je],ra={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:S,contains:[...Z,Ee,Y]}]}},mr={scope:"keyword",match:t(/@/,a(...w),e(a(/\(/,/\s+/)))},zu={scope:"meta",match:t(/@/,_)},Ha=[ra,mr,zu],ne={match:e(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:t(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,y,"+")},{className:"type",match:x,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:t(/\s+&\s+/,e(x)),relevance:0}]},ge={begin:/</,end:/>/,keywords:O,contains:[...M,...P,...Ha,U,ne]};ne.contains.push(ge);const Re={match:t(_,/\s*:/),keywords:"_|0",relevance:0},Ue={begin:/\(/,end:/\)/,relevance:0,keywords:O,contains:["self",Re,...M,Ye,...P,...$,...Z,Ee,Y,...ke,...Ha,ne]},xt={begin:/</,end:/>/,keywords:"repeat each",contains:[...M,ne]},on={begin:a(e(t(_,/\s*:/)),e(t(_,/\s+/,_,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:_}]},gd={begin:/\(/,end:/\)/,keywords:O,contains:[on,...M,...P,...Z,Ee,Y,...Ha,ne,Ue],endsParent:!0,illegal:/["']/},nb={match:[/(func|macro)/,/\s+/,a(de.match,_,g)],className:{1:"keyword",3:"title.function"},contains:[xt,gd,C],illegal:[/\[/,/%/]},One={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[xt,gd,C],illegal:/\[|%/},Pne={match:[/operator/,/\s+/,g],className:{1:"keyword",3:"title"}},Bne={begin:[/precedencegroup/,/\s+/,x],className:{1:"keyword",3:"title"},contains:[ne],keywords:[...f,...c],end:/}/},Vne={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},zne={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Fne={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,_,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:O,contains:[xt,...P,{begin:/:/,end:/\{/,keywords:O,contains:[{scope:"title.class.inherited",match:x},...P],relevance:0}]};for(const it of Y.variants){const md=it.contains.find($ne=>$ne.label==="interpol");md.keywords=O;const Fu=[...P,...$,...Z,Ee,Y,...ke];md.contains=[...Fu,{begin:/\(/,end:/\)/,contains:["self",...Fu]}]}return{name:"Swift",keywords:O,contains:[...M,nb,One,Vne,zne,Fne,Pne,Bne,{beginKeywords:"import",end:/$/,contains:[...M],relevance:0},Ye,...P,...$,...Z,Ee,Y,...ke,...Ha,ne,Ue]}}return q_=E,q_}var X_,F2;function mJ(){if(F2)return X_;F2=1;function r(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",a={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},s={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},l=e.inherit(s,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),d={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},v={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},g={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},m=[a,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},d,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},v,g,o,s],y=[...m];return y.pop(),y.push(l),p.contains=y,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:m}}return X_=r,X_}var K_,$2;function yJ(){if($2)return K_;$2=1;const r="[A-Za-z$_][0-9A-Za-z$_]*",e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],t=["true","false","null","undefined","NaN","Infinity"],n=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],a=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],o=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],s=[].concat(i,n,a);function l(c){const f=c.regex,h=(re,{after:J})=>{const ue="</"+re[0].slice(1);return re.input.indexOf(ue,J)!==-1},d=r,p={begin:"<>",end:"</>"},v=/<[A-Za-z0-9\\._:-]+\s*\/>/,g={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(re,J)=>{const ue=re[0].length+re.index,q=re.input[ue];if(q==="<"||q===","){J.ignoreMatch();return}q===">"&&(h(re,{after:ue})||J.ignoreMatch());let ae;const Y=re.input.substring(ue);if(ae=Y.match(/^\s*=/)){J.ignoreMatch();return}if((ae=Y.match(/^\s+extends\s+/))&&ae.index===0){J.ignoreMatch();return}}},m={$pattern:r,keyword:e,literal:t,built_in:s,"variable.language":o},y="[0-9](_?[0-9])*",_=`\\.(${y})`,x="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",w={className:"number",variants:[{begin:`(\\b(${x})((${_})|\\.)?|(${_}))[eE][+-]?(${y})\\b`},{begin:`\\b(${x})\\b((${_})\\b|\\.)?|(${_})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},S={className:"subst",begin:"\\$\\{",end:"\\}",keywords:m,contains:[]},E={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,S],subLanguage:"xml"}},T={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,S],subLanguage:"css"}},C={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,S],subLanguage:"graphql"}},D={className:"string",begin:"`",end:"`",contains:[c.BACKSLASH_ESCAPE,S]},k={className:"comment",variants:[c.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:d+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),c.C_BLOCK_COMMENT_MODE,c.C_LINE_COMMENT_MODE]},N=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,E,T,C,D,{match:/\$\d+/},w];S.contains=N.concat({begin:/\{/,end:/\}/,keywords:m,contains:["self"].concat(N)});const L=[].concat(k,S.contains),R=L.concat([{begin:/(\s*)\(/,end:/\)/,keywords:m,contains:["self"].concat(L)}]),I={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:m,contains:R},O={variants:[{match:[/class/,/\s+/,d,/\s+/,/extends/,/\s+/,f.concat(d,"(",f.concat(/\./,d),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,d],scope:{1:"keyword",3:"title.class"}}]},P={relevance:0,match:f.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...n,...a]}},B={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},z={variants:[{match:[/function/,/\s+/,d,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[I],illegal:/%/},$={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function U(re){return f.concat("(?!",re.join("|"),")")}const j={match:f.concat(/\b/,U([...i,"super","import"].map(re=>`${re}\\s*\\(`)),d,f.lookahead(/\s*\(/)),className:"title.function",relevance:0},Z={begin:f.concat(/\./,f.lookahead(f.concat(d,/(?![0-9A-Za-z$_(])/))),end:d,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ee={match:[/get|set/,/\s+/,d,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},I]},he="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+c.UNDERSCORE_IDENT_RE+")\\s*=>",Ee={match:[/const|var|let/,/\s+/,d,/\s*/,/=\s*/,/(async\s*)?/,f.lookahead(he)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[I]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:m,exports:{PARAMS_CONTAINS:R,CLASS_REFERENCE:P},illegal:/#(?![$_A-z])/,contains:[c.SHEBANG({label:"shebang",binary:"node",relevance:5}),B,c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,E,T,C,D,k,{match:/\$\d+/},w,P,{scope:"attr",match:d+f.lookahead(":"),relevance:0},Ee,{begin:"("+c.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[k,c.REGEXP_MODE,{className:"function",begin:he,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:c.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:m,contains:R}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:p.begin,end:p.end},{match:v},{begin:g.begin,"on:begin":g.isTrulyOpeningTag,end:g.end}],subLanguage:"xml",contains:[{begin:g.begin,end:g.end,skip:!0,contains:["self"]}]}]},z,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+c.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[I,c.inherit(c.TITLE_MODE,{begin:d,className:"title.function"})]},{match:/\.\.\./,relevance:0},Z,{match:"\\$"+d,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[I]},j,$,O,ee,{match:/\$[(.]/}]}}function u(c){const f=c.regex,h=l(c),d=r,p=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],v={begin:[/namespace/,/\s+/,c.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},g={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:p},contains:[h.exports.CLASS_REFERENCE]},m={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},y=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],_={$pattern:r,keyword:e.concat(y),literal:t,built_in:s.concat(p),"variable.language":o},x={className:"meta",begin:"@"+d},w=(C,D,M)=>{const k=C.contains.findIndex(N=>N.label===D);if(k===-1)throw new Error("can not find mode to replace");C.contains.splice(k,1,M)};Object.assign(h.keywords,_),h.exports.PARAMS_CONTAINS.push(x);const S=h.contains.find(C=>C.scope==="attr"),E=Object.assign({},S,{match:f.concat(d,f.lookahead(/\s*\?:/))});h.exports.PARAMS_CONTAINS.push([h.exports.CLASS_REFERENCE,S,E]),h.contains=h.contains.concat([x,v,g,E]),w(h,"shebang",c.SHEBANG()),w(h,"use_strict",m);const T=h.contains.find(C=>C.label==="func.def");return T.relevance=0,Object.assign(h,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),h}return K_=u,K_}var Q_,G2;function _J(){if(G2)return Q_;G2=1;function r(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},a={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,o=/\d{4}-\d{1,2}-\d{1,2}/,s=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,l=/\d{1,2}(:\d{1,2}){1,2}/,u={className:"literal",variants:[{begin:t.concat(/# */,t.either(o,i),/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,t.either(o,i),/ +/,t.either(s,l),/ *#/)}]},c={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},f={className:"label",begin:/^\w+:/},h=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),d=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,a,u,c,f,h,d,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[d]}]}}return Q_=r,Q_}var j_,H2;function bJ(){if(H2)return j_;H2=1;function r(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),a=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},o={className:"variable",begin:/\$[\w_]+/},s={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},l={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},u={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},c={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:a},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},o,s,i,e.QUOTE_STRING_MODE,u,c,l]}}return j_=r,j_}var Pe=s2;Pe.registerLanguage("xml",zj()),Pe.registerLanguage("bash",Fj()),Pe.registerLanguage("c",$j()),Pe.registerLanguage("cpp",Gj()),Pe.registerLanguage("csharp",Hj()),Pe.registerLanguage("css",Uj()),Pe.registerLanguage("markdown",Wj()),Pe.registerLanguage("diff",Yj()),Pe.registerLanguage("ruby",Zj()),Pe.registerLanguage("go",qj()),Pe.registerLanguage("graphql",Xj()),Pe.registerLanguage("ini",Kj()),Pe.registerLanguage("java",Qj()),Pe.registerLanguage("javascript",jj()),Pe.registerLanguage("json",Jj()),Pe.registerLanguage("kotlin",eJ()),Pe.registerLanguage("less",tJ()),Pe.registerLanguage("lua",rJ()),Pe.registerLanguage("makefile",nJ()),Pe.registerLanguage("perl",aJ()),Pe.registerLanguage("objectivec",iJ()),Pe.registerLanguage("php",oJ()),Pe.registerLanguage("php-template",sJ()),Pe.registerLanguage("plaintext",lJ()),Pe.registerLanguage("python",uJ()),Pe.registerLanguage("python-repl",cJ()),Pe.registerLanguage("r",fJ()),Pe.registerLanguage("rust",hJ()),Pe.registerLanguage("scss",dJ()),Pe.registerLanguage("shell",pJ()),Pe.registerLanguage("sql",vJ()),Pe.registerLanguage("swift",gJ()),Pe.registerLanguage("yaml",mJ()),Pe.registerLanguage("typescript",yJ()),Pe.registerLanguage("vbnet",_J()),Pe.registerLanguage("wasm",bJ()),Pe.HighlightJS=Pe,Pe.default=Pe;var xJ=b.defineComponent({props:{code:{type:String,required:!0},language:{type:String,default:""},autodetect:{type:Boolean,default:!0},ignoreIllegals:{type:Boolean,default:!0}},setup:function(r){var e=b.ref(r.language);b.watch(function(){return r.language},function(a){e.value=a});var t=b.computed(function(){return r.autodetect||!e.value}),n=b.computed(function(){return!t.value&&!g_.getLanguage(e.value)});return{className:b.computed(function(){return n.value?"":"hljs "+e.value}),highlightedCode:b.computed(function(){var a;if(n.value)return console.warn('The language "'+e.value+'" you specified could not be found.'),r.code.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;");if(t.value){var i=g_.highlightAuto(r.code);return e.value=(a=i.language)!==null&&a!==void 0?a:"",i.value}return(i=g_.highlight(r.code,{language:e.value,ignoreIllegals:r.ignoreIllegals})).value})}},render:function(){return b.h("pre",{},[b.h("code",{class:this.className,innerHTML:this.highlightedCode})])}}),wJ={component:xJ};const SJ={class:"h-full flex flex-col bg-white shrink-0 !w-[400px] border-l"},EJ={key:0},TJ={class:"border-b flex items-center px-[10px] h-[49px] border-transparent border-solid border-b-gray-200"},CJ={class:"flex gap-2 ml-auto"},DJ={key:1,class:"flex-1 min-h-0 overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},AJ={key:0},MJ={key:1},kJ={class:"p-4"},NJ={class:"flex justify-end mt-4 gap-x-3"},IJ={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},LJ={__name:"vs-editor-forms",props:b.mergeModels({selectedWidgetData:{type:Object,required:!1,default:null},selectedDashboard:{type:String,default:()=>""},currentWidgetData:{type:String,default:()=>""}},{selectedWidget:{},selectedWidgetModifiers:{}}),emits:b.mergeModels(["update-data"],["update:selectedWidget"]),setup(r,{emit:e}){var w,S;const t=(S=(w=b.getCurrentInstance())==null?void 0:w.proxy)==null?void 0:S.$notify,n=e;b.getCurrentInstance().appContext.app.component("highlightjs",wJ.component);const i=r,o=b.ref(!1),s=b.ref(!0),l=b.ref(!1),u=b.ref(!1),c=b.ref(""),f=b.ref({}),h=b.useModel(r,"selectedWidget"),d=["table","text","number","stat","progress","listbar","map","pivot"],p=b.ref("data"),v=async()=>{try{await kt.delete(`/bi-dashboard/${i.selectedDashboard}/${i.selectedWidgetData.name}`);const E=new URL(window.top.location.href);E.searchParams.set("dashboard",i.selectedDashboard),E.searchParams.delete("widget"),window.top.history.pushState({},"",E),n("update-data"),o.value=!1,t({type:"success",title:"Успішно!",message:"Віджет успішно видалено"})}catch(E){console.error(E),t({type:"error",title:"Помилка!",message:"При спробі видалити віджет виникла помилка"})}},g=()=>{var E;c.value="",(E=i.currentWidgetData)==null||E.columns.forEach(T=>{c.value+=`${T.name} ${T.type.split(" ")[0]}; -- ${T.title||""}
249
- `})},m=b.computed(()=>{const E=[{id:"data",label:"Дані"},{id:"style",label:"Стилі"},{id:"yaml",label:"{ }"}];return E==null?void 0:E.filter(T=>{var C,D,M;return T.id==="style"?!(d!=null&&d.includes(((C=i.selectedWidgetData)==null?void 0:C.type)||((M=(D=i.selectedWidgetData)==null?void 0:D.data)==null?void 0:M.type))):!0})}),y=()=>{var E,T,C,D,M,k,N,L,R;f.value={title:(E=i.selectedWidgetData)==null?void 0:E.title,type:(T=i.selectedWidgetData)==null?void 0:T.type,table:(C=i.selectedWidgetData)==null?void 0:C.table_name,query:(M=(D=i.selectedWidgetData)==null?void 0:D.data)==null?void 0:M.query,x:(N=(k=i.selectedWidgetData)==null?void 0:k.data)==null?void 0:N.x,cls:(R=(L=i.selectedWidgetData)==null?void 0:L.data)==null?void 0:R.cls},u.value=!0},_=async()=>{try{await kt.put(`/bi-dashboard/${i.selectedDashboard}/${i.selectedWidgetData.name}`,f.value),t({type:"success",title:"Успішно!",message:"Дані успішно змінено"}),await n("update-data"),u.value=!1}catch{t({type:"error",title:"Помилка!",message:"При спробі внести зміни виникла помилка"})}};b.watch(h,E=>{s.value=!1;const T=new URL(window.top.location.href);E?(T.searchParams.set("widget",E),window.top.history.pushState({},"",T)):(T.searchParams.delete("widget"),window.top.history.pushState({},"",T)),setTimeout(()=>s.value=!0)}),b.watch(()=>i.currentWidgetData,()=>{g()},{deep:!0}),b.onMounted(g);const x={title:{type:"text",ua:"Заголовок",placeholder:"Заголовок",validators:["required"]},type:{type:"radio",view:"buttons",validators:["required"],slots:{label:'<div style="width: 120px; height:160px" class="flex gap-[12px] flex-col"><img class="block" style="height: calc(100% - 40px)" :src="`https://cdn.softpro.ua/data/icons/bi/${id}.png`"/><span class="font-[500]">{{ label }}</span></div>'},options:[{label:"Bar",id:"bar"},{label:"Funnel",id:"funnel"},{label:"Line",id:"line"},{label:"List bar",id:"listbar"},{label:"Number",id:"number"},{label:"Pie",id:"pie"},{label:"Donut",id:"donut"},{label:"Pivot",id:"pivot"},{label:"Table",id:"table"},{label:"Progress",id:"progress"},{label:"Stat",id:"stat"},{label:"Text",id:"text"},{label:"Map",id:"map"}]},table:{type:"text",ua:"Таблиця",placeholder:"Таблиця"},query:{type:"Text",ua:"Query",placeholder:"Query"},x:{type:"Text",ua:"X Axis",placeholder:"X Axis"},cls:{type:"Text",ua:"Cls",placeholder:"Cls"}};return(E,T)=>{var R,I,O,P,B,z,$,U,j,Z,ee;const C=b.resolveComponent("VsFormRadio"),D=b.resolveComponent("VsPopover"),M=b.resolveComponent("VsConfirm"),k=b.resolveComponent("VsForm"),N=b.resolveComponent("VsDialog"),L=b.resolveComponent("highlightjs");return b.openBlock(),b.createElementBlock(b.Fragment,null,[b.createElementVNode("div",SJ,[r.selectedWidgetData?(b.openBlock(),b.createElementBlock("div",EJ,[b.createElementVNode("div",TJ,[s.value?(b.openBlock(),b.createBlock(C,{key:0,options:m.value,modelValue:p.value,"onUpdate:modelValue":T[0]||(T[0]=he=>p.value=he),view:"buttons"},null,8,["options","modelValue"])):(b.openBlock(),b.createBlock(C,{key:1,options:m.value,modelValue:p.value,"onUpdate:modelValue":T[1]||(T[1]=he=>p.value=he),view:"buttons"},null,8,["options","modelValue"])),b.createElementVNode("div",CJ,[b.createVNode(D,{placement:"left",trigger:"hover"},{reference:b.withCtx(()=>[b.createElementVNode("button",{class:"h-[30px] w-[30px] rounded-full bg-gray-100 flex items-center justify-center duration-300 hover:bg-gray-200",onClick:T[2]||(T[2]=he=>l.value=!0)},[b.createVNode(c_,{class:"h-[16px] text-gray-500"})])]),default:b.withCtx(()=>[T[12]||(T[12]=b.createTextVNode(" Переглянути колонки таблиці "))]),_:1}),b.createVNode(D,{placement:"left",trigger:"hover"},{reference:b.withCtx(()=>[b.createElementVNode("button",{onClick:y,class:"h-[30px] w-[30px] rounded-full bg-gray-100 flex items-center justify-center duration-300 hover:bg-gray-200"},[b.createVNode(xb,{class:"h-[16px]"})])]),default:b.withCtx(()=>[T[13]||(T[13]=b.createTextVNode(" Редагувати віджет "))]),_:1}),b.createVNode(D,{placement:"left",trigger:"hover"},{reference:b.withCtx(()=>[b.createElementVNode("button",{class:"h-[30px] w-[30px] rounded-full bg-gray-100 flex items-center justify-center duration-300 hover:bg-gray-200",onClick:T[3]||(T[3]=he=>o.value=!0)},[b.createVNode(b.unref(bb),{class:"h-[16px]"})])]),default:b.withCtx(()=>[T[14]||(T[14]=b.createTextVNode(" Видалити віджет "))]),_:1})])]),(R=r.currentWidgetData)!=null&&R.status?(b.openBlock(),b.createBlock(Hu,{key:0,title:(I=r.currentWidgetData)==null?void 0:I.title,text:(O=r.currentWidgetData)==null?void 0:O.message},null,8,["title","text"])):(b.openBlock(),b.createElementBlock("div",DJ,[s.value&&r.currentWidgetData?(b.openBlock(),b.createElementBlock("div",AJ,[(b.openBlock(),b.createBlock(b.resolveDynamicComponent(b.unref($L)["vs-editor-form-"+p.value]),{widgetName:(P=r.selectedWidgetData)==null?void 0:P.name,yamlValue:((B=r.selectedWidgetData)==null?void 0:B.yml)||"",data:r.selectedWidgetData,controls:(z=r.selectedWidgetData)==null?void 0:z.controls,columns:($=r.currentWidgetData)==null?void 0:$.columns,onUpdateDashboard:T[4]||(T[4]=he=>E.$emit("update-data"))},null,40,["widgetName","yamlValue","data","controls","columns"]))])):(b.openBlock(),b.createElementBlock("div",MJ,[(b.openBlock(),b.createBlock(b.resolveDynamicComponent(b.unref($L)["vs-editor-form-"+p.value]),{widgetName:(U=r.selectedWidgetData)==null?void 0:U.name,yamlValue:((j=r.selectedWidgetData)==null?void 0:j.yml)||"",data:r.selectedWidgetData,controls:(Z=r.selectedWidgetData)==null?void 0:Z.controls,columns:(ee=r.currentWidgetData)==null?void 0:ee.columns,onUpdateDashboard:T[5]||(T[5]=he=>E.$emit("update-data"))},null,40,["widgetName","yamlValue","data","controls","columns"]))])),b.createVNode(M,{visible:o.value,"onUpdate:visible":T[7]||(T[7]=he=>o.value=he),title:"Ви впевнені?"},{default:b.withCtx(()=>[b.createElementVNode("div",kJ,[T[15]||(T[15]=b.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей віджет? ",-1)),b.createElementVNode("div",NJ,[b.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:T[6]||(T[6]=he=>o.value=!1)}," Скасувати "),b.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:v}," Так, я впевнена(ий) ")])])]),_:1},8,["visible"])]))])):(b.openBlock(),b.createBlock(Hu,{key:1,title:"Оберіть один з віджетів",text:""}))]),b.createVNode(N,{visible:u.value,"onUpdate:visible":T[10]||(T[10]=he=>u.value=he),title:"Редагувати віджет"},{footer:b.withCtx(()=>[b.createElementVNode("div",IJ,[b.createElementVNode("button",{style:{border:"1px solid #000"},onClick:T[9]||(T[9]=he=>u.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),b.createElementVNode("button",{onClick:_,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:b.withCtx(()=>[b.createVNode(k,{scheme:x,modelValue:f.value,"onUpdate:modelValue":T[8]||(T[8]=he=>f.value=he)},null,8,["modelValue"])]),_:1},8,["visible"]),b.createVNode(N,{visible:l.value,"onUpdate:visible":T[11]||(T[11]=he=>l.value=he),title:"Переглянути структуру таблиці"},{default:b.withCtx(()=>[b.createVNode(L,{language:"sql",code:c.value,disabled:!0,theme:"dark-theme",id:"sqlData",class:"w-full overflow-hidden text-white !bg-black rounded",contenteditable:"true"},null,8,["code"])]),_:1},8,["visible"])],64)}}},RJ={class:"bg-white rounded-xl mx-2 mt-4 border border-gray-200 shadow-sm overflow-hidden flex flex-col min-h-[480px]"},OJ={class:"flex items-center justify-between px-4 py-3 border-b border-gray-200 shrink-0"},PJ={class:"text-sm font-semibold text-gray-800 truncate"},BJ={class:"flex-1 flex min-h-0"},VJ={class:"flex-1 min-w-0 p-4 border-r border-gray-200 overflow-auto bg-gray-50/50"},zJ={class:"w-[400px] shrink-0 flex flex-col bg-white"},FJ={__name:"vs-widget-editor-panel",props:{selectedWidget:{type:String,default:""},selectedWidgetData:{type:Object,default:null},currentWidgetData:{type:Object,default:null},selectedDashboard:{type:String,default:""},dashboardWidgets:{type:Array,default:()=>[]}},emits:["update:selectedWidget","update-data"],setup(r,{emit:e}){const t=r,n=e,a=b.computed({get:()=>t.selectedWidget,set:o=>n("update:selectedWidget",o)});function i(){n("update:selectedWidget","")}return(o,s)=>{var l,u,c;return b.openBlock(),b.createElementBlock("div",RJ,[b.createElementVNode("div",OJ,[b.createElementVNode("h3",PJ,b.toDisplayString(((l=r.selectedWidgetData)==null?void 0:l.title)||((c=(u=r.selectedWidgetData)==null?void 0:u.data)==null?void 0:c.title)||r.selectedWidget),1),b.createElementVNode("button",{type:"button",class:"flex items-center gap-1.5 px-3 py-1.5 text-sm text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors",onClick:i},[b.createVNode(b.unref(fb),{class:"w-4 h-4"}),s[2]||(s[2]=b.createTextVNode(" Закрити "))])]),b.createElementVNode("div",BJ,[b.createElementVNode("div",VJ,[b.createVNode(Ns,{dashboard:r.selectedDashboard,widget:r.selectedWidget,"selected-widget":r.selectedWidget,"dashboard-widgets":r.dashboardWidgets,"filter-u-rl":void 0,class:"max-h-full"},null,8,["dashboard","widget","selected-widget","dashboard-widgets"])]),b.createElementVNode("div",zJ,[b.createVNode(LJ,{selectedWidget:a.value,"onUpdate:selectedWidget":s[0]||(s[0]=f=>a.value=f),selectedWidgetData:r.selectedWidgetData,currentWidgetData:r.currentWidgetData,selectedDashboard:r.selectedDashboard,onUpdateData:s[1]||(s[1]=f=>o.$emit("update-data"))},null,8,["selectedWidget","selectedWidgetData","currentWidgetData","selectedDashboard"])])])])}}},U2={__name:"icon-grid",setup(r){return(e,t)=>(b.openBlock(),b.createBlock(b.unref(lb),b.mergeProps(e.$attrs,{size:24}),null,16))}},$J={components:{deleteIcon:bb,editIcon:xb,IconGrid:U2,IconMore:{__name:"icon-more",setup(r){return(e,t)=>(b.openBlock(),b.createBlock(b.unref(ob),b.mergeProps(e.$attrs,{size:24}),null,16))}},IconFilter:{__name:"icon-filter",setup(r){return(e,t)=>(b.openBlock(),b.createBlock(b.unref(sb),b.mergeProps(e.$attrs,{size:24}),null,16))}},IconTable:c_},watch:{dashboardData(r){var t,n;if(this.formEditValue={title:r==null?void 0:r.title,description:r==null?void 0:r.description,table_name:r==null?void 0:r.table_name,db:r==null?void 0:r.db,public:r==null?void 0:r.public,words:r==null?void 0:r.words},!((t=r==null?void 0:r.panels)!=null&&t.length))return[];const e=(n=r==null?void 0:r.panels)==null?void 0:n.map(a=>{var s,l;const{title:i="",type:o=""}=((l=(s=r==null?void 0:r.widgets)==null?void 0:s.find(u=>(u==null?void 0:u.name)===(a==null?void 0:a.widget)))==null?void 0:l.data)||{};return{title:i,type:o,...a}});this.formGridValue={panels:e},this.formFilterValue={filters:(r==null?void 0:r.filters)||null}}},data(){return{isDeleteConfirm:!1,isFormEdit:!1,isFormGrid:!1,isFormFilter:!1,isVisibleTableColumns:!1,formEditValue:{},formGridValue:{},formFilterValue:{},editDashboardScheme:[{type:"Text",key:"title",label:"Заголовок",validators:["required"]},{type:"Text",key:"description",label:"Опис"},{type:"Text",key:"table_name",validators:["required"],label:"Назва таблиці"},{type:"Text",key:"words",label:"Ключові слова"},{type:"Text",key:"db",label:"База даних",original:{type:"Text",ua:"Назва",col:8}},{type:"Switcher",key:"public",label:"Публічний",original:{type:"Text",ua:"Назва",col:8}}],editGridScheme:[{type:"DataTable",ua:"Панелі",key:"panels",editable:!1,addition:!1,colModel:[{name:"title",ua:"Назва",type:"Text",key:"col"},{name:"type",ua:"Тип",type:"Text",key:"col",disabled:!0},{name:"widget",type:"Text",ua:"Назва",key:"widget",hiddenCol:!0},{name:"col",ua:"Кількість стовпчиків",type:"Text",key:"col"}]}],editFilterScheme:[{name:"filters",type:"DataTable",colModel:[{ua:"Підпис",type:"Text",key:"label"},{ua:"Тип",type:"Text",key:"type"}]}]}},props:{selected:{type:String,default:()=>""},dashboardData:{type:Object,default:()=>{}},selectedWidgetData:{type:Object,default:()=>{}},columns:{type:Array}},methods:{async editDashboard(){var r,e;try{(e=(r=this.$refs)==null?void 0:r.formEdit)==null||e.doValidation(),await kt.put(`/bi-dashboard/${this.selected}`,this.formEditValue),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormEdit=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"при спробі оновити дані виникла помилка"})}},async editDashboardGrid(){var r,e;try{(e=(r=this.$refs)==null?void 0:r.formGrid)==null||e.doValidation(),await kt.put(`/bi-dashboard/${this.selected}`,{...this.formEditValue,...this.formGridValue}),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormGrid=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі оновити дані виникла помилка"})}},async editDashboardFilters(){var r,e;try{(e=(r=this.$refs)==null?void 0:r.formFilter)==null||e.doValidation(),await kt.put(`/bi-dashboard/${this.selected}`,{...this.formEditValue,...this.formGridValue,...this.formFilterValue}),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormFilter=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі оновити дані виникла помилка"})}},async deleteDashboard(){try{await kt.delete(`/bi-dashboard/${this.selected}`);const r=new URL(window.top.location.href);r.searchParams.delete("dashboard"),r.searchParams.delete("widget"),window.history.pushState({},"",r),await this.$notify({title:"Успішно!",type:"success",message:"Дашборд видалено успішно"}),this.isDeleteConfirm=!1,await this.$emit("update:selected",null),await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі видалити дашборд виникла помилка"})}},closePopover(){document.body.click()}}},GJ={key:0,class:"flex items-center gap-2"},HJ={class:"h-[30px] w-[30px] rounded-full bg-gray-100 flex items-center justify-center duration-300 hover:bg-gray-200"},UJ={class:"flex flex-col items-start -ml-2 -mr-2"},WJ={class:"p-4"},YJ={class:"flex justify-end mt-4 gap-x-3"},ZJ={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},qJ={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},XJ={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"};function KJ(r,e,t,n,a,i){const o=b.resolveComponent("IconFilter"),s=b.resolveComponent("VsPopover"),l=b.resolveComponent("IconGrid"),u=b.resolveComponent("IconMore"),c=b.resolveComponent("VsConfirm"),f=b.resolveComponent("VsForm"),h=b.resolveComponent("VsDialog");return b.openBlock(),b.createElementBlock("div",null,[t.selected?(b.openBlock(),b.createElementBlock("div",GJ,[b.createVNode(s,{placement:"left",trigger:"hover"},{reference:b.withCtx(()=>[b.createElementVNode("button",{class:"h-[30px] w-[30px] rounded-full bg-gray-100 flex items-center justify-center duration-300 hover:bg-gray-200",onClick:e[0]||(e[0]=d=>a.isFormFilter=!0)},[b.createVNode(o,{class:"h-[16px] text-gray-500"})])]),default:b.withCtx(()=>[e[19]||(e[19]=b.createTextVNode(" Редагувати фільтри "))]),_:1}),b.createVNode(s,{placement:"left",trigger:"hover"},{reference:b.withCtx(()=>[b.createElementVNode("button",{class:"h-[30px] w-[30px] rounded-full bg-gray-100 flex items-center justify-center duration-300 hover:bg-gray-200",onClick:e[1]||(e[1]=d=>a.isFormGrid=!0)},[b.createVNode(l,{class:"h-[16px] text-gray-500"})])]),default:b.withCtx(()=>[e[20]||(e[20]=b.createTextVNode(" Редагувати структуру дашборду "))]),_:1}),b.createVNode(s,{placement:"left",trigger:"hover"},{reference:b.withCtx(()=>[b.createVNode(s,{placement:"bottom-left"},{reference:b.withCtx(()=>[b.createElementVNode("button",HJ,[b.createVNode(u,{class:"h-[16px]"})])]),default:b.withCtx(()=>[b.createElementVNode("div",UJ,[b.createElementVNode("button",{onClick:e[2]||(e[2]=d=>{i.closePopover(),a.isFormEdit=!0}),class:"px-[8px] py-[4px] hover:bg-gray-100 w-full text-start rounded-lg"}," Редагувати дашборд "),b.createElementVNode("button",{onClick:e[3]||(e[3]=d=>{i.closePopover(),a.isDeleteConfirm=!0}),class:"px-[8px] py-[4px] hover:bg-gray-100 w-full text-start rounded-lg"}," Видалити дашборд ")])]),_:1})]),default:b.withCtx(()=>[e[21]||(e[21]=b.createTextVNode(" Керування дашбордом "))]),_:1})])):b.createCommentVNode("",!0),b.createVNode(c,{visible:a.isDeleteConfirm,"onUpdate:visible":e[6]||(e[6]=d=>a.isDeleteConfirm=d),size:"small",title:"Ви впевнені?"},{default:b.withCtx(()=>[b.createElementVNode("div",WJ,[e[22]||(e[22]=b.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей дашборд? ",-1)),b.createElementVNode("div",YJ,[b.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[4]||(e[4]=d=>a.isDeleteConfirm=!1)}," Скасувати "),b.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:e[5]||(e[5]=(...d)=>i.deleteDashboard&&i.deleteDashboard(...d))}," Так, я впевнена(ий) ")])])]),_:1},8,["visible"]),b.createVNode(h,{visible:a.isFormEdit,"onUpdate:visible":e[10]||(e[10]=d=>a.isFormEdit=d),title:"Редагувати дашборд"},{footer:b.withCtx(()=>[b.createElementVNode("div",ZJ,[b.createElementVNode("button",{style:{border:"1px solid #000"},onClick:e[8]||(e[8]=d=>a.isFormEdit=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),b.createElementVNode("button",{onClick:e[9]||(e[9]=(...d)=>i.editDashboard&&i.editDashboard(...d)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:b.withCtx(()=>[b.createVNode(f,{ref:"formEdit",scheme:a.editDashboardScheme,modelValue:a.formEditValue,"onUpdate:modelValue":e[7]||(e[7]=d=>a.formEditValue=d)},null,8,["scheme","modelValue"])]),_:1},8,["visible"]),b.createVNode(h,{visible:a.isFormGrid,"onUpdate:visible":e[14]||(e[14]=d=>a.isFormGrid=d),title:"Редагувати структуру дашборду"},{footer:b.withCtx(()=>[b.createElementVNode("div",qJ,[b.createElementVNode("button",{style:{border:"1px solid #000"},onClick:e[12]||(e[12]=d=>a.isFormGrid=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),b.createElementVNode("button",{onClick:e[13]||(e[13]=(...d)=>i.editDashboardGrid&&i.editDashboardGrid(...d)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:b.withCtx(()=>[b.createVNode(f,{ref:"formgrid",scheme:a.editGridScheme,modelValue:a.formGridValue,"onUpdate:modelValue":e[11]||(e[11]=d=>a.formGridValue=d)},null,8,["scheme","modelValue"])]),_:1},8,["visible"]),b.createVNode(h,{visible:a.isFormFilter,"onUpdate:visible":e[18]||(e[18]=d=>a.isFormFilter=d),title:"Редагувати фільтри"},{footer:b.withCtx(()=>[b.createElementVNode("div",XJ,[b.createElementVNode("button",{style:{border:"1px solid #000"},onClick:e[16]||(e[16]=d=>a.isFormFilter=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),b.createElementVNode("button",{onClick:e[17]||(e[17]=(...d)=>i.editDashboardFilters&&i.editDashboardFilters(...d)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:b.withCtx(()=>[b.createVNode(f,{ref:"formFilter",scheme:a.editFilterScheme,modelValue:a.formFilterValue,"onUpdate:modelValue":e[15]||(e[15]=d=>a.formFilterValue=d)},null,8,["scheme","modelValue"])]),_:1},8,["visible"])])}const QJ=nt($J,[["render",KJ]]),jJ={class:"flex-1 min-w-0 flex flex-col overflow-auto"},JJ={class:"max-w-7xl mx-auto px-6 w-full flex flex-col min-h-0 flex-1"},eee={class:"flex items-center justify-between gap-4 px-4 mx-2 mt-4 shrink-0 nowrap bg-white rounded-xl border border-gray-200"},tee={class:"grid flex-grow w-full grid-cols-12 gap-4 p-[10px] min-h-0 overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},ree=nt({__name:"vs-editor",props:{prefix:String,customClass:{type:String,default:()=>"w-screen h-screen"}},setup(r){$u(r.prefix||"/api");const t=b.ref(""),n=b.ref(""),a=b.ref(null),i=b.ref(null),o=async()=>{if(!t.value){a.value=null;return}try{const u=await kt.get(`/bi-dashboard/${t.value}`);a.value=u}catch(u){console.error(u)}},s=b.computed(()=>{var u,c,f;return(f=Array.isArray((u=a.value)==null?void 0:u.widgets)?(c=a.value)==null?void 0:c.widgets:[])==null?void 0:f.find(h=>(h==null?void 0:h.name)===n.value)}),l=b.computed(()=>{var c,f,h,d,p;const u=[{label:"Дашборди",to:"/editor"}];if((c=a.value)!=null&&c.title||t.value?u.push({label:((f=a.value)==null?void 0:f.title)||t.value||"Редактор"}):u.push({label:"Редактор"}),n.value&&s.value){const v=((d=(h=s.value)==null?void 0:h.data)==null?void 0:d.title)||((p=s.value)==null?void 0:p.title)||n.value;u.push({label:v})}return u});return b.watch(t,(u,c)=>{var h,d,p;c&&(n.value="");const f=new URL(window.top.location.href);u?((h=f==null?void 0:f.searchParams)==null||h.set("dashboard",u),(p=(d=window.top)==null?void 0:d.history)==null||p.pushState({},"",f),o()):(f==null||f.searchParams.delete("dashboard"),f==null||f.searchParams.delete("widget"))}),b.onMounted(()=>{const u=new URLSearchParams(window.top.location.search);t.value=u.get("dashboard"),n.value=u.get("widget"),o()}),(u,c)=>{var f,h;return b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(["flex w-full h-full",[r.customClass]])},[b.createElementVNode("div",jJ,[b.createElementVNode("div",JJ,[b.createElementVNode("div",eee,[b.createVNode(pb,{items:l.value},null,8,["items"]),b.createVNode(QJ,{selected:t.value,"onUpdate:selected":c[0]||(c[0]=d=>t.value=d),dashboardData:a.value,columns:(f=a.value)==null?void 0:f.columns,selectedWidgetData:s.value,prefix:r.prefix,onUpdateEditor:o},null,8,["selected","dashboardData","columns","selectedWidgetData","prefix"])]),n.value&&a.value?(b.openBlock(),b.createBlock(FJ,{key:0,"selected-widget":n.value,"onUpdate:selectedWidget":c[1]||(c[1]=d=>n.value=d),"selected-widget-data":s.value,"current-widget-data":i.value,"selected-dashboard":t.value,"dashboard-widgets":a.value.widgets||[],onUpdateData:o},null,8,["selected-widget","selected-widget-data","current-widget-data","selected-dashboard","dashboard-widgets"])):(b.openBlock(),b.createElementBlock(b.Fragment,{key:1},[b.createElementVNode("div",tee,[a.value?(b.openBlock(!0),b.createElementBlock(b.Fragment,{key:1},b.renderList(a.value.panels,(d,p)=>{var v;return b.openBlock(),b.createElementBlock("div",{key:p,class:b.normalizeClass([`col-span-${d.col||12}`,"flex flex-col gap-[10px]"])},[(v=d.widgets)!=null&&v.length?(b.openBlock(!0),b.createElementBlock(b.Fragment,{key:0},b.renderList(d.widgets,g=>(b.openBlock(),b.createBlock(Ns,{onClick:m=>n.value=g,"onUpdate:currentWidgetData":c[2]||(c[2]=m=>i.value=m),key:g,dashboard:t.value,widget:g,selectedWidget:n.value,"dashboard-widgets":a.value.widgets,class:b.normalizeClass({"border border-blue-500":n.value===g})},null,8,["onClick","dashboard","widget","selectedWidget","dashboard-widgets","class"]))),128)):(b.openBlock(),b.createBlock(Ns,{key:1,onClick:g=>n.value=d.widget,"onUpdate:currentWidgetData":c[3]||(c[3]=g=>i.value=g),class:b.normalizeClass(["flex flex-col",{"border border-blue-500":n.value===d.widget}]),dashboard:t.value,widget:d.widget,selectedWidget:n.value,"dashboard-widgets":a.value.widgets},null,8,["onClick","class","dashboard","widget","selectedWidget","dashboard-widgets"]))],2)}),128)):(b.openBlock(),b.createBlock(Hu,{key:0,class:"col-span-12"}))]),t.value?(b.openBlock(),b.createBlock(bO,{key:0,class:"bottom-[10px] left-[10px] absolute",columns:(h=a.value)==null?void 0:h.columns,selectedDashboard:t.value,onUpdateData:o},null,8,["columns","selectedDashboard"])):b.createCommentVNode("",!0)],64))])])],2)}}},[["__scopeId","data-v-2387f284"]]),nee={class:"pt-16 w-full h-screen"},aee={__name:"vs-editor-page",setup(r){return(e,t)=>(b.openBlock(),b.createElementBlock("div",nee,[b.createVNode(ree,{customClass:"h-full w-full"})]))}},iee={class:"p-4 h-full flex flex-col"},oee={class:"flex items-start justify-between mb-3"},see={class:"flex items-center space-x-2"},lee={class:"w-8 h-8 bg-blue-50 rounded-lg flex items-center justify-center"},uee={class:"flex-1"},cee={class:"font-semibold text-gray-900 group-hover:text-blue-600 transition-colors"},fee={key:0,class:"absolute right-0 top-full mt-1 py-1 w-40 bg-white border border-gray-200 rounded-lg shadow-lg z-10"},hee={class:"bg-gray-50 rounded-md h-32 mb-4 flex items-center justify-center"},dee={class:"flex items-center justify-between text-xs text-gray-500 mt-auto"},pee={class:"flex items-center space-x-1"},vee={__name:"dashboard-card",props:{title:String,description:String,modified:String,name:String,reserveLines:Number,dashboardRouteName:String},setup(r){const e=r,t=_b(),n=b.ref(!1);function a(){e.dashboardRouteName&&t.push(`/dashboards/${encodeURIComponent(e.dashboardRouteName)}`)}function i(){e.dashboardRouteName&&t.push({path:"/editor",query:{dashboard:e.dashboardRouteName}})}function o(s){s.target.closest(".relative")||(n.value=!1)}return b.onMounted(()=>document.addEventListener("click",o)),b.onUnmounted(()=>document.removeEventListener("click",o)),(s,l)=>(b.openBlock(),b.createElementBlock("div",{class:"bg-white rounded-lg border border-gray-200 shadow-sm hover:shadow-md transition-all duration-200 cursor-pointer group relative h-full",onClick:i},[b.createElementVNode("div",iee,[b.createElementVNode("div",oee,[b.createElementVNode("div",see,[b.createElementVNode("div",lee,[b.createVNode(b.unref(ib),{size:24,class:"w-4 h-4 text-blue-600"})]),b.createElementVNode("div",uee,[b.createElementVNode("h3",cee,b.toDisplayString(r.title),1)])]),b.createElementVNode("div",{class:"relative",onClick:l[3]||(l[3]=b.withModifiers(()=>{},["stop"]))},[b.createElementVNode("button",{type:"button",class:b.normalizeClass(["p-1 hover:bg-gray-100 rounded opacity-0 group-hover:opacity-100 transition-opacity",{"opacity-100":n.value}]),onClick:l[0]||(l[0]=u=>n.value=!n.value)},[b.createVNode(b.unref(ob),{size:24,class:"w-4 h-4 text-gray-500"})],2),n.value?(b.openBlock(),b.createElementBlock("div",fee,[b.createElementVNode("button",{type:"button",class:"w-full px-3 py-2 text-left text-sm text-gray-700 hover:bg-gray-50 flex items-center gap-2",onClick:l[1]||(l[1]=u=>{a(),n.value=!1})},[b.createVNode(b.unref(lb),{class:"w-4 h-4"}),l[4]||(l[4]=b.createTextVNode(" Переглянути "))]),b.createElementVNode("button",{type:"button",class:"w-full px-3 py-2 text-left text-sm text-gray-700 hover:bg-gray-50 flex items-center gap-2",onClick:l[2]||(l[2]=u=>{i(),n.value=!1})},[b.createVNode(b.unref(ub),{class:"w-4 h-4"}),l[5]||(l[5]=b.createTextVNode(" Редагувати "))])])):b.createCommentVNode("",!0)])]),r.description?(b.openBlock(),b.createElementBlock("p",{key:0,class:b.normalizeClass(["text-sm text-gray-600 mb-4 line-clamp-2",r.reserveLines===2?"h-10":r.reserveLines===1?"h-5":"h-0"])},b.toDisplayString(r.description),3)):(b.openBlock(),b.createElementBlock("div",{key:1,class:b.normalizeClass(["mb-4",r.reserveLines===2?"h-10":r.reserveLines===1?"h-5":"h-0"])},null,2)),b.createElementVNode("div",hee,[b.createVNode(b.unref(ib),{size:24,class:"w-12 h-12 text-gray-300"})]),b.createElementVNode("div",dee,[b.createElementVNode("div",pee,[b.createVNode(b.unref(pR),{size:24,class:"w-3 h-3"}),b.createElementVNode("span",null,b.toDisplayString(r.modified),1)]),b.createElementVNode("span",null,b.toDisplayString(r.name),1)])])]))}},gee=[{type:"Text",key:"name",label:"Назва",validators:["required"],original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"title",label:"Заголовок",validators:["required"],original:{type:"Text",ua:"Титул",col:8}},{type:"Text",key:"description",label:"Опис",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"words",label:"Ключові слова",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"table_name",validators:["required"],label:"Назва таблиці",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"db",label:"База даних",original:{type:"Text",ua:"Назва",col:8}},{type:"Switcher",key:"public",label:"Публічний",original:{type:"Text",ua:"Назва",col:8}}],mee={class:"pt-16"},yee={class:"flex-1 bg-gray-50"},_ee={class:"max-w-7xl mx-auto px-6 py-8"},bee={class:"mb-6"},xee={class:"flex items-center justify-between mb-6"},wee={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},See={class:"flex items-center space-x-4"},Eee={class:"flex-1 relative"},Tee={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},Cee=b.defineComponent({__name:"all-dashboards-page",setup(r){const e=b.ref([]),t=b.ref([]);_b();const n=b.ref(null),a=b.ref(!1),i=b.ref({});$u("/api");async function o(){try{const h=await kt.get("/bi-dashboard?type=db"),d=Array.isArray(h==null?void 0:h.rows)?h.rows:[];t.value=d,e.value=d.map(p=>({routeName:String(p.name??""),title:p.title??p.name??"Untitled",description:p.description??null,modified:"-",name:"-"}))}catch(h){console.error("Failed to load dashboards",h),t.value=[],e.value=[]}}async function s(){var d,p,v;const h=(p=(d=b.getCurrentInstance())==null?void 0:d.proxy)==null?void 0:p.$notify;try{await((v=n.value)==null?void 0:v.doValidation()),await kt.post("/bi-dashboard",i.value),a.value=!1,i.value={},h==null||h({type:"success",title:"Успішно!",message:"Дашборд створено успішно"}),await o()}catch{h==null||h({type:"error",title:"Помилка!",message:"При спробі створити дашборд виникла помилка"})}}b.onMounted(o);const l=b.ref(1),u=()=>{const h=window.innerWidth;l.value=h>=1024?3:h>=768?2:1};b.onMounted(()=>{u(),window.addEventListener("resize",u)}),b.onUnmounted(()=>{window.removeEventListener("resize",u)});const c=h=>h?h.trim().length>70?2:1:0,f=h=>{const d=l.value||1,v=Math.floor(h/d)*d,g=v+d,m=e.value.slice(v,g);let y=0;for(const _ of m){const x=c(_.description??null);if(x>y&&(y=x),y===2)break}return y};return b.ref("grid"),(h,d)=>{const p=b.resolveComponent("VsForm"),v=b.resolveComponent("VsDialog");return b.openBlock(),b.createElementBlock("div",mee,[b.createElementVNode("div",yee,[b.createElementVNode("div",_ee,[b.createElementVNode("div",bee,[b.createElementVNode("div",xee,[d[5]||(d[5]=b.createElementVNode("div",null,[b.createElementVNode("h1",{class:"text-2xl font-bold text-gray-900"},"Dashboards"),b.createElementVNode("p",{class:"text-sm text-gray-600 mt-1"}," Manage and view your analytics dashboards ")],-1)),b.createElementVNode("button",{type:"button",class:"flex items-center space-x-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",onClick:d[0]||(d[0]=g=>a.value=!0)},[b.createVNode(b.unref(cb),{size:24,class:"w-4 h-4"}),d[4]||(d[4]=b.createElementVNode("span",null,"New Dashboard",-1))])]),b.createVNode(v,{visible:a.value,"onUpdate:visible":d[3]||(d[3]=g=>a.value=g),title:"Створити дашборд"},{footer:b.withCtx(()=>[b.createElementVNode("div",wee,[b.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border border-gray-200 rounded-lg hover:bg-gray-100 duration-300",onClick:d[2]||(d[2]=g=>a.value=!1)}," Скасувати "),b.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg hover:bg-blue-700 duration-300",onClick:s}," Зберегти ")])]),default:b.withCtx(()=>[b.createVNode(p,{ref_key:"createFormRef",ref:n,scheme:b.unref(gee),modelValue:i.value,"onUpdate:modelValue":d[1]||(d[1]=g=>i.value=g)},null,8,["scheme","modelValue"])]),_:1},8,["visible"]),b.createElementVNode("div",See,[b.createElementVNode("div",Eee,[b.createVNode(b.unref(wR),{size:24,class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),d[6]||(d[6]=b.createElementVNode("input",{type:"text",placeholder:"Search dashboards...",class:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500",value:""},null,-1))])])]),b.createElementVNode("div",Tee,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(e.value,(g,m)=>(b.openBlock(),b.createElementBlock("div",{key:m,class:"cursor-pointer"},[b.createVNode(vee,{title:g.title,description:g.description,modified:g.modified,name:g.name,reserveLines:f(m),"dashboard-route-name":g.routeName},null,8,["title","description","modified","name","reserveLines","dashboard-route-name"])]))),128))])])])])}}}),Dee={__name:"editor-root-page",setup(r){const e=gO(),t=b.computed(()=>{const a=e.query.dashboard;return a==null?"":typeof a=="string"?a.trim():""}),n=b.computed(()=>t.value.length>0);return(a,i)=>n.value?(b.openBlock(),b.createBlock(aee,{key:`editor-${t.value}`})):(b.openBlock(),b.createBlock(Cee,{key:0}))}};function Gr(r,e){const t=r&&typeof r=="object"&&"value"in r?r.value:r;if(t==null)return"";const n=Number(t);return Number.isNaN(n)?String(t):new Intl.NumberFormat("en",e??{notation:"compact"}).format(n)}function Vu(r){if(!(r!=null&&r.includes("T")))return r??"";const[e,t,n]=r.split("T")[0].split("-");return`${n}.${t}.${e}`}function Aee(r){return Intl.NumberFormat("en").format(r??0)}class Mee{static getTooltipOptions(e=!0){return{show:e,axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}}}}const kee={show_label:!1,show_legend:!1,label:null,legend:{position:null},colors:null,color:null,title:null};function Nee(){const r="0123456789ABCDEF";let e="#";for(let t=0;t<6;t+=1)e+=r[Math.floor(Math.random()*16)];return e}function fo(r=kee){var t;const e={label:{show:r==null?void 0:r.show_label,formatter:(r==null?void 0:r.formatter)??(n=>Gr(n)),...(r==null?void 0:r.label)||{}},legend:{...(r==null?void 0:r.legend)||{},[((t=r==null?void 0:r.legend)==null?void 0:t.position)||"bottom"]:"0",show:(r==null?void 0:r.show_legend)||!1},barWidth:"70%",grid:{borderColor:"#e5e7eb"},title:{...(r==null?void 0:r.title)||{}}};return(r!=null&&r.colors||r!=null&&r.color)&&(e.color=(r==null?void 0:r.colors)||(r==null?void 0:r.color)||null),e}function W2(r){return{color:"#9ca3af",fontSize:10,fontFamily:"Inter, ui-sans-serif, system-ui",fontWeight:400,label:r==null?void 0:r.label,show:!0,formatter:(r==null?void 0:r.formatter)??(e=>Gr(e)),margin:(r==null?void 0:r.margin)??7,interval:(r==null?void 0:r.interval)??"auto",rotate:(r==null?void 0:r.rotate)??0}}const Y2=["#d3c7e6","#bedae3","#f8e9cb","#ff8c8c","#c5d8be","#ffc6c6","#ffc39a","#fff7c5","#d8ffc0","#d4f7ff"];class pd{static getLabelOptions(e={}){return{show:(e==null?void 0:e.show_label)||(e==null?void 0:e.show)||!1,fontSize:"10",position:(e==null?void 0:e.position)||"inside",formatter:(e==null?void 0:e.formatter)||"{d}%",...e}}static getLegendOpions(e={}){return{...e,position:(e==null?void 0:e.position)||"bottom"}}}const ur={props:["source","style","widget","dashboard","title","currentWidget","widgetData","prefix"],data(){return{sourceData:null,styleData:null,widgetName:"",dimensions:[],dashboardName:"",titleCharts:"",widgetInstance:null}},mounted(){window.addEventListener("resize",this.handleResize),window.addEventListener(`update-data-${this.widget}`,this.checkCustomEvent),window.addEventListener(`update-style-${this.widget}`,this.checkCustomStyleEvent)},unmounted(){window.removeEventListener(`update-data-${this.widget}`,this.checkCustomEvent),window.removeEventListener(`update-style-${this.widget}`,this.checkCustomStyleEvent)},watch:{sourceData:{async handler(){setTimeout(()=>{this==null||this.onChangedData()},0)}}},methods:{checkCustomStyleEvent(r){this.changeOptionsByName(r.chartId,r.options)},checkCustomEvent({filterUrl:r}){this.getDataFromURL(r)},handleResize(){this.widgetInstance&&this.widgetInstance.resize()},async getDataFromURL(r){var e;try{const t=await kt.get(r);this.sourceData=(t==null?void 0:t.source)||[],this.$emit("update:widgetData",t),this.dimensions=Object.keys(((e=this.sourceData)==null?void 0:e[0])||{}),this.titleCharts=this.style?this.style:(t==null?void 0:t.title)||"",this.styleData=(t==null?void 0:t.style)||{}}catch(t){const n={message:"Дані не знайдено",title:"Помилка!",type:"error",status:400,id:this.widgetName};(t==null?void 0:t.status)=="404"&&(n.status=404,n.message="Дані не знайдено"),(t==null?void 0:t.status)=="400"&&(n.message="Перевірте налаштування або зверніться до адміністратора"),(t==null?void 0:t.status)=="500"&&(n.message="Сталася помилка сервера"),this.$emit("update:widgetData",n)}},getValues(){return this.sourceData.map(r=>{var e;return parseFloat(r[(e=this.columns)==null?void 0:e[1]])})},formatDate(r){const e=new Date(r);if(isNaN(e))return r;const t=String(e.getDate()).padStart(2,"0"),a=["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня"][e.getMonth()],i=e.getFullYear();return`${t} ${a} ${i}`},async getData(){var r;try{if(this.source)this.sourceData=[...this.source],this.styleData=this.style,this.titleCharts=this.title,this.dimensions=Object.keys(((r=this.sourceData)==null?void 0:r[0])||{});else{this.widgetName=this.widget,this.dashboardName=this.dashboard;const e=this.dashboardName?`${this.prefix||""}/bi-data?dashboard=${this.dashboardName}&widget=${this.widgetName}`:`${this.prefix||""}/bi-data?&widget=${this.widgetName}`;await this.getDataFromURL(e)}}catch(e){console.error(e)}},async initChart(r,e,t){var n,a,i,o,s,l,u;this.widgetInstance&&this.widgetInstance.clear();try{const c=this.$refs.chart,f=$f(c),h={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"transparent",shadowColor:"transparent",padding:[0,0,0,0],borderWidth:0,formatter:d=>{var m;const p=(m=d[0])==null?void 0:m.axisValue;let g=`
249
+ `})},m=b.computed(()=>{const E=[{id:"data",label:"Дані"},{id:"style",label:"Стилі"},{id:"yaml",label:"{ }"}];return E==null?void 0:E.filter(T=>{var C,D,M;return T.id==="style"?!(d!=null&&d.includes(((C=i.selectedWidgetData)==null?void 0:C.type)||((M=(D=i.selectedWidgetData)==null?void 0:D.data)==null?void 0:M.type))):!0})}),y=()=>{var E,T,C,D,M,k,N,L,R;f.value={title:(E=i.selectedWidgetData)==null?void 0:E.title,type:(T=i.selectedWidgetData)==null?void 0:T.type,table:(C=i.selectedWidgetData)==null?void 0:C.table_name,query:(M=(D=i.selectedWidgetData)==null?void 0:D.data)==null?void 0:M.query,x:(N=(k=i.selectedWidgetData)==null?void 0:k.data)==null?void 0:N.x,cls:(R=(L=i.selectedWidgetData)==null?void 0:L.data)==null?void 0:R.cls},u.value=!0},_=async()=>{try{await kt.put(`/bi-dashboard/${i.selectedDashboard}/${i.selectedWidgetData.name}`,f.value),t({type:"success",title:"Успішно!",message:"Дані успішно змінено"}),await n("update-data"),u.value=!1}catch{t({type:"error",title:"Помилка!",message:"При спробі внести зміни виникла помилка"})}};b.watch(h,E=>{s.value=!1;const T=new URL(window.top.location.href);E?(T.searchParams.set("widget",E),window.top.history.pushState({},"",T)):(T.searchParams.delete("widget"),window.top.history.pushState({},"",T)),setTimeout(()=>s.value=!0)}),b.watch(()=>i.currentWidgetData,()=>{g()},{deep:!0}),b.onMounted(g);const x={title:{type:"text",ua:"Заголовок",placeholder:"Заголовок",validators:["required"]},type:{type:"radio",view:"buttons",validators:["required"],slots:{label:'<div style="width: 120px; height:160px" class="flex gap-[12px] flex-col"><img class="block" style="height: calc(100% - 40px)" :src="`https://cdn.softpro.ua/data/icons/bi/${id}.png`"/><span class="font-[500]">{{ label }}</span></div>'},options:[{label:"Bar",id:"bar"},{label:"Funnel",id:"funnel"},{label:"Line",id:"line"},{label:"List bar",id:"listbar"},{label:"Number",id:"number"},{label:"Pie",id:"pie"},{label:"Donut",id:"donut"},{label:"Pivot",id:"pivot"},{label:"Table",id:"table"},{label:"Progress",id:"progress"},{label:"Stat",id:"stat"},{label:"Text",id:"text"},{label:"Map",id:"map"}]},table:{type:"text",ua:"Таблиця",placeholder:"Таблиця"},query:{type:"Text",ua:"Query",placeholder:"Query"},x:{type:"Text",ua:"X Axis",placeholder:"X Axis"},cls:{type:"Text",ua:"Cls",placeholder:"Cls"}};return(E,T)=>{var R,I,O,P,B,z,$,U,j,Z,ee;const C=b.resolveComponent("VsFormRadio"),D=b.resolveComponent("VsPopover"),M=b.resolveComponent("VsConfirm"),k=b.resolveComponent("VsForm"),N=b.resolveComponent("VsDialog"),L=b.resolveComponent("highlightjs");return b.openBlock(),b.createElementBlock(b.Fragment,null,[b.createElementVNode("div",SJ,[r.selectedWidgetData?(b.openBlock(),b.createElementBlock("div",EJ,[b.createElementVNode("div",TJ,[s.value?(b.openBlock(),b.createBlock(C,{key:0,options:m.value,modelValue:p.value,"onUpdate:modelValue":T[0]||(T[0]=he=>p.value=he),view:"buttons"},null,8,["options","modelValue"])):(b.openBlock(),b.createBlock(C,{key:1,options:m.value,modelValue:p.value,"onUpdate:modelValue":T[1]||(T[1]=he=>p.value=he),view:"buttons"},null,8,["options","modelValue"])),b.createElementVNode("div",CJ,[b.createVNode(D,{placement:"left",trigger:"hover"},{reference:b.withCtx(()=>[b.createElementVNode("button",{class:"h-[30px] w-[30px] rounded-full bg-gray-100 flex items-center justify-center duration-300 hover:bg-gray-200",onClick:T[2]||(T[2]=he=>l.value=!0)},[b.createVNode(c_,{class:"h-[16px] text-gray-500"})])]),default:b.withCtx(()=>[T[12]||(T[12]=b.createTextVNode(" Переглянути колонки таблиці "))]),_:1}),b.createVNode(D,{placement:"left",trigger:"hover"},{reference:b.withCtx(()=>[b.createElementVNode("button",{onClick:y,class:"h-[30px] w-[30px] rounded-full bg-gray-100 flex items-center justify-center duration-300 hover:bg-gray-200"},[b.createVNode(xb,{class:"h-[16px]"})])]),default:b.withCtx(()=>[T[13]||(T[13]=b.createTextVNode(" Редагувати віджет "))]),_:1}),b.createVNode(D,{placement:"left",trigger:"hover"},{reference:b.withCtx(()=>[b.createElementVNode("button",{class:"h-[30px] w-[30px] rounded-full bg-gray-100 flex items-center justify-center duration-300 hover:bg-gray-200",onClick:T[3]||(T[3]=he=>o.value=!0)},[b.createVNode(b.unref(bb),{class:"h-[16px]"})])]),default:b.withCtx(()=>[T[14]||(T[14]=b.createTextVNode(" Видалити віджет "))]),_:1})])]),(R=r.currentWidgetData)!=null&&R.status?(b.openBlock(),b.createBlock(Hu,{key:0,title:(I=r.currentWidgetData)==null?void 0:I.title,text:(O=r.currentWidgetData)==null?void 0:O.message},null,8,["title","text"])):(b.openBlock(),b.createElementBlock("div",DJ,[s.value&&r.currentWidgetData?(b.openBlock(),b.createElementBlock("div",AJ,[(b.openBlock(),b.createBlock(b.resolveDynamicComponent(b.unref($L)["vs-editor-form-"+p.value]),{widgetName:(P=r.selectedWidgetData)==null?void 0:P.name,yamlValue:((B=r.selectedWidgetData)==null?void 0:B.yml)||"",data:r.selectedWidgetData,controls:(z=r.selectedWidgetData)==null?void 0:z.controls,columns:($=r.currentWidgetData)==null?void 0:$.columns,onUpdateDashboard:T[4]||(T[4]=he=>E.$emit("update-data"))},null,40,["widgetName","yamlValue","data","controls","columns"]))])):(b.openBlock(),b.createElementBlock("div",MJ,[(b.openBlock(),b.createBlock(b.resolveDynamicComponent(b.unref($L)["vs-editor-form-"+p.value]),{widgetName:(U=r.selectedWidgetData)==null?void 0:U.name,yamlValue:((j=r.selectedWidgetData)==null?void 0:j.yml)||"",data:r.selectedWidgetData,controls:(Z=r.selectedWidgetData)==null?void 0:Z.controls,columns:(ee=r.currentWidgetData)==null?void 0:ee.columns,onUpdateDashboard:T[5]||(T[5]=he=>E.$emit("update-data"))},null,40,["widgetName","yamlValue","data","controls","columns"]))])),b.createVNode(M,{visible:o.value,"onUpdate:visible":T[7]||(T[7]=he=>o.value=he),title:"Ви впевнені?"},{default:b.withCtx(()=>[b.createElementVNode("div",kJ,[T[15]||(T[15]=b.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей віджет? ",-1)),b.createElementVNode("div",NJ,[b.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:T[6]||(T[6]=he=>o.value=!1)}," Скасувати "),b.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:v}," Так, я впевнена(ий) ")])])]),_:1},8,["visible"])]))])):(b.openBlock(),b.createBlock(Hu,{key:1,title:"Оберіть один з віджетів",text:""}))]),b.createVNode(N,{visible:u.value,"onUpdate:visible":T[10]||(T[10]=he=>u.value=he),title:"Редагувати віджет"},{footer:b.withCtx(()=>[b.createElementVNode("div",IJ,[b.createElementVNode("button",{style:{border:"1px solid #000"},onClick:T[9]||(T[9]=he=>u.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),b.createElementVNode("button",{onClick:_,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:b.withCtx(()=>[b.createVNode(k,{scheme:x,modelValue:f.value,"onUpdate:modelValue":T[8]||(T[8]=he=>f.value=he)},null,8,["modelValue"])]),_:1},8,["visible"]),b.createVNode(N,{visible:l.value,"onUpdate:visible":T[11]||(T[11]=he=>l.value=he),title:"Переглянути структуру таблиці"},{default:b.withCtx(()=>[b.createVNode(L,{language:"sql",code:c.value,disabled:!0,theme:"dark-theme",id:"sqlData",class:"w-full overflow-hidden text-white !bg-black rounded",contenteditable:"true"},null,8,["code"])]),_:1},8,["visible"])],64)}}},RJ={class:"bg-white rounded-xl mx-2 mt-4 border border-gray-200 shadow-sm overflow-hidden flex flex-col min-h-[480px]"},OJ={class:"flex items-center justify-between px-4 py-3 border-b border-gray-200 shrink-0"},PJ={class:"text-sm font-semibold text-gray-800 truncate"},BJ={class:"flex-1 flex min-h-0"},VJ={class:"flex-1 min-w-0 p-4 border-r border-gray-200 overflow-auto bg-gray-50/50"},zJ={class:"w-[400px] shrink-0 flex flex-col bg-white"},FJ={__name:"vs-widget-editor-panel",props:{selectedWidget:{type:String,default:""},selectedWidgetData:{type:Object,default:null},currentWidgetData:{type:Object,default:null},selectedDashboard:{type:String,default:""},dashboardWidgets:{type:Array,default:()=>[]}},emits:["update:selectedWidget","update-data"],setup(r,{emit:e}){const t=r,n=e,a=b.computed({get:()=>t.selectedWidget,set:o=>n("update:selectedWidget",o)});function i(){n("update:selectedWidget","")}return(o,s)=>{var l,u,c;return b.openBlock(),b.createElementBlock("div",RJ,[b.createElementVNode("div",OJ,[b.createElementVNode("h3",PJ,b.toDisplayString(((l=r.selectedWidgetData)==null?void 0:l.title)||((c=(u=r.selectedWidgetData)==null?void 0:u.data)==null?void 0:c.title)||r.selectedWidget),1),b.createElementVNode("button",{type:"button",class:"flex items-center gap-1.5 px-3 py-1.5 text-sm text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors",onClick:i},[b.createVNode(b.unref(fb),{class:"w-4 h-4"}),s[2]||(s[2]=b.createTextVNode(" Закрити "))])]),b.createElementVNode("div",BJ,[b.createElementVNode("div",VJ,[b.createVNode(Ns,{dashboard:r.selectedDashboard,widget:r.selectedWidget,"selected-widget":r.selectedWidget,"dashboard-widgets":r.dashboardWidgets,"filter-u-rl":void 0,class:"max-h-full"},null,8,["dashboard","widget","selected-widget","dashboard-widgets"])]),b.createElementVNode("div",zJ,[b.createVNode(LJ,{selectedWidget:a.value,"onUpdate:selectedWidget":s[0]||(s[0]=f=>a.value=f),selectedWidgetData:r.selectedWidgetData,currentWidgetData:r.currentWidgetData,selectedDashboard:r.selectedDashboard,onUpdateData:s[1]||(s[1]=f=>o.$emit("update-data"))},null,8,["selectedWidget","selectedWidgetData","currentWidgetData","selectedDashboard"])])])])}}},U2={__name:"icon-grid",setup(r){return(e,t)=>(b.openBlock(),b.createBlock(b.unref(lb),b.mergeProps(e.$attrs,{size:24}),null,16))}},$J={components:{deleteIcon:bb,editIcon:xb,IconGrid:U2,IconMore:{__name:"icon-more",setup(r){return(e,t)=>(b.openBlock(),b.createBlock(b.unref(ob),b.mergeProps(e.$attrs,{size:24}),null,16))}},IconFilter:{__name:"icon-filter",setup(r){return(e,t)=>(b.openBlock(),b.createBlock(b.unref(sb),b.mergeProps(e.$attrs,{size:24}),null,16))}},IconTable:c_},watch:{dashboardData(r){var t,n;if(this.formEditValue={title:r==null?void 0:r.title,description:r==null?void 0:r.description,table_name:r==null?void 0:r.table_name,db:r==null?void 0:r.db,public:r==null?void 0:r.public,words:r==null?void 0:r.words},!((t=r==null?void 0:r.panels)!=null&&t.length))return[];const e=(n=r==null?void 0:r.panels)==null?void 0:n.map(a=>{var s,l;const{title:i="",type:o=""}=((l=(s=r==null?void 0:r.widgets)==null?void 0:s.find(u=>(u==null?void 0:u.name)===(a==null?void 0:a.widget)))==null?void 0:l.data)||{};return{title:i,type:o,...a}});this.formGridValue={panels:e},this.formFilterValue={filters:(r==null?void 0:r.filters)||null}}},data(){return{isDeleteConfirm:!1,isFormEdit:!1,isFormGrid:!1,isFormFilter:!1,isVisibleTableColumns:!1,formEditValue:{},formGridValue:{},formFilterValue:{},editDashboardScheme:[{type:"Text",key:"title",label:"Заголовок",validators:["required"]},{type:"Text",key:"description",label:"Опис"},{type:"Text",key:"table_name",validators:["required"],label:"Назва таблиці"},{type:"Text",key:"words",label:"Ключові слова"},{type:"Text",key:"db",label:"База даних",original:{type:"Text",ua:"Назва",col:8}},{type:"Switcher",key:"public",label:"Публічний",original:{type:"Text",ua:"Назва",col:8}}],editGridScheme:[{type:"DataTable",ua:"Панелі",key:"panels",editable:!1,addition:!1,colModel:[{name:"title",ua:"Назва",type:"Text",key:"col"},{name:"type",ua:"Тип",type:"Text",key:"col",disabled:!0},{name:"widget",type:"Text",ua:"Назва",key:"widget",hiddenCol:!0},{name:"col",ua:"Кількість стовпчиків",type:"Text",key:"col"}]}],editFilterScheme:[{name:"filters",type:"DataTable",colModel:[{ua:"Підпис",type:"Text",key:"label"},{ua:"Тип",type:"Text",key:"type"}]}]}},props:{selected:{type:String,default:()=>""},dashboardData:{type:Object,default:()=>{}},selectedWidgetData:{type:Object,default:()=>{}},columns:{type:Array}},methods:{async editDashboard(){var r,e;try{(e=(r=this.$refs)==null?void 0:r.formEdit)==null||e.doValidation(),await kt.put(`/bi-dashboard/${this.selected}`,this.formEditValue),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormEdit=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"при спробі оновити дані виникла помилка"})}},async editDashboardGrid(){var r,e;try{(e=(r=this.$refs)==null?void 0:r.formGrid)==null||e.doValidation(),await kt.put(`/bi-dashboard/${this.selected}`,{...this.formEditValue,...this.formGridValue}),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormGrid=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі оновити дані виникла помилка"})}},async editDashboardFilters(){var r,e;try{(e=(r=this.$refs)==null?void 0:r.formFilter)==null||e.doValidation(),await kt.put(`/bi-dashboard/${this.selected}`,{...this.formEditValue,...this.formGridValue,...this.formFilterValue}),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormFilter=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі оновити дані виникла помилка"})}},async deleteDashboard(){try{await kt.delete(`/bi-dashboard/${this.selected}`);const r=new URL(window.top.location.href);r.searchParams.delete("dashboard"),r.searchParams.delete("widget"),window.history.pushState({},"",r),await this.$notify({title:"Успішно!",type:"success",message:"Дашборд видалено успішно"}),this.isDeleteConfirm=!1,await this.$emit("update:selected",null),await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі видалити дашборд виникла помилка"})}},closePopover(){document.body.click()}}},GJ={key:0,class:"flex items-center gap-2"},HJ={class:"h-[30px] w-[30px] rounded-full bg-gray-100 flex items-center justify-center duration-300 hover:bg-gray-200"},UJ={class:"flex flex-col items-start -ml-2 -mr-2"},WJ={class:"p-4"},YJ={class:"flex justify-end mt-4 gap-x-3"},ZJ={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},qJ={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},XJ={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"};function KJ(r,e,t,n,a,i){const o=b.resolveComponent("IconFilter"),s=b.resolveComponent("VsPopover"),l=b.resolveComponent("IconGrid"),u=b.resolveComponent("IconMore"),c=b.resolveComponent("VsConfirm"),f=b.resolveComponent("VsForm"),h=b.resolveComponent("VsDialog");return b.openBlock(),b.createElementBlock("div",null,[t.selected?(b.openBlock(),b.createElementBlock("div",GJ,[b.createVNode(s,{placement:"left",trigger:"hover"},{reference:b.withCtx(()=>[b.createElementVNode("button",{class:"h-[30px] w-[30px] rounded-full bg-gray-100 flex items-center justify-center duration-300 hover:bg-gray-200",onClick:e[0]||(e[0]=d=>a.isFormFilter=!0)},[b.createVNode(o,{class:"h-[16px] text-gray-500"})])]),default:b.withCtx(()=>[e[19]||(e[19]=b.createTextVNode(" Редагувати фільтри "))]),_:1}),b.createVNode(s,{placement:"left",trigger:"hover"},{reference:b.withCtx(()=>[b.createElementVNode("button",{class:"h-[30px] w-[30px] rounded-full bg-gray-100 flex items-center justify-center duration-300 hover:bg-gray-200",onClick:e[1]||(e[1]=d=>a.isFormGrid=!0)},[b.createVNode(l,{class:"h-[16px] text-gray-500"})])]),default:b.withCtx(()=>[e[20]||(e[20]=b.createTextVNode(" Редагувати структуру дашборду "))]),_:1}),b.createVNode(s,{placement:"left",trigger:"hover"},{reference:b.withCtx(()=>[b.createVNode(s,{placement:"bottom-left"},{reference:b.withCtx(()=>[b.createElementVNode("button",HJ,[b.createVNode(u,{class:"h-[16px]"})])]),default:b.withCtx(()=>[b.createElementVNode("div",UJ,[b.createElementVNode("button",{onClick:e[2]||(e[2]=d=>{i.closePopover(),a.isFormEdit=!0}),class:"px-[8px] py-[4px] hover:bg-gray-100 w-full text-start rounded-lg"}," Редагувати дашборд "),b.createElementVNode("button",{onClick:e[3]||(e[3]=d=>{i.closePopover(),a.isDeleteConfirm=!0}),class:"px-[8px] py-[4px] hover:bg-gray-100 w-full text-start rounded-lg"}," Видалити дашборд ")])]),_:1})]),default:b.withCtx(()=>[e[21]||(e[21]=b.createTextVNode(" Керування дашбордом "))]),_:1})])):b.createCommentVNode("",!0),b.createVNode(c,{visible:a.isDeleteConfirm,"onUpdate:visible":e[6]||(e[6]=d=>a.isDeleteConfirm=d),size:"small",title:"Ви впевнені?"},{default:b.withCtx(()=>[b.createElementVNode("div",WJ,[e[22]||(e[22]=b.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей дашборд? ",-1)),b.createElementVNode("div",YJ,[b.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[4]||(e[4]=d=>a.isDeleteConfirm=!1)}," Скасувати "),b.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:e[5]||(e[5]=(...d)=>i.deleteDashboard&&i.deleteDashboard(...d))}," Так, я впевнена(ий) ")])])]),_:1},8,["visible"]),b.createVNode(h,{visible:a.isFormEdit,"onUpdate:visible":e[10]||(e[10]=d=>a.isFormEdit=d),title:"Редагувати дашборд"},{footer:b.withCtx(()=>[b.createElementVNode("div",ZJ,[b.createElementVNode("button",{style:{border:"1px solid #000"},onClick:e[8]||(e[8]=d=>a.isFormEdit=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),b.createElementVNode("button",{onClick:e[9]||(e[9]=(...d)=>i.editDashboard&&i.editDashboard(...d)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:b.withCtx(()=>[b.createVNode(f,{ref:"formEdit",scheme:a.editDashboardScheme,modelValue:a.formEditValue,"onUpdate:modelValue":e[7]||(e[7]=d=>a.formEditValue=d)},null,8,["scheme","modelValue"])]),_:1},8,["visible"]),b.createVNode(h,{visible:a.isFormGrid,"onUpdate:visible":e[14]||(e[14]=d=>a.isFormGrid=d),title:"Редагувати структуру дашборду"},{footer:b.withCtx(()=>[b.createElementVNode("div",qJ,[b.createElementVNode("button",{style:{border:"1px solid #000"},onClick:e[12]||(e[12]=d=>a.isFormGrid=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),b.createElementVNode("button",{onClick:e[13]||(e[13]=(...d)=>i.editDashboardGrid&&i.editDashboardGrid(...d)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:b.withCtx(()=>[b.createVNode(f,{ref:"formgrid",scheme:a.editGridScheme,modelValue:a.formGridValue,"onUpdate:modelValue":e[11]||(e[11]=d=>a.formGridValue=d)},null,8,["scheme","modelValue"])]),_:1},8,["visible"]),b.createVNode(h,{visible:a.isFormFilter,"onUpdate:visible":e[18]||(e[18]=d=>a.isFormFilter=d),title:"Редагувати фільтри"},{footer:b.withCtx(()=>[b.createElementVNode("div",XJ,[b.createElementVNode("button",{style:{border:"1px solid #000"},onClick:e[16]||(e[16]=d=>a.isFormFilter=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),b.createElementVNode("button",{onClick:e[17]||(e[17]=(...d)=>i.editDashboardFilters&&i.editDashboardFilters(...d)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:b.withCtx(()=>[b.createVNode(f,{ref:"formFilter",scheme:a.editFilterScheme,modelValue:a.formFilterValue,"onUpdate:modelValue":e[15]||(e[15]=d=>a.formFilterValue=d)},null,8,["scheme","modelValue"])]),_:1},8,["visible"])])}const QJ=nt($J,[["render",KJ]]),jJ={class:"flex-1 min-w-0 flex flex-col overflow-auto"},JJ={class:"max-w-7xl mx-auto px-6 w-full flex flex-col min-h-0 flex-1"},eee={class:"flex items-center justify-between gap-4 px-4 mx-2 mt-4 shrink-0 nowrap bg-white rounded-xl border border-gray-200"},tee={class:"grid flex-grow w-full grid-cols-12 gap-4 p-[10px] min-h-0 overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},ree=nt({__name:"vs-editor",props:{prefix:String,customClass:{type:String,default:()=>"w-screen h-screen"}},setup(r){$u(r.prefix||"/api");const t=b.ref(""),n=b.ref(""),a=b.ref(null),i=b.ref(null),o=async()=>{if(!t.value){a.value=null;return}try{const u=await kt.get(`/bi-dashboard/${t.value}`);a.value=u}catch(u){console.error(u)}},s=b.computed(()=>{var u,c,f;return(f=Array.isArray((u=a.value)==null?void 0:u.widgets)?(c=a.value)==null?void 0:c.widgets:[])==null?void 0:f.find(h=>(h==null?void 0:h.name)===n.value)}),l=b.computed(()=>{var c,f,h,d,p;const u=[{label:"Дашборди",to:"/editor"}];if((c=a.value)!=null&&c.title||t.value?u.push({label:((f=a.value)==null?void 0:f.title)||t.value||"Редактор"}):u.push({label:"Редактор"}),n.value&&s.value){const v=((d=(h=s.value)==null?void 0:h.data)==null?void 0:d.title)||((p=s.value)==null?void 0:p.title)||n.value;u.push({label:v})}return u});return b.watch(t,(u,c)=>{var h,d,p;c&&(n.value="");const f=new URL(window.top.location.href);u?((h=f==null?void 0:f.searchParams)==null||h.set("dashboard",u),(p=(d=window.top)==null?void 0:d.history)==null||p.pushState({},"",f),o()):(f==null||f.searchParams.delete("dashboard"),f==null||f.searchParams.delete("widget"))}),b.onMounted(()=>{const u=new URLSearchParams(window.top.location.search);t.value=u.get("dashboard"),n.value=u.get("widget"),o()}),(u,c)=>{var f,h;return b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(["flex w-full h-full",[r.customClass]])},[b.createElementVNode("div",jJ,[b.createElementVNode("div",JJ,[b.createElementVNode("div",eee,[b.createVNode(pb,{items:l.value},null,8,["items"]),b.createVNode(QJ,{selected:t.value,"onUpdate:selected":c[0]||(c[0]=d=>t.value=d),dashboardData:a.value,columns:(f=a.value)==null?void 0:f.columns,selectedWidgetData:s.value,prefix:r.prefix,onUpdateEditor:o},null,8,["selected","dashboardData","columns","selectedWidgetData","prefix"])]),n.value&&a.value?(b.openBlock(),b.createBlock(FJ,{key:0,"selected-widget":n.value,"onUpdate:selectedWidget":c[1]||(c[1]=d=>n.value=d),"selected-widget-data":s.value,"current-widget-data":i.value,"selected-dashboard":t.value,"dashboard-widgets":a.value.widgets||[],onUpdateData:o},null,8,["selected-widget","selected-widget-data","current-widget-data","selected-dashboard","dashboard-widgets"])):(b.openBlock(),b.createElementBlock(b.Fragment,{key:1},[b.createElementVNode("div",tee,[a.value?(b.openBlock(!0),b.createElementBlock(b.Fragment,{key:1},b.renderList(a.value.panels,(d,p)=>{var v;return b.openBlock(),b.createElementBlock("div",{key:p,class:b.normalizeClass([`col-span-${d.col||12}`,"flex flex-col gap-[10px]"])},[(v=d.widgets)!=null&&v.length?(b.openBlock(!0),b.createElementBlock(b.Fragment,{key:0},b.renderList(d.widgets,g=>(b.openBlock(),b.createBlock(Ns,{onClick:m=>n.value=g,"onUpdate:currentWidgetData":c[2]||(c[2]=m=>i.value=m),key:g,dashboard:t.value,widget:g,selectedWidget:n.value,"dashboard-widgets":a.value.widgets,class:b.normalizeClass({"border border-blue-500":n.value===g})},null,8,["onClick","dashboard","widget","selectedWidget","dashboard-widgets","class"]))),128)):(b.openBlock(),b.createBlock(Ns,{key:1,onClick:g=>n.value=d.widget,"onUpdate:currentWidgetData":c[3]||(c[3]=g=>i.value=g),class:b.normalizeClass(["flex flex-col",{"border border-blue-500":n.value===d.widget}]),dashboard:t.value,widget:d.widget,selectedWidget:n.value,"dashboard-widgets":a.value.widgets},null,8,["onClick","class","dashboard","widget","selectedWidget","dashboard-widgets"]))],2)}),128)):(b.openBlock(),b.createBlock(Hu,{key:0,class:"col-span-12"}))]),t.value?(b.openBlock(),b.createBlock(bO,{key:0,class:"bottom-[10px] left-[10px] absolute",columns:(h=a.value)==null?void 0:h.columns,selectedDashboard:t.value,onUpdateData:o},null,8,["columns","selectedDashboard"])):b.createCommentVNode("",!0)],64))])])],2)}}},[["__scopeId","data-v-2387f284"]]),nee={class:"pt-16 w-full h-screen"},aee={__name:"vs-editor-page",setup(r){return(e,t)=>(b.openBlock(),b.createElementBlock("div",nee,[b.createVNode(ree,{customClass:"h-full w-full"})]))}},iee={class:"p-4 h-full flex flex-col"},oee={class:"flex items-start justify-between mb-3"},see={class:"flex items-center space-x-2"},lee={class:"w-8 h-8 bg-blue-50 rounded-lg flex items-center justify-center"},uee={class:"flex-1"},cee={class:"font-semibold text-gray-900 group-hover:text-blue-600 transition-colors"},fee={key:0,class:"absolute right-0 top-full mt-1 py-1 w-40 bg-white border border-gray-200 rounded-lg shadow-lg z-10"},hee={class:"bg-gray-50 rounded-md h-32 mb-4 flex items-center justify-center"},dee={class:"flex items-center justify-between text-xs text-gray-500 mt-auto"},pee={class:"flex items-center space-x-1"},vee={__name:"dashboard-card",props:{title:String,description:String,modified:String,name:String,reserveLines:Number,dashboardRouteName:String},setup(r){const e=r,t=_b(),n=b.ref(!1);function a(){e.dashboardRouteName&&t.push(`/dashboards/${encodeURIComponent(e.dashboardRouteName)}`)}function i(){e.dashboardRouteName&&t.push({path:"/editor",query:{dashboard:e.dashboardRouteName}})}function o(s){s.target.closest(".relative")||(n.value=!1)}return b.onMounted(()=>document.addEventListener("click",o)),b.onUnmounted(()=>document.removeEventListener("click",o)),(s,l)=>(b.openBlock(),b.createElementBlock("div",{class:"bg-white rounded-lg border border-gray-200 shadow-sm hover:shadow-md transition-all duration-200 cursor-pointer group relative h-full",onClick:i},[b.createElementVNode("div",iee,[b.createElementVNode("div",oee,[b.createElementVNode("div",see,[b.createElementVNode("div",lee,[b.createVNode(b.unref(ib),{size:24,class:"w-4 h-4 text-blue-600"})]),b.createElementVNode("div",uee,[b.createElementVNode("h3",cee,b.toDisplayString(r.title),1)])]),b.createElementVNode("div",{class:"relative",onClick:l[3]||(l[3]=b.withModifiers(()=>{},["stop"]))},[b.createElementVNode("button",{type:"button",class:b.normalizeClass(["p-1 hover:bg-gray-100 rounded opacity-0 group-hover:opacity-100 transition-opacity",{"opacity-100":n.value}]),onClick:l[0]||(l[0]=u=>n.value=!n.value)},[b.createVNode(b.unref(ob),{size:24,class:"w-4 h-4 text-gray-500"})],2),n.value?(b.openBlock(),b.createElementBlock("div",fee,[b.createElementVNode("button",{type:"button",class:"w-full px-3 py-2 text-left text-sm text-gray-700 hover:bg-gray-50 flex items-center gap-2",onClick:l[1]||(l[1]=u=>{a(),n.value=!1})},[b.createVNode(b.unref(lb),{class:"w-4 h-4"}),l[4]||(l[4]=b.createTextVNode(" Переглянути "))]),b.createElementVNode("button",{type:"button",class:"w-full px-3 py-2 text-left text-sm text-gray-700 hover:bg-gray-50 flex items-center gap-2",onClick:l[2]||(l[2]=u=>{i(),n.value=!1})},[b.createVNode(b.unref(ub),{class:"w-4 h-4"}),l[5]||(l[5]=b.createTextVNode(" Редагувати "))])])):b.createCommentVNode("",!0)])]),r.description?(b.openBlock(),b.createElementBlock("p",{key:0,class:b.normalizeClass(["text-sm text-gray-600 mb-4 line-clamp-2",r.reserveLines===2?"h-10":r.reserveLines===1?"h-5":"h-0"])},b.toDisplayString(r.description),3)):(b.openBlock(),b.createElementBlock("div",{key:1,class:b.normalizeClass(["mb-4",r.reserveLines===2?"h-10":r.reserveLines===1?"h-5":"h-0"])},null,2)),b.createElementVNode("div",hee,[b.createVNode(b.unref(ib),{size:24,class:"w-12 h-12 text-gray-300"})]),b.createElementVNode("div",dee,[b.createElementVNode("div",pee,[b.createVNode(b.unref(pR),{size:24,class:"w-3 h-3"}),b.createElementVNode("span",null,b.toDisplayString(r.modified),1)]),b.createElementVNode("span",null,b.toDisplayString(r.name),1)])])]))}},gee=[{type:"Text",key:"name",label:"Назва",validators:["required"],original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"title",label:"Заголовок",validators:["required"],original:{type:"Text",ua:"Титул",col:8}},{type:"Text",key:"description",label:"Опис",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"words",label:"Ключові слова",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"table_name",validators:["required"],label:"Назва таблиці",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"db",label:"База даних",original:{type:"Text",ua:"Назва",col:8}},{type:"Switcher",key:"public",label:"Публічний",original:{type:"Text",ua:"Назва",col:8}}],mee={class:"pt-16"},yee={class:"flex-1 bg-gray-50"},_ee={class:"max-w-7xl mx-auto px-6 py-8"},bee={class:"mb-6"},xee={class:"flex items-center justify-between mb-6"},wee={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},See={class:"flex items-center space-x-4"},Eee={class:"flex-1 relative"},Tee={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},Cee=b.defineComponent({__name:"all-dashboards-page",setup(r){const e=b.ref([]),t=b.ref([]);_b();const n=b.ref(null),a=b.ref(!1),i=b.ref({});$u("/api");async function o(){try{const h=await kt.get("/bi-dashboard?type=db"),d=Array.isArray(h==null?void 0:h.rows)?h.rows:[];t.value=d,e.value=d.map(p=>({routeName:String(p.name??""),title:p.title??p.name??"Untitled",description:p.description??null,modified:"-",name:"-"}))}catch(h){console.error("Failed to load dashboards",h),t.value=[],e.value=[]}}async function s(){var d,p,v;const h=(p=(d=b.getCurrentInstance())==null?void 0:d.proxy)==null?void 0:p.$notify;try{await((v=n.value)==null?void 0:v.doValidation()),await kt.post("/bi-dashboard",i.value),a.value=!1,i.value={},h==null||h({type:"success",title:"Успішно!",message:"Дашборд створено успішно"}),await o()}catch{h==null||h({type:"error",title:"Помилка!",message:"При спробі створити дашборд виникла помилка"})}}b.onMounted(o);const l=b.ref(1),u=()=>{const h=window.innerWidth;l.value=h>=1024?3:h>=768?2:1};b.onMounted(()=>{u(),window.addEventListener("resize",u)}),b.onUnmounted(()=>{window.removeEventListener("resize",u)});const c=h=>h?h.trim().length>70?2:1:0,f=h=>{const d=l.value||1,v=Math.floor(h/d)*d,g=v+d,m=e.value.slice(v,g);let y=0;for(const _ of m){const x=c(_.description??null);if(x>y&&(y=x),y===2)break}return y};return b.ref("grid"),(h,d)=>{const p=b.resolveComponent("VsForm"),v=b.resolveComponent("VsDialog");return b.openBlock(),b.createElementBlock("div",mee,[b.createElementVNode("div",yee,[b.createElementVNode("div",_ee,[b.createElementVNode("div",bee,[b.createElementVNode("div",xee,[d[5]||(d[5]=b.createElementVNode("div",null,[b.createElementVNode("h1",{class:"text-2xl font-bold text-gray-900"},"Dashboards"),b.createElementVNode("p",{class:"text-sm text-gray-600 mt-1"}," Manage and view your analytics dashboards ")],-1)),b.createElementVNode("button",{type:"button",class:"flex items-center space-x-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",onClick:d[0]||(d[0]=g=>a.value=!0)},[b.createVNode(b.unref(cb),{size:24,class:"w-4 h-4"}),d[4]||(d[4]=b.createElementVNode("span",null,"New Dashboard",-1))])]),b.createVNode(v,{visible:a.value,"onUpdate:visible":d[3]||(d[3]=g=>a.value=g),title:"Створити дашборд"},{footer:b.withCtx(()=>[b.createElementVNode("div",wee,[b.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border border-gray-200 rounded-lg hover:bg-gray-100 duration-300",onClick:d[2]||(d[2]=g=>a.value=!1)}," Скасувати "),b.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg hover:bg-blue-700 duration-300",onClick:s}," Зберегти ")])]),default:b.withCtx(()=>[b.createVNode(p,{ref_key:"createFormRef",ref:n,scheme:b.unref(gee),modelValue:i.value,"onUpdate:modelValue":d[1]||(d[1]=g=>i.value=g)},null,8,["scheme","modelValue"])]),_:1},8,["visible"]),b.createElementVNode("div",See,[b.createElementVNode("div",Eee,[b.createVNode(b.unref(wR),{size:24,class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),d[6]||(d[6]=b.createElementVNode("input",{type:"text",placeholder:"Search dashboards...",class:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500",value:""},null,-1))])])]),b.createElementVNode("div",Tee,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(e.value,(g,m)=>(b.openBlock(),b.createElementBlock("div",{key:m,class:"cursor-pointer"},[b.createVNode(vee,{title:g.title,description:g.description,modified:g.modified,name:g.name,reserveLines:f(m),"dashboard-route-name":g.routeName},null,8,["title","description","modified","name","reserveLines","dashboard-route-name"])]))),128))])])])])}}}),Dee={__name:"editor-root-page",setup(r){const e=gO(),t=b.computed(()=>{var i;const a=(i=e==null?void 0:e.query)==null?void 0:i.dashboard;return a==null?"":typeof a=="string"?a.trim():""}),n=b.computed(()=>t.value.length>0);return(a,i)=>n.value?(b.openBlock(),b.createBlock(aee,{key:`editor-${t.value}`})):(b.openBlock(),b.createBlock(Cee,{key:0}))}};function Gr(r,e){const t=r&&typeof r=="object"&&"value"in r?r.value:r;if(t==null)return"";const n=Number(t);return Number.isNaN(n)?String(t):new Intl.NumberFormat("en",e??{notation:"compact"}).format(n)}function Vu(r){if(!(r!=null&&r.includes("T")))return r??"";const[e,t,n]=r.split("T")[0].split("-");return`${n}.${t}.${e}`}function Aee(r){return Intl.NumberFormat("en").format(r??0)}class Mee{static getTooltipOptions(e=!0){return{show:e,axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}}}}const kee={show_label:!1,show_legend:!1,label:null,legend:{position:null},colors:null,color:null,title:null};function Nee(){const r="0123456789ABCDEF";let e="#";for(let t=0;t<6;t+=1)e+=r[Math.floor(Math.random()*16)];return e}function fo(r=kee){var t;const e={label:{show:r==null?void 0:r.show_label,formatter:(r==null?void 0:r.formatter)??(n=>Gr(n)),...(r==null?void 0:r.label)||{}},legend:{...(r==null?void 0:r.legend)||{},[((t=r==null?void 0:r.legend)==null?void 0:t.position)||"bottom"]:"0",show:(r==null?void 0:r.show_legend)||!1},barWidth:"70%",grid:{borderColor:"#e5e7eb"},title:{...(r==null?void 0:r.title)||{}}};return(r!=null&&r.colors||r!=null&&r.color)&&(e.color=(r==null?void 0:r.colors)||(r==null?void 0:r.color)||null),e}function W2(r){return{color:"#9ca3af",fontSize:10,fontFamily:"Inter, ui-sans-serif, system-ui",fontWeight:400,label:r==null?void 0:r.label,show:!0,formatter:(r==null?void 0:r.formatter)??(e=>Gr(e)),margin:(r==null?void 0:r.margin)??7,interval:(r==null?void 0:r.interval)??"auto",rotate:(r==null?void 0:r.rotate)??0}}const Y2=["#d3c7e6","#bedae3","#f8e9cb","#ff8c8c","#c5d8be","#ffc6c6","#ffc39a","#fff7c5","#d8ffc0","#d4f7ff"];class pd{static getLabelOptions(e={}){return{show:(e==null?void 0:e.show_label)||(e==null?void 0:e.show)||!1,fontSize:"10",position:(e==null?void 0:e.position)||"inside",formatter:(e==null?void 0:e.formatter)||"{d}%",...e}}static getLegendOpions(e={}){return{...e,position:(e==null?void 0:e.position)||"bottom"}}}const ur={props:["source","style","widget","dashboard","title","currentWidget","widgetData","prefix"],data(){return{sourceData:null,styleData:null,widgetName:"",dimensions:[],dashboardName:"",titleCharts:"",widgetInstance:null}},mounted(){window.addEventListener("resize",this.handleResize),window.addEventListener(`update-data-${this.widget}`,this.checkCustomEvent),window.addEventListener(`update-style-${this.widget}`,this.checkCustomStyleEvent)},unmounted(){window.removeEventListener(`update-data-${this.widget}`,this.checkCustomEvent),window.removeEventListener(`update-style-${this.widget}`,this.checkCustomStyleEvent)},watch:{sourceData:{async handler(){setTimeout(()=>{this==null||this.onChangedData()},0)}}},methods:{checkCustomStyleEvent(r){this.changeOptionsByName(r.chartId,r.options)},checkCustomEvent({filterUrl:r}){this.getDataFromURL(r)},handleResize(){this.widgetInstance&&this.widgetInstance.resize()},async getDataFromURL(r){var e;try{const t=await kt.get(r);this.sourceData=(t==null?void 0:t.source)||[],this.$emit("update:widgetData",t),this.dimensions=Object.keys(((e=this.sourceData)==null?void 0:e[0])||{}),this.titleCharts=this.style?this.style:(t==null?void 0:t.title)||"",this.styleData=(t==null?void 0:t.style)||{}}catch(t){const n={message:"Дані не знайдено",title:"Помилка!",type:"error",status:400,id:this.widgetName};(t==null?void 0:t.status)=="404"&&(n.status=404,n.message="Дані не знайдено"),(t==null?void 0:t.status)=="400"&&(n.message="Перевірте налаштування або зверніться до адміністратора"),(t==null?void 0:t.status)=="500"&&(n.message="Сталася помилка сервера"),this.$emit("update:widgetData",n)}},getValues(){return this.sourceData.map(r=>{var e;return parseFloat(r[(e=this.columns)==null?void 0:e[1]])})},formatDate(r){const e=new Date(r);if(isNaN(e))return r;const t=String(e.getDate()).padStart(2,"0"),a=["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня"][e.getMonth()],i=e.getFullYear();return`${t} ${a} ${i}`},async getData(){var r;try{if(this.source)this.sourceData=[...this.source],this.styleData=this.style,this.titleCharts=this.title,this.dimensions=Object.keys(((r=this.sourceData)==null?void 0:r[0])||{});else{this.widgetName=this.widget,this.dashboardName=this.dashboard;const e=this.dashboardName?`${this.prefix||""}/bi-data?dashboard=${this.dashboardName}&widget=${this.widgetName}`:`${this.prefix||""}/bi-data?&widget=${this.widgetName}`;await this.getDataFromURL(e)}}catch(e){console.error(e)}},async initChart(r,e,t){var n,a,i,o,s,l,u;this.widgetInstance&&this.widgetInstance.clear();try{const c=this.$refs.chart,f=$f(c),h={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"transparent",shadowColor:"transparent",padding:[0,0,0,0],borderWidth:0,formatter:d=>{var m;const p=(m=d[0])==null?void 0:m.axisValue;let g=`
250
250
  <div style="background-color: rgba(255, 255, 255, 0.7)" class="border border-gray-200 text-gray-800 rounded-lg shadow-md dark:bg-neutral-800 dark:border-neutral-700 min-w-28">
251
251
  <div class="font-semibold text-sm border-b border-solid border-gray-200 text-gray-800 rounded-t-lg dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200 px-2 py-1">
252
252
  ${p?this.formatDate(p):"N/A"}
@@ -396,8 +396,8 @@ function YR(r, e) {
396
396
  }
397
397
  const ZR = /* @__PURE__ */ Sr(UR, [["render", YR]]), Tb = {
398
398
  "bi-bar": vr(() => Promise.resolve().then(() => rte)),
399
- "bi-number": vr(() => import("./vs-number-BYY_Gd6m.js")),
400
- "bi-text": vr(() => import("./vs-text-C_KFUoCE.js")),
399
+ "bi-number": vr(() => import("./vs-number-B5Hk7Eoq.js")),
400
+ "bi-text": vr(() => import("./vs-text-CsbBsS8r.js")),
401
401
  "bi-listbar": vr(() => Promise.resolve().then(() => nre)),
402
402
  "bi-pie": vr(() => Promise.resolve().then(() => vte)),
403
403
  "bi-donut": vr(() => Promise.resolve().then(() => ute)),
@@ -405,10 +405,10 @@ const ZR = /* @__PURE__ */ Sr(UR, [["render", YR]]), Tb = {
405
405
  "bi-stat": vr(() => Promise.resolve().then(() => Ote)),
406
406
  "bi-pivot": vr(() => Promise.resolve().then(() => bre)),
407
407
  "bi-progress": vr(() => Promise.resolve().then(() => qte)),
408
- "bi-funnel": vr(() => import("./vs-funnel-bar-Lb-T2BvP.js")),
409
- "bi-map": vr(() => import("./vs-map-BREwpKyt.js")),
410
- "bi-cluster": vr(() => import("./vs-map-cluster-B3VVh2Th.js")),
411
- "bi-table": vr(() => import("./vs-table-Deb8wNdP.js"))
408
+ "bi-funnel": vr(() => import("./vs-funnel-bar-Bm0uo7I2.js")),
409
+ "bi-map": vr(() => import("./vs-map-t-8HLh36.js")),
410
+ "bi-cluster": vr(() => import("./vs-map-cluster-BtqOA70T.js")),
411
+ "bi-table": vr(() => import("./vs-table-C6kBCHF1.js"))
412
412
  };
413
413
  let KC = "/api";
414
414
  function Hh(r) {
@@ -61257,7 +61257,8 @@ const yee = /* @__PURE__ */ Sr(lee, [["render", mee]]), _ee = { class: "flex-1 m
61257
61257
  __name: "editor-root-page",
61258
61258
  setup(r) {
61259
61259
  const e = LO(), t = Gt(() => {
61260
- const a = e.query.dashboard;
61260
+ var i;
61261
+ const a = (i = e == null ? void 0 : e.query) == null ? void 0 : i.dashboard;
61261
61262
  return a == null ? "" : typeof a == "string" ? a.trim() : "";
61262
61263
  }), n = Gt(() => t.value.length > 0);
61263
61264
  return (a, i) => n.value ? (W(), je(Dee, {
@@ -1,4 +1,4 @@
1
- import { _ as n, c, i as h, a as o, b as l, d } from "./import-file-B5MQcuRd.js";
1
+ import { _ as n, c, i as h, a as o, b as l, d } from "./import-file--MEHKIZN.js";
2
2
  import { createElementBlock as p, openBlock as u } from "vue";
3
3
  const m = {
4
4
  name: "VsFunnelBar",
@@ -1,5 +1,5 @@
1
1
  import { createBlock as b, openBlock as l, unref as L, mergeProps as v, createElementBlock as d, createElementVNode as c, withDirectives as F, toDisplayString as S, vShow as R, Fragment as P, renderList as V, normalizeClass as D, resolveComponent as A, createVNode as H } from "vue";
2
- import { e as x, X as J, _ as w } from "./import-file-B5MQcuRd.js";
2
+ import { e as x, X as J, _ as w } from "./import-file--MEHKIZN.js";
3
3
  /**
4
4
  * @license lucide-vue-next v0.546.0 - ISC
5
5
  *
@@ -1,5 +1,5 @@
1
- import { _ as A, a as F, p as T, c as G, V as P, b as Z, d as q, e as D, l as K } from "./vs-list-CqZhcJTj.js";
2
- import { e as W, _ as H, V as J, c as Q, g as U, h as X, j as Y } from "./import-file-B5MQcuRd.js";
1
+ import { _ as A, a as F, p as T, c as G, V as P, b as Z, d as q, e as D, l as K } from "./vs-list-CIfRGFUp.js";
2
+ import { e as W, _ as H, V as J, c as Q, g as U, h as X, j as Y } from "./import-file--MEHKIZN.js";
3
3
  import { createElementBlock as g, createCommentVNode as S, openBlock as p, createElementVNode as l, normalizeClass as V, Fragment as R, renderList as N, toDisplayString as O, normalizeStyle as j, createBlock as z, unref as $, mergeProps as ee, resolveComponent as m, withDirectives as M, resolveDynamicComponent as te, createVNode as w, vShow as C } from "vue";
4
4
  /**
5
5
  * @license lucide-vue-next v0.546.0 - ISC
@@ -1,5 +1,5 @@
1
- import { _ as E, a as L, p as $, V as T, b as B, c as H, d as O, l as F, e as N } from "./vs-list-CqZhcJTj.js";
2
- import { _ as V, c as P } from "./import-file-B5MQcuRd.js";
1
+ import { _ as E, a as L, p as $, V as T, b as B, c as H, d as O, l as F, e as N } from "./vs-list-CIfRGFUp.js";
2
+ import { _ as V, c as P } from "./import-file--MEHKIZN.js";
3
3
  import { resolveComponent as u, createElementBlock as c, openBlock as i, Fragment as w, createElementVNode as r, createBlock as C, createCommentVNode as m, createVNode as x, Teleport as R, toDisplayString as g, renderList as S, normalizeStyle as k, normalizeClass as I } from "vue";
4
4
  const A = {
5
5
  components: { legendIcon: L, closeIcon: E },
@@ -1,4 +1,4 @@
1
- import { _ as c, c as o, f as n } from "./import-file-B5MQcuRd.js";
1
+ import { _ as c, c as o, f as n } from "./import-file--MEHKIZN.js";
2
2
  import { createElementBlock as i, openBlock as m, toDisplayString as s } from "vue";
3
3
  const u = {
4
4
  name: "VsNumber",
@@ -1,4 +1,4 @@
1
- import { _ as m, c as f, b as _, d as b } from "./import-file-B5MQcuRd.js";
1
+ import { _ as m, c as f, b as _, d as b } from "./import-file--MEHKIZN.js";
2
2
  import { createElementBlock as a, openBlock as r, createElementVNode as s, Fragment as n, renderList as c, toDisplayString as d } from "vue";
3
3
  const x = {
4
4
  name: "VsTable",
@@ -1,4 +1,4 @@
1
- import { _ as o, c as s, m as i } from "./import-file-B5MQcuRd.js";
1
+ import { _ as o, c as s, m as i } from "./import-file--MEHKIZN.js";
2
2
  import { createElementBlock as r, openBlock as n, createCommentVNode as a } from "vue";
3
3
  const c = {
4
4
  name: "VsText",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/bi",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "description": "BI data visualization module",
5
5
  "main": "dist/bi.js",
6
6
  "browser": "dist/bi.umd.cjs",