UNPKG

@aegis-framework/artemis

Version:

Aegis Framework Javascript Library

5 lines (3 loc) 42.5 kB
var u=Object.defineProperty;var s=(G,J)=>{for(var Q in J)u(G,Q,{get:J[Q],enumerable:!0,configurable:!0,set:(X)=>J[Q]=()=>X})};var g={};s(g,{Util:()=>i,Text:()=>m,SpaceAdapter:()=>v,Space:()=>c,SessionStorage:()=>x,RequestTimeoutError:()=>f,RequestError:()=>P,Request:()=>K,RemoteStorageKeyNotFoundError:()=>C,RemoteStorage:()=>w,Preload:()=>N,Platform:()=>F,LocalStorageKeyNotFoundError:()=>R,LocalStorage:()=>O,IndexedDBKeyNotFoundError:()=>h,IndexedDB:()=>q,Form:()=>T,FileSystem:()=>D,DebugLevel:()=>y,Debug:()=>k,DOM:()=>L,$_ready:()=>o,$_create:()=>l,$_:()=>n});var y;((W)=>{W[W.NONE=0]="NONE";W[W.ERROR=1]="ERROR";W[W.WARNING=2]="WARNING";W[W.INFO=3]="INFO";W[W.DEBUG=4]="DEBUG";W[W.ALL=5]="ALL"})(y||={});class k{static _level=0;static get currentLevel(){return this._level}static level(G){if(typeof G==="number")this._level=G;return this._level}static setLevel(G){this._level=G}static isEnabled(G){return this._level>=G}static log(...G){if(this._level>=4)console.log(...G)}static debug(...G){if(this._level>=4)console.debug(...G)}static info(...G){if(this._level>=3)console.info(...G)}static error(...G){if(this._level>=1)console.error(...G)}static warning(...G){if(this._level>=2)console.warn(...G)}static warn(...G){this.warning(...G)}static table(G,J){if(this._level>=4)console.table(G,J)}static group(...G){if(this._level>=4)console.group(...G)}static groupCollapsed(...G){if(this._level>=4)console.groupCollapsed(...G)}static groupEnd(){if(this._level>=4)console.groupEnd()}static time(G){if(this._level>=4)console.time(G)}static timeLog(G,...J){if(this._level>=4)console.timeLog(G,...J)}static timeEnd(G){if(this._level>=4)console.timeEnd(G)}static trace(...G){if(this._level>=4)console.trace(...G)}static assert(G,...J){if(this._level>=1)console.assert(G,...J)}static clear(){if(this._level>=4)console.clear()}static count(G){if(this._level>=4)console.count(G)}static countReset(G){if(this._level>=4)console.countReset(G)}static dir(G){if(this._level>=4)console.dir(G)}static dirxml(G){if(this._level>=4)console.dirxml(G)}static format(G,...J){let Q=G,X=0;return Q=Q.replace(/%[sdioOcj%]/g,(Z)=>{if(Z==="%%")return"%";if(X>=J.length)return Z;let $=J[X++];switch(Z){case"%s":return String($);case"%d":case"%i":return String(parseInt(String($),10));case"%o":case"%O":return JSON.stringify($);case"%c":return"";case"%j":return JSON.stringify($);default:return Z}}),Q}}var V=new WeakMap;class L{collection;length;constructor(G){if(!G)this.collection=[];else if(typeof G==="string")this.collection=Array.from(document.querySelectorAll(G));else if(G instanceof NodeList)this.collection=Array.from(G);else if(G instanceof L)this.collection=G.collection;else if(G instanceof Element)this.collection=[G];else if(Array.isArray(G))this.collection=G;else this.collection=[];this.length=this.collection.length}hide(){return this.style("display","none")}show(G="block"){return this.style("display",G)}addClass(G){return this.collection.forEach((J)=>J.classList.add(G)),this}removeClass(G){return this.collection.forEach((J)=>{if(!G)J.className="";else J.classList.remove(G)}),this}toggleClass(G){let J=G.split(" ");return this.collection.forEach((Q)=>{J.forEach((X)=>Q.classList.toggle(X))}),this}hasClass(G){if(this.length===0)return!1;return this.collection.every((J)=>J.classList.contains(G))}value(G){if(G!==void 0){let Q=String(G);for(let X of this.collection)if(X instanceof HTMLInputElement||X instanceof HTMLTextAreaElement||X instanceof HTMLSelectElement||X instanceof HTMLButtonElement||X instanceof HTMLOptionElement)X.value=Q;return this}if(this.length===0)return;let J=this.collection[0];if(J instanceof HTMLInputElement||J instanceof HTMLTextAreaElement||J instanceof HTMLSelectElement||J instanceof HTMLButtonElement||J instanceof HTMLOptionElement)return J.value;return}focus(){if(this.length>0)this.collection[0].focus();return this}blur(){if(this.length>0)this.collection[0].blur();return this}click(G){return this.on("click",G)}keyup(G){return this.on("keyup",G)}keydown(G){return this.on("keydown",G)}submit(G){return this.on("submit",G)}change(G){return this.on("change",G)}scroll(G){return this.on("scroll",G)}input(G){return this.on("input",G)}on(G,J,Q){let X=G.split(" "),Z=typeof J==="string",$=Z?Q:J,W=Z?J:null;if(!$)return this;return this.collection.forEach((_)=>{X.forEach((H)=>{let Y=Z&&W?(z)=>{let A=z.target;if(A instanceof Element){let B=A.closest(W);if(B&&_.contains(B))$.call(B,z)}}:$;if(!V.has(_))V.set(_,new Map);let U=V.get(_);if(!U.has(H))U.set(H,[]);U.get(H).push({selector:W,originalCallback:$,wrappedListener:Y}),_.addEventListener(H,Y,!1)})}),this}off(G,J,Q){return this.collection.forEach((X)=>{let Z=V.get(X);if(!Z)return;let $=G?G.split(" "):Array.from(Z.keys()),W=typeof J==="string",_=W?J:void 0,H=W?Q:J;if($.forEach((Y)=>{let U=Z.get(Y);if(!U)return;let z=U.filter((B)=>{if(H&&B.originalCallback!==H)return!1;if(_!==void 0&&B.selector!==_)return!1;return!0});z.forEach((B)=>{X.removeEventListener(Y,B.wrappedListener)});let A=U.filter((B)=>!z.includes(B));if(A.length>0)Z.set(Y,A);else Z.delete(Y)}),Z.size===0)V.delete(X)}),this}trigger(G,J){let Q=G.split(" ");return this.collection.forEach((X)=>{Q.forEach((Z)=>{let $=J!==void 0?new CustomEvent(Z,{detail:J,bubbles:!0,cancelable:!0}):new Event(Z,{bubbles:!0,cancelable:!0});X.dispatchEvent($)})}),this}filter(G){return new L(this.collection.filter((J)=>J.matches(G)))}exists(){return this.length>0}data(G,J){if(J!==void 0)return this.collection.forEach((Q)=>Q.dataset[G]=J),this;return this.length>0?this.collection[0].dataset[G]:void 0}removeData(G){return this.collection.forEach((J)=>delete J.dataset[G]),this}text(G){if(G!==void 0){let J=String(G);for(let Q of this.collection)Q.textContent=J;return this}if(this.length===0)return;return this.collection[0].textContent||""}html(G){if(G!==void 0){let J=String(G);for(let Q of this.collection)Q.innerHTML=J;return this}if(this.length===0)return;return this.collection[0].innerHTML}append(G){return this.collection.forEach((J,Q)=>{if(typeof G==="string")J.insertAdjacentHTML("beforeend",G);else{let X=Q===0?G:G.cloneNode(!0);J.appendChild(X)}}),this}prepend(G){return this.collection.forEach((J,Q)=>{if(typeof G==="string")J.insertAdjacentHTML("afterbegin",G);else{let X=Q===0?G:G.cloneNode(!0);J.prepend(X)}}),this}each(G){return this.collection.forEach((J,Q)=>G(J,Q)),this}get(G){return this.collection[G]}first(){return new L(this.collection[0]??null)}last(){return new L(this.collection[this.collection.length-1]??null)}eq(G){let J=G<0?this.collection.length+G:G;return new L(this.collection[J]??null)}isVisible(){return this.collection.some((G)=>G.style.display!=="none"&&G.offsetWidth>0&&G.offsetHeight>0)}parent(){let G=new Set;return this.collection.forEach((J)=>{if(J.parentElement)G.add(J.parentElement)}),new L(Array.from(G))}parents(){let G=new Set;return this.collection.forEach((J)=>{let Q=J.parentElement;while(Q)G.add(Q),Q=Q.parentElement}),new L(Array.from(G))}find(G){let J=new Set;for(let Q of this.collection){let X=Q.querySelectorAll(G);for(let Z of X)J.add(Z)}return new L(Array.from(J))}offset(){if(this.length===0)return;let G=this.collection[0].getBoundingClientRect();return{top:G.top+window.scrollY,left:G.left+window.scrollX}}width(){if(this.length===0)return 0;return this.collection[0].getBoundingClientRect().width}height(){if(this.length===0)return 0;return this.collection[0].getBoundingClientRect().height}closest(G){let J=new Set;return this.collection.forEach((Q)=>{let X=Q.closest(G);if(X)J.add(X)}),new L(Array.from(J))}attribute(G,J){if(J!==void 0)return this.collection.forEach((Q)=>Q.setAttribute(G,String(J))),this;return this.length>0?this.collection[0].getAttribute(G):void 0}removeAttribute(G){return this.collection.forEach((J)=>J.removeAttribute(G)),this}hasAttribute(G){if(this.length===0)return!1;return this.collection.every((J)=>J.hasAttribute(G))}after(G){return this.collection.forEach((J)=>J.insertAdjacentHTML("afterend",G)),this}before(G){return this.collection.forEach((J)=>J.insertAdjacentHTML("beforebegin",G)),this}style(G,J){if(typeof G==="string"&&J===void 0)return this.length>0?this.collection[0].style.getPropertyValue(G):"";return this.collection.forEach((Q)=>{if(typeof G==="string"&&J!==void 0)Q.style.setProperty(G,J);else if(typeof G==="object")Object.entries(G).forEach(([X,Z])=>{Q.style.setProperty(X,String(Z))})}),this}animate(G,J){return this.collection.forEach((Q)=>Q.animate(G,J)),this}fadeIn(G=400,J){return this.collection.forEach((Q,X)=>{if(getComputedStyle(Q).display==="none")Q.style.display="block";let Z=Q.animate([{opacity:0},{opacity:1}],{duration:G,fill:"forwards"});if(J&&X===this.collection.length-1)Z.onfinish=()=>J()}),this}fadeOut(G=400,J){return this.collection.forEach((Q,X)=>{let Z=Q.animate([{opacity:1},{opacity:0}],{duration:G,fill:"forwards"});Z.onfinish=()=>{if(Q.style.display="none",J&&X===this.collection.length-1)J()}}),this}matches(G){if(this.length===0)return!1;return this.collection.every((J)=>J.matches(G))}remove(){return this.collection.forEach((G)=>G.remove()),this}empty(){return this.collection.forEach((G)=>{G.innerHTML=""}),this}clone(G=!0){let J=this.collection.map((Q)=>Q.cloneNode(G));return new L(J)}replaceWith(G){for(let J=this.collection.length-1;J>=0;J--){let Q=this.collection[J];if(typeof G==="string")Q.outerHTML=G;else{let X=J===0?G:G.cloneNode(!0);Q.replaceWith(X)}}return this}reset(){return this.collection.forEach((G)=>{if(G instanceof HTMLFormElement)G.reset()}),this}property(G,J){if(J!==void 0)return this.collection.forEach((Q)=>{Q[G]=J}),this;if(this.length===0)return;return this.collection[0][G]}siblings(){let G=new Set;return this.collection.forEach((J)=>{if(J.parentElement)Array.from(J.parentElement.children).forEach((Q)=>{if(Q!==J&&Q instanceof HTMLElement)G.add(Q)})}),new L(Array.from(G))}next(){let G=new Set;return this.collection.forEach((J)=>{let Q=J.nextElementSibling;if(Q instanceof HTMLElement)G.add(Q)}),new L(Array.from(G))}prev(){let G=new Set;return this.collection.forEach((J)=>{let Q=J.previousElementSibling;if(Q instanceof HTMLElement)G.add(Q)}),new L(Array.from(G))}children(){let G=new Set;return this.collection.forEach((J)=>{Array.from(J.children).forEach((Q)=>{if(Q instanceof HTMLElement)G.add(Q)})}),new L(Array.from(G))}scrollIntoView(G){if(this.length>0)this.collection[0].scrollIntoView(G);return this}}function n(G){return new L(G)}function o(G){if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",G);else G()}function l(G,J){let Q=document.createElement(G);if(J)Object.entries(J).forEach(([X,Z])=>{Q.setAttribute(X,Z)});return new L(Q)}class P extends Error{status;statusText;response;constructor(G,J){super(J||`Request failed: ${G.status} ${G.statusText}`);this.name="RequestError",this.status=G.status,this.statusText=G.statusText,this.response=G}}class f extends Error{constructor(G,J){super(`Request to "${G}" timed out after ${J}ms`);this.name="RequestTimeoutError"}}class K{static serialize(G,J){if(G instanceof FormData){let X=new URLSearchParams;return G.forEach((Z,$)=>{if(typeof Z==="string")X.append($,Z)}),X.toString()}let Q=[];for(let[X,Z]of Object.entries(G)){if(Z===void 0||Z===null)continue;let $=J?`${J}[${X}]`:X;if(Array.isArray(Z))Z.forEach((W,_)=>{if(typeof W==="object"&&W!==null)Q.push(K.serialize(W,`${$}[${_}]`));else Q.push(`${encodeURIComponent($)}[]=${encodeURIComponent(String(W))}`)});else if(typeof Z==="object")Q.push(K.serialize(Z,$));else Q.push(`${encodeURIComponent($)}=${encodeURIComponent(String(Z))}`)}return Q.filter(Boolean).join("&")}static parseUrl(G){try{return new URL(G)}catch{try{return new URL(G,window.location.origin)}catch(J){throw Error(`Invalid URL: "${G}"`)}}}static createTimeoutController(G,J){let Q=new AbortController;if(!G)return{controller:Q};let X=setTimeout(()=>{Q.abort(new f(J,G))},G);return{controller:Q,timeoutId:X}}static async send(G,J,Q={},X={}){let{timeout:Z,...$}=X,W=K.parseUrl(J),_=void 0,H={...$.headers};if(["GET","DELETE","HEAD"].includes(G.toUpperCase())){if(Q&&typeof Q==="object"&&!(Q instanceof FormData))Object.entries(Q).forEach(([z,A])=>{if(A!==void 0&&A!==null)if(typeof A==="object"){let B=K.serialize({[z]:A});new URLSearchParams(B).forEach((M,S)=>W.searchParams.append(S,M))}else W.searchParams.append(z,String(A))})}else{let z=H["Content-Type"]||H["content-type"];if(Q instanceof FormData)delete H["Content-Type"],delete H["content-type"],_=Q;else if(z==="application/json")_=JSON.stringify(Q);else{if(!z)H["Content-Type"]="application/x-www-form-urlencoded";let A=new URLSearchParams;Object.entries(Q).forEach(([B,I])=>A.append(B,String(I))),_=A}}let{controller:Y,timeoutId:U}=K.createTimeoutController(Z,J);try{return await fetch(W.toString(),{...$,method:G,headers:H,body:_,signal:Y.signal})}finally{if(U)clearTimeout(U)}}static get(G,J={},Q={}){return K.send("GET",G,J,Q)}static post(G,J,Q={}){return K.send("POST",G,J,Q)}static put(G,J,Q={}){return K.send("PUT",G,J,Q)}static patch(G,J,Q={}){return K.send("PATCH",G,J,Q)}static delete(G,J={},Q={}){return K.send("DELETE",G,J,Q)}static head(G,J={},Q={}){return K.send("HEAD",G,J,Q)}static async json(G,J={},Q={}){let X=await K.get(G,J,Q);if(!X.ok)throw new P(X);return X.json()}static async postJson(G,J,Q={}){let X={...Q.headers,"Content-Type":"application/json"},Z=await K.post(G,J,{...Q,headers:X});if(!Z.ok)throw new P(Z);return Z.json()}static async blob(G,J={},Q={}){let X=await K.get(G,J,Q);if(!X.ok)throw new P(X);return X.blob()}static async text(G,J={},Q={}){let X=await K.get(G,J,Q);if(!X.ok)throw new P(X);return X.text()}static async arrayBuffer(G,J={},Q={}){let X=await K.get(G,J,Q);if(!X.ok)throw new P(X);return X.arrayBuffer()}static async exists(G,J={}){try{return(await K.head(G,{},J)).ok}catch{return!1}}}class D{static async readRemote(G,J="base64",Q={}){let X=await K.blob(G,{},Q);return D.read(X,J)}static async read(G,J="text"){switch(J){case"text":return G.text();case"buffer":return G.arrayBuffer();case"base64":return new Promise((Q,X)=>{let Z=new FileReader;Z.onload=()=>Q(Z.result),Z.onerror=()=>X(Z.error),Z.readAsDataURL(G)});case"binary":return new Promise((Q,X)=>{let Z=new FileReader;Z.onload=()=>{let $=Z.result,W="",_=new Uint8Array($),H=_.byteLength;for(let Y=0;Y<H;Y++)W+=String.fromCharCode(_[Y]);Q(W)},Z.onerror=()=>X(Z.error),Z.readAsArrayBuffer(G)});default:throw Error(`FileSystem.read: Unknown type ${J}`)}}static create(G,J,Q="text/plain"){return new File([J],G,{type:Q})}static download(G,J){let Q=URL.createObjectURL(G),X=document.createElement("a");X.href=Q;let Z;if(J!==void 0&&J!=="")Z=J;else if(G instanceof File&&G.name!=="")Z=G.name;else Z="download";X.download=Z,document.body.appendChild(X),X.click(),document.body.removeChild(X),URL.revokeObjectURL(Q)}static extension(G,J=!1){let Q=G.split(".");if(Q.length===1||Q[0]===""&&Q.length===2&&!J)return"";return Q.pop()?.toLowerCase()??""}static isImage(G){let J=D.extension(G);return new Set(["jpg","jpeg","png","gif","svg","webp","avif","bmp","ico","tiff","heic"]).has(J)}static isVideo(G){let J=D.extension(G);return new Set(["mp4","webm","ogg","mov","avi","mkv","m4v"]).has(J)}static isAudio(G){let J=D.extension(G);return new Set(["mp3","wav","ogg","flac","aac","m4a","wma"]).has(J)}static humanSize(G,J=2){if(G===0)return"0 Bytes";let Q=1024,X=["Bytes","KB","MB","GB","TB","PB"],Z=Math.floor(Math.log(G)/Math.log(Q));return parseFloat((G/Math.pow(Q,Z)).toFixed(J))+" "+X[Z]}}class T{static isNamedControl(G){return(G instanceof HTMLInputElement||G instanceof HTMLSelectElement||G instanceof HTMLTextAreaElement)&&G.name!==""&&!G.disabled}static escapeAttributeValue(G){return G.replace(/\\/g,"\\\\").replace(new RegExp("[\\u0000-\\u001F\\u007F']","g"),(J)=>`\\${J.charCodeAt(0).toString(16).toUpperCase()} `)}static formSelector(G){return`form[data-form='${T.escapeAttributeValue(G)}']`}static nameSelector(G){return`[name='${T.escapeAttributeValue(G)}']`}static fill(G,J){let Q=document.querySelector(T.formSelector(G));if(!Q){console.warn(`Form [data-form='${G}'] not found.`);return}Object.entries(J).forEach(([X,Z])=>{if(Z===null||Z===void 0)return;let $=Q.querySelectorAll(T.nameSelector(X));if($.length===0)return;let _=$[0].type,H=String(Z);switch(_){case"radio":$.forEach((Y)=>{let U=Y;U.checked=U.value===H});break;case"checkbox":if($.length===1)$[0].checked=!!Z;else if(Array.isArray(Z)){let Y=Z.map(String);$.forEach((U)=>{let z=U;z.checked=Y.includes(z.value)})}break;case"file":break;default:$[0].value=H;break}})}static values(G,J={}){let{parseNumbers:Q=!0,parseBooleans:X=!0}=J,Z=document.querySelector(T.formSelector(G));if(!Z)return console.warn(`Form [data-form='${G}'] not found.`),{};let $=Array.from(Z.elements).filter(T.isNamedControl),W={},_=Array.from(new Set($.map((Y)=>Y.name))),H=new FormData(Z);for(let Y of _){let U=$.filter((I)=>I.name===Y),z=U[0],A=z?.type;if(A==="file"){let M=U.filter((S)=>S instanceof HTMLInputElement).flatMap((S)=>Array.from(S.files??[]));if(z.multiple||M.length>1)W[Y]=M;else W[Y]=M[0]||null;continue}if(A==="checkbox"){let I=U.filter((M)=>M instanceof HTMLInputElement);if(I.length===1&&X){W[Y]=I[0].checked;continue}W[Y]=I.filter((M)=>M.checked).map((M)=>M.value);continue}if(A==="radio"){let I=U.find((M)=>M instanceof HTMLInputElement&&M.checked);W[Y]=I?I.value:"";continue}let B=H.getAll(Y);if(A==="number"&&Q){if(B.length>1)W[Y]=B.map((I)=>parseFloat(String(I)));else W[Y]=parseFloat(String(B[0]));continue}if(B.length>1)W[Y]=B.map((I)=>T.parseValue(String(I),Q));else W[Y]=T.parseValue(String(B[0]),Q)}return W}static parseValue(G,J){if(J&&G!==""&&!isNaN(Number(G)))return Number(G);return G}static reset(G){let J=document.querySelector(T.formSelector(G));if(!J){console.warn(`Form [data-form='${G}'] not found.`);return}J.reset()}static isValid(G){let J=document.querySelector(T.formSelector(G));if(!J)return console.warn(`Form [data-form='${G}'] not found.`),!1;return J.checkValidity()}static reportValidity(G){let J=document.querySelector(T.formSelector(G));if(!J)return console.warn(`Form [data-form='${G}'] not found.`),!1;return J.reportValidity()}}class F{static get retina(){return window.devicePixelRatio>=2}static get portrait(){return window.matchMedia("(orientation: portrait)").matches}static get landscape(){return window.matchMedia("(orientation: landscape)").matches}static get orientation(){return F.portrait?"portrait":"landscape"}static get darkMode(){return window.matchMedia("(prefers-color-scheme: dark)").matches}static get reducedMotion(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}static get touch(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static get standalone(){let G=navigator;return window.matchMedia("(display-mode: standalone)").matches||G.standalone===!0}static get electron(){let G=window;if(navigator.userAgent.toLowerCase().includes(" electron/"))return!0;if(G.process?.type==="renderer")return!0;if(G.process?.versions?.electron)return!0;return!1}static get electrobun(){return!!window.__electrobun}static get desktopApp(){return F.electron||F.electrobun}static get cordova(){return!!window.cordova}static get userAgent(){return navigator.userAgent.toLowerCase()}static desktop(G="Any"){let J=navigator;if(J.userAgentData?.mobile===!0)return!1;if(F.isIpadOS())return!1;let Q=F.userAgent,X=J.userAgentData?.platform?.toLowerCase()||"",Z={ChromeOS:X.includes("cros")||Q.includes("cros"),Windows:X.includes("windows")||Q.includes("windows"),macOS:X.includes("macos")||Q.includes("macintosh"),Linux:!Q.includes("android")&&(X.includes("linux")||Q.includes("linux")),FreeBSD:X.includes("freebsd")||Q.includes("freebsd")};if(G==="Any")return Object.values(Z).some(($)=>$);return Z[G]||!1}static mobile(G="Any"){if(navigator.userAgentData?.mobile===!0&&G==="Any")return!0;let Q=F.userAgent,X={Android:Q.includes("android"),iOS:/iphone|ipod/.test(Q),iPadOS:F.isIpadOS(),WindowsMobile:/windows phone|iemobile|wpdesktop/.test(Q),BlackBerry:/blackberry|bb10/.test(Q)};if(G==="Any")return Object.values(X).some((Z)=>Z);return X[G]||!1}static isIpadOS(){let G=F.userAgent;if(G.includes("ipad"))return!0;if(G.includes("macintosh")&&navigator.maxTouchPoints>0)return!0;return!1}static get serviceWorkers(){return"serviceWorker"in navigator&&window.isSecureContext}static get coarsePointer(){return window.matchMedia("(pointer: coarse)").matches}static get finePointer(){return window.matchMedia("(pointer: fine)").matches}static get canHover(){return window.matchMedia("(hover: hover)").matches}}class N{static async image(G){let J=new Image;return J.src=G,await J.decode(),J}static async images(G){return Promise.all(G.map((J)=>N.image(J)))}static async file(G,J="low"){let X=await fetch(G,{priority:J});if(!X.ok)throw Error(`Preload failed for "${G}": ${X.status} ${X.statusText}`);return X}static async files(G,J="low"){return Promise.all(G.map((Q)=>N.file(Q,J)))}static async isCached(G,J){if(!("caches"in window))return!1;try{return!!await(await caches.open(G)).match(J)}catch{return!1}}static async addToCache(G,J){if(!("caches"in window))throw Error("Cache API is not supported in this browser");try{await(await caches.open(G)).add(J)}catch(Q){throw Error(`Failed to cache "${J}": ${Q instanceof Error?Q.message:String(Q)}`)}}static async addAllToCache(G,J){if(!("caches"in window))throw Error("Cache API is not supported in this browser");try{await(await caches.open(G)).addAll(J)}catch(Q){throw Error(`Failed to cache URLs: ${Q instanceof Error?Q.message:String(Q)}`)}}static async stylesheet(G){return new Promise((J,Q)=>{let X=document.createElement("link");X.rel="preload",X.as="style",X.href=G,X.onload=()=>J(),X.onerror=()=>Q(Error(`Failed to preload stylesheet: ${G}`)),document.head.appendChild(X)})}static async script(G){return new Promise((J,Q)=>{let X=document.createElement("link");X.rel="preload",X.as="script",X.href=G,X.onload=()=>J(),X.onerror=()=>Q(Error(`Failed to preload script: ${G}`)),document.head.appendChild(X)})}static async font(G,J=!0){return new Promise((Q,X)=>{let Z=document.createElement("link");if(Z.rel="preload",Z.as="font",Z.href=G,J)Z.crossOrigin="anonymous";Z.onload=()=>Q(),Z.onerror=()=>X(Error(`Failed to preload font: ${G}`)),document.head.appendChild(Z)})}static async audio(G,J){let Q=await fetch(G);if(!Q.ok)throw Error(`Preload failed for "${G}": ${Q.status} ${Q.statusText}`);let X=await Q.arrayBuffer(),Z=J??new AudioContext,$=!J;try{return await Z.decodeAudioData(X)}finally{if($)await Z.close()}}static async audios(G,J){let Q=J??new AudioContext,X=!J;try{return await Promise.all(G.map((Z)=>N.audio(Z,Q)))}finally{if(X)await Q.close()}}}function j(G){if(G==="")return 0;let J=G.split("."),Q=0,X=[1000000000000,1e8,1e4];for(let Z=0;Z<Math.min(J.length,X.length);Z++){let $=parseInt(J[Z],10)||0;Q+=$*X[Z]}return Q}function E(G){if(G===null||typeof G!=="object")return G;if(!Array.isArray(G)&&!(G instanceof Date)&&!(G instanceof RegExp)&&!(G instanceof Map)&&!(G instanceof Set)){let Q=Object.getPrototypeOf(G);if(Q!==Object.prototype&&Q!==null)return G}if(typeof globalThis.structuredClone==="function")try{return globalThis.structuredClone(G)}catch(Q){if(!(Q instanceof DOMException)||Q.name!=="DataCloneError")throw Q}if(Array.isArray(G))return G.map((Q)=>E(Q));if(G instanceof Date)return new Date(G.getTime());if(G instanceof RegExp)return new RegExp(G.source,G.flags);if(G instanceof Map){let Q=p(G,()=>new Map);return G.forEach((X,Z)=>{Q.set(E(Z),E(X))}),Q}if(G instanceof Set){let Q=p(G,()=>new Set);return G.forEach((X)=>{Q.add(E(X))}),Q}let J={};for(let Q of Object.keys(G))J[Q]=E(G[Q]);return J}function p(G,J){let Q=G.constructor;try{return new Q}catch{return J()}}function d(G,J){let Q=G.endsWith("/")?G.slice(0,-1):G,X=J.startsWith("/")?J:`/${J}`;return`${Q}${X}`}class R extends Error{constructor(G){super(`Key "${G}" not found in storage`);this.name="KeyNotFoundError"}}class O{name;version;store;id;numericVersion;upgrades;storage;_openPromise;constructor({name:G="",version:J="",store:Q=""}){this.name=G,this.version=J,this.store=Q,this.upgrades={},this.numericVersion=j(J),this.id=this.computeId()}computeId(){if(this.name!==""&&this.version!==""&&this.store!=="")return`${this.name}::${this.store}::${this.version}_`;else if(this.name!==""&&this.version!=="")return`${this.name}::${this.version}_`;else if(this.name!=="")return`${this.name}::_`;else return""}configuration(G){if(G.name!==void 0)this.name=G.name;if(G.version!==void 0)this.version=G.version,this.numericVersion=j(G.version);if(G.store!==void 0)this.store=G.store;this.id=this.computeId()}async open(){if(this.storage instanceof Storage)return this;if(this._openPromise)return this._openPromise;this._openPromise=(async()=>{let G=[],J=[],Q=null;if(this.version!==""){let X="";if(this.name!==""&&this.version!==""&&this.store!=="")X=`${this.name}::${this.store}::`;else if(this.name!==""&&this.version!=="")X=`${this.name}::`;let Z=Array.from(new Set(Object.keys(window.localStorage).filter(($)=>{return $.indexOf(X)===0}).map(($)=>{return $.replace(X,"").split("_")[0]}).filter(($)=>{return $.indexOf("::")===-1}))).sort(($,W)=>j($)-j(W));if(Z.length>0){let $=Z.filter((_)=>{return j(_)<this.numericVersion}).pop();if(!$)return this.storage=window.localStorage,this;let W=j($);if(W<this.numericVersion){let _=Object.keys(this.upgrades).sort((z,A)=>{let[B]=z.split("::").map(Number),[I]=A.split("::").map(Number);return B-I}),H=_.findIndex((z)=>{let[A]=z.split("::");return parseInt(A)===W});if(H>-1)G=_.slice(H).filter((z)=>{let[A,B]=z.split("::");return parseInt(A)<this.numericVersion&&parseInt(B)<=this.numericVersion});let Y=`${this.name}::${$}_`;if(this.name!==""&&this.version!==""&&this.store!=="")Y=`${this.name}::${this.store}::${$}_`;else if(this.name!==""&&this.version!=="")Y=`${this.name}::${$}_`;let U=Object.keys(window.localStorage).filter((z)=>{return z.indexOf(Y)===0}).map((z)=>{return z.replace(Y,"")});Q=new Map,Object.keys(window.localStorage).filter((z)=>{return z.indexOf(this.id)===0}).forEach((z)=>{Q.set(z,window.localStorage.getItem(z))});for(let z of U){let A=`${Y}${z}`,B=window.localStorage.getItem(A);if(B!==null)window.localStorage.setItem(this.id+z,B),J.push(A)}}}}this.storage=window.localStorage;try{for(let X of G)await this.upgrades[X].call(this,this);for(let X of J)window.localStorage.removeItem(X)}catch(X){if(Q)Object.keys(window.localStorage).filter((Z)=>{return Z.indexOf(this.id)===0}).forEach((Z)=>{if(Q.has(Z)){let $=Q.get(Z)??null;if($===null)window.localStorage.removeItem(Z);else window.localStorage.setItem(Z,$)}else window.localStorage.removeItem(Z)});throw this.storage=void 0,X}return this})();try{return await this._openPromise}finally{this._openPromise=void 0}}async set(G,J){return await this.open(),this.storage.setItem(this.id+G,JSON.stringify(J)),{key:G,value:J}}async update(G,J){try{let Q=await this.get(G);if(typeof Q==="object"&&Q!==null){if(typeof J==="object"&&J!==null)J={...Q,...J}}return this.storage.setItem(this.id+G,JSON.stringify(J)),{key:G,value:J}}catch{return this.set(G,J)}}async get(G){await this.open();let J=this.storage.getItem(this.id+G);if(J===null)throw new R(G);try{return JSON.parse(J)}catch{return J}}async getAll(){let G=await this.keys(),J={};for(let Q of G)try{J[Q]=await this.get(Q)}catch{}return J}async contains(G){if((await this.keys()).includes(G))return;else throw new R(G)}async upgrade(G,J,Q){let X=`${j(G)}::${j(J)}`;return this.upgrades[X]=Q,Promise.resolve()}async rename(G){if(this.name===G)throw Error("Cannot rename: new name is identical to current name");let J=await this.keys(),Q=this.id;this.name=G,this.id=this.computeId();for(let X of J){let Z=this.storage.getItem(`${Q}${X}`);if(Z!==null)this.storage.setItem(this.id+X,Z),this.storage.removeItem(`${Q}${X}`)}}async key(G,J=!1){let Q=await this.keys(J);if(G<0||G>=Q.length)throw Error(`Index ${G} out of bounds. Space has ${Q.length} keys.`);return Q[G]}async keys(G=!1){return await this.open(),Object.keys(this.storage).filter((J)=>{return J.indexOf(this.id)===0}).map((J)=>{if(G===!0)return J;else return J.replace(this.id,"")})}async remove(G){let J=await this.get(G);return this.storage.removeItem(this.id+G),J}async clear(){let G=await this.keys();for(let J of G)this.storage.removeItem(this.id+J)}}class x extends O{constructor({name:G="",version:J="",store:Q=""}){super({name:G,version:J,store:Q})}async open(){if(this.storage instanceof Storage)return this;return this.storage=window.sessionStorage,this}async upgrade(G,J,Q){return console.warn("SessionStorage.upgrade() is a no-op. Session data is temporary and does not support migrations."),Promise.resolve()}}class h extends Error{constructor(G){super(`Key "${G}" not found in IndexedDB`);this.name="KeyNotFoundError"}}class q{name;version;store;props;index;keyPath;numericVersion;upgrades;storage;_openPromise;_failedUpgradeError;constructor({name:G="",version:J="",store:Q="",props:X={},index:Z={}}){this.name=G,this.version=J,this.store=Q,this.props=X||{},this.index=Z,this.keyPath=typeof X?.keyPath==="string"?X.keyPath:null,this.upgrades={},this.numericVersion=j(J)}configuration(G){if(G.name!==void 0)this.name=G.name;if(G.version!==void 0)this.version=G.version,this.numericVersion=j(G.version);if(G.store!==void 0)this.store=G.store;if(G.props!==void 0){let J=typeof G.props.keyPath==="string"?G.props.keyPath:null;if(this.storage instanceof IDBDatabase&&J!==this.keyPath)throw Error(`Cannot change keyPath after the IndexedDB has been opened. The on-disk store still uses keyPath "${this.keyPath??"<out-of-line>"}"; bump the version and migrate via upgrade() instead.`);this.props=G.props,this.keyPath=J}}static isRecord(G){if(G===null||typeof G!=="object"||Array.isArray(G))return!1;let J=Object.getPrototypeOf(G);return J===Object.prototype||J===null}valueWithInlineKey(G,J){if(!q.isRecord(J))throw Error(`IndexedDB store "${this.store}" uses keyPath "${this.keyPath}" and requires object values when setting an explicit key.`);return{...J,[this.keyPath]:G}}mergeValues(G,J){if(q.isRecord(G)&&q.isRecord(J))return{...G,...J};return J}async open(){if(this.name==="")throw Error("IndexedDB requires a name. No name has been defined for this space.");if(this.store==="")throw Error("IndexedDB requires a store name. No store has been defined for this space.");if(this.numericVersion<1)throw Error("IndexedDB requires a version >= 1. No valid version has been defined for this space.");if(this._failedUpgradeError!==void 0)throw this._failedUpgradeError;if(this.storage instanceof IDBDatabase)return this;if(this._openPromise)return this._openPromise;this._openPromise=(async()=>{let G=[],J=[],Q=await new Promise((X,Z)=>{let $=window.indexedDB.open(this.name,this.numericVersion),W;$.onerror=(_)=>{if(W instanceof Error)Z(W);else if(W!==void 0)Z(Error(`IndexedDB "${this.name}" upgrade failed`,{cause:W}));else Z(Error(`Failed to open IndexedDB "${this.name}": ${_.target.error?.message}`))},$.onsuccess=(_)=>{X(_.target.result)},$.onupgradeneeded=(_)=>{let H=_.target.result;try{if(_.oldVersion<1){let Y=H.createObjectStore(this.store,this.props);for(let U of Object.keys(this.index)){let z=this.index[U];Y.createIndex(z.name,z.field,z.props)}}else{let Y=Object.keys(this.upgrades).sort((z,A)=>{let[B]=z.split("::").map(Number),[I]=A.split("::").map(Number);return B-I}),U=Y.findIndex((z)=>{let[A]=z.split("::");return parseInt(A)===_.oldVersion});if(U>-1){let z=Y.slice(U).filter((A)=>{let[B,I]=A.split("::");return parseInt(B)<this.numericVersion&&parseInt(I)<=this.numericVersion});for(let A of z){let B=this.upgrades[A].call(this,this,_);if(B instanceof Promise)J.push(B.catch((I)=>{G.push(I)}))}}}}catch(Y){W=Y,_.target.transaction?.abort()}}});if(this.storage=Q,await Promise.all(J),G.length>0){let X=G.length===1?G[0]:AggregateError(G,`IndexedDB "${this.name}": ${G.length} async upgrade callback(s) rejected after the version-change transaction committed.`);try{Q.close()}catch{}throw this.storage=void 0,this._failedUpgradeError=X,X}return this})();try{return await this._openPromise}finally{this._openPromise=void 0}}async set(G=null,J){return await this.open(),new Promise((Q,X)=>{let Z=this.storage.transaction(this.store,"readwrite").objectStore(this.store),$;if(G!==null)if(this.keyPath)$=Z.put(this.valueWithInlineKey(G,J));else $=Z.put(J,G);else $=Z.add(J);$.addEventListener("success",(W)=>{Q({key:String(W.target.result),value:J})}),$.addEventListener("error",(W)=>{X(Error(`Failed to set key "${G}": ${W.target.error?.message}`))})})}async update(G,J){try{let Q=await this.get(G);if(typeof Q>"u")return this.set(G,J);return new Promise((X,Z)=>{let $=this.storage.transaction(this.store,"readwrite").objectStore(this.store),W=this.mergeValues(Q,J),_=this.keyPath?$.put(this.valueWithInlineKey(G,W)):$.put(W,G);_.addEventListener("success",(H)=>{X({key:String(H.target.result),value:J})}),_.addEventListener("error",(H)=>{Z(Error(`Failed to update key "${G}": ${H.target.error?.message}`))})})}catch{return this.set(G,J)}}async get(G){return await this.open(),new Promise((J,Q)=>{let Z=this.storage.transaction(this.store,"readonly").objectStore(this.store).get(G);Z.addEventListener("success",($)=>{let W=$.target.result;if(typeof W<"u"&&W!==null)J(W);else Q(new h(G))}),Z.addEventListener("error",($)=>{Q(Error(`Failed to get key "${G}": ${$.target.error?.message}`))})})}async getAll(){return await this.open(),new Promise((G,J)=>{let X=this.storage.transaction(this.store,"readonly").objectStore(this.store).openCursor(),Z=this.keyPath,$={};X.addEventListener("success",(W)=>{let _=W.target.result;if(!_){G($);return}let H=String(_.key),Y=_.value;if(Z&&q.isRecord(Y)){let U=Y[Z]??H,z={...Y};delete z[Z],$[String(U)]=z}else $[H]=Y;_.continue()}),X.addEventListener("error",(W)=>{J(Error(`Failed to get all items: ${W.target.error?.message}`))})})}async contains(G){await this.get(G)}async upgrade(G,J,Q){let X=`${j(G)}::${j(J)}`;return this.upgrades[X]=Q,Promise.resolve()}rename(){return Promise.reject(Error("IndexedDB does not support renaming databases. Create a new database and migrate data manually."))}key(){return Promise.reject(Error("IndexedDB does not support getting keys by index. Use keys() to get all keys."))}async keys(){return await this.open(),new Promise((G,J)=>{let X=this.storage.transaction(this.store,"readonly").objectStore(this.store).getAllKeys();X.addEventListener("success",(Z)=>{G(Z.target.result.map(String))},!1),X.addEventListener("error",(Z)=>{J(Error(`Failed to get keys: ${Z.target.error?.message}`))},!1)})}async remove(G){let J=await this.get(G);return new Promise((Q,X)=>{let $=this.storage.transaction(this.store,"readwrite").objectStore(this.store).delete(G);$.addEventListener("success",()=>{Q(J)},!1),$.addEventListener("error",(W)=>{X(Error(`Failed to delete key "${G}": ${W.target.error?.message}`))},!1)})}async clear(){return await this.open(),new Promise((G,J)=>{let X=this.storage.transaction(this.store,"readwrite").objectStore(this.store).clear();X.addEventListener("success",()=>{G()},!1),X.addEventListener("error",(Z)=>{J(Error(`Failed to clear store: ${Z.target.error?.message}`))},!1)})}}class C extends Error{constructor(G){super(`Key "${G}" not found in remote storage`);this.name="KeyNotFoundError"}}var b="__artemis_value__";class w{name;version;store;baseEndpoint;endpoint;props;storage;constructor({name:G="",version:J="",store:Q="",endpoint:X="",props:Z={}}){this.name=G,this.version=J,this.store=Q,this.baseEndpoint=X,this.endpoint=this.computeEndpoint(),this.props=Z}static isRecord(G){if(G===null||typeof G!=="object"||Array.isArray(G)||typeof FormData<"u"&&G instanceof FormData)return!1;let J=Object.getPrototypeOf(G);return J===Object.prototype||J===null}static looksLikeWrapper(G){return w.isRecord(G)&&Object.keys(G).length===1&&Object.prototype.hasOwnProperty.call(G,b)}static toRequestData(G){if(w.isRecord(G)&&!w.looksLikeWrapper(G))return G;return{[b]:G}}static unwrapValue(G){if(w.looksLikeWrapper(G))return G[b];return G}static mergeValues(G,J){if(w.isRecord(G)&&w.isRecord(J))return{...G,...J};return J}ensureOk(G,J){if(G.ok)return;if(G.status===404&&J!==void 0)throw new C(J);throw new P(G)}async readJsonResponse(G,J){if(this.ensureOk(G,J),G.status===204)return null;let Q=await G.text();return Q===""?null:JSON.parse(Q)}computeEndpoint(){if(this.store)return d(this.baseEndpoint,`${this.store}/`);return this.baseEndpoint.endsWith("/")?this.baseEndpoint:`${this.baseEndpoint}/`}configuration(G){if(G.name!==void 0)this.name=G.name;if(G.version!==void 0)this.version=G.version;if(G.store!==void 0)this.store=G.store;if(G.endpoint!==void 0)this.baseEndpoint=G.endpoint;this.endpoint=this.computeEndpoint()}async open(){if(typeof this.storage>"u")this.storage=K;return this}async set(G,J){await this.open();let Q=await this.storage.post(this.endpoint+G,w.toRequestData(J),this.props),X=await this.readJsonResponse(Q,G);return{key:G,value:w.unwrapValue(X)}}async update(G,J){await this.open();try{let Q=await this.get(G),X=w.mergeValues(Q,J),Z=await this.storage.put(this.endpoint+G,w.toRequestData(X),this.props),$=await this.readJsonResponse(Z,G);return{key:G,value:w.unwrapValue($)}}catch(Q){if(Q instanceof C)return this.set(G,J);throw Q}}async get(G){await this.open();try{let J=await this.storage.json(this.endpoint+G,{},this.props);return w.unwrapValue(J)}catch(J){if(J instanceof P&&J.status===404)throw new C(G);throw J}}async getAll(){await this.open();let G=await this.storage.json(this.endpoint,{},this.props);if(G===null||typeof G!=="object")return{};let J={};for(let[Q,X]of Object.entries(G))J[Q]=w.unwrapValue(X);return J}async contains(G){if((await this.keys()).includes(G))return;else throw new C(G)}upgrade(){return Promise.reject(Error("RemoteStorage cannot be upgraded from the client. Upgrades must be performed server-side."))}rename(){return Promise.reject(Error("RemoteStorage cannot be renamed from the client. Renaming must be performed server-side."))}key(){return Promise.reject(Error("RemoteStorage does not support getting keys by index. Use keys() to get all keys."))}async keys(){return await this.open(),this.storage.json(this.endpoint,{keys:!0},this.props)}async remove(G){await this.open();let J=await this.storage.delete(this.endpoint+G,{},this.props);return w.unwrapValue(await this.readJsonResponse(J,G))}async clear(){await this.open();let G=await this.storage.delete(this.endpoint,{},this.props);this.ensureOk(G)}}var v={LocalStorage:O,SessionStorage:x,IndexedDB:q,RemoteStorage:w};class c{_configuration;adapter;callbacks;transformations;constructor(G=v.LocalStorage,J={}){this._configuration={name:"",version:"",store:"",...J},this.adapter=new G(this._configuration),this.callbacks={create:[],update:[],delete:[]},this.transformations={}}configuration(G=null){if(G!==null){if(this._configuration={...this._configuration,...G},this.adapter.configuration)this.adapter.configuration(G);return}else return this._configuration}async open(){return await this.adapter.open(),this}applySetTransformations(G,J){let Q=E(J);for(let X of Object.values(this.transformations))if(typeof X.set==="function")Q=X.set(G,Q);return Q}applyGetTransformations(G,J){let Q=J;for(let X of Object.values(this.transformations))if(typeof X.get==="function")Q=X.get(G,Q);return Q}async set(G,J){let Q=this.applySetTransformations(G,J),X=await this.adapter.set(G,Q);for(let Z of this.callbacks.create)Z.call(null,X.key,X.value);return X}async update(G,J){let Q=this.applySetTransformations(G,J),X=await this.adapter.update(G,Q);for(let Z of this.callbacks.update)Z.call(null,X.key,X.value);return X}async get(G){let J=await this.adapter.get(G);return this.applyGetTransformations(G,J)}async getAll(){let G=await this.adapter.getAll(),J={};for(let Q of Object.keys(G))J[Q]=this.applyGetTransformations(Q,G[Q]);return J}async each(G){let J=await this.getAll(),Q=[];for(let[X,Z]of Object.entries(J))Q.push(G.call(this,X,Z));return Promise.all(Q)}contains(G){return this.adapter.contains(G)}async upgrade(G,J,Q){return await this.adapter.upgrade(G,J,Q),this}rename(G){return this.adapter.rename(G)}onCreate(G){this.callbacks.create.push(G)}onUpdate(G){this.callbacks.update.push(G)}onDelete(G){this.callbacks.delete.push(G)}addTransformation({id:G,get:J,set:Q}){this.transformations[G]={id:G,get:J,set:Q}}removeTransformation(G){delete this.transformations[G]}key(G,J=!1){return this.adapter.key(G,J)}keys(G=!1){return this.adapter.keys(G)}async remove(G){let J=await this.adapter.remove(G);for(let Q of this.callbacks.delete)Q.call(null,G,J)}clear(){return this.adapter.clear()}}class m{static capitalize(G,J={}){let{preserveCase:Q=!1}=J;return G.replace(/\w\S*/g,(X)=>{let Z=X.charAt(0).toUpperCase(),$=Q?X.substring(1):X.substring(1).toLowerCase();return Z+$})}static selection(){return window.getSelection()?.toString()||""}static suffix(G,J){let Q=J.indexOf(G);if(Q===-1)return"";return J.slice(Q+G.length)}static prefix(G,J){let Q=J.indexOf(G);if(Q===-1)return"";return J.slice(0,Q)}static friendly(G){return G.toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-")}static truncate(G,J,Q="..."){if(G.length<=J)return G;if(J<=Q.length)return Q.slice(0,J);return G.slice(0,J-Q.length).trimEnd()+Q}static isBlank(G){return G===null||G===void 0||G.trim()===""}}class i{static async callAsync(G,J,...Q){try{return await G.apply(J,Q)}catch(X){return Promise.reject(X)}}static uuid(){if(typeof crypto<"u"&&"randomUUID"in crypto)return crypto.randomUUID();if(typeof crypto<"u"&&"getRandomValues"in crypto)return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,(J)=>{let Q=parseInt(J,10),X=crypto.getRandomValues(new Uint8Array(1))[0],Z=15>>Math.floor(Q/4);return(Q^X&Z).toString(16)});let G=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1);return`${G()}${G()}-${G()}-${G()}-${G()}-${G()}${G()}${G()}`}static debounce(G,J){let Q=null;return(...X)=>{if(Q!==null)clearTimeout(Q);Q=setTimeout(()=>{G(...X),Q=null},J)}}static throttle(G,J){let Q=!1;return(...X)=>{if(!Q)G(...X),Q=!0,setTimeout(()=>{Q=!1},J)}}}if(typeof window==="object")window.Artemis=g;export{i as Util,m as Text,v as SpaceAdapter,c as Space,x as SessionStorage,f as RequestTimeoutError,P as RequestError,K as Request,C as RemoteStorageKeyNotFoundError,w as RemoteStorage,N as Preload,F as Platform,R as LocalStorageKeyNotFoundError,O as LocalStorage,h as IndexedDBKeyNotFoundError,q as IndexedDB,T as Form,D as FileSystem,y as DebugLevel,k as Debug,L as DOM,o as $_ready,l as $_create,n as $_}; //# debugId=0D63478B937241E764756E2164756E21 //# sourceMappingURL=artemis.browser.js.map