var htmlContent = `<!doctype html><html lang=en><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,viewport-fit=cover"><title>NexChat</title><link rel=icon type=image/svg+xml href="
https://raw.githubusercontent.com/alexdatskov-tech/nexchat/arena/01a01c36-nexchat/assets/img/logo.svg"><style>html,body{height:100%;margin:0;background:#0D0C0F}#f{position:fixed;inset:0;width:100%;height:100%;border:0;display:none;background:#0D0C0F;z-index:1}#b{position:fixed;inset:0;z-index:2;display:flex;flex-direction:column;gap:16px;align-items:center;justify-content:center;background:#0D0C0F;font-family:"Instrument Sans",system-ui,-apple-system,sans-serif;color:#A5A1AD;font-size:14px;letter-spacing:.02em;text-align:center;padding:24px}#b small{color:#6E6A78;font-size:12px;max-width:480px;line-height:1.5}#b a{color:#2FBF87}.s{width:34px;height:34px;border-radius:50%;border:3px solid rgba(47,191,135,.16);border-top-color:#2FBF87;animation:s .9s linear infinite}@keyframes s{to{transform:rotate(360deg)}}</style><div id=b><div class=s></div><div>Loading NexChat from GitHub…</div><small>Fetching each file from <a href="
https://raw.githubusercontent.com/alexdatskov-tech/nexchat/arena/01a01c36-nexchat/">raw.githubusercontent.com/alexdatskov-tech/nexchat</a>. If this takes long, check your connection.</small></div><iframe id=f title=NexChat allowfullscreen allow="autoplay;camera;microphone;display-capture;fullscreen;clipboard-read;clipboard-write;notifications;geolocation;picture-in-picture"></iframe><noscript><div style="position:fixed;inset:0;display:grid;place-items:center;font-family:system-ui,sans-serif;color:#EDEBEF;background:#0D0C0F;text-align:center;padding:24px">NexChat needs JavaScript to run: it fetches the app’s files from the GitHub raw CDN and renders them here.</div></noscript><script>var t="alexdatskov-tech/nexchat",e="arena/01a01c36-nexchat",n="
https://raw.githubusercontent.com/"+t+"/"+e+"/",i=["index.html","portal.html","dms.html","server.html","server-settings.html","profile.html","admin.html"],o={};function r(t){return o[t]||(o[t]=fetch(t).then(function(e){if(!e.ok)throw new Error("HTTP "+e.status+" for "+t);return e.text()}).catch(function(e){throw delete o[t],e})),o[t]}function a(t,e){var n=t.replace(/window\\.location\\.href\\s*=(?!=)/g,"window.NX_HREF =").replace(/window\\.location\\.replace\\s*\\(/g,"window.NX_REPLACE(").replace(/window\\.location\\.reload\\s*\\(/g,"window.NX_RELOAD(").replace(/window\\.location\\.assign\\s*\\(/g,"window.NX_REPLACE(").replace(/document\\.location\\.href\\s*=(?!=)/g,"window.NX_HREF =").replace(/\\blocation\\.href\\s*=(?!=)/g,"window.NX_HREF =").replace(/\\blocation\\.replace\\s*\\(/g,"window.NX_REPLACE(").replace(/\\blocation\\.reload\\s*\\(/g,"window.NX_RELOAD(").replace(/\\blocation\\.assign\\s*\\(/g,"window.NX_REPLACE(").replace(/window\\.location\\s*=(?!=)/g,"window.NX_HREF =").replace(/\\blocation\\.search/g,"window.NX_SEARCH").replace(/\\blocation\\.hash/g,"window.NX_HASH").replace(/\\blocation\\.origin/g,"window.NX_ORIGIN").replace(/\\blocation\\.pathname/g,"window.NX_PATHNAME").replace(/\\blocation\\.href/g,"window.NX_BASE"),i=n.match(/\\blocation\\.[a-z]+/i);return i&&console.warn('[NexChat loader] unrewritten "'+i[0]+'" in '+(e||"script")+" — left as-is; check it if navigation misbehaves."),n}function c(t){var e=/function script\\(src\\)\\s*\\{[\\s\\S]*?\\n {2}\\}/;return e.test(t)?t.replace(e,"function script(src) { return window.NX_SCRIPT(src); }"):(console.warn("[NexChat loader] tiff.js script() helper not found; TIFF decoding may not load."),t)}var s=t=>String(t).replace(/<\\/script/gi,"<\\\\/script"),l=t=>String(t).replace(/<\\/style/gi,"<\\\\/style");function d(t){return String(t).replace(/\\\\/g,"\\\\\\\\").replace(/"/g,'\\\\"')}async function u(t,e,i){var o=await r(n+t),u=o.match(/<link rel="stylesheet" href="assets\\/css\\/theme\\.css(?:\\?[^"]*)?"[^>]*\\/?>/);if(!u)throw new Error("theme.css link not found in "+t);var w=await r(n+"assets/css/theme.css");o=o.replace(u[0],function(){return"<style>\\n"+l(w)+"\\n</style>"});for(var f,h=/<script src="(assets\\/js\\/[^"]+?\\.js)(?:\\?[^"]*)?"[^>]*><\\/script>/g,p=[];f=h.exec(o);)p.push({full:f[0],path:f[1]});for(var _=await Promise.all(p.map(function(t){return r(n+t.path).then(function(e){return"assets/js/tiff.js"===t.path&&(e=c(e)),{full:t.full,code:a(e,t.path)}})})),m=0;m<_.length;m++)(function(t,e){o=o.replace(t,function(){return"<script>\\n"+s(e)+"\\n<\\/script>"})})(_[m].full,_[m].code);o=(o=o.replace(/src="assets\\/([^"?]+)(?:\\?[^"]*)?"/g,'src="'+n+'assets/$1"')).replace(/href="assets\\/([^"?]+)(?:\\?[^"]*)?"/g,'href="'+n+'assets/$1"');var g=location.href.split("#")[0],E=location.origin&&"null"!==location.origin?location.origin:"",N=NX_PREAMBLE.split("__PAGE__").join(t).split("__QS__").join(d(e)).split("__HASH__").join(d(i)).split("__BASE__").join(d(g)).split("__ORIGIN__").join(d(E));return o.replace("<head>",function(){return"<head>"+N})}function w(t){var e=String(t||""),n="",i="",o=e.indexOf("?");o>=0&&(n=e.slice(o),e=e.slice(0,o));var r=e.indexOf("#");return r>=0&&(i=e.slice(r),e=e.slice(0,r)),{name:(e=e.replace(/^https?:\\/\\/[^/]+/i,"").replace(/^\\/+/,"")).split("/").pop()||"index.html",qs:n,frag:i}}function f(){var t=location.hash;return"#"===t.charAt(0)&&(t=t.slice(1)),"/"===t.charAt(0)&&(t=t.slice(1)),t?w(t):{name:"index.html",qs:"",frag:""}}var h=0,p=0,_=null;function m(){document.getElementById("f").style.display="block"}function g(){document.getElementById("f").style.display="none"}function E(n){clearTimeout(_);var i=document.getElementById("b");_=setTimeout(function(){i.style.display="flex",i.innerHTML='<div class="s"></div><div>Loading '+v(n)+"…</div><small>Fetching files from raw.githubusercontent.com/"+v(t)+"/"+v(e)+"/</small>"},250)}function N(o){var r=i.indexOf(o.name)>=0?o.name:"index.html",a=++h,c=document.getElementById("b");E(r),u(r,o.qs,o.frag).then(function(t){a===h&&(clearTimeout(_),p=a,document.getElementById("f").srcdoc=t,m(),setTimeout(function(){a===p&&(c.style.display="none")},1500))}).catch(function(i){a===h&&(clearTimeout(_),g(),c.style.display="flex",c.innerHTML='<div style="color:#FF8085;font-size:28px;">⚠</div><div>Could not load <b>'+v(r)+"</b></div><small>"+v(i&&i.message?i.message:i)+"<br>Check that the branch <b>"+v(e)+"</b> exists in <b>"+v(t)+'</b> and that <a href="'+n+'">raw.githubusercontent.com</a> is reachable.</small><button onclick="location.reload()" style="background:#2FBF87;color:#06140E;border:0;border-radius:9px;padding:9px 16px;font-weight:700;cursor:pointer;">Retry</button>')})}function v(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}window.NX_RAW_BASE=n,window.NX_NAV=function(t){var e=w(t);if(!(i.indexOf(e.name)<0)){var n="#/"+e.name+e.qs+e.frag;location.hash===n?N(f()):location.hash=n}},window.NX_RELOAD=function(){N(f())},window.NX_TITLE=function(t){t&&(document.title=t)},window.addEventListener("hashchange",function(){N(f())});var A=document.getElementById("f");A.addEventListener("load",function(){h===p&&(m(),document.getElementById("b").style.display="none");var t="";try{t=String(A.contentWindow.location.href)}catch(t){return}if(t&&0!==t.indexOf("about:")){var e=w(t);i.indexOf(e.name)>=0?window.NX_NAV(t):N(f())}});var NX_PREAMBLE='<script>!function(){var t="__PAGE__",e=window.parent;window.NX_PAGE=t,window.NX_SEARCH="__QS__",window.NX_HASH="__HASH__",window.NX_BASE="__BASE__",window.NX_ORIGIN="__ORIGIN__",window.NX_PATHNAME="/"+t;try{window.NX_RAW_BASE=e&&e.NX_RAW_BASE||""}catch(t){window.NX_RAW_BASE=""}function n(t){var n=String(t);try{if(e&&e.NX_NAV)return e.NX_NAV(n),n}catch(t){}return window.location.assign(n),n}Object.defineProperty(window,"NX_HREF",{configurable:!0,get:function(){return window.NX_BASE},set:function(t){n(t)}}),window.NX_REPLACE=n,window.NX_RELOAD=function(){try{if(e&&e.NX_RELOAD)return void e.NX_RELOAD()}catch(t){}window.location.reload()},window.NX_SCRIPT=function(t){return new Promise(function(e,n){var i=/^(?:https?:)?\\\\/\\\\//i.test(t)?t:window.NX_RAW_BASE+t;fetch(i).then(function(t){if(!t.ok)throw new Error("HTTP "+t.status);return t.text()}).then(function(t){var n=document.createElement("script");n.textContent=t,document.head.appendChild(n),e()}).catch(function(t){n(t)})})},document.addEventListener("click",function(t){if(!(t.defaultPrevented||0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)){var e=t.target&&t.target.closest?t.target.closest("a[href]"):null;if(e){var i=e.getAttribute("href")||"";i&&"#"!==i.charAt(0)&&(/^(https?:)?\\\\/\\\\//i.test(i)||/^(javascript|mailto|tel|sms|data|blob|about|file):/i.test(i)||(t.preventDefault(),t.stopPropagation(),n(i)))}}},!0);try{document.title&&e&&e.NX_TITLE&&e.NX_TITLE(document.title);var i=document.querySelector("title");i&&window.MutationObserver&&e&&e.NX_TITLE&&new MutationObserver(function(){e.NX_TITLE(document.title)}).observe(i,{childList:!0,subtree:!0,characterData:!0})}catch(t){}}();<\\/script>';N(f());<\/script><\\/html>`;