@hep-code-runner/vue2 2.0.3 → 2.1.0
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/README.md +6 -5
- package/dist/index.js +4 -4
- package/dist/index.mjs +59 -47
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,11 +55,12 @@ pnpm add @hep-code-runner/vue2
|
|
|
55
55
|
|
|
56
56
|
## Events 事件
|
|
57
57
|
|
|
58
|
-
| 事件名 | 参数 | 说明
|
|
59
|
-
| --------------- | -------------- |
|
|
60
|
-
| execute-start | - | 代码开始执行
|
|
61
|
-
| execute-end | result | 代码执行完成
|
|
62
|
-
| language-change | language, code | 语言切换
|
|
58
|
+
| 事件名 | 参数 | 说明 |
|
|
59
|
+
| --------------- | -------------- | -------------- |
|
|
60
|
+
| execute-start | - | 代码开始执行 |
|
|
61
|
+
| execute-end | result | 代码执行完成 |
|
|
62
|
+
| language-change | language, code | 语言切换 |
|
|
63
|
+
| change | code | 代码变化(防抖)|
|
|
63
64
|
|
|
64
65
|
## 主题切换
|
|
65
66
|
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var ae=Object.defineProperty,ie=(r,e,t)=>e in r?ae(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,q=(r,e,t)=>ie(r,typeof e!="symbol"?e+"":e,t);let z=null;class se{constructor(e={}){q(this,"baseUrl"),q(this,"timeout"),this.baseUrl=e.pistonUrl||"/api/piston",this.timeout=e.timeout||3e3}async getRuntimes(e=!1){if(z&&!e)return z;try{const t=await fetch(`${this.baseUrl}/runtimes`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(`Failed to fetch runtimes: ${t.statusText}`);const l=await t.json();return z=l,l}catch(t){throw console.error("Failed to fetch runtimes:",t),t}}async execute(e,t,l={}){const p=(await this.getRuntimes()).find(g=>{var E;return g.language.toLowerCase()===e.toLowerCase()||((E=g.aliases)==null?void 0:E.some(w=>w.toLowerCase()===e.toLowerCase()))});if(!p)throw new Error(`Language '${e}' is not supported`);const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var ae=Object.defineProperty,ie=(r,e,t)=>e in r?ae(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,q=(r,e,t)=>ie(r,typeof e!="symbol"?e+"":e,t);let z=null;class se{constructor(e={}){q(this,"baseUrl"),q(this,"timeout"),this.baseUrl=e.pistonUrl||"/api/piston",this.timeout=e.timeout||3e3}async getRuntimes(e=!1){if(z&&!e)return z;try{const t=await fetch(`${this.baseUrl}/runtimes`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(`Failed to fetch runtimes: ${t.statusText}`);const l=await t.json();return z=l,l}catch(t){throw console.error("Failed to fetch runtimes:",t),t}}async execute(e,t,l={}){const p=(await this.getRuntimes()).find(g=>{var E;return g.language.toLowerCase()===e.toLowerCase()||((E=g.aliases)==null?void 0:E.some(w=>w.toLowerCase()===e.toLowerCase()))});if(!p)throw new Error(`Language '${e}' is not supported`);const m=this.getFileName(e),f={language:p.language,version:l.version||p.version,files:[{name:m,content:t}],stdin:l.stdin||"",args:l.args||[],run_timeout:l.runTimeout||this.timeout,compile_timeout:this.timeout},u=Date.now();try{const g=await fetch(`${this.baseUrl}/execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});if(!g.ok)throw new Error(`Execute failed: ${g.statusText}`);const E=await g.json(),w=Date.now()-u,k=E.run.stdout||"",x=E.run.stderr||"";return{success:E.run.code===0,output:k,stderr:x,code:E.run.code,executionTime:w,compile:E.compile?{stdout:E.compile.stdout||"",stderr:E.compile.stderr||"",code:E.compile.code}:void 0}}catch(g){return{success:!1,output:"",stderr:g instanceof Error?g.message:"Unknown error",code:-1,executionTime:Date.now()-u}}}getFileName(e){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"}[e.toLowerCase()]||`main.${e}`}}const oe={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 W(r){const e=r.toLowerCase();retu
|
|
|
71
71
|
* @author Lea Verou <https://lea.verou.me>
|
|
72
72
|
* @namespace
|
|
73
73
|
* @public
|
|
74
|
-
*/var t=function(l){var p=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,f=0,m={},u={manual:l.Prism&&l.Prism.manual,disableWorkerMessageHandler:l.Prism&&l.Prism.disableWorkerMessageHandler,util:{encode:function a(n){return n instanceof g?new g(n.type,a(n.content),n.alias):Array.isArray(n)?n.map(a):n.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(a){return Object.prototype.toString.call(a).slice(8,-1)},objId:function(a){return a.__id||Object.defineProperty(a,"__id",{value:++f}),a.__id},clone:function a(n,i){i=i||{};var s,o;switch(u.util.type(n)){case"Object":if(o=u.util.objId(n),i[o])return i[o];s={},i[o]=s;for(var d in n)n.hasOwnProperty(d)&&(s[d]=a(n[d],i));return s;case"Array":return o=u.util.objId(n),i[o]?i[o]:(s=[],i[o]=s,n.forEach(function(h,c){s[c]=a(h,i)}),s);default:return n}},getLanguage:function(a){for(;a;){var n=p.exec(a.className);if(n)return n[1].toLowerCase();a=a.parentElement}return"none"},setLanguage:function(a,n){a.className=a.className.replace(RegExp(p,"gi"),""),a.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(s){var a=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(s.stack)||[])[1];if(a){var n=document.getElementsByTagName("script");for(var i in n)if(n[i].src==a)return n[i]}return null}},isActive:function(a,n,i){for(var s="no-"+n;a;){var o=a.classList;if(o.contains(n))return!0;if(o.contains(s))return!1;a=a.parentElement}return!!i}},languages:{plain:m,plaintext:m,text:m,txt:m,extend:function(a,n){var i=u.util.clone(u.languages[a]);for(var s in n)i[s]=n[s];return i},insertBefore:function(a,n,i,s){s=s||u.languages;var o=s[a],d={};for(var h in o)if(o.hasOwnProperty(h)){if(h==n)for(var c in i)i.hasOwnProperty(c)&&(d[c]=i[c]);i.hasOwnProperty(h)||(d[h]=o[h])}var v=s[a];return s[a]=d,u.languages.DFS(u.languages,function(A,R){R===v&&A!=a&&(this[A]=d)}),d},DFS:function a(n,i,s,o){o=o||{};var d=u.util.objId;for(var h in n)if(n.hasOwnProperty(h)){i.call(n,h,n[h],s||h);var c=n[h],v=u.util.type(c);v==="Object"&&!o[d(c)]?(o[d(c)]=!0,a(c,i,null,o)):v==="Array"&&!o[d(c)]&&(o[d(c)]=!0,a(c,i,h,o))}}},plugins:{},highlightAll:function(a,n){u.highlightAllUnder(document,a,n)},highlightAllUnder:function(a,n,i){var s={callback:i,container:a,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};u.hooks.run("before-highlightall",s),s.elements=Array.prototype.slice.apply(s.container.querySelectorAll(s.selector)),u.hooks.run("before-all-elements-highlight",s);for(var o=0,d;d=s.elements[o++];)u.highlightElement(d,n===!0,s.callback)},highlightElement:function(a,n,i){var s=u.util.getLanguage(a),o=u.languages[s];u.util.setLanguage(a,s);var d=a.parentElement;d&&d.nodeName.toLowerCase()==="pre"&&u.util.setLanguage(d,s);var h=a.textContent,c={element:a,language:s,grammar:o,code:h};function v(R){c.highlightedCode=R,u.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,u.hooks.run("after-highlight",c),u.hooks.run("complete",c),i&&i.call(c.element)}if(u.hooks.run("before-sanity-check",c),d=c.element.parentElement,d&&d.nodeName.toLowerCase()==="pre"&&!d.hasAttribute("tabindex")&&d.setAttribute("tabindex","0"),!c.code){u.hooks.run("complete",c),i&&i.call(c.element);return}if(u.hooks.run("before-highlight",c),!c.grammar){v(u.util.encode(c.code));return}if(n&&l.Worker){var A=new Worker(u.filename);A.onmessage=function(R){v(R.data)},A.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else v(u.highlight(c.code,c.grammar,c.language))},highlight:function(a,n,i){var s={code:a,grammar:n,language:i};if(u.hooks.run("before-tokenize",s),!s.grammar)throw new Error('The language "'+s.language+'" has no grammar.');return s.tokens=u.tokenize(s.code,s.grammar),u.hooks.run("after-tokenize",s),g.stringify(u.util.encode(s.tokens),s.language)},tokenize:function(a,n){var i=n.rest;if(i){for(var s in i)n[s]=i[s];delete n.rest}var o=new k;return x(o,o.head,a),w(a,o,n,o.head,0),N(o)},hooks:{all:{},add:function(a,n){var i=u.hooks.all;i[a]=i[a]||[],i[a].push(n)},run:function(a,n){var i=u.hooks.all[a];if(!(!i||!i.length))for(var s=0,o;o=i[s++];)o(n)}},Token:g};l.Prism=u;function g(a,n,i,s){this.type=a,this.content=n,this.alias=i,this.length=(s||"").length|0}g.stringify=function a(n,i){if(typeof n=="string")return n;if(Array.isArray(n)){var s="";return n.forEach(function(v){s+=a(v,i)}),s}var o={type:n.type,content:a(n.content,i),tag:"span",classes:["token",n.type],attributes:{},language:i},d=n.alias;d&&(Array.isArray(d)?Array.prototype.push.apply(o.classes,d):o.classes.push(d)),u.hooks.run("wrap",o);var h="";for(var c in o.attributes)h+=" "+c+'="'+(o.attributes[c]||"").replace(/"/g,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+h+">"+o.content+"</"+o.tag+">"};function E(a,n,i,s){a.lastIndex=n;var o=a.exec(i);if(o&&s&&o[1]){var d=o[1].length;o.index+=d,o[0]=o[0].slice(d)}return o}function w(a,n,i,s,o,d){for(var h in i)if(!(!i.hasOwnProperty(h)||!i[h])){var c=i[h];c=Array.isArray(c)?c:[c];for(var v=0;v<c.length;++v){if(d&&d.cause==h+","+v)return;var A=c[v],R=A.inside,X=!!A.lookbehind,Z=!!A.greedy,ee=A.alias;if(Z&&!A.pattern.global){var te=A.pattern.toString().match(/[imsuy]*$/)[0];A.pattern=RegExp(A.pattern.source,te+"g")}for(var K=A.pattern||A,T=s.next,I=o;T!==n.tail&&!(d&&I>=d.reach);I+=T.value.length,T=T.next){var C=T.value;if(n.length>a.length)return;if(!(C instanceof g)){var D=1,_;if(Z){if(_=E(K,I,a,X),!_||_.index>=a.length)break;var P=_.index,re=_.index+_[0].length,F=I;for(F+=T.value.length;P>=F;)T=T.next,F+=T.value.length;if(F-=T.value.length,I=F,T.value instanceof g)continue;for(var L=T;L!==n.tail&&(F<re||typeof L.value=="string");L=L.next)D++,F+=L.value.length;D--,C=a.slice(I,F),_.index-=I}else if(_=E(K,0,C,X),!_)continue;var P=_.index,$=_[0],H=C.slice(0,P),V=C.slice(P+$.length),B=I+C.length;d&&B>d.reach&&(d.reach=B);var M=T.prev;H&&(M=x(n,M,H),I+=H.length),U(n,M,D);var ne=new g(h,R?u.tokenize($,R):$,ee,$);if(T=x(n,M,ne),V&&x(n,T,V),D>1){var G={cause:h+","+v,reach:B};w(a,n,i,T.prev,I,G),d&&G.reach>d.reach&&(d.reach=G.reach)}}}}}}function k(){var a={value:null,prev:null,next:null},n={value:null,prev:a,next:null};a.next=n,this.head=a,this.tail=n,this.length=0}function x(a,n,i){var s=n.next,o={value:i,prev:n,next:s};return n.next=o,s.prev=o,a.length++,o}function U(a,n,i){for(var s=n.next,o=0;o<i&&s!==a.tail;o++)s=s.next;n.next=s,s.prev=n,a.length-=o}function N(a){for(var n=[],i=a.head.next;i!==a.tail;)n.push(i.value),i=i.next;return n}if(!l.document)return l.addEventListener&&(u.disableWorkerMessageHandler||l.addEventListener("message",function(a){var n=JSON.parse(a.data),i=n.language,s=n.code,o=n.immediateClose;l.postMessage(u.highlight(s,u.languages[i],i)),o&&l.close()},!1)),u;var y=u.util.currentScript();y&&(u.filename=y.src,y.hasAttribute("data-manual")&&(u.manual=!0));function b(){u.manual||u.highlightAll()}if(!u.manual){var S=document.readyState;S==="loading"||S==="interactive"&&y&&y.defer?document.addEventListener("DOMContentLoaded",b):window.requestAnimationFrame?window.requestAnimationFrame(b):window.setTimeout(b,16)}return u}(e);r.exports&&(r.exports=t),typeof J<"u"&&(J.Prism=t),t.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]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(l){l.type==="entity"&&(l.attributes.title=l.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(p,f){var m={};m["language-"+f]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[f]},m.cdata=/^<!\[CDATA\[|\]\]>$/i;var u={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:m}};u["language-"+f]={pattern:/[\s\S]+/,inside:t.languages[f]};var g={};g[p]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return p}),"i"),lookbehind:!0,greedy:!0,inside:u},t.languages.insertBefore("markup","cdata",g)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(l,p){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+l+")"+/\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:[p,"language-"+p],inside:t.languages[p]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(l){var p=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;l.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+p.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\\((?:"+p.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+p.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+p.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:p,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:/[(){};:,]/},l.languages.css.atrule.inside.rest=l.languages.css;var f=l.languages.markup;f&&(f.tag.addInlined("style","css"),f.tag.addAttribute("style","css"))}(t),t.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:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.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}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.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:t.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:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.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:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.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:t.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"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.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")),t.languages.js=t.languages.javascript,function(){if(typeof t>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var l="Loading…",p=function(y,b){return"✖ Error "+y+" while fetching file: "+b},f="✖ Error: File does not exist or is empty",m={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},u="data-src-status",g="loading",E="loaded",w="failed",k="pre[data-src]:not(["+u+'="'+E+'"]):not(['+u+'="'+g+'"])';function x(y,b,S){var a=new XMLHttpRequest;a.open("GET",y,!0),a.onreadystatechange=function(){a.readyState==4&&(a.status<400&&a.responseText?b(a.responseText):a.status>=400?S(p(a.status,a.statusText)):S(f))},a.send(null)}function U(y){var b=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(y||"");if(b){var S=Number(b[1]),a=b[2],n=b[3];return a?n?[S,Number(n)]:[S,void 0]:[S,S]}}t.hooks.add("before-highlightall",function(y){y.selector+=", "+k}),t.hooks.add("before-sanity-check",function(y){var b=y.element;if(b.matches(k)){y.code="",b.setAttribute(u,g);var S=b.appendChild(document.createElement("CODE"));S.textContent=l;var a=b.getAttribute("data-src"),n=y.language;if(n==="none"){var i=(/\.(\w+)$/.exec(a)||[,"none"])[1];n=m[i]||i}t.util.setLanguage(S,n),t.util.setLanguage(b,n);var s=t.plugins.autoloader;s&&s.loadLanguages(n),x(a,function(o){b.setAttribute(u,E);var d=U(b.getAttribute("data-range"));if(d){var h=o.split(/\r\n?|\n/g),c=d[0],v=d[1]==null?h.length:d[1];c<0&&(c+=h.length),c=Math.max(0,Math.min(c-1,h.length)),v<0&&(v+=h.length),v=Math.max(0,Math.min(v,h.length)),o=h.slice(c,v).join(`
|
|
75
|
-
`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(c+1))}S.textContent=o,t.highlightElement(S)},function(o){b.setAttribute(u,w),S.textContent=o})}}),t.plugins.fileHighlight={highlight:function(b){for(var S=(b||document).querySelectorAll(k),a=0,n;n=S[a++];)t.highlightElement(n)}};var N=!1;t.fileHighlight=function(){N||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),N=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Q);var ue=Q.exports;const j=le(ue);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(r){var e=/\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/,t=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,l={pattern:RegExp(/(^|[^\w.])/.source+t+/[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:/\./}};r.languages.java=r.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[l,{pattern:RegExp(/(^|[^\w.])/.source+t+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:l.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+t+/[A-Z]\w*\b/.source),lookbehind:!0,inside:l.inside}],keyword:e,function:[r.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/}),r.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),r.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":l,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+t+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:l.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+t+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:l.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 e.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(r){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,t=0;t<2;t++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),r.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),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:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},r.languages.rust["closure-params"].inside.rest=r.languages.rust,r.languages.rust.attribute.inside.string=r.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(r){var e="\\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",t={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},l={bash:t,environment:{pattern:RegExp("\\$"+e),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("(\\{)"+e),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})/};r.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;|&]|[<>]\\()"+e),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:l},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:t}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:l},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:l.entity}}],environment:{pattern:RegExp("\\$?"+e),alias:"constant"},variable:l.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}},t.inside=r.languages.bash;for(var p=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],f=l.variable[1].inside,m=0;m<p.length;m++)f[p[m]]=r.languages.bash[p[m]];r.languages.sh=r.languages.bash,r.languages.shell=r.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 ce=`
|
|
74
|
+
*/var t=function(l){var p=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,m=0,f={},u={manual:l.Prism&&l.Prism.manual,disableWorkerMessageHandler:l.Prism&&l.Prism.disableWorkerMessageHandler,util:{encode:function a(n){return n instanceof g?new g(n.type,a(n.content),n.alias):Array.isArray(n)?n.map(a):n.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(a){return Object.prototype.toString.call(a).slice(8,-1)},objId:function(a){return a.__id||Object.defineProperty(a,"__id",{value:++m}),a.__id},clone:function a(n,i){i=i||{};var s,o;switch(u.util.type(n)){case"Object":if(o=u.util.objId(n),i[o])return i[o];s={},i[o]=s;for(var d in n)n.hasOwnProperty(d)&&(s[d]=a(n[d],i));return s;case"Array":return o=u.util.objId(n),i[o]?i[o]:(s=[],i[o]=s,n.forEach(function(h,c){s[c]=a(h,i)}),s);default:return n}},getLanguage:function(a){for(;a;){var n=p.exec(a.className);if(n)return n[1].toLowerCase();a=a.parentElement}return"none"},setLanguage:function(a,n){a.className=a.className.replace(RegExp(p,"gi"),""),a.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(s){var a=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(s.stack)||[])[1];if(a){var n=document.getElementsByTagName("script");for(var i in n)if(n[i].src==a)return n[i]}return null}},isActive:function(a,n,i){for(var s="no-"+n;a;){var o=a.classList;if(o.contains(n))return!0;if(o.contains(s))return!1;a=a.parentElement}return!!i}},languages:{plain:f,plaintext:f,text:f,txt:f,extend:function(a,n){var i=u.util.clone(u.languages[a]);for(var s in n)i[s]=n[s];return i},insertBefore:function(a,n,i,s){s=s||u.languages;var o=s[a],d={};for(var h in o)if(o.hasOwnProperty(h)){if(h==n)for(var c in i)i.hasOwnProperty(c)&&(d[c]=i[c]);i.hasOwnProperty(h)||(d[h]=o[h])}var v=s[a];return s[a]=d,u.languages.DFS(u.languages,function(A,R){R===v&&A!=a&&(this[A]=d)}),d},DFS:function a(n,i,s,o){o=o||{};var d=u.util.objId;for(var h in n)if(n.hasOwnProperty(h)){i.call(n,h,n[h],s||h);var c=n[h],v=u.util.type(c);v==="Object"&&!o[d(c)]?(o[d(c)]=!0,a(c,i,null,o)):v==="Array"&&!o[d(c)]&&(o[d(c)]=!0,a(c,i,h,o))}}},plugins:{},highlightAll:function(a,n){u.highlightAllUnder(document,a,n)},highlightAllUnder:function(a,n,i){var s={callback:i,container:a,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};u.hooks.run("before-highlightall",s),s.elements=Array.prototype.slice.apply(s.container.querySelectorAll(s.selector)),u.hooks.run("before-all-elements-highlight",s);for(var o=0,d;d=s.elements[o++];)u.highlightElement(d,n===!0,s.callback)},highlightElement:function(a,n,i){var s=u.util.getLanguage(a),o=u.languages[s];u.util.setLanguage(a,s);var d=a.parentElement;d&&d.nodeName.toLowerCase()==="pre"&&u.util.setLanguage(d,s);var h=a.textContent,c={element:a,language:s,grammar:o,code:h};function v(R){c.highlightedCode=R,u.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,u.hooks.run("after-highlight",c),u.hooks.run("complete",c),i&&i.call(c.element)}if(u.hooks.run("before-sanity-check",c),d=c.element.parentElement,d&&d.nodeName.toLowerCase()==="pre"&&!d.hasAttribute("tabindex")&&d.setAttribute("tabindex","0"),!c.code){u.hooks.run("complete",c),i&&i.call(c.element);return}if(u.hooks.run("before-highlight",c),!c.grammar){v(u.util.encode(c.code));return}if(n&&l.Worker){var A=new Worker(u.filename);A.onmessage=function(R){v(R.data)},A.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else v(u.highlight(c.code,c.grammar,c.language))},highlight:function(a,n,i){var s={code:a,grammar:n,language:i};if(u.hooks.run("before-tokenize",s),!s.grammar)throw new Error('The language "'+s.language+'" has no grammar.');return s.tokens=u.tokenize(s.code,s.grammar),u.hooks.run("after-tokenize",s),g.stringify(u.util.encode(s.tokens),s.language)},tokenize:function(a,n){var i=n.rest;if(i){for(var s in i)n[s]=i[s];delete n.rest}var o=new k;return x(o,o.head,a),w(a,o,n,o.head,0),N(o)},hooks:{all:{},add:function(a,n){var i=u.hooks.all;i[a]=i[a]||[],i[a].push(n)},run:function(a,n){var i=u.hooks.all[a];if(!(!i||!i.length))for(var s=0,o;o=i[s++];)o(n)}},Token:g};l.Prism=u;function g(a,n,i,s){this.type=a,this.content=n,this.alias=i,this.length=(s||"").length|0}g.stringify=function a(n,i){if(typeof n=="string")return n;if(Array.isArray(n)){var s="";return n.forEach(function(v){s+=a(v,i)}),s}var o={type:n.type,content:a(n.content,i),tag:"span",classes:["token",n.type],attributes:{},language:i},d=n.alias;d&&(Array.isArray(d)?Array.prototype.push.apply(o.classes,d):o.classes.push(d)),u.hooks.run("wrap",o);var h="";for(var c in o.attributes)h+=" "+c+'="'+(o.attributes[c]||"").replace(/"/g,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+h+">"+o.content+"</"+o.tag+">"};function E(a,n,i,s){a.lastIndex=n;var o=a.exec(i);if(o&&s&&o[1]){var d=o[1].length;o.index+=d,o[0]=o[0].slice(d)}return o}function w(a,n,i,s,o,d){for(var h in i)if(!(!i.hasOwnProperty(h)||!i[h])){var c=i[h];c=Array.isArray(c)?c:[c];for(var v=0;v<c.length;++v){if(d&&d.cause==h+","+v)return;var A=c[v],R=A.inside,X=!!A.lookbehind,Z=!!A.greedy,ee=A.alias;if(Z&&!A.pattern.global){var te=A.pattern.toString().match(/[imsuy]*$/)[0];A.pattern=RegExp(A.pattern.source,te+"g")}for(var K=A.pattern||A,T=s.next,I=o;T!==n.tail&&!(d&&I>=d.reach);I+=T.value.length,T=T.next){var C=T.value;if(n.length>a.length)return;if(!(C instanceof g)){var D=1,_;if(Z){if(_=E(K,I,a,X),!_||_.index>=a.length)break;var P=_.index,re=_.index+_[0].length,F=I;for(F+=T.value.length;P>=F;)T=T.next,F+=T.value.length;if(F-=T.value.length,I=F,T.value instanceof g)continue;for(var L=T;L!==n.tail&&(F<re||typeof L.value=="string");L=L.next)D++,F+=L.value.length;D--,C=a.slice(I,F),_.index-=I}else if(_=E(K,0,C,X),!_)continue;var P=_.index,$=_[0],H=C.slice(0,P),V=C.slice(P+$.length),B=I+C.length;d&&B>d.reach&&(d.reach=B);var M=T.prev;H&&(M=x(n,M,H),I+=H.length),U(n,M,D);var ne=new g(h,R?u.tokenize($,R):$,ee,$);if(T=x(n,M,ne),V&&x(n,T,V),D>1){var G={cause:h+","+v,reach:B};w(a,n,i,T.prev,I,G),d&&G.reach>d.reach&&(d.reach=G.reach)}}}}}}function k(){var a={value:null,prev:null,next:null},n={value:null,prev:a,next:null};a.next=n,this.head=a,this.tail=n,this.length=0}function x(a,n,i){var s=n.next,o={value:i,prev:n,next:s};return n.next=o,s.prev=o,a.length++,o}function U(a,n,i){for(var s=n.next,o=0;o<i&&s!==a.tail;o++)s=s.next;n.next=s,s.prev=n,a.length-=o}function N(a){for(var n=[],i=a.head.next;i!==a.tail;)n.push(i.value),i=i.next;return n}if(!l.document)return l.addEventListener&&(u.disableWorkerMessageHandler||l.addEventListener("message",function(a){var n=JSON.parse(a.data),i=n.language,s=n.code,o=n.immediateClose;l.postMessage(u.highlight(s,u.languages[i],i)),o&&l.close()},!1)),u;var y=u.util.currentScript();y&&(u.filename=y.src,y.hasAttribute("data-manual")&&(u.manual=!0));function b(){u.manual||u.highlightAll()}if(!u.manual){var S=document.readyState;S==="loading"||S==="interactive"&&y&&y.defer?document.addEventListener("DOMContentLoaded",b):window.requestAnimationFrame?window.requestAnimationFrame(b):window.setTimeout(b,16)}return u}(e);r.exports&&(r.exports=t),typeof J<"u"&&(J.Prism=t),t.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]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(l){l.type==="entity"&&(l.attributes.title=l.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(p,m){var f={};f["language-"+m]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[m]},f.cdata=/^<!\[CDATA\[|\]\]>$/i;var u={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:f}};u["language-"+m]={pattern:/[\s\S]+/,inside:t.languages[m]};var g={};g[p]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return p}),"i"),lookbehind:!0,greedy:!0,inside:u},t.languages.insertBefore("markup","cdata",g)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(l,p){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+l+")"+/\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:[p,"language-"+p],inside:t.languages[p]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(l){var p=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;l.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+p.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\\((?:"+p.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+p.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+p.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:p,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:/[(){};:,]/},l.languages.css.atrule.inside.rest=l.languages.css;var m=l.languages.markup;m&&(m.tag.addInlined("style","css"),m.tag.addAttribute("style","css"))}(t),t.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:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.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}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.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:t.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:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.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:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.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:t.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"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.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")),t.languages.js=t.languages.javascript,function(){if(typeof t>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var l="Loading…",p=function(y,b){return"✖ Error "+y+" while fetching file: "+b},m="✖ Error: File does not exist or is empty",f={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},u="data-src-status",g="loading",E="loaded",w="failed",k="pre[data-src]:not(["+u+'="'+E+'"]):not(['+u+'="'+g+'"])';function x(y,b,S){var a=new XMLHttpRequest;a.open("GET",y,!0),a.onreadystatechange=function(){a.readyState==4&&(a.status<400&&a.responseText?b(a.responseText):a.status>=400?S(p(a.status,a.statusText)):S(m))},a.send(null)}function U(y){var b=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(y||"");if(b){var S=Number(b[1]),a=b[2],n=b[3];return a?n?[S,Number(n)]:[S,void 0]:[S,S]}}t.hooks.add("before-highlightall",function(y){y.selector+=", "+k}),t.hooks.add("before-sanity-check",function(y){var b=y.element;if(b.matches(k)){y.code="",b.setAttribute(u,g);var S=b.appendChild(document.createElement("CODE"));S.textContent=l;var a=b.getAttribute("data-src"),n=y.language;if(n==="none"){var i=(/\.(\w+)$/.exec(a)||[,"none"])[1];n=f[i]||i}t.util.setLanguage(S,n),t.util.setLanguage(b,n);var s=t.plugins.autoloader;s&&s.loadLanguages(n),x(a,function(o){b.setAttribute(u,E);var d=U(b.getAttribute("data-range"));if(d){var h=o.split(/\r\n?|\n/g),c=d[0],v=d[1]==null?h.length:d[1];c<0&&(c+=h.length),c=Math.max(0,Math.min(c-1,h.length)),v<0&&(v+=h.length),v=Math.max(0,Math.min(v,h.length)),o=h.slice(c,v).join(`
|
|
75
|
+
`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(c+1))}S.textContent=o,t.highlightElement(S)},function(o){b.setAttribute(u,w),S.textContent=o})}}),t.plugins.fileHighlight={highlight:function(b){for(var S=(b||document).querySelectorAll(k),a=0,n;n=S[a++];)t.highlightElement(n)}};var N=!1;t.fileHighlight=function(){N||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),N=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Q);var ue=Q.exports;const j=le(ue);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(r){var e=/\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/,t=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,l={pattern:RegExp(/(^|[^\w.])/.source+t+/[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:/\./}};r.languages.java=r.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[l,{pattern:RegExp(/(^|[^\w.])/.source+t+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:l.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+t+/[A-Z]\w*\b/.source),lookbehind:!0,inside:l.inside}],keyword:e,function:[r.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/}),r.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),r.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":l,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+t+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:l.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+t+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:l.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 e.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(r){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,t=0;t<2;t++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),r.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),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:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},r.languages.rust["closure-params"].inside.rest=r.languages.rust,r.languages.rust.attribute.inside.string=r.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(r){var e="\\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",t={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},l={bash:t,environment:{pattern:RegExp("\\$"+e),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("(\\{)"+e),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})/};r.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;|&]|[<>]\\()"+e),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:l},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:t}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:l},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:l.entity}}],environment:{pattern:RegExp("\\$?"+e),alias:"constant"},variable:l.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}},t.inside=r.languages.bash;for(var p=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],m=l.variable[1].inside,f=0;f<p.length;f++)m[p[f]]=r.languages.bash[p[f]];r.languages.sh=r.languages.bash,r.languages.shell=r.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 ce=`
|
|
76
76
|
/* 默认代码颜色 */
|
|
77
77
|
.hep-cr-editor .hep-cr-highlight code,
|
|
78
78
|
.hep-cr-editor .hep-cr-highlight pre {
|
|
@@ -233,4 +233,4 @@ This is a sample markdown document.`};function W(r){const e=r.toLowerCase();retu
|
|
|
233
233
|
.hep-cr-editor .token.console {
|
|
234
234
|
color: #333 !important;
|
|
235
235
|
}
|
|
236
|
-
`;function Y(r,e,t,l,p,f,m,u){var g=typeof r=="function"?r.options:r;return e&&(g.render=e,g.staticRenderFns=t,g._compiled=!0),f&&(g._scopeId="data-v-"+f),{exports:r,options:g}}typeof window<"u"&&(window.Prism=j);const pe={name:"CodeEditor",props:{value:{type:String,default:""},language:{type:String,default:"javascript"},theme:{type:String,default:"dark"},disabled:{type:Boolean,default:!1}},data:function(){return{highlightRef:null}},mounted(){this.loadPrismTheme(this.theme)},watch:{theme(r){this.loadPrismTheme(r)}},computed:{languageMap:function(){return{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"}},prismLanguage:function(){return this.languageMap[this.language.toLowerCase()]||"javascript"},editorBackground:function(){return this.theme==="dark"?"#1e1e1e":"#fafafa"},highlightedCode:function(){try{var r=j.languages[this.prismLanguage];if(r)return j.highlight(this.value||"",r,this.prismLanguage)}catch{}return this.escapeHtml(this.value||"")}},methods:{loadPrismTheme(r){const e="hep-cr-prism-styles",t=document.getElementById(e),l=r==="dark"?ce:de;t&&t.remove();const p=document.createElement("style");p.id=e,p.textContent=l,document.head.appendChild(p)},escapeHtml:function(r){var e=document.createElement("div");return e.textContent=r,e.innerHTML},handleInput:function(r){this.$emit("input",r.target.value),this.$emit("update:value",r.target.value)},handleScroll:function(r){var e=this.$refs.highlightRef;e&&(e.scrollTop=r.target.scrollTop,e.scrollLeft=r.target.scrollLeft)},handleKeydown:function(r){if(r.key==="Tab"){r.preventDefault();var e=r.target,t=e.selectionStart,l=e.selectionEnd,p=e.value;e.value=p.substring(0,t)+" "+p.substring(l),e.selectionStart=e.selectionEnd=t+2,this.$emit("input",e.value),this.$emit("update:value",e.value)}}}};var ge=function(){var e=this,t=e._self._c;return t("div",{staticClass:"hep-cr-editor",class:"hep-cr-theme-"+e.theme,style:{background:e.editorBackground}},[t("pre",{ref:"highlightRef",staticClass:"hep-cr-highlight",class:"language-"+e.prismLanguage,attrs:{"aria-hidden":"true"}},[t("code",{domProps:{innerHTML:e._s(e.highlightedCode)}})]),t("textarea",{staticClass:"hep-cr-input",attrs:{disabled:e.disabled,spellcheck:"false",placeholder:"Write your code here..."},domProps:{value:e.value},on:{input:e.handleInput,scroll:e.handleScroll,keydown:e.handleKeydown}})])},he=[],fe=Y(pe,ge,he,!1,null,"54283826");const me=fe.exports,be={name:"CodeRunner",components:{CodeEditor:me},props:{pistonUrl:{type:String,default:"/api/piston"},language:{type:String,default:"javascript"},theme:{type:String,default:"light",validator:function(r){return["light","dark"].indexOf(r)!==-1}},themeColor:{type:String,default:""},showLanguageSelector:{type:Boolean,default:!0},showEditor:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},defaultCode:{type:String,default:""},executorLabel:{type:String,default:"运行"}},data:function(){return{runtimes:[],currentLanguage:this.language,currentTheme:this.theme,code:this.defaultCode||W(this.language),output:"",stderr:"",isRunning:!1,executionTime:null,activeTab:"stdout",error:null,runtimesLoading:!1,client:null,editorWidth:60,copiedEditor:!1,copiedOutput:!1}},computed:{themeClass:function(){return"hep-cr-runner-"+this.currentTheme},themeStyle:function(){if(!this.themeColor)return{};var r=this.currentTheme==="dark",e=this.themeColor,t=function(m,u){var g=parseInt(m.replace("#",""),16),E=Math.round(2.55*u),w=Math.min(255,Math.max(0,(g>>16)+E)),k=Math.min(255,Math.max(0,(g>>8&255)+E)),x=Math.min(255,Math.max(0,(g&255)+E));return"#"+(16777216+w*65536+k*256+x).toString(16).slice(1)},l=function(m){var u=parseInt(m.replace("#",""),16),g=u>>16&255,E=u>>8&255,w=u&255,k=(.299*g+.587*E+.114*w)/255;return k>.5},p=l(e),f=p?"#000":"#fff";return{"--hep-cr-theme-color":e,"--hep-cr-theme-color-hover":r?t(e,20):t(e,-20),"--hep-cr-tab-active-color":f}},languageOptions:function(){return this.runtimes.map(function(r){return{value:r.language+":"+r.version,label:r.language.charAt(0).toUpperCase()+r.language.slice(1)+" "+r.version}})},languageName:function(){var r=this.currentLanguage;return r.includes(":")?r.split(":")[0]:r}},watch:{currentLanguage:function(r){var e=r.includes(":")?r.split(":")[0]:r;this.code=W(e),this.$emit("language-change",e,this.code)}},mounted:function(){this.client=new se({pistonUrl:this.pistonUrl}),this.loadRuntimes()},methods:{loadRuntimes:function(){var r=this;this.runtimesLoading=!0,this.error=null,this.client.getRuntimes().then(function(e){r.runtimes=e;var t=r.currentLanguage.split(":")[0],l=e.find(function(p){return p.language===t});l&&!r.currentLanguage.includes(":")&&(r.currentLanguage=t+":"+l.version)}).catch(function(e){r.error=e.message||"Failed to load runtimes"}).finally(function(){r.runtimesLoading=!1})},execute:function(){var r=this;this.isRunning||(this.isRunning=!0,this.output="",this.stderr="",this.executionTime=null,this.error=null,this.activeTab="stdout",this.$emit("execute-start"),this.client.execute(this.languageName,this.code).then(function(e){r.output=e.output,r.stderr=e.stderr,r.executionTime=e.executionTime||null,r.activeTab=e.stderr?"stderr":"stdout",r.$emit("execute-end",e)}).catch(function(e){r.error=e.message||"Execution failed",r.$emit("execute-end",{success:!1,output:"",stderr:r.error,code:-1})}).finally(function(){r.isRunning=!1}))},clearOutput:function(){this.output="",this.stderr="",this.executionTime=null,this.error=null},copyCode:function(){var r=this;navigator.clipboard.writeText(this.code),this.copiedEditor=!0,setTimeout(function(){r.copiedEditor=!1},2e3)},copyOutput:function(){var r=this,e=this.activeTab==="stdout"?this.output:this.stderr;navigator.clipboard.writeText(e),this.copiedOutput=!0,setTimeout(function(){r.copiedOutput=!1},2e3)},resetCode:function(){this.code=W(this.languageName)},toggleTheme:function(){this.currentTheme=this.currentTheme==="light"?"dark":"light"},startDrag:function(r){var e=this,t=document.querySelector(".hep-cr-runner-main");if(t){var l=function(f){var m=t.getBoundingClientRect(),u=(f.clientX-m.left)/m.width*100;e.editorWidth=Math.max(20,Math.min(80,u))},p=function(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",p),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",l),document.addEventListener("mouseup",p),document.body.style.cursor="col-resize",document.body.style.userSelect="none"}}}};var Ee=function(){var e=this,t=e._self._c;return t("div",{class:["hep-cr-runner",e.themeClass],style:e.themeStyle},[t("div",{staticClass:"hep-cr-runner-header"},[t("div",{staticClass:"hep-cr-runner-controls"},[e.showLanguageSelector?t("select",{directives:[{name:"model",rawName:"v-model",value:e.currentLanguage,expression:"currentLanguage"}],staticClass:"hep-cr-language-select",attrs:{disabled:e.isRunning},on:{change:function(l){var p=Array.prototype.filter.call(l.target.options,function(f){return f.selected}).map(function(f){var m="_value"in f?f._value:f.value;return m});e.currentLanguage=l.target.multiple?p:p[0]}}},[e.runtimesLoading?t("option",{attrs:{value:""}},[e._v("加载中...")]):e._e(),e._l(e.languageOptions,function(l){return t("option",{key:l.value,domProps:{value:l.value}},[e._v(" "+e._s(l.label)+" ")])})],2):e._e()]),t("div",{staticClass:"hep-cr-runner-actions"},[t("button",{staticClass:"hep-cr-btn hep-cr-btn-run",attrs:{disabled:e.isRunning||e.runtimesLoading},on:{click:e.execute}},[e.isRunning?t("span",{staticClass:"hep-cr-spinner"}):t("span",{staticClass:"hep-cr-run-icon"},[e._v("▶")]),e._v(" "+e._s(e.isRunning?"运行中...":e.executorLabel)+" ")]),e.showEditor&&e.editable?t("button",{staticClass:"hep-cr-btn hep-cr-btn-reset",on:{click:e.resetCode}},[e._v(" 重置 ")]):e._e(),t("button",{staticClass:"hep-cr-btn hep-cr-btn-theme",attrs:{title:e.currentTheme==="light"?"Switch to dark mode":"Switch to light mode"},on:{click:e.toggleTheme}},[e.currentTheme==="light"?t("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("path",{attrs:{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"}})]):t("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("circle",{attrs:{cx:"12",cy:"12",r:"5"}}),t("line",{attrs:{x1:"12",y1:"1",x2:"12",y2:"3"}}),t("line",{attrs:{x1:"12",y1:"21",x2:"12",y2:"23"}}),t("line",{attrs:{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}}),t("line",{attrs:{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}}),t("line",{attrs:{x1:"1",y1:"12",x2:"3",y2:"12"}}),t("line",{attrs:{x1:"21",y1:"12",x2:"23",y2:"12"}}),t("line",{attrs:{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}}),t("line",{attrs:{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"}})])])])]),e.error?t("div",{staticClass:"hep-cr-error-message"},[e._v(" "+e._s(e.error)+" ")]):e._e(),t("div",{staticClass:"hep-cr-runner-main"},[e.showEditor?t("div",{staticClass:"hep-cr-editor-panel",style:{width:e.editorWidth+"%"}},[t("div",{staticClass:"hep-cr-panel-header"},[t("span",{staticClass:"hep-cr-panel-title"},[e._v("编辑器")]),t("div",{staticClass:"hep-cr-output-actions"},[t("span",{staticClass:"hep-cr-language-badge"},[e._v(e._s(e.languageName))]),t("button",{staticClass:"hep-cr-btn-icon",class:{"hep-cr-btn-copied":e.copiedEditor},attrs:{disabled:e.copiedEditor,title:e.copiedEditor?"已复制":"复制"},on:{click:e.copyCode}},[e.copiedEditor?t("span",{staticClass:"hep-cr-copied-text"},[e._v("已复制")]):t("svg",{attrs:{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("rect",{attrs:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}})])])])]),t("CodeEditor",{attrs:{value:e.code,language:e.languageName,theme:e.currentTheme,disabled:!e.editable||e.isRunning},on:{input:function(l){e.code=l}}})],1):e._e(),e.showEditor?t("div",{staticClass:"hep-cr-resize-handle",on:{mousedown:e.startDrag}},[t("div",{staticClass:"hep-cr-resize-line"})]):e._e(),t("div",{staticClass:"hep-cr-output-panel",style:{width:e.showEditor?100-e.editorWidth+"%":"100%"}},[t("div",{staticClass:"hep-cr-panel-header"},[t("div",{staticClass:"hep-cr-output-tabs"},[t("button",{class:["hep-cr-tab",{active:e.activeTab==="stdout"}],on:{click:function(l){e.activeTab="stdout"}}},[e._v(" 输出 ")]),e.stderr?t("button",{class:["hep-cr-tab","hep-cr-tab-error",{active:e.activeTab==="stderr"}],on:{click:function(l){e.activeTab="stderr"}}},[e._v(" 错误 ")]):e._e()]),t("div",{staticClass:"hep-cr-output-actions"},[e.executionTime!==null?t("span",{staticClass:"hep-cr-execution-time"},[e._v(" "+e._s(e.executionTime)+"ms ")]):e._e(),t("button",{staticClass:"hep-cr-btn-icon",class:{"hep-cr-btn-copied":e.copiedOutput},attrs:{disabled:e.copiedOutput,title:e.copiedOutput?"已复制":"复制"},on:{click:e.copyOutput}},[e.copiedOutput?t("span",{staticClass:"hep-cr-copied-text"},[e._v("已复制")]):t("svg",{attrs:{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("rect",{attrs:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}})])])])]),t("div",{staticClass:"hep-cr-output-content"},[e.activeTab==="stdout"?t("pre",[e._v(e._s(e.isRunning?"代码执行中...":e.output||'点击"运行"执行代码'))]):t("pre",{staticClass:"hep-cr-stderr"},[e._v(e._s(e.stderr))])])])])])},ve=[],ye=Y(be,Ee,ve,!1,null,"3440e1f1");const O=ye.exports,Se={name:"CodeRunnerDialog",components:{CodeRunner:O},props:{value:{type:Boolean,default:!1},title:{type:String,default:"代码执行器"},width:{type:[String,Number],default:800}},model:{prop:"value",event:"input"},data(){return{localVisible:this.value}},computed:{dialogWidth(){return typeof this.width=="number"?this.width+"px":this.width}},watch:{value(r){this.localVisible=r}},methods:{close(){this.localVisible=!1,this.$emit("input",!1),this.$emit("update:value",!1),this.$emit("close")},handleOverlayClick(r){r.target===r.currentTarget&&this.close()}},expose:["close"]};var Ae=function(){var e=this,t=e._self._c;return e.localVisible?t("div",{staticClass:"hep-cr-dialog-overlay",on:{click:e.handleOverlayClick}},[t("div",{staticClass:"hep-cr-dialog-container",style:{width:e.dialogWidth}},[t("div",{staticClass:"hep-cr-dialog-header"},[t("h3",{staticClass:"hep-cr-dialog-title"},[e._v(e._s(e.title))]),t("button",{staticClass:"hep-cr-dialog-close",on:{click:e.close}},[t("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("line",{attrs:{x1:"18",y1:"6",x2:"6",y2:"18"}}),t("line",{attrs:{x1:"6",y1:"6",x2:"18",y2:"18"}})])])]),t("div",{staticClass:"hep-cr-dialog-body"},[t("CodeRunner",e._b({},"CodeRunner",e.$attrs,!1))],1),t("div",{staticClass:"hep-cr-dialog-footer"},[e._t("footer",null,{close:e.close})],2)])]):e._e()},Te=[],we=Y(Se,Ae,Te,!1,null,"cae42232");const ke=we.exports;O.install=r=>{r.component("CodeRunner",O)};const _e={install(r){r.component("CodeRunner",O)}};exports.CodeRunner=O;exports.CodeRunnerDialog=ke;exports.default=_e;
|
|
236
|
+
`;function Y(r,e,t,l,p,m,f,u){var g=typeof r=="function"?r.options:r;return e&&(g.render=e,g.staticRenderFns=t,g._compiled=!0),m&&(g._scopeId="data-v-"+m),{exports:r,options:g}}typeof window<"u"&&(window.Prism=j);const pe={name:"CodeEditor",props:{value:{type:String,default:""},language:{type:String,default:"javascript"},theme:{type:String,default:"dark"},disabled:{type:Boolean,default:!1}},data:function(){return{highlightRef:null,changeTimer:null}},mounted(){this.loadPrismTheme(this.theme)},watch:{theme(r){this.loadPrismTheme(r)}},computed:{languageMap:function(){return{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"}},prismLanguage:function(){return this.languageMap[this.language.toLowerCase()]||"javascript"},editorBackground:function(){return this.theme==="dark"?"#1e1e1e":"#fafafa"},highlightedCode:function(){try{var r=j.languages[this.prismLanguage];if(r)return j.highlight(this.value||"",r,this.prismLanguage)}catch{}return this.escapeHtml(this.value||"")}},methods:{loadPrismTheme(r){const e="hep-cr-prism-styles",t=document.getElementById(e),l=r==="dark"?ce:de;t&&t.remove();const p=document.createElement("style");p.id=e,p.textContent=l,document.head.appendChild(p)},escapeHtml:function(r){var e=document.createElement("div");return e.textContent=r,e.innerHTML},handleInput:function(r){this.$emit("input",r.target.value),this.$emit("update:value",r.target.value),this.emitChange(r.target.value)},handleScroll:function(r){var e=this.$refs.highlightRef;e&&(e.scrollTop=r.target.scrollTop,e.scrollLeft=r.target.scrollLeft)},handleKeydown:function(r){if(r.key==="Tab"){r.preventDefault();var e=r.target,t=e.selectionStart,l=e.selectionEnd,p=e.value;e.value=p.substring(0,t)+" "+p.substring(l),e.selectionStart=e.selectionEnd=t+2,this.$emit("input",e.value),this.$emit("update:value",e.value),this.emitChange(e.value)}},emitChange:function(r){var e=this;e.changeTimer&&clearTimeout(e.changeTimer),e.changeTimer=setTimeout(function(){e.$emit("change",r)},500)}},beforeDestroy:function(){this.changeTimer&&clearTimeout(this.changeTimer)}};var ge=function(){var e=this,t=e._self._c;return t("div",{staticClass:"hep-cr-editor",class:"hep-cr-theme-"+e.theme,style:{background:e.editorBackground}},[t("pre",{ref:"highlightRef",staticClass:"hep-cr-highlight",class:"language-"+e.prismLanguage,attrs:{"aria-hidden":"true"}},[t("code",{domProps:{innerHTML:e._s(e.highlightedCode)}})]),t("textarea",{staticClass:"hep-cr-input",attrs:{disabled:e.disabled,spellcheck:"false",placeholder:"Write your code here..."},domProps:{value:e.value},on:{input:e.handleInput,scroll:e.handleScroll,keydown:e.handleKeydown}})])},he=[],me=Y(pe,ge,he,!1,null,"525880d3");const fe=me.exports,be={name:"CodeRunner",components:{CodeEditor:fe},props:{pistonUrl:{type:String,default:"/api/piston"},language:{type:String,default:"javascript"},theme:{type:String,default:"light",validator:function(r){return["light","dark"].indexOf(r)!==-1}},themeColor:{type:String,default:""},showLanguageSelector:{type:Boolean,default:!0},showEditor:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},defaultCode:{type:String,default:""},executorLabel:{type:String,default:"运行"}},data:function(){return{runtimes:[],currentLanguage:this.language,currentTheme:this.theme,code:this.defaultCode||W(this.language),output:"",stderr:"",isRunning:!1,executionTime:null,activeTab:"stdout",error:null,runtimesLoading:!1,client:null,editorWidth:60,copiedEditor:!1,copiedOutput:!1}},computed:{themeClass:function(){return"hep-cr-runner-"+this.currentTheme},themeStyle:function(){if(!this.themeColor)return{};var r=this.currentTheme==="dark",e=this.themeColor,t=function(f,u){var g=parseInt(f.replace("#",""),16),E=Math.round(2.55*u),w=Math.min(255,Math.max(0,(g>>16)+E)),k=Math.min(255,Math.max(0,(g>>8&255)+E)),x=Math.min(255,Math.max(0,(g&255)+E));return"#"+(16777216+w*65536+k*256+x).toString(16).slice(1)},l=function(f){var u=parseInt(f.replace("#",""),16),g=u>>16&255,E=u>>8&255,w=u&255,k=(.299*g+.587*E+.114*w)/255;return k>.5},p=l(e),m=p?"#000":"#fff";return{"--hep-cr-theme-color":e,"--hep-cr-theme-color-hover":r?t(e,20):t(e,-20),"--hep-cr-tab-active-color":m}},languageOptions:function(){return this.runtimes.map(function(r){return{value:r.language+":"+r.version,label:r.language.charAt(0).toUpperCase()+r.language.slice(1)+" "+r.version}})},languageName:function(){var r=this.currentLanguage;return r.includes(":")?r.split(":")[0]:r}},watch:{currentLanguage:function(r){var e=r.includes(":")?r.split(":")[0]:r;this.code=W(e),this.$emit("language-change",e,this.code)}},mounted:function(){this.client=new se({pistonUrl:this.pistonUrl}),this.loadRuntimes()},methods:{loadRuntimes:function(){var r=this;this.runtimesLoading=!0,this.error=null,this.client.getRuntimes().then(function(e){r.runtimes=e;var t=r.currentLanguage.split(":")[0],l=e.find(function(p){return p.language===t});l&&!r.currentLanguage.includes(":")&&(r.currentLanguage=t+":"+l.version)}).catch(function(e){r.error=e.message||"Failed to load runtimes"}).finally(function(){r.runtimesLoading=!1})},execute:function(){var r=this;this.isRunning||(this.isRunning=!0,this.output="",this.stderr="",this.executionTime=null,this.error=null,this.activeTab="stdout",this.$emit("execute-start"),this.client.execute(this.languageName,this.code).then(function(e){r.output=e.output,r.stderr=e.stderr,r.executionTime=e.executionTime||null,r.activeTab=e.stderr?"stderr":"stdout",r.$emit("execute-end",e)}).catch(function(e){r.error=e.message||"Execution failed",r.$emit("execute-end",{success:!1,output:"",stderr:r.error,code:-1})}).finally(function(){r.isRunning=!1}))},clearOutput:function(){this.output="",this.stderr="",this.executionTime=null,this.error=null},copyCode:function(){var r=this;navigator.clipboard.writeText(this.code),this.copiedEditor=!0,setTimeout(function(){r.copiedEditor=!1},2e3)},copyOutput:function(){var r=this,e=this.activeTab==="stdout"?this.output:this.stderr;navigator.clipboard.writeText(e),this.copiedOutput=!0,setTimeout(function(){r.copiedOutput=!1},2e3)},resetCode:function(){this.code=W(this.languageName)},toggleTheme:function(){this.currentTheme=this.currentTheme==="light"?"dark":"light"},startDrag:function(r){var e=this,t=document.querySelector(".hep-cr-runner-main");if(t){var l=function(m){var f=t.getBoundingClientRect(),u=(m.clientX-f.left)/f.width*100;e.editorWidth=Math.max(20,Math.min(80,u))},p=function(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",p),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",l),document.addEventListener("mouseup",p),document.body.style.cursor="col-resize",document.body.style.userSelect="none"}}}};var Ee=function(){var e=this,t=e._self._c;return t("div",{class:["hep-cr-runner",e.themeClass],style:e.themeStyle},[t("div",{staticClass:"hep-cr-runner-header"},[t("div",{staticClass:"hep-cr-runner-controls"},[e.showLanguageSelector?t("select",{directives:[{name:"model",rawName:"v-model",value:e.currentLanguage,expression:"currentLanguage"}],staticClass:"hep-cr-language-select",attrs:{disabled:e.isRunning},on:{change:function(l){var p=Array.prototype.filter.call(l.target.options,function(m){return m.selected}).map(function(m){var f="_value"in m?m._value:m.value;return f});e.currentLanguage=l.target.multiple?p:p[0]}}},[e.runtimesLoading?t("option",{attrs:{value:""}},[e._v("加载中...")]):e._e(),e._l(e.languageOptions,function(l){return t("option",{key:l.value,domProps:{value:l.value}},[e._v(" "+e._s(l.label)+" ")])})],2):e._e()]),t("div",{staticClass:"hep-cr-runner-actions"},[t("button",{staticClass:"hep-cr-btn hep-cr-btn-run",attrs:{disabled:e.isRunning||e.runtimesLoading},on:{click:e.execute}},[e.isRunning?t("span",{staticClass:"hep-cr-spinner"}):t("span",{staticClass:"hep-cr-run-icon"},[e._v("▶")]),e._v(" "+e._s(e.isRunning?"运行中...":e.executorLabel)+" ")]),e.showEditor&&e.editable?t("button",{staticClass:"hep-cr-btn hep-cr-btn-reset",on:{click:e.resetCode}},[e._v(" 重置 ")]):e._e(),t("button",{staticClass:"hep-cr-btn hep-cr-btn-theme",attrs:{title:e.currentTheme==="light"?"Switch to dark mode":"Switch to light mode"},on:{click:e.toggleTheme}},[e.currentTheme==="light"?t("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("path",{attrs:{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"}})]):t("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("circle",{attrs:{cx:"12",cy:"12",r:"5"}}),t("line",{attrs:{x1:"12",y1:"1",x2:"12",y2:"3"}}),t("line",{attrs:{x1:"12",y1:"21",x2:"12",y2:"23"}}),t("line",{attrs:{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}}),t("line",{attrs:{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}}),t("line",{attrs:{x1:"1",y1:"12",x2:"3",y2:"12"}}),t("line",{attrs:{x1:"21",y1:"12",x2:"23",y2:"12"}}),t("line",{attrs:{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}}),t("line",{attrs:{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"}})])])])]),e.error?t("div",{staticClass:"hep-cr-error-message"},[e._v(" "+e._s(e.error)+" ")]):e._e(),t("div",{staticClass:"hep-cr-runner-main"},[e.showEditor?t("div",{staticClass:"hep-cr-editor-panel",style:{width:e.editorWidth+"%"}},[t("div",{staticClass:"hep-cr-panel-header"},[t("span",{staticClass:"hep-cr-panel-title"},[e._v("编辑器")]),t("div",{staticClass:"hep-cr-output-actions"},[t("span",{staticClass:"hep-cr-language-badge"},[e._v(e._s(e.languageName))]),t("button",{staticClass:"hep-cr-btn-icon",class:{"hep-cr-btn-copied":e.copiedEditor},attrs:{disabled:e.copiedEditor,title:e.copiedEditor?"已复制":"复制"},on:{click:e.copyCode}},[e.copiedEditor?t("span",{staticClass:"hep-cr-copied-text"},[e._v("已复制")]):t("svg",{attrs:{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("rect",{attrs:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}})])])])]),t("CodeEditor",{attrs:{value:e.code,language:e.languageName,theme:e.currentTheme,disabled:!e.editable||e.isRunning},on:{input:function(l){e.code=l},change:function(l){return e.$emit("change",l)}}})],1):e._e(),e.showEditor?t("div",{staticClass:"hep-cr-resize-handle",on:{mousedown:e.startDrag}},[t("div",{staticClass:"hep-cr-resize-line"})]):e._e(),t("div",{staticClass:"hep-cr-output-panel",style:{width:e.showEditor?100-e.editorWidth+"%":"100%"}},[t("div",{staticClass:"hep-cr-panel-header"},[t("div",{staticClass:"hep-cr-output-tabs"},[t("button",{class:["hep-cr-tab",{active:e.activeTab==="stdout"}],on:{click:function(l){e.activeTab="stdout"}}},[e._v(" 输出 ")]),e.stderr?t("button",{class:["hep-cr-tab","hep-cr-tab-error",{active:e.activeTab==="stderr"}],on:{click:function(l){e.activeTab="stderr"}}},[e._v(" 错误 ")]):e._e()]),t("div",{staticClass:"hep-cr-output-actions"},[e.executionTime!==null?t("span",{staticClass:"hep-cr-execution-time"},[e._v(" "+e._s(e.executionTime)+"ms ")]):e._e(),t("button",{staticClass:"hep-cr-btn-icon",class:{"hep-cr-btn-copied":e.copiedOutput},attrs:{disabled:e.copiedOutput,title:e.copiedOutput?"已复制":"复制"},on:{click:e.copyOutput}},[e.copiedOutput?t("span",{staticClass:"hep-cr-copied-text"},[e._v("已复制")]):t("svg",{attrs:{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("rect",{attrs:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}})])])])]),t("div",{staticClass:"hep-cr-output-content"},[e.activeTab==="stdout"?t("pre",[e._v(e._s(e.isRunning?"代码执行中...":e.output||'点击"运行"执行代码'))]):t("pre",{staticClass:"hep-cr-stderr"},[e._v(e._s(e.stderr))])])])])])},ve=[],ye=Y(be,Ee,ve,!1,null,"8916bba0");const O=ye.exports,Se={name:"CodeRunnerDialog",components:{CodeRunner:O},props:{value:{type:Boolean,default:!1},title:{type:String,default:"代码执行器"},width:{type:[String,Number],default:800}},model:{prop:"value",event:"input"},data(){return{localVisible:this.value}},computed:{dialogWidth(){return typeof this.width=="number"?this.width+"px":this.width}},watch:{value(r){this.localVisible=r}},methods:{close(){this.localVisible=!1,this.$emit("input",!1),this.$emit("update:value",!1),this.$emit("close")},handleOverlayClick(r){r.target===r.currentTarget&&this.close()}},expose:["close"]};var Ae=function(){var e=this,t=e._self._c;return e.localVisible?t("div",{staticClass:"hep-cr-dialog-overlay",on:{click:e.handleOverlayClick}},[t("div",{staticClass:"hep-cr-dialog-container",style:{width:e.dialogWidth}},[t("div",{staticClass:"hep-cr-dialog-header"},[t("h3",{staticClass:"hep-cr-dialog-title"},[e._v(e._s(e.title))]),t("button",{staticClass:"hep-cr-dialog-close",on:{click:e.close}},[t("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("line",{attrs:{x1:"18",y1:"6",x2:"6",y2:"18"}}),t("line",{attrs:{x1:"6",y1:"6",x2:"18",y2:"18"}})])])]),t("div",{staticClass:"hep-cr-dialog-body"},[t("CodeRunner",e._b({},"CodeRunner",e.$attrs,!1))],1),t("div",{staticClass:"hep-cr-dialog-footer"},[e._t("footer",null,{close:e.close})],2)])]):e._e()},Te=[],we=Y(Se,Ae,Te,!1,null,"cae42232");const ke=we.exports;O.install=r=>{r.component("CodeRunner",O)};const _e={install(r){r.component("CodeRunner",O)}};exports.CodeRunner=O;exports.CodeRunnerDialog=ke;exports.default=_e;
|
package/dist/index.mjs
CHANGED
|
@@ -31,12 +31,12 @@ class se {
|
|
|
31
31
|
);
|
|
32
32
|
if (!p)
|
|
33
33
|
throw new Error(`Language '${e}' is not supported`);
|
|
34
|
-
const
|
|
34
|
+
const m = this.getFileName(e), f = {
|
|
35
35
|
language: p.language,
|
|
36
36
|
version: l.version || p.version,
|
|
37
37
|
files: [
|
|
38
38
|
{
|
|
39
|
-
name:
|
|
39
|
+
name: m,
|
|
40
40
|
content: t
|
|
41
41
|
}
|
|
42
42
|
],
|
|
@@ -51,7 +51,7 @@ class se {
|
|
|
51
51
|
headers: {
|
|
52
52
|
"Content-Type": "application/json"
|
|
53
53
|
},
|
|
54
|
-
body: JSON.stringify(
|
|
54
|
+
body: JSON.stringify(f)
|
|
55
55
|
});
|
|
56
56
|
if (!g.ok)
|
|
57
57
|
throw new Error(`Execute failed: ${g.statusText}`);
|
|
@@ -227,7 +227,7 @@ var Q = { exports: {} };
|
|
|
227
227
|
* @public
|
|
228
228
|
*/
|
|
229
229
|
var t = function(l) {
|
|
230
|
-
var p = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,
|
|
230
|
+
var p = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, m = 0, f = {}, u = {
|
|
231
231
|
/**
|
|
232
232
|
* By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
|
|
233
233
|
* current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
|
|
@@ -311,7 +311,7 @@ var Q = { exports: {} };
|
|
|
311
311
|
* @returns {number}
|
|
312
312
|
*/
|
|
313
313
|
objId: function(a) {
|
|
314
|
-
return a.__id || Object.defineProperty(a, "__id", { value: ++
|
|
314
|
+
return a.__id || Object.defineProperty(a, "__id", { value: ++m }), a.__id;
|
|
315
315
|
},
|
|
316
316
|
/**
|
|
317
317
|
* Creates a deep clone of the given object.
|
|
@@ -446,10 +446,10 @@ var Q = { exports: {} };
|
|
|
446
446
|
/**
|
|
447
447
|
* The grammar for plain, unformatted text.
|
|
448
448
|
*/
|
|
449
|
-
plain:
|
|
450
|
-
plaintext:
|
|
451
|
-
text:
|
|
452
|
-
txt:
|
|
449
|
+
plain: f,
|
|
450
|
+
plaintext: f,
|
|
451
|
+
text: f,
|
|
452
|
+
txt: f,
|
|
453
453
|
/**
|
|
454
454
|
* Creates a deep copy of the language with the given id and appends the given tokens.
|
|
455
455
|
*
|
|
@@ -1005,22 +1005,22 @@ var Q = { exports: {} };
|
|
|
1005
1005
|
* @example
|
|
1006
1006
|
* addInlined('style', 'css');
|
|
1007
1007
|
*/
|
|
1008
|
-
value: function(p,
|
|
1009
|
-
var
|
|
1010
|
-
|
|
1008
|
+
value: function(p, m) {
|
|
1009
|
+
var f = {};
|
|
1010
|
+
f["language-" + m] = {
|
|
1011
1011
|
pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
|
|
1012
1012
|
lookbehind: !0,
|
|
1013
|
-
inside: t.languages[
|
|
1014
|
-
},
|
|
1013
|
+
inside: t.languages[m]
|
|
1014
|
+
}, f.cdata = /^<!\[CDATA\[|\]\]>$/i;
|
|
1015
1015
|
var u = {
|
|
1016
1016
|
"included-cdata": {
|
|
1017
1017
|
pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
|
|
1018
|
-
inside:
|
|
1018
|
+
inside: f
|
|
1019
1019
|
}
|
|
1020
1020
|
};
|
|
1021
|
-
u["language-" +
|
|
1021
|
+
u["language-" + m] = {
|
|
1022
1022
|
pattern: /[\s\S]+/,
|
|
1023
|
-
inside: t.languages[
|
|
1023
|
+
inside: t.languages[m]
|
|
1024
1024
|
};
|
|
1025
1025
|
var g = {};
|
|
1026
1026
|
g[p] = {
|
|
@@ -1126,8 +1126,8 @@ var Q = { exports: {} };
|
|
|
1126
1126
|
},
|
|
1127
1127
|
punctuation: /[(){};:,]/
|
|
1128
1128
|
}, l.languages.css.atrule.inside.rest = l.languages.css;
|
|
1129
|
-
var
|
|
1130
|
-
|
|
1129
|
+
var m = l.languages.markup;
|
|
1130
|
+
m && (m.tag.addInlined("style", "css"), m.tag.addAttribute("style", "css"));
|
|
1131
1131
|
}(t), t.languages.clike = {
|
|
1132
1132
|
comment: [
|
|
1133
1133
|
{
|
|
@@ -1294,7 +1294,7 @@ var Q = { exports: {} };
|
|
|
1294
1294
|
Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
|
|
1295
1295
|
var l = "Loading…", p = function(y, b) {
|
|
1296
1296
|
return "✖ Error " + y + " while fetching file: " + b;
|
|
1297
|
-
},
|
|
1297
|
+
}, m = "✖ Error: File does not exist or is empty", f = {
|
|
1298
1298
|
js: "javascript",
|
|
1299
1299
|
py: "python",
|
|
1300
1300
|
rb: "ruby",
|
|
@@ -1308,7 +1308,7 @@ var Q = { exports: {} };
|
|
|
1308
1308
|
function x(y, b, S) {
|
|
1309
1309
|
var a = new XMLHttpRequest();
|
|
1310
1310
|
a.open("GET", y, !0), a.onreadystatechange = function() {
|
|
1311
|
-
a.readyState == 4 && (a.status < 400 && a.responseText ? b(a.responseText) : a.status >= 400 ? S(p(a.status, a.statusText)) : S(
|
|
1311
|
+
a.readyState == 4 && (a.status < 400 && a.responseText ? b(a.responseText) : a.status >= 400 ? S(p(a.status, a.statusText)) : S(m));
|
|
1312
1312
|
}, a.send(null);
|
|
1313
1313
|
}
|
|
1314
1314
|
function U(y) {
|
|
@@ -1332,7 +1332,7 @@ var Q = { exports: {} };
|
|
|
1332
1332
|
var a = b.getAttribute("data-src"), n = y.language;
|
|
1333
1333
|
if (n === "none") {
|
|
1334
1334
|
var i = (/\.(\w+)$/.exec(a) || [, "none"])[1];
|
|
1335
|
-
n =
|
|
1335
|
+
n = f[i] || i;
|
|
1336
1336
|
}
|
|
1337
1337
|
t.util.setLanguage(S, n), t.util.setLanguage(b, n);
|
|
1338
1338
|
var s = t.plugins.autoloader;
|
|
@@ -2185,8 +2185,8 @@ Prism.languages.sql = {
|
|
|
2185
2185
|
"operator",
|
|
2186
2186
|
"punctuation",
|
|
2187
2187
|
"number"
|
|
2188
|
-
],
|
|
2189
|
-
|
|
2188
|
+
], m = l.variable[1].inside, f = 0; f < p.length; f++)
|
|
2189
|
+
m[p[f]] = r.languages.bash[p[f]];
|
|
2190
2190
|
r.languages.sh = r.languages.bash, r.languages.shell = r.languages.bash;
|
|
2191
2191
|
})(Prism);
|
|
2192
2192
|
Prism.languages.json = {
|
|
@@ -2376,9 +2376,9 @@ const ce = `
|
|
|
2376
2376
|
color: #333 !important;
|
|
2377
2377
|
}
|
|
2378
2378
|
`;
|
|
2379
|
-
function Y(r, e, t, l, p,
|
|
2379
|
+
function Y(r, e, t, l, p, m, f, u) {
|
|
2380
2380
|
var g = typeof r == "function" ? r.options : r;
|
|
2381
|
-
return e && (g.render = e, g.staticRenderFns = t, g._compiled = !0),
|
|
2381
|
+
return e && (g.render = e, g.staticRenderFns = t, g._compiled = !0), m && (g._scopeId = "data-v-" + m), {
|
|
2382
2382
|
exports: r,
|
|
2383
2383
|
options: g
|
|
2384
2384
|
};
|
|
@@ -2406,7 +2406,8 @@ const pe = {
|
|
|
2406
2406
|
},
|
|
2407
2407
|
data: function() {
|
|
2408
2408
|
return {
|
|
2409
|
-
highlightRef: null
|
|
2409
|
+
highlightRef: null,
|
|
2410
|
+
changeTimer: null
|
|
2410
2411
|
};
|
|
2411
2412
|
},
|
|
2412
2413
|
mounted() {
|
|
@@ -2484,7 +2485,7 @@ const pe = {
|
|
|
2484
2485
|
return e.textContent = r, e.innerHTML;
|
|
2485
2486
|
},
|
|
2486
2487
|
handleInput: function(r) {
|
|
2487
|
-
this.$emit("input", r.target.value), this.$emit("update:value", r.target.value);
|
|
2488
|
+
this.$emit("input", r.target.value), this.$emit("update:value", r.target.value), this.emitChange(r.target.value);
|
|
2488
2489
|
},
|
|
2489
2490
|
handleScroll: function(r) {
|
|
2490
2491
|
var e = this.$refs.highlightRef;
|
|
@@ -2494,26 +2495,35 @@ const pe = {
|
|
|
2494
2495
|
if (r.key === "Tab") {
|
|
2495
2496
|
r.preventDefault();
|
|
2496
2497
|
var e = r.target, t = e.selectionStart, l = e.selectionEnd, p = e.value;
|
|
2497
|
-
e.value = p.substring(0, t) + " " + p.substring(l), e.selectionStart = e.selectionEnd = t + 2, this.$emit("input", e.value), this.$emit("update:value", e.value);
|
|
2498
|
+
e.value = p.substring(0, t) + " " + p.substring(l), e.selectionStart = e.selectionEnd = t + 2, this.$emit("input", e.value), this.$emit("update:value", e.value), this.emitChange(e.value);
|
|
2498
2499
|
}
|
|
2500
|
+
},
|
|
2501
|
+
emitChange: function(r) {
|
|
2502
|
+
var e = this;
|
|
2503
|
+
e.changeTimer && clearTimeout(e.changeTimer), e.changeTimer = setTimeout(function() {
|
|
2504
|
+
e.$emit("change", r);
|
|
2505
|
+
}, 500);
|
|
2499
2506
|
}
|
|
2507
|
+
},
|
|
2508
|
+
beforeDestroy: function() {
|
|
2509
|
+
this.changeTimer && clearTimeout(this.changeTimer);
|
|
2500
2510
|
}
|
|
2501
2511
|
};
|
|
2502
2512
|
var ge = function() {
|
|
2503
2513
|
var e = this, t = e._self._c;
|
|
2504
2514
|
return t("div", { staticClass: "hep-cr-editor", class: "hep-cr-theme-" + e.theme, style: { background: e.editorBackground } }, [t("pre", { ref: "highlightRef", staticClass: "hep-cr-highlight", class: "language-" + e.prismLanguage, attrs: { "aria-hidden": "true" } }, [t("code", { domProps: { innerHTML: e._s(e.highlightedCode) } })]), t("textarea", { staticClass: "hep-cr-input", attrs: { disabled: e.disabled, spellcheck: "false", placeholder: "Write your code here..." }, domProps: { value: e.value }, on: { input: e.handleInput, scroll: e.handleScroll, keydown: e.handleKeydown } })]);
|
|
2505
|
-
}, he = [],
|
|
2515
|
+
}, he = [], me = /* @__PURE__ */ Y(
|
|
2506
2516
|
pe,
|
|
2507
2517
|
ge,
|
|
2508
2518
|
he,
|
|
2509
2519
|
!1,
|
|
2510
2520
|
null,
|
|
2511
|
-
"
|
|
2521
|
+
"525880d3"
|
|
2512
2522
|
);
|
|
2513
|
-
const
|
|
2523
|
+
const fe = me.exports, be = {
|
|
2514
2524
|
name: "CodeRunner",
|
|
2515
2525
|
components: {
|
|
2516
|
-
CodeEditor:
|
|
2526
|
+
CodeEditor: fe
|
|
2517
2527
|
},
|
|
2518
2528
|
props: {
|
|
2519
2529
|
pistonUrl: {
|
|
@@ -2581,17 +2591,17 @@ const me = fe.exports, be = {
|
|
|
2581
2591
|
},
|
|
2582
2592
|
themeStyle: function() {
|
|
2583
2593
|
if (!this.themeColor) return {};
|
|
2584
|
-
var r = this.currentTheme === "dark", e = this.themeColor, t = function(
|
|
2585
|
-
var g = parseInt(
|
|
2594
|
+
var r = this.currentTheme === "dark", e = this.themeColor, t = function(f, u) {
|
|
2595
|
+
var g = parseInt(f.replace("#", ""), 16), E = Math.round(2.55 * u), w = Math.min(255, Math.max(0, (g >> 16) + E)), k = Math.min(255, Math.max(0, (g >> 8 & 255) + E)), x = Math.min(255, Math.max(0, (g & 255) + E));
|
|
2586
2596
|
return "#" + (16777216 + w * 65536 + k * 256 + x).toString(16).slice(1);
|
|
2587
|
-
}, l = function(
|
|
2588
|
-
var u = parseInt(
|
|
2597
|
+
}, l = function(f) {
|
|
2598
|
+
var u = parseInt(f.replace("#", ""), 16), g = u >> 16 & 255, E = u >> 8 & 255, w = u & 255, k = (0.299 * g + 0.587 * E + 0.114 * w) / 255;
|
|
2589
2599
|
return k > 0.5;
|
|
2590
|
-
}, p = l(e),
|
|
2600
|
+
}, p = l(e), m = p ? "#000" : "#fff";
|
|
2591
2601
|
return {
|
|
2592
2602
|
"--hep-cr-theme-color": e,
|
|
2593
2603
|
"--hep-cr-theme-color-hover": r ? t(e, 20) : t(e, -20),
|
|
2594
|
-
"--hep-cr-tab-active-color":
|
|
2604
|
+
"--hep-cr-tab-active-color": m
|
|
2595
2605
|
};
|
|
2596
2606
|
},
|
|
2597
2607
|
languageOptions: function() {
|
|
@@ -2670,8 +2680,8 @@ const me = fe.exports, be = {
|
|
|
2670
2680
|
startDrag: function(r) {
|
|
2671
2681
|
var e = this, t = document.querySelector(".hep-cr-runner-main");
|
|
2672
2682
|
if (t) {
|
|
2673
|
-
var l = function(
|
|
2674
|
-
var
|
|
2683
|
+
var l = function(m) {
|
|
2684
|
+
var f = t.getBoundingClientRect(), u = (m.clientX - f.left) / f.width * 100;
|
|
2675
2685
|
e.editorWidth = Math.max(20, Math.min(80, u));
|
|
2676
2686
|
}, p = function() {
|
|
2677
2687
|
document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", p), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
@@ -2684,17 +2694,19 @@ const me = fe.exports, be = {
|
|
|
2684
2694
|
var Ee = function() {
|
|
2685
2695
|
var e = this, t = e._self._c;
|
|
2686
2696
|
return t("div", { class: ["hep-cr-runner", e.themeClass], style: e.themeStyle }, [t("div", { staticClass: "hep-cr-runner-header" }, [t("div", { staticClass: "hep-cr-runner-controls" }, [e.showLanguageSelector ? t("select", { directives: [{ name: "model", rawName: "v-model", value: e.currentLanguage, expression: "currentLanguage" }], staticClass: "hep-cr-language-select", attrs: { disabled: e.isRunning }, on: { change: function(l) {
|
|
2687
|
-
var p = Array.prototype.filter.call(l.target.options, function(
|
|
2688
|
-
return
|
|
2689
|
-
}).map(function(
|
|
2690
|
-
var
|
|
2691
|
-
return
|
|
2697
|
+
var p = Array.prototype.filter.call(l.target.options, function(m) {
|
|
2698
|
+
return m.selected;
|
|
2699
|
+
}).map(function(m) {
|
|
2700
|
+
var f = "_value" in m ? m._value : m.value;
|
|
2701
|
+
return f;
|
|
2692
2702
|
});
|
|
2693
2703
|
e.currentLanguage = l.target.multiple ? p : p[0];
|
|
2694
2704
|
} } }, [e.runtimesLoading ? t("option", { attrs: { value: "" } }, [e._v("加载中...")]) : e._e(), e._l(e.languageOptions, function(l) {
|
|
2695
2705
|
return t("option", { key: l.value, domProps: { value: l.value } }, [e._v(" " + e._s(l.label) + " ")]);
|
|
2696
2706
|
})], 2) : e._e()]), t("div", { staticClass: "hep-cr-runner-actions" }, [t("button", { staticClass: "hep-cr-btn hep-cr-btn-run", attrs: { disabled: e.isRunning || e.runtimesLoading }, on: { click: e.execute } }, [e.isRunning ? t("span", { staticClass: "hep-cr-spinner" }) : t("span", { staticClass: "hep-cr-run-icon" }, [e._v("▶")]), e._v(" " + e._s(e.isRunning ? "运行中..." : e.executorLabel) + " ")]), e.showEditor && e.editable ? t("button", { staticClass: "hep-cr-btn hep-cr-btn-reset", on: { click: e.resetCode } }, [e._v(" 重置 ")]) : e._e(), t("button", { staticClass: "hep-cr-btn hep-cr-btn-theme", attrs: { title: e.currentTheme === "light" ? "Switch to dark mode" : "Switch to light mode" }, on: { click: e.toggleTheme } }, [e.currentTheme === "light" ? t("svg", { attrs: { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" } }, [t("path", { attrs: { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" } })]) : t("svg", { attrs: { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" } }, [t("circle", { attrs: { cx: "12", cy: "12", r: "5" } }), t("line", { attrs: { x1: "12", y1: "1", x2: "12", y2: "3" } }), t("line", { attrs: { x1: "12", y1: "21", x2: "12", y2: "23" } }), t("line", { attrs: { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64" } }), t("line", { attrs: { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78" } }), t("line", { attrs: { x1: "1", y1: "12", x2: "3", y2: "12" } }), t("line", { attrs: { x1: "21", y1: "12", x2: "23", y2: "12" } }), t("line", { attrs: { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" } }), t("line", { attrs: { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" } })])])])]), e.error ? t("div", { staticClass: "hep-cr-error-message" }, [e._v(" " + e._s(e.error) + " ")]) : e._e(), t("div", { staticClass: "hep-cr-runner-main" }, [e.showEditor ? t("div", { staticClass: "hep-cr-editor-panel", style: { width: e.editorWidth + "%" } }, [t("div", { staticClass: "hep-cr-panel-header" }, [t("span", { staticClass: "hep-cr-panel-title" }, [e._v("编辑器")]), t("div", { staticClass: "hep-cr-output-actions" }, [t("span", { staticClass: "hep-cr-language-badge" }, [e._v(e._s(e.languageName))]), t("button", { staticClass: "hep-cr-btn-icon", class: { "hep-cr-btn-copied": e.copiedEditor }, attrs: { disabled: e.copiedEditor, title: e.copiedEditor ? "已复制" : "复制" }, on: { click: e.copyCode } }, [e.copiedEditor ? t("span", { staticClass: "hep-cr-copied-text" }, [e._v("已复制")]) : t("svg", { attrs: { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" } }, [t("rect", { attrs: { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" } }), t("path", { attrs: { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" } })])])])]), t("CodeEditor", { attrs: { value: e.code, language: e.languageName, theme: e.currentTheme, disabled: !e.editable || e.isRunning }, on: { input: function(l) {
|
|
2697
2707
|
e.code = l;
|
|
2708
|
+
}, change: function(l) {
|
|
2709
|
+
return e.$emit("change", l);
|
|
2698
2710
|
} } })], 1) : e._e(), e.showEditor ? t("div", { staticClass: "hep-cr-resize-handle", on: { mousedown: e.startDrag } }, [t("div", { staticClass: "hep-cr-resize-line" })]) : e._e(), t("div", { staticClass: "hep-cr-output-panel", style: { width: e.showEditor ? 100 - e.editorWidth + "%" : "100%" } }, [t("div", { staticClass: "hep-cr-panel-header" }, [t("div", { staticClass: "hep-cr-output-tabs" }, [t("button", { class: ["hep-cr-tab", { active: e.activeTab === "stdout" }], on: { click: function(l) {
|
|
2699
2711
|
e.activeTab = "stdout";
|
|
2700
2712
|
} } }, [e._v(" 输出 ")]), e.stderr ? t("button", { class: ["hep-cr-tab", "hep-cr-tab-error", { active: e.activeTab === "stderr" }], on: { click: function(l) {
|
|
@@ -2706,7 +2718,7 @@ var Ee = function() {
|
|
|
2706
2718
|
ve,
|
|
2707
2719
|
!1,
|
|
2708
2720
|
null,
|
|
2709
|
-
"
|
|
2721
|
+
"8916bba0"
|
|
2710
2722
|
);
|
|
2711
2723
|
const M = ye.exports, Se = {
|
|
2712
2724
|
name: "CodeRunnerDialog",
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.hep-cr-editor[data-v-
|
|
1
|
+
.hep-cr-editor[data-v-525880d3]{position:relative;flex:1;overflow:hidden}.hep-cr-highlight[data-v-525880d3],.hep-cr-input[data-v-525880d3]{position:absolute;top:0;left:0;width:100%;height:100%;padding:12px 16px;margin:0;border:none;font-family:SF Mono,Monaco,Menlo,Ubuntu Mono,monospace;font-size:14px;line-height:1.6;white-space:pre;overflow:auto}.hep-cr-highlight[data-v-525880d3]{pointer-events:none;z-index:1}.hep-cr-highlight.hep-cr-highlight[data-v-525880d3]{background:transparent!important}.hep-cr-highlight code[data-v-525880d3]{display:block;font-family:inherit;background:transparent!important}.hep-cr-input[data-v-525880d3]{position:relative;z-index:2;background:transparent;color:transparent;caret-color:#d4d4d4;resize:none;outline:none}.hep-cr-input[data-v-525880d3]:disabled{opacity:.7}.hep-cr-theme-light .hep-cr-input[data-v-525880d3]{caret-color:#333}.hep-cr-highlight pre[class*=language-][data-v-525880d3]{text-shadow:none}.hep-cr-runner[data-v-8916bba0]{display:flex;flex-direction:column;border:1px solid #e0e0e0;border-radius:12px;overflow:hidden;font-family:SF Mono,Monaco,Menlo,Ubuntu Mono,monospace}.hep-cr-runner-light[data-v-8916bba0]{background:#fff}.hep-cr-runner-dark[data-v-8916bba0]{background:#1e1e1e;border-color:#333}.hep-cr-runner-header[data-v-8916bba0]{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#252526;border-bottom:1px solid #333}.hep-cr-runner-light .hep-cr-runner-header[data-v-8916bba0]{background:#f3f3f3;border-color:#e0e0e0}.hep-cr-runner-controls[data-v-8916bba0]{display:flex;gap:8px}.hep-cr-language-select[data-v-8916bba0]{padding:6px 12px;border:1px solid #444;border-radius:6px;background:#2d2d2d;color:#d4d4d4;font-size:13px;cursor:pointer;outline:none}.hep-cr-runner-light .hep-cr-language-select[data-v-8916bba0]{background:#fff;color:#333;border-color:#ccc}.hep-cr-language-select[data-v-8916bba0]:focus{border-color:#4fc3f7}.hep-cr-runner-actions[data-v-8916bba0]{display:flex;gap:8px}.hep-cr-btn[data-v-8916bba0]{padding:6px 16px;border:none;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:6px;transition:all .2s}.hep-cr-btn[data-v-8916bba0]:disabled{opacity:.5;cursor:not-allowed}.hep-cr-btn-run[data-v-8916bba0]{background:var(--hep-cr-theme-color, #4caf50);color:var(--hep-cr-tab-active-color, #fff);font-weight:600}.hep-cr-btn-run[data-v-8916bba0]:hover:not(:disabled){background:var(--hep-cr-theme-color-hover, #43a047)}.hep-cr-btn-reset[data-v-8916bba0]{background:#3d3d3d;color:#aaa}.hep-cr-runner-light .hep-cr-btn-reset[data-v-8916bba0]{background:#e0e0e0;color:#666}.hep-cr-btn-reset[data-v-8916bba0]:hover:not(:disabled){background:#4d4d4d;color:#fff}.hep-cr-btn-theme[data-v-8916bba0]{background:transparent;color:#fdd835;padding:6px 10px;font-size:14px;line-height:1;height:auto;min-height:28px;display:flex;align-items:center;justify-content:center}.hep-cr-btn-theme svg[data-v-8916bba0]{display:block;width:18px;height:18px}.hep-cr-runner-light .hep-cr-btn-theme[data-v-8916bba0]{color:#f57c00}.hep-cr-btn-theme[data-v-8916bba0]:hover{background:#ffffff1a;color:#fff}.hep-cr-runner-light .hep-cr-btn-theme[data-v-8916bba0]:hover{background:#0000000d}.hep-cr-error-message[data-v-8916bba0]{padding:10px 16px;background:#c62828;color:#fff;font-size:13px}.hep-cr-runner-main[data-v-8916bba0]{display:flex;height:400px;overflow:hidden}.hep-cr-editor-panel[data-v-8916bba0]{display:flex;flex-direction:column;min-width:20%;max-width:80%}.hep-cr-panel-header[data-v-8916bba0]{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:#2d2d2d;border-bottom:1px solid #333}.hep-cr-runner-light .hep-cr-panel-header[data-v-8916bba0]{background:#f0f0f0;border-color:#e0e0e0}.hep-cr-panel-title[data-v-8916bba0]{font-size:12px;font-weight:600;color:#888;text-transform:uppercase;letter-spacing:.5px}.hep-cr-language-badge[data-v-8916bba0]{font-size:11px;padding:2px 8px;background:var(--hep-cr-theme-color, #4fc3f7);color:var(--hep-cr-tab-active-color, #000);border-radius:10px;font-weight:600}.hep-cr-editor[data-v-8916bba0]{flex:1;width:100%;background:#1e1e1e}.hep-cr-editor .hep-cr-highlight[data-v-8916bba0]{background:transparent!important}.hep-cr-editor .hep-cr-input[data-v-8916bba0]{color:transparent!important;caret-color:#d4d4d4}.hep-cr-runner-light .hep-cr-editor[data-v-8916bba0]{background:#fafafa}.hep-cr-runner-light .hep-cr-editor .hep-cr-highlight code[data-v-8916bba0]{color:#333}.hep-cr-resize-handle[data-v-8916bba0]{width:8px;background:#2d2d2d;cursor:col-resize;display:flex;align-items:center;justify-content:center;transition:background .2s;border-left:1px solid #3d3d3d;border-right:1px solid #3d3d3d}.hep-cr-resize-handle[data-v-8916bba0]:hover{background:var(--hep-cr-theme-color, #4fc3f7)}.hep-cr-resize-line[data-v-8916bba0]{width:3px;height:40px;background:#555;border-radius:2px;transition:background .2s}.hep-cr-resize-handle:hover .hep-cr-resize-line[data-v-8916bba0]{background:#fff}.hep-cr-runner-light .hep-cr-resize-handle[data-v-8916bba0]{background:#e0e0e0;border-color:#ccc}.hep-cr-runner-light .hep-cr-resize-line[data-v-8916bba0]{background:#bbb}.hep-cr-runner-light .hep-cr-resize-handle[data-v-8916bba0]:hover{background:var(--hep-cr-theme-color, #4fc3f7)}.hep-cr-runner-light .hep-cr-resize-handle:hover .hep-cr-resize-line[data-v-8916bba0]{background:#fff}.hep-cr-output-panel[data-v-8916bba0]{display:flex;flex-direction:column;min-width:20%;border-left:1px solid #333}.hep-cr-runner-light .hep-cr-output-panel[data-v-8916bba0]{border-color:#e0e0e0}.hep-cr-output-tabs[data-v-8916bba0]{display:flex;gap:4px}.hep-cr-tab[data-v-8916bba0]{padding:4px 12px;border:none;background:transparent;cursor:pointer;font-size:12px;border-radius:4px;color:#888;transition:all .2s}.hep-cr-tab[data-v-8916bba0]:hover{color:#d4d4d4;background:#3d3d3d}.hep-cr-runner-light .hep-cr-tab[data-v-8916bba0]:hover{color:#333;background:#e0e0e0}.hep-cr-tab.active[data-v-8916bba0]{background:var(--hep-cr-theme-color, #4fc3f7);color:var(--hep-cr-tab-active-color, #000);font-weight:600}.hep-cr-tab-error.active[data-v-8916bba0]{background:#f44336;color:#fff}.hep-cr-output-actions[data-v-8916bba0]{display:flex;align-items:center;gap:12px}.hep-cr-execution-time[data-v-8916bba0]{font-size:12px;color:var(--hep-cr-theme-color, #4caf50);font-weight:500}.hep-cr-btn-icon[data-v-8916bba0]{background:transparent;border:none;cursor:pointer;padding:4px;border-radius:4px;color:#888;display:flex;align-items:center;justify-content:center;transition:all .2s}.hep-cr-btn-icon[data-v-8916bba0]:hover{color:#fff;background:#3d3d3d}.hep-cr-runner-light .hep-cr-btn-icon[data-v-8916bba0]:hover{color:#333;background:#e0e0e0}.hep-cr-btn-icon[data-v-8916bba0]:disabled{cursor:not-allowed;opacity:.7}.hep-cr-btn-copied[data-v-8916bba0]{color:#4caf50!important}.hep-cr-copied-text[data-v-8916bba0]{font-size:12px;color:#4caf50}.hep-cr-output-content[data-v-8916bba0]{flex:1;padding:12px 16px;overflow:auto;background:#1e1e1e}.hep-cr-runner-light .hep-cr-output-content[data-v-8916bba0]{background:#fff}.hep-cr-output-content pre[data-v-8916bba0]{margin:0;font-size:13px;line-height:1.6;white-space:pre-wrap;word-break:break-all;color:#d4d4d4}.hep-cr-runner-light .hep-cr-output-content pre[data-v-8916bba0]{color:#333}.hep-cr-output-content .hep-cr-stderr[data-v-8916bba0]{color:#f44336}.hep-cr-spinner[data-v-8916bba0]{width:12px;height:12px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:spin-8916bba0 .8s linear infinite}@keyframes spin-8916bba0{to{transform:rotate(360deg)}}.hep-cr-dialog-overlay[data-v-cae42232]{position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:9999}.hep-cr-dialog-container[data-v-cae42232]{background:#fff;border-radius:12px;box-shadow:0 20px 60px #0000004d;max-width:90vw;max-height:90vh;display:flex;flex-direction:column;overflow:hidden}.hep-cr-dialog-header[data-v-cae42232]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #e0e0e0}.hep-cr-dialog-title[data-v-cae42232]{margin:0;font-size:16px;font-weight:600;color:#333}.hep-cr-dialog-close[data-v-cae42232]{background:none;border:none;cursor:pointer;padding:4px;border-radius:4px;color:#666;display:flex;align-items:center;justify-content:center;transition:all .2s}.hep-cr-dialog-close[data-v-cae42232]:hover{background:#f0f0f0;color:#333}.hep-cr-dialog-body[data-v-cae42232]{flex:1;overflow:auto;padding:0}.hep-cr-dialog-body[data-v-cae42232] .hep-cr-runner{border:none;border-radius:0}.hep-cr-dialog-footer[data-v-cae42232]{padding:12px 20px;border-top:1px solid #e0e0e0;display:flex;justify-content:flex-end;gap:12px}.hep-cr-dialog-fade-enter-active[data-v-cae42232],.hep-cr-dialog-fade-leave-active[data-v-cae42232]{transition:opacity .2s ease}.hep-cr-dialog-fade-enter-from[data-v-cae42232],.hep-cr-dialog-fade-leave-to[data-v-cae42232]{opacity:0}.hep-cr-dialog-fade-enter-active .hep-cr-dialog-container[data-v-cae42232],.hep-cr-dialog-fade-leave-active .hep-cr-dialog-container[data-v-cae42232]{transition:transform .2s ease}.hep-cr-dialog-fade-enter-from .hep-cr-dialog-container[data-v-cae42232],.hep-cr-dialog-fade-leave-to .hep-cr-dialog-container[data-v-cae42232]{transform:scale(.95)}
|