var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},t={},n={},o=e.parcelRequireafa4;null==o&&((o=function(e){if(e in t)return t[e].exports;if(e in n){var o=n[e];delete n[e];var r={id:e,exports:{}};return t[e]=r,o.call(r.exports,r,r.exports),r.exports}var l=Error("Cannot find module '"+e+"'");throw l.code="MODULE_NOT_FOUND",l}).register=function(e,t){n[e]=t},e.parcelRequireafa4=o),o("jq6PZ");var r=o("aYOJS");async function l(e){return await new Promise((t,n)=>{(0,r.createModal)("provision",[JSON.stringify(e)],{bufferSize:0,onClose:(o,r)=>{if(!o){n(Error(r??"unspecified error"));return}t(e.Slug)}})})}const i=document.getElementById("system"),a=document.getElementById("slug"),c=document.getElementById("php"),d=document.getElementById("opcacheDevelopment"),u=document.getElementById("contentsecuritypolicy"),s=document.getElementById("iipserver");i.addEventListener("submit",e=>{e.preventDefault();let t=document.querySelector('input[name="flavor"]:checked'),n=t instanceof HTMLInputElement?t.value:"";l({Slug:a.value,Flavor:n,System:{PHP:c.value,IIPServer:s.checked,OpCacheDevelopment:d.checked,ContentSecurityPolicy:u.value}}).then(e=>{location.href="/admin/instance/"+e}).catch(e=>{console.error(e),location.reload()})}),i.querySelector("fieldset")?.removeAttribute("disabled");
//# sourceMappingURL=AdminProvision.994883f5.js.map
