diff --git a/docs/CNAME b/docs/CNAME
new file mode 100644
index 0000000..7a2bd73
--- /dev/null
+++ b/docs/CNAME
@@ -0,0 +1 @@
+tsx-browser-compiler.js.org
diff --git a/docs/index.css b/docs/index.css
new file mode 100644
index 0000000..4b315de
--- /dev/null
+++ b/docs/index.css
@@ -0,0 +1,360 @@
+:root {
+ --playground-background: #f2f4f6;
+ --playground-code-background: #fafcff;
+ --playground-text-color: #333;
+ --playground-button-background: #fff;
+ --playground-button-hover-background: #f0f0f0;
+ --playground-divider-color: #e2e4e6;
+ --playground-controls-height: 48px;
+ --playground-tabs-height: 32px;
+ --playground-tabs-tab-active-border-color: #3ae;
+ --playground-close-icon-height: 16px;
+ --playground-code-selection-color: #b5bbc6;
+ --playground-link-color: blue;
+}
+html,
+body {
+ margin: 0;
+}
+body[data-theme='dark'] {
+ --playground-background: #1e1e1e;
+ --playground-code-background: #1e1e1e;
+ --playground-text-color: #fff;
+ --playground-button-background: #333;
+ --playground-button-hover-background: #666;
+ --playground-divider-color: #444;
+ --playground-tabs-tab-active-border-color: #3ae;
+ --playground-close-icon-height: 16px;
+ --playground-code-selection-color: #444;
+ --playground-link-color: #3ae;
+}
+body,
+input {
+ font-family: Roboto, Helvetica, Tahoma, Arial, 'Noto Sans CJK', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'WenQuanYi Micro Hei', sans-serif;
+}
+a {
+ color: var(--playground-link-color);
+}
+.app {
+ display: flex;
+ height: 100vh;
+ flex-direction: column;
+ background: var(--playground-background);
+ font-size: 14px;
+}
+.app,
+.app div {
+ box-sizing: border-box;
+}
+.app pre {
+ background: var(--playground-code-background) !important;
+ white-space: pre-wrap;
+}
+.app .controls {
+ display: flex;
+ height: var(--playground-controls-height);
+ padding: 0 8px;
+ flex-shrink: 0;
+ align-items: center;
+ border-bottom: 1px solid var(--playground-divider-color);
+ color: var(--playground-text-color);
+}
+.app .controls h1 {
+ padding: 0 8px;
+ margin: 0;
+ font-size: 14px;
+ font-weight: 500;
+ line-height: var(--playground-controls-height);
+}
+.app .controls h1 small {
+ margin-left: 8px;
+ font-size: 12px;
+ font-weight: normal;
+}
+.app .controls h1 + div {
+ margin: 0 8px 0 auto;
+}
+.app .controls-buttons {
+ display: flex;
+ align-items: center;
+}
+.app .controls-buttons button {
+ box-sizing: border-box;
+ margin-right: 8px;
+ padding: 4px 4px;
+ background: var(--playground-button-background);
+ border-radius: 4px;
+ border: 1px solid var(--playground-divider-color);
+ color: var(--playground-text-color);
+ font-size: 12px;
+ vertical-align: middle;
+ cursor: pointer;
+}
+.app .controls-buttons button:active {
+ background: var(--playground-button-hover-background);
+}
+.app .controls-buttons label {
+ position: relative;
+ display: inline-flex;
+ align-items: center;
+ padding: 4px 8px;
+ font-size: 12px;
+}
+.app .controls-buttons label .icon {
+ z-index: 2;
+ pointer-events: none;
+}
+.app .controls-buttons label input {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background: var(--playground-button-background);
+ border: 1px solid var(--playground-divider-color);
+ border-radius: 4px;
+ margin: 0 4px 0 0;
+ appearance: none;
+ cursor: pointer;
+ outline: 2px solid transparent;
+ transition: outline-color 0.2s;
+}
+.app .controls-buttons label + label input {
+ border-left: none;
+}
+.app .controls-buttons label.checked input {
+ outline-color: var(--playground-tabs-tab-active-border-color);
+ z-index: 1;
+}
+.app .controls-buttons label:first-of-type input {
+ border-bottom-right-radius: 0;
+ border-top-right-radius: 0;
+}
+.app .controls-buttons label:last-of-type input {
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0;
+}
+.app .playground {
+ display: flex;
+ max-height: calc(100% - var(--playground-controls-height));
+ flex-grow: 1;
+}
+.app .playground > * {
+ flex: 1;
+}
+.app .playground-layout-horizontal {
+ flex-direction: row;
+}
+.app .playground-layout-horizontal > * {
+ width: 33.33%;
+ border-right: 1px solid var(--playground-divider-color);
+}
+.app .playground-layout-horizontal > *:last-child {
+ border-right: none;
+}
+.app .playground-layout-vertical {
+ flex-direction: column;
+}
+.app .playground-layout-vertical > * {
+ height: 33.33%;
+ border-bottom: 1px solid var(--playground-divider-color);
+}
+.app .playground-layout-vertical > *:last-child {
+ border-bottom: none;
+}
+.app .playground-tabs {
+ display: flex;
+ flex-shrink: 0;
+ align-items: flex-start;
+ overflow-x: auto;
+ color: var(--playground-text-color);
+ user-select: none;
+}
+.app .playground-tabs-tab {
+ position: relative;
+ display: inline-block;
+ height: var(--playground-tabs-height);
+ box-sizing: border-box;
+ padding: 0 8px;
+ border: none;
+ border-radius: 0;
+ border-right: 1px solid var(--playground-divider-color);
+ background: transparent;
+ cursor: pointer;
+ font-size: 14px;
+ line-height: var(--playground-tabs-height);
+ white-space: nowrap;
+}
+.app .playground-tabs-tab-with-suffix {
+ padding-right: 0;
+}
+.app .playground-tabs-tab:hover,
+.app .playground-tabs-tab-active {
+ background: var(--playground-code-background);
+}
+.app .playground-tabs-tab:before {
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ display: block;
+ height: 2px;
+ background: transparent;
+ transition: background 0.2s;
+ content: '';
+}
+.app .playground-tabs-tab-active:before {
+ background: var(--playground-tabs-tab-active-border-color);
+}
+.app .playground-tabs-tab input {
+ color: var(--playground-text-color);
+}
+.app .playground-editor {
+ display: flex;
+ flex-direction: column;
+ color: var(--playground-text-color);
+}
+.app .playground-editor-tabs-add {
+ padding: 0 8px;
+}
+.app .playground-editor-tabs-close {
+ width: var(--playground-close-icon-height);
+ height: var(--playground-close-icon-height);
+ padding: 0;
+ border: none;
+ border-radius: 2px;
+ margin: 4px;
+ background: transparent;
+ cursor: pointer;
+ line-height: var(--playground-close-icon-height);
+}
+.app .playground-editor-tabs-close:not(.app .playground-editor-tabs-close-disabled):hover,
+.app .playground-editor-tabs-close:not(.app .playground-editor-tabs-close-disabled):focus {
+ background: var(--playground-button-hover-background);
+ outline: none;
+}
+.app .playground-editor-tabs button {
+ color: var(--playground-text-color);
+}
+.app .playground-editor-tabs input {
+ margin-bottom: -3px;
+ padding: 0 0 2px;
+ border: none;
+ border-bottom: 1px solid var(--playground-divider-color);
+ background: var(--playground-background);
+ font-size: 14px;
+ outline: none;
+}
+.app .playground-editor-code {
+ overflow: auto;
+ flex-grow: 1;
+ background: var(--playground-code-background);
+}
+.app .playground-editor-code-inner {
+ position: relative;
+ min-height: calc(100% - var(--playground-tabs-height));
+}
+.app .playground-editor-code-inner pre,
+.app .playground-editor-code-inner textarea {
+ width: 100%;
+ height: 100%;
+ box-sizing: border-box;
+ padding: 8px;
+ border: none;
+ margin: 0;
+ font-family: monospace;
+ font-size: 14px;
+}
+.app .playground-editor-code-inner textarea {
+ position: absolute;
+ top: 0;
+ left: 0;
+ background: transparent;
+ color: var(--playground-text-color);
+ outline: none;
+ resize: none;
+ -webkit-text-fill-color: transparent;
+}
+.app .playground-editor-code-inner textarea::selection {
+ background: var(--playground-code-selection-color);
+}
+.app .playground-editor-code-inner pre {
+ position: relative;
+ z-index: 1;
+ background: transparent !important;
+ pointer-events: none;
+}
+.app .playground-editor-code-placeholder {
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ padding: 8px;
+ color: #999;
+ font-family: monospace;
+ font-size: 14px;
+ pointer-events: none;
+}
+.app .playground-compile-result {
+ display: flex;
+ flex-direction: column;
+ color: var(--playground-text-color);
+ position: relative;
+ overflow: hidden;
+}
+@keyframes loading-show {
+ 0% {
+ transform: translateY(100%);
+ }
+ 100% {
+ transform: translateY(0);
+ }
+}
+.app .playground-compile-result-loading {
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ padding: 8px 16px;
+ background: var(--playground-tabs-tab-active-border-color);
+ color: #fff;
+ animation: loading-show 0.5s ease-out forwards;
+}
+.app .playground-compile-result > pre {
+ overflow: auto;
+ flex-grow: 1;
+ padding: 8px;
+ margin: 0;
+}
+.app .playground-compile-result-error {
+ padding: 8px;
+ overflow-y: auto;
+ border-top: 1px solid var(--playground-divider-color);
+ color: red;
+}
+.app .playground-compile-result-error pre {
+ padding: 0;
+ margin: 0 0 16px;
+ background: transparent !important;
+}
+.app .playground-previewer {
+ position: relative;
+ overflow: auto;
+ background: var(--playground-code-background);
+ color: var(--playground-text-color);
+}
+.app .playground-error-boundary {
+ padding: 8px;
+ border: 1px solid red;
+ border-radius: 4px;
+ margin: 8px;
+ background: transparent !important;
+ color: red;
+}
+.icon {
+ --icon-size: 16px;
+ display: inline-block;
+ width: var(--icon-size);
+ height: var(--icon-size);
+ color: var(--playground-text-color);
+}
diff --git a/docs/index.html b/docs/index.html
new file mode 100644
index 0000000..3ccfb3d
--- /dev/null
+++ b/docs/index.html
@@ -0,0 +1,34 @@
+
+
+
+ TSX Browser Compiler Playground
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/index.js b/docs/index.js
new file mode 100644
index 0000000..340c4e7
--- /dev/null
+++ b/docs/index.js
@@ -0,0 +1,169 @@
+(function (factory) {
+ typeof define === 'function' && define.amd ? define(['react'], factory) :
+ factory();
+})((function () { 'use strict';
+
+ function __$styleInject(css) {
+ if (!css) return;
+
+ if (typeof window == 'undefined') return;
+ var style = document.createElement('style');
+ style.setAttribute('media', 'screen');
+
+ style.innerHTML = css;
+ document.head.appendChild(style);
+ return css;
+ }
+
+ var jsxRuntime$1 = {exports: {}};
+
+ var reactJsxRuntime_production_min = {};
+
+ const _global_React = React;
+
+ var f=_global_React,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return {$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;
+
+ {jsxRuntime$1.exports=reactJsxRuntime_production_min;}var jsxRuntime = jsxRuntime$1.exports;
+
+ const normalizePath=(path,baseFileName)=>{if(path.startsWith("/")){return path}if(path.startsWith(".")){const currentPath=baseFileName.split("/");currentPath.pop();while(1){if(path.startsWith("../")){currentPath.pop();path=path.substring(3);}else if(path.startsWith("./")){path=path.substring(2);}else {break}}currentPath.push(path);return currentPath.join("/")}return path};
+
+ const mergeResolve=(resolve={})=>{const mergedResolve={...resolve,extensions:resolve.extensions||[".js"],externals:{...resolve.externals},cdnPrefix:"https://unpkg.com"};return mergedResolve};const createClosureMap=()=>{const closureMap={"react":()=>React,"react-dom":()=>ReactDOM,"react/jsx-runtime":()=>jsxRuntime};return closureMap};const codeToClosure=(code,fileName)=>{return eval(`(_require) => {
+ const require = (path) => _require(path, '${fileName}');
+ const module = {};
+ const exports = {};
+ ${code}
+ return module.exports ?? exports;
+ }`)};const createRequireFn=(closureMap,requireFn,resolve)=>{const fn=(path,currentFileName)=>{path=normalizePath(path,currentFileName);if(requireFn){return requireFn(path,currentFileName)}const tried=[path];let closure=closureMap[path];for(const extension of resolve.extensions){if(closure){break}const pathWithExtension=`${path}${extension}`;closure=closureMap[pathWithExtension];tried.push(pathWithExtension);}for(const extension of resolve.extensions){if(closure){break}const pathWithExtension=`${path}/index${extension}`;closure=closureMap[pathWithExtension];tried.push(pathWithExtension);}if(!closure){throw new Error(`${currentFileName}: Cannot find module '${path}' (tried ${tried.join(", ")})`)}return closure(fn)};return fn};
+
+ const loadUMDModule=async url=>{const res=await fetch(url);const code=await res.text();return codeToClosure(code,url)};const loadExternalsToClosureMap=async(resolve,closureMap)=>{for(const[name,value]of Object.entries(resolve.externals)){if(/^https?:\/\//.test(value)){closureMap[name]=await loadUMDModule(value);}else if(window[value]){closureMap[name]=()=>window[value];}else {closureMap[name]=await loadUMDModule(`${resolve.cdnPrefix}/${name}@${value}`);}}};
+
+ function _extends(){_extends=Object.assign||function(target){for(var i=1;imax?current:max}):undefined};var indexesForCutting=lib.map(function(lib){var matches=files.filter(function(f){return f.startsWith("lib."+lib.toLowerCase())});if(matches.length===0)return 0;var cutIndex=files.indexOf(matches.pop());return cutIndex});var libCutIndex=getMax(indexesForCutting)||0;var finalCutIndex=Math.max(targetCutIndex,libCutIndex);return files.slice(0,finalCutIndex+1)};var createDefaultMapFromCDN=function createDefaultMapFromCDN(options,version,cache,ts,lzstring,fetcher,storer){var fetchlike=fetcher||fetch;var fsMap=new Map;var files=knownLibFilesForCompilerOptions(options,ts);var prefix="https://typescript.azureedge.net/cdn/"+version+"/typescript/lib/";function zip(str){return lzstring?lzstring.compressToUTF16(str):str}function unzip(str){return lzstring?lzstring.decompressFromUTF16(str):str}function uncached(){return Promise.all(files.map(function(lib){return fetchlike(prefix+lib).then(function(resp){return resp.text()})})).then(function(contents){contents.forEach(function(text,index){return fsMap.set("/"+files[index],text)});})["catch"](function(){})}function cached(){var storelike=storer||localStorage;var keys=Object.keys(storelike);keys.forEach(function(key){if(key.startsWith("ts-lib-")&&!key.startsWith("ts-lib-"+version)){storelike.removeItem(key);}});return Promise.all(files.map(function(lib){var cacheKey="ts-lib-"+version+"-"+lib;var content=storelike.getItem(cacheKey);if(!content){return fetchlike(prefix+lib).then(function(resp){return resp.text()}).then(function(t){storelike.setItem(cacheKey,zip(t));return t})["catch"](function(){})}else {return Promise.resolve(unzip(content))}})).then(function(contents){contents.forEach(function(text,index){if(text){var name="/"+files[index];fsMap.set(name,text);}});})}var func=cache?cached:uncached;return func().then(function(){return fsMap})};function notImplemented(methodName){throw new Error("Method '"+methodName+"' is not implemented.")}function audit(name,fn){return function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}var res=fn.apply(void 0,args);var smallres=typeof res==="string"?res.slice(0,80)+"...":res;debugLog.apply(void 0,["> "+name].concat(args));debugLog("< "+smallres);return res}}var defaultCompilerOptions=function defaultCompilerOptions(ts){return _extends({},ts.getDefaultCompilerOptions(),{jsx:ts.JsxEmit.React,strict:true,esModuleInterop:true,module:ts.ModuleKind.ESNext,suppressOutputPathCheck:true,skipLibCheck:true,skipDefaultLibCheck:true,moduleResolution:ts.ModuleResolutionKind.NodeJs})};var libize=function libize(path){return path.replace("/","/lib.").toLowerCase()};function createSystem(files){return {args:[],createDirectory:function createDirectory(){return notImplemented("createDirectory")},directoryExists:audit("directoryExists",function(directory){return Array.from(files.keys()).some(function(path){return path.startsWith(directory)})}),exit:function exit(){return notImplemented("exit")},fileExists:audit("fileExists",function(fileName){return files.has(fileName)||files.has(libize(fileName))}),getCurrentDirectory:function getCurrentDirectory(){return "/"},getDirectories:function getDirectories(){return []},getExecutingFilePath:function getExecutingFilePath(){return notImplemented("getExecutingFilePath")},readDirectory:audit("readDirectory",function(directory){return directory==="/"?Array.from(files.keys()):[]}),readFile:audit("readFile",function(fileName){return files.get(fileName)||files.get(libize(fileName))}),resolvePath:function resolvePath(path){return path},newLine:"\n",useCaseSensitiveFileNames:true,write:function write(){return notImplemented("write")},writeFile:function writeFile(fileName,contents){files.set(fileName,contents);}}}function createVirtualCompilerHost(sys,compilerOptions,ts){var sourceFiles=new Map;var save=function save(sourceFile){sourceFiles.set(sourceFile.fileName,sourceFile);return sourceFile};var vHost={compilerHost:_extends({},sys,{getCanonicalFileName:function getCanonicalFileName(fileName){return fileName},getDefaultLibFileName:function getDefaultLibFileName(){return "/"+ts.getDefaultLibFileName(compilerOptions)},getDirectories:function getDirectories(){return []},getNewLine:function getNewLine(){return sys.newLine},getSourceFile:function getSourceFile(fileName){return sourceFiles.get(fileName)||save(ts.createSourceFile(fileName,sys.readFile(fileName),compilerOptions.target||defaultCompilerOptions(ts).target,false))},useCaseSensitiveFileNames:function useCaseSensitiveFileNames(){return sys.useCaseSensitiveFileNames}}),updateFile:function updateFile(sourceFile){var alreadyExists=sourceFiles.has(sourceFile.fileName);sys.writeFile(sourceFile.fileName,sourceFile.text);sourceFiles.set(sourceFile.fileName,sourceFile);return alreadyExists}};return vHost}function createVirtualLanguageServiceHost(sys,rootFiles,compilerOptions,ts,customTransformers){var fileNames=[].concat(rootFiles);var _createVirtualCompile=createVirtualCompilerHost(sys,compilerOptions,ts),compilerHost=_createVirtualCompile.compilerHost,_updateFile2=_createVirtualCompile.updateFile;var fileVersions=new Map;var projectVersion=0;var languageServiceHost=_extends({},compilerHost,{getProjectVersion:function getProjectVersion(){return projectVersion.toString()},getCompilationSettings:function getCompilationSettings(){return compilerOptions},getCustomTransformers:function getCustomTransformers(){return customTransformers},getScriptFileNames:function getScriptFileNames(){return fileNames.slice()},getScriptSnapshot:function getScriptSnapshot(fileName){var contents=sys.readFile(fileName);if(contents){return ts.ScriptSnapshot.fromString(contents)}return},getScriptVersion:function getScriptVersion(fileName){return fileVersions.get(fileName)||"0"},writeFile:sys.writeFile});var lsHost={languageServiceHost:languageServiceHost,updateFile:function updateFile(sourceFile){projectVersion++;fileVersions.set(sourceFile.fileName,projectVersion.toString());if(!fileNames.includes(sourceFile.fileName)){fileNames.push(sourceFile.fileName);}_updateFile2(sourceFile);}};return lsHost}
+
+ const compilerOptions={allowArbitraryExtensions:true,allowNonTsExtensions:true,allowSyntheticDefaultImports:true,emitHelpers:false,esModuleInterop:true,jsx:ts.JsxEmit.ReactJSX,module:ts.ModuleKind.CommonJS,noEmitOnError:false,outDir:"/",resolveJsonModule:true,skipLibCheck:true,skipDefaultLibCheck:true,target:ts.ScriptTarget.ES2020};const createFsMap=async sources=>{const fsMap=await createDefaultMapFromCDN({target:compilerOptions.target},ts.version,true,ts);for(const filename in sources){fsMap.set(filename==="_"?"index.tsx":filename,sources[filename]);}return fsMap};const createTsEnv=fsMap=>{const files=[...fsMap.keys()];const system=createSystem(fsMap);return createVirtualTypeScriptEnvironment(system,files,ts,compilerOptions)};
+
+ const cssRe=/\.(?:c|le|sa|sc)ss|stylus$/i;const jsRe=/\.m?[jt]sx?$/i;const jsonRe=/\.json$/i;const enforceOrderMap={pre:1,default:0,post:-1};const normalizeRules=rules=>{const normalizedRules=rules.map((rule,index)=>({test:rule.test instanceof RegExp?rule.test:new RegExp(rule.test),use:rule.use.map(loader=>{if(typeof loader==="function"){return {loader,options:{}}}return {...loader,options:loader.options||{}}}),enforce:rule.enforce||"default",_originalOrder:index}));normalizedRules.sort((a,b)=>{if(a.enforce===b.enforce){return a._originalOrder-b._originalOrder}return enforceOrderMap[a.enforce]-enforceOrderMap[b.enforce]});return normalizedRules};const applyRules=(rules,filename,content)=>{let result=content;let error=null;const currentMeta={filename,options:{}};for(const rule of normalizeRules(rules)){if(rule.test.test(filename)){let pitchLoaderIndex=0;for(;pitchLoaderIndex=0;i--){const{loader,options}=rule.use[i];currentMeta.options=options;loader(result,currentMeta,(err,newContent)=>{if(err){error=err;return}result=newContent;});if(error){return {content:result,error}}}}}return {content:result,error:null}};const parseSources=(sources,rules,errors)=>{const cleanupFiles=[];const parsedSources={};for(const[_filename,_content]of Object.entries(sources)){const filename=normalizePath(_filename.startsWith("/")?_filename:`/${_filename}`,"/index.js");const{content,error}=applyRules(rules,filename,_content);if(error){error.message=`${filename}: ${error.message}`;errors.push(error);continue}if(jsRe.test(filename)){parsedSources[filename]=content;continue}if(jsonRe.test(filename)){parsedSources[`${filename}.js`]=`export default ${content};`;}else if(cssRe.test(filename)){parsedSources[filename]=`
+const s = \`${content.trim()}\`;
+let el = document.head.querySelector('style[data-tsx-browser-compiler-filename="${filename}"]');
+if (!el) {
+ el = document.createElement('style');
+ el.setAttribute('data-tsx-browser-compiler-filename', '${filename}');
+ document.head.appendChild(el);
+}
+el.textContent = s;
+ `;cleanupFiles.push(filename);}else {errors.push(new Error(`${filename}: you may need a custom rule for this file type.`));parsedSources[filename]=content;}}return {parsedSources,cleanupFiles}};
+
+ const VERSION="1.0.0-alpha.3";const errNoCode=new Error("No code emitted.");const ignoredCode=[2307,6054,7016,7026];const noop=()=>{};const asyncTsxToElement=async({sources,entryFile="/index.js",resolve,requireFn,rules=[],displayName="TsxToElement"})=>{const codeMap=[];const closureMap=createClosureMap();const errors=[];const{parsedSources,cleanupFiles}=parseSources(sources,rules,errors);const fsMap=await createFsMap(parsedSources);const env=createTsEnv(fsMap);for(const filename of fsMap.keys()){const emitOutput=env.languageService.getEmitOutput(filename);if(!emitOutput){continue}const diagnostics=env.languageService.getSemanticDiagnostics(filename);for(const diagnostic of diagnostics){if(!ignoredCode.includes(diagnostic.code)){errors.push(new Error(`${diagnostic.file?.fileName}: ${diagnostic.messageText} ts(${diagnostic.code})`));}}if(emitOutput.outputFiles.length){const code=emitOutput.outputFiles[0].text;const filename=emitOutput.outputFiles[0].name;codeMap.push([filename,code]);try{closureMap[filename]=codeToClosure(code,filename);}catch(e){e.message=`${filename}: ${e.message}`;errors.push(e);}}}if(!Object.keys(closureMap).length){errors.push(errNoCode);return {component:null,defaultExport:null,compiled:codeMap,errors,cleanup:noop}}try{const parsedEntryFile=normalizePath(entryFile,"/index.js");const closure=closureMap[parsedEntryFile];if(!closure){errors.push(new Error(`No entry file emitted: '${parsedEntryFile}'.`));return {component:null,defaultExport:null,compiled:codeMap,errors,cleanup:noop}}const mergedResolve=mergeResolve(resolve);await loadExternalsToClosureMap(mergedResolve,closureMap);const result=closure(createRequireFn(closureMap,requireFn,mergedResolve));if(!result.default.displayName){result.default.displayName=displayName;}return {component:React.createElement(result.default),defaultExport:result.default,compiled:codeMap,errors,cleanup:()=>{for(const filename of cleanupFiles){const style=document.head.querySelector(`style[data-tsx-browser-compiler-filename="${filename}"]`);style?.remove();}}}}catch(e){errors.push(e);return {component:null,defaultExport:null,compiled:codeMap,errors,cleanup:noop}}};
+
+ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;tkey in obj?__defProp(obj,key,{enumerable:true,configurable:true,writable:true,value}):obj[key]=value;var __spreadValues=(a,b)=>{for(var prop in b||(b={}))if(__hasOwnProp.call(b,prop))__defNormalProp(a,prop,b[prop]);if(__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(b)){if(__propIsEnum.call(b,prop))__defNormalProp(a,prop,b[prop]);}return a};var __spreadProps=(a,b)=>__defProps(a,__getOwnPropDescs(b));var __objRest=(source,exclude)=>{var target={};for(var prop in source)if(__hasOwnProp.call(source,prop)&&exclude.indexOf(prop)<0)target[prop]=source[prop];if(source!=null&&__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(source)){if(exclude.indexOf(prop)<0&&__propIsEnum.call(source,prop))target[prop]=source[prop];}return target};var __commonJS=(cb,mod)=>function __require(){return mod||(0, cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports};var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:true});};var __copyProps=(to,from,except,desc)=>{if(from&&typeof from==="object"||typeof from==="function"){for(let key of __getOwnPropNames(from))if(!__hasOwnProp.call(to,key)&&key!==except)__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});}return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:true}):target,mod));var require_prism=__commonJS({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(exports,module){var Prism2=function(){var lang=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i;var uniqueId=0;var plainTextGrammar={};var _={util:{encode:function encode(tokens){if(tokens instanceof Token){return new Token(tokens.type,encode(tokens.content),tokens.alias)}else if(Array.isArray(tokens)){return tokens.map(encode)}else {return tokens.replace(/&/g,"&").replace(/"+env.content+""+env.tag+">"};function matchPattern(pattern,pos,text,lookbehind){pattern.lastIndex=pos;var match=pattern.exec(text);if(match&&lookbehind&&match[1]){var lookbehindLength=match[1].length;match.index+=lookbehindLength;match[0]=match[0].slice(lookbehindLength);}return match}function matchGrammar(text,tokenList,grammar,startNode,startPos,rematch){for(var token in grammar){if(!grammar.hasOwnProperty(token)||!grammar[token]){continue}var patterns=grammar[token];patterns=Array.isArray(patterns)?patterns:[patterns];for(var j=0;j=rematch.reach){break}var str=currentNode.value;if(tokenList.length>text.length){return}if(str instanceof Token){continue}var removeCount=1;var match;if(greedy){match=matchPattern(pattern,pos,text,lookbehind);if(!match||match.index>=text.length){break}var from=match.index;var to=match.index+match[0].length;var p=pos;p+=currentNode.value.length;while(from>=p){currentNode=currentNode.next;p+=currentNode.value.length;}p-=currentNode.value.length;pos=p;if(currentNode.value instanceof Token){continue}for(var k=currentNode;k!==tokenList.tail&&(prematch.reach){rematch.reach=reach;}var removeFrom=currentNode.prev;if(before){removeFrom=addAfter(tokenList,removeFrom,before);pos+=before.length;}removeRange(tokenList,removeFrom,removeCount);var wrapped=new Token(token,inside?_.tokenize(matchStr,inside):matchStr,alias,matchStr);currentNode=addAfter(tokenList,removeFrom,wrapped);if(after){addAfter(tokenList,currentNode,after);}if(removeCount>1){var nestedRematch={cause:token+","+j,reach};matchGrammar(text,tokenList,grammar,currentNode.prev,pos,nestedRematch);if(rematch&&nestedRematch.reach>rematch.reach){rematch.reach=nestedRematch.reach;}}}}}}function LinkedList(){var head={value:null,prev:null,next:null};var tail={value:null,prev:head,next:null};head.next=tail;this.head=head;this.tail=tail;this.length=0;}function addAfter(list,node,value){var next=node.next;var newNode={value,prev:node,next};node.next=newNode;next.prev=newNode;list.length++;return newNode}function removeRange(list,node,count){var next=node.next;for(var i=0;i/,greedy:true},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:true},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:true,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:true,greedy:true,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:true},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:true},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:true,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:true}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"));}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,n){var t={},t=(t["language-"+n]={pattern:/(^$)/i,lookbehind:true,inside:Prism.languages[n]},t.cdata=/^$/i,{"included-cdata":{pattern://i,inside:t}}),n=(t["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]},{});n[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:true,greedy:true,inside:t},Prism.languages.insertBefore("markup","cdata",n);}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,n){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:true,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:true,alias:[n,"language-"+n],inside:Prism.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}});}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,function(e){var n={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},t=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,a="(?:[^\\\\-]|"+t.source+")",a=RegExp(a+"-"+a),r={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:true,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:true,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:true,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:a,inside:{escape:t,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":n,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:t}},"special-escape":n,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":r}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:t,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":r}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}};}(Prism),Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:true,greedy:true},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:true,greedy:true}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:true},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:true,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:true}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:true},{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:true}],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:true},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:true,greedy:true,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:true,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:true,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:true,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:true,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:true,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:true,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:true,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:true,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:true,greedy:true,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:true,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.actionscript=Prism.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<|>>?>?|[!=]=?)=?|[~?@]/}),Prism.languages.actionscript["class-name"].alias="function",delete Prism.languages.actionscript.parameter,delete Prism.languages.actionscript["literal-property"],Prism.languages.markup&&Prism.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:true,inside:Prism.languages.markup}}),function(e){var n=/#(?!\{).+/,t={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:n,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:true},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:true,inside:{interpolation:t}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:n,interpolation:t}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:true,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:true,alias:"string",inside:{interpolation:t}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript;}(Prism),function(l){var e=l.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:true},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:true},punctuation:/[{}]/};Object.defineProperty(e,"addSupport",{value:function(e2,o){(e2="string"==typeof e2?[e2]:e2).forEach(function(e3){var n=function(e4){e4.inside||(e4.inside={}),e4.inside.rest=o;},t="doc-comment";if(a=l.languages[e3]){var a,r=a[t];if((r=r?r:(a=l.languages.insertBefore(e3,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:true,alias:"comment"}}))[t])instanceof RegExp&&(r=a[t]={pattern:r}),Array.isArray(r))for(var s=0,i=r.length;s|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=n,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:true}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:true}),t={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:true};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:true},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:true},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:n,number:t,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:n,number:t});}(Prism),function(e){var n=/[*&][^\s[\]{},]+/,t=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,a="(?:"+t.source+"(?:[ ]+"+n.source+")?|"+n.source+"(?:[ ]+"+t.source+")?)",r=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return /[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),s=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e2,n2){n2=(n2||"").replace(/m/g,"")+"m";var t2=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return a}).replace(/<>/g,function(){return e2});return RegExp(t2,n2)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return a})),lookbehind:true,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return a}).replace(/<>/g,function(){return "(?:"+r+"|"+s+")"})),lookbehind:true,greedy:true,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:true,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:true,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:true,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:true,alias:"important"},string:{pattern:i(s),lookbehind:true,greedy:true},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:true},tag:t,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml;}(Prism),function(o){var n=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function e(e2){return e2=e2.replace(//g,function(){return n}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e2+")")}var t=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return t}),r=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,l=(o.languages.markdown=o.languages.extend("markup",{}),o.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:true,greedy:true,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:o.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+r+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+r+")(?:"+a+")*$"),lookbehind:true,inside:{"table-data":{pattern:RegExp(t),inside:o.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+r+"$"),lookbehind:true,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(t),alias:"important",inside:o.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:true,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:true,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:true},"code-language":{pattern:/^(```).+/,lookbehind:true},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:true,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:true,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:true,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:true},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:e(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:true,greedy:true,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:true,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:e(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:true,greedy:true,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:true,inside:{}},punctuation:/[*_]/}},strike:{pattern:e(/(~~?)(?:(?!~))+\2/.source),lookbehind:true,greedy:true,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:true,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:true,greedy:true,alias:["code","keyword"]},url:{pattern:e(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:true,greedy:true,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:true,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:true},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:true},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:true}}}}),["url","bold","italic","strike"].forEach(function(n2){["url","bold","italic","strike","code-snippet"].forEach(function(e2){n2!==e2&&(o.languages.markdown[n2].inside.content.inside[e2]=o.languages.markdown[e2]);});}),o.hooks.add("after-tokenize",function(e2){"markdown"!==e2.language&&"md"!==e2.language||!function e3(n2){if(n2&&"string"!=typeof n2)for(var t2=0,a2=n2.length;t2",quot:'"'},c=String.fromCodePoint||String.fromCharCode;o.languages.md=o.languages.markdown;}(Prism),Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:true,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:true,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:true},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:true},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:true},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:true,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:true,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:true,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},Prism.hooks.add("after-tokenize",function(e){if("graphql"===e.language)for(var i=e.tokens.filter(function(e2){return "string"!=typeof e2&&"comment"!==e2.type&&"scalar"!==e2.type}),o=0;o?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(b){var e=b.languages.javascript["template-string"],t=e.pattern.source,m=e.inside.interpolation,f=m.inside["interpolation-punctuation"],s=m.pattern.source;function n(e2,n2){if(b.languages[e2])return {pattern:RegExp("((?:"+n2+")\\s*)"+t),lookbehind:true,greedy:true,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:e2}}}}function h(e2,n2,t2){e2={code:e2,grammar:n2,language:t2};return b.hooks.run("before-tokenize",e2),e2.tokens=b.tokenize(e2.code,e2.grammar),b.hooks.run("after-tokenize",e2),e2.tokens}function l(a2,e2,r){var n2=b.tokenize(a2,{interpolation:{pattern:RegExp(s),lookbehind:true}}),p=0,d={},n2=h(n2.map(function(e3){if("string"==typeof e3)return e3;for(var n3,t2,e3=e3.content;-1!==a2.indexOf((t2=p++,n3="___"+r.toUpperCase()+"_"+t2+"___")););return d[n3]=e3,n3}).join(""),e2,r),g=Object.keys(d);return p=0,function e3(n3){for(var t2=0;t2=g.length)return;var a3,r2,s2,i,o,l2,u2,c=n3[t2];"string"==typeof c||"string"==typeof c.content?(a3=g[p],-1!==(u2=(l2="string"==typeof c?c:c.content).indexOf(a3))&&(++p,r2=l2.substring(0,u2),o=d[a3],s2=void 0,(i={})["interpolation-punctuation"]=f,3===(i=b.tokenize(o,i)).length&&((s2=[1,1]).push.apply(s2,h(i[1],b.languages.javascript,"javascript")),i.splice.apply(i,s2)),s2=new b.Token("interpolation",i,m.alias,o),i=l2.substring(u2+a3.length),o=[],r2&&o.push(r2),o.push(s2),i&&(e3(l2=[i]),o.push.apply(o,l2)),"string"==typeof c?(n3.splice.apply(n3,[t2,1].concat(o)),t2+=o.length-1):c.content=o)):(u2=c.content,Array.isArray(u2)?e3(u2):e3([u2]));}}(n2),new b.Token(r,n2,"language-"+r,a2)}b.languages.javascript["template-string"]=[n("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),n("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),n("svg",/\bsvg/.source),n("markdown",/\b(?:markdown|md)/.source),n("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),n("sql",/\bsql/.source),e].filter(Boolean);var a={javascript:true,js:true,typescript:true,ts:true,jsx:true,tsx:true};function u(e2){return "string"==typeof e2?e2:Array.isArray(e2)?e2.map(u).join(""):u(e2.content)}b.hooks.add("after-tokenize",function(e2){e2.language in a&&!function e3(n2){for(var t2=0,a2=n2.length;t2]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:true,greedy:true,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var n=e.languages.extend("typescript",{});delete n["class-name"],e.languages.typescript["class-name"].inside=n,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:true,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n}}}}),e.languages.ts=e.languages.typescript;}(Prism),function(e){var n=e.languages.javascript,t=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,a="(@(?:arg|argument|param|property)\\s+(?:"+t+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(a+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:true,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(a+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:true,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:true,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:true,inside:n,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(//g,function(){return t})),lookbehind:true,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+t),lookbehind:true,inside:{string:n.string,number:n.number,boolean:n.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:true,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:true,inside:n,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc);}(Prism),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:true},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:true});}(Prism),Prism.languages.n4js=Prism.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),Prism.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),Prism.languages.n4jsd=Prism.languages.n4js,function(e){function n(e2,n2){return RegExp(e2.replace(//g,function(){return /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),n2)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:true,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:true,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:n(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:true,inside:e.languages.javascript},exports:{pattern:n(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:true,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:n(/(\.\s*)#?/.source),lookbehind:true},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:true},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var t=["function","function-variable","method","method-variable","property-access"],a=0;a*\.{3}(?:[^{}]|)*\})/.source;function n(e2,n2){return e2=e2.replace(//g,function(){return t}).replace(//g,function(){return a}).replace(//g,function(){return r}),RegExp(e2,n2)}r=n(r).source,s.languages.jsx=s.languages.extend("markup",e),s.languages.jsx.tag.pattern=n(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),s.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,s.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,s.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,s.languages.jsx.tag.inside.comment=e.comment,s.languages.insertBefore("inside","attr-name",{spread:{pattern:n(//.source),inside:s.languages.jsx}},s.languages.jsx.tag),s.languages.insertBefore("inside","special-attr",{script:{pattern:n(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:s.languages.jsx}}},s.languages.jsx.tag);function i(e2){for(var n2=[],t2=0;t2"!==a2.content[a2.content.length-1].content&&n2.push({tagName:o(a2.content[0].content[1]),openedBraces:0}):0]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:true,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:true,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift;}),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:true},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:true},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:true,greedy:true}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var n={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:n},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:true,inside:n},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:true}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin;}(Prism),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:true},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:true},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:true},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:true}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:true,greedy:true,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:true},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:true},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:true,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:true,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,Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:true},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec,Prism.languages.reason=Prism.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:true},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),Prism.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:true},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete Prism.languages.reason.function,function(e){for(var n=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,t=0;t<2;t++)n=n.replace(//g,function(){return n});n=n.replace(//g,function(){return /[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+n),lookbehind:true,greedy:true},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:true,greedy:true}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:true},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:true},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:true,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:true,greedy:true,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:true,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:true,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:true,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:true,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:true,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:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string;}(Prism),Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:true,greedy:true},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:true}}),delete Prism.languages.go["class-name"],function(e){var n=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,t=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return n.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return n.source})),lookbehind:true},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:n,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:true},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return t})+")"),lookbehind:true,greedy:true,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:true}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:true,greedy:true,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"]);}(Prism),Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:true,greedy:true},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:true,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:true,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:true},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:true,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:true},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:true},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:true},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:true,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;var themes_exports={};__export(themes_exports,{dracula:()=>dracula_default,duotoneDark:()=>duotoneDark_default,duotoneLight:()=>duotoneLight_default,github:()=>github_default,jettwaveDark:()=>jettwaveDark_default,jettwaveLight:()=>jettwaveLight_default,nightOwl:()=>nightOwl_default,nightOwlLight:()=>nightOwlLight_default,oceanicNext:()=>oceanicNext_default,okaidia:()=>okaidia_default,oneDark:()=>oneDark_default,oneLight:()=>oneLight_default,palenight:()=>palenight_default,shadesOfPurple:()=>shadesOfPurple_default,synthwave84:()=>synthwave84_default,ultramin:()=>ultramin_default,vsDark:()=>vsDark_default,vsLight:()=>vsLight_default});var theme={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]};var dracula_default=theme;var theme2={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]};var duotoneDark_default=theme2;var theme3={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]};var duotoneLight_default=theme3;var theme4={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]};var github_default=theme4;var theme5={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]};var nightOwl_default=theme5;var theme6={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]};var nightOwlLight_default=theme6;var colors={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",punctuation:"#5FB3B3",tag:"#fc929e",function:"#79b6f2",className:"#FAC863",method:"#6699CC",operator:"#fc929e"};var theme7={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:colors.keyword}},{types:["attr-value"],style:{color:colors.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:colors.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:colors.primitive}},{types:["boolean"],style:{color:colors.boolean}},{types:["tag"],style:{color:colors.tag}},{types:["string"],style:{color:colors.string}},{types:["punctuation"],style:{color:colors.string}},{types:["selector","char","builtin","inserted"],style:{color:colors.char}},{types:["function"],style:{color:colors.function}},{types:["operator","entity","url","variable"],style:{color:colors.variable}},{types:["keyword"],style:{color:colors.keyword}},{types:["atrule","class-name"],style:{color:colors.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]};var oceanicNext_default=theme7;var theme8={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]};var okaidia_default=theme8;var theme9={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]};var palenight_default=theme9;var theme10={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]};var shadesOfPurple_default=theme10;var theme11={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]};var synthwave84_default=theme11;var theme12={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]};var ultramin_default=theme12;var theme13={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]};var vsDark_default=theme13;var theme14={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]};var vsLight_default=theme14;var theme15={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]};var jettwaveDark_default=theme15;var theme16={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]};var jettwaveLight_default=theme16;var theme17={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]};var oneDark_default=theme17;var theme18={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]};var oneLight_default=theme18;var themeToDict=(theme19,language)=>{const{plain}=theme19;const themeDict=theme19.styles.reduce((acc,themeEntry)=>{const{languages:languages2,style}=themeEntry;if(languages2&&!languages2.includes(language)){return acc}themeEntry.types.forEach(type=>{const accStyle=__spreadValues(__spreadValues({},acc[type]),style);acc[type]=accStyle;});return acc},{});themeDict.root=plain;themeDict.plain=__spreadProps(__spreadValues({},plain),{backgroundColor:void 0});return themeDict};var themeToDict_default=themeToDict;var useThemeDictionary=(language,theme19)=>{const[themeDictionary,setThemeDictionary]=React.useState(themeToDict_default(theme19,language));const previousTheme=React.useRef();const previousLanguage=React.useRef();React.useEffect(()=>{if(theme19!==previousTheme.current||language!==previousLanguage.current){previousTheme.current=theme19;previousLanguage.current=language;setThemeDictionary(themeToDict_default(theme19,language));}},[language,theme19]);return themeDictionary};var useGetLineProps=themeDictionary=>React.useCallback(_a=>{var _b=_a,{className,style,line}=_b,rest=__objRest(_b,["className","style","line"]);const output=__spreadProps(__spreadValues({},rest),{className:clsx("token-line",className)});if(typeof themeDictionary==="object"&&"plain"in themeDictionary)output.style=themeDictionary.plain;if(typeof style==="object")output.style=__spreadValues(__spreadValues({},output.style||{}),style);return output},[themeDictionary]);var useGetTokenProps=themeDictionary=>{const styleForToken=React.useCallback(({types,empty})=>{if(themeDictionary==null)return void 0;else if(types.length===1&&types[0]==="plain"){return empty!=null?{display:"inline-block"}:void 0}else if(types.length===1&&empty!=null){return themeDictionary[types[0]]}return Object.assign(empty!=null?{display:"inline-block"}:{},...types.map(type=>themeDictionary[type]))},[themeDictionary]);return React.useCallback(_a=>{var _b=_a,{token,className,style}=_b,rest=__objRest(_b,["token","className","style"]);const output=__spreadProps(__spreadValues({},rest),{className:clsx("token",...token.types,className),children:token.content,style:styleForToken(token)});if(style!=null){output.style=__spreadValues(__spreadValues({},output.style||{}),style);}return output},[styleForToken])};var newlineRe=/\r\n|\r|\n/;var normalizeEmptyLines=line=>{if(line.length===0){line.push({types:["plain"],content:"\n",empty:true});}else if(line.length===1&&line[0].content===""){line[0].content="\n";line[0].empty=true;}};var appendTypes=(types,add)=>{const typesSize=types.length;if(typesSize>0&&types[typesSize-1]===add){return types}return types.concat(add)};var normalizeTokens=tokens=>{const typeArrStack=[[]];const tokenArrStack=[tokens];const tokenArrIndexStack=[0];const tokenArrSizeStack=[tokens.length];let i=0;let stackIndex=0;let currentLine=[];const acc=[currentLine];while(stackIndex>-1){while((i=tokenArrIndexStack[stackIndex]++)0?types:["plain"];content=token;}else {types=appendTypes(types,token.type);if(token.alias){types=appendTypes(types,token.alias);}content=token.content;}if(typeof content!=="string"){stackIndex++;typeArrStack.push(types);tokenArrStack.push(content);tokenArrIndexStack.push(0);tokenArrSizeStack.push(content.length);continue}const splitByNewlines=content.split(newlineRe);const newlineCount=splitByNewlines.length;currentLine.push({types,content:splitByNewlines[0]});for(let i2=1;i2{const prismRef=React.useRef(prism);return React.useMemo(()=>{if(grammar==null)return normalizeTokens_default([code]);const prismConfig={code,grammar,language,tokens:[]};prismRef.current.hooks.run("before-tokenize",prismConfig);prismConfig.tokens=prismRef.current.tokenize(code,grammar);prismRef.current.hooks.run("after-tokenize",prismConfig);return normalizeTokens_default(prismConfig.tokens)},[code,grammar,language])};var Highlight=({children,language:_language,code,theme:theme19,prism})=>{const language=_language.toLowerCase();const themeDictionary=useThemeDictionary(language,theme19);const getLineProps=useGetLineProps(themeDictionary);const getTokenProps=useGetTokenProps(themeDictionary);const grammar=prism.languages[language];const tokens=useTokenize({prism,language,code,grammar});return children({tokens,className:`prism-code language-${language}`,style:themeDictionary!=null?themeDictionary.root:{},getLineProps,getTokenProps})};var Highlight2=props=>React.createElement(Highlight,__spreadProps(__spreadValues({},props),{prism:props.prism||Prism,theme:props.theme||vsDark_default,code:props.code,language:props.language}));/*! Bundled license information:
+
+ prismjs/prism.js:
+ (**
+ * Prism: Lightweight, robust, elegant syntax highlighting
+ *
+ * @license MIT
+ * @author Lea Verou
+ * @namespace
+ * @public
+ *)
+ */
+
+ const getHighlightLanguage=filename=>{const ext=filename.split(".").pop();switch(ext){case"ts":case"tsx":case"js":case"jsx":return "tsx";case"json":return "json";case"css":case"less":case"sass":case"scss":case"stylus":return "css";case"html":return "html";default:return "plaintext"}};
+
+ const usePreferColorScheme=()=>{const[theme,setTheme]=React.useState(()=>window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",event=>{setTheme(event.matches?"dark":"light");});return theme};
+
+ const CompileResult=({className,result,errors,loading})=>{const[currentIndex,setCurrentIndex]=React.useState(0);const currentFilename=result[currentIndex]?.[0]??"";const code=result[currentIndex]?result[currentIndex][1]:"";const[formattedCode,setFormattedCode]=React.useState(code);React.useEffect(()=>{if(!code){return}window.prettier.format(code,{parser:"babel",plugins:[window.prettierPlugins.estree,window.prettierPlugins.babel]}).then(formatted=>{setFormattedCode(formatted);});},[code]);const preferColorScheme=usePreferColorScheme();return React.createElement("div",{className:className},React.createElement("div",{className:`${className}-tabs playground-tabs`},result.length?null:React.createElement("div",{className:"playground-tabs-tab"},"No file"),result.map(([filename],index)=>React.createElement("span",{key:filename,className:`playground-tabs-tab ${currentIndex===index?"playground-tabs-tab-active":""}`,onClick:()=>setCurrentIndex(index)},filename.startsWith("/")?filename.slice(1):filename))),loading?React.createElement("div",{className:`${className}-loading`},"Compiling..."):null,React.createElement(Highlight2,{theme:preferColorScheme==="light"?themes_exports.oneLight:themes_exports.vsDark,code:formattedCode,language:getHighlightLanguage(currentFilename)},({style,tokens,getLineProps,getTokenProps})=>React.createElement("pre",{style:style},tokens.map((line,i)=>React.createElement("div",{key:i,...getLineProps({line})},line.map((token,key)=>React.createElement("span",{key:key,...getTokenProps({token})})))))),errors.length?React.createElement("div",{className:`${className}-error`},React.createElement("pre",null,React.createElement("b",null,"Error while compiling.")),errors.map((error,index)=>React.createElement("pre",{key:index},error.message))):null)};
+
+ const defaultCodeSet=[["index.tsx",`
+import React from 'react';
+import ForkMeOnGithub from 'fork-me-on-github';
+
+import { repo } from './constants';
+import dataJson from './data.json';
+
+import './style.less';
+
+export default () => {
+ const [count, setCount] = React.useState(0);
+ return (
+
+
Hello, {dataJson.name}!
+
This is an example React App.
+
Repo URL: {repo}
+
+
+
+ );
+);
+ `.trim()],["constants.ts",`export const repo = 'https://github.com/rexskz/tsx-browser-compiler';`],["style.less",`
+@container-prefix-cls: ~'container';
+
+:root {
+ --button-outline-color: rgba(0, 0, 0, 0.3);
+ --button-border-color: #333;
+ --button-background-color: rgba(0, 0, 0, 0.04);
+ --button-background-color-active: rgba(0, 0, 0, 0.08);
+ --button-color: #000;
+}
+
+@media (prefers-color-scheme: dark) {
+ :root {
+ --button-outline-color: rgba(255, 255, 255, 0.3);
+ --button-border-color: #ccc;
+ --button-background-color: rgba(255, 255, 255, 0.08);
+ --button-background-color-active: rgba(255, 255, 255, 0.2);
+ --button-color: #fff;
+ }
+}
+
+.@{container-prefix-cls} {
+ padding: 0 24px;
+
+ button {
+ padding: 4px 8px;
+ background: var(--button-background-color);
+ border: 1px solid var(--button-border-color);
+ border-radius: 4px;
+ color: var(--button-color);
+ font-size: 14px;
+ cursor: pointer;
+
+ &:hover,
+ &:focus {
+ outline: var(--button-outline-color) solid 4px;
+ }
+
+ &:active {
+ background: var(--button-background-color-active);
+ }
+ }
+}
+ `.trim()],["data.json",`
+{
+ "name": "Rex Zeng",
+}
+ `.trim()]];
+
+ const FileNameTab=({switchToTab,renameTab,closeTab,filename,index,currentIndex,className})=>{const[edit,setEdit]=React.useState(false);const inputRef=React.useRef(null);const showRename=()=>{if(index===0){return}setEdit(true);setTimeout(()=>inputRef.current?.focus());};return React.createElement("span",{onClick:()=>!edit&&switchToTab(index),onMouseDown:e=>e.button===1&&!edit&&closeTab(index),onDoubleClick:showRename,className:["playground-tabs-tab",index>0&&"playground-tabs-tab-with-suffix",currentIndex===index&&"playground-tabs-tab-active"].filter(Boolean).join(" ")},edit?React.createElement("input",{ref:inputRef,defaultValue:filename,onBlur:e=>{if(filename!==e.target.value){renameTab(index,e.target.value);}setEdit(false);},onKeyDown:e=>{if(e.key==="Enter"){e.preventDefault();if(filename!==e.currentTarget.value){renameTab(index,e.currentTarget.value);}setEdit(false);}}}):filename,index>0?React.createElement("button",{className:`${className}-tabs-close`,onClick:()=>closeTab(index)},"×"):null)};
+
+ const Editor=({className,sources,onSourceChange})=>{const[currentIndex,setCurrentIndex]=React.useState(0);const currentFilename=sources[currentIndex]?.[0]??"";const currentCode=(sources[currentIndex]??sources[0])[1];const newFileIndex=React.useRef(0);const textareaRef=React.useRef(null);const focusTab=()=>{if(textareaRef.current){textareaRef.current.focus();setTimeout(()=>textareaRef.current?.setSelectionRange(0,0));}};React.useEffect(()=>{focusTab();},[]);const switchToTab=index=>{setCurrentIndex(index);focusTab();};const addTab=()=>{const fileNameMap=new Set;for(const[filename]of sources){fileNameMap.add(filename);}let newFileName=`/new-file-${newFileIndex.current++}.tsx`;while(fileNameMap.has(newFileName)){newFileName=`/new-file-${newFileIndex.current++}.tsx`;}onSourceChange([...sources,[newFileName,""]]);switchToTab(sources.length);};const renameTab=(index,newFileName)=>{if(sources.some(([filename],i)=>filename===newFileName&&i!==index)){alert(`File "${newFileName}" already exists!`);return}if(!newFileName){alert("File name cannot be empty!");return}const newSources=[...sources];newSources[index][0]=newFileName;onSourceChange(newSources);switchToTab(index);};const closeTab=index=>{if(index===0){return}const confirmClose=confirm(`Are you sure to close "${sources[index][0]}"?
+This action cannot be undone!`);if(!confirmClose){return}switchToTab(index-1);onSourceChange(sources.filter((_,i)=>i!==index));};const onEditorKeyDown=e=>{if(e.key==="Home"){e.preventDefault();const el=e.currentTarget;if(e.ctrlKey){el.setSelectionRange(0,0);}else {const currentPosition=el.selectionStart;const isSelection=el.selectionEnd!==currentPosition;const lineStart=currentCode.lastIndexOf("\n",currentPosition-1)+1;const firstNonSpace=Math.max(currentCode.slice(lineStart,currentPosition+1).search(/\S/),0)+lineStart;const targetPosition=currentPosition===firstNonSpace?lineStart:firstNonSpace;if(e.shiftKey){el.setSelectionRange(targetPosition,isSelection?el.selectionEnd:currentPosition,"backward");}else {el.setSelectionRange(targetPosition,targetPosition,"backward");}}}};const preferColorScheme=usePreferColorScheme();return React.createElement("div",{className:className},React.createElement("div",{className:`${className}-tabs playground-tabs`,onDoubleClick:e=>e.target===e.currentTarget&&addTab()},React.createElement("button",{className:`playground-tabs-tab ${className}-tabs-add`,onClick:addTab},"+"),sources.map(([filename],index)=>React.createElement(FileNameTab,{key:index,switchToTab:switchToTab,renameTab:renameTab,closeTab:closeTab,filename:filename,index:index,currentIndex:currentIndex,className:className}))),React.createElement("div",{className:`${className}-code`},React.createElement("div",{className:`${className}-code-inner`},currentCode?null:React.createElement("div",{className:`${className}-code-placeholder`},"// Type some code to start..."),React.createElement("textarea",{ref:textareaRef,value:currentCode,onChange:e=>{const newSources=[...sources];newSources[currentIndex][1]=e.target.value;onSourceChange(newSources);},onKeyDown:onEditorKeyDown}),React.createElement(Highlight2,{theme:preferColorScheme==="light"?themes_exports.oneLight:themes_exports.vsDark,code:currentCode,language:getHighlightLanguage(currentFilename)},({style,tokens,getLineProps,getTokenProps})=>React.createElement("pre",{style:style},tokens.map((line,i)=>React.createElement("div",{key:i,...getLineProps({line})},line.map((token,key)=>React.createElement("span",{key:key,...getTokenProps({token})})))))))))};
+
+ let ErrorBoundary=class ErrorBoundary extends React.Component{static getDerivedStateFromError(error){return {error}}render(){if(this.state.error){return React.createElement("pre",{className:"playground-error-boundary"},React.createElement("b",null,"Error while rendering."),React.createElement("br",null),this.state.error.stack)}return this.props.children}constructor(...args){super(...args);this.state={error:null};}};const Previewer=({className,children})=>{const[key,setKey]=React.useState(0);React.useEffect(()=>{setKey(prev=>prev+1);},[children]);return React.createElement("div",{className:className},React.createElement(ErrorBoundary,{key:key},children))};
+
+ function throttle(delay,callback,options){var _ref=options||{},_ref$noTrailing=_ref.noTrailing,noTrailing=_ref$noTrailing===void 0?false:_ref$noTrailing,_ref$noLeading=_ref.noLeading,noLeading=_ref$noLeading===void 0?false:_ref$noLeading,_ref$debounceMode=_ref.debounceMode,debounceMode=_ref$debounceMode===void 0?undefined:_ref$debounceMode;var timeoutID;var cancelled=false;var lastExec=0;function clearExistingTimeout(){if(timeoutID){clearTimeout(timeoutID);}}function cancel(options){var _ref2=options||{},_ref2$upcomingOnly=_ref2.upcomingOnly,upcomingOnly=_ref2$upcomingOnly===void 0?false:_ref2$upcomingOnly;clearExistingTimeout();cancelled=!upcomingOnly;}function wrapper(){for(var _len=arguments.length,arguments_=new Array(_len),_key=0;_key<_len;_key++){arguments_[_key]=arguments[_key];}var self=this;var elapsed=Date.now()-lastExec;if(cancelled){return}function exec(){lastExec=Date.now();callback.apply(self,arguments_);}function clear(){timeoutID=undefined;}if(!noLeading&&debounceMode&&!timeoutID){exec();}clearExistingTimeout();if(debounceMode===undefined&&elapsed>delay){if(noLeading){lastExec=Date.now();if(!noTrailing){timeoutID=setTimeout(debounceMode?clear:exec,delay);}}else {exec();}}else if(noTrailing!==true){timeoutID=setTimeout(debounceMode?clear:exec,debounceMode===undefined?delay-elapsed:delay);}}wrapper.cancel=cancel;return wrapper}function debounce(delay,callback,options){var _ref=options||{},_ref$atBegin=_ref.atBegin,atBegin=_ref$atBegin===void 0?false:_ref$atBegin;return throttle(delay,callback,{debounceMode:atBegin!==false})}
+
+ const useDebouncedEffect=(factory,deps,timeMs)=>{const debouncedFactory=React.useRef(factory);const debounced=React.useRef(debounce(timeMs,()=>{return debouncedFactory.current()}));React.useEffect(()=>{debouncedFactory.current=factory;return debounced.current()},deps);};
+
+ const metaKey=Symbol("buildTimeMeasurementLoaderMetaKey");const BuildTimeMeasurementLoader=(_,meta)=>{const endTime=Date.now();const{startTime,contentLength}=meta[metaKey];console.log(`LessLoader: transform ${meta.filename} (${contentLength} chars) cost ${endTime-startTime}ms`);};BuildTimeMeasurementLoader.pitch=(content,meta)=>{if(!meta[metaKey]){meta[metaKey]={startTime:Date.now(),contentLength:content.length};}};
+
+ const LessLoader=(content,meta,callback)=>{window.less.render(content,{filename:meta.filename},(err,result)=>{if(err){callback(err,"",meta);}else {callback(null,result.css,meta);}});};
+
+ __$styleInject(":root {\n --playground-background: #f2f4f6;\n --playground-code-background: #fafcff;\n --playground-text-color: #333;\n --playground-button-background: #fff;\n --playground-button-hover-background: #f0f0f0;\n --playground-divider-color: #e2e4e6;\n --playground-controls-height: 48px;\n --playground-tabs-height: 32px;\n --playground-tabs-tab-active-border-color: #3ae;\n --playground-close-icon-height: 16px;\n --playground-code-selection-color: #b5bbc6;\n --playground-link-color: blue;\n}\nhtml,\nbody {\n margin: 0;\n}\nbody[data-theme='dark'] {\n --playground-background: #1e1e1e;\n --playground-code-background: #1e1e1e;\n --playground-text-color: #fff;\n --playground-button-background: #333;\n --playground-button-hover-background: #666;\n --playground-divider-color: #444;\n --playground-tabs-tab-active-border-color: #3ae;\n --playground-close-icon-height: 16px;\n --playground-code-selection-color: #444;\n --playground-link-color: #3ae;\n}\nbody,\ninput {\n font-family: Roboto, Helvetica, Tahoma, Arial, 'Noto Sans CJK', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'WenQuanYi Micro Hei', sans-serif;\n}\na {\n color: var(--playground-link-color);\n}\n.app {\n display: flex;\n height: 100vh;\n flex-direction: column;\n background: var(--playground-background);\n font-size: 14px;\n}\n.app,\n.app div {\n box-sizing: border-box;\n}\n.app pre {\n background: var(--playground-code-background) !important;\n white-space: pre-wrap;\n}\n.app .controls {\n display: flex;\n height: var(--playground-controls-height);\n padding: 0 8px;\n flex-shrink: 0;\n align-items: center;\n border-bottom: 1px solid var(--playground-divider-color);\n color: var(--playground-text-color);\n}\n.app .controls h1 {\n padding: 0 8px;\n margin: 0;\n font-size: 14px;\n font-weight: 500;\n line-height: var(--playground-controls-height);\n}\n.app .controls h1 small {\n margin-left: 8px;\n font-size: 12px;\n font-weight: normal;\n}\n.app .controls h1 + div {\n margin: 0 8px 0 auto;\n}\n.app .controls-buttons {\n display: flex;\n align-items: center;\n}\n.app .controls-buttons button {\n box-sizing: border-box;\n margin-right: 8px;\n padding: 4px 4px;\n background: var(--playground-button-background);\n border-radius: 4px;\n border: 1px solid var(--playground-divider-color);\n color: var(--playground-text-color);\n font-size: 12px;\n vertical-align: middle;\n cursor: pointer;\n}\n.app .controls-buttons button:active {\n background: var(--playground-button-hover-background);\n}\n.app .controls-buttons label {\n position: relative;\n display: inline-flex;\n align-items: center;\n padding: 4px 8px;\n font-size: 12px;\n}\n.app .controls-buttons label .icon {\n z-index: 2;\n pointer-events: none;\n}\n.app .controls-buttons label input {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: var(--playground-button-background);\n border: 1px solid var(--playground-divider-color);\n border-radius: 4px;\n margin: 0 4px 0 0;\n appearance: none;\n cursor: pointer;\n outline: 2px solid transparent;\n transition: outline-color 0.2s;\n}\n.app .controls-buttons label + label input {\n border-left: none;\n}\n.app .controls-buttons label.checked input {\n outline-color: var(--playground-tabs-tab-active-border-color);\n z-index: 1;\n}\n.app .controls-buttons label:first-of-type input {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.app .controls-buttons label:last-of-type input {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.app .playground {\n display: flex;\n max-height: calc(100% - var(--playground-controls-height));\n flex-grow: 1;\n}\n.app .playground > * {\n flex: 1;\n}\n.app .playground-layout-horizontal {\n flex-direction: row;\n}\n.app .playground-layout-horizontal > * {\n width: 33.33%;\n border-right: 1px solid var(--playground-divider-color);\n}\n.app .playground-layout-horizontal > *:last-child {\n border-right: none;\n}\n.app .playground-layout-vertical {\n flex-direction: column;\n}\n.app .playground-layout-vertical > * {\n height: 33.33%;\n border-bottom: 1px solid var(--playground-divider-color);\n}\n.app .playground-layout-vertical > *:last-child {\n border-bottom: none;\n}\n.app .playground-tabs {\n display: flex;\n flex-shrink: 0;\n align-items: flex-start;\n overflow-x: auto;\n color: var(--playground-text-color);\n user-select: none;\n}\n.app .playground-tabs-tab {\n position: relative;\n display: inline-block;\n height: var(--playground-tabs-height);\n box-sizing: border-box;\n padding: 0 8px;\n border: none;\n border-radius: 0;\n border-right: 1px solid var(--playground-divider-color);\n background: transparent;\n cursor: pointer;\n font-size: 14px;\n line-height: var(--playground-tabs-height);\n white-space: nowrap;\n}\n.app .playground-tabs-tab-with-suffix {\n padding-right: 0;\n}\n.app .playground-tabs-tab:hover,\n.app .playground-tabs-tab-active {\n background: var(--playground-code-background);\n}\n.app .playground-tabs-tab:before {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n display: block;\n height: 2px;\n background: transparent;\n transition: background 0.2s;\n content: '';\n}\n.app .playground-tabs-tab-active:before {\n background: var(--playground-tabs-tab-active-border-color);\n}\n.app .playground-tabs-tab input {\n color: var(--playground-text-color);\n}\n.app .playground-editor {\n display: flex;\n flex-direction: column;\n color: var(--playground-text-color);\n}\n.app .playground-editor-tabs-add {\n padding: 0 8px;\n}\n.app .playground-editor-tabs-close {\n width: var(--playground-close-icon-height);\n height: var(--playground-close-icon-height);\n padding: 0;\n border: none;\n border-radius: 2px;\n margin: 4px;\n background: transparent;\n cursor: pointer;\n line-height: var(--playground-close-icon-height);\n}\n.app .playground-editor-tabs-close:not(.app .playground-editor-tabs-close-disabled):hover,\n.app .playground-editor-tabs-close:not(.app .playground-editor-tabs-close-disabled):focus {\n background: var(--playground-button-hover-background);\n outline: none;\n}\n.app .playground-editor-tabs button {\n color: var(--playground-text-color);\n}\n.app .playground-editor-tabs input {\n margin-bottom: -3px;\n padding: 0 0 2px;\n border: none;\n border-bottom: 1px solid var(--playground-divider-color);\n background: var(--playground-background);\n font-size: 14px;\n outline: none;\n}\n.app .playground-editor-code {\n overflow: auto;\n flex-grow: 1;\n background: var(--playground-code-background);\n}\n.app .playground-editor-code-inner {\n position: relative;\n min-height: calc(100% - var(--playground-tabs-height));\n}\n.app .playground-editor-code-inner pre,\n.app .playground-editor-code-inner textarea {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n padding: 8px;\n border: none;\n margin: 0;\n font-family: monospace;\n font-size: 14px;\n}\n.app .playground-editor-code-inner textarea {\n position: absolute;\n top: 0;\n left: 0;\n background: transparent;\n color: var(--playground-text-color);\n outline: none;\n resize: none;\n -webkit-text-fill-color: transparent;\n}\n.app .playground-editor-code-inner textarea::selection {\n background: var(--playground-code-selection-color);\n}\n.app .playground-editor-code-inner pre {\n position: relative;\n z-index: 1;\n background: transparent !important;\n pointer-events: none;\n}\n.app .playground-editor-code-placeholder {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n padding: 8px;\n color: #999;\n font-family: monospace;\n font-size: 14px;\n pointer-events: none;\n}\n.app .playground-compile-result {\n display: flex;\n flex-direction: column;\n color: var(--playground-text-color);\n position: relative;\n overflow: hidden;\n}\n@keyframes loading-show {\n 0% {\n transform: translateY(100%);\n }\n 100% {\n transform: translateY(0);\n }\n}\n.app .playground-compile-result-loading {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n padding: 8px 16px;\n background: var(--playground-tabs-tab-active-border-color);\n color: #fff;\n animation: loading-show 0.5s ease-out forwards;\n}\n.app .playground-compile-result > pre {\n overflow: auto;\n flex-grow: 1;\n padding: 8px;\n margin: 0;\n}\n.app .playground-compile-result-error {\n padding: 8px;\n overflow-y: auto;\n border-top: 1px solid var(--playground-divider-color);\n color: red;\n}\n.app .playground-compile-result-error pre {\n padding: 0;\n margin: 0 0 16px;\n background: transparent !important;\n}\n.app .playground-previewer {\n position: relative;\n overflow: auto;\n background: var(--playground-code-background);\n color: var(--playground-text-color);\n}\n.app .playground-error-boundary {\n padding: 8px;\n border: 1px solid red;\n border-radius: 4px;\n margin: 8px;\n background: transparent !important;\n color: red;\n}\n.icon {\n --icon-size: 16px;\n display: inline-block;\n width: var(--icon-size);\n height: var(--icon-size);\n color: var(--playground-text-color);\n}\n");
+
+ const localStorageKey="tsx-browser-compiler-playground-sources";const IconSplit=props=>React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...props},React.createElement("rect",{x:"15",y:"4",width:"2",height:"24"}),React.createElement("path",{d:"M10,7V25H4V7h6m0-2H4A2,2,0,0,0,2,7V25a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V7a2,2,0,0,0-2-2Z"}),React.createElement("path",{d:"M28,7V25H22V7h6m0-2H22a2,2,0,0,0-2,2V25a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V7a2,2,0,0,0-2-2Z"}));const Playground=()=>{const[sources,setSources]=React.useState(defaultCodeSet);const[loading,setLoading]=React.useState(false);const[layout,setLayout]=React.useState(window.innerWidth<960?"vertical":"horizontal");const[displayedChildren,setDisplayedChildren]=React.useState(null);const[displayedCompiled,setDisplayedCompiled]=React.useState([]);const[displayedErrors,setDisplayedErrors]=React.useState([]);React.useEffect(()=>{const storedSources=localStorage.getItem(localStorageKey);if(storedSources!==null){try{setSources(JSON.parse(storedSources));}catch{}}},[]);React.useEffect(()=>{setLoading(true);},[sources]);useDebouncedEffect(async()=>{const{component,compiled,errors,cleanup}=await asyncTsxToElement({sources:Object.fromEntries(sources),resolve:{externals:{"fork-me-on-github":"1.0.6"}},rules:[{test:/\.less$/,use:[BuildTimeMeasurementLoader,LessLoader]}]});if(component!==null){setDisplayedChildren(component);setDisplayedErrors([]);}setDisplayedCompiled(compiled);if(errors!==null){setDisplayedErrors(errors);}localStorage.setItem(localStorageKey,JSON.stringify(sources));setLoading(false);return cleanup},[sources],1e3);const resetDemo=()=>{if(confirm("Are you sure to reset the demo?\nThis will clear all your changes.")){setSources(defaultCodeSet);}};return React.createElement("div",{className:"app"},React.createElement("div",{className:"controls"},React.createElement("h1",null,"TSX Browser Compiler",React.createElement("small",null,"v",VERSION)),React.createElement("div",{className:"controls-buttons"},React.createElement("button",{onClick:resetDemo},"Reset demo"),React.createElement("label",{htmlFor:"horizontal",className:layout==="horizontal"?"checked":""},React.createElement(IconSplit,{className:"icon icon-split-horizontal"}),React.createElement("input",{type:"radio",name:"layout",id:"horizontal",checked:layout==="horizontal",onChange:()=>setLayout("horizontal")})),React.createElement("label",{htmlFor:"vertical",className:layout==="vertical"?"checked":""},React.createElement(IconSplit,{className:"icon icon-split-vertical",style:{transform:"rotate(90deg)"}}),React.createElement("input",{type:"radio",id:"vertical",name:"layout",checked:layout==="vertical",onChange:()=>setLayout("vertical")})))),React.createElement("div",{className:`playground playground-layout-${layout}`},React.createElement(Editor,{className:"playground-editor",sources:sources,onSourceChange:setSources}),React.createElement(CompileResult,{className:"playground-compile-result",result:displayedCompiled,errors:displayedErrors,loading:loading}),React.createElement(Previewer,{className:"playground-previewer"},displayedChildren)))};const root=ReactDOM.createRoot(document.getElementById("root"));root.render(React.createElement(React.StrictMode,null,React.createElement(Playground,null)));
+
+}));