@hep-code-runner/vue3 2.1.0 → 2.1.1
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/index.d.ts +6 -0
- package/dist/index.js +4 -4
- package/dist/index.mjs +124 -123
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ width: number;
|
|
|
14
14
|
pistonUrl: string;
|
|
15
15
|
language: string;
|
|
16
16
|
theme: string;
|
|
17
|
+
themeColor: string;
|
|
17
18
|
showLanguageSelector: boolean;
|
|
18
19
|
showEditor: boolean;
|
|
19
20
|
editable: boolean;
|
|
@@ -22,6 +23,7 @@ executorLabel: string;
|
|
|
22
23
|
close: typeof close_2;
|
|
23
24
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
24
25
|
"update:modelValue": (value: boolean) => void;
|
|
26
|
+
change: (code: string) => void;
|
|
25
27
|
close: () => void;
|
|
26
28
|
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_2<__VLS_TypePropsToRuntimeProps_2<Props_2>, {
|
|
27
29
|
modelValue: boolean;
|
|
@@ -30,12 +32,14 @@ width: number;
|
|
|
30
32
|
pistonUrl: string;
|
|
31
33
|
language: string;
|
|
32
34
|
theme: string;
|
|
35
|
+
themeColor: string;
|
|
33
36
|
showLanguageSelector: boolean;
|
|
34
37
|
showEditor: boolean;
|
|
35
38
|
editable: boolean;
|
|
36
39
|
executorLabel: string;
|
|
37
40
|
}>>> & Readonly<{
|
|
38
41
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
42
|
+
onChange?: ((code: string) => any) | undefined;
|
|
39
43
|
onClose?: (() => any) | undefined;
|
|
40
44
|
}>, {
|
|
41
45
|
title: string;
|
|
@@ -43,6 +47,7 @@ modelValue: boolean;
|
|
|
43
47
|
language: string;
|
|
44
48
|
theme: "light" | "dark";
|
|
45
49
|
pistonUrl: string;
|
|
50
|
+
themeColor: string;
|
|
46
51
|
showLanguageSelector: boolean;
|
|
47
52
|
showEditor: boolean;
|
|
48
53
|
editable: boolean;
|
|
@@ -175,6 +180,7 @@ declare interface Props_2 {
|
|
|
175
180
|
pistonUrl?: string;
|
|
176
181
|
language?: string;
|
|
177
182
|
theme?: "light" | "dark";
|
|
183
|
+
themeColor?: string;
|
|
178
184
|
showLanguageSelector?: boolean;
|
|
179
185
|
showEditor?: boolean;
|
|
180
186
|
editable?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");var oe=Object.defineProperty,se=(l,h,r)=>h in l?oe(l,h,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[h]=r,ee=(l,h,r)=>se(l,typeof h!="symbol"?h+"":h,r);let K=null;class ie{constructor(h={}){ee(this,"baseUrl"),ee(this,"timeout"),this.baseUrl=h.pistonUrl||"/api/piston",this.timeout=h.timeout||3e3}async getRuntimes(h=!1){if(K&&!h)return K;try{const r=await fetch(`${this.baseUrl}/runtimes`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok)throw new Error(`Failed to fetch runtimes: ${r.statusText}`);const u=await r.json();return K=u,u}catch(r){throw console.error("Failed to fetch runtimes:",r),r}}async execute(h,r,u={}){const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");var oe=Object.defineProperty,se=(l,h,r)=>h in l?oe(l,h,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[h]=r,ee=(l,h,r)=>se(l,typeof h!="symbol"?h+"":h,r);let K=null;class ie{constructor(h={}){ee(this,"baseUrl"),ee(this,"timeout"),this.baseUrl=h.pistonUrl||"/api/piston",this.timeout=h.timeout||3e3}async getRuntimes(h=!1){if(K&&!h)return K;try{const r=await fetch(`${this.baseUrl}/runtimes`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok)throw new Error(`Failed to fetch runtimes: ${r.statusText}`);const u=await r.json();return K=u,u}catch(r){throw console.error("Failed to fetch runtimes:",r),r}}async execute(h,r,u={}){const b=(await this.getRuntimes()).find(f=>{var E;return f.language.toLowerCase()===h.toLowerCase()||((E=f.aliases)==null?void 0:E.some(N=>N.toLowerCase()===h.toLowerCase()))});if(!b)throw new Error(`Language '${h}' is not supported`);const T=this.getFileName(h),S={language:b.language,version:u.version||b.version,files:[{name:T,content:r}],stdin:u.stdin||"",args:u.args||[],run_timeout:u.runTimeout||this.timeout,compile_timeout:this.timeout},i=Date.now();try{const f=await fetch(`${this.baseUrl}/execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(S)});if(!f.ok)throw new Error(`Execute failed: ${f.statusText}`);const E=await f.json(),N=Date.now()-i,C=E.run.stdout||"",F=E.run.stderr||"";return{success:E.run.code===0,output:C,stderr:F,code:E.run.code,executionTime:N,compile:E.compile?{stdout:E.compile.stdout||"",stderr:E.compile.stderr||"",code:E.compile.code}:void 0}}catch(f){return{success:!1,output:"",stderr:f instanceof Error?f.message:"Unknown error",code:-1,executionTime:Date.now()-i}}}getFileName(h){return{javascript:"main.js",typescript:"main.ts",python:"main.py",python3:"main.py",go:"main.go",rust:"main.rs",java:"Main.java",c:"main.c",cpp:"main.cpp",csharp:"Main.cs",ruby:"main.rb",php:"main.php",bash:"main.sh",shell:"main.sh",perl:"main.pl",lua:"main.lua",swift:"main.swift",kotlin:"Main.kt",scala:"Main.scala",haskell:"main.hs",dart:"main.dart",html:"index.html",css:"style.css",sql:"query.sql",markdown:"readme.md"}[h.toLowerCase()]||`main.${h}`}}const le={javascript:'console.log("Hello, World!");',typescript:'console.log("Hello, World!");',python:'print("Hello, World!")',python3:'print("Hello, World!")',go:`package main
|
|
2
2
|
|
|
3
3
|
import "fmt"
|
|
4
4
|
|
|
@@ -71,8 +71,8 @@ This is a sample markdown document.`};function q(l){const h=l.toLowerCase();retu
|
|
|
71
71
|
* @author Lea Verou <https://lea.verou.me>
|
|
72
72
|
* @namespace
|
|
73
73
|
* @public
|
|
74
|
-
*/var r=function(u){var E=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,T=0,S={},i={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function t(n){return n instanceof f?new f(n.type,t(n.content),n.alias):Array.isArray(n)?n.map(t):n.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(t){return Object.prototype.toString.call(t).slice(8,-1)},objId:function(t){return t.__id||Object.defineProperty(t,"__id",{value:++T}),t.__id},clone:function t(n,a){a=a||{};var o,s;switch(i.util.type(n)){case"Object":if(s=i.util.objId(n),a[s])return a[s];o={},a[s]=o;for(var d in n)n.hasOwnProperty(d)&&(o[d]=t(n[d],a));return o;case"Array":return s=i.util.objId(n),a[s]?a[s]:(o=[],a[s]=o,n.forEach(function(y,c){o[c]=t(y,a)}),o);default:return n}},getLanguage:function(t){for(;t;){var n=E.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return"none"},setLanguage:function(t,n){t.className=t.className.replace(RegExp(E,"gi"),""),t.classList.add("language-"+n)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(o){var t=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(o.stack)||[])[1];if(t){var n=document.getElementsByTagName("script");for(var a in n)if(n[a].src==t)return n[a]}return null}},isActive:function(t,n,a){for(var o="no-"+n;t;){var s=t.classList;if(s.contains(n))return!0;if(s.contains(o))return!1;t=t.parentElement}return!!a}},languages:{plain:S,plaintext:S,text:S,txt:S,extend:function(t,n){var a=i.util.clone(i.languages[t]);for(var o in n)a[o]=n[o];return a},insertBefore:function(t,n,a,o){o=o||i.languages;var s=o[t],d={};for(var y in s)if(s.hasOwnProperty(y)){if(y==n)for(var c in a)a.hasOwnProperty(c)&&(d[c]=a[c]);a.hasOwnProperty(y)||(d[y]=s[y])}var w=o[t];return o[t]=d,i.languages.DFS(i.languages,function(x,D){D===w&&x!=t&&(this[x]=d)}),d},DFS:function t(n,a,o,s){s=s||{};var d=i.util.objId;for(var y in n)if(n.hasOwnProperty(y)){a.call(n,y,n[y],o||y);var c=n[y],w=i.util.type(c);w==="Object"&&!s[d(c)]?(s[d(c)]=!0,t(c,a,null,s)):w==="Array"&&!s[d(c)]&&(s[d(c)]=!0,t(c,a,y,s))}}},plugins:{},highlightAll:function(t,n){i.highlightAllUnder(document,t,n)},highlightAllUnder:function(t,n,a){var o={callback:a,container:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",o),o.elements=Array.prototype.slice.apply(o.container.querySelectorAll(o.selector)),i.hooks.run("before-all-elements-highlight",o);for(var s=0,d;d=o.elements[s++];)i.highlightElement(d,n===!0,o.callback)},highlightElement:function(t,n,a){var o=i.util.getLanguage(t),s=i.languages[o];i.util.setLanguage(t,o);var d=t.parentElement;d&&d.nodeName.toLowerCase()==="pre"&&i.util.setLanguage(d,o);var y=t.textContent,c={element:t,language:o,grammar:s,code:y};function w(D){c.highlightedCode=D,i.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,i.hooks.run("after-highlight",c),i.hooks.run("complete",c),a&&a.call(c.element)}if(i.hooks.run("before-sanity-check",c),d=c.element.parentElement,d&&d.nodeName.toLowerCase()==="pre"&&!d.hasAttribute("tabindex")&&d.setAttribute("tabindex","0"),!c.code){i.hooks.run("complete",c),a&&a.call(c.element);return}if(i.hooks.run("before-highlight",c),!c.grammar){w(i.util.encode(c.code));return}if(n&&u.Worker){var x=new Worker(i.filename);x.onmessage=function(D){w(D.data)},x.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else w(i.highlight(c.code,c.grammar,c.language))},highlight:function(t,n,a){var o={code:t,grammar:n,language:a};if(i.hooks.run("before-tokenize",o),!o.grammar)throw new Error('The language "'+o.language+'" has no grammar.');return o.tokens=i.tokenize(o.code,o.grammar),i.hooks.run("after-tokenize",o),f.stringify(i.util.encode(o.tokens),o.language)},tokenize:function(t,n){var a=n.rest;if(a){for(var o in a)n[o]=a[o];delete n.rest}var s=new C;return F(s,s.head,t),N(t,s,n,s.head,0),O(s)},hooks:{all:{},add:function(t,n){var a=i.hooks.all;a[t]=a[t]||[],a[t].push(n)},run:function(t,n){var a=i.hooks.all[t];if(!(!a||!a.length))for(var o=0,s;s=a[o++];)s(n)}},Token:f};u.Prism=i;function f(t,n,a,o){this.type=t,this.content=n,this.alias=a,this.length=(o||"").length|0}f.stringify=function t(n,a){if(typeof n=="string")return n;if(Array.isArray(n)){var o="";return n.forEach(function(w){o+=t(w,a)}),o}var s={type:n.type,content:t(n.content,a),tag:"span",classes:["token",n.type],attributes:{},language:a},d=n.alias;d&&(Array.isArray(d)?Array.prototype.push.apply(s.classes,d):s.classes.push(d)),i.hooks.run("wrap",s);var y="";for(var c in s.attributes)y+=" "+c+'="'+(s.attributes[c]||"").replace(/"/g,""")+'"';return"<"+s.tag+' class="'+s.classes.join(" ")+'"'+y+">"+s.content+"</"+s.tag+">"};function b(t,n,a,o){t.lastIndex=n;var s=t.exec(a);if(s&&o&&s[1]){var d=s[1].length;s.index+=d,s[0]=s[0].slice(d)}return s}function N(t,n,a,o,s,d){for(var y in a)if(!(!a.hasOwnProperty(y)||!a[y])){var c=a[y];c=Array.isArray(c)?c:[c];for(var w=0;w<c.length;++w){if(d&&d.cause==y+","+w)return;var x=c[w],D=x.inside,H=!!x.lookbehind,B=!!x.greedy,W=x.alias;if(B&&!x.pattern.global){var V=x.pattern.toString().match(/[imsuy]*$/)[0];x.pattern=RegExp(x.pattern.source,V+"g")}for(var $=x.pattern||x,I=o.next,p=s;I!==n.tail&&!(d&&p>=d.reach);p+=I.value.length,I=I.next){var g=I.value;if(n.length>t.length)return;if(!(g instanceof f)){var k=1,_;if(B){if(_=b($,p,t,H),!_||_.index>=t.length)break;var G=_.index,M=_.index+_[0].length,L=p;for(L+=I.value.length;G>=L;)I=I.next,L+=I.value.length;if(L-=I.value.length,p=L,I.value instanceof f)continue;for(var P=I;P!==n.tail&&(L<M||typeof P.value=="string");P=P.next)k++,L+=P.value.length;k--,g=t.slice(p,L),_.index-=p}else if(_=b($,0,g,H),!_)continue;var G=_.index,z=_[0],Y=g.slice(0,G),Q=g.slice(G+z.length),X=p+g.length;d&&X>d.reach&&(d.reach=X);var j=I.prev;Y&&(j=F(n,j,Y),p+=Y.length),R(n,j,k);var ae=new f(y,D?i.tokenize(z,D):z,W,z);if(I=F(n,j,ae),Q&&F(n,I,Q),k>1){var Z={cause:y+","+w,reach:X};N(t,n,a,I.prev,p,Z),d&&Z.reach>d.reach&&(d.reach=Z.reach)}}}}}}function C(){var t={value:null,prev:null,next:null},n={value:null,prev:t,next:null};t.next=n,this.head=t,this.tail=n,this.length=0}function F(t,n,a){var o=n.next,s={value:a,prev:n,next:o};return n.next=s,o.prev=s,t.length++,s}function R(t,n,a){for(var o=n.next,s=0;s<a&&o!==t.tail;s++)o=o.next;n.next=o,o.prev=n,t.length-=s}function O(t){for(var n=[],a=t.head.next;a!==t.tail;)n.push(a.value),a=a.next;return n}if(!u.document)return u.addEventListener&&(i.disableWorkerMessageHandler||u.addEventListener("message",function(t){var n=JSON.parse(t.data),a=n.language,o=n.code,s=n.immediateClose;u.postMessage(i.highlight(o,i.languages[a],a)),s&&u.close()},!1)),i;var A=i.util.currentScript();A&&(i.filename=A.src,A.hasAttribute("data-manual")&&(i.manual=!0));function v(){i.manual||i.highlightAll()}if(!i.manual){var m=document.readyState;m==="loading"||m==="interactive"&&A&&A.defer?document.addEventListener("DOMContentLoaded",v):window.requestAnimationFrame?window.requestAnimationFrame(v):window.setTimeout(v,16)}return i}(h);l.exports&&(l.exports=r),typeof te<"u"&&(te.Prism=r),r.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(u){u.type==="entity"&&(u.attributes.title=u.content.replace(/&/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(E,T){var S={};S["language-"+T]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:r.languages[T]},S.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:S}};i["language-"+T]={pattern:/[\s\S]+/,inside:r.languages[T]};var f={};f[E]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return E}),"i"),lookbehind:!0,greedy:!0,inside:i},r.languages.insertBefore("markup","cdata",f)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(u,E){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+u+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[E,"language-"+E],inside:r.languages[E]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(u){var E=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;u.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+E.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+E.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+E.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+E.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:E,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},u.languages.css.atrule.inside.rest=u.languages.css;var T=u.languages.markup;T&&(T.tag.addInlined("style","css"),T.tag.addAttribute("style","css"))}(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,function(){if(typeof r>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var u="Loading…",E=function(A,v){return"✖ Error "+A+" while fetching file: "+v},T="✖ Error: File does not exist or is empty",S={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},i="data-src-status",f="loading",b="loaded",N="failed",C="pre[data-src]:not(["+i+'="'+b+'"]):not(['+i+'="'+f+'"])';function F(A,v,m){var t=new XMLHttpRequest;t.open("GET",A,!0),t.onreadystatechange=function(){t.readyState==4&&(t.status<400&&t.responseText?v(t.responseText):t.status>=400?m(E(t.status,t.statusText)):m(T))},t.send(null)}function R(A){var v=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(A||"");if(v){var m=Number(v[1]),t=v[2],n=v[3];return t?n?[m,Number(n)]:[m,void 0]:[m,m]}}r.hooks.add("before-highlightall",function(A){A.selector+=", "+C}),r.hooks.add("before-sanity-check",function(A){var v=A.element;if(v.matches(C)){A.code="",v.setAttribute(i,f);var m=v.appendChild(document.createElement("CODE"));m.textContent=u;var t=v.getAttribute("data-src"),n=A.language;if(n==="none"){var a=(/\.(\w+)$/.exec(t)||[,"none"])[1];n=S[a]||a}r.util.setLanguage(m,n),r.util.setLanguage(v,n);var o=r.plugins.autoloader;o&&o.loadLanguages(n),F(t,function(s){v.setAttribute(i,b);var d=R(v.getAttribute("data-range"));if(d){var y=s.split(/\r\n?|\n/g),c=d[0],w=d[1]==null?y.length:d[1];c<0&&(c+=y.length),c=Math.max(0,Math.min(c-1,y.length)),w<0&&(w+=y.length),w=Math.max(0,Math.min(w,y.length)),s=y.slice(c,w).join(`
|
|
75
|
-
`),v.hasAttribute("data-start")||v.setAttribute("data-start",String(c+1))}m.textContent=s,r.highlightElement(m)},function(s){v.setAttribute(i,N),m.textContent=s})}}),r.plugins.fileHighlight={highlight:function(v){for(var m=(v||document).querySelectorAll(C),t=0,n;n=m[t++];)r.highlightElement(n)}};var O=!1;r.fileHighlight=function(){O||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),O=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(ne);var ce=ne.exports;const J=ue(ce);Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/});Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}});delete Prism.languages.go["class-name"];(function(l){var h=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,u={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};l.languages.java=l.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[u,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:u.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:u.inside}],keyword:h,function:[l.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),l.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),l.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":u,keyword:h,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:u.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:u.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return h.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(l){for(var h=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,r=0;r<2;r++)h=h.replace(/<self>/g,function(){return h});h=h.replace(/<self>/g,function(){return/[^\s\S]/.source}),l.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+h),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},l.languages.rust["closure-params"].inside.rest=l.languages.rust,l.languages.rust.attribute.inside.string=l.languages.rust.string})(Prism);Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(l){var h="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},u={bash:r,environment:{pattern:RegExp("\\$"+h),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+h),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};l.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+h),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:u},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:u},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:u.entity}}],environment:{pattern:RegExp("\\$?"+h),alias:"constant"},variable:u.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=l.languages.bash;for(var E=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],T=u.variable[1].inside,S=0;S<E.length;S++)T[E[S]]=l.languages.bash[E[S]];l.languages.sh=l.languages.bash,l.languages.shell=l.languages.bash})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;const de=`
|
|
74
|
+
*/var r=function(u){var b=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,T=0,S={},i={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function t(n){return n instanceof f?new f(n.type,t(n.content),n.alias):Array.isArray(n)?n.map(t):n.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(t){return Object.prototype.toString.call(t).slice(8,-1)},objId:function(t){return t.__id||Object.defineProperty(t,"__id",{value:++T}),t.__id},clone:function t(n,a){a=a||{};var o,s;switch(i.util.type(n)){case"Object":if(s=i.util.objId(n),a[s])return a[s];o={},a[s]=o;for(var d in n)n.hasOwnProperty(d)&&(o[d]=t(n[d],a));return o;case"Array":return s=i.util.objId(n),a[s]?a[s]:(o=[],a[s]=o,n.forEach(function(y,c){o[c]=t(y,a)}),o);default:return n}},getLanguage:function(t){for(;t;){var n=b.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return"none"},setLanguage:function(t,n){t.className=t.className.replace(RegExp(b,"gi"),""),t.classList.add("language-"+n)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(o){var t=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(o.stack)||[])[1];if(t){var n=document.getElementsByTagName("script");for(var a in n)if(n[a].src==t)return n[a]}return null}},isActive:function(t,n,a){for(var o="no-"+n;t;){var s=t.classList;if(s.contains(n))return!0;if(s.contains(o))return!1;t=t.parentElement}return!!a}},languages:{plain:S,plaintext:S,text:S,txt:S,extend:function(t,n){var a=i.util.clone(i.languages[t]);for(var o in n)a[o]=n[o];return a},insertBefore:function(t,n,a,o){o=o||i.languages;var s=o[t],d={};for(var y in s)if(s.hasOwnProperty(y)){if(y==n)for(var c in a)a.hasOwnProperty(c)&&(d[c]=a[c]);a.hasOwnProperty(y)||(d[y]=s[y])}var w=o[t];return o[t]=d,i.languages.DFS(i.languages,function(x,D){D===w&&x!=t&&(this[x]=d)}),d},DFS:function t(n,a,o,s){s=s||{};var d=i.util.objId;for(var y in n)if(n.hasOwnProperty(y)){a.call(n,y,n[y],o||y);var c=n[y],w=i.util.type(c);w==="Object"&&!s[d(c)]?(s[d(c)]=!0,t(c,a,null,s)):w==="Array"&&!s[d(c)]&&(s[d(c)]=!0,t(c,a,y,s))}}},plugins:{},highlightAll:function(t,n){i.highlightAllUnder(document,t,n)},highlightAllUnder:function(t,n,a){var o={callback:a,container:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",o),o.elements=Array.prototype.slice.apply(o.container.querySelectorAll(o.selector)),i.hooks.run("before-all-elements-highlight",o);for(var s=0,d;d=o.elements[s++];)i.highlightElement(d,n===!0,o.callback)},highlightElement:function(t,n,a){var o=i.util.getLanguage(t),s=i.languages[o];i.util.setLanguage(t,o);var d=t.parentElement;d&&d.nodeName.toLowerCase()==="pre"&&i.util.setLanguage(d,o);var y=t.textContent,c={element:t,language:o,grammar:s,code:y};function w(D){c.highlightedCode=D,i.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,i.hooks.run("after-highlight",c),i.hooks.run("complete",c),a&&a.call(c.element)}if(i.hooks.run("before-sanity-check",c),d=c.element.parentElement,d&&d.nodeName.toLowerCase()==="pre"&&!d.hasAttribute("tabindex")&&d.setAttribute("tabindex","0"),!c.code){i.hooks.run("complete",c),a&&a.call(c.element);return}if(i.hooks.run("before-highlight",c),!c.grammar){w(i.util.encode(c.code));return}if(n&&u.Worker){var x=new Worker(i.filename);x.onmessage=function(D){w(D.data)},x.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else w(i.highlight(c.code,c.grammar,c.language))},highlight:function(t,n,a){var o={code:t,grammar:n,language:a};if(i.hooks.run("before-tokenize",o),!o.grammar)throw new Error('The language "'+o.language+'" has no grammar.');return o.tokens=i.tokenize(o.code,o.grammar),i.hooks.run("after-tokenize",o),f.stringify(i.util.encode(o.tokens),o.language)},tokenize:function(t,n){var a=n.rest;if(a){for(var o in a)n[o]=a[o];delete n.rest}var s=new C;return F(s,s.head,t),N(t,s,n,s.head,0),O(s)},hooks:{all:{},add:function(t,n){var a=i.hooks.all;a[t]=a[t]||[],a[t].push(n)},run:function(t,n){var a=i.hooks.all[t];if(!(!a||!a.length))for(var o=0,s;s=a[o++];)s(n)}},Token:f};u.Prism=i;function f(t,n,a,o){this.type=t,this.content=n,this.alias=a,this.length=(o||"").length|0}f.stringify=function t(n,a){if(typeof n=="string")return n;if(Array.isArray(n)){var o="";return n.forEach(function(w){o+=t(w,a)}),o}var s={type:n.type,content:t(n.content,a),tag:"span",classes:["token",n.type],attributes:{},language:a},d=n.alias;d&&(Array.isArray(d)?Array.prototype.push.apply(s.classes,d):s.classes.push(d)),i.hooks.run("wrap",s);var y="";for(var c in s.attributes)y+=" "+c+'="'+(s.attributes[c]||"").replace(/"/g,""")+'"';return"<"+s.tag+' class="'+s.classes.join(" ")+'"'+y+">"+s.content+"</"+s.tag+">"};function E(t,n,a,o){t.lastIndex=n;var s=t.exec(a);if(s&&o&&s[1]){var d=s[1].length;s.index+=d,s[0]=s[0].slice(d)}return s}function N(t,n,a,o,s,d){for(var y in a)if(!(!a.hasOwnProperty(y)||!a[y])){var c=a[y];c=Array.isArray(c)?c:[c];for(var w=0;w<c.length;++w){if(d&&d.cause==y+","+w)return;var x=c[w],D=x.inside,H=!!x.lookbehind,B=!!x.greedy,W=x.alias;if(B&&!x.pattern.global){var V=x.pattern.toString().match(/[imsuy]*$/)[0];x.pattern=RegExp(x.pattern.source,V+"g")}for(var $=x.pattern||x,I=o.next,p=s;I!==n.tail&&!(d&&p>=d.reach);p+=I.value.length,I=I.next){var g=I.value;if(n.length>t.length)return;if(!(g instanceof f)){var k=1,_;if(B){if(_=E($,p,t,H),!_||_.index>=t.length)break;var G=_.index,M=_.index+_[0].length,L=p;for(L+=I.value.length;G>=L;)I=I.next,L+=I.value.length;if(L-=I.value.length,p=L,I.value instanceof f)continue;for(var P=I;P!==n.tail&&(L<M||typeof P.value=="string");P=P.next)k++,L+=P.value.length;k--,g=t.slice(p,L),_.index-=p}else if(_=E($,0,g,H),!_)continue;var G=_.index,z=_[0],Y=g.slice(0,G),Q=g.slice(G+z.length),X=p+g.length;d&&X>d.reach&&(d.reach=X);var j=I.prev;Y&&(j=F(n,j,Y),p+=Y.length),R(n,j,k);var ae=new f(y,D?i.tokenize(z,D):z,W,z);if(I=F(n,j,ae),Q&&F(n,I,Q),k>1){var Z={cause:y+","+w,reach:X};N(t,n,a,I.prev,p,Z),d&&Z.reach>d.reach&&(d.reach=Z.reach)}}}}}}function C(){var t={value:null,prev:null,next:null},n={value:null,prev:t,next:null};t.next=n,this.head=t,this.tail=n,this.length=0}function F(t,n,a){var o=n.next,s={value:a,prev:n,next:o};return n.next=s,o.prev=s,t.length++,s}function R(t,n,a){for(var o=n.next,s=0;s<a&&o!==t.tail;s++)o=o.next;n.next=o,o.prev=n,t.length-=s}function O(t){for(var n=[],a=t.head.next;a!==t.tail;)n.push(a.value),a=a.next;return n}if(!u.document)return u.addEventListener&&(i.disableWorkerMessageHandler||u.addEventListener("message",function(t){var n=JSON.parse(t.data),a=n.language,o=n.code,s=n.immediateClose;u.postMessage(i.highlight(o,i.languages[a],a)),s&&u.close()},!1)),i;var A=i.util.currentScript();A&&(i.filename=A.src,A.hasAttribute("data-manual")&&(i.manual=!0));function v(){i.manual||i.highlightAll()}if(!i.manual){var m=document.readyState;m==="loading"||m==="interactive"&&A&&A.defer?document.addEventListener("DOMContentLoaded",v):window.requestAnimationFrame?window.requestAnimationFrame(v):window.setTimeout(v,16)}return i}(h);l.exports&&(l.exports=r),typeof te<"u"&&(te.Prism=r),r.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(u){u.type==="entity"&&(u.attributes.title=u.content.replace(/&/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(b,T){var S={};S["language-"+T]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:r.languages[T]},S.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:S}};i["language-"+T]={pattern:/[\s\S]+/,inside:r.languages[T]};var f={};f[b]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return b}),"i"),lookbehind:!0,greedy:!0,inside:i},r.languages.insertBefore("markup","cdata",f)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(u,b){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+u+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[b,"language-"+b],inside:r.languages[b]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(u){var b=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;u.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+b.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+b.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+b.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+b.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:b,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},u.languages.css.atrule.inside.rest=u.languages.css;var T=u.languages.markup;T&&(T.tag.addInlined("style","css"),T.tag.addAttribute("style","css"))}(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,function(){if(typeof r>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var u="Loading…",b=function(A,v){return"✖ Error "+A+" while fetching file: "+v},T="✖ Error: File does not exist or is empty",S={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},i="data-src-status",f="loading",E="loaded",N="failed",C="pre[data-src]:not(["+i+'="'+E+'"]):not(['+i+'="'+f+'"])';function F(A,v,m){var t=new XMLHttpRequest;t.open("GET",A,!0),t.onreadystatechange=function(){t.readyState==4&&(t.status<400&&t.responseText?v(t.responseText):t.status>=400?m(b(t.status,t.statusText)):m(T))},t.send(null)}function R(A){var v=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(A||"");if(v){var m=Number(v[1]),t=v[2],n=v[3];return t?n?[m,Number(n)]:[m,void 0]:[m,m]}}r.hooks.add("before-highlightall",function(A){A.selector+=", "+C}),r.hooks.add("before-sanity-check",function(A){var v=A.element;if(v.matches(C)){A.code="",v.setAttribute(i,f);var m=v.appendChild(document.createElement("CODE"));m.textContent=u;var t=v.getAttribute("data-src"),n=A.language;if(n==="none"){var a=(/\.(\w+)$/.exec(t)||[,"none"])[1];n=S[a]||a}r.util.setLanguage(m,n),r.util.setLanguage(v,n);var o=r.plugins.autoloader;o&&o.loadLanguages(n),F(t,function(s){v.setAttribute(i,E);var d=R(v.getAttribute("data-range"));if(d){var y=s.split(/\r\n?|\n/g),c=d[0],w=d[1]==null?y.length:d[1];c<0&&(c+=y.length),c=Math.max(0,Math.min(c-1,y.length)),w<0&&(w+=y.length),w=Math.max(0,Math.min(w,y.length)),s=y.slice(c,w).join(`
|
|
75
|
+
`),v.hasAttribute("data-start")||v.setAttribute("data-start",String(c+1))}m.textContent=s,r.highlightElement(m)},function(s){v.setAttribute(i,N),m.textContent=s})}}),r.plugins.fileHighlight={highlight:function(v){for(var m=(v||document).querySelectorAll(C),t=0,n;n=m[t++];)r.highlightElement(n)}};var O=!1;r.fileHighlight=function(){O||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),O=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(ne);var ce=ne.exports;const J=ue(ce);Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/});Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}});delete Prism.languages.go["class-name"];(function(l){var h=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,u={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};l.languages.java=l.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[u,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:u.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:u.inside}],keyword:h,function:[l.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),l.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),l.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":u,keyword:h,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:u.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:u.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return h.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(l){for(var h=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,r=0;r<2;r++)h=h.replace(/<self>/g,function(){return h});h=h.replace(/<self>/g,function(){return/[^\s\S]/.source}),l.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+h),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},l.languages.rust["closure-params"].inside.rest=l.languages.rust,l.languages.rust.attribute.inside.string=l.languages.rust.string})(Prism);Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(l){var h="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},u={bash:r,environment:{pattern:RegExp("\\$"+h),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+h),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};l.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+h),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:u},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:u},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:u.entity}}],environment:{pattern:RegExp("\\$?"+h),alias:"constant"},variable:u.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=l.languages.bash;for(var b=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],T=u.variable[1].inside,S=0;S<b.length;S++)T[b[S]]=l.languages.bash[b[S]];l.languages.sh=l.languages.bash,l.languages.shell=l.languages.bash})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;const de=`
|
|
76
76
|
/* 默认代码颜色 */
|
|
77
77
|
.hep-cr-editor .hep-cr-highlight code,
|
|
78
78
|
.hep-cr-editor .hep-cr-highlight pre {
|
|
@@ -235,4 +235,4 @@ This is a sample markdown document.`};function q(l){const h=l.toLowerCase();retu
|
|
|
235
235
|
.hep-cr-editor .token.console {
|
|
236
236
|
color: #333 !important;
|
|
237
237
|
}
|
|
238
|
-
`,ge=["innerHTML"],he=["value","disabled"],me=500,fe=e.defineComponent({__name:"CodeEditor",props:{modelValue:{},language:{},theme:{default:"dark"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(l,{emit:h}){e.useCssVars(m=>({v2b19bab6:C.value})),typeof window<"u"&&(window.Prism=J);function r(m){if(typeof document>"u")return;const t="hep-cr-prism-styles",n=document.getElementById(t),a=m==="dark"?de:pe;n&&n.remove();const o=document.createElement("style");o.id=t,o.textContent=a,document.head.appendChild(o)}const u=l,E=h,T=e.ref(null),S=e.ref(null);let i=null;function f(m){i&&clearTimeout(i),i=setTimeout(()=>{E("change",m)},me)}const b={javascript:"javascript",js:"javascript",typescript:"typescript",ts:"typescript",python:"python",py:"python",java:"java",c:"c",cpp:"cpp","c++":"cpp",csharp:"csharp","c#":"csharp",go:"go",golang:"go",rust:"rust",ruby:"ruby",rb:"ruby",php:"php",swift:"swift",kotlin:"kotlin",kt:"kotlin",sql:"sql",bash:"bash",sh:"bash",shell:"bash",json:"json",yaml:"yaml",yml:"yaml",markdown:"markdown",md:"markdown"},N=e.computed(()=>b[u.language.toLowerCase()]||"javascript"),C=e.computed(()=>u.theme==="dark"?"#1e1e1e":"#fafafa"),F=e.computed(()=>{try{const m=J.languages[N.value];if(m)return J.highlight(u.modelValue||"",m,N.value)}catch{}return R(u.modelValue||"")});function R(m){const t=document.createElement("div");return t.textContent=m,t.innerHTML}function O(m){const t=m.target;E("update:modelValue",t.value),f(t.value)}function A(){T.value&&S.value&&(S.value.scrollTop=T.value.scrollTop,S.value.scrollLeft=T.value.scrollLeft)}function v(m){if(m.key==="Tab"){m.preventDefault();const t=m.target,n=t.selectionStart,a=t.selectionEnd,o=t.value;t.value=o.substring(0,n)+" "+o.substring(a),t.selectionStart=t.selectionEnd=n+2,E("update:modelValue",t.value),f(t.value)}}return e.onMounted(()=>{r(u.theme)}),e.watch(()=>u.theme,m=>{r(m)}),e.onUnmounted(()=>{i&&clearTimeout(i)}),(m,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hep-cr-editor",`hep-cr-theme-${l.theme}`])},[e.createElementVNode("pre",{ref_key:"highlightRef",ref:S,class:e.normalizeClass(["hep-cr-highlight",[`language-${N.value}`,`hep-cr-prism-${l.theme}`]]),"aria-hidden":"true"},[e.createElementVNode("code",{innerHTML:F.value},null,8,ge)],2),e.createElementVNode("textarea",{ref_key:"codeRef",ref:T,class:"hep-cr-input",value:l.modelValue,disabled:l.disabled,onInput:O,onScroll:A,onKeydown:v,spellcheck:"false",placeholder:"Write your code here..."},null,40,he)],2))}}),re=(l,h)=>{const r=l.__vccOpts||l;for(const[u,E]of h)r[u]=E;return r},Ee=re(fe,[["__scopeId","data-v-a988ca2a"]]),be={class:"hep-cr-header"},ve={class:"hep-cr-controls"},ye=["disabled"],ke={key:0,value:""},Se=["value"],Ae={class:"hep-cr-actions"},we=["disabled"],Te={key:0,class:"hep-cr-spinner"},Ne={key:1,class:"hep-cr-run-icon"},_e=["title"],xe={key:0,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Ie={key:1,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Fe={key:0,class:"hep-cr-error"},Re={class:"hep-cr-main"},Ce={class:"hep-cr-panel-header"},Oe={class:"hep-cr-output-actions"},Le={class:"hep-cr-language-badge"},De=["disabled","title"],Pe={key:0,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Be={key:1,class:"hep-cr-copied-text"},$e={class:"hep-cr-panel-header"},Me={class:"hep-cr-output-tabs"},Ue={class:"hep-cr-output-actions"},He={key:0,class:"hep-cr-execution-time"},Ve=["disabled","title"],Ge={key:0,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},ze={key:1,class:"hep-cr-copied-text"},je={class:"hep-cr-output-content"},We={key:0},Ye={key:1,class:"hep-cr-stderr"},Xe=e.defineComponent({__name:"CodeRunner",props:{pistonUrl:{default:"/api/piston"},language:{default:"javascript"},theme:{default:"light"},themeColor:{default:""},showLanguageSelector:{type:Boolean,default:!0},showEditor:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},defaultCode:{},executorLabel:{default:"运行"}},emits:["execute-start","execute-end","language-change","change"],setup(l,{emit:h}){const r=l,u=e.computed(()=>{if(!r.themeColor)return{};const p=r.theme==="dark",g=r.themeColor,_=E(g)?"#000":"#fff";return{"--hep-cr-theme-color":g,"--hep-cr-theme-color-hover":p?T(g,20):T(g,-20),"--hep-cr-tab-active-color":_}});function E(p){const g=parseInt(p.replace("#",""),16),k=g>>16&255,_=g>>8&255,M=g&255;return(.299*k+.587*_+.114*M)/255>.5}function T(p,g){const k=parseInt(p.replace("#",""),16),_=Math.round(2.55*g),M=Math.min(255,Math.max(0,(k>>16)+_)),L=Math.min(255,Math.max(0,(k>>8&255)+_)),P=Math.min(255,Math.max(0,(k&255)+_));return"#"+(16777216+M*65536+L*256+P).toString(16).slice(1)}const S=h,i=e.ref([]),f=e.ref(r.language),b=e.ref(r.theme),N=e.ref(""),C=e.ref(""),F=e.ref(""),R=e.ref(!1),O=e.ref(null),A=e.ref("stdout"),v=e.ref(null),m=e.ref(!1),t=e.ref(60);function n(){b.value=b.value==="light"?"dark":"light"}const a=e.computed(()=>new ie({pistonUrl:r.pistonUrl})),o=e.computed(()=>i.value.map(p=>({value:`${p.language}:${p.version}`,label:`${p.language.charAt(0).toUpperCase()+p.language.slice(1)} ${p.version}`}))),s=e.computed(()=>{const p=f.value;return p.includes(":")?p.split(":")[0]:p});async function d(){m.value=!0,v.value=null;try{i.value=await a.value.getRuntimes();const p=f.value.split(":")[0],g=i.value.find(k=>k.language===p);g&&!f.value.includes(":")&&(f.value=`${p}:${g.version}`)}catch(p){v.value=p instanceof Error?p.message:"Failed to load runtimes"}finally{m.value=!1}}e.watch(f,p=>{const g=p.includes(":")?p.split(":")[0]:p,k=q(g);N.value=k,S("language-change",g,k)});async function y(){if(!R.value){R.value=!0,C.value="",F.value="",O.value=null,v.value=null,A.value="stdout",S("execute-start");try{const p=await a.value.execute(s.value,N.value);C.value=p.output,F.value=p.stderr,O.value=p.executionTime||null,A.value=p.stderr?"stderr":"stdout",S("execute-end",p)}catch(p){v.value=p instanceof Error?p.message:"Execution failed",S("execute-end",{success:!1,output:"",stderr:v.value,code:-1})}finally{R.value=!1}}}const c=e.ref(!1),w=e.ref(!1);async function x(){await navigator.clipboard.writeText(N.value),c.value=!0,setTimeout(()=>{c.value=!1},2e3)}async function D(){const p=A.value==="stdout"?C.value:F.value;await navigator.clipboard.writeText(p),w.value=!0,setTimeout(()=>{w.value=!1},2e3)}function H(){N.value=q(s.value)}let B=!1;function W(p){B=!0,document.addEventListener("mousemove",V),document.addEventListener("mouseup",$),document.body.style.cursor="col-resize",document.body.style.userSelect="none"}function V(p){if(!B)return;const g=document.querySelector(".hep-cr-main");if(!g)return;const k=g.getBoundingClientRect(),_=(p.clientX-k.left)/k.width*100;t.value=Math.max(20,Math.min(80,_))}function $(){B=!1,document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",$),document.body.style.cursor="",document.body.style.userSelect=""}e.onMounted(async()=>{await d(),N.value||(N.value=r.defaultCode||q(f.value))});const I=e.computed(()=>`hep-cr-runner-${b.value}`);return(p,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hep-cr-runner",I.value]),style:e.normalizeStyle(u.value)},[e.createElementVNode("div",be,[e.createElementVNode("div",ve,[l.showLanguageSelector?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:0,"onUpdate:modelValue":g[0]||(g[0]=k=>f.value=k),class:"hep-cr-language-select",disabled:R.value},[m.value?(e.openBlock(),e.createElementBlock("option",ke,"加载中...")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,k=>(e.openBlock(),e.createElementBlock("option",{key:k.value,value:k.value},e.toDisplayString(k.label),9,Se))),128))],8,ye)),[[e.vModelSelect,f.value]]):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ae,[e.createElementVNode("button",{class:"hep-cr-btn hep-cr-btn-run",disabled:R.value||m.value,onClick:y},[R.value?(e.openBlock(),e.createElementBlock("span",Te)):(e.openBlock(),e.createElementBlock("span",Ne,"▶")),e.createTextVNode(" "+e.toDisplayString(R.value?"运行中...":l.executorLabel),1)],8,we),l.showEditor&&l.editable?(e.openBlock(),e.createElementBlock("button",{key:0,class:"hep-cr-btn hep-cr-btn-reset",onClick:H}," 重置 ")):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"hep-cr-btn hep-cr-btn-theme",onClick:n,title:b.value==="light"?"Switch to dark mode":"Switch to light mode"},[b.value==="light"?(e.openBlock(),e.createElementBlock("svg",xe,[...g[5]||(g[5]=[e.createElementVNode("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",Ie,[...g[6]||(g[6]=[e.createStaticVNode('<circle cx="12" cy="12" r="5" data-v-37101672></circle><line x1="12" y1="1" x2="12" y2="3" data-v-37101672></line><line x1="12" y1="21" x2="12" y2="23" data-v-37101672></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64" data-v-37101672></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78" data-v-37101672></line><line x1="1" y1="12" x2="3" y2="12" data-v-37101672></line><line x1="21" y1="12" x2="23" y2="12" data-v-37101672></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36" data-v-37101672></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22" data-v-37101672></line>',9)])]))],8,_e)])]),v.value?(e.openBlock(),e.createElementBlock("div",Fe,e.toDisplayString(v.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Re,[l.showEditor?(e.openBlock(),e.createElementBlock("div",{key:0,class:"hep-cr-editor-panel",style:e.normalizeStyle({width:t.value+"%"})},[e.createElementVNode("div",Ce,[g[8]||(g[8]=e.createElementVNode("span",{class:"hep-cr-panel-title"},"编辑器",-1)),e.createElementVNode("div",Oe,[e.createElementVNode("span",Le,e.toDisplayString(s.value),1),e.createElementVNode("button",{class:e.normalizeClass(["hep-cr-btn-icon",{"hep-cr-btn-copied":c.value}]),disabled:c.value,onClick:x,title:c.value?"已复制":"复制"},[c.value?(e.openBlock(),e.createElementBlock("span",Be,"已复制")):(e.openBlock(),e.createElementBlock("svg",Pe,[...g[7]||(g[7]=[e.createElementVNode("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},null,-1),e.createElementVNode("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])]))],10,De)])]),e.createVNode(Ee,{modelValue:N.value,"onUpdate:modelValue":g[1]||(g[1]=k=>N.value=k),language:s.value,theme:b.value,disabled:!l.editable||R.value,onChange:g[2]||(g[2]=k=>S("change",k))},null,8,["modelValue","language","theme","disabled"])],4)):e.createCommentVNode("",!0),l.showEditor?(e.openBlock(),e.createElementBlock("div",{key:1,class:"hep-cr-resize-handle",onMousedown:W},[...g[9]||(g[9]=[e.createElementVNode("div",{class:"hep-cr-resize-line"},null,-1)])],32)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"hep-cr-output-panel",style:e.normalizeStyle({width:l.showEditor?100-t.value+"%":"100%"})},[e.createElementVNode("div",$e,[e.createElementVNode("div",Me,[e.createElementVNode("button",{class:e.normalizeClass(["hep-cr-tab",{active:A.value==="stdout"}]),onClick:g[3]||(g[3]=k=>A.value="stdout")}," 输出 ",2),F.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["hep-cr-tab","hep-cr-tab-error",{active:A.value==="stderr"}]),onClick:g[4]||(g[4]=k=>A.value="stderr")}," 错误 ",2)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ue,[O.value!==null?(e.openBlock(),e.createElementBlock("span",He,e.toDisplayString(O.value)+"ms ",1)):e.createCommentVNode("",!0),e.createElementVNode("button",{class:e.normalizeClass(["hep-cr-btn-icon",{"hep-cr-btn-copied":w.value}]),disabled:w.value,onClick:D,title:w.value?"已复制":"复制"},[w.value?(e.openBlock(),e.createElementBlock("span",ze,"已复制")):(e.openBlock(),e.createElementBlock("svg",Ge,[...g[10]||(g[10]=[e.createElementVNode("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},null,-1),e.createElementVNode("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])]))],10,Ve)])]),e.createElementVNode("div",je,[A.value==="stdout"?(e.openBlock(),e.createElementBlock("pre",We,e.toDisplayString(R.value?"代码执行中...":C.value||'点击"运行"执行代码'),1)):(e.openBlock(),e.createElementBlock("pre",Ye,e.toDisplayString(F.value),1))])],4)])],6))}}),U=re(Xe,[["__scopeId","data-v-37101672"]]),Ze={class:"hep-cr-dialog-header"},Ke={class:"hep-cr-dialog-title"},qe={class:"hep-cr-dialog-body"},Je={key:0,class:"hep-cr-dialog-footer"},Qe=e.defineComponent({__name:"CodeRunnerDialog",props:{modelValue:{type:Boolean,default:!1},title:{default:"代码执行器"},width:{default:800},pistonUrl:{default:"/api/piston"},language:{default:"javascript"},theme:{default:"light"},showLanguageSelector:{type:Boolean,default:!0},showEditor:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},defaultCode:{},executorLabel:{default:"运行"}},emits:["update:modelValue","close"],setup(l,{expose:h,emit:r}){const u=l,E=r,T=e.ref(u.modelValue),S=e.computed(()=>u.modelValue!==void 0?u.modelValue:T.value);e.watch(()=>u.modelValue,b=>{b!==void 0&&(T.value=b)});function i(){T.value=!1,E("update:modelValue",!1),E("close")}function f(b){b.target===b.currentTarget&&i()}return h({close:i}),(b,N)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"hep-cr-dialog-fade"},{default:e.withCtx(()=>[S.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"hep-cr-dialog-overlay",onClick:f},[e.createElementVNode("div",{class:"hep-cr-dialog-container",style:e.normalizeStyle({width:typeof l.width=="number"?l.width+"px":l.width})},[e.createElementVNode("div",Ze,[e.createElementVNode("h3",Ke,e.toDisplayString(l.title),1),e.createElementVNode("button",{class:"hep-cr-dialog-close",onClick:i},[...N[0]||(N[0]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])])]),e.createElementVNode("div",qe,[e.createVNode(U,e.normalizeProps(e.guardReactiveProps(b.$attrs)),null,16)]),b.$slots.footer?(e.openBlock(),e.createElementBlock("div",Je,[e.renderSlot(b.$slots,"footer",{close:i})])):e.createCommentVNode("",!0)],4)])):e.createCommentVNode("",!0)]),_:3})]))}});U.install=l=>{l.component("CodeRunner",U)};const et={install(l){l.component("CodeRunner",U)}};exports.CodeRunner=U;exports.CodeRunnerDialog=Qe;exports.default=et;
|
|
238
|
+
`,ge=["innerHTML"],he=["value","disabled"],me=500,fe=e.defineComponent({__name:"CodeEditor",props:{modelValue:{},language:{},theme:{default:"dark"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(l,{emit:h}){e.useCssVars(m=>({v2b19bab6:C.value})),typeof window<"u"&&(window.Prism=J);function r(m){if(typeof document>"u")return;const t="hep-cr-prism-styles",n=document.getElementById(t),a=m==="dark"?de:pe;n&&n.remove();const o=document.createElement("style");o.id=t,o.textContent=a,document.head.appendChild(o)}const u=l,b=h,T=e.ref(null),S=e.ref(null);let i=null;function f(m){i&&clearTimeout(i),i=setTimeout(()=>{b("change",m)},me)}const E={javascript:"javascript",js:"javascript",typescript:"typescript",ts:"typescript",python:"python",py:"python",java:"java",c:"c",cpp:"cpp","c++":"cpp",csharp:"csharp","c#":"csharp",go:"go",golang:"go",rust:"rust",ruby:"ruby",rb:"ruby",php:"php",swift:"swift",kotlin:"kotlin",kt:"kotlin",sql:"sql",bash:"bash",sh:"bash",shell:"bash",json:"json",yaml:"yaml",yml:"yaml",markdown:"markdown",md:"markdown"},N=e.computed(()=>E[u.language.toLowerCase()]||"javascript"),C=e.computed(()=>u.theme==="dark"?"#1e1e1e":"#fafafa"),F=e.computed(()=>{try{const m=J.languages[N.value];if(m)return J.highlight(u.modelValue||"",m,N.value)}catch{}return R(u.modelValue||"")});function R(m){const t=document.createElement("div");return t.textContent=m,t.innerHTML}function O(m){const t=m.target;b("update:modelValue",t.value),f(t.value)}function A(){T.value&&S.value&&(S.value.scrollTop=T.value.scrollTop,S.value.scrollLeft=T.value.scrollLeft)}function v(m){if(m.key==="Tab"){m.preventDefault();const t=m.target,n=t.selectionStart,a=t.selectionEnd,o=t.value;t.value=o.substring(0,n)+" "+o.substring(a),t.selectionStart=t.selectionEnd=n+2,b("update:modelValue",t.value),f(t.value)}}return e.onMounted(()=>{r(u.theme)}),e.watch(()=>u.theme,m=>{r(m)}),e.onUnmounted(()=>{i&&clearTimeout(i)}),(m,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hep-cr-editor",`hep-cr-theme-${l.theme}`])},[e.createElementVNode("pre",{ref_key:"highlightRef",ref:S,class:e.normalizeClass(["hep-cr-highlight",[`language-${N.value}`,`hep-cr-prism-${l.theme}`]]),"aria-hidden":"true"},[e.createElementVNode("code",{innerHTML:F.value},null,8,ge)],2),e.createElementVNode("textarea",{ref_key:"codeRef",ref:T,class:"hep-cr-input",value:l.modelValue,disabled:l.disabled,onInput:O,onScroll:A,onKeydown:v,spellcheck:"false",placeholder:"Write your code here..."},null,40,he)],2))}}),re=(l,h)=>{const r=l.__vccOpts||l;for(const[u,b]of h)r[u]=b;return r},Ee=re(fe,[["__scopeId","data-v-a988ca2a"]]),be={class:"hep-cr-header"},ve={class:"hep-cr-controls"},ye=["disabled"],ke={key:0,value:""},Se=["value"],Ae={class:"hep-cr-actions"},we=["disabled"],Te={key:0,class:"hep-cr-spinner"},Ne={key:1,class:"hep-cr-run-icon"},_e=["title"],xe={key:0,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Ie={key:1,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Fe={key:0,class:"hep-cr-error"},Re={class:"hep-cr-main"},Ce={class:"hep-cr-panel-header"},Oe={class:"hep-cr-output-actions"},Le={class:"hep-cr-language-badge"},De=["disabled","title"],Pe={key:0,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Be={key:1,class:"hep-cr-copied-text"},$e={class:"hep-cr-panel-header"},Me={class:"hep-cr-output-tabs"},Ue={class:"hep-cr-output-actions"},He={key:0,class:"hep-cr-execution-time"},Ve=["disabled","title"],Ge={key:0,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},ze={key:1,class:"hep-cr-copied-text"},je={class:"hep-cr-output-content"},We={key:0},Ye={key:1,class:"hep-cr-stderr"},Xe=e.defineComponent({__name:"CodeRunner",props:{pistonUrl:{default:"/api/piston"},language:{default:"javascript"},theme:{default:"light"},themeColor:{default:""},showLanguageSelector:{type:Boolean,default:!0},showEditor:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},defaultCode:{},executorLabel:{default:"运行"}},emits:["execute-start","execute-end","language-change","change"],setup(l,{emit:h}){const r=l,u=e.computed(()=>{if(!r.themeColor)return{};const p=r.theme==="dark",g=r.themeColor,_=b(g)?"#000":"#fff";return{"--hep-cr-theme-color":g,"--hep-cr-theme-color-hover":p?T(g,20):T(g,-20),"--hep-cr-tab-active-color":_}});function b(p){const g=parseInt(p.replace("#",""),16),k=g>>16&255,_=g>>8&255,M=g&255;return(.299*k+.587*_+.114*M)/255>.5}function T(p,g){const k=parseInt(p.replace("#",""),16),_=Math.round(2.55*g),M=Math.min(255,Math.max(0,(k>>16)+_)),L=Math.min(255,Math.max(0,(k>>8&255)+_)),P=Math.min(255,Math.max(0,(k&255)+_));return"#"+(16777216+M*65536+L*256+P).toString(16).slice(1)}const S=h,i=e.ref([]),f=e.ref(r.language),E=e.ref(r.theme),N=e.ref(""),C=e.ref(""),F=e.ref(""),R=e.ref(!1),O=e.ref(null),A=e.ref("stdout"),v=e.ref(null),m=e.ref(!1),t=e.ref(60);function n(){E.value=E.value==="light"?"dark":"light"}const a=e.computed(()=>new ie({pistonUrl:r.pistonUrl})),o=e.computed(()=>i.value.map(p=>({value:`${p.language}:${p.version}`,label:`${p.language.charAt(0).toUpperCase()+p.language.slice(1)} ${p.version}`}))),s=e.computed(()=>{const p=f.value;return p.includes(":")?p.split(":")[0]:p});async function d(){m.value=!0,v.value=null;try{i.value=await a.value.getRuntimes();const p=f.value.split(":")[0],g=i.value.find(k=>k.language===p);g&&!f.value.includes(":")&&(f.value=`${p}:${g.version}`)}catch(p){v.value=p instanceof Error?p.message:"Failed to load runtimes"}finally{m.value=!1}}e.watch(f,p=>{const g=p.includes(":")?p.split(":")[0]:p,k=q(g);N.value=k,S("language-change",g,k)});async function y(){if(!R.value){R.value=!0,C.value="",F.value="",O.value=null,v.value=null,A.value="stdout",S("execute-start");try{const p=await a.value.execute(s.value,N.value);C.value=p.output,F.value=p.stderr,O.value=p.executionTime||null,A.value=p.stderr?"stderr":"stdout",S("execute-end",p)}catch(p){v.value=p instanceof Error?p.message:"Execution failed",S("execute-end",{success:!1,output:"",stderr:v.value,code:-1})}finally{R.value=!1}}}const c=e.ref(!1),w=e.ref(!1);async function x(){await navigator.clipboard.writeText(N.value),c.value=!0,setTimeout(()=>{c.value=!1},2e3)}async function D(){const p=A.value==="stdout"?C.value:F.value;await navigator.clipboard.writeText(p),w.value=!0,setTimeout(()=>{w.value=!1},2e3)}function H(){N.value=q(s.value)}let B=!1;function W(p){B=!0,document.addEventListener("mousemove",V),document.addEventListener("mouseup",$),document.body.style.cursor="col-resize",document.body.style.userSelect="none"}function V(p){if(!B)return;const g=document.querySelector(".hep-cr-main");if(!g)return;const k=g.getBoundingClientRect(),_=(p.clientX-k.left)/k.width*100;t.value=Math.max(20,Math.min(80,_))}function $(){B=!1,document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",$),document.body.style.cursor="",document.body.style.userSelect=""}e.onMounted(async()=>{await d(),N.value||(N.value=r.defaultCode||q(f.value))});const I=e.computed(()=>`hep-cr-runner-${E.value}`);return(p,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hep-cr-runner",I.value]),style:e.normalizeStyle(u.value)},[e.createElementVNode("div",be,[e.createElementVNode("div",ve,[l.showLanguageSelector?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:0,"onUpdate:modelValue":g[0]||(g[0]=k=>f.value=k),class:"hep-cr-language-select",disabled:R.value},[m.value?(e.openBlock(),e.createElementBlock("option",ke,"加载中...")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,k=>(e.openBlock(),e.createElementBlock("option",{key:k.value,value:k.value},e.toDisplayString(k.label),9,Se))),128))],8,ye)),[[e.vModelSelect,f.value]]):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ae,[e.createElementVNode("button",{class:"hep-cr-btn hep-cr-btn-run",disabled:R.value||m.value,onClick:y},[R.value?(e.openBlock(),e.createElementBlock("span",Te)):(e.openBlock(),e.createElementBlock("span",Ne,"▶")),e.createTextVNode(" "+e.toDisplayString(R.value?"运行中...":l.executorLabel),1)],8,we),l.showEditor&&l.editable?(e.openBlock(),e.createElementBlock("button",{key:0,class:"hep-cr-btn hep-cr-btn-reset",onClick:H}," 重置 ")):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"hep-cr-btn hep-cr-btn-theme",onClick:n,title:E.value==="light"?"Switch to dark mode":"Switch to light mode"},[E.value==="light"?(e.openBlock(),e.createElementBlock("svg",xe,[...g[5]||(g[5]=[e.createElementVNode("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",Ie,[...g[6]||(g[6]=[e.createStaticVNode('<circle cx="12" cy="12" r="5" data-v-37101672></circle><line x1="12" y1="1" x2="12" y2="3" data-v-37101672></line><line x1="12" y1="21" x2="12" y2="23" data-v-37101672></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64" data-v-37101672></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78" data-v-37101672></line><line x1="1" y1="12" x2="3" y2="12" data-v-37101672></line><line x1="21" y1="12" x2="23" y2="12" data-v-37101672></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36" data-v-37101672></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22" data-v-37101672></line>',9)])]))],8,_e)])]),v.value?(e.openBlock(),e.createElementBlock("div",Fe,e.toDisplayString(v.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Re,[l.showEditor?(e.openBlock(),e.createElementBlock("div",{key:0,class:"hep-cr-editor-panel",style:e.normalizeStyle({width:t.value+"%"})},[e.createElementVNode("div",Ce,[g[8]||(g[8]=e.createElementVNode("span",{class:"hep-cr-panel-title"},"编辑器",-1)),e.createElementVNode("div",Oe,[e.createElementVNode("span",Le,e.toDisplayString(s.value),1),e.createElementVNode("button",{class:e.normalizeClass(["hep-cr-btn-icon",{"hep-cr-btn-copied":c.value}]),disabled:c.value,onClick:x,title:c.value?"已复制":"复制"},[c.value?(e.openBlock(),e.createElementBlock("span",Be,"已复制")):(e.openBlock(),e.createElementBlock("svg",Pe,[...g[7]||(g[7]=[e.createElementVNode("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},null,-1),e.createElementVNode("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])]))],10,De)])]),e.createVNode(Ee,{modelValue:N.value,"onUpdate:modelValue":g[1]||(g[1]=k=>N.value=k),language:s.value,theme:E.value,disabled:!l.editable||R.value,onChange:g[2]||(g[2]=k=>S("change",k))},null,8,["modelValue","language","theme","disabled"])],4)):e.createCommentVNode("",!0),l.showEditor?(e.openBlock(),e.createElementBlock("div",{key:1,class:"hep-cr-resize-handle",onMousedown:W},[...g[9]||(g[9]=[e.createElementVNode("div",{class:"hep-cr-resize-line"},null,-1)])],32)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"hep-cr-output-panel",style:e.normalizeStyle({width:l.showEditor?100-t.value+"%":"100%"})},[e.createElementVNode("div",$e,[e.createElementVNode("div",Me,[e.createElementVNode("button",{class:e.normalizeClass(["hep-cr-tab",{active:A.value==="stdout"}]),onClick:g[3]||(g[3]=k=>A.value="stdout")}," 输出 ",2),F.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["hep-cr-tab","hep-cr-tab-error",{active:A.value==="stderr"}]),onClick:g[4]||(g[4]=k=>A.value="stderr")}," 错误 ",2)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ue,[O.value!==null?(e.openBlock(),e.createElementBlock("span",He,e.toDisplayString(O.value)+"ms ",1)):e.createCommentVNode("",!0),e.createElementVNode("button",{class:e.normalizeClass(["hep-cr-btn-icon",{"hep-cr-btn-copied":w.value}]),disabled:w.value,onClick:D,title:w.value?"已复制":"复制"},[w.value?(e.openBlock(),e.createElementBlock("span",ze,"已复制")):(e.openBlock(),e.createElementBlock("svg",Ge,[...g[10]||(g[10]=[e.createElementVNode("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},null,-1),e.createElementVNode("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])]))],10,Ve)])]),e.createElementVNode("div",je,[A.value==="stdout"?(e.openBlock(),e.createElementBlock("pre",We,e.toDisplayString(R.value?"代码执行中...":C.value||'点击"运行"执行代码'),1)):(e.openBlock(),e.createElementBlock("pre",Ye,e.toDisplayString(F.value),1))])],4)])],6))}}),U=re(Xe,[["__scopeId","data-v-37101672"]]),Ze={class:"hep-cr-dialog-header"},Ke={class:"hep-cr-dialog-title"},qe={class:"hep-cr-dialog-body"},Je={key:0,class:"hep-cr-dialog-footer"},Qe=e.defineComponent({__name:"CodeRunnerDialog",props:{modelValue:{type:Boolean,default:!1},title:{default:"代码执行器"},width:{default:800},pistonUrl:{default:"/api/piston"},language:{default:"javascript"},theme:{default:"light"},themeColor:{default:""},showLanguageSelector:{type:Boolean,default:!0},showEditor:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},defaultCode:{},executorLabel:{default:"运行"}},emits:["update:modelValue","close","change"],setup(l,{expose:h,emit:r}){const u=l,b=r,T=e.ref(u.modelValue),S=e.computed(()=>u.modelValue!==void 0?u.modelValue:T.value);e.watch(()=>u.modelValue,E=>{E!==void 0&&(T.value=E)});function i(){T.value=!1,b("update:modelValue",!1),b("close")}function f(E){E.target===E.currentTarget&&i()}return h({close:i}),(E,N)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"hep-cr-dialog-fade"},{default:e.withCtx(()=>[S.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"hep-cr-dialog-overlay",onClick:f},[e.createElementVNode("div",{class:"hep-cr-dialog-container",style:e.normalizeStyle({width:typeof l.width=="number"?l.width+"px":l.width})},[e.createElementVNode("div",Ze,[e.createElementVNode("h3",Ke,e.toDisplayString(l.title),1),e.createElementVNode("button",{class:"hep-cr-dialog-close",onClick:i},[...N[0]||(N[0]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])])]),e.createElementVNode("div",qe,[e.createVNode(U,e.mergeProps(E.$attrs,e.toHandlers(E.$attrs)),null,16)]),E.$slots.footer?(e.openBlock(),e.createElementBlock("div",Je,[e.renderSlot(E.$slots,"footer",{close:i})])):e.createCommentVNode("",!0)],4)])):e.createCommentVNode("",!0)]),_:3})]))}});U.install=l=>{l.component("CodeRunner",U)};const et={install(l){l.component("CodeRunner",U)}};exports.CodeRunner=U;exports.CodeRunnerDialog=Qe;exports.default=et;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as le, useCssVars as be, ref as L, computed as B, onMounted as ge, watch as ue, onUnmounted as
|
|
1
|
+
import { defineComponent as le, useCssVars as be, ref as L, computed as B, onMounted as ge, watch as ue, onUnmounted as Ee, openBlock as x, createElementBlock as I, normalizeClass as z, createElementVNode as y, normalizeStyle as J, withDirectives as ve, createCommentVNode as U, Fragment as ye, renderList as Ae, toDisplayString as H, vModelSelect as ke, createTextVNode as Se, createStaticVNode as we, createVNode as ie, createBlock as Te, Teleport as xe, Transition as _e, withCtx as Ie, mergeProps as Fe, toHandlers as Re, renderSlot as Ne } from "vue";
|
|
2
2
|
var Le = Object.defineProperty, Oe = (i, g, n) => g in i ? Le(i, g, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[g] = n, de = (i, g, n) => Oe(i, typeof g != "symbol" ? g + "" : g, n);
|
|
3
3
|
let re = null;
|
|
4
4
|
class Ce {
|
|
@@ -24,17 +24,17 @@ class Ce {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
async execute(g, n, l = {}) {
|
|
27
|
-
const
|
|
27
|
+
const b = (await this.getRuntimes()).find(
|
|
28
28
|
(m) => {
|
|
29
|
-
var
|
|
30
|
-
return m.language.toLowerCase() === g.toLowerCase() || ((
|
|
29
|
+
var f;
|
|
30
|
+
return m.language.toLowerCase() === g.toLowerCase() || ((f = m.aliases) == null ? void 0 : f.some((_) => _.toLowerCase() === g.toLowerCase()));
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
|
-
if (!
|
|
33
|
+
if (!b)
|
|
34
34
|
throw new Error(`Language '${g}' is not supported`);
|
|
35
35
|
const T = this.getFileName(g), k = {
|
|
36
|
-
language:
|
|
37
|
-
version: l.version ||
|
|
36
|
+
language: b.language,
|
|
37
|
+
version: l.version || b.version,
|
|
38
38
|
files: [
|
|
39
39
|
{
|
|
40
40
|
name: T,
|
|
@@ -56,17 +56,17 @@ class Ce {
|
|
|
56
56
|
});
|
|
57
57
|
if (!m.ok)
|
|
58
58
|
throw new Error(`Execute failed: ${m.statusText}`);
|
|
59
|
-
const
|
|
59
|
+
const f = await m.json(), _ = Date.now() - s, D = f.run.stdout || "", O = f.run.stderr || "";
|
|
60
60
|
return {
|
|
61
|
-
success:
|
|
61
|
+
success: f.run.code === 0,
|
|
62
62
|
output: D,
|
|
63
63
|
stderr: O,
|
|
64
|
-
code:
|
|
64
|
+
code: f.run.code,
|
|
65
65
|
executionTime: _,
|
|
66
|
-
compile:
|
|
67
|
-
stdout:
|
|
68
|
-
stderr:
|
|
69
|
-
code:
|
|
66
|
+
compile: f.compile ? {
|
|
67
|
+
stdout: f.compile.stdout || "",
|
|
68
|
+
stderr: f.compile.stderr || "",
|
|
69
|
+
code: f.compile.code
|
|
70
70
|
} : void 0
|
|
71
71
|
};
|
|
72
72
|
} catch (m) {
|
|
@@ -228,7 +228,7 @@ var he = { exports: {} };
|
|
|
228
228
|
* @public
|
|
229
229
|
*/
|
|
230
230
|
var n = function(l) {
|
|
231
|
-
var
|
|
231
|
+
var b = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, T = 0, k = {}, s = {
|
|
232
232
|
/**
|
|
233
233
|
* By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
|
|
234
234
|
* current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
|
|
@@ -342,8 +342,8 @@ var he = { exports: {} };
|
|
|
342
342
|
case "Array":
|
|
343
343
|
return o = s.util.objId(t), a[o] ? a[o] : (r = [], a[o] = r, /** @type {Array} */
|
|
344
344
|
/** @type {any} */
|
|
345
|
-
t.forEach(function(
|
|
346
|
-
r[u] = e(
|
|
345
|
+
t.forEach(function(v, u) {
|
|
346
|
+
r[u] = e(v, a);
|
|
347
347
|
}), /** @type {any} */
|
|
348
348
|
r);
|
|
349
349
|
default:
|
|
@@ -360,7 +360,7 @@ var he = { exports: {} };
|
|
|
360
360
|
*/
|
|
361
361
|
getLanguage: function(e) {
|
|
362
362
|
for (; e; ) {
|
|
363
|
-
var t =
|
|
363
|
+
var t = b.exec(e.className);
|
|
364
364
|
if (t)
|
|
365
365
|
return t[1].toLowerCase();
|
|
366
366
|
e = e.parentElement;
|
|
@@ -375,7 +375,7 @@ var he = { exports: {} };
|
|
|
375
375
|
* @returns {void}
|
|
376
376
|
*/
|
|
377
377
|
setLanguage: function(e, t) {
|
|
378
|
-
e.className = e.className.replace(RegExp(
|
|
378
|
+
e.className = e.className.replace(RegExp(b, "gi"), ""), e.classList.add("language-" + t);
|
|
379
379
|
},
|
|
380
380
|
/**
|
|
381
381
|
* Returns the script element that is currently executing.
|
|
@@ -564,12 +564,12 @@ var he = { exports: {} };
|
|
|
564
564
|
r = r || /** @type {any} */
|
|
565
565
|
s.languages;
|
|
566
566
|
var o = r[e], c = {};
|
|
567
|
-
for (var
|
|
568
|
-
if (o.hasOwnProperty(
|
|
569
|
-
if (
|
|
567
|
+
for (var v in o)
|
|
568
|
+
if (o.hasOwnProperty(v)) {
|
|
569
|
+
if (v == t)
|
|
570
570
|
for (var u in a)
|
|
571
571
|
a.hasOwnProperty(u) && (c[u] = a[u]);
|
|
572
|
-
a.hasOwnProperty(
|
|
572
|
+
a.hasOwnProperty(v) || (c[v] = o[v]);
|
|
573
573
|
}
|
|
574
574
|
var w = r[e];
|
|
575
575
|
return r[e] = c, s.languages.DFS(s.languages, function(R, M) {
|
|
@@ -580,11 +580,11 @@ var he = { exports: {} };
|
|
|
580
580
|
DFS: function e(t, a, r, o) {
|
|
581
581
|
o = o || {};
|
|
582
582
|
var c = s.util.objId;
|
|
583
|
-
for (var
|
|
584
|
-
if (t.hasOwnProperty(
|
|
585
|
-
a.call(t,
|
|
586
|
-
var u = t[
|
|
587
|
-
w === "Object" && !o[c(u)] ? (o[c(u)] = !0, e(u, a, null, o)) : w === "Array" && !o[c(u)] && (o[c(u)] = !0, e(u, a,
|
|
583
|
+
for (var v in t)
|
|
584
|
+
if (t.hasOwnProperty(v)) {
|
|
585
|
+
a.call(t, v, t[v], r || v);
|
|
586
|
+
var u = t[v], w = s.util.type(u);
|
|
587
|
+
w === "Object" && !o[c(u)] ? (o[c(u)] = !0, e(u, a, null, o)) : w === "Array" && !o[c(u)] && (o[c(u)] = !0, e(u, a, v, o));
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
590
|
},
|
|
@@ -662,11 +662,11 @@ var he = { exports: {} };
|
|
|
662
662
|
s.util.setLanguage(e, r);
|
|
663
663
|
var c = e.parentElement;
|
|
664
664
|
c && c.nodeName.toLowerCase() === "pre" && s.util.setLanguage(c, r);
|
|
665
|
-
var
|
|
665
|
+
var v = e.textContent, u = {
|
|
666
666
|
element: e,
|
|
667
667
|
language: r,
|
|
668
668
|
grammar: o,
|
|
669
|
-
code:
|
|
669
|
+
code: v
|
|
670
670
|
};
|
|
671
671
|
function w(M) {
|
|
672
672
|
u.highlightedCode = M, s.hooks.run("before-insert", u), u.element.innerHTML = u.highlightedCode, s.hooks.run("after-highlight", u), s.hooks.run("complete", u), a && a.call(u.element);
|
|
@@ -818,12 +818,12 @@ var he = { exports: {} };
|
|
|
818
818
|
language: a
|
|
819
819
|
}, c = t.alias;
|
|
820
820
|
c && (Array.isArray(c) ? Array.prototype.push.apply(o.classes, c) : o.classes.push(c)), s.hooks.run("wrap", o);
|
|
821
|
-
var
|
|
821
|
+
var v = "";
|
|
822
822
|
for (var u in o.attributes)
|
|
823
|
-
|
|
824
|
-
return "<" + o.tag + ' class="' + o.classes.join(" ") + '"' +
|
|
823
|
+
v += " " + u + '="' + (o.attributes[u] || "").replace(/"/g, """) + '"';
|
|
824
|
+
return "<" + o.tag + ' class="' + o.classes.join(" ") + '"' + v + ">" + o.content + "</" + o.tag + ">";
|
|
825
825
|
};
|
|
826
|
-
function
|
|
826
|
+
function f(e, t, a, r) {
|
|
827
827
|
e.lastIndex = t;
|
|
828
828
|
var o = e.exec(a);
|
|
829
829
|
if (o && r && o[1]) {
|
|
@@ -833,12 +833,12 @@ var he = { exports: {} };
|
|
|
833
833
|
return o;
|
|
834
834
|
}
|
|
835
835
|
function _(e, t, a, r, o, c) {
|
|
836
|
-
for (var
|
|
837
|
-
if (!(!a.hasOwnProperty(
|
|
838
|
-
var u = a[
|
|
836
|
+
for (var v in a)
|
|
837
|
+
if (!(!a.hasOwnProperty(v) || !a[v])) {
|
|
838
|
+
var u = a[v];
|
|
839
839
|
u = Array.isArray(u) ? u : [u];
|
|
840
840
|
for (var w = 0; w < u.length; ++w) {
|
|
841
|
-
if (c && c.cause ==
|
|
841
|
+
if (c && c.cause == v + "," + w)
|
|
842
842
|
return;
|
|
843
843
|
var R = u[w], M = R.inside, Y = !!R.lookbehind, j = !!R.greedy, ee = R.alias;
|
|
844
844
|
if (j && !R.pattern.global) {
|
|
@@ -852,7 +852,7 @@ var he = { exports: {} };
|
|
|
852
852
|
if (!(p instanceof m)) {
|
|
853
853
|
var A = 1, F;
|
|
854
854
|
if (j) {
|
|
855
|
-
if (F =
|
|
855
|
+
if (F = f(W, d, e, Y), !F || F.index >= e.length)
|
|
856
856
|
break;
|
|
857
857
|
var Z = F.index, V = F.index + F[0].length, $ = d;
|
|
858
858
|
for ($ += N.value.length; Z >= $; )
|
|
@@ -862,16 +862,16 @@ var he = { exports: {} };
|
|
|
862
862
|
for (var G = N; G !== t.tail && ($ < V || typeof G.value == "string"); G = G.next)
|
|
863
863
|
A++, $ += G.value.length;
|
|
864
864
|
A--, p = e.slice(d, $), F.index -= d;
|
|
865
|
-
} else if (F =
|
|
865
|
+
} else if (F = f(W, 0, p, Y), !F)
|
|
866
866
|
continue;
|
|
867
867
|
var Z = F.index, K = F[0], te = p.slice(0, Z), ce = p.slice(Z + K.length), ne = d + p.length;
|
|
868
868
|
c && ne > c.reach && (c.reach = ne);
|
|
869
869
|
var q = N.prev;
|
|
870
870
|
te && (q = O(t, q, te), d += te.length), C(t, q, A);
|
|
871
|
-
var fe = new m(
|
|
871
|
+
var fe = new m(v, M ? s.tokenize(K, M) : K, ee, K);
|
|
872
872
|
if (N = O(t, q, fe), ce && O(t, N, ce), A > 1) {
|
|
873
873
|
var ae = {
|
|
874
|
-
cause:
|
|
874
|
+
cause: v + "," + w,
|
|
875
875
|
reach: ne
|
|
876
876
|
};
|
|
877
877
|
_(e, t, a, N.prev, d, ae), c && ae.reach > c.reach && (c.reach = ae.reach);
|
|
@@ -906,12 +906,12 @@ var he = { exports: {} };
|
|
|
906
906
|
}, !1)), s;
|
|
907
907
|
var S = s.util.currentScript();
|
|
908
908
|
S && (s.filename = S.src, S.hasAttribute("data-manual") && (s.manual = !0));
|
|
909
|
-
function
|
|
909
|
+
function E() {
|
|
910
910
|
s.manual || s.highlightAll();
|
|
911
911
|
}
|
|
912
912
|
if (!s.manual) {
|
|
913
913
|
var h = document.readyState;
|
|
914
|
-
h === "loading" || h === "interactive" && S && S.defer ? document.addEventListener("DOMContentLoaded",
|
|
914
|
+
h === "loading" || h === "interactive" && S && S.defer ? document.addEventListener("DOMContentLoaded", E) : window.requestAnimationFrame ? window.requestAnimationFrame(E) : window.setTimeout(E, 16);
|
|
915
915
|
}
|
|
916
916
|
return s;
|
|
917
917
|
}(g);
|
|
@@ -1006,7 +1006,7 @@ var he = { exports: {} };
|
|
|
1006
1006
|
* @example
|
|
1007
1007
|
* addInlined('style', 'css');
|
|
1008
1008
|
*/
|
|
1009
|
-
value: function(
|
|
1009
|
+
value: function(b, T) {
|
|
1010
1010
|
var k = {};
|
|
1011
1011
|
k["language-" + T] = {
|
|
1012
1012
|
pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
|
|
@@ -1024,9 +1024,9 @@ var he = { exports: {} };
|
|
|
1024
1024
|
inside: n.languages[T]
|
|
1025
1025
|
};
|
|
1026
1026
|
var m = {};
|
|
1027
|
-
m[
|
|
1027
|
+
m[b] = {
|
|
1028
1028
|
pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
|
|
1029
|
-
return
|
|
1029
|
+
return b;
|
|
1030
1030
|
}), "i"),
|
|
1031
1031
|
lookbehind: !0,
|
|
1032
1032
|
greedy: !0,
|
|
@@ -1045,7 +1045,7 @@ var he = { exports: {} };
|
|
|
1045
1045
|
* @example
|
|
1046
1046
|
* addAttribute('style', 'css');
|
|
1047
1047
|
*/
|
|
1048
|
-
value: function(l,
|
|
1048
|
+
value: function(l, b) {
|
|
1049
1049
|
n.languages.markup.tag.inside["special-attr"].push({
|
|
1050
1050
|
pattern: RegExp(
|
|
1051
1051
|
/(^|["'\s])/.source + "(?:" + l + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
|
|
@@ -1060,8 +1060,8 @@ var he = { exports: {} };
|
|
|
1060
1060
|
value: {
|
|
1061
1061
|
pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
|
|
1062
1062
|
lookbehind: !0,
|
|
1063
|
-
alias: [
|
|
1064
|
-
inside: n.languages[
|
|
1063
|
+
alias: [b, "language-" + b],
|
|
1064
|
+
inside: n.languages[b]
|
|
1065
1065
|
},
|
|
1066
1066
|
punctuation: [
|
|
1067
1067
|
{
|
|
@@ -1076,11 +1076,11 @@ var he = { exports: {} };
|
|
|
1076
1076
|
});
|
|
1077
1077
|
}
|
|
1078
1078
|
}), n.languages.html = n.languages.markup, n.languages.mathml = n.languages.markup, n.languages.svg = n.languages.markup, n.languages.xml = n.languages.extend("markup", {}), n.languages.ssml = n.languages.xml, n.languages.atom = n.languages.xml, n.languages.rss = n.languages.xml, function(l) {
|
|
1079
|
-
var
|
|
1079
|
+
var b = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
|
|
1080
1080
|
l.languages.css = {
|
|
1081
1081
|
comment: /\/\*[\s\S]*?\*\//,
|
|
1082
1082
|
atrule: {
|
|
1083
|
-
pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" +
|
|
1083
|
+
pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + b.source + ")*?" + /(?:;|(?=\s*\{))/.source),
|
|
1084
1084
|
inside: {
|
|
1085
1085
|
rule: /^@[\w-]+/,
|
|
1086
1086
|
"selector-function-argument": {
|
|
@@ -1097,23 +1097,23 @@ var he = { exports: {} };
|
|
|
1097
1097
|
},
|
|
1098
1098
|
url: {
|
|
1099
1099
|
// https://drafts.csswg.org/css-values-3/#urls
|
|
1100
|
-
pattern: RegExp("\\burl\\((?:" +
|
|
1100
|
+
pattern: RegExp("\\burl\\((?:" + b.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
|
|
1101
1101
|
greedy: !0,
|
|
1102
1102
|
inside: {
|
|
1103
1103
|
function: /^url/i,
|
|
1104
1104
|
punctuation: /^\(|\)$/,
|
|
1105
1105
|
string: {
|
|
1106
|
-
pattern: RegExp("^" +
|
|
1106
|
+
pattern: RegExp("^" + b.source + "$"),
|
|
1107
1107
|
alias: "url"
|
|
1108
1108
|
}
|
|
1109
1109
|
}
|
|
1110
1110
|
},
|
|
1111
1111
|
selector: {
|
|
1112
|
-
pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` +
|
|
1112
|
+
pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + b.source + ")*(?=\\s*\\{)"),
|
|
1113
1113
|
lookbehind: !0
|
|
1114
1114
|
},
|
|
1115
1115
|
string: {
|
|
1116
|
-
pattern:
|
|
1116
|
+
pattern: b,
|
|
1117
1117
|
greedy: !0
|
|
1118
1118
|
},
|
|
1119
1119
|
property: {
|
|
@@ -1293,8 +1293,8 @@ var he = { exports: {} };
|
|
|
1293
1293
|
if (typeof n > "u" || typeof document > "u")
|
|
1294
1294
|
return;
|
|
1295
1295
|
Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
|
|
1296
|
-
var l = "Loading…",
|
|
1297
|
-
return "✖ Error " + S + " while fetching file: " +
|
|
1296
|
+
var l = "Loading…", b = function(S, E) {
|
|
1297
|
+
return "✖ Error " + S + " while fetching file: " + E;
|
|
1298
1298
|
}, T = "✖ Error: File does not exist or is empty", k = {
|
|
1299
1299
|
js: "javascript",
|
|
1300
1300
|
py: "python",
|
|
@@ -1305,52 +1305,52 @@ var he = { exports: {} };
|
|
|
1305
1305
|
bat: "batch",
|
|
1306
1306
|
h: "c",
|
|
1307
1307
|
tex: "latex"
|
|
1308
|
-
}, s = "data-src-status", m = "loading",
|
|
1309
|
-
function O(S,
|
|
1308
|
+
}, s = "data-src-status", m = "loading", f = "loaded", _ = "failed", D = "pre[data-src]:not([" + s + '="' + f + '"]):not([' + s + '="' + m + '"])';
|
|
1309
|
+
function O(S, E, h) {
|
|
1310
1310
|
var e = new XMLHttpRequest();
|
|
1311
1311
|
e.open("GET", S, !0), e.onreadystatechange = function() {
|
|
1312
|
-
e.readyState == 4 && (e.status < 400 && e.responseText ?
|
|
1312
|
+
e.readyState == 4 && (e.status < 400 && e.responseText ? E(e.responseText) : e.status >= 400 ? h(b(e.status, e.statusText)) : h(T));
|
|
1313
1313
|
}, e.send(null);
|
|
1314
1314
|
}
|
|
1315
1315
|
function C(S) {
|
|
1316
|
-
var
|
|
1317
|
-
if (
|
|
1318
|
-
var h = Number(
|
|
1316
|
+
var E = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(S || "");
|
|
1317
|
+
if (E) {
|
|
1318
|
+
var h = Number(E[1]), e = E[2], t = E[3];
|
|
1319
1319
|
return e ? t ? [h, Number(t)] : [h, void 0] : [h, h];
|
|
1320
1320
|
}
|
|
1321
1321
|
}
|
|
1322
1322
|
n.hooks.add("before-highlightall", function(S) {
|
|
1323
1323
|
S.selector += ", " + D;
|
|
1324
1324
|
}), n.hooks.add("before-sanity-check", function(S) {
|
|
1325
|
-
var
|
|
1325
|
+
var E = (
|
|
1326
1326
|
/** @type {HTMLPreElement} */
|
|
1327
1327
|
S.element
|
|
1328
1328
|
);
|
|
1329
|
-
if (
|
|
1330
|
-
S.code = "",
|
|
1331
|
-
var h =
|
|
1329
|
+
if (E.matches(D)) {
|
|
1330
|
+
S.code = "", E.setAttribute(s, m);
|
|
1331
|
+
var h = E.appendChild(document.createElement("CODE"));
|
|
1332
1332
|
h.textContent = l;
|
|
1333
|
-
var e =
|
|
1333
|
+
var e = E.getAttribute("data-src"), t = S.language;
|
|
1334
1334
|
if (t === "none") {
|
|
1335
1335
|
var a = (/\.(\w+)$/.exec(e) || [, "none"])[1];
|
|
1336
1336
|
t = k[a] || a;
|
|
1337
1337
|
}
|
|
1338
|
-
n.util.setLanguage(h, t), n.util.setLanguage(
|
|
1338
|
+
n.util.setLanguage(h, t), n.util.setLanguage(E, t);
|
|
1339
1339
|
var r = n.plugins.autoloader;
|
|
1340
1340
|
r && r.loadLanguages(t), O(
|
|
1341
1341
|
e,
|
|
1342
1342
|
function(o) {
|
|
1343
|
-
|
|
1344
|
-
var c = C(
|
|
1343
|
+
E.setAttribute(s, f);
|
|
1344
|
+
var c = C(E.getAttribute("data-range"));
|
|
1345
1345
|
if (c) {
|
|
1346
|
-
var
|
|
1347
|
-
u < 0 && (u +=
|
|
1348
|
-
`),
|
|
1346
|
+
var v = o.split(/\r\n?|\n/g), u = c[0], w = c[1] == null ? v.length : c[1];
|
|
1347
|
+
u < 0 && (u += v.length), u = Math.max(0, Math.min(u - 1, v.length)), w < 0 && (w += v.length), w = Math.max(0, Math.min(w, v.length)), o = v.slice(u, w).join(`
|
|
1348
|
+
`), E.hasAttribute("data-start") || E.setAttribute("data-start", String(u + 1));
|
|
1349
1349
|
}
|
|
1350
1350
|
h.textContent = o, n.highlightElement(h);
|
|
1351
1351
|
},
|
|
1352
1352
|
function(o) {
|
|
1353
|
-
|
|
1353
|
+
E.setAttribute(s, _), h.textContent = o;
|
|
1354
1354
|
}
|
|
1355
1355
|
);
|
|
1356
1356
|
}
|
|
@@ -1362,8 +1362,8 @@ var he = { exports: {} };
|
|
|
1362
1362
|
*
|
|
1363
1363
|
* @param {ParentNode} [container=document]
|
|
1364
1364
|
*/
|
|
1365
|
-
highlight: function(
|
|
1366
|
-
for (var h = (
|
|
1365
|
+
highlight: function(E) {
|
|
1366
|
+
for (var h = (E || document).querySelectorAll(D), e = 0, t; t = h[e++]; )
|
|
1367
1367
|
n.highlightElement(t);
|
|
1368
1368
|
}
|
|
1369
1369
|
};
|
|
@@ -2170,7 +2170,7 @@ Prism.languages.sql = {
|
|
|
2170
2170
|
lookbehind: !0
|
|
2171
2171
|
}
|
|
2172
2172
|
}, n.inside = i.languages.bash;
|
|
2173
|
-
for (var
|
|
2173
|
+
for (var b = [
|
|
2174
2174
|
"comment",
|
|
2175
2175
|
"function-name",
|
|
2176
2176
|
"for-or-select",
|
|
@@ -2186,8 +2186,8 @@ Prism.languages.sql = {
|
|
|
2186
2186
|
"operator",
|
|
2187
2187
|
"punctuation",
|
|
2188
2188
|
"number"
|
|
2189
|
-
], T = l.variable[1].inside, k = 0; k <
|
|
2190
|
-
T[
|
|
2189
|
+
], T = l.variable[1].inside, k = 0; k < b.length; k++)
|
|
2190
|
+
T[b[k]] = i.languages.bash[b[k]];
|
|
2191
2191
|
i.languages.sh = i.languages.bash, i.languages.shell = i.languages.bash;
|
|
2192
2192
|
})(Prism);
|
|
2193
2193
|
Prism.languages.json = {
|
|
@@ -2398,14 +2398,14 @@ const Me = `
|
|
|
2398
2398
|
const r = document.createElement("style");
|
|
2399
2399
|
r.id = e, r.textContent = a, document.head.appendChild(r);
|
|
2400
2400
|
}
|
|
2401
|
-
const l = i,
|
|
2401
|
+
const l = i, b = g, T = L(null), k = L(null);
|
|
2402
2402
|
let s = null;
|
|
2403
2403
|
function m(h) {
|
|
2404
2404
|
s && clearTimeout(s), s = setTimeout(() => {
|
|
2405
|
-
|
|
2405
|
+
b("change", h);
|
|
2406
2406
|
}, Ge);
|
|
2407
2407
|
}
|
|
2408
|
-
const
|
|
2408
|
+
const f = {
|
|
2409
2409
|
javascript: "javascript",
|
|
2410
2410
|
js: "javascript",
|
|
2411
2411
|
typescript: "typescript",
|
|
@@ -2436,7 +2436,7 @@ const Me = `
|
|
|
2436
2436
|
yml: "yaml",
|
|
2437
2437
|
markdown: "markdown",
|
|
2438
2438
|
md: "markdown"
|
|
2439
|
-
}, _ = B(() =>
|
|
2439
|
+
}, _ = B(() => f[l.language.toLowerCase()] || "javascript"), D = B(() => l.theme === "dark" ? "#1e1e1e" : "#fafafa"), O = B(() => {
|
|
2440
2440
|
try {
|
|
2441
2441
|
const h = se.languages[_.value];
|
|
2442
2442
|
if (h)
|
|
@@ -2451,23 +2451,23 @@ const Me = `
|
|
|
2451
2451
|
}
|
|
2452
2452
|
function P(h) {
|
|
2453
2453
|
const e = h.target;
|
|
2454
|
-
|
|
2454
|
+
b("update:modelValue", e.value), m(e.value);
|
|
2455
2455
|
}
|
|
2456
2456
|
function S() {
|
|
2457
2457
|
T.value && k.value && (k.value.scrollTop = T.value.scrollTop, k.value.scrollLeft = T.value.scrollLeft);
|
|
2458
2458
|
}
|
|
2459
|
-
function
|
|
2459
|
+
function E(h) {
|
|
2460
2460
|
if (h.key === "Tab") {
|
|
2461
2461
|
h.preventDefault();
|
|
2462
2462
|
const e = h.target, t = e.selectionStart, a = e.selectionEnd, r = e.value;
|
|
2463
|
-
e.value = r.substring(0, t) + " " + r.substring(a), e.selectionStart = e.selectionEnd = t + 2,
|
|
2463
|
+
e.value = r.substring(0, t) + " " + r.substring(a), e.selectionStart = e.selectionEnd = t + 2, b("update:modelValue", e.value), m(e.value);
|
|
2464
2464
|
}
|
|
2465
2465
|
}
|
|
2466
2466
|
return ge(() => {
|
|
2467
2467
|
n(l.theme);
|
|
2468
2468
|
}), ue(() => l.theme, (h) => {
|
|
2469
2469
|
n(h);
|
|
2470
|
-
}),
|
|
2470
|
+
}), Ee(() => {
|
|
2471
2471
|
s && clearTimeout(s);
|
|
2472
2472
|
}), (h, e) => (x(), I("div", {
|
|
2473
2473
|
class: z(["hep-cr-editor", `hep-cr-theme-${i.theme}`])
|
|
@@ -2488,7 +2488,7 @@ const Me = `
|
|
|
2488
2488
|
disabled: i.disabled,
|
|
2489
2489
|
onInput: P,
|
|
2490
2490
|
onScroll: S,
|
|
2491
|
-
onKeydown:
|
|
2491
|
+
onKeydown: E,
|
|
2492
2492
|
spellcheck: "false",
|
|
2493
2493
|
placeholder: "Write your code here..."
|
|
2494
2494
|
}, null, 40, He)
|
|
@@ -2496,8 +2496,8 @@ const Me = `
|
|
|
2496
2496
|
}
|
|
2497
2497
|
}), me = (i, g) => {
|
|
2498
2498
|
const n = i.__vccOpts || i;
|
|
2499
|
-
for (const [l,
|
|
2500
|
-
n[l] =
|
|
2499
|
+
for (const [l, b] of g)
|
|
2500
|
+
n[l] = b;
|
|
2501
2501
|
return n;
|
|
2502
2502
|
}, je = /* @__PURE__ */ me(ze, [["__scopeId", "data-v-a988ca2a"]]), We = { class: "hep-cr-header" }, Ve = { class: "hep-cr-controls" }, Ye = ["disabled"], Xe = {
|
|
2503
2503
|
key: 0,
|
|
@@ -2552,7 +2552,7 @@ const Me = `
|
|
|
2552
2552
|
}, bt = {
|
|
2553
2553
|
key: 1,
|
|
2554
2554
|
class: "hep-cr-copied-text"
|
|
2555
|
-
},
|
|
2555
|
+
}, Et = { class: "hep-cr-output-content" }, vt = { key: 0 }, yt = {
|
|
2556
2556
|
key: 1,
|
|
2557
2557
|
class: "hep-cr-stderr"
|
|
2558
2558
|
}, At = /* @__PURE__ */ le({
|
|
@@ -2572,14 +2572,14 @@ const Me = `
|
|
|
2572
2572
|
setup(i, { emit: g }) {
|
|
2573
2573
|
const n = i, l = B(() => {
|
|
2574
2574
|
if (!n.themeColor) return {};
|
|
2575
|
-
const d = n.theme === "dark", p = n.themeColor, F =
|
|
2575
|
+
const d = n.theme === "dark", p = n.themeColor, F = b(p) ? "#000" : "#fff";
|
|
2576
2576
|
return {
|
|
2577
2577
|
"--hep-cr-theme-color": p,
|
|
2578
2578
|
"--hep-cr-theme-color-hover": d ? T(p, 20) : T(p, -20),
|
|
2579
2579
|
"--hep-cr-tab-active-color": F
|
|
2580
2580
|
};
|
|
2581
2581
|
});
|
|
2582
|
-
function
|
|
2582
|
+
function b(d) {
|
|
2583
2583
|
const p = parseInt(d.replace("#", ""), 16), A = p >> 16 & 255, F = p >> 8 & 255, V = p & 255;
|
|
2584
2584
|
return (0.299 * A + 0.587 * F + 0.114 * V) / 255 > 0.5;
|
|
2585
2585
|
}
|
|
@@ -2587,9 +2587,9 @@ const Me = `
|
|
|
2587
2587
|
const A = parseInt(d.replace("#", ""), 16), F = Math.round(2.55 * p), V = Math.min(255, Math.max(0, (A >> 16) + F)), $ = Math.min(255, Math.max(0, (A >> 8 & 255) + F)), G = Math.min(255, Math.max(0, (A & 255) + F));
|
|
2588
2588
|
return "#" + (16777216 + V * 65536 + $ * 256 + G).toString(16).slice(1);
|
|
2589
2589
|
}
|
|
2590
|
-
const k = g, s = L([]), m = L(n.language),
|
|
2590
|
+
const k = g, s = L([]), m = L(n.language), f = L(n.theme), _ = L(""), D = L(""), O = L(""), C = L(!1), P = L(null), S = L("stdout"), E = L(null), h = L(!1), e = L(60);
|
|
2591
2591
|
function t() {
|
|
2592
|
-
|
|
2592
|
+
f.value = f.value === "light" ? "dark" : "light";
|
|
2593
2593
|
}
|
|
2594
2594
|
const a = B(
|
|
2595
2595
|
() => new Ce({ pistonUrl: n.pistonUrl })
|
|
@@ -2601,13 +2601,13 @@ const Me = `
|
|
|
2601
2601
|
return d.includes(":") ? d.split(":")[0] : d;
|
|
2602
2602
|
});
|
|
2603
2603
|
async function c() {
|
|
2604
|
-
h.value = !0,
|
|
2604
|
+
h.value = !0, E.value = null;
|
|
2605
2605
|
try {
|
|
2606
2606
|
s.value = await a.value.getRuntimes();
|
|
2607
2607
|
const d = m.value.split(":")[0], p = s.value.find((A) => A.language === d);
|
|
2608
2608
|
p && !m.value.includes(":") && (m.value = `${d}:${p.version}`);
|
|
2609
2609
|
} catch (d) {
|
|
2610
|
-
|
|
2610
|
+
E.value = d instanceof Error ? d.message : "Failed to load runtimes";
|
|
2611
2611
|
} finally {
|
|
2612
2612
|
h.value = !1;
|
|
2613
2613
|
}
|
|
@@ -2616,17 +2616,17 @@ const Me = `
|
|
|
2616
2616
|
const p = d.includes(":") ? d.split(":")[0] : d, A = oe(p);
|
|
2617
2617
|
_.value = A, k("language-change", p, A);
|
|
2618
2618
|
});
|
|
2619
|
-
async function
|
|
2619
|
+
async function v() {
|
|
2620
2620
|
if (!C.value) {
|
|
2621
|
-
C.value = !0, D.value = "", O.value = "", P.value = null,
|
|
2621
|
+
C.value = !0, D.value = "", O.value = "", P.value = null, E.value = null, S.value = "stdout", k("execute-start");
|
|
2622
2622
|
try {
|
|
2623
2623
|
const d = await a.value.execute(o.value, _.value);
|
|
2624
2624
|
D.value = d.output, O.value = d.stderr, P.value = d.executionTime || null, S.value = d.stderr ? "stderr" : "stdout", k("execute-end", d);
|
|
2625
2625
|
} catch (d) {
|
|
2626
|
-
|
|
2626
|
+
E.value = d instanceof Error ? d.message : "Execution failed", k("execute-end", {
|
|
2627
2627
|
success: !1,
|
|
2628
2628
|
output: "",
|
|
2629
|
-
stderr:
|
|
2629
|
+
stderr: E.value,
|
|
2630
2630
|
code: -1
|
|
2631
2631
|
});
|
|
2632
2632
|
} finally {
|
|
@@ -2668,14 +2668,14 @@ const Me = `
|
|
|
2668
2668
|
ge(async () => {
|
|
2669
2669
|
await c(), _.value || (_.value = n.defaultCode || oe(m.value));
|
|
2670
2670
|
});
|
|
2671
|
-
const N = B(() => `hep-cr-runner-${
|
|
2671
|
+
const N = B(() => `hep-cr-runner-${f.value}`);
|
|
2672
2672
|
return (d, p) => (x(), I("div", {
|
|
2673
2673
|
class: z(["hep-cr-runner", N.value]),
|
|
2674
2674
|
style: J(l.value)
|
|
2675
2675
|
}, [
|
|
2676
2676
|
y("div", We, [
|
|
2677
2677
|
y("div", Ve, [
|
|
2678
|
-
i.showLanguageSelector ?
|
|
2678
|
+
i.showLanguageSelector ? ve((x(), I("select", {
|
|
2679
2679
|
key: 0,
|
|
2680
2680
|
"onUpdate:modelValue": p[0] || (p[0] = (A) => m.value = A),
|
|
2681
2681
|
class: "hep-cr-language-select",
|
|
@@ -2694,7 +2694,7 @@ const Me = `
|
|
|
2694
2694
|
y("button", {
|
|
2695
2695
|
class: "hep-cr-btn hep-cr-btn-run",
|
|
2696
2696
|
disabled: C.value || h.value,
|
|
2697
|
-
onClick:
|
|
2697
|
+
onClick: v
|
|
2698
2698
|
}, [
|
|
2699
2699
|
C.value ? (x(), I("span", Je)) : (x(), I("span", Qe, "▶")),
|
|
2700
2700
|
Se(" " + H(C.value ? "运行中..." : i.executorLabel), 1)
|
|
@@ -2707,9 +2707,9 @@ const Me = `
|
|
|
2707
2707
|
y("button", {
|
|
2708
2708
|
class: "hep-cr-btn hep-cr-btn-theme",
|
|
2709
2709
|
onClick: t,
|
|
2710
|
-
title:
|
|
2710
|
+
title: f.value === "light" ? "Switch to dark mode" : "Switch to light mode"
|
|
2711
2711
|
}, [
|
|
2712
|
-
|
|
2712
|
+
f.value === "light" ? (x(), I("svg", tt, [...p[5] || (p[5] = [
|
|
2713
2713
|
y("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }, null, -1)
|
|
2714
2714
|
])])) : (x(), I("svg", nt, [...p[6] || (p[6] = [
|
|
2715
2715
|
we('<circle cx="12" cy="12" r="5" data-v-37101672></circle><line x1="12" y1="1" x2="12" y2="3" data-v-37101672></line><line x1="12" y1="21" x2="12" y2="23" data-v-37101672></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64" data-v-37101672></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78" data-v-37101672></line><line x1="1" y1="12" x2="3" y2="12" data-v-37101672></line><line x1="21" y1="12" x2="23" y2="12" data-v-37101672></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36" data-v-37101672></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22" data-v-37101672></line>', 9)
|
|
@@ -2717,7 +2717,7 @@ const Me = `
|
|
|
2717
2717
|
], 8, et)
|
|
2718
2718
|
])
|
|
2719
2719
|
]),
|
|
2720
|
-
|
|
2720
|
+
E.value ? (x(), I("div", at, H(E.value), 1)) : U("", !0),
|
|
2721
2721
|
y("div", rt, [
|
|
2722
2722
|
i.showEditor ? (x(), I("div", {
|
|
2723
2723
|
key: 0,
|
|
@@ -2752,7 +2752,7 @@ const Me = `
|
|
|
2752
2752
|
modelValue: _.value,
|
|
2753
2753
|
"onUpdate:modelValue": p[1] || (p[1] = (A) => _.value = A),
|
|
2754
2754
|
language: o.value,
|
|
2755
|
-
theme:
|
|
2755
|
+
theme: f.value,
|
|
2756
2756
|
disabled: !i.editable || C.value,
|
|
2757
2757
|
onChange: p[2] || (p[2] = (A) => k("change", A))
|
|
2758
2758
|
}, null, 8, ["modelValue", "language", "theme", "disabled"])
|
|
@@ -2802,8 +2802,8 @@ const Me = `
|
|
|
2802
2802
|
], 10, mt)
|
|
2803
2803
|
])
|
|
2804
2804
|
]),
|
|
2805
|
-
y("div",
|
|
2806
|
-
S.value === "stdout" ? (x(), I("pre",
|
|
2805
|
+
y("div", Et, [
|
|
2806
|
+
S.value === "stdout" ? (x(), I("pre", vt, H(C.value ? "代码执行中..." : D.value || '点击"运行"执行代码'), 1)) : (x(), I("pre", yt, H(O.value), 1))
|
|
2807
2807
|
])
|
|
2808
2808
|
], 4)
|
|
2809
2809
|
])
|
|
@@ -2821,30 +2821,31 @@ const Me = `
|
|
|
2821
2821
|
pistonUrl: { default: "/api/piston" },
|
|
2822
2822
|
language: { default: "javascript" },
|
|
2823
2823
|
theme: { default: "light" },
|
|
2824
|
+
themeColor: { default: "" },
|
|
2824
2825
|
showLanguageSelector: { type: Boolean, default: !0 },
|
|
2825
2826
|
showEditor: { type: Boolean, default: !0 },
|
|
2826
2827
|
editable: { type: Boolean, default: !0 },
|
|
2827
2828
|
defaultCode: {},
|
|
2828
2829
|
executorLabel: { default: "运行" }
|
|
2829
2830
|
},
|
|
2830
|
-
emits: ["update:modelValue", "close"],
|
|
2831
|
+
emits: ["update:modelValue", "close", "change"],
|
|
2831
2832
|
setup(i, { expose: g, emit: n }) {
|
|
2832
|
-
const l = i,
|
|
2833
|
+
const l = i, b = n, T = L(l.modelValue), k = B(() => l.modelValue !== void 0 ? l.modelValue : T.value);
|
|
2833
2834
|
ue(
|
|
2834
2835
|
() => l.modelValue,
|
|
2835
|
-
(
|
|
2836
|
-
|
|
2836
|
+
(f) => {
|
|
2837
|
+
f !== void 0 && (T.value = f);
|
|
2837
2838
|
}
|
|
2838
2839
|
);
|
|
2839
2840
|
function s() {
|
|
2840
|
-
T.value = !1,
|
|
2841
|
+
T.value = !1, b("update:modelValue", !1), b("close");
|
|
2841
2842
|
}
|
|
2842
|
-
function m(
|
|
2843
|
-
|
|
2843
|
+
function m(f) {
|
|
2844
|
+
f.target === f.currentTarget && s();
|
|
2844
2845
|
}
|
|
2845
2846
|
return g({
|
|
2846
2847
|
close: s
|
|
2847
|
-
}), (
|
|
2848
|
+
}), (f, _) => (x(), Te(xe, { to: "body" }, [
|
|
2848
2849
|
ie(_e, { name: "hep-cr-dialog-fade" }, {
|
|
2849
2850
|
default: Ie(() => [
|
|
2850
2851
|
k.value ? (x(), I("div", {
|
|
@@ -2886,10 +2887,10 @@ const Me = `
|
|
|
2886
2887
|
])])
|
|
2887
2888
|
]),
|
|
2888
2889
|
y("div", wt, [
|
|
2889
|
-
ie(Q, Fe(Re(
|
|
2890
|
+
ie(Q, Fe(f.$attrs, Re(f.$attrs)), null, 16)
|
|
2890
2891
|
]),
|
|
2891
|
-
|
|
2892
|
-
Ne(
|
|
2892
|
+
f.$slots.footer ? (x(), I("div", Tt, [
|
|
2893
|
+
Ne(f.$slots, "footer", { close: s })
|
|
2893
2894
|
])) : U("", !0)
|
|
2894
2895
|
], 4)
|
|
2895
2896
|
])) : U("", !0)
|