(function(){ "use strict"; if(window.__stellarWorkTools20261116v2)return; window.__stellarWorkTools20261116v2=true; function link(label,href){var a=document.createElement("a");a.className="stellar-work-tool";a.href=href;a.textContent=label;return a} function prompt(label,txt){var b=document.createElement("button");b.className="stellar-work-tool";b.type="button";b.textContent=label;b.addEventListener("click",function(){var f=document.getElementById("prompt");if(!f)return;f.value=txt;f.dispatchEvent(new Event("input",{bubbles:true}));f.focus()});return b} function update(){ var body=document.body;if(!body)return; var mode=document.getElementById("sx-mode-work"); var visible=body.classList.contains("sx-work-active")||(mode&&mode.getAttribute("aria-selected")==="true"); var host=document.getElementById("sx-work-tools-20261116"); if(!visible){if(host)host.hidden=true;return} var anchor=document.getElementById("sx-work-switch")||document.getElementById("sx-work-context"); if(!anchor)return; if(!host){host=document.createElement("nav");host.id="stellar-work-tools-20261116";host.setAttribute("aria-label","Work mode game and coding tools");host.appendChild(link("Download game starters","/game-builder"));host.appendChild(link("Coding workspace","/coding"));host.appendChild(prompt("Roblox game plan","Help me make a Roblox Luau game. Start with a small playable prototype. Give me named scripts, where to place each one, and a testing checklist. Never claim it is published automatically."));host.appendChild(prompt("FiveM script plan","Help me build a FiveM Lua resource. Start with a standalone test feature, provide fxmanifest.lua, config.lua and client/server files as needed, with setup and security testing instructions."))} host.hidden=false; if(host.parentElement!==anchor.parentElement||host.previousElementSibling!==anchor)anchor.insertAdjacentElement("afterend",host); } var lock=false; function schedule(){if(lock)return;lock=true;requestAnimationFrame(function(){lock=false;update()})} function boot(){schedule();document.getElementById("sx-mode-work")?.addEventListener("click",schedule);document.getElementById("sx-mode-chat")?.addEventListener("click",schedule);var observer=new MutationObserver(schedule);observer.observe(document.body,{subtree:true,childList:true,attributes:true,attributeFilter:["class","aria-selected"]})} if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",boot,{once:true});else boot(); })();